Documentation
¶
Index ¶
- Constants
- Variables
- func DeleteConfigSubagent(configPath, agentID string) (map[string]interface{}, error)
- func ExpandToolAllowlistEntries(entries []string) []string
- func ParseMCPDynamicToolName(name string) (serverName string, remoteName string, ok bool)
- func ToolToSchema(tool Tool) map[string]interface{}
- func UpsertConfigSubagent(configPath string, args map[string]interface{}) (map[string]interface{}, error)
- type AgentMailboxStore
- func (s *AgentMailboxStore) AppendMessage(msg AgentMessage) (AgentMessage, error)
- func (s *AgentMailboxStore) EnsureThread(thread AgentThread) (AgentThread, error)
- func (s *AgentMailboxStore) Inbox(agentID string, limit int) ([]AgentMessage, error)
- func (s *AgentMailboxStore) Message(messageID string) (*AgentMessage, bool)
- func (s *AgentMailboxStore) MessagesByThread(threadID string, limit int) ([]AgentMessage, error)
- func (s *AgentMailboxStore) Thread(threadID string) (*AgentThread, bool)
- func (s *AgentMailboxStore) ThreadInbox(threadID, agentID string, limit int) ([]AgentMessage, error)
- func (s *AgentMailboxStore) UpdateMessageStatus(messageID, status string, at int64) (*AgentMessage, error)
- type AgentMessage
- type AgentThread
- type AliasTool
- type BrowserTool
- type CameraTool
- type CatalogTool
- type CronTool
- type EditFileTool
- type ExecTool
- type FunctionCall
- type LLMProvider
- type LLMResponse
- type ListDirTool
- type MCPRemoteTool
- func (t *MCPRemoteTool) CatalogEntry() map[string]interface{}
- func (t *MCPRemoteTool) Description() string
- func (t *MCPRemoteTool) Execute(ctx context.Context, args map[string]interface{}) (string, error)
- func (t *MCPRemoteTool) Name() string
- func (t *MCPRemoteTool) Parameters() map[string]interface{}
- type MCPTool
- type MemoryGetTool
- type MemorySearchTool
- type MemoryWriteTool
- type Message
- type MessageTool
- func (t *MessageTool) Description() string
- func (t *MessageTool) Execute(ctx context.Context, args map[string]interface{}) (string, error)
- func (t *MessageTool) Name() string
- func (t *MessageTool) Parameters() map[string]interface{}
- func (t *MessageTool) SetContext(channel, chatID string)
- func (t *MessageTool) SetSendCallback(callback SendCallback)
- type NodesTool
- type ParallelFetchTool
- type ParallelSafeTool
- type ParallelTool
- type ProcessEvent
- type ProcessManager
- func (m *ProcessManager) Get(id string) (*processSession, bool)
- func (m *ProcessManager) Kill(id string) error
- func (m *ProcessManager) List() []map[string]interface{}
- func (m *ProcessManager) Log(id string, offset, limit int) (string, error)
- func (m *ProcessManager) Start(parent context.Context, command, cwd string) (string, error)
- func (m *ProcessManager) SubscribeEvents(buffer int) <-chan ProcessEvent
- type ProcessTool
- type ReadFileTool
- type RemindTool
- type RepoMapTool
- type ResourceScopedTool
- type RouterDispatchRequest
- type RouterReply
- type SendCallback
- type SessionInfo
- type SessionsTool
- type SkillExecTool
- type SpawnTool
- type SubagentConfigTool
- func (t *SubagentConfigTool) Description() string
- func (t *SubagentConfigTool) Execute(ctx context.Context, args map[string]interface{}) (string, error)
- func (t *SubagentConfigTool) Name() string
- func (t *SubagentConfigTool) Parameters() map[string]interface{}
- func (t *SubagentConfigTool) SetConfigPath(path string)
- type SubagentManager
- func (sm *SubagentManager) AckTaskMessage(taskID, messageID string) bool
- func (sm *SubagentManager) Events(taskID string, limit int) ([]SubagentRunEvent, error)
- func (sm *SubagentManager) GetTask(taskID string) (*SubagentTask, bool)
- func (sm *SubagentManager) Inbox(agentID string, limit int) ([]AgentMessage, error)
- func (sm *SubagentManager) KillTask(taskID string) bool
- func (sm *SubagentManager) ListTasks() []*SubagentTask
- func (sm *SubagentManager) Message(messageID string) (*AgentMessage, bool)
- func (sm *SubagentManager) NextTaskSequence() int
- func (sm *SubagentManager) ProfileStore() *SubagentProfileStore
- func (sm *SubagentManager) ReplyToTask(taskID, replyToMessageID, message string) bool
- func (sm *SubagentManager) ResumeTask(ctx context.Context, taskID string) (string, bool)
- func (sm *SubagentManager) SendTaskMessage(taskID, message string) bool
- func (sm *SubagentManager) SetRunFunc(f SubagentRunFunc)
- func (sm *SubagentManager) Spawn(ctx context.Context, opts SubagentSpawnOptions) (string, error)
- func (sm *SubagentManager) SpawnTask(ctx context.Context, opts SubagentSpawnOptions) (*SubagentTask, error)
- func (sm *SubagentManager) SteerTask(taskID, message string) bool
- func (sm *SubagentManager) TaskInbox(taskID string, limit int) ([]AgentMessage, error)
- func (sm *SubagentManager) Thread(threadID string) (*AgentThread, bool)
- func (sm *SubagentManager) ThreadMessages(threadID string, limit int) ([]AgentMessage, error)
- func (sm *SubagentManager) WaitTask(ctx context.Context, taskID string) (*SubagentTask, bool, error)
- type SubagentProfile
- type SubagentProfileStore
- func (s *SubagentProfileStore) Delete(agentID string) error
- func (s *SubagentProfileStore) FindByRole(role string) (*SubagentProfile, bool, error)
- func (s *SubagentProfileStore) Get(agentID string) (*SubagentProfile, bool, error)
- func (s *SubagentProfileStore) List() ([]SubagentProfile, error)
- func (s *SubagentProfileStore) Upsert(profile SubagentProfile) (*SubagentProfile, error)
- type SubagentProfileTool
- type SubagentRouter
- type SubagentRunEvent
- type SubagentRunFunc
- type SubagentRunStore
- func (s *SubagentRunStore) AppendEvent(evt SubagentRunEvent) error
- func (s *SubagentRunStore) AppendRun(task *SubagentTask) error
- func (s *SubagentRunStore) Events(runID string, limit int) ([]SubagentRunEvent, error)
- func (s *SubagentRunStore) Get(runID string) (*SubagentTask, bool)
- func (s *SubagentRunStore) List() []*SubagentTask
- func (s *SubagentRunStore) NextIDSeed() int
- type SubagentSpawnOptions
- type SubagentTask
- type SubagentsTool
- type SystemInfoTool
- type Tool
- type ToolAllowlistGroup
- type ToolCall
- type ToolDefinition
- type ToolFunctionDefinition
- type ToolRegistry
- func (r *ToolRegistry) Catalog() []map[string]interface{}
- func (r *ToolRegistry) Count() int
- func (r *ToolRegistry) Execute(ctx context.Context, name string, args map[string]interface{}) (string, error)
- func (r *ToolRegistry) Get(name string) (Tool, bool)
- func (r *ToolRegistry) GetDefinitions() []map[string]interface{}
- func (r *ToolRegistry) GetSummaries() []string
- func (r *ToolRegistry) List() []string
- func (r *ToolRegistry) Register(tool Tool)
- type UsageInfo
- type WebFetchTool
- type WebSearchTool
- type WriteFileTool
Constants ¶
const GlobalWatchdogTick = watchdogTick
Variables ¶
var ( ErrUnsupportedAction = errors.New("unsupported action") ErrMissingField = errors.New("missing required field") )
var ErrCommandNoProgress = errors.New("command no progress across tick rounds")
var ErrTaskWatchdogTimeout = errors.New("task watchdog timeout exceeded")
Functions ¶
func DeleteConfigSubagent ¶
func ParseMCPDynamicToolName ¶
func ToolToSchema ¶
Types ¶
type AgentMailboxStore ¶
type AgentMailboxStore struct {
// contains filtered or unexported fields
}
func NewAgentMailboxStore ¶
func NewAgentMailboxStore(workspace string) *AgentMailboxStore
func (*AgentMailboxStore) AppendMessage ¶
func (s *AgentMailboxStore) AppendMessage(msg AgentMessage) (AgentMessage, error)
func (*AgentMailboxStore) EnsureThread ¶
func (s *AgentMailboxStore) EnsureThread(thread AgentThread) (AgentThread, error)
func (*AgentMailboxStore) Inbox ¶
func (s *AgentMailboxStore) Inbox(agentID string, limit int) ([]AgentMessage, error)
func (*AgentMailboxStore) Message ¶
func (s *AgentMailboxStore) Message(messageID string) (*AgentMessage, bool)
func (*AgentMailboxStore) MessagesByThread ¶
func (s *AgentMailboxStore) MessagesByThread(threadID string, limit int) ([]AgentMessage, error)
func (*AgentMailboxStore) Thread ¶
func (s *AgentMailboxStore) Thread(threadID string) (*AgentThread, bool)
func (*AgentMailboxStore) ThreadInbox ¶
func (s *AgentMailboxStore) ThreadInbox(threadID, agentID string, limit int) ([]AgentMessage, error)
func (*AgentMailboxStore) UpdateMessageStatus ¶
func (s *AgentMailboxStore) UpdateMessageStatus(messageID, status string, at int64) (*AgentMessage, error)
type AgentMessage ¶
type AgentMessage struct {
MessageID string `json:"message_id"`
ThreadID string `json:"thread_id"`
FromAgent string `json:"from_agent"`
ToAgent string `json:"to_agent"`
ReplyTo string `json:"reply_to,omitempty"`
CorrelationID string `json:"correlation_id,omitempty"`
Type string `json:"type"`
Content string `json:"content"`
RequiresReply bool `json:"requires_reply,omitempty"`
Status string `json:"status"`
CreatedAt int64 `json:"created_at"`
}
type AgentThread ¶
type AliasTool ¶
type AliasTool struct {
// contains filtered or unexported fields
}
AliasTool exposes OpenClaw-compatible tool names while forwarding to existing implementations.
func NewAliasTool ¶
func (*AliasTool) Description ¶
func (*AliasTool) Parameters ¶
type BrowserTool ¶
type BrowserTool struct {
// contains filtered or unexported fields
}
func NewBrowserTool ¶
func NewBrowserTool() *BrowserTool
func (*BrowserTool) Description ¶
func (t *BrowserTool) Description() string
func (*BrowserTool) Name ¶
func (t *BrowserTool) Name() string
func (*BrowserTool) Parameters ¶
func (t *BrowserTool) Parameters() map[string]interface{}
type CameraTool ¶
type CameraTool struct {
// contains filtered or unexported fields
}
func NewCameraTool ¶
func NewCameraTool(workspace string) *CameraTool
func (*CameraTool) Description ¶
func (t *CameraTool) Description() string
func (*CameraTool) Name ¶
func (t *CameraTool) Name() string
func (*CameraTool) Parameters ¶
func (t *CameraTool) Parameters() map[string]interface{}
type CatalogTool ¶
type CatalogTool interface {
CatalogEntry() map[string]interface{}
}
type CronTool ¶
type CronTool struct {
// contains filtered or unexported fields
}
func NewCronTool ¶
func NewCronTool(cs *cron.CronService) *CronTool
func (*CronTool) Description ¶
func (*CronTool) Parameters ¶
type EditFileTool ¶
type EditFileTool struct {
// contains filtered or unexported fields
}
EditFileTool edits a file by replacing old_text with new_text. The old_text must exist exactly in the file.
func NewEditFileTool ¶
func NewEditFileTool(allowedDir string) *EditFileTool
func (*EditFileTool) Description ¶
func (t *EditFileTool) Description() string
func (*EditFileTool) Name ¶
func (t *EditFileTool) Name() string
func (*EditFileTool) Parameters ¶
func (t *EditFileTool) Parameters() map[string]interface{}
type ExecTool ¶
type ExecTool struct {
// contains filtered or unexported fields
}
func NewExecTool ¶
func NewExecTool(cfg config.ShellConfig, workspace string, pm *ProcessManager) *ExecTool
func (*ExecTool) Description ¶
func (*ExecTool) Parameters ¶
func (*ExecTool) SetTimeout ¶
type FunctionCall ¶
type LLMProvider ¶
type LLMProvider interface {
Chat(ctx context.Context, messages []Message, tools []ToolDefinition, model string, options map[string]interface{}) (*LLMResponse, error)
GetDefaultModel() string
}
type LLMResponse ¶
type ListDirTool ¶
type ListDirTool struct {
// contains filtered or unexported fields
}
ListDirTool lists files and directories in a path.
func NewListDirTool ¶
func NewListDirTool(allowedDir string) *ListDirTool
func (*ListDirTool) Description ¶
func (t *ListDirTool) Description() string
func (*ListDirTool) Name ¶
func (t *ListDirTool) Name() string
func (*ListDirTool) Parameters ¶
func (t *ListDirTool) Parameters() map[string]interface{}
type MCPRemoteTool ¶
type MCPRemoteTool struct {
// contains filtered or unexported fields
}
func (*MCPRemoteTool) CatalogEntry ¶
func (t *MCPRemoteTool) CatalogEntry() map[string]interface{}
func (*MCPRemoteTool) Description ¶
func (t *MCPRemoteTool) Description() string
func (*MCPRemoteTool) Name ¶
func (t *MCPRemoteTool) Name() string
func (*MCPRemoteTool) Parameters ¶
func (t *MCPRemoteTool) Parameters() map[string]interface{}
type MCPTool ¶
type MCPTool struct {
// contains filtered or unexported fields
}
func NewMCPTool ¶
func NewMCPTool(workspace string, cfg config.MCPToolsConfig) *MCPTool
func (*MCPTool) Description ¶
func (*MCPTool) Parameters ¶
type MemoryGetTool ¶
type MemoryGetTool struct {
// contains filtered or unexported fields
}
func NewMemoryGetTool ¶
func NewMemoryGetTool(workspace string) *MemoryGetTool
func (*MemoryGetTool) Description ¶
func (t *MemoryGetTool) Description() string
func (*MemoryGetTool) Name ¶
func (t *MemoryGetTool) Name() string
func (*MemoryGetTool) Parameters ¶
func (t *MemoryGetTool) Parameters() map[string]interface{}
type MemorySearchTool ¶
type MemorySearchTool struct {
// contains filtered or unexported fields
}
func NewMemorySearchTool ¶
func NewMemorySearchTool(workspace string) *MemorySearchTool
func (*MemorySearchTool) Description ¶
func (t *MemorySearchTool) Description() string
func (*MemorySearchTool) Name ¶
func (t *MemorySearchTool) Name() string
func (*MemorySearchTool) Parameters ¶
func (t *MemorySearchTool) Parameters() map[string]interface{}
type MemoryWriteTool ¶
type MemoryWriteTool struct {
// contains filtered or unexported fields
}
func NewMemoryWriteTool ¶
func NewMemoryWriteTool(workspace string) *MemoryWriteTool
func (*MemoryWriteTool) Description ¶
func (t *MemoryWriteTool) Description() string
func (*MemoryWriteTool) Name ¶
func (t *MemoryWriteTool) Name() string
func (*MemoryWriteTool) Parameters ¶
func (t *MemoryWriteTool) Parameters() map[string]interface{}
type MessageTool ¶
type MessageTool struct {
// contains filtered or unexported fields
}
func NewMessageTool ¶
func NewMessageTool() *MessageTool
func (*MessageTool) Description ¶
func (t *MessageTool) Description() string
func (*MessageTool) Name ¶
func (t *MessageTool) Name() string
func (*MessageTool) Parameters ¶
func (t *MessageTool) Parameters() map[string]interface{}
func (*MessageTool) SetContext ¶
func (t *MessageTool) SetContext(channel, chatID string)
func (*MessageTool) SetSendCallback ¶
func (t *MessageTool) SetSendCallback(callback SendCallback)
type NodesTool ¶
type NodesTool struct {
// contains filtered or unexported fields
}
NodesTool provides an OpenClaw-style control surface for paired nodes.
func NewNodesTool ¶
func (*NodesTool) Description ¶
func (*NodesTool) Parameters ¶
type ParallelFetchTool ¶
type ParallelFetchTool struct {
// contains filtered or unexported fields
}
func NewParallelFetchTool ¶
func NewParallelFetchTool(fetcher *WebFetchTool, maxParallelCalls int, parallelSafe map[string]struct{}) *ParallelFetchTool
func (*ParallelFetchTool) Description ¶
func (t *ParallelFetchTool) Description() string
func (*ParallelFetchTool) Name ¶
func (t *ParallelFetchTool) Name() string
func (*ParallelFetchTool) Parameters ¶
func (t *ParallelFetchTool) Parameters() map[string]interface{}
type ParallelSafeTool ¶
type ParallelSafeTool interface {
ParallelSafe() bool
}
ParallelSafeTool is an optional capability interface. If implemented by a tool, AgentLoop should trust this declaration over name-based whitelist when deciding parallel execution safety.
type ParallelTool ¶
type ParallelTool struct {
// contains filtered or unexported fields
}
func NewParallelTool ¶
func NewParallelTool(registry *ToolRegistry, maxParallelCalls int, parallelSafe map[string]struct{}) *ParallelTool
func (*ParallelTool) Description ¶
func (t *ParallelTool) Description() string
func (*ParallelTool) Name ¶
func (t *ParallelTool) Name() string
func (*ParallelTool) Parameters ¶
func (t *ParallelTool) Parameters() map[string]interface{}
type ProcessEvent ¶
type ProcessEvent struct {
Type string `json:"type"`
SessionID string `json:"session_id"`
Command string `json:"command,omitempty"`
At time.Time `json:"at"`
ExitCode *int `json:"exit_code,omitempty"`
}
ProcessEvent is a typed lifecycle event for process sessions.
type ProcessManager ¶
type ProcessManager struct {
// contains filtered or unexported fields
}
func NewProcessManager ¶
func NewProcessManager(workspace string) *ProcessManager
func (*ProcessManager) Get ¶
func (m *ProcessManager) Get(id string) (*processSession, bool)
func (*ProcessManager) Kill ¶
func (m *ProcessManager) Kill(id string) error
func (*ProcessManager) List ¶
func (m *ProcessManager) List() []map[string]interface{}
func (*ProcessManager) Log ¶
func (m *ProcessManager) Log(id string, offset, limit int) (string, error)
func (*ProcessManager) SubscribeEvents ¶
func (m *ProcessManager) SubscribeEvents(buffer int) <-chan ProcessEvent
type ProcessTool ¶
type ProcessTool struct {
// contains filtered or unexported fields
}
func NewProcessTool ¶
func NewProcessTool(m *ProcessManager) *ProcessTool
func (*ProcessTool) Description ¶
func (t *ProcessTool) Description() string
func (*ProcessTool) Name ¶
func (t *ProcessTool) Name() string
func (*ProcessTool) Parameters ¶
func (t *ProcessTool) Parameters() map[string]interface{}
type ReadFileTool ¶
type ReadFileTool struct {
// contains filtered or unexported fields
}
ReadFileTool reads the contents of a file.
func NewReadFileTool ¶
func NewReadFileTool(allowedDir string) *ReadFileTool
func (*ReadFileTool) Description ¶
func (t *ReadFileTool) Description() string
func (*ReadFileTool) Name ¶
func (t *ReadFileTool) Name() string
func (*ReadFileTool) Parameters ¶
func (t *ReadFileTool) Parameters() map[string]interface{}
type RemindTool ¶
type RemindTool struct {
// contains filtered or unexported fields
}
func NewRemindTool ¶
func NewRemindTool(cs *cron.CronService) *RemindTool
func (*RemindTool) Description ¶
func (t *RemindTool) Description() string
func (*RemindTool) Name ¶
func (t *RemindTool) Name() string
func (*RemindTool) Parameters ¶
func (t *RemindTool) Parameters() map[string]interface{}
func (*RemindTool) SetContext ¶
func (t *RemindTool) SetContext(channel, chatID string)
type RepoMapTool ¶
type RepoMapTool struct {
// contains filtered or unexported fields
}
func NewRepoMapTool ¶
func NewRepoMapTool(workspace string) *RepoMapTool
func (*RepoMapTool) Description ¶
func (t *RepoMapTool) Description() string
func (*RepoMapTool) Name ¶
func (t *RepoMapTool) Name() string
func (*RepoMapTool) Parameters ¶
func (t *RepoMapTool) Parameters() map[string]interface{}
type ResourceScopedTool ¶
ResourceScopedTool is an optional capability interface. If implemented by a tool, AgentLoop can avoid running calls that touch the same resource keys in parallel.
type RouterDispatchRequest ¶
type RouterReply ¶
type SendCallback ¶
type SessionInfo ¶
type SessionsTool ¶
type SessionsTool struct {
// contains filtered or unexported fields
}
func NewSessionsTool ¶
func NewSessionsTool(listFn func(limit int) []SessionInfo, historyFn func(key string, limit int) []providers.Message) *SessionsTool
func (*SessionsTool) Description ¶
func (t *SessionsTool) Description() string
func (*SessionsTool) Name ¶
func (t *SessionsTool) Name() string
func (*SessionsTool) Parameters ¶
func (t *SessionsTool) Parameters() map[string]interface{}
type SkillExecTool ¶
type SkillExecTool struct {
// contains filtered or unexported fields
}
func NewSkillExecTool ¶
func NewSkillExecTool(workspace string) *SkillExecTool
func (*SkillExecTool) Description ¶
func (t *SkillExecTool) Description() string
func (*SkillExecTool) Name ¶
func (t *SkillExecTool) Name() string
func (*SkillExecTool) Parameters ¶
func (t *SkillExecTool) Parameters() map[string]interface{}
type SpawnTool ¶
type SpawnTool struct {
// contains filtered or unexported fields
}
func NewSpawnTool ¶
func NewSpawnTool(manager *SubagentManager) *SpawnTool
func (*SpawnTool) Description ¶
func (*SpawnTool) Parameters ¶
func (*SpawnTool) SetContext ¶
type SubagentConfigTool ¶
type SubagentConfigTool struct {
// contains filtered or unexported fields
}
func NewSubagentConfigTool ¶
func NewSubagentConfigTool(configPath string) *SubagentConfigTool
func (*SubagentConfigTool) Description ¶
func (t *SubagentConfigTool) Description() string
func (*SubagentConfigTool) Name ¶
func (t *SubagentConfigTool) Name() string
func (*SubagentConfigTool) Parameters ¶
func (t *SubagentConfigTool) Parameters() map[string]interface{}
func (*SubagentConfigTool) SetConfigPath ¶
func (t *SubagentConfigTool) SetConfigPath(path string)
type SubagentManager ¶
type SubagentManager struct {
// contains filtered or unexported fields
}
func NewSubagentManager ¶
func NewSubagentManager(provider providers.LLMProvider, workspace string, bus *bus.MessageBus) *SubagentManager
func (*SubagentManager) AckTaskMessage ¶
func (sm *SubagentManager) AckTaskMessage(taskID, messageID string) bool
func (*SubagentManager) Events ¶
func (sm *SubagentManager) Events(taskID string, limit int) ([]SubagentRunEvent, error)
func (*SubagentManager) GetTask ¶
func (sm *SubagentManager) GetTask(taskID string) (*SubagentTask, bool)
func (*SubagentManager) Inbox ¶
func (sm *SubagentManager) Inbox(agentID string, limit int) ([]AgentMessage, error)
func (*SubagentManager) KillTask ¶
func (sm *SubagentManager) KillTask(taskID string) bool
func (*SubagentManager) ListTasks ¶
func (sm *SubagentManager) ListTasks() []*SubagentTask
func (*SubagentManager) Message ¶
func (sm *SubagentManager) Message(messageID string) (*AgentMessage, bool)
func (*SubagentManager) NextTaskSequence ¶
func (sm *SubagentManager) NextTaskSequence() int
func (*SubagentManager) ProfileStore ¶
func (sm *SubagentManager) ProfileStore() *SubagentProfileStore
func (*SubagentManager) ReplyToTask ¶
func (sm *SubagentManager) ReplyToTask(taskID, replyToMessageID, message string) bool
func (*SubagentManager) ResumeTask ¶
func (*SubagentManager) SendTaskMessage ¶
func (sm *SubagentManager) SendTaskMessage(taskID, message string) bool
func (*SubagentManager) SetRunFunc ¶
func (sm *SubagentManager) SetRunFunc(f SubagentRunFunc)
func (*SubagentManager) Spawn ¶
func (sm *SubagentManager) Spawn(ctx context.Context, opts SubagentSpawnOptions) (string, error)
func (*SubagentManager) SpawnTask ¶
func (sm *SubagentManager) SpawnTask(ctx context.Context, opts SubagentSpawnOptions) (*SubagentTask, error)
func (*SubagentManager) SteerTask ¶
func (sm *SubagentManager) SteerTask(taskID, message string) bool
func (*SubagentManager) TaskInbox ¶
func (sm *SubagentManager) TaskInbox(taskID string, limit int) ([]AgentMessage, error)
func (*SubagentManager) Thread ¶
func (sm *SubagentManager) Thread(threadID string) (*AgentThread, bool)
func (*SubagentManager) ThreadMessages ¶
func (sm *SubagentManager) ThreadMessages(threadID string, limit int) ([]AgentMessage, error)
func (*SubagentManager) WaitTask ¶
func (sm *SubagentManager) WaitTask(ctx context.Context, taskID string) (*SubagentTask, bool, error)
type SubagentProfile ¶
type SubagentProfile struct {
AgentID string `json:"agent_id"`
Name string `json:"name"`
Transport string `json:"transport,omitempty"`
NodeID string `json:"node_id,omitempty"`
ParentAgentID string `json:"parent_agent_id,omitempty"`
NotifyMainPolicy string `json:"notify_main_policy,omitempty"`
Role string `json:"role,omitempty"`
SystemPromptFile string `json:"system_prompt_file,omitempty"`
ToolAllowlist []string `json:"tool_allowlist,omitempty"`
MemoryNamespace string `json:"memory_namespace,omitempty"`
MaxRetries int `json:"max_retries,omitempty"`
RetryBackoff int `json:"retry_backoff_ms,omitempty"`
TimeoutSec int `json:"timeout_sec,omitempty"`
MaxTaskChars int `json:"max_task_chars,omitempty"`
MaxResultChars int `json:"max_result_chars,omitempty"`
Status string `json:"status"`
CreatedAt int64 `json:"created_at"`
UpdatedAt int64 `json:"updated_at"`
ManagedBy string `json:"managed_by,omitempty"`
}
type SubagentProfileStore ¶
type SubagentProfileStore struct {
// contains filtered or unexported fields
}
func NewSubagentProfileStore ¶
func NewSubagentProfileStore(workspace string) *SubagentProfileStore
func (*SubagentProfileStore) Delete ¶
func (s *SubagentProfileStore) Delete(agentID string) error
func (*SubagentProfileStore) FindByRole ¶
func (s *SubagentProfileStore) FindByRole(role string) (*SubagentProfile, bool, error)
func (*SubagentProfileStore) Get ¶
func (s *SubagentProfileStore) Get(agentID string) (*SubagentProfile, bool, error)
func (*SubagentProfileStore) List ¶
func (s *SubagentProfileStore) List() ([]SubagentProfile, error)
func (*SubagentProfileStore) Upsert ¶
func (s *SubagentProfileStore) Upsert(profile SubagentProfile) (*SubagentProfile, error)
type SubagentProfileTool ¶
type SubagentProfileTool struct {
// contains filtered or unexported fields
}
func NewSubagentProfileTool ¶
func NewSubagentProfileTool(store *SubagentProfileStore) *SubagentProfileTool
func (*SubagentProfileTool) Description ¶
func (t *SubagentProfileTool) Description() string
func (*SubagentProfileTool) Name ¶
func (t *SubagentProfileTool) Name() string
func (*SubagentProfileTool) Parameters ¶
func (t *SubagentProfileTool) Parameters() map[string]interface{}
type SubagentRouter ¶
type SubagentRouter struct {
// contains filtered or unexported fields
}
func NewSubagentRouter ¶
func NewSubagentRouter(manager *SubagentManager) *SubagentRouter
func (*SubagentRouter) DispatchTask ¶
func (r *SubagentRouter) DispatchTask(ctx context.Context, req RouterDispatchRequest) (*SubagentTask, error)
func (*SubagentRouter) MergeResults ¶
func (r *SubagentRouter) MergeResults(replies []*RouterReply) string
func (*SubagentRouter) WaitReply ¶
func (r *SubagentRouter) WaitReply(ctx context.Context, taskID string, interval time.Duration) (*RouterReply, error)
type SubagentRunEvent ¶
type SubagentRunFunc ¶
type SubagentRunFunc func(ctx context.Context, task *SubagentTask) (string, error)
type SubagentRunStore ¶
type SubagentRunStore struct {
// contains filtered or unexported fields
}
func NewSubagentRunStore ¶
func NewSubagentRunStore(workspace string) *SubagentRunStore
func (*SubagentRunStore) AppendEvent ¶
func (s *SubagentRunStore) AppendEvent(evt SubagentRunEvent) error
func (*SubagentRunStore) AppendRun ¶
func (s *SubagentRunStore) AppendRun(task *SubagentTask) error
func (*SubagentRunStore) Events ¶
func (s *SubagentRunStore) Events(runID string, limit int) ([]SubagentRunEvent, error)
func (*SubagentRunStore) Get ¶
func (s *SubagentRunStore) Get(runID string) (*SubagentTask, bool)
func (*SubagentRunStore) List ¶
func (s *SubagentRunStore) List() []*SubagentTask
func (*SubagentRunStore) NextIDSeed ¶
func (s *SubagentRunStore) NextIDSeed() int
type SubagentSpawnOptions ¶
type SubagentTask ¶
type SubagentTask struct {
ID string `json:"id"`
Task string `json:"task"`
Label string `json:"label"`
Role string `json:"role"`
AgentID string `json:"agent_id"`
Transport string `json:"transport,omitempty"`
NodeID string `json:"node_id,omitempty"`
ParentAgentID string `json:"parent_agent_id,omitempty"`
NotifyMainPolicy string `json:"notify_main_policy,omitempty"`
SessionKey string `json:"session_key"`
MemoryNS string `json:"memory_ns"`
SystemPromptFile string `json:"system_prompt_file,omitempty"`
ToolAllowlist []string `json:"tool_allowlist,omitempty"`
MaxRetries int `json:"max_retries,omitempty"`
RetryBackoff int `json:"retry_backoff,omitempty"`
TimeoutSec int `json:"timeout_sec,omitempty"`
MaxTaskChars int `json:"max_task_chars,omitempty"`
MaxResultChars int `json:"max_result_chars,omitempty"`
RetryCount int `json:"retry_count,omitempty"`
ThreadID string `json:"thread_id,omitempty"`
CorrelationID string `json:"correlation_id,omitempty"`
ParentRunID string `json:"parent_run_id,omitempty"`
LastMessageID string `json:"last_message_id,omitempty"`
WaitingReply bool `json:"waiting_for_reply,omitempty"`
OriginChannel string `json:"origin_channel,omitempty"`
OriginChatID string `json:"origin_chat_id,omitempty"`
Status string `json:"status"`
Result string `json:"result,omitempty"`
Steering []string `json:"steering,omitempty"`
Created int64 `json:"created"`
Updated int64 `json:"updated"`
}
type SubagentsTool ¶
type SubagentsTool struct {
// contains filtered or unexported fields
}
func NewSubagentsTool ¶
func NewSubagentsTool(m *SubagentManager) *SubagentsTool
func (*SubagentsTool) Description ¶
func (t *SubagentsTool) Description() string
func (*SubagentsTool) Name ¶
func (t *SubagentsTool) Name() string
func (*SubagentsTool) Parameters ¶
func (t *SubagentsTool) Parameters() map[string]interface{}
type SystemInfoTool ¶
type SystemInfoTool struct{}
func NewSystemInfoTool ¶
func NewSystemInfoTool() *SystemInfoTool
func (*SystemInfoTool) Description ¶
func (t *SystemInfoTool) Description() string
func (*SystemInfoTool) Name ¶
func (t *SystemInfoTool) Name() string
func (*SystemInfoTool) Parameters ¶
func (t *SystemInfoTool) Parameters() map[string]interface{}
type ToolAllowlistGroup ¶
type ToolAllowlistGroup struct {
Name string `json:"name"`
Description string `json:"description"`
Aliases []string `json:"aliases,omitempty"`
Tools []string `json:"tools"`
}
func ToolAllowlistGroups ¶
func ToolAllowlistGroups() []ToolAllowlistGroup
type ToolCall ¶
type ToolCall struct {
ID string `json:"id"`
Type string `json:"type"`
Function *FunctionCall `json:"function,omitempty"`
Name string `json:"name,omitempty"`
Arguments map[string]interface{} `json:"arguments,omitempty"`
}
type ToolDefinition ¶
type ToolDefinition struct {
Type string `json:"type"`
Function ToolFunctionDefinition `json:"function"`
}
type ToolFunctionDefinition ¶
type ToolRegistry ¶
type ToolRegistry struct {
// contains filtered or unexported fields
}
func NewToolRegistry ¶
func NewToolRegistry() *ToolRegistry
func (*ToolRegistry) Catalog ¶
func (r *ToolRegistry) Catalog() []map[string]interface{}
func (*ToolRegistry) Count ¶
func (r *ToolRegistry) Count() int
Count returns the number of registered tools.
func (*ToolRegistry) GetDefinitions ¶
func (r *ToolRegistry) GetDefinitions() []map[string]interface{}
func (*ToolRegistry) GetSummaries ¶
func (r *ToolRegistry) GetSummaries() []string
GetSummaries returns human-readable summaries of all registered tools. Returns a slice of "name - description" strings.
func (*ToolRegistry) List ¶
func (r *ToolRegistry) List() []string
List returns a list of all registered tool names.
func (*ToolRegistry) Register ¶
func (r *ToolRegistry) Register(tool Tool)
type WebFetchTool ¶
type WebFetchTool struct {
// contains filtered or unexported fields
}
func NewWebFetchTool ¶
func NewWebFetchTool(maxChars int) *WebFetchTool
func (*WebFetchTool) Description ¶
func (t *WebFetchTool) Description() string
func (*WebFetchTool) Name ¶
func (t *WebFetchTool) Name() string
func (*WebFetchTool) ParallelSafe ¶
func (t *WebFetchTool) ParallelSafe() bool
func (*WebFetchTool) Parameters ¶
func (t *WebFetchTool) Parameters() map[string]interface{}
type WebSearchTool ¶
type WebSearchTool struct {
// contains filtered or unexported fields
}
func NewWebSearchTool ¶
func NewWebSearchTool(apiKey string, maxResults int) *WebSearchTool
func (*WebSearchTool) Description ¶
func (t *WebSearchTool) Description() string
func (*WebSearchTool) Name ¶
func (t *WebSearchTool) Name() string
func (*WebSearchTool) Parameters ¶
func (t *WebSearchTool) Parameters() map[string]interface{}
type WriteFileTool ¶
type WriteFileTool struct {
// contains filtered or unexported fields
}
WriteFileTool writes content to a file.
func NewWriteFileTool ¶
func NewWriteFileTool(allowedDir string) *WriteFileTool
func (*WriteFileTool) Description ¶
func (t *WriteFileTool) Description() string
func (*WriteFileTool) Name ¶
func (t *WriteFileTool) Name() string
func (*WriteFileTool) Parameters ¶
func (t *WriteFileTool) Parameters() map[string]interface{}
Source Files
¶
- base.go
- browser.go
- camera.go
- compat_alias.go
- cron_tool.go
- errors.go
- filesystem.go
- mcp.go
- memory.go
- memory_get.go
- memory_index.go
- memory_namespace.go
- memory_write.go
- message.go
- nodes_tool.go
- parallel.go
- parallel_fetch.go
- process_manager.go
- process_tool.go
- registry.go
- remind.go
- repo_map.go
- sessions_tool.go
- shell.go
- skill_exec.go
- spawn.go
- subagent.go
- subagent_config_manager.go
- subagent_config_tool.go
- subagent_mailbox.go
- subagent_profile.go
- subagent_router.go
- subagent_store.go
- subagents_tool.go
- system.go
- system_disk_unix.go
- task_watchdog.go
- tool_allowlist_groups.go
- tracked_output.go
- types.go
- web.go