cmux-api: no Cloud code; cloud-env leaves cmux
Leo, 2026-11-04: "like there's the client, and then there's our cmux-platform repo. we can move a lot there." and "you guys should be willing to remove code rewrite do large scale refactors".
cmux-platform: NEXT Cloud's backend (CloudDO, drivers, routes, cloud-env) is cmux-platform's; this deletes cmux-api's copies. Companion: manaflow-ai/cmux-platform#833 (direct routes for the Cloud paths, cloud-env owned there).
What changes:
CLOUD_DOalready names cmux-platform-'s class in every environment, and the Cloud paths andcloud:CloudDOops already forward there (PLATFORM_SURFACES=cloud). The local copies served nothing.- New
src/platform-cloud.ts: a typed client of the platform CloudDO's RPCs that this Worker calls (submit,readOp,mintLinkToken,vmOp,automationExec,clearAbandoned). Callers: op routing (http.ts), automations, the default Chief hand, the GitHub token gate and the operator clear. - Deleted:
CloudDOand its domain (cloud-do*.ts,domains/cloud*.ts), the direct and VM API drivers,PlatformMachines, the Cloud route handlers (bind, keyset, acpmux, client session, guest, trajectories), the Freestyle Cloud provider, the Cloud tests, andbackend/packages/cloud-env.platform-forward.tskeeps its path list inline. Without the PLATFORM binding, a Cloud machine path answers a retryable 503 instead of a local handler. - Tests that touched CloudDO on the side (tenant isolation, SSO, hand-offs, GitHub token, automations, Chief wake) keep their non-Cloud cases. Their Cloud cases are CloudDO's, so they are tested where CloudDO lives.
wrangler.jsonc: the top-level (local) block drops its ownCLOUD_DObinding, and no migration deletes the old localCloudDOnamespace:src/cloud-do-retired.tsexports an inertCloudDO(410 on any call) so its pre-cutover rows stay and no production DO approval is needed. Without aCLOUD_DObinding (the local env) every Cloud op answers a retryableowner.unreachable.
The Cloud ops on /v1/ops and /v1/read stay on the forwarder, since an op is chosen by its body.
Checks (fleet, at this head's tree): tsc clean; API Worker tests 199 files and 1226 tests passed; Node tests passed; catalog:check, lint:size and the guest command check passed; wrangler deploy --env production --dry-run passed. The headless journey runs after the deploy.
Lines: 115 added, 15,957 deleted.
Agent session: agent session
š¤ Generated with Claude Code