@oh-agent/dsh-mcp-manager 0.1.2 → 0.1.3
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.en.md +6 -6
- package/README.md +4 -4
- package/lib/canonical.js +4 -4
- package/lib/probe.js +1 -1
- package/lib/scan.js +1 -1
- package/package.json +1 -1
package/README.en.md
CHANGED
|
@@ -16,12 +16,12 @@ Install the bundle from the **Plugin Manager** page in Settings, or point
|
|
|
16
16
|
`plugin_manager` at the npm package:
|
|
17
17
|
|
|
18
18
|
```
|
|
19
|
-
plugin_manager action: install_bundle target: "@oh-agent/dsh-mcp-manager@0.1.
|
|
19
|
+
plugin_manager action: install_bundle target: "@oh-agent/dsh-mcp-manager@0.1.3"
|
|
20
20
|
```
|
|
21
21
|
|
|
22
22
|
An absolute directory works as `target` too, which is how you install a local
|
|
23
23
|
checkout or the `dsh-mcp-manager.tgz` attached to the
|
|
24
|
-
[v0.1.
|
|
24
|
+
[v0.1.3 release](https://github.com/wangbobo-coder/dsh-mcp-manager/releases).
|
|
25
25
|
|
|
26
26
|
Do not `pnpm add` the package into the profile by hand, and do not edit the
|
|
27
27
|
profile's `package.json` or `cordis.patch.yml`: installing a package is not the
|
|
@@ -237,16 +237,16 @@ wrote is removed rather than disabled, a full mount → unmount cycle returns
|
|
|
237
237
|
### A mount name is not always the display name
|
|
238
238
|
|
|
239
239
|
`@deepseek-ai/dsh-mcp-client` requires `serverName` to match
|
|
240
|
-
`/^[A-Za-z0-9_-]{1,32}$/`. Many real servers do not —
|
|
241
|
-
|
|
240
|
+
`/^[A-Za-z0-9_-]{1,32}$/`. Many real servers do not — Chinese names commonly look
|
|
241
|
+
like `示例服务器 - API 文档`, and an English name like `My Bridge` carries a space.
|
|
242
242
|
Squeezing those through `sanitizeName` alone gives `API` for every Chinese name,
|
|
243
243
|
so a second mount would collide with the first and the switch would flip the wrong
|
|
244
244
|
server.
|
|
245
245
|
|
|
246
246
|
`canonical.js` therefore exports `dshMountName(name)`: sanitize, and if the result
|
|
247
247
|
lost information (CJK characters, spaces, over-length) append a short hash of the
|
|
248
|
-
original —
|
|
249
|
-
`
|
|
248
|
+
original — `示例服务器 - API 文档` → `API-0aac0ee2`, `My Bridge` →
|
|
249
|
+
`My-Bridge`. It is pure and total, so the write path, the scan, the toggle
|
|
250
250
|
and the removal all compute the same string from the same input without storing a
|
|
251
251
|
mapping anywhere.
|
|
252
252
|
|
package/README.md
CHANGED
|
@@ -17,11 +17,11 @@
|
|
|
17
17
|
直接说「安装 @oh-agent/dsh-mcp-manager」,等价于:
|
|
18
18
|
|
|
19
19
|
```
|
|
20
|
-
plugin_manager action: install_bundle target: "@oh-agent/dsh-mcp-manager@0.1.
|
|
20
|
+
plugin_manager action: install_bundle target: "@oh-agent/dsh-mcp-manager@0.1.3"
|
|
21
21
|
```
|
|
22
22
|
|
|
23
23
|
`target` 也可以填一个绝对目录 —— 本地源码目录,或者
|
|
24
|
-
[v0.1.
|
|
24
|
+
[v0.1.3 release](https://github.com/wangbobo-coder/dsh-mcp-manager/releases) 里附的
|
|
25
25
|
`dsh-mcp-manager.tgz` 解出来的目录。
|
|
26
26
|
|
|
27
27
|
**不要**手动 `pnpm add` 进 profile,也不要手改 profile 的 `package.json` 或
|
|
@@ -147,9 +147,9 @@ client.js (设置页) index.js (宿主入口)
|
|
|
147
147
|
|
|
148
148
|
### 挂载名不总是显示名
|
|
149
149
|
|
|
150
|
-
`@deepseek-ai/dsh-mcp-client` 要求 `serverName` 匹配 `/^[A-Za-z0-9_-]{1,32}$/`。现实中很多服务器不满足 ——
|
|
150
|
+
`@deepseek-ai/dsh-mcp-client` 要求 `serverName` 匹配 `/^[A-Za-z0-9_-]{1,32}$/`。现实中很多服务器不满足 —— 大量中文名形如 `示例服务器 - API 文档`,也有带空格的英文名形如 `My Bridge`。只用 `sanitizeName` 压一遍,所有中文名都会变成 `API`,第二个挂载就会和第一个撞名,开关就会翻错服务器。
|
|
151
151
|
|
|
152
|
-
因此 `canonical.js` 导出 `dshMountName(name)`:先 sanitize,如果结果丢了信息(中日韩字符、空格、超长),就追加原名的短哈希 ——
|
|
152
|
+
因此 `canonical.js` 导出 `dshMountName(name)`:先 sanitize,如果结果丢了信息(中日韩字符、空格、超长),就追加原名的短哈希 —— `示例服务器 - API 文档` → `API-0aac0ee2`,`My Bridge` → `My-Bridge`。它是纯函数且全域的,所以写入路径、扫描、开关、移除都从同一输入算出同一字符串,不需要在任何地方存映射表。
|
|
153
153
|
|
|
154
154
|
扫描和页面处理的后果:
|
|
155
155
|
|
package/lib/canonical.js
CHANGED
|
@@ -267,12 +267,12 @@ export function sanitizeName(raw, fallback = 'server') {
|
|
|
267
267
|
*
|
|
268
268
|
* The harness's own `@deepseek-ai/dsh-mcp-client` constrains `serverName` to
|
|
269
269
|
* `/^[A-Za-z0-9_-]{1,32}$/` (lib/index.js of that package, the zod schema and
|
|
270
|
-
* `SERVER_NAME_PATTERN`), so a name like
|
|
270
|
+
* `SERVER_NAME_PATTERN`), so a name like `示例服务器 - API 文档` CANNOT be used
|
|
271
271
|
* verbatim. It has to be mapped.
|
|
272
272
|
*
|
|
273
273
|
* `sanitizeName` alone is not a usable mapping here: every CJK name collapses
|
|
274
|
-
* to whatever ASCII fragments it contains —
|
|
275
|
-
*
|
|
274
|
+
* to whatever ASCII fragments it contains — `示例服务器 - API 文档`,
|
|
275
|
+
* `示例助手 - API 文档` and `另一个服务 - API 文档` ALL become `API`, and
|
|
276
276
|
* for a fully-CJK name it falls back to the constant `server`. That collision is
|
|
277
277
|
* not cosmetic. It produced two visible bugs: the mount row was created under
|
|
278
278
|
* `API`, the page looked the mount up by the display name (found nothing), so
|
|
@@ -283,7 +283,7 @@ export function sanitizeName(raw, fallback = 'server') {
|
|
|
283
283
|
*
|
|
284
284
|
* 1. An all-ASCII name keeps `sanitizeName`'s result unchanged. Those names
|
|
285
285
|
* are already readable and already distinct from each other, so
|
|
286
|
-
* `
|
|
286
|
+
* `My Bridge` stays `My-Bridge` and `my server!` stays
|
|
287
287
|
* `my-server` — which also means rows mounted before this mapping existed
|
|
288
288
|
* keep their identity.
|
|
289
289
|
* 2. A name with any non-ASCII character — CJK, full-width punctuation,
|
package/lib/probe.js
CHANGED
|
@@ -25,7 +25,7 @@ const PROTOCOL_VERSION = '2025-06-18';
|
|
|
25
25
|
* connection to this plugin and a version we still recognise. `test-release.mjs`
|
|
26
26
|
* asserts it matches package.json — a stale value here is otherwise invisible.
|
|
27
27
|
*/
|
|
28
|
-
const CLIENT_INFO = { name: 'dsh-mcp-manager', version: '0.1.
|
|
28
|
+
const CLIENT_INFO = { name: 'dsh-mcp-manager', version: '0.1.3' };
|
|
29
29
|
|
|
30
30
|
function rpcRequest(id, method, params) {
|
|
31
31
|
return JSON.stringify({ jsonrpc: '2.0', id, method, params });
|
package/lib/scan.js
CHANGED
|
@@ -80,7 +80,7 @@ function readDsh(configEditor, profileDir) {
|
|
|
80
80
|
* A server mounted in the harness lives under `dshMountName(displayName)`,
|
|
81
81
|
* because `serverName` may only use `[A-Za-z0-9_-]` — a CJK name has to be
|
|
82
82
|
* mapped. Without this pass the mounted row appears as a SEVENTH server named
|
|
83
|
-
* `API-
|
|
83
|
+
* `API-0aac0ee2` next to `示例服务器 - API 文档`, and the display-named node has
|
|
84
84
|
* no `dsh` target at all, so its switch reads "off" while the server is in fact
|
|
85
85
|
* mounted.
|
|
86
86
|
*
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@oh-agent/dsh-mcp-manager",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.3",
|
|
4
4
|
"description": "One settings page for every MCP server on your machine: scan each AI tool's own config file, see which directory holds which server, probe whether it really starts, and mount or unmount it in DeepSeek Harness without ever editing the other tools' files. / 一个设置页管理本机所有 AI 开发工具的 MCP:按配置文件分组展示、真连探活、只在 DeepSeek Harness 内挂载/卸载,绝不改动其他工具的配置。",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|