dsh-client-auto-continue 0.17.1-rc.1 → 0.17.2

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
@@ -1,5 +1,37 @@
1
1
  # Changelog
2
2
 
3
+ ## [0.17.2](https://github.com/HsiangNianian/dsh-auto-continue/releases/tag/v0.17.2) — 2026-11-02
4
+
5
+ ### Fixed
6
+
7
+ - Use English for missing or unsupported locales, while preserving Chinese for `zh` and `zh-*`, across host prompts, browser locale synchronization and settings-save notifications ([#73](https://github.com/HsiangNianian/dsh-auto-continue/pull/73), thanks @kesha4)
8
+ - Keep host prompts in English when an older tab writes a raw locale such as `ru` after the browser's bounded synchronization attempts are exhausted
9
+ - Preserve custom prompt text and the three-write limit per active browser locale
10
+
11
+ ### Maintenance
12
+
13
+ - Rebuild source maps with LF source content and enforce LF text checkouts for consistent builds across platforms
14
+ - Add regression coverage for missing and unsupported locales, Chinese regional tags, mixed client versions and localized save notifications
15
+
16
+ [Upgrade instructions, validation and known limits](docs/releases/v0.17.2.md) · [Full changes](https://github.com/HsiangNianian/dsh-auto-continue/compare/v0.17.1...v0.17.2)
17
+
18
+ ## [0.17.1](https://github.com/HsiangNianian/dsh-auto-continue/releases/tag/v0.17.1) — 2026-10-30
19
+
20
+ ### Fixed
21
+
22
+ - Keep the mobile composer compact with DS-Bot and dsh-pocket, even when the host's size query container is removed, so the controls leave room for typing ([#72](https://github.com/HsiangNianian/dsh-auto-continue/issues/72))
23
+ - Wrap pause notices and legacy save errors below the controls on narrow screens, preserving the original switch, mode menu and accessible labels
24
+ - Include the rollback fix first shipped in 0.17.1-rc.1: skip `message-ops` maintenance turns in silent recovery, autonomous followups and startup scans, and cancel automatic sends queued before a rollback ([#69](https://github.com/HsiangNianian/dsh-auto-continue/issues/69))
25
+ - Keep maintenance turns out of recovery statistics and retry-budget resets, including unfinished maintenance windows found after a restart
26
+ - Treat missing prompt template variables as permanent configuration failures when error classification is enabled, avoiding retries that cannot reach the model
27
+
28
+ ### Maintenance
29
+
30
+ - Include the native settings form, maintenance-turn, configuration-error and stable/prerelease publishing regression coverage added since 0.17.0
31
+ - Keep stable releases on `latest` and prereleases on `next`, with reviewed release notes for both
32
+
33
+ [Upgrade instructions, validation and known limits](docs/releases/v0.17.1.md) · [Full changes](https://github.com/HsiangNianian/dsh-auto-continue/compare/v0.17.0...v0.17.1)
34
+
3
35
  ## [0.17.1-rc.1](https://github.com/HsiangNianian/dsh-auto-continue/releases/tag/v0.17.1-rc.1) — 2026-10-27
4
36
 
5
37
  Pre-release patch, available on the `next` dist-tag
package/README.md CHANGED
@@ -47,7 +47,7 @@ Automatic recovery for [DeepSeek Harness](https://github.com/deepseek-ai/deepsee
47
47
  - **Session modes** — switch auto-continue on or off beside the message input, for that conversation only. The mode menu next to the switch shows the current mode and opens Follow default, Off, Recovery only or Autonomous loop. Choices save on the host, survive restarts and sync across tabs; hiding the control does not change them
48
48
  - **Error classification** — transient failures (network / timeout / 5xx / 429…) are auto-resumed; permanent ones are **skipped** and notified, because retrying them never helps. A failure counts as permanent when its HTTP status is 401/403 or its code/message matches auth, credential/API-key, balance/quota, unknown-model, or context-length/overflow keywords. Provider-specific exceptions can be opted into with literal custom retryable patterns; turn classification off to resume everything
49
49
  - **Adaptive backoff** — consecutive failures wait longer each time (cooldown × factor: 20s → 40s → 80s…), capped at the max backoff, instead of hammering a broken upstream
50
- - **English / Chinese localization** — the settings card, built-in resume / guard / loop text, and browser notifications follow DSH's active UI language (initially selected from the browser language). Only `en` and `zh` are supported; other languages fall back to Chinese. Switching languages updates built-in defaults without overwriting custom text
50
+ - **English / Chinese localization** — the settings card uses DSH's locale service. Built-in resume / guard / loop text and browser notifications use Chinese for `zh` and `zh-*` (case-insensitive), and English for every other or unset locale. Switching languages updates built-in defaults without overwriting custom text
51
51
  - **Templated continue text** — `continueText` supports `{code}` `{message}` `{status}` `{tool}` `{turn}` `{errorCount}` `{elapsed}` placeholders, so the resume message can carry the failure context ("Continue ({tool} failed: {code})"); a **separate template** fires on `max-tokens` (e.g. "Continue the output without repeating anything already generated")
52
52
  - **Idempotency guard** — before resuming, the plugin inspects the last tool call: if its result is unconfirmed (the turn died mid-tool, e.g. a `git push` that may have gone through), the resume message tells the model to check state first and not to rerun; if the tool is confirmed done, it says so and asks not to repeat it; a failed tool gets no guard (retrying it is the point). Both guard texts are configurable (`{tool}` / `{result}` placeholders)
53
53
  - **Silent turn resume** — recover an observed model step or reasoning-only response that completes without visible output. A no-op turn with no model activity is left alone. Text, tool calls, images and extension blocks count as visible, including streamed output. Unobserved turns are not guessed to be silent. Explicit `no-visible-output` markers also recover after restart. Disabling **Resume silent turns** cancels queued silent sends; silent turns never reset the retry cap, even while the option is off.
@@ -100,8 +100,8 @@ DSH plugins install into a **profile** (`dsh web` → `web` profile). The comman
100
100
 
101
101
  | DSH runtime | Plugin version | Configuration entry point |
102
102
  | --- | --- | --- |
103
- | **0.2.1-rc.2** | **0.17.0 verified** | **Plugins → dsh-client-auto-continue** |
104
- | **0.2.1-alpha.1** | **0.17.0 verified** | **Plugins → dsh-client-auto-continue** |
103
+ | **0.2.1-rc.2** | **0.17.2 verified** | **Plugins → dsh-client-auto-continue** |
104
+ | **0.2.1-alpha.1** | **0.17.2 verified** | **Plugins → dsh-client-auto-continue** |
105
105
  | **0.2.0-rc.1** | **0.12.1 or newer** | **Plugins → dsh-client-auto-continue** |
106
106
  | **0.1.7-rc.2** | **0.11.9 or newer** | Same Plugins page |
107
107
  | Older hosts with the legacy settings API | Legacy UI retained | **Settings → Plugins → Plugin configuration** |
@@ -241,7 +241,7 @@ DSH 0.1.7 / 0.2 stores these values in the `auto-continue` entry's config in the
241
241
 
242
242
  Startup recovery polls every three seconds for sessions that load late, up to `freshMs` after the engine starts. Each settled session history is inspected once. `scanLimit` limits eligible recoveries per pass, so healthy or permanent-error sessions cannot crowd out interrupted ones. Pausing suspends recovery within the same window; unloading cancels the poller.
243
243
 
244
- The browser mirrors DSH's active language into the internal `locale` field. Leave the seven localized text fields empty or omit them to follow that language automatically; any non-empty value is treated as your own template and is never rewritten when the language changes:
244
+ The browser mirrors DSH's active language into the internal `locale` field: `zh` and `zh-*` (case-insensitive) are stored as `zh`; every other or unset locale uses `en`. The host applies the same rule when reading settings, including values such as `ru` written by an older tab, so built-in prompts stay English even if the browser's bounded sync attempts are exhausted. The stored value may remain `ru`; refreshing all tabs allows it to converge to `en`. This requires the updated host plugin to be loaded. Leave localized text fields empty or omit them to follow that language automatically; any non-empty value is treated as your own template and is never rewritten when the language changes:
245
245
 
246
246
  ```yaml
247
247
  - id: auto-continue
package/README.zh.md CHANGED
@@ -47,7 +47,7 @@
47
47
  - **会话模式** — 在输入框旁用开关控制当前会话的自动继续,旁边显示当前模式的菜单可选择跟随默认、仅故障恢复或自主循环。选择保存在宿主配置里,重启后保留,并同步到其他标签页。隐藏控件不会改变模式
48
48
  - **错误分类** — 临时性错误(网络 / 超时 / 5xx / 429 等)自动续跑; 永久性错误跳过并通知, 因为重试也没用。判定为永久性的条件: HTTP 状态码 401/403, 或 code/message 命中认证、凭据/API Key、余额/配额、模型不存在、上下文长度/超限等关键词。provider 专属例外可由用户显式填写普通文本匹配; 关闭分类后则全部自动继续
49
49
  - **自适应退避** — 连续失败时等待时间递增(冷却 × 系数: 20s → 40s → 80s…), 有上限, 不再对故障上游狂轰滥炸
50
- - **中英文本地化** — 设置卡片、内置续跑 / 护栏 / 循环文案以及浏览器通知都跟随 DSH 当前界面语言(初始值来自浏览器语言)。只支持 `en` 和 `zh`, 其他语言回落中文; 切换语言只会替换内置默认值, 不会覆盖用户自定义文本
50
+ - **中英文本地化** — 设置卡片使用 DSH 的语言服务。内置续跑 / 护栏 / 循环文案以及浏览器通知在 `zh` 和 `zh-*` 时使用中文(不区分大小写),其他语言或未设置语言时使用英文。切换语言只会替换内置默认值,不会覆盖用户自定义文本
51
51
  - **模板化继续文本** — `continueText` 支持 `{code}` `{message}` `{status}` `{tool}` `{turn}` `{errorCount}` `{elapsed}` 占位符, 续跑消息可携带失败上下文(如「继续 (git push 失败: UPSTREAM)」); 达到 `max-tokens` 时使用**另一套模板**(如「继续输出, 不要重复已生成的内容」)
52
52
  - **幂等护栏** — 续跑前检查上一步工具调用: 结果未确认(回合在工具执行中途夭折, 如 `git push` 可能已经推上去了)时, 续跑消息会提示模型先确认状态、不要重复执行; 工具已确认成功时说明已完成、请勿重复; 工具失败则不加护栏(重试本来就是目的)。两段护栏文本都可配置(支持 `{tool}` / `{result}` 占位符)
53
53
  - **无输出回合续跑** — 已观察到模型步骤或推理回复,但回合正常结束且没有可见输出时自动恢复。没有模型活动的空回合不会触发;文本、工具调用、图片、扩展块和已显示的流式内容均算可见输出。未观察到开始的回合不会被猜测为静默。启动后也能恢复显式的 `no-visible-output` 标记。关闭开关会取消排队中的静默续跑;即使开关关闭,静默回合也不会清零重试上限。
@@ -100,8 +100,8 @@ DSH 插件安装进 **profile**(`dsh web` 对应 `web` profile)。下面的命
100
100
 
101
101
  | DSH 内核 | 插件版本 | 配置入口 |
102
102
  | --- | --- | --- |
103
- | **0.2.1-rc.2** | **已验证 0.17.0** | **插件 → dsh-client-auto-continue** |
104
- | **0.2.1-alpha.1** | **已验证 0.17.0** | **插件 → dsh-client-auto-continue** |
103
+ | **0.2.1-rc.2** | **已验证 0.17.2** | **插件 → dsh-client-auto-continue** |
104
+ | **0.2.1-alpha.1** | **已验证 0.17.2** | **插件 → dsh-client-auto-continue** |
105
105
  | **0.2.0-rc.1** | **0.12.1 或更新版本** | **插件 → dsh-client-auto-continue** |
106
106
  | **0.1.7-rc.2** | **0.11.9 或更新版本** | 同上,从主侧栏的插件页进入 |
107
107
  | 使用旧设置 API 的宿主 | 保留旧版设置界面兼容 | **设置 → 插件 → 插件配置** |
@@ -238,7 +238,7 @@ DSH 0.1.7 / 0.2 将这些值保存在当前 profile patch 的 `auto-continue`
238
238
 
239
239
  启动恢复会每三秒等待一次延迟加载的会话,在引擎启动后的 `freshMs` 时间窗结束。每个已就绪会话的历史只检查一次,`scanLimit` 只限制每轮符合条件的恢复数量,正常会话或永久错误不会挤占名额。暂停会在同一时间窗内挂起恢复,卸载插件会取消轮询。
240
240
 
241
- 浏览器会把 DSH 当前语言同步到内部 `locale` 字段。下面七个本地化文本字段保持留空或直接省略时, 会自动跟随语言; 任何非空值都视为用户自己的模板, 切换语言时不会改写:
241
+ 浏览器会把 DSH 当前语言同步到内部 `locale` 字段:`zh` 和 `zh-*`(不区分大小写)保存为 `zh`,其他语言或未设置语言时使用 `en`。宿主读取配置时也按同一规则解析,因此旧标签页即使写回 `ru`、浏览器同步次数已耗尽,内置提示仍使用英文。配置值可能暂时保留为 `ru`;刷新全部标签页后可收敛为 `en`。这需要宿主已加载新版插件。本地化文本字段保持留空或直接省略时,会自动跟随语言;任何非空值都视为用户自己的模板,切换语言时不会改写:
242
242
 
243
243
  ```yaml
244
244
  - id: auto-continue
@@ -310,6 +310,8 @@ auto-continue:
310
310
 
311
311
  </details>
312
312
 
313
+ 下表中的中文文案对应 `locale: zh`;未设置语言时使用英文默认文案(如 `Continue`)。
314
+
313
315
  | 字段 | 默认 | 说明 |
314
316
  | --- | --- | --- |
315
317
  | 暂停自动继续 | 关 | 全局暂停: 实时与扫描都不再自动发送, 已排队的待发送也会取消 |
@@ -0,0 +1,63 @@
1
+ 0.17.1 fixes the cramped phone input reported with DS-Bot and dsh-pocket in [#72](https://github.com/HsiangNianian/dsh-auto-continue/issues/72), and brings the rollback and prompt-variable fixes from 0.17.1-rc.1 to the stable channel
2
+
3
+ ## Room to type on phones
4
+
5
+ DS-Bot changes the composer row to `display: contents`, which removes the size query container our compact layout relied on
6
+
7
+ - Add a viewport fallback at 460px and below, keeping the control compact even without a working query container
8
+ - Show the refresh icon, original switch and menu arrow, with full mode names available in the menu
9
+ - Keep pause notices and legacy save errors below the controls so they do not squeeze the input again
10
+ - Preserve accessible names, disabled states and the switch's touch target
11
+ - Keep the existing container queries for narrow composer panes on wider screens
12
+ - Cover both the host menu trigger and the legacy select fallback with the same styles
13
+
14
+ In the 351px Chromium reproduction, the control shrank from 194px to 77px and the input grew from 4px to 121px
15
+
16
+ ## Rollback compatibility
17
+
18
+ The fix from [#69](https://github.com/HsiangNianian/dsh-auto-continue/issues/69) is now included in a stable release
19
+
20
+ - Skip `@240xu/dsh-message-ops` maintenance turns in silent recovery and autonomous followups
21
+ - Cancel automatic sends queued before a rollback
22
+ - Keep maintenance turns out of recovery statistics and preserve the existing retry budget
23
+ - Apply the same exclusion to startup scans of loaded and stored sessions, including unfinished maintenance turns
24
+
25
+ This check uses the verified `message-ops` marker; normal turns with other reason values remain eligible for recovery
26
+
27
+ ## Missing prompt variables
28
+
29
+ With error classification enabled, errors such as `prompt variable "{{model}}" has no value for this assembly` stop automatic retries and use the existing permanent-error notification
30
+
31
+ The missing variable still needs to be fixed in the host configuration, and explicit retryable-error overrides still take precedence
32
+
33
+ ## Validation and limits
34
+
35
+ - Type checking, build, the full regression suite and the pinned DSH plugin checker
36
+ - Existing DSH runtime compatibility, settings, migration and startup recovery tests
37
+ - Chromium layout checks at 320, 351, 390, 460, 461, 768 and 1280px, plus a narrow composer in a wide viewport
38
+ - Working, missing and `display: contents` query containers, English and Chinese labels, both menu paths, paused, saving, read-only, disconnected and legacy save-error states
39
+ - Real DSH 0.2.1-rc.3 host components with message-ops 0.11.8 and a deterministic model adapter: no extra model call after rollback in recovery or autonomous-loop mode, and no automatic retry for the missing-model case
40
+ - Native settings form and stable/prerelease publishing regression coverage carried forward from rc.1
41
+
42
+ The mobile checks use the actual plugin component with a minimal composer scaffold and the relevant DS-Bot/Pocket styles, not a complete Android installation or a full host menu implementation
43
+
44
+ The reporter's exact plugin/browser versions and an Android device have not been tested
45
+
46
+ ## Upgrade
47
+
48
+ This is a stable release on `latest` for npm and GitHub Packages
49
+
50
+ Let active work finish and stop DSH, then update the plugin in the profile you use
51
+
52
+ ```bash
53
+ dsh plugin --profile web add dsh-client-auto-continue@0.17.1
54
+ dsh web
55
+ ```
56
+
57
+ Reload the browser after restarting DSH, including the remote page opened through dsh-pocket
58
+
59
+ For the desktop app, update the plugin in the app's own profile and restart the app
60
+
61
+ Existing configuration, conversation modes and pauses stay in place
62
+
63
+ **Full changes:** https://github.com/HsiangNianian/dsh-auto-continue/compare/v0.17.0...v0.17.1
@@ -0,0 +1,42 @@
1
+ 0.17.2 fixes the Chinese fallback seen with third-party UI languages such as Russian, thanks to @kesha4's contribution in [#73](https://github.com/HsiangNianian/dsh-auto-continue/pull/73)
2
+
3
+ ## Language fallback
4
+
5
+ - Use Chinese for `zh` and `zh-*`, ignoring case, and English for every other or unset locale
6
+ - Apply the same rule to browser settings synchronization, host prompts and settings-save notifications
7
+ - Keep prompts in English even if an older tab writes `ru` back after the browser's three-write limit is exhausted
8
+ - Preserve custom prompt text and the existing limit on locale writes
9
+ - Rebuild the source map with LF line endings and enforce LF for text checkouts
10
+
11
+ ## Upgrade
12
+
13
+ This is a stable patch release on `latest`
14
+
15
+ Let active work finish and stop DSH, then update the plugin in the profile you use
16
+
17
+ ```bash
18
+ dsh plugin --profile web add dsh-client-auto-continue@0.17.2
19
+ dsh web
20
+ ```
21
+
22
+ For the desktop app, update the plugin from the app's Plugins page in its own profile, then restart the app
23
+
24
+ Reload all open browser tabs after restarting the host so they pick up the new client too
25
+
26
+ Existing custom prompt text is preserved, so clear any text override you want to follow the built-in language defaults
27
+
28
+ If an older tab has left `ru` in the stored settings, the updated host already treats it as English; the field does not have to be rewritten for the prompts to work
29
+
30
+ **Behavior change:** profiles without a locale now use English until a Chinese UI locale is mirrored; explicit `zh` settings stay Chinese
31
+
32
+ ## Validation
33
+
34
+ - Type checking, build and full regression suite
35
+ - DSH runtime compatibility, profile settings, migration and startup recovery tests
36
+ - Twelve locale and missing-value cases, plus mixed old/new tabs exhausting their write budgets
37
+ - Settings-save notifications and unchanged custom prompts
38
+ - Repeated builds produce identical artifacts, with LF source-map content matching the source files
39
+
40
+ The reporter's exact third-party language pack and a real Windows browser have not been tested
41
+
42
+ **Full changes:** https://github.com/HsiangNianian/dsh-auto-continue/compare/v0.17.1...v0.17.2
package/lib/client.js CHANGED
@@ -37,6 +37,9 @@ __export(index_exports, {
37
37
  module.exports = __toCommonJS(index_exports);
38
38
 
39
39
  // src/shared/core.ts
40
+ function resolveLocale(locale) {
41
+ return typeof locale === "string" && /^zh(?:-|$)/i.test(locale) ? "zh" : "en";
42
+ }
40
43
  var isSessionMode = (value) => value === "default" || value === "off" || value === "recover" || value === "loop";
41
44
  function sessionMode(modes, sessionId) {
42
45
  return Object.prototype.hasOwnProperty.call(modes, sessionId) && isSessionMode(modes[sessionId]) ? modes[sessionId] : "default";
@@ -64,8 +67,8 @@ var LOCALIZED_TEXT_DEFAULTS = {
64
67
  }
65
68
  };
66
69
  var DEFAULT_CONFIG = {
67
- locale: "zh",
68
- ...LOCALIZED_TEXT_DEFAULTS.zh,
70
+ locale: "en",
71
+ ...LOCALIZED_TEXT_DEFAULTS.en,
69
72
  resumeSilentTurns: true,
70
73
  resumeCompletedTurns: false,
71
74
  continueTextLoop: "",
@@ -943,9 +946,7 @@ var css = `
943
946
  .dshAcFooter { align-items: flex-start; flex-direction: column; gap: 10px; }
944
947
  .dshAcFooter > div { width: 100%; justify-content: flex-end; }
945
948
  }
946
- /* Match the composer's own pickers (permission/mode) instead of the viewport:
947
- the nearest query container is the composer row, so the label collapses at
948
- the same 460px threshold as the native permission picker. */
949
+ /* Match the native picker breakpoints when the composer provides a query container. */
949
950
  @container (width <= 640px) {
950
951
  .dshAcComposerCore { gap: 5px; }
951
952
  .dshAcModeTrigger, .dshAcModeMenu { max-width: 104px; padding: 0 3px 0 6px; }
@@ -955,6 +956,14 @@ var css = `
955
956
  .dshAcModeTrigger, .dshAcModeMenu { max-width: 28px; padding: 0 2px; }
956
957
  .dshAcModeTriggerLabel { display: none; }
957
958
  }
959
+ /* DS-Bot can remove the query container with display: contents. */
960
+ @media (max-width: 460px) {
961
+ .dshAcComposer { flex-direction: column; align-items: flex-start; width: min-content; }
962
+ .dshAcComposer > .dshAcComposerLabel { white-space: normal; }
963
+ .dshAcComposerCore { gap: 5px; }
964
+ .dshAcComposerText, .dshAcModeTriggerLabel { display: none; }
965
+ .dshAcModeTrigger, .dshAcModeMenu { max-width: 28px; padding: 0 2px; }
966
+ }
958
967
 
959
968
  `;
960
969
  function injectStyles() {
@@ -990,7 +999,7 @@ function showSettingsNotification(notice, locale, permission) {
990
999
  return permission === "unsupported" ? "notification.unsupported" : permission === "failed" ? "notification.failed" : "notification.blocked";
991
1000
  }
992
1001
  try {
993
- const copy = locale.startsWith("en") ? en : zh;
1002
+ const copy = resolveLocale(locale) === "zh" ? zh : en;
994
1003
  const notification = new Notification(copy["notification.title"], { body: copy[message] });
995
1004
  notification.onclick = () => {
996
1005
  try {
@@ -1756,16 +1765,17 @@ function mountSettings(ctx, scope) {
1756
1765
  let mirrorAttempts = 0;
1757
1766
  const syncLocale = () => {
1758
1767
  const active = ctx.locale.getLocale().active;
1768
+ const target = resolveLocale(active);
1759
1769
  const snapshot = scope.getSnapshot();
1760
1770
  if (!canWriteSettings(snapshot)) return;
1761
1771
  if (mirroredLocale !== active) {
1762
1772
  mirroredLocale = active;
1763
1773
  mirrorAttempts = 0;
1764
1774
  }
1765
- if (snapshot.value?.locale === active) return;
1775
+ if (snapshot.value?.locale === target) return;
1766
1776
  if (mirrorAttempts >= MAX_MIRROR_ATTEMPTS) return;
1767
1777
  mirrorAttempts += 1;
1768
- void scope.set("locale", active);
1778
+ void scope.set("locale", target);
1769
1779
  };
1770
1780
  ctx.effect(() => scope.subscribe(syncLocale), "auto-continue: locale settings sync");
1771
1781
  ctx.on("locale/change", syncLocale);