/** * Commit-log pruning (SPEC.md §4.6) — normative retention floors. * * The horizon never advances past `min(active-client cursors)` (clients * whose cursor record was touched within the active window), except that * commits older than the age-force limit may be pruned regardless; at * least the newest `minRetainedCommits` commits are always retained. */ import { type SyncularServerEvents } from './events.js'; import type { ServerStorage } from './storage.js'; export interface RetentionPolicy { /** Active window for laggard cursors (default 14 days). */ readonly activeWindowMs: number; /** Force-advance past commits older than this (default 30 days). */ readonly ageForceMs: number; /** Always retain at least this many newest commits (default 1000). */ readonly minRetainedCommits: number; } export declare const DEFAULT_RETENTION: RetentionPolicy; export interface PruneOptions { readonly storage: ServerStorage; readonly partition: string; readonly nowMs: number; readonly retention?: Partial; /** Optional structured-events sink (`prune.completed`). */ readonly events?: SyncularServerEvents; } /** Advance the horizon per §4.6 and delete commits at or below it. */ export declare function pruneCommitLog(options: PruneOptions): Promise;