Cloud: the machine record says desktop, and the app offers its rd viewer
The desktop-agent-production probe (hq run 42112615671 at 8e84a179) got through the guest's automated click in 20 s. Then open-desktop was refused: "machine capabilities lack desktop; machine-status reports none". Take-over and hand-back were never reached.
Cause
A NEXT machine whose daemon advertises link-desktop-v1 had no way to tell the app. CloudMachine(next:) maps capabilities only from provider_operations, and the cmux-next record never sends that field. So capabilities.desktop stayed false, allows(.desktop) refused, and the default viewer fell back to web.
There was a second gap in the image. The bake behind cloud-native-cbbeec1-rd021 pins cmux-tui cbbeec18, which predates #36519 (with_desktop in cmux-host role.rs). That guest never reported link-desktop-v1. The current lock (cmux-tui 8c00572a) includes #36519, and a bake from it is running.
Change
- Protocol:
CloudMachine.desktop(optional boolean). It is true when the machine serves link servicedesktop. The catalog, TS client, Rust wire types and app.d.tsare regenerated (catalog:checkpasses). - Cloud app server (Rust relay):
Machine.desktopis relayed, and only when it is true. - App:
CloudMachine(next:)readsdesktopintoservesDesktop. That turns oncapabilities.desktopandallows(.desktop)without declaring any other operation, sodefaultDesktopViewerbecomesrd. A record without the field reads as before.
The platform side, which sets desktop from machineServesDesktop, is manaflow-ai/cmux-platform#903.
Tests
These fixture tests do not need Claude auth:
CloudMachineCapabilityTests, 3 new cases:- a record with
desktop: truegets the rd viewer and leaves other actions undeclared; - an absent or false
desktopkeepsweb; - declared
provider_operationsgain desktop.
- a record with
first-party-apps/cloud/servermachine_desktop_relays_to_the_app: true round-trips, while absent or false is omitted.- The guest side is already covered by
the_desktop_capability_follows_the_images_socket_unit(role_tests.rs).
Changelog
- Cloud: Open Desktop shows the video stream viewer on a Cloud machine whose image serves its desktop.
🤖 Generated with Claude Code
Agent session: agent session
![Autofix with [code]smith](https://pr-comments-assets.blacksmith.sh/codesmith/autofix-with-codesmith-dark-3x.png)
Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.
Summary by cubic
Cloud: the machine record says desktop, and the app offers its rd viewer
A NEXT Cloud machine whose daemon advertises link-desktop-v1 had no way to tell the app: the cmux-next record carries no provider_operations, so capabilities.desktop stayed false and open-desktop refused the rd viewer. This adds an optional desktop boolean to the CloudMachine protocol, relays it through the Cloud app server, and maps it to capabilities.desktop on the app side—without declaring any other operation.
- A record with
desktop: trueoffers therdviewer, and only to its creator (the link token refuses a teammate); a different user, or a record that is absent orfalse, keepsweb. - The field is relayed only when true, so older records and backends read as before.
- Regenerated catalog, TS client, Rust wire types, and app
.d.ts; fixture tests cover the app decoding and server relay.
Platform-side update that sets desktop from machineServesDesktop lives in manaflow-ai/cmux-platform#903.