runtime

package
v0.7.1 Latest Latest
Warning

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

Go to latest
Published: May 12, 2026 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExitCodeForStopReason added in v0.1.0

func ExitCodeForStopReason(stopReason string) int

ExitCodeForStopReason returns Avenor's locked process exit code for a terminal ACP stop reason.

Types

type Capabilities

type Capabilities struct {
	Backend             string
	Permissions         bool
	Resume              bool
	ExternalServerURL   bool
	SubprocessDiscovery bool
	ModelSelection      bool
}

Capabilities describes what a runtime backend supports.

type PermissionResponse

type PermissionResponse struct {
	Outcome  string `json:"outcome"`
	OptionID string `json:"option_id,omitempty"`
	Message  string `json:"message,omitempty"`
}

PermissionResponse is the response to a permission request.

type Provider

type Provider interface {
	Start(ctx context.Context, opts StartOptions) (Session, error)
	Resume(ctx context.Context, sessionID string) (Session, error)
	Prompt(ctx context.Context, sessionID string, prompt string) error
	Cancel(ctx context.Context, sessionID string) error
	Events(ctx context.Context, sessionID string) (<-chan events.Event, error)
	AnswerPermission(ctx context.Context, sessionID string, requestID string, response PermissionResponse) error
	Capabilities(ctx context.Context) (Capabilities, error)
}

Provider is the interface that all ACP runtime backends must implement.

type Session

type Session struct {
	SessionID string
	Backend   string
	Dir       string
}

Session represents an active ACP session.

type StartOptions

type StartOptions struct {
	Agent     string
	Label     string
	Dir       string
	ServerURL string
	Model     string
}

StartOptions holds options for starting a new session.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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