Documentation
¶
Overview ¶
Package cli is the command tree of the visor. A product mounts it under its own binary with its own home, for example "<product> visor".
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Options ¶
type Options struct {
// Name is the command name. Empty is "agent-visor".
Name string
// Usage is the one-line help. Empty uses a generic text.
Usage string
// Home is the default visor home. --home replaces it.
Home string
// Socket is the default socket. Empty is <home>/visor.sock.
Socket string
// Build is the build of this binary.
Build string
Stdin io.Reader
Stdout io.Writer
Stderr io.Writer
// Configure changes the visor options of serve, for example to add env
// or backends. It can be nil.
Configure func(ctx context.Context, o *agentvisor.Options) error
// Dial connects to the visor. Nil uses agentvisor.Dial.
Dial func(ctx context.Context, socket string) (Visor, error)
}
Options configures the command tree.
type Visor ¶
type Visor interface {
Info(ctx context.Context) (agentvisor.Info, error)
Upgrade(ctx context.Context, spec agentvisor.UpgradeSpec) (agentvisor.Info, error)
Start(ctx context.Context, spec agentvisor.StartSpec) (agentvisor.Session, error)
Session(ctx context.Context, id string) (agentvisor.Session, error)
Sessions(ctx context.Context, f agentvisor.Filter) ([]agentvisor.Session, error)
Send(ctx context.Context, id string, in agentvisor.Input) (agentvisor.Delivery, error)
Interrupt(ctx context.Context, id string) error
Answer(ctx context.Context, id, requestID string, a agentvisor.Answer) error
Stop(ctx context.Context, id string) error
Events(ctx context.Context, f agentvisor.Filter, after uint64) (*agentvisor.EventStream, error)
Projects(ctx context.Context, f agentvisor.Filter) ([]agentvisor.Project, error)
ForgetProject(ctx context.Context, id string) error
Workdirs(ctx context.Context, f agentvisor.Filter) ([]agentvisor.Workdir, error)
EnsureWorkdir(ctx context.Context, w agentvisor.WorkdirSpec) (agentvisor.Workdir, error)
ArchiveWorkdir(ctx context.Context, id string) error
RestoreWorkdir(ctx context.Context, id string) (agentvisor.Workdir, error)
RemoveWorkdir(ctx context.Context, id string, force bool) error
Attach(ctx context.Context, id string, o agentvisor.AttachOptions) (*agentvisor.AttachStream, error)
Handover(ctx context.Context, id string, to agentvisor.Kind) error
Screen(ctx context.Context, id string) (agentvisor.Screen, error)
Harnesses(ctx context.Context) ([]agentvisor.Harness, error)
Harness(ctx context.Context, name string) (agentvisor.Harness, error)
InstallHarness(ctx context.Context, name, version string) (agentvisor.Harness, error)
UpdateHarness(ctx context.Context, name, version string) (agentvisor.Harness, error)
SetHarnessAuth(ctx context.Context, name string, mode agentvisor.AuthMode) (agentvisor.Harness, error)
SetHarnessUpdates(ctx context.Context, name string, mode agentvisor.UpdateMode, version string) (agentvisor.Harness, error)
CheckHarnesses(ctx context.Context) error
LoginHarness(ctx context.Context, name string, spec agentvisor.LoginSpec) (agentvisor.Login, error)
HarnessLoginCode(ctx context.Context, name, code string) (agentvisor.Login, error)
HarnessFiles(ctx context.Context, name string) ([]agentvisor.HomeFile, error)
OwnHarnessFile(ctx context.Context, name, key string, start agentvisor.OwnStart) (agentvisor.HomeFile, error)
LogoutHarness(ctx context.Context, name string) error
HarnessModels(ctx context.Context, name string) ([]agentvisor.Model, error)
Close(ctx context.Context) error
}
Visor is the visor API that the commands use. *agentvisor.Client and *agentvisor.Visor satisfy it.
Click to show internal directories.
Click to hide internal directories.