dsh-client-auto-continue 0.12.0 → 0.12.1
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/README.md +62 -36
- package/README.zh.md +62 -36
- package/docs/screenshots/01-settings-section.png +0 -0
- package/docs/screenshots/01-settings-section.zh.png +0 -0
- package/docs/screenshots/02-settings-card.png +0 -0
- package/docs/screenshots/02-settings-card.zh.png +0 -0
- package/docs/screenshots/07-card-panels.png +0 -0
- package/docs/screenshots/07-card-panels.zh.png +0 -0
- package/docs/screenshots/README.md +8 -7
- package/lib/client.js +8 -8
- package/lib/client.js.map +1 -1
- package/package.json +3 -3
- package/src/client/locales.ts +8 -8
package/README.md
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
<h1 align="center">dsh-auto-continue</h1>
|
|
9
9
|
|
|
10
10
|
<p align="center">
|
|
11
|
-
<em>
|
|
11
|
+
<em>Recover interrupted DSH sessions automatically, with an optional loop to continue after successful turns.</em>
|
|
12
12
|
</p>
|
|
13
13
|
|
|
14
14
|
<p align="center">
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
|
|
34
34
|
## What It Does
|
|
35
35
|
|
|
36
|
-
|
|
36
|
+
Automatic recovery for [DeepSeek Harness](https://github.com/deepseek-ai/deepseek-harness), in the Web UI and desktop app. When a recoverable failure interrupts a session, the plugin sends your configured continuation prompt through DSH. The engine runs **inside the host process**, so it keeps watching while browser tabs are closed; all tabs share that engine. Recovery is enabled by default. Continuing after successful turns is a separate, **opt-in autonomous loop**.
|
|
37
37
|
|
|
38
38
|

|
|
39
39
|
|
|
@@ -45,8 +45,8 @@ For [DeepSeek Harness](https://github.com/deepseek-ai/deepseek-harness) (`dsh we
|
|
|
45
45
|
- **Templated continue text** — `continueText` supports `{code}` `{message}` `{status}` `{tool}` `{turn}` `{errorCount}` `{sessionTitle}` `{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")
|
|
46
46
|
- **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)
|
|
47
47
|
- **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.
|
|
48
|
-
- **Autonomous loop** —
|
|
49
|
-
- **Pause** — a global **Pause auto-continue** toggle in the settings card stops
|
|
48
|
+
- **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 and disabling the option stop the loop. Its prompt is separate from the loop guard’s prompt (`continueTextLoop`, default `Continue`).
|
|
49
|
+
- **Pause** — a global **Pause auto-continue** toggle in the settings card 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. The **Resume now** notification button is the one explicit exception: pressing it is the user asking for exactly one send, pause or not
|
|
50
50
|
- **Notification buttons** — notifications carry **Resume now** (send immediately, ignoring cooldown, the consecutive cap and any pause) and **Pause this session 1h** actions
|
|
51
51
|
- **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
|
|
52
52
|
- **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
|
|
@@ -59,16 +59,17 @@ It watches the live event streams and reacts to:
|
|
|
59
59
|
| `turn/end` → `error` | Turn failed (model / network / timeout, …) |
|
|
60
60
|
| `turn/end` → `interrupted` | Crash-orphaned turn left behind by a host restart (recovered by the startup scan) |
|
|
61
61
|
| `turn/end` → `max-tokens` | Output token ceiling reached |
|
|
62
|
-
| `turn/end` → `completed` / `no-visible-output` with no visible output |
|
|
62
|
+
| `turn/end` → `completed` / `no-visible-output` with no visible output | Observed model activity without visible output, or an explicit silent-ending marker |
|
|
63
|
+
| `turn/end` → `completed` | Continue a normal completion only when autonomous loop is enabled |
|
|
63
64
|
| `host/agent-error` | Agent failure with no turn position (only network/timeout-class messages auto-resume) |
|
|
64
65
|
|
|
65
|
-
**
|
|
66
|
+
**Recovery stops for:** manual Stop, policy rejection (`blocked`), paused sessions, subagent sessions and the consecutive-attempt cap. A new turn or manual user message cancels a queued continuation. Live `interrupted` markers are left to the startup recovery scan. Recoverable failures during cooldown are **deferred**, not discarded. If an interrupted session already has queued turns, the continuation runs first and the existing turns retain their order behind it. The loop guard can separately cancel and restart a running turn that is repeating itself.
|
|
66
67
|
|
|
67
68
|
---
|
|
68
69
|
|
|
69
70
|
## How It Works
|
|
70
71
|
|
|
71
|
-
The host-side engine subscribes to the session event firehose inside the dsh host process —
|
|
72
|
+
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.
|
|
72
73
|
|
|
73
74
|
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).
|
|
74
75
|
|
|
@@ -84,21 +85,33 @@ The diagram summarizes the automatic recovery path, the loop-guard restart path,
|
|
|
84
85
|
|
|
85
86
|
DSH plugins install into a **profile** (`dsh web` → `web` profile). The commands below install into the web profile; restart `dsh web` after installation. In the desktop app, install through its **Plugins** page instead.
|
|
86
87
|
|
|
87
|
-
|
|
88
|
+
### Compatibility
|
|
88
89
|
|
|
89
|
-
|
|
90
|
+
| DSH runtime | Plugin version | Configuration entry point |
|
|
91
|
+
| --- | --- | --- |
|
|
92
|
+
| **0.2.0-rc.1** | **0.12.1 or newer** | **Plugins → dsh-client-auto-continue → Auto continue** |
|
|
93
|
+
| **0.1.7-rc.2** | **0.11.9 or newer** | Same Plugins page |
|
|
94
|
+
| Older hosts with the legacy settings API | Legacy UI retained | **Settings → Plugins → Plugin configuration** |
|
|
95
|
+
|
|
96
|
+
DSH 0.1.0-rc.6 and earlier are unsupported. Automated runtime checks cover **0.1.7-rc.2** and **0.2.0-rc.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.
|
|
97
|
+
|
|
98
|
+
**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).
|
|
90
99
|
|
|
91
|
-
|
|
100
|
+
On current DSH, **Settings → Built-in plugins** is a component inventory, not the configuration editor. Use the main **Plugins** page. The screenshots below use **DSH 0.2.0-rc.1 + plugin 0.12.1**. If you previously installed with a symlink or hand-written loader entry, see [Migrating an older installation](#migrating-an-older-installation).
|
|
92
101
|
|
|
93
102
|
### From npm (recommended)
|
|
94
103
|
|
|
95
104
|
Published as [`dsh-client-auto-continue`](https://www.npmjs.com/package/dsh-client-auto-continue):
|
|
96
105
|
|
|
97
106
|
```bash
|
|
98
|
-
dsh plugin --profile web add dsh-client-auto-continue
|
|
107
|
+
dsh plugin --profile web add dsh-client-auto-continue@latest
|
|
99
108
|
dsh web
|
|
100
109
|
```
|
|
101
110
|
|
|
111
|
+
### Updating an installed plugin
|
|
112
|
+
|
|
113
|
+
Let active work finish and stop DSH. Run the npm command above again to replace the installed version with `@latest`, then restart DSH and reload the browser. Existing configuration overrides remain in the profile. For a desktop installation, update the plugin from that app’s **Plugins** page and restart the app; updating the CLI’s `web` profile does not update the desktop profile.
|
|
114
|
+
|
|
102
115
|
### Directly from GitHub (no clone needed)
|
|
103
116
|
|
|
104
117
|
Installs straight from the repository's default branch — built artifacts are committed, so no local clone or build step:
|
|
@@ -112,17 +125,17 @@ dsh web
|
|
|
112
125
|
|
|
113
126
|
### From this repository
|
|
114
127
|
|
|
115
|
-
|
|
128
|
+
Use Node.js 22, the version used by CI.
|
|
116
129
|
|
|
117
130
|
```bash
|
|
118
131
|
git clone https://github.com/HsiangNianian/dsh-auto-continue.git
|
|
119
132
|
cd dsh-auto-continue
|
|
120
|
-
npm
|
|
133
|
+
npm ci
|
|
121
134
|
npm run build
|
|
122
135
|
|
|
123
136
|
# the package carries its own cordis.patch.yml (dsh.bundle.patch),
|
|
124
137
|
# so the plugin row registers itself
|
|
125
|
-
dsh plugin --profile web add link:$(pwd)
|
|
138
|
+
dsh plugin --profile web add "link:$(pwd)"
|
|
126
139
|
|
|
127
140
|
dsh web
|
|
128
141
|
```
|
|
@@ -134,7 +147,7 @@ A manual loader entry can start the engine without registering a bundle in the *
|
|
|
134
147
|
1. Let active work finish, then stop `dsh web`. Back up `package.json`, `cordis.patch.yml` and `pnpm-lock.yaml` in `~/.dsh/profiles/web/`, plus `~/.dsh/settings.yaml` if it exists. If you set `DSH_HOME`, use that directory instead of `~/.dsh`.
|
|
135
148
|
2. Keep your existing auto-continue values. Remove only the manually added `auto-continue` row **inside an `insert` list** (and the list if it becomes empty). The installed bundle supplies that row. A top-level `- id: auto-continue` with `config:` is a configuration override: **keep it**.
|
|
136
149
|
3. Install with either the npm or GitHub command above. In the profile's `package.json`, `dsh.profile.bundles` should now include `dsh-client-auto-continue`, alongside the existing DSH bundles. If it already does and the plugin appears in **Plugins**, this part is already complete.
|
|
137
|
-
4. On DSH 0.1.7, merge any saved values from the old `settings.yaml` → `auto-continue` section or the removed row's `config` into the profile's `cordis.patch.yml`. For example, a custom cooldown becomes:
|
|
150
|
+
4. On DSH 0.1.7 / 0.2, merge any saved values from the old `settings.yaml` → `auto-continue` section or the removed row's `config` into the profile's `cordis.patch.yml`. For example, a custom cooldown becomes:
|
|
138
151
|
|
|
139
152
|
```yaml
|
|
140
153
|
- id: auto-continue
|
|
@@ -142,7 +155,7 @@ A manual loader entry can start the engine without registering a bundle in the *
|
|
|
142
155
|
cooldownMs: 45000 # example: preserve your own saved value
|
|
143
156
|
```
|
|
144
157
|
|
|
145
|
-
Merge into an existing override instead of adding another one. Keep unrelated settings intact. DSH 0.1.7 reads this entry config; editing the old `settings.yaml` section will not update the new form.
|
|
158
|
+
Merge into an existing override instead of adding another one. Keep unrelated settings intact. DSH 0.1.7 / 0.2 reads this entry config; editing the old `settings.yaml` section will not update the new form.
|
|
146
159
|
5. Start `dsh web` again and reload the browser. Open **Plugins → dsh-client-auto-continue**, expand **Auto continue**, and check that your values are present. Save a change and reload to confirm it persists.
|
|
147
160
|
|
|
148
161
|
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.
|
|
@@ -163,17 +176,25 @@ dsh web
|
|
|
163
176
|
|
|
164
177
|
---
|
|
165
178
|
|
|
179
|
+
## Troubleshooting
|
|
180
|
+
|
|
181
|
+
- **“Skipping profile bundle” / “incompatible with dsh 0.2.0-rc.1”:** update to plugin 0.12.1 or newer in the profile the app actually uses, then restart it. A version exemption is not needed for this fix.
|
|
182
|
+
- **Enabled, but no configuration fields:** open the main **Plugins** page, select the package and expand **Auto continue**. The Built-in plugins status page has no editable fields.
|
|
183
|
+
- **`/api/auto-continue-bridge` returns 404:** check the DSH startup log and composed config to confirm the host component loaded. Refreshing the settings card cannot start a missing host component.
|
|
184
|
+
|
|
185
|
+
---
|
|
186
|
+
|
|
166
187
|
## Configuration
|
|
167
188
|
|
|
168
|
-
On **DSH 0.1.7**, open **Plugins** from the main sidebar, choose **dsh-client-auto-continue**, then expand the **Auto continue** card. This is separate from **Settings → Built-in plugins**, which only lists component status. Older DSH versions use **Settings → Plugins → Plugin configuration**.
|
|
189
|
+
On **DSH 0.1.7 / 0.2**, open **Plugins** from the main sidebar, choose **dsh-client-auto-continue**, then expand the **Auto continue** card. This is separate from **Settings → Built-in plugins**, which only lists component status. Older DSH versions use **Settings → Plugins → Plugin configuration**.
|
|
169
190
|
|
|
170
|
-

|
|
171
192
|
|
|
172
193
|
Click the card header or its right-hand chevron to show the fields. The expanded card also contains a live **stats panel** (today's activity with a reset button) and **paused sessions** (each with a resume button).
|
|
173
194
|
|
|
174
195
|
The settings card groups controls by handoff, safety, recovery, loop breaking, and live status. Its header also keeps the open-source repository and a **Star on GitHub** shortcut within reach.
|
|
175
196
|
|
|
176
|
-
DSH 0.1.7 stores these values in the `auto-continue` entry's config in the active profile patch (`~/.dsh/profiles/web/cordis.patch.yml` for the default web profile). **Save** applies changes live without restarting the engine. Omitted fields use the defaults below.
|
|
197
|
+
DSH 0.1.7 / 0.2 stores these values in the `auto-continue` entry's config in the active profile patch (`~/.dsh/profiles/web/cordis.patch.yml` for the default web profile). **Save** applies changes live without restarting the engine. Omitted fields use the defaults below.
|
|
177
198
|
|
|
178
199
|
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.
|
|
179
200
|
|
|
@@ -224,16 +245,16 @@ auto-continue:
|
|
|
224
245
|
cooldownMs: 45000
|
|
225
246
|
```
|
|
226
247
|
|
|
227
|
-
When
|
|
248
|
+
When migrating from the legacy settings file to DSH 0.1.7 / 0.2, move these values into the profile entry's `config` as described in [Migrating an older installation](#migrating-an-older-installation).
|
|
228
249
|
|
|
229
250
|
</details>
|
|
230
251
|
|
|
231
252
|
**How the card works:**
|
|
232
253
|
|
|
233
|
-

|
|
234
255
|
|
|
235
256
|
- Edits are **staged** — nothing reaches the disk until you hit **Save**; an unsaved badge marks the card while drafts are pending, and **Discard** drops them
|
|
236
|
-
- A field you changed shows an **Overridden** badge with a per-field **Reset to default** button that restores the built-in
|
|
257
|
+
- A field you changed shows an **Overridden** badge with a per-field **Reset to default** button that removes the override and restores the inherited value (normally the built-in default)
|
|
237
258
|
- Boolean fields are **tri-state**: *Inherit* (use the default) / *On* / *Off*
|
|
238
259
|
- Invalid drafts (non-numbers, values below the minimum) block the save with a hint
|
|
239
260
|
- In a read-only deployment the card shows the stored values but disables every control
|
|
@@ -242,7 +263,7 @@ When upgrading to DSH 0.1.7, move these values into the profile entry's `config`
|
|
|
242
263
|
<details>
|
|
243
264
|
<summary>Live status and the Save / Discard buttons</summary>
|
|
244
265
|
|
|
245
|
-

|
|
246
267
|
|
|
247
268
|
</details>
|
|
248
269
|
|
|
@@ -253,7 +274,7 @@ When upgrading to DSH 0.1.7, move these values into the profile entry's `config`
|
|
|
253
274
|
| Continue text (max tokens) | `Continue` | Text sent when the output token ceiling is reached (same placeholders) |
|
|
254
275
|
| Resume silent turns | `on` | Resume a turn that ended normally with reasoning only (no text, no tool call); does not reset the consecutive count |
|
|
255
276
|
| Continue text (silent turn) | `Continue. Your previous turn ended with internal reasoning only, ...` | Text sent to resume a silent turn (same placeholders) |
|
|
256
|
-
| Autonomous loop (continue after every turn) | `off` |
|
|
277
|
+
| Autonomous loop (continue after every turn) | `off` | Continue normal completions after grace, bypassing recovery cooldown/cap; reasoning-only and explicit silent endings still consume the retry budget |
|
|
257
278
|
| Continue text (autonomous loop) | `Continue` | Text sent on each autonomous-loop resume (same placeholders) |
|
|
258
279
|
| Idempotency guard | `on` | Inspect the last tool call before resuming and steer the model (see What It Does) |
|
|
259
280
|
| Loop guard | `on` | Detect a running turn spinning in place and restart it (see What It Does) |
|
|
@@ -266,8 +287,8 @@ When upgrading to DSH 0.1.7, move these values into the profile entry's `config`
|
|
|
266
287
|
| Guard text (unconfirmed result) | `(The previous tool "{tool}" may not have completed. Check its state before continuing and do not run it again.)` | Appended when the last tool may have partially executed; `{tool}` placeholder |
|
|
267
288
|
| Guard text (tool succeeded) | `(The previous tool "{tool}" completed successfully. Result: {result}; do not run it again. Continue from there.)` | Appended when the last tool is confirmed done; `{tool}` / `{result}` placeholders |
|
|
268
289
|
| Grace period (ms) | `3000` | Wait after an interruption; cancelled if the host recovers on its own |
|
|
269
|
-
| Cooldown (ms) | `20000` | Min interval between
|
|
270
|
-
| Max consecutive | `3` |
|
|
290
|
+
| Cooldown (ms) | `20000` | Min interval between recovery attempts per session; failures during cooldown wait for the remaining interval, then grace |
|
|
291
|
+
| Max consecutive | `3` | Consecutive recovery-attempt cap; resets on user intervention or an observed completion with visible output. Normal autonomous-loop handoffs are exempt |
|
|
271
292
|
| Scan on host startup | `on` | Recover interrupted sessions that become available during the startup window |
|
|
272
293
|
| Scan limit | `8` | Maximum eligible recoveries per pass, most recently active first |
|
|
273
294
|
| Scan window (ms) | `900000` | Maximum interruption age and duration of startup polling |
|
|
@@ -289,7 +310,7 @@ For a provider-specific error that is safe to resume (confirm first that manuall
|
|
|
289
310
|
|
|
290
311
|
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.
|
|
291
312
|
|
|
292
|
-
`continueText` (and `continueTextMaxTokens`, `continueTextSilent`) accept the placeholders `{code}`, `{message}`, `{status}`, `{tool}` (last tool call before the failure), `{turn}`, `{errorCount}` (consecutive failures including this one), `{sessionTitle}` (from the session list) 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).
|
|
313
|
+
`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), `{sessionTitle}` (from the session list) 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).
|
|
293
314
|
|
|
294
315
|
---
|
|
295
316
|
|
|
@@ -299,26 +320,31 @@ The recovery engine runs inside the DSH host. The browser provides the configura
|
|
|
299
320
|
|
|
300
321
|
- 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
|
|
301
322
|
- 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
|
|
302
|
-
- Saving configuration uses DSH's settings API: the active profile patch on DSH 0.1.7, or `~/.dsh/settings.yaml` on older hosts
|
|
303
|
-
-
|
|
323
|
+
- 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
|
|
324
|
+
- Retry counters, cooldown timestamps, per-session pauses and stats stay in host process memory and reset when the engine restarts. The global `paused` setting is saved with your other configuration
|
|
304
325
|
- Browser notifications are opt-in (`notify` setting) and permission is requested on first use only
|
|
305
326
|
|
|
306
327
|
---
|
|
307
328
|
|
|
308
329
|
## Development
|
|
309
330
|
|
|
310
|
-
|
|
331
|
+
Use Node.js 22. Install both pinned runtime fixtures to reproduce CI locally:
|
|
311
332
|
|
|
312
333
|
```bash
|
|
313
|
-
npm
|
|
314
|
-
npm
|
|
315
|
-
npm
|
|
316
|
-
npm run
|
|
334
|
+
npm ci
|
|
335
|
+
npm ci --prefix tests/fixtures/dsh-0.1.7
|
|
336
|
+
npm ci --prefix tests/fixtures/dsh-0.2.0
|
|
337
|
+
npm run typecheck
|
|
338
|
+
npm run build
|
|
339
|
+
npm test
|
|
340
|
+
npm run test:runtime
|
|
317
341
|
```
|
|
318
342
|
|
|
319
|
-
|
|
343
|
+
`npm test` covers recovery, autonomous-loop limits and toggles, startup scanning, queue ordering, statistics, localization and settings UI lifecycle. `npm run test:runtime` uses published DSH **0.1.7-rc.2** and **0.2.0-rc.1** Settings, Loader and HTTP services. It also runs the actual 0.2 profile compatibility gate and checks client activation with Cordis 4.0.4 when one settings provider is absent. The runtime harness controls agent events; it does not send requests to a model provider.
|
|
344
|
+
|
|
345
|
+
`npm run watch` rebuilds local changes. If the host has client HMR enabled, it can reload the linked client bundle; otherwise restart DSH and refresh the browser after rebuilding.
|
|
320
346
|
|
|
321
|
-
CI
|
|
347
|
+
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.
|
|
322
348
|
|
|
323
349
|
---
|
|
324
350
|
|
package/README.zh.md
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
<h1 align="center">dsh-auto-continue</h1>
|
|
9
9
|
|
|
10
10
|
<p align="center">
|
|
11
|
-
<em
|
|
11
|
+
<em>自动恢复中断的 DSH 会话,也可选择开启自主循环,在正常完成后继续工作。</em>
|
|
12
12
|
</p>
|
|
13
13
|
|
|
14
14
|
<p align="center">
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
|
|
34
34
|
## 它做什么
|
|
35
35
|
|
|
36
|
-
|
|
36
|
+
为 [DeepSeek Harness](https://github.com/deepseek-ai/deepseek-harness) 的 Web 界面和桌面应用提供自动恢复。会话因可恢复错误中断时,插件通过 DSH 发送你配置的继续提示。引擎运行在**宿主进程**中,浏览器标签页关闭后仍会工作,多个标签页共享同一个引擎。默认开启中断恢复;成功回合后也继续工作的**自主循环需要手动开启**。
|
|
37
37
|
|
|
38
38
|

|
|
39
39
|
|
|
@@ -45,8 +45,8 @@
|
|
|
45
45
|
- **模板化继续文本** — `continueText` 支持 `{code}` `{message}` `{status}` `{tool}` `{turn}` `{errorCount}` `{sessionTitle}` `{elapsed}` 占位符, 续跑消息可携带失败上下文(如「继续 (git push 失败: UPSTREAM)」); 达到 `max-tokens` 时使用**另一套模板**(如「继续输出, 不要重复已生成的内容」)
|
|
46
46
|
- **幂等护栏** — 续跑前检查上一步工具调用: 结果未确认(回合在工具执行中途夭折, 如 `git push` 可能已经推上去了)时, 续跑消息会提示模型先确认状态、不要重复执行; 工具已确认成功时说明已完成、请勿重复; 工具失败则不加护栏(重试本来就是目的)。两段护栏文本都可配置(支持 `{tool}` / `{result}` 占位符)
|
|
47
47
|
- **无输出回合续跑** — 已观察到模型步骤或推理回复,但回合正常结束且没有可见输出时自动恢复。没有模型活动的空回合不会触发;文本、工具调用、图片、扩展块和已显示的流式内容均算可见输出。未观察到开始的回合不会被猜测为静默。启动后也能恢复显式的 `no-visible-output` 标记。关闭开关会取消排队中的静默续跑;即使开关关闭,静默回合也不会清零重试上限。
|
|
48
|
-
- **自主循环** —
|
|
49
|
-
- **暂停** — 设置卡片里的全局 **暂停自动继续**
|
|
48
|
+
- **自主循环** — 默认关闭(`resumeCompletedTurns`)。开启后,正常完成的回合经过宽限期便会续跑,不受恢复冷却和次数上限约束。仅有推理的回合和显式 `no-visible-output` 仍消耗重试预算并遵守退避。全局暂停、会话暂停、手动停止或关闭该选项都会停止循环。自主循环使用单独的提示文本 `continueTextLoop`(默认 `继续`),与循环守卫的提示文本不同。
|
|
49
|
+
- **暂停** — 设置卡片里的全局 **暂停自动继续** 开关会停止实时事件与启动扫描触发的自动发送; 会话级暂停(如通过通知按钮)只挂起单个会话, 到期自动恢复。唯一的显式例外是通知里的 **立即续跑** 按钮——按下它等于用户明确要求发送这一次, 不受暂停限制
|
|
50
50
|
- **通知按钮** — 通知带 **立即续跑**(无视冷却、连续上限与暂停, 马上发送)和 **暂停该会话 1 小时** 按钮
|
|
51
51
|
- **循环守卫** — 连**运行中的回合**也盯着, 四个信号都会触发守卫(取消当前回合并用可配置的循环提示文本重启, 「停止重复, 换一种方式」): 模型**连续输出完全相同的消息**(不限长度, 如 "Let me test variants of the regex…" 连续 7 遍)、单条流式 assistant 消息内部出现连续近似重复段落、短时间内连续多条短句且期间无工具调用(典型的「Let me read…」空转)、或同一工具被连续反复调用且**参数与结果都相同**(参数或结果有变化视为有进展)。取消带有内部来源标记, 绝不会与用户手动停止混淆——只有守卫发起的取消才会重启。阈值、时间窗与提示文本都可配置
|
|
52
52
|
- **统计面板** — 设置卡片展示今日自动继续次数、恢复成功、继续后失败、永久性跳过、达上限停止、循环打断, 按错误码统计, 可一键清零
|
|
@@ -59,16 +59,17 @@
|
|
|
59
59
|
| `turn/end` → `error` | 回合失败(模型 / 网络 / 超时等) |
|
|
60
60
|
| `turn/end` → `interrupted` | 宿主崩溃重启后遗留的中断回合(由启动扫描恢复) |
|
|
61
61
|
| `turn/end` → `max-tokens` | 达到输出 token 上限 |
|
|
62
|
-
| `turn/end` → `completed` / `no-visible-output` 且无可见输出 |
|
|
62
|
+
| `turn/end` → `completed` / `no-visible-output` 且无可见输出 | 已观察到模型活动但没有可见输出,或收到显式无输出结束标记 |
|
|
63
|
+
| `turn/end` → `completed` | 仅在开启自主循环时续跑正常完成的回合 |
|
|
63
64
|
| `host/agent-error` | 无回合位置的 Agent 失败(仅网络/超时类消息自动续跑) |
|
|
64
65
|
|
|
65
|
-
|
|
66
|
+
**恢复会停止于:**用户手动停止、策略拒绝(`blocked`)、暂停、子代理会话以及连续次数上限。新回合开始或用户手动发送消息会取消待发送的继续提示;实时 `interrupted` 标记交给启动扫描处理。冷却期间出现的可恢复错误会**延后重试,不会直接丢弃**。已有排队消息时,续跑消息先执行,原有消息随后按原顺序处理。循环守卫则可以单独打断并重启正在重复动作的回合。
|
|
66
67
|
|
|
67
68
|
---
|
|
68
69
|
|
|
69
70
|
## 工作原理
|
|
70
71
|
|
|
71
|
-
宿主侧引擎在 dsh 宿主进程内订阅会话事件 firehose
|
|
72
|
+
宿主侧引擎在 dsh 宿主进程内订阅会话事件 firehose——**多个浏览器标签页共享一个引擎**。检测到中断后先等待一个**宽限期**(默认 3 秒)——若宿主自行开启了新回合(`turn/start`), 自动继续即取消——然后经 agent 注册表(`agent.followup`, 与「发送」按钮同一个排队通道)发送配置的文本。若队列已有消息, 引擎会在宿主唤醒 agent 之前只把本次续跑消息移到队首, 不删除或重排用户消息。
|
|
72
73
|
|
|
73
74
|
宿主启动时还会扫描存活会话: 最后一个回合在**扫描时间窗**(默认 15 分钟)内以非人为原因结束、且其后没有新回合或用户消息的会话, 会被自动续跑(例如浏览器关闭期间宿主崩溃——agent-loop 恢复会话后引擎接着接手)。
|
|
74
75
|
|
|
@@ -84,21 +85,33 @@
|
|
|
84
85
|
|
|
85
86
|
DSH 插件安装进 **profile**(`dsh web` 对应 `web` profile)。下面的命令用于 Web 版, 安装后重启 `dsh web`。桌面版请通过应用内的**插件**页面安装。
|
|
86
87
|
|
|
87
|
-
|
|
88
|
+
### 版本兼容
|
|
88
89
|
|
|
89
|
-
DSH
|
|
90
|
+
| DSH 内核 | 插件版本 | 配置入口 |
|
|
91
|
+
| --- | --- | --- |
|
|
92
|
+
| **0.2.0-rc.1** | **0.12.1 或更新版本** | **插件 → dsh-client-auto-continue → 自动继续** |
|
|
93
|
+
| **0.1.7-rc.2** | **0.11.9 或更新版本** | 同上,从主侧栏的插件页进入 |
|
|
94
|
+
| 使用旧设置 API 的宿主 | 保留旧版设置界面兼容 | **设置 → 插件 → 插件配置** |
|
|
95
|
+
|
|
96
|
+
不支持 DSH 0.1.0-rc.6 及更早版本。自动化运行时测试覆盖 **0.1.7-rc.2** 和 **0.2.0-rc.1**。桌面应用版本不等于内置的 DSH 内核版本,请按内核版本判断兼容性;CLI 可运行 `dsh --version`,可用版本见 [DSH 官方 Releases](https://github.com/deepseek-ai/deepseek-harness/releases)。
|
|
97
|
+
|
|
98
|
+
**插件 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)。
|
|
90
99
|
|
|
91
|
-
|
|
100
|
+
当前 DSH 的**设置 → 内置插件**是组件状态列表,配置应从主侧栏的**插件**页面进入。下方截图使用 **DSH 0.2.0-rc.1 + 插件 0.12.1**。此前通过软链或手写 Loader 条目安装的用户,请参考[旧安装迁移](#旧安装迁移)。
|
|
92
101
|
|
|
93
102
|
### 从 npm 安装(推荐)
|
|
94
103
|
|
|
95
104
|
已发布为 [`dsh-client-auto-continue`](https://www.npmjs.com/package/dsh-client-auto-continue):
|
|
96
105
|
|
|
97
106
|
```bash
|
|
98
|
-
dsh plugin --profile web add dsh-client-auto-continue
|
|
107
|
+
dsh plugin --profile web add dsh-client-auto-continue@latest
|
|
99
108
|
dsh web
|
|
100
109
|
```
|
|
101
110
|
|
|
111
|
+
### 更新已安装的插件
|
|
112
|
+
|
|
113
|
+
等当前任务结束后停止 DSH,再次执行上面的 npm 安装命令,用 `@latest` 更新插件,然后重启 DSH 并刷新浏览器。已有配置覆盖项会保留。桌面版请从应用内的**插件**页面更新并重启应用;更新 CLI 的 `web` profile 不会同步更新桌面版的 profile。
|
|
114
|
+
|
|
102
115
|
### 直接从 GitHub 安装(无需克隆)
|
|
103
116
|
|
|
104
117
|
直接从仓库默认分支安装——构建产物已提交入库, 无需本地克隆或构建:
|
|
@@ -112,17 +125,17 @@ dsh web
|
|
|
112
125
|
|
|
113
126
|
### 从本仓库安装
|
|
114
127
|
|
|
115
|
-
|
|
128
|
+
请使用与 CI 相同的 Node.js 22。
|
|
116
129
|
|
|
117
130
|
```bash
|
|
118
131
|
git clone https://github.com/HsiangNianian/dsh-auto-continue.git
|
|
119
132
|
cd dsh-auto-continue
|
|
120
|
-
npm
|
|
133
|
+
npm ci
|
|
121
134
|
npm run build
|
|
122
135
|
|
|
123
136
|
# 包自带 cordis.patch.yml(通过 dsh.bundle.patch 声明),
|
|
124
137
|
# 插件行会自动注册
|
|
125
|
-
dsh plugin --profile web add link:$(pwd)
|
|
138
|
+
dsh plugin --profile web add "link:$(pwd)"
|
|
126
139
|
|
|
127
140
|
dsh web
|
|
128
141
|
```
|
|
@@ -134,7 +147,7 @@ dsh web
|
|
|
134
147
|
1. 等当前任务结束后停止 `dsh web`。备份 `~/.dsh/profiles/web/` 下的 `package.json`、`cordis.patch.yml`、`pnpm-lock.yaml`, 以及存在时的 `~/.dsh/settings.yaml`。如果设置了 `DSH_HOME`, 请用该目录替代 `~/.dsh`。
|
|
135
148
|
2. 保留已有的自动继续参数。只删除 **`insert` 列表内**手动添加的 `auto-continue` 行; 若列表因此变空, 一并删除空列表。安装包会提供该行。顶层的 `- id: auto-continue` 搭配 `config:` 是配置覆盖项, **应当保留**。
|
|
136
149
|
3. 使用上面的 npm 或 GitHub 命令安装。profile 的 `package.json` 中, `dsh.profile.bundles` 应在原有 DSH bundles 之外包含 `dsh-client-auto-continue`。如果已经包含, 且**插件**页面已有该插件, 这一步已经完成。
|
|
137
|
-
4. 在 DSH 0.1.7 上, 将旧 `settings.yaml` → `auto-continue` 段落或已移除条目的 `config` 参数合并到 profile 的 `cordis.patch.yml`。例如, 自定义冷却时间写成:
|
|
150
|
+
4. 在 DSH 0.1.7 / 0.2 上, 将旧 `settings.yaml` → `auto-continue` 段落或已移除条目的 `config` 参数合并到 profile 的 `cordis.patch.yml`。例如, 自定义冷却时间写成:
|
|
138
151
|
|
|
139
152
|
```yaml
|
|
140
153
|
- id: auto-continue
|
|
@@ -142,7 +155,7 @@ dsh web
|
|
|
142
155
|
cooldownMs: 45000 # 示例: 请保留你原先设置的值
|
|
143
156
|
```
|
|
144
157
|
|
|
145
|
-
若已有覆盖项, 请合并到其中, 不要重复添加。保留其他设置。DSH 0.1.7 读取的是条目配置, 修改旧 `settings.yaml` 段落不会更新新版表单。
|
|
158
|
+
若已有覆盖项, 请合并到其中, 不要重复添加。保留其他设置。DSH 0.1.7 / 0.2 读取的是条目配置, 修改旧 `settings.yaml` 段落不会更新新版表单。
|
|
146
159
|
5. 重新启动 `dsh web` 并刷新浏览器。打开**插件 → dsh-client-auto-continue**, 展开**自动继续**, 检查旧参数是否保留。保存一次修改并刷新, 确认配置持久化正常。
|
|
147
160
|
|
|
148
161
|
**内置插件**里显示的 `include:auto-continue` 是正常的 Loader 前缀, 单凭这个名字不能判断为旧安装或重复引擎。
|
|
@@ -163,17 +176,25 @@ dsh web
|
|
|
163
176
|
|
|
164
177
|
---
|
|
165
178
|
|
|
179
|
+
## 常见问题
|
|
180
|
+
|
|
181
|
+
- **提示 “skipping profile bundle” 或 “incompatible with dsh 0.2.0-rc.1”:** 在应用实际使用的 profile 中升级到插件 0.12.1 或更新版本,再重启应用。此修复不需要授予版本豁免。
|
|
182
|
+
- **已启用,但看不到配置:** 从主侧栏打开**插件**,选择该包并展开**自动继续**;内置插件状态页没有可编辑字段。
|
|
183
|
+
- **`/api/auto-continue-bridge` 返回 404:** 检查 DSH 启动日志与合并配置,确认宿主组件已加载。刷新配置卡片不能启动缺失的宿主组件。
|
|
184
|
+
|
|
185
|
+
---
|
|
186
|
+
|
|
166
187
|
## 配置
|
|
167
188
|
|
|
168
|
-
在 **DSH 0.1.7** 中, 从主侧栏打开**插件**, 选择 **dsh-client-auto-continue**, 再展开**自动继续**卡片。**设置 → 内置插件**是单独的组件状态列表, 不能在其中编辑配置。旧版 DSH 的入口仍为**设置 → 插件 → 插件配置**。
|
|
189
|
+
在 **DSH 0.1.7 / 0.2** 中, 从主侧栏打开**插件**, 选择 **dsh-client-auto-continue**, 再展开**自动继续**卡片。**设置 → 内置插件**是单独的组件状态列表, 不能在其中编辑配置。旧版 DSH 的入口仍为**设置 → 插件 → 插件配置**。
|
|
169
190
|
|
|
170
|
-

|
|
171
192
|
|
|
172
193
|
点击卡片标题或右侧箭头即可展开字段。卡片内还带有**统计面板**(今日活动, 可一键清零)和**已暂停会话**列表(每个都可单独解除)。
|
|
173
194
|
|
|
174
195
|
新版配置卡会按接力方式、安全节奏、恢复雷达、循环断路器与现场状态组织配置; 卡片顶部也直接放出了开源仓库和 **Star on GitHub** 入口。
|
|
175
196
|
|
|
176
|
-
DSH 0.1.7 将这些值保存在当前 profile patch 的 `auto-continue` 条目 config 中(默认 Web profile 对应 `~/.dsh/profiles/web/cordis.patch.yml`)。点**保存**后实时生效, 无需重启引擎。省略的字段使用下表默认值。
|
|
197
|
+
DSH 0.1.7 / 0.2 将这些值保存在当前 profile patch 的 `auto-continue` 条目 config 中(默认 Web profile 对应 `~/.dsh/profiles/web/cordis.patch.yml`)。点**保存**后实时生效, 无需重启引擎。省略的字段使用下表默认值。
|
|
177
198
|
|
|
178
199
|
启动恢复会每三秒等待一次延迟加载的会话,在引擎启动后的 `freshMs` 时间窗结束。每个已就绪会话的历史只检查一次,`scanLimit` 只限制每轮符合条件的恢复数量,正常会话或永久错误不会挤占名额。暂停会在同一时间窗内挂起恢复,卸载插件会取消轮询。
|
|
179
200
|
|
|
@@ -224,16 +245,16 @@ auto-continue:
|
|
|
224
245
|
cooldownMs: 45000
|
|
225
246
|
```
|
|
226
247
|
|
|
227
|
-
|
|
248
|
+
从旧设置文件迁移到 DSH 0.1.7 / 0.2 时, 请按[旧安装迁移](#旧安装迁移)将这些值移入 profile 条目的 `config`。
|
|
228
249
|
|
|
229
250
|
</details>
|
|
230
251
|
|
|
231
252
|
**卡片操作说明:**
|
|
232
253
|
|
|
233
|
-

|
|
234
255
|
|
|
235
256
|
- 修改是**暂存式**的——点「保存」之前不会写入磁盘; 有待保存草稿时卡片显示「未保存」徽章, 「放弃」可丢弃草稿
|
|
236
|
-
- 改动过的字段会带「已覆盖」徽章,
|
|
257
|
+
- 改动过的字段会带「已覆盖」徽章, 并有逐字段的「恢复默认」按钮(移除覆盖项,恢复继承值,通常为内置默认值)
|
|
237
258
|
- 布尔字段是三态:**继承**(用默认)/ 开 / 关
|
|
238
259
|
- 非法输入(非数字、小于最小值)会阻止保存并给出提示
|
|
239
260
|
- 只读部署中卡片只显示已存值, 所有控件禁用
|
|
@@ -242,7 +263,7 @@ auto-continue:
|
|
|
242
263
|
<details>
|
|
243
264
|
<summary>现场状态与底部的保存 / 放弃按钮</summary>
|
|
244
265
|
|
|
245
|
-

|
|
246
267
|
|
|
247
268
|
</details>
|
|
248
269
|
|
|
@@ -253,7 +274,7 @@ auto-continue:
|
|
|
253
274
|
| 超限时的继续文本 | `继续` | 达到输出 token 上限时自动发送的文本(支持相同占位符) |
|
|
254
275
|
| 续跑无输出回合 | 开 | 回合正常结束但只有推理(没有文本、没有工具调用)时自动续跑; 不清零连续次数 |
|
|
255
276
|
| 无输出回合的继续文本 | `继续。你上一轮只输出了内部推理, ...` | 续跑无输出回合时发送的文本(支持相同占位符) |
|
|
256
|
-
| 自主循环(每个回合后都续跑) | 关 |
|
|
277
|
+
| 自主循环(每个回合后都续跑) | 关 | 正常完成后经过宽限期续跑,不受恢复冷却和上限限制;仅有推理和显式无输出结束仍消耗重试预算 |
|
|
257
278
|
| 自主循环的继续文本 | `继续` | 自主循环续跑时发送的文本(支持相同占位符) |
|
|
258
279
|
| 幂等护栏 | 开 | 续跑前检查上一步工具调用并给出指引(见「它做什么」) |
|
|
259
280
|
| 循环守卫 | 开 | 检测运行中的回合空转并重启(见「它做什么」) |
|
|
@@ -266,8 +287,8 @@ auto-continue:
|
|
|
266
287
|
| 结果未确认时的护栏文本 | `(上一步工具「{tool}」可能未完成, 先确认状态再继续, 不要重复执行)` | 上一步工具可能已部分执行时附加; 支持 {tool} 占位符 |
|
|
267
288
|
| 工具已成功时的护栏文本 | `(上一步工具「{tool}」已完成, 结果: {result}; 不要重复执行, 直接继续)` | 上一步工具已确认成功时附加; 支持 {tool} / {result} 占位符 |
|
|
268
289
|
| 宽限期 (ms) | `3000` | 中断后等待的时长; 期间宿主自行恢复则取消 |
|
|
269
|
-
| 冷却时间 (ms) | `20000` |
|
|
270
|
-
| 最大连续次数 | `3` |
|
|
290
|
+
| 冷却时间 (ms) | `20000` | 同一会话恢复尝试的最小间隔;期间出现的失败会等待剩余冷却,再进入宽限期 |
|
|
291
|
+
| 最大连续次数 | `3` | 连续恢复尝试上限;用户介入或观察到有可见输出的成功回合后重置。正常完成后的自主循环接力不计入 |
|
|
271
292
|
| 启动恢复扫描 | 开 | 恢复启动时间窗内延迟加载的中断会话 |
|
|
272
293
|
| 扫描会话数 | `8` | 每轮最多恢复的符合条件的会话数,优先最近活动的会话 |
|
|
273
294
|
| 扫描时间窗 (ms) | `900000` | 中断的最大年龄,同时限制启动轮询的持续时间 |
|
|
@@ -289,7 +310,7 @@ auto-continue:
|
|
|
289
310
|
|
|
290
311
|
匹配项是普通子串, 不是正则表达式。空行会被忽略; 任一行命中后会优先于内置永久错误规则。冷却与最大连续次数仍然生效。
|
|
291
312
|
|
|
292
|
-
`continueText
|
|
313
|
+
`continueText`(以及 `continueTextMaxTokens`、`continueTextSilent`、`continueTextLoop`)支持占位符 `{code}`、`{message}`、`{status}`、`{tool}`(失败前最后一次工具调用)、`{turn}`、`{errorCount}`(连续失败次数, 含本次)、`{sessionTitle}`(来自会话列表)和 `{elapsed}`(距失败经过的时间, 如 `1m5s`)——例如 `继续 ({tool}: {code})` 会变成 `继续 (git push: UPSTREAM)`。护栏文本支持 `{tool}` 与 `{result}`(上一步工具输出的截断摘要)。
|
|
293
314
|
|
|
294
315
|
---
|
|
295
316
|
|
|
@@ -299,26 +320,31 @@ auto-continue:
|
|
|
299
320
|
|
|
300
321
|
- 引擎通过 DSH 服务读取会话事件和历史, 浏览器与该宿主通信; 插件不新增第三方服务或凭据存储
|
|
301
322
|
- 恢复时通过 `agent.followup` 发送你配置的文本。循环守卫可先通过 `agent.cancel` 停止空转回合, 再发送恢复提示; 续跑的 Agent 沿用会话已有的工具和权限
|
|
302
|
-
- 保存配置使用 DSH 的设置 API: DSH 0.1.7 写入当前 profile patch, 旧版宿主写入 `~/.dsh/settings.yaml`
|
|
303
|
-
-
|
|
323
|
+
- 保存配置使用 DSH 的设置 API: DSH 0.1.7 / 0.2 写入当前 profile patch, 旧版宿主写入 `~/.dsh/settings.yaml`
|
|
324
|
+
- 重试计数、冷却时间戳、会话级暂停与统计保存在宿主进程内存中,引擎重启后重置;全局 `paused` 开关随其他配置持久化保存
|
|
304
325
|
- 浏览器通知是可选开启的(`notify` 设置), 仅在首次使用时请求一次权限
|
|
305
326
|
|
|
306
327
|
---
|
|
307
328
|
|
|
308
329
|
## 开发
|
|
309
330
|
|
|
310
|
-
|
|
331
|
+
使用 Node.js 22,安装两个锁定版本的运行时测试环境,即可在本地执行 CI 检查:
|
|
311
332
|
|
|
312
333
|
```bash
|
|
313
|
-
npm
|
|
314
|
-
npm
|
|
315
|
-
npm
|
|
316
|
-
npm run
|
|
334
|
+
npm ci
|
|
335
|
+
npm ci --prefix tests/fixtures/dsh-0.1.7
|
|
336
|
+
npm ci --prefix tests/fixtures/dsh-0.2.0
|
|
337
|
+
npm run typecheck
|
|
338
|
+
npm run build
|
|
339
|
+
npm test
|
|
340
|
+
npm run test:runtime
|
|
317
341
|
```
|
|
318
342
|
|
|
319
|
-
`npm run
|
|
343
|
+
`npm test` 覆盖错误恢复、自主循环上限与开关、启动扫描、队列顺序、统计、本地化以及设置界面的生命周期。`npm run test:runtime` 使用已发布的 DSH **0.1.7-rc.2** 和 **0.2.0-rc.1** Settings、Loader、HTTP 组件,并运行真实的 0.2 profile 兼容检查,以及 Cordis 4.0.4 中缺少其中一种设置服务时的客户端激活测试。运行时测试使用受控的 agent 事件,不会向模型服务发送请求。
|
|
344
|
+
|
|
345
|
+
`npm run watch` 监听本地代码并重新构建。宿主开启 client HMR 时可以热重载链接的客户端包;否则构建后重启 DSH 并刷新浏览器。
|
|
320
346
|
|
|
321
|
-
CI
|
|
347
|
+
CI 执行类型检查、构建、两组测试、已提交 `lib/` 产物校验及 [dsh-plugin-check](https://github.com/omdsh-dev/dsh-plugin-check),发布也受这些检查约束。更新界面文档时请参考[截图采集说明](docs/screenshots/README.md)。
|
|
322
348
|
|
|
323
349
|
---
|
|
324
350
|
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
# Configuration screenshots
|
|
2
2
|
|
|
3
|
-
Captured on 2026-09-
|
|
4
|
-
**dsh-client-auto-continue 0.
|
|
3
|
+
Captured on 2026-09-30 using **DSH 0.2.0-rc.1** and
|
|
4
|
+
**dsh-client-auto-continue 0.12.1** in Chromium, with DSH's dark theme.
|
|
5
5
|
These are screenshots of the running application in an isolated `DSH_HOME`
|
|
6
6
|
with no user sessions or API keys.
|
|
7
7
|
|
|
8
8
|
| View | English | Chinese | Viewport |
|
|
9
9
|
| --- | --- | --- | --- |
|
|
10
10
|
| Plugins → dsh-client-auto-continue, collapsed card | [01-settings-section.png](01-settings-section.png) | [01-settings-section.zh.png](01-settings-section.zh.png) | 1440 × 760 |
|
|
11
|
-
| Expanded card
|
|
11
|
+
| Expanded card, recovery prompts and autonomous loop | [02-settings-card.png](02-settings-card.png) | [02-settings-card.zh.png](02-settings-card.zh.png) | 1440 × 1400 |
|
|
12
12
|
| Live status and Save / Discard controls | [07-card-panels.png](07-card-panels.png) | [07-card-panels.zh.png](07-card-panels.zh.png) | 1440 × 950 |
|
|
13
13
|
|
|
14
|
-
To refresh them
|
|
15
|
-
the released plugin:
|
|
14
|
+
To refresh them, first verify `dsh --version` is `0.2.0-rc.1`, then create
|
|
15
|
+
an empty DSH home and install the released plugin:
|
|
16
16
|
|
|
17
17
|
```bash
|
|
18
18
|
capture_home="$(mktemp -d)"
|
|
19
|
-
DSH_HOME="$capture_home" dsh plugin --profile web add dsh-client-auto-continue@0.
|
|
19
|
+
DSH_HOME="$capture_home" dsh plugin --profile web add dsh-client-auto-continue@0.12.1
|
|
20
20
|
DSH_HOME="$capture_home" dsh web --no-open
|
|
21
21
|
```
|
|
22
22
|
|
|
@@ -26,7 +26,8 @@ main sidebar's **Plugins** button.
|
|
|
26
26
|
|
|
27
27
|
Capture the collapsed card, expand it for the top-of-page view, then scroll to
|
|
28
28
|
its Save / Discard footer for the final view. Switch **Settings → General →
|
|
29
|
-
Language** to Chinese and
|
|
29
|
+
Language** to Chinese and wait for the translated interface to finish rendering
|
|
30
|
+
before repeating the captures. Use device scale factor 1 and the viewports
|
|
30
31
|
above; keep the UI content unchanged.
|
|
31
32
|
|
|
32
33
|
Before capture, verify that a text change and a numeric change both persist
|