cli

package
v0.1.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 26, 2026 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(cfg Config, deps Deps) (agentkit.Platform, error)

New registers platform/cli: Interactive terminal platform with slash commands.

Types

type Config

type Config struct {
	// Prompt is first message; falls back to the positional command-line arguments.
	Prompt string `json:"prompt"`
	// Once runs a single turn and exit instead of looping on stdin.
	Once bool `json:"once"`
	// DefaultSessionID overrides the session to attach to. When empty, CLI reads
	// sessions/cli_current.jsonl (falls back to cli:default when the link is missing).
	DefaultSessionID string `json:"defaultSessionId"`
}

type Deps

type Deps struct {
	Commands     agentkit.Commands     `json:"commands,omitempty"`
	SessionStore agentkit.SessionStore `json:"sessionStore,omitempty"`
}

type Input

type Input struct {
	// contains filtered or unexported fields
}

Input owns one stdin stream for prompt lines and permission replies.

func NewInput

func NewInput(in io.Reader) *Input

func (*Input) ReadPrompt

func (t *Input) ReadPrompt() (string, error)

ReadPrompt reads one line from stdin.

type Platform

type Platform struct {
	// contains filtered or unexported fields
}

func (*Platform) PermissionCapability

func (p *Platform) PermissionCapability() permission.Capability

func (*Platform) PlatformID added in v0.1.1

func (p *Platform) PlatformID() string

func (*Platform) Receive

func (p *Platform) Receive(ctx context.Context) (agentkit.MessageEvent, error)

func (*Platform) Send

func (p *Platform) Send(_ context.Context, event agentkit.OutboundEvent) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL