zames_pro 2.82.86 → 2.82.88

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.88] - 2026-10-24
11
+
12
+ ### Fixed
13
+
14
+ - **cost:** a non-finite elapsed no longer makes the duration Infinity
15
+
16
+ ## [2.82.87] - 2026-10-24
17
+
18
+ ### Fixed
19
+
20
+ - **export:** do not split a surrogate pair when clipping a tool result
21
+
10
22
  ## [2.82.86] - 2026-10-24
11
23
 
12
24
  ### Fixed
package/dist/commands.js CHANGED
@@ -130,7 +130,11 @@ export function summarizeTranscript(entries) {
130
130
  stats.toolTime[tool] = (stats.toolTime[tool] || 0) + ms;
131
131
  }
132
132
  }
133
- if (typeof e.elapsed === 'number' && e.elapsed > stats.durationMs) {
133
+ // A FINITE, non-negative elapsed only: `Infinity > 0` is true, so one
134
+ // entry with a broken timestamp made /cost report `duration: Infinity`.
135
+ if (typeof e.elapsed === 'number' &&
136
+ Number.isFinite(e.elapsed) &&
137
+ e.elapsed > stats.durationMs) {
134
138
  stats.durationMs = e.elapsed;
135
139
  }
136
140
  if (!stats.startedAt && typeof e.ts === 'string')
@@ -287,7 +291,7 @@ export function formatExport(entries, meta = {}) {
287
291
  out.push(' -> ' +
288
292
  String(e.tool ?? '?') +
289
293
  ': ' +
290
- String(e.result ?? '').slice(0, 500));
294
+ clipExportText(String(e.result ?? ''), 500));
291
295
  }
292
296
  else if (type === 'assistant_final') {
293
297
  out.push('## Answer');
@@ -1221,3 +1225,13 @@ export function buildSlashCommandHints(opts) {
1221
1225
  }
1222
1226
  return base;
1223
1227
  }
1228
+ /** Cut an exported string WITHOUT splitting a surrogate pair. */
1229
+ function clipExportText(s, max) {
1230
+ if (s.length <= max)
1231
+ return s;
1232
+ let cut = max;
1233
+ const last = s.charCodeAt(cut - 1);
1234
+ if (last >= 0xd800 && last <= 0xdbff)
1235
+ cut--;
1236
+ return s.slice(0, cut);
1237
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zames_pro",
3
- "version": "2.82.86",
3
+ "version": "2.82.88",
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": {