/** * Decode-window census for full-pass journal planning. * * Packed columns stay resident. Planners decode at most * {@link JOURNAL_DECODE_WINDOW} `JournalEntry` objects before dropping the * window (a cooperative checkpoint is a valid drop point). The stderr metric * reports the current window and the peak since the last emit. */ import type { JournalEntry } from "./types.js"; /** Ceiling: a full-pass planner must drop its decoded window at this many rows. */ export declare const JOURNAL_DECODE_WINDOW = 10000; /** @deprecated Alias of {@link JOURNAL_DECODE_WINDOW}; kept for census callers. */ export declare const JOURNAL_CACHE_MAX_ROWS = 10000; export interface JournalCacheMetric { type: "journal-cache"; rowsInFlight: number; peakRowsInFlight: number; heapUsedMb: number; maxRows: number; } /** Full-pass heap cap may lower this for the rest of a chore; otherwise the ceiling. */ export declare function activeJournalDecodeWindow(): number; export declare function setActiveJournalDecodeWindow(size: number): void; export declare function journalCacheMetric(): JournalCacheMetric; /** Existing stderr JSON channel: one line, no secrets, numeric decode-window census. */ export declare function emitJournalCacheMetric(write?: (line: string) => void): void; export declare function noteJournalDecoded(count?: number): void; export declare function dropJournalDecodeWindow(): void; export declare function resetJournalDecodeWindowForTest(): void; export declare function journalFingerprintMatchesStat(fingerprint: JournalEntry | { hash: string; size: number; mtimeMs?: number; ctimeMs?: number; kind?: "file" | "symlink"; localDiverges?: boolean; removedAt?: string; localDeleteIntent?: unknown; } | undefined, lstat: { isFile(): boolean; size: number; mtimeMs: number; ctimeMs: number; }): boolean; //# sourceMappingURL=journal-decode-window.d.ts.map