/** * Agent Certificate (v1) * * A versioned, self-contained, independently-verifiable certificate that * attests an AI agent / MCP server / AI-generated codebase across six * dimensions: security, scalability, quality, explainability (decision * provenance), compliance, and AI-BOM. * * The certificate carries its own content digest (tamper-evident) and an * optional Sigstore signature, so a third party can verify it WITHOUT * trusting Vaspera. It composes the primitives this platform already has * — the certification engine, the tamper-evident audit trail * (`history/`), the evidence bundle + Sigstore signing (`sbom/signing`, * `evidence/`) — rather than introducing a new trust mechanism. * * @module certification/agent-certificate */ import { z } from "zod"; import type { SigningOptions } from "../sbom/types.js"; /** Canonical schema identifier (also the version marker). */ export declare const AGENT_CERTIFICATE_SCHEMA = "https://vaspera.dev/schemas/agent-certificate/v1"; /** Media type used for the signed payload. */ export declare const AGENT_CERTIFICATE_MEDIA_TYPE = "application/vnd.vaspera.agent-certificate+json"; /** Typed error for certificate operations. */ export declare class CertificateError extends Error { readonly code: "invalid_schema" | "digest_mismatch" | "signature_invalid" | "build_failed"; constructor(message: string, code: "invalid_schema" | "digest_mismatch" | "signature_invalid" | "build_failed"); } /** A single check contributing to a dimension. */ declare const DimensionCheckSchema: z.ZodObject<{ id: z.ZodString; title: z.ZodString; status: z.ZodEnum<["pass", "warn", "fail"]>; severity: z.ZodOptional>; category: z.ZodOptional; evidenceDigest: z.ZodOptional; detail: z.ZodOptional; }, "strip", z.ZodTypeAny, { title: string; id: string; status: "warn" | "pass" | "fail"; severity?: "info" | "critical" | "high" | "medium" | "low" | undefined; category?: string | undefined; evidenceDigest?: string | undefined; detail?: string | undefined; }, { title: string; id: string; status: "warn" | "pass" | "fail"; severity?: "info" | "critical" | "high" | "medium" | "low" | undefined; category?: string | undefined; evidenceDigest?: string | undefined; detail?: string | undefined; }>; /** The shape shared by the four scored dimensions. */ declare const DimensionResultSchema: z.ZodObject<{ status: z.ZodEnum<["pass", "warn", "fail", "not_assessed"]>; score: z.ZodNumber; summary: z.ZodString; checks: z.ZodArray; severity: z.ZodOptional>; category: z.ZodOptional; evidenceDigest: z.ZodOptional; detail: z.ZodOptional; }, "strip", z.ZodTypeAny, { title: string; id: string; status: "warn" | "pass" | "fail"; severity?: "info" | "critical" | "high" | "medium" | "low" | undefined; category?: string | undefined; evidenceDigest?: string | undefined; detail?: string | undefined; }, { title: string; id: string; status: "warn" | "pass" | "fail"; severity?: "info" | "critical" | "high" | "medium" | "low" | undefined; category?: string | undefined; evidenceDigest?: string | undefined; detail?: string | undefined; }>, "many">; }, "strip", z.ZodTypeAny, { status: "warn" | "pass" | "fail" | "not_assessed"; summary: string; score: number; checks: { title: string; id: string; status: "warn" | "pass" | "fail"; severity?: "info" | "critical" | "high" | "medium" | "low" | undefined; category?: string | undefined; evidenceDigest?: string | undefined; detail?: string | undefined; }[]; }, { status: "warn" | "pass" | "fail" | "not_assessed"; summary: string; score: number; checks: { title: string; id: string; status: "warn" | "pass" | "fail"; severity?: "info" | "critical" | "high" | "medium" | "low" | undefined; category?: string | undefined; evidenceDigest?: string | undefined; detail?: string | undefined; }[]; }>; /** The certificate body — everything except the digest/signature. */ export declare const AgentCertificateBodySchema: z.ZodObject<{ schemaVersion: z.ZodLiteral<"https://vaspera.dev/schemas/agent-certificate/v1">; certificateId: z.ZodString; subject: z.ZodObject<{ kind: z.ZodEnum<["agent", "mcp-server", "codebase"]>; name: z.ZodString; version: z.ZodOptional; identifier: z.ZodOptional; description: z.ZodOptional; digest: z.ZodOptional; }, "strip", z.ZodTypeAny, { name: string; kind: "agent" | "mcp-server" | "codebase"; version?: string | undefined; description?: string | undefined; digest?: string | undefined; identifier?: string | undefined; }, { name: string; kind: "agent" | "mcp-server" | "codebase"; version?: string | undefined; description?: string | undefined; digest?: string | undefined; identifier?: string | undefined; }>; issuer: z.ZodObject<{ name: z.ZodString; tool: z.ZodString; toolVersion: z.ZodString; actor: z.ZodOptional; id: z.ZodString; name: z.ZodOptional; email: z.ZodOptional; }, "strip", z.ZodTypeAny, { id: string; type: "user" | "service" | "system"; name?: string | undefined; email?: string | undefined; }, { id: string; type: "user" | "service" | "system"; name?: string | undefined; email?: string | undefined; }>>; }, "strip", z.ZodTypeAny, { name: string; tool: string; toolVersion: string; actor?: { id: string; type: "user" | "service" | "system"; name?: string | undefined; email?: string | undefined; } | undefined; }, { name: string; tool: string; toolVersion: string; actor?: { id: string; type: "user" | "service" | "system"; name?: string | undefined; email?: string | undefined; } | undefined; }>; issuedAt: z.ZodString; expiresAt: z.ZodString; level: z.ZodEnum<["CERTIFIED", "APPROVED", "REVIEW_REQUIRED", "BLOCKED"]>; overallScore: z.ZodNumber; dimensions: z.ZodObject<{ security: z.ZodObject<{ status: z.ZodEnum<["pass", "warn", "fail", "not_assessed"]>; score: z.ZodNumber; summary: z.ZodString; checks: z.ZodArray; severity: z.ZodOptional>; category: z.ZodOptional; evidenceDigest: z.ZodOptional; detail: z.ZodOptional; }, "strip", z.ZodTypeAny, { title: string; id: string; status: "warn" | "pass" | "fail"; severity?: "info" | "critical" | "high" | "medium" | "low" | undefined; category?: string | undefined; evidenceDigest?: string | undefined; detail?: string | undefined; }, { title: string; id: string; status: "warn" | "pass" | "fail"; severity?: "info" | "critical" | "high" | "medium" | "low" | undefined; category?: string | undefined; evidenceDigest?: string | undefined; detail?: string | undefined; }>, "many">; }, "strip", z.ZodTypeAny, { status: "warn" | "pass" | "fail" | "not_assessed"; summary: string; score: number; checks: { title: string; id: string; status: "warn" | "pass" | "fail"; severity?: "info" | "critical" | "high" | "medium" | "low" | undefined; category?: string | undefined; evidenceDigest?: string | undefined; detail?: string | undefined; }[]; }, { status: "warn" | "pass" | "fail" | "not_assessed"; summary: string; score: number; checks: { title: string; id: string; status: "warn" | "pass" | "fail"; severity?: "info" | "critical" | "high" | "medium" | "low" | undefined; category?: string | undefined; evidenceDigest?: string | undefined; detail?: string | undefined; }[]; }>; scalability: z.ZodObject<{ status: z.ZodEnum<["pass", "warn", "fail", "not_assessed"]>; score: z.ZodNumber; summary: z.ZodString; checks: z.ZodArray; severity: z.ZodOptional>; category: z.ZodOptional; evidenceDigest: z.ZodOptional; detail: z.ZodOptional; }, "strip", z.ZodTypeAny, { title: string; id: string; status: "warn" | "pass" | "fail"; severity?: "info" | "critical" | "high" | "medium" | "low" | undefined; category?: string | undefined; evidenceDigest?: string | undefined; detail?: string | undefined; }, { title: string; id: string; status: "warn" | "pass" | "fail"; severity?: "info" | "critical" | "high" | "medium" | "low" | undefined; category?: string | undefined; evidenceDigest?: string | undefined; detail?: string | undefined; }>, "many">; }, "strip", z.ZodTypeAny, { status: "warn" | "pass" | "fail" | "not_assessed"; summary: string; score: number; checks: { title: string; id: string; status: "warn" | "pass" | "fail"; severity?: "info" | "critical" | "high" | "medium" | "low" | undefined; category?: string | undefined; evidenceDigest?: string | undefined; detail?: string | undefined; }[]; }, { status: "warn" | "pass" | "fail" | "not_assessed"; summary: string; score: number; checks: { title: string; id: string; status: "warn" | "pass" | "fail"; severity?: "info" | "critical" | "high" | "medium" | "low" | undefined; category?: string | undefined; evidenceDigest?: string | undefined; detail?: string | undefined; }[]; }>; quality: z.ZodObject<{ status: z.ZodEnum<["pass", "warn", "fail", "not_assessed"]>; score: z.ZodNumber; summary: z.ZodString; checks: z.ZodArray; severity: z.ZodOptional>; category: z.ZodOptional; evidenceDigest: z.ZodOptional; detail: z.ZodOptional; }, "strip", z.ZodTypeAny, { title: string; id: string; status: "warn" | "pass" | "fail"; severity?: "info" | "critical" | "high" | "medium" | "low" | undefined; category?: string | undefined; evidenceDigest?: string | undefined; detail?: string | undefined; }, { title: string; id: string; status: "warn" | "pass" | "fail"; severity?: "info" | "critical" | "high" | "medium" | "low" | undefined; category?: string | undefined; evidenceDigest?: string | undefined; detail?: string | undefined; }>, "many">; }, "strip", z.ZodTypeAny, { status: "warn" | "pass" | "fail" | "not_assessed"; summary: string; score: number; checks: { title: string; id: string; status: "warn" | "pass" | "fail"; severity?: "info" | "critical" | "high" | "medium" | "low" | undefined; category?: string | undefined; evidenceDigest?: string | undefined; detail?: string | undefined; }[]; }, { status: "warn" | "pass" | "fail" | "not_assessed"; summary: string; score: number; checks: { title: string; id: string; status: "warn" | "pass" | "fail"; severity?: "info" | "critical" | "high" | "medium" | "low" | undefined; category?: string | undefined; evidenceDigest?: string | undefined; detail?: string | undefined; }[]; }>; explainability: z.ZodObject<{ status: z.ZodEnum<["pass", "warn", "fail", "not_assessed"]>; score: z.ZodNumber; summary: z.ZodString; checks: z.ZodArray; severity: z.ZodOptional>; category: z.ZodOptional; evidenceDigest: z.ZodOptional; detail: z.ZodOptional; }, "strip", z.ZodTypeAny, { title: string; id: string; status: "warn" | "pass" | "fail"; severity?: "info" | "critical" | "high" | "medium" | "low" | undefined; category?: string | undefined; evidenceDigest?: string | undefined; detail?: string | undefined; }, { title: string; id: string; status: "warn" | "pass" | "fail"; severity?: "info" | "critical" | "high" | "medium" | "low" | undefined; category?: string | undefined; evidenceDigest?: string | undefined; detail?: string | undefined; }>, "many">; }, "strip", z.ZodTypeAny, { status: "warn" | "pass" | "fail" | "not_assessed"; summary: string; score: number; checks: { title: string; id: string; status: "warn" | "pass" | "fail"; severity?: "info" | "critical" | "high" | "medium" | "low" | undefined; category?: string | undefined; evidenceDigest?: string | undefined; detail?: string | undefined; }[]; }, { status: "warn" | "pass" | "fail" | "not_assessed"; summary: string; score: number; checks: { title: string; id: string; status: "warn" | "pass" | "fail"; severity?: "info" | "critical" | "high" | "medium" | "low" | undefined; category?: string | undefined; evidenceDigest?: string | undefined; detail?: string | undefined; }[]; }>; compliance: z.ZodObject<{ status: z.ZodEnum<["pass", "warn", "fail", "not_assessed"]>; score: z.ZodNumber; summary: z.ZodString; frameworks: z.ZodArray; }, "strip", z.ZodTypeAny, { title: string; status: "failed" | "at_risk" | "satisfied" | "not_applicable"; controlId: string; }, { title: string; status: "failed" | "at_risk" | "satisfied" | "not_applicable"; controlId: string; }>, "many">>; }, "strip", z.ZodTypeAny, { framework: string; controlsTotal: number; controlsAtRisk: number; controlsSatisfied: number; controlsFailed: number; controls?: { title: string; status: "failed" | "at_risk" | "satisfied" | "not_applicable"; controlId: string; }[] | undefined; }, { framework: string; controlsTotal: number; controlsAtRisk: number; controlsSatisfied: number; controlsFailed: number; controls?: { title: string; status: "failed" | "at_risk" | "satisfied" | "not_applicable"; controlId: string; }[] | undefined; }>, "many">; }, "strip", z.ZodTypeAny, { frameworks: { framework: string; controlsTotal: number; controlsAtRisk: number; controlsSatisfied: number; controlsFailed: number; controls?: { title: string; status: "failed" | "at_risk" | "satisfied" | "not_applicable"; controlId: string; }[] | undefined; }[]; status: "warn" | "pass" | "fail" | "not_assessed"; summary: string; score: number; }, { frameworks: { framework: string; controlsTotal: number; controlsAtRisk: number; controlsSatisfied: number; controlsFailed: number; controls?: { title: string; status: "failed" | "at_risk" | "satisfied" | "not_applicable"; controlId: string; }[] | undefined; }[]; status: "warn" | "pass" | "fail" | "not_assessed"; summary: string; score: number; }>; aiBom: z.ZodObject<{ status: z.ZodEnum<["pass", "warn", "fail", "not_assessed"]>; score: z.ZodNumber; summary: z.ZodString; components: z.ZodArray; version: z.ZodOptional; provider: z.ZodOptional; role: z.ZodOptional; digest: z.ZodOptional; }, "strip", z.ZodTypeAny, { name: string; kind: "tool" | "model" | "prompt" | "dependency" | "dataset"; version?: string | undefined; provider?: string | undefined; role?: string | undefined; digest?: string | undefined; }, { name: string; kind: "tool" | "model" | "prompt" | "dependency" | "dataset"; version?: string | undefined; provider?: string | undefined; role?: string | undefined; digest?: string | undefined; }>, "many">; }, "strip", z.ZodTypeAny, { status: "warn" | "pass" | "fail" | "not_assessed"; summary: string; score: number; components: { name: string; kind: "tool" | "model" | "prompt" | "dependency" | "dataset"; version?: string | undefined; provider?: string | undefined; role?: string | undefined; digest?: string | undefined; }[]; }, { status: "warn" | "pass" | "fail" | "not_assessed"; summary: string; score: number; components: { name: string; kind: "tool" | "model" | "prompt" | "dependency" | "dataset"; version?: string | undefined; provider?: string | undefined; role?: string | undefined; digest?: string | undefined; }[]; }>; }, "strip", z.ZodTypeAny, { security: { status: "warn" | "pass" | "fail" | "not_assessed"; summary: string; score: number; checks: { title: string; id: string; status: "warn" | "pass" | "fail"; severity?: "info" | "critical" | "high" | "medium" | "low" | undefined; category?: string | undefined; evidenceDigest?: string | undefined; detail?: string | undefined; }[]; }; quality: { status: "warn" | "pass" | "fail" | "not_assessed"; summary: string; score: number; checks: { title: string; id: string; status: "warn" | "pass" | "fail"; severity?: "info" | "critical" | "high" | "medium" | "low" | undefined; category?: string | undefined; evidenceDigest?: string | undefined; detail?: string | undefined; }[]; }; scalability: { status: "warn" | "pass" | "fail" | "not_assessed"; summary: string; score: number; checks: { title: string; id: string; status: "warn" | "pass" | "fail"; severity?: "info" | "critical" | "high" | "medium" | "low" | undefined; category?: string | undefined; evidenceDigest?: string | undefined; detail?: string | undefined; }[]; }; compliance: { frameworks: { framework: string; controlsTotal: number; controlsAtRisk: number; controlsSatisfied: number; controlsFailed: number; controls?: { title: string; status: "failed" | "at_risk" | "satisfied" | "not_applicable"; controlId: string; }[] | undefined; }[]; status: "warn" | "pass" | "fail" | "not_assessed"; summary: string; score: number; }; explainability: { status: "warn" | "pass" | "fail" | "not_assessed"; summary: string; score: number; checks: { title: string; id: string; status: "warn" | "pass" | "fail"; severity?: "info" | "critical" | "high" | "medium" | "low" | undefined; category?: string | undefined; evidenceDigest?: string | undefined; detail?: string | undefined; }[]; }; aiBom: { status: "warn" | "pass" | "fail" | "not_assessed"; summary: string; score: number; components: { name: string; kind: "tool" | "model" | "prompt" | "dependency" | "dataset"; version?: string | undefined; provider?: string | undefined; role?: string | undefined; digest?: string | undefined; }[]; }; }, { security: { status: "warn" | "pass" | "fail" | "not_assessed"; summary: string; score: number; checks: { title: string; id: string; status: "warn" | "pass" | "fail"; severity?: "info" | "critical" | "high" | "medium" | "low" | undefined; category?: string | undefined; evidenceDigest?: string | undefined; detail?: string | undefined; }[]; }; quality: { status: "warn" | "pass" | "fail" | "not_assessed"; summary: string; score: number; checks: { title: string; id: string; status: "warn" | "pass" | "fail"; severity?: "info" | "critical" | "high" | "medium" | "low" | undefined; category?: string | undefined; evidenceDigest?: string | undefined; detail?: string | undefined; }[]; }; scalability: { status: "warn" | "pass" | "fail" | "not_assessed"; summary: string; score: number; checks: { title: string; id: string; status: "warn" | "pass" | "fail"; severity?: "info" | "critical" | "high" | "medium" | "low" | undefined; category?: string | undefined; evidenceDigest?: string | undefined; detail?: string | undefined; }[]; }; compliance: { frameworks: { framework: string; controlsTotal: number; controlsAtRisk: number; controlsSatisfied: number; controlsFailed: number; controls?: { title: string; status: "failed" | "at_risk" | "satisfied" | "not_applicable"; controlId: string; }[] | undefined; }[]; status: "warn" | "pass" | "fail" | "not_assessed"; summary: string; score: number; }; explainability: { status: "warn" | "pass" | "fail" | "not_assessed"; summary: string; score: number; checks: { title: string; id: string; status: "warn" | "pass" | "fail"; severity?: "info" | "critical" | "high" | "medium" | "low" | undefined; category?: string | undefined; evidenceDigest?: string | undefined; detail?: string | undefined; }[]; }; aiBom: { status: "warn" | "pass" | "fail" | "not_assessed"; summary: string; score: number; components: { name: string; kind: "tool" | "model" | "prompt" | "dependency" | "dataset"; version?: string | undefined; provider?: string | undefined; role?: string | undefined; digest?: string | undefined; }[]; }; }>; provenance: z.ZodObject<{ auditTrailHead: z.ZodOptional; evidenceBundleId: z.ZodOptional; evidenceBundleDigest: z.ZodOptional; decisionRecords: z.ZodOptional; }, "strip", z.ZodTypeAny, { auditTrailHead?: string | undefined; decisionRecords?: number | undefined; evidenceBundleId?: string | undefined; evidenceBundleDigest?: string | undefined; }, { auditTrailHead?: string | undefined; decisionRecords?: number | undefined; evidenceBundleId?: string | undefined; evidenceBundleDigest?: string | undefined; }>; evidence: z.ZodArray, "many">; }, "strip", z.ZodTypeAny, { level: "CERTIFIED" | "APPROVED" | "REVIEW_REQUIRED" | "BLOCKED"; evidence: { name: string; type: string; digest: string; }[]; expiresAt: string; issuer: { name: string; tool: string; toolVersion: string; actor?: { id: string; type: "user" | "service" | "system"; name?: string | undefined; email?: string | undefined; } | undefined; }; subject: { name: string; kind: "agent" | "mcp-server" | "codebase"; version?: string | undefined; description?: string | undefined; digest?: string | undefined; identifier?: string | undefined; }; provenance: { auditTrailHead?: string | undefined; decisionRecords?: number | undefined; evidenceBundleId?: string | undefined; evidenceBundleDigest?: string | undefined; }; schemaVersion: "https://vaspera.dev/schemas/agent-certificate/v1"; certificateId: string; issuedAt: string; overallScore: number; dimensions: { security: { status: "warn" | "pass" | "fail" | "not_assessed"; summary: string; score: number; checks: { title: string; id: string; status: "warn" | "pass" | "fail"; severity?: "info" | "critical" | "high" | "medium" | "low" | undefined; category?: string | undefined; evidenceDigest?: string | undefined; detail?: string | undefined; }[]; }; quality: { status: "warn" | "pass" | "fail" | "not_assessed"; summary: string; score: number; checks: { title: string; id: string; status: "warn" | "pass" | "fail"; severity?: "info" | "critical" | "high" | "medium" | "low" | undefined; category?: string | undefined; evidenceDigest?: string | undefined; detail?: string | undefined; }[]; }; scalability: { status: "warn" | "pass" | "fail" | "not_assessed"; summary: string; score: number; checks: { title: string; id: string; status: "warn" | "pass" | "fail"; severity?: "info" | "critical" | "high" | "medium" | "low" | undefined; category?: string | undefined; evidenceDigest?: string | undefined; detail?: string | undefined; }[]; }; compliance: { frameworks: { framework: string; controlsTotal: number; controlsAtRisk: number; controlsSatisfied: number; controlsFailed: number; controls?: { title: string; status: "failed" | "at_risk" | "satisfied" | "not_applicable"; controlId: string; }[] | undefined; }[]; status: "warn" | "pass" | "fail" | "not_assessed"; summary: string; score: number; }; explainability: { status: "warn" | "pass" | "fail" | "not_assessed"; summary: string; score: number; checks: { title: string; id: string; status: "warn" | "pass" | "fail"; severity?: "info" | "critical" | "high" | "medium" | "low" | undefined; category?: string | undefined; evidenceDigest?: string | undefined; detail?: string | undefined; }[]; }; aiBom: { status: "warn" | "pass" | "fail" | "not_assessed"; summary: string; score: number; components: { name: string; kind: "tool" | "model" | "prompt" | "dependency" | "dataset"; version?: string | undefined; provider?: string | undefined; role?: string | undefined; digest?: string | undefined; }[]; }; }; }, { level: "CERTIFIED" | "APPROVED" | "REVIEW_REQUIRED" | "BLOCKED"; evidence: { name: string; type: string; digest: string; }[]; expiresAt: string; issuer: { name: string; tool: string; toolVersion: string; actor?: { id: string; type: "user" | "service" | "system"; name?: string | undefined; email?: string | undefined; } | undefined; }; subject: { name: string; kind: "agent" | "mcp-server" | "codebase"; version?: string | undefined; description?: string | undefined; digest?: string | undefined; identifier?: string | undefined; }; provenance: { auditTrailHead?: string | undefined; decisionRecords?: number | undefined; evidenceBundleId?: string | undefined; evidenceBundleDigest?: string | undefined; }; schemaVersion: "https://vaspera.dev/schemas/agent-certificate/v1"; certificateId: string; issuedAt: string; overallScore: number; dimensions: { security: { status: "warn" | "pass" | "fail" | "not_assessed"; summary: string; score: number; checks: { title: string; id: string; status: "warn" | "pass" | "fail"; severity?: "info" | "critical" | "high" | "medium" | "low" | undefined; category?: string | undefined; evidenceDigest?: string | undefined; detail?: string | undefined; }[]; }; quality: { status: "warn" | "pass" | "fail" | "not_assessed"; summary: string; score: number; checks: { title: string; id: string; status: "warn" | "pass" | "fail"; severity?: "info" | "critical" | "high" | "medium" | "low" | undefined; category?: string | undefined; evidenceDigest?: string | undefined; detail?: string | undefined; }[]; }; scalability: { status: "warn" | "pass" | "fail" | "not_assessed"; summary: string; score: number; checks: { title: string; id: string; status: "warn" | "pass" | "fail"; severity?: "info" | "critical" | "high" | "medium" | "low" | undefined; category?: string | undefined; evidenceDigest?: string | undefined; detail?: string | undefined; }[]; }; compliance: { frameworks: { framework: string; controlsTotal: number; controlsAtRisk: number; controlsSatisfied: number; controlsFailed: number; controls?: { title: string; status: "failed" | "at_risk" | "satisfied" | "not_applicable"; controlId: string; }[] | undefined; }[]; status: "warn" | "pass" | "fail" | "not_assessed"; summary: string; score: number; }; explainability: { status: "warn" | "pass" | "fail" | "not_assessed"; summary: string; score: number; checks: { title: string; id: string; status: "warn" | "pass" | "fail"; severity?: "info" | "critical" | "high" | "medium" | "low" | undefined; category?: string | undefined; evidenceDigest?: string | undefined; detail?: string | undefined; }[]; }; aiBom: { status: "warn" | "pass" | "fail" | "not_assessed"; summary: string; score: number; components: { name: string; kind: "tool" | "model" | "prompt" | "dependency" | "dataset"; version?: string | undefined; provider?: string | undefined; role?: string | undefined; digest?: string | undefined; }[]; }; }; }>; /** The full, finalized certificate. */ export declare const AgentCertificateSchema: z.ZodObject<{ schemaVersion: z.ZodLiteral<"https://vaspera.dev/schemas/agent-certificate/v1">; certificateId: z.ZodString; subject: z.ZodObject<{ kind: z.ZodEnum<["agent", "mcp-server", "codebase"]>; name: z.ZodString; version: z.ZodOptional; identifier: z.ZodOptional; description: z.ZodOptional; digest: z.ZodOptional; }, "strip", z.ZodTypeAny, { name: string; kind: "agent" | "mcp-server" | "codebase"; version?: string | undefined; description?: string | undefined; digest?: string | undefined; identifier?: string | undefined; }, { name: string; kind: "agent" | "mcp-server" | "codebase"; version?: string | undefined; description?: string | undefined; digest?: string | undefined; identifier?: string | undefined; }>; issuer: z.ZodObject<{ name: z.ZodString; tool: z.ZodString; toolVersion: z.ZodString; actor: z.ZodOptional; id: z.ZodString; name: z.ZodOptional; email: z.ZodOptional; }, "strip", z.ZodTypeAny, { id: string; type: "user" | "service" | "system"; name?: string | undefined; email?: string | undefined; }, { id: string; type: "user" | "service" | "system"; name?: string | undefined; email?: string | undefined; }>>; }, "strip", z.ZodTypeAny, { name: string; tool: string; toolVersion: string; actor?: { id: string; type: "user" | "service" | "system"; name?: string | undefined; email?: string | undefined; } | undefined; }, { name: string; tool: string; toolVersion: string; actor?: { id: string; type: "user" | "service" | "system"; name?: string | undefined; email?: string | undefined; } | undefined; }>; issuedAt: z.ZodString; expiresAt: z.ZodString; level: z.ZodEnum<["CERTIFIED", "APPROVED", "REVIEW_REQUIRED", "BLOCKED"]>; overallScore: z.ZodNumber; dimensions: z.ZodObject<{ security: z.ZodObject<{ status: z.ZodEnum<["pass", "warn", "fail", "not_assessed"]>; score: z.ZodNumber; summary: z.ZodString; checks: z.ZodArray; severity: z.ZodOptional>; category: z.ZodOptional; evidenceDigest: z.ZodOptional; detail: z.ZodOptional; }, "strip", z.ZodTypeAny, { title: string; id: string; status: "warn" | "pass" | "fail"; severity?: "info" | "critical" | "high" | "medium" | "low" | undefined; category?: string | undefined; evidenceDigest?: string | undefined; detail?: string | undefined; }, { title: string; id: string; status: "warn" | "pass" | "fail"; severity?: "info" | "critical" | "high" | "medium" | "low" | undefined; category?: string | undefined; evidenceDigest?: string | undefined; detail?: string | undefined; }>, "many">; }, "strip", z.ZodTypeAny, { status: "warn" | "pass" | "fail" | "not_assessed"; summary: string; score: number; checks: { title: string; id: string; status: "warn" | "pass" | "fail"; severity?: "info" | "critical" | "high" | "medium" | "low" | undefined; category?: string | undefined; evidenceDigest?: string | undefined; detail?: string | undefined; }[]; }, { status: "warn" | "pass" | "fail" | "not_assessed"; summary: string; score: number; checks: { title: string; id: string; status: "warn" | "pass" | "fail"; severity?: "info" | "critical" | "high" | "medium" | "low" | undefined; category?: string | undefined; evidenceDigest?: string | undefined; detail?: string | undefined; }[]; }>; scalability: z.ZodObject<{ status: z.ZodEnum<["pass", "warn", "fail", "not_assessed"]>; score: z.ZodNumber; summary: z.ZodString; checks: z.ZodArray; severity: z.ZodOptional>; category: z.ZodOptional; evidenceDigest: z.ZodOptional; detail: z.ZodOptional; }, "strip", z.ZodTypeAny, { title: string; id: string; status: "warn" | "pass" | "fail"; severity?: "info" | "critical" | "high" | "medium" | "low" | undefined; category?: string | undefined; evidenceDigest?: string | undefined; detail?: string | undefined; }, { title: string; id: string; status: "warn" | "pass" | "fail"; severity?: "info" | "critical" | "high" | "medium" | "low" | undefined; category?: string | undefined; evidenceDigest?: string | undefined; detail?: string | undefined; }>, "many">; }, "strip", z.ZodTypeAny, { status: "warn" | "pass" | "fail" | "not_assessed"; summary: string; score: number; checks: { title: string; id: string; status: "warn" | "pass" | "fail"; severity?: "info" | "critical" | "high" | "medium" | "low" | undefined; category?: string | undefined; evidenceDigest?: string | undefined; detail?: string | undefined; }[]; }, { status: "warn" | "pass" | "fail" | "not_assessed"; summary: string; score: number; checks: { title: string; id: string; status: "warn" | "pass" | "fail"; severity?: "info" | "critical" | "high" | "medium" | "low" | undefined; category?: string | undefined; evidenceDigest?: string | undefined; detail?: string | undefined; }[]; }>; quality: z.ZodObject<{ status: z.ZodEnum<["pass", "warn", "fail", "not_assessed"]>; score: z.ZodNumber; summary: z.ZodString; checks: z.ZodArray; severity: z.ZodOptional>; category: z.ZodOptional; evidenceDigest: z.ZodOptional; detail: z.ZodOptional; }, "strip", z.ZodTypeAny, { title: string; id: string; status: "warn" | "pass" | "fail"; severity?: "info" | "critical" | "high" | "medium" | "low" | undefined; category?: string | undefined; evidenceDigest?: string | undefined; detail?: string | undefined; }, { title: string; id: string; status: "warn" | "pass" | "fail"; severity?: "info" | "critical" | "high" | "medium" | "low" | undefined; category?: string | undefined; evidenceDigest?: string | undefined; detail?: string | undefined; }>, "many">; }, "strip", z.ZodTypeAny, { status: "warn" | "pass" | "fail" | "not_assessed"; summary: string; score: number; checks: { title: string; id: string; status: "warn" | "pass" | "fail"; severity?: "info" | "critical" | "high" | "medium" | "low" | undefined; category?: string | undefined; evidenceDigest?: string | undefined; detail?: string | undefined; }[]; }, { status: "warn" | "pass" | "fail" | "not_assessed"; summary: string; score: number; checks: { title: string; id: string; status: "warn" | "pass" | "fail"; severity?: "info" | "critical" | "high" | "medium" | "low" | undefined; category?: string | undefined; evidenceDigest?: string | undefined; detail?: string | undefined; }[]; }>; explainability: z.ZodObject<{ status: z.ZodEnum<["pass", "warn", "fail", "not_assessed"]>; score: z.ZodNumber; summary: z.ZodString; checks: z.ZodArray; severity: z.ZodOptional>; category: z.ZodOptional; evidenceDigest: z.ZodOptional; detail: z.ZodOptional; }, "strip", z.ZodTypeAny, { title: string; id: string; status: "warn" | "pass" | "fail"; severity?: "info" | "critical" | "high" | "medium" | "low" | undefined; category?: string | undefined; evidenceDigest?: string | undefined; detail?: string | undefined; }, { title: string; id: string; status: "warn" | "pass" | "fail"; severity?: "info" | "critical" | "high" | "medium" | "low" | undefined; category?: string | undefined; evidenceDigest?: string | undefined; detail?: string | undefined; }>, "many">; }, "strip", z.ZodTypeAny, { status: "warn" | "pass" | "fail" | "not_assessed"; summary: string; score: number; checks: { title: string; id: string; status: "warn" | "pass" | "fail"; severity?: "info" | "critical" | "high" | "medium" | "low" | undefined; category?: string | undefined; evidenceDigest?: string | undefined; detail?: string | undefined; }[]; }, { status: "warn" | "pass" | "fail" | "not_assessed"; summary: string; score: number; checks: { title: string; id: string; status: "warn" | "pass" | "fail"; severity?: "info" | "critical" | "high" | "medium" | "low" | undefined; category?: string | undefined; evidenceDigest?: string | undefined; detail?: string | undefined; }[]; }>; compliance: z.ZodObject<{ status: z.ZodEnum<["pass", "warn", "fail", "not_assessed"]>; score: z.ZodNumber; summary: z.ZodString; frameworks: z.ZodArray; }, "strip", z.ZodTypeAny, { title: string; status: "failed" | "at_risk" | "satisfied" | "not_applicable"; controlId: string; }, { title: string; status: "failed" | "at_risk" | "satisfied" | "not_applicable"; controlId: string; }>, "many">>; }, "strip", z.ZodTypeAny, { framework: string; controlsTotal: number; controlsAtRisk: number; controlsSatisfied: number; controlsFailed: number; controls?: { title: string; status: "failed" | "at_risk" | "satisfied" | "not_applicable"; controlId: string; }[] | undefined; }, { framework: string; controlsTotal: number; controlsAtRisk: number; controlsSatisfied: number; controlsFailed: number; controls?: { title: string; status: "failed" | "at_risk" | "satisfied" | "not_applicable"; controlId: string; }[] | undefined; }>, "many">; }, "strip", z.ZodTypeAny, { frameworks: { framework: string; controlsTotal: number; controlsAtRisk: number; controlsSatisfied: number; controlsFailed: number; controls?: { title: string; status: "failed" | "at_risk" | "satisfied" | "not_applicable"; controlId: string; }[] | undefined; }[]; status: "warn" | "pass" | "fail" | "not_assessed"; summary: string; score: number; }, { frameworks: { framework: string; controlsTotal: number; controlsAtRisk: number; controlsSatisfied: number; controlsFailed: number; controls?: { title: string; status: "failed" | "at_risk" | "satisfied" | "not_applicable"; controlId: string; }[] | undefined; }[]; status: "warn" | "pass" | "fail" | "not_assessed"; summary: string; score: number; }>; aiBom: z.ZodObject<{ status: z.ZodEnum<["pass", "warn", "fail", "not_assessed"]>; score: z.ZodNumber; summary: z.ZodString; components: z.ZodArray; version: z.ZodOptional; provider: z.ZodOptional; role: z.ZodOptional; digest: z.ZodOptional; }, "strip", z.ZodTypeAny, { name: string; kind: "tool" | "model" | "prompt" | "dependency" | "dataset"; version?: string | undefined; provider?: string | undefined; role?: string | undefined; digest?: string | undefined; }, { name: string; kind: "tool" | "model" | "prompt" | "dependency" | "dataset"; version?: string | undefined; provider?: string | undefined; role?: string | undefined; digest?: string | undefined; }>, "many">; }, "strip", z.ZodTypeAny, { status: "warn" | "pass" | "fail" | "not_assessed"; summary: string; score: number; components: { name: string; kind: "tool" | "model" | "prompt" | "dependency" | "dataset"; version?: string | undefined; provider?: string | undefined; role?: string | undefined; digest?: string | undefined; }[]; }, { status: "warn" | "pass" | "fail" | "not_assessed"; summary: string; score: number; components: { name: string; kind: "tool" | "model" | "prompt" | "dependency" | "dataset"; version?: string | undefined; provider?: string | undefined; role?: string | undefined; digest?: string | undefined; }[]; }>; }, "strip", z.ZodTypeAny, { security: { status: "warn" | "pass" | "fail" | "not_assessed"; summary: string; score: number; checks: { title: string; id: string; status: "warn" | "pass" | "fail"; severity?: "info" | "critical" | "high" | "medium" | "low" | undefined; category?: string | undefined; evidenceDigest?: string | undefined; detail?: string | undefined; }[]; }; quality: { status: "warn" | "pass" | "fail" | "not_assessed"; summary: string; score: number; checks: { title: string; id: string; status: "warn" | "pass" | "fail"; severity?: "info" | "critical" | "high" | "medium" | "low" | undefined; category?: string | undefined; evidenceDigest?: string | undefined; detail?: string | undefined; }[]; }; scalability: { status: "warn" | "pass" | "fail" | "not_assessed"; summary: string; score: number; checks: { title: string; id: string; status: "warn" | "pass" | "fail"; severity?: "info" | "critical" | "high" | "medium" | "low" | undefined; category?: string | undefined; evidenceDigest?: string | undefined; detail?: string | undefined; }[]; }; compliance: { frameworks: { framework: string; controlsTotal: number; controlsAtRisk: number; controlsSatisfied: number; controlsFailed: number; controls?: { title: string; status: "failed" | "at_risk" | "satisfied" | "not_applicable"; controlId: string; }[] | undefined; }[]; status: "warn" | "pass" | "fail" | "not_assessed"; summary: string; score: number; }; explainability: { status: "warn" | "pass" | "fail" | "not_assessed"; summary: string; score: number; checks: { title: string; id: string; status: "warn" | "pass" | "fail"; severity?: "info" | "critical" | "high" | "medium" | "low" | undefined; category?: string | undefined; evidenceDigest?: string | undefined; detail?: string | undefined; }[]; }; aiBom: { status: "warn" | "pass" | "fail" | "not_assessed"; summary: string; score: number; components: { name: string; kind: "tool" | "model" | "prompt" | "dependency" | "dataset"; version?: string | undefined; provider?: string | undefined; role?: string | undefined; digest?: string | undefined; }[]; }; }, { security: { status: "warn" | "pass" | "fail" | "not_assessed"; summary: string; score: number; checks: { title: string; id: string; status: "warn" | "pass" | "fail"; severity?: "info" | "critical" | "high" | "medium" | "low" | undefined; category?: string | undefined; evidenceDigest?: string | undefined; detail?: string | undefined; }[]; }; quality: { status: "warn" | "pass" | "fail" | "not_assessed"; summary: string; score: number; checks: { title: string; id: string; status: "warn" | "pass" | "fail"; severity?: "info" | "critical" | "high" | "medium" | "low" | undefined; category?: string | undefined; evidenceDigest?: string | undefined; detail?: string | undefined; }[]; }; scalability: { status: "warn" | "pass" | "fail" | "not_assessed"; summary: string; score: number; checks: { title: string; id: string; status: "warn" | "pass" | "fail"; severity?: "info" | "critical" | "high" | "medium" | "low" | undefined; category?: string | undefined; evidenceDigest?: string | undefined; detail?: string | undefined; }[]; }; compliance: { frameworks: { framework: string; controlsTotal: number; controlsAtRisk: number; controlsSatisfied: number; controlsFailed: number; controls?: { title: string; status: "failed" | "at_risk" | "satisfied" | "not_applicable"; controlId: string; }[] | undefined; }[]; status: "warn" | "pass" | "fail" | "not_assessed"; summary: string; score: number; }; explainability: { status: "warn" | "pass" | "fail" | "not_assessed"; summary: string; score: number; checks: { title: string; id: string; status: "warn" | "pass" | "fail"; severity?: "info" | "critical" | "high" | "medium" | "low" | undefined; category?: string | undefined; evidenceDigest?: string | undefined; detail?: string | undefined; }[]; }; aiBom: { status: "warn" | "pass" | "fail" | "not_assessed"; summary: string; score: number; components: { name: string; kind: "tool" | "model" | "prompt" | "dependency" | "dataset"; version?: string | undefined; provider?: string | undefined; role?: string | undefined; digest?: string | undefined; }[]; }; }>; provenance: z.ZodObject<{ auditTrailHead: z.ZodOptional; evidenceBundleId: z.ZodOptional; evidenceBundleDigest: z.ZodOptional; decisionRecords: z.ZodOptional; }, "strip", z.ZodTypeAny, { auditTrailHead?: string | undefined; decisionRecords?: number | undefined; evidenceBundleId?: string | undefined; evidenceBundleDigest?: string | undefined; }, { auditTrailHead?: string | undefined; decisionRecords?: number | undefined; evidenceBundleId?: string | undefined; evidenceBundleDigest?: string | undefined; }>; evidence: z.ZodArray, "many">; } & { integrity: z.ZodObject<{ algorithm: z.ZodLiteral<"sha256">; canonicalization: z.ZodLiteral<"sorted-keys-json">; contentDigest: z.ZodString; }, "strip", z.ZodTypeAny, { algorithm: "sha256"; canonicalization: "sorted-keys-json"; contentDigest: string; }, { algorithm: "sha256"; canonicalization: "sorted-keys-json"; contentDigest: string; }>; signature: z.ZodOptional; /** Full Sigstore bundle (omitted when unsigned). */ bundle: z.ZodOptional; error: z.ZodOptional; }, "strip", z.ZodTypeAny, { signed: boolean; signedAt: string; digest: string; mediaType: string; error?: string | undefined; rekorLogIndex?: string | undefined; bundle?: unknown; }, { signed: boolean; signedAt: string; digest: string; mediaType: string; error?: string | undefined; rekorLogIndex?: string | undefined; bundle?: unknown; }>>; }, "strip", z.ZodTypeAny, { level: "CERTIFIED" | "APPROVED" | "REVIEW_REQUIRED" | "BLOCKED"; evidence: { name: string; type: string; digest: string; }[]; expiresAt: string; integrity: { algorithm: "sha256"; canonicalization: "sorted-keys-json"; contentDigest: string; }; issuer: { name: string; tool: string; toolVersion: string; actor?: { id: string; type: "user" | "service" | "system"; name?: string | undefined; email?: string | undefined; } | undefined; }; subject: { name: string; kind: "agent" | "mcp-server" | "codebase"; version?: string | undefined; description?: string | undefined; digest?: string | undefined; identifier?: string | undefined; }; provenance: { auditTrailHead?: string | undefined; decisionRecords?: number | undefined; evidenceBundleId?: string | undefined; evidenceBundleDigest?: string | undefined; }; schemaVersion: "https://vaspera.dev/schemas/agent-certificate/v1"; certificateId: string; issuedAt: string; overallScore: number; dimensions: { security: { status: "warn" | "pass" | "fail" | "not_assessed"; summary: string; score: number; checks: { title: string; id: string; status: "warn" | "pass" | "fail"; severity?: "info" | "critical" | "high" | "medium" | "low" | undefined; category?: string | undefined; evidenceDigest?: string | undefined; detail?: string | undefined; }[]; }; quality: { status: "warn" | "pass" | "fail" | "not_assessed"; summary: string; score: number; checks: { title: string; id: string; status: "warn" | "pass" | "fail"; severity?: "info" | "critical" | "high" | "medium" | "low" | undefined; category?: string | undefined; evidenceDigest?: string | undefined; detail?: string | undefined; }[]; }; scalability: { status: "warn" | "pass" | "fail" | "not_assessed"; summary: string; score: number; checks: { title: string; id: string; status: "warn" | "pass" | "fail"; severity?: "info" | "critical" | "high" | "medium" | "low" | undefined; category?: string | undefined; evidenceDigest?: string | undefined; detail?: string | undefined; }[]; }; compliance: { frameworks: { framework: string; controlsTotal: number; controlsAtRisk: number; controlsSatisfied: number; controlsFailed: number; controls?: { title: string; status: "failed" | "at_risk" | "satisfied" | "not_applicable"; controlId: string; }[] | undefined; }[]; status: "warn" | "pass" | "fail" | "not_assessed"; summary: string; score: number; }; explainability: { status: "warn" | "pass" | "fail" | "not_assessed"; summary: string; score: number; checks: { title: string; id: string; status: "warn" | "pass" | "fail"; severity?: "info" | "critical" | "high" | "medium" | "low" | undefined; category?: string | undefined; evidenceDigest?: string | undefined; detail?: string | undefined; }[]; }; aiBom: { status: "warn" | "pass" | "fail" | "not_assessed"; summary: string; score: number; components: { name: string; kind: "tool" | "model" | "prompt" | "dependency" | "dataset"; version?: string | undefined; provider?: string | undefined; role?: string | undefined; digest?: string | undefined; }[]; }; }; signature?: { signed: boolean; signedAt: string; digest: string; mediaType: string; error?: string | undefined; rekorLogIndex?: string | undefined; bundle?: unknown; } | undefined; }, { level: "CERTIFIED" | "APPROVED" | "REVIEW_REQUIRED" | "BLOCKED"; evidence: { name: string; type: string; digest: string; }[]; expiresAt: string; integrity: { algorithm: "sha256"; canonicalization: "sorted-keys-json"; contentDigest: string; }; issuer: { name: string; tool: string; toolVersion: string; actor?: { id: string; type: "user" | "service" | "system"; name?: string | undefined; email?: string | undefined; } | undefined; }; subject: { name: string; kind: "agent" | "mcp-server" | "codebase"; version?: string | undefined; description?: string | undefined; digest?: string | undefined; identifier?: string | undefined; }; provenance: { auditTrailHead?: string | undefined; decisionRecords?: number | undefined; evidenceBundleId?: string | undefined; evidenceBundleDigest?: string | undefined; }; schemaVersion: "https://vaspera.dev/schemas/agent-certificate/v1"; certificateId: string; issuedAt: string; overallScore: number; dimensions: { security: { status: "warn" | "pass" | "fail" | "not_assessed"; summary: string; score: number; checks: { title: string; id: string; status: "warn" | "pass" | "fail"; severity?: "info" | "critical" | "high" | "medium" | "low" | undefined; category?: string | undefined; evidenceDigest?: string | undefined; detail?: string | undefined; }[]; }; quality: { status: "warn" | "pass" | "fail" | "not_assessed"; summary: string; score: number; checks: { title: string; id: string; status: "warn" | "pass" | "fail"; severity?: "info" | "critical" | "high" | "medium" | "low" | undefined; category?: string | undefined; evidenceDigest?: string | undefined; detail?: string | undefined; }[]; }; scalability: { status: "warn" | "pass" | "fail" | "not_assessed"; summary: string; score: number; checks: { title: string; id: string; status: "warn" | "pass" | "fail"; severity?: "info" | "critical" | "high" | "medium" | "low" | undefined; category?: string | undefined; evidenceDigest?: string | undefined; detail?: string | undefined; }[]; }; compliance: { frameworks: { framework: string; controlsTotal: number; controlsAtRisk: number; controlsSatisfied: number; controlsFailed: number; controls?: { title: string; status: "failed" | "at_risk" | "satisfied" | "not_applicable"; controlId: string; }[] | undefined; }[]; status: "warn" | "pass" | "fail" | "not_assessed"; summary: string; score: number; }; explainability: { status: "warn" | "pass" | "fail" | "not_assessed"; summary: string; score: number; checks: { title: string; id: string; status: "warn" | "pass" | "fail"; severity?: "info" | "critical" | "high" | "medium" | "low" | undefined; category?: string | undefined; evidenceDigest?: string | undefined; detail?: string | undefined; }[]; }; aiBom: { status: "warn" | "pass" | "fail" | "not_assessed"; summary: string; score: number; components: { name: string; kind: "tool" | "model" | "prompt" | "dependency" | "dataset"; version?: string | undefined; provider?: string | undefined; role?: string | undefined; digest?: string | undefined; }[]; }; }; signature?: { signed: boolean; signedAt: string; digest: string; mediaType: string; error?: string | undefined; rekorLogIndex?: string | undefined; bundle?: unknown; } | undefined; }>; export type AgentCertificateBody = z.infer; export type AgentCertificate = z.infer; export type DimensionResult = z.infer; export type DimensionCheck = z.infer; /** Deterministic JSON for a certificate body (stable across machines). */ export declare function canonicalize(body: AgentCertificateBody): string; /** sha256 over the canonical body. */ export declare function computeContentDigest(body: AgentCertificateBody): string; export interface FinalizeOptions { /** Attempt Sigstore signing (requires OIDC; falls back to unsigned). */ sign?: boolean; signingOptions?: SigningOptions; } /** * Turn a validated body into a finalized certificate: attach the content * digest and, if requested and possible, a Sigstore signature. Signing * gracefully degrades to an unsigned-but-digested certificate when no * OIDC identity is available (e.g. local dev) — the digest still makes it * tamper-evident. */ export declare function finalizeCertificate(body: AgentCertificateBody, options?: FinalizeOptions): Promise; export interface VerifyCertificateResult { valid: boolean; schemaValid: boolean; contentDigestValid: boolean; signaturePresent: boolean; signatureValid?: boolean; errors: string[]; } /** * Verify a certificate without trusting the issuer: re-validate the * schema, recompute the content digest from the canonical body, and (if * present) check the Sigstore signature. */ export declare function verifyCertificate(certificate: unknown): Promise; /** Parse + validate an arbitrary object as an AgentCertificate. */ export declare function parseCertificate(value: unknown): AgentCertificate; export {}; //# sourceMappingURL=agent-certificate.d.ts.map