@coreason-ai/sensory-core 1.3.0 → 1.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,167 @@
1
+ // Copyright (c) 2026 CoReason, Inc
2
+ //
3
+ // This software is proprietary and dual-licensed
4
+ // Licensed under the Prosperity Public License 3.0 (the "License")
5
+ // A copy of the license is available at <https://prosperitylicense.com/versions/3.0.0>
6
+ // For details, see the LICENSE file
7
+ // Commercial use beyond a 30-day trial requires a separate license
8
+ //
9
+ // Source Code: <https://github.com/CoReason-AI/coreason-runtime>
10
+ import React from 'react';
11
+ import { GlassBox } from './GlassBox';
12
+ import { Shield, Zap, AlertTriangle, Activity } from 'lucide-react';
13
+ export const WasmSandboxCagingHud = ({ telemetry, attestation = {
14
+ transactionId: 'tx_pending',
15
+ proofStatus: 'UNCHECKED',
16
+ originatingAgentUrn: 'urn:coreason:agent:unknown',
17
+ verificationTimestamp: new Date().toISOString(),
18
+ zkProofHash: '0x0000000000000000000000000000000000000000000000000000000000000000',
19
+ sdJwtCompliance: false
20
+ }, className = '' }) => {
21
+ const ceilingRam = 10485760; // 10MB in bytes
22
+ const ramPercent = Math.min((telemetry.ramBytesAllocated / ceilingRam) * 100, 100);
23
+ const ramMb = telemetry.ramBytesAllocated / 1048576;
24
+ const criticalThreshold = 8388608; // 8MB in bytes
25
+ const isCriticalRam = telemetry.ramBytesAllocated >= criticalThreshold;
26
+ // Determine bubble count and rise animation duration based on CPU burn rate
27
+ const bubbleCount = 8;
28
+ const bubbleSpeedSeconds = Math.max(0.4, 6 - Math.min(5.5, telemetry.cpuFuelBurnRate / 8000));
29
+ const isProofValidated = attestation.proofStatus === 'VALIDATED';
30
+ const isProofForged = attestation.proofStatus === 'FORGED' || attestation.proofStatus === 'INVALID';
31
+ return (React.createElement("div", { className: `flex flex-col lg:flex-row gap-6 w-full h-full select-none text-white ${className}` },
32
+ React.createElement(GlassBox, { density: "dense", className: "flex-1 border border-white/10 bg-black/55 backdrop-blur-md p-6 flex flex-col gap-6 rounded-xl" },
33
+ React.createElement("div", { className: "flex items-center justify-between border-b border-white/10 pb-3" },
34
+ React.createElement("div", { className: "flex items-center gap-2" },
35
+ React.createElement(Zap, { className: "w-4 h-4 text-cyan-400" }),
36
+ React.createElement("span", { className: "text-[11px] font-bold text-gray-400 uppercase tracking-widest" }, "WASM Thermodynamic Supervisor")),
37
+ React.createElement("span", { className: "text-[9px] font-mono text-gray-500 truncate max-w-[200px]", title: telemetry.sandboxUrn }, telemetry.sandboxUrn.split(':').slice(-2).join(':') || telemetry.sandboxUrn)),
38
+ React.createElement("div", { className: "flex flex-col md:flex-row gap-8 items-center justify-center py-4" },
39
+ React.createElement("div", { className: "flex flex-col items-center gap-3" },
40
+ React.createElement("div", { className: "text-[10px] font-bold text-gray-400 uppercase tracking-wider" }, "Volumetric RAM Ceiling (10MB)"),
41
+ React.createElement("div", { className: "relative w-28 h-64 bg-black/40 border border-white/10 rounded-t-full rounded-b-full shadow-inner overflow-hidden flex flex-col justify-end" },
42
+ React.createElement("div", { className: "absolute top-0 left-0 right-0 h-6 bg-white/5 border-b border-white/15 rounded-full z-20" }),
43
+ React.createElement("div", { className: "absolute inset-0 z-10 pointer-events-none overflow-hidden" }, Array.from({ length: bubbleCount }).map((_, index) => {
44
+ const leftOffset = 15 + index * 10;
45
+ const delay = index * 0.35;
46
+ const scale = 0.5 + (index % 3) * 0.25;
47
+ return (React.createElement("div", { key: index, className: "absolute bottom-2 w-2 h-2 bg-cyan-400/40 rounded-full", style: {
48
+ left: `${leftOffset}%`,
49
+ animationName: 'rise',
50
+ animationDuration: `${bubbleSpeedSeconds}s`,
51
+ animationTimingFunction: 'linear',
52
+ animationIterationCount: 'infinite',
53
+ animationDelay: `${delay}s`,
54
+ transform: `scale(${scale})`
55
+ } }));
56
+ })),
57
+ React.createElement("div", { className: `relative w-full transition-all duration-700 ease-out z-0 flex flex-col justify-start`, style: {
58
+ height: `${ramPercent}%`,
59
+ background: isCriticalRam
60
+ ? 'linear-gradient(to top, rgba(239, 68, 68, 0.4), rgba(220, 38, 38, 0.7))'
61
+ : 'linear-gradient(to top, rgba(6, 182, 212, 0.3), rgba(14, 165, 233, 0.55))'
62
+ } },
63
+ React.createElement("div", { className: `absolute -top-3 left-0 right-0 h-6 rounded-full border-t border-white/20 transition-all duration-700`, style: {
64
+ backgroundColor: isCriticalRam ? 'rgba(220, 38, 38, 0.85)' : 'rgba(14, 165, 233, 0.75)',
65
+ boxShadow: isCriticalRam ? '0 0 12px rgba(220, 38, 38, 0.8)' : '0 0 12px rgba(14, 165, 233, 0.6)'
66
+ } })),
67
+ React.createElement("div", { className: "absolute bottom-[80%] left-0 right-0 border-t border-red-500/30 border-dashed z-20 flex justify-end pr-2 pointer-events-none" },
68
+ React.createElement("span", { className: "text-[8px] text-red-400/70 font-mono bg-black/40 px-1 rounded -translate-y-1.5" }, "80% (8MB)"))),
69
+ React.createElement("div", { className: "text-center font-mono mt-1" },
70
+ React.createElement("span", { className: `text-base font-bold ${isCriticalRam ? 'text-red-400 animate-pulse' : 'text-cyan-400'}` },
71
+ ramMb.toFixed(2),
72
+ " MB"),
73
+ React.createElement("span", { className: "text-[9px] text-gray-500 block" },
74
+ "Utilization: ",
75
+ ramPercent.toFixed(1),
76
+ "%"))),
77
+ React.createElement("div", { className: "flex-1 w-full flex flex-col gap-4 font-mono" },
78
+ React.createElement("div", { className: "p-3 bg-black/35 rounded-lg border border-white/5" },
79
+ React.createElement("div", { className: "text-[9px] text-gray-500 uppercase tracking-wider" }, "Remaining Instruction Fuel"),
80
+ React.createElement("div", { className: "text-lg font-bold text-white mt-1" },
81
+ telemetry.cpuFuelRemaining.toLocaleString(),
82
+ " units"),
83
+ React.createElement("div", { className: "w-full bg-gray-900 rounded-full h-1.5 overflow-hidden border border-white/5 mt-2" },
84
+ React.createElement("div", { className: "h-full bg-cyan-400 rounded-full transition-all duration-300", style: { width: `${Math.min(100, (telemetry.cpuFuelRemaining / 1000000) * 100)}%` } }))),
85
+ React.createElement("div", { className: "p-3 bg-black/35 rounded-lg border border-white/5" },
86
+ React.createElement("div", { className: "text-[9px] text-gray-500 uppercase tracking-wider" }, "CPU Instruction Velocity"),
87
+ React.createElement("div", { className: "text-lg font-bold text-[var(--cr-accent-orange)] mt-1 flex items-baseline gap-1" },
88
+ telemetry.cpuFuelBurnRate.toLocaleString(),
89
+ React.createElement("span", { className: "text-[9px] text-gray-400 font-normal" }, "fuel/sec")),
90
+ React.createElement("div", { className: "flex items-center gap-1.5 mt-2 text-[9px] text-gray-400" },
91
+ React.createElement(Activity, { className: "w-3 h-3 text-orange-400 animate-pulse" }),
92
+ React.createElement("span", null, "Bubble speed scaled dynamically."))),
93
+ isCriticalRam && (React.createElement("div", { className: "p-3 bg-red-950/45 border border-red-500/40 rounded-lg flex items-start gap-2 animate-pulse" },
94
+ React.createElement(AlertTriangle, { className: "w-4 h-4 text-red-400 shrink-0 mt-0.5" }),
95
+ React.createElement("div", null,
96
+ React.createElement("div", { className: "text-[9px] font-bold text-red-300 uppercase tracking-wider" }, "RESOURCE PANIC STATUS"),
97
+ React.createElement("p", { className: "text-[9px] text-red-200 mt-0.5 leading-relaxed" }, "WASM guest node allocation has breached the 8MB thermodynamic warning limit. Isolation supervisor enforces hard halt at 10MB."))))))),
98
+ React.createElement(GlassBox, { density: "dense", className: "w-full lg:w-[360px] border border-white/10 bg-black/55 backdrop-blur-md p-6 flex flex-col gap-6 rounded-xl shrink-0" },
99
+ React.createElement("div", { className: "flex items-center gap-2 border-b border-white/10 pb-3" },
100
+ React.createElement(Shield, { className: "w-4 h-4 text-green-400" }),
101
+ React.createElement("span", { className: "text-[11px] font-bold text-gray-400 uppercase tracking-widest" }, "Attestation & Proof Shield")),
102
+ React.createElement("div", { className: "flex flex-col items-center justify-center py-6 gap-6" },
103
+ React.createElement("div", { className: "relative w-40 h-40 flex items-center justify-center perspective-[800px]" },
104
+ React.createElement("div", { className: "relative w-32 h-32 transform-style-3d transition-transform duration-1000 ease-in-out", style: {
105
+ transform: `rotateX(15deg) ${isProofForged ? 'rotateY(180deg)' : 'rotateY(0deg)'}`
106
+ } },
107
+ React.createElement("div", { className: "absolute inset-0 transform-style-3d transition-all duration-700 backface-hidden flex items-center justify-center", style: {
108
+ transform: isProofValidated ? 'rotateY(0deg)' : 'rotateY(110deg)'
109
+ } },
110
+ React.createElement("svg", { viewBox: "0 0 100 100", className: "w-full h-full drop-shadow-[0_0_15px_rgba(34,197,94,0.4)]" },
111
+ React.createElement("polygon", { points: "50,10 85,25 85,60 50,90 15,60 15,25", fill: "#14532d", fillOpacity: "0.8", stroke: "#22c55e", strokeWidth: "2" }),
112
+ React.createElement("polygon", { points: "50,10 50,90 15,60", fill: "#15803d", fillOpacity: "0.4", stroke: "#22c55e", strokeWidth: "1" }),
113
+ React.createElement("polygon", { points: "50,10 85,25 50,90", fill: "#166534", fillOpacity: "0.4", stroke: "#22c55e", strokeWidth: "1" }),
114
+ React.createElement("path", { d: "M40,40 V30 A10,10 0 0,1 60,30 V40 M32,40 H68 V68 H32 Z", fill: "none", stroke: "#22c55e", strokeWidth: "2.5", strokeLinecap: "round", strokeLinejoin: "round" }),
115
+ React.createElement("circle", { cx: "50", cy: "52", r: "3", fill: "#22c55e" }))),
116
+ React.createElement("div", { className: "absolute inset-0 transform-style-3d transition-all duration-700 backface-hidden flex items-center justify-center", style: {
117
+ transform: isProofForged ? 'rotateY(0deg)' : 'rotateY(-110deg)'
118
+ } },
119
+ React.createElement("svg", { viewBox: "0 0 100 100", className: "w-full h-full drop-shadow-[0_0_15px_rgba(249,115,22,0.45)]" },
120
+ React.createElement("polygon", { points: "50,25 65,45 35,45", fill: "#7c2d12", stroke: "#f97316", strokeWidth: "1.5" }),
121
+ React.createElement("polygon", { points: "35,45 20,65 50,65", fill: "#9a3412", stroke: "#f97316", strokeWidth: "1.5" }),
122
+ React.createElement("polygon", { points: "65,45 50,65 80,65", fill: "#7c2d12", stroke: "#f97316", strokeWidth: "1.5" }),
123
+ React.createElement("line", { x1: "30", y1: "35", x2: "70", y2: "75", stroke: "#ea580c", strokeWidth: "3", strokeDasharray: "4,4" }),
124
+ React.createElement("line", { x1: "40", y1: "25", x2: "80", y2: "65", stroke: "#ea580c", strokeWidth: "3", strokeDasharray: "4,4" }),
125
+ React.createElement("path", { d: "M45,45 L55,55 M55,45 L45,55", fill: "none", stroke: "#ef4444", strokeWidth: "3", strokeLinecap: "round" }))),
126
+ !isProofValidated && !isProofForged && (React.createElement("div", { className: "absolute inset-0 flex items-center justify-center" },
127
+ React.createElement("svg", { viewBox: "0 0 100 100", className: "w-full h-full opacity-60" },
128
+ React.createElement("polygon", { points: "50,15 80,30 80,65 50,85 20,65 20,30", fill: "#1e293b", fillOpacity: "0.7", stroke: "#64748b", strokeWidth: "2", strokeDasharray: "3,3" }),
129
+ React.createElement("path", { d: "M42,40 V32 A8,8 0 0,1 58,32 V40 M35,40 H65 V65 H35 Z", fill: "none", stroke: "#64748b", strokeWidth: "2" }))))),
130
+ React.createElement("div", { className: "absolute bottom-2 flex flex-col items-center" },
131
+ React.createElement("span", { className: `text-[10px] font-bold px-2 py-0.5 rounded tracking-widest font-mono border ${isProofValidated
132
+ ? 'bg-green-900/60 text-green-300 border-green-500/30'
133
+ : isProofForged
134
+ ? 'bg-orange-950/60 text-orange-400 border-orange-500/30 animate-pulse'
135
+ : 'bg-slate-900/60 text-slate-400 border-slate-700/30'}` }, attestation.proofStatus))),
136
+ React.createElement("div", { className: "w-full font-mono text-[9px] bg-black/35 rounded-lg border border-white/5 p-3 flex flex-col gap-2" },
137
+ React.createElement("div", { className: "flex justify-between border-b border-white/5 pb-1" },
138
+ React.createElement("span", { className: "text-gray-500" }, "Transaction ID"),
139
+ React.createElement("span", { className: "text-white font-bold" }, attestation.transactionId)),
140
+ React.createElement("div", { className: "flex justify-between border-b border-white/5 pb-1" },
141
+ React.createElement("span", { className: "text-gray-500" }, "Proof Hash"),
142
+ React.createElement("span", { className: "text-gray-300 truncate w-[160px] text-right", title: attestation.zkProofHash }, attestation.zkProofHash)),
143
+ React.createElement("div", { className: "flex justify-between border-b border-white/5 pb-1" },
144
+ React.createElement("span", { className: "text-gray-500" }, "SD-JWT Compliance"),
145
+ React.createElement("span", { className: attestation.sdJwtCompliance ? 'text-green-400 font-bold' : 'text-orange-400 font-bold' }, attestation.sdJwtCompliance ? 'COMPLIANT' : 'DEFICIT')),
146
+ React.createElement("div", { className: "flex justify-between" },
147
+ React.createElement("span", { className: "text-gray-500" }, "Attestation Timestamp"),
148
+ React.createElement("span", { className: "text-gray-400" }, new Date(attestation.verificationTimestamp).toLocaleTimeString()))))),
149
+ React.createElement("style", null, `
150
+ @keyframes rise {
151
+ 0% {
152
+ transform: translateY(100%) scale(0.6);
153
+ opacity: 0;
154
+ }
155
+ 10% {
156
+ opacity: 0.6;
157
+ }
158
+ 90% {
159
+ opacity: 0.6;
160
+ }
161
+ 100% {
162
+ transform: translateY(-240px) scale(1.1);
163
+ opacity: 0;
164
+ }
165
+ }
166
+ `)));
167
+ };
package/dist/index.d.ts CHANGED
@@ -6,7 +6,7 @@ export { ThermodynamicGovernor } from './components/ThermodynamicGovernor';
6
6
  export { QuorumAdjudicator } from './components/QuorumAdjudicator';
7
7
  export { HolographicAuditTrail } from './components/HolographicAuditTrail';
8
8
  export { MarkovBlanketLens } from './components/MarkovBlanketLens';
9
- export { TopologicalCanvas } from './components/TopologicalCanvas';
9
+ export { TopologicalCanvas, computeBlastRadius } from './components/TopologicalCanvas';
10
10
  export { CognitiveIntrospectionPanel } from './components/CognitiveIntrospectionPanel';
11
11
  export { SVIDBadge } from './components/SVIDBadge';
12
12
  export { ConformanceGuillotine } from './components/ConformanceGuillotine';
@@ -17,3 +17,15 @@ export { SensoryUnfolder } from './components/SensoryUnfolder';
17
17
  export { MultimodalProjection } from './components/MultimodalProjection';
18
18
  export { MultimodalCapture } from './components/MultimodalCapture';
19
19
  export { DynamicToposRenderer } from './components/DynamicToposRenderer';
20
+ export { SpeculativeTreeRenderer } from './components/SpeculativeTreeRenderer';
21
+ export type { SpeculativeTokenNode, SpeculativeTreeRendererProps, SpeculativeValidationStatus } from './components/SpeculativeTreeRenderer';
22
+ export { EpistemicDeficitRadar } from './components/EpistemicDeficitRadar';
23
+ export type { EpistemicDeficitRadarProps } from './components/EpistemicDeficitRadar';
24
+ export { WasmSandboxCagingHud } from './components/WasmSandboxCagingHud';
25
+ export type { WasmSandboxCagingHudProps, SandboxHardwareTelemetry, AttestationReceipt } from './components/WasmSandboxCagingHud';
26
+ export { KeysigningCeremonyModal } from './components/KeysigningCeremonyModal';
27
+ export type { KeysigningCeremonyModalProps, SignerProfile, DelegatedAttestationReceipt } from './components/KeysigningCeremonyModal';
28
+ export { DlpParticleShield } from './components/DlpParticleShield';
29
+ export type { DlpParticleShieldProps } from './components/DlpParticleShield';
30
+ export { SemanticConstellationMap } from './components/SemanticConstellationMap';
31
+ export type { SemanticConstellationMapProps, SemanticConceptNode, SemanticConceptEdge } from './components/SemanticConstellationMap';
package/dist/index.js CHANGED
@@ -15,7 +15,7 @@ export { ThermodynamicGovernor } from './components/ThermodynamicGovernor';
15
15
  export { QuorumAdjudicator } from './components/QuorumAdjudicator';
16
16
  export { HolographicAuditTrail } from './components/HolographicAuditTrail';
17
17
  export { MarkovBlanketLens } from './components/MarkovBlanketLens';
18
- export { TopologicalCanvas } from './components/TopologicalCanvas';
18
+ export { TopologicalCanvas, computeBlastRadius } from './components/TopologicalCanvas';
19
19
  export { CognitiveIntrospectionPanel } from './components/CognitiveIntrospectionPanel';
20
20
  export { SVIDBadge } from './components/SVIDBadge';
21
21
  export { ConformanceGuillotine } from './components/ConformanceGuillotine';
@@ -26,3 +26,9 @@ export { SensoryUnfolder } from './components/SensoryUnfolder';
26
26
  export { MultimodalProjection } from './components/MultimodalProjection';
27
27
  export { MultimodalCapture } from './components/MultimodalCapture';
28
28
  export { DynamicToposRenderer } from './components/DynamicToposRenderer';
29
+ export { SpeculativeTreeRenderer } from './components/SpeculativeTreeRenderer';
30
+ export { EpistemicDeficitRadar } from './components/EpistemicDeficitRadar';
31
+ export { WasmSandboxCagingHud } from './components/WasmSandboxCagingHud';
32
+ export { KeysigningCeremonyModal } from './components/KeysigningCeremonyModal';
33
+ export { DlpParticleShield } from './components/DlpParticleShield';
34
+ export { SemanticConstellationMap } from './components/SemanticConstellationMap';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@coreason-ai/sensory-core",
3
- "version": "1.3.0",
3
+ "version": "1.5.0",
4
4
  "description": "Topos-Theoretic UI primitive library for the CoReason Cybernetic Manifold. Stateless, hollow React components that project coreason-manifest Pydantic ASTs into the DOM.",
5
5
  "license": "Prosperity-3.0",
6
6
  "author": "CoReason, Inc. <info@coreason.ai>",