/**
 * Options for running git commands
 */
export interface GitOptions {
    /** Working directory for the command */
    cwd?: string;
    /** Timeout in milliseconds (default: 30000 for most commands) */
    timeout?: number;
    /** Extra environment variables to pass to the git subprocess */
    env?: Record<string, string>;
}
/**
 * Result from a git command
 */
export interface GitResult {
    /** Standard output */
    stdout: string;
    /** Standard error */
    stderr: string;
    /** Exit code */
    exitCode: number;
}
/**
 * Error thrown when a git command fails
 */
export declare class GitError extends Error {
    readonly command: string;
    readonly args: string[];
    readonly stderr: string;
    readonly stdout: string;
    readonly exitCode: number | null;
    readonly timedOut: boolean;
    constructor(command: string, args: string[], stderr: string, stdout: string, exitCode: number | null, timedOut: boolean);
}
/**
 * Run a git command with non-interactive settings
 *
 * This function:
 * - Sets GIT_TERMINAL_PROMPT=0 to prevent credential prompts from hanging
 * - Applies a timeout to prevent indefinite hangs
 * - Bubbles up errors with the actual git output
 *
 * @example
 * const { stdout } = await runGit(['status', '--porcelain'], { cwd: '/path/to/repo' });
 *
 * @example
 * try {
 *   await runGit(['commit', '-m', 'message'], { cwd });
 * } catch (error) {
 *   if (error instanceof GitError) {
 *     console.error('Git failed:', error.message);
 *   }
 * }
 */
export declare function runGit(args: string[], options?: GitOptions): Promise<GitResult>;
/**
 * Format a GitError for display to the user
 *
 * Returns a user-friendly error message with the git output.
 */
export declare function formatGitError(error: GitError): string;
/**
 * Install a pre-push hook that blocks direct git push.
 *
 * The hook allows pushes only when the GUILD_AGENT_SAVE env var is set,
 * which guild agent save sets automatically.
 */
export declare function installPrePushHook(targetDir: string): Promise<void>;
//# sourceMappingURL=git.d.ts.map