/** * @license * Copyright 2026 Steven Roussey * SPDX-License-Identifier: Apache-2.0 */ import { type ITabularMigrationApplier, type TabularMigrationOp } from "../migrations"; import { type AnyTabularStorage } from "./ITabularStorage"; /** * Applier for schemaless tabular backends (InMemory / Shared / FsFolder / * HuggingFace). DDL ops are no-ops because records are plain JS objects; * `backfill` runs through the storage's normal `getPage`/`put`/`delete` * API. Bookkeeping is held in the in-memory `applied` map by default; * subclasses (e.g. for FsFolder) may override `persist()` / `load()` to * make it durable. * * `tableExists` is a heuristic: returns true when the storage already * holds rows. Combined with the empty `applied` set, this makes a * brand-new InMemory storage take the orchestrator's fresh-DB fast path * (mark-all-applied without running ops); a storage that was rehydrated * from a dump will look like an existing-DB and have its migrations * actually run, matching dev/prod parity expectations. */ export declare class InMemoryTabularMigrationApplier implements ITabularMigrationApplier { protected readonly storage: AnyTabularStorage; protected readonly storeName: string; protected applied: Map>; constructor(storage: AnyTabularStorage, storeName: string); ensureBookkeeping(): Promise; appliedVersions(component: string): Promise>; tableExists(): Promise; markAllApplied(component: string, versions: ReadonlyArray<{ version: number; description: string | undefined; }>): Promise; applyMigration(component: string, version: number, _description: string | undefined, ops: ReadonlyArray, onProgress?: (fraction: number) => void): Promise; /** Subclasses (e.g. FsFolder) override to flush bookkeeping to disk. */ protected persist(): Promise; } //# sourceMappingURL=InMemoryTabularMigrationApplier.d.ts.map