Streaming
Consume durable investigation events and reconnect safely.
Mission streams use application/x-ndjson: one complete JSON event per line.
Events to handle
| Event | Meaning |
|---|---|
session.started | Durable mission created |
action.result | A research action returned evidence or a structured result |
message.appended | Incremental findings text |
message.completed | A settled findings block |
input.requested | The mission needs a clarification or approval |
turn.failed | The active turn failed |
turn.cancelled | Cancellation completed |
session.waiting | Store the latest continuation token |
session.completed | Mission reached a terminal end |
Reconnect without duplicates
Track the number of events you have durably processed. Reconnect with that count as startIndex. The stream replays from that position, so a dropped connection does not lose investigation work.
GET /eve/v1/session/{sessionId}/stream?startIndex=147Do not infer completion from a closed socket. Only a terminal event or an explicit failure establishes the mission state.
Next steps
Review the stream endpoint and error strategy.
