@bruc3van/dsh-doctor 0.5.5 → 0.5.7

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.
Files changed (30) hide show
  1. package/README.en.md +77 -181
  2. package/README.md +77 -181
  3. package/migrations/dsh-v0.1.1-rc.2__dsh-v0.1.2-alpha.2/packages.json +1 -3
  4. package/migrations/dsh-v0.1.1-rc.2__dsh-v0.1.2-alpha.2/symbols.json +8 -0
  5. package/migrations/dsh-v0.1.1-rc.2__dsh-v0.1.2-alpha.3/behavior.md +14 -0
  6. package/migrations/dsh-v0.1.1-rc.2__dsh-v0.1.2-alpha.3/config-rules.json +36 -0
  7. package/migrations/dsh-v0.1.1-rc.2__dsh-v0.1.2-alpha.3/manifest.json +19 -0
  8. package/migrations/dsh-v0.1.1-rc.2__dsh-v0.1.2-alpha.3/packages.json +74 -0
  9. package/migrations/dsh-v0.1.1-rc.2__dsh-v0.1.2-alpha.3/services.json +28 -0
  10. package/migrations/dsh-v0.1.1-rc.2__dsh-v0.1.2-alpha.3/symbols.json +134 -0
  11. package/package.json +1 -1
  12. package/skills/dsh-plugin-upgrade/SKILL.md +54 -23
  13. package/skills/dsh-plugin-upgrade/evals/evals.json +55 -0
  14. package/skills/dsh-plugin-upgrade/evals/files/import-move-plugin/README.md +5 -0
  15. package/skills/dsh-plugin-upgrade/evals/files/import-move-plugin/package.json +31 -0
  16. package/skills/dsh-plugin-upgrade/evals/files/import-move-plugin/src/index.ts +20 -0
  17. package/skills/dsh-plugin-upgrade/evals/files/import-move-plugin/src/stores.ts +15 -0
  18. package/skills/dsh-plugin-upgrade/evals/files/settings-plugin/README.md +7 -0
  19. package/skills/dsh-plugin-upgrade/evals/files/settings-plugin/package.json +20 -0
  20. package/skills/dsh-plugin-upgrade/evals/files/settings-plugin/src/index.ts +2 -0
  21. package/skills/dsh-plugin-upgrade/evals/files/settings-plugin/src/namespace-read.ts +6 -0
  22. package/skills/dsh-plugin-upgrade/evals/files/settings-plugin/src/settings.ts +21 -0
  23. package/skills/dsh-plugin-upgrade/evals/trigger-evals.json +22 -0
  24. package/skills/dsh-plugin-upgrade/references/cli-bootstrap.md +6 -4
  25. package/skills/dsh-plugin-upgrade/references/migration-map.md +5 -1
  26. package/skills/dsh-plugin-upgrade/references/source-investigation.md +2 -0
  27. package/skills/dsh-plugin-upgrade/references/verification.md +6 -0
  28. package/src/cli.mjs +7 -3
  29. package/src/migrate-verify.mjs +3 -2
  30. package/src/migrate.mjs +53 -22
package/README.md CHANGED
@@ -2,19 +2,24 @@
2
2
 
3
3
  中文 | [English](README.en.md)
4
4
 
5
- DSH Doctor 帮助 Agent 诊断和升级 DeepSeek Harness 插件:识别新旧版本之间的 API 变化,修改可以确定迁移的代码,提示需要开发者判断的语义变化,重新构建并验证插件。
5
+ DSH Doctor 是给 DSH 插件开发者和 Agent 使用的升级、排障工具。它能找出插件升级时需要修改的地方,自动处理可以确定的改动,并继续检查依赖、构建产物和实际安装运行情况。
6
6
 
7
- 当前主要面向:
7
+ 遇到需要理解业务逻辑的改动,它会明确列出来交给 Agent 或开发者处理,不会直接猜。所有修改都会先生成预览并保留备份,运行验证也会放在临时 DSH 环境中,不影响日常使用的 profile。
8
8
 
9
- ```text
10
- DSH 0.1.1 → DSH 0.1.2
11
- ```
9
+ > 这是社区维护的第三方工具,不属于 DeepSeek 官方项目。当前迁移范围是 DSH 0.1.1 → 0.1.2;catalog 精确覆盖 `dsh-v0.1.1-rc.2` → `dsh-v0.1.2-alpha.3`,并保留 alpha.2 历史规则。未收录的版本差异仍需单独调查,不能视为 catalog 已证明兼容。
12
10
 
13
- 项目同时提供 DSH profile 和插件的诊断、兼容版本检查、隔离与删除前检查。
11
+ ## 它能解决什么问题
12
+
13
+ | 场景 | DSH Doctor 提供的能力 |
14
+ |---|---|
15
+ | 升级插件 | 扫描源码、依赖、manifest、client graph、patch 和构建产物;自动处理 catalog 确认的精确迁移,并把语义变化交给 Agent |
16
+ | 验证迁移结果 | 依次完成静态复核、依赖同步、构建/测试、真实 tarball 打包,以及临时 profile 安装与激活验证 |
17
+ | 诊断 DSH 环境 | 检查 profile 配置层、插件版本与 peer、lockfile、bundle、patch、client contract、重复 mount 和 DSH CLI/Harness 版本漂移 |
18
+ | 安全恢复 | 比较升级前后 baseline,检查兼容更新,生成和验证隔离 overlay,并在删除前给出依赖与配置影响证据 |
14
19
 
15
- > 这是社区维护的第三方工具,不属于 DeepSeek 官方项目。当前 catalog `dsh-v0.1.1-rc.2` 和 `dsh-v0.1.2-alpha.2` 为基准记录 0.1.1 到 0.1.2 的变化;插件使用其他 patch 或预发布版本时,Agent 仍需核对实际差异。
20
+ 这些能力既可以由 Agent 通过 Skill 编排,也可以作为结构化 CLI 能力集成到其他工具中。
16
21
 
17
- ## 使用 Skill 升级插件
22
+ ## 推荐方式:让 Agent 使用 Skill
18
23
 
19
24
  安装仓库中的 [`dsh-plugin-upgrade`](skills/dsh-plugin-upgrade/SKILL.md) Skill:
20
25
 
@@ -29,213 +34,104 @@ npx skills add bruc3van/dsh-doctor
29
34
  先分析兼容问题,再修改代码,最后完成构建和运行时验证。
30
35
  ```
31
36
 
32
- 升级请求本身不代表可以放弃旧版。若开发者没有说明,Skill 会在任何迁移写入、依赖安装、构建或运行时命令前,显式询问升级后的同一插件版本是否还要兼容 DSH 0.1.1。选择保留兼容时,Agent 会先设计双版本适配方式,并分别验证 0.1.1 和 0.1.2;不能用一次 0.1.2 验证代替双版本结论。
37
+ Skill 会引导 Agent
33
38
 
34
- Skill 会提醒 Agent 按下面的顺序工作:
39
+ 1. 核实插件、实际 DSH、Harness checkout、包管理器和可用的 DSH Doctor;
40
+ 2. 分析源码、依赖、配置、patch 和已有产物;
41
+ 3. 确认升级后的同一插件版本是仅支持 0.1.2,还是继续兼容 0.1.1;
42
+ 4. 预览并应用符合兼容策略的精确修改,再处理需要理解业务的语义迁移;
43
+ 5. 重新构建,并分别报告静态、产物、隔离运行时和业务行为证据;
44
+ 6. 仅在开发者明确要求后,按插件仓库自己的流程提交和发布。
35
45
 
36
- 1. 检查插件目录、Harness checkout、包管理器和可用的 DSH Doctor
37
- 2. 分析源码、类型导入、依赖、manifest、client graph、patch 和构建产物;
38
- 3. 确认升级后是仅支持 0.1.2,还是同一版本继续兼容 0.1.1;
39
- 4. 预览并应用可以确定等价、且符合所选兼容策略的代码修改;
40
- 5. 根据新的 API 所有者处理需要理解业务的语义迁移;
41
- 6. 重新构建插件,并依次做静态、构建和隔离运行时验证;双版本模式分别验证两端;
42
- 7. 报告兼容目标、修改内容、剩余问题、备份和实际达到的验证等级。
46
+ `npx skills add` 只安装 Agent 指令,不会全局安装 DSH Doctor。Skill 会先检查本地 CLI 和 npm registry;本地版本不合适时,默认通过固定版本的 `npm exec` 运行,不会自行修改全局安装。
43
47
 
44
- `npx skills add` 只安装 Agent 指令,不会安装全局 DSH Doctor。Skill 会先检查本地 CLInpm registry;本地版本不合适时,默认使用固定版本的 `npx`,不会自行修改全局 npm 安装。
48
+ 升级请求本身不代表可以放弃旧版。兼容目标未明确时,Skill 可以先做只读分析,但会在迁移写入、依赖安装、构建或运行时命令前要求确认。双版本模式必须分别验证 0.1.10.1.2,不能用一次 0.1.2 smoke 代替双版本结论。
45
49
 
46
- 验证完成后,可以再让 Agent 按插件仓库原有的版本和发布流程提交、打 tag、发布。Skill 本身不会自动提交或发布。
50
+ ## 工作原理
47
51
 
48
- ## 工作方式
52
+ DSH Doctor 由三个相互约束的部分组成:
49
53
 
50
- DSH Doctor 由三部分组成:
54
+ - **Skill**:为 Agent 定义调查步骤、兼容决策、确认门和报告标准;
55
+ - **CLI**:提供只读分析、安全修改、诊断、基线、恢复和分级验证能力;
56
+ - **Migration catalog**:保存精确 DSH tag/commit 以及已确认的 package、symbol、Service、配置和行为变化。
51
57
 
52
- - **Skill**:告诉 Agent 升级步骤、哪些操作需要确认,以及最后应该报告什么;
53
- - **CLI**:扫描插件、生成问题清单、修改确定性代码,并执行分级验证;
54
- - **Migration catalog**:记录两个 DSH 版本之间已确认的包、API、Service、配置和行为变化。
55
-
56
- 完整流程是:
58
+ 插件迁移流程是:
57
59
 
58
60
  ```text
59
- 分析问题
60
- 修改确定性代码
61
+ 调查实际环境
62
+ catalog 驱动分析
63
+ → reviewed plan 精确修改
61
64
  → Agent 处理语义变化
62
- 重新构建
63
- 静态验证
64
- 临时 profile 安装与激活验证
65
- → 按插件自己的流程发布
65
+ 构建与产物验证
66
+ 临时 profile 安装和激活
67
+ 插件业务行为验证
66
68
  ```
67
69
 
68
- CLI 只自动修改 catalog 标记为 `exact` 的迁移。Session、Workspace、Conversation、pending interaction 等所有权和生命周期变化会标记为 `MIG_SEMANTIC_API_CHANGE`,由 Agent 结合插件代码处理,不会机械替换。
69
-
70
- ## 为什么需要版本化规则
71
-
72
- DSH 0.1.2 不只是包版本变化,一些能力被拆分到了新的所有者:
70
+ DSH 0.1.2 不只是包版本变化。`dsh-client-runtime` `dsh-host-apiproxy` 等旧 owner 被拆分,Session、Workspace、Conversation、pending interaction、Settings 等能力迁移到新的 controller、UI 包或 Service。CLI 只自动修改 catalog 标记为 `exact` 的关系;所有权、生命周期和业务调用变化会作为 `MIG_SEMANTIC_API_CHANGE` 报告。
73
71
 
74
- - `@deepseek-ai/dsh-client-runtime` 已移除,没有一个新的聚合包可以直接替换;
75
- - store 能力迁移到 `dsh-client-store`;
76
- - Session、Workspace、Conversation 和 pending interaction 分别由新的 controller 或 UI 包负责;
77
- - `@deepseek-ai/dsh-host-apiproxy` 已移除,浏览器调用需要迁移到对应业务 Remote;
78
- - client graph、platform external、exports 和部分 profile patch target 也发生了变化。
72
+ 如果提供精确 Harness checkout,Doctor 还会确认 catalog 中两个 tag 的 commit,并比较目标 web profile 的 entry id。`--target-version` 可以在完成额外源码调查后绑定更新的 0.1.2 依赖与 runtime 目标,但不会扩大 catalog 的 API 结论。
79
73
 
80
- Migration catalog 保存 source/target tag 和 Git commit,并记录 package、symbol、Service 和配置规则。提供 `--harness-root` 时,CLI 还会确认两个 tag 对应的 commit,并比较目标 web profile 中的 entry id。这样 Agent 可以基于明确的版本差异修改代码,而不是猜测新 API。
74
+ ## 核心能力
81
75
 
82
- ## 覆盖范围
83
-
84
- | 检查内容 | Doctor/Agent 如何处理 |
76
+ | 检查内容 | 处理方式 |
85
77
  |---|---|
86
- | JS/TS import,包括 `import type`、别名和混合 import | 使用 TypeScript AST 分析;确定等价的 symbol 可自动改写 |
87
- | 移除或新增的 DSH | 检查源码和 manifest;没有残留引用时更新依赖 |
88
- | DSH/Cordis 版本范围 | 检查 dependencies、devDependencies peerDependencies;不自动扩大已有 peer 范围 |
89
- | Session、Workspace、Conversation 等语义变化 | 报告新 owner 和变化原因,由 Agent 修改业务代码 |
90
- | `dsh.client` client export | 检查 inject、external、platform、immediately `exports["./client"]` |
91
- | Harness patch target | 有精确 Harness checkout 时比较新旧 entry |
92
- | 构建产物 | 检查 `lib`、`dist`、`build`、`out` 中是否仍包含旧 API |
93
- | 插件构建 | 运行项目已有的 typecheck、build、test、pack:check;必须有 build pack:check 才算产物已验证 |
94
- | 安装和激活 | 打包真实 tarball,安装到临时 `DSH_HOME` 的新 web profile 中验证 |
95
- | UI 和业务行为 | Doctor 不自动判断;需要 Agent 或开发者执行插件自己的测试 |
78
+ | JS/TS import named re-export | 使用 TypeScript AST 分析 type-only、别名和混合 import;仅改写已知等价 symbol |
79
+ | 移除或保留包中的 API 变化 | 检查源码和 manifest;保留仍存在的导出,并报告需要语义迁移的 symbol |
80
+ | DSH/Cordis 版本范围 | 检查 dependencies、devDependencies、peerDependencies 和实际解析版本;不自动扩大已有 peer 范围 |
81
+ | `dsh.client` client export | 检查 inject、external、platform、immediately `exports["./client"]` |
82
+ | Harness patch target | 在精确 Harness checkout 下比较新旧 bundle entry |
83
+ | 构建产物 | 扫描 `lib`、`dist`、`build`、`out`,识别源码与发布产物漂移 |
84
+ | 插件构建 | 运行已有 typecheck、build、test、pack:check;只有 test/typecheck 不足以证明产物已验证 |
85
+ | 安装和激活 | 打包真实 tarball,在临时 `DSH_HOME` 的新 web profile 中安装并检查生效配置 |
86
+ | Profile 诊断 | DSH 顺序组合 bundle、profile、home CLI overlay,保留字段来源证据 |
87
+ | 更新、隔离与删除 | 先验证版本、依赖、配置层和 dependents,再生成显式操作计划;更新、持久化隔离和删除需要明确确认 |
96
88
 
97
- 源码分析使用 TypeScript AST,并同时检查 manifest、client graph 和构建产物。因此,bundle 中没有旧字符串并不代表源码已经兼容,源码编译通过也不代表发布产物和运行时已经兼容。
89
+ 源码没有旧字符串、编译成功、tarball 可安装和业务行为正常是不同证据等级,Doctor 不会把其中一个冒充另一个。
98
90
 
99
- ## 安全性
91
+ ## 安全与证据
100
92
 
101
93
  - `diagnose`、`migrate analyze` 和静态验证只读,不加载或执行待检查插件;
102
- - `migrate apply` 必须带 `--safe --plan-file`;预览只会新建插件目录外的 plan,不会覆盖已有文件,并把完整分析和所有输入文件哈希固化下来;`--yes` 只应用同一个已审阅 plan;
103
- - 只有 `exact` 迁移会自动改代码,语义变化不会自动猜测;
104
- - 写入前检查文件 SHA-256,预览后文件发生变化会拒绝写入;
105
- - 修改已有文件前创建时间戳备份,并使用临时文件原子替换;
106
- - build 和 runtime 会同步依赖并执行插件脚本,因此必须显式使用 `--yes --install`;依赖安装禁用 lifecycle scripts,并记录 lockfile 和实际解析版本证据;
107
- - runtime 使用临时 `DSH_HOME`,不会安装到正常的 `~/.dsh`;
108
- - JSON、baseline 和恢复快照会脱敏插件配置和常见 secret/token/password/key 字段;
109
- - 全局 CLI 安装、持久隔离、删除插件和发布都不会由 Skill 自动执行。
110
-
111
- ## 手动使用迁移 CLI
112
-
113
- 需要 Node.js `^22.19.0` 或 `>=24.0.0`。
114
-
115
- 先确认 CLI 包含需要的迁移:
116
-
117
- ```sh
118
- npx --yes --package=@bruc3van/dsh-doctor@0.5.5 \
119
- dsh-doctor migrations list
120
- ```
121
-
122
- ### 1. 分析
123
-
124
- ```sh
125
- dsh-doctor migrate analyze /path/to/plugin \
126
- --from dsh-v0.1.1-rc.2 \
127
- --to dsh-v0.1.2-alpha.2 \
128
- --harness-root /path/to/deepseek-harness \
129
- --json
130
- ```
131
-
132
- 分析会检查源码、依赖、manifest、client graph、patch target 和已有构建产物,不执行插件代码。
133
-
134
- ### 2. 修改
94
+ - 只有 catalog 标记为 `exact` 的迁移可以自动修改,语义变化不会机械猜测;
95
+ - `migrate apply` 使用插件目录外的 reviewed plan,绑定完整分析、实际目标版本和所有输入文件哈希;
96
+ - 写入前复核 SHA-256,输入漂移时拒绝应用,并为已有文件创建时间戳备份;
97
+ - build/runtime 必须显式确认,并在禁用 lifecycle scripts 的情况下同步和核验依赖;
98
+ - runtime 使用临时 `DSH_HOME`,不会把待验证插件安装到正常的 `~/.dsh`;
99
+ - JSON、baseline 和恢复快照会脱敏常见 secret、token、password 和 key 字段;
100
+ - 全局 CLI 安装、持久隔离、插件删除、提交和发布都不是隐式动作。
135
101
 
136
- ```sh
137
- # 预览
138
- dsh-doctor migrate apply /path/to/plugin --safe \
139
- --plan-file /temporary/path/reviewed-migration-plan.json \
140
- --harness-root /path/to/deepseek-harness --json
141
-
142
- # 确认后写入
143
- dsh-doctor migrate apply /path/to/plugin --safe --yes \
144
- --plan-file /temporary/path/reviewed-migration-plan.json \
145
- --harness-root /path/to/deepseek-harness --json
146
- ```
102
+ ## 能力边界
147
103
 
148
- Plan 必须放在插件目录外,避免被当成插件输入。Apply 会核对 plan digest、完整分析输入和每个修改的 before/after hash;源码、manifest 或其他分析输入在预览后变化时必须重新生成并审阅 plan。确定性依赖改写使用 catalog 明确的 Client/Host 与 peer/dev 策略,不再沿用旧包所在的 dependency section。每个被修改的文件都会保留备份。
104
+ - Doctor 可以指出新 API owner 和迁移原因,但不能替代对插件业务逻辑的理解;
105
+ - 保留包中的 named import 和 named re-export 可以被识别,namespace import 的属性访问仍需人工调查;
106
+ - `runtime-verified` 只证明打包、安装和基本激活,不能证明 UI、Service 生命周期和业务流程正确;
107
+ - catalog 之外的 DSH patch 或 prerelease 必须检查额外源码差异;
108
+ - 静态诊断无法确认动态 Service 依赖和插件外部数据是否可安全删除。
149
109
 
150
- ### 3. 验证
151
-
152
- ```sh
153
- dsh-doctor migrate verify /path/to/plugin --level static \
154
- --harness-root /path/to/deepseek-harness --json
155
- dsh-doctor migrate verify /path/to/plugin --level build --yes --install \
156
- --harness-root /path/to/deepseek-harness --json
157
- dsh-doctor migrate verify /path/to/plugin --level runtime --yes --install \
158
- --harness-root /path/to/deepseek-harness --json
159
- ```
160
-
161
- | 级别 | 验证内容 |
162
- |---|---|
163
- | `static` | 再次检查源码、manifest、client graph、patch 和产物 |
164
- | `build` | 先同步并核验目标依赖和 lockfile,再运行已有构建/测试脚本并重新扫描产物 |
165
- | `runtime` | 完成依赖与构建门后,打真实 tarball,在临时 profile 中验证目标 DSH、安装包、bundle 和生效配置 |
110
+ ## CLI 快速参考
166
111
 
167
- 验证状态依次是:
168
-
169
- ```text
170
- analyzed → source-migrated → artifact-verified → runtime-verified
171
- ```
172
-
173
- `runtime-verified` 只表示插件能够完成打包、安装和基本激活,仍不能代替真实 UI、Service 生命周期和业务流程验证。
174
-
175
- ## DSH 和已安装插件诊断
176
-
177
- 全局安装:
112
+ 需要 Node.js `^22.19.0` 或 `>=24.0.0`。
178
113
 
179
114
  ```sh
115
+ # 全局安装
180
116
  npm install --global @bruc3van/dsh-doctor
181
- dsh-doctor diagnose
182
- ```
183
-
184
- 临时运行:
185
117
 
186
- ```sh
187
- npx @bruc3van/dsh-doctor diagnose
188
- ```
189
-
190
- 默认检查 `$DSH_HOME/profiles/web`;未设置 `DSH_HOME` 时使用 `~/.dsh`。
191
-
192
- ```sh
193
- dsh-doctor diagnose
194
- dsh-doctor diagnose --json
195
- dsh-doctor diagnose --check-updates
118
+ # 或运行一个固定版本,不修改全局安装
119
+ npm exec --yes --package=@bruc3van/dsh-doctor@<version> -- dsh-doctor --help
196
120
  ```
197
121
 
198
- 诊断按 DSH 的顺序组合配置:
199
-
200
- ```text
201
- bundle layers profile cordis.patch.yml home cordis.patch.yml CLI overlays
202
- ```
203
-
204
- 它会检查插件版本和 peer、Node engines、安装与 lockfile、bundle patch、client contract、重复 mount、高层配置覆盖,以及 DSH CLI/Harness 版本漂移。普通诊断不访问网络;只有 `--check-updates` 和 recovery 操作会访问 npm registry。
205
-
206
- ## 恢复操作
207
-
208
- ```sh
209
- # 检查和安装 manifest 声明兼容的最高版本
210
- dsh-doctor recover @scope/plugin --action check-update
211
- dsh-doctor recover @scope/plugin --action update
212
- dsh-doctor recover @scope/plugin --action update --yes
213
-
214
- # 生成临时隔离 overlay
215
- dsh-doctor recover @scope/plugin --action quarantine \
216
- --output ./plugin-quarantine.yml
217
-
218
- # 验证临时 overlay 后持久化
219
- dsh-doctor recover @scope/plugin --action persist-quarantine --verified
220
- dsh-doctor recover @scope/plugin --action persist-quarantine --verified --yes
221
-
222
- # 删除始终需要单独执行
223
- dsh-doctor recover @scope/plugin --action remove
224
- dsh-doctor recover @scope/plugin --action remove --yes
225
- ```
226
-
227
- Doctor 会在隔离和删除前检查 entry、配置层、直接依赖、核心 bundle、lockfile、手工 mount 和已知 client dependents。静态检查无法确认动态 Service 依赖和外部数据,操作后仍需重启 profile 并验证主要功能。
228
-
229
- 升级前后也可以保存和比较基线:
122
+ | 命令 | 用途 |
123
+ |---|---|
124
+ | `dsh-doctor diagnose [--json] [--check-updates]` | 诊断当前 profile 和已安装插件;普通诊断不访问网络 |
125
+ | `dsh-doctor migrations list` | 查看当前 CLI 内置的精确 migration catalog |
126
+ | `dsh-doctor migrate analyze` / `apply` / `verify` | 分析迁移、应用 reviewed plan、执行静态/构建/runtime 验证 |
127
+ | `dsh-doctor baseline create` / `compare` | 保存或比较升级前后的脱敏诊断基线 |
128
+ | `dsh-doctor recover <package> --action <action>` | 检查更新、生成/持久化/回滚隔离或执行独立删除流程 |
230
129
 
231
- ```sh
232
- dsh-doctor baseline create
233
- dsh-doctor baseline compare
234
- ```
130
+ 完整参数和确认要求请使用 `dsh-doctor --help`。迁移编排与语义调查规则位于 [`dsh-plugin-upgrade`](skills/dsh-plugin-upgrade/SKILL.md) 及其 references 中。
235
131
 
236
132
  ## 输出与退出码
237
133
 
238
- 文本支持中文和英文,`--json` 使用稳定英文 code 并保留脱敏后的结构化证据。
134
+ 文本支持中文和英文;`--json` 使用稳定英文 code,并保留脱敏后的结构化证据。
239
135
 
240
136
  | 退出码 | 含义 |
241
137
  |---|---|
@@ -38,9 +38,7 @@
38
38
  "@deepseek-ai/dsh-win32-process"
39
39
  ],
40
40
  "targetVersions": {
41
- "@deepseek-ai/cordis": "4.0.2",
42
- "@deepseek-ai/dsh-client-store": "0.1.2-alpha.2",
43
- "@deepseek-ai/dsh-session": "0.1.2-alpha.2"
41
+ "@deepseek-ai/cordis": "4.0.2"
44
42
  },
45
43
  "dependencyPolicies": {
46
44
  "@deepseek-ai/cordis": {
@@ -1,5 +1,13 @@
1
1
  {
2
2
  "modules": {
3
+ "@deepseek-ai/dsh-settings": {
4
+ "settingsNamespace": {
5
+ "toModule": "@deepseek-ai/dsh-settings",
6
+ "toSymbol": "SettingsProvider.register",
7
+ "confidence": "semantic",
8
+ "reason": "The settingsNamespace factory was removed. Inject the settings Service and register the namespace through ctx.settings.register(name, schema)."
9
+ }
10
+ },
3
11
  "@deepseek-ai/dsh-client-runtime/client": {
4
12
  "ClientContext": {
5
13
  "toModule": "@deepseek-ai/cordis",
@@ -0,0 +1,14 @@
1
+ # DSH 0.1.1-rc.2 to 0.1.2-alpha.3 behavior migration
2
+
3
+ The old Client Runtime was split by ownership. There is no aggregate replacement package.
4
+
5
+ - Session control, list state, commands, projections, queue and event windows belong to `api-session-controller/client`.
6
+ - Workspace state and commands belong to `api-workspace-controller/client`; navigation policy belongs to `ui-workspace`.
7
+ - Conversation assembly belongs to `ui-conversation`; Chat and Trajectory own their respective projections.
8
+ - Approval and Question own their pending objects; `ui-session` only aggregates domain publications.
9
+ - The store engine belongs to `client-store`; React hook synthesis belongs to the renderer.
10
+ - The Host API Proxy was removed. Unary browser operations live on their natural Remote service owners.
11
+ - The demo-only `dsh-agent-spine-demo` package and the SQLite session persistence package were removed by alpha.3; neither has a catalog-confirmed drop-in replacement.
12
+ - Alpha.3 adds the `dsh-session-turn-outline` package and extends session submission/load-through APIs. These additions do not justify mechanical rewrites of existing plugin behavior.
13
+
14
+ An import move is safe only when the catalog marks it `exact`. A `semantic` mapping identifies the new owner but still requires the plugin developer to rewrite behavior and verify the real lifecycle.
@@ -0,0 +1,36 @@
1
+ {
2
+ "platformModules": [
3
+ "react",
4
+ "react/jsx-runtime",
5
+ "react-dom",
6
+ "react-dom/client",
7
+ "@deepseek-ai/cordis",
8
+ "@deepseek-ai/dsh-client-store",
9
+ "@deepseek-ai/dsh-client-ui-slots",
10
+ "@deepseek-ai/dsh-client-ui-primitives"
11
+ ],
12
+ "profilePatchPaths": {
13
+ "web": [
14
+ "packages/bundle/base/cordis.patch.yml",
15
+ "packages/bundle/web-app/cordis.patch.yml"
16
+ ]
17
+ },
18
+ "rules": [
19
+ {
20
+ "id": "client-inject-is-informational",
21
+ "note": "dsh.client.inject lists package dependency edges; Cordis service inject controls activation."
22
+ },
23
+ {
24
+ "id": "baseline-external-is-implicit",
25
+ "note": "Platform modules are implicit and must not be repeated in dsh.client.external."
26
+ },
27
+ {
28
+ "id": "feature-values-use-services-or-slots",
29
+ "note": "Feature plugins must not use dsh.client.external as a feature-to-feature value dependency mechanism."
30
+ },
31
+ {
32
+ "id": "client-export-required",
33
+ "note": "A web dsh.client declaration requires a published exports[\"./client\"] artifact."
34
+ }
35
+ ]
36
+ }
@@ -0,0 +1,19 @@
1
+ {
2
+ "schemaVersion": 1,
3
+ "id": "dsh-v0.1.1-rc.2__dsh-v0.1.2-alpha.3",
4
+ "from": {
5
+ "ref": "dsh-v0.1.1-rc.2",
6
+ "commit": "b150a551b8d465e31e418e1b2eaf5e79bbb7d28e"
7
+ },
8
+ "to": {
9
+ "ref": "dsh-v0.1.2-alpha.3",
10
+ "commit": "dd6322d604e00eec1ba5e0c8541159906a21094a",
11
+ "version": "0.1.2-alpha.3"
12
+ },
13
+ "description": "DeepSeek Harness 0.1.1-rc.2 to 0.1.2-alpha.3 plugin migration",
14
+ "references": {
15
+ "ownership": ".agents/notes/implemented/architecture/2026-08-20-client-session-conversation-ownership.md",
16
+ "remoteMigration": ".agents/notes/implemented/architecture/2026-08-10-unary-apiproxy-remote-migration.md",
17
+ "clientRules": "packages/client/AGENTS.md"
18
+ }
19
+ }
@@ -0,0 +1,74 @@
1
+ {
2
+ "removed": [
3
+ "@deepseek-ai/dsh-acp-demo",
4
+ "@deepseek-ai/dsh-acp-snapshot",
5
+ "@deepseek-ai/dsh-agent-spine-demo",
6
+ "@deepseek-ai/dsh-client-runtime",
7
+ "@deepseek-ai/dsh-host-apiproxy",
8
+ "@deepseek-ai/dsh-sdk-jsonrpc-demo",
9
+ "@deepseek-ai/dsh-session-persistence-sqlite"
10
+ ],
11
+ "added": [
12
+ "@deepseek-ai/dsh-acp-app",
13
+ "@deepseek-ai/dsh-api-session-controller",
14
+ "@deepseek-ai/dsh-api-settings-controller",
15
+ "@deepseek-ai/dsh-api-workspace-controller",
16
+ "@deepseek-ai/dsh-client-store",
17
+ "@deepseek-ai/dsh-client-ui-approval",
18
+ "@deepseek-ai/dsh-client-ui-chat",
19
+ "@deepseek-ai/dsh-client-ui-schedule",
20
+ "@deepseek-ai/dsh-client-ui-session",
21
+ "@deepseek-ai/dsh-deepseek-llm-api-extensions",
22
+ "@deepseek-ai/dsh-deque",
23
+ "@deepseek-ai/dsh-experimental-agent-team-profile",
24
+ "@deepseek-ai/dsh-experimental-agent-team-web-profile",
25
+ "@deepseek-ai/dsh-experimental-client-ui-agent-team",
26
+ "@deepseek-ai/dsh-experimental-inspector",
27
+ "@deepseek-ai/dsh-experimental-webworker-packer",
28
+ "@deepseek-ai/dsh-experimental-webworker-runtime",
29
+ "@deepseek-ai/dsh-plugin-package-inventory-deepseek",
30
+ "@deepseek-ai/dsh-sdk-app",
31
+ "@deepseek-ai/dsh-sdk-minimal",
32
+ "@deepseek-ai/dsh-session-log-deepseek",
33
+ "@deepseek-ai/dsh-session-snapshot",
34
+ "@deepseek-ai/dsh-session-turn-outline",
35
+ "@deepseek-ai/dsh-util-crypto",
36
+ "@deepseek-ai/dsh-util-time",
37
+ "@deepseek-ai/dsh-util-values",
38
+ "@deepseek-ai/dsh-util-workspace-path",
39
+ "@deepseek-ai/dsh-webhook",
40
+ "@deepseek-ai/dsh-webhook-github",
41
+ "@deepseek-ai/dsh-win32-process"
42
+ ],
43
+ "targetVersions": {
44
+ "@deepseek-ai/cordis": "4.0.2"
45
+ },
46
+ "dependencyPolicies": {
47
+ "@deepseek-ai/cordis": {
48
+ "client": ["peerDependencies", "devDependencies"]
49
+ },
50
+ "@deepseek-ai/dsh-client-store": {
51
+ "client": ["devDependencies"]
52
+ },
53
+ "@deepseek-ai/dsh-session": {
54
+ "client": ["devDependencies"]
55
+ }
56
+ },
57
+ "semanticReplacements": {
58
+ "@deepseek-ai/dsh-client-runtime": [
59
+ "@deepseek-ai/dsh-api-session-controller",
60
+ "@deepseek-ai/dsh-api-workspace-controller",
61
+ "@deepseek-ai/dsh-client-store",
62
+ "@deepseek-ai/dsh-client-ui-session",
63
+ "@deepseek-ai/dsh-client-ui-conversation",
64
+ "@deepseek-ai/dsh-client-ui-chat",
65
+ "@deepseek-ai/dsh-client-ui-trajectory",
66
+ "@deepseek-ai/dsh-client-ui-approval",
67
+ "@deepseek-ai/dsh-client-ui-user-questions"
68
+ ],
69
+ "@deepseek-ai/dsh-host-apiproxy": [
70
+ "@deepseek-ai/dsh-api-gateway",
71
+ "@deepseek-ai/dsh-api-remotes"
72
+ ]
73
+ }
74
+ }
@@ -0,0 +1,28 @@
1
+ {
2
+ "services": {
3
+ "sessions": {
4
+ "owner": "@deepseek-ai/dsh-api-session-controller/client",
5
+ "confidence": "semantic",
6
+ "note": "The service name survives, but Session snapshots no longer contain Conversation views or pending interactions."
7
+ },
8
+ "workspaces": {
9
+ "owner": "@deepseek-ai/dsh-api-workspace-controller/client",
10
+ "confidence": "semantic",
11
+ "note": "The service name survives, while cross-domain navigation belongs to ui-workspace."
12
+ },
13
+ "conversation": {
14
+ "owner": "@deepseek-ai/dsh-client-ui-conversation/client",
15
+ "confidence": "semantic",
16
+ "note": "Conversation assembly and input are independent of Session lifecycle snapshots."
17
+ },
18
+ "slots": {
19
+ "owner": "@deepseek-ai/dsh-client-ui-renderer/client",
20
+ "confidence": "semantic",
21
+ "note": "Slot declarations stay in ui-slots; runtime registration and binding belong to ui-renderer."
22
+ }
23
+ },
24
+ "removedHostFacade": {
25
+ "package": "@deepseek-ai/dsh-host-apiproxy",
26
+ "replacementPolicy": "Use the natural business Remote owner through generated api-remotes contributions; there is no replacement facade."
27
+ }
28
+ }