dsh-input-traffic 0.2.10-beta.1 → 0.2.10-beta.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -4,6 +4,27 @@
4
4
 
5
5
  ## Unreleased
6
6
 
7
+ ### 变更:本线收窄为 DSH < 0.1.2-alpha.1(旧版线 compat,0.2.10-beta.3)
8
+
9
+ - **`engines.dsh` 上限收窄**:`>=0.1.0-rc.7 <0.2.0-0` → `>=0.1.0-rc.7 <0.1.2-alpha.1`。
10
+ 原上限声称兼容到 0.2.0,但 `@deepseek-ai/dsh-client-runtime` 在 DSH `0.1.2-alpha.1`
11
+ 已被整体删除(commit `be531688f3`),本版本仍依赖它发布的 `ClientContext` / `SessionId`,
12
+ 在 0.1.2+ 上会解析失败。收窄后安装器能挡住误装。
13
+ - **双线分工**:`compat` dist-tag = 本线(DSH 0.1.0/0.1.1);`beta` dist-tag = 0.1.2+ 线
14
+ (0.2.11 起,`ClientContext` 改由 `@deepseek-ai/cordis` 提供)。两条线互不覆盖,
15
+ 升级 DSH 到 0.1.2+ 时需换线。
16
+ - **代码不变**:本版本只改 engines、版本号与文档,`src/` 与 `lib/` 与 0.2.10-beta.2 一致。
17
+
18
+ ### 变更:冻结按钮文案与 session-guard 的分工说明
19
+
20
+ - **按钮文案**:`steer.freeze` →「冻结追加」(Freeze & append / 凍結して追加 / 동결 후 추가),
21
+ `steer.resume` →「恢复追加」(Resume & append / 再開して追加 / 재개 후 추가)——与 session-guard 新增的
22
+ 「暂停会话 / 继续会话」按钮并列,避免两个「恢复」混淆。只改文案,行为不变。
23
+ - **职责边界**(README 新增小节):本插件只负责「排」——决定用户输入进 `next-step` 还是 `next-turn`、
24
+ 什么档位、何时被消费(`updateQueue(steer|remove|edit)` / `send` / `cancel`);session-guard 只负责「停」——
25
+ `agent/pre-step` step 门、回合级暂停、请求级 hold。`next-step` 的物理含义是「与工具返回同级的下一步
26
+ (同一 turn 内)」,`next-turn` 才是新回合。
27
+
7
28
  ### 新增:DSH 双版本兼容(0.1.1-rc.2 / 0.1.2-rc.1)
8
29
 
9
30
  - **单一产物,运行时自适应**:同一份 `lib/client.js` 在两个版本都能加载,无版本号字符串分支。
package/INSTALL.md CHANGED
@@ -1,152 +1,152 @@
1
- # Installation Guide (Official DSH CLI)
2
-
3
- This guide uses only the official DSH `dsh plugin` command. The command installs the dependency into a profile and synchronizes `dsh.profile.bundles`. Do not replace it with plain `npm install`, direct `pnpm add` in the profile, or manual edits to the profile manifest.
4
-
5
- - [English installation guide](./INSTALL.md)
6
- - [中文安装指南](./INSTALL.zh.md)
7
- - [日本語インストールガイド](./INSTALL.ja.md)
8
- - [한국어 설치 안내](./INSTALL.ko.md)
9
- - [English README](./README.en.md)
10
- - [中文 README](./README.md)
11
- - [日本語 README](./README.ja.md)
12
- - [한국어 README](./README.ko.md)
13
- - [Changelog](./CHANGELOG.md)
14
- - [日本語 changelog](./CHANGELOG.ja.md)
15
- - [한국어 changelog](./CHANGELOG.ko.md)
16
-
17
- The placeholders in this guide are:
18
-
19
- - `<profile>`: the DSH profile to modify, usually `web`;
20
- - `dsh-input-traffic`: the npm package and runtime plugin ID.
21
-
22
- ## 0. Prerequisites and profile discovery
23
-
24
- ```bash
25
- echo "DSH_HOME=${DSH_HOME:-$HOME/.dsh}"
26
- dsh --version
27
- ls "${DSH_HOME:-$HOME/.dsh}/profiles"
28
- ```
29
-
30
- Use the profile named by your running DSH process. `web` is common, but the active `--profile` argument is authoritative.
31
-
32
- ## 1. Official installation
33
-
34
- Install the latest version:
35
-
36
- ```bash
37
- dsh plugin --profile <profile> add dsh-input-traffic -w
38
- ```
39
-
40
- (The `-w` flag is required when the profile is a pnpm workspace root, as `web` is.)
41
-
42
- Install the current release explicitly:
43
-
44
- ```bash
45
- dsh plugin --profile <profile> add dsh-input-traffic@0.2.9 -w
46
- ```
47
-
48
- The official CLI updates the profile dependency, lockfile, and `dsh.profile.bundles` automatically. Do not add a manual YAML row.
49
-
50
- ### Supply-chain cooling period
51
-
52
- The dsh runtime uses pnpm 11, whose `minimumReleaseAge` policy may block a freshly published version with `ERR_PNPM_MINIMUM_RELEASE_AGE_VIOLATION`. Add the version to `minimumReleaseAgeExclude` in `~/.dsh/profiles/web/pnpm-workspace.yaml`:
53
-
54
- ```yaml
55
- minimumReleaseAgeExclude:
56
- - dsh-input-traffic@0.2.9
57
- ```
58
-
59
- ## 2. Upgrade
60
-
61
- Upgrade to the latest registry version:
62
-
63
- ```bash
64
- dsh plugin --profile <profile> update dsh-input-traffic -w
65
- ```
66
-
67
- Restart DSH for host changes and refresh the Web page for client changes.
68
-
69
- ## 3. Local-path / link: registration (alternative)
70
-
71
- For development or offline installs, register the plugin from a local checkout:
72
-
73
- ```bash
74
- # ~/.dsh/profiles/web/package.json dependencies:
75
- # "dsh-input-traffic": "link:<absolute path to dsh-input-traffic>"
76
- # ~/.dsh/profiles/web/cordis.patch.yml:
77
- # - insert:
78
- # - id: input-traffic
79
- # name: dsh-input-traffic
80
- cd ~/.dsh/profiles/web && pnpm install && dsh web
81
- ```
82
-
83
- Or use the official CLI with a local path (no network needed):
84
-
85
- ```bash
86
- dsh plugin --profile <profile> add /absolute/path/to/dsh-input-traffic -w
87
- ```
88
-
89
- ## 4. Verify installation
90
-
91
- Check the dependency and installed version:
92
-
93
- ```bash
94
- grep -n "dsh-input-traffic" \
95
- "${DSH_HOME:-$HOME/.dsh}/profiles/<profile>/package.json"
96
- node -p "require('${DSH_HOME:-$HOME/.dsh}/profiles/<profile>/node_modules/dsh-input-traffic/package.json').version"
97
- ```
98
-
99
- Check the official composition:
100
-
101
- ```bash
102
- dsh --profile <profile> --dump-default-config
103
- ```
104
-
105
- It must contain:
106
-
107
- ```yaml
108
- - id: input-traffic
109
- name: dsh-input-traffic
110
- ```
111
-
112
- ## 5. Verify the plugin
113
-
114
- Restart DSH, then refresh the Web page. In a session, verify:
115
-
116
- 1. The three-tier planning dock appears in the waiting area;
117
- 2. The "Freeze session" button is visible on the composer's right;
118
- 3. The official "busy-Enter behavior" settings row is hidden;
119
- 4. While the agent is busy, sending a message places it in the waiting area with red/yellow/green planning buttons.
120
-
121
- ## Japanese and Korean support status
122
-
123
- The plugin ships `ja` and `ko` dictionaries, but the current official DSH release exposes only `zh` and `en` through `LocaleRuntime`. On stock DSH, selecting Japanese or Korean fails with `locale "<id>" is not registered`.
124
-
125
- To use them before official support lands, maintain a DSH fork and update:
126
-
127
- - `packages/client/locale/src/locale-settings.ts`: add `ja` and `ko` to `LOCALE_IDS`.
128
- - `packages/client/locale/src/client/index.ts`: add `{ id: 'ja', label: '日本語' }` and `{ id: 'ko', label: '한국어' }` to `LOCALES`.
129
- - Add the corresponding core dictionaries and tests, then rebuild and run the forked DSH.
130
-
131
- A plugin-only change cannot extend DSH's global locale list.
132
-
133
- ## 6. Troubleshooting
134
-
135
- | Symptom | Action |
136
- | --- | --- |
137
- | `dsh` is not found | Install or enable the official DSH CLI. |
138
- | `ERR_PNPM_MINIMUM_RELEASE_AGE_VIOLATION` | Add the version to `minimumReleaseAgeExclude` in the profile's `pnpm-workspace.yaml`. |
139
- | Plugin shows as "disabled/unmounted" with no error | Check the profile composition. |
140
- | Client entry missing from `__DSH_BOOT__` | Confirm `exports["./client"]` exists and the host fiber was established. |
141
- | Freeze/resume buttons not working | Ensure session-guard is installed if using session-level locking; the plugin operates fail-open when session-guard is absent. |
142
- | Stale client bundle | Hard-refresh the browser (Ctrl+Shift+R) after an upgrade. |
143
-
144
- ## 7. Remove
145
-
146
- Use the official command:
147
-
148
- ```bash
149
- dsh plugin --profile <profile> remove dsh-input-traffic
150
- ```
151
-
152
- Restart DSH afterwards to restore the official queue dock and the "busy-Enter behavior" settings row.
1
+ # Installation Guide (Official DSH CLI)
2
+
3
+ This guide uses only the official DSH `dsh plugin` command. The command installs the dependency into a profile and synchronizes `dsh.profile.bundles`. Do not replace it with plain `npm install`, direct `pnpm add` in the profile, or manual edits to the profile manifest.
4
+
5
+ - [English installation guide](./INSTALL.md)
6
+ - [中文安装指南](./INSTALL.zh.md)
7
+ - [日本語インストールガイド](./INSTALL.ja.md)
8
+ - [한국어 설치 안내](./INSTALL.ko.md)
9
+ - [English README](./README.en.md)
10
+ - [中文 README](./README.md)
11
+ - [日本語 README](./README.ja.md)
12
+ - [한국어 README](./README.ko.md)
13
+ - [Changelog](./CHANGELOG.md)
14
+ - [日本語 changelog](./CHANGELOG.ja.md)
15
+ - [한국어 changelog](./CHANGELOG.ko.md)
16
+
17
+ The placeholders in this guide are:
18
+
19
+ - `<profile>`: the DSH profile to modify, usually `web`;
20
+ - `dsh-input-traffic`: the npm package and runtime plugin ID.
21
+
22
+ ## 0. Prerequisites and profile discovery
23
+
24
+ ```bash
25
+ echo "DSH_HOME=${DSH_HOME:-$HOME/.dsh}"
26
+ dsh --version
27
+ ls "${DSH_HOME:-$HOME/.dsh}/profiles"
28
+ ```
29
+
30
+ Use the profile named by your running DSH process. `web` is common, but the active `--profile` argument is authoritative.
31
+
32
+ ## 1. Official installation
33
+
34
+ Install the latest version:
35
+
36
+ ```bash
37
+ dsh plugin --profile <profile> add dsh-input-traffic -w
38
+ ```
39
+
40
+ (The `-w` flag is required when the profile is a pnpm workspace root, as `web` is.)
41
+
42
+ Install the current release explicitly:
43
+
44
+ ```bash
45
+ dsh plugin --profile <profile> add dsh-input-traffic@0.2.9 -w
46
+ ```
47
+
48
+ The official CLI updates the profile dependency, lockfile, and `dsh.profile.bundles` automatically. Do not add a manual YAML row.
49
+
50
+ ### Supply-chain cooling period
51
+
52
+ The dsh runtime uses pnpm 11, whose `minimumReleaseAge` policy may block a freshly published version with `ERR_PNPM_MINIMUM_RELEASE_AGE_VIOLATION`. Add the version to `minimumReleaseAgeExclude` in `~/.dsh/profiles/web/pnpm-workspace.yaml`:
53
+
54
+ ```yaml
55
+ minimumReleaseAgeExclude:
56
+ - dsh-input-traffic@0.2.9
57
+ ```
58
+
59
+ ## 2. Upgrade
60
+
61
+ Upgrade to the latest registry version:
62
+
63
+ ```bash
64
+ dsh plugin --profile <profile> update dsh-input-traffic -w
65
+ ```
66
+
67
+ Restart DSH for host changes and refresh the Web page for client changes.
68
+
69
+ ## 3. Local-path / link: registration (alternative)
70
+
71
+ For development or offline installs, register the plugin from a local checkout:
72
+
73
+ ```bash
74
+ # ~/.dsh/profiles/web/package.json dependencies:
75
+ # "dsh-input-traffic": "link:<absolute path to dsh-input-traffic>"
76
+ # ~/.dsh/profiles/web/cordis.patch.yml:
77
+ # - insert:
78
+ # - id: input-traffic
79
+ # name: dsh-input-traffic
80
+ cd ~/.dsh/profiles/web && pnpm install && dsh web
81
+ ```
82
+
83
+ Or use the official CLI with a local path (no network needed):
84
+
85
+ ```bash
86
+ dsh plugin --profile <profile> add /absolute/path/to/dsh-input-traffic -w
87
+ ```
88
+
89
+ ## 4. Verify installation
90
+
91
+ Check the dependency and installed version:
92
+
93
+ ```bash
94
+ grep -n "dsh-input-traffic" \
95
+ "${DSH_HOME:-$HOME/.dsh}/profiles/<profile>/package.json"
96
+ node -p "require('${DSH_HOME:-$HOME/.dsh}/profiles/<profile>/node_modules/dsh-input-traffic/package.json').version"
97
+ ```
98
+
99
+ Check the official composition:
100
+
101
+ ```bash
102
+ dsh --profile <profile> --dump-default-config
103
+ ```
104
+
105
+ It must contain:
106
+
107
+ ```yaml
108
+ - id: input-traffic
109
+ name: dsh-input-traffic
110
+ ```
111
+
112
+ ## 5. Verify the plugin
113
+
114
+ Restart DSH, then refresh the Web page. In a session, verify:
115
+
116
+ 1. The three-tier planning dock appears in the waiting area;
117
+ 2. The "Freeze session" button is visible on the composer's right;
118
+ 3. The official "busy-Enter behavior" settings row is hidden;
119
+ 4. While the agent is busy, sending a message places it in the waiting area with red/yellow/green planning buttons.
120
+
121
+ ## Japanese and Korean support status
122
+
123
+ The plugin ships `ja` and `ko` dictionaries, but the current official DSH release exposes only `zh` and `en` through `LocaleRuntime`. On stock DSH, selecting Japanese or Korean fails with `locale "<id>" is not registered`.
124
+
125
+ To use them before official support lands, maintain a DSH fork and update:
126
+
127
+ - `packages/client/locale/src/locale-settings.ts`: add `ja` and `ko` to `LOCALE_IDS`.
128
+ - `packages/client/locale/src/client/index.ts`: add `{ id: 'ja', label: '日本語' }` and `{ id: 'ko', label: '한국어' }` to `LOCALES`.
129
+ - Add the corresponding core dictionaries and tests, then rebuild and run the forked DSH.
130
+
131
+ A plugin-only change cannot extend DSH's global locale list.
132
+
133
+ ## 6. Troubleshooting
134
+
135
+ | Symptom | Action |
136
+ | --- | --- |
137
+ | `dsh` is not found | Install or enable the official DSH CLI. |
138
+ | `ERR_PNPM_MINIMUM_RELEASE_AGE_VIOLATION` | Add the version to `minimumReleaseAgeExclude` in the profile's `pnpm-workspace.yaml`. |
139
+ | Plugin shows as "disabled/unmounted" with no error | Check the profile composition. |
140
+ | Client entry missing from `__DSH_BOOT__` | Confirm `exports["./client"]` exists and the host fiber was established. |
141
+ | Freeze/resume buttons not working | Ensure session-guard is installed if using session-level locking; the plugin operates fail-open when session-guard is absent. |
142
+ | Stale client bundle | Hard-refresh the browser (Ctrl+Shift+R) after an upgrade. |
143
+
144
+ ## 7. Remove
145
+
146
+ Use the official command:
147
+
148
+ ```bash
149
+ dsh plugin --profile <profile> remove dsh-input-traffic
150
+ ```
151
+
152
+ Restart DSH afterwards to restore the official queue dock and the "busy-Enter behavior" settings row.
package/INSTALL.zh.md CHANGED
@@ -1,151 +1,151 @@
1
- # 安装指南(官方 DSH CLI)
2
-
3
- 本指南只使用官方 `dsh plugin` 命令。该命令会把依赖装进 profile 并同步 `dsh.profile.bundles`。不要用普通 `npm install`、在 profile 里直接 `pnpm add` 或手工编辑 profile 清单代替。
4
-
5
- - [安装指南](./INSTALL.zh.md)
6
- - [English installation guide](./INSTALL.md)
7
- - [日本語インストールガイド](./INSTALL.ja.md)
8
- - [한국어 설치 안내](./INSTALL.ko.md)
9
- - [中文 README](./README.md)
10
- - [English README](./README.en.md)
11
- - [日本語 README](./README.ja.md)
12
- - [한국어 README](./README.ko.md)
13
- - [版本更新日志](./CHANGELOG.md)
14
- - [日本語 changelog](./CHANGELOG.ja.md)
15
- - [한국어 changelog](./CHANGELOG.ko.md)
16
-
17
- 本指南中的占位符:
18
-
19
- - `<profile>`:要修改的 DSH profile,通常是 `web`;
20
- - `dsh-input-traffic`:npm 包名与运行时插件 ID。
21
-
22
- ## 0. 前置检查与 profile 确认
23
-
24
- ```bash
25
- echo "DSH_HOME=${DSH_HOME:-$HOME/.dsh}"
26
- dsh --version
27
- ls "${DSH_HOME:-$HOME/.dsh}/profiles"
28
- ```
29
-
30
- 使用你正在运行的 DSH 进程对应的 profile。`web` 很常见,但以实际 `--profile` 参数为准。
31
-
32
- ## 1. 官方安装
33
-
34
- 安装最新版本:
35
-
36
- ```bash
37
- dsh plugin --profile <profile> add dsh-input-traffic -w
38
- ```
39
-
40
- (当 profile 是 pnpm workspace root 时必须带 `-w`,`web` 就是。)
41
-
42
- 显式安装当前发布版:
43
-
44
- ```bash
45
- dsh plugin --profile <profile> add dsh-input-traffic@0.2.9 -w
46
- ```
47
-
48
- 官方 CLI 会自动更新 profile 依赖、锁文件与 `dsh.profile.bundles`。不要手工追加 YAML。
49
-
50
- ### 供应链冷却期
51
-
52
- dsh 运行环境使用 pnpm 11,其 `minimumReleaseAge` 策略可能拦截刚发布的版本,报 `ERR_PNPM_MINIMUM_RELEASE_AGE_VIOLATION`。把版本加入 `~/.dsh/profiles/web/pnpm-workspace.yaml` 的 `minimumReleaseAgeExclude`:
53
-
54
- ```yaml
55
- minimumReleaseAgeExclude:
56
- - dsh-input-traffic@0.2.9
57
- ```
58
-
59
- ## 2. 升级
60
-
61
- 升级到 registry 最新版本:
62
-
63
- ```bash
64
- dsh plugin --profile <profile> update dsh-input-traffic -w
65
- ```
66
-
67
- 宿主侧改动需重启 DSH;浏览器侧刷新 Web 页面。
68
-
69
- ## 3. 本地路径 / link: 注册(备选)
70
-
71
- 开发或离线安装时,可以从本地检出注册插件:
72
-
73
- ```bash
74
- # ~/.dsh/profiles/web/package.json dependencies 增加:
75
- # "dsh-input-traffic": "link:<dsh-input-traffic 的绝对路径>"
76
- # ~/.dsh/profiles/web/cordis.patch.yml:
77
- # - insert:
78
- # - id: input-traffic
79
- # name: dsh-input-traffic
80
- cd ~/.dsh/profiles/web && pnpm install && dsh web
81
- ```
82
-
83
- 或用官方 CLI 加本地路径(无需网络):
84
-
85
- ```bash
86
- dsh plugin --profile <profile> add /dsh-input-traffic 的绝对路径/ -w
87
- ```
88
-
89
- ## 4. 验证安装
90
-
91
- 检查依赖与安装版本:
92
-
93
- ```bash
94
- grep -n "dsh-input-traffic" \
95
- "${DSH_HOME:-$HOME/.dsh}/profiles/<profile>/package.json"
96
- ```
97
-
98
- 检查官方组合配置:
99
-
100
- ```bash
101
- dsh --profile <profile> --dump-default-config
102
- ```
103
-
104
- 应包含:
105
-
106
- ```yaml
107
- - id: input-traffic
108
- name: dsh-input-traffic
109
- ```
110
-
111
- ## 5. 验证插件
112
-
113
- 重启 DSH 后刷新 Web 页面。在会话中验证:
114
-
115
- 1. 等待区出现三档规划 dock;
116
- 2. 输入框右侧显示「冻结会话」按钮;
117
- 3. 公式设置面板的「繁忙时 Enter 键行为」设置行已隐藏;
118
- 4. 智能体忙碌时发送消息,消息进入等待区并显示红/黄/绿规划按钮。
119
-
120
- ## 日语与韩语支持状态
121
-
122
- 插件自带 `ja` 与 `ko` 字典,但当前官方 DSH 只通过 `LocaleRuntime` 暴露 `zh` 和 `en`。在原版 DSH 上选择日语或韩语会报 `locale "<id>" is not registered`。
123
-
124
- 官方支持落地前要使用它们,请维护 DSH fork 并更新:
125
-
126
- - `packages/client/locale/src/locale-settings.ts`:把 `ja` 与 `ko` 加入 `LOCALE_IDS`。
127
- - `packages/client/locale/src/client/index.ts`:在 `LOCALES` 中加入 `{ id: 'ja', label: '日本語' }` 与 `{ id: 'ko', label: '한국어' }`。
128
- - 补齐对应的核心字典与测试,然后重新构建并运行 fork 版本。
129
-
130
- 仅修改插件无法扩展 DSH 的全局 locale 列表。
131
-
132
- ## 6. 排查
133
-
134
- | 症状 | 处理 |
135
- | --- | --- |
136
- | 找不到 `dsh` 命令 | 安装或启用官方 DSH CLI。 |
137
- | `ERR_PNPM_MINIMUM_RELEASE_AGE_VIOLATION` | 把版本加入 profile 的 `pnpm-workspace.yaml` 的 `minimumReleaseAgeExclude`。 |
138
- | 插件显示「已停用/未挂载」且无错误 | 检查 profile 组合。 |
139
- | client 入口不在 `__DSH_BOOT__` | 确认 `exports["./client"]` 存在且 host fiber 已建立。 |
140
- | 冻结/恢复按钮不工作 | 如使用会话级锁定,确保 session-guard 已安装;未安装时插件以 fail-open 方式运行。 |
141
- | 浏览器显示旧 bundle | 升级后硬刷新(Ctrl+Shift+R)。 |
142
-
143
- ## 7. 卸载
144
-
145
- 使用官方命令:
146
-
147
- ```bash
148
- dsh plugin --profile <profile> remove dsh-input-traffic
149
- ```
150
-
151
- 重启后,公式队列 dock 与「繁忙时 Enter 键行为」设置行将恢复。
1
+ # 安装指南(官方 DSH CLI)
2
+
3
+ 本指南只使用官方 `dsh plugin` 命令。该命令会把依赖装进 profile 并同步 `dsh.profile.bundles`。不要用普通 `npm install`、在 profile 里直接 `pnpm add` 或手工编辑 profile 清单代替。
4
+
5
+ - [安装指南](./INSTALL.zh.md)
6
+ - [English installation guide](./INSTALL.md)
7
+ - [日本語インストールガイド](./INSTALL.ja.md)
8
+ - [한국어 설치 안내](./INSTALL.ko.md)
9
+ - [中文 README](./README.md)
10
+ - [English README](./README.en.md)
11
+ - [日本語 README](./README.ja.md)
12
+ - [한국어 README](./README.ko.md)
13
+ - [版本更新日志](./CHANGELOG.md)
14
+ - [日本語 changelog](./CHANGELOG.ja.md)
15
+ - [한국어 changelog](./CHANGELOG.ko.md)
16
+
17
+ 本指南中的占位符:
18
+
19
+ - `<profile>`:要修改的 DSH profile,通常是 `web`;
20
+ - `dsh-input-traffic`:npm 包名与运行时插件 ID。
21
+
22
+ ## 0. 前置检查与 profile 确认
23
+
24
+ ```bash
25
+ echo "DSH_HOME=${DSH_HOME:-$HOME/.dsh}"
26
+ dsh --version
27
+ ls "${DSH_HOME:-$HOME/.dsh}/profiles"
28
+ ```
29
+
30
+ 使用你正在运行的 DSH 进程对应的 profile。`web` 很常见,但以实际 `--profile` 参数为准。
31
+
32
+ ## 1. 官方安装
33
+
34
+ 安装最新版本:
35
+
36
+ ```bash
37
+ dsh plugin --profile <profile> add dsh-input-traffic -w
38
+ ```
39
+
40
+ (当 profile 是 pnpm workspace root 时必须带 `-w`,`web` 就是。)
41
+
42
+ 显式安装当前发布版:
43
+
44
+ ```bash
45
+ dsh plugin --profile <profile> add dsh-input-traffic@0.2.9 -w
46
+ ```
47
+
48
+ 官方 CLI 会自动更新 profile 依赖、锁文件与 `dsh.profile.bundles`。不要手工追加 YAML。
49
+
50
+ ### 供应链冷却期
51
+
52
+ dsh 运行环境使用 pnpm 11,其 `minimumReleaseAge` 策略可能拦截刚发布的版本,报 `ERR_PNPM_MINIMUM_RELEASE_AGE_VIOLATION`。把版本加入 `~/.dsh/profiles/web/pnpm-workspace.yaml` 的 `minimumReleaseAgeExclude`:
53
+
54
+ ```yaml
55
+ minimumReleaseAgeExclude:
56
+ - dsh-input-traffic@0.2.9
57
+ ```
58
+
59
+ ## 2. 升级
60
+
61
+ 升级到 registry 最新版本:
62
+
63
+ ```bash
64
+ dsh plugin --profile <profile> update dsh-input-traffic -w
65
+ ```
66
+
67
+ 宿主侧改动需重启 DSH;浏览器侧刷新 Web 页面。
68
+
69
+ ## 3. 本地路径 / link: 注册(备选)
70
+
71
+ 开发或离线安装时,可以从本地检出注册插件:
72
+
73
+ ```bash
74
+ # ~/.dsh/profiles/web/package.json dependencies 增加:
75
+ # "dsh-input-traffic": "link:<dsh-input-traffic 的绝对路径>"
76
+ # ~/.dsh/profiles/web/cordis.patch.yml:
77
+ # - insert:
78
+ # - id: input-traffic
79
+ # name: dsh-input-traffic
80
+ cd ~/.dsh/profiles/web && pnpm install && dsh web
81
+ ```
82
+
83
+ 或用官方 CLI 加本地路径(无需网络):
84
+
85
+ ```bash
86
+ dsh plugin --profile <profile> add /dsh-input-traffic 的绝对路径/ -w
87
+ ```
88
+
89
+ ## 4. 验证安装
90
+
91
+ 检查依赖与安装版本:
92
+
93
+ ```bash
94
+ grep -n "dsh-input-traffic" \
95
+ "${DSH_HOME:-$HOME/.dsh}/profiles/<profile>/package.json"
96
+ ```
97
+
98
+ 检查官方组合配置:
99
+
100
+ ```bash
101
+ dsh --profile <profile> --dump-default-config
102
+ ```
103
+
104
+ 应包含:
105
+
106
+ ```yaml
107
+ - id: input-traffic
108
+ name: dsh-input-traffic
109
+ ```
110
+
111
+ ## 5. 验证插件
112
+
113
+ 重启 DSH 后刷新 Web 页面。在会话中验证:
114
+
115
+ 1. 等待区出现三档规划 dock;
116
+ 2. 输入框右侧显示「冻结会话」按钮;
117
+ 3. 公式设置面板的「繁忙时 Enter 键行为」设置行已隐藏;
118
+ 4. 智能体忙碌时发送消息,消息进入等待区并显示红/黄/绿规划按钮。
119
+
120
+ ## 日语与韩语支持状态
121
+
122
+ 插件自带 `ja` 与 `ko` 字典,但当前官方 DSH 只通过 `LocaleRuntime` 暴露 `zh` 和 `en`。在原版 DSH 上选择日语或韩语会报 `locale "<id>" is not registered`。
123
+
124
+ 官方支持落地前要使用它们,请维护 DSH fork 并更新:
125
+
126
+ - `packages/client/locale/src/locale-settings.ts`:把 `ja` 与 `ko` 加入 `LOCALE_IDS`。
127
+ - `packages/client/locale/src/client/index.ts`:在 `LOCALES` 中加入 `{ id: 'ja', label: '日本語' }` 与 `{ id: 'ko', label: '한국어' }`。
128
+ - 补齐对应的核心字典与测试,然后重新构建并运行 fork 版本。
129
+
130
+ 仅修改插件无法扩展 DSH 的全局 locale 列表。
131
+
132
+ ## 6. 排查
133
+
134
+ | 症状 | 处理 |
135
+ | --- | --- |
136
+ | 找不到 `dsh` 命令 | 安装或启用官方 DSH CLI。 |
137
+ | `ERR_PNPM_MINIMUM_RELEASE_AGE_VIOLATION` | 把版本加入 profile 的 `pnpm-workspace.yaml` 的 `minimumReleaseAgeExclude`。 |
138
+ | 插件显示「已停用/未挂载」且无错误 | 检查 profile 组合。 |
139
+ | client 入口不在 `__DSH_BOOT__` | 确认 `exports["./client"]` 存在且 host fiber 已建立。 |
140
+ | 冻结/恢复按钮不工作 | 如使用会话级锁定,确保 session-guard 已安装;未安装时插件以 fail-open 方式运行。 |
141
+ | 浏览器显示旧 bundle | 升级后硬刷新(Ctrl+Shift+R)。 |
142
+
143
+ ## 7. 卸载
144
+
145
+ 使用官方命令:
146
+
147
+ ```bash
148
+ dsh plugin --profile <profile> remove dsh-input-traffic
149
+ ```
150
+
151
+ 重启后,公式队列 dock 与「繁忙时 Enter 键行为」设置行将恢复。
package/README.en.md CHANGED
@@ -108,7 +108,18 @@ The freeze button hands off to a **sessionGuard bridge** (`src/client/session-gu
108
108
  - `src/client/freeze-store.ts` — session-scoped freeze state (`Map<sessionId, {frozen, pending}>`, shared by button ↔ dock);
109
109
  - `src/client/session-guard-bridge.ts` — session-guard RPC bridge (fail-open, silently skipped when session-guard is absent);
110
110
  - `src/client/index.ts` — slot registration + composer-block injection (`conversation.blocks.set`).
111
- - **Scope comparison**: this plugin's freeze button = **per-session** (locks that one session by id); session-guard's **auto peak gate = global** (pauses all running sessions on peak entry, resumes all on exit). They complement each other — the gate handles the global case, the button the single-session case.
111
+ - **Scope comparison**: this plugin's freeze button = **per-session** (locks that one session by id); session-guard's **peak auto gate / step gate = global or per-session pause** (holds on peak entry, releases off-peak). They complement each other — this plugin owns the queue and freezing, session-guard owns when progress may happen.
112
+
113
+ **Division of labour (important): this plugin only "orders", session-guard only "stops"**
114
+
115
+ | | This plugin (input-traffic) | session-guard |
116
+ |---|---|---|
117
+ | Job | **which queue** user input goes to, at what tier, and when it is consumed | **when progress may happen** (step / turn / request) |
118
+ | DSH primitives | the `next-step` / `next-turn` pending queues + `updateQueue(steer\|remove\|edit)` / `send` / `cancel` | `agent/pre-step` (step gate), `agent.cancel({keepInbox:true})` + `goals.pause`, `agent/request` hold |
119
+ | Freeze | detach `queued` + `steering` rows (**tiers preserved**) + composer block | `stopNextTurn`: **release the step gate first**, then turn-level pause (otherwise both wait on each other) |
120
+ | Resume | re-submit by tier (red cancel+send / yellow steer / green send) | `resume`: continue from the pause point |
121
+
122
+ The two queues mean: `next-step` = "the next step, **same level as a tool result**, still inside the same turn"; `next-turn` = "a new turn". That is why the yellow tier inserts into the current turn and the green tier waits for the turn to close.
112
123
 
113
124
  ## Queue management
114
125