@mcp-use/inspector 7.0.0-canary.13 → 7.0.0-canary.15
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/dist/cdn/inspector.js
CHANGED
|
@@ -26903,7 +26903,7 @@ var Ud = class {
|
|
|
26903
26903
|
//#region src/client/telemetry/utils.ts
|
|
26904
26904
|
function of() {
|
|
26905
26905
|
try {
|
|
26906
|
-
return "7.0.0-canary.
|
|
26906
|
+
return "7.0.0-canary.15";
|
|
26907
26907
|
} catch {
|
|
26908
26908
|
return "0.0.0";
|
|
26909
26909
|
}
|
|
@@ -48440,9 +48440,9 @@ var qA, JA, YA, XA, ZA, QA, $A, ej, tj, nj, rj, ij, aj, oj, Kce, qce, sj, cj, lj
|
|
|
48440
48440
|
}(), Oue);
|
|
48441
48441
|
}));
|
|
48442
48442
|
//#endregion
|
|
48443
|
-
//#region ../mcp-use/dist/chunk-
|
|
48443
|
+
//#region ../mcp-use/dist/chunk-7VQEKFXU.js
|
|
48444
48444
|
Yp();
|
|
48445
|
-
var Nue = "1.29.0-canary.
|
|
48445
|
+
var Nue = "1.29.0-canary.15";
|
|
48446
48446
|
function QF() {
|
|
48447
48447
|
return Nue;
|
|
48448
48448
|
}
|
|
@@ -58918,7 +58918,7 @@ function Tme({ id: e, options: t, defaultCallbackUrl: n, defaultProxyConfig: r,
|
|
|
58918
58918
|
approveElicitation: P,
|
|
58919
58919
|
rejectElicitation: F
|
|
58920
58920
|
}, r = ae.current, i = oe.current, a = i.tools !== re, o = i.resources !== ie, s = i.prompts !== R;
|
|
58921
|
-
!r || r.state !== n.state || r.error !== n.error || r.authUrl !== n.authUrl || a || o || s || r.serverInfo !== n.serverInfo || r.capabilities !== n.capabilities || r.notifications.length !== n.notifications.length || r.unreadNotificationCount !== n.unreadNotificationCount || r.pendingSamplingRequests.length !== n.pendingSamplingRequests.length || r.pendingElicitationRequests.length !== n.pendingElicitationRequests.length || !r.client ? (ae.current = n, oe.current = {
|
|
58921
|
+
!r || r.name !== n.name || r.state !== n.state || r.error !== n.error || r.authUrl !== n.authUrl || a || o || s || r.serverInfo !== n.serverInfo || r.capabilities !== n.capabilities || r.notifications.length !== n.notifications.length || r.unreadNotificationCount !== n.unreadNotificationCount || r.pendingSamplingRequests.length !== n.pendingSamplingRequests.length || r.pendingElicitationRequests.length !== n.pendingElicitationRequests.length || !r.client ? (ae.current = n, oe.current = {
|
|
58922
58922
|
tools: re,
|
|
58923
58923
|
resources: ie,
|
|
58924
58924
|
prompts: R
|
|
@@ -58950,19 +58950,23 @@ function Tme({ id: e, options: t, defaultCallbackUrl: n, defaultProxyConfig: r,
|
|
|
58950
58950
|
}
|
|
58951
58951
|
W(Tme, "McpServerWrapper");
|
|
58952
58952
|
function Eme({ children: e, mcpServers: t, defaultCallbackUrl: n, defaultProxyConfig: r, defaultAutoProxyFallback: i = !0, clientInfo: a, storageProvider: o, enableRpcLogging: s = !1, onServerAdded: c, onServerRemoved: l, onServerStateChange: u, onSamplingRequest: d, onElicitationRequest: f }) {
|
|
58953
|
-
let [p, m] = (0, A.useState)([]), [h, g] = (0, A.useState)([]), [_, v] = (0, A.useState)(!1), y = (0, A.useRef)(
|
|
58953
|
+
let [p, m] = (0, A.useState)([]), [h, g] = (0, A.useState)([]), [_, v] = (0, A.useState)(!1), y = (0, A.useRef)([]);
|
|
58954
|
+
(0, A.useEffect)(() => {
|
|
58955
|
+
y.current = h;
|
|
58956
|
+
}, [h]);
|
|
58957
|
+
let b = (0, A.useRef)({}), [x, S] = (0, A.useState)(void 0), [C, w] = (0, A.useState)(!1);
|
|
58954
58958
|
(0, A.useEffect)(() => {
|
|
58955
58959
|
if (!s || typeof window > "u") {
|
|
58956
|
-
|
|
58960
|
+
S(void 0), w(!0);
|
|
58957
58961
|
return;
|
|
58958
58962
|
}
|
|
58959
58963
|
Promise.resolve().then(() => (zpe(), Rpe)).then((e) => {
|
|
58960
|
-
sR.debug("[McpClientProvider] RPC logger loaded"),
|
|
58964
|
+
sR.debug("[McpClientProvider] RPC logger loaded"), S(() => e.wrapTransportForLogging), w(!0);
|
|
58961
58965
|
}).catch((e) => {
|
|
58962
|
-
sR.error("[McpClientProvider] Failed to load RPC logger:", e),
|
|
58966
|
+
sR.error("[McpClientProvider] Failed to load RPC logger:", e), S(void 0), w(!0);
|
|
58963
58967
|
});
|
|
58964
58968
|
}, [s]), (0, A.useEffect)(() => {
|
|
58965
|
-
if (!
|
|
58969
|
+
if (!C) {
|
|
58966
58970
|
sR.debug("[McpClientProvider] Waiting for RPC logging to be ready before loading servers");
|
|
58967
58971
|
return;
|
|
58968
58972
|
}
|
|
@@ -58982,7 +58986,7 @@ function Eme({ children: e, mcpServers: t, defaultCallbackUrl: n, defaultProxyCo
|
|
|
58982
58986
|
let e = await Promise.resolve(o.getServers());
|
|
58983
58987
|
if (sR.debug("[McpClientProvider] Loaded from storage:", Object.keys(e).length), o.getServerMetadata) try {
|
|
58984
58988
|
let t = Object.keys(e).map(async (e) => [e, await Promise.resolve(o.getServerMetadata(e))]), n = await Promise.all(t);
|
|
58985
|
-
|
|
58989
|
+
b.current = Object.fromEntries(n.filter((e) => e[1] !== void 0)), sR.debug("[McpClientProvider] Loaded cached metadata for", Object.keys(b.current).length, "servers");
|
|
58986
58990
|
} catch (e) {
|
|
58987
58991
|
sR.warn("[McpClientProvider] Failed to load cached metadata:", e);
|
|
58988
58992
|
}
|
|
@@ -59004,7 +59008,7 @@ function Eme({ children: e, mcpServers: t, defaultCallbackUrl: n, defaultProxyCo
|
|
|
59004
59008
|
}, [
|
|
59005
59009
|
o,
|
|
59006
59010
|
t,
|
|
59007
|
-
|
|
59011
|
+
C
|
|
59008
59012
|
]), (0, A.useEffect)(() => {
|
|
59009
59013
|
!o || !_ || (/* @__PURE__ */ W(async () => {
|
|
59010
59014
|
try {
|
|
@@ -59019,7 +59023,7 @@ function Eme({ children: e, mcpServers: t, defaultCallbackUrl: n, defaultProxyCo
|
|
|
59019
59023
|
o,
|
|
59020
59024
|
_
|
|
59021
59025
|
]);
|
|
59022
|
-
let
|
|
59026
|
+
let T = (0, A.useCallback)((e) => {
|
|
59023
59027
|
sR.debug(`[McpClientProvider] handleServerUpdate called for server ${e.id}`, {
|
|
59024
59028
|
toolCount: e.tools.length,
|
|
59025
59029
|
state: e.state
|
|
@@ -59044,7 +59048,7 @@ function Eme({ children: e, mcpServers: t, defaultCallbackUrl: n, defaultProxyCo
|
|
|
59044
59048
|
icons: e.serverInfo.icons,
|
|
59045
59049
|
icon: e.serverInfo.icon
|
|
59046
59050
|
};
|
|
59047
|
-
|
|
59051
|
+
b.current[e.id] = t, Promise.resolve(o.setServerMetadata(e.id, t)).catch((e) => {
|
|
59048
59052
|
sR.error("[McpClientProvider] Failed to save server metadata:", e);
|
|
59049
59053
|
});
|
|
59050
59054
|
}
|
|
@@ -59057,17 +59061,15 @@ function Eme({ children: e, mcpServers: t, defaultCallbackUrl: n, defaultProxyCo
|
|
|
59057
59061
|
c,
|
|
59058
59062
|
u,
|
|
59059
59063
|
o
|
|
59060
|
-
]),
|
|
59064
|
+
]), E = (0, A.useCallback)((e, t) => {
|
|
59061
59065
|
m((n) => n.find((t) => t.id === e) ? n : (sR.debug("[McpClientProvider] Adding new server to configs:", e), [...n, {
|
|
59062
59066
|
id: e,
|
|
59063
59067
|
options: t
|
|
59064
59068
|
}]));
|
|
59065
|
-
}, []),
|
|
59066
|
-
|
|
59067
|
-
|
|
59068
|
-
|
|
59069
|
-
}), m((t) => t.filter((t) => t.id !== e)), l?.(e);
|
|
59070
|
-
}, [l]), D = (0, A.useCallback)(async (e, t) => new Promise((n) => {
|
|
59069
|
+
}, []), D = (0, A.useCallback)((e) => {
|
|
59070
|
+
let t = y.current.find((t) => t.id === e);
|
|
59071
|
+
g((t) => t.filter((t) => t.id !== e)), m((t) => t.filter((t) => t.id !== e)), t?.disconnect && t.disconnect(), t?.clearStorage && t.clearStorage(), l?.(e);
|
|
59072
|
+
}, [l]), O = (0, A.useCallback)(async (e, t) => new Promise((n) => {
|
|
59071
59073
|
let r = p.find((t) => t.id === e);
|
|
59072
59074
|
if (!r) {
|
|
59073
59075
|
sR.warn(`[McpClientProvider] Cannot update server "${e}" - not found`), n();
|
|
@@ -59077,18 +59079,15 @@ function Eme({ children: e, mcpServers: t, defaultCallbackUrl: n, defaultProxyCo
|
|
|
59077
59079
|
...r.options,
|
|
59078
59080
|
...t,
|
|
59079
59081
|
_updateVersion: (r.options._updateVersion || 0) + 1
|
|
59080
|
-
};
|
|
59081
|
-
g((t) => {
|
|
59082
|
-
let n = t.find((t) => t.id === e);
|
|
59083
|
-
return n?.disconnect && n.disconnect(), n?.clearStorage && n.clearStorage(), t.filter((t) => t.id !== e);
|
|
59084
|
-
}), m((t) => {
|
|
59082
|
+
}, a = y.current.find((t) => t.id === e);
|
|
59083
|
+
g((t) => t.filter((t) => t.id !== e)), m((t) => {
|
|
59085
59084
|
let r = t.map((t) => t.id === e ? {
|
|
59086
59085
|
id: e,
|
|
59087
59086
|
options: i
|
|
59088
59087
|
} : t);
|
|
59089
59088
|
return setTimeout(() => n(), 0), r;
|
|
59090
|
-
});
|
|
59091
|
-
}), [p]),
|
|
59089
|
+
}), a?.disconnect && a.disconnect(), a?.clearStorage && a.clearStorage();
|
|
59090
|
+
}), [p]), k = (0, A.useCallback)(async (e, t) => new Promise((n) => {
|
|
59092
59091
|
let r = p.find((t) => t.id === e);
|
|
59093
59092
|
if (!r) {
|
|
59094
59093
|
sR.warn(`[McpClientProvider] Cannot update server metadata for "${e}" - not found`), n();
|
|
@@ -59108,46 +59107,46 @@ function Eme({ children: e, mcpServers: t, defaultCallbackUrl: n, defaultProxyCo
|
|
|
59108
59107
|
} : t);
|
|
59109
59108
|
return setTimeout(() => n(), 0), r;
|
|
59110
59109
|
});
|
|
59111
|
-
}), [p]),
|
|
59110
|
+
}), [p]), j = (0, A.useCallback)((e) => h.find((t) => t.id === e), [h]), M = (0, A.useMemo)(() => ({
|
|
59112
59111
|
servers: h,
|
|
59113
|
-
addServer:
|
|
59114
|
-
removeServer:
|
|
59115
|
-
updateServerMetadata:
|
|
59116
|
-
updateServer:
|
|
59117
|
-
getServer:
|
|
59112
|
+
addServer: E,
|
|
59113
|
+
removeServer: D,
|
|
59114
|
+
updateServerMetadata: k,
|
|
59115
|
+
updateServer: O,
|
|
59116
|
+
getServer: j,
|
|
59118
59117
|
storageLoaded: _
|
|
59119
59118
|
}), [
|
|
59120
59119
|
h,
|
|
59121
|
-
T,
|
|
59122
59120
|
E,
|
|
59123
|
-
O,
|
|
59124
59121
|
D,
|
|
59125
59122
|
k,
|
|
59123
|
+
O,
|
|
59124
|
+
j,
|
|
59126
59125
|
_
|
|
59127
|
-
]), { capabilities:
|
|
59126
|
+
]), { capabilities: N, ...P } = a || {}, F = (0, A.useMemo)(() => Object.keys(P).length ? P : void 0, [a]), I = (0, A.useMemo)(() => p.map((e) => ({
|
|
59128
59127
|
id: e.id,
|
|
59129
|
-
options:
|
|
59128
|
+
options: N ? {
|
|
59130
59129
|
...e.options,
|
|
59131
59130
|
clientOptions: {
|
|
59132
59131
|
...e.options.clientOptions,
|
|
59133
59132
|
capabilities: {
|
|
59134
|
-
...
|
|
59133
|
+
...N,
|
|
59135
59134
|
...e.options.clientOptions?.capabilities
|
|
59136
59135
|
}
|
|
59137
59136
|
}
|
|
59138
59137
|
} : e.options
|
|
59139
|
-
})), [p,
|
|
59140
|
-
return /* @__PURE__ */ A.createElement(Cme.Provider, { value:
|
|
59138
|
+
})), [p, N]);
|
|
59139
|
+
return /* @__PURE__ */ A.createElement(Cme.Provider, { value: M }, e, I.map((e) => /* @__PURE__ */ A.createElement(Tme, {
|
|
59141
59140
|
key: `${e.id}-v${e.options._updateVersion || 0}`,
|
|
59142
59141
|
id: e.id,
|
|
59143
59142
|
options: e.options,
|
|
59144
59143
|
defaultCallbackUrl: n,
|
|
59145
59144
|
defaultProxyConfig: r,
|
|
59146
59145
|
defaultAutoProxyFallback: i,
|
|
59147
|
-
clientInfo:
|
|
59148
|
-
cachedMetadata:
|
|
59149
|
-
onUpdate:
|
|
59150
|
-
rpcWrapTransport:
|
|
59146
|
+
clientInfo: F,
|
|
59147
|
+
cachedMetadata: b.current[e.id],
|
|
59148
|
+
onUpdate: T,
|
|
59149
|
+
rpcWrapTransport: x,
|
|
59151
59150
|
onGlobalSamplingRequest: d,
|
|
59152
59151
|
onGlobalElicitationRequest: f
|
|
59153
59152
|
})));
|