import type { WorkflowDefinitionSnapshot, WorkflowRunState, WorkflowStepRecord } from "../workflows/types.js"; import { type GraphLayout } from "./graph.js"; /** * Renders the workflow DAG as text, mirroring the acpx replay viewer's graph * pane: statuses derive from the steps visible up to the selected step, taken * transitions highlight, switch branches carry case labels, and loop edges * route through a right-hand gutter. */ /** Everything the graph needs; a LoadedRunBundle satisfies this shape. */ export type GraphView = { state: WorkflowRunState; snapshot: WorkflowDefinitionSnapshot | null; graphScene?: GraphLayout; graphSteps?: WorkflowStepRecord[]; takenTransitions?: string[]; }; /** How node cells are drawn: single text lines or bordered boxes. */ export type GraphNodeStyle = "line" | "box"; export type GraphRenderOptions = { nodeStyle?: GraphNodeStyle; }; /** Canonical bounded outer dimensions for one boxed node card. */ export declare function graphCardSize(view: GraphView, nodeId: string): { width: number; height: number; }; /** * Render the graph pane. `selectedStepIndex` scrubs the replay position; * pass `steps.length - 1` (or larger) for the live view. */ export declare function renderGraphLines(view: GraphView, selectedStepIndex: number, now?: Date, options?: GraphRenderOptions): string[];