fix(#1601): Restore MemPalace Fleet API polling, remove mock MCP
Some checks failed
CI / test (pull_request) Failing after 57s
CI / validate (pull_request) Failing after 58s
Review Approval Gate / verify-review (pull_request) Failing after 10s

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
This commit is contained in:
Timmy
2026-04-15 12:34:11 -04:00
parent 7dff8a4b5e
commit 9397d88657

58
app.js
View File

@@ -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);