@google/gemini-cli 0.65.0-preview.0 → 0.66.0-nightly.20261017.ged96faedf

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (75) hide show
  1. package/README.md +21 -56
  2. package/bundle/{chunk-NL7ZHGCH.js → chunk-464WBVYM.js} +1 -1
  3. package/bundle/{chunk-QJK54DSE.js → chunk-5VQUE3OF.js} +1 -1
  4. package/bundle/{chunk-VF5WQSOE.js → chunk-7ARQMEMX.js} +1 -1
  5. package/bundle/{chunk-2WVLIJA5.js → chunk-BUG4N6U5.js} +145 -77
  6. package/bundle/{chunk-F6AJM4WN.js → chunk-DPV3ZEOC.js} +3 -3
  7. package/bundle/{chunk-GSQEBEGC.js → chunk-ERBSM2HU.js} +3 -3
  8. package/bundle/{chunk-WTRK3NVX.js → chunk-GEUFOF2X.js} +106 -1500
  9. package/bundle/{chunk-V2R74WAG.js → chunk-H4U2CWBQ.js} +151 -81
  10. package/bundle/chunk-HDP6V6JI.js +1956 -0
  11. package/bundle/{chunk-RPHDSDL6.js → chunk-IDCWFZU3.js} +1 -1
  12. package/bundle/{chunk-SN7QZKXC.js → chunk-IGOTAEJY.js} +170 -1551
  13. package/bundle/chunk-J5QPCO3J.js +101859 -0
  14. package/bundle/{chunk-H2CZXS7F.js → chunk-JY3DYBJT.js} +1 -1
  15. package/bundle/{chunk-HLOOE7YN.js → chunk-LDGJJCVW.js} +9 -8
  16. package/bundle/chunk-MH4KAY5W.js +512 -0
  17. package/bundle/{chunk-LLE5Z636.js → chunk-NAPT3FAL.js} +106 -1500
  18. package/bundle/chunk-NOSWGXRT.js +1956 -0
  19. package/bundle/{chunk-43EXRO7A.js → chunk-NU74STQ5.js} +145 -77
  20. package/bundle/{chunk-K7NOVQ6G.js → chunk-QCWGLPCO.js} +376 -231
  21. package/bundle/{chunk-WGL5FJOS.js → chunk-QF3ALSJN.js} +3 -3
  22. package/bundle/{chunk-K4G5D5ZZ.js → chunk-R4KPURFC.js} +1 -1
  23. package/bundle/chunk-R6XDLHLP.js +1956 -0
  24. package/bundle/chunk-R7UPATQC.js +1956 -0
  25. package/bundle/chunk-RACMC24X.js +118 -0
  26. package/bundle/{chunk-4JGVVJGK.js → chunk-RE4V6I3G.js} +1 -1
  27. package/bundle/{chunk-S7BCRBI4.js → chunk-UTTFPWGQ.js} +1 -1
  28. package/bundle/chunk-VXYA6LA4.js +1571 -0
  29. package/bundle/chunk-XY2QSBID.js +17603 -0
  30. package/bundle/{chunk-K7AA35SP.js → chunk-YOI4DS3V.js} +365 -230
  31. package/bundle/chunk-YP27UYI4.js +154 -0
  32. package/bundle/{chunk-TP236FKO.js → chunk-YPLMNSM4.js} +8243 -15166
  33. package/bundle/chunk-ZFQ347ZN.js +402181 -0
  34. package/bundle/{cleanup-HPADDONA.js → cleanup-6FAZDCL3.js} +2 -2
  35. package/bundle/{cleanup-JOMSXKMP.js → cleanup-GNZLZG55.js} +2 -2
  36. package/bundle/{cleanup-LYRJHMMO.js → cleanup-RX3AC5ET.js} +2 -2
  37. package/bundle/cleanup-WAU2KYGS.js +32 -0
  38. package/bundle/{core-NCJTYARO.js → core-AGGXDQOT.js} +13 -1
  39. package/bundle/{devtoolsService-WP2OPVPB.js → devtoolsService-6XOCGTLC.js} +2 -2
  40. package/bundle/{devtoolsService-JFJBTZ4B.js → devtoolsService-FBTSVQ57.js} +4 -3
  41. package/bundle/{devtoolsService-HIZA3JGR.js → devtoolsService-UO6ZB72B.js} +2 -2
  42. package/bundle/devtoolsService-W5QGZ3SW.js +4359 -0
  43. package/bundle/{dist-GQKLLBDW.js → dist-2ELAEESC.js} +13 -1
  44. package/bundle/{core-IVQAI4S6.js → dist-2R7C2WHA.js} +13 -1
  45. package/bundle/dist-PALH7PJS.js +2280 -0
  46. package/bundle/docs/changelogs/index.md +22 -0
  47. package/bundle/docs/changelogs/latest.md +64 -54
  48. package/bundle/docs/changelogs/preview.md +91 -55
  49. package/bundle/docs/reference/configuration.md +8 -3
  50. package/bundle/docs/reference/keyboard-shortcuts.md +18 -4
  51. package/bundle/{gemini-5TUKZVGS.js → gemini-6MH55Y7F.js} +37 -18
  52. package/bundle/{gemini-7CHJYSHM.js → gemini-DOXUDJDY.js} +37 -18
  53. package/bundle/{gemini-546WMAHG.js → gemini-OHYXI52N.js} +237 -202
  54. package/bundle/gemini-OUEDCH4P.js +17970 -0
  55. package/bundle/gemini.js +14 -15
  56. package/bundle/{interactiveCli-E3PUPYMZ.js → interactiveCli-7LIKGDTJ.js} +1061 -989
  57. package/bundle/{interactiveCli-5XIAIY74.js → interactiveCli-EGQYN3KR.js} +1371 -1280
  58. package/bundle/{interactiveCli-L4PK7YY3.js → interactiveCli-TG7PGV4V.js} +1061 -989
  59. package/bundle/interactiveCli-YEXCUIFZ.js +35601 -0
  60. package/bundle/{liteRtServerManager-JCTYJBV5.js → liteRtServerManager-KAPXZ3EU.js} +4 -4
  61. package/bundle/{liteRtServerManager-JERG6KYC.js → liteRtServerManager-MSJIWMWP.js} +4 -4
  62. package/bundle/{liteRtServerManager-22ISMNN2.js → liteRtServerManager-PD2N3GLD.js} +4 -4
  63. package/bundle/liteRtServerManager-X5SCFYXM.js +65 -0
  64. package/bundle/{oauth2-provider-XRUER2XR.js → oauth2-provider-IUN6Z4IO.js} +1 -1
  65. package/bundle/{oauth2-provider-477UJQX6.js → oauth2-provider-MKJIQNWP.js} +41 -79
  66. package/bundle/{oauth2-provider-MKWWBW4K.js → oauth2-provider-RMF7U2UN.js} +1 -1
  67. package/bundle/oauth2-provider-ZM5GWCNX.js +273 -0
  68. package/bundle/{start-MVIPJNQ5.js → start-5GIUIER3.js} +6 -6
  69. package/bundle/{start-RZWSVT55.js → start-APIVGXZ3.js} +6 -6
  70. package/bundle/{start-AGMBPY3O.js → start-GJ4TH4KZ.js} +6 -6
  71. package/bundle/start-WDS52ZNE.js +18 -0
  72. package/package.json +1 -1
  73. package/bundle/chunk-4DCA4L53.js +0 -425
  74. package/bundle/chunk-BFIV7GTA.js +0 -425
  75. package/bundle/chunk-V72FRESD.js +0 -425
@@ -2964,8 +2964,8 @@ var require_graceful_fs = __commonJS({
2964
2964
  fs96.createReadStream = createReadStream3;
2965
2965
  fs96.createWriteStream = createWriteStream6;
2966
2966
  var fs$readFile = fs96.readFile;
2967
- fs96.readFile = readFile15;
2968
- function readFile15(path118, options, cb) {
2967
+ fs96.readFile = readFile14;
2968
+ function readFile14(path118, options, cb) {
2969
2969
  if (typeof options === "function")
2970
2970
  cb = options, options = null;
2971
2971
  return go$readFile(path118, options, cb);
@@ -12310,7 +12310,7 @@ var require_src5 = __commonJS({
12310
12310
  });
12311
12311
  };
12312
12312
  }
12313
- var readFile15 = fs95.readFile ? (0, _util.promisify)(fs95.readFile) : /* @__PURE__ */ _asyncToGenerator(/* @__PURE__ */ _regenerator().m(function _callee() {
12313
+ var readFile14 = fs95.readFile ? (0, _util.promisify)(fs95.readFile) : /* @__PURE__ */ _asyncToGenerator(/* @__PURE__ */ _regenerator().m(function _callee() {
12314
12314
  return _regenerator().w(function(_context) {
12315
12315
  while (1) switch (_context.n) {
12316
12316
  case 0:
@@ -12450,7 +12450,7 @@ var require_src5 = __commonJS({
12450
12450
  break;
12451
12451
  case 1:
12452
12452
  _context2.n = 2;
12453
- return readFile15(keyFile, "utf8");
12453
+ return readFile14(keyFile, "utf8");
12454
12454
  case 2:
12455
12455
  key = _context2.v;
12456
12456
  body2 = JSON.parse(key);
@@ -12468,7 +12468,7 @@ var require_src5 = __commonJS({
12468
12468
  });
12469
12469
  case 4:
12470
12470
  _context2.n = 5;
12471
- return readFile15(keyFile, "utf8");
12471
+ return readFile14(keyFile, "utf8");
12472
12472
  case 5:
12473
12473
  _privateKey = _context2.v;
12474
12474
  return _context2.a(2, {
@@ -14065,7 +14065,7 @@ var require_filesubjecttokensupplier = __commonJS({
14065
14065
  exports2.FileSubjectTokenSupplier = void 0;
14066
14066
  var util_1 = __require("util");
14067
14067
  var fs95 = __require("fs");
14068
- var readFile15 = (0, util_1.promisify)(fs95.readFile ?? (() => {
14068
+ var readFile14 = (0, util_1.promisify)(fs95.readFile ?? (() => {
14069
14069
  }));
14070
14070
  var realpath5 = (0, util_1.promisify)(fs95.realpath ?? (() => {
14071
14071
  }));
@@ -14105,7 +14105,7 @@ var require_filesubjecttokensupplier = __commonJS({
14105
14105
  throw err2;
14106
14106
  }
14107
14107
  let subjectToken;
14108
- const rawText = await readFile15(parsedFilePath, { encoding: "utf8" });
14108
+ const rawText = await readFile14(parsedFilePath, { encoding: "utf8" });
14109
14109
  if (this.formatType === "text") {
14110
14110
  subjectToken = rawText;
14111
14111
  } else if (this.formatType === "json" && this.subjectTokenFieldName) {
@@ -20274,7 +20274,7 @@ var require_getCredentials = __commonJS({
20274
20274
  var fs95 = __require("fs");
20275
20275
  var util_1 = __require("util");
20276
20276
  var errorWithCode_1 = require_errorWithCode();
20277
- var readFile15 = fs95.readFile ? (0, util_1.promisify)(fs95.readFile) : async () => {
20277
+ var readFile14 = fs95.readFile ? (0, util_1.promisify)(fs95.readFile) : async () => {
20278
20278
  throw new errorWithCode_1.ErrorWithCode("use key rather than keyFile.", "MISSING_CREDENTIALS");
20279
20279
  };
20280
20280
  var ExtensionFiles;
@@ -20296,7 +20296,7 @@ var require_getCredentials = __commonJS({
20296
20296
  * @returns A promise that resolves with the credentials.
20297
20297
  */
20298
20298
  async getCredentials() {
20299
- const key = await readFile15(this.keyFilePath, "utf8");
20299
+ const key = await readFile14(this.keyFilePath, "utf8");
20300
20300
  let body2;
20301
20301
  try {
20302
20302
  body2 = JSON.parse(key);
@@ -20322,7 +20322,7 @@ var require_getCredentials = __commonJS({
20322
20322
  * @returns A promise that resolves with the private key.
20323
20323
  */
20324
20324
  async getCredentials() {
20325
- const privateKey = await readFile15(this.keyFilePath, "utf8");
20325
+ const privateKey = await readFile14(this.keyFilePath, "utf8");
20326
20326
  return { privateKey };
20327
20327
  }
20328
20328
  };
@@ -21952,7 +21952,7 @@ var require_filesubjecttokensupplier2 = __commonJS({
21952
21952
  exports2.FileSubjectTokenSupplier = void 0;
21953
21953
  var util_1 = __require("util");
21954
21954
  var fs95 = __require("fs");
21955
- var readFile15 = (0, util_1.promisify)(fs95.readFile ?? (() => {
21955
+ var readFile14 = (0, util_1.promisify)(fs95.readFile ?? (() => {
21956
21956
  }));
21957
21957
  var realpath5 = (0, util_1.promisify)(fs95.realpath ?? (() => {
21958
21958
  }));
@@ -21992,7 +21992,7 @@ var require_filesubjecttokensupplier2 = __commonJS({
21992
21992
  throw err2;
21993
21993
  }
21994
21994
  let subjectToken;
21995
- const rawText = await readFile15(parsedFilePath, { encoding: "utf8" });
21995
+ const rawText = await readFile14(parsedFilePath, { encoding: "utf8" });
21996
21996
  if (this.formatType === "text") {
21997
21997
  subjectToken = rawText;
21998
21998
  } else if (this.formatType === "json" && this.subjectTokenFieldName) {
@@ -124145,7 +124145,7 @@ var require_src45 = __commonJS({
124145
124145
  var jws = require_jws();
124146
124146
  var path118 = __require("path");
124147
124147
  var util_1 = __require("util");
124148
- var readFile15 = fs95.readFile ? (0, util_1.promisify)(fs95.readFile) : async () => {
124148
+ var readFile14 = fs95.readFile ? (0, util_1.promisify)(fs95.readFile) : async () => {
124149
124149
  throw new ErrorWithCode("use key rather than keyFile.", "MISSING_CREDENTIALS");
124150
124150
  };
124151
124151
  var GOOGLE_TOKEN_URL = "https://www.googleapis.com/oauth2/v4/token";
@@ -124234,7 +124234,7 @@ var require_src45 = __commonJS({
124234
124234
  const ext2 = path118.extname(keyFile);
124235
124235
  switch (ext2) {
124236
124236
  case ".json": {
124237
- const key = await readFile15(keyFile, "utf8");
124237
+ const key = await readFile14(keyFile, "utf8");
124238
124238
  const body2 = JSON.parse(key);
124239
124239
  const privateKey = body2.private_key;
124240
124240
  const clientEmail = body2.client_email;
@@ -124246,7 +124246,7 @@ var require_src45 = __commonJS({
124246
124246
  case ".der":
124247
124247
  case ".crt":
124248
124248
  case ".pem": {
124249
- const privateKey = await readFile15(keyFile, "utf8");
124249
+ const privateKey = await readFile14(keyFile, "utf8");
124250
124250
  return { privateKey };
124251
124251
  }
124252
124252
  case ".p12":
@@ -125703,7 +125703,7 @@ var require_filesubjecttokensupplier3 = __commonJS({
125703
125703
  exports2.FileSubjectTokenSupplier = void 0;
125704
125704
  var util_1 = __require("util");
125705
125705
  var fs95 = __require("fs");
125706
- var readFile15 = (0, util_1.promisify)((_a4 = fs95.readFile) !== null && _a4 !== void 0 ? _a4 : () => {
125706
+ var readFile14 = (0, util_1.promisify)((_a4 = fs95.readFile) !== null && _a4 !== void 0 ? _a4 : () => {
125707
125707
  });
125708
125708
  var realpath5 = (0, util_1.promisify)((_b = fs95.realpath) !== null && _b !== void 0 ? _b : () => {
125709
125709
  });
@@ -125740,7 +125740,7 @@ var require_filesubjecttokensupplier3 = __commonJS({
125740
125740
  throw err2;
125741
125741
  }
125742
125742
  let subjectToken;
125743
- const rawText = await readFile15(parsedFilePath, { encoding: "utf8" });
125743
+ const rawText = await readFile14(parsedFilePath, { encoding: "utf8" });
125744
125744
  if (this.formatType === "text") {
125745
125745
  subjectToken = rawText;
125746
125746
  } else if (this.formatType === "json" && this.subjectTokenFieldName) {
@@ -135062,7 +135062,7 @@ var require_discovery = __commonJS({
135062
135062
  var util4 = __require("util");
135063
135063
  var apirequest_1 = require_apirequest();
135064
135064
  var endpoint_1 = require_endpoint();
135065
- var readFile15 = util4.promisify(fs95.readFile);
135065
+ var readFile14 = util4.promisify(fs95.readFile);
135066
135066
  var Discovery = class {
135067
135067
  /**
135068
135068
  * Discovery for discovering API endpoints
@@ -135149,7 +135149,7 @@ var require_discovery = __commonJS({
135149
135149
  const parts2 = resolve29.parse(apiDiscoveryUrl);
135150
135150
  if (apiDiscoveryUrl && !parts2.protocol) {
135151
135151
  this.log("Reading from file " + apiDiscoveryUrl);
135152
- const file2 = await readFile15(apiDiscoveryUrl, { encoding: "utf8" });
135152
+ const file2 = await readFile14(apiDiscoveryUrl, { encoding: "utf8" });
135153
135153
  return this.makeEndpoint(JSON.parse(file2));
135154
135154
  } else {
135155
135155
  this.log("Requesting " + apiDiscoveryUrl);
@@ -161031,7 +161031,7 @@ var require_metadata4 = __commonJS({
161031
161031
  var gcpMetadata = require_src44();
161032
161032
  var google_auth_library_1 = require_src46();
161033
161033
  var util_1 = __require("util");
161034
- var readFile15 = (0, util_1.promisify)(fs95.readFile);
161034
+ var readFile14 = (0, util_1.promisify)(fs95.readFile);
161035
161035
  function zoneFromQualifiedZone(qualified) {
161036
161036
  return qualified.split("/").pop();
161037
161037
  }
@@ -161100,7 +161100,7 @@ var require_metadata4 = __commonJS({
161100
161100
  const location = zoneFromQualifiedZone(qualifiedZone);
161101
161101
  let namespace = "";
161102
161102
  try {
161103
- namespace = await readFile15(exports2.KUBERNETES_NAMESPACE_ID_PATH, "utf8");
161103
+ namespace = await readFile14(exports2.KUBERNETES_NAMESPACE_ID_PATH, "utf8");
161104
161104
  } catch (err2) {
161105
161105
  }
161106
161106
  return {
@@ -273097,7 +273097,7 @@ function getApiKeyFromEnv() {
273097
273097
  // packages/core/src/core/contentGenerator.ts
273098
273098
  init_http_proxy_agent();
273099
273099
  init_https_proxy_agent();
273100
- import * as os27 from "node:os";
273100
+ import * as os28 from "node:os";
273101
273101
 
273102
273102
  // packages/core/src/code_assist/oauth2.ts
273103
273103
  var import_google_auth_library3 = __toESM(require_src10(), 1);
@@ -279451,6 +279451,122 @@ var OAuthCredentialStorage = class {
279451
279451
  var DEFAULT_SERVICE_NAME = "gemini-cli-oauth";
279452
279452
  var FORCE_ENCRYPTED_FILE_ENV_VAR = "GEMINI_FORCE_ENCRYPTED_FILE_STORAGE";
279453
279453
 
279454
+ // packages/core/src/utils/compatibility.ts
279455
+ import os17 from "node:os";
279456
+ function isWindows10() {
279457
+ if (os17.platform() !== "win32") {
279458
+ return false;
279459
+ }
279460
+ const release3 = os17.release();
279461
+ const parts2 = release3.split(".");
279462
+ if (parts2.length >= 3 && parts2[0] === "10" && parts2[1] === "0") {
279463
+ const build = parseInt(parts2[2], 10);
279464
+ return build < 22e3;
279465
+ }
279466
+ return false;
279467
+ }
279468
+ function isJetBrainsTerminal() {
279469
+ const env2 = process.env;
279470
+ return !!(env2["TERMINAL_EMULATOR"]?.startsWith("JetBrains") || env2["JETBRAINS_IDE"]);
279471
+ }
279472
+ function isTmux() {
279473
+ return !!process.env["TMUX"];
279474
+ }
279475
+ function isGnuScreen() {
279476
+ return !!process.env["STY"];
279477
+ }
279478
+ function isLowColorTmux() {
279479
+ const term = process.env["TERM"] || "";
279480
+ return isTmux() && term.startsWith("screen") && !process.env["COLORTERM"];
279481
+ }
279482
+ function isDumbTerminal() {
279483
+ const term = process.env["TERM"] || "";
279484
+ return term === "dumb" || term === "vt100";
279485
+ }
279486
+ function isAppleTerminal() {
279487
+ return process.env["TERM_PROGRAM"] === "Apple_Terminal";
279488
+ }
279489
+ function supports256Colors() {
279490
+ if (process.stdout.getColorDepth && process.stdout.getColorDepth() >= 8) {
279491
+ return true;
279492
+ }
279493
+ const term = process.env["TERM"] || "";
279494
+ if (term.includes("256color")) {
279495
+ return true;
279496
+ }
279497
+ if (supportsTrueColor()) {
279498
+ return true;
279499
+ }
279500
+ return false;
279501
+ }
279502
+ function supportsTrueColor() {
279503
+ if (process.env["COLORTERM"] === "truecolor" || process.env["COLORTERM"] === "24bit" || process.env["COLORTERM"] === "kmscon") {
279504
+ return true;
279505
+ }
279506
+ if (process.stdout.getColorDepth && process.stdout.getColorDepth() >= 24) {
279507
+ return true;
279508
+ }
279509
+ return false;
279510
+ }
279511
+ var WarningPriority = /* @__PURE__ */ ((WarningPriority2) => {
279512
+ WarningPriority2["Low"] = "low";
279513
+ WarningPriority2["High"] = "high";
279514
+ return WarningPriority2;
279515
+ })(WarningPriority || {});
279516
+ function getCompatibilityWarnings(options) {
279517
+ const warnings = [];
279518
+ if (isWindows10()) {
279519
+ warnings.push({
279520
+ id: "windows-10",
279521
+ message: "Warning: Windows 10 detected. Some UI features like smooth scrolling may be degraded. Windows 11 is recommended for the best experience.",
279522
+ priority: "high" /* High */
279523
+ });
279524
+ }
279525
+ if (isJetBrainsTerminal() && options?.isAlternateBuffer) {
279526
+ warnings.push({
279527
+ id: "jetbrains-terminal",
279528
+ message: 'Warning: JetBrains terminal detected \u2014 alternate buffer mode may cause scroll wheel issues and rendering artifacts. If you experience problems, disable it in /settings \u2192 "Use Alternate Screen Buffer".',
279529
+ priority: "high" /* High */
279530
+ });
279531
+ }
279532
+ if (isLowColorTmux()) {
279533
+ warnings.push({
279534
+ id: "low-color-tmux",
279535
+ message: 'Warning: Limited color support detected (TERM=screen). Some visual elements may not render correctly. For better color support in tmux, add to ~/.tmux.conf:\n set -g default-terminal "tmux-256color"\n set -ga terminal-overrides ",*256col*:Tc"',
279536
+ priority: "high" /* High */
279537
+ });
279538
+ }
279539
+ if (isGnuScreen()) {
279540
+ warnings.push({
279541
+ id: "gnu-screen",
279542
+ message: "Warning: GNU screen detected. Some keyboard shortcuts and visual features may behave unexpectedly. For the best experience, consider using tmux or running Gemini CLI directly in your terminal.",
279543
+ priority: "low" /* Low */
279544
+ });
279545
+ }
279546
+ if (isDumbTerminal()) {
279547
+ const term = process.env["TERM"] || "dumb";
279548
+ warnings.push({
279549
+ id: "dumb-terminal",
279550
+ message: `Warning: Basic terminal detected (TERM=${term}). Visual rendering will be limited. For the best experience, use a terminal emulator with truecolor support.`,
279551
+ priority: "high" /* High */
279552
+ });
279553
+ }
279554
+ if (!supports256Colors()) {
279555
+ warnings.push({
279556
+ id: "256-color",
279557
+ message: "Warning: 256-color support not detected. Using a terminal with at least 256-color support is recommended for a better visual experience.",
279558
+ priority: "high" /* High */
279559
+ });
279560
+ } else if (!supportsTrueColor() && !isAppleTerminal()) {
279561
+ warnings.push({
279562
+ id: "true-color",
279563
+ message: "Warning: True color (24-bit) support not detected. Using a terminal with true color enabled will result in a better visual experience.",
279564
+ priority: "low" /* Low */
279565
+ });
279566
+ }
279567
+ return warnings;
279568
+ }
279569
+
279454
279570
  // packages/core/src/utils/stdio.ts
279455
279571
  var originalStdoutWrite = process.stdout.write.bind(process.stdout);
279456
279572
  var originalStderrWrite = process.stderr.write.bind(process.stderr);
@@ -279491,12 +279607,52 @@ function isKey(key, obj) {
279491
279607
  }
279492
279608
  var INK_CURSOR_POSITION_END_REGEX = (
279493
279609
  // eslint-disable-next-line no-control-regex
279494
- /\x1b\[(?:\d+G|\d+;\d+H|D)(\x1b\[\?2026l)?$/
279610
+ /\x1b\[(?:\d+G|\d+;\d+H|D)(\x1b\[\?2026l|\x1bP=2s\x1b\\)?$/
279495
279611
  );
279496
279612
  var SHOW_CURSOR_SEQ = "\x1B[?25h";
279497
279613
  var HIDE_CURSOR_SEQ = "\x1B[?25l";
279614
+ var ENTER_SYNCHRONIZED_OUTPUT_SEQ = "\x1B[?2026h";
279498
279615
  var EXIT_SYNCHRONIZED_OUTPUT_SEQ = "\x1B[?2026l";
279499
- function createWorkingStdio() {
279616
+ var TMUX_ENTER_SYNCHRONIZED_OUTPUT_SEQ = "\x1BP=1s\x1B\\";
279617
+ var TMUX_EXIT_SYNCHRONIZED_OUTPUT_SEQ = "\x1BP=2s\x1B\\";
279618
+ var STANDALONE_MODE_SEQUENCES = /* @__PURE__ */ new Set([
279619
+ SHOW_CURSOR_SEQ,
279620
+ HIDE_CURSOR_SEQ,
279621
+ "\x1B[?7l",
279622
+ "\x1B[?7h",
279623
+ "\x1B[?1004h",
279624
+ "\x1B[?1004l",
279625
+ "\x1B[?1049h",
279626
+ "\x1B[?1049l"
279627
+ ]);
279628
+ function wrapWithSynchronizedOutput(chunk) {
279629
+ if (!chunk || STANDALONE_MODE_SEQUENCES.has(chunk) || chunk.startsWith("\x1B]") && (chunk.endsWith("\x07") || chunk.endsWith("\x1B\\"))) {
279630
+ return chunk;
279631
+ }
279632
+ if (isDumbTerminal()) {
279633
+ return chunk;
279634
+ }
279635
+ const inTmux = isTmux();
279636
+ const syncStart = inTmux ? TMUX_ENTER_SYNCHRONIZED_OUTPUT_SEQ : ENTER_SYNCHRONIZED_OUTPUT_SEQ;
279637
+ const syncEnd = inTmux ? TMUX_EXIT_SYNCHRONIZED_OUTPUT_SEQ : EXIT_SYNCHRONIZED_OUTPUT_SEQ;
279638
+ if (chunk.startsWith(syncStart) && chunk.endsWith(syncEnd)) {
279639
+ return chunk;
279640
+ }
279641
+ let inner = chunk;
279642
+ if (inner.startsWith(ENTER_SYNCHRONIZED_OUTPUT_SEQ) && inner.endsWith(EXIT_SYNCHRONIZED_OUTPUT_SEQ)) {
279643
+ inner = inner.slice(
279644
+ ENTER_SYNCHRONIZED_OUTPUT_SEQ.length,
279645
+ -EXIT_SYNCHRONIZED_OUTPUT_SEQ.length
279646
+ );
279647
+ } else if (inner.startsWith(TMUX_ENTER_SYNCHRONIZED_OUTPUT_SEQ) && inner.endsWith(TMUX_EXIT_SYNCHRONIZED_OUTPUT_SEQ)) {
279648
+ inner = inner.slice(
279649
+ TMUX_ENTER_SYNCHRONIZED_OUTPUT_SEQ.length,
279650
+ -TMUX_EXIT_SYNCHRONIZED_OUTPUT_SEQ.length
279651
+ );
279652
+ }
279653
+ return `${syncStart}${inner}${syncEnd}`;
279654
+ }
279655
+ function createWorkingStdio(options) {
279500
279656
  let cursorShownForIme = false;
279501
279657
  const workingStdoutWrite = (...args2) => {
279502
279658
  const [chunk] = args2;
@@ -279514,12 +279670,18 @@ function createWorkingStdio() {
279514
279670
  } else if (cursorShownForIme) {
279515
279671
  if (chunk.endsWith(EXIT_SYNCHRONIZED_OUTPUT_SEQ)) {
279516
279672
  args2[0] = `${chunk.slice(0, -EXIT_SYNCHRONIZED_OUTPUT_SEQ.length)}${HIDE_CURSOR_SEQ}${EXIT_SYNCHRONIZED_OUTPUT_SEQ}`;
279673
+ } else if (chunk.endsWith(TMUX_EXIT_SYNCHRONIZED_OUTPUT_SEQ)) {
279674
+ args2[0] = `${chunk.slice(0, -TMUX_EXIT_SYNCHRONIZED_OUTPUT_SEQ.length)}${HIDE_CURSOR_SEQ}${TMUX_EXIT_SYNCHRONIZED_OUTPUT_SEQ}`;
279517
279675
  } else {
279518
279676
  args2[0] = `${chunk}${HIDE_CURSOR_SEQ}`;
279519
279677
  }
279520
279678
  cursorShownForIme = false;
279521
279679
  }
279522
279680
  }
279681
+ const currentChunk = args2[0];
279682
+ if (options?.synchronizedOutput && typeof currentChunk === "string") {
279683
+ args2[0] = wrapWithSynchronizedOutput(currentChunk);
279684
+ }
279523
279685
  return writeToStdout(...args2);
279524
279686
  };
279525
279687
  const stdoutHandler = {
@@ -280880,7 +281042,7 @@ var import_instrumentation_http = __toESM(require_src40(), 1);
280880
281042
  var import_systeminformation = __toESM(require_lib2(), 1);
280881
281043
  init_https_proxy_agent();
280882
281044
  import { createHash as createHash3 } from "node:crypto";
280883
- import * as os18 from "node:os";
281045
+ import * as os19 from "node:os";
280884
281046
 
280885
281047
  // packages/core/src/tools/definitions/modelFamilyService.ts
280886
281048
  function getToolFamily(modelId) {
@@ -280972,7 +281134,7 @@ var READ_MCP_RESOURCE_TOOL_NAME = "read_mcp_resource";
280972
281134
  var LIST_MCP_RESOURCES_TOOL_NAME = "list_mcp_resources";
280973
281135
 
280974
281136
  // packages/core/src/tools/definitions/dynamic-declaration-helpers.ts
280975
- import * as os17 from "node:os";
281137
+ import * as os18 from "node:os";
280976
281138
 
280977
281139
  // node_modules/zod-to-json-schema/dist/esm/Options.js
280978
281140
  var ignoreOverride = Symbol("Let zodToJsonSchema decide on which parser to use");
@@ -282275,7 +282437,7 @@ function getShellToolDescription(enableInteractiveShell, enableEfficiency) {
282275
282437
  Signal: Only included if process was terminated by a signal.
282276
282438
  Background PIDs: Only included if background processes were started.
282277
282439
  Process Group PGID: Only included if available.`;
282278
- if (os17.platform() === "win32") {
282440
+ if (os18.platform() === "win32") {
282279
282441
  const backgroundInstructions = enableInteractiveShell ? `To run a command in the background, set the \`${SHELL_PARAM_IS_BACKGROUND}\` parameter to true. Do NOT use PowerShell background constructs.` : "Command can start background processes using PowerShell constructs such as `Start-Process -NoNewWindow` or `Start-Job`.";
282280
282442
  return `This tool executes a given shell command as \`powershell.exe -NoProfile -Command <command>\`. ${backgroundInstructions}${efficiencyGuidelines}${returnedInfo}`;
282281
282443
  } else {
@@ -282284,7 +282446,7 @@ function getShellToolDescription(enableInteractiveShell, enableEfficiency) {
282284
282446
  }
282285
282447
  }
282286
282448
  function getCommandDescription() {
282287
- if (os17.platform() === "win32") {
282449
+ if (os18.platform() === "win32") {
282288
282450
  return "Exact command to execute as `powershell.exe -NoProfile -Command <command>`";
282289
282451
  }
282290
282452
  return "Exact bash command to execute as `bash -c <command>`";
@@ -283846,8 +284008,8 @@ function isValidToolName(name3, options = {}) {
283846
284008
  }
283847
284009
 
283848
284010
  // packages/core/src/generated/git-commit.ts
283849
- var GIT_COMMIT_INFO = "204db94ae";
283850
- var CLI_VERSION = "0.65.0-nightly.20261006.gfb972b2f8";
284011
+ var GIT_COMMIT_INFO = "ed96faedf";
284012
+ var CLI_VERSION = "0.66.0-nightly.20261013.g204db94ae";
283851
284013
 
283852
284014
  // packages/core/src/ide/detect-ide.ts
283853
284015
  var IDE_DEFINITIONS = {
@@ -284365,7 +284527,7 @@ var ClearcutLogger = class _ClearcutLogger {
284365
284527
  value: event.worktree_active.toString()
284366
284528
  }
284367
284529
  ];
284368
- const cpus2 = os18.cpus();
284530
+ const cpus2 = os19.cpus();
284369
284531
  if (cpus2 && cpus2.length > 0) {
284370
284532
  data.push({
284371
284533
  gemini_cli_key: 137 /* GEMINI_CLI_CPU_INFO */,
@@ -284375,11 +284537,11 @@ var ClearcutLogger = class _ClearcutLogger {
284375
284537
  data.push(
284376
284538
  {
284377
284539
  gemini_cli_key: 138 /* GEMINI_CLI_CPU_CORES */,
284378
- value: os18.availableParallelism().toString()
284540
+ value: os19.availableParallelism().toString()
284379
284541
  },
284380
284542
  {
284381
284543
  gemini_cli_key: 140 /* GEMINI_CLI_RAM_TOTAL_GB */,
284382
- value: (os18.totalmem() / 1024 ** 3).toFixed(2).toString()
284544
+ value: (os19.totalmem() / 1024 ** 3).toFixed(2).toString()
284383
284545
  }
284384
284546
  );
284385
284547
  const gpuInfo = await getGpuInfo();
@@ -288742,12 +288904,12 @@ var RateLimiter = class _RateLimiter {
288742
288904
  import v8 from "node:v8";
288743
288905
  import path30 from "node:path";
288744
288906
  import fs33 from "node:fs";
288745
- import os19 from "node:os";
288907
+ import os20 from "node:os";
288746
288908
  function captureHeapSnapshot() {
288747
288909
  try {
288748
288910
  const timestamp2 = Date.now();
288749
288911
  const filename = `gemini-heap-${timestamp2}.heapsnapshot`;
288750
- const snapshotsDir = fs33.mkdtempSync(path30.join(os19.tmpdir(), "gemini-heap-"));
288912
+ const snapshotsDir = fs33.mkdtempSync(path30.join(os20.tmpdir(), "gemini-heap-"));
288751
288913
  const filePath = path30.join(snapshotsDir, filename);
288752
288914
  v8.writeHeapSnapshot(filePath);
288753
288915
  return filePath;
@@ -289480,7 +289642,7 @@ function getErrorMessage2(e2) {
289480
289642
 
289481
289643
  // packages/core/src/telemetry/startupProfiler.ts
289482
289644
  import { performance as performance2 } from "node:perf_hooks";
289483
- import * as os20 from "node:os";
289645
+ import * as os21 from "node:os";
289484
289646
  import * as fs34 from "node:fs";
289485
289647
  var StartupProfiler = class _StartupProfiler {
289486
289648
  phases = /* @__PURE__ */ new Map();
@@ -289577,9 +289739,9 @@ var StartupProfiler = class _StartupProfiler {
289577
289739
  "phases"
289578
289740
  );
289579
289741
  const commonDetails = {
289580
- os_platform: os20.platform(),
289581
- os_arch: os20.arch(),
289582
- os_release: os20.release(),
289742
+ os_platform: os21.platform(),
289743
+ os_arch: os21.arch(),
289744
+ os_release: os21.release(),
289583
289745
  is_docker: fs34.existsSync("/.dockerenv")
289584
289746
  };
289585
289747
  const measures = performance2.getEntriesByType("measure");
@@ -289639,8 +289801,8 @@ var StartupProfiler = class _StartupProfiler {
289639
289801
  config2,
289640
289802
  new StartupStatsEvent(
289641
289803
  startupPhases,
289642
- os20.platform(),
289643
- os20.release(),
289804
+ os21.platform(),
289805
+ os21.release(),
289644
289806
  fs34.existsSync("/.dockerenv")
289645
289807
  )
289646
289808
  );
@@ -291127,7 +291289,7 @@ function getLanguageFromFilePath(filePath) {
291127
291289
  // packages/core/src/tools/edit.ts
291128
291290
  import * as fsPromises4 from "node:fs/promises";
291129
291291
  import * as path43 from "node:path";
291130
- import * as os25 from "node:os";
291292
+ import * as os26 from "node:os";
291131
291293
  import * as crypto15 from "node:crypto";
291132
291294
 
291133
291295
  // node_modules/diff/libesm/diff/base.js
@@ -292501,6 +292663,33 @@ function getDiffCommand(oldPath, newPath, editor) {
292501
292663
  return null;
292502
292664
  }
292503
292665
  }
292666
+ function quoteCmdArg(arg) {
292667
+ if (/[\r\n\0]/.test(arg)) {
292668
+ throw new Error("Invalid argument: newlines are not allowed");
292669
+ }
292670
+ if (arg.includes('"')) {
292671
+ throw new Error(
292672
+ "Invalid argument: double quotes are not allowed on Windows"
292673
+ );
292674
+ }
292675
+ if (!arg) {
292676
+ return '""';
292677
+ }
292678
+ if (/^[a-zA-Z0-9\-_.:/\\]+$/.test(arg)) {
292679
+ return arg;
292680
+ }
292681
+ let result2 = '"' + arg;
292682
+ let backslashCount = 0;
292683
+ for (let i3 = arg.length - 1; i3 >= 0; i3--) {
292684
+ if (arg[i3] === "\\") {
292685
+ backslashCount++;
292686
+ } else {
292687
+ break;
292688
+ }
292689
+ }
292690
+ result2 += "\\".repeat(backslashCount) + '"';
292691
+ return result2;
292692
+ }
292504
292693
  async function openDiff(oldPath, newPath, editor) {
292505
292694
  if (isHeadlessMode()) {
292506
292695
  debugLogger.warn(
@@ -292533,10 +292722,19 @@ async function openDiff(oldPath, newPath, editor) {
292533
292722
  return;
292534
292723
  }
292535
292724
  return new Promise((resolve29, reject) => {
292536
- const childProcess2 = spawn2(diffCommand.command, diffCommand.args, {
292537
- stdio: "inherit",
292538
- shell: process.platform === "win32"
292539
- });
292725
+ const isWindows3 = process.platform === "win32";
292726
+ let childProcess2;
292727
+ try {
292728
+ const spawnArgs = isWindows3 ? diffCommand.args.map(quoteCmdArg) : diffCommand.args;
292729
+ childProcess2 = spawn2(diffCommand.command, spawnArgs, {
292730
+ stdio: "inherit",
292731
+ shell: isWindows3
292732
+ });
292733
+ } catch (error40) {
292734
+ coreEvents.emit("external-editor-closed" /* ExternalEditorClosed */);
292735
+ reject(error40);
292736
+ return;
292737
+ }
292540
292738
  let isSettled = false;
292541
292739
  childProcess2.on("close", (code) => {
292542
292740
  if (isSettled) return;
@@ -292557,7 +292755,7 @@ async function openDiff(oldPath, newPath, editor) {
292557
292755
  }
292558
292756
 
292559
292757
  // packages/core/src/tools/modifiable-tool.ts
292560
- import os21 from "node:os";
292758
+ import os22 from "node:os";
292561
292759
  import path34 from "node:path";
292562
292760
  import fs36 from "node:fs";
292563
292761
  function isModifiableDeclarativeTool(tool) {
@@ -292565,7 +292763,7 @@ function isModifiableDeclarativeTool(tool) {
292565
292763
  }
292566
292764
  function createTempFilesForModify(currentContent, proposedContent, file_path) {
292567
292765
  const diffDir = fs36.mkdtempSync(
292568
- path34.join(os21.tmpdir(), "gemini-cli-tool-modify-")
292766
+ path34.join(os22.tmpdir(), "gemini-cli-tool-modify-")
292569
292767
  );
292570
292768
  try {
292571
292769
  fs36.chmodSync(diffDir, 448);
@@ -292867,7 +293065,7 @@ var CloseDiffRequestSchema = external_exports.object({
292867
293065
  // packages/core/src/ide/process-utils.ts
292868
293066
  import { exec as exec2 } from "node:child_process";
292869
293067
  import { promisify as promisify6 } from "node:util";
292870
- import os22 from "node:os";
293068
+ import os23 from "node:os";
292871
293069
  import path35 from "node:path";
292872
293070
  var execAsync2 = promisify6(exec2);
292873
293071
  var MAX_TRAVERSAL_DEPTH = 32;
@@ -292987,7 +293185,7 @@ async function getIdeProcessInfoForWindows() {
292987
293185
  return { pid: myPid, command: myProc.command };
292988
293186
  }
292989
293187
  async function getIdeProcessInfo() {
292990
- const platform12 = os22.platform();
293188
+ const platform12 = os23.platform();
292991
293189
  if (process.env["GEMINI_CLI_IDE_PID"]) {
292992
293190
  const idePid = parseInt(process.env["GEMINI_CLI_IDE_PID"], 10);
292993
293191
  if (!isNaN(idePid) && idePid > 0) {
@@ -307783,7 +307981,7 @@ function isElectron() {
307783
307981
  var import_undici = __toESM(require_undici(), 1);
307784
307982
  import * as fs37 from "node:fs";
307785
307983
  import * as path36 from "node:path";
307786
- import * as os23 from "node:os";
307984
+ import * as os24 from "node:os";
307787
307985
  var logger2 = {
307788
307986
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
307789
307987
  debug: (...args2) => debugLogger.debug("[DEBUG] [IDEConnectionUtils]", ...args2),
@@ -307869,7 +308067,7 @@ async function verifyAndReadFile(filePath) {
307869
308067
  async function getConnectionConfigFromFile(pid) {
307870
308068
  try {
307871
308069
  const portFile = path36.join(
307872
- os23.tmpdir(),
308070
+ os24.tmpdir(),
307873
308071
  "gemini",
307874
308072
  "ide",
307875
308073
  `gemini-ide-server-${pid}.json`
@@ -307886,7 +308084,7 @@ async function getConnectionConfigFromFile(pid) {
307886
308084
  throw new Error("Invalid connection config format");
307887
308085
  } catch {
307888
308086
  }
307889
- const portFileDir = path36.join(os23.tmpdir(), "gemini", "ide");
308087
+ const portFileDir = path36.join(os24.tmpdir(), "gemini", "ide");
307890
308088
  let portFiles;
307891
308089
  try {
307892
308090
  portFiles = await fs37.promises.readdir(portFileDir);
@@ -308019,7 +308217,7 @@ function isPidAlive(pid) {
308019
308217
  if (pid <= 0) {
308020
308218
  return false;
308021
308219
  }
308022
- if (os23.platform() === "win32") {
308220
+ if (os24.platform() === "win32") {
308023
308221
  return true;
308024
308222
  }
308025
308223
  try {
@@ -308291,7 +308489,7 @@ function getVersion() {
308291
308489
  }
308292
308490
  versionPromise = (async () => {
308293
308491
  const pkgJson = await getPackageJson(__dirname4);
308294
- return "0.65.0-nightly.20261006.gfb972b2f8";
308492
+ return "0.66.0-nightly.20261013.g204db94ae";
308295
308493
  })();
308296
308494
  return versionPromise;
308297
308495
  }
@@ -309693,9 +309891,9 @@ async function processIntent(config2, intent, fallbackModel, failedModel) {
309693
309891
 
309694
309892
  // packages/core/src/utils/errorReporting.ts
309695
309893
  import fs38 from "node:fs/promises";
309696
- import os24 from "node:os";
309894
+ import os25 from "node:os";
309697
309895
  import path41 from "node:path";
309698
- async function reportError(error40, baseMessage, context2, type2 = "general", reportingDir = os24.tmpdir()) {
309896
+ async function reportError(error40, baseMessage, context2, type2 = "general", reportingDir = os25.tmpdir()) {
309699
309897
  const timestamp2 = (/* @__PURE__ */ new Date()).toISOString().replace(/[:.]/g, "-");
309700
309898
  const reportFileName = `gemini-client-error-${type2}-${timestamp2}.json`;
309701
309899
  const reportPath = path41.join(reportingDir, reportFileName);
@@ -311767,7 +311965,7 @@ var EditToolInvocation = class extends BaseToolInvocation {
311767
311965
  try {
311768
311966
  await this.ensureParentDirectoriesExistAsync(this.resolvedPath);
311769
311967
  let finalContent = editData.newContent;
311770
- const useCRLF = !editData.isNewFile && editData.originalLineEnding === "\r\n" || editData.isNewFile && os25.EOL === "\r\n";
311968
+ const useCRLF = !editData.isNewFile && editData.originalLineEnding === "\r\n" || editData.isNewFile && os26.EOL === "\r\n";
311771
311969
  if (useCRLF) {
311772
311970
  finalContent = finalContent.replace(/\r?\n/g, "\r\n");
311773
311971
  }
@@ -312181,7 +312379,7 @@ async function calculateFuzzyReplacement(config2, context2) {
312181
312379
  import fs39 from "node:fs";
312182
312380
  import fsPromises5 from "node:fs/promises";
312183
312381
  import path44 from "node:path";
312184
- import os26 from "node:os";
312382
+ import os27 from "node:os";
312185
312383
 
312186
312384
  // packages/core/src/utils/editCorrector.ts
312187
312385
  var CODE_CORRECTION_SYSTEM_PROMPT = `
@@ -312603,7 +312801,7 @@ var WriteFileToolInvocation = class extends BaseToolInvocation {
312603
312801
  await fsPromises5.mkdir(dirName, { recursive: true });
312604
312802
  }
312605
312803
  let finalContent = fileContent;
312606
- const useCRLF = !isNewFile && originalContent ? detectLineEnding(originalContent) === "\r\n" : os26.EOL === "\r\n";
312804
+ const useCRLF = !isNewFile && originalContent ? detectLineEnding(originalContent) === "\r\n" : os27.EOL === "\r\n";
312607
312805
  if (useCRLF) {
312608
312806
  finalContent = finalContent.replace(/\r?\n/g, "\r\n");
312609
312807
  }
@@ -314756,7 +314954,7 @@ async function createContentGenerator(config2, gcConfig, sessionId) {
314756
314954
  linux: "Linux"
314757
314955
  };
314758
314956
  const osType2 = osTypeMap[process.platform] || process.platform;
314759
- const osVersion = os27.release();
314957
+ const osVersion = os28.release();
314760
314958
  const arch3 = process.arch;
314761
314959
  const vscodeVersion = process.env["TERM_PROGRAM_VERSION"] || "unknown";
314762
314960
  let hostPath = `VSCode/${vscodeVersion}`;
@@ -316263,9 +316461,33 @@ function getSafeGitEnv(baseEnv = process.env) {
316263
316461
  cleanedEnv[key] = value;
316264
316462
  }
316265
316463
  }
316464
+ let baseSshCommand = cleanedEnv["GIT_SSH_COMMAND"];
316465
+ if (!baseSshCommand && cleanedEnv["GIT_SSH"]) {
316466
+ const gitSsh = cleanedEnv["GIT_SSH"];
316467
+ baseSshCommand = gitSsh.includes(" ") && !gitSsh.startsWith('"') && !gitSsh.startsWith("'") ? '"' + gitSsh + '"' : gitSsh;
316468
+ }
316469
+ if (!baseSshCommand) {
316470
+ baseSshCommand = "ssh";
316471
+ }
316472
+ const execMatch = baseSshCommand.match(/^\s*(?:"([^"]+)"|'([^']+)'|(\S+))/);
316473
+ const executable = execMatch ? execMatch[1] || execMatch[2] || execMatch[3] || "" : "";
316474
+ const execName = executable.split(/[/\\]/).pop() || "";
316475
+ const isPlink = /^(?:tortoise)?plink(?:\.exe)?$/i.test(execName);
316476
+ const batchFlag = isPlink ? "-batch" : "-o BatchMode=yes";
316477
+ const hasBatchFlag = isPlink ? /(?:^|\s)-batch(?:\s|$)/.test(baseSshCommand) : /\bbatchmode\s*=\s*yes\b/i.test(baseSshCommand) && !/\bbatchmode\s*=\s*no\b/i.test(baseSshCommand);
316478
+ let gitSshCommand = baseSshCommand;
316479
+ if (!hasBatchFlag && execMatch) {
316480
+ const execLength = execMatch[0].length;
316481
+ gitSshCommand = baseSshCommand.slice(0, execLength) + " " + batchFlag + baseSshCommand.slice(execLength);
316482
+ }
316266
316483
  return {
316267
316484
  ...cleanedEnv,
316268
316485
  GIT_TERMINAL_PROMPT: "0",
316486
+ GIT_ASKPASS: "",
316487
+ SSH_ASKPASS: "",
316488
+ GIT_SSH_COMMAND: gitSshCommand,
316489
+ GH_PROMPT_DISABLED: "1",
316490
+ GCM_INTERACTIVE: "never",
316269
316491
  GIT_CONFIG_GLOBAL: devNullPath,
316270
316492
  GIT_CONFIG_SYSTEM: devNullPath,
316271
316493
  GIT_CONFIG_NOSYSTEM: "1",
@@ -324606,13 +324828,13 @@ var GrepTool = class _GrepTool extends BaseDeclarativeTool {
324606
324828
  import fs46 from "node:fs";
324607
324829
  import fsPromises8 from "node:fs/promises";
324608
324830
  import path55 from "node:path";
324609
- import os28 from "node:os";
324831
+ import os29 from "node:os";
324610
324832
  import { fileURLToPath as fileURLToPath11 } from "node:url";
324611
324833
  var __dirname6 = path55.dirname(fileURLToPath11(import.meta.url));
324612
324834
  async function resolveRipgrepPath() {
324613
324835
  try {
324614
- const platform12 = os28.platform();
324615
- const arch3 = os28.arch();
324836
+ const platform12 = os29.platform();
324837
+ const arch3 = os29.arch();
324616
324838
  const binName = `rg-${platform12}-${arch3}${platform12 === "win32" ? ".exe" : ""}`;
324617
324839
  const candidatePaths = [
324618
324840
  // 1. SEA runtime layout (Flattened): everything is in the root dir
@@ -325673,7 +325895,7 @@ var ActivateSkillTool = class _ActivateSkillTool extends BaseDeclarativeTool {
325673
325895
  import fsPromises10 from "node:fs/promises";
325674
325896
  import fs51 from "node:fs";
325675
325897
  import path61 from "node:path";
325676
- import os32 from "node:os";
325898
+ import os33 from "node:os";
325677
325899
 
325678
325900
  // packages/core/src/utils/summarizer.ts
325679
325901
  var SUMMARIZE_TOOL_OUTPUT_PROMPT = `Summarize the following tool output to be a maximum of {maxOutputTokens} tokens. The summary should be concise and capture the main points of the tool output.
@@ -325736,7 +325958,7 @@ var getPty = async () => {
325736
325958
  // packages/core/src/services/shellExecutionService.ts
325737
325959
  import { spawn as cpSpawn } from "node:child_process";
325738
325960
  import { TextDecoder as TextDecoder2 } from "node:util";
325739
- import os30 from "node:os";
325961
+ import os31 from "node:os";
325740
325962
  import fs49, { mkdirSync as mkdirSync4 } from "node:fs";
325741
325963
  import fsPromises9 from "node:fs/promises";
325742
325964
  import path59 from "node:path";
@@ -326179,11 +326401,11 @@ function convertColorToHex(color, colorMode, defaultColor) {
326179
326401
  }
326180
326402
 
326181
326403
  // packages/core/src/utils/process-utils.ts
326182
- import os29 from "node:os";
326404
+ import os30 from "node:os";
326183
326405
  var SIGKILL_TIMEOUT_MS = 200;
326184
326406
  async function killProcessGroup(options) {
326185
326407
  const { pid, escalate = false, isExited = () => false, pty } = options;
326186
- const isWindows3 = os29.platform() === "win32";
326408
+ const isWindows3 = os30.platform() === "win32";
326187
326409
  if (isWindows3) {
326188
326410
  if (pty) {
326189
326411
  try {
@@ -326885,7 +327107,7 @@ ${truncated}`;
326885
327107
  }
326886
327108
  static async prepareExecution(commandToExecute, cwd, shellExecutionConfig, isInteractive, usingPty) {
326887
327109
  const sandboxManager = shellExecutionConfig.sandboxManager ?? new NoopSandboxManager();
326888
- const isWindows3 = os30.platform() === "win32";
327110
+ const isWindows3 = os31.platform() === "win32";
326889
327111
  const isStrictSandbox = isWindows3 && shellExecutionConfig.sandboxConfig?.enabled && shellExecutionConfig.sandboxConfig?.command === "windows-native" && !shellExecutionConfig.sandboxConfig?.networkAccess;
326890
327112
  let { executable, argsPrefix, shell } = getShellConfiguration();
326891
327113
  if (isStrictSandbox) {
@@ -326928,7 +327150,7 @@ ${truncated}`;
326928
327150
  baseEnv[key] = sourceEnv[key];
326929
327151
  }
326930
327152
  let gitConfigCount = parseInt(baseEnv["GIT_CONFIG_COUNT"] || "0", 10);
326931
- const devNullPath = os30.platform() === "win32" ? "NUL" : "/dev/null";
327153
+ const devNullPath = os31.platform() === "win32" ? "NUL" : "/dev/null";
326932
327154
  baseEnv["GIT_CONFIG_GLOBAL"] = devNullPath;
326933
327155
  baseEnv["GIT_CONFIG_SYSTEM"] = devNullPath;
326934
327156
  baseEnv["GIT_CONFIG_NOSYSTEM"] = "1";
@@ -327053,7 +327275,7 @@ ${truncated}`;
327053
327275
  return;
327054
327276
  };
327055
327277
  var cleanup = cleanup2;
327056
- const isWindows3 = os30.platform() === "win32";
327278
+ const isWindows3 = os31.platform() === "win32";
327057
327279
  const prepared = await this.prepareExecution(
327058
327280
  commandToExecute,
327059
327281
  cwd,
@@ -327213,7 +327435,7 @@ ${truncated}`;
327213
327435
  }
327214
327436
  const finalStrippedOutput = stripAnsi(combinedOutput).trim();
327215
327437
  const exitCode = code;
327216
- const exitSignal = signal && os30.constants.signals ? os30.constants.signals[signal] ?? null : null;
327438
+ const exitSignal = signal && os31.constants.signals ? os31.constants.signals[signal] ?? null : null;
327217
327439
  const resultPayload = {
327218
327440
  rawOutput: Buffer.from(""),
327219
327441
  output: finalStrippedOutput,
@@ -327310,7 +327532,7 @@ ${truncated}`;
327310
327532
  * descriptor later in the lifecycle.
327311
327533
  */
327312
327534
  static closeOrphanSlaveFd(masterFd, ptsName) {
327313
- if (os30.platform() !== "darwin") {
327535
+ if (os31.platform() !== "darwin") {
327314
327536
  return void 0;
327315
327537
  }
327316
327538
  if (typeof masterFd !== "number" || !Number.isFinite(masterFd) || masterFd < 0 || typeof ptsName !== "string" || ptsName.length === 0) {
@@ -327399,7 +327621,7 @@ ${truncated}`;
327399
327621
  env: finalEnv,
327400
327622
  cwd: finalCwd
327401
327623
  } = prepared;
327402
- const isWindowsPlatform = os30.platform() === "win32";
327624
+ const isWindowsPlatform = os31.platform() === "win32";
327403
327625
  const ptyProcess = ptyInfo.module.spawn(finalExecutable, finalArgs, {
327404
327626
  cwd: finalCwd,
327405
327627
  name: "xterm-256color",
@@ -328122,7 +328344,7 @@ ${truncated}`;
328122
328344
  };
328123
328345
 
328124
328346
  // packages/core/src/sandbox/utils/proactivePermissions.ts
328125
- import os31 from "node:os";
328347
+ import os32 from "node:os";
328126
328348
  import path60 from "node:path";
328127
328349
  import fs50 from "node:fs";
328128
328350
  var NETWORK_RELIANT_TOOLS = /* @__PURE__ */ new Set([
@@ -328169,7 +328391,7 @@ async function getProactiveToolSuggestions(commandName) {
328169
328391
  if (!NETWORK_RELIANT_TOOLS.has(normalizedCommand)) {
328170
328392
  return void 0;
328171
328393
  }
328172
- const home = os31.homedir();
328394
+ const home = os32.homedir();
328173
328395
  const readOnlyPaths = [];
328174
328396
  const primaryCachePaths = [];
328175
328397
  const optionalCachePaths = [];
@@ -328200,7 +328422,7 @@ async function getProactiveToolSuggestions(commandName) {
328200
328422
  } else if (normalizedCommand === "ssh" || normalizedCommand === "scp" || normalizedCommand === "sftp") {
328201
328423
  readOnlyPaths.push(path60.join(home, ".ssh"));
328202
328424
  }
328203
- if (os31.platform() === "win32") {
328425
+ if (os32.platform() === "win32") {
328204
328426
  const appData = process.env["AppData"];
328205
328427
  const localAppData = process.env["LocalAppData"];
328206
328428
  if (normalizedCommand === "npm" || normalizedCommand === "npx") {
@@ -328348,8 +328570,8 @@ exit $__code`;
328348
328570
  }
328349
328571
  const finalPaths = /* @__PURE__ */ new Set();
328350
328572
  const sensitiveDirs = /* @__PURE__ */ new Set([
328351
- os32.homedir(),
328352
- path61.dirname(os32.homedir()),
328573
+ os33.homedir(),
328574
+ path61.dirname(os33.homedir()),
328353
328575
  path61.sep,
328354
328576
  path61.join(path61.sep, "etc"),
328355
328577
  path61.join(path61.sep, "usr"),
@@ -328361,7 +328583,7 @@ exit $__code`;
328361
328583
  path61.join(path61.sep, "home"),
328362
328584
  path61.join(path61.sep, "Users")
328363
328585
  ]);
328364
- if (os32.platform() === "win32") {
328586
+ if (os33.platform() === "win32") {
328365
328587
  const systemRoot = process.env["SystemRoot"];
328366
328588
  if (systemRoot) {
328367
328589
  sensitiveDirs.add(systemRoot);
@@ -328598,7 +328820,7 @@ exit $__code`;
328598
328820
  returnDisplay: "Command cancelled by user."
328599
328821
  };
328600
328822
  }
328601
- const isWindows3 = os32.platform() === "win32";
328823
+ const isWindows3 = os33.platform() === "win32";
328602
328824
  let tempFilePath = "";
328603
328825
  let tempDir = "";
328604
328826
  let isBackgrounded = false;
@@ -328609,7 +328831,7 @@ exit $__code`;
328609
328831
  const combinedController = new AbortController();
328610
328832
  const onAbort = () => combinedController.abort();
328611
328833
  try {
328612
- tempDir = fs51.mkdtempSync(path61.join(os32.tmpdir(), "gemini-shell-"));
328834
+ tempDir = fs51.mkdtempSync(path61.join(os33.tmpdir(), "gemini-shell-"));
328613
328835
  tempFilePath = path61.join(tempDir, "bgpids.tmp");
328614
328836
  const commandToExecute = this.wrapCommandForBackgroundPIDs(
328615
328837
  strippedCommand,
@@ -328831,7 +329053,7 @@ ${cumulativeOutput}`,
328831
329053
  flushOutput();
328832
329054
  }
328833
329055
  const backgroundPIDs = [];
328834
- if (os32.platform() !== "win32") {
329056
+ if (os33.platform() !== "win32") {
328835
329057
  let tempFileExists = false;
328836
329058
  try {
328837
329059
  await fsPromises10.access(tempFilePath);
@@ -328978,7 +329200,7 @@ ${result2.output}`;
328978
329200
  try {
328979
329201
  let currentPath = p;
328980
329202
  if (currentPath.startsWith("~")) {
328981
- currentPath = path61.join(os32.homedir(), currentPath.slice(1));
329203
+ currentPath = path61.join(os33.homedir(), currentPath.slice(1));
328982
329204
  }
328983
329205
  try {
328984
329206
  if (fs51.existsSync(currentPath) && fs51.statSync(currentPath).isFile()) {
@@ -343361,7 +343583,7 @@ import * as crypto16 from "node:crypto";
343361
343583
  // packages/core/src/skills/skillLoader.ts
343362
343584
  import * as fs54 from "node:fs/promises";
343363
343585
  import * as path65 from "node:path";
343364
- var FRONTMATTER_REGEX = /^---\r?\n([\s\S]*?)\r?\n---(?:\r?\n([\s\S]*))?/;
343586
+ var FRONTMATTER_REGEX = /^\uFEFF?---[ \t]*\r?\n([\s\S]*?)\r?\n---[ \t]*(?:\r?\n([\s\S]*))?$/;
343365
343587
  function parseFrontmatter(content) {
343366
343588
  try {
343367
343589
  const parsed = load(content);
@@ -343379,30 +343601,44 @@ function parseFrontmatter(content) {
343379
343601
  }
343380
343602
  return parseSimpleFrontmatter(content);
343381
343603
  }
343604
+ function stripOuterQuotes(value) {
343605
+ if (value.length >= 2 && (value.startsWith('"') && value.endsWith('"') || value.startsWith("'") && value.endsWith("'"))) {
343606
+ return value.slice(1, -1);
343607
+ }
343608
+ return value;
343609
+ }
343382
343610
  function parseSimpleFrontmatter(content) {
343383
343611
  const lines = content.split(/\r?\n/);
343384
343612
  let name3;
343385
343613
  let description;
343386
343614
  for (let i3 = 0; i3 < lines.length; i3++) {
343387
343615
  const line = lines[i3];
343388
- const nameMatch = line.match(/^\s*name:\s*(.*)$/);
343389
- if (nameMatch) {
343390
- name3 = nameMatch[1].trim();
343616
+ const namePrefixMatch = line.match(/^[ \t]*name[ \t]*:/i);
343617
+ if (namePrefixMatch) {
343618
+ name3 = stripOuterQuotes(line.slice(namePrefixMatch[0].length).trim());
343391
343619
  continue;
343392
343620
  }
343393
- const descMatch = line.match(/^\s*description:\s*(.*)$/);
343394
- if (descMatch) {
343395
- const descLines = [descMatch[1].trim()];
343621
+ const descPrefixMatch = line.match(/^([ \t]*)description[ \t]*:/i);
343622
+ if (descPrefixMatch) {
343623
+ const descIndent = descPrefixMatch[1].length;
343624
+ const firstLine = line.slice(descPrefixMatch[0].length).trim();
343625
+ const descLines = /^[>|][-+]?$/.test(firstLine) ? [] : [firstLine];
343396
343626
  while (i3 + 1 < lines.length) {
343397
343627
  const nextLine = lines[i3 + 1];
343398
- if (nextLine.match(/^[ \t]+\S/)) {
343628
+ const nextIndentMatch = nextLine.match(/^[ \t]*/);
343629
+ const nextIndent = nextIndentMatch ? nextIndentMatch[0].length : 0;
343630
+ const isNonEmpty = nextIndent < nextLine.length;
343631
+ const isKnownKey = /^[ \t]*(?:name|description)[ \t]*:/i.test(nextLine);
343632
+ const isComment2 = /^[ \t]*#/.test(nextLine);
343633
+ const isOtherKeyAtOrAboveDescIndent = nextIndent <= descIndent && /^[ \t]*[a-zA-Z0-9_-]+[ \t]*:/.test(nextLine);
343634
+ if (isNonEmpty && !isKnownKey && !isComment2 && !isOtherKeyAtOrAboveDescIndent) {
343399
343635
  descLines.push(nextLine.trim());
343400
343636
  i3++;
343401
343637
  } else {
343402
343638
  break;
343403
343639
  }
343404
343640
  }
343405
- description = descLines.filter(Boolean).join(" ");
343641
+ description = stripOuterQuotes(descLines.filter(Boolean).join(" "));
343406
343642
  continue;
343407
343643
  }
343408
343644
  }
@@ -343451,7 +343687,7 @@ async function loadSkillsFromDir(dir) {
343451
343687
  }
343452
343688
  async function loadSkillFromFile(filePath) {
343453
343689
  try {
343454
- const content = await fs54.readFile(filePath, "utf-8");
343690
+ const content = await readFileWithEncoding(filePath);
343455
343691
  const match2 = content.match(FRONTMATTER_REGEX);
343456
343692
  if (!match2) {
343457
343693
  return null;
@@ -345249,7 +345485,7 @@ var A2AAuthProviderFactory = class _A2AAuthProviderFactory {
345249
345485
  return provider;
345250
345486
  }
345251
345487
  case "oauth2": {
345252
- const { OAuth2AuthProvider } = await import("./oauth2-provider-MKWWBW4K.js");
345488
+ const { OAuth2AuthProvider } = await import("./oauth2-provider-RMF7U2UN.js");
345253
345489
  const provider = new OAuth2AuthProvider(
345254
345490
  authConfig,
345255
345491
  options.agentName ?? "unknown",
@@ -353495,6 +353731,19 @@ var createErrorResponse = (request, error40, errorType) => ({
353495
353731
  errorType,
353496
353732
  contentLength: error40.message.length
353497
353733
  });
353734
+ function getToolCallGroupIds(requests, isGroupable) {
353735
+ const groupable = requests.map(isGroupable);
353736
+ const groupIds = requests.map(() => void 0);
353737
+ let runStart = 0;
353738
+ for (let i3 = 0; i3 <= requests.length; i3++) {
353739
+ if (i3 < requests.length && groupable[i3]) continue;
353740
+ if (i3 - runStart >= 2) {
353741
+ groupIds.fill(requests[runStart].callId, runStart, i3);
353742
+ }
353743
+ runStart = i3 + 1;
353744
+ }
353745
+ return groupIds;
353746
+ }
353498
353747
  var Scheduler = class {
353499
353748
  disposeController = new AbortController();
353500
353749
  state;
@@ -353660,11 +353909,16 @@ var Scheduler = class {
353660
353909
  });
353661
353910
  try {
353662
353911
  const toolRegistry = this.context.toolRegistry;
353663
- const newCalls = sortedRequests.map((request) => {
353912
+ const groupIds = getToolCallGroupIds(
353913
+ sortedRequests,
353914
+ (request) => toolRegistry.getTool(request.name)?.kind === "agent" /* Agent */
353915
+ );
353916
+ const newCalls = sortedRequests.map((request, index) => {
353664
353917
  const enrichedRequest = {
353665
353918
  ...request,
353666
353919
  schedulerId: this.schedulerId,
353667
- parentCallId: this.parentCallId
353920
+ parentCallId: this.parentCallId,
353921
+ groupId: groupIds[index]
353668
353922
  };
353669
353923
  const tool = toolRegistry.getTool(request.name);
353670
353924
  if (!tool) {
@@ -354033,7 +354287,8 @@ var Scheduler = class {
354033
354287
  originalRequestArgs: result2.request.originalRequestArgs ?? result2.request.args,
354034
354288
  isClientInitiated: result2.request.isClientInitiated,
354035
354289
  prompt_id: result2.request.prompt_id,
354036
- schedulerId: this.schedulerId
354290
+ schedulerId: this.schedulerId,
354291
+ groupId: result2.request.groupId
354037
354292
  };
354038
354293
  if (!newTool) {
354039
354294
  const errorCall = this._createToolNotFoundErroredToolCall(
@@ -373093,7 +373348,7 @@ var import_toml3 = __toESM(require_toml(), 1);
373093
373348
  import * as fs75 from "node:fs/promises";
373094
373349
  import * as fsSync5 from "node:fs";
373095
373350
  import { constants as constants2 } from "node:fs";
373096
- import * as os33 from "node:os";
373351
+ import * as os34 from "node:os";
373097
373352
  import * as path88 from "node:path";
373098
373353
  import { spawnSync as spawnSync4 } from "node:child_process";
373099
373354
  function createPathSecurityCache(maxSize = 1e3) {
@@ -373124,7 +373379,7 @@ function getWindowsPowerShellPath() {
373124
373379
  if (!/^[a-zA-Z]:\\Windows\\?$/i.test(systemRoot) || systemRoot.includes("..")) {
373125
373380
  systemRoot = "C:\\Windows";
373126
373381
  }
373127
- const pathModule = os33.platform() === "win32" ? path88.win32 : path88.posix;
373382
+ const pathModule = os34.platform() === "win32" ? path88.win32 : path88.posix;
373128
373383
  return pathModule.join(
373129
373384
  systemRoot,
373130
373385
  "System32",
@@ -373387,7 +373642,7 @@ async function isDirectorySecure(dirPath) {
373387
373642
  if (!stats.isDirectory()) {
373388
373643
  return { secure: false, reason: "Not a directory" };
373389
373644
  }
373390
- if (os33.platform() === "win32") {
373645
+ if (os34.platform() === "win32") {
373391
373646
  try {
373392
373647
  const escapedPath = dirPath.replace(/'/g, "''");
373393
373648
  const script = buildWindowsAclScript([escapedPath]);
@@ -373437,7 +373692,7 @@ async function isDirectorySecure(dirPath) {
373437
373692
  }
373438
373693
  }
373439
373694
  function normalizeSecurityPath(targetPath) {
373440
- const isWin2 = os33.platform() === "win32";
373695
+ const isWin2 = os34.platform() === "win32";
373441
373696
  const pathModule = isWin2 ? path88.win32 : path88.posix;
373442
373697
  const stripped = isWin2 ? stripExtendedLengthPrefix(targetPath) : targetPath;
373443
373698
  let resolved = pathModule.resolve(stripped);
@@ -373474,7 +373729,7 @@ function isPathSecureSync(targetPath, expectedType, cache3) {
373474
373729
  if (cache3?.has(normalizedPath)) {
373475
373730
  return cache3.get(normalizedPath);
373476
373731
  }
373477
- if (os33.platform() === "win32") {
373732
+ if (os34.platform() === "win32") {
373478
373733
  const effectiveCache = cache3 ?? createPathSecurityCache(1);
373479
373734
  batchCheckWindowsPathsSync([normalizedPath], effectiveCache);
373480
373735
  const winResult = effectiveCache.get(normalizedPath);
@@ -373513,7 +373768,7 @@ function isPathSecureSync(targetPath, expectedType, cache3) {
373513
373768
  }
373514
373769
  }
373515
373770
  function isFileAndDirectorySecureSync(filePath, cache3) {
373516
- const isWin2 = os33.platform() === "win32";
373771
+ const isWin2 = os34.platform() === "win32";
373517
373772
  const pathModule = isWin2 ? path88.win32 : path88.posix;
373518
373773
  const normalizedFilePath = normalizeSecurityPath(filePath);
373519
373774
  try {
@@ -399569,122 +399824,6 @@ var ReadManyFilesTool = class _ReadManyFilesTool extends BaseDeclarativeTool {
399569
399824
  }
399570
399825
  };
399571
399826
 
399572
- // packages/core/src/utils/compatibility.ts
399573
- import os34 from "node:os";
399574
- function isWindows10() {
399575
- if (os34.platform() !== "win32") {
399576
- return false;
399577
- }
399578
- const release3 = os34.release();
399579
- const parts2 = release3.split(".");
399580
- if (parts2.length >= 3 && parts2[0] === "10" && parts2[1] === "0") {
399581
- const build = parseInt(parts2[2], 10);
399582
- return build < 22e3;
399583
- }
399584
- return false;
399585
- }
399586
- function isJetBrainsTerminal() {
399587
- const env2 = process.env;
399588
- return !!(env2["TERMINAL_EMULATOR"]?.startsWith("JetBrains") || env2["JETBRAINS_IDE"]);
399589
- }
399590
- function isTmux() {
399591
- return !!process.env["TMUX"];
399592
- }
399593
- function isGnuScreen() {
399594
- return !!process.env["STY"];
399595
- }
399596
- function isLowColorTmux() {
399597
- const term = process.env["TERM"] || "";
399598
- return isTmux() && term.startsWith("screen") && !process.env["COLORTERM"];
399599
- }
399600
- function isDumbTerminal() {
399601
- const term = process.env["TERM"] || "";
399602
- return term === "dumb" || term === "vt100";
399603
- }
399604
- function isAppleTerminal() {
399605
- return process.env["TERM_PROGRAM"] === "Apple_Terminal";
399606
- }
399607
- function supports256Colors() {
399608
- if (process.stdout.getColorDepth && process.stdout.getColorDepth() >= 8) {
399609
- return true;
399610
- }
399611
- const term = process.env["TERM"] || "";
399612
- if (term.includes("256color")) {
399613
- return true;
399614
- }
399615
- if (supportsTrueColor()) {
399616
- return true;
399617
- }
399618
- return false;
399619
- }
399620
- function supportsTrueColor() {
399621
- if (process.env["COLORTERM"] === "truecolor" || process.env["COLORTERM"] === "24bit" || process.env["COLORTERM"] === "kmscon") {
399622
- return true;
399623
- }
399624
- if (process.stdout.getColorDepth && process.stdout.getColorDepth() >= 24) {
399625
- return true;
399626
- }
399627
- return false;
399628
- }
399629
- var WarningPriority = /* @__PURE__ */ ((WarningPriority2) => {
399630
- WarningPriority2["Low"] = "low";
399631
- WarningPriority2["High"] = "high";
399632
- return WarningPriority2;
399633
- })(WarningPriority || {});
399634
- function getCompatibilityWarnings(options) {
399635
- const warnings = [];
399636
- if (isWindows10()) {
399637
- warnings.push({
399638
- id: "windows-10",
399639
- message: "Warning: Windows 10 detected. Some UI features like smooth scrolling may be degraded. Windows 11 is recommended for the best experience.",
399640
- priority: "high" /* High */
399641
- });
399642
- }
399643
- if (isJetBrainsTerminal() && options?.isAlternateBuffer) {
399644
- warnings.push({
399645
- id: "jetbrains-terminal",
399646
- message: 'Warning: JetBrains terminal detected \u2014 alternate buffer mode may cause scroll wheel issues and rendering artifacts. If you experience problems, disable it in /settings \u2192 "Use Alternate Screen Buffer".',
399647
- priority: "high" /* High */
399648
- });
399649
- }
399650
- if (isLowColorTmux()) {
399651
- warnings.push({
399652
- id: "low-color-tmux",
399653
- message: 'Warning: Limited color support detected (TERM=screen). Some visual elements may not render correctly. For better color support in tmux, add to ~/.tmux.conf:\n set -g default-terminal "tmux-256color"\n set -ga terminal-overrides ",*256col*:Tc"',
399654
- priority: "high" /* High */
399655
- });
399656
- }
399657
- if (isGnuScreen()) {
399658
- warnings.push({
399659
- id: "gnu-screen",
399660
- message: "Warning: GNU screen detected. Some keyboard shortcuts and visual features may behave unexpectedly. For the best experience, consider using tmux or running Gemini CLI directly in your terminal.",
399661
- priority: "low" /* Low */
399662
- });
399663
- }
399664
- if (isDumbTerminal()) {
399665
- const term = process.env["TERM"] || "dumb";
399666
- warnings.push({
399667
- id: "dumb-terminal",
399668
- message: `Warning: Basic terminal detected (TERM=${term}). Visual rendering will be limited. For the best experience, use a terminal emulator with truecolor support.`,
399669
- priority: "high" /* High */
399670
- });
399671
- }
399672
- if (!supports256Colors()) {
399673
- warnings.push({
399674
- id: "256-color",
399675
- message: "Warning: 256-color support not detected. Using a terminal with at least 256-color support is recommended for a better visual experience.",
399676
- priority: "high" /* High */
399677
- });
399678
- } else if (!supportsTrueColor() && !isAppleTerminal()) {
399679
- warnings.push({
399680
- id: "true-color",
399681
- message: "Warning: True color (24-bit) support not detected. Using a terminal with true color enabled will result in a better visual experience.",
399682
- priority: "low" /* Low */
399683
- });
399684
- }
399685
- return warnings;
399686
- }
399687
-
399688
399827
  // packages/core/src/services/worktreeService.ts
399689
399828
  import * as path114 from "node:path";
399690
399829
  import * as fs91 from "node:fs/promises";
@@ -407601,9 +407740,25 @@ export {
407601
407740
  FORCE_FILE_STORAGE_ENV_VAR,
407602
407741
  KeychainService,
407603
407742
  KeychainTokenStorage,
407743
+ isWindows10,
407744
+ isJetBrainsTerminal,
407745
+ isTmux,
407746
+ isGnuScreen,
407747
+ isLowColorTmux,
407748
+ isDumbTerminal,
407749
+ isAppleTerminal,
407750
+ supports256Colors,
407751
+ supportsTrueColor,
407752
+ WarningPriority,
407753
+ getCompatibilityWarnings,
407604
407754
  writeToStdout,
407605
407755
  writeToStderr,
407606
407756
  patchStdio,
407757
+ ENTER_SYNCHRONIZED_OUTPUT_SEQ,
407758
+ EXIT_SYNCHRONIZED_OUTPUT_SEQ,
407759
+ TMUX_ENTER_SYNCHRONIZED_OUTPUT_SEQ,
407760
+ TMUX_EXIT_SYNCHRONIZED_OUTPUT_SEQ,
407761
+ wrapWithSynchronizedOutput,
407607
407762
  createWorkingStdio,
407608
407763
  disableMouseTracking,
407609
407764
  enableMouseEvents,
@@ -407942,6 +408097,7 @@ export {
407942
408097
  isEditorAvailableAsync,
407943
408098
  resolveEditorAsync,
407944
408099
  getDiffCommand,
408100
+ quoteCmdArg,
407945
408101
  openDiff,
407946
408102
  GEMINI_CLI_COMPANION_EXTENSION_NAME,
407947
408103
  IDE_MAX_OPEN_FILES,
@@ -408442,17 +408598,6 @@ export {
408442
408598
  LegacyAgentProtocol,
408443
408599
  LegacyAgentSession,
408444
408600
  ReadManyFilesTool,
408445
- isWindows10,
408446
- isJetBrainsTerminal,
408447
- isTmux,
408448
- isGnuScreen,
408449
- isLowColorTmux,
408450
- isDumbTerminal,
408451
- isAppleTerminal,
408452
- supports256Colors,
408453
- supportsTrueColor,
408454
- WarningPriority,
408455
- getCompatibilityWarnings,
408456
408601
  execa,
408457
408602
  execaSync,
408458
408603
  WorktreeService,