Skip to content
2 min read · 306 words

Interface: SandboxPolicy

Defined in: src/batteries/sandbox/types.ts:50

Assembly-facing policy. Reads allow by default; writes and network deny by default.

Properties

PropertyModifierTypeDescriptionDefined in
filesystemreadonly{ allowGitConfig?: boolean; allowRead?: readonly string[]; allowWrite?: readonly string[]; denyRead?: readonly string[]; denyWrite?: readonly string[]; disabled?: boolean; gitSafeDirectories?: readonly string[]; mandatoryDenySearchDepth?: number; }Filesystem rules; disabled is a kill switch and deliberately does not unify axis defaults.src/batteries/sandbox/types.ts:52
filesystem.allowGitConfig?readonlybooleanWhether .git/config is included in the mandatory deny set.src/batteries/sandbox/types.ts:58
filesystem.allowRead?readonlyreadonly string[]Read rules use deny-then-allow precedence.src/batteries/sandbox/types.ts:54
filesystem.allowWrite?readonlyreadonly string[]Write rules use allow-only semantics; deny wins inside the allow list.src/batteries/sandbox/types.ts:56
filesystem.denyRead?readonlyreadonly string[]-src/batteries/sandbox/types.ts:55
filesystem.denyWrite?readonlyreadonly string[]-src/batteries/sandbox/types.ts:57
filesystem.disabled?readonlybooleanWhen true, no filesystem rules apply.src/batteries/sandbox/types.ts:53
filesystem.gitSafeDirectories?readonlyreadonly string[]Git safe directories passed to spawned children.src/batteries/sandbox/types.ts:59
filesystem.mandatoryDenySearchDepth?readonlynumberLinux mandatory-deny scan depth.src/batteries/sandbox/types.ts:60
networkreadonly{ allowedDomains?: readonly string[]; deniedDomainReasons?: Readonly<Record<string, string>>; deniedDomains?: readonly string[]; disabled?: boolean; }Network rules. An absent allow list means deny all unless disabled.src/batteries/sandbox/types.ts:63
network.allowedDomains?readonlyreadonly string[]-src/batteries/sandbox/types.ts:65
network.deniedDomainReasons?readonlyReadonly<Record<string, string>>Model-readable reasons for denied domains.src/batteries/sandbox/types.ts:67
network.deniedDomains?readonlyreadonly string[]-src/batteries/sandbox/types.ts:66
network.disabled?readonlyboolean-src/batteries/sandbox/types.ts:64