dsh-client-auto-continue 0.20.0 → 0.20.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,21 @@
1
1
  # Changelog
2
2
 
3
+ ## [0.20.2](https://github.com/HsiangNianian/dsh-auto-continue/releases/tag/v0.20.2) — 2026-11-19
4
+
5
+ ### Fixed
6
+
7
+ - The loop guard missed a model stuck cycling short lines inside one streamed message (`Then: fill domain, go.` / `Writing.` for 92k characters). The stream check only counted adjacent near-duplicate paragraphs of 40+ characters, so short lines and alternating lines never added up. It now also keeps the last 40 paragraphs (or lines, when a block runs on without a blank line) and cancels the turn when 8 or fewer of them are distinct. Rules, code fences and other segments with no letters or digits are ignored ([#93](https://github.com/HsiangNianian/dsh-auto-continue/issues/93), thanks @Baka999)
8
+
9
+ [Upgrade instructions and validation](docs/releases/v0.20.2.md) · [Full changes](https://github.com/HsiangNianian/dsh-auto-continue/compare/v0.20.1...v0.20.2)
10
+
11
+ ## [0.20.1](https://github.com/HsiangNianian/dsh-auto-continue/releases/tag/v0.20.1) — 2026-11-16
12
+
13
+ ### Fixed
14
+
15
+ - The startup sweep of stored sessions could run the host out of memory on a large profile: it decoded the full log of every stored session before checking whether the last turn was recent, and the host then restarted and did the same again. One host start now reads at most 32 stored logs, most recently active first (from the projection checkpoint cache, falling back to creation time). The checkpoint only orders the reads, so freshness is still decided by the tail of the log. Each session counts once even when its read is retried ([#91](https://github.com/HsiangNianian/dsh-auto-continue/pull/91), thanks @anthonyhann)
16
+
17
+ [Upgrade instructions and validation](docs/releases/v0.20.1.md) · [Full changes](https://github.com/HsiangNianian/dsh-auto-continue/compare/v0.20.0...v0.20.1)
18
+
3
19
  ## [0.20.0](https://github.com/HsiangNianian/dsh-auto-continue/releases/tag/v0.20.0) — 2026-11-16
4
20
 
5
21
  ### Added
package/README.md CHANGED
@@ -73,7 +73,7 @@ To update, let running work finish, stop DSH, run the same command again, then r
73
73
 
74
74
  | DSH runtime | Plugin version | Settings location |
75
75
  | --- | --- | --- |
76
- | 0.2.2-rc.1, 0.2.1-rc.2, 0.2.1-alpha.1 | 0.20.0 verified | **Plugins → dsh-client-auto-continue** |
76
+ | 0.2.2-rc.1, 0.2.1-rc.2, 0.2.1-alpha.1 | 0.20.2 verified | **Plugins → dsh-client-auto-continue** |
77
77
  | 0.2.0-rc.1 | 0.12.1 or newer | **Plugins → dsh-client-auto-continue** |
78
78
  | 0.1.7-rc.2 | 0.11.9 or newer | **Plugins → dsh-client-auto-continue** |
79
79
  | Older hosts with the legacy settings API | legacy UI | **Settings → Plugins → Plugin configuration** |
@@ -281,7 +281,7 @@ Built-in texts exist in English, Chinese and Russian. They follow the DSH langua
281
281
  | Short-sentence max (chars) | `loopShortChars` | `40` | Messages shorter than this count as short sentences |
282
282
  | Short-sentence window (ms) | `loopWindowMs` | `30000` | Window for counting short sentences. Minimum 1000 |
283
283
  | Short-sentence threshold | `loopShortCount` | `12` | Short sentences in the window, with no tool call, that trip the guard |
284
- | Identical message count | `loopRepeatText` | `4` | Identical messages in a row (or repeated paragraphs within one streamed message) that trip the guard |
284
+ | Identical message count | `loopRepeatText` | `4` | Identical messages in a row (or repeated paragraphs within one streamed message) that trip the guard. Separately, a streamed message whose last 40 paragraphs or lines hold 8 or fewer distinct texts is always cut off, so short lines cycling `A / B / A / B` are caught too |
285
285
  | Same-tool repeat count | `loopToolRepeat` | `5` | Calls of the same tool with identical arguments and results that trip the guard |
286
286
 
287
287
  ### Status and logs
@@ -323,6 +323,8 @@ Patterns are plain substrings, not regular expressions. Cooldown and **Max conse
323
323
 
324
324
  **Unreadable sessions.** If a session's history cannot be read during the startup scan, that session is skipped and an error is logged; other sessions still recover ([#58](https://github.com/HsiangNianian/dsh-auto-continue/issues/58)). Repair it and restart DSH within the scan window to try again.
325
325
 
326
+ **Cold-read budget.** A stored session is judged by its whole log, so the sweep decodes one full history per session. To keep a large profile from exhausting the host heap, one host instance reads at most 32 stored logs, most recently active first. The order comes from the projection checkpoint cache (`timeContext.lastMessageTime`, then `sessionListMetadata.lastPromptAt`), falling back to the session creation time. Each session counts once, even if its read is retried. The order is the same on every start, so sessions past the budget are skipped rather than queued; they are the least recently active ones, and the freshness window (15 minutes by default) has almost always passed for them. A checkpoint can lag behind a log but never lead it, so it only orders the reads: freshness is still decided by the events at the tail of the log.
327
+
326
328
  ## Troubleshooting
327
329
 
328
330
  | Symptom | What to check |
package/README.ru.md CHANGED
@@ -73,7 +73,7 @@ dsh web
73
73
 
74
74
  | Среда DSH | Версия плагина | Где настройки |
75
75
  | --- | --- | --- |
76
- | 0.2.2-rc.1, 0.2.1-rc.2, 0.2.1-alpha.1 | 0.20.0 проверена | **Plugins → dsh-client-auto-continue** |
76
+ | 0.2.2-rc.1, 0.2.1-rc.2, 0.2.1-alpha.1 | 0.20.2 проверена | **Plugins → dsh-client-auto-continue** |
77
77
  | 0.2.0-rc.1 | 0.12.1 и новее | **Plugins → dsh-client-auto-continue** |
78
78
  | 0.1.7-rc.2 | 0.11.9 и новее | **Plugins → dsh-client-auto-continue** |
79
79
  | Старые хосты с устаревшим API настроек | старый интерфейс | **Settings → Plugins → Plugin configuration** |
@@ -283,7 +283,7 @@ dsh plugin --profile web remove dsh-client-auto-continue
283
283
  | Макс. длина короткой фразы (символов) | `loopShortChars` | `40` | Сообщения короче этого считаются короткими фразами |
284
284
  | Окно коротких фраз (мс) | `loopWindowMs` | `30000` | Окно для подсчёта коротких фраз; минимум 1000 |
285
285
  | Порог коротких фраз | `loopShortCount` | `12` | Сколько коротких фраз подряд в окне без вызовов инструментов включают защиту |
286
- | Порог одинаковых сообщений | `loopRepeatText` | `4` | Сколько одинаковых сообщений подряд (или повторов абзаца в одном потоковом сообщении) включают защиту |
286
+ | Порог одинаковых сообщений | `loopRepeatText` | `4` | Сколько одинаковых сообщений подряд (или повторов абзаца в одном потоковом сообщении) включают защиту. Кроме того, потоковое сообщение, в последних 40 абзацах или строках которого не больше 8 разных текстов, прерывается всегда, так что чередование коротких строк `A / B / A / B` тоже ловится |
287
287
  | Порог повторов инструмента | `loopToolRepeat` | `5` | Сколько вызовов одного инструмента с теми же аргументами и результатом включают защиту |
288
288
 
289
289
  ### Состояние и журнал
@@ -325,6 +325,8 @@ dsh plugin --profile web remove dsh-client-auto-continue
325
325
 
326
326
  **Нечитаемые сессии.** Если историю сессии не удаётся прочитать при стартовом сканировании, она пропускается с ошибкой в логе, а остальные сессии восстанавливаются ([#58](https://github.com/HsiangNianian/dsh-auto-continue/issues/58)). Исправьте её и перезапустите DSH в пределах окна сканирования, чтобы попробовать снова.
327
327
 
328
+ **Бюджет холодных чтений.** Хранимая сессия оценивается по всему журналу, поэтому сканирование раскодирует полную историю каждой сессии. Чтобы большой профиль не исчерпал кучу хоста, один экземпляр хоста читает не более 32 сохранённых журналов, начиная с самых недавно активных. Порядок берётся из кэша проекционных контрольных точек (`timeContext.lastMessageTime`, затем `sessionListMetadata.lastPromptAt`), а без них — из времени создания сессии. Каждая сессия учитывается один раз, даже если чтение повторяется. Порядок одинаков при каждом запуске, поэтому сессии за пределами бюджета пропускаются, а не откладываются: это самые давно активные сессии, и окно свежести (по умолчанию 15 минут) для них почти всегда уже прошло. Контрольная точка может отставать от журнала, но не опережать его, поэтому она задаёт только порядок: свежесть по-прежнему определяется событиями в хвосте журнала.
329
+
328
330
  ## Решение проблем
329
331
 
330
332
  | Симптом | Что проверить |
package/README.zh.md CHANGED
@@ -73,7 +73,7 @@ dsh web
73
73
 
74
74
  | DSH 内核 | 插件版本 | 设置入口 |
75
75
  | --- | --- | --- |
76
- | 0.2.2-rc.1、0.2.1-rc.2、0.2.1-alpha.1 | 0.20.0 已验证 | **插件 → dsh-client-auto-continue** |
76
+ | 0.2.2-rc.1、0.2.1-rc.2、0.2.1-alpha.1 | 0.20.2 已验证 | **插件 → dsh-client-auto-continue** |
77
77
  | 0.2.0-rc.1 | 0.12.1 及以上 | **插件 → dsh-client-auto-continue** |
78
78
  | 0.1.7-rc.2 | 0.11.9 及以上 | **插件 → dsh-client-auto-continue** |
79
79
  | 仅有旧版设置 API 的宿主 | 旧版界面 | **设置 → 插件 → 插件配置** |
@@ -281,7 +281,7 @@ dsh plugin --profile web remove dsh-client-auto-continue
281
281
  | 短句长度上限 (字符) | `loopShortChars` | `40` | 短于此长度的消息计为短句 |
282
282
  | 短句时间窗 (ms) | `loopWindowMs` | `30000` | 统计短句的时间窗,最小 1000 |
283
283
  | 连续短句阈值 | `loopShortCount` | `12` | 时间窗内连续多少条短句且没有工具调用时打断 |
284
- | 相同消息重复次数 | `loopRepeatText` | `4` | 连续相同消息(或单条流式消息内的重复段落)达到此数时打断 |
284
+ | 相同消息重复次数 | `loopRepeatText` | `4` | 连续相同消息(或单条流式消息内的重复段落)达到此数时打断。另外,单条流式消息最近 40 段(或行)里不同的文本不超过 8 种时一律打断,短句 `A / B / A / B` 交替刷屏也能拦住 |
285
285
  | 同工具重复次数 | `loopToolRepeat` | `5` | 工具、参数和结果都相同的连续调用达到此数时打断 |
286
286
 
287
287
  ### 状态与日志
@@ -323,6 +323,8 @@ dsh plugin --profile web remove dsh-client-auto-continue
323
323
 
324
324
  **无法读取的会话。** 启动扫描时如果某个会话的历史读不出来,会跳过它并记录错误,其他会话照常恢复([#58](https://github.com/HsiangNianian/dsh-auto-continue/issues/58))。修复后在扫描时间窗内重启 DSH 即可重试。
325
325
 
326
+ **冷读配额。** 已存储的会话要按整份日志裁决,所以扫描为每个会话解码一次完整历史。为了不让会话很多的环境把宿主堆打满,一个宿主实例最多冷读 32 个会话日志,最近活动过的优先。顺序取自投影检查点缓存(`timeContext.lastMessageTime`,其次 `sessionListMetadata.lastPromptAt`),没有检查点时按会话创建时间。每个会话只计一次,读取重试不重复扣配额。每次启动的顺序都一样,所以超出配额的会话是被跳过而不是排队等下次:它们是最久没有活动的那些,新鲜窗口(默认 15 分钟)对它们几乎总是早已过去。检查点只会落后于日志、不会超前,因此只用来排序:是否新鲜仍然由日志尾部的事件决定。
327
+
326
328
  ## 常见问题
327
329
 
328
330
  | 现象 | 排查 |
@@ -0,0 +1,39 @@
1
+ A fix for hosts that crash on startup when the profile has a lot of saved sessions
2
+
3
+ ## Startup no longer runs out of memory
4
+
5
+ Reported and fixed by @anthonyhann in [#91](https://github.com/HsiangNianian/dsh-auto-continue/pull/91)
6
+
7
+ When DSH starts, the plugin looks through saved sessions for ones that were cut off by the restart. To decide, it read each session's whole log, and only then checked whether the last turn was recent enough to resume (15 minutes by default). On a profile with a few hundred sessions that's gigabytes of decoding. On their machine the host ran out of memory, restarted, tried again, and never came up
8
+
9
+ Now one start reads at most 32 saved sessions, the most recently active first
10
+
11
+ - The order comes from DSH's session checkpoint cache, or the session's creation time if there's no cache
12
+ - The cache only decides the order. Whether a session gets resumed is still decided by what's at the end of its log, same as before
13
+ - A session whose read fails and is retried only counts once
14
+ - Sessions past the 32 are skipped. They're the ones that have been idle longest, so they're almost always outside the 15-minute window anyway
15
+
16
+ Live sessions and subagent sessions aren't affected
17
+
18
+ ## Upgrade
19
+
20
+ Let current work finish, stop DSH, then update the profile you use
21
+
22
+ ```bash
23
+ dsh plugin --profile web add dsh-client-auto-continue@0.20.1
24
+ dsh web
25
+ ```
26
+
27
+ Desktop app users should update through the app's Plugins page and restart the app, since it uses its own profile
28
+
29
+ No settings changed
30
+
31
+ ## Validation
32
+
33
+ - Typecheck, build (committed `lib/` reproduces byte for byte), the full regression suite and the DSH runtime compatibility tests
34
+ - New tests cover stopping at 32 reads with the most recently active sessions first, and a few broken logs being retried without pushing healthy sessions out of the budget
35
+ - @anthonyhann measured it against a real profile with 903 saved sessions: the 32 most recent hold 3.3 MB of compressed logs, and the six largest logs (7 to 23 MB each) have no checkpoint, sort last, and aren't read at startup
36
+
37
+ Thanks @anthonyhann for tracking this down with heap numbers instead of just a "it crashes" report
38
+
39
+ **Full changes:** https://github.com/HsiangNianian/dsh-auto-continue/compare/v0.20.0...v0.20.1
@@ -0,0 +1,49 @@
1
+ The loop guard now catches a model that gets stuck repeating short lines
2
+
3
+ ## Short-line floods get cut off
4
+
5
+ Reported by @Baka999 in [#93](https://github.com/HsiangNianian/dsh-auto-continue/issues/93), with the full event log of the session
6
+
7
+ A model stuck on a web form spent a minute and a half streaming one message, 92k characters of this:
8
+
9
+ ```
10
+ Then: fill domain, go.
11
+
12
+ Writing.
13
+ ```
14
+
15
+ The loop guard never fired. The check added for [#37](https://github.com/HsiangNianian/dsh-auto-continue/issues/37) only counted long paragraphs (40+ characters) repeated back to back. These lines are short, and they alternate, so no two neighbours ever match
16
+
17
+ Now the guard also looks at the last 40 paragraphs of the message being streamed. If 8 or fewer of them are different, the turn is cancelled and restarted with the loop text, like any other loop
18
+
19
+ - It doesn't matter how short the lines are or whether the repeats are next to each other
20
+ - If the model never writes a blank line, the lines of the runaway block are counted instead
21
+ - Lines with no letters or digits (`---`, code fences, lone braces) are ignored, so a long markdown report doesn't look like a loop
22
+ - The old check for long repeated paragraphs still works the same
23
+
24
+ The loop guard is on by default. If you turned it off, nothing changes
25
+
26
+ ## Upgrade
27
+
28
+ Let current work finish, stop DSH, then update the profile you use
29
+
30
+ ```bash
31
+ dsh plugin --profile web add dsh-client-auto-continue@0.20.2
32
+ dsh web
33
+ ```
34
+
35
+ Desktop app users should update through the app's Plugins page and restart the app, since it uses its own profile
36
+
37
+ No settings changed
38
+
39
+ ## Validation
40
+
41
+ - Typecheck, build (committed `lib/` reproduces byte for byte), the full regression suite and the DSH runtime compatibility tests
42
+ - Simulated hosts with default settings: the A/B flood with blank lines and with single newlines, and one short line repeated, all get cancelled. A long report with repeated rules, code fences and `Done.` lines, plus a 300-row table, does not
43
+ - Replayed against 0.20.1, none of those floods were cancelled
44
+
45
+ The other thing in #93, picking a turn back up when it ends on a broken tool call written out as text, is a separate feature and isn't in this release
46
+
47
+ Thanks @Baka999 for the detailed report. The line counts and the replay made this a quick fix
48
+
49
+ **Full changes:** https://github.com/HsiangNianian/dsh-auto-continue/compare/v0.20.1...v0.20.2