Bind remote Cloud repository frames to the surface chat
A linked Mac could send a Cloud repository action with any chat session, even when the frame named a different surface. Require remote list/add/attached/wait frames to name the session currently bound to their surface, using the same stored lookup as agent-session attach. Refused requests return remote_denied before repository work starts. Local CLI and agent behavior remain unchanged, and catalog sync remains unscoped.
Part of #30628. Supersedes #30830, whose branch name collided with existing backend work; this PR carries only the surface-binding change from the current base. The peer-picked Cloud route is a separate follow-up; it must resolve a real machine surface and its session before advertising Add repository. Existing Cloud-button clients already send both fields.
Tests cover matching frames, a different/missing session, missing/unknown/unbound/malformed surfaces, a surface rebound to a new session, sync, and revoked links. Validation before the clean cherry-pick onto current base: cmux-ci run 41303025723 passed at b0f0646928e02f5e26cfbfd9790364499af02434: cargo test -p cmux-tui-core --lib server::cloud_repos::tests (1 passed; core test binary compiled).
Agent session: 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
Linked Macs can no longer target a different chat when sending Cloud repository frames: remote list/add/attached/wait frames must name the session currently bound to their surface. Requests that don't match return remote_denied before repository work starts; cloud.repo.sync is exempt because sync has no chat. Local CLI and agent behavior are unchanged.
- Reuses the same surface-to-session lookup as agent-session attach by making
tab_sessionshared. - Tests cover matching and mismatched sessions, missing/unknown/unbound/malformed surfaces, surface rebinding, and revoked links.
- Part of #30628 and supersedes #30830; the peer-picked Cloud route is a separate follow-up.