Skip to main content

Module shell_tool

Module shell_tool 

Source
Expand description

WorktreeExecutor — the coder’s host-side tool executor.

Wraps car_engine::agent_basics file tools plus a new host shell tool, with three hard guarantees enforced in code (not just policy):

  1. Pinned cwd — shell commands always run at the worktree root; there is no cwd parameter. Relative file-tool paths are rooted there too, and clamped against lexical escape.
  2. Bounded output — combined output is capped (tail-kept) so a noisy build can’t flood the conversation or the event stream.
  3. Bounded time — wall-clock timeout per command; on expiry the whole process group is killed (Unix), not just the shell.

Every call is checked by the coder InspectorChain first; first Deny wins and the denial reason is the tool error the model sees.

Structs§

WorktreeExecutor