pub struct ParsedLine {
pub text: Option<String>,
pub thinking: Option<String>,
pub session: Option<SessionInfo>,
pub tool_start: Option<ToolCallStart>,
pub tool_end: Option<ToolCallEnd>,
pub edits: Vec<SuggestedEdit>,
pub usage: Option<UsageInfo>,
pub activity: Option<String>,
pub error: Option<String>,
pub ask_question: Option<(String, Vec<Question>)>,
pub plan: Option<Vec<PlanEntry>>,
pub title: Option<String>,
}Expand description
What a single harness output line decoded to. A line can yield text and edits at once, so this is not one-event-per-line.
Fields§
§text: Option<String>§thinking: Option<String>Model reasoning chunk → RunEvent::Thinking. Kept separate from
text so the UI can render it distinctly.
session: Option<SessionInfo>Session identity (id + model) → RunEvent::Session.
tool_start: Option<ToolCallStart>A tool call began → RunEvent::ToolStart.
tool_end: Option<ToolCallEnd>A tool call finished → RunEvent::ToolEnd.
edits: Vec<SuggestedEdit>§usage: Option<UsageInfo>Token accounting → RunEvent::Usage.
activity: Option<String>§error: Option<String>An in-band failure the harness reported on its stdout (codex’s
turn.failed / error lines) → RunEvent::Error. Terminal. Kept
distinct from activity so a real failure (quota mid-turn, context
overflow, model error) surfaces as an error instead of being downgraded
to transient narration — otherwise a failed turn yields no answer and
no error, looking like the harness silently did nothing.
ask_question: Option<(String, Vec<Question>)>A harness asked the user a multiple-choice question (Claude’s
AskUserQuestion) → RunEvent::AskQuestion. The tuple is (request_id, questions): the tool-call id the host echoes when tying the answer and
clearing the chips, plus the parsed questions. The host renders the
options as chips; the answer returns as the user’s next message.
plan: Option<Vec<PlanEntry>>The agent’s current plan / todo list → RunEvent::Plan. No built-in
parser fills this yet; it’s wired for adapters that will.
title: Option<String>A live session-title update → RunEvent::SessionInfoUpdate.
Implementations§
Trait Implementations§
Source§impl Clone for ParsedLine
impl Clone for ParsedLine
Source§fn clone(&self) -> ParsedLine
fn clone(&self) -> ParsedLine
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more