export declare const DEFAULT_REVIEW_DIFF_BYTES: number; export declare const MAX_REVIEW_DIFF_BYTES: number; export interface BoundedProcessResult { stdout: string; stderr: string; exitCode: number | null; signal: NodeJS.Signals | null; timedOut: boolean; stdoutOverflow: boolean; stderrOverflow: boolean; spawnCode?: string; } export interface BoundedProcessOptions { cwd?: string; timeoutMs?: number; killGraceMs?: number; terminalWaitMs?: number; maxStdoutBytes?: number; maxStderrBytes?: number; } export type ReviewGhRunner = (args: string[], options?: BoundedProcessOptions) => Promise; export type ReviewDiffErrorKind = 'gh-missing' | 'auth' | 'lookup' | 'timeout' | 'buffer' | 'provider' | 'malformed-response'; export declare class ReviewDiffError extends Error { readonly kind: ReviewDiffErrorKind; readonly stage: string; readonly exitCode: number | null; readonly stderr: string; constructor(kind: ReviewDiffErrorKind, stage: string, message: string, exitCode?: number | null, stderr?: string); } export interface ReviewDiffScope { include: string[]; exclude: string[]; maxDiffBytes: number; } export type ProviderPatchState = 'complete' | 'partial' | 'omitted'; export interface ReviewDiffFile { filename: string; previousFilename?: string; status: string; additions: number; deletions: number; changes: number; expectedChangedLines: number; providerChangedLines: number; providerPatchState: ProviderPatchState; includedPatch: string; localTruncated: boolean; } export interface ReviewPatchCoverage { complete: string[]; providerPartial: string[]; providerOmitted: string[]; localTruncated: string[]; } export interface ReviewDiffResult { prNum: number; repository: string; allFiles: string[]; files: ReviewDiffFile[]; includedDiffBytes: number; includedDiffLines: number; coverage: ReviewPatchCoverage; providerFileListTruncated: boolean; } /** Spawn without a shell, drain both pipes, and retain only bounded output. */ export declare function runBoundedProcess(command: string, args: string[], options?: BoundedProcessOptions): Promise; export declare function sanitizeGhDiagnostic(input: string): string; export declare function matchesReviewScope(filename: string, previousFilename: string | undefined, scope: Pick): boolean; export declare function utf8Prefix(value: string, maxBytes: number): string; export declare function collectReviewDiff(cwd: string, requestedPr: number | undefined, scope: ReviewDiffScope, runner?: ReviewGhRunner): Promise; export declare function formatReviewDiffError(error: ReviewDiffError): string; //# sourceMappingURL=review-diff.d.ts.map