Skip to main content

Module shell

Module shell 

Source
Expand description

The sandbox-routed shell tool.

Each call runs in a fresh shell of the sandbox (sh locally and in containers, the login shell over SSH), so state such as variables and the working directory does not persist. The persistent host shell is bash.

Structs§

MakeShellOptions
Options for make_shell (MakeShellOptions).
MakeShellOptionsBuilder
Use builder syntax to set the inputs and finish with build().
ShellExecutionError
The sandbox failed to run a shell command (ShellExecutionError).
ShellOutput
What a shell command produced (ShellOutput): the tool’s result, and the partial output of a timed-out command.
ShellTimeoutError
A shell command exceeded its timeout (ShellTimeoutError).

Constants§

SANDBOX_SHELL_DESCRIPTION
The description of the shell tool shown to the model (SANDBOX_SHELL_DESCRIPTION).

Functions§

make_shell
Creates a sandbox shell tool: it runs command with the sandbox’s execute and returns a ShellOutput as JSON.