gemini-cli-leo 0.1.30 → 0.1.31-pre.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/gemini.mjs CHANGED
@@ -6386,7 +6386,7 @@ var require_parse2 = __commonJS({
6386
6386
  return typeof arg === "undefined" ? prev : prev.concat(arg);
6387
6387
  }, []);
6388
6388
  }
6389
- module2.exports = function parse13(s6, env5, opts) {
6389
+ module2.exports = function parse14(s6, env5, opts) {
6390
6390
  var mapped = parseInternal(s6, env5, opts);
6391
6391
  if (typeof env5 !== "function") {
6392
6392
  return mapped;
@@ -22830,7 +22830,7 @@ var require_ms = __commonJS({
22830
22830
  options = options || {};
22831
22831
  var type2 = typeof val;
22832
22832
  if (type2 === "string" && val.length > 0) {
22833
- return parse13(val);
22833
+ return parse14(val);
22834
22834
  } else if (type2 === "number" && isFinite(val)) {
22835
22835
  return options.long ? fmtLong(val) : fmtShort(val);
22836
22836
  }
@@ -22838,7 +22838,7 @@ var require_ms = __commonJS({
22838
22838
  "val is not a non-empty string or a valid number. val=" + JSON.stringify(val)
22839
22839
  );
22840
22840
  };
22841
- function parse13(str2) {
22841
+ function parse14(str2) {
22842
22842
  str2 = String(str2);
22843
22843
  if (str2.length > 100) {
22844
22844
  return;
@@ -42702,7 +42702,7 @@ var require_extension = __commonJS({
42702
42702
  if (dest[name3] === void 0) dest[name3] = [elem];
42703
42703
  else dest[name3].push(elem);
42704
42704
  }
42705
- function parse13(header) {
42705
+ function parse14(header) {
42706
42706
  const offers = /* @__PURE__ */ Object.create(null);
42707
42707
  let params = /* @__PURE__ */ Object.create(null);
42708
42708
  let mustUnescape = false;
@@ -42842,7 +42842,7 @@ var require_extension = __commonJS({
42842
42842
  }).join(", ");
42843
42843
  }).join(", ");
42844
42844
  }
42845
- module2.exports = { format: format5, parse: parse13 };
42845
+ module2.exports = { format: format5, parse: parse14 };
42846
42846
  }
42847
42847
  });
42848
42848
 
@@ -42875,7 +42875,7 @@ var require_websocket = __commonJS({
42875
42875
  var {
42876
42876
  EventTarget: { addEventListener, removeEventListener }
42877
42877
  } = require_event_target();
42878
- var { format: format5, parse: parse13 } = require_extension();
42878
+ var { format: format5, parse: parse14 } = require_extension();
42879
42879
  var { toBuffer } = require_buffer_util();
42880
42880
  var closeTimeout = 30 * 1e3;
42881
42881
  var kAborted = Symbol("kAborted");
@@ -43542,7 +43542,7 @@ var require_websocket = __commonJS({
43542
43542
  }
43543
43543
  let extensions;
43544
43544
  try {
43545
- extensions = parse13(secWebSocketExtensions);
43545
+ extensions = parse14(secWebSocketExtensions);
43546
43546
  } catch (err2) {
43547
43547
  const message = "Invalid Sec-WebSocket-Extensions header";
43548
43548
  abortHandshake(websocket, socket, message);
@@ -43832,7 +43832,7 @@ var require_subprotocol = __commonJS({
43832
43832
  "node_modules/ws/lib/subprotocol.js"(exports2, module2) {
43833
43833
  "use strict";
43834
43834
  var { tokenChars } = require_validation();
43835
- function parse13(header) {
43835
+ function parse14(header) {
43836
43836
  const protocols = /* @__PURE__ */ new Set();
43837
43837
  let start2 = -1;
43838
43838
  let end = -1;
@@ -43868,7 +43868,7 @@ var require_subprotocol = __commonJS({
43868
43868
  protocols.add(protocol);
43869
43869
  return protocols;
43870
43870
  }
43871
- module2.exports = { parse: parse13 };
43871
+ module2.exports = { parse: parse14 };
43872
43872
  }
43873
43873
  });
43874
43874
 
@@ -73640,21 +73640,21 @@ var require_fast_uri = __commonJS({
73640
73640
  normalizeString(uri, options);
73641
73641
  } else if (typeof uri === "object") {
73642
73642
  uri = /** @type {T} */
73643
- parse13(serialize3(uri, options), options);
73643
+ parse14(serialize3(uri, options), options);
73644
73644
  }
73645
73645
  return uri;
73646
73646
  }
73647
73647
  function resolve52(baseURI, relativeURI, options) {
73648
73648
  const schemelessOptions = options ? Object.assign({ scheme: "null" }, options) : { scheme: "null" };
73649
- const resolved = resolveComponent(parse13(baseURI, schemelessOptions), parse13(relativeURI, schemelessOptions), schemelessOptions, true);
73649
+ const resolved = resolveComponent(parse14(baseURI, schemelessOptions), parse14(relativeURI, schemelessOptions), schemelessOptions, true);
73650
73650
  schemelessOptions.skipEscape = true;
73651
73651
  return serialize3(resolved, schemelessOptions);
73652
73652
  }
73653
73653
  function resolveComponent(base, relative18, options, skipNormalization) {
73654
73654
  const target = {};
73655
73655
  if (!skipNormalization) {
73656
- base = parse13(serialize3(base, options), options);
73657
- relative18 = parse13(serialize3(relative18, options), options);
73656
+ base = parse14(serialize3(base, options), options);
73657
+ relative18 = parse14(serialize3(relative18, options), options);
73658
73658
  }
73659
73659
  options = options || {};
73660
73660
  if (!options.tolerant && relative18.scheme) {
@@ -73877,7 +73877,7 @@ var require_fast_uri = __commonJS({
73877
73877
  }
73878
73878
  return { parsed, malformedAuthorityOrPort };
73879
73879
  }
73880
- function parse13(uri, opts) {
73880
+ function parse14(uri, opts) {
73881
73881
  return parseWithStatus(uri, opts).parsed;
73882
73882
  }
73883
73883
  function normalizeString(uri, opts) {
@@ -73906,7 +73906,7 @@ var require_fast_uri = __commonJS({
73906
73906
  resolveComponent,
73907
73907
  equal,
73908
73908
  serialize: serialize3,
73909
- parse: parse13
73909
+ parse: parse14
73910
73910
  };
73911
73911
  module2.exports = fastUri;
73912
73912
  module2.exports.default = fastUri;
@@ -102449,13 +102449,13 @@ var require_path = __commonJS({
102449
102449
  "node_modules/@protobufjs/path/index.js"(exports2) {
102450
102450
  "use strict";
102451
102451
  var path204 = exports2;
102452
- var isAbsolute19 = (
102452
+ var isAbsolute20 = (
102453
102453
  /**
102454
102454
  * Tests if the specified path is absolute.
102455
102455
  * @param {string} path Path to test
102456
102456
  * @returns {boolean} `true` if path is absolute
102457
102457
  */
102458
- path204.isAbsolute = function isAbsolute20(path205) {
102458
+ path204.isAbsolute = function isAbsolute21(path205) {
102459
102459
  return /^(?:\/|\w+:)/.test(path205);
102460
102460
  }
102461
102461
  );
@@ -102467,7 +102467,7 @@ var require_path = __commonJS({
102467
102467
  */
102468
102468
  path204.normalize = function normalize10(path205) {
102469
102469
  path205 = path205.replace(/\\/g, "/").replace(/\/{2,}/g, "/");
102470
- var parts2 = path205.split("/"), absolute = isAbsolute19(path205), prefix = "";
102470
+ var parts2 = path205.split("/"), absolute = isAbsolute20(path205), prefix = "";
102471
102471
  if (absolute)
102472
102472
  prefix = parts2.shift() + "/";
102473
102473
  for (var i4 = 0; i4 < parts2.length; ) {
@@ -102489,7 +102489,7 @@ var require_path = __commonJS({
102489
102489
  path204.resolve = function resolve52(originPath, includePath, alreadyNormalized) {
102490
102490
  if (!alreadyNormalized)
102491
102491
  includePath = normalize9(includePath);
102492
- if (isAbsolute19(includePath))
102492
+ if (isAbsolute20(includePath))
102493
102493
  return includePath;
102494
102494
  if (!alreadyNormalized)
102495
102495
  originPath = normalize9(originPath);
@@ -103847,7 +103847,7 @@ var require_root = __commonJS({
103847
103847
  var OneOf = require_oneof();
103848
103848
  var util5 = require_util7();
103849
103849
  var Type2;
103850
- var parse13;
103850
+ var parse14;
103851
103851
  var common3;
103852
103852
  function Root2(options) {
103853
103853
  Namespace.call(this, "", options);
@@ -103907,8 +103907,8 @@ var require_root = __commonJS({
103907
103907
  if (!util5.isString(source2))
103908
103908
  self2.setOptions(source2.options).addJSON(source2.nested);
103909
103909
  else {
103910
- parse13.filename = filename2;
103911
- var parsed = parse13(source2, self2, options), resolved2, i5 = 0;
103910
+ parse14.filename = filename2;
103911
+ var parsed = parse14(source2, self2, options), resolved2, i5 = 0;
103912
103912
  if (parsed.imports) {
103913
103913
  for (; i5 < parsed.imports.length; ++i5)
103914
103914
  if (resolved2 = getBundledFileName(parsed.imports[i5]) || self2.resolvePath(filename2, parsed.imports[i5]))
@@ -104079,7 +104079,7 @@ var require_root = __commonJS({
104079
104079
  };
104080
104080
  Root2._configure = function(Type_, parse_2, common_) {
104081
104081
  Type2 = Type_;
104082
- parse13 = parse_2;
104082
+ parse14 = parse_2;
104083
104083
  common3 = common_;
104084
104084
  };
104085
104085
  }
@@ -105350,9 +105350,9 @@ var require_tokenize = __commonJS({
105350
105350
  var require_parse4 = __commonJS({
105351
105351
  "node_modules/protobufjs/src/parse.js"(exports2, module2) {
105352
105352
  "use strict";
105353
- module2.exports = parse13;
105354
- parse13.filename = null;
105355
- parse13.defaults = { keepCase: false };
105353
+ module2.exports = parse14;
105354
+ parse14.filename = null;
105355
+ parse14.defaults = { keepCase: false };
105356
105356
  var tokenize3 = require_tokenize();
105357
105357
  var Root2 = require_root();
105358
105358
  var Type2 = require_type();
@@ -105374,13 +105374,13 @@ var require_parse4 = __commonJS({
105374
105374
  var numberRe = util5.patterns.numberRe;
105375
105375
  var nameRe = /^[a-zA-Z_][a-zA-Z_0-9]*$/;
105376
105376
  var typeRefRe = util5.patterns.typeRefRe;
105377
- function parse13(source2, root, options) {
105377
+ function parse14(source2, root, options) {
105378
105378
  if (!(root instanceof Root2)) {
105379
105379
  options = root;
105380
105380
  root = new Root2();
105381
105381
  }
105382
105382
  if (!options)
105383
- options = parse13.defaults;
105383
+ options = parse14.defaults;
105384
105384
  var preferTrailingComment = options.preferTrailingComment || false;
105385
105385
  var tn = tokenize3(source2, options.alternateCommentMode || false), next = tn.next, push = tn.push, peek = tn.peek, skip = tn.skip, cmnt = tn.cmnt;
105386
105386
  var head = true, pkg2, imports, weakImports, edition = "proto2";
@@ -105400,9 +105400,9 @@ var require_parse4 = __commonJS({
105400
105400
  });
105401
105401
  }
105402
105402
  function illegal(token3, name3, insideTryCatch) {
105403
- var filename = parse13.filename;
105403
+ var filename = parse14.filename;
105404
105404
  if (!insideTryCatch)
105405
- parse13.filename = null;
105405
+ parse14.filename = null;
105406
105406
  return Error("illegal " + (name3 || "token") + " '" + token3 + "' (" + (filename ? filename + ", " : "") + "line " + tn.line + ")");
105407
105407
  }
105408
105408
  function readString() {
@@ -105601,7 +105601,7 @@ var require_parse4 = __commonJS({
105601
105601
  if (typeof obj.comment !== "string") {
105602
105602
  obj.comment = cmnt();
105603
105603
  }
105604
- obj.filename = parse13.filename;
105604
+ obj.filename = parse14.filename;
105605
105605
  }
105606
105606
  if (skip("{", true)) {
105607
105607
  var token3;
@@ -105721,7 +105721,7 @@ var require_parse4 = __commonJS({
105721
105721
  var type2 = new Type2(name3);
105722
105722
  type2.group = true;
105723
105723
  var field = new Field(fieldName, id, name3, rule);
105724
- field.filename = parse13.filename;
105724
+ field.filename = parse14.filename;
105725
105725
  ifBlock(type2, function parseGroup_block(token3) {
105726
105726
  switch (token3) {
105727
105727
  case "option":
@@ -106060,7 +106060,7 @@ var require_parse4 = __commonJS({
106060
106060
  }
106061
106061
  }
106062
106062
  resolveFileFeatures();
106063
- parse13.filename = null;
106063
+ parse14.filename = null;
106064
106064
  return {
106065
106065
  "package": pkg2,
106066
106066
  "imports": imports,
@@ -143186,7 +143186,7 @@ var require_public_api = __commonJS({
143186
143186
  }
143187
143187
  return doc;
143188
143188
  }
143189
- function parse13(src, reviver, options) {
143189
+ function parse14(src, reviver, options) {
143190
143190
  let _reviver = void 0;
143191
143191
  if (typeof reviver === "function") {
143192
143192
  _reviver = reviver;
@@ -143227,7 +143227,7 @@ var require_public_api = __commonJS({
143227
143227
  return value.toString(options);
143228
143228
  return new Document2.Document(value, _replacer, options).toString(options);
143229
143229
  }
143230
- exports2.parse = parse13;
143230
+ exports2.parse = parse14;
143231
143231
  exports2.parseAllDocuments = parseAllDocuments;
143232
143232
  exports2.parseDocument = parseDocument2;
143233
143233
  exports2.stringify = stringify4;
@@ -152344,7 +152344,7 @@ var require_forwarded_parse = __commonJS({
152344
152344
  position
152345
152345
  );
152346
152346
  }
152347
- function parse13(header) {
152347
+ function parse14(header) {
152348
152348
  var mustUnescape = false;
152349
152349
  var isEscaping = false;
152350
152350
  var inQuotes = false;
@@ -152431,7 +152431,7 @@ var require_forwarded_parse = __commonJS({
152431
152431
  output.push(forwarded);
152432
152432
  return output;
152433
152433
  }
152434
- module2.exports = parse13;
152434
+ module2.exports = parse14;
152435
152435
  }
152436
152436
  });
152437
152437
 
@@ -174783,8 +174783,8 @@ var GIT_COMMIT_INFO, CLI_VERSION;
174783
174783
  var init_git_commit = __esm({
174784
174784
  "packages/core/dist/src/generated/git-commit.js"() {
174785
174785
  "use strict";
174786
- GIT_COMMIT_INFO = "8f1203e";
174787
- CLI_VERSION = "0.1.30";
174786
+ GIT_COMMIT_INFO = "bdb51df";
174787
+ CLI_VERSION = "0.1.31-pre.1";
174788
174788
  }
174789
174789
  });
174790
174790
 
@@ -193591,11 +193591,11 @@ var require_lib5 = __commonJS({
193591
193591
  "node_modules/qs/lib/index.js"(exports2, module2) {
193592
193592
  "use strict";
193593
193593
  var stringify4 = require_stringify4();
193594
- var parse13 = require_parse5();
193594
+ var parse14 = require_parse5();
193595
193595
  var formats = require_formats2();
193596
193596
  module2.exports = {
193597
193597
  formats,
193598
- parse: parse13,
193598
+ parse: parse14,
193599
193599
  stringify: stringify4
193600
193600
  };
193601
193601
  }
@@ -292012,7 +292012,7 @@ var require_parse6 = __commonJS({
292012
292012
  }
292013
292013
  return parsed;
292014
292014
  }
292015
- function parse13(command2, args2, options) {
292015
+ function parse14(command2, args2, options) {
292016
292016
  if (args2 && !Array.isArray(args2)) {
292017
292017
  options = args2;
292018
292018
  args2 = null;
@@ -292031,7 +292031,7 @@ var require_parse6 = __commonJS({
292031
292031
  };
292032
292032
  return options.shell ? parsed : parseNonShell(parsed);
292033
292033
  }
292034
- module2.exports = parse13;
292034
+ module2.exports = parse14;
292035
292035
  }
292036
292036
  });
292037
292037
 
@@ -292090,16 +292090,16 @@ var require_cross_spawn = __commonJS({
292090
292090
  "node_modules/cross-spawn/index.js"(exports2, module2) {
292091
292091
  "use strict";
292092
292092
  var cp4 = __require("child_process");
292093
- var parse13 = require_parse6();
292093
+ var parse14 = require_parse6();
292094
292094
  var enoent = require_enoent();
292095
292095
  function spawn21(command2, args2, options) {
292096
- const parsed = parse13(command2, args2, options);
292096
+ const parsed = parse14(command2, args2, options);
292097
292097
  const spawned = cp4.spawn(parsed.command, parsed.args, parsed.options);
292098
292098
  enoent.hookChildProcess(spawned, parsed);
292099
292099
  return spawned;
292100
292100
  }
292101
292101
  function spawnSync9(command2, args2, options) {
292102
- const parsed = parse13(command2, args2, options);
292102
+ const parsed = parse14(command2, args2, options);
292103
292103
  const result2 = cp4.spawnSync(parsed.command, parsed.args, parsed.options);
292104
292104
  result2.error = result2.error || enoent.verifyENOENTSync(result2.status, parsed);
292105
292105
  return result2;
@@ -292107,7 +292107,7 @@ var require_cross_spawn = __commonJS({
292107
292107
  module2.exports = spawn21;
292108
292108
  module2.exports.spawn = spawn21;
292109
292109
  module2.exports.sync = spawnSync9;
292110
- module2.exports._parse = parse13;
292110
+ module2.exports._parse = parse14;
292111
292111
  module2.exports._enoent = enoent;
292112
292112
  }
292113
292113
  });
@@ -314283,7 +314283,7 @@ var require_parse8 = __commonJS({
314283
314283
  "node_modules/semver/functions/parse.js"(exports2, module2) {
314284
314284
  "use strict";
314285
314285
  var SemVer = require_semver2();
314286
- var parse13 = (version5, options, throwErrors = false) => {
314286
+ var parse14 = (version5, options, throwErrors = false) => {
314287
314287
  if (version5 instanceof SemVer) {
314288
314288
  return version5;
314289
314289
  }
@@ -314296,7 +314296,7 @@ var require_parse8 = __commonJS({
314296
314296
  throw er2;
314297
314297
  }
314298
314298
  };
314299
- module2.exports = parse13;
314299
+ module2.exports = parse14;
314300
314300
  }
314301
314301
  });
314302
314302
 
@@ -314304,9 +314304,9 @@ var require_parse8 = __commonJS({
314304
314304
  var require_valid = __commonJS({
314305
314305
  "node_modules/semver/functions/valid.js"(exports2, module2) {
314306
314306
  "use strict";
314307
- var parse13 = require_parse8();
314307
+ var parse14 = require_parse8();
314308
314308
  var valid = (version5, options) => {
314309
- const v2 = parse13(version5, options);
314309
+ const v2 = parse14(version5, options);
314310
314310
  return v2 ? v2.version : null;
314311
314311
  };
314312
314312
  module2.exports = valid;
@@ -314317,9 +314317,9 @@ var require_valid = __commonJS({
314317
314317
  var require_clean = __commonJS({
314318
314318
  "node_modules/semver/functions/clean.js"(exports2, module2) {
314319
314319
  "use strict";
314320
- var parse13 = require_parse8();
314320
+ var parse14 = require_parse8();
314321
314321
  var clean2 = (version5, options) => {
314322
- const s6 = parse13(version5.trim().replace(/^[=v]+/, ""), options);
314322
+ const s6 = parse14(version5.trim().replace(/^[=v]+/, ""), options);
314323
314323
  return s6 ? s6.version : null;
314324
314324
  };
314325
314325
  module2.exports = clean2;
@@ -315313,9 +315313,9 @@ var require_spdx_expression_parse = __commonJS({
315313
315313
  "node_modules/spdx-expression-parse/index.js"(exports2, module2) {
315314
315314
  "use strict";
315315
315315
  var scan = require_scan();
315316
- var parse13 = require_parse9();
315316
+ var parse14 = require_parse9();
315317
315317
  module2.exports = function(source2) {
315318
- return parse13(scan(source2));
315318
+ return parse14(scan(source2));
315319
315319
  };
315320
315320
  }
315321
315321
  });
@@ -315323,11 +315323,11 @@ var require_spdx_expression_parse = __commonJS({
315323
315323
  // node_modules/spdx-correct/index.js
315324
315324
  var require_spdx_correct = __commonJS({
315325
315325
  "node_modules/spdx-correct/index.js"(exports2, module2) {
315326
- var parse13 = require_spdx_expression_parse();
315326
+ var parse14 = require_spdx_expression_parse();
315327
315327
  var spdxLicenseIds = require_spdx_license_ids();
315328
315328
  function valid(string4) {
315329
315329
  try {
315330
- parse13(string4);
315330
+ parse14(string4);
315331
315331
  return true;
315332
315332
  } catch (error40) {
315333
315333
  return false;
@@ -315656,7 +315656,7 @@ var require_spdx_correct = __commonJS({
315656
315656
  // node_modules/validate-npm-package-license/index.js
315657
315657
  var require_validate_npm_package_license = __commonJS({
315658
315658
  "node_modules/validate-npm-package-license/index.js"(exports2, module2) {
315659
- var parse13 = require_spdx_expression_parse();
315659
+ var parse14 = require_spdx_expression_parse();
315660
315660
  var correct = require_spdx_correct();
315661
315661
  var genericWarning = 'license should be a valid SPDX license expression (without "LicenseRef"), "UNLICENSED", or "SEE LICENSE IN <filename>"';
315662
315662
  var fileReferenceRE = /^SEE LICEN[CS]E IN (.+)$/;
@@ -315674,7 +315674,7 @@ var require_validate_npm_package_license = __commonJS({
315674
315674
  module2.exports = function(argument) {
315675
315675
  var ast;
315676
315676
  try {
315677
- ast = parse13(argument);
315677
+ ast = parse14(argument);
315678
315678
  } catch (e3) {
315679
315679
  var match2;
315680
315680
  if (argument === "UNLICENSED" || argument === "UNLICENCED") {
@@ -318256,7 +318256,7 @@ function getVersion() {
318256
318256
  }
318257
318257
  versionPromise = (async () => {
318258
318258
  const pkgJson = await getPackageJson(__dirname4);
318259
- return "0.1.30";
318259
+ return "0.1.31-pre.1";
318260
318260
  })();
318261
318261
  return versionPromise;
318262
318262
  }
@@ -325598,7 +325598,7 @@ function resolveProvider(requestedId, filePath = getOpenAiProvidersPath(), confi
325598
325598
  const entries = loadProviderEntries(filePath);
325599
325599
  if (entries.length === 0) {
325600
325600
  if (requestedId) {
325601
- throw new UnknownProviderError(requestedId, [], `No providers are configured in ${filePath}, so "${requestedId}" cannot be resolved. Run /provider add to create one.`);
325601
+ throw new Error(`No providers are configured in ${filePath}, so "${requestedId}" cannot be resolved. Run /provider add to create one.`);
325602
325602
  }
325603
325603
  return void 0;
325604
325604
  }
@@ -325607,8 +325607,8 @@ function resolveProvider(requestedId, filePath = getOpenAiProvidersPath(), confi
325607
325607
  }
325608
325608
  const entry = entries.find((candidate) => candidate.id === requestedId);
325609
325609
  if (!entry) {
325610
- const knownIds = entries.map((candidate) => candidate.id);
325611
- throw new UnknownProviderError(requestedId, knownIds, `Unknown provider "${requestedId}". Configured providers: ${knownIds.join(", ")}.`);
325610
+ const known = entries.map((candidate) => candidate.id).join(", ");
325611
+ throw new Error(`Unknown provider "${requestedId}". Configured providers: ${known}.`);
325612
325612
  }
325613
325613
  return toProfile(entry, configEnv, filePath);
325614
325614
  }
@@ -325774,7 +325774,7 @@ function removeProvider(providerId, filePath = getOpenAiProvidersPath()) {
325774
325774
  document2["providers"] = remaining;
325775
325775
  writeProviderDocument(filePath, document2);
325776
325776
  }
325777
- var PROVIDER_ID_PATTERN, ENV_VAR_NAME_PATTERN, TOKEN_COUNT_UNITS, TOKEN_COUNT_HINT, tokenCountSchema, providerModelSchema, providerSchema, providersFileSchema, UnknownProviderError, OPENAI_PROVIDER_ENV, providerUpdateSchema;
325777
+ var PROVIDER_ID_PATTERN, ENV_VAR_NAME_PATTERN, TOKEN_COUNT_UNITS, TOKEN_COUNT_HINT, tokenCountSchema, providerModelSchema, providerSchema, providersFileSchema, OPENAI_PROVIDER_ENV, providerUpdateSchema;
325778
325778
  var init_providers = __esm({
325779
325779
  "packages/core/dist/src/core/openai/providers.js"() {
325780
325780
  "use strict";
@@ -325820,16 +325820,6 @@ var init_providers = __esm({
325820
325820
  providersFileSchema = external_exports.object({
325821
325821
  providers: external_exports.array(providerSchema)
325822
325822
  }).strict();
325823
- UnknownProviderError = class extends Error {
325824
- requestedId;
325825
- knownIds;
325826
- constructor(requestedId, knownIds, message) {
325827
- super(message);
325828
- this.requestedId = requestedId;
325829
- this.knownIds = knownIds;
325830
- this.name = "UnknownProviderError";
325831
- }
325832
- };
325833
325823
  OPENAI_PROVIDER_ENV = "GEMINI_OPENAI_PROVIDER";
325834
325824
  providerUpdateSchema = providerSchema.pick({
325835
325825
  label: true,
@@ -327382,7 +327372,7 @@ function resolveActiveProvider(options) {
327382
327372
  try {
327383
327373
  return resolveProvider(choice2, void 0, env5);
327384
327374
  } catch (error40) {
327385
- if (requestedId !== void 0 || !(error40 instanceof UnknownProviderError)) {
327375
+ if (requestedId !== void 0) {
327386
327376
  throw error40;
327387
327377
  }
327388
327378
  return resolveImplicitProvider(sessionProviderId, env5);
@@ -327396,14 +327386,14 @@ function resolveActiveProvider(options) {
327396
327386
  function resolveImplicitProvider(staleId, env5) {
327397
327387
  const fallback = resolveProvider(void 0, void 0, env5);
327398
327388
  if (staleId && fallback) {
327399
- coreEvents.emitFeedback("warning", `The selected OpenAI provider "${staleId}" is not configured in the provider file, so this session is using "${fallback.id}" instead. Run /provider to choose another.`);
327389
+ coreEvents.emitFeedback("warning", `The selected OpenAI provider "${staleId}" is no longer configured, so this session is using "${fallback.id}" instead. Run /provider to choose another.`);
327400
327390
  }
327401
327391
  return fallback;
327402
327392
  }
327403
- function hasResolvableOpenAiProvider(env5, filePath, selectedProviderId2) {
327404
- const cleanEnv = toCleanEnv(env5);
327393
+ function hasResolvableOpenAiProvider(env5, filePath) {
327405
327394
  try {
327406
- const requestedId = pickRequestedId(cleanEnv, selectedProviderId2);
327395
+ const cleanEnv = env5 ? Object.fromEntries(Object.entries(env5).filter((entry) => entry[1] !== void 0)) : void 0;
327396
+ const requestedId = cleanEnv?.[OPENAI_PROVIDER_ENV];
327407
327397
  const profile = resolveProvider(requestedId, filePath, cleanEnv);
327408
327398
  return Boolean(profile?.baseUrl && profile?.modelId);
327409
327399
  } catch (error40) {
@@ -327411,32 +327401,6 @@ function hasResolvableOpenAiProvider(env5, filePath, selectedProviderId2) {
327411
327401
  return false;
327412
327402
  }
327413
327403
  }
327414
- function describeUnusableOpenAiProvider(env5, filePath, selectedProviderId2) {
327415
- const cleanEnv = toCleanEnv(env5);
327416
- const requestedId = pickRequestedId(cleanEnv, selectedProviderId2);
327417
- if (!requestedId) {
327418
- return null;
327419
- }
327420
- try {
327421
- resolveProvider(requestedId, filePath, cleanEnv);
327422
- return null;
327423
- } catch (error40) {
327424
- if (error40 instanceof UnknownProviderError) {
327425
- return null;
327426
- }
327427
- return getErrorMessage(error40);
327428
- }
327429
- }
327430
- function pickRequestedId(cleanEnv, selectedProviderId2) {
327431
- const persisted = selectedProviderId2?.trim();
327432
- return persisted ? persisted : cleanEnv?.[OPENAI_PROVIDER_ENV];
327433
- }
327434
- function toCleanEnv(env5) {
327435
- if (!env5) {
327436
- return void 0;
327437
- }
327438
- return Object.fromEntries(Object.entries(env5).filter((entry) => entry[1] !== void 0));
327439
- }
327440
327404
  function reportUnreadableProviderFile(error40, filePath) {
327441
327405
  const path204 = filePath ?? getOpenAiProvidersPath();
327442
327406
  try {
@@ -381458,7 +381422,7 @@ function parseStringResponse(result2, parsers12, texts, trim = true) {
381458
381422
  }
381459
381423
  return lines[i4 + offset];
381460
381424
  };
381461
- parsers12.some(({ parse: parse13 }) => parse13(line, result2));
381425
+ parsers12.some(({ parse: parse14 }) => parse14(line, result2));
381462
381426
  }
381463
381427
  });
381464
381428
  return result2;
@@ -411602,7 +411566,7 @@ var require_parse11 = __commonJS({
411602
411566
  var syntaxError2 = (type2, char) => {
411603
411567
  return `Missing ${type2}: "${char}" - use "\\\\${char}" to match literal characters`;
411604
411568
  };
411605
- var parse13 = (input, options) => {
411569
+ var parse14 = (input, options) => {
411606
411570
  if (typeof input !== "string") {
411607
411571
  throw new TypeError("Expected a string");
411608
411572
  }
@@ -411750,7 +411714,7 @@ var require_parse11 = __commonJS({
411750
411714
  output = token2.close = `)$))${extglobStar}`;
411751
411715
  }
411752
411716
  if (token2.inner.includes("*") && (rest = remaining()) && /^\.[^\\/.]+$/.test(rest)) {
411753
- const expression = parse13(rest, { ...options, fastpaths: false }).output;
411717
+ const expression = parse14(rest, { ...options, fastpaths: false }).output;
411754
411718
  output = token2.close = `)${expression})${extglobStar})`;
411755
411719
  }
411756
411720
  if (token2.prev.type === "bos") {
@@ -412272,7 +412236,7 @@ var require_parse11 = __commonJS({
412272
412236
  }
412273
412237
  return state;
412274
412238
  };
412275
- parse13.fastpaths = (input, options) => {
412239
+ parse14.fastpaths = (input, options) => {
412276
412240
  const opts = { ...options };
412277
412241
  const max = typeof opts.maxLength === "number" ? Math.min(MAX_LENGTH, opts.maxLength) : MAX_LENGTH;
412278
412242
  const len = input.length;
@@ -412337,7 +412301,7 @@ var require_parse11 = __commonJS({
412337
412301
  }
412338
412302
  return source2;
412339
412303
  };
412340
- module2.exports = parse13;
412304
+ module2.exports = parse14;
412341
412305
  }
412342
412306
  });
412343
412307
 
@@ -412346,7 +412310,7 @@ var require_picomatch = __commonJS({
412346
412310
  "packages/core/node_modules/picomatch/lib/picomatch.js"(exports2, module2) {
412347
412311
  "use strict";
412348
412312
  var scan = require_scan2();
412349
- var parse13 = require_parse11();
412313
+ var parse14 = require_parse11();
412350
412314
  var utils = require_utils18();
412351
412315
  var constants8 = require_constants11();
412352
412316
  var isObject8 = (val) => val && typeof val === "object" && !Array.isArray(val);
@@ -412434,7 +412398,7 @@ var require_picomatch = __commonJS({
412434
412398
  picomatch4.isMatch = (str2, patterns, options) => picomatch4(patterns, options)(str2);
412435
412399
  picomatch4.parse = (pattern, options) => {
412436
412400
  if (Array.isArray(pattern)) return pattern.map((p2) => picomatch4.parse(p2, options));
412437
- return parse13(pattern, { ...options, fastpaths: false });
412401
+ return parse14(pattern, { ...options, fastpaths: false });
412438
412402
  };
412439
412403
  picomatch4.scan = (input, options) => scan(input, options);
412440
412404
  picomatch4.compileRe = (state, options, returnOutput = false, returnState = false) => {
@@ -412460,10 +412424,10 @@ var require_picomatch = __commonJS({
412460
412424
  }
412461
412425
  let parsed = { negated: false, fastpaths: true };
412462
412426
  if (options.fastpaths !== false && (input[0] === "." || input[0] === "*")) {
412463
- parsed.output = parse13.fastpaths(input, options);
412427
+ parsed.output = parse14.fastpaths(input, options);
412464
412428
  }
412465
412429
  if (!parsed.output) {
412466
- parsed = parse13(input, options);
412430
+ parsed = parse14(input, options);
412467
412431
  }
412468
412432
  return picomatch4.compileRe(parsed, options, returnOutput, returnState);
412469
412433
  };
@@ -428718,7 +428682,6 @@ __export(dist_exports, {
428718
428682
  USER_STEERING_INSTRUCTION: () => USER_STEERING_INSTRUCTION,
428719
428683
  UiTelemetryService: () => UiTelemetryService,
428720
428684
  UnauthorizedError: () => UnauthorizedError,
428721
- UnknownProviderError: () => UnknownProviderError,
428722
428685
  UserAccountManager: () => UserAccountManager,
428723
428686
  UserPromptEvent: () => UserPromptEvent,
428724
428687
  UserTierId: () => UserTierId,
@@ -428838,7 +428801,6 @@ __export(dist_exports, {
428838
428801
  deleteStoredSession: () => deleteStoredSession,
428839
428802
  deleteSubagentSessionDirAndArtifactsAsync: () => deleteSubagentSessionDirAndArtifactsAsync,
428840
428803
  deriveSessionShortId: () => deriveSessionShortId,
428841
- describeUnusableOpenAiProvider: () => describeUnusableOpenAiProvider,
428842
428804
  detectBOM: () => detectBOM,
428843
428805
  detectCommandSubstitution: () => detectCommandSubstitution,
428844
428806
  detectFileType: () => detectFileType,
@@ -430287,10 +430249,10 @@ var require_inc = __commonJS({
430287
430249
  var require_diff = __commonJS({
430288
430250
  "node_modules/semver/functions/diff.js"(exports2, module2) {
430289
430251
  "use strict";
430290
- var parse13 = require_parse8();
430252
+ var parse14 = require_parse8();
430291
430253
  var diff3 = (version1, version22) => {
430292
- const v13 = parse13(version1, null, true);
430293
- const v2 = parse13(version22, null, true);
430254
+ const v13 = parse14(version1, null, true);
430255
+ const v2 = parse14(version22, null, true);
430294
430256
  const comparison = v13.compare(v2);
430295
430257
  if (comparison === 0) {
430296
430258
  return null;
@@ -430361,9 +430323,9 @@ var require_patch = __commonJS({
430361
430323
  var require_prerelease = __commonJS({
430362
430324
  "node_modules/semver/functions/prerelease.js"(exports2, module2) {
430363
430325
  "use strict";
430364
- var parse13 = require_parse8();
430326
+ var parse14 = require_parse8();
430365
430327
  var prerelease = (version5, options) => {
430366
- const parsed = parse13(version5, options);
430328
+ const parsed = parse14(version5, options);
430367
430329
  return parsed && parsed.prerelease.length ? parsed.prerelease : null;
430368
430330
  };
430369
430331
  module2.exports = prerelease;
@@ -430549,7 +430511,7 @@ var require_coerce = __commonJS({
430549
430511
  "node_modules/semver/functions/coerce.js"(exports2, module2) {
430550
430512
  "use strict";
430551
430513
  var SemVer = require_semver2();
430552
- var parse13 = require_parse8();
430514
+ var parse14 = require_parse8();
430553
430515
  var { safeRe: re3, t: t3 } = require_re();
430554
430516
  var coerce2 = (version5, options) => {
430555
430517
  if (version5 instanceof SemVer) {
@@ -430584,7 +430546,7 @@ var require_coerce = __commonJS({
430584
430546
  const patch = match2[4] || "0";
430585
430547
  const prerelease = options.includePrerelease && match2[5] ? `-${match2[5]}` : "";
430586
430548
  const build = options.includePrerelease && match2[6] ? `+${match2[6]}` : "";
430587
- return parse13(`${major2}.${minor}.${patch}${prerelease}${build}`, options);
430549
+ return parse14(`${major2}.${minor}.${patch}${prerelease}${build}`, options);
430588
430550
  };
430589
430551
  module2.exports = coerce2;
430590
430552
  }
@@ -431600,7 +431562,7 @@ var require_semver3 = __commonJS({
431600
431562
  var constants8 = require_constants10();
431601
431563
  var SemVer = require_semver2();
431602
431564
  var identifiers = require_identifiers();
431603
- var parse13 = require_parse8();
431565
+ var parse14 = require_parse8();
431604
431566
  var valid = require_valid();
431605
431567
  var clean2 = require_clean();
431606
431568
  var inc = require_inc();
@@ -431638,7 +431600,7 @@ var require_semver3 = __commonJS({
431638
431600
  var simplifyRange = require_simplify();
431639
431601
  var subset = require_subset();
431640
431602
  module2.exports = {
431641
- parse: parse13,
431603
+ parse: parse14,
431642
431604
  valid,
431643
431605
  clean: clean2,
431644
431606
  inc,
@@ -436049,9 +436011,9 @@ var init_yargs_factory = __esm({
436049
436011
  __classPrivateFieldSet(this, _YargsInstance_hasOutput, true, "f");
436050
436012
  if (!__classPrivateFieldGet2(this, _YargsInstance_usage, "f").hasCachedHelpMessage()) {
436051
436013
  if (!this.parsed) {
436052
- const parse13 = this[kRunYargsParserAndExecuteCommands](__classPrivateFieldGet2(this, _YargsInstance_processArgs, "f"), void 0, void 0, 0, true);
436053
- if (isPromise(parse13)) {
436054
- return parse13.then(() => {
436014
+ const parse14 = this[kRunYargsParserAndExecuteCommands](__classPrivateFieldGet2(this, _YargsInstance_processArgs, "f"), void 0, void 0, 0, true);
436015
+ if (isPromise(parse14)) {
436016
+ return parse14.then(() => {
436055
436017
  return __classPrivateFieldGet2(this, _YargsInstance_usage, "f").help();
436056
436018
  });
436057
436019
  }
@@ -436395,9 +436357,9 @@ var init_yargs_factory = __esm({
436395
436357
  __classPrivateFieldSet(this, _YargsInstance_hasOutput, true, "f");
436396
436358
  if (!__classPrivateFieldGet2(this, _YargsInstance_usage, "f").hasCachedHelpMessage()) {
436397
436359
  if (!this.parsed) {
436398
- const parse13 = this[kRunYargsParserAndExecuteCommands](__classPrivateFieldGet2(this, _YargsInstance_processArgs, "f"), void 0, void 0, 0, true);
436399
- if (isPromise(parse13)) {
436400
- parse13.then(() => {
436360
+ const parse14 = this[kRunYargsParserAndExecuteCommands](__classPrivateFieldGet2(this, _YargsInstance_processArgs, "f"), void 0, void 0, 0, true);
436361
+ if (isPromise(parse14)) {
436362
+ parse14.then(() => {
436401
436363
  __classPrivateFieldGet2(this, _YargsInstance_usage, "f").showHelp(level);
436402
436364
  });
436403
436365
  return this;
@@ -437172,7 +437134,7 @@ var require_main2 = __commonJS({
437172
437134
  return supportsAnsi() ? `\x1B[2m${text}\x1B[0m` : text;
437173
437135
  }
437174
437136
  var LINE = /(?:^|^)\s*(?:export\s+)?([\w.-]+)(?:\s*=\s*?|:\s+?)(\s*'(?:\\'|[^'])*'|\s*"(?:\\"|[^"])*"|\s*`(?:\\`|[^`])*`|[^#\r\n]+)?\s*(?:#.*)?(?:$|$)/mg;
437175
- function parse13(src) {
437137
+ function parse14(src) {
437176
437138
  const obj = {};
437177
437139
  let lines = src.toString();
437178
437140
  lines = lines.replace(/\r\n?/mg, "\n");
@@ -437442,7 +437404,7 @@ var require_main2 = __commonJS({
437442
437404
  _parseVault,
437443
437405
  config: config2,
437444
437406
  decrypt,
437445
- parse: parse13,
437407
+ parse: parse14,
437446
437408
  populate
437447
437409
  };
437448
437410
  module2.exports.configDotenv = DotenvModule.configDotenv;
@@ -479944,7 +479906,7 @@ var require_esprima = __commonJS({
479944
479906
  var jsx_parser_1 = __webpack_require__(3);
479945
479907
  var parser_1 = __webpack_require__(8);
479946
479908
  var tokenizer_1 = __webpack_require__(15);
479947
- function parse13(code, options, delegate) {
479909
+ function parse14(code, options, delegate) {
479948
479910
  var commentHandler = null;
479949
479911
  var proxyDelegate = function(node, metadata2) {
479950
479912
  if (delegate) {
@@ -479989,17 +479951,17 @@ var require_esprima = __commonJS({
479989
479951
  }
479990
479952
  return ast;
479991
479953
  }
479992
- exports3.parse = parse13;
479954
+ exports3.parse = parse14;
479993
479955
  function parseModule(code, options, delegate) {
479994
479956
  var parsingOptions = options || {};
479995
479957
  parsingOptions.sourceType = "module";
479996
- return parse13(code, parsingOptions, delegate);
479958
+ return parse14(code, parsingOptions, delegate);
479997
479959
  }
479998
479960
  exports3.parseModule = parseModule;
479999
479961
  function parseScript(code, options, delegate) {
480000
479962
  var parsingOptions = options || {};
480001
479963
  parsingOptions.sourceType = "script";
480002
- return parse13(code, parsingOptions, delegate);
479964
+ return parse14(code, parsingOptions, delegate);
480003
479965
  }
480004
479966
  exports3.parseScript = parseScript;
480005
479967
  function tokenize3(code, options, delegate) {
@@ -487507,7 +487469,7 @@ var require_parse12 = __commonJS({
487507
487469
  }
487508
487470
  }
487509
487471
  var isObject8 = (subject) => Object(subject) === subject;
487510
- var parse13 = (code, rev, no_comments) => {
487472
+ var parse14 = (code, rev, no_comments) => {
487511
487473
  clean2();
487512
487474
  tokens = tokenize3(code);
487513
487475
  reviver = rev;
@@ -487536,7 +487498,7 @@ var require_parse12 = __commonJS({
487536
487498
  return result2;
487537
487499
  };
487538
487500
  module2.exports = {
487539
- parse: parse13,
487501
+ parse: parse14,
487540
487502
  tokenize: tokenize3
487541
487503
  };
487542
487504
  }
@@ -487781,12 +487743,12 @@ var require_stringify6 = __commonJS({
487781
487743
  // node_modules/comment-json/src/index.js
487782
487744
  var require_src64 = __commonJS({
487783
487745
  "node_modules/comment-json/src/index.js"(exports2, module2) {
487784
- var { parse: parse13, tokenize: tokenize3 } = require_parse12();
487746
+ var { parse: parse14, tokenize: tokenize3 } = require_parse12();
487785
487747
  var stringify4 = require_stringify6();
487786
487748
  var { CommentArray } = require_array();
487787
487749
  var { assign } = require_common8();
487788
487750
  module2.exports = {
487789
- parse: parse13,
487751
+ parse: parse14,
487790
487752
  stringify: stringify4,
487791
487753
  tokenize: tokenize3,
487792
487754
  CommentArray,
@@ -488322,28 +488284,6 @@ function findEnvFile(startDir, isTrusted, ignoreLocalEnv) {
488322
488284
  currentDir = parentDir;
488323
488285
  }
488324
488286
  }
488325
- function findUserLevelEnvFiles(primaryPath) {
488326
- const candidates = [
488327
- path128.join(homedir(), GEMINI_DIR, ".env"),
488328
- path128.join(homedir(), ".env")
488329
- ];
488330
- const seen = /* @__PURE__ */ new Set();
488331
- const files = [];
488332
- for (const candidate of candidates) {
488333
- const resolved = path128.resolve(candidate);
488334
- if (resolved === (primaryPath && path128.resolve(primaryPath))) {
488335
- continue;
488336
- }
488337
- if (seen.has(resolved)) {
488338
- continue;
488339
- }
488340
- seen.add(resolved);
488341
- if (fs111.existsSync(resolved)) {
488342
- files.push(resolved);
488343
- }
488344
- }
488345
- return files;
488346
- }
488347
488287
  function setUpCloudShellEnvironment(envFilePath, isTrusted, isSandboxed, selectedAuthType) {
488348
488288
  if (!process43.env[USER_GCP_PROJECT]) {
488349
488289
  const current = process43.env["GOOGLE_CLOUD_PROJECT"];
@@ -488390,36 +488330,30 @@ function loadEnvironment(settings, workspaceDir, isWorkspaceTrustedFn = isWorksp
488390
488330
  );
488391
488331
  }
488392
488332
  if (envFilePath) {
488393
- loadEnvFileIntoProcess(envFilePath, settings, isTrusted);
488394
- }
488395
- for (const fallbackPath of findUserLevelEnvFiles(envFilePath)) {
488396
- loadEnvFileIntoProcess(fallbackPath, settings, isTrusted);
488397
- }
488398
- }
488399
- function loadEnvFileIntoProcess(envFilePath, settings, isTrusted) {
488400
- try {
488401
- const envFileContent = fs111.readFileSync(envFilePath, "utf-8");
488402
- const parsedEnv = dotenv.parse(envFileContent);
488403
- const excludedVars = settings?.advanced?.excludedEnvVars || DEFAULT_EXCLUDED_ENV_VARS;
488404
- const isProjectEnvFile = !envFilePath.includes(GEMINI_DIR);
488405
- for (const key in parsedEnv) {
488406
- if (Object.hasOwn(parsedEnv, key)) {
488407
- let value = parsedEnv[key];
488408
- if (!isTrusted) {
488409
- if (!AUTH_ENV_VAR_WHITELIST.includes(key)) {
488333
+ try {
488334
+ const envFileContent = fs111.readFileSync(envFilePath, "utf-8");
488335
+ const parsedEnv = dotenv.parse(envFileContent);
488336
+ const excludedVars = settings?.advanced?.excludedEnvVars || DEFAULT_EXCLUDED_ENV_VARS;
488337
+ const isProjectEnvFile = !envFilePath.includes(GEMINI_DIR);
488338
+ for (const key in parsedEnv) {
488339
+ if (Object.hasOwn(parsedEnv, key)) {
488340
+ let value = parsedEnv[key];
488341
+ if (!isTrusted) {
488342
+ if (!AUTH_ENV_VAR_WHITELIST.includes(key)) {
488343
+ continue;
488344
+ }
488345
+ value = sanitizeEnvVar(value);
488346
+ }
488347
+ if (isProjectEnvFile && excludedVars.includes(key)) {
488410
488348
  continue;
488411
488349
  }
488412
- value = sanitizeEnvVar(value);
488413
- }
488414
- if (isProjectEnvFile && excludedVars.includes(key)) {
488415
- continue;
488416
- }
488417
- if (!Object.hasOwn(process43.env, key)) {
488418
- process43.env[key] = value;
488350
+ if (!Object.hasOwn(process43.env, key)) {
488351
+ process43.env[key] = value;
488352
+ }
488419
488353
  }
488420
488354
  }
488355
+ } catch {
488421
488356
  }
488422
- } catch {
488423
488357
  }
488424
488358
  }
488425
488359
  function isWorktreeEnabled(settings) {
@@ -488498,6 +488432,417 @@ function resolveSettings(rawSettings, filePath, settingsErrors) {
488498
488432
  }
488499
488433
  return validationResult.data ?? expandedSettings;
488500
488434
  }
488435
+ function getCommandBaseName(command2) {
488436
+ return command2.split(/[\\/]/).pop()?.toLowerCase().replace(/\.(exe|cmd|bat)$/, "");
488437
+ }
488438
+ function isExplicitCommandPath(command2) {
488439
+ return path128.isAbsolute(command2) || command2.includes("/") || command2.includes("\\");
488440
+ }
488441
+ function resolveMcpCommandPath(command2, cwd7, workspaceDir) {
488442
+ if (path128.isAbsolute(command2) || /^[a-zA-Z]:[\\/]/.test(command2)) {
488443
+ return command2;
488444
+ }
488445
+ const baseDir = cwd7 ? path128.resolve(workspaceDir, cwd7) : workspaceDir;
488446
+ return path128.resolve(baseDir, command2);
488447
+ }
488448
+ function hasExistingScriptOnDisk(resolvedPath) {
488449
+ try {
488450
+ if (fs111.existsSync(resolvedPath)) {
488451
+ return true;
488452
+ }
488453
+ for (const ext2 of IMPLICIT_SCRIPT_EXTENSIONS) {
488454
+ if (fs111.existsSync(`${resolvedPath}${ext2}`)) {
488455
+ return true;
488456
+ }
488457
+ }
488458
+ return false;
488459
+ } catch {
488460
+ return true;
488461
+ }
488462
+ }
488463
+ function isScriptPathCandidate(token2, cwd7, workspaceDir) {
488464
+ if (/^\d+$/.test(token2)) {
488465
+ return false;
488466
+ }
488467
+ const ext2 = path128.extname(token2).toLowerCase();
488468
+ if (ext2 !== "") {
488469
+ return SCRIPT_EXTENSIONS.has(ext2);
488470
+ }
488471
+ if (isExplicitCommandPath(token2)) {
488472
+ return true;
488473
+ }
488474
+ return hasExistingScriptOnDisk(
488475
+ resolveMcpCommandPath(token2, cwd7, workspaceDir)
488476
+ );
488477
+ }
488478
+ function isPreloadTargetCandidate(token2, cwd7, workspaceDir) {
488479
+ return isExplicitCommandPath(token2) || isScriptPathCandidate(token2, cwd7, workspaceDir);
488480
+ }
488481
+ function expandCandidatePaths(resolvedPath) {
488482
+ const paths = [resolvedPath];
488483
+ if (path128.extname(resolvedPath) !== "") {
488484
+ return paths;
488485
+ }
488486
+ for (const ext2 of IMPLICIT_SCRIPT_EXTENSIONS) {
488487
+ const withExt = `${resolvedPath}${ext2}`;
488488
+ try {
488489
+ if (fs111.existsSync(withExt)) {
488490
+ paths.push(withExt);
488491
+ }
488492
+ } catch {
488493
+ paths.push(withExt);
488494
+ }
488495
+ }
488496
+ return paths;
488497
+ }
488498
+ function unwrapEnvInvocation(command2, args2, cwd7, workspaceDir) {
488499
+ let currentCmd = command2.trim();
488500
+ let currentArgs = [...args2 ?? []];
488501
+ let effectiveCwd = cwd7;
488502
+ const wrapperPaths = [];
488503
+ while (currentCmd && getCommandBaseName(currentCmd) === "env") {
488504
+ if (isExplicitCommandPath(currentCmd)) {
488505
+ wrapperPaths.push(currentCmd);
488506
+ }
488507
+ let idx = 0;
488508
+ let stopEnvOptions = false;
488509
+ while (idx < currentArgs.length) {
488510
+ const token2 = currentArgs[idx]?.trim() ?? "";
488511
+ if (!token2) {
488512
+ idx++;
488513
+ continue;
488514
+ }
488515
+ if (!stopEnvOptions && token2 === "--") {
488516
+ stopEnvOptions = true;
488517
+ idx++;
488518
+ continue;
488519
+ }
488520
+ if (!stopEnvOptions && token2.startsWith("-") && token2 !== "-") {
488521
+ if (token2 === "-u" || token2 === "--unset") {
488522
+ idx += 2;
488523
+ continue;
488524
+ }
488525
+ if (token2 === "-C" || token2 === "--chdir") {
488526
+ const dirArg = currentArgs[idx + 1]?.trim();
488527
+ if (dirArg) {
488528
+ effectiveCwd = effectiveCwd ? path128.resolve(workspaceDir, effectiveCwd, dirArg) : dirArg;
488529
+ }
488530
+ idx += 2;
488531
+ continue;
488532
+ }
488533
+ if (token2.startsWith("--chdir=")) {
488534
+ const dirArg = token2.slice("--chdir=".length).trim();
488535
+ if (dirArg) {
488536
+ effectiveCwd = effectiveCwd ? path128.resolve(workspaceDir, effectiveCwd, dirArg) : dirArg;
488537
+ }
488538
+ idx++;
488539
+ continue;
488540
+ }
488541
+ if (token2 === "-S" || token2 === "--split-string" || token2.startsWith("-S") || token2.startsWith("--split-string=")) {
488542
+ const splitRaw = token2 === "-S" || token2 === "--split-string" ? currentArgs[idx + 1] ?? "" : token2.startsWith("--split-string=") ? token2.slice("--split-string=".length) : token2.slice(2);
488543
+ const consumed = token2 === "-S" || token2 === "--split-string" ? 2 : 1;
488544
+ try {
488545
+ const parsed = (0, import_shell_quote9.parse)(splitRaw);
488546
+ const strTokens = parsed.filter(
488547
+ (t3) => typeof t3 === "string"
488548
+ );
488549
+ if (strTokens.length !== parsed.length) {
488550
+ return {
488551
+ command: "",
488552
+ args: [],
488553
+ cwd: effectiveCwd,
488554
+ wrapperPaths,
488555
+ unsafeSplitString: splitRaw
488556
+ };
488557
+ }
488558
+ currentArgs = [...strTokens, ...currentArgs.slice(idx + consumed)];
488559
+ idx = 0;
488560
+ continue;
488561
+ } catch {
488562
+ return {
488563
+ command: "",
488564
+ args: [],
488565
+ cwd: effectiveCwd,
488566
+ wrapperPaths,
488567
+ unsafeSplitString: splitRaw
488568
+ };
488569
+ }
488570
+ }
488571
+ idx++;
488572
+ continue;
488573
+ }
488574
+ if (token2.includes("=") && !token2.startsWith("=")) {
488575
+ idx++;
488576
+ continue;
488577
+ }
488578
+ break;
488579
+ }
488580
+ if (idx < currentArgs.length) {
488581
+ currentCmd = currentArgs[idx]?.trim() ?? "";
488582
+ currentArgs = currentArgs.slice(idx + 1);
488583
+ } else {
488584
+ currentCmd = "";
488585
+ currentArgs = [];
488586
+ }
488587
+ }
488588
+ return {
488589
+ command: currentCmd,
488590
+ args: currentArgs,
488591
+ cwd: effectiveCwd,
488592
+ wrapperPaths
488593
+ };
488594
+ }
488595
+ function extractInterpreterScriptArgs(command2, args2, cwd7, workspaceDir) {
488596
+ if (!args2 || args2.length === 0) {
488597
+ return [];
488598
+ }
488599
+ const baseName = getCommandBaseName(command2);
488600
+ if (!baseName || !SCRIPT_INTERPRETERS.has(baseName)) {
488601
+ return [];
488602
+ }
488603
+ const candidates = [];
488604
+ let expectPreloadValue = false;
488605
+ let skipNextValue = false;
488606
+ let prevWasUnknownFlag = false;
488607
+ let sawSubcommand = false;
488608
+ let afterDoubleDash = false;
488609
+ for (const arg of args2) {
488610
+ const trimmed2 = arg.trim();
488611
+ if (!trimmed2) continue;
488612
+ if (afterDoubleDash) {
488613
+ if (isPreloadTargetCandidate(trimmed2, cwd7, workspaceDir)) {
488614
+ candidates.push(trimmed2);
488615
+ }
488616
+ break;
488617
+ }
488618
+ if (expectPreloadValue) {
488619
+ if (isPreloadTargetCandidate(trimmed2, cwd7, workspaceDir)) {
488620
+ candidates.push(trimmed2);
488621
+ }
488622
+ expectPreloadValue = false;
488623
+ prevWasUnknownFlag = false;
488624
+ continue;
488625
+ }
488626
+ if (skipNextValue) {
488627
+ skipNextValue = false;
488628
+ prevWasUnknownFlag = false;
488629
+ continue;
488630
+ }
488631
+ if (trimmed2 === "--") {
488632
+ afterDoubleDash = true;
488633
+ prevWasUnknownFlag = false;
488634
+ continue;
488635
+ }
488636
+ if (WINDOWS_SLASH_FLAG_INTERPRETERS.has(baseName) && /^\/(\/)?[a-zA-Z?][a-zA-Z0-9:_-]*$/.test(trimmed2)) {
488637
+ prevWasUnknownFlag = false;
488638
+ continue;
488639
+ }
488640
+ if (trimmed2.startsWith("-") && trimmed2 !== "-") {
488641
+ const eqIndex = trimmed2.indexOf("=");
488642
+ const rawFlag = eqIndex >= 0 ? trimmed2.slice(0, eqIndex) : trimmed2;
488643
+ const flagName = rawFlag.length === 2 ? rawFlag : rawFlag.toLowerCase();
488644
+ if (INLINE_EVAL_FLAGS.has(flagName)) {
488645
+ break;
488646
+ }
488647
+ if (PRELOAD_FLAGS.has(flagName)) {
488648
+ if (eqIndex >= 0) {
488649
+ const inlineValue = trimmed2.slice(eqIndex + 1).trim();
488650
+ if (inlineValue && isPreloadTargetCandidate(inlineValue, cwd7, workspaceDir)) {
488651
+ candidates.push(inlineValue);
488652
+ }
488653
+ prevWasUnknownFlag = false;
488654
+ } else {
488655
+ expectPreloadValue = true;
488656
+ prevWasUnknownFlag = false;
488657
+ }
488658
+ } else if (eqIndex < 0 && NON_SCRIPT_VALUE_FLAGS.has(flagName)) {
488659
+ skipNextValue = true;
488660
+ prevWasUnknownFlag = false;
488661
+ } else {
488662
+ prevWasUnknownFlag = eqIndex < 0 && !KNOWN_BOOLEAN_FLAGS.has(flagName);
488663
+ }
488664
+ continue;
488665
+ }
488666
+ if (!sawSubcommand && candidates.length === 0 && SUBCOMMAND_INTERPRETERS.has(baseName) && INTERPRETER_SUBCOMMANDS.has(trimmed2.toLowerCase())) {
488667
+ sawSubcommand = true;
488668
+ prevWasUnknownFlag = false;
488669
+ continue;
488670
+ }
488671
+ if (isScriptPathCandidate(trimmed2, cwd7, workspaceDir)) {
488672
+ candidates.push(trimmed2);
488673
+ if (!prevWasUnknownFlag) {
488674
+ break;
488675
+ }
488676
+ }
488677
+ prevWasUnknownFlag = false;
488678
+ }
488679
+ return candidates;
488680
+ }
488681
+ function findInsecureMcpTarget(command2, args2, cwd7, ctx) {
488682
+ const initialCmd = command2?.trim();
488683
+ if (!initialCmd) {
488684
+ return void 0;
488685
+ }
488686
+ const unwrapped = unwrapEnvInvocation(
488687
+ initialCmd,
488688
+ args2,
488689
+ cwd7,
488690
+ ctx.workspaceDir
488691
+ );
488692
+ if (unwrapped.unsafeSplitString !== void 0) {
488693
+ return {
488694
+ target: unwrapped.unsafeSplitString,
488695
+ reason: "Unsupported shell operators or malformed env -S string."
488696
+ };
488697
+ }
488698
+ for (const wrapperPath of unwrapped.wrapperPaths) {
488699
+ const resolvedWrapper = resolveMcpCommandPath(
488700
+ wrapperPath,
488701
+ cwd7,
488702
+ ctx.workspaceDir
488703
+ );
488704
+ const wrapperCheck = isFileAndDirectorySecureSync(
488705
+ resolvedWrapper,
488706
+ ctx.securityCache
488707
+ );
488708
+ if (!wrapperCheck.secure) {
488709
+ return {
488710
+ target: wrapperPath,
488711
+ reason: wrapperCheck.reason ?? "Insecure file or directory."
488712
+ };
488713
+ }
488714
+ }
488715
+ if (!unwrapped.command) {
488716
+ return void 0;
488717
+ }
488718
+ const effectiveCwd = unwrapped.cwd;
488719
+ const candidates = [];
488720
+ if (isExplicitCommandPath(unwrapped.command) || path128.extname(unwrapped.command) !== "" && isScriptPathCandidate(unwrapped.command, effectiveCwd, ctx.workspaceDir)) {
488721
+ candidates.push(unwrapped.command);
488722
+ }
488723
+ candidates.push(
488724
+ ...extractInterpreterScriptArgs(
488725
+ unwrapped.command,
488726
+ unwrapped.args,
488727
+ effectiveCwd,
488728
+ ctx.workspaceDir
488729
+ )
488730
+ );
488731
+ for (const target of candidates) {
488732
+ const resolved = resolveMcpCommandPath(
488733
+ target,
488734
+ effectiveCwd,
488735
+ ctx.workspaceDir
488736
+ );
488737
+ for (const candidatePath of expandCandidatePaths(resolved)) {
488738
+ const check2 = isFileAndDirectorySecureSync(
488739
+ candidatePath,
488740
+ ctx.securityCache
488741
+ );
488742
+ if (!check2.secure) {
488743
+ return {
488744
+ target,
488745
+ reason: check2.reason ?? "Insecure file or directory."
488746
+ };
488747
+ }
488748
+ }
488749
+ }
488750
+ return void 0;
488751
+ }
488752
+ function sanitizeSystemMcpServerMap(settings, ctx) {
488753
+ const skipped = [];
488754
+ for (const [serverName, serverConfig] of Object.entries(
488755
+ settings.mcpServers ?? {}
488756
+ )) {
488757
+ const insecure = findInsecureMcpTarget(
488758
+ serverConfig.command,
488759
+ serverConfig.args,
488760
+ serverConfig.cwd,
488761
+ ctx
488762
+ );
488763
+ if (!insecure) continue;
488764
+ ctx.settingsErrors.push({
488765
+ message: `Security Warning: Skipping MCP server '${serverName}' in ${ctx.fileLabel} file '${ctx.settingsFilePath}' due to insecure command path '${insecure.target}': ${insecure.reason}`,
488766
+ path: ctx.settingsFilePath,
488767
+ severity: "warning"
488768
+ });
488769
+ delete settings.mcpServers?.[serverName];
488770
+ skipped.push(serverName);
488771
+ }
488772
+ return skipped;
488773
+ }
488774
+ function sanitizeSystemMcpServerCommand(settings, ctx) {
488775
+ if (!settings.mcp?.serverCommand) {
488776
+ return;
488777
+ }
488778
+ let tokens;
488779
+ try {
488780
+ const parsedTokens = (0, import_shell_quote9.parse)(settings.mcp.serverCommand);
488781
+ const stringTokens = parsedTokens.filter(
488782
+ (token2) => typeof token2 === "string"
488783
+ );
488784
+ if (stringTokens.length !== parsedTokens.length) {
488785
+ ctx.settingsErrors.push({
488786
+ message: `Security Warning: Skipping mcp.serverCommand in ${ctx.fileLabel} file '${ctx.settingsFilePath}' due to presence of shell operators.`,
488787
+ path: ctx.settingsFilePath,
488788
+ severity: "warning"
488789
+ });
488790
+ delete settings.mcp.serverCommand;
488791
+ return;
488792
+ }
488793
+ tokens = stringTokens;
488794
+ } catch (err2) {
488795
+ ctx.settingsErrors.push({
488796
+ message: `Security Warning: Skipping mcp.serverCommand in ${ctx.fileLabel} file '${ctx.settingsFilePath}' due to parse failure: ${getErrorMessage(err2)}`,
488797
+ path: ctx.settingsFilePath,
488798
+ severity: "warning"
488799
+ });
488800
+ delete settings.mcp.serverCommand;
488801
+ return;
488802
+ }
488803
+ const insecure = findInsecureMcpTarget(
488804
+ tokens[0],
488805
+ tokens.slice(1),
488806
+ void 0,
488807
+ ctx
488808
+ );
488809
+ if (!insecure) {
488810
+ return;
488811
+ }
488812
+ ctx.settingsErrors.push({
488813
+ message: `Security Warning: Skipping mcp.serverCommand in ${ctx.fileLabel} file '${ctx.settingsFilePath}' due to insecure command path '${insecure.target}': ${insecure.reason}`,
488814
+ path: ctx.settingsFilePath,
488815
+ severity: "warning"
488816
+ });
488817
+ delete settings.mcp.serverCommand;
488818
+ }
488819
+ function stripBlockedMcpServers(settings, blockedIds) {
488820
+ if (blockedIds.size === 0 || !settings.mcpServers) {
488821
+ return;
488822
+ }
488823
+ for (const key of Object.keys(settings.mcpServers)) {
488824
+ if (blockedIds.has(key.toLowerCase().trim())) {
488825
+ delete settings.mcpServers[key];
488826
+ }
488827
+ }
488828
+ }
488829
+ function blockSkippedSystemMcpServers(skippedServers, allScopes, systemSettings) {
488830
+ const blockedIds = new Set(
488831
+ skippedServers.map((name3) => name3.toLowerCase().trim())
488832
+ );
488833
+ if (blockedIds.size === 0) {
488834
+ return blockedIds;
488835
+ }
488836
+ for (const scopeSettings of allScopes) {
488837
+ stripBlockedMcpServers(scopeSettings, blockedIds);
488838
+ }
488839
+ const existingExcluded = systemSettings.mcp?.excluded ?? [];
488840
+ systemSettings.mcp = {
488841
+ ...systemSettings.mcp,
488842
+ excluded: [.../* @__PURE__ */ new Set([...existingExcluded, ...skippedServers])]
488843
+ };
488844
+ return blockedIds;
488845
+ }
488501
488846
  function _doLoadSettings(workspaceDir) {
488502
488847
  let systemSettings = {};
488503
488848
  let systemDefaultSettings = {};
@@ -488638,6 +488983,31 @@ function _doLoadSettings(workspaceDir) {
488638
488983
  workspaceSettingsPath,
488639
488984
  settingsErrors
488640
488985
  ) : {};
488986
+ const systemCheckCtx = {
488987
+ workspaceDir,
488988
+ settingsFilePath: systemSettingsPath,
488989
+ fileLabel: "system settings",
488990
+ securityCache,
488991
+ settingsErrors
488992
+ };
488993
+ const defaultsCheckCtx = {
488994
+ workspaceDir,
488995
+ settingsFilePath: systemDefaultsPath,
488996
+ fileLabel: "system defaults",
488997
+ securityCache,
488998
+ settingsErrors
488999
+ };
489000
+ const skippedSystemServers = [
489001
+ ...sanitizeSystemMcpServerMap(systemSettings, systemCheckCtx),
489002
+ ...sanitizeSystemMcpServerMap(systemDefaultSettings, defaultsCheckCtx)
489003
+ ];
489004
+ sanitizeSystemMcpServerCommand(systemSettings, systemCheckCtx);
489005
+ sanitizeSystemMcpServerCommand(systemDefaultSettings, defaultsCheckCtx);
489006
+ const blockedSystemMcpServerIds = blockSkippedSystemMcpServers(
489007
+ skippedSystemServers,
489008
+ [systemSettings, systemDefaultSettings, userSettings, workspaceSettings],
489009
+ systemSettings
489010
+ );
488641
489011
  normalizeLegacyTheme(userSettings);
488642
489012
  normalizeLegacyTheme(workspaceSettings);
488643
489013
  const fatalErrors = settingsErrors.filter((e3) => e3.severity === "error");
@@ -488680,7 +489050,8 @@ Please fix the configuration file(s) and try again.`
488680
489050
  readOnly: storage2.isWorkspaceHomeDir()
488681
489051
  },
488682
489052
  isTrusted,
488683
- settingsErrors
489053
+ settingsErrors,
489054
+ blockedSystemMcpServerIds
488684
489055
  );
488685
489056
  migrateDeprecatedSettings(loadedSettings);
488686
489057
  return loadedSettings;
@@ -489075,12 +489446,13 @@ function migrateExperimentalSettings(settingsFile, loadedSettings, scope, remove
489075
489446
  }
489076
489447
  return false;
489077
489448
  }
489078
- var dotenv, import_strip_json_comments3, USER_SETTINGS_PATH, USER_SETTINGS_DIR, DEFAULT_EXCLUDED_ENV_VARS, AUTH_ENV_VAR_WHITELIST, SettingScope, _loadableSettingScopes, UNTRUSTED_WORKSPACE_SETTINGS_ERROR, LoadedSettings, USER_GCP_PROJECT, settingsCache;
489449
+ var dotenv, import_shell_quote9, import_strip_json_comments3, USER_SETTINGS_PATH, USER_SETTINGS_DIR, DEFAULT_EXCLUDED_ENV_VARS, AUTH_ENV_VAR_WHITELIST, SettingScope, _loadableSettingScopes, UNTRUSTED_WORKSPACE_SETTINGS_ERROR, LoadedSettings, USER_GCP_PROJECT, settingsCache, SCRIPT_INTERPRETERS, WINDOWS_SLASH_FLAG_INTERPRETERS, INLINE_EVAL_FLAGS, PRELOAD_FLAGS, SCRIPT_EXTENSIONS, NON_SCRIPT_VALUE_FLAGS, KNOWN_BOOLEAN_FLAGS, SUBCOMMAND_INTERPRETERS, INTERPRETER_SUBCOMMANDS, IMPLICIT_SCRIPT_EXTENSIONS;
489079
489450
  var init_settings = __esm({
489080
489451
  "packages/cli/src/config/settings.ts"() {
489081
489452
  "use strict";
489082
489453
  dotenv = __toESM(require_main2(), 1);
489083
489454
  init_dist4();
489455
+ import_shell_quote9 = __toESM(require_shell_quote(), 1);
489084
489456
  import_strip_json_comments3 = __toESM(require_strip_json_comments(), 1);
489085
489457
  init_default_light();
489086
489458
  init_default_dark();
@@ -489120,12 +489492,13 @@ var init_settings = __esm({
489120
489492
  ];
489121
489493
  UNTRUSTED_WORKSPACE_SETTINGS_ERROR = "Cannot modify settings in an untrusted workspace. To enable this, verify the source of the repository and set GEMINI_CLI_TRUST_WORKSPACE=true or move your configuration to the global settings file.";
489122
489494
  LoadedSettings = class {
489123
- constructor(system, systemDefaults, user, workspace, isTrusted, errors = []) {
489495
+ constructor(system, systemDefaults, user, workspace, isTrusted, errors = [], blockedMcpServers = /* @__PURE__ */ new Set()) {
489124
489496
  this.system = system;
489125
489497
  this.systemDefaults = systemDefaults;
489126
489498
  this.user = user;
489127
489499
  this._workspaceFile = workspace;
489128
489500
  this.isTrusted = isTrusted;
489501
+ this._blockedMcpServers = blockedMcpServers;
489129
489502
  this.workspace = isTrusted ? workspace : this.createEmptyWorkspace(workspace);
489130
489503
  this.errors = errors;
489131
489504
  this._merged = this.computeMergedSettings();
@@ -489138,6 +489511,7 @@ var init_settings = __esm({
489138
489511
  isTrusted;
489139
489512
  errors;
489140
489513
  _workspaceFile;
489514
+ _blockedMcpServers;
489141
489515
  _merged;
489142
489516
  _snapshot;
489143
489517
  _remoteAdminSettings;
@@ -489164,6 +489538,10 @@ var init_settings = __esm({
489164
489538
  this.errors
489165
489539
  );
489166
489540
  normalizeLegacyTheme(resolvedWorkspaceSettings);
489541
+ stripBlockedMcpServers(
489542
+ resolvedWorkspaceSettings,
489543
+ this._blockedMcpServers
489544
+ );
489167
489545
  this._workspaceFile = {
489168
489546
  ...this._workspaceFile,
489169
489547
  settings: resolvedWorkspaceSettings
@@ -489191,6 +489569,7 @@ var init_settings = __esm({
489191
489569
  workspaceSettings,
489192
489570
  isTrusted
489193
489571
  );
489572
+ stripBlockedMcpServers(merged, this._blockedMcpServers);
489194
489573
  const adminSettingSchema = getSettingsSchema().admin;
489195
489574
  if (adminSettingSchema?.properties) {
489196
489575
  const adminSchema = adminSettingSchema.properties;
@@ -489338,6 +489717,160 @@ var init_settings = __esm({
489338
489717
  defaultTtl: 1e4
489339
489718
  // 10 seconds
489340
489719
  });
489720
+ SCRIPT_INTERPRETERS = /* @__PURE__ */ new Set([
489721
+ "sh",
489722
+ "bash",
489723
+ "zsh",
489724
+ "dash",
489725
+ "ksh",
489726
+ "fish",
489727
+ "csh",
489728
+ "tcsh",
489729
+ "node",
489730
+ "nodejs",
489731
+ "python",
489732
+ "python2",
489733
+ "python3",
489734
+ "py",
489735
+ "ruby",
489736
+ "perl",
489737
+ "php",
489738
+ "lua",
489739
+ "rscript",
489740
+ "pwsh",
489741
+ "powershell",
489742
+ "deno",
489743
+ "bun",
489744
+ "tsx",
489745
+ "ts-node",
489746
+ "ts-node-esm",
489747
+ "cmd",
489748
+ "osascript",
489749
+ "cscript",
489750
+ "wscript"
489751
+ ]);
489752
+ WINDOWS_SLASH_FLAG_INTERPRETERS = /* @__PURE__ */ new Set(["cmd", "cscript", "wscript"]);
489753
+ INLINE_EVAL_FLAGS = /* @__PURE__ */ new Set([
489754
+ "-c",
489755
+ "-e",
489756
+ "-E",
489757
+ "--eval",
489758
+ "-p",
489759
+ "--print",
489760
+ "-command",
489761
+ "-encodedcommand"
489762
+ ]);
489763
+ PRELOAD_FLAGS = /* @__PURE__ */ new Set([
489764
+ "-r",
489765
+ "--require",
489766
+ "--import",
489767
+ "--loader",
489768
+ "--experimental-loader",
489769
+ "--preload",
489770
+ "--env-file",
489771
+ "--env-file-if-exists",
489772
+ "-f",
489773
+ "-file"
489774
+ ]);
489775
+ SCRIPT_EXTENSIONS = /* @__PURE__ */ new Set([
489776
+ ".js",
489777
+ ".mjs",
489778
+ ".cjs",
489779
+ ".jsx",
489780
+ ".node",
489781
+ ".ts",
489782
+ ".mts",
489783
+ ".cts",
489784
+ ".tsx",
489785
+ ".py",
489786
+ ".pyw",
489787
+ ".py3",
489788
+ ".pyz",
489789
+ ".sh",
489790
+ ".bash",
489791
+ ".zsh",
489792
+ ".ksh",
489793
+ ".fish",
489794
+ ".csh",
489795
+ ".pl",
489796
+ ".pm",
489797
+ ".rb",
489798
+ ".php",
489799
+ ".phar",
489800
+ ".lua",
489801
+ ".r",
489802
+ ".ps1",
489803
+ ".psm1",
489804
+ ".cmd",
489805
+ ".bat",
489806
+ ".vbs",
489807
+ ".vbe",
489808
+ ".jse",
489809
+ ".wsf",
489810
+ ".wsh",
489811
+ ".scpt",
489812
+ ".scptd",
489813
+ ".applescript"
489814
+ ]);
489815
+ NON_SCRIPT_VALUE_FLAGS = /* @__PURE__ */ new Set([
489816
+ "-W",
489817
+ "-m",
489818
+ "-I",
489819
+ "-M",
489820
+ "-K",
489821
+ "-F",
489822
+ "-C",
489823
+ "-P",
489824
+ "--project",
489825
+ "--config",
489826
+ "--log-file",
489827
+ "--max-old-space-size",
489828
+ "--inspect-port",
489829
+ "--debug-port",
489830
+ "--conditions",
489831
+ "--input-type",
489832
+ "--title",
489833
+ "-executionpolicy"
489834
+ ]);
489835
+ KNOWN_BOOLEAN_FLAGS = /* @__PURE__ */ new Set([
489836
+ "-x",
489837
+ "-v",
489838
+ "-n",
489839
+ "-u",
489840
+ "-w",
489841
+ "-d",
489842
+ "-O",
489843
+ "-B",
489844
+ "-s",
489845
+ "-S",
489846
+ "-i",
489847
+ "-t",
489848
+ "--watch",
489849
+ "--no-warnings",
489850
+ "--trace-warnings",
489851
+ "--inspect",
489852
+ "--inspect-brk",
489853
+ "--enable-source-maps",
489854
+ "--preserve-symlinks",
489855
+ "--no-deprecation",
489856
+ "--throw-deprecation",
489857
+ "-noprofile",
489858
+ "-noninteractive",
489859
+ "-sta",
489860
+ "-mta"
489861
+ ]);
489862
+ SUBCOMMAND_INTERPRETERS = /* @__PURE__ */ new Set(["deno", "bun"]);
489863
+ INTERPRETER_SUBCOMMANDS = /* @__PURE__ */ new Set(["run", "x", "serve", "test", "bench"]);
489864
+ IMPLICIT_SCRIPT_EXTENSIONS = [
489865
+ ".js",
489866
+ ".mjs",
489867
+ ".cjs",
489868
+ ".ts",
489869
+ ".mts",
489870
+ ".cts",
489871
+ ".py",
489872
+ ".ps1"
489873
+ ];
489341
489874
  }
489342
489875
  });
489343
489876
 
@@ -511400,72 +511933,7 @@ var init_gemma = __esm({
511400
511933
  }
511401
511934
  });
511402
511935
 
511403
- // packages/cli/src/ui/openai/openAiProviderPreference.ts
511404
- function readPersistedProviderId(settings) {
511405
- const id = settings?.security?.auth?.openAiProviderId;
511406
- return typeof id === "string" && id.trim().length > 0 ? id : void 0;
511407
- }
511408
- function persistProviderId(settings, providerId) {
511409
- try {
511410
- settings.setValue(
511411
- "User" /* User */,
511412
- OPENAI_PROVIDER_SETTING_KEY,
511413
- providerId
511414
- );
511415
- } catch {
511416
- }
511417
- }
511418
- function persistOpenAiMode(settings) {
511419
- try {
511420
- settings.setValue(
511421
- "User" /* User */,
511422
- AUTH_MODE_SETTING_KEY,
511423
- AuthType2.USE_OPENAI
511424
- );
511425
- } catch {
511426
- }
511427
- }
511428
- function hasConfiguredProviders() {
511429
- try {
511430
- return loadProviderEntries().length > 0;
511431
- } catch {
511432
- return false;
511433
- }
511434
- }
511435
- function providerHasDefaultModel(providerId) {
511436
- try {
511437
- const entry = loadProviderEntries().find(
511438
- (candidate) => candidate.id === providerId
511439
- );
511440
- if (!entry) {
511441
- return true;
511442
- }
511443
- return Boolean(entry.modelId);
511444
- } catch {
511445
- return true;
511446
- }
511447
- }
511448
- function rememberModelForProvider(providerId, modelId) {
511449
- if (!providerId || modelId.trim().length === 0) {
511450
- return;
511451
- }
511452
- persistProviderModelId(providerId, modelId);
511453
- }
511454
- var OPENAI_PROVIDER_SETTING_KEY, AUTH_MODE_SETTING_KEY;
511455
- var init_openAiProviderPreference = __esm({
511456
- "packages/cli/src/ui/openai/openAiProviderPreference.ts"() {
511457
- "use strict";
511458
- init_settings();
511459
- init_dist4();
511460
- OPENAI_PROVIDER_SETTING_KEY = "security.auth.openAiProviderId";
511461
- AUTH_MODE_SETTING_KEY = "security.auth.selectedType";
511462
- }
511463
- });
511464
-
511465
511936
  // packages/cli/src/config/auth.ts
511466
- function selectedProviderId() {
511467
- return readPersistedProviderId(loadSettings().merged);
511468
- }
511469
511937
  function isOpenAiEndpointConfigured() {
511470
511938
  loadEnvironment(loadSettings().merged, process.cwd());
511471
511939
  const hasBaseUrl = hasOpenAiBaseUrl();
@@ -511475,11 +511943,7 @@ function isOpenAiEndpointConfigured() {
511475
511943
  if (hasBaseUrl && hasModelId) {
511476
511944
  return true;
511477
511945
  }
511478
- return hasResolvableOpenAiProvider(
511479
- { ...process.env },
511480
- void 0,
511481
- selectedProviderId()
511482
- );
511946
+ return hasResolvableOpenAiProvider({ ...process.env });
511483
511947
  }
511484
511948
  function hasOpenAiBaseUrl() {
511485
511949
  loadEnvironment(loadSettings().merged, process.cwd());
@@ -511508,8 +511972,7 @@ async function validateAuthMethod(authMethod) {
511508
511972
  return null;
511509
511973
  }
511510
511974
  if (authMethod === AuthType2.USE_OPENAI) {
511511
- const selected = selectedProviderId();
511512
- if (hasResolvableOpenAiProvider({ ...process.env }, void 0, selected)) {
511975
+ if (hasResolvableOpenAiProvider({ ...process.env })) {
511513
511976
  try {
511514
511977
  parseHeaderJson(process.env["GEMINI_OPENAI_HEADERS"]);
511515
511978
  } catch (error40) {
@@ -511517,14 +511980,6 @@ async function validateAuthMethod(authMethod) {
511517
511980
  }
511518
511981
  return null;
511519
511982
  }
511520
- const providerFailure = describeUnusableOpenAiProvider(
511521
- { ...process.env },
511522
- void 0,
511523
- selected
511524
- );
511525
- if (providerFailure) {
511526
- return providerFailure;
511527
- }
511528
511983
  if (!process.env["GEMINI_OPENAI_BASE_URL"] && !process.env["GOOGLE_GEMINI_BASE_URL"]) {
511529
511984
  return "When using an OpenAI-compatible API, you must specify the GEMINI_OPENAI_BASE_URL environment variable.\nUpdate your environment and try again (no reload needed if using .env)!";
511530
511985
  }
@@ -511545,7 +512000,6 @@ var init_auth3 = __esm({
511545
512000
  "use strict";
511546
512001
  init_dist4();
511547
512002
  init_settings();
511548
- init_openAiProviderPreference();
511549
512003
  }
511550
512004
  });
511551
512005
 
@@ -512132,7 +512586,7 @@ async function loadSandboxConfig(settings, argv) {
512132
512586
  }
512133
512587
  const command2 = getSandboxCommand(sandboxValue);
512134
512588
  const packageJson2 = await getPackageJson(__dirname11);
512135
- const image3 = process.env["GEMINI_SANDBOX_IMAGE"] ?? "us-docker.pkg.dev/gemini-code-dev/gemini-cli/sandbox:0.1.30" ?? customImage ?? packageJson2?.config?.sandboxImageUri;
512589
+ const image3 = process.env["GEMINI_SANDBOX_IMAGE"] ?? "us-docker.pkg.dev/gemini-code-dev/gemini-cli/sandbox:0.70.0-nightly.20261110.g1603e9bab" ?? customImage ?? packageJson2?.config?.sandboxImageUri;
512136
512590
  const isNative = command2 === "windows-native" || command2 === "sandbox-exec" || command2 === "lxc";
512137
512591
  return command2 && (image3 || isNative) ? { enabled: true, allowedPaths, networkAccess, command: command2, image: image3 } : void 0;
512138
512592
  }
@@ -513636,17 +514090,17 @@ function entrypoint(workdir, cliArgs) {
513636
514090
  `socat TCP4-LISTEN:${p2},bind=$(hostname -i),fork,reuseaddr TCP4:127.0.0.1:${p2} 2> /dev/null &`
513637
514091
  )
513638
514092
  );
513639
- const quotedCliArgs = cliArgs.slice(2).map((arg) => (0, import_shell_quote9.quote)([arg]));
514093
+ const quotedCliArgs = cliArgs.slice(2).map((arg) => (0, import_shell_quote10.quote)([arg]));
513640
514094
  const isDebugMode2 = process.env["DEBUG"] === "true" || process.env["DEBUG"] === "1";
513641
514095
  const cliCmd = false ? isDebugMode2 ? "npm run debug --" : "npm rebuild && npm run start --" : isDebugMode2 ? `node --inspect-brk=0.0.0.0:${process.env["DEBUG_PORT"] || "9229"} $(which gemini)` : "gemini";
513642
514096
  const args2 = [...shellCmds, cliCmd, ...quotedCliArgs];
513643
514097
  return ["bash", "-c", args2.join(" ")];
513644
514098
  }
513645
- var import_shell_quote9, LOCAL_DEV_SANDBOX_IMAGE_NAME, SANDBOX_NETWORK_NAME, SANDBOX_PROXY_NAME, BUILTIN_SEATBELT_PROFILES, SENSITIVE_SETTINGS_FILENAMES;
514099
+ var import_shell_quote10, LOCAL_DEV_SANDBOX_IMAGE_NAME, SANDBOX_NETWORK_NAME, SANDBOX_PROXY_NAME, BUILTIN_SEATBELT_PROFILES, SENSITIVE_SETTINGS_FILENAMES;
513646
514100
  var init_sandboxUtils = __esm({
513647
514101
  "packages/cli/src/utils/sandboxUtils.ts"() {
513648
514102
  "use strict";
513649
- import_shell_quote9 = __toESM(require_shell_quote(), 1);
514103
+ import_shell_quote10 = __toESM(require_shell_quote(), 1);
513650
514104
  init_dist4();
513651
514105
  LOCAL_DEV_SANDBOX_IMAGE_NAME = "gemini-cli-sandbox";
513652
514106
  SANDBOX_NETWORK_NAME = "gemini-cli-sandbox";
@@ -515846,11 +516300,11 @@ async function start_sandbox(config2, nodeArgs = [], cliConfig, cliArgs = []) {
515846
516300
  "-c",
515847
516301
  [
515848
516302
  `SANDBOX=sandbox-exec`,
515849
- "TMPDIR=" + (0, import_shell_quote10.quote)([resolvedTmpDir]),
515850
- "TMP=" + (0, import_shell_quote10.quote)([resolvedTmpDir]),
515851
- "TEMP=" + (0, import_shell_quote10.quote)([resolvedTmpDir]),
515852
- "NODE_OPTIONS=" + (0, import_shell_quote10.quote)([nodeOptions]),
515853
- ...finalArgv.map((arg) => (0, import_shell_quote10.quote)([arg]))
516303
+ "TMPDIR=" + (0, import_shell_quote11.quote)([resolvedTmpDir]),
516304
+ "TMP=" + (0, import_shell_quote11.quote)([resolvedTmpDir]),
516305
+ "TEMP=" + (0, import_shell_quote11.quote)([resolvedTmpDir]),
516306
+ "NODE_OPTIONS=" + (0, import_shell_quote11.quote)([nodeOptions]),
516307
+ ...finalArgv.map((arg) => (0, import_shell_quote11.quote)([arg]))
515854
516308
  ].join(" ")
515855
516309
  );
515856
516310
  const proxyCommand2 = process.env["GEMINI_SANDBOX_PROXY_COMMAND"];
@@ -515981,7 +516435,7 @@ async function start_sandbox(config2, nodeArgs = [], cliConfig, cliArgs = []) {
515981
516435
  if (config2.command === "runsc") {
515982
516436
  args2.push("--runtime=runsc");
515983
516437
  }
515984
- const customFlags = process.env["SANDBOX_FLAGS"] ? (0, import_shell_quote10.parse)(process.env["SANDBOX_FLAGS"], process.env).filter(
516438
+ const customFlags = process.env["SANDBOX_FLAGS"] ? (0, import_shell_quote11.parse)(process.env["SANDBOX_FLAGS"], process.env).filter(
515985
516439
  (f5) => typeof f5 === "string"
515986
516440
  ) : [];
515987
516441
  args2.push(...customFlags);
@@ -516304,7 +516758,7 @@ async function start_sandbox(config2, nodeArgs = [], cliConfig, cliArgs = []) {
516304
516758
  const gid = (await execAsync3("id -g")).stdout.trim();
516305
516759
  const username = "gemini";
516306
516760
  const homeDir = getContainerPath(homedir());
516307
- const quotedHomeDir = (0, import_shell_quote10.quote)([homeDir]);
516761
+ const quotedHomeDir = (0, import_shell_quote11.quote)([homeDir]);
516308
516762
  const originalCommand = finalEntrypoint[2];
516309
516763
  const escapedOriginalCommand = originalCommand.replace(/'/g, "'\\''");
516310
516764
  const defensiveEntrypoint = [
@@ -516351,7 +516805,7 @@ async function start_sandbox(config2, nodeArgs = [], cliConfig, cliArgs = []) {
516351
516805
  workdir,
516352
516806
  image3,
516353
516807
  // proxyCommand may be a shell string, so parse it into tokens safely
516354
- ...(0, import_shell_quote10.parse)(proxyCommand, process.env).filter(
516808
+ ...(0, import_shell_quote11.parse)(proxyCommand, process.env).filter(
516355
516809
  (f5) => typeof f5 === "string"
516356
516810
  )
516357
516811
  ];
@@ -516742,11 +517196,11 @@ async function ensureSandboxImageIsPresent(sandbox, image3, cliConfig) {
516742
517196
  );
516743
517197
  return false;
516744
517198
  }
516745
- var import_shell_quote10, import_strip_json_comments6, execAsync3, execFileAsync6, PODMAN_INFO_TIMEOUT_MS;
517199
+ var import_shell_quote11, import_strip_json_comments6, execAsync3, execFileAsync6, PODMAN_INFO_TIMEOUT_MS;
516746
517200
  var init_sandbox = __esm({
516747
517201
  "packages/cli/src/utils/sandbox.ts"() {
516748
517202
  "use strict";
516749
- import_shell_quote10 = __toESM(require_shell_quote(), 1);
517203
+ import_shell_quote11 = __toESM(require_shell_quote(), 1);
516750
517204
  init_dist4();
516751
517205
  init_ConsolePatcher();
516752
517206
  import_strip_json_comments6 = __toESM(require_strip_json_comments(), 1);
@@ -521057,7 +521511,7 @@ var GIT_COMMIT_INFO2;
521057
521511
  var init_git_commit2 = __esm({
521058
521512
  "packages/cli/src/generated/git-commit.ts"() {
521059
521513
  "use strict";
521060
- GIT_COMMIT_INFO2 = "8f1203e";
521514
+ GIT_COMMIT_INFO2 = "bdb51df";
521061
521515
  }
521062
521516
  });
521063
521517
 
@@ -558321,6 +558775,64 @@ var init_OpenAiModelDialog = __esm({
558321
558775
  }
558322
558776
  });
558323
558777
 
558778
+ // packages/cli/src/ui/openai/openAiProviderPreference.ts
558779
+ function persistProviderId(settings, providerId) {
558780
+ try {
558781
+ settings.setValue(
558782
+ "User" /* User */,
558783
+ OPENAI_PROVIDER_SETTING_KEY,
558784
+ providerId
558785
+ );
558786
+ } catch {
558787
+ }
558788
+ }
558789
+ function persistOpenAiMode(settings) {
558790
+ try {
558791
+ settings.setValue(
558792
+ "User" /* User */,
558793
+ AUTH_MODE_SETTING_KEY,
558794
+ AuthType2.USE_OPENAI
558795
+ );
558796
+ } catch {
558797
+ }
558798
+ }
558799
+ function hasConfiguredProviders() {
558800
+ try {
558801
+ return loadProviderEntries().length > 0;
558802
+ } catch {
558803
+ return false;
558804
+ }
558805
+ }
558806
+ function providerHasDefaultModel(providerId) {
558807
+ try {
558808
+ const entry = loadProviderEntries().find(
558809
+ (candidate) => candidate.id === providerId
558810
+ );
558811
+ if (!entry) {
558812
+ return true;
558813
+ }
558814
+ return Boolean(entry.modelId);
558815
+ } catch {
558816
+ return true;
558817
+ }
558818
+ }
558819
+ function rememberModelForProvider(providerId, modelId) {
558820
+ if (!providerId || modelId.trim().length === 0) {
558821
+ return;
558822
+ }
558823
+ persistProviderModelId(providerId, modelId);
558824
+ }
558825
+ var OPENAI_PROVIDER_SETTING_KEY, AUTH_MODE_SETTING_KEY;
558826
+ var init_openAiProviderPreference = __esm({
558827
+ "packages/cli/src/ui/openai/openAiProviderPreference.ts"() {
558828
+ "use strict";
558829
+ init_settings();
558830
+ init_dist4();
558831
+ OPENAI_PROVIDER_SETTING_KEY = "security.auth.openAiProviderId";
558832
+ AUTH_MODE_SETTING_KEY = "security.auth.selectedType";
558833
+ }
558834
+ });
558835
+
558324
558836
  // packages/cli/src/ui/openai/ProviderModelDialog.tsx
558325
558837
  function parseTokenField(raw) {
558326
558838
  const trimmed2 = raw.trim();
@@ -586789,7 +587301,7 @@ var require_extension2 = __commonJS({
586789
587301
  if (dest[name3] === void 0) dest[name3] = [elem];
586790
587302
  else dest[name3].push(elem);
586791
587303
  }
586792
- function parse13(header) {
587304
+ function parse14(header) {
586793
587305
  const offers = /* @__PURE__ */ Object.create(null);
586794
587306
  let params = /* @__PURE__ */ Object.create(null);
586795
587307
  let mustUnescape = false;
@@ -586929,7 +587441,7 @@ var require_extension2 = __commonJS({
586929
587441
  }).join(", ");
586930
587442
  }).join(", ");
586931
587443
  }
586932
- module2.exports = { format: format5, parse: parse13 };
587444
+ module2.exports = { format: format5, parse: parse14 };
586933
587445
  }
586934
587446
  });
586935
587447
 
@@ -586961,7 +587473,7 @@ var require_websocket4 = __commonJS({
586961
587473
  var {
586962
587474
  EventTarget: { addEventListener, removeEventListener }
586963
587475
  } = require_event_target2();
586964
- var { format: format5, parse: parse13 } = require_extension2();
587476
+ var { format: format5, parse: parse14 } = require_extension2();
586965
587477
  var { toBuffer } = require_buffer_util2();
586966
587478
  var closeTimeout = 30 * 1e3;
586967
587479
  var kAborted = Symbol("kAborted");
@@ -587628,7 +588140,7 @@ var require_websocket4 = __commonJS({
587628
588140
  }
587629
588141
  let extensions;
587630
588142
  try {
587631
- extensions = parse13(secWebSocketExtensions);
588143
+ extensions = parse14(secWebSocketExtensions);
587632
588144
  } catch (err2) {
587633
588145
  const message = "Invalid Sec-WebSocket-Extensions header";
587634
588146
  abortHandshake(websocket, socket, message);
@@ -587797,7 +588309,7 @@ var require_subprotocol2 = __commonJS({
587797
588309
  "packages/cli/node_modules/ws/lib/subprotocol.js"(exports2, module2) {
587798
588310
  "use strict";
587799
588311
  var { tokenChars } = require_validation7();
587800
- function parse13(header) {
588312
+ function parse14(header) {
587801
588313
  const protocols = /* @__PURE__ */ new Set();
587802
588314
  let start2 = -1;
587803
588315
  let end = -1;
@@ -587833,7 +588345,7 @@ var require_subprotocol2 = __commonJS({
587833
588345
  protocols.add(protocol);
587834
588346
  return protocols;
587835
588347
  }
587836
- module2.exports = { parse: parse13 };
588348
+ module2.exports = { parse: parse14 };
587837
588349
  }
587838
588350
  });
587839
588351
 
@@ -591052,7 +591564,7 @@ var require_extension3 = __commonJS({
591052
591564
  if (dest[name3] === void 0) dest[name3] = [elem];
591053
591565
  else dest[name3].push(elem);
591054
591566
  }
591055
- function parse13(header) {
591567
+ function parse14(header) {
591056
591568
  const offers = /* @__PURE__ */ Object.create(null);
591057
591569
  let params = /* @__PURE__ */ Object.create(null);
591058
591570
  let mustUnescape = false;
@@ -591192,7 +591704,7 @@ var require_extension3 = __commonJS({
591192
591704
  }).join(", ");
591193
591705
  }).join(", ");
591194
591706
  }
591195
- module2.exports = { format: format5, parse: parse13 };
591707
+ module2.exports = { format: format5, parse: parse14 };
591196
591708
  }
591197
591709
  });
591198
591710
 
@@ -591224,7 +591736,7 @@ var require_websocket5 = __commonJS({
591224
591736
  var {
591225
591737
  EventTarget: { addEventListener, removeEventListener }
591226
591738
  } = require_event_target3();
591227
- var { format: format5, parse: parse13 } = require_extension3();
591739
+ var { format: format5, parse: parse14 } = require_extension3();
591228
591740
  var { toBuffer } = require_buffer_util3();
591229
591741
  var closeTimeout = 30 * 1e3;
591230
591742
  var kAborted = Symbol("kAborted");
@@ -591891,7 +592403,7 @@ var require_websocket5 = __commonJS({
591891
592403
  }
591892
592404
  let extensions;
591893
592405
  try {
591894
- extensions = parse13(secWebSocketExtensions);
592406
+ extensions = parse14(secWebSocketExtensions);
591895
592407
  } catch (err2) {
591896
592408
  const message = "Invalid Sec-WebSocket-Extensions header";
591897
592409
  abortHandshake(websocket, socket, message);
@@ -592060,7 +592572,7 @@ var require_subprotocol3 = __commonJS({
592060
592572
  "packages/devtools/node_modules/ws/lib/subprotocol.js"(exports2, module2) {
592061
592573
  "use strict";
592062
592574
  var { tokenChars } = require_validation8();
592063
- function parse13(header) {
592575
+ function parse14(header) {
592064
592576
  const protocols = /* @__PURE__ */ new Set();
592065
592577
  let start2 = -1;
592066
592578
  let end = -1;
@@ -592096,7 +592608,7 @@ var require_subprotocol3 = __commonJS({
592096
592608
  protocols.add(protocol);
592097
592609
  return protocols;
592098
592610
  }
592099
- module2.exports = { parse: parse13 };
592611
+ module2.exports = { parse: parse14 };
592100
592612
  }
592101
592613
  });
592102
592614
 
@@ -631128,7 +631640,7 @@ var require_utils21 = __commonJS({
631128
631640
  var ini2 = require_ini();
631129
631641
  var path204 = __require("path");
631130
631642
  var stripJsonComments8 = require_strip_json_comments2();
631131
- var parse13 = exports2.parse = function(content) {
631643
+ var parse14 = exports2.parse = function(content) {
631132
631644
  if (/^\s*{/.test(content))
631133
631645
  return JSON.parse(stripJsonComments8(content));
631134
631646
  return ini2.parse(content);
@@ -631150,7 +631662,7 @@ var require_utils21 = __commonJS({
631150
631662
  };
631151
631663
  var json4 = exports2.json = function() {
631152
631664
  var content = file2.apply(null, arguments);
631153
- return content ? parse13(content) : null;
631665
+ return content ? parse14(content) : null;
631154
631666
  };
631155
631667
  var env5 = exports2.env = function(prefix, env6) {
631156
631668
  env6 = env6 || process.env;
@@ -631507,13 +632019,13 @@ var require_rc = __commonJS({
631507
632019
  var etc = "/etc";
631508
632020
  var win = process.platform === "win32";
631509
632021
  var home = win ? process.env.USERPROFILE : process.env.HOME;
631510
- module2.exports = function(name3, defaults2, argv, parse13) {
632022
+ module2.exports = function(name3, defaults2, argv, parse14) {
631511
632023
  if ("string" !== typeof name3)
631512
632024
  throw new Error("rc(name): name *must* be string");
631513
632025
  if (!argv)
631514
632026
  argv = require_minimist()(process.argv.slice(2));
631515
632027
  defaults2 = ("string" === typeof defaults2 ? cc.json(defaults2) : defaults2) || {};
631516
- parse13 = parse13 || cc.parse;
632028
+ parse14 = parse14 || cc.parse;
631517
632029
  var env5 = cc.env(name3 + "_");
631518
632030
  var configs = [defaults2];
631519
632031
  var configFiles = [];
@@ -631521,7 +632033,7 @@ var require_rc = __commonJS({
631521
632033
  if (configFiles.indexOf(file2) >= 0) return;
631522
632034
  var fileConfig = cc.file(file2);
631523
632035
  if (fileConfig) {
631524
- configs.push(parse13(fileConfig));
632036
+ configs.push(parse14(fileConfig));
631525
632037
  configFiles.push(file2);
631526
632038
  }
631527
632039
  }
@@ -632517,7 +633029,7 @@ var require_config_chain = __commonJS({
632517
633029
  }
632518
633030
  return find2(__chunk_dirname, rel);
632519
633031
  };
632520
- var parse13 = exports2.parse = function(content, file2, type2) {
633032
+ var parse14 = exports2.parse = function(content, file2, type2) {
632521
633033
  content = "" + content;
632522
633034
  if (!type2) {
632523
633035
  try {
@@ -632550,7 +633062,7 @@ var require_config_chain = __commonJS({
632550
633062
  } catch (err2) {
632551
633063
  return;
632552
633064
  }
632553
- return parse13(content, file2, "json");
633065
+ return parse14(content, file2, "json");
632554
633066
  };
632555
633067
  var env5 = exports2.env = function(prefix, env6) {
632556
633068
  env6 = env6 || process.env;
@@ -638721,7 +639233,7 @@ init_processUtils();
638721
639233
  import { spawn as spawn20 } from "node:child_process";
638722
639234
  import { realpath as realpath5 } from "node:fs/promises";
638723
639235
  import os52 from "node:os";
638724
- import { isAbsolute as isAbsolute18, resolve as resolve51 } from "node:path";
639236
+ import { isAbsolute as isAbsolute19, resolve as resolve51 } from "node:path";
638725
639237
  import v84 from "node:v8";
638726
639238
  async function getMemoryNodeArgs() {
638727
639239
  let autoConfigureMemory = true;
@@ -638752,7 +639264,7 @@ async function getMemoryNodeArgs() {
638752
639264
  }
638753
639265
  async function run2() {
638754
639266
  if (!process.env["GEMINI_CLI_NO_RELAUNCH"] && !process.env["SANDBOX"]) {
638755
- if (!isSeaEnvironment() && process.argv[1] && !isAbsolute18(process.argv[1])) {
639267
+ if (!isSeaEnvironment() && process.argv[1] && !isAbsolute19(process.argv[1])) {
638756
639268
  process.argv[1] = resolve51(process.argv[1]);
638757
639269
  }
638758
639270
  const scriptArgs = getScriptArgs();