import type { GitFailureReason, GitRepoIdentity } from './git-types.js';
/**
 * Timeout for status-collection git commands (status/log/submodule/stash/fetch).
 * The default 5s is fine for porcelain status, but on Windows the `git` subprocess
 * spawn itself is pathologically slow (measured: `submodule status` ~3.5s, cold
 * `log -1` ~4.2s) and overlaps with refreshUpstream fetches — a single command
 * routinely exceeds 5s, which previously collapsed the whole status to all-null and
 * dropped the node from the mesh graph. Give the collection path a much larger
 * budget so a slow-but-healthy repo never reads as "not a git repo". Windows gets a
 * larger budget than POSIX because the spawn cost is OS-specific, not repo-specific.
 */
export declare const GIT_STATUS_TIMEOUT_MS: number;
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;
