import { type GitOperationLock } from "../../../../git-operation-lock.js";
import type { GitService } from "../../../../git-service/index.js";
/**
 * Minimal interface for the sync service dependency (used by pull operation).
 */
export interface GitPullSyncService {
    uploadDirectory(source: string): void;
}
/**
 * Service that handles the multi-step deploy pipeline:
 * prepare commit snapshot → sync to DBFS → build → poll → deploy.
 *
 * Each method maps to a discrete server/infrastructure call. The git tool
 * orchestrates them sequentially; failures at any stage abort the deploy.
 */
export interface GitDeployService {
    /** Create a git worktree at the given SHA and upload the snapshot to DBFS. */
    prepareMainCommit(sha: string): Promise<{
        directoryHash: string;
        sha: string;
    }>;
    /** Register the snapshot with the server, returning the internal commit ID. */
    syncMainToDbfs(directoryHash: string, sha: string): Promise<{
        commitId: string;
    }>;
    /** Kick off a SABS build for the given directory hash and commit. */
    createBuild(directoryHash: string, commitId: string): Promise<void>;
    /** Poll until the build reaches a terminal status (success, failed, or timed out). */
    pollBuildUntilComplete(directoryHash: string): Promise<{
        succeeded: boolean;
        error?: string;
    }>;
    /** Create a production deployment for the given commit. */
    deployCommit(commitId: string, deployMessage: string): Promise<void>;
}
export interface GitToolDeps {
    gitService?: GitService;
    syncService?: GitPullSyncService;
    gitOperationLock?: GitOperationLock;
    onDeploySuccess?: (commitId: string, gitSha?: string) => void;
    onGitOperationComplete?: () => void;
    onGitSetupRequired?: () => void | Promise<void>;
    applicationId?: string;
    deployService?: GitDeployService;
}
export declare const gitToolFactory: import("../types.js").ToolFactory<GitToolDeps, import("../types.js").Tool<{
    operation: "log" | "commit" | "pull" | "status" | "diff" | "create_pr" | "deploy" | "log_from_main" | "merge_abort" | "stage";
    message?: string | undefined;
    body?: string | undefined;
    paths?: string[] | undefined;
    title?: string | undefined;
    count?: number | undefined;
    staged?: boolean | undefined;
    sha?: string | undefined;
}, {
    aborted: true;
} | {
    commits: Array<{
        message: string;
        sha: string;
        url?: string;
    }>;
} | {
    diff: string;
} | {
    files: unknown[];
    ahead: number;
    behind: number;
} | {
    sha: string;
    pushed: true;
    url?: string;
} | {
    sha: string;
    pushed: false;
    error: string;
} | {
    staged: string[];
} | {
    prUrl: string;
    provider: "github";
} | {
    deployed: true;
    sha: string;
    commitId: string;
} | {
    setupRequired: boolean;
    readonly merged?: undefined;
    conflictedFiles?: undefined;
    readonly verificationRequired?: undefined;
    deployed?: undefined;
    sha?: undefined;
    stage?: undefined;
    readonly error?: undefined;
} | {
    merged: boolean;
    conflictedFiles: string[];
    setupRequired?: undefined;
    readonly verificationRequired?: undefined;
    deployed?: undefined;
    sha?: undefined;
    stage?: undefined;
    readonly error?: undefined;
} | {
    readonly merged: true;
    readonly verificationRequired: "Merge complete. You MUST now run build_debug and build_captureScreenshot to verify the app still works after this merge. If issues are found, fix them immediately.";
    setupRequired?: undefined;
    conflictedFiles?: undefined;
    deployed?: undefined;
    sha?: undefined;
    stage?: undefined;
    readonly error?: undefined;
} | {
    deployed: boolean;
    sha: string;
    stage: string;
    error: string;
    setupRequired?: undefined;
    readonly merged?: undefined;
    conflictedFiles?: undefined;
    readonly verificationRequired?: undefined;
}>>;
//# sourceMappingURL=git.d.ts.map