dsh-mcp-ops 0.2.0 → 0.2.2
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 +25 -8
- package/lib/client.js +197 -159
- package/lib/index.js +7 -1
- package/lib/mount.js +366 -148
- package/lib/oauth-store.js +81 -0
- package/lib/oauth-web.js +2 -1
- package/lib/oauth.js +29 -1
- package/lib/probe.js +20 -39
- package/lib/refs.js +10 -2
- package/lib/service.js +85 -16
- package/lib/sources/cordis-source.js +35 -13
- package/lib/system-ca.js +79 -0
- package/lib/tool-control.js +43 -3
- package/package.json +13 -12
package/README.md
CHANGED
|
@@ -25,16 +25,16 @@ DeepSeek Harness(dsh)插件:在设置页管理 MCP 服务。
|
|
|
25
25
|
|
|
26
26
|
```sh
|
|
27
27
|
# 已发布到 npm 仓库(固定版本;不写 @<版本> 则装 latest)
|
|
28
|
-
dsh plugin --profile web add dsh-mcp-ops@0.2.
|
|
28
|
+
dsh plugin --profile web add dsh-mcp-ops@0.2.2
|
|
29
29
|
|
|
30
30
|
# 或本地 tarball(pnpm pack 的产物)
|
|
31
|
-
dsh plugin --profile web add /path/to/dsh-mcp-ops-0.2.
|
|
31
|
+
dsh plugin --profile web add /path/to/dsh-mcp-ops-0.2.2.tgz
|
|
32
32
|
|
|
33
33
|
# 卸载
|
|
34
34
|
dsh plugin --profile web remove dsh-mcp-ops
|
|
35
35
|
```
|
|
36
36
|
|
|
37
|
-
**支持的 dsh 版本**:`0.2.2-rc.
|
|
37
|
+
**支持的 dsh 版本**:`0.2.2-rc.2` 及以后的 `0.2.x`(`engines.dsh: ^0.2.2-rc.2`、`engines.node: >=24.9.0`)。**不再支持 `0.2.2-rc.1` 及更早**:rc.2 才提供 `@deepseek-ai/dsh-mcp-manager`,本插件把挂载 / 状态 / 探测统一交给 `ctx.mcpManager`,旧闭包上会因 `inject` 永不满足而不激活。
|
|
38
38
|
|
|
39
39
|
本包声明了 `dsh.bundle`,官方流程会自动把依赖写进 profile 的 `package.json` 并登记进
|
|
40
40
|
`dsh.profile.bundles`,包内的 `cordis.patch.yml` 作为 bundle 层自动应用 —— 不需要手工编辑任何
|
|
@@ -66,20 +66,37 @@ docs/ 详细设计与官方依赖落点
|
|
|
66
66
|
- 版本号唯一来源是 `package.json` 的 `version`,改版本时同步 `docker/docker-compose.yaml` 的镜像标签;
|
|
67
67
|
`docker/Dockerfile` 里的 tgz 名用通配符,不写死版本。
|
|
68
68
|
|
|
69
|
-
真机验证一律在本项目自己的容器里做(**不要**装进宿主 `~/.dsh
|
|
69
|
+
真机验证一律在本项目自己的容器里做(**不要**装进宿主 `~/.dsh`)。**只有首次建容器、或
|
|
70
|
+
`docker/Dockerfile` 的 `BASE_IMAGE`(基线镜像)变了才重建镜像**;之后每轮都走热更新:
|
|
70
71
|
|
|
71
72
|
```sh
|
|
73
|
+
# 日常改动(host / client 都算):构建 → 打包 → 覆盖安装 → restart → 两条验收,不重建镜像
|
|
74
|
+
node scripts/verify.mjs
|
|
75
|
+
|
|
76
|
+
# 首次,或基线镜像变了:重建镜像并起容器(约 10 分钟)
|
|
72
77
|
pnpm run --config.verify-deps-before-run=false build && pnpm pack --pack-destination docker &&
|
|
73
|
-
docker build --progress=plain -t founder/dsh-mcp-ops:0.2.
|
|
78
|
+
docker build --progress=plain -t founder/dsh-mcp-ops:0.2.2 -f docker/Dockerfile docker/ &&
|
|
74
79
|
HOME=/home/ubuntu docker compose -f docker/docker-compose.yaml --project-directory docker up -d --force-recreate
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
手工只跑两条验收脚本时:
|
|
75
83
|
|
|
84
|
+
```sh
|
|
76
85
|
node docker/verify.mjs # 容器端到端(装配终态 / 启动日志 / 服务侧 sync / locale 元数据 / 客户端产物)
|
|
77
86
|
TOKEN=$(docker logs dsh-mcp-ops 2>&1 | grep -o 'token=[A-Za-z0-9_-]*' | tail -1 | cut -d= -f2)
|
|
78
87
|
docker exec -e DSH_GUI_URL="http://127.0.0.1:3080/?token=$TOKEN" dsh-mcp-ops \
|
|
79
88
|
node "$PWD/docker/verify-gui.mjs" # 真实浏览器验收(含截图)
|
|
80
89
|
```
|
|
81
90
|
|
|
82
|
-
|
|
91
|
+
容器里没有仓库挂载时,`verify-gui.mjs`、`tests/fixtures/echo-mcp-server.mjs` 与 `locale/`
|
|
92
|
+
要先 `docker cp` 进 `/tmp/gui`(路径约定见 `AGENTS.md`);用 `node scripts/verify.mjs` 则不用管,
|
|
93
|
+
它会自己送。
|
|
94
|
+
|
|
95
|
+
改客户端代码**不用重建镜像,但也不能只替换 `lib/client.js`**:镜像把 profile 打进
|
|
96
|
+
`/home/node/dsh-profiles-web.tar.gz`,容器的 entrypoint 每次启动都用它重置
|
|
97
|
+
`profiles/web/node_modules`,Web 壳又按产物内容算 `rev` —— 直接 `docker cp` 一个 `client.js`
|
|
98
|
+
进去,服务端发出去的还是旧字节。`node scripts/verify.mjs` 走的是正路:打包新 tgz → 在容器**本地**
|
|
99
|
+
的 profile 副本上跑官方 `dsh plugin add` → 重新打 profile tarball → `docker restart`,然后自动验收。
|
|
83
100
|
|
|
84
101
|
## 发布说明
|
|
85
102
|
|
|
@@ -99,8 +116,8 @@ npm publish --dry-run --registry=https://registry.npmjs.org/
|
|
|
99
116
|
npm publish --registry=https://registry.npmjs.org/ --access public
|
|
100
117
|
|
|
101
118
|
# 4) 发布后核对并打 tag
|
|
102
|
-
npm view dsh-mcp-ops@0.2.
|
|
103
|
-
git tag -a v0.2.
|
|
119
|
+
npm view dsh-mcp-ops@0.2.2 --registry=https://registry.npmjs.org/
|
|
120
|
+
git tag -a v0.2.2 -m "dsh-mcp-ops 0.2.2" && git push origin v0.2.2
|
|
104
121
|
```
|
|
105
122
|
|
|
106
123
|
72 小时内可 `npm unpublish dsh-mcp-ops@<版本>` 撤回;超时只能 `npm deprecate`。
|