@tinyforge/dsh-plugin-manager-wj 1.3.4 → 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,10 +20,12 @@
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`, `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. |
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
@@ -49,11 +51,11 @@ npm install @tinyforge/dsh-plugin-manager-wj
49
51
  ## Release
50
52
 
51
53
  ```sh
52
- npm test # node --test: 14 checks (views, MCP merge, 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.4 && 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, the tab still registers on a Host that mounts no optional services, and MCP rows merge the optional client-status Remote by server name.
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,10 +20,12 @@
20
20
  | 插件 | `pluginManager.listPlugins`、`pluginManager.getHealthSnapshot` | 启停、健康诊断与受控修复预览。 |
21
21
  | 配置 | `configForms.describe`、`pluginManager.getConfigProvenance` | 隐藏密钥字段;来源只显示层名称与脱敏标识。 |
22
22
  | Skill | 通过当前会话读取 `skills/list` | 按会话解析,目录来自会话工作目录,并在活动会话变化时自动重新加载;模型可调用与仅用户可调用分开标记。 |
23
- | MCP | `pluginInventory.list`、`mcpClientStatus.list`(可选) | MCP 客户端连接状态,以及工具注册的归属插件。由配套包管理的服务不在 Host 自身注册表中,会按服务名合并进来,并带上传输方式、连接来源和工具数。 |
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
  ## 要求与限制
@@ -49,11 +51,11 @@ npm install @tinyforge/dsh-plugin-manager-wj
49
51
  ## 发布
50
52
 
51
53
  ```sh
52
- npm test # node --test:14 项检查(视图、MCP 合并、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.4 && 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 不挂载任何可选服务时标签页仍然注册,以及 MCP 行会按服务名合并可选的客户端状态 Remote。
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) {
@@ -318,22 +320,13 @@ window.__ModuleLoader__.load({
318
320
  rows.length ? h('ul', { style: styles.list }, rows.map(skillRow)) : null))
319
321
  }
320
322
 
321
- 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 }) {
322
326
  const owner = row => row.owner ? `${row.owner.moduleName} (${row.owner.entryId})` : '—'
323
327
  return h('div', { style: styles.page },
324
- h('p', { style: styles.description }, t('mcpIntro')),
325
- h(Section, { id: 'mcp', title: t('mcp'), count: `${mcpRows.length} ${t('items')}`, empty: t(needle ? 'noMatches' : 'noRows') },
326
- mcpRows.length ? h('ul', { style: styles.list }, mcpRows.map(row => h('li', { key: `${row.serverName}:${row.owner?.entryId ?? ''}`, style: styles.row },
327
- h('div', { style: styles.rowHead },
328
- h('h3', { style: styles.rowTitle }, row.serverName),
329
- h('span', { style: { ...styles.badge, ...(row.state === 'connected' ? {} : styles.warning) } }, t(row.state))),
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(' · ')),
336
- 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')),
337
330
  h(Section, { id: 'tools', title: t('tools'), count: `${toolRows.length} ${t('items')}`, empty: t(needle ? 'noMatches' : 'noRows') },
338
331
  toolRows.length ? h('ul', { style: styles.list }, toolRows.map(row => h('li', { key: `${row.name}:${row.owner?.entryId ?? ''}`, style: styles.row },
339
332
  h('h3', { style: styles.rowTitle }, row.name),
@@ -341,7 +334,7 @@ window.__ModuleLoader__.load({
341
334
  inventory ? null : h('p', { style: styles.message }, t('inventoryUnavailable')))
342
335
  }
343
336
 
344
- function ManagerPage({ list, manager, forms, loadSkills, listMcpStatus, readSessionId, watchSessions, t }) {
337
+ function ManagerPage({ list, manager, forms, loadSkills, readSessionId, watchSessions, t }) {
345
338
  const initialTab = readStoredTab()
346
339
  const [tab, setTab] = React.useState(initialTab)
347
340
  const [visited, setVisited] = React.useState([initialTab])
@@ -388,19 +381,17 @@ window.__ModuleLoader__.load({
388
381
  React.useEffect(() => {
389
382
  let live = true
390
383
  Promise.resolve().then(async () => {
391
- const [inventoryResult, pluginResult, healthResult, settingsResult, statusResult] = await Promise.allSettled([
384
+ const [inventoryResult, pluginResult, healthResult, settingsResult] = await Promise.allSettled([
392
385
  list(),
393
386
  manager?.listPlugins ? manager.listPlugins() : Promise.reject(new Error('unavailable')),
394
387
  manager?.getHealthSnapshot ? manager.getHealthSnapshot() : Promise.reject(new Error('unavailable')),
395
388
  forms?.describe ? forms.describe().ensure().then(() => forms.describe().getSnapshot()) : Promise.reject(new Error('unavailable')),
396
- listMcpStatus ? listMcpStatus() : Promise.resolve(undefined),
397
389
  ])
398
390
  if (inventoryResult.status !== 'fulfilled') throw inventoryResult.reason
399
391
  const inventory = inventoryResult.value
400
392
  const plugins = pluginResult.status === 'fulfilled' ? unwrap(pluginResult.value, 'pluginManager.listPlugins') : []
401
393
  const health = healthResult.status === 'fulfilled' ? unwrap(healthResult.value, 'pluginManager.getHealthSnapshot') : undefined
402
394
  const settings = settingsResult.status === 'fulfilled' ? settingsResult.value.view : undefined
403
- const mcpStatus = statusResult.status === 'fulfilled' ? statusResult.value : undefined
404
395
  const provenance = new Map()
405
396
  if (settings && manager?.getConfigProvenance) {
406
397
  await Promise.all(settings.namespaces.map(async view => {
@@ -415,12 +406,12 @@ window.__ModuleLoader__.load({
415
406
  }
416
407
  }))
417
408
  }
418
- if (live) setState({ kind: 'ready', snapshot: { inventory, plugins, health, settings, provenance, mcpStatus } })
409
+ if (live) setState({ kind: 'ready', snapshot: { inventory, plugins, health, settings, provenance } })
419
410
  }).catch(() => {
420
411
  if (live) setState(previous => ({ kind: 'error', snapshot: previous.snapshot }))
421
412
  })
422
413
  return () => { live = false }
423
- }, [list, manager, forms, listMcpStatus, revision])
414
+ }, [list, manager, forms, revision])
424
415
 
425
416
  const refresh = () => {
426
417
  setState(current => ({ kind: 'loading', snapshot: current.snapshot }))
@@ -497,34 +488,12 @@ window.__ModuleLoader__.load({
497
488
  const pluginRows = plugins.filter(row => matches([row.moduleName, row.entryId, row.meta?.title, row.meta?.description]))
498
489
  const findings = (health?.findings ?? []).filter(row => matches([row.id, row.code, row.evidence?.name, row.evidence?.serverName, row.evidence?.packageName]))
499
490
  const toolRows = (inventory?.toolRegistrations ?? []).filter(row => matches([row.name, row.owner?.moduleName, row.owner?.entryId]))
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 ?? [])]))
522
491
 
523
492
  const tabs = [
524
493
  { id: 'plugins', label: t('tabs.plugins'), count: plugins.length },
525
494
  { id: 'config', label: t('tabs.config'), count: settings?.namespaces?.length },
526
495
  { id: 'skill', label: t('tabs.skill'), count: skills?.kind === 'ready' ? skills.items.length : undefined },
527
- { id: 'mcp', label: t('tabs.mcp'), count: mcpRows.length },
496
+ { id: 'tools', label: t('tabs.tools'), count: toolRows.length },
528
497
  ]
529
498
 
530
499
  const panel = (id, children) => visited.includes(id) ? h('div', {
@@ -541,7 +510,7 @@ window.__ModuleLoader__.load({
541
510
  [health?.enabledCount ?? plugins.filter(row => row.enabled).length, 'enabled'],
542
511
  [health ? health.findings.length : '—', 'findings'],
543
512
  [skills?.kind === 'ready' ? skills.items.length : '—', 'skills'],
544
- [inventory ? mcpRows.length : '—', 'mcpStat'],
513
+ [inventory ? toolRows.length : '—', 'toolsStat'],
545
514
  ]
546
515
  const showStats = state.kind === 'ready' && current !== undefined
547
516
 
@@ -571,7 +540,7 @@ window.__ModuleLoader__.load({
571
540
  })),
572
541
  panel('config', h(ConfigPanel, { settings, settingsReady: settings !== undefined, plugins, forms, provenance: current?.provenance, t })),
573
542
  panel('skill', h(SkillPanel, { skills, needle, onRetry: refresh, t })),
574
- panel('mcp', h(McpPanel, { inventory, mcpRows, toolRows, needle, t })))
543
+ panel('tools', h(ToolsPanel, { inventory, toolRows, needle, t })))
575
544
  }
576
545
 
577
546
  return {
@@ -582,20 +551,21 @@ window.__ModuleLoader__.load({
582
551
  inject: ['slots', 'locale'],
583
552
  apply(ctx) {
584
553
  const zh = {
585
- tab: '插件管理', search: '搜索当前视图的插件、配置、Skill 或 MCP', refresh: '刷新', loading: '正在读取 Host 状态…', loadingShort: '读取中…',
586
- eyebrow: '插件健康与管理', heading: '插件管理', description: '查看插件状态与冲突,追踪配置来源,浏览 Skill 目录与 MCP 客户端,并通过受控操作修复问题。', summary: '当前状态', items: '项',
587
- 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': '工具',
588
557
  pluginsIntro: '实时插件清单、健康诊断与启停操作。只列出当前 Profile 可寻址的插件。',
589
558
  configIntro: '按 Host schema 编辑非密钥配置,并查看每个字段的有效来源与被覆盖层。',
590
559
  skillIntro: '当前会话可用的 Skill 目录,按会话工作目录解析,并随会话切换自动刷新;模型可调用与仅用户可调用的条目分开标记。',
591
- mcpIntro: '已组合的 MCP 客户端连接状态与工具注册归属。',
560
+ toolsIntro: '运行时工具注册清单,以及每个工具由哪个插件提供、作用于哪个范围。',
561
+ toolsMcpNote: 'MCP 服务器的添加与连接配置由 Host 的 MCP 设置页负责;这里只做插件侧的注册归属诊断,不再重复列出 MCP 服务器。',
592
562
  error: '无法读取运行时清单。', retry: '重试', noRows: '暂无记录。', noMatches: '没有匹配的记录。', diagnosticsUnavailable: '此 Harness Host 尚未提供诊断接口;当前显示可用的插件和注册清单。',
593
- inventoryUnavailable: '此 Host 未提供运行时清单接口,工具与 MCP 信息不可用。',
563
+ inventoryUnavailable: '此 Host 未提供运行时清单接口,工具注册信息不可用。',
594
564
  findingsTitle: '健康诊断', pluginsTitle: '插件', configurationTitle: '配置管理', plugins: '插件', enabled: '已启用', findings: '发现项', severity: '严重程度', affected: '相关插件', evidence: '证据',
595
565
  configEmpty: 'Host 未暴露可编辑的配置命名空间。', configUnavailable: '此 Host 未提供设置表单接口,配置视图不可用。',
596
566
  skillsTitle: 'Skill 目录', skillEmpty: '当前会话没有可用的 Skill。', skillUnsupported: '此 Host 未提供 skills 接口,Skill 目录不可用。', skillNoSession: '尚无可用会话。打开或切换会话后,这里会自动加载,无需刷新。', skillError: '无法读取 Skill 目录。', loadingSkills: '正在读取 Skill 目录…',
597
567
  skillModelInvocable: '模型可调用', skillUserOnly: '仅用户可调用', skillWhenToUse: '适用场景', skillPath: '指令文件',
598
- mcpStat: 'MCP', skills: 'Skill',
568
+ toolsStat: '工具', skills: 'Skill',
599
569
  'plugin.activation-failed': '插件启动失败', 'tool.duplicate-name': '工具名称重复', 'mcp.connection-failed': 'MCP 连接异常', 'mcp.duplicate-name': 'MCP 名称重复',
600
570
  'bundle.compatibility-rejected': '组合包版本不兼容', 'bundle.dependency-invalid': '所选依赖无效', severityError: '错误', severityWarning: '警告', severityInfo: '提示', warning: '警告', info: '提示',
601
571
  source: '配置来源', shadowed: '被覆盖来源', sourceUnknown: '未知(Host 未提供来源)', bundle: '组合包', profile: 'Profile', home: 'Home', invocation: '本次启动',
@@ -603,25 +573,25 @@ window.__ModuleLoader__.load({
603
573
  previewRepair: '诊断并修复 {name}', repairPreview: '修复预览', target: '目标', effect: '影响', disablePlugin: '关闭插件', risk: '风险', low: '低', high: '高', reversible: '可撤销', notReversible: '不可撤销', applyRepair: '执行修复', confirmRepair: '确认并执行', cancel: '取消', previewOrRepairFailed: '无法预览或执行此修复。', stalePreview: '修复预览已过期或状态已变化,请重新加载后再试。',
604
574
  changeApplied: '设置已保存并应用。', restartRequired: '设置已保存;重启后生效。', changeOverridden: '设置已保存,但被更高优先级配置覆盖。', changeFailed: 'Host 未能应用此更改。',
605
575
  enable: '启用', disable: '停用', disabled: '已停用', enabledTag: '已启用', disabledTag: '已停用', active: '运行中', failed: '失败', loadingPhase: '加载中', pending: '等待中', unloading: '卸载中', notRunning: '未运行',
606
- connecting: '连接中', disconnected: '已断开', transport: '传输方式', mcpSource: '连接来源', toolCount: '工具数',
607
576
  skillReadOnly: 'Skill 的启用与停用由 profile 的 skills 目录与指令文件决定;本 Host 未提供开关接口,因此这里只读展示当前会话可见的条目。',
608
- 'management-required': '管理服务受保护', unaddressable: '此条目无法通过当前 Profile 修改', activationFailed: '插件未能完成启动。', owner: '所属插件', tools: '工具注册', mcp: 'MCP 客户端', toolNames: '工具名称', global: '全局', scoped: '作用域', starting: '启动中', connected: '已连接', reconnecting: '正在重连', stopped: '已停止',
577
+ 'management-required': '管理服务受保护', unaddressable: '此条目无法通过当前 Profile 修改', activationFailed: '插件未能完成启动。', owner: '所属插件', tools: '工具注册', global: '全局', scoped: '作用域',
609
578
  }
610
579
  const en = {
611
- tab: 'Plugin management', search: 'Search the current view for plugins, settings, skills or MCP', refresh: 'Refresh', loading: 'Reading Host state…', loadingShort: 'Loading…',
612
- 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',
613
- 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',
614
583
  pluginsIntro: 'Live plugin inventory, health findings and enable/disable actions. Only plugins addressable by the active profile are listed.',
615
584
  configIntro: 'Edit non-secret settings through the Host schema and see each field’s effective source and shadowed layers.',
616
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.',
617
- 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.',
618
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.',
619
- 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.',
620
590
  findingsTitle: 'Health findings', pluginsTitle: 'Plugins', configurationTitle: 'Configuration', plugins: 'plugins', enabled: 'enabled', findings: 'findings', severity: 'Severity', affected: 'Affected plugins', evidence: 'Evidence',
621
591
  configEmpty: 'The Host exposes no editable configuration namespaces.', configUnavailable: 'This Host does not expose settings forms; configuration is unavailable.',
622
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…',
623
593
  skillModelInvocable: 'Model-invocable', skillUserOnly: 'User-only', skillWhenToUse: 'When to use', skillPath: 'Instruction file',
624
- mcpStat: 'MCP', skills: 'skills',
594
+ toolsStat: 'tools', skills: 'skills',
625
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',
626
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',
627
597
  source: 'Configuration source', shadowed: 'Shadowed sources', sourceUnknown: 'Unknown (Host did not provide a source)', bundle: 'Bundle', profile: 'Profile', home: 'Home', invocation: 'This launch',
@@ -629,9 +599,8 @@ window.__ModuleLoader__.load({
629
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.',
630
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.',
631
601
  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
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.',
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',
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',
635
604
  }
636
605
  ctx.effect(() => ctx.locale.register(NS, { zh, en }), 'plugin-manager-wj: dictionaries')
637
606
  const t = ctx.locale.bind(NS)
@@ -696,18 +665,12 @@ window.__ModuleLoader__.load({
696
665
  }
697
666
  }
698
667
 
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
-
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.
707
670
  ctx.slots.inject('settings.plugins.tab', () => ctx.slots.register({
708
671
  name: 'settings.plugins.tab', id: 'wj-registration-inventory', order: 20,
709
672
  label: () => t('tab'), locale: NS,
710
- inject: () => ({ list, manager: namespace('pluginManager'), forms, loadSkills, listMcpStatus, readSessionId: activeSessionId, watchSessions }),
673
+ inject: () => ({ list, manager: namespace('pluginManager'), forms, loadSkills, readSessionId: activeSessionId, watchSessions }),
711
674
  }, ManagerPage))
712
675
  },
713
676
  }
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.4",
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" },