zames_pro 2.73.9 → 2.73.10

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,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [2.73.10] - 2026-10-12
11
+
12
+ ### Fixed
13
+
14
+ - **tools:** reject invalid base64 instead of writing garbage
15
+
10
16
  ## [2.73.9] - 2026-10-12
11
17
 
12
18
  ### Fixed
package/README.md CHANGED
@@ -467,6 +467,32 @@ Their tools show up in the agent as `server__tool` (e.g.
467
467
  A server that fails to connect is skipped with a warning and never breaks the
468
468
  agent.
469
469
 
470
+ ### Recommended servers (verified)
471
+
472
+ A few small, high-value servers tested end to end with zames (both the
473
+ DeepSeek and Qwen backends):
474
+
475
+ - **Context7** (`@upstash/context7-mcp`) — fetches CURRENT, version-specific
476
+ documentation for a library before the agent writes code, instead of relying
477
+ on a stale training snapshot. Tools: `resolve_library_id` then `query_docs`.
478
+ Verified live on DeepSeek AND Qwen: the agent called both tools and got the
479
+ current Zod API. This is the one to add first.
480
+
481
+ ```json
482
+ { "context7": { "command": "npx", "args": ["-y", "@upstash/context7-mcp@latest"] } }
483
+ ```
484
+
485
+ - **Sequential Thinking** (`@modelcontextprotocol/server-sequential-thinking`)
486
+ — one `sequentialthinking` tool that gives the model an explicit, revisable
487
+ plan before it acts; useful for long multi-step tasks.
488
+
489
+ - **Memory** (`@modelcontextprotocol/server-memory`) — a local knowledge graph
490
+ (9 tools) for durable facts across chats. NOTE: zames already has `MEMORY.md`
491
+ + `AGENTS.md`; add this only if you want a queryable graph.
492
+
493
+ Keep the stack SMALL: every server loads its tool definitions into the model's
494
+ context. Add one when you feel its absence, not before.
495
+
470
496
  ## Configuration
471
497
 
472
498
  Global config: `~/.zames/config.json`
@@ -1010,6 +1036,32 @@ MCP-браузер и браузер агента подерутся за оди
1010
1036
  Сервер, который не смог подключиться, пропускается с предупреждением и
1011
1037
  никогда не роняет агента.
1012
1038
 
1039
+ ### Рекомендованные серверы (проверены)
1040
+
1041
+ Несколько небольших полезных серверов, протестированных вживую с zames
1042
+ (на обоих бэкендах — DeepSeek и Qwen):
1043
+
1044
+ - **Context7** (`@upstash/context7-mcp`) — подтягивает АКТУАЛЬНУЮ
1045
+ документацию библиотеки (для конкретной версии) до того, как агент пишет код,
1046
+ вместо устаревших знаний из обучения. Инструменты: `resolve_library_id`, затем
1047
+ `query_docs`. Проверено вживую на DeepSeek И Qwen: агент вызвал оба инструмента
1048
+ и получил актуальный API Zod. Именно его стоит подключить первым.
1049
+
1050
+ ```json
1051
+ { "context7": { "command": "npx", "args": ["-y", "@upstash/context7-mcp@latest"] } }
1052
+ ```
1053
+
1054
+ - **Sequential Thinking** (`@modelcontextprotocol/server-sequential-thinking`)
1055
+ — один инструмент `sequentialthinking`, дающий модели явный пересматриваемый
1056
+ план перед действием; полезно для длинных многошаговых задач.
1057
+
1058
+ - **Memory** (`@modelcontextprotocol/server-memory`) — локальный граф знаний
1059
+ (9 инструментов) для долговременных фактов между чатами. ВНИМАНИЕ: у zames уже
1060
+ есть `MEMORY.md` + `AGENTS.md`; подключайте, только если нужен граф с запросами.
1061
+
1062
+ Держите набор МАЛЕНЬКИМ: каждый сервер грузит описания своих инструментов в
1063
+ контекст модели. Добавляйте, когда почувствовали нехватку, а не заранее.
1064
+
1013
1065
  ## Конфигурация
1014
1066
 
1015
1067
  Глобальный конфиг: `~/.zames/config.json`
@@ -12,7 +12,15 @@ import { safePath } from './sandbox.js';
12
12
  const NL = String.fromCharCode(10);
13
13
  function decodeContent(content, contentBase64) {
14
14
  if (typeof contentBase64 === 'string' && contentBase64.length) {
15
- return Buffer.from(contentBase64, 'base64').toString('utf-8');
15
+ // Reject undecodable base64: Buffer.from(..., 'base64') silently drops
16
+ // invalid characters and returns garbage, which would patch with corrupt
17
+ // text and no error (same guard as tools.ts).
18
+ const compact = contentBase64.replace(/\s+/g, '');
19
+ if (!/^[A-Za-z0-9+/]*={0,2}$/.test(compact)) {
20
+ throw new Error('base64 argument is not valid (expected only A-Za-z0-9+/=). ' +
21
+ 'Re-send as plain text or as clean base64.');
22
+ }
23
+ return Buffer.from(compact, 'base64').toString('utf-8');
16
24
  }
17
25
  return String(content ?? '');
18
26
  }
package/dist/tools.js CHANGED
@@ -19,7 +19,16 @@ export function createTools(workdir, { undo, todos, readOnly = false, subagents
19
19
  // subject to corruption.
20
20
  const decodeContent = (content, contentBase64) => {
21
21
  if (typeof contentBase64 === 'string' && contentBase64.length) {
22
- return Buffer.from(contentBase64, 'base64').toString('utf-8');
22
+ // Reject a base64 string that is not decodable: Buffer.from(..., 'base64')
23
+ // SILENTLY drops invalid characters and returns garbage (verified), which
24
+ // would write a corrupt file with no error. The alphabet check catches a
25
+ // truncated/garbled payload early with a clear message.
26
+ const compact = contentBase64.replace(/\s+/g, '');
27
+ if (!/^[A-Za-z0-9+/]*={0,2}$/.test(compact)) {
28
+ throw new Error('content_base64 is not valid base64 (expected only A-Za-z0-9+/=). ' +
29
+ 'Re-send the content as plain `content` or as clean base64.');
30
+ }
31
+ return Buffer.from(compact, 'base64').toString('utf-8');
23
32
  }
24
33
  return String(content ?? '');
25
34
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zames_pro",
3
- "version": "2.73.9",
3
+ "version": "2.73.10",
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": {