Cloud: the owner's link takes terminal commands (cloud ssh new-tab, set-default-colors); every machine has ~/work

Merged
TE
2d ago
+314-2

On a Cloud machine you own, cmux cloud ssh opens a terminal tab you can type in, the app's terminal theme applies on connect, and cmux cloud start-chat --cwd /home/cmux/work finds its folder on a fresh machine. Before this change, cmux cloud ssh failed with "open Cloud SSH terminal: new-tab failed: remote_denied", every connect logged set-default-colors failed: remote_denied, and a fresh machine had no ~/work.

  • Owner commands. The signed Native owner link now takes set-default-colors and the terminal and layout commands the app's panes send: new-tab, splits, close, rename, layout, read-screen/scrollback, send-key, list-terminals, restart-tab, clear-history and clipboard replies.
    • new-tab takes a subset of create-terminal's fields, which the owner already had.
    • Team, unverified and classic dials still refuse them.
    • Host administration (shutdown-daemon, apps-, remote-host-, pairing, credentials) stays local only.
  • Contract test. every_app_command_is_decided_for_the_owner_link reads every command the app's daemon client declares and fails unless each one is allowed for the owner or explicitly listed as not over the owner link.
  • ~/work. The image bake makes ~/work, and the Cloud daemon makes it at start on older images.

Ran on the fleet: the 35 native_ tests and the contract test pass, and clippy is clean for cmux-tui-core and cmux-tui (all targets).

Changelog

Fixed: cmux cloud ssh opens a terminal on your own Cloud machine instead of failing with remote_denied, and a new Cloud machine has its ~/work folder.

Agent session: agent session

🤖 Generated with Claude Code


Autofix with [code]smith
Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.


Summary by cubic

On a Cloud machine you own, cmux cloud ssh now opens a terminal tab you can type in, the app's terminal theme applies on connect, and every machine has a ~/work folder. Previously cmux cloud ssh failed with remote_denied, set-default-colors was refused, and a fresh machine had no ~/work.

Owner commands

  • The signed Native owner link now takes the app's terminal and layout commands (new-tab, splits, close, rename, send-key, read-screen, and so on) plus set-default-colors.
  • Team, unverified, and classic dials still refuse them, and host administration stays local only.
  • A contract test reads every command the app's daemon client declares and fails unless each is allowed for the owner or explicitly listed as not over the owner link.

~/work folder

  • The image bake creates ~/work, and the Cloud daemon creates it at start on machines from older images.