Compare commits

..

1 Commits

Author SHA1 Message Date
Google Agent
6f26f07bf4 Nexus Evolution: Batcave Terminal & Workshop Integration (#6)
Some checks failed
CI / validate (pull_request) Failing after 12s
- Integrated 3D Workshop Console with holographic panel
- Implemented Hermes WebSocket for real-time chat and tool output
- Added context-aware terminal logic for focused portals
- Implemented session persistence (localStorage + backend support)
- Styled tool output rendering in chat panel
2026-03-24 03:26:34 +00:00
9 changed files with 327 additions and 1160 deletions

View File

@@ -1,36 +0,0 @@
# Project Mnemosyne: Spatial Memory Schema
## Overview
Project Mnemosyne transforms the Nexus from a static environment into a real-time visualization of Timmy's holographic memory (fact_store).
## 1. Room Mapping (Categories)
Memory categories are mapped to specific spatial zones in the Nexus to provide cognitive structure.
| Category | Nexus Room | Visual Theme |
| :--- | :--- | :--- |
| user_pref | The Library | Archive shelves, soft lighting, velvet |
| project | The Workshop | Drafting tables, holographic blueprints, metal |
| tool | The Armory | Server racks, neon circuitry, chrome |
| general | The Commons | Open garden, floating islands, eclectic |
## 2. Object Mapping (Facts)
Every single fact in the holographic memory is represented as a 3D object.
- **Object Type:** Depending on the fact's content, it is rendered as a primitive (sphere, cube, pyramid) or a specific asset.
- **Luminosity (Trust):** The glow intensity of the object is tied to its trust score (0.0 - 1.0).
- **Scale (Importance):** The size of the object is tied to the number of relations it has to other facts.
## 3. Spatial Distribution (Coordinates)
Coordinates are calculated based on semantic adjacency.
- **Clustering:** Facts that are 'related' (via the fact_store adjacency graph) are placed closer together.
- **Layout Algorithm:** A 3D force-directed graph layout is used within each room.
- **Centroid:** The most 'central' fact (highest connectivity) is placed at the room's center.
## 4. Lifecycle Events
The Nexus responds to real-time memory updates:
- **FACT_CREATED:** A new object fades into existence at the calculated coordinate.
- **FACT_UPDATED:** The object pulses and adjusts its luminosity/scale.
- **FACT_REMOVED:** The object dissolves into particles.
- **FACT_RECALLED:** The object emits a beam of light toward the User/Agent, signaling active use.

1266
app.js

File diff suppressed because it is too large Load Diff

View File

@@ -1 +0,0 @@
placeholder 192x192

View File

@@ -1 +0,0 @@
placeholder 512x512

View File

@@ -23,7 +23,6 @@
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@300;400;500;600;700&family=Orbitron:wght@400;500;600;700;800;900&display=swap" rel="stylesheet">
<link rel="stylesheet" href="./style.css">
<link rel="manifest" href="manifest.json">
<script type="importmap">
{
"imports": {
@@ -107,6 +106,7 @@
<span>WASD</span> move &nbsp; <span>Mouse</span> look &nbsp; <span>Enter</span> chat &nbsp;
<span>V</span> mode: <span id="nav-mode-label">WALK</span>
<span id="nav-mode-hint" class="nav-mode-hint"></span>
&nbsp; <span class="ws-hud-status">HERMES: <span id="ws-status-dot" class="chat-status-dot"></span></span>
</div>
<!-- Portal Hint -->
@@ -155,12 +155,6 @@
</div>
</div>
<!-- Bitcoin Block Height -->
<div id="block-height-display">
<span class="block-height-label">⛏ BLOCK</span>
<span id="block-height-value"></span>
</div>
<!-- Click to Enter -->
<div id="enter-prompt" style="display:none;">
<div class="enter-content">
@@ -179,20 +173,6 @@
<script type="module" src="./app.js"></script>
<script>
if ('serviceWorker' in navigator) {
window.addEventListener('load', () => {
navigator.serviceWorker.register('/service-worker.js')
.then(registration => {
console.log('Service Worker registered: ', registration);
})
.catch(error => {
console.log('Service Worker registration failed: ', error);
});
});
}
</script>
<!-- Live Refresh: polls Gitea for new commits on main, reloads when SHA changes -->
<div id="live-refresh-banner" style="
display:none; position:fixed; top:0; left:0; right:0; z-index:9999;

View File

@@ -1,21 +0,0 @@
{
"name": "The Nexus",
"short_name": "Nexus",
"start_url": ".",
"display": "standalone",
"background_color": "#000000",
"theme_color": "#000000",
"description": "Timmy's Sovereign Home - A Three.js environment.",
"icons": [
{
"src": "icons/icon-192x192.png",
"sizes": "192x192",
"type": "image/png"
},
{
"src": "icons/icon-512x512.png",
"sizes": "512x512",
"type": "image/png"
}
]
}

View File

@@ -1,34 +0,0 @@
{
"rooms": {
"user_pref": {
"name": "The Library",
"theme": "Archive shelves, soft lighting, velvet",
"visual_accent": "#C2B280"
},
"project": {
"name": "The Workshop",
"theme": "Drafting tables, holographic blueprints, metal",
"visual_accent": "#4682B4"
},
"tool": {
"name": "The Armory",
"theme": "Server racks, neon circuitry, chrome",
"visual_accent": "#00FF00"
},
"general": {
"name": "The Commons",
"theme": "Open garden, floating islands, eclectic",
"visual_accent": "#FFD700"
}
},
"object_mapping": {
"trust_score": {
"property": "luminosity",
"range": [0.0, 1.0]
},
"connectivity": {
"property": "scale",
"range": [0.5, 2.0]
}
}
}

View File

@@ -1,45 +0,0 @@
const CACHE_NAME = 'nexus-cache-v1';
const urlsToCache = [
'.',
'index.html',
'style.css',
'app.js',
'manifest.json'
];
self.addEventListener('install', (event) => {
event.waitUntil(
caches.open(CACHE_NAME)
.then((cache) => {
console.log('Opened cache');
return cache.addAll(urlsToCache);
})
);
});
self.addEventListener('fetch', (event) => {
event.respondWith(
caches.match(event.request)
.then((response) => {
if (response) {
return response;
}
return fetch(event.request);
})
);
});
self.addEventListener('activate', (event) => {
const cacheWhitelist = [CACHE_NAME];
event.waitUntil(
caches.keys().then((cacheNames) => {
return Promise.all(
cacheNames.map((cacheName) => {
if (cacheWhitelist.indexOf(cacheName) === -1) {
return caches.delete(cacheName);
}
})
);
})
);
});

View File

@@ -533,7 +533,7 @@ canvas#nexus-canvas {
border-radius: 50%;
background: var(--color-primary);
box-shadow: 0 0 6px var(--color-primary);
animation: dot-pulse 2s ease-in-out infinite;
transition: all 0.3s ease;
}
@keyframes dot-pulse {
0%, 100% { opacity: 0.6; }
@@ -570,6 +570,29 @@ canvas#nexus-canvas {
.chat-msg-prefix {
font-weight: 700;
}
.chat-msg-kimi .chat-msg-prefix { color: var(--color-secondary); }
.chat-msg-claude .chat-msg-prefix { color: var(--color-gold); }
.chat-msg-perplexity .chat-msg-prefix { color: #4488ff; }
/* Tool Output Styling */
.chat-msg-tool {
background: rgba(0, 0, 0, 0.3);
border-left: 2px solid #ffd700;
font-size: 11px;
padding: 8px;
margin: 4px 0;
border-radius: 4px;
}
.tool-call { border-left-color: #ffd700; }
.tool-result { border-left-color: #4af0c0; }
.tool-content {
font-family: 'JetBrains Mono', monospace;
white-space: pre-wrap;
word-break: break-all;
opacity: 0.8;
margin: 4px 0 0 0;
color: #a0b8d0;
}
.chat-msg-system .chat-msg-prefix { color: var(--color-text-muted); }
.chat-msg-timmy .chat-msg-prefix { color: var(--color-primary); }
.chat-msg-user .chat-msg-prefix { color: var(--color-gold); }
@@ -625,42 +648,6 @@ canvas#nexus-canvas {
color: var(--color-primary);
}
/* === BITCOIN BLOCK HEIGHT === */
#block-height-display {
position: fixed;
bottom: 12px;
right: 12px;
z-index: 20;
font-family: var(--font-body);
font-size: 11px;
letter-spacing: 0.15em;
color: var(--color-primary);
background: rgba(0, 0, 8, 0.7);
border: 1px solid var(--color-secondary);
padding: 4px 10px;
pointer-events: none;
white-space: nowrap;
}
.block-height-label {
color: var(--color-text-muted);
margin-right: 6px;
font-size: 10px;
}
#block-height-value {
color: var(--color-primary);
}
#block-height-display.fresh #block-height-value {
animation: block-flash 0.6s ease-out;
}
@keyframes block-flash {
0% { color: #ffffff; text-shadow: 0 0 8px #4488ff; }
100% { color: var(--color-primary); text-shadow: none; }
}
/* Mobile adjustments */
@media (max-width: 480px) {
.chat-panel {