import { type CandidateRequest } from "./review-payload"; export type ReviewOmissions = { comments: number; findings: number; }; type FitLimits = Readonly<{ body: number; comment: number; total: number; }>; /** * ADR-0004's code-point caps include the ellipsis. The marker is ASCII, validated * by parseReviewMarker and reserved intact before allocating any summary text. * Protected maxima (including the mutually exclusive anchor for a loose bound): * 512 marker + 8*256 notices + 64 collapse + 2*(12 heading + 512 headline) * + 512 anchor + 64 footer; at most 16 lines / 15 separators. Counts need at most * 16 decimal digits (JS array/string cardinalities are below MAX_SAFE_INTEGER). * Variable text totals 3584 code points: <=4 UTF-8 bytes or <=6 JSON bytes each * (including controls/lone surrogates). Thus body <=15015 bytes/code points; * canonical <=22326 bytes/code points, including <=128 bytes of JSON envelope: * 512 + 24 + 128 + 2*15 + 6*3584 + 128. Both are below LIMITS; comments are []. * Three droppable context lines are outside this proof. Removing them suffices * under production limits; the minimal stage also supports tighter unit fixtures. */ export declare const FIT_CAPS: Readonly<{ marker: 512; notices: 8; notice: 256; headline: 512; summary: 512; context: 1024; leadingContext: 3; minimal: 32; }>; /** * Pure bounded-summary fitting, called only after freeze validates an oversized * request. Source identity prefixes are read before classification/shortening; * each stage compares surviving identities against that original set and measures * the complete canonical request, including its footer, before artifact writes. * Classification keeps only selected axis pairs, notice representations and up to * three leading prose context lines (plus the anchor when no axis pair exists). * Stages are cap every line, drop context from the end, then minimize protected * prose. Marker, canonical headings, collapse count and footer are never shortened. * LIMITS is the production oracle; the optional limits argument exercises stricter * ceilings without changing measure(). There is no production bypass: freeze * remeasures the result and throws an internal invariant error before writing if * it cannot fit. The bounded-cost proof above makes that unreachable under LIMITS. */ export declare function fitReview(request: CandidateRequest, limits?: FitLimits): { request: CandidateRequest; omitted: ReviewOmissions; }; export {}; //# sourceMappingURL=review-fit.d.ts.map