Expand description
Tool registry: the Tool trait, ToolRegistry collection, and
build_standard_tools factory.
Tools are orthogonal to the agent and to each other. To add a capability
you implement Tool and register it; no other file changes.
Structs§
- Permission
Hook Disabled - No-op permission hook that allows every tool call.
- Tool
Registry - NOTE: Clone shares Arc state with all tools. Use fork() for isolation.
Traits§
- Permission
Hook - Goal-161: runtime permission hook. Implement this trait to intercept every tool invocation before it runs.
- Tool
Functions§
- build_
standard_ tools - Build the standard tool registry for an agent rooted at
workspace. - build_
standard_ tools_ with_ roots - Same as
build_standard_toolsbut accepts additional sandbox roots beyond the primary workspace. Each(root, tier)entry expands the containment boundary used by the structured filesystem tools (Read/Write/Edit/Glob/Grep/count_lines/estimate_tokens).ReadOnlyroots permit reads only;ReadWriteroots also permit writes. The primary workspace is always treated asReadWritein addition to whatever is passed here.
Type Aliases§
- Spec
With Hint - A
(ToolSpec, optional_search_hint)pair returned byToolRegistry::split_eager_deferred.