Sandbox SDK 1.0 migration
Shiba run sandboxes now use Sandbox SDK 1.0: your Worker owns a Sandbox Durable Object that calls this.ctx.container for exec, files, previews, and snapshots. The npm package supplies Files helpers only; egress stays in the Worker via SandboxOutbound and egress.ts.
Local rehearsal (required before production)
Section titled “Local rehearsal (required before production)”pnpm install && pnpm build- Docker running;
npx wrangler dev --config apps/backend/wrangler.jsonc - Run the verify-shiba skill features
task-submit-and-approvalandsandbox-run-and-diff(see the repo.cursor/skills/verify-shiba/).
Deferred staging deploy (owner Mac only)
Section titled “Deferred staging deploy (owner Mac only)”Production migration is one-way per Cloudflare guidance. Do not deploy 1.0 to the live shiba-ai-coworker Worker until local verify-shiba passes.
When ready:
- Create a staging Worker (for example
shiba-ai-coworker-sandbox-staging) with the same bindings but a renamed container app inwrangler.jsonccontainers[].name. npx wrangler deploy --config apps/backend/wrangler.jsoncagainst that staging name (never from cloud agents).- Run verify-shiba
pr-publishandreview-findingsagainst staging with a throwaway repo. - Cut over production only after evidence is recorded in
VERIFICATION.md.
Security invariants (unchanged)
Section titled “Security invariants (unchanged)”- Human approval before any container starts.
- No GitHub token or provider key inside the container.
- Deny-by-default egress with per-run
allowedHostsnarrowing. - GitHub scoped to one approved repo path per run.
- Worker-side review post — containers remain read-only for GitHub writes.
| Component | Version |
|---|---|
@cloudflare/sandbox |
1.0.1 |
wrangler |
≥ 4.136.0 (repo pins 4.140.0) |
sandbox-shim in Dockerfile |
Copied from cloudflare/sandbox:1.0.1 |
