dsh-mcp-connector 0.2.42 → 0.2.44
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +29 -0
- package/README.en.md +4 -2
- package/README.md +4 -3
- package/docs/USER-GUIDE.md +6 -2
- package/lib/index.js +308 -22
- package/lib/schema.js +22 -0
- package/lib/status-events.js +119 -0
- package/lib/stores.js +29 -2
- package/lib/tool-catalog-cache.js +229 -0
- package/lib/tools.js +75 -3
- package/lib/web.js +30 -3
- package/package.json +2 -2
- package/scripts/ui-harness.mjs +50 -0
- package/ui/index.html +175 -17
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,35 @@
|
|
|
4
4
|
|
|
5
5
|
## [Unreleased]
|
|
6
6
|
|
|
7
|
+
## [0.2.44] - 2026-09-12
|
|
8
|
+
|
|
9
|
+
### Added
|
|
10
|
+
|
|
11
|
+
- 启动恢复及连接成功后后台发现工具,无需先打开详情;后台最多并行发现两个连接器,同一连接的并发 HTTP 发现合并。
|
|
12
|
+
- 手动、JSON 导入和目录连接统一支持工具列表、搜索与详情,可按 connectionKey 精确定位;已安装页增加工具入口。
|
|
13
|
+
- SSE 订阅期间每 30 秒重新发现以恢复断线状态;详情读取只读快照、重连后补同步,不形成事件刷新循环。
|
|
14
|
+
|
|
15
|
+
### Fixed
|
|
16
|
+
|
|
17
|
+
- 页面与 API 使用一致的搜索评分,精确工具名优先;后台发现中、读取失败与成功空列表分别展示。
|
|
18
|
+
- Schema 清理区分参数名称与关键字,保留名为 default、const、examples 的合法参数;敏感默认值及示例仍不缓存。
|
|
19
|
+
- 连接配置变更后失效旧缓存,忽略断开或重配期间返回的过期发现结果;查询继续遵守工作区可见范围。
|
|
20
|
+
|
|
21
|
+
本次不新增目标工具执行、跨连接器搜索页面或凭据分享能力。
|
|
22
|
+
|
|
23
|
+
## [0.2.43] - 2026-09-12
|
|
24
|
+
|
|
25
|
+
### Added
|
|
26
|
+
|
|
27
|
+
- 新增同源实时状态 SSE:连接、目录、健康、工具目录、治理和作用域发生变化后,市场页面自动刷新,无需轮询。
|
|
28
|
+
- 新增“最后一次成功工具缓存”:实时 `tools/list` 或 Host 工具观测失败时仍可查看上次成功发现的工具,并明确标注缓存时间与超过 24 小时的陈旧状态。
|
|
29
|
+
- 新增 `mcp_connector_tool_search` 与 `mcp_connector_tool_detail` 渐进式发现工具;支持按名称、标题和描述搜索,并按需读取安全裁剪后的输入参数 schema,不执行目标 MCP 工具。
|
|
30
|
+
|
|
31
|
+
### Security
|
|
32
|
+
|
|
33
|
+
- SSE 事件仅包含通用类别、递增序号与时间;不会发送连接标识、端点、错误、参数、结果或凭据。
|
|
34
|
+
- 工具缓存按连接配置签名隔离并设置工具数、描述、schema 与总容量上限;剔除 schema 默认值和示例,断开、改配或快照恢复后清理旧缓存。
|
|
35
|
+
|
|
7
36
|
## [0.2.42] - 2026-09-11
|
|
8
37
|
|
|
9
38
|
### Fixed
|
package/README.en.md
CHANGED
|
@@ -54,7 +54,9 @@ If the plugin helps you connect an MCP server faster, consider [starring the rep
|
|
|
54
54
|
- OAuth 2.0 Authorization Code with PKCE, including DCR public clients and `client_secret_post` / `client_secret_basic`; API key/Bearer/unauthenticated HTTP configuration, stdio local-process configuration, and `mcpServers` JSON import.
|
|
55
55
|
- Installation from a credential-free connector descriptor URL.
|
|
56
56
|
- Credential and MCP initialize validation before HTTP API-key connectors are saved as installed, plus declarative multi-field credential-to-env bindings for marketplace stdio connectors.
|
|
57
|
-
- Dynamic tool discovery grouped by MCP server, including descriptions, search, batched rendering, and an independent scroll region.
|
|
57
|
+
- Dynamic tool discovery grouped by MCP server, including descriptions, search, parameter details, batched rendering, and an independent scroll region. When live discovery fails, the UI shows the last successful tool cache with observation-time and stale markers.
|
|
58
|
+
- Same-origin SSE updates the UI after connection, catalog, health, tool, governance, or scope changes. Event payloads contain no connection identifiers, endpoints, errors, or credentials.
|
|
59
|
+
- Progressive `mcp_connector_tool_search` and `mcp_connector_tool_detail` tools search last-success metadata and reveal a bounded, sanitized input schema on demand without executing the target MCP tool.
|
|
58
60
|
- Curated prompt templates that can open a DSH conversation and prefill its draft; missing variables are requested before the prompt is sent.
|
|
59
61
|
- Persistent connection lifecycle management: restore on restart, enable/disable, disconnect, retry transient OAuth refresh failures with bounded backoff, and revoke authorization. Cards declaring issuer-level sharing reuse one grant; a cross-process lock and per-grant atomic journal prevent Desktop and Web hosts from consuming or overwriting the same rotating refresh token.
|
|
60
62
|
- In-place configuration editing for custom and JSON-imported connections: edit normalized JSON from Installed and reconnect without deleting the connection. Existing sensitive values use local keep markers, and validation, startup, or persistence failures leave the previous connection usable.
|
|
@@ -176,7 +178,7 @@ npm run dev:ui
|
|
|
176
178
|
|
|
177
179
|
Every Registry merge regenerates `catalog-stats.json`; an hourly workflow in this repository synchronizes the Chinese and English product copy plus a local stats snapshot. The static npm README updates with package releases, while the live badges above read the Registry directly and therefore stay current without another npm release.
|
|
178
180
|
|
|
179
|
-
The current public version is [`dsh-mcp-connector@0.2.
|
|
181
|
+
The current public version is [`dsh-mcp-connector@0.2.44`](https://www.npmjs.com/package/dsh-mcp-connector), with [GitHub Release v0.2.44](https://github.com/duhu2000/dsh-mcp-connector/releases/tag/v0.2.44).
|
|
180
182
|
|
|
181
183
|
See [CHANGELOG.md](CHANGELOG.md) for version history and [docs/DESKTOP-E2E.md](docs/DESKTOP-E2E.md) for the Desktop release checklist.
|
|
182
184
|
|
package/README.md
CHANGED
|
@@ -52,7 +52,8 @@ dsh plugin --profile web add dsh-mcp-connector
|
|
|
52
52
|
- 侧边栏入口可按当前 profile 隐藏;隐藏后仍可从“设置 → 插件 → 插件配置 → MCP连接器”临时打开现有连接器弹框,用完即关。
|
|
53
53
|
- 图形化市场:默认“全部”按推荐与 9 类业务分类分章节展示,每章先展示 4 张并可展开;分类栏固定可见,单分类页展示全部卡片。
|
|
54
54
|
- 图形化添加:手动 HTTP/stdio、`mcpServers` JSON、连接器描述 URL 三种入口,失败时保留表单并给出修复建议。
|
|
55
|
-
- 连接器详情:精选 Prompt 优先展示,点击可带入 DSH 新会话;工具按 Server
|
|
55
|
+
- 连接器详情:精选 Prompt 优先展示,点击可带入 DSH 新会话;工具按 Server 分组,支持描述、搜索、参数详情和独立滚动。实时发现失败时显示带时间/陈旧标记的最后成功工具缓存。
|
|
56
|
+
- 实时状态:页面通过同源 SSE 接收连接、目录、健康、工具、治理和作用域变化通知并自动刷新;事件不携带连接标识、端点、错误或凭据。
|
|
56
57
|
- Prompt 模板:使用 `{{company}}` 等变量,发送前填写真实查询主体。
|
|
57
58
|
- 三种接入:OAuth 2.0 PKCE、自定义 HTTP/stdio、导入 `mcpServers` JSON;也支持从连接器描述 URL 安装。OAuth 动态注册兼容公共客户端以及 `client_secret_post` / `client_secret_basic` 机密客户端。
|
|
58
59
|
- 市场 Bearer/API Key 连接器先执行 MCP initialize 连通性与凭据校验,全部 HTTP Server 通过后才持久化凭据并进入“已安装”;stdio 卡片可声明多个本机凭据字段及其环境变量映射。
|
|
@@ -67,7 +68,7 @@ dsh plugin --profile web add dsh-mcp-connector
|
|
|
67
68
|
- 插件版本与一键更新:版本发现独立于安装来源;页面通过 Update Provider 适配层探测安全更新能力。DSH Market API v1 是首个适配器,支持进度、稳定失败码、回滚及按宿主能力提供的重启/刷新操作;无可用 Provider 时回退到当前插件市场或 npm。
|
|
68
69
|
- Registry 工具链:Schema/唯一性/密钥审计、MCP/OAuth 无凭据探针、每周健康巡检。
|
|
69
70
|
- 平滑迁移:显式扫描并复制两个旧企查查 OAuth 插件授权;检测到旧插件仍启用并管理同名 Server 时阻断重复连接,避免凭据相互覆盖。
|
|
70
|
-
- 对话工具:`mcp_connector_catalog`、`connect`、`configure`、`import_json`、`export_config`、`snapshot`、`install_from_url`、`status`、`scope`、`health_check`、`policy`、`set_enabled`、`disconnect`、`refresh_catalog`、`publish`、`tools_list
|
|
71
|
+
- 对话工具:`mcp_connector_catalog`、`connect`、`configure`、`import_json`、`export_config`、`snapshot`、`install_from_url`、`status`、`scope`、`health_check`、`policy`、`set_enabled`、`disconnect`、`refresh_catalog`、`publish`、`tools_list`、`tool_search`、`tool_detail`。搜索/详情只做渐进式能力发现,不执行目标 MCP 工具。
|
|
71
72
|
|
|
72
73
|
<!-- catalog-stats:start -->
|
|
73
74
|
截至 2026-09-11,公共 Registry 已发布 106 条连接器描述;与随包的 4 张企查查卡片合并去重后,市场页可浏览 110 张卡片,覆盖企业数据、金融投资、法律合规、开发工具、办公协作、调研分析、设计创意、效率工具、其他 9 类。推荐位严格保留 4 张企查查卡片、北大法宝和 Wind,共 6 张;其他连接器按业务分类展示。Registry 可独立持续更新,实际数量以客户端刷新后的市场页签徽标和上方实时统计徽标为准。
|
|
@@ -172,7 +173,7 @@ npm run dev:ui
|
|
|
172
173
|
|
|
173
174
|
公共 Registry 每次合并后会生成 `catalog-stats.json`;本仓库的定时工作流每小时同步中英文介绍和统计快照。npm 页面中的静态正文随版本发布更新,上方动态统计徽标则直接读取 Registry,可在不发布新 npm 版本时保持实时数量一致。
|
|
174
175
|
|
|
175
|
-
当前公开版本为 [`dsh-mcp-connector@0.2.
|
|
176
|
+
当前公开版本为 [`dsh-mcp-connector@0.2.44`](https://www.npmjs.com/package/dsh-mcp-connector),对应 [GitHub Release v0.2.44](https://github.com/duhu2000/dsh-mcp-connector/releases/tag/v0.2.44)。
|
|
176
177
|
|
|
177
178
|
版本能力与变更记录见 [CHANGELOG.md](CHANGELOG.md)。
|
|
178
179
|
Desktop 发版回归见 [docs/DESKTOP-E2E.md](docs/DESKTOP-E2E.md)。
|
package/docs/USER-GUIDE.md
CHANGED
|
@@ -99,10 +99,12 @@ OAuth 一键连接要求服务商支持标准 OAuth 2.1/PKCE 和公开元数据
|
|
|
99
99
|
|
|
100
100
|
1. 阅读服务说明、鉴权方式、数据范围与可能产生的费用或副作用。
|
|
101
101
|
2. 在“试试这样用”中选择示例 Prompt;带变量的模板会先要求补齐查询主体等信息。
|
|
102
|
-
3. 展开“工具详情”查看 Server
|
|
102
|
+
3. 展开“工具详情”查看 Server 数量、工具名称与描述,并可搜索工具;点击“参数详情”可按需查看输入 schema;连接后还可按 Connection、Server、Tool 设置治理规则。
|
|
103
103
|
4. 点击“去试试”或 Prompt 的发送按钮,在当前工作区创建或复用空白会话并写入草稿。
|
|
104
104
|
|
|
105
|
-
连接成功后,工具按 `mcp__<serverName>__*`
|
|
105
|
+
连接成功后,工具按 `mcp__<serverName>__*` 前缀提供给模型。工具清单来自服务端,实际数量会随服务商权限和版本变化。成功发现后,插件会在当前 profile 保存一份安全裁剪的工具元数据;实时发现失败时仍显示这份“最后成功缓存”,但保持连接失败/未知状态并标注缓存时间,超过 24 小时还会显示陈旧提示。详情与“已安装”列表会展示最近一次诊断的阶段、稳定错误码、说明、建议动作和最近成功时间。
|
|
106
|
+
|
|
107
|
+
对话中可用 `mcp_connector_tool_search` 按名称、标题或描述搜索缓存,再用 `mcp_connector_tool_detail` 精确读取某个工具的参数 schema。两者只用于发现,不代理或执行 MCP 调用。
|
|
106
108
|
|
|
107
109
|
## 6. 添加自定义连接
|
|
108
110
|
|
|
@@ -233,6 +235,8 @@ OAuth 断开时,插件会尽力调用服务商的撤销端点;无撤销端
|
|
|
233
235
|
|
|
234
236
|
- 健康摘要和最近成功时间目前只保留在插件进程内;重启后先显示“状态未知”,直至重新检查。
|
|
235
237
|
- HTTP 工具清单使用只读 MCP `tools/list` 发现;stdio 工具清单读取 Host 已注册工具。Host 不提供可观测状态时只能报告未知。
|
|
238
|
+
- 最后成功工具缓存只保存名称、标题、描述和安全裁剪后的输入 schema,不保存调用参数、调用结果、原始错误或凭据;断开、修改连接配置或恢复快照会清理相关缓存。
|
|
239
|
+
- 页面实时状态使用同源 SSE,事件只发送变化类别、序号和时间;断线时浏览器按 EventSource 规则自动重连,页面重新可见时主动刷新一次。
|
|
236
240
|
- 连接凭据、快照、治理规则和作用域历史都存储在当前 profile;project/global 不跨 profile 同步。
|
|
237
241
|
- Workspace 被删除后,原 project-only 绑定保持 fail closed,需手动移动到当前项目或全局。
|
|
238
242
|
- 连接级停用可逆;断开会删除本机连接,并在授权不再共享时尽力撤销 OAuth。非 OAuth 配置可用断开前快照恢复;已撤销的 OAuth 必须重新授权。
|