/** * 🎟️ PROOF-CARRYING ANSWERS (PCA) — a verifiable trust tag on EVERY single AI output, checkable in microseconds. * * The whole honesty stack so far audits a model in BATCH: "it was 90% accurate / fair / calibrated last quarter." * But in the agentic world, what you actually consume is ONE answer, right now — and you have no way to know if THIS * answer is backed or a confident hallucination. PCA turns the batch audit into a per-answer runtime guarantee: every * model output ships with a compact, signed proof that a consumer (a human, or another agent) verifies instantly, * offline, with no access to the model or its data. The proof asserts four checkable things and a verdict: * ① PROVENANCE — produced by model M, bound to a lineage root (AIBOM) and an SLA/consent scope; * ② IN-SCOPE — the input lies INSIDE the model's certified evidence envelope (not a blind extrapolation); if not, * it carries the exact offending dimension as a witness the consumer re-derives; * ③ CALIBRATED CONFIDENCE — the stated confidence comes from a model whose calibration certificate is bound by hash; * ④ VERDICT — TRUSTED, or OUT-OF-SCOPE / NEEDS-REVIEW (below the certified-reliable confidence) — so an out-of-scope * or under-confident answer is provably flagged for review instead of asserted. * The consumer recomputes the scope test on the input and re-checks the signature in O(dimensions) — no dataset needed. * * WHY IT MATTERS (the missing primitive for multi-agent AI): agents consume each other's outputs at machine speed; * PCA lets them trust a single answer WITHOUT trusting the producer — the proof self-certifies scope + calibration + * provenance, and self-flags when the answer is outside what the model can stand behind. * * WHO BENEFITS (≥3): ① the model PROVIDER ships answers that carry their own trust (and bounds liability to the * certified scope); ② the CONSUMER / downstream agent verifies each answer instantly offline and safely rejects the * out-of-scope ones; ③ the PLATFORM / regulator audits the stream of signed verdicts; ④ the END USER is protected from * confident-but-unbacked answers. * * (DIAKRISIS — MEASURED: an in-scope, confident answer is TRUSTED and the proof verifies; an out-of-scope input is * flagged OUT-OF-SCOPE ~100% with a witness the consumer re-derives, and an in-scope input is never falsely flagged; * an under-confident answer becomes NEEDS-REVIEW; tampering the input/output/verdict or a bound cert hash is caught; * verification is O(d) and needs no data. HONEST: PCA proves an answer is BACKED + IN-SCOPE + from a calibrated, * provenance-bound model — it does NOT prove the answer is factually correct (no per-answer oracle can); its power is * catching the out-of-scope / under-confident answers that are most likely to be wrong, with a checkable verdict. The * scope test here is the axis-aligned certified envelope; the tighter convex-hull witness is the Extrapolation-Guard * certificate, which a PCA may reference.) */ import { type KeyObject } from "node:crypto"; export interface AnswerProof { standard: "melete-proof-carrying-answer/v1"; modelId: string; lineageRoot: string | null; slaPeriod: string | null; calibrationCertHash: string | null; input: number[]; support: { lo: number[]; hi: number[]; }; reliableConfidence: number; output: unknown; confidence: number; inScope: boolean; witnessDim: number; verdict: "TRUSTED" | "OUT-OF-SCOPE" | "NEEDS-REVIEW"; payloadHash: string; signature: string; publicKeyPem: string; algo: "ed25519+sha256"; } export declare function proveAnswer(opts: { modelId?: string; input: number[]; support: { lo: number[]; hi: number[]; }; output?: unknown; confidence: number; reliableConfidence?: number; lineageRoot?: string | null; slaPeriod?: string | null; calibrationCertHash?: string | null; keys?: { publicKey: KeyObject; privateKey: KeyObject; }; }): AnswerProof; export declare function verifyAnswer(c: AnswerProof): { ok: boolean; verdict: string; reason: string; }; export declare function pcaGauntlet(): { score: 0 | 100; checks: Array<{ name: string; pass: boolean; detail: string; }>; }; //# sourceMappingURL=pca.d.ts.map