/** * The ONE registry of what a lane's submission must satisfy. * * Every gate validated its submission inline, which was fine while the only * reader was the gate itself. The hand-recovery verb is a SECOND reader of the * same contract, and a second reader is exactly where a weaker copy grows: an * operator rescue that skipped the schema would be a door into the tool the * normal lane does not have. So the rule lives here once, and both the gate and * `recover-submission` resolve it from this table. * * Two shapes of rule, because two shapes of lane exist: those whose contract IS * a zod schema, and those whose contract is a tolerated JSON shape (an array of * findings, a decisions map). Both are expressed as the same * `SubmissionIssue | null` validator so a caller never has to know which. */ import type { ZodTypeAny } from "zod"; import { type CharterKind, type SubmissionIssue } from "audit-tools/shared"; /** Human-readable description of why a submission is neither an array nor a single-array-wrapped object. */ export declare function describeSubmissionShapeMismatch(value: unknown): string; /** * The single tolerant-unwrap rule: a bare array is accepted as-is; a top-level * object wrapping exactly one array-valued property is unambiguous and is * accepted as that array. Anything else fails with a shape description. * Single-sourced so the design-review gate, the edge-reasoning gate, and the * recovery verb cannot drift on what shapes are accepted. */ export declare function unwrapSubmissionArray(value: unknown): { ok: true; array: unknown[]; } | { ok: false; reason: string; }; /** True for a plain top-level key → value map (the decisions-file shape). */ export declare function isSubmissionObjectMap(value: unknown): value is Record; /** * The charter lane schema: the submission shape PLUS the two refinements that * make a blind lane trustworthy — kind purity (a lane may only carry its own * kind; anything else is a mis-routed submission) and scope grounding (a * teleology node citing files the repo does not contain is refused whole, * naming them, never silently narrowed). * * `repoFiles` is the manifest's path set. It is a parameter rather than a * capture so the gate and the recovery verb apply the identical refinement * against the identical universe. */ export declare function charterLaneSchema(kind: CharterKind, repoFiles: ReadonlySet): ZodTypeAny; /** * Lanes whose contract is a zod schema, keyed by lane id. The gate descriptors * read this table; so does the recovery verb. */ export declare const LANE_SUBMISSION_SCHEMAS: Readonly>; /** What the recovery verb needs in order to apply the FULL lane contract. */ export interface LaneValidationContext { /** The repo manifest's path set — the charter lanes' scope grounding. */ readonly repoFiles: ReadonlySet; } /** * The validator the normal lane applies to `lane`, or `null` when the lane id * is not one this tool knows. Callers that cannot supply a validator must * REFUSE rather than accept — an unknown lane has no contract to check against, * and "no contract" must never read as "passes". */ export declare function laneSubmissionValidator(lane: string, context: LaneValidationContext): ((value: unknown) => SubmissionIssue | null) | null; //# sourceMappingURL=laneValidators.d.ts.map