zames_pro 2.72.7 → 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,16 @@ 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
+
10
20
  ## [2.72.7] - 2026-10-09
11
21
 
12
22
  ### 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
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zames_pro",
3
- "version": "2.72.7",
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": {