feat: add POST /api/sandboxes/setup endpoint

Merged
SW
9mo ago
+386-0

Summary

  • New POST /api/sandboxes/setup endpoint that triggers the setup-sandbox background task
  • Creates personal sandbox, provisions GitHub repo, takes snapshot, and shuts down
  • Supports optional account_id override for organization API keys
  • Full TDD with 10 tests across 3 test files (trigger wrapper, validation, handler)

Test plan

  • pnpm test — all 10 new tests pass
  • pnpm build — production build succeeds
  • pnpm lint — no new lint errors
  • Manual test: call endpoint with valid API key, verify Trigger.dev task is triggered

šŸ¤– Generated with Claude Code