/** * Workflow progress snapshot model + text renderers. * * The runtime emits per-event callbacks (`onPhase`, `onAgentStart`, `onAgentEnd`, * `onLog`). The workflow tool wraps those callbacks to mutate a snapshot and push * a text rendering through `onUpdate` — keeping TUI / Gateway / IM consumers in * lock-step from a single source of truth. */ import type { WorkflowSnapshotDefinition, WorkflowSnapshot } from './types.js'; export declare function createWorkflowSnapshot(definition: WorkflowSnapshotDefinition): WorkflowSnapshot; export declare function recomputeCounts(snapshot: WorkflowSnapshot): void; export interface RenderOptions { maxAgentsPerPhase?: number; maxLogs?: number; showResultPreviews?: boolean; } export type WorkflowPanelStatus = 'queued' | 'running' | 'succeeded' | 'failed' | 'cancelled' | 'timeout' | string; export interface WorkflowPanelOptions { status?: WorkflowPanelStatus; maxActiveAgents?: number; maxRecentAgents?: number; maxErrors?: number; nowMs?: number; } export declare function renderWorkflowText(snapshot: WorkflowSnapshot, completed?: boolean, options?: RenderOptions): string; export declare function previewValue(value: unknown, max?: number): string; export declare function renderWorkflowPanel(snapshot: WorkflowSnapshot, options?: WorkflowPanelOptions): string; export declare function renderWorkflowFinalSummary(snapshot: WorkflowSnapshot, options?: WorkflowPanelOptions): string;