api: development routes NEXT Cloud to cmux-platform-development
Platform side is live: cmux-platform#332 (merged as 377d2387, cmux-platform-development owns CloudDO; its four Worker secrets are set) and cmux-platform#340 (merged as d5072ab9, the CloudDO drift port with trajectoryScope).
The development Worker hands NEXT Cloud to cmux-platform-development. That Worker owns CloudDO in development (cmux-platform#332, merged as 377d2387; cmux-platform docs/port-cloud-worker.md §3.3, fresh data). Staging (#29488, held) and production are unchanged.
Changes (backend/apps/api/wrangler.jsonc env.development only)
"PLATFORM_SURFACES": "cloud"in vars:src/platform-forward.tssends NEXT Cloud's machine routes and the CloudDO ops on/v1/opsand/v1/readto the platform."services": [{ "binding": "PLATFORM", "service": "cmux-platform-development" }].CLOUD_DObecomes{ "name": "CLOUD_DO", "class_name": "CloudDO", "script_name": "cmux-platform-development" }, so this Worker's own callers reach the same objects the forwarded requests do. Those callers are PlatformMachines, the TeamDO and FeedDO outbox deliveries, the socket route, the UserDO socket registry, admin outbox replay and the automation workflow.- The
CloudDOclass export and itsv11migration stay. There are nodeleted_classesyet. - New
test/platform-cloud-development.test.tspins this, and checks that staging and production keep their own CloudDO.
Rollback: drop the var and the script_name.
CLOUD_DO RPCs cmux-api calls, checked against the platform's CloudDO
These are present with the same signature: submit, readOp, fetch (socket), systemDeliver, closeInstall, replayDeadLetters, bindMachine, vmOp, mintLinkToken, acpmuxKeyedStart, acpmuxPersonHolds, mintClientSession, ownerExec, automationExec, platformMachine(e, u, call, recoveryOnly) and clearAbandoned.
One was missing until #340: trajectoryScope (cloud-trajectory.ts, cmux#25682). It is ported in cmux-platform#340 (merged as d5072ab9) along with the other CloudDO changes made since the port (cmux#28758, #28781, #28789; #30295's "*" allowed-teams rule already landed with #332).
Known after the flip (development only)
- Machines that cmux-api-development's CloudDO made are not visible through the platform's fresh CloudDO.
- Approvals are wired on the platform (cmux-platform#332, over this Worker's FeedDO, UserDO and TeamDO). Environment projection rows wait for a projection port (cmux-platform#376); nothing reads that table today.
Changelog
none
Observed / Not run
- Ran locally:
bun x vitest run test/platform-cloud-development.test.ts test/cloud-plan-production.test.ts(10 passed), andwrangler deploy --dry-run --env development, which resolvesenv.CLOUD_DO (CloudDO, defined in cmux-platform-development)andenv.PLATFORM. - Not run: the full api suite. Tests use the top-level config, not env.development, so this change does not reach them.
Agent session: agent session
🤖 Generated with Claude Code