diff --git a/app.js b/app.js index 28e9085a..d1069899 100644 --- a/app.js +++ b/app.js @@ -3288,6 +3288,15 @@ init().then(() => { { id: 'mem_hermes_chat', content: 'First conversation through the Hermes gateway', category: 'social', strength: 0.7, connections: [] }, { id: 'mem_mnemosyne_start', content: 'Project Mnemosyne began — the living archive awakens', category: 'projects', strength: 0.9, connections: ['mem_nexus_birth', 'mem_spatial_schema'] }, { id: 'mem_spatial_schema', content: 'Spatial Memory Schema defined — memories gain permanent homes', category: 'engineering', strength: 0.8, connections: ['mem_mnemosyne_start'] }, + // MemPalace category zone demos — issue #1168 + { id: 'mem_pref_dark_mode', content: 'User prefers dark mode and monospace fonts', category: 'user_pref', strength: 0.9, connections: [] }, + { id: 'mem_pref_verbose_logs', content: 'User prefers verbose logging during debug sessions', category: 'user_pref', strength: 0.7, connections: [] }, + { id: 'mem_proj_nexus_goal', content: 'The Nexus goal: local-first 3D training ground for Timmy', category: 'project', strength: 0.95, connections: ['mem_proj_mnemosyne'] }, + { id: 'mem_proj_mnemosyne', content: 'Project Mnemosyne: holographic living archive of facts', category: 'project', strength: 0.85, connections: ['mem_proj_nexus_goal'] }, + { id: 'mem_tool_three_js', content: 'Three.js — 3D rendering library used for the Nexus world', category: 'tool', strength: 0.8, connections: [] }, + { id: 'mem_tool_gitea', content: 'Gitea API at forge.alexanderwhitestone.com for issue tracking', category: 'tool', strength: 0.75, connections: [] }, + { id: 'mem_gen_websocket', content: 'WebSocket bridge (server.py) connects Timmy cognition to the browser', category: 'general', strength: 0.7, connections: [] }, + { id: 'mem_gen_hermes', content: 'Hermes harness: telemetry and durable truth pipeline', category: 'general', strength: 0.65, connections: [] }, ]; demoMemories.forEach(m => SpatialMemory.placeMemory(m)); diff --git a/nexus/components/spatial-memory.js b/nexus/components/spatial-memory.js index b3a9bb73..ab3fdd87 100644 --- a/nexus/components/spatial-memory.js +++ b/nexus/components/spatial-memory.js @@ -8,12 +8,20 @@ // holographic archive. // // World layout (hex cylinder, radius 25): -// North (z-) → Documents & Knowledge -// South (z+) → Projects & Tasks -// East (x+) → Code & Engineering -// West (x-) → Conversations & Social -// Center → Active Working Memory -// Below (y-) → Archive (cold storage) +// +// Inner ring — original Mnemosyne taxonomy (radius 15): +// North (z-) → Documents & Knowledge +// South (z+) → Projects & Tasks +// East (x+) → Code & Engineering +// West (x-) → Conversations & Social +// Center → Active Working Memory +// Below (y-) → Archive (cold storage) +// +// Outer ring — MemPalace category zones (radius 20, issue #1168): +// North (z-) → User Preferences [golden] +// East (x+) → Project facts [blue] +// South (z+) → Tool knowledge [green] +// West (x-) → General facts [gray] // // Usage from app.js: // SpatialMemory.init(scene); @@ -73,6 +81,44 @@ const SpatialMemory = (() => { color: 0x334455, glyph: '\uD83D\uDDC4', description: 'Cold storage — rarely accessed, aged-out memories' + }, + + // ── MemPalace category zones — outer ring, issue #1168 ──────────── + user_pref: { + label: 'User Preferences', + center: [0, 0, -20], + radius: 10, + color: 0xffd700, + glyph: '\u2605', + description: 'Personal preferences, habits, user-specific settings', + labelY: 5 + }, + project: { + label: 'Project Facts', + center: [20, 0, 0], + radius: 10, + color: 0x4488ff, + glyph: '\uD83D\uDCC1', + description: 'Project-specific knowledge, goals, context', + labelY: 5 + }, + tool: { + label: 'Tool Knowledge', + center: [0, 0, 20], + radius: 10, + color: 0x44cc66, + glyph: '\uD83D\uDD27', + description: 'Tools, commands, APIs, and how to use them', + labelY: 5 + }, + general: { + label: 'General Facts', + center: [-20, 0, 0], + radius: 10, + color: 0x8899aa, + glyph: '\uD83D\uDCDD', + description: 'Miscellaneous facts not fitting other categories', + labelY: 5 } }; @@ -99,6 +145,7 @@ const SpatialMemory = (() => { const cx = region.center[0]; const cy = region.center[1] + 0.06; const cz = region.center[2]; + const labelY = region.labelY || 3; const ringGeo = new THREE.RingGeometry(region.radius - 0.5, region.radius, 6); const ringMat = new THREE.MeshBasicMaterial({ @@ -126,6 +173,22 @@ const SpatialMemory = (() => { _scene.add(ring); _scene.add(disc); + // Ground glow — brighter disc for MemPalace zones (labelY > 3 signals outer ring) + let glowDisc = null; + if (labelY > 3) { + const glowGeo = new THREE.CircleGeometry(region.radius, 32); + const glowMat = new THREE.MeshBasicMaterial({ + color: region.color, + transparent: true, + opacity: 0.06, + side: THREE.DoubleSide + }); + glowDisc = new THREE.Mesh(glowGeo, glowMat); + glowDisc.rotation.x = -Math.PI / 2; + glowDisc.position.set(cx, cy - 0.02, cz); + _scene.add(glowDisc); + } + // Floating label const canvas = document.createElement('canvas'); canvas.width = 256; @@ -139,11 +202,11 @@ const SpatialMemory = (() => { const texture = new THREE.CanvasTexture(canvas); const spriteMat = new THREE.SpriteMaterial({ map: texture, transparent: true, opacity: 0.6 }); const sprite = new THREE.Sprite(spriteMat); - sprite.position.set(cx, 3, cz); + sprite.position.set(cx, labelY, cz); sprite.scale.set(4, 1, 1); _scene.add(sprite); - return { ring, disc, sprite }; + return { ring, disc, glowDisc, sprite }; } // ─── PLACE A MEMORY ────────────────────────────────── @@ -283,6 +346,9 @@ const SpatialMemory = (() => { if (marker.ring && marker.ring.material) { marker.ring.material.opacity = 0.1 + Math.sin(now * 0.001) * 0.05; } + if (marker.glowDisc && marker.glowDisc.material) { + marker.glowDisc.material.opacity = 0.04 + Math.sin(now * 0.0008) * 0.02; + } }); }