cloud-setup: Codex broker target transport and models

Merged
TE
9d ago
+295-0

Defines the account scope, device-code prompt, access-only grant, and VM transport used by the Codex broker. The transport requires the authenticated attach endpoint to return exactly vmKind: owner and the running daemon capability, pins the team, and installs private access files with a privileged transaction. No refresh credential enters the VM.

This is the 295-line independently landing prerequisite split from #26170; that PR supplies the caller and registration/renewal lifecycle. Guest-controlled marker files cannot establish ownership; the authoritative API distinguishes creator-owned machines from team/shared machines. The daemon bridge supplies codex-external-access-v1 and reads the documented access-only JSON contract. Wizard activation follows the complete reviewed stack.

Relevant notes:

Setup wizard
New cloud workspace
Figure out what you want to transfer into the api key from current machine to new machine.. claude setup-token
Always need new claude credentials, that kind of suck

Official operational rules:

Use one auth.json per runner or per serialized workflow stream.
Do not share the same file across concurrent jobs or multiple machines.

Codex account auth in CI/CD. The dedicated local holder retains the rotating auth state; this transport carries only short-lived access. cmux must remain running on the user's Mac to renew VM access.

Validation: pr-overlap found no overlaps. Whole-PR prepush gate passed at da68f64d0e81bafc60fa9a8898e8e58bb7ba703e; regressions exercise the real API target with spoofed guest owner markers, team/missing/null/unknown ownership, API errors, and capability gating. Combined exact-stack cmux-ci run 0888de20c0ef36ad479f6dc0a9a5b5cadf75aeb7 (step bbc58714e6ed0d379fa0dca8) exited 0: App/test compile plus eight suites and 57 tests. Coverage was native 7, target 4, holder-pipe 5, and adapter 15. Independent xhigh review remains coordinated with the rest of the stack. This domain/transport prerequisite adds no visible UI; no capture artifact applies to this non-rendered model/transport code.

Agent session: agent session