@lstions/dsh-skill-mcp-panel 1.12.0 → 1.12.1
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 +17 -0
- package/README.md +3 -3
- package/lib/mcp.js +53 -15
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -11,6 +11,7 @@
|
|
|
11
11
|
|
|
12
12
|
| 版本 | 日期 | 提交 | 内容 |
|
|
13
13
|
|---|---|---|---|
|
|
14
|
+
| 1.12.1 | 2026-12-06 | 见下 | 工具数读取兼容 DSH 0.2.3 的注册表 API(`visible()`/`names()`),修复高版本宿主上所有 MCP 行显示「无工具」 |
|
|
14
15
|
| 1.12.0 | 2026-12-04 | 见下 | MCP「重新注册工具」(`mcp.reregister`):声明行重挂、外层行 fiber 重启,工具数取自真实注册表 |
|
|
15
16
|
| 1.11.0 | 2026-11-14 | 见下 | 改名 `@lstions/dsh-skill-mcp-panel` 并补齐 npm 发布元数据(license/repository/engines.dsh/publishConfig) |
|
|
16
17
|
| 1.10.0 | 2026-11-14 | 见下 | MCP 行级操作常显(编辑/删除无需展开)、工具列表限高滚动、修复主面板无法滚动 |
|
|
@@ -53,6 +54,22 @@
|
|
|
53
54
|
|
|
54
55
|
`test/version-check.mjs` 会阻止这件事再次发生:同一个版本号在下方出现两次即测试失败。
|
|
55
56
|
|
|
57
|
+
## [1.12.1] - 2026-12-06
|
|
58
|
+
|
|
59
|
+
### 修复:DSH 0.2.3 宿主上 MCP 工具数恒为 0
|
|
60
|
+
|
|
61
|
+
- `dsh-tools` 0.2.3 移除了 `schemas()` / `definitions()`,改用作用域感知的
|
|
62
|
+
`visible()` / `names()` / `registered()` / `getAll()`,候选本身就是定义。
|
|
63
|
+
面板原来只读 `schemas()`,于是在 0.2.3 宿主上**每个已连接、工具已注册的 MCP
|
|
64
|
+
行都显示「无工具」**——「重新注册工具」返回 applied 但计数仍是 0。
|
|
65
|
+
- `toolsFor` 现在按宿主实际暴露的 API 枚举:0.2.2 及更早仍走 `schemas()`;
|
|
66
|
+
0.2.3 优先 `visible()`,退而 `names()` + `registered()`;描述优先取定义自身,
|
|
67
|
+
老宿主再回退到 `get(name)`。无法枚举时仍按 0 降级,不抛异常。
|
|
68
|
+
- 新增 `mcp-inventory` 门禁:分别用仅实现 `visible()` 和仅实现
|
|
69
|
+
`names()`/`registered()` 的假注册表断言工具计数与描述,防止回归。
|
|
70
|
+
|
|
71
|
+
---
|
|
72
|
+
|
|
56
73
|
## [1.12.0] - 2026-12-04
|
|
57
74
|
|
|
58
75
|
### 新增:MCP「重新注册工具」(`mcp.reregister`)
|
package/README.md
CHANGED
|
@@ -53,7 +53,7 @@ duplicate of itself.
|
|
|
53
53
|
From the npm registry (the normal flow):
|
|
54
54
|
|
|
55
55
|
```sh
|
|
56
|
-
dsh plugin --profile web add @lstions/dsh-skill-mcp-panel@1.12.
|
|
56
|
+
dsh plugin --profile web add @lstions/dsh-skill-mcp-panel@1.12.1
|
|
57
57
|
# then restart the profile
|
|
58
58
|
```
|
|
59
59
|
|
|
@@ -85,7 +85,7 @@ cat ~/.dsh/profiles/web/package.json
|
|
|
85
85
|
|
|
86
86
|
| Spec | Result |
|
|
87
87
|
|---|---|
|
|
88
|
-
| `@lstions/dsh-skill-mcp-panel@1.12.
|
|
88
|
+
| `@lstions/dsh-skill-mcp-panel@1.12.1` | from the registry — installs and auto-selects the bundle |
|
|
89
89
|
| `/abs/path` or `file:/abs/path` | local checkout, same behaviour |
|
|
90
90
|
| `https://github.com/<owner>/<repo>.git` | pnpm clones it; needs credentials/network |
|
|
91
91
|
| `git@github.com:<owner>/<repo>.git` | **broken in `dsh`** — see below |
|
|
@@ -721,7 +721,7 @@ Node.js ≥ 20.13 for `fs.watch(..., { recursive: true })`, plus
|
|
|
721
721
|
Releases are semver and every released version has a `vX.Y.Z` git tag pointing at
|
|
722
722
|
the exact commit; [CHANGELOG.md](CHANGELOG.md) records what changed.
|
|
723
723
|
|
|
724
|
-
**Referenceable versions start at `1.4.0`; the current version is `1.12.
|
|
724
|
+
**Referenceable versions start at `1.4.0`; the current version is `1.12.1`.**
|
|
725
725
|
Before `1.4.0`, this repository published some version numbers twice with
|
|
726
726
|
different content:
|
|
727
727
|
|
package/lib/mcp.js
CHANGED
|
@@ -761,6 +761,45 @@ export function createMcpManager(deps = {}) {
|
|
|
761
761
|
}
|
|
762
762
|
}
|
|
763
763
|
|
|
764
|
+
/**
|
|
765
|
+
* Enumerate the tools a host tool registry exposes, across the DSH APIs.
|
|
766
|
+
*
|
|
767
|
+
* `dsh-tools` 0.2.2 and older publish `schemas()`, the model-facing
|
|
768
|
+
* projection. 0.2.3 replaced it with the scope-aware `visible()` /
|
|
769
|
+
* `names()` / `registered()` family, whose candidates ARE the definitions.
|
|
770
|
+
* Reading only `schemas()` made every MCP row report zero tools on a 0.2.3
|
|
771
|
+
* host even though the servers were connected and the tools were registered.
|
|
772
|
+
*
|
|
773
|
+
* @param {object} registry - the live `tools` service
|
|
774
|
+
* @returns {Array<{name: string, description?: unknown}>}
|
|
775
|
+
*/
|
|
776
|
+
function registryTools(registry) {
|
|
777
|
+
const collected = []
|
|
778
|
+
if (typeof registry.schemas === 'function') {
|
|
779
|
+
for (const schema of registry.schemas() ?? []) {
|
|
780
|
+
if (typeof schema?.name === 'string') collected.push(schema)
|
|
781
|
+
}
|
|
782
|
+
return collected
|
|
783
|
+
}
|
|
784
|
+
if (typeof registry.visible === 'function') {
|
|
785
|
+
for (const [name, candidate] of registry.visible() ?? []) {
|
|
786
|
+
if (typeof name !== 'string') continue
|
|
787
|
+
const definition = candidate?.definition ?? candidate
|
|
788
|
+
collected.push({ name, description: definition?.description })
|
|
789
|
+
}
|
|
790
|
+
return collected
|
|
791
|
+
}
|
|
792
|
+
if (typeof registry.names === 'function' && typeof registry.registered === 'function') {
|
|
793
|
+
for (const name of registry.names()?.known ?? []) {
|
|
794
|
+
if (typeof name !== 'string') continue
|
|
795
|
+
const definition = registry.registered(name)
|
|
796
|
+
collected.push({ name, description: definition?.description })
|
|
797
|
+
}
|
|
798
|
+
return collected
|
|
799
|
+
}
|
|
800
|
+
return collected
|
|
801
|
+
}
|
|
802
|
+
|
|
764
803
|
/**
|
|
765
804
|
* Enumerate every live tool belonging to one MCP server.
|
|
766
805
|
*
|
|
@@ -768,10 +807,6 @@ export function createMcpManager(deps = {}) {
|
|
|
768
807
|
* configuration: a server that failed to connect, or whose generation swap
|
|
769
808
|
* was rolled back, must report zero tools even though its row exists.
|
|
770
809
|
*
|
|
771
|
-
* `ctx.tools.schemas()` is the public projection of visible definitions
|
|
772
|
-
* (`dsh-tools`), and `get(name)` the scope-aware lookup; both are used so a
|
|
773
|
-
* registry exposing only one of them still answers.
|
|
774
|
-
*
|
|
775
810
|
* @param {string} serverName
|
|
776
811
|
* @returns {{tools: object[], schemas: Map<string, object>}}
|
|
777
812
|
*/
|
|
@@ -782,22 +817,25 @@ export function createMcpManager(deps = {}) {
|
|
|
782
817
|
const registry = toolsRegistry()
|
|
783
818
|
if (registry === undefined) return { tools, schemas }
|
|
784
819
|
|
|
785
|
-
|
|
820
|
+
let collected = []
|
|
786
821
|
try {
|
|
787
|
-
|
|
788
|
-
for (const schema of registry.schemas() ?? []) {
|
|
789
|
-
if (typeof schema?.name === 'string') collected.push(schema)
|
|
790
|
-
}
|
|
791
|
-
}
|
|
822
|
+
collected = registryTools(registry)
|
|
792
823
|
} catch (error) {
|
|
793
|
-
log(`skill-mcp-panel: could not
|
|
824
|
+
log(`skill-mcp-panel: could not enumerate ctx.tools: ${String(error)}`)
|
|
794
825
|
}
|
|
795
|
-
// A registry may expose `get` without an enumerator; names are then read
|
|
796
|
-
// off the schema list only, which is the same public projection.
|
|
797
826
|
for (const schema of collected) {
|
|
798
827
|
if (!schema.name.startsWith(prefix)) continue
|
|
799
|
-
|
|
800
|
-
|
|
828
|
+
// Older hosts project schemas and resolve the definition through
|
|
829
|
+
// `get`; newer hosts hand the definition over directly.
|
|
830
|
+
let description = text(schema.description)
|
|
831
|
+
if (description === '' && typeof registry.get === 'function') {
|
|
832
|
+
try {
|
|
833
|
+
description = text(registry.get(schema.name)?.description)
|
|
834
|
+
} catch {
|
|
835
|
+
// A root registry can be absent while a step is being assembled;
|
|
836
|
+
// the name is still registered, so keep the entry without text.
|
|
837
|
+
}
|
|
838
|
+
}
|
|
801
839
|
tools.push({ name: schema.name, description })
|
|
802
840
|
schemas.set(schema.name, { name: schema.name, description })
|
|
803
841
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lstions/dsh-skill-mcp-panel",
|
|
3
|
-
"version": "1.12.
|
|
3
|
+
"version": "1.12.1",
|
|
4
4
|
"description": "Recursive, multi-root skill discovery with per-skill switches, duplicate-name reporting and MCP server management for the DeepSeek Harness",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "lib/index.js",
|