Documentation
¶
Index ¶
- func ToJSONRPCMessage(msg provider.Message) types.Message
- type Config
- type Manager
- func (m *Manager) GetResult(id string) *Result
- func (m *Manager) GetStats() map[string]interface{}
- func (m *Manager) GetTask(id string) *Task
- func (m *Manager) KillSubAgent(id string) error
- func (m *Manager) ListSubAgents() []map[string]interface{}
- func (m *Manager) SpawnMultiple(tasks []struct{ ... }) ([]Result, error)
- func (m *Manager) SpawnTask(description, input string, tools []string) (string, error)
- func (m *Manager) SpawnTaskWithContext(description, input string, tools []string, ctx map[string]interface{}) (string, error)
- func (m *Manager) Start()
- func (m *Manager) Stop()
- func (m *Manager) SubmitTask(task *Task) error
- func (m *Manager) WaitForResult(taskID string, timeout time.Duration) (*Result, error)
- type Result
- type SubAgent
- type Task
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Config ¶
type Config struct {
MaxConcurrent int `json:"max_concurrent"` // Max parallel subagents
MaxDepth int `json:"max_depth"` // Max recursion depth
Timeout time.Duration `json:"timeout"` // Task timeout
}
Config holds subagent configuration
func DefaultConfig ¶
func DefaultConfig() *Config
DefaultConfig returns default subagent configuration
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
Manager manages all subagents
func NewManager ¶
NewManager creates a new subagent manager
func (*Manager) KillSubAgent ¶
KillSubAgent terminates a subagent
func (*Manager) ListSubAgents ¶
ListSubAgents returns all active subagents
func (*Manager) SpawnMultiple ¶
func (m *Manager) SpawnMultiple(tasks []struct { Description string Input string Tools []string }) ([]Result, error)
SpawnMultiple spawns multiple tasks and waits for all results
func (*Manager) SpawnTaskWithContext ¶
func (m *Manager) SpawnTaskWithContext(description, input string, tools []string, ctx map[string]interface{}) (string, error)
SpawnTaskWithContext spawns a task with additional context
func (*Manager) SubmitTask ¶
SubmitTask submits a task to the queue
type Result ¶
type Result struct {
TaskID string `json:"task_id"`
Success bool `json:"success"`
Output string `json:"output"`
Error string `json:"error,omitempty"`
Duration time.Duration `json:"duration"`
SubResults []Result `json:"sub_results,omitempty"`
}
Result represents the result of a subagent task
type SubAgent ¶
type SubAgent struct {
// contains filtered or unexported fields
}
SubAgent represents a subagent that can execute tasks
type Task ¶
type Task struct {
ID string `json:"id"`
Description string `json:"description"`
Input string `json:"input"`
Tools []string `json:"tools,omitempty"` // Tools to enable for this task
Context map[string]interface{} `json:"context,omitempty"`
ParentID string `json:"parent_id,omitempty"`
Depth int `json:"depth"`
CreatedAt time.Time `json:"created_at"`
}
Task represents a task to be executed by a subagent
Click to show internal directories.
Click to hide internal directories.