/** * Schema-fence document. Vault-level generation counter + drain * state, stored at `_meta/schema-fence` using the plaintext-envelope * pattern of `_meta/policy` (no PII — a counter + a state enum). */ import type { NoydbStore } from '../../kernel/types.js'; export type FenceState = 'normal' | 'draining' | 'migrating' | 'complete'; export interface FenceDoc { readonly currentSchemaVersion: number; readonly fenceState: FenceState; } export declare const FENCE_RECORD_ID = "schema-fence"; export declare const DEFAULT_FENCE: FenceDoc; export declare function loadFence(store: NoydbStore, vault: string): Promise; export declare function saveFence(store: NoydbStore, vault: string, fence: FenceDoc): Promise;