@tinyforge/dsh-plugin-manager-wj 1.3.2 → 1.3.4
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 +8 -5
- package/README.zh.md +8 -5
- package/client.js +55 -10
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
| Plugins | `pluginManager.listPlugins`, `pluginManager.getHealthSnapshot` | Enable/disable, findings, and bounded repair previews. |
|
|
21
21
|
| Configuration | `configForms.describe`, `pluginManager.getConfigProvenance` | Secret fields are omitted; provenance shows layers and redacted identities. |
|
|
22
22
|
| Skills | `skills/list` through the active session | Session-scoped, so the catalog resolves from the session working directory and reloads automatically when the active session changes. Model-invocable and user-only entries are marked separately. |
|
|
23
|
-
| MCP | `pluginInventory.list` | MCP client connections plus the owners of registered tools. |
|
|
23
|
+
| MCP | `pluginInventory.list`, `mcpClientStatus.list` (optional) | MCP client connections plus the owners of registered tools. Servers managed by a companion package live outside the Host's own registry and are merged in by name, with transport, source and tool count. |
|
|
24
24
|
|
|
25
25
|
Enabling or disabling a plugin writes through the Host's existing profile manager. A change can apply immediately, require a restart, be overridden by a higher-priority layer, or be refused by the Host. Repair previews are short-lived and become invalid when their finding changes. Selecting a low-risk repair with one eligible target executes it automatically; a high-risk repair first shows the exact effect and requires an explicit confirmation click. The current repair action disables the selected plugin involved in a duplicate global tool or MCP registration.
|
|
26
26
|
|
|
@@ -30,7 +30,7 @@ Configuration fields are discovered from each Host-provided schema. Secret field
|
|
|
30
30
|
|
|
31
31
|
Use a Harness Host that exposes the plugin-management Remote, settings forms, and runtime inventory. Older Hosts may show inventory only or report diagnostics as unavailable; upgrade Harness to use management actions. Only plugins addressable through the active profile can be toggled.
|
|
32
32
|
|
|
33
|
-
The tab hard-injects only two core client services, `slots` and `locale`. Everything else — the `pluginInventory` and `pluginManager` remotes, `configForms`, the skills Remote and the live session — is resolved through `ctx.get` at call time rather than declared in `inject`, because a Client plugin that lists an optional service in `inject` stays pending on a Host without it, and a pending plugin registers no tab at all: the settings page then shows no plugin views instead of a degraded one. The Skills view therefore degrades rather than disappearing: no Remote means an explanatory message, and no session means a waiting state that loads the catalog by itself as soon as a session appears or the active session changes, with no manual refresh. The namespace is discovered rather than hardcoded (`skills`, `skill`, `skillCatalog`, then any registered `remote.*` name containing "skill"), so a Host that renames it needs no code change. Skills are read-only here
|
|
33
|
+
The tab hard-injects only two core client services, `slots` and `locale`. Everything else — the `pluginInventory` and `pluginManager` remotes, `configForms`, the skills Remote and the live session — is resolved through `ctx.get` at call time rather than declared in `inject`, because a Client plugin that lists an optional service in `inject` stays pending on a Host without it, and a pending plugin registers no tab at all: the settings page then shows no plugin views instead of a degraded one. The Skills view therefore degrades rather than disappearing: no Remote means an explanatory message, and no session means a waiting state that loads the catalog by itself as soon as a session appears or the active session changes, with no manual refresh. The namespace is discovered rather than hardcoded (`skills`, `skill`, `skillCatalog`, then any registered `remote.*` name containing "skill"), so a Host that renames it needs no code change. Skills are read-only here: the Host exposes only `skills/list` (policy `reader-session-read`) and no skills configuration namespace, so there is no Remote to enable or disable an entry and the view shows what the active session can see instead of offering a switch that cannot work. The UI never loads skill bodies. The UI does not install/remove packages, edit credentials, or run arbitrary repair commands.
|
|
34
34
|
|
|
35
35
|
## Install
|
|
36
36
|
|
|
@@ -49,20 +49,23 @@ npm install @tinyforge/dsh-plugin-manager-wj
|
|
|
49
49
|
## Release
|
|
50
50
|
|
|
51
51
|
```sh
|
|
52
|
-
npm test # node --test:
|
|
52
|
+
npm test # node --test: 14 checks (views, MCP merge, inject contract, module id, patch shape)
|
|
53
53
|
npm publish --access public # writes to registry.npmjs.org
|
|
54
54
|
```
|
|
55
55
|
|
|
56
|
-
The package name is scoped, so publishing a new version needs maintainer access to the `@tinyforge` npm scope. Tag the published commit (`git tag v1.3.
|
|
56
|
+
The package name is scoped, so publishing a new version needs maintainer access to the `@tinyforge` npm scope. Tag the published commit (`git tag v1.3.4 && git push --tags`) so the GitHub history matches the registry.
|
|
57
57
|
|
|
58
58
|
## Development
|
|
59
59
|
|
|
60
60
|
The package is an ES module. `index.js` is the Host entry point and `client.js` contains the browser UI. Localized package metadata is in `locale/`; the UI's full dictionaries are registered in `client.js`.
|
|
61
61
|
|
|
62
|
-
|
|
62
|
+
`client.js` registers with `__ModuleLoader__.load({ id: '@tinyforge/dsh-plugin-manager-wj', … })`. That id must be the bare package name, scope included: the client module loader keys each Loader row by package name, and a bundle that registers any other id is reported as loaded without registering its row, which leaves the plugin without a fiber and the settings tab missing entirely. Renaming the package means updating that id in the same commit.
|
|
63
|
+
|
|
64
|
+
- `node --test` runs the bundle behavior checks in `tests/client.test.js`: the four views render and switch, the visited views stay mounted, search and enable/disable act on the active view, a secret configuration object stays out of the editor, opening a session loads the skill catalog without a refresh, a renamed skills namespace is discovered, a transient catalog failure recovers from the inline retry, the tab still registers on a Host that mounts no optional services, and MCP rows merge the optional client-status Remote by server name.
|
|
63
65
|
- `node --check client.js` checks the browser bundle syntax.
|
|
64
66
|
- `tests/patch.test.js` parses `cordis.patch.yml` and asserts no plain scalar starts with a reserved YAML indicator — the scoped package name must stay quoted, or the Host rejects the bundle patch.
|
|
65
67
|
- `tests/inject.test.js` pins the plugin's `inject` list to the core services only, so a regressed hard-injection of an optional remote fails the suite instead of silently emptying the settings page on some Hosts.
|
|
68
|
+
- `tests/module-id.test.js` asserts the registered module id equals `package.json`'s `name`, so a rename cannot silently detach the browser bundle from its Loader row.
|
|
66
69
|
- `tests/harness.html` mounts the real `client.js` against fixtures in a browser and asserts the same behavior without Node; open it directly from disk and read the JSON report.
|
|
67
70
|
- `tests/parse-check.html` is a minimal browser smoke page: it confirms `client.js` parses and registers `settings.plugins.tab`.
|
|
68
71
|
|
package/README.zh.md
CHANGED
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
| 插件 | `pluginManager.listPlugins`、`pluginManager.getHealthSnapshot` | 启停、健康诊断与受控修复预览。 |
|
|
21
21
|
| 配置 | `configForms.describe`、`pluginManager.getConfigProvenance` | 隐藏密钥字段;来源只显示层名称与脱敏标识。 |
|
|
22
22
|
| Skill | 通过当前会话读取 `skills/list` | 按会话解析,目录来自会话工作目录,并在活动会话变化时自动重新加载;模型可调用与仅用户可调用分开标记。 |
|
|
23
|
-
| MCP | `pluginInventory.list
|
|
23
|
+
| MCP | `pluginInventory.list`、`mcpClientStatus.list`(可选) | MCP 客户端连接状态,以及工具注册的归属插件。由配套包管理的服务不在 Host 自身注册表中,会按服务名合并进来,并带上传输方式、连接来源和工具数。 |
|
|
24
24
|
|
|
25
25
|
启停操作通过 Host 现有 Profile 管理器写入。更改可能即时生效、需要重启、被更高优先级配置覆盖,或被 Host 拒绝。修复预览有时效,并会在诊断项变化后失效。用户选择修复后,只有恰好存在一个可操作目标的低风险修复会自动执行;高风险修复先显示具体影响,再要求用户明确确认。当前修复动作是停用参与全局工具名或 MCP 名称冲突的所选插件。
|
|
26
26
|
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
|
|
31
31
|
需要提供插件管理 Remote、设置表单和运行时清单的 Harness Host。较旧 Host 可能只能查看清单,或显示诊断不可用;升级 Harness 后才能执行管理操作。只有当前 Profile 可寻址的插件可以启停。
|
|
32
32
|
|
|
33
|
-
标签页只硬注入两个核心客户端服务:`slots` 与 `locale`。其余服务 —— `pluginInventory`、`pluginManager` 两个 remote、`configForms`、skills Remote 与存活会话 —— 都在调用时通过 `ctx.get` 解析,而不写进 `inject`:把可选服务写进 `inject` 会让客户端插件在缺少该服务的 Host 上一直处于 pending 状态,而 pending 的插件不注册任何标签页,设置页面会变成完全没有插件视图,而不是降级显示。因此 Skill 视图只会降级而不会消失:没有 Remote 时给出说明;没有会话时进入等待状态,一旦出现会话或活动会话切换,就自动加载目录,无需手动刷新。命名空间是探测出来的而不是写死的(依次尝试 `skills`、`skill`、`skillCatalog`,再扫描任何含 “skill” 的已注册 `remote.*`),所以 Host 改名也不需要改代码。Skill
|
|
33
|
+
标签页只硬注入两个核心客户端服务:`slots` 与 `locale`。其余服务 —— `pluginInventory`、`pluginManager` 两个 remote、`configForms`、skills Remote 与存活会话 —— 都在调用时通过 `ctx.get` 解析,而不写进 `inject`:把可选服务写进 `inject` 会让客户端插件在缺少该服务的 Host 上一直处于 pending 状态,而 pending 的插件不注册任何标签页,设置页面会变成完全没有插件视图,而不是降级显示。因此 Skill 视图只会降级而不会消失:没有 Remote 时给出说明;没有会话时进入等待状态,一旦出现会话或活动会话切换,就自动加载目录,无需手动刷新。命名空间是探测出来的而不是写死的(依次尝试 `skills`、`skill`、`skillCatalog`,再扫描任何含 “skill” 的已注册 `remote.*`),所以 Host 改名也不需要改代码。Skill 在这里是只读的:Host 只提供 `skills/list`(策略 `reader-session-read`),也没有 skills 配置命名空间,因此没有可用于启用或停用条目的 Remote,界面展示当前会话可见的内容,而不提供一个实际无效的开关。界面不会加载 skill 正文。此界面不安装或卸载包、不编辑凭据,也不运行任意修复命令。
|
|
34
34
|
|
|
35
35
|
## 安装
|
|
36
36
|
|
|
@@ -49,20 +49,23 @@ npm install @tinyforge/dsh-plugin-manager-wj
|
|
|
49
49
|
## 发布
|
|
50
50
|
|
|
51
51
|
```sh
|
|
52
|
-
npm test # node --test:
|
|
52
|
+
npm test # node --test:14 项检查(视图、MCP 合并、inject 契约、模块 id、patch 结构)
|
|
53
53
|
npm publish --access public # 发布到 registry.npmjs.org
|
|
54
54
|
```
|
|
55
55
|
|
|
56
|
-
包名带 scope,发布新版本需要 `@tinyforge` npm scope 的维护者权限。发布后给对应提交打 tag(`git tag v1.3.
|
|
56
|
+
包名带 scope,发布新版本需要 `@tinyforge` npm scope 的维护者权限。发布后给对应提交打 tag(`git tag v1.3.4 && git push --tags`),让 GitHub 历史与 registry 版本对应。
|
|
57
57
|
|
|
58
58
|
## 开发
|
|
59
59
|
|
|
60
60
|
本包使用 ES module。`index.js` 是 Host 入口,`client.js` 是浏览器界面。本地化包元数据位于 `locale/`,界面完整词典在 `client.js` 中注册。
|
|
61
61
|
|
|
62
|
-
|
|
62
|
+
`client.js` 以 `__ModuleLoader__.load({ id: '@tinyforge/dsh-plugin-manager-wj', … })` 注册。这个 id 必须是完整包名(含 scope):客户端模块加载器按包名给每个 Loader 行建索引,注册成别的 id 会被判定为"加载了却没有注册自身所在的行",插件因此拿不到 fiber,设置里的标签页完全不出现。改包名时必须在同一次提交里一起改这个 id。
|
|
63
|
+
|
|
64
|
+
- `node --test` 运行 `tests/client.test.js` 的行为检查:四个视图渲染并可切换、访问过的视图保持挂载、搜索与启停作用于当前视图、密钥配置对象不会进入编辑器、打开会话后无需刷新即加载 Skill 目录、改名后的 skills 命名空间能被发现、瞬时目录失败可就地重试恢复、Host 不挂载任何可选服务时标签页仍然注册,以及 MCP 行会按服务名合并可选的客户端状态 Remote。
|
|
63
65
|
- `node --check client.js` 检查浏览器 bundle 语法。
|
|
64
66
|
- `tests/patch.test.js` 解析 `cordis.patch.yml`,确保没有裸标量以 YAML 保留字符开头 —— 带 scope 的包名必须保持加引号,否则 Host 会拒绝该 bundle patch。
|
|
65
67
|
- `tests/inject.test.js` 把插件的 `inject` 固定为仅核心服务,这样一旦有人重新硬注入可选 remote,测试就会失败,而不是在某些 Host 上悄悄把设置页清空。
|
|
68
|
+
- `tests/module-id.test.js` 断言注册的模块 id 等于 `package.json` 的 `name`,避免改名后浏览器 bundle 悄悄脱离自己的 Loader 行。
|
|
66
69
|
- `tests/harness.html` 在浏览器中用测试夹具挂载真实 `client.js`,不依赖 Node 也能断言同一批行为;直接从磁盘打开并读取 JSON 报告。
|
|
67
70
|
- `tests/parse-check.html` 是最小的浏览器冒烟页:确认 `client.js` 能解析并注册 `settings.plugins.tab`。
|
|
68
71
|
|
package/client.js
CHANGED
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
// SPDX-License-Identifier: MIT
|
|
2
2
|
window.__ModuleLoader__.load({
|
|
3
|
-
id:
|
|
3
|
+
// The module id must be the bare package name: dsh-client-modules attaches a package's
|
|
4
|
+
// browser half to its Loader row by that name and rejects a bundle that registers any other
|
|
5
|
+
// id ("loaded without registering ... via __ModuleLoader__.load"), which leaves the plugin
|
|
6
|
+
// with no fiber and therefore no slot registration.
|
|
7
|
+
id: '@tinyforge/dsh-plugin-manager-wj',
|
|
4
8
|
factory(require) {
|
|
5
9
|
const React = require('react')
|
|
6
10
|
const h = React.createElement
|
|
@@ -309,6 +313,7 @@ window.__ModuleLoader__.load({
|
|
|
309
313
|
t(skill.modelInvocable ? 'skillModelInvocable' : 'skillUserOnly'))))
|
|
310
314
|
return h('div', { style: styles.page },
|
|
311
315
|
h('p', { style: styles.description }, t('skillIntro')),
|
|
316
|
+
h('p', { style: styles.message }, t('skillReadOnly')),
|
|
312
317
|
h(Section, { id: 'skills', title: t('skillsTitle'), count: `${rows.length} ${t('items')}`, empty },
|
|
313
318
|
rows.length ? h('ul', { style: styles.list }, rows.map(skillRow)) : null))
|
|
314
319
|
}
|
|
@@ -322,7 +327,12 @@ window.__ModuleLoader__.load({
|
|
|
322
327
|
h('div', { style: styles.rowHead },
|
|
323
328
|
h('h3', { style: styles.rowTitle }, row.serverName),
|
|
324
329
|
h('span', { style: { ...styles.badge, ...(row.state === 'connected' ? {} : styles.warning) } }, t(row.state))),
|
|
325
|
-
h('div', { style: styles.meta },
|
|
330
|
+
h('div', { style: styles.meta }, [
|
|
331
|
+
row.transport ? `${t('transport')}: ${row.transport}` : null,
|
|
332
|
+
row.source ? `${t('mcpSource')}: ${row.source}` : null,
|
|
333
|
+
row.toolCount === undefined ? null : `${t('toolCount')}: ${row.toolCount}`,
|
|
334
|
+
`${t('owner')}: ${owner(row)}`,
|
|
335
|
+
].filter(Boolean).join(' · ')),
|
|
326
336
|
row.toolNames?.length ? h('div', { style: styles.meta }, `${t('toolNames')}: ${row.toolNames.join(', ')}`) : null))) : null),
|
|
327
337
|
h(Section, { id: 'tools', title: t('tools'), count: `${toolRows.length} ${t('items')}`, empty: t(needle ? 'noMatches' : 'noRows') },
|
|
328
338
|
toolRows.length ? h('ul', { style: styles.list }, toolRows.map(row => h('li', { key: `${row.name}:${row.owner?.entryId ?? ''}`, style: styles.row },
|
|
@@ -331,7 +341,7 @@ window.__ModuleLoader__.load({
|
|
|
331
341
|
inventory ? null : h('p', { style: styles.message }, t('inventoryUnavailable')))
|
|
332
342
|
}
|
|
333
343
|
|
|
334
|
-
function ManagerPage({ list, manager, forms, loadSkills, readSessionId, watchSessions, t }) {
|
|
344
|
+
function ManagerPage({ list, manager, forms, loadSkills, listMcpStatus, readSessionId, watchSessions, t }) {
|
|
335
345
|
const initialTab = readStoredTab()
|
|
336
346
|
const [tab, setTab] = React.useState(initialTab)
|
|
337
347
|
const [visited, setVisited] = React.useState([initialTab])
|
|
@@ -378,17 +388,19 @@ window.__ModuleLoader__.load({
|
|
|
378
388
|
React.useEffect(() => {
|
|
379
389
|
let live = true
|
|
380
390
|
Promise.resolve().then(async () => {
|
|
381
|
-
const [inventoryResult, pluginResult, healthResult, settingsResult] = await Promise.allSettled([
|
|
391
|
+
const [inventoryResult, pluginResult, healthResult, settingsResult, statusResult] = await Promise.allSettled([
|
|
382
392
|
list(),
|
|
383
393
|
manager?.listPlugins ? manager.listPlugins() : Promise.reject(new Error('unavailable')),
|
|
384
394
|
manager?.getHealthSnapshot ? manager.getHealthSnapshot() : Promise.reject(new Error('unavailable')),
|
|
385
395
|
forms?.describe ? forms.describe().ensure().then(() => forms.describe().getSnapshot()) : Promise.reject(new Error('unavailable')),
|
|
396
|
+
listMcpStatus ? listMcpStatus() : Promise.resolve(undefined),
|
|
386
397
|
])
|
|
387
398
|
if (inventoryResult.status !== 'fulfilled') throw inventoryResult.reason
|
|
388
399
|
const inventory = inventoryResult.value
|
|
389
400
|
const plugins = pluginResult.status === 'fulfilled' ? unwrap(pluginResult.value, 'pluginManager.listPlugins') : []
|
|
390
401
|
const health = healthResult.status === 'fulfilled' ? unwrap(healthResult.value, 'pluginManager.getHealthSnapshot') : undefined
|
|
391
402
|
const settings = settingsResult.status === 'fulfilled' ? settingsResult.value.view : undefined
|
|
403
|
+
const mcpStatus = statusResult.status === 'fulfilled' ? statusResult.value : undefined
|
|
392
404
|
const provenance = new Map()
|
|
393
405
|
if (settings && manager?.getConfigProvenance) {
|
|
394
406
|
await Promise.all(settings.namespaces.map(async view => {
|
|
@@ -403,12 +415,12 @@ window.__ModuleLoader__.load({
|
|
|
403
415
|
}
|
|
404
416
|
}))
|
|
405
417
|
}
|
|
406
|
-
if (live) setState({ kind: 'ready', snapshot: { inventory, plugins, health, settings, provenance } })
|
|
418
|
+
if (live) setState({ kind: 'ready', snapshot: { inventory, plugins, health, settings, provenance, mcpStatus } })
|
|
407
419
|
}).catch(() => {
|
|
408
420
|
if (live) setState(previous => ({ kind: 'error', snapshot: previous.snapshot }))
|
|
409
421
|
})
|
|
410
422
|
return () => { live = false }
|
|
411
|
-
}, [list, manager, forms, revision])
|
|
423
|
+
}, [list, manager, forms, listMcpStatus, revision])
|
|
412
424
|
|
|
413
425
|
const refresh = () => {
|
|
414
426
|
setState(current => ({ kind: 'loading', snapshot: current.snapshot }))
|
|
@@ -485,13 +497,34 @@ window.__ModuleLoader__.load({
|
|
|
485
497
|
const pluginRows = plugins.filter(row => matches([row.moduleName, row.entryId, row.meta?.title, row.meta?.description]))
|
|
486
498
|
const findings = (health?.findings ?? []).filter(row => matches([row.id, row.code, row.evidence?.name, row.evidence?.serverName, row.evidence?.packageName]))
|
|
487
499
|
const toolRows = (inventory?.toolRegistrations ?? []).filter(row => matches([row.name, row.owner?.moduleName, row.owner?.entryId]))
|
|
488
|
-
|
|
500
|
+
// The Host's own registry only reports the MCP servers it composes itself. Servers managed by
|
|
501
|
+
// a companion package answer through `mcpClientStatus/list` instead, so both sources are merged
|
|
502
|
+
// by server name: transport, source and tool counts survive even when the Host registry is empty.
|
|
503
|
+
const mergedClients = new Map()
|
|
504
|
+
for (const row of current?.mcpStatus ?? []) {
|
|
505
|
+
mergedClients.set(row.serverName, {
|
|
506
|
+
serverName: row.serverName, state: row.state, transport: row.transport, source: row.source,
|
|
507
|
+
toolCount: row.toolCount, toolNames: (row.tools ?? []).map(tool => tool.name),
|
|
508
|
+
})
|
|
509
|
+
}
|
|
510
|
+
for (const row of inventory?.mcpClients ?? []) {
|
|
511
|
+
const previous = mergedClients.get(row.serverName) ?? {}
|
|
512
|
+
mergedClients.set(row.serverName, {
|
|
513
|
+
...previous, ...row,
|
|
514
|
+
transport: row.transport ?? previous.transport,
|
|
515
|
+
source: row.source ?? previous.source,
|
|
516
|
+
toolCount: row.toolCount ?? previous.toolCount ?? row.toolNames?.length,
|
|
517
|
+
toolNames: row.toolNames ?? previous.toolNames,
|
|
518
|
+
})
|
|
519
|
+
}
|
|
520
|
+
const mcpRows = [...mergedClients.values()]
|
|
521
|
+
.filter(row => matches([row.serverName, row.state, row.transport, row.source, row.owner?.moduleName, ...(row.toolNames ?? [])]))
|
|
489
522
|
|
|
490
523
|
const tabs = [
|
|
491
524
|
{ id: 'plugins', label: t('tabs.plugins'), count: plugins.length },
|
|
492
525
|
{ id: 'config', label: t('tabs.config'), count: settings?.namespaces?.length },
|
|
493
526
|
{ id: 'skill', label: t('tabs.skill'), count: skills?.kind === 'ready' ? skills.items.length : undefined },
|
|
494
|
-
{ id: 'mcp', label: t('tabs.mcp'), count:
|
|
527
|
+
{ id: 'mcp', label: t('tabs.mcp'), count: mcpRows.length },
|
|
495
528
|
]
|
|
496
529
|
|
|
497
530
|
const panel = (id, children) => visited.includes(id) ? h('div', {
|
|
@@ -508,7 +541,7 @@ window.__ModuleLoader__.load({
|
|
|
508
541
|
[health?.enabledCount ?? plugins.filter(row => row.enabled).length, 'enabled'],
|
|
509
542
|
[health ? health.findings.length : '—', 'findings'],
|
|
510
543
|
[skills?.kind === 'ready' ? skills.items.length : '—', 'skills'],
|
|
511
|
-
[inventory
|
|
544
|
+
[inventory ? mcpRows.length : '—', 'mcpStat'],
|
|
512
545
|
]
|
|
513
546
|
const showStats = state.kind === 'ready' && current !== undefined
|
|
514
547
|
|
|
@@ -570,6 +603,8 @@ window.__ModuleLoader__.load({
|
|
|
570
603
|
previewRepair: '诊断并修复 {name}', repairPreview: '修复预览', target: '目标', effect: '影响', disablePlugin: '关闭插件', risk: '风险', low: '低', high: '高', reversible: '可撤销', notReversible: '不可撤销', applyRepair: '执行修复', confirmRepair: '确认并执行', cancel: '取消', previewOrRepairFailed: '无法预览或执行此修复。', stalePreview: '修复预览已过期或状态已变化,请重新加载后再试。',
|
|
571
604
|
changeApplied: '设置已保存并应用。', restartRequired: '设置已保存;重启后生效。', changeOverridden: '设置已保存,但被更高优先级配置覆盖。', changeFailed: 'Host 未能应用此更改。',
|
|
572
605
|
enable: '启用', disable: '停用', disabled: '已停用', enabledTag: '已启用', disabledTag: '已停用', active: '运行中', failed: '失败', loadingPhase: '加载中', pending: '等待中', unloading: '卸载中', notRunning: '未运行',
|
|
606
|
+
connecting: '连接中', disconnected: '已断开', transport: '传输方式', mcpSource: '连接来源', toolCount: '工具数',
|
|
607
|
+
skillReadOnly: 'Skill 的启用与停用由 profile 的 skills 目录与指令文件决定;本 Host 未提供开关接口,因此这里只读展示当前会话可见的条目。',
|
|
573
608
|
'management-required': '管理服务受保护', unaddressable: '此条目无法通过当前 Profile 修改', activationFailed: '插件未能完成启动。', owner: '所属插件', tools: '工具注册', mcp: 'MCP 客户端', toolNames: '工具名称', global: '全局', scoped: '作用域', starting: '启动中', connected: '已连接', reconnecting: '正在重连', stopped: '已停止',
|
|
574
609
|
}
|
|
575
610
|
const en = {
|
|
@@ -594,6 +629,8 @@ window.__ModuleLoader__.load({
|
|
|
594
629
|
previewRepair: 'Diagnose and repair {name}', repairPreview: 'Repair preview', target: 'Target', effect: 'Effect', disablePlugin: 'Disable plugin', risk: 'Risk', low: 'Low', high: 'High', reversible: 'Reversible', notReversible: 'Not reversible', applyRepair: 'Apply repair', confirmRepair: 'Confirm and apply', cancel: 'Cancel', previewOrRepairFailed: 'Could not preview or apply this repair.', stalePreview: 'The preview expired or state changed. Reload and preview the repair again.',
|
|
595
630
|
changeApplied: 'The change was saved and applied.', restartRequired: 'The change was saved and will apply after restart.', changeOverridden: 'The change was saved but overridden by a higher-priority configuration.', changeFailed: 'The Host could not apply this change.',
|
|
596
631
|
enable: 'Enable', disable: 'Disable', disabled: 'Disabled', enabledTag: 'Enabled', disabledTag: 'Disabled', active: 'Active', failed: 'Failed', loadingPhase: 'Loading', pending: 'Pending', unloading: 'Unloading', notRunning: 'Not running',
|
|
632
|
+
connecting: 'Connecting', disconnected: 'Disconnected', transport: 'Transport', mcpSource: 'Source', toolCount: 'Tools',
|
|
633
|
+
skillReadOnly: 'Skills are enabled by the profile’s skills directories and instruction files; this Host exposes no toggle, so the catalog is read-only.',
|
|
597
634
|
'management-required': 'Management service is protected', unaddressable: 'This entry cannot be changed by the current profile', activationFailed: 'The plugin did not finish starting.', owner: 'Owner', tools: 'Tool registrations', mcp: 'MCP clients', toolNames: 'Tool names', global: 'Global', scoped: 'Scoped', starting: 'Starting', connected: 'Connected', reconnecting: 'Reconnecting', stopped: 'Stopped',
|
|
598
635
|
}
|
|
599
636
|
ctx.effect(() => ctx.locale.register(NS, { zh, en }), 'plugin-manager-wj: dictionaries')
|
|
@@ -659,10 +696,18 @@ window.__ModuleLoader__.load({
|
|
|
659
696
|
}
|
|
660
697
|
}
|
|
661
698
|
|
|
699
|
+
// Servers managed by a companion package live outside the Host's own MCP registry and answer
|
|
700
|
+
// through `mcpClientStatus/list`. It is optional, so a Host without it simply shows fewer rows.
|
|
701
|
+
const listMcpStatus = async () => {
|
|
702
|
+
const api = namespace('mcpClientStatus')
|
|
703
|
+
if (!api || typeof api.list !== 'function') return undefined
|
|
704
|
+
try { return unwrap(await api.list(), 'mcpClientStatus/list') } catch (_error) { return undefined }
|
|
705
|
+
}
|
|
706
|
+
|
|
662
707
|
ctx.slots.inject('settings.plugins.tab', () => ctx.slots.register({
|
|
663
708
|
name: 'settings.plugins.tab', id: 'wj-registration-inventory', order: 20,
|
|
664
709
|
label: () => t('tab'), locale: NS,
|
|
665
|
-
inject: () => ({ list, manager: namespace('pluginManager'), forms, loadSkills, readSessionId: activeSessionId, watchSessions }),
|
|
710
|
+
inject: () => ({ list, manager: namespace('pluginManager'), forms, loadSkills, listMcpStatus, readSessionId: activeSessionId, watchSessions }),
|
|
666
711
|
}, ManagerPage))
|
|
667
712
|
},
|
|
668
713
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tinyforge/dsh-plugin-manager-wj",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.4",
|
|
4
4
|
"description": "Switchable plugin, configuration, skill and MCP views with health diagnostics, configuration provenance, and tool/MCP inventory for DeepSeek Harness.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "index.js",
|