Documentation
¶
Index ¶
- type Config
- type SpawnParams
- type SpawnResult
- type Supervisor
- func (s *Supervisor) HTTPCancelRuntime(runtimeID string) error
- func (s *Supervisor) HTTPRuntimeStatus(runtimeID string) (any, error)
- func (s *Supervisor) List() any
- func (s *Supervisor) Run() int
- func (s *Supervisor) RuntimeAnswerPermission(rtID, requestID, optionID string) error
- func (s *Supervisor) RuntimeCancel(rtID string) error
- func (s *Supervisor) RuntimeInterruptAndPrompt(rtID, text string, keepQueue bool) error
- func (s *Supervisor) RuntimePrompt(rtID, text, requestID string) error
- func (s *Supervisor) RuntimeResult(rtID string) (any, error)
- func (s *Supervisor) RuntimeSendToParent(rtID, message string) error
- func (s *Supervisor) RuntimeStatus(rtID string) (any, error)
- func (s *Supervisor) Shutdown(mode string) error
- func (s *Supervisor) Spawn(raw json.RawMessage) (any, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
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"`
AgentProfile string `json:"agent_profile,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 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) RuntimeResult ¶ added in v0.21.1
func (s *Supervisor) RuntimeResult(rtID string) (any, error)
RuntimeResult exposes the complete terminal reply without widening the bounded RuntimeStatus presentation surface.
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)
Click to show internal directories.
Click to hide internal directories.