/**
 * Thin wrappers around git shell operations.
 * Extracted so tests can mock them without mocking the built-in child_process.
 */
export type PullResult = 'updated' | 'up-to-date' | 'diverged';
export type PushResult = 'pushed' | 'nothing-to-push' | 'rejected' | 'not-found';
export interface GitPullOptions {
    /** Basic Auth credentials for the embedded git server (injected via GIT_ASKPASS). */
    credentials?: {
        username: string;
        password: string;
    };
    /** Extra HTTP headers (e.g. `X-Studiograph-Include-Private: 1`). Each
     *  is passed via `git -c http.extraHeader=...`. Used for owner-gated
     *  admin escalation when pulling private folders. */
    extraHeaders?: string[];
}
/**
 * Pull the latest changes in a local git repo using fetch + fast-forward merge.
 * Returns 'updated', 'up-to-date', or 'diverged' (local has commits the remote doesn't).
 * Throws on hard errors (no remote, auth failure, fetch error, etc.).
 *
 * Fast-forward only: if the branches have diverged the caller should ask the
 * user to resolve manually with `git pull --rebase`.
 */
export declare function gitPull(repoPath: string, opts?: GitPullOptions): PullResult;
/**
 * Push local commits in a git repo to its remote.
 * Returns 'pushed', 'nothing-to-push', or 'rejected' (remote has newer commits).
 * Throws on hard errors (no remote, auth failure, etc.).
 */
export declare function gitPush(repoPath: string): PushResult;
/**
 * Check if a git repo has uncommitted changes (staged or unstaged).
 * Returns true if the working tree is dirty.
 */
export declare function gitHasUncommittedChanges(repoPath: string): boolean;
/**
 * Check if a directory is a git repository.
 */
export declare function isGitRepo(repoPath: string): boolean;
/**
 * Check if a git repo has a remote named "origin" configured.
 */
export declare function gitHasRemote(repoPath: string): boolean;
/**
 * Set or update the 'origin' remote URL on a local git repo.
 */
export declare function gitSetRemote(repoPath: string, url: string): void;
export interface GitPushOptions {
    /** Extra HTTP headers to send with the git request, e.g.
     *  `['X-Studiograph-Include-Private: 1']`. Each is passed via
     *  `git -c http.extraHeader=...`. Used for owner-gated admin
     *  escalation when pushing to private folders. */
    extraHeaders?: string[];
}
/**
 * Push local commits to origin with Basic Auth credentials via GIT_ASKPASS.
 * Used for pushing to the embedded git server.
 */
export declare function gitPushWithCredentials(repoPath: string, credentials: {
    username: string;
    password: string;
}, opts?: GitPushOptions): PushResult;
export interface GitCloneOptions {
    /** When true, suppress all output and disable interactive prompts (for server use). */
    silent?: boolean;
    /** Basic Auth credentials for the embedded git server. */
    credentials?: {
        username: string;
        password: string;
    };
    /** Extra HTTP headers (e.g. `X-Studiograph-Include-Private: 1`). Each
     *  is passed via `git -c http.extraHeader=...`. Used for owner-gated
     *  admin escalation when cloning private folders. */
    extraHeaders?: string[];
}
/**
 * Clone a remote repository to a local path.
 *
 * Automatically injects the stored GitHub PAT (from `studiograph auth` or
 * GITHUB_TOKEN env) via GIT_ASKPASS so Git never blocks on an interactive
 * credential prompt. If no token is available and `silent` is false (the
 * default), uses `stdio: 'inherit'` so Git's credential prompt can reach
 * the user's terminal.
 *
 * Throws if the git command fails.
 */
export declare function gitClone(remoteUrl: string, localPath: string, opts?: GitCloneOptions): void;
/**
 * Read a git config value.
 * Returns undefined if the key is not set.
 */
export declare function getGitConfig(key: string): string | undefined;
