pub enum WorkflowProgressEvent {
WorkflowPhase {
index: u32,
title: String,
extras: Extras,
},
WorkflowAgent {
index: u32,
label: String,
phase_index: Option<u32>,
phase_title: Option<String>,
state: String,
last_tool_name: Option<String>,
last_tool_summary: Option<String>,
result_preview: Option<String>,
extras: Extras,
},
Other,
}Expand description
Workflow’s per-event snapshot of the workflow’s
phase + agent state, ridden via Message::TaskProgress’s
workflow_progress field.
The CLI fires one system/task_progress per workflow-internal
state change; each event carries the FULL workflow snapshot at
that instant (not a delta). Two flavours of entry are observed in
captured wire (see ~/Projects/forge/.claude/skills/claude-cli-upgrade/reference-captures/workflow.jsonl):
workflow_phase- phase-level marker emitted when the workflow’sphase()call fires. Carries the phase index + title.workflow_agent- agent-level event tracking an agent call’s state transition (start→progress→done). Carries the parent phase index, the agent’s queued model, the running tool name (when known), a short prompt preview, and (ondone) the result preview.
Both share the same wire envelope discriminated by type. The
type stays open via #[serde(other)] on the trailing variant
so future CLI additions decode cleanly without a primitives
bump - and an unrecognised TYPE is the one loss stated here: the
Other variant is a unit, so that event’s payload does not
cross.
Every modelled field a view does not read stays in extras, so
queuedAt, startedAt, lastProgressAt, attempt, tokens,
toolCalls, durationMs, model, agentId and promptPreview
all cross with the entry they arrived in.
Variants§
WorkflowPhase
Phase-level marker - emitted when the workflow’s phase()
call fires.
WorkflowAgent
Agent-level event - emitted on each state transition for an
agent call inside a phase. The modelled fields are the ones a
view reads; everything else the CLI sends crosses in extras.
Fields
phase_index: Option<u32>Phase the agent belongs to. The fields became optional:
phase-less agent entries were observed outside the pinned
corpus (proxy-routed capture), while the committed corpus
still tags every entry. Phase grouping then relies on
workflow_phase markers alone.
state: StringCurrent agent state on the wire: start, progress,
done. Free-form string so future states decode
without a primitives bump.
last_tool_name: Option<String>Latest tool the agent invoked, when known. None on
initial start events.
Other
Unrecognised workflow event - preserved across decode to
avoid serde refusing the surrounding task_progress. Not
surfaced anywhere; the renderer treats unknown event types
as no-ops.
Trait Implementations§
Source§impl Clone for WorkflowProgressEvent
impl Clone for WorkflowProgressEvent
Source§impl Debug for WorkflowProgressEvent
impl Debug for WorkflowProgressEvent
Source§impl<'de> Deserialize<'de> for WorkflowProgressEvent
impl<'de> Deserialize<'de> for WorkflowProgressEvent
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
impl Eq for WorkflowProgressEvent
Source§impl PartialEq for WorkflowProgressEvent
impl PartialEq for WorkflowProgressEvent
Source§impl Serialize for WorkflowProgressEvent
impl Serialize for WorkflowProgressEvent
impl StructuralPartialEq for WorkflowProgressEvent
Auto Trait Implementations§
impl Freeze for WorkflowProgressEvent
impl RefUnwindSafe for WorkflowProgressEvent
impl Send for WorkflowProgressEvent
impl Sync for WorkflowProgressEvent
impl Unpin for WorkflowProgressEvent
impl UnsafeUnpin for WorkflowProgressEvent
impl UnwindSafe for WorkflowProgressEvent
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,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.