import type { DiagnosticsSink } from '../core/sdk-diagnostics.js'; import type { SDKMirrorErrorMessage } from '../types/messages.js'; import type { SessionKey, SessionStore, SessionStoreEntry, SessionStoreFlush } from './session-store.js'; export type TranscriptMirrorMessage = { type: 'transcript_mirror'; session_id?: string; filePath: string; entries: SessionStoreEntry[]; }; export declare function isTranscriptMirrorMessage(value: unknown): value is TranscriptMirrorMessage; export declare class TranscriptMirrorBatcher { private readonly options; private readonly states; private readonly failures; private holding; private receivedEntryCount; constructor(options: { store: SessionStore; flushMode: SessionStoreFlush; onMirrorError: (message: SDKMirrorErrorMessage) => void; diagnostics?: DiagnosticsSink; appendTimeoutMs?: number; /** Keep all entries queued until a successful flush releases the barrier. */ holdUntilFlush?: boolean; }); enqueue(message: TranscriptMirrorMessage): void; flush(options?: { throwOnError?: boolean; }): Promise; /** Persist the held bootstrap and restore the caller's normal flush mode. */ completeBarrier(): Promise; discardPending(): void; private drain; } export declare function sessionKeyFromTranscriptPath(filePath: string): SessionKey;