import type { CompactionEntry, Entry, EntryId } from "./session.js"; /** @experimental One bounded read over the exact entry log. */ export interface HistoryPageInput { readonly limit: number; /** Return entries strictly before this entry. Omitted reads the newest page. */ readonly before?: EntryId; /** Return entries strictly after this entry. */ readonly after?: EntryId; } /** * @experimental One page of exact Session entries plus the cursors that continue it. * * `entries` are in path order. `hasBefore` states whether older entries remain, which is how a * caller learns that history continues behind a compaction checkpoint rather than ending there. */ export interface HistoryPage { readonly entries: ReadonlyArray; readonly hasBefore: boolean; readonly hasAfter: boolean; readonly firstEntryId?: EntryId; readonly lastEntryId?: EntryId; /** * The cursors this page was asked for that the log does not hold. A cursor names no position, so * the page falls back to the end it would have bounded; saying which cursor was ignored is what * stops a caller reading the newest entries as though they preceded something. */ readonly unknownCursors?: ReadonlyArray; } /** * @experimental Purely page one root-to-leaf path over its exact entries. * * Paging reads the entry log, not the projection, so entries recorded before a compaction * checkpoint stay reachable. A checkpoint is an ordinary entry in the page, never a floor. */ export declare const pageHistory: { (input: HistoryPageInput): (path: ReadonlyArray) => HistoryPage; (path: ReadonlyArray, input: HistoryPageInput): HistoryPage; }; /** @experimental Every compaction checkpoint on one path, oldest first. */ export declare const compactionCheckpoints: (path: ReadonlyArray) => ReadonlyArray;