Licence
Apache-2.0
Version
0.7.4
Deps
1
Size
53 kB
Vulns
0
Weekly
240
@sandbox0/eve
Vercel Eve sandbox backend adapter for Sandbox0.
Installation
Eve 0.11.x requires Node.js 24 or newer.
npm install eve sandbox0 @sandbox0/eveUsage
import { defineSandbox } from "eve/sandbox";
import { sandbox0 } from "@sandbox0/eve";
export default defineSandbox({
backend: sandbox0({
template: "default",
networkPolicy: "allow-all",
}),
async bootstrap({ use }) {
const sandbox = await use();
await sandbox.run({ command: "npm install" });
},
});The adapter reads SANDBOX0_TOKEN or SANDBOX0_API_KEY by default. Set
SANDBOX0_BASE_URL for non-default regional gateways.
Behavior
- Eve
prewarm()claims a Sandbox0 sandbox, runsbootstrap, writes seed files, pauses the prewarm sandbox, then captures a rootfs snapshot. - Paused prewarm sandboxes get
hardTtl: 3600by default so they do not remain forever. Override withprewarmSandboxHardTtlSec, or set it tonullto omit the adapter-managed hard TTL. - Eve
create()claims a live Sandbox0 sandbox from the prewarmed rootfs snapshot. - The adapter stores the Eve
templateKeyto Sandbox0snapshotIdmapping under.eve/sandbox0/. captureState()storessandboxId; later Eve resumes that Sandbox0 sandbox throughexistingMetadata.dispose()keeps the sandbox by default. Passdispose: "delete"to delete it when Eve releases the handle.
Network Policy
Supported Eve policies:
"allow-all""deny-all"- object policies with domain
allowand subnetallow/deny
Vercel transform and forwardURL rules are rejected because Sandbox0's
credential injection model is explicit credential binding, not raw header
rewriting in this adapter.
Current Limits
Call Eve's prewarm/build flow before serving requests so the .eve/sandbox0/
template registry exists for runtime sandbox creation.