dsh-mcp 1.15.2 → 1.15.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/CHANGELOG.en.md CHANGED
@@ -12,6 +12,20 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
12
12
  - **Supported DSH version**: **dsh `0.2.2-rc.3`** — the latest release is developed and verified on `0.2.2-rc.3` (declared in `package.json` → `dsh.supported`); older entries state the version verified at their time. When the DSH and plugin versions do not match, the Settings page reports a diagnosis (check whether the bundle is selected → restart `dsh web` → hard-refresh → upgrade both sides).
13
13
  - **Release convention**: every version entry states `- **Supported DSH version**: dsh <version>`, mirrored in the GitHub Release notes. The release body is written in **Chinese** (matching [CHANGELOG.md](CHANGELOG.md)), with heading levels mirroring the entry.
14
14
 
15
+ ## [1.15.3] - 2026-11-18
16
+
17
+ - **Supported DSH version**: **dsh `0.2.2-rc.3`**
18
+
19
+ ### Fixed
20
+
21
+ - **Plugin failed to mount on DSH 0.2.2-rc.3: `service "mcpManager" has been registered at <McpServerManager>` (issue #25)**: since rc.3 DSH ships `McpServerManager`, which owns the `mcpManager` Cordis service key, while this plugin registered the very same key — Cordis refuses a second registration of one key, so the plugin row errored out and the MCP settings page was unusable. The plugin's Cordis service key is now **`dshMcpManager`**, with the wire namespace still declared as `mcpManager` (`super(ctx, "dshMcpManager", { namespace: "mcpManager" })`). The Remote contract is therefore unchanged: the client contribution's `namespace` and every endpoint stay as they were, and the gateway routes by `<namespace>/<method>` rather than by service key; the endpoint sets still never overlap the built-in manager's `mcpManager/probe|restart|watch`
22
+ - The client descriptors' `service` field now names `dshMcpManager` too (14 places) while `namespace` stays `mcpManager`: the gateway resolves the receiver with `ctx.get(descriptor.service)` and then validates the binding against `descriptor.namespace`, so both must mirror the host's `super(ctx, …)` arguments — changing one side alone makes every call fail with `gateway/method-unavailable`
23
+ - New `test/service-key.test.mjs`: asserts the host no longer claims the `mcpManager` Cordis service key and that every client descriptor's `service`/`namespace` matches the host declaration (guarding against a one-sided rename)
24
+
25
+ ### Notes
26
+
27
+ - `lib/client.js` rebuilt: 14 changed lines (the `service` field), `zod` stays 4.4.3, no dependency or path drift, and the build is reproducible
28
+
15
29
  ## [1.15.2] - 2026-11-15
16
30
 
17
31
  - **Supported DSH version**: **dsh `0.2.2-rc.3`**
package/CHANGELOG.md CHANGED
@@ -12,6 +12,20 @@
12
12
  - **支持版本**:**dsh `0.2.2-rc.3`** —— 最新版本在 `0.2.2-rc.3` 上开发与验证(`package.json` → `dsh.supported` 同步声明);历史版本条目各自声明当时验证的版本。DSH 与插件版本不匹配时,设置页会给出排查诊断(核对 bundle 是否已选中 → 重启 `dsh web` → 硬刷新 → 同步升级)。
13
13
  - **发版约定**:每个版本条目都要声明 `- **支持版本**:dsh <版本>`,并在 GitHub Release notes 中同步。Release 正文用**中文**(与本文档一致),标题层级与条目一致。
14
14
 
15
+ ## [1.15.3] - 2026-11-18
16
+
17
+ - **支持版本**:**dsh `0.2.2-rc.3`**
18
+
19
+ ### 修复
20
+
21
+ - **DSH 0.2.2-rc.3 上插件挂载失败:`service "mcpManager" has been registered at <McpServerManager>`(issue #25)**:rc.3 起 DSH 内置的 `McpServerManager` 占用了 Cordis 服务键 `mcpManager`,而本插件一直用它作为自己的服务名——Cordis 不允许同一个服务键注册两次,于是插件行直接报错、MCP 设置页不可用。现在把本插件的 Cordis 服务键改为 **`dshMcpManager`**,同时**显式声明线名仍为 `mcpManager`**(`super(ctx, "dshMcpManager", { namespace: "mcpManager" })`)。Remote 契约因此完全不变:客户端 contribution 的 `namespace` 与全部 endpoint 一个未动,网关按 `<namespace>/<method>` 路由而非按服务键解析;与内置管理器 `mcpManager/probe|restart|watch` 的端点依然无交集
22
+ - 客户端 descriptor 的 `service` 字段同步改为 `dshMcpManager`(14 处),`namespace` 保持 `mcpManager`:网关是按 `ctx.get(descriptor.service)` 取接收者、再用 `descriptor.namespace` 校验绑定的,两者必须与宿主 `super(ctx, …)` 参数一一对应,只改一侧会让每次调用报 `gateway/method-unavailable`
23
+ - 新增 `test/service-key.test.mjs`:断言宿主不再占用 `mcpManager` 这个 Cordis 服务键、且客户端每个 descriptor 的 `service`/`namespace` 都与宿主声明完全一致(防止只改一侧)
24
+
25
+ ### 说明
26
+
27
+ - `lib/client.js` 重建:diff 仅 14 行(`service` 字段),`zod` 仍为 4.4.3,无依赖/路径漂移,重建可复现
28
+
15
29
  ## [1.15.2] - 2026-11-15
16
30
 
17
31
  - **支持版本**:**dsh `0.2.2-rc.3`**
package/lib/client.js CHANGED
@@ -14983,7 +14983,7 @@ var TYPERT_REMOTE = {
14983
14983
  descriptors: [
14984
14984
  {
14985
14985
  id: "dsh-mcp#mcpManager/delete",
14986
- service: "mcpManager",
14986
+ service: "dshMcpManager",
14987
14987
  namespace: "mcpManager",
14988
14988
  method: "delete",
14989
14989
  invocation: { kind: "direct" },
@@ -15010,7 +15010,7 @@ var TYPERT_REMOTE = {
15010
15010
  },
15011
15011
  {
15012
15012
  id: "dsh-mcp#mcpManager/list",
15013
- service: "mcpManager",
15013
+ service: "dshMcpManager",
15014
15014
  namespace: "mcpManager",
15015
15015
  method: "list",
15016
15016
  invocation: { kind: "direct" },
@@ -15025,7 +15025,7 @@ var TYPERT_REMOTE = {
15025
15025
  },
15026
15026
  {
15027
15027
  id: "dsh-mcp#mcpManager/test",
15028
- service: "mcpManager",
15028
+ service: "dshMcpManager",
15029
15029
  namespace: "mcpManager",
15030
15030
  method: "test",
15031
15031
  invocation: { kind: "direct" },
@@ -15052,7 +15052,7 @@ var TYPERT_REMOTE = {
15052
15052
  },
15053
15053
  {
15054
15054
  id: "dsh-mcp#mcpManager/upsert",
15055
- service: "mcpManager",
15055
+ service: "dshMcpManager",
15056
15056
  namespace: "mcpManager",
15057
15057
  method: "upsert",
15058
15058
  invocation: { kind: "direct" },
@@ -15079,7 +15079,7 @@ var TYPERT_REMOTE = {
15079
15079
  },
15080
15080
  {
15081
15081
  id: "dsh-mcp#mcpManager/upsertJson",
15082
- service: "mcpManager",
15082
+ service: "dshMcpManager",
15083
15083
  namespace: "mcpManager",
15084
15084
  method: "upsertJson",
15085
15085
  invocation: { kind: "direct" },
@@ -15106,7 +15106,7 @@ var TYPERT_REMOTE = {
15106
15106
  },
15107
15107
  {
15108
15108
  id: "dsh-mcp#mcpManager/toolsList",
15109
- service: "mcpManager",
15109
+ service: "dshMcpManager",
15110
15110
  namespace: "mcpManager",
15111
15111
  method: "toolsList",
15112
15112
  invocation: { kind: "direct" },
@@ -15121,7 +15121,7 @@ var TYPERT_REMOTE = {
15121
15121
  },
15122
15122
  {
15123
15123
  id: "dsh-mcp#mcpManager/toolsSet",
15124
- service: "mcpManager",
15124
+ service: "dshMcpManager",
15125
15125
  namespace: "mcpManager",
15126
15126
  method: "toolsSet",
15127
15127
  invocation: { kind: "direct" },
@@ -15148,7 +15148,7 @@ var TYPERT_REMOTE = {
15148
15148
  },
15149
15149
  {
15150
15150
  id: "dsh-mcp#mcpManager/toolsMode",
15151
- service: "mcpManager",
15151
+ service: "dshMcpManager",
15152
15152
  namespace: "mcpManager",
15153
15153
  method: "toolsMode",
15154
15154
  invocation: { kind: "direct" },
@@ -15175,7 +15175,7 @@ var TYPERT_REMOTE = {
15175
15175
  },
15176
15176
  {
15177
15177
  id: "dsh-mcp#mcpManager/envList",
15178
- service: "mcpManager",
15178
+ service: "dshMcpManager",
15179
15179
  namespace: "mcpManager",
15180
15180
  method: "envList",
15181
15181
  invocation: { kind: "direct" },
@@ -15190,7 +15190,7 @@ var TYPERT_REMOTE = {
15190
15190
  },
15191
15191
  {
15192
15192
  id: "dsh-mcp#mcpManager/envSet",
15193
- service: "mcpManager",
15193
+ service: "dshMcpManager",
15194
15194
  namespace: "mcpManager",
15195
15195
  method: "envSet",
15196
15196
  invocation: { kind: "direct" },
@@ -15217,7 +15217,7 @@ var TYPERT_REMOTE = {
15217
15217
  },
15218
15218
  {
15219
15219
  id: "dsh-mcp#mcpManager/adopt",
15220
- service: "mcpManager",
15220
+ service: "dshMcpManager",
15221
15221
  namespace: "mcpManager",
15222
15222
  method: "adopt",
15223
15223
  invocation: { kind: "direct" },
@@ -15244,7 +15244,7 @@ var TYPERT_REMOTE = {
15244
15244
  },
15245
15245
  {
15246
15246
  id: "dsh-mcp#mcpManager/release",
15247
- service: "mcpManager",
15247
+ service: "dshMcpManager",
15248
15248
  namespace: "mcpManager",
15249
15249
  method: "release",
15250
15250
  invocation: { kind: "direct" },
@@ -15271,7 +15271,7 @@ var TYPERT_REMOTE = {
15271
15271
  },
15272
15272
  {
15273
15273
  id: "dsh-mcp#mcpManager/oauthStart",
15274
- service: "mcpManager",
15274
+ service: "dshMcpManager",
15275
15275
  namespace: "mcpManager",
15276
15276
  method: "oauthStart",
15277
15277
  invocation: { kind: "direct" },
@@ -15298,7 +15298,7 @@ var TYPERT_REMOTE = {
15298
15298
  },
15299
15299
  {
15300
15300
  id: "dsh-mcp#mcpManager/oauthStatus",
15301
- service: "mcpManager",
15301
+ service: "dshMcpManager",
15302
15302
  namespace: "mcpManager",
15303
15303
  method: "oauthStatus",
15304
15304
  invocation: { kind: "direct" },
package/lib/index.js CHANGED
@@ -642,7 +642,14 @@ let McpManagerService = (() => {
642
642
  * @param config - Resolved manager configuration.
643
643
  */
644
644
  constructor(ctx, config) {
645
- super(ctx, "mcpManager");
645
+ // The Cordis service key must be ours alone: DSH >= 0.2.2-rc.3 ships
646
+ // an official `McpServerManager` that registers the `mcpManager`
647
+ // service key, and Cordis refuses a second registration of the same
648
+ // key (issue #25). The wire namespace is passed explicitly so the
649
+ // Remote contract stays `mcpManager/*` — the browser half and every
650
+ // existing endpoint keep working, and the gateway routes by
651
+ // `<namespace>/<method>` rather than by service key.
652
+ super(ctx, "dshMcpManager", { namespace: "mcpManager" });
646
653
  this.probeTimeoutMs = config.probeTimeoutMs;
647
654
  this.allowBrowserOnMount = config.allowBrowserOnMount;
648
655
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dsh-mcp",
3
- "version": "1.15.2",
3
+ "version": "1.15.3",
4
4
  "description": "MCP 管理界面 + tool search:可视化配置/启停/刷新 MCP 服务器与工具勾选,按需检索(tool search)热注入;工具列表稳定命中缓存、不撑爆上下文。DeepSeek Harness plugin: MCP management UI + tool search — stable tool list, cache-friendly, no context bloat.",
5
5
  "type": "module",
6
6
  "main": "lib/index.js",
@@ -14,6 +14,15 @@
14
14
  * The official manager declares only `mcpManager/probe|restart|watch`, so the
15
15
  * endpoint sets do not overlap either. Rename these ids back only together with
16
16
  * a re-generated FaceModel that carries a unique package name.
17
+ *
18
+ * `service` is the Cordis service key and `namespace` is the wire namespace: the
19
+ * gateway dispatches by `ctx.get(descriptor.service)` and then validates the
20
+ * binding against both fields. DSH 0.2.2-rc.3 ships McpServerManager, which owns
21
+ * the `mcpManager` service key (issue #25), so the host half registers under
22
+ * `dshMcpManager` while keeping the `mcpManager` wire namespace. These
23
+ * descriptors therefore carry `service: 'dshMcpManager'` and
24
+ * `namespace: 'mcpManager'` — both must move together with the host's
25
+ * `super(ctx, …)` arguments.
17
26
  */
18
27
  import { z } from 'zod'
19
28
 
@@ -461,7 +470,7 @@ export const TYPERT_REMOTE = {
461
470
  descriptors: [
462
471
  {
463
472
  id: 'dsh-mcp#mcpManager/delete',
464
- service: 'mcpManager',
473
+ service: 'dshMcpManager',
465
474
  namespace: 'mcpManager',
466
475
  method: 'delete',
467
476
  invocation: { kind: 'direct' },
@@ -488,7 +497,7 @@ export const TYPERT_REMOTE = {
488
497
  },
489
498
  {
490
499
  id: 'dsh-mcp#mcpManager/list',
491
- service: 'mcpManager',
500
+ service: 'dshMcpManager',
492
501
  namespace: 'mcpManager',
493
502
  method: 'list',
494
503
  invocation: { kind: 'direct' },
@@ -504,7 +513,7 @@ export const TYPERT_REMOTE = {
504
513
  },
505
514
  {
506
515
  id: 'dsh-mcp#mcpManager/test',
507
- service: 'mcpManager',
516
+ service: 'dshMcpManager',
508
517
  namespace: 'mcpManager',
509
518
  method: 'test',
510
519
  invocation: { kind: 'direct' },
@@ -531,7 +540,7 @@ export const TYPERT_REMOTE = {
531
540
  },
532
541
  {
533
542
  id: 'dsh-mcp#mcpManager/upsert',
534
- service: 'mcpManager',
543
+ service: 'dshMcpManager',
535
544
  namespace: 'mcpManager',
536
545
  method: 'upsert',
537
546
  invocation: { kind: 'direct' },
@@ -558,7 +567,7 @@ export const TYPERT_REMOTE = {
558
567
  },
559
568
  {
560
569
  id: 'dsh-mcp#mcpManager/upsertJson',
561
- service: 'mcpManager',
570
+ service: 'dshMcpManager',
562
571
  namespace: 'mcpManager',
563
572
  method: 'upsertJson',
564
573
  invocation: { kind: 'direct' },
@@ -585,7 +594,7 @@ export const TYPERT_REMOTE = {
585
594
  },
586
595
  {
587
596
  id: 'dsh-mcp#mcpManager/toolsList',
588
- service: 'mcpManager',
597
+ service: 'dshMcpManager',
589
598
  namespace: 'mcpManager',
590
599
  method: 'toolsList',
591
600
  invocation: { kind: 'direct' },
@@ -601,7 +610,7 @@ export const TYPERT_REMOTE = {
601
610
  },
602
611
  {
603
612
  id: 'dsh-mcp#mcpManager/toolsSet',
604
- service: 'mcpManager',
613
+ service: 'dshMcpManager',
605
614
  namespace: 'mcpManager',
606
615
  method: 'toolsSet',
607
616
  invocation: { kind: 'direct' },
@@ -628,7 +637,7 @@ export const TYPERT_REMOTE = {
628
637
  },
629
638
  {
630
639
  id: 'dsh-mcp#mcpManager/toolsMode',
631
- service: 'mcpManager',
640
+ service: 'dshMcpManager',
632
641
  namespace: 'mcpManager',
633
642
  method: 'toolsMode',
634
643
  invocation: { kind: 'direct' },
@@ -655,7 +664,7 @@ export const TYPERT_REMOTE = {
655
664
  },
656
665
  {
657
666
  id: 'dsh-mcp#mcpManager/envList',
658
- service: 'mcpManager',
667
+ service: 'dshMcpManager',
659
668
  namespace: 'mcpManager',
660
669
  method: 'envList',
661
670
  invocation: { kind: 'direct' },
@@ -671,7 +680,7 @@ export const TYPERT_REMOTE = {
671
680
  },
672
681
  {
673
682
  id: 'dsh-mcp#mcpManager/envSet',
674
- service: 'mcpManager',
683
+ service: 'dshMcpManager',
675
684
  namespace: 'mcpManager',
676
685
  method: 'envSet',
677
686
  invocation: { kind: 'direct' },
@@ -698,7 +707,7 @@ export const TYPERT_REMOTE = {
698
707
  },
699
708
  {
700
709
  id: 'dsh-mcp#mcpManager/adopt',
701
- service: 'mcpManager',
710
+ service: 'dshMcpManager',
702
711
  namespace: 'mcpManager',
703
712
  method: 'adopt',
704
713
  invocation: { kind: 'direct' },
@@ -725,7 +734,7 @@ export const TYPERT_REMOTE = {
725
734
  },
726
735
  {
727
736
  id: 'dsh-mcp#mcpManager/release',
728
- service: 'mcpManager',
737
+ service: 'dshMcpManager',
729
738
  namespace: 'mcpManager',
730
739
  method: 'release',
731
740
  invocation: { kind: 'direct' },
@@ -752,7 +761,7 @@ export const TYPERT_REMOTE = {
752
761
  },
753
762
  {
754
763
  id: 'dsh-mcp#mcpManager/oauthStart',
755
- service: 'mcpManager',
764
+ service: 'dshMcpManager',
756
765
  namespace: 'mcpManager',
757
766
  method: 'oauthStart',
758
767
  invocation: { kind: 'direct' },
@@ -779,7 +788,7 @@ export const TYPERT_REMOTE = {
779
788
  },
780
789
  {
781
790
  id: 'dsh-mcp#mcpManager/oauthStatus',
782
- service: 'mcpManager',
791
+ service: 'dshMcpManager',
783
792
  namespace: 'mcpManager',
784
793
  method: 'oauthStatus',
785
794
  invocation: { kind: 'direct' },