openzoo 0.47.0 → 0.48.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/lib/grokui.mjs +22 -0
- package/package.json +1 -1
package/lib/grokui.mjs
CHANGED
|
@@ -354,6 +354,28 @@ function sanitizeRunCommand(command) {
|
|
|
354
354
|
// Also tolerates the directive being wrapped in a markdown code fence, which
|
|
355
355
|
// is the other shape models reach for unprompted.
|
|
356
356
|
function parseRun(reply) {
|
|
357
|
+
// NATIVE TOOL-CALL ENVELOPE FIRST. deepseek-v4-pro has real function calling,
|
|
358
|
+
// and when told to emit "RUN: <cmd>" it frequently wraps the call in its own
|
|
359
|
+
// DSML markup instead:
|
|
360
|
+
//
|
|
361
|
+
// <DSML | tool_calls><DSML | invoke name="RUN">
|
|
362
|
+
// <DSML | parameter name="command" string="true">cd ~/x && ls</DSML | parameter>
|
|
363
|
+
//
|
|
364
|
+
// Matching only a line starting `RUN:` misses that entirely, so the command
|
|
365
|
+
// never ran, the harness stayed silent, and the model went on to NARRATE work
|
|
366
|
+
// it had not done — MEASURED live: a bot reported "Done. Scheduling a
|
|
367
|
+
// recurring nudge every 2 minutes", a capability that does not exist, after
|
|
368
|
+
// several such calls were dropped. Same failure as the old /^RUN:/ anchor,
|
|
369
|
+
// different shape: a silently discarded directive reads to the model as a
|
|
370
|
+
// tool that does nothing, and it fabricates rather than reporting failure.
|
|
371
|
+
// The separator is NOT always an ASCII pipe. DeepSeek's real special tokens
|
|
372
|
+
// use U+FF5C FULLWIDTH VERTICAL LINE (|) — matching only `|` parsed the
|
|
373
|
+
// pretty-printed form in tests while missing what the model actually emits,
|
|
374
|
+
// which is exactly how this survived one round of "fixed".
|
|
375
|
+
const SEP = '[||\\s]*';
|
|
376
|
+
const dsml = new RegExp(`<${SEP}DSML[^>]*\\bparameter\\b[^>]*name="command"[^>]*>([\\s\\S]*?)<\\/${SEP}DSML`, 'i').exec(reply);
|
|
377
|
+
if (dsml) return sanitizeRunCommand(dsml[1]);
|
|
378
|
+
|
|
357
379
|
const m = /^[ \t>*-]*RUN:[ \t]*([\s\S]+)/m.exec(reply);
|
|
358
380
|
if (!m) return null;
|
|
359
381
|
let cmd = m[1];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "openzoo",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.48.1",
|
|
4
4
|
"description": "Local x402-paying proxy + MCP server for openzoo.fun — point any OpenAI-compatible harness (Cursor, Claude Code, aider, SDKs) at localhost and it pays per call from a local burner wallet. Solana and Base rails live; Robinhood experimental.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|