import type { Checkpoint, EditSession, UpdateMeta } from '../types.js'; /** The gap that ends an edit session. Five minutes, per `04-crdt-and-history.md`. */ export declare const DEFAULT_SESSION_GAP_MS = 300000; /** * Group op-log rows into sessions: same actor, gap under `gap_ms`, and no * checkpoint between them. * * Sessions are **derived at read time and never stored**. That is a deliberate * design choice rather than a shortcut: the grouping gap is a UI tuning knob, * and storing the grouping would turn "make sessions 3 minutes instead of 5" * into a data migration over every document that ever existed. * * The input is metadata only — the caller reads `seq, actor, frontier, * byte_size, created_at` with `LENGTH(update_blob)` computed in SQLite — so * listing a document's whole history never pulls an update blob into the * isolate. That is what makes the history rail cheap enough to open on every * document. */ export declare function deriveSessions(updates: readonly UpdateMeta[], checkpoints: readonly Checkpoint[], gap_ms?: number): EditSession[]; //# sourceMappingURL=sessions.d.ts.map