mcp-use 1.10.0-canary.7 → 1.10.0-canary.9

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.
@@ -91,7 +91,7 @@ function generateUUID() {
91
91
  __name(generateUUID, "generateUUID");
92
92
 
93
93
  // src/version.ts
94
- var VERSION = "1.10.0-canary.7";
94
+ var VERSION = "1.10.0-canary.9";
95
95
  function getPackageVersion() {
96
96
  return VERSION;
97
97
  }
@@ -1,10 +1,10 @@
1
1
  import {
2
2
  BrowserMCPClient
3
- } from "./chunk-QZCF4NHP.js";
3
+ } from "./chunk-ILW5LBQD.js";
4
4
  import {
5
5
  BrowserOAuthClientProvider,
6
6
  sanitizeUrl
7
- } from "./chunk-7RUUAWVB.js";
7
+ } from "./chunk-J75I2C26.js";
8
8
  import {
9
9
  __name
10
10
  } from "./chunk-3GQAWCBQ.js";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  BaseConnector
3
- } from "./chunk-3BBYQXEN.js";
3
+ } from "./chunk-PH2WQV56.js";
4
4
  import {
5
5
  __name
6
6
  } from "./chunk-3GQAWCBQ.js";
@@ -1,10 +1,10 @@
1
1
  import {
2
2
  BaseConnector
3
- } from "./chunk-3BBYQXEN.js";
3
+ } from "./chunk-PH2WQV56.js";
4
4
  import {
5
5
  generateUUID,
6
6
  getPackageVersion
7
- } from "./chunk-PP653GKW.js";
7
+ } from "./chunk-467MICF6.js";
8
8
  import {
9
9
  logger
10
10
  } from "./chunk-34R6SIER.js";
@@ -369,16 +369,44 @@ async function onMcpAuthorization() {
369
369
  );
370
370
  }
371
371
  try {
372
- document.body.innerHTML = `
373
- <div style="font-family: sans-serif; padding: 20px;">
374
- <h1>Authentication Error</h1>
375
- <p style="color: red; background-color: #ffebeb; border: 1px solid red; padding: 10px; border-radius: 4px;">
376
- ${errorMessage}
377
- </p>
378
- <p>You can close this window or <a href="#" onclick="window.close(); return false;">click here to close</a>.</p>
379
- <pre style="font-size: 0.8em; color: #555; margin-top: 20px; white-space: pre-wrap;">${err instanceof Error ? err.stack : ""}</pre>
380
- </div>
381
- `;
372
+ document.body.innerHTML = "";
373
+ const container = document.createElement("div");
374
+ container.style.fontFamily = "sans-serif";
375
+ container.style.padding = "20px";
376
+ const heading = document.createElement("h1");
377
+ heading.textContent = "Authentication Error";
378
+ container.appendChild(heading);
379
+ const errorPara = document.createElement("p");
380
+ errorPara.style.color = "red";
381
+ errorPara.style.backgroundColor = "#ffebeb";
382
+ errorPara.style.border = "1px solid red";
383
+ errorPara.style.padding = "10px";
384
+ errorPara.style.borderRadius = "4px";
385
+ errorPara.textContent = errorMessage;
386
+ container.appendChild(errorPara);
387
+ const closePara = document.createElement("p");
388
+ closePara.textContent = "You can close this window or ";
389
+ const closeLink = document.createElement("a");
390
+ closeLink.href = "#";
391
+ closeLink.textContent = "click here to close";
392
+ closeLink.onclick = (e) => {
393
+ e.preventDefault();
394
+ window.close();
395
+ return false;
396
+ };
397
+ closePara.appendChild(closeLink);
398
+ closePara.appendChild(document.createTextNode("."));
399
+ container.appendChild(closePara);
400
+ if (err instanceof Error && err.stack) {
401
+ const stackPre = document.createElement("pre");
402
+ stackPre.style.fontSize = "0.8em";
403
+ stackPre.style.color = "#555";
404
+ stackPre.style.marginTop = "20px";
405
+ stackPre.style.whiteSpace = "pre-wrap";
406
+ stackPre.textContent = err.stack;
407
+ container.appendChild(stackPre);
408
+ }
409
+ document.body.appendChild(container);
382
410
  } catch (displayError) {
383
411
  console.error(
384
412
  `${logPrefix} Could not display error in callback window:`,
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  Telemetry
3
- } from "./chunk-PP653GKW.js";
3
+ } from "./chunk-467MICF6.js";
4
4
  import {
5
5
  logger
6
6
  } from "./chunk-34R6SIER.js";
@@ -2,7 +2,7 @@ import {
2
2
  Telemetry,
3
3
  extractModelInfo,
4
4
  getPackageVersion
5
- } from "./chunk-PP653GKW.js";
5
+ } from "./chunk-467MICF6.js";
6
6
  import {
7
7
  logger
8
8
  } from "./chunk-34R6SIER.js";
@@ -4,7 +4,7 @@ import {
4
4
  import {
5
5
  Telemetry,
6
6
  generateUUID
7
- } from "./chunk-PP653GKW.js";
7
+ } from "./chunk-467MICF6.js";
8
8
  import {
9
9
  __name
10
10
  } from "./chunk-3GQAWCBQ.js";
package/dist/index.cjs CHANGED
@@ -2832,7 +2832,7 @@ var ConnectorInitEvent = class extends BaseTelemetryEvent {
2832
2832
  };
2833
2833
 
2834
2834
  // src/version.ts
2835
- var VERSION = "1.10.0-canary.7";
2835
+ var VERSION = "1.10.0-canary.9";
2836
2836
  function getPackageVersion() {
2837
2837
  return VERSION;
2838
2838
  }
@@ -8033,15 +8033,15 @@ var OAuthHelper = class {
8033
8033
  // GitHub Copilot
8034
8034
  /api\.github\.com/i,
8035
8035
  // GitHub API
8036
- /.*\.googleapis\.com/i,
8036
+ /[a-z0-9-]+\.googleapis\.com/i,
8037
8037
  // Google APIs
8038
8038
  /api\.openai\.com/i,
8039
8039
  // OpenAI
8040
8040
  /api\.anthropic\.com/i,
8041
8041
  // Anthropic
8042
- /.*\.atlassian\.net/i,
8042
+ /[a-z0-9-]+\.atlassian\.net/i,
8043
8043
  // Atlassian (Jira, Confluence)
8044
- /.*\.slack\.com/i,
8044
+ /[a-z0-9-]+\.slack\.com/i,
8045
8045
  // Slack
8046
8046
  /api\.notion\.com/i,
8047
8047
  // Notion
@@ -8055,7 +8055,7 @@ var OAuthHelper = class {
8055
8055
  // Local development
8056
8056
  /\.local/i,
8057
8057
  // Local development
8058
- /mcp\..*\.com/i
8058
+ /mcp\.[a-z0-9-]+\.com/i
8059
8059
  // Generic MCP server pattern (often public)
8060
8060
  ];
8061
8061
  for (const pattern of noAuthPatterns) {
@@ -8713,16 +8713,44 @@ async function onMcpAuthorization() {
8713
8713
  );
8714
8714
  }
8715
8715
  try {
8716
- document.body.innerHTML = `
8717
- <div style="font-family: sans-serif; padding: 20px;">
8718
- <h1>Authentication Error</h1>
8719
- <p style="color: red; background-color: #ffebeb; border: 1px solid red; padding: 10px; border-radius: 4px;">
8720
- ${errorMessage}
8721
- </p>
8722
- <p>You can close this window or <a href="#" onclick="window.close(); return false;">click here to close</a>.</p>
8723
- <pre style="font-size: 0.8em; color: #555; margin-top: 20px; white-space: pre-wrap;">${err instanceof Error ? err.stack : ""}</pre>
8724
- </div>
8725
- `;
8716
+ document.body.innerHTML = "";
8717
+ const container = document.createElement("div");
8718
+ container.style.fontFamily = "sans-serif";
8719
+ container.style.padding = "20px";
8720
+ const heading = document.createElement("h1");
8721
+ heading.textContent = "Authentication Error";
8722
+ container.appendChild(heading);
8723
+ const errorPara = document.createElement("p");
8724
+ errorPara.style.color = "red";
8725
+ errorPara.style.backgroundColor = "#ffebeb";
8726
+ errorPara.style.border = "1px solid red";
8727
+ errorPara.style.padding = "10px";
8728
+ errorPara.style.borderRadius = "4px";
8729
+ errorPara.textContent = errorMessage;
8730
+ container.appendChild(errorPara);
8731
+ const closePara = document.createElement("p");
8732
+ closePara.textContent = "You can close this window or ";
8733
+ const closeLink = document.createElement("a");
8734
+ closeLink.href = "#";
8735
+ closeLink.textContent = "click here to close";
8736
+ closeLink.onclick = (e) => {
8737
+ e.preventDefault();
8738
+ window.close();
8739
+ return false;
8740
+ };
8741
+ closePara.appendChild(closeLink);
8742
+ closePara.appendChild(document.createTextNode("."));
8743
+ container.appendChild(closePara);
8744
+ if (err instanceof Error && err.stack) {
8745
+ const stackPre = document.createElement("pre");
8746
+ stackPre.style.fontSize = "0.8em";
8747
+ stackPre.style.color = "#555";
8748
+ stackPre.style.marginTop = "20px";
8749
+ stackPre.style.whiteSpace = "pre-wrap";
8750
+ stackPre.textContent = err.stack;
8751
+ container.appendChild(stackPre);
8752
+ }
8753
+ document.body.appendChild(container);
8726
8754
  } catch (displayError) {
8727
8755
  console.error(
8728
8756
  `${logPrefix} Could not display error in callback window:`,
package/dist/index.js CHANGED
@@ -16,13 +16,13 @@ import {
16
16
  ReleaseMCPServerConnectionTool,
17
17
  RemoteAgent,
18
18
  ServerManager
19
- } from "./chunk-J77Z4CRV.js";
19
+ } from "./chunk-Y6BFGMPU.js";
20
20
  import "./chunk-CPG2WZUL.js";
21
21
  import "./chunk-JQKKMUCT.js";
22
22
  import {
23
23
  CodeModeConnector,
24
24
  PROMPTS
25
- } from "./chunk-EVWXZWIJ.js";
25
+ } from "./chunk-DBIXD6FA.js";
26
26
  import {
27
27
  ErrorBoundary,
28
28
  Image,
@@ -34,21 +34,21 @@ import {
34
34
  useWidgetProps,
35
35
  useWidgetState,
36
36
  useWidgetTheme
37
- } from "./chunk-5TGZJKUB.js";
37
+ } from "./chunk-BZQ3E73M.js";
38
38
  import {
39
39
  BaseMCPClient,
40
40
  ConnectionManager,
41
41
  HttpConnector,
42
42
  MCPSession,
43
43
  WebSocketConnector
44
- } from "./chunk-QZCF4NHP.js";
44
+ } from "./chunk-ILW5LBQD.js";
45
45
  import {
46
46
  BrowserOAuthClientProvider,
47
47
  onMcpAuthorization
48
- } from "./chunk-7RUUAWVB.js";
48
+ } from "./chunk-J75I2C26.js";
49
49
  import {
50
50
  BaseConnector
51
- } from "./chunk-3BBYQXEN.js";
51
+ } from "./chunk-PH2WQV56.js";
52
52
  import {
53
53
  ElicitationDeclinedError,
54
54
  ElicitationTimeoutError,
@@ -59,7 +59,7 @@ import {
59
59
  VERSION,
60
60
  getPackageVersion,
61
61
  setTelemetrySource
62
- } from "./chunk-PP653GKW.js";
62
+ } from "./chunk-467MICF6.js";
63
63
  import {
64
64
  Logger,
65
65
  logger
@@ -1189,15 +1189,15 @@ var OAuthHelper = class {
1189
1189
  // GitHub Copilot
1190
1190
  /api\.github\.com/i,
1191
1191
  // GitHub API
1192
- /.*\.googleapis\.com/i,
1192
+ /[a-z0-9-]+\.googleapis\.com/i,
1193
1193
  // Google APIs
1194
1194
  /api\.openai\.com/i,
1195
1195
  // OpenAI
1196
1196
  /api\.anthropic\.com/i,
1197
1197
  // Anthropic
1198
- /.*\.atlassian\.net/i,
1198
+ /[a-z0-9-]+\.atlassian\.net/i,
1199
1199
  // Atlassian (Jira, Confluence)
1200
- /.*\.slack\.com/i,
1200
+ /[a-z0-9-]+\.slack\.com/i,
1201
1201
  // Slack
1202
1202
  /api\.notion\.com/i,
1203
1203
  // Notion
@@ -1211,7 +1211,7 @@ var OAuthHelper = class {
1211
1211
  // Local development
1212
1212
  /\.local/i,
1213
1213
  // Local development
1214
- /mcp\..*\.com/i
1214
+ /mcp\.[a-z0-9-]+\.com/i
1215
1215
  // Generic MCP server pattern (often public)
1216
1216
  ];
1217
1217
  for (const pattern of noAuthPatterns) {
@@ -1376,7 +1376,7 @@ var ConnectorInitEvent = class extends BaseTelemetryEvent {
1376
1376
  };
1377
1377
 
1378
1378
  // src/version.ts
1379
- var VERSION = "1.10.0-canary.7";
1379
+ var VERSION = "1.10.0-canary.9";
1380
1380
  function getPackageVersion() {
1381
1381
  return VERSION;
1382
1382
  }
@@ -4,13 +4,13 @@ import {
4
4
  import {
5
5
  MCPAgent,
6
6
  RemoteAgent
7
- } from "../../chunk-J77Z4CRV.js";
7
+ } from "../../chunk-Y6BFGMPU.js";
8
8
  import "../../chunk-CPG2WZUL.js";
9
9
  import {
10
10
  PROMPTS
11
- } from "../../chunk-EVWXZWIJ.js";
12
- import "../../chunk-3BBYQXEN.js";
13
- import "../../chunk-PP653GKW.js";
11
+ } from "../../chunk-DBIXD6FA.js";
12
+ import "../../chunk-PH2WQV56.js";
13
+ import "../../chunk-467MICF6.js";
14
14
  import "../../chunk-34R6SIER.js";
15
15
  import "../../chunk-3GQAWCBQ.js";
16
16
  export {
@@ -1 +1 @@
1
- {"version":3,"file":"callback.d.ts","sourceRoot":"","sources":["../../../src/auth/callback.ts"],"names":[],"mappings":"AAKA;;;GAGG;AACH,wBAAsB,kBAAkB,kBA+KvC"}
1
+ {"version":3,"file":"callback.d.ts","sourceRoot":"","sources":["../../../src/auth/callback.ts"],"names":[],"mappings":"AAKA;;;GAGG;AACH,wBAAsB,kBAAkB,kBAsNvC"}
@@ -393,16 +393,44 @@ async function onMcpAuthorization() {
393
393
  );
394
394
  }
395
395
  try {
396
- document.body.innerHTML = `
397
- <div style="font-family: sans-serif; padding: 20px;">
398
- <h1>Authentication Error</h1>
399
- <p style="color: red; background-color: #ffebeb; border: 1px solid red; padding: 10px; border-radius: 4px;">
400
- ${errorMessage}
401
- </p>
402
- <p>You can close this window or <a href="#" onclick="window.close(); return false;">click here to close</a>.</p>
403
- <pre style="font-size: 0.8em; color: #555; margin-top: 20px; white-space: pre-wrap;">${err instanceof Error ? err.stack : ""}</pre>
404
- </div>
405
- `;
396
+ document.body.innerHTML = "";
397
+ const container = document.createElement("div");
398
+ container.style.fontFamily = "sans-serif";
399
+ container.style.padding = "20px";
400
+ const heading = document.createElement("h1");
401
+ heading.textContent = "Authentication Error";
402
+ container.appendChild(heading);
403
+ const errorPara = document.createElement("p");
404
+ errorPara.style.color = "red";
405
+ errorPara.style.backgroundColor = "#ffebeb";
406
+ errorPara.style.border = "1px solid red";
407
+ errorPara.style.padding = "10px";
408
+ errorPara.style.borderRadius = "4px";
409
+ errorPara.textContent = errorMessage;
410
+ container.appendChild(errorPara);
411
+ const closePara = document.createElement("p");
412
+ closePara.textContent = "You can close this window or ";
413
+ const closeLink = document.createElement("a");
414
+ closeLink.href = "#";
415
+ closeLink.textContent = "click here to close";
416
+ closeLink.onclick = (e) => {
417
+ e.preventDefault();
418
+ window.close();
419
+ return false;
420
+ };
421
+ closePara.appendChild(closeLink);
422
+ closePara.appendChild(document.createTextNode("."));
423
+ container.appendChild(closePara);
424
+ if (err instanceof Error && err.stack) {
425
+ const stackPre = document.createElement("pre");
426
+ stackPre.style.fontSize = "0.8em";
427
+ stackPre.style.color = "#555";
428
+ stackPre.style.marginTop = "20px";
429
+ stackPre.style.whiteSpace = "pre-wrap";
430
+ stackPre.textContent = err.stack;
431
+ container.appendChild(stackPre);
432
+ }
433
+ document.body.appendChild(container);
406
434
  } catch (displayError) {
407
435
  console.error(
408
436
  `${logPrefix} Could not display error in callback window:`,
@@ -2,7 +2,7 @@ import "../../chunk-JQKKMUCT.js";
2
2
  import {
3
3
  BrowserOAuthClientProvider,
4
4
  onMcpAuthorization
5
- } from "../../chunk-7RUUAWVB.js";
5
+ } from "../../chunk-J75I2C26.js";
6
6
  import "../../chunk-3GQAWCBQ.js";
7
7
  export {
8
8
  BrowserOAuthClientProvider,
@@ -1561,7 +1561,7 @@ var ConnectorInitEvent = class extends BaseTelemetryEvent {
1561
1561
  };
1562
1562
 
1563
1563
  // src/version.ts
1564
- var VERSION = "1.10.0-canary.7";
1564
+ var VERSION = "1.10.0-canary.9";
1565
1565
  function getPackageVersion() {
1566
1566
  return VERSION;
1567
1567
  }
@@ -7059,16 +7059,44 @@ async function onMcpAuthorization() {
7059
7059
  );
7060
7060
  }
7061
7061
  try {
7062
- document.body.innerHTML = `
7063
- <div style="font-family: sans-serif; padding: 20px;">
7064
- <h1>Authentication Error</h1>
7065
- <p style="color: red; background-color: #ffebeb; border: 1px solid red; padding: 10px; border-radius: 4px;">
7066
- ${errorMessage}
7067
- </p>
7068
- <p>You can close this window or <a href="#" onclick="window.close(); return false;">click here to close</a>.</p>
7069
- <pre style="font-size: 0.8em; color: #555; margin-top: 20px; white-space: pre-wrap;">${err instanceof Error ? err.stack : ""}</pre>
7070
- </div>
7071
- `;
7062
+ document.body.innerHTML = "";
7063
+ const container = document.createElement("div");
7064
+ container.style.fontFamily = "sans-serif";
7065
+ container.style.padding = "20px";
7066
+ const heading = document.createElement("h1");
7067
+ heading.textContent = "Authentication Error";
7068
+ container.appendChild(heading);
7069
+ const errorPara = document.createElement("p");
7070
+ errorPara.style.color = "red";
7071
+ errorPara.style.backgroundColor = "#ffebeb";
7072
+ errorPara.style.border = "1px solid red";
7073
+ errorPara.style.padding = "10px";
7074
+ errorPara.style.borderRadius = "4px";
7075
+ errorPara.textContent = errorMessage;
7076
+ container.appendChild(errorPara);
7077
+ const closePara = document.createElement("p");
7078
+ closePara.textContent = "You can close this window or ";
7079
+ const closeLink = document.createElement("a");
7080
+ closeLink.href = "#";
7081
+ closeLink.textContent = "click here to close";
7082
+ closeLink.onclick = (e) => {
7083
+ e.preventDefault();
7084
+ window.close();
7085
+ return false;
7086
+ };
7087
+ closePara.appendChild(closeLink);
7088
+ closePara.appendChild(document.createTextNode("."));
7089
+ container.appendChild(closePara);
7090
+ if (err instanceof Error && err.stack) {
7091
+ const stackPre = document.createElement("pre");
7092
+ stackPre.style.fontSize = "0.8em";
7093
+ stackPre.style.color = "#555";
7094
+ stackPre.style.marginTop = "20px";
7095
+ stackPre.style.whiteSpace = "pre-wrap";
7096
+ stackPre.textContent = err.stack;
7097
+ container.appendChild(stackPre);
7098
+ }
7099
+ document.body.appendChild(container);
7072
7100
  } catch (displayError) {
7073
7101
  console.error(
7074
7102
  `${logPrefix} Could not display error in callback window:`,
@@ -9,25 +9,25 @@ import {
9
9
  MCPAgent,
10
10
  ObservabilityManager,
11
11
  RemoteAgent
12
- } from "../chunk-J77Z4CRV.js";
12
+ } from "../chunk-Y6BFGMPU.js";
13
13
  import "../chunk-CPG2WZUL.js";
14
14
  import {
15
15
  BrowserMCPClient,
16
16
  HttpConnector,
17
17
  MCPSession,
18
18
  WebSocketConnector
19
- } from "../chunk-QZCF4NHP.js";
19
+ } from "../chunk-ILW5LBQD.js";
20
20
  import {
21
21
  BrowserOAuthClientProvider,
22
22
  onMcpAuthorization
23
- } from "../chunk-7RUUAWVB.js";
23
+ } from "../chunk-J75I2C26.js";
24
24
  import {
25
25
  BaseConnector
26
- } from "../chunk-3BBYQXEN.js";
26
+ } from "../chunk-PH2WQV56.js";
27
27
  import {
28
28
  VERSION,
29
29
  getPackageVersion
30
- } from "../chunk-PP653GKW.js";
30
+ } from "../chunk-467MICF6.js";
31
31
  import {
32
32
  Logger,
33
33
  logger
@@ -1,8 +1,8 @@
1
1
  import {
2
2
  PROMPTS
3
- } from "../../chunk-EVWXZWIJ.js";
4
- import "../../chunk-3BBYQXEN.js";
5
- import "../../chunk-PP653GKW.js";
3
+ } from "../../chunk-DBIXD6FA.js";
4
+ import "../../chunk-PH2WQV56.js";
5
+ import "../../chunk-467MICF6.js";
6
6
  import "../../chunk-34R6SIER.js";
7
7
  import "../../chunk-3GQAWCBQ.js";
8
8
  export {
@@ -830,7 +830,7 @@ var ConnectorInitEvent = class extends BaseTelemetryEvent {
830
830
  };
831
831
 
832
832
  // src/version.ts
833
- var VERSION = "1.10.0-canary.7";
833
+ var VERSION = "1.10.0-canary.9";
834
834
  function getPackageVersion() {
835
835
  return VERSION;
836
836
  }
@@ -3819,16 +3819,44 @@ async function onMcpAuthorization() {
3819
3819
  );
3820
3820
  }
3821
3821
  try {
3822
- document.body.innerHTML = `
3823
- <div style="font-family: sans-serif; padding: 20px;">
3824
- <h1>Authentication Error</h1>
3825
- <p style="color: red; background-color: #ffebeb; border: 1px solid red; padding: 10px; border-radius: 4px;">
3826
- ${errorMessage}
3827
- </p>
3828
- <p>You can close this window or <a href="#" onclick="window.close(); return false;">click here to close</a>.</p>
3829
- <pre style="font-size: 0.8em; color: #555; margin-top: 20px; white-space: pre-wrap;">${err instanceof Error ? err.stack : ""}</pre>
3830
- </div>
3831
- `;
3822
+ document.body.innerHTML = "";
3823
+ const container = document.createElement("div");
3824
+ container.style.fontFamily = "sans-serif";
3825
+ container.style.padding = "20px";
3826
+ const heading = document.createElement("h1");
3827
+ heading.textContent = "Authentication Error";
3828
+ container.appendChild(heading);
3829
+ const errorPara = document.createElement("p");
3830
+ errorPara.style.color = "red";
3831
+ errorPara.style.backgroundColor = "#ffebeb";
3832
+ errorPara.style.border = "1px solid red";
3833
+ errorPara.style.padding = "10px";
3834
+ errorPara.style.borderRadius = "4px";
3835
+ errorPara.textContent = errorMessage;
3836
+ container.appendChild(errorPara);
3837
+ const closePara = document.createElement("p");
3838
+ closePara.textContent = "You can close this window or ";
3839
+ const closeLink = document.createElement("a");
3840
+ closeLink.href = "#";
3841
+ closeLink.textContent = "click here to close";
3842
+ closeLink.onclick = (e) => {
3843
+ e.preventDefault();
3844
+ window.close();
3845
+ return false;
3846
+ };
3847
+ closePara.appendChild(closeLink);
3848
+ closePara.appendChild(document.createTextNode("."));
3849
+ container.appendChild(closePara);
3850
+ if (err instanceof Error && err.stack) {
3851
+ const stackPre = document.createElement("pre");
3852
+ stackPre.style.fontSize = "0.8em";
3853
+ stackPre.style.color = "#555";
3854
+ stackPre.style.marginTop = "20px";
3855
+ stackPre.style.whiteSpace = "pre-wrap";
3856
+ stackPre.textContent = err.stack;
3857
+ container.appendChild(stackPre);
3858
+ }
3859
+ document.body.appendChild(container);
3832
3860
  } catch (displayError) {
3833
3861
  console.error(
3834
3862
  `${logPrefix} Could not display error in callback window:`,
@@ -9,13 +9,13 @@ import {
9
9
  useWidgetProps,
10
10
  useWidgetState,
11
11
  useWidgetTheme
12
- } from "../../chunk-5TGZJKUB.js";
13
- import "../../chunk-QZCF4NHP.js";
12
+ } from "../../chunk-BZQ3E73M.js";
13
+ import "../../chunk-ILW5LBQD.js";
14
14
  import {
15
15
  onMcpAuthorization
16
- } from "../../chunk-7RUUAWVB.js";
17
- import "../../chunk-3BBYQXEN.js";
18
- import "../../chunk-PP653GKW.js";
16
+ } from "../../chunk-J75I2C26.js";
17
+ import "../../chunk-PH2WQV56.js";
18
+ import "../../chunk-467MICF6.js";
19
19
  import "../../chunk-34R6SIER.js";
20
20
  import "../../chunk-3GQAWCBQ.js";
21
21
  export {
@@ -714,7 +714,7 @@ var VERSION;
714
714
  var init_version = __esm({
715
715
  "src/version.ts"() {
716
716
  "use strict";
717
- VERSION = "1.10.0-canary.7";
717
+ VERSION = "1.10.0-canary.9";
718
718
  __name(getPackageVersion, "getPackageVersion");
719
719
  }
720
720
  });
@@ -7,7 +7,7 @@ import {
7
7
  createEnhancedContext,
8
8
  findSessionContext,
9
9
  isValidLogLevel
10
- } from "../../chunk-GPJDNLPU.js";
10
+ } from "../../chunk-ZNO3O2HO.js";
11
11
  import {
12
12
  convertToolResultToResourceResult
13
13
  } from "../../chunk-362PI25Z.js";
@@ -25,7 +25,7 @@ import {
25
25
  getPackageVersion,
26
26
  isDeno,
27
27
  pathHelpers
28
- } from "../../chunk-PP653GKW.js";
28
+ } from "../../chunk-467MICF6.js";
29
29
  import "../../chunk-34R6SIER.js";
30
30
  import {
31
31
  __name
@@ -2091,7 +2091,7 @@ function registerResource(resourceDefinition, callback) {
2091
2091
  const explicitMimeType = resourceDefinition.mimeType;
2092
2092
  const wrappedCallback = /* @__PURE__ */ __name(async () => {
2093
2093
  const { getRequestContext: getRequestContext2, runWithContext: runWithContext2 } = await import("../../context-storage-NA4MHWOZ.js");
2094
- const { findSessionContext: findSessionContext2 } = await import("../../tool-execution-helpers-PU3NN3NL.js");
2094
+ const { findSessionContext: findSessionContext2 } = await import("../../tool-execution-helpers-WS2PRGDY.js");
2095
2095
  const initialRequestContext = getRequestContext2();
2096
2096
  const sessions = this.sessions || /* @__PURE__ */ new Map();
2097
2097
  const { requestContext } = findSessionContext2(
@@ -2169,7 +2169,7 @@ function registerResourceTemplate(resourceTemplateDefinition, callback) {
2169
2169
  async (uri) => {
2170
2170
  const params = this.parseTemplateUri(uriTemplate, uri.toString());
2171
2171
  const { getRequestContext: getRequestContext2, runWithContext: runWithContext2 } = await import("../../context-storage-NA4MHWOZ.js");
2172
- const { findSessionContext: findSessionContext2 } = await import("../../tool-execution-helpers-PU3NN3NL.js");
2172
+ const { findSessionContext: findSessionContext2 } = await import("../../tool-execution-helpers-WS2PRGDY.js");
2173
2173
  const initialRequestContext = getRequestContext2();
2174
2174
  const sessions = this.sessions || /* @__PURE__ */ new Map();
2175
2175
  const { requestContext } = findSessionContext2(
@@ -2224,7 +2224,7 @@ function registerPrompt(promptDefinition, callback) {
2224
2224
  }
2225
2225
  const wrappedCallback = /* @__PURE__ */ __name(async (params, extra) => {
2226
2226
  const { getRequestContext: getRequestContext2, runWithContext: runWithContext2 } = await import("../../context-storage-NA4MHWOZ.js");
2227
- const { findSessionContext: findSessionContext2 } = await import("../../tool-execution-helpers-PU3NN3NL.js");
2227
+ const { findSessionContext: findSessionContext2 } = await import("../../tool-execution-helpers-WS2PRGDY.js");
2228
2228
  const initialRequestContext = getRequestContext2();
2229
2229
  const sessions = this.sessions || /* @__PURE__ */ new Map();
2230
2230
  const { requestContext } = findSessionContext2(