zames_pro 2.82.56 → 2.82.58
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 +12 -0
- package/dist/commands.js +15 -3
- package/dist/shell.js +6 -1
- package/package.json +1 -1
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.58] - 2026-10-23
|
|
11
|
+
|
|
12
|
+
### Fixed
|
|
13
|
+
|
|
14
|
+
- **commands:** keep a long answer in the restored dialogue instead of dropping it
|
|
15
|
+
|
|
16
|
+
## [2.82.57] - 2026-10-23
|
|
17
|
+
|
|
18
|
+
### Fixed
|
|
19
|
+
|
|
20
|
+
- **shell:** strip every quote from a cd target before the sandbox check
|
|
21
|
+
|
|
10
22
|
## [2.82.56] - 2026-10-23
|
|
11
23
|
|
|
12
24
|
### Fixed
|
package/dist/commands.js
CHANGED
|
@@ -397,6 +397,12 @@ export function resolveExtraDir(input, workdir, t = translate('en')) {
|
|
|
397
397
|
}
|
|
398
398
|
/** How many messages of the dialogue are printed by default. */
|
|
399
399
|
export const RESTORED_HISTORY_LIMIT = 20;
|
|
400
|
+
/**
|
|
401
|
+
* Longest restored message KEPT for display. The system prompt (leaked into
|
|
402
|
+
* history) is far bigger and is filtered by the noise checks below; a real
|
|
403
|
+
* answer above this size is shortened instead of being dropped.
|
|
404
|
+
*/
|
|
405
|
+
export const RESTORED_MESSAGE_MAX = 100_000;
|
|
400
406
|
/**
|
|
401
407
|
* DeepSeek stores the assistant turn VERBATIM: either a raw tool-call JSON
|
|
402
408
|
* ({"tool":"Read","args":{...}}, frequently dirty/truncated) or a `respond`
|
|
@@ -465,11 +471,17 @@ export function unescapeJsonString(s) {
|
|
|
465
471
|
* Returns null when the message must not be shown.
|
|
466
472
|
*/
|
|
467
473
|
export function normalizeRestoredMessage(m) {
|
|
468
|
-
|
|
474
|
+
let text = String((m && m.text) || '').trim();
|
|
469
475
|
if (!text)
|
|
470
476
|
return null;
|
|
471
|
-
|
|
472
|
-
|
|
477
|
+
// The size cap exists to keep a leaked SYSTEM PROMPT (or another giant
|
|
478
|
+
// protocol blob) out of the restored dialogue. It must NOT drop a real
|
|
479
|
+
// answer: a long report/diff/document easily exceeds the cap, and dropping
|
|
480
|
+
// it silently left the operator with a dialogue where the agent's own reply
|
|
481
|
+
// was missing. Keep such a message but shorten it for display.
|
|
482
|
+
if (text.length > RESTORED_MESSAGE_MAX) {
|
|
483
|
+
text = text.slice(0, RESTORED_MESSAGE_MAX) + '…';
|
|
484
|
+
}
|
|
473
485
|
if (m.role === 'user') {
|
|
474
486
|
if (/^Tool result for /.test(text))
|
|
475
487
|
return null;
|
package/dist/shell.js
CHANGED
|
@@ -33,7 +33,12 @@ export function assertCommandInsideRoot(root, command) {
|
|
|
33
33
|
const cdRe = /(?:^|[;&|(\s`])(?:cd|pushd)\s*([^;&|)]+)/gi;
|
|
34
34
|
let m;
|
|
35
35
|
while ((m = cdRe.exec(cmd))) {
|
|
36
|
-
|
|
36
|
+
// The shell removes EVERY quote in the word, wherever it sits —
|
|
37
|
+
// `cd "a"/"../../.."` is one word whose value is `a/../../..`. Stripping
|
|
38
|
+
// only a matching PAIR at the ENDS left the inner quotes in place, so the
|
|
39
|
+
// target was compared as the literal `a/"/../../..` (which normalizes to
|
|
40
|
+
// a path INSIDE the root), passed the guard, and then escaped for real.
|
|
41
|
+
const raw = m[1].trim().replace(/["']/g, '');
|
|
37
42
|
if (!raw || raw === '-')
|
|
38
43
|
continue;
|
|
39
44
|
// A `cd` target we cannot RESOLVE statically is rejected: the shell would
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "zames_pro",
|
|
3
|
-
"version": "2.82.
|
|
3
|
+
"version": "2.82.58",
|
|
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": {
|