Expand description
Wire protocol — server→client event envelopes built to match spec/.
Every constructor here produces a serde_json::Value whose field names and
nesting match the JSON Schemas in smooth-operator/spec/events/*.json exactly,
so the generated TS/Go/.NET/Python clients deserialize them unmodified.
All events are serialized as a flat envelope with a type discriminator
plus the per-event fields documented in envelope.schema.json’s
EventEnvelope (requestId, status, data, node, token, error,
timestamp).
Functions§
- error
error— an unrecoverable error. The{ code, message }descriptor is duplicated at the envelope level and nested underdata.errorfor wire backward-compatibility (pererror.schema.json).- eventual_
response eventual_response— the terminal event of a streaming turn. The payload is double-nested (data.data) pereventual-response.schema.json.- immediate_
response immediate_response— synchronous ack. For non-streaming actions this also carries the full response payload indata.- now_ms
- Current Unix epoch milliseconds (for the
timestampfield). - pong
pong— reply to aping. Carries the server timestamp both at the top level and insidedata(perpong.schema.json).- stream_
chunk stream_chunk— a per-node state snapshot.nodeis mirrored at the envelope level and insidedata(perstream-chunk.schema.json).stateonly carries safe-to-expose fields.- stream_
token stream_token— a single streamed LLM token. The token is mirrored both at the envelope level (token) and insidedata(perstream-token.schema.json).