import type { Logger, WorkflowTools } from '@polka-codes/core';
export interface FileChange {
    path: string;
    status: string;
    insertions?: number;
    deletions?: number;
}
/**
 * GitOperations provides a high-level interface for common git operations
 * used across workflows. It centralizes git command execution and parsing logic.
 */
export declare class GitOperations {
    private tools;
    constructor(tools: WorkflowTools<any>);
    /**
     * Get file changes for a git range (commit, branch, or PR reference)
     */
    getFileChanges(range?: string): Promise<FileChange[]>;
    /**
     * Get file changes for a pull request
     */
    getPullRequestChanges(prNumber: number): Promise<{
        files: FileChange[];
        baseRefOid: string;
    }>;
    /**
     * Get staged and unstaged file changes
     */
    getLocalChanges(): Promise<{
        staged: FileChange[];
        unstaged: FileChange[];
    }>;
    /**
     * Get the current branch name
     */
    getCurrentBranch(): Promise<string>;
    /**
     * Get the default branch name
     */
    getDefaultBranch(): Promise<string>;
    /**
     * Check if there are uncommitted changes
     */
    hasUncommittedChanges(): Promise<boolean>;
    /**
     * Checkout a branch
     */
    checkoutBranch(branchName: string): Promise<void>;
    /**
     * Create and checkout a new branch
     */
    createAndCheckoutBranch(branchName: string): Promise<void>;
    /**
     * Get commit messages for a range
     */
    getCommitMessages(range: string): Promise<string>;
    /**
     * Parse git diff --name-status output
     */
    private parseNameStatus;
    /**
     * Enrich files with numstats (insertions/deletions)
     */
    private enrichWithNumStats;
    /**
     * Get numstats for specific git args
     */
    private getNumStats;
    /**
     * Parse git diff --numstat output
     */
    private parseNumStat;
    /**
     * Parse git status --porcelain output
     */
    private parseStatus;
    /**
     * Remove git quoting from path
     */
    private unquotePath;
}
/**
 * Helper function to print file changes (for backward compatibility)
 */
export declare function printChangedFiles(logger: Logger, changedFiles: FileChange[]): void;
//# sourceMappingURL=git-operations.d.ts.map