import { type StatusResult } from 'simple-git';
import type { HookDispatcher } from '../hooks/dispatcher.js';
/**
 * GitService — Wraps simple-git with hook emission on all mutating operations.
 *
 * Read-only operations (status, branch, log, diff, blame) do NOT emit hooks.
 * Mutating operations (commit, push, pull, merge, checkout, stash, worktreeAdd,
 * worktreeRemove) emit Pre:git:<op>, Post:git:<op>, and Fail:git:<op> events.
 */
export declare class GitService {
    private git;
    private hooks;
    private cwd;
    constructor(cwd: string, hooks?: HookDispatcher);
    private makeEvent;
    private firePre;
    private firePost;
    private fireFail;
    status(): Promise<StatusResult>;
    branch(): Promise<{
        current: string;
        all: string[];
        detached: boolean;
    }>;
    log(maxCount?: number): Promise<Array<{
        hash: string;
        date: string;
        message: string;
        author: string;
    }>>;
    diff(ref?: string): Promise<string>;
    /**
     * Get the diff for a single file, optionally from the staging area.
     * Read-only — no hooks emitted.
     */
    diffFile(filePath: string, staged: boolean): Promise<string>;
    /**
     * Get the full diff between two refs, optionally scoped to specific files.
     * Read-only — no hooks emitted.
     */
    diffBetween(before: string, after: string, files?: string[]): Promise<string>;
    /**
     * Get the --stat summary between two refs.
     * Read-only — no hooks emitted.
     */
    diffStat(before: string, after: string): Promise<string>;
    blame(filePath: string): Promise<Array<{
        hash: string;
        author: string;
        line: number;
        content: string;
    }>>;
    add(files: string | string[]): Promise<void>;
    addAll(): Promise<void>;
    reset(files?: string | string[]): Promise<void>;
    commit(message: string, options?: {
        amend?: boolean;
        noVerify?: boolean;
    }): Promise<{
        hash: string;
        summary: string;
    }>;
    checkout(branch: string, options?: {
        create?: boolean;
    }): Promise<void>;
    merge(branch: string): Promise<{
        success: boolean;
        conflicts?: string[];
    }>;
    push(remote?: string, branch?: string, options?: {
        force?: boolean;
    }): Promise<void>;
    pull(remote?: string, branch?: string): Promise<void>;
    stash(action?: 'push' | 'pop' | 'list' | 'drop', message?: string): Promise<string>;
    worktreeAdd(path: string, branch: string): Promise<void>;
    worktreeRemove(path: string): Promise<void>;
    worktreeList(): Promise<Array<{
        path: string;
        branch: string;
        head: string;
    }>>;
    /**
     * Initialize a new git repository at the given path using Bun.spawnSync.
     * Returns true on success, false on failure.
     */
    static initRepo(cwd: string): {
        success: boolean;
        error?: string;
    };
    /**
     * Return true if the given directory is inside a git repository.
     * Uses `git rev-parse --git-dir` which exits 0 only inside a repo.
     */
    static isGitRepo(cwd: string): boolean;
    static getRepoRoot(cwd: string): string | null;
    /** Return the working directory this instance is bound to. */
    getCwd(): string;
    /** Release resources tied to this git client instance. */
    dispose(): void;
}
//# sourceMappingURL=service.d.ts.map