import { ToolResult } from "../types/index.js";
export interface GitStatus {
    staged: string[];
    unstaged: string[];
    untracked: string[];
    branch: string;
    ahead: number;
    behind: number;
}
export interface CommitOptions {
    message?: string;
    autoGenerate?: boolean;
    push?: boolean;
    addAll?: boolean;
}
export interface BlameLine {
    lineNumber: number;
    commitHash: string;
    author: string;
    date: string;
    content: string;
}
export interface BlameOptions {
    startLine?: number;
    endLine?: number;
}
export interface CherryPickOptions {
    noCommit?: boolean;
}
export declare class GitTool {
    private confirmationService;
    private cwd;
    constructor(cwd?: string);
    /**
     * Execute git command safely with array arguments
     * @param args - Array of command arguments (NOT a single string)
     */
    private execGit;
    isGitRepo(): Promise<boolean>;
    getStatus(): Promise<GitStatus>;
    getDiff(staged?: boolean): Promise<string>;
    getLog(count?: number): Promise<string>;
    add(files: string[] | "all"): Promise<ToolResult>;
    commit(message: string): Promise<ToolResult>;
    push(setUpstream?: boolean): Promise<ToolResult>;
    pull(): Promise<ToolResult>;
    autoCommit(options?: CommitOptions): Promise<ToolResult>;
    private generateCommitMessage;
    stash(message?: string): Promise<ToolResult>;
    stashPop(): Promise<ToolResult>;
    checkout(branchOrFile: string, create?: boolean): Promise<ToolResult>;
    branch(name?: string, delete_?: boolean): Promise<ToolResult>;
    /**
     * Run git blame on a file and return structured output
     * @param filePath - Path to the file to blame
     * @param options - Optional line range filtering
     */
    blame(filePath: string, options?: BlameOptions): Promise<ToolResult>;
    /**
     * Parse git blame --porcelain output into structured BlameLine objects
     */
    private parseBlameOutput;
    /**
     * Cherry-pick a commit into the current branch
     * @param commitHash - The commit hash to cherry-pick
     * @param options - Cherry-pick options
     */
    cherryPick(commitHash: string, options?: CherryPickOptions): Promise<ToolResult>;
    /**
     * Start a git bisect session
     * @param badRef - The known bad commit (defaults to HEAD)
     * @param goodRef - The known good commit
     */
    bisectStart(badRef?: string, goodRef?: string): Promise<ToolResult>;
    /**
     * Mark the current bisect commit as good, bad, or skip
     * @param result - The test result for the current commit
     */
    bisectStep(result: 'good' | 'bad' | 'skip'): Promise<ToolResult>;
    /**
     * Reset/end the bisect session
     */
    bisectReset(): Promise<ToolResult>;
    formatStatus(status: GitStatus): string;
}
export declare function getGitTool(cwd?: string): GitTool;
