pub fn process_stream_event_with_terminal_capture(
event: StreamEvent,
messages: &mut Vec<SharedMessage>,
subagents: &mut Vec<SubagentTracker>,
queued_message: &mut Option<String>,
pending_events: &mut Vec<String>,
turn_baseline: usize,
terminal_capture: impl FnOnce(),
) -> (EngineStreamEvent, StreamCompletion)Expand description
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.