@tinyforge/dsh-plugin-manager-wj 1.3.3 → 1.4.0

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 CHANGED
@@ -4,13 +4,13 @@
4
4
  [![npm downloads](https://img.shields.io/npm/dm/@tinyforge/dsh-plugin-manager-wj.svg)](https://www.npmjs.com/package/@tinyforge/dsh-plugin-manager-wj)
5
5
  [![License: MIT](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE)
6
6
 
7
- **WJ Plugin Management** is the Web management layer for DeepSeek Harness's three-layer plugin-management design. It extends the independent WJ bundle and adds a management tab under **Settings → Plugins** whose four views switch without leaving the page: **Plugins**, **Configuration**, **Skills** and **MCP**.
7
+ **WJ Plugin Management** is the Web management layer for DeepSeek Harness's three-layer plugin-management design. It extends the independent WJ bundle and adds a management tab under **Settings → Plugins** whose four views switch without leaving the page: **Plugins**, **Configuration**, **Skills** and **Tools**.
8
8
 
9
9
  ## Features
10
10
 
11
- - **Switchable views:** one tab strip switches between plugin health, configuration, the skill catalog, and MCP/tool inventory. A visited view stays mounted, so a configuration draft and the search term survive switching.
11
+ - **Switchable views:** one tab strip switches between plugin health, configuration, the skill catalog, and tool registration ownership. A visited view stays mounted, so a configuration draft and the search term survive switching.
12
12
  - **Harness Core:** consumes the Host's plugin registry, configuration resolver, conflict detector, lifecycle/dependency manager, and settings services.
13
- - **Management API:** shows plugin state and health findings, configuration provenance, and tool/MCP runtime registrations. It can enable or disable profile-addressable plugins.
13
+ - **Management API:** shows plugin state and health findings, configuration provenance, and tool runtime registrations. It can enable or disable profile-addressable plugins.
14
14
  - **Management UI:** filters the active view, edits non-secret scalar settings through the existing schema-backed `configForms`, and previews supported duplicate-registration repairs.
15
15
 
16
16
  ### Views
@@ -20,17 +20,19 @@
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
+ | Tools | `pluginInventory.list` | Runtime tool registrations, with the plugin that provides each tool and the scope it applies to. |
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
 
27
+ MCP servers themselves belong to the Host's MCP settings bundle (for example `@tinyforge/dsh-mcp-settings`), which registers the `settings.section` page `mcp` and reads `mcpClientStatus/list`. This bundle keeps only the plugin-side diagnostic — which plugin registered which tool — so it neither reads `mcpClientStatus` nor lists MCP servers a second time, and the settings UI has exactly one MCP management entry point. MCP health findings (`mcp.connection-failed`, `mcp.duplicate-name`) still appear in the Plugins view.
28
+
27
29
  Configuration fields are discovered from each Host-provided schema. Secret fields are omitted from the editor, and provenance shows layer names and redacted identities, never values or filesystem paths. The Host remains responsible for schema validation and persistence.
28
30
 
29
31
  ## Requirements and limitations
30
32
 
31
33
  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
34
 
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 UI never loads skill bodies. The UI does not install/remove packages, edit credentials, or run arbitrary repair commands.
35
+ 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
36
 
35
37
  ## Install
36
38
 
@@ -49,11 +51,11 @@ npm install @tinyforge/dsh-plugin-manager-wj
49
51
  ## Release
50
52
 
51
53
  ```sh
52
- npm test # node --test: 13 checks (views, inject contract, module id, patch shape)
54
+ npm test # node --test: 14 checks (views, tool ownership, inject contract, module id, patch shape)
53
55
  npm publish --access public # writes to registry.npmjs.org
54
56
  ```
55
57
 
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.3 && git push --tags`) so the GitHub history matches the registry.
58
+ 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.4.0 && git push --tags`) so the GitHub history matches the registry.
57
59
 
58
60
  ## Development
59
61
 
@@ -61,7 +63,7 @@ The package is an ES module. `index.js` is the Host entry point and `client.js`
61
63
 
62
64
  `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
65
 
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, and the tab still registers on a Host that mounts no optional services.
66
+ - `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 the tool view shows ownership only without reading or re-listing MCP servers.
65
67
  - `node --check client.js` checks the browser bundle syntax.
66
68
  - `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.
67
69
  - `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.
package/README.zh.md CHANGED
@@ -4,13 +4,13 @@
4
4
  [![npm downloads](https://img.shields.io/npm/dm/@tinyforge/dsh-plugin-manager-wj.svg)](https://www.npmjs.com/package/@tinyforge/dsh-plugin-manager-wj)
5
5
  [![License: MIT](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE)
6
6
 
7
- **WJ 插件管理中心**是 DeepSeek Harness 三层插件管理架构的 Web 管理层,扩展现有独立 WJ bundle,并在 **设置 → 插件** 下添加管理标签页。页面内有 **插件 / 配置 / Skill / MCP** 四个视图,可直接切换,不需要离开当前页面。
7
+ **WJ 插件管理中心**是 DeepSeek Harness 三层插件管理架构的 Web 管理层,扩展现有独立 WJ bundle,并在 **设置 → 插件** 下添加管理标签页。页面内有 **插件 / 配置 / Skill / 工具** 四个视图,可直接切换,不需要离开当前页面。
8
8
 
9
9
  ## 功能
10
10
 
11
- - **可切换视图:**一条标签栏在插件健康、配置、Skill 目录与 MCP/工具清单之间切换。已访问过的视图保持挂载,因此切换时配置草稿和搜索词都不会丢失。
11
+ - **可切换视图:**一条标签栏在插件健康、配置、Skill 目录与工具注册归属之间切换。已访问过的视图保持挂载,因此切换时配置草稿和搜索词都不会丢失。
12
12
  - **Harness Core:**使用 Host 提供的插件注册表、配置解析、冲突检测、生命周期与依赖管理,以及设置服务。
13
- - **Management API:**查看插件状态、健康诊断、配置来源和工具/MCP 运行时注册;可启停当前 Profile 能寻址的插件。
13
+ - **Management API:**查看插件状态、健康诊断、配置来源和工具运行时注册;可启停当前 Profile 能寻址的插件。
14
14
  - **Management UI:**按视图过滤,通过现有 schema 表单 `configForms` 编辑非密钥标量配置,并预览受支持的重复注册修复。
15
15
 
16
16
  ### 视图
@@ -20,17 +20,19 @@
20
20
  | 插件 | `pluginManager.listPlugins`、`pluginManager.getHealthSnapshot` | 启停、健康诊断与受控修复预览。 |
21
21
  | 配置 | `configForms.describe`、`pluginManager.getConfigProvenance` | 隐藏密钥字段;来源只显示层名称与脱敏标识。 |
22
22
  | Skill | 通过当前会话读取 `skills/list` | 按会话解析,目录来自会话工作目录,并在活动会话变化时自动重新加载;模型可调用与仅用户可调用分开标记。 |
23
- | MCP | `pluginInventory.list` | MCP 客户端连接状态,以及工具注册的归属插件。 |
23
+ | 工具 | `pluginInventory.list` | 运行时工具注册清单,以及每个工具由哪个插件提供、作用于哪个范围。 |
24
24
 
25
25
  启停操作通过 Host 现有 Profile 管理器写入。更改可能即时生效、需要重启、被更高优先级配置覆盖,或被 Host 拒绝。修复预览有时效,并会在诊断项变化后失效。用户选择修复后,只有恰好存在一个可操作目标的低风险修复会自动执行;高风险修复先显示具体影响,再要求用户明确确认。当前修复动作是停用参与全局工具名或 MCP 名称冲突的所选插件。
26
26
 
27
+ MCP 服务器本身由 Host 的 MCP 设置 bundle 管理(例如 `@tinyforge/dsh-mcp-settings`):它注册 `settings.section` 的 `mcp` 页面,并读取 `mcpClientStatus/list`。本插件只保留插件侧的诊断——哪个插件注册了哪个工具——既不读取 `mcpClientStatus`,也不再单独列出 MCP 服务器,避免设置页面出现两处 MCP 管理入口。MCP 相关的健康诊断(`mcp.connection-failed`、`mcp.duplicate-name`)仍会显示在插件视图里。
28
+
27
29
  配置字段来自 Host 提供的 schema。编辑器隐藏密钥字段;配置来源只显示层名称和脱敏标识,不暴露值或文件系统路径。schema 校验和持久化由 Host 负责。
28
30
 
29
31
  ## 要求与限制
30
32
 
31
33
  需要提供插件管理 Remote、设置表单和运行时清单的 Harness Host。较旧 Host 可能只能查看清单,或显示诊断不可用;升级 Harness 后才能执行管理操作。只有当前 Profile 可寻址的插件可以启停。
32
34
 
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 在这里是只读的,界面不会加载 skill 正文。此界面不安装或卸载包、不编辑凭据,也不运行任意修复命令。
35
+ 标签页只硬注入两个核心客户端服务:`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
36
 
35
37
  ## 安装
36
38
 
@@ -49,11 +51,11 @@ npm install @tinyforge/dsh-plugin-manager-wj
49
51
  ## 发布
50
52
 
51
53
  ```sh
52
- npm test # node --test:13 项检查(视图、inject 契约、模块 id、patch 结构)
54
+ npm test # node --test:14 项检查(视图、工具归属、inject 契约、模块 id、patch 结构)
53
55
  npm publish --access public # 发布到 registry.npmjs.org
54
56
  ```
55
57
 
56
- 包名带 scope,发布新版本需要 `@tinyforge` npm scope 的维护者权限。发布后给对应提交打 tag(`git tag v1.3.3 && git push --tags`),让 GitHub 历史与 registry 版本对应。
58
+ 包名带 scope,发布新版本需要 `@tinyforge` npm scope 的维护者权限。发布后给对应提交打 tag(`git tag v1.4.0 && git push --tags`),让 GitHub 历史与 registry 版本对应。
57
59
 
58
60
  ## 开发
59
61
 
@@ -61,7 +63,7 @@ npm publish --access public # 发布到 registry.npmjs.org
61
63
 
62
64
  `client.js` 以 `__ModuleLoader__.load({ id: '@tinyforge/dsh-plugin-manager-wj', … })` 注册。这个 id 必须是完整包名(含 scope):客户端模块加载器按包名给每个 Loader 行建索引,注册成别的 id 会被判定为"加载了却没有注册自身所在的行",插件因此拿不到 fiber,设置里的标签页完全不出现。改包名时必须在同一次提交里一起改这个 id。
63
65
 
64
- - `node --test` 运行 `tests/client.test.js` 的行为检查:四个视图渲染并可切换、访问过的视图保持挂载、搜索与启停作用于当前视图、密钥配置对象不会进入编辑器、打开会话后无需刷新即加载 Skill 目录、改名后的 skills 命名空间能被发现、瞬时目录失败可就地重试恢复,以及 Host 不挂载任何可选服务时标签页仍然注册。
66
+ - `node --test` 运行 `tests/client.test.js` 的行为检查:四个视图渲染并可切换、访问过的视图保持挂载、搜索与启停作用于当前视图、密钥配置对象不会进入编辑器、打开会话后无需刷新即加载 Skill 目录、改名后的 skills 命名空间能被发现、瞬时目录失败可就地重试恢复、Host 不挂载任何可选服务时标签页仍然注册,以及工具视图只展示注册归属、不读取也不重复列出 MCP 服务器。
65
67
  - `node --check client.js` 检查浏览器 bundle 语法。
66
68
  - `tests/patch.test.js` 解析 `cordis.patch.yml`,确保没有裸标量以 YAML 保留字符开头 —— 带 scope 的包名必须保持加引号,否则 Host 会拒绝该 bundle patch。
67
69
  - `tests/inject.test.js` 把插件的 `inject` 固定为仅核心服务,这样一旦有人重新硬注入可选 remote,测试就会失败,而不是在某些 Host 上悄悄把设置页清空。
package/client.js CHANGED
@@ -9,7 +9,9 @@ window.__ModuleLoader__.load({
9
9
  const React = require('react')
10
10
  const h = React.createElement
11
11
  const NS = 'settings.pluginManagerWj'
12
- const TAB_ORDER = ['plugins', 'config', 'skill', 'mcp']
12
+ // MCP server management is owned by the Host's MCP settings bundle, so this page shows no MCP
13
+ // server list of its own: a second list here duplicated that page and read the same remote.
14
+ const TAB_ORDER = ['plugins', 'config', 'skill', 'tools']
13
15
  const TAB_KEY = 'dsh-plugin-manager-wj/tab'
14
16
 
15
17
  function unwrap(result, name) {
@@ -313,21 +315,18 @@ window.__ModuleLoader__.load({
313
315
  t(skill.modelInvocable ? 'skillModelInvocable' : 'skillUserOnly'))))
314
316
  return h('div', { style: styles.page },
315
317
  h('p', { style: styles.description }, t('skillIntro')),
318
+ h('p', { style: styles.message }, t('skillReadOnly')),
316
319
  h(Section, { id: 'skills', title: t('skillsTitle'), count: `${rows.length} ${t('items')}`, empty },
317
320
  rows.length ? h('ul', { style: styles.list }, rows.map(skillRow)) : null))
318
321
  }
319
322
 
320
- function McpPanel({ inventory, mcpRows, toolRows, needle, t }) {
323
+ // Tool ownership is the one diagnostic the MCP settings page does not carry: it answers
324
+ // "which plugin registered this tool", which belongs to plugin management, not to MCP setup.
325
+ function ToolsPanel({ inventory, toolRows, needle, t }) {
321
326
  const owner = row => row.owner ? `${row.owner.moduleName} (${row.owner.entryId})` : '—'
322
327
  return h('div', { style: styles.page },
323
- h('p', { style: styles.description }, t('mcpIntro')),
324
- h(Section, { id: 'mcp', title: t('mcp'), count: `${mcpRows.length} ${t('items')}`, empty: t(needle ? 'noMatches' : 'noRows') },
325
- mcpRows.length ? h('ul', { style: styles.list }, mcpRows.map(row => h('li', { key: `${row.serverName}:${row.owner?.entryId ?? ''}`, style: styles.row },
326
- h('div', { style: styles.rowHead },
327
- h('h3', { style: styles.rowTitle }, row.serverName),
328
- h('span', { style: { ...styles.badge, ...(row.state === 'connected' ? {} : styles.warning) } }, t(row.state))),
329
- h('div', { style: styles.meta }, `${t('owner')}: ${owner(row)}`),
330
- row.toolNames?.length ? h('div', { style: styles.meta }, `${t('toolNames')}: ${row.toolNames.join(', ')}`) : null))) : null),
328
+ h('p', { style: styles.description }, t('toolsIntro')),
329
+ h('p', { style: styles.message }, t('toolsMcpNote')),
331
330
  h(Section, { id: 'tools', title: t('tools'), count: `${toolRows.length} ${t('items')}`, empty: t(needle ? 'noMatches' : 'noRows') },
332
331
  toolRows.length ? h('ul', { style: styles.list }, toolRows.map(row => h('li', { key: `${row.name}:${row.owner?.entryId ?? ''}`, style: styles.row },
333
332
  h('h3', { style: styles.rowTitle }, row.name),
@@ -489,13 +488,12 @@ window.__ModuleLoader__.load({
489
488
  const pluginRows = plugins.filter(row => matches([row.moduleName, row.entryId, row.meta?.title, row.meta?.description]))
490
489
  const findings = (health?.findings ?? []).filter(row => matches([row.id, row.code, row.evidence?.name, row.evidence?.serverName, row.evidence?.packageName]))
491
490
  const toolRows = (inventory?.toolRegistrations ?? []).filter(row => matches([row.name, row.owner?.moduleName, row.owner?.entryId]))
492
- const mcpRows = (inventory?.mcpClients ?? []).filter(row => matches([row.serverName, row.state, row.owner?.moduleName, ...(row.toolNames ?? [])]))
493
491
 
494
492
  const tabs = [
495
493
  { id: 'plugins', label: t('tabs.plugins'), count: plugins.length },
496
494
  { id: 'config', label: t('tabs.config'), count: settings?.namespaces?.length },
497
495
  { id: 'skill', label: t('tabs.skill'), count: skills?.kind === 'ready' ? skills.items.length : undefined },
498
- { id: 'mcp', label: t('tabs.mcp'), count: inventory?.mcpClients?.length },
496
+ { id: 'tools', label: t('tabs.tools'), count: toolRows.length },
499
497
  ]
500
498
 
501
499
  const panel = (id, children) => visited.includes(id) ? h('div', {
@@ -512,7 +510,7 @@ window.__ModuleLoader__.load({
512
510
  [health?.enabledCount ?? plugins.filter(row => row.enabled).length, 'enabled'],
513
511
  [health ? health.findings.length : '—', 'findings'],
514
512
  [skills?.kind === 'ready' ? skills.items.length : '—', 'skills'],
515
- [inventory?.mcpClients?.length ?? '—', 'mcpStat'],
513
+ [inventory ? toolRows.length : '—', 'toolsStat'],
516
514
  ]
517
515
  const showStats = state.kind === 'ready' && current !== undefined
518
516
 
@@ -542,7 +540,7 @@ window.__ModuleLoader__.load({
542
540
  })),
543
541
  panel('config', h(ConfigPanel, { settings, settingsReady: settings !== undefined, plugins, forms, provenance: current?.provenance, t })),
544
542
  panel('skill', h(SkillPanel, { skills, needle, onRetry: refresh, t })),
545
- panel('mcp', h(McpPanel, { inventory, mcpRows, toolRows, needle, t })))
543
+ panel('tools', h(ToolsPanel, { inventory, toolRows, needle, t })))
546
544
  }
547
545
 
548
546
  return {
@@ -553,20 +551,21 @@ window.__ModuleLoader__.load({
553
551
  inject: ['slots', 'locale'],
554
552
  apply(ctx) {
555
553
  const zh = {
556
- tab: '插件管理', search: '搜索当前视图的插件、配置、Skill 或 MCP', refresh: '刷新', loading: '正在读取 Host 状态…', loadingShort: '读取中…',
557
- eyebrow: '插件健康与管理', heading: '插件管理', description: '查看插件状态与冲突,追踪配置来源,浏览 Skill 目录与 MCP 客户端,并通过受控操作修复问题。', summary: '当前状态', items: '项',
558
- viewsLabel: '管理视图', 'tabs.plugins': '插件', 'tabs.config': '配置', 'tabs.skill': 'Skill', 'tabs.mcp': 'MCP',
554
+ tab: '插件管理', search: '搜索当前视图的插件、配置、Skill 或工具', refresh: '刷新', loading: '正在读取 Host 状态…', loadingShort: '读取中…',
555
+ eyebrow: '插件健康与管理', heading: '插件管理', description: '查看插件状态与冲突,追踪配置来源,浏览 Skill 目录与工具注册归属,并通过受控操作修复问题。', summary: '当前状态', items: '项',
556
+ viewsLabel: '管理视图', 'tabs.plugins': '插件', 'tabs.config': '配置', 'tabs.skill': 'Skill', 'tabs.tools': '工具',
559
557
  pluginsIntro: '实时插件清单、健康诊断与启停操作。只列出当前 Profile 可寻址的插件。',
560
558
  configIntro: '按 Host schema 编辑非密钥配置,并查看每个字段的有效来源与被覆盖层。',
561
559
  skillIntro: '当前会话可用的 Skill 目录,按会话工作目录解析,并随会话切换自动刷新;模型可调用与仅用户可调用的条目分开标记。',
562
- mcpIntro: '已组合的 MCP 客户端连接状态与工具注册归属。',
560
+ toolsIntro: '运行时工具注册清单,以及每个工具由哪个插件提供、作用于哪个范围。',
561
+ toolsMcpNote: 'MCP 服务器的添加与连接配置由 Host 的 MCP 设置页负责;这里只做插件侧的注册归属诊断,不再重复列出 MCP 服务器。',
563
562
  error: '无法读取运行时清单。', retry: '重试', noRows: '暂无记录。', noMatches: '没有匹配的记录。', diagnosticsUnavailable: '此 Harness Host 尚未提供诊断接口;当前显示可用的插件和注册清单。',
564
- inventoryUnavailable: '此 Host 未提供运行时清单接口,工具与 MCP 信息不可用。',
563
+ inventoryUnavailable: '此 Host 未提供运行时清单接口,工具注册信息不可用。',
565
564
  findingsTitle: '健康诊断', pluginsTitle: '插件', configurationTitle: '配置管理', plugins: '插件', enabled: '已启用', findings: '发现项', severity: '严重程度', affected: '相关插件', evidence: '证据',
566
565
  configEmpty: 'Host 未暴露可编辑的配置命名空间。', configUnavailable: '此 Host 未提供设置表单接口,配置视图不可用。',
567
566
  skillsTitle: 'Skill 目录', skillEmpty: '当前会话没有可用的 Skill。', skillUnsupported: '此 Host 未提供 skills 接口,Skill 目录不可用。', skillNoSession: '尚无可用会话。打开或切换会话后,这里会自动加载,无需刷新。', skillError: '无法读取 Skill 目录。', loadingSkills: '正在读取 Skill 目录…',
568
567
  skillModelInvocable: '模型可调用', skillUserOnly: '仅用户可调用', skillWhenToUse: '适用场景', skillPath: '指令文件',
569
- mcpStat: 'MCP', skills: 'Skill',
568
+ toolsStat: '工具', skills: 'Skill',
570
569
  'plugin.activation-failed': '插件启动失败', 'tool.duplicate-name': '工具名称重复', 'mcp.connection-failed': 'MCP 连接异常', 'mcp.duplicate-name': 'MCP 名称重复',
571
570
  'bundle.compatibility-rejected': '组合包版本不兼容', 'bundle.dependency-invalid': '所选依赖无效', severityError: '错误', severityWarning: '警告', severityInfo: '提示', warning: '警告', info: '提示',
572
571
  source: '配置来源', shadowed: '被覆盖来源', sourceUnknown: '未知(Host 未提供来源)', bundle: '组合包', profile: 'Profile', home: 'Home', invocation: '本次启动',
@@ -574,23 +573,25 @@ window.__ModuleLoader__.load({
574
573
  previewRepair: '诊断并修复 {name}', repairPreview: '修复预览', target: '目标', effect: '影响', disablePlugin: '关闭插件', risk: '风险', low: '低', high: '高', reversible: '可撤销', notReversible: '不可撤销', applyRepair: '执行修复', confirmRepair: '确认并执行', cancel: '取消', previewOrRepairFailed: '无法预览或执行此修复。', stalePreview: '修复预览已过期或状态已变化,请重新加载后再试。',
575
574
  changeApplied: '设置已保存并应用。', restartRequired: '设置已保存;重启后生效。', changeOverridden: '设置已保存,但被更高优先级配置覆盖。', changeFailed: 'Host 未能应用此更改。',
576
575
  enable: '启用', disable: '停用', disabled: '已停用', enabledTag: '已启用', disabledTag: '已停用', active: '运行中', failed: '失败', loadingPhase: '加载中', pending: '等待中', unloading: '卸载中', notRunning: '未运行',
577
- 'management-required': '管理服务受保护', unaddressable: '此条目无法通过当前 Profile 修改', activationFailed: '插件未能完成启动。', owner: '所属插件', tools: '工具注册', mcp: 'MCP 客户端', toolNames: '工具名称', global: '全局', scoped: '作用域', starting: '启动中', connected: '已连接', reconnecting: '正在重连', stopped: '已停止',
576
+ skillReadOnly: 'Skill 的启用与停用由 profile 的 skills 目录与指令文件决定;本 Host 未提供开关接口,因此这里只读展示当前会话可见的条目。',
577
+ 'management-required': '管理服务受保护', unaddressable: '此条目无法通过当前 Profile 修改', activationFailed: '插件未能完成启动。', owner: '所属插件', tools: '工具注册', global: '全局', scoped: '作用域',
578
578
  }
579
579
  const en = {
580
- tab: 'Plugin management', search: 'Search the current view for plugins, settings, skills or MCP', refresh: 'Refresh', loading: 'Reading Host state…', loadingShort: 'Loading…',
581
- eyebrow: 'PLUGIN HEALTH AND MANAGEMENT', heading: 'Plugin management', description: 'Review plugin status and conflicts, trace configuration sources, browse the skill catalog and MCP clients, and repair issues through bounded actions.', summary: 'Current status', items: 'items',
582
- viewsLabel: 'Management views', 'tabs.plugins': 'Plugins', 'tabs.config': 'Configuration', 'tabs.skill': 'Skills', 'tabs.mcp': 'MCP',
580
+ tab: 'Plugin management', search: 'Search the current view for plugins, settings, skills or tools', refresh: 'Refresh', loading: 'Reading Host state…', loadingShort: 'Loading…',
581
+ eyebrow: 'PLUGIN HEALTH AND MANAGEMENT', heading: 'Plugin management', description: 'Review plugin status and conflicts, trace configuration sources, browse the skill catalog and tool ownership, and repair issues through bounded actions.', summary: 'Current status', items: 'items',
582
+ viewsLabel: 'Management views', 'tabs.plugins': 'Plugins', 'tabs.config': 'Configuration', 'tabs.skill': 'Skills', 'tabs.tools': 'Tools',
583
583
  pluginsIntro: 'Live plugin inventory, health findings and enable/disable actions. Only plugins addressable by the active profile are listed.',
584
584
  configIntro: 'Edit non-secret settings through the Host schema and see each field’s effective source and shadowed layers.',
585
585
  skillIntro: 'Skills available to the current session, resolved from its working directory and reloaded automatically when the session changes; model-invocable and user-only entries are marked separately.',
586
- mcpIntro: 'Composed MCP client connections and the owners of registered tools.',
586
+ toolsIntro: 'Runtime tool registrations, with the plugin that provides each tool and the scope it applies to.',
587
+ toolsMcpNote: 'Adding and connecting MCP servers belongs to the Host’s MCP settings page; this view covers plugin-side ownership only and deliberately lists no MCP servers of its own.',
587
588
  error: 'The runtime inventory could not be read.', retry: 'Retry', noRows: 'No records.', noMatches: 'No matching records.', diagnosticsUnavailable: 'This Harness Host does not expose diagnostics yet. Available plugin and registration inventories are still shown.',
588
- inventoryUnavailable: 'This Host does not expose the runtime inventory; tool and MCP details are unavailable.',
589
+ inventoryUnavailable: 'This Host does not expose the runtime inventory; tool registrations are unavailable.',
589
590
  findingsTitle: 'Health findings', pluginsTitle: 'Plugins', configurationTitle: 'Configuration', plugins: 'plugins', enabled: 'enabled', findings: 'findings', severity: 'Severity', affected: 'Affected plugins', evidence: 'Evidence',
590
591
  configEmpty: 'The Host exposes no editable configuration namespaces.', configUnavailable: 'This Host does not expose settings forms; configuration is unavailable.',
591
592
  skillsTitle: 'Skill catalog', skillEmpty: 'The current session has no available skills.', skillUnsupported: 'This Host does not expose the skills interface; the catalog is unavailable.', skillNoSession: 'No session yet. Open or switch a session and this view loads automatically — no refresh needed.', skillError: 'The skill catalog could not be read.', loadingSkills: 'Reading the skill catalog…',
592
593
  skillModelInvocable: 'Model-invocable', skillUserOnly: 'User-only', skillWhenToUse: 'When to use', skillPath: 'Instruction file',
593
- mcpStat: 'MCP', skills: 'skills',
594
+ toolsStat: 'tools', skills: 'skills',
594
595
  'plugin.activation-failed': 'Plugin activation failed', 'tool.duplicate-name': 'Duplicate tool name', 'mcp.connection-failed': 'MCP connection issue', 'mcp.duplicate-name': 'Duplicate MCP name',
595
596
  'bundle.compatibility-rejected': 'Bundle version is incompatible', 'bundle.dependency-invalid': 'Selected dependency is invalid', severityError: 'Error', severityWarning: 'Warning', severityInfo: 'Info', warning: 'Warning', info: 'Info',
596
597
  source: 'Configuration source', shadowed: 'Shadowed sources', sourceUnknown: 'Unknown (Host did not provide a source)', bundle: 'Bundle', profile: 'Profile', home: 'Home', invocation: 'This launch',
@@ -598,7 +599,8 @@ window.__ModuleLoader__.load({
598
599
  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.',
599
600
  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.',
600
601
  enable: 'Enable', disable: 'Disable', disabled: 'Disabled', enabledTag: 'Enabled', disabledTag: 'Disabled', active: 'Active', failed: 'Failed', loadingPhase: 'Loading', pending: 'Pending', unloading: 'Unloading', notRunning: 'Not running',
601
- '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',
602
+ skillReadOnly: 'Skills are enabled by the profile’s skills directories and instruction files; this Host exposes no toggle, so the catalog is read-only.',
603
+ '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', global: 'Global', scoped: 'Scoped',
602
604
  }
603
605
  ctx.effect(() => ctx.locale.register(NS, { zh, en }), 'plugin-manager-wj: dictionaries')
604
606
  const t = ctx.locale.bind(NS)
@@ -663,6 +665,8 @@ window.__ModuleLoader__.load({
663
665
  }
664
666
  }
665
667
 
668
+ // No `mcpClientStatus/list` probe lives here: the MCP settings bundle owns MCP server state
669
+ // and its page, and reading that remote from two pages is what made the two views conflict.
666
670
  ctx.slots.inject('settings.plugins.tab', () => ctx.slots.register({
667
671
  name: 'settings.plugins.tab', id: 'wj-registration-inventory', order: 20,
668
672
  label: () => t('tab'), locale: NS,
package/locale/en.json CHANGED
@@ -8,25 +8,23 @@
8
8
  "plugins": "Plugins",
9
9
  "config": "Configuration",
10
10
  "skill": "Skills",
11
- "mcp": "MCP"
11
+ "tools": "Tools"
12
12
  },
13
- "search": "Search the current view for plugins, settings, skills or MCP",
13
+ "search": "Search the current view for plugins, settings, skills or tools",
14
14
  "refresh": "Refresh",
15
15
  "loading": "Reading runtime state…",
16
16
  "error": "The runtime inventory could not be read.",
17
17
  "retry": "Retry",
18
- "empty": "There are no plugin, tool or MCP records yet.",
18
+ "empty": "There are no plugin or tool records yet.",
19
19
  "unsupported": "This Harness Host does not provide plugin management and runtime inventory. Upgrade Harness to manage plugins.",
20
20
  "tools": "Tool registrations",
21
- "mcp": "MCP clients",
21
+ "mcpNote": "Adding and connecting MCP servers belongs to the Host's MCP settings page; this page covers plugin-side ownership only.",
22
22
  "owner": "Owning plugin",
23
23
  "scope": "Scope",
24
24
  "global": "Global",
25
25
  "scoped": "Agent scope",
26
26
  "conditional": "Conditional",
27
27
  "unconditional": "Always registered",
28
- "serverState": "Connection state",
29
- "toolNames": "Tool names",
30
28
  "skills": "Skill catalog",
31
29
  "skillUnsupported": "This Host does not expose the skills interface; the catalog is unavailable.",
32
30
  "skillNoSession": "The catalog is resolved per session; open a session and refresh.",
package/locale/zh.json CHANGED
@@ -8,25 +8,23 @@
8
8
  "plugins": "插件",
9
9
  "config": "配置",
10
10
  "skill": "Skill",
11
- "mcp": "MCP"
11
+ "tools": "工具"
12
12
  },
13
- "search": "搜索当前视图的插件、配置、Skill 或 MCP",
13
+ "search": "搜索当前视图的插件、配置、Skill 或工具",
14
14
  "refresh": "刷新",
15
15
  "loading": "正在读取 Host 状态…",
16
16
  "error": "无法读取运行时清单。",
17
17
  "retry": "重试",
18
- "empty": "当前没有插件、工具或 MCP 记录。",
18
+ "empty": "当前没有插件或工具记录。",
19
19
  "unsupported": "当前 Harness Host 未提供插件管理和运行时清单,请升级 Harness 后管理插件。",
20
20
  "tools": "工具注册",
21
- "mcp": "MCP 客户端",
21
+ "mcpNote": "MCP 服务器的添加与连接由 Host 的 MCP 设置页负责;本页只做插件侧的注册归属诊断。",
22
22
  "owner": "所属插件",
23
23
  "scope": "作用域",
24
24
  "global": "全局",
25
25
  "scoped": "Agent 作用域",
26
26
  "conditional": "条件启用",
27
27
  "unconditional": "始终注册",
28
- "serverState": "连接状态",
29
- "toolNames": "工具名",
30
28
  "skills": "Skill 目录",
31
29
  "skillUnsupported": "此 Host 未提供 skills 接口,Skill 目录不可用。",
32
30
  "skillNoSession": "Skill 目录按会话解析;请先打开一个会话后刷新。",
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@tinyforge/dsh-plugin-manager-wj",
3
- "version": "1.3.3",
4
- "description": "Switchable plugin, configuration, skill and MCP views with health diagnostics, configuration provenance, and tool/MCP inventory for DeepSeek Harness.",
3
+ "version": "1.4.0",
4
+ "description": "Switchable plugin, configuration, skill and tool-ownership views with health diagnostics, configuration provenance, and tool inventory for DeepSeek Harness.",
5
5
  "type": "module",
6
6
  "main": "index.js",
7
7
  "scripts": { "test": "node --test" },