Interface SandboxConfig

Configuration for the sandbox environment.

interface SandboxConfig {
    timeoutMs?: number;
    maxMemoryBytes?: number;
    maxOutputBytes?: number;
    envVars?: Record<string, string>;
    workingDir?: string;
    allowNetwork?: boolean;
    allowFilesystem?: boolean;
    allowedPaths?: string[];
    blockedModules?: string[];
    maxCpuTimeMs?: number;
}

Properties

timeoutMs?: number

Maximum execution time in milliseconds

maxMemoryBytes?: number

Maximum memory in bytes

maxOutputBytes?: number

Maximum output size in bytes

envVars?: Record<string, string>

Environment variables to inject

workingDir?: string

Working directory for execution

allowNetwork?: boolean

Whether to allow network access

allowFilesystem?: boolean

Whether to allow filesystem access

allowedPaths?: string[]

Allowed filesystem paths (if allowFilesystem is true)

blockedModules?: string[]

Blocked imports/modules

maxCpuTimeMs?: number

Maximum CPU time in milliseconds