import type { CliRenderer, OptimizedBuffer } from "@opentui/core";
import type { GraphTheme } from "./graph-theme.ts";
import type { SessionData } from "./orchestrator-panel-types.ts";
type BackgroundRun = {
    x: number;
    width: number;
    color: string;
};
type BufferRowDiagnostic = {
    y: number;
    text: string;
    backgrounds: BackgroundRun[];
};
type ColorCount = {
    color: string;
    count: number;
    percent: number;
};
export type BufferDiagnostic = {
    width: number;
    height: number;
    topBackgrounds: ColorCount[];
    yellowHueCells: number;
    yellowHueSamples: Array<{
        x: number;
        y: number;
        color: string;
        char: string;
    }>;
    rows: BufferRowDiagnostic[];
};
export type WorkflowDiagnosticSnapshot = {
    workflowName: string;
    agent: string;
    prompt: string;
    fatalError: string | null;
    completionReached: boolean;
    sessions: readonly SessionData[];
    backgroundTaskCount: number;
    viewMode: string;
    activeAgentId: string;
};
export type TuiDiagnostics = {
    capture: (reason: string) => void;
    dispose: () => void;
};
type TuiDiagnosticsOptions = {
    renderer: CliRenderer;
    graphTheme: GraphTheme;
    getSnapshot: () => WorkflowDiagnosticSnapshot;
};
export declare function isTuiDiagnosticsEnabled(): boolean;
export declare function createTuiDiagnostics({ renderer, graphTheme, getSnapshot, }: TuiDiagnosticsOptions): TuiDiagnostics | null;
export declare function summarizeBuffer(buffer: OptimizedBuffer): BufferDiagnostic;
export {};
//# sourceMappingURL=tui-diagnostics.d.ts.map