export interface GitRunResult { code: number; stdout: string; stderr: string; stdoutRaw?: Uint8Array; stderrRaw?: Uint8Array; stdoutTruncated?: boolean; stderrTruncated?: boolean; } export interface GitRunRawResult extends GitRunResult { stdoutRaw: Uint8Array; stderrRaw: Uint8Array; } export type GitRunPolicyKind = "read-only" | "local-mutation" | "remote-observation"; export interface GitRunPolicy { readonly kind: GitRunPolicyKind; readonly allowedCommands: readonly string[] | null; readonly environment: Readonly>; } export declare const GIT_READ_ONLY_POLICY: GitRunPolicy; export declare const GIT_LOCAL_MUTATION_POLICY: GitRunPolicy; export declare const GIT_REMOTE_OBSERVATION_POLICY: GitRunPolicy; export interface GitRunOptions { cwd: string; allowFailure?: boolean; env?: Record; timeoutMs?: number; signal?: AbortSignal; stdin?: string | Uint8Array; maxOutputBytes?: number; policy?: GitRunPolicy; } type GitCommitRunner = (args: readonly string[], opts: GitRunOptions) => Promise; export declare const LYT_FALLBACK_GIT_EMAIL = "noreply@linkyourthink.com"; export declare function runGitCommitWithIdentityFallback(runner: GitCommitRunner, commitArgs: readonly string[], opts: GitRunOptions): Promise; export declare const GIT_COMMAND_TIMEOUT_MS = 120000; export interface GitTerminationEvidence { readonly reason: "timeout" | "aborted"; readonly rootPid: number; readonly trackedPids: readonly number[]; readonly verifiedGone: boolean; } export declare class GitRunTerminatedError extends Error { readonly errorCode: "git-timeout" | "git-aborted"; readonly evidence: GitTerminationEvidence; constructor(reason: "timeout" | "aborted", timeoutMs: number, evidence: GitTerminationEvidence); } export declare function runGit(args: readonly string[], opts: GitRunOptions): Promise; export declare function runGitReadOnly(args: readonly string[], opts: Omit): Promise; export declare function runGitReadOnlyRaw(args: readonly string[], opts: Omit): Promise; export declare function runGitLocalMutation(args: readonly string[], opts: Omit): Promise; export declare function runGitRemoteObservation(args: readonly string[], opts: Omit): Promise; export declare function isGitRepo(cwd: string): Promise; export interface PorcelainStatus { clean: boolean; dirtyCount: number; lines: string[]; } export declare function gitStatusPorcelain(cwd: string): Promise; export declare function getCurrentBranch(cwd: string): Promise; export declare function getDefaultBranch(cwd: string): Promise; export declare function branchExists(cwd: string, branch: string): Promise; export declare function hasUpstream(cwd: string): Promise; export interface AheadBehind { ahead: number; behind: number; } export declare function aheadBehind(cwd: string): Promise; export interface BranchInfo { branch: string; timestamp: string; label: string | null; sha: string; subject: string; } export declare function listBranchesWithPrefix(cwd: string, prefix: string): Promise; export declare function timestampForBranchName(now?: Date): string; export declare function slugify(input: string): string; export {}; //# sourceMappingURL=git-run.d.ts.map