/** * Renders a workflow's correlated spans as a terminal waterfall/Gantt chart — * a text analog of the Agents HQ "Timeline" view. Each row is a step, drawn as * a colored bar positioned by its start offset and sized by its duration, on a * shared time axis. * * The tick math (TICK_STEPS_MS / pickTickStep / formatTickLabel) is a port of * Atlas's `StepGantt`; the bar geometry mirrors its leftPct/widthPct as integer * terminal columns. */ import type { Span, SpanStatus } from '#services/workflow_history/correlator.js'; export interface WaterfallOptions { width: number; color: boolean; header?: string; labels?: Map; } export interface BarGeometry { startCol: number; barLen: number; instantaneous: boolean; } export declare const FULL_BLOCK = "\u2588"; export declare const THIN_BLOCK = "\u258F"; export declare const ANSI: Record; export declare function makeTint(color: boolean): (text: string, code: string) => string; export declare function pickTickStep(totalMs: number): number; export declare function buildTicks(totalMs: number): number[]; export declare function formatTickLabel(ms: number): string; export declare function formatDurationLabel(ms: number): string; export declare function computeBar(startOffsetMs: number, endOffsetMs: number, totalMs: number, trackW: number): BarGeometry; export declare function buildRulerLine(totalMs: number, trackW: number): string; export default function renderWaterfall(spans: Span[], totalDurationMs: number, options: WaterfallOptions): string;