prism-mcp-server 7.0.0 → 7.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -366,9 +366,10 @@ return false;}
366
366
  }));
367
367
  }
368
368
  catch (err) {
369
+ const errMsg = err instanceof Error ? err.message : "Cleanup failed";
369
370
  console.error("[Dashboard] Health cleanup error:", err);
370
371
  res.writeHead(500, { "Content-Type": "application/json" });
371
- return res.end(JSON.stringify({ ok: false, error: "Cleanup failed" }));
372
+ return res.end(JSON.stringify({ ok: false, error: errMsg, message: errMsg }));
372
373
  }
373
374
  }
374
375
  // ─── API: Role-Scoped Skills (v3.1) ───
@@ -3289,8 +3289,10 @@ Example:\n## Dev Rules\n- Always write tests first\n- Use TypeScript strict mode
3289
3289
  try {
3290
3290
  var res = await fetch('/api/health/cleanup', { method: 'POST' });
3291
3291
  var data = await res.json();
3292
- finishProgress(data.ok, data.message);
3293
- showFixedToast(data.message || (data.ok ? 'Cleanup complete.' : 'Cleanup failed.'), data.ok);
3292
+ var msg = data.message || data.error || (data.ok ? 'Cleanup complete.' : 'Cleanup failed.');
3293
+ finishProgress(data.ok, msg);
3294
+ showFixedToast(msg, data.ok);
3295
+ if (btn) { btn.disabled = false; btn.textContent = '🧹 Fix Issues'; }
3294
3296
  // Re-run health check to refresh the card
3295
3297
  setTimeout(async function() {
3296
3298
  try {
@@ -3317,7 +3319,10 @@ Example:\n## Dev Rules\n- Always write tests first\n- Use TypeScript strict mode
3317
3319
  healthIssues.innerHTML = '<div style="color:var(--accent-green);font-size:0.8rem">🎉 No issues found</div>';
3318
3320
  if (cleanupBtn) cleanupBtn.style.display = 'none';
3319
3321
  }
3320
- } catch(e) {}
3322
+ } catch(e) {
3323
+ // Health re-check failed — ensure button is usable
3324
+ if (btn) { btn.disabled = false; btn.textContent = '🧹 Fix Issues'; }
3325
+ }
3321
3326
  }, 400);
3322
3327
  } catch(e) {
3323
3328
  finishProgress(false, 'Request failed');
@@ -18,7 +18,7 @@
18
18
  import { debugLog } from "../utils/logger.js";
19
19
  import { getStorage } from "../storage/index.js";
20
20
  import { getLLMProvider } from "../utils/llm/factory.js";
21
- import { GOOGLE_API_KEY, PRISM_USER_ID } from "../config.js";
21
+ import { PRISM_USER_ID } from "../config.js";
22
22
  import { isBackfillEmbeddingsArgs, isSessionHealthCheckArgs, // Phase 2: GDPR-compliant memory deletion type guard
23
23
  isKnowledgeSetRetentionArgs,
24
24
  // v5.1: Deep Storage Mode type guard
@@ -41,11 +41,16 @@ export async function backfillEmbeddingsHandler(args) {
41
41
  if (!isBackfillEmbeddingsArgs(args)) {
42
42
  throw new Error("Invalid arguments for session_backfill_embeddings");
43
43
  }
44
- if (!GOOGLE_API_KEY) {
44
+ // Validate that an embedding provider is available (supports Gemini, OpenAI, etc.)
45
+ try {
46
+ getLLMProvider();
47
+ }
48
+ catch (providerErr) {
45
49
  return {
46
50
  content: [{
47
51
  type: "text",
48
- text: "❌ Cannot backfill: GOOGLE_API_KEY is not configured.",
52
+ text: "❌ Cannot backfill: No embedding provider available. " +
53
+ "Configure an API key in the dashboard Settings → AI Providers tab.",
49
54
  }],
50
55
  isError: true,
51
56
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "prism-mcp-server",
3
- "version": "7.0.0",
3
+ "version": "7.0.1",
4
4
  "mcpName": "io.github.dcostenco/prism-mcp",
5
5
  "description": "The Mind Palace for AI Agents — persistent memory (SQLite/Supabase), behavioral learning & IDE rules sync, multimodal VLM image captioning, pluggable LLM providers (OpenAI/Anthropic/Gemini/Ollama), OpenTelemetry distributed tracing, GDPR export, multi-agent Hivemind sync, time travel, visual Mind Palace dashboard. Zero-config local mode.",
6
6
  "module": "index.ts",