dsh-client-auto-continue 0.4.1 → 0.4.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/README.md CHANGED
@@ -47,11 +47,11 @@ It watches the live event streams and reacts to:
47
47
  | Event | Meaning |
48
48
  | --- | --- |
49
49
  | `turn/end` → `error` | Turn failed (model / network / timeout, …) |
50
- | `turn/end` → `interrupted` | Crash-orphaned turn left behind by a host restart |
50
+ | `turn/end` → `interrupted` | Crash-orphaned turn left behind by a host restart (recovered by the startup scan) |
51
51
  | `turn/end` → `max-tokens` | Output token ceiling reached |
52
52
  | `host/agent-error` | Agent failure with no turn position |
53
53
 
54
- **Never auto-continues:** user-aborted turns (`aborted`) or policy rejections (`blocked`); sessions the host already resumed itself; running sessions or sessions with queued messages; subagent sessions; anything inside the cooldown / consecutive-cap windows (configurable in the settings card, below).
54
+ **Never auto-continues:** user-aborted turns (`aborted`) or policy rejections (`blocked`); live `interrupted` turn-ends too — that marker is only written by crash repair when the host reloads, so orphaned turns are recovered by the startup scan, not the live path; sessions the host already resumed itself; running sessions or sessions with queued messages; subagent sessions; anything inside the cooldown / consecutive-cap windows (configurable in the settings card, below).
55
55
 
56
56
  ---
57
57
 
@@ -129,15 +129,17 @@ dsh web
129
129
  > strings anywhere. Run it once, and re-run after reinstalling dsh:
130
130
  >
131
131
  > ```sh
132
- > node node_modules/dsh-client-auto-continue/scripts/patch-expose.mjs
132
+ > npx --yes --package dsh-client-auto-continue patch-expose
133
133
  > dsh web
134
134
  > ```
135
135
  >
136
- > The patch script ships inside the npm package (no repo clone needed) and
137
- > covers every reachable dsh installation: the profile-linked copy, a global
138
- > `npm i -g @deepseek-ai/dsh` install, and the invoking directory's own. The
139
- > auto-continue engine itself works without this patch it only gates the
140
- > GUI settings section.
136
+ > The patch script ships inside the npm package as a `bin` (works from any
137
+ > directory in a fresh environment no repo clone, no profile-path guessing)
138
+ > and covers every reachable dsh installation: the profile-linked copy, a
139
+ > global `npm i -g @deepseek-ai/dsh` install, and the invoking directory's
140
+ > own. If you installed from this repository instead, the same script is
141
+ > `node scripts/patch-expose.mjs` at the repo root. The auto-continue engine
142
+ > itself works without this patch — it only gates the GUI settings section.
141
143
 
142
144
  ### Verify & uninstall
143
145
 
package/README.zh.md CHANGED
@@ -47,11 +47,11 @@
47
47
  | 事件 | 含义 |
48
48
  | --- | --- |
49
49
  | `turn/end` → `error` | 回合失败(模型 / 网络 / 超时等) |
50
- | `turn/end` → `interrupted` | 宿主崩溃重启后遗留的中断回合 |
50
+ | `turn/end` → `interrupted` | 宿主崩溃重启后遗留的中断回合(由启动扫描恢复) |
51
51
  | `turn/end` → `max-tokens` | 达到输出 token 上限 |
52
52
  | `host/agent-error` | 无回合位置的 Agent 失败 |
53
53
 
54
- **绝不自动继续:** 用户主动停止(`aborted`)或策略拒绝(`blocked`); 宿主已自行恢复的会话; 正在运行或已有排队消息的会话; 子代理会话; 处于冷却期 / 连续次数上限内的会话(可在设置卡片中调整, 见下)。
54
+ **绝不自动继续:** 用户主动停止(`aborted`)或策略拒绝(`blocked`); 实时流里的 `interrupted` 同样不自动继续——该标记只在宿主重载时由崩溃修复写入, 孤儿回合由启动扫描恢复, 不走实时路径; 宿主已自行恢复的会话; 正在运行或已有排队消息的会话; 子代理会话; 处于冷却期 / 连续次数上限内的会话(可在设置卡片中调整, 见下)。
55
55
 
56
56
  ---
57
57
 
@@ -128,13 +128,15 @@ dsh web
128
128
  > 没有任何插件相关的硬编码字符串。执行一次即可, 重新安装 dsh 后重跑:
129
129
  >
130
130
  > ```sh
131
- > node node_modules/dsh-client-auto-continue/scripts/patch-expose.mjs
131
+ > npx --yes --package dsh-client-auto-continue patch-expose
132
132
  > dsh web
133
133
  > ```
134
134
  >
135
- > 补丁脚本随 npm 包一起发布(无需克隆仓库), 并覆盖所有可达的 dsh 安装: profile
136
- > 链接副本、全局 `npm i -g @deepseek-ai/dsh` 安装、以及当前目录的安装。自动续跑
137
- > 引擎本身不依赖这个补丁——它只影响 GUI 设置区是否可见。
135
+ > 补丁脚本随 npm 包以 `bin` 形式发布(全新环境下任意目录都能直接执行, 无需克隆仓库、
136
+ > 无需猜测 profile 路径), 并覆盖所有可达的 dsh 安装: profile 链接副本、全局
137
+ > `npm i -g @deepseek-ai/dsh` 安装、以及当前目录的安装。若是从本仓库安装,
138
+ > 同一脚本在仓库根目录执行 `node scripts/patch-expose.mjs` 即可。自动续跑引擎
139
+ > 本身不依赖这个补丁——它只影响 GUI 设置区是否可见。
138
140
 
139
141
  ### 验证与卸载
140
142
 
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "dsh-client-auto-continue",
3
3
  "description": "DSH Web UI plugin: automatically sends \"继续\" (continue) when a request is interrupted by network errors or other non-human causes",
4
- "version": "0.4.1",
4
+ "version": "0.4.2",
5
5
  "type": "module",
6
6
  "main": "lib/index.js",
7
7
  "types": "lib/types/index.d.ts",
@@ -80,5 +80,8 @@
80
80
  "react": "^18.2.0",
81
81
  "@deepseek-ai/dsh-settings": "^0.1.0-rc.6",
82
82
  "@deepseek-ai/schemastery": "^3.18.1"
83
+ },
84
+ "bin": {
85
+ "patch-expose": "./scripts/patch-expose.mjs"
83
86
  }
84
87
  }