Help us shape the future of Go! Take the 2026 Go Developer Survey

cli

package
v0.13.5 Latest Latest
Warning

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

Go to latest
Published: Sep 30, 2026 License: Apache-2.0 Imports: 45 Imported by: 0

Documentation

Index

Constants

View Source
const Version = "0.1.0-dev"

Variables

This section is empty.

Functions

func DataDir

func DataDir() (string, error)

func Main

func Main(args []string, in *os.File, out, errout io.Writer) error

Types

type Admission

type Admission struct {
	Execution    *ExecutionGrant `json:"execution,omitempty"`
	RunID        string          `json:"run_id"`
	Agent        agentcore.Agent `json:"agent"`
	Context      string          `json:"context"`
	AllowedTools []string        `json:"allowed_tools"`
}

Admission is an immutable host policy snapshot. All local execution still passes the CLI's own tool and approval policy before reaching the OS.

type Connection

type Connection struct {
	URL             string     `json:"url"`
	Descriptor      Descriptor `json:"descriptor"`
	CredentialStore string     `json:"credential_store"`
}

type Descriptor

type Descriptor struct {
	Capabilities    []string `json:"capabilities,omitempty"`
	ProtocolVersion string   `json:"protocol_version"`
	AppID           string   `json:"app_id"`
	Name            string   `json:"name"`
	APIBaseURL      string   `json:"api_base_url"`
	Issuer          string   `json:"issuer"`
	ClientID        string   `json:"client_id"`
	Resource        string   `json:"resource"`
	Scopes          []string `json:"scopes"`
}

type ExecutionGrant

type ExecutionGrant struct {
	ID             string    `json:"id"`
	RunID          string    `json:"run_id"`
	Epoch          int64     `json:"epoch"`
	LocalRunID     string    `json:"local_run_id,omitempty"`
	PolicyHash     string    `json:"policy_hash"`
	LeaseExpiresAt time.Time `json:"lease_expires_at"`
}

ExecutionGrant is a host-issued, revocable identity for one local execution. It grants no authority without the connection's authenticated user token.

type Options

type Options struct {
	Connection, Agent, Target, RequestID string

	Directory, Provider, Model, Prompt, Resume, Intent string
	Review, Yes                                        bool
	Env                                                []string
}

type Session

type Session struct {
	Home string

	Store  *store.SQL
	Engine *engine.Engine
	Events chan engine.Event
	// contains filtered or unexported fields
}

func OpenSession

func OpenSession(dir string, factory runtime.NativeModelFactory) (*Session, error)

func (*Session) Close

func (s *Session) Close() error

func (*Session) Execute

func (s *Session) Execute(ctx context.Context, o Options) (*agentcore.AgentRun, error)

func (*Session) Sync

func (s *Session) Sync(ctx context.Context, runID string) error

Sync uses durable event IDs. A host must deduplicate event_id; retries send the same IDs and never create a second host run.

Jump to

Keyboard shortcuts

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