Expand description
The one-shot WS control client used by the CLI verbs (DESIGN.md §13).
Unlike the bridge’s persistent, reconnecting link (crate::bridge), each CLI control/admin
verb is a single request/response: connect → challenge-response auth (or register) → send one
control frame → read the reply → disconnect. The server authorizes admin ops by role, so a
non-admin op comes back as a ProtocolMessage::Error here.
Functions§
- one_
shot - Authenticates with the local key on
urland performs one request/response control exchange. - register
- Claims a username + enrolls this machine on
url, returning the resolved session path. - send_
message - Joins
channeland posts one message as the authenticated session, awaiting the server’s ack (sends are server-confirmed) — the CLI-as-a-human-client post (PRD-0011 T-004). - tail
- Joins
channeland streams its traffic to stdout until Ctrl-C — the minimal human “watch the agents talk” view (PRD-0011 T-004; the §19 aggregation log’s smallest sibling). App-level pings keep the session inside the server’s idle-reap window.