cmux daemon: chat-share invites answer their invite link

Merged
TE
2d ago
+75-4

Step toward "the owner hands an invite out" for chat-share account invites (follow-ups on #33746). The daemon now answers the link an invitee opens.

What changes

  • Invite link. agent-session-share-invite and each share in agent-session-share-list carry invite_url: the share's room origin, then /i/<share_id>. It has no secret in it, because the room signs the account in. It is null while the share has no room. cmux share invite prints it on a second line (Invite link: …). --json already passes the daemon's answer through the agent.share.invite op, so it carries invite_url too.
  • The share-change event for a live sheet refresh needs a declared protocol event: spec, SDK schema and generated bindings. The spec inventory check requires that for any runtime event. It goes in its own PR, and this one keeps to the invite link.

The optional single create+invite verb is not in this PR; it stays on #33746.

Tests (red first: the first commit adds the tests)

  • an_invite_and_the_list_carry_the_invite_link: null without a room; <origin>/i/<id> with one, on the invite, on a repeated invite and in the list.
  • share_cli::an_invite_prints_the_invite_link.

Fleet fast checks at ea0408ff6ade: cargo test -p cmux-tui-core --lib share 144 passed; cargo test -p cmux-tui share_cli 12 passed. Workspace clippy fails only in two files this PR doesn't touch (cli/automation.rs type_complexity, plus a manual_is_multiple_of), so those reds are base's.

Agent session: agent session

šŸ¤– Generated with Claude Code