Skip to main content
A dropped connection is not a completed workflow. The preview stream requires a terminal event and reconnects from the last event id after transport loss.

Consume the union

Terminal types are completed, failed and cancelled.

Tune the connection

Set the idle timeout above the longest legitimate silence. Keep reconnects bounded so an outage cannot pin a worker forever.

Resume without duplicates

SSE CONTINUITY · LAST-EVENT-ID
The parser accepts standard multi-line data: fields, tracks id: and ignores comments and keep-alive frames.

Failure rules

  • User abort: stop, do not reconnect.
  • Idle timeout: fail with NikaTimeoutError.
  • Non-retryable client error: fail immediately.
  • Transport close before a terminal event: reconnect within the cap.

Continue

Jobs

Persist the identity before opening the stream.

Run events

Build a tolerant presentation reducer.

Artifacts

Follow artifact events to typed downloads.

Type index

Read the full discriminated union.