Optional timeoutMaximum execution time in milliseconds
Optional maxMaximum memory in bytes
Optional maxMaximum output size in bytes
Optional envEnvironment variables to inject
Optional workingWorking directory for execution
Optional allowWhether to allow network access
Optional allowWhether to allow filesystem access
Optional allowedAllowed filesystem paths (if allowFilesystem is true)
Optional blockedBlocked imports/modules
Optional maxMaximum CPU time in milliseconds
Optional extraExtra global bindings to inject into the sandbox context alongside the
minimal 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 minimal defaults:
process, global, globalThis, requireeval, FunctionReflect, ProxySharedArrayBuffer, AtomicsWebAssembly
Configuration for the sandbox environment.