prism-mcp-server 4.3.0 β†’ 4.6.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.
package/README.md CHANGED
@@ -14,7 +14,7 @@
14
14
 
15
15
  ## Table of Contents
16
16
 
17
- - [What's New (v4.2.0)](#whats-new-in-v420--project-repo-registry-)
17
+ - [What's New (v4.6.0)](#whats-new-in-v460--opentelemetry-observability-)
18
18
  - [Multi-Instance Support](#multi-instance-support)
19
19
  - [How Prism Compares](#how-prism-compares)
20
20
  - [Quick Start](#quick-start-zero-config--local-mode)
@@ -42,11 +42,56 @@
42
42
 
43
43
  ---
44
44
 
45
- ## What's New in v4.3.0 β€” The Bridge πŸŒ‰
45
+ ## What's New in v4.6.0 β€” OpenTelemetry Observability πŸ”­
46
+
47
+ > **πŸ”­ Full distributed tracing for every MCP tool call, LLM provider hop, and background AI worker.**
48
+ > Configure in the new **πŸ”­ Observability** tab in Mind Palace β€” no code changes required.
49
+ > Activates a 4-tier span waterfall: `mcp.call_tool` β†’ `worker.vlm_caption` β†’ `llm.generate_image_description` / `llm.generate_embedding`.
50
+
51
+ <a name="whats-new-in-v451--gdpr-export-"></a>
52
+ <details>
53
+ <summary><strong>What's in v4.5.1 β€” GDPR Export & Test Hardening πŸ”’</strong></summary>
54
+
55
+ | Feature | Description |
56
+ |---|---|
57
+ | πŸ“¦ **`session_export_memory`** | Full ZIP export of project memory (JSON + Markdown). Satisfies GDPR Art. 20 Right to Portability. API keys redacted, embeddings stripped. |
58
+ | πŸ§ͺ **270 Tests** | Concurrent export safety, redaction edge cases, MCP contract validation under load. |
59
+
60
+ </details>
61
+
62
+ <a name="whats-new-in-v450--vlm-multimodal-memory-"></a>
63
+ <details>
64
+ <summary><strong>What's in v4.5.0 β€” VLM Multimodal Memory πŸ‘οΈ</strong></summary>
65
+
66
+ | Feature | Description |
67
+ |---|---|
68
+ | πŸ‘οΈ **Visual Memory** | `session_save_image` β†’ VLM auto-caption β†’ ledger entry β†’ vector embedding. Images become semantically searchable with zero schema changes. |
69
+ | πŸ›‘οΈ **Provider Size Guards** | Anthropic 5MB hard cap, Gemini/OpenAI 20MB. Pre-flight check before API call. |
70
+
71
+ </details>
72
+
73
+ <a name="whats-new-in-v440--pluggable-llm-adapters-"></a>
74
+ <details>
75
+ <summary><strong>What's in v4.4.0 β€” Pluggable LLM Adapters (BYOM) πŸ”Œ</strong></summary>
76
+
77
+ | Feature | Description |
78
+ |---|---|
79
+ | πŸ”Œ **BYOM** | OpenAI, Anthropic, Gemini, Ollama adapters. Text + embedding providers independently configurable. |
80
+ | πŸ›‘οΈ **Air-Gapped** | Full local mode via `http://127.0.0.1:11434` β€” zero cloud API keys required. |
81
+
82
+ </details>
83
+
84
+ <a name="whats-new-in-v430--the-bridge-"></a>
85
+ <details>
86
+ <summary><strong>What's in v4.3.0 β€” The Bridge: Knowledge Sync Rules πŸŒ‰</strong></summary>
46
87
 
47
88
  > **🧠 Active Behavioral Memory & IDE Sync**
48
- > Prism doesn't just log what happenedβ€”it learns. When an agent is corrected, the memory gains "Importance". Once an insight graduates (Importance >= 7), Prism can automatically sync it directly to your `.cursorrules` or `.clauderules` file, turning dynamic behavioral learnings into permanent, zero-token IDE enforcement.
89
+ > Prism doesn't just log what happenedβ€”it learns. When an agent is corrected, the memory gains "Importance". Once an insight graduates (Importance >= 7), Prism automatically syncs it to `.cursorrules` / `.clauderules` β€” permanent, zero-token IDE enforcement.
90
+
91
+ </details>
49
92
 
93
+
94
+ <a name="whats-new-in-v420--project-repo-registry-"></a>
50
95
  <details>
51
96
  <summary><strong>What's in v4.2.0 β€” Project Repo Registry πŸ—‚οΈ</strong></summary>
52
97
 
@@ -58,6 +103,7 @@
58
103
 
59
104
  </details>
60
105
 
106
+ <a name="whats-in-v410--auto-migration--multi-instance-"></a>
61
107
  <details>
62
108
  <summary><strong>What's in v4.1.0 β€” Auto-Migration & Multi-Instance πŸ”€</strong></summary>
63
109
 
@@ -69,6 +115,7 @@
69
115
 
70
116
  </details>
71
117
 
118
+ <a name="whats-in-v400--behavioral-memory-"></a>
72
119
  <details>
73
120
  <summary><strong>What's in v4.0.0 β€” Behavioral Memory 🧠</strong></summary>
74
121
 
@@ -82,6 +129,7 @@
82
129
 
83
130
  </details>
84
131
 
132
+ <a name="whats-in-v310--memory-lifecycle-"></a>
85
133
  <details>
86
134
  <summary><strong>What's in v3.1.0 β€” Memory Lifecycle πŸ”„</strong></summary>
87
135
 
@@ -107,6 +155,7 @@
107
155
 
108
156
  </details>
109
157
 
158
+ <a name="whats-in-v300--agent-hivemind-"></a>
110
159
  <details>
111
160
  <summary><strong>What's in v3.0.0 β€” Agent Hivemind 🐝</strong></summary>
112
161
 
@@ -124,24 +173,24 @@
124
173
 
125
174
 
126
175
  <details>
127
- <summary><strong>What's in v2.5.0 β€” Enterprise Memory πŸ—οΈ</strong></summary>
176
+ <summary><strong>What's in v2.5.1 β€” Version Sync & Embedding Safety</strong></summary>
128
177
 
129
178
  | Feature | Description |
130
179
  |---|---|
131
- | πŸ” **Memory Tracing** | `MemoryTrace` with latency breakdown and scoring metadata for LangSmith. |
132
- | πŸ›‘οΈ **GDPR Deletion** | `session_forget_memory` with soft/hard delete and Article 17 justification. |
133
- | πŸ”— **LangChain Integration** | `PrismMemoryRetriever` / `PrismKnowledgeRetriever` BaseRetriever adapters. |
134
- | 🧩 **LangGraph Agent** | 5-node research agent example with MCP bridge and hybrid search. |
180
+ | πŸ”„ **Dynamic Versioning** | Version derived from `package.json` β€” MCP handshake, dashboard, and npm stay in sync. |
181
+ | πŸ›‘οΈ **Embedding Validation** | Validates 768-dimension vectors at runtime to catch model regressions. |
135
182
 
136
183
  </details>
137
184
 
138
185
  <details>
139
- <summary><strong>What's in v2.5.1 β€” Version Sync & Embedding Safety</strong></summary>
186
+ <summary><strong>What's in v2.5.0 β€” Enterprise Memory πŸ—οΈ</strong></summary>
140
187
 
141
188
  | Feature | Description |
142
189
  |---|---|
143
- | πŸ”„ **Dynamic Versioning** | Version derived from `package.json` β€” MCP handshake, dashboard, and npm stay in sync. |
144
- | πŸ›‘οΈ **Embedding Validation** | Validates 768-dimension vectors at runtime to catch model regressions. |
190
+ | πŸ” **Memory Tracing** | `MemoryTrace` with latency breakdown and scoring metadata for LangSmith. |
191
+ | πŸ›‘οΈ **GDPR Deletion** | `session_forget_memory` with soft/hard delete and Article 17 justification. |
192
+ | πŸ”— **LangChain Integration** | `PrismMemoryRetriever` / `PrismKnowledgeRetriever` BaseRetriever adapters. |
193
+ | 🧩 **LangGraph Agent** | 5-node research agent example with MCP bridge and hybrid search. |
145
194
 
146
195
  </details>
147
196
 
@@ -222,8 +271,11 @@
222
271
  | **Auto-Compaction** | βœ… Gemini rollups | ❌ | ❌ | ❌ | ❌ |
223
272
  | **Morning Briefing** | βœ… Gemini synthesis | ❌ | ❌ | ❌ | ❌ |
224
273
  | **OCC (Concurrency)** | βœ… Version-based | ❌ | ❌ | ❌ | ❌ |
225
- | **GDPR Compliance** | βœ… Soft/hard delete | ❌ | ❌ | ❌ | ❌ |
274
+ | **GDPR Compliance** | βœ… Soft/hard delete + ZIP export | ❌ | ❌ | ❌ | ❌ |
226
275
  | **Memory Tracing** | βœ… Latency breakdown | ❌ | ❌ | ❌ | ❌ |
276
+ | **OpenTelemetry** | βœ… OTLP spans (v4.6) | ❌ | ❌ | ❌ | ❌ |
277
+ | **VLM Image Captions** | βœ… Auto-caption vault (v4.5) | ❌ | ❌ | ❌ | ❌ |
278
+ | **Pluggable LLM Adapters** | βœ… OpenAI/Anthropic/Gemini/Ollama | ❌ | βœ… Multi-provider | ❌ | ❌ |
227
279
  | **LangChain** | βœ… BaseRetriever | ❌ | ❌ | ❌ | ❌ |
228
280
  | **MCP Native** | βœ… stdio | βœ… stdio | ❌ Python SDK | βœ… HTTP + MCP | βœ… stdio |
229
281
  | **Language** | TypeScript | TypeScript | Python | Python | Python |
@@ -537,15 +589,104 @@ At the end of each session, save state:
537
589
 
538
590
  ## Use Cases
539
591
 
540
- | Scenario | How Prism MCP Helps |
541
- |----------|-------------------|
542
- | **Long-running feature work** | Save session state at end of day, restore full context the next morning β€” no re-explaining |
543
- | **Multi-agent collaboration** | Telepathy sync lets multiple agents share context in real time |
544
- | **Consulting / multi-project** | Switch between client projects with progressive context loading |
545
- | **Research & analysis** | Multi-engine search with 94% context reduction via sandboxed code transforms |
546
- | **Team onboarding** | New team member's agent loads full project history via `session_load_context("deep")` |
547
- | **Visual debugging** | Save screenshots of broken UI to visual memory β€” the agent remembers what it looked like |
548
- | **Offline / air-gapped** | Full SQLite local mode with no internet dependency for memory features |
592
+ | Scenario | How Prism MCP Helps | Live Sample |
593
+ |----------|---------------------|-------------|
594
+ | **Long-running feature work** | Save session state at end of day, restore full context next morning β€” no re-explaining | `session_save_handoff(project, last_summary, open_todos)` |
595
+ | **Multi-agent collaboration** | Hivemind Telepathy lets multiple agents share real-time context across clients | `session_load_context(project, role="qa")` |
596
+ | **Consulting / multi-project** | Switch between client projects with progressive context loading | `session_load_context(project, level="quick")` |
597
+ | **Research & analysis** | Multi-engine search with 94% context reduction via sandboxed code transforms | `brave_web_search` + `code_mode_transform(template="api_endpoints")` |
598
+ | **Team onboarding** | New team member's agent loads full project history instantly | `session_load_context(project, level="deep")` |
599
+ | **Visual debugging** | Save UI screenshots to visual memory β€” searchable by description | `session_save_image(project, path, description)` β†’ `session_view_image(id)` |
600
+ | **Offline / air-gapped** | Full SQLite local mode, Ollama LLM adapter β€” zero internet dependency | `PRISM_LLM_PROVIDER=ollama` in MCP config env |
601
+ | **Behavior enforcement** | Agent corrections auto-graduate into permanent `.cursorrules` | `session_save_experience(event_type="correction")` β†’ `knowledge_sync_rules(project)` |
602
+ | **Infrastructure observability** | OTel spans to Jaeger/Grafana for every MCP tool call fanout | Enable in Dashboard β†’ Settings β†’ πŸ”­ Observability |
603
+ | **GDPR / audit export** | ZIP export of all memory as JSON + Markdown, sensitive fields redacted | `session_export_memory(project, format="zip")` |
604
+
605
+ ---
606
+
607
+ ## New in v4.6.0 β€” Feature Setup Guide
608
+
609
+ ### πŸ”­ OpenTelemetry Distributed Tracing
610
+
611
+ **Why:** Every `session_save_ledger` call can silently fan out into a synchronous DB write, an async VLM caption, and a vector embedding backfill. Without tracing, these are invisible. OTel makes the full call tree visible in Jaeger, Grafana Tempo, or any OTLP-compatible collector.
612
+
613
+ **Setup:**
614
+ 1. Open Mind Palace Dashboard β†’ βš™οΈ Settings β†’ πŸ”­ Observability
615
+ 2. Toggle **Enable OpenTelemetry** β†’ set your OTLP endpoint (default: `http://localhost:4318`)
616
+ 3. Restart the MCP server
617
+ 4. Run Jaeger locally:
618
+ ```bash
619
+ docker run -d --name jaeger \
620
+ -p 16686:16686 -p 4318:4318 \
621
+ jaegertracing/all-in-one:latest
622
+ ```
623
+ 5. Open http://localhost:16686 β€” select service `prism-mcp` to see span waterfalls.
624
+
625
+ **Span hierarchy:**
626
+ ```
627
+ mcp.call_tool [session_save_ledger]
628
+ β”œβ”€β”€ storage.write_ledger ~2ms
629
+ β”œβ”€β”€ llm.generate_embedding ~180ms
630
+ └── worker.vlm_caption (async) ~1.2s
631
+ ```
632
+
633
+ > GDPR note: Span attributes contain only metadata β€” no prompt content, embeddings, or image data.
634
+
635
+ ---
636
+
637
+ ### πŸ–ΌοΈ VLM Multimodal Memory
638
+
639
+ **Why:** Agents lose visual context between sessions. UI screenshots, architecture diagrams, and bug states all become searchable memory.
640
+
641
+ **Setup:** Requires `ANTHROPIC_API_KEY` or `OPENAI_API_KEY` (vision-capable model).
642
+
643
+ **Usage:**
644
+ ```
645
+ session_save_image(project="my-app", file_path="/path/to/screenshot.png", description="Login page broken layout after CSS refactor")
646
+ ```
647
+ The image is auto-captioned by a VLM and stored in the media vault. Retrieve later:
648
+ ```
649
+ session_view_image(project="my-app", image_id="8f2a1b3c")
650
+ ```
651
+
652
+ ---
653
+
654
+ ### πŸ”Œ Pluggable LLM Adapters
655
+
656
+ **Why:** Run fully local/air-gapped with Ollama, or switch providers without changing tool logic.
657
+
658
+ **Setup:** Set in MCP config `env`:
659
+
660
+ ```json
661
+ {
662
+ "env": {
663
+ "PRISM_LLM_PROVIDER": "ollama",
664
+ "PRISM_LLM_MODEL": "llama3.2",
665
+ "PRISM_LLM_BASE_URL": "http://localhost:11434"
666
+ }
667
+ }
668
+ ```
669
+
670
+ | Provider | Env Var | Notes |
671
+ |----------|---------|-------|
672
+ | `gemini` (default) | `GOOGLE_API_KEY` | Best for Morning Briefings |
673
+ | `openai` | `OPENAI_API_KEY` | GPT-4o supports VLM |
674
+ | `anthropic` | `ANTHROPIC_API_KEY` | Claude 3.5 supports VLM |
675
+ | `ollama` | none | Full local/air-gapped mode |
676
+
677
+ ---
678
+
679
+ ### πŸ“¦ GDPR Memory Export
680
+
681
+ ```
682
+ session_export_memory(project="my-app", format="zip")
683
+ ```
684
+
685
+ Outputs a ZIP containing:
686
+ - `ledger.json` β€” all session entries
687
+ - `handoffs.json` β€” all project state snapshots
688
+ - `knowledge.md` β€” graduated insights in Markdown
689
+ - Sensitive fields (API keys, tokens) automatically redacted
549
690
 
550
691
  ---
551
692
 
@@ -698,9 +839,9 @@ The tool and dashboard button both call the same repair logic β€” the dashboard
698
839
  4. On `session_load_context`, high-importance corrections auto-surface as `[⚠️ BEHAVIORAL WARNINGS]`
699
840
  5. Agent sees warnings and avoids repeating past mistakes
700
841
 
701
- ### v4.2 Knowledge Sync Rules β€” "The Bridge"
842
+ ### v4.3.0 Knowledge Sync Rules β€” "The Bridge"
702
843
 
703
- Bridges **v4.0 Behavioral Memory** (graduated insights) with **v4.2 Project Registry** (repo paths) to physically write agent learnings into your project's IDE rules file.
844
+ Bridges **v4.0 Behavioral Memory** (graduated insights) with **v4.2.0 Project Registry** (repo paths) to physically write agent learnings into your project's IDE rules file.
704
845
 
705
846
  | Feature | Without Sync Rules | With `knowledge_sync_rules` |
706
847
  |---------|-------------------|----------------------------|
@@ -1152,7 +1293,7 @@ Prism supports surgical, per-entry deletion for GDPR Article 17 compliance:
1152
1293
  | Data Protection by Design (Art. 25) | βœ… Implemented | Ownership guards, DB-level filtering, safe defaults |
1153
1294
  | Audit Trail | βœ… Implemented | `deleted_at` + `deleted_reason` columns |
1154
1295
  | User Isolation | βœ… Implemented | `user_id` verification on all delete operations |
1155
- | Right to Portability (Art. 20) | ⬜ Roadmap | `session_export_memory` (planned) |
1296
+ | Right to Portability (Art. 20) | βœ… Implemented | `session_export_memory` β€” ZIP export of JSON + Markdown, API keys redacted |
1156
1297
  | Consent Management | βž– Out of scope | Application-layer responsibility |
1157
1298
 
1158
1299
  > **Note:** No software is "GDPR certified" on its own β€” GDPR is an organizational compliance framework. Prism provides the technical controls that a DPO (Data Protection Officer) needs to satisfy the data deletion and privacy-by-design requirements.
@@ -1161,40 +1302,50 @@ Prism supports surgical, per-entry deletion for GDPR Article 17 compliance:
1161
1302
 
1162
1303
  ## Observability & Tracing
1163
1304
 
1164
- Prism MCP includes a custom **MemoryTrace** engine that provides per-query observability for every memory operation. This is not the OpenTelemetry SDK β€” it's a lightweight, zero-dependency tracing system purpose-built for MCP.
1305
+ Prism MCP ships **two complementary tracing systems** serving different audiences:
1165
1306
 
1166
- ### What MemoryTrace Provides
1307
+ | | MemoryTrace | OpenTelemetry (OTel) |
1308
+ |---|---|---|
1309
+ | **Question answered** | Why was this memory returned? | What was the end-to-end latency? |
1310
+ | **Output** | `content[1]` in MCP response | OTLP β†’ Jaeger / Tempo / Zipkin |
1311
+ | **Trigger** | `enable_trace: true` parameter | Every tool call, automatically |
1312
+ | **Audience** | LLM / LangSmith orchestration | Developers debugging infrastructure |
1167
1313
 
1168
- | Capability | MemoryTrace | Full OpenTelemetry SDK |
1169
- |------------|:-----------:|:----------------------:|
1170
- | Per-query latency breakdown (`embedding_ms`, `storage_ms`, `total_ms`) | βœ… | βœ… |
1171
- | Search strategy attribution (`semantic`, `keyword`, `hybrid`) | βœ… | ❌ (custom) |
1172
- | Result scoring metadata | βœ… | ❌ (custom) |
1173
- | LangSmith integration (via retriever metadata) | βœ… | βœ… |
1174
- | W3C `traceparent` / distributed trace context | ❌ | βœ… |
1175
- | Export to Jaeger / Zipkin / Datadog | ❌ | βœ… |
1176
- | Auto-instrumentation of HTTP / DB calls | ❌ | βœ… |
1177
- | External SDK dependency | **None** | `@opentelemetry/sdk-*` |
1314
+ ### MemoryTrace (Phase 1 β€” LLM Explainability)
1178
1315
 
1179
- ### Example MemoryTrace Output
1316
+ A zero-dependency tracing system built for MCP. Returns per-query latency breakdowns and result scoring metadata as a second `content` block β€” keeping structured telemetry out of the LLM's context window.
1180
1317
 
1181
1318
  ```json
1182
- {
1183
- "type": "text",
1184
- "text": "{\"trace\":{\"strategy\":\"semantic\",\"latency\":{\"embedding_ms\":45,\"storage_ms\":12,\"total_ms\":57},\"result_count\":3,\"threshold\":0.7}}"
1185
- }
1319
+ { "trace": { "strategy": "semantic", "latency": { "embedding_ms": 45, "storage_ms": 12, "total_ms": 57 }, "result_count": 3 } }
1186
1320
  ```
1187
1321
 
1188
- Traces are returned as `content[1]` in MCP responses β€” a separate content block that keeps structured telemetry out of the LLM's context window while making it available to orchestration layers like LangSmith.
1322
+ ### OpenTelemetry (Phase 2 β€” Infrastructure Observability)
1189
1323
 
1190
- ### Roadmap
1324
+ Every MCP tool call emits a **4-tier span waterfall** to any OTLP-compatible collector:
1325
+
1326
+ ```
1327
+ mcp.call_tool [e.g. session_save_image, ~50 ms]
1328
+ └─ worker.vlm_caption [~2–5 s, outlives parent βœ“]
1329
+ └─ llm.generate_image_description [~1–4 s]
1330
+ └─ llm.generate_embedding [~200 ms]
1331
+ ```
1332
+
1333
+ **Quick-start with Jaeger:**
1334
+
1335
+ ```bash
1336
+ docker run -d -p 4318:4318 -p 16686:16686 jaegertracing/all-in-one
1337
+ ```
1338
+
1339
+ Then open **Mind Palace Dashboard β†’ βš™οΈ Settings β†’ πŸ”­ Observability**, toggle OTel on, and restart. Open [localhost:16686](http://localhost:16686) to see traces.
1340
+
1341
+ **GDPR-safe by design:** Span attributes capture only character counts and byte sizes β€” never prompt content, vector embeddings, or base64 image data.
1342
+
1343
+ | Setting | Default | Description |
1344
+ |---------|---------|-------------|
1345
+ | `otel_enabled` | `false` | Toggle OTel pipeline on/off (restart required) |
1346
+ | `otel_endpoint` | `http://localhost:4318/v1/traces` | OTLP HTTP collector URL |
1347
+ | `otel_service_name` | `prism-mcp-server` | Service label in trace UI |
1191
1348
 
1192
- | Feature | Status |
1193
- |---------|--------|
1194
- | MemoryTrace (current) | βœ… Shipped |
1195
- | OpenTelemetry SDK integration | ⬜ Planned |
1196
- | Span export to Jaeger/Zipkin | ⬜ Planned |
1197
- | W3C Trace Context propagation | ⬜ Planned |
1198
1349
 
1199
1350
  ---
1200
1351
 
@@ -1361,7 +1512,10 @@ See [`vertex-ai/`](vertex-ai/) for setup and benchmarks.
1361
1512
  β”‚ β”‚ β”œβ”€β”€ compactionHandler.ts # Gemini-powered ledger compaction
1362
1513
  β”‚ β”‚ └── index.ts # Tool registration & re-exports
1363
1514
  β”‚ └── utils/
1364
- β”‚ β”œβ”€β”€ tracing.ts # MemoryTrace types + factory (Phase 1)
1515
+ β”‚ └── utils/
1516
+ β”‚ β”œβ”€β”€ telemetry.ts # OTel singleton β€” NodeTracerProvider, BatchSpanProcessor, no-op mode
1517
+ β”‚ β”œβ”€β”€ tracing.ts # MemoryTrace types + factory (Phase 1 β€” LLM explainability)
1518
+ β”‚ β”œβ”€β”€ imageCaptioner.ts # VLM auto-caption pipeline (v4.5) + worker.vlm_caption OTel span
1365
1519
  β”‚ β”œβ”€β”€ logger.ts # Debug logging (gated by PRISM_DEBUG_LOGGING)
1366
1520
  β”‚ β”œβ”€β”€ braveApi.ts # Brave Search REST client
1367
1521
  β”‚ β”œβ”€β”€ googleAi.ts # Gemini SDK wrapper
@@ -1370,8 +1524,17 @@ See [`vertex-ai/`](vertex-ai/) for setup and benchmarks.
1370
1524
  β”‚ β”œβ”€β”€ healthCheck.ts # Brain integrity engine + security scanner
1371
1525
  β”‚ β”œβ”€β”€ factMerger.ts # Async LLM contradiction resolution
1372
1526
  β”‚ β”œβ”€β”€ git.ts # Git state capture + drift detection
1373
- β”‚ β”œβ”€β”€ embeddingApi.ts # Embedding generation (Gemini)
1374
- β”‚ └── keywordExtractor.ts # Zero-dependency NLP keyword extraction
1527
+ β”‚ β”œβ”€β”€ embeddingApi.ts # Embedding generation
1528
+ β”‚ β”œβ”€β”€ keywordExtractor.ts # Zero-dependency NLP keyword extraction
1529
+ β”‚ └── llm/
1530
+ β”‚ β”œβ”€β”€ provider.ts # LLMProvider interface
1531
+ β”‚ β”œβ”€β”€ factory.ts # Provider factory β€” composes + wraps in TracingLLMProvider
1532
+ β”‚ └── adapters/
1533
+ β”‚ β”œβ”€β”€ gemini.ts # Google Gemini adapter
1534
+ β”‚ β”œβ”€β”€ openai.ts # OpenAI adapter
1535
+ β”‚ β”œβ”€β”€ anthropic.ts # Anthropic Claude adapter
1536
+ β”‚ β”œβ”€β”€ ollama.ts # Ollama (local) adapter
1537
+ β”‚ └── traced.ts # TracingLLMProvider decorator (v4.6 OTel)
1375
1538
  β”œβ”€β”€ examples/langgraph-agent/ # LangChain/LangGraph integration
1376
1539
  β”‚ β”œβ”€β”€ agent.py # 5-node LangGraph research agent
1377
1540
  β”‚ β”œβ”€β”€ mcp_client.py # MCP Bridge (call_tool + call_tool_raw)
@@ -1389,16 +1552,43 @@ See [`vertex-ai/`](vertex-ai/) for setup and benchmarks.
1389
1552
 
1390
1553
  ## πŸš€ Roadmap
1391
1554
 
1392
- > **[View the full project board β†’](https://github.com/users/dcostenco/projects/1/views/1)**
1555
+ > **[View the full project board β†’](https://github.com/users/dcostenco/projects/1/views/1)** | **[Full ROADMAP.md β†’](ROADMAP.md)**
1556
+
1557
+ ### βœ… v4.6 β€” OpenTelemetry Observability (Shipped!)
1558
+
1559
+ | Feature | Description |
1560
+ |---|---|
1561
+ | πŸ”­ **OTel Root Span** | Every MCP tool call wrapped in `mcp.call_tool` span β€” propagated to all child async operations via AsyncLocalStorage. |
1562
+ | 🎨 **TracingLLMProvider** | Decorator pattern wraps the composed LLM factory. Zero changes to vendor adapters. Instruments `generate_text`, `generate_embedding`, `generate_image_description`. |
1563
+ | βš™οΈ **Worker Spans** | `worker.vlm_caption` span in `imageCaptioner` correctly parents fire-and-forget async tasks to the root span. |
1564
+ | πŸ”’ **Shutdown Flush** | `shutdownTelemetry()` wired as step-0 in `lifecycle.ts` β€” flushes `BatchSpanProcessor` before DB closes on SIGTERM. |
1565
+ | πŸ–₯️ **Dashboard UI** | New πŸ”­ Observability tab with enable toggle, OTLP endpoint, service name, inline Jaeger docker command, and ASCII waterfall diagram. |
1566
+
1567
+ ### βœ… v4.5 β€” VLM Multimodal Memory & GDPR Export (Shipped!)
1568
+
1569
+ | Feature | Description |
1570
+ |---|---|
1571
+ | πŸ‘οΈ **Auto-Captioning** | `session_save_image` β†’ VLM β†’ ledger entry β†’ vector embedding. Images become semantically searchable with zero schema changes. |
1572
+ | πŸ“¦ **GDPR Art. 20** | `session_export_memory` β€” full ZIP export (JSON + Markdown), API keys redacted, embeddings stripped. |
1573
+ | πŸ§ͺ **270 tests** | Full regression coverage including concurrent safety, redaction edge cases, and MCP contract validation. |
1574
+
1575
+ ### βœ… v4.4 β€” Pluggable LLM Adapters (Shipped!)
1576
+
1577
+ | Feature | Description |
1578
+ |---|---|
1579
+ | πŸ”Œ **BYOM** | OpenAI, Anthropic, Gemini, Ollama adapters. Text + embedding providers independently configurable. |
1580
+ | πŸ›‘οΈ **Air-Gapped** | Full local mode via Ollama β€” zero cloud API keys required. |
1581
+
1582
+ ### βœ… v4.3 β€” The Bridge: Knowledge Sync Rules (Shipped!)
1393
1583
 
1394
- ### βœ… v4.2 β€” Project Repo Registry + Knowledge Sync Rules (Shipped!)
1584
+ See [What's in v4.3.0](#whats-new-in-v430--the-bridge-) above β€” syncing dynamic behavioral insights to static IDE rules files.
1585
+
1586
+ ### βœ… v4.2 β€” Project Repo Registry (Shipped!)
1395
1587
 
1396
1588
  | Feature | Description |
1397
1589
  |---|---|
1398
1590
  | πŸ—‚οΈ **Project Repo Paths** | Dashboard UI to map projects to repo directories + `session_save_ledger` path validation. |
1399
1591
  | πŸ”„ **Universal Auto-Load** | Dynamic tool descriptions replace env var β€” dashboard is sole source of truth. |
1400
- | 🏠 **Dashboard-First Config** | Removed `PRISM_AUTOLOAD_PROJECTS` env var override. |
1401
- | πŸŒ‰ **Knowledge Sync Rules** | `knowledge_sync_rules` β€” auto-sync graduated insights to `.cursorrules` / `.clauderules` with idempotent sentinel markers. |
1402
1592
 
1403
1593
  ### βœ… v4.1 β€” Auto-Migration & Multi-Instance (Shipped!)
1404
1594
 
@@ -1408,34 +1598,22 @@ See [What's in v4.1.0](#whats-in-v410--auto-migration--multi-instance-) above.
1408
1598
 
1409
1599
  See [What's in v4.0.0](#whats-in-v400--behavioral-memory-) above.
1410
1600
 
1411
- ### βœ… v3.1 β€” Memory Lifecycle (Shipped!)
1412
-
1413
- See [What's in v3.1.0](#whats-in-v310--memory-lifecycle-) above.
1601
+ ### βœ… v3.x β€” Memory Lifecycle & Agent Hivemind (Shipped!)
1414
1602
 
1415
- ### βœ… v3.0 β€” Agent Hivemind (Shipped!)
1603
+ See [v3.1.0](#whats-in-v310--memory-lifecycle-) and [v3.0.0](#whats-in-v300--agent-hivemind-) above.
1416
1604
 
1417
- See [What's in v3.0.0](#whats-in-v300--agent-hivemind-) above.
1418
-
1419
- ### πŸš€ Future Ideas
1420
-
1421
- | Feature | Issue | Description |
1422
- |---------|-------|-------------|
1423
- | OpenTelemetry | [#6](https://github.com/dcostenco/prism-mcp/issues/6) | W3C tracing with Jaeger/Zipkin export |
1424
- | GDPR Portability | [#7](https://github.com/dcostenco/prism-mcp/issues/7) | `session_export_memory` for Art. 20 |
1425
- | CRDT Conflict Resolution | [#9](https://github.com/dcostenco/prism-mcp/issues/9) | Conflict-free types for concurrent edits |
1426
- | Pluggable LLM Providers | [#13](https://github.com/dcostenco/prism-mcp/issues/13) | Anthropic, OpenAI, Ollama adapters |
1427
- | VLM / OCR for Images | [#14](https://github.com/dcostenco/prism-mcp/issues/14) | Auto-extract text from stored images |
1428
- | Knowledge Graph Editor | [#19](https://github.com/dcostenco/prism-mcp/issues/19) | Visual graph editor in Mind Palace |
1605
+ ---
1429
1606
 
1430
- ### 🧰 Infrastructure & Stack
1607
+ ### πŸ—ΊοΈ Next on the Horizon
1431
1608
 
1432
- | Feature | Issue | Description |
1433
- |---------|-------|-------------|
1434
- | Supabase RPC Soft-Delete Filtering | [#8](https://github.com/dcostenco/prism-mcp/issues/8) | Server-side RPC filtering for GDPR-deleted records |
1435
- | Pluggable Embedding Providers | [#11](https://github.com/dcostenco/prism-mcp/issues/11) | Swap Gemini for OpenAI, Cohere, or local models |
1436
- | Automated Test Suite | [#12](https://github.com/dcostenco/prism-mcp/issues/12) | Unit, integration, and E2E test coverage with CI/CD |
1437
- | Mind Palace Auth & Secure Access | [#15](https://github.com/dcostenco/prism-mcp/issues/15) | Authentication for the dashboard when exposed remotely |
1438
- | TypeScript LangGraph & Vercel AI SDK Examples | [#18](https://github.com/dcostenco/prism-mcp/issues/18) | Reference implementations for popular frameworks |
1609
+ | Priority | Feature | Description |
1610
+ |----------|---------|-------------|
1611
+ | πŸ₯‡ | **Documentation & Architecture Guide** | Full README overhaul with architecture diagrams, "How to build a self-improving agent" walkthrough, and v4.x feature matrix. |
1612
+ | πŸ₯ˆ | **Knowledge Graph Editor** | Visual graph in Mind Palace showing nodes for projects, agents, sessions, and graduated rules. |
1613
+ | πŸ₯‰ | **Autonomous Web Scholar** | Agent-driven learning pipeline using Brave Search + VLM to autonomously build project context while the developer sleeps. |
1614
+ | β€” | **Dashboard Auth** | Optional basic auth for remote Mind Palace access. |
1615
+ | β€” | **TypeScript LangGraph Examples** | Reference implementations alongside the existing Python agent. |
1616
+ | β€” | **CRDT Conflict Resolution** | Conflict-free types for concurrent multi-agent edits on the same handoff. |
1439
1617
 
1440
1618
  ---
1441
1619
 
@@ -1445,4 +1623,4 @@ MIT
1445
1623
 
1446
1624
  ---
1447
1625
 
1448
- <sub>**Keywords:** MCP server, Model Context Protocol, Claude Desktop memory, persistent session memory, AI agent memory, local-first, SQLite MCP, Mind Palace, time travel, visual memory, agent telepathy, multi-agent sync, reality drift detection, morning briefing, code mode templates, cursor MCP server, windsurf MCP server, cline MCP server, pgvector semantic search, progressive context loading, MCP Prompts, MCP Resources, knowledge management AI, Brave Search MCP, Gemini analysis, optimistic concurrency control, zero config, GDPR compliant, memory tracing, LangChain retriever, LangGraph agent, soft delete, memory lineage, explainability, enterprise AI memory</sub>
1626
+ <sub>**Keywords:** MCP server, Model Context Protocol, Claude Desktop memory, persistent session memory, AI agent memory, local-first, SQLite MCP, Mind Palace, time travel, visual memory, VLM image captioning, OpenTelemetry OTel tracing, Jaeger distributed traces, GDPR export portability, agent telepathy, multi-agent sync, behavioral memory, IDE rules sync, cursorrules, pluggable LLM, Ollama MCP, Anthropic Claude MCP, OpenAI MCP, reality drift detection, morning briefing, code mode templates, cursor MCP server, windsurf MCP server, cline MCP server, pgvector semantic search, progressive context loading, MCP Prompts, MCP Resources, knowledge management AI, Brave Search MCP, Gemini analysis, optimistic concurrency control, zero config, memory tracing, LangChain retriever, LangGraph agent, soft delete, memory lineage, explainability, enterprise AI memory</sub>