prism-mcp-server 13.0.1 → 13.1.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
@@ -19,33 +19,46 @@
19
19
 
20
20
  ### Downloads
21
21
 
22
- | Platform | Package | Size |
23
- |----------|---------|------|
24
- | **Windows** | [Prism Coder-1.0.0-Setup.exe](https://github.com/dcostenco/prism-coder/releases/download/v1.0.0/Prism.Coder-1.0.0-Setup.exe) | 99 MB |
25
- | **macOS (Apple Silicon)** | [Prism Coder-1.0.0-arm64.dmg](https://github.com/dcostenco/prism-coder/releases/download/v1.0.0/Prism.Coder-1.0.0-arm64.dmg) | 113 MB |
26
- | **Linux** | [Prism Coder-1.0.0.AppImage](https://github.com/dcostenco/prism-coder/releases/download/v1.0.0/Prism.Coder-1.0.0.AppImage) | 119 MB |
27
- | **npm (MCP Server)** | `npx -y prism-mcp-server` | |
28
-
29
- | What You Get | Time Saved vs. Traditional |
22
+ Latest IDE release: **v2.1.1** ([release notes](https://github.com/dcostenco/prism-coder/releases/tag/v2.1.1-ide)) — Merge conflict editor (Accept Current/Incoming/Both + auto-stage), enhanced Builder/Deploy/Workflow panels, all v2.1.0 features intact.
23
+
24
+ | Platform | Package | Version | Size |
25
+ |----------|---------|:-------:|:----:|
26
+ | **macOS (Apple Silicon)** | [Prism Coder-2.1.1-arm64.dmg](https://github.com/dcostenco/prism-coder/releases/download/v2.1.1-ide/Prism.Coder-2.1.1-arm64.dmg) | **v2.1.1** | 115 MB |
27
+ | **macOS (Apple Silicon, zip)** | [Prism Coder-2.1.1-arm64.zip](https://github.com/dcostenco/prism-coder/releases/download/v2.1.1-ide/Prism.Coder-2.1.1-arm64.zip) | **v2.1.1** | 110 MB |
28
+ | **Windows (signed)** | [Prism Coder-2.1.1-Setup.exe](https://github.com/dcostenco/prism-coder/releases/download/v2.1.1-ide/Prism.Coder-2.1.1-Setup.exe) | **v2.1.1** | 103 MB |
29
+ | **Linux (arm64)** | [Prism Coder-2.1.1.AppImage](https://github.com/dcostenco/prism-coder/releases/download/v2.1.1-ide/Prism.Coder-2.1.1.AppImage) | **v2.1.1** | 121 MB |
30
+ | **npm (MCP Server)** | `npx -y prism-mcp-server` | latest | — |
31
+
32
+ > **macOS:** Signed with Developer ID. First launch: right-click → **Open** if Gatekeeper warns.
33
+ >
34
+ > **Windows:** Authenticode-signed (DigiCert-timestamped). SmartScreen may warn — click **More info → Run anyway**.
35
+
36
+ | What You Get | Status |
30
37
  |---|:---:|
31
- | 🤖 **Agent Mode** — autonomous multi-step task execution with diff previews | ~95% |
32
- | 🏗️ **Website Builder** — 6 templates, section editor, export to HTML/ZIP | ~90% |
33
- | 🎨 **Visual Drag & Drop** — 11 component types, canvas drop zone, live property editor | ~85% |
34
- | 🔑 **Auth & Database** — 6 auth providers, table CRUD, RLS, storage buckets | ~90% |
35
- | 🐳 **DevContainers** — 8 base images, port forwarding, resource limits, Codespaces export | ~80% |
36
- | 📋 **Customer Board (HIPAA)** — 12-pattern PHI scanner, moderator controls, ticket lifecycle | ~70% |
37
- | 🎨 **Media Studio** — AI image/video/3D generation, tier-gated quality | ~98% |
38
- | 🚀 **One-Click Deploy** — Vercel, Netlify, Synalux Cloud, custom server | ~98% |
39
- | 👥 **Real-Time Collaboration** — multiplayer editing with cursor presence | ~60% |
40
- | 📊 **SEO + Analytics** — 8-category audit + traffic dashboard | ~99% |
41
- | 🏪 **Marketplace** — 10-category extension registry, install with one click | ~90% |
42
- | 📋 **Workflow Engine** — natural language structured project workflows | ~90% |
43
- | 🔀 **Git Integration** — branch, stage, commit, push without leaving IDE | ~60% |
44
- | 🌐 **12-Language i18n** — full UI translation including Arabic RTL | ~100% |
45
-
46
- **27/27 features** — more than any competitor (Cursor: 9, Windsurf: 9, Replit: 12, Bolt: 9).
47
-
48
- 👉 **[Full IDE README with screenshots, architecture, and technical details →](https://github.com/dcostenco/prism-coder/releases/tag/v1.0.0)**
38
+ | 💻 **Real Terminal** — xterm.js + node-pty, multi-tab, resize | v2.1 |
39
+ | **Inline AI Completions** — ghost-text via local Ollama FIM, Tab to accept | v2.1 |
40
+ | 🤖 **Agent Mode** — autonomous multi-step task execution with diff previews | |
41
+ | 🎨 **Media Studio** — AI image/video/3D generation with prompt + tier-gated quality | v2.1 |
42
+ | 🏗️ **Website Builder** — 6 templates, section editor, export to HTML | |
43
+ | 🎨 **Visual Drag & Drop** — 11 component types, canvas drop zone, property editor | |
44
+ | 📋 **Customer Board (HIPAA)** — 12-pattern PHI scanner, moderator controls, ticket lifecycle | |
45
+ | 🔀 **Git Integration** — status, stage, commit, push, pull, branches, Monaco diff viewer | |
46
+ | 🐙 **GitHub** — PRs, issues, actions via `gh` CLI | |
47
+ | 📋 **Tasks Runner** — VS Code tasks.json parser, JSONC, streaming output | |
48
+ | 🐛 **Debugger** — Node.js CDP, breakpoints, stepping, expression eval | |
49
+ | 🔑 **Auth & Database** — 6 auth provider toggles, DB connect form, CLI guides | |
50
+ | 🐳 **DevContainers** — 8 base images, docker run + .devcontainer.json export | |
51
+ | 🏪 **Skill Browser** — scans ~/.agent/skills/, search, rescan | v2.1 |
52
+ | 🚀 **Deploy** — env var management + CLI recipes (Vercel/Netlify/Custom) | ✅ |
53
+ | 📋 **Workflow Engine** — 8-step default dev workflow, status tracking, persistence | |
54
+ | 🌐 **12-Language i18n** — full UI translation including Arabic RTL | ✅ |
55
+ | 📊 **SEO Audit** URL input + Lighthouse trigger, analytics provider guide | ✅ v2.1 |
56
+ | 🔒 **SSH Remote** — host registry, command execution, streaming output | ✅ |
57
+ | 🎯 **Design-to-Code** — screenshot → Builder sections via vision model | ✅ |
58
+ | 📜 **Version History** — git-backed snapshots per builder project | ✅ |
59
+ | 👥 **Collaboration** — v2.2 (CRDT editing, presence, team chat) | 🟡 roadmap |
60
+
61
+ 👉 **[Full v2.1.1 release notes →](https://github.com/dcostenco/prism-coder/releases/tag/v2.1.1-ide)**
49
62
 
50
63
  ---
51
64
 
@@ -53,6 +66,8 @@
53
66
 
54
67
  **Your AI agent forgets everything between sessions. Prism fixes that — then teaches it to think.**
55
68
 
69
+ > **🆕 May 2026 — `prism-coder:7b` v18aac released.** New on-device LLM backing the agent: AAC realigned eval **47/48 (98%)**, emergency_qa **13/13 perfect**, text_correct **15/15 perfect**, translate **8/8 perfect**, plus first-class gesture-recognition support for accessibility (smile/brow/jaw/blink/head-tilt). Built on Qwen2.5-Coder-7B-Instruct with full SFT on commercial-safe data (Apache 2.0 / CC-BY-4.0). Hybrid `prism-coder:7b-coder` (BFCL-optimized variant) coming soon for a top-rank function-calling track. See `prism/training/HYBRID_RESEARCH.md` for the dual-model deployment plan.
70
+
56
71
  <details>
57
72
  <summary>Cognitive Architecture Deep Dive (v12.5)</summary>
58
73
 
@@ -120,7 +135,7 @@ Prism v12.5 unifies Prism and Synalux into a **single billing architecture** wit
120
135
  - **10 Vendor Skills** — Vercel, Supabase, Stripe, Sentry, OpenAI, Addy Osmani, Garry Tan/gstack
121
136
  - **30+ Community Skills** — Installed and optimized from the Gemini ecosystem
122
137
 
123
- > 📦 **Packages:** [`prism-mcp-server`](https://www.npmjs.com/package/prism-mcp-server) (npm) · [Prism Coder IDE](https://github.com/dcostenco/prism-coder/releases/tag/v1.0.0) (VS Code) · `prism` CLI
138
+ > 📦 **Packages:** [`prism-mcp-server`](https://www.npmjs.com/package/prism-mcp-server) (npm) · [Prism Coder IDE](https://github.com/dcostenco/prism-coder/releases/tag/v2.1.1-ide) (VS Code) · `prism` CLI
124
139
 
125
140
  ---
126
141
 
@@ -195,7 +210,7 @@ Prism features a cutting-edge **Zero-Search Retrieval** system for its cognitive
195
210
  | **BFCL Submission** | [PR #1332](https://github.com/ShishirPatil/gorilla/pull/1332) |
196
211
  | **Changelog** | [synalux-docs/CHANGELOG.md](https://github.com/dcostenco/synalux-docs/blob/main/CHANGELOG.md) |
197
212
  | **Roadmap** | [synalux-docs/ROADMAP.md](https://github.com/dcostenco/synalux-docs/blob/main/ROADMAP.md) |
198
- | **PrismAAC** | [github.com/dcostenco/prism-aac](https://github.com/dcostenco/prism-aac) — AAC web app for children with motor impairments |
213
+ | **PrismAAC** | [github.com/dcostenco/prism-aac](https://github.com/dcostenco/prism-aac) — AAC web app for children with motor impairments. Powered by `prism-coder:7b` for offline text correction, AI Chat, translation, caregiver-note parsing, and emergency phone-call AI (13/13 on live Twilio test). Ships **all-neural offline TTS across 14 locales** via Kokoro-82M (Apache-2.0, 6 langs) + Piper (MIT, 5 langs) + Azure Neural fallback (Cantonese + emotional styles). Optional local servers `mlx-vlm` and `mlx-whisper` add scene understanding and HQ STT for Mac users. |
199
214
 
200
215
  ---
201
216
 
@@ -735,14 +750,17 @@ Prism scores coding tasks across **6 weighted heuristic signals** (keyword analy
735
750
  To achieve zero-latency, offline routing and memory compilation without cloud dependencies, Prism utilizes an internal fine-tuned ML model: **`prism-coder:7b`**.
736
751
  Built atop Qwen 2.5 Coder 7B using the MLX framework for Apple Silicon, this engine underwent aggressive Supervised Fine-Tuning (SFT) over 3,300+ session traces, then aligned using **GRPO (Group Relative Policy Optimization)** with a decomposed 4-component reward function.
737
752
 
738
- **Benchmark Results ([`training/benchmark.py`](https://github.com/dcostenco/prism-mcp/blob/main/training/benchmark.py), N=15 held-out):**
739
- - **Tool-Call Accuracy:** 100.0% — correct tool on unseen prompts (15/15)
740
- - **Tool Selection:** 100.0% (7/7) perfect on all tool-call prompts
741
- - **Retrieval Accuracy:** 100.0% (3/3) perfect on search/list/knowledge tasks
742
- - **JSON Validity:** 100.0% every output parses as valid JSON
743
- - **Parameter Accuracy:** 73.3% required params present when tool is correct
744
- - **Generation Speed:** 29.9 Tokens/sec (Apple M4 Max, 36GB)
745
- - **Avg Latency:** 2.2s per prompt
753
+ **Benchmark Results v12 production model:**
754
+ - **BFCL Tool-Call Accuracy:** 100% (64/64)
755
+ - **AAC realigned eval (production paths from prism-aac):** 89.6% overall — text-correct 80%, emergency Q&A **100% (13/13)**, translation 87.5%, caregiver-note parsing 85.7%, ask-AI 100%
756
+ - **Live emergency phone call (Twilio):** 13/13 questions answered correctly with proactive safety guidance
757
+ - **Generation Speed:** 130 ms / call on Apple M5 Max
758
+ - **Quantization:** Q4_K_M GGUF, 4 GB on disk
759
+ - **Distribution:** [`dcostenco/prism-coder-7b`](https://huggingface.co/dcostenco/prism-coder-7b) on HuggingFace; `ollama pull prism-coder:7b`
760
+
761
+ **v18aac (current):** full SFT on commercial-safe data (Apache 2.0 / CC-BY-4.0). AAC eval 47/48 (98%), emergency_qa 13/13 perfect, text_correct 15/15, translate 8/8. First-class gesture-recognition support. DoRA rank=256 on Qwen2.5-Coder-7B-Instruct base.
762
+
763
+ **Sister local servers (M-series Apple Silicon, optional):** when running on a Mac, prism-aac users can additionally stand up `mlx-vlm` (Qwen2.5-VL-7B for camera/scene understanding, port 8001) and `mlx-whisper` (large-v3-turbo for high-accuracy STT, port 8002) for fully-offline multimodal AI.
746
764
 
747
765
  **Integration**: Run via Ollama natively to power autonomous file operations and session routing entirely within the local host environment.
748
766
 
@@ -1043,8 +1061,9 @@ The Generator strips the `console.log`, resubmits, and the next `EVALUATE` retur
1043
1061
 
1044
1062
  ## <a name="whats-new"></a>🆕 What's New
1045
1063
 
1046
- > **Current release: v12.5Unified Billing & Agent Skill Ecosystem**
1064
+ > **Current release: v12.6Prism Coder 14B sibling + tier-aware local routing**
1047
1065
 
1066
+ - 🤖 **v12.6 — Prism Coder 14B sibling + tier-aware local routing:** `prism-coder:7b` re-trained from clean Qwen2.5-Coder-7B base. **BFCL 88.1%** (3-run StdDev 0%, +40.9pp over previous prod), AAC realigned **47/48 (97.9%)**, caregiver targeted **20/20**, emergency_qa **13/13**, text_correct **15/15**, translate **8/8**. New **`prism-coder:14b`** sibling tag (BFCL 85.9%, AAC 46/48, 32K context) auto-routed for paid-tier medium-length queries via Synalux portal — keeps inference local, $0 marginal cost vs Claude/Gemini. Rollback: `ollama cp prism-coder:7b-prev-20260504-1325 prism-coder:7b`. Coordinated with synalux-private v0.14.4. → [Changelog](CHANGELOG.md)
1048
1067
  - 💳 **v12.5 — Unified Billing & Agent Skill Ecosystem:** Aligned Prism and Synalux tiers (Standard $19, Advanced $49, Enterprise $99), 14-day free trial, 54 agent skills, BSL-1.1 license. → [Changelog](CHANGELOG.md#1200)
1049
1068
  - 🏗️ **v11.6.0 — Agent Infrastructure Resilience:** Production-grade concurrent agent execution with serialized queue (Python `fcntl`), memory guardian daemon, queue watchdog, and unified status dashboard. 115/115 tests verified across 5 suites. → [Changelog](CHANGELOG.md#1160)
1050
1069
  - 🧠 **v11.5.1 — Structural GRPO Alignment:** GRPO-aligned local engine with held-out benchmark suite (N=15). **100% tool-call accuracy**, 100% JSON validity, 100% retrieval accuracy, 100% reasoning abstention. → [Changelog](CHANGELOG.md#1150)
@@ -1778,10 +1797,11 @@ Prism MCP is open-source and free for individual developers. For teams and enter
1778
1797
 
1779
1798
  ## <a name="milestones-roadmap"></a>📦 Milestones & Roadmap
1780
1799
 
1781
- > **Current: v12.5** — Unified Billing & Agent Skill Ecosystem ([CHANGELOG](CHANGELOG.md))
1800
+ > **Current: v13.0** — The Adaptive Release ([CHANGELOG](CHANGELOG.md#1300))
1782
1801
 
1783
1802
  | Release | Headline |
1784
1803
  |---------|----------|
1804
+ | **v13.0** | 🧬 **The Adaptive Release** — BCBA behavioral brain (universal skill), project-aware skill auto-loading (23 skills), adaptive context injection, 83 security findings fixed, encrypted sync IV fix, timing-safe checksums. [Details →](CHANGELOG.md#1300) |
1785
1805
  | **v12.5** | 💳 **Unified Billing & Agent Skill Ecosystem** — Synalux-priced tiers ($19/$49/$99), 14-day trial, 54 skills, BSL-1.1 license. |
1786
1806
  | **v11.6.0** | 🏗️ **Agent Infrastructure Resilience** — Production-grade serialized queue, memory guardian, queue watchdog, status dashboard. 115/115 tests. |
1787
1807
  | **v11.5.1** | 🧠 **Structural GRPO Alignment** — Perfect 100% accuracy cross-validated on Synalux Elite platform. |
@@ -1797,8 +1817,7 @@ Prism MCP is open-source and free for individual developers. For teams and enter
1797
1817
  | **v7.0** | 🧬 ACT-R Activation Memory |
1798
1818
 
1799
1819
  ### Future Tracks
1800
- - **v12.0: Distal Memory** — Semantic clustering of long-term history with Active-Prism background maintenance.
1801
- - **v13.0: Team Handoff** — Encrypted peer-to-peer session syncing with multi-agent task routing and verifiable memory.
1820
+ - **v14.0: Prism-Coder v2** — Retrained model with adaptive behavioral alignment (training in progress).
1802
1821
 
1803
1822
  👉 **[Full ROADMAP.md →](ROADMAP.md)**
1804
1823
 
@@ -22,6 +22,7 @@
22
22
  * if (summary) { use(summary); } else { fallback to Gemini }
23
23
  */
24
24
  import { debugLog } from "./logger.js";
25
+ import { normalizeToolCallFormat } from "./normalizeToolCallFormat.js";
25
26
  import { PRISM_LOCAL_LLM_ENABLED, PRISM_LOCAL_LLM_MODEL, PRISM_LOCAL_LLM_URL, PRISM_LOCAL_LLM_TIMEOUT_MS, } from "../config.js";
26
27
  // ─── Helpers ──────────────────────────────────────────────────────────────────
27
28
  /** Redact credentials from a URL for safe logging (strips user:pass@). */
@@ -149,7 +150,9 @@ export async function callLocalLlm(userPrompt, model = PRISM_LOCAL_LLM_MODEL, sy
149
150
  // 2. <|im_start|>...<|im_end|> (Qwen native ChatML)
150
151
  // 3. <think>...<tool_call> (standard format)
151
152
  // We normalize all to return just the clean content/JSON.
152
- let content = rawContent;
153
+ // v18-clean coerces stochastic plural-wrapper / XML-attr / CJK-bracket
154
+ // emissions into canonical <tool_call>{json}</tool_call> first.
155
+ let content = normalizeToolCallFormat(rawContent);
153
156
  // Strip thinking blocks (all known formats)
154
157
  const thinkPatterns = [
155
158
  /<\|synalux_think\|>[\s\S]*?<\/\|synalux_think\|>\s*/,
@@ -0,0 +1,70 @@
1
+ /**
2
+ * normalizeToolCallFormat — coerce stochastic Qwen2.5-Coder tool-call
3
+ * formats into the canonical singular-wrapper JSON form.
4
+ *
5
+ * v18-clean SFT models occasionally emit non-canonical formats despite
6
+ * training data being clean canonical. Three known variants in the wild:
7
+ *
8
+ * 1. plural wrapper + XML-attr params:
9
+ * <tool_calls><tool_call name="X"><param name="Y" value="Z"/></tool_call></tool_calls>
10
+ * 2. CJK angle brackets:
11
+ * 〈tool_calls〉〈tool_call function_name="X"〉〈param name="Y" value="Z" /〉〈/tool_call〉〈/tool_calls〉
12
+ * 3. <functioncall> with stringified arguments:
13
+ * <functioncall> {"name":"X","arguments":'{"Y":"Z"}'}
14
+ *
15
+ * Each is rewritten to:
16
+ * <tool_call>
17
+ * {"name":"X","arguments":{"Y":"Z"}}
18
+ * </tool_call>
19
+ *
20
+ * Canonical inputs pass through unchanged.
21
+ */
22
+ const PARAM_ATTR_RE = /<param\s+name="([^"]+)"\s+value="([^"]*)"\s*\/?>/gi;
23
+ const XML_ATTR_TOOL_CALL_RE = /<tool_call\s+(?:name|function_name)="([^"]+)"[^>]*>([\s\S]*?)<\/tool_call>/gi;
24
+ const PLURAL_WRAPPER_RE = /<tool_calls>\s*([\s\S]*?)\s*<\/tool_calls>/gi;
25
+ const FUNCTION_CALL_RE = /<functioncall>\s*(\{[\s\S]*?\})(?=\s*$|\s*<|\s*\n\s*\n)/gi;
26
+ function rewriteXmlAttrToolCalls(input) {
27
+ return input.replace(XML_ATTR_TOOL_CALL_RE, (_match, name, body) => {
28
+ const args = {};
29
+ PARAM_ATTR_RE.lastIndex = 0;
30
+ let pm;
31
+ while ((pm = PARAM_ATTR_RE.exec(body)) !== null) {
32
+ args[pm[1]] = pm[2];
33
+ }
34
+ return `<tool_call>\n${JSON.stringify({ name, arguments: args })}\n</tool_call>`;
35
+ });
36
+ }
37
+ export function normalizeToolCallFormat(text) {
38
+ if (!text)
39
+ return text;
40
+ let s = text;
41
+ // Step 1: replace CJK angle brackets so subsequent regex matches
42
+ if (s.includes("〈") || s.includes("〉")) {
43
+ s = s.replace(/〈/g, "<").replace(/〉/g, ">");
44
+ }
45
+ // Step 2: unwrap plural <tool_calls>...</tool_calls> and rewrite each inner call
46
+ s = s.replace(PLURAL_WRAPPER_RE, (_m, inner) => rewriteXmlAttrToolCalls(inner));
47
+ // Step 3: rewrite any remaining bare XML-attr <tool_call> outside plural wrapper
48
+ s = rewriteXmlAttrToolCalls(s);
49
+ // Step 4: rewrite <functioncall> {...} forms with stringified arguments
50
+ s = s.replace(FUNCTION_CALL_RE, (match, jsonish) => {
51
+ try {
52
+ // Strip single-quote wrapping that occasionally surrounds nested JSON args
53
+ const cleaned = jsonish
54
+ .replace(/"arguments":\s*'(\{[\s\S]*?\})'/g, '"arguments": $1')
55
+ .replace(/"arguments":\s*'([^']*)'/g, '"arguments": "$1"');
56
+ const obj = JSON.parse(cleaned);
57
+ if (obj && typeof obj.name === "string") {
58
+ const args = typeof obj.arguments === "string"
59
+ ? JSON.parse(obj.arguments)
60
+ : (obj.arguments ?? {});
61
+ return `<tool_call>\n${JSON.stringify({ name: obj.name, arguments: args })}\n</tool_call>`;
62
+ }
63
+ }
64
+ catch {
65
+ /* fall through — leave original */
66
+ }
67
+ return match;
68
+ });
69
+ return s;
70
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "prism-mcp-server",
3
- "version": "13.0.1",
3
+ "version": "13.1.1",
4
4
  "mcpName": "io.github.dcostenco/prism-coder",
5
5
  "description": "Prism-Coder v12.5: The world's first O(1) Cognitive Memory Architecture for AI Agents. 100% Tool-Call Accuracy (BFCL Gold Certified), 54 Agent Skills, Zero-Search Retrieval (HDC/HRR), HIPAA-hardened local-first storage, and SLERP-optimized GRPO alignment.",
6
6
  "module": "index.ts",