Interface: SandboxConfig
Defined in: packages/agentos/src/sandbox/executor/ICodeSandbox.ts:32
Configuration for the sandbox environment.
Properties
allowedPaths?
optionalallowedPaths:string[]
Defined in: packages/agentos/src/sandbox/executor/ICodeSandbox.ts:48
Allowed filesystem paths (if allowFilesystem is true)
allowFilesystem?
optionalallowFilesystem:boolean
Defined in: packages/agentos/src/sandbox/executor/ICodeSandbox.ts:46
Whether to allow filesystem access
allowNetwork?
optionalallowNetwork:boolean
Defined in: packages/agentos/src/sandbox/executor/ICodeSandbox.ts:44
Whether to allow network access
blockedModules?
optionalblockedModules:string[]
Defined in: packages/agentos/src/sandbox/executor/ICodeSandbox.ts:50
Blocked imports/modules
envVars?
optionalenvVars:Record<string,string>
Defined in: packages/agentos/src/sandbox/executor/ICodeSandbox.ts:40
Environment variables to inject
extraGlobals?
optionalextraGlobals:Record<string,unknown>
Defined in: packages/agentos/src/sandbox/executor/ICodeSandbox.ts:67
Extra global bindings to inject into the sandbox context alongside the
hardened defaults. Use this when a higher-level wrapper (such as
SandboxedToolForge) needs to expose allowlisted APIs (fetch, fs,
crypto) without forking a second sandbox implementation.
Security-critical keys are silently dropped from this map at merge time so callers cannot accidentally undo the sandbox's hardenings:
- Host-state escape:
process,global,globalThis,require - Code-generation reflection:
eval,Function - Realm-reflection / introspection:
Reflect,Proxy - Memory side-channels (Spectre family):
SharedArrayBuffer,Atomics - Native compilation surface:
WebAssembly
maxCpuTimeMs?
optionalmaxCpuTimeMs:number
Defined in: packages/agentos/src/sandbox/executor/ICodeSandbox.ts:52
Maximum CPU time in milliseconds
maxMemoryBytes?
optionalmaxMemoryBytes:number
Defined in: packages/agentos/src/sandbox/executor/ICodeSandbox.ts:36
Maximum memory in bytes
maxOutputBytes?
optionalmaxOutputBytes:number
Defined in: packages/agentos/src/sandbox/executor/ICodeSandbox.ts:38
Maximum output size in bytes
timeoutMs?
optionaltimeoutMs:number
Defined in: packages/agentos/src/sandbox/executor/ICodeSandbox.ts:34
Maximum execution time in milliseconds
workingDir?
optionalworkingDir:string
Defined in: packages/agentos/src/sandbox/executor/ICodeSandbox.ts:42
Working directory for execution