import { type GitRunner } from './project.js';
import { type StoreFs } from './store/index.js';
/**
 * Install/activate a repo for The Framework (#391): create the `.the-framework/` marker and its
 * ignore file, committing pre-existing dirty changes first so the install commit is clean. Pure
 * core over the same {@link GitRunner} + {@link StoreFs} seams as project.ts.
 */
/** The outcome of {@link installProject}. Failures are values, never throws. */
export type InstallResult = {
    ok: true;
    alreadyActivated?: boolean;
    initialized?: boolean;
} | {
    ok: false;
    error: string;
};
/** Injectable seams for {@link installProject}. */
export interface InstallDeps {
    git?: GitRunner;
    fs?: StoreFs;
}
/**
 * Activate the repo at `cwd`: commit any pre-existing dirty changes, create `.the-framework/` with
 * its ignore file and layout marker (#1575), and commit the install. A repo whose ignore file is
 * already there is a no-op (`alreadyActivated`) — the ignore file is the activation marker.
 * Forgiving: any git/fs failure surfaces as `{ ok: false, error }`.
 */
export declare function installProject(cwd: string, deps?: InstallDeps): Promise<InstallResult>;
/** Minimal directory-listing seam so {@link enumerateGitRepos} is unit-testable. */
export interface DirLister {
    /** Absolute paths of the immediate subdirectories of `dir`. Missing/non-dir/error yields `[]`. */
    childDirs(dir: string): Promise<string[]>;
}
/**
 * A {@link DirLister} backed by `node:fs/promises`. The import is dynamic so
 * the module core stays free of a hard `node:fs` dependency, same convention
 * as {@link nodeStoreFs}; any error reads as `[]`.
 */
export declare function nodeDirLister(): DirLister;
/** Injectable seams for {@link enumerateGitRepos}. */
export interface EnumerateDeps {
    git?: GitRunner;
    dirs?: DirLister;
}
/**
 * The immediate child directories of `dir` that are their own git repo roots. A
 * child is a root when `git rev-parse --show-prefix` (the path from the repo root
 * down to the cwd) is empty; a subdir of an outer repo yields a non-empty prefix,
 * and a non-repo makes git error. This beats comparing `--show-toplevel` to the
 * child path, which breaks where the path crosses a symlink (e.g. macOS `/var` ->
 * `/private/var`). Returns the surviving paths, deduped and sorted; never throws.
 */
export declare function enumerateGitRepos(dir: string, deps?: EnumerateDeps): Promise<string[]>;
//# sourceMappingURL=install.d.ts.map