Run arbitrary shell commands in the sandbox environment.
Parameter | Type | Required | Default | Description |
---|---|---|---|---|
command | string | Yes | - | The shell command to execute in the sandbox environment |
options | object | No | {} | Configuration options for command execution |
Property | Type | Required | Default | Description |
---|---|---|---|---|
timeoutMs | number | No | - | Maximum time in milliseconds to wait for command completion |
background | boolean | No | false | Whether to run the command in the background (non-blocking) |
callbacks | StreamCallbacks | No | - | Streaming callbacks for real-time command output |
Property | Type | Required | Description |
---|---|---|---|
onUpdate | (message: string) => void | No | Called with streaming updates from command output |
onError | (error: string) => void | No | Called when errors occur during command execution |
Type | Description |
---|---|
Promise<AgentResponse> | Promise that resolves to the command execution results |
Property | Type | Description |
---|---|---|
sandboxId | string | Unique identifier for the sandbox environment |
stdout | string | Standard output from the command execution |
stderr | string | Standard error from the command execution |
exitCode | number | Exit code from the command execution (0 indicates success) |