dsh-client-auto-continue 0.14.3 → 0.16.0
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 +35 -0
- package/README.md +44 -22
- package/README.zh.md +44 -22
- package/docs/releases/v0.16.0.md +75 -0
- package/docs/third-party-notices.md +19 -0
- package/lib/client.js +196 -49
- package/lib/client.js.map +2 -2
- package/lib/index.js +7776 -104
- package/lib/types/client/bridge.d.ts +4 -0
- package/lib/types/client/composer-toggle.d.ts +6 -4
- package/lib/types/client/index.d.ts +2 -2
- package/lib/types/client/locales.d.ts +21 -0
- package/lib/types/client/settings-card.d.ts +6 -4
- package/lib/types/host/engine.d.ts +29 -1
- package/lib/types/host/settings-migration.d.ts +14 -0
- package/lib/types/index.d.ts +22 -8
- package/lib/types/shared/core.d.ts +24 -1
- package/package.json +21 -13
- package/src/client/bridge.ts +43 -4
- package/src/client/composer-toggle.tsx +20 -12
- package/src/client/index.ts +5 -2
- package/src/client/locales.ts +56 -14
- package/src/client/settings-card.tsx +58 -18
- package/src/client/styles.ts +5 -1
- package/src/host/engine.ts +307 -24
- package/src/host/settings-migration.ts +117 -0
- package/src/index.ts +66 -12
- package/src/shared/core.ts +42 -1
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
## [0.16.0](https://github.com/HsiangNianian/dsh-auto-continue/releases/tag/v0.16.0) — 2026-10-23
|
|
4
|
+
|
|
5
|
+
### Added
|
|
6
|
+
|
|
7
|
+
- Choose **Off**, **Recovery only** or **Autonomous loop** for each conversation from the control beside the message input, or use **Follow default** to inherit the profile setting ([#67](https://github.com/HsiangNianian/dsh-auto-continue/issues/67), [#68](https://github.com/HsiangNianian/dsh-auto-continue/pull/68))
|
|
8
|
+
- Save conversation modes on the host so they survive restarts and sync across tabs, with English and Chinese labels
|
|
9
|
+
|
|
10
|
+
### Changed
|
|
11
|
+
|
|
12
|
+
- The composer control now changes only the current conversation, while **Enable auto-continue globally** and **Default session mode** live in the plugin settings
|
|
13
|
+
- Existing global pause and autonomous-loop preferences remain in effect for conversations following the default
|
|
14
|
+
- Switching a conversation Off cancels pending automatic sends and excludes it from the loop guard, while leaving any current turn running
|
|
15
|
+
- Switching from Autonomous loop to Recovery only cancels pending autonomous followups, and re-enabling a mode does not revive cancelled sends
|
|
16
|
+
- **Resume now** still requests one manual followup while paused or Off without changing the saved mode
|
|
17
|
+
|
|
18
|
+
### Fixed
|
|
19
|
+
|
|
20
|
+
- Avoid duplicate settings namespaces on hosts exposing both legacy and profile settings APIs, addressing the `settings/conflict` save failure reported in [#64](https://github.com/HsiangNianian/dsh-auto-continue/issues/64) ([#65](https://github.com/HsiangNianian/dsh-auto-continue/pull/65))
|
|
21
|
+
- Import old auto-continue settings from `settings-legacy.yaml` once per profile, keeping explicit profile values and concurrent edits, leaving the source file untouched and preventing old values from returning after a full settings reset
|
|
22
|
+
- Hold automatic recovery and the loop guard while a required settings import is pending or fails, without waiting for an editor when there is nothing to import
|
|
23
|
+
- Keep legacy YAML source text out of parser warnings and errors, and retain the bundled parser's ISC license
|
|
24
|
+
|
|
25
|
+
### Maintenance
|
|
26
|
+
|
|
27
|
+
- Align the DSH development packages on `0.1.2-rc.1`, Cordis on `4.0.2` and Schemastery on `3.18.2`, removing the mixed dependency versions left by a partial update ([#66](https://github.com/HsiangNianian/dsh-auto-continue/pull/66))
|
|
28
|
+
- Add regression coverage for conversation modes, delayed sends, settings persistence and migration failures
|
|
29
|
+
- Publish GitHub release bodies from checked-in notes and fail before publishing if the notes file is missing or empty
|
|
30
|
+
|
|
31
|
+
[Upgrade instructions, validation and known limits](docs/releases/v0.16.0.md) · [Full changes](https://github.com/HsiangNianian/dsh-auto-continue/compare/v0.15.0...v0.16.0)
|
|
32
|
+
|
|
33
|
+
## Earlier releases
|
|
34
|
+
|
|
35
|
+
Release notes for v0.15.0 and earlier are available on [GitHub Releases](https://github.com/HsiangNianian/dsh-auto-continue/releases)
|
package/README.md
CHANGED
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
</p>
|
|
27
27
|
|
|
28
28
|
<p align="center">
|
|
29
|
-
<b>English</b> · <a href="README.zh.md">中文</a>
|
|
29
|
+
<b>English</b> · <a href="README.zh.md">中文</a> · <a href="CHANGELOG.md">Changelog</a>
|
|
30
30
|
</p>
|
|
31
31
|
|
|
32
32
|
---
|
|
@@ -44,15 +44,15 @@ Automatic recovery for [DeepSeek Harness](https://github.com/deepseek-ai/deepsee
|
|
|
44
44
|
|
|
45
45
|
**Smart recovery** (all configurable):
|
|
46
46
|
|
|
47
|
-
- **
|
|
47
|
+
- **Session modes** — choose Off, Recovery only or Autonomous loop beside the message input, for that conversation only. Follow default inherits the profile setting. 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
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
|
|
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.
|
|
54
|
-
- **Autonomous loop** — off by default (`resumeCompletedTurns`). When enabled, normally completed turns continue after the grace period, without the recovery cooldown or attempt cap. Reasoning-only turns and explicit `no-visible-output` endings still consume the recovery budget and obey backoff. Global pause, session pause, manual Stop
|
|
55
|
-
- **Pause** — turning off **
|
|
54
|
+
- **Autonomous loop** — off by default (`resumeCompletedTurns`). When enabled, normally completed turns continue after the grace period, without the recovery cooldown or attempt cap. Reasoning-only turns and explicit `no-visible-output` endings still consume the recovery budget and obey backoff. Global pause, a session pause, manual Stop or changing that session to Recovery only / Off stops the loop. The profile default only affects sessions using Follow default. Its prompt is separate from the loop guard’s prompt (`continueTextLoop`, default `Continue`).
|
|
55
|
+
- **Pause** — turning off **Enable auto-continue globally** in **General** and saving stops automatic sends from live events and startup scanning; per-session pauses (e.g. via a notification button) suspend only one session until they expire. **Resume now** requests one send even when both pauses are active. It leaves the pauses in place, so later automatic recovery and autonomous-loop sends remain paused
|
|
56
56
|
- **Notification buttons** — notifications carry **Resume now** (send immediately, ignoring cooldown, the consecutive cap and any pause) and **Pause this session 1h** actions
|
|
57
57
|
- **Loop guard** — watches **running** turns too. Four signals trip the guard, which cancels the turn and restarts it with a configurable loop text ("stop repeating, try another way"): the model repeating the **exact same message** several times (any length — e.g. "Let me test variants of the regex…" ×7), repeated near-duplicate paragraphs **inside one streamed assistant message**, many short messages inside a short time window with no tool call in between (the "Let me read…" spin), or the same tool called repeatedly with the **same arguments and the same results** (a changed argument or result counts as progress). The cancel carries an internal marker so it is never confused with a user stop — the restart only happens for guard-initiated cancels. Thresholds, the time window and the loop text are configurable
|
|
58
58
|
- **Stats panel** — the settings card shows today's auto-continue count, recoveries, failures, permanent skips, give-ups and loop breaks, broken down by error code, with a one-click reset
|
|
@@ -78,11 +78,13 @@ Subagent sessions stay under their parent agent's control. The plugin skips them
|
|
|
78
78
|
|
|
79
79
|
The host-side engine subscribes to the session event firehose inside the dsh host process — one engine shared by every browser tab. On an interruption it waits a **grace period** (default 3 s) — if the host starts a new turn by itself (`turn/start`), the auto-continue is cancelled — then sends the configured text through the agent registry (`agent.followup`, the same queue the Send button uses). When that queue already contains turns, the engine promotes only its newly inserted continuation before the host wakes the agent; it does not remove or reorder the queued user turns.
|
|
80
80
|
|
|
81
|
-
On host boot it also scans the live sessions: a session whose last turn ended with a non-human reason **within the scan window** (default 15 minutes), with no later `turn/start` or user message, gets resumed automatically too (e.g. the host crashed while the browser was closed — the agent-loop resumes the session and the engine picks it up).
|
|
81
|
+
On host boot it also scans the live sessions: a session whose last turn ended with a non-human reason **within the scan window** (default 15 minutes), with no later `turn/start` or user message, gets resumed automatically too (e.g. the host crashed while the browser was closed — the agent-loop resumes the session and the engine picks it up). Persisted sessions the host never reloaded are enumerated from session storage and materialized into the registry first; a journal that stopped mid-turn is completed with an interrupted marker on read, so restart-orphaned turns are recovered the same way.
|
|
82
|
+
|
|
83
|
+
Storage scanning runs separately from live-session recovery. Each storage read has a five-second timeout, and the scan yields every 16 observations without waiting for the next polling interval. This lets recently interrupted sessions deep in the storage listing be reached within the startup window. Recovery restores the session's preset and recorded model; stopping the plugin cancels pending storage work.
|
|
82
84
|
|
|
83
85
|
Startup recovery isolates failures per session. If history cannot be read or contains invalid events, that session is skipped for the current startup scan and an error is logged; other sessions can still recover, without losing a recovery slot. Invalid entries are not silently removed, since they could hide a manual stop or a newer turn. Valid empty histories and a registry that is still loading remain retryable within the scan window. Reloading a repaired session as a new session object also makes it eligible for scanning again. See [#58](https://github.com/HsiangNianian/dsh-auto-continue/issues/58).
|
|
84
86
|
|
|
85
|
-
The browser provides the settings card and
|
|
87
|
+
The browser provides the settings card and session mode selector, plus a status bridge that shows notifications (with Resume now / Pause this session 1h buttons, routed back to the host engine) and feeds the card's stats / paused-sessions panels.
|
|
86
88
|
|
|
87
89
|
### Recovery workflow
|
|
88
90
|
|
|
@@ -98,13 +100,13 @@ DSH plugins install into a **profile** (`dsh web` → `web` profile). The comman
|
|
|
98
100
|
|
|
99
101
|
| DSH runtime | Plugin version | Configuration entry point |
|
|
100
102
|
| --- | --- | --- |
|
|
101
|
-
| **0.2.1-rc.2** | **0.
|
|
102
|
-
| **0.2.1-alpha.1** | **0.
|
|
103
|
+
| **0.2.1-rc.2** | **0.16.0 verified** | **Plugins → dsh-client-auto-continue** |
|
|
104
|
+
| **0.2.1-alpha.1** | **0.16.0 verified** | **Plugins → dsh-client-auto-continue** |
|
|
103
105
|
| **0.2.0-rc.1** | **0.12.1 or newer** | **Plugins → dsh-client-auto-continue** |
|
|
104
106
|
| **0.1.7-rc.2** | **0.11.9 or newer** | Same Plugins page |
|
|
105
107
|
| Older hosts with the legacy settings API | Legacy UI retained | **Settings → Plugins → Plugin configuration** |
|
|
106
108
|
|
|
107
|
-
DSH 0.1.0-rc.6 and earlier are unsupported. Automated settings and compatibility checks cover **0.1.7-rc.2**, **0.2.0-rc.1** and **0.2.1-
|
|
109
|
+
DSH 0.1.0-rc.6 and earlier are unsupported. Automated settings and compatibility checks cover **0.1.7-rc.2**, **0.2.0-rc.1**, **0.2.1-alpha.1** and **0.2.1-rc.2**; startup failure isolation is also checked against **0.2.0-rc.2** and **0.2.1-alpha.1**. Desktop app versions and embedded DSH runtime versions are different; use the runtime version when checking compatibility. For the CLI, run `dsh --version`; see [official DSH releases](https://github.com/deepseek-ai/deepseek-harness/releases) for available versions.
|
|
108
110
|
|
|
109
111
|
**Plugins 0.11.9 and 0.12.0 are rejected by DSH 0.2.0-rc.1’s version check.** Upgrade the plugin to 0.12.1 or newer; its existing configuration-form integration works on this runtime. See [#50](https://github.com/HsiangNianian/dsh-auto-continue/issues/50).
|
|
110
112
|
|
|
@@ -171,6 +173,10 @@ A manual loader entry can start the engine without registering a bundle in the *
|
|
|
171
173
|
|
|
172
174
|
The `include:auto-continue` label in **Built-in plugins** is a normal loader prefix. It does not, by itself, indicate a legacy install or a duplicate engine.
|
|
173
175
|
|
|
176
|
+
For hosts that expose both modern profile config and the legacy settings API ([#64](https://github.com/HsiangNianian/dsh-auto-continue/issues/64)), the plugin uses profile config without registering a second settings namespace. It imports the `auto-continue` section of `$DSH_HOME/settings-legacy.yaml` once per profile, including the saved pause and custom prompts. Existing profile values take precedence. The original file and other plugins' sections stay untouched; completion is recorded separately from editable settings so even a whole-config reset stays reset after restarting.
|
|
177
|
+
|
|
178
|
+
Recovery and the loop guard wait while this import is pending. If the legacy file cannot be read or validated, or the profile cannot be saved, the host logs an import error and keeps both held. Repair the file or profile permissions and restart the host. Hosts that only support the legacy API continue using their existing settings store.
|
|
179
|
+
|
|
174
180
|
### Verify & uninstall
|
|
175
181
|
|
|
176
182
|
```bash
|
|
@@ -195,15 +201,24 @@ dsh web
|
|
|
195
201
|
|
|
196
202
|
---
|
|
197
203
|
|
|
198
|
-
##
|
|
204
|
+
## Session modes
|
|
205
|
+
|
|
206
|
+
The **Auto-continue** selector beside the input applies only to the current conversation and saves immediately:
|
|
207
|
+
|
|
208
|
+
| Mode | Behavior |
|
|
209
|
+
| --- | --- |
|
|
210
|
+
| Follow default | Use **Default session mode** from the plugin settings, initially Recovery only |
|
|
211
|
+
| Off | No automatic followups or loop-guard interruptions in this conversation |
|
|
212
|
+
| Recovery only | Recover eligible failures and silent turns; leave normal completions alone |
|
|
213
|
+
| Autonomous loop | Also continue normally completed turns, using the loop prompt |
|
|
199
214
|
|
|
200
|
-
|
|
215
|
+
For example, keep A looping, B recovering failures and C off. Each conversation's choice is saved in the host's profile settings (`sessionModes`), shared across tabs and retained after a host restart. Choosing Follow default explicitly removes that conversation's independent policy, including an inherited override.
|
|
201
216
|
|
|
202
|
-
|
|
217
|
+
**Enable auto-continue globally** in **General** remains the master control. Turning it off pauses all automatic followups without replacing individual choices; turning it back on restores those choices. Switching a conversation off cancels pending grace, cooldown and loop-guard retries. It leaves any current turn running. Switching Loop to Recovery only cancels pending autonomous followups. Re-enabling does not resurrect cancelled sends.
|
|
203
218
|
|
|
204
|
-
**
|
|
219
|
+
The notification's **Pause this session 1h** still temporarily suspends one conversation. **Resume now** requests a single send even while paused or Off, without changing the stored mode. The global loop-guard setting remains independent of global pause, but a conversation set to Off is excluded from the guard too.
|
|
205
220
|
|
|
206
|
-
To hide the
|
|
221
|
+
To hide the selector, open **Plugins → dsh-client-auto-continue → General**, turn off **Show session mode in the composer**, then **Save**. This only changes visibility (`showComposerToggle`, default `true`). Hosts without the composer slot retain the settings card. The selector stays disabled while the host bridge or writable settings service is unavailable.
|
|
207
222
|
|
|
208
223
|
## Configuration
|
|
209
224
|
|
|
@@ -211,7 +226,9 @@ On **DSH 0.1.7 / 0.2**, open **Plugins** from the main sidebar, choose **dsh-cli
|
|
|
211
226
|
|
|
212
227
|

|
|
213
228
|
|
|
214
|
-
Use **General**, **Retry strategy**, **Startup recovery**, **Continue text**, **Safety**, and **Status and logs** to find controls. Switching categories preserves unsaved changes. **Status and logs** contains today's activity and paused sessions.
|
|
229
|
+
Use **General**, **Retry strategy**, **Startup recovery**, **Continue text**, **Safety**, and **Status and logs** to find controls. Switching categories preserves unsaved changes. **Status and logs** contains today's activity, recent recovery attempts and paused sessions.
|
|
230
|
+
|
|
231
|
+
**Recent recovery attempts** groups the last 20 recovery prompts across the host by session, showing each session's count in that window, latest cause, time and consecutive count at the last send. It works with browser notifications off. Causes distinguish silent output, output limits, request errors, restart interruptions, loop-guard recovery and manual resume. Normal autonomous continuations are excluded. These are sent prompts, not proof of completion or a model-health score; repeated recovery is a reason to inspect the conversation and consider a handoff. The history contains no message text and resets when the plugin restarts.
|
|
215
232
|
|
|
216
233
|
The header places the plugin status and GitHub invitation side by side on one shared charcoal background. The status shows the saved global setting; edits take effect when you click **Save**.
|
|
217
234
|
|
|
@@ -234,6 +251,7 @@ The browser mirrors DSH's active language into the internal `locale` field. Leav
|
|
|
234
251
|
resumeCompletedTurns: false
|
|
235
252
|
continueTextSilent: ''
|
|
236
253
|
continueTextLoop: ''
|
|
254
|
+
continueTextInterrupted: ''
|
|
237
255
|
continueTextMaxTokens: ''
|
|
238
256
|
guardTools: true
|
|
239
257
|
guardPendingText: ''
|
|
@@ -280,7 +298,7 @@ When migrating from the legacy settings file to DSH 0.1.7 / 0.2, move these valu
|
|
|
280
298
|
- Edits are **staged** — nothing reaches the disk until you hit **Save**; the footer indicates pending changes, and **Discard** drops them
|
|
281
299
|
- If you edit or reset a field while a save is in progress, the newer draft stays in the card. Click **Save** again after the current save finishes to apply it
|
|
282
300
|
- An overridden field shows a **Reset to default** button that removes the override and restores the inherited value (normally the built-in default)
|
|
283
|
-
- Boolean fields use native switches and are staged until Save. **Reset to default** removes the override and restores the inherited value. **
|
|
301
|
+
- Boolean fields use native switches and are staged until Save. **Reset to default** removes the override and restores the inherited value. **Enable auto-continue globally** is on when recovery is enabled (`paused: false`)
|
|
284
302
|
- Invalid drafts (non-numbers, values below the minimum) block the save and mark their category, even when another category is selected
|
|
285
303
|
- In a read-only deployment the card shows the stored values but disables editing while keeping category navigation available
|
|
286
304
|
- Changes apply immediately after Save and persist in the active profile config (or `~/.dsh/settings.yaml` on older hosts)
|
|
@@ -295,13 +313,14 @@ When migrating from the legacy settings file to DSH 0.1.7 / 0.2, move these valu
|
|
|
295
313
|
| Field | Default | Description |
|
|
296
314
|
| --- | --- | --- |
|
|
297
315
|
| Pause auto-continue | `off` | Global pause: no live or scan auto-send fires, queued pending sends are cancelled |
|
|
298
|
-
| Show
|
|
316
|
+
| Show session mode in the composer | `on` | Show the session selector (`showComposerToggle`); hiding it does not change modes |
|
|
299
317
|
| Continue text | `Continue` | Text automatically sent after an interruption |
|
|
300
318
|
| Continue text (max tokens) | `Continue` | Text sent when the output token ceiling is reached (same placeholders) |
|
|
301
319
|
| Resume silent turns | `on` | Resume a turn that ended normally with reasoning only (no text, no tool call); does not reset the consecutive count |
|
|
302
320
|
| Continue text (silent turn) | `Continue. Your previous turn ended with internal reasoning only, ...` | Text sent to resume a silent turn (same placeholders) |
|
|
303
|
-
|
|
|
321
|
+
| Default session mode | Recovery only | For sessions following the default; stored as `resumeCompletedTurns` (`false` = Recovery only, `true` = Autonomous loop) |
|
|
304
322
|
| Continue text (autonomous loop) | `Continue` | Text sent on each autonomous-loop resume (same placeholders) |
|
|
323
|
+
| Continue text (harness restart) | `Continue. The harness was restarted while your previous turn was still running; …` | Text sent when the boot scan resumes a session that a harness restart closed mid-turn (same placeholders) |
|
|
305
324
|
| Idempotency guard | `on` | Inspect the last tool call before resuming and steer the model (see What It Does) |
|
|
306
325
|
| Loop guard | `on` | Detect a running turn spinning in place and restart it (see What It Does) |
|
|
307
326
|
| Short-sentence max (chars) | `40` | A model message shorter than this counts as a short sentence (spinning signal) |
|
|
@@ -338,7 +357,7 @@ For a provider-specific error that is safe to resume (confirm first that manuall
|
|
|
338
357
|
|
|
339
358
|
Patterns are literal substrings, not regular expressions. Blank lines are ignored; any matching line wins before the built-in permanent-error rules. Cooldown and consecutive-attempt limits still apply.
|
|
340
359
|
|
|
341
|
-
`continueText` (and `continueTextMaxTokens`, `continueTextSilent`, `continueTextLoop`) accept the placeholders `{code}`, `{message}`, `{status}`, `{tool}` (last tool call before the failure), `{turn}`, `{errorCount}` (consecutive failures including this one) and `{elapsed}` (time since the failure, e.g. `1m5s`) — e.g. `Continue ({tool}: {code})` becomes `Continue (git push: UPSTREAM)`. The guard texts accept `{tool}` and `{result}` (a truncated excerpt of the last tool output). The host engine currently leaves `{sessionTitle}` empty.
|
|
360
|
+
`continueText` (and `continueTextMaxTokens`, `continueTextSilent`, `continueTextLoop`, `continueTextInterrupted`) accept the placeholders `{code}`, `{message}`, `{status}`, `{tool}` (last tool call before the failure), `{turn}`, `{errorCount}` (consecutive failures including this one) and `{elapsed}` (time since the failure, e.g. `1m5s`) — e.g. `Continue ({tool}: {code})` becomes `Continue (git push: UPSTREAM)`. `continueTextInterrupted` is sent when the boot scan resumes a session that a harness restart had closed mid-turn; its default explains the restart and asks the model to verify external state before retrying. The guard texts accept `{tool}` and `{result}` (a truncated excerpt of the last tool output). The host engine currently leaves `{sessionTitle}` empty.
|
|
342
361
|
|
|
343
362
|
---
|
|
344
363
|
|
|
@@ -349,7 +368,7 @@ The recovery engine runs inside the DSH host. The browser provides the configura
|
|
|
349
368
|
- The engine reads session events and history through DSH's services. The browser talks to that host; the plugin adds no third-party service or credential store
|
|
350
369
|
- Recovery sends your configured text through `agent.followup`. The loop guard can cancel a looping turn through `agent.cancel` before sending its recovery prompt. Resumed agents continue with the session's existing tools and permissions
|
|
351
370
|
- Saving configuration uses DSH's settings API: the active profile patch on DSH 0.1.7 / 0.2, or `~/.dsh/settings.yaml` on older hosts
|
|
352
|
-
- Retry counters, cooldown timestamps,
|
|
371
|
+
- Retry counters, cooldown timestamps, timed notification pauses and stats stay in host process memory and reset when the engine restarts. Session mode choices (`sessionModes`) and global `paused` are saved with your other configuration
|
|
353
372
|
- Browser notifications are opt-in (`notify` setting). Enabling and saving can request browser permission; denied permission is not requested again. Turning the option off never requests permission.
|
|
354
373
|
|
|
355
374
|
---
|
|
@@ -364,6 +383,7 @@ npm ci --prefix tests/fixtures/dsh-0.1.7
|
|
|
364
383
|
npm ci --prefix tests/fixtures/dsh-0.2.0
|
|
365
384
|
npm ci --prefix tests/fixtures/dsh-0.2.0-rc.2
|
|
366
385
|
npm ci --prefix tests/fixtures/dsh-0.2.1
|
|
386
|
+
npm ci --prefix tests/fixtures/dsh-0.2.1-rc.2
|
|
367
387
|
npm run typecheck
|
|
368
388
|
npm run build
|
|
369
389
|
npm test
|
|
@@ -372,6 +392,10 @@ npm run test:runtime
|
|
|
372
392
|
|
|
373
393
|
`npm test` covers recovery, autonomous-loop limits and toggles, child-session exclusion, manual resume during pauses, startup scanning and malformed-session isolation, queue ordering, statistics, localization, settings UI lifecycle and edits made during pending saves. `npm run test:runtime` uses published DSH **0.1.7-rc.2**, **0.2.0-rc.1** and **0.2.1-alpha.1** Settings, Loader and HTTP services. It also runs the actual 0.2 profile compatibility gate and checks client activation when one settings provider is absent. Startup recovery tests inject session read failures into real **0.2.0-rc.2** and **0.2.1-alpha.1** Session/Cordis/HTTP components and verify that healthy sessions still recover. These controlled faults do not imply that normal DSH loading produces malformed logs. The runtime harness controls agent events; it does not send requests to a model provider.
|
|
374
394
|
|
|
395
|
+
The rc.2 check also loads the published client settings service and verifies card save/reset, per-session composer choices, concurrent saves, disk reloads, locale synchronization and a fresh Host read, using snapshots without the removed `mode` field.
|
|
396
|
+
|
|
397
|
+
The rc.2 restart test uses real agent, query, and JSONL persistence services: it kills a host mid-turn, starts a fresh host without opening the conversation, and checks one recovery with the recorded model and matching prompt variables. The model adapter is deterministic; no external model requests are made.
|
|
398
|
+
|
|
375
399
|
After editing a linked checkout, run `npm run build` to write the updated `lib/` files, then restart DSH and refresh the browser. Hosts with client HMR enabled can reload a rebuilt client bundle automatically.
|
|
376
400
|
|
|
377
401
|
CI typechecks, rebuilds, runs both test suites, verifies committed `lib/` artifacts and runs [dsh-plugin-check](https://github.com/omdsh-dev/dsh-plugin-check). The same checks gate releases. See [screenshot capture notes](docs/screenshots/README.md) when updating the UI documentation.
|
|
@@ -398,5 +422,3 @@ CI typechecks, rebuilds, runs both test suites, verifies committed `lib/` artifa
|
|
|
398
422
|
[](LICENSE)
|
|
399
423
|
|
|
400
424
|
MIT © Hsiang Nianian
|
|
401
|
-
|
|
402
|
-
The rc.2 check also loads the published client settings service and verifies card save/reset, the composer toggle, locale synchronization and a fresh Host read, using snapshots without the removed `mode` field.
|
package/README.zh.md
CHANGED
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
</p>
|
|
27
27
|
|
|
28
28
|
<p align="center">
|
|
29
|
-
<a href="README.md">English</a> · <b>中文</b>
|
|
29
|
+
<a href="README.md">English</a> · <b>中文</b> · <a href="CHANGELOG.md">更新日志</a>
|
|
30
30
|
</p>
|
|
31
31
|
|
|
32
32
|
---
|
|
@@ -44,15 +44,15 @@
|
|
|
44
44
|
|
|
45
45
|
**智能恢复**(全部可配置):
|
|
46
46
|
|
|
47
|
-
-
|
|
47
|
+
- **会话模式** — 在输入框旁为当前会话选择关闭、仅故障恢复或自主循环;跟随默认会继承设置页中的默认模式。选择保存在宿主配置里,重启后保留,并同步到其他标签页。隐藏控件不会改变模式
|
|
48
48
|
- **错误分类** — 临时性错误(网络 / 超时 / 5xx / 429 等)自动续跑; 永久性错误跳过并通知, 因为重试也没用。判定为永久性的条件: HTTP 状态码 401/403, 或 code/message 命中认证、凭据/API Key、余额/配额、模型不存在、上下文长度/超限等关键词。provider 专属例外可由用户显式填写普通文本匹配; 关闭分类后则全部自动继续
|
|
49
49
|
- **自适应退避** — 连续失败时等待时间递增(冷却 × 系数: 20s → 40s → 80s…), 有上限, 不再对故障上游狂轰滥炸
|
|
50
50
|
- **中英文本地化** — 设置卡片、内置续跑 / 护栏 / 循环文案以及浏览器通知都跟随 DSH 当前界面语言(初始值来自浏览器语言)。只支持 `en` 和 `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` 标记。关闭开关会取消排队中的静默续跑;即使开关关闭,静默回合也不会清零重试上限。
|
|
54
|
-
- **自主循环** — 默认关闭(`resumeCompletedTurns`)。开启后,正常完成的回合经过宽限期便会续跑,不受恢复冷却和次数上限约束。仅有推理的回合和显式 `no-visible-output`
|
|
55
|
-
- **暂停** —
|
|
54
|
+
- **自主循环** — 默认关闭(`resumeCompletedTurns`)。开启后,正常完成的回合经过宽限期便会续跑,不受恢复冷却和次数上限约束。仅有推理的回合和显式 `no-visible-output` 仍消耗重试预算并遵守退避。全局暂停、会话暂停、手动停止或将该会话改为仅故障恢复 / 关闭都会停止循环。默认模式只影响选择了「跟随默认」的会话。自主循环使用单独的提示文本 `continueTextLoop`(默认 `继续`),与循环守卫的提示文本不同。
|
|
55
|
+
- **暂停** — 在**常规**中关闭**全局启用自动继续**并保存,会停止实时事件与启动扫描触发的自动发送; 会话级暂停(如通过通知按钮)只挂起单个会话, 到期自动恢复。即使两种暂停同时生效,通知里的 **立即续跑** 仍可发送一次。发送后保留暂停状态,后续自动恢复和自主循环仍受暂停约束
|
|
56
56
|
- **通知按钮** — 通知带 **立即续跑**(无视冷却、连续上限与暂停, 马上发送)和 **暂停该会话 1 小时** 按钮
|
|
57
57
|
- **循环守卫** — 连**运行中的回合**也盯着, 四个信号都会触发守卫(取消当前回合并用可配置的循环提示文本重启, 「停止重复, 换一种方式」): 模型**连续输出完全相同的消息**(不限长度, 如 "Let me test variants of the regex…" 连续 7 遍)、单条流式 assistant 消息内部出现连续近似重复段落、短时间内连续多条短句且期间无工具调用(典型的「Let me read…」空转)、或同一工具被连续反复调用且**参数与结果都相同**(参数或结果有变化视为有进展)。取消带有内部来源标记, 绝不会与用户手动停止混淆——只有守卫发起的取消才会重启。阈值、时间窗与提示文本都可配置
|
|
58
58
|
- **统计面板** — 设置卡片展示今日自动继续次数、恢复成功、继续后失败、永久性跳过、达上限停止、循环打断, 按错误码统计, 可一键清零
|
|
@@ -78,11 +78,13 @@
|
|
|
78
78
|
|
|
79
79
|
宿主侧引擎在 dsh 宿主进程内订阅会话事件 firehose——**多个浏览器标签页共享一个引擎**。检测到中断后先等待一个**宽限期**(默认 3 秒)——若宿主自行开启了新回合(`turn/start`), 自动继续即取消——然后经 agent 注册表(`agent.followup`, 与「发送」按钮同一个排队通道)发送配置的文本。若队列已有消息, 引擎会在宿主唤醒 agent 之前只把本次续跑消息移到队首, 不删除或重排用户消息。
|
|
80
80
|
|
|
81
|
-
宿主启动时还会扫描存活会话: 最后一个回合在**扫描时间窗**(默认 15 分钟)内以非人为原因结束、且其后没有新回合或用户消息的会话, 会被自动续跑(例如浏览器关闭期间宿主崩溃——agent-loop 恢复会话后引擎接着接手)
|
|
81
|
+
宿主启动时还会扫描存活会话: 最后一个回合在**扫描时间窗**(默认 15 分钟)内以非人为原因结束、且其后没有新回合或用户消息的会话, 会被自动续跑(例如浏览器关闭期间宿主崩溃——agent-loop 恢复会话后引擎接着接手)。宿主未重新加载的持久化会话会先从存储中枚举、物化为注册表里的 live agent; 止于轮次中间的日志在读取时会被补上一条 interrupted 标记, 重启遗留的进行中回合按同一规则恢复。
|
|
82
|
+
|
|
83
|
+
存储扫描与存活会话恢复独立运行。每次存储读取最多等待 5 秒,每观察 16 个会话让出一次事件循环,无需等待下一次轮询;较早创建但最近中断的会话也能及时被扫描。恢复时保留会话的预设与已记录的模型,卸载插件会取消尚未完成的存储操作。
|
|
82
84
|
|
|
83
85
|
启动恢复按会话隔离异常。历史无法读取或含有无效事件时,只在本次启动扫描中跳过该会话并记录错误,其他会话仍可恢复,也不会被它占用恢复名额。插件不会静默删除损坏记录,以免漏掉人工停止或更新的回合。合法的空历史、尚未就绪的会话注册表仍会在扫描窗口内重试;修复后的会话若重新加载为新的 Session 对象,也可再次参与扫描。详见 [#58](https://github.com/HsiangNianian/dsh-auto-continue/issues/58)。
|
|
84
86
|
|
|
85
|
-
|
|
87
|
+
浏览器负责设置卡片、会话模式选择和一条状态桥(展示通知, 带「立即续跑 / 暂停该会话 1 小时」按钮并把动作回传给宿主引擎; 驱动卡片里的统计与暂停面板)。
|
|
86
88
|
|
|
87
89
|
### 恢复流程
|
|
88
90
|
|
|
@@ -98,13 +100,13 @@ DSH 插件安装进 **profile**(`dsh web` 对应 `web` profile)。下面的命
|
|
|
98
100
|
|
|
99
101
|
| DSH 内核 | 插件版本 | 配置入口 |
|
|
100
102
|
| --- | --- | --- |
|
|
101
|
-
| **0.2.1-rc.2** | **已验证 0.
|
|
102
|
-
| **0.2.1-alpha.1** | **已验证 0.
|
|
103
|
+
| **0.2.1-rc.2** | **已验证 0.16.0** | **插件 → dsh-client-auto-continue** |
|
|
104
|
+
| **0.2.1-alpha.1** | **已验证 0.16.0** | **插件 → dsh-client-auto-continue** |
|
|
103
105
|
| **0.2.0-rc.1** | **0.12.1 或更新版本** | **插件 → dsh-client-auto-continue** |
|
|
104
106
|
| **0.1.7-rc.2** | **0.11.9 或更新版本** | 同上,从主侧栏的插件页进入 |
|
|
105
107
|
| 使用旧设置 API 的宿主 | 保留旧版设置界面兼容 | **设置 → 插件 → 插件配置** |
|
|
106
108
|
|
|
107
|
-
不支持 DSH 0.1.0-rc.6 及更早版本。自动化设置与兼容测试覆盖 **0.1.7-rc.2**、**0.2.0-rc.1** 和 **0.2.1-
|
|
109
|
+
不支持 DSH 0.1.0-rc.6 及更早版本。自动化设置与兼容测试覆盖 **0.1.7-rc.2**、**0.2.0-rc.1**、**0.2.1-alpha.1** 和 **0.2.1-rc.2**,另在 **0.2.0-rc.2** 和 **0.2.1-alpha.1** 上验证启动扫描的异常隔离。桌面应用版本不等于内置的 DSH 内核版本,请按内核版本判断兼容性;CLI 可运行 `dsh --version`,可用版本见 [DSH 官方 Releases](https://github.com/deepseek-ai/deepseek-harness/releases)。
|
|
108
110
|
|
|
109
111
|
**插件 0.11.9 和 0.12.0 会被 DSH 0.2.0-rc.1 的版本检查拦截。** 请升级到 0.12.1 或更新版本;现有配置表单接口可在该内核正常工作。详见 [#50](https://github.com/HsiangNianian/dsh-auto-continue/issues/50)。
|
|
110
112
|
|
|
@@ -171,6 +173,10 @@ dsh web
|
|
|
171
173
|
|
|
172
174
|
**内置插件**里显示的 `include:auto-continue` 是正常的 Loader 前缀, 单凭这个名字不能判断为旧安装或重复引擎。
|
|
173
175
|
|
|
176
|
+
对于同时提供新版 profile 配置和旧版设置 API 的宿主([#64](https://github.com/HsiangNianian/dsh-auto-continue/issues/64)),插件使用 profile 配置,不再重复注册同名设置。每个 profile 会从 `$DSH_HOME/settings-legacy.yaml` 的 `auto-continue` 段落迁移一次旧值,包括暂停状态和自定义提示词;已有的 profile 配置优先。原文件及其他插件的配置保持不变,迁移完成记录独立于可编辑的设置,即使重置全部设置,也不会在重启时再次被旧值覆盖。
|
|
177
|
+
|
|
178
|
+
迁移期间,自动恢复和循环守卫暂不执行。如果旧文件无法读取、参数校验失败或 profile 无法保存,宿主会记录迁移错误,并继续保持两者暂停。修复文件或 profile 权限后重启宿主即可重试。只支持旧版 API 的宿主继续使用原来的设置存储。
|
|
179
|
+
|
|
174
180
|
### 验证与卸载
|
|
175
181
|
|
|
176
182
|
```bash
|
|
@@ -195,15 +201,24 @@ dsh web
|
|
|
195
201
|
|
|
196
202
|
---
|
|
197
203
|
|
|
198
|
-
##
|
|
204
|
+
## 会话模式
|
|
205
|
+
|
|
206
|
+
输入框旁的**自动继续**选择器只影响当前会话,修改后立即保存:
|
|
207
|
+
|
|
208
|
+
| 模式 | 行为 |
|
|
209
|
+
| --- | --- |
|
|
210
|
+
| 跟随默认 | 使用设置页中的「默认会话模式」,初始为仅故障恢复 |
|
|
211
|
+
| 关闭 | 不自动发送继续,也不通过循环守卫打断该会话 |
|
|
212
|
+
| 仅故障恢复 | 恢复符合条件的故障和无输出回合,正常完成后不接力 |
|
|
213
|
+
| 自主循环 | 正常完成后也自动续跑,使用自主循环提示文本 |
|
|
199
214
|
|
|
200
|
-
|
|
215
|
+
例如,A 自主循环,B 仅故障恢复,C 关闭,三者互不影响。各会话的选择保存到宿主 profile 配置(`sessionModes`),跨标签页同步,宿主重启后保留。选择「跟随默认」会显式覆盖原有会话设置,包括继承来的会话设置。
|
|
201
216
|
|
|
202
|
-
|
|
217
|
+
**常规 → 全局启用自动继续**仍是总开关。关闭并保存后,所有会话停止自动续发,但各会话的选择保持不变;重新启用后继续按各自模式工作。关闭某个会话会取消宽限期、冷却期和循环守卫重启的待发送任务,正在运行的回合保持运行。从自主循环切到仅故障恢复也会取消待发送的自主续跑。重新启用不会恢复已经取消的发送。
|
|
203
218
|
|
|
204
|
-
|
|
219
|
+
通知中的**暂停该会话 1 小时**仍然临时暂停一个会话。**立即续跑**可在暂停或关闭状态下发送一次,不改变保存的模式。全局循环守卫仍独立于全局暂停,但设为关闭的会话也会退出循环守卫。
|
|
205
220
|
|
|
206
|
-
|
|
221
|
+
想隐藏选择器时,进入**插件 → dsh-client-auto-continue → 常规**,关闭**在会话区显示模式选择**,再点**保存**。这只改变显示(`showComposerToggle`,默认 `true`)。没有会话工具栏插槽的旧宿主仍可使用设置卡片。宿主桥接断开或设置不可写时,选择器不可操作。
|
|
207
222
|
|
|
208
223
|
## 配置
|
|
209
224
|
|
|
@@ -211,7 +226,9 @@ dsh web
|
|
|
211
226
|
|
|
212
227
|

|
|
213
228
|
|
|
214
|
-
|
|
229
|
+
通过**常规、重试策略、启动恢复、继续文本、安全保护、状态与日志**查找选项。切换分类会保留未保存的修改;**状态与日志**中可以查看今日统计、近期恢复尝试和已暂停会话。
|
|
230
|
+
|
|
231
|
+
**近期恢复尝试**按会话汇总宿主最近 20 次恢复提示,展示窗口内次数、最近原因、时间与最近发送时的连续次数,关闭浏览器通知也可查看。原因区分无可见输出、输出上限、请求错误、宿主重启中断、循环守卫恢复与手动续跑,不计正常自主续跑。记录只说明提示已发送,不代表任务完成,也不评估模型健康程度;反复恢复时应检查会话并考虑交接。历史不包含消息正文,重启插件后清空。
|
|
215
232
|
|
|
216
233
|
顶部的插件状态和 GitHub 邀请入口并排显示,共用一整块黑灰色背景。状态展示已保存的全局开关;修改配置后点**保存**才生效。
|
|
217
234
|
|
|
@@ -234,6 +251,7 @@ DSH 0.1.7 / 0.2 将这些值保存在当前 profile patch 的 `auto-continue`
|
|
|
234
251
|
resumeCompletedTurns: false
|
|
235
252
|
continueTextSilent: ''
|
|
236
253
|
continueTextLoop: ''
|
|
254
|
+
continueTextInterrupted: ''
|
|
237
255
|
continueTextMaxTokens: ''
|
|
238
256
|
guardTools: true
|
|
239
257
|
guardPendingText: ''
|
|
@@ -280,7 +298,7 @@ auto-continue:
|
|
|
280
298
|
- 修改是**暂存式**的——点「保存」之前不会写入磁盘; 有待保存草稿时底部显示提示, 「放弃」可丢弃草稿
|
|
281
299
|
- 保存期间继续修改或重置字段时,新的草稿会保留在卡片中;等待当前保存结束后,再点一次「保存」即可应用
|
|
282
300
|
- 有覆盖项的字段提供「恢复默认」按钮(移除覆盖项,恢复继承值,通常为内置默认值)
|
|
283
|
-
-
|
|
301
|
+
- 布尔选项使用原生开关,点保存后生效;「恢复默认」会移除覆盖项并恢复继承值。**全局启用自动继续**开启表示允许恢复(`paused: false`)
|
|
284
302
|
- 非法输入(非数字、小于最小值)会阻止保存,并标记所在分类,切换分类后仍能找到问题
|
|
285
303
|
- 只读部署中卡片只显示已存值, 编辑控件禁用,仍可切换分类查看
|
|
286
304
|
- 保存后立即生效,持久化在当前 profile 配置中(旧版宿主使用 `~/.dsh/settings.yaml`)
|
|
@@ -295,13 +313,14 @@ auto-continue:
|
|
|
295
313
|
| 字段 | 默认 | 说明 |
|
|
296
314
|
| --- | --- | --- |
|
|
297
315
|
| 暂停自动继续 | 关 | 全局暂停: 实时与扫描都不再自动发送, 已排队的待发送也会取消 |
|
|
298
|
-
|
|
|
316
|
+
| 在会话区显示模式选择 | 开 | 显示会话选择器(`showComposerToggle`);隐藏不会改变模式 |
|
|
299
317
|
| 继续文本 | `继续` | 中断后自动发送的消息内容 |
|
|
300
318
|
| 超限时的继续文本 | `继续` | 达到输出 token 上限时自动发送的文本(支持相同占位符) |
|
|
301
319
|
| 续跑无输出回合 | 开 | 回合正常结束但只有推理(没有文本、没有工具调用)时自动续跑; 不清零连续次数 |
|
|
302
320
|
| 无输出回合的继续文本 | `继续。你上一轮只输出了内部推理, ...` | 续跑无输出回合时发送的文本(支持相同占位符) |
|
|
303
|
-
|
|
|
321
|
+
| 默认会话模式 | 仅故障恢复 | 用于跟随默认的会话;沿用 `resumeCompletedTurns` 配置(`false` 为仅故障恢复,`true` 为自主循环) |
|
|
304
322
|
| 自主循环的继续文本 | `继续` | 自主循环续跑时发送的文本(支持相同占位符) |
|
|
323
|
+
| 宿主重启后恢复的继续文本 | `继续。宿主在你上一轮运行期间重启了; …` | 启动扫描恢复被重启中断的会话时发送的文本(支持相同占位符) |
|
|
305
324
|
| 幂等护栏 | 开 | 续跑前检查上一步工具调用并给出指引(见「它做什么」) |
|
|
306
325
|
| 循环守卫 | 开 | 检测运行中的回合空转并重启(见「它做什么」) |
|
|
307
326
|
| 短句长度上限 (字符) | `40` | 模型消息文本短于该值计为一条短句(空转信号) |
|
|
@@ -338,7 +357,7 @@ auto-continue:
|
|
|
338
357
|
|
|
339
358
|
匹配项是普通子串, 不是正则表达式。空行会被忽略; 任一行命中后会优先于内置永久错误规则。冷却与最大连续次数仍然生效。
|
|
340
359
|
|
|
341
|
-
`continueText`(以及 `continueTextMaxTokens`、`continueTextSilent`、`continueTextLoop`)支持占位符 `{code}`、`{message}`、`{status}`、`{tool}`(失败前最后一次工具调用)、`{turn}`、`{errorCount}`(连续失败次数, 含本次)和 `{elapsed}`(距失败经过的时间, 如 `1m5s`)——例如 `继续 ({tool}: {code})` 会变成 `继续 (git push: UPSTREAM)
|
|
360
|
+
`continueText`(以及 `continueTextMaxTokens`、`continueTextSilent`、`continueTextLoop`、`continueTextInterrupted`)支持占位符 `{code}`、`{message}`、`{status}`、`{tool}`(失败前最后一次工具调用)、`{turn}`、`{errorCount}`(连续失败次数, 含本次)和 `{elapsed}`(距失败经过的时间, 如 `1m5s`)——例如 `继续 ({tool}: {code})` 会变成 `继续 (git push: UPSTREAM)`。`continueTextInterrupted` 在启动扫描恢复被宿主重启中断的会话时发送, 默认文本会说明重启并要求先核实外部状态再重试。护栏文本支持 `{tool}` 与 `{result}`(上一步工具输出的截断摘要)。当前宿主引擎会将 `{sessionTitle}` 替换为空字符串。
|
|
342
361
|
|
|
343
362
|
---
|
|
344
363
|
|
|
@@ -349,7 +368,7 @@ auto-continue:
|
|
|
349
368
|
- 引擎通过 DSH 服务读取会话事件和历史, 浏览器与该宿主通信; 插件不新增第三方服务或凭据存储
|
|
350
369
|
- 恢复时通过 `agent.followup` 发送你配置的文本。循环守卫可先通过 `agent.cancel` 停止空转回合, 再发送恢复提示; 续跑的 Agent 沿用会话已有的工具和权限
|
|
351
370
|
- 保存配置使用 DSH 的设置 API: DSH 0.1.7 / 0.2 写入当前 profile patch, 旧版宿主写入 `~/.dsh/settings.yaml`
|
|
352
|
-
-
|
|
371
|
+
- 重试计数、冷却时间戳、通知里的限时暂停与统计保存在宿主进程内存中,引擎重启后重置;会话模式(`sessionModes`)和全局 `paused` 随其他配置持久化保存
|
|
353
372
|
- 浏览器通知是可选开启的(`notify` 设置)。开启并保存时可能请求浏览器权限;被拒绝后不再请求,关闭此选项也不会请求权限。
|
|
354
373
|
|
|
355
374
|
---
|
|
@@ -364,6 +383,7 @@ npm ci --prefix tests/fixtures/dsh-0.1.7
|
|
|
364
383
|
npm ci --prefix tests/fixtures/dsh-0.2.0
|
|
365
384
|
npm ci --prefix tests/fixtures/dsh-0.2.0-rc.2
|
|
366
385
|
npm ci --prefix tests/fixtures/dsh-0.2.1
|
|
386
|
+
npm ci --prefix tests/fixtures/dsh-0.2.1-rc.2
|
|
367
387
|
npm run typecheck
|
|
368
388
|
npm run build
|
|
369
389
|
npm test
|
|
@@ -372,6 +392,10 @@ npm run test:runtime
|
|
|
372
392
|
|
|
373
393
|
`npm test` 覆盖错误恢复、自主循环上限与开关、子会话排除、暂停期间手动续跑、启动扫描及畸形会话隔离、队列顺序、统计、本地化、设置界面生命周期及保存期间继续编辑的情况。`npm run test:runtime` 使用已发布的 DSH **0.1.7-rc.2**、**0.2.0-rc.1** 和 **0.2.1-alpha.1** Settings、Loader、HTTP 组件,并运行真实的 0.2 profile 兼容检查及缺少其中一种设置服务时的客户端激活测试。启动恢复测试在真实的 **0.2.0-rc.2** 和 **0.2.1-alpha.1** Session、Cordis、HTTP 组件中注入会话读取故障,验证健康会话仍能恢复;这不代表正常的 DSH 加载流程会产生损坏日志。运行时测试使用受控的 agent 事件,不会向模型服务发送请求。
|
|
374
394
|
|
|
395
|
+
rc.2 测试还加载已发布的客户端设置服务,使用不再包含 `mode` 的真实快照,验证卡片保存/重置、会话模式、并发保存、磁盘重新加载、语言同步与重新读取宿主配置。
|
|
396
|
+
|
|
397
|
+
rc.2 重启测试使用真实的 agent、query 与 JSONL 持久化服务:在回合中强制结束宿主,启动新宿主且不打开会话,验证仅恢复一次,并沿用已记录的模型与对应提示变量。模型适配器使用确定性响应,不发送外部模型请求。
|
|
398
|
+
|
|
375
399
|
修改链接的本地仓库后,运行 `npm run build` 写入最新的 `lib/` 产物,再重启 DSH 并刷新浏览器。开启 client HMR 的宿主可自动重新加载已构建的客户端包。
|
|
376
400
|
|
|
377
401
|
CI 执行类型检查、构建、两组测试、已提交 `lib/` 产物校验及 [dsh-plugin-check](https://github.com/omdsh-dev/dsh-plugin-check),发布也受这些检查约束。更新界面文档时请参考[截图采集说明](docs/screenshots/README.md)。
|
|
@@ -398,5 +422,3 @@ CI 执行类型检查、构建、两组测试、已提交 `lib/` 产物校验及
|
|
|
398
422
|
[](LICENSE)
|
|
399
423
|
|
|
400
424
|
MIT © Hsiang Nianian
|
|
401
|
-
|
|
402
|
-
rc.2 测试还加载已发布的客户端设置服务,使用不再包含 `mode` 的真实快照,验证卡片保存/重置、会话开关、语言同步与重新读取宿主配置。
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
You can now leave one conversation looping, keep another on recovery only and switch a third off
|
|
2
|
+
|
|
3
|
+
This release also fixes the settings namespace collision from #64, brings old settings into the active profile and includes the dependency updates from #66
|
|
4
|
+
|
|
5
|
+
## A mode for each conversation
|
|
6
|
+
|
|
7
|
+
The control beside the message input now applies to that conversation ([#67](https://github.com/HsiangNianian/dsh-auto-continue/issues/67), [#68](https://github.com/HsiangNianian/dsh-auto-continue/pull/68))
|
|
8
|
+
|
|
9
|
+
| Mode | What it does |
|
|
10
|
+
| --- | --- |
|
|
11
|
+
| Follow default | Uses the profile's default session mode |
|
|
12
|
+
| Off | Stops automatic followups and excludes this conversation from the loop guard |
|
|
13
|
+
| Recovery only | Recovers eligible failures and silent turns, leaving normal completions alone |
|
|
14
|
+
| Autonomous loop | Also continues after normally completed turns |
|
|
15
|
+
|
|
16
|
+
- Choices are saved on the host, survive restarts and sync across tabs
|
|
17
|
+
- **Enable auto-continue globally** remains in the plugin settings and pauses automatic followups without replacing individual choices
|
|
18
|
+
- **Default session mode** controls conversations using Follow default, with Recovery only as the initial default
|
|
19
|
+
- Switching Off cancels queued grace, cooldown and loop-guard retries but leaves a running turn alone
|
|
20
|
+
- Switching from Autonomous loop to Recovery only cancels pending autonomous followups, and turning a mode back on does not revive cancelled sends
|
|
21
|
+
- **Resume now** still requests one manual followup while paused or Off without changing the saved mode
|
|
22
|
+
|
|
23
|
+
Your existing global pause and loop preferences carry over, and conversations without an override follow that default
|
|
24
|
+
|
|
25
|
+
The loop guard still has its own global setting and remains independent of global pause, while a conversation set to Off is excluded from it
|
|
26
|
+
|
|
27
|
+
## Settings save and migration fixes
|
|
28
|
+
|
|
29
|
+
Hosts exposing both legacy and profile settings APIs could register auto-continue twice and reject saves with `settings/conflict`, as reported in [#64](https://github.com/HsiangNianian/dsh-auto-continue/issues/64)
|
|
30
|
+
|
|
31
|
+
[#65](https://github.com/HsiangNianian/dsh-auto-continue/pull/65) keeps the profile configuration as the single settings owner on these hosts and imports the old auto-continue section from `$DSH_HOME/settings-legacy.yaml` when needed
|
|
32
|
+
|
|
33
|
+
- Imports happen once per profile, preserving old pause settings and custom prompts without overwriting explicit profile values or edits made during the import
|
|
34
|
+
- The original legacy file and other plugins' settings are left untouched
|
|
35
|
+
- A completed import stays completed after a full settings reset, so old values do not come back unexpectedly
|
|
36
|
+
- Automatic recovery and the loop guard wait while a required import is pending or fails, keeping saved pause choices from being bypassed
|
|
37
|
+
- Hosts with nothing to import do not wait for a settings editor
|
|
38
|
+
- YAML diagnostics no longer include source snippets that could expose unrelated settings, and the bundled parser keeps its ISC license notice
|
|
39
|
+
|
|
40
|
+
## Dependencies and release notes
|
|
41
|
+
|
|
42
|
+
[#66](https://github.com/HsiangNianian/dsh-auto-continue/pull/66) aligns the DSH development packages on `0.1.2-rc.1`, Cordis on `4.0.2` and Schemastery on `3.18.2`, removing the conflicting versions left by updating only the connection package
|
|
43
|
+
|
|
44
|
+
The repository now has a [changelog](https://github.com/HsiangNianian/dsh-auto-continue/blob/v0.16.0/CHANGELOG.md), and the publish workflow reads the full release body from a checked-in file before creating the GitHub Release
|
|
45
|
+
|
|
46
|
+
## Validation and compatibility
|
|
47
|
+
|
|
48
|
+
- Type checking, build, the full regression suite and the pinned DSH plugin checker
|
|
49
|
+
- Settings and compatibility checks against published DSH `0.1.7-rc.2`, `0.2.0-rc.1`, `0.2.1-alpha.1` and `0.2.1-rc.2` packages
|
|
50
|
+
- Startup failure isolation against `0.2.0-rc.2` and `0.2.1-alpha.1`, plus persisted-session restart recovery on `0.2.1-rc.2`
|
|
51
|
+
- Conversation mode isolation, cancellation of delayed sends, startup policy checks, settings persistence, cross-tab updates and stale save responses
|
|
52
|
+
- Mixed settings APIs, one-time migration, full resets, concurrent edits, crash recovery and failed imports
|
|
53
|
+
|
|
54
|
+
Runtime tests use controlled agent events and a deterministic model fixture, with no calls to an external model provider
|
|
55
|
+
|
|
56
|
+
Windows desktop has not been tested directly, and #64 remains open for confirmation from the reporter
|
|
57
|
+
|
|
58
|
+
## Upgrade
|
|
59
|
+
|
|
60
|
+
Let active work finish and stop DSH, then update the plugin in the profile you use
|
|
61
|
+
|
|
62
|
+
```bash
|
|
63
|
+
dsh plugin --profile web add dsh-client-auto-continue@0.16.0
|
|
64
|
+
dsh web
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
Reload the browser after restarting DSH so it loads the new conversation control
|
|
68
|
+
|
|
69
|
+
For the desktop app, update from its **Plugins** page and restart the app, since updating the CLI's `web` profile does not update the desktop profile
|
|
70
|
+
|
|
71
|
+
Existing configuration stays in place, and eligible legacy settings are imported automatically
|
|
72
|
+
|
|
73
|
+
Thanks to @fufengyuan for the conversation mode request, @spdw666 for the settings report and Dependabot for the dependency update
|
|
74
|
+
|
|
75
|
+
**Full changes:** https://github.com/HsiangNianian/dsh-auto-continue/compare/v0.15.0...v0.16.0
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# Third-party notices
|
|
2
|
+
|
|
3
|
+
The host bundle includes the YAML parser from `yaml` 2.9.1, licensed under ISC
|
|
4
|
+
|
|
5
|
+
```text
|
|
6
|
+
Copyright Eemeli Aro <eemeli@gmail.com>
|
|
7
|
+
|
|
8
|
+
Permission to use, copy, modify, and/or distribute this software for any purpose
|
|
9
|
+
with or without fee is hereby granted, provided that the above copyright notice
|
|
10
|
+
and this permission notice appear in all copies.
|
|
11
|
+
|
|
12
|
+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
13
|
+
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
|
14
|
+
FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
15
|
+
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS
|
|
16
|
+
OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
|
|
17
|
+
TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF
|
|
18
|
+
THIS SOFTWARE.
|
|
19
|
+
```
|