pub struct WorkflowSummary {
pub run_id: String,
pub workflow_name: Option<String>,
pub status: Option<String>,
pub snapshot_duration_ms: Option<u64>,
pub snapshot_agent_count: Option<u64>,
pub snapshot_total_tokens: Option<u64>,
pub phases: Vec<WorkflowPhaseSummary>,
pub parsed_agent_count: usize,
pub parsed_turns: usize,
pub parsed_output_tokens: u64,
pub parsed_cost: f64,
}Expand description
Summary of one workflow run within a session.
Combines two data sources:
- Declared (from the
wf_<runId>.jsonsnapshot):workflow_name,status,snapshot_duration_ms,snapshot_agent_count,snapshot_total_tokens,phases. These are what Claude Code itself recorded for the run; they may be absent if the snapshot is missing. - Measured (re-aggregated from the parsed
agent-*.jsonltranscripts whoseworkflow_run_id == run_id):parsed_agent_count,parsed_turns,parsed_output_tokens,parsed_cost. These are the ground-truth numbers the rest of the tool charges into session/overview totals.
Comparing the snapshot’s snapshot_total_tokens with parsed_* lets the
validator confirm workflow tokens are not lost (see validate.rs).
Serializes to camelCase — this is part of the frontend data contract.
Fields§
§run_id: StringThe workflow run id, e.g. wf_7c0e6255-566.
workflow_name: Option<String>Human-readable workflow name from the snapshot (e.g. code-review).
status: Option<String>Run status from the snapshot, e.g. completed, running, failed.
snapshot_duration_ms: Option<u64>Wall-clock duration of the run in milliseconds, from the snapshot.
snapshot_agent_count: Option<u64>Agent count as reported by the snapshot (agentCount).
snapshot_total_tokens: Option<u64>Aggregate token count as reported by the snapshot (totalTokens).
phases: Vec<WorkflowPhaseSummary>Declared phases of the workflow (title + detail), from the snapshot.
parsed_agent_count: usizeNumber of agent transcripts actually parsed for this run.
parsed_turns: usizeTotal parsed assistant turns across this run’s agents.
parsed_output_tokens: u64Total parsed output tokens across this run’s agents.
parsed_cost: f64Total cost (USD) charged for this run’s parsed turns.
Trait Implementations§
Source§impl Clone for WorkflowSummary
impl Clone for WorkflowSummary
Source§fn clone(&self) -> WorkflowSummary
fn clone(&self) -> WorkflowSummary
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for WorkflowSummary
impl Debug for WorkflowSummary
Auto Trait Implementations§
impl Freeze for WorkflowSummary
impl RefUnwindSafe for WorkflowSummary
impl Send for WorkflowSummary
impl Sync for WorkflowSummary
impl Unpin for WorkflowSummary
impl UnsafeUnpin for WorkflowSummary
impl UnwindSafe for WorkflowSummary
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more