dsh-mcp-ops 0.2.2 → 0.3.0
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/README.md +20 -10
- package/lib/client.js +281 -145
- package/lib/configs.js +21 -8
- package/lib/host-locales.js +2 -20
- package/lib/mount.js +31 -42
- package/lib/oauth-key.js +21 -0
- package/lib/probe.js +20 -6
- package/lib/refs.js +0 -42
- package/lib/service.js +71 -243
- package/lib/sources/cordis-source.js +3 -4
- package/lib/tool-control.js +56 -276
- package/package.json +15 -17
- package/lib/oauth-store.js +0 -81
- package/lib/oauth-web.js +0 -120
- package/lib/oauth.js +0 -256
package/README.md
CHANGED
|
@@ -10,9 +10,12 @@ DeepSeek Harness(dsh)插件:在设置页管理 MCP 服务。
|
|
|
10
10
|
工具枚举。同名冲突交给组合层(补丁层)声明的服务可以**接管 / 释放**。
|
|
11
11
|
- **环境变量**:逐服务配置环境变量,勾选「密钥」的变量在配置文件里**不落明文**,真值只进 DSH 凭据库;
|
|
12
12
|
另有**进程级环境变量**,统一注入 stdio 子进程(含密钥)。
|
|
13
|
-
- **工具注入**:两种模式 ——
|
|
14
|
-
|
|
15
|
-
|
|
13
|
+
- **工具注入**:两种模式 —— **按需加载**(官方 `toolLoading: 'on-demand'`:工具只进提示词目录,
|
|
14
|
+
agent 用 `mcp__<服务>__load_tools` 按需装载,**仅对发起装载的会话生效**)与 **全量注入**
|
|
15
|
+
(`eager`);两种模式下都可以逐工具关闭。
|
|
16
|
+
- **OAuth 授权**:远程 MCP(streamable-http)的 OAuth **委托官方 `dsh-mcp-client`** —— 本插件只声明
|
|
17
|
+
`oauth.credentialKey`,发现 / 客户端注册 / PKCE / 回调 / 换取与刷新 token 全部由官方承担,
|
|
18
|
+
凭据落在 DSH 统一凭据库(`mcp-client/<id>`),授权状态显示在卡片上。
|
|
16
19
|
- **配置真源**:`$DSH_HOME/.mcp.json`(缺省 `~/.dsh/.mcp.json`)—— 服务定义在 `mcpServers`,
|
|
17
20
|
本插件的状态(注入模式、覆盖项、逐工具开关、进程级变量)在同一个文件的 `configs` 段,
|
|
18
21
|
**就地写回**(只改必须改的字节,文件里的注释与未知键原样保留)。
|
|
@@ -25,16 +28,23 @@ DeepSeek Harness(dsh)插件:在设置页管理 MCP 服务。
|
|
|
25
28
|
|
|
26
29
|
```sh
|
|
27
30
|
# 已发布到 npm 仓库(固定版本;不写 @<版本> 则装 latest)
|
|
28
|
-
dsh plugin --profile web add dsh-mcp-ops@0.
|
|
31
|
+
dsh plugin --profile web add dsh-mcp-ops@0.3.0
|
|
29
32
|
|
|
30
33
|
# 或本地 tarball(pnpm pack 的产物)
|
|
31
|
-
dsh plugin --profile web add /path/to/dsh-mcp-ops-0.
|
|
34
|
+
dsh plugin --profile web add /path/to/dsh-mcp-ops-0.3.0.tgz
|
|
32
35
|
|
|
33
36
|
# 卸载
|
|
34
37
|
dsh plugin --profile web remove dsh-mcp-ops
|
|
35
38
|
```
|
|
36
39
|
|
|
37
|
-
**支持的 dsh 版本**:`0.2.
|
|
40
|
+
**支持的 dsh 版本**:`0.2.3` 及以后的 `0.2.x`(`engines.dsh: >=0.2.3-0 <0.3.0-0`、`engines.node: ^24.22.3 || >=26.13.1`)。**不再支持 `0.2.2` 及更早**:`0.2.3` 才提供 `oauth` 与 `toolLoading` 两个注册字段,本插件的 OAuth 与按需加载都建立在它们之上。
|
|
41
|
+
|
|
42
|
+
### 0.3.0 的破坏性变更
|
|
43
|
+
|
|
44
|
+
- **OAuth 交给官方**:不再自建 `DSH_MCP_OAUTH_*` 凭据、不再注册回调路由。升级后旧的 OAuth 记录成为孤儿(**不会被删除**),需要重新授权一次。
|
|
45
|
+
- **注入模式改名**:`search` → `on-demand`、`full` → `eager`(首次读取时自动映射,落盘后只写新值)。
|
|
46
|
+
- **不再有 `mcp_tool_search` 与热集**:按需加载由官方的 `mcp__<服务>__load_tools` 承担;跨服务器关键词检索因此不再提供。
|
|
47
|
+
- **已知语义差异**:`on-demand` 下被关闭的工具仍会出现在官方目录里(目录由官方生成),但调用时会被拒绝。
|
|
38
48
|
|
|
39
49
|
本包声明了 `dsh.bundle`,官方流程会自动把依赖写进 profile 的 `package.json` 并登记进
|
|
40
50
|
`dsh.profile.bundles`,包内的 `cordis.patch.yml` 作为 bundle 层自动应用 —— 不需要手工编辑任何
|
|
@@ -52,7 +62,7 @@ pnpm pack --pack-destination docker # 打 tarball 供镜像构建(prepack 会
|
|
|
52
62
|
|
|
53
63
|
```
|
|
54
64
|
src/host/ host 半部(构建出 lib/,esbuild bundle:false,保留 @deepseek-ai/* 导入)
|
|
55
|
-
src/client/ 浏览器半部(构建出 lib/client.js,ModuleLoader wire format +
|
|
65
|
+
src/client/ 浏览器半部(构建出 lib/client.js,ModuleLoader wire format + `meta().stylesheets`)
|
|
56
66
|
scripts/ build-host / build-client / check-client-bundle / test / dsh-toolchain
|
|
57
67
|
tests/unit/ 零依赖逻辑用例 tests/integration/ 需要 DSH 闭包与 lib/ 产物
|
|
58
68
|
docker/ Dockerfile(官方 dsh plugin 命令装配)/ verify*.mjs / docker-compose.yaml
|
|
@@ -75,7 +85,7 @@ node scripts/verify.mjs
|
|
|
75
85
|
|
|
76
86
|
# 首次,或基线镜像变了:重建镜像并起容器(约 10 分钟)
|
|
77
87
|
pnpm run --config.verify-deps-before-run=false build && pnpm pack --pack-destination docker &&
|
|
78
|
-
docker build --progress=plain -t founder/dsh-mcp-ops:0.
|
|
88
|
+
docker build --progress=plain -t founder/dsh-mcp-ops:0.3.0 -f docker/Dockerfile docker/ &&
|
|
79
89
|
HOME=/home/ubuntu docker compose -f docker/docker-compose.yaml --project-directory docker up -d --force-recreate
|
|
80
90
|
```
|
|
81
91
|
|
|
@@ -116,8 +126,8 @@ npm publish --dry-run --registry=https://registry.npmjs.org/
|
|
|
116
126
|
npm publish --registry=https://registry.npmjs.org/ --access public
|
|
117
127
|
|
|
118
128
|
# 4) 发布后核对并打 tag
|
|
119
|
-
npm view dsh-mcp-ops@0.
|
|
120
|
-
git tag -a v0.
|
|
129
|
+
npm view dsh-mcp-ops@0.3.0 --registry=https://registry.npmjs.org/
|
|
130
|
+
git tag -a v0.3.0 -m "dsh-mcp-ops 0.3.0" && git push origin v0.3.0
|
|
121
131
|
```
|
|
122
132
|
|
|
123
133
|
72 小时内可 `npm unpublish dsh-mcp-ops@<版本>` 撤回;超时只能 `npm deprecate`。
|