@coreason-ai/sensory-core 1.0.3
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.
- package/CHANGELOG.md +21 -0
- package/LICENSE +57 -0
- package/NOTICE +21 -0
- package/README.md +60 -0
- package/dist/components/CognitiveIntrospectionPanel.d.ts +15 -0
- package/dist/components/CognitiveIntrospectionPanel.js +45 -0
- package/dist/components/ConstrainedDecodingInspector.d.ts +2 -0
- package/dist/components/ConstrainedDecodingInspector.js +71 -0
- package/dist/components/ConstraintInspector.d.ts +11 -0
- package/dist/components/ConstraintInspector.js +52 -0
- package/dist/components/DynamicToposRenderer.d.ts +17 -0
- package/dist/components/DynamicToposRenderer.js +40 -0
- package/dist/components/ForgePreview.d.ts +9 -0
- package/dist/components/ForgePreview.js +81 -0
- package/dist/components/GlassBox.d.ts +9 -0
- package/dist/components/GlassBox.js +32 -0
- package/dist/components/HardwareProfiler.d.ts +20 -0
- package/dist/components/HardwareProfiler.js +54 -0
- package/dist/components/HolographicAuditTrail.d.ts +21 -0
- package/dist/components/HolographicAuditTrail.js +53 -0
- package/dist/components/KnowledgeTree.d.ts +12 -0
- package/dist/components/KnowledgeTree.js +23 -0
- package/dist/components/LogitVisualizer.d.ts +16 -0
- package/dist/components/LogitVisualizer.js +113 -0
- package/dist/components/ManifestExplorer.d.ts +10 -0
- package/dist/components/ManifestExplorer.js +51 -0
- package/dist/components/MarkovBlanketLens.d.ts +20 -0
- package/dist/components/MarkovBlanketLens.js +45 -0
- package/dist/components/MultimodalCapture.d.ts +13 -0
- package/dist/components/MultimodalCapture.js +59 -0
- package/dist/components/MultimodalProjection.d.ts +8 -0
- package/dist/components/MultimodalProjection.js +39 -0
- package/dist/components/QuorumAdjudicator.d.ts +21 -0
- package/dist/components/QuorumAdjudicator.js +46 -0
- package/dist/components/SensoryUnfolder.d.ts +13 -0
- package/dist/components/SensoryUnfolder.js +77 -0
- package/dist/components/StatusPulse.d.ts +8 -0
- package/dist/components/StatusPulse.js +56 -0
- package/dist/components/TemporalScrubber.d.ts +16 -0
- package/dist/components/TemporalScrubber.js +36 -0
- package/dist/components/ThermodynamicGovernor.d.ts +17 -0
- package/dist/components/ThermodynamicGovernor.js +50 -0
- package/dist/components/TopologicalCanvas.d.ts +27 -0
- package/dist/components/TopologicalCanvas.js +183 -0
- package/dist/components/VFEIndicator.d.ts +15 -0
- package/dist/components/VFEIndicator.js +52 -0
- package/dist/components/VerifiedCapabilityReceipt.d.ts +19 -0
- package/dist/components/VerifiedCapabilityReceipt.js +37 -0
- package/dist/components/nodes/AgentNode.d.ts +14 -0
- package/dist/components/nodes/AgentNode.js +51 -0
- package/dist/components/nodes/SandboxNode.d.ts +11 -0
- package/dist/components/nodes/SandboxNode.js +66 -0
- package/dist/components/nodes/SubstrateNode.d.ts +4 -0
- package/dist/components/nodes/SubstrateNode.js +57 -0
- package/dist/components/nodes/ThermodynamicNode.d.ts +12 -0
- package/dist/components/nodes/ThermodynamicNode.js +52 -0
- package/dist/index.d.ts +17 -0
- package/dist/index.js +26 -0
- package/dist/test/setup.d.ts +1 -0
- package/dist/test/setup.js +1 -0
- package/dist/workers/elkWorker.d.ts +1 -0
- package/dist/workers/elkWorker.js +45 -0
- package/package.json +88 -0
|
@@ -0,0 +1,51 @@
|
|
|
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-sensory-core>
|
|
10
|
+
import React from 'react';
|
|
11
|
+
import { Handle, Position } from '@xyflow/react';
|
|
12
|
+
export const AgentNode = React.memo(({ data }) => {
|
|
13
|
+
// Thermodynamic Bounds
|
|
14
|
+
const isVfeCritical = data.vfe !== undefined && data.vfe > 0.8;
|
|
15
|
+
const isMemoryCritical = data.memoryAllocatedMb !== undefined && data.memoryAllocatedMb > 9.0; // Max is 10MB
|
|
16
|
+
const isFuelCritical = data.cpuFuelRemaining !== undefined && data.cpuFuelRemaining < 1000;
|
|
17
|
+
const isCritical = isVfeCritical || isMemoryCritical || isFuelCritical;
|
|
18
|
+
// Use our glass-panel CSS classes dynamically
|
|
19
|
+
let containerClass = "glass-panel";
|
|
20
|
+
if (isCritical) {
|
|
21
|
+
containerClass += " pulse-danger border-danger";
|
|
22
|
+
}
|
|
23
|
+
return (React.createElement("div", { className: containerClass, style: { minWidth: '180px', textAlign: 'center', transition: 'all 0.3s ease' } },
|
|
24
|
+
React.createElement(Handle, { type: "target", position: Position.Top, className: "glass-handle" }),
|
|
25
|
+
React.createElement("div", { style: { fontSize: '13px', fontWeight: 'bold', marginBottom: '8px', color: isCritical ? '#ff4444' : '#d4d4d4' } },
|
|
26
|
+
data.persona === 'OBSERVER' ? '✅ ' : '',
|
|
27
|
+
data.label),
|
|
28
|
+
data.persona !== 'OBSERVER' && (React.createElement("div", { style: { display: 'flex', flexDirection: 'column', gap: '4px', textAlign: 'left', fontSize: '10px' } },
|
|
29
|
+
data.vfe !== undefined && (React.createElement("div", { style: { display: 'flex', flexDirection: 'column', gap: '2px' } },
|
|
30
|
+
React.createElement("div", { style: { display: 'flex', justifyContent: 'space-between' } },
|
|
31
|
+
React.createElement("span", { style: { color: '#888' } }, "VFE:"),
|
|
32
|
+
React.createElement("span", { style: { color: isVfeCritical ? '#ff4444' : '#00ffaa' } }, data.vfe.toFixed(2))),
|
|
33
|
+
React.createElement("div", { style: { width: '100%', height: '3px', background: 'rgba(255,255,255,0.1)', borderRadius: '1.5px', overflow: 'hidden' } },
|
|
34
|
+
React.createElement("div", { style: { height: '100%', width: `${Math.min(data.vfe * 100, 100)}%`, background: isVfeCritical ? '#ff4444' : '#00ffaa', transition: 'width 0.3s' } })))),
|
|
35
|
+
data.memoryAllocatedMb !== undefined && (React.createElement("div", { style: { display: 'flex', flexDirection: 'column', gap: '2px', marginTop: '4px' } },
|
|
36
|
+
React.createElement("div", { style: { display: 'flex', justifyContent: 'space-between' } },
|
|
37
|
+
React.createElement("span", { style: { color: '#888' } }, "RAM:"),
|
|
38
|
+
React.createElement("span", { style: { color: isMemoryCritical ? '#ff4444' : '#569cd6' } },
|
|
39
|
+
data.memoryAllocatedMb.toFixed(1),
|
|
40
|
+
"MB / 10MB")),
|
|
41
|
+
React.createElement("div", { style: { width: '100%', height: '3px', background: 'rgba(255,255,255,0.1)', borderRadius: '1.5px', overflow: 'hidden' } },
|
|
42
|
+
React.createElement("div", { style: { height: '100%', width: `${Math.min((data.memoryAllocatedMb / 10) * 100, 100)}%`, background: isMemoryCritical ? '#ff4444' : '#569cd6', transition: 'width 0.3s' } })))),
|
|
43
|
+
data.cpuFuelRemaining !== undefined && (React.createElement("div", { style: { display: 'flex', flexDirection: 'column', gap: '2px', marginTop: '4px' } },
|
|
44
|
+
React.createElement("div", { style: { display: 'flex', justifyContent: 'space-between' } },
|
|
45
|
+
React.createElement("span", { style: { color: '#888' } }, "FUEL:"),
|
|
46
|
+
React.createElement("span", { style: { color: isFuelCritical ? '#ff4444' : '#c586c0' } }, data.cpuFuelRemaining)),
|
|
47
|
+
React.createElement("div", { style: { width: '100%', height: '3px', background: 'rgba(255,255,255,0.1)', borderRadius: '1.5px', overflow: 'hidden' } },
|
|
48
|
+
React.createElement("div", { style: { height: '100%', width: `${Math.min((data.cpuFuelRemaining / 5000) * 100, 100)}%`, background: isFuelCritical ? '#ff4444' : '#c586c0', transition: 'width 0.3s' } })))))),
|
|
49
|
+
data.status === 'running' && data.tokens && (React.createElement("div", { style: { marginTop: '8px', fontSize: '10px', color: '#9cdcfe', fontStyle: 'italic' } }, data.tokens)),
|
|
50
|
+
React.createElement(Handle, { type: "source", position: Position.Bottom, className: "glass-handle" })));
|
|
51
|
+
});
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export interface SandboxNodeData {
|
|
3
|
+
label: string;
|
|
4
|
+
worker_id?: string;
|
|
5
|
+
is_sandboxed?: boolean;
|
|
6
|
+
temporal_status?: 'idle' | 'running' | 'paused';
|
|
7
|
+
workflow_id?: string;
|
|
8
|
+
}
|
|
9
|
+
export declare const SandboxNode: React.FC<{
|
|
10
|
+
data: SandboxNodeData;
|
|
11
|
+
}>;
|
|
@@ -0,0 +1,66 @@
|
|
|
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-sensory-core>
|
|
10
|
+
import React from 'react';
|
|
11
|
+
export const SandboxNode = React.memo(({ data }) => {
|
|
12
|
+
return (React.createElement("div", { style: {
|
|
13
|
+
width: '100%',
|
|
14
|
+
height: '100%',
|
|
15
|
+
background: 'rgba(240, 198, 116, 0.05)',
|
|
16
|
+
border: '2px dashed #f0c674',
|
|
17
|
+
borderRadius: '8px',
|
|
18
|
+
position: 'relative',
|
|
19
|
+
pointerEvents: 'none'
|
|
20
|
+
} },
|
|
21
|
+
React.createElement("div", { style: {
|
|
22
|
+
position: 'absolute',
|
|
23
|
+
top: '-10px',
|
|
24
|
+
left: '10px',
|
|
25
|
+
background: '#f0c674',
|
|
26
|
+
color: '#1e1e1e',
|
|
27
|
+
fontSize: '10px',
|
|
28
|
+
padding: '2px 8px',
|
|
29
|
+
borderRadius: '4px',
|
|
30
|
+
fontWeight: 'bold',
|
|
31
|
+
pointerEvents: 'auto'
|
|
32
|
+
} },
|
|
33
|
+
"\uD83D\uDCE6 OpenShell: ",
|
|
34
|
+
data.label),
|
|
35
|
+
data.worker_id && (React.createElement("div", { style: {
|
|
36
|
+
position: 'absolute',
|
|
37
|
+
bottom: '5px',
|
|
38
|
+
right: '10px',
|
|
39
|
+
fontSize: '9px',
|
|
40
|
+
color: '#f0c674',
|
|
41
|
+
background: 'rgba(0,0,0,0.5)',
|
|
42
|
+
padding: '1px 6px',
|
|
43
|
+
borderRadius: '2px'
|
|
44
|
+
} },
|
|
45
|
+
"Worker: ",
|
|
46
|
+
data.worker_id)),
|
|
47
|
+
data.temporal_status && (React.createElement("div", { style: {
|
|
48
|
+
position: 'absolute',
|
|
49
|
+
top: '5px',
|
|
50
|
+
right: '10px',
|
|
51
|
+
display: 'flex',
|
|
52
|
+
alignItems: 'center',
|
|
53
|
+
gap: '4px',
|
|
54
|
+
fontSize: '9px',
|
|
55
|
+
color: data.temporal_status === 'running' ? '#4ec9b0' : '#888'
|
|
56
|
+
} },
|
|
57
|
+
React.createElement("span", { style: {
|
|
58
|
+
width: '6px',
|
|
59
|
+
height: '6px',
|
|
60
|
+
background: data.temporal_status === 'running' ? '#4ec9b0' : '#888',
|
|
61
|
+
borderRadius: '50%',
|
|
62
|
+
animation: data.temporal_status === 'running' ? 'pulse 1.5s infinite' : 'none'
|
|
63
|
+
} }),
|
|
64
|
+
"Temporal: ",
|
|
65
|
+
data.temporal_status.toUpperCase()))));
|
|
66
|
+
});
|
|
@@ -0,0 +1,57 @@
|
|
|
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-sensory-core>
|
|
10
|
+
import React from 'react';
|
|
11
|
+
import { Handle, Position } from '@xyflow/react';
|
|
12
|
+
export const SubstrateNode = React.memo(({ data }) => {
|
|
13
|
+
return (React.createElement("div", { style: {
|
|
14
|
+
padding: '20px',
|
|
15
|
+
border: '2px dashed var(--vscode-focusBorder)',
|
|
16
|
+
borderRadius: '8px',
|
|
17
|
+
backgroundColor: 'rgba(20, 20, 20, 0.4)', // transparent background
|
|
18
|
+
minWidth: '300px',
|
|
19
|
+
minHeight: '200px',
|
|
20
|
+
color: 'var(--vscode-editor-foreground)',
|
|
21
|
+
fontFamily: 'var(--vscode-font-family)',
|
|
22
|
+
position: 'relative',
|
|
23
|
+
boxShadow: '0 0 15px rgba(0, 122, 204, 0.2)'
|
|
24
|
+
} },
|
|
25
|
+
React.createElement(Handle, { type: "target", position: Position.Top, style: { visibility: 'hidden' } }),
|
|
26
|
+
React.createElement("div", { style: { fontWeight: 'bold', fontSize: '1.2em', marginBottom: '10px', color: 'var(--vscode-textLink-foreground)' } },
|
|
27
|
+
"\uD83D\uDDA5\uFE0F ",
|
|
28
|
+
data.label || 'Substrate Enclave'),
|
|
29
|
+
React.createElement("div", { style: { fontSize: '0.8em', color: 'var(--vscode-descriptionForeground)' } },
|
|
30
|
+
React.createElement("div", null,
|
|
31
|
+
React.createElement("strong", null, "Substrate ID:"),
|
|
32
|
+
" ",
|
|
33
|
+
data.substrate_id || 'aws_ec2_h100_01'),
|
|
34
|
+
React.createElement("div", null,
|
|
35
|
+
React.createElement("strong", null, "VRAM:"),
|
|
36
|
+
" ",
|
|
37
|
+
data.vram_gb || 80,
|
|
38
|
+
" GB"),
|
|
39
|
+
React.createElement("div", null,
|
|
40
|
+
React.createElement("strong", null, "Isolation:"),
|
|
41
|
+
" ",
|
|
42
|
+
data.isolation || 'CONFIDENTIAL'),
|
|
43
|
+
React.createElement("div", null,
|
|
44
|
+
React.createElement("strong", null, "Status:"),
|
|
45
|
+
" ",
|
|
46
|
+
React.createElement("span", { style: { color: '#2ea043' } }, "Online (Idle)"))),
|
|
47
|
+
React.createElement("div", { style: {
|
|
48
|
+
position: 'absolute',
|
|
49
|
+
top: 0, left: 0, right: 0, bottom: 0,
|
|
50
|
+
backgroundImage: 'radial-gradient(var(--vscode-editorLineNumber-foreground) 1px, transparent 1px)',
|
|
51
|
+
backgroundSize: '20px 20px',
|
|
52
|
+
opacity: 0.1,
|
|
53
|
+
pointerEvents: 'none',
|
|
54
|
+
zIndex: -1
|
|
55
|
+
} }),
|
|
56
|
+
React.createElement(Handle, { type: "source", position: Position.Bottom, style: { visibility: 'hidden' } })));
|
|
57
|
+
});
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export interface ThermodynamicNodeData {
|
|
3
|
+
label: string;
|
|
4
|
+
status: string;
|
|
5
|
+
memoryBytes: number;
|
|
6
|
+
fuelCurrent: number;
|
|
7
|
+
fuelMax: number;
|
|
8
|
+
}
|
|
9
|
+
export interface ThermodynamicNodeProps {
|
|
10
|
+
data: ThermodynamicNodeData;
|
|
11
|
+
}
|
|
12
|
+
export declare const ThermodynamicNode: React.FC<ThermodynamicNodeProps>;
|
|
@@ -0,0 +1,52 @@
|
|
|
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-sensory-core>
|
|
10
|
+
import React from 'react';
|
|
11
|
+
import { Handle, Position } from '@xyflow/react';
|
|
12
|
+
const MAX_MEMORY_BYTES = 10485760; // 10MB Volumetric Trap
|
|
13
|
+
export const ThermodynamicNode = React.memo(({ data }) => {
|
|
14
|
+
// We use a ref for high-velocity animations if we hook into requestAnimationFrame,
|
|
15
|
+
// but for now we'll use React's render cycle since it's driven by SSE updates in TDACanvas.
|
|
16
|
+
const memoryPercentage = Math.min((data.memoryBytes / MAX_MEMORY_BYTES) * 100, 100);
|
|
17
|
+
const memoryColor = memoryPercentage > 85 ? '#d16969' : '#4d9375'; // Red if near trap, Green otherwise
|
|
18
|
+
const fuelPercentage = data.fuelMax > 0 ? Math.min((data.fuelCurrent / data.fuelMax) * 100, 100) : 100;
|
|
19
|
+
const dashArray = 251.2; // 2 * pi * r (r=40)
|
|
20
|
+
const dashOffset = dashArray - (dashArray * fuelPercentage) / 100;
|
|
21
|
+
return (React.createElement("div", { style: {
|
|
22
|
+
background: 'var(--vscode-editor-background)',
|
|
23
|
+
border: `1px solid ${memoryPercentage >= 100 ? '#f14c4c' : 'var(--vscode-widget-border)'}`,
|
|
24
|
+
borderRadius: '6px',
|
|
25
|
+
padding: '10px',
|
|
26
|
+
color: 'var(--vscode-editor-foreground)',
|
|
27
|
+
minWidth: '180px',
|
|
28
|
+
boxShadow: memoryPercentage >= 100 ? '0 0 10px #f14c4c' : '0 4px 6px rgba(0,0,0,0.3)',
|
|
29
|
+
position: 'relative'
|
|
30
|
+
} },
|
|
31
|
+
React.createElement(Handle, { type: "target", position: Position.Top, style: { background: 'var(--vscode-focusBorder)' } }),
|
|
32
|
+
React.createElement("div", { style: { display: 'flex', alignItems: 'center', justifyContent: 'space-between', marginBottom: '8px' } },
|
|
33
|
+
React.createElement("div", { style: { fontSize: '13px', fontWeight: 'bold' } }, data.label),
|
|
34
|
+
React.createElement("div", { style: { width: '24px', height: '24px', position: 'relative' } },
|
|
35
|
+
React.createElement("svg", { width: "24", height: "24", viewBox: "0 0 100 100", style: { transform: 'rotate(-90deg)' } },
|
|
36
|
+
React.createElement("circle", { cx: "50", cy: "50", r: "40", stroke: "var(--vscode-editor-inactiveSelectionBackground)", strokeWidth: "10", fill: "none" }),
|
|
37
|
+
React.createElement("circle", { cx: "50", cy: "50", r: "40", stroke: "#569cd6" // Blue
|
|
38
|
+
, strokeWidth: "10", fill: "none", strokeDasharray: dashArray, strokeDashoffset: dashOffset, style: { transition: 'stroke-dashoffset 0.1s linear' } })))),
|
|
39
|
+
React.createElement("div", { style: { width: '100%', height: '8px', background: 'var(--vscode-editor-inactiveSelectionBackground)', borderRadius: '4px', overflow: 'hidden' } },
|
|
40
|
+
React.createElement("div", { style: {
|
|
41
|
+
height: '100%',
|
|
42
|
+
width: `${memoryPercentage}%`,
|
|
43
|
+
background: memoryColor,
|
|
44
|
+
transition: 'width 0.1s linear, background-color 0.2s ease'
|
|
45
|
+
} })),
|
|
46
|
+
React.createElement("div", { style: { display: 'flex', justifyContent: 'space-between', marginTop: '4px', fontSize: '10px', color: 'var(--vscode-descriptionForeground)' } },
|
|
47
|
+
React.createElement("span", null,
|
|
48
|
+
(data.memoryBytes / 1024 / 1024).toFixed(2),
|
|
49
|
+
" MB"),
|
|
50
|
+
React.createElement("span", { style: { color: data.fuelCurrent === 0 ? '#f14c4c' : 'inherit' } }, data.fuelCurrent === 0 ? 'TRAPPED' : `${Math.floor(fuelPercentage)}% FUEL`)),
|
|
51
|
+
React.createElement(Handle, { type: "source", position: Position.Bottom, style: { background: 'var(--vscode-focusBorder)' } })));
|
|
52
|
+
});
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export * from './components/GlassBox';
|
|
2
|
+
export * from './components/StatusPulse';
|
|
3
|
+
export { TemporalScrubber } from './components/TemporalScrubber';
|
|
4
|
+
export { KnowledgeTree } from './components/KnowledgeTree';
|
|
5
|
+
export { ThermodynamicGovernor } from './components/ThermodynamicGovernor';
|
|
6
|
+
export { QuorumAdjudicator } from './components/QuorumAdjudicator';
|
|
7
|
+
export { HolographicAuditTrail } from './components/HolographicAuditTrail';
|
|
8
|
+
export { MarkovBlanketLens } from './components/MarkovBlanketLens';
|
|
9
|
+
export { TopologicalCanvas } from './components/TopologicalCanvas';
|
|
10
|
+
export { CognitiveIntrospectionPanel } from './components/CognitiveIntrospectionPanel';
|
|
11
|
+
export { VFEIndicator } from './components/VFEIndicator';
|
|
12
|
+
export { VerifiedCapabilityReceipt } from './components/VerifiedCapabilityReceipt';
|
|
13
|
+
export { HardwareProfileProvider, useHardwareProfile } from './components/HardwareProfiler';
|
|
14
|
+
export { SensoryUnfolder } from './components/SensoryUnfolder';
|
|
15
|
+
export { MultimodalProjection } from './components/MultimodalProjection';
|
|
16
|
+
export { MultimodalCapture } from './components/MultimodalCapture';
|
|
17
|
+
export { DynamicToposRenderer } from './components/DynamicToposRenderer';
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
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
|
+
export * from './components/GlassBox';
|
|
11
|
+
export * from './components/StatusPulse';
|
|
12
|
+
export { TemporalScrubber } from './components/TemporalScrubber';
|
|
13
|
+
export { KnowledgeTree } from './components/KnowledgeTree';
|
|
14
|
+
export { ThermodynamicGovernor } from './components/ThermodynamicGovernor';
|
|
15
|
+
export { QuorumAdjudicator } from './components/QuorumAdjudicator';
|
|
16
|
+
export { HolographicAuditTrail } from './components/HolographicAuditTrail';
|
|
17
|
+
export { MarkovBlanketLens } from './components/MarkovBlanketLens';
|
|
18
|
+
export { TopologicalCanvas } from './components/TopologicalCanvas';
|
|
19
|
+
export { CognitiveIntrospectionPanel } from './components/CognitiveIntrospectionPanel';
|
|
20
|
+
export { VFEIndicator } from './components/VFEIndicator';
|
|
21
|
+
export { VerifiedCapabilityReceipt } from './components/VerifiedCapabilityReceipt';
|
|
22
|
+
export { HardwareProfileProvider, useHardwareProfile } from './components/HardwareProfiler';
|
|
23
|
+
export { SensoryUnfolder } from './components/SensoryUnfolder';
|
|
24
|
+
export { MultimodalProjection } from './components/MultimodalProjection';
|
|
25
|
+
export { MultimodalCapture } from './components/MultimodalCapture';
|
|
26
|
+
export { DynamicToposRenderer } from './components/DynamicToposRenderer';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import '@testing-library/jest-dom';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import '@testing-library/jest-dom';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
2
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
3
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
4
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
5
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
6
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
7
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
8
|
+
});
|
|
9
|
+
};
|
|
10
|
+
import ELK from 'elkjs/lib/elk.bundled.js';
|
|
11
|
+
const elk = new ELK();
|
|
12
|
+
self.addEventListener('message', (event) => __awaiter(void 0, void 0, void 0, function* () {
|
|
13
|
+
const { nodes, edges } = event.data;
|
|
14
|
+
const graph = {
|
|
15
|
+
id: 'root',
|
|
16
|
+
layoutOptions: {
|
|
17
|
+
'elk.algorithm': 'layered',
|
|
18
|
+
'elk.direction': 'RIGHT',
|
|
19
|
+
'elk.spacing.nodeNode': '75',
|
|
20
|
+
'elk.layered.spacing.nodeNodeBetweenLayers': '100',
|
|
21
|
+
},
|
|
22
|
+
children: nodes.map((node) => (Object.assign({ id: node.id, width: node.width || 250, height: node.height || 100 }, node))),
|
|
23
|
+
edges: edges.map((edge) => (Object.assign({ id: edge.id, sources: [edge.source], targets: [edge.target] }, edge))),
|
|
24
|
+
};
|
|
25
|
+
try {
|
|
26
|
+
const layoutedGraph = yield elk.layout(graph);
|
|
27
|
+
// Map the ELK output back to React Flow format
|
|
28
|
+
const layoutedNodes = nodes.map((node) => {
|
|
29
|
+
var _a;
|
|
30
|
+
const elkNode = (_a = layoutedGraph.children) === null || _a === void 0 ? void 0 : _a.find((n) => n.id === node.id);
|
|
31
|
+
if (elkNode) {
|
|
32
|
+
return Object.assign(Object.assign({}, node), { position: {
|
|
33
|
+
x: elkNode.x,
|
|
34
|
+
y: elkNode.y,
|
|
35
|
+
} });
|
|
36
|
+
}
|
|
37
|
+
return node;
|
|
38
|
+
});
|
|
39
|
+
self.postMessage({ nodes: layoutedNodes, edges });
|
|
40
|
+
}
|
|
41
|
+
catch (error) {
|
|
42
|
+
console.error('ELK Layout error:', error);
|
|
43
|
+
self.postMessage({ error: 'Layout failed' });
|
|
44
|
+
}
|
|
45
|
+
}));
|
package/package.json
ADDED
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@coreason-ai/sensory-core",
|
|
3
|
+
"version": "1.0.3",
|
|
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
|
+
"license": "Prosperity-3.0",
|
|
6
|
+
"author": "CoReason, Inc. <info@coreason.ai>",
|
|
7
|
+
"repository": {
|
|
8
|
+
"type": "git",
|
|
9
|
+
"url": "https://github.com/CoReason-AI/coreason-sensory-core.git"
|
|
10
|
+
},
|
|
11
|
+
"homepage": "https://github.com/CoReason-AI/coreason-sensory-core#readme",
|
|
12
|
+
"bugs": {
|
|
13
|
+
"url": "https://github.com/CoReason-AI/coreason-sensory-core/issues"
|
|
14
|
+
},
|
|
15
|
+
"keywords": [
|
|
16
|
+
"coreason",
|
|
17
|
+
"glassmorphism",
|
|
18
|
+
"react",
|
|
19
|
+
"reactflow",
|
|
20
|
+
"sensory",
|
|
21
|
+
"storybook",
|
|
22
|
+
"topos-theoretic",
|
|
23
|
+
"ui-primitives"
|
|
24
|
+
],
|
|
25
|
+
"publishConfig": {
|
|
26
|
+
"registry": "https://registry.npmjs.org/",
|
|
27
|
+
"access": "public"
|
|
28
|
+
},
|
|
29
|
+
"files": [
|
|
30
|
+
"dist",
|
|
31
|
+
"LICENSE",
|
|
32
|
+
"NOTICE",
|
|
33
|
+
"CHANGELOG.md",
|
|
34
|
+
"README.md"
|
|
35
|
+
],
|
|
36
|
+
"engines": {
|
|
37
|
+
"node": ">=22.0.0"
|
|
38
|
+
},
|
|
39
|
+
"main": "dist/index.js",
|
|
40
|
+
"types": "dist/index.d.ts",
|
|
41
|
+
"scripts": {
|
|
42
|
+
"build": "tsc",
|
|
43
|
+
"test": "vitest run",
|
|
44
|
+
"storybook": "storybook dev -p 6006",
|
|
45
|
+
"build-storybook": "storybook build"
|
|
46
|
+
},
|
|
47
|
+
"dependencies": {
|
|
48
|
+
"@monaco-editor/react": "^4.7.0",
|
|
49
|
+
"@rjsf/core": "^6.5.3",
|
|
50
|
+
"@rjsf/utils": "^6.5.3",
|
|
51
|
+
"@rjsf/validator-ajv8": "^6.5.3",
|
|
52
|
+
"@xyflow/react": "^12.10.2",
|
|
53
|
+
"clsx": "^2.1.1",
|
|
54
|
+
"elkjs": "^0.11.1",
|
|
55
|
+
"framer-motion": "^12.38.0",
|
|
56
|
+
"lucide-react": "^0.378.0",
|
|
57
|
+
"tailwind-merge": "^2.3.0"
|
|
58
|
+
},
|
|
59
|
+
"peerDependencies": {
|
|
60
|
+
"react": "^19.2.0",
|
|
61
|
+
"react-dom": "^19.2.0"
|
|
62
|
+
},
|
|
63
|
+
"devDependencies": {
|
|
64
|
+
"@chromatic-com/storybook": "^5.2.1",
|
|
65
|
+
"@storybook/addon-a11y": "^10.4.0",
|
|
66
|
+
"@storybook/addon-docs": "^10.4.0",
|
|
67
|
+
"@storybook/addon-mcp": "^0.6.0",
|
|
68
|
+
"@storybook/addon-vitest": "^10.4.0",
|
|
69
|
+
"@storybook/react-vite": "^10.4.0",
|
|
70
|
+
"@testing-library/dom": "^10.4.1",
|
|
71
|
+
"@testing-library/jest-dom": "^6.9.1",
|
|
72
|
+
"@testing-library/react": "^16.3.2",
|
|
73
|
+
"@types/react": "^18.2.45",
|
|
74
|
+
"@types/react-dom": "^18.2.18",
|
|
75
|
+
"@vitejs/plugin-react": "^6.0.2",
|
|
76
|
+
"@vitest/browser-playwright": "^4.1.6",
|
|
77
|
+
"@vitest/coverage-v8": "^4.1.6",
|
|
78
|
+
"autoprefixer": "^10.4.19",
|
|
79
|
+
"jsdom": "^29.1.1",
|
|
80
|
+
"playwright": "^1.60.0",
|
|
81
|
+
"postcss": "^8.4.38",
|
|
82
|
+
"storybook": "^10.4.0",
|
|
83
|
+
"tailwindcss": "^3.4.3",
|
|
84
|
+
"typescript": "^5.1.3",
|
|
85
|
+
"vite": "^8.0.13",
|
|
86
|
+
"vitest": "^4.1.6"
|
|
87
|
+
}
|
|
88
|
+
}
|