Documentation
¶
Index ¶
- func RegisterBuiltins(r *Registry, opts BuiltinOptions)
- func RegisterSubagentTools(r *Registry, m SubagentManager)
- type Bash
- type BuiltinOptions
- type CancelSubagent
- type CodeFindSymbol
- type CodeGraphNeighbors
- type CodeIndexSummary
- type CodeSymbolContext
- type Edit
- type GH
- type GetSubagentResult
- type GitDiff
- type GitStatus
- type ListFiles
- type ListSubagents
- type PermissionMode
- type PlanModeTool
- type Read
- type Registry
- func (r *Registry) Clone() *Registry
- func (r *Registry) CloneForSubagentFull() *Registry
- func (r *Registry) CloneReadOnly() *Registry
- func (r *Registry) Has(name string) bool
- func (r *Registry) PermissionMode() PermissionMode
- func (r *Registry) Register(t Tool)
- func (r *Registry) Run(ctx context.Context, call ai.ToolCall) (Result, error)
- func (r *Registry) SetPermissionMode(mode PermissionMode)
- func (r *Registry) Specs() []ai.ToolSpec
- func (r *Registry) Unregister(name string)
- func (r *Registry) UnregisterSubagentTools()
- type Result
- type SearchFiles
- type SpawnSubagent
- type SpawnSubagentRequest
- type SubagentManager
- type SubagentTask
- type Tool
- type WebFetch
- type WebSearch
- type Write
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RegisterBuiltins ¶
func RegisterBuiltins(r *Registry, opts BuiltinOptions)
func RegisterSubagentTools ¶
func RegisterSubagentTools(r *Registry, m SubagentManager)
Types ¶
type BuiltinOptions ¶
type BuiltinOptions struct {
WebFetchEnabled bool
WebFetchAllowPrivate bool
SearchProvider search.Provider
OnRead func(path string)
}
func BuiltinOptionsFromSettings ¶
func BuiltinOptionsFromSettings(s config.Settings) (BuiltinOptions, string, error)
type CancelSubagent ¶
type CancelSubagent struct{ Manager SubagentManager }
func (CancelSubagent) Run ¶
func (t CancelSubagent) Run(ctx context.Context, args json.RawMessage) (Result, error)
func (CancelSubagent) Spec ¶
func (CancelSubagent) Spec() ai.ToolSpec
type CodeFindSymbol ¶ added in v0.1.16
type CodeFindSymbol struct{}
func (CodeFindSymbol) Run ¶ added in v0.1.16
func (CodeFindSymbol) Run(ctx context.Context, args json.RawMessage) (Result, error)
func (CodeFindSymbol) Spec ¶ added in v0.1.16
func (CodeFindSymbol) Spec() ai.ToolSpec
type CodeGraphNeighbors ¶ added in v0.1.16
type CodeGraphNeighbors struct{}
func (CodeGraphNeighbors) Run ¶ added in v0.1.16
func (CodeGraphNeighbors) Run(ctx context.Context, args json.RawMessage) (Result, error)
func (CodeGraphNeighbors) Spec ¶ added in v0.1.16
func (CodeGraphNeighbors) Spec() ai.ToolSpec
type CodeIndexSummary ¶ added in v0.1.16
type CodeIndexSummary struct{}
func (CodeIndexSummary) Run ¶ added in v0.1.16
func (CodeIndexSummary) Run(ctx context.Context, args json.RawMessage) (Result, error)
func (CodeIndexSummary) Spec ¶ added in v0.1.16
func (CodeIndexSummary) Spec() ai.ToolSpec
type CodeSymbolContext ¶ added in v0.1.16
type CodeSymbolContext struct{}
func (CodeSymbolContext) Run ¶ added in v0.1.16
func (CodeSymbolContext) Run(ctx context.Context, args json.RawMessage) (Result, error)
func (CodeSymbolContext) Spec ¶ added in v0.1.16
func (CodeSymbolContext) Spec() ai.ToolSpec
type GetSubagentResult ¶
type GetSubagentResult struct{ Manager SubagentManager }
func (GetSubagentResult) Run ¶
func (t GetSubagentResult) Run(ctx context.Context, args json.RawMessage) (Result, error)
func (GetSubagentResult) Spec ¶
func (GetSubagentResult) Spec() ai.ToolSpec
type ListSubagents ¶
type ListSubagents struct{ Manager SubagentManager }
func (ListSubagents) Run ¶
func (t ListSubagents) Run(ctx context.Context, args json.RawMessage) (Result, error)
func (ListSubagents) Spec ¶
func (ListSubagents) Spec() ai.ToolSpec
type PermissionMode ¶
type PermissionMode string
const ( PermissionModeAct PermissionMode = "act" PermissionModePlan PermissionMode = "plan" )
type PlanModeTool ¶
type PlanModeTool interface {
AllowedInPlanMode() bool
}
PlanModeTool is implemented by tools that explicitly opt in to Plan Mode. Built-in read-only tools are still controlled by the registry allowlist below; this interface is primarily for external/MCP tools, which are denied by default.
type Read ¶
type Read struct {
// OnRead, if non-nil, is invoked with the resolved path after a successful
// read. Used by the agent to track FilesRead for repo-map focus.
OnRead func(path string)
}
type Registry ¶
type Registry struct {
// contains filtered or unexported fields
}
func NewRegistry ¶
func NewRegistry() *Registry
func (*Registry) CloneForSubagentFull ¶ added in v0.1.3
func (*Registry) CloneReadOnly ¶
func (*Registry) PermissionMode ¶
func (r *Registry) PermissionMode() PermissionMode
func (*Registry) SetPermissionMode ¶
func (r *Registry) SetPermissionMode(mode PermissionMode)
func (*Registry) Unregister ¶
func (*Registry) UnregisterSubagentTools ¶ added in v0.1.3
func (r *Registry) UnregisterSubagentTools()
type SearchFiles ¶
type SearchFiles struct{}
func (SearchFiles) Run ¶
func (SearchFiles) Run(ctx context.Context, args json.RawMessage) (Result, error)
func (SearchFiles) Spec ¶
func (SearchFiles) Spec() ai.ToolSpec
type SpawnSubagent ¶
type SpawnSubagent struct{ Manager SubagentManager }
func (SpawnSubagent) Run ¶
func (t SpawnSubagent) Run(ctx context.Context, args json.RawMessage) (Result, error)
func (SpawnSubagent) Spec ¶
func (SpawnSubagent) Spec() ai.ToolSpec
type SpawnSubagentRequest ¶
type SubagentManager ¶
type SubagentManager interface {
Spawn(ctx context.Context, req SpawnSubagentRequest) (*SubagentTask, error)
List() []SubagentTask
Get(id string) *SubagentTask
Cancel(id string) error
}
func DisabledSubagentManager ¶
func DisabledSubagentManager() SubagentManager
type SubagentTask ¶
type SubagentTask struct {
ID string `json:"task_id"`
Name string `json:"name"`
FamiliarName string `json:"familiar_name,omitempty"`
AgentType string `json:"agent_type"`
Status string `json:"status"`
Dependencies []string `json:"dependencies,omitempty"`
CreatedAt time.Time `json:"created_at"`
StartedAt *time.Time `json:"started_at,omitempty"`
CompletedAt *time.Time `json:"completed_at,omitempty"`
InputTokens int `json:"input_tokens,omitempty"`
OutputTokens int `json:"output_tokens,omitempty"`
Summary string `json:"summary,omitempty"`
Error string `json:"error,omitempty"`
}
Click to show internal directories.
Click to hide internal directories.