zames_pro 2.82.93 → 2.82.95

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.95] - 2026-10-24
11
+
12
+ ### Fixed
13
+
14
+ - **mcp:** use toolResult when content carries nothing usable
15
+
16
+ ## [2.82.94] - 2026-10-24
17
+
18
+ ### Fixed
19
+
20
+ - **web:** WebFetch cap does not split a surrogate pair
21
+
10
22
  ## [2.82.93] - 2026-10-24
11
23
 
12
24
  ### Fixed
package/dist/mcp.js CHANGED
@@ -298,6 +298,12 @@ export function renderMcpResult(result, limit = MCP_RESULT_LIMIT) {
298
298
  .filter((p) => p !== '')
299
299
  .join(String.fromCharCode(10) + String.fromCharCode(10))
300
300
  .trim();
301
+ // A result may carry BOTH a (blank/empty) `content` list AND the real payload
302
+ // in `toolResult` (an SDK server that attaches it there). Preferring content
303
+ // unconditionally reported "(no content)" and DROPPED the real output.
304
+ if (!text && r.toolResult !== undefined) {
305
+ return truncateMcpResult(formatResultString(r.toolResult, r.isError), limit);
306
+ }
301
307
  return truncateMcpResult(formatResultString(text || '(MCP tool returned no content)', r.isError), limit);
302
308
  }
303
309
  function formatResultString(result, isError) {
package/dist/web.js CHANGED
@@ -712,11 +712,24 @@ export function parseDuckDuckGoResults(body, limit) {
712
712
  }
713
713
  return results.slice(0, limit);
714
714
  }
715
+ /**
716
+ * Clip fetched page text WITHOUT splitting a surrogate pair. PURE;
717
+ * exported so the clip is unit-tested (formatResult itself is private).
718
+ */
719
+ export function capFetchedText(text, limit) {
720
+ if (text.length <= limit)
721
+ return text;
722
+ let cut = Math.max(0, limit);
723
+ const last = text.charCodeAt(cut - 1);
724
+ if (last >= 0xd800 && last <= 0xdbff)
725
+ cut--;
726
+ return text.slice(0, cut);
727
+ }
715
728
  function formatResult(status, url, text, limit) {
716
729
  let out = text;
717
730
  let truncated = false;
718
731
  if (out.length > limit) {
719
- out = out.slice(0, limit);
732
+ out = capFetchedText(out, limit);
720
733
  truncated = true;
721
734
  }
722
735
  return (`HTTP ${status} ${url}\n\n${out}` +
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zames_pro",
3
- "version": "2.82.93",
3
+ "version": "2.82.95",
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": {