import type { ChatMessage } from './types.js';
export type LentaSeqReason = 'dom_overlay' | 'jsonl_live' | 'agents_history' | 'subscribe_refresh' | 'delivery_flush' | 'push_ready' | 'emit';
export type LentaSeqTransition = 'dom_to_jsonl' | 'overlay_grow' | 'overlay_shrink' | 'jsonl_grow' | 'none';
export interface LentaSeqEmitMeta {
    reason: LentaSeqReason;
    source: 'dom' | 'jsonl' | 'hybrid';
    historyLen: number;
    liveLen: number;
    messagesLen: number;
    append?: boolean;
}
export interface LentaSeqEntry {
    at: number;
    agentId: string;
    seq: number;
    prevSeq: number;
    seqHeld: boolean;
    reason: LentaSeqReason;
    transition: LentaSeqTransition;
    source: string;
    historyLen: number;
    liveLen: number;
    messagesLen: number;
    messagesSig: string;
    tailPreview: string;
    append?: boolean;
}
export declare function messagesFingerprint(messages: ChatMessage[]): string;
export declare function tailPreview(messages: ChatMessage[], n?: number): string;
export declare function detectSeqTransition(prev: {
    historyLen: number;
    liveLen: number;
    source: string;
} | undefined, next: {
    historyLen: number;
    liveLen: number;
    source: string;
}): LentaSeqTransition;
export declare function recordLentaSeqEmit(agentId: string, seq: number, prevSeq: number, seqHeld: boolean, messages: ChatMessage[], meta: LentaSeqEmitMeta): LentaSeqEntry;
export declare function getLastLentaEmit(agentId: string): {
    seq: number;
    messagesSig: string;
    historyLen: number;
    liveLen: number;
    source: string;
} | undefined;
export declare function getLentaSeqJournal(agentId?: string): LentaSeqEntry[];
export declare function getLentaSeqLogPath(): string;
