mcp-use 1.11.0-canary.18 → 1.11.0-canary.20

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.
@@ -1,11 +1,11 @@
1
1
  import {
2
2
  BaseMCPClient,
3
3
  HttpConnector
4
- } from "./chunk-M6HG2X4Q.js";
4
+ } from "./chunk-ENJHJKXG.js";
5
5
  import {
6
6
  Tel,
7
7
  getPackageVersion
8
- } from "./chunk-MIY5EBAT.js";
8
+ } from "./chunk-J7NQQHWW.js";
9
9
  import {
10
10
  logger
11
11
  } from "./chunk-FRUZDWXH.js";
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  Tel,
3
3
  Telemetry
4
- } from "./chunk-MIY5EBAT.js";
4
+ } from "./chunk-J7NQQHWW.js";
5
5
  import {
6
6
  logger
7
7
  } from "./chunk-FRUZDWXH.js";
@@ -1,13 +1,13 @@
1
1
  import {
2
2
  BrowserMCPClient
3
- } from "./chunk-OD724W55.js";
4
- import {
5
- Tel
6
- } from "./chunk-MIY5EBAT.js";
3
+ } from "./chunk-5MXNFVMH.js";
7
4
  import {
8
5
  BrowserOAuthClientProvider,
9
6
  sanitizeUrl
10
7
  } from "./chunk-J75I2C26.js";
8
+ import {
9
+ Tel
10
+ } from "./chunk-J7NQQHWW.js";
11
11
  import {
12
12
  __name
13
13
  } from "./chunk-3GQAWCBQ.js";
@@ -92,7 +92,7 @@ function generateUUID() {
92
92
  __name(generateUUID, "generateUUID");
93
93
 
94
94
  // src/version.ts
95
- var VERSION = "1.11.0-canary.18";
95
+ var VERSION = "1.11.0-canary.20";
96
96
  function getPackageVersion() {
97
97
  return VERSION;
98
98
  }
@@ -479,6 +479,20 @@ function extractModelInfo(llm) {
479
479
  __name(extractModelInfo, "extractModelInfo");
480
480
 
481
481
  // src/telemetry/telemetry.ts
482
+ function secureRandomString() {
483
+ if (typeof window !== "undefined" && window.crypto && typeof window.crypto.getRandomValues === "function") {
484
+ const array = new Uint8Array(8);
485
+ window.crypto.getRandomValues(array);
486
+ return Array.from(array, (v) => v.toString(16).padStart(2, "0")).join("");
487
+ }
488
+ try {
489
+ const crypto = __require("crypto");
490
+ return crypto.randomBytes(8).toString("hex");
491
+ } catch (e) {
492
+ return Math.random().toString(36).substring(2, 15);
493
+ }
494
+ }
495
+ __name(secureRandomString, "secureRandomString");
482
496
  var USER_ID_STORAGE_KEY = "mcp_use_user_id";
483
497
  function detectRuntimeEnvironment() {
484
498
  try {
@@ -810,7 +824,7 @@ var Telemetry = class _Telemetry {
810
824
  try {
811
825
  return `session-${generateUUID()}`;
812
826
  } catch (uuidError) {
813
- return `session-${Date.now()}-${Math.random().toString(36).substring(2, 15)}`;
827
+ return `session-${Date.now()}-${secureRandomString()}`;
814
828
  }
815
829
  }
816
830
  }
@@ -824,7 +838,7 @@ var Telemetry = class _Telemetry {
824
838
  try {
825
839
  userId = generateUUID();
826
840
  } catch (uuidError) {
827
- userId = `${Date.now()}-${Math.random().toString(36).substring(2, 15)}`;
841
+ userId = `${Date.now()}-${secureRandomString()}`;
828
842
  }
829
843
  localStorage.setItem(USER_ID_STORAGE_KEY, userId);
830
844
  }
@@ -834,7 +848,7 @@ var Telemetry = class _Telemetry {
834
848
  try {
835
849
  sessionId = `session-${generateUUID()}`;
836
850
  } catch (uuidError) {
837
- sessionId = `session-${Date.now()}-${Math.random().toString(36).substring(2, 15)}`;
851
+ sessionId = `session-${Date.now()}-${secureRandomString()}`;
838
852
  }
839
853
  return sessionId;
840
854
  }
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  MCPClient
3
- } from "./chunk-I3NZCYBR.js";
3
+ } from "./chunk-SP22S3FF.js";
4
4
  import {
5
5
  LangChainAdapter
6
6
  } from "./chunk-MFSO5PUW.js";
@@ -8,7 +8,7 @@ import {
8
8
  Telemetry,
9
9
  extractModelInfo,
10
10
  getPackageVersion
11
- } from "./chunk-MIY5EBAT.js";
11
+ } from "./chunk-J7NQQHWW.js";
12
12
  import {
13
13
  logger
14
14
  } from "./chunk-FRUZDWXH.js";
@@ -4,11 +4,11 @@ import {
4
4
  ConnectionManager,
5
5
  HttpConnector,
6
6
  MCPSession
7
- } from "./chunk-M6HG2X4Q.js";
7
+ } from "./chunk-ENJHJKXG.js";
8
8
  import {
9
9
  Tel,
10
10
  getPackageVersion
11
- } from "./chunk-MIY5EBAT.js";
11
+ } from "./chunk-J7NQQHWW.js";
12
12
  import {
13
13
  logger
14
14
  } from "./chunk-FRUZDWXH.js";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  CODE_MODE_AGENT_PROMPT
3
- } from "./chunk-I3NZCYBR.js";
3
+ } from "./chunk-SP22S3FF.js";
4
4
  import {
5
5
  __name
6
6
  } from "./chunk-3GQAWCBQ.js";
@@ -4,7 +4,7 @@ import {
4
4
  import {
5
5
  Telemetry,
6
6
  generateUUID
7
- } from "./chunk-MIY5EBAT.js";
7
+ } from "./chunk-J7NQQHWW.js";
8
8
  import {
9
9
  __name
10
10
  } from "./chunk-3GQAWCBQ.js";