From 9397d88657229fb46f5617a242d4e387bc46f8a3 Mon Sep 17 00:00:00 2001 From: Timmy Date: Wed, 15 Apr 2026 12:34:11 -0400 Subject: [PATCH] fix(#1601): Restore MemPalace Fleet API polling, remove mock MCP MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit BURN mode PR replaced the functional connectMemPalace() (which fetches real stats from Fleet API on port 7771) with a mock MCP server that returns hardcoded data and zeroes out stats. The mock definition (line 3907) overwrote the real one (line 2772) because it was defined later in the same scope. Fix: removed the mock connectMemPalace() definition. Now only the Fleet API version exists — fetches /health and /wings from port 7771, counts docs, computes compression ratio, updates UI. JS syntax verified. One connectMemPalace definition remains. Refs #1601 --- app.js | 58 +--------------------------------------------------------- 1 file changed, 1 insertion(+), 57 deletions(-) diff --git a/app.js b/app.js index f0ea76ca..ae1d0f38 100644 --- a/app.js +++ b/app.js @@ -3903,65 +3903,9 @@ init().then(() => { navigator.serviceWorker.register('/service-worker.js'); } - // Initialize MemPalace memory system - function connectMemPalace() { - try { - // Initialize MemPalace MCP server - console.log('Initializing MemPalace memory system...'); - - // Actual MCP server connection - const statusEl = document.getElementById('mem-palace-status'); - if (statusEl) { - statusEl.textContent = 'MemPalace ACTIVE'; - statusEl.style.color = '#4af0c0'; - statusEl.style.textShadow = '0 0 10px #4af0c0'; - } - - // Initialize MCP server connection - if (window.Claude && window.Claude.mcp) { - window.Claude.mcp.add('mempalace', { - init: () => { - return { status: 'active', version: '3.0.0' }; - }, - search: (query) => { - return new Promise((query) => { - setTimeout(() => { - resolve([ - { - id: '1', - content: 'MemPalace: Palace architecture, AAAK compression, knowledge graph', - score: 0.95 - }, - { - id: '2', - content: 'AAAK compression: 30x lossless compression for AI agents', - score: 0.88 - } - ]); - }, 500); - }); - } - }); - } - - // Initialize memory stats tracking - document.getElementById('compression-ratio').textContent = '0x'; - document.getElementById('docs-mined').textContent = '0'; - document.getElementById('aaak-size').textContent = '0B'; - } catch (err) { - console.error('Failed to initialize MemPalace:', err); - const statusEl = document.getElementById('mem-palace-status'); - if (statusEl) { - statusEl.textContent = 'MemPalace ERROR'; - statusEl.style.color = '#ff4466'; - statusEl.style.textShadow = '0 0 10px #ff4466'; - } - } - } + // Initialize MemPalace — connects to Fleet API (see connectMemPalace at line 2772) - // Initialize MemPalace const mempalace = { - status: { compression: 0, docs: 0, aak: '0B' }, mineChat: () => { try { const messages = Array.from(document.querySelectorAll('.chat-msg')).map(m => m.innerText);