export type GitRunResult = {
    ok: true;
    stdout: string;
} | {
    ok: false;
    error: string;
};
export declare function runGit(workspacePath: string, args: string[]): GitRunResult;
export declare function isGitRepo(workspacePath: string): boolean;
export declare function getHeadSha(workspacePath: string): GitRunResult & {
    sha?: string;
};
/**
 * Paths from `git status --porcelain=v1` (staged + unstaged + untracked), repo-relative.
 */
export declare function readWorkingTreeManifest(workspacePath: string): GitRunResult & {
    paths?: string[];
};
export declare function isWorkingTreeClean(workspacePath: string): boolean;
/**
 * Like {@link isWorkingTreeClean} but ignores `.workspace-kit/` paths so kit SQLite/WAL under the
 * repo root does not block stash/rewind decisions (those files should be gitignored in real repos).
 */
export declare function isWorkingTreeCleanIgnoringWorkspaceKit(workspacePath: string): boolean;
export declare function createStash(workspacePath: string, message: string): GitRunResult & {
    stashSha?: string;
};
export declare function diffNameStatus(workspacePath: string, fromRef: string, toRef: string): GitRunResult;
export declare function readGitSubmodulePaths(workspacePath: string): string[];
/** Returns a short reason string when manifest must block rewind, else null. */
export declare function rewindBlockedByManifest(manifest: string[], workspacePath: string): string | null;
export declare function applyStashSha(workspacePath: string, stashSha: string): GitRunResult;
export declare function resetHard(workspacePath: string, commitSha: string): GitRunResult;
