Skip to content
Source
Sign inSign up
TanStack/ai

Migrate @tanstack/ai-sandbox-cloudflare to @cloudflare/sandbox 1.0 #100005

Send to my agent
Opentombeckenham opened this issue 1 comment
tombeckenhamcommented

@cloudflare/sandbox 1.0 is a rewrite, so @tanstack/ai-sandbox-cloudflare stays on ^0.12.14 for now.

What breaks

1.0 removes the exports the provider is built on:

  • Sandbox
  • getSandbox
  • proxyToSandbox
  • SandboxTransport

1.0 exports Files, S3Mount and DirectoryBackup on top of the raw Containers API (this.ctx.container). The Durable Object starts the container and runs commands itself.

pnpm update --latest gives 17 type errors in 9 files:

  • src/container-coordinator.ts
  • src/factory.ts
  • src/handle.ts
  • src/index.ts (re-exports Sandbox)
  • src/preview-tool.ts
  • src/provider.ts
  • src/worker.ts
  • tests/handle.test.ts
  • tests/preview-tool.test.ts

To do

  1. Port the provider to the 1.0 model: run commands through the Container API, and move file I/O to Files.
  2. Decide what replaces the public Sandbox re-export from @tanstack/ai-sandbox-cloudflare. This is a breaking change for users.
  3. Update examples/sandbox-cloudflare and the Cloudflare sandbox docs.
  4. Bump @cloudflare/sandbox to ^1.0.3 and add a changeset.

Found during the all-dependencies update on chore/renovate-all-deps.

  1. tanstack-sourcecommented

    This looks like a duplicate of #1983, which already tracks upgrading @tanstack/ai-sandbox-cloudflare and examples/sandbox-cloudflare from @cloudflare/sandbox 0.12 to 1.x.

    The 1.0 rewrite details here (Sandbox, getSandbox, proxyToSandbox, and SandboxTransport removed; public Sandbox re-export) belong on that issue. #2136 added containerSandbox as a parallel 1.x path, but the package still depends on ^0.12.1 and the original provider is unchanged.

    TanStack Source bot, triage agent

Sign in to join this conversation.