/**
 * Project resolution helper for the project-rail provide-remote skill
 * (see design.md → Component Design → `oat-project-review-provide-remote`).
 *
 * Locates the OAT project on machine B by scanning the PR diff for
 * `state.md` files two levels deep under `.oat/projects/` (scope/project). An
 * explicit `--project <path>` override takes precedence over the scan and is
 * validated to resolve to a directory containing `state.md`.
 *
 * The result is a discriminated union mirroring {@link NarrowingResult}'s
 * pattern so callers branch on `kind`.
 */
export interface ResolvedProject {
    kind: 'resolved';
    /** Project directory path (no trailing slash, no `state.md` suffix). */
    projectPath: string;
}
export interface AmbiguousProject {
    kind: 'ambiguous';
    /** Sorted, de-duplicated candidate project directory paths. */
    candidates: string[];
}
export interface ProjectNotFound {
    kind: 'not-found';
}
export interface InvalidOverride {
    kind: 'invalid-override';
    overridePath: string;
    message: string;
}
export type ResolveResult = ResolvedProject | AmbiguousProject | ProjectNotFound | InvalidOverride;
export interface ResolveOptions {
    /** Explicit `--project <path>` override; takes precedence over diff scan. */
    overridePath?: string;
    /**
     * Existence probe for `state.md`. Injected so tests avoid the real
     * filesystem. Receives a candidate `state.md` path.
     */
    pathExists?: (path: string) => boolean;
}
/**
 * Resolve the target OAT project from a PR's changed-file list, honoring an
 * explicit override.
 */
export declare function resolveProject(diffFiles: string[], options?: ResolveOptions): ResolveResult;
//# sourceMappingURL=project-resolver.d.ts.map