openzoo 0.47.0 → 0.48.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.
Files changed (2) hide show
  1. package/lib/grokui.mjs +17 -0
  2. package/package.json +1 -1
package/lib/grokui.mjs CHANGED
@@ -354,6 +354,23 @@ 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
+ const dsml = /<[|\s]*DSML[^>]*\bparameter\b[^>]*name="command"[^>]*>([\s\S]*?)<\/[|\s]*DSML/i.exec(reply);
372
+ if (dsml) return sanitizeRunCommand(dsml[1]);
373
+
357
374
  const m = /^[ \t>*-]*RUN:[ \t]*([\s\S]+)/m.exec(reply);
358
375
  if (!m) return null;
359
376
  let cmd = m[1];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "openzoo",
3
- "version": "0.47.0",
3
+ "version": "0.48.0",
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",