import type { GitFailureReason, GitRepoIdentity } from './git-types.js';
export interface GitExecutorOptions {
    timeoutMs?: number;
    maxBuffer?: number;
}
export interface RunGitOptions extends GitExecutorOptions {
    cwd?: string;
}
export interface GitCommandResult {
    stdout: string;
    stderr: string;
}
export declare class GitCommandError extends Error {
    readonly reason: GitFailureReason;
    readonly stdout: string;
    readonly stderr: string;
    readonly exitCode?: number | string;
    readonly signal?: NodeJS.Signals | string;
    readonly argv?: string[];
    readonly cwd?: string;
    constructor(reason: GitFailureReason, message: string, details?: {
        stdout?: unknown;
        stderr?: unknown;
        exitCode?: number | string;
        signal?: NodeJS.Signals | string;
        argv?: readonly string[];
        cwd?: string;
        cause?: unknown;
    });
}
export declare function resolveGitRepository(workspace: string, options?: GitExecutorOptions): Promise<GitRepoIdentity>;
export declare function runGit(repoOrWorkspace: GitRepoIdentity | string, argv: readonly string[], options?: RunGitOptions): Promise<GitCommandResult>;
export declare function normalizeGitOutput(value: unknown): string;
export declare function isPathInside(parent: string, child: string): boolean;
