prism-mcp-server 2.3.6 β 2.3.8
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 +39 -4
- package/dist/config.js +1 -1
- package/dist/dashboard/ui.js +2 -2
- package/dist/server.js +55 -58
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -14,13 +14,15 @@
|
|
|
14
14
|
|
|
15
15
|
---
|
|
16
16
|
|
|
17
|
-
## What's New in v2.3.
|
|
17
|
+
## What's New in v2.3.8 β LangGraph Research Agent π¬
|
|
18
18
|
|
|
19
19
|
| Feature | Description |
|
|
20
20
|
|---|---|
|
|
21
|
-
|
|
|
22
|
-
|
|
|
23
|
-
|
|
|
21
|
+
| π€ **LangGraph Research Agent** | New `examples/langgraph-agent/` β a 5-node agentic research agent (planβsearchβanalyzeβdecideβanswerβsave) with autonomous looping, MCP integration, and persistent memory. |
|
|
22
|
+
| π§ **Agentic Memory** | `save_session` node persists research findings to a ledger β the agent doesn't just answer and forget. Routes to Prism's `session_save_ledger` in MCP-connected mode. |
|
|
23
|
+
| π **MCP Client Bridge** | Raw JSON-RPC 2.0 client (`mcp_client.py`) for Python 3.9+ β dynamically discovers and wraps Prism MCP tools as LangChain `StructuredTool` objects. |
|
|
24
|
+
| π§ **Storage Abstraction Fix** | Resource/Prompt handlers now route through `getStorage()` instead of calling Supabase directly β eliminates EOF crashes when reading `memory://` resources. |
|
|
25
|
+
| π‘οΈ **Error Boundaries** | Resource handlers catch errors gracefully and return proper MCP error responses (`isError: true`) instead of crashing the server process. |
|
|
24
26
|
|
|
25
27
|
<details>
|
|
26
28
|
<summary><strong>What's in v2.2.0</strong></summary>
|
|
@@ -251,6 +253,39 @@ Add to your Continue `config.json` or Cline MCP settings:
|
|
|
251
253
|
|
|
252
254
|
---
|
|
253
255
|
|
|
256
|
+
## Claude Code + Gemini Startup Compatibility
|
|
257
|
+
|
|
258
|
+
If you want consistent behavior across clients, treat startup in two phases:
|
|
259
|
+
|
|
260
|
+
1. **Server availability**: ensure `prism-mcp` is enabled in MCP config so tools are available.
|
|
261
|
+
2. **Context hydration**: explicitly call `session_load_context` at session start.
|
|
262
|
+
|
|
263
|
+
Recommended startup call:
|
|
264
|
+
|
|
265
|
+
```json
|
|
266
|
+
{
|
|
267
|
+
"projectName": "<your-project>",
|
|
268
|
+
"level": "standard"
|
|
269
|
+
}
|
|
270
|
+
```
|
|
271
|
+
|
|
272
|
+
Important distinction:
|
|
273
|
+
|
|
274
|
+
- Auto-loading `prism-mcp` makes the server available.
|
|
275
|
+
- It does **not** guarantee memory context is auto-hydrated unless your client runtime/hook invokes `session_load_context`.
|
|
276
|
+
|
|
277
|
+
Client notes:
|
|
278
|
+
|
|
279
|
+
- **Gemini runtimes** may support native startup execution depending on configuration.
|
|
280
|
+
- **Claude Code** should use a local `SessionStart` hook in `~/.claude/settings.json` for deterministic startup context loading.
|
|
281
|
+
|
|
282
|
+
Verification pattern (same for both clients):
|
|
283
|
+
|
|
284
|
+
- Print a startup marker after successful `session_load_context` (for example, `PRISM_CONTEXT_LOADED`).
|
|
285
|
+
- If the marker is missing, startup hydration did not run.
|
|
286
|
+
|
|
287
|
+
---
|
|
288
|
+
|
|
254
289
|
## Use Cases
|
|
255
290
|
|
|
256
291
|
| Scenario | How Prism MCP Helps |
|
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.
|
|
25
|
+
version: "2.3.7",
|
|
26
26
|
};
|
|
27
27
|
// βββ Required: Brave Search API Key βββββββββββββββββββββββββββ
|
|
28
28
|
export const BRAVE_API_KEY = process.env.BRAVE_API_KEY;
|
package/dist/dashboard/ui.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Mind Palace Dashboard β UI Renderer (v2.3.
|
|
2
|
+
* Mind Palace Dashboard β UI Renderer (v2.3.7)
|
|
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.
|
|
282
|
+
<span class="version-badge">v2.3.7</span>
|
|
283
283
|
</div>
|
|
284
284
|
<div class="selector">
|
|
285
285
|
<select id="projectSelect">
|
package/dist/server.js
CHANGED
|
@@ -61,12 +61,13 @@ SubscribeRequestSchema, UnsubscribeRequestSchema, } from "@modelcontextprotocol/
|
|
|
61
61
|
import { SERVER_CONFIG, SESSION_MEMORY_ENABLED, PRISM_USER_ID } from "./config.js";
|
|
62
62
|
import { getSyncBus } from "./sync/factory.js";
|
|
63
63
|
import { startDashboardServer } from "./dashboard/server.js";
|
|
64
|
-
// βββ
|
|
65
|
-
//
|
|
66
|
-
//
|
|
67
|
-
// the
|
|
68
|
-
//
|
|
69
|
-
|
|
64
|
+
// βββ v2.3.6 FIX: Use Storage Abstraction for Prompts/Resources βββ
|
|
65
|
+
// CRITICAL FIX: Previously imported supabaseRpc/supabaseGet directly,
|
|
66
|
+
// which bypassed the storage abstraction layer and caused the server
|
|
67
|
+
// to crash (EOF) when the Supabase REST call failed without a proper
|
|
68
|
+
// error wrapper. Now uses getStorage() which routes through the
|
|
69
|
+
// correct backend (Supabase or SQLite) with proper error handling.
|
|
70
|
+
import { getStorage } from "./storage/index.js";
|
|
70
71
|
// βββ Import Tool Definitions (schemas) and Handlers (implementations) βββββ
|
|
71
72
|
import { WEB_SEARCH_TOOL, BRAVE_WEB_SEARCH_CODE_MODE_TOOL, LOCAL_SEARCH_TOOL, BRAVE_LOCAL_SEARCH_CODE_MODE_TOOL, CODE_MODE_TRANSFORM_TOOL, BRAVE_ANSWERS_TOOL, RESEARCH_PAPER_ANALYSIS_TOOL, webSearchHandler, braveWebSearchCodeModeHandler, localSearchHandler, braveLocalSearchCodeModeHandler, codeModeTransformHandler, braveAnswersHandler, researchPaperAnalysisHandler, } from "./tools/index.js";
|
|
72
73
|
// Session memory tools β only used if Supabase is configured
|
|
@@ -271,14 +272,10 @@ export function createServer() {
|
|
|
271
272
|
const project = promptArgs?.project || "default";
|
|
272
273
|
const level = promptArgs?.level || "standard";
|
|
273
274
|
console.error(`[prompt:resume_session] Loading ${level} context for "${project}"`);
|
|
274
|
-
//
|
|
275
|
-
|
|
276
|
-
const result = await
|
|
277
|
-
|
|
278
|
-
p_level: level,
|
|
279
|
-
p_user_id: PRISM_USER_ID,
|
|
280
|
-
});
|
|
281
|
-
const data = Array.isArray(result) ? result[0] : result;
|
|
275
|
+
// v2.3.6 FIX: Use storage abstraction instead of direct supabaseRpc
|
|
276
|
+
const storage = await getStorage();
|
|
277
|
+
const result = await storage.loadContext(project, level, PRISM_USER_ID);
|
|
278
|
+
const data = result;
|
|
282
279
|
// REVIEWER NOTE: We include the version in the prompt text so
|
|
283
280
|
// the LLM knows to pass it back when saving. This is critical
|
|
284
281
|
// for OCC (Enhancement #5) to work even when context is loaded
|
|
@@ -343,28 +340,25 @@ export function createServer() {
|
|
|
343
340
|
}));
|
|
344
341
|
// List concrete resources β one per known project
|
|
345
342
|
server.setRequestHandler(ListResourcesRequestSchema, async () => {
|
|
346
|
-
//
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
};
|
|
343
|
+
// v2.3.6 FIX: Use storage abstraction instead of direct supabaseGet
|
|
344
|
+
try {
|
|
345
|
+
const storage = await getStorage();
|
|
346
|
+
const projects = await storage.listProjects();
|
|
347
|
+
return {
|
|
348
|
+
resources: projects.map((p) => ({
|
|
349
|
+
uri: `memory://${p}/handoff`,
|
|
350
|
+
name: `${p} β Session State`,
|
|
351
|
+
mimeType: "application/json",
|
|
352
|
+
})),
|
|
353
|
+
};
|
|
354
|
+
}
|
|
355
|
+
catch (error) {
|
|
356
|
+
console.error(`[resource:list] Error listing resources: ${error}`);
|
|
357
|
+
return { resources: [] };
|
|
358
|
+
}
|
|
363
359
|
});
|
|
364
360
|
// Read a specific project's handoff as a resource
|
|
365
361
|
server.setRequestHandler(ReadResourceRequestSchema, async (request) => {
|
|
366
|
-
// REVIEWER NOTE: Parse the project name from the URI.
|
|
367
|
-
// URI format: memory://{project}/handoff
|
|
368
362
|
const uri = request.params.uri;
|
|
369
363
|
const match = uri.match(/^memory:\/\/(.+)\/handoff$/);
|
|
370
364
|
if (!match) {
|
|
@@ -372,32 +366,35 @@ export function createServer() {
|
|
|
372
366
|
}
|
|
373
367
|
const project = decodeURIComponent(match[1]);
|
|
374
368
|
console.error(`[resource:read] Fetching handoff for "${project}"`);
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
369
|
+
try {
|
|
370
|
+
// v2.3.6 FIX: Use storage abstraction instead of direct supabaseRpc
|
|
371
|
+
const storage = await getStorage();
|
|
372
|
+
const data = await storage.loadContext(project, "standard", PRISM_USER_ID);
|
|
373
|
+
const resourceData = data || { status: "no_session_found", project };
|
|
374
|
+
if (data?.version) {
|
|
375
|
+
resourceData._occ_instruction =
|
|
376
|
+
`When saving handoff state, you MUST pass expected_version: ${data.version} ` +
|
|
377
|
+
`to prevent state collisions with other sessions.`;
|
|
378
|
+
}
|
|
379
|
+
return {
|
|
380
|
+
contents: [{
|
|
381
|
+
uri: uri,
|
|
382
|
+
mimeType: "application/json",
|
|
383
|
+
text: JSON.stringify(resourceData, null, 2),
|
|
384
|
+
}],
|
|
385
|
+
};
|
|
386
|
+
}
|
|
387
|
+
catch (error) {
|
|
388
|
+
console.error(`[resource:read] Error reading resource ${uri}: ${error}`);
|
|
389
|
+
return {
|
|
390
|
+
isError: true,
|
|
391
|
+
contents: [{
|
|
392
|
+
uri: uri,
|
|
393
|
+
mimeType: "text/plain",
|
|
394
|
+
text: `Error reading resource: ${error instanceof Error ? error.message : String(error)}`,
|
|
395
|
+
}],
|
|
396
|
+
};
|
|
393
397
|
}
|
|
394
|
-
return {
|
|
395
|
-
contents: [{
|
|
396
|
-
uri: uri,
|
|
397
|
-
mimeType: "application/json",
|
|
398
|
-
text: JSON.stringify(resourceData, null, 2),
|
|
399
|
-
}],
|
|
400
|
-
};
|
|
401
398
|
});
|
|
402
399
|
// βββ Resource Subscriptions: subscribe/unsubscribe βββ
|
|
403
400
|
// REVIEWER NOTE: These handlers track which resource URIs the
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "prism-mcp-server",
|
|
3
|
-
"version": "2.3.
|
|
3
|
+
"version": "2.3.8",
|
|
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",
|