Skip to main content

Module registry

Module registry 

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

PermissionHookDisabled
No-op permission hook that allows every tool call.
ToolRegistry
NOTE: Clone shares Arc state with all tools. Use fork() for isolation.

Traits§

PermissionHook
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_tools but 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). ReadOnly roots permit reads only; ReadWrite roots also permit writes. The primary workspace is always treated as ReadWrite in addition to whatever is passed here.

Type Aliases§

SpecWithHint
A (ToolSpec, optional_search_hint) pair returned by ToolRegistry::split_eager_deferred.