Offline Code & File Sandbox
Runs untrusted code, shell commands, and file merges inside a walled offline box.
An agent running tests or scripts can read your laptop’s SSH keys, call random websites, or corrupt files.
Code executes inside a locked offline box; secrets are redacted from logs, and only verified results come out.
What It Does (In Plain English)
Sandbox gives agents a safe container or microVM with zero internet access (--network none), dropped Linux privileges, and read-only system files. It also verifies worker file patches (sandbox.verify_archive) and smartly merges parallel edits using AST 3-way merge (sandbox.integrate_archives).
Real-World Example
- 1Two workers finish editing different parts of a project in parallel.
- 2
sandbox.integrate_archivesmerges both patches using structured AST merging inside an offline container. - 3The sandbox runs
node --testwith zero internet access and checks for broken imports. - 4It outputs a single trusted
passed: trueverdict artifact.
When Should You Turn It On?
Add at Level 2 (draft) whenever agents run commands, test code, or verify file changes.
Safety level note: Level 2 · Draft — Can create saved drafts and run offline sandbox checks.
How to Add It (workspace.yaml)
kits:
- "@neusym/kit-sandbox@0.1.0"
kitConfigs:
sandbox:
allowedCommands: ["node", "git"]
enableArchiveVerify: trueKits It Works With
Technical Details & Configuration Options (12 settings)
| Package | @neusym/kit-sandbox |
|---|---|
| Provides Ports | None |
| Requires Ports | runner@1blobs@1 |
| Optional Ports | artifacts@1secrets@1tools@1 |
| Publishes Events | None |
| Owned DB Collections | None |
Configuration Options (kitConfigs.sandbox)
| Setting | Type | Default | Description |
|---|---|---|---|
maxExecInlineBytes | integer | 16384 | — |
defaultTimeoutMs | integer | 10000 | — |
maxTimeoutMs | integer | 120000 | — |
allowedCommands | array | — | — |
allowedImages | array | — | — |
allowedWorkspaces | array | — | — |
defaultWorkspace | string | — | — |
enableArchiveVerify | boolean | false | Registers sandbox.verify_archive and sandbox.integrate_archives; when true, boot fails unless tools@1, artifacts@1 and runner sessions are bound. |
allowBaseDir | boolean | false | Allows sandbox.verify_archive to accept a dynamic baseDir (validated against the runner driver's allowedMountRoots) instead of a named workspace. |
maxVerifyLogBytes | integer | 65536 | Maximum UTF-8 bytes of redacted verification output saved as an untrusted data artifact by sandbox.verify_archive (0 disables saving the log artifact). |
verifyMounts | array | — | Operator-configured read-only host directories mounted into sandbox.verify_archive sessions (e.g. an external verification harness mounted under /opt/verifier when verifying dynamic baseDir targets). |
allowedVerifyCommands | array | — | Exact verification invocations sandbox.verify_archive may run (required non-empty when enableArchiveVerify is true): each { command, args, cwd } allows exactly that argv (no args when omitted) in that working directory. The model picks an entry; it never supplies free arguments. |