dsh-update-center 0.9.0 → 0.10.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/LICENSE +29 -29
- package/README.md +141 -111
- package/cordis.patch.yml +4 -4
- package/data/extra-plugins.json +23 -8
- package/data/registry-snapshot.json +4062 -507
- package/lib/categorize.mjs +131 -131
- package/lib/client.js +857 -699
- package/lib/client.js.map +1 -1
- package/lib/github-topic.mjs +94 -94
- package/lib/index.js +78 -186
- package/lib/index.js.map +1 -1
- package/lib/run-command.mjs +11 -1
- package/lib/types/client/index.d.ts +3 -5
- package/lib/types/index.d.ts +2 -7
- package/package.json +89 -76
- package/plugins.json +4062 -507
- package/scripts/build.sh +4 -4
- package/scripts/restart-dsh.mjs +131 -140
- package/scripts/update-worker.mjs +12 -135
- package/scripts/repair-bash-terminal.mjs +0 -65
package/LICENSE
CHANGED
|
@@ -1,29 +1,29 @@
|
|
|
1
|
-
BSD 3-Clause License
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2026, Britneycode
|
|
4
|
-
All rights reserved.
|
|
5
|
-
|
|
6
|
-
Redistribution and use in source and binary forms, with or without
|
|
7
|
-
modification, are permitted provided that the following conditions are met:
|
|
8
|
-
|
|
9
|
-
1. Redistributions of source code must retain the above copyright notice, this
|
|
10
|
-
list of conditions and the following disclaimer.
|
|
11
|
-
|
|
12
|
-
2. Redistributions in binary form must reproduce the above copyright notice,
|
|
13
|
-
this list of conditions and the following disclaimer in the documentation
|
|
14
|
-
and/or other materials provided with the distribution.
|
|
15
|
-
|
|
16
|
-
3. Neither the name of the copyright holder nor the names of its
|
|
17
|
-
contributors may be used to endorse or promote products derived from
|
|
18
|
-
this software without specific prior written permission.
|
|
19
|
-
|
|
20
|
-
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
|
21
|
-
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
22
|
-
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
|
23
|
-
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
|
24
|
-
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
25
|
-
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
|
26
|
-
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
|
27
|
-
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
|
28
|
-
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
29
|
-
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
1
|
+
BSD 3-Clause License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026, Britneycode
|
|
4
|
+
All rights reserved.
|
|
5
|
+
|
|
6
|
+
Redistribution and use in source and binary forms, with or without
|
|
7
|
+
modification, are permitted provided that the following conditions are met:
|
|
8
|
+
|
|
9
|
+
1. Redistributions of source code must retain the above copyright notice, this
|
|
10
|
+
list of conditions and the following disclaimer.
|
|
11
|
+
|
|
12
|
+
2. Redistributions in binary form must reproduce the above copyright notice,
|
|
13
|
+
this list of conditions and the following disclaimer in the documentation
|
|
14
|
+
and/or other materials provided with the distribution.
|
|
15
|
+
|
|
16
|
+
3. Neither the name of the copyright holder nor the names of its
|
|
17
|
+
contributors may be used to endorse or promote products derived from
|
|
18
|
+
this software without specific prior written permission.
|
|
19
|
+
|
|
20
|
+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
|
21
|
+
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
22
|
+
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
|
23
|
+
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
|
24
|
+
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
25
|
+
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
|
26
|
+
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
|
27
|
+
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
|
28
|
+
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
29
|
+
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
package/README.md
CHANGED
|
@@ -1,111 +1,141 @@
|
|
|
1
|
-
# dsh-update-center
|
|
2
|
-
|
|
3
|
-
[](https://www.npmjs.com/package/dsh-update-center)
|
|
4
|
-
|
|
5
|
-
DeepSeek Harness
|
|
6
|
-
|
|
7
|
-
## 安装
|
|
8
|
-
|
|
9
|
-
插件声明了 `dsh.bundle`(bundle patch 位于 `cordis.patch.yml`),构建产物随包分发,用官方 CLI 安装即可挂载为 profile 层。
|
|
10
|
-
|
|
11
|
-
推荐 npm 安装(秒级,无需构建):
|
|
12
|
-
|
|
13
|
-
```bash
|
|
14
|
-
dsh plugin --profile web add dsh-update-center
|
|
15
|
-
```
|
|
16
|
-
|
|
17
|
-
或从 GitHub 安装:
|
|
18
|
-
|
|
19
|
-
```bash
|
|
20
|
-
dsh plugin --profile web add github:Britneycode/dsh-update-center
|
|
21
|
-
```
|
|
22
|
-
|
|
23
|
-
本地开发时也可以 link 安装:
|
|
24
|
-
|
|
25
|
-
```bash
|
|
26
|
-
dsh plugin --profile web add link:<本插件目录>
|
|
27
|
-
```
|
|
28
|
-
|
|
29
|
-
安装后重启 dsh web,设置页会出现「更新中心」面板。不需要第三方注入器。
|
|
30
|
-
|
|
31
|
-
## 插件市场
|
|
32
|
-
|
|
33
|
-
- 注册表:本仓库根目录 [`plugins.json`](./plugins.json)(raw 直链拉取,可独立于插件发版更新),初始内容为 GitHub `topic:dsh-plugin` 星标前 500 + 本插件,共 501 条。
|
|
34
|
-
- 增量扫描:后台每 12 小时扫描 GitHub `topic:dsh-plugin`(星标前 500,排除 fork),与注册表按 owner/name 去重合并——重复条目仅刷新星标,新条目追加;掉出扫描窗口的老条目在 plugins.json 中保留(累计语义,上限 2000 防膨胀)。
|
|
35
|
-
- npm 包名映射:同一轮扫描会查询 npm 关键词搜索(`keywords:dsh-plugin`,约 800+ 包),按 repository 地址与市场条目匹配——仓库一致才映射(天然防抢注);命中的条目显示 npm 标记并走 npm 秒级安装,未命中的走 `github:` 安装。
|
|
36
|
-
- 更新注册表:`npm run refresh:snapshot` 会以现有 plugins.json 为基底累计合并最新扫描结果并连同离线快照一起重写,提交推送后生效。
|
|
37
|
-
- 注册表自动刷新:仓库内置 GitHub Actions 定时任务(`.github/workflows/registry-refresh.yml`)每天自动跑刷新脚本并在有变化时提交推送,也可在 Actions 页面手动触发。
|
|
38
|
-
- 离线兜底:磁盘缓存 → 随包快照(`data/registry-snapshot.json`);常驻条目(`data/extra-plugins.json`)无条件并入,保证 0 星新插件始终可见。
|
|
39
|
-
- 清单自动刷新:缓存超过 24 小时会在打开面板时自动拉取最新;「刷新清单」按钮随时强制更新。
|
|
40
|
-
- 出网请求仅允许 https 且 host 白名单(raw.githubusercontent.com 额外限定为清单仓库路径,防 SSRF);安装目标只接受清单内条目,不接受任意包名。
|
|
41
|
-
- 安装优先走 npm 包(秒级),并做防抢注校验:npm 包的 repository 与清单 GitHub owner/repo 不一致时自动回退 `github:owner/repo`。
|
|
42
|
-
- 安装后校验包可解析且存在可运行入口(dsh 清单或 main 文件);校验失败自动回滚卸载,不会留下坏包。
|
|
43
|
-
- 非标准组合套装可作为“手动安装”条目收录:市场只展示项目安装说明,不会误走 `pnpm add`。`dsh-routing-suite` 即按此方式提供。
|
|
44
|
-
- pnpm ≥10 拒绝或跳过构建脚本时,错误信息会带 pnpm-workspace.yaml 放行指引。
|
|
45
|
-
- 卸载 = `pnpm remove` + 移出 `dsh.profile.bundles`,仅对 npm 安装的插件开放;link/preset 插件请直接编辑 profile。
|
|
46
|
-
- 禁用/启用 = 在 profile 的 `cordis.patch.yml` 写入/移除受管的 `disabled: true` 条目(按插件自身 insert id 定位,带标记区块与备份),不删文件、可随时恢复,重启后生效。
|
|
47
|
-
- 市场条目与已安装列表互通元数据:已安装插件显示市场描述与 GitHub 链接,市场里已装的插件显示「可更新」徽标。
|
|
48
|
-
- 市场支持排序:星标最多(默认)/ 默认策展顺序 / 最近添加,可叠加搜索与分类筛选。
|
|
49
|
-
- 市场列表默认展示前 500 个筛选结果;结果更多时可在列表底部继续加载,每次增加 500 个。
|
|
50
|
-
|
|
51
|
-
## 一键全部更新
|
|
52
|
-
|
|
53
|
-
- 检查更新后,工具栏出现「全部更新」:把所有可更新插件(npm 版本落后 + link/preset 落后且无未提交改动)排成一个后台批量任务串行执行。
|
|
54
|
-
- 单个子任务失败不中断其余;结束后汇总「N 成功 / M 失败」,全部失败才标记任务失败。
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
-
|
|
60
|
-
-
|
|
61
|
-
-
|
|
62
|
-
-
|
|
63
|
-
- npm
|
|
64
|
-
-
|
|
65
|
-
-
|
|
66
|
-
-
|
|
67
|
-
-
|
|
68
|
-
-
|
|
69
|
-
-
|
|
70
|
-
-
|
|
71
|
-
-
|
|
72
|
-
-
|
|
73
|
-
- dsh
|
|
74
|
-
-
|
|
75
|
-
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
1
|
+
# dsh-update-center
|
|
2
|
+
|
|
3
|
+
[](https://www.npmjs.com/package/dsh-update-center)
|
|
4
|
+
|
|
5
|
+
DeepSeek Harness 的本地更新中心:内置插件市场(浏览/搜索/一键安装/卸载/禁用),统一管理 profile 中 npm/link 插件以及 agent preset 的更新。
|
|
6
|
+
|
|
7
|
+
## 安装
|
|
8
|
+
|
|
9
|
+
插件声明了 `dsh.bundle`(bundle patch 位于 `cordis.patch.yml`),构建产物随包分发,用官方 CLI 安装即可挂载为 profile 层。
|
|
10
|
+
|
|
11
|
+
推荐 npm 安装(秒级,无需构建):
|
|
12
|
+
|
|
13
|
+
```bash
|
|
14
|
+
dsh plugin --profile web add dsh-update-center
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
或从 GitHub 安装:
|
|
18
|
+
|
|
19
|
+
```bash
|
|
20
|
+
dsh plugin --profile web add github:Britneycode/dsh-update-center
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
本地开发时也可以 link 安装:
|
|
24
|
+
|
|
25
|
+
```bash
|
|
26
|
+
dsh plugin --profile web add link:<本插件目录>
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
安装后重启 dsh web,设置页会出现「更新中心」面板。不需要第三方注入器。
|
|
30
|
+
|
|
31
|
+
## 插件市场
|
|
32
|
+
|
|
33
|
+
- 注册表:本仓库根目录 [`plugins.json`](./plugins.json)(raw 直链拉取,可独立于插件发版更新),初始内容为 GitHub `topic:dsh-plugin` 星标前 500 + 本插件,共 501 条。
|
|
34
|
+
- 增量扫描:后台每 12 小时扫描 GitHub `topic:dsh-plugin`(星标前 500,排除 fork),与注册表按 owner/name 去重合并——重复条目仅刷新星标,新条目追加;掉出扫描窗口的老条目在 plugins.json 中保留(累计语义,上限 2000 防膨胀)。
|
|
35
|
+
- npm 包名映射:同一轮扫描会查询 npm 关键词搜索(`keywords:dsh-plugin`,约 800+ 包),按 repository 地址与市场条目匹配——仓库一致才映射(天然防抢注);命中的条目显示 npm 标记并走 npm 秒级安装,未命中的走 `github:` 安装。
|
|
36
|
+
- 更新注册表:`npm run refresh:snapshot` 会以现有 plugins.json 为基底累计合并最新扫描结果并连同离线快照一起重写,提交推送后生效。
|
|
37
|
+
- 注册表自动刷新:仓库内置 GitHub Actions 定时任务(`.github/workflows/registry-refresh.yml`)每天自动跑刷新脚本并在有变化时提交推送,也可在 Actions 页面手动触发。
|
|
38
|
+
- 离线兜底:磁盘缓存 → 随包快照(`data/registry-snapshot.json`);常驻条目(`data/extra-plugins.json`)无条件并入,保证 0 星新插件始终可见。
|
|
39
|
+
- 清单自动刷新:缓存超过 24 小时会在打开面板时自动拉取最新;「刷新清单」按钮随时强制更新。
|
|
40
|
+
- 出网请求仅允许 https 且 host 白名单(raw.githubusercontent.com 额外限定为清单仓库路径,防 SSRF);安装目标只接受清单内条目,不接受任意包名。
|
|
41
|
+
- 安装优先走 npm 包(秒级),并做防抢注校验:npm 包的 repository 与清单 GitHub owner/repo 不一致时自动回退 `github:owner/repo`。
|
|
42
|
+
- 安装后校验包可解析且存在可运行入口(dsh 清单或 main 文件);校验失败自动回滚卸载,不会留下坏包。
|
|
43
|
+
- 非标准组合套装可作为“手动安装”条目收录:市场只展示项目安装说明,不会误走 `pnpm add`。`dsh-routing-suite` 即按此方式提供。
|
|
44
|
+
- pnpm ≥10 拒绝或跳过构建脚本时,错误信息会带 pnpm-workspace.yaml 放行指引。
|
|
45
|
+
- 卸载 = `pnpm remove` + 移出 `dsh.profile.bundles`,仅对 npm 安装的插件开放;link/preset 插件请直接编辑 profile。
|
|
46
|
+
- 禁用/启用 = 在 profile 的 `cordis.patch.yml` 写入/移除受管的 `disabled: true` 条目(按插件自身 insert id 定位,带标记区块与备份),不删文件、可随时恢复,重启后生效。
|
|
47
|
+
- 市场条目与已安装列表互通元数据:已安装插件显示市场描述与 GitHub 链接,市场里已装的插件显示「可更新」徽标。
|
|
48
|
+
- 市场支持排序:星标最多(默认)/ 默认策展顺序 / 最近添加,可叠加搜索与分类筛选。
|
|
49
|
+
- 市场列表默认展示前 500 个筛选结果;结果更多时可在列表底部继续加载,每次增加 500 个。
|
|
50
|
+
|
|
51
|
+
## 一键全部更新
|
|
52
|
+
|
|
53
|
+
- 检查更新后,工具栏出现「全部更新」:把所有可更新插件(npm 版本落后 + link/preset 落后且无未提交改动)排成一个后台批量任务串行执行。
|
|
54
|
+
- 单个子任务失败不中断其余;结束后汇总「N 成功 / M 失败」,全部失败才标记任务失败。
|
|
55
|
+
|
|
56
|
+
## 当前能力
|
|
57
|
+
|
|
58
|
+
- 手动检查远端状态,不在打开设置页时自动发起网络请求。
|
|
59
|
+
- 检查与状态查询全部异步执行(子进程不再阻塞 dsh web 的事件循环),插件检查并行、`/status` 带 5 秒快照缓存。
|
|
60
|
+
- 更新由 `$DSH_HOME/update-center` 下的独立 worker 执行,停止或重启 dsh 不会中断任务。
|
|
61
|
+
- npm 插件按包名精准更新,不会因为点击单个插件而更新整个 profile。
|
|
62
|
+
- npm 更新完成后核对 `node_modules` 中的实际版本;版本没有变化时返回失败。
|
|
63
|
+
- npm 更新失败自动回滚到更新前版本("失败 = 保持原样");检查与执行之间上游又发新版时,装上的版本若就是当前 npm latest 则按实际版本放行,不做无谓回滚。
|
|
64
|
+
- 「重启 dsh」助手在拉起新进程后保留 15 秒存活观察期:新进程若提前退出,把退出码与诊断结论写入 `~/.dsh/update-center/dsh-web.stderr.log`,不再静默失败。
|
|
65
|
+
- 更新任务历史只保留最近 20 个(状态与 spec 文件一并清理),不再无限累积。
|
|
66
|
+
- npm 更新/安装/卸载后按官方 `dsh plugin` 的规则对账 `dsh.profile.bundles`;模板 bundle 不受影响。
|
|
67
|
+
- link 与 preset 只能通过已安装清单中的包名更新,API 不接受任意目录。
|
|
68
|
+
- Git 插件只更新了 `src` 而没有更新 `lib/dist` 时,自动执行包的 `build` 脚本。
|
|
69
|
+
- 插件来源(upstream)优先读取 git remote 的真实地址,内置映射仅作兜底。
|
|
70
|
+
- dsh 或本地插件存在未提交改动时停止更新,避免覆盖本地工作。
|
|
71
|
+
- 任一步骤失败都会返回失败阶段;不会把依赖安装或构建失败显示成成功。
|
|
72
|
+
- 更新写入磁盘后明确提示重启 dsh web。
|
|
73
|
+
- 一键「重启 dsh」:工具条按钮以原进程完全相同的启动方式(execPath + execArgv + argv + cwd)自动重新拉起 dsh web,更新完插件后直接点即可,无需手动重启;有更新任务执行时会禁用并在服务端拒绝,避免中断后台任务。
|
|
74
|
+
- POST 动作仅接受同源请求(Origin 与 Host 一致)。
|
|
75
|
+
- `Start-DSH.ps1` 会等待后台更新完成再启动,`Stop-DSH.ps1` 不会结束更新 worker。
|
|
76
|
+
|
|
77
|
+
## 桌面端适配
|
|
78
|
+
|
|
79
|
+
面板与桌面端设置界面同一套设计系统,不是自绘 DOM:
|
|
80
|
+
|
|
81
|
+
| 方面 | 做法 |
|
|
82
|
+
|---|---|
|
|
83
|
+
| 控件 | 来自宿主基线模块 `@deepseek-ai/dsh-client-ui-primitives`(`Button` / `SegmentedTabs` / `RiskConfirmation` / `Toast`),声明为 `dsh.client.external`,不打包 |
|
|
84
|
+
| 颜色 | 只走 `--dsw-*` 语义令牌,跟随亮/暗主题(bundle 内硬编码颜色数为 0) |
|
|
85
|
+
| 不可逆操作 | 卸载、重启、批量更新、安装 —— 全部走 `RiskConfirmation` 模态 + 勾选确认,不用 `window.confirm` |
|
|
86
|
+
| 排版 | 页标题 16/24、行标题 14/20、行说明 12/18 |
|
|
87
|
+
| 窄屏 | 纯 CSS 媒体查询,不再用 `!important` 硬改宿主内部 class 名 |
|
|
88
|
+
|
|
89
|
+
`dsh.client.platform` 必须是 `"web"` ——桌面端跑的就是 `dsh-web-app` 那套 web 前端,写成 `"desktop"` 会被 `@deepseek-ai/dsh-client-modules` 判为非客户端包,面板永不出现。
|
|
90
|
+
|
|
91
|
+
**导航项图标拿不到**:宿主 `settings-general` 的 `navIcon()` 只给 `account` / `models` / `agent-presets` / `plugins` / `archived-sessions` 配了图标,其余 id 一律回落成齿轮。本插件用 `update-center`(语义正确,且不与宿主已有的 `plugins` 页冲突),因此显示为齿轮。要换专属图标需要宿主侧扩展那张映射表。
|
|
92
|
+
|
|
93
|
+
## 构建
|
|
94
|
+
|
|
95
|
+
构建脚本支持 Windows、macOS 和 Linux。它会从 `DSH_CHECKOUT`、相邻目录及常见用户目录中寻找 DeepSeek Harness checkout,并复用 checkout 的 TypeScript 与 tsdown。
|
|
96
|
+
|
|
97
|
+
```bash
|
|
98
|
+
npm run typecheck
|
|
99
|
+
npm test
|
|
100
|
+
npm run build
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
无法自动找到 checkout 时,先设置 `DSH_CHECKOUT`:
|
|
104
|
+
|
|
105
|
+
```powershell
|
|
106
|
+
$env:DSH_CHECKOUT = 'D:\App\dsh\deepseek-harness'
|
|
107
|
+
npm run build
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
### 没有 checkout 时只构建浏览器半边
|
|
111
|
+
|
|
112
|
+
宿主半边(`lib/index.js` 等)是纯 Node 代码,已随仓库分发,日常改面板不需要重建它。浏览器半边可以直接用本仓库的 tsdown,绕过需要 checkout 的 `scripts/build.mjs`:
|
|
113
|
+
|
|
114
|
+
```bash
|
|
115
|
+
npm run build:client:local # tsdown,只产出 lib/client.js
|
|
116
|
+
npm run typecheck:client # tsc -p tsconfig.client.json
|
|
117
|
+
npm run test:client # lib/client.js 的契约测试(6 条)
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
`test:client` 里有一条用例会读运行中桌面端的 `app.asar`,取出 shell 真实的 `PLATFORM_MODULES` 表逐条核对 bundle 的 require 目标。不指路会 skip:
|
|
121
|
+
|
|
122
|
+
```powershell
|
|
123
|
+
$env:DSH_DESKTOP_ROOT = 'D:\App\deepseek harness'
|
|
124
|
+
npm run test:client
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
## 配置
|
|
128
|
+
|
|
129
|
+
| 字段 | 说明 | 默认值 |
|
|
130
|
+
|---|---|---|
|
|
131
|
+
| `repoDir` | dsh 源码仓库 | 自动探测 |
|
|
132
|
+
| `profileDir` | web profile | `$DSH_HOME/profiles/web` |
|
|
133
|
+
| `presetDir` | agent preset 目录 | `$DSH_HOME/.agent-presets` |
|
|
134
|
+
| `proxy` | npm/pnpm 代理 | dsh 仓库的 `http.proxy` |
|
|
135
|
+
| `remote` | Git 远端名 | `origin` |
|
|
136
|
+
| `branch` | dsh 更新分支 | `master` |
|
|
137
|
+
| `upstreams` | 插件名到 GitHub 仓库的来源映射 | 内置常用插件 |
|
|
138
|
+
|
|
139
|
+
## 更新边界
|
|
140
|
+
|
|
141
|
+
更新中心只修改已明确识别的 dsh 仓库、profile npm 依赖和已安装的 Git 插件。它不会自动 stash、强制切换普通分支、执行非快进合并,也不会自动结束正在运行的 dsh 进程。
|
package/cordis.patch.yml
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# dsh-update-center bundle patch: mounts the host plugin into a profile.
|
|
2
|
-
- insert:
|
|
3
|
-
- id: update-center
|
|
4
|
-
name: 'dsh-update-center'
|
|
1
|
+
# dsh-update-center bundle patch: mounts the host plugin into a profile.
|
|
2
|
+
- insert:
|
|
3
|
+
- id: dsh-update-center
|
|
4
|
+
name: 'dsh-update-center'
|
package/data/extra-plugins.json
CHANGED
|
@@ -101,14 +101,14 @@
|
|
|
101
101
|
"releases_url": "https://api.github.com/repos/Britneycode/dsh-update-center/releases{/id}",
|
|
102
102
|
"deployments_url": "https://api.github.com/repos/Britneycode/dsh-update-center/deployments",
|
|
103
103
|
"created_at": "2026-08-16T08:11:15Z",
|
|
104
|
-
"updated_at": "2026-
|
|
105
|
-
"pushed_at": "2026-
|
|
104
|
+
"updated_at": "2026-10-30T09:55:58Z",
|
|
105
|
+
"pushed_at": "2026-10-30T09:55:53Z",
|
|
106
106
|
"git_url": "git://github.com/Britneycode/dsh-update-center.git",
|
|
107
107
|
"ssh_url": "git@github.com:Britneycode/dsh-update-center.git",
|
|
108
108
|
"clone_url": "https://github.com/Britneycode/dsh-update-center.git",
|
|
109
109
|
"svn_url": "https://github.com/Britneycode/dsh-update-center",
|
|
110
110
|
"homepage": null,
|
|
111
|
-
"size":
|
|
111
|
+
"size": 3907,
|
|
112
112
|
"stargazers_count": 2,
|
|
113
113
|
"watchers_count": 2,
|
|
114
114
|
"language": "JavaScript",
|
|
@@ -118,11 +118,11 @@
|
|
|
118
118
|
"has_wiki": true,
|
|
119
119
|
"has_pages": false,
|
|
120
120
|
"has_discussions": false,
|
|
121
|
-
"forks_count":
|
|
121
|
+
"forks_count": 1,
|
|
122
122
|
"mirror_url": null,
|
|
123
123
|
"archived": false,
|
|
124
124
|
"disabled": false,
|
|
125
|
-
"open_issues_count":
|
|
125
|
+
"open_issues_count": 2,
|
|
126
126
|
"license": {
|
|
127
127
|
"key": "bsd-3-clause",
|
|
128
128
|
"name": "BSD 3-Clause \"New\" or \"Revised\" License",
|
|
@@ -141,12 +141,27 @@
|
|
|
141
141
|
"dsh-plugin"
|
|
142
142
|
],
|
|
143
143
|
"visibility": "public",
|
|
144
|
-
"forks":
|
|
145
|
-
"open_issues":
|
|
144
|
+
"forks": 1,
|
|
145
|
+
"open_issues": 2,
|
|
146
146
|
"watchers": 2,
|
|
147
147
|
"default_branch": "main",
|
|
148
148
|
"temp_clone_token": null,
|
|
149
|
-
"network_count":
|
|
149
|
+
"network_count": 1,
|
|
150
150
|
"subscribers_count": 0
|
|
151
|
+
},
|
|
152
|
+
{
|
|
153
|
+
"id": 1424034518,
|
|
154
|
+
"name": "dsh-dyou-wine",
|
|
155
|
+
"full_name": "DoveLi-Gu/dsh-dyou-wine",
|
|
156
|
+
"private": false,
|
|
157
|
+
"owner": {
|
|
158
|
+
"login": "DoveLi-Gu"
|
|
159
|
+
},
|
|
160
|
+
"html_url": "https://github.com/DoveLi-Gu/dsh-dyou-wine",
|
|
161
|
+
"description": "Fixed-rhythm page bounce, a flying whale-girl pet with wall rebounds, and local BGM playback for DeepSeek Harness Web.",
|
|
162
|
+
"descriptionZh": "让 DSH 界面和鲸鱼娘玩偶按固定节奏 Q 弹,玩偶满屏飞行、碰墙反弹,并播放内置 BGM。",
|
|
163
|
+
"fork": false,
|
|
164
|
+
"stargazers_count": 0,
|
|
165
|
+
"pushed_at": "2026-10-18T10:27:41Z"
|
|
151
166
|
}
|
|
152
167
|
]
|