stable

package
v0.19.3 Latest Latest
Warning

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

Go to latest
Published: Jun 26, 2026 License: MIT Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	ControlSocket          string
	TombstoneFile          string
	HTTPDebug              string
	MaxRuntimes            int
	IdleTimeout            time.Duration
	ShutdownTimeout        time.Duration
	PermissionClaimTimeout time.Duration
	ChildQuestionTimeout   time.Duration
}

type SpawnParams

type SpawnParams struct {
	Prompt            string `json:"prompt,omitempty"`
	PromptFile        string `json:"prompt_file,omitempty"`
	Dir               string `json:"dir"`
	Agent             string `json:"agent,omitempty"`
	Label             string `json:"label,omitempty"`
	Model             string `json:"model,omitempty"`
	ServerURL         string `json:"server_url,omitempty"`
	Backend           string `json:"backend,omitempty"`
	OnEvent           string `json:"on_event,omitempty"`
	SentinelFile      string `json:"sentinel_file,omitempty"`
	PermissionHandler string `json:"permission_handler,omitempty"`
	AutoApprove       bool   `json:"auto_approve,omitempty"`
	Timeout           int    `json:"timeout,omitempty"`
	MaxRetries        int    `json:"max_retries,omitempty"`
	LoopFile          string `json:"loop_file,omitempty"`
	TeamFile          string `json:"team_file,omitempty"`
	SessionID         string `json:"session_id,omitempty"`
	ParentID          string `json:"parent_id,omitempty"`     // runtime ID of the parent agent
	ParentRunID       string `json:"parent_run_id,omitempty"` // broker run ID of the parent, for channel messaging
}

type SpawnResult

type SpawnResult struct {
	RuntimeID    string `json:"runtime_id"`
	SessionID    string `json:"session_id"`
	OnEvent      string `json:"on_event"`
	SentinelFile string `json:"sentinel_file"`
	BrokerURL    string `json:"broker_url,omitempty"`
	ParentToken  string `json:"parent_token,omitempty"`
}

type Supervisor

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

func NewSupervisor

func NewSupervisor(cfg Config) *Supervisor

func (*Supervisor) HTTPCancelRuntime

func (s *Supervisor) HTTPCancelRuntime(runtimeID string) error

HTTPCancelRuntime implements control.StableAdapter. Returns control.ErrRuntimeNotFound when the ID does not exist.

func (*Supervisor) HTTPRuntimeStatus

func (s *Supervisor) HTTPRuntimeStatus(runtimeID string) (any, error)

HTTPRuntimeStatus implements control.StableAdapter. Returns the runtime snapshot when runtimeID is known. Returns control.ErrRuntimeNotFound when the ID does not exist.

func (*Supervisor) List

func (s *Supervisor) List() any

func (*Supervisor) Run

func (s *Supervisor) Run() int

func (*Supervisor) RuntimeAnswerPermission

func (s *Supervisor) RuntimeAnswerPermission(rtID, requestID, optionID string) error

func (*Supervisor) RuntimeCancel

func (s *Supervisor) RuntimeCancel(rtID string) error

func (*Supervisor) RuntimeInterruptAndPrompt

func (s *Supervisor) RuntimeInterruptAndPrompt(rtID, text string, keepQueue bool) error

func (*Supervisor) RuntimePrompt

func (s *Supervisor) RuntimePrompt(rtID, text, requestID string) error

func (*Supervisor) RuntimeSendToParent added in v0.14.0

func (s *Supervisor) RuntimeSendToParent(rtID, message string) error

func (*Supervisor) RuntimeStatus

func (s *Supervisor) RuntimeStatus(rtID string) (any, error)

func (*Supervisor) Shutdown

func (s *Supervisor) Shutdown(mode string) error

func (*Supervisor) Spawn

func (s *Supervisor) Spawn(raw json.RawMessage) (any, error)

Jump to

Keyboard shortcuts

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