import type { MigrationBlockConfig, MigrationConfig, MigrationProjectState } from './migration-types.js'; /** * Writes the initial migration README scaffolds for a project workspace. * * @param projectDir Project directory containing the migration workspace. * @param currentMigrationVersion Current migration version label used in README text. * @param blocks Optional block targets whose scoped READMEs should be scaffolded. * @returns Nothing. */ export declare function writeInitialMigrationScaffold(projectDir: string, currentMigrationVersion: string, blocks?: MigrationBlockConfig[]): void; /** * Guards a project directory against legacy semver-based migration workspaces. * * @param projectDir Absolute or relative project directory containing the migration workspace. * @returns Nothing. * @throws Error When legacy config keys or semver-named migration artifacts are detected. */ export declare function assertNoLegacySemverMigrationWorkspace(projectDir: string): void; /** * Loads the migration workspace state for a project directory. * * By default this loader may run the project's `sync-types` script when the * current manifest files are missing, because later migration commands depend * on those generated artifacts. Pass `allowSyncTypes: false` to keep the call * read-only and fail instead of mutating the workspace. * * When `allowMissingConfig` is enabled and the migration config file does not * exist yet, the loader synthesizes a minimal legacy-root config so bootstrap * flows can continue before the first config write. * * @param projectDir Absolute or relative project directory containing the migration workspace. * @param options Loader flags controlling config fallback and `sync-types` side effects. * @returns The resolved migration project state, including config, block targets, and helper paths. * @throws Error When the project is not migration-capable, required manifests remain missing, or generated files cannot be read. */ export declare function loadMigrationProject(projectDir: string, { allowMissingConfig, allowSyncTypes }?: { allowMissingConfig?: boolean; allowSyncTypes?: boolean; }): MigrationProjectState; /** * Writes the migration config source file for a project workspace. * * @param projectDir Project directory containing the migration workspace. * @param config Parsed or synthesized migration config to serialize. * @returns Nothing. */ export declare function writeMigrationConfig(projectDir: string, config: MigrationConfig): void;