@ducci/jarvis 1.0.98 → 1.0.99

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ducci/jarvis",
3
- "version": "1.0.98",
3
+ "version": "1.0.99",
4
4
  "description": "A fully automated agent system that lives on a server.",
5
5
  "main": "./src/index.js",
6
6
  "type": "module",
@@ -22,7 +22,8 @@ function stripCodeFence(text) {
22
22
  // JSON string values — models sometimes forget to escape \n as \\n
23
23
  // 3. Remove trailing commas before } and ] (JS-valid but JSON-invalid)
24
24
  function sanitizeJson(text) {
25
- let s = stripCodeFence(text);
25
+ // Strip <think>...</think> blocks (e.g. MiniMax reasoning traces) before JSON parsing
26
+ let s = stripCodeFence(text).replace(/<think>[\s\S]*?<\/think>/g, '').trim();
26
27
 
27
28
  // State machine: walk the string and fix unescaped control chars inside strings
28
29
  let result = '';