Skip to main content

Module stream

Module stream 

Source
Expand description

Engine-level stream processing — TUI-agnostic event handling.

Processes StreamEvent variants, tracks subagent state and usage, and returns renderer-agnostic actions.

Structs§

SubagentTracker
Subagent tracking state.

Enums§

EngineStreamEvent
What happened during a stream event — renderer decides how to display.
StreamCompletion
What the caller should do after stream completion.

Functions§

process_stream_event
Convert a raw StreamEvent into an EngineStreamEvent. Also handles message history capture and returns completion signals.
process_stream_event_with_terminal_capture
Process one stream event and invoke terminal_capture only after a typed, successful terminal turn. The hook is deliberately infallible: capture enqueue/build/provider failures cannot replace the completed outcome.
repair_history_after_failure
Repair conversation history after a turn failure.