zames_pro 2.82.100 → 2.82.102

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.82.102] - 2026-10-24
11
+
12
+ ### Fixed
13
+
14
+ - **attachments:** recognize non-Latin and punctuated file names
15
+
16
+ ## [2.82.101] - 2026-10-24
17
+
18
+ ### Fixed
19
+
20
+ - **commands:** a non-string respond message is not shown as the answer
21
+
10
22
  ## [2.82.100] - 2026-10-24
11
23
 
12
24
  ### Fixed
@@ -233,7 +233,25 @@ export function looksLikeFileName(name) {
233
233
  return false;
234
234
  if (/[\r\n]/.test(n))
235
235
  return false;
236
- return /^[\w.\- ]+\.[A-Za-z0-9]{1,8}$/.test(n);
236
+ // `\w` without the `u` flag is ASCII-ONLY: a non-Latin name (`отчёт.pdf`,
237
+ // `文件.txt`, `café.png`) was rejected, so a pasted file stayed plain text
238
+ // instead of becoming an attachment. Split it instead: the LAST dot must be
239
+ // followed by a short alnum extension and the stem must be non-empty and
240
+ // free of path separators/control chars — punctuation legal in downloads
241
+ // (`report (1).pdf`, `file+1.png`, `a&b.txt`) is allowed, prose without an
242
+ // extension is not.
243
+ const dot = n.lastIndexOf('.');
244
+ if (dot <= 0 || dot >= n.length - 1)
245
+ return false;
246
+ const ext = n.slice(dot + 1);
247
+ if (!/^[A-Za-z0-9]{1,8}$/.test(ext))
248
+ return false;
249
+ const stem = n.slice(0, dot);
250
+ if (!stem.trim())
251
+ return false;
252
+ if (/[\\/]/.test(n) || /[\u0000-\u001f\u007f]/.test(n))
253
+ return false;
254
+ return true;
237
255
  }
238
256
  export async function saveToTemp(tmpDir, name, data) {
239
257
  await fs.mkdir(tmpDir, { recursive: true });
package/dist/commands.js CHANGED
@@ -439,9 +439,14 @@ export function parseAssistantToolCall(text) {
439
439
  const greedy = t.match(/"message"\s*:\s*"([\s\S]*)"\s*\}*\s*$/);
440
440
  let raw = greedy ? greedy[1] : '';
441
441
  if (!greedy) {
442
- const idx = t.indexOf('"message"');
443
- if (idx >= 0)
444
- raw = t.slice(idx + 9).replace(/^\s*:\s*"/, '');
442
+ // The value is not a quoted string (a number, a boolean, an array, a
443
+ // nested object): there is no operator-facing MESSAGE here. The old
444
+ // fallback sliced the raw text from the key and the restored turn printed
445
+ // `:42}}` / `:[1,2]}}` as if it were the model's answer.
446
+ const value = t.slice(t.indexOf('"message"') + 9).replace(/^\s*:\s*/, '');
447
+ if (!value.startsWith('"'))
448
+ return { tool, message: '' };
449
+ raw = value.replace(/^"/, '');
445
450
  }
446
451
  return { tool, message: unescapeJsonString(raw) };
447
452
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zames_pro",
3
- "version": "2.82.100",
3
+ "version": "2.82.102",
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": {