A single event from codex's --json NDJSON output.
When using --json, the codex CLI emits one JSON object per line.
Each event has an event type and associated data.
Event types
Common event types include:
"thread.started"-- thread initialization"turn.started"-- turn began"item.completed"-- item completed"turn.completed"-- turn finished
Summary
Functions
Return the full data map.
Return the event type string.
Get a value from the data map by key.
Parse a single NDJSON line into a %JsonLineEvent{}.
Parse multiple NDJSON lines from stdout into a list of events.
Parse a lazy stream of NDJSON lines into a lazy stream of events.
Whether this event matches the given type.
Types
Functions
Return the full data map.
Return the event type string.
Get a value from the data map by key.
Parse a single NDJSON line into a %JsonLineEvent{}.
Parse multiple NDJSON lines from stdout into a list of events.
Filters for lines that look like JSON objects and silently drops lines that fail to parse.
@spec parse_stream(Enumerable.t()) :: Enumerable.t()
Parse a lazy stream of NDJSON lines into a lazy stream of events.
The streaming counterpart of parse_lines/1: same silent drop of
lines that do not parse, no buffering of the whole run. Used by
Exec.stream/2, ExecResume.stream/2, and Review.stream/2 over the
lines their CodexWrapper.Runner produces.
Whether this event matches the given type.