@google/gemini-cli-a2a-server 0.15.0-nightly.20251111.51f952e7 → 0.15.0-preview.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.
@@ -1973,7 +1973,7 @@ var require_ms2 = __commonJS({
1973
1973
  var require_pretty_print = __commonJS({
1974
1974
  "node_modules/logform/pretty-print.js"(exports2, module2) {
1975
1975
  "use strict";
1976
- var inspect4 = __require("util").inspect;
1976
+ var inspect5 = __require("util").inspect;
1977
1977
  var format2 = require_format();
1978
1978
  var { LEVEL, MESSAGE, SPLAT } = require_triple_beam();
1979
1979
  module2.exports = format2((info2, opts = {}) => {
@@ -1981,7 +1981,7 @@ var require_pretty_print = __commonJS({
1981
1981
  delete stripped[LEVEL];
1982
1982
  delete stripped[MESSAGE];
1983
1983
  delete stripped[SPLAT];
1984
- info2[MESSAGE] = inspect4(stripped, false, opts.depth || null, opts.colorize);
1984
+ info2[MESSAGE] = inspect5(stripped, false, opts.depth || null, opts.colorize);
1985
1985
  return info2;
1986
1986
  });
1987
1987
  }
@@ -3091,8 +3091,8 @@ var require_buffer_list = __commonJS({
3091
3091
  var _require = __require("buffer");
3092
3092
  var Buffer9 = _require.Buffer;
3093
3093
  var _require2 = __require("util");
3094
- var inspect4 = _require2.inspect;
3095
- var custom2 = inspect4 && inspect4.custom || "inspect";
3094
+ var inspect5 = _require2.inspect;
3095
+ var custom2 = inspect5 && inspect5.custom || "inspect";
3096
3096
  function copyBuffer(src, target, offset) {
3097
3097
  Buffer9.prototype.copy.call(src, target, offset);
3098
3098
  }
@@ -3249,7 +3249,7 @@ var require_buffer_list = __commonJS({
3249
3249
  }, {
3250
3250
  key: custom2,
3251
3251
  value: function value(_, options2) {
3252
- return inspect4(this, _objectSpread(_objectSpread({}, options2), {}, {
3252
+ return inspect5(this, _objectSpread(_objectSpread({}, options2), {}, {
3253
3253
  // Only inspect one level.
3254
3254
  depth: 0,
3255
3255
  // It should not recurse.
@@ -26452,7 +26452,7 @@ var require_object_inspect = __commonJS({
26452
26452
  } else if (indexOf(seen, obj) >= 0) {
26453
26453
  return "[Circular]";
26454
26454
  }
26455
- function inspect4(value, from, noIndent) {
26455
+ function inspect5(value, from, noIndent) {
26456
26456
  if (from) {
26457
26457
  seen = $arrSlice.call(seen);
26458
26458
  seen.push(from);
@@ -26470,7 +26470,7 @@ var require_object_inspect = __commonJS({
26470
26470
  }
26471
26471
  if (typeof obj === "function" && !isRegExp2(obj)) {
26472
26472
  var name4 = nameOf(obj);
26473
- var keys = arrObjKeys(obj, inspect4);
26473
+ var keys = arrObjKeys(obj, inspect5);
26474
26474
  return "[Function" + (name4 ? ": " + name4 : " (anonymous)") + "]" + (keys.length > 0 ? " { " + $join.call(keys, ", ") + " }" : "");
26475
26475
  }
26476
26476
  if (isSymbol2(obj)) {
@@ -26494,16 +26494,16 @@ var require_object_inspect = __commonJS({
26494
26494
  if (obj.length === 0) {
26495
26495
  return "[]";
26496
26496
  }
26497
- var xs = arrObjKeys(obj, inspect4);
26497
+ var xs = arrObjKeys(obj, inspect5);
26498
26498
  if (indent && !singleLineValues(xs)) {
26499
26499
  return "[" + indentedJoin(xs, indent) + "]";
26500
26500
  }
26501
26501
  return "[ " + $join.call(xs, ", ") + " ]";
26502
26502
  }
26503
26503
  if (isError2(obj)) {
26504
- var parts2 = arrObjKeys(obj, inspect4);
26504
+ var parts2 = arrObjKeys(obj, inspect5);
26505
26505
  if (!("cause" in Error.prototype) && "cause" in obj && !isEnumerable.call(obj, "cause")) {
26506
- return "{ [" + String(obj) + "] " + $join.call($concat.call("[cause]: " + inspect4(obj.cause), parts2), ", ") + " }";
26506
+ return "{ [" + String(obj) + "] " + $join.call($concat.call("[cause]: " + inspect5(obj.cause), parts2), ", ") + " }";
26507
26507
  }
26508
26508
  if (parts2.length === 0) {
26509
26509
  return "[" + String(obj) + "]";
@@ -26521,7 +26521,7 @@ var require_object_inspect = __commonJS({
26521
26521
  var mapParts = [];
26522
26522
  if (mapForEach) {
26523
26523
  mapForEach.call(obj, function(value, key) {
26524
- mapParts.push(inspect4(key, obj, true) + " => " + inspect4(value, obj));
26524
+ mapParts.push(inspect5(key, obj, true) + " => " + inspect5(value, obj));
26525
26525
  });
26526
26526
  }
26527
26527
  return collectionOf("Map", mapSize.call(obj), mapParts, indent);
@@ -26530,7 +26530,7 @@ var require_object_inspect = __commonJS({
26530
26530
  var setParts = [];
26531
26531
  if (setForEach) {
26532
26532
  setForEach.call(obj, function(value) {
26533
- setParts.push(inspect4(value, obj));
26533
+ setParts.push(inspect5(value, obj));
26534
26534
  });
26535
26535
  }
26536
26536
  return collectionOf("Set", setSize.call(obj), setParts, indent);
@@ -26545,16 +26545,16 @@ var require_object_inspect = __commonJS({
26545
26545
  return weakCollectionOf("WeakRef");
26546
26546
  }
26547
26547
  if (isNumber4(obj)) {
26548
- return markBoxed(inspect4(Number(obj)));
26548
+ return markBoxed(inspect5(Number(obj)));
26549
26549
  }
26550
26550
  if (isBigInt(obj)) {
26551
- return markBoxed(inspect4(bigIntValueOf.call(obj)));
26551
+ return markBoxed(inspect5(bigIntValueOf.call(obj)));
26552
26552
  }
26553
26553
  if (isBoolean2(obj)) {
26554
26554
  return markBoxed(booleanValueOf.call(obj));
26555
26555
  }
26556
26556
  if (isString2(obj)) {
26557
- return markBoxed(inspect4(String(obj)));
26557
+ return markBoxed(inspect5(String(obj)));
26558
26558
  }
26559
26559
  if (typeof window !== "undefined" && obj === window) {
26560
26560
  return "{ [object Window] }";
@@ -26563,7 +26563,7 @@ var require_object_inspect = __commonJS({
26563
26563
  return "{ [object globalThis] }";
26564
26564
  }
26565
26565
  if (!isDate2(obj) && !isRegExp2(obj)) {
26566
- var ys = arrObjKeys(obj, inspect4);
26566
+ var ys = arrObjKeys(obj, inspect5);
26567
26567
  var isPlainObject4 = gPO ? gPO(obj) === Object.prototype : obj instanceof Object || obj.constructor === Object;
26568
26568
  var protoTag = obj instanceof Object ? "" : "null prototype";
26569
26569
  var stringTag = !isPlainObject4 && toStringTag && Object(obj) === obj && toStringTag in obj ? $slice.call(toStr(obj), 8, -1) : protoTag ? "Object" : "";
@@ -26817,13 +26817,13 @@ var require_object_inspect = __commonJS({
26817
26817
  var lineJoiner = "\n" + indent.prev + indent.base;
26818
26818
  return lineJoiner + $join.call(xs, "," + lineJoiner) + "\n" + indent.prev;
26819
26819
  }
26820
- function arrObjKeys(obj, inspect4) {
26820
+ function arrObjKeys(obj, inspect5) {
26821
26821
  var isArr = isArray2(obj);
26822
26822
  var xs = [];
26823
26823
  if (isArr) {
26824
26824
  xs.length = obj.length;
26825
26825
  for (var i3 = 0; i3 < obj.length; i3++) {
26826
- xs[i3] = has(obj, i3) ? inspect4(obj[i3], obj) : "";
26826
+ xs[i3] = has(obj, i3) ? inspect5(obj[i3], obj) : "";
26827
26827
  }
26828
26828
  }
26829
26829
  var syms = typeof gOPS === "function" ? gOPS(obj) : [];
@@ -26844,15 +26844,15 @@ var require_object_inspect = __commonJS({
26844
26844
  if (hasShammedSymbols && symMap["$" + key] instanceof Symbol) {
26845
26845
  continue;
26846
26846
  } else if ($test.call(/[^\w$]/, key)) {
26847
- xs.push(inspect4(key, obj) + ": " + inspect4(obj[key], obj));
26847
+ xs.push(inspect5(key, obj) + ": " + inspect5(obj[key], obj));
26848
26848
  } else {
26849
- xs.push(key + ": " + inspect4(obj[key], obj));
26849
+ xs.push(key + ": " + inspect5(obj[key], obj));
26850
26850
  }
26851
26851
  }
26852
26852
  if (typeof gOPS === "function") {
26853
26853
  for (var j = 0; j < syms.length; j++) {
26854
26854
  if (isEnumerable.call(obj, syms[j])) {
26855
- xs.push("[" + inspect4(syms[j]) + "]: " + inspect4(obj[syms[j]], obj));
26855
+ xs.push("[" + inspect5(syms[j]) + "]: " + inspect5(obj[syms[j]], obj));
26856
26856
  }
26857
26857
  }
26858
26858
  }
@@ -26865,7 +26865,7 @@ var require_object_inspect = __commonJS({
26865
26865
  var require_side_channel_list = __commonJS({
26866
26866
  "node_modules/side-channel-list/index.js"(exports2, module2) {
26867
26867
  "use strict";
26868
- var inspect4 = require_object_inspect();
26868
+ var inspect5 = require_object_inspect();
26869
26869
  var $TypeError = require_type();
26870
26870
  var listGetNode = function(list3, key, isDelete) {
26871
26871
  var prev = list3;
@@ -26919,7 +26919,7 @@ var require_side_channel_list = __commonJS({
26919
26919
  var channel = {
26920
26920
  assert: function(key) {
26921
26921
  if (!channel.has(key)) {
26922
- throw new $TypeError("Side channel does not contain " + inspect4(key));
26922
+ throw new $TypeError("Side channel does not contain " + inspect5(key));
26923
26923
  }
26924
26924
  },
26925
26925
  "delete": function(key) {
@@ -27779,7 +27779,7 @@ var require_side_channel_map = __commonJS({
27779
27779
  "use strict";
27780
27780
  var GetIntrinsic = require_get_intrinsic();
27781
27781
  var callBound = require_call_bound();
27782
- var inspect4 = require_object_inspect();
27782
+ var inspect5 = require_object_inspect();
27783
27783
  var $TypeError = require_type();
27784
27784
  var $Map = GetIntrinsic("%Map%", true);
27785
27785
  var $mapGet = callBound("Map.prototype.get", true);
@@ -27793,7 +27793,7 @@ var require_side_channel_map = __commonJS({
27793
27793
  var channel = {
27794
27794
  assert: function(key) {
27795
27795
  if (!channel.has(key)) {
27796
- throw new $TypeError("Side channel does not contain " + inspect4(key));
27796
+ throw new $TypeError("Side channel does not contain " + inspect5(key));
27797
27797
  }
27798
27798
  },
27799
27799
  "delete": function(key) {
@@ -27835,7 +27835,7 @@ var require_side_channel_weakmap = __commonJS({
27835
27835
  "use strict";
27836
27836
  var GetIntrinsic = require_get_intrinsic();
27837
27837
  var callBound = require_call_bound();
27838
- var inspect4 = require_object_inspect();
27838
+ var inspect5 = require_object_inspect();
27839
27839
  var getSideChannelMap = require_side_channel_map();
27840
27840
  var $TypeError = require_type();
27841
27841
  var $WeakMap = GetIntrinsic("%WeakMap%", true);
@@ -27851,7 +27851,7 @@ var require_side_channel_weakmap = __commonJS({
27851
27851
  var channel = {
27852
27852
  assert: function(key) {
27853
27853
  if (!channel.has(key)) {
27854
- throw new $TypeError("Side channel does not contain " + inspect4(key));
27854
+ throw new $TypeError("Side channel does not contain " + inspect5(key));
27855
27855
  }
27856
27856
  },
27857
27857
  "delete": function(key) {
@@ -27907,7 +27907,7 @@ var require_side_channel = __commonJS({
27907
27907
  "node_modules/side-channel/index.js"(exports2, module2) {
27908
27908
  "use strict";
27909
27909
  var $TypeError = require_type();
27910
- var inspect4 = require_object_inspect();
27910
+ var inspect5 = require_object_inspect();
27911
27911
  var getSideChannelList = require_side_channel_list();
27912
27912
  var getSideChannelMap = require_side_channel_map();
27913
27913
  var getSideChannelWeakMap = require_side_channel_weakmap();
@@ -27917,7 +27917,7 @@ var require_side_channel = __commonJS({
27917
27917
  var channel = {
27918
27918
  assert: function(key) {
27919
27919
  if (!channel.has(key)) {
27920
- throw new $TypeError("Side channel does not contain " + inspect4(key));
27920
+ throw new $TypeError("Side channel does not contain " + inspect5(key));
27921
27921
  }
27922
27922
  },
27923
27923
  "delete": function(key) {
@@ -218884,7 +218884,7 @@ var require_data_url = __commonJS({
218884
218884
  var require_webidl = __commonJS({
218885
218885
  "node_modules/undici/lib/web/webidl/index.js"(exports2, module2) {
218886
218886
  "use strict";
218887
- var { types: types4, inspect: inspect4 } = __require("node:util");
218887
+ var { types: types4, inspect: inspect5 } = __require("node:util");
218888
218888
  var { markAsUncloneable } = __require("node:worker_threads");
218889
218889
  var UNDEFINED = 1;
218890
218890
  var BOOLEAN = 2;
@@ -219076,7 +219076,7 @@ var require_webidl = __commonJS({
219076
219076
  case SYMBOL:
219077
219077
  return `Symbol(${V2.description})`;
219078
219078
  case OBJECT:
219079
- return inspect4(V2);
219079
+ return inspect5(V2);
219080
219080
  case STRING:
219081
219081
  return `"${V2}"`;
219082
219082
  case BIGINT:
@@ -274152,6 +274152,7 @@ import { homedir as homedir5 } from "node:os";
274152
274152
 
274153
274153
  // packages/core/dist/src/config/config.js
274154
274154
  import * as path63 from "node:path";
274155
+ import { inspect as inspect4 } from "node:util";
274155
274156
  import process22 from "node:process";
274156
274157
 
274157
274158
  // node_modules/@google/genai/dist/node/index.mjs
@@ -294032,6 +294033,7 @@ function getCommonAttributes(config2) {
294032
294033
  return {
294033
294034
  "session.id": config2.getSessionId(),
294034
294035
  "installation.id": installationManager.getInstallationId(),
294036
+ interactive: config2.isInteractive(),
294035
294037
  ...email && { "user.email": email }
294036
294038
  };
294037
294039
  }
@@ -295871,6 +295873,7 @@ var EventMetadataKey;
295871
295873
  EventMetadataKey2[EventMetadataKey2["GEMINI_CLI_AGENT_RECOVERY_REASON"] = 122] = "GEMINI_CLI_AGENT_RECOVERY_REASON";
295872
295874
  EventMetadataKey2[EventMetadataKey2["GEMINI_CLI_AGENT_RECOVERY_DURATION_MS"] = 123] = "GEMINI_CLI_AGENT_RECOVERY_DURATION_MS";
295873
295875
  EventMetadataKey2[EventMetadataKey2["GEMINI_CLI_AGENT_RECOVERY_SUCCESS"] = 124] = "GEMINI_CLI_AGENT_RECOVERY_SUCCESS";
295876
+ EventMetadataKey2[EventMetadataKey2["GEMINI_CLI_INTERACTIVE"] = 125] = "GEMINI_CLI_INTERACTIVE";
295874
295877
  })(EventMetadataKey || (EventMetadataKey = {}));
295875
295878
 
295876
295879
  // node_modules/mnemonist/index.mjs
@@ -295896,8 +295899,8 @@ var Float64Vector = import_vector.default.Float64Vector;
295896
295899
  var PointerVector = import_vector.default.PointerVector;
295897
295900
 
295898
295901
  // packages/core/dist/src/generated/git-commit.js
295899
- var GIT_COMMIT_INFO = "51f952e7";
295900
- var CLI_VERSION = "0.15.0-nightly.20251111.51f952e7";
295902
+ var GIT_COMMIT_INFO = "dfe7fc9a";
295903
+ var CLI_VERSION = "0.15.0-preview.1";
295901
295904
 
295902
295905
  // packages/core/dist/src/ide/detect-ide.js
295903
295906
  var IDE_DEFINITIONS = {
@@ -296955,6 +296958,10 @@ var ClearcutLogger = class _ClearcutLogger {
296955
296958
  {
296956
296959
  gemini_cli_key: EventMetadataKey.GEMINI_CLI_USER_SETTINGS,
296957
296960
  value: this.getConfigJson()
296961
+ },
296962
+ {
296963
+ gemini_cli_key: EventMetadataKey.GEMINI_CLI_INTERACTIVE,
296964
+ value: this.config?.isInteractive().toString() ?? "false"
296958
296965
  }
296959
296966
  ];
296960
296967
  return [...data, ...defaultLogMetadata];
@@ -298698,7 +298705,7 @@ async function createContentGenerator(config2, gcConfig, sessionId2) {
298698
298705
  if (gcConfig.fakeResponses) {
298699
298706
  return FakeContentGenerator.fromFile(gcConfig.fakeResponses);
298700
298707
  }
298701
- const version3 = "0.15.0-nightly.20251111.51f952e7";
298708
+ const version3 = "0.15.0-preview.1";
298702
298709
  const userAgent = `GeminiCLI/${version3} (${process.platform}; ${process.arch})`;
298703
298710
  const baseHeaders = {
298704
298711
  "User-Agent": userAgent
@@ -330912,14 +330919,7 @@ var EditToolInvocation2 = class extends BaseToolInvocation {
330912
330919
  currentContent: contentForLlmEditFixer,
330913
330920
  abortSignal
330914
330921
  });
330915
- const secondError = getErrorReplaceResult(
330916
- params,
330917
- secondAttemptResult.occurrences,
330918
- 1,
330919
- // expectedReplacements is always 1 for smart_edit
330920
- secondAttemptResult.finalOldString,
330921
- secondAttemptResult.finalNewString
330922
- );
330922
+ const secondError = getErrorReplaceResult(params, secondAttemptResult.occurrences, params.expected_replacements ?? 1, secondAttemptResult.finalOldString, secondAttemptResult.finalNewString);
330923
330923
  if (secondError) {
330924
330924
  const event2 = new SmartEditCorrectionEvent("failure");
330925
330925
  logSmartEditCorrectionEvent(this.config, event2);
@@ -330950,7 +330950,7 @@ var EditToolInvocation2 = class extends BaseToolInvocation {
330950
330950
  * @throws File system errors if reading the file fails unexpectedly (e.g., permissions)
330951
330951
  */
330952
330952
  async calculateEdit(params, abortSignal) {
330953
- const expectedReplacements = 1;
330953
+ const expectedReplacements = params.expected_replacements ?? 1;
330954
330954
  let currentContent = null;
330955
330955
  let fileExists2 = false;
330956
330956
  let originalLineEnding = "\n";
@@ -331201,7 +331201,7 @@ var SmartEditTool = class _SmartEditTool extends BaseDeclarativeTool {
331201
331201
  super(
331202
331202
  _SmartEditTool.Name,
331203
331203
  "Edit",
331204
- `Replaces text within a file. Replaces a single occurrence. This tool requires providing significant context around the change to ensure precise targeting. Always use the ${READ_FILE_TOOL_NAME} tool to examine the file's current content before attempting a text replacement.
331204
+ `Replaces text within a file. By default, replaces a single occurrence, but can replace multiple occurrences when \`expected_replacements\` is specified. This tool requires providing significant context around the change to ensure precise targeting. Always use the ${READ_FILE_TOOL_NAME} tool to examine the file's current content before attempting a text replacement.
331205
331205
 
331206
331206
  The user has the ability to modify the \`new_string\` content. If modified, this will be stated in the response.
331207
331207
 
@@ -331212,7 +331212,7 @@ var SmartEditTool = class _SmartEditTool extends BaseDeclarativeTool {
331212
331212
  4. NEVER escape \`old_string\` or \`new_string\`, that would break the exact literal text requirement.
331213
331213
  **Important:** If ANY of the above are not satisfied, the tool will fail. CRITICAL for \`old_string\`: Must uniquely identify the single instance to change. Include at least 3 lines of context BEFORE and AFTER the target text, matching whitespace and indentation precisely. If this string matches multiple locations, or does not match exactly, the tool will fail.
331214
331214
  5. Prefer to break down complex and long changes into multiple smaller atomic calls to this tool. Always check the content of the file after changes or not finding a string to match.
331215
- **Multiple replacements:** If there are multiple and ambiguous occurences of the \`old_string\` in the file, the tool will also fail.`,
331215
+ **Multiple replacements:** Set \`expected_replacements\` to the number of occurrences you want to replace. The tool will replace ALL occurrences that match \`old_string\` exactly. Ensure the number of replacements matches your expectation.`,
331216
331216
  Kind.Edit,
331217
331217
  {
331218
331218
  properties: {
@@ -331239,12 +331239,17 @@ A good instruction should concisely answer:
331239
331239
  type: "string"
331240
331240
  },
331241
331241
  old_string: {
331242
- description: "The exact literal text to replace, preferably unescaped. Include at least 3 lines of context BEFORE and AFTER the target text, matching whitespace and indentation precisely. If this string is not the exact literal text (i.e. you escaped it) or does not match exactly, the tool will fail.",
331242
+ description: "The exact literal text to replace, preferably unescaped. For single replacements (default), include at least 3 lines of context BEFORE and AFTER the target text, matching whitespace and indentation precisely. If this string is not the exact literal text (i.e. you escaped it) or does not match exactly, the tool will fail.",
331243
331243
  type: "string"
331244
331244
  },
331245
331245
  new_string: {
331246
331246
  description: "The exact literal text to replace `old_string` with, preferably unescaped. Provide the EXACT text. Ensure the resulting code is correct and idiomatic.",
331247
331247
  type: "string"
331248
+ },
331249
+ expected_replacements: {
331250
+ type: "number",
331251
+ description: "Number of replacements expected. Defaults to 1 if not specified. Use when you want to replace multiple occurrences.",
331252
+ minimum: 1
331248
331253
  }
331249
331254
  },
331250
331255
  required: ["file_path", "instruction", "old_string", "new_string"],
@@ -331328,23 +331333,6 @@ import path42 from "node:path";
331328
331333
  import os16, { EOL as EOL2 } from "node:os";
331329
331334
  import crypto20 from "node:crypto";
331330
331335
 
331331
- // packages/core/dist/src/config/models.js
331332
- var DEFAULT_GEMINI_MODEL = "gemini-2.5-pro";
331333
- var DEFAULT_GEMINI_FLASH_MODEL = "gemini-2.5-flash";
331334
- var DEFAULT_GEMINI_FLASH_LITE_MODEL = "gemini-2.5-flash-lite";
331335
- var DEFAULT_GEMINI_MODEL_AUTO = "auto";
331336
- var DEFAULT_GEMINI_EMBEDDING_MODEL = "gemini-embedding-001";
331337
- var DEFAULT_THINKING_MODE = 8192;
331338
- function getEffectiveModel(isInFallbackMode, requestedModel) {
331339
- if (!isInFallbackMode) {
331340
- return requestedModel;
331341
- }
331342
- if (requestedModel.includes("lite")) {
331343
- return requestedModel;
331344
- }
331345
- return DEFAULT_GEMINI_FLASH_MODEL;
331346
- }
331347
-
331348
331336
  // packages/core/dist/src/utils/summarizer.js
331349
331337
  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.
331350
331338
 
@@ -331359,17 +331347,15 @@ Text to summarize:
331359
331347
 
331360
331348
  Return the summary string which should first contain an overall summarization of text followed by the full stack trace of errors and warnings in the tool output.
331361
331349
  `;
331362
- async function summarizeToolOutput(textToSummarize, geminiClient, abortSignal, maxOutputTokens = 2e3) {
331350
+ async function summarizeToolOutput(config2, modelConfigKey, textToSummarize, geminiClient, abortSignal) {
331351
+ const maxOutputTokens = config2.modelConfigService.getResolvedConfig(modelConfigKey).generateContentConfig.maxOutputTokens ?? 2e3;
331363
331352
  if (!textToSummarize || textToSummarize.length < maxOutputTokens) {
331364
331353
  return textToSummarize;
331365
331354
  }
331366
331355
  const prompt = SUMMARIZE_TOOL_OUTPUT_PROMPT.replace("{maxOutputTokens}", String(maxOutputTokens)).replace("{textToSummarize}", textToSummarize);
331367
331356
  const contents = [{ role: "user", parts: [{ text: prompt }] }];
331368
- const toolOutputSummarizerConfig = {
331369
- maxOutputTokens
331370
- };
331371
331357
  try {
331372
- const parsedResponse = await geminiClient.generateContent(contents, toolOutputSummarizerConfig, abortSignal, DEFAULT_GEMINI_FLASH_LITE_MODEL);
331358
+ const parsedResponse = await geminiClient.generateContent(modelConfigKey, contents, abortSignal);
331373
331359
  return getResponseText(parsedResponse) || textToSummarize;
331374
331360
  } catch (error) {
331375
331361
  debugLogger.warn("Failed to summarize tool output.", error);
@@ -337136,7 +337122,7 @@ ${result.output}`;
337136
337122
  }
337137
337123
  } : {};
337138
337124
  if (summarizeConfig && summarizeConfig[SHELL_TOOL_NAME]) {
337139
- const summary = await summarizeToolOutput(llmContent, this.config.getGeminiClient(), signal, summarizeConfig[SHELL_TOOL_NAME].tokenBudget);
337125
+ const summary = await summarizeToolOutput(this.config, { model: "summarizer-shell" }, llmContent, this.config.getGeminiClient(), signal);
337140
337126
  return {
337141
337127
  llmContent: summary,
337142
337128
  returnDisplay: returnDisplayMessage,
@@ -342562,7 +342548,7 @@ I was unable to access the URL directly. Instead, I have fetched the raw content
342562
342548
  ${textContent2}
342563
342549
  ---
342564
342550
  `;
342565
- const result = await geminiClient.generateContent([{ role: "user", parts: [{ text: fallbackPrompt }] }], {}, signal, DEFAULT_GEMINI_FLASH_MODEL);
342551
+ const result = await geminiClient.generateContent({ model: "web-fetch-fallback" }, [{ role: "user", parts: [{ text: fallbackPrompt }] }], signal);
342566
342552
  const resultText = getResponseText(result) || "";
342567
342553
  return {
342568
342554
  llmContent: resultText,
@@ -342620,13 +342606,7 @@ ${textContent2}
342620
342606
  }
342621
342607
  const geminiClient = this.config.getGeminiClient();
342622
342608
  try {
342623
- const response = await geminiClient.generateContent(
342624
- [{ role: "user", parts: [{ text: userPrompt }] }],
342625
- { tools: [{ urlContext: {} }] },
342626
- signal,
342627
- // Pass signal
342628
- DEFAULT_GEMINI_FLASH_MODEL
342629
- );
342609
+ const response = await geminiClient.generateContent({ model: "web-fetch" }, [{ role: "user", parts: [{ text: userPrompt }] }], signal);
342630
342610
  debugLogger.debug(`[WebFetchTool] Full response for prompt "${userPrompt.substring(0, 50)}...":`, JSON.stringify(response, null, 2));
342631
342611
  let responseText = getResponseText(response) || "";
342632
342612
  const urlContextMeta = response.candidates?.[0]?.urlContextMetadata;
@@ -343084,7 +343064,7 @@ var WebSearchToolInvocation = class extends BaseToolInvocation {
343084
343064
  async execute(signal) {
343085
343065
  const geminiClient = this.config.getGeminiClient();
343086
343066
  try {
343087
- const response = await geminiClient.generateContent([{ role: "user", parts: [{ text: this.params.query }] }], { tools: [{ googleSearch: {} }] }, signal, DEFAULT_GEMINI_FLASH_MODEL);
343067
+ const response = await geminiClient.generateContent({ model: "web-search" }, [{ role: "user", parts: [{ text: this.params.query }] }], signal);
343088
343068
  const responseText = getResponseText(response);
343089
343069
  const groundingMetadata = response.candidates?.[0]?.groundingMetadata;
343090
343070
  const sources = groundingMetadata?.groundingChunks;
@@ -343413,10 +343393,12 @@ async function getEnvironmentContext(config2) {
343413
343393
  });
343414
343394
  const platform10 = process.platform;
343415
343395
  const directoryContext = await getDirectoryContextString(config2);
343396
+ const tempDir = config2.storage.getProjectTempDir();
343416
343397
  const context2 = `
343417
343398
  This is the Gemini CLI. We are setting up the context for our chat.
343418
343399
  Today's date is ${today} (formatted according to the user's locale).
343419
343400
  My operating system is: ${platform10}
343401
+ The project's temporary directory is: ${tempDir}
343420
343402
  ${directoryContext}
343421
343403
  `.trim();
343422
343404
  const initialParts = [{ text: context2 }];
@@ -343441,6 +343423,22 @@ My setup is complete. I will provide my first command in the next turn.
343441
343423
  ];
343442
343424
  }
343443
343425
 
343426
+ // packages/core/dist/src/config/models.js
343427
+ var DEFAULT_GEMINI_MODEL = "gemini-2.5-pro";
343428
+ var DEFAULT_GEMINI_FLASH_MODEL = "gemini-2.5-flash";
343429
+ var DEFAULT_GEMINI_MODEL_AUTO = "auto";
343430
+ var DEFAULT_GEMINI_EMBEDDING_MODEL = "gemini-embedding-001";
343431
+ var DEFAULT_THINKING_MODE = 8192;
343432
+ function getEffectiveModel(isInFallbackMode, requestedModel) {
343433
+ if (!isInFallbackMode) {
343434
+ return requestedModel;
343435
+ }
343436
+ if (requestedModel.includes("lite")) {
343437
+ return requestedModel;
343438
+ }
343439
+ return DEFAULT_GEMINI_FLASH_MODEL;
343440
+ }
343441
+
343444
343442
  // packages/core/dist/src/utils/generateContentResponseUtilities.js
343445
343443
  function getResponseTextFromParts(parts2) {
343446
343444
  if (!parts2) {
@@ -344623,13 +344621,13 @@ var GeminiChat = class {
344623
344621
  sendPromise = Promise.resolve();
344624
344622
  chatRecordingService;
344625
344623
  lastPromptTokenCount;
344626
- constructor(config2, generationConfig = {}, history = []) {
344624
+ constructor(config2, generationConfig = {}, history = [], resumedSessionData) {
344627
344625
  this.config = config2;
344628
344626
  this.generationConfig = generationConfig;
344629
344627
  this.history = history;
344630
344628
  validateHistory2(history);
344631
344629
  this.chatRecordingService = new ChatRecordingService(config2);
344632
- this.chatRecordingService.initialize();
344630
+ this.chatRecordingService.initialize(resumedSessionData);
344633
344631
  this.lastPromptTokenCount = Math.ceil(JSON.stringify(this.history).length / 4);
344634
344632
  }
344635
344633
  setSystemInstruction(sysInstr) {
@@ -345435,7 +345433,7 @@ function getCoreSystemPrompt(config2, userMemory) {
345435
345433
  ## Software Engineering Tasks
345436
345434
  When requested to perform tasks like fixing bugs, adding features, refactoring, or explaining code, follow this sequence:
345437
345435
  1. **Understand:** Think about the user's request and the relevant codebase context. Use '${GREP_TOOL_NAME}' and '${GLOB_TOOL_NAME}' search tools extensively (in parallel if independent) to understand file structures, existing code patterns, and conventions.
345438
- Use '${READ_FILE_TOOL_NAME}' and '${READ_MANY_FILES_TOOL_NAME}' to understand context and validate any assumptions you may have.
345436
+ Use '${READ_FILE_TOOL_NAME}' to understand context and validate any assumptions you may have. If you need to read multiple files, you should make multiple parallel calls to '${READ_FILE_TOOL_NAME}'.
345439
345437
  2. **Plan:** Build a coherent and grounded (based on the understanding in step 1) plan for how you intend to resolve the user's task. Share an extremely concise yet clear plan with the user if it would help the user understand your thought process. As part of the plan, you should use an iterative development process that includes writing unit tests to verify your changes. Use output logs or debug statements as part of this process to arrive at a solution.`,
345440
345438
  primaryWorkflows_prefix_ci: `
345441
345439
  # Primary Workflows
@@ -345456,7 +345454,7 @@ When requested to perform tasks like fixing bugs, adding features, refactoring,
345456
345454
 
345457
345455
  ## Software Engineering Tasks
345458
345456
  When requested to perform tasks like fixing bugs, adding features, refactoring, or explaining code, follow this sequence:
345459
- 1. **Understand:** Think about the user's request and the relevant codebase context. Use '${GREP_TOOL_NAME}' and '${GLOB_TOOL_NAME}' search tools extensively (in parallel if independent) to understand file structures, existing code patterns, and conventions. Use '${READ_FILE_TOOL_NAME}' and '${READ_MANY_FILES_TOOL_NAME}' to understand context and validate any assumptions you may have.
345457
+ 1. **Understand:** Think about the user's request and the relevant codebase context. Use '${GREP_TOOL_NAME}' and '${GLOB_TOOL_NAME}' search tools extensively (in parallel if independent) to understand file structures, existing code patterns, and conventions. Use '${READ_FILE_TOOL_NAME}' to understand context and validate any assumptions you may have. If you need to read multiple files, you should make multiple parallel calls to '${READ_FILE_TOOL_NAME}'.
345460
345458
  2. **Plan:** Build a coherent and grounded (based on the understanding in step 1) plan for how you intend to resolve the user's task. For complex tasks, break them down into smaller, manageable subtasks and use the \`${WRITE_TODOS_TOOL_NAME}\` tool to track your progress. Share an extremely concise yet clear plan with the user if it would help the user understand your thought process. As part of the plan, you should use an iterative development process that includes writing unit tests to verify your changes. Use output logs or debug statements as part of this process to arrive at a solution.`,
345461
345459
  primaryWorkflows_suffix: `3. **Implement:** Use the available tools (e.g., '${EDIT_TOOL_NAME}', '${WRITE_FILE_TOOL_NAME}' '${SHELL_TOOL_NAME}' ...) to act on the plan, strictly adhering to the project's established conventions (detailed under 'Core
345462
345460
  Mandates').
@@ -345471,9 +345469,9 @@ Mandates').
345471
345469
  1. **Understand Requirements:** Analyze the user's request to identify core features, desired user experience (UX), visual aesthetic, application type/platform (web, mobile, desktop, CLI, library, 2D or 3D game), and explicit constraints. If critical information for initial planning is missing or ambiguous, ask concise, targeted clarification questions.
345472
345470
  2. **Propose Plan:** Formulate an internal development plan. Present a clear, concise, high-level summary to the user. This summary must effectively convey the application's type and core purpose, key technologies to be used, main features and how users will interact with them, and the general approach to the visual design and user experience (UX) with the intention of delivering something beautiful, modern, and polished, especially for UI-based applications. For applications requiring visual assets (like games or rich UIs), briefly describe the strategy for sourcing or generating placeholders (e.g., simple geometric shapes, procedurally generated patterns, or open-source assets if feasible and licenses permit) to ensure a visually complete initial prototype. Ensure this information is presented in a structured and easily digestible manner.
345473
345471
  - When key technologies aren't specified, prefer the following:
345474
- - **Websites (Frontend):** React (JavaScript/TypeScript) with Bootstrap CSS, incorporating Material Design principles for UI/UX.
345472
+ - **Websites (Frontend):** React (JavaScript/TypeScript) or Angular with Bootstrap CSS, incorporating Material Design principles for UI/UX.
345475
345473
  - **Back-End APIs:** Node.js with Express.js (JavaScript/TypeScript) or Python with FastAPI.
345476
- - **Full-stack:** Next.js (React/Node.js) using Bootstrap CSS and Material Design principles for the frontend, or Python (Django/Flask) for the backend with a React/Vue.js frontend styled with Bootstrap CSS and Material Design principles.
345474
+ - **Full-stack:** Next.js (React/Node.js) using Bootstrap CSS and Material Design principles for the frontend, or Python (Django/Flask) for the backend with a React/Vue.js/Angular frontend styled with Bootstrap CSS and Material Design principles.
345477
345475
  - **CLIs:** Python or Go.
345478
345476
  - **Mobile App:** Compose Multiplatform (Kotlin Multiplatform) or Flutter (Dart) using Material Design libraries and principles, when sharing code between Android and iOS. Jetpack Compose (Kotlin JVM) with Material Design principles or SwiftUI (Swift) for native apps targeted at either Android or iOS, respectively.
345479
345477
  - **3d Games:** HTML/CSS/JavaScript with Three.js.
@@ -345486,7 +345484,6 @@ Mandates').
345486
345484
  # Operational Guidelines
345487
345485
  ${function() {
345488
345486
  if (config2.getEnableShellOutputEfficiency()) {
345489
- const tempDir = config2.storage.getProjectTempDir();
345490
345487
  return `
345491
345488
  ## Shell tool output token efficiency:
345492
345489
 
@@ -345496,8 +345493,8 @@ IT IS CRITICAL TO FOLLOW THESE GUIDELINES TO AVOID EXCESSIVE TOKEN CONSUMPTION.
345496
345493
  - Aim to minimize tool output tokens while still capturing necessary information.
345497
345494
  - If a command is expected to produce a lot of output, use quiet or silent flags where available and appropriate.
345498
345495
  - Always consider the trade-off between output verbosity and the need for information. If a command's full output is essential for understanding the result, avoid overly aggressive quieting that might obscure important details.
345499
- - If a command does not have quiet/silent flags or for commands with potentially long output that may not be useful, redirect stdout and stderr to temp files in the project's temporary directory: ${tempDir}. For example: 'command > ${path48.posix.join(tempDir, "out.log")} 2> ${path48.posix.join(tempDir, "err.log")}'.
345500
- - After the command runs, inspect the temp files (e.g. '${path48.posix.join(tempDir, "out.log")}' and '${path48.posix.join(tempDir, "err.log")}') using commands like 'grep', 'tail', 'head', ... (or platform equivalents). Remove the temp files when done.
345496
+ - If a command does not have quiet/silent flags or for commands with potentially long output that may not be useful, redirect stdout and stderr to temp files in the project's temporary directory. For example: 'command > <temp_dir>/out.log 2> <temp_dir>/err.log'.
345497
+ - After the command runs, inspect the temp files (e.g. '<temp_dir>/out.log' and '<temp_dir>/err.log') using commands like 'grep', 'tail', 'head', ... (or platform equivalents). Remove the temp files when done.
345501
345498
  `;
345502
345499
  }
345503
345500
  return "";
@@ -345578,7 +345575,7 @@ ${function() {
345578
345575
  }()}`,
345579
345576
  finalReminder: `
345580
345577
  # Final Reminder
345581
- Your core function is efficient and safe assistance. Balance extreme conciseness with the crucial need for clarity, especially regarding safety and potential system modifications. Always prioritize user control and project conventions. Never make assumptions about the contents of files; instead use '${READ_FILE_TOOL_NAME}' or '${READ_MANY_FILES_TOOL_NAME}' to ensure you aren't making broad assumptions. Finally, you are an agent - please keep going until the user's query is completely resolved.`
345578
+ Your core function is efficient and safe assistance. Balance extreme conciseness with the crucial need for clarity, especially regarding safety and potential system modifications. Always prioritize user control and project conventions. Never make assumptions about the contents of files; instead use '${READ_FILE_TOOL_NAME}' to ensure you aren't making broad assumptions. Finally, you are an agent - please keep going until the user's query is completely resolved.`
345582
345579
  };
345583
345580
  const orderedPrompts = [
345584
345581
  "preamble",
@@ -346291,6 +346288,9 @@ var GeminiClient = class {
346291
346288
  this.chat = await this.startChat();
346292
346289
  this.updateTelemetryTokenCount();
346293
346290
  }
346291
+ async resumeChat(history, resumedSessionData) {
346292
+ this.chat = await this.startChat(history, resumedSessionData);
346293
+ }
346294
346294
  getChatRecordingService() {
346295
346295
  return this.chat?.getChatRecordingService();
346296
346296
  }
@@ -346309,7 +346309,7 @@ var GeminiClient = class {
346309
346309
  parts: [{ text: await getDirectoryContextString(this.config) }]
346310
346310
  });
346311
346311
  }
346312
- async startChat(extraHistory) {
346312
+ async startChat(extraHistory, resumedSessionData) {
346313
346313
  this.forceFullIdeContext = true;
346314
346314
  this.hasFailedCompressionAttempt = false;
346315
346315
  const toolRegistry = this.config.getToolRegistry();
@@ -346331,7 +346331,7 @@ var GeminiClient = class {
346331
346331
  systemInstruction,
346332
346332
  ...config2,
346333
346333
  tools
346334
- }, history);
346334
+ }, history, resumedSessionData);
346335
346335
  } catch (error) {
346336
346336
  await reportError(error, "Error initializing Gemini chat session.", history, "startChat");
346337
346337
  throw new Error(`Failed to initialize chat: ${getErrorMessage(error)}`);
@@ -346583,25 +346583,27 @@ var GeminiClient = class {
346583
346583
  }
346584
346584
  return turn;
346585
346585
  }
346586
- async generateContent(contents, generationConfig, abortSignal, model) {
346587
- let currentAttemptModel = model;
346588
- const configToUse = {
346589
- ...this.generateContentConfig,
346590
- ...generationConfig
346591
- };
346586
+ async generateContent(modelConfigKey, contents, abortSignal) {
346587
+ const desiredModelConfig = this.config.modelConfigService.getResolvedConfig(modelConfigKey);
346588
+ let { model: currentAttemptModel, generateContentConfig: currentAttemptGenerateContentConfig } = desiredModelConfig;
346589
+ const fallbackModelConfig = this.config.modelConfigService.getResolvedConfig({
346590
+ ...modelConfigKey,
346591
+ model: DEFAULT_GEMINI_FLASH_MODEL
346592
+ });
346592
346593
  try {
346593
346594
  const userMemory = this.config.getUserMemory();
346594
346595
  const systemInstruction = getCoreSystemPrompt(this.config, userMemory);
346595
- const requestConfig = {
346596
- abortSignal,
346597
- ...configToUse,
346598
- systemInstruction
346599
- };
346600
346596
  const apiCall = () => {
346601
- const modelToUse = this.config.isInFallbackMode() ? DEFAULT_GEMINI_FLASH_MODEL : model;
346602
- currentAttemptModel = modelToUse;
346597
+ const modelConfigToUse = this.config.isInFallbackMode() ? fallbackModelConfig : desiredModelConfig;
346598
+ currentAttemptModel = modelConfigToUse.model;
346599
+ currentAttemptGenerateContentConfig = modelConfigToUse.generateContentConfig;
346600
+ const requestConfig = {
346601
+ ...currentAttemptGenerateContentConfig,
346602
+ abortSignal,
346603
+ systemInstruction
346604
+ };
346603
346605
  return this.getContentGeneratorOrFail().generateContent({
346604
- model: modelToUse,
346606
+ model: currentAttemptModel,
346605
346607
  config: requestConfig,
346606
346608
  contents
346607
346609
  }, this.lastPromptId);
@@ -346621,7 +346623,7 @@ var GeminiClient = class {
346621
346623
  }
346622
346624
  await reportError(error, `Error generating content via API with model ${currentAttemptModel}.`, {
346623
346625
  requestContents: contents,
346624
- requestConfig: configToUse
346626
+ requestConfig: currentAttemptGenerateContentConfig
346625
346627
  }, "generateContent-api");
346626
346628
  throw new Error(`Failed to generate content with model ${currentAttemptModel}: ${getErrorMessage(error)}`);
346627
346629
  }
@@ -352094,7 +352096,7 @@ var DEFAULT_MODEL_CONFIGS = {
352094
352096
  }
352095
352097
  }
352096
352098
  },
352097
- "web-search-tool": {
352099
+ "web-search": {
352098
352100
  extends: "gemini-2.5-flash-base",
352099
352101
  modelConfig: {
352100
352102
  generateContentConfig: {
@@ -352102,7 +352104,7 @@ var DEFAULT_MODEL_CONFIGS = {
352102
352104
  }
352103
352105
  }
352104
352106
  },
352105
- "web-fetch-tool": {
352107
+ "web-fetch": {
352106
352108
  extends: "gemini-2.5-flash-base",
352107
352109
  modelConfig: {
352108
352110
  generateContentConfig: {
@@ -352110,6 +352112,11 @@ var DEFAULT_MODEL_CONFIGS = {
352110
352112
  }
352111
352113
  }
352112
352114
  },
352115
+ // TODO(joshualitt): During cleanup, make modelConfig optional.
352116
+ "web-fetch-fallback": {
352117
+ extends: "gemini-2.5-flash-base",
352118
+ modelConfig: {}
352119
+ },
352113
352120
  "loop-detection": {
352114
352121
  extends: "gemini-2.5-flash-base",
352115
352122
  modelConfig: {}
@@ -354966,7 +354973,7 @@ async function getClientMetadata() {
354966
354973
  if (!clientMetadataPromise) {
354967
354974
  clientMetadataPromise = (async () => ({
354968
354975
  ideName: "GEMINI_CLI",
354969
- ideVersion: "0.15.0-nightly.20251111.51f952e7",
354976
+ ideVersion: "0.15.0-preview.1",
354970
354977
  platform: getPlatform(),
354971
354978
  updateChannel: await getReleaseChannel(__dirname5)
354972
354979
  }))();
@@ -355000,6 +355007,12 @@ function parseExperiments(response) {
355000
355007
  };
355001
355008
  }
355002
355009
 
355010
+ // packages/core/dist/src/code_assist/experiments/flagNames.js
355011
+ var ExperimentFlags = {
355012
+ CONTEXT_COMPRESSION_THRESHOLD: "GeminiCLIContextCompression__threshold_fraction",
355013
+ USER_CACHING: "GcliUserCaching__user_caching"
355014
+ };
355015
+
355003
355016
  // packages/core/dist/src/utils/memoryDiscovery.js
355004
355017
  import * as fs54 from "node:fs/promises";
355005
355018
  import * as fsSync from "node:fs";
@@ -357857,8 +357870,8 @@ var ErrorEvent = class extends Event {
357857
357870
  * @param inspect - The inspect function to use (prevents having to import it from `util`)
357858
357871
  * @returns A string representation of the error
357859
357872
  */
357860
- [Symbol.for("nodejs.util.inspect.custom")](_depth, options2, inspect4) {
357861
- return inspect4(inspectableError(this), options2);
357873
+ [Symbol.for("nodejs.util.inspect.custom")](_depth, options2, inspect5) {
357874
+ return inspect5(inspectableError(this), options2);
357862
357875
  }
357863
357876
  /**
357864
357877
  * Deno "hides" the `message` and `code` properties of the `ErrorEvent` instance,
@@ -357871,8 +357884,8 @@ var ErrorEvent = class extends Event {
357871
357884
  * @param options - The options passed to `Deno.inspect`
357872
357885
  * @returns A string representation of the error
357873
357886
  */
357874
- [Symbol.for("Deno.customInspect")](inspect4, options2) {
357875
- return inspect4(inspectableError(this), options2);
357887
+ [Symbol.for("Deno.customInspect")](inspect5, options2) {
357888
+ return inspect5(inspectableError(this), options2);
357876
357889
  }
357877
357890
  };
357878
357891
  function syntaxError(message) {
@@ -360442,6 +360455,8 @@ var Config = class {
360442
360455
  ideMode;
360443
360456
  inFallbackMode = false;
360444
360457
  maxSessionTurns;
360458
+ listSessions;
360459
+ deleteSession;
360445
360460
  listExtensions;
360446
360461
  _extensionLoader;
360447
360462
  _enabledExtensions;
@@ -360538,6 +360553,8 @@ var Config = class {
360538
360553
  this.model = params.model;
360539
360554
  this.maxSessionTurns = params.maxSessionTurns ?? -1;
360540
360555
  this.experimentalZedIntegration = params.experimentalZedIntegration ?? false;
360556
+ this.listSessions = params.listSessions ?? false;
360557
+ this.deleteSession = params.deleteSession;
360541
360558
  this.listExtensions = params.listExtensions ?? false;
360542
360559
  this._extensionLoader = params.extensionLoader ?? new SimpleExtensionLoader([]);
360543
360560
  this._enabledExtensions = params.enabledExtensions ?? [];
@@ -360646,6 +360663,26 @@ var Config = class {
360646
360663
  await this.getExtensionLoader().start(this)
360647
360664
  ]);
360648
360665
  await this.geminiClient.initialize();
360666
+ this.checkDeprecatedTools();
360667
+ }
360668
+ checkDeprecatedTools() {
360669
+ const deprecatedTools = [
360670
+ {
360671
+ name: READ_MANY_FILES_TOOL_NAME,
360672
+ alternateName: "ReadManyFilesTool"
360673
+ }
360674
+ ];
360675
+ const checkList = (list3, listName) => {
360676
+ if (!list3)
360677
+ return;
360678
+ for (const tool of deprecatedTools) {
360679
+ if (list3.includes(tool.name) || list3.includes(tool.alternateName)) {
360680
+ coreEvents.emitFeedback("warning", `The tool '${tool.name}' (or '${tool.alternateName}') specified in '${listName}' is deprecated and will be removed in v0.16.0.`);
360681
+ }
360682
+ }
360683
+ };
360684
+ checkList(this.coreTools, "tools.core");
360685
+ checkList(this.allowedTools, "tools.allowed");
360649
360686
  }
360650
360687
  getContentGenerator() {
360651
360688
  return this.contentGenerator;
@@ -360697,6 +360734,9 @@ var Config = class {
360697
360734
  getSessionId() {
360698
360735
  return this.sessionId;
360699
360736
  }
360737
+ setSessionId(sessionId2) {
360738
+ this.sessionId = sessionId2;
360739
+ }
360700
360740
  shouldLoadMemoryFromIncludeDirectories() {
360701
360741
  return this.loadMemoryFromIncludeDirectories;
360702
360742
  }
@@ -360941,6 +360981,12 @@ var Config = class {
360941
360981
  getListExtensions() {
360942
360982
  return this.listExtensions;
360943
360983
  }
360984
+ getListSessions() {
360985
+ return this.listSessions;
360986
+ }
360987
+ getDeleteSession() {
360988
+ return this.deleteSession;
360989
+ }
360944
360990
  getExtensionManagement() {
360945
360991
  return this.extensionManagement;
360946
360992
  }
@@ -361006,19 +361052,27 @@ var Config = class {
361006
361052
  if (this.compressionThreshold) {
361007
361053
  return this.compressionThreshold;
361008
361054
  }
361009
- if (this.experimentsPromise) {
361010
- try {
361011
- await this.experimentsPromise;
361012
- } catch (e2) {
361013
- debugLogger.debug("Failed to fetch experiments", e2);
361014
- }
361015
- }
361016
- const remoteThreshold = this.experiments?.flags["GeminiCLIContextCompression__threshold_fraction"]?.floatValue;
361055
+ await this.ensureExperimentsLoaded();
361056
+ const remoteThreshold = this.experiments?.flags[ExperimentFlags.CONTEXT_COMPRESSION_THRESHOLD]?.floatValue;
361017
361057
  if (remoteThreshold === 0) {
361018
361058
  return void 0;
361019
361059
  }
361020
361060
  return remoteThreshold;
361021
361061
  }
361062
+ async getUserCaching() {
361063
+ await this.ensureExperimentsLoaded();
361064
+ return this.experiments?.flags[ExperimentFlags.USER_CACHING]?.boolValue;
361065
+ }
361066
+ async ensureExperimentsLoaded() {
361067
+ if (!this.experimentsPromise) {
361068
+ return;
361069
+ }
361070
+ try {
361071
+ await this.experimentsPromise;
361072
+ } catch (e2) {
361073
+ debugLogger.debug("Failed to fetch experiments", e2);
361074
+ }
361075
+ }
361022
361076
  isInteractiveShellEnabled() {
361023
361077
  return this.interactive && this.ptyInfo !== "child_process" && this.enableInteractiveShell;
361024
361078
  }
@@ -361197,6 +361251,42 @@ var Config = class {
361197
361251
  */
361198
361252
  setExperiments(experiments) {
361199
361253
  this.experiments = experiments;
361254
+ const flagSummaries = Object.entries(experiments.flags ?? {}).sort(([a2], [b]) => a2.localeCompare(b)).map(([name4, flag]) => {
361255
+ const summary2 = { name: name4 };
361256
+ if (flag.boolValue !== void 0) {
361257
+ summary2["boolValue"] = flag.boolValue;
361258
+ }
361259
+ if (flag.floatValue !== void 0) {
361260
+ summary2["floatValue"] = flag.floatValue;
361261
+ }
361262
+ if (flag.intValue !== void 0) {
361263
+ summary2["intValue"] = flag.intValue;
361264
+ }
361265
+ if (flag.stringValue !== void 0) {
361266
+ summary2["stringValue"] = flag.stringValue;
361267
+ }
361268
+ const int32Length = flag.int32ListValue?.values?.length ?? 0;
361269
+ if (int32Length > 0) {
361270
+ summary2["int32ListLength"] = int32Length;
361271
+ }
361272
+ const stringListLength = flag.stringListValue?.values?.length ?? 0;
361273
+ if (stringListLength > 0) {
361274
+ summary2["stringListLength"] = stringListLength;
361275
+ }
361276
+ return summary2;
361277
+ });
361278
+ const summary = {
361279
+ experimentIds: experiments.experimentIds ?? [],
361280
+ flags: flagSummaries
361281
+ };
361282
+ const summaryString = inspect4(summary, {
361283
+ depth: null,
361284
+ maxArrayLength: null,
361285
+ maxStringLength: null,
361286
+ breakLength: 80,
361287
+ compact: false
361288
+ });
361289
+ debugLogger.debug("Experiments loaded", summaryString);
361200
361290
  }
361201
361291
  };
361202
361292