import { type Sandbox } from './sandbox.js'; /** Options for `containerSandbox()`. */ export interface ContainerSandboxOptions { /** * The image, such as `node:22-alpine`. It needs a POSIX shell, `cat`, `find`, `tar`, and the * commands the agent is to run. */ image: string; /** The binary that runs containers: `docker`, `podman`, or a path to either. Defaults to `docker`. */ binary?: string; /** Where the files live inside the container, and where commands run. Defaults to `/workspace`. */ workdir?: string; /** * The network. `false`, the default, gives the container none at all; `true` gives it the * runtime's default network; a string names a network to join. */ network?: boolean | string; /** The memory limit, as the runtime takes it. Swap is held to the same limit. Defaults to `512m`. */ memory?: string; /** How many CPUs it may use. Defaults to 1. */ cpus?: number; /** The most processes it may run at once. Defaults to 256. */ pids?: number; /** Environment variables every command gets, on top of the image's own. */ env?: Record; /** The timeout for a command that sets none. Defaults to 30 seconds. */ timeoutMs?: number; /** Output kept per stream, in bytes. Defaults to 1 MB. */ maxOutputBytes?: number; /** * More arguments for `run`, before the image, for what these options do not cover, such as * `--user` with a volume that user can write. */ runArgs?: readonly string[]; } /** * A sandbox in a container, for production. Every command runs through `exec` in one container per * sandbox, and a command past its timeout is killed inside the container with everything it * started. `isolation` reports the network as isolated only when the container has none. * * ```ts * const sandbox = containerSandbox({ image: 'node:22-alpine' }); * const agent = createDeepAgent({ client: ai, sandbox, commands: ['node', 'npm test'] }); * // … * await sandbox.dispose?.(); * ``` */ export declare function containerSandbox(options: ContainerSandboxOptions): Sandbox;