Documentation
¶
Index ¶
- func ToProviderTools(tools []ToolDef) []map[string]any
- type BashTool
- type BreakdownInput
- type BreakdownTool
- type CallGraphTool
- type Context
- type EditTool
- type GlobTool
- type GrepTool
- type MemoryRecallTool
- type MetadataUpdate
- type PermissionRequest
- type ReadTool
- type Registry
- type Result
- type ToolDef
- type WriteTool
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ToProviderTools ¶
ToProviderTools converts tool definitions to provider format.
Types ¶
type BashTool ¶
type BashTool struct{}
func (BashTool) Description ¶
func (BashTool) Parameters ¶
func (BashTool) Parameters() json.RawMessage
type BreakdownInput ¶
type BreakdownInput struct {
Tasks []struct {
Title string `json:"title"`
Description string `json:"description"`
Dependencies []int `json:"dependencies"`
Effort string `json:"effort"`
Complexity string `json:"complexity"`
OrderIndex int `json:"orderIndex"`
} `json:"tasks"`
}
BreakdownInput matches the tool's parameter schema.
type BreakdownTool ¶
type BreakdownTool struct{}
BreakdownTool receives a structured task breakdown from the breakdown agent. The LLM calls this tool with properly formatted JSON (guaranteed valid by the tool-calling system), eliminating free-text JSON parsing issues.
func (BreakdownTool) Description ¶
func (t BreakdownTool) Description() string
func (BreakdownTool) Execute ¶
func (t BreakdownTool) Execute(_ context.Context, args json.RawMessage, _ Context) (Result, error)
func (BreakdownTool) ID ¶
func (t BreakdownTool) ID() string
func (BreakdownTool) Parameters ¶
func (t BreakdownTool) Parameters() json.RawMessage
type CallGraphTool ¶ added in v0.5.0
CallGraphTool lets the agent read and query the call graph store. The agent *is* the parser — it reads code, understands call relationships, and writes them into the database. This tool provides structured read/write access to the persisted graph.
func NewCallGraphTool ¶ added in v0.5.0
func NewCallGraphTool(s *callgraph.Store) CallGraphTool
func (CallGraphTool) Description ¶ added in v0.5.0
func (CallGraphTool) Description() string
func (CallGraphTool) Execute ¶ added in v0.5.0
func (t CallGraphTool) Execute(ctx context.Context, args json.RawMessage, tctx Context) (Result, error)
func (CallGraphTool) ID ¶ added in v0.5.0
func (CallGraphTool) ID() string
func (CallGraphTool) Parameters ¶ added in v0.5.0
func (t CallGraphTool) Parameters() json.RawMessage
type Context ¶
type Context struct {
SessionID session.SessionID
MessageID session.MessageID
Agent string
CallID string
Ctx context.Context
SessionDir string
Ask func(req PermissionRequest) error
Metadata func(meta MetadataUpdate) error
}
Context is passed to every tool execution.
type EditTool ¶
type EditTool struct{}
func (EditTool) Description ¶
func (EditTool) Parameters ¶
func (EditTool) Parameters() json.RawMessage
type GlobTool ¶
type GlobTool struct{}
func (GlobTool) Description ¶
func (GlobTool) Parameters ¶
func (GlobTool) Parameters() json.RawMessage
type GrepTool ¶
type GrepTool struct{}
func (GrepTool) Description ¶
func (GrepTool) Parameters ¶
func (GrepTool) Parameters() json.RawMessage
type MemoryRecallTool ¶ added in v0.2.1
MemoryRecallTool lets the LLM query the agentic knowledge graph on demand.
func NewMemoryRecallTool ¶ added in v0.2.1
func NewMemoryRecallTool(mem *memory.Memory) MemoryRecallTool
func (MemoryRecallTool) Description ¶ added in v0.2.1
func (t MemoryRecallTool) Description() string
func (MemoryRecallTool) Execute ¶ added in v0.2.1
func (t MemoryRecallTool) Execute(ctx context.Context, args json.RawMessage, tctx Context) (Result, error)
func (MemoryRecallTool) ID ¶ added in v0.2.1
func (t MemoryRecallTool) ID() string
func (MemoryRecallTool) Parameters ¶ added in v0.2.1
func (t MemoryRecallTool) Parameters() json.RawMessage
type MetadataUpdate ¶
type MetadataUpdate struct {
Title string `json:"title,omitempty"`
Metadata map[string]any `json:"metadata,omitempty"`
}
MetadataUpdate updates the running tool call's display metadata.
type PermissionRequest ¶
type PermissionRequest struct {
ID session.PermissionID
SessionID session.SessionID
Tool string
Input string
}
PermissionRequest is sent when a tool needs user approval.
type ReadTool ¶
type ReadTool struct{}
func (ReadTool) Description ¶
func (ReadTool) Parameters ¶
func (ReadTool) Parameters() json.RawMessage
type Registry ¶
type Registry struct {
// contains filtered or unexported fields
}
Registry holds all registered tools.
func NewRegistry ¶
func NewRegistry() *Registry
type Result ¶
type Result struct {
Title string `json:"title"`
Metadata map[string]any `json:"metadata,omitempty"`
Output string `json:"output"`
}
Result is returned from tool execution.
type ToolDef ¶
type ToolDef interface {
ID() string
Description() string
Parameters() json.RawMessage
Execute(ctx context.Context, args json.RawMessage, tctx Context) (Result, error)
}
ToolDef is the interface every tool must implement.
type WriteTool ¶
type WriteTool struct{}
func (WriteTool) Description ¶
func (WriteTool) Parameters ¶
func (WriteTool) Parameters() json.RawMessage