@google/gemini-cli 0.59.0-preview.0 → 0.60.0-nightly.20260904.g87a9c71d5

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.
Files changed (74) hide show
  1. package/bundle/bundled/chrome-devtools-mcp.mjs +1 -1
  2. package/bundle/bundled/third_party/index.js +1 -1
  3. package/bundle/{chunk-KDHW7PJD.js → chunk-2KWYWFYH.js} +3 -3
  4. package/bundle/{chunk-D6XI6WNG.js → chunk-4EEPG33O.js} +1 -1
  5. package/bundle/{chunk-IJPZK2CD.js → chunk-4GN2ER63.js} +1 -1
  6. package/bundle/{chunk-NQC3UDKG.js → chunk-ETGYLAEQ.js} +1 -1
  7. package/bundle/{chunk-23C4TBLH.js → chunk-EY74BCUB.js} +2 -2
  8. package/bundle/{chunk-YLSAASP5.js → chunk-G5MKGD6A.js} +3 -3
  9. package/bundle/{chunk-52JU4ECF.js → chunk-GYIG2U5X.js} +275 -83
  10. package/bundle/{chunk-UA5K3TB5.js → chunk-IXEWV7DR.js} +324 -86
  11. package/bundle/{chunk-55V2C3NE.js → chunk-J4JXA5F5.js} +3 -3
  12. package/bundle/{chunk-DH76W27O.js → chunk-JYH2UAXZ.js} +2 -2
  13. package/bundle/{chunk-THPIH2AE.js → chunk-K6N5ALIZ.js} +1 -1
  14. package/bundle/{chunk-HSRFT2PV.js → chunk-KRBRLEZU.js} +2 -2
  15. package/bundle/{chunk-GOBGZY54.js → chunk-LJSQRVHR.js} +9 -8
  16. package/bundle/{chunk-ILPBRVSF.js → chunk-LSYJZADA.js} +1 -1
  17. package/bundle/{chunk-LXBSPQEH.js → chunk-LWVZ3TLL.js} +1 -1
  18. package/bundle/{chunk-M6UTVOUK.js → chunk-LZA2YQEZ.js} +1 -1
  19. package/bundle/chunk-MOGXAAGG.js +1571 -0
  20. package/bundle/chunk-NS2GPNSV.js +512 -0
  21. package/bundle/{chunk-YI5PKR5L.js → chunk-O2IBXKOU.js} +7924 -14468
  22. package/bundle/{chunk-7QCPYRGC.js → chunk-OPYHX5IV.js} +1 -1
  23. package/bundle/chunk-Q55A4HXI.js +398074 -0
  24. package/bundle/{chunk-UGT6DHAE.js → chunk-RHV3WXCU.js} +86 -21
  25. package/bundle/{chunk-UZXNPI5Z.js → chunk-RJWX5VWJ.js} +146 -68
  26. package/bundle/chunk-U5J4FOTE.js +398 -0
  27. package/bundle/{chunk-GPE57TQ5.js → chunk-UVTIYMGR.js} +8 -5
  28. package/bundle/chunk-UYHNS2XO.js +154 -0
  29. package/bundle/{chunk-VCQFRV5A.js → chunk-VI5CZJFJ.js} +1 -1
  30. package/bundle/chunk-VTRRZADJ.js +118 -0
  31. package/bundle/chunk-XFMJ4TE2.js +17332 -0
  32. package/bundle/{chunk-F45BTUYK.js → chunk-YSANBNNE.js} +1 -1
  33. package/bundle/chunk-YT4C25P2.js +102571 -0
  34. package/bundle/{chunk-FXZRZ2YL.js → chunk-ZUOQJLHX.js} +86 -21
  35. package/bundle/{cleanup-IGZ72X72.js → cleanup-DV5BMEOJ.js} +2 -2
  36. package/bundle/{cleanup-OHSG4ABA.js → cleanup-IFKZWM2L.js} +2 -2
  37. package/bundle/{cleanup-VTATI2S7.js → cleanup-K7NDCFZB.js} +2 -2
  38. package/bundle/cleanup-MIW3QRZK.js +32 -0
  39. package/bundle/{core-XJO3GR5B.js → core-4SZV5IEL.js} +9 -1
  40. package/bundle/{devtoolsService-OSXWGLT3.js → devtoolsService-AZ775QPY.js} +2 -2
  41. package/bundle/{devtoolsService-VQJ4XEED.js → devtoolsService-BZYE3B3A.js} +4 -3
  42. package/bundle/{devtoolsService-TJCP6X22.js → devtoolsService-DOIK3XII.js} +2 -2
  43. package/bundle/devtoolsService-NA732NIU.js +4359 -0
  44. package/bundle/{dist-KC5GXNU5.js → dist-267RSQ2G.js} +9 -1
  45. package/bundle/{core-Q2DBVF5E.js → dist-JUKO7MDI.js} +9 -1
  46. package/bundle/dist-VDX4TYXY.js +2196 -0
  47. package/bundle/docs/changelogs/index.md +20 -0
  48. package/bundle/docs/changelogs/latest.md +32 -281
  49. package/bundle/docs/changelogs/preview.md +18 -31
  50. package/bundle/docs/reference/tools.md +4 -4
  51. package/bundle/docs/tools/mcp-server.md +53 -0
  52. package/bundle/docs/tools/web-fetch.md +7 -3
  53. package/bundle/{gemini-FMVYHQ4P.js → gemini-4VYTZOFB.js} +56 -23
  54. package/bundle/{gemini-G4U2XJ5N.js → gemini-O2IKL5OT.js} +56 -23
  55. package/bundle/{gemini-G3Y4ZBUW.js → gemini-VJZ5KERB.js} +256 -207
  56. package/bundle/gemini-YNIYD6UU.js +17370 -0
  57. package/bundle/gemini.js +7 -7
  58. package/bundle/{interactiveCli-J7RHUM6Y.js → interactiveCli-GZR7TB7H.js} +8 -8
  59. package/bundle/{interactiveCli-ODBGO5ZB.js → interactiveCli-JBCVEYX6.js} +8 -8
  60. package/bundle/{interactiveCli-DFQDNRQR.js → interactiveCli-PVJP6K5G.js} +315 -296
  61. package/bundle/interactiveCli-ZALEAHV2.js +34983 -0
  62. package/bundle/{liteRtServerManager-FYXZXFSP.js → liteRtServerManager-BSKN2SW2.js} +4 -4
  63. package/bundle/{liteRtServerManager-H3DCLTFE.js → liteRtServerManager-KBSBWYVA.js} +4 -4
  64. package/bundle/{liteRtServerManager-BEQPNIUI.js → liteRtServerManager-L2BLDSGL.js} +4 -4
  65. package/bundle/liteRtServerManager-MWMPLFZ3.js +65 -0
  66. package/bundle/{oauth2-provider-2DCMBS2D.js → oauth2-provider-QK65ZFGG.js} +1 -1
  67. package/bundle/{oauth2-provider-3RBG2E74.js → oauth2-provider-U7ADSCRE.js} +1 -1
  68. package/bundle/{oauth2-provider-DX42O6UX.js → oauth2-provider-VY2YQMRH.js} +38 -72
  69. package/bundle/oauth2-provider-WRQZCFP6.js +235 -0
  70. package/bundle/{start-MJKXAIFL.js → start-IU76AAZM.js} +6 -6
  71. package/bundle/{start-R4LT7TW6.js → start-PDREREJZ.js} +6 -6
  72. package/bundle/{start-MIKPZTJ4.js → start-Y6MS5QLI.js} +6 -6
  73. package/bundle/start-ZYKP4UZO.js +18 -0
  74. package/package.json +1 -1
@@ -16728,7 +16728,7 @@ var require_dist2 = __commonJS({
16728
16728
  };
16729
16729
  Object.defineProperty(exports2, "__esModule", { value: true });
16730
16730
  exports2.HttpProxyAgent = void 0;
16731
- var net2 = __importStar(__require("net"));
16731
+ var net3 = __importStar(__require("net"));
16732
16732
  var tls = __importStar(__require("tls"));
16733
16733
  var debug_1 = __importDefault(require_src());
16734
16734
  var events_1 = __require("events");
@@ -16801,7 +16801,7 @@ var require_dist2 = __commonJS({
16801
16801
  socket = tls.connect(this.connectOpts);
16802
16802
  } else {
16803
16803
  debug2("Creating `net.Socket`: %o", this.connectOpts);
16804
- socket = net2.connect(this.connectOpts);
16804
+ socket = net3.connect(this.connectOpts);
16805
16805
  }
16806
16806
  await (0, events_1.once)(socket, "connect");
16807
16807
  return socket;
@@ -28153,8 +28153,8 @@ var require_utils = __commonJS({
28153
28153
  var HOST_DELIMS = { "@": "%40", "/": "%2F", "?": "%3F", "#": "%23", ":": "%3A" };
28154
28154
  var HOST_DELIM_RE = /[@/?#:]/g;
28155
28155
  var HOST_DELIM_NO_COLON_RE = /[@/?#]/g;
28156
- function reescapeHostDelimiters(host, isIP) {
28157
- const re = isIP ? HOST_DELIM_NO_COLON_RE : HOST_DELIM_RE;
28156
+ function reescapeHostDelimiters(host, isIP2) {
28157
+ const re = isIP2 ? HOST_DELIM_NO_COLON_RE : HOST_DELIM_RE;
28158
28158
  re.lastIndex = 0;
28159
28159
  return host.replace(re, (ch) => HOST_DELIMS[ch]);
28160
28160
  }
@@ -28636,7 +28636,7 @@ var require_fast_uri = __commonJS({
28636
28636
  fragment: void 0
28637
28637
  };
28638
28638
  let malformedAuthorityOrPort = false;
28639
- let isIP = false;
28639
+ let isIP2 = false;
28640
28640
  if (options.reference === "suffix") {
28641
28641
  if (options.scheme) {
28642
28642
  uri = options.scheme + ":" + uri;
@@ -28666,9 +28666,9 @@ var require_fast_uri = __commonJS({
28666
28666
  if (ipv4result === false) {
28667
28667
  const ipv6result = normalizeIPv6(parsed.host);
28668
28668
  parsed.host = ipv6result.host.toLowerCase();
28669
- isIP = ipv6result.isIPV6;
28669
+ isIP2 = ipv6result.isIPV6;
28670
28670
  } else {
28671
- isIP = true;
28671
+ isIP2 = true;
28672
28672
  }
28673
28673
  }
28674
28674
  if (parsed.scheme === void 0 && parsed.userinfo === void 0 && parsed.host === void 0 && parsed.port === void 0 && parsed.query === void 0 && !parsed.path) {
@@ -28685,7 +28685,7 @@ var require_fast_uri = __commonJS({
28685
28685
  }
28686
28686
  const schemeHandler = getSchemeHandler(options.scheme || parsed.scheme);
28687
28687
  if (!options.unicodeSupport && (!schemeHandler || !schemeHandler.unicodeSupport)) {
28688
- if (parsed.host && (options.domainHost || schemeHandler && schemeHandler.domainHost) && isIP === false && nonSimpleDomain(parsed.host)) {
28688
+ if (parsed.host && (options.domainHost || schemeHandler && schemeHandler.domainHost) && isIP2 === false && nonSimpleDomain(parsed.host)) {
28689
28689
  try {
28690
28690
  parsed.host = URL.domainToASCII(parsed.host.toLowerCase());
28691
28691
  } catch (e2) {
@@ -28699,7 +28699,7 @@ var require_fast_uri = __commonJS({
28699
28699
  parsed.scheme = unescape(parsed.scheme);
28700
28700
  }
28701
28701
  if (parsed.host !== void 0) {
28702
- parsed.host = reescapeHostDelimiters(unescape(parsed.host), isIP);
28702
+ parsed.host = reescapeHostDelimiters(unescape(parsed.host), isIP2);
28703
28703
  }
28704
28704
  }
28705
28705
  if (parsed.path) {
@@ -58752,7 +58752,7 @@ var require_transport = __commonJS({
58752
58752
  var resolver_1 = require_resolver();
58753
58753
  var subchannel_address_1 = require_subchannel_address();
58754
58754
  var uri_parser_1 = require_uri_parser();
58755
- var net2 = __require("net");
58755
+ var net3 = __require("net");
58756
58756
  var subchannel_call_1 = require_subchannel_call();
58757
58757
  var call_number_1 = require_call_number();
58758
58758
  var TRACER_NAME2 = "transport";
@@ -59219,7 +59219,7 @@ var require_transport = __commonJS({
59219
59219
  const errorCallback = (error40) => {
59220
59220
  reject(error40);
59221
59221
  };
59222
- const socket = net2.connect(address, () => {
59222
+ const socket = net3.connect(address, () => {
59223
59223
  socket.removeListener("close", closeCallback);
59224
59224
  socket.removeListener("error", errorCallback);
59225
59225
  resolve29(socket);
@@ -113721,13 +113721,13 @@ var require_internet = __commonJS({
113721
113721
  var require_dockerSocket = __commonJS({
113722
113722
  "packages/core/node_modules/systeminformation/lib/dockerSocket.js"(exports2, module2) {
113723
113723
  "use strict";
113724
- var net2 = __require("net");
113724
+ var net3 = __require("net");
113725
113725
  var isWin2 = __require("os").type() === "Windows_NT";
113726
113726
  var socketPath = isWin2 ? "//./pipe/docker_engine" : "/var/run/docker.sock";
113727
113727
  var DockerSocket = class {
113728
113728
  getInfo(callback) {
113729
113729
  try {
113730
- let socket = net2.createConnection({ path: socketPath });
113730
+ let socket = net3.createConnection({ path: socketPath });
113731
113731
  let alldata = "";
113732
113732
  let data;
113733
113733
  socket.on("connect", () => {
@@ -113757,7 +113757,7 @@ var require_dockerSocket = __commonJS({
113757
113757
  }
113758
113758
  listImages(all2, callback) {
113759
113759
  try {
113760
- let socket = net2.createConnection({ path: socketPath });
113760
+ let socket = net3.createConnection({ path: socketPath });
113761
113761
  let alldata = "";
113762
113762
  let data;
113763
113763
  socket.on("connect", () => {
@@ -113789,7 +113789,7 @@ var require_dockerSocket = __commonJS({
113789
113789
  id = id || "";
113790
113790
  if (id) {
113791
113791
  try {
113792
- let socket = net2.createConnection({ path: socketPath });
113792
+ let socket = net3.createConnection({ path: socketPath });
113793
113793
  let alldata = "";
113794
113794
  let data;
113795
113795
  socket.on("connect", () => {
@@ -113822,7 +113822,7 @@ var require_dockerSocket = __commonJS({
113822
113822
  }
113823
113823
  listContainers(all2, callback) {
113824
113824
  try {
113825
- let socket = net2.createConnection({ path: socketPath });
113825
+ let socket = net3.createConnection({ path: socketPath });
113826
113826
  let alldata = "";
113827
113827
  let data;
113828
113828
  socket.on("connect", () => {
@@ -113854,7 +113854,7 @@ var require_dockerSocket = __commonJS({
113854
113854
  id = id || "";
113855
113855
  if (id) {
113856
113856
  try {
113857
- let socket = net2.createConnection({ path: socketPath });
113857
+ let socket = net3.createConnection({ path: socketPath });
113858
113858
  let alldata = "";
113859
113859
  let data;
113860
113860
  socket.on("connect", () => {
@@ -113889,7 +113889,7 @@ var require_dockerSocket = __commonJS({
113889
113889
  id = id || "";
113890
113890
  if (id) {
113891
113891
  try {
113892
- let socket = net2.createConnection({ path: socketPath });
113892
+ let socket = net3.createConnection({ path: socketPath });
113893
113893
  let alldata = "";
113894
113894
  let data;
113895
113895
  socket.on("connect", () => {
@@ -113924,7 +113924,7 @@ var require_dockerSocket = __commonJS({
113924
113924
  id = id || "";
113925
113925
  if (id) {
113926
113926
  try {
113927
- let socket = net2.createConnection({ path: socketPath });
113927
+ let socket = net3.createConnection({ path: socketPath });
113928
113928
  let alldata = "";
113929
113929
  let data;
113930
113930
  socket.on("connect", () => {
@@ -113957,7 +113957,7 @@ var require_dockerSocket = __commonJS({
113957
113957
  }
113958
113958
  listVolumes(callback) {
113959
113959
  try {
113960
- let socket = net2.createConnection({ path: socketPath });
113960
+ let socket = net3.createConnection({ path: socketPath });
113961
113961
  let alldata = "";
113962
113962
  let data;
113963
113963
  socket.on("connect", () => {
@@ -210580,7 +210580,7 @@ var require_util20 = __commonJS({
210580
210580
  var { kDestroyed, kBodyUsed, kListeners, kBody } = require_symbols();
210581
210581
  var { IncomingMessage } = __require("node:http");
210582
210582
  var stream2 = __require("node:stream");
210583
- var net2 = __require("node:net");
210583
+ var net3 = __require("node:net");
210584
210584
  var { Blob: Blob2 } = __require("node:buffer");
210585
210585
  var nodeUtil = __require("node:util");
210586
210586
  var { stringify: stringify3 } = __require("node:querystring");
@@ -210726,7 +210726,7 @@ var require_util20 = __commonJS({
210726
210726
  }
210727
210727
  assert3(typeof host === "string");
210728
210728
  const servername = getHostname(host);
210729
- if (net2.isIP(servername)) {
210729
+ if (net3.isIP(servername)) {
210730
210730
  return "";
210731
210731
  }
210732
210732
  return servername;
@@ -212038,7 +212038,7 @@ var require_dispatcher_base = __commonJS({
212038
212038
  var require_connect = __commonJS({
212039
212039
  "packages/core/node_modules/undici/lib/core/connect.js"(exports2, module2) {
212040
212040
  "use strict";
212041
- var net2 = __require("node:net");
212041
+ var net3 = __require("node:net");
212042
212042
  var assert3 = __require("node:assert");
212043
212043
  var util4 = require_util20();
212044
212044
  var { InvalidArgumentError } = require_errors6();
@@ -212092,7 +212092,7 @@ var require_connect = __commonJS({
212092
212092
  }
212093
212093
  };
212094
212094
  }
212095
- function buildConnector({ allowH2, maxCachedSessions, socketPath, timeout, session: customSession, ...opts }) {
212095
+ function buildConnector2({ allowH2, maxCachedSessions, socketPath, timeout, session: customSession, ...opts }) {
212096
212096
  if (maxCachedSessions != null && (!Number.isInteger(maxCachedSessions) || maxCachedSessions < 0)) {
212097
212097
  throw new InvalidArgumentError("maxCachedSessions must be a positive integer or zero");
212098
212098
  }
@@ -212130,7 +212130,7 @@ var require_connect = __commonJS({
212130
212130
  } else {
212131
212131
  assert3(!httpSocket, "httpSocket can only be sent on TLS update");
212132
212132
  port = port || 80;
212133
- socket = net2.connect({
212133
+ socket = net3.connect({
212134
212134
  highWaterMark: 64 * 1024,
212135
212135
  // Same as nodejs fs streams.
212136
212136
  ...options,
@@ -212162,7 +212162,7 @@ var require_connect = __commonJS({
212162
212162
  return socket;
212163
212163
  };
212164
212164
  }
212165
- module2.exports = buildConnector;
212165
+ module2.exports = buildConnector2;
212166
212166
  }
212167
212167
  });
212168
212168
 
@@ -217276,7 +217276,7 @@ var require_client2 = __commonJS({
217276
217276
  "packages/core/node_modules/undici/lib/dispatcher/client.js"(exports2, module2) {
217277
217277
  "use strict";
217278
217278
  var assert3 = __require("node:assert");
217279
- var net2 = __require("node:net");
217279
+ var net3 = __require("node:net");
217280
217280
  var http3 = __require("node:http");
217281
217281
  var util4 = require_util20();
217282
217282
  var { ClientStats } = require_stats();
@@ -217288,7 +217288,7 @@ var require_client2 = __commonJS({
217288
217288
  InformationalError,
217289
217289
  ClientDestroyedError
217290
217290
  } = require_errors6();
217291
- var buildConnector = require_connect();
217291
+ var buildConnector2 = require_connect();
217292
217292
  var {
217293
217293
  kUrl,
217294
217294
  kServerName,
@@ -217423,7 +217423,7 @@ var require_client2 = __commonJS({
217423
217423
  if (maxRequestsPerClient != null && (!Number.isInteger(maxRequestsPerClient) || maxRequestsPerClient < 0)) {
217424
217424
  throw new InvalidArgumentError("maxRequestsPerClient must be a positive number");
217425
217425
  }
217426
- if (localAddress != null && (typeof localAddress !== "string" || net2.isIP(localAddress) === 0)) {
217426
+ if (localAddress != null && (typeof localAddress !== "string" || net3.isIP(localAddress) === 0)) {
217427
217427
  throw new InvalidArgumentError("localAddress must be valid string IP address");
217428
217428
  }
217429
217429
  if (maxResponseSize != null && (!Number.isInteger(maxResponseSize) || maxResponseSize < -1)) {
@@ -217440,7 +217440,7 @@ var require_client2 = __commonJS({
217440
217440
  }
217441
217441
  super();
217442
217442
  if (typeof connect2 !== "function") {
217443
- connect2 = buildConnector({
217443
+ connect2 = buildConnector2({
217444
217444
  ...tls,
217445
217445
  maxCachedSessions,
217446
217446
  allowH2,
@@ -217578,7 +217578,7 @@ var require_client2 = __commonJS({
217578
217578
  const idx = hostname3.indexOf("]");
217579
217579
  assert3(idx !== -1);
217580
217580
  const ip = hostname3.substring(1, idx);
217581
- assert3(net2.isIPv6(ip));
217581
+ assert3(net3.isIPv6(ip));
217582
217582
  hostname3 = ip;
217583
217583
  }
217584
217584
  client[kConnecting] = true;
@@ -218013,7 +218013,7 @@ var require_pool2 = __commonJS({
218013
218013
  } = require_errors6();
218014
218014
  var util4 = require_util20();
218015
218015
  var { kUrl } = require_symbols();
218016
- var buildConnector = require_connect();
218016
+ var buildConnector2 = require_connect();
218017
218017
  var kOptions = Symbol("options");
218018
218018
  var kConnections = Symbol("connections");
218019
218019
  var kFactory = Symbol("factory");
@@ -218046,7 +218046,7 @@ var require_pool2 = __commonJS({
218046
218046
  }
218047
218047
  super();
218048
218048
  if (typeof connect !== "function") {
218049
- connect = buildConnector({
218049
+ connect = buildConnector2({
218050
218050
  ...tls,
218051
218051
  maxCachedSessions,
218052
218052
  allowH2,
@@ -218361,7 +218361,7 @@ var require_proxy_agent = __commonJS({
218361
218361
  var Pool = require_pool2();
218362
218362
  var DispatcherBase = require_dispatcher_base();
218363
218363
  var { InvalidArgumentError, RequestAbortedError, SecureProxyConnectionError } = require_errors6();
218364
- var buildConnector = require_connect();
218364
+ var buildConnector2 = require_connect();
218365
218365
  var Client3 = require_client2();
218366
218366
  var kAgent = Symbol("proxy agent");
218367
218367
  var kClient = Symbol("proxy client");
@@ -218459,8 +218459,8 @@ var require_proxy_agent = __commonJS({
218459
218459
  }
218460
218460
  return new Client3(origin2, options);
218461
218461
  } : void 0;
218462
- const connect = buildConnector({ ...opts.proxyTls });
218463
- this[kConnectEndpoint] = buildConnector({ ...opts.requestTls });
218462
+ const connect = buildConnector2({ ...opts.proxyTls });
218463
+ this[kConnectEndpoint] = buildConnector2({ ...opts.requestTls });
218464
218464
  this[kClient] = clientFactory(url3, { connect, factory });
218465
218465
  this[kTunnelProxy] = proxyTunnel;
218466
218466
  this[kAgent] = new Agent2({
@@ -221841,7 +221841,7 @@ var require_dump = __commonJS({
221841
221841
  var require_dns = __commonJS({
221842
221842
  "packages/core/node_modules/undici/lib/interceptor/dns.js"(exports2, module2) {
221843
221843
  "use strict";
221844
- var { isIP } = __require("node:net");
221844
+ var { isIP: isIP2 } = __require("node:net");
221845
221845
  var { lookup: lookup3 } = __require("node:dns");
221846
221846
  var DecoratorHandler = require_decorator_handler();
221847
221847
  var { InvalidArgumentError, InformationalError } = require_errors6();
@@ -222140,7 +222140,7 @@ var require_dns = __commonJS({
222140
222140
  return (dispatch) => {
222141
222141
  return function dnsInterceptor(origDispatchOpts, handler) {
222142
222142
  const origin = origDispatchOpts.origin.constructor === URL ? origDispatchOpts.origin : new URL(origDispatchOpts.origin);
222143
- if (isIP(origin.hostname) !== 0) {
222143
+ if (isIP2(origin.hostname) !== 0) {
222144
222144
  return dispatch(origDispatchOpts, handler);
222145
222145
  }
222146
222146
  instance2.runLookup(origin, origDispatchOpts, (err2, newOrigin) => {
@@ -230250,7 +230250,7 @@ var require_undici = __commonJS({
230250
230250
  var util4 = require_util20();
230251
230251
  var { InvalidArgumentError } = errors;
230252
230252
  var api = require_api2();
230253
- var buildConnector = require_connect();
230253
+ var buildConnector2 = require_connect();
230254
230254
  var MockClient = require_mock_client();
230255
230255
  var { MockCallHistory, MockCallHistoryLog } = require_mock_call_history();
230256
230256
  var MockAgent = require_mock_agent();
@@ -230286,7 +230286,7 @@ var require_undici = __commonJS({
230286
230286
  };
230287
230287
  var SqliteCacheStore = require_sqlite_cache_store();
230288
230288
  module2.exports.cacheStores.SqliteCacheStore = SqliteCacheStore;
230289
- module2.exports.buildConnector = buildConnector;
230289
+ module2.exports.buildConnector = buildConnector2;
230290
230290
  module2.exports.errors = errors;
230291
230291
  module2.exports.util = {
230292
230292
  parseHeaders: util4.parseHeaders,
@@ -282909,8 +282909,8 @@ function isValidToolName(name3, options = {}) {
282909
282909
  }
282910
282910
 
282911
282911
  // packages/core/src/generated/git-commit.ts
282912
- var GIT_COMMIT_INFO = "0bd1d4397";
282913
- var CLI_VERSION = "0.59.0-nightly.20260825.g812f7a2bc";
282912
+ var GIT_COMMIT_INFO = "87a9c71d5";
282913
+ var CLI_VERSION = "0.60.0-nightly.20260901.g0bd1d4397";
282914
282914
 
282915
282915
  // packages/core/src/ide/detect-ide.ts
282916
282916
  var IDE_DEFINITIONS = {
@@ -306530,7 +306530,7 @@ function getVersion() {
306530
306530
  }
306531
306531
  versionPromise = (async () => {
306532
306532
  const pkgJson = await getPackageJson(__dirname4);
306533
- return "0.59.0-nightly.20260825.g812f7a2bc";
306533
+ return "0.60.0-nightly.20260901.g0bd1d4397";
306534
306534
  })();
306535
306535
  return versionPromise;
306536
306536
  }
@@ -326310,9 +326310,10 @@ var ShellTool = class _ShellTool extends BaseDeclarativeTool {
326310
326310
  };
326311
326311
 
326312
326312
  // packages/core/src/utils/fetch.ts
326313
- var import_undici2 = __toESM(require_undici(), 1);
326313
+ var undici = __toESM(require_undici(), 1);
326314
326314
  var import_ipaddr = __toESM(require_ipaddr(), 1);
326315
326315
  import { URL as URL5 } from "node:url";
326316
+ import * as net2 from "node:net";
326316
326317
  import { lookup } from "node:dns/promises";
326317
326318
  var FetchError = class extends Error {
326318
326319
  constructor(message, code, options) {
@@ -326330,8 +326331,113 @@ var PrivateIpError = class extends Error {
326330
326331
  var defaultHeadersTimeout = 6e4;
326331
326332
  var defaultBodyTimeout = 3e5;
326332
326333
  var currentProxy = void 0;
326333
- (0, import_undici2.setGlobalDispatcher)(
326334
- new import_undici2.Agent({
326334
+ function getBuildConnector() {
326335
+ try {
326336
+ const fn = undici.buildConnector;
326337
+ return typeof fn === "function" ? fn : void 0;
326338
+ } catch {
326339
+ return void 0;
326340
+ }
326341
+ }
326342
+ function safeLookup(hostname3, options, callback) {
326343
+ const sanitized = sanitizeHostname(hostname3);
326344
+ if (sanitized === "localhost" || sanitized.endsWith(".localhost") || sanitized.endsWith(".local") || sanitized.endsWith(".internal")) {
326345
+ callback(
326346
+ new PrivateIpError(`Access to internal host ${sanitized} is blocked`),
326347
+ ""
326348
+ );
326349
+ return;
326350
+ }
326351
+ if (net2.isIP(sanitized)) {
326352
+ if (isAddressPrivate(sanitized)) {
326353
+ callback(
326354
+ new PrivateIpError(`Access to private IP ${sanitized} is blocked`),
326355
+ ""
326356
+ );
326357
+ return;
326358
+ }
326359
+ if (options?.all) {
326360
+ callback(null, [{ address: sanitized, family: net2.isIP(sanitized) }]);
326361
+ } else {
326362
+ callback(null, sanitized, net2.isIP(sanitized));
326363
+ }
326364
+ return;
326365
+ }
326366
+ lookup(sanitized, { all: true }).then((addresses) => {
326367
+ if (!addresses || addresses.length === 0) {
326368
+ callback(new Error(`getaddrinfo ENOTFOUND ${sanitized}`), "");
326369
+ return;
326370
+ }
326371
+ for (const addr2 of addresses) {
326372
+ if (isAddressPrivate(addr2.address)) {
326373
+ callback(
326374
+ new PrivateIpError(
326375
+ `Access to private IP ${addr2.address} (resolved from ${sanitized}) is blocked`
326376
+ ),
326377
+ ""
326378
+ );
326379
+ return;
326380
+ }
326381
+ }
326382
+ if (options?.all) {
326383
+ callback(null, addresses);
326384
+ } else {
326385
+ const family = options?.family;
326386
+ const match2 = family ? addresses.find((a2) => a2.family === family) || addresses[0] : addresses[0];
326387
+ callback(null, match2.address, match2.family);
326388
+ }
326389
+ }).catch((err2) => {
326390
+ callback(err2 instanceof Error ? err2 : new Error(String(err2)), "");
326391
+ });
326392
+ }
326393
+ function createSafeConnector(connectorOpts, customDefaultConnector) {
326394
+ const buildConnectorFn = getBuildConnector();
326395
+ const safeConnectorOpts = {
326396
+ ...connectorOpts,
326397
+ lookup: safeLookup
326398
+ };
326399
+ const defaultConnector = customDefaultConnector ?? (buildConnectorFn ? buildConnectorFn(safeConnectorOpts) : void 0);
326400
+ return function safeConnect(opts, callback) {
326401
+ if (!defaultConnector) {
326402
+ callback(new Error("Connector is unavailable"), null);
326403
+ return;
326404
+ }
326405
+ const rawHostname = opts.hostname;
326406
+ const sanitized = sanitizeHostname(rawHostname);
326407
+ if (sanitized === "localhost" || sanitized.endsWith(".localhost") || sanitized.endsWith(".local") || sanitized.endsWith(".internal")) {
326408
+ callback(
326409
+ new PrivateIpError(`Access to internal host ${sanitized} is blocked`),
326410
+ null
326411
+ );
326412
+ return;
326413
+ }
326414
+ if (net2.isIP(sanitized) && isAddressPrivate(sanitized)) {
326415
+ callback(
326416
+ new PrivateIpError(`Access to private IP ${sanitized} is blocked`),
326417
+ null
326418
+ );
326419
+ return;
326420
+ }
326421
+ defaultConnector(opts, callback);
326422
+ };
326423
+ }
326424
+ function createSafeAgent(options) {
326425
+ const buildConnectorFn = getBuildConnector();
326426
+ if (!buildConnectorFn) {
326427
+ throw new Error(
326428
+ "Security initialization failed: undici.buildConnector is not available."
326429
+ );
326430
+ }
326431
+ const connect = createSafeConnector();
326432
+ return new undici.Agent({
326433
+ headersTimeout: options?.headersTimeout ?? defaultHeadersTimeout,
326434
+ bodyTimeout: options?.bodyTimeout ?? defaultBodyTimeout,
326435
+ connect
326436
+ });
326437
+ }
326438
+ var defaultSafeAgent = createSafeAgent();
326439
+ undici.setGlobalDispatcher(
326440
+ new undici.Agent({
326335
326441
  headersTimeout: defaultHeadersTimeout,
326336
326442
  bodyTimeout: defaultBodyTimeout
326337
326443
  })
@@ -326343,11 +326449,15 @@ function updateGlobalFetchTimeouts(timeoutMs) {
326343
326449
  );
326344
326450
  }
326345
326451
  defaultHeadersTimeout = timeoutMs;
326452
+ defaultSafeAgent = createSafeAgent({
326453
+ headersTimeout: defaultHeadersTimeout,
326454
+ bodyTimeout: defaultBodyTimeout
326455
+ });
326346
326456
  if (currentProxy) {
326347
326457
  setGlobalProxy(currentProxy);
326348
326458
  } else {
326349
- (0, import_undici2.setGlobalDispatcher)(
326350
- new import_undici2.Agent({
326459
+ undici.setGlobalDispatcher(
326460
+ new undici.Agent({
326351
326461
  headersTimeout: defaultHeadersTimeout,
326352
326462
  bodyTimeout: defaultBodyTimeout
326353
326463
  })
@@ -326361,14 +326471,6 @@ function isLoopbackHost(hostname3) {
326361
326471
  const sanitized = sanitizeHostname(hostname3);
326362
326472
  return sanitized === "localhost" || sanitized === "127.0.0.1" || sanitized === "::1";
326363
326473
  }
326364
- function isPrivateIp(url3) {
326365
- try {
326366
- const hostname3 = new URL5(url3).hostname;
326367
- return isAddressPrivate(hostname3);
326368
- } catch {
326369
- return false;
326370
- }
326371
- }
326372
326474
  var IANA_BENCHMARK_RANGE = import_ipaddr.default.parseCIDR("198.18.0.0/15");
326373
326475
  function isBenchmarkAddress(addr2) {
326374
326476
  const [rangeAddr, rangeMask] = IANA_BENCHMARK_RANGE;
@@ -326376,7 +326478,7 @@ function isBenchmarkAddress(addr2) {
326376
326478
  }
326377
326479
  function isAddressPrivate(address) {
326378
326480
  const sanitized = sanitizeHostname(address);
326379
- if (sanitized === "localhost") {
326481
+ if (sanitized === "localhost" || sanitized.endsWith(".localhost") || sanitized.endsWith(".local") || sanitized.endsWith(".internal")) {
326380
326482
  return true;
326381
326483
  }
326382
326484
  try {
@@ -326396,27 +326498,53 @@ function isAddressPrivate(address) {
326396
326498
  }
326397
326499
  }
326398
326500
  async function isPrivateIpAsync(url3) {
326501
+ let parsedUrl;
326399
326502
  try {
326400
- const parsedUrl = new URL5(url3);
326401
- const hostname3 = parsedUrl.hostname;
326402
- if (isLoopbackHost(hostname3)) {
326503
+ parsedUrl = new URL5(url3);
326504
+ } catch (error40) {
326505
+ if (error40 instanceof TypeError) {
326403
326506
  return false;
326404
326507
  }
326508
+ throw error40;
326509
+ }
326510
+ const hostname3 = sanitizeHostname(parsedUrl.hostname);
326511
+ if (hostname3 === "localhost" || hostname3.endsWith(".localhost") || hostname3.endsWith(".local") || hostname3.endsWith(".internal")) {
326512
+ return true;
326513
+ }
326514
+ if (net2.isIP(hostname3)) {
326515
+ return isAddressPrivate(hostname3);
326516
+ }
326517
+ try {
326405
326518
  const addresses = await lookup(hostname3, { all: true });
326519
+ if (!addresses || addresses.length === 0) {
326520
+ return true;
326521
+ }
326406
326522
  return addresses.some((addr2) => isAddressPrivate(addr2.address));
326407
326523
  } catch (error40) {
326408
- if (error40 instanceof TypeError) {
326409
- return false;
326410
- }
326411
326524
  throw new Error("Failed to verify if URL resolves to private IP", {
326412
326525
  cause: error40
326413
326526
  });
326414
326527
  }
326415
326528
  }
326529
+ async function isPrivateIp(url3) {
326530
+ try {
326531
+ return await isPrivateIpAsync(url3);
326532
+ } catch {
326533
+ return true;
326534
+ }
326535
+ }
326536
+ async function validateUrlDestination(url3) {
326537
+ try {
326538
+ const isPrivate = await isPrivateIp(url3);
326539
+ return !isPrivate;
326540
+ } catch {
326541
+ return false;
326542
+ }
326543
+ }
326416
326544
  function createSafeProxyAgent(proxyUrl) {
326417
326545
  const trimmedProxy = proxyUrl.trim();
326418
326546
  const noProxy = (process.env["NO_PROXY"] ?? process.env["no_proxy"] ?? "")?.trim();
326419
- return new import_undici2.EnvHttpProxyAgent({
326547
+ return new undici.EnvHttpProxyAgent({
326420
326548
  httpProxy: trimmedProxy,
326421
326549
  httpsProxy: trimmedProxy,
326422
326550
  noProxy,
@@ -326425,6 +326553,11 @@ function createSafeProxyAgent(proxyUrl) {
326425
326553
  });
326426
326554
  }
326427
326555
  async function fetchWithTimeout(url3, timeout, options) {
326556
+ if (await isPrivateIp(url3)) {
326557
+ throw new PrivateIpError(
326558
+ `Access to blocked or private host ${url3} is not allowed.`
326559
+ );
326560
+ }
326428
326561
  const controller = new AbortController();
326429
326562
  const timeoutId = setTimeout(() => controller.abort(), timeout);
326430
326563
  if (options?.signal) {
@@ -326437,10 +326570,14 @@ async function fetchWithTimeout(url3, timeout, options) {
326437
326570
  }
326438
326571
  }
326439
326572
  try {
326440
- const response = await fetch(url3, {
326573
+ const fetchOptions = {
326441
326574
  ...options,
326442
326575
  signal: controller.signal
326443
- });
326576
+ };
326577
+ if (!fetchOptions.dispatcher) {
326578
+ fetchOptions.dispatcher = currentProxy ? createSafeProxyAgent(currentProxy) : defaultSafeAgent;
326579
+ }
326580
+ const response = await fetch(url3, fetchOptions);
326444
326581
  return response;
326445
326582
  } catch (error40) {
326446
326583
  if (isAbortError(error40)) {
@@ -326449,6 +326586,14 @@ async function fetchWithTimeout(url3, timeout, options) {
326449
326586
  }
326450
326587
  throw new FetchError(`Request timed out after ${timeout}ms`, "ETIMEDOUT");
326451
326588
  }
326589
+ if (error40 instanceof PrivateIpError) {
326590
+ throw error40;
326591
+ }
326592
+ if (error40 && typeof error40 === "object" && "cause" in error40) {
326593
+ if (error40.cause instanceof PrivateIpError) {
326594
+ throw error40.cause;
326595
+ }
326596
+ }
326452
326597
  throw new FetchError(getErrorMessage(error40), void 0, { cause: error40 });
326453
326598
  } finally {
326454
326599
  clearTimeout(timeoutId);
@@ -326458,8 +326603,8 @@ function setGlobalProxy(proxy2) {
326458
326603
  const trimmedProxy = proxy2.trim();
326459
326604
  currentProxy = trimmedProxy;
326460
326605
  const noProxy = (process.env["NO_PROXY"] ?? process.env["no_proxy"] ?? "")?.trim();
326461
- (0, import_undici2.setGlobalDispatcher)(
326462
- new import_undici2.EnvHttpProxyAgent({
326606
+ undici.setGlobalDispatcher(
326607
+ new undici.EnvHttpProxyAgent({
326463
326608
  httpProxy: trimmedProxy,
326464
326609
  httpsProxy: trimmedProxy,
326465
326610
  noProxy,
@@ -331531,21 +331676,21 @@ var WebFetchToolInvocation = class extends BaseToolInvocation {
331531
331676
  )
331532
331677
  );
331533
331678
  }
331534
- isBlockedHost(urlStr) {
331679
+ async isBlockedHost(urlStr) {
331535
331680
  try {
331536
331681
  const url3 = new URL(urlStr);
331537
331682
  const hostname3 = url3.hostname.toLowerCase();
331538
- if (hostname3 === "localhost" || hostname3 === "127.0.0.1") {
331683
+ if (hostname3 === "localhost" || hostname3 === "127.0.0.1" || hostname3.endsWith(".localhost") || hostname3.endsWith(".local") || hostname3.endsWith(".internal")) {
331539
331684
  return true;
331540
331685
  }
331541
- return isPrivateIp(urlStr);
331686
+ return await isPrivateIp(urlStr);
331542
331687
  } catch {
331543
331688
  return true;
331544
331689
  }
331545
331690
  }
331546
331691
  async executeFallbackForUrl(urlStr, signal) {
331547
331692
  const url3 = convertGithubUrlToRaw(urlStr);
331548
- if (this.isBlockedHost(url3)) {
331693
+ if (await this.isBlockedHost(url3)) {
331549
331694
  debugLogger.warn(`[WebFetchTool] Blocked access to host: ${url3}`);
331550
331695
  throw new Error(
331551
331696
  `Access to blocked or private host ${url3} is not allowed.`
@@ -331601,12 +331746,12 @@ var WebFetchToolInvocation = class extends BaseToolInvocation {
331601
331746
  }
331602
331747
  return textContent2;
331603
331748
  }
331604
- filterAndValidateUrls(urls) {
331749
+ async filterAndValidateUrls(urls) {
331605
331750
  const uniqueUrls = [...new Set(urls.map(normalizeUrl))];
331606
331751
  const toFetch = [];
331607
331752
  const skipped = [];
331608
331753
  for (const url3 of uniqueUrls) {
331609
- if (this.isBlockedHost(url3)) {
331754
+ if (await this.isBlockedHost(url3)) {
331610
331755
  debugLogger.warn(
331611
331756
  `[WebFetchTool] Skipped private or local host: ${url3}`
331612
331757
  );
@@ -331822,7 +331967,7 @@ ${aggregatedContent}
331822
331967
  };
331823
331968
  }
331824
331969
  url3 = convertGithubUrlToRaw(url3);
331825
- if (this.isBlockedHost(url3)) {
331970
+ if (await this.isBlockedHost(url3)) {
331826
331971
  const errorMessage = `Access to blocked or private host ${url3} is not allowed.`;
331827
331972
  debugLogger.warn(
331828
331973
  `[WebFetchTool] Blocked experimental fetch to host: ${url3}`
@@ -331956,7 +332101,7 @@ Response: ${rawResponseText}`;
331956
332101
  }
331957
332102
  const userPrompt = this.params.prompt;
331958
332103
  const { validUrls } = parsePrompt(userPrompt);
331959
- const { toFetch, skipped } = this.filterAndValidateUrls(validUrls);
332104
+ const { toFetch, skipped } = await this.filterAndValidateUrls(validUrls);
331960
332105
  if (toFetch.length === 0 && skipped.length > 0) {
331961
332106
  const errorMessage = `All requested URLs were skipped: ${skipped.join(", ")}`;
331962
332107
  debugLogger.error(`[WebFetchTool] ${errorMessage}`);
@@ -341788,7 +341933,7 @@ var A2AAuthProviderFactory = class _A2AAuthProviderFactory {
341788
341933
  return provider;
341789
341934
  }
341790
341935
  case "oauth2": {
341791
- const { OAuth2AuthProvider } = await import("./oauth2-provider-3RBG2E74.js");
341936
+ const { OAuth2AuthProvider } = await import("./oauth2-provider-U7ADSCRE.js");
341792
341937
  const provider = new OAuth2AuthProvider(
341793
341938
  authConfig,
341794
341939
  options.agentName ?? "unknown",
@@ -371497,7 +371642,7 @@ var SSEClientTransport = class {
371497
371642
  };
371498
371643
 
371499
371644
  // packages/core/src/tools/mcp-client.ts
371500
- var import_undici3 = __toESM(require_undici(), 1);
371645
+ var import_undici2 = __toESM(require_undici(), 1);
371501
371646
  var import_shell_quote7 = __toESM(require_shell_quote(), 1);
371502
371647
 
371503
371648
  // packages/core/src/mcp/google-auth-provider.ts
@@ -372009,7 +372154,28 @@ function generatePKCEParams() {
372009
372154
  const state = crypto20.randomBytes(16).toString("base64url");
372010
372155
  return { codeVerifier, codeChallenge, state };
372011
372156
  }
372012
- function startCallbackServer(expectedState, port) {
372157
+ function areIssuersEqual(issuerA, issuerB) {
372158
+ if (issuerA === issuerB && !issuerA.includes("@")) return true;
372159
+ const normalize6 = (iss) => {
372160
+ try {
372161
+ const u2 = new URL6(iss);
372162
+ if (u2.username || u2.password) {
372163
+ return null;
372164
+ }
372165
+ const normalizedPath = u2.pathname.replace(/\/+$/, "");
372166
+ return `${u2.protocol}//${u2.host}${normalizedPath}${u2.search}${u2.hash}`;
372167
+ } catch {
372168
+ return iss.replace(/\/+$/, "");
372169
+ }
372170
+ };
372171
+ const normA = normalize6(issuerA);
372172
+ const normB = normalize6(issuerB);
372173
+ if (normA === null || normB === null) {
372174
+ return false;
372175
+ }
372176
+ return normA === normB;
372177
+ }
372178
+ function startCallbackServer(expectedState, port, expectedIssuer) {
372013
372179
  let portResolve;
372014
372180
  let portReject;
372015
372181
  const portPromise = new Promise((resolve29, reject) => {
@@ -372032,7 +372198,9 @@ function startCallbackServer(expectedState, port) {
372032
372198
  const code = url3.searchParams.get("code");
372033
372199
  const state = url3.searchParams.get("state");
372034
372200
  const error40 = url3.searchParams.get("error");
372201
+ const iss = url3.searchParams.get("iss") || void 0;
372035
372202
  if (error40) {
372203
+ debugLogger.warn(`OAuth callback received error: ${error40}`);
372036
372204
  res.writeHead(HTTP_OK, { "Content-Type": "text/html" });
372037
372205
  res.end(`
372038
372206
  <html>
@@ -372049,17 +372217,76 @@ function startCallbackServer(expectedState, port) {
372049
372217
  return;
372050
372218
  }
372051
372219
  if (!code || !state) {
372220
+ debugLogger.warn(
372221
+ "OAuth callback rejected: Missing code or state parameter."
372222
+ );
372052
372223
  res.writeHead(400);
372053
372224
  res.end("Missing code or state parameter");
372054
372225
  return;
372055
372226
  }
372056
372227
  if (state !== expectedState) {
372228
+ debugLogger.error(
372229
+ `OAuth callback state mismatch: received state "${state}", expected "${expectedState}". Possible CSRF attack.`
372230
+ );
372057
372231
  res.writeHead(400);
372058
372232
  res.end("Invalid state parameter");
372059
372233
  server.close();
372060
372234
  reject(new Error("State mismatch - possible CSRF attack"));
372061
372235
  return;
372062
372236
  }
372237
+ if (expectedIssuer) {
372238
+ if (!iss) {
372239
+ debugLogger.error(
372240
+ 'OAuth callback rejected: Missing required "iss" parameter when an expected issuer is configured. Possible IdP mix-up attack (RFC 9207).'
372241
+ );
372242
+ res.writeHead(400, { "Content-Type": "text/html" });
372243
+ res.end(`
372244
+ <html>
372245
+ <body>
372246
+ <h1>Authentication Failed</h1>
372247
+ <p>Error: Missing issuer parameter in response.</p>
372248
+ <p>You can close this window.</p>
372249
+ </body>
372250
+ </html>
372251
+ `);
372252
+ server.close();
372253
+ reject(
372254
+ new Error(
372255
+ 'Missing "iss" parameter in authorization response per RFC 9207'
372256
+ )
372257
+ );
372258
+ return;
372259
+ }
372260
+ if (!areIssuersEqual(iss, expectedIssuer)) {
372261
+ debugLogger.error(
372262
+ "OAuth callback rejected: Issuer mismatch between authorization response and expected authorization server. Possible IdP mix-up attack (RFC 9207)."
372263
+ );
372264
+ res.writeHead(400, { "Content-Type": "text/html" });
372265
+ res.end(`
372266
+ <html>
372267
+ <body>
372268
+ <h1>Authentication Failed</h1>
372269
+ <p>Error: Issuer mismatch - possible OAuth mix-up attack.</p>
372270
+ <p>You can close this window.</p>
372271
+ </body>
372272
+ </html>
372273
+ `);
372274
+ server.close();
372275
+ reject(
372276
+ new Error(
372277
+ "Issuer mismatch in authorization response - possible OAuth mix-up attack"
372278
+ )
372279
+ );
372280
+ return;
372281
+ }
372282
+ debugLogger.debug(
372283
+ "\u2713 OAuth callback issuer validated successfully."
372284
+ );
372285
+ } else if (iss) {
372286
+ debugLogger.debug(
372287
+ 'OAuth callback received "iss" parameter (no expected issuer was configured).'
372288
+ );
372289
+ }
372063
372290
  res.writeHead(HTTP_OK, { "Content-Type": "text/html" });
372064
372291
  res.end(`
372065
372292
  <html>
@@ -372071,7 +372298,7 @@ function startCallbackServer(expectedState, port) {
372071
372298
  </html>
372072
372299
  `);
372073
372300
  server.close();
372074
- resolve29({ code, state });
372301
+ resolve29({ code, state, iss });
372075
372302
  } catch (error40) {
372076
372303
  server.close();
372077
372304
  reject(error40);
@@ -372538,7 +372765,14 @@ var MCPOAuthProvider = class {
372538
372765
  }
372539
372766
  const pkceParams = generatePKCEParams();
372540
372767
  const preferredPort = getPortFromUrl(config2.redirectUri);
372541
- const callbackServer = startCallbackServer(pkceParams.state, preferredPort);
372768
+ debugLogger.debug(
372769
+ `Starting callback server for "${serverName}" (expected issuer: ${config2.issuer || "none"})...`
372770
+ );
372771
+ const callbackServer = startCallbackServer(
372772
+ pkceParams.state,
372773
+ preferredPort,
372774
+ config2.issuer
372775
+ );
372542
372776
  const redirectPort = await callbackServer.port;
372543
372777
  debugLogger.debug(`Callback server listening on port ${redirectPort}`);
372544
372778
  if (!config2.clientId) {
@@ -374280,7 +374514,7 @@ async function connectToMcpServer(clientVersion, mcpServerName, mcpServerConfig,
374280
374514
  }
374281
374515
  function createUrlTransport(mcpServerName, mcpServerConfig, transportOptions) {
374282
374516
  const noProxy = process.env["NO_PROXY"] || process.env["no_proxy"];
374283
- const agent = new import_undici3.EnvHttpProxyAgent({ noProxy });
374517
+ const agent = new import_undici2.EnvHttpProxyAgent({ noProxy });
374284
374518
  const baseFetch = transportOptions.fetch ?? globalThis.fetch;
374285
374519
  const httpOptions = {
374286
374520
  ...transportOptions,
@@ -382572,7 +382806,7 @@ function v43(options, buf, offset) {
382572
382806
  var v4_default3 = v43;
382573
382807
 
382574
382808
  // packages/core/src/agents/a2a-client-manager.ts
382575
- var import_undici4 = __toESM(require_undici(), 1);
382809
+ var import_undici3 = __toESM(require_undici(), 1);
382576
382810
  var A2A_TIMEOUT = 18e5;
382577
382811
  var A2AClientManager = class {
382578
382812
  constructor(config2) {
@@ -382583,12 +382817,12 @@ var A2AClientManager = class {
382583
382817
  bodyTimeout: A2A_TIMEOUT
382584
382818
  };
382585
382819
  if (proxyUrl) {
382586
- this.a2aDispatcher = new import_undici4.ProxyAgent({
382820
+ this.a2aDispatcher = new import_undici3.ProxyAgent({
382587
382821
  uri: proxyUrl,
382588
382822
  ...agentOptions
382589
382823
  });
382590
382824
  } else {
382591
- this.a2aDispatcher = new import_undici4.Agent(agentOptions);
382825
+ this.a2aDispatcher = new import_undici3.Agent(agentOptions);
382592
382826
  }
382593
382827
  this.a2aFetch = (input, init2) => fetch(input, { ...init2, dispatcher: this.a2aDispatcher });
382594
382828
  }
@@ -403623,12 +403857,16 @@ export {
403623
403857
  ShellTool,
403624
403858
  FetchError,
403625
403859
  PrivateIpError,
403860
+ safeLookup,
403861
+ createSafeConnector,
403862
+ createSafeAgent,
403626
403863
  updateGlobalFetchTimeouts,
403627
403864
  sanitizeHostname,
403628
403865
  isLoopbackHost,
403629
- isPrivateIp,
403630
403866
  isAddressPrivate,
403631
403867
  isPrivateIpAsync,
403868
+ isPrivateIp,
403869
+ validateUrlDestination,
403632
403870
  createSafeProxyAgent,
403633
403871
  fetchWithTimeout,
403634
403872
  setGlobalProxy,