/** * Thrown when grading.json does not match the canonical skill-creator shape * (see grading-schema.ts / skill-creator references/schemas.md). vat refuses to * limp along on malformed grading data — a wrong shape silently flowing * downstream causes confusing failures far from the real cause. */ export declare class GradingSkewError extends Error { constructor(message: string); } export interface NormalizedGrading { summary: { passed: number; total: number; }; expectations: { text: string; passed: boolean; evidence?: string; }[]; /** Per-run integrity nonce the experimenter copied from its prompt (if present). */ runNonce?: string; } /** * Thrown when a per-eval grader fragment's integrity nonce is absent or does not * match the secret nonce the harness stamped into that grader's prompt for THIS * run. A missing/wrong nonce means the fragment was not produced by a grader we * prompted — most likely forged or left behind by untrusted skill code in the * shared sandbox — so the verdict merged from it cannot be trusted. */ export declare class GradingNonceError extends Error { constructor(message: string); } export declare function parseGradingJson(raw: unknown): NormalizedGrading; /** The authoritative eval verdict, recomputed from per-expectation `passed` flags. */ export interface GradingVerdict { passed: number; total: number; allPassed: boolean; } /** * Reconcile the grader's self-reported `summary` against the authoritative * per-expectation `passed` flags and return the recomputed verdict. * * The grader emits BOTH an aggregate `summary.{passed,total}` AND one * `expectations[]` entry per graded expectation (each with its own `passed`). * The schema (docs/skill-test-grading-schema.md) defines `summary` as the exact * aggregate of `expectations`, so the two MUST agree. We never trust the * self-reported summary alone — a grader that emits `summary {5,5}` alongside a * failing expectation would otherwise be a false green. * * Throws {@link GradingSkewError} when: * - there are zero expectations (the grader graded NOTHING — an error, never a * pass); or * - the summary disagrees with the recomputed counts (a grader bug, surfaced * loudly rather than silently flowing a wrong verdict downstream). */ export declare function reconcileGrading(report: NormalizedGrading): GradingVerdict; //# sourceMappingURL=grading-adapter.d.ts.map