/**
 * Line Validation Utility
 *
 * Validates review comment line numbers against parsed diff hunk ranges.
 * Comments referencing lines outside the diff are partitioned out and
 * reformatted for inclusion in the review summary body.
 *
 * Pure function — no side effects.
 */
import type { FileDiff } from '../../../application/ports/output/services/git-pr-service.interface.js';
import type { ReviewOutputComment } from './review-output-parser.service.js';
/**
 * Map of valid line numbers per file per side.
 * Key is file path, value has left (old) and right (new) line sets.
 */
export type ValidLineMap = Record<string, {
    left: Set<number>;
    right: Set<number>;
}>;
/**
 * Result of partitioning comments into valid (in-diff) and invalid (out-of-diff).
 */
export interface ValidatedComments {
    valid: ReviewOutputComment[];
    invalid: ReviewOutputComment[];
}
/**
 * Build a map of valid line numbers per file per side from FileDiff[].
 *
 * - RIGHT side: newNumber for added and context lines
 * - LEFT side: oldNumber for removed and context lines
 *
 * @param diffs - Array of per-file diffs
 * @returns Map of valid line numbers per file per side
 */
export declare function buildValidLineMap(diffs: FileDiff[]): ValidLineMap;
/**
 * Validate review comments against diff hunk ranges.
 *
 * Comments with valid line numbers (matching a line in the diff for their side)
 * get inDiffRange=true. Comments with lines outside the diff or for files not
 * in the diff get inDiffRange=false.
 *
 * @param comments - Comments from the reviewer agent
 * @param validLineMap - Map built from buildValidLineMap()
 * @returns Partitioned valid and invalid comments
 */
export declare function validateComments(comments: ReviewOutputComment[], validLineMap: ValidLineMap): ValidatedComments;
/**
 * Format an invalid comment for inclusion in the review summary body.
 *
 * @param comment - Comment that references a line outside the diff
 * @returns Formatted string suitable for the summary body
 */
export declare function formatInvalidComment(comment: ReviewOutputComment): string;
/**
 * Validate comments and partition them in one call.
 * Convenience function combining buildValidLineMap + validateComments.
 *
 * @param comments - Comments from the reviewer agent
 * @param diffs - Array of per-file diffs
 * @returns Partitioned valid and invalid comments
 */
export declare function validateAndPartitionComments(comments: ReviewOutputComment[], diffs: FileDiff[]): ValidatedComments;
//# sourceMappingURL=line-validation.service.d.ts.map