/** * Local state migration framework for ForgeOS CLI. * * Tracks schema version in `.forgeos/state/_schema_version` and applies * sequential migrations when users upgrade the CLI. Each migration is * idempotent - safe to re-run if interrupted. */ export interface Migration { version: number; description: string; migrate: (projectRoot: string) => void; } /** Current schema version. Bump when adding a new migration. */ export declare const CURRENT_SCHEMA_VERSION = 1; /** * Ordered list of migrations. Version 1 is the baseline (no transform). * Future: { version: 2, description: "Add X to pipelines", migrate: (root) => { ... } } */ export declare const MIGRATIONS: Migration[]; /** Read schema version. Returns 0 if file doesn't exist (pre-migration state). */ export declare function readSchemaVersion(projectRoot: string): number; /** Write schema version to `.forgeos/state/_schema_version`. */ export declare function writeSchemaVersion(projectRoot: string, version: number): void; /** Check if migrations are needed without running them. */ export declare function migrationsPending(projectRoot: string): boolean; /** Return pending migrations (version > current), sorted ascending. */ export declare function pendingMigrations(projectRoot: string): Migration[]; /** * Run all pending migrations to CURRENT_SCHEMA_VERSION. * Returns list of applied migration descriptions. * On failure, throws with the failing version; prior migrations are committed. */ export declare function runMigrations(projectRoot: string): string[]; //# sourceMappingURL=migrations.d.ts.map