zames_pro 2.81.21 → 2.81.23

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/CHANGELOG.md CHANGED
@@ -7,6 +7,18 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [2.81.23] - 2026-10-22
11
+
12
+ ### Fixed
13
+
14
+ - **resume:** a respond message carrying the safety block is hidden
15
+
16
+ ## [2.81.22] - 2026-10-22
17
+
18
+ ### Fixed
19
+
20
+ - **parser:** a tool call whose args are a JSON string is recognized
21
+
10
22
  ## [2.81.21] - 2026-10-22
11
23
 
12
24
  ### Fixed
@@ -221,15 +221,43 @@ function repairRawControlChars(str) {
221
221
  }
222
222
  return out;
223
223
  }
224
+ /** True when a value is a string holding the JSON of a plain object. */
225
+ function isJsonObjectString(v) {
226
+ if (typeof v !== 'string')
227
+ return false;
228
+ try {
229
+ const parsed = JSON.parse(v);
230
+ return !!parsed && typeof parsed === 'object' && !Array.isArray(parsed);
231
+ }
232
+ catch {
233
+ return false;
234
+ }
235
+ }
236
+ /** Unwrap a JSON-string `args` into an object; return the value as-is otherwise. */
237
+ function coerceArgsObject(v) {
238
+ if (typeof v === 'string') {
239
+ try {
240
+ const parsed = JSON.parse(v);
241
+ if (parsed && typeof parsed === 'object' && !Array.isArray(parsed)) {
242
+ return parsed;
243
+ }
244
+ }
245
+ catch { }
246
+ }
247
+ return v;
248
+ }
224
249
  function tryParse(str) {
225
250
  try {
226
251
  const obj = JSON.parse(str);
227
252
  if (obj &&
228
253
  typeof obj.tool === 'string' &&
229
254
  obj.args &&
230
- typeof obj.args === 'object' &&
255
+ // `args` may arrive as a JSON STRING (double-encoded): unwrap it when it
256
+ // parses to a plain object, otherwise the call is not recognized at all
257
+ // and the run either re-asks or ends with the JSON as the final answer.
258
+ (typeof obj.args === 'object' || isJsonObjectString(obj.args)) &&
231
259
  !Array.isArray(obj.args)) {
232
- return obj;
260
+ return { tool: obj.tool, args: coerceArgsObject(obj.args) };
233
261
  }
234
262
  return null;
235
263
  }
package/dist/commands.js CHANGED
@@ -487,6 +487,11 @@ export function normalizeRestoredMessage(m) {
487
487
  const msg = (call.message || '').trim();
488
488
  if (!msg)
489
489
  return null;
490
+ // The safety-classification block can sit INSIDE the respond message; the
491
+ // plain-text path already drops it, and printing the marker as the answer
492
+ // is the same leak.
493
+ if (/<\/?ds_safety\b/i.test(msg))
494
+ return null;
490
495
  return { role: 'assistant', text: msg };
491
496
  }
492
497
  // A plain-text answer (written without the respond wrapper) — show as-is.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zames_pro",
3
- "version": "2.81.21",
3
+ "version": "2.81.23",
4
4
  "description": "Terminal coding agent that drives a real browser to chat with DeepSeek, Qwen and other web LLMs — no API key required. Reads and edits files, runs commands, commits to git, like Claude Code / Codex CLI.",
5
5
  "type": "module",
6
6
  "bin": {