Expand description
Structured read-only filesystem tools.
The model sees typed tools, not raw shell command strings. All subprocess
invocations use std::process::Command argv arrays — never shell strings.
§Safety Rules
- Workspace-root containment enforced after path normalization.
- Ignore rules respected and hidden files skipped by default.
- Hidden files, ignored files, symlink following, and unrestricted searches are opt-in only.
- Timeout, result-count, stdout/stderr byte, and line-length caps enforced.
rgexit code1is treated as “no matches”, not an error.- Arbitrary
sed/awk,sed -i, andawk system()are not exposed; only typed read-onlysawkinspection actions are available.
Modules§
- shell
- Shell/process manager.
Structs§
- Agent
RunConfig - Configuration for an agent run, shared by the fake and Umans providers.
- Search
Match - A single search match from
rg --json. - Tool
Definition - A tool definition exposed to a provider/model.
- Tool
Display Projection - User-facing bounded projection of a tool result.
- Tool
Evidence Metadata - Bounded, provider-neutral metadata about durable tool evidence.
- Tool
Iteration Budget - Bounded tool-batch budget for one agent turn.
- Tool
Model Projection - Model-facing bounded projection of a tool result.
- Tool
Output - Structured output returned by an application-owned tool executor.
- Tool
UseRequest - A tool-use request from a provider.
- Write
Result - Structured result of a file write operation.
Enums§
- Provider
Schema Format - Provider-specific schema shape for model-visible tool definitions.
- Tool
Budget Decision - Decision returned by
ToolIterationBudgetbefore a provider request. - Tool
Evidence Kind - The kind of bounded evidence associated with a tool execution.
- WriteOp
- The kind of write operation performed on a file.
Constants§
- MAX_
LINE_ LEN - Maximum line length before truncation in tool output.
- MAX_
OUTPUT_ BYTES - Maximum stdout/stderr bytes captured from a subprocess.
- MAX_
RESULTS - Default maximum number of results from a search or list operation.
- MAX_
TOOL_ CONTINUATIONS - Maximum number of automatic tool-budget continuations per user turn.
- MAX_
TOOL_ ITERATIONS - Maximum number of tool-call iterations per agent turn before the loop stops with a cap-exceeded error.
- TIMEOUT_
SECS - Timeout in seconds for subprocess execution.
Functions§
- dispatch_
full - Dispatch a provider tool-use request, returning the tool output, an optional file-write result, and an optional shell-execution result.
- dispatch_
full_ with_ cancel_ and_ search - Dispatch a request with cancellation and the active search backend.
- dispatch_
full_ with_ cancel_ and_ search_ and_ registry - Dispatch a request with cancellation, search settings, and an optional application-owned background-process registry.
- dispatch_
full_ with_ search - Dispatch a provider tool-use request with the active search backend.
- dispatch_
runtime_ full - Dispatch through MCP first when a namespaced MCP tool is available.
- dispatch_
runtime_ full_ with_ cancel_ and_ search - Dispatch through MCP or built-ins with cancellation and search settings.
- dispatch_
runtime_ full_ with_ cancel_ and_ search_ and_ registry - Dispatch through MCP or built-ins with cancellation, search settings, and an optional application-owned background-process registry.
- dispatch_
runtime_ full_ with_ search - Dispatch through MCP or built-ins with the active search backend.
- hash_
content - Compute a stable hash of content using the standard library hasher.
- provider_
tool_ catalog_ schemas - Convert the tool catalog into provider-compatible tool schemas.
- resolve_
workspace_ path - Resolve a workspace path using the same containment and symlink checks as tools.
- runtime_
tool_ definitions - Return built-in tools plus cached MCP tools for a run.
- searchable_
file_ paths - Return searchable file paths for UI features that need file selection.
- sorted_
json_ value - Return a recursively sorted JSON value for deterministic debug rendering.
- tool_
catalog_ schemas - Convert the tool catalog into Anthropic-compatible tool schemas.
- tool_
definitions - The catalog of tools exposed to the model.