import { type SelectionState } from './selection-strategies.js'; export type ReviewerViolation = { kind: string; file: string; line: number; hint: string; }; export type ReviewerEnvelope = { reviewerId: string; modelId: string; modelFamily: string; passed: boolean; violations: ReviewerViolation[]; gateAction: 'block' | 'allow' | 'warn'; reason: string; }; export type ReviewerRunInput = { rid: string; /** Slice context blob fed to the prompt. Plain text — no PII (A1.5). */ context: string; /** Optional override of the selection-mode state for cross-slice round-robin. */ state?: SelectionState; /** Optional injected fetch (testability). */ fetchImpl?: typeof fetch; /** Optional injected rng (random mode tests). */ rng?: () => number; }; export type ReviewerRunOutput = { ok: true; envelope: ReviewerEnvelope; nextState: SelectionState; } | { ok: false; reason: 'no-reviewer-config'; envelope: ReviewerEnvelope; }; export declare const REVIEWER_ID = "third-party-reviewer-v2.14.0"; /** * Validate a parsed JSON value against the ReviewerEnvelope contract * (mirrors `schemas/reviewer-envelope.schema.json`). Returns the * normalized envelope on success, or null when the input is malformed. */ export declare function validateReviewerEnvelope(value: unknown): ReviewerEnvelope | null; /** * Try to extract the first JSON object from an LLM text response. * Many LLMs wrap JSON in ```json fences or surrounding prose; we * tolerate both. Returns null when no JSON object is present. */ export declare function extractFirstJsonObject(text: string): unknown | null; export declare function runReviewer(input: ReviewerRunInput): Promise; /** * Compute the distinctness verdict: returns true when the third-party * reviewer's modelFamily differs from the karpathy reviewer's. AC-4.4 * mandates this is a CI gate — equality fails the build. */ export declare function distinctFromKarpathy(thirdPartyFamily: string, karpathyFamily: string): boolean;