import type { ConfigV2 } from "./types.js"; export interface ConfigV2Snapshot { readonly generation: number; readonly savedAt?: string; readonly config: ConfigV2; readonly source: "active" | "migrated" | "history"; } export interface ConfigV2LoadResult { readonly status: "missing" | "valid" | "migrated" | "corrupt"; readonly snapshot?: ConfigV2Snapshot; readonly repairRequired: boolean; readonly diagnostics: readonly string[]; } export interface ConfigV2MutationResult { readonly changed: boolean; readonly generation: number; readonly previousGeneration?: number; readonly historyPath?: string; } /** * V2 persistence boundary. Legacy ConfigStore remains available for V1 * callers; this store migrates an existing V1 config in memory and writes V2 * only after an explicit V2 save/update. */ export declare class ConfigV2Store { private readonly root; private readonly activeFile; private queue; constructor(options: { readonly root: string; readonly activeFile?: string; }); load(): Promise; initialize(config: ConfigV2): Promise; save(config: ConfigV2, options?: { readonly expectedGeneration?: number; }): Promise; update(mutator: (draft: ConfigV2) => ConfigV2 | void | Promise): Promise; restore(generation: number, options?: { readonly expectedGeneration?: number; }): Promise; private enqueue; private loadUnlocked; private parseLoaded; private readActive; private commit; private readHistory; private pruneHistory; private snapshot; private assertExpected; private isStoredV2; private isStoredV1; } /** Billing/profile-focused name for callers that do not need the schema term. */ export declare const BillingProfileStore: typeof ConfigV2Store;