Expand description
Tool system — trait, registry, and built-in tool implementations.
All tools implement the Tool trait and are registered in ToolRegistry.
Subagents get ToolRegistry::without_subagent() to prevent recursion.
Modules§
- activation
SessionToolSet— per-session core + exact activated tools (Task 15, spec §7.1, §4.2).- catalog
ToolCatalog— all locally known capabilities (spec §7.1, Task 14).- discovery
- Model-facing discovery and exact-activation builtins (Task 17, spec
§4.2, §7.2, §7.3, §7.7):
search_toolsandactivate_tools. - ledger
- Task 25 — typed tool-call ledger (spec §8.3).
- memory
- Task 32 — model-facing project-scoped memory tools (spec §9.5).
- output
- Task 26 — bounded tool-output delta channels with an explicit backpressure/coalescing policy (spec §8.4).
- respond
- RespondTool — reply to an event through its original source channel.
- send_
channel - SendChannelTool — proactively send a message to a specific channel.
- shell
- Interactive PTY-based shell sessions for agents.
- watcher_
exit
Structs§
- Activate
Tools Tool - Model-initiated deterministic exact activation. Every requested id must
be an exact known cataloged
ToolId; the whole batch validates first (host grant issuance: exact id, current generation/digest, source trust) and applies atomically in stable id order with exactly one session schema-generation advance. Requires host-supplied confirmation authority; a model-authored JSON flag can never substitute for it. - Bash
Intermediary Snapshot - Bash
Tool - Edit
Tool - Extension
Tool - Find
Tool - Grep
Tool - LsTool
- Memory
Context Tool - Control the continuous-memory context of the current session (spec §7.2).
- Read
Tool - Respond
Tool - Search
Tools Tool - Bounded, deterministic, descriptor-only capability search over the passive catalog snapshot. Pure and local: no factory invocation, no process start, no network, no schema exposure, no grant.
- Secret
Prompt Handle - UI-only secret prompt plumbing for interactive tools.
- Secret
Prompt Queue - Secret
Prompt Request - Send
Channel Tool - Shell
EndTool - Shell
Send Tool - Shell
Start Tool - Subagent
Collect Tool - Subagent
Display Row - Snapshot row produced by SubagentRegistry::display_rows(). Used by the TUI reconcile path as the registry’s liveness authority.
- Subagent
Handle - Subagent
Model Authorize Tool - Subagent
Models Tool - Subagent
Registry - Subagent
Result - Subagent
Resume Tool - Subagent
Start Tool - Subagent
State - All mutable state shared between the subagent thread and its handle. Collapsed behind a single RwLock so a status poll takes exactly one lock.
- Subagent
Status Tool - Subagent
Steer Tool - Subagent
Tool - Tool
Capabilities - Runtime capability handles — shared services a tool may require.
- Tool
Channels - Streaming channels — carry partial tool output and stream events.
- Tool
Context - Context passed to tool execution — composition of channels, capabilities, and limits.
- Tool
Limits - Configuration limits and timeouts.
- Tool
Registry - Registry of available tools. Maintains a name→tool map and a cached JSON schema
array that gets sent to the API. Thread-safe via
Arc<RwLock<ToolRegistry>>. - Watcher
Exit Tool - Write
Tool
Enums§
- Concurrency
Key - Subagent
Status - Tool
Origin - Explicit runtime-origin identity of a registered tool implementation.
Traits§
- Tool
- The core trait for all tools. Implement this to add a new tool.
Functions§
- bash_
intermediary_ snapshot - resolve_
agent_ prompt - Resolve an agent name to a system prompt.