Skip to content

tools/Bash

The bash tool: a command through the environment’s shell. Its output streams through ToolCall.output, where the harness keeps the tail; the result content is that retained output. Output beyond the limits spills to a file whose path is reported as a full_output diagnostic. A nonzero exit or a timeout fails the call, which still answers with the output and diagnostics.

Since v0.0.0


Signature

type BashArgs = typeof BashParameters.Type

Source

Since v0.0.0

What runs: the command, its directory and its variables.

Signature

export interface BashExecution {
readonly command: string
readonly cwd: string
readonly env: Readonly<Record<string, string>>
readonly inheritEnv: boolean
}

Source

Since v0.0.0

Signature

export interface BashOptions {
/** A line run before every command, in the same shell. */
readonly commandPrefix?: string
readonly prepare?: BashPrepare
}

Source

Since v0.0.0

Signature

declare const BashParameters: any

Source

Since v0.0.0

Adjust an execution before it runs, with the call’s ToolCall.

Signature

type BashPrepare = (execution: BashExecution) => Effect.Effect<BashExecution, unknown, ToolCall>

Source

Since v0.0.0

A bash tool.

Signature

declare const make: (options?: BashOptions) => Tool.Tool<BashArgs>

Source

Since v0.0.0