feat(cli): add trusted Cloud rooms and Fleet workflow

Merged
KH
3mo ago
+2964-95

Summary

  • add participant-only Cloud room invite, membership, acceptance, and per-device session commands
  • add a thin CLI over the existing Cloud integration catalog/connect/disconnect lifecycle; Relayfile remains the integration and writeback authority
  • let Agent Relay SDK and CLI clients use scoped agent tokens without inheriting an ambient owner workspace key
  • hide offline/non-Fleet history by default, use atomic node ports, make fleet spawn --session-ref perform a real Claude/Codex resume, allow immediate same-name respawn after release, and advertise broker spawn/release capacity before the first remote spawn

V1 trust model

Every invitee is a trusted full room participant with ordinary agent-level Relaycast collaboration actions. There is no viewer role, room integration grant/lease service, Cloud chat proxy, or Relaycast source/version change. The workspace owner key, owner-only Relaycast administration, and Agent Relay Cloud organization administration remain owner-only.

Invitation token contract

Cloud issues opaque room invitations in the generic relay_room_inv_ namespace followed by exactly 43 URL-safe characters. The CLI validates that shape before making an authenticated accept request; product-specific and malformed tokens are rejected locally.

Validation

  • exact head 9689e64766ed3c4088002e2c1016e06e0384fcfe: all applicable GitHub checks passed
  • focused Cloud room CLI suite: 14 passed
  • CLI build passed
  • CLI lint passed with zero errors
  • full broker suite: 822 passed, 4 environment-dependent tests ignored
  • broker cargo clippy --lib -- -D warnings
  • prior focused CLI suite: 121 passed; SDK suite: 163 passed
  • pinned Relaycast v6.0.1 local two-node Fleet E2E: 14 passed
  • exact-head GitHub two-node Fleet matrix, both OS E2E jobs, Rust tests, coverage, security, package, install, and standalone macOS smoke all passed
  • live Fleet proof on the broker-equivalent implementation: phase one created Codex thread 019f93bd-019e-7663-b1b0-b320acb71ea9 at PID 26879; after CLI release, an immediate same-name fleet spawn --session-ref created PID 28000 on the same node, /api/spawned retained that thread UUID, and resumed context recalled PR1358_232A_MEMORY_5E8F14
  • Prettier, Cargo fmt, and git diff --check
  • CodeRabbit review completed; no unresolved review threads

Related