zames_pro 2.82.4 → 2.82.7

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,24 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [2.82.7] - 2026-10-22
11
+
12
+ ### Fixed
13
+
14
+ - **queue:** a truncated queued message keeps no lone surrogate
15
+
16
+ ## [2.82.6] - 2026-10-22
17
+
18
+ ### Fixed
19
+
20
+ - **config:** a numeric setting rejects a fractional value
21
+
22
+ ## [2.82.5] - 2026-10-22
23
+
24
+ ### Fixed
25
+
26
+ - **cost:** a non-finite duration renders as zero, not NaNs
27
+
10
28
  ## [2.82.4] - 2026-10-22
11
29
 
12
30
  ### Fixed
package/dist/commands.js CHANGED
@@ -158,7 +158,11 @@ export const EN_DURATION_UNITS = { h: 'h', m: 'm', s: 's' };
158
158
  // Human-readable duration: "8s", "5m 12s", "1h 01m 01s". Seconds are padded
159
159
  // only when a larger unit is present, so a lone "45s" is not "45s" padded.
160
160
  export function formatDuration(ms, units = EN_DURATION_UNITS) {
161
- const total = Math.max(0, Math.round(ms / 1000));
161
+ // A non-finite input (NaN/Infinity from a clock jump or a subtraction of an
162
+ // absent timestamp) must not leak into the text: `Math.round(NaN)` stayed
163
+ // NaN and /cost printed "длительность: NaNs". Render it as zero.
164
+ const safeMs = typeof ms === 'number' && Number.isFinite(ms) ? ms : 0;
165
+ const total = Math.max(0, Math.round(safeMs / 1000));
162
166
  const h = Math.floor(total / 3600);
163
167
  const m = Math.floor((total % 3600) / 60);
164
168
  const s = total % 60;
@@ -890,7 +894,16 @@ export function formatQueueList(msgs) {
890
894
  const one = String(m.text || '')
891
895
  .replace(/\s+/g, ' ')
892
896
  .trim();
893
- const shown = one.length > 80 ? one.slice(0, 80) + ' …' : one;
897
+ // The cut is in UTF-16 units: a surrogate PAIR (an emoji / astral CJK
898
+ // char) straddling the boundary would leave a lone HIGH surrogate at the
899
+ // end of the line — a broken code point in the /queue listing and in the
900
+ // transcript. Step back one unit so the pair is dropped WHOLE (the same
901
+ // rule as truncateToolResult / capReport).
902
+ let cut = 80;
903
+ const last = one.charCodeAt(cut - 1);
904
+ if (last >= 0xd800 && last <= 0xdbff)
905
+ cut--;
906
+ const shown = one.length > 80 ? one.slice(0, cut) + ' …' : one;
894
907
  const att = m.attachments?.length ? ' [+' + m.attachments.length + ']' : '';
895
908
  return ' ' + (i + 1) + '. ' + shown + att;
896
909
  });
package/dist/config.js CHANGED
@@ -644,6 +644,15 @@ function parseConfigValue(field, raw) {
644
644
  const n = Number(raw);
645
645
  if (!Number.isFinite(n))
646
646
  throw new Error('number');
647
+ // Every numeric setting is a COUNT or a MILLISECOND amount, and the code
648
+ // that consumes it compares/loops it as an integer (`attempt <
649
+ // this.askRetries`, `used >= maxSubagents`, a setTimeout delay). A
650
+ // fraction was accepted and then behaved unpredictably: a budget of
651
+ // 0.4 subagents printed "0.4" while refusing nothing on the first run,
652
+ // and 5.7 retries meant "5 attempts plus half an attempt". `5.0` is a
653
+ // legitimate way to type 5, so only a REAL fraction is rejected.
654
+ if (!Number.isInteger(n))
655
+ throw new Error('number');
647
656
  if (field.min !== undefined && n < field.min)
648
657
  throw new Error('number');
649
658
  if (field.max !== undefined && n > field.max)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zames_pro",
3
- "version": "2.82.4",
3
+ "version": "2.82.7",
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": {