/** * The store-level minimum writer version (S2 ruling (c), T12343). * * A released binary older than S2 writes without frames; its captures are * sealed as singleton transactions flagged `unframed` (S3), never claimed * atomic. To bound that mixed-version window, turning capture on records * `min_writer_version` in `_sync_meta` (this build's version, never lowered). * Every build from S2 on checks it at open, before any write, and refuses to * write a store that requires a newer writer. Builds released before S2 do * not know the marker: that is the window the release notes name. * * @task T12343 * @module store/sync/writer-version */ import type { DatabaseSync } from 'node:sqlite'; /** `_sync_meta` key of the marker. */ export declare const MIN_WRITER_VERSION_KEY = "min_writer_version"; /** A writer older than the store's `min_writer_version`. */ export declare class StoreWriterTooOldError extends Error { readonly required: string; readonly actual: string; readonly code = "E_STORE_WRITER_TOO_OLD"; constructor(required: string, actual: string); } /** Compare two versions by their numeric parts; null when either is unparseable. */ export declare function compareWriterVersions(a: string, b: string): number | null; /** The store's marker, or undefined. Read-only. */ export declare function readMinWriterVersion(db: DatabaseSync): string | undefined; /** * Record `version` as the store's minimum writer version, unless the marker * already requires as much or more. Call inside the capture-on transaction. * * @returns Whether the marker changed. */ export declare function raiseMinWriterVersion(db: DatabaseSync, version?: string): boolean; /** * Refuse to write a store whose marker requires a newer writer. Call at open, * before any write. An unparseable version on either side never refuses. * * @throws {StoreWriterTooOldError} */ export declare function assertWriterVersion(db: DatabaseSync, version?: string): void; //# sourceMappingURL=writer-version.d.ts.map