Expand description
Mirrors packages/agent/src/harness/tools/bash.ts — the built-in bash
AgentTool. Drives execute_shell_with_capture with a 100ms-throttled
on_update, and converts ALL failures (non-zero exit, timeout, abort,
executionError) into Err(AgentError) — the agent loop encodes those into an
error ToolResultMessage.
Throttle mirrors the TS BASH_UPDATE_THROTTLE_MS: at most one on_update per
100ms window; a final flush after capture resolves. on_chunk invocations
from the capture layer mark the throttle dirty + schedule a flush.
Structs§
- Bash
Input - Input for the bash tool. Mirrors TS
BashToolInput.timeoutis in seconds. - Bash
Tool - The built-in
bashtool. Holds anArc<dyn ExecutionEnv>(read-only view suffices — bash does not touch the mutation queue). - Bash
Tool Details - Structured details for the bash tool. Mirrors TS
BashToolDetails. - Bash
Tool Options - Options for
create_bash_tool. Mirrors TSBashToolOptions.
Functions§
- create_
bash_ tool - Build the
bashtool from a context. Mirrors TScreateBashTool.