externalagents

package
v0.1.11 Latest Latest
Warning

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

Go to latest
Published: May 25, 2026 License: MIT Imports: 5 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Agent

type Agent interface {
	ID() string
	DisplayName() string
	Available(ctx context.Context) Availability
}

type AliasProvider added in v0.1.5

type AliasProvider interface {
	Aliases() []string
}

type AttachmentStore

type AttachmentStore interface {
	SaveExternalAgentSession(ctx context.Context, attachment SessionAttachment) error
	GetExternalAgentSession(ctx context.Context, sessionID string) (SessionAttachment, error)
	DeleteExternalAgentSession(ctx context.Context, sessionID string) error
}

type Availability

type Availability struct {
	Installed bool
	Enabled   bool
	AuthState string
	Mode      string
	Path      string
	Version   string
	Detail    string
}

type Capabilities added in v0.1.9

type Capabilities struct {
	StartSession     bool `json:"start_session"`
	ResumeSession    bool `json:"resume_session"`
	StreamingEvents  bool `json:"streaming_events"`
	ToolEvents       bool `json:"tool_events"`
	Interrupt        bool `json:"interrupt"`
	ConfigurablePath bool `json:"configurable_path"`
}

type CapabilityProvider added in v0.1.9

type CapabilityProvider interface {
	Capabilities() Capabilities
}

type Descriptor

type Descriptor struct {
	ID           string
	Aliases      []string
	DisplayName  string
	Installed    bool
	Enabled      bool
	AuthState    string
	Mode         string
	Path         string
	Version      string
	Detail       string
	Capabilities Capabilities
}

type Event

type Event struct {
	Kind             EventKind `json:"kind"`
	AgentID          string    `json:"agent_id"`
	ExternalThreadID string    `json:"external_thread_id,omitempty"`
	ExternalTurnID   string    `json:"external_turn_id,omitempty"`
	ItemID           string    `json:"item_id,omitempty"`
	ToolName         string    `json:"tool_name,omitempty"`
	ToolInput        string    `json:"tool_input,omitempty"`
	Text             string    `json:"text,omitempty"`
	Error            string    `json:"error,omitempty"`
	RawMethod        string    `json:"raw_method,omitempty"`
	Raw              []byte    `json:"raw,omitempty"`
	At               time.Time `json:"at"`
}

type EventKind

type EventKind string
const (
	EventTurnStarted     EventKind = "turn.started"
	EventMessageDelta    EventKind = "message.delta"
	EventReasoningDelta  EventKind = "reasoning.delta"
	EventToolStarted     EventKind = "tool.started"
	EventToolOutputDelta EventKind = "tool.output.delta"
	EventToolCompleted   EventKind = "tool.completed"
	EventDiffUpdated     EventKind = "diff.updated"
	EventTurnCompleted   EventKind = "turn.completed"
	EventTurnFailed      EventKind = "turn.failed"
)

type ExternalSession

type ExternalSession struct {
	AgentID           string
	ExternalThreadID  string
	ExternalSessionID string
	CWD               string
	Model             string
	ApprovalPolicy    string
	Sandbox           string
	Metadata          map[string]any
}

type Input

type Input struct {
	Text string
}

type Registry

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

func NewRegistry

func NewRegistry(agents ...Agent) (*Registry, error)

func (*Registry) CanonicalID added in v0.1.9

func (r *Registry) CanonicalID(id string) (string, bool)

func (*Registry) Get

func (r *Registry) Get(id string) (Agent, bool)

func (*Registry) List

func (r *Registry) List(ctx context.Context) []Descriptor

func (*Registry) Register

func (r *Registry) Register(agent Agent) error

type RuntimeAgent

type RuntimeAgent interface {
	Agent
	StartSession(ctx context.Context, req StartSessionRequest) (ExternalSession, error)
	ResumeSession(ctx context.Context, session ExternalSession) (ExternalSession, error)
	Send(ctx context.Context, session ExternalSession, input Input) (<-chan Event, error)
	Interrupt(ctx context.Context, session ExternalSession) error
	Close() error
}

type SessionAttachment

type SessionAttachment struct {
	SessionID         string
	AgentID           string
	ExternalThreadID  string
	ExternalSessionID string
	CWD               string
	Model             string
	ApprovalPolicy    string
	Sandbox           string
	MetadataJSON      string
	CreatedAt         time.Time
	UpdatedAt         time.Time
}

func (SessionAttachment) ExternalSession added in v0.1.5

func (a SessionAttachment) ExternalSession() ExternalSession

type StartSessionRequest

type StartSessionRequest struct {
	CWD                   string
	Model                 string
	ApprovalPolicy        string
	Sandbox               string
	BaseInstructions      string
	DeveloperInstructions string
	Metadata              map[string]any
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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