prism-mcp-server 2.3.3 → 2.3.5

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.
package/README.md CHANGED
@@ -14,7 +14,7 @@
14
14
 
15
15
  ---
16
16
 
17
- ## What's New in v2.3.1 — AI Reasoning Engine 🧠
17
+ ## What's New in v2.3.5 — AI Reasoning Engine 🧠
18
18
 
19
19
  | Feature | Description |
20
20
  |---|---|
@@ -398,6 +398,52 @@ If it's been more than 4 hours since your last session, Prism automatically:
398
398
 
399
399
  The agent boots up knowing exactly what to do — zero prompting needed.
400
400
 
401
+ ### Auto-Load on Session Start (Recommended)
402
+
403
+ For the best experience, configure your AI coding assistant to **automatically call `session_load_context`** at the start of every new session. This ensures your agent always boots with full project memory — no manual prompting needed.
404
+
405
+ <details>
406
+ <summary><strong>Claude Code (.clauderules / CLAUDE.md)</strong></summary>
407
+
408
+ Add this rule to your project's `.clauderules` or `CLAUDE.md`:
409
+
410
+ ```markdown
411
+ ## Prism MCP Memory Auto-Load (CRITICAL)
412
+ At the start of every new session, you MUST call `session_load_context`
413
+ at the `standard` level for these projects:
414
+ - `my-project`
415
+ - `my-other-project`
416
+
417
+ Do NOT skip this step.
418
+ ```
419
+
420
+ </details>
421
+
422
+ <details>
423
+ <summary><strong>Gemini / Antigravity (GEMINI.md)</strong></summary>
424
+
425
+ Add this rule to your `~/.gemini/GEMINI.md` global rules file:
426
+
427
+ ```markdown
428
+ ## Prism MCP Memory Auto-Load (CRITICAL)
429
+ **At the start of every new session**, immediately after displaying
430
+ the startup block, you MUST call `session_load_context` (via the
431
+ `athena-public` MCP server) at the `standard` level for these projects:
432
+ - `my-project`
433
+ - `my-other-project`
434
+
435
+ This ensures accumulated project memory, pending TODOs, and key context
436
+ from previous sessions are always available. Do NOT skip this step.
437
+
438
+ **IMPORTANT:** The `athena-public` MCP server is always available.
439
+ Do NOT display any warnings or notes about MCP server availability
440
+ — just call the tools directly. Never claim the server is unavailable.
441
+ ```
442
+
443
+ </details>
444
+
445
+ > **Tip:** Replace `my-project` with your actual project identifiers. You can list as many projects as you need — each one gets its own independent memory timeline.
446
+
401
447
  ---
402
448
 
403
449
  ## Time Travel (Version History)
@@ -577,6 +623,7 @@ See [`vertex-ai/`](vertex-ai/) for setup and benchmarks.
577
623
  │ │ ├── supabaseSync.ts # Supabase Realtime CDC for cloud mode
578
624
  │ │ └── factory.ts # Auto-selects sync backend
579
625
  │ ├── dashboard/
626
+ │ │ ├── server.ts # Dashboard HTTP server with port recovery
580
627
  │ │ └── ui.ts # Mind Palace glassmorphism HTML template
581
628
  │ ├── templates/
582
629
  │ │ └── codeMode.ts # 8 pre-built QuickJS extraction templates
package/dist/config.js CHANGED
@@ -22,7 +22,7 @@
22
22
  // multi-tenant Row Level Security (RLS) for production hosting.
23
23
  export const SERVER_CONFIG = {
24
24
  name: "prism-mcp",
25
- version: "2.3.3",
25
+ version: "2.3.4",
26
26
  };
27
27
  // ─── Required: Brave Search API Key ───────────────────────────
28
28
  export const BRAVE_API_KEY = process.env.BRAVE_API_KEY;
@@ -17,11 +17,49 @@
17
17
  * ═══════════════════════════════════════════════════════════════════
18
18
  */
19
19
  import * as http from "http";
20
+ import { execSync } from "child_process";
20
21
  import { getStorage } from "../storage/index.js";
21
22
  import { PRISM_USER_ID } from "../config.js";
22
23
  import { renderDashboardHTML } from "./ui.js";
23
24
  const PORT = parseInt(process.env.PRISM_DASHBOARD_PORT || "3000", 10);
25
+ /**
26
+ * Kill any existing process holding the dashboard port.
27
+ * This prevents zombie dashboard processes from surviving IDE restarts
28
+ * and serving stale versions of the UI.
29
+ */
30
+ function killPortHolder(port) {
31
+ try {
32
+ // lsof returns PIDs listening on the port; -t gives terse (PID-only) output
33
+ const pids = execSync(`lsof -ti tcp:${port}`, { encoding: "utf-8" })
34
+ .trim()
35
+ .split("\n")
36
+ .filter(Boolean);
37
+ if (pids.length === 0)
38
+ return;
39
+ // Don't kill ourselves
40
+ const myPid = String(process.pid);
41
+ const stalePids = pids.filter(p => p !== myPid);
42
+ if (stalePids.length > 0) {
43
+ console.error(`[Dashboard] Killing stale process(es) on port ${port}: ${stalePids.join(", ")}`);
44
+ execSync(`kill ${stalePids.join(" ")}`, { encoding: "utf-8" });
45
+ // Brief pause to let the OS release the port
46
+ execSync("sleep 0.3");
47
+ }
48
+ }
49
+ catch (err) {
50
+ // lsof exits with code 1 when no matches found — that's expected.
51
+ // Any other failure (lsof missing, permission denied, etc.) gets a warning.
52
+ const isNoMatch = err instanceof Error &&
53
+ "status" in err &&
54
+ err.status === 1;
55
+ if (!isNoMatch) {
56
+ console.error(`[Dashboard] killPortHolder: could not check port ${port} (lsof may not be installed) — skipping.`);
57
+ }
58
+ }
59
+ }
24
60
  export async function startDashboardServer() {
61
+ // Clean up any zombie dashboard process from a previous session
62
+ killPortHolder(PORT);
25
63
  const storage = await getStorage();
26
64
  const httpServer = http.createServer(async (req, res) => {
27
65
  // CORS headers for local dev
@@ -36,7 +74,10 @@ export async function startDashboardServer() {
36
74
  const url = new URL(req.url || "/", `http://${req.headers.host}`);
37
75
  // ─── Serve the Dashboard UI ───
38
76
  if (url.pathname === "/" || url.pathname === "/index.html") {
39
- res.writeHead(200, { "Content-Type": "text/html; charset=utf-8" });
77
+ res.writeHead(200, {
78
+ "Content-Type": "text/html; charset=utf-8",
79
+ "Cache-Control": "no-store, no-cache, must-revalidate",
80
+ });
40
81
  return res.end(renderDashboardHTML());
41
82
  }
42
83
  // ─── API: List all projects ───
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Mind Palace Dashboard — UI Renderer (v2.3.3)
2
+ * Mind Palace Dashboard — UI Renderer (v2.3.4)
3
3
  *
4
4
  * Pure CSS + Vanilla JS single-page dashboard.
5
5
  * No build step, no Tailwind, no framework — served as a template literal.
@@ -279,7 +279,7 @@ export function renderDashboardHTML() {
279
279
  <div class="logo">
280
280
  <span class="logo-icon">🧠</span>
281
281
  Prism Mind Palace
282
- <span class="version-badge">v2.3.3</span>
282
+ <span class="version-badge">v2.3.4</span>
283
283
  </div>
284
284
  <div class="selector">
285
285
  <select id="projectSelect">
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "prism-mcp-server",
3
- "version": "2.3.3",
3
+ "version": "2.3.5",
4
4
  "mcpName": "io.github.dcostenco/prism-mcp",
5
5
  "description": "The Mind Palace for AI Agents — local-first MCP server with persistent memory (SQLite/Supabase), visual dashboard, time travel, multi-agent sync, Morning Briefings, reality drift detection, code mode templates, semantic vector search, and Brave Search + Gemini analysis. Zero-config local mode.",
6
6
  "module": "index.ts",