dsh-input-traffic 0.2.10-beta.2 → 0.2.11-beta.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/CHANGELOG.md CHANGED
@@ -4,6 +4,15 @@
4
4
 
5
5
  ## Unreleased
6
6
 
7
+ ### 破坏性:仅支持 DSH 0.1.2+,完成 `dsh-client-runtime` 移除替换(0.2.11-beta.1)
8
+
9
+ - **`engines.dsh` 收窄为 `>=0.1.2-alpha.1 <0.2.0-0`**:`@deepseek-ai/dsh-client-runtime` 在 0.1.2-alpha.1 被整体删除(commit `be531688f3`),该版本即为本插件的硬分段点。旧版线(≤0.2.10-beta.2)继续服务 DSH 0.1.0/0.1.1。
10
+ - **`ClientContext` / `SessionId` 改由真实归属包提供**:`src/client/index.ts` 改为 `import type { Context as ClientContext } from '@deepseek-ai/cordis'` 与 `import type { SessionId } from '@deepseek-ai/dsh-session/types'`,与官方客户端插件一致。
11
+ - **契约拆除 `dsh-client-runtime` 镜像**:`src/types/contracts.d.ts` 删除 `declare module '@deepseek-ai/dsh-client-runtime/client'`;`QueuedMessage` / `SessionSnapshot` / `ISessions` 迁回 `@deepseek-ai/dsh-api-session-controller/client`,`SnapshotSelectorHook` 迁回 `@deepseek-ai/dsh-client-store`。
12
+ - **新增 `src/types/cordis-augment.d.ts`**:把 `slots` / `sessions` / `locale` / `settingsScope` / `conversation` 声明到 cordis `Context`(官方客户端插件的做法),替代已删除的 `ClientContext`;`ctx.get<IConversation>('conversation')` 相应改为 `ctx.get('conversation')`,因为真实 cordis `get` 由 `Context[K]` 决定返回类型。
13
+ - **`SettingsScopeSnapshot` 补齐 `base` / `user` / `revision`**,`SettingsScopeFace.bind` 增加可选 `decode`。
14
+ - **新增 `@deepseek-ai/dsh-session` peerDependency**;其余 `@deepseek-ai/dsh-client-*` peer 区间同步收窄到 `>=0.1.2-alpha.1 <0.2.0-0`。
15
+
7
16
  ### 变更:冻结按钮文案与 session-guard 的分工说明
8
17
 
9
18
  - **按钮文案**:`steer.freeze` →「冻结追加」(Freeze & append / 凍結して追加 / 동결 후 추가),
package/INSTALL.md CHANGED
@@ -1,152 +1,163 @@
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
+ > **Version requirement DSH v0.1.2 or newer.**
23
+ >
24
+ > Check the running version first (`dsh --version`).
25
+ >
26
+ > | DSH version | Action |
27
+ > | --- | --- |
28
+ > | ≥ 0.1.2 | Install this release. |
29
+ > | < 0.1.2 | Stay on the previous plugin line (0.2.10-beta.2 or earlier). Do not run an older plugin build against DSH v0.1.2+ — upgrade the plugin instead. |
30
+ >
31
+ > The boundary is `0.1.2-alpha.1`, where DSH removed `@deepseek-ai/dsh-client-runtime`. This release imports `Context` from `@deepseek-ai/cordis` and `SessionId` from `@deepseek-ai/dsh-session/types` instead, matching the official client plugins.
32
+
33
+ ## 0. Prerequisites and profile discovery
34
+
35
+ ```bash
36
+ echo "DSH_HOME=${DSH_HOME:-$HOME/.dsh}"
37
+ dsh --version
38
+ ls "${DSH_HOME:-$HOME/.dsh}/profiles"
39
+ ```
40
+
41
+ Use the profile named by your running DSH process. `web` is common, but the active `--profile` argument is authoritative.
42
+
43
+ ## 1. Official installation
44
+
45
+ Install the latest version:
46
+
47
+ ```bash
48
+ dsh plugin --profile <profile> add dsh-input-traffic -w
49
+ ```
50
+
51
+ (The `-w` flag is required when the profile is a pnpm workspace root, as `web` is.)
52
+
53
+ Install the current release explicitly:
54
+
55
+ ```bash
56
+ dsh plugin --profile <profile> add dsh-input-traffic@0.2.9 -w
57
+ ```
58
+
59
+ The official CLI updates the profile dependency, lockfile, and `dsh.profile.bundles` automatically. Do not add a manual YAML row.
60
+
61
+ ### Supply-chain cooling period
62
+
63
+ 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`:
64
+
65
+ ```yaml
66
+ minimumReleaseAgeExclude:
67
+ - dsh-input-traffic@0.2.9
68
+ ```
69
+
70
+ ## 2. Upgrade
71
+
72
+ Upgrade to the latest registry version:
73
+
74
+ ```bash
75
+ dsh plugin --profile <profile> update dsh-input-traffic -w
76
+ ```
77
+
78
+ Restart DSH for host changes and refresh the Web page for client changes.
79
+
80
+ ## 3. Local-path / link: registration (alternative)
81
+
82
+ For development or offline installs, register the plugin from a local checkout:
83
+
84
+ ```bash
85
+ # ~/.dsh/profiles/web/package.json dependencies:
86
+ # "dsh-input-traffic": "link:<absolute path to dsh-input-traffic>"
87
+ # ~/.dsh/profiles/web/cordis.patch.yml:
88
+ # - insert:
89
+ # - id: input-traffic
90
+ # name: dsh-input-traffic
91
+ cd ~/.dsh/profiles/web && pnpm install && dsh web
92
+ ```
93
+
94
+ Or use the official CLI with a local path (no network needed):
95
+
96
+ ```bash
97
+ dsh plugin --profile <profile> add /absolute/path/to/dsh-input-traffic -w
98
+ ```
99
+
100
+ ## 4. Verify installation
101
+
102
+ Check the dependency and installed version:
103
+
104
+ ```bash
105
+ grep -n "dsh-input-traffic" \
106
+ "${DSH_HOME:-$HOME/.dsh}/profiles/<profile>/package.json"
107
+ node -p "require('${DSH_HOME:-$HOME/.dsh}/profiles/<profile>/node_modules/dsh-input-traffic/package.json').version"
108
+ ```
109
+
110
+ Check the official composition:
111
+
112
+ ```bash
113
+ dsh --profile <profile> --dump-default-config
114
+ ```
115
+
116
+ It must contain:
117
+
118
+ ```yaml
119
+ - id: input-traffic
120
+ name: dsh-input-traffic
121
+ ```
122
+
123
+ ## 5. Verify the plugin
124
+
125
+ Restart DSH, then refresh the Web page. In a session, verify:
126
+
127
+ 1. The three-tier planning dock appears in the waiting area;
128
+ 2. The "Freeze session" button is visible on the composer's right;
129
+ 3. The official "busy-Enter behavior" settings row is hidden;
130
+ 4. While the agent is busy, sending a message places it in the waiting area with red/yellow/green planning buttons.
131
+
132
+ ## Japanese and Korean support status
133
+
134
+ 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`.
135
+
136
+ To use them before official support lands, maintain a DSH fork and update:
137
+
138
+ - `packages/client/locale/src/locale-settings.ts`: add `ja` and `ko` to `LOCALE_IDS`.
139
+ - `packages/client/locale/src/client/index.ts`: add `{ id: 'ja', label: '日本語' }` and `{ id: 'ko', label: '한국어' }` to `LOCALES`.
140
+ - Add the corresponding core dictionaries and tests, then rebuild and run the forked DSH.
141
+
142
+ A plugin-only change cannot extend DSH's global locale list.
143
+
144
+ ## 6. Troubleshooting
145
+
146
+ | Symptom | Action |
147
+ | --- | --- |
148
+ | `dsh` is not found | Install or enable the official DSH CLI. |
149
+ | `ERR_PNPM_MINIMUM_RELEASE_AGE_VIOLATION` | Add the version to `minimumReleaseAgeExclude` in the profile's `pnpm-workspace.yaml`. |
150
+ | Plugin shows as "disabled/unmounted" with no error | Check the profile composition. |
151
+ | Client entry missing from `__DSH_BOOT__` | Confirm `exports["./client"]` exists and the host fiber was established. |
152
+ | 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. |
153
+ | Stale client bundle | Hard-refresh the browser (Ctrl+Shift+R) after an upgrade. |
154
+
155
+ ## 7. Remove
156
+
157
+ Use the official command:
158
+
159
+ ```bash
160
+ dsh plugin --profile <profile> remove dsh-input-traffic
161
+ ```
162
+
163
+ Restart DSH afterwards to restore the official queue dock and the "busy-Enter behavior" settings row.