Skip to main content

Module tools

Module tools 

Source
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.

Re-exports§

pub use crate::runtime::subagent::SubagentDisplayRow;
pub use crate::runtime::subagent::SubagentHandle;
pub use crate::runtime::subagent::SubagentRegistry;
pub use crate::runtime::subagent::SubagentResult;
pub use crate::runtime::subagent::SubagentState;
pub use crate::runtime::subagent::SubagentStatus;
pub use discovery::ActivateToolsTool;
pub use discovery::SearchToolsTool;
pub use respond::RespondTool;
pub use send_channel::SendChannelTool;
pub use shell::ShellEndTool;
pub use shell::ShellSendTool;
pub use shell::ShellStartTool;
pub use watcher_exit::WatcherExitTool;

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_tools and activate_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§

BashIntermediarySnapshot
BashTool
EditTool
ExtensionTool
FindTool
GrepTool
LsTool
MemoryContextTool
Control the continuous-memory context of the current session (spec §7.2).
ReadTool
SecretPromptHandle
UI-only secret prompt plumbing for interactive tools.
SecretPromptQueue
SecretPromptRequest
SubagentCollectTool
SubagentModelAuthorizeTool
SubagentModelsTool
SubagentResumeTool
SubagentStartTool
SubagentStatusTool
SubagentSteerTool
SubagentTool
ToolCapabilities
Runtime capability handles — shared services a tool may require.
ToolChannels
Streaming channels — carry partial tool output and stream events.
ToolContext
Context passed to tool execution — composition of channels, capabilities, and limits.
ToolLimits
Configuration limits and timeouts.
ToolRegistry
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>>.
WriteTool

Enums§

ConcurrencyKey
ToolOrigin
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.