/**
 * Code review finding synthesis — pure logic for merging, deduplicating,
 * sorting, and summarising findings from parallel review delegates.
 *
 * Used by:
 * - `engine.ts` (server-side WorkflowRunner.synthesiseFindings)
 * - `.pi/extensions/workflow.ts` has a parallel implementation that should
 *   be kept in sync with the algorithms here (see the `synthesise_review` case).
 */
import type { WorkflowArtifact } from "./types.js";
export interface Finding {
    id: string;
    file: string;
    lineRange: string;
    category: string;
    severity: string;
    title: string;
    description: string;
    suggestion: string;
}
export interface SynthesisResult {
    findings: Finding[];
    rawCount: number;
    duplicatesRemoved: number;
    criticalCount: number;
    majorCount: number;
    minorCount: number;
    nitCount: number;
    verdict: string;
    summary: string;
    artifact: WorkflowArtifact;
}
/**
 * Extract a Finding[] array from raw text.
 * Tries JSON.parse on the whole text first, then falls back to extracting
 * from the first ```json fenced block.
 */
export declare function extractFindings(text: string): Finding[];
/** Check whether two line-range strings overlap (e.g. "L10-L20" and "L15-L25"). */
export declare function lineRangeOverlaps(a: string, b: string): boolean;
/** Check whether two titles are similar (case-insensitive, one contains the other). */
export declare function similarTitle(a: string, b: string): boolean;
/**
 * Deduplicate findings: same file, overlapping line ranges, similar titles.
 * When a duplicate is found, the one with the longer description wins.
 * Returns a new array (does not mutate the input).
 */
export declare function deduplicateFindings(findings: Finding[]): Finding[];
/** Sort findings by severity (critical → major → minor → nit). Mutates in place. */
export declare function sortBySeverity(findings: Finding[]): void;
/** Renumber finding IDs sequentially as F001, F002, etc. Mutates in place. */
export declare function renumberFindings(findings: Finding[]): void;
/** Compute severity counts, verdict, and summary from a list of findings. */
export declare function computeVerdict(findings: Finding[]): {
    criticalCount: number;
    majorCount: number;
    minorCount: number;
    nitCount: number;
    verdict: string;
    summary: string;
};
/**
 * Full synthesis pipeline: read delegate artifacts, merge/deduplicate/sort
 * findings, store the merged artifact, and return everything the caller needs
 * to update workflow state.
 */
export declare function synthesiseReviewFindings(sessionId: string, currentPhaseId?: string): SynthesisResult;
//# sourceMappingURL=synthesis.d.ts.map