zames_pro 2.72.6 → 2.72.8

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,26 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [2.72.8] - 2026-10-09
11
+
12
+ ### Fixed
13
+
14
+ - **browser:** also treat generation_timeout as a truncated turn
15
+
16
+ ### Fixed
17
+
18
+ - **browser:** also treat generation_timeout as a truncated turn
19
+
20
+ ## [2.72.7] - 2026-10-09
21
+
22
+ ### Fixed
23
+
24
+ - **ui:** show a queued-message banner for EVERY queued message
25
+
26
+ ### Fixed
27
+
28
+ - **ui:** show a queued-message banner for EVERY queued message
29
+
10
30
  ## [2.72.6] - 2026-10-09
11
31
 
12
32
  ### Fixed
@@ -2,7 +2,7 @@ import path from 'path';
2
2
  import os from 'os';
3
3
  import fs from 'fs/promises';
4
4
  import { chromium } from 'playwright';
5
- import { GENERATION_ERR_RE, INCOMPLETE_STATUS_RE, RATE_LIMIT_RE, SERVER_BUSY_RE, STATUS_RE, } from './deepseek-ui.js';
5
+ import { GENERATION_ERR_RE, GENERATION_TIMEOUT_RE, INCOMPLETE_STATUS_RE, RATE_LIMIT_RE, SERVER_BUSY_RE, STATUS_RE, } from './deepseek-ui.js';
6
6
  // Drop service placeholders ("Reading…", "Thinking…") so they are not mistaken
7
7
  // for an answer; keep everything else as-is (including the whitespace the
8
8
  // tool-call relies on). Pure: no `this`, no page.
@@ -172,7 +172,9 @@ export function sanitizeHeadlessUA(ua) {
172
172
  export const AUTH_MARKER_FILE = path.join(os.homedir(), '.zames', 'auth.json');
173
173
  export function isGenerationIncompleteText(text) {
174
174
  const t = String(text || '');
175
- return GENERATION_ERR_RE.test(t) || INCOMPLETE_STATUS_RE.test(t);
175
+ return (GENERATION_ERR_RE.test(t) ||
176
+ GENERATION_TIMEOUT_RE.test(t) ||
177
+ INCOMPLETE_STATUS_RE.test(t));
176
178
  }
177
179
  export function isRateLimitText(text) {
178
180
  return RATE_LIMIT_RE.test(String(text || ''));
@@ -213,6 +213,12 @@ export const RATE_LIMIT_RE = /(messages? too frequent|too many requests|rate lim
213
213
  export const SERVER_BUSY_RE = /(server (is )?busy|server error|service (is )?unavailable|temporarily unavailable|internal server error|502|503|504|server overloaded|сервер занят|сервер перегружен|сервис недоступен|внутренняя ошибка|попробуйте позже)/i;
214
214
  // ---------- network protocol (SSE) ----------
215
215
  export const GENERATION_ERR_RE = /"finish_reason":\s*"generation_err"/i;
216
+ // The server gave up on the turn ("Server busy, please try again later."):
217
+ // finish_reason is `generation_timeout` and there is NO RESPONSE fragment, so
218
+ // extractAnswer() returns '' and the finish loop would wait out the whole
219
+ // timeout. Same failure family as generation_err — the turn did not complete,
220
+ // so ask() must resend instead of hanging.
221
+ export const GENERATION_TIMEOUT_RE = /"finish_reason":\s*"generation_timeout"/i;
216
222
  // DeepSeek emits the generation status in TWO shapes: the initial message as a
217
223
  // JSON property (`"quasi_status":"FINISHED"` inside v.response) and later
218
224
  // BATCH updates (`{"p":"quasi_status","v":"FINISHED"}`). The old regex only
@@ -154,6 +154,12 @@ export const commonMessages = {
154
154
  en: '⏹ Ctrl+C — aborting generation...',
155
155
  },
156
156
  'msg.queued': { ru: '📨 В очередь ({n}): ', en: '📨 Queued ({n}): ' },
157
+ // TTY variant: the editor already echoed the message text, so only the
158
+ // count is shown (no repeated text).
159
+ 'msg.queued_badge': {
160
+ ru: '📨 В очередь ({n})',
161
+ en: '📨 Queued ({n})',
162
+ },
157
163
  // Shown ONCE per session, the first time a message is queued while the
158
164
  // agent is working. It explains what happens (sent after the current task)
159
165
  // and how to inspect/clear the queue, so the operator knows nothing is lost.
package/dist/index.js CHANGED
@@ -1321,12 +1321,17 @@ async function main() {
1321
1321
  const msg = { text, attachments };
1322
1322
  pendingQueue.push(msg);
1323
1323
  // The operator typed this WHILE the agent was working, so the message is
1324
- // queued and only sent after the current task. Explain that once per
1325
- // session (via the editor's own status area) so it is clear nothing was
1326
- // lost; later queued messages stay as the compact msg.queued banner only.
1327
- if (ed.busy && !queueHintShown) {
1328
- queueHintShown = true;
1329
- ed.printAbove(theme.dim(t('msg.queued_hint')));
1324
+ // queued and only sent after the current task. In TTY the editor ALREADY
1325
+ // echoed the message text (❯ …) above the input, so we add only a compact
1326
+ // COUNT line (no repeated text) for EVERY queued message — so it is always
1327
+ // clear the message was accepted and not lost. The FIRST one additionally
1328
+ // explains what the queue is and how to inspect/clear it.
1329
+ if (ed.busy) {
1330
+ if (!queueHintShown) {
1331
+ queueHintShown = true;
1332
+ ed.printAbove(theme.dim(t('msg.queued_hint')));
1333
+ }
1334
+ ed.printAbove(theme.user(t('msg.queued_badge', { n: pendingQueue.length })));
1330
1335
  }
1331
1336
  if (waiter) {
1332
1337
  const r = waiter;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zames_pro",
3
- "version": "2.72.6",
3
+ "version": "2.72.8",
4
4
  "description": "Terminal coding agent that drives chat.deepseek.com through Playwright — 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": {