pub fn parse_cursor_line(line: &str, model: &str) -> Vec<AgentEvent>Expand description
Parse one stdout line into zero or more AgentEvents. model is the
configured model id, used as the Init fallback (the wire’s init event
carries a model DISPLAY string, e.g. “GPT-5.6 Luna 272K Low”, which is
preferred when present) and as the pricing key for the terminal event’s
client-side cost computation.
Unparseable lines become AgentEvent::Other with
raw = {"unparsed": <line>} so nothing is ever dropped from transcripts
— this is also what the pre-billing plain-text rejections
(Cannot use this model, Authentication required) arrive as.