prism-mcp-server 2.3.4 → 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.4 — AI Reasoning Engine 🧠
17
+ ## What's New in v2.3.5 — AI Reasoning Engine 🧠
18
18
 
19
19
  | Feature | Description |
20
20
  |---|---|
@@ -427,13 +427,17 @@ Add this rule to your `~/.gemini/GEMINI.md` global rules file:
427
427
  ```markdown
428
428
  ## Prism MCP Memory Auto-Load (CRITICAL)
429
429
  **At the start of every new session**, immediately after displaying
430
- the startup block, you MUST call `session_load_context` (via Prism MCP
431
- / athena-public server) at the `standard` level for these projects:
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
432
  - `my-project`
433
433
  - `my-other-project`
434
434
 
435
435
  This ensures accumulated project memory, pending TODOs, and key context
436
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.
437
441
  ```
438
442
 
439
443
  </details>
@@ -619,6 +623,7 @@ See [`vertex-ai/`](vertex-ai/) for setup and benchmarks.
619
623
  │ │ ├── supabaseSync.ts # Supabase Realtime CDC for cloud mode
620
624
  │ │ └── factory.ts # Auto-selects sync backend
621
625
  │ ├── dashboard/
626
+ │ │ ├── server.ts # Dashboard HTTP server with port recovery
622
627
  │ │ └── ui.ts # Mind Palace glassmorphism HTML template
623
628
  │ ├── templates/
624
629
  │ │ └── codeMode.ts # 8 pre-built QuickJS extraction templates
@@ -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
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "prism-mcp-server",
3
- "version": "2.3.4",
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",