@google/gemini-cli 0.65.0-preview.0 → 0.66.0-nightly.20261016.gdebf42324

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 (70) hide show
  1. package/bundle/{chunk-K7AA35SP.js → chunk-3VVLSLUB.js} +365 -230
  2. package/bundle/{chunk-K7NOVQ6G.js → chunk-4ORY5VV4.js} +376 -231
  3. package/bundle/{chunk-TP236FKO.js → chunk-4ZQK6FPV.js} +8243 -15166
  4. package/bundle/{chunk-VF5WQSOE.js → chunk-5U5H7MQT.js} +1 -1
  5. package/bundle/{chunk-H2CZXS7F.js → chunk-6CPZZAS6.js} +1 -1
  6. package/bundle/{chunk-2WVLIJA5.js → chunk-6ZNK3R6S.js} +145 -77
  7. package/bundle/{chunk-NL7ZHGCH.js → chunk-7WET2X2L.js} +1 -1
  8. package/bundle/{chunk-WTRK3NVX.js → chunk-ARZHETF7.js} +58 -27
  9. package/bundle/{chunk-HLOOE7YN.js → chunk-C6OZRRSW.js} +9 -8
  10. package/bundle/{chunk-LLE5Z636.js → chunk-CAK3GIEX.js} +58 -27
  11. package/bundle/{chunk-F6AJM4WN.js → chunk-DZK3RTN5.js} +3 -3
  12. package/bundle/{chunk-BFIV7GTA.js → chunk-EAJQUKYV.js} +2 -2
  13. package/bundle/{chunk-SN7QZKXC.js → chunk-EDXPBFMP.js} +122 -78
  14. package/bundle/{chunk-43EXRO7A.js → chunk-FMKAMURR.js} +145 -77
  15. package/bundle/{chunk-RPHDSDL6.js → chunk-GYABHSAN.js} +1 -1
  16. package/bundle/chunk-HZ3ULZA5.js +512 -0
  17. package/bundle/{chunk-V72FRESD.js → chunk-IPP4LAIJ.js} +2 -2
  18. package/bundle/{chunk-S7BCRBI4.js → chunk-L2JWNZ5I.js} +1 -1
  19. package/bundle/{chunk-4DCA4L53.js → chunk-LE7CRIQW.js} +2 -2
  20. package/bundle/{chunk-K4G5D5ZZ.js → chunk-NTMOGT2U.js} +1 -1
  21. package/bundle/{chunk-QJK54DSE.js → chunk-O7DL5A6M.js} +1 -1
  22. package/bundle/chunk-OUQNYX72.js +425 -0
  23. package/bundle/{chunk-GSQEBEGC.js → chunk-OWNTY4ZJ.js} +3 -3
  24. package/bundle/chunk-RATJW3IC.js +103284 -0
  25. package/bundle/{chunk-WGL5FJOS.js → chunk-RHS7LQYQ.js} +3 -3
  26. package/bundle/{chunk-V2R74WAG.js → chunk-T526OHX2.js} +151 -81
  27. package/bundle/chunk-TM5LN2M4.js +118 -0
  28. package/bundle/{chunk-4JGVVJGK.js → chunk-W4TOIVW2.js} +1 -1
  29. package/bundle/chunk-WWLKAUPJ.js +1571 -0
  30. package/bundle/chunk-XMMD2D57.js +154 -0
  31. package/bundle/chunk-XTRL4LHU.js +402181 -0
  32. package/bundle/chunk-YDKHD3KR.js +17603 -0
  33. package/bundle/{cleanup-HPADDONA.js → cleanup-D64VZM4F.js} +2 -2
  34. package/bundle/{cleanup-JOMSXKMP.js → cleanup-KQSUSZVK.js} +2 -2
  35. package/bundle/{cleanup-LYRJHMMO.js → cleanup-NFDCMZNM.js} +2 -2
  36. package/bundle/cleanup-PMQAGUR6.js +32 -0
  37. package/bundle/{core-NCJTYARO.js → core-AQSWLJFK.js} +13 -1
  38. package/bundle/{devtoolsService-HIZA3JGR.js → devtoolsService-4FKRWPRR.js} +2 -2
  39. package/bundle/{devtoolsService-WP2OPVPB.js → devtoolsService-HIMQQKQU.js} +2 -2
  40. package/bundle/{devtoolsService-JFJBTZ4B.js → devtoolsService-HNNM7RMB.js} +4 -3
  41. package/bundle/devtoolsService-ZFRR4BWT.js +4359 -0
  42. package/bundle/{dist-GQKLLBDW.js → dist-5ASSTNQ6.js} +13 -1
  43. package/bundle/{core-IVQAI4S6.js → dist-BLHNJM7E.js} +13 -1
  44. package/bundle/dist-KGTOLDFD.js +2280 -0
  45. package/bundle/docs/changelogs/index.md +22 -0
  46. package/bundle/docs/changelogs/latest.md +64 -54
  47. package/bundle/docs/changelogs/preview.md +91 -55
  48. package/bundle/docs/reference/configuration.md +8 -3
  49. package/bundle/{gemini-7CHJYSHM.js → gemini-5A6XE5MS.js} +14 -14
  50. package/bundle/{gemini-5TUKZVGS.js → gemini-6AUGEYTK.js} +14 -14
  51. package/bundle/{gemini-546WMAHG.js → gemini-CONRUIWA.js} +214 -198
  52. package/bundle/gemini-NNDIP5FI.js +17951 -0
  53. package/bundle/gemini.js +7 -7
  54. package/bundle/{interactiveCli-5XIAIY74.js → interactiveCli-4ASTHC7A.js} +1370 -1279
  55. package/bundle/{interactiveCli-L4PK7YY3.js → interactiveCli-A4AHHCYK.js} +1060 -988
  56. package/bundle/interactiveCli-BYRGNC52.js +35601 -0
  57. package/bundle/{interactiveCli-E3PUPYMZ.js → interactiveCli-DVYUBC7X.js} +1060 -988
  58. package/bundle/{liteRtServerManager-JCTYJBV5.js → liteRtServerManager-4YCGFHXM.js} +4 -4
  59. package/bundle/{liteRtServerManager-JERG6KYC.js → liteRtServerManager-B5VXJYB6.js} +4 -4
  60. package/bundle/{liteRtServerManager-22ISMNN2.js → liteRtServerManager-O5MQ7YAM.js} +4 -4
  61. package/bundle/liteRtServerManager-XTK5NKOU.js +65 -0
  62. package/bundle/{oauth2-provider-MKWWBW4K.js → oauth2-provider-DGDIJBPB.js} +1 -1
  63. package/bundle/{oauth2-provider-XRUER2XR.js → oauth2-provider-FL4LAMOD.js} +1 -1
  64. package/bundle/{oauth2-provider-477UJQX6.js → oauth2-provider-LJCH3JL4.js} +41 -79
  65. package/bundle/oauth2-provider-XMOANRFY.js +273 -0
  66. package/bundle/{start-MVIPJNQ5.js → start-EK5VVD43.js} +6 -6
  67. package/bundle/{start-RZWSVT55.js → start-EZBPBQGC.js} +6 -6
  68. package/bundle/{start-AGMBPY3O.js → start-TTVQ72ZW.js} +6 -6
  69. package/bundle/start-ZK46NOA3.js +18 -0
  70. package/package.json +1 -1
@@ -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 {
@@ -272838,7 +272838,7 @@ function getApiKeyFromEnv() {
272838
272838
  // packages/core/dist/src/core/contentGenerator.js
272839
272839
  init_http_proxy_agent();
272840
272840
  init_https_proxy_agent();
272841
- import * as os27 from "node:os";
272841
+ import * as os28 from "node:os";
272842
272842
 
272843
272843
  // packages/core/dist/src/code_assist/oauth2.js
272844
272844
  var import_google_auth_library3 = __toESM(require_src10(), 1);
@@ -279087,6 +279087,122 @@ var OAuthCredentialStorage = class {
279087
279087
  var DEFAULT_SERVICE_NAME = "gemini-cli-oauth";
279088
279088
  var FORCE_ENCRYPTED_FILE_ENV_VAR = "GEMINI_FORCE_ENCRYPTED_FILE_STORAGE";
279089
279089
 
279090
+ // packages/core/dist/src/utils/compatibility.js
279091
+ import os17 from "node:os";
279092
+ function isWindows10() {
279093
+ if (os17.platform() !== "win32") {
279094
+ return false;
279095
+ }
279096
+ const release3 = os17.release();
279097
+ const parts2 = release3.split(".");
279098
+ if (parts2.length >= 3 && parts2[0] === "10" && parts2[1] === "0") {
279099
+ const build = parseInt(parts2[2], 10);
279100
+ return build < 22e3;
279101
+ }
279102
+ return false;
279103
+ }
279104
+ function isJetBrainsTerminal() {
279105
+ const env2 = process.env;
279106
+ return !!(env2["TERMINAL_EMULATOR"]?.startsWith("JetBrains") || env2["JETBRAINS_IDE"]);
279107
+ }
279108
+ function isTmux() {
279109
+ return !!process.env["TMUX"];
279110
+ }
279111
+ function isGnuScreen() {
279112
+ return !!process.env["STY"];
279113
+ }
279114
+ function isLowColorTmux() {
279115
+ const term = process.env["TERM"] || "";
279116
+ return isTmux() && term.startsWith("screen") && !process.env["COLORTERM"];
279117
+ }
279118
+ function isDumbTerminal() {
279119
+ const term = process.env["TERM"] || "";
279120
+ return term === "dumb" || term === "vt100";
279121
+ }
279122
+ function isAppleTerminal() {
279123
+ return process.env["TERM_PROGRAM"] === "Apple_Terminal";
279124
+ }
279125
+ function supports256Colors() {
279126
+ if (process.stdout.getColorDepth && process.stdout.getColorDepth() >= 8) {
279127
+ return true;
279128
+ }
279129
+ const term = process.env["TERM"] || "";
279130
+ if (term.includes("256color")) {
279131
+ return true;
279132
+ }
279133
+ if (supportsTrueColor()) {
279134
+ return true;
279135
+ }
279136
+ return false;
279137
+ }
279138
+ function supportsTrueColor() {
279139
+ if (process.env["COLORTERM"] === "truecolor" || process.env["COLORTERM"] === "24bit" || process.env["COLORTERM"] === "kmscon") {
279140
+ return true;
279141
+ }
279142
+ if (process.stdout.getColorDepth && process.stdout.getColorDepth() >= 24) {
279143
+ return true;
279144
+ }
279145
+ return false;
279146
+ }
279147
+ var WarningPriority;
279148
+ (function(WarningPriority2) {
279149
+ WarningPriority2["Low"] = "low";
279150
+ WarningPriority2["High"] = "high";
279151
+ })(WarningPriority || (WarningPriority = {}));
279152
+ function getCompatibilityWarnings(options) {
279153
+ const warnings = [];
279154
+ if (isWindows10()) {
279155
+ warnings.push({
279156
+ id: "windows-10",
279157
+ message: "Warning: Windows 10 detected. Some UI features like smooth scrolling may be degraded. Windows 11 is recommended for the best experience.",
279158
+ priority: WarningPriority.High
279159
+ });
279160
+ }
279161
+ if (isJetBrainsTerminal() && options?.isAlternateBuffer) {
279162
+ warnings.push({
279163
+ id: "jetbrains-terminal",
279164
+ 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".',
279165
+ priority: WarningPriority.High
279166
+ });
279167
+ }
279168
+ if (isLowColorTmux()) {
279169
+ warnings.push({
279170
+ id: "low-color-tmux",
279171
+ 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"',
279172
+ priority: WarningPriority.High
279173
+ });
279174
+ }
279175
+ if (isGnuScreen()) {
279176
+ warnings.push({
279177
+ id: "gnu-screen",
279178
+ 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.",
279179
+ priority: WarningPriority.Low
279180
+ });
279181
+ }
279182
+ if (isDumbTerminal()) {
279183
+ const term = process.env["TERM"] || "dumb";
279184
+ warnings.push({
279185
+ id: "dumb-terminal",
279186
+ message: `Warning: Basic terminal detected (TERM=${term}). Visual rendering will be limited. For the best experience, use a terminal emulator with truecolor support.`,
279187
+ priority: WarningPriority.High
279188
+ });
279189
+ }
279190
+ if (!supports256Colors()) {
279191
+ warnings.push({
279192
+ id: "256-color",
279193
+ message: "Warning: 256-color support not detected. Using a terminal with at least 256-color support is recommended for a better visual experience.",
279194
+ priority: WarningPriority.High
279195
+ });
279196
+ } else if (!supportsTrueColor() && !isAppleTerminal()) {
279197
+ warnings.push({
279198
+ id: "true-color",
279199
+ message: "Warning: True color (24-bit) support not detected. Using a terminal with true color enabled will result in a better visual experience.",
279200
+ priority: WarningPriority.Low
279201
+ });
279202
+ }
279203
+ return warnings;
279204
+ }
279205
+
279090
279206
  // packages/core/dist/src/utils/stdio.js
279091
279207
  var originalStdoutWrite = process.stdout.write.bind(process.stdout);
279092
279208
  var originalStderrWrite = process.stderr.write.bind(process.stderr);
@@ -279127,12 +279243,46 @@ function isKey(key, obj) {
279127
279243
  }
279128
279244
  var INK_CURSOR_POSITION_END_REGEX = (
279129
279245
  // eslint-disable-next-line no-control-regex
279130
- /\x1b\[(?:\d+G|\d+;\d+H|D)(\x1b\[\?2026l)?$/
279246
+ /\x1b\[(?:\d+G|\d+;\d+H|D)(\x1b\[\?2026l|\x1bP=2s\x1b\\)?$/
279131
279247
  );
279132
279248
  var SHOW_CURSOR_SEQ = "\x1B[?25h";
279133
279249
  var HIDE_CURSOR_SEQ = "\x1B[?25l";
279250
+ var ENTER_SYNCHRONIZED_OUTPUT_SEQ = "\x1B[?2026h";
279134
279251
  var EXIT_SYNCHRONIZED_OUTPUT_SEQ = "\x1B[?2026l";
279135
- function createWorkingStdio() {
279252
+ var TMUX_ENTER_SYNCHRONIZED_OUTPUT_SEQ = "\x1BP=1s\x1B\\";
279253
+ var TMUX_EXIT_SYNCHRONIZED_OUTPUT_SEQ = "\x1BP=2s\x1B\\";
279254
+ var STANDALONE_MODE_SEQUENCES = /* @__PURE__ */ new Set([
279255
+ SHOW_CURSOR_SEQ,
279256
+ HIDE_CURSOR_SEQ,
279257
+ "\x1B[?7l",
279258
+ "\x1B[?7h",
279259
+ "\x1B[?1004h",
279260
+ "\x1B[?1004l",
279261
+ "\x1B[?1049h",
279262
+ "\x1B[?1049l"
279263
+ ]);
279264
+ function wrapWithSynchronizedOutput(chunk) {
279265
+ if (!chunk || STANDALONE_MODE_SEQUENCES.has(chunk) || chunk.startsWith("\x1B]") && (chunk.endsWith("\x07") || chunk.endsWith("\x1B\\"))) {
279266
+ return chunk;
279267
+ }
279268
+ if (isDumbTerminal()) {
279269
+ return chunk;
279270
+ }
279271
+ const inTmux = isTmux();
279272
+ const syncStart = inTmux ? TMUX_ENTER_SYNCHRONIZED_OUTPUT_SEQ : ENTER_SYNCHRONIZED_OUTPUT_SEQ;
279273
+ const syncEnd = inTmux ? TMUX_EXIT_SYNCHRONIZED_OUTPUT_SEQ : EXIT_SYNCHRONIZED_OUTPUT_SEQ;
279274
+ if (chunk.startsWith(syncStart) && chunk.endsWith(syncEnd)) {
279275
+ return chunk;
279276
+ }
279277
+ let inner = chunk;
279278
+ if (inner.startsWith(ENTER_SYNCHRONIZED_OUTPUT_SEQ) && inner.endsWith(EXIT_SYNCHRONIZED_OUTPUT_SEQ)) {
279279
+ inner = inner.slice(ENTER_SYNCHRONIZED_OUTPUT_SEQ.length, -EXIT_SYNCHRONIZED_OUTPUT_SEQ.length);
279280
+ } else if (inner.startsWith(TMUX_ENTER_SYNCHRONIZED_OUTPUT_SEQ) && inner.endsWith(TMUX_EXIT_SYNCHRONIZED_OUTPUT_SEQ)) {
279281
+ inner = inner.slice(TMUX_ENTER_SYNCHRONIZED_OUTPUT_SEQ.length, -TMUX_EXIT_SYNCHRONIZED_OUTPUT_SEQ.length);
279282
+ }
279283
+ return `${syncStart}${inner}${syncEnd}`;
279284
+ }
279285
+ function createWorkingStdio(options) {
279136
279286
  let cursorShownForIme = false;
279137
279287
  const workingStdoutWrite = (...args2) => {
279138
279288
  const [chunk] = args2;
@@ -279147,12 +279297,18 @@ function createWorkingStdio() {
279147
279297
  } else if (cursorShownForIme) {
279148
279298
  if (chunk.endsWith(EXIT_SYNCHRONIZED_OUTPUT_SEQ)) {
279149
279299
  args2[0] = `${chunk.slice(0, -EXIT_SYNCHRONIZED_OUTPUT_SEQ.length)}${HIDE_CURSOR_SEQ}${EXIT_SYNCHRONIZED_OUTPUT_SEQ}`;
279300
+ } else if (chunk.endsWith(TMUX_EXIT_SYNCHRONIZED_OUTPUT_SEQ)) {
279301
+ args2[0] = `${chunk.slice(0, -TMUX_EXIT_SYNCHRONIZED_OUTPUT_SEQ.length)}${HIDE_CURSOR_SEQ}${TMUX_EXIT_SYNCHRONIZED_OUTPUT_SEQ}`;
279150
279302
  } else {
279151
279303
  args2[0] = `${chunk}${HIDE_CURSOR_SEQ}`;
279152
279304
  }
279153
279305
  cursorShownForIme = false;
279154
279306
  }
279155
279307
  }
279308
+ const currentChunk = args2[0];
279309
+ if (options?.synchronizedOutput && typeof currentChunk === "string") {
279310
+ args2[0] = wrapWithSynchronizedOutput(currentChunk);
279311
+ }
279156
279312
  return writeToStdout(...args2);
279157
279313
  };
279158
279314
  const stdoutHandler = {
@@ -280378,7 +280534,7 @@ var import_instrumentation_http = __toESM(require_src40(), 1);
280378
280534
  var import_systeminformation = __toESM(require_lib2(), 1);
280379
280535
  init_https_proxy_agent();
280380
280536
  import { createHash as createHash3 } from "node:crypto";
280381
- import * as os18 from "node:os";
280537
+ import * as os19 from "node:os";
280382
280538
 
280383
280539
  // packages/core/dist/src/telemetry/clearcut-logger/event-metadata-key.js
280384
280540
  var EventMetadataKey;
@@ -280675,7 +280831,7 @@ var READ_MCP_RESOURCE_TOOL_NAME = "read_mcp_resource";
280675
280831
  var LIST_MCP_RESOURCES_TOOL_NAME = "list_mcp_resources";
280676
280832
 
280677
280833
  // packages/core/dist/src/tools/definitions/dynamic-declaration-helpers.js
280678
- import * as os17 from "node:os";
280834
+ import * as os18 from "node:os";
280679
280835
 
280680
280836
  // node_modules/zod-to-json-schema/dist/esm/Options.js
280681
280837
  var ignoreOverride = Symbol("Let zodToJsonSchema decide on which parser to use");
@@ -281978,7 +282134,7 @@ function getShellToolDescription(enableInteractiveShell, enableEfficiency) {
281978
282134
  Signal: Only included if process was terminated by a signal.
281979
282135
  Background PIDs: Only included if background processes were started.
281980
282136
  Process Group PGID: Only included if available.`;
281981
- if (os17.platform() === "win32") {
282137
+ if (os18.platform() === "win32") {
281982
282138
  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`.";
281983
282139
  return `This tool executes a given shell command as \`powershell.exe -NoProfile -Command <command>\`. ${backgroundInstructions}${efficiencyGuidelines}${returnedInfo}`;
281984
282140
  } else {
@@ -281987,7 +282143,7 @@ function getShellToolDescription(enableInteractiveShell, enableEfficiency) {
281987
282143
  }
281988
282144
  }
281989
282145
  function getCommandDescription() {
281990
- if (os17.platform() === "win32") {
282146
+ if (os18.platform() === "win32") {
281991
282147
  return "Exact command to execute as `powershell.exe -NoProfile -Command <command>`";
281992
282148
  }
281993
282149
  return "Exact bash command to execute as `bash -c <command>`";
@@ -283530,8 +283686,8 @@ function isValidToolName(name3, options = {}) {
283530
283686
  }
283531
283687
 
283532
283688
  // packages/core/dist/src/generated/git-commit.js
283533
- var GIT_COMMIT_INFO = "204db94ae";
283534
- var CLI_VERSION = "0.65.0-preview.0";
283689
+ var GIT_COMMIT_INFO = "debf42324";
283690
+ var CLI_VERSION = "0.66.0-nightly.20261013.g204db94ae";
283535
283691
 
283536
283692
  // packages/core/dist/src/ide/detect-ide.js
283537
283693
  var IDE_DEFINITIONS = {
@@ -284102,7 +284258,7 @@ var ClearcutLogger = class _ClearcutLogger {
284102
284258
  value: event.worktree_active.toString()
284103
284259
  }
284104
284260
  ];
284105
- const cpus2 = os18.cpus();
284261
+ const cpus2 = os19.cpus();
284106
284262
  if (cpus2 && cpus2.length > 0) {
284107
284263
  data.push({
284108
284264
  gemini_cli_key: EventMetadataKey.GEMINI_CLI_CPU_INFO,
@@ -284111,10 +284267,10 @@ var ClearcutLogger = class _ClearcutLogger {
284111
284267
  }
284112
284268
  data.push({
284113
284269
  gemini_cli_key: EventMetadataKey.GEMINI_CLI_CPU_CORES,
284114
- value: os18.availableParallelism().toString()
284270
+ value: os19.availableParallelism().toString()
284115
284271
  }, {
284116
284272
  gemini_cli_key: EventMetadataKey.GEMINI_CLI_RAM_TOTAL_GB,
284117
- value: (os18.totalmem() / 1024 ** 3).toFixed(2).toString()
284273
+ value: (os19.totalmem() / 1024 ** 3).toFixed(2).toString()
284118
284274
  });
284119
284275
  const gpuInfo = await getGpuInfo();
284120
284276
  data.push({
@@ -288281,12 +288437,12 @@ var RateLimiter = class _RateLimiter {
288281
288437
  import v8 from "node:v8";
288282
288438
  import path30 from "node:path";
288283
288439
  import fs33 from "node:fs";
288284
- import os19 from "node:os";
288440
+ import os20 from "node:os";
288285
288441
  function captureHeapSnapshot() {
288286
288442
  try {
288287
288443
  const timestamp2 = Date.now();
288288
288444
  const filename = `gemini-heap-${timestamp2}.heapsnapshot`;
288289
- const snapshotsDir = fs33.mkdtempSync(path30.join(os19.tmpdir(), "gemini-heap-"));
288445
+ const snapshotsDir = fs33.mkdtempSync(path30.join(os20.tmpdir(), "gemini-heap-"));
288290
288446
  const filePath = path30.join(snapshotsDir, filename);
288291
288447
  v8.writeHeapSnapshot(filePath);
288292
288448
  return filePath;
@@ -288990,7 +289146,7 @@ function getErrorMessage2(e2) {
288990
289146
 
288991
289147
  // packages/core/dist/src/telemetry/startupProfiler.js
288992
289148
  import { performance as performance2 } from "node:perf_hooks";
288993
- import * as os20 from "node:os";
289149
+ import * as os21 from "node:os";
288994
289150
  import * as fs34 from "node:fs";
288995
289151
  var StartupProfiler = class _StartupProfiler {
288996
289152
  phases = /* @__PURE__ */ new Map();
@@ -289077,9 +289233,9 @@ var StartupProfiler = class _StartupProfiler {
289077
289233
  flush(config2) {
289078
289234
  debugLogger.debug("[STARTUP] StartupProfiler.flush() called with", this.phases.size, "phases");
289079
289235
  const commonDetails = {
289080
- os_platform: os20.platform(),
289081
- os_arch: os20.arch(),
289082
- os_release: os20.release(),
289236
+ os_platform: os21.platform(),
289237
+ os_arch: os21.arch(),
289238
+ os_release: os21.release(),
289083
289239
  is_docker: fs34.existsSync("/.dockerenv")
289084
289240
  };
289085
289241
  const measures = performance2.getEntriesByType("measure");
@@ -289122,7 +289278,7 @@ var StartupProfiler = class _StartupProfiler {
289122
289278
  }
289123
289279
  }
289124
289280
  if (startupPhases.length > 0) {
289125
- logStartupStats(config2, new StartupStatsEvent(startupPhases, os20.platform(), os20.release(), fs34.existsSync("/.dockerenv")));
289281
+ logStartupStats(config2, new StartupStatsEvent(startupPhases, os21.platform(), os21.release(), fs34.existsSync("/.dockerenv")));
289126
289282
  }
289127
289283
  for (const phaseName of this.phases.keys()) {
289128
289284
  const startMarkName = this.getStartMarkName(phaseName);
@@ -290560,7 +290716,7 @@ function getLanguageFromFilePath(filePath) {
290560
290716
  // packages/core/dist/src/tools/edit.js
290561
290717
  import * as fsPromises4 from "node:fs/promises";
290562
290718
  import * as path43 from "node:path";
290563
- import * as os25 from "node:os";
290719
+ import * as os26 from "node:os";
290564
290720
  import * as crypto15 from "node:crypto";
290565
290721
 
290566
290722
  // node_modules/diff/libesm/diff/base.js
@@ -291897,6 +292053,31 @@ function getDiffCommand(oldPath, newPath, editor) {
291897
292053
  return null;
291898
292054
  }
291899
292055
  }
292056
+ function quoteCmdArg(arg) {
292057
+ if (/[\r\n\0]/.test(arg)) {
292058
+ throw new Error("Invalid argument: newlines are not allowed");
292059
+ }
292060
+ if (arg.includes('"')) {
292061
+ throw new Error("Invalid argument: double quotes are not allowed on Windows");
292062
+ }
292063
+ if (!arg) {
292064
+ return '""';
292065
+ }
292066
+ if (/^[a-zA-Z0-9\-_.:/\\]+$/.test(arg)) {
292067
+ return arg;
292068
+ }
292069
+ let result2 = '"' + arg;
292070
+ let backslashCount = 0;
292071
+ for (let i3 = arg.length - 1; i3 >= 0; i3--) {
292072
+ if (arg[i3] === "\\") {
292073
+ backslashCount++;
292074
+ } else {
292075
+ break;
292076
+ }
292077
+ }
292078
+ result2 += "\\".repeat(backslashCount) + '"';
292079
+ return result2;
292080
+ }
291900
292081
  async function openDiff(oldPath, newPath, editor) {
291901
292082
  if (isHeadlessMode()) {
291902
292083
  debugLogger.warn("External editor spawning is disabled in headless/server mode.");
@@ -291927,10 +292108,19 @@ async function openDiff(oldPath, newPath, editor) {
291927
292108
  return;
291928
292109
  }
291929
292110
  return new Promise((resolve29, reject) => {
291930
- const childProcess2 = spawn2(diffCommand.command, diffCommand.args, {
291931
- stdio: "inherit",
291932
- shell: process.platform === "win32"
291933
- });
292111
+ const isWindows3 = process.platform === "win32";
292112
+ let childProcess2;
292113
+ try {
292114
+ const spawnArgs = isWindows3 ? diffCommand.args.map(quoteCmdArg) : diffCommand.args;
292115
+ childProcess2 = spawn2(diffCommand.command, spawnArgs, {
292116
+ stdio: "inherit",
292117
+ shell: isWindows3
292118
+ });
292119
+ } catch (error40) {
292120
+ coreEvents.emit(CoreEvent.ExternalEditorClosed);
292121
+ reject(error40);
292122
+ return;
292123
+ }
291934
292124
  let isSettled = false;
291935
292125
  childProcess2.on("close", (code) => {
291936
292126
  if (isSettled)
@@ -291953,14 +292143,14 @@ async function openDiff(oldPath, newPath, editor) {
291953
292143
  }
291954
292144
 
291955
292145
  // packages/core/dist/src/tools/modifiable-tool.js
291956
- import os21 from "node:os";
292146
+ import os22 from "node:os";
291957
292147
  import path34 from "node:path";
291958
292148
  import fs36 from "node:fs";
291959
292149
  function isModifiableDeclarativeTool(tool) {
291960
292150
  return "getModifyContext" in tool;
291961
292151
  }
291962
292152
  function createTempFilesForModify(currentContent, proposedContent, file_path) {
291963
- const diffDir = fs36.mkdtempSync(path34.join(os21.tmpdir(), "gemini-cli-tool-modify-"));
292153
+ const diffDir = fs36.mkdtempSync(path34.join(os22.tmpdir(), "gemini-cli-tool-modify-"));
291964
292154
  try {
291965
292155
  fs36.chmodSync(diffDir, 448);
291966
292156
  } catch (e2) {
@@ -292231,7 +292421,7 @@ var CloseDiffRequestSchema = external_exports.object({
292231
292421
  // packages/core/dist/src/ide/process-utils.js
292232
292422
  import { exec as exec2 } from "node:child_process";
292233
292423
  import { promisify as promisify6 } from "node:util";
292234
- import os22 from "node:os";
292424
+ import os23 from "node:os";
292235
292425
  import path35 from "node:path";
292236
292426
  var execAsync2 = promisify6(exec2);
292237
292427
  var MAX_TRAVERSAL_DEPTH = 32;
@@ -292348,7 +292538,7 @@ async function getIdeProcessInfoForWindows() {
292348
292538
  return { pid: myPid, command: myProc.command };
292349
292539
  }
292350
292540
  async function getIdeProcessInfo() {
292351
- const platform12 = os22.platform();
292541
+ const platform12 = os23.platform();
292352
292542
  if (process.env["GEMINI_CLI_IDE_PID"]) {
292353
292543
  const idePid = parseInt(process.env["GEMINI_CLI_IDE_PID"], 10);
292354
292544
  if (!isNaN(idePid) && idePid > 0) {
@@ -307144,7 +307334,7 @@ function isElectron() {
307144
307334
  var import_undici = __toESM(require_undici(), 1);
307145
307335
  import * as fs37 from "node:fs";
307146
307336
  import * as path36 from "node:path";
307147
- import * as os23 from "node:os";
307337
+ import * as os24 from "node:os";
307148
307338
  var logger2 = {
307149
307339
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
307150
307340
  debug: (...args2) => debugLogger.debug("[DEBUG] [IDEConnectionUtils]", ...args2),
@@ -307223,7 +307413,7 @@ async function verifyAndReadFile(filePath) {
307223
307413
  }
307224
307414
  async function getConnectionConfigFromFile(pid) {
307225
307415
  try {
307226
- const portFile = path36.join(os23.tmpdir(), "gemini", "ide", `gemini-ide-server-${pid}.json`);
307416
+ const portFile = path36.join(os24.tmpdir(), "gemini", "ide", `gemini-ide-server-${pid}.json`);
307227
307417
  const portFileContents = await verifyAndReadFile(portFile);
307228
307418
  if (!portFileContents) {
307229
307419
  throw new Error("Verification failed or file not found");
@@ -307236,7 +307426,7 @@ async function getConnectionConfigFromFile(pid) {
307236
307426
  throw new Error("Invalid connection config format");
307237
307427
  } catch {
307238
307428
  }
307239
- const portFileDir = path36.join(os23.tmpdir(), "gemini", "ide");
307429
+ const portFileDir = path36.join(os24.tmpdir(), "gemini", "ide");
307240
307430
  let portFiles;
307241
307431
  try {
307242
307432
  portFiles = await fs37.promises.readdir(portFileDir);
@@ -307346,7 +307536,7 @@ function isPidAlive(pid) {
307346
307536
  if (pid <= 0) {
307347
307537
  return false;
307348
307538
  }
307349
- if (os23.platform() === "win32") {
307539
+ if (os24.platform() === "win32") {
307350
307540
  return true;
307351
307541
  }
307352
307542
  try {
@@ -307618,7 +307808,7 @@ function getVersion() {
307618
307808
  }
307619
307809
  versionPromise = (async () => {
307620
307810
  const pkgJson = await getPackageJson(__dirname4);
307621
- return "0.65.0-preview.0";
307811
+ return "0.66.0-nightly.20261013.g204db94ae";
307622
307812
  })();
307623
307813
  return versionPromise;
307624
307814
  }
@@ -308825,9 +309015,9 @@ async function processIntent(config2, intent, fallbackModel, failedModel) {
308825
309015
 
308826
309016
  // packages/core/dist/src/utils/errorReporting.js
308827
309017
  import fs38 from "node:fs/promises";
308828
- import os24 from "node:os";
309018
+ import os25 from "node:os";
308829
309019
  import path41 from "node:path";
308830
- async function reportError(error40, baseMessage, context2, type2 = "general", reportingDir = os24.tmpdir()) {
309020
+ async function reportError(error40, baseMessage, context2, type2 = "general", reportingDir = os25.tmpdir()) {
308831
309021
  const timestamp2 = (/* @__PURE__ */ new Date()).toISOString().replace(/[:.]/g, "-");
308832
309022
  const reportFileName = `gemini-client-error-${type2}-${timestamp2}.json`;
308833
309023
  const reportPath = path41.join(reportingDir, reportFileName);
@@ -310667,7 +310857,7 @@ var EditToolInvocation = class extends BaseToolInvocation {
310667
310857
  try {
310668
310858
  await this.ensureParentDirectoriesExistAsync(this.resolvedPath);
310669
310859
  let finalContent = editData.newContent;
310670
- const useCRLF = !editData.isNewFile && editData.originalLineEnding === "\r\n" || editData.isNewFile && os25.EOL === "\r\n";
310860
+ const useCRLF = !editData.isNewFile && editData.originalLineEnding === "\r\n" || editData.isNewFile && os26.EOL === "\r\n";
310671
310861
  if (useCRLF) {
310672
310862
  finalContent = finalContent.replace(/\r?\n/g, "\r\n");
310673
310863
  }
@@ -311029,7 +311219,7 @@ async function calculateFuzzyReplacement(config2, context2) {
311029
311219
  import fs39 from "node:fs";
311030
311220
  import fsPromises5 from "node:fs/promises";
311031
311221
  import path44 from "node:path";
311032
- import os26 from "node:os";
311222
+ import os27 from "node:os";
311033
311223
 
311034
311224
  // packages/core/dist/src/utils/editCorrector.js
311035
311225
  var CODE_CORRECTION_SYSTEM_PROMPT = `
@@ -311375,7 +311565,7 @@ var WriteFileToolInvocation = class extends BaseToolInvocation {
311375
311565
  await fsPromises5.mkdir(dirName, { recursive: true });
311376
311566
  }
311377
311567
  let finalContent = fileContent;
311378
- const useCRLF = !isNewFile && originalContent ? detectLineEnding(originalContent) === "\r\n" : os26.EOL === "\r\n";
311568
+ const useCRLF = !isNewFile && originalContent ? detectLineEnding(originalContent) === "\r\n" : os27.EOL === "\r\n";
311379
311569
  if (useCRLF) {
311380
311570
  finalContent = finalContent.replace(/\r?\n/g, "\r\n");
311381
311571
  }
@@ -313165,7 +313355,7 @@ async function createContentGenerator(config2, gcConfig, sessionId) {
313165
313355
  linux: "Linux"
313166
313356
  };
313167
313357
  const osType2 = osTypeMap[process.platform] || process.platform;
313168
- const osVersion = os27.release();
313358
+ const osVersion = os28.release();
313169
313359
  const arch3 = process.arch;
313170
313360
  const vscodeVersion = process.env["TERM_PROGRAM_VERSION"] || "unknown";
313171
313361
  let hostPath = `VSCode/${vscodeVersion}`;
@@ -314533,9 +314723,33 @@ function getSafeGitEnv(baseEnv = process.env) {
314533
314723
  cleanedEnv[key] = value;
314534
314724
  }
314535
314725
  }
314726
+ let baseSshCommand = cleanedEnv["GIT_SSH_COMMAND"];
314727
+ if (!baseSshCommand && cleanedEnv["GIT_SSH"]) {
314728
+ const gitSsh = cleanedEnv["GIT_SSH"];
314729
+ baseSshCommand = gitSsh.includes(" ") && !gitSsh.startsWith('"') && !gitSsh.startsWith("'") ? '"' + gitSsh + '"' : gitSsh;
314730
+ }
314731
+ if (!baseSshCommand) {
314732
+ baseSshCommand = "ssh";
314733
+ }
314734
+ const execMatch = baseSshCommand.match(/^\s*(?:"([^"]+)"|'([^']+)'|(\S+))/);
314735
+ const executable = execMatch ? execMatch[1] || execMatch[2] || execMatch[3] || "" : "";
314736
+ const execName = executable.split(/[/\\]/).pop() || "";
314737
+ const isPlink = /^(?:tortoise)?plink(?:\.exe)?$/i.test(execName);
314738
+ const batchFlag = isPlink ? "-batch" : "-o BatchMode=yes";
314739
+ const hasBatchFlag = isPlink ? /(?:^|\s)-batch(?:\s|$)/.test(baseSshCommand) : /\bbatchmode\s*=\s*yes\b/i.test(baseSshCommand) && !/\bbatchmode\s*=\s*no\b/i.test(baseSshCommand);
314740
+ let gitSshCommand = baseSshCommand;
314741
+ if (!hasBatchFlag && execMatch) {
314742
+ const execLength = execMatch[0].length;
314743
+ gitSshCommand = baseSshCommand.slice(0, execLength) + " " + batchFlag + baseSshCommand.slice(execLength);
314744
+ }
314536
314745
  return {
314537
314746
  ...cleanedEnv,
314538
314747
  GIT_TERMINAL_PROMPT: "0",
314748
+ GIT_ASKPASS: "",
314749
+ SSH_ASKPASS: "",
314750
+ GIT_SSH_COMMAND: gitSshCommand,
314751
+ GH_PROMPT_DISABLED: "1",
314752
+ GCM_INTERACTIVE: "never",
314539
314753
  GIT_CONFIG_GLOBAL: devNullPath,
314540
314754
  GIT_CONFIG_SYSTEM: devNullPath,
314541
314755
  GIT_CONFIG_NOSYSTEM: "1",
@@ -322692,13 +322906,13 @@ var GrepTool = class _GrepTool extends BaseDeclarativeTool {
322692
322906
  import fs46 from "node:fs";
322693
322907
  import fsPromises8 from "node:fs/promises";
322694
322908
  import path55 from "node:path";
322695
- import os28 from "node:os";
322909
+ import os29 from "node:os";
322696
322910
  import { fileURLToPath as fileURLToPath11 } from "node:url";
322697
322911
  var __dirname6 = path55.dirname(fileURLToPath11(import.meta.url));
322698
322912
  async function resolveRipgrepPath() {
322699
322913
  try {
322700
- const platform12 = os28.platform();
322701
- const arch3 = os28.arch();
322914
+ const platform12 = os29.platform();
322915
+ const arch3 = os29.arch();
322702
322916
  const binName = `rg-${platform12}-${arch3}${platform12 === "win32" ? ".exe" : ""}`;
322703
322917
  const candidatePaths = [
322704
322918
  // 1. SEA runtime layout (Flattened): everything is in the root dir
@@ -323624,7 +323838,7 @@ var ActivateSkillTool = class _ActivateSkillTool extends BaseDeclarativeTool {
323624
323838
  import fsPromises10 from "node:fs/promises";
323625
323839
  import fs51 from "node:fs";
323626
323840
  import path61 from "node:path";
323627
- import os32 from "node:os";
323841
+ import os33 from "node:os";
323628
323842
 
323629
323843
  // packages/core/dist/src/utils/summarizer.js
323630
323844
  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.
@@ -323679,7 +323893,7 @@ var getPty = async () => {
323679
323893
  // packages/core/dist/src/services/shellExecutionService.js
323680
323894
  import { spawn as cpSpawn } from "node:child_process";
323681
323895
  import { TextDecoder as TextDecoder2 } from "node:util";
323682
- import os30 from "node:os";
323896
+ import os31 from "node:os";
323683
323897
  import fs49, { mkdirSync as mkdirSync4 } from "node:fs";
323684
323898
  import fsPromises9 from "node:fs/promises";
323685
323899
  import path59 from "node:path";
@@ -324130,11 +324344,11 @@ function convertColorToHex(color, colorMode, defaultColor) {
324130
324344
  }
324131
324345
 
324132
324346
  // packages/core/dist/src/utils/process-utils.js
324133
- import os29 from "node:os";
324347
+ import os30 from "node:os";
324134
324348
  var SIGKILL_TIMEOUT_MS = 200;
324135
324349
  async function killProcessGroup(options) {
324136
324350
  const { pid, escalate = false, isExited = () => false, pty } = options;
324137
- const isWindows3 = os29.platform() === "win32";
324351
+ const isWindows3 = os30.platform() === "win32";
324138
324352
  if (isWindows3) {
324139
324353
  if (pty) {
324140
324354
  try {
@@ -324815,7 +325029,7 @@ ${truncated}`;
324815
325029
  }
324816
325030
  static async prepareExecution(commandToExecute, cwd, shellExecutionConfig, isInteractive, usingPty) {
324817
325031
  const sandboxManager = shellExecutionConfig.sandboxManager ?? new NoopSandboxManager();
324818
- const isWindows3 = os30.platform() === "win32";
325032
+ const isWindows3 = os31.platform() === "win32";
324819
325033
  const isStrictSandbox = isWindows3 && shellExecutionConfig.sandboxConfig?.enabled && shellExecutionConfig.sandboxConfig?.command === "windows-native" && !shellExecutionConfig.sandboxConfig?.networkAccess;
324820
325034
  let { executable, argsPrefix, shell } = getShellConfiguration();
324821
325035
  if (isStrictSandbox) {
@@ -324853,7 +325067,7 @@ ${truncated}`;
324853
325067
  baseEnv[key] = sourceEnv[key];
324854
325068
  }
324855
325069
  let gitConfigCount = parseInt(baseEnv["GIT_CONFIG_COUNT"] || "0", 10);
324856
- const devNullPath = os30.platform() === "win32" ? "NUL" : "/dev/null";
325070
+ const devNullPath = os31.platform() === "win32" ? "NUL" : "/dev/null";
324857
325071
  baseEnv["GIT_CONFIG_GLOBAL"] = devNullPath;
324858
325072
  baseEnv["GIT_CONFIG_SYSTEM"] = devNullPath;
324859
325073
  baseEnv["GIT_CONFIG_NOSYSTEM"] = "1";
@@ -324973,7 +325187,7 @@ ${truncated}`;
324973
325187
  return;
324974
325188
  };
324975
325189
  var cleanup = cleanup2;
324976
- const isWindows3 = os30.platform() === "win32";
325190
+ const isWindows3 = os31.platform() === "win32";
324977
325191
  const prepared = await this.prepareExecution(commandToExecute, cwd, shellExecutionConfig, isInteractive, false);
324978
325192
  cmdCleanup = prepared.cleanup;
324979
325193
  const { program: finalExecutable, args: finalArgs, env: finalEnv, cwd: finalCwd } = prepared;
@@ -325110,7 +325324,7 @@ ${truncated}`;
325110
325324
  }
325111
325325
  const finalStrippedOutput = stripAnsi(combinedOutput).trim();
325112
325326
  const exitCode = code;
325113
- const exitSignal = signal && os30.constants.signals ? os30.constants.signals[signal] ?? null : null;
325327
+ const exitSignal = signal && os31.constants.signals ? os31.constants.signals[signal] ?? null : null;
325114
325328
  const resultPayload = {
325115
325329
  rawOutput: Buffer.from(""),
325116
325330
  output: finalStrippedOutput,
@@ -325207,7 +325421,7 @@ ${truncated}`;
325207
325421
  * descriptor later in the lifecycle.
325208
325422
  */
325209
325423
  static closeOrphanSlaveFd(masterFd, ptsName) {
325210
- if (os30.platform() !== "darwin") {
325424
+ if (os31.platform() !== "darwin") {
325211
325425
  return void 0;
325212
325426
  }
325213
325427
  if (typeof masterFd !== "number" || !Number.isFinite(masterFd) || masterFd < 0 || typeof ptsName !== "string" || ptsName.length === 0) {
@@ -325286,7 +325500,7 @@ ${truncated}`;
325286
325500
  const prepared = await this.prepareExecution(commandToExecute, cwd, shellExecutionConfig, true, true);
325287
325501
  cmdCleanup = prepared.cleanup;
325288
325502
  const { program: finalExecutable, args: finalArgs, env: finalEnv, cwd: finalCwd } = prepared;
325289
- const isWindowsPlatform = os30.platform() === "win32";
325503
+ const isWindowsPlatform = os31.platform() === "win32";
325290
325504
  const ptyProcess = ptyInfo.module.spawn(finalExecutable, finalArgs, {
325291
325505
  cwd: finalCwd,
325292
325506
  name: "xterm-256color",
@@ -325959,7 +326173,7 @@ ${truncated}`;
325959
326173
  };
325960
326174
 
325961
326175
  // packages/core/dist/src/sandbox/utils/proactivePermissions.js
325962
- import os31 from "node:os";
326176
+ import os32 from "node:os";
325963
326177
  import path60 from "node:path";
325964
326178
  import fs50 from "node:fs";
325965
326179
  var NETWORK_RELIANT_TOOLS = /* @__PURE__ */ new Set([
@@ -326006,7 +326220,7 @@ async function getProactiveToolSuggestions(commandName) {
326006
326220
  if (!NETWORK_RELIANT_TOOLS.has(normalizedCommand)) {
326007
326221
  return void 0;
326008
326222
  }
326009
- const home = os31.homedir();
326223
+ const home = os32.homedir();
326010
326224
  const readOnlyPaths = [];
326011
326225
  const primaryCachePaths = [];
326012
326226
  const optionalCachePaths = [];
@@ -326037,7 +326251,7 @@ async function getProactiveToolSuggestions(commandName) {
326037
326251
  } else if (normalizedCommand === "ssh" || normalizedCommand === "scp" || normalizedCommand === "sftp") {
326038
326252
  readOnlyPaths.push(path60.join(home, ".ssh"));
326039
326253
  }
326040
- if (os31.platform() === "win32") {
326254
+ if (os32.platform() === "win32") {
326041
326255
  const appData = process.env["AppData"];
326042
326256
  const localAppData = process.env["LocalAppData"];
326043
326257
  if (normalizedCommand === "npm" || normalizedCommand === "npx") {
@@ -326183,8 +326397,8 @@ exit $__code`;
326183
326397
  }
326184
326398
  const finalPaths = /* @__PURE__ */ new Set();
326185
326399
  const sensitiveDirs = /* @__PURE__ */ new Set([
326186
- os32.homedir(),
326187
- path61.dirname(os32.homedir()),
326400
+ os33.homedir(),
326401
+ path61.dirname(os33.homedir()),
326188
326402
  path61.sep,
326189
326403
  path61.join(path61.sep, "etc"),
326190
326404
  path61.join(path61.sep, "usr"),
@@ -326196,7 +326410,7 @@ exit $__code`;
326196
326410
  path61.join(path61.sep, "home"),
326197
326411
  path61.join(path61.sep, "Users")
326198
326412
  ]);
326199
- if (os32.platform() === "win32") {
326413
+ if (os33.platform() === "win32") {
326200
326414
  const systemRoot = process.env["SystemRoot"];
326201
326415
  if (systemRoot) {
326202
326416
  sensitiveDirs.add(systemRoot);
@@ -326412,7 +326626,7 @@ exit $__code`;
326412
326626
  returnDisplay: "Command cancelled by user."
326413
326627
  };
326414
326628
  }
326415
- const isWindows3 = os32.platform() === "win32";
326629
+ const isWindows3 = os33.platform() === "win32";
326416
326630
  let tempFilePath = "";
326417
326631
  let tempDir = "";
326418
326632
  let isBackgrounded = false;
@@ -326423,7 +326637,7 @@ exit $__code`;
326423
326637
  const combinedController = new AbortController();
326424
326638
  const onAbort = () => combinedController.abort();
326425
326639
  try {
326426
- tempDir = fs51.mkdtempSync(path61.join(os32.tmpdir(), "gemini-shell-"));
326640
+ tempDir = fs51.mkdtempSync(path61.join(os33.tmpdir(), "gemini-shell-"));
326427
326641
  tempFilePath = path61.join(tempDir, "bgpids.tmp");
326428
326642
  const commandToExecute = this.wrapCommandForBackgroundPIDs(strippedCommand, tempFilePath, isWindows3);
326429
326643
  const cwd = this.params.dir_path ? path61.resolve(this.context.config.getTargetDir(), this.params.dir_path) : this.context.config.getTargetDir();
@@ -326620,7 +326834,7 @@ ${cumulativeOutput}`,
326620
326834
  flushOutput();
326621
326835
  }
326622
326836
  const backgroundPIDs = [];
326623
- if (os32.platform() !== "win32") {
326837
+ if (os33.platform() !== "win32") {
326624
326838
  let tempFileExists = false;
326625
326839
  try {
326626
326840
  await fsPromises10.access(tempFilePath);
@@ -326755,7 +326969,7 @@ ${result2.output}`;
326755
326969
  try {
326756
326970
  let currentPath = p;
326757
326971
  if (currentPath.startsWith("~")) {
326758
- currentPath = path61.join(os32.homedir(), currentPath.slice(1));
326972
+ currentPath = path61.join(os33.homedir(), currentPath.slice(1));
326759
326973
  }
326760
326974
  try {
326761
326975
  if (fs51.existsSync(currentPath) && fs51.statSync(currentPath).isFile()) {
@@ -340620,7 +340834,7 @@ import * as crypto16 from "node:crypto";
340620
340834
  // packages/core/dist/src/skills/skillLoader.js
340621
340835
  import * as fs54 from "node:fs/promises";
340622
340836
  import * as path65 from "node:path";
340623
- var FRONTMATTER_REGEX = /^---\r?\n([\s\S]*?)\r?\n---(?:\r?\n([\s\S]*))?/;
340837
+ var FRONTMATTER_REGEX = /^\uFEFF?---[ \t]*\r?\n([\s\S]*?)\r?\n---[ \t]*(?:\r?\n([\s\S]*))?$/;
340624
340838
  function parseFrontmatter(content) {
340625
340839
  try {
340626
340840
  const parsed = load(content);
@@ -340635,30 +340849,44 @@ function parseFrontmatter(content) {
340635
340849
  }
340636
340850
  return parseSimpleFrontmatter(content);
340637
340851
  }
340852
+ function stripOuterQuotes(value) {
340853
+ if (value.length >= 2 && (value.startsWith('"') && value.endsWith('"') || value.startsWith("'") && value.endsWith("'"))) {
340854
+ return value.slice(1, -1);
340855
+ }
340856
+ return value;
340857
+ }
340638
340858
  function parseSimpleFrontmatter(content) {
340639
340859
  const lines = content.split(/\r?\n/);
340640
340860
  let name3;
340641
340861
  let description;
340642
340862
  for (let i3 = 0; i3 < lines.length; i3++) {
340643
340863
  const line = lines[i3];
340644
- const nameMatch = line.match(/^\s*name:\s*(.*)$/);
340645
- if (nameMatch) {
340646
- name3 = nameMatch[1].trim();
340864
+ const namePrefixMatch = line.match(/^[ \t]*name[ \t]*:/i);
340865
+ if (namePrefixMatch) {
340866
+ name3 = stripOuterQuotes(line.slice(namePrefixMatch[0].length).trim());
340647
340867
  continue;
340648
340868
  }
340649
- const descMatch = line.match(/^\s*description:\s*(.*)$/);
340650
- if (descMatch) {
340651
- const descLines = [descMatch[1].trim()];
340869
+ const descPrefixMatch = line.match(/^([ \t]*)description[ \t]*:/i);
340870
+ if (descPrefixMatch) {
340871
+ const descIndent = descPrefixMatch[1].length;
340872
+ const firstLine = line.slice(descPrefixMatch[0].length).trim();
340873
+ const descLines = /^[>|][-+]?$/.test(firstLine) ? [] : [firstLine];
340652
340874
  while (i3 + 1 < lines.length) {
340653
340875
  const nextLine = lines[i3 + 1];
340654
- if (nextLine.match(/^[ \t]+\S/)) {
340876
+ const nextIndentMatch = nextLine.match(/^[ \t]*/);
340877
+ const nextIndent = nextIndentMatch ? nextIndentMatch[0].length : 0;
340878
+ const isNonEmpty = nextIndent < nextLine.length;
340879
+ const isKnownKey = /^[ \t]*(?:name|description)[ \t]*:/i.test(nextLine);
340880
+ const isComment2 = /^[ \t]*#/.test(nextLine);
340881
+ const isOtherKeyAtOrAboveDescIndent = nextIndent <= descIndent && /^[ \t]*[a-zA-Z0-9_-]+[ \t]*:/.test(nextLine);
340882
+ if (isNonEmpty && !isKnownKey && !isComment2 && !isOtherKeyAtOrAboveDescIndent) {
340655
340883
  descLines.push(nextLine.trim());
340656
340884
  i3++;
340657
340885
  } else {
340658
340886
  break;
340659
340887
  }
340660
340888
  }
340661
- description = descLines.filter(Boolean).join(" ");
340889
+ description = stripOuterQuotes(descLines.filter(Boolean).join(" "));
340662
340890
  continue;
340663
340891
  }
340664
340892
  }
@@ -340701,7 +340929,7 @@ async function loadSkillsFromDir(dir) {
340701
340929
  }
340702
340930
  async function loadSkillFromFile(filePath) {
340703
340931
  try {
340704
- const content = await fs54.readFile(filePath, "utf-8");
340932
+ const content = await readFileWithEncoding(filePath);
340705
340933
  const match2 = content.match(FRONTMATTER_REGEX);
340706
340934
  if (!match2) {
340707
340935
  return null;
@@ -342322,7 +342550,7 @@ var A2AAuthProviderFactory = class _A2AAuthProviderFactory {
342322
342550
  return provider;
342323
342551
  }
342324
342552
  case "oauth2": {
342325
- const { OAuth2AuthProvider } = await import("./oauth2-provider-XRUER2XR.js");
342553
+ const { OAuth2AuthProvider } = await import("./oauth2-provider-XMOANRFY.js");
342326
342554
  const provider = new OAuth2AuthProvider(authConfig, options.agentName ?? "unknown", agentCard, options.agentCardUrl);
342327
342555
  await provider.initialize();
342328
342556
  return provider;
@@ -349627,6 +349855,20 @@ var createErrorResponse = (request, error40, errorType) => ({
349627
349855
  errorType,
349628
349856
  contentLength: error40.message.length
349629
349857
  });
349858
+ function getToolCallGroupIds(requests, isGroupable) {
349859
+ const groupable = requests.map(isGroupable);
349860
+ const groupIds = requests.map(() => void 0);
349861
+ let runStart = 0;
349862
+ for (let i3 = 0; i3 <= requests.length; i3++) {
349863
+ if (i3 < requests.length && groupable[i3])
349864
+ continue;
349865
+ if (i3 - runStart >= 2) {
349866
+ groupIds.fill(requests[runStart].callId, runStart, i3);
349867
+ }
349868
+ runStart = i3 + 1;
349869
+ }
349870
+ return groupIds;
349871
+ }
349630
349872
  var Scheduler = class {
349631
349873
  disposeController = new AbortController();
349632
349874
  state;
@@ -349778,11 +350020,13 @@ var Scheduler = class {
349778
350020
  });
349779
350021
  try {
349780
350022
  const toolRegistry = this.context.toolRegistry;
349781
- const newCalls = sortedRequests.map((request) => {
350023
+ const groupIds = getToolCallGroupIds(sortedRequests, (request) => toolRegistry.getTool(request.name)?.kind === Kind.Agent);
350024
+ const newCalls = sortedRequests.map((request, index) => {
349782
350025
  const enrichedRequest = {
349783
350026
  ...request,
349784
350027
  schedulerId: this.schedulerId,
349785
- parentCallId: this.parentCallId
350028
+ parentCallId: this.parentCallId,
350029
+ groupId: groupIds[index]
349786
350030
  };
349787
350031
  const tool = toolRegistry.getTool(request.name);
349788
350032
  if (!tool) {
@@ -350055,7 +350299,8 @@ var Scheduler = class {
350055
350299
  originalRequestArgs: result2.request.originalRequestArgs ?? result2.request.args,
350056
350300
  isClientInitiated: result2.request.isClientInitiated,
350057
350301
  prompt_id: result2.request.prompt_id,
350058
- schedulerId: this.schedulerId
350302
+ schedulerId: this.schedulerId,
350303
+ groupId: result2.request.groupId
350059
350304
  };
350060
350305
  if (!newTool) {
350061
350306
  const errorCall = this._createToolNotFoundErroredToolCall(newRequest, this.context.toolRegistry.getAllToolNames());
@@ -367723,7 +367968,7 @@ var import_toml3 = __toESM(require_toml(), 1);
367723
367968
  import * as fs75 from "node:fs/promises";
367724
367969
  import * as fsSync5 from "node:fs";
367725
367970
  import { constants as constants2 } from "node:fs";
367726
- import * as os33 from "node:os";
367971
+ import * as os34 from "node:os";
367727
367972
  import * as path88 from "node:path";
367728
367973
  import { spawnSync as spawnSync4 } from "node:child_process";
367729
367974
  function createPathSecurityCache(maxSize = 1e3) {
@@ -367754,7 +367999,7 @@ function getWindowsPowerShellPath() {
367754
367999
  if (!/^[a-zA-Z]:\\Windows\\?$/i.test(systemRoot) || systemRoot.includes("..")) {
367755
368000
  systemRoot = "C:\\Windows";
367756
368001
  }
367757
- const pathModule = os33.platform() === "win32" ? path88.win32 : path88.posix;
368002
+ const pathModule = os34.platform() === "win32" ? path88.win32 : path88.posix;
367758
368003
  return pathModule.join(systemRoot, "System32", "WindowsPowerShell", "v1.0", "powershell.exe");
367759
368004
  }
367760
368005
  function buildWindowsAclScript(paths) {
@@ -367995,7 +368240,7 @@ async function isDirectorySecure(dirPath) {
367995
368240
  if (!stats.isDirectory()) {
367996
368241
  return { secure: false, reason: "Not a directory" };
367997
368242
  }
367998
- if (os33.platform() === "win32") {
368243
+ if (os34.platform() === "win32") {
367999
368244
  try {
368000
368245
  const escapedPath = dirPath.replace(/'/g, "''");
368001
368246
  const script = buildWindowsAclScript([escapedPath]);
@@ -368041,7 +368286,7 @@ async function isDirectorySecure(dirPath) {
368041
368286
  }
368042
368287
  }
368043
368288
  function normalizeSecurityPath(targetPath) {
368044
- const isWin2 = os33.platform() === "win32";
368289
+ const isWin2 = os34.platform() === "win32";
368045
368290
  const pathModule = isWin2 ? path88.win32 : path88.posix;
368046
368291
  const stripped = isWin2 ? stripExtendedLengthPrefix(targetPath) : targetPath;
368047
368292
  let resolved = pathModule.resolve(stripped);
@@ -368078,7 +368323,7 @@ function isPathSecureSync(targetPath, expectedType, cache3) {
368078
368323
  if (cache3?.has(normalizedPath)) {
368079
368324
  return cache3.get(normalizedPath);
368080
368325
  }
368081
- if (os33.platform() === "win32") {
368326
+ if (os34.platform() === "win32") {
368082
368327
  const effectiveCache = cache3 ?? createPathSecurityCache(1);
368083
368328
  batchCheckWindowsPathsSync([normalizedPath], effectiveCache);
368084
368329
  const winResult = effectiveCache.get(normalizedPath);
@@ -368117,7 +368362,7 @@ function isPathSecureSync(targetPath, expectedType, cache3) {
368117
368362
  }
368118
368363
  }
368119
368364
  function isFileAndDirectorySecureSync(filePath, cache3) {
368120
- const isWin2 = os33.platform() === "win32";
368365
+ const isWin2 = os34.platform() === "win32";
368121
368366
  const pathModule = isWin2 ? path88.win32 : path88.posix;
368122
368367
  const normalizedFilePath = normalizeSecurityPath(filePath);
368123
368368
  try {
@@ -392571,122 +392816,6 @@ var ReadManyFilesTool = class _ReadManyFilesTool extends BaseDeclarativeTool {
392571
392816
  }
392572
392817
  };
392573
392818
 
392574
- // packages/core/dist/src/utils/compatibility.js
392575
- import os34 from "node:os";
392576
- function isWindows10() {
392577
- if (os34.platform() !== "win32") {
392578
- return false;
392579
- }
392580
- const release3 = os34.release();
392581
- const parts2 = release3.split(".");
392582
- if (parts2.length >= 3 && parts2[0] === "10" && parts2[1] === "0") {
392583
- const build = parseInt(parts2[2], 10);
392584
- return build < 22e3;
392585
- }
392586
- return false;
392587
- }
392588
- function isJetBrainsTerminal() {
392589
- const env2 = process.env;
392590
- return !!(env2["TERMINAL_EMULATOR"]?.startsWith("JetBrains") || env2["JETBRAINS_IDE"]);
392591
- }
392592
- function isTmux() {
392593
- return !!process.env["TMUX"];
392594
- }
392595
- function isGnuScreen() {
392596
- return !!process.env["STY"];
392597
- }
392598
- function isLowColorTmux() {
392599
- const term = process.env["TERM"] || "";
392600
- return isTmux() && term.startsWith("screen") && !process.env["COLORTERM"];
392601
- }
392602
- function isDumbTerminal() {
392603
- const term = process.env["TERM"] || "";
392604
- return term === "dumb" || term === "vt100";
392605
- }
392606
- function isAppleTerminal() {
392607
- return process.env["TERM_PROGRAM"] === "Apple_Terminal";
392608
- }
392609
- function supports256Colors() {
392610
- if (process.stdout.getColorDepth && process.stdout.getColorDepth() >= 8) {
392611
- return true;
392612
- }
392613
- const term = process.env["TERM"] || "";
392614
- if (term.includes("256color")) {
392615
- return true;
392616
- }
392617
- if (supportsTrueColor()) {
392618
- return true;
392619
- }
392620
- return false;
392621
- }
392622
- function supportsTrueColor() {
392623
- if (process.env["COLORTERM"] === "truecolor" || process.env["COLORTERM"] === "24bit" || process.env["COLORTERM"] === "kmscon") {
392624
- return true;
392625
- }
392626
- if (process.stdout.getColorDepth && process.stdout.getColorDepth() >= 24) {
392627
- return true;
392628
- }
392629
- return false;
392630
- }
392631
- var WarningPriority;
392632
- (function(WarningPriority2) {
392633
- WarningPriority2["Low"] = "low";
392634
- WarningPriority2["High"] = "high";
392635
- })(WarningPriority || (WarningPriority = {}));
392636
- function getCompatibilityWarnings(options) {
392637
- const warnings = [];
392638
- if (isWindows10()) {
392639
- warnings.push({
392640
- id: "windows-10",
392641
- message: "Warning: Windows 10 detected. Some UI features like smooth scrolling may be degraded. Windows 11 is recommended for the best experience.",
392642
- priority: WarningPriority.High
392643
- });
392644
- }
392645
- if (isJetBrainsTerminal() && options?.isAlternateBuffer) {
392646
- warnings.push({
392647
- id: "jetbrains-terminal",
392648
- 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".',
392649
- priority: WarningPriority.High
392650
- });
392651
- }
392652
- if (isLowColorTmux()) {
392653
- warnings.push({
392654
- id: "low-color-tmux",
392655
- 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"',
392656
- priority: WarningPriority.High
392657
- });
392658
- }
392659
- if (isGnuScreen()) {
392660
- warnings.push({
392661
- id: "gnu-screen",
392662
- 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.",
392663
- priority: WarningPriority.Low
392664
- });
392665
- }
392666
- if (isDumbTerminal()) {
392667
- const term = process.env["TERM"] || "dumb";
392668
- warnings.push({
392669
- id: "dumb-terminal",
392670
- message: `Warning: Basic terminal detected (TERM=${term}). Visual rendering will be limited. For the best experience, use a terminal emulator with truecolor support.`,
392671
- priority: WarningPriority.High
392672
- });
392673
- }
392674
- if (!supports256Colors()) {
392675
- warnings.push({
392676
- id: "256-color",
392677
- message: "Warning: 256-color support not detected. Using a terminal with at least 256-color support is recommended for a better visual experience.",
392678
- priority: WarningPriority.High
392679
- });
392680
- } else if (!supportsTrueColor() && !isAppleTerminal()) {
392681
- warnings.push({
392682
- id: "true-color",
392683
- message: "Warning: True color (24-bit) support not detected. Using a terminal with true color enabled will result in a better visual experience.",
392684
- priority: WarningPriority.Low
392685
- });
392686
- }
392687
- return warnings;
392688
- }
392689
-
392690
392819
  // packages/core/dist/src/services/worktreeService.js
392691
392820
  import * as path114 from "node:path";
392692
392821
  import * as fs91 from "node:fs/promises";
@@ -400543,9 +400672,25 @@ export {
400543
400672
  FORCE_FILE_STORAGE_ENV_VAR,
400544
400673
  KeychainService,
400545
400674
  KeychainTokenStorage,
400675
+ isWindows10,
400676
+ isJetBrainsTerminal,
400677
+ isTmux,
400678
+ isGnuScreen,
400679
+ isLowColorTmux,
400680
+ isDumbTerminal,
400681
+ isAppleTerminal,
400682
+ supports256Colors,
400683
+ supportsTrueColor,
400684
+ WarningPriority,
400685
+ getCompatibilityWarnings,
400546
400686
  writeToStdout,
400547
400687
  writeToStderr,
400548
400688
  patchStdio,
400689
+ ENTER_SYNCHRONIZED_OUTPUT_SEQ,
400690
+ EXIT_SYNCHRONIZED_OUTPUT_SEQ,
400691
+ TMUX_ENTER_SYNCHRONIZED_OUTPUT_SEQ,
400692
+ TMUX_EXIT_SYNCHRONIZED_OUTPUT_SEQ,
400693
+ wrapWithSynchronizedOutput,
400549
400694
  createWorkingStdio,
400550
400695
  disableMouseTracking,
400551
400696
  enableMouseEvents,
@@ -400884,6 +401029,7 @@ export {
400884
401029
  isEditorAvailableAsync,
400885
401030
  resolveEditorAsync,
400886
401031
  getDiffCommand,
401032
+ quoteCmdArg,
400887
401033
  openDiff,
400888
401034
  GEMINI_CLI_COMPANION_EXTENSION_NAME,
400889
401035
  IDE_MAX_OPEN_FILES,
@@ -401384,17 +401530,6 @@ export {
401384
401530
  LegacyAgentProtocol,
401385
401531
  LegacyAgentSession,
401386
401532
  ReadManyFilesTool,
401387
- isWindows10,
401388
- isJetBrainsTerminal,
401389
- isTmux,
401390
- isGnuScreen,
401391
- isLowColorTmux,
401392
- isDumbTerminal,
401393
- isAppleTerminal,
401394
- supports256Colors,
401395
- supportsTrueColor,
401396
- WarningPriority,
401397
- getCompatibilityWarnings,
401398
401533
  execa,
401399
401534
  execaSync,
401400
401535
  WorktreeService,