/** * Append-only JSONL store backing the trace upload WAL. */ import { WalRecord } from './types'; /** * Promise-chained queue that serializes async tasks one at a time. */ declare class SerialQueue { private tail; run(fn: () => Promise): Promise; } export declare const queueWriter: SerialQueue; export declare function ensureParentDir(filePath: string): Promise; /** * Append a pending trace upload to the WAL. */ export declare function appendRecord(record: WalRecord): Promise; /** * Append a tombstone for `id` to the WAL. Logically shadows any earlier * `{type:"append"}` line for the same id. */ export declare function appendTombstone(id: string): Promise; /** * Append `record` to the dead-letter file (`failed.log.`). */ export declare function appendDeadLetter(record: WalRecord): Promise; /** * Replay `queue.log` and return the set of records still considered pending. */ export declare function readPending(): Promise; /** * Rewrite `queue.log` to contain only currently-live records. */ export declare function compact(): Promise; /** * Size of `queue.log` in bytes, or 0 if the file does not exist. * Used by the daemon's idle-shutdown heuristic. */ export declare function walSize(): Promise; export {};