export interface DiffHunk { filePath: string; oldStart: number; newStart: number; /** Every line in the hunk, including context. Each entry is "+ ", "- ", " " followed by content. */ lines: string[]; } export interface HeuristicFinding { heuristic: string; severity: "high" | "medium" | "low"; file: string; line: number; snippet: string; message: string; } export declare function findUnguardedStreamCalls(hunks: DiffHunk[]): HeuristicFinding[]; export declare const ALL_HEURISTICS: ((hunks: DiffHunk[]) => HeuristicFinding[])[]; export declare function runAllHeuristics(hunks: DiffHunk[]): HeuristicFinding[]; /** * Parse a unified-diff string (output of `git diff -U5 ref`) into hunks. * Very permissive — anything that doesn't match the expected header is * skipped rather than raising. */ export declare function parseUnifiedDiff(diffText: string): DiffHunk[]; /** * Convenience: pull a unified diff from git and parse it. */ export declare function getDiffHunks(rootPath: string, ref: string): DiffHunk[];