Add Cloudflare Workers world implementation#1372
Add Cloudflare Workers world implementation#1372ataylorme wants to merge 2 commits intovercel:mainfrom
Conversation
Implements a Workflow DevKit world backend using Cloudflare primitives: - Durable Objects for per-run state (events, steps, hooks, waits, streams) - D1 SQLite for cross-run index queries (runs.list, hooks.getByToken) - Cloudflare Queues for reliable message dispatch https://claude.ai/code/session_019jYBQA1pNTDjK4LGt8qFKA
🦋 Changeset detectedLatest commit: f2ebe0e The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
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 |
|
@claude is attempting to deploy a commit to the Vercel Labs Team on Vercel. A member of the Team first needs to authorize it. |
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
- Fix run_created with null runId: generate runId client-side so routing key and stored runId map to the same DO instance; temp random keys routed to a different instance making run data permanently unretrievable - Fix listStreamsByRunId: prefix returned names with `runId:` to match the format expected by readFromStream Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
Hi @ataylorme We love seeing World contributions. The approach we're taking with community Worlds is that we'd like them to be published as third-party Worlds, which we then add/advertise on our list of Worlds. In order to get on this list, all you need is:
Once that's done, we'll verify whether the package works, is deployable/redeployable, and passes at least basic workflow e2e tests. If that looks good, we'll merge the PR! If your package gets significant community attention, we may consider moving to first-party support inside the |
Summary
This PR introduces a complete Cloudflare Workers world implementation for the Workflow DevKit, enabling workflow execution on Cloudflare's serverless platform using Durable Objects for state management, D1 for cross-run queries, and Cloudflare Queues for message dispatch.
Key Changes
WorkflowRunDO (Durable Object): A comprehensive per-run state machine that handles:
Storage Layer: Implements the Storage interface with:
Queue Integration:
D1 Index Schema: Lightweight global index tables for:
Streaming Support: Stream chunk storage in Durable Object storage with:
Configuration & Utilities:
Notable Implementation Details
https://claude.ai/code/session_019jYBQA1pNTDjK4LGt8qFKA