Skip to main content

Module json_events

Module json_events 

Source
Expand description

harn run --json: NDJSON event-stream emitter.

Each line is a JsonEnvelope wrapping a RunEventWire. Wire events tag themselves with event_type for cheap discrimination by jq-style consumers and carry a strictly monotonic seq starting at 1. See issue #1755 / epic #1753.

Structs§

NdjsonEmitter
Writer that drains RunEvents, assigns monotonic seq numbers, wraps them in JsonEnvelopes, and emits one NDJSON line per event. Lines are flushed per event so streaming consumers see them as the run progresses.

Enums§

RunEventWire
Wire form of a single event emitted by harn run --json. The event_type tag is flat so consumers can jq '.data.event_type'. seq is monotonic and process-local — the first event in a run is seq=1.

Constants§

RUN_JSON_SCHEMA_VERSION
Schema version for the harn run --json event stream. Bump on any breaking change to the wire shape; agents key off this to negotiate compatibility.