import type { ReviewSide } from './payload.mts'; export type LineKind = 'add' | 'del' | 'context'; export type ReviewFile = { filename: string; previous_filename?: string; patch?: string; status?: string; }; export type CommentableIndex = { resolvePath(path: string): string | undefined; hasPatch(path: string): boolean; has(path: string, side: ReviewSide, line: number): boolean; kind(path: string, side: ReviewSide, line: number): LineKind | undefined; candidates(path: string, side: ReviewSide): Array<{ line: number; kind: LineKind; }>; }; export type CommentableLine = { path: string; side: ReviewSide; line: number; kind: LineKind; }; /** Indexes added, deleted, and context lines from a unified diff hunk. */ export declare function parsePatchCommentable(path: string, patch: string): CommentableLine[]; /** Parses one or concatenated paginated JSON responses, dropping malformed file entries. */ export declare function parseReviewFilesJson(text: string): ReviewFile[]; /** Creates a fast path/side/line lookup and retains rename aliases. */ export declare function indexReviewFiles(files: readonly ReviewFile[]): CommentableIndex;