import type { AgentTodo, ChatMessage, HistoryMessage } from './types.js';
/**
 * Chat UI store: JSONL baseline + DOM overlay tail.
 *
 * Invariant:
 * - JSONL baseline = everything already in `.jsonl` (monotonic archive order).
 * - DOM overlay = viewport rows **not covered** by JSONL (`archiveCoversOverlay`).
 * - While a row streams in DOM but JSONL is shorter → overlay keeps it; when JSONL catches up → overlay drops (no duplicate).
 * - App lenta = `[...jsonlHistory, ...domOverlay]` — never sort both by DOM flatIndex.
 */
export declare class ChatDisplayStore {
    private readonly domTranscript;
    /** Last CDP viewport extract per agent — sole source for live overlay. */
    private readonly latestDomViewport;
    private readonly jsonlBaseline;
    /** Raw JSONL row count per agent — incremental display merge during streaming. */
    private readonly jsonlRowCount;
    /** While true, bridge pushes lenta on DOM ingest (emit path); overlay filter unchanged. */
    private readonly generatingByAgent;
    /** Latest composer todo statuses — enriches JSONL `CreatePlan` cards in lenta. */
    private readonly liveTodosByAgent;
    setLiveTodos(agentId: string, todos: AgentTodo[]): void;
    clearAgent(agentId: string): void;
    setAgentGenerating(agentId: string, generating: boolean): void;
    isAgentGenerating(agentId: string): boolean;
    getJsonlHistory(agentId: string): ChatMessage[];
    getDomLive(agentId: string): ChatMessage[];
    /** Reload JSONL; drop viewport rows now covered by archive. */
    setJsonlBaseline(agentId: string, rows: HistoryMessage[]): void;
    /** Append JSONL rows during live stream; returns new/updated bubbles for socket `append` emit. */
    appendJsonlRows(agentId: string, deltaRows: HistoryMessage[]): ChatMessage[];
    /** Ingest DOM extract; overlay = viewport minus JSONL-covered rows. */
    mergeLiveForAgent(agentId: string, rawDom: ChatMessage[]): void;
    /** Canonical UI lenta: JSONL archive + DOM overlay (compose dedupes cross-layer users). */
    getDisplayMessages(agentId: string): ChatMessage[];
    /** Raw DOM ingest before JSONL filter / stamp (debug only). */
    getDomTranscriptRaw(agentId: string): ChatMessage[];
    /** Snapshot for `/debug/lenta` and lenta:watch. */
    getLentaDebug(agentId: string): {
        jsonlRowCount: number;
        jsonlHistory: ChatMessage[];
        domOverlay: ChatMessage[];
        domRaw: ChatMessage[];
        messages: ChatMessage[];
        source: 'jsonl' | 'hybrid';
        agentGenerating: boolean;
    };
    /** JSONL rows used to suppress DOM overlay (baseline + displayed archive). */
    private archiveForOverlayMatch;
    /** Shrink cached viewport to rows still missing from JSONL (handoff DOM → JSONL). */
    private reconcileDomViewportToArchive;
    private pruneDomOverlay;
    /** Persist Shiki HTML from DOM onto JSONL rows before overlay prune drops it. */
    private enrichBaselineHtmlFromDom;
}
