/** * Standalone certificate verification (Phase 3 — independent attestation). * * The point of an Agent Certificate is that a third party can verify it * WITHOUT trusting Vaspera: re-validate the schema, recompute the content * digest from the canonical body, and check the Sigstore signature. This * module wraps that core (`verifyCertificate`) into a single pure handler * shared by the public HTTP `/verify` endpoint and the `verify:cert` CLI, * adding the things a verifier also wants to know — has it expired, and * what does it actually claim — without changing the cryptographic verdict. * * It is intentionally read-only and stateless: it touches no secrets, no * filesystem, and no server state. That is what makes it safe to expose * unauthenticated. * * @module certification/verify-endpoint */ import { type VerifyCertificateResult } from "./agent-certificate.js"; /** What the certificate asserts (only surfaced when the schema is valid). */ export interface CertificateClaims { certificateId: string; subject: { kind: string; name: string; version?: string; identifier?: string; }; level: string; overallScore: number; issuedAt: string; expiresAt: string; } export interface CertificateVerificationResponse extends VerifyCertificateResult { /** True if `expiresAt` is in the past relative to `now`. */ expired?: boolean; /** Non-fatal observations (e.g. expired, unsigned). */ warnings: string[]; /** The certificate's own assertions, when structurally valid. */ claims?: CertificateClaims; /** One-line human-readable verdict. */ summary: string; } /** * Verify a parsed certificate document. `now` is injectable so the result * is deterministic in tests; it defaults to wall-clock time in callers. */ export declare function verifyCertificatePayload(raw: unknown, now?: Date): Promise; //# sourceMappingURL=verify-endpoint.d.ts.map