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.
Files changed (61) hide show
  1. package/CHANGELOG.md +76 -0
  2. package/dist/agent-loop.js +11 -14
  3. package/dist/answer-parse.js +10 -16
  4. package/dist/attach-refs.js +3 -3
  5. package/dist/attachments.js +7 -8
  6. package/dist/backlog.js +2 -5
  7. package/dist/banner.js +4 -5
  8. package/dist/browser-chats.js +4 -4
  9. package/dist/browser-dom.js +16 -15
  10. package/dist/browser-login.js +9 -5
  11. package/dist/browser-pure.js +5 -5
  12. package/dist/browser.js +10 -20
  13. package/dist/changelog.js +15 -21
  14. package/dist/checkpoint.js +6 -10
  15. package/dist/cli-args.js +4 -6
  16. package/dist/code-blocks.js +3 -6
  17. package/dist/commands.js +6 -10
  18. package/dist/compact.js +1 -1
  19. package/dist/config-command.js +6 -4
  20. package/dist/config-commands.js +2 -3
  21. package/dist/config-live.js +7 -13
  22. package/dist/config-menu.js +5 -4
  23. package/dist/config.js +6 -9
  24. package/dist/deepseek-ui.js +7 -7
  25. package/dist/diagnostics.js +5 -7
  26. package/dist/diff.js +8 -10
  27. package/dist/extraTools.js +3 -3
  28. package/dist/fsutil.js +0 -4
  29. package/dist/gitTools.js +5 -4
  30. package/dist/glm-browser.js +2 -10
  31. package/dist/glm-chats.js +0 -1
  32. package/dist/glm-net-capture.js +1 -1
  33. package/dist/glm-ui.js +2 -2
  34. package/dist/goal.js +1 -4
  35. package/dist/i18n/common.js +2 -2
  36. package/dist/i18n.js +1 -2
  37. package/dist/index.js +8 -19
  38. package/dist/input/suggest.js +4 -7
  39. package/dist/input.js +6 -11
  40. package/dist/markdown.js +0 -1
  41. package/dist/mcp.js +2 -5
  42. package/dist/net-capture.js +1 -1
  43. package/dist/path-token.js +7 -14
  44. package/dist/prompt.js +4 -3
  45. package/dist/qwen-browser.js +1 -8
  46. package/dist/qwen-chats.js +0 -1
  47. package/dist/qwen-net-capture.js +4 -7
  48. package/dist/qwen-ui.js +0 -3
  49. package/dist/run-task.js +11 -11
  50. package/dist/self-review.js +0 -5
  51. package/dist/send-runtime.js +6 -10
  52. package/dist/send-telemetry.js +5 -7
  53. package/dist/send-throttle.js +4 -5
  54. package/dist/sessions.js +6 -7
  55. package/dist/spinner.js +3 -4
  56. package/dist/statusline.js +6 -10
  57. package/dist/subagent.js +1 -1
  58. package/dist/system-prompt.js +1 -1
  59. package/dist/tools.js +1 -1
  60. package/dist/tui/widgets.js +0 -1
  61. package/package.json +1 -1
@@ -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. onBlockLifted()
82
- // was the only producer of `blockMs`, but no provider's ask() calls it (a
83
- // rate limit is retried IN PLACE and the retry simply succeeds), and the
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 block START is only known AFTER the fold above (the adaptive path
105
- // sets it there). The event itself carries NO duration: a rate-limit
106
- // send is not the END of the block, so any value measured here is a
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
  }
@@ -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
- // `Number(null)`/`Number(undefined)` — 0/NaN, and 0 IS a finite
59
- // non-negative number: an event that carries no block duration (the
60
- // rate-limit event only records `blockedAt`) was averaged as a ZERO-length
61
- // block, halving the reported average. Only a REAL value counts.
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
@@ -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: a long Retry-After used to block every
43
- // send forever (the check was `> 0` only), until another event cleared
44
- // it. With the request stamp the remaining time is exact; without one
45
- // (a caller-built or restored state) the wait is reported ONCE, from
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. If there is none —
137
- // we return the last session overall (useful when launched from a new place).
138
- // The last session for the working directory, restricted to `provider` when
139
- // given. A chat id only exists on ITS backend, so restoring a DeepSeek chat
140
- // while the active provider is Qwen (or vice versa) would fail to open — the
141
- // filter makes auto-restore and /last pick the right one (and fall back to the
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
- // Show it as an ANIMATED status line with the remaining seconds, so the
157
- // spinner keeps moving during the pause (previously a static console line
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;
@@ -1,5 +1,5 @@
1
1
  import { spawn } from 'node:child_process';
2
- // N37 statusLine hook. When `ui.statusLineCommand` is set, zames runs it on a
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
- // A status line is a short badge: cap what is buffered so a chatty
78
- // command cannot grow it (and the rendered row) without bound.
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); clip it to the remaining space
84
- // so the buffer never exceeds MAX_OUT. An unbounded `out` made the
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 (N32): fires after the nested loop finishes, so a 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 {
@@ -124,7 +124,7 @@ export function renderContextSection(context) {
124
124
  f.content +
125
125
  '\n';
126
126
  }
127
- // B6: nested AGENTS.md/MEMORY.md from the directories this task touches.
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 (N35): reading an image/archive as utf-8 produced
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
@@ -1,6 +1,5 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { Box, Text } from 'ink';
3
- // ---- palette (kept in one place so every menu is consistent) ----
4
3
  export const UI = {
5
4
  accent: '#c8b06a',
6
5
  accentDim: '#7a6b45',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zames_pro",
3
- "version": "2.82.136",
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": {