prism-mcp-server 5.2.0 → 5.5.0
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 +308 -218
- package/dist/backgroundScheduler.js +327 -0
- package/dist/config.js +29 -0
- package/dist/dashboard/server.js +246 -0
- package/dist/dashboard/ui.js +216 -6
- package/dist/hivemindWatchdog.js +206 -0
- package/dist/lifecycle.js +59 -4
- package/dist/scholar/freeSearch.js +78 -0
- package/dist/scholar/webScholar.js +258 -0
- package/dist/sdm/sdmDecoder.js +75 -0
- package/dist/sdm/sdmEngine.js +158 -0
- package/dist/server.js +173 -11
- package/dist/storage/sqlite.js +298 -47
- package/dist/storage/supabase.js +114 -1
- package/dist/tools/agentRegistryDefinitions.js +11 -4
- package/dist/tools/agentRegistryHandlers.js +23 -5
- package/dist/tools/index.js +2 -2
- package/dist/tools/sessionMemoryDefinitions.js +46 -1
- package/dist/tools/sessionMemoryHandlers.js +210 -38
- package/dist/utils/briefing.js +1 -1
- package/dist/utils/crdtMerge.js +152 -0
- package/dist/utils/healthCheck.js +15 -0
- package/dist/utils/llm/adapters/gemini.js +3 -3
- package/package.json +9 -2
|
@@ -263,6 +263,20 @@ export function runHealthCheck(stats) {
|
|
|
263
263
|
suggestion: "These rollups are safe but may contain outdated summaries",
|
|
264
264
|
});
|
|
265
265
|
}
|
|
266
|
+
// ── Check 5 (v5.4): CRDT Merge Activity ───────────────────
|
|
267
|
+
// Report CRDT merge activity as informational. High counts may
|
|
268
|
+
// indicate heavy contention that needs operational attention.
|
|
269
|
+
if (stats.totalCrdtMerges > 0) {
|
|
270
|
+
issues.push({
|
|
271
|
+
check: "crdt_merge_activity",
|
|
272
|
+
severity: stats.totalCrdtMerges > 50 ? "warning" : "info",
|
|
273
|
+
message: `${stats.totalCrdtMerges} CRDT auto-merge(s) performed across all projects`,
|
|
274
|
+
count: stats.totalCrdtMerges,
|
|
275
|
+
suggestion: stats.totalCrdtMerges > 50
|
|
276
|
+
? "High merge count may indicate excessive concurrent writes. Consider staggering agent schedules."
|
|
277
|
+
: "CRDT merges are working as expected — no action needed.",
|
|
278
|
+
});
|
|
279
|
+
}
|
|
266
280
|
// ── Calculate severity counts ──────────────────────────────
|
|
267
281
|
const errors = issues.filter(i => i.severity === "error").length; // count errors
|
|
268
282
|
const warnings = issues.filter(i => i.severity === "warning").length; // count warnings
|
|
@@ -294,6 +308,7 @@ export function runHealthCheck(stats) {
|
|
|
294
308
|
activeEntries: stats.totalActiveEntries, // total active entries
|
|
295
309
|
handoffs: stats.totalHandoffs, // total handoff records
|
|
296
310
|
rollups: stats.totalRollups, // total rollup entries
|
|
311
|
+
crdtMerges: stats.totalCrdtMerges, // v5.4: total CRDT auto-merges
|
|
297
312
|
},
|
|
298
313
|
issues, // all issues with details
|
|
299
314
|
counts: {
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
* All consumers call getLLMProvider() instead of touching the SDK directly.
|
|
21
21
|
*
|
|
22
22
|
* MODELS:
|
|
23
|
-
* Text: gemini-2.
|
|
23
|
+
* Text: gemini-2.5-flash — fast, stable successor to deprecated 2.0-flash
|
|
24
24
|
* Embedding: gemini-embedding-001 — replaced text-embedding-004 (deprecated 2026-01)
|
|
25
25
|
* Uses Matryoshka Representation Learning (MRL) at 768 dims.
|
|
26
26
|
* Requires v1beta API endpoint (NOT v1).
|
|
@@ -37,7 +37,7 @@ import { debugLog } from "../../logger.js";
|
|
|
37
37
|
// ─── Model Constants ──────────────────────────────────────────────────────────
|
|
38
38
|
// Defined as constants (not hardcoded strings) so external reviewers can see
|
|
39
39
|
// all model choices at a glance, and future changes only need one edit.
|
|
40
|
-
const TEXT_MODEL = "gemini-2.
|
|
40
|
+
const TEXT_MODEL = "gemini-2.5-flash"; // chat/instruction-following model
|
|
41
41
|
const EMBEDDING_MODEL = "gemini-embedding-001"; // vector embedding model (MRL-enabled)
|
|
42
42
|
const EMBEDDING_DIMS = 768; // fixed output dims — must match DB schema
|
|
43
43
|
// ─── Embedding Truncation Constants ──────────────────────────────────────────
|
|
@@ -135,7 +135,7 @@ export class GeminiAdapter {
|
|
|
135
135
|
// ─── Image Description (VLM) ─────────────────────────────────────────────
|
|
136
136
|
/**
|
|
137
137
|
* Describe an image using Gemini's native multimodal capability.
|
|
138
|
-
* gemini-2.
|
|
138
|
+
* gemini-2.5-flash handles images alongside text — the same model used for
|
|
139
139
|
* text generation, so no extra SDK initialization is needed.
|
|
140
140
|
*/
|
|
141
141
|
async generateImageDescription(imageBase64, mimeType, context) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "prism-mcp-server",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.5.0",
|
|
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",
|
|
@@ -76,6 +76,9 @@
|
|
|
76
76
|
"license": "MIT",
|
|
77
77
|
"devDependencies": {
|
|
78
78
|
"@types/bun": "latest",
|
|
79
|
+
"@types/jsdom": "^28.0.1",
|
|
80
|
+
"@types/mozilla-readability": "^0.2.1",
|
|
81
|
+
"@types/turndown": "^5.0.6",
|
|
79
82
|
"tsx": "^4.19.3",
|
|
80
83
|
"vitest": "^4.1.1"
|
|
81
84
|
},
|
|
@@ -88,17 +91,21 @@
|
|
|
88
91
|
"@google/generative-ai": "^0.24.1",
|
|
89
92
|
"@libsql/client": "^0.17.2",
|
|
90
93
|
"@modelcontextprotocol/sdk": "^1.27.1",
|
|
94
|
+
"@mozilla/readability": "^0.6.0",
|
|
91
95
|
"@opentelemetry/api": "^1.9.1",
|
|
92
96
|
"@opentelemetry/exporter-trace-otlp-http": "^0.214.0",
|
|
93
97
|
"@opentelemetry/resources": "^2.6.1",
|
|
94
98
|
"@opentelemetry/sdk-trace-node": "^2.6.1",
|
|
95
99
|
"@opentelemetry/semantic-conventions": "^1.40.0",
|
|
96
100
|
"@supabase/supabase-js": "^2.99.3",
|
|
101
|
+
"cheerio": "^1.2.0",
|
|
97
102
|
"dotenv": "^16.5.0",
|
|
98
103
|
"fflate": "^0.8.2",
|
|
104
|
+
"jsdom": "^29.0.1",
|
|
99
105
|
"openai": "^6.32.0",
|
|
100
106
|
"p-limit": "^7.3.0",
|
|
101
107
|
"quickjs-emscripten": "^0.32.0",
|
|
102
|
-
"stream-json": "^2.0.0"
|
|
108
|
+
"stream-json": "^2.0.0",
|
|
109
|
+
"turndown": "^7.2.2"
|
|
103
110
|
}
|
|
104
111
|
}
|