export declare const gitRouter: import("express-serve-static-core").Router; export declare function resolveGitCommandTimeoutMs(): number; interface GitRepositoryContext { workspacePath: string; repositoryRootPath: string | null; hasRepository: boolean; isGitRepo: boolean; usingParentGitRepo: boolean; relativeWorkspacePath: string; } export declare function assertGitWorkspacePathAccessible(workspacePath: string): Promise; interface GitStashItem { ref: string; stashName?: string; message: string; branch: string; createdAt: string | null; } type GitDiffFileStatus = 'modified' | 'added' | 'deleted' | 'renamed'; interface GitDiffSummaryFile { path: string; status: GitDiffFileStatus; additions: number; deletions: number; staged: boolean; } export interface GitBranchItem { name: string; ref: string; hash: string; isCurrent: boolean; isRemote: boolean; upstream: string; } export declare function shouldIncludeGitDiffSummaryFile(status: GitDiffFileStatus, additions: number, deletions: number, isBinaryDiff: boolean): boolean; export declare function isGitStashMissingInitialCommitError(output: string): boolean; export declare function createMissingInitialCommitSnapshotError(): string; export declare function isGitStashNoChangesOutput(output: string): boolean; interface LatestGitStash { ref: string; stashName: string; message: string; } export declare function createAgentsWorkStashSnapshotRef(stashRef: string): string | null; export declare function parseGitStashListLine(line: string): GitStashItem | null; export declare function parseLatestGitStash(output: string): LatestGitStash | null; export declare function resolveGitPushTimeoutMs(): number; export declare function persistAgentsWorkStashSnapshotRef(workspacePath: string, stashRef: string): Promise; export declare function parseGitStatusStagedPaths(output: string): Set; export declare function parseGitDiffSummary(nameStatusOutput: string, numstatOutput: string, stagedPaths?: Set, forceStaged?: boolean): GitDiffSummaryFile[]; export declare function parseGitStatusUntrackedPaths(output: string): string[]; export declare function countUntrackedFileAdditions(content: string): number; export declare function collectUntrackedFiles(repoRootPath: string, untrackedPaths: string[], existingFilePaths: Set, maxDepth?: number): Promise; export declare function mergeGitDiffSummaryFiles(unstagedFiles: GitDiffSummaryFile[], stagedFiles: GitDiffSummaryFile[]): GitDiffSummaryFile[]; export declare function normalizeGitCommitMessage(message: unknown): string; export declare function createScopedGitPathspecArgs(context: Pick): string[]; export declare function createScopedFilePathspecArgs(filePath: string, context: Pick): string[]; export declare function resolveRemoteCommitHashes(repoRootPath: string): Promise>; export declare function resolveCurrentBranchName(repoRootPath: string): Promise; export declare function listGitBranches(repoRootPath: string): Promise; export declare function buildCommitDiffBaseArgs(commitHash: string, aggregate: boolean): string[]; export interface GitPushResult { branch: string; pushed: boolean; message: string; output: string; } export declare function pushBranchToRemote(repoRootPath: string): Promise; export interface GitStashSnapshotResult { stashRef: string | null; stashName: string | null; noChanges: boolean; reusedLatestStash: boolean; message: string; } export declare function createGitStashSnapshot(workspacePath: string, message?: string): Promise; export interface GitCommitOutcome { committedPaths: string[]; output: string; } export declare function commitSelectedFiles(repoRootPath: string, message: string, pathspecs: string[]): Promise; export type GitResetMode = 'soft' | 'hard'; export interface GitResetPreview { mode: GitResetMode; commitHash: string; branch: string; resetCount: number; hasLocalChanges: boolean; affectsRemote: boolean; } export declare function previewRepositoryReset(repoRootPath: string, commitHash: string, mode: GitResetMode): Promise; export declare function resetRepositoryTo(repoRootPath: string, commitHash: string, mode: GitResetMode, cleanScopePath?: string): Promise; export declare function sanitizeCommitMessage(raw: string): string; export declare function extractOpenAiStreamDelta(chunkText: string): string; export declare function debugAiStreamChunk(chunkText: string, index: number): void; export declare function callAiForCommitMessage(aiBaseUrl: string, aiApiKey: string, aiModel: string, diffContent: string): Promise; export declare function streamAiForCommitMessage(aiBaseUrl: string, aiApiKey: string, aiModel: string, diffContent: string, onDelta: (delta: string, accumulated: string) => void, abortSignal?: AbortSignal): Promise; export {};