Current Specification Version: 1.3.0
The Palmshed Sandbox specification follows Semantic Versioning (MAJOR.MINOR.PATCH):
- MAJOR: Breaking changes to the core execution contract, mandatory fields, or standard lifecycle methods.
- MINOR: Backward-compatible additions (e.g., new network policies, additional resource limit fields).
- PATCH: Backward-compatible bug fixes or clarifications in documentation and JSON schemas.
peakMemoryBytes (best-effort, optional, absent when unmeasurable),
bounded retained output with optional truncated (absent means unknown),
and macOS Seatbelt confinement under the existing osFilesystemIsolation
tri-state (no schema change for the platform expansion). All three are
backward-compatible extensions of the frozen 1.0.0 contract: purely
additive fields plus one documented retention behavior with a lossless
streaming path and migration note (see CHANGELOG.md [1.3.0] entry,
now [1.3.0]).
cpuQuotaLimits is an optional capability extension for hard CPU rate
caps (RFC 0007). Its presence does not change the 1.1.0 contract: the flag is
reported (never assumed) as a boolean, and backends that cannot throttle
report false while accepting the option without effect. cpu and cpuQuota
share rate-cap semantics with cpuQuota ?? cpu precedence. Enforced by
native Linux (cgroups v2), native Windows (Job Objects), and Docker
(--cpus) where each platform's probe passes; macOS reports false.
osFilesystemIsolation is an optional capability extension to the frozen
1.0.0 contract (RFC 0006, Linux-only for v1.0: Landlock confinement runner
plus runtime allowlist on the Native backend). Its presence does not change
the 1.0.0 contract: the capability is reported (never assumed) as a
tri-state string, and backends that cannot provide OS-level filesystem
isolation simply report unsupported or unknown. If the capability later
changes the core execution contract or becomes mandatory, that warrants a
version change per the SemVer rules above.
- Frozen the runtime contract: JSON schemas (
sandbox.schema.json,exec.schema.json,filesystem.schema.json,capabilities.schema.json) are stable at v1.0.0. Subsequent changes follow SemVer and the 6-month deprecation policy (compatibility.md,deprecations.md). capabilities.schema.json: corrected the required field list (networkIsolation, previously mistyped asnetwork isolation).exec.schema.json:ExecResultnow includesid(required) and the structuredmetadataobject (withExecutionMetadata), matching the SDK andspec/exec_metadata.md.
- Added
diskQuotatosandbox.schema.json: enforced on VFS writes and, during execution, across the sandbox workspace via process-group kill (ERR_DISK_QUOTA_EXCEEDED). - Defined the VFS isolation boundary:
readFile,writeFile,uploadFile,downloadFile, andexec().workDirare contained to the sandbox root. Path traversal (..), absolute host paths, and symlink escapes are rejected withFS_ERROR. Clarified in RFC 0003 andSECURITY.md. - Defined the environment contract: the host environment is NOT inherited wholesale; a documented minimal allowlist (PATH, HOME, temp/locale variables) is carried, and explicit
envvalues (sandbox-level and per-execution) override it. - Clarified
workDirsemantics: contained to the sandbox root and created if absent. - Clarified the
filesystemcapability: it means isolated virtual filesystem operations (the VFS boundary above), not host-filesystem isolation of the executing process.
- Added
cpuTimeLimit(integer ms) tosandbox.schema.jsonandexec.schema.json: a supported CPU time budget enforced across the process group, distinct from wall-clocktimeout. - Added
cpuQuota(number cores) tosandbox.schema.jsonandexec.schema.json: experimental hard core-quota boundary (cgroups v2 / Job Objects), not yet enforced by the native backend. - Added
memorytoexec.schema.jsonExecOptions(per-execution memory override already supported by the SDK). - Added
cpuTimeMs(best-effort CPU time reporting) toExecResult. - Clarified
cpuLimitscapability description: reflects CPU time budget enforcement; hard core quota reported separately.
- Defined
sandbox.schema.json,exec.schema.json, andfilesystem.schema.json. - Established backend engine lifecycle interface (
init,exec,readFile,writeFile,uploadFile,downloadFile,destroy). - Defined resource limits (CPU, memory, timeout) and network policy values (
disabled,allow,proxy).