import { type WorkflowMeta } from '#services/workflow_history.js'; import type { Span } from '#services/workflow_history/correlator.js'; export interface StepGraph { spans: Span[]; totalDurationMs: number; workflow: WorkflowMeta | null; labels: Map; loading: boolean; error: string | null; } /** * Fetches a run's correlated step spans for the dev TUI's waterfall overlay, * reusing the same `fetchWorkflowHistory` path as the `workflow history` CLI * command. Driven by `usePoll`: while the run is still advancing it re-pulls * every tick so newly scheduled / finished steps appear, then stops and caches * once terminal. The modal ticks the time axis between polls so the right edge * tracks elapsed time. * * A hard fetch failure surfaces as `error` only when nothing has loaded yet — a * transient poll blip keeps the last good chart on screen. */ export declare const useStepGraph: (workflowId: string | undefined, runId: string | undefined, status?: string) => StepGraph;