/**
 * Flatten a single-child directory into its parent.
 *
 * `shadcn init --template vite` scaffolds a new project into a child
 * folder named after the user's prompt response (even with `--yes`).
 * Our contract with `CreateApplicationUseCase` is that `package.json`
 * lives exactly at the resolved `repositoryPath` — so right after
 * `shadcn init` returns we move every file (including dotfiles) from
 * the single child directory up into `repositoryPath` and remove the
 * now-empty child.
 *
 * This is intentionally a standalone helper, not an agent-run bash
 * one-liner:
 *   - Bash `shopt -s dotglob; mv "$c"/* .` is fragile across shells
 *     and relies on the agent executing a prescribed command in the
 *     exact step where we asked for it. When it doesn't, every
 *     subsequent step pays the cost of fixing the layout.
 *   - Node `fs.renameSync` is deterministic, cross-platform, and runs
 *     synchronously inside our own code so we catch failures before
 *     persisting the Application row.
 *
 * The function is idempotent: if `repositoryPath` already contains a
 * `package.json` at the root (either because scaffolding succeeded
 * into `.` directly, or because the flatten has already run), it is
 * a no-op returning `false`. When it did flatten a child it returns
 * `true`, so callers can branch or log accordingly.
 *
 * @throws Error when the layout is ambiguous (no `package.json`
 *         anywhere, or more than one candidate child directory).
 */
export interface FlattenResult {
    /** True if a child directory was flattened, false if the layout was already flat. */
    readonly flattened: boolean;
    /** Name of the child directory that was flattened, if any. */
    readonly childName: string | null;
}
export declare function flattenSingleChildProject(repositoryPath: string): FlattenResult;
//# sourceMappingURL=flatten-subdirectory.d.ts.map