/** The loop reviewer's verdict vocabulary — from the canonical contract * (contracts/review-contract.json): `approve`/`comment`/`request_changes`/ * `reject`. The server's advisory vocabulary lives beside it in the contract; * reconciling the two is a later slice of epic #96. */ export declare const LOOP_VERDICTS: readonly ["approve", "comment", "request_changes", "reject"]; export type Verdict = (typeof LOOP_VERDICTS)[number]; /** Severity scale (highest first) + the default applied to blank severities — * from the canonical contract, matching the server's normalisation. */ export declare const SEVERITIES: readonly ["critical", "high", "medium", "low"]; export declare const DEFAULT_SEVERITY: "medium"; /** Severity badge — glyphs single-sourced from the canonical contract * (severityBadges), byte-identical to the server's severityBadge(). A blank or * unknown severity falls back to the defaultSeverity badge (medium). */ export declare function severityBadge(severity: string): string; /** CodeRabbit-style fix-size tag after the badge — glyphs single-sourced from * the canonical contract (effortTags), byte-identical to the server's * effortTag(). A blank or unknown effort renders "" (no tag). */ export declare function effortTag(effort?: string): string; /** Verdict header, shared by the inline review body and any fallback comment. */ export declare function verdictHeader(verdict: Verdict): string; export interface ReviewFinding { path: string; line: number; severity: string; issue: string; why?: string; fix?: string; effort?: string; suggestion?: string; code?: string; } /** First finding whose `issue` is missing, blank, or not a string. * `title` / `summary` are not aliases — interpolating `f.issue` would * post the literal "undefined" (issue #599). Empty list is valid. */ export declare function findingsIssueGuardError(findings: unknown): string | undefined; /** Single-sourced from the shared ShipFlow contract (markers.loopReview). It * was a CLI-local literal until issue #411 — the server could not see it, so a * loop-review comment read as a HUMAN decision and cleared the very * `needs-reporter-review` gate the review was running under (PR #405). */ export declare const REVIEW_MARKER: ""; /** One finding's comment body — mirrors renderInlineFinding(): badge + effort + * issue, why, fix, and a committable ```suggestion block when present. */ export declare function renderFindingBody(f: ReviewFinding): string; /** Repo-relative path in one canonical shape: forward slashes, no leading * "./". Applied to both diff keys and finding paths so `./src/x` / `src\\x` * still anchor. NOT a filesystem realpath — diff paths aren't fs paths. * * TOTAL by contract: `issue` is refused at the `post-review` parse * boundary (issue #599); `path` is still a bare cast, and nothing * catches a throw at the call site — so one finding with a missing or * non-string `path` must not take down every comment in the review. `String(p ?? "")` * (not `p ?? ""`, which leaves `42` a number) makes the input a string * first; a malformed path then normalizes to "", misses every anchor, and * folds harmlessly into the summary body. Valid strings are untouched. */ export declare function normPath(p: unknown): string; /** Map of path → set of new-file line numbers that GitHub will accept a * RIGHT-side inline comment on (context + added lines). Mirrors the server's * annotatePatch line numbering so a bad anchor can't 422 the whole review. */ export declare function diffAnchors(diff: string): Map>; /** Partition findings into ones that anchor to a real diff line (postable * inline) and ones that must fold into the summary body (bad line / file). */ export declare function splitAnchorable(findings: ReviewFinding[], anchors: Map>): { inline: ReviewFinding[]; body: ReviewFinding[]; }; export interface ReviewComment { path: string; line: number; side: "RIGHT"; body: string; } export interface ReviewPayload { event: "COMMENT"; body: string; comments: ReviewComment[]; } /** Build the GitHub "create review" payload: a COMMENT-event review (ShipFlow * reviews are advisory — approval authority stays with the label gate, so the * event is never APPROVE/REQUEST_CHANGES; the verdict lives in the header), * with on-diff findings as inline comments and the rest folded into the body. */ export declare function buildReviewPayload(opts: { summary: string; verdict: Verdict; findings: ReviewFinding[]; anchors: Map>; }): ReviewPayload; //# sourceMappingURL=review-contract.d.ts.map