import type { MigrationBlockConfig, MigrationConfig, ResolvedMigrationBlockTarget } from './migration-types.js'; /** * Describes the migration retrofit layout discovered in a project directory. * * Multi-block discovery wins when block targets are discovered under * `src/blocks//block.json`. * Otherwise the runtime falls back to a supported single-block layout. */ export type DiscoveredMigrationLayout = { block: MigrationBlockConfig; mode: 'single'; } | { blocks: MigrationBlockConfig[]; mode: 'multi'; }; /** * Synthesizes the implicit legacy migration block target for single-block projects. * * @param projectDir Project directory that may contain a legacy root migration layout. * @param blockName Optional configured block name used to prefer a matching legacy root target. * @returns The discovered single-block migration target keyed as `default`. */ export declare function createImplicitLegacyBlock(projectDir: string, blockName?: string): MigrationBlockConfig; /** * Verifies that a project directory contains the files required for migration tooling. * * @param projectDir Project directory to validate. * @param blocks Optional block targets to validate directly instead of auto-discovering them. * @returns Nothing. * @throws Error When any required project file is missing. */ export declare function ensureAdvancedMigrationProject(projectDir: string, blocks?: MigrationBlockConfig[]): void; /** * Detects the supported migration retrofit layout for `migrate init`. * * Multi-block targets under `src/blocks/` take precedence over * single-block layouts. * Returns the detected layout on success and throws an actionable error when no * supported first-party layout can be inferred. * * @param projectDir Project directory to inspect. * @returns The discovered migration layout. * @throws Error When no supported layout can be inferred. */ export declare function discoverMigrationInitLayout(projectDir: string): DiscoveredMigrationLayout; /** * Resolves the configured migration block targets and their current artifacts. * * @param projectDir Project directory containing the migration workspace. * @param config Parsed migration configuration. * @returns The resolved block targets, including current block.json and manifest documents. */ export declare function resolveMigrationBlocks(projectDir: string, config: MigrationConfig): ResolvedMigrationBlockTarget[]; /** * Returns the discovered block name for a supported single-block project. * * Uses `discoverSingleBlockTarget(projectDir)` internally and throws when the * project directory does not resolve to a supported single-block migration * layout. */ export declare function readProjectBlockName(projectDir: string): string;