Loading workspace insights... Statistics interval
7 days30 daysLatest CI Pipeline Executions
5babbde6 feat(ai-sandbox-cloudflare): createCloudflareSandboxAgent() — one-call edge agent DX
Promotes the CF serverless/edge orchestration out of the examples and into the
package, so an app's worker.ts is a single configured function call. The
coordinator, durable run-log, WebSocket streaming, tool-bridge, and in-container
runner all move into @tanstack/ai-sandbox-cloudflare.
New `@tanstack/ai-sandbox-cloudflare/agent` (Workers entry):
- SandboxCoordinator (abstract base): durable run-log, resumable hibernatable
WebSocket tail, startRun→pipe-under-waitUntil, watchdog alarm, status.
- ChatSandboxCoordinator (DO-drives) + ContainerSandboxCoordinator (co-located).
- createCloudflareSandboxAgent(config) → { Coordinator, Sandbox, worker };
createSandboxAgentWorker() router; DurableObjectRunEventLog;
timingSafeBearerEqualWeb (constant-time, no non-null assertions).
New `@tanstack/ai-sandbox-cloudflare/runner` (node/container entry):
- runInContainerHarness({ resolveAdapter }) — the in-container HTTP server +
chat() wiring for the co-located model; the app supplies only the adapter.
Both CF examples collapse to a ~10-line worker.ts (one createCloudflareSandboxAgent
call + the wrangler-required DO re-exports); coordinator/run-log/protocol files
deleted. Net −1,900 lines in examples. Build externalizes cloudflare:workers;
compile-only (not runtime-verified in-repo).
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>