/** * PolicyPack - named regulatory bundle for regulated AI deployment gates. * * A policy pack is data: it names the regulatory framework posture, the * FairnessSweep evidence required before deploy, the compliance artifacts the * compiler must emit, and the audit/monitoring obligations that must be armed. */ export declare const POLICY_PACK_FRAMEWORK_IDS: readonly ["EU_AI_ACT_HIGH_RISK", "NIST_AI_RMF", "ISO_42001", "CFPB_FAIR_LENDING", "NYC_LL144", "EEOC", "COLORADO_SB21_169"]; export type PolicyPackFrameworkId = (typeof POLICY_PACK_FRAMEWORK_IDS)[number]; export declare const POLICY_PACK_COMPILE_TARGETS: readonly ["bias_audit_report", "model_card", "impact_assessment", "declaration_of_conformity"]; export type PolicyPackCompileTarget = (typeof POLICY_PACK_COMPILE_TARGETS)[number]; declare const POLICY_PACK_MONITORING_INTERVALS: readonly ["per_deploy", "daily", "weekly", "monthly", "quarterly", "annual"]; export type PolicyPackMonitoringInterval = (typeof POLICY_PACK_MONITORING_INTERVALS)[number]; export interface RequiredFairnessSweep { /** Stable test id. Deployment evidence must reference this id. */ id: string; /** Protected attribute label passed to FairnessSweep. */ protectedAttribute: string; /** Optional cohort floor for the submitted receipt. */ minSampleSize?: number; /** Default regulatory four-fifths floor is 0.8 when omitted by callers. */ adverseImpactRatioMin?: number; /** Optional upper bound for demographic parity difference. */ demographicParityDiffMax?: number; /** Require a fairness.robustness.v1 receipt alongside the point estimate. */ requireRobustnessReceipt?: boolean; /** Extra sweep config that a domain bridge may pass through to FairnessSweep. */ config?: Record; } export interface PolicyPackAuditRetentionPolicy { /** Minimum retention period for receipts and artifacts. */ minDays: number; storage: 'append_only' | 'immutable_ledger' | 'external_archive'; legalHold?: boolean; } export interface PolicyPackMonitoringCadence { interval: PolicyPackMonitoringInterval; driftSweepRequired?: boolean; alertThreshold?: number; } export interface PolicyPack { type: 'PolicyPack'; name: string; version: string; frameworkId: PolicyPackFrameworkId; requiredTests: RequiredFairnessSweep[]; requiredCompileTargets: PolicyPackCompileTarget[]; auditRetention: PolicyPackAuditRetentionPolicy; monitoringCadence: PolicyPackMonitoringCadence; controlsMapping?: Record; metadata?: Record; } export type PolicyPackIssueCode = 'invalid_framework' | 'invalid_compile_target' | 'missing_required_test' | 'failed_required_test' | 'missing_compile_target' | 'audit_retention_not_armed' | 'monitoring_not_scheduled' | 'invalid_pack'; export interface PolicyPackGateIssue { code: PolicyPackIssueCode; severity: 'error' | 'warning'; message: string; testId?: string; compileTarget?: PolicyPackCompileTarget | string; } export interface PolicyPackTestEvidence { id: string; passed: boolean; receiptHash?: string; sampleSize?: number; adverseImpactRatio?: number; demographicParityDiff?: number; robustnessReceiptHash?: string; } export interface PolicyPackCompileArtifact { target: PolicyPackCompileTarget; artifactId: string; contentHash?: string; generatedAt?: string; } export interface PolicyPackDeploymentEvidence { tests: PolicyPackTestEvidence[]; compileTargets: PolicyPackCompileArtifact[]; auditRetentionAccepted?: boolean; monitoringScheduled?: boolean; } export interface PolicyPackDeploymentEvaluation { allowed: boolean; policyPack: string; frameworkId: PolicyPackFrameworkId; missingTests: string[]; failedTests: string[]; missingCompileTargets: PolicyPackCompileTarget[]; issues: PolicyPackGateIssue[]; } export interface PolicyPackSchemaBlock { name: string; version?: string; frameworkId?: string; requiredTests?: unknown[]; requiredCompileTargets?: unknown[]; auditRetention?: Record; monitoringCadence?: Record; properties?: Record; } export declare class PolicyPackDeploymentError extends Error { readonly evaluation: PolicyPackDeploymentEvaluation; constructor(evaluation: PolicyPackDeploymentEvaluation); } export declare class PolicyPackDefinitionError extends Error { readonly issues: PolicyPackGateIssue[]; constructor(issues: PolicyPackGateIssue[]); } export declare function isPolicyPackFrameworkId(value: string): value is PolicyPackFrameworkId; export declare function isPolicyPackCompileTarget(value: string): value is PolicyPackCompileTarget; export declare function validatePolicyPack(pack: PolicyPack): PolicyPackGateIssue[]; export declare function definePolicyPack(input: Omit & { type?: 'PolicyPack'; }): PolicyPack; export declare function policyPackFromSchemaBlock(block: PolicyPackSchemaBlock): PolicyPack; export declare function evaluatePolicyPackDeployment(pack: PolicyPack, evidence: PolicyPackDeploymentEvidence): PolicyPackDeploymentEvaluation; export declare function assertPolicyPackDeploymentReady(pack: PolicyPack, evidence: PolicyPackDeploymentEvidence): PolicyPackDeploymentEvaluation; export declare function defaultPolicyPackCompileTargets(): PolicyPackCompileTarget[]; export {}; //# sourceMappingURL=PolicyPack.d.ts.map