zames_pro 2.82.136 → 2.82.138
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 +76 -0
- package/dist/agent-loop.js +11 -14
- package/dist/answer-parse.js +10 -16
- package/dist/attach-refs.js +3 -3
- package/dist/attachments.js +7 -8
- package/dist/backlog.js +2 -5
- package/dist/banner.js +4 -5
- package/dist/browser-chats.js +4 -4
- package/dist/browser-dom.js +16 -15
- package/dist/browser-login.js +9 -5
- package/dist/browser-pure.js +5 -5
- package/dist/browser.js +10 -20
- package/dist/changelog.js +15 -21
- package/dist/checkpoint.js +6 -10
- package/dist/cli-args.js +4 -6
- package/dist/code-blocks.js +3 -6
- package/dist/commands.js +6 -10
- package/dist/compact.js +1 -1
- package/dist/config-command.js +6 -4
- package/dist/config-commands.js +2 -3
- package/dist/config-live.js +7 -13
- package/dist/config-menu.js +5 -4
- package/dist/config.js +6 -9
- package/dist/deepseek-ui.js +7 -7
- package/dist/diagnostics.js +5 -7
- package/dist/diff.js +8 -10
- package/dist/extraTools.js +3 -3
- package/dist/fsutil.js +0 -4
- package/dist/gitTools.js +5 -4
- package/dist/glm-browser.js +2 -10
- package/dist/glm-chats.js +0 -1
- package/dist/glm-net-capture.js +1 -1
- package/dist/glm-ui.js +2 -2
- package/dist/goal.js +1 -4
- package/dist/i18n/common.js +2 -2
- package/dist/i18n.js +1 -2
- package/dist/index.js +8 -19
- package/dist/input/suggest.js +4 -7
- package/dist/input.js +6 -11
- package/dist/markdown.js +0 -1
- package/dist/mcp.js +2 -5
- package/dist/net-capture.js +1 -1
- package/dist/path-token.js +7 -14
- package/dist/prompt.js +4 -3
- package/dist/qwen-browser.js +1 -8
- package/dist/qwen-chats.js +0 -1
- package/dist/qwen-net-capture.js +4 -7
- package/dist/qwen-ui.js +0 -3
- package/dist/run-task.js +11 -11
- package/dist/self-review.js +0 -5
- package/dist/send-runtime.js +6 -10
- package/dist/send-telemetry.js +5 -7
- package/dist/send-throttle.js +4 -5
- package/dist/sessions.js +6 -7
- package/dist/spinner.js +3 -4
- package/dist/statusline.js +6 -10
- package/dist/subagent.js +1 -1
- package/dist/system-prompt.js +1 -1
- package/dist/tools.js +1 -1
- package/dist/tui/widgets.js +0 -1
- package/package.json +1 -1
package/dist/send-runtime.js
CHANGED
|
@@ -78,11 +78,9 @@ export class SendRuntime {
|
|
|
78
78
|
if (typeof extra.retryAfterMs === 'number') {
|
|
79
79
|
e.retryAfterMs = extra.retryAfterMs;
|
|
80
80
|
}
|
|
81
|
-
// A SUCCESS after a rate limit IS the lift of that block
|
|
82
|
-
//
|
|
83
|
-
//
|
|
84
|
-
// fold below clears `blockedAt` first. The measured duration is therefore
|
|
85
|
-
// taken HERE, before the state is folded; it is attached to the SAME event
|
|
81
|
+
// A SUCCESS after a rate limit IS the lift of that block: the retry happens
|
|
82
|
+
// IN PLACE and simply succeeds. The duration is therefore measured HERE,
|
|
83
|
+
// before the fold below clears `blockedAt`, and attached to the SAME event
|
|
86
84
|
// line, so one block still yields exactly one sample.
|
|
87
85
|
let blockMs;
|
|
88
86
|
if (outcome === 'ok' &&
|
|
@@ -101,11 +99,9 @@ export class SendRuntime {
|
|
|
101
99
|
this.state = { ...this.state, blocked: true, blockedAt: this.now() };
|
|
102
100
|
}
|
|
103
101
|
if (outcome === 'rate_limit') {
|
|
104
|
-
// The
|
|
105
|
-
//
|
|
106
|
-
//
|
|
107
|
-
// lower bound that would then be averaged together with the real
|
|
108
|
-
// duration written by onBlockLifted — the same block counted TWICE.
|
|
102
|
+
// The event carries NO duration: a rate-limit send is not the END of the
|
|
103
|
+
// block, so a value measured here would be averaged together with the
|
|
104
|
+
// real duration measured at the lift — the same block counted TWICE.
|
|
109
105
|
if (!this.state.blockedAt) {
|
|
110
106
|
this.state = { ...this.state, blocked: true, blockedAt: this.now() };
|
|
111
107
|
}
|
package/dist/send-telemetry.js
CHANGED
|
@@ -51,14 +51,12 @@ export function summarizeSends(events, now = Date.now()) {
|
|
|
51
51
|
const age = now - t;
|
|
52
52
|
return age >= 0 && age <= ms;
|
|
53
53
|
}).length;
|
|
54
|
-
// `blockMs` may arrive as a NUMBER (the writer) or a string (an older
|
|
55
|
-
// build, a hand-edited file): a numeric string is accepted so the average
|
|
56
|
-
// is not silently 0 for a file that records the block.
|
|
57
54
|
const blocks = events
|
|
58
|
-
// `
|
|
59
|
-
//
|
|
60
|
-
//
|
|
61
|
-
// block
|
|
55
|
+
// `blockMs` may arrive as a NUMBER (the writer) or a string (an older
|
|
56
|
+
// build, a hand-edited file), so it is coerced. A missing value must NOT
|
|
57
|
+
// become 0: 0 is a finite non-negative number, and an event without a
|
|
58
|
+
// block duration (the rate-limit event only records `blockedAt`) was
|
|
59
|
+
// averaged as a ZERO-length block, halving the reported average.
|
|
62
60
|
.map((e) => e.blockMs === null || e.blockMs === undefined ? NaN : Number(e.blockMs))
|
|
63
61
|
// A finite value is not enough: the SUM of many large durations overflows
|
|
64
62
|
// a JS number (two `Number.MAX_VALUE` entries add up to Infinity), so the
|
package/dist/send-throttle.js
CHANGED
|
@@ -39,11 +39,10 @@ function prune(recent, now, windowMs) {
|
|
|
39
39
|
*/
|
|
40
40
|
export function nextWaitMs(state, lastSentAt, now) {
|
|
41
41
|
if (state.forcedWaitMs > 0) {
|
|
42
|
-
// A forced wait must EXPIRE:
|
|
43
|
-
//
|
|
44
|
-
//
|
|
45
|
-
//
|
|
46
|
-
// the current call, and expires on the next.
|
|
42
|
+
// A forced wait must EXPIRE: with only `forcedWaitMs > 0` a long
|
|
43
|
+
// Retry-After blocked every send until another event cleared it. The
|
|
44
|
+
// request stamp makes the remaining time exact; without one (a caller-built
|
|
45
|
+
// or restored state) the wait is reported ONCE, from the current call.
|
|
47
46
|
if (state.forcedWaitAt) {
|
|
48
47
|
const left = state.forcedWaitMs - (now - state.forcedWaitAt);
|
|
49
48
|
return left > 0 ? left : 0;
|
package/dist/sessions.js
CHANGED
|
@@ -133,13 +133,12 @@ function writeIndex({ id, workdir }) {
|
|
|
133
133
|
}
|
|
134
134
|
catch { }
|
|
135
135
|
}
|
|
136
|
-
// The last session for the working directory
|
|
137
|
-
//
|
|
138
|
-
//
|
|
139
|
-
//
|
|
140
|
-
//
|
|
141
|
-
//
|
|
142
|
-
// global last only within the same provider).
|
|
136
|
+
// The last session for the working directory (the last one overall when the
|
|
137
|
+
// directory has none — useful when launched from a new place), restricted to
|
|
138
|
+
// `provider` when given. A chat id only exists on ITS backend, so restoring a
|
|
139
|
+
// DeepSeek chat while the active provider is Qwen (or vice versa) would fail to
|
|
140
|
+
// open; the filter makes auto-restore and /last pick the right one, and fall
|
|
141
|
+
// back to the global last only within the same provider.
|
|
143
142
|
export function loadLastSession(workdir = '', provider) {
|
|
144
143
|
try {
|
|
145
144
|
const index = JSON.parse(fs.readFileSync(INDEX_FILE, 'utf-8'));
|
package/dist/spinner.js
CHANGED
|
@@ -152,10 +152,9 @@ export function createSpinner(locale = 'ru') {
|
|
|
152
152
|
}
|
|
153
153
|
startThinking();
|
|
154
154
|
},
|
|
155
|
-
// The agent is waiting out the send-interval pause before a real send
|
|
156
|
-
//
|
|
157
|
-
//
|
|
158
|
-
// was printed and the dots stayed frozen).
|
|
155
|
+
// The agent is waiting out the send-interval pause before a real send: an
|
|
156
|
+
// ANIMATED status with the remaining seconds, so the spinner keeps moving
|
|
157
|
+
// (a static line made the pause look frozen).
|
|
159
158
|
sendPause: (seconds) => {
|
|
160
159
|
if (pending)
|
|
161
160
|
return;
|
package/dist/statusline.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { spawn } from 'node:child_process';
|
|
2
|
-
//
|
|
2
|
+
// statusLine hook. When `ui.statusLineCommand` is set, zames runs it on a
|
|
3
3
|
// timer with a JSON status object on stdin and shows the FIRST line of its
|
|
4
4
|
// stdout in the status line (like Claude Code). The command is deliberately
|
|
5
5
|
// run OUT of the render path: a per-render spawn would block typing, so the
|
|
@@ -58,10 +58,6 @@ export function runStatusLineCommand(workdir, command, info, timeoutMs = 4000) {
|
|
|
58
58
|
// (the row overflows and the cursor arithmetic drifts).
|
|
59
59
|
resolve(clipBadge(first));
|
|
60
60
|
};
|
|
61
|
-
// Only the FIRST LINE is shown, so there is no reason to keep collecting a
|
|
62
|
-
// big blob: a chatty command (a JSON dump, `ls -R`) would grow `out`
|
|
63
|
-
// unboundedly and the status row then repainted megabytes. Stop appending
|
|
64
|
-
// once a short line is buffered (the rest of that line does not matter).
|
|
65
61
|
const timer = setTimeout(() => {
|
|
66
62
|
try {
|
|
67
63
|
if (process.platform !== 'win32' && child.pid) {
|
|
@@ -74,15 +70,15 @@ export function runStatusLineCommand(workdir, command, info, timeoutMs = 4000) {
|
|
|
74
70
|
catch { }
|
|
75
71
|
finish();
|
|
76
72
|
}, timeoutMs);
|
|
77
|
-
//
|
|
78
|
-
//
|
|
73
|
+
// Only the FIRST line is shown and the status line is a short badge, so the
|
|
74
|
+
// buffer is capped: a chatty command (a JSON dump, `ls -R`) would otherwise
|
|
75
|
+
// grow `out` and make the status row repaint megabytes on every tick.
|
|
79
76
|
const MAX_OUT = 400;
|
|
80
77
|
child.stdout?.on('data', (c) => {
|
|
81
78
|
if (out.length >= MAX_OUT)
|
|
82
79
|
return;
|
|
83
|
-
// A chunk can be huge (one 64 KB read)
|
|
84
|
-
//
|
|
85
|
-
// status row repaint megabytes on every tick.
|
|
80
|
+
// A chunk can be huge (one 64 KB read): clip it to the remaining space so
|
|
81
|
+
// the buffer never exceeds MAX_OUT.
|
|
86
82
|
out += c.toString().slice(0, MAX_OUT - out.length);
|
|
87
83
|
});
|
|
88
84
|
child.on('error', () => {
|
package/dist/subagent.js
CHANGED
|
@@ -178,7 +178,7 @@ export function createSubagentRunner(opts) {
|
|
|
178
178
|
browser.onSendState = savedHooks.onSendState;
|
|
179
179
|
browser.onNotice = savedHooks.onNotice;
|
|
180
180
|
}
|
|
181
|
-
// SubagentStop hook
|
|
181
|
+
// SubagentStop hook: fires after the nested loop finishes, so a hook
|
|
182
182
|
// can clean up or notify. Best-effort; its stdout is appended to the report.
|
|
183
183
|
let hookOut = '';
|
|
184
184
|
try {
|
package/dist/system-prompt.js
CHANGED
|
@@ -124,7 +124,7 @@ export function renderContextSection(context) {
|
|
|
124
124
|
f.content +
|
|
125
125
|
'\n';
|
|
126
126
|
}
|
|
127
|
-
//
|
|
127
|
+
// Nested AGENTS.md/MEMORY.md from the directories this task touches.
|
|
128
128
|
// Deliberately a SEPARATE section: these apply only to part of the tree and
|
|
129
129
|
// must not be mistaken for project-wide rules.
|
|
130
130
|
for (const f of context.scopedAgents || []) {
|
package/dist/tools.js
CHANGED
|
@@ -104,7 +104,7 @@ export function createTools(workdir, { undo, todos, readOnly = false, subagents
|
|
|
104
104
|
},
|
|
105
105
|
fn: async ({ path: p, offset, limit, numbered }) => {
|
|
106
106
|
const file = safe(req(p, 'path'));
|
|
107
|
-
// Binary guard
|
|
107
|
+
// Binary guard: reading an image/archive as utf-8 produced
|
|
108
108
|
// mojibake the model tried to reason about. Detect a binary buffer
|
|
109
109
|
// BEFORE decoding and answer with useful metadata instead.
|
|
110
110
|
// A read FAILURE (a missing file, a directory, EACCES) is answered in
|
package/dist/tui/widgets.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "zames_pro",
|
|
3
|
-
"version": "2.82.
|
|
3
|
+
"version": "2.82.138",
|
|
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": {
|