dsh-mcp-manager-plus 0.4.0 → 0.4.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/CHANGELOG.md CHANGED
@@ -5,6 +5,54 @@
5
5
 
6
6
  0.3.1 之前的开发发生在公开仓库建立之前,历史没有保留。
7
7
 
8
+ ## [0.4.2] - 2026-09-30
9
+
10
+ ### Fixed
11
+
12
+ - **`peerDependencies` 的版本范围在预发布版本上不成立**:上一版写的
13
+ `>=0.1.6-alpha.1 <0.3.0` 在 pnpm 的默认语义(不含 `includePrerelease`)下会把
14
+ `0.2.0-rc.1`、`0.2.0-rc.2` 这类预发布版本静默排除——node-semver 只放行
15
+ 「与范围内某个比较符同 `major.minor.patch` 且本身带预发布标签」的版本。
16
+ 于是 dsh-market 在其它机器上更新时报「插件声明的一个依赖版本范围在 registry 上
17
+ 没有可满足的版本」。已改为显式预发布分支:
18
+ `>=0.1.6-alpha.1 <0.2.0-0 || >=0.2.0-rc.1 <0.3.0-0`,
19
+ 在 pnpm 默认语义与 harness 兼容门禁两种模式下都满足 `0.1.6-alpha.1` 与
20
+ `0.2.0-rc.x`,并仍然拒绝 `0.3.0`
21
+
22
+ > 附:0.4.1 发布后 `registry.npmmirror.com` 镜像未同步到该版本,更新失败的另一半
23
+ > 原因是镜像缺版本;本版已重新发布并触发镜像同步。
24
+
25
+ ## [0.4.1] - 2026-09-29
26
+
27
+ 适配 dsh 0.2.0-rc.2(从 0.1.6-alpha.1 升级)。升级本身没有改动本插件使用的任何接口,
28
+ 但升级同时把 `@deepseek-ai/cordis-plugin-loader` 从 1.0.3 抬到了 1.0.5,其中一处私有 API
29
+ 被移除,故有此版本。
30
+
31
+ ### Fixed
32
+
33
+ - **「重启」在 dsh 0.2.0-rc.2 上恒为失败**:旧代码用 loader 的私有
34
+ `entry._dispose()` 重建行(0.1.6-alpha.1 携带的 loader 1.0.3 有该方法),
35
+ 而 0.2.0-rc.2 携带的 1.0.5 已将其删除,于是「重启」总是返回
36
+ 「当前载入器不支持就地重启,请重启 dsh 进程」。现在优先调用公开的
37
+ `entry.fiber.restart()`,并保留 `_dispose()` + `init()` 分支兼容旧版 loader
38
+ - **测试不再依赖本机 profile 状态**:`test/live.test.mjs` 原先拿本机真实的
39
+ `cordis.patch.yml` 判断行的启停,本机把 `dbx` 停用后,两个用例便误报
40
+ `active`/`failed` 断言失败(实测:只删掉那一条停用覆盖即全部通过)。
41
+ 这两类用例改为在临时 profile 上运行,不再受本机状态影响
42
+
43
+ ### Added
44
+
45
+ - 新增重启路径回归用例:分别覆盖 `fiber.restart()`、`_dispose()` + `init()`、
46
+ fiber 已销毁、以及两种形态都不具备共 4 种情形;`live` 套件另补
47
+ 「patch 层停用优先于 loader 条目」和「部署提供的行仍被列出」两个用例
48
+ (测试总数 108 → 113)
49
+ - **插件卡片元数据**:新增 `locale/zh.json` 与 `locale/en.json`(标题、描述)和
50
+ `icon.svg`,并在 `package.json` 中声明 `icon` 与 `./locale/*.json` 导出。
51
+ dsh 0.2.0 的插件市场卡片与设置页插件清单会直接读取它们,无需激活插件
52
+ - **`peerDependencies`**:声明 `@deepseek-ai/dsh: ">=0.1.6-alpha.1 <0.3.0"`
53
+ (`optional: true`,不影响安装),让 dsh 的兼容性门禁能在运行时版本不匹配时明确报错,
54
+ 而不是静默加载
55
+
8
56
  ## [0.4.0] - 2026-09-17
9
57
 
10
58
  ### Added
@@ -46,5 +94,7 @@
46
94
  JSON 编辑、宿主路由、bundle 加载、profile 组合与真实 profile 只读验证;
47
95
  另附 e2e 导入、往返校验、图标预览等辅助脚本
48
96
 
97
+ [0.4.2]: https://github.com/appthin/dsh-mcp-manager-plus/compare/v0.4.1...v0.4.2
98
+ [0.4.1]: https://github.com/appthin/dsh-mcp-manager-plus/compare/v0.4.0...v0.4.1
49
99
  [0.4.0]: https://github.com/appthin/dsh-mcp-manager-plus/compare/v0.3.1...v0.4.0
50
100
  [0.3.1]: https://github.com/appthin/dsh-mcp-manager-plus/tree/v0.3.1
package/README.en.md CHANGED
@@ -42,7 +42,7 @@ paste a whole replacement block, and renaming is just changing the name.
42
42
 
43
43
  ## Installation
44
44
 
45
- **Requirements:** DSH >= 0.1.5-rc.1 (developed and tested on 0.1.6-alpha.1).
45
+ **Requirements:** DSH >= 0.1.6-alpha.1 and < 0.3.0 (tested on 0.1.6-alpha.1 and 0.2.0-rc.2).
46
46
  DSH itself needs Node.js >= 24.2.0 and Git >= 2.31.0.
47
47
 
48
48
  ### Option 1: one-click install from the plugin market
package/README.md CHANGED
@@ -35,7 +35,7 @@ MCP 服务器管理插件:在 DeepSeek Harness 设置界面的左侧边栏新
35
35
 
36
36
  ## 安装说明
37
37
 
38
- **版本要求:** DSH >= 0.1.5-rc.1(在 0.1.6-alpha.1 上开发并测试)。DSH 自身依赖 Node.js >= 24.2.0 与 Git >= 2.31.0。
38
+ **版本要求:** DSH >= 0.1.6-alpha.1 且 < 0.3.0(已在 0.1.6-alpha.1 与 0.2.0-rc.2 上测试)。DSH 自身依赖 Node.js >= 24.2.0 与 Git >= 2.31.0。
39
39
 
40
40
  ### 方式一:插件市场一键安装
41
41
 
package/icon.svg ADDED
@@ -0,0 +1,7 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" width="64" height="64" viewBox="0 0 64 64" role="img" aria-label="MCP Manager Plus">
2
+ <rect width="64" height="64" rx="14" fill="#247bbf"/>
3
+ <g transform="translate(16 16) scale(2)" fill="#ffffff">
4
+ <path d="M9.94133 6.50173C11.3218 7.99603 11.3218 10.3011 9.94128 11.7954C9.88691 11.8542 9.82125 11.9196 9.72099 12.0198L7.75707 13.9838C7.65709 14.0838 7.592 14.1491 7.53334 14.2034C6.03906 15.5843 3.7327 15.5854 2.23827 14.2048C2.17933 14.1503 2.11374 14.0844 2.01315 13.9838C1.91318 13.8839 1.84922 13.8188 1.79495 13.7601C0.413857 12.2657 0.413909 9.95948 1.795 8.46503C1.84923 8.4064 1.91335 8.34115 2.01321 8.24129L3.79275 6.46313C3.71814 7.08101 3.75236 7.71445 3.90115 8.33518L3.00344 9.23151C2.89398 9.34097 2.8535 9.38307 2.82251 9.41658C1.93771 10.3744 1.93704 11.8514 2.82179 12.8092C2.85279 12.8427 2.89383 12.884 3.0034 12.9936C3.11272 13.1029 3.15429 13.1442 3.18777 13.1752C4.14561 14.0603 5.62381 14.0608 6.58178 13.1758C6.61532 13.1448 6.65722 13.1032 6.76685 12.9935L8.73077 11.0296C8.83999 10.9204 8.88142 10.8787 8.91238 10.8452C9.79744 9.88728 9.7969 8.40911 8.91173 7.45124C8.88074 7.41775 8.83944 7.3762 8.73011 7.26687C8.62082 7.15757 8.58061 7.11623 8.54712 7.08526C8.37347 6.92477 8.18243 6.79361 7.98088 6.69165L9.00289 5.66964C9.17506 5.78373 9.34035 5.91265 9.49663 6.05703C9.55538 6.11135 9.62026 6.17652 9.72036 6.27662C9.82094 6.3772 9.88686 6.4428 9.94133 6.50173Z"/>
5
+ <path d="M6.06816 9.49196C4.68626 7.99724 4.68667 5.68942 6.06885 4.19487C6.12268 4.13671 6.18789 4.07306 6.28706 3.9739L8.24541 2.01416C8.34478 1.91479 8.41018 1.85055 8.46845 1.79665C9.96301 0.414902 12.2689 0.414922 13.7635 1.79665C13.8217 1.85051 13.8866 1.91559 13.9858 2.01486C14.0849 2.11394 14.1502 2.17769 14.204 2.23583C15.5861 3.7304 15.5866 6.03823 14.2047 7.53291C14.1508 7.59125 14.0854 7.65638 13.9858 7.75595L12.1994 9.54098C12.2614 8.92982 12.2185 8.30587 12.0634 7.69657L12.9956 6.76573C13.1044 6.65692 13.1458 6.61529 13.1765 6.58205C14.0621 5.62404 14.0621 4.1454 13.1765 3.18738C13.1458 3.15419 13.104 3.1135 12.9956 3.00508C12.8877 2.89716 12.8471 2.85551 12.814 2.82485C11.8559 1.9389 10.376 1.93886 9.41794 2.82485C9.38479 2.85554 9.34381 2.89622 9.23564 3.00439L7.27728 4.96413C7.16875 5.07265 7.12708 5.11322 7.09636 5.14643C6.21074 6.10441 6.21153 7.58236 7.09705 8.5404C7.12775 8.57357 7.16826 8.61575 7.27659 8.72408C7.38456 8.83205 7.42647 8.87227 7.45958 8.90293C7.62849 9.0591 7.81309 9.1881 8.00856 9.28894L6.98795 10.3095C6.82111 10.1978 6.66052 10.0715 6.50872 9.93114C6.45057 9.87733 6.38547 9.81341 6.28637 9.71431C6.1871 9.61504 6.12202 9.55018 6.06816 9.49196Z"/>
6
+ </g>
7
+ </svg>
package/lib/index.js CHANGED
@@ -315,6 +315,8 @@ function unmaskMap(next, previous) {
315
315
 
316
316
  /** Cordis fiber states, mirrored as the readable phase the browser shows. */
317
317
  const FIBER_PHASE = { 0: 'pending', 1: 'loading', 2: 'active', 3: 'failed', 4: null, 5: 'unloading' };
318
+ /** Cordis `FiberState.DISPOSED`: the fiber is gone and cannot be restarted. */
319
+ const FIBER_DISPOSED = 4;
318
320
 
319
321
  /**
320
322
  * Find the live loader entry for one managed server. Matching is by package
@@ -760,6 +762,42 @@ async function removeServer(ctx, input, lang = 'zh') {
760
762
  });
761
763
  }
762
764
 
765
+ /**
766
+ * Re-run one loader entry so its plugin starts again in place — the recovery
767
+ * path for a connection that died past its reconnect budget.
768
+ *
769
+ * Two loader generations are supported, because the row API changed under this
770
+ * plugin:
771
+ * - `@deepseek-ai/cordis-plugin-loader` 1.0.3 and older (dsh ≤ 0.1.6-alpha.x)
772
+ * dispose a row through the private `entry._dispose()`, which also clears the
773
+ * entry's fiber, so the `entry.init()` that follows mounts a fresh one.
774
+ * - 1.0.5 and newer (dsh ≥ 0.2.0-rc.x) dropped `_dispose`; the public
775
+ * `entry.fiber.restart()` replaces it, disposing the running plugin and
776
+ * re-applying it on the same fiber.
777
+ *
778
+ * `entry.fiber.dispose()` + `entry.init()` is deliberately NOT the newer path:
779
+ * `init()` does not clear `entry.fiber` there, so that pair would leave a
780
+ * second fiber behind.
781
+ * @param entry - the live loader entry for the server.
782
+ * @param serverName - the server's namespace, for messages.
783
+ * @param lang - response language for messages.
784
+ */
785
+ async function remountEntry(entry, serverName, lang) {
786
+ if (typeof entry._dispose === 'function' && typeof entry.init === 'function') {
787
+ await entry._dispose();
788
+ await entry.init();
789
+ return;
790
+ }
791
+ const fiber = entry.fiber;
792
+ if (fiber === undefined || fiber.state === FIBER_DISPOSED) {
793
+ throw new Error(tr(lang, 'restartUnmounted', { name: serverName }));
794
+ }
795
+ if (typeof fiber.restart !== 'function') {
796
+ throw new Error(tr(lang, 'restartUnsupported'));
797
+ }
798
+ await fiber.restart();
799
+ }
800
+
763
801
  /**
764
802
  * Restart one server's live connection by disposing and re-initializing its
765
803
  * loader entry. The row's configuration is untouched, so a server whose
@@ -782,11 +820,7 @@ async function restartServer(ctx, input, lang = 'zh') {
782
820
  if (!server.enabled) throw new Error(tr(lang, 'restartDisabled', { name: server.serverName }));
783
821
  const entry = findEntry(ctx, server.serverName);
784
822
  if (entry === undefined) throw new Error(tr(lang, 'restartUnmounted', { name: server.serverName }));
785
- if (typeof entry._dispose !== 'function' || typeof entry.init !== 'function') {
786
- throw new Error(tr(lang, 'restartUnsupported'));
787
- }
788
- await entry._dispose();
789
- await entry.init();
823
+ await remountEntry(entry, server.serverName, lang);
790
824
  return tr(lang, 'restarted', { name: server.serverName });
791
825
  }
792
826
 
package/locale/en.json ADDED
@@ -0,0 +1,6 @@
1
+ {
2
+ "meta": {
3
+ "title": "MCP Manager",
4
+ "description": "Manage the MCP servers you have added — enable, configure, or add new tool capabilities."
5
+ }
6
+ }
package/locale/zh.json ADDED
@@ -0,0 +1,6 @@
1
+ {
2
+ "meta": {
3
+ "title": "MCP 管理",
4
+ "description": "管理您已添加的 MCP 服务器,可启用、配置或添加新的工具能力。"
5
+ }
6
+ }
package/package.json CHANGED
@@ -1,8 +1,9 @@
1
1
  {
2
2
  "name": "dsh-mcp-manager-plus",
3
- "version": "0.4.0",
3
+ "version": "0.4.2",
4
4
  "description": "MCP manager settings page for DeepSeek Harness: list, enable, configure and add MCP servers from the browser, written durably to the profile's user patch layer.",
5
5
  "license": "MIT",
6
+ "icon": "./icon.svg",
6
7
  "repository": {
7
8
  "type": "git",
8
9
  "url": "git+https://github.com/appthin/dsh-mcp-manager-plus.git"
@@ -15,10 +16,13 @@
15
16
  },
16
17
  "./client": "./lib/client.js",
17
18
  "./cordis.patch.yml": "./cordis.patch.yml",
19
+ "./locale/*.json": "./locale/*.json",
18
20
  "./package.json": "./package.json"
19
21
  },
20
22
  "files": [
21
23
  "lib",
24
+ "locale/*.json",
25
+ "icon.svg",
22
26
  "cordis.patch.yml",
23
27
  "README.md",
24
28
  "README.en.md",
@@ -36,6 +40,14 @@
36
40
  "mcp",
37
41
  "model-context-protocol"
38
42
  ],
43
+ "peerDependencies": {
44
+ "@deepseek-ai/dsh": ">=0.1.6-alpha.1 <0.2.0-0 || >=0.2.0-rc.1 <0.3.0-0"
45
+ },
46
+ "peerDependenciesMeta": {
47
+ "@deepseek-ai/dsh": {
48
+ "optional": true
49
+ }
50
+ },
39
51
  "dsh": {
40
52
  "bundle": {
41
53
  "patch": "./cordis.patch.yml"