One mission can now be driven from two clients of the same owner at once: a signed-in browser and a local terminal, each a full controller.
- Shared sessions. A mission's WebSocket publishes every accepted step to its other attached clients as
Observation. The host's slot lock keeps the log in one server-side order; a stale or duplicate turn is refused with the position to resume from, and an accepted action ends a walk another client was streaming. - Pairing.
POST /v1/missions/{id}/pair(the mission's owner only) issues a short, single-use code.POST /v1/pairspends it with no credentials and answers with the mission and a one-use WebSocket ticket, so a local client plays without its own OAuth. Codes live three minutes, are drawn from the server's injected entropy, and are stored only as SHA-256 hashes. - Client API.
protokill_clientgainspair,redeem_pairing,attach(code),next_observation, and adopts a foreign step while waiting for its own reply.PROTOCOL_VERSIONis 2 for the new message kind. - No store migration; the schema and
store-v4.sqlare untouched, and no float or extra world-time read is added.
Main-path test: crates/protokill_server/tests/multi_client.rs pairs, attaches a second client, acts from each in turn, checks both see every step, and checks a stale turn is refused while the other's lands.
🤖 Generated with Claude Code