zames_pro 2.94.7 → 2.95.1
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/agent-loop.js +33 -0
- package/dist/system-prompt.js +12 -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.95.1] - 2026-11-03
|
|
11
|
+
|
|
12
|
+
### Fixed
|
|
13
|
+
|
|
14
|
+
- **loop:** skip the stall path for a stale BashOutput poll
|
|
15
|
+
|
|
16
|
+
## [2.95.0] - 2026-11-03
|
|
17
|
+
|
|
18
|
+
### Added
|
|
19
|
+
|
|
20
|
+
- **prompt:** send throwaway files to <project>/tmp
|
|
21
|
+
|
|
10
22
|
## [2.94.7] - 2026-11-03
|
|
11
23
|
|
|
12
24
|
### Fixed
|
package/dist/agent-loop.js
CHANGED
|
@@ -523,6 +523,15 @@ export async function runAgentLoop({ browser, tools, task, workdir, maxIteration
|
|
|
523
523
|
}
|
|
524
524
|
}
|
|
525
525
|
if (!parsed) {
|
|
526
|
+
// SILENT BACKGROUND POLL: {"tool": "BashOutput", "args": {...}} for a
|
|
527
|
+
// process that has ALREADY finished (the watchdog killed its promise,
|
|
528
|
+
// or the id is stale). The tool itself answers "no background process"
|
|
529
|
+
// and does not move the task forward, so an EMPTY model turn is not a
|
|
530
|
+
// stall worth a dev dump / a nudge - the loop simply re-asks quietly.
|
|
531
|
+
// Matching is DELIBERATELY narrow: only BashOutput with a plain id.
|
|
532
|
+
if (isEmptyPollCall(rawResponse)) {
|
|
533
|
+
continue;
|
|
534
|
+
}
|
|
526
535
|
// The answer looks like a (possibly truncated) tool call. We catch not
|
|
527
536
|
// only explicit JSON but also XML/DSML forms, "dirty" variants and
|
|
528
537
|
// unclosed fragments: if such an answer is silently taken as final, the
|
|
@@ -1387,6 +1396,30 @@ let unparsedDumps = 0;
|
|
|
1387
1396
|
const UNPARSED_DUMP_MAX = 20;
|
|
1388
1397
|
const UNPARSED_DUMP_BYTES = 64 * 1024;
|
|
1389
1398
|
/** Dev mode: save an unrecognized (but call-looking) answer for analysis. */
|
|
1399
|
+
/**
|
|
1400
|
+
* True when the raw answer is a bare `{"tool":"BashOutput","args":{"id":...}}`
|
|
1401
|
+
* (optionally wrapped in whitespace/fences). A finished background process is
|
|
1402
|
+
* polled by the model with such a call; the tool returns "no background
|
|
1403
|
+
* process with id ..." which does not advance the task. Used to skip the
|
|
1404
|
+
* stall nudge / dev dump for this one case only.
|
|
1405
|
+
*/
|
|
1406
|
+
export function isEmptyPollCall(raw) {
|
|
1407
|
+
const t = String(raw || '').trim();
|
|
1408
|
+
if (!t || t.length > 400)
|
|
1409
|
+
return false;
|
|
1410
|
+
let obj;
|
|
1411
|
+
try {
|
|
1412
|
+
obj = JSON.parse(t);
|
|
1413
|
+
}
|
|
1414
|
+
catch {
|
|
1415
|
+
return false;
|
|
1416
|
+
}
|
|
1417
|
+
const o = obj;
|
|
1418
|
+
if (!o || o.tool !== 'BashOutput')
|
|
1419
|
+
return false;
|
|
1420
|
+
const a = o.args;
|
|
1421
|
+
return !!a && typeof a.id === 'string';
|
|
1422
|
+
}
|
|
1390
1423
|
export async function dumpUnparsedCall(raw, meta) {
|
|
1391
1424
|
if (unparsedDumps >= UNPARSED_DUMP_MAX)
|
|
1392
1425
|
return '';
|
package/dist/system-prompt.js
CHANGED
|
@@ -238,6 +238,17 @@ export function buildSystemPrompt({ workdir, tools, gitContext = null, locale =
|
|
|
238
238
|
'for current web information: it is slow, it burns the account quota ' +
|
|
239
239
|
'and it is not needed to read or edit files.\n'
|
|
240
240
|
: '';
|
|
241
|
+
// Where a THROWAWAY script belongs. Without this rule the agent drops
|
|
242
|
+
// scratch files right into the project root with ad-hoc names (zz_c.txt,
|
|
243
|
+
// i1.py, tmp2.sh) and they end up in `git status`. The folder already
|
|
244
|
+
// exists, is gitignored and is wiped on every launch.
|
|
245
|
+
const tmpSection = '\n## Throwaway files go to <project>/tmp\n\n' +
|
|
246
|
+
'A one-off script, a scratch dump, a generated sample or any other ' +
|
|
247
|
+
'temporary file MUST be written to <project>/tmp (it exists, is ' +
|
|
248
|
+
'gitignored and is wiped on every launch) and NOT into the project ' +
|
|
249
|
+
'root. Give it a descriptive name with the RIGHT extension (.mjs, ' +
|
|
250
|
+
'.py, .ts, .txt) - the extension is what makes a later read or run ' +
|
|
251
|
+
'work. Delete the file when you are done with it.\n';
|
|
241
252
|
const gitSection = gitContext
|
|
242
253
|
? `\n## Git context\n\n${gitContext}\n`
|
|
243
254
|
: '\n## Git context\n\nNot a git repository (or git is not installed).\n';
|
|
@@ -299,7 +310,7 @@ task is done (or when you must ask the operator), not between tool calls.
|
|
|
299
310
|
You have access to the following tools:
|
|
300
311
|
|
|
301
312
|
${toolDescriptions}
|
|
302
|
-
${runtimeSection}${gitSection}${attachSection}${contextSection}${selfSection}
|
|
313
|
+
${runtimeSection}${tmpSection}${gitSection}${attachSection}${contextSection}${selfSection}
|
|
303
314
|
## Choosing the right tool
|
|
304
315
|
|
|
305
316
|
Prefer the most specific tool; a wrong choice wastes a turn:
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "zames_pro",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.95.1",
|
|
4
4
|
"description": "Terminal coding agent that drives a real browser to chat with DeepSeek, Qwen or GLM — 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": {
|