Skip to main content

Interface: SandboxConfig

Defined in: packages/orchestration/src/ensemble/session/agent-tools.ts:59

Properties

allowlist?

optional allowlist?: string[]

Defined in: packages/orchestration/src/ensemble/session/agent-tools.ts:69

If provided, only these commands (first token) are allowed. The allowlist is checked after metachar filtering at strict/standard levels. At permissive level, only the allowlist is enforced.


cwd?

optional cwd?: string

Defined in: packages/orchestration/src/ensemble/session/agent-tools.ts:61

Working directory for shell commands. Defaults to os.tmpdir()/ensemble-sandbox


instance?

optional instance?: object

Defined in: packages/orchestration/src/ensemble/session/agent-tools.ts:85

A @baleybots/sandbox Sandbox instance for container-based execution. When provided, commands run inside the container via instance.exec(). When absent, commands run locally via child_process.spawn (test/dev fallback).

copyIn()?

optional copyIn(hostPath, sandboxPath): Promise<void>

Parameters
hostPath

string

sandboxPath

string

Returns

Promise<void>

exec()

exec(command, args?): Promise<{ exitCode: number; stderr: string; stdout: string; }>

Parameters
command

string

args?

string[]

Returns

Promise<{ exitCode: number; stderr: string; stdout: string; }>


securityLevel?

optional securityLevel?: "strict" | "standard" | "permissive"

Defined in: packages/orchestration/src/ensemble/session/agent-tools.ts:79

Security level for command filtering.

  • 'strict' (default): blocks all shell metacharacters and a broad set of commands (rm, sudo, curl, python, bash, etc.). Commands run via direct spawn, not a shell.
  • 'standard': allows pipes (|), redirects (>/>>), &&/||, and $VAR. Blocks backticks, ;, $(), newlines. Blocks destructive commands (dd, mkfs, sudo). All tokens in a pipeline/chain are checked against the blocklist, not just the first.
  • 'permissive': no command filtering — the container itself is the security boundary.

timeoutMs?

optional timeoutMs?: number

Defined in: packages/orchestration/src/ensemble/session/agent-tools.ts:63

Timeout in ms before command is killed. Default: 10_000