feat: add E2B sandbox provider - #393
Open
vibhorgupta96 wants to merge 2 commits into
Open
Conversation
vibhorgupta96
requested review from
bhaveshpatel640,
chiragjn,
debajyoti-truefoundry,
govindavashishtha,
heerambavi1998,
kumarsks619,
qaifi-tf,
sajal-truefoundry,
sayan-truefoundry,
sr07asthana,
thesujai and
vinit-truefoundry
as code owners
August 21, 2026 11:30
🦋 Changeset detectedLatest commit: 7b45dd7 The changes in this PR will be included in the next version bump. This PR includes changesets to release 4 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using default effort and found 3 potential issues.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Want higher recall? High effort reviews run extra passes and find more bugs. A team admin can switch effort levels in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 4fbe488. Configure here.
Contributor
|
@vibhorgupta96 Please check #387 (comment) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Summary
Adds E2B as a secure, tenant-scoped sandbox provider that can be configured through the settings API.
Closes #387
Changes
E2B-Traffic-Access-Tokenwhile preserving the existing headerless Daytona and TFY pathsHow was this tested?
pnpm buildpnpm testpnpm typecheckpnpm lint:cipnpm format:checkpnpm --filter @truefoundry/trueforge-core buildThe restricted runner initially blocked the existing Unix-domain-socket probe with
EPERM; the full root test suite passed when rerun with socket access.Known limitation
@truefoundry/assistant-ui-runtimeconfig only models Daytona lifecycle fields. E2B is therefore API-configurable in this PR, but is intentionally not exposed as a UI catalog preset. UI creation can be enabled after the canonical runtime type is provider-neutral and CI regenerates the SDK/OpenAPI artifacts.Checklist
pnpm build,pnpm test,pnpm typecheck,pnpm lint:ci, andpnpm format:checkpass locallypackages/trueforge-sdk,.github/fern/openapi/openapi.json,docs/openapi.json) — fork PRs omit SDK regen; maintainers regenerate after merge.env.exampleupdated if configuration or behavior changedNote
High Risk
Touches sandbox isolation, credential handling, and Code Mode WebSocket auth, plus concurrent settings persistence. A bug here can leak tenant sandboxes or hold provider credentials incorrectly.
Overview
Adds E2B as a first-class sandbox provider configurable through the settings API (not yet in the shared UI catalog).
The new
E2BSandboxProviderbuilds a release image into an E2B template, creates secure, non-public sandboxes that pause/auto-resume, and proves ownership viatrueforge_tenant_idmetadata because E2B ids are opaque. Code Mode NATS now resolves a host plus optional WebSocket upgrade headers so E2B can send the sandbox-boundE2B-Traffic-Access-Token; Daytona/TFY stay headerless.Settings manifests become a discriminated union (
daytona|e2b). Image builds run outside the DB transaction, then persist only if preflight inputs still match under lock (retry, then 409). The UI keeps Daytona-only configure forms and uses provider-neutral “image build” wording.Reviewed by Cursor Bugbot for commit 7b45dd7. Bugbot is set up for automated code reviews on this repo. Configure here.