/**
 * Outcome of one registration attempt.
 *
 * `skipped` and `failed` are deliberately distinct: a directory that is not a
 * git repository is a benign, expected non-event, while a git-config write that
 * genuinely failed must not be reported as success — an operator who ran
 * `lisa install-merge-driver` and saw exit 0 would believe the ledger is
 * protected when it is not.
 */
export interface MergeDriverInstallResult {
    /** Registered now, already correct, benignly inapplicable, or a real failure. */
    readonly kind: "installed" | "unchanged" | "skipped" | "failed";
    /** Single-line, operator-facing explanation. */
    readonly detail: string;
}
/** Injectable collaborators for {@link installLearningsMergeDriver}. */
export interface MergeDriverInstallDependencies {
    /**
     * How to invoke the Lisa CLI. Defaults to this process's own runtime and
     * entry script, which is what makes the registration self-locating: whichever
     * Lisa is running the install is the Lisa the driver will call.
     */
    readonly invocation?: string;
}
/**
 * Whether this directory is a git working tree the driver can be registered in.
 *
 * Strictly read-only, so callers that must not mutate — a migration's
 * `applies()` check and its dry-run path — can ask the question without
 * writing anything.
 * @param projectRoot - Project directory to inspect
 * @returns True when the directory is inside a git working tree
 */
export declare function canInstallLearningsMergeDriver(projectRoot: string): Promise<boolean>;
/**
 * Registration state of the driver command for one checkout.
 *
 * `unregistered` is the state this whole module exists to make visible: the
 * `.gitattributes` mapping is committed, so every clone believes the ledger is
 * union-merged, while the command that performs the union lives only in local
 * git config. A clone that never ran apply is degraded, not broken — and says
 * nothing about it.
 */
export type MergeDriverRegistration = "registered" | "unregistered" | "not-a-repository" | "git-unavailable";
/**
 * Report whether the driver command is registered for this checkout.
 *
 * Read-only, and deliberately scope-agnostic: registration is written to local
 * config, but git resolves a merge driver from any config scope, so a global
 * registration counts. Asking with `--local` would report a working driver as
 * missing.
 * @param projectRoot - Project directory to inspect
 * @returns Closed registration state
 */
export declare function probeLearningsMergeDriverRegistration(projectRoot: string): Promise<MergeDriverRegistration>;
/**
 * Report whether git resolves one path's `merge` attribute to this driver.
 *
 * Asks git rather than parsing `.gitattributes`, because the answer depends on
 * pattern precedence and on every attributes source git consults (the working
 * tree file, `.git/info/attributes`, a configured `core.attributesFile`).
 * Reading the root file alone would claim a mapping the repository may not
 * actually have — or miss one it does.
 * @param projectRoot - Project directory to inspect
 * @param ledgerPath - Project-relative path to the learnings ledger
 * @returns True when the path is mapped to the learnings merge driver
 */
export declare function isLearningsPathMappedToDriver(projectRoot: string, ledgerPath: string): Promise<boolean>;
/**
 * Register the union merge driver in one project's local git config.
 *
 * Idempotent and safe outside a git repository: a non-repository directory is
 * skipped rather than failing an apply.
 * @param projectRoot - Project directory to register the driver in
 * @param dependencies - Injectable collaborators for tests
 * @returns Structured registration outcome
 */
export declare function installLearningsMergeDriver(projectRoot: string, dependencies?: MergeDriverInstallDependencies): Promise<MergeDriverInstallResult>;
//# sourceMappingURL=learnings-merge-driver-install.d.ts.map