/**
 * Builder for the posted-review-body (see design.md → Data Models →
 * Posted-review-body) and the verdict mapper that decides the GitHub review
 * `event`.
 *
 * The body is the durable handoff to `*-receive-remote`: a leading
 * HTML-comment marker block (parsed back by {@link parseMarkerBlock}) followed
 * by human-readable prose (summary, severity counts, optional minor-fix nudge,
 * optional verification commands).
 */
import { type ReviewInvocation } from './marker-parser.js';
export type ReviewVerdict = 'REQUEST_CHANGES' | 'COMMENT';
export type FindingSeverity = 'critical' | 'important' | 'medium' | 'minor';
/** Minimal finding shape the builder needs — only severity is required. */
export interface BuilderFinding {
    severity: FindingSeverity;
}
/**
 * A finding whose `file:line` is NOT present in the PR diff and therefore
 * cannot be posted as a GitHub inline comment (see design.md → Error Handling →
 * Inline-comment line mapping). Such findings must NOT be dropped — they are
 * downgraded into the top-level body via a "Findings outside the PR diff"
 * subsection carrying the original `file:line` reference and finding body.
 *
 * Field names mirror the `StructuredFindings` finding shape (design.md → Data
 * Models → StructuredFindings) so callers can pass entries through unchanged;
 * `line` is `number | null` because a reviewer-level finding may be file-scoped
 * with no specific line.
 */
export interface OutOfDiffFinding {
    /** Repo-relative path the original finding referenced. */
    file: string;
    /** 1-based line the original finding referenced, or `null` if file-scoped. */
    line: number | null;
    severity: FindingSeverity;
    /** Optional short title carried from the structured finding. */
    title?: string;
    /** Finding description / rationale — preserved verbatim, never dropped. */
    body: string;
}
export interface BuildInput {
    /** Full 40-char hex SHA of the reviewed PR HEAD. */
    headSha: string;
    /** Scope token (`pNN`, `final`, …) or the `ad-hoc` sentinel. */
    scope: string;
    /** Project path — set only on the project rail; omitted on ad-hoc. */
    project?: string;
    /** How the review was invoked. */
    invocation: ReviewInvocation;
    /** 2-3 sentence human-readable summary. */
    summary: string;
    findings: BuilderFinding[];
    /**
     * Findings whose `file:line` is not in the PR diff, downgraded into the body
     * instead of posted inline. Omitted/empty renders no subsection (the body is
     * byte-identical to a build without the field).
     *
     * Count contract: these findings MUST also appear in {@link BuildInput.findings}
     * so the severity counts stay complete. This field only drives body rendering
     * — the builder never re-derives severity counts from it.
     */
    outOfDiffFindings?: OutOfDiffFinding[];
    /** Commands the user can run to verify fixes; omitted when absent/empty. */
    verificationCommands?: string[];
}
/**
 * Map a finding set to the GitHub review verdict: `REQUEST_CHANGES` when any
 * critical or important finding is present, otherwise `COMMENT` (including the
 * zero-findings clean-review case). Never auto-`APPROVE`.
 */
export declare function mapVerdict(findings: BuilderFinding[]): ReviewVerdict;
/**
 * Build the posted-review body and compute its verdict.
 */
export declare function buildReviewBody(input: BuildInput): {
    body: string;
    verdict: ReviewVerdict;
};
//# sourceMappingURL=body-builder.d.ts.map