import type { DeliveryReadinessErrorCode } from "@a4anthony/proctorkit-types"; export type { DeliveryReadinessErrorCode } from "@a4anthony/proctorkit-types"; /** * Mandatory evidence-delivery verification failed. This is deliberately an * observable error, not a configurable feature: hosts can explain or log the * failure but cannot weaken the readiness gate. */ export class DeliveryReadinessError extends Error { readonly code: DeliveryReadinessErrorCode; readonly status: number | undefined; /** Structured operator diagnostics. Never render this object in candidate UI. */ readonly details: Readonly> | undefined; constructor( code: DeliveryReadinessErrorCode, message: string, options?: { cause?: unknown; status?: number; details?: Readonly>; }, ) { super(message, options?.cause !== undefined ? { cause: options.cause } : undefined); this.name = "DeliveryReadinessError"; this.code = code; this.status = options?.status; this.details = options?.details; } }