Skip to content

feat: Add Daytona sandbox provider with compatibility layer - #9

Open
bidah wants to merge 2 commits into
mainfrom
claude/issue-3-20260223-0926
Open

bidah wants to merge 2 commits into
mainfrom
claude/issue-3-20260223-0926

Conversation

@bidah

@bidah bidah commented Feb 23, 2026

Copy link
Copy Markdown
Collaborator

Implements a provider abstraction layer enabling system-wide switching between E2B and Daytona sandbox providers via the SANDBOX_PROVIDER environment variable.

Closes #3

Generated with Claude Code

Implements a provider abstraction layer that enables switching between
E2B and Daytona sandbox providers system-wide via the SANDBOX_PROVIDER
environment variable (values: 'e2b' | 'daytona', defaults to 'e2b').

Key changes:
- packages/sandbox/src/lib/providers/types.ts: ISandbox, ISandboxProvider interfaces
- packages/sandbox/src/lib/providers/e2b.ts: E2B adapter wrapping @e2b/code-interpreter
- packages/sandbox/src/lib/providers/daytona.ts: Daytona adapter using @daytonaio/sdk
- packages/sandbox/src/lib/providers/index.ts: getSandboxProvider() factory
- Updated all sandbox package core files (file-watcher, bundle-builder, server-utils, github-service)
- Updated web app handler and service (claude-code-handler, claude-code-service)
- Updated key API routes: sandbox, check-sandbox, start-server, create-container
- Updated packages: restore (git ops), publish (cloudflare), remix, convex
- packages/sandbox/templates/daytona-expo-template/: Dockerfile + daytona.yaml
- packages/sandbox/package.json: added @daytonaio/sdk dependency

Backwards compatible: existing E2B setup continues to work without changes.
To use Daytona, set SANDBOX_PROVIDER=daytona plus DAYTONA_API_KEY and
DAYTONA_SERVER_URL in your environment.

Closes #3

Co-authored-by: Rodrigo Figueroa <bidah@users.noreply.github.com>
@vercel

vercel Bot commented Feb 23, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
react-native-vibe-code-sdk-docs Error Error Feb 23, 2026 10:48am
react-native-vibe-code-sdk-web Error Error Feb 23, 2026 10:48am

Request Review

@bidah bidah left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@claude review and fix comments

"build:sandbox:expo": "e2b template build --config templates/expo-template/e2b.toml --name 'capsule-expo-sandbox'",
"build:sandbox:tamagui": "e2b template build --config templates/tamagui-template/e2b.toml --name 'capsule-tamagui-sandbox'",
"build:sandbox:github": "e2b template build --config templates/github-template/e2b.toml --name 'capsule-github-sandbox'"
"build:sandbox:github": "e2b template build --config templates/github-template/e2b.toml --name 'capsule-github-sandbox'",

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@claude we need build:sandbox:github to stay as before, because the build on daytona is same as e2b one template build for the expo template and another for the github tempalte so there should be a build command for build:sandbox:expo:daytona, and build:sandbox:github:daytona keeping als othe e2b ones

@claude claude Bot Feb 23, 2026 •

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Claude finished @bidah's task in 1m 35s —— View job


Tasks

  • Gather context and understand the request
  • Read packages/sandbox/package.json to see current build scripts
  • Fix build scripts: rename build:sandbox:daytona → build:sandbox:expo:daytona, add build:sandbox:github:daytona, keep all E2B commands
  • Commit and push changes

Summary

Updated packages/sandbox/package.json build scripts:

Before:

"build:sandbox:github": "e2b template build --config templates/github-template/e2b.toml --name 'capsule-github-sandbox'",
"build:sandbox:daytona": "docker build -f templates/daytona-expo-template/Dockerfile -t react-native-vibe-code/expo-sandbox:latest ."

After:

"build:sandbox:github": "e2b template build --config templates/github-template/e2b.toml --name 'capsule-github-sandbox'",
"build:sandbox:expo:daytona": "docker build -f templates/daytona-expo-template/Dockerfile -t react-native-vibe-code/expo-sandbox:latest .",
"build:sandbox:github:daytona": "docker build -f templates/daytona-github-template/Dockerfile -t react-native-vibe-code/github-sandbox:latest ."

All E2B commands remain unchanged (build:sandbox:expo, build:sandbox:tamagui, build:sandbox:github). Note that build:sandbox:github:daytona points to templates/daytona-github-template/Dockerfile which doesn't exist yet — that template will need to be created when you're ready to build the Daytona GitHub sandbox image.

@claude

claude Bot commented Feb 23, 2026 •

Copy link
Copy Markdown

Claude finished @bidah's task in 5m 57s —— View job


Fixed Build Commands

  • Read current packages/sandbox/package.json to understand existing build commands
  • Update package.json: rename build:sandbox:daytona → build:sandbox:expo:daytona, add build:sandbox:github:daytona
  • Create daytona-github-template/Dockerfile
  • Create daytona-github-template/daytona.yaml
  • Commit and push changes

Changes Made

packages/sandbox/package.json — Build commands updated:

Command Provider Status
build:sandbox:expo E2B Kept unchanged
build:sandbox:tamagui E2B Kept unchanged
build:sandbox:github E2B Kept unchanged
build:sandbox:expo:daytona Daytona Renamed from build:sandbox:daytona
build:sandbox:github:daytona Daytona New — builds daytona-github-template

New files added:

  • packages/sandbox/templates/daytona-github-template/Dockerfile — mirrors the E2B github-template/e2b.Dockerfile structure, adapted for Daytona (sets git user as user@daytona.dev, includes github-setup.sh, claude-sdk setup)
  • packages/sandbox/templates/daytona-github-template/daytona.yaml — Daytona workspace config for the GitHub template (no Expo port, includes GITHUB_TOKEN and GITHUB_OWNER env var notes)

Committed as 60b49e3.
|

…dd build:sandbox:github:daytona

- Rename `build:sandbox:daytona` → `build:sandbox:expo:daytona` to clarify it builds the Daytona Expo template
- Add `build:sandbox:github:daytona` command for the new Daytona GitHub template
- Keep E2B build commands (`build:sandbox:expo`, `build:sandbox:github`, `build:sandbox:tamagui`) unchanged
- Add `daytona-github-template/Dockerfile` and `daytona.yaml` to support the new build command

Co-authored-by: Rodrigo Figueroa <bidah@users.noreply.github.com>

This branch had an error being deployed

2 failed deployments
Preview – react-native-vibe-code-sdk-web — 60b49e3a Deployed Feb 23, 2026 by vercel[bot]
Preview – react-native-vibe-code-sdk-docs — 60b49e3a Deployed Feb 23, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add new sandbox provider: Daytona

1 participant