/** * 🧬 THE MODEL SUPPLY-CHAIN CERTIFICATE (AI Bill of Materials) — multi-party, signed provenance for an AI model. * * A deployed model is rarely one party's work: a BASE-MODEL vendor trains it, a FINE-TUNER adapts it, an OPTIMIZER * quantizes/distills it, a DEPLOYER ships it — and a REGULATOR or end user has to trust the result. Today none of * that is verifiable: there is no signed record of who did what, in what order, from what inputs. This makes the * lineage a hash-chained AIBOM where EACH step is signed by the key of the party responsible for it (different keys * = genuinely multi-party), every step declares the prior artifacts it consumed (provenance edges), and any * downstream consumer verifies the WHOLE chain offline — confirming every signature, the chain order, and that no * step derives from an artifact missing from the chain. It binds each step to a specific signer fingerprint, so the * responsibility map (who is accountable for which step) is tamper-evident. Because it carries a payload hash it is * a first-class certificate — it can ride inside a Trust Passport and be counter-signed by a Verification Receipt. * * WHO BENEFITS (≥3 parties — usually 4+): ① the BASE-MODEL vendor gets attribution + liability scoped to only their * layer; ② the FINE-TUNER proves exactly what they changed and on top of what; ③ the DEPLOYER proves they shipped a * known, unbroken lineage (not a swapped artifact); ④ the REGULATOR / end user verifies the entire provenance and * knows who to hold accountable for each step. Each link is independently signed, so no party can rewrite another's. * * (DIAKRISIS — MEASURED: a 4-party chain with 4 distinct signers verifies + the responsibility map names each * signer; tampering, inserting, removing or reordering any link is caught; a link whose declared input artifact is * not present earlier in the chain is flagged (broken provenance); a link's recorded party name cannot be changed * without breaking its signature; deterministic + total. HONEST: this proves WHO signed WHAT step + the chain's * integrity + provenance closure — it does NOT verify the artifacts are good models, and it binds a party NAME to a * KEY fingerprint, not to a real-world identity [that needs an external key registry, out of scope].) */ import { type KeyObject } from "node:crypto"; export interface LineageLink { seq: number; party: string; role: string; action: string; artifactHash: string; inputs: string[]; prevHash: string; linkHash: string; signerFingerprint: string; signature: string; publicKeyPem: string; } export interface AibomCertificate { standard: "melete-aibom/v1"; model: string; n: number; links: LineageLink[]; parties: string[]; headHash: string; payloadHash: string; algo: "ed25519+sha256"; } export declare function buildAibom(opts: { model?: string; steps: Array<{ party: string; role?: string; action?: string; artifactHash: string; inputs?: string[]; keys: { publicKey: KeyObject; privateKey: KeyObject; }; }>; }): AibomCertificate; export declare function verifyAibom(c: AibomCertificate): { ok: boolean; reason: string; }; export declare function aibomReport(c: AibomCertificate): { model: string; steps: Array<{ seq: number; party: string; role: string; action: string; signer: string; }>; distinctParties: number; }; export declare function aibomGauntlet(): { score: 0 | 100; checks: Array<{ name: string; pass: boolean; detail: string; }>; }; //# sourceMappingURL=aibom.d.ts.map