Skip to main content

Module tools

Module tools 

Source
Expand description

Built-in local ToolProvider + ExecBackend.

The built-in tool set is local fs + exec, confined to a root directory. Two disciplines are baked in:

  • Log-before-execute is enforced by the loop (it appends the tool/call event before invoking this provider); side-effecting built-ins (fs_write, exec) rely on that ordering for their audit trail.
  • Never block a tokio worker: every fs operation and every local process runs inside spawn_blocking, so a sleeping tool cannot stall concurrent drains (AGENTS.md async gotcha).

Structs§

FilteredTools
A config-driven allowlist over another ToolProvider.
LocalExecBackend
Local command execution via spawn_blocking (DESIGN §6.2 ExecBackend built-). argv is executed directly — never a shell string.
LocalTools
The built-in local tool set, confined to root:

Constants§

DEFAULT_EXEC_TIMEOUT_MS
Default wall-clock bound for one local exec, milliseconds.

Functions§

unmatched_tool_names
The listed tool names that appear nowhere in mounted — the assembly-time fail-closed check for AgentDef.tools: a typo’d name refuses boot instead of silently shrinking the agent’s surface.