WorkflowSnapshot
One immutable bundle of the records an agent or developer-tool app shows:
messages, tool calls, approvals, tasks, logs, and more, each in the type
the matching widget takes (such as MessageEntry for MessageList).
Import: package:fleury/fleury.dart, or package:fleury/fleury_core.dart in browser code.
final snapshot = WorkflowSnapshot( title: 'Release', tasks: const [ TaskGraphNode(id: 'tests', title: 'Run tests', status: TaskGraphStatus.succeeded), TaskGraphNode(id: 'build', title: 'Build image', status: TaskGraphStatus.running), ],);
// Derived, safe aggregate state: health, counts, semantic state.final summary = snapshot.summary;Text('${summary.health.name}: ${summary.activeTaskCount} of ${summary.taskCount} tasks remaining')Details
Section titled “Details”It draws nothing itself. Build a new snapshot from your app’s state when
that state changes, pass its lists to the widgets that display them, and
read summary for derived counts and an overall WorkflowHealth. Lookup
helpers such as toolCallById find a record by id, and toSemanticState
exposes the summary to tests and agents.
Constructors
Section titled “Constructors”WorkflowSnapshot()
Section titled “WorkflowSnapshot()”| Parameter | Type | Default | Description |
|---|---|---|---|
id: | Object? | — | Optional stable workflow identity. |
title: | String? | — | Human-readable workflow title. |
messages: | List<MessageEntry> | const <MessageEntry>[] | Conversation or transcript messages in this workflow. |
toolCalls: | List<ToolCallRecord> | const <ToolCallRecord>[] | Tool calls attached to the workflow. |
approvals: | List<ApprovalRequest> | const <ApprovalRequest>[] | Approval requests waiting for the user. Any request here makes summary report WorkflowHealth.needsAttention (unless something failed), so remove answered ones. |
tasks: | List<TaskGraphNode> | const <TaskGraphNode>[] | Task graph nodes representing planned or running work. |
modelStatus: | ModelStatusInfo? | — | Current model/runtime status, if known. |
contextItems: | List<ContextItem> | const <ContextItem>[] | Context items currently attached to the workflow. |
fileMentions: | List<FileMentionEntry> | const <FileMentionEntry>[] | Mentionable files or paths associated with the workflow. |
conversations: | List<ConversationEntry> | const <ConversationEntry>[] | Conversation summaries available to the workflow. |
traceEvents: | List<TraceTimelineEntry> | const <TraceTimelineEntry>[] | Trace or timeline events for active work. |
patchFiles: | List<PatchReviewFile> | const <PatchReviewFile>[] | Patch files currently under review. |
logEntries: | List<LogEntry> | const <LogEntry>[] | Log rows associated with the workflow. |
metadata: | Map<String, Object?> | const <String, Object?>{} | App-specific semantic state carried by the snapshot. |
Source
Section titled “Source”WorkflowSnapshot is defined in packages/fleury/lib/src/catalog/workflow_snapshot.dart.
Category: Agent surfaces · All widgets