/**
 * `search_meta` row — pure logic only.
 *
 * Serialization lives here; FlexSearch on-disk persistence is in
 * `flex-store.ts`. Keeping this module free of storage imports lets us
 * unit-test rebuild decisions without any I/O.
 *
 * See docs/design/portable-search.md §8 for how mismatch detection
 * drives the auto-rebuild path.
 */
export interface MetaRow {
    /** Search engine identifier (e.g. "flexsearch"). */
    engine: string;
    /** Engine version string — any change triggers a rebuild. */
    engineVersion: string;
    schemaVersion: number;
    contentPolicyVersion: number;
    /** Milliseconds since epoch. */
    createdAt: number;
}
/** Wire-format used for on-disk persistence (snake_case). */
export interface MetaRowPersisted {
    engine: string;
    engine_version: string;
    schema_version: number;
    content_policy_version: number;
    created_at: number;
}
/**
 * Returns true iff the stored meta is missing, malformed, or disagrees
 * with the current runtime on any invariant that requires a full
 * rebuild: engine, engine version, schema version, content-policy
 * version.
 */
export declare function needsRebuild(stored: MetaRow | null | undefined, current: MetaRow): boolean;
/**
 * Build the current runtime meta row from the active engine + policy
 * constants. Centralised so callers never hand-roll a partial MetaRow.
 */
export declare function buildCurrentMeta(params: {
    engine: string;
    engineVersion: string;
    contentPolicyVersion: number;
    createdAt?: number;
}): MetaRow;
export declare function readMeta(row: MetaRowPersisted | null | undefined): MetaRow | null;
export declare function writeMeta(meta: MetaRow): MetaRowPersisted;
//# sourceMappingURL=meta.d.ts.map