/**
 * Git Diff Parser
 * Parses unified diff format to extract changed line ranges
 * Used for incremental scanning to only flag findings on changed lines
 */
/**
 * A hunk represents a contiguous block of changes
 */
export interface DiffHunk {
    /** Starting line in the old file */
    oldStart: number;
    /** Number of lines in old file */
    oldLines: number;
    /** Starting line in the new file */
    newStart: number;
    /** Number of lines in new file */
    newLines: number;
    /** Lines that were added (line numbers in new file) */
    addedLines: number[];
    /** Lines that were removed (line numbers in old file) */
    removedLines: number[];
    /** Lines that were modified (context around changes in new file) */
    contextLines: number[];
}
/**
 * Parsed file diff
 */
export interface FileDiff {
    /** File path (after rename if applicable) */
    path: string;
    /** Old file path (if renamed) */
    oldPath?: string;
    /** Whether the file was added */
    isNew: boolean;
    /** Whether the file was deleted */
    isDeleted: boolean;
    /** Whether the file was renamed */
    isRenamed: boolean;
    /** Hunks containing the actual changes */
    hunks: DiffHunk[];
    /** All changed line numbers in the new file */
    changedLines: Set<number>;
    /** All lines near changes (within context window) */
    affectedLines: Set<number>;
}
/**
 * Parse a unified diff output
 *
 * @param diffOutput - The raw git diff output
 * @param contextWindow - Lines around changes to consider "affected" (default: 5)
 * @returns Map of file path to FileDiff
 */
export declare function parseDiff(diffOutput: string, contextWindow?: number): Map<string, FileDiff>;
/**
 * Parse a simple list of changed file paths
 * Used when full diff isn't available (e.g., GitHub API file list)
 */
export declare function parseChangedFileList(files: string[]): Map<string, FileDiff>;
/**
 * Check if a finding is on a changed line
 */
export declare function isOnChangedLine(filePath: string, lineNumber: number, diffs: Map<string, FileDiff>): boolean;
/**
 * Check if a finding is near a changed line (within context window)
 */
export declare function isNearChangedLine(filePath: string, lineNumber: number, diffs: Map<string, FileDiff>): boolean;
/**
 * Get all changed file paths from diffs
 */
export declare function getChangedFilePaths(diffs: Map<string, FileDiff>): string[];
/**
 * Filter vulnerabilities to only those on/near changed lines
 */
export declare function filterToChangedLines<T extends {
    filePath: string;
    lineNumber: number;
}>(findings: T[], diffs: Map<string, FileDiff>, options?: {
    strictMode?: boolean;
}): T[];
//# sourceMappingURL=diff-parser.d.ts.map