export type PersistedSseEntry = {
    id: number;
    event: string;
    data: Record<string, unknown>;
};
export declare function setOfflineQueueBaseDirForTest(dir: string | null): void;
export declare function resolveFridayNextEventsQueueDir(): string;
/**
 * Per-device JSONL persistence for SSE replay.
 * `overrideBaseDir` is for tests; production uses `resolveFridayNextEventsQueueDir()`.
 */
export declare class FridaySseOfflineQueue {
    private readonly overrideBaseDir;
    constructor(overrideBaseDir?: string | null);
    private baseDir;
    private devicePath;
    private ensureDir;
    /** Highest id in file (full scan; ok for bounded backlog). */
    scanMaxId(deviceId: string): number;
    latestId(deviceId: string): number;
    append(deviceId: string, id: number, event: string, data: Record<string, unknown>, backlogLimit: number): void;
    readAfter(deviceId: string, afterId: number): PersistedSseEntry[];
    truncateKeepLastN(deviceId: string, keep: number): void;
}
/** Shared queue: base directory follows `setOfflineQueueBaseDirForTest` / config. */
export declare const fridaySseOfflineQueue: FridaySseOfflineQueue;
