cloud link: wire outgoing Native broker
HOLD: integration build only
Wire the app-owned Native Cloud child into the cmux link process. The child now accepts --native-cloud-broker-fd, validates the signed v2 enrollment bootstrap, serves bounded newline broker requests for cloud.machine.connect_info and cloud.machine.link_token, and routes VM peers only through the enrolled mesh tunnel. Legacy relay and direct/Freestyle routes remain available for non-Native links.
Leo's request: "we care about our new cloud" and a signed NEXT DEV build whose Cloud uses the new Worker and app-server link.
Validation: cargo fmt; focused broker/route tests and cmux-tui compile check will run on the fleet.
agent-identity footer --repo manaflow-ai/cmux
agent session
![View with [code]smith](https://pr-comments-assets.blacksmith.sh/codesmith/view-with-codesmith-dark-v3-3x.png)
![Autofix with [code]smith](https://pr-comments-assets.blacksmith.sh/codesmith/autofix-with-codesmith-dark-3x.png)
Need help on this PR? Tag @codesmith-bot with what you need.
Summary by cubic
Wires the app-owned Native Cloud child into the cmux link process. The child accepts --native-cloud-broker-fd, validates the signed v2 enrollment bootstrap, serves bounded newline broker requests for cloud.machine.connect_info and cloud.machine.link_token, and routes VM peers only through the enrolled mesh tunnel. Legacy relay and direct/Freestyle routes remain available for non-Native links.
Cloud start
cloud.startChatstarts a new chat's first send in Cloud: the App picks a free machine the person owns (or creates one), copies the folder with Move to Cloud's sync, opens the chat there, and closes this Mac's unstarted tab.- The folder named by the page is copied only when it is inside the pane's roots; each send gets its own copy on the machine, and a retry lands on the same machine, copy and chat tab so the prompt is never sent twice.
- A chat's first send that a revoked OAuth token failed is sent again once, 2 s later; later failures are shown as before.
Native receiver
- The VM's original enrollment identity is read under root and served to the supervised child over an authenticated socket; no account bearer, install private key or grant secret leaves the root host.
- Adds
cloud.vm.network_policyandcloud.vm.receiver.lifecyclewith structured peer policy, bounded request/reply frames, and a receiver lifecycle phase state machine. - A machine's creator answers owner on any team; members and agent tokens keep team access.
- Signed NEXT DEV builds now default to the development Worker and staging sign-in with isolated credential persistence so the channel works without launch overrides.