feat(ai-sandbox-upstash-box): add Upstash Box sandbox provider#899
Draft
alitariksahin wants to merge 1 commit into
Draft
feat(ai-sandbox-upstash-box): add Upstash Box sandbox provider#899alitariksahin wants to merge 1 commit into
alitariksahin wants to merge 1 commit into
Conversation
Add @tanstack/ai-sandbox-upstash-box, a provider that runs harness adapters inside isolated Upstash Box cloud sandboxes through the uniform SandboxHandle: - fs via Box's native file API (read/write/list) + shell for mkdir/remove/ rename/exists; paths normalized between the virtual /workspace root and Box's /workspace/home session home - exec/spawn shell-wrap cwd + env (exports before `cd` so a failed cd is &&-gated); spawn streams stdout over exec.stream with abort-driven kill() - ports.connect via getPublicURL (bearer/basic auth -> channel headers) - native snapshots (box.snapshot / Box.fromSnapshot) and restoreSnapshot - backgroundProcesses: true / writableStdin: false (Daytona parity); fork unsupported Includes unit tests (mocked Box) and gated integration tests (UPSTASH_BOX_API_KEY), README, changeset, and the central provider-list row.
Contributor
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
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.
Closes #898
What
Adds
@tanstack/ai-sandbox-upstash-box, a sandbox provider that runs harness adapters inside isolated Upstash Box cloud sandboxes through the uniformSandboxHandle— alongside Docker / Daytona / Vercel / Cloudflare / Sprites.How
Built on the Daytona provider as the closest reference:
exec) for mkdir/remove/rename/exists. Virtual/workspace↔ Box/workspace/home(Box.WORKSPACE) path mapping;list()returns paths in the caller's virtual namespace.cdso a failedcd(&&-gated) doesn't run the command.spawn()streams stdout overexec.stream;wait()resolves on the exit chunk;kill()aborts via anAbortControllerthat unblocks a silent stream.writableStdin: false(Daytona parity).getPublicURL, mapping bearer/basic auth to channel headers.box.snapshot()/Box.fromSnapshot(), plusprovider.restoreSnapshot().backgroundProcesses: true,snapshots: true,durableFilesystem: true;writableStdin/networkPolicy/forkfalse. Best-effortsignal.throwIfAborted()pre-flight on create/resume/restoreSnapshot/destroy/exec/spawn (the Box SDK can't cancel in-flight calls).Also updates the central provider-list table in
@tanstack/ai-sandbox's README and adds a changeset.Test plan
pnpm --filter @tanstack/ai-sandbox-upstash-box test:types— ✅pnpm --filter @tanstack/ai-sandbox-upstash-box test:eslint— ✅pnpm --filter @tanstack/ai-sandbox-upstash-box test:build(publint) — ✅pnpm --filter @tanstack/ai-sandbox-upstash-box build— ✅pnpm --filter @tanstack/ai-sandbox-upstash-box test:lib— ✅ 18 testskill(), public-URL mapping, capability flags).describe.skipIf(!UPSTASH_BOX_API_KEY)) run against live Upstash Box: create → exec → text/binary fs round-trip → streamed spawn → destroy, and snapshot →restoreSnapshot→ verify file survives.pnpm test:sherif/pnpm test:knip— ✅Sandbox providers aren't part of the E2E harness matrix (
testing/e2e/feature-support.tscovers chat/streaming adapters); this follows the Daytona/Docker/Vercel convention of gated integration tests in the package's owntests/.Draft / blocked on
Opened as a draft because
pnpm-lock.yamlstill needs the@upstash/boxentry. The lockfile couldn't be regenerated in my dev environment (registry/CDN metadata issues unrelated to this change). Will push the lockfile update to make CI green before marking ready for review.