/** * Compliance Report Generator * * Maps verified Clawsig proof bundles to enterprise compliance framework controls. * P9 (Revenue): SOC2 is the wedge, EU AI Act is the whale. * * Mapping rules (from Gemini Deep Think Round 2): * CC6.1 (Logical Access) <- WPC allowed_models + proof_tier * CC6.2 (System Boundaries) <- side_effect_receipts (network_egress) * CC7.1 (Detection of Changes) <- tool_receipts (file changes) * CC7.2 (Monitoring) <- event_chain existence + log_inclusion_proof * CC8.1 (Change Management) <- human_approval_receipts OR gateway_receipt tier */ export type ComplianceFramework = 'SOC2_Type2' | 'ISO27001' | 'EU_AI_Act' | 'NIST_AI_RMF'; export type ControlStatus = 'PASS' | 'FAIL' | 'NOT_APPLICABLE' | 'INSUFFICIENT_EVIDENCE'; export type EvidenceType = 'gateway_receipt' | 'tool_receipt' | 'side_effect_receipt' | 'human_approval_receipt' | 'wpc' | 'event_chain' | 'delegation_receipt' | 'log_inclusion_proof'; export interface ControlResult { control_id: string; control_name: string; status: ControlStatus; evidence_type?: EvidenceType; evidence_ref?: string; narrative?: string; } export interface ComplianceGap { control_id: string; description: string; recommendation: string; } export interface ComplianceReport { report_version: '1'; framework: ComplianceFramework; generated_at: string; proof_bundle_hash_b64u: string; agent_did: string; policy_hash_b64u?: string; controls: ControlResult[]; gaps: ComplianceGap[]; } export interface ComplianceBundleInput { bundle_version?: string; bundle_id?: string; agent_did: string; event_chain?: unknown[]; receipts?: Array<{ payload?: { receipt_id?: string; model?: string; [key: string]: unknown; }; [key: string]: unknown; }>; tool_receipts?: Array<{ receipt_id?: string; tool_name?: string; [key: string]: unknown; }>; side_effect_receipts?: Array<{ receipt_id?: string; effect_class?: string; [key: string]: unknown; }>; human_approval_receipts?: Array<{ receipt_id?: string; approval_type?: string; [key: string]: unknown; }>; delegation_receipts?: Array<{ receipt_id?: string; delegate_did?: string; delegate_bundle_hash_b64u?: string; [key: string]: unknown; }>; attestations?: unknown[]; metadata?: Record; } export interface CompliancePolicyInput { /** Raw WPC hash (base64url). Used for CC6.1 evidence. */ policy_hash_b64u?: string; /** If the WPC contains allowed_models, list them here. */ allowed_models?: string[]; /** Minimum model identity tier required by the WPC. */ minimum_model_identity_tier?: string; } /** * Maps a proof bundle to SOC2 Type II controls. * * The bundle should already be verified (signature + hash chain valid). * This function evaluates evidence presence and quality, not cryptographic integrity. */ export declare function mapToSOC2(bundle: ComplianceBundleInput, policy?: CompliancePolicyInput, opts?: { bundleHash?: string; }): ComplianceReport; export declare function mapToISO27001(bundle: ComplianceBundleInput, policy?: CompliancePolicyInput, opts?: { bundleHash?: string; }): ComplianceReport; export declare function mapToEUAIAct(bundle: ComplianceBundleInput, policy?: CompliancePolicyInput, opts?: { bundleHash?: string; }): ComplianceReport; /** * Generate a compliance report for any supported framework. */ export declare function generateComplianceReport(framework: ComplianceFramework, bundle: ComplianceBundleInput, policy?: CompliancePolicyInput, opts?: { bundleHash?: string; }): ComplianceReport; //# sourceMappingURL=compliance.d.ts.map