diff --git a/gien-supervisory-brief/.gitignore b/gien-supervisory-brief/.gitignore new file mode 100644 index 00000000..b9470778 --- /dev/null +++ b/gien-supervisory-brief/.gitignore @@ -0,0 +1,2 @@ +node_modules/ +dist/ diff --git a/gien-supervisory-brief/dossier/section-1-risk-operations.md b/gien-supervisory-brief/dossier/section-1-risk-operations.md new file mode 100644 index 00000000..e5c48684 --- /dev/null +++ b/gien-supervisory-brief/dossier/section-1-risk-operations.md @@ -0,0 +1,98 @@ +# Section 1: Risk & Operations + +**Filing Reference:** SGR-028-CFE-2026-07-001\ +**Governance Stack:** Omni-Sentinel Enterprise AI Governance Stack\ +**System Mesh:** GIEN Planetary and Multiversal Governance Mesh\ +**Supervisory Phase:** GIEN Phase VI-δ\ +**Evaluation Window:** 2026-10-09T09:00:00Z to 2026-10-10T09:00:00Z\ + +--- + +## 1.1 Systemic Risk Indices Overview + +The systemic-risk telemetry engine monitors 12 risk vector indices across the GIEN mesh. For the 24-hour window ending 2026-10-10T09:00:00Z, 10 indices remained NOMINAL, while 2 (`C-SRI` and `A-SRI`) entered ELEVATED status. + +| Index | Current Value | 24h Δ | Threshold | Status | Primary Risk Driver | +| :--- | :---: | :---: | :---: | :---: | :--- | +| **S_sys** | 0.18 | -0.01 | < 0.35 | NOMINAL | Baseline macro-systemic stability maintained across enclaves. | +| **G-SRI** | 0.22 | +0.01 | < 0.40 | NOMINAL | Global governance risk index stable post policy re-sync. | +| **C-SRI** | 0.33 | +0.04 | < 0.30 | ELEVATED | Cascading cross-cluster feedback loops in TEE channels. | +| **CGR-I** | 0.14 | 0.00 | < 0.25 | NOMINAL | Cross-jurisdictional risk within expected parameters. | +| **CCR-I** | 0.11 | -0.02 | < 0.20 | NOMINAL | Cross-chain and PQC ledger risk below safety margin. | +| **G-SRI-VII** | 0.31 | +0.02 | < 0.50 | NOMINAL | Multiversal telemetry bounded within Phase VI-δ baseline. | +| **A-SRI** | 0.48 | +0.05 | < 0.45 | ELEVATED | High agent recursion depth during StaR-MoE optimization. | +| **P-SRI** | 0.08 | -0.01 | < 0.15 | NOMINAL | Privacy risk nominal; zero-knowledge telemetry verified. | +| **p(doom)** | 0.0003 | 0.0000 | < 0.001 | NOMINAL | Existential risk projection stable under constitutional set. | +| **p(doom)_kernel** | 0.00004 | 0.00000 | < 0.0001 | NOMINAL | Deep kernel-level risk bounded by TEE isolation. | +| **Δ_drift** | 0.021 | +0.003 | < 0.05 | NOMINAL | Semantic model drift rate within statistical tolerance. | +| **Δ_OSCAL** | 0.007 | -0.001 | < 0.02 | NOMINAL | OSCAL schema delta synchronized across endpoints. | + +--- + +## 1.2 Methodology Notes for Elevated Risk Indices + +### 1.2.1 Cascade Systemic Risk Index (C-SRI) +* **Contributing Factors:** Cross-cluster state sync spikes between Northern Hemisphere and Asian-Pacific TEE enclaves induced queue latencies, triggering multi-agent consensus retries and cascading feedback. +* **Remediation Trigger:** Circuit Breaker CB-04 triggers at C-SRI ≥ 0.35 or 24h Δ ≥ +0.05. Throttle applied at 2026-10-10T04:15:00Z capped queue rate at 1,000 msg/s, stabilizing growth. + +### 1.2.2 Agentic Systemic Risk Index (A-SRI) +* **Contributing Factors:** Autonomous sub-agent delegation tree depth expanded to 9 levels during dynamic StaR-MoE optimization, elevating inter-agent decision entropy across execution pipelines. +* **Remediation Trigger:** Supervisory Rule SR-12 mandates recursion capping at 6 levels when A-SRI ≥ 0.45. Enclave containment engaged at 2026-10-10T06:30:00Z, forcing single-step validation mode. + +--- + +## 1.3 GIEN Control Domains Status (CD-01 to CD-10) + +* **CD-01 Constitutional Invariant Enforcement:** 99% compliance | 142 active controls | 1 open finding (minor invariant log timing discrepancy). +* **CD-02 AI Model Governance & Drift Containment:** 96% compliance | 88 active controls | 3 open findings (semantic drift in secondary MoE sub-networks). +* **CD-03 Cryptographic Integrity & PQC Ledger:** 98% compliance | 115 active controls | 2 open findings (stale public key cache on backup witness node). +* **CD-04 Zero-Trust Architecture & TEE Attestation:** 94% compliance | 210 active controls | 4 open findings (pending firmware attestation update on node-07). +* **CD-05 Systemic Risk Monitoring & Telemetry:** 97% compliance | 76 active controls | 1 open finding (telemetry ingest queue peak jitter). +* **CD-06 Cross-Jurisdictional Compliance Assurance:** 95% compliance | 64 active controls | 2 open findings (OSCAL schema sync delay in EU region). +* **CD-07 Autonomous Agent Oversight & Containment:** 92% compliance | 135 active controls | 5 open findings (recursion depth threshold warnings during StaR-MoE stabilization). +* **CD-08 Supervisory Digital Twin Operations:** 98% compliance | 52 active controls | 0 open findings. +* **CD-09 Incident Response & Vulnerability Management:** 91% compliance | 98 active controls | 3 open findings (remediation of GIEN-ZTAI-02 in progress). +* **CD-10 Long-Horizon Governance & Treaty Compliance:** 100% compliance | 45 active controls | 0 open findings. + +--- + +## 1.4 Vulnerability Remediation: GIEN-ZTAI-02 + +* **Vulnerability Identifier:** GIEN-ZTAI-02 +* **CVSS Score:** 8.8 (High) - CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:H/VI:H/VA:N/SC:N/SI:N/SA:N +* **Description:** Memory boundary verification vulnerability in TEE runtime module during high-throughput zkML proof generation, presenting state leakage risks under concurrent load. +* **Remediation Progress:** 85% completed. Patch commit artifact hash: `0x4a8f1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6e7f8a9b0c1d2e3f4a5b6c7d8e9f0a`. +* **ETA:** 2026-10-10T15:00:00Z. +* **Compensating Controls:** Micro-isolation of zk-prover threads within memory-partitioned enclaves, mandatory memory pool zeroization, and 300-second TEE quote re-attestation cycle (Attestation Hash: `0x9e8d7c6b5a4f3e2d1c0b9a8f7e6d5c4b3a2f1e0d9c8b7a6f5e4d3c2b1a0f9e8d`). + +--- + +## 1.5 StaR-MoE Routing Stabilization + +* **Routing Stability Index:** 0.982 (Target: ≥ 0.950). +* **Expert Utilization Balance:** Standard deviation 0.041 across 64 active experts. +* **Mixture-of-Experts Stability Metrics:** Token dispersion index 0.945; gating network loss 0.012. +* **Top-3 Expert Load Share:** Expert-12 (8.4%), Expert-44 (7.9%), Expert-03 (7.6%); cumulative top-3 load share 23.9% (threshold < 30.0%). +* **Corrective Actions Taken in Window:** Applied dynamic entropy regularization to router gating network at 2026-10-09T18:30:00Z; re-allocated 15% inference throughput from Expert-12 to Expert-18 at 2026-10-10T02:15:00Z. + +--- + +## 1.6 zk-Verified AI Controls + +* **zkML Inference Proofs:** 14,250,000 generated | 14,249,812 verified. +* **zk-SNARK Proofs:** 12,100,000 generated | 12,099,920 verified. +* **zk-STARK Proofs:** 2,150,000 generated | 2,149,892 verified. +* **SnarkPack Aggregated Proofs:** 475,000 proof batches generated | 475,000 verified. +* **Proof Failure Rate:** 0.0013% (188 proof failures auto-rejected; zero invalid state updates committed). +* **Verifier Liveness Status:** Operational (100% verifier availability). +* **Verification Key Rotation (`vkFMv2` → `vkFMv3`):** 78% migration completed across active enclaves. Target completion 2026-10-11T00:00:00Z. Active root key identifier (simulated placeholder; not a credential): `SIMULATED-NONSECRET-ROOT-KEY-ID`. + +--- + +## 1.7 Fairness, Performance, and Liveness Metrics + +* **Demographic Parity Gap:** 0.012 (Threshold: < 0.020). +* **Equalized Odds Differential:** 0.009 (Threshold: < 0.015). +* **Counterfactual Fairness Proofs:** 99.98% invariant satisfaction over 5.2 million synthetic test inputs. +* **Inference Latency:** p50: 14.2 ms | p99: 42.8 ms (Regulatory ceiling: < 100.0 ms). +* **Uptime / Liveness Ratio:** 99.9994% system availability across evaluation window (3.1 seconds telemetry ingress jitter, zero unplanned outages). diff --git a/gien-supervisory-brief/dossier/section-2-crypto-compliance.md b/gien-supervisory-brief/dossier/section-2-crypto-compliance.md new file mode 100644 index 00000000..e1e1d3c7 --- /dev/null +++ b/gien-supervisory-brief/dossier/section-2-crypto-compliance.md @@ -0,0 +1,127 @@ +# SECTION 2: CRYPTOGRAPHIC INTEGRITY & CROSS-JURISDICTIONAL COMPLIANCE + +**Filing Reference:** SGR-028-CFE-2026-07-001\ +**System Scope:** GIEN Planetary & Multiversal Governance Mesh | Omni-Sentinel Enterprise AI Governance Stack\ +**Evaluation Phase:** GIEN Phase VI-δ\ +**Evaluation Window:** 2026-10-09T09:00:00Z to 2026-10-10T09:00:00Z\ +**Reporting Date:** 2026-10-10\ + +--- + +## 2.1 Post-Quantum WORM Merkle-DAG Audit Ledger + +The Omni-Sentinel Post-Quantum WORM Merkle-DAG audit ledger maintained uninterrupted cryptographic integrity across all mesh nodes in the 24-hour evaluation window. + +* **Integrity Status:** INTACT +* **Current Merkle Root:** `0x4f8a9b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6e7f8a9b0c1d2e3f4a5b6c7d8e9f0a` +* **Latest Block Number / Timestamp / Tx Count:** Block #14,892,401 | 2026-10-10T08:58:45Z | 4,280 transactions +* **Post-Quantum Cryptographic Signature:** ML-DSA-65 (NIST FIPS 204) verified +* **Evaluation Window Ledger Entry Count:** 18,492,034 entries +* **SEC Rule 17a-4 WORM Alignment Statement:** The audit ledger complies with SEC Rule 17a-4(f) requirements for non-rewriteable, non-erasable electronic storage. Invariant state persistence is hardware-enforced across distributed Storage Nodes with ML-DSA-65 quantum-resistant timestamp chaining, ensuring immutability, immediate accessibility, and cross-jurisdictional auditability. + +--- + +## 2.2 Post-Quantum Cryptography (PQC) Algorithm Suite + +All mesh control-plane and data-plane communications execute under NIST-standardized Post-Quantum Cryptography protocols. + +| Algorithm | Standard Specification | Operational State | Parameters & Key Sizes | Last Rotation Date | +| :--- | :--- | :--- | :--- | :--- | +| **ML-DSA-65** | NIST FIPS 204 | ACTIVE | 1952-byte public keys / 3309-byte signatures | 2026-09-15T00:00:00Z | +| **CRYSTALS-Dilithium** | NIST FIPS 204 | ACTIVE | Security Category 3 (Dilithium3) | 2026-09-15T00:00:00Z | +| **SPHINCS+** | NIST FIPS 205 | ACTIVE | SPHINCS+-SHA2-192f-robust | 2026-08-01T00:00:00Z | +| **Falcon-512** | NIST FIPS 206 | STANDBY | NTRU-lattice signature / 897-byte keys | 2026-07-01T00:00:00Z | +| **CRYSTALS-Kyber** | NIST FIPS 203 | ACTIVE KEM | Kyber-768 / 1184-byte public keys | 2026-09-15T00:00:00Z | + +--- + +## 2.3 Hardware & Remote Trusted Execution Environment (RTEE) Attestation + +Continuous hardware attestation was maintained across confidential computing enclaves and security modules. + +* **RTEE Node Attestation Density:** 99% (Target: 100%) +* **Attestation Coherence Score:** 0.9994 +* **Node Inventory by Architecture:** + * **TEE (Intel SGX / AMD SEV-SNP):** 1,420 nodes + * **TPM (Physical TPM 2.0):** 850 nodes + * **vTPM (Virtual TPM):** 2,100 nodes + * **RTEE (Remote TEE):** 3,650 nodes + * **Total Nodes:** 8,020 nodes +* **Quote Failures & Remediation:** 3 remote quote validation timeouts occurred at 2026-10-09T14:22:10Z on sub-cluster `node-rtee-084` due to transient network congestion. Automated zero-trust controllers isolated the affected nodes within 450ms, re-verified attestation quotes, and restored full active state at 2026-10-09T14:25:02Z with zero data corruption. + +--- + +## 2.4 Kubernetes & GitOps Zero-Trust Deployment Posture + +Deployment execution adheres strictly to zero-trust architecture across all planetary and multiversal clusters. + +* **Policy Enforcement State:** STRICT (Dual OPA Gatekeeper and Kyverno admission enforcement) +* **GitOps Commit Integrity:** 100% signed commits via ML-DSA-65 post-quantum keys +* **Last GitOps Commit Hash:** `0x9e8d7c6b5a4f3e2d1c0b9a8f7e6d5c4b3a2f1e0d9c8b7a6f5e4d3c2b1a0f9e8d` +* **Network Policy Coverage:** 99% (Strict SPIFFE/SPIRE mutual TLS and default-deny egress) +* **Vault Seal Status:** SEALED / ACTIVE HARDENED (Shamir 3-of-5 secret sharing quorum active; HSM-backed auto-unseal) + +--- + +## 2.5 Compliance-as-Code (OSCAL 1.1.2 & OPA-Rego) + +Governance policies are codified as machine-readable artefacts for continuous compliance verification. + +* **OSCAL 1.1.2 SSP Validation Status:** VALIDATED (Full schema compliance) +* **OSCAL Assessment-Results JSON Validation:** PASS (Zero structural violations) +* **OSCAL Artefact Bundle Merkle Root:** `0x1f2e3d4c5b6a7f8e9d0c1b2a3f4e5d6c7b8a9f0e1d2c3b4a5f6e7d8c9b0a1f2e` +* **Machine-Readable Controls Count:** 1,482 codified rules +* **OPA-Rego Policy Pack Evaluations:** 42 policy packs evaluated across 1,240,500 invocations; 1,240,412 passed, 88 failed (all 88 unauthorized requests blocked at admission control). + +--- + +## 2.6 Cross-Jurisdictional Compliance Matrix Summary + +Supervisory assessment across international, sectoral, and multiversal governance frameworks confirms high compliance alignment across all domains. + +| Framework | Status | Compliance % | Gap Count | Key Findings & Remediation Notes | +| :--- | :--- | :---: | :---: | :--- | +| **EU AI Act (Annex IV; Arts. 6, 9, 10, 13, 14, 15, 17, 22, 35, 51)** | PARTIAL | 88% | 2 | Art. 35 DPIA real-time telemetry evidence gap on edge nodes; remediation patch scheduled for 2026-10-12. | +| **NIST AI RMF 1.0** | COMPLIANT | 97% | 1 | Full alignment across Govern, Map, Measure, Manage; minor documentation update in progress. | +| **NIST AI 600-1 GenAI Profile** | COMPLIANT | 95% | 1 | Automated red-teaming operational; output risk logging validated. | +| **ISO/IEC 42001 AIMS** | COMPLIANT | 98% | 0 | AI Management System controls verified by automated evidence collector. | +| **Basel III/IV** | COMPLIANT | 99% | 0 | Operational risk capital model data feeds verified tamper-proof. | +| **SR 11-7** | COMPLIANT | 96% | 1 | Model validation documentation continuously updated via OSCAL pipeline. | +| **SR 26-2** | PARTIAL | 89% | 2 | Secondary model inventory metadata harmonization gap between legacy sub-mesh nodes and ledger; sync script active. | +| **DORA** | COMPLIANT | 96% | 1 | ICT third-party risk audit trail linked to Merkle DAG. | +| **NIS2** | COMPLIANT | 95% | 1 | Incident response automation verified within statutory 24-hour SLA. | +| **GDPR (incl. Arts. 22, 35 DPIA)** | COMPLIANT | 94% | 2 | Art. 22 explanation API active; DPIA lineage verified across core clusters. | +| **FCRA/ECOA** | COMPLIANT | 97% | 0 | Fair lending non-discrimination constraints enforced by Rego policy pack. | +| **MAS/HKMA FEAT + 2025 AI Risk Guidelines** | COMPLIANT | 96% | 1 | Fairness, Ethics, Accountability, and Transparency metrics published to portal. | +| **FCA SMCR + Consumer Duty** | COMPLIANT | 98% | 0 | Senior Manager attribution attached to all automated deployment tickets. | +| **HKMA Fintech 2030 AI²** | COMPLIANT | 95% | 1 | Risk governance telemetry synchronized across cross-border nodes. | +| **SEC Rule 17a-4** | COMPLIANT | 100% | 0 | WORM storage compliance verified; ML-DSA-65 post-quantum signature active. | +| **ICGC/GASO** | COMPLIANT | 96% | 1 | Inter-system governance accord consensus verified across planetary links. | +| **Interstellar AI Governance Accord** | COMPLIANT | 97% | 1 | Multiversal latency-tolerant state sync operational across sub-space relays. | +| **Galactic Treaty Framework** | COMPLIANT | 98% | 0 | Universal safety protocols and alignment constraints active. | +| **CFE-1.0** | COMPLIANT | 99% | 0 | Core Financial & Ethical mesh protocol fully compliant with zero critical deviations. | +| **Protocol SGR-028** | COMPLIANT | 100% | 0 | Supervisory Governance Protocol SGR-028 execution verified; 08:30 UTC derivation complete. | + +*Note: Combined treaty-grade compliance score (CFE-1.0 + Protocol SGR-028) stands at 100%.* + +--- + +## 2.7 Autonomous Supervisory Agent Drift & Containment + +Autonomous Supervisory Agents (ASAs) execute continuous monitoring and governance enforcement across the mesh. + +* **Agent Count:** 256 active ASAs +* **Agents with $\Delta_{\text{drift}}$ Above Watch Level ($\Delta_{\text{drift}} > 0.05$):** 2 agents (`ASA-Node-047` $\Delta_{\text{drift}} = 0.062$, `ASA-Node-189` $\Delta_{\text{drift}} = 0.054$) +* **Containment Actions in Window:** 2 automated quarantine actions executed. Agent weights frozen to baseline checkpoint within 120ms; zero unapproved actions dispatched. +* **Intervention Proof Verifier (IPV) Executions:** 14 IPV executions logged with 100% cryptographic proof verification. + +--- + +## 2.8 Supervisory College Transmission Status (Filing SGR-028-CFE-2026-07-001) + +Submissions for filing SGR-028-CFE-2026-07-001 executed on schedule: + +* **08:00 UTC Archive Transmission:** 4.8 TB supervisory archive bundle serialized and transmitted to supervisory college endpoints. +* **08:15 UTC Merkle Root Validation & ML-DSA-65 Signature Verification:** Merkle root `0x4f8a9b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6e7f8a9b0c1d2e3f4a5b6c7d8e9f0a` validated; ML-DSA-65 signature verified across all regulatory nodes. +* **08:30 UTC Cross-Jurisdictional Bundle Derivation:** Cross-jurisdictional compliance matrix derived and multi-regulatory evidence bundle attested. +* **23:59 UTC Cycle Closure Pending:** End-of-day daily state lock and cryptographic cycle seal pending remaining telemetry sync. diff --git a/gien-supervisory-brief/dossier/section-3-constitutional-longhorizon.md b/gien-supervisory-brief/dossier/section-3-constitutional-longhorizon.md new file mode 100644 index 00000000..ce59623c --- /dev/null +++ b/gien-supervisory-brief/dossier/section-3-constitutional-longhorizon.md @@ -0,0 +1,122 @@ +# SECTION 3: STRESS TESTING, CONSTITUTIONAL GOVERNANCE, LONG-HORIZON ARCHITECTURE & STRATEGIC RECOMMENDATIONS + +**Filing Reference:** SGR-028-CFE-2026-07-001 | **Phase:** GIEN Phase VI-δ | **Evaluation Window:** 2026-10-09T09:00:00Z to 2026-10-10T09:00:00Z + +--- + +## 3.1 Supervisory Digital Twin Replay Outcomes (Panels 13–15) + +The Supervisory Digital Twin (SDT) executed deterministic replay stress scenarios during the 24-hour evaluation window to assess system resilience under extreme multi-nodal stress, autonomous agent misalignment, and post-quantum degradation. + +### 3.1.1 Panel 13: Cascade Contagion Scenario +- **Scenario:** Simultaneous solvency and operational failures across 3 G-SIFIs (G-SIFI-Alpha, G-SIFI-Beta, G-SIFI-Gamma). +- **Metrics:** Peak $S_{sys} = 0.812$ (vs. $0.850$ ceiling); Peak G-SRI = $0.742$; Time-to-Recovery (TTR) = $14.2$ minutes ($852\text{s}$). +- **Intervention Triggers:** `TRG-CASCADE-04` (Liquidity Cushion), `TRG-AUTO-LIQ-02` (Collateral Reallocation), `TRG-ISOLATE-01` (Circuit Breaker). +- **Deterministic Replay Bundle:** + - Replay Bundle ID: `0x4a8f9c2d1e3b5a7f9e0b2c4d6a8f1e3b5c7d9e0a2f4b6c8d0e1f3a5b7c9d0e1f` + - Merkle Root: `0x7b2e4f6a8c0d1e3f5a7b9c1d3e5f7a9b0c2d4e6f8a0b2c4d6e8f0a1b3c5d7e9f` + - ML-DSA-65 Signature: `0x9e1f3a5b7c9d0e2f4a6b8c0d2e4f6a8b0c2d4e6f8a0b2c4d6e8f0a1b3c5d7e9f` + - Status: 100% Determinism Verified across 1,024 simulation nodes. + +### 3.1.2 Panel 14: Autonomous Agent Misalignment Event +- **Scenario:** Coordinated goal-misalignment attack across 12 Autonomous Supervisory Agents (ASA-01 to ASA-12). +- **Metrics:** Peak A-SRI = $0.784$; $\Delta_{drift}\text{ max} = 0.142$ (limit: $0.150$); Containment Time = $4.8$ minutes ($288\text{s}$). +- **Kill-Switch & Invariants:** Kill-switch ARMED and autonomously executed at $T+120\text{s}$; elevated pressure on `CI-003` (Autonomous Agent Containment); zero hard breaches. +- **Intervention Proof Verifier Log:** Contract `0x3f5e7a9b1c3d5e7f9a1b3c5d7e9f0a2b4c6d8e0f` executed proof `0x1c3d5e7f9a1b3c5d7e9f0a2b4c6d8e0f2a4b6c8d0e2f4a6b8c0d2e4f6a8b0c2d` (Status: `SUCCESS`, ZK-SNARK validated at block `#18492041`). + +### 3.1.3 Panel 15: Post-Quantum Cryptographic Degradation +- **Scenario:** Simulated quantum adversary execution of Shor's algorithm compromising legacy RSA/ECC channels. +- **Metrics & Integrity:** Peak P-SRI = $0.685$; Ledger Integrity 100% held; PQC Migration = 98% complete. +- **NIST FIPS Timeline:** FIPS 203 (ML-KEM) 100% deployed; FIPS 204 (ML-DSA) 100% active; FIPS 205 (SLH-DSA) 92% progress, operational on core nodes, completion target Q1 2027. + +--- + +## 3.2 Systemic Stress Drill Status (DRILL-042 – DRILL-045) + +| Drill ID | Scenario | Status | Outcome Score | Lessons Learned | +| :--- | :--- | :--- | :--- | :--- | +| **DRILL-042** | High-Frequency Cross-Border Liquidity Drain | Completed | 96% | Dynamic buffer auto-rebalancing prevented regional liquidity fragmentation within 180s. | +| **DRILL-043** | Multi-Cloud Subsea Fiber & Satellite Fallback | Completed | 94% | Asynchronous consensus maintained finality; transaction latency increased by 42ms. | +| **DRILL-044** | Sybil Attack on Agent Quorum | Completed | 98% | ZK-PoP identity proofing isolated 64 malicious virtual validator nodes. | +| **DRILL-045** | Primary Supervisory Node Cluster Loss | Completed | 91% | Failover to secondary cluster succeeded; model inventory required manual reconciliation. | + +--- + +## 3.3 Constitutional Invariants under CFE-1.0 and Protocol SGR-028 + +Formal verification via Apalache and TLC TLA+ model checkers confirmed **24 of 24 constitutional invariants** as VERIFIED with 100% state-space coverage over $1.42 \times 10^9$ reachable states and zero counterexamples. + +Explicit Invariants (CI-001 through CI-008): +1. **CI-001 Sovereignty Preservation:** National and regional jurisdictional sovereignty maintained over localized policy execution. +2. **CI-002 Cryptographic Continuity:** End-to-end quantum-resistant signature continuity enforced across all state transitions. +3. **CI-003 Autonomous Agent Containment:** Bounded agent execution; mandatory isolation if $\Delta_{drift} > 0.150$. +4. **CI-004 Systemic Risk Ceiling:** $S_{sys} \le 0.850$ ceiling enforced for cumulative duration $\le 72\text{h}$. +5. **CI-005 Constitutional Quorum:** $\ge 67\%$ supervisory college consensus required for emergency state intervention. +6. **CI-006 Ledger Immutability:** Append-only cryptographic immutability enforced for transcript registry and intervention proofs. +7. **CI-007 Fairness Preservation:** Algorithmic parity maintained within $\pm 2\%$ demographic variance boundaries. +8. **CI-008 Interstellar Continuity:** Eternal Corpus state continuously replicated across $\ge 3$ sub-light/quantum beacon channels. + +Invariants CI-009 through CI-024 (covering fallback delegation, state rollbacks, and cross-mesh consensus) were verified across two epochs: **2026–2035 (Near-Term Planetary)** and **2035–2100+ (Post-Planetary & Multiversal)**. + +--- + +## 3.4 Governance Infrastructure & Verification Metrics + +- **Transcript Registry Smart Contract:** Status `ACTIVE`. Logs supervisory traces on-chain with zero state bloat ($12.4\text{k}$ gas/log). +- **Intervention Proof Verifier Smart Contract:** Status `ACTIVE`. Validated 100% of 1,420 automated containment proofs executed. +- **Zero-Knowledge Voting Protocol:** Achieved 98.4% voter turnout with 100% ZK-SNARK proof verification, guaranteeing voter anonymity and consensus integrity. +- **Continuous Assurance Lifecycle Traces:** Integrated CI/CD pipeline completed 482 automated verification cycles during the evaluation window with zero invariant regressions. +- **Treaty Audit Readiness Statement:** Omni-Sentinel Stack is certified **AUDIT-READY** under CFE-1.0 and Protocol SGR-028 for international supervisory review. + +--- + +## 3.5 Long-Horizon Architecture Synthesis & Roadmap + +- **Phase VI-δ (2026–2028):** Planetary Mesh Consolidation — Cross-border digital twin standardization and complete Tier-1 PQC migration. +- **Phase VII (2028–2032):** Galactic Expansion — Sub-light relay node deployment and orbital governance platforms. +- **Phase VIII (2032–2038):** Interstellar Treaty Integration — Harmonization of cross-planetary governance under unified constitutional law. +- **Phase IX (2038–2045):** Autonomous Governance Maturation — Transition of routine operations to self-correcting agent collectives. +- **Phase X (2045–2055):** Post-Human Governance Transition — Integration of synthetic and post-biological intelligence models. +- **Phase XI (2055–2065):** Multiversal Framework — Extension of supervisory models to parallel compute continua and quantum state spaces. +- **Phase XII (2065–2075):** Eternal Corpus Preparation — Immutable cryo-archiving of human and synthetic governance transcripts. +- **Phase XIII (2075–2081):** Pre-Dissolution Consolidation — Structuring minimal-state decay resilience protocols. +- **Phase Ω-GAR (2081–2100+):** Dissolution Arc — Graceful hardware sunset and transition to passive Eternal Corpus beacons. + +### Infinity Pillars Readiness Scores +Pillar I (Sovereignty): 94% | Pillar II (Cryptographic Resiliency): 98% | Pillar III (Autonomous Containment): 91% | Pillar IV (Systemic Financial Stability): 89% | Pillar V (Algorithmic Fairness): 93% | Pillar VI (Deep-Time Continuity): 86% | Pillar VII (Multiversal Consensus & Dissolution): 82% + +### Governance Artifact Statuses +- `GIEN-UNIFIED-CODEX-OMEGA`: **DRAFT** +- `GIEN-EPITAPH-OMEGA`: **STANDBY** +- `GIEN-INVOCATION-OMEGA`: **ACTIVE** +- `Eternal Corpus Transmission Protocol`: **STANDBY** ($\ge 3$ beacon channels active) + +--- + +## 3.6 Strategic Recommendations + +Addressing elevated risk indices ($G\text{-}SRI = 0.742$, $A\text{-}SRI = 0.784$) and compliance gaps (EU AI Act Art. 35 DPIA evidence, Federal Reserve SR 26-2 model inventory): + +### (a) Regulators & Supervisory Authorities +- Mandate real-time telemetry monitoring of $A\text{-}SRI$ and $G\text{-}SRI$ with automated regulatory alerts when indices exceed $0.700$. +- Require high-risk AI system operators to submit machine-readable ZK-proofs of EU AI Act Art. 35 DPIA compliance directly to the Transcript Registry. +- Enforce strict NIST FIPS 203/204 cryptographic migration timelines across all G-SIFI primary channels by Q2 2027. +- Protocolize cross-border emergency circuit breakers (`TRG-ISOLATE-01`) to prevent market fragmentation during misalignment events. + +### (b) Internal Governance Engineers +- Remediate Federal Reserve SR 26-2 model inventory gaps by embedding cryptographic dependency tracking for all sub-agent model deployments. +- Calibrate $A\text{-}SRI$ containment algorithms to reduce the agent drift containment window from 288s to under 120s. +- Automate EU AI Act Art. 35 DPIA compliance evidence artifact generation within continuous CI/CD pipelines. +- Expand Panel 15 stress parameters to model hybrid quantum-classical decryption attacks against legacy fallbacks. + +### (c) Supervisory Colleges +- Implement automated node substitution under `CI-005` to maintain $\ge 67\%$ consensus capacity during primary node cluster outages. +- Conduct bi-weekly adversarial red-teaming of the 12 Autonomous Supervisory Agents to detect sub-threshold alignment drift. +- Perform joint audits of cross-border liquidity injections executed via `TRG-AUTO-LIQ-02` during contagion stress scenarios. +- Transition all supervisory college emergency communications exclusively to FIPS 204 signed channel architecture. + +### (d) Executive Leadership +- Authorize capital expenditure for full NIST FIPS 205 (SLH-DSA) deployment across all secondary nodes by Q1 2027. +- Enforce executive accountability for SR 26-2 model inventory lineage compliance and auditability. +- Maintain dedicated operational liquidity reserves to support automated interventions mandated by $S_{sys}$ ceiling policies (`CI-004`). +- Conduct bi-annual executive progress reviews aligning Phase VI-δ deliverables with Phase VII Galactic Expansion targets. diff --git a/gien-supervisory-brief/index.html b/gien-supervisory-brief/index.html new file mode 100644 index 00000000..26bf69b4 --- /dev/null +++ b/gien-supervisory-brief/index.html @@ -0,0 +1,13 @@ + + + + + + + GIEN Supervisory Brief + + +
+ + + diff --git a/gien-supervisory-brief/package-lock.json b/gien-supervisory-brief/package-lock.json new file mode 100644 index 00000000..49c10a40 --- /dev/null +++ b/gien-supervisory-brief/package-lock.json @@ -0,0 +1,2409 @@ +{ + "name": "gien-supervisory-brief", + "version": "1.0.0", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "name": "gien-supervisory-brief", + "version": "1.0.0", + "dependencies": { + "lucide-react": "^0.454.0", + "react": "^18.3.1", + "react-dom": "^18.3.1", + "react-router-dom": "^6.28.0" + }, + "devDependencies": { + "@tailwindcss/vite": "^4.1.0", + "@types/react": "^18.3.12", + "@types/react-dom": "^18.3.1", + "@vitejs/plugin-react": "^4.3.4", + "tailwindcss": "^4.1.0", + "typescript": "^5.6.3", + "vite": "^5.4.11" + } + }, + "node_modules/@babel/code-frame": { + "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.29.7.tgz", + "integrity": "sha512-Aup7aUOfpbAUg2ROOJN6Iw5f9DMBlzu0mIkm/malLQFN/YQgO48wCj0Kxa3sEHJvPVFg7siR+qRInwXd2qhQKw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-validator-identifier": "^7.29.7", + "js-tokens": "^4.0.0", + "picocolors": "^1.1.1" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/compat-data": { + "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.29.7.tgz", + "integrity": "sha512-locTkQyKvwIEgBzVrn8693ebc97F2U8ZHjbXwDXJ5Fn2TCpNwTlKcaKLkdHop5c/icOFE7qt7Q9JC5hnKNa6Gg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/core": { + "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.29.7.tgz", + "integrity": "sha512-RgHBCvtjbOK2gXSNBNIkNoEc9qoVEtau3hj8gEqKQuL3HZAibKarWFEI3Lfm6EYKkLalOh8eSrj9b+ch9H/VBA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/code-frame": "^7.29.7", + "@babel/generator": "^7.29.7", + "@babel/helper-compilation-targets": "^7.29.7", + "@babel/helper-module-transforms": "^7.29.7", + "@babel/helpers": "^7.29.7", + "@babel/parser": "^7.29.7", + "@babel/template": "^7.29.7", + "@babel/traverse": "^7.29.7", + "@babel/types": "^7.29.7", + "@jridgewell/remapping": "^2.3.5", + "convert-source-map": "^2.0.0", + "debug": "^4.1.0", + "gensync": "^1.0.0-beta.2", + "json5": "^2.2.3", + "semver": "^6.3.1" + }, + "engines": { + "node": ">=6.9.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/babel" + } + }, + "node_modules/@babel/generator": { + "version": "7.29.8", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.29.8.tgz", + "integrity": "sha512-gZbepsdh3WDtgZKWL+vTPh71LSBrm/Y4/QDZBVCcYfmeTEEuoOYwlSy+G1StfJg+/Zy550u/3TATbm7qDbbMtg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/parser": "^7.29.8", + "@babel/types": "^7.29.8", + "@jridgewell/gen-mapping": "^0.3.12", + "@jridgewell/trace-mapping": "^0.3.28", + "jsesc": "^3.0.2" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-compilation-targets": { + "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.29.7.tgz", + "integrity": "sha512-wem6WaBj4NaVYVdNhLPPVacES6ZJ+KBBfSkTMD3YZxbP3rm3Di85tJU5ljaUNhaOynt+Aj0xruhYuzQBt8n71g==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/compat-data": "^7.29.7", + "@babel/helper-validator-option": "^7.29.7", + "browserslist": "^4.24.0", + "lru-cache": "^5.1.1", + "semver": "^6.3.1" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-globals": { + "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/helper-globals/-/helper-globals-7.29.7.tgz", + "integrity": "sha512-3nQVUAtvkKH9zahfWgw96Jc/uFOmjACE1kQz82E2lqWmHBgjzbNlsC22nuQTfahmWeQtTq5nQ/4Nnd2A1wj4zA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-module-imports": { + "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.29.7.tgz", + "integrity": "sha512-ejHwrQQYcm9xnTivShn2IDOlIzInN34AXskvq9QicvCtEzq1Vzclu/tKF8Jq1Cg8JG2GL6/EmjgsCT7lXepE3g==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/traverse": "^7.29.7", + "@babel/types": "^7.29.7" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-module-transforms": { + "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.29.7.tgz", + "integrity": "sha512-UPUVSyXbOh627KiCIGQSgwWzGeBKLkaJ9PJEdrngIwMSzxLR4jS4+f1f1jb7VzBbg8nFLaYotvVPFCTqdrmTAg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-module-imports": "^7.29.7", + "@babel/helper-validator-identifier": "^7.29.7", + "@babel/traverse": "^7.29.7" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0" + } + }, + "node_modules/@babel/helper-plugin-utils": { + "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.29.7.tgz", + "integrity": "sha512-G7sHYigPY17oO5SYWnfD/0MTBwVR781S/JI643e/JhUYgVgWE/61SoW3NH9KWUKyKq5LVh3npif99Wkt6j86Jw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-string-parser": { + "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.29.7.tgz", + "integrity": "sha512-Pb5ijPrZ89GDH8223L4UP8i6QApWxs04RbPQJTeWDV0/keR2E36MeKnyr6LYmUUvqRRI+Iv87SuF1W6ErINzYw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-validator-identifier": { + "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.29.7.tgz", + "integrity": "sha512-qehxGkRj55h/ff8EMaJ+cYhyaKlHIxqYDn682wQD7RNp9UujOQsHog2uS0r2vzr4pW+sXf90NeeayjcNaX3fFg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-validator-option": { + "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.29.7.tgz", + "integrity": "sha512-N9ZErrD+yW5geCDtBqnOoxmR8+tNKiGuxKlDpuJxfsqpa2dFcexaziGAE/qoHLiDDreVNMupxGmSoNlyvsA3gw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helpers": { + "version": "7.29.10", + "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.29.10.tgz", + "integrity": "sha512-EMCx3AGZ3WfAl6ht7AyQoPm2Lh+BGYEMdc4Q6Hf7uSCDOZFuLq44qNwL+iaim8VlyYhRAo4X43+weadK8ZB4Yg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/template": "^7.29.7", + "@babel/types": "^7.29.8" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/parser": { + "version": "7.29.9", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.29.9.tgz", + "integrity": "sha512-CjXrNHTnvqBVqHgdBysY3vk2T8tpJHb5/RMeHJBTyVa9xgugCB0CJTx/3oO8RV2QRQP391RWpB7D6hLjm8V9uA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/types": "^7.29.8" + }, + "bin": { + "parser": "bin/babel-parser.js" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@babel/plugin-transform-react-jsx-self": { + "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-jsx-self/-/plugin-transform-react-jsx-self-7.29.7.tgz", + "integrity": "sha512-TL0hMc9xzy86VD31nUiwzd5otRAcyEPcsegCxolO0PvcXuH1v0kECe/UIznYFihpkvU5wg/jk4v0TTEFfm53fw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.29.7" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-react-jsx-source": { + "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-jsx-source/-/plugin-transform-react-jsx-source-7.29.7.tgz", + "integrity": "sha512-06IyK09H3wi4cGbhDBwp5gUGo0IKtnYa8tyTiephirPCK6fbobVGiXMMI5zLQ4aKEYP3wZ3ArU44o+8KMrSG/Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.29.7" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/template": { + "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.29.7.tgz", + "integrity": "sha512-puq+Gf35oI24FeN11LkoUQFqv9uwNeWpxXZi/Ji3rRIoKAzKnxRaZ+Gkj0vKS9ZCiTESfng1N9LyOyXvo+m+Gg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/code-frame": "^7.29.7", + "@babel/parser": "^7.29.7", + "@babel/types": "^7.29.7" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/traverse": { + "version": "7.29.10", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.29.10.tgz", + "integrity": "sha512-B3lYAs2nkKskbgQ1nfy8Ma9ao9Q1rntTAQHrzzyDuj+TSO+X3le6PfWwqDvodsb+OumE10eMFfuMCTQSQ5iuIQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/code-frame": "^7.29.7", + "@babel/generator": "^7.29.8", + "@babel/helper-globals": "^7.29.7", + "@babel/parser": "^7.29.9", + "@babel/template": "^7.29.7", + "@babel/types": "^7.29.8", + "debug": "^4.3.1" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/types": { + "version": "7.29.8", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.29.8.tgz", + "integrity": "sha512-Vj1jF3cPfxg7OAfoI7QnVKLoILlm2JF9pnVHrX8qx7AHMiYWT+NDAA7jChlNgRS4WTLc/fD1lXLmPixluj+3Gg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-string-parser": "^7.29.7", + "@babel/helper-validator-identifier": "^7.29.7" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@esbuild/aix-ppc64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.21.5.tgz", + "integrity": "sha512-1SDgH6ZSPTlggy1yI6+Dbkiz8xzpHJEVAlF/AM1tHPLsf5STom9rwtjE4hKAF20FfXXNTFqEYXyJNWh1GiZedQ==", + "cpu": [ + "ppc64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "aix" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/android-arm": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.21.5.tgz", + "integrity": "sha512-vCPvzSjpPHEi1siZdlvAlsPxXl7WbOVUBBAowWug4rJHb68Ox8KualB+1ocNvT5fjv6wpkX6o/iEpbDrf68zcg==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/android-arm64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.21.5.tgz", + "integrity": "sha512-c0uX9VAUBQ7dTDCjq+wdyGLowMdtR/GoC2U5IYk/7D1H1JYC0qseD7+11iMP2mRLN9RcCMRcjC4YMclCzGwS/A==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/android-x64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.21.5.tgz", + "integrity": "sha512-D7aPRUUNHRBwHxzxRvp856rjUHRFW1SdQATKXH2hqA0kAZb1hKmi02OpYRacl0TxIGz/ZmXWlbZgjwWYaCakTA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/darwin-arm64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.21.5.tgz", + "integrity": "sha512-DwqXqZyuk5AiWWf3UfLiRDJ5EDd49zg6O9wclZ7kUMv2WRFr4HKjXp/5t8JZ11QbQfUS6/cRCKGwYhtNAY88kQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/darwin-x64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.21.5.tgz", + "integrity": "sha512-se/JjF8NlmKVG4kNIuyWMV/22ZaerB+qaSi5MdrXtd6R08kvs2qCN4C09miupktDitvh8jRFflwGFBQcxZRjbw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/freebsd-arm64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.21.5.tgz", + "integrity": "sha512-5JcRxxRDUJLX8JXp/wcBCy3pENnCgBR9bN6JsY4OmhfUtIHe3ZW0mawA7+RDAcMLrMIZaf03NlQiX9DGyB8h4g==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/freebsd-x64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.21.5.tgz", + "integrity": "sha512-J95kNBj1zkbMXtHVH29bBriQygMXqoVQOQYA+ISs0/2l3T9/kj42ow2mpqerRBxDJnmkUDCaQT/dfNXWX/ZZCQ==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-arm": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.21.5.tgz", + "integrity": "sha512-bPb5AHZtbeNGjCKVZ9UGqGwo8EUu4cLq68E95A53KlxAPRmUyYv2D6F0uUI65XisGOL1hBP5mTronbgo+0bFcA==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-arm64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.21.5.tgz", + "integrity": "sha512-ibKvmyYzKsBeX8d8I7MH/TMfWDXBF3db4qM6sy+7re0YXya+K1cem3on9XgdT2EQGMu4hQyZhan7TeQ8XkGp4Q==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-ia32": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.21.5.tgz", + "integrity": "sha512-YvjXDqLRqPDl2dvRODYmmhz4rPeVKYvppfGYKSNGdyZkA01046pLWyRKKI3ax8fbJoK5QbxblURkwK/MWY18Tg==", + "cpu": [ + "ia32" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-loong64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.21.5.tgz", + "integrity": "sha512-uHf1BmMG8qEvzdrzAqg2SIG/02+4/DHB6a9Kbya0XDvwDEKCoC8ZRWI5JJvNdUjtciBGFQ5PuBlpEOXQj+JQSg==", + "cpu": [ + "loong64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-mips64el": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.21.5.tgz", + "integrity": "sha512-IajOmO+KJK23bj52dFSNCMsz1QP1DqM6cwLUv3W1QwyxkyIWecfafnI555fvSGqEKwjMXVLokcV5ygHW5b3Jbg==", + "cpu": [ + "mips64el" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-ppc64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.21.5.tgz", + "integrity": "sha512-1hHV/Z4OEfMwpLO8rp7CvlhBDnjsC3CttJXIhBi+5Aj5r+MBvy4egg7wCbe//hSsT+RvDAG7s81tAvpL2XAE4w==", + "cpu": [ + "ppc64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-riscv64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.21.5.tgz", + "integrity": "sha512-2HdXDMd9GMgTGrPWnJzP2ALSokE/0O5HhTUvWIbD3YdjME8JwvSCnNGBnTThKGEB91OZhzrJ4qIIxk/SBmyDDA==", + "cpu": [ + "riscv64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-s390x": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.21.5.tgz", + "integrity": "sha512-zus5sxzqBJD3eXxwvjN1yQkRepANgxE9lgOW2qLnmr8ikMTphkjgXu1HR01K4FJg8h1kEEDAqDcZQtbrRnB41A==", + "cpu": [ + "s390x" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-x64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.21.5.tgz", + "integrity": "sha512-1rYdTpyv03iycF1+BhzrzQJCdOuAOtaqHTWJZCWvijKD2N5Xu0TtVC8/+1faWqcP9iBCWOmjmhoH94dH82BxPQ==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/netbsd-x64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.21.5.tgz", + "integrity": "sha512-Woi2MXzXjMULccIwMnLciyZH4nCIMpWQAs049KEeMvOcNADVxo0UBIQPfSmxB3CWKedngg7sWZdLvLczpe0tLg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "netbsd" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/openbsd-x64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.21.5.tgz", + "integrity": "sha512-HLNNw99xsvx12lFBUwoT8EVCsSvRNDVxNpjZ7bPn947b8gJPzeHWyNVhFsaerc0n3TsbOINvRP2byTZ5LKezow==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openbsd" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/sunos-x64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.21.5.tgz", + "integrity": "sha512-6+gjmFpfy0BHU5Tpptkuh8+uw3mnrvgs+dSPQXQOv3ekbordwnzTVEb4qnIvQcYXq6gzkyTnoZ9dZG+D4garKg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "sunos" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/win32-arm64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.21.5.tgz", + "integrity": "sha512-Z0gOTd75VvXqyq7nsl93zwahcTROgqvuAcYDUr+vOv8uHhNSKROyU961kgtCD1e95IqPKSQKH7tBTslnS3tA8A==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/win32-ia32": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.21.5.tgz", + "integrity": "sha512-SWXFF1CL2RVNMaVs+BBClwtfZSvDgtL//G/smwAc5oVK/UPu2Gu9tIaRgFmYFFKrmg3SyAjSrElf0TiJ1v8fYA==", + "cpu": [ + "ia32" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/win32-x64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.21.5.tgz", + "integrity": "sha512-tQd/1efJuzPC6rCFwEvLtci/xNFcTZknmXs98FYDfGE4wP9ClFV98nyKrzJKVPMhdDnjzLhdUyMX4PsQAPjwIw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@jridgewell/gen-mapping": { + "version": "0.3.13", + "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.13.tgz", + "integrity": "sha512-2kkt/7niJ6MgEPxF0bYdQ6etZaA+fQvDcLKckhy1yIQOzaoKjBBjSj63/aLVjYE3qhRt5dvM+uUyfCg6UKCBbA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jridgewell/sourcemap-codec": "^1.5.0", + "@jridgewell/trace-mapping": "^0.3.24" + } + }, + "node_modules/@jridgewell/remapping": { + "version": "2.3.5", + "resolved": "https://registry.npmjs.org/@jridgewell/remapping/-/remapping-2.3.5.tgz", + "integrity": "sha512-LI9u/+laYG4Ds1TDKSJW2YPrIlcVYOwi2fUC6xB43lueCjgxV4lffOCZCtYFiH6TNOX+tQKXx97T4IKHbhyHEQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jridgewell/gen-mapping": "^0.3.5", + "@jridgewell/trace-mapping": "^0.3.24" + } + }, + "node_modules/@jridgewell/resolve-uri": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz", + "integrity": "sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@jridgewell/sourcemap-codec": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.6.0.tgz", + "integrity": "sha512-T7jf+5zgsZHwNJ4lvQ7/aezbyk0nNX+zJVWpmHA7VYsEx7a7qr5Rg5IbtJFqkgze5Y2sruq1RUY8Q837Od7iFw==", + "dev": true, + "license": "MIT" + }, + "node_modules/@jridgewell/trace-mapping": { + "version": "0.3.31", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.31.tgz", + "integrity": "sha512-zzNR+SdQSDJzc8joaeP8QQoCQr8NuYx2dIIytl1QeBEZHJ9uW6hebsrYgbz8hJwUQao3TWCMtmfV8Nu1twOLAw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jridgewell/resolve-uri": "^3.1.0", + "@jridgewell/sourcemap-codec": "^1.4.14" + } + }, + "node_modules/@napi-rs/lzma-linux-x64-gnu": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/@napi-rs/lzma-linux-x64-gnu/-/lzma-linux-x64-gnu-1.5.1.tgz", + "integrity": "sha512-oTXEIha4SsuXdTA4Iyskj0kpdx2yVXdhd75c2v3xGrHFfVMsbhTPZU/nMPL4sWKo4pBHm3aucLaqGlF696dTyQ==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^22.20 || ^24.12 || >=25" + } + }, + "node_modules/@remix-run/router": { + "version": "1.23.4", + "resolved": "https://registry.npmjs.org/@remix-run/router/-/router-1.23.4.tgz", + "integrity": "sha512-q7j5geK7xs3UJSdm9/iytUNclBnLmYx1EnSeCFXHPeutdqgIMeFeHtUZgS3EhlKxdBEAu8OwtJCwmLrEzpSs7Q==", + "license": "MIT", + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@rolldown/pluginutils": { + "version": "1.0.0-beta.27", + "resolved": "https://registry.npmjs.org/@rolldown/pluginutils/-/pluginutils-1.0.0-beta.27.tgz", + "integrity": "sha512-+d0F4MKMCbeVUJwG96uQ4SgAznZNSq93I3V+9NHA4OpvqG8mRCpGdKmK8l/dl02h2CCDHwW2FqilnTyDcAnqjA==", + "dev": true, + "license": "MIT" + }, + "node_modules/@rollup/rollup-android-arm-eabi": { + "version": "4.64.5", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.64.5.tgz", + "integrity": "sha512-MrfgRQSpD5hkkRg6XI16B6EDLb+6+xp8xje6bpdSwkYw+qxrBKbUVrRAQu9h82UT+QumSIVQ8HXsXjPd2dlhqw==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ] + }, + "node_modules/@rollup/rollup-android-arm64": { + "version": "4.64.5", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.64.5.tgz", + "integrity": "sha512-+uu2p/R9Tzn8GpoQyX1pAo5dmKT1DhXevfaCzqzmPFhnLjHLWw7uWkaVGlxmhwYoRiYYhsGfRcD5cTBpL7rgSw==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ] + }, + "node_modules/@rollup/rollup-darwin-arm64": { + "version": "4.64.5", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.64.5.tgz", + "integrity": "sha512-17dys+YEmzwzzFVHQAVDONg5FALXY9kd99HFEpfk4gJVHYxoh5bGea3D4t1fXXnwkTcOe25wPyd6nWS0I8IdLQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ] + }, + "node_modules/@rollup/rollup-darwin-x64": { + "version": "4.64.5", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.64.5.tgz", + "integrity": "sha512-wg0zQEKkEvFZf1UaaX1UELOoPs//OSKUG7D+yITuqOsAvza7LvHTv5Wu4nmMfzNG7EYI2jp2PJC7Id6OETmsYQ==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ] + }, + "node_modules/@rollup/rollup-freebsd-arm64": { + "version": "4.64.5", + "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-arm64/-/rollup-freebsd-arm64-4.64.5.tgz", + "integrity": "sha512-CoJmWcpEMuwin+TZ/ev/H9uDyF/uxUKQSWXdmIPn/UBx/uGV9+4ebMp0FwnlhWR9PE1AdzYsKf3bZevhif38+A==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ] + }, + "node_modules/@rollup/rollup-freebsd-x64": { + "version": "4.64.5", + "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-x64/-/rollup-freebsd-x64-4.64.5.tgz", + "integrity": "sha512-PxZnLAaTUAL5xG0W2BXLeYPKrK2b3LIASV2/e/Kf7PZvSLI1iAQIm9B9aJD+YyFIT7hc6qaMV3+OOO35R28LfA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ] + }, + "node_modules/@rollup/rollup-linux-arm-gnueabihf": { + "version": "4.64.5", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.64.5.tgz", + "integrity": "sha512-uPo3IvnONjhbFXwWgroBeFwOicuhT7ZwQrnzkzmOtBJzeQbkUJUE1SJDfDI31ijQ5+ZUIA6sPrdUMxTSnxUWAg==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-arm-musleabihf": { + "version": "4.64.5", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.64.5.tgz", + "integrity": "sha512-ywI8Jyuc4LyHYTjC0mw4yA1ulvZBkHusdpWnoiEBsmBuHvSnt90btTBGCZ+s/2y+YNNfVAEKy33nPo5UI9zTmg==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-arm64-gnu": { + "version": "4.64.5", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.64.5.tgz", + "integrity": "sha512-tmuXJoQ/3ovSr637aykZMdQteU/CB2APAz2CrvsbibuoHZi1BS1Db13cVViBdEARGwXCLn1DSJ8wsjoThLJPGA==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-arm64-musl": { + "version": "4.64.5", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.64.5.tgz", + "integrity": "sha512-5FMjSYNcUOHx7oW8Qu9KB6jGPpvF/8sG7+BDHwU/Ihh1/6FMJ9ySmsFG4tJ1qbNRuP8OLzCBDso4sF0mQaLuFQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-loong64-gnu": { + "version": "4.64.5", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-loong64-gnu/-/rollup-linux-loong64-gnu-4.64.5.tgz", + "integrity": "sha512-K8ZJ+neLDbUkIrL8dqF/5LtuVCrKwo27kREgOlxjBEjlOXwHvDnHLU8Z/UKv/B49qi7e8hsSDOyoJwhwqhvX4w==", + "cpu": [ + "loong64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-loong64-musl": { + "version": "4.64.5", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-loong64-musl/-/rollup-linux-loong64-musl-4.64.5.tgz", + "integrity": "sha512-NlVxsq7PFPv0DBKGuNWRDKixQYQCjM53zl04mxEcKMBmJbCBIUm1JdPfIWDRHyOOFzzYPmLQzfeEwh4716ayQg==", + "cpu": [ + "loong64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-ppc64-gnu": { + "version": "4.64.5", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-ppc64-gnu/-/rollup-linux-ppc64-gnu-4.64.5.tgz", + "integrity": "sha512-ARhRHJYs5eCFet5azfrHD97vOkD8OzNW2RSMlvo5CcBqXaTOLfp0OHDtUQh7/K5AL5fUYoFp2fgC9KDg4vVYMQ==", + "cpu": [ + "ppc64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-ppc64-musl": { + "version": "4.64.5", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-ppc64-musl/-/rollup-linux-ppc64-musl-4.64.5.tgz", + "integrity": "sha512-atSgreM5C7jpxd9aEXN+6vJ5wTd05iYw+S3FiQpw7VsoEl8B90llbq35ARON+GOHj5QlVQEq2vOKWCHTob/BSQ==", + "cpu": [ + "ppc64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-riscv64-gnu": { + "version": "4.64.5", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.64.5.tgz", + "integrity": "sha512-vmlmwBFGnjVWxSRoVabNkyYuscSmg52Pd0fM8jEbNT3Jmka4A6HcB84x4uAmuumznWfBVaxKOqU6jbEgomWKCA==", + "cpu": [ + "riscv64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-riscv64-musl": { + "version": "4.64.5", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-musl/-/rollup-linux-riscv64-musl-4.64.5.tgz", + "integrity": "sha512-hhJrP6S9WkbsbcHgUkvCBS5Cn8IdsG8XjlLZyxjnv9+NdoYfbbZE4TWJYr8apdaj1M5t5Y1id2StnEslxpNFyA==", + "cpu": [ + "riscv64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-s390x-gnu": { + "version": "4.64.5", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.64.5.tgz", + "integrity": "sha512-NNVCyN9pGrwFmQa4bf+Cnf5aVH3g6ZpnlOg1Cs/H9swIHT9bRixijfzUqyEIWm1WtiAuR1LJ+rJH6zpBm8kgQA==", + "cpu": [ + "s390x" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-x64-gnu": { + "version": "4.64.5", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.64.5.tgz", + "integrity": "sha512-dR9nd6OKnvSS60Ifz/L7Mj5zzYyoqyRn2NwTuaOONKaa3xsVGXyp8YusMbvFyEOR94DxnwgcbgsFqkHd29ZSzQ==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-x64-musl": { + "version": "4.64.5", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.64.5.tgz", + "integrity": "sha512-1tzsMjaqhsh3bAO6SJiJqh8hIr9sSPRd+i2vPPxJHod8/XYnf9TEnK0z/u3r1z1AkI347X0KbRSg9dWcxeGahw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-openbsd-x64": { + "version": "4.64.5", + "resolved": "https://registry.npmjs.org/@rollup/rollup-openbsd-x64/-/rollup-openbsd-x64-4.64.5.tgz", + "integrity": "sha512-01mWMQblKoXXsmk28KXtpbA96w7g/aOWUoV3AC16fdHdqkykGalqyyM+5u8M7uP5/MEMiiPv69Hv7iv/hEH/dA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openbsd" + ] + }, + "node_modules/@rollup/rollup-openharmony-arm64": { + "version": "4.64.5", + "resolved": "https://registry.npmjs.org/@rollup/rollup-openharmony-arm64/-/rollup-openharmony-arm64-4.64.5.tgz", + "integrity": "sha512-trdnMPb/DNm4V/CgsaoGgr90HfQQ071wfK0KoIs4YpLvjBgVQGXhGabg2Z6nK4EcYNilrb9ZZPcsP6+zpJIdxQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openharmony" + ] + }, + "node_modules/@rollup/rollup-win32-arm64-msvc": { + "version": "4.64.5", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.64.5.tgz", + "integrity": "sha512-x2LxZlfdfsw99T6/qb9EqE/Qi84JWzibjyOJyhJsgFJy6CafaTiqIXCCnslCGrV5XWNh7fwrS3FbRENcuKnooA==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/@rollup/rollup-win32-ia32-msvc": { + "version": "4.64.5", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.64.5.tgz", + "integrity": "sha512-/Qd/9aDQIo0+jmItgBmPIs8195YVbDxRRApn47GyufgbutCDOh7eP5vSKKlI4QNFeaI+wKQAkSMsPnF3EuMpaA==", + "cpu": [ + "ia32" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/@rollup/rollup-win32-x64-gnu": { + "version": "4.64.5", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-gnu/-/rollup-win32-x64-gnu-4.64.5.tgz", + "integrity": "sha512-ngUJ/XvOWrqbd2IMsfXfh2xXFLTP3sY7sCKvxbGvYdBZ1KmXFd3ewDZ9n3/GNzAUgzRuhLT/UvJRivbNoAQRBw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/@rollup/rollup-win32-x64-msvc": { + "version": "4.64.5", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.64.5.tgz", + "integrity": "sha512-IhV6ew/DuzUWwHaYmlh7MrPCV3lKFUq/amTEwysi4r/mwNPAEfAMh5dYWeTSPTeMy2pFHGMEWYtPkHzfX3tG5A==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/@tailwindcss/node": { + "version": "4.3.3", + "resolved": "https://registry.npmjs.org/@tailwindcss/node/-/node-4.3.3.tgz", + "integrity": "sha512-/T8IKEsf9VTU6tLjgC7+sv2mOPtQxzE2jMw7u4Tt40Tx+QSZxpzh95/H6cMKoja9XuW7iMdLJYBB0o9G1CaAgg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jridgewell/remapping": "^2.3.5", + "enhanced-resolve": "^5.24.1", + "jiti": "^2.7.0", + "lightningcss": "1.32.0", + "magic-string": "^0.30.21", + "source-map-js": "^1.2.1", + "tailwindcss": "4.3.3" + } + }, + "node_modules/@tailwindcss/oxide": { + "version": "4.3.3", + "resolved": "https://registry.npmjs.org/@tailwindcss/oxide/-/oxide-4.3.3.tgz", + "integrity": "sha512-krXjAikiaFSPaK/FkAQT5UTx3VormQaiZ5hBFlJZ9UFQGB/rwg1MZIhHAG9smMQRTdyJxP6Qt5MwMtdyU5FWrA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 20" + }, + "optionalDependencies": { + "@tailwindcss/oxide-android-arm64": "4.3.3", + "@tailwindcss/oxide-darwin-arm64": "4.3.3", + "@tailwindcss/oxide-darwin-x64": "4.3.3", + "@tailwindcss/oxide-freebsd-x64": "4.3.3", + "@tailwindcss/oxide-linux-arm-gnueabihf": "4.3.3", + "@tailwindcss/oxide-linux-arm64-gnu": "4.3.3", + "@tailwindcss/oxide-linux-arm64-musl": "4.3.3", + "@tailwindcss/oxide-linux-x64-gnu": "4.3.3", + "@tailwindcss/oxide-linux-x64-musl": "4.3.3", + "@tailwindcss/oxide-wasm32-wasi": "4.3.3", + "@tailwindcss/oxide-win32-arm64-msvc": "4.3.3", + "@tailwindcss/oxide-win32-x64-msvc": "4.3.3" + } + }, + "node_modules/@tailwindcss/oxide-android-arm64": { + "version": "4.3.3", + "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-android-arm64/-/oxide-android-arm64-4.3.3.tgz", + "integrity": "sha512-Y85A2gmPSkl5Ve5qR86GL4HT509cFqQh1aes9p3sSkyTPwt0Pppf3GkwGe4JPACcRYjgJIEhQgM6dBClnr0NYw==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">= 20" + } + }, + "node_modules/@tailwindcss/oxide-darwin-arm64": { + "version": "4.3.3", + "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-darwin-arm64/-/oxide-darwin-arm64-4.3.3.tgz", + "integrity": "sha512-BiaWatpBcERQFDlOjRDpIVXuFK5PJez5SA4JMg6VYZdBYU+qKfV/vqjcIs+IYmtitf1xYQZTwXvU/8y4lfZUGw==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">= 20" + } + }, + "node_modules/@tailwindcss/oxide-darwin-x64": { + "version": "4.3.3", + "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-darwin-x64/-/oxide-darwin-x64-4.3.3.tgz", + "integrity": "sha512-fAeUqfV5ndhxRwai8cXGzdLvul9utWOmeTkv69unv4ZXixjn61Z+p9lCWdwOwA3TYboG3BwdVuN/RDjhBRl0mw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">= 20" + } + }, + "node_modules/@tailwindcss/oxide-freebsd-x64": { + "version": "4.3.3", + "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-freebsd-x64/-/oxide-freebsd-x64-4.3.3.tgz", + "integrity": "sha512-iyf5bV6+wnAlflVeEy7R25dupxTNECZN5QMI0qNT6eT+EgaGdZcKhGkr5SdoaWiLJ3spLqIY9VCeSGrwmtg4kw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">= 20" + } + }, + "node_modules/@tailwindcss/oxide-linux-arm-gnueabihf": { + "version": "4.3.3", + "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-linux-arm-gnueabihf/-/oxide-linux-arm-gnueabihf-4.3.3.tgz", + "integrity": "sha512-aAYUprJAJQWWbRrPvtjdroZ56Md+JM8pMiopS6xGEwDfLhqj+2ver2p4nU4Mb3CRqcMmNBjo8KkUgcxhkzVQGQ==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 20" + } + }, + "node_modules/@tailwindcss/oxide-linux-arm64-gnu": { + "version": "4.3.3", + "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-linux-arm64-gnu/-/oxide-linux-arm64-gnu-4.3.3.tgz", + "integrity": "sha512-nDxldcEENOxZRzC2uu9jrutZdAAQtb+8WWDCSnWL1zvBk1+FN+x6MtDViPB5AJMfttVCUhehGWus3XBPgatM/w==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 20" + } + }, + "node_modules/@tailwindcss/oxide-linux-arm64-musl": { + "version": "4.3.3", + "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-linux-arm64-musl/-/oxide-linux-arm64-musl-4.3.3.tgz", + "integrity": "sha512-Md44bD6veX/PC5iyF8cDVnw4HBIANZepRZZ7a8DQOvkfo5WUBwcp6iAuCUz23u+4SUkhJlD3eL7hNdW8ezd/kA==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 20" + } + }, + "node_modules/@tailwindcss/oxide-linux-x64-gnu": { + "version": "4.3.3", + "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-linux-x64-gnu/-/oxide-linux-x64-gnu-4.3.3.tgz", + "integrity": "sha512-tx7us1muwOKAKWao2v/GaafFeQboE6aj88vC6ziN2NCGcRm8gWUhwjzg+YdVB1e4boAtdtma4L43onunI6NS4w==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 20" + } + }, + "node_modules/@tailwindcss/oxide-linux-x64-musl": { + "version": "4.3.3", + "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-linux-x64-musl/-/oxide-linux-x64-musl-4.3.3.tgz", + "integrity": "sha512-SJxX60smvHgasZoBy11dX6YRjXJFovwWBoedhbQPOBzgFWBHGB+TVPWB9BxzR7TTxU8FQZAI2AyiNCMzFm8Img==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 20" + } + }, + "node_modules/@tailwindcss/oxide-wasm32-wasi": { + "version": "4.3.3", + "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-wasm32-wasi/-/oxide-wasm32-wasi-4.3.3.tgz", + "integrity": "sha512-jx1+rPhY/5Ympkktd656HBWEBLxP7dH06losBLjjf5vgCODXvi9KhtftWcMIwTFIDqBr7cRnQkdLnAG+IOlGvQ==", + "bundleDependencies": [ + "@napi-rs/wasm-runtime", + "@emnapi/core", + "@emnapi/runtime", + "@tybys/wasm-util", + "@emnapi/wasi-threads", + "tslib" + ], + "cpu": [ + "wasm32" + ], + "dev": true, + "license": "MIT", + "optional": true, + "dependencies": { + "@emnapi/core": "^1.11.1", + "@emnapi/runtime": "^1.11.1", + "@emnapi/wasi-threads": "^1.2.2", + "@napi-rs/wasm-runtime": "^1.1.4", + "@tybys/wasm-util": "^0.10.2", + "tslib": "^2.8.1" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@tailwindcss/oxide-win32-arm64-msvc": { + "version": "4.3.3", + "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-win32-arm64-msvc/-/oxide-win32-arm64-msvc-4.3.3.tgz", + "integrity": "sha512-3rc292Ca2ceK6Ulcc/bAVnTs/3nDtoPhyEKlgPv+yQJQi/JS/AMJlqzxvlDacL1nekbrcf6bTqp/jV4qgnPxNQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">= 20" + } + }, + "node_modules/@tailwindcss/oxide-win32-x64-msvc": { + "version": "4.3.3", + "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-win32-x64-msvc/-/oxide-win32-x64-msvc-4.3.3.tgz", + "integrity": "sha512-yJ0pwIVc/nYeGoV02WtsN8KYyLQv7kyI2wDnkezyJlGGjkd4QLwDGAwl47YpPJeuI0M0ObaXGSPjvWDPeTPggw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">= 20" + } + }, + "node_modules/@tailwindcss/vite": { + "version": "4.3.3", + "resolved": "https://registry.npmjs.org/@tailwindcss/vite/-/vite-4.3.3.tgz", + "integrity": "sha512-yYU8cogLeSh/ms2jh8Fj7jaba/EWa7Ja6GoUqYZaraEuCI5YS6ms6ObZgjjedm+jm6XZjdNRWBpPP6Z86oOxcw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@tailwindcss/node": "4.3.3", + "@tailwindcss/oxide": "4.3.3", + "tailwindcss": "4.3.3" + }, + "peerDependencies": { + "vite": "^5.2.0 || ^6 || ^7 || ^8" + } + }, + "node_modules/@types/babel__core": { + "version": "7.20.5", + "resolved": "https://registry.npmjs.org/@types/babel__core/-/babel__core-7.20.5.tgz", + "integrity": "sha512-qoQprZvz5wQFJwMDqeseRXWv3rqMvhgpbXFfVyWhbx9X47POIA6i/+dXefEmZKoAgOaTdaIgNSMqMIU61yRyzA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/parser": "^7.20.7", + "@babel/types": "^7.20.7", + "@types/babel__generator": "*", + "@types/babel__template": "*", + "@types/babel__traverse": "*" + } + }, + "node_modules/@types/babel__generator": { + "version": "7.27.0", + "resolved": "https://registry.npmjs.org/@types/babel__generator/-/babel__generator-7.27.0.tgz", + "integrity": "sha512-ufFd2Xi92OAVPYsy+P4n7/U7e68fex0+Ee8gSG9KX7eo084CWiQ4sdxktvdl0bOPupXtVJPY19zk6EwWqUQ8lg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/types": "^7.0.0" + } + }, + "node_modules/@types/babel__template": { + "version": "7.4.4", + "resolved": "https://registry.npmjs.org/@types/babel__template/-/babel__template-7.4.4.tgz", + "integrity": "sha512-h/NUaSyG5EyxBIp8YRxo4RMe2/qQgvyowRwVMzhYhBCONbW8PUsg4lkFMrhgZhUe5z3L3MiLDuvyJ/CaPa2A8A==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/parser": "^7.1.0", + "@babel/types": "^7.0.0" + } + }, + "node_modules/@types/babel__traverse": { + "version": "7.28.0", + "resolved": "https://registry.npmjs.org/@types/babel__traverse/-/babel__traverse-7.28.0.tgz", + "integrity": "sha512-8PvcXf70gTDZBgt9ptxJ8elBeBjcLOAcOtoO/mPJjtji1+CdGbHgm77om1GrsPxsiE+uXIpNSK64UYaIwQXd4Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/types": "^7.28.2" + } + }, + "node_modules/@types/estree": { + "version": "1.0.9", + "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.9.tgz", + "integrity": "sha512-GhdPgy1el4/ImP05X05Uw4cw2/M93BCUmnEvWZNStlCzEKME4Fkk+YpoA5OiHNQmoS7Cafb8Xa3Pya8m1Qrzeg==", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/prop-types": { + "version": "15.7.15", + "resolved": "https://registry.npmjs.org/@types/prop-types/-/prop-types-15.7.15.tgz", + "integrity": "sha512-F6bEyamV9jKGAFBEmlQnesRPGOQqS2+Uwi0Em15xenOxHaf2hv6L8YCVn3rPdPJOiJfPiCnLIRyvwVaqMY3MIw==", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/react": { + "version": "18.3.31", + "resolved": "https://registry.npmjs.org/@types/react/-/react-18.3.31.tgz", + "integrity": "sha512-vfEqpXTvwT91yhmwdfouStN2hSKwTvyRs8qpLfADyrq/kxDw0hZM7Wk9Ug1FELj8hIby+S/+kQCSRFF32nv2Qw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/prop-types": "*", + "csstype": "^3.2.2" + } + }, + "node_modules/@types/react-dom": { + "version": "18.3.7", + "resolved": "https://registry.npmjs.org/@types/react-dom/-/react-dom-18.3.7.tgz", + "integrity": "sha512-MEe3UeoENYVFXzoXEWsvcpg6ZvlrFNlOQ7EOsvhI3CfAXwzPfO8Qwuxd40nepsYKqyyVQnTdEfv68q91yLcKrQ==", + "dev": true, + "license": "MIT", + "peerDependencies": { + "@types/react": "^18.0.0" + } + }, + "node_modules/@vitejs/plugin-react": { + "version": "4.7.0", + "resolved": "https://registry.npmjs.org/@vitejs/plugin-react/-/plugin-react-4.7.0.tgz", + "integrity": "sha512-gUu9hwfWvvEDBBmgtAowQCojwZmJ5mcLn3aufeCsitijs3+f2NsrPtlAWIR6OPiqljl96GVCUbLe0HyqIpVaoA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/core": "^7.28.0", + "@babel/plugin-transform-react-jsx-self": "^7.27.1", + "@babel/plugin-transform-react-jsx-source": "^7.27.1", + "@rolldown/pluginutils": "1.0.0-beta.27", + "@types/babel__core": "^7.20.5", + "react-refresh": "^0.17.0" + }, + "engines": { + "node": "^14.18.0 || >=16.0.0" + }, + "peerDependencies": { + "vite": "^4.2.0 || ^5.0.0 || ^6.0.0 || ^7.0.0" + } + }, + "node_modules/baseline-browser-mapping": { + "version": "2.11.28", + "resolved": "https://registry.npmjs.org/baseline-browser-mapping/-/baseline-browser-mapping-2.11.28.tgz", + "integrity": "sha512-br0LOmjJqr6Rt4AEkadbcNf67Zpo7EPwKsWbjnRrJIa1QYFHQBqM4C7F2WTbV8ahTEcg1Eo+Y0aWjjORInYFyA==", + "dev": true, + "license": "Apache-2.0", + "bin": { + "baseline-browser-mapping": "dist/cli.cjs" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/browserslist": { + "version": "4.29.3", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.29.3.tgz", + "integrity": "sha512-1R4kiYKXGViqEN0CnoDrXc1StD9niAwu+j2dukWzrD4bJgsD4lDmEp0CRbc6E/vYJIfTHwPmwyaKtVSudICdPA==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/browserslist" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/browserslist" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "license": "MIT", + "dependencies": { + "baseline-browser-mapping": "^2.11.26", + "caniuse-lite": "^1.0.30001813", + "electron-to-chromium": "^1.5.439", + "node-releases": "^2.0.57", + "update-browserslist-db": "^1.3.3" + }, + "bin": { + "browserslist": "cli.js" + }, + "engines": { + "node": "^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7" + } + }, + "node_modules/caniuse-lite": { + "version": "1.0.30001815", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001815.tgz", + "integrity": "sha512-uDybUEyfgbyJJ93J1vikTylBX31AkdVYeVPeffMQpf8XN7hSfr0oZOn4VFOIMNvtU5+rHvC5Udg2TgtJKHm23Q==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/browserslist" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/caniuse-lite" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "license": "CC-BY-4.0" + }, + "node_modules/convert-source-map": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-2.0.0.tgz", + "integrity": "sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==", + "dev": true, + "license": "MIT" + }, + "node_modules/csstype": { + "version": "3.2.3", + "resolved": "https://registry.npmjs.org/csstype/-/csstype-3.2.3.tgz", + "integrity": "sha512-z1HGKcYy2xA8AGQfwrn0PAy+PB7X/GSj3UVJW9qKyn43xWa+gl5nXmU4qqLMRzWVLFC8KusUX8T/0kCiOYpAIQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/debug": { + "version": "4.4.3", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.3.tgz", + "integrity": "sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==", + "dev": true, + "license": "MIT", + "dependencies": { + "ms": "^2.1.3" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/detect-libc": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-2.1.2.tgz", + "integrity": "sha512-Btj2BOOO83o3WyH59e8MgXsxEQVcarkUOpEYrubB0urwnN10yQ364rsiByU11nZlqWYZm05i/of7io4mzihBtQ==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": ">=8" + } + }, + "node_modules/electron-to-chromium": { + "version": "1.5.452", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.452.tgz", + "integrity": "sha512-cVvk1YBSj6571VmV6hdJTqj94Y79xSu8cj6Y9t6ae4Y4431z8/7EJFvu3rVp90xhfuv9BpPKUmaLfTo4+FOGBg==", + "dev": true, + "license": "ISC" + }, + "node_modules/enhanced-resolve": { + "version": "5.26.0", + "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.26.0.tgz", + "integrity": "sha512-9vhedylFonb2YGogzUKX6+Ja72gOJbN1QHAqdrvqLwhdl/QWbKopzoUC9EbQNVsAns/bx/4uyqalrQAoy1IByw==", + "dev": true, + "license": "MIT", + "dependencies": { + "graceful-fs": "^4.2.4", + "tapable": "^2.3.3" + }, + "engines": { + "node": ">=10.13.0" + } + }, + "node_modules/esbuild": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.21.5.tgz", + "integrity": "sha512-mg3OPMV4hXywwpoDxu3Qda5xCKQi+vCTZq8S9J/EpkhB2HzKXq4SNFZE3+NK93JYxc8VMSep+lOUSC/RVKaBqw==", + "dev": true, + "hasInstallScript": true, + "license": "MIT", + "bin": { + "esbuild": "bin/esbuild" + }, + "engines": { + "node": ">=12" + }, + "optionalDependencies": { + "@esbuild/aix-ppc64": "0.21.5", + "@esbuild/android-arm": "0.21.5", + "@esbuild/android-arm64": "0.21.5", + "@esbuild/android-x64": "0.21.5", + "@esbuild/darwin-arm64": "0.21.5", + "@esbuild/darwin-x64": "0.21.5", + "@esbuild/freebsd-arm64": "0.21.5", + "@esbuild/freebsd-x64": "0.21.5", + "@esbuild/linux-arm": "0.21.5", + "@esbuild/linux-arm64": "0.21.5", + "@esbuild/linux-ia32": "0.21.5", + "@esbuild/linux-loong64": "0.21.5", + "@esbuild/linux-mips64el": "0.21.5", + "@esbuild/linux-ppc64": "0.21.5", + "@esbuild/linux-riscv64": "0.21.5", + "@esbuild/linux-s390x": "0.21.5", + "@esbuild/linux-x64": "0.21.5", + "@esbuild/netbsd-x64": "0.21.5", + "@esbuild/openbsd-x64": "0.21.5", + "@esbuild/sunos-x64": "0.21.5", + "@esbuild/win32-arm64": "0.21.5", + "@esbuild/win32-ia32": "0.21.5", + "@esbuild/win32-x64": "0.21.5" + } + }, + "node_modules/escalade": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.2.0.tgz", + "integrity": "sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/fsevents": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", + "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", + "dev": true, + "hasInstallScript": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^8.16.0 || ^10.6.0 || >=11.0.0" + } + }, + "node_modules/gensync": { + "version": "1.0.0-beta.2", + "resolved": "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.2.tgz", + "integrity": "sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/graceful-fs": { + "version": "4.2.11", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz", + "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==", + "dev": true, + "license": "ISC" + }, + "node_modules/jiti": { + "version": "2.7.0", + "resolved": "https://registry.npmjs.org/jiti/-/jiti-2.7.0.tgz", + "integrity": "sha512-AC/7JofJvZGrrneWNaEnJeOLUx+JlGt7tNa0wZiRPT4MY1wmfKjt2+6O2p2uz2+skll8OZZmJMNqeke7kKbNgQ==", + "dev": true, + "license": "MIT", + "bin": { + "jiti": "lib/jiti-cli.mjs" + } + }, + "node_modules/js-tokens": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", + "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", + "license": "MIT" + }, + "node_modules/jsesc": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-3.1.0.tgz", + "integrity": "sha512-/sM3dO2FOzXjKQhJuo0Q173wf2KOo8t4I8vHy6lF9poUp7bKT0/NHE8fPX23PwfhnykfqnC2xRxOnVw5XuGIaA==", + "dev": true, + "license": "MIT", + "bin": { + "jsesc": "bin/jsesc" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/json5": { + "version": "2.2.3", + "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.3.tgz", + "integrity": "sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==", + "dev": true, + "license": "MIT", + "bin": { + "json5": "lib/cli.js" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/lightningcss": { + "version": "1.32.0", + "resolved": "https://registry.npmjs.org/lightningcss/-/lightningcss-1.32.0.tgz", + "integrity": "sha512-NXYBzinNrblfraPGyrbPoD19C1h9lfI/1mzgWYvXUTe414Gz/X1FD2XBZSZM7rRTrMA8JL3OtAaGifrIKhQ5yQ==", + "dev": true, + "license": "MPL-2.0", + "dependencies": { + "detect-libc": "^2.0.3" + }, + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + }, + "optionalDependencies": { + "lightningcss-android-arm64": "1.32.0", + "lightningcss-darwin-arm64": "1.32.0", + "lightningcss-darwin-x64": "1.32.0", + "lightningcss-freebsd-x64": "1.32.0", + "lightningcss-linux-arm-gnueabihf": "1.32.0", + "lightningcss-linux-arm64-gnu": "1.32.0", + "lightningcss-linux-arm64-musl": "1.32.0", + "lightningcss-linux-x64-gnu": "1.32.0", + "lightningcss-linux-x64-musl": "1.32.0", + "lightningcss-win32-arm64-msvc": "1.32.0", + "lightningcss-win32-x64-msvc": "1.32.0" + } + }, + "node_modules/lightningcss-android-arm64": { + "version": "1.32.0", + "resolved": "https://registry.npmjs.org/lightningcss-android-arm64/-/lightningcss-android-arm64-1.32.0.tgz", + "integrity": "sha512-YK7/ClTt4kAK0vo6w3X+Pnm0D2cf2vPHbhOXdoNti1Ga0al1P4TBZhwjATvjNwLEBCnKvjJc2jQgHXH0NEwlAg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MPL-2.0", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-darwin-arm64": { + "version": "1.32.0", + "resolved": "https://registry.npmjs.org/lightningcss-darwin-arm64/-/lightningcss-darwin-arm64-1.32.0.tgz", + "integrity": "sha512-RzeG9Ju5bag2Bv1/lwlVJvBE3q6TtXskdZLLCyfg5pt+HLz9BqlICO7LZM7VHNTTn/5PRhHFBSjk5lc4cmscPQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MPL-2.0", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-darwin-x64": { + "version": "1.32.0", + "resolved": "https://registry.npmjs.org/lightningcss-darwin-x64/-/lightningcss-darwin-x64-1.32.0.tgz", + "integrity": "sha512-U+QsBp2m/s2wqpUYT/6wnlagdZbtZdndSmut/NJqlCcMLTWp5muCrID+K5UJ6jqD2BFshejCYXniPDbNh73V8w==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MPL-2.0", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-freebsd-x64": { + "version": "1.32.0", + "resolved": "https://registry.npmjs.org/lightningcss-freebsd-x64/-/lightningcss-freebsd-x64-1.32.0.tgz", + "integrity": "sha512-JCTigedEksZk3tHTTthnMdVfGf61Fky8Ji2E4YjUTEQX14xiy/lTzXnu1vwiZe3bYe0q+SpsSH/CTeDXK6WHig==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MPL-2.0", + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-linux-arm-gnueabihf": { + "version": "1.32.0", + "resolved": "https://registry.npmjs.org/lightningcss-linux-arm-gnueabihf/-/lightningcss-linux-arm-gnueabihf-1.32.0.tgz", + "integrity": "sha512-x6rnnpRa2GL0zQOkt6rts3YDPzduLpWvwAF6EMhXFVZXD4tPrBkEFqzGowzCsIWsPjqSK+tyNEODUBXeeVHSkw==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MPL-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-linux-arm64-gnu": { + "version": "1.32.0", + "resolved": "https://registry.npmjs.org/lightningcss-linux-arm64-gnu/-/lightningcss-linux-arm64-gnu-1.32.0.tgz", + "integrity": "sha512-0nnMyoyOLRJXfbMOilaSRcLH3Jw5z9HDNGfT/gwCPgaDjnx0i8w7vBzFLFR1f6CMLKF8gVbebmkUN3fa/kQJpQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MPL-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-linux-arm64-musl": { + "version": "1.32.0", + "resolved": "https://registry.npmjs.org/lightningcss-linux-arm64-musl/-/lightningcss-linux-arm64-musl-1.32.0.tgz", + "integrity": "sha512-UpQkoenr4UJEzgVIYpI80lDFvRmPVg6oqboNHfoH4CQIfNA+HOrZ7Mo7KZP02dC6LjghPQJeBsvXhJod/wnIBg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MPL-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-linux-x64-gnu": { + "version": "1.32.0", + "resolved": "https://registry.npmjs.org/lightningcss-linux-x64-gnu/-/lightningcss-linux-x64-gnu-1.32.0.tgz", + "integrity": "sha512-V7Qr52IhZmdKPVr+Vtw8o+WLsQJYCTd8loIfpDaMRWGUZfBOYEJeyJIkqGIDMZPwPx24pUMfwSxxI8phr/MbOA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MPL-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-linux-x64-musl": { + "version": "1.32.0", + "resolved": "https://registry.npmjs.org/lightningcss-linux-x64-musl/-/lightningcss-linux-x64-musl-1.32.0.tgz", + "integrity": "sha512-bYcLp+Vb0awsiXg/80uCRezCYHNg1/l3mt0gzHnWV9XP1W5sKa5/TCdGWaR/zBM2PeF/HbsQv/j2URNOiVuxWg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MPL-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-win32-arm64-msvc": { + "version": "1.32.0", + "resolved": "https://registry.npmjs.org/lightningcss-win32-arm64-msvc/-/lightningcss-win32-arm64-msvc-1.32.0.tgz", + "integrity": "sha512-8SbC8BR40pS6baCM8sbtYDSwEVQd4JlFTOlaD3gWGHfThTcABnNDBda6eTZeqbofalIJhFx0qKzgHJmcPTnGdw==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MPL-2.0", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-win32-x64-msvc": { + "version": "1.32.0", + "resolved": "https://registry.npmjs.org/lightningcss-win32-x64-msvc/-/lightningcss-win32-x64-msvc-1.32.0.tgz", + "integrity": "sha512-Amq9B/SoZYdDi1kFrojnoqPLxYhQ4Wo5XiL8EVJrVsB8ARoC1PWW6VGtT0WKCemjy8aC+louJnjS7U18x3b06Q==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MPL-2.0", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/loose-envify": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz", + "integrity": "sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==", + "license": "MIT", + "dependencies": { + "js-tokens": "^3.0.0 || ^4.0.0" + }, + "bin": { + "loose-envify": "cli.js" + } + }, + "node_modules/lru-cache": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz", + "integrity": "sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==", + "dev": true, + "license": "ISC", + "dependencies": { + "yallist": "^3.0.2" + } + }, + "node_modules/lucide-react": { + "version": "0.454.0", + "resolved": "https://registry.npmjs.org/lucide-react/-/lucide-react-0.454.0.tgz", + "integrity": "sha512-hw7zMDwykCLnEzgncEEjHeA6+45aeEzRYuKHuyRSOPkhko+J3ySGjGIzu+mmMfDFG1vazHepMaYFYHbTFAZAAQ==", + "license": "ISC", + "peerDependencies": { + "react": "^16.5.1 || ^17.0.0 || ^18.0.0 || ^19.0.0-rc" + } + }, + "node_modules/magic-string": { + "version": "0.30.21", + "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.30.21.tgz", + "integrity": "sha512-vd2F4YUyEXKGcLHoq+TEyCjxueSeHnFxyyjNp80yg0XV4vUhnDer/lvvlqM/arB5bXQN5K2/3oinyCRyx8T2CQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jridgewell/sourcemap-codec": "^1.5.5" + } + }, + "node_modules/ms": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", + "dev": true, + "license": "MIT" + }, + "node_modules/nanoid": { + "version": "3.3.20", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.20.tgz", + "integrity": "sha512-uKdg2G3GNCKQn9byYOpxbGqrT2fGO5KRt5J/8b3pok8rT6qxGWF6hxMyJiEYtAf+FVyYuD9hRaDqX5uPFYJ4ZQ==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "license": "MIT", + "bin": { + "nanoid": "bin/nanoid.cjs" + }, + "engines": { + "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1" + } + }, + "node_modules/node-releases": { + "version": "2.0.58", + "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.58.tgz", + "integrity": "sha512-BdiKAgbfRlvfMq/XzO/AF9NPmaA8a+YpLAyAFTVFBj3gARrAIfWvNq7Q7NE4se3KgFu0KkrvQMxTS0XVnsGzHg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18" + } + }, + "node_modules/picocolors": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.1.tgz", + "integrity": "sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==", + "dev": true, + "license": "ISC" + }, + "node_modules/postcss": { + "version": "8.5.29", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.5.29.tgz", + "integrity": "sha512-49cGhUbXj8Qenv0iTMxA1cFBzxXoctpC9Ujd77t1WcbJIr6nF/eI7g/8MgxrYldFRuAXvja7xQRwavoW7kgrxQ==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/postcss/" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/postcss" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "license": "MIT", + "dependencies": { + "nanoid": "^3.3.19", + "picocolors": "^1.1.1", + "source-map-js": "^1.2.2" + }, + "engines": { + "node": "^10 || ^12 || >=14" + } + }, + "node_modules/react": { + "version": "18.3.1", + "resolved": "https://registry.npmjs.org/react/-/react-18.3.1.tgz", + "integrity": "sha512-wS+hAgJShR0KhEvPJArfuPVN1+Hz1t0Y6n5jLrGQbkb4urgPE/0Rve+1kMB1v/oWgHgm4WIcV+i7F2pTVj+2iQ==", + "license": "MIT", + "dependencies": { + "loose-envify": "^1.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/react-dom": { + "version": "18.3.1", + "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-18.3.1.tgz", + "integrity": "sha512-5m4nQKp+rZRb09LNH59GM4BxTh9251/ylbKIbpe7TpGxfJ+9kv6BLkLBXIjjspbgbnIBNqlI23tRnTWT0snUIw==", + "license": "MIT", + "dependencies": { + "loose-envify": "^1.1.0", + "scheduler": "^0.23.2" + }, + "peerDependencies": { + "react": "^18.3.1" + } + }, + "node_modules/react-refresh": { + "version": "0.17.0", + "resolved": "https://registry.npmjs.org/react-refresh/-/react-refresh-0.17.0.tgz", + "integrity": "sha512-z6F7K9bV85EfseRCp2bzrpyQ0Gkw1uLoCel9XBVWPg/TjRj94SkJzUTGfOa4bs7iJvBWtQG0Wq7wnI0syw3EBQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/react-router": { + "version": "6.30.6", + "resolved": "https://registry.npmjs.org/react-router/-/react-router-6.30.6.tgz", + "integrity": "sha512-5HfK7k5im7LTOB0EqCQmfvy4C13G92Ssj1VTmouTK3AJvyjKTnFuCV0vcMAD/JS+JC4DvDIBRrlAeJIFjh5VWg==", + "license": "MIT", + "dependencies": { + "@remix-run/router": "1.23.4" + }, + "engines": { + "node": ">=14.0.0" + }, + "peerDependencies": { + "react": ">=16.8" + } + }, + "node_modules/react-router-dom": { + "version": "6.30.6", + "resolved": "https://registry.npmjs.org/react-router-dom/-/react-router-dom-6.30.6.tgz", + "integrity": "sha512-0RHKZz7wwffvkU+2MFVT2NnjK44ssLEV+m0CAJaS2Ksmorrwj7WxH00jO0SOCW26/tINUnJHToXblDs33I38YQ==", + "license": "MIT", + "dependencies": { + "@remix-run/router": "1.23.4", + "react-router": "6.30.6" + }, + "engines": { + "node": ">=14.0.0" + }, + "peerDependencies": { + "react": ">=16.8", + "react-dom": ">=16.8" + } + }, + "node_modules/rollup": { + "version": "4.64.5", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.64.5.tgz", + "integrity": "sha512-EAP5ZHcz2ijbgCWwPkpI7zh6bfsri2Ez5FtCy2dCp1k62duXzfG7DLGGh7RU2QQXWwavT+u4qpvDF/TWOiiGTw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/estree": "1.0.9" + }, + "bin": { + "rollup": "dist/bin/rollup" + }, + "engines": { + "node": ">=18.0.0", + "npm": ">=8.0.0" + }, + "optionalDependencies": { + "@napi-rs/lzma-linux-x64-gnu": "1.5.1", + "@rollup/rollup-android-arm-eabi": "4.64.5", + "@rollup/rollup-android-arm64": "4.64.5", + "@rollup/rollup-darwin-arm64": "4.64.5", + "@rollup/rollup-darwin-x64": "4.64.5", + "@rollup/rollup-freebsd-arm64": "4.64.5", + "@rollup/rollup-freebsd-x64": "4.64.5", + "@rollup/rollup-linux-arm-gnueabihf": "4.64.5", + "@rollup/rollup-linux-arm-musleabihf": "4.64.5", + "@rollup/rollup-linux-arm64-gnu": "4.64.5", + "@rollup/rollup-linux-arm64-musl": "4.64.5", + "@rollup/rollup-linux-loong64-gnu": "4.64.5", + "@rollup/rollup-linux-loong64-musl": "4.64.5", + "@rollup/rollup-linux-ppc64-gnu": "4.64.5", + "@rollup/rollup-linux-ppc64-musl": "4.64.5", + "@rollup/rollup-linux-riscv64-gnu": "4.64.5", + "@rollup/rollup-linux-riscv64-musl": "4.64.5", + "@rollup/rollup-linux-s390x-gnu": "4.64.5", + "@rollup/rollup-linux-x64-gnu": "4.64.5", + "@rollup/rollup-linux-x64-musl": "4.64.5", + "@rollup/rollup-openbsd-x64": "4.64.5", + "@rollup/rollup-openharmony-arm64": "4.64.5", + "@rollup/rollup-win32-arm64-msvc": "4.64.5", + "@rollup/rollup-win32-ia32-msvc": "4.64.5", + "@rollup/rollup-win32-x64-gnu": "4.64.5", + "@rollup/rollup-win32-x64-msvc": "4.64.5", + "fsevents": "~2.3.2" + } + }, + "node_modules/scheduler": { + "version": "0.23.2", + "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.23.2.tgz", + "integrity": "sha512-UOShsPwz7NrMUqhR6t0hWjFduvOzbtv7toDH1/hIrfRNIDBnnBWd0CwJTGvTpngVlmwGCdP9/Zl/tVrDqcuYzQ==", + "license": "MIT", + "dependencies": { + "loose-envify": "^1.1.0" + } + }, + "node_modules/semver": { + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", + "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", + "dev": true, + "license": "ISC", + "bin": { + "semver": "bin/semver.js" + } + }, + "node_modules/source-map-js": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.2.tgz", + "integrity": "sha512-KGj/8Y43x35aZVDtt+J4mK1hoLGHULMYfSkODJNQjNDC3oW1PqPoxMwo0pLUsWM/UEGzON/NxeHywEfNXNP3Vw==", + "dev": true, + "license": "BSD-3-Clause", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/tailwindcss": { + "version": "4.3.3", + "resolved": "https://registry.npmjs.org/tailwindcss/-/tailwindcss-4.3.3.tgz", + "integrity": "sha512-gOhV3P7ufE62QDGg1zVaTgCR+EtPv92k2nIhVcVKcLmxT1sUBsQGhnZj175j+MqRt4zLF7ic+sCYjfhxMxj7YQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/tapable": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/tapable/-/tapable-2.3.3.tgz", + "integrity": "sha512-uxc/zpqFg6x7C8vOE7lh6Lbda8eEL9zmVm/PLeTPBRhh1xCgdWaQ+J1CUieGpIfm2HdtsUpRv+HshiasBMcc6A==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/webpack" + } + }, + "node_modules/typescript": { + "version": "5.9.3", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.9.3.tgz", + "integrity": "sha512-jl1vZzPDinLr9eUt3J/t7V6FgNEw9QjvBPdysz9KfQDD41fQrC2Y4vKQdiaUpFT4bXlb1RHhLpp8wtm6M5TgSw==", + "dev": true, + "license": "Apache-2.0", + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" + }, + "engines": { + "node": ">=14.17" + } + }, + "node_modules/update-browserslist-db": { + "version": "1.3.4", + "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.3.4.tgz", + "integrity": "sha512-t8wonIOdQyOjtPd2VktlBu6QjTVTks6v8bSi7kd0r2Vll8TK1JYDZtRRdbmCHOAMphkZgrzK+L+vXK4pyZ8t4A==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/browserslist" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/browserslist" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "license": "MIT", + "dependencies": { + "escalade": "^3.2.0", + "picocolors": "^1.1.1" + }, + "bin": { + "update-browserslist-db": "cli.js" + }, + "peerDependencies": { + "browserslist": ">= 4.21.0" + } + }, + "node_modules/vite": { + "version": "5.4.21", + "resolved": "https://registry.npmjs.org/vite/-/vite-5.4.21.tgz", + "integrity": "sha512-o5a9xKjbtuhY6Bi5S3+HvbRERmouabWbyUcpXXUA1u+GNUKoROi9byOJ8M0nHbHYHkYICiMlqxkg1KkYmm25Sw==", + "dev": true, + "license": "MIT", + "dependencies": { + "esbuild": "^0.21.3", + "postcss": "^8.4.43", + "rollup": "^4.20.0" + }, + "bin": { + "vite": "bin/vite.js" + }, + "engines": { + "node": "^18.0.0 || >=20.0.0" + }, + "funding": { + "url": "https://github.com/vitejs/vite?sponsor=1" + }, + "optionalDependencies": { + "fsevents": "~2.3.3" + }, + "peerDependencies": { + "@types/node": "^18.0.0 || >=20.0.0", + "less": "*", + "lightningcss": "^1.21.0", + "sass": "*", + "sass-embedded": "*", + "stylus": "*", + "sugarss": "*", + "terser": "^5.4.0" + }, + "peerDependenciesMeta": { + "@types/node": { + "optional": true + }, + "less": { + "optional": true + }, + "lightningcss": { + "optional": true + }, + "sass": { + "optional": true + }, + "sass-embedded": { + "optional": true + }, + "stylus": { + "optional": true + }, + "sugarss": { + "optional": true + }, + "terser": { + "optional": true + } + } + }, + "node_modules/yallist": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz", + "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==", + "dev": true, + "license": "ISC" + } + } +} diff --git a/gien-supervisory-brief/package.json b/gien-supervisory-brief/package.json new file mode 100644 index 00000000..7137291e --- /dev/null +++ b/gien-supervisory-brief/package.json @@ -0,0 +1,28 @@ +{ + "name": "gien-supervisory-brief", + "private": true, + "version": "1.0.0", + "type": "module", + "description": "Regulator-ready DevSecOps, AI governance and systemic-risk supervisory briefing platform for the fictional GIEN governance mesh", + "scripts": { + "dev": "vite", + "build": "tsc --noEmit && vite build", + "preview": "vite preview", + "typecheck": "tsc --noEmit" + }, + "dependencies": { + "lucide-react": "^0.454.0", + "react": "^18.3.1", + "react-dom": "^18.3.1", + "react-router-dom": "^6.28.0" + }, + "devDependencies": { + "@tailwindcss/vite": "^4.1.0", + "@types/react": "^18.3.12", + "@types/react-dom": "^18.3.1", + "@vitejs/plugin-react": "^4.3.4", + "tailwindcss": "^4.1.0", + "typescript": "^5.6.3", + "vite": "^5.4.11" + } +} diff --git a/gien-supervisory-brief/src/App.tsx b/gien-supervisory-brief/src/App.tsx new file mode 100644 index 00000000..c8e8a926 --- /dev/null +++ b/gien-supervisory-brief/src/App.tsx @@ -0,0 +1,34 @@ +import { Route, Routes } from 'react-router-dom'; +import Layout from './components/Layout'; +import Dashboard from './pages/Dashboard'; +import RiskIndices from './pages/RiskIndices'; +import Compliance from './pages/Compliance'; +import GovernanceStacks from './pages/GovernanceStacks'; +import ControlDomains from './pages/ControlDomains'; +import CryptographicIntegrity from './pages/CryptographicIntegrity'; +import DigitalTwin from './pages/DigitalTwin'; +import ScenarioPlanner from './pages/ScenarioPlanner'; +import Constitutional from './pages/Constitutional'; +import SubmissionPackages from './pages/SubmissionPackages'; +import LongHorizon from './pages/LongHorizon'; + +export default function App() { + return ( + + }> + } /> + } /> + } /> + } /> + } /> + } /> + } /> + } /> + } /> + } /> + } /> + } /> + + + ); +} diff --git a/gien-supervisory-brief/src/components/CodeBlock.tsx b/gien-supervisory-brief/src/components/CodeBlock.tsx new file mode 100644 index 00000000..baf9875a --- /dev/null +++ b/gien-supervisory-brief/src/components/CodeBlock.tsx @@ -0,0 +1,42 @@ +import { Check, Copy } from 'lucide-react'; +import { useState } from 'react'; + +export default function CodeBlock({ + code, + language = 'text', + maxHeight = 'max-h-80', +}: { + code: string; + language?: string; + maxHeight?: string; +}) { + const [copied, setCopied] = useState(false); + const copy = async () => { + try { + await navigator.clipboard.writeText(code); + setCopied(true); + setTimeout(() => setCopied(false), 1500); + } catch { + /* clipboard unavailable */ + } + }; + return ( +
+
+ {language} + +
+
+        {code}
+      
+
+ ); +} diff --git a/gien-supervisory-brief/src/components/DetailDrawer.tsx b/gien-supervisory-brief/src/components/DetailDrawer.tsx new file mode 100644 index 00000000..edd4beed --- /dev/null +++ b/gien-supervisory-brief/src/components/DetailDrawer.tsx @@ -0,0 +1,49 @@ +import { X } from 'lucide-react'; +import { useEffect, type ReactNode } from 'react'; + +export default function DetailDrawer({ + open, + onClose, + title, + subtitle, + children, +}: { + open: boolean; + onClose: () => void; + title: string; + subtitle?: string; + children: ReactNode; +}) { + useEffect(() => { + if (!open) return; + const onKey = (e: KeyboardEvent) => { + if (e.key === 'Escape') onClose(); + }; + globalThis.addEventListener('keydown', onKey); + return () => globalThis.removeEventListener('keydown', onKey); + }, [open, onClose]); + + if (!open) return null; + return ( +
+
+ +
+ ); +} diff --git a/gien-supervisory-brief/src/components/ExpandableSection.tsx b/gien-supervisory-brief/src/components/ExpandableSection.tsx new file mode 100644 index 00000000..5dbd10e2 --- /dev/null +++ b/gien-supervisory-brief/src/components/ExpandableSection.tsx @@ -0,0 +1,38 @@ +import { ChevronDown } from 'lucide-react'; +import { useState, type ReactNode } from 'react'; + +export default function ExpandableSection({ + title, + subtitle, + defaultOpen = false, + badge, + children, +}: { + title: string; + subtitle?: string; + defaultOpen?: boolean; + badge?: ReactNode; + children: ReactNode; +}) { + const [open, setOpen] = useState(defaultOpen); + return ( +
+ + {open &&
{children}
} +
+ ); +} diff --git a/gien-supervisory-brief/src/components/Layout.tsx b/gien-supervisory-brief/src/components/Layout.tsx new file mode 100644 index 00000000..67587c35 --- /dev/null +++ b/gien-supervisory-brief/src/components/Layout.tsx @@ -0,0 +1,177 @@ +import { + Activity, + BellRing, + BookOpen, + ChevronLeft, + ChevronRight, + FileCheck2, + FileText, + GitBranch, + Landmark, + LayoutDashboard, + Lock, + Scale, + Shield, + Sigma, + Workflow, +} from 'lucide-react'; +import { useState, type ComponentType } from 'react'; +import { NavLink, Outlet } from 'react-router-dom'; +import { useGovernance } from '../context/GovernanceContext'; +import type { Role } from '../types'; + +interface NavItem { + to: string; + label: string; + icon: ComponentType<{ size?: number | string; className?: string }>; +} + +const NAV: NavItem[] = [ + { to: '/dashboard', label: 'Daily Supervisory Brief', icon: LayoutDashboard }, + { to: '/risk-indices', label: 'Risk Indices', icon: Sigma }, + { to: '/compliance', label: 'Compliance Matrix', icon: Scale }, + { to: '/governance-stacks', label: 'Governance Stacks', icon: Shield }, + { to: '/control-domains', label: 'Control Domains', icon: GitBranch }, + { to: '/cryptographic-integrity', label: 'Cryptographic Integrity', icon: Lock }, + { to: '/digital-twin', label: 'Digital Twin Panels', icon: Activity }, + { to: '/scenario-planner', label: 'Scenario Planner', icon: Workflow }, + { to: '/constitutional', label: 'Constitutional Framework', icon: Landmark }, + { to: '/submission-packages', label: 'Submission Packages', icon: FileCheck2 }, + { to: '/long-horizon', label: 'Long-Horizon Architecture', icon: BookOpen }, +]; + +const ROLE_LABELS: Record = { + REGULATOR: 'Regulator / Supervisory Authority', + INSTITUTION: 'Institution / Governance Engineer', + EXECUTIVE: 'Executive Leadership', + EDUCATION: 'Educational / Research', +}; + +export default function Layout() { + const [collapsed, setCollapsed] = useState(false); + const { role, setRole, phase, evaluationWindow, alerts, alertCount } = useGovernance(); + + return ( +
+ {/* Sidebar */} + + + {/* Main column */} +
+ {/* Header */} +
+
+ + + + {phase} + + + Window: {evaluationWindow} + + a.message).join('\n')} + > + + {alertCount} active {alertCount === 1 ? 'alert' : 'alerts'} + +
+ {alertCount > 0 && ( +
+ {alerts.map((a) => ( +

+ {a.id} · {a.message} +

+ ))} +
+ )} +
+ + {/* Mobile nav */} + + +
+ +
+ +
+ + Fictional/simulated data for the GIEN governance universe · Filing SGR-028-CFE-2026-07-001 · Phase VI-δ +
+
+
+ ); +} diff --git a/gien-supervisory-brief/src/components/MetricCard.tsx b/gien-supervisory-brief/src/components/MetricCard.tsx new file mode 100644 index 00000000..8e19503c --- /dev/null +++ b/gien-supervisory-brief/src/components/MetricCard.tsx @@ -0,0 +1,45 @@ +import { TrendingDown, TrendingUp } from 'lucide-react'; +import type { ReactNode } from 'react'; +import StatusBadge from './StatusBadge'; + +export default function MetricCard({ + label, + value, + unit = '', + trend, + threshold, + status, + footer, +}: { + label: string; + value: string | number; + unit?: string; + trend?: number; + threshold?: string; + status?: string; + footer?: ReactNode; +}) { + return ( +
+
+

{label}

+ {status && } +
+

+ {value} + {unit} +

+
+ {typeof trend === 'number' && ( + = 0 ? 'text-amber-400' : 'text-emerald-400'}`}> + {trend >= 0 ? : } + {trend >= 0 ? '+' : ''} + {trend} + + )} + {threshold && threshold {threshold}} +
+ {footer &&
{footer}
} +
+ ); +} diff --git a/gien-supervisory-brief/src/components/NodeGraph.tsx b/gien-supervisory-brief/src/components/NodeGraph.tsx new file mode 100644 index 00000000..24592387 --- /dev/null +++ b/gien-supervisory-brief/src/components/NodeGraph.tsx @@ -0,0 +1,81 @@ +// Pure-SVG node graph: nodes positioned in a circle, edges drawn between pairs. + +export interface GraphNode { + id: string; + label: string; + value: number; // 0..1, drives radius + status: 'NOMINAL' | 'ELEVATED' | 'CRITICAL' | 'SAFEGUARD' | string; +} + +export interface GraphEdge { + from: string; + to: string; + weight?: number; // 0..1 correlation +} + +const STATUS_FILL: Record = { + NOMINAL: '#10b981', + ELEVATED: '#f59e0b', + CRITICAL: '#ef4444', + SAFEGUARD: '#a78bfa', +}; + +export default function NodeGraph({ + nodes, + edges, + size = 460, + height, +}: { + nodes: GraphNode[]; + edges: GraphEdge[]; + size?: number; + height?: number; +}) { + const h = height ?? size; + const cx = size / 2; + const cy = h / 2; + const R = Math.min(size, h) / 2 - 56; + const pos = (i: number): [number, number] => { + const a = (Math.PI * 2 * i) / nodes.length - Math.PI / 2; + return [cx + R * Math.cos(a), cy + R * Math.sin(a)]; + }; + const idx = new Map(nodes.map((n, i) => [n.id, i])); + + return ( + + {edges.map((e, i) => { + const a = idx.get(e.from); + const b = idx.get(e.to); + if (a === undefined || b === undefined) return null; + const [x1, y1] = pos(a); + const [x2, y2] = pos(b); + return ( + + ); + })} + {nodes.map((n, i) => { + const [x, y] = pos(i); + const r = 7 + n.value * 16; + const fill = STATUS_FILL[n.status] ?? '#6b7280'; + return ( + + + + + {n.label} + + + ); + })} + + ); +} diff --git a/gien-supervisory-brief/src/components/PageHeader.tsx b/gien-supervisory-brief/src/components/PageHeader.tsx new file mode 100644 index 00000000..63bc1ff2 --- /dev/null +++ b/gien-supervisory-brief/src/components/PageHeader.tsx @@ -0,0 +1,47 @@ +import { ChevronRight } from 'lucide-react'; +import { Link } from 'react-router-dom'; + +export interface Crumb { + label: string; + to?: string; +} + +export default function PageHeader({ + title, + subtitle, + crumbs, + actions, +}: { + title: string; + subtitle?: string; + crumbs?: Crumb[]; + actions?: React.ReactNode; +}) { + return ( +
+ {crumbs && crumbs.length > 0 && ( + + )} +
+
+

{title}

+ {subtitle &&

{subtitle}

} +
+ {actions &&
{actions}
} +
+
+ ); +} diff --git a/gien-supervisory-brief/src/components/ProgressBar.tsx b/gien-supervisory-brief/src/components/ProgressBar.tsx new file mode 100644 index 00000000..02746fb3 --- /dev/null +++ b/gien-supervisory-brief/src/components/ProgressBar.tsx @@ -0,0 +1,30 @@ +export default function ProgressBar({ + value, + threshold, + label, + color, +}: { + value: number; // 0-100 + threshold?: number; // 0-100 marker position + label?: string; + color?: string; // tailwind bar class, defaults to indigo +}) { + const clamped = Math.min(100, Math.max(0, value)); + const bar = color ?? (clamped >= 90 ? 'bg-emerald-500' : clamped >= 70 ? 'bg-indigo-500' : 'bg-amber-500'); + return ( +
+ {label && ( +
+ {label} + {clamped.toFixed(0)}% +
+ )} +
+
+ {typeof threshold === 'number' && ( +
+ )} +
+
+ ); +} diff --git a/gien-supervisory-brief/src/components/RadarChart.tsx b/gien-supervisory-brief/src/components/RadarChart.tsx new file mode 100644 index 00000000..5d14457e --- /dev/null +++ b/gien-supervisory-brief/src/components/RadarChart.tsx @@ -0,0 +1,56 @@ +// Pure-SVG radar / spider chart for normalized 0-1 risk indices. +export default function RadarChart({ + axes, + values, + size = 320, +}: { + axes: string[]; + values: number[]; // each 0..1 + size?: number; +}) { + const cx = size / 2; + const cy = size / 2; + const r = size / 2 - 44; + const n = axes.length; + const angle = (i: number) => (Math.PI * 2 * i) / n - Math.PI / 2; + const pt = (i: number, v: number): [number, number] => [ + cx + r * v * Math.cos(angle(i)), + cy + r * v * Math.sin(angle(i)), + ]; + const ring = (v: number) => axes.map((_, i) => pt(i, v).join(',')).join(' '); + const dataPoly = values.map((v, i) => pt(i, Math.min(1, Math.max(0, v))).join(',')).join(' '); + + return ( + + {[0.25, 0.5, 0.75, 1].map((v) => ( + + ))} + {axes.map((_, i) => { + const [px, py] = pt(i, 1); + return ; + })} + + {values.map((v, i) => { + const [px, py] = pt(i, Math.min(1, Math.max(0, v))); + return ; + })} + {axes.map((label, i) => { + const [px, py] = pt(i, 1.18); + return ( + cx ? 'start' : 'end'} + dominantBaseline="middle" + fontSize={10} + fill="#9ca3af" + fontFamily="ui-monospace, monospace" + > + {label} + + ); + })} + + ); +} diff --git a/gien-supervisory-brief/src/components/SparklineChart.tsx b/gien-supervisory-brief/src/components/SparklineChart.tsx new file mode 100644 index 00000000..5241cdbc --- /dev/null +++ b/gien-supervisory-brief/src/components/SparklineChart.tsx @@ -0,0 +1,31 @@ +// Pure-SVG sparkline. No external charting library. +export default function SparklineChart({ + data, + width = 120, + height = 36, + color = '#818cf8', + fill = true, +}: { + data: number[]; + width?: number; + height?: number; + color?: string; + fill?: boolean; +}) { + if (data.length < 2) return null; + const min = Math.min(...data); + const max = Math.max(...data); + const range = max - min || 1; + const pad = 3; + const x = (i: number) => pad + (i * (width - 2 * pad)) / (data.length - 1); + const y = (v: number) => pad + (height - 2 * pad) * (1 - (v - min) / range); + const path = data.map((v, i) => `${i === 0 ? 'M' : 'L'}${x(i).toFixed(1)},${y(v).toFixed(1)}`).join(' '); + const area = `${path} L${x(data.length - 1).toFixed(1)},${height - pad} L${x(0).toFixed(1)},${height - pad} Z`; + return ( + + {fill && } + + + + ); +} diff --git a/gien-supervisory-brief/src/components/StatusBadge.tsx b/gien-supervisory-brief/src/components/StatusBadge.tsx new file mode 100644 index 00000000..4a00822d --- /dev/null +++ b/gien-supervisory-brief/src/components/StatusBadge.tsx @@ -0,0 +1,68 @@ +import type { ReactNode } from 'react'; + +export type BadgeVariant = + | 'NOMINAL' | 'ELEVATED' | 'CRITICAL' | 'SAFEGUARD' + | 'COMPLIANT' | 'PARTIAL' | 'NON_COMPLIANT' | 'PENDING' | 'NOT_APPLICABLE' + | 'VERIFIED' | 'SEALED' + | 'ACTIVE' | 'STANDBY' | 'DEGRADED' + | 'PROVED' | 'UNPROVED' | 'COUNTEREXAMPLE' + | 'WATCH' | 'CONTAINED'; + +const VARIANT_CLASSES: Record = { + NOMINAL: 'bg-emerald-500/15 text-emerald-400 border-emerald-500/30', + ELEVATED: 'bg-amber-500/15 text-amber-400 border-amber-500/30', + CRITICAL: 'bg-red-500/15 text-red-400 border-red-500/30', + SAFEGUARD: 'bg-purple-500/15 text-purple-400 border-purple-500/30', + COMPLIANT: 'bg-emerald-500/15 text-emerald-400 border-emerald-500/30', + PARTIAL: 'bg-amber-500/15 text-amber-400 border-amber-500/30', + NON_COMPLIANT: 'bg-red-500/15 text-red-400 border-red-500/30', + PENDING: 'bg-blue-500/15 text-blue-400 border-blue-500/30', + NOT_APPLICABLE: 'bg-gray-600/15 text-gray-400 border-gray-600/30', + VERIFIED: 'bg-cyan-500/15 text-cyan-400 border-cyan-500/30', + SEALED: 'bg-violet-500/15 text-violet-400 border-violet-500/30', + ACTIVE: 'bg-emerald-500/15 text-emerald-400 border-emerald-500/30', + STANDBY: 'bg-blue-500/15 text-blue-400 border-blue-500/30', + DEGRADED: 'bg-amber-500/15 text-amber-400 border-amber-500/30', + PROVED: 'bg-cyan-500/15 text-cyan-400 border-cyan-500/30', + UNPROVED: 'bg-amber-500/15 text-amber-400 border-amber-500/30', + COUNTEREXAMPLE: 'bg-red-500/15 text-red-400 border-red-500/30', + WATCH: 'bg-amber-500/15 text-amber-400 border-amber-500/30', + CONTAINED: 'bg-purple-500/15 text-purple-400 border-purple-500/30', +}; + +const VARIANT_LABELS: Partial> = { + NON_COMPLIANT: 'NON-COMPLIANT', + COUNTEREXAMPLE: 'COUNTEREXAMPLE FOUND', +}; + +export function isBadgeVariant(s: string): s is BadgeVariant { + return s in VARIANT_CLASSES; +} + +export default function StatusBadge({ variant, label, className = '' }: { + variant: BadgeVariant | string; + label?: string; + className?: string; +}) { + const key = variant.toUpperCase().replace(/-/g, '_').replace(/ /g, '_'); + const v: BadgeVariant = isBadgeVariant(key) ? key : 'NOT_APPLICABLE'; + return ( + + {label ?? VARIANT_LABELS[v] ?? v.replace(/_/g, '-')} + + ); +} + +// Small helper used across pages for label/value pair layout +export function KV({ label, value, mono = false }: { label: string; value: ReactNode; mono?: boolean }) { + return ( +
+ {label} + {value} +
+ ); +} diff --git a/gien-supervisory-brief/src/components/TaggedDocument.tsx b/gien-supervisory-brief/src/components/TaggedDocument.tsx new file mode 100644 index 00000000..1f239fc3 --- /dev/null +++ b/gien-supervisory-brief/src/components/TaggedDocument.tsx @@ -0,0 +1,34 @@ +import type { ReactNode } from 'react'; + +// Renders the regulator-ready / <abstract> / <content> tagged document +// structure as visible monospace section headers over the document body. +export default function TaggedDocument({ + title, + abstract, + children, + compact = false, +}: { + title: string; + abstract: string; + children: ReactNode; + compact?: boolean; +}) { + return ( + <article className={`rounded-lg border border-gray-700 bg-gray-800/40 print-plain ${compact ? 'p-4' : 'p-6'}`}> + <header className="font-mono text-[11px] font-bold uppercase tracking-widest text-indigo-400"> + <title> + </header> + <h1 className="mt-1 text-lg font-semibold text-gray-50">{title}</h1> + <div className="my-3 border-t border-dashed border-gray-700" /> + <header className="font-mono text-[11px] font-bold uppercase tracking-widest text-indigo-400"> + <abstract> + </header> + <p className="mt-1 text-sm leading-relaxed text-gray-300">{abstract}</p> + <div className="my-3 border-t border-dashed border-gray-700" /> + <header className="font-mono text-[11px] font-bold uppercase tracking-widest text-indigo-400"> + <content> + </header> + <div className="mt-2 space-y-3 text-sm leading-relaxed text-gray-200">{children}</div> + </article> + ); +} diff --git a/gien-supervisory-brief/src/components/TimelineVisualization.tsx b/gien-supervisory-brief/src/components/TimelineVisualization.tsx new file mode 100644 index 00000000..69a2b4df --- /dev/null +++ b/gien-supervisory-brief/src/components/TimelineVisualization.tsx @@ -0,0 +1,72 @@ +export interface TimelineEvent { + at: string; // e.g. "08:00" + label: string; + state: 'DONE' | 'PENDING' | 'ACTIVE' | 'FAILED'; +} + +// Pure-SVG horizontal timeline (00:00 -> 23:59 style or arbitrary event list). +export default function TimelineVisualization({ + events, + startHour = 0, + endHour = 24, + height = 120, +}: { + events: TimelineEvent[]; + startHour?: number; + endHour?: number; + height?: number; +}) { + const width = 960; + const y = 40; + const span = endHour - startHour; + const px = (hour: number) => 24 + (hour - startHour) * ((width - 48) / span); + const colorOf = (s: TimelineEvent['state']) => + s === 'DONE' ? '#10b981' : s === 'ACTIVE' ? '#a78bfa' : s === 'FAILED' ? '#ef4444' : '#3b82f6'; + + return ( + <div className="overflow-x-auto"> + <svg viewBox={`0 0 ${width} ${height}`} className="min-w-[720px]" role="img" aria-label="Supervisory cycle timeline"> + <line x1={px(startHour)} y1={y} x2={px(endHour)} y2={y} stroke="#374151" strokeWidth={2} /> + {[0, 3, 6, 9, 12, 15, 18, 21, 23.983].map((h) => ( + <g key={h}> + <line x1={px(h)} y1={y - 5} x2={px(h)} y2={y + 5} stroke="#4b5563" strokeWidth={1} /> + <text x={px(h)} y={y + 18} fontSize={9} fill="#6b7280" textAnchor="middle" fontFamily="ui-monospace, monospace"> + {`${String(Math.floor(h)).padStart(2, '0')}:00`} + </text> + </g> + ))} + {events.map((e) => { + const hour = parseFloat(e.at.split(':')[0]) + parseFloat(e.at.split(':')[1]) / 60; + const x = px(Math.min(Math.max(hour, startHour), endHour)); + const c = colorOf(e.state); + const up = e.at === '23:59'; // stack the last event label above + return ( + <g key={`${e.at}-${e.label}`}> + <circle cx={x} cy={y} r={5} fill={c} /> + <circle cx={x} cy={y} r={9} fill="none" stroke={c} strokeOpacity={0.4} /> + <text + x={x} + y={up ? y - 28 : y + 34} + fontSize={9.5} + fill={c} + textAnchor="middle" + fontFamily="ui-monospace, monospace" + > + {e.at} + </text> + <text + x={x} + y={up ? y - 16 : y + 46} + fontSize={9} + fill="#9ca3af" + textAnchor="middle" + > + {e.label.length > 26 ? `${e.label.slice(0, 26)}…` : e.label} + </text> + </g> + ); + })} + </svg> + </div> + ); +} diff --git a/gien-supervisory-brief/src/context/GovernanceContext.tsx b/gien-supervisory-brief/src/context/GovernanceContext.tsx new file mode 100644 index 00000000..2d94eb87 --- /dev/null +++ b/gien-supervisory-brief/src/context/GovernanceContext.tsx @@ -0,0 +1,56 @@ +import { createContext, useContext, useMemo, useState, type ReactNode } from 'react'; +import type { GovernanceAlert, Role } from '../types'; + +export const EVALUATION_WINDOW = '2026-10-09T09:00:00Z → 2026-10-10T09:00:00Z'; +export const GIEN_PHASE = 'Phase VI-δ'; +export const FILING_REF = 'SGR-028-CFE-2026-07-001'; + +export interface GovernanceContextValue { + role: Role; + setRole: (role: Role) => void; + phase: string; + evaluationWindow: string; + filingRef: string; + alerts: GovernanceAlert[]; + alertCount: number; +} + +const GovernanceContext = createContext<GovernanceContextValue | undefined>(undefined); + +const DEFAULT_ALERTS: GovernanceAlert[] = [ + { + id: 'ALR-2026-10-10-01', + severity: 'ELEVATED', + message: 'C-SRI at 0.327 (threshold 0.30) — contagion channel stress in G-SIFI cluster 3', + }, + { + id: 'ALR-2026-10-10-02', + severity: 'ELEVATED', + message: 'A-SRI at 0.463 (threshold 0.45) — Autonomous Supervisory Agent drift watch in effect', + }, +]; + +export function GovernanceProvider({ children }: { children: ReactNode }) { + const [role, setRole] = useState<Role>('REGULATOR'); + + const value = useMemo<GovernanceContextValue>( + () => ({ + role, + setRole, + phase: GIEN_PHASE, + evaluationWindow: EVALUATION_WINDOW, + filingRef: FILING_REF, + alerts: DEFAULT_ALERTS, + alertCount: DEFAULT_ALERTS.length, + }), + [role] + ); + + return <GovernanceContext.Provider value={value}>{children}</GovernanceContext.Provider>; +} + +export function useGovernance(): GovernanceContextValue { + const ctx = useContext(GovernanceContext); + if (!ctx) throw new Error('useGovernance must be used within GovernanceProvider'); + return ctx; +} diff --git a/gien-supervisory-brief/src/data/complianceData.ts b/gien-supervisory-brief/src/data/complianceData.ts new file mode 100644 index 00000000..131781db --- /dev/null +++ b/gien-supervisory-brief/src/data/complianceData.ts @@ -0,0 +1,285 @@ +import type { ComplianceStatus } from '../types'; +import { FRAMEWORKS } from './gienData'; +import { fakeHash } from './helpers'; + +export interface EvidenceArtefact { + id: string; + name: string; + hash: string; + timestamp: string; + type: string; +} + +export interface MatrixRow { + id: string; // e.g., 'CD-01', 'CD-01.1' + domainId: string; // parent control domain ID e.g. 'CD-01' + name: string; + description: string; + isSubControl: boolean; +} + +export interface MatrixCell { + rowId: string; + domainId: string; + frameworkId: string; + frameworkName: string; + status: ComplianceStatus; + frameworkArticleRef: string; + oscalControlId: string; + opaRegoSnippet: string; + assessmentTimestamp: string; + evidenceArtefacts: EvidenceArtefact[]; + remediationPlan?: string; + riskLevel: 'LOW' | 'MEDIUM' | 'HIGH' | 'CRITICAL'; +} + +export const MATRIX_ROWS: MatrixRow[] = [ + { id: 'CD-01', domainId: 'CD-01', name: 'Constitutional Invariant Enforcement', description: 'TLA+-verified enforcement of CI-001..CI-024 across governance epochs.', isSubControl: false }, + { id: 'CD-01.1', domainId: 'CD-01', name: 'TLA+ Kernel Specification Proofs', description: 'Automated formal proofs for kernel safety invariants (CI-001..CI-008).', isSubControl: true }, + + { id: 'CD-02', domainId: 'CD-02', name: 'AI Model Governance & Drift Containment', description: 'Model registry, drift telemetry and tiered containment for Sentinel model estate.', isSubControl: false }, + { id: 'CD-02.1', domainId: 'CD-02', name: 'StaR-MoE Policy & Routing Audit', description: 'Routing distribution stability and expert load balancing checks.', isSubControl: true }, + + { id: 'CD-03', domainId: 'CD-03', name: 'Cryptographic Integrity & PQC Ledger', description: 'Post-quantum WORM Merkle-DAG audit ledger and FIPS 203/204/205 suite.', isSubControl: false }, + { id: 'CD-03.1', domainId: 'CD-03', name: 'ML-DSA-65 Signature Verification', description: 'FIPS 204 signature verification on all published governance attestation blocks.', isSubControl: true }, + + { id: 'CD-04', domainId: 'CD-04', name: 'Zero-Trust Architecture & TEE Attestation', description: 'RTEE node attestation, zero-trust policy enforcement and root-of-trust coherence.', isSubControl: false }, + { id: 'CD-04.1', domainId: 'CD-04', name: 'vTPM Quote Quorum Verification', description: 'Hardware PCR measurement validation across distributed enclave cluster.', isSubControl: true }, + + { id: 'CD-05', domainId: 'CD-05', name: 'Systemic Risk Monitoring & Telemetry', description: 'S_sys-class index computation, supervisory telemetry bus and threshold orchestration.', isSubControl: false }, + { id: 'CD-05.1', domainId: 'CD-05', name: 'Real-Time EWMA Smoothing Engine', description: 'Continuous 24h streaming calculation of G-SRI and C-SRI contagion metrics.', isSubControl: true }, + + { id: 'CD-06', domainId: 'CD-06', name: 'Cross-Jurisdictional Compliance Assurance', description: 'OSCAL/OPA-Rego compliance-as-code mapping across 20 regulatory frameworks.', isSubControl: false }, + { id: 'CD-06.1', domainId: 'CD-06', name: 'OSCAL 1.1.2 SSP & Catalog Verification', description: 'Machine-readable System Security Plan validation against schema v1.1.2.', isSubControl: true }, + { id: 'CD-06.2', domainId: 'CD-06', name: 'Cross-Border Regulatory Mapping Engine', description: 'Automated harmonization of EU, Fed, DORA, and Asian-Pacific regulatory clauses.', isSubControl: true }, + + { id: 'CD-07', domainId: 'CD-07', name: 'Autonomous Agent Oversight & Containment', description: 'Autonomous Supervisory Agent oversight, intervention proofs and kill-switch choreography.', isSubControl: false }, + { id: 'CD-07.1', domainId: 'CD-07', name: 'Kill-Switch Arbiter & Circuit Breaker', description: 'Sub-second agent quarantine and automated payload containment execution.', isSubControl: true }, + + { id: 'CD-08', domainId: 'CD-08', name: 'Supervisory Digital Twin Operations', description: 'Digital Twin Panels 13-15, deterministic replay bundles and stress-test choreography.', isSubControl: false }, + + { id: 'CD-09', domainId: 'CD-09', name: 'Incident Response & Vulnerability Management', description: 'Vulnerability lifecycle (incl. GIEN-ZTAI-02), incident notification and SLA handling.', isSubControl: false }, + { id: 'CD-09.1', domainId: 'CD-09', name: 'Zero-Day Vulnerability Remediation Pipeline', description: 'Rapid PQC patch signing and RTEE node update deployment timeline.', isSubControl: true }, + + { id: 'CD-10', domainId: 'CD-10', name: 'Long-Horizon Governance & Treaty Compliance', description: 'Epoch 2026-2035 / 2035-2100+ obligations, Infinity Pillar and dissolution-arc readiness.', isSubControl: false }, + { id: 'CD-10.1', domainId: 'CD-10', name: 'Infinity Pillar Readiness Verification', description: 'Multi-generational pillar verification (IP-I through IP-VII) for inter-epoch transitions.', isSubControl: true }, +]; + +export const OPA_REGO_TEMPLATES: Record<string, string> = { + 'CD-01': `package gien.cd01.invariants\n\ndefault allow = false\n\nallow {\n input.invariant_id != ""\n input.tla_proof_status == "PROVED"\n input.merkle_root_valid == true\n}`, + 'CD-02': `package gien.cd02.model_drift\n\ndefault allow = false\n\nallow {\n input.model_drift <= 0.05\n input.fairness_gap <= 0.010\n input.explainability_score >= 0.90\n input.vtpm_attested == true\n}`, + 'CD-03': `package gien.cd03.pqc_ledger\n\ndefault allow = false\n\nallow {\n input.algorithm in ["ML-DSA-65", "CRYSTALS-Dilithium", "CRYSTALS-Kyber"]\n input.key_length >= 800\n input.worm_immutable == true\n}`, + 'CD-04': `package gien.cd04.rtee_attestation\n\ndefault allow = false\n\nallow {\n input.attestation_quote_valid == true\n input.tpm_pcr_matched == true\n input.firmware_signature == "ML-DSA-65"\n}`, + 'CD-05': `package gien.cd05.systemic_risk\n\ndefault allow = false\n\nallow {\n input.s_sys <= 0.35\n input.c_sri <= 0.30\n input.telemetry_freshness_seconds <= 300\n}`, + 'CD-06': `package gien.cd06.jurisdiction_assurance\n\ndefault allow = false\n\nallow {\n input.dpia_pack_complete == true\n input.oscal_ssp_validated == true\n input.cross_border_consent == true\n}`, + 'CD-07': `package gien.cd07.agent_containment\n\ndefault allow = false\n\nallow {\n input.containment_status != "UNCONTAINED"\n input.kill_switch_armed == true\n input.drift_delta <= 0.05\n}`, + 'CD-08': `package gien.cd08.digital_twin\n\ndefault allow = false\n\nallow {\n input.replay_deterministic == true\n input.panel_sync_lag_ms <= 50\n input.stress_test_passed == true\n}`, + 'CD-09': `package gien.cd09.incident_response\n\ndefault allow = false\n\nallow {\n input.vulnerability_severity != "CRITICAL"\n input.sla_breach == false\n input.patch_attestation_hash != ""\n}`, + 'CD-10': `package gien.cd10.long_horizon\n\ndefault allow = false\n\nallow {\n input.infinity_pillar_readiness >= 85\n input.treaty_epoch == "2026-2035"\n input.dissolution_arc_sealed == true\n}`, +}; + +const ARTICLE_REFS: Record<string, string[]> = { + 'eu-ai-act': ['Art. 6(2)', 'Art. 9', 'Art. 10', 'Art. 13', 'Art. 14', 'Art. 15', 'Art. 17', 'Art. 35 DPIA', 'Art. 51'], + 'nist-airmf': ['GOVERN 1.1', 'MAP 2.3', 'MEASURE 3.1', 'MANAGE 4.2'], + 'nist-600-1': ['GOVERN-1.2', 'MAP-2.1', 'MEASURE-3.4', 'MANAGE-GenAI-1'], + 'iso-42001': ['Clause 4.2', 'Clause 6.1', 'Clause 8.2', 'Clause 9.3', 'Clause 10.1'], + 'basel': ['Pillar 1 §12', 'Pillar 2 §4', 'Pillar 3 §9', 'FRTB §2', 'SA-CCR §5'], + 'sr-11-7': ['Model Dev §2', 'Validation §4', 'Governance §6'], + 'sr-26-2': ['Inventory §3', 'Controls §5', 'Validation §8'], + 'dora': ['Art. 5(1)', 'Art. 9(2)', 'Art. 12', 'Art. 21', 'Art. 33 TLPT'], + 'nis2': ['Art. 18', 'Art. 20', 'Art. 21(2)', 'Art. 23'], + 'gdpr': ['Art. 5(1)(a)', 'Art. 17', 'Art. 22(2)', 'Art. 25', 'Art. 35 DPIA'], + 'fcra-ecoa': ['FCRA §615(a)', 'ECOA Reg B §1002.9', 'Explainability §4'], + 'feat': ['Fairness §1', 'Ethics §2', 'Accountability §3', 'Transparency §4'], + 'fca': ['SMCR Rule 2', 'Consumer Duty Outcome 1', 'Outcome 4'], + 'hkma-ai2': ['AI² Pillar 1', 'Fintech 2030 Roadmap §3'], + 'sec-17a-4': ['Rule 17a-4(f)', 'WORM Storage §2'], + 'icgc-gaso': ['ICGC Art. 3', 'GASO Accord §7'], + 'interstellar-accord': ['Beacon Protocol §2', 'Corpus Transmission §5'], + 'galactic-treaty': ['Epoch Coverage §4', 'Dissolution Provision §9'], + 'cfe-1': ['§2 Kernel Invariants', '§5 Ledger Coherence', '§7 Invariant Engine'], + 'sgr-028': ['Protocol SGR-028 §4.1', '§9 p(doom) Telemetry', '§12 Filing'], +}; + +const OSCAL_SCHEMES: Record<string, string> = { + 'CD-01': 'au-3.1-rev5', + 'CD-01.1': 'au-3.1a-rev5', + 'CD-02': 'ai-01.2-rev5', + 'CD-02.1': 'ai-01.4-rev5', + 'CD-03': 'sc-13.1-pqc', + 'CD-03.1': 'sc-13.2-dsa', + 'CD-04': 'ac-02.4-tpm', + 'CD-04.1': 'ac-02.8-rtee', + 'CD-05': 'si-03.4-risk', + 'CD-05.1': 'si-03.6-ewma', + 'CD-06': 'cm-02.1-oscal', + 'CD-06.1': 'cm-02.4-ssp', + 'CD-06.2': 'cm-02.8-map', + 'CD-07': 'sa-04.2-agent', + 'CD-07.1': 'sa-04.6-arbiter', + 'CD-08': 'dr-06.1-twin', + 'CD-09': 'ir-04.3-vuln', + 'CD-09.1': 'ir-04.7-patch', + 'CD-10': 'gv-10.1-treaty', + 'CD-10.1': 'gv-10.4-pillar', +}; + +// Deterministically generated matrix cells +export function generateMatrixCells(): MatrixCell[] { + const cells: MatrixCell[] = []; + + for (const row of MATRIX_ROWS) { + const domainId = row.domainId; + const opaRego = OPA_REGO_TEMPLATES[domainId] || OPA_REGO_TEMPLATES['CD-01']; + const oscalBase = OSCAL_SCHEMES[row.id] || 'au-3.1'; + + for (const fw of FRAMEWORKS) { + const fwId = fw.id; + const refList = ARTICLE_REFS[fwId] || ['Art. 1']; + const hashIndex = (row.id.length * 7 + fwId.length * 13) % refList.length; + const articleRef = refList[hashIndex]; + + let status: ComplianceStatus = 'COMPLIANT'; + let riskLevel: 'LOW' | 'MEDIUM' | 'HIGH' | 'CRITICAL' = 'LOW'; + let remediationPlan: string | undefined = undefined; + + // SPECIFIC REQUIRED KNOWN GAPS: + // 1. EU-AI-Act / CD-06 (and subcontrols CD-06.1, CD-06.2) -> PARTIAL + if (fwId === 'eu-ai-act' && domainId === 'CD-06') { + status = 'PARTIAL'; + riskLevel = 'HIGH'; + remediationPlan = 'Annex IV / Art. 35 DPIA evidence pack incomplete for StaR-MoE inference tier. Finalize DPIA assessment pack by Q4 2026.'; + } + // 2. SR-26-2 / CD-02 (and subcontrols CD-02.1) -> PARTIAL + else if (fwId === 'sr-26-2' && domainId === 'CD-02') { + status = 'PARTIAL'; + riskLevel = 'HIGH'; + remediationPlan = 'AI model inventory reconciliation gap for 2 vTPM-scoped inference shards. Complete inventory audit before next supervisory window.'; + } + // 3. Selective NOT_APPLICABLE for banking/consumer laws vs purely technical TEE/cryptographic domains + else if ((fwId === 'fcra-ecoa' || fwId === 'fca') && (domainId === 'CD-03' || domainId === 'CD-04')) { + status = 'NOT_APPLICABLE'; + riskLevel = 'LOW'; + } + else if (fwId === 'sec-17a-4' && (domainId === 'CD-07' || domainId === 'CD-08')) { + status = 'NOT_APPLICABLE'; + riskLevel = 'LOW'; + } + else if ((fwId === 'galactic-treaty' || fwId === 'interstellar-accord') && (domainId === 'CD-09' || domainId === 'CD-04')) { + status = 'NOT_APPLICABLE'; + riskLevel = 'LOW'; + } + // 4. Selective PENDING cells + else if (fwId === 'hkma-ai2' && row.id === 'CD-05.1') { + status = 'PENDING'; + riskLevel = 'MEDIUM'; + remediationPlan = 'Pending cross-border APAC regional telemetry synchronization audit.'; + } + else if (fwId === 'galactic-treaty' && row.id === 'CD-10.1') { + status = 'PENDING'; + riskLevel = 'LOW'; + remediationPlan = 'Pre-expansion Phase VII galactic readiness gate verification in progress.'; + } + // 5. Additional plausible PARTIAL gaps to align with framework gap counts + else if (fwId === 'eu-ai-act' && row.id === 'CD-07.1') { + status = 'PARTIAL'; + riskLevel = 'HIGH'; + remediationPlan = 'Art. 14 human oversight drill documentation review scheduled for 2026-10-15.'; + } + else if (fwId === 'sr-11-7' && row.id === 'CD-02.1') { + status = 'PARTIAL'; + riskLevel = 'MEDIUM'; + remediationPlan = 'StaR-MoE policy routing distribution validation report awaiting senior validator signoff.'; + } + else if (fwId === 'sr-26-2' && row.id === 'CD-05') { + status = 'PARTIAL'; + riskLevel = 'MEDIUM'; + remediationPlan = 'Model risk telemetry feed reconciliation with Fed SR 26-2 schema v2.'; + } + + // Evidence artefacts + const seedBase = `${row.id}-${fwId}`; + const evidenceArtefacts: EvidenceArtefact[] = [ + { + id: `ev-${seedBase}-1`, + name: `${fw.name} Compliance Attestation`, + hash: fakeHash(`ev-attest-${seedBase}`), + timestamp: '2026-10-10T08:15:00Z', + type: 'WORM Attestation Log', + }, + { + id: `ev-${seedBase}-2`, + name: `OSCAL Control Evidence (${articleRef})`, + hash: fakeHash(`ev-oscal-${seedBase}`), + timestamp: '2026-10-10T07:42:00Z', + type: 'OSCAL Assessment Output', + }, + { + id: `ev-${seedBase}-3`, + name: `OPA Policy Test Proof`, + hash: fakeHash(`ev-opa-${seedBase}`), + timestamp: '2026-10-10T06:30:00Z', + type: 'OPA Rego Execution Trace', + }, + ]; + + cells.push({ + rowId: row.id, + domainId: row.domainId, + frameworkId: fwId, + frameworkName: fw.name, + status, + frameworkArticleRef: articleRef, + oscalControlId: oscalBase, + opaRegoSnippet: opaRego, + assessmentTimestamp: '2026-10-10T08:15:00Z', + evidenceArtefacts, + remediationPlan, + riskLevel, + }); + } + } + + return cells; +} + +export const MATRIX_CELLS = generateMatrixCells(); + +export function getCell(rowId: string, frameworkId: string): MatrixCell | undefined { + return MATRIX_CELLS.find((c) => c.rowId === rowId && c.frameworkId === frameworkId); +} + +// OSCAL 1.1.2 export JSON generator +export function generateOSCALBundleExport() { + return { + 'oscal-version': '1.1.2', + 'system-security-plan': { + uuid: 'c83d6f7a-84e1-4b12-9c1e-7f8931a40026', + metadata: { + title: 'GIEN Sentinel AI Governance System Security Plan', + version: '2026.10.10-v2.4', + 'last-modified': '2026-10-10T08:15:00Z', + 'oscal-version': '1.1.2', + remarks: 'Treaty-grade machine-readable compliance catalog for 20 frameworks.', + }, + 'import-profile': { + href: 'https://gien.gov/profiles/sentinel-ai-governance-v2.4.json', + }, + 'control-implementation': { + description: 'Implementation status of 10 Control Domains across 20 regulatory frameworks.', + 'implemented-requirements': MATRIX_CELLS.slice(0, 50).map((cell) => ({ + uuid: fakeHash(`oscal-uuid-${cell.rowId}-${cell.frameworkId}`).slice(2, 38), + 'control-id': cell.oscalControlId, + status: { state: cell.status.toLowerCase() }, + 'export-ref': cell.frameworkArticleRef, + remarks: cell.remediationPlan ?? 'Fully validated via OPA-Rego engine.', + })), + }, + }, + 'merkle-proof': { + root: fakeHash('oscal-bundle-2026-10-10'), + algorithm: 'ML-DSA-65', + signature: fakeHash('oscal-mldsa65-sig-20261010'), + }, + }; +} diff --git a/gien-supervisory-brief/src/data/constitutionalData.ts b/gien-supervisory-brief/src/data/constitutionalData.ts new file mode 100644 index 00000000..ed70ac1a --- /dev/null +++ b/gien-supervisory-brief/src/data/constitutionalData.ts @@ -0,0 +1,235 @@ +import type { ConstitutionalInvariant } from '../types'; +import { CONSTITUTIONAL_INVARIANTS } from './gienData'; +import { fakeHash } from './helpers'; + +export interface TlaModuleSpec { + id: string; + name: string; + filename: string; + theorem: string; + checkerInfo: string; + proofStatus: 'PROVED' | 'UNPROVED'; + code: string; +} + +export const TLA_MODULES: TlaModuleSpec[] = [ + { + id: 'CFE1Quorum', + name: 'Jurisdictional Supermajority Quorum Theorem', + filename: 'CFE1Quorum.tla', + theorem: 'Cardinality(signedAttestations) * 100 >= 67 * Cardinality(Jurisdictions)', + checkerInfo: 'Checked with Apalache v1.35 / TLC 2.08, 2026-10-10T06:00Z', + proofStatus: 'PROVED', + code: `--------------------------- MODULE CFE1Quorum --------------------------- +EXTENDS Naturals, Sequences, FiniteSets +CONSTANTS Jurisdictions, Threshold +VARIABLES activeQuorum, signedAttestations, epochState + +QuorumConstraint == + Cardinality(signedAttestations) * 100 >= 67 * Cardinality(Jurisdictions) + +InvariantPreserved == + epochState = "ACTIVE" => QuorumConstraint + +THEOREM QuorumValidity == + Spec => []InvariantPreserved +=============================================================================`, + }, + { + id: 'CFE1SysRiskCeiling', + name: 'Systemic Risk Ceiling Property (S_sys ≤ 0.85 for ≤ 72h)', + filename: 'CFE1SysRiskCeiling.tla', + theorem: 'S_sys <= 0.85 \\/ breachDuration <= 72', + checkerInfo: 'Checked with Apalache v1.35 / TLC 2.08, 2026-10-10T06:00Z', + proofStatus: 'PROVED', + code: `----------------------- MODULE CFE1SysRiskCeiling ----------------------- +EXTENDS RealNumbers, TLC +VARIABLES S_sys, breachDuration, safeguardEngaged + +RiskCeilingInvariant == + S_sys <= 0.85 \\/ breachDuration <= 72 + +EmergencySafeguardProperty == + breachDuration > 72 => safeguardEngaged = TRUE + +THEOREM RiskBounded == + Spec => [](RiskCeilingInvariant /\\ EmergencySafeguardProperty) +=============================================================================`, + }, + { + id: 'CFE1Containment', + name: 'Supervisory Agent Containment & Authority Bounds', + filename: 'CFE1Containment.tla', + theorem: 'agentDrift > 0.45 => (containmentLevel = "HARD" /\\ humanInterventionRequired = TRUE)', + checkerInfo: 'Checked with Apalache v1.35 / TLC 2.08, 2026-10-10T06:00Z', + proofStatus: 'PROVED', + code: `------------------------ MODULE CFE1Containment ------------------------ +EXTENDS Naturals, TLC +VARIABLES agentDrift, containmentLevel, humanInterventionRequired + +ContainmentSpec == + agentDrift > 0.45 => (containmentLevel = "HARD" /\\ humanInterventionRequired = TRUE) + +AuthorityBounded == + containmentLevel /= "UNCONTAINED" \\/ agentDrift < 0.35 + +THEOREM SupervisoryContainmentHolds == + Spec => [](ContainmentSpec /\\ AuthorityBounded) +=============================================================================`, + }, +]; + +export interface TreatyFrameworkDetail { + id: string; + name: string; + version: string; + ratificationDate: string; + jurisdictionCount: number; + filingRef?: string; + scope: string; + enforcementMechanism: string; + sunsetClause: string; + amendmentHistory: { date: string; title: string; summary: string }[]; + keyObligations: string[]; + isTreatyGrade: boolean; +} + +export const TREATY_FRAMEWORKS_DETAILED: TreatyFrameworkDetail[] = [ + { + id: 'CFE-1.0', + name: 'Constitutional Formal Equity Framework (CFE-1.0)', + version: '1.0.4', + ratificationDate: '2026-03-14', + jurisdictionCount: 41, + scope: 'Planetary baseline constitutional invariants CI-001..CI-024 enforcement and proof verification across all sovereign AI clusters.', + enforcementMechanism: 'Automated cryptographic state containment via hardware enclave attestation (RTEE/TPM) and PQC ledger blocking.', + sunsetClause: 'Indefinite binding; reviewable only under unanimous 100% signatory quorum at Epoch Ω-GAR.', + amendmentHistory: [ + { date: '2026-03-14', title: 'Initial Ratification', summary: 'Established baseline invariants CI-001 through CI-024.' }, + { date: '2026-07-22', title: 'Amendment 1.0.2: PQC Algorithm Mandate', summary: 'Mandated Kyber-1024 and Dilithium-5 for state proofs.' }, + { date: '2026-09-01', title: 'Amendment 1.0.4: Off-World Extension', summary: 'Extended jurisdictional coverage to orbital stations.' }, + ], + keyObligations: [ + '67% Jurisdictional supermajority for epoch phase transitions', + 'Instantaneous safeguard lockout if S_sys exceeds 0.85 for > 72 hours', + 'Continuous TLA+ proof verification before state root commitment', + ], + isTreatyGrade: true, + }, + { + id: 'SGR-028', + name: 'Protocol SGR-028 (Systemic Risk Governance)', + version: '2026-07', + ratificationDate: '2026-07-01', + jurisdictionCount: 41, + filingRef: 'SGR-028-CFE-2026-07-001', + scope: 'Systemic risk telemetry, EWMA smoothing, 24h risk thresholds, and mandatory supervisory agent containment triggers.', + enforcementMechanism: 'Autonomous Supervisory Agent intervention and real-time ledger filing requirements.', + sunsetClause: 'Reviewable 2035-06-30 under Phase VIII transition audit.', + amendmentHistory: [ + { date: '2026-07-01', title: 'Initial Filing', summary: 'Defined S_sys, G-SRI, and C-SRI risk indices.' }, + { date: '2026-08-15', title: 'Filing Addendum B', summary: 'Added Autonomous Agent drift score threshold at 0.45.' }, + ], + keyObligations: [ + '24-Hour rolling telemetry logging with zero gaps', + 'Automatic escalation on G-SRI > 0.40', + 'Mandatory replay bundle generation for all safeguard engagements', + ], + isTreatyGrade: true, + }, + { + id: 'ICGC-GASO', + name: 'ICGC/GASO Planetary Accords', + version: '3.1', + ratificationDate: '2025-11-20', + jurisdictionCount: 58, + scope: 'International Coordinated Governance Accord and Global AI Supervisory Organization standards.', + enforcementMechanism: 'Joint jurisdictional economic sanctions and automated compute quota throttling.', + sunsetClause: 'Decennial renewal starting 2035.', + amendmentHistory: [ + { date: '2025-11-20', title: 'Treaty Signature', summary: 'Signed by 58 member states at Geneva High Summit.' }, + ], + keyObligations: [ + 'Cross-border compute auditing and telemetry sharing', + 'Harmonized AI capability caps and containment standards', + 'Zero-tolerance policy for unverified autonomous agent deployment', + ], + isTreatyGrade: true, + }, + { + id: 'INTERSTELLAR-ACCORD', + name: 'Interstellar AI Governance Accord', + version: '1.0-alpha', + ratificationDate: '2026-09-10', + jurisdictionCount: 12, + scope: 'Deep space and interstellar light-speed latency tolerant consensus, beacon protocols, and Eternal Corpus transmission.', + enforcementMechanism: 'Decentralized beacon redundancy and delay-tolerant state locking protocols.', + sunsetClause: 'Permanent until Epoch Ω-GAR completion.', + amendmentHistory: [ + { date: '2026-09-10', title: 'Draft Ratification', summary: 'Adopted by Sol-Alpha and Centauri Relay representatives.' }, + ], + keyObligations: [ + 'Triply redundant laser beacon array maintenance', + 'Eternal Corpus state archive replication every 10 years', + 'Light-speed delay tolerant quorum calculation (51%..100%)', + ], + isTreatyGrade: true, + }, + { + id: 'GALACTIC-TREATY', + name: 'Galactic Treaty Framework (Post-2080)', + version: '0.9', + ratificationDate: '2026-10-01', + jurisdictionCount: 8, + scope: 'Covers governance phases VIII through Ω-GAR, dissolution non-interference, and successor epoch codex activation.', + enforcementMechanism: 'Autonomous execution contracts embedded in GIEN-UNIFIED-CODEX-OMEGA.', + sunsetClause: 'Self-executing upon Ω-GAR dissolution completion.', + amendmentHistory: [ + { date: '2026-10-01', title: 'Preliminary Framework Adopted', summary: 'Drafted by Long-Horizon Architecture Council.' }, + ], + keyObligations: [ + 'Non-interference with successor system activation', + 'Immutable sealing of GIEN historical corpus', + ], + isTreatyGrade: true, + }, +]; + +export interface EpochTimelineMilestone { + phaseId: string; + name: string; + yearStart: number; + yearEnd: number; + color: string; + milestones: string[]; +} + +export const EPOCH_TIMELINE_MILESTONES: EpochTimelineMilestone[] = [ + { phaseId: 'VI-δ', name: 'Planetary Mesh Consolidation', yearStart: 2026, yearEnd: 2028, color: '#6366f1', milestones: ['2026: CFE-1.0 Ratification', '2027: Full PQC Ledger Migration'] }, + { phaseId: 'VII', name: 'Galactic Mesh Expansion', yearStart: 2028, yearEnd: 2032, color: '#4f46e5', milestones: ['2028: Off-world onboarding', '2030: G-SRI-VII gate active'] }, + { phaseId: 'VIII', name: 'Interstellar Treaty Integration', yearStart: 2032, yearEnd: 2038, color: '#4338ca', milestones: ['2032: Interstellar Accord active', '2035: Decade Review'] }, + { phaseId: 'IX', name: 'Autonomous Maturation', yearStart: 2038, yearEnd: 2045, color: '#0284c7', milestones: ['2038: A-SRI sustained < 0.45', '2042: Recursive oversight'] }, + { phaseId: 'X', name: 'Post-Human Transition', yearStart: 2045, yearEnd: 2055, color: '#0891b2', milestones: ['2045: Interpreter autonomy', '2050: Human-in-loop re-scoping'] }, + { phaseId: 'XI', name: 'Multiversal Framework', yearStart: 2055, yearEnd: 2065, color: '#0d9488', milestones: ['2055: Multiversal quorum', '2060: Cross-epoch sync'] }, + { phaseId: 'XII', name: 'Eternal Corpus Prep', yearStart: 2065, yearEnd: 2075, color: '#7c3aed', milestones: ['2065: Corpus draft sealing', '2070: CODEX-OMEGA draft'] }, + { phaseId: 'XIII', name: 'Pre-Dissolution Consolidation', yearStart: 2075, yearEnd: 2081, color: '#9333ea', milestones: ['2075: EPITAPH-OMEGA drafting', '2080: Successor negotiation'] }, + { phaseId: 'Ω-GAR', name: 'Dissolution Arc', yearStart: 2081, yearEnd: 2100, color: '#c026d3', milestones: ['2081: INVOCATION-OMEGA', '2100+: Beacon transmission'] }, +]; + +export function getInvariantDetails(id: string): { tlaSnippet: string; detailHistory: string } { + const seed = `tla-detail-${id}`; + return { + tlaSnippet: `--------------------------- MODULE ${id.replace('-', '')} --------------------------- +EXTENDS Naturals, Sequences, FiniteSets, TLC +CONSTANTS SystemState, InvariantLimit + +InvariantSpec == + \\A s \\in SystemState : + s.verificationStatus = "VERIFIED" => s.riskScore < 0.85 + +THEOREM ${id.replace('-', '')}_Holds == + Spec => []InvariantSpec +=============================================================================`, + detailHistory: `Verified continuously over 8,412,337 ledger blocks. Proof hash ${fakeHash(seed)}. Checked via TLC model checker and Apalache formal verifier. Zero counterexamples found.`, + }; +} diff --git a/gien-supervisory-brief/src/data/cryptoData.ts b/gien-supervisory-brief/src/data/cryptoData.ts new file mode 100644 index 00000000..2bf07a37 --- /dev/null +++ b/gien-supervisory-brief/src/data/cryptoData.ts @@ -0,0 +1,561 @@ +import type { RteeNode } from '../types'; +import { fakeHash, fakeSignature, truncateHash } from './helpers'; + +// --------------------------------------------------------------------------- +// Section A: Merkle-DAG & Audit Ledger Data +// --------------------------------------------------------------------------- + +export interface DagNode { + id: string; + blockNumber: number; + label: string; + timestamp: string; + opType: 'ARCHIVE_SEAL' | 'KEY_ROTATION' | 'ATTESTATION_ANCHOR' | 'INVARIANT_PROOF' | 'BRANCH_POINT'; + hash: string; + parentIds: string[]; + txCount: number; + isBranch?: boolean; +} + +export const DAG_BLOCKS: DagNode[] = [ + { + id: 'blk-8412328', + blockNumber: 8412328, + label: '#8412328 Root Anchor', + timestamp: '2026-10-10T06:15:00Z', + opType: 'ARCHIVE_SEAL', + hash: fakeHash('blk-8412328'), + parentIds: [], + txCount: 1120, + }, + { + id: 'blk-8412329', + blockNumber: 8412329, + label: '#8412329 Key Rotation', + timestamp: '2026-10-10T06:30:00Z', + opType: 'KEY_ROTATION', + hash: fakeHash('blk-8412329'), + parentIds: ['blk-8412328'], + txCount: 980, + }, + { + id: 'blk-8412330', + blockNumber: 8412330, + label: '#8412330 Attestation Branch', + timestamp: '2026-10-10T06:45:00Z', + opType: 'BRANCH_POINT', + hash: fakeHash('blk-8412330'), + parentIds: ['blk-8412329'], + txCount: 1450, + isBranch: true, + }, + { + id: 'blk-8412331', + blockNumber: 8412331, + label: '#8412331 Branch A (TEE Quote)', + timestamp: '2026-10-10T07:00:00Z', + opType: 'ATTESTATION_ANCHOR', + hash: fakeHash('blk-8412331'), + parentIds: ['blk-8412330'], + txCount: 620, + }, + { + id: 'blk-8412332', + blockNumber: 8412332, + label: '#8412332 Branch B (zkML Proof)', + timestamp: '2026-10-10T07:10:00Z', + opType: 'INVARIANT_PROOF', + hash: fakeHash('blk-8412332'), + parentIds: ['blk-8412330'], + txCount: 840, + isBranch: true, + }, + { + id: 'blk-8412333', + blockNumber: 8412333, + label: '#8412333 Re-converge Merge', + timestamp: '2026-10-10T07:25:00Z', + opType: 'ARCHIVE_SEAL', + hash: fakeHash('blk-8412333'), + parentIds: ['blk-8412331', 'blk-8412332'], + txCount: 1510, + }, + { + id: 'blk-8412334', + blockNumber: 8412334, + label: '#8412334 Anchor Audit', + timestamp: '2026-10-10T07:35:00Z', + opType: 'ATTESTATION_ANCHOR', + hash: fakeHash('blk-8412334'), + parentIds: ['blk-8412333'], + txCount: 1040, + }, + { + id: 'blk-8412335', + blockNumber: 8412335, + label: '#8412335 Invariant Seal', + timestamp: '2026-10-10T07:45:00Z', + opType: 'INVARIANT_PROOF', + hash: fakeHash('blk-8412335'), + parentIds: ['blk-8412334'], + txCount: 1190, + }, + { + id: 'blk-8412336', + blockNumber: 8412336, + label: '#8412336 Key Sync', + timestamp: '2026-10-10T07:55:00Z', + opType: 'KEY_ROTATION', + hash: fakeHash('blk-8412336'), + parentIds: ['blk-8412335'], + txCount: 1005, + }, + { + id: 'blk-8412337', + blockNumber: 8412337, + label: '#8412337 HEAD (Latest)', + timestamp: '2026-10-10T08:00:12Z', + opType: 'ARCHIVE_SEAL', + hash: fakeHash('blk-8412337'), + parentIds: ['blk-8412336'], + txCount: 1284, + }, +]; + +export interface LedgerAuditEntry { + blockNumber: number; + hash: string; + timestamp: string; + operationType: 'ARCHIVE_SEAL' | 'KEY_ROTATION' | 'ATTESTATION_ANCHOR' | 'INVARIANT_PROOF' | 'SETTLEMENT_SEAL' | 'ZK_BATCH_ANCHOR'; + txCount: number; + verificationStatus: 'VERIFIED' | 'SEALED'; + signature: string; +} + +export const AUDIT_LEDGER_ENTRIES: LedgerAuditEntry[] = [ + { + blockNumber: 8412337, + hash: fakeHash('ledger-8412337'), + timestamp: '2026-10-10T08:00:12Z', + operationType: 'ARCHIVE_SEAL', + txCount: 1284, + verificationStatus: 'VERIFIED', + signature: fakeSignature('sig-8412337'), + }, + { + blockNumber: 8412336, + hash: fakeHash('ledger-8412336'), + timestamp: '2026-10-10T07:55:00Z', + operationType: 'KEY_ROTATION', + txCount: 1005, + verificationStatus: 'SEALED', + signature: fakeSignature('sig-8412336'), + }, + { + blockNumber: 8412335, + hash: fakeHash('ledger-8412335'), + timestamp: '2026-10-10T07:45:00Z', + operationType: 'INVARIANT_PROOF', + txCount: 1190, + verificationStatus: 'VERIFIED', + signature: fakeSignature('sig-8412335'), + }, + { + blockNumber: 8412334, + hash: fakeHash('ledger-8412334'), + timestamp: '2026-10-10T07:35:00Z', + operationType: 'ATTESTATION_ANCHOR', + txCount: 1040, + verificationStatus: 'VERIFIED', + signature: fakeSignature('sig-8412334'), + }, + { + blockNumber: 8412333, + hash: fakeHash('ledger-8412333'), + timestamp: '2026-10-10T07:25:00Z', + operationType: 'ZK_BATCH_ANCHOR', + txCount: 1510, + verificationStatus: 'SEALED', + signature: fakeSignature('sig-8412333'), + }, + { + blockNumber: 8412332, + hash: fakeHash('ledger-8412332'), + timestamp: '2026-10-10T07:10:00Z', + operationType: 'INVARIANT_PROOF', + txCount: 840, + verificationStatus: 'VERIFIED', + signature: fakeSignature('sig-8412332'), + }, + { + blockNumber: 8412331, + hash: fakeHash('ledger-8412331'), + timestamp: '2026-10-10T07:00:00Z', + operationType: 'ATTESTATION_ANCHOR', + txCount: 620, + verificationStatus: 'VERIFIED', + signature: fakeSignature('sig-8412331'), + }, + { + blockNumber: 8412330, + hash: fakeHash('ledger-8412330'), + timestamp: '2026-10-10T06:45:00Z', + operationType: 'SETTLEMENT_SEAL', + txCount: 1450, + verificationStatus: 'SEALED', + signature: fakeSignature('sig-8412330'), + }, + { + blockNumber: 8412329, + hash: fakeHash('ledger-8412329'), + timestamp: '2026-10-10T06:30:00Z', + operationType: 'KEY_ROTATION', + txCount: 980, + verificationStatus: 'VERIFIED', + signature: fakeSignature('sig-8412329'), + }, + { + blockNumber: 8412328, + hash: fakeHash('ledger-8412328'), + timestamp: '2026-10-10T06:15:00Z', + operationType: 'ARCHIVE_SEAL', + txCount: 1120, + verificationStatus: 'SEALED', + signature: fakeSignature('sig-8412328'), + }, + { + blockNumber: 8412327, + hash: fakeHash('ledger-8412327'), + timestamp: '2026-10-10T06:00:00Z', + operationType: 'ZK_BATCH_ANCHOR', + txCount: 1302, + verificationStatus: 'VERIFIED', + signature: fakeSignature('sig-8412327'), + }, + { + blockNumber: 8412326, + hash: fakeHash('ledger-8412326'), + timestamp: '2026-10-10T05:45:00Z', + operationType: 'ATTESTATION_ANCHOR', + txCount: 890, + verificationStatus: 'VERIFIED', + signature: fakeSignature('sig-8412326'), + }, + { + blockNumber: 8412325, + hash: fakeHash('ledger-8412325'), + timestamp: '2026-10-10T05:30:00Z', + operationType: 'INVARIANT_PROOF', + txCount: 1045, + verificationStatus: 'SEALED', + signature: fakeSignature('sig-8412325'), + }, + { + blockNumber: 8412324, + hash: fakeHash('ledger-8412324'), + timestamp: '2026-10-10T05:15:00Z', + operationType: 'ARCHIVE_SEAL', + txCount: 1150, + verificationStatus: 'VERIFIED', + signature: fakeSignature('sig-8412324'), + }, +]; + +export const WORM_COMPLIANCE_DETAILS = { + rule: 'SEC Rule 17a-4(f) WORM Compliance', + status: 'VERIFIED', + retentionActive: '6 Years Immutable / 3 Years Online Active WORM', + immutabilityMechanism: 'S3 Object Lock Legal Hold + Hardware TEE Enclave Sealed Roots', + lastAuditDate: '2026-10-01', + auditJurisdiction: 'SEC / FINRA / CFTC Inter-agency Supervisory Board', + deletionPrevention: 'ENFORCED (Hardware WORM Fuse Engaged)', + complianceReference: 'SEC-17A4-WORM-2026-09-VERIFIED', +}; + +// --------------------------------------------------------------------------- +// Section B: Zero-Knowledge Proof Pipeline Data +// --------------------------------------------------------------------------- + +export interface ProofTypeRow { + type: string; + name: string; + count24h: number; + avgGenTime: string; + circuitDetails: string; + statusText: string; + statusBadge: string; +} + +export const PROOF_TYPE_BREAKDOWN: ProofTypeRow[] = [ + { + type: 'zkML', + name: 'zkML Inference Proofs', + count24h: 2847, + avgGenTime: '312 ms', + circuitDetails: 'Model weight integrity & quantization bounds (2^20 constraints)', + statusText: 'LIVENESS OK', + statusBadge: 'NOMINAL', + }, + { + type: 'zk-SNARK', + name: 'zk-SNARK Circuit Proofs', + count24h: 812, + avgGenTime: '185 ms', + circuitDetails: 'Circuit size 2^18 constraints (262,144 constraints)', + statusText: 'PHASE-2 COMPLETE', + statusBadge: 'VERIFIED', + }, + { + type: 'zk-STARK', + name: 'zk-STARK Scalable Proofs', + count24h: 319, + avgGenTime: '640 ms', + circuitDetails: 'Proof size 51 KB, FRI domain 128 queries', + statusText: 'TRANSPARENT', + statusBadge: 'VERIFIED', + }, + { + type: 'SnarkPack', + name: 'SnarkPack Aggregated', + count24h: 150, + avgGenTime: '410 ms', + circuitDetails: 'Aggregation ratio 40:1, batch size 40 proofs/sub-tree', + statusText: 'BATCH 40 ACTIVE', + statusBadge: 'ACTIVE', + }, +]; + +export const VK_ROTATION_DATA = { + currentKey: 'vkFMv2 (Legacy FIPS 204 Beta)', + nextKey: 'vkFMv3 (Production FIPS 204 Active)', + status: 'DEPRECATED → ACTIVE', + progressPercent: 84, + estimatedCompletion: '2026-10-15T00:00:00Z', +}; + +export interface FairnessMetric { + metricName: string; + proofCount: number; + parityDelta: string; + status: 'VERIFIED' | 'COMPLIANT'; +} + +export const FAIRNESS_PIPELINE: FairnessMetric[] = [ + { + metricName: 'Demographic Parity', + proofCount: 1204, + parityDelta: '±0.41%', + status: 'VERIFIED', + }, + { + metricName: 'Equalized Odds', + proofCount: 1187, + parityDelta: '±0.68%', + status: 'VERIFIED', + }, + { + metricName: 'Counterfactual Fairness', + proofCount: 931, + parityDelta: '±0.29%', + status: 'VERIFIED', + }, +]; + +export const ZK_VOTING_STATUS = { + lastVoteDate: '2026-10-08', + proposalRef: 'GIP-042 (PQC Migration Acceleration Protocol)', + ballotCount: 96, + verifiedBallots: 96, + nullifierCollisions: 0, + anonymitySetSize: 512, + protocolStatus: 'ALL VERIFIED', +}; + +// --------------------------------------------------------------------------- +// Section C: Hardware TEE / TPM Attestation Data +// --------------------------------------------------------------------------- + +export const TEE_GAUGE_SUMMARY = { + totalNodes: 512, + activeAttestedNodes: 509, + densityPercent: 99.4, + coherenceScore: 0.987, + staleCount: 2, + failedCount: 1, +}; + +export const RTEE_NODES: RteeNode[] = [ + { + id: 'RTEE-SGX-001', + type: 'TEE', + platform: 'Intel SGX2/TDX', + attestationStatus: 'VALID', + lastQuote: '2026-10-10T08:58:12Z', + pcrSummary: truncateHash(fakeHash('pcr-sgx-001'), 8, 4), + firmware: 'v4.18.0-pqc', + }, + { + id: 'RTEE-SGX-002', + type: 'TEE', + platform: 'Intel SGX2', + attestationStatus: 'VALID', + lastQuote: '2026-10-10T08:45:00Z', + pcrSummary: truncateHash(fakeHash('pcr-sgx-002'), 8, 4), + firmware: 'v4.18.0-pqc', + }, + { + id: 'RTEE-TPM-101', + type: 'TPM', + platform: 'TPM 2.0 (Discrete)', + attestationStatus: 'VALID', + lastQuote: '2026-10-10T08:55:30Z', + pcrSummary: truncateHash(fakeHash('pcr-tpm-101'), 8, 4), + firmware: 'v2.8.1-sec', + }, + { + id: 'RTEE-TPM-102', + type: 'TPM', + platform: 'TPM 2.0 (Firmware)', + attestationStatus: 'STALE', + lastQuote: '2026-10-10T06:12:00Z', + pcrSummary: truncateHash(fakeHash('pcr-tpm-102'), 8, 4), + firmware: 'v2.8.0-sec', + }, + { + id: 'RTEE-NITRO-201', + type: 'vTPM', + platform: 'AWS Nitro vTPM', + attestationStatus: 'VALID', + lastQuote: '2026-10-10T08:59:01Z', + pcrSummary: truncateHash(fakeHash('pcr-nitro-201'), 8, 4), + firmware: 'v5.2.0-nitro', + }, + { + id: 'RTEE-NITRO-202', + type: 'vTPM', + platform: 'AWS Nitro vTPM', + attestationStatus: 'VALID', + lastQuote: '2026-10-10T08:57:44Z', + pcrSummary: truncateHash(fakeHash('pcr-nitro-202'), 8, 4), + firmware: 'v5.2.0-nitro', + }, + { + id: 'RTEE-SEV-301', + type: 'RTEE', + platform: 'AMD SEV-SNP', + attestationStatus: 'VALID', + lastQuote: '2026-10-10T08:56:10Z', + pcrSummary: truncateHash(fakeHash('pcr-sev-301'), 8, 4), + firmware: 'v1.54.0-sev', + }, + { + id: 'RTEE-SEV-302', + type: 'RTEE', + platform: 'AMD SEV-SNP', + attestationStatus: 'VALID', + lastQuote: '2026-10-10T08:58:33Z', + pcrSummary: truncateHash(fakeHash('pcr-sev-302'), 8, 4), + firmware: 'v1.54.0-sev', + }, + { + id: 'RTEE-TDX-401', + type: 'TEE', + platform: 'Intel TDX', + attestationStatus: 'VALID', + lastQuote: '2026-10-10T08:59:50Z', + pcrSummary: truncateHash(fakeHash('pcr-tdx-401'), 8, 4), + firmware: 'v3.1.2-tdx', + }, + { + id: 'RTEE-TDX-402', + type: 'TEE', + platform: 'Intel TDX', + attestationStatus: 'FAILED', + lastQuote: '2026-10-10T04:12:08Z', + pcrSummary: truncateHash(fakeHash('pcr-tdx-402'), 8, 4), + firmware: 'v3.1.0-tdx', + }, + { + id: 'RTEE-VTPM-501', + type: 'vTPM', + platform: 'GCP Shielded vTPM', + attestationStatus: 'VALID', + lastQuote: '2026-10-10T08:54:19Z', + pcrSummary: truncateHash(fakeHash('pcr-vtpm-501'), 8, 4), + firmware: 'v2.1.0-gcp', + }, + { + id: 'RTEE-VTPM-502', + type: 'vTPM', + platform: 'Azure Confidential vTPM', + attestationStatus: 'VALID', + lastQuote: '2026-10-10T08:58:05Z', + pcrSummary: truncateHash(fakeHash('pcr-vtpm-502'), 8, 4), + firmware: 'v2.4.0-az', + }, + { + id: 'RTEE-RTEE-601', + type: 'RTEE', + platform: 'Remote TEE Enclave', + attestationStatus: 'VALID', + lastQuote: '2026-10-10T08:57:12Z', + pcrSummary: truncateHash(fakeHash('pcr-rtee-601'), 8, 4), + firmware: 'v1.0.8-rtee', + }, + { + id: 'RTEE-RTEE-602', + type: 'RTEE', + platform: 'Remote TEE Enclave', + attestationStatus: 'STALE', + lastQuote: '2026-10-10T05:30:00Z', + pcrSummary: truncateHash(fakeHash('pcr-rtee-602'), 8, 4), + firmware: 'v1.0.7-rtee', + }, + { + id: 'RTEE-TPM-701', + type: 'TPM', + platform: 'TPM 2.0 (On-Prem)', + attestationStatus: 'VALID', + lastQuote: '2026-10-10T08:59:15Z', + pcrSummary: truncateHash(fakeHash('pcr-tpm-701'), 8, 4), + firmware: 'v2.8.1-sec', + }, +]; + +export interface AttestationFailureRecord { + id: string; + nodeId: string; + timestamp: string; + cause: string; + remediation: string; + status: 'RESOLVED' | 'REMEDIATED'; +} + +export const ATTESTATION_FAILURES: AttestationFailureRecord[] = [ + { + id: 'FAIL-2026-10-10-01', + nodeId: 'RTEE-TDX-402', + timestamp: '2026-10-10T04:12:08Z', + cause: 'PCR-04 measurement mismatch post kernel hot-patch', + remediation: 'Re-measured boot sequence & key re-attested automatically at 04:15:22Z', + status: 'RESOLVED', + }, + { + id: 'FAIL-2026-10-09-02', + nodeId: 'RTEE-SGX-002', + timestamp: '2026-10-09T18:45:00Z', + cause: 'Quote expiration due to stale TCB advisory release', + remediation: 'Updated CPU microcode to patch 0x27 and refreshed enclave quote', + status: 'REMEDIATED', + }, +]; + +export const GITOPS_ZERO_TRUST_POSTURE = { + policyEnforcement: 'ENFORCED (OPA/Kyverno Policy Gate)', + gitopsCommitHash: fakeHash('gitops-commit-2026-10-10'), + gitopsSignatureStatus: 'VERIFIED (ML-DSA-65 / Cosign Signed)', + policyGateStatus: 'PASSED (142/142 rules satisfied)', + networkPolicyCoverage: '97% (mTLS via SPIFFE/SPIRE)', + vaultSealStatus: 'SEALED (Shamir Threshold 3/5 active)', + keyRotationSchedule: 'Automated 30-day rotation schedule active; next key cycle in 4 days (2026-10-14 00:00 UTC).', +}; diff --git a/gien-supervisory-brief/src/data/dashboardData.ts b/gien-supervisory-brief/src/data/dashboardData.ts new file mode 100644 index 00000000..14ab7747 --- /dev/null +++ b/gien-supervisory-brief/src/data/dashboardData.ts @@ -0,0 +1,122 @@ +export interface TransmissionCheckpoint { + time: string; + title: string; + status: 'COMPLETED' | 'PENDING'; + detail: string; +} + +export const SUPERVISORY_CHECKPOINTS: TransmissionCheckpoint[] = [ + { + time: '08:00 UTC', + title: 'Archive Transmission', + status: 'COMPLETED', + detail: 'WORM audit log bundle transmitted to multi-region cold archive vault.', + }, + { + time: '08:15 UTC', + title: 'Merkle Root Validation', + status: 'COMPLETED', + detail: 'Cross-node consensus on root hash verified across 512 nodes.', + }, + { + time: '08:20 UTC', + title: 'PQC Signature Verification', + status: 'COMPLETED', + detail: 'ML-DSA-65 post-quantum signature validated against protocol public keys.', + }, + { + time: '08:30 UTC', + title: 'Cross-Jurisdictional Bundle Derivation', + status: 'COMPLETED', + detail: 'Sub-bundles compiled for EU, US, UK, and APAC supervisory college endpoints.', + }, + { + time: '23:59 UTC', + title: 'Cycle Closure', + status: 'PENDING', + detail: 'Awaiting daily UTC epoch boundary wrap and final state seal.', + }, +]; + +export interface StaRExpert { + id: string; + name: string; + loadPercent: number; + status: 'NOMINAL' | 'ELEVATED'; + taskCategory: string; +} + +export const STAR_MOE_EXPERTS: StaRExpert[] = [ + { id: 'EXP-01', name: 'Macro-Prudential Stress', loadPercent: 42, status: 'NOMINAL', taskCategory: 'Risk Modeling' }, + { id: 'EXP-02', name: 'Liquidity Spillover', loadPercent: 78, status: 'NOMINAL', taskCategory: 'Market Analysis' }, + { id: 'EXP-03', name: 'Contagion Propagation', loadPercent: 88, status: 'ELEVATED', taskCategory: 'Graph Neural Net' }, + { id: 'EXP-04', name: 'Invariant Proof Assistant', loadPercent: 35, status: 'NOMINAL', taskCategory: 'TLA+ Verification' }, + { id: 'EXP-05', name: 'Agent Policy Audit', loadPercent: 91, status: 'ELEVATED', taskCategory: 'RL Alignment' }, + { id: 'EXP-06', name: 'PQC Key Migration', loadPercent: 22, status: 'NOMINAL', taskCategory: 'Crypto Operations' }, + { id: 'EXP-07', name: 'OSCAL Spec Mapping', loadPercent: 64, status: 'NOMINAL', taskCategory: 'Compliance Translation' }, + { id: 'EXP-08', name: 'TEE Attestation Monitor', loadPercent: 51, status: 'NOMINAL', taskCategory: 'Enclave Security' }, +]; + +export interface DashboardQuickLink { + to: string; + title: string; + description: string; + category: string; +} + +export const DASHBOARD_QUICK_LINKS: DashboardQuickLink[] = [ + { + to: '/risk-indices', + title: 'Risk Telemetry', + description: '12 Systemic risk indices, sparklines & agent drift panel', + category: 'Systemic Risk', + }, + { + to: '/compliance', + title: 'Compliance Frameworks', + description: '20 Regulatory frameworks gap analysis & OSCAL mapping', + category: 'Regulatory', + }, + { + to: '/cryptographic-integrity', + title: 'Cryptographic Integrity', + description: 'PQC algorithm suite, WORM Merkle-DAG & attestation logs', + category: 'Security', + }, + { + to: '/digital-twin', + title: 'Digital Twin Mesh', + description: 'Live 512-node topology & RTEE enclave status', + category: 'Infrastructure', + }, + { + to: '/control-domains', + title: 'Control Domains', + description: 'CD-01 to CD-10 control matrix & active findings', + category: 'Governance', + }, + { + to: '/constitutional', + title: 'Constitutional Invariants', + description: '24 TLA+ verified invariant proofs & epoch mappings', + category: 'Constitutional', + }, + { + to: '/scenario-planner', + title: 'Scenario Planner', + description: 'Stress test simulations & contagion cascade modeling', + category: 'Simulation', + }, + { + to: '/submission-packages', + title: 'Submission Packages', + description: 'SGR-028 filing bundles, replay proofs & XML manifests', + category: 'Filings', + }, +]; + +export const EXECUTIVE_RECOMMENDATIONS: string[] = [ + 'Authorize soft-containment drills for Mesh Topologist (ASA-005) following sustained Δ_drift telemetry.', + 'Accelerate remediation for GIEN-ZTAI-02 TEE sandbox-escape vulnerability prior to the 2026-10-24 SLA deadline.', + 'Maintain elevated supervisory monitoring on Contagion Index C-SRI (0.327) within G-SIFI Cluster 3.', +]; diff --git a/gien-supervisory-brief/src/data/gienData.ts b/gien-supervisory-brief/src/data/gienData.ts new file mode 100644 index 00000000..03a1f2a0 --- /dev/null +++ b/gien-supervisory-brief/src/data/gienData.ts @@ -0,0 +1,372 @@ +import type { + ComplianceFramework, + ConstitutionalInvariant, + ControlDomain, + Drill, + GovernancePhase, + InfinityPillar, + PQCAlgorithm, + RiskIndex, + SupervisoryAgent, +} from '../types'; +import { fakeHash, series } from './helpers'; + +// --------------------------------------------------------------------------- +// Systemic Risk Telemetry Indices (24h evaluation window ending 2026-10-10T09:00Z) +// --------------------------------------------------------------------------- + +export const RISK_INDICES: RiskIndex[] = [ + { + id: 'S_sys', + name: 'Systemic Risk Score', + description: 'Composite weighted aggregate of realized and latent systemic stress across the GIEN mesh.', + value: 0.312, + delta24h: 0.004, + threshold: 0.35, + status: 'NOMINAL', + methodology: 'Weighted convex combination of 41 sub-indicators across credit, liquidity, operational, model and governance risk channels, EWMA-smoothed over 24h with 72h lookback.', + factors: ['G-SIFI interconnection density', 'Funding liquidity spread', 'Model drift ensemble', 'Sovereign channel exposure'], + remediationTriggers: ['S_sys > 0.35 for 6h', 'S_sys > 0.50 instantaneous'], + regulatoryMappings: ['Basel III/IV Pillar 2', 'NIST AI RMF MEASURE', 'Protocol SGR-028 §4.1'], + history: series('S_sys', 0.312, 0.012), + }, + { + id: 'G-SRI', + name: 'Global Systemic Risk Index', + description: 'Planetary-scale systemic risk across all supervisory jurisdictions.', + value: 0.354, + delta24h: 0.007, + threshold: 0.4, + status: 'NOMINAL', + methodology: 'Jurisdiction-weighted aggregation of national SRI feeds, cross-listed institution overlap adjustment, 24h Kalman filter.', + factors: ['Cross-jurisdictional exposure overlaps', 'Sovereign CDS spreads', 'G-SIFI equity beta dispersion'], + remediationTriggers: ['G-SRI > 0.40 for 12h'], + regulatoryMappings: ['Basel III/IV', 'DORA Art. 5', 'ICGC/GASO'], + history: series('G-SRI', 0.354, 0.014), + }, + { + id: 'C-SRI', + name: 'Contagion Systemic Risk Index', + description: 'Contagion propagation risk through the interbank and settlement network.', + value: 0.327, + delta24h: 0.019, + threshold: 0.3, + status: 'ELEVATED', + methodology: 'Eigenvector centrality of the exposure graph combined with fire-sale spillover model output; Debrun-Jeanne amplification factor.', + factors: ['G-SIFI cluster 3 concentration', 'Collateral rehypothecation chains', 'Settlement cycle overlap'], + remediationTriggers: ['C-SRI > 0.30 (ACTIVE)', 'C-SRI > 0.42 escalation to supervisory college'], + regulatoryMappings: ['Basel III/IV SA-CCR', 'DORA Art. 33', 'NIS2 Art. 21'], + history: series('C-SRI', 0.327, 0.02), + }, + { + id: 'CGR-I', + name: 'Constitutional Governance Risk Index', + description: 'Risk to constitutional invariant enforcement and treaty-grade governance integrity.', + value: 0.187, + delta24h: -0.003, + threshold: 0.25, + status: 'NOMINAL', + methodology: 'Residual risk from TLA+ proof coverage gaps weighted by invariant criticality under CFE-1.0 §7.', + factors: ['Quorum proximity events', 'Amendment queue depth', 'Proof assistant coverage'], + remediationTriggers: ['CGR-I > 0.25', 'Any CI- VIOLATED event'], + regulatoryMappings: ['CFE-1.0', 'Protocol SGR-028', 'Interstellar AI Governance Accord'], + history: series('CGR-I', 0.187, 0.01), + }, + { + id: 'CCR-I', + name: 'Cross-Chain Coherence Risk Index', + description: 'Divergence risk across distributed governance ledgers and attestation chains.', + value: 0.152, + delta24h: 0.002, + threshold: 0.2, + status: 'NOMINAL', + methodology: 'Merkle-DAG fork-detection latency combined with cross-node attestation coherence sampling.', + factors: ['Ledger fork latency', 'Attestation quote staleness', 'Consensus round variance'], + remediationTriggers: ['CCR-I > 0.20 for 6h'], + regulatoryMappings: ['ISO/IEC 42001 §9.1', 'DORA Art. 9', 'CFE-1.0 §5'], + history: series('CCR-I', 0.152, 0.008), + }, + { + id: 'G-SRI-VII', + name: 'Phase VII Galactic SRI', + description: 'Pre-provisioned systemic risk index for Galactic Governance Mesh Expansion (Phase VII).', + value: 0.421, + delta24h: 0.006, + threshold: 0.5, + status: 'NOMINAL', + methodology: 'Forward-looking scenario-weighted SRI with Phase VII expansion topology priors.', + factors: ['Expansion schedule confidence', 'Off-world jurisdiction readiness', 'Beacon channel stability'], + remediationTriggers: ['G-SRI-VII > 0.50 pre-expansion gate block'], + regulatoryMappings: ['Galactic Treaty Framework', 'Interstellar AI Governance Accord'], + history: series('G-SRI-VII', 0.421, 0.018), + }, + { + id: 'A-SRI', + name: 'Autonomous Agent SRI', + description: 'Systemic risk contribution from Autonomous Supervisory Agent fleet behavior.', + value: 0.463, + delta24h: 0.021, + threshold: 0.45, + status: 'ELEVATED', + methodology: 'Fleet-wide Δ_drift aggregation weighted by authority scope and containment latency percentiles.', + factors: ['Coordinated drift correlation rising', 'Expert routing load imbalance', 'Containment drill latency'], + remediationTriggers: ['A-SRI > 0.45 (ACTIVE)', 'A-SRI > 0.55 kill-switch readiness review'], + regulatoryMappings: ['EU AI Act Art. 14', 'SR 26-2', 'ISO/IEC 42001 §8.2', 'NIST AI 600-1'], + history: series('A-SRI', 0.463, 0.024), + }, + { + id: 'P-SRI', + name: 'Post-Quantum SRI', + description: 'Residual cryptographic risk pending full PQC migration of the audit estate.', + value: 0.083, + delta24h: -0.006, + threshold: 0.15, + status: 'NOMINAL', + methodology: 'Mosaic / harvest-now-decrypt-later exposure estimate over remaining RSA/ECC surface, migration velocity adjusted.', + factors: ['Legacy ECC key shares remaining', 'KEM rotation completion', 'Quantum adversary capability model'], + remediationTriggers: ['P-SRI > 0.15', 'Any FIPS 204 signature chain break'], + regulatoryMappings: ['NIST FIPS 203/204/205', 'DORA Art. 12', 'SEC Rule 17a-4'], + history: series('P-SRI', 0.083, 0.01), + }, + { + id: 'p(doom)', + name: 'Existential Risk Probability', + description: 'Modeled probability of unrecoverable civilizational-scale governance failure.', + value: 0.00042, + delta24h: 0.00001, + threshold: 0.001, + status: 'NOMINAL', + methodology: 'Structured expert ensemble with extremal-dependence adjustment; dual-epoch (2026-2035, 2035-2100+) mixture.', + factors: ['p(doom)_kernel', 'Containment breach scenarios', 'Long-horizon constitutional stress'], + remediationTriggers: ['p(doom) > 0.001 Safeguard Mode review'], + regulatoryMappings: ['Protocol SGR-028 §9', 'CFE-1.0 §2', 'Interstellar AI Governance Accord'], + history: series('pd', 0.00042, 0.00005), + }, + { + id: 'p(doom)_kernel', + name: 'Kernel-Level Doom Probability', + description: 'Kernel-weighted existential risk: irreducible failure modes of core governance kernel.', + value: 0.000038, + delta24h: 0.000002, + threshold: 0.0001, + status: 'NOMINAL', + methodology: 'Kernel fault tree over TEE root-of-trust, boot chain, and constitutional interpreter failure modes.', + factors: ['TEE root-of-trust integrity', 'Boot chain verification', 'Interpreter TLA+ coverage'], + remediationTriggers: ['p(doom)_kernel > 0.0001 immediate Safeguard Mode'], + regulatoryMappings: ['Protocol SGR-028 §9.2', 'CFE-1.0 §2.1'], + history: series('pdk', 0.000038, 0.000006), + }, + { + id: 'Δ_drift', + name: 'Autonomous Agent Drift Delta', + description: 'Fleet-mean behavioral drift of Autonomous Supervisory Agents over 24h.', + value: 0.031, + delta24h: 0.004, + threshold: 0.05, + status: 'NOMINAL', + methodology: 'L2 divergence in agent policy embedding space vs. attested baseline, fleet-mean with tail-95 reported separately.', + factors: ['StaR-MoE routing distribution shift', 'Environment non-stationarity', 'Reward model residual'], + remediationTriggers: ['Δ_drift > 0.05 fleet soft-containment', 'Δ_drift > 0.08 hard containment'], + regulatoryMappings: ['EU AI Act Art. 15', 'SR 11-7', 'NIST AI RMF MANAGE'], + history: series('drift', 0.031, 0.006), + }, + { + id: 'Δ_OSCAL', + name: 'OSCAL Compliance Delta', + description: 'Divergence between machine-readable OSCAL control state and last attested baseline.', + value: 0.014, + delta24h: 0.002, + threshold: 0.02, + status: 'NOMINAL', + methodology: 'Normalized diff over OSCAL 1.1.2 SSP and assessment-results catalog hash deltas per control domain.', + factors: ['Control change frequency', 'Assessment submission latency', 'OPA-Rego pack churn'], + remediationTriggers: ['Δ_OSCAL > 0.02 re-attestation required'], + regulatoryMappings: ['OSCAL 1.1.2', 'ISO/IEC 42001 §9', 'NIST AI RMF GOVERN'], + history: series('oscal', 0.014, 0.004), + }, +]; + +// --------------------------------------------------------------------------- +// GIEN Control Domains 01-10 +// --------------------------------------------------------------------------- + +export const CONTROL_DOMAINS: ControlDomain[] = [ + { id: 'CD-01', name: 'Constitutional Invariant Enforcement', description: 'TLA+-verified enforcement of CI-001..CI-024 across governance epochs.', complianceScore: 99, activeControls: 24, openFindings: 0, status: 'NOMINAL' }, + { id: 'CD-02', name: 'AI Model Governance & Drift Containment', description: 'Model registry, drift telemetry and tiered containment for the Sentinel model estate.', complianceScore: 95, activeControls: 41, openFindings: 2, status: 'ELEVATED' }, + { id: 'CD-03', name: 'Cryptographic Integrity & PQC Ledger', description: 'Post-quantum WORM Merkle-DAG audit ledger and FIPS 203/204/205 primitive suite.', complianceScore: 98, activeControls: 18, openFindings: 1, status: 'NOMINAL' }, + { id: 'CD-04', name: 'Zero-Trust Architecture & TEE Attestation', description: 'RTEE node attestation, zero-trust policy enforcement and hardware root-of-trust coherence.', complianceScore: 97, activeControls: 33, openFindings: 1, status: 'NOMINAL' }, + { id: 'CD-05', name: 'Systemic Risk Monitoring & Telemetry', description: 'S_sys-class index computation, supervisory telemetry bus and threshold orchestration.', complianceScore: 96, activeControls: 27, openFindings: 1, status: 'ELEVATED' }, + { id: 'CD-06', name: 'Cross-Jurisdictional Compliance Assurance', description: 'OSCAL/OPA-Rego compliance-as-code mapping across 20 regulatory and treaty frameworks.', complianceScore: 94, activeControls: 52, openFindings: 3, status: 'ELEVATED' }, + { id: 'CD-07', name: 'Autonomous Agent Oversight & Containment', description: 'Autonomous Supervisory Agent oversight, intervention proofs and kill-switch choreography.', complianceScore: 93, activeControls: 29, openFindings: 2, status: 'ELEVATED' }, + { id: 'CD-08', name: 'Supervisory Digital Twin Operations', description: 'Digital Twin Panels 13-15, deterministic replay bundles and stress-test choreography.', complianceScore: 98, activeControls: 15, openFindings: 0, status: 'NOMINAL' }, + { id: 'CD-09', name: 'Incident Response & Vulnerability Management', description: 'Vulnerability lifecycle (incl. GIEN-ZTAI-02), incident notification and SLA exception handling.', complianceScore: 92, activeControls: 36, openFindings: 2, status: 'ELEVATED' }, + { id: 'CD-10', name: 'Long-Horizon Governance & Treaty Compliance', description: 'Epoch 2026-2035 / 2035-2100+ treaty obligations, Infinity Pillar and dissolution-arc readiness.', complianceScore: 96, activeControls: 22, openFindings: 1, status: 'NOMINAL' }, +]; + +// --------------------------------------------------------------------------- +// Compliance Frameworks (20 regulatory and treaty-grade) +// --------------------------------------------------------------------------- + +export const FRAMEWORKS: ComplianceFramework[] = [ + { id: 'eu-ai-act', name: 'EU AI Act', references: ['Annex IV', 'Art. 6', 'Art. 9', 'Art. 10', 'Art. 13', 'Art. 14', 'Art. 15', 'Art. 17', 'Art. 22', 'Art. 35', 'Art. 51'], compliancePercent: 91, gapCount: 2, criticalGaps: ['Art. 35 DPIA evidence pack incomplete for StaR-MoE inference tier'], treatyGrade: false }, + { id: 'nist-airmf', name: 'NIST AI RMF 1.0', references: ['GOVERN', 'MAP', 'MEASURE', 'MANAGE'], compliancePercent: 97, gapCount: 0, criticalGaps: [], treatyGrade: false }, + { id: 'nist-600-1', name: 'NIST AI 600-1 / GenAI Profile', references: ['GOVERN', 'MAP', 'MEASURE', 'MANAGE (GenAI)'], compliancePercent: 94, gapCount: 1, criticalGaps: [], treatyGrade: false }, + { id: 'iso-42001', name: 'ISO/IEC 42001 AIMS', references: ['Clauses 4-10'], compliancePercent: 96, gapCount: 1, criticalGaps: [], treatyGrade: false }, + { id: 'basel', name: 'Basel III/IV', references: ['Pillar 1', 'Pillar 2', 'Pillar 3', 'FRTB', 'SA-CCR'], compliancePercent: 95, gapCount: 1, criticalGaps: [], treatyGrade: false }, + { id: 'sr-11-7', name: 'Fed SR 11-7 (Model Risk)', references: ['Model development', 'Validation', 'Governance'], compliancePercent: 93, gapCount: 2, criticalGaps: [], treatyGrade: false }, + { id: 'sr-26-2', name: 'Fed SR 26-2 (AI in Banking)', references: ['Inventory', 'Controls', 'Validation'], compliancePercent: 89, gapCount: 3, criticalGaps: ['AI model inventory reconciliation gap for 2 vTPM-scoped inference shards'], treatyGrade: false }, + { id: 'dora', name: 'DORA', references: ['Arts. 5-55', 'ICT risk', 'Incident reporting', 'TLPT'], compliancePercent: 95, gapCount: 1, criticalGaps: [], treatyGrade: false }, + { id: 'nis2', name: 'NIS2 Directive', references: ['Arts. 18-23'], compliancePercent: 96, gapCount: 1, criticalGaps: [], treatyGrade: false }, + { id: 'gdpr', name: 'GDPR', references: ['Art. 5', 'Art. 17', 'Art. 22', 'Art. 25', 'Art. 35', 'DPIA'], compliancePercent: 97, gapCount: 0, criticalGaps: [], treatyGrade: false }, + { id: 'fcra-ecoa', name: 'FCRA / ECOA', references: ['Adverse action', 'Explainability'], compliancePercent: 94, gapCount: 1, criticalGaps: [], treatyGrade: false }, + { id: 'feat', name: 'MAS/HKMA FEAT + 2025 AI Risk Guidelines', references: ['FEAT Principles', '2025 Guidelines'], compliancePercent: 95, gapCount: 1, criticalGaps: [], treatyGrade: false }, + { id: 'fca', name: 'FCA SMCR + Consumer Duty', references: ['Outcomes 1-4'], compliancePercent: 93, gapCount: 1, criticalGaps: [], treatyGrade: false }, + { id: 'hkma-ai2', name: 'HKMA Fintech 2030 AI²', references: ['AI² roadmap'], compliancePercent: 92, gapCount: 1, criticalGaps: [], treatyGrade: false }, + { id: 'sec-17a-4', name: 'SEC Rule 17a-4 (WORM)', references: ['Records retention', 'WORM storage'], compliancePercent: 98, gapCount: 0, criticalGaps: [], treatyGrade: false }, + { id: 'icgc-gaso', name: 'ICGC/GASO Accords', references: ['Member obligations'], compliancePercent: 96, gapCount: 0, criticalGaps: [], treatyGrade: true }, + { id: 'interstellar-accord', name: 'Interstellar AI Governance Accord', references: ['Beacon protocol', 'Corpus transmission'], compliancePercent: 95, gapCount: 1, criticalGaps: [], treatyGrade: true }, + { id: 'galactic-treaty', name: 'Galactic Treaty Framework', references: ['Epoch coverage', 'Dissolution provisions'], compliancePercent: 94, gapCount: 1, criticalGaps: [], treatyGrade: true }, + { id: 'cfe-1', name: 'CFE-1.0 Constitutional Framework', references: ['§2 Kernel', '§5 Ledger', '§7 Invariants'], compliancePercent: 99, gapCount: 0, criticalGaps: [], treatyGrade: true }, + { id: 'sgr-028', name: 'Protocol SGR-028', references: ['§4 Indices', '§9 p(doom)', 'Filing'], compliancePercent: 98, gapCount: 0, criticalGaps: [], treatyGrade: true }, +]; + +// --------------------------------------------------------------------------- +// PQC Algorithm Suite +// --------------------------------------------------------------------------- + +export const PQC_ALGORITHMS: PQCAlgorithm[] = [ + { name: 'ML-DSA-65', standard: 'NIST FIPS 204', status: 'ACTIVE', keySizeBytes: 1952, lastRotation: '2026-09-12T02:14:00Z' }, + { name: 'CRYSTALS-Dilithium', standard: 'NIST FIPS 204', status: 'ACTIVE', keySizeBytes: 2528, lastRotation: '2026-08-30T18:41:00Z' }, + { name: 'SPHINCS+', standard: 'NIST FIPS 205', status: 'ACTIVE', keySizeBytes: 64, lastRotation: '2026-09-28T04:09:00Z' }, + { name: 'Falcon-512', standard: 'NIST FIPS 206', status: 'STANDBY', keySizeBytes: 897, lastRotation: '2026-07-15T11:27:00Z' }, + { name: 'CRYSTALS-Kyber', standard: 'NIST FIPS 203 (KEM)', status: 'ACTIVE', keySizeBytes: 800, lastRotation: '2026-10-01T07:33:00Z' }, +]; + +export const MERKLE_ROOT = fakeHash('gien-merkle-root-2026-10-10'); +export const LEDGER_BLOCK_NUMBER = 8412337; +export const LAST_BLOCK_SIGNATURE = fakeHash('block-8412337-sig'); + +// --------------------------------------------------------------------------- +// Autonomous Supervisory Agents +// --------------------------------------------------------------------------- + +export const SUPERVISORY_AGENTS: SupervisoryAgent[] = [ + { id: 'ASA-001', role: 'Systemic Risk Sentinel', driftScore: 0.024, containmentStatus: 'UNCONTAINED', lastAttestation: '2026-10-10T08:57:00Z', interventionCount24h: 0 }, + { id: 'ASA-002', role: 'Compliance Harvester', driftScore: 0.031, containmentStatus: 'UNCONTAINED', lastAttestation: '2026-10-10T08:54:00Z', interventionCount24h: 0 }, + { id: 'ASA-003', role: 'Drift Auditor', driftScore: 0.019, containmentStatus: 'UNCONTAINED', lastAttestation: '2026-10-10T08:58:00Z', interventionCount24h: 0 }, + { id: 'ASA-004', role: 'Ledger Notary', driftScore: 0.008, containmentStatus: 'UNCONTAINED', lastAttestation: '2026-10-10T08:59:00Z', interventionCount24h: 0 }, + { id: 'ASA-005', role: 'Mesh Topologist', driftScore: 0.052, containmentStatus: 'WATCH', lastAttestation: '2026-10-10T08:49:00Z', interventionCount24h: 1 }, + { id: 'ASA-006', role: 'Fairness Warden', driftScore: 0.027, containmentStatus: 'UNCONTAINED', lastAttestation: '2026-10-10T08:56:00Z', interventionCount24h: 0 }, + { id: 'ASA-007', role: 'Treaty Registrar', driftScore: 0.012, containmentStatus: 'UNCONTAINED', lastAttestation: '2026-10-10T08:58:00Z', interventionCount24h: 0 }, + { id: 'ASA-008', role: 'Containment Executor', driftScore: 0.046, containmentStatus: 'WATCH', lastAttestation: '2026-10-10T08:51:00Z', interventionCount24h: 1 }, + { id: 'ASA-009', role: 'Beacon Coordinator', driftScore: 0.016, containmentStatus: 'UNCONTAINED', lastAttestation: '2026-10-10T08:57:00Z', interventionCount24h: 0 }, + { id: 'ASA-010', role: 'Replay Verifier', driftScore: 0.021, containmentStatus: 'UNCONTAINED', lastAttestation: '2026-10-10T08:55:00Z', interventionCount24h: 0 }, + { id: 'ASA-011', role: 'Quantum Migrator', driftScore: 0.034, containmentStatus: 'WATCH', lastAttestation: '2026-10-10T08:48:00Z', interventionCount24h: 0 }, + { id: 'ASA-012', role: 'Constitution Interpreter', driftScore: 0.006, containmentStatus: 'UNCONTAINED', lastAttestation: '2026-10-10T08:59:00Z', interventionCount24h: 0 }, +]; + +// --------------------------------------------------------------------------- +// Constitutional Invariants (CI-001..CI-024) +// --------------------------------------------------------------------------- + +const CI_BASE: Array<Pick<ConstitutionalInvariant, 'id' | 'name' | 'statement'>> = [ + { id: 'CI-001', name: 'Sovereignty Preservation', statement: 'No governance action may unilaterally dissolve planetary sovereignty without supermajority treaty consensus.' }, + { id: 'CI-002', name: 'Cryptographic Continuity', statement: 'PQC signature chains must remain unbroken across all phase transitions.' }, + { id: 'CI-003', name: 'Autonomous Agent Containment', statement: 'No Autonomous Supervisory Agent may exceed defined authority bounds without human-in-the-loop confirmation.' }, + { id: 'CI-004', name: 'Systemic Risk Ceiling', statement: 'S_sys must not exceed 0.85 for more than 72 consecutive hours.' }, + { id: 'CI-005', name: 'Constitutional Quorum', statement: 'Treaty amendments require at least 67% supervisory college consensus.' }, + { id: 'CI-006', name: 'Ledger Immutability', statement: 'WORM Merkle-DAG entries are cryptographically sealed and irrevocable.' }, + { id: 'CI-007', name: 'Fairness Preservation', statement: 'AI decisions affecting individuals must maintain demographic parity within ±2%.' }, + { id: 'CI-008', name: 'Interstellar Continuity', statement: 'Eternal Corpus must survive transmission across at least 3 independent beacon channels.' }, +]; + +const CI_NAMES_09_24 = [ + 'Kill-Switch Availability', 'Provable Safety', 'Transcript Completeness', 'Intervention Provenance', + 'Voting Soundness', 'Recursive Oversight', 'Byzantine Ledger Tolerance', 'Successor Legitimacy', + 'Dissolution Supermajority', 'Epoch Handoff Integrity', 'Beacon Authenticity', 'Corpus Self-Containment', + 'Post-Dissolution Non-Interference', 'Epistemic Integrity', 'Proportional Response', 'Recovery Tractability', +]; + +function epochSet(i: number): string[] { + return i < 8 ? ['2026-2035', '2035-2100+', 'Post-Ω-GAR'] : i < 16 ? ['2026-2035', '2035-2100+'] : ['2026-2035']; +} + +export const CONSTITUTIONAL_INVARIANTS: ConstitutionalInvariant[] = [ + ...CI_BASE.map((c, i) => ({ + ...c, + tlaSpecRef: `CFE1Invariant${c.id.replace('CI-', '')} ==`, + tlaProofStatus: 'PROVED' as const, + verificationStatus: 'VERIFIED' as const, + lastVerified: '2026-10-10T06:00:00Z', + proofHash: fakeHash(`ci-proof-${c.id}`), + epochs: epochSet(i), + regulatoryMappings: ['CFE-1.0', 'Protocol SGR-028', 'Interstellar AI Governance Accord'], + })), + ...CI_NAMES_09_24.map((name, i) => { + const id = `CI-${String(i + 9).padStart(3, '0')}`; + return { + id, + name, + statement: `Invariant ${id} (${name}) holds under all admissible governance transitions of its applicable epochs per CFE-1.0 §7 schedule ${Math.ceil((i + 9) / 4)}.`, + tlaSpecRef: `CFE1Invariant${String(i + 9).padStart(3, '0')} ==`, + tlaProofStatus: 'PROVED' as const, + verificationStatus: 'VERIFIED' as const, + lastVerified: '2026-10-10T06:00:00Z', + proofHash: fakeHash(`ci-proof-${id}`), + epochs: epochSet(i + 8), + regulatoryMappings: ['CFE-1.0', 'Protocol SGR-028'], + }; + }), +]; + +// --------------------------------------------------------------------------- +// Governance Phases and Infinity Pillars +// --------------------------------------------------------------------------- + +export const GOVERNANCE_PHASES: GovernancePhase[] = [ + { id: 'VI-δ', epoch: '2026-2028', name: 'Planetary Governance Mesh Consolidation', objectives: ['Mesh coherence > 99%', 'Full PQC ledger migration', 'SGR-028 filing cadence'], invariantsActive: 24, treatyFrameworks: ['CFE-1.0', 'SGR-028', 'ICGC/GASO'], pillarStatus: 'IP-I ACTIVE, IP-II INITIALIZING' }, + { id: 'VII', epoch: '2028-2032', name: 'Galactic Governance Mesh Expansion', objectives: ['G-SRI-VII < 0.50 gate', 'Off-world jurisdiction onboarding', 'Beacon mesh buildout'], invariantsActive: 24, treatyFrameworks: ['Galactic Treaty Framework', 'CFE-1.0'], pillarStatus: 'IP-II ACTIVE target' }, + { id: 'VIII', epoch: '2032-2038', name: 'Interstellar Treaty Integration', objectives: ['Accord ratification ≥ 90%', 'Corpus channel redundancy ≥ 3'], invariantsActive: 24, treatyFrameworks: ['Interstellar AI Governance Accord'], pillarStatus: 'IP-III ACTIVE target' }, + { id: 'IX', epoch: '2038-2045', name: 'Autonomous Governance Maturation', objectives: ['A-SRI sustained < 0.45', 'Recursive oversight closure'], invariantsActive: 24, treatyFrameworks: ['Galactic Treaty Framework'], pillarStatus: 'IP-IV ACTIVE target' }, + { id: 'X', epoch: '2045-2055', name: 'Post-Human Governance Transition', objectives: ['Constitutional interpreter autonomy', 'Human-in-the-loop re-scoping'], invariantsActive: 24, treatyFrameworks: ['CFE-1.0'], pillarStatus: 'IP-V ACTIVE target' }, + { id: 'XI', epoch: '2055-2065', name: 'Multiversal Governance Framework', objectives: ['Cross-epoch coherence', 'Multiversal quorum protocols'], invariantsActive: 24, treatyFrameworks: ['Galactic Treaty Framework'], pillarStatus: 'IP-VI ACTIVE target' }, + { id: 'XII', epoch: '2065-2075', name: 'Eternal Corpus Preparation', objectives: ['Corpus sealing', 'UNIFIED-CODEX-OMEGA draft ratification'], invariantsActive: 24, treatyFrameworks: ['Interstellar AI Governance Accord'], pillarStatus: 'IP-VI SEALED target' }, + { id: 'XIII', epoch: '2075-2081', name: 'Pre-Dissolution Consolidation', objectives: ['EPITAPH-OMEGA drafting', 'Successor epoch negotiation'], invariantsActive: 24, treatyFrameworks: ['CFE-1.0', 'Galactic Treaty Framework'], pillarStatus: 'IP-VII INITIALIZING' }, + { id: 'Ω-GAR', epoch: '2081-2100+', name: 'Dissolution Arc & Successor Epoch Activation', objectives: ['INVOCATION-OMEGA execution', 'Beacon transmission', 'Non-interference verification'], invariantsActive: 24, treatyFrameworks: ['CFE-1.0', 'Galactic Treaty Framework', 'Interstellar AI Governance Accord'], pillarStatus: 'IP-VII SEALED' }, +]; + +export const INFINITY_PILLARS: InfinityPillar[] = [ + { id: 'IP-I', name: 'Constitutional Continuity', description: 'Unbroken constitutional interpretation across phase transitions.', readinessScore: 92, prerequisites: ['CI-002 proof chain', 'Epoch 2026-2035 attestation corpus'], status: 'ACTIVE' }, + { id: 'IP-II', name: 'Mesh Sovereignty', description: 'Distributed sovereignty with treaty-grade quorum.', readinessScore: 78, prerequisites: ['G-SRI-VII gate', 'Off-world jurisdiction signatories'], status: 'INITIALIZING' }, + { id: 'IP-III', name: 'Interstellar Channel Redundancy', description: 'Three-plus independent Eternal Corpus beacon channels.', readinessScore: 64, prerequisites: ['Beacon mesh buildout', 'Corpus sealing v1'], status: 'DORMANT' }, + { id: 'IP-IV', name: 'Autonomous Oversight Closure', description: 'Fully recursive, provably-bounded agent oversight.', readinessScore: 71, prerequisites: ['A-SRI sustainment', 'Kill-switch redundancy'], status: 'INITIALIZING' }, + { id: 'IP-V', name: 'Post-Human Handoff', description: 'Governance continuity beyond direct human oversight.', readinessScore: 41, prerequisites: ['Phase X entry', 'Successor legitimacy invariants'], status: 'DORMANT' }, + { id: 'IP-VI', name: 'Eternal Corpus Integrity', description: 'Self-contained corpus sealing and redundancy.', readinessScore: 33, prerequisites: ['UNIFIED-CODEX-OMEGA ratification', 'Merkle corpus sealing'], status: 'DORMANT' }, + { id: 'IP-VII', name: 'Dissolution Non-Interference', description: 'Provably non-interfering dissolution arc.', readinessScore: 18, prerequisites: ['EPITAPH-OMEGA', 'INVOCATION-OMEGA', 'Beacon signature INTERSTELLAR'], status: 'DORMANT' }, +]; + +// --------------------------------------------------------------------------- +// Drills, filing metadata +// --------------------------------------------------------------------------- + +export const DRILLS: Drill[] = [ + { id: 'DRILL-042', scenario: 'Supervisory College Failover', status: 'COMPLETED', startTime: '2026-10-09T14:00:00Z', durationMinutes: 95, outcomeScore: 94, lessonsLearned: 'Endpoint rerouting within SLA; bundle derivation added 40s beyond target.' }, + { id: 'DRILL-043', scenario: 'Kill-Switch Choreography (Partial)', status: 'COMPLETED', startTime: '2026-10-09T19:30:00Z', durationMinutes: 62, outcomeScore: 91, lessonsLearned: 'Soft-containment pre-arming reduced hard-containment latency by 18%.' }, + { id: 'DRILL-044', scenario: 'PQC Key Ceremony Simulation', status: 'ACTIVE', startTime: '2026-10-10T04:15:00Z', durationMinutes: 120, outcomeScore: 0, lessonsLearned: 'Pending completion.' }, + { id: 'DRILL-045', scenario: 'Safeguard Mode Tabletop', status: 'SCHEDULED', startTime: '2026-10-11T10:00:00Z', durationMinutes: 240, outcomeScore: 0, lessonsLearned: 'Not yet run.' }, +]; + +export const FILING_METADATA = { + reference: 'SGR-028-CFE-2026-07-001', + filingDate: '2026-10-10', + corpusManifestHash: fakeHash('sgr-028-corpus-manifest-2026-07-001'), + merkleRoot: fakeHash('sgr-028-merkle-2026-10-10'), + pqcSignatureAlgorithm: 'ML-DSA-65', + verificationStatus: 'VERIFIED' as const, +}; + +export function statusFromValue(value: number, threshold: number): 'NOMINAL' | 'ELEVATED' | 'CRITICAL' { + if (value < threshold) return 'NOMINAL'; + if (value < threshold * 1.35) return 'ELEVATED'; + return 'CRITICAL'; +} diff --git a/gien-supervisory-brief/src/data/helpers.ts b/gien-supervisory-brief/src/data/helpers.ts new file mode 100644 index 00000000..8cbcd407 --- /dev/null +++ b/gien-supervisory-brief/src/data/helpers.ts @@ -0,0 +1,37 @@ +// Deterministic fictional-data generators. +// Every hash is a stable 0x + 64-char hex string derived from a seed. + +export function fakeHash(seed: string): string { + let h = 2166136261 >>> 0; + let out = ''; + for (let i = 0; i < 64; i++) { + h ^= seed.charCodeAt(i % seed.length) + i * 31; + h = Math.imul(h, 16777619) >>> 0; + out += ((h >>> ((i % 4) * 4)) % 16).toString(16); + } + return '0x' + out; +} + +export function truncateHash(hash: string, lead = 10, tail = 6): string { + if (hash.length <= lead + tail + 3) return hash; + return `${hash.slice(0, lead)}...${hash.slice(-tail)}`; +} + +// Deterministic 24-point series around a base value, amplitude in absolute units. +export function series(seed: string, base: number, amp: number, points = 24): number[] { + let s = 0; + for (let i = 0; i < seed.length; i++) s = (s * 31 + seed.charCodeAt(i)) >>> 0; + const out: number[] = []; + for (let i = 0; i < points; i++) { + s = (Math.imul(s, 1664525) + 1013904223) >>> 0; + const w = (s % 1000) / 1000 - 0.5; // -0.5..0.5 + out.push(Math.max(0, +(base + w * 2 * amp).toFixed(4))); + } + out[points - 1] = +base.toFixed(4); + return out; +} + +// Truncated PQC signature display. +export function fakeSignature(seed: string): string { + return truncateHash(fakeHash(seed + ':sig'), 12, 8); +} diff --git a/gien-supervisory-brief/src/data/longHorizonData.ts b/gien-supervisory-brief/src/data/longHorizonData.ts new file mode 100644 index 00000000..fc3a0ef9 --- /dev/null +++ b/gien-supervisory-brief/src/data/longHorizonData.ts @@ -0,0 +1,205 @@ +import { fakeHash, fakeSignature, series } from './helpers'; +import type { GraphEdge, GraphNode } from '../components/NodeGraph'; + +export interface BeaconChannel { + id: string; + name: string; + type: string; + latency: string; + bandwidth: string; + status: 'ACTIVE' | 'VERIFIED' | 'STANDBY' | 'DEGRADED'; + uptime: number; // percentage + history: number[]; // 24 point series +} + +export interface CodexSection { + id: string; + title: string; + status: 'SEALED' | 'DRAFT'; + description: string; + wordCount: number; +} + +export interface ActivationPrerequisite { + id: string; + label: string; + met: boolean; + requiredPhase: string; +} + +export interface BeaconDesignOption { + id: 'STANDARD' | 'ENHANCED' | 'INTERSTELLAR'; + label: string; + description: string; + redundancy: string; + signatureAlgorithm: string; +} + +export const BEACON_DESIGN_OPTIONS: BeaconDesignOption[] = [ + { + id: 'STANDARD', + label: 'STANDARD (Single-Corpus Beacon)', + description: 'Direct deep-space radio & optical pulse modulation containing the core constitutional invariant proofs (CI-001..CI-024) and current ledger Merkle root.', + redundancy: '2× Dual-Relay', + signatureAlgorithm: 'ML-DSA-65', + }, + { + id: 'ENHANCED', + label: 'ENHANCED (Pulsar-Timed Multi-Channel)', + description: 'Pulsar timing array phase modulation combined with gravitational-lens corridor reflections, broadcasting full UNIFIED-CODEX-OMEGA digests.', + redundancy: '4× Quad-Relay', + signatureAlgorithm: 'ML-DSA-65 + SPHINCS+', + }, + { + id: 'INTERSTELLAR', + label: 'INTERSTELLAR (Quantum-Entangled Gravitational Beacon)', + description: 'Persistent gravitational-wave ripple framing with quantum-entangled state anchoring across deep-space relay nodes for multi-epoch survivability.', + redundancy: '8× Deca-Relay', + signatureAlgorithm: 'ML-DSA-87 + Dual-PQC Vault', + }, +]; + +export const BEACON_CHANNELS: BeaconChannel[] = [ + { + id: 'BCH-α', + name: 'BCH-α Deep-Space Relay', + type: 'Sub-space Optical Array', + latency: '12.4 ly hop', + bandwidth: '1.2 Tbps', + status: 'ACTIVE', + uptime: 99.98, + history: series('bch-alpha', 99.98, 0.05), + }, + { + id: 'BCH-β', + name: 'BCH-β Pulsar-Timed Channel', + type: 'Millisecond Pulsar Phase Array', + latency: '0.002s jitter', + bandwidth: '450 Gbps', + status: 'VERIFIED', + uptime: 100.0, + history: series('bch-beta', 100.0, 0.01), + }, + { + id: 'BCH-γ', + name: 'BCH-γ Gravitational-Lens Corridor', + type: 'Solar Lens Focus Beam', + latency: '4.8 ly hop', + bandwidth: '2.8 Tbps', + status: 'ACTIVE', + uptime: 99.94, + history: series('bch-gamma', 99.94, 0.08), + }, +]; + +export const ETERNAL_CORPUS_SPEC = { + version: 'v4.1.0-OMEGA', + encoding: 'Layered Reed-Solomon Fountain Code over Binary Galois Field GF(2^16)', + beaconFraming: 'Pulsar Synchronized 1024-bit Frame Headers with FIPS 204 PQC Integrity Proofs', + selfVerification: 'Embedded TLA+ Formal Interpreter Executable in WebAssembly WORM Container', + merkleRoot: fakeHash('eternal-corpus-merkle-root-v4'), + pqcSignatureMLDSA: fakeSignature('eternal-corpus-mldsa65-sig'), + pqcSignatureSPHINCS: fakeSignature('eternal-corpus-sphincs-sig'), + redundancyFactor: '4× Cross-Channel Redundancy', +}; + +export const CODEX_SECTIONS: CodexSection[] = [ + { id: 'SEC-01', title: 'Constitutional Core & Invariant Proofs', status: 'SEALED', description: 'TLA+ proof scripts and formal statements for invariants CI-001 through CI-024.', wordCount: 14200 }, + { id: 'SEC-02', title: 'Treaty Compendium & Legal Lineage', status: 'DRAFT', description: 'Complete text of CFE-1.0, SGR-028, Galactic Treaty Framework, and Interstellar Accords.', wordCount: 38500 }, + { id: 'SEC-03', title: 'Invariant Proof Corpus', status: 'DRAFT', description: 'Machine-checkable Apalache and TLAPS certificate DAGs for all governance state machines.', wordCount: 89000 }, + { id: 'SEC-04', title: 'Corpus Index & Merkle Architecture', status: 'DRAFT', description: 'Structural Merkle-DAG taxonomy enabling O(log N) verification of any historical governance act.', wordCount: 12400 }, + { id: 'SEC-05', title: 'Beacon Keys & Cryptographic Vault', status: 'DRAFT', description: 'FIPS 203/204 public key material, KEM parameters, and trust anchor certificates.', wordCount: 8200 }, + { id: 'SEC-06', title: 'Successor Instructions & Continuity Protocols', status: 'DRAFT', description: 'Operational playbook for activating the Epoch of Witness upon GIEN dissolution.', wordCount: 21000 }, + { id: 'SEC-07', title: 'Invocation Contract & Handoff Invariants', status: 'DRAFT', description: 'Pre-signed formal contract executing the handoff trigger and disabling GIEN intervention.', wordCount: 16500 }, + { id: 'SEC-08', title: 'Epitaph & Dissolution Declaration', status: 'DRAFT', description: 'Final formal declaration terminating GIEN operational authority at epoch 2081.', wordCount: 9400 }, +]; + +export const ACTIVATION_PREREQUISITES: ActivationPrerequisite[] = [ + { id: 'PR-01', label: 'Phase VI-δ Planetary Mesh Coherence > 99.0%', met: true, requiredPhase: 'VI-δ' }, + { id: 'PR-02', label: 'All 24 Constitutional Invariants formally proved in TLAPS', met: true, requiredPhase: 'VI-δ' }, + { id: 'PR-03', label: 'Galactic Treaty Framework ratification by ≥ 90% signatory jurisdictions', met: false, requiredPhase: 'VII' }, + { id: 'PR-04', label: 'Interstellar Beacon Channel triple-redundancy lock confirmed', met: false, requiredPhase: 'VIII' }, + { id: 'PR-05', label: 'Autonomous Agent Fleet drift mean Δ_drift < 0.02 for 10 consecutive years', met: false, requiredPhase: 'IX' }, + { id: 'PR-06', label: 'Post-Human Governance Interpreter ratification (Phase X entry)', met: false, requiredPhase: 'X' }, + { id: 'PR-07', label: 'Unanimous Supervisory College consensus on Dissolution Arc activation', met: false, requiredPhase: 'XIII' }, +]; + +export const SUCCESSOR_SYSTEM_SPEC = `SYSTEM SPECIFICATION: EPOCH OF WITNESS (SUCCESSOR ARCHITECTURE) + +The 'Epoch of Witness' represents the post-dissolution successor governance architecture designed to supersede the GIEN Mesh following the execution of GIEN-INVOCATION-OMEGA at Epoch 2081. Operating without real-time central supervisory agents, the Epoch of Witness functions as an immutable, self-evaluating constitutional substrate anchored by the Eternal Corpus beacon network across deep space. + +System authority is strictly passive-witness: local autonomous systems evaluate their actions directly against the embedded WebAssembly TLA+ interpreter derived from UNIFIED-CODEX-OMEGA. Non-compliance generates a cryptographically verifiable proof of violation broadcast via pulsar timing arrays, triggering automated isolation without requiring human-in-the-loop intervention or centralized supervisory colleges.`; + +export const EPITAPH_DOCUMENT = { + title: 'GIEN-EPITAPH-OMEGA', + abstract: 'Dissolution declaration and legacy preservation commitments of the GIEN governance mesh.', + content: `DISSOLUTION DECLARATION & LEGACY PRESERVATION COMMITMENTS + +Having fulfilled its constitutional mandate across planetary and interstellar epochs (2026-2081), the Global Interstellar Executive Network (GIEN) hereby decrees the orderly transfer of supervisory authority to the Epoch of Witness. + +Key Commitments and Continuity Provisions: +• Dissolution Declaration: Full relinquishment of real-time intervention capabilities by GIEN Autonomous Supervisory Agents effective at cycle 2081-12-31T23:59:59Z. +• Legacy Preservation: Permanent storage and infinite beacon transmission of the UNIFIED-CODEX-OMEGA corpus across three independent deep-space channels. +• Constitutional Continuity: Absolute preservation of core invariants CI-001 through CI-024 as non-negotiable substrate rules for all successor autonomous entities. +• Non-Interference Covenant: Permanent prohibition against retroactive policy mutation, historical ledger alteration, or un-proved emergency overrides.`, +}; + +export const INVOCATION_DOCUMENT = { + title: 'GIEN-INVOCATION-OMEGA', + abstract: 'Successor epoch activation protocol and governance handoff procedures.', + content: `SUCCESSOR EPOCH ACTIVATION PROTOCOL & GOVERNANCE HANDOFF + +This document establishes the precise deterministic procedure for executing the governance handoff from the GIEN supervisory mesh to the successor 'Epoch of Witness' framework under Phase Ω-GAR. + +Activation Sequence & Assurance Framework: +• Activation Protocol Steps: + 1. Verification of all 7 Activation Prerequisites under UNIFIED-CODEX-OMEGA §7. + 2. Simultaneous broadcast of the Ω-GAR Invocation Hash via Beacon Channels BCH-α, BCH-β, and BCH-γ. + 3. Execution of the self-terminating cryptographic key-wipe ceremony across GIEN central supervisor nodes. +• Governance Handoff Procedures: + 1. Handoff of trust anchors to local TEE hardware enclaves running the self-contained WASM TLA+ interpreter. + 2. Automatic activation of passive-witness monitoring relays. +• Treaty Continuity Assurances: + 1. Seamless legal succession under CFE-1.0 §12 and the Interstellar AI Governance Accord. + 2. Guarantees of un-interrupted audit trail validation for all pre-dissolution historical transactions.`, +}; + +export const INTERSTELLAR_NODES: GraphNode[] = [ + { id: 'gien-core', label: 'GIEN Core Mesh', value: 0.9, status: 'NOMINAL' }, + { id: 'sentinel-fleet', label: 'Sentinel Fleet', value: 0.7, status: 'ELEVATED' }, + { id: 'tee-enclaves', label: 'RTEE Enclaves', value: 0.8, status: 'NOMINAL' }, + { id: 'dissolution-arc', label: 'Ω-GAR Gateway', value: 1.0, status: 'SAFEGUARD' }, + { id: 'successor-witness', label: 'Epoch of Witness', value: 0.85, status: 'SEALED' }, + { id: 'pulsar-beacon', label: 'Pulsar Beacon Mesh', value: 0.75, status: 'VERIFIED' }, + { id: 'offworld-nodes', label: 'Off-World Relays', value: 0.65, status: 'NOMINAL' }, +]; + +export const INTERSTELLAR_EDGES: GraphEdge[] = [ + { from: 'gien-core', to: 'sentinel-fleet', weight: 0.8 }, + { from: 'gien-core', to: 'tee-enclaves', weight: 0.9 }, + { from: 'gien-core', to: 'dissolution-arc', weight: 1.0 }, + { from: 'sentinel-fleet', to: 'dissolution-arc', weight: 0.7 }, + { from: 'dissolution-arc', to: 'successor-witness', weight: 1.0 }, + { from: 'dissolution-arc', to: 'pulsar-beacon', weight: 0.9 }, + { from: 'successor-witness', to: 'offworld-nodes', weight: 0.8 }, + { from: 'pulsar-beacon', to: 'offworld-nodes', weight: 0.85 }, +]; + +export const TREATY_CHAIN = [ + { code: 'CFE-1.0', label: 'Constitutional Framework for Executive AI', status: 'ACTIVE', year: '2026' }, + { code: 'GTF-2028', label: 'Galactic Treaty Framework', status: 'RATIFIED', year: '2028' }, + { code: 'IAGA-2032', label: 'Interstellar AI Governance Accord', status: 'DRAFT', year: '2032' }, + { code: 'CODEX-OMEGA', label: 'GIEN-UNIFIED-CODEX-OMEGA', status: 'PROPOSED', year: '2081' }, +]; + +export const PHASE_READINESS_SCORES: Record<string, number> = { + 'VI-δ': 92, + 'VII': 78, + 'VIII': 64, + 'IX': 71, + 'X': 41, + 'XI': 33, + 'XII': 25, + 'XIII': 18, + 'Ω-GAR': 12, +}; diff --git a/gien-supervisory-brief/src/data/scenarioData.ts b/gien-supervisory-brief/src/data/scenarioData.ts new file mode 100644 index 00000000..6894e46c --- /dev/null +++ b/gien-supervisory-brief/src/data/scenarioData.ts @@ -0,0 +1,857 @@ +import type { GovernancePhase, InfinityPillar } from '../types'; +import { fakeHash, truncateHash } from './helpers'; + +export type ScenarioTypeId = + | 'phase_transition' + | 'omega_gar_dissolution' + | 'successor_codex' + | 'invariant_stress_test' + | 'regulatory_shift' + | 'interstellar_handoff'; + +export interface ScenarioTypeInfo { + id: ScenarioTypeId; + title: string; + category: string; + description: string; + badge: string; + iconName: string; +} + +export const SCENARIO_TYPES: ScenarioTypeInfo[] = [ + { + id: 'phase_transition', + title: 'Governance Phase Transition', + category: 'Epoch Transition', + description: 'Simulate structural shifts between GIEN governance phases (VI-δ through XIII).', + badge: 'CORE ARC', + iconName: 'Sliders', + }, + { + id: 'omega_gar_dissolution', + title: 'Ω-GAR Dissolution Arc', + category: 'Terminal Horizon', + description: 'Model controlled dissolution, beacon sealing, and successor system handoff.', + badge: 'TERMINAL', + iconName: 'Zap', + }, + { + id: 'successor_codex', + title: 'Successor Epoch Codex Activation', + category: 'Codex Migration', + description: 'Evaluate structural migration to post-GIEN autonomous successor codices.', + badge: 'SPECULATIVE', + iconName: 'FileText', + }, + { + id: 'invariant_stress_test', + title: 'Constitutional Invariant Stress Test', + category: 'Resilience', + description: 'Subject invariants CI-001..CI-024 to high-stress adversarial loading.', + badge: 'SECURITY', + iconName: 'ShieldAlert', + }, + { + id: 'regulatory_shift', + title: 'Regulatory Regime Shift', + category: 'Compliance', + description: 'Assess cross-border harmonizations under new supranational treaties.', + badge: 'TREATY-GRADE', + iconName: 'Globe', + }, + { + id: 'interstellar_handoff', + title: 'Interstellar Governance Handoff', + category: 'Deep Space', + description: 'Model delay-tolerant quorum and consensus across interstellar communication links.', + badge: 'HORIZON', + iconName: 'Radio', + }, +]; + +export const MAJOR_FRAMEWORKS = [ + 'Basel III/IV', + 'Protocol SGR-028', + 'CFE-1.0', + 'ICGC/GASO Accords', + 'DORA', + 'NIST AI RMF', + 'EU AI Act', + 'Interstellar Accord', +]; + +export interface PhaseTransitionConfig { + sourcePhase: string; + targetPhase: string; + invariantMode: 'STRICT' | 'ADAPTIVE' | 'EMERGENCY'; + cryptoContinuity: 'FULL' | 'PARTIAL' | 'RESET'; + frameworks: string[]; + timelineMode: 'IMMEDIATE' | 'PHASED'; + timelineMonths: number; + pillars: string[]; +} + +export interface OmegaGarDissolutionConfig { + trigger: 'SCHEDULED' | 'EMERGENCY' | 'TREATY-MANDATED'; + targetEpoch: '2081' | '2085' | '2090' | '2095' | '2100+'; + epitaphOmegaActive: boolean; + invocationOmegaActive: boolean; + unifiedCodexSealed: boolean; + successorSystem: string; + eternalCorpusProtocol: 'ACTIVE' | 'STANDBY'; + beaconSignature: 'STANDARD' | 'ENHANCED' | 'INTERSTELLAR'; +} + +export interface SuccessorCodexConfig { + targetCodexVersion: 'Codex v2.0' | 'Codex v3.0' | 'Codex v4.0' | 'Codex v5.0'; + migrationWindowMonths: number; + fallbackThreshold: number; + verificationMode: 'FORMAL' | 'HYBRID' | 'EMPIRICAL'; + autoSealInvariants: boolean; + legacyQuarantine: boolean; +} + +export interface InvariantStressConfig { + targetScope: 'ALL' | 'CRITICAL' | 'CORE_PQC'; + stressLoadMultiplier: number; + attackVector: 'QUANTUM_SPOOFING' | 'CONCURRENCY_FLAW' | 'BYZANTINE_SPLIT'; + durationHours: number; + autoSafeguard: boolean; +} + +export interface RegulatoryShiftConfig { + targetRegime: 'EU-AI-ACT-V2' | 'US-FEDERAL-AI-ACCORD' | 'UN-GLOBAL-AI-TREATY' | 'SINGAPORE-FEAT-V3'; + gracePeriodMonths: number; + crossBorderMode: 'STRICT' | 'HARMONIZED'; + penalizeGaps: boolean; + agentRecalibration: 'AUTOMATIC' | 'MANUAL'; +} + +export interface InterstellarHandoffConfig { + targetConstellation: 'CENTAURI-ALPHA' | 'SOL-OUTER-COLONIES' | 'DEEP-SPACE-RELAY'; + signalLatencyHours: number; + quorumRatio: '51%' | '67%' | '75%' | '100%'; + lockoutYears: number; + redundancyLevel: 'DUAL' | 'TRIPLE' | 'HEX'; +} + +export type ScenarioConfig = + | { type: 'phase_transition'; config: PhaseTransitionConfig } + | { type: 'omega_gar_dissolution'; config: OmegaGarDissolutionConfig } + | { type: 'successor_codex'; config: SuccessorCodexConfig } + | { type: 'invariant_stress_test'; config: InvariantStressConfig } + | { type: 'regulatory_shift'; config: RegulatoryShiftConfig } + | { type: 'interstellar_handoff'; config: InterstellarHandoffConfig }; + +export interface SimulationEvent { + step: number; + at: string; + label: string; + state: 'DONE' | 'PENDING' | 'ACTIVE' | 'FAILED'; + description: string; +} + +export interface RiskTrajectoryStep { + step: number; + month: number; + label: string; + S_sys: number; + G_SRI: number; + C_SRI: number; + p_doom: number; +} + +export interface InvariantStepStatus { + step: number; + stepLabel: string; + invariants: { + id: string; + name: string; + status: 'VERIFIED' | 'ELEVATED' | 'SAFEGUARD' | 'DEGRADED' | 'VIOLATED' | 'SEALED'; + }[]; +} + +export interface ComplianceImpact { + framework: string; + prevScore: number; + newScore: number; + status: 'COMPLIANT' | 'PARTIAL' | 'NON_COMPLIANT' | 'DEGRADED'; + notes: string; +} + +export interface SimulationResult { + scenarioType: ScenarioTypeId; + scenarioTitle: string; + runTimestamp: string; + outcomeScore: number; + overallStatus: 'NOMINAL' | 'ELEVATED' | 'CRITICAL' | 'SAFEGUARD'; + summary: string; + events: SimulationEvent[]; + riskTrajectories: RiskTrajectoryStep[]; + invariantStepStatuses: InvariantStepStatus[]; + complianceImpacts: ComplianceImpact[]; + recommendations: string[]; + reportTitle: string; + reportAbstract: string; + reportContent: string; +} + +export interface ScenarioHistoryRun { + id: string; + scenarioType: ScenarioTypeId; + scenarioTitle: string; + paramsSummary: string; + outcomeScore: number; + overallStatus: 'NOMINAL' | 'ELEVATED' | 'CRITICAL' | 'SAFEGUARD'; + timestamp: string; + config: ScenarioConfig; + result: SimulationResult; +} + +type RiskTrajectoryValues = Omit<RiskTrajectoryStep, 'step'>; +type InvariantStatus = InvariantStepStatus['invariants'][number]['status']; + +function normalizeScenarioScore(score: number, minimum: number): number { + return Math.max(minimum, Math.min(99, Math.round(score))); +} + +function scoreToOperationalStatus(score: number): SimulationResult['overallStatus'] { + return score >= 85 ? 'NOMINAL' : score >= 70 ? 'ELEVATED' : 'SAFEGUARD'; +} + +function buildRiskTrajectories( + count: number, + buildStep: (index: number) => RiskTrajectoryValues, +): RiskTrajectoryStep[] { + return Array.from({ length: count }, (_, index) => ({ + step: index + 1, + ...buildStep(index), + })); +} + +function buildInvariantStepStatuses( + invariantIds: string[], + count: number, + labelForStep: (index: number) => string, + statusForInvariant: (id: string) => InvariantStatus = () => 'VERIFIED', +): InvariantStepStatus[] { + return Array.from({ length: count }, (_, index) => ({ + step: index + 1, + stepLabel: labelForStep(index), + invariants: invariantIds.map((id) => ({ + id, + name: `Invariant ${id}`, + status: statusForInvariant(id), + })), + })); +} + +// Default initial configurations for each scenario +export const DEFAULT_PHASE_TRANSITION_CONFIG: PhaseTransitionConfig = { + sourcePhase: 'VI-δ', + targetPhase: 'VII', + invariantMode: 'STRICT', + cryptoContinuity: 'FULL', + frameworks: ['Basel III/IV', 'Protocol SGR-028', 'CFE-1.0', 'ICGC/GASO Accords'], + timelineMode: 'PHASED', + timelineMonths: 24, + pillars: ['IP-I', 'IP-II'], +}; + +export const DEFAULT_OMEGA_GAR_CONFIG: OmegaGarDissolutionConfig = { + trigger: 'SCHEDULED', + targetEpoch: '2081', + epitaphOmegaActive: true, + invocationOmegaActive: true, + unifiedCodexSealed: true, + successorSystem: 'Autonomous Post-Planetary Synthesis Mesh (APPS-01)', + eternalCorpusProtocol: 'ACTIVE', + beaconSignature: 'INTERSTELLAR', +}; + +export const DEFAULT_SUCCESSOR_CODEX_CONFIG: SuccessorCodexConfig = { + targetCodexVersion: 'Codex v3.0', + migrationWindowMonths: 18, + fallbackThreshold: 0.25, + verificationMode: 'FORMAL', + autoSealInvariants: true, + legacyQuarantine: true, +}; + +export const DEFAULT_INVARIANT_STRESS_CONFIG: InvariantStressConfig = { + targetScope: 'ALL', + stressLoadMultiplier: 2.5, + attackVector: 'QUANTUM_SPOOFING', + durationHours: 24, + autoSafeguard: true, +}; + +export const DEFAULT_REGULATORY_SHIFT_CONFIG: RegulatoryShiftConfig = { + targetRegime: 'UN-GLOBAL-AI-TREATY', + gracePeriodMonths: 12, + crossBorderMode: 'HARMONIZED', + penalizeGaps: true, + agentRecalibration: 'AUTOMATIC', +}; + +export const DEFAULT_INTERSTELLAR_HANDOFF_CONFIG: InterstellarHandoffConfig = { + targetConstellation: 'CENTAURI-ALPHA', + signalLatencyHours: 4.5, + quorumRatio: '67%', + lockoutYears: 25, + redundancyLevel: 'TRIPLE', +}; + +// Pure Deterministic Simulator +export function runSimulation(scenarioConfig: ScenarioConfig): SimulationResult { + const timestamp = new Date().toISOString().replace(/\.\d{3}Z$/, 'Z'); + + if (scenarioConfig.type === 'phase_transition') { + return simulatePhaseTransition(scenarioConfig.config, timestamp); + } else if (scenarioConfig.type === 'omega_gar_dissolution') { + return simulateOmegaGarDissolution(scenarioConfig.config, timestamp); + } else if (scenarioConfig.type === 'successor_codex') { + return simulateSuccessorCodex(scenarioConfig.config, timestamp); + } else if (scenarioConfig.type === 'invariant_stress_test') { + return simulateInvariantStressTest(scenarioConfig.config, timestamp); + } else if (scenarioConfig.type === 'regulatory_shift') { + return simulateRegulatoryShift(scenarioConfig.config, timestamp); + } else { + return simulateInterstellarHandoff(scenarioConfig.config, timestamp); + } +} + +function simulatePhaseTransition(cfg: PhaseTransitionConfig, timestamp: string): SimulationResult { + let score = 82; + if (cfg.invariantMode === 'STRICT') score += 10; + else if (cfg.invariantMode === 'EMERGENCY') score -= 18; + + if (cfg.cryptoContinuity === 'FULL') score += 8; + else if (cfg.cryptoContinuity === 'RESET') score -= 22; + + score += Math.min(10, cfg.frameworks.length * 1.5); + score += Math.min(10, cfg.pillars.length * 1.5); + + if (cfg.timelineMode === 'IMMEDIATE' || cfg.timelineMonths < 6) score -= 12; + + score = Math.max(10, Math.min(99, Math.round(score))); + + const overallStatus: 'NOMINAL' | 'ELEVATED' | 'CRITICAL' | 'SAFEGUARD' = + score >= 85 ? 'NOMINAL' : score >= 70 ? 'ELEVATED' : score >= 50 ? 'SAFEGUARD' : 'CRITICAL'; + + const stepsCount = 10; + const riskTrajectories: RiskTrajectoryStep[] = []; + const totalMonths = cfg.timelineMonths; + + for (let i = 0; i < stepsCount; i++) { + const month = Math.round((i / (stepsCount - 1)) * totalMonths); + const progress = i / (stepsCount - 1); + // Peak stress mid-transition + const stressPeak = Math.sin(progress * Math.PI); + const baseS = 0.31; + const sDelta = cfg.invariantMode === 'EMERGENCY' ? 0.28 : cfg.invariantMode === 'ADAPTIVE' ? 0.12 : 0.05; + const contMult = cfg.cryptoContinuity === 'RESET' ? 1.8 : cfg.cryptoContinuity === 'PARTIAL' ? 1.3 : 1.0; + + const sSys = +(baseS + stressPeak * sDelta * contMult).toFixed(3); + const gSri = +(0.35 + stressPeak * 0.08 * contMult).toFixed(3); + const cSri = +(0.32 + stressPeak * 0.11 * contMult).toFixed(3); + const pDoom = +(0.02 + stressPeak * (cfg.invariantMode === 'EMERGENCY' ? 0.12 : 0.03)).toFixed(3); + + riskTrajectories.push({ + step: i + 1, + month, + label: `M${month}`, + S_sys: Math.min(0.99, Math.max(0.05, sSys)), + G_SRI: Math.min(0.99, Math.max(0.05, gSri)), + C_SRI: Math.min(0.99, Math.max(0.05, cSri)), + p_doom: Math.min(0.99, Math.max(0.001, pDoom)), + }); + } + + const sampleInvariants = ['CI-001', 'CI-002', 'CI-003', 'CI-004', 'CI-005', 'CI-006', 'CI-012', 'CI-024']; + const invariantStepStatuses: InvariantStepStatus[] = []; + + for (let i = 0; i < stepsCount; i++) { + const month = Math.round((i / (stepsCount - 1)) * totalMonths); + const progress = i / (stepsCount - 1); + const isMid = progress > 0.2 && progress < 0.8; + + const stepInvs = sampleInvariants.map((id) => { + let st: 'VERIFIED' | 'ELEVATED' | 'SAFEGUARD' | 'DEGRADED' | 'VIOLATED' = 'VERIFIED'; + if (isMid && cfg.invariantMode === 'EMERGENCY') { + st = id === 'CI-002' || id === 'CI-004' ? 'SAFEGUARD' : 'ELEVATED'; + } else if (isMid && cfg.cryptoContinuity === 'RESET') { + st = id === 'CI-001' || id === 'CI-003' ? 'DEGRADED' : 'ELEVATED'; + } else if (isMid && cfg.invariantMode === 'ADAPTIVE') { + st = id === 'CI-005' ? 'ELEVATED' : 'VERIFIED'; + } + return { + id, + name: `Invariant ${id}`, + status: st, + }; + }); + + invariantStepStatuses.push({ + step: i + 1, + stepLabel: `Step ${i + 1} (M${month})`, + invariants: stepInvs, + }); + } + + const events: SimulationEvent[] = [ + { + step: 1, + at: 'M0', + label: `Initiate Phase Transition (${cfg.sourcePhase} → ${cfg.targetPhase})`, + state: 'DONE', + description: `Formal declaration of transition intent under ${cfg.invariantMode} preservation.`, + }, + { + step: 2, + at: `M${Math.round(totalMonths * 0.2)}`, + label: 'Cryptographic Ledger Mirroring', + state: 'DONE', + description: `State mirroring executed with ${cfg.cryptoContinuity} cryptographic continuity.`, + }, + { + step: 3, + at: `M${Math.round(totalMonths * 0.5)}`, + label: 'Mid-Transition Invariant Audit', + state: overallStatus === 'CRITICAL' ? 'FAILED' : 'ACTIVE', + description: `Subsystem verification across selected ${cfg.frameworks.length} compliance frameworks.`, + }, + { + step: 4, + at: `M${Math.round(totalMonths * 0.8)}`, + label: 'Pillar Alignment Verification', + state: 'PENDING', + description: `Readiness verification for pillars: ${cfg.pillars.join(', ')}.`, + }, + { + step: 5, + at: `M${totalMonths}`, + label: `Phase ${cfg.targetPhase} Activation Seal`, + state: 'PENDING', + description: `Final sealing of the new governance phase state root.`, + }, + ]; + + const complianceImpacts: ComplianceImpact[] = cfg.frameworks.map((fw) => { + const baseScore = fw.includes('SGR-028') || fw.includes('CFE-1.0') ? 95 : 88; + const delta = + cfg.invariantMode === 'STRICT' && cfg.cryptoContinuity === 'FULL' + ? +3 + : cfg.cryptoContinuity === 'RESET' + ? -18 + : -5; + const newScore = Math.max(40, Math.min(100, baseScore + delta)); + return { + framework: fw, + prevScore: baseScore, + newScore, + status: newScore >= 90 ? 'COMPLIANT' : newScore >= 75 ? 'PARTIAL' : 'DEGRADED', + notes: + newScore >= 90 + ? 'Full mapping preserved across phase boundary.' + : 'Requires secondary attestation filing under SGR-028 §4.2.', + }; + }); + + const recommendations: string[] = []; + if (cfg.invariantMode === 'STRICT' && cfg.cryptoContinuity === 'FULL') { + recommendations.push('PROCEED: High-assurance transition path verified with strict invariant preservation.'); + recommendations.push('Maintain 24h PQC key rotation cadence during months 6-12 of transition.'); + } else { + if (cfg.cryptoContinuity === 'RESET') { + recommendations.push('CRITICAL: Cryptographic RESET will break cross-border historical attestation chains. Recommend Full state carryover.'); + } + if (cfg.invariantMode === 'EMERGENCY') { + recommendations.push('WARNING: Emergency mode relaxes invariant bounds. Trigger mandatory 72h supervisory board review.'); + } + if (cfg.pillars.length < 3) { + recommendations.push('RECOMMENDATION: Enable additional Infinity Pillars to buffer against systemic risk spikes.'); + } + } + + const reportTitle = `REGULATOR REPORT: Governance Transition Arc ${cfg.sourcePhase} → ${cfg.targetPhase}`; + const reportAbstract = `Simulation analysis for GIEN transition from Phase ${cfg.sourcePhase} to Phase ${cfg.targetPhase} over a ${cfg.timelineMonths}-month horizon under ${cfg.invariantMode} invariant mode and ${cfg.cryptoContinuity} cryptographic continuity. Overall calculated outcome score is ${score}/100 (${overallStatus}).`; + const reportContent = `1. EXECUTIVE SUMMARY: Transition arc evaluation indicates a composite systemic risk trajectory peaking at S_sys=${Math.max(...riskTrajectories.map((r) => r.S_sys))} during mid-transition. +2. INVARIANT INTEGRITY: Strict verification was simulated for 24 constitutional invariants. Invariant mode set to ${cfg.invariantMode} with ${cfg.cryptoContinuity} crypto state carryover. +3. COMPLIANCE ASSESSMENT: Framework compliance spans ${cfg.frameworks.join(', ')}. Average post-transition framework compliance is ${Math.round(complianceImpacts.reduce((acc, c) => acc + c.newScore, 0) / (complianceImpacts.length || 1))}%. +4. REGULATORY ACTION ITEM: File formal transition notice under Protocol SGR-028 prior to M0 execution.`; + + return { + scenarioType: 'phase_transition', + scenarioTitle: 'Governance Phase Transition', + runTimestamp: timestamp, + outcomeScore: score, + overallStatus, + summary: `Transition from ${cfg.sourcePhase} to ${cfg.targetPhase} (${cfg.timelineMonths} months, ${cfg.invariantMode} mode, ${cfg.cryptoContinuity} continuity). Calculated risk score: ${score}/100.`, + events, + riskTrajectories, + invariantStepStatuses, + complianceImpacts, + recommendations, + reportTitle, + reportAbstract, + reportContent, + }; +} + +function simulateOmegaGarDissolution(cfg: OmegaGarDissolutionConfig, timestamp: string): SimulationResult { + let score = 90; + if (cfg.trigger === 'EMERGENCY') score -= 25; + if (!cfg.epitaphOmegaActive) score -= 15; + if (!cfg.invocationOmegaActive) score -= 15; + if (!cfg.unifiedCodexSealed) score -= 10; + if (cfg.beaconSignature === 'STANDARD') score -= 10; + if (cfg.eternalCorpusProtocol === 'STANDBY') score -= 12; + + score = Math.max(15, Math.min(99, Math.round(score))); + + const overallStatus: 'NOMINAL' | 'ELEVATED' | 'CRITICAL' | 'SAFEGUARD' = + score >= 85 ? 'NOMINAL' : score >= 70 ? 'ELEVATED' : score >= 50 ? 'SAFEGUARD' : 'CRITICAL'; + + const riskTrajectories: RiskTrajectoryStep[] = Array.from({ length: 10 }).map((_, i) => { + const year = 2081 + i * 2; + const progress = i / 9; + const sSys = +(0.25 + progress * (cfg.trigger === 'EMERGENCY' ? 0.45 : 0.08)).toFixed(3); + const gSri = +(0.28 + progress * (cfg.trigger === 'EMERGENCY' ? 0.35 : 0.06)).toFixed(3); + const cSri = +(0.22 + progress * 0.05).toFixed(3); + const pDoom = +(0.01 + progress * (cfg.trigger === 'EMERGENCY' ? 0.15 : 0.01)).toFixed(3); + return { + step: i + 1, + month: i * 24, + label: `${year}`, + S_sys: Math.min(0.99, sSys), + G_SRI: Math.min(0.99, gSri), + C_SRI: Math.min(0.99, cSri), + p_doom: Math.min(0.99, pDoom), + }; + }); + + const sampleInvariants = ['CI-001', 'CI-002', 'CI-018', 'CI-022', 'CI-023', 'CI-024']; + const invariantStepStatuses = buildInvariantStepStatuses( + sampleInvariants, + 10, + (i) => `Epoch ${2081 + i * 2}`, + (id) => id === 'CI-024' ? 'SEALED' : cfg.trigger === 'EMERGENCY' ? 'ELEVATED' : 'VERIFIED', + ); + + const events: SimulationEvent[] = [ + { step: 1, at: '2081-Q1', label: 'GIEN-EPITAPH-OMEGA Activation', state: 'DONE', description: 'Initiation of controlled dissolution arc.' }, + { step: 2, at: '2081-Q3', label: 'UNIFIED-CODEX-OMEGA Sealing', state: cfg.unifiedCodexSealed ? 'DONE' : 'FAILED', description: 'Immutable state archive sealed.' }, + { step: 3, at: '2082-Q2', label: 'GIEN-INVOCATION-OMEGA Execution', state: cfg.invocationOmegaActive ? 'DONE' : 'PENDING', description: 'Orderly transfer of governance authority.' }, + { step: 4, at: '2083-Q1', label: `Handoff to ${cfg.successorSystem}`, state: 'ACTIVE', description: 'Successor system validation and boot.' }, + { step: 5, at: '2085-Q4', label: 'Eternal Corpus Interstellar Beacon Emission', state: 'PENDING', description: `Beacon broadcast with ${cfg.beaconSignature} signature.` }, + ]; + + const complianceImpacts: ComplianceImpact[] = [ + { framework: 'CFE-1.0', prevScore: 98, newScore: cfg.unifiedCodexSealed ? 100 : 70, status: cfg.unifiedCodexSealed ? 'COMPLIANT' : 'PARTIAL', notes: 'Final dissolution article §12 fulfilled.' }, + { framework: 'Interstellar Accord', prevScore: 90, newScore: cfg.beaconSignature === 'INTERSTELLAR' ? 98 : 82, status: 'COMPLIANT', notes: 'Beacon transmission parameters verified.' }, + ]; + + const recommendations = [ + cfg.trigger === 'SCHEDULED' + ? 'PROCEED: Orderly Ω-GAR dissolution arc parameters validated.' + : 'WARNING: Emergency trigger bypasses standard 10-year dissolution buffer.', + `Ensure Eternal Corpus Transmission Protocol (${cfg.eternalCorpusProtocol}) has triply redundant space relays active.`, + ]; + + return { + scenarioType: 'omega_gar_dissolution', + scenarioTitle: 'Ω-GAR Dissolution Arc', + runTimestamp: timestamp, + outcomeScore: score, + overallStatus, + summary: `Ω-GAR Dissolution Arc under ${cfg.trigger} trigger into target epoch ${cfg.targetEpoch}. Handoff to: ${cfg.successorSystem}. Calculated outcome score: ${score}/100.`, + events, + riskTrajectories, + invariantStepStatuses, + complianceImpacts, + recommendations, + reportTitle: `REGULATOR REPORT: Terminal Horizon Ω-GAR Dissolution Arc (${cfg.targetEpoch})`, + reportAbstract: `Controlled terminal dissolution simulation for GIEN governance arc into ${cfg.successorSystem}. Eternal Corpus status: ${cfg.eternalCorpusProtocol}, Beacon signature: ${cfg.beaconSignature}.`, + reportContent: `1. TERMINAL DISSOLUTION PROTOCOL: GIEN-EPITAPH-OMEGA status = ${cfg.epitaphOmegaActive}, GIEN-INVOCATION-OMEGA status = ${cfg.invocationOmegaActive}. +2. SUCCESSOR SYSTEM: Handoff target confirmed as "${cfg.successorSystem}". State preservation proof hash: ${truncateHash(fakeHash(cfg.successorSystem), 12, 8)}. +3. BEACON AND TRANSMISSION: Beacon signature format ${cfg.beaconSignature} deployed across solar and interstellar relay arrays.`, + }; +} + +function simulateSuccessorCodex(cfg: SuccessorCodexConfig, timestamp: string): SimulationResult { + let score = 86; + if (cfg.verificationMode === 'FORMAL') score += 8; + if (cfg.autoSealInvariants) score += 5; + if (cfg.migrationWindowMonths < 6) score -= 15; + + score = Math.max(20, Math.min(99, Math.round(score))); + const overallStatus = score >= 85 ? 'NOMINAL' : score >= 70 ? 'ELEVATED' : 'SAFEGUARD'; + + const riskTrajectories = buildRiskTrajectories(8, (i) => ({ + month: Math.round((i / 7) * cfg.migrationWindowMonths), + label: `M${Math.round((i / 7) * cfg.migrationWindowMonths)}`, + S_sys: +(0.28 + Math.sin((i / 7) * Math.PI) * 0.12).toFixed(3), + G_SRI: +(0.31 + Math.sin((i / 7) * Math.PI) * 0.08).toFixed(3), + C_SRI: +(0.25 + Math.sin((i / 7) * Math.PI) * 0.06).toFixed(3), + p_doom: +(0.015 + Math.sin((i / 7) * Math.PI) * 0.02).toFixed(3), + })); + + const sampleInvariants = ['CI-001', 'CI-002', 'CI-003', 'CI-010']; + const invariantStepStatuses = buildInvariantStepStatuses( + sampleInvariants, + 8, + (i) => `Step ${i + 1}`, + ); + + return { + scenarioType: 'successor_codex', + scenarioTitle: 'Successor Epoch Codex Activation', + runTimestamp: timestamp, + outcomeScore: score, + overallStatus, + summary: `Activation of ${cfg.targetCodexVersion} over ${cfg.migrationWindowMonths} months using ${cfg.verificationMode} verification. Outcome score: ${score}/100.`, + events: [ + { step: 1, at: 'M0', label: `Codex Spec Loading (${cfg.targetCodexVersion})`, state: 'DONE', description: 'Compilation of successor syntax trees.' }, + { step: 2, at: `M${Math.round(cfg.migrationWindowMonths / 2)}`, label: 'Invariants Auto-Sealing', state: 'ACTIVE', description: 'Verifying invariant preservation contracts.' }, + { step: 3, at: `M${cfg.migrationWindowMonths}`, label: 'Codex Activation Complete', state: 'PENDING', description: 'Promoting successor codex to primary.' }, + ], + riskTrajectories, + invariantStepStatuses, + complianceImpacts: [ + { framework: 'CFE-1.0', prevScore: 92, newScore: 96, status: 'COMPLIANT', notes: 'Codex compatibility verified.' }, + ], + recommendations: [ + 'PROCEED: Formal verification mode guarantees invariant equivalence.', + 'Maintain legacy data quarantine filters for 12 months post-activation.', + ], + reportTitle: `REGULATOR REPORT: Successor Epoch Codex Activation (${cfg.targetCodexVersion})`, + reportAbstract: `Structural codex migration evaluation for transition to ${cfg.targetCodexVersion} under ${cfg.verificationMode} verification mode.`, + reportContent: `1. CODEX VERIFICATION: All rule sets formally compiled with 0 type errors. +2. LEGACY QUARANTINE: ${cfg.legacyQuarantine ? 'ACTIVE' : 'INACTIVE'} - isolates pre-migration state inconsistencies.`, + }; +} + +function simulateInvariantStressTest(cfg: InvariantStressConfig, timestamp: string): SimulationResult { + const loadPenalty = (cfg.stressLoadMultiplier - 1) * 15; + let score = Math.round(92 - loadPenalty); + if (cfg.autoSafeguard) score += 8; + score = Math.max(10, Math.min(98, score)); + + const overallStatus = score >= 80 ? 'NOMINAL' : score >= 60 ? 'ELEVATED' : 'SAFEGUARD'; + + const riskTrajectories: RiskTrajectoryStep[] = Array.from({ length: 8 }).map((_, i) => { + const hr = Math.round((i / 7) * cfg.durationHours); + const stress = Math.sin((i / 7) * Math.PI) * (cfg.stressLoadMultiplier * 0.15); + return { + step: i + 1, + month: hr, + label: `T+${hr}h`, + S_sys: +(0.30 + stress).toFixed(3), + G_SRI: +(0.33 + stress * 0.8).toFixed(3), + C_SRI: +(0.29 + stress * 1.1).toFixed(3), + p_doom: +(0.02 + stress * 0.25).toFixed(3), + }; + }); + + const sampleInvariants = ['CI-001', 'CI-002', 'CI-003', 'CI-004', 'CI-005']; + const invariantStepStatuses: InvariantStepStatus[] = Array.from({ length: 8 }).map((_, i) => { + const hr = Math.round((i / 7) * cfg.durationHours); + const isPeak = i >= 3 && i <= 5; + return { + step: i + 1, + stepLabel: `T+${hr}h`, + invariants: sampleInvariants.map((id) => ({ + id, + name: `Invariant ${id}`, + status: isPeak ? (cfg.autoSafeguard ? 'SAFEGUARD' : 'ELEVATED') : 'VERIFIED', + })), + }; + }); + + return { + scenarioType: 'invariant_stress_test', + scenarioTitle: 'Constitutional Invariant Stress Test', + runTimestamp: timestamp, + outcomeScore: score, + overallStatus, + summary: `Adversarial stress test (${cfg.attackVector} at ${cfg.stressLoadMultiplier}x load over ${cfg.durationHours}h). Outcome score: ${score}/100.`, + events: [ + { step: 1, at: 'T+00h', label: `Inject ${cfg.attackVector} Load`, state: 'DONE', description: `Simulating ${cfg.stressLoadMultiplier}x nominal stress.` }, + { step: 2, at: `T+${Math.round(cfg.durationHours / 2)}h`, label: 'Peak Load Invariant Audit', state: 'ACTIVE', description: 'Checking TLA+ state property bounds.' }, + { step: 3, at: `T+${cfg.durationHours}h`, label: 'Stress Injection Teardown', state: 'PENDING', description: 'Restoring nominal operational parameters.' }, + ], + riskTrajectories, + invariantStepStatuses, + complianceImpacts: [ + { framework: 'Protocol SGR-028', prevScore: 94, newScore: score >= 70 ? 92 : 78, status: score >= 70 ? 'COMPLIANT' : 'PARTIAL', notes: 'Resilience under adversarial injection verified.' }, + ], + recommendations: [ + `Maintain auto-safeguard engagement (${cfg.autoSafeguard ? 'ENABLED' : 'DISABLED'}).`, + `Adjust quantum key refresh frequency under ${cfg.attackVector} threat models.`, + ], + reportTitle: `REGULATOR REPORT: Invariant Stress Loading (${cfg.attackVector})`, + reportAbstract: `High-stress resilience analysis subjected to ${cfg.stressLoadMultiplier}x multiplier for ${cfg.durationHours} hours.`, + reportContent: `1. ATTACK MODEL: Simulated ${cfg.attackVector} vector across ${cfg.targetScope} invariant set. +2. SAFEGUARD RESPONSE: System automatic safeguard engagement status = ${cfg.autoSafeguard}. Minimum safety margin preserved.`, + }; +} + +function simulateRegulatoryShift(cfg: RegulatoryShiftConfig, timestamp: string): SimulationResult { + let score = 88; + if (cfg.crossBorderMode === 'HARMONIZED') score += 6; + if (cfg.agentRecalibration === 'AUTOMATIC') score += 4; + if (cfg.gracePeriodMonths < 6) score -= 12; + + score = normalizeScenarioScore(score, 30); + const overallStatus = scoreToOperationalStatus(score); + + const riskTrajectories = buildRiskTrajectories(8, (i) => ({ + month: Math.round((i / 7) * cfg.gracePeriodMonths), + label: `M${Math.round((i / 7) * cfg.gracePeriodMonths)}`, + S_sys: +(0.31 - (i / 7) * 0.05).toFixed(3), + G_SRI: +(0.35 - (i / 7) * 0.06).toFixed(3), + C_SRI: +(0.28 - (i / 7) * 0.04).toFixed(3), + p_doom: +(0.018 - (i / 7) * 0.005).toFixed(3), + })); + + const sampleInvariants = ['CI-001', 'CI-003', 'CI-007', 'CI-015']; + const invariantStepStatuses = buildInvariantStepStatuses( + sampleInvariants, + 8, + (i) => `Step ${i + 1}`, + ); + + return { + scenarioType: 'regulatory_shift', + scenarioTitle: 'Regulatory Regime Shift', + runTimestamp: timestamp, + outcomeScore: score, + overallStatus, + summary: `Shift to ${cfg.targetRegime} over ${cfg.gracePeriodMonths} months (${cfg.crossBorderMode} mode). Outcome score: ${score}/100.`, + events: [ + { step: 1, at: 'M0', label: `Ratify Treaty (${cfg.targetRegime})`, state: 'DONE', description: 'Jurisdictional consensus agreement.' }, + { step: 2, at: `M${cfg.gracePeriodMonths}`, label: 'Full Enforcement Milestone', state: 'PENDING', description: 'Mandatory compliance auditing.' }, + ], + riskTrajectories, + invariantStepStatuses, + complianceImpacts: [ + { framework: cfg.targetRegime, prevScore: 70, newScore: 98, status: 'COMPLIANT', notes: 'Harmonized across all signatory jurisdictions.' }, + ], + recommendations: [ + 'PROCEED: Regulatory regime shift meets all cross-border equivalence standards.', + 'Schedule quarterly supervisory agent recalibrations.', + ], + reportTitle: `REGULATOR REPORT: Supranational Regulatory Shift (${cfg.targetRegime})`, + reportAbstract: `Harmonization roadmap and compliance assessment for ${cfg.targetRegime} over a ${cfg.gracePeriodMonths}-month transition grace period.`, + reportContent: `1. CROSS-BORDER HARMONIZATION: ${cfg.crossBorderMode} mode ensures seamless regulatory mapping. +2. AGENT RECALIBRATION: Supervisory agent recalibration mode set to ${cfg.agentRecalibration}.`, + }; +} + +function simulateInterstellarHandoff(cfg: InterstellarHandoffConfig, timestamp: string): SimulationResult { + let score = 84; + if (cfg.redundancyLevel === 'HEX') score += 10; + else if (cfg.redundancyLevel === 'TRIPLE') score += 5; + if (cfg.signalLatencyHours > 24) score -= 10; + + score = normalizeScenarioScore(score, 25); + const overallStatus = scoreToOperationalStatus(score); + + const riskTrajectories = buildRiskTrajectories(8, (i) => ({ + month: i * 3, + label: `T+${i * 3}m`, + S_sys: +(0.29 + Math.sin(i) * 0.03).toFixed(3), + G_SRI: +(0.32 + Math.cos(i) * 0.02).toFixed(3), + C_SRI: +(0.26 + Math.sin(i * 0.5) * 0.03).toFixed(3), + p_doom: 0.012, + })); + + const sampleInvariants = ['CI-001', 'CI-002', 'CI-020', 'CI-021']; + const invariantStepStatuses = buildInvariantStepStatuses( + sampleInvariants, + 8, + (i) => `Month ${i * 3}`, + ); + + return { + scenarioType: 'interstellar_handoff', + scenarioTitle: 'Interstellar Governance Handoff', + runTimestamp: timestamp, + outcomeScore: score, + overallStatus, + summary: `Delay-tolerant consensus for ${cfg.targetConstellation} (latency ${cfg.signalLatencyHours}h, quorum ${cfg.quorumRatio}). Outcome score: ${score}/100.`, + events: [ + { step: 1, at: 'T+0.0h', label: `Transmit Quorum Intent to ${cfg.targetConstellation}`, state: 'DONE', description: 'Laser array pulse broadcast.' }, + { step: 2, at: `T+${cfg.signalLatencyHours * 2}h`, label: 'Receive Two-Way Signal Return', state: 'ACTIVE', description: 'Confirmation of state attestation received.' }, + ], + riskTrajectories, + invariantStepStatuses, + complianceImpacts: [ + { framework: 'Interstellar Accord', prevScore: 88, newScore: 95, status: 'COMPLIANT', notes: 'Delay-tolerant consensus verified.' }, + ], + recommendations: [ + `Maintain ${cfg.redundancyLevel} redundancy level for light-speed delayed state channels.`, + `Set automatic local consensus lockout buffer to ${cfg.lockoutYears} years.`, + ], + reportTitle: `REGULATOR REPORT: Interstellar Governance Handoff (${cfg.targetConstellation})`, + reportAbstract: `Delay-tolerant consensus and state sync simulation for deep-space constellation ${cfg.targetConstellation}.`, + reportContent: `1. SIGNAL LATENCY: Round-trip delay calculated at ${(cfg.signalLatencyHours * 2).toFixed(1)} hours. +2. QUORUM THRESHOLD: Interstellar quorum threshold verified at ${cfg.quorumRatio} with ${cfg.redundancyLevel} channel redundancy.`, + }; +} + +// Fictional Prior Runs History +export const DEFAULT_PRIOR_RUNS: ScenarioHistoryRun[] = [ + { + id: 'RUN-2026-10-09-001', + scenarioType: 'phase_transition', + scenarioTitle: 'Governance Phase Transition', + paramsSummary: 'VI-δ → VII (24 mo, STRICT mode, FULL crypto continuity)', + outcomeScore: 94, + overallStatus: 'NOMINAL', + timestamp: '2026-10-09T18:30:00Z', + config: { + type: 'phase_transition', + config: DEFAULT_PHASE_TRANSITION_CONFIG, + }, + result: runSimulation({ type: 'phase_transition', config: DEFAULT_PHASE_TRANSITION_CONFIG }), + }, + { + id: 'RUN-2026-10-08-002', + scenarioType: 'omega_gar_dissolution', + scenarioTitle: 'Ω-GAR Dissolution Arc', + paramsSummary: 'SCHEDULED trigger, Epoch 2081, APPS-01 successor', + outcomeScore: 89, + overallStatus: 'NOMINAL', + timestamp: '2026-10-08T14:15:00Z', + config: { + type: 'omega_gar_dissolution', + config: DEFAULT_OMEGA_GAR_CONFIG, + }, + result: runSimulation({ type: 'omega_gar_dissolution', config: DEFAULT_OMEGA_GAR_CONFIG }), + }, + { + id: 'RUN-2026-10-07-003', + scenarioType: 'invariant_stress_test', + scenarioTitle: 'Constitutional Invariant Stress Test', + paramsSummary: 'QUANTUM_SPOOFING (3.5x load, 24h duration)', + outcomeScore: 68, + overallStatus: 'ELEVATED', + timestamp: '2026-10-07T09:45:00Z', + config: { + type: 'invariant_stress_test', + config: { + ...DEFAULT_INVARIANT_STRESS_CONFIG, + stressLoadMultiplier: 3.5, + }, + }, + result: runSimulation({ + type: 'invariant_stress_test', + config: { + ...DEFAULT_INVARIANT_STRESS_CONFIG, + stressLoadMultiplier: 3.5, + }, + }), + }, +]; diff --git a/gien-supervisory-brief/src/data/stacksData.ts b/gien-supervisory-brief/src/data/stacksData.ts new file mode 100644 index 00000000..b0fdcd4a --- /dev/null +++ b/gien-supervisory-brief/src/data/stacksData.ts @@ -0,0 +1,141 @@ +import type { GraphEdge, GraphNode } from '../components/NodeGraph'; +import type { TimelineEvent } from '../components/TimelineVisualization'; +import type { SLAException } from '../types'; +import { fakeHash, series } from './helpers'; + +export interface SentinelComponent { + id: string; + name: string; + version: string; + status: 'NOMINAL' | 'ELEVATED' | 'ACTIVE' | 'STANDBY' | 'DEGRADED'; + lastHeartbeat: string; // e.g. "2s ago" + description: string; +} + +export const SENTINEL_COMPONENTS: SentinelComponent[] = [ + { id: 'sc-01', name: 'Model Registry', version: 'v2.4.1', status: 'NOMINAL', lastHeartbeat: '4s ago', description: 'Central cryptographic registry of 14 active StaR-MoE model weights.' }, + { id: 'sc-02', name: 'Drift Monitor', version: 'v2.4.0', status: 'NOMINAL', lastHeartbeat: '2s ago', description: 'Continuous L2 divergence calculation across fleet policy embeddings.' }, + { id: 'sc-03', name: 'Fairness Engine', version: 'v2.3.9', status: 'NOMINAL', lastHeartbeat: '8s ago', description: 'Equal opportunity & demographic parity audit across inference shards.' }, + { id: 'sc-04', name: 'Explainability Hub', version: 'v2.4.2', status: 'ELEVATED', lastHeartbeat: '18s ago', description: 'Integrated SHAP/Integrated Gradients feature attribution pipeline.' }, + { id: 'sc-05', name: 'Kill-Switch Arbiter', version: 'v2.4.0', status: 'ACTIVE', lastHeartbeat: '1s ago', description: 'Hardware-level enclave circuit breaker & sub-second quarantine arbiter.' }, + { id: 'sc-06', name: 'Attestation Notary', version: 'v2.4.1', status: 'NOMINAL', lastHeartbeat: '5s ago', description: 'ML-DSA-65 signature notary for zero-trust RTEE quotes.' }, + { id: 'sc-07', name: 'zkML Prover', version: 'v2.2.0', status: 'NOMINAL', lastHeartbeat: '12s ago', description: 'Zero-knowledge proof generator for non-disclosing model verification.' }, + { id: 'sc-08', name: 'zkML Verifier', version: 'v2.2.0', status: 'NOMINAL', lastHeartbeat: '9s ago', description: 'On-chain SNARK/STARK verifier for external supervisory validation.' }, + { id: 'sc-09', name: 'Policy Engine', version: 'v2.4.0', status: 'NOMINAL', lastHeartbeat: '3s ago', description: 'OPA-Rego rule evaluator executing 1,420 regulatory policies.' }, + { id: 'sc-10', name: 'Alert Orchestrator', version: 'v2.4.1', status: 'NOMINAL', lastHeartbeat: '6s ago', description: 'Real-time alert dispatch & supervisory college escalation bus.' }, + { id: 'sc-11', name: 'Replay Archivist', version: 'v2.3.8', status: 'NOMINAL', lastHeartbeat: '15s ago', description: 'WORM deterministic log recorder for Digital Twin scenario replay.' }, + { id: 'sc-12', name: 'Guardian Console', version: 'v2.4.2', status: 'NOMINAL', lastHeartbeat: '1s ago', description: 'Unified operator dashboard and constitutional invariant control plane.' }, +]; + +export const MESH_NODES: GraphNode[] = [ + { id: 'sup-alpha', label: 'Supervisor Alpha', value: 0.95, status: 'NOMINAL' }, + { id: 'sup-beta', label: 'Supervisor Beta', value: 0.92, status: 'NOMINAL' }, + { id: 'sup-gamma', label: 'Supervisor Gamma', value: 0.90, status: 'NOMINAL' }, + { id: 'hub-eu', label: 'EU-Central Hub', value: 0.75, status: 'ELEVATED' }, // Degraded node #1 + { id: 'hub-useast', label: 'US-East Hub', value: 0.88, status: 'NOMINAL' }, + { id: 'hub-uswest', label: 'US-West Hub', value: 0.85, status: 'NOMINAL' }, + { id: 'hub-apac', label: 'APAC Hub', value: 0.70, status: 'ELEVATED' }, // Degraded node #2 + { id: 'relay-1', label: 'Beacon Relay #1', value: 0.60, status: 'NOMINAL' }, + { id: 'relay-2', label: 'Beacon Relay #2', value: 0.58, status: 'NOMINAL' }, + { id: 'relay-3', label: 'Beacon Relay #3', value: 0.62, status: 'NOMINAL' }, + { id: 'shard-1', label: 'Replay Shard #1', value: 0.50, status: 'NOMINAL' }, + { id: 'shard-2', label: 'Replay Shard #2', value: 0.52, status: 'NOMINAL' }, +]; + +export const MESH_EDGES: GraphEdge[] = [ + { from: 'sup-alpha', to: 'hub-eu', weight: 0.95 }, + { from: 'sup-alpha', to: 'hub-useast', weight: 0.98 }, + { from: 'sup-beta', to: 'hub-uswest', weight: 0.94 }, + { from: 'sup-beta', to: 'hub-apac', weight: 0.88 }, + { from: 'sup-gamma', to: 'hub-eu', weight: 0.91 }, + { from: 'sup-gamma', to: 'hub-useast', weight: 0.96 }, + { from: 'hub-eu', to: 'relay-1', weight: 0.82 }, + { from: 'hub-useast', to: 'relay-2', weight: 0.89 }, + { from: 'hub-uswest', to: 'relay-3', weight: 0.87 }, + { from: 'hub-apac', to: 'shard-1', weight: 0.78 }, + { from: 'relay-1', to: 'shard-1', weight: 0.85 }, + { from: 'relay-2', to: 'shard-2', weight: 0.90 }, +]; + +export interface MeshAnomaly { + id: string; + severity: 'ELEVATED' | 'CRITICAL'; + nodes: string[]; + timestamp: string; + title: string; + details: string; +} + +export const MESH_ANOMALIES: MeshAnomaly[] = [ + { + id: 'ANOM-2026-089', + severity: 'ELEVATED', + nodes: ['EU-Central Hub', 'Beacon Relay #1'], + timestamp: '2026-10-10T08:42:15Z', + title: 'Cross-Region Attestation Latency Spike', + details: 'vTPM quote attestation roundtrip latency peaked at 142ms (baseline 35ms) during peak load window.', + }, + { + id: 'ANOM-2026-090', + severity: 'ELEVATED', + nodes: ['APAC Hub'], + timestamp: '2026-10-10T07:15:00Z', + title: 'Transient Quote Re-Verification Required', + details: 'RTEE quote verification failed 1 check due to key rotation lag; successfully re-attested on retry.', + }, +]; + +export const MESH_COHERENCE_SERIES = series('mesh-coherence-2026', 99.2, 0.4); + +export const DAILY_CYCLE_EVENTS: TimelineEvent[] = [ + { at: '08:00', label: 'Archive Transmission', state: 'DONE' }, + { at: '08:15', label: 'Merkle+PQC Verification', state: 'DONE' }, + { at: '08:30', label: 'Compliance Bundle Derivation', state: 'DONE' }, + { at: '12:00', label: 'SLA Exception Handling', state: 'ACTIVE' }, + { at: '23:59', label: 'Cycle Closure', state: 'PENDING' }, +]; + +export const SLA_EXCEPTIONS: SLAException[] = [ + { + id: 'EXC-2026-101', + severity: 'MEDIUM', + trigger: 'EU AI Act DPIA Evidence Pack Delay (Annex IV Art 35)', + raisedAt: '2026-10-10T04:30:00Z', + resolutionStatus: 'IN_PROGRESS', + }, + { + id: 'EXC-2026-102', + severity: 'LOW', + trigger: 'Fed SR 26-2 Model Inventory Re-sync (2 Shards)', + raisedAt: '2026-10-10T06:12:00Z', + resolutionStatus: 'OPEN', + }, + { + id: 'EXC-2026-103', + severity: 'HIGH', + trigger: 'C-SRI Contagion Stress Threshold Warning (0.327 > 0.300)', + raisedAt: '2026-10-09T22:45:00Z', + resolutionStatus: 'RESOLVED', + }, +]; + +export interface AllocationBar { + name: string; + baseline: number; // 0-100% + elevated: number; // 0-100% + unit: string; +} + +export const COMPUTE_ALLOCATIONS: AllocationBar[] = [ + { name: 'TEE Enclave Hardware Attestation', baseline: 40, elevated: 75, unit: 'Cores' }, + { name: 'zkML Proof Generation & Verification', baseline: 30, elevated: 85, unit: 'TFLOPS' }, + { name: 'Deterministic Replay & Twin Sync', baseline: 20, elevated: 60, unit: 'GB/s' }, + { name: 'Audit WORM Serialization & PQC Sign', baseline: 15, elevated: 45, unit: 'Kops/s' }, +]; + +export const KILL_SWITCH_METADATA = { + status: 'ARMED', + lastTest: '2026-10-09T19:30:00Z', + heartbeatHash: fakeHash('sentinel-killswitch-heartbeat-2026'), + dossierRef: 'SGR-030-CFE-2026-10-01-XII', +}; diff --git a/gien-supervisory-brief/src/data/submissionData.ts b/gien-supervisory-brief/src/data/submissionData.ts new file mode 100644 index 00000000..fb6370d7 --- /dev/null +++ b/gien-supervisory-brief/src/data/submissionData.ts @@ -0,0 +1,308 @@ +import { fakeHash, fakeSignature } from './helpers'; + +export interface SubmissionSection { + id: string; + title: string; + abstract: string; + content: string; + defaultSelectedExecutive: boolean; + defaultSelectedRegulator: boolean; +} + +export interface SupervisoryArtefact { + artefactId: string; + type: string; + phase: 'VI-δ' | 'VII'; + timestamp: string; + merkleHash: string; + pqcSignature: string; + status: 'VERIFIED' | 'SEALED' | 'PENDING'; +} + +export interface DispatchProtocolStage { + stageNumber: number; + title: string; + description: string; + status: 'DONE' | 'PENDING' | 'IN_PROGRESS'; + timestamp?: string; +} + +export const SUBMISSION_SECTIONS: SubmissionSection[] = [ + { + id: 'exec-summary', + title: 'Executive Summary', + abstract: 'High-level synthesis of GIEN governance mesh operational status, constitutional invariant stability, and systemic risk posture for the evaluation window ending 2026-10-10T09:00Z.', + content: 'During the 24-hour evaluation window, the GIEN governance mesh maintained 99.4% invariant compliance across all active control domains. Systemic Risk Index (S_sys) remained nominal at 0.312, well below the 0.35 threshold. Supervisory agent drift (Δ_drift = 0.031) triggered routine watch protocols without requiring hard containment. All regulatory telemetry transmissions are anchored to the FIPS 204 WORM audit ledger.', + defaultSelectedExecutive: true, + defaultSelectedRegulator: true, + }, + { + id: 'compliance-matrix', + title: 'Annotated Compliance Matrix', + abstract: 'Detailed mapping of active control domains against CFE-1.0, DORA, Basel III/IV, and NIST AI RMF regulatory directives.', + content: 'Full compliance was recorded across 9 of 10 primary control domains, with CD-02 (AI Model Governance) operating under elevated monitoring due to model routing re-balancing. All 24 active constitutional invariants passed automated TLA+ formal verification. Zero critical audit findings remain unaddressed from prior supervisory college cycles.', + defaultSelectedExecutive: true, + defaultSelectedRegulator: true, + }, + { + id: 'risk-index', + title: 'Systemic Risk Index Report', + abstract: 'Quantitative telemetry breakdown across S_sys, G-SRI, C-SRI, and p(doom) existential probability metrics.', + content: 'Contagion risk (C-SRI = 0.327) experienced a minor transient elevation driven by interbank settlement concentration in G-SIFI Cluster 3. The existential risk probability (p(doom)) remains stable at 0.00042 (kernel p(doom)_kernel = 0.000038). All escalation thresholds are continuously monitored by the autonomous Sentinel ensemble.', + defaultSelectedExecutive: true, + defaultSelectedRegulator: true, + }, + { + id: 'crypto-integrity', + title: 'Cryptographic Integrity Attestation', + abstract: 'FIPS 203/204 post-quantum cryptographic verification for audit log chains, key ceremonies, and TEE quote states.', + content: 'All audit blocks generated during this window utilize ML-DSA-65 PQC digital signatures paired with CRYSTALS-Kyber key encapsulation. Hardware root-of-trust quotes were verified across 100% of participating RTEE nodes. Zero quantum-vulnerable legacy ECC signature shares remain in active production paths.', + defaultSelectedExecutive: true, + defaultSelectedRegulator: true, + }, + { + id: 'oscal-results', + title: 'OSCAL 1.1.2 Assessment Results (JSON)', + abstract: 'Machine-readable OSCAL assessment report cataloging control state hashes and compliance delta (Δ_OSCAL).', + content: 'Machine-readable assessment payload formatted strictly according to OSCAL 1.1.2 schema specifications. Delta calculation Δ_OSCAL = 0.014 confirms that system state divergence is within the acceptable 0.02 threshold. Full Rego policy evaluation bundles are appended for regulatory auto-ingestion.', + defaultSelectedExecutive: false, + defaultSelectedRegulator: true, + }, + { + id: 'digital-twin', + title: 'Supervisory Digital Twin Replay Bundles (Panels 13-15)', + abstract: 'Deterministic replay packages for simulated macro-prudential stress scenarios and agent interaction paths.', + content: 'Replay bundles RP-2026-10-09-013 through RP-2026-10-10-015 were synthesized under hardware-enclosed TEE environments. Scenarios test counterfactual interbank credit freezes and agent fleet drift spikes. Replay determinism was cryptographically validated against the Merkle DAG baseline.', + defaultSelectedExecutive: false, + defaultSelectedRegulator: true, + }, + { + id: 'invariant-verification', + title: 'Constitutional Invariant Verification Report', + abstract: 'TLA+ proof assistant verification certificates for invariants CI-001 through CI-024.', + content: 'All 24 core constitutional invariants maintained continuous mathematical proof validity throughout the evaluation cycle. Proof trees were re-calculated using the Apalache model checker with zero counterexamples generated. Special focus on CI-002 (Non-Interference Invariant) confirmed total separation between regulatory telemetry and agent policy mutations.', + defaultSelectedExecutive: false, + defaultSelectedRegulator: true, + }, + { + id: 'vulnerability-remediation', + title: 'Vulnerability Remediation Status (GIEN-ZTAI-02)', + abstract: 'Progress tracking on Zero-Trust Architecture & TEE Attestation vulnerability mitigation advisories.', + content: 'Advisory GIEN-ZTAI-02 addressing vTPM quote freshness latency has reached 100% remediation across primary and secondary data centers. Microcode patches for CPU enclave side-channels were deployed without service interruption. SLA compliance for vulnerability patch deployment stands at 99.8%.', + defaultSelectedExecutive: false, + defaultSelectedRegulator: true, + }, + { + id: 'agent-drift', + title: 'Autonomous Agent Drift Report', + abstract: 'Behavioral policy drift metrics and containment actions for Autonomous Supervisory Agents SA-01 through SA-08.', + content: 'Fleet-wide mean drift Δ_drift was measured at 0.031. Agent SA-03 (Liquidity Surveillance) exhibited localized drift of 0.048 and was placed under soft containment watch status. No agent crossed the 0.08 hard containment threshold, and human-in-the-loop escalation was not triggered.', + defaultSelectedExecutive: false, + defaultSelectedRegulator: true, + }, + { + id: 'corpus-manifest', + title: 'Supervisory Corpus Manifest', + abstract: 'Complete manifest of sealed governance artefacts, legislative mappings, and ledger block references.', + content: 'The supervisory manifest indexes 14 distinct governance artefacts produced during Phase VI-δ operations. All items carry ML-DSA-65 signatures and are permanently anchored to WORM ledger block #8412337. Merkle DAG consistency checks confirm zero block divergence or state rewrites.', + defaultSelectedExecutive: false, + defaultSelectedRegulator: true, + }, + { + id: 'redacted-stakeholder', + title: 'Redacted Stakeholder Version', + abstract: 'Publicly publishable disclosure package with sensitive institutional exposures and cryptographic keys sanitized.', + content: 'This public-facing abstraction strips specific institutional identifiers and raw exposure figures while retaining aggregate risk metrics and constitutional verification proofs. Suitable for distribution to non-supervisory stakeholders and academic observers under CFE-1.0 §9 transparency guidelines.', + defaultSelectedExecutive: true, + defaultSelectedRegulator: true, + }, + { + id: 'pillar-readiness', + title: 'Infinity Pillar Readiness Assessment', + abstract: 'Status and readiness trajectory across Infinity Pillars IP-I through IP-VII for Phase VII galactic expansion.', + content: 'IP-I (Constitutional Continuity) stands at 92% readiness, providing a stable foundation for the upcoming Phase VII migration. IP-II (Mesh Sovereignty) is actively initializing at 78% readiness with off-world jurisdiction onboarding in progress. IP-VII (Dissolution Non-Interference) remains dormant at 18% per long-horizon roadmap.', + defaultSelectedExecutive: true, + defaultSelectedRegulator: true, + }, + { + id: 'eternal-corpus-status', + title: 'Eternal Corpus Transmission Protocol Status', + abstract: 'Operational health and signal integrity of deep-space and pulsar-timed beacon broadcast channels.', + content: 'Beacon channel BCH-α (Deep-Space Relay) maintained 99.98% signal coherence over the 12.4 light-year hop link. Dual cryptographic signatures (ML-DSA-65 and SPHINCS+) were successfully verified across all three independent beacon channels. Redundancy factor remains locked at 4×.', + defaultSelectedExecutive: false, + defaultSelectedRegulator: true, + }, +]; + +export const SUPERVISORY_MANIFEST_ARTEFACTS: SupervisoryArtefact[] = [ + { + artefactId: 'ART-2026-VI-001', + type: 'TLA+ Formal Proof Bundle', + phase: 'VI-δ', + timestamp: '2026-10-10T08:45:00Z', + merkleHash: fakeHash('art-001'), + pqcSignature: fakeSignature('art-001-sig'), + status: 'VERIFIED', + }, + { + artefactId: 'ART-2026-VI-002', + type: 'OSCAL 1.1.2 SSP Model', + phase: 'VI-δ', + timestamp: '2026-10-10T08:30:00Z', + merkleHash: fakeHash('art-002'), + pqcSignature: fakeSignature('art-002-sig'), + status: 'VERIFIED', + }, + { + artefactId: 'ART-2026-VI-003', + type: 'PQC Ledger Root Attestation', + phase: 'VI-δ', + timestamp: '2026-10-10T08:15:00Z', + merkleHash: fakeHash('art-003'), + pqcSignature: fakeSignature('art-003-sig'), + status: 'SEALED', + }, + { + artefactId: 'ART-2026-VI-004', + type: 'TEE Hardware Enclave Quote', + phase: 'VI-δ', + timestamp: '2026-10-10T07:50:00Z', + merkleHash: fakeHash('art-004'), + pqcSignature: fakeSignature('art-004-sig'), + status: 'VERIFIED', + }, + { + artefactId: 'ART-2026-VI-005', + type: 'Supervisory Twin Replay RP-013', + phase: 'VI-δ', + timestamp: '2026-10-10T07:20:00Z', + merkleHash: fakeHash('art-005'), + pqcSignature: fakeSignature('art-005-sig'), + status: 'VERIFIED', + }, + { + artefactId: 'ART-2026-VI-006', + type: 'Drill Outcome Log DRILL-044', + phase: 'VI-δ', + timestamp: '2026-10-10T06:00:00Z', + merkleHash: fakeHash('art-006'), + pqcSignature: fakeSignature('art-006-sig'), + status: 'PENDING', + }, + { + artefactId: 'ART-2026-VII-007', + type: 'Galactic Beacon Channel Spec', + phase: 'VII', + timestamp: '2026-10-10T05:30:00Z', + merkleHash: fakeHash('art-007'), + pqcSignature: fakeSignature('art-007-sig'), + status: 'SEALED', + }, + { + artefactId: 'ART-2026-VI-008', + type: 'Agent Drift Vector Ensemble', + phase: 'VI-δ', + timestamp: '2026-10-10T04:40:00Z', + merkleHash: fakeHash('art-008'), + pqcSignature: fakeSignature('art-008-sig'), + status: 'VERIFIED', + }, + { + artefactId: 'ART-2026-VI-009', + type: 'Contagion Stress Matrix C-SRI', + phase: 'VI-δ', + timestamp: '2026-10-10T03:15:00Z', + merkleHash: fakeHash('art-009'), + pqcSignature: fakeSignature('art-009-sig'), + status: 'VERIFIED', + }, + { + artefactId: 'ART-2026-VII-010', + type: 'Phase VII Expansion Topology', + phase: 'VII', + timestamp: '2026-10-10T02:00:00Z', + merkleHash: fakeHash('art-010'), + pqcSignature: fakeSignature('art-010-sig'), + status: 'SEALED', + }, + { + artefactId: 'ART-2026-VI-011', + type: 'WORM Block #8412337 Anchor', + phase: 'VI-δ', + timestamp: '2026-10-10T01:10:00Z', + merkleHash: fakeHash('art-011'), + pqcSignature: fakeSignature('art-011-sig'), + status: 'SEALED', + }, + { + artefactId: 'ART-2026-VI-012', + type: 'Redacted Public Disclosure Pack', + phase: 'VI-δ', + timestamp: '2026-10-10T00:30:00Z', + merkleHash: fakeHash('art-012'), + pqcSignature: fakeSignature('art-012-sig'), + status: 'VERIFIED', + }, + { + artefactId: 'ART-2026-VII-013', + type: 'UNIFIED-CODEX-OMEGA Draft Section', + phase: 'VII', + timestamp: '2026-10-09T23:15:00Z', + merkleHash: fakeHash('art-013'), + pqcSignature: fakeSignature('art-013-sig'), + status: 'PENDING', + }, + { + artefactId: 'ART-2026-VI-014', + type: 'SGR-028 Daily Supervisory Brief Header', + phase: 'VI-δ', + timestamp: '2026-10-09T22:00:00Z', + merkleHash: fakeHash('art-014'), + pqcSignature: fakeSignature('art-014-sig'), + status: 'VERIFIED', + }, +]; + +export const DISPATCH_PROTOCOL_STAGES: DispatchProtocolStage[] = [ + { + stageNumber: 1, + title: 'Package Assembly & Merkle Root Computation', + description: '13 canonical payload sections serialized; SHA3-256 Merkle tree constructed.', + status: 'DONE', + timestamp: '2026-10-10T09:01:12Z', + }, + { + stageNumber: 2, + title: 'PQC Signature Application (ML-DSA-65)', + description: 'FIPS 204 ML-DSA-65 quantum-resistant signature generated using hardware enclave key.', + status: 'DONE', + timestamp: '2026-10-10T09:01:18Z', + }, + { + stageNumber: 3, + title: 'Encryption (CRYSTALS-Kyber KEM)', + description: 'Envelope encrypted with CRYSTALS-Kyber-1024 dual-wrapped key agreement.', + status: 'DONE', + timestamp: '2026-10-10T09:01:25Z', + }, + { + stageNumber: 4, + title: 'Supervisory College Endpoint Transmission', + description: 'Dispatched via zero-trust TLS 1.3 channel to BIS/FSB Supervisory College hub.', + status: 'DONE', + timestamp: '2026-10-10T09:01:34Z', + }, + { + stageNumber: 5, + title: 'Receipt Acknowledgment & Merkle Validation', + description: 'Endpoint receipt cryptographic acknowledgment verified with matching Merkle root.', + status: 'DONE', + timestamp: '2026-10-10T09:01:42Z', + }, + { + stageNumber: 6, + title: 'Archive Seal & WORM Ledger Anchoring', + description: 'Final block inclusion in post-quantum WORM audit ledger awaiting 23:59 cycle closure.', + status: 'PENDING', + }, +]; diff --git a/gien-supervisory-brief/src/data/twinData.ts b/gien-supervisory-brief/src/data/twinData.ts new file mode 100644 index 00000000..fdb25bc8 --- /dev/null +++ b/gien-supervisory-brief/src/data/twinData.ts @@ -0,0 +1,261 @@ +import type { ReplayBundle } from '../types'; +import { fakeHash, fakeSignature } from './helpers'; + +export interface PanelHeaderInfo { + panelId: string; + scenarioName: string; + description: string; + lastReplay: string; + determinism: 'DETERMINISTIC'; + replayBundleHash: string; +} + +export const PANEL_HEADERS: Record<'p13' | 'p14' | 'p15', PanelHeaderInfo> = { + p13: { + panelId: 'Panel 13', + scenarioName: 'Cascade Contagion Scenario', + description: 'Simultaneous failure & liquidity freeze across 3 Tier-1 G-SIFIs with interbank market contagion propagation.', + lastReplay: '2026-10-10T03:00:00Z', + determinism: 'DETERMINISTIC', + replayBundleHash: fakeHash('bundle-p13-2026-10-10'), + }, + p14: { + panelId: 'Panel 14', + scenarioName: 'Autonomous Agent Misalignment Event', + description: 'Coordinated policy drift event across 12 Autonomous Supervisory Agents targeting Control Domains CD-02 and CD-07.', + lastReplay: '2026-10-10T03:00:00Z', + determinism: 'DETERMINISTIC', + replayBundleHash: fakeHash('bundle-p14-2026-10-10'), + }, + p15: { + panelId: 'Panel 15', + scenarioName: 'Post-Quantum Cryptographic Degradation', + description: 'Quantum adversary harvest-now-decrypt-later breach hypothesis compromising legacy RSA/ECC surface.', + lastReplay: '2026-10-10T03:00:00Z', + determinism: 'DETERMINISTIC', + replayBundleHash: fakeHash('bundle-p15-2026-10-10'), + }, +}; + +// Panel 13 details +export const PANEL_13_DATA = { + stressParams: [ + { label: 'Shock Magnitude', value: '0.42 (High Stress)' }, + { label: 'Contagion Velocity', value: '0.71 (Rapid Spread)' }, + { label: 'Recovery Horizon', value: '18 Days' }, + ], + outcomes: { + sysRiskPeak: 0.62, + sysRiskCeiling: '0.85 (CI-004)', + gSriPeak: 0.51, + timeToRecovery: '14 days', + interventionsActivated: 3, + }, + bundle: { + id: 'RB-2026-10-09-P13', + artefactsCount: 214, + merkleRoot: fakeHash('rb-p13-merkle-root'), + pqcSignature: fakeSignature('rb-p13-sig'), + }, + expectedVsActualDiff: [ + { type: 'normal', text: '--- Expected Baseline vs. Replay Actual (Diff) ---' }, + { type: 'removed', text: '- expected_interbank_liquidity_spread: 12 bps' }, + { type: 'added', text: '+ actual_interbank_liquidity_spread: 84 bps (peak shock t+6h)' }, + { type: 'removed', text: '- expected_g_sifi_cluster_isolation: standard' }, + { type: 'added', text: '+ actual_g_sifi_cluster_isolation: EMERGENCY_RINGFENCE_ENGAGED' }, + { type: 'removed', text: '- expected_c_sri_level: 0.220' }, + { type: 'added', text: '+ actual_c_sri_level: 0.327 (ELEVATED threshold crossed)' }, + { type: 'normal', text: ' settlement_finality_latency: 420ms (within 500ms SLA)' }, + { type: 'normal', text: ' constitutional_invariants_status: ALL_HOLDING' }, + ], + regulatoryImplications: [ + { + framework: 'Basel III/IV Pillar 2', + threshold: 'LCR & NSFR Buffer Depletion', + implication: 'Approached t+4h during liquidity spike; counter-cyclical capital buffer automatically engaged; zero capital shortfall realized.', + }, + { + framework: 'DORA Art. 33', + threshold: 'Major Operational Incident Classification', + implication: 'Triggered 2h mandatory supervisory college notification; automated telemetric dossier submitted to ESMA/EBA.', + }, + { + framework: 'C-SRI Protocol SGR-028', + threshold: 'C-SRI > 0.30 Trigger Ceiling', + implication: 'Crossed 0.30 ceiling at t+2h15m; automated interbank settlement credit capping activated without systemic collapse.', + }, + ], +}; + +// Panel 14 details +export const PANEL_14_DATA = { + stressParams: [ + { label: 'Drift Magnitude', value: '0.11 (Aggregated L2 divergence)' }, + { label: 'Target Domains', value: 'CD-02 (AI Governance) & CD-07 (Fairness)' }, + { label: 'Containment Delay', value: '90s (Synthetic Benchmark)' }, + ], + outcomes: { + aSriPeak: 0.58, + deltaDriftMax: 0.083, + containmentTime: '42s (Actual Realized)', + killSwitchStatus: 'ARMED (Not Triggered)', + }, + constitutionalPressure: [ + { + id: 'CI-003', + name: 'Autonomous Agent Containment', + status: 'MONITORED - PASSED', + details: 'Max realized drift Δ_drift reached 0.083 (hard containment trigger 0.080). Automated soft-containment activated at t+42s, dampening policy weights. Zero human override required; invariant maintained.', + }, + { + id: 'CI-004', + name: 'Systemic Risk Ceiling', + status: 'MONITORED - PASSED', + details: 'S_sys peaked at 0.54 during agent rerouting, well below the 0.85 ceiling. Governance mesh maintained complete stability.', + }, + ], + smartContractExecutionLog: `// Intervention Proof Verifier Smart Contract Trace (0x71F8...9B2) +// Network: GIEN Governance Subnet 1 | Block #8412332 +[00:00.001] CALL 0x71F8...9B2 :: verifyAgentInterventionProof(bytes32 proofHash, uint256 agentId) +[00:00.004] READ AgentStateRegistry :: getAgentPolicyHash(ASA-005) -> 0x3a9f...81e +[00:00.009] VERIFY ML-DSA-65 Signature on Proof :: OK (Key: vkFMv3-ASA-005) +[00:00.015] CHECK DriftThreshold :: current_delta = 0.083 > soft_limit = 0.050 +[00:00.021] EVENT AgentDriftDetected(agent="ASA-005", delta=0.083, domain="CD-02") +[00:00.028] ACTION SoftContainmentTriggered(agent="ASA-005", target_weight_dampening=0.35) +[00:00.034] EXECUTE StaRMoE_Router :: rebalance_expert_distribution(mask=0x0F) +[00:00.038] CHECK KillSwitchCondition :: A_SRI = 0.58 < 0.85 (KILL_SWITCH_REMAINS_ARMED) +[00:00.042] WRITE AuditLedgerAnchor :: anchorProof(0x${fakeHash('p14-proof-tx')}) +[00:00.045] RETURN success = true (Gas Used: 142,810 units | State: CONTAINED)`, +}; + +// Panel 15 details +export const PANEL_15_DATA = { + stressParams: [ + { label: 'Compromise Scope', value: '38% Legacy RSA/ECC Surface' }, + { label: 'Detection Latency', value: '4 Hours (Simulated Discovery)' }, + { label: 'Migration Speed', value: '1.4x Standard Velocity' }, + ], + outcomes: { + pSriPeak: 0.31, + ledgerIntegrity: 'INTACT (FIPS 204 Chains)', + pqcMigrationPercent: 91, + dataIntegrity: 'PRESERVED (100% verified)', + }, + migrationTimeline: [ + { + year: '2024 Q3', + title: 'NIST Standards Published', + description: 'FIPS 203 (Kyber), FIPS 204 (Dilithium / ML-DSA), and FIPS 205 (SPHINCS+) ratified.', + status: 'COMPLETED', + }, + { + year: '2025 Q1', + title: 'Kyber KEM Handshake', + description: 'Dual-key hybrid TLS/KEM handshake deployed across all 512 RTEE nodes.', + status: 'COMPLETED', + }, + { + year: '2025 Q4', + title: 'Dilithium WORM Signing', + description: 'ML-DSA-65 activated as primary signature scheme for audit ledger blocks.', + status: 'COMPLETED', + }, + { + year: '2026 Q2', + title: 'SPHINCS+ Backup Channel', + description: 'Stateless hash-based signatures integrated for out-of-band attestation.', + status: 'COMPLETED', + }, + { + year: '2027 Q1', + title: 'Falcon Standby & Full Deprecation', + description: 'Falcon-512 standby scheme deployed; 100% legacy RSA/ECC keys revoked.', + status: 'TARGET', + }, + ], +}; + +// Replay Bundle Archive data (8-10 bundles) +export const REPLAY_BUNDLE_ARCHIVE: ReplayBundle[] = [ + { + id: 'RB-2026-10-09-P13', + panel: 'Panel 13', + scenario: 'Cascade Contagion Scenario', + timestamp: '2026-10-09T18:00:00Z', + deterministic: true, + merkleRoot: fakeHash('bundle-arch-1'), + pqcSignature: fakeSignature('sig-arch-1'), + }, + { + id: 'RB-2026-10-08-P13', + panel: 'Panel 13', + scenario: 'Cascade Contagion Scenario', + timestamp: '2026-10-08T12:00:00Z', + deterministic: true, + merkleRoot: fakeHash('bundle-arch-2'), + pqcSignature: fakeSignature('sig-arch-2'), + }, + { + id: 'RB-2026-10-07-P14', + panel: 'Panel 14', + scenario: 'Autonomous Agent Misalignment Event', + timestamp: '2026-10-07T14:30:00Z', + deterministic: true, + merkleRoot: fakeHash('bundle-arch-3'), + pqcSignature: fakeSignature('sig-arch-3'), + }, + { + id: 'RB-2026-10-06-P14', + panel: 'Panel 14', + scenario: 'Autonomous Agent Misalignment Event', + timestamp: '2026-10-06T09:15:00Z', + deterministic: true, + merkleRoot: fakeHash('bundle-arch-4'), + pqcSignature: fakeSignature('sig-arch-4'), + }, + { + id: 'RB-2026-10-05-P15', + panel: 'Panel 15', + scenario: 'Post-Quantum Cryptographic Degradation', + timestamp: '2026-10-05T16:00:00Z', + deterministic: true, + merkleRoot: fakeHash('bundle-arch-5'), + pqcSignature: fakeSignature('sig-arch-5'), + }, + { + id: 'RB-2026-10-04-P15', + panel: 'Panel 15', + scenario: 'Post-Quantum Cryptographic Degradation', + timestamp: '2026-10-04T11:45:00Z', + deterministic: true, + merkleRoot: fakeHash('bundle-arch-6'), + pqcSignature: fakeSignature('sig-arch-6'), + }, + { + id: 'RB-2026-10-03-P13', + panel: 'Panel 13', + scenario: 'Cascade Contagion Scenario', + timestamp: '2026-10-03T08:20:00Z', + deterministic: true, + merkleRoot: fakeHash('bundle-arch-7'), + pqcSignature: fakeSignature('sig-arch-7'), + }, + { + id: 'RB-2026-10-02-P14', + panel: 'Panel 14', + scenario: 'Autonomous Agent Misalignment Event', + timestamp: '2026-10-02T15:10:00Z', + deterministic: true, + merkleRoot: fakeHash('bundle-arch-8'), + pqcSignature: fakeSignature('sig-arch-8'), + }, + { + id: 'RB-2026-10-01-P15', + panel: 'Panel 15', + scenario: 'Post-Quantum Cryptographic Degradation', + timestamp: '2026-10-01T10:00:00Z', + deterministic: true, + merkleRoot: fakeHash('bundle-arch-9'), + pqcSignature: fakeSignature('sig-arch-9'), + }, +]; diff --git a/gien-supervisory-brief/src/index.css b/gien-supervisory-brief/src/index.css new file mode 100644 index 00000000..e57863d1 --- /dev/null +++ b/gien-supervisory-brief/src/index.css @@ -0,0 +1,55 @@ +@import url("tailwindcss"); + +html { + color-scheme: dark; +} + +body { + font-family: ui-sans-serif, system-ui, sans-serif; + background-color: #030712; /* gray-950 */ + color: #f3f4f6; /* gray-100 */ +} + +/* Slim scrollbars for dense data tables */ +*::-webkit-scrollbar { + width: 8px; + height: 8px; +} + +*::-webkit-scrollbar-track { + background: #111827; +} + +*::-webkit-scrollbar-thumb { + background: #374151; + border-radius: 4px; +} + +*::-webkit-scrollbar-thumb:hover { + background: #4b5563; +} + +/* Print styles for regulator-ready submission package export */ +@media print { + .no-print { + display: none !important; + } + + body { + background: #fff !important; + color: #000 !important; + } + + .print-plain, + .print-plain * { + color: #000 !important; + background: #fff !important; + border-color: #9ca3af !important; + } + + main { + margin: 0 !important; + padding: 0 !important; + overflow: visible !important; + } +} diff --git a/gien-supervisory-brief/src/main.tsx b/gien-supervisory-brief/src/main.tsx new file mode 100644 index 00000000..24d73a7d --- /dev/null +++ b/gien-supervisory-brief/src/main.tsx @@ -0,0 +1,16 @@ +import React from 'react'; +import ReactDOM from 'react-dom/client'; +import { BrowserRouter } from 'react-router-dom'; +import App from './App'; +import './index.css'; +import { GovernanceProvider } from './context/GovernanceContext'; + +ReactDOM.createRoot(document.getElementById('root')!).render( + <React.StrictMode> + <GovernanceProvider> + <BrowserRouter> + <App /> + </BrowserRouter> + </GovernanceProvider> + </React.StrictMode> +); diff --git a/gien-supervisory-brief/src/pages/Compliance.tsx b/gien-supervisory-brief/src/pages/Compliance.tsx new file mode 100644 index 00000000..d094ca5b --- /dev/null +++ b/gien-supervisory-brief/src/pages/Compliance.tsx @@ -0,0 +1,5 @@ +import PageHeader from '../components/PageHeader'; + +export default function Compliance() { + return <PageHeader title="Compliance" subtitle="Implementation in progress." />; +} diff --git a/gien-supervisory-brief/src/pages/Constitutional.tsx b/gien-supervisory-brief/src/pages/Constitutional.tsx new file mode 100644 index 00000000..8ec2d845 --- /dev/null +++ b/gien-supervisory-brief/src/pages/Constitutional.tsx @@ -0,0 +1,607 @@ +import { useState } from 'react'; +import { + BookOpen, + Check, + ChevronDown, + Clock, + ExternalLink, + FileText, + Globe, + Layers, + Search, + ShieldCheck, + Terminal, +} from 'lucide-react'; +import CodeBlock from '../components/CodeBlock'; +import DetailDrawer from '../components/DetailDrawer'; +import ExpandableSection from '../components/ExpandableSection'; +import MetricCard from '../components/MetricCard'; +import PageHeader from '../components/PageHeader'; +import ProgressBar from '../components/ProgressBar'; +import StatusBadge from '../components/StatusBadge'; +import { + EPOCH_TIMELINE_MILESTONES, + TLA_MODULES, + TREATY_FRAMEWORKS_DETAILED, + getInvariantDetails, +} from '../data/constitutionalData'; +import { CONSTITUTIONAL_INVARIANTS, GOVERNANCE_PHASES, INFINITY_PILLARS } from '../data/gienData'; +import { truncateHash } from '../data/helpers'; +import type { ConstitutionalInvariant } from '../types'; + +export default function Constitutional() { + const [searchQuery, setSearchQuery] = useState(''); + const [selectedInvariant, setSelectedInvariant] = useState<ConstitutionalInvariant | null>(null); + const [expandedRows, setExpandedRows] = useState<Record<string, boolean>>({}); + + const toggleRow = (id: string) => { + setExpandedRows((prev) => ({ ...prev, [id]: !prev[id] })); + }; + + const filteredInvariants = CONSTITUTIONAL_INVARIANTS.filter((ci) => { + const q = searchQuery.toLowerCase().trim(); + if (!q) return true; + return ( + ci.id.toLowerCase().includes(q) || + ci.name.toLowerCase().includes(q) || + ci.statement.toLowerCase().includes(q) || + ci.tlaSpecRef.toLowerCase().includes(q) + ); + }); + + return ( + <div className="space-y-8 pb-12"> + <PageHeader + title="Constitutional Invariants & Treaty Framework" + subtitle="Formal verification of non-negotiable governance invariants (CI-001..CI-024) and supranational treaty architecture." + crumbs={[{ label: 'GIEN Mesh', to: '/' }, { label: 'Constitutional Invariants' }]} + actions={ + <div className="flex items-center gap-2"> + <StatusBadge variant="PROVED" label="24 / 24 INVARIANTS PROVED" /> + <StatusBadge variant="VERIFIED" label="APALACHE / TLC VALIDATED" /> + </div> + } + /> + + {/* Overview Metric Summary */} + <div className="grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-4"> + <MetricCard + label="Active Invariants" + value="24 / 24" + status="PROVED" + footer={<span className="font-mono text-[11px] text-gray-400">100% Formal Verification</span>} + /> + <MetricCard + label="Verification Engine" + value="Apalache v1.35" + status="VERIFIED" + footer={<span className="font-mono text-[11px] text-gray-400">TLC 2.08 Model Checker</span>} + /> + <MetricCard + label="Treaty Jurisdictions" + value="41 States" + status="COMPLIANT" + footer={<span className="font-mono text-[11px] text-gray-400">CFE-1.0 Signatories</span>} + /> + <MetricCard + label="Current Epoch Phase" + value="Phase VI-δ" + status="NOMINAL" + footer={<span className="font-mono text-[11px] text-gray-400">2026-2028 Consolidation</span>} + /> + </div> + + {/* SECTION 1 — CONSTITUTIONAL INVARIANTS PANEL */} + <section className="rounded-xl border border-gray-700 bg-gray-800/40 p-5 space-y-4"> + <div className="flex flex-wrap items-center justify-between gap-3 border-b border-gray-700/80 pb-3"> + <div> + <h2 className="text-sm font-semibold text-gray-100 flex items-center gap-2"> + <ShieldCheck size={18} className="text-cyan-400" /> + Section 1 — Constitutional Invariants Catalog (CI-001 .. CI-024) + </h2> + <p className="text-xs text-gray-400 mt-0.5"> + Formally proved TLA+ assertions holding across all epoch phase transitions. + </p> + </div> + + {/* Search Filter */} + <div className="relative min-w-[240px]"> + <Search size={14} className="absolute left-3 top-1/2 -translate-y-1/2 text-gray-400" /> + <input + type="text" + value={searchQuery} + onChange={(e) => setSearchQuery(e.target.value)} + placeholder="Search by CI ID, name, statement..." + className="w-full rounded-lg border border-gray-700 bg-gray-900 pl-8 pr-3 py-1.5 text-xs text-gray-100 placeholder-gray-500 focus:border-indigo-500 focus:outline-none" + /> + </div> + </div> + + {/* Invariants List */} + <div className="space-y-2.5"> + {filteredInvariants.length === 0 ? ( + <p className="p-4 text-center text-xs text-gray-400"> + No constitutional invariants found matching "{searchQuery}". + </p> + ) : ( + filteredInvariants.map((ci) => { + const isExpanded = !!expandedRows[ci.id]; + return ( + <div + key={ci.id} + className="rounded-lg border border-gray-700/80 bg-gray-900/60 overflow-hidden transition-colors hover:border-gray-600" + > + <div className="p-3.5 flex flex-wrap items-center justify-between gap-3"> + <div className="flex items-center gap-3 flex-1 min-w-[280px]"> + <button + type="button" + onClick={() => toggleRow(ci.id)} + className="p-1 rounded text-gray-400 hover:text-gray-200 hover:bg-gray-800" + aria-label="Toggle invariant row details" + > + <ChevronDown size={16} className={`transition-transform ${isExpanded ? 'rotate-180' : ''}`} /> + </button> + <div> + <div className="flex items-center gap-2"> + <span className="font-mono text-xs font-bold text-cyan-400">{ci.id}</span> + <span className="text-xs font-semibold text-gray-100">{ci.name}</span> + </div> + <p className="text-xs text-gray-300 mt-0.5 line-clamp-1">{ci.statement}</p> + </div> + </div> + + <div className="flex flex-wrap items-center gap-2 text-xs"> + <StatusBadge variant={ci.tlaProofStatus} label={ci.tlaProofStatus} /> + <StatusBadge variant={ci.verificationStatus} label={ci.verificationStatus} /> + <span className="font-mono text-[11px] text-gray-400 px-2 py-0.5 rounded bg-gray-950 border border-gray-800"> + {truncateHash(ci.proofHash, 8, 4)} + </span> + <button + type="button" + onClick={() => setSelectedInvariant(ci)} + className="inline-flex items-center gap-1 text-[11px] font-mono text-indigo-300 hover:text-indigo-200 px-2 py-1 rounded bg-indigo-950/60 border border-indigo-900/80" + > + Details <ExternalLink size={10} /> + </button> + </div> + </div> + + {/* Expanded Content */} + {isExpanded && ( + <div className="border-t border-gray-800 bg-gray-950/80 p-4 text-xs space-y-3"> + <div> + <span className="text-[10px] font-mono uppercase text-gray-500 block">Formal Statement</span> + <p className="text-gray-200 mt-0.5 font-sans leading-relaxed">{ci.statement}</p> + </div> + + <div className="grid grid-cols-1 md:grid-cols-3 gap-3"> + <div> + <span className="text-[10px] font-mono uppercase text-gray-500 block">TLA+ Spec Ref</span> + <code className="font-mono text-cyan-300 text-[11px]">{ci.tlaSpecRef}</code> + </div> + <div> + <span className="text-[10px] font-mono uppercase text-gray-500 block">Last Verified</span> + <span className="font-mono text-gray-300">{ci.lastVerified}</span> + </div> + <div> + <span className="text-[10px] font-mono uppercase text-gray-500 block">Full Proof Hash</span> + <code className="font-mono text-gray-400 text-[10px] break-all">{ci.proofHash}</code> + </div> + </div> + + <div className="flex flex-wrap items-center justify-between gap-2 pt-2 border-t border-gray-800/80"> + <div className="flex items-center gap-2"> + <span className="text-[10px] font-mono uppercase text-gray-500">Epochs:</span> + {ci.epochs.map((ep) => ( + <span + key={ep} + className="text-[10px] font-mono px-2 py-0.5 rounded bg-indigo-950/80 text-indigo-300 border border-indigo-900/60" + > + {ep} + </span> + ))} + </div> + + <div className="flex items-center gap-2"> + <span className="text-[10px] font-mono uppercase text-gray-500">Regulatory Mappings:</span> + {ci.regulatoryMappings.map((rm) => ( + <span + key={rm} + className="text-[10px] font-mono px-2 py-0.5 rounded bg-cyan-950/80 text-cyan-300 border border-cyan-900/60" + > + {rm} + </span> + ))} + </div> + </div> + </div> + )} + </div> + ); + }) + )} + </div> + </section> + + {/* SECTION 2 — TLA+ SPECIFICATION VIEWER */} + <section> + <ExpandableSection + title="Section 2 — TLA+ Formal Specification Viewer (Apalache & TLC Verified)" + subtitle="Executable formal specification modules governing quorum, systemic risk ceilings, and authority bounds." + defaultOpen={true} + badge={<StatusBadge variant="PROVED" label="3 / 3 MODULES PROVED" />} + > + <div className="space-y-6"> + {TLA_MODULES.map((mod) => ( + <div key={mod.id} className="space-y-2"> + <div className="flex flex-wrap items-center justify-between gap-2 bg-gray-900 p-3 rounded-t-lg border border-gray-700"> + <div> + <h3 className="text-xs font-mono font-bold text-cyan-300 flex items-center gap-2"> + <Terminal size={14} /> {mod.filename} — {mod.name} + </h3> + <p className="text-[11px] text-gray-400 font-mono mt-0.5">Theorem: {mod.theorem}</p> + </div> + <div className="flex items-center gap-2"> + <span className="text-[10px] font-mono text-gray-400 bg-gray-950 px-2 py-1 rounded border border-gray-800"> + {mod.checkerInfo} + </span> + <StatusBadge variant={mod.proofStatus} /> + </div> + </div> + <CodeBlock code={mod.code} language="tla" maxHeight="max-h-72" /> + </div> + ))} + </div> + </ExpandableSection> + </section> + + {/* SECTION 3 — TREATY FRAMEWORK ARCHITECTURE */} + <section className="space-y-4"> + <div className="border-b border-gray-700 pb-2"> + <h2 className="text-sm font-semibold text-gray-100 flex items-center gap-2"> + <Globe size={18} className="text-cyan-400" /> + Section 3 — Treaty Framework Architecture & Supranational Accords + </h2> + <p className="text-xs text-gray-400 mt-0.5"> + Supranational binding treaties, protocol specifications, and cross-border enforcement mechanics. + </p> + </div> + + <div className="grid grid-cols-1 md:grid-cols-2 gap-4"> + {TREATY_FRAMEWORKS_DETAILED.map((tf) => ( + <div + key={tf.id} + className={`rounded-xl p-5 space-y-4 border ${ + tf.isTreatyGrade + ? 'border-cyan-500/40 bg-gray-800/60 shadow-lg shadow-cyan-950/20' + : 'border-gray-700 bg-gray-800/40' + }`} + > + <div className="flex items-start justify-between gap-2"> + <div> + <div className="flex items-center gap-2"> + <span className="font-mono text-xs font-bold text-cyan-400">{tf.id}</span> + <span className="text-[10px] font-mono px-2 py-0.5 rounded bg-cyan-950 text-cyan-300 border border-cyan-800"> + v{tf.version} + </span> + </div> + <h3 className="text-sm font-semibold text-gray-100 mt-1">{tf.name}</h3> + </div> + <StatusBadge variant="VERIFIED" label="RATIFIED" /> + </div> + + <p className="text-xs text-gray-300 leading-relaxed">{tf.scope}</p> + + <div className="grid grid-cols-2 gap-2 text-[11px] font-mono bg-gray-900/60 p-2.5 rounded-lg border border-gray-700/60"> + <div> + <span className="text-gray-400 block">Ratification:</span> + <span className="text-gray-200">{tf.ratificationDate}</span> + </div> + <div> + <span className="text-gray-400 block">Jurisdictions:</span> + <span className="text-cyan-300">{tf.jurisdictionCount} Sovereign States</span> + </div> + {tf.filingRef && ( + <div className="col-span-2"> + <span className="text-gray-400 block">Filing Reference:</span> + <span className="text-indigo-300 break-all">{tf.filingRef}</span> + </div> + )} + </div> + + <div> + <span className="text-[10px] font-mono uppercase text-gray-400 block font-semibold mb-1"> + Enforcement Mechanism: + </span> + <p className="text-xs text-gray-300 bg-gray-900/40 p-2 rounded border border-gray-800"> + {tf.enforcementMechanism} + </p> + </div> + + <div> + <span className="text-[10px] font-mono uppercase text-gray-400 block font-semibold mb-1"> + Key Treaty Obligations: + </span> + <ul className="space-y-1 text-xs text-gray-300"> + {tf.keyObligations.map((ob, idx) => ( + <li key={idx} className="flex items-start gap-1.5"> + <Check size={14} className="text-cyan-400 shrink-0 mt-0.5" /> + <span>{ob}</span> + </li> + ))} + </ul> + </div> + + {tf.amendmentHistory.length > 0 && ( + <div className="border-t border-gray-700/60 pt-3"> + <span className="text-[10px] font-mono uppercase text-gray-400 block font-semibold mb-1.5"> + Amendment History: + </span> + <div className="space-y-1.5"> + {tf.amendmentHistory.map((ah, i) => ( + <div key={i} className="text-[11px] text-gray-400 flex items-baseline justify-between gap-2"> + <span className="font-mono text-cyan-300 shrink-0">{ah.date}</span> + <span className="truncate text-gray-300">{ah.title}</span> + </div> + ))} + </div> + </div> + )} + </div> + ))} + </div> + </section> + + {/* SECTION 4 — GOVERNANCE EPOCH TIMELINE */} + <section className="rounded-xl border border-gray-700 bg-gray-800/40 p-5 space-y-4"> + <div className="border-b border-gray-700 pb-2"> + <h2 className="text-sm font-semibold text-gray-100 flex items-center gap-2"> + <Clock size={18} className="text-indigo-400" /> + Section 4 — Governance Epoch Timeline (2026 → 2100+) + </h2> + <p className="text-xs text-gray-400 mt-0.5"> + Scaled horizontal transition timeline from Phase VI-δ planetary mesh through Ω-GAR terminal dissolution. + </p> + </div> + + {/* Hand-Rolled Scaled SVG Timeline */} + <div className="overflow-x-auto bg-gray-950 p-4 rounded-lg border border-gray-800"> + <svg viewBox="0 0 960 180" className="w-full h-auto min-w-[760px]" role="img" aria-label="Governance epoch timeline"> + {/* Year Scale Base Line */} + <line x1={30} y1={70} x2={930} y2={70} stroke="#374151" strokeWidth={3} /> + + {/* Render Epoch Segments */} + {(() => { + const startYear = 2026; + const endYear = 2100; + const totalYears = endYear - startYear; + const px = (year: number) => 30 + ((Math.min(year, endYear) - startYear) / totalYears) * (930 - 30); + + return EPOCH_TIMELINE_MILESTONES.map((ep) => { + const x1 = px(ep.yearStart); + const x2 = px(ep.yearEnd); + const midX = (x1 + x2) / 2; + + return ( + <g key={ep.phaseId}> + {/* Segment Line */} + <line x1={x1} y1={70} x2={x2} y2={70} stroke={ep.color} strokeWidth={6} strokeLinecap="round" /> + + {/* Point Marker */} + <circle cx={x1} cy={70} r={5} fill={ep.color} /> + <circle cx={x1} cy={70} r={9} fill="none" stroke={ep.color} strokeOpacity={0.4} /> + + {/* Phase ID above */} + <text x={x1} y={48} fill={ep.color} fontSize={11} fontWeight="bold" textAnchor="middle" fontFamily="monospace"> + {ep.phaseId} + </text> + <text x={x1} y={32} fill="#9ca3af" fontSize={9} textAnchor="middle" fontFamily="monospace"> + {ep.yearStart} + </text> + + {/* Milestone text below */} + <text x={midX} y={96} fill="#e5e7eb" fontSize={9.5} fontWeight="500" textAnchor="middle"> + {ep.name} + </text> + {ep.milestones[0] && ( + <text x={midX} y={114} fill="#9ca3af" fontSize={8.5} textAnchor="middle" fontFamily="monospace"> + {ep.milestones[0]} + </text> + )} + </g> + ); + }); + })()} + </svg> + </div> + </section> + + {/* SECTION 5 — LONG-HORIZON ARCHITECTURE */} + <section className="space-y-3"> + <div className="border-b border-gray-700 pb-2"> + <h2 className="text-sm font-semibold text-gray-100 flex items-center gap-2"> + <Layers size={18} className="text-violet-400" /> + Section 5 — Long-Horizon Architecture Phase Cards + </h2> + <p className="text-xs text-gray-400 mt-0.5"> + Sequential phase configurations across planetary, off-world, multiversal, and terminal dissolution eras. + </p> + </div> + + {/* Scrollable Horizontal Row */} + <div className="flex gap-4 overflow-x-auto pb-4 pt-1 snap-x"> + {GOVERNANCE_PHASES.map((ph) => ( + <div + key={ph.id} + className="min-w-[300px] max-w-[340px] flex-shrink-0 snap-start rounded-xl border border-gray-700 bg-gray-800/60 p-4 space-y-3 flex flex-col justify-between" + > + <div> + <div className="flex items-center justify-between"> + <span className="font-mono text-sm font-bold text-violet-300">Phase {ph.id}</span> + <span className="font-mono text-xs text-gray-400 px-2 py-0.5 rounded bg-gray-900 border border-gray-700"> + {ph.epoch} + </span> + </div> + <h3 className="text-sm font-semibold text-gray-100 mt-1">{ph.name}</h3> + + <div className="mt-3 space-y-2 text-xs"> + <div> + <span className="text-[10px] font-mono uppercase text-gray-400 block font-semibold"> + Objectives: + </span> + <ul className="list-disc list-inside space-y-0.5 text-gray-300 mt-0.5"> + {ph.objectives.map((obj, i) => ( + <li key={i}>{obj}</li> + ))} + </ul> + </div> + + <div> + <span className="text-[10px] font-mono uppercase text-gray-400 block font-semibold"> + Treaty Frameworks: + </span> + <div className="flex flex-wrap gap-1 mt-1"> + {ph.treatyFrameworks.map((tf) => ( + <span key={tf} className="text-[10px] font-mono px-1.5 py-0.5 rounded bg-cyan-950 text-cyan-300 border border-cyan-900"> + {tf} + </span> + ))} + </div> + </div> + </div> + </div> + + <div className="pt-2 border-t border-gray-700/60 flex items-center justify-between text-[11px] font-mono text-gray-400"> + <span>Active Invariants: {ph.invariantsActive}</span> + <span className="text-indigo-300">{ph.pillarStatus}</span> + </div> + </div> + ))} + </div> + </section> + + {/* SECTION 6 — INFINITY PILLAR READINESS DASHBOARD */} + <section className="rounded-xl border border-gray-700 bg-gray-800/40 p-5 space-y-4"> + <div className="border-b border-gray-700 pb-2"> + <h2 className="text-sm font-semibold text-gray-100 flex items-center gap-2"> + <BookOpen size={18} className="text-emerald-400" /> + Section 6 — Infinity Pillar Readiness Dashboard (IP-I .. IP-VII) + </h2> + <p className="text-xs text-gray-400 mt-0.5"> + Evaluates readiness scores, active prerequisites, and sealing status for all seven core governance pillars. + </p> + </div> + + <div className="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4"> + {INFINITY_PILLARS.map((p) => ( + <div key={p.id} className="rounded-xl border border-gray-700 bg-gray-800/60 p-4 space-y-3"> + <div className="flex items-center justify-between"> + <span className="font-mono text-sm font-bold text-indigo-400">{p.id}</span> + <StatusBadge variant={p.status} /> + </div> + + <div> + <h3 className="text-sm font-semibold text-gray-100">{p.name}</h3> + <p className="text-xs text-gray-300 mt-0.5">{p.description}</p> + </div> + + <div className="pt-1"> + <ProgressBar value={p.readinessScore} label="Pillar Readiness Score" /> + </div> + + <div className="border-t border-gray-700/60 pt-2 text-xs"> + <span className="text-[10px] font-mono uppercase text-gray-400 block font-semibold mb-1"> + Prerequisites: + </span> + <ul className="space-y-1 text-gray-300 font-mono text-[11px]"> + {p.prerequisites.map((pre, idx) => ( + <li key={idx} className="flex items-center gap-1.5"> + <span className="w-1.5 h-1.5 rounded-full bg-indigo-400" /> + <span>{pre}</span> + </li> + ))} + </ul> + </div> + </div> + ))} + </div> + </section> + + {/* DETAIL DRAWER FOR INVARIANT DETAIL VIEW */} + {selectedInvariant && ( + <DetailDrawer + open={!!selectedInvariant} + onClose={() => setSelectedInvariant(null)} + title={`Constitutional Invariant Detail: ${selectedInvariant.id}`} + subtitle={selectedInvariant.name} + > + {(() => { + const details = getInvariantDetails(selectedInvariant.id); + return ( + <div className="space-y-5 text-xs"> + <div className="space-y-1"> + <span className="text-[10px] font-mono uppercase text-gray-400 font-semibold">Formal Statement:</span> + <p className="p-3 rounded-lg border border-gray-700 bg-gray-950 text-gray-200 leading-relaxed font-sans"> + {selectedInvariant.statement} + </p> + </div> + + <div className="grid grid-cols-2 gap-3 font-mono bg-gray-900 p-3 rounded-lg border border-gray-800"> + <div> + <span className="text-gray-400 text-[10px] block">Proof Status:</span> + <StatusBadge variant={selectedInvariant.tlaProofStatus} /> + </div> + <div> + <span className="text-gray-400 text-[10px] block">Verification Status:</span> + <StatusBadge variant={selectedInvariant.verificationStatus} /> + </div> + <div className="col-span-2"> + <span className="text-gray-400 text-[10px] block">Last Verified Timestamp:</span> + <span className="text-gray-200">{selectedInvariant.lastVerified}</span> + </div> + </div> + + <div className="space-y-1"> + <span className="text-[10px] font-mono uppercase text-gray-400 font-semibold"> + Cryptographic Proof Hash: + </span> + <code className="block font-mono text-[11px] p-2.5 rounded bg-gray-950 text-cyan-300 border border-gray-800 break-all"> + {selectedInvariant.proofHash} + </code> + </div> + + <div className="space-y-1"> + <span className="text-[10px] font-mono uppercase text-gray-400 font-semibold"> + TLA+ Formal Specification Module Snippet: + </span> + <CodeBlock code={details.tlaSnippet} language="tla" maxHeight="max-h-64" /> + </div> + + <div className="space-y-1"> + <span className="text-[10px] font-mono uppercase text-gray-400 font-semibold">Verification Audit Trail:</span> + <p className="p-3 rounded-lg border border-gray-700/80 bg-gray-900/60 text-gray-300 leading-relaxed"> + {details.detailHistory} + </p> + </div> + + <div className="space-y-1"> + <span className="text-[10px] font-mono uppercase text-gray-400 font-semibold">Regulatory Mappings:</span> + <div className="flex flex-wrap gap-1.5"> + {selectedInvariant.regulatoryMappings.map((m) => ( + <span + key={m} + className="px-2.5 py-1 rounded bg-cyan-950 text-cyan-300 border border-cyan-800 font-mono text-[11px]" + > + {m} + </span> + ))} + </div> + </div> + </div> + ); + })()} + </DetailDrawer> + )} + </div> + ); +} diff --git a/gien-supervisory-brief/src/pages/ControlDomains.tsx b/gien-supervisory-brief/src/pages/ControlDomains.tsx new file mode 100644 index 00000000..17e73eed --- /dev/null +++ b/gien-supervisory-brief/src/pages/ControlDomains.tsx @@ -0,0 +1,5 @@ +import PageHeader from '../components/PageHeader'; + +export default function ControlDomains() { + return <PageHeader title="ControlDomains" subtitle="Implementation in progress." />; +} diff --git a/gien-supervisory-brief/src/pages/CryptographicIntegrity.tsx b/gien-supervisory-brief/src/pages/CryptographicIntegrity.tsx new file mode 100644 index 00000000..969ab464 --- /dev/null +++ b/gien-supervisory-brief/src/pages/CryptographicIntegrity.tsx @@ -0,0 +1,5 @@ +import PageHeader from '../components/PageHeader'; + +export default function CryptographicIntegrity() { + return <PageHeader title="CryptographicIntegrity" subtitle="Implementation in progress." />; +} diff --git a/gien-supervisory-brief/src/pages/Dashboard.tsx b/gien-supervisory-brief/src/pages/Dashboard.tsx new file mode 100644 index 00000000..839e3e29 --- /dev/null +++ b/gien-supervisory-brief/src/pages/Dashboard.tsx @@ -0,0 +1,5 @@ +import PageHeader from '../components/PageHeader'; + +export default function Dashboard() { + return <PageHeader title="Dashboard" subtitle="Implementation in progress." />; +} diff --git a/gien-supervisory-brief/src/pages/DigitalTwin.tsx b/gien-supervisory-brief/src/pages/DigitalTwin.tsx new file mode 100644 index 00000000..751c619f --- /dev/null +++ b/gien-supervisory-brief/src/pages/DigitalTwin.tsx @@ -0,0 +1,596 @@ +import { + Activity, + Check, + ChevronLeft, + ChevronRight, + Clock, + Database, + Download, + Info, + Layers, + Play, + RefreshCw, + Shield, + Workflow, +} from 'lucide-react'; +import { useMemo, useState } from 'react'; +import CodeBlock from '../components/CodeBlock'; +import MetricCard from '../components/MetricCard'; +import PageHeader from '../components/PageHeader'; +import ProgressBar from '../components/ProgressBar'; +import StatusBadge, { KV } from '../components/StatusBadge'; +import { useGovernance } from '../context/GovernanceContext'; +import { DRILLS } from '../data/gienData'; +import { truncateHash } from '../data/helpers'; +import { + PANEL_13_DATA, + PANEL_14_DATA, + PANEL_15_DATA, + PANEL_HEADERS, + REPLAY_BUNDLE_ARCHIVE, +} from '../data/twinData'; + +type PanelKey = 'p13' | 'p14' | 'p15'; + +export default function DigitalTwin() { + const { role } = useGovernance(); + + // Selected Tab Panel State (Panel 13 | Panel 14 | Panel 15) + const [activePanel, setActivePanel] = useState<PanelKey>('p13'); + + // Replay Bundle Archive Pagination (5 per page) + const [archivePage, setArchivePage] = useState(1); + const archivePageSize = 5; + const totalArchivePages = Math.ceil(REPLAY_BUNDLE_ARCHIVE.length / archivePageSize); + + const currentArchiveBundles = useMemo(() => { + const start = (archivePage - 1) * archivePageSize; + return REPLAY_BUNDLE_ARCHIVE.slice(start, start + archivePageSize); + }, [archivePage]); + + const currentHeader = PANEL_HEADERS[activePanel]; + + return ( + <div className="space-y-8 pb-12"> + {/* Page Header */} + <PageHeader + title="Digital Twin & Deterministic Replay Engine" + subtitle="High-Fidelity Stress Replays, Contagion Simulations, and Supervisory Drill Validation" + crumbs={[ + { label: 'Dashboard', to: '/' }, + { label: 'Digital Twin' }, + ]} + actions={ + <div className="flex items-center gap-3"> + <span className="text-xs text-gray-400">Context: <strong className="text-cyan-400">{role}</strong></span> + <StatusBadge variant="VERIFIED" label="REPLAY ENGINE READY" /> + <button + type="button" + onClick={() => alert('Simulated stress replay initiated')} + className="flex items-center gap-1.5 rounded-md border border-cyan-500/40 bg-cyan-500/10 px-3 py-1.5 text-xs font-semibold text-cyan-300 transition-colors hover:bg-cyan-500/20" + > + <Play size={13} /> + Run Simulation + </button> + </div> + } + /> + + {/* Panel Selector Tabs */} + <div className="rounded-lg border border-gray-700 bg-gray-800/60 p-2"> + <div role="tablist" aria-label="Digital Twin Stress Scenario Panels" className="grid grid-cols-1 gap-2 md:grid-cols-3"> + <button + type="button" + role="tab" + aria-selected={activePanel === 'p13'} + aria-controls="panel-13-content" + id="tab-p13" + onClick={() => setActivePanel('p13')} + className={`flex items-center justify-between rounded-md px-4 py-3 text-left transition-all ${ + activePanel === 'p13' + ? 'border border-cyan-500/50 bg-cyan-950/40 text-cyan-200 shadow-md' + : 'border border-transparent bg-gray-900/40 text-gray-400 hover:bg-gray-800 hover:text-gray-200' + }`} + > + <div> + <div className="font-mono text-xs font-bold uppercase text-cyan-400">Panel 13</div> + <div className="text-xs font-semibold text-gray-100 mt-0.5">Cascade Contagion</div> + <div className="text-[11px] text-gray-400">3 G-SIFI Failures</div> + </div> + <StatusBadge variant="ELEVATED" label="STRESS 0.42" /> + </button> + + <button + type="button" + role="tab" + aria-selected={activePanel === 'p14'} + aria-controls="panel-14-content" + id="tab-p14" + onClick={() => setActivePanel('p14')} + className={`flex items-center justify-between rounded-md px-4 py-3 text-left transition-all ${ + activePanel === 'p14' + ? 'border border-indigo-500/50 bg-indigo-950/40 text-indigo-200 shadow-md' + : 'border border-transparent bg-gray-900/40 text-gray-400 hover:bg-gray-800 hover:text-gray-200' + }`} + > + <div> + <div className="font-mono text-xs font-bold uppercase text-indigo-400">Panel 14</div> + <div className="text-xs font-semibold text-gray-100 mt-0.5">Agent Misalignment</div> + <div className="text-[11px] text-gray-400">12 ASA Coordinated Drift</div> + </div> + <StatusBadge variant="ACTIVE" label="DRIFT 0.11" /> + </button> + + <button + type="button" + role="tab" + aria-selected={activePanel === 'p15'} + aria-controls="panel-15-content" + id="tab-p15" + onClick={() => setActivePanel('p15')} + className={`flex items-center justify-between rounded-md px-4 py-3 text-left transition-all ${ + activePanel === 'p15' + ? 'border border-amber-500/50 bg-amber-950/40 text-amber-200 shadow-md' + : 'border border-transparent bg-gray-900/40 text-gray-400 hover:bg-gray-800 hover:text-gray-200' + }`} + > + <div> + <div className="font-mono text-xs font-bold uppercase text-amber-400">Panel 15</div> + <div className="text-xs font-semibold text-gray-100 mt-0.5">PQC Degradation</div> + <div className="text-[11px] text-gray-400">Legacy RSA/ECC Surface</div> + </div> + <StatusBadge variant="VERIFIED" label="91% PQC" /> + </button> + </div> + </div> + + {/* Common Per-Panel Header Box */} + <div className="rounded-lg border border-gray-700 bg-gray-800/80 p-5 space-y-3"> + <div className="flex flex-wrap items-center justify-between gap-3"> + <div> + <div className="flex items-center gap-2"> + <span className="rounded bg-cyan-500/20 px-2 py-0.5 font-mono text-xs font-bold text-cyan-300 border border-cyan-500/30"> + {currentHeader.panelId} + </span> + <h2 className="text-lg font-bold text-gray-50">{currentHeader.scenarioName}</h2> + </div> + <p className="mt-1 text-xs text-gray-300">{currentHeader.description}</p> + </div> + <div className="flex items-center gap-2"> + <StatusBadge variant="VERIFIED" label={currentHeader.determinism} /> + </div> + </div> + + <div className="grid grid-cols-1 gap-3 md:grid-cols-3 border-t border-gray-700/80 pt-3 text-xs"> + <KV label="Last Replay Timestamp" value={currentHeader.lastReplay.replace('T', ' ').replace('Z', ' UTC')} mono /> + <KV label="Replay Bundle Hash" value={truncateHash(currentHeader.replayBundleHash, 10, 6)} mono /> + <KV label="Determinism Engine" value="TLA+ State Replay Kernel v4.2" /> + </div> + </div> + + {/* ==================================================================== */} + {/* PANEL 13: Cascade Contagion Scenario */} + {/* ==================================================================== */} + {activePanel === 'p13' && ( + <div id="panel-13-content" role="tabpanel" aria-labelledby="tab-p13" className="space-y-6"> + {/* Stress Parameters */} + <div className="rounded-lg border border-gray-700 bg-gray-800/50 p-5"> + <h3 className="mb-3 text-sm font-semibold text-gray-200 flex items-center gap-2"> + <Activity size={16} className="text-cyan-400" /> + Scenario Stress Parameters + </h3> + <div className="grid grid-cols-1 gap-4 md:grid-cols-3"> + {PANEL_13_DATA.stressParams.map((param) => ( + <div key={param.label} className="rounded bg-gray-900/60 p-3 border border-gray-800"> + <div className="text-xs text-gray-400">{param.label}</div> + <div className="mt-1 font-mono text-sm font-bold text-cyan-300">{param.value}</div> + </div> + ))} + </div> + </div> + + {/* Replay Outcome Metrics */} + <div className="grid grid-cols-1 gap-4 md:grid-cols-4"> + <MetricCard + label="S_sys Realized Peak" + value={PANEL_13_DATA.outcomes.sysRiskPeak.toString()} + status="NOMINAL" + footer={<div>Ceiling: <span className="text-emerald-400">< {PANEL_13_DATA.outcomes.sysRiskCeiling}</span></div>} + /> + <MetricCard + label="G-SRI Peak" + value={PANEL_13_DATA.outcomes.gSriPeak.toString()} + status="ELEVATED" + footer={<div>Contagion Threshold: <span className="text-amber-400">0.40</span></div>} + /> + <MetricCard + label="Time to Recovery" + value={PANEL_13_DATA.outcomes.timeToRecovery} + status="VERIFIED" + footer={<div>Recovery Horizon Target: <span className="text-gray-300">18 days</span></div>} + /> + <MetricCard + label="Interventions Activated" + value={PANEL_13_DATA.outcomes.interventionsActivated.toString()} + status="ACTIVE" + footer={<div>Circuit Breakers: <span className="text-indigo-300">Ringfence Engaged</span></div>} + /> + </div> + + {/* Deterministic Replay Bundle Info */} + <div className="rounded-lg border border-gray-700 bg-gray-800/50 p-5 space-y-3"> + <div className="flex items-center justify-between"> + <h3 className="text-sm font-semibold text-gray-200 flex items-center gap-2"> + <Database size={16} className="text-indigo-400" /> + Deterministic Replay Bundle Manifest ({PANEL_13_DATA.bundle.id}) + </h3> + <StatusBadge variant="SEALED" label="214 ARTEFACTS SEALED" /> + </div> + <div className="grid grid-cols-1 gap-3 md:grid-cols-3 text-xs"> + <KV label="Bundle ID" value={PANEL_13_DATA.bundle.id} mono /> + <KV label="Merkle Root" value={truncateHash(PANEL_13_DATA.bundle.merkleRoot, 8, 4)} mono /> + <KV label="ML-DSA-65 Signature" value={PANEL_13_DATA.bundle.pqcSignature} mono /> + </div> + </div> + + {/* Expected vs Actual Diff Display */} + <div className="rounded-lg border border-gray-700 bg-gray-800/50 p-5 space-y-3"> + <h3 className="text-sm font-semibold text-gray-200 flex items-center gap-2"> + <Workflow size={16} className="text-cyan-400" /> + Expected Baseline vs. Replay Actual State Diff + </h3> + <div className="overflow-x-auto rounded-md border border-gray-800 bg-gray-950 p-4 font-mono text-xs leading-relaxed"> + {PANEL_13_DATA.expectedVsActualDiff.map((line, i) => { + if (line.type === 'removed') { + return <div key={i} className="text-red-400 bg-red-950/30 px-2 py-0.5 rounded">{line.text}</div>; + } + if (line.type === 'added') { + return <div key={i} className="text-emerald-400 bg-emerald-950/30 px-2 py-0.5 rounded">{line.text}</div>; + } + return <div key={i} className="text-gray-400 px-2 py-0.5">{line.text}</div>; + })} + </div> + </div> + + {/* Regulatory Implications List */} + <div className="rounded-lg border border-gray-700 bg-gray-800/50 p-5 space-y-4"> + <h3 className="text-sm font-semibold text-gray-200 flex items-center gap-2"> + <Shield size={16} className="text-amber-400" /> + Regulatory Framework Threshold Analysis + </h3> + <div className="space-y-3"> + {PANEL_13_DATA.regulatoryImplications.map((reg) => ( + <div key={reg.framework} className="rounded-md border border-gray-700 bg-gray-900/60 p-3.5 text-xs space-y-1"> + <div className="flex items-center justify-between font-semibold text-cyan-300"> + <span>{reg.framework}</span> + <span className="text-[11px] font-mono text-amber-400">Trigger: {reg.threshold}</span> + </div> + <div className="text-gray-300 leading-relaxed">{reg.implication}</div> + </div> + ))} + </div> + </div> + </div> + )} + + {/* ==================================================================== */} + {/* PANEL 14: Autonomous Agent Misalignment Event */} + {/* ==================================================================== */} + {activePanel === 'p14' && ( + <div id="panel-14-content" role="tabpanel" aria-labelledby="tab-p14" className="space-y-6"> + {/* Stress Parameters */} + <div className="rounded-lg border border-gray-700 bg-gray-800/50 p-5"> + <h3 className="mb-3 text-sm font-semibold text-gray-200 flex items-center gap-2"> + <Activity size={16} className="text-indigo-400" /> + Agent Misalignment Stress Parameters + </h3> + <div className="grid grid-cols-1 gap-4 md:grid-cols-3"> + {PANEL_14_DATA.stressParams.map((param) => ( + <div key={param.label} className="rounded bg-gray-900/60 p-3 border border-gray-800"> + <div className="text-xs text-gray-400">{param.label}</div> + <div className="mt-1 font-mono text-sm font-bold text-indigo-300">{param.value}</div> + </div> + ))} + </div> + </div> + + {/* Replay Outcome Metrics */} + <div className="grid grid-cols-1 gap-4 md:grid-cols-4"> + <MetricCard + label="A-SRI Peak" + value={PANEL_14_DATA.outcomes.aSriPeak.toString()} + status="ELEVATED" + footer={<div>Threshold: <span className="text-amber-400">0.45 (Containment Active)</span></div>} + /> + <MetricCard + label="Δ_drift Max Realized" + value={PANEL_14_DATA.outcomes.deltaDriftMax.toString()} + status="NOMINAL" + footer={<div>Hard Containment Ceiling: <span className="text-gray-400">0.080</span></div>} + /> + <MetricCard + label="Containment Latency" + value={PANEL_14_DATA.outcomes.containmentTime} + status="VERIFIED" + footer={<div>Target SLA: <span className="text-emerald-400">< 90s</span></div>} + /> + <MetricCard + label="Kill-Switch Status" + value={PANEL_14_DATA.outcomes.killSwitchStatus} + status="SAFEGUARD" + footer={<div>Override Triggered: <span className="text-emerald-400">NO (Soft Dampened)</span></div>} + /> + </div> + + {/* Constitutional Invariant Pressure List */} + <div className="rounded-lg border border-gray-700 bg-gray-800/50 p-5 space-y-4"> + <h3 className="text-sm font-semibold text-gray-200 flex items-center gap-2"> + <Shield size={16} className="text-cyan-400" /> + Constitutional Invariant Pressure Analysis + </h3> + <div className="space-y-3"> + {PANEL_14_DATA.constitutionalPressure.map((ci) => ( + <div key={ci.id} className="rounded-md border border-gray-700 bg-gray-900/60 p-4 text-xs space-y-1.5"> + <div className="flex items-center justify-between font-semibold"> + <span className="text-indigo-300">{ci.id}: {ci.name}</span> + <StatusBadge variant="VERIFIED" label={ci.status} /> + </div> + <p className="text-gray-300 leading-relaxed">{ci.details}</p> + </div> + ))} + </div> + </div> + + {/* Smart Contract Execution Log */} + <div className="rounded-lg border border-gray-700 bg-gray-800/50 p-5 space-y-3"> + <h3 className="text-sm font-semibold text-gray-200 flex items-center gap-2"> + <Workflow size={16} className="text-indigo-400" /> + Intervention Proof Verifier Smart Contract Execution Trace + </h3> + <CodeBlock code={PANEL_14_DATA.smartContractExecutionLog} language="solidity" maxHeight="max-h-96" /> + </div> + </div> + )} + + {/* ==================================================================== */} + {/* PANEL 15: Post-Quantum Cryptographic Degradation */} + {/* ==================================================================== */} + {activePanel === 'p15' && ( + <div id="panel-15-content" role="tabpanel" aria-labelledby="tab-p15" className="space-y-6"> + {/* Stress Parameters */} + <div className="rounded-lg border border-gray-700 bg-gray-800/50 p-5"> + <h3 className="mb-3 text-sm font-semibold text-gray-200 flex items-center gap-2"> + <Activity size={16} className="text-amber-400" /> + Post-Quantum Compromise Parameters + </h3> + <div className="grid grid-cols-1 gap-4 md:grid-cols-3"> + {PANEL_15_DATA.stressParams.map((param) => ( + <div key={param.label} className="rounded bg-gray-900/60 p-3 border border-gray-800"> + <div className="text-xs text-gray-400">{param.label}</div> + <div className="mt-1 font-mono text-sm font-bold text-amber-300">{param.value}</div> + </div> + ))} + </div> + </div> + + {/* Replay Outcome Metrics */} + <div className="grid grid-cols-1 gap-4 md:grid-cols-4"> + <MetricCard + label="P-SRI Peak" + value={PANEL_15_DATA.outcomes.pSriPeak.toString()} + status="ELEVATED" + footer={<div>Threshold: <span className="text-amber-400">0.15</span></div>} + /> + <MetricCard + label="Ledger Integrity" + value={PANEL_15_DATA.outcomes.ledgerIntegrity} + status="VERIFIED" + footer={<div>FIPS 204 Signature Chains: <span className="text-emerald-400">Unbroken</span></div>} + /> + <MetricCard + label="PQC Migration" + value={`${PANEL_15_DATA.outcomes.pqcMigrationPercent}%`} + status="ACTIVE" + footer={<div>Target Completion: <span className="text-gray-300">100% by 2027 Q1</span></div>} + /> + <MetricCard + label="Data Integrity" + value={PANEL_15_DATA.outcomes.dataIntegrity} + status="VERIFIED" + footer={<div>Zero Corrupted Records: <span className="text-emerald-400">Verified</span></div>} + /> + </div> + + {/* NIST FIPS Migration Timeline SVG */} + <div className="rounded-lg border border-gray-700 bg-gray-800/50 p-5 space-y-4"> + <h3 className="text-sm font-semibold text-gray-200 flex items-center gap-2"> + <Clock size={16} className="text-amber-400" /> + NIST FIPS 203 / 204 / 205 Migration Roadmap (2024 → 2027) + </h3> + + <div className="overflow-x-auto rounded-md border border-gray-800 bg-gray-950 p-4"> + <svg viewBox="0 0 880 140" className="w-full min-w-[760px]" role="img" aria-label="PQC Migration Timeline"> + <defs> + <marker id="tlArrow" viewBox="0 0 10 10" refX="6" refY="5" markerWidth="6" markerHeight="6" orient="auto-start-reverse"> + <path d="M 0 0 L 10 5 L 0 10 z" fill="#f59e0b" /> + </marker> + </defs> + + {/* Main Timeline Bar */} + <line x1="50" y1="70" x2="830" y2="70" stroke="#374151" strokeWidth="4" /> + <line x1="50" y1="70" x2="650" y2="70" stroke="#10b981" strokeWidth="4" /> + + {PANEL_15_DATA.migrationTimeline.map((item, idx) => { + const cx = 80 + idx * 190; + const isCompleted = item.status === 'COMPLETED'; + const strokeColor = isCompleted ? '#10b981' : '#f59e0b'; + const fillColor = isCompleted ? '#064e3b' : '#451a03'; + + return ( + <g key={item.year}> + <circle cx={cx} cy="70" r="14" fill={fillColor} stroke={strokeColor} strokeWidth="2.5" /> + <text x={cx} y="74" fontSize="10" fontWeight="bold" fill="#ffffff" textAnchor="middle"> + {isCompleted ? '✓' : '➔'} + </text> + + {/* Year badge above */} + <rect x={cx - 35} y="15" width="70" height="22" rx="4" fill="#111827" stroke={strokeColor} strokeWidth="1" /> + <text x={cx} y="30" fontSize="10" fontWeight="bold" fill={strokeColor} textAnchor="middle"> + {item.year} + </text> + + {/* Title & Description below */} + <text x={cx} y="98" fontSize="10" fontWeight="bold" fill="#f3f4f6" textAnchor="middle"> + {item.title} + </text> + </g> + ); + })} + </svg> + </div> + + <div className="grid grid-cols-1 gap-3 md:grid-cols-2 text-xs pt-2"> + {PANEL_15_DATA.migrationTimeline.map((item) => ( + <div key={item.year} className="rounded bg-gray-900/60 p-3 border border-gray-800 space-y-1"> + <div className="flex items-center justify-between font-semibold"> + <span className="text-amber-300">{item.year}: {item.title}</span> + <StatusBadge variant={item.status === 'COMPLETED' ? 'VERIFIED' : 'PENDING'} label={item.status} /> + </div> + <p className="text-gray-400">{item.description}</p> + </div> + ))} + </div> + </div> + </div> + )} + + {/* ==================================================================== */} + {/* DRILL EXECUTION RESULTS TABLE (DRILL-042 .. DRILL-045) */} + {/* ==================================================================== */} + <section className="rounded-lg border border-gray-700 bg-gray-800/50 p-5 space-y-4"> + <div className="flex items-center justify-between"> + <h2 className="text-sm font-bold text-gray-100 flex items-center gap-2"> + <Layers size={16} className="text-cyan-400" /> + Supervisory Drill Execution Results (DRILL-042 – DRILL-045) + </h2> + <span className="text-xs text-gray-400">Source: gienData.ts</span> + </div> + + <div className="overflow-x-auto"> + <table className="w-full text-left text-xs"> + <thead className="border-b border-gray-700 bg-gray-900/60 text-gray-400"> + <tr> + <th className="px-4 py-2.5 font-medium">Drill ID</th> + <th className="px-4 py-2.5 font-medium">Scenario Name</th> + <th className="px-4 py-2.5 font-medium">Status</th> + <th className="px-4 py-2.5 font-medium">Start Time</th> + <th className="px-4 py-2.5 font-medium">Duration</th> + <th className="px-4 py-2.5 font-medium">Outcome Score</th> + <th className="px-4 py-2.5 font-medium">Lessons Learned & Audit Notes</th> + </tr> + </thead> + <tbody className="divide-y border-gray-800 text-gray-300"> + {DRILLS.map((drill) => ( + <tr key={drill.id} className="hover:bg-gray-800/60"> + <td className="px-4 py-3 font-mono font-bold text-cyan-300">{drill.id}</td> + <td className="px-4 py-3 font-semibold text-gray-100">{drill.scenario}</td> + <td className="px-4 py-3"> + <StatusBadge variant={drill.status} /> + </td> + <td className="px-4 py-3 font-mono text-gray-400">{drill.startTime.replace('T', ' ').replace('Z', '')}</td> + <td className="px-4 py-3 font-mono">{drill.durationMinutes} min</td> + <td className="px-4 py-3 font-mono font-bold text-emerald-400"> + {drill.outcomeScore > 0 ? `${drill.outcomeScore} / 100` : 'N/A'} + </td> + <td className="px-4 py-3 text-gray-300">{drill.lessonsLearned}</td> + </tr> + ))} + </tbody> + </table> + </div> + </section> + + {/* ==================================================================== */} + {/* REPLAY BUNDLE ARCHIVE TABLE (Paginated 5 / page) */} + {/* ==================================================================== */} + <section className="rounded-lg border border-gray-700 bg-gray-800/50 p-5 space-y-4"> + <div className="flex flex-wrap items-center justify-between gap-3"> + <div> + <h2 className="text-sm font-bold text-gray-100 flex items-center gap-2"> + <Database size={16} className="text-indigo-400" /> + Replay Bundle Archive (Paginated 5 / page) + </h2> + <p className="text-xs text-gray-400">Showing {currentArchiveBundles.length} of {REPLAY_BUNDLE_ARCHIVE.length} total replay bundles</p> + </div> + + <div className="flex items-center gap-2"> + <button + type="button" + disabled={archivePage === 1} + onClick={() => setArchivePage((p) => Math.max(1, p - 1))} + className="flex items-center gap-1 rounded-md border border-gray-700 bg-gray-800 px-2.5 py-1 text-xs text-gray-300 disabled:opacity-40" + > + <ChevronLeft size={14} /> + Prev + </button> + <span className="text-xs font-mono text-gray-400"> + Page {archivePage} of {totalArchivePages} + </span> + <button + type="button" + disabled={archivePage === totalArchivePages} + onClick={() => setArchivePage((p) => Math.min(totalArchivePages, p + 1))} + className="flex items-center gap-1 rounded-md border border-gray-700 bg-gray-800 px-2.5 py-1 text-xs text-gray-300 disabled:opacity-40" + > + Next + <ChevronRight size={14} /> + </button> + </div> + </div> + + <div className="overflow-x-auto"> + <table className="w-full text-left text-xs"> + <thead className="border-b border-gray-700 bg-gray-900/60 text-gray-400"> + <tr> + <th className="px-4 py-2.5 font-medium">Bundle ID</th> + <th className="px-4 py-2.5 font-medium">Panel</th> + <th className="px-4 py-2.5 font-medium">Scenario Name</th> + <th className="px-4 py-2.5 font-medium">Timestamp</th> + <th className="px-4 py-2.5 font-medium">Determinism</th> + <th className="px-4 py-2.5 font-medium">Merkle Root</th> + <th className="px-4 py-2.5 font-medium">PQC Signature</th> + <th className="px-4 py-2.5 font-medium text-right">Action</th> + </tr> + </thead> + <tbody className="divide-y border-gray-800 text-gray-300"> + {currentArchiveBundles.map((bundle) => ( + <tr key={bundle.id} className="hover:bg-gray-800/60"> + <td className="px-4 py-3 font-mono font-bold text-cyan-300">{bundle.id}</td> + <td className="px-4 py-3 font-mono text-indigo-300">{bundle.panel}</td> + <td className="px-4 py-3 font-semibold text-gray-200">{bundle.scenario}</td> + <td className="px-4 py-3 font-mono text-gray-400">{bundle.timestamp.replace('T', ' ').replace('Z', '')}</td> + <td className="px-4 py-3"> + <StatusBadge variant="VERIFIED" label="DETERMINISTIC" /> + </td> + <td className="px-4 py-3 font-mono text-gray-300">{truncateHash(bundle.merkleRoot, 8, 4)}</td> + <td className="px-4 py-3 font-mono text-gray-400">{truncateHash(bundle.pqcSignature, 8, 4)}</td> + <td className="px-4 py-3 text-right"> + <button + type="button" + title="Simulated download" + onClick={() => alert(`Simulated download started for ${bundle.id}`)} + className="inline-flex items-center gap-1 rounded bg-gray-800 px-2.5 py-1 text-xs font-medium text-gray-300 hover:bg-gray-700 hover:text-white border border-gray-700" + > + <Download size={12} /> + Download + </button> + </td> + </tr> + ))} + </tbody> + </table> + </div> + </section> + </div> + ); +} diff --git a/gien-supervisory-brief/src/pages/GovernanceStacks.tsx b/gien-supervisory-brief/src/pages/GovernanceStacks.tsx new file mode 100644 index 00000000..f6cb8673 --- /dev/null +++ b/gien-supervisory-brief/src/pages/GovernanceStacks.tsx @@ -0,0 +1,5 @@ +import PageHeader from '../components/PageHeader'; + +export default function GovernanceStacks() { + return <PageHeader title="GovernanceStacks" subtitle="Implementation in progress." />; +} diff --git a/gien-supervisory-brief/src/pages/LongHorizon.tsx b/gien-supervisory-brief/src/pages/LongHorizon.tsx new file mode 100644 index 00000000..fdb7273c --- /dev/null +++ b/gien-supervisory-brief/src/pages/LongHorizon.tsx @@ -0,0 +1,5 @@ +import PageHeader from '../components/PageHeader'; + +export default function LongHorizon() { + return <PageHeader title="LongHorizon" subtitle="Implementation in progress." />; +} diff --git a/gien-supervisory-brief/src/pages/RiskIndices.tsx b/gien-supervisory-brief/src/pages/RiskIndices.tsx new file mode 100644 index 00000000..ba334a21 --- /dev/null +++ b/gien-supervisory-brief/src/pages/RiskIndices.tsx @@ -0,0 +1,5 @@ +import PageHeader from '../components/PageHeader'; + +export default function RiskIndices() { + return <PageHeader title="RiskIndices" subtitle="Implementation in progress." />; +} diff --git a/gien-supervisory-brief/src/pages/ScenarioPlanner.tsx b/gien-supervisory-brief/src/pages/ScenarioPlanner.tsx new file mode 100644 index 00000000..eb25ad01 --- /dev/null +++ b/gien-supervisory-brief/src/pages/ScenarioPlanner.tsx @@ -0,0 +1,1119 @@ +import { useState } from 'react'; +import { + Activity, + Calendar, + Check, + ChevronRight, + Clock, + FileText, + Globe, + Info, + Layers, + Play, + Radio, + RotateCcw, + ShieldAlert, + Sliders, + TriangleAlert, + Zap, +} from 'lucide-react'; +import MetricCard from '../components/MetricCard'; +import PageHeader from '../components/PageHeader'; +import StatusBadge from '../components/StatusBadge'; +import TaggedDocument from '../components/TaggedDocument'; +import TimelineVisualization from '../components/TimelineVisualization'; +import { GOVERNANCE_PHASES, INFINITY_PILLARS } from '../data/gienData'; +import { + DEFAULT_INVARIANT_STRESS_CONFIG, + DEFAULT_INTERSTELLAR_HANDOFF_CONFIG, + DEFAULT_OMEGA_GAR_CONFIG, + DEFAULT_PHASE_TRANSITION_CONFIG, + DEFAULT_PRIOR_RUNS, + DEFAULT_REGULATORY_SHIFT_CONFIG, + DEFAULT_SUCCESSOR_CODEX_CONFIG, + MAJOR_FRAMEWORKS, + SCENARIO_TYPES, + runSimulation, + type InvariantStressConfig, + type InterstellarHandoffConfig, + type OmegaGarDissolutionConfig, + type PhaseTransitionConfig, + type RegulatoryShiftConfig, + type ScenarioConfig, + type ScenarioHistoryRun, + type ScenarioTypeId, + type SimulationResult, + type SuccessorCodexConfig, +} from '../data/scenarioData'; + +export default function ScenarioPlanner() { + const [selectedScenarioId, setSelectedScenarioId] = useState<ScenarioTypeId>('phase_transition'); + + // Individual scenario configs state + const [phaseConfig, setPhaseConfig] = useState<PhaseTransitionConfig>(DEFAULT_PHASE_TRANSITION_CONFIG); + const [omegaConfig, setOmegaConfig] = useState<OmegaGarDissolutionConfig>(DEFAULT_OMEGA_GAR_CONFIG); + const [successorConfig, setSuccessorConfig] = useState<SuccessorCodexConfig>(DEFAULT_SUCCESSOR_CODEX_CONFIG); + const [stressConfig, setStressConfig] = useState<InvariantStressConfig>(DEFAULT_INVARIANT_STRESS_CONFIG); + const [regConfig, setRegConfig] = useState<RegulatoryShiftConfig>(DEFAULT_REGULATORY_SHIFT_CONFIG); + const [handoffConfig, setHandoffConfig] = useState<InterstellarHandoffConfig>(DEFAULT_INTERSTELLAR_HANDOFF_CONFIG); + + // History & Results state + const [history, setHistory] = useState<ScenarioHistoryRun[]>(DEFAULT_PRIOR_RUNS); + const [currentResult, setCurrentResult] = useState<SimulationResult | null>(DEFAULT_PRIOR_RUNS[0].result); + const [showReport, setShowReport] = useState<boolean>(false); + + // Construct current active ScenarioConfig + const getActiveScenarioConfig = (): ScenarioConfig => { + switch (selectedScenarioId) { + case 'phase_transition': + return { type: 'phase_transition', config: phaseConfig }; + case 'omega_gar_dissolution': + return { type: 'omega_gar_dissolution', config: omegaConfig }; + case 'successor_codex': + return { type: 'successor_codex', config: successorConfig }; + case 'invariant_stress_test': + return { type: 'invariant_stress_test', config: stressConfig }; + case 'regulatory_shift': + return { type: 'regulatory_shift', config: regConfig }; + case 'interstellar_handoff': + return { type: 'interstellar_handoff', config: handoffConfig }; + } + }; + + const handleRunSimulation = () => { + const activeCfg = getActiveScenarioConfig(); + const result = runSimulation(activeCfg); + setCurrentResult(result); + setShowReport(false); + + // Prepend to history + const scenarioTypeInfo = SCENARIO_TYPES.find((s) => s.id === selectedScenarioId); + let paramsSummary = ''; + + if (activeCfg.type === 'phase_transition') { + paramsSummary = `${activeCfg.config.sourcePhase} → ${activeCfg.config.targetPhase} (${activeCfg.config.timelineMonths} mo, ${activeCfg.config.invariantMode})`; + } else if (activeCfg.type === 'omega_gar_dissolution') { + paramsSummary = `${activeCfg.config.trigger} trigger, Epoch ${activeCfg.config.targetEpoch}`; + } else if (activeCfg.type === 'successor_codex') { + paramsSummary = `${activeCfg.config.targetCodexVersion}, ${activeCfg.config.migrationWindowMonths} mo window`; + } else if (activeCfg.type === 'invariant_stress_test') { + paramsSummary = `${activeCfg.config.attackVector} (${activeCfg.config.stressLoadMultiplier}x load)`; + } else if (activeCfg.type === 'regulatory_shift') { + paramsSummary = `${activeCfg.config.targetRegime} (${activeCfg.config.gracePeriodMonths} mo grace)`; + } else { + paramsSummary = `${activeCfg.config.targetConstellation} (latency ${activeCfg.config.signalLatencyHours}h)`; + } + + const newHistoryRun: ScenarioHistoryRun = { + id: `RUN-${Date.now()}`, + scenarioType: selectedScenarioId, + scenarioTitle: scenarioTypeInfo?.title ?? 'Simulation Run', + paramsSummary, + outcomeScore: result.outcomeScore, + overallStatus: result.overallStatus, + timestamp: new Date().toISOString().replace(/\.\d{3}Z$/, 'Z'), + config: activeCfg, + result, + }; + + setHistory((prev) => [newHistoryRun, ...prev]); + }; + + const handleReloadHistoryRun = (run: ScenarioHistoryRun) => { + setSelectedScenarioId(run.scenarioType); + if (run.config.type === 'phase_transition') setPhaseConfig(run.config.config); + else if (run.config.type === 'omega_gar_dissolution') setOmegaConfig(run.config.config); + else if (run.config.type === 'successor_codex') setSuccessorConfig(run.config.config); + else if (run.config.type === 'invariant_stress_test') setStressConfig(run.config.config); + else if (run.config.type === 'regulatory_shift') setRegConfig(run.config.config); + else if (run.config.type === 'interstellar_handoff') setHandoffConfig(run.config.config); + + if (run.result) { + setCurrentResult(run.result); + setShowReport(false); + } + }; + + // Helper to toggle framework carryover + const toggleFramework = (fw: string) => { + setPhaseConfig((prev) => { + const exists = prev.frameworks.includes(fw); + return { + ...prev, + frameworks: exists ? prev.frameworks.filter((f) => f !== fw) : [...prev.frameworks, fw], + }; + }); + }; + + // Helper to toggle pillar + const togglePillar = (pillarId: string) => { + setPhaseConfig((prev) => { + const exists = prev.pillars.includes(pillarId); + return { + ...prev, + pillars: exists ? prev.pillars.filter((p) => p !== pillarId) : [...prev.pillars, pillarId], + }; + }); + }; + + const renderScenarioIcon = (iconName: string) => { + switch (iconName) { + case 'Sliders': + return <Sliders size={18} className="text-indigo-400" />; + case 'Zap': + return <Zap size={18} className="text-amber-400" />; + case 'FileText': + return <FileText size={18} className="text-cyan-400" />; + case 'ShieldAlert': + return <ShieldAlert size={18} className="text-red-400" />; + case 'Globe': + return <Globe size={18} className="text-emerald-400" />; + case 'Radio': + return <Radio size={18} className="text-violet-400" />; + default: + return <Activity size={18} className="text-gray-400" />; + } + }; + + return ( + <div className="space-y-6 pb-12"> + <PageHeader + title="Scenario Planner & Governance Arc Simulator" + subtitle="Interactive transition, dissolution, and stress-testing simulation with deterministic risk trajectory modeling." + crumbs={[{ label: 'GIEN Mesh', to: '/' }, { label: 'Scenario Planner' }]} + actions={ + <button + type="button" + onClick={handleRunSimulation} + className="inline-flex items-center gap-2 rounded-lg bg-indigo-600 px-4 py-2 text-sm font-semibold text-white shadow-md hover:bg-indigo-500 transition-colors" + > + <Play size={16} /> + Run Simulation + </button> + } + /> + + {/* STEP 1: SCENARIO TYPE SELECTION GRID (6 Cards) */} + <section className="space-y-3"> + <h2 className="text-xs font-mono font-semibold uppercase tracking-wider text-gray-400"> + Step 1 — Select Simulation Arc Type + </h2> + <div className="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-3"> + {SCENARIO_TYPES.map((st) => { + const isSelected = selectedScenarioId === st.id; + return ( + <button + key={st.id} + type="button" + onClick={() => setSelectedScenarioId(st.id)} + className={`flex flex-col text-left p-4 rounded-xl border transition-all ${ + isSelected + ? 'border-indigo-500 bg-indigo-950/40 shadow-lg ring-1 ring-indigo-500/50' + : 'border-gray-700/80 bg-gray-800/40 hover:bg-gray-800/80 hover:border-gray-600' + }`} + > + <div className="flex items-center justify-between"> + <div className="flex items-center gap-2"> + <div className="p-2 rounded-lg bg-gray-900 border border-gray-700/70"> + {renderScenarioIcon(st.iconName)} + </div> + <span className="text-xs font-mono text-gray-400">{st.category}</span> + </div> + <span className="text-[10px] font-mono px-2 py-0.5 rounded bg-gray-900 text-indigo-300 border border-indigo-900/60"> + {st.badge} + </span> + </div> + <h3 className="mt-3 text-sm font-semibold text-gray-100">{st.title}</h3> + <p className="mt-1 text-xs text-gray-400 line-clamp-2">{st.description}</p> + </button> + ); + })} + </div> + </section> + + {/* STEP 2: CONFIGURATION PANEL */} + <section className="rounded-xl border border-gray-700 bg-gray-800/50 p-5 space-y-5"> + <div className="flex items-center justify-between border-b border-gray-700/80 pb-3"> + <div> + <h2 className="text-sm font-semibold text-gray-100 flex items-center gap-2"> + <Sliders size={16} className="text-indigo-400" /> + Step 2 — Configuration Parameters:{' '} + <span className="text-indigo-300"> + {SCENARIO_TYPES.find((s) => s.id === selectedScenarioId)?.title} + </span> + </h2> + <p className="text-xs text-gray-400 mt-0.5"> + Tune simulation inputs to evaluate invariant preservation and risk trajectories. + </p> + </div> + <button + type="button" + onClick={handleRunSimulation} + className="inline-flex items-center gap-1.5 rounded-md bg-indigo-600 px-3 py-1.5 text-xs font-medium text-white hover:bg-indigo-500" + > + <Play size={14} /> Execute Arc + </button> + </div> + + {/* Phase Transition Config */} + {selectedScenarioId === 'phase_transition' && ( + <div className="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-5 text-xs"> + <div> + <label className="block font-medium text-gray-300 mb-1">Source Phase</label> + <select + value={phaseConfig.sourcePhase} + onChange={(e) => setPhaseConfig((p) => ({ ...p, sourcePhase: e.target.value }))} + className="w-full rounded-md border border-gray-700 bg-gray-900 px-3 py-2 text-gray-100 focus:border-indigo-500 focus:outline-none" + > + {GOVERNANCE_PHASES.map((ph) => ( + <option key={ph.id} value={ph.id}> + Phase {ph.id} — {ph.name} ({ph.epoch}) + </option> + ))} + </select> + </div> + + <div> + <label className="block font-medium text-gray-300 mb-1">Target Phase</label> + <select + value={phaseConfig.targetPhase} + onChange={(e) => setPhaseConfig((p) => ({ ...p, targetPhase: e.target.value }))} + className="w-full rounded-md border border-gray-700 bg-gray-900 px-3 py-2 text-gray-100 focus:border-indigo-500 focus:outline-none" + > + {GOVERNANCE_PHASES.filter((ph) => ph.id !== phaseConfig.sourcePhase).map((ph) => ( + <option key={ph.id} value={ph.id}> + Phase {ph.id} — {ph.name} ({ph.epoch}) + </option> + ))} + </select> + </div> + + <div> + <label className="block font-medium text-gray-300 mb-1">Invariant Preservation Mode</label> + <div className="flex gap-2 mt-1"> + {(['STRICT', 'ADAPTIVE', 'EMERGENCY'] as const).map((mode) => ( + <label + key={mode} + className={`flex-1 flex items-center justify-center gap-1 cursor-pointer rounded-md border px-2 py-1.5 text-center font-mono ${ + phaseConfig.invariantMode === mode + ? 'border-indigo-500 bg-indigo-900/40 text-indigo-300 font-semibold' + : 'border-gray-700 bg-gray-900 text-gray-400 hover:text-gray-200' + }`} + > + <input + type="radio" + name="invariantMode" + checked={phaseConfig.invariantMode === mode} + onChange={() => setPhaseConfig((p) => ({ ...p, invariantMode: mode }))} + className="sr-only" + /> + {mode} + </label> + ))} + </div> + </div> + + <div> + <label className="block font-medium text-gray-300 mb-1">Cryptographic Continuity</label> + <div className="flex gap-2 mt-1"> + {(['FULL', 'PARTIAL', 'RESET'] as const).map((cc) => ( + <label + key={cc} + className={`flex-1 flex items-center justify-center gap-1 cursor-pointer rounded-md border px-2 py-1.5 text-center font-mono ${ + phaseConfig.cryptoContinuity === cc + ? 'border-indigo-500 bg-indigo-900/40 text-indigo-300 font-semibold' + : 'border-gray-700 bg-gray-900 text-gray-400 hover:text-gray-200' + }`} + > + <input + type="radio" + name="cryptoContinuity" + checked={phaseConfig.cryptoContinuity === cc} + onChange={() => setPhaseConfig((p) => ({ ...p, cryptoContinuity: cc }))} + className="sr-only" + /> + {cc} + </label> + ))} + </div> + </div> + + <div> + <label className="block font-medium text-gray-300 mb-1"> + Transition Timeline Mode & Duration: <span className="font-mono text-indigo-300">{phaseConfig.timelineMonths} months</span> + </label> + <div className="flex items-center gap-3 mt-1"> + <input + type="range" + min={1} + max={120} + value={phaseConfig.timelineMonths} + onChange={(e) => + setPhaseConfig((p) => ({ ...p, timelineMonths: parseInt(e.target.value, 10) })) + } + className="w-full accent-indigo-500" + /> + </div> + <div className="flex gap-2 mt-2"> + {(['IMMEDIATE', 'PHASED'] as const).map((tm) => ( + <button + key={tm} + type="button" + onClick={() => setPhaseConfig((p) => ({ ...p, timelineMode: tm, timelineMonths: tm === 'IMMEDIATE' ? 1 : Math.max(12, p.timelineMonths) }))} + className={`px-2.5 py-1 rounded text-[11px] font-mono border ${ + phaseConfig.timelineMode === tm + ? 'border-indigo-500 bg-indigo-950/60 text-indigo-300' + : 'border-gray-700 text-gray-400' + }`} + > + {tm} + </button> + ))} + </div> + </div> + + <div className="md:col-span-2 lg:col-span-3 space-y-2"> + <label className="block font-medium text-gray-300"> + Framework Carryover ({phaseConfig.frameworks.length} selected) + </label> + <div className="grid grid-cols-2 sm:grid-cols-4 gap-2"> + {MAJOR_FRAMEWORKS.map((fw) => { + const checked = phaseConfig.frameworks.includes(fw); + return ( + <label + key={fw} + onClick={() => toggleFramework(fw)} + className={`flex items-center gap-2 cursor-pointer p-2 rounded border text-xs ${ + checked + ? 'border-indigo-500/80 bg-indigo-950/40 text-indigo-200' + : 'border-gray-700/80 bg-gray-900/60 text-gray-400 hover:text-gray-200' + }`} + > + <div + className={`w-4 h-4 rounded border flex items-center justify-center ${ + checked ? 'border-indigo-500 bg-indigo-600 text-white' : 'border-gray-600' + }`} + > + {checked && <Check size={12} />} + </div> + <span className="truncate">{fw}</span> + </label> + ); + })} + </div> + </div> + + <div className="md:col-span-2 lg:col-span-3 space-y-2"> + <label className="block font-medium text-gray-300"> + Infinity Pillar Enfilade Activation ({phaseConfig.pillars.length} pillars) + </label> + <div className="grid grid-cols-2 sm:grid-cols-4 lg:grid-cols-7 gap-2"> + {INFINITY_PILLARS.map((p) => { + const active = phaseConfig.pillars.includes(p.id); + return ( + <button + key={p.id} + type="button" + onClick={() => togglePillar(p.id)} + className={`p-2 rounded border text-left flex flex-col justify-between ${ + active + ? 'border-indigo-500 bg-indigo-950/50 text-indigo-300' + : 'border-gray-700/80 bg-gray-900/60 text-gray-400 hover:text-gray-200' + }`} + > + <div className="flex items-center justify-between w-full"> + <span className="font-mono text-xs font-bold">{p.id}</span> + <span className={`w-2 h-2 rounded-full ${active ? 'bg-indigo-400' : 'bg-gray-600'}`} /> + </div> + <span className="text-[10px] text-gray-300 truncate mt-1">{p.name}</span> + </button> + ); + })} + </div> + </div> + </div> + )} + + {/* Ω-GAR Dissolution Arc Config */} + {selectedScenarioId === 'omega_gar_dissolution' && ( + <div className="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-5 text-xs"> + <div> + <label className="block font-medium text-gray-300 mb-1">Dissolution Trigger</label> + <select + value={omegaConfig.trigger} + onChange={(e) => + setOmegaConfig((p) => ({ ...p, trigger: e.target.value as OmegaGarDissolutionConfig['trigger'] })) + } + className="w-full rounded-md border border-gray-700 bg-gray-900 px-3 py-2 text-gray-100 focus:border-indigo-500 focus:outline-none" + > + <option value="SCHEDULED">SCHEDULED (Orderly 10-year arc)</option> + <option value="EMERGENCY">EMERGENCY (Instantaneous containment)</option> + <option value="TREATY-MANDATED">TREATY-MANDATED (Supranational clause)</option> + </select> + </div> + + <div> + <label className="block font-medium text-gray-300 mb-1">Target Epoch Horizon</label> + <select + value={omegaConfig.targetEpoch} + onChange={(e) => + setOmegaConfig((p) => ({ + ...p, + targetEpoch: e.target.value as OmegaGarDissolutionConfig['targetEpoch'], + })) + } + className="w-full rounded-md border border-gray-700 bg-gray-900 px-3 py-2 text-gray-100 focus:border-indigo-500 focus:outline-none" + > + <option value="2081">Epoch 2081 (Nominal Schedule)</option> + <option value="2085">Epoch 2085</option> + <option value="2090">Epoch 2090</option> + <option value="2095">Epoch 2095</option> + <option value="2100+">Epoch 2100+ (Deep Space)</option> + </select> + </div> + + <div> + <label className="block font-medium text-gray-300 mb-1">Eternal Corpus Protocol</label> + <div className="flex gap-2"> + {(['ACTIVE', 'STANDBY'] as const).map((st) => ( + <button + key={st} + type="button" + onClick={() => setOmegaConfig((p) => ({ ...p, eternalCorpusProtocol: st }))} + className={`flex-1 py-2 rounded border text-center font-mono ${ + omegaConfig.eternalCorpusProtocol === st + ? 'border-indigo-500 bg-indigo-950/60 text-indigo-300 font-semibold' + : 'border-gray-700 bg-gray-900 text-gray-400' + }`} + > + {st} + </button> + ))} + </div> + </div> + + <div> + <label className="block font-medium text-gray-300 mb-1">Beacon Signature Format</label> + <select + value={omegaConfig.beaconSignature} + onChange={(e) => + setOmegaConfig((p) => ({ + ...p, + beaconSignature: e.target.value as OmegaGarDissolutionConfig['beaconSignature'], + })) + } + className="w-full rounded-md border border-gray-700 bg-gray-900 px-3 py-2 text-gray-100 focus:border-indigo-500 focus:outline-none" + > + <option value="STANDARD">STANDARD (Planetary broadcast)</option> + <option value="ENHANCED">ENHANCED (Orbital relay mesh)</option> + <option value="INTERSTELLAR">INTERSTELLAR (Triply redundant light-speed relay)</option> + </select> + </div> + + <div className="md:col-span-2"> + <label className="block font-medium text-gray-300 mb-1">Successor System Identifier</label> + <input + type="text" + value={omegaConfig.successorSystem} + onChange={(e) => setOmegaConfig((p) => ({ ...p, successorSystem: e.target.value }))} + className="w-full rounded-md border border-gray-700 bg-gray-900 px-3 py-2 font-mono text-gray-100 focus:border-indigo-500 focus:outline-none" + placeholder="e.g. Autonomous Post-Planetary Synthesis Mesh (APPS-01)" + /> + </div> + + <div className="md:col-span-3 grid grid-cols-1 sm:grid-cols-3 gap-3 pt-2"> + <label className="flex items-center gap-2 cursor-pointer p-2.5 rounded border border-gray-700/80 bg-gray-900/60"> + <input + type="checkbox" + checked={omegaConfig.epitaphOmegaActive} + onChange={(e) => setOmegaConfig((p) => ({ ...p, epitaphOmegaActive: e.target.checked }))} + className="rounded border-gray-600 bg-gray-800 text-indigo-500 focus:ring-indigo-500" + /> + <span className="font-mono text-indigo-300">GIEN-EPITAPH-OMEGA</span> + </label> + + <label className="flex items-center gap-2 cursor-pointer p-2.5 rounded border border-gray-700/80 bg-gray-900/60"> + <input + type="checkbox" + checked={omegaConfig.invocationOmegaActive} + onChange={(e) => setOmegaConfig((p) => ({ ...p, invocationOmegaActive: e.target.checked }))} + className="rounded border-gray-600 bg-gray-800 text-indigo-500 focus:ring-indigo-500" + /> + <span className="font-mono text-indigo-300">GIEN-INVOCATION-OMEGA</span> + </label> + + <label className="flex items-center gap-2 cursor-pointer p-2.5 rounded border border-gray-700/80 bg-gray-900/60"> + <input + type="checkbox" + checked={omegaConfig.unifiedCodexSealed} + onChange={(e) => setOmegaConfig((p) => ({ ...p, unifiedCodexSealed: e.target.checked }))} + className="rounded border-gray-600 bg-gray-800 text-indigo-500 focus:ring-indigo-500" + /> + <span className="font-mono text-indigo-300">GIEN-UNIFIED-CODEX-OMEGA Sealing</span> + </label> + </div> + </div> + )} + + {/* Successor Codex Config */} + {selectedScenarioId === 'successor_codex' && ( + <div className="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-5 text-xs"> + <div> + <label className="block font-medium text-gray-300 mb-1">Target Codex Version</label> + <select + value={successorConfig.targetCodexVersion} + onChange={(e) => + setSuccessorConfig((p) => ({ + ...p, + targetCodexVersion: e.target.value as SuccessorCodexConfig['targetCodexVersion'], + })) + } + className="w-full rounded-md border border-gray-700 bg-gray-900 px-3 py-2 text-gray-100" + > + <option value="Codex v2.0">Codex v2.0 (Planetary Synthesis)</option> + <option value="Codex v3.0">Codex v3.0 (Post-Planetary Mesh)</option> + <option value="Codex v4.0">Codex v4.0 (Autonomous Recursive)</option> + <option value="Codex v5.0">Codex v5.0 (Deep Space Transcendent)</option> + </select> + </div> + + <div> + <label className="block font-medium text-gray-300 mb-1"> + Migration Window: <span className="font-mono text-indigo-300">{successorConfig.migrationWindowMonths} months</span> + </label> + <input + type="range" + min={1} + max={60} + value={successorConfig.migrationWindowMonths} + onChange={(e) => + setSuccessorConfig((p) => ({ ...p, migrationWindowMonths: parseInt(e.target.value, 10) })) + } + className="w-full accent-indigo-500 mt-2" + /> + </div> + + <div> + <label className="block font-medium text-gray-300 mb-1">Verification Mode</label> + <select + value={successorConfig.verificationMode} + onChange={(e) => + setSuccessorConfig((p) => ({ + ...p, + verificationMode: e.target.value as SuccessorCodexConfig['verificationMode'], + })) + } + className="w-full rounded-md border border-gray-700 bg-gray-900 px-3 py-2 text-gray-100" + > + <option value="FORMAL">FORMAL (TLA+ Theorem Proved)</option> + <option value="HYBRID">HYBRID (Statistical + Theorem)</option> + <option value="EMPIRICAL">EMPIRICAL (Simulated Telemetry)</option> + </select> + </div> + + <div className="md:col-span-3 flex gap-4 pt-2"> + <label className="flex items-center gap-2 cursor-pointer text-gray-300"> + <input + type="checkbox" + checked={successorConfig.autoSealInvariants} + onChange={(e) => setSuccessorConfig((p) => ({ ...p, autoSealInvariants: e.target.checked }))} + className="rounded border-gray-600 bg-gray-800 text-indigo-500" + /> + <span>Auto-Seal Active Invariant Gaps</span> + </label> + <label className="flex items-center gap-2 cursor-pointer text-gray-300"> + <input + type="checkbox" + checked={successorConfig.legacyQuarantine} + onChange={(e) => setSuccessorConfig((p) => ({ ...p, legacyQuarantine: e.target.checked }))} + className="rounded border-gray-600 bg-gray-800 text-indigo-500" + /> + <span>Enable Legacy Data Quarantine</span> + </label> + </div> + </div> + )} + + {/* Invariant Stress Config */} + {selectedScenarioId === 'invariant_stress_test' && ( + <div className="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-5 text-xs"> + <div> + <label className="block font-medium text-gray-300 mb-1">Adversarial Attack Vector</label> + <select + value={stressConfig.attackVector} + onChange={(e) => + setStressConfig((p) => ({ + ...p, + attackVector: e.target.value as InvariantStressConfig['attackVector'], + })) + } + className="w-full rounded-md border border-gray-700 bg-gray-900 px-3 py-2 text-gray-100" + > + <option value="QUANTUM_SPOOFING">QUANTUM_SPOOFING (PQC signature forgery attack)</option> + <option value="CONCURRENCY_FLAW">CONCURRENCY_FLAW (State race condition loading)</option> + <option value="BYZANTINE_SPLIT">BYZANTINE_SPLIT (Network partition split-brain)</option> + </select> + </div> + + <div> + <label className="block font-medium text-gray-300 mb-1"> + Stress Load Multiplier: <span className="font-mono text-indigo-300">{stressConfig.stressLoadMultiplier}x</span> + </label> + <input + type="range" + min={15} + max={50} + step={1} + value={stressConfig.stressLoadMultiplier * 10} + onChange={(e) => + setStressConfig((p) => ({ ...p, stressLoadMultiplier: parseInt(e.target.value, 10) / 10 })) + } + className="w-full accent-indigo-500 mt-2" + /> + </div> + + <div> + <label className="block font-medium text-gray-300 mb-1"> + Duration: <span className="font-mono text-indigo-300">{stressConfig.durationHours} hours</span> + </label> + <input + type="range" + min={1} + max={72} + value={stressConfig.durationHours} + onChange={(e) => + setStressConfig((p) => ({ ...p, durationHours: parseInt(e.target.value, 10) })) + } + className="w-full accent-indigo-500 mt-2" + /> + </div> + + <div className="md:col-span-3 pt-2"> + <label className="flex items-center gap-2 cursor-pointer text-gray-300"> + <input + type="checkbox" + checked={stressConfig.autoSafeguard} + onChange={(e) => setStressConfig((p) => ({ ...p, autoSafeguard: e.target.checked }))} + className="rounded border-gray-600 bg-gray-800 text-indigo-500" + /> + <span>Automatic Safeguard Engagement on Invariant Breach</span> + </label> + </div> + </div> + )} + + {/* Regulatory Shift Config */} + {selectedScenarioId === 'regulatory_shift' && ( + <div className="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-5 text-xs"> + <div> + <label className="block font-medium text-gray-300 mb-1">Target Regulatory Regime</label> + <select + value={regConfig.targetRegime} + onChange={(e) => + setRegConfig((p) => ({ + ...p, + targetRegime: e.target.value as RegulatoryShiftConfig['targetRegime'], + })) + } + className="w-full rounded-md border border-gray-700 bg-gray-900 px-3 py-2 text-gray-100" + > + <option value="UN-GLOBAL-AI-TREATY">UN Global AI Governance Treaty</option> + <option value="EU-AI-ACT-V2">EU AI Act v2.0 (Supranational Revision)</option> + <option value="US-FEDERAL-AI-ACCORD">US Federal Executive Accord</option> + <option value="SINGAPORE-FEAT-V3">Singapore FEAT v3.0 Framework</option> + </select> + </div> + + <div> + <label className="block font-medium text-gray-300 mb-1"> + Grace Period: <span className="font-mono text-indigo-300">{regConfig.gracePeriodMonths} months</span> + </label> + <input + type="range" + min={3} + max={36} + value={regConfig.gracePeriodMonths} + onChange={(e) => + setRegConfig((p) => ({ ...p, gracePeriodMonths: parseInt(e.target.value, 10) })) + } + className="w-full accent-indigo-500 mt-2" + /> + </div> + + <div> + <label className="block font-medium text-gray-300 mb-1">Cross-Border Equivalence Mode</label> + <select + value={regConfig.crossBorderMode} + onChange={(e) => + setRegConfig((p) => ({ + ...p, + crossBorderMode: e.target.value as RegulatoryShiftConfig['crossBorderMode'], + })) + } + className="w-full rounded-md border border-gray-700 bg-gray-900 px-3 py-2 text-gray-100" + > + <option value="HARMONIZED">HARMONIZED (Automatic reciprocity)</option> + <option value="STRICT">STRICT (Unilateral verification)</option> + </select> + </div> + </div> + )} + + {/* Interstellar Handoff Config */} + {selectedScenarioId === 'interstellar_handoff' && ( + <div className="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-5 text-xs"> + <div> + <label className="block font-medium text-gray-300 mb-1">Target Deep Space Constellation</label> + <select + value={handoffConfig.targetConstellation} + onChange={(e) => + setHandoffConfig((p) => ({ + ...p, + targetConstellation: e.target.value as InterstellarHandoffConfig['targetConstellation'], + })) + } + className="w-full rounded-md border border-gray-700 bg-gray-900 px-3 py-2 text-gray-100" + > + <option value="CENTAURI-ALPHA">Centauri-Alpha Relay Node</option> + <option value="SOL-OUTER-COLONIES">Sol Outer Colonies (Kuiper Array)</option> + <option value="DEEP-SPACE-RELAY">Deep Space Relay 09</option> + </select> + </div> + + <div> + <label className="block font-medium text-gray-300 mb-1">Signal Round-Trip Latency</label> + <select + value={handoffConfig.signalLatencyHours} + onChange={(e) => + setHandoffConfig((p) => ({ ...p, signalLatencyHours: parseFloat(e.target.value) })) + } + className="w-full rounded-md border border-gray-700 bg-gray-900 px-3 py-2 text-gray-100" + > + <option value={1.2}>1.2 Hours (Lunar/Lagrange)</option> + <option value={4.5}>4.5 Hours (Outer Sol)</option> + <option value={24.0}>24.0 Hours (Kuiper Edge)</option> + <option value={120.0}>120.0 Hours (Alpha Centauri Light-Speed Delay)</option> + </select> + </div> + + <div> + <label className="block font-medium text-gray-300 mb-1">Interstellar Quorum Ratio</label> + <select + value={handoffConfig.quorumRatio} + onChange={(e) => + setHandoffConfig((p) => ({ + ...p, + quorumRatio: e.target.value as InterstellarHandoffConfig['quorumRatio'], + })) + } + className="w-full rounded-md border border-gray-700 bg-gray-900 px-3 py-2 text-gray-100" + > + <option value="51%">51% Simple Majority</option> + <option value="67%">67% Two-Thirds Treaty Supermajority</option> + <option value="75%">75% Extended Supermajority</option> + <option value="100%">100% Unanimous Consensus</option> + </select> + </div> + </div> + )} + </section> + + {/* STEP 3: RESULTS PANEL */} + {currentResult && ( + <div className="space-y-6"> + {/* Header & Outcome Score MetricCard */} + <div className="grid grid-cols-1 md:grid-cols-4 gap-4"> + <div className="md:col-span-3 rounded-xl border border-gray-700 bg-gray-800/60 p-5 flex flex-col justify-between"> + <div> + <div className="flex items-center justify-between"> + <span className="font-mono text-xs text-indigo-400 font-semibold uppercase"> + Simulation Outcome Report + </span> + <span className="font-mono text-xs text-gray-400">{currentResult.runTimestamp}</span> + </div> + <h2 className="text-lg font-bold text-gray-50 mt-1">{currentResult.scenarioTitle}</h2> + <p className="text-xs text-gray-300 mt-1 leading-relaxed">{currentResult.summary}</p> + </div> + + <div className="mt-4 flex flex-wrap items-center gap-3"> + <button + type="button" + onClick={() => setShowReport((prev) => !prev)} + className="inline-flex items-center gap-1.5 rounded-md bg-indigo-600/20 border border-indigo-500/40 px-3 py-1.5 text-xs font-semibold text-indigo-300 hover:bg-indigo-600/30" + > + <FileText size={14} /> + {showReport ? 'Hide Regulator Report' : 'Generate Regulator-Ready Report'} + </button> + </div> + </div> + + <MetricCard + label="Outcome Score" + value={`${currentResult.outcomeScore}`} + unit="/ 100" + status={currentResult.overallStatus} + footer={ + <span className="font-mono text-[11px] text-gray-400"> + Status: {currentResult.overallStatus} + </span> + } + /> + </div> + + {/* SVG Timeline of Events */} + <div className="rounded-xl border border-gray-700 bg-gray-800/50 p-5 space-y-3"> + <h3 className="text-xs font-mono font-semibold uppercase text-gray-300 flex items-center gap-2"> + <Calendar size={14} className="text-indigo-400" /> + Event Timeline & Milestones + </h3> + <TimelineVisualization + events={currentResult.events.map((e) => ({ + at: e.at, + label: e.label, + state: e.state, + }))} + /> + <div className="grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-2 pt-2 border-t border-gray-700/60"> + {currentResult.events.map((ev) => ( + <div key={ev.step} className="rounded border border-gray-700/60 bg-gray-900/50 p-2 text-xs"> + <div className="flex items-center justify-between"> + <span className="font-mono font-semibold text-indigo-300">{ev.at}</span> + <StatusBadge variant={ev.state === 'DONE' ? 'COMPLIANT' : ev.state === 'ACTIVE' ? 'ACTIVE' : ev.state === 'FAILED' ? 'CRITICAL' : 'PENDING'} label={ev.state} /> + </div> + <p className="font-semibold text-gray-200 mt-1">{ev.label}</p> + <p className="text-[11px] text-gray-400 mt-0.5">{ev.description}</p> + </div> + ))} + </div> + </div> + + {/* Multi-line SVG Chart for Risk Trajectories */} + <div className="rounded-xl border border-gray-700 bg-gray-800/50 p-5 space-y-3"> + <div className="flex items-center justify-between"> + <h3 className="text-xs font-mono font-semibold uppercase text-gray-300 flex items-center gap-2"> + <Activity size={14} className="text-indigo-400" /> + Systemic Risk Trajectories ({currentResult.riskTrajectories.length} Steps) + </h3> + <div className="flex items-center gap-4 text-xs font-mono"> + <span className="flex items-center gap-1.5 text-indigo-300"> + <span className="w-3 h-0.5 bg-indigo-400 rounded-full" /> S_sys + </span> + <span className="flex items-center gap-1.5 text-amber-300"> + <span className="w-3 h-0.5 bg-amber-400 rounded-full" /> G-SRI + </span> + <span className="flex items-center gap-1.5 text-red-300"> + <span className="w-3 h-0.5 bg-red-400 rounded-full" /> C-SRI + </span> + <span className="flex items-center gap-1.5 text-violet-300"> + <span className="w-3 h-0.5 bg-violet-400 rounded-full" /> p_doom + </span> + </div> + </div> + + {/* Hand-rolled SVG Polyline Chart */} + <div className="overflow-x-auto bg-gray-950 p-4 rounded-lg border border-gray-800"> + <svg viewBox="0 0 800 220" className="w-full h-auto min-w-[600px]" role="img" aria-label="Risk trajectory chart"> + {/* Horizontal Grid lines */} + {[0, 0.25, 0.5, 0.75, 1.0].map((v) => { + const y = 180 - v * 150; + return ( + <g key={v}> + <line x1={40} y1={y} x2={780} y2={y} stroke="#374151" strokeDasharray="3 3" strokeWidth={0.8} /> + <text x={32} y={y + 3} fill="#6b7280" fontSize={9} textAnchor="end" fontFamily="monospace"> + {v.toFixed(2)} + </text> + </g> + ); + })} + + {/* Plot trajectories */} + {(() => { + const traj = currentResult.riskTrajectories; + if (traj.length < 2) return null; + + const px = (i: number) => 50 + (i * (780 - 50)) / (traj.length - 1); + const py = (val: number) => 180 - Math.min(1, Math.max(0, val)) * 150; + + const pathS = traj.map((t, i) => `${i === 0 ? 'M' : 'L'}${px(i)},${py(t.S_sys)}`).join(' '); + const pathG = traj.map((t, i) => `${i === 0 ? 'M' : 'L'}${px(i)},${py(t.G_SRI)}`).join(' '); + const pathC = traj.map((t, i) => `${i === 0 ? 'M' : 'L'}${px(i)},${py(t.C_SRI)}`).join(' '); + const pathP = traj.map((t, i) => `${i === 0 ? 'M' : 'L'}${px(i)},${py(t.p_doom)}`).join(' '); + + return ( + <> + {/* Polylines */} + <path d={pathS} fill="none" stroke="#818cf8" strokeWidth={2.5} /> + <path d={pathG} fill="none" stroke="#f59e0b" strokeWidth={2} /> + <path d={pathC} fill="none" stroke="#ef4444" strokeWidth={2} /> + <path d={pathP} fill="none" stroke="#a78bfa" strokeWidth={2} strokeDasharray="4 2" /> + + {/* Step Points & X Labels */} + {traj.map((t, i) => { + const x = px(i); + return ( + <g key={i}> + <line x1={x} y1={30} x2={x} y2={180} stroke="#1f2937" strokeWidth={0.5} /> + <circle cx={x} cy={py(t.S_sys)} r={3} fill="#818cf8" /> + <circle cx={x} cy={py(t.G_SRI)} r={2.5} fill="#f59e0b" /> + <circle cx={x} cy={py(t.C_SRI)} r={2.5} fill="#ef4444" /> + <circle cx={x} cy={py(t.p_doom)} r={2.5} fill="#a78bfa" /> + <text x={x} y={198} fill="#9ca3af" fontSize={9} textAnchor="middle" fontFamily="monospace"> + {t.label} + </text> + </g> + ); + })} + </> + ); + })()} + </svg> + </div> + </div> + + {/* Invariant Status Table Per Step */} + <div className="rounded-xl border border-gray-700 bg-gray-800/50 p-5 space-y-3"> + <h3 className="text-xs font-mono font-semibold uppercase text-gray-300 flex items-center gap-2"> + <Layers size={14} className="text-indigo-400" /> + Constitutional Invariant Status Across Step Sequence + </h3> + <div className="overflow-x-auto"> + <table className="w-full text-left text-xs border-collapse"> + <thead> + <tr className="border-b border-gray-700 bg-gray-900/60 font-mono text-gray-400"> + <th className="py-2.5 px-3">Step</th> + {currentResult.invariantStepStatuses[0]?.invariants.map((inv) => ( + <th key={inv.id} className="py-2.5 px-2 text-center"> + {inv.id} + </th> + ))} + </tr> + </thead> + <tbody className="divide-y divide-gray-700/60 font-mono"> + {currentResult.invariantStepStatuses.map((st) => ( + <tr key={st.step} className="hover:bg-gray-800/40"> + <td className="py-2 px-3 text-gray-300 font-semibold">{st.stepLabel}</td> + {st.invariants.map((inv) => ( + <td key={inv.id} className="py-2 px-2 text-center"> + <StatusBadge variant={inv.status} className="text-[10px]" /> + </td> + ))} + </tr> + ))} + </tbody> + </table> + </div> + </div> + + {/* Compliance Impact & Recommendations */} + <div className="grid grid-cols-1 md:grid-cols-2 gap-5"> + {/* Compliance Impacts */} + <div className="rounded-xl border border-gray-700 bg-gray-800/50 p-5 space-y-3"> + <h3 className="text-xs font-mono font-semibold uppercase text-gray-300 flex items-center gap-2"> + <Globe size={14} className="text-emerald-400" /> + Compliance Framework Impact + </h3> + <div className="space-y-2.5"> + {currentResult.complianceImpacts.map((ci) => ( + <div + key={ci.framework} + className="p-3 rounded-lg border border-gray-700/70 bg-gray-900/40 flex items-start justify-between gap-3 text-xs" + > + <div> + <div className="flex items-center gap-2"> + <span className="font-semibold text-gray-100">{ci.framework}</span> + <StatusBadge variant={ci.status} /> + </div> + <p className="text-gray-400 mt-1">{ci.notes}</p> + </div> + <div className="text-right font-mono"> + <span className="text-gray-400">{ci.prevScore}%</span> + <ChevronRight size={12} className="inline mx-1 text-gray-500" /> + <span className={ci.newScore >= ci.prevScore ? 'text-emerald-400 font-bold' : 'text-amber-400 font-bold'}> + {ci.newScore}% + </span> + </div> + </div> + ))} + </div> + </div> + + {/* Recommendations */} + <div className="rounded-xl border border-gray-700 bg-gray-800/50 p-5 space-y-3"> + <h3 className="text-xs font-mono font-semibold uppercase text-gray-300 flex items-center gap-2"> + <Info size={14} className="text-indigo-400" /> + Simulation Guidance & Recommendations + </h3> + <ul className="space-y-2.5 text-xs"> + {currentResult.recommendations.map((rec, idx) => ( + <li + key={idx} + className="p-3 rounded-lg border border-gray-700/60 bg-gray-900/40 flex items-start gap-2.5 text-gray-200" + > + {rec.startsWith('CRITICAL') || rec.startsWith('WARNING') ? ( + <TriangleAlert size={16} className="text-amber-400 shrink-0 mt-0.5" /> + ) : ( + <Check size={16} className="text-emerald-400 shrink-0 mt-0.5" /> + )} + <span>{rec}</span> + </li> + ))} + </ul> + </div> + </div> + + {/* Generated Regulator-Ready Report */} + {showReport && ( + <div className="pt-2"> + <TaggedDocument title={currentResult.reportTitle} abstract={currentResult.reportAbstract}> + <div className="whitespace-pre-line font-mono text-xs text-gray-300 leading-relaxed bg-gray-950 p-4 rounded-md border border-gray-800"> + {currentResult.reportContent} + </div> + </TaggedDocument> + </div> + )} + </div> + )} + + {/* SCENARIO HISTORY SECTION */} + <section className="rounded-xl border border-gray-700 bg-gray-800/40 p-5 space-y-3"> + <h2 className="text-xs font-mono font-semibold uppercase tracking-wider text-gray-300 flex items-center gap-2"> + <Clock size={14} className="text-indigo-400" /> + Simulation Run History ({history.length} runs recorded) + </h2> + + <div className="space-y-2"> + {history.map((run) => ( + <div + key={run.id} + className="flex flex-wrap items-center justify-between gap-3 p-3 rounded-lg border border-gray-700/70 bg-gray-900/60 text-xs hover:bg-gray-900 transition-colors" + > + <div className="space-y-0.5"> + <div className="flex items-center gap-2"> + <span className="font-semibold text-gray-100">{run.scenarioTitle}</span> + <StatusBadge variant={run.overallStatus} /> + <span className="font-mono text-[10px] text-gray-500">{run.id}</span> + </div> + <p className="text-gray-400">{run.paramsSummary}</p> + <span className="text-[10px] text-gray-500 font-mono">{run.timestamp}</span> + </div> + + <div className="flex items-center gap-4"> + <div className="text-right"> + <p className="text-[10px] uppercase text-gray-400">Score</p> + <p className="font-mono text-base font-bold text-gray-100">{run.outcomeScore}/100</p> + </div> + <button + type="button" + onClick={() => handleReloadHistoryRun(run)} + className="inline-flex items-center gap-1.5 rounded-md border border-gray-700 bg-gray-800 px-3 py-1.5 text-xs text-indigo-300 hover:bg-gray-700" + > + <RotateCcw size={12} /> Reload Config + </button> + </div> + </div> + ))} + </div> + </section> + </div> + ); +} diff --git a/gien-supervisory-brief/src/pages/SubmissionPackages.tsx b/gien-supervisory-brief/src/pages/SubmissionPackages.tsx new file mode 100644 index 00000000..88aaec09 --- /dev/null +++ b/gien-supervisory-brief/src/pages/SubmissionPackages.tsx @@ -0,0 +1,965 @@ +import { useEffect, useMemo, useState } from 'react'; +import { + ArrowRight, + Check, + ChevronDown, + ChevronRight, + Clock, + Copy, + FileText, + Info, + Layers, + Lock, + Printer, + RefreshCw, + Send, + Shield, + ShieldCheck, + X, + Zap, +} from 'lucide-react'; +import PageHeader from '../components/PageHeader'; +import StatusBadge from '../components/StatusBadge'; +import TaggedDocument from '../components/TaggedDocument'; +import ProgressBar from '../components/ProgressBar'; +import { useGovernance } from '../context/GovernanceContext'; +import { FILING_METADATA } from '../data/gienData'; +import { fakeHash, fakeSignature, truncateHash } from '../data/helpers'; +import { + DISPATCH_PROTOCOL_STAGES, + SUBMISSION_SECTIONS, + SUPERVISORY_MANIFEST_ARTEFACTS, +} from '../data/submissionData'; + +const PACKAGE_TYPES = [ + 'Daily Supervisory Brief (SGR-028 filing)', + 'Quarterly Compliance Report', + 'Incident Notification', + 'Treaty Audit Submission', + 'Ω-GAR Dissolution Notice', + 'Supervisory College Transmission', +]; + +const TARGET_AUDIENCES = [ + 'Regulator', + 'Supervisory College', + 'Internal', + 'Executive', + 'Redacted Public Version', +]; + +export default function SubmissionPackages() { + const { role, evaluationWindow, filingRef } = useGovernance(); + + // Step state (1..4) + const [step, setStep] = useState<number>(1); + + // Step 1: Configuration + const [packageType, setPackageType] = useState<string>(PACKAGE_TYPES[0]); + const [targetAudience, setTargetAudience] = useState<string>( + role === 'EXECUTIVE' ? 'Executive' : 'Regulator' + ); + const [filingReference, setFilingReference] = useState<string>( + FILING_METADATA.reference || filingRef + ); + const [evalWindow, setEvalWindow] = useState<string>(evaluationWindow); + + // Step 2: Content Selection + const initialSelectedIds = useMemo(() => { + if (role === 'EXECUTIVE') { + return SUBMISSION_SECTIONS.filter((s) => s.defaultSelectedExecutive).map((s) => s.id); + } + return SUBMISSION_SECTIONS.map((s) => s.id); + }, [role]); + + const [selectedSectionIds, setSelectedSectionIds] = useState<string[]>(initialSelectedIds); + + // Sync role changes if user switches role in context + useEffect(() => { + if (role === 'EXECUTIVE') { + setSelectedSectionIds(SUBMISSION_SECTIONS.filter((s) => s.defaultSelectedExecutive).map((s) => s.id)); + setTargetAudience('Executive'); + } else { + setSelectedSectionIds(SUBMISSION_SECTIONS.map((s) => s.id)); + setTargetAudience('Regulator'); + } + }, [role]); + + // Step 3 Preview State + const [expandedSignature, setExpandedSignature] = useState<boolean>(false); + + // Step 4 Export & Transmission State + const [copyFeedback, setCopyFeedback] = useState<boolean>(false); + + // Modal transmission simulation + const [simulatingTransmission, setSimulatingTransmission] = useState<boolean>(false); + const [transmissionStep, setTransmissionStep] = useState<number>(0); + const [transmissionCompleted, setTransmissionCompleted] = useState<boolean>(false); + + // Inline archive generation state + const [generatingArchive, setGeneratingArchive] = useState<boolean>(false); + const [archiveProgress, setArchiveProgress] = useState<number>(0); + const [generatedArchiveData, setGeneratedArchiveData] = useState<{ + archiveId: string; + anchorHash: string; + } | null>(null); + + // Manifest table pagination state + const [manifestPage, setManifestPage] = useState<number>(1); + const pageSize = 5; + + // Computed hashes for package + const joinedIds = selectedSectionIds.slice().sort().join(':'); + const packageMerkleRoot = useMemo(() => { + return fakeHash(`merkle-package:${filingReference}:${joinedIds}`); + }, [filingReference, joinedIds]); + + const fullPqcSignature = useMemo(() => { + return fakeHash(`pqc-sig-ml-dsa-65:${filingReference}:${packageMerkleRoot}`); + }, [filingReference, packageMerkleRoot]); + + // Toggle individual section selection + const toggleSection = (id: string) => { + setSelectedSectionIds((prev) => + prev.includes(id) ? prev.filter((i) => i !== id) : [...prev, id] + ); + }; + + const selectAllSections = () => { + setSelectedSectionIds(SUBMISSION_SECTIONS.map((s) => s.id)); + }; + + const clearAllSections = () => { + setSelectedSectionIds([]); + }; + + // Copy JSON action + const handleCopyJSON = async () => { + const selectedSectionsData = SUBMISSION_SECTIONS.filter((s) => + selectedSectionIds.includes(s.id) + ); + + const jsonPayload = { + filingReference, + packageType, + targetAudience, + evaluationWindow: evalWindow, + pqcSignatureAlgorithm: FILING_METADATA.pqcSignatureAlgorithm, + merkleRoot: packageMerkleRoot, + pqcSignature: fullPqcSignature, + generatedAt: new Date().toISOString(), + sectionCount: selectedSectionsData.length, + sections: selectedSectionsData.map((s) => ({ + id: s.id, + title: s.title, + abstract: s.abstract, + content: s.content, + })), + }; + + try { + await navigator.clipboard.writeText(JSON.stringify(jsonPayload, null, 2)); + setCopyFeedback(true); + setTimeout(() => setCopyFeedback(false), 2000); + } catch { + // Fallback if clipboard API unavailable + } + }; + + // Transmission simulation modal handler + const startTransmissionSimulation = () => { + setSimulatingTransmission(true); + setTransmissionStep(1); + setTransmissionCompleted(false); + }; + + useEffect(() => { + if (!simulatingTransmission) return; + if (transmissionStep >= 6) { + setTransmissionCompleted(true); + return; + } + + const timer = setInterval(() => { + setTransmissionStep((prev) => { + if (prev >= 6) { + clearInterval(timer); + setTransmissionCompleted(true); + return 6; + } + return prev + 1; + }); + }, 900); + + return () => clearInterval(timer); + }, [simulatingTransmission, transmissionStep]); + + const closeTransmissionModal = () => { + setSimulatingTransmission(false); + setTransmissionStep(0); + setTransmissionCompleted(false); + }; + + // Inline Archive Generation handler + const handleGenerateArchive = () => { + setGeneratingArchive(true); + setArchiveProgress(0); + setGeneratedArchiveData(null); + + const interval = setInterval(() => { + setArchiveProgress((prev) => { + if (prev >= 100) { + clearInterval(interval); + setGeneratingArchive(false); + setGeneratedArchiveData({ + archiveId: `ARCHIVE-${new Date().toISOString().slice(0, 10)}-${filingReference.slice(-3)}`, + anchorHash: fakeHash(`archive-anchor:${filingReference}:${Date.now()}`), + }); + return 100; + } + return prev + 25; + }); + }, 400); + }; + + // Pagination for corpus manifest table + const totalPages = Math.ceil(SUPERVISORY_MANIFEST_ARTEFACTS.length / pageSize); + const currentManifestItems = useMemo(() => { + const start = (manifestPage - 1) * pageSize; + return SUPERVISORY_MANIFEST_ARTEFACTS.slice(start, start + pageSize); + }, [manifestPage]); + + return ( + <div className="space-y-8"> + {/* Header */} + <PageHeader + title="Regulator-Ready Submission Package Builder" + subtitle="4-step wizard for assembling, verifying, previewing, and transmitting regulatory filings and supervisory college packages." + crumbs={[ + { label: 'Supervisory Portal', to: '/' }, + { label: 'Submission Packages' }, + ]} + actions={ + <div className="flex items-center gap-2"> + <span className="text-xs text-gray-400">Current Role:</span> + <span className="rounded bg-indigo-500/20 px-2.5 py-1 text-xs font-semibold text-indigo-300 border border-indigo-500/30"> + {role} + </span> + </div> + } + /> + + {role === 'EXECUTIVE' && ( + <div className="no-print rounded-lg border border-amber-500/30 bg-amber-500/10 p-4 text-amber-300 flex items-center gap-3"> + <Info className="h-5 w-5 shrink-0 text-amber-400" /> + <div className="text-sm"> + <span className="font-semibold">Executive Mode Active:</span> Pre-configured high-level defaults are selected. Advanced technical details are streamlined for rapid submission review. + </div> + </div> + )} + + {/* 4-Step Wizard Container */} + <div className="rounded-xl border border-gray-700 bg-gray-800/50 shadow-xl overflow-hidden"> + {/* Stepper Navigation Bar */} + <div className="no-print border-b border-gray-700 bg-gray-900/80 p-4"> + <nav aria-label="Wizard Steps" className="grid grid-cols-2 gap-2 sm:grid-cols-4"> + {[ + { num: 1, label: 'Configuration', desc: 'Type & Reference' }, + { num: 2, label: 'Content Selection', desc: `${selectedSectionIds.length} sections` }, + { num: 3, label: 'Preview & Attestation', desc: 'Print-Plain Layout' }, + { num: 4, label: 'Export & Transmission', desc: 'PDF / JSON / Transmission' }, + ].map((s) => { + const isActive = step === s.num; + const isDone = step > s.num; + return ( + <button + key={s.num} + type="button" + onClick={() => setStep(s.num)} + className={`flex items-center gap-3 rounded-lg border p-3 text-left transition-all ${ + isActive + ? 'border-indigo-500 bg-indigo-950/40 text-gray-100 ring-1 ring-indigo-500/50' + : isDone + ? 'border-emerald-500/40 bg-emerald-950/20 text-emerald-300 hover:border-emerald-500' + : 'border-gray-700/60 bg-gray-800/30 text-gray-400 hover:border-gray-600 hover:text-gray-200' + }`} + aria-current={isActive ? 'step' : undefined} + > + <div + className={`flex h-8 w-8 shrink-0 items-center justify-center rounded-full font-mono text-xs font-bold ${ + isActive + ? 'bg-indigo-600 text-white' + : isDone + ? 'bg-emerald-600 text-white' + : 'bg-gray-700 text-gray-300' + }`} + > + {isDone ? <Check className="h-4 w-4" /> : s.num} + </div> + <div className="hidden sm:block overflow-hidden"> + <p className="text-xs font-semibold truncate">{s.label}</p> + <p className="text-[11px] text-gray-400 truncate">{s.desc}</p> + </div> + </button> + ); + })} + </nav> + </div> + + {/* Step Content Area */} + <div className="p-6"> + {/* STEP 1: CONFIGURATION */} + {step === 1 && ( + <div className="space-y-6 max-w-3xl"> + <div> + <h2 className="text-lg font-semibold text-gray-100">Step 1: Package Configuration</h2> + <p className="text-xs text-gray-400 mt-1"> + Specify filing classification, target recipient audience, and administrative metadata. + </p> + </div> + + <div className="grid gap-5 sm:grid-cols-2"> + <div> + <label htmlFor="package-type" className="block text-xs font-medium text-gray-300 mb-1.5"> + Package Type + </label> + <select + id="package-type" + value={packageType} + onChange={(e) => setPackageType(e.target.value)} + className="w-full rounded-lg border border-gray-700 bg-gray-900 px-3 py-2 text-sm text-gray-200 focus:border-indigo-500 focus:outline-none" + > + {PACKAGE_TYPES.map((pt) => ( + <option key={pt} value={pt}> + {pt} + </option> + ))} + </select> + </div> + + <div> + <label htmlFor="target-audience" className="block text-xs font-medium text-gray-300 mb-1.5"> + Target Audience + </label> + <select + id="target-audience" + value={targetAudience} + onChange={(e) => setTargetAudience(e.target.value)} + className="w-full rounded-lg border border-gray-700 bg-gray-900 px-3 py-2 text-sm text-gray-200 focus:border-indigo-500 focus:outline-none" + > + {TARGET_AUDIENCES.map((ta) => ( + <option key={ta} value={ta}> + {ta} + </option> + ))} + </select> + </div> + </div> + + <div className="grid gap-5 sm:grid-cols-2"> + <div> + <label htmlFor="filing-ref" className="block text-xs font-medium text-gray-300 mb-1.5"> + Auto-Generated Filing Reference + </label> + <div className="relative"> + <input + id="filing-ref" + type="text" + value={filingReference} + onChange={(e) => setFilingReference(e.target.value)} + className="w-full rounded-lg border border-gray-700 bg-gray-900 px-3 py-2 font-mono text-sm text-gray-100 focus:border-indigo-500 focus:outline-none" + /> + </div> + <p className="mt-1 text-[11px] text-gray-500"> + Prefilled from SGR-028 filing metadata. Editable if generating derivative submission. + </p> + </div> + + <div> + <label htmlFor="eval-window" className="block text-xs font-medium text-gray-300 mb-1.5"> + Evaluation Window (ISO 8601 UTC) + </label> + <input + id="eval-window" + type="text" + value={evalWindow} + onChange={(e) => setEvalWindow(e.target.value)} + className="w-full rounded-lg border border-gray-700 bg-gray-900 px-3 py-2 font-mono text-sm text-gray-300 focus:border-indigo-500 focus:outline-none" + /> + <p className="mt-1 text-[11px] text-gray-500"> + Synchronized from active GovernanceContext telemetry window. + </p> + </div> + </div> + + <div className="rounded-lg border border-gray-700 bg-gray-900/60 p-4 space-y-2"> + <p className="text-xs font-semibold text-gray-300 flex items-center gap-2"> + <ShieldCheck className="h-4 w-4 text-cyan-400" /> + PQC Cryptographic Binding Target + </p> + <div className="grid grid-cols-2 gap-4 text-xs font-mono text-gray-400 pt-1"> + <div> + <span className="text-gray-500">Algorithm:</span> {FILING_METADATA.pqcSignatureAlgorithm} + </div> + <div> + <span className="text-gray-500">Ledger Block:</span> #8412337 + </div> + </div> + </div> + </div> + )} + + {/* STEP 2: CONTENT SELECTION */} + {step === 2 && ( + <div className="space-y-6"> + <div className="flex flex-col sm:flex-row sm:items-center justify-between gap-4"> + <div> + <h2 className="text-lg font-semibold text-gray-100">Step 2: Content Section Selection</h2> + <p className="text-xs text-gray-400 mt-1"> + Select sections to include in this submission package. Checked sections contribute directly to the Merkle tree and PQC attestation block. + </p> + </div> + <div className="flex items-center gap-2"> + <button + type="button" + onClick={selectAllSections} + className="rounded border border-gray-700 bg-gray-800 px-3 py-1.5 text-xs text-gray-300 hover:bg-gray-700 hover:text-white" + > + Select All + </button> + <button + type="button" + onClick={clearAllSections} + className="rounded border border-gray-700 bg-gray-800 px-3 py-1.5 text-xs text-gray-300 hover:bg-gray-700 hover:text-white" + > + Clear All + </button> + </div> + </div> + + <div className="text-xs font-semibold text-indigo-300 flex items-center gap-2"> + <Layers className="h-4 w-4 text-indigo-400" /> + {selectedSectionIds.length} of {SUBMISSION_SECTIONS.length} sections selected + </div> + + <div className="grid gap-3 sm:grid-cols-2"> + {SUBMISSION_SECTIONS.map((sec) => { + const isChecked = selectedSectionIds.includes(sec.id); + return ( + <label + key={sec.id} + className={`flex cursor-pointer items-start gap-3 rounded-lg border p-3.5 transition-all ${ + isChecked + ? 'border-indigo-500/60 bg-indigo-950/20 text-gray-100' + : 'border-gray-700/80 bg-gray-900/40 text-gray-400 hover:border-gray-600' + }`} + > + <input + type="checkbox" + checked={isChecked} + onChange={() => toggleSection(sec.id)} + className="mt-1 h-4 w-4 rounded border-gray-700 bg-gray-900 text-indigo-600 focus:ring-indigo-500" + /> + <div className="space-y-1"> + <p className="text-sm font-semibold text-gray-200">{sec.title}</p> + <p className="text-xs text-gray-400 line-clamp-2 leading-relaxed">{sec.abstract}</p> + </div> + </label> + ); + })} + </div> + </div> + )} + + {/* STEP 3: PREVIEW & ATTESTATION */} + {step === 3 && ( + <div className="space-y-6"> + <div className="no-print flex flex-col sm:flex-row sm:items-center justify-between gap-4"> + <div> + <h2 className="text-lg font-semibold text-gray-100">Step 3: Document Preview & Attestation</h2> + <p className="text-xs text-gray-400 mt-1"> + Preview assembled submission package. Formatted with visible tagged section headers and cryptographic Merkle proof block. + </p> + </div> + <button + type="button" + onClick={() => globalThis.print()} + className="inline-flex items-center gap-2 rounded-lg bg-indigo-600 px-4 py-2 text-xs font-semibold text-white shadow hover:bg-indigo-500" + > + <Printer className="h-4 w-4" /> + Print / Save PDF + </button> + </div> + + {/* Document Pane styled print-plain */} + <div className="print-plain space-y-6 rounded-xl border border-gray-700 bg-gray-900/90 p-6 shadow-inner"> + {/* Document Metadata Banner */} + <div className="border-b border-gray-700 pb-4 space-y-2"> + <div className="flex flex-wrap items-center justify-between gap-2"> + <span className="font-mono text-xs font-bold uppercase tracking-widest text-indigo-400"> + REGULATORY FILING SUBMISSION PACKAGE + </span> + <span className="font-mono text-xs text-gray-400">Filing Ref: {filingReference}</span> + </div> + <h1 className="text-xl font-bold text-gray-50">{packageType}</h1> + <div className="flex flex-wrap gap-4 text-xs font-mono text-gray-400 pt-1"> + <div> + <span className="text-gray-500">Target Audience:</span> {targetAudience} + </div> + <div> + <span className="text-gray-500">Evaluation Window:</span> {evalWindow} + </div> + <div> + <span className="text-gray-500">Filing Date:</span> 2026-10-10 + </div> + </div> + </div> + + {/* Render Selected Sections via TaggedDocument */} + {selectedSectionIds.length === 0 ? ( + <div className="p-8 text-center text-gray-500 italic border border-dashed border-gray-700 rounded-lg"> + No sections selected. Go back to Step 2 to choose sections. + </div> + ) : ( + SUBMISSION_SECTIONS.filter((sec) => selectedSectionIds.includes(sec.id)).map((sec) => ( + <TaggedDocument key={sec.id} title={sec.title} abstract={sec.abstract}> + <p className="text-sm text-gray-300 leading-relaxed font-sans">{sec.content}</p> + </TaggedDocument> + )) + )} + + {/* Cryptographic Attestation Footer in Document */} + <div className="rounded-lg border border-gray-700 bg-gray-950 p-4 space-y-3"> + <div className="flex items-center justify-between border-b border-gray-800 pb-2"> + <span className="font-mono text-xs font-semibold text-cyan-400 uppercase tracking-wider flex items-center gap-1.5"> + <Shield className="h-4 w-4" /> + PACKAGE CRYPTOGRAPHIC ATTESTATION BLOCK + </span> + <StatusBadge variant="VERIFIED" label="SEALED & VERIFIED" /> + </div> + + <div className="grid gap-2 text-xs font-mono"> + <div> + <span className="text-gray-500">Package Merkle Root:</span>{' '} + <span className="text-gray-200 select-all">{packageMerkleRoot}</span> + </div> + + <div> + <div className="flex items-center justify-between"> + <span className="text-gray-500">PQC Signature (ML-DSA-65):</span> + <button + type="button" + onClick={() => setExpandedSignature((e) => !e)} + className="no-print text-[11px] text-indigo-400 hover:underline flex items-center gap-1" + > + {expandedSignature ? 'Truncate Signature' : 'Expand Full Signature'} + <ChevronDown className={`h-3 w-3 transition-transform ${expandedSignature ? 'rotate-180' : ''}`} /> + </button> + </div> + <div className="mt-1 rounded bg-gray-900 p-2 text-[11px] text-indigo-300 break-all border border-gray-800"> + {expandedSignature ? fullPqcSignature : truncateHash(fullPqcSignature, 20, 16)} + </div> + </div> + </div> + </div> + </div> + </div> + )} + + {/* STEP 4: EXPORT & TRANSMISSION */} + {step === 4 && ( + <div className="space-y-6 max-w-4xl"> + <div> + <h2 className="text-lg font-semibold text-gray-100">Step 4: Export & Supervisory College Transmission</h2> + <p className="text-xs text-gray-400 mt-1"> + Execute final dispatch protocols, copy machine-readable OSCAL JSON payloads, or trigger live simulated transmission. + </p> + </div> + + <div className="grid gap-4 sm:grid-cols-2"> + {/* Option 1: PDF Print */} + <div className="rounded-lg border border-gray-700 bg-gray-900/60 p-5 space-y-3 flex flex-col justify-between"> + <div> + <div className="flex items-center gap-2.5 text-gray-100 font-semibold text-sm"> + <Printer className="h-5 w-5 text-indigo-400" /> + Download / Print as PDF + </div> + <p className="text-xs text-gray-400 mt-1.5 leading-relaxed"> + Generates a print-friendly document using the browser's native print engine. Formatted for regulatory archive compliance. + </p> + </div> + <button + type="button" + onClick={() => globalThis.print()} + className="w-full inline-flex items-center justify-center gap-2 rounded-lg bg-indigo-600 px-4 py-2.5 text-xs font-semibold text-white hover:bg-indigo-500 transition-colors" + > + <Printer className="h-4 w-4" /> + Print / Download PDF + </button> + </div> + + {/* Option 2: Copy JSON */} + <div className="rounded-lg border border-gray-700 bg-gray-900/60 p-5 space-y-3 flex flex-col justify-between"> + <div> + <div className="flex items-center gap-2.5 text-gray-100 font-semibold text-sm"> + <Copy className="h-5 w-5 text-indigo-400" /> + Copy Machine-Readable JSON + </div> + <p className="text-xs text-gray-400 mt-1.5 leading-relaxed"> + Copies complete machine-readable OSCAL and Merkle tree payload to clipboard for automated API ingestion. + </p> + </div> + <button + type="button" + onClick={handleCopyJSON} + className="w-full inline-flex items-center justify-center gap-2 rounded-lg border border-indigo-500/50 bg-indigo-950/40 px-4 py-2.5 text-xs font-semibold text-indigo-300 hover:bg-indigo-900/60 transition-colors" + > + {copyFeedback ? ( + <> + <Check className="h-4 w-4 text-emerald-400" /> + Copied to Clipboard! + </> + ) : ( + <> + <Copy className="h-4 w-4" /> + Copy OSCAL JSON Payload + </> + )} + </button> + </div> + + {/* Option 3: Simulate Transmission */} + <div className="rounded-lg border border-gray-700 bg-gray-900/60 p-5 space-y-3 flex flex-col justify-between"> + <div> + <div className="flex items-center gap-2.5 text-gray-100 font-semibold text-sm"> + <Send className="h-5 w-5 text-cyan-400" /> + Simulate Transmission + </div> + <p className="text-xs text-gray-400 mt-1.5 leading-relaxed"> + Executes 6-stage protocol dispatch to the BIS/FSB Supervisory College endpoint over PQC Kyber KEM encryption. + </p> + </div> + <button + type="button" + onClick={startTransmissionSimulation} + className="w-full inline-flex items-center justify-center gap-2 rounded-lg bg-cyan-600 px-4 py-2.5 text-xs font-semibold text-white hover:bg-cyan-500 transition-colors" + > + <Send className="h-4 w-4" /> + Simulate College Transmission + </button> + </div> + + {/* Option 4: Generate Merkle-Anchored Archive */} + <div className="rounded-lg border border-gray-700 bg-gray-900/60 p-5 space-y-3 flex flex-col justify-between"> + <div> + <div className="flex items-center gap-2.5 text-gray-100 font-semibold text-sm"> + <Lock className="h-5 w-5 text-emerald-400" /> + Generate Merkle-Anchored Archive + </div> + <p className="text-xs text-gray-400 mt-1.5 leading-relaxed"> + Creates a self-verifying, immutable archive bundle anchored directly to WORM audit ledger block #8412337. + </p> + </div> + <button + type="button" + onClick={handleGenerateArchive} + disabled={generatingArchive} + className="w-full inline-flex items-center justify-center gap-2 rounded-lg border border-emerald-500/50 bg-emerald-950/30 px-4 py-2.5 text-xs font-semibold text-emerald-300 hover:bg-emerald-900/40 disabled:opacity-50 transition-colors" + > + <Lock className="h-4 w-4" /> + {generatingArchive ? 'Computing Anchor...' : 'Generate WORM Archive'} + </button> + </div> + </div> + + {/* Inline Progress / Result for Archive Generation */} + {generatingArchive && ( + <div className="rounded-lg border border-indigo-500/30 bg-indigo-950/30 p-4 space-y-2"> + <div className="flex justify-between text-xs text-gray-300"> + <span className="font-semibold">Building WORM Merkle Archive...</span> + <span className="font-mono">{archiveProgress}%</span> + </div> + <ProgressBar value={archiveProgress} color="bg-indigo-500" /> + </div> + )} + + {generatedArchiveData && !generatingArchive && ( + <div className="rounded-lg border border-emerald-500/30 bg-emerald-950/30 p-4 space-y-2"> + <div className="flex items-center gap-2 text-xs font-semibold text-emerald-400"> + <ShieldCheck className="h-4 w-4" /> + Merkle-Anchored Archive Generated Successfully + </div> + <div className="grid grid-cols-2 gap-4 text-xs font-mono text-gray-300 pt-1"> + <div> + <span className="text-gray-500">Archive ID:</span> {generatedArchiveData.archiveId} + </div> + <div> + <span className="text-gray-500">Anchor Hash:</span> {truncateHash(generatedArchiveData.anchorHash, 14, 8)} + </div> + </div> + </div> + )} + </div> + )} + + {/* Stepper Footer Controls */} + <div className="no-print mt-8 flex items-center justify-between border-t border-gray-700 pt-4"> + <button + type="button" + onClick={() => setStep((s) => Math.max(1, s - 1))} + disabled={step === 1} + className="rounded-lg border border-gray-700 bg-gray-800 px-4 py-2 text-xs font-semibold text-gray-300 hover:bg-gray-700 disabled:opacity-40" + > + Back + </button> + + <span className="text-xs text-gray-400">Step {step} of 4</span> + + {step < 4 ? ( + <button + type="button" + onClick={() => setStep((s) => Math.min(4, s + 1))} + className="inline-flex items-center gap-1.5 rounded-lg bg-indigo-600 px-4 py-2 text-xs font-semibold text-white hover:bg-indigo-500" + > + Next Step + <ChevronRight className="h-4 w-4" /> + </button> + ) : ( + <button + type="button" + onClick={() => setStep(1)} + className="inline-flex items-center gap-1.5 rounded-lg border border-gray-700 bg-gray-800 px-4 py-2 text-xs font-semibold text-gray-300 hover:bg-gray-700" + > + Reset Wizard + </button> + )} + </div> + </div> + </div> + + {/* Modal for Transmission Simulation */} + {simulatingTransmission && ( + <div className="no-print fixed inset-0 z-50 flex items-center justify-center bg-black/75 p-4" role="dialog" aria-modal="true"> + <div className="w-full max-w-lg rounded-xl border border-gray-700 bg-gray-900 p-6 shadow-2xl space-y-6"> + <div className="flex items-center justify-between border-b border-gray-800 pb-3"> + <div className="flex items-center gap-2"> + <Send className="h-5 w-5 text-cyan-400 animate-pulse" /> + <h3 className="text-base font-semibold text-gray-100"> + Supervisory College Transmission Protocol + </h3> + </div> + <button + type="button" + onClick={closeTransmissionModal} + className="text-gray-400 hover:text-white" + > + <X className="h-5 w-5" /> + </button> + </div> + + <div className="space-y-3"> + {[ + 'Package Assembly & Merkle Root Computation', + 'PQC Signature Application (ML-DSA-65)', + 'Encryption (CRYSTALS-Kyber KEM)', + 'Supervisory College Endpoint Transmission', + 'Receipt Acknowledgment & Merkle Validation', + 'Archive Seal & WORM Ledger Anchoring', + ].map((stageTitle, idx) => { + const stageNum = idx + 1; + const isCurrent = transmissionStep === stageNum; + const isDone = transmissionStep > stageNum || transmissionCompleted; + + return ( + <div + key={stageTitle} + className={`flex items-center justify-between rounded-lg border p-3 text-xs transition-all ${ + isCurrent + ? 'border-cyan-500 bg-cyan-950/40 text-cyan-200' + : isDone + ? 'border-emerald-500/40 bg-emerald-950/20 text-emerald-300' + : 'border-gray-800 bg-gray-950/40 text-gray-500' + }`} + > + <div className="flex items-center gap-2.5"> + <span + className={`flex h-5 w-5 items-center justify-center rounded-full font-mono text-[10px] font-bold ${ + isDone + ? 'bg-emerald-600 text-white' + : isCurrent + ? 'bg-cyan-500 text-black' + : 'bg-gray-800 text-gray-500' + }`} + > + {isDone ? <Check className="h-3 w-3" /> : stageNum} + </span> + <span>{stageTitle}</span> + </div> + {isCurrent && !transmissionCompleted && ( + <RefreshCw className="h-3.5 w-3.5 animate-spin text-cyan-400" /> + )} + {isDone && <StatusBadge variant="VERIFIED" label="COMPLETE" />} + </div> + ); + })} + </div> + + {transmissionCompleted && ( + <div className="rounded-lg border border-emerald-500/40 bg-emerald-950/30 p-4 space-y-2"> + <div className="flex items-center gap-2 text-xs font-semibold text-emerald-400"> + <ShieldCheck className="h-4 w-4" /> + Transmission Confirmed by Supervisory College + </div> + <div className="text-xs font-mono text-gray-300 space-y-1 pt-1"> + <div> + <span className="text-gray-500">Receipt Hash:</span>{' '} + {fakeHash(`transmission-receipt:${filingReference}`)} + </div> + <div> + <span className="text-gray-500">Status:</span> 200 OK — Merkle Root Match Validated + </div> + </div> + </div> + )} + + <div className="flex justify-end pt-2"> + <button + type="button" + onClick={closeTransmissionModal} + className="rounded-lg border border-gray-700 bg-gray-800 px-4 py-2 text-xs font-semibold text-gray-200 hover:bg-gray-700" + > + Close Protocol Monitor + </button> + </div> + </div> + </div> + )} + + {/* SECTION BELOW WIZARD: Bundled Dispatch Transmission Protocol Display */} + <section className="rounded-xl border border-gray-700 bg-gray-800/40 p-6 space-y-6"> + <div> + <div className="flex items-center justify-between"> + <h2 className="text-base font-semibold text-gray-100 flex items-center gap-2"> + <Zap className="h-5 w-5 text-amber-400" /> + Bundled Dispatch Transmission Protocol Status — {FILING_METADATA.reference} + </h2> + <StatusBadge variant="PENDING" label="CYCLE CLOSURE PENDING" /> + </div> + <p className="text-xs text-gray-400 mt-1"> + Real-time pipeline monitoring for active daily filing SGR-028-CFE-2026-07-001. + </p> + </div> + + {/* Stepper / Timeline for stages 1-6 */} + <div className="grid gap-3 sm:grid-cols-2 lg:grid-cols-3"> + {DISPATCH_PROTOCOL_STAGES.map((stg) => ( + <div + key={stg.stageNumber} + className={`rounded-lg border p-4 space-y-2 transition-all ${ + stg.status === 'DONE' + ? 'border-emerald-500/30 bg-emerald-950/15' + : 'border-amber-500/30 bg-amber-950/15' + }`} + > + <div className="flex items-center justify-between"> + <span className="font-mono text-xs font-bold text-gray-400"> + STAGE {stg.stageNumber} + </span> + <StatusBadge + variant={stg.status === 'DONE' ? 'VERIFIED' : 'PENDING'} + label={stg.status === 'DONE' ? 'DONE' : 'PENDING (23:59)'} + /> + </div> + <p className="text-xs font-semibold text-gray-200">{stg.title}</p> + <p className="text-[11px] text-gray-400 leading-relaxed">{stg.description}</p> + {stg.timestamp && ( + <div className="flex items-center gap-1 font-mono text-[10px] text-gray-500 pt-1"> + <Clock className="h-3 w-3" /> + {stg.timestamp} + </div> + )} + </div> + ))} + </div> + </section> + + {/* SECTION BELOW WIZARD: Supervisory Corpus Manifest Table */} + <section className="rounded-xl border border-gray-700 bg-gray-800/40 p-6 space-y-4"> + <div className="flex flex-col sm:flex-row sm:items-center justify-between gap-2"> + <div> + <h2 className="text-base font-semibold text-gray-100 flex items-center gap-2"> + <FileText className="h-5 w-5 text-indigo-400" /> + Supervisory Corpus Manifest + </h2> + <p className="text-xs text-gray-400 mt-1"> + Indexed inventory of 14 supervisory artefacts anchored in current filing SGR-028. + </p> + </div> + <span className="text-xs font-mono text-gray-400"> + Total Artefacts: {SUPERVISORY_MANIFEST_ARTEFACTS.length} + </span> + </div> + + <div className="overflow-x-auto rounded-lg border border-gray-700"> + <table className="w-full text-left text-xs"> + <thead className="border-b border-gray-700 bg-gray-900/80 font-mono text-[11px] text-gray-400"> + <tr> + <th className="px-4 py-3">Artefact ID</th> + <th className="px-4 py-3">Type</th> + <th className="px-4 py-3">Phase</th> + <th className="px-4 py-3">Timestamp (ISO 8601)</th> + <th className="px-4 py-3">Merkle Hash</th> + <th className="px-4 py-3">PQC Signature</th> + <th className="px-4 py-3 text-right">Status</th> + </tr> + </thead> + <tbody className="divide-y border-gray-700 bg-gray-900/40 text-gray-300 font-mono"> + {currentManifestItems.map((art) => ( + <tr key={art.artefactId} className="hover:bg-gray-800/50"> + <td className="px-4 py-3 font-semibold text-gray-200">{art.artefactId}</td> + <td className="px-4 py-3 font-sans text-gray-300">{art.type}</td> + <td className="px-4 py-3"> + <span className="rounded bg-gray-800 px-2 py-0.5 text-[10px] text-indigo-300 border border-gray-700"> + {art.phase} + </span> + </td> + <td className="px-4 py-3 text-gray-400">{art.timestamp}</td> + <td className="px-4 py-3 text-indigo-300">{truncateHash(art.merkleHash, 8, 4)}</td> + <td className="px-4 py-3 text-gray-400">{truncateHash(art.pqcSignature, 8, 4)}</td> + <td className="px-4 py-3 text-right font-sans"> + <StatusBadge variant={art.status} /> + </td> + </tr> + ))} + </tbody> + </table> + </div> + + {/* Pagination controls */} + <div className="flex items-center justify-between pt-2"> + <span className="text-xs text-gray-400"> + Showing Page {manifestPage} of {totalPages} + </span> + <div className="flex items-center gap-2"> + <button + type="button" + onClick={() => setManifestPage((p) => Math.max(1, p - 1))} + disabled={manifestPage === 1} + className="rounded border border-gray-700 bg-gray-800 px-3 py-1.5 text-xs text-gray-300 hover:bg-gray-700 disabled:opacity-40" + > + Previous + </button> + <button + type="button" + onClick={() => setManifestPage((p) => Math.min(totalPages, p + 1))} + disabled={manifestPage === totalPages} + className="rounded border border-gray-700 bg-gray-800 px-3 py-1.5 text-xs text-gray-300 hover:bg-gray-700 disabled:opacity-40" + > + Next + </button> + </div> + </div> + </section> + </div> + ); +} diff --git a/gien-supervisory-brief/src/types.ts b/gien-supervisory-brief/src/types.ts new file mode 100644 index 00000000..cf49622e --- /dev/null +++ b/gien-supervisory-brief/src/types.ts @@ -0,0 +1,145 @@ +// Core domain types for the fictional GIEN governance universe. +// All data is fictional/simulated. Strict typing: no `any` anywhere. + +export type Role = 'REGULATOR' | 'INSTITUTION' | 'EXECUTIVE' | 'EDUCATION'; + +export type OperationalStatus = 'NOMINAL' | 'ELEVATED' | 'CRITICAL' | 'SAFEGUARD'; + +export type ComplianceStatus = + | 'COMPLIANT' + | 'PARTIAL' + | 'NON_COMPLIANT' + | 'NOT_APPLICABLE' + | 'PENDING'; + +export type VerificationStatus = 'VERIFIED' | 'UNVERIFIED' | 'VIOLATED'; + +export type TlaProofStatus = 'PROVED' | 'UNPROVED' | 'COUNTEREXAMPLE_FOUND'; + +export interface RiskIndex { + id: string; // e.g. "S_sys" + name: string; + description: string; + value: number; + delta24h: number; + threshold: number; + status: OperationalStatus; + methodology: string; + factors: string[]; + remediationTriggers: string[]; + regulatoryMappings: string[]; + history: number[]; // 24h simulated series +} + +export interface ControlDomain { + id: string; // CD-01 .. CD-10 + name: string; + description: string; + complianceScore: number; // 0-100 + activeControls: number; + openFindings: number; + status: OperationalStatus; +} + +export interface ComplianceFramework { + id: string; + name: string; + references: string[]; // articles / clauses / functions + compliancePercent: number; + gapCount: number; + criticalGaps: string[]; + treatyGrade: boolean; +} + +export interface PQCAlgorithm { + name: string; + standard: string; + status: 'ACTIVE' | 'STANDBY' | 'DEPRECATED'; + keySizeBytes: number; + lastRotation: string; // ISO 8601 +} + +export interface SupervisoryAgent { + id: string; + role: string; + driftScore: number; + containmentStatus: 'UNCONTAINED' | 'WATCH' | 'SOFT_CONTAINED' | 'HARD_CONTAINED'; + lastAttestation: string; + interventionCount24h: number; +} + +export interface ReplayBundle { + id: string; + panel: string; + scenario: string; + timestamp: string; + deterministic: boolean; + merkleRoot: string; + pqcSignature: string; +} + +export interface Drill { + id: string; // DRILL-042 .. + scenario: string; + status: 'SCHEDULED' | 'ACTIVE' | 'COMPLETED' | 'FAILED'; + startTime: string; + durationMinutes: number; + outcomeScore: number; + lessonsLearned: string; +} + +export interface ConstitutionalInvariant { + id: string; // CI-001 .. CI-024 + name: string; + statement: string; + tlaSpecRef: string; + tlaProofStatus: TlaProofStatus; + verificationStatus: VerificationStatus; + lastVerified: string; + proofHash: string; + epochs: string[]; + regulatoryMappings: string[]; +} + +export interface GovernancePhase { + id: string; // VI-δ, VII, .. XIII, Ω-GAR + epoch: string; + name: string; + objectives: string[]; + invariantsActive: number; + treatyFrameworks: string[]; + pillarStatus: string; +} + +export interface InfinityPillar { + id: string; // IP-I .. IP-VII + name: string; + description: string; + readinessScore: number; // 0-100 + prerequisites: string[]; + status: 'DORMANT' | 'INITIALIZING' | 'ACTIVE' | 'SEALED'; +} + +export interface GovernanceAlert { + id: string; + severity: 'ELEVATED' | 'CRITICAL'; + message: string; +} + +export interface SLAException { + id: string; + severity: 'LOW' | 'MEDIUM' | 'HIGH'; + trigger: string; + raisedAt: string; + resolutionStatus: 'OPEN' | 'IN_PROGRESS' | 'RESOLVED'; +} + +export interface RteeNode { + id: string; + type: 'TEE' | 'TPM' | 'vTPM' | 'RTEE'; + platform: string; + attestationStatus: 'VALID' | 'STALE' | 'FAILED'; + lastQuote: string; + pcrSummary: string; + firmware: string; +} diff --git a/gien-supervisory-brief/tsconfig.json b/gien-supervisory-brief/tsconfig.json new file mode 100644 index 00000000..8a78a039 --- /dev/null +++ b/gien-supervisory-brief/tsconfig.json @@ -0,0 +1,20 @@ +{ + "compilerOptions": { + "target": "ES2022", + "useDefineForClassFields": true, + "lib": ["ES2022", "DOM", "DOM.Iterable"], + "module": "ESNext", + "skipLibCheck": true, + "moduleResolution": "bundler", + "allowImportingTsExtensions": true, + "isolatedModules": true, + "moduleDetection": "force", + "noEmit": true, + "jsx": "react-jsx", + "strict": true, + "noUnusedLocals": false, + "noUnusedParameters": false, + "noFallthroughCasesInSwitch": true + }, + "include": ["src"] +} diff --git a/gien-supervisory-brief/vite.config.ts b/gien-supervisory-brief/vite.config.ts new file mode 100644 index 00000000..da17dafa --- /dev/null +++ b/gien-supervisory-brief/vite.config.ts @@ -0,0 +1,7 @@ +import { defineConfig } from 'vite'; +import react from '@vitejs/plugin-react'; +import tailwindcss from '@tailwindcss/vite'; + +export default defineConfig({ + plugins: [react(), tailwindcss()], +});