sandbox-v2-lifecycle

โดย vercel

ความเชี่ยวชาญด้านวงจรชีวิตของ Vercel Sandbox v2 สำหรับ vercel-openclaw: การสร้าง/ดำเนินการต่อ/หยุด/ลบแซนด์บ็อกซ์ OpenClaw แบบถาวรที่มีชื่อ, ความจริงของการบันทึกอัตโนมัติแบบถาวร, การดำเนินการด้วยตนเอง…

npx skills add https://github.com/vercel-labs/vercel-openclaw --skill sandbox-v2-lifecycle

Sandbox v2 Lifecycle

Use this skill for vercel-openclaw sandbox lifecycle, restore, stop, reset, hot-spare, worker sandbox, and debug timing work.

Source Of Truth

Official Vercel Sandbox v2 docs are authoritative. Repo docs or agent guidance that assumes v1/manual snapshot restore is stale unless already updated.

Load references only as needed:

  • references/vercel-sandbox-v2-persistent.md — persistent sandbox auto-save/resume/name/session model.
  • references/vercel-sandbox-v2-sdk.md — SDK calls, resume flags, delete, command behavior, and network policy notes.
  • references/vercel-sandbox-v2-snapshots.md — manual Snapshot API semantics.
  • references/vercel-openclaw-lifecycle-map.md — repo-specific invariants and owner files.

Core Model

  • Main OpenClaw runtime is one named persistent sandbox.
  • Persistent stop() auto-saves filesystem state; no manual snapshot() is needed for normal stop.
  • Normal wake resumes by name with Sandbox.get({ name, resume: true }) through the repo controller.
  • resume defaults false; use resume:false for observation/status reconciliation.
  • Commands may auto-resume stopped persistent sandboxes; stop() and update() do not.
  • Manual snapshot() is explicit/debug/checkpoint only. It shuts the sandbox down; do not call stop() afterward.
  • delete() permanently removes the persistent sandbox and its sessions/snapshots.
  • Worker/debug sandboxes are short-lived; pass persistent:false.

Repo Invariants

  • Preserve one persistent OpenClaw sandbox, Redis metadata, channel wake/restore, and short-lived workers.
  • Keep SDK access behind src/server/sandbox/controller.ts except documented raw SDK debug routes.
  • Distinguish host metadata status, SDK status/session, gateway readiness, persistent auto-saved state, and manual Snapshot APIs.
  • Do not use manual snapshotId as the normal restore gate.
  • Preserve resume:false during snapshotting/stopped observation.
  • Keep lifecycle locks and fail-closed firewall behavior.

Workflow

  1. Read lat.md/sandbox-lifecycle.md, docs/lifecycle-and-restore.md, and relevant references from this skill.
  2. Inspect src/server/sandbox/lifecycle.ts, controller.ts, restore-attestation.ts, hot-spare.ts, and worker sandbox code.
  3. Classify whether the change affects persistent resume, manual snapshots, reset/delete, workers, or debug diagnostics.
  4. Patch the smallest surface that fixes the v2 truth model.
  5. Add or adjust targeted tests before broad verification.

Verification

Run the narrowest covering test first, then broader gates for lifecycle changes:

node --import tsx --test src/server/sandbox/restore-attestation.test.ts
pnpm run test:lifecycle
pnpm run typecheck
pnpm run lint
lat check

When touching launch verification or preflight, also run pnpm run verify:observability-pass.

Skills เพิ่มเติมจาก vercel

benchmark-sandbox
vercel
เรียกใช้สถานการณ์ประเมินผลของ vercel-plugin ใน Vercel Sandboxes แทนแผง WezTerm ในเครื่อง จัดเตรียม microVM ชั่วคราวที่ติดตั้ง Claude Code และปลั๊กอินไว้ล่วงหน้า…
official
emil-design-eng
vercel
ทักษะนี้เข้ารหัสปรัชญาของ Emil Kowalski เกี่ยวกับการตกแต่ง UI การออกแบบคอมโพเนนต์ การตัดสินใจเรื่องแอนิเมชัน และรายละเอียดที่มองไม่เห็นซึ่งทำให้ซอฟต์แวร์รู้สึกดี
official
vercel-react-best-practices
vercel
แนวทางปฏิบัติที่ดีที่สุดในการเพิ่มประสิทธิภาพ React และ Next.js จากทีมวิศวกรรมของ Vercel ควรใช้ทักษะนี้เมื่อเขียน ตรวจสอบ หรือปรับโครงสร้างโค้ด React/Next.js…
official
vercel-react-best-practices
vercel
แนวทางปฏิบัติที่ดีที่สุดในการเพิ่มประสิทธิภาพ React และ Next.js จากทีมวิศวกรรมของ Vercel ควรใช้ทักษะนี้เมื่อเขียน ตรวจสอบ หรือปรับโครงสร้าง React/Next.js…
official
write-guide
vercel
ผลิตคู่มือทางเทคนิคที่สอนกรณีการใช้งานในโลกจริงผ่านตัวอย่างแบบค่อยเป็นค่อยไป แนวคิดจะถูกนำเสนอเมื่อผู้อ่านต้องการเท่านั้น
official
release
vercel
ปลั๊กอิน Vercel สำหรับการปล่อย — รัน gates, เพิ่มเวอร์ชัน, สร้าง artifacts, คอมมิต และพุช ใช้เมื่อถูกขอให้ "release", "ship", "bump and push" หรือ "cut a release
official
deepsec
vercel
รัน DeepSec กับโปรเจกต์ Vercel ที่เช็คเอาท์จาก dev3000 ใช้สำหรับการตั้งค่า DeepSec แบบคลิกเดียว การบูตสแตรปบริบทโปรเจกต์ การประมวลผลรอบแรกแบบมีขอบเขต และ…
official
backport-pr
vercel
ย้อนกลับ pull request ของ Next.js ที่รวมแล้วจาก canary ไปยังสาขารุ่นก่อนหน้า เช่น next-16-2 ใช้เมื่อผู้ใช้ขอให้ย้อนกลับ, cherry-pick, หรือเปิด...
official