/**
 * Main entry. Wrapped in a file lock keyed on
 * `.aperant/config.lock-upgrade-layout` so concurrent callers serialize.
 *
 * @param {string} projectRoot
 * @param {{ dryRun?: boolean }} [opts]
 * @returns {{
 *   status: 'ok' | 'noop' | 'conflict',
 *   dryRun: boolean,
 *   moves: Array<{from: string, to: string, ok: boolean, error?: string}>,
 *   removedDirs: string[],
 *   conflicts: Array<{kind: string, path: string, detail?: string}>,
 *   collisions: string[],
 *   gitignoreResult: object | null,
 *   message: string,
 * }}
 */
export function runLayoutUpgrade(projectRoot: string, opts?: {
    dryRun?: boolean;
}): {
    status: "ok" | "noop" | "conflict";
    dryRun: boolean;
    moves: Array<{
        from: string;
        to: string;
        ok: boolean;
        error?: string;
    }>;
    removedDirs: string[];
    conflicts: Array<{
        kind: string;
        path: string;
        detail?: string;
    }>;
    collisions: string[];
    gitignoreResult: object | null;
    message: string;
};
/**
 * CLI entry wrapper mirroring cmdConfigUpgradeGitignore's shape.
 */
export function cmdConfigUpgradeLayout(projectDir: any, extraArgs?: any[]): import("../util/result.mjs").CommandResult;
/**
 * List plain files at the top level of `dir`. Returns [] if the directory
 * does not exist. Ignores subdirectories (they may be the new-shape
 * children we are migrating INTO).
 */
declare function listTopLevelFiles(dir: any): string[];
/**
 * Plan the migration without touching the disk. Pure function — returns the
 * set of moves, directory removals, and any conflicts detected up front.
 *
 * @returns {{
 *   moves: Array<{from: string, to: string, reason: string}>,
 *   removeDirs: string[],
 *   conflicts: Array<{kind: string, path: string, detail?: string}>,
 *   collisions: string[],
 * }}
 */
declare function planMigration(aperantDir: any): {
    moves: Array<{
        from: string;
        to: string;
        reason: string;
    }>;
    removeDirs: string[];
    conflicts: Array<{
        kind: string;
        path: string;
        detail?: string;
    }>;
    collisions: string[];
};
export { listTopLevelFiles as _listTopLevelFilesForTests, planMigration as _planMigrationForTests };
//# sourceMappingURL=upgrade-layout.d.mts.map