dsh-mcp-connector 0.2.56 → 0.2.57
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 +6 -0
- package/README.en.md +1 -1
- package/README.md +1 -1
- package/lib/client.js +34 -9
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
package/README.en.md
CHANGED
|
@@ -190,7 +190,7 @@ npm run dev:ui
|
|
|
190
190
|
|
|
191
191
|
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.
|
|
192
192
|
|
|
193
|
-
The current public version is [`dsh-mcp-connector@0.2.
|
|
193
|
+
The current public version is [`dsh-mcp-connector@0.2.57`](https://www.npmjs.com/package/dsh-mcp-connector), with [GitHub Release v0.2.57](https://github.com/duhu2000/dsh-mcp-connector/releases/tag/v0.2.57).
|
|
194
194
|
|
|
195
195
|
See [CHANGELOG.md](CHANGELOG.md) for version history and [docs/DESKTOP-E2E.md](docs/DESKTOP-E2E.md) for the Desktop release checklist.
|
|
196
196
|
|
package/README.md
CHANGED
|
@@ -185,7 +185,7 @@ npm run dev:ui
|
|
|
185
185
|
|
|
186
186
|
公共 Registry 每次合并后会生成 `catalog-stats.json`;本仓库的定时工作流每小时同步中英文介绍和统计快照。npm 页面中的静态正文随版本发布更新,上方动态统计徽标则直接读取 Registry,可在不发布新 npm 版本时保持实时数量一致。
|
|
187
187
|
|
|
188
|
-
当前公开版本为 [`dsh-mcp-connector@0.2.
|
|
188
|
+
当前公开版本为 [`dsh-mcp-connector@0.2.57`](https://www.npmjs.com/package/dsh-mcp-connector),对应 [GitHub Release v0.2.57](https://github.com/duhu2000/dsh-mcp-connector/releases/tag/v0.2.57)。
|
|
189
189
|
|
|
190
190
|
版本能力与变更记录见 [CHANGELOG.md](CHANGELOG.md)。
|
|
191
191
|
Desktop 发版回归见 [docs/DESKTOP-E2E.md](docs/DESKTOP-E2E.md)。
|
package/lib/client.js
CHANGED
|
@@ -448,11 +448,11 @@ window.__ModuleLoader__.load({
|
|
|
448
448
|
return mount;
|
|
449
449
|
}
|
|
450
450
|
|
|
451
|
-
async function fetchVersionStatus() {
|
|
451
|
+
async function fetchVersionStatus(force = false) {
|
|
452
452
|
const response = await window.fetch("/mcp-connector/api", {
|
|
453
453
|
method: "POST",
|
|
454
454
|
headers: { "content-type": "application/json" },
|
|
455
|
-
body: JSON.stringify({ method: "versionStatus", params: {} })
|
|
455
|
+
body: JSON.stringify({ method: "versionStatus", params: { force } })
|
|
456
456
|
});
|
|
457
457
|
const result = await response.json();
|
|
458
458
|
if (!response.ok || result.ok !== true || result.detail === void 0) {
|
|
@@ -1069,6 +1069,9 @@ window.__ModuleLoader__.load({
|
|
|
1069
1069
|
const [rollbackRunning, setRollbackRunning] = (0, react.useState)(false);
|
|
1070
1070
|
const [restarting, setRestarting] = (0, react.useState)(false);
|
|
1071
1071
|
const [manualCommandCopied, setManualCommandCopied] = (0, react.useState)(false);
|
|
1072
|
+
const [versionCheckRequest, setVersionCheckRequest] = (0, react.useState)(0);
|
|
1073
|
+
const [versionCheckBusy, setVersionCheckBusy] = (0, react.useState)(false);
|
|
1074
|
+
const [versionCheckFailed, setVersionCheckFailed] = (0, react.useState)(false);
|
|
1072
1075
|
const frameRef = (0, react.useRef)(null);
|
|
1073
1076
|
const closeRef = (0, react.useRef)(null);
|
|
1074
1077
|
(0, react.useEffect)(() => {
|
|
@@ -1125,10 +1128,13 @@ window.__ModuleLoader__.load({
|
|
|
1125
1128
|
window.clearTimeout(pollTimer);
|
|
1126
1129
|
pollTimer = window.setTimeout(check, Math.max(1e3, delayMs));
|
|
1127
1130
|
};
|
|
1128
|
-
const check = () => {
|
|
1129
|
-
|
|
1131
|
+
const check = (force = false) => {
|
|
1132
|
+
setVersionCheckBusy(true);
|
|
1133
|
+
fetchVersionStatus(force).then((status) => {
|
|
1130
1134
|
if (disposed) return;
|
|
1131
1135
|
setVersionStatus(status);
|
|
1136
|
+
setVersionCheckBusy(status.checking === true);
|
|
1137
|
+
setVersionCheckFailed(!status.checking && status.sources?.npm?.ok !== true);
|
|
1132
1138
|
if (status.checking) {
|
|
1133
1139
|
schedule(1e3);
|
|
1134
1140
|
return;
|
|
@@ -1140,15 +1146,19 @@ window.__ModuleLoader__.load({
|
|
|
1140
1146
|
schedule(delay);
|
|
1141
1147
|
}, (error) => {
|
|
1142
1148
|
console.warn("[mcp-connector] plugin update check failed:", error);
|
|
1143
|
-
if (!disposed)
|
|
1149
|
+
if (!disposed) {
|
|
1150
|
+
setVersionCheckBusy(false);
|
|
1151
|
+
setVersionCheckFailed(true);
|
|
1152
|
+
schedule(VERSION_CHECK_RETRY_MS);
|
|
1153
|
+
}
|
|
1144
1154
|
});
|
|
1145
1155
|
};
|
|
1146
|
-
check();
|
|
1156
|
+
check(true);
|
|
1147
1157
|
return () => {
|
|
1148
1158
|
disposed = true;
|
|
1149
1159
|
window.clearTimeout(pollTimer);
|
|
1150
1160
|
};
|
|
1151
|
-
}, [open]);
|
|
1161
|
+
}, [open, versionCheckRequest]);
|
|
1152
1162
|
(0, react.useEffect)(() => {
|
|
1153
1163
|
if (open) setManualCommandCopied(false);
|
|
1154
1164
|
}, [open, versionStatus?.latestVersion]);
|
|
@@ -1175,7 +1185,7 @@ window.__ModuleLoader__.load({
|
|
|
1175
1185
|
setUpdateProviderState("unavailable");
|
|
1176
1186
|
});
|
|
1177
1187
|
return () => { disposed = true; };
|
|
1178
|
-
}, [open]);
|
|
1188
|
+
}, [open, versionCheckRequest]);
|
|
1179
1189
|
(0, react.useEffect)(() => {
|
|
1180
1190
|
const operationId = updateOperation?.operationId;
|
|
1181
1191
|
const provider = updateProviderSelection?.provider;
|
|
@@ -1319,7 +1329,9 @@ window.__ModuleLoader__.load({
|
|
|
1319
1329
|
const activationPendingVersion = updateProviderState === "ready"
|
|
1320
1330
|
? pendingActivationVersion(versionStatus, providerUpdateCheck)
|
|
1321
1331
|
: null;
|
|
1322
|
-
if (!versionStatus?.updateAvailable
|
|
1332
|
+
if (!versionStatus?.updateAvailable
|
|
1333
|
+
&& !(updateProviderState === "ready" && providerUpdateCheck?.updateAvailable === true)
|
|
1334
|
+
&& activationPendingVersion === null
|
|
1323
1335
|
&& updateOperation === null && updateError === null) return null;
|
|
1324
1336
|
if (updateRunning) {
|
|
1325
1337
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
@@ -1573,6 +1585,19 @@ window.__ModuleLoader__.load({
|
|
|
1573
1585
|
children: versionStatus === null ? "v…" : `v${versionStatus.installedVersion}`
|
|
1574
1586
|
}),
|
|
1575
1587
|
renderUpdateControls(),
|
|
1588
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
|
|
1589
|
+
type: "button",
|
|
1590
|
+
className: "mcpConnectorUpdateButton",
|
|
1591
|
+
disabled: versionCheckBusy || updateRunning,
|
|
1592
|
+
title: versionStatus?.checkedAt ? `上次检查:${new Date(versionStatus.checkedAt).toLocaleString()}` : "尚未完成版本检查",
|
|
1593
|
+
onClick: () => setVersionCheckRequest((value) => value + 1),
|
|
1594
|
+
children: versionCheckBusy ? "正在检查更新…" : "检查更新"
|
|
1595
|
+
}),
|
|
1596
|
+
versionCheckFailed && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
1597
|
+
className: "mcpConnectorUpdateStatus",
|
|
1598
|
+
"data-tone": "error",
|
|
1599
|
+
children: "暂时无法确认 npm 最新版本,请重试"
|
|
1600
|
+
}),
|
|
1576
1601
|
versionStatus?.releasePending && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
1577
1602
|
className: "mcpConnectorVersion",
|
|
1578
1603
|
title: "GitHub Release 已发布,等待 npm 同步后即可更新",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-mcp-connector",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.57",
|
|
4
4
|
"description": "DeepSeek Harness MCP Connector: connect servers, search tools across active connections, and troubleshoot discovery. Includes a continuously updated catalog; supports OAuth 2.0 PKCE, API keys, Streamable HTTP/stdio, and mcpServers JSON import.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "lib/index.js",
|