dsh-input-traffic 0.2.10-beta.2 → 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 +11 -0
- package/INSTALL.md +152 -152
- package/INSTALL.zh.md +151 -151
- package/README.md +10 -7
- package/lib/client.js +1433 -1433
- package/lib/types/client/auto-continue-core.d.ts +102 -102
- package/lib/types/client/auto-continue-core.js +130 -130
- package/lib/types/client/auto-continue-store.d.ts +40 -40
- package/lib/types/client/auto-continue-store.js +92 -92
- package/lib/types/client/index.d.ts +47 -47
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,17 @@
|
|
|
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
|
+
|
|
7
18
|
### 变更:冻结按钮文案与 session-guard 的分工说明
|
|
8
19
|
|
|
9
20
|
- **按钮文案**:`steer.freeze` →「冻结追加」(Freeze & append / 凍結して追加 / 동결 후 추가),
|
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.md
CHANGED
|
@@ -25,14 +25,17 @@
|
|
|
25
25
|
- [日本語 changelog](./CHANGELOG.ja.md)
|
|
26
26
|
- [한국어 changelog](./CHANGELOG.ko.md)
|
|
27
27
|
|
|
28
|
-
> **▼ DSH
|
|
29
|
-
> | DSH 版本 | 队列条 / 冻结按钮 | 繁忙时 Enter 钉住 | 关键差异 |
|
|
30
|
-
> | --- | --- | --- | --- |
|
|
31
|
-
> | 0.1.1-rc.2 | ✅ | ✅ | `conversation.input.right` 仍带 `InputZone` owner(插件已不依赖) |
|
|
32
|
-
> | 0.1.2-rc.1 | ✅ | ✅ | 该槽改为无 owner(`InputBar.tsx:466` 传 `{}`);冻结按钮改读会话标准件 `useSession` |
|
|
28
|
+
> **▼ DSH 版本适配(旧版线 compat)**
|
|
33
29
|
>
|
|
34
|
-
> -
|
|
35
|
-
>
|
|
30
|
+
> 本版本(`0.2.10-beta.x`)**仅支持 DSH < 0.1.2-alpha.1**(0.1.0 / 0.1.1 系列)。
|
|
31
|
+
>
|
|
32
|
+
> | DSH 版本 | 状态 | 安装命令 |
|
|
33
|
+
> | --- | --- | --- |
|
|
34
|
+
> | < 0.1.2-alpha.1 | ✅ 支持(本安装线) | `npm i dsh-input-traffic@compat` |
|
|
35
|
+
> | ≥ 0.1.2-alpha.1 | ❌ **不支持** | 请改用 `npm i dsh-input-traffic@beta`(0.2.11+) |
|
|
36
|
+
>
|
|
37
|
+
> - **分界点**:`@deepseek-ai/dsh-client-runtime` 在 DSH `0.1.2-alpha.1` 被整体删除(commit `be531688f3`)。本版本仍使用它发布的 `ClientContext` / `SessionId`,所以在 0.1.2+ 上会解析失败——`engines.dsh` 已收窄为 `>=0.1.0-rc.7 <0.1.2-alpha.1` 以挡住误装。
|
|
38
|
+
> - **序列关系**:`compat` = 0.1.0/0.1.1 线(本版本);`beta` = 0.1.2+ 线(0.2.11 起,改为从 `@deepseek-ai/cordis` 取 `Context`)。两条线互不覆盖。
|
|
36
39
|
> - **队列条位置**:注册 `order: 1000`,排在 `conversation.input.dock` 带内所有已知条目(todo 0 / goal 10 / 官方 queue 20 / dsh-perm-gate 提示 30)之后,紧贴输入卡片。DSH 没有 "last" 语义,这是约定而非结构性保证——第三方插件若注册更大的 `order` 仍可能插到它下面。
|
|
37
40
|
|
|
38
41
|
> **兼容性说明:** v0.2.9 已包含日语(`ja`)和韩语(`ko`)字典,但当前官方 DSH 只通过 `LocaleRuntime` 提供 `zh` 和 `en`。在原版 DSH 中选择 `ja` 或 `ko` 会失败,并提示 `locale "<id>" is not registered`。需要等待官方 DSH 增加对应 locale ID 后才能正常使用。高级用户可以维护 DSH fork,在 `packages/client/locale/src/locale-settings.ts` 更新 `LOCALE_IDS`,在 `packages/client/locale/src/client/index.ts` 更新 `LOCALES` 标签,并补齐核心字典和测试,然后重新构建并运行 fork 版本。仅修改本插件无法扩展 DSH 的全局 locale 列表。
|