@mcp-use/inspector 2.2.0-canary.2 → 2.2.0-canary.3

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.
@@ -26923,7 +26923,7 @@ var Wd = class {
26923
26923
  //#region src/client/telemetry/utils.ts
26924
26924
  function of() {
26925
26925
  try {
26926
- return "2.2.0-canary.2";
26926
+ return "2.2.0-canary.3";
26927
26927
  } catch {
26928
26928
  return "0.0.0";
26929
26929
  }
@@ -51227,7 +51227,7 @@ var Ck, wk, Nme, Pme, Fme, Tk, Ek, Dk, Ok, kk, Ime, Ak, jk, Mk, Lme, Rme, zme, N
51227
51227
  }(), gve);
51228
51228
  }));
51229
51229
  //#endregion
51230
- //#region ../mcp-use/dist/chunk-KPIFWECU.js
51230
+ //#region ../mcp-use/dist/chunk-ALSNFJPV.js
51231
51231
  function DM() {
51232
51232
  return Ove;
51233
51233
  }
@@ -51352,7 +51352,7 @@ function Dve(e) {
51352
51352
  FM.getInstance().setSource(e);
51353
51353
  }
51354
51354
  var Ove, MM, kve, Ave, jve, Mve, Nve, Pve, Fve, Ive, Lve, Rve, zve, Bve, NM, PM, FM, IM, Vve, LM = o((() => {
51355
- Xp(), Gp(), Ppe(), xw(), Ove = "1.24.2-canary.2", U(DM, "getPackageVersion"), MM = class {
51355
+ Xp(), Gp(), Ppe(), xw(), Ove = "1.24.2-canary.3", U(DM, "getPackageVersion"), MM = class {
51356
51356
  static {
51357
51357
  U(this, "BaseTelemetryEvent");
51358
51358
  }
@@ -58249,7 +58249,7 @@ var DN, ON, kN, AN, jN, MN, NN, PN, FN, IN, LN, RN, zN, BN, VN, HN, UN, WN, GN,
58249
58249
  };
58250
58250
  }));
58251
58251
  //#endregion
58252
- //#region ../mcp-use/dist/chunk-VDUR5PXK.js
58252
+ //#region ../mcp-use/dist/chunk-DGU2TCSM.js
58253
58253
  function rP(e, t) {
58254
58254
  return {
58255
58255
  onSampling: e?.onSampling ?? e?.samplingCallback ?? t?.onSampling ?? t?.samplingCallback,
@@ -58678,7 +58678,7 @@ var Ixe, aP, oP, Lxe, sP = o((() => {
58678
58678
  };
58679
58679
  }));
58680
58680
  //#endregion
58681
- //#region ../mcp-use/dist/chunk-GEOH7R4G.js
58681
+ //#region ../mcp-use/dist/chunk-TI4LUN24.js
58682
58682
  function Rxe(e) {
58683
58683
  let t = Object.keys(e.mcpServers ?? {});
58684
58684
  FM.getInstance().trackMCPClientInit({
@@ -60803,21 +60803,21 @@ function MSe(e) {
60803
60803
  }, []), [t, n];
60804
60804
  }
60805
60805
  U(MSe, "useWidgetState");
60806
- var NSe = /* @__PURE__ */ U(({ children: e }) => {
60807
- let { theme: t, isAvailable: n } = SP(), [r, i] = (0, j.useState)(() => typeof window > "u" ? "light" : window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light");
60806
+ var NSe = /* @__PURE__ */ U(({ children: e, colorScheme: t = !1 }) => {
60807
+ let { theme: n, isAvailable: r } = SP(), [i, a] = (0, j.useState)(() => typeof window > "u" ? "light" : window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light");
60808
60808
  (0, j.useEffect)(() => {
60809
60809
  if (typeof window > "u") return;
60810
60810
  let e = window.matchMedia("(prefers-color-scheme: dark)"), t = /* @__PURE__ */ U((e) => {
60811
- i(e.matches ? "dark" : "light");
60811
+ a(e.matches ? "dark" : "light");
60812
60812
  }, "handleChange");
60813
60813
  return e.addEventListener("change", t), () => e.removeEventListener("change", t);
60814
60814
  }, []);
60815
- let a = n ? t : r;
60815
+ let o = r ? n : i;
60816
60816
  return (0, j.useLayoutEffect)(() => {
60817
60817
  if (typeof document > "u") return;
60818
60818
  let e = document.documentElement;
60819
- e.classList.remove("light", "dark"), e.classList.add(a === "dark" ? "dark" : "light"), e.setAttribute("data-theme", a === "dark" ? "dark" : "light"), e.style.colorScheme = a === "dark" ? "dark" : "light";
60820
- }, [a]), /* @__PURE__ */ j.createElement(j.Fragment, null, e);
60819
+ e.classList.remove("light", "dark"), e.classList.add(o === "dark" ? "dark" : "light"), e.setAttribute("data-theme", o === "dark" ? "dark" : "light"), t ? e.style.colorScheme = o === "dark" ? "dark" : "light" : e.style.colorScheme = "";
60820
+ }, [o, t]), /* @__PURE__ */ j.createElement(j.Fragment, null, e);
60821
60821
  }, "ThemeProvider");
60822
60822
  function PSe({ children: e, className: t = "", position: n = "top-right", attachTo: r, showLabels: i = !0, debugger: a = !1, viewControls: o = !1 }) {
60823
60823
  let { props: s, output: c, metadata: l, state: u, theme: d, displayMode: f, safeArea: p, maxHeight: m, userAgent: h, locale: g, isAvailable: _, callTool: v, sendFollowUpMessage: y, openExternal: b, requestDisplayMode: x, setState: S } = SP(), [C, w] = (0, j.useState)(!1), [T, E] = (0, j.useState)(!1), D = (0, j.useRef)(null), O = (0, j.useRef)(null), [k, A] = (0, j.useState)([]), [M, N] = (0, j.useState)(""), [P, F] = (0, j.useState)("get-my-city"), [I, L] = (0, j.useState)("{}"), [ee, te] = (0, j.useState)("Test follow-up message"), [ne, re] = (0, j.useState)("https://mcp-use.com/docs"), ie = f === "fullscreen" && _, ae = f === "pip" && _, oe = typeof window < "u" && window.location.pathname.includes("/inspector/api/");
@@ -61191,34 +61191,34 @@ function PSe({ children: e, className: t = "", position: n = "top-right", attach
61191
61191
  }
61192
61192
  U(PSe, "WidgetControls");
61193
61193
  var FSe = 150, ISe = 5;
61194
- function LSe({ children: e, debugger: t = !1, viewControls: n = !1, autoSize: r = !0 }) {
61195
- let [i, a] = (0, j.useState)(null), o = (0, j.useRef)(0), s = (0, j.useRef)(null), c = (0, j.useRef)(!1), l = (0, j.useCallback)((e) => {
61194
+ function LSe({ children: e, debugger: t = !1, viewControls: n = !1, autoSize: r = !0, colorScheme: i = !1 }) {
61195
+ let [a, o] = (0, j.useState)(null), s = (0, j.useRef)(0), c = (0, j.useRef)(null), l = (0, j.useRef)(!1), u = (0, j.useCallback)((e) => {
61196
61196
  if (!(typeof window > "u")) {
61197
- if (c.current = !0, window.openai?.notifyIntrinsicHeight) {
61197
+ if (l.current = !0, window.openai?.notifyIntrinsicHeight) {
61198
61198
  window.openai.notifyIntrinsicHeight(e).then(() => {
61199
- c.current = !1;
61199
+ l.current = !1;
61200
61200
  }).catch((e) => {
61201
- c.current = !1, console.error("[McpUseProvider] Failed to notify intrinsic height (ChatGPT):", e);
61201
+ l.current = !1, console.error("[McpUseProvider] Failed to notify intrinsic height (ChatGPT):", e);
61202
61202
  });
61203
61203
  return;
61204
61204
  }
61205
61205
  try {
61206
- vP().sendSizeChanged({ height: e }), console.log("[McpUseProvider] Sent size-changed notification:", e), c.current = !1;
61206
+ vP().sendSizeChanged({ height: e }), console.log("[McpUseProvider] Sent size-changed notification:", e), l.current = !1;
61207
61207
  } catch (e) {
61208
- c.current = !1, console.error("[McpUseProvider] Failed to notify size change (MCP Apps):", e);
61208
+ l.current = !1, console.error("[McpUseProvider] Failed to notify size change (MCP Apps):", e);
61209
61209
  }
61210
61210
  }
61211
- }, []), u = (0, j.useCallback)((e) => {
61212
- s.current && clearTimeout(s.current), s.current = setTimeout(() => {
61213
- Math.abs(e - o.current) >= ISe && e > 0 && (o.current = e, l(e));
61211
+ }, []), d = (0, j.useCallback)((e) => {
61212
+ c.current && clearTimeout(c.current), c.current = setTimeout(() => {
61213
+ Math.abs(e - s.current) >= ISe && e > 0 && (s.current = e, u(e));
61214
61214
  }, FSe);
61215
- }, [l]);
61215
+ }, [u]);
61216
61216
  (0, j.useEffect)(() => {
61217
61217
  if (!r) {
61218
61218
  console.log("[McpUseProvider] autoSize is disabled");
61219
61219
  return;
61220
61220
  }
61221
- if (!i) {
61221
+ if (!a) {
61222
61222
  console.log("[McpUseProvider] No container element found for autoSize");
61223
61223
  return;
61224
61224
  }
@@ -61228,7 +61228,7 @@ function LSe({ children: e, debugger: t = !1, viewControls: n = !1, autoSize: r
61228
61228
  }
61229
61229
  console.log("[McpUseProvider] Setting up ResizeObserver for autoSize");
61230
61230
  let e = new ResizeObserver((e) => {
61231
- if (c.current) {
61231
+ if (l.current) {
61232
61232
  console.log("[McpUseProvider] Skipping resize - notification in progress");
61233
61233
  return;
61234
61234
  }
@@ -61238,30 +61238,30 @@ function LSe({ children: e, debugger: t = !1, viewControls: n = !1, autoSize: r
61238
61238
  height: e,
61239
61239
  scrollHeight: n,
61240
61240
  intrinsicHeight: r
61241
- }), u(r);
61241
+ }), d(r);
61242
61242
  }
61243
61243
  });
61244
- e.observe(i);
61245
- let t = Math.max(i.offsetHeight, i.scrollHeight);
61246
- return console.log("[McpUseProvider] Initial height measurement:", t), t > 0 && u(t), () => {
61247
- console.log("[McpUseProvider] Cleaning up ResizeObserver"), e.disconnect(), s.current &&= (clearTimeout(s.current), null), c.current = !1;
61244
+ e.observe(a);
61245
+ let t = Math.max(a.offsetHeight, a.scrollHeight);
61246
+ return console.log("[McpUseProvider] Initial height measurement:", t), t > 0 && d(t), () => {
61247
+ console.log("[McpUseProvider] Cleaning up ResizeObserver"), e.disconnect(), c.current &&= (clearTimeout(c.current), null), l.current = !1;
61248
61248
  };
61249
61249
  }, [
61250
61250
  r,
61251
- i,
61252
- u
61251
+ a,
61252
+ d
61253
61253
  ]);
61254
- let d = e;
61255
- return d = /* @__PURE__ */ j.createElement(wSe, null, d), (t || n) && (d = /* @__PURE__ */ j.createElement(PSe, {
61254
+ let f = e;
61255
+ return f = /* @__PURE__ */ j.createElement(wSe, null, f), (t || n) && (f = /* @__PURE__ */ j.createElement(PSe, {
61256
61256
  debugger: t,
61257
61257
  viewControls: n
61258
- }, d)), d = /* @__PURE__ */ j.createElement(NSe, null, d), r && (d = /* @__PURE__ */ j.createElement("div", {
61259
- ref: a,
61258
+ }, f)), f = /* @__PURE__ */ j.createElement(NSe, { colorScheme: i }, f), r && (f = /* @__PURE__ */ j.createElement("div", {
61259
+ ref: o,
61260
61260
  style: {
61261
61261
  width: "100%",
61262
61262
  minHeight: 0
61263
61263
  }
61264
- }, d)), /* @__PURE__ */ j.createElement(j.StrictMode, null, d);
61264
+ }, f)), /* @__PURE__ */ j.createElement(j.StrictMode, null, f);
61265
61265
  }
61266
61266
  U(LSe, "McpUseProvider");
61267
61267
  function RSe() {
@@ -5177,7 +5177,7 @@ var init_module = __esm({
5177
5177
  }
5178
5178
  });
5179
5179
 
5180
- // ../mcp-use/dist/chunk-KPIFWECU.js
5180
+ // ../mcp-use/dist/chunk-ALSNFJPV.js
5181
5181
  import { RESOURCE_MIME_TYPE } from "@modelcontextprotocol/ext-apps";
5182
5182
  import {
5183
5183
  CreateMessageRequestSchema,
@@ -5345,12 +5345,12 @@ function setTelemetrySource(source) {
5345
5345
  Tel.getInstance().setSource(source);
5346
5346
  }
5347
5347
  var VERSION, _a3, BaseTelemetryEvent, _a4, MCPAgentExecutionEvent, _a5, ServerRunEvent, _a6, ServerInitializeEvent, _a7, ServerToolCallEvent, _a8, ServerResourceCallEvent, _a9, ServerPromptCallEvent, _a10, ServerContextEvent, _a11, MCPClientInitEvent, _a12, ConnectorInitEvent, _a13, ClientAddServerEvent, _a14, ClientRemoveServerEvent, USER_ID_STORAGE_KEY, cachedEnvironment, _a15, Telemetry2, Tel, _a16, BaseConnector, _a17, ConnectionManager;
5348
- var init_chunk_KPIFWECU = __esm({
5349
- "../mcp-use/dist/chunk-KPIFWECU.js"() {
5348
+ var init_chunk_ALSNFJPV = __esm({
5349
+ "../mcp-use/dist/chunk-ALSNFJPV.js"() {
5350
5350
  "use strict";
5351
5351
  init_chunk_QWQYAQCK();
5352
5352
  init_chunk_3GQAWCBQ();
5353
- VERSION = "1.24.2-canary.2";
5353
+ VERSION = "1.24.2-canary.3";
5354
5354
  __name(getPackageVersion2, "getPackageVersion");
5355
5355
  BaseTelemetryEvent = (_a3 = class {
5356
5356
  }, __name(_a3, "BaseTelemetryEvent"), _a3);
@@ -6620,7 +6620,7 @@ var init_chunk_KPIFWECU = __esm({
6620
6620
  }
6621
6621
  });
6622
6622
 
6623
- // ../mcp-use/dist/chunk-VDUR5PXK.js
6623
+ // ../mcp-use/dist/chunk-DGU2TCSM.js
6624
6624
  import {
6625
6625
  Client
6626
6626
  } from "@modelcontextprotocol/sdk/client/index.js";
@@ -6685,10 +6685,10 @@ function createConnectorFromConfig(serverConfig, connectorOptions) {
6685
6685
  throw new Error("Cannot determine connector type from config");
6686
6686
  }
6687
6687
  var _a18, SseConnectionManager, _a19, HttpConnector, _a20, MCPSession, _a21, BaseMCPClient;
6688
- var init_chunk_VDUR5PXK = __esm({
6689
- "../mcp-use/dist/chunk-VDUR5PXK.js"() {
6688
+ var init_chunk_DGU2TCSM = __esm({
6689
+ "../mcp-use/dist/chunk-DGU2TCSM.js"() {
6690
6690
  "use strict";
6691
- init_chunk_KPIFWECU();
6691
+ init_chunk_ALSNFJPV();
6692
6692
  init_chunk_QWQYAQCK();
6693
6693
  init_chunk_3GQAWCBQ();
6694
6694
  SseConnectionManager = (_a18 = class extends ConnectionManager {
@@ -7947,7 +7947,7 @@ var init_chunk_VDUR5PXK = __esm({
7947
7947
  }
7948
7948
  });
7949
7949
 
7950
- // ../mcp-use/dist/chunk-GEOH7R4G.js
7950
+ // ../mcp-use/dist/chunk-TI4LUN24.js
7951
7951
  import {
7952
7952
  discoverOAuthProtectedResourceMetadata,
7953
7953
  discoverAuthorizationServerMetadata,
@@ -8257,11 +8257,11 @@ async function onMcpAuthorization() {
8257
8257
  }
8258
8258
  }
8259
8259
  var _a22, BrowserMCPClient, _a23, BrowserOAuthClientProvider;
8260
- var init_chunk_GEOH7R4G = __esm({
8261
- "../mcp-use/dist/chunk-GEOH7R4G.js"() {
8260
+ var init_chunk_TI4LUN24 = __esm({
8261
+ "../mcp-use/dist/chunk-TI4LUN24.js"() {
8262
8262
  "use strict";
8263
- init_chunk_VDUR5PXK();
8264
- init_chunk_KPIFWECU();
8263
+ init_chunk_DGU2TCSM();
8264
+ init_chunk_ALSNFJPV();
8265
8265
  init_chunk_QWQYAQCK();
8266
8266
  init_chunk_3GQAWCBQ();
8267
8267
  __name(trackBrowserClientInit, "trackBrowserClientInit");
@@ -27978,18 +27978,18 @@ var init_stdio_transport = __esm({
27978
27978
  }
27979
27979
  });
27980
27980
 
27981
- // ../mcp-use/dist/stdio-CWIMXSHX.js
27982
- var stdio_CWIMXSHX_exports = {};
27983
- __export(stdio_CWIMXSHX_exports, {
27981
+ // ../mcp-use/dist/stdio-C7QPX3Z5.js
27982
+ var stdio_C7QPX3Z5_exports = {};
27983
+ __export(stdio_C7QPX3Z5_exports, {
27984
27984
  StdioConnector: () => StdioConnector
27985
27985
  });
27986
27986
  import { Client as Client2 } from "@modelcontextprotocol/sdk/client/index.js";
27987
27987
  import process2 from "process";
27988
27988
  var _a38, StdioConnectionManager, _a39, StdioConnector;
27989
- var init_stdio_CWIMXSHX = __esm({
27990
- "../mcp-use/dist/stdio-CWIMXSHX.js"() {
27989
+ var init_stdio_C7QPX3Z5 = __esm({
27990
+ "../mcp-use/dist/stdio-C7QPX3Z5.js"() {
27991
27991
  "use strict";
27992
- init_chunk_KPIFWECU();
27992
+ init_chunk_ALSNFJPV();
27993
27993
  init_chunk_QWQYAQCK();
27994
27994
  init_chunk_3GQAWCBQ();
27995
27995
  init_stdio_transport();
@@ -28133,9 +28133,9 @@ var init_stdio_CWIMXSHX = __esm({
28133
28133
  }
28134
28134
  });
28135
28135
 
28136
- // ../mcp-use/dist/client-J4HPCNHM.js
28137
- var client_J4HPCNHM_exports = {};
28138
- __export(client_J4HPCNHM_exports, {
28136
+ // ../mcp-use/dist/client-5CR243EI.js
28137
+ var client_5CR243EI_exports = {};
28138
+ __export(client_5CR243EI_exports, {
28139
28139
  BaseCodeExecutor: () => BaseCodeExecutor,
28140
28140
  E2BCodeExecutor: () => E2BCodeExecutor,
28141
28141
  MCPClient: () => MCPClient,
@@ -28275,12 +28275,12 @@ function trackNodeClientInit(config, codeMode, callbacks) {
28275
28275
  }).catch((e2) => logger.debug(`Failed to track MCPClient init: ${e2}`));
28276
28276
  }
28277
28277
  var _a40, BaseCodeExecutor, _a41, E2BCodeExecutor, vm, vmCheckAttempted, _a42, VMCodeExecutor, _a43, CodeModeConnector, _a44, MCPClient;
28278
- var init_client_J4HPCNHM = __esm({
28279
- "../mcp-use/dist/client-J4HPCNHM.js"() {
28278
+ var init_client_5CR243EI = __esm({
28279
+ "../mcp-use/dist/client-5CR243EI.js"() {
28280
28280
  "use strict";
28281
28281
  init_chunk_LG5NSHEL();
28282
- init_chunk_VDUR5PXK();
28283
- init_chunk_KPIFWECU();
28282
+ init_chunk_DGU2TCSM();
28283
+ init_chunk_ALSNFJPV();
28284
28284
  init_chunk_QWQYAQCK();
28285
28285
  init_chunk_3GQAWCBQ();
28286
28286
  init_fs();
@@ -29217,7 +29217,7 @@ ${shim}
29217
29217
  clientInfo: serverConfig.clientInfo ?? this.config.clientInfo
29218
29218
  };
29219
29219
  if ("command" in merged && "args" in merged) {
29220
- const { StdioConnector: StdioConnector2 } = await Promise.resolve().then(() => (init_stdio_CWIMXSHX(), stdio_CWIMXSHX_exports));
29220
+ const { StdioConnector: StdioConnector2 } = await Promise.resolve().then(() => (init_stdio_C7QPX3Z5(), stdio_C7QPX3Z5_exports));
29221
29221
  const stdioConfig = merged;
29222
29222
  return new StdioConnector2({
29223
29223
  command: stdioConfig.command,
@@ -74896,11 +74896,11 @@ var _a45, BaseAdapter, _a46, LangChainAdapter, _a47, MCPServerTool, PresentActiv
74896
74896
  var init_browser = __esm({
74897
74897
  "../mcp-use/dist/src/browser.js"() {
74898
74898
  "use strict";
74899
- init_chunk_GEOH7R4G();
74899
+ init_chunk_TI4LUN24();
74900
74900
  init_chunk_UJPHRNQP();
74901
74901
  init_chunk_LG5NSHEL();
74902
- init_chunk_VDUR5PXK();
74903
- init_chunk_KPIFWECU();
74902
+ init_chunk_DGU2TCSM();
74903
+ init_chunk_ALSNFJPV();
74904
74904
  init_chunk_QWQYAQCK();
74905
74905
  init_chunk_3GQAWCBQ();
74906
74906
  init_dist3();
@@ -76247,7 +76247,7 @@ Raw error: ${result}`
76247
76247
  logger.debug(
76248
76248
  `Creating MCPClient with ${Object.keys(this.mcpServersConfig).length} server(s)...`
76249
76249
  );
76250
- const { MCPClient: MCPClient2 } = await Promise.resolve().then(() => (init_client_J4HPCNHM(), client_J4HPCNHM_exports));
76250
+ const { MCPClient: MCPClient2 } = await Promise.resolve().then(() => (init_client_5CR243EI(), client_5CR243EI_exports));
76251
76251
  this.client = new MCPClient2({ mcpServers: this.mcpServersConfig });
76252
76252
  logger.debug("\u2705 MCPClient created successfully");
76253
76253
  }