pub enum ServerFrame {
Paired {
agent: String,
confirm: Vec<u8>,
},
PairChallenge {
wid: String,
nonce: Vec<u8>,
did: String,
},
Rejected {
reason: String,
},
Challenge {
nonce: String,
},
Event {
name: String,
payload: Value,
},
Transcript {
text: String,
is_final: bool,
},
AudioChunk {
base64: String,
sample_rate: u32,
done: bool,
},
ChannelData {
op: String,
payload: Value,
},
}Expand description
Frames the Mac endpoint sends back to the phone.
Variants§
Paired
Handshake accepted; the phone is now paired with agent. For a proof
enrollment (proto ≥ 2), confirm is HMAC-SHA256(token, daemon→phone
transcript) — the phone verifies it to authenticate the daemon (closes
rogue-daemon/relay MITM). Empty for legacy Hello / Resume paths.
PairChallenge
Enrollment step 2 (proto ≥ 2): challenge for a ClientFrame::HelloInit.
nonce is a fresh 32-byte liveness value; did is the daemon agent’s
Ed25519 identity (multibase), which the phone cross-checks against the QR
to bind the endpoint on the TLS-less LAN.
Rejected
The handshake or a later frame was rejected.
Challenge
Challenge issued in reply to a ClientFrame::Resume: a fresh
per-connection nonce the phone must sign (in a ResumeProof) to prove it
holds the paired device key.
Event
An asynchronous event mirrored to the phone. name is dot-namespaced
(mobile.transcript, mobile.reply, …) to match the Hub EventBus
names used for desktop mirroring.
Transcript
Mac whisper.cpp authoritative transcript for the user’s just-spoken
utterance. Overrides the on-device SFSpeech partial. is_final: true
means this is the definitive text for this turn.
AudioChunk
A chunk of Kokoro TTS audio (f32 LE PCM, 24 kHz mono). The phone
accumulates chunks until done: true, then plays them back.
base64 is the standard base64 encoding of the raw bytes.
ChannelData
Response to a ChannelQuery. op echoes the request; payload is a
JSON array (channel summaries for “list”, events for “events”).