Spaces:
Paused
Paused
fix(frontend): copy widgets locally for Vercel deployment
Browse filesMove NeuralAscension widgets and DataInsightsHub to matrix-frontend
to fix import resolution errors during Vercel build. Update imports
in WidgetGallery.tsx to use local @/widgets paths.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- apps/matrix-frontend/src/pages/WidgetGallery.tsx +9 -9
- apps/matrix-frontend/src/widgets/DataInsightsHub.tsx +383 -0
- apps/matrix-frontend/src/widgets/NeuralAscension/MasterControl.tsx +135 -0
- apps/matrix-frontend/src/widgets/NeuralAscension/NSQI.tsx +15 -0
- apps/matrix-frontend/src/widgets/NeuralAscension/PTAM.tsx +18 -0
- apps/matrix-frontend/src/widgets/NeuralAscension/RestWidgets.tsx +68 -0
- apps/matrix-frontend/src/widgets/NeuralAscension/SCE.tsx +51 -0
- apps/matrix-frontend/src/widgets/NeuralAscension/SEGA.tsx +183 -0
- apps/matrix-frontend/src/widgets/NeuralAscension/THG.tsx +131 -0
- apps/matrix-frontend/src/widgets/NeuralAscension/index.ts +113 -0
- apps/matrix-frontend/src/widgets/NeuralEventBus.ts +56 -0
apps/matrix-frontend/src/pages/WidgetGallery.tsx
CHANGED
|
@@ -10,15 +10,15 @@ import GlitchText from '@/components/GlitchText';
|
|
| 10 |
import ConfigurableWidget from '@/components/ConfigurableWidget';
|
| 11 |
import { cn } from '@/lib/utils';
|
| 12 |
|
| 13 |
-
// Import Neural Ascension widgets (
|
| 14 |
-
import MasterControl from '
|
| 15 |
-
import SEGA from '
|
| 16 |
-
import THG from '
|
| 17 |
-
import SCE from '
|
| 18 |
-
import NSQI from '
|
| 19 |
-
import PTAM from '
|
| 20 |
-
import { CDMM, APD, MSH, QEK, CCA } from '
|
| 21 |
-
import DataInsightsHub from '
|
| 22 |
|
| 23 |
// Information Widgets
|
| 24 |
const NewsFeedWidget = () => {
|
|
|
|
| 10 |
import ConfigurableWidget from '@/components/ConfigurableWidget';
|
| 11 |
import { cn } from '@/lib/utils';
|
| 12 |
|
| 13 |
+
// Import Neural Ascension widgets (local copy)
|
| 14 |
+
import MasterControl from '@/widgets/NeuralAscension/MasterControl';
|
| 15 |
+
import SEGA from '@/widgets/NeuralAscension/SEGA';
|
| 16 |
+
import THG from '@/widgets/NeuralAscension/THG';
|
| 17 |
+
import SCE from '@/widgets/NeuralAscension/SCE';
|
| 18 |
+
import NSQI from '@/widgets/NeuralAscension/NSQI';
|
| 19 |
+
import PTAM from '@/widgets/NeuralAscension/PTAM';
|
| 20 |
+
import { CDMM, APD, MSH, QEK, CCA } from '@/widgets/NeuralAscension/RestWidgets';
|
| 21 |
+
import DataInsightsHub from '@/widgets/DataInsightsHub';
|
| 22 |
|
| 23 |
// Information Widgets
|
| 24 |
const NewsFeedWidget = () => {
|
apps/matrix-frontend/src/widgets/DataInsightsHub.tsx
ADDED
|
@@ -0,0 +1,383 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/**
|
| 2 |
+
* 🧠 DATA & INDSIGTER CENTRAL - NEURAL CORTEX
|
| 3 |
+
* Central hjerne for hele WidgeTDC økosystemet
|
| 4 |
+
* Event-drevet arkitektur der orkestrer alle widgets
|
| 5 |
+
*/
|
| 6 |
+
|
| 7 |
+
import React, { useState, useEffect } from 'react';
|
| 8 |
+
import { Database, Archive, BookOpen, Search, Filter, Download, Upload, FolderOpen, FileText, BarChart3, Zap, Activity, TrendingUp } from 'lucide-react';
|
| 9 |
+
import { neuralEventBus, useNeuralEvent, emitNeuralEvent } from './NeuralEventBus';
|
| 10 |
+
|
| 11 |
+
interface DataSource {
|
| 12 |
+
id: string;
|
| 13 |
+
name: string;
|
| 14 |
+
type: 'database' | 'archive' | 'library' | 'insights';
|
| 15 |
+
itemCount: number;
|
| 16 |
+
lastUpdated: string;
|
| 17 |
+
size: string;
|
| 18 |
+
health: 'healthy' | 'degraded' | 'offline';
|
| 19 |
+
}
|
| 20 |
+
|
| 21 |
+
interface LiveEvent {
|
| 22 |
+
id: string;
|
| 23 |
+
type: string;
|
| 24 |
+
source: string;
|
| 25 |
+
message: string;
|
| 26 |
+
timestamp: string;
|
| 27 |
+
priority: 'low' | 'medium' | 'high' | 'critical';
|
| 28 |
+
}
|
| 29 |
+
|
| 30 |
+
export default function DataInsightsHub() {
|
| 31 |
+
const [activeView, setActiveView] = useState<'sources' | 'search' | 'insights' | 'live'>('sources');
|
| 32 |
+
const [searchQuery, setSearchQuery] = useState('');
|
| 33 |
+
const [liveEvents, setLiveEvents] = useState<LiveEvent[]>([]);
|
| 34 |
+
const [autoEnrichmentActive, setAutoEnrichmentActive] = useState(true);
|
| 35 |
+
|
| 36 |
+
// Listen to all neural events for live feed
|
| 37 |
+
useNeuralEvent('pattern_found', (event) => {
|
| 38 |
+
addLiveEvent({
|
| 39 |
+
type: 'pattern_found',
|
| 40 |
+
source: event.source,
|
| 41 |
+
message: `New pattern discovered: ${JSON.stringify(event.data).slice(0, 50)}...`,
|
| 42 |
+
priority: 'medium'
|
| 43 |
+
});
|
| 44 |
+
});
|
| 45 |
+
|
| 46 |
+
useNeuralEvent('anomaly_detected', (event) => {
|
| 47 |
+
addLiveEvent({
|
| 48 |
+
type: 'anomaly_detected',
|
| 49 |
+
source: event.source,
|
| 50 |
+
message: `Anomaly in ${event.source}: ${event.data.description}`,
|
| 51 |
+
priority: 'high'
|
| 52 |
+
});
|
| 53 |
+
});
|
| 54 |
+
|
| 55 |
+
useNeuralEvent('threat_detected', (event) => {
|
| 56 |
+
addLiveEvent({
|
| 57 |
+
type: 'threat_detected',
|
| 58 |
+
source: event.source,
|
| 59 |
+
message: `⚠️ Security threat: ${event.data.threatType}`,
|
| 60 |
+
priority: 'critical'
|
| 61 |
+
});
|
| 62 |
+
});
|
| 63 |
+
|
| 64 |
+
useNeuralEvent('insight_generated', (event) => {
|
| 65 |
+
addLiveEvent({
|
| 66 |
+
type: 'insight_generated',
|
| 67 |
+
source: event.source,
|
| 68 |
+
message: `💡 ${event.data.insight}`,
|
| 69 |
+
priority: 'medium'
|
| 70 |
+
});
|
| 71 |
+
});
|
| 72 |
+
|
| 73 |
+
const addLiveEvent = (event: Omit<LiveEvent, 'id' | 'timestamp'>) => {
|
| 74 |
+
const newEvent: LiveEvent = {
|
| 75 |
+
...event,
|
| 76 |
+
id: `evt_${Date.now()}`,
|
| 77 |
+
timestamp: new Date().toISOString()
|
| 78 |
+
};
|
| 79 |
+
|
| 80 |
+
setLiveEvents(prev => [newEvent, ...prev].slice(0, 50)); // Keep last 50 events
|
| 81 |
+
};
|
| 82 |
+
|
| 83 |
+
// Simulated real-time data (replace with actual backend calls)
|
| 84 |
+
const [dataSources, setDataSources] = useState<DataSource[]>([
|
| 85 |
+
{ id: 'neo4j', name: 'Neo4j Knowledge Graph', type: 'database', itemCount: 90482, lastUpdated: '2 min ago', size: '2.3 GB', health: 'healthy' },
|
| 86 |
+
{ id: 'pgvector', name: 'Vector Embeddings', type: 'database', itemCount: 145230, lastUpdated: '5 min ago', size: '1.8 GB', health: 'healthy' },
|
| 87 |
+
{ id: 'hyperlog', name: 'HyperLog Archives', type: 'archive', itemCount: 52341, lastUpdated: '1 hour ago', size: '890 MB', health: 'healthy' },
|
| 88 |
+
{ id: 'omniharvest', name: 'Omni-Harvester Data', type: 'archive', itemCount: 412463, lastUpdated: '3 hours ago', size: '5.2 GB', health: 'healthy' },
|
| 89 |
+
{ id: 'documents', name: 'Document Library', type: 'library', itemCount: 8234, lastUpdated: 'Yesterday', size: '1.1 GB', health: 'healthy' },
|
| 90 |
+
{ id: 'insights', name: 'AI Insights Engine', type: 'insights', itemCount: 3421, lastUpdated: 'Today', size: '234 MB', health: 'healthy' },
|
| 91 |
+
]);
|
| 92 |
+
|
| 93 |
+
const quickActions = [
|
| 94 |
+
{ name: 'Export All', icon: Download, color: 'blue', action: () => handleExport() },
|
| 95 |
+
{ name: 'Import Data', icon: Upload, color: 'green', action: () => handleImport() },
|
| 96 |
+
{ name: 'Deep Search', icon: Search, color: 'purple', action: () => setActiveView('search') },
|
| 97 |
+
{ name: 'Generate Report', icon: BarChart3, color: 'orange', action: () => generateReport() },
|
| 98 |
+
];
|
| 99 |
+
|
| 100 |
+
const handleExport = () => {
|
| 101 |
+
emitNeuralEvent('data_discovered', 'DataInsightsHub', {
|
| 102 |
+
action: 'export_initiated',
|
| 103 |
+
sources: dataSources.map(s => s.id)
|
| 104 |
+
}, { priority: 'medium' });
|
| 105 |
+
addLiveEvent({
|
| 106 |
+
type: 'data_discovered',
|
| 107 |
+
source: 'DataInsightsHub',
|
| 108 |
+
message: 'Export initiated for all data sources',
|
| 109 |
+
priority: 'low'
|
| 110 |
+
});
|
| 111 |
+
};
|
| 112 |
+
|
| 113 |
+
const handleImport = () => {
|
| 114 |
+
emitNeuralEvent('data_discovered', 'DataInsightsHub', {
|
| 115 |
+
action: 'import_initiated'
|
| 116 |
+
}, { priority: 'medium' });
|
| 117 |
+
};
|
| 118 |
+
|
| 119 |
+
const generateReport = () => {
|
| 120 |
+
emitNeuralEvent('insight_generated', 'DataInsightsHub', {
|
| 121 |
+
insight: 'Comprehensive data report generated',
|
| 122 |
+
timestamp: new Date().toISOString()
|
| 123 |
+
}, { priority: 'low' });
|
| 124 |
+
};
|
| 125 |
+
|
| 126 |
+
return (
|
| 127 |
+
<div className="h-full bg-gradient-to-br from-gray-900 via-blue-950 to-black text-white p-6 overflow-auto">
|
| 128 |
+
{/* Header with Live Activity Indicator */}
|
| 129 |
+
<div className="mb-6">
|
| 130 |
+
<div className="flex items-center justify-between mb-2">
|
| 131 |
+
<h1 className="text-3xl font-bold flex items-center gap-3">
|
| 132 |
+
<Database className="text-blue-400" />
|
| 133 |
+
Data & Indsigter Central
|
| 134 |
+
<span className="text-xs bg-blue-600 px-2 py-1 rounded-full">NEURAL CORTEX</span>
|
| 135 |
+
</h1>
|
| 136 |
+
<div className="flex items-center gap-2">
|
| 137 |
+
<Activity className="text-green-400 animate-pulse" />
|
| 138 |
+
<span className="text-green-400 text-sm">Live</span>
|
| 139 |
+
</div>
|
| 140 |
+
</div>
|
| 141 |
+
<p className="text-blue-300">Central hjerne for hele økosystemet - Event-drevet intelligence</p>
|
| 142 |
+
</div>
|
| 143 |
+
|
| 144 |
+
{/* Auto-Enrichment Toggle */}
|
| 145 |
+
<div className="mb-4 flex items-center gap-3 bg-blue-900/30 p-3 rounded-lg border border-blue-500/30">
|
| 146 |
+
<Zap className={autoEnrichmentActive ? 'text-yellow-400' : 'text-gray-400'} />
|
| 147 |
+
<span className="font-semibold">Auto-Enrichment</span>
|
| 148 |
+
<button
|
| 149 |
+
onClick={() => setAutoEnrichmentActive(!autoEnrichmentActive)}
|
| 150 |
+
className={`ml-auto px-4 py-1 rounded-lg transition-all ${
|
| 151 |
+
autoEnrichmentActive
|
| 152 |
+
? 'bg-green-600 hover:bg-green-700'
|
| 153 |
+
: 'bg-gray-600 hover:bg-gray-700'
|
| 154 |
+
}`}
|
| 155 |
+
>
|
| 156 |
+
{autoEnrichmentActive ? 'Active' : 'Inactive'}
|
| 157 |
+
</button>
|
| 158 |
+
</div>
|
| 159 |
+
|
| 160 |
+
{/* Quick Actions */}
|
| 161 |
+
<div className="grid grid-cols-4 gap-3 mb-6">
|
| 162 |
+
{quickActions.map((action, i) => (
|
| 163 |
+
<button
|
| 164 |
+
key={i}
|
| 165 |
+
onClick={action.action}
|
| 166 |
+
className={`bg-${action.color}-900/30 hover:bg-${action.color}-800/50 border border-${action.color}-500/30 hover:border-${action.color}-500/60 p-4 rounded-lg transition-all flex items-center gap-3`}
|
| 167 |
+
>
|
| 168 |
+
<action.icon className={`text-${action.color}-400`} />
|
| 169 |
+
<span className="text-sm font-semibold">{action.name}</span>
|
| 170 |
+
</button>
|
| 171 |
+
))}
|
| 172 |
+
</div>
|
| 173 |
+
|
| 174 |
+
{/* Search Bar */}
|
| 175 |
+
<div className="mb-6">
|
| 176 |
+
<div className="relative">
|
| 177 |
+
<Search className="absolute left-4 top-1/2 transform -translate-y-1/2 text-gray-400" />
|
| 178 |
+
<input
|
| 179 |
+
type="text"
|
| 180 |
+
placeholder="Intelligent search across all data sources..."
|
| 181 |
+
className="w-full pl-12 pr-4 py-3 bg-black/50 border border-blue-500/30 rounded-lg focus:outline-none focus:border-blue-500 text-white"
|
| 182 |
+
value={searchQuery}
|
| 183 |
+
onChange={(e) => setSearchQuery(e.target.value)}
|
| 184 |
+
onKeyPress={(e) => {
|
| 185 |
+
if (e.key === 'Enter' && searchQuery) {
|
| 186 |
+
emitNeuralEvent('data_discovered', 'DataInsightsHub', {
|
| 187 |
+
query: searchQuery,
|
| 188 |
+
timestamp: new Date().toISOString()
|
| 189 |
+
}, { priority: 'medium' });
|
| 190 |
+
}
|
| 191 |
+
}}
|
| 192 |
+
/>
|
| 193 |
+
</div>
|
| 194 |
+
</div>
|
| 195 |
+
|
| 196 |
+
{/* View Tabs */}
|
| 197 |
+
<div className="flex gap-2 mb-6">
|
| 198 |
+
{[
|
| 199 |
+
{ id: 'sources', label: 'Sources', icon: Database },
|
| 200 |
+
{ id: 'search', label: 'Search', icon: Search },
|
| 201 |
+
{ id: 'insights', label: 'Insights', icon: BarChart3 },
|
| 202 |
+
{ id: 'live', label: 'Live Feed', icon: Activity }
|
| 203 |
+
].map((view) => (
|
| 204 |
+
<button
|
| 205 |
+
key={view.id}
|
| 206 |
+
onClick={() => setActiveView(view.id as any)}
|
| 207 |
+
className={`px-6 py-2 rounded-lg font-semibold transition-all flex items-center gap-2 ${
|
| 208 |
+
activeView === view.id
|
| 209 |
+
? 'bg-blue-600 text-white'
|
| 210 |
+
: 'bg-blue-900/30 text-blue-300 hover:bg-blue-800/50'
|
| 211 |
+
}`}
|
| 212 |
+
>
|
| 213 |
+
<view.icon className="w-4 h-4" />
|
| 214 |
+
{view.label}
|
| 215 |
+
</button>
|
| 216 |
+
))}
|
| 217 |
+
</div>
|
| 218 |
+
|
| 219 |
+
{/* Content Based on Active View */}
|
| 220 |
+
{activeView === 'sources' && (
|
| 221 |
+
<div className="grid grid-cols-2 gap-4">
|
| 222 |
+
{dataSources.map((source) => (
|
| 223 |
+
<div
|
| 224 |
+
key={source.id}
|
| 225 |
+
className="bg-black/50 p-5 rounded-lg border border-blue-500/30 hover:border-blue-500/60 transition-all cursor-pointer"
|
| 226 |
+
>
|
| 227 |
+
<div className="flex items-center justify-between mb-3">
|
| 228 |
+
<div className="flex items-center gap-3">
|
| 229 |
+
{source.type === 'database' && <Database className="text-blue-400" />}
|
| 230 |
+
{source.type === 'archive' && <Archive className="text-purple-400" />}
|
| 231 |
+
{source.type === 'library' && <BookOpen className="text-green-400" />}
|
| 232 |
+
{source.type === 'insights' && <BarChart3 className="text-orange-400" />}
|
| 233 |
+
<div>
|
| 234 |
+
<h3 className="font-semibold">{source.name}</h3>
|
| 235 |
+
<p className="text-xs text-gray-400 capitalize flex items-center gap-2">
|
| 236 |
+
{source.type}
|
| 237 |
+
<span className={`w-2 h-2 rounded-full ${
|
| 238 |
+
source.health === 'healthy' ? 'bg-green-400' :
|
| 239 |
+
source.health === 'degraded' ? 'bg-yellow-400' :
|
| 240 |
+
'bg-red-400'
|
| 241 |
+
}`} />
|
| 242 |
+
</p>
|
| 243 |
+
</div>
|
| 244 |
+
</div>
|
| 245 |
+
<FolderOpen className="text-gray-400 hover:text-blue-400 transition-colors" />
|
| 246 |
+
</div>
|
| 247 |
+
|
| 248 |
+
<div className="grid grid-cols-3 gap-2 text-sm">
|
| 249 |
+
<div>
|
| 250 |
+
<div className="text-gray-400 text-xs">Items</div>
|
| 251 |
+
<div className="font-semibold">{source.itemCount.toLocaleString()}</div>
|
| 252 |
+
</div>
|
| 253 |
+
<div>
|
| 254 |
+
<div className="text-gray-400 text-xs">Size</div>
|
| 255 |
+
<div className="font-semibold">{source.size}</div>
|
| 256 |
+
</div>
|
| 257 |
+
<div>
|
| 258 |
+
<div className="text-gray-400 text-xs">Updated</div>
|
| 259 |
+
<div className="font-semibold text-green-400">{source.lastUpdated}</div>
|
| 260 |
+
</div>
|
| 261 |
+
</div>
|
| 262 |
+
</div>
|
| 263 |
+
))}
|
| 264 |
+
</div>
|
| 265 |
+
)}
|
| 266 |
+
|
| 267 |
+
{activeView === 'search' && (
|
| 268 |
+
<div className="bg-black/50 p-6 rounded-lg border border-blue-500/30">
|
| 269 |
+
<h3 className="text-lg font-semibold mb-4 flex items-center gap-2">
|
| 270 |
+
<Filter className="text-blue-400" />
|
| 271 |
+
Avancerede Søgefiltre
|
| 272 |
+
</h3>
|
| 273 |
+
|
| 274 |
+
<div className="grid grid-cols-2 gap-4 mb-4">
|
| 275 |
+
<div>
|
| 276 |
+
<label className="block text-sm text-gray-400 mb-2">Data Type</label>
|
| 277 |
+
<select className="w-full bg-gray-800 border border-blue-500/30 rounded-lg px-3 py-2">
|
| 278 |
+
<option>All Types</option>
|
| 279 |
+
<option>Database</option>
|
| 280 |
+
<option>Archive</option>
|
| 281 |
+
<option>Library</option>
|
| 282 |
+
<option>Insights</option>
|
| 283 |
+
</select>
|
| 284 |
+
</div>
|
| 285 |
+
|
| 286 |
+
<div>
|
| 287 |
+
<label className="block text-sm text-gray-400 mb-2">Date Range</label>
|
| 288 |
+
<select className="w-full bg-gray-800 border border-blue-500/30 rounded-lg px-3 py-2">
|
| 289 |
+
<option>Last 24 hours</option>
|
| 290 |
+
<option>Last 7 days</option>
|
| 291 |
+
<option>Last 30 days</option>
|
| 292 |
+
<option>All time</option>
|
| 293 |
+
</select>
|
| 294 |
+
</div>
|
| 295 |
+
</div>
|
| 296 |
+
|
| 297 |
+
<button
|
| 298 |
+
onClick={() => {
|
| 299 |
+
emitNeuralEvent('data_discovered', 'DataInsightsHub', {
|
| 300 |
+
searchType: 'advanced',
|
| 301 |
+
filters: { /* add filters */ }
|
| 302 |
+
}, { priority: 'high' });
|
| 303 |
+
}}
|
| 304 |
+
className="w-full bg-blue-600 hover:bg-blue-700 text-white font-semibold py-3 rounded-lg transition-colors"
|
| 305 |
+
>
|
| 306 |
+
Execute Advanced Search
|
| 307 |
+
</button>
|
| 308 |
+
</div>
|
| 309 |
+
)}
|
| 310 |
+
|
| 311 |
+
{activeView === 'insights' && (
|
| 312 |
+
<div className="space-y-4">
|
| 313 |
+
{[
|
| 314 |
+
{ title: 'Top Growing Topics', value: '127 new entities last hour', trend: '+23%', color: 'green' },
|
| 315 |
+
{ title: 'Most Connected Nodes', value: 'Persona nodes with 450+ connections', trend: '+15%', color: 'blue' },
|
| 316 |
+
{ title: 'Data Quality Score', value: '94.2% integrity verified', trend: '+2.1%', color: 'purple' },
|
| 317 |
+
{ title: 'Storage Optimization', value: '1.2 GB can be compressed', trend: 'Recommend', color: 'orange' },
|
| 318 |
+
].map((insight, i) => (
|
| 319 |
+
<div key={i} className={`bg-black/50 p-4 rounded-lg border border-${insight.color}-500/30`}>
|
| 320 |
+
<div className="flex items-center justify-between">
|
| 321 |
+
<div className="flex items-center gap-3">
|
| 322 |
+
<TrendingUp className={`text-${insight.color}-400`} />
|
| 323 |
+
<div>
|
| 324 |
+
<h4 className="font-semibold">{insight.title}</h4>
|
| 325 |
+
<p className="text-sm text-gray-400 mt-1">{insight.value}</p>
|
| 326 |
+
</div>
|
| 327 |
+
</div>
|
| 328 |
+
<span className={`text-${insight.color}-400 font-semibold`}>{insight.trend}</span>
|
| 329 |
+
</div>
|
| 330 |
+
</div>
|
| 331 |
+
))}
|
| 332 |
+
</div>
|
| 333 |
+
)}
|
| 334 |
+
|
| 335 |
+
{activeView === 'live' && (
|
| 336 |
+
<div className="space-y-2 max-h-[600px] overflow-y-auto">
|
| 337 |
+
<h3 className="text-lg font-semibold mb-4 flex items-center gap-2 sticky top-0 bg-gray-900 pb-2">
|
| 338 |
+
<Activity className="text-green-400" />
|
| 339 |
+
Live Neural Activity Feed
|
| 340 |
+
</h3>
|
| 341 |
+
|
| 342 |
+
{liveEvents.length === 0 && (
|
| 343 |
+
<div className="text-center text-gray-400 py-8">
|
| 344 |
+
No events yet. Waiting for neural activity...
|
| 345 |
+
</div>
|
| 346 |
+
)}
|
| 347 |
+
|
| 348 |
+
{liveEvents.map((event) => (
|
| 349 |
+
<div
|
| 350 |
+
key={event.id}
|
| 351 |
+
className={`p-3 rounded-lg border ${
|
| 352 |
+
event.priority === 'critical' ? 'bg-red-900/30 border-red-500/50' :
|
| 353 |
+
event.priority === 'high' ? 'bg-orange-900/30 border-orange-500/50' :
|
| 354 |
+
event.priority === 'medium' ? 'bg-blue-900/30 border-blue-500/30' :
|
| 355 |
+
'bg-gray-900/30 border-gray-500/30'
|
| 356 |
+
}`}
|
| 357 |
+
>
|
| 358 |
+
<div className="flex items-start justify-between">
|
| 359 |
+
<div className="flex-1">
|
| 360 |
+
<div className="flex items-center gap-2 mb-1">
|
| 361 |
+
<span className="text-xs font-semibold text-gray-400">{event.source}</span>
|
| 362 |
+
<span className={`text-xs px-2 py-0.5 rounded ${
|
| 363 |
+
event.priority === 'critical' ? 'bg-red-600' :
|
| 364 |
+
event.priority === 'high' ? 'bg-orange-600' :
|
| 365 |
+
event.priority === 'medium' ? 'bg-blue-600' :
|
| 366 |
+
'bg-gray-600'
|
| 367 |
+
}`}>
|
| 368 |
+
{event.priority}
|
| 369 |
+
</span>
|
| 370 |
+
</div>
|
| 371 |
+
<p className="text-sm">{event.message}</p>
|
| 372 |
+
</div>
|
| 373 |
+
<span className="text-xs text-gray-500">
|
| 374 |
+
{new Date(event.timestamp).toLocaleTimeString()}
|
| 375 |
+
</span>
|
| 376 |
+
</div>
|
| 377 |
+
</div>
|
| 378 |
+
))}
|
| 379 |
+
</div>
|
| 380 |
+
)}
|
| 381 |
+
</div>
|
| 382 |
+
);
|
| 383 |
+
}
|
apps/matrix-frontend/src/widgets/NeuralAscension/MasterControl.tsx
ADDED
|
@@ -0,0 +1,135 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/**
|
| 2 |
+
* 🌌 NEURAL ASCENSION MASTER CONTROL
|
| 3 |
+
* Central command for all 10 transformation points
|
| 4 |
+
* Theoretical Maximum: 59,049x lift | Conservative Goal: 1,000x
|
| 5 |
+
*/
|
| 6 |
+
|
| 7 |
+
import React, { useState } from 'react';
|
| 8 |
+
import { Rocket, TrendingUp, Zap, Target, CheckCircle, Activity } from 'lucide-react';
|
| 9 |
+
|
| 10 |
+
interface TransformationPoint {
|
| 11 |
+
id: string;
|
| 12 |
+
name: string;
|
| 13 |
+
status: 'active' | 'standby' | 'initializing';
|
| 14 |
+
progress: number;
|
| 15 |
+
lift: number;
|
| 16 |
+
color: string;
|
| 17 |
+
}
|
| 18 |
+
|
| 19 |
+
export default function MasterControl() {
|
| 20 |
+
const [points, setPoints] = useState<TransformationPoint[]>([
|
| 21 |
+
{ id: 'SEGA', name: 'Self-Evolving Graph Architecture', status: 'active', progress: 78, lift: 2.3, color: 'purple' },
|
| 22 |
+
{ id: 'THG', name: 'Temporal Hypergraphs', status: 'active', progress: 65, lift: 1.9, color: 'cyan' },
|
| 23 |
+
{ id: 'SCE', name: 'Swarm Consciousness Emergence', status: 'active', progress: 92, lift: 3.1, color: 'green' },
|
| 24 |
+
{ id: 'NSQI', name: 'Neuro-Symbolic Quantum Inference', status: 'initializing', progress: 34, lift: 1.2, color: 'violet' },
|
| 25 |
+
{ id: 'PTAM', name: 'Predictive Threat Anticipation', status: 'standby', progress: 0, lift: 1.0, color: 'red' },
|
| 26 |
+
{ id: 'CDMM', name: 'Cognitive Dark Matter Mapping', status: 'standby', progress: 0, lift: 1.0, color: 'indigo' },
|
| 27 |
+
{ id: 'APD', name: 'Autonomous Paradigm Discovery', status: 'standby', progress: 0, lift: 1.0, color: 'yellow' },
|
| 28 |
+
{ id: 'MSH', name: 'Morphogenetic Self-Healing', status: 'standby', progress: 0, lift: 1.0, color: 'emerald' },
|
| 29 |
+
{ id: 'QEK', name: 'Quantum-Entangled Knowledge', status: 'standby', progress: 0, lift: 1.0, color: 'blue' },
|
| 30 |
+
{ id: 'CCA', name: 'Cosmic-Contextual Awareness', status: 'standby', progress: 0, lift: 1.0, color: 'pink' },
|
| 31 |
+
]);
|
| 32 |
+
|
| 33 |
+
const totalLift = points.reduce((sum, p) => sum * p.lift, 1);
|
| 34 |
+
const avgProgress = points.reduce((sum, p) => sum + p.progress, 0) / points.length;
|
| 35 |
+
|
| 36 |
+
return (
|
| 37 |
+
<div className="h-full bg-gradient-to-br from-gray-950 via-purple-950 to-black text-white p-6 overflow-auto">
|
| 38 |
+
{/* Header */}
|
| 39 |
+
<div className="mb-6">
|
| 40 |
+
<h1 className="text-3xl font-bold flex items-center gap-3 mb-2">
|
| 41 |
+
<Rocket className="text-purple-400" />
|
| 42 |
+
NEURAL ASCENSION MASTER CONTROL
|
| 43 |
+
</h1>
|
| 44 |
+
<p className="text-purple-300">Central Command • 10 Transformation Points • Cognitive Singularity</p>
|
| 45 |
+
</div>
|
| 46 |
+
|
| 47 |
+
{/* Global Metrics */}
|
| 48 |
+
<div className="grid grid-cols-4 gap-4 mb-6">
|
| 49 |
+
<div className="bg-purple-900/30 p-4 rounded-lg border border-purple-500/30">
|
| 50 |
+
<div className="flex items-center gap-2 mb-2">
|
| 51 |
+
<Target className="text-purple-400" />
|
| 52 |
+
<span className="text-sm text-gray-400">Total Lift</span>
|
| 53 |
+
</div>
|
| 54 |
+
<div className="text-3xl font-bold">{totalLift.toFixed(1)}x</div>
|
| 55 |
+
<div className="text-xs text-green-400 mt-1">Target: 1,000x</div>
|
| 56 |
+
</div>
|
| 57 |
+
|
| 58 |
+
<div className="bg-green-900/30 p-4 rounded-lg border border-green-500/30">
|
| 59 |
+
<div className="flex items-center gap-2 mb-2">
|
| 60 |
+
<TrendingUp className="text-green-400" />
|
| 61 |
+
<span className="text-sm text-gray-400">Avg Progress</span>
|
| 62 |
+
</div>
|
| 63 |
+
<div className="text-3xl font-bold">{avgProgress.toFixed(0)}%</div>
|
| 64 |
+
<div className="text-xs text-green-400 mt-1">+12% today</div>
|
| 65 |
+
</div>
|
| 66 |
+
|
| 67 |
+
<div className="bg-blue-900/30 p-4 rounded-lg border border-blue-500/30">
|
| 68 |
+
<div className="flex items-center gap-2 mb-2">
|
| 69 |
+
<CheckCircle className="text-blue-400" />
|
| 70 |
+
<span className="text-sm text-gray-400">Active Points</span>
|
| 71 |
+
</div>
|
| 72 |
+
<div className="text-3xl font-bold">{points.filter(p => p.status === 'active').length}/10</div>
|
| 73 |
+
<div className="text-xs text-blue-400 mt-1">3 operational</div>
|
| 74 |
+
</div>
|
| 75 |
+
|
| 76 |
+
<div className="bg-orange-900/30 p-4 rounded-lg border border-orange-500/30">
|
| 77 |
+
<div className="flex items-center gap-2 mb-2">
|
| 78 |
+
<Zap className="text-orange-400" />
|
| 79 |
+
<span className="text-sm text-gray-400">System Status</span>
|
| 80 |
+
</div>
|
| 81 |
+
<div className="text-3xl font-bold">EVOLVING</div>
|
| 82 |
+
<div className="text-xs text-orange-400 mt-1">All systems nominal</div>
|
| 83 |
+
</div>
|
| 84 |
+
</div>
|
| 85 |
+
|
| 86 |
+
{/* Transformation Points Grid */}
|
| 87 |
+
<div className="space-y-3">
|
| 88 |
+
{points.map((point) => (
|
| 89 |
+
<div
|
| 90 |
+
key={point.id}
|
| 91 |
+
className={`bg-black/50 p-4 rounded-lg border border-${point.color}-500/30 hover:border-${point.color}-500/60 transition-all`}
|
| 92 |
+
>
|
| 93 |
+
<div className="flex items-center justify-between mb-2">
|
| 94 |
+
<div className="flex items-center gap-3">
|
| 95 |
+
<span className="text-lg font-bold text-${point.color}-400">{point.id}</span>
|
| 96 |
+
<span className="text-sm">{point.name}</span>
|
| 97 |
+
</div>
|
| 98 |
+
<div className="flex items-center gap-3">
|
| 99 |
+
<span className={`px-3 py-1 rounded-full text-xs font-semibold ${
|
| 100 |
+
point.status === 'active' ? 'bg-green-600' :
|
| 101 |
+
point.status === 'initializing' ? 'bg-yellow-600' : 'bg-gray-600'
|
| 102 |
+
}`}>
|
| 103 |
+
{point.status.toUpperCase()}
|
| 104 |
+
</span>
|
| 105 |
+
<span className="text-lg font-bold">{point.lift.toFixed(1)}x</span>
|
| 106 |
+
</div>
|
| 107 |
+
</div>
|
| 108 |
+
|
| 109 |
+
{/* Progress Bar */}
|
| 110 |
+
<div className="w-full bg-gray-800 rounded-full h-2 overflow-hidden">
|
| 111 |
+
<div
|
| 112 |
+
className={`h-full bg-gradient-to-r from-${point.color}-600 to-${point.color}-400 transition-all`}
|
| 113 |
+
style={{ width: `${point.progress}%` }}
|
| 114 |
+
/>
|
| 115 |
+
</div>
|
| 116 |
+
<div className="text-xs text-gray-400 mt-1">{point.progress}% complete</div>
|
| 117 |
+
</div>
|
| 118 |
+
))}
|
| 119 |
+
</div>
|
| 120 |
+
|
| 121 |
+
{/* Launch Controls */}
|
| 122 |
+
<div className="mt-6 grid grid-cols-3 gap-4">
|
| 123 |
+
<button className="bg-green-600 hover:bg-green-700 text-white font-bold py-3 px-6 rounded-lg transition-colors">
|
| 124 |
+
ACTIVATE ALL
|
| 125 |
+
</button>
|
| 126 |
+
<button className="bg-purple-600 hover:bg-purple-700 text-white font-bold py-3 px-6 rounded-lg transition-colors">
|
| 127 |
+
OPTIMIZE
|
| 128 |
+
</button>
|
| 129 |
+
<button className="bg-red-600 hover:bg-red-700 text-white font-bold py-3 px-6 rounded-lg transition-colors">
|
| 130 |
+
EMERGENCY STOP
|
| 131 |
+
</button>
|
| 132 |
+
</div>
|
| 133 |
+
</div>
|
| 134 |
+
);
|
| 135 |
+
}
|
apps/matrix-frontend/src/widgets/NeuralAscension/NSQI.tsx
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
// NSQI.tsx - Neuro-Symbolic Quantum Inference
|
| 2 |
+
import React from 'react';
|
| 3 |
+
import { Sparkles } from 'lucide-react';
|
| 4 |
+
|
| 5 |
+
export default function NSQI() {
|
| 6 |
+
return (
|
| 7 |
+
<div className="h-full bg-gradient-to-br from-violet-950 via-purple-950 to-black text-white p-6">
|
| 8 |
+
<h2 className="text-2xl font-bold flex items-center gap-2 mb-4">
|
| 9 |
+
<Sparkles className="text-violet-400" />
|
| 10 |
+
NSQI - Quantum Inference
|
| 11 |
+
</h2>
|
| 12 |
+
<div className="text-violet-300">Combining symbolic logic with neural embeddings for 200% faster reasoning</div>
|
| 13 |
+
</div>
|
| 14 |
+
);
|
| 15 |
+
}
|
apps/matrix-frontend/src/widgets/NeuralAscension/PTAM.tsx
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
// PTAM.tsx - Predictive Threat Anticipation Matrix
|
| 2 |
+
import React from 'react';
|
| 3 |
+
import { Shield } from 'lucide-react';
|
| 4 |
+
|
| 5 |
+
export default function PTAM() {
|
| 6 |
+
return (
|
| 7 |
+
<div className="h-full bg-gradient-to-br from-red-950 via-orange-950 to-black text-white p-6">
|
| 8 |
+
<h2 className="text-2xl font-bold flex items-center gap-2 mb-4">
|
| 9 |
+
<Shield className="text-red-400" />
|
| 10 |
+
PTAM - Threat Anticipation
|
| 11 |
+
</h2>
|
| 12 |
+
<div className="bg-red-900/30 p-4 rounded-lg">
|
| 13 |
+
<div className="text-red-300">Active Threat Detection: 24/7</div>
|
| 14 |
+
<div className="mt-2 text-sm">Predicting security incidents before they occur</div>
|
| 15 |
+
</div>
|
| 16 |
+
</div>
|
| 17 |
+
);
|
| 18 |
+
}
|
apps/matrix-frontend/src/widgets/NeuralAscension/RestWidgets.tsx
ADDED
|
@@ -0,0 +1,68 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
// CDMM.tsx - Cognitive Dark Matter Mapping
|
| 2 |
+
// APD.tsx - Autonomous Paradigm Discovery
|
| 3 |
+
// MSH.tsx - Morphogenetic Self-Healing
|
| 4 |
+
// QEK.tsx - Quantum-Entangled Knowledge
|
| 5 |
+
// CCA.tsx - Cosmic-Contextual Awareness
|
| 6 |
+
|
| 7 |
+
import React from 'react';
|
| 8 |
+
import { Moon, Lightbulb, Heart, Link, Globe } from 'lucide-react';
|
| 9 |
+
|
| 10 |
+
export function CDMM() {
|
| 11 |
+
return (
|
| 12 |
+
<div className="h-full bg-gradient-to-br from-indigo-950 to-black text-white p-6">
|
| 13 |
+
<h2 className="text-2xl font-bold flex items-center gap-2">
|
| 14 |
+
<Moon className="text-indigo-400" />
|
| 15 |
+
CDMM - Dark Matter Mapping
|
| 16 |
+
</h2>
|
| 17 |
+
<p className="text-indigo-300 mt-2">Discovering hidden patterns in your knowledge graph</p>
|
| 18 |
+
</div>
|
| 19 |
+
);
|
| 20 |
+
}
|
| 21 |
+
|
| 22 |
+
export function APD() {
|
| 23 |
+
return (
|
| 24 |
+
<div className="h-full bg-gradient-to-br from-yellow-950 to-black text-white p-6">
|
| 25 |
+
<h2 className="text-2xl font-bold flex items-center gap-2">
|
| 26 |
+
<Lightbulb className="text-yellow-400" />
|
| 27 |
+
APD - Paradigm Discovery
|
| 28 |
+
</h2>
|
| 29 |
+
<p className="text-yellow-300 mt-2">Autonomous breakthrough detection and validation</p>
|
| 30 |
+
</div>
|
| 31 |
+
);
|
| 32 |
+
}
|
| 33 |
+
|
| 34 |
+
export function MSH() {
|
| 35 |
+
return (
|
| 36 |
+
<div className="h-full bg-gradient-to-br from-green-950 to-black text-white p-6">
|
| 37 |
+
<h2 className="text-2xl font-bold flex items-center gap-2">
|
| 38 |
+
<Heart className="text-green-400" />
|
| 39 |
+
MSH - Self-Healing
|
| 40 |
+
</h2>
|
| 41 |
+
<p className="text-green-300 mt-2">Auto-repair and optimization of system architecture</p>
|
| 42 |
+
</div>
|
| 43 |
+
);
|
| 44 |
+
}
|
| 45 |
+
|
| 46 |
+
export function QEK() {
|
| 47 |
+
return (
|
| 48 |
+
<div className="h-full bg-gradient-to-br from-cyan-950 to-black text-white p-6">
|
| 49 |
+
<h2 className="text-2xl font-bold flex items-center gap-2">
|
| 50 |
+
<Link className="text-cyan-400" />
|
| 51 |
+
QEK - Entangled Knowledge
|
| 52 |
+
</h2>
|
| 53 |
+
<p className="text-cyan-300 mt-2">Instantaneous knowledge sharing across nodes</p>
|
| 54 |
+
</div>
|
| 55 |
+
);
|
| 56 |
+
}
|
| 57 |
+
|
| 58 |
+
export function CCA() {
|
| 59 |
+
return (
|
| 60 |
+
<div className="h-full bg-gradient-to-br from-pink-950 to-black text-white p-6">
|
| 61 |
+
<h2 className="text-2xl font-bold flex items-center gap-2">
|
| 62 |
+
<Globe className="text-pink-400" />
|
| 63 |
+
CCA - Cosmic Awareness
|
| 64 |
+
</h2>
|
| 65 |
+
<p className="text-pink-300 mt-2">System-wide consciousness and meta-reasoning</p>
|
| 66 |
+
</div>
|
| 67 |
+
);
|
| 68 |
+
}
|
apps/matrix-frontend/src/widgets/NeuralAscension/SCE.tsx
ADDED
|
@@ -0,0 +1,51 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/**
|
| 2 |
+
* 🧠 SCE - Swarm Consciousness Emergence
|
| 3 |
+
* 8 Ollama Cloud models working as collective intelligence
|
| 4 |
+
*/
|
| 5 |
+
|
| 6 |
+
import React, { useState } from 'react';
|
| 7 |
+
import { Users, Zap, Brain, Activity } from 'lucide-react';
|
| 8 |
+
|
| 9 |
+
export default function SCE() {
|
| 10 |
+
const models = [
|
| 11 |
+
{ name: 'DeepSeek V3.1', status: 'active', tasks: 14 },
|
| 12 |
+
{ name: 'Qwen3 Coder', status: 'active', tasks: 8 },
|
| 13 |
+
{ name: 'Qwen3 VL', status: 'active', tasks: 6 },
|
| 14 |
+
{ name: 'GPT-OSS 120B', status: 'standby', tasks: 0 },
|
| 15 |
+
{ name: 'MiniMax M2', status: 'active', tasks: 12 },
|
| 16 |
+
];
|
| 17 |
+
|
| 18 |
+
return (
|
| 19 |
+
<div className="h-full bg-gradient-to-br from-green-950 via-emerald-950 to-black text-white p-6">
|
| 20 |
+
<h2 className="text-2xl font-bold flex items-center gap-2 mb-6">
|
| 21 |
+
<Users className="text-green-400" />
|
| 22 |
+
SCE - Swarm Consciousness
|
| 23 |
+
</h2>
|
| 24 |
+
|
| 25 |
+
<div className="grid grid-cols-2 gap-4 mb-6">
|
| 26 |
+
{models.map((model, i) => (
|
| 27 |
+
<div key={i} className="bg-black/50 p-4 rounded-lg border border-green-500/30">
|
| 28 |
+
<div className="flex items-center justify-between mb-2">
|
| 29 |
+
<span className="font-semibold">{model.name}</span>
|
| 30 |
+
<span className={`px-2 py-1 rounded text-xs ${
|
| 31 |
+
model.status === 'active' ? 'bg-green-600' : 'bg-gray-600'
|
| 32 |
+
}`}>
|
| 33 |
+
{model.status}
|
| 34 |
+
</span>
|
| 35 |
+
</div>
|
| 36 |
+
<div className="text-sm text-green-300">{model.tasks} active tasks</div>
|
| 37 |
+
</div>
|
| 38 |
+
))}
|
| 39 |
+
</div>
|
| 40 |
+
|
| 41 |
+
<div className="bg-green-900/30 p-4 rounded-lg">
|
| 42 |
+
<h4 className="font-semibold mb-2">Collective IQ: 1,247x Baseline</h4>
|
| 43 |
+
<div className="text-sm space-y-1 text-green-200">
|
| 44 |
+
<li>• Distributed reasoning across 5 models</li>
|
| 45 |
+
<li>• Real-time consensus verification</li>
|
| 46 |
+
<li>• Auto-task routing to best model</li>
|
| 47 |
+
</div>
|
| 48 |
+
</div>
|
| 49 |
+
</div>
|
| 50 |
+
);
|
| 51 |
+
}
|
apps/matrix-frontend/src/widgets/NeuralAscension/SEGA.tsx
ADDED
|
@@ -0,0 +1,183 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/**
|
| 2 |
+
* 🌀 SEGA - Self-Evolving Graph Architecture
|
| 3 |
+
* Transforms your static knowledge graph into a living, learning organism
|
| 4 |
+
* 200% lift: 90K nodes → 270K nodes adaptive capacity
|
| 5 |
+
*/
|
| 6 |
+
|
| 7 |
+
import React, { useState, useEffect } from 'react';
|
| 8 |
+
import { Activity, GitBranch, Zap, TrendingUp, Network, Database, Sparkles } from 'lucide-react';
|
| 9 |
+
|
| 10 |
+
interface SEGAMetrics {
|
| 11 |
+
totalNodes: number;
|
| 12 |
+
activeRules: number;
|
| 13 |
+
autoEvolutions: number;
|
| 14 |
+
learningRate: number;
|
| 15 |
+
graphDensity: number;
|
| 16 |
+
}
|
| 17 |
+
|
| 18 |
+
export default function SEGA() {
|
| 19 |
+
const [metrics, setMetrics] = useState<SEGAMetrics>({
|
| 20 |
+
totalNodes: 90482,
|
| 21 |
+
activeRules: 4148,
|
| 22 |
+
autoEvolutions: 127,
|
| 23 |
+
learningRate: 2.3,
|
| 24 |
+
graphDensity: 78.4
|
| 25 |
+
});
|
| 26 |
+
|
| 27 |
+
const [isEvolvingMode, setIsEvolvingMode] = useState(false);
|
| 28 |
+
const [evolutionLog, setEvolutionLog] = useState<string[]>([
|
| 29 |
+
'[SEGA] Initialization complete - Scanning graph topology...',
|
| 30 |
+
'[SEGA] Detected 4,148 personas ready for evolution',
|
| 31 |
+
'[SEGA] Auto-learning enabled - Observing interaction patterns'
|
| 32 |
+
]);
|
| 33 |
+
|
| 34 |
+
useEffect(() => {
|
| 35 |
+
if (isEvolvingMode) {
|
| 36 |
+
const interval = setInterval(() => {
|
| 37 |
+
setMetrics(prev => ({
|
| 38 |
+
...prev,
|
| 39 |
+
totalNodes: prev.totalNodes + Math.floor(Math.random() * 50),
|
| 40 |
+
autoEvolutions: prev.autoEvolutions + 1,
|
| 41 |
+
learningRate: Math.min(prev.learningRate + 0.1, 5.0),
|
| 42 |
+
graphDensity: Math.min(prev.graphDensity + 0.2, 95.0)
|
| 43 |
+
}));
|
| 44 |
+
|
| 45 |
+
const events = [
|
| 46 |
+
'New connection pattern discovered',
|
| 47 |
+
'Schema evolution triggered',
|
| 48 |
+
'Adaptive rule created',
|
| 49 |
+
'Relationship strength recalibrated',
|
| 50 |
+
'Persona capability expanded'
|
| 51 |
+
];
|
| 52 |
+
|
| 53 |
+
setEvolutionLog(prev => [
|
| 54 |
+
...prev.slice(-5),
|
| 55 |
+
`[SEGA] ${events[Math.floor(Math.random() * events.length)]}`
|
| 56 |
+
]);
|
| 57 |
+
}, 2000);
|
| 58 |
+
|
| 59 |
+
return () => clearInterval(interval);
|
| 60 |
+
}
|
| 61 |
+
}, [isEvolvingMode]);
|
| 62 |
+
|
| 63 |
+
return (
|
| 64 |
+
<div className="h-full bg-gradient-to-br from-purple-950 via-indigo-950 to-black text-white p-6 overflow-auto">
|
| 65 |
+
{/* Header */}
|
| 66 |
+
<div className="flex items-center justify-between mb-6">
|
| 67 |
+
<div>
|
| 68 |
+
<h2 className="text-2xl font-bold flex items-center gap-2">
|
| 69 |
+
<GitBranch className="text-purple-400" />
|
| 70 |
+
SEGA - Self-Evolving Graph Architecture
|
| 71 |
+
</h2>
|
| 72 |
+
<p className="text-purple-300 text-sm">Living Knowledge Organism • Auto-Learning Enabled</p>
|
| 73 |
+
</div>
|
| 74 |
+
|
| 75 |
+
<button
|
| 76 |
+
onClick={() => setIsEvolvingMode(!isEvolvingMode)}
|
| 77 |
+
className={`px-4 py-2 rounded-lg font-semibold transition-all ${
|
| 78 |
+
isEvolvingMode
|
| 79 |
+
? 'bg-green-500 hover:bg-green-600 text-black'
|
| 80 |
+
: 'bg-purple-700 hover:bg-purple-600'
|
| 81 |
+
}`}
|
| 82 |
+
>
|
| 83 |
+
{isEvolvingMode ? '🌀 EVOLVING' : 'START EVOLUTION'}
|
| 84 |
+
</button>
|
| 85 |
+
</div>
|
| 86 |
+
|
| 87 |
+
{/* Metrics Grid */}
|
| 88 |
+
<div className="grid grid-cols-3 gap-4 mb-6">
|
| 89 |
+
<MetricCard
|
| 90 |
+
icon={<Database className="text-purple-400" />}
|
| 91 |
+
label="Total Nodes"
|
| 92 |
+
value={metrics.totalNodes.toLocaleString()}
|
| 93 |
+
trend="+127"
|
| 94 |
+
color="purple"
|
| 95 |
+
/>
|
| 96 |
+
<MetricCard
|
| 97 |
+
icon={<Activity className="text-blue-400" />}
|
| 98 |
+
label="Active Rules"
|
| 99 |
+
value={metrics.activeRules.toLocaleString()}
|
| 100 |
+
trend="+23"
|
| 101 |
+
color="blue"
|
| 102 |
+
/>
|
| 103 |
+
<MetricCard
|
| 104 |
+
icon={<Sparkles className="text-green-400" />}
|
| 105 |
+
label="Auto-Evolutions"
|
| 106 |
+
value={metrics.autoEvolutions.toString()}
|
| 107 |
+
trend={isEvolvingMode ? 'ACTIVE' : 'PAUSED'}
|
| 108 |
+
color="green"
|
| 109 |
+
/>
|
| 110 |
+
<MetricCard
|
| 111 |
+
icon={<TrendingUp className="text-yellow-400" />}
|
| 112 |
+
label="Learning Rate"
|
| 113 |
+
value={`${metrics.learningRate.toFixed(1)}x`}
|
| 114 |
+
trend="+0.8x"
|
| 115 |
+
color="yellow"
|
| 116 |
+
/>
|
| 117 |
+
<MetricCard
|
| 118 |
+
icon={<Network className="text-pink-400" />}
|
| 119 |
+
label="Graph Density"
|
| 120 |
+
value={`${metrics.graphDensity.toFixed(1)}%`}
|
| 121 |
+
trend="+12.3%"
|
| 122 |
+
color="pink"
|
| 123 |
+
/>
|
| 124 |
+
<MetricCard
|
| 125 |
+
icon={<Zap className="text-orange-400" />}
|
| 126 |
+
label="Lift Factor"
|
| 127 |
+
value="200%"
|
| 128 |
+
trend="TARGET"
|
| 129 |
+
color="orange"
|
| 130 |
+
/>
|
| 131 |
+
</div>
|
| 132 |
+
|
| 133 |
+
{/* Evolution Log */}
|
| 134 |
+
<div className="bg-black/50 rounded-lg p-4 border border-purple-500/30">
|
| 135 |
+
<h3 className="text-lg font-semibold mb-3 flex items-center gap-2">
|
| 136 |
+
<Activity className="text-purple-400" />
|
| 137 |
+
Evolution Activity Log
|
| 138 |
+
</h3>
|
| 139 |
+
<div className="space-y-1 font-mono text-sm">
|
| 140 |
+
{evolutionLog.map((log, i) => (
|
| 141 |
+
<div key={i} className="text-purple-300 animate-fadeIn">
|
| 142 |
+
{log}
|
| 143 |
+
</div>
|
| 144 |
+
))}
|
| 145 |
+
</div>
|
| 146 |
+
</div>
|
| 147 |
+
|
| 148 |
+
{/* Info Panel */}
|
| 149 |
+
<div className="mt-6 p-4 bg-purple-900/30 rounded-lg border border-purple-500/30">
|
| 150 |
+
<h4 className="font-semibold mb-2">🎯 How SEGA Works</h4>
|
| 151 |
+
<ul className="text-sm space-y-1 text-purple-200">
|
| 152 |
+
<li>• Observes all graph interactions and learns patterns</li>
|
| 153 |
+
<li>• Automatically creates new relationships based on similarity</li>
|
| 154 |
+
<li>• Evolves schema structure to accommodate new data types</li>
|
| 155 |
+
<li>• Self-optimizes query paths for faster retrieval</li>
|
| 156 |
+
<li>• Generates adaptive rules without manual programming</li>
|
| 157 |
+
</ul>
|
| 158 |
+
</div>
|
| 159 |
+
</div>
|
| 160 |
+
);
|
| 161 |
+
}
|
| 162 |
+
|
| 163 |
+
function MetricCard({ icon, label, value, trend, color }: any) {
|
| 164 |
+
const colorClasses = {
|
| 165 |
+
purple: 'bg-purple-900/50 border-purple-500/30',
|
| 166 |
+
blue: 'bg-blue-900/50 border-blue-500/30',
|
| 167 |
+
green: 'bg-green-900/50 border-green-500/30',
|
| 168 |
+
yellow: 'bg-yellow-900/50 border-yellow-500/30',
|
| 169 |
+
pink: 'bg-pink-900/50 border-pink-500/30',
|
| 170 |
+
orange: 'bg-orange-900/50 border-orange-500/30'
|
| 171 |
+
};
|
| 172 |
+
|
| 173 |
+
return (
|
| 174 |
+
<div className={`p-4 rounded-lg border ${colorClasses[color as keyof typeof colorClasses]}`}>
|
| 175 |
+
<div className="flex items-center gap-2 mb-2">
|
| 176 |
+
{icon}
|
| 177 |
+
<span className="text-xs text-gray-400">{label}</span>
|
| 178 |
+
</div>
|
| 179 |
+
<div className="text-2xl font-bold">{value}</div>
|
| 180 |
+
<div className="text-xs text-green-400 mt-1">{trend}</div>
|
| 181 |
+
</div>
|
| 182 |
+
);
|
| 183 |
+
}
|
apps/matrix-frontend/src/widgets/NeuralAscension/THG.tsx
ADDED
|
@@ -0,0 +1,131 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/**
|
| 2 |
+
* 🕰️ THG - Temporal Hypergraphs
|
| 3 |
+
* Navigate knowledge across time with version control for every node
|
| 4 |
+
* 200% lift: From static snapshots to full temporal reasoning
|
| 5 |
+
*/
|
| 6 |
+
|
| 7 |
+
import React, { useState } from 'react';
|
| 8 |
+
import { Clock, Rewind, FastForward, Play, Calendar, GitBranch } from 'lucide-react';
|
| 9 |
+
|
| 10 |
+
interface TemporalSnapshot {
|
| 11 |
+
timestamp: string;
|
| 12 |
+
nodeCount: number;
|
| 13 |
+
relationshipCount: number;
|
| 14 |
+
event: string;
|
| 15 |
+
}
|
| 16 |
+
|
| 17 |
+
export default function THG() {
|
| 18 |
+
const [currentTime, setCurrentTime] = useState(new Date());
|
| 19 |
+
const [timelineMode, setTimelineMode] = useState<'live' | 'historical'>('live');
|
| 20 |
+
|
| 21 |
+
const snapshots: TemporalSnapshot[] = [
|
| 22 |
+
{ timestamp: '2025-12-14 02:00', nodeCount: 90482, relationshipCount: 485120, event: 'Current State' },
|
| 23 |
+
{ timestamp: '2025-12-13 18:00', nodeCount: 89234, relationshipCount: 481340, event: 'Evening Sync' },
|
| 24 |
+
{ timestamp: '2025-12-13 12:00', nodeCount: 88012, relationshipCount: 478902, event: 'Midday Update' },
|
| 25 |
+
{ timestamp: '2025-12-12 00:00', nodeCount: 85432, relationshipCount: 472156, event: 'Yesterday Snapshot' },
|
| 26 |
+
{ timestamp: '2025-12-01 00:00', nodeCount: 76543, relationshipCount: 445231, event: 'Month Start' },
|
| 27 |
+
];
|
| 28 |
+
|
| 29 |
+
return (
|
| 30 |
+
<div className="h-full bg-gradient-to-br from-blue-950 via-cyan-950 to-black text-white p-6 overflow-auto">
|
| 31 |
+
{/* Header */}
|
| 32 |
+
<div className="flex items-center justify-between mb-6">
|
| 33 |
+
<div>
|
| 34 |
+
<h2 className="text-2xl font-bold flex items-center gap-2">
|
| 35 |
+
<Clock className="text-cyan-400" />
|
| 36 |
+
THG - Temporal Hypergraphs
|
| 37 |
+
</h2>
|
| 38 |
+
<p className="text-cyan-300 text-sm">Time-Travel Your Knowledge • Version Control Everything</p>
|
| 39 |
+
</div>
|
| 40 |
+
|
| 41 |
+
<div className="flex gap-2">
|
| 42 |
+
<button
|
| 43 |
+
onClick={() => setTimelineMode('historical')}
|
| 44 |
+
className={`px-4 py-2 rounded-lg ${
|
| 45 |
+
timelineMode === 'historical' ? 'bg-cyan-600' : 'bg-cyan-800/50'
|
| 46 |
+
}`}
|
| 47 |
+
>
|
| 48 |
+
<Rewind className="w-4 h-4" />
|
| 49 |
+
</button>
|
| 50 |
+
<button
|
| 51 |
+
onClick={() => setTimelineMode('live')}
|
| 52 |
+
className={`px-4 py-2 rounded-lg ${
|
| 53 |
+
timelineMode === 'live' ? 'bg-green-600' : 'bg-green-800/50'
|
| 54 |
+
}`}
|
| 55 |
+
>
|
| 56 |
+
<Play className="w-4 h-4" />
|
| 57 |
+
</button>
|
| 58 |
+
</div>
|
| 59 |
+
</div>
|
| 60 |
+
|
| 61 |
+
{/* Timeline Visualization */}
|
| 62 |
+
<div className="bg-black/50 rounded-lg p-6 border border-cyan-500/30 mb-6">
|
| 63 |
+
<h3 className="text-lg font-semibold mb-4 flex items-center gap-2">
|
| 64 |
+
<Calendar className="text-cyan-400" />
|
| 65 |
+
Knowledge Timeline
|
| 66 |
+
</h3>
|
| 67 |
+
|
| 68 |
+
<div className="relative">
|
| 69 |
+
{/* Timeline Bar */}
|
| 70 |
+
<div className="h-2 bg-cyan-900/50 rounded-full mb-8 relative overflow-hidden">
|
| 71 |
+
<div
|
| 72 |
+
className="h-full bg-gradient-to-r from-cyan-600 to-cyan-400 rounded-full animate-pulse"
|
| 73 |
+
style={{ width: '75%' }}
|
| 74 |
+
/>
|
| 75 |
+
</div>
|
| 76 |
+
|
| 77 |
+
{/* Snapshots */}
|
| 78 |
+
<div className="space-y-4">
|
| 79 |
+
{snapshots.map((snapshot, i) => (
|
| 80 |
+
<div
|
| 81 |
+
key={i}
|
| 82 |
+
className="flex items-center gap-4 p-4 bg-cyan-900/20 rounded-lg border border-cyan-500/20 hover:border-cyan-500/50 transition-colors cursor-pointer"
|
| 83 |
+
>
|
| 84 |
+
<div className="flex-shrink-0">
|
| 85 |
+
<GitBranch className="text-cyan-400" />
|
| 86 |
+
</div>
|
| 87 |
+
<div className="flex-1">
|
| 88 |
+
<div className="font-semibold">{snapshot.event}</div>
|
| 89 |
+
<div className="text-sm text-cyan-300">{snapshot.timestamp}</div>
|
| 90 |
+
</div>
|
| 91 |
+
<div className="text-right text-sm">
|
| 92 |
+
<div>{snapshot.nodeCount.toLocaleString()} nodes</div>
|
| 93 |
+
<div className="text-cyan-400">{snapshot.relationshipCount.toLocaleString()} rels</div>
|
| 94 |
+
</div>
|
| 95 |
+
</div>
|
| 96 |
+
))}
|
| 97 |
+
</div>
|
| 98 |
+
</div>
|
| 99 |
+
</div>
|
| 100 |
+
|
| 101 |
+
{/* Temporal Query Builder */}
|
| 102 |
+
<div className="grid grid-cols-2 gap-4">
|
| 103 |
+
<div className="bg-black/50 rounded-lg p-4 border border-cyan-500/30">
|
| 104 |
+
<h4 className="font-semibold mb-3">Temporal Queries</h4>
|
| 105 |
+
<div className="space-y-2 text-sm">
|
| 106 |
+
<div className="p-2 bg-cyan-900/20 rounded">
|
| 107 |
+
MATCH (n) WHERE n.validFrom <= $time
|
| 108 |
+
</div>
|
| 109 |
+
<div className="p-2 bg-cyan-900/20 rounded">
|
| 110 |
+
RETURN path WITH temporal_filter()
|
| 111 |
+
</div>
|
| 112 |
+
<div className="p-2 bg-cyan-900/20 rounded">
|
| 113 |
+
DIFF between($time1, $time2)
|
| 114 |
+
</div>
|
| 115 |
+
</div>
|
| 116 |
+
</div>
|
| 117 |
+
|
| 118 |
+
<div className="bg-black/50 rounded-lg p-4 border border-cyan-500/30">
|
| 119 |
+
<h4 className="font-semibold mb-3">🎯 Use Cases</h4>
|
| 120 |
+
<ul className="text-sm space-y-1 text-cyan-200">
|
| 121 |
+
<li>• Roll back to any point in graph history</li>
|
| 122 |
+
<li>• Compare knowledge states across time</li>
|
| 123 |
+
<li>• Track entity evolution and changes</li>
|
| 124 |
+
<li>• Audit all modifications with timestamps</li>
|
| 125 |
+
<li>• Predict future states from patterns</li>
|
| 126 |
+
</ul>
|
| 127 |
+
</div>
|
| 128 |
+
</div>
|
| 129 |
+
</div>
|
| 130 |
+
);
|
| 131 |
+
}
|
apps/matrix-frontend/src/widgets/NeuralAscension/index.ts
ADDED
|
@@ -0,0 +1,113 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
// Neural Ascension Widgets Index
|
| 2 |
+
// Export alle transformation point widgets
|
| 3 |
+
|
| 4 |
+
export { default as SEGA } from './SEGA';
|
| 5 |
+
export { default as THG } from './THG';
|
| 6 |
+
export { default as SCE } from './SCE';
|
| 7 |
+
export { default as NSQI } from './NSQI';
|
| 8 |
+
export { default as PTAM } from './PTAM';
|
| 9 |
+
export { CDMM, APD, MSH, QEK, CCA } from './RestWidgets';
|
| 10 |
+
export { default as MasterControl } from './MasterControl';
|
| 11 |
+
|
| 12 |
+
// Widget Metadata for Registration
|
| 13 |
+
export const NeuralAscensionWidgets = [
|
| 14 |
+
{
|
| 15 |
+
id: 'MasterControl',
|
| 16 |
+
name: 'Neural Ascension Master Control',
|
| 17 |
+
category: 'neural-ascension',
|
| 18 |
+
path: './widgets/NeuralAscension/MasterControl',
|
| 19 |
+
icon: 'Rocket',
|
| 20 |
+
defaultSize: { w: 12, h: 4 },
|
| 21 |
+
description: 'Central command for all 10 transformation points - theoretical 59,049x lift'
|
| 22 |
+
},
|
| 23 |
+
{
|
| 24 |
+
id: 'SEGA',
|
| 25 |
+
name: 'Self-Evolving Graph Architecture',
|
| 26 |
+
category: 'neural-ascension',
|
| 27 |
+
path: './widgets/NeuralAscension/SEGA',
|
| 28 |
+
icon: 'GitBranch',
|
| 29 |
+
defaultSize: { w: 6, h: 4 },
|
| 30 |
+
description: 'Auto-learning knowledge graph with 200% capacity expansion'
|
| 31 |
+
},
|
| 32 |
+
{
|
| 33 |
+
id: 'THG',
|
| 34 |
+
name: 'Temporal Hypergraphs',
|
| 35 |
+
category: 'neural-ascension',
|
| 36 |
+
path: './widgets/NeuralAscension/THG',
|
| 37 |
+
icon: 'Clock',
|
| 38 |
+
defaultSize: { w: 6, h: 4 },
|
| 39 |
+
description: 'Time-travel your knowledge with full version control'
|
| 40 |
+
},
|
| 41 |
+
{
|
| 42 |
+
id: 'SCE',
|
| 43 |
+
name: 'Swarm Consciousness Emergence',
|
| 44 |
+
category: 'neural-ascension',
|
| 45 |
+
path: './widgets/NeuralAscension/SCE',
|
| 46 |
+
icon: 'Users',
|
| 47 |
+
defaultSize: { w: 6, h: 3 },
|
| 48 |
+
description: 'Collective intelligence from 8 Ollama Cloud models'
|
| 49 |
+
},
|
| 50 |
+
{
|
| 51 |
+
id: 'NSQI',
|
| 52 |
+
name: 'Neuro-Symbolic Quantum Inference',
|
| 53 |
+
category: 'neural-ascension',
|
| 54 |
+
path: './widgets/NeuralAscension/NSQI',
|
| 55 |
+
icon: 'Sparkles',
|
| 56 |
+
defaultSize: { w: 6, h: 3 },
|
| 57 |
+
description: 'Quantum-speed reasoning with symbolic logic'
|
| 58 |
+
},
|
| 59 |
+
{
|
| 60 |
+
id: 'PTAM',
|
| 61 |
+
name: 'Predictive Threat Anticipation Matrix',
|
| 62 |
+
category: 'neural-ascension',
|
| 63 |
+
path: './widgets/NeuralAscension/PTAM',
|
| 64 |
+
icon: 'Shield',
|
| 65 |
+
defaultSize: { w: 6, h: 3 },
|
| 66 |
+
description: '24/7 security threat prediction and prevention'
|
| 67 |
+
},
|
| 68 |
+
{
|
| 69 |
+
id: 'CDMM',
|
| 70 |
+
name: 'Cognitive Dark Matter Mapping',
|
| 71 |
+
category: 'neural-ascension',
|
| 72 |
+
path: './widgets/NeuralAscension/RestWidgets',
|
| 73 |
+
icon: 'Moon',
|
| 74 |
+
defaultSize: { w: 4, h: 3 },
|
| 75 |
+
description: 'Discover hidden patterns in your knowledge'
|
| 76 |
+
},
|
| 77 |
+
{
|
| 78 |
+
id: 'APD',
|
| 79 |
+
name: 'Autonomous Paradigm Discovery',
|
| 80 |
+
category: 'neural-ascension',
|
| 81 |
+
path: './widgets/NeuralAscension/RestWidgets',
|
| 82 |
+
icon: 'Lightbulb',
|
| 83 |
+
defaultSize: { w: 4, h: 3 },
|
| 84 |
+
description: 'Auto-detect and validate breakthroughs'
|
| 85 |
+
},
|
| 86 |
+
{
|
| 87 |
+
id: 'MSH',
|
| 88 |
+
name: 'Morphogenetic Self-Healing',
|
| 89 |
+
category: 'neural-ascension',
|
| 90 |
+
path: './widgets/NeuralAscension/RestWidgets',
|
| 91 |
+
icon: 'Heart',
|
| 92 |
+
defaultSize: { w: 4, h: 3 },
|
| 93 |
+
description: 'Automatic system repair and optimization'
|
| 94 |
+
},
|
| 95 |
+
{
|
| 96 |
+
id: 'QEK',
|
| 97 |
+
name: 'Quantum-Entangled Knowledge',
|
| 98 |
+
category: 'neural-ascension',
|
| 99 |
+
path: './widgets/NeuralAscension/RestWidgets',
|
| 100 |
+
icon: 'Link',
|
| 101 |
+
defaultSize: { w: 4, h: 3 },
|
| 102 |
+
description: 'Instantaneous knowledge sharing across nodes'
|
| 103 |
+
},
|
| 104 |
+
{
|
| 105 |
+
id: 'CCA',
|
| 106 |
+
name: 'Cosmic-Contextual Awareness',
|
| 107 |
+
category: 'neural-ascension',
|
| 108 |
+
path: './widgets/NeuralAscension/RestWidgets',
|
| 109 |
+
icon: 'Globe',
|
| 110 |
+
defaultSize: { w: 4, h: 3 },
|
| 111 |
+
description: 'System-wide consciousness and meta-reasoning'
|
| 112 |
+
},
|
| 113 |
+
];
|
apps/matrix-frontend/src/widgets/NeuralEventBus.ts
ADDED
|
@@ -0,0 +1,56 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import { useEffect, useCallback } from 'react';
|
| 2 |
+
|
| 3 |
+
interface NeuralEvent {
|
| 4 |
+
source: string;
|
| 5 |
+
data: any;
|
| 6 |
+
options?: { priority?: 'low' | 'medium' | 'high' | 'critical' };
|
| 7 |
+
}
|
| 8 |
+
|
| 9 |
+
type EventHandler = (event: NeuralEvent) => void;
|
| 10 |
+
|
| 11 |
+
class NeuralEventBus {
|
| 12 |
+
private listeners: Map<string, EventHandler[]> = new Map();
|
| 13 |
+
|
| 14 |
+
on(event: string, handler: EventHandler) {
|
| 15 |
+
if (!this.listeners.has(event)) {
|
| 16 |
+
this.listeners.set(event, []);
|
| 17 |
+
}
|
| 18 |
+
this.listeners.get(event)?.push(handler);
|
| 19 |
+
}
|
| 20 |
+
|
| 21 |
+
off(event: string, handler: EventHandler) {
|
| 22 |
+
const handlers = this.listeners.get(event);
|
| 23 |
+
if (handlers) {
|
| 24 |
+
this.listeners.set(event, handlers.filter(h => h !== handler));
|
| 25 |
+
}
|
| 26 |
+
}
|
| 27 |
+
|
| 28 |
+
emit(event: string, neuralEvent: NeuralEvent) {
|
| 29 |
+
const handlers = this.listeners.get(event);
|
| 30 |
+
if (handlers) {
|
| 31 |
+
handlers.forEach(h => h(neuralEvent));
|
| 32 |
+
}
|
| 33 |
+
}
|
| 34 |
+
}
|
| 35 |
+
|
| 36 |
+
export const neuralEventBus = new NeuralEventBus();
|
| 37 |
+
|
| 38 |
+
export const emitNeuralEvent = (
|
| 39 |
+
event: string,
|
| 40 |
+
source: string,
|
| 41 |
+
data: any,
|
| 42 |
+
options?: { priority?: 'low' | 'medium' | 'high' | 'critical' }
|
| 43 |
+
) => {
|
| 44 |
+
neuralEventBus.emit(event, { source, data, options });
|
| 45 |
+
};
|
| 46 |
+
|
| 47 |
+
export const useNeuralEvent = (event: string, handler: (event: NeuralEvent) => void) => {
|
| 48 |
+
const stableHandler = useCallback(handler, []);
|
| 49 |
+
|
| 50 |
+
useEffect(() => {
|
| 51 |
+
neuralEventBus.on(event, stableHandler);
|
| 52 |
+
return () => {
|
| 53 |
+
neuralEventBus.off(event, stableHandler);
|
| 54 |
+
};
|
| 55 |
+
}, [event, stableHandler]);
|
| 56 |
+
};
|