@google/gemini-cli 0.33.0-preview.4 → 0.33.0-preview.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/bundle/gemini.js CHANGED
@@ -43923,7 +43923,7 @@ var require_has_flag = __commonJS({
43923
43923
  var require_supports_color = __commonJS({
43924
43924
  "node_modules/supports-color/index.js"(exports2, module2) {
43925
43925
  "use strict";
43926
- var os40 = __require("os");
43926
+ var os39 = __require("os");
43927
43927
  var hasFlag2 = require_has_flag();
43928
43928
  var env6 = process.env;
43929
43929
  var forceColor;
@@ -43961,7 +43961,7 @@ var require_supports_color = __commonJS({
43961
43961
  }
43962
43962
  const min = forceColor ? 1 : 0;
43963
43963
  if (process.platform === "win32") {
43964
- const osRelease = os40.release().split(".");
43964
+ const osRelease = os39.release().split(".");
43965
43965
  if (Number(process.versions.node.split(".")[0]) >= 8 && Number(osRelease[0]) >= 10 && Number(osRelease[2]) >= 10586) {
43966
43966
  return Number(osRelease[2]) >= 14931 ? 3 : 2;
43967
43967
  }
@@ -54665,7 +54665,7 @@ var require_util2 = __commonJS({
54665
54665
  exports2.isValidFile = isValidFile;
54666
54666
  exports2.getWellKnownCertificateConfigFileLocation = getWellKnownCertificateConfigFileLocation;
54667
54667
  var fs131 = __require("fs");
54668
- var os40 = __require("os");
54668
+ var os39 = __require("os");
54669
54669
  var path152 = __require("path");
54670
54670
  var WELL_KNOWN_CERTIFICATE_CONFIG_FILE = "certificate_config.json";
54671
54671
  var CLOUDSDK_CONFIG_DIRECTORY = "gcloud";
@@ -54763,7 +54763,7 @@ var require_util2 = __commonJS({
54763
54763
  return path152.join(configDir, WELL_KNOWN_CERTIFICATE_CONFIG_FILE);
54764
54764
  }
54765
54765
  function _isWindows() {
54766
- return os40.platform().startsWith("win");
54766
+ return os39.platform().startsWith("win");
54767
54767
  }
54768
54768
  }
54769
54769
  });
@@ -60078,7 +60078,7 @@ var require_googleauth = __commonJS({
60078
60078
  var fs131 = __require("fs");
60079
60079
  var gaxios_1 = require_src2();
60080
60080
  var gcpMetadata = require_src4();
60081
- var os40 = __require("os");
60081
+ var os39 = __require("os");
60082
60082
  var path152 = __require("path");
60083
60083
  var crypto_1 = require_crypto3();
60084
60084
  var computeclient_1 = require_computeclient();
@@ -60581,7 +60581,7 @@ var require_googleauth = __commonJS({
60581
60581
  * @api private
60582
60582
  */
60583
60583
  _isWindows() {
60584
- const sys = os40.platform();
60584
+ const sys = os39.platform();
60585
60585
  if (sys && sys.length >= 3) {
60586
60586
  if (sys.substring(0, 3).toLowerCase() === "win") {
60587
60587
  return true;
@@ -76458,24 +76458,24 @@ var init_node = __esm({
76458
76458
  return `other:${arch5}`;
76459
76459
  return "unknown";
76460
76460
  };
76461
- normalizePlatform = (platform22) => {
76462
- platform22 = platform22.toLowerCase();
76463
- if (platform22.includes("ios"))
76461
+ normalizePlatform = (platform21) => {
76462
+ platform21 = platform21.toLowerCase();
76463
+ if (platform21.includes("ios"))
76464
76464
  return "iOS";
76465
- if (platform22 === "android")
76465
+ if (platform21 === "android")
76466
76466
  return "Android";
76467
- if (platform22 === "darwin")
76467
+ if (platform21 === "darwin")
76468
76468
  return "MacOS";
76469
- if (platform22 === "win32")
76469
+ if (platform21 === "win32")
76470
76470
  return "Windows";
76471
- if (platform22 === "freebsd")
76471
+ if (platform21 === "freebsd")
76472
76472
  return "FreeBSD";
76473
- if (platform22 === "openbsd")
76473
+ if (platform21 === "openbsd")
76474
76474
  return "OpenBSD";
76475
- if (platform22 === "linux")
76475
+ if (platform21 === "linux")
76476
76476
  return "Linux";
76477
- if (platform22)
76478
- return `Other:${platform22}`;
76477
+ if (platform21)
76478
+ return `Other:${platform21}`;
76479
76479
  return "Unknown";
76480
76480
  };
76481
76481
  getPlatformHeaders = () => {
@@ -81756,7 +81756,7 @@ var require_util4 = __commonJS({
81756
81756
  exports2.isValidFile = isValidFile;
81757
81757
  exports2.getWellKnownCertificateConfigFileLocation = getWellKnownCertificateConfigFileLocation;
81758
81758
  var fs131 = __require("fs");
81759
- var os40 = __require("os");
81759
+ var os39 = __require("os");
81760
81760
  var path152 = __require("path");
81761
81761
  var WELL_KNOWN_CERTIFICATE_CONFIG_FILE = "certificate_config.json";
81762
81762
  var CLOUDSDK_CONFIG_DIRECTORY = "gcloud";
@@ -81854,7 +81854,7 @@ var require_util4 = __commonJS({
81854
81854
  return path152.join(configDir, WELL_KNOWN_CERTIFICATE_CONFIG_FILE);
81855
81855
  }
81856
81856
  function _isWindows() {
81857
- return os40.platform().startsWith("win");
81857
+ return os39.platform().startsWith("win");
81858
81858
  }
81859
81859
  }
81860
81860
  });
@@ -86626,7 +86626,7 @@ var require_googleauth2 = __commonJS({
86626
86626
  var fs131 = __require("fs");
86627
86627
  var gaxios_1 = require_src7();
86628
86628
  var gcpMetadata = require_src9();
86629
- var os40 = __require("os");
86629
+ var os39 = __require("os");
86630
86630
  var path152 = __require("path");
86631
86631
  var crypto_1 = require_crypto6();
86632
86632
  var computeclient_1 = require_computeclient2();
@@ -87129,7 +87129,7 @@ var require_googleauth2 = __commonJS({
87129
87129
  * @api private
87130
87130
  */
87131
87131
  _isWindows() {
87132
- const sys = os40.platform();
87132
+ const sys = os39.platform();
87133
87133
  if (sys && sys.length >= 3) {
87134
87134
  if (sys.substring(0, 3).toLowerCase() === "win") {
87135
87135
  return true;
@@ -88841,8 +88841,8 @@ function isSubpath(parentPath, childPath) {
88841
88841
  const relative13 = pathModule2.relative(parentPath, childPath);
88842
88842
  return !relative13.startsWith(`..${pathModule2.sep}`) && relative13 !== ".." && !pathModule2.isAbsolute(relative13);
88843
88843
  }
88844
- function resolveToRealPath(path152) {
88845
- let resolvedPath = path152;
88844
+ function resolveToRealPath(pathStr) {
88845
+ let resolvedPath = pathStr;
88846
88846
  try {
88847
88847
  if (resolvedPath.startsWith("file://")) {
88848
88848
  resolvedPath = fileURLToPath2(resolvedPath);
@@ -88850,10 +88850,28 @@ function resolveToRealPath(path152) {
88850
88850
  resolvedPath = decodeURIComponent(resolvedPath);
88851
88851
  } catch (_e) {
88852
88852
  }
88853
+ return robustRealpath(path3.resolve(resolvedPath));
88854
+ }
88855
+ function robustRealpath(p) {
88853
88856
  try {
88854
- return fs9.realpathSync(resolvedPath);
88855
- } catch (_e) {
88856
- return resolvedPath;
88857
+ return fs9.realpathSync(p);
88858
+ } catch (e3) {
88859
+ if (e3 && typeof e3 === "object" && "code" in e3 && e3.code === "ENOENT") {
88860
+ try {
88861
+ const stat15 = fs9.lstatSync(p);
88862
+ if (stat15.isSymbolicLink()) {
88863
+ const target = fs9.readlinkSync(p);
88864
+ const resolvedTarget = path3.resolve(path3.dirname(p), target);
88865
+ return robustRealpath(resolvedTarget);
88866
+ }
88867
+ } catch {
88868
+ }
88869
+ const parent = path3.dirname(p);
88870
+ if (parent === p)
88871
+ return p;
88872
+ return path3.join(robustRealpath(parent), path3.basename(p));
88873
+ }
88874
+ throw e3;
88857
88875
  }
88858
88876
  }
88859
88877
  var GEMINI_DIR, GOOGLE_ACCOUNTS_FILENAME;
@@ -88871,7 +88889,7 @@ var require_polyfills = __commonJS({
88871
88889
  var constants9 = __require("constants");
88872
88890
  var origCwd = process.cwd;
88873
88891
  var cwd7 = null;
88874
- var platform22 = process.env.GRACEFUL_FS_PLATFORM || process.platform;
88892
+ var platform21 = process.env.GRACEFUL_FS_PLATFORM || process.platform;
88875
88893
  process.cwd = function() {
88876
88894
  if (!cwd7)
88877
88895
  cwd7 = origCwd.call(process);
@@ -88930,7 +88948,7 @@ var require_polyfills = __commonJS({
88930
88948
  fs131.lchownSync = function() {
88931
88949
  };
88932
88950
  }
88933
- if (platform22 === "win32") {
88951
+ if (platform21 === "win32") {
88934
88952
  fs131.rename = typeof fs131.rename !== "function" ? fs131.rename : function(fs$rename) {
88935
88953
  function rename2(from, to, cb) {
88936
88954
  var start2 = Date.now();
@@ -105392,10 +105410,36 @@ var init_tools = __esm({
105392
105410
 
105393
105411
  // packages/core/dist/src/tools/mcp-tool.js
105394
105412
  function isMcpToolName(name4) {
105395
- if (!name4.includes(MCP_QUALIFIED_NAME_SEPARATOR))
105396
- return false;
105397
- const parts2 = name4.split(MCP_QUALIFIED_NAME_SEPARATOR);
105398
- return parts2.length === 2 && parts2[0].length > 0 && parts2[1].length > 0;
105413
+ return name4.startsWith(MCP_TOOL_PREFIX);
105414
+ }
105415
+ function parseMcpToolName(name4) {
105416
+ if (!isMcpToolName(name4)) {
105417
+ return {};
105418
+ }
105419
+ const withoutPrefix = name4.slice(MCP_TOOL_PREFIX.length);
105420
+ const match2 = withoutPrefix.match(/^([^_]+)_(.+)$/);
105421
+ if (match2) {
105422
+ return {
105423
+ serverName: match2[1],
105424
+ toolName: match2[2]
105425
+ };
105426
+ }
105427
+ return {};
105428
+ }
105429
+ function formatMcpToolName(serverName, toolName) {
105430
+ if (serverName === "*" && !toolName) {
105431
+ return `${MCP_TOOL_PREFIX}*`;
105432
+ } else if (serverName === "*") {
105433
+ return `${MCP_TOOL_PREFIX}*_${toolName}`;
105434
+ } else if (!toolName) {
105435
+ return `${MCP_TOOL_PREFIX}${serverName}_*`;
105436
+ } else {
105437
+ return `${MCP_TOOL_PREFIX}${serverName}_${toolName}`;
105438
+ }
105439
+ }
105440
+ function isMcpToolAnnotation(annotation) {
105441
+ return typeof annotation === "object" && annotation !== null && // eslint-disable-next-line @typescript-eslint/no-unsafe-type-assertion
105442
+ typeof annotation["_serverName"] === "string";
105399
105443
  }
105400
105444
  function transformTextBlock(block) {
105401
105445
  return { text: block.text };
@@ -105490,24 +105534,28 @@ function getStringifiedResultForDisplay(rawResponse) {
105490
105534
  return displayParts.join("\n");
105491
105535
  }
105492
105536
  function generateValidName(name4) {
105493
- let validToolname = name4.replace(/[^a-zA-Z0-9_.:-]/g, "_");
105537
+ let validToolname = name4.startsWith("mcp_") ? name4 : `mcp_${name4}`;
105538
+ validToolname = validToolname.replace(/[^a-zA-Z0-9_\-.:]/g, "_");
105494
105539
  if (/^[^a-zA-Z_]/.test(validToolname)) {
105495
105540
  validToolname = `_${validToolname}`;
105496
105541
  }
105497
105542
  const safeLimit = MAX_FUNCTION_NAME_LENGTH - 1;
105498
105543
  if (validToolname.length > safeLimit) {
105544
+ debugLogger.warn(`Truncating MCP tool name "${validToolname}" to fit within the 64 character limit. This tool may require user approval.`);
105499
105545
  validToolname = validToolname.slice(0, 30) + "..." + validToolname.slice(-30);
105500
105546
  }
105501
105547
  return validToolname;
105502
105548
  }
105503
- var MCP_QUALIFIED_NAME_SEPARATOR, DiscoveredMCPToolInvocation, DiscoveredMCPTool, MAX_FUNCTION_NAME_LENGTH;
105549
+ var MCP_QUALIFIED_NAME_SEPARATOR, MCP_TOOL_PREFIX, DiscoveredMCPToolInvocation, DiscoveredMCPTool, MAX_FUNCTION_NAME_LENGTH;
105504
105550
  var init_mcp_tool = __esm({
105505
105551
  "packages/core/dist/src/tools/mcp-tool.js"() {
105506
105552
  "use strict";
105507
105553
  init_safeJsonStringify();
105554
+ init_debugLogger();
105508
105555
  init_tools();
105509
105556
  init_tool_error();
105510
- MCP_QUALIFIED_NAME_SEPARATOR = "__";
105557
+ MCP_QUALIFIED_NAME_SEPARATOR = "_";
105558
+ MCP_TOOL_PREFIX = "mcp_";
105511
105559
  DiscoveredMCPToolInvocation = class _DiscoveredMCPToolInvocation extends BaseToolInvocation {
105512
105560
  mcpTool;
105513
105561
  serverName;
@@ -105649,7 +105697,7 @@ var init_mcp_tool = __esm({
105649
105697
  _toolAnnotations;
105650
105698
  constructor(mcpTool, serverName, serverToolName, description, parameterSchema, messageBus, trust, isReadOnly, nameOverride, cliConfig, extensionName, extensionId, _toolAnnotations) {
105651
105699
  super(
105652
- generateValidName(nameOverride ?? serverToolName),
105700
+ nameOverride ?? generateValidName(`${serverName}${MCP_QUALIFIED_NAME_SEPARATOR}${serverToolName}`),
105653
105701
  `${serverToolName} (${serverName} MCP Server)`,
105654
105702
  description,
105655
105703
  Kind.Other,
@@ -105684,7 +105732,7 @@ var init_mcp_tool = __esm({
105684
105732
  return this._toolAnnotations;
105685
105733
  }
105686
105734
  getFullyQualifiedPrefix() {
105687
- return `${this.serverName}${MCP_QUALIFIED_NAME_SEPARATOR}`;
105735
+ return generateValidName(`${this.serverName}${MCP_QUALIFIED_NAME_SEPARATOR}`);
105688
105736
  }
105689
105737
  getFullyQualifiedName() {
105690
105738
  return generateValidName(`${this.serverName}${MCP_QUALIFIED_NAME_SEPARATOR}${this.serverToolName}`);
@@ -121243,7 +121291,7 @@ var require_service_config = __commonJS({
121243
121291
  exports2.validateRetryThrottling = validateRetryThrottling;
121244
121292
  exports2.validateServiceConfig = validateServiceConfig;
121245
121293
  exports2.extractAndSelectServiceConfig = extractAndSelectServiceConfig;
121246
- var os40 = __require("os");
121294
+ var os39 = __require("os");
121247
121295
  var constants_1 = require_constants4();
121248
121296
  var DURATION_REGEX = /^\d+(\.\d{1,9})?s$/;
121249
121297
  var CLIENT_LANGUAGE_STRING = "node";
@@ -121542,7 +121590,7 @@ var require_service_config = __commonJS({
121542
121590
  if (Array.isArray(validatedConfig.clientHostname)) {
121543
121591
  let hostnameMatched = false;
121544
121592
  for (const hostname3 of validatedConfig.clientHostname) {
121545
- if (hostname3 === os40.hostname()) {
121593
+ if (hostname3 === os39.hostname()) {
121546
121594
  hostnameMatched = true;
121547
121595
  }
121548
121596
  }
@@ -135063,7 +135111,7 @@ var require_subchannel_call = __commonJS({
135063
135111
  Object.defineProperty(exports2, "__esModule", { value: true });
135064
135112
  exports2.Http2SubchannelCall = void 0;
135065
135113
  var http22 = __require("http2");
135066
- var os40 = __require("os");
135114
+ var os39 = __require("os");
135067
135115
  var constants_1 = require_constants4();
135068
135116
  var metadata_1 = require_metadata3();
135069
135117
  var stream_decoder_1 = require_stream_decoder();
@@ -135071,7 +135119,7 @@ var require_subchannel_call = __commonJS({
135071
135119
  var constants_2 = require_constants4();
135072
135120
  var TRACER_NAME2 = "subchannel_call";
135073
135121
  function getSystemErrorName(errno) {
135074
- for (const [name4, num] of Object.entries(os40.constants.errno)) {
135122
+ for (const [name4, num] of Object.entries(os39.constants.errno)) {
135075
135123
  if (num === errno) {
135076
135124
  return name4;
135077
135125
  }
@@ -155455,7 +155503,7 @@ var require_ProcessDetector = __commonJS({
155455
155503
  exports2.processDetector = void 0;
155456
155504
  var api_1 = (init_esm(), __toCommonJS(esm_exports));
155457
155505
  var semconv_1 = require_semconv2();
155458
- var os40 = __require("os");
155506
+ var os39 = __require("os");
155459
155507
  var ProcessDetector = class {
155460
155508
  detect(_config) {
155461
155509
  const attributes = {
@@ -155475,7 +155523,7 @@ var require_ProcessDetector = __commonJS({
155475
155523
  attributes[semconv_1.ATTR_PROCESS_COMMAND] = process.argv[1];
155476
155524
  }
155477
155525
  try {
155478
- const userInfo2 = os40.userInfo();
155526
+ const userInfo2 = os39.userInfo();
155479
155527
  attributes[semconv_1.ATTR_PROCESS_OWNER] = userInfo2.username;
155480
155528
  } catch (e3) {
155481
155529
  api_1.diag.debug(`error obtaining process owner: ${e3}`);
@@ -174985,7 +175033,7 @@ var require_package6 = __commonJS({
174985
175033
  var require_util11 = __commonJS({
174986
175034
  "node_modules/systeminformation/lib/util.js"(exports2) {
174987
175035
  "use strict";
174988
- var os40 = __require("os");
175036
+ var os39 = __require("os");
174989
175037
  var fs131 = __require("fs");
174990
175038
  var path152 = __require("path");
174991
175039
  var spawn15 = __require("child_process").spawn;
@@ -175092,7 +175140,7 @@ var require_util11 = __commonJS({
175092
175140
  }
175093
175141
  function cores() {
175094
175142
  if (_cores === 0) {
175095
- _cores = os40.cpus().length;
175143
+ _cores = os39.cpus().length;
175096
175144
  }
175097
175145
  return _cores;
175098
175146
  }
@@ -175353,7 +175401,7 @@ var require_util11 = __commonJS({
175353
175401
  function powerShellRelease() {
175354
175402
  try {
175355
175403
  if (_psChild) {
175356
- _psChild.stdin.write("exit" + os40.EOL);
175404
+ _psChild.stdin.write("exit" + os39.EOL);
175357
175405
  _psChild.stdin.end();
175358
175406
  }
175359
175407
  } catch {
@@ -175380,7 +175428,7 @@ var require_util11 = __commonJS({
175380
175428
  });
175381
175429
  try {
175382
175430
  if (_psChild && _psChild.pid) {
175383
- _psChild.stdin.write(_psToUTF8 + "echo " + _psCmdStart + id + _psIdSeperator + "; " + os40.EOL + cmd + os40.EOL + "echo " + _psCmdSeperator + os40.EOL);
175431
+ _psChild.stdin.write(_psToUTF8 + "echo " + _psCmdStart + id + _psIdSeperator + "; " + os39.EOL + cmd + os39.EOL + "echo " + _psCmdSeperator + os39.EOL);
175384
175432
  }
175385
175433
  } catch {
175386
175434
  resolve36("");
@@ -175392,7 +175440,7 @@ var require_util11 = __commonJS({
175392
175440
  return new Promise((resolve36) => {
175393
175441
  process.nextTick(() => {
175394
175442
  try {
175395
- const osVersion = os40.release().split(".").map(Number);
175443
+ const osVersion = os39.release().split(".").map(Number);
175396
175444
  const spanOptions = osVersion[0] < 10 ? ["-NoProfile", "-NoLogo", "-InputFormat", "Text", "-NoExit", "-ExecutionPolicy", "Unrestricted", "-Command", "-"] : ["-NoProfile", "-NoLogo", "-InputFormat", "Text", "-ExecutionPolicy", "Unrestricted", "-Command", _psToUTF8 + cmd];
175397
175445
  const child = spawn15(_powerShell, spanOptions, {
175398
175446
  stdio: "pipe",
@@ -175424,8 +175472,8 @@ var require_util11 = __commonJS({
175424
175472
  });
175425
175473
  if (osVersion[0] < 10) {
175426
175474
  try {
175427
- child.stdin.write(_psToUTF8 + cmd + os40.EOL);
175428
- child.stdin.write("exit" + os40.EOL);
175475
+ child.stdin.write(_psToUTF8 + cmd + os39.EOL);
175476
+ child.stdin.write("exit" + os39.EOL);
175429
175477
  child.stdin.end();
175430
175478
  } catch {
175431
175479
  child.kill();
@@ -175690,14 +175738,14 @@ var require_util11 = __commonJS({
175690
175738
  return ("00000000" + parseInt(hex, 16).toString(2)).substr(-8);
175691
175739
  }
175692
175740
  function getFilesInPath(source2) {
175693
- const lstatSync2 = fs131.lstatSync;
175741
+ const lstatSync3 = fs131.lstatSync;
175694
175742
  const readdirSync4 = fs131.readdirSync;
175695
175743
  const join54 = path152.join;
175696
175744
  function isDirectory(source3) {
175697
- return lstatSync2(source3).isDirectory();
175745
+ return lstatSync3(source3).isDirectory();
175698
175746
  }
175699
175747
  function isFile3(source3) {
175700
- return lstatSync2(source3).isFile();
175748
+ return lstatSync3(source3).isFile();
175701
175749
  }
175702
175750
  function getDirectories(source3) {
175703
175751
  return readdirSync4(source3).map((name4) => {
@@ -177493,7 +177541,7 @@ var require_util11 = __commonJS({
177493
177541
  var require_osinfo = __commonJS({
177494
177542
  "node_modules/systeminformation/lib/osinfo.js"(exports2) {
177495
177543
  "use strict";
177496
- var os40 = __require("os");
177544
+ var os39 = __require("os");
177497
177545
  var fs131 = __require("fs");
177498
177546
  var util5 = require_util11();
177499
177547
  var exec6 = __require("child_process").exec;
@@ -177516,14 +177564,14 @@ var require_osinfo = __commonJS({
177516
177564
  }
177517
177565
  const result2 = {
177518
177566
  current: Date.now(),
177519
- uptime: os40.uptime(),
177567
+ uptime: os39.uptime(),
177520
177568
  timezone: t3.length >= 7 ? t3[5] : "",
177521
177569
  timezoneName
177522
177570
  };
177523
177571
  if (_darwin || _linux) {
177524
177572
  try {
177525
177573
  const stdout = execSync9("date +%Z && date +%z && ls -l /etc/localtime 2>/dev/null", util5.execOptsLinux);
177526
- const lines = stdout.toString().split(os40.EOL);
177574
+ const lines = stdout.toString().split(os39.EOL);
177527
177575
  if (lines.length > 3 && !lines[0]) {
177528
177576
  lines.shift();
177529
177577
  }
@@ -177533,7 +177581,7 @@ var require_osinfo = __commonJS({
177533
177581
  }
177534
177582
  return {
177535
177583
  current: Date.now(),
177536
- uptime: os40.uptime(),
177584
+ uptime: os39.uptime(),
177537
177585
  timezone: lines[1] ? timezone + lines[1] : timezone,
177538
177586
  timezoneName: lines[2] && lines[2].indexOf("/zoneinfo/") > 0 ? lines[2].split("/zoneinfo/")[1] || "" : ""
177539
177587
  };
@@ -177652,11 +177700,11 @@ var require_osinfo = __commonJS({
177652
177700
  return "";
177653
177701
  }
177654
177702
  function getFQDN() {
177655
- let fqdn = os40.hostname;
177703
+ let fqdn = os39.hostname;
177656
177704
  if (_linux || _darwin) {
177657
177705
  try {
177658
177706
  const stdout = execSync9("hostname -f 2>/dev/null", util5.execOptsLinux);
177659
- fqdn = stdout.toString().split(os40.EOL)[0];
177707
+ fqdn = stdout.toString().split(os39.EOL)[0];
177660
177708
  } catch {
177661
177709
  util5.noop();
177662
177710
  }
@@ -177664,7 +177712,7 @@ var require_osinfo = __commonJS({
177664
177712
  if (_freebsd || _openbsd || _netbsd) {
177665
177713
  try {
177666
177714
  const stdout = execSync9("hostname 2>/dev/null");
177667
- fqdn = stdout.toString().split(os40.EOL)[0];
177715
+ fqdn = stdout.toString().split(os39.EOL)[0];
177668
177716
  } catch {
177669
177717
  util5.noop();
177670
177718
  }
@@ -177672,7 +177720,7 @@ var require_osinfo = __commonJS({
177672
177720
  if (_windows) {
177673
177721
  try {
177674
177722
  const stdout = execSync9("echo %COMPUTERNAME%.%USERDNSDOMAIN%", util5.execOptsWin);
177675
- fqdn = stdout.toString().replace(".%USERDNSDOMAIN%", "").split(os40.EOL)[0];
177723
+ fqdn = stdout.toString().replace(".%USERDNSDOMAIN%", "").split(os39.EOL)[0];
177676
177724
  } catch {
177677
177725
  util5.noop();
177678
177726
  }
@@ -177687,9 +177735,9 @@ var require_osinfo = __commonJS({
177687
177735
  distro: "unknown",
177688
177736
  release: "unknown",
177689
177737
  codename: "",
177690
- kernel: os40.release(),
177691
- arch: os40.arch(),
177692
- hostname: os40.hostname(),
177738
+ kernel: os39.release(),
177739
+ arch: os39.arch(),
177740
+ hostname: os39.hostname(),
177693
177741
  fqdn: getFQDN(),
177694
177742
  codepage: "",
177695
177743
  logofile: "",
@@ -177898,7 +177946,7 @@ var require_osinfo = __commonJS({
177898
177946
  }
177899
177947
  function versions(apps2, callback2) {
177900
177948
  let versionObject = {
177901
- kernel: os40.release(),
177949
+ kernel: os39.release(),
177902
177950
  apache: "",
177903
177951
  bash: "",
177904
177952
  bun: "",
@@ -178608,7 +178656,7 @@ var require_osinfo = __commonJS({
178608
178656
  function getUniqueMacAdresses() {
178609
178657
  let macs = [];
178610
178658
  try {
178611
- const ifaces = os40.networkInterfaces();
178659
+ const ifaces = os39.networkInterfaces();
178612
178660
  for (let dev in ifaces) {
178613
178661
  if ({}.hasOwnProperty.call(ifaces, dev)) {
178614
178662
  ifaces[dev].forEach((details) => {
@@ -178730,7 +178778,7 @@ var require_system = __commonJS({
178730
178778
  "node_modules/systeminformation/lib/system.js"(exports2) {
178731
178779
  "use strict";
178732
178780
  var fs131 = __require("fs");
178733
- var os40 = __require("os");
178781
+ var os39 = __require("os");
178734
178782
  var util5 = require_util11();
178735
178783
  var { uuid: uuid3 } = require_osinfo();
178736
178784
  var exec6 = __require("child_process").exec;
@@ -178854,8 +178902,8 @@ var require_system = __commonJS({
178854
178902
  util5.noop();
178855
178903
  }
178856
178904
  }
178857
- if (!result2.virtual && (os40.release().toLowerCase().indexOf("microsoft") >= 0 || os40.release().toLowerCase().endsWith("wsl2"))) {
178858
- const kernelVersion = parseFloat(os40.release().toLowerCase());
178905
+ if (!result2.virtual && (os39.release().toLowerCase().indexOf("microsoft") >= 0 || os39.release().toLowerCase().endsWith("wsl2"))) {
178906
+ const kernelVersion = parseFloat(os39.release().toLowerCase());
178859
178907
  result2.virtual = true;
178860
178908
  result2.manufacturer = "Microsoft";
178861
178909
  result2.model = "WSL";
@@ -179265,7 +179313,7 @@ var require_system = __commonJS({
179265
179313
  result2.model = "Raspberry Pi";
179266
179314
  result2.serial = rpi.serial;
179267
179315
  result2.version = rpi.type + " - " + rpi.revision;
179268
- result2.memMax = os40.totalmem();
179316
+ result2.memMax = os39.totalmem();
179269
179317
  result2.memSlots = 0;
179270
179318
  }
179271
179319
  if (callback2) {
@@ -179291,9 +179339,9 @@ var require_system = __commonJS({
179291
179339
  }
179292
179340
  devices.shift();
179293
179341
  result2.memSlots = devices.length;
179294
- if (os40.arch() === "arm64") {
179342
+ if (os39.arch() === "arm64") {
179295
179343
  result2.memSlots = 0;
179296
- result2.memMax = os40.totalmem();
179344
+ result2.memMax = os39.totalmem();
179297
179345
  }
179298
179346
  if (callback2) {
179299
179347
  callback2(result2);
@@ -179310,7 +179358,7 @@ var require_system = __commonJS({
179310
179358
  if (_windows) {
179311
179359
  try {
179312
179360
  const workload = [];
179313
- const win10plus = parseInt(os40.release()) >= 10;
179361
+ const win10plus = parseInt(os39.release()) >= 10;
179314
179362
  const maxCapacityAttribute = win10plus ? "MaxCapacityEx" : "MaxCapacity";
179315
179363
  workload.push(util5.powerShell("Get-CimInstance Win32_baseboard | select Model,Manufacturer,Product,Version,SerialNumber,PartNumber,SKU | fl"));
179316
179364
  workload.push(util5.powerShell(`Get-CimInstance Win32_physicalmemoryarray | select ${maxCapacityAttribute}, MemoryDevices | fl`));
@@ -179506,7 +179554,7 @@ var require_system = __commonJS({
179506
179554
  var require_cpu = __commonJS({
179507
179555
  "node_modules/systeminformation/lib/cpu.js"(exports2) {
179508
179556
  "use strict";
179509
- var os40 = __require("os");
179557
+ var os39 = __require("os");
179510
179558
  var exec6 = __require("child_process").exec;
179511
179559
  var execSync9 = __require("child_process").execSync;
179512
179560
  var fs131 = __require("fs");
@@ -180369,7 +180417,7 @@ var require_cpu = __commonJS({
180369
180417
  const countProcessors = util5.getValue(lines, "hw.packages");
180370
180418
  const countCores = util5.getValue(lines, "hw.physicalcpu_max");
180371
180419
  const countThreads = util5.getValue(lines, "hw.ncpu");
180372
- if (os40.arch() === "arm64") {
180420
+ if (os39.arch() === "arm64") {
180373
180421
  result2.socket = "SOC";
180374
180422
  try {
180375
180423
  const clusters = execSync9("ioreg -c IOPlatformDevice -d 3 -r | grep cluster-type").toString().split("\n");
@@ -180397,8 +180445,8 @@ var require_cpu = __commonJS({
180397
180445
  if (_linux) {
180398
180446
  let modelline = "";
180399
180447
  let lines = [];
180400
- if (os40.cpus()[0] && os40.cpus()[0].model) {
180401
- modelline = os40.cpus()[0].model;
180448
+ if (os39.cpus()[0] && os39.cpus()[0].model) {
180449
+ modelline = os39.cpus()[0].model;
180402
180450
  }
180403
180451
  exec6('export LC_ALL=C; lscpu; echo -n "Governor: "; cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor 2>/dev/null; echo; unset LC_ALL', (error40, stdout) => {
180404
180452
  if (!error40) {
@@ -180487,8 +180535,8 @@ var require_cpu = __commonJS({
180487
180535
  if (_freebsd || _openbsd || _netbsd) {
180488
180536
  let modelline = "";
180489
180537
  let lines = [];
180490
- if (os40.cpus()[0] && os40.cpus()[0].model) {
180491
- modelline = os40.cpus()[0].model;
180538
+ if (os39.cpus()[0] && os39.cpus()[0].model) {
180539
+ modelline = os39.cpus()[0].model;
180492
180540
  }
180493
180541
  exec6("export LC_ALL=C; dmidecode -t 4; dmidecode -t 7 unset LC_ALL", (error40, stdout) => {
180494
180542
  let cache4 = [];
@@ -180648,7 +180696,7 @@ var require_cpu = __commonJS({
180648
180696
  }
180649
180697
  exports2.cpu = cpu;
180650
180698
  function getCpuCurrentSpeedSync() {
180651
- const cpus2 = os40.cpus();
180699
+ const cpus2 = os39.cpus();
180652
180700
  let minFreq = 999999999;
180653
180701
  let maxFreq = 0;
180654
180702
  let avgFreq = 0;
@@ -181343,7 +181391,7 @@ var require_cpu = __commonJS({
181343
181391
  function getLoad() {
181344
181392
  return new Promise((resolve36) => {
181345
181393
  process.nextTick(() => {
181346
- const loads = os40.loadavg().map((x3) => {
181394
+ const loads = os39.loadavg().map((x3) => {
181347
181395
  return x3 / util5.cores();
181348
181396
  });
181349
181397
  const avgLoad = parseFloat(Math.max.apply(Math, loads).toFixed(2));
@@ -181351,7 +181399,7 @@ var require_cpu = __commonJS({
181351
181399
  const now = Date.now() - _current_cpu.ms;
181352
181400
  if (now >= 200) {
181353
181401
  _current_cpu.ms = Date.now();
181354
- const cpus2 = os40.cpus().map((cpu2) => {
181402
+ const cpus2 = os39.cpus().map((cpu2) => {
181355
181403
  cpu2.times.steal = 0;
181356
181404
  cpu2.times.guest = 0;
181357
181405
  return cpu2;
@@ -181545,7 +181593,7 @@ var require_cpu = __commonJS({
181545
181593
  function getFullLoad() {
181546
181594
  return new Promise((resolve36) => {
181547
181595
  process.nextTick(() => {
181548
- const cpus2 = os40.cpus();
181596
+ const cpus2 = os39.cpus();
181549
181597
  let totalUser = 0;
181550
181598
  let totalSystem = 0;
181551
181599
  let totalNice = 0;
@@ -181588,7 +181636,7 @@ var require_cpu = __commonJS({
181588
181636
  var require_memory = __commonJS({
181589
181637
  "node_modules/systeminformation/lib/memory.js"(exports2) {
181590
181638
  "use strict";
181591
- var os40 = __require("os");
181639
+ var os39 = __require("os");
181592
181640
  var exec6 = __require("child_process").exec;
181593
181641
  var execSync9 = __require("child_process").execSync;
181594
181642
  var util5 = require_util11();
@@ -181634,12 +181682,12 @@ var require_memory = __commonJS({
181634
181682
  return new Promise((resolve36) => {
181635
181683
  process.nextTick(() => {
181636
181684
  let result2 = {
181637
- total: os40.totalmem(),
181638
- free: os40.freemem(),
181639
- used: os40.totalmem() - os40.freemem(),
181640
- active: os40.totalmem() - os40.freemem(),
181685
+ total: os39.totalmem(),
181686
+ free: os39.freemem(),
181687
+ used: os39.totalmem() - os39.freemem(),
181688
+ active: os39.totalmem() - os39.freemem(),
181641
181689
  // temporarily (fallback)
181642
- available: os40.freemem(),
181690
+ available: os39.freemem(),
181643
181691
  // temporarily (fallback)
181644
181692
  buffers: 0,
181645
181693
  cached: 0,
@@ -181658,9 +181706,9 @@ var require_memory = __commonJS({
181658
181706
  if (!error40) {
181659
181707
  const lines = stdout.toString().split("\n");
181660
181708
  result2.total = parseInt(util5.getValue(lines, "memtotal"), 10);
181661
- result2.total = result2.total ? result2.total * 1024 : os40.totalmem();
181709
+ result2.total = result2.total ? result2.total * 1024 : os39.totalmem();
181662
181710
  result2.free = parseInt(util5.getValue(lines, "memfree"), 10);
181663
- result2.free = result2.free ? result2.free * 1024 : os40.freemem();
181711
+ result2.free = result2.free ? result2.free * 1024 : os39.freemem();
181664
181712
  result2.used = result2.total - result2.free;
181665
181713
  result2.buffers = parseInt(util5.getValue(lines, "buffers"), 10);
181666
181714
  result2.buffers = result2.buffers ? result2.buffers * 1024 : 0;
@@ -181882,7 +181930,7 @@ var require_memory = __commonJS({
181882
181930
  }
181883
181931
  if (!result2.length) {
181884
181932
  result2.push({
181885
- size: os40.totalmem(),
181933
+ size: os39.totalmem(),
181886
181934
  bank: "",
181887
181935
  type: "",
181888
181936
  ecc: null,
@@ -185030,7 +185078,7 @@ ${BSDName}|"; diskutil info /dev/${BSDName} | grep SMART;`;
185030
185078
  var require_network = __commonJS({
185031
185079
  "node_modules/systeminformation/lib/network.js"(exports2) {
185032
185080
  "use strict";
185033
- var os40 = __require("os");
185081
+ var os39 = __require("os");
185034
185082
  var exec6 = __require("child_process").exec;
185035
185083
  var execSync9 = __require("child_process").execSync;
185036
185084
  var fs131 = __require("fs");
@@ -185054,7 +185102,7 @@ var require_network = __commonJS({
185054
185102
  let ifacename = "";
185055
185103
  let ifacenameFirst = "";
185056
185104
  try {
185057
- const ifaces = os40.networkInterfaces();
185105
+ const ifaces = os39.networkInterfaces();
185058
185106
  let scopeid = 9999;
185059
185107
  for (let dev in ifaces) {
185060
185108
  if ({}.hasOwnProperty.call(ifaces, dev)) {
@@ -185074,7 +185122,7 @@ var require_network = __commonJS({
185074
185122
  let defaultIp = "";
185075
185123
  const cmd = "netstat -r";
185076
185124
  const result2 = execSync9(cmd, util5.execOptsWin);
185077
- const lines = result2.toString().split(os40.EOL);
185125
+ const lines = result2.toString().split(os39.EOL);
185078
185126
  lines.forEach((line) => {
185079
185127
  line = line.replace(/\s+/g, " ").trim();
185080
185128
  if (line.indexOf("0.0.0.0 0.0.0.0") > -1 && !/[a-zA-Z]/.test(line)) {
@@ -185707,7 +185755,7 @@ var require_network = __commonJS({
185707
185755
  defaultString = "" + defaultString;
185708
185756
  return new Promise((resolve36) => {
185709
185757
  process.nextTick(() => {
185710
- const ifaces = os40.networkInterfaces();
185758
+ const ifaces = os39.networkInterfaces();
185711
185759
  let result2 = [];
185712
185760
  let nics = [];
185713
185761
  let dnsSuffixes = [];
@@ -186777,7 +186825,7 @@ var require_network = __commonJS({
186777
186825
  if (_windows) {
186778
186826
  try {
186779
186827
  exec6("netstat -r", util5.execOptsWin, (error40, stdout) => {
186780
- const lines = stdout.toString().split(os40.EOL);
186828
+ const lines = stdout.toString().split(os39.EOL);
186781
186829
  lines.forEach((line) => {
186782
186830
  line = line.replace(/\s+/g, " ").trim();
186783
186831
  if (line.indexOf("0.0.0.0 0.0.0.0") > -1 && !/[a-zA-Z]/.test(line)) {
@@ -186823,7 +186871,7 @@ var require_network = __commonJS({
186823
186871
  var require_wifi = __commonJS({
186824
186872
  "node_modules/systeminformation/lib/wifi.js"(exports2) {
186825
186873
  "use strict";
186826
- var os40 = __require("os");
186874
+ var os39 = __require("os");
186827
186875
  var exec6 = __require("child_process").exec;
186828
186876
  var execSync9 = __require("child_process").execSync;
186829
186877
  var util5 = require_util11();
@@ -187045,7 +187093,7 @@ var require_wifi = __commonJS({
187045
187093
  parts2.shift();
187046
187094
  parts2.forEach((part) => {
187047
187095
  part = "ACTIVE:" + part;
187048
- const lines = part.split(os40.EOL);
187096
+ const lines = part.split(os39.EOL);
187049
187097
  const channel = util5.getValue(lines, "CHAN");
187050
187098
  const frequency = util5.getValue(lines, "FREQ").toLowerCase().replace("mhz", "").trim();
187051
187099
  const security = util5.getValue(lines, "SECURITY").replace("(", "").replace(")", "");
@@ -187269,15 +187317,15 @@ var require_wifi = __commonJS({
187269
187317
  } else if (_windows) {
187270
187318
  const cmd = "netsh wlan show networks mode=Bssid";
187271
187319
  util5.powerShell(cmd).then((stdout) => {
187272
- const ssidParts = stdout.toString("utf8").split(os40.EOL + os40.EOL + "SSID ");
187320
+ const ssidParts = stdout.toString("utf8").split(os39.EOL + os39.EOL + "SSID ");
187273
187321
  ssidParts.shift();
187274
187322
  ssidParts.forEach((ssidPart) => {
187275
- const ssidLines = ssidPart.split(os40.EOL);
187323
+ const ssidLines = ssidPart.split(os39.EOL);
187276
187324
  if (ssidLines && ssidLines.length >= 8 && ssidLines[0].indexOf(":") >= 0) {
187277
187325
  const bssidsParts = ssidPart.split(" BSSID");
187278
187326
  bssidsParts.shift();
187279
187327
  bssidsParts.forEach((bssidPart) => {
187280
- const bssidLines = bssidPart.split(os40.EOL);
187328
+ const bssidLines = bssidPart.split(os39.EOL);
187281
187329
  const bssidLine = bssidLines[0].split(":");
187282
187330
  bssidLine.shift();
187283
187331
  const bssid = bssidLine.join(":").trim().toLowerCase();
@@ -187601,7 +187649,7 @@ var require_wifi = __commonJS({
187601
187649
  var require_processes = __commonJS({
187602
187650
  "node_modules/systeminformation/lib/processes.js"(exports2) {
187603
187651
  "use strict";
187604
- var os40 = __require("os");
187652
+ var os39 = __require("os");
187605
187653
  var fs131 = __require("fs");
187606
187654
  var path152 = __require("path");
187607
187655
  var exec6 = __require("child_process").exec;
@@ -188252,7 +188300,7 @@ var require_processes = __commonJS({
188252
188300
  line = line.trim().replace(/ +/g, " ").replace(/,+/g, ".");
188253
188301
  const parts2 = line.split(" ");
188254
188302
  const command2 = parts2.slice(9).join(" ");
188255
- const pmem = parseFloat((1 * parseInt(parts2[3]) * 1024 / os40.totalmem()).toFixed(1));
188303
+ const pmem = parseFloat((1 * parseInt(parts2[3]) * 1024 / os39.totalmem()).toFixed(1));
188256
188304
  const started = parseElapsed(parts2[5]);
188257
188305
  result2.push({
188258
188306
  pid: parseInt(parts2[0]),
@@ -188455,7 +188503,7 @@ var require_processes = __commonJS({
188455
188503
  cpu: 0,
188456
188504
  cpuu: 0,
188457
188505
  cpus: 0,
188458
- mem: memw / os40.totalmem() * 100,
188506
+ mem: memw / os39.totalmem() * 100,
188459
188507
  priority: element.Priority | null,
188460
188508
  memVsz: element.PageFileUsage || null,
188461
188509
  memRss: Math.floor((element.WorkingSetSize || 0) / 1024),
@@ -188609,7 +188657,7 @@ var require_processes = __commonJS({
188609
188657
  result2.forEach((item) => {
188610
188658
  if (item.proc.toLowerCase() === pname.toLowerCase()) {
188611
188659
  item.pids.push(pid);
188612
- item.mem += mem / os40.totalmem() * 100;
188660
+ item.mem += mem / os39.totalmem() * 100;
188613
188661
  processFound = true;
188614
188662
  }
188615
188663
  });
@@ -188619,7 +188667,7 @@ var require_processes = __commonJS({
188619
188667
  pid,
188620
188668
  pids: [pid],
188621
188669
  cpu: 0,
188622
- mem: mem / os40.totalmem() * 100
188670
+ mem: mem / os39.totalmem() * 100
188623
188671
  });
188624
188672
  }
188625
188673
  }
@@ -190360,7 +190408,7 @@ var require_docker = __commonJS({
190360
190408
  var require_virtualbox = __commonJS({
190361
190409
  "node_modules/systeminformation/lib/virtualbox.js"(exports2) {
190362
190410
  "use strict";
190363
- var os40 = __require("os");
190411
+ var os39 = __require("os");
190364
190412
  var exec6 = __require("child_process").exec;
190365
190413
  var util5 = require_util11();
190366
190414
  function vboxInfo(callback2) {
@@ -190369,10 +190417,10 @@ var require_virtualbox = __commonJS({
190369
190417
  process.nextTick(() => {
190370
190418
  try {
190371
190419
  exec6(util5.getVboxmanage() + " list vms --long", (error40, stdout) => {
190372
- let parts2 = (os40.EOL + stdout.toString()).split(os40.EOL + "Name:");
190420
+ let parts2 = (os39.EOL + stdout.toString()).split(os39.EOL + "Name:");
190373
190421
  parts2.shift();
190374
190422
  parts2.forEach((part) => {
190375
- const lines = ("Name:" + part).split(os40.EOL);
190423
+ const lines = ("Name:" + part).split(os39.EOL);
190376
190424
  const state = util5.getValue(lines, "State");
190377
190425
  const running = state.startsWith("running");
190378
190426
  const runningSinceString = running ? state.replace("running (since ", "").replace(")", "").trim() : "";
@@ -196293,8 +196341,8 @@ var GIT_COMMIT_INFO, CLI_VERSION;
196293
196341
  var init_git_commit = __esm({
196294
196342
  "packages/core/dist/src/generated/git-commit.js"() {
196295
196343
  "use strict";
196296
- GIT_COMMIT_INFO = "7e6e40c81";
196297
- CLI_VERSION = "0.33.0-preview.4";
196344
+ GIT_COMMIT_INFO = "9912ea868";
196345
+ CLI_VERSION = "0.33.0-preview.6";
196298
196346
  }
196299
196347
  });
196300
196348
 
@@ -207514,7 +207562,7 @@ var require_googleauth3 = __commonJS({
207514
207562
  var child_process_1 = __require("child_process");
207515
207563
  var fs131 = __require("fs");
207516
207564
  var gcpMetadata = require_src45();
207517
- var os40 = __require("os");
207565
+ var os39 = __require("os");
207518
207566
  var path152 = __require("path");
207519
207567
  var crypto_1 = require_crypto9();
207520
207568
  var transporters_1 = require_transporters();
@@ -207955,7 +208003,7 @@ var require_googleauth3 = __commonJS({
207955
208003
  * @api private
207956
208004
  */
207957
208005
  _isWindows() {
207958
- const sys = os40.platform();
208006
+ const sys = os39.platform();
207959
208007
  if (sys && sys.length >= 3) {
207960
208008
  if (sys.substring(0, 3).toLowerCase() === "win") {
207961
208009
  return true;
@@ -209147,13 +209195,13 @@ var require_src48 = __commonJS({
209147
209195
  };
209148
209196
  function mapOtelResourceToMonitoredResource(resource) {
209149
209197
  const attrs = resource.attributes;
209150
- const platform22 = attrs[semantic_conventions_1.SEMRESATTRS_CLOUD_PLATFORM];
209198
+ const platform21 = attrs[semantic_conventions_1.SEMRESATTRS_CLOUD_PLATFORM];
209151
209199
  let mr;
209152
- if (platform22 === semantic_conventions_1.CLOUDPLATFORMVALUES_GCP_COMPUTE_ENGINE) {
209200
+ if (platform21 === semantic_conventions_1.CLOUDPLATFORMVALUES_GCP_COMPUTE_ENGINE) {
209153
209201
  mr = createMonitoredResource(GCE_INSTANCE, attrs);
209154
- } else if (platform22 === semantic_conventions_1.CLOUDPLATFORMVALUES_GCP_APP_ENGINE) {
209202
+ } else if (platform21 === semantic_conventions_1.CLOUDPLATFORMVALUES_GCP_APP_ENGINE) {
209155
209203
  mr = createMonitoredResource(GAE_INSTANCE, attrs);
209156
- } else if (platform22 === semantic_conventions_1.CLOUDPLATFORMVALUES_AWS_EC2) {
209204
+ } else if (platform21 === semantic_conventions_1.CLOUDPLATFORMVALUES_AWS_EC2) {
209157
209205
  mr = createMonitoredResource(AWS_EC2_INSTANCE, attrs);
209158
209206
  } else if (semantic_conventions_1.SEMRESATTRS_K8S_CLUSTER_NAME in attrs) {
209159
209207
  if (semantic_conventions_1.SEMRESATTRS_K8S_CONTAINER_NAME in attrs) {
@@ -226245,7 +226293,7 @@ var require_grpc = __commonJS({
226245
226293
  var fs131 = __require("fs");
226246
226294
  var google_auth_library_1 = require_src47();
226247
226295
  var grpc = require_src16();
226248
- var os40 = __require("os");
226296
+ var os39 = __require("os");
226249
226297
  var path_1 = __require("path");
226250
226298
  var path152 = __require("path");
226251
226299
  var protobuf = require_protobufjs();
@@ -226550,7 +226598,7 @@ var require_grpc = __commonJS({
226550
226598
  if ((opts === null || opts === void 0 ? void 0 : opts.cert) && (opts === null || opts === void 0 ? void 0 : opts.key)) {
226551
226599
  return [opts.cert, opts.key];
226552
226600
  }
226553
- const metadataPath = (0, path_1.join)(os40.homedir(), ".secureConnect", "context_aware_metadata.json");
226601
+ const metadataPath = (0, path_1.join)(os39.homedir(), ".secureConnect", "context_aware_metadata.json");
226554
226602
  const metadata2 = JSON.parse(await readFileAsync(metadataPath));
226555
226603
  if (!metadata2.cert_provider_command) {
226556
226604
  throw Error("no cert_provider_command found");
@@ -292762,7 +292810,7 @@ function getVersion() {
292762
292810
  }
292763
292811
  versionPromise = (async () => {
292764
292812
  const pkgJson = await getPackageJson(__dirname3);
292765
- return "0.33.0-preview.4";
292813
+ return "0.33.0-preview.6";
292766
292814
  })();
292767
292815
  return versionPromise;
292768
292816
  }
@@ -292783,21 +292831,21 @@ var init_version5 = __esm({
292783
292831
  import { fileURLToPath as fileURLToPath6 } from "node:url";
292784
292832
  import path17 from "node:path";
292785
292833
  function getPlatform() {
292786
- const platform22 = process.platform;
292834
+ const platform21 = process.platform;
292787
292835
  const arch5 = process.arch;
292788
- if (platform22 === "darwin" && arch5 === "x64") {
292836
+ if (platform21 === "darwin" && arch5 === "x64") {
292789
292837
  return "DARWIN_AMD64";
292790
292838
  }
292791
- if (platform22 === "darwin" && arch5 === "arm64") {
292839
+ if (platform21 === "darwin" && arch5 === "arm64") {
292792
292840
  return "DARWIN_ARM64";
292793
292841
  }
292794
- if (platform22 === "linux" && arch5 === "x64") {
292842
+ if (platform21 === "linux" && arch5 === "x64") {
292795
292843
  return "LINUX_AMD64";
292796
292844
  }
292797
- if (platform22 === "linux" && arch5 === "arm64") {
292845
+ if (platform21 === "linux" && arch5 === "arm64") {
292798
292846
  return "LINUX_ARM64";
292799
292847
  }
292800
- if (platform22 === "win32" && arch5 === "x64") {
292848
+ if (platform21 === "win32" && arch5 === "x64") {
292801
292849
  return "WINDOWS_AMD64";
292802
292850
  }
292803
292851
  return "PLATFORM_UNSPECIFIED";
@@ -294985,11 +295033,11 @@ Signal: Signal number or \`(none)\` if no signal was received.
294985
295033
  buildToolMetadata() {
294986
295034
  const toolMetadata = /* @__PURE__ */ new Map();
294987
295035
  for (const [name4, tool] of this.allKnownTools) {
294988
- if (tool.toolAnnotations) {
294989
- const metadata2 = { ...tool.toolAnnotations };
294990
- if (tool instanceof DiscoveredMCPTool) {
294991
- metadata2["_serverName"] = tool.serverName;
294992
- }
295036
+ const metadata2 = tool.toolAnnotations ? { ...tool.toolAnnotations } : {};
295037
+ if (tool instanceof DiscoveredMCPTool) {
295038
+ metadata2["_serverName"] = tool.serverName;
295039
+ }
295040
+ if (Object.keys(metadata2).length > 0) {
294993
295041
  toolMetadata.set(name4, metadata2);
294994
295042
  }
294995
295043
  }
@@ -301638,7 +301686,7 @@ var init_esm8 = __esm({
301638
301686
  // node_modules/path-scurry/dist/esm/index.js
301639
301687
  import { posix as posix2, win32 } from "node:path";
301640
301688
  import { fileURLToPath as fileURLToPath7 } from "node:url";
301641
- import { lstatSync, readdir as readdirCB, readdirSync, readlinkSync, realpathSync as rps } from "fs";
301689
+ import { lstatSync as lstatSync2, readdir as readdirCB, readdirSync, readlinkSync as readlinkSync2, realpathSync as rps } from "fs";
301642
301690
  import * as actualFS from "node:fs";
301643
301691
  import { lstat, readdir, readlink, realpath } from "node:fs/promises";
301644
301692
  var realpathSync2, defaultFS, fsFromOption, uncDriveRegexp, uncToDrive, eitherSep, UNKNOWN, IFIFO, IFCHR, IFDIR, IFBLK, IFREG, IFLNK, IFSOCK, IFMT, IFMT_UNKNOWN, READDIR_CALLED, LSTAT_CALLED, ENOTDIR, ENOENT, ENOREADLINK, ENOREALPATH, ENOCHILD, TYPEMASK, entToType, normalizeCache, normalize, normalizeNocaseCache, normalizeNocase, ResolveCache, ChildrenCache, setAsCwd, PathBase, PathWin32, PathPosix, PathScurryBase, PathScurryWin32, PathScurryPosix, PathScurryDarwin, Path, PathScurry;
@@ -301648,10 +301696,10 @@ var init_esm9 = __esm({
301648
301696
  init_esm8();
301649
301697
  realpathSync2 = rps.native;
301650
301698
  defaultFS = {
301651
- lstatSync,
301699
+ lstatSync: lstatSync2,
301652
301700
  readdir: readdirCB,
301653
301701
  readdirSync,
301654
- readlinkSync,
301702
+ readlinkSync: readlinkSync2,
301655
301703
  realpathSync: realpathSync2,
301656
301704
  promises: {
301657
301705
  lstat,
@@ -303394,7 +303442,7 @@ var init_pattern = __esm({
303394
303442
  #isUNC;
303395
303443
  #isAbsolute;
303396
303444
  #followGlobstar = true;
303397
- constructor(patternList, globList, index, platform22) {
303445
+ constructor(patternList, globList, index, platform21) {
303398
303446
  if (!isPatternList(patternList)) {
303399
303447
  throw new TypeError("empty pattern list");
303400
303448
  }
@@ -303411,7 +303459,7 @@ var init_pattern = __esm({
303411
303459
  this.#patternList = patternList;
303412
303460
  this.#globList = globList;
303413
303461
  this.#index = index;
303414
- this.#platform = platform22;
303462
+ this.#platform = platform21;
303415
303463
  if (this.#index === 0) {
303416
303464
  if (this.isUNC()) {
303417
303465
  const [p0, p1, p2, p3, ...prest] = this.#patternList;
@@ -303560,12 +303608,12 @@ var init_ignore = __esm({
303560
303608
  absoluteChildren;
303561
303609
  platform;
303562
303610
  mmopts;
303563
- constructor(ignored, { nobrace, nocase, noext, noglobstar, platform: platform22 = defaultPlatform2 }) {
303611
+ constructor(ignored, { nobrace, nocase, noext, noglobstar, platform: platform21 = defaultPlatform2 }) {
303564
303612
  this.relative = [];
303565
303613
  this.absolute = [];
303566
303614
  this.relativeChildren = [];
303567
303615
  this.absoluteChildren = [];
303568
- this.platform = platform22;
303616
+ this.platform = platform21;
303569
303617
  this.mmopts = {
303570
303618
  dot: true,
303571
303619
  nobrace,
@@ -303573,7 +303621,7 @@ var init_ignore = __esm({
303573
303621
  noext,
303574
303622
  noglobstar,
303575
303623
  optimizationLevel: 2,
303576
- platform: platform22,
303624
+ platform: platform21,
303577
303625
  nocomment: true,
303578
303626
  nonegate: true
303579
303627
  };
@@ -310870,8 +310918,8 @@ var require_path_key = __commonJS({
310870
310918
  "use strict";
310871
310919
  var pathKey2 = (options = {}) => {
310872
310920
  const environment = options.env || process.env;
310873
- const platform22 = options.platform || process.platform;
310874
- if (platform22 !== "win32") {
310921
+ const platform21 = options.platform || process.platform;
310922
+ if (platform21 !== "win32") {
310875
310923
  return "PATH";
310876
310924
  }
310877
310925
  return Object.keys(environment).reverse().find((key) => key.toUpperCase() === "PATH") || "Path";
@@ -311141,9 +311189,9 @@ var require_cross_spawn = __commonJS({
311141
311189
  function pathKey(options = {}) {
311142
311190
  const {
311143
311191
  env: env6 = process.env,
311144
- platform: platform22 = process.platform
311192
+ platform: platform21 = process.platform
311145
311193
  } = options;
311146
- if (platform22 !== "win32") {
311194
+ if (platform21 !== "win32") {
311147
311195
  return "PATH";
311148
311196
  }
311149
311197
  return Object.keys(env6).reverse().find((key) => key.toUpperCase() === "PATH") || "Path";
@@ -329988,8 +330036,8 @@ var init_downloadRipGrep = __esm({
329988
330036
  BIN_PATH = join10(__dirname5, "../bin");
329989
330037
  getTarget = () => {
329990
330038
  const arch5 = process.env.npm_config_arch || os14.arch();
329991
- const platform22 = process.env.platform || os14.platform();
329992
- switch (platform22) {
330039
+ const platform21 = process.env.platform || os14.platform();
330040
+ switch (platform21) {
329993
330041
  case "darwin":
329994
330042
  switch (arch5) {
329995
330043
  case "arm64":
@@ -330023,7 +330071,7 @@ var init_downloadRipGrep = __esm({
330023
330071
  return "i686-unknown-linux-musl.tar.gz";
330024
330072
  }
330025
330073
  default:
330026
- throw new VError("Unknown platform: " + platform22);
330074
+ throw new VError("Unknown platform: " + platform21);
330027
330075
  }
330028
330076
  };
330029
330077
  downloadFile2 = async (url4, outFile) => {
@@ -331713,11 +331761,11 @@ async function getIdeProcessInfoForWindows() {
331713
331761
  return { pid: myPid, command: myProc.command };
331714
331762
  }
331715
331763
  async function getIdeProcessInfo() {
331716
- const platform22 = os16.platform();
331764
+ const platform21 = os16.platform();
331717
331765
  if (process.env["GEMINI_CLI_IDE_PID"]) {
331718
331766
  const idePid = parseInt(process.env["GEMINI_CLI_IDE_PID"], 10);
331719
331767
  if (!isNaN(idePid) && idePid > 0) {
331720
- if (platform22 === "win32") {
331768
+ if (platform21 === "win32") {
331721
331769
  const processMap = await getProcessTableWindows();
331722
331770
  const proc2 = processMap.get(idePid);
331723
331771
  return { pid: idePid, command: proc2?.command || "" };
@@ -331726,7 +331774,7 @@ async function getIdeProcessInfo() {
331726
331774
  return { pid: idePid, command: command2 };
331727
331775
  }
331728
331776
  }
331729
- if (platform22 === "win32") {
331777
+ if (platform21 === "win32") {
331730
331778
  return getIdeProcessInfoForWindows();
331731
331779
  }
331732
331780
  return getIdeProcessInfoForUnix();
@@ -398321,7 +398369,7 @@ async function getEnvironmentContext(config2) {
398321
398369
  month: "long",
398322
398370
  day: "numeric"
398323
398371
  });
398324
- const platform22 = process.platform;
398372
+ const platform21 = process.platform;
398325
398373
  const directoryContext = config2.getIncludeDirectoryTree() ? await getDirectoryContextString(config2) : "";
398326
398374
  const tempDir = config2.storage.getProjectTempDir();
398327
398375
  const environmentMemory = config2.getEnvironmentMemory();
@@ -398329,7 +398377,7 @@ async function getEnvironmentContext(config2) {
398329
398377
  <session_context>
398330
398378
  This is the Gemini CLI. We are setting up the context for our chat.
398331
398379
  Today's date is ${today} (formatted according to the user's locale).
398332
- My operating system is: ${platform22}
398380
+ My operating system is: ${platform21}
398333
398381
  The project's temporary directory is: ${tempDir}
398334
398382
  ${directoryContext}
398335
398383
 
@@ -411545,8 +411593,8 @@ var WorkspaceContext;
411545
411593
  var init_workspaceContext = __esm({
411546
411594
  "packages/core/dist/src/utils/workspaceContext.js"() {
411547
411595
  "use strict";
411548
- init_errors();
411549
411596
  init_debugLogger();
411597
+ init_paths();
411550
411598
  WorkspaceContext = class {
411551
411599
  targetDir;
411552
411600
  directories = /* @__PURE__ */ new Set();
@@ -411716,16 +411764,7 @@ var init_workspaceContext = __esm({
411716
411764
  * if it did exist.
411717
411765
  */
411718
411766
  fullyResolvedPath(pathToCheck) {
411719
- try {
411720
- return fs46.realpathSync(path60.resolve(this.targetDir, pathToCheck));
411721
- } catch (e3) {
411722
- if (isNodeError(e3) && e3.code === "ENOENT" && e3.path && // realpathSync does not set e.path correctly for symlinks to
411723
- // non-existent files.
411724
- !this.isFileSymlink(e3.path)) {
411725
- return e3.path;
411726
- }
411727
- throw e3;
411728
- }
411767
+ return resolveToRealPath(path60.resolve(this.targetDir, pathToCheck));
411729
411768
  }
411730
411769
  /**
411731
411770
  * Checks if a path is within a given root directory.
@@ -411737,16 +411776,6 @@ var init_workspaceContext = __esm({
411737
411776
  const relative13 = path60.relative(rootDirectory, pathToCheck);
411738
411777
  return !relative13.startsWith(`..${path60.sep}`) && relative13 !== ".." && !path60.isAbsolute(relative13);
411739
411778
  }
411740
- /**
411741
- * Checks if a file path is a symbolic link that points to a file.
411742
- */
411743
- isFileSymlink(filePath) {
411744
- try {
411745
- return !fs46.readlinkSync(filePath).endsWith("/");
411746
- } catch (_error) {
411747
- return false;
411748
- }
411749
- }
411750
411779
  };
411751
411780
  }
411752
411781
  });
@@ -411952,34 +411981,17 @@ function matchesWildcard(pattern, toolName, serverName) {
411952
411981
  if (pattern === "*") {
411953
411982
  return true;
411954
411983
  }
411955
- if (pattern.includes("__")) {
411956
- return matchesCompositePattern(pattern, toolName, serverName);
411984
+ if (pattern === `${MCP_TOOL_PREFIX}*`) {
411985
+ return serverName !== void 0;
411957
411986
  }
411958
- return toolName === pattern;
411959
- }
411960
- function matchesCompositePattern(pattern, toolName, serverName) {
411961
- const parts2 = pattern.split("__");
411962
- if (parts2.length !== 2)
411963
- return false;
411964
- const [patternServer, patternTool] = parts2;
411965
- const { actualServer, actualTool } = getToolMetadata(toolName, serverName);
411966
- if (actualServer === void 0) {
411967
- return false;
411968
- }
411969
- if (serverName !== void 0 && !toolName.startsWith(serverName + "__")) {
411970
- return false;
411987
+ if (pattern.startsWith(MCP_TOOL_PREFIX) && pattern.endsWith("_*")) {
411988
+ const expectedServerName = pattern.slice(MCP_TOOL_PREFIX.length, -2);
411989
+ if (serverName === void 0 || serverName !== expectedServerName) {
411990
+ return false;
411991
+ }
411992
+ return toolName.startsWith(`${MCP_TOOL_PREFIX}${expectedServerName}_`);
411971
411993
  }
411972
- const serverMatch = patternServer === "*" || patternServer === actualServer;
411973
- const toolMatch = patternTool === "*" || patternTool === actualTool;
411974
- return serverMatch && toolMatch;
411975
- }
411976
- function getToolMetadata(toolName, serverName) {
411977
- const sepIndex = toolName.indexOf("__");
411978
- const isQualified = sepIndex !== -1;
411979
- return {
411980
- actualServer: serverName ?? (isQualified ? toolName.substring(0, sepIndex) : void 0),
411981
- actualTool: isQualified ? toolName.substring(sepIndex + 2) : toolName
411982
- };
411994
+ return toolName === pattern;
411983
411995
  }
411984
411996
  function ruleMatches(rule, toolCall, stringifiedArgs, serverName, currentApprovalMode, toolAnnotations) {
411985
411997
  if (rule.modes && rule.modes.length > 0) {
@@ -411987,6 +411999,15 @@ function ruleMatches(rule, toolCall, stringifiedArgs, serverName, currentApprova
411987
411999
  return false;
411988
412000
  }
411989
412001
  }
412002
+ if (rule.mcpName) {
412003
+ if (rule.mcpName === "*") {
412004
+ if (serverName === void 0)
412005
+ return false;
412006
+ } else {
412007
+ if (serverName !== rule.mcpName)
412008
+ return false;
412009
+ }
412010
+ }
411990
412011
  if (rule.toolName) {
411991
412012
  if (rule.toolName === "*") {
411992
412013
  } else if (isWildcardPattern(rule.toolName)) {
@@ -412028,6 +412049,7 @@ var init_policy_engine = __esm({
412028
412049
  init_protocol2();
412029
412050
  init_shell_utils();
412030
412051
  init_tool_names();
412052
+ init_mcp_tool();
412031
412053
  PolicyEngine = class {
412032
412054
  rules;
412033
412055
  checkers;
@@ -412156,6 +412178,15 @@ var init_policy_engine = __esm({
412156
412178
  * Returns the decision and the matching rule (if any).
412157
412179
  */
412158
412180
  async check(toolCall, serverName, toolAnnotations) {
412181
+ if (!serverName && isMcpToolAnnotation(toolAnnotations)) {
412182
+ serverName = toolAnnotations._serverName;
412183
+ }
412184
+ if (!serverName && toolCall.name) {
412185
+ const parsed = parseMcpToolName(toolCall.name);
412186
+ if (parsed.serverName) {
412187
+ serverName = parsed.serverName;
412188
+ }
412189
+ }
412159
412190
  let stringifiedArgs;
412160
412191
  if (toolCall.args && (this.rules.some((rule) => rule.argsPattern) || this.checkers.some((checker) => checker.argsPattern))) {
412161
412192
  stringifiedArgs = stableStringify(toolCall.args);
@@ -412177,12 +412208,6 @@ var init_policy_engine = __esm({
412177
412208
  const toolCallsToTry = [];
412178
412209
  for (const name4 of toolNamesToTry) {
412179
412210
  toolCallsToTry.push({ ...toolCall, name: name4 });
412180
- if (serverName && !name4.includes("__")) {
412181
- toolCallsToTry.push({
412182
- ...toolCall,
412183
- name: `${serverName}__${name4}`
412184
- });
412185
- }
412186
412211
  }
412187
412212
  for (const rule of this.rules) {
412188
412213
  const match2 = toolCallsToTry.some((tc) => ruleMatches(rule, tc, stringifiedArgs, serverName, this.approvalMode, toolAnnotations));
@@ -412328,107 +412353,52 @@ var init_policy_engine = __esm({
412328
412353
  */
412329
412354
  getExcludedTools(toolMetadata, allToolNames) {
412330
412355
  const excludedTools = /* @__PURE__ */ new Set();
412331
- const processedTools = /* @__PURE__ */ new Set();
412332
- let globalVerdict;
412333
- for (const rule of this.rules) {
412334
- if (rule.argsPattern) {
412335
- if (rule.toolName && rule.decision !== PolicyDecision.DENY) {
412336
- processedTools.add(rule.toolName);
412337
- }
412338
- continue;
412339
- }
412340
- if (rule.modes && rule.modes.length > 0) {
412341
- if (!rule.modes.includes(this.approvalMode)) {
412342
- continue;
412343
- }
412344
- }
412345
- if (rule.toolAnnotations) {
412346
- if (!toolMetadata) {
412347
- continue;
412348
- }
412349
- for (const [toolName2, annotations] of toolMetadata) {
412350
- if (processedTools.has(toolName2)) {
412351
- continue;
412352
- }
412353
- let annotationsMatch = true;
412354
- for (const [key, value] of Object.entries(rule.toolAnnotations)) {
412355
- if (annotations[key] !== value) {
412356
- annotationsMatch = false;
412356
+ if (!allToolNames) {
412357
+ return excludedTools;
412358
+ }
412359
+ for (const toolName of allToolNames) {
412360
+ const annotations = toolMetadata?.get(toolName);
412361
+ const serverName = isMcpToolAnnotation(annotations) ? annotations._serverName : void 0;
412362
+ let staticallyExcluded = false;
412363
+ let matchFound = false;
412364
+ for (const rule of this.rules) {
412365
+ const ruleWithoutArgs = { ...rule, argsPattern: void 0 };
412366
+ const toolCall = { name: toolName, args: {} };
412367
+ const appliesToTool = ruleMatches(
412368
+ ruleWithoutArgs,
412369
+ toolCall,
412370
+ void 0,
412371
+ // stringifiedArgs
412372
+ serverName,
412373
+ this.approvalMode,
412374
+ annotations
412375
+ );
412376
+ if (appliesToTool) {
412377
+ if (rule.argsPattern) {
412378
+ if (rule.decision !== PolicyDecision.DENY) {
412379
+ staticallyExcluded = false;
412380
+ matchFound = true;
412357
412381
  break;
412358
412382
  }
412359
- }
412360
- if (!annotationsMatch) {
412361
412383
  continue;
412362
- }
412363
- if (rule.toolName) {
412364
- if (isWildcardPattern(rule.toolName)) {
412365
- const rawServerName = annotations["_serverName"];
412366
- const serverName = typeof rawServerName === "string" ? rawServerName : void 0;
412367
- const qualifiedName = serverName && !toolName2.includes("__") ? `${serverName}__${toolName2}` : toolName2;
412368
- if (!matchesWildcard(rule.toolName, qualifiedName, void 0)) {
412369
- continue;
412370
- }
412371
- } else if (toolName2 !== rule.toolName) {
412372
- continue;
412373
- }
412374
- }
412375
- let decision2;
412376
- if (globalVerdict !== void 0) {
412377
- decision2 = globalVerdict;
412378
412384
  } else {
412379
- decision2 = rule.decision;
412380
- }
412381
- if (decision2 === PolicyDecision.DENY) {
412382
- excludedTools.add(toolName2);
412383
- }
412384
- processedTools.add(toolName2);
412385
- }
412386
- continue;
412387
- }
412388
- if (!rule.toolName) {
412389
- if (globalVerdict === void 0) {
412390
- globalVerdict = rule.decision;
412391
- if (globalVerdict !== PolicyDecision.DENY) {
412385
+ const decision = this.applyNonInteractiveMode(rule.decision);
412386
+ staticallyExcluded = decision === PolicyDecision.DENY;
412387
+ matchFound = true;
412392
412388
  break;
412393
412389
  }
412394
412390
  }
412395
- continue;
412396
- }
412397
- const toolName = rule.toolName;
412398
- if (processedTools.has(toolName)) {
412399
- continue;
412400
412391
  }
412401
- let coveredByWildcard = false;
412402
- for (const processed of processedTools) {
412403
- if (isWildcardPattern(processed) && matchesWildcard(processed, toolName, void 0)) {
412404
- if (excludedTools.has(processed)) {
412405
- excludedTools.add(toolName);
412406
- }
412407
- coveredByWildcard = true;
412408
- break;
412392
+ if (!matchFound) {
412393
+ const defaultDec = this.applyNonInteractiveMode(this.defaultDecision);
412394
+ if (defaultDec === PolicyDecision.DENY) {
412395
+ staticallyExcluded = true;
412409
412396
  }
412410
412397
  }
412411
- if (coveredByWildcard) {
412412
- continue;
412413
- }
412414
- processedTools.add(toolName);
412415
- let decision;
412416
- if (globalVerdict !== void 0) {
412417
- decision = globalVerdict;
412418
- } else {
412419
- decision = rule.decision;
412420
- }
412421
- if (decision === PolicyDecision.DENY) {
412398
+ if (staticallyExcluded) {
412422
412399
  excludedTools.add(toolName);
412423
412400
  }
412424
412401
  }
412425
- if (globalVerdict === PolicyDecision.DENY && allToolNames) {
412426
- for (const name4 of allToolNames) {
412427
- if (!processedTools.has(name4)) {
412428
- excludedTools.add(name4);
412429
- }
412430
- }
412431
- }
412432
412402
  return excludedTools;
412433
412403
  }
412434
412404
  applyNonInteractiveMode(decision) {
@@ -427981,7 +427951,10 @@ function validateShellCommandSyntax(rule, ruleIndex) {
427981
427951
  return null;
427982
427952
  }
427983
427953
  function validateToolName(name4, ruleIndex) {
427984
- if (isValidToolName(name4, { allowWildcards: true }) && !name4.includes("__")) {
427954
+ if (name4.includes("__")) {
427955
+ return `Rule #${ruleIndex + 1}: The "__" syntax for MCP tools is strictly deprecated. Please use the 'mcpName = "..."' property or the 'mcp_server_tool' format instead.`;
427956
+ }
427957
+ if (isValidToolName(name4, { allowWildcards: true })) {
427985
427958
  return null;
427986
427959
  }
427987
427960
  const allNames = [...ALL_BUILTIN_TOOL_NAMES];
@@ -428066,8 +428039,6 @@ async function loadPoliciesFromToml(policyPaths, getPolicyTier2) {
428066
428039
  }
428067
428040
  for (let i4 = 0; i4 < tomlRules.length; i4++) {
428068
428041
  const rule = tomlRules[i4];
428069
- if (rule.mcpName)
428070
- continue;
428071
428042
  const toolNames = rule.toolName ? Array.isArray(rule.toolName) ? rule.toolName : [rule.toolName] : [];
428072
428043
  for (const name4 of toolNames) {
428073
428044
  const warning = validateToolName(name4, i4);
@@ -428090,16 +428061,14 @@ async function loadPoliciesFromToml(policyPaths, getPolicyTier2) {
428090
428061
  return argsPatterns.flatMap((argsPattern) => {
428091
428062
  const toolNames = rule.toolName ? Array.isArray(rule.toolName) ? rule.toolName : [rule.toolName] : [void 0];
428092
428063
  return toolNames.map((toolName) => {
428093
- let effectiveToolName;
428094
- if (rule.mcpName && toolName) {
428095
- effectiveToolName = `${rule.mcpName}__${toolName}`;
428096
- } else if (rule.mcpName) {
428097
- effectiveToolName = `${rule.mcpName}__*`;
428098
- } else {
428099
- effectiveToolName = toolName;
428064
+ let effectiveToolName = toolName;
428065
+ const mcpName = rule.mcpName;
428066
+ if (mcpName) {
428067
+ effectiveToolName = formatMcpToolName(mcpName, effectiveToolName);
428100
428068
  }
428101
428069
  const policyRule = {
428102
428070
  toolName: effectiveToolName,
428071
+ mcpName: rule.mcpName,
428103
428072
  decision: rule.decision,
428104
428073
  priority: transformPriority(rule.priority, tier),
428105
428074
  modes: rule.modes,
@@ -428173,14 +428142,15 @@ Error: ${error40.message}`,
428173
428142
  return toolNames.map((toolName) => {
428174
428143
  let effectiveToolName;
428175
428144
  if (checker.mcpName && toolName) {
428176
- effectiveToolName = `${checker.mcpName}__${toolName}`;
428145
+ effectiveToolName = `${MCP_TOOL_PREFIX}${checker.mcpName}_${toolName}`;
428177
428146
  } else if (checker.mcpName) {
428178
- effectiveToolName = `${checker.mcpName}__*`;
428147
+ effectiveToolName = `${MCP_TOOL_PREFIX}${checker.mcpName}_*`;
428179
428148
  } else {
428180
428149
  effectiveToolName = toolName;
428181
428150
  }
428182
428151
  const safetyCheckerRule = {
428183
428152
  toolName: effectiveToolName,
428153
+ mcpName: checker.mcpName,
428184
428154
  priority: transformPriority(checker.priority, tier),
428185
428155
  // eslint-disable-next-line @typescript-eslint/no-unsafe-type-assertion
428186
428156
  checker: checker.checker,
@@ -428239,14 +428209,19 @@ Error: ${error40.message}`
428239
428209
  return { rules, checkers, errors };
428240
428210
  }
428241
428211
  function validateMcpPolicyToolNames(serverName, discoveredToolNames, policyRules) {
428242
- const prefix = `${serverName}__`;
428212
+ const prefix = `${MCP_TOOL_PREFIX}${serverName}_`;
428243
428213
  const warnings = [];
428244
428214
  for (const rule of policyRules) {
428245
428215
  if (!rule.toolName)
428246
428216
  continue;
428247
- if (!rule.toolName.startsWith(prefix))
428217
+ let toolPart;
428218
+ if (rule.mcpName === serverName && rule.toolName.startsWith(prefix)) {
428219
+ toolPart = rule.toolName.slice(prefix.length);
428220
+ } else if (rule.toolName.startsWith(prefix)) {
428221
+ toolPart = rule.toolName.slice(prefix.length);
428222
+ } else {
428248
428223
  continue;
428249
- const toolPart = rule.toolName.slice(prefix.length);
428224
+ }
428250
428225
  if (toolPart === "*")
428251
428226
  continue;
428252
428227
  if (discoveredToolNames.includes(toolPart))
@@ -428274,6 +428249,7 @@ var init_toml_loader = __esm({
428274
428249
  import_toml = __toESM(require_toml(), 1);
428275
428250
  init_zod();
428276
428251
  init_errors();
428252
+ init_mcp_tool();
428277
428253
  MAX_TYPO_DISTANCE = 3;
428278
428254
  PolicyRuleSchema = external_exports.object({
428279
428255
  toolName: external_exports.union([external_exports.string(), external_exports.array(external_exports.string())]).optional(),
@@ -428529,7 +428505,8 @@ async function createPolicyEngineConfig(settings, approvalMode, defaultPoliciesD
428529
428505
  if (settings.mcp?.excluded) {
428530
428506
  for (const serverName of settings.mcp.excluded) {
428531
428507
  rules.push({
428532
- toolName: `${serverName}__*`,
428508
+ toolName: serverName === "*" ? `${MCP_TOOL_PREFIX}*` : `${MCP_TOOL_PREFIX}${serverName}_*`,
428509
+ mcpName: serverName,
428533
428510
  decision: PolicyDecision.DENY,
428534
428511
  priority: MCP_EXCLUDED_PRIORITY,
428535
428512
  source: "Settings (MCP Excluded)"
@@ -428588,7 +428565,8 @@ async function createPolicyEngineConfig(settings, approvalMode, defaultPoliciesD
428588
428565
  for (const [serverName, serverConfig] of Object.entries(settings.mcpServers)) {
428589
428566
  if (serverConfig.trust) {
428590
428567
  rules.push({
428591
- toolName: `${serverName}__*`,
428568
+ toolName: `${MCP_TOOL_PREFIX}${serverName}_*`,
428569
+ mcpName: serverName,
428592
428570
  decision: PolicyDecision.ALLOW,
428593
428571
  priority: TRUSTED_MCP_SERVER_PRIORITY,
428594
428572
  source: "Settings (MCP Trusted)"
@@ -428599,7 +428577,8 @@ async function createPolicyEngineConfig(settings, approvalMode, defaultPoliciesD
428599
428577
  if (settings.mcp?.allowed) {
428600
428578
  for (const serverName of settings.mcp.allowed) {
428601
428579
  rules.push({
428602
- toolName: `${serverName}__*`,
428580
+ toolName: serverName === "*" ? `${MCP_TOOL_PREFIX}*` : `${MCP_TOOL_PREFIX}${serverName}_*`,
428581
+ mcpName: serverName,
428603
428582
  decision: PolicyDecision.ALLOW,
428604
428583
  priority: ALLOWED_MCP_SERVER_PRIORITY,
428605
428584
  source: "Settings (MCP Allowed)"
@@ -428716,6 +428695,7 @@ var init_config3 = __esm({
428716
428695
  init_shell_utils();
428717
428696
  init_tool_names();
428718
428697
  init_errors();
428698
+ init_mcp_tool();
428719
428699
  init_security();
428720
428700
  __filename3 = fileURLToPath15(import.meta.url);
428721
428701
  __dirname7 = path69.dirname(__filename3);
@@ -433196,7 +433176,6 @@ ${clientInstructions}
433196
433176
  // packages/core/dist/src/config/config.js
433197
433177
  import * as fs59 from "node:fs";
433198
433178
  import * as path73 from "node:path";
433199
- import * as os26 from "node:os";
433200
433179
  import { inspect as inspect4 } from "node:util";
433201
433180
  import process36 from "node:process";
433202
433181
  var DEFAULT_TRUNCATE_TOOL_OUTPUT_THRESHOLD, MCPServerConfig, AuthProviderType, Config;
@@ -434567,22 +434546,13 @@ var init_config4 = __esm({
434567
434546
  * @returns true if the path is allowed, false otherwise.
434568
434547
  */
434569
434548
  isPathAllowed(absolutePath) {
434570
- const realpath3 = (p) => {
434571
- let resolved;
434572
- try {
434573
- resolved = fs59.realpathSync(p);
434574
- } catch {
434575
- resolved = path73.resolve(p);
434576
- }
434577
- return os26.platform() === "win32" ? resolved.toLowerCase() : resolved;
434578
- };
434579
- const resolvedPath = realpath3(absolutePath);
434549
+ const resolvedPath = resolveToRealPath(absolutePath);
434580
434550
  const workspaceContext = this.getWorkspaceContext();
434581
434551
  if (workspaceContext.isPathWithinWorkspace(resolvedPath)) {
434582
434552
  return true;
434583
434553
  }
434584
434554
  const projectTempDir = this.storage.getProjectTempDir();
434585
- const resolvedTempDir = realpath3(projectTempDir);
434555
+ const resolvedTempDir = resolveToRealPath(projectTempDir);
434586
434556
  return isSubpath(resolvedTempDir, resolvedPath);
434587
434557
  }
434588
434558
  /**
@@ -436143,8 +436113,8 @@ var require_utils20 = __commonJS({
436143
436113
  exports2.toPosixSlashes = (str2) => str2.replace(REGEX_BACKSLASH, "/");
436144
436114
  exports2.isWindows = () => {
436145
436115
  if (typeof navigator !== "undefined" && navigator.platform) {
436146
- const platform22 = navigator.platform.toLowerCase();
436147
- return platform22 === "win32" || platform22 === "windows";
436116
+ const platform21 = navigator.platform.toLowerCase();
436117
+ return platform21 === "win32" || platform21 === "windows";
436148
436118
  }
436149
436119
  if (typeof process !== "undefined" && process.platform) {
436150
436120
  return process.platform === "win32";
@@ -439969,9 +439939,9 @@ import * as child_process from "node:child_process";
439969
439939
  import * as process37 from "node:process";
439970
439940
  import * as path81 from "node:path";
439971
439941
  import * as fs65 from "node:fs";
439972
- async function findCommand(command2, platform22 = process37.platform) {
439942
+ async function findCommand(command2, platform21 = process37.platform) {
439973
439943
  try {
439974
- if (platform22 === "win32") {
439944
+ if (platform21 === "win32") {
439975
439945
  const result2 = child_process.execSync(`where.exe ${command2}`).toString().trim();
439976
439946
  const firstPath = result2.split(/\r?\n/)[0];
439977
439947
  if (firstPath) {
@@ -440006,17 +439976,17 @@ async function findCommand(command2, platform22 = process37.platform) {
440006
439976
  appname = "positron";
440007
439977
  }
440008
439978
  if (appname) {
440009
- if (platform22 === "darwin") {
439979
+ if (platform21 === "darwin") {
440010
439980
  const macConfig = appConfigs[appname].mac;
440011
439981
  if (macConfig) {
440012
439982
  locations.push(`/Applications/${macConfig.appName}.app/Contents/Resources/app/bin/${appname}`, path81.join(homeDir, `Library/Application Support/${macConfig.supportDirName}/bin/${appname}`));
440013
439983
  }
440014
- } else if (platform22 === "linux") {
439984
+ } else if (platform21 === "linux") {
440015
439985
  const linuxConfig = appConfigs[appname]?.linux;
440016
439986
  if (linuxConfig) {
440017
439987
  locations.push(`/usr/share/${linuxConfig.appBinary}/bin/${linuxConfig.appBinary}`, `/snap/bin/${linuxConfig.appBinary}`, path81.join(homeDir, `.local/share/${linuxConfig.appBinary}/bin/${linuxConfig.appBinary}`));
440018
439988
  }
440019
- } else if (platform22 === "win32") {
439989
+ } else if (platform21 === "win32") {
440020
439990
  const winConfig = appConfigs[appname].win;
440021
439991
  if (winConfig) {
440022
439992
  const winAppName = winConfig.appName;
@@ -440031,15 +440001,15 @@ async function findCommand(command2, platform22 = process37.platform) {
440031
440001
  }
440032
440002
  return null;
440033
440003
  }
440034
- function getIdeInstaller(ide, platform22 = process37.platform) {
440004
+ function getIdeInstaller(ide, platform21 = process37.platform) {
440035
440005
  switch (ide.name) {
440036
440006
  case IDE_DEFINITIONS.vscode.name:
440037
440007
  case IDE_DEFINITIONS.firebasestudio.name:
440038
- return new VsCodeInstaller(ide, platform22);
440008
+ return new VsCodeInstaller(ide, platform21);
440039
440009
  case IDE_DEFINITIONS.positron.name:
440040
- return new PositronInstaller(ide, platform22);
440010
+ return new PositronInstaller(ide, platform21);
440041
440011
  case IDE_DEFINITIONS.antigravity.name:
440042
- return new AntigravityInstaller(ide, platform22);
440012
+ return new AntigravityInstaller(ide, platform21);
440043
440013
  default:
440044
440014
  return null;
440045
440015
  }
@@ -440055,11 +440025,11 @@ var init_ide_installer = __esm({
440055
440025
  ideInfo;
440056
440026
  platform;
440057
440027
  vsCodeCommand;
440058
- constructor(ideInfo, platform22 = process37.platform) {
440028
+ constructor(ideInfo, platform21 = process37.platform) {
440059
440029
  this.ideInfo = ideInfo;
440060
- this.platform = platform22;
440061
- const command2 = platform22 === "win32" ? "code.cmd" : "code";
440062
- this.vsCodeCommand = findCommand(command2, platform22);
440030
+ this.platform = platform21;
440031
+ const command2 = platform21 === "win32" ? "code.cmd" : "code";
440032
+ this.vsCodeCommand = findCommand(command2, platform21);
440063
440033
  }
440064
440034
  async install() {
440065
440035
  const commandPath = await this.vsCodeCommand;
@@ -440094,11 +440064,11 @@ var init_ide_installer = __esm({
440094
440064
  ideInfo;
440095
440065
  platform;
440096
440066
  vsCodeCommand;
440097
- constructor(ideInfo, platform22 = process37.platform) {
440067
+ constructor(ideInfo, platform21 = process37.platform) {
440098
440068
  this.ideInfo = ideInfo;
440099
- this.platform = platform22;
440100
- const command2 = platform22 === "win32" ? "positron.cmd" : "positron";
440101
- this.vsCodeCommand = findCommand(command2, platform22);
440069
+ this.platform = platform21;
440070
+ const command2 = platform21 === "win32" ? "positron.cmd" : "positron";
440071
+ this.vsCodeCommand = findCommand(command2, platform21);
440102
440072
  }
440103
440073
  async install() {
440104
440074
  const commandPath = await this.vsCodeCommand;
@@ -440132,9 +440102,9 @@ var init_ide_installer = __esm({
440132
440102
  AntigravityInstaller = class {
440133
440103
  ideInfo;
440134
440104
  platform;
440135
- constructor(ideInfo, platform22 = process37.platform) {
440105
+ constructor(ideInfo, platform21 = process37.platform) {
440136
440106
  this.ideInfo = ideInfo;
440137
- this.platform = platform22;
440107
+ this.platform = platform21;
440138
440108
  }
440139
440109
  async install() {
440140
440110
  const command2 = process37.env["ANTIGRAVITY_CLI_ALIAS"];
@@ -440487,12 +440457,12 @@ ${fileContentForLlm}
440487
440457
  });
440488
440458
 
440489
440459
  // packages/core/dist/src/utils/compatibility.js
440490
- import os27 from "node:os";
440460
+ import os26 from "node:os";
440491
440461
  function isWindows10() {
440492
- if (os27.platform() !== "win32") {
440462
+ if (os26.platform() !== "win32") {
440493
440463
  return false;
440494
440464
  }
440495
- const release2 = os27.release();
440465
+ const release2 = os26.release();
440496
440466
  const parts2 = release2.split(".");
440497
440467
  if (parts2.length >= 3 && parts2[0] === "10" && parts2[1] === "0") {
440498
440468
  const build2 = parseInt(parts2[2], 10);
@@ -440540,7 +440510,7 @@ function getCompatibilityWarnings(options) {
440540
440510
  darwin: "iTerm2 or Ghostty",
440541
440511
  linux: "Ghostty"
440542
440512
  };
440543
- const suggestion = platformTerminals[os27.platform()];
440513
+ const suggestion = platformTerminals[os26.platform()];
440544
440514
  const suggestedTerminals = suggestion ? ` (e.g., ${suggestion})` : "";
440545
440515
  warnings.push({
440546
440516
  id: "jetbrains-terminal",
@@ -441114,6 +441084,7 @@ __export(dist_exports, {
441114
441084
  MCP_DEFAULT_TIMEOUT_MSEC: () => MCP_DEFAULT_TIMEOUT_MSEC,
441115
441085
  MCP_EXCLUDED_PRIORITY: () => MCP_EXCLUDED_PRIORITY,
441116
441086
  MCP_QUALIFIED_NAME_SEPARATOR: () => MCP_QUALIFIED_NAME_SEPARATOR,
441087
+ MCP_TOOL_PREFIX: () => MCP_TOOL_PREFIX,
441117
441088
  MEDIA_FILE_PATTERNS: () => MEDIA_FILE_PATTERNS,
441118
441089
  MEMORY_PARAM_FACT: () => MEMORY_PARAM_FACT,
441119
441090
  MEMORY_SECTION_HEADER: () => MEMORY_SECTION_HEADER,
@@ -441343,6 +441314,7 @@ __export(dist_exports, {
441343
441314
  flushTelemetry: () => flushTelemetry,
441344
441315
  formatBytes: () => formatBytes,
441345
441316
  formatCheckpointDisplayList: () => formatCheckpointDisplayList,
441317
+ formatMcpToolName: () => formatMcpToolName,
441346
441318
  formatPolicyError: () => formatPolicyError,
441347
441319
  formatProtoJsonDuration: () => formatProtoJsonDuration,
441348
441320
  formatTruncatedToolOutput: () => formatTruncatedToolOutput,
@@ -441462,6 +441434,7 @@ __export(dist_exports, {
441462
441434
  isHeadlessMode: () => isHeadlessMode,
441463
441435
  isInvalidArgumentError: () => isInvalidArgumentError,
441464
441436
  isJetBrainsTerminal: () => isJetBrainsTerminal,
441437
+ isMcpToolAnnotation: () => isMcpToolAnnotation,
441465
441438
  isMcpToolName: () => isMcpToolName,
441466
441439
  isNightly: () => isNightly,
441467
441440
  isNodeError: () => isNodeError,
@@ -441536,6 +441509,7 @@ __export(dist_exports, {
441536
441509
  parseBooleanEnvFlag: () => parseBooleanEnvFlag,
441537
441510
  parseCommandDetails: () => parseCommandDetails,
441538
441511
  parseGoogleApiError: () => parseGoogleApiError,
441512
+ parseMcpToolName: () => parseMcpToolName,
441539
441513
  parsePrompt: () => parsePrompt,
441540
441514
  parseTelemetryTargetValue: () => parseTelemetryTargetValue,
441541
441515
  parseThought: () => parseThought,
@@ -441750,7 +441724,7 @@ var require_main2 = __commonJS({
441750
441724
  "node_modules/dotenv/lib/main.js"(exports2, module2) {
441751
441725
  var fs131 = __require("fs");
441752
441726
  var path152 = __require("path");
441753
- var os40 = __require("os");
441727
+ var os39 = __require("os");
441754
441728
  var crypto28 = __require("crypto");
441755
441729
  var packageJson2 = require_package13();
441756
441730
  var version5 = packageJson2.version;
@@ -441903,7 +441877,7 @@ var require_main2 = __commonJS({
441903
441877
  return null;
441904
441878
  }
441905
441879
  function _resolveHome(envPath) {
441906
- return envPath[0] === "~" ? path152.join(os40.homedir(), envPath.slice(1)) : envPath;
441880
+ return envPath[0] === "~" ? path152.join(os39.homedir(), envPath.slice(1)) : envPath;
441907
441881
  }
441908
441882
  function _configVault(options) {
441909
441883
  const debug2 = parseBoolean(process.env.DOTENV_CONFIG_DEBUG || options && options.debug);
@@ -452018,7 +451992,7 @@ var require_signal_exit4 = __commonJS({
452018
451992
  var require_kill = __commonJS({
452019
451993
  "node_modules/run-jxa/node_modules/execa/lib/kill.js"(exports2, module2) {
452020
451994
  "use strict";
452021
- var os40 = __require("os");
451995
+ var os39 = __require("os");
452022
451996
  var onExit2 = require_signal_exit4();
452023
451997
  var DEFAULT_FORCE_KILL_TIMEOUT2 = 1e3 * 5;
452024
451998
  var spawnedKill = (kill, signal = "SIGTERM", options = {}) => {
@@ -452042,7 +452016,7 @@ var require_kill = __commonJS({
452042
452016
  return isSigterm(signal) && forceKillAfterTimeout !== false && killResult;
452043
452017
  };
452044
452018
  var isSigterm = (signal) => {
452045
- return signal === os40.constants.signals.SIGTERM || typeof signal === "string" && signal.toUpperCase() === "SIGTERM";
452019
+ return signal === os39.constants.signals.SIGTERM || typeof signal === "string" && signal.toUpperCase() === "SIGTERM";
452046
452020
  };
452047
452021
  var getForceKillAfterTimeout = ({ forceKillAfterTimeout = true }) => {
452048
452022
  if (forceKillAfterTimeout === true) {
@@ -457019,7 +456993,7 @@ var require_has_flag2 = __commonJS({
457019
456993
  var require_supports_color2 = __commonJS({
457020
456994
  "node_modules/chalk/node_modules/supports-color/index.js"(exports2, module2) {
457021
456995
  "use strict";
457022
- var os40 = __require("os");
456996
+ var os39 = __require("os");
457023
456997
  var tty4 = __require("tty");
457024
456998
  var hasFlag2 = require_has_flag2();
457025
456999
  var { env: env6 } = process;
@@ -457067,7 +457041,7 @@ var require_supports_color2 = __commonJS({
457067
457041
  return min;
457068
457042
  }
457069
457043
  if (process.platform === "win32") {
457070
- const osRelease = os40.release().split(".");
457044
+ const osRelease = os39.release().split(".");
457071
457045
  if (Number(osRelease[0]) >= 10 && Number(osRelease[2]) >= 10586) {
457072
457046
  return Number(osRelease[2]) >= 14931 ? 3 : 2;
457073
457047
  }
@@ -466492,9 +466466,9 @@ var require_conf = __commonJS({
466492
466466
  var require_defaults4 = __commonJS({
466493
466467
  "node_modules/@pnpm/npm-conf/lib/defaults.js"(exports2) {
466494
466468
  "use strict";
466495
- var os40 = __require("os");
466469
+ var os39 = __require("os");
466496
466470
  var path152 = __require("path");
466497
- var temp = os40.tmpdir();
466471
+ var temp = os39.tmpdir();
466498
466472
  var uidOrPid = process.getuid ? process.getuid() : process.pid;
466499
466473
  var hasUnicode = () => true;
466500
466474
  var isWindows7 = process.platform === "win32";
@@ -466505,7 +466479,7 @@ var require_defaults4 = __commonJS({
466505
466479
  var umask2 = {
466506
466480
  fromString: () => process.umask()
466507
466481
  };
466508
- var home = os40.homedir();
466482
+ var home = os39.homedir();
466509
466483
  if (home) {
466510
466484
  process.env.HOME = home;
466511
466485
  } else {
@@ -479442,7 +479416,7 @@ init_dist8();
479442
479416
  var import_strip_json_comments3 = __toESM(require_strip_json_comments(), 1);
479443
479417
  import * as fs71 from "node:fs";
479444
479418
  import * as path87 from "node:path";
479445
- import { platform as platform14 } from "node:os";
479419
+ import { platform as platform13 } from "node:os";
479446
479420
  import process38 from "node:process";
479447
479421
 
479448
479422
  // packages/cli/src/ui/themes/color-utils.ts
@@ -485201,9 +485175,9 @@ function getSystemSettingsPath() {
485201
485175
  if (process38.env["GEMINI_CLI_SYSTEM_SETTINGS_PATH"]) {
485202
485176
  return process38.env["GEMINI_CLI_SYSTEM_SETTINGS_PATH"];
485203
485177
  }
485204
- if (platform14() === "darwin") {
485178
+ if (platform13() === "darwin") {
485205
485179
  return "/Library/Application Support/GeminiCli/settings.json";
485206
- } else if (platform14() === "win32") {
485180
+ } else if (platform13() === "win32") {
485207
485181
  return "C:\\ProgramData\\gemini-cli\\settings.json";
485208
485182
  } else {
485209
485183
  return "/etc/gemini-cli/settings.json";
@@ -489687,18 +489661,18 @@ import process43 from "node:process";
489687
489661
  import childProcess2 from "node:child_process";
489688
489662
  var execFilePromises = promisify16(childProcess2.execFile);
489689
489663
  function systemArchitectureSync() {
489690
- const { arch: arch5, platform: platform22, env: env6 } = process43;
489691
- if (platform22 === "darwin" && arch5 === "x64") {
489664
+ const { arch: arch5, platform: platform21, env: env6 } = process43;
489665
+ if (platform21 === "darwin" && arch5 === "x64") {
489692
489666
  const stdout = childProcess2.execFileSync("sysctl", ["-inq", "sysctl.proc_translated"], { encoding: "utf8" });
489693
489667
  return stdout.trim() === "1" ? "arm64" : "x64";
489694
489668
  }
489695
489669
  if (arch5 === "arm64" || arch5 === "x64") {
489696
489670
  return arch5;
489697
489671
  }
489698
- if (platform22 === "win32" && Object.hasOwn(env6, "PROCESSOR_ARCHITEW6432")) {
489672
+ if (platform21 === "win32" && Object.hasOwn(env6, "PROCESSOR_ARCHITEW6432")) {
489699
489673
  return "x64";
489700
489674
  }
489701
- if (platform22 === "linux") {
489675
+ if (platform21 === "linux") {
489702
489676
  const stdout = childProcess2.execFileSync("getconf", ["LONG_BIT"], { encoding: "utf8" });
489703
489677
  if (stdout.trim() === "64") {
489704
489678
  return "x64";
@@ -490625,7 +490599,7 @@ var import_react32 = __toESM(require_react(), 1);
490625
490599
  init_mnemonist();
490626
490600
  init_dist8();
490627
490601
  import fs79 from "node:fs";
490628
- import os28 from "node:os";
490602
+ import os27 from "node:os";
490629
490603
  import pathMod from "node:path";
490630
490604
  import * as path93 from "node:path";
490631
490605
 
@@ -494230,7 +494204,7 @@ function useTextBuffer({
494230
494204
  dispatch({ type: "vim_escape_insert_mode" });
494231
494205
  }, []);
494232
494206
  const openInExternalEditor = (0, import_react32.useCallback)(async () => {
494233
- const tmpDir = fs79.mkdtempSync(pathMod.join(os28.tmpdir(), "gemini-edit-"));
494207
+ const tmpDir = fs79.mkdtempSync(pathMod.join(os27.tmpdir(), "gemini-edit-"));
494234
494208
  const filePath = pathMod.join(tmpDir, "buffer.txt");
494235
494209
  const expandedText = text.replace(
494236
494210
  PASTED_TEXT_PLACEHOLDER_REGEX,
@@ -515092,7 +515066,7 @@ var WarningMessage = ({ text }) => {
515092
515066
  };
515093
515067
 
515094
515068
  // packages/cli/src/generated/git-commit.ts
515095
- var GIT_COMMIT_INFO2 = "c316fc6c5";
515069
+ var GIT_COMMIT_INFO2 = "5d2983f12";
515096
515070
 
515097
515071
  // packages/cli/src/ui/components/AboutBox.tsx
515098
515072
  init_dist8();
@@ -516648,7 +516622,7 @@ import path100 from "node:path";
516648
516622
  // packages/cli/src/config/extensions/storage.ts
516649
516623
  import * as path99 from "node:path";
516650
516624
  import * as fs83 from "node:fs";
516651
- import * as os29 from "node:os";
516625
+ import * as os28 from "node:os";
516652
516626
 
516653
516627
  // packages/cli/src/config/extensions/variables.ts
516654
516628
  import * as path98 from "node:path";
@@ -516744,7 +516718,7 @@ var ExtensionStorage = class _ExtensionStorage {
516744
516718
  return new Storage(homedir()).getExtensionsDir();
516745
516719
  }
516746
516720
  static async createTmpDir() {
516747
- return fs83.promises.mkdtemp(path99.join(os29.tmpdir(), "gemini-extension"));
516721
+ return fs83.promises.mkdtemp(path99.join(os28.tmpdir(), "gemini-extension"));
516748
516722
  }
516749
516723
  };
516750
516724
 
@@ -517092,7 +517066,7 @@ function handleMaxTurnsExceededError(config2) {
517092
517066
 
517093
517067
  // packages/cli/src/config/extensions/github.ts
517094
517068
  init_dist8();
517095
- import * as os30 from "node:os";
517069
+ import * as os29 from "node:os";
517096
517070
  import * as https5 from "node:https";
517097
517071
  import * as fs96 from "node:fs";
517098
517072
  import * as path109 from "node:path";
@@ -518428,8 +518402,8 @@ var parseKVLine = (set3, line) => {
518428
518402
  init_esm8();
518429
518403
 
518430
518404
  // node_modules/tar/dist/esm/normalize-windows-path.js
518431
- var platform15 = process.env.TESTING_TAR_FAKE_PLATFORM || process.platform;
518432
- var normalizeWindowsPath = platform15 !== "win32" ? (p) => p : (p) => p && p.replace(/\\/g, "/");
518405
+ var platform14 = process.env.TESTING_TAR_FAKE_PLATFORM || process.platform;
518406
+ var normalizeWindowsPath = platform14 !== "win32" ? (p) => p : (p) => p && p.replace(/\\/g, "/");
518433
518407
 
518434
518408
  // node_modules/tar/dist/esm/read-entry.js
518435
518409
  var ReadEntry = class extends Minipass {
@@ -520665,8 +520639,8 @@ import path107 from "node:path";
520665
520639
 
520666
520640
  // node_modules/tar/dist/esm/get-write-flag.js
520667
520641
  import fs90 from "fs";
520668
- var platform16 = process.env.__FAKE_PLATFORM__ || process.platform;
520669
- var isWindows4 = platform16 === "win32";
520642
+ var platform15 = process.env.__FAKE_PLATFORM__ || process.platform;
520643
+ var isWindows4 = platform15 === "win32";
520670
520644
  var { O_CREAT, O_TRUNC, O_WRONLY } = fs90.constants;
520671
520645
  var UV_FS_O_FILEMAP = Number(process.env.__FAKE_FS_O_FILENAME__) || fs90.constants.UV_FS_O_FILEMAP || 0;
520672
520646
  var fMapEnabled = isWindows4 && !!UV_FS_O_FILEMAP;
@@ -520961,8 +520935,8 @@ var normalizeUnicode = (s4) => {
520961
520935
  };
520962
520936
 
520963
520937
  // node_modules/tar/dist/esm/path-reservations.js
520964
- var platform17 = process.env.TESTING_TAR_FAKE_PLATFORM || process.platform;
520965
- var isWindows5 = platform17 === "win32";
520938
+ var platform16 = process.env.TESTING_TAR_FAKE_PLATFORM || process.platform;
520939
+ var isWindows5 = platform16 === "win32";
520966
520940
  var getDirs = (path152) => {
520967
520941
  const dirs = path152.split("/").slice(0, -1).reduce((set3, path153) => {
520968
520942
  const s4 = set3[set3.length - 1];
@@ -521122,8 +521096,8 @@ var DOCHOWN = Symbol("doChown");
521122
521096
  var UID = Symbol("uid");
521123
521097
  var GID = Symbol("gid");
521124
521098
  var CHECKED_CWD = Symbol("checkedCwd");
521125
- var platform18 = process.env.TESTING_TAR_FAKE_PLATFORM || process.platform;
521126
- var isWindows6 = platform18 === "win32";
521099
+ var platform17 = process.env.TESTING_TAR_FAKE_PLATFORM || process.platform;
521100
+ var isWindows6 = platform17 === "win32";
521127
521101
  var DEFAULT_MAX_DEPTH = 1024;
521128
521102
  var unlinkFile = (path152, cb) => {
521129
521103
  if (!isWindows6) {
@@ -522430,10 +522404,10 @@ async function downloadFromGitHubRelease(installMetadata, destination, githubRep
522430
522404
  }
522431
522405
  }
522432
522406
  function findReleaseAsset(assets) {
522433
- const platform22 = os30.platform();
522434
- const arch5 = os30.arch();
522435
- const platformArchPrefix = `${platform22}.${arch5}.`;
522436
- const platformPrefix = `${platform22}.`;
522407
+ const platform21 = os29.platform();
522408
+ const arch5 = os29.arch();
522409
+ const platformArchPrefix = `${platform21}.${arch5}.`;
522410
+ const platformPrefix = `${platform21}.`;
522437
522411
  const platformArchAsset = assets.find(
522438
522412
  (asset) => asset.name.toLowerCase().startsWith(platformArchPrefix)
522439
522413
  );
@@ -533778,7 +533752,7 @@ var import_react114 = __toESM(require_react(), 1);
533778
533752
  init_dist8();
533779
533753
  import * as fs104 from "node:fs/promises";
533780
533754
  import * as path119 from "node:path";
533781
- import * as os31 from "node:os";
533755
+ import * as os30 from "node:os";
533782
533756
 
533783
533757
  // packages/cli/src/ui/hooks/shell-completions/gitProvider.ts
533784
533758
  import { execFile as execFile9 } from "node:child_process";
@@ -534114,7 +534088,7 @@ async function scanPathExecutables(signal) {
534114
534088
  }
534115
534089
  function expandTilde(inputPath) {
534116
534090
  if (inputPath === "~" || inputPath.startsWith("~/") || inputPath.startsWith("~" + path119.sep)) {
534117
- return [path119.join(os31.homedir(), inputPath.slice(1)), true];
534091
+ return [path119.join(os30.homedir(), inputPath.slice(1)), true];
534118
534092
  }
534119
534093
  return [inputPath, false];
534120
534094
  }
@@ -534161,7 +534135,7 @@ async function resolvePathCompletions(partial2, cwd7, signal) {
534161
534135
  completionValue = parentPart + displayName;
534162
534136
  }
534163
534137
  if (didExpandTilde) {
534164
- const homeDir = os31.homedir().replace(/\\/g, "/");
534138
+ const homeDir = os30.homedir().replace(/\\/g, "/");
534165
534139
  if (completionValue.startsWith(homeDir)) {
534166
534140
  completionValue = "~" + completionValue.slice(homeDir.length);
534167
534141
  }
@@ -537229,7 +537203,7 @@ init_dist8();
537229
537203
  init_node();
537230
537204
  import crypto27 from "node:crypto";
537231
537205
  import path121 from "node:path";
537232
- import os32 from "node:os";
537206
+ import os31 from "node:os";
537233
537207
  import fs105 from "node:fs";
537234
537208
 
537235
537209
  // packages/cli/src/ui/hooks/shellReducer.ts
@@ -537493,14 +537467,14 @@ var useShellCommandProcessor = (addItemToHistory, setPendingHistoryItem, onExec,
537493
537467
  { type: "user_shell", text: rawQuery },
537494
537468
  userMessageTimestamp
537495
537469
  );
537496
- const isWindows7 = os32.platform() === "win32";
537470
+ const isWindows7 = os31.platform() === "win32";
537497
537471
  const targetDir = config2.getTargetDir();
537498
537472
  let commandToExecute = rawQuery;
537499
537473
  let pwdFilePath;
537500
537474
  if (!isWindows7) {
537501
537475
  let command2 = rawQuery.trim();
537502
537476
  const pwdFileName = `shell_pwd_${crypto27.randomBytes(6).toString("hex")}.tmp`;
537503
- pwdFilePath = path121.join(os32.tmpdir(), pwdFileName);
537477
+ pwdFilePath = path121.join(os31.tmpdir(), pwdFileName);
537504
537478
  if (!command2.endsWith(";") && !command2.endsWith("&")) {
537505
537479
  command2 += ";";
537506
537480
  }
@@ -546921,7 +546895,7 @@ init_dist8();
546921
546895
  var import_extract_zip3 = __toESM(require_extract_zip(), 1);
546922
546896
  import * as fs115 from "node:fs/promises";
546923
546897
  import * as path135 from "node:path";
546924
- import * as os33 from "node:os";
546898
+ import * as os32 from "node:os";
546925
546899
  function renderSkillActionFeedback(result2, formatScope) {
546926
546900
  const { skillName, action, status, error: error40 } = result2;
546927
546901
  if (status === "error") {
@@ -546961,7 +546935,7 @@ async function installSkill(source2, scope, subpath, onLog, requestConsent = ()
546961
546935
  try {
546962
546936
  if (isGitUrl) {
546963
546937
  tempDirToClean = await fs115.mkdtemp(
546964
- path135.join(os33.tmpdir(), "gemini-skill-")
546938
+ path135.join(os32.tmpdir(), "gemini-skill-")
546965
546939
  );
546966
546940
  sourcePath = tempDirToClean;
546967
546941
  onLog(`Cloning skill from ${source2}...`);
@@ -546974,7 +546948,7 @@ async function installSkill(source2, scope, subpath, onLog, requestConsent = ()
546974
546948
  );
546975
546949
  } else if (isSkillFile) {
546976
546950
  tempDirToClean = await fs115.mkdtemp(
546977
- path135.join(os33.tmpdir(), "gemini-skill-")
546951
+ path135.join(os32.tmpdir(), "gemini-skill-")
546978
546952
  );
546979
546953
  sourcePath = tempDirToClean;
546980
546954
  onLog(`Extracting skill from ${source2}...`);
@@ -547716,7 +547690,7 @@ var setupGithubCommand = {
547716
547690
 
547717
547691
  // packages/cli/src/ui/utils/terminalSetup.ts
547718
547692
  import { promises as fs117 } from "node:fs";
547719
- import * as os34 from "node:os";
547693
+ import * as os33 from "node:os";
547720
547694
  import * as path137 from "node:path";
547721
547695
  import { exec as exec4 } from "node:child_process";
547722
547696
  import { promisify as promisify19 } from "node:util";
@@ -547766,7 +547740,7 @@ async function detectTerminal() {
547766
547740
  if (envTerminal) {
547767
547741
  return envTerminal;
547768
547742
  }
547769
- if (os34.platform() !== "win32") {
547743
+ if (os33.platform() !== "win32") {
547770
547744
  try {
547771
547745
  const { stdout } = await execAsync3("ps -o comm= -p $PPID");
547772
547746
  const parentName = stdout.trim();
@@ -547794,8 +547768,8 @@ async function backupFile(filePath) {
547794
547768
  }
547795
547769
  }
547796
547770
  function getVSCodeStyleConfigDir(appName) {
547797
- const platform22 = os34.platform();
547798
- if (platform22 === "darwin") {
547771
+ const platform21 = os33.platform();
547772
+ if (platform21 === "darwin") {
547799
547773
  return path137.join(
547800
547774
  homedir(),
547801
547775
  "Library",
@@ -547803,7 +547777,7 @@ function getVSCodeStyleConfigDir(appName) {
547803
547777
  appName,
547804
547778
  "User"
547805
547779
  );
547806
- } else if (platform22 === "win32") {
547780
+ } else if (platform21 === "win32") {
547807
547781
  if (!process.env["APPDATA"]) {
547808
547782
  return null;
547809
547783
  }
@@ -563452,7 +563426,7 @@ init_dist8();
563452
563426
  // packages/cli/src/config/sandboxConfig.ts
563453
563427
  init_dist8();
563454
563428
  var import_command_exists = __toESM(require_command_exists2(), 1);
563455
- import * as os35 from "node:os";
563429
+ import * as os34 from "node:os";
563456
563430
  import { fileURLToPath as fileURLToPath22 } from "node:url";
563457
563431
  import path145 from "node:path";
563458
563432
  var __filename6 = fileURLToPath22(import.meta.url);
@@ -563491,7 +563465,7 @@ function getSandboxCommand(sandbox) {
563491
563465
  `Missing sandbox command '${sandbox}' (from GEMINI_SANDBOX)`
563492
563466
  );
563493
563467
  }
563494
- if (os35.platform() === "darwin" && import_command_exists.default.sync("sandbox-exec")) {
563468
+ if (os34.platform() === "darwin" && import_command_exists.default.sync("sandbox-exec")) {
563495
563469
  return "sandbox-exec";
563496
563470
  } else if (import_command_exists.default.sync("docker") && sandbox === true) {
563497
563471
  return "docker";
@@ -563509,7 +563483,7 @@ async function loadSandboxConfig(settings, argv) {
563509
563483
  const sandboxOption = argv.sandbox ?? settings.tools?.sandbox;
563510
563484
  const command2 = getSandboxCommand(sandboxOption);
563511
563485
  const packageJson2 = await getPackageJson(__dirname13);
563512
- const image2 = process.env["GEMINI_SANDBOX_IMAGE"] ?? "us-docker.pkg.dev/gemini-code-dev/gemini-cli/sandbox:0.33.0-preview.4" ?? packageJson2?.config?.sandboxImageUri;
563486
+ const image2 = process.env["GEMINI_SANDBOX_IMAGE"] ?? "us-docker.pkg.dev/gemini-code-dev/gemini-cli/sandbox:0.33.0-preview.6" ?? packageJson2?.config?.sandboxImageUri;
563513
563487
  return command2 && image2 ? { command: command2, image: image2 } : void 0;
563514
563488
  }
563515
563489
 
@@ -564235,7 +564209,7 @@ function noopErrorHandler() {
564235
564209
  import { basename as basename26 } from "node:path";
564236
564210
  import { createHash as createHash11 } from "node:crypto";
564237
564211
  import v82 from "node:v8";
564238
- import os39 from "node:os";
564212
+ import os38 from "node:os";
564239
564213
  import dns from "node:dns";
564240
564214
 
564241
564215
  // packages/cli/src/utils/sandbox.ts
@@ -564244,7 +564218,7 @@ init_dist8();
564244
564218
  import { exec as exec5, execSync as execSync8, spawn as spawn13 } from "node:child_process";
564245
564219
  import path147 from "node:path";
564246
564220
  import fs125 from "node:fs";
564247
- import os37 from "node:os";
564221
+ import os36 from "node:os";
564248
564222
  import { fileURLToPath as fileURLToPath23 } from "node:url";
564249
564223
  import { promisify as promisify20 } from "node:util";
564250
564224
 
@@ -564298,7 +564272,7 @@ import { randomBytes as randomBytes6 } from "node:crypto";
564298
564272
  // packages/cli/src/utils/sandboxUtils.ts
564299
564273
  var import_shell_quote4 = __toESM(require_shell_quote(), 1);
564300
564274
  init_dist8();
564301
- import os36 from "node:os";
564275
+ import os35 from "node:os";
564302
564276
  import fs124 from "node:fs";
564303
564277
  import { readFile as readFile17 } from "node:fs/promises";
564304
564278
  var LOCAL_DEV_SANDBOX_IMAGE_NAME = "gemini-cli-sandbox";
@@ -564313,7 +564287,7 @@ var BUILTIN_SEATBELT_PROFILES = [
564313
564287
  "strict-proxied"
564314
564288
  ];
564315
564289
  function getContainerPath(hostPath) {
564316
- if (os36.platform() !== "win32") {
564290
+ if (os35.platform() !== "win32") {
564317
564291
  return hostPath;
564318
564292
  }
564319
564293
  const withForwardSlashes = hostPath.replace(/\\/g, "/");
@@ -564331,7 +564305,7 @@ async function shouldUseCurrentUserInSandbox() {
564331
564305
  if (envVar === "0" || envVar === "false") {
564332
564306
  return false;
564333
564307
  }
564334
- if (os36.platform() === "linux") {
564308
+ if (os35.platform() === "linux") {
564335
564309
  try {
564336
564310
  const osReleaseContent = await readFile17("/etc/os-release", "utf8");
564337
564311
  if (osReleaseContent.includes("ID=debian") || osReleaseContent.includes("ID=ubuntu") || osReleaseContent.match(/^ID_LIKE=.*debian.*/m) || // Covers derivatives
@@ -564358,7 +564332,7 @@ function ports() {
564358
564332
  return (process.env["SANDBOX_PORTS"] ?? "").split(",").filter((p) => p.trim()).map((p) => p.trim());
564359
564333
  }
564360
564334
  function entrypoint(workdir, cliArgs) {
564361
- const isWindows7 = os36.platform() === "win32";
564335
+ const isWindows7 = os35.platform() === "win32";
564362
564336
  const containerWorkdir = getContainerPath(workdir);
564363
564337
  const shellCmds = [];
564364
564338
  const pathSeparator = isWindows7 ? ";" : ":";
@@ -564440,7 +564414,7 @@ async function start_sandbox(config2, nodeArgs = [], cliConfig, cliArgs = []) {
564440
564414
  "-D",
564441
564415
  `TARGET_DIR=${fs125.realpathSync(process.cwd())}`,
564442
564416
  "-D",
564443
- `TMP_DIR=${fs125.realpathSync(os37.tmpdir())}`,
564417
+ `TMP_DIR=${fs125.realpathSync(os36.tmpdir())}`,
564444
564418
  "-D",
564445
564419
  `HOME_DIR=${fs125.realpathSync(homedir())}`,
564446
564420
  "-D",
@@ -564617,8 +564591,8 @@ async function start_sandbox(config2, nodeArgs = [], cliConfig, cliArgs = []) {
564617
564591
  `${userSettingsDirOnHost}:${getContainerPath(userSettingsDirOnHost)}`
564618
564592
  );
564619
564593
  }
564620
- args2.push("--volume", `${os37.tmpdir()}:${getContainerPath(os37.tmpdir())}`);
564621
- if (userHomeDirOnHost !== os37.homedir()) {
564594
+ args2.push("--volume", `${os36.tmpdir()}:${getContainerPath(os36.tmpdir())}`);
564595
+ if (userHomeDirOnHost !== os36.homedir()) {
564622
564596
  args2.push(
564623
564597
  "--volume",
564624
564598
  `${userHomeDirOnHost}:${getContainerPath(userHomeDirOnHost)}`
@@ -564817,7 +564791,7 @@ async function start_sandbox(config2, nodeArgs = [], cliConfig, cliArgs = []) {
564817
564791
  }
564818
564792
  args2.push("--env", `SANDBOX=${containerName}`);
564819
564793
  if (config2.command === "podman") {
564820
- const emptyAuthFilePath = path147.join(os37.tmpdir(), "empty_auth.json");
564794
+ const emptyAuthFilePath = path147.join(os36.tmpdir(), "empty_auth.json");
564821
564795
  fs125.writeFileSync(emptyAuthFilePath, "{}", "utf-8");
564822
564796
  args2.push("--authfile", emptyAuthFilePath);
564823
564797
  }
@@ -565022,9 +564996,9 @@ async function ensureSandboxImageIsPresent(sandbox, image2, cliConfig) {
565022
564996
  // packages/cli/src/utils/startupWarnings.ts
565023
564997
  init_dist8();
565024
564998
  import fs126 from "node:fs/promises";
565025
- import os38 from "node:os";
564999
+ import os37 from "node:os";
565026
565000
  import { join as pathJoin } from "node:path";
565027
- var warningsFilePath = pathJoin(os38.tmpdir(), "gemini-cli-warnings.txt");
565001
+ var warningsFilePath = pathJoin(os37.tmpdir(), "gemini-cli-warnings.txt");
565028
565002
  async function getStartupWarnings() {
565029
565003
  try {
565030
565004
  await fs126.access(warningsFilePath);
@@ -569333,7 +569307,7 @@ function validateDnsResolutionOrder(order) {
569333
569307
  return defaultValue;
569334
569308
  }
569335
569309
  function getNodeMemoryArgs(isDebugMode2) {
569336
- const totalMemoryMB = os39.totalmem() / (1024 * 1024);
569310
+ const totalMemoryMB = os38.totalmem() / (1024 * 1024);
569337
569311
  const heapStats = v82.getHeapStatistics();
569338
569312
  const currentMaxOldSpaceSizeMb = Math.floor(
569339
569313
  heapStats.heap_size_limit / 1024 / 1024