@google/gemini-cli 0.35.0-preview.2 → 0.36.0-nightly.20260321.fc03891a1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (93) hide show
  1. package/README.md +0 -1
  2. package/bundle/{chunk-QO53VEHI.js → chunk-5725SFQR.js} +87 -47
  3. package/bundle/{chunk-HYF34ISK.js → chunk-CCJTFLFP.js} +5629 -5226
  4. package/bundle/{chunk-5OVDZKPV.js → chunk-D7FYAQ3H.js} +59887 -34723
  5. package/bundle/{chunk-6AQAEYFC.js → chunk-HFDLZAI6.js} +59887 -34723
  6. package/bundle/{chunk-WTYAEXC3.js → chunk-MIAZ3PM6.js} +59887 -34723
  7. package/bundle/{chunk-WXXNCSKU.js → chunk-NA5KUNBD.js} +5629 -5226
  8. package/bundle/{chunk-SCIFYSWM.js → chunk-UOFTUVGG.js} +5629 -5226
  9. package/bundle/{chunk-C2LINL7G.js → chunk-W5ORWYUB.js} +83 -45
  10. package/bundle/{chunk-TYZCRVGB.js → chunk-XYHDU7NF.js} +5629 -5226
  11. package/bundle/{chunk-ELVZ5MKI.js → chunk-ZUXLXS2J.js} +72724 -47403
  12. package/bundle/{core-ZWMLWHG7.js → core-GS2P42IT.js} +48 -3
  13. package/bundle/{devtoolsService-XMVPJFZ7.js → devtoolsService-DUME7JA6.js} +3 -4
  14. package/bundle/{devtoolsService-DH7MKZL2.js → devtoolsService-GFJFWZMN.js} +3 -4
  15. package/bundle/{devtoolsService-EVTQ32UO.js → devtoolsService-NYUXHIPC.js} +3 -4
  16. package/bundle/{devtoolsService-FPFZEEVK.js → devtoolsService-RC5CN5TA.js} +3 -4
  17. package/bundle/{dist-6LCHGUBD.js → dist-GAJJIGQH.js} +48 -3
  18. package/bundle/{dist-AWPSKKKO.js → dist-RXTU4IDW.js} +48 -3
  19. package/bundle/{dist-WOQEPX5R.js → dist-ULRCP5C6.js} +48 -3
  20. package/bundle/docs/CONTRIBUTING.md +0 -15
  21. package/bundle/docs/admin/enterprise-controls.md +61 -0
  22. package/bundle/docs/changelogs/index.md +11 -0
  23. package/bundle/docs/changelogs/latest.md +459 -209
  24. package/bundle/docs/changelogs/preview.md +355 -454
  25. package/bundle/docs/cli/checkpointing.md +3 -1
  26. package/bundle/docs/cli/cli-reference.md +1 -0
  27. package/bundle/docs/cli/custom-commands.md +7 -5
  28. package/bundle/docs/cli/enterprise.md +15 -9
  29. package/bundle/docs/cli/git-worktrees.md +107 -0
  30. package/bundle/docs/cli/model-steering.md +4 -3
  31. package/bundle/docs/cli/model.md +3 -1
  32. package/bundle/docs/cli/notifications.md +4 -3
  33. package/bundle/docs/cli/plan-mode.md +28 -8
  34. package/bundle/docs/cli/sandbox.md +24 -4
  35. package/bundle/docs/cli/session-management.md +6 -0
  36. package/bundle/docs/cli/settings.md +14 -1
  37. package/bundle/docs/cli/skills.md +4 -2
  38. package/bundle/docs/cli/system-prompt.md +3 -1
  39. package/bundle/docs/cli/telemetry.md +6 -3
  40. package/bundle/docs/cli/themes.md +12 -8
  41. package/bundle/docs/cli/tutorials/file-management.md +8 -6
  42. package/bundle/docs/cli/tutorials/mcp-setup.md +5 -3
  43. package/bundle/docs/cli/tutorials/memory-management.md +6 -6
  44. package/bundle/docs/cli/tutorials/plan-mode-steering.md +4 -3
  45. package/bundle/docs/cli/tutorials/shell-commands.md +3 -3
  46. package/bundle/docs/core/remote-agents.md +8 -3
  47. package/bundle/docs/core/subagents.md +21 -13
  48. package/bundle/docs/extensions/reference.md +8 -3
  49. package/bundle/docs/get-started/authentication.md +60 -50
  50. package/bundle/docs/get-started/examples.md +3 -1
  51. package/bundle/docs/get-started/gemini-3.md +11 -5
  52. package/bundle/docs/hooks/index.md +3 -1
  53. package/bundle/docs/hooks/writing-hooks.md +2 -2
  54. package/bundle/docs/ide-integration/ide-companion-spec.md +5 -3
  55. package/bundle/docs/ide-integration/index.md +8 -4
  56. package/bundle/docs/issue-and-pr-automation.md +3 -1
  57. package/bundle/docs/local-development.md +3 -1
  58. package/bundle/docs/reference/commands.md +2 -2
  59. package/bundle/docs/reference/configuration.md +410 -16
  60. package/bundle/docs/reference/policy-engine.md +47 -19
  61. package/bundle/docs/reference/tools.md +3 -1
  62. package/bundle/docs/release-confidence.md +7 -3
  63. package/bundle/docs/releases.md +11 -7
  64. package/bundle/docs/resources/faq.md +13 -0
  65. package/bundle/docs/resources/tos-privacy.md +4 -2
  66. package/bundle/docs/resources/troubleshooting.md +3 -1
  67. package/bundle/docs/sidebar.json +5 -0
  68. package/bundle/docs/tools/mcp-server.md +17 -9
  69. package/bundle/docs/tools/planning.md +3 -1
  70. package/bundle/docs/tools/shell.md +4 -4
  71. package/bundle/docs/tools/todos.md +2 -1
  72. package/bundle/gemini.js +4392 -7551
  73. package/bundle/{interactiveCli-E3DWTWRM.js → interactiveCli-FYYDCEQS.js} +2738 -2353
  74. package/bundle/{interactiveCli-N4QW3NCZ.js → interactiveCli-OY77TZRB.js} +2738 -2353
  75. package/bundle/{interactiveCli-Z4Y6XB7M.js → interactiveCli-QWWY5YAU.js} +2738 -2353
  76. package/bundle/{interactiveCli-7H3T4KJF.js → interactiveCli-RMQZ5WRR.js} +2738 -2353
  77. package/bundle/{memoryDiscovery-7LUUOJNM.js → memoryDiscovery-HKWK4IPH.js} +1 -1
  78. package/bundle/{memoryDiscovery-RRX6QF4Y.js → memoryDiscovery-OV4FUTHJ.js} +1 -1
  79. package/bundle/node_modules/@google/gemini-cli-devtools/dist/client/main.js +2 -2
  80. package/bundle/node_modules/@google/gemini-cli-devtools/dist/src/_client-assets.d.ts +1 -1
  81. package/bundle/node_modules/@google/gemini-cli-devtools/dist/src/_client-assets.js +1 -1
  82. package/bundle/node_modules/@google/gemini-cli-devtools/dist/src/_client-assets.js.map +1 -1
  83. package/bundle/node_modules/@google/gemini-cli-devtools/package.json +1 -1
  84. package/bundle/{oauth2-provider-CPMX7ITW.js → oauth2-provider-CFIR577H.js} +2 -3
  85. package/bundle/{oauth2-provider-IU6STKL7.js → oauth2-provider-DX62BK7X.js} +2 -3
  86. package/bundle/{oauth2-provider-LTBDSRHY.js → oauth2-provider-EKENRGNL.js} +2 -3
  87. package/bundle/{oauth2-provider-ZWWMTBET.js → oauth2-provider-EWXMX6DR.js} +2 -3
  88. package/bundle/policies/memory-manager.toml +10 -0
  89. package/bundle/policies/plan.toml +14 -0
  90. package/bundle/policies/yolo.toml +1 -0
  91. package/package.json +1 -1
  92. package/bundle/chunk-37ZTTFQF.js +0 -23568
  93. package/bundle/undici-4X2YZID5.js +0 -6
@@ -3509,49 +3509,49 @@ var require_fast_uri = __commonJS({
3509
3509
  const resolved = resolveComponents(parse(baseURI, schemelessOptions), parse(relativeURI, schemelessOptions), schemelessOptions, true);
3510
3510
  return serialize(resolved, { ...schemelessOptions, skipEscape: true });
3511
3511
  }
3512
- function resolveComponents(base, relative2, options, skipNormalization) {
3512
+ function resolveComponents(base, relative, options, skipNormalization) {
3513
3513
  const target = {};
3514
3514
  if (!skipNormalization) {
3515
3515
  base = parse(serialize(base, options), options);
3516
- relative2 = parse(serialize(relative2, options), options);
3516
+ relative = parse(serialize(relative, options), options);
3517
3517
  }
3518
3518
  options = options || {};
3519
- if (!options.tolerant && relative2.scheme) {
3520
- target.scheme = relative2.scheme;
3521
- target.userinfo = relative2.userinfo;
3522
- target.host = relative2.host;
3523
- target.port = relative2.port;
3524
- target.path = removeDotSegments(relative2.path || "");
3525
- target.query = relative2.query;
3519
+ if (!options.tolerant && relative.scheme) {
3520
+ target.scheme = relative.scheme;
3521
+ target.userinfo = relative.userinfo;
3522
+ target.host = relative.host;
3523
+ target.port = relative.port;
3524
+ target.path = removeDotSegments(relative.path || "");
3525
+ target.query = relative.query;
3526
3526
  } else {
3527
- if (relative2.userinfo !== void 0 || relative2.host !== void 0 || relative2.port !== void 0) {
3528
- target.userinfo = relative2.userinfo;
3529
- target.host = relative2.host;
3530
- target.port = relative2.port;
3531
- target.path = removeDotSegments(relative2.path || "");
3532
- target.query = relative2.query;
3527
+ if (relative.userinfo !== void 0 || relative.host !== void 0 || relative.port !== void 0) {
3528
+ target.userinfo = relative.userinfo;
3529
+ target.host = relative.host;
3530
+ target.port = relative.port;
3531
+ target.path = removeDotSegments(relative.path || "");
3532
+ target.query = relative.query;
3533
3533
  } else {
3534
- if (!relative2.path) {
3534
+ if (!relative.path) {
3535
3535
  target.path = base.path;
3536
- if (relative2.query !== void 0) {
3537
- target.query = relative2.query;
3536
+ if (relative.query !== void 0) {
3537
+ target.query = relative.query;
3538
3538
  } else {
3539
3539
  target.query = base.query;
3540
3540
  }
3541
3541
  } else {
3542
- if (relative2.path.charAt(0) === "/") {
3543
- target.path = removeDotSegments(relative2.path);
3542
+ if (relative.path.charAt(0) === "/") {
3543
+ target.path = removeDotSegments(relative.path);
3544
3544
  } else {
3545
3545
  if ((base.userinfo !== void 0 || base.host !== void 0 || base.port !== void 0) && !base.path) {
3546
- target.path = "/" + relative2.path;
3546
+ target.path = "/" + relative.path;
3547
3547
  } else if (!base.path) {
3548
- target.path = relative2.path;
3548
+ target.path = relative.path;
3549
3549
  } else {
3550
- target.path = base.path.slice(0, base.path.lastIndexOf("/") + 1) + relative2.path;
3550
+ target.path = base.path.slice(0, base.path.lastIndexOf("/") + 1) + relative.path;
3551
3551
  }
3552
3552
  target.path = removeDotSegments(target.path);
3553
3553
  }
3554
- target.query = relative2.query;
3554
+ target.query = relative.query;
3555
3555
  }
3556
3556
  target.userinfo = base.userinfo;
3557
3557
  target.host = base.host;
@@ -3559,7 +3559,7 @@ var require_fast_uri = __commonJS({
3559
3559
  }
3560
3560
  target.scheme = base.scheme;
3561
3561
  }
3562
- target.fragment = relative2.fragment;
3562
+ target.fragment = relative.fragment;
3563
3563
  return target;
3564
3564
  }
3565
3565
  function equal(uriA, uriB, options) {
@@ -21271,7 +21271,7 @@ var require_filesubjecttokensupplier = __commonJS({
21271
21271
  }));
21272
21272
  var realpath2 = (0, util_1.promisify)(fs11.realpath ?? (() => {
21273
21273
  }));
21274
- var lstat2 = (0, util_1.promisify)(fs11.lstat ?? (() => {
21274
+ var lstat = (0, util_1.promisify)(fs11.lstat ?? (() => {
21275
21275
  }));
21276
21276
  var FileSubjectTokenSupplier = class {
21277
21277
  filePath;
@@ -21297,7 +21297,7 @@ var require_filesubjecttokensupplier = __commonJS({
21297
21297
  let parsedFilePath = this.filePath;
21298
21298
  try {
21299
21299
  parsedFilePath = await realpath2(parsedFilePath);
21300
- if (!(await lstat2(parsedFilePath)).isFile()) {
21300
+ if (!(await lstat(parsedFilePath)).isFile()) {
21301
21301
  throw new Error();
21302
21302
  }
21303
21303
  } catch (err) {
@@ -40814,6 +40814,7 @@ var InProcessCheckerType;
40814
40814
  var PRIORITY_SUBAGENT_TOOL = 1.05;
40815
40815
  var ALWAYS_ALLOW_PRIORITY_FRACTION = 950;
40816
40816
  var ALWAYS_ALLOW_PRIORITY_OFFSET = ALWAYS_ALLOW_PRIORITY_FRACTION / 1e3;
40817
+ var PRIORITY_YOLO_ALLOW_ALL = 998;
40817
40818
 
40818
40819
  // packages/core/dist/src/tools/tools.js
40819
40820
  function isBackgroundExecutionData(data) {
@@ -41468,8 +41469,8 @@ function normalizePath(p) {
41468
41469
  function isSubpath(parentPath, childPath) {
41469
41470
  const isWindows = process.platform === "win32";
41470
41471
  const pathModule = isWindows ? path3.win32 : path3;
41471
- const relative2 = pathModule.relative(parentPath, childPath);
41472
- return !relative2.startsWith(`..${pathModule.sep}`) && relative2 !== ".." && !pathModule.isAbsolute(relative2);
41472
+ const relative = pathModule.relative(parentPath, childPath);
41473
+ return !relative.startsWith(`..${pathModule.sep}`) && relative !== ".." && !pathModule.isAbsolute(relative);
41473
41474
  }
41474
41475
  function resolveToRealPath(pathStr) {
41475
41476
  let resolvedPath = pathStr;
@@ -42873,7 +42874,24 @@ var GEMINI_MODEL_ALIAS_FLASH = "flash";
42873
42874
  var GEMINI_MODEL_ALIAS_FLASH_LITE = "flash-lite";
42874
42875
  var DEFAULT_GEMINI_EMBEDDING_MODEL = "gemini-embedding-001";
42875
42876
  var DEFAULT_THINKING_MODE = 8192;
42876
- function resolveModel(requestedModel, useGemini3_1 = false, useCustomToolModel = false, hasAccessToPreview = true) {
42877
+ function resolveModel(requestedModel, useGemini3_1 = false, useCustomToolModel = false, hasAccessToPreview = true, config) {
42878
+ if (config?.getExperimentalDynamicModelConfiguration?.() === true) {
42879
+ const resolved2 = config.modelConfigService.resolveModelId(requestedModel, {
42880
+ useGemini3_1,
42881
+ useCustomTools: useCustomToolModel,
42882
+ hasAccessToPreview
42883
+ });
42884
+ if (!hasAccessToPreview && isPreviewModel(resolved2, config)) {
42885
+ if (resolved2.includes("flash-lite")) {
42886
+ return DEFAULT_GEMINI_FLASH_LITE_MODEL;
42887
+ }
42888
+ if (resolved2.includes("flash")) {
42889
+ return DEFAULT_GEMINI_FLASH_MODEL;
42890
+ }
42891
+ return DEFAULT_GEMINI_MODEL;
42892
+ }
42893
+ return resolved2;
42894
+ }
42877
42895
  let resolved;
42878
42896
  switch (requestedModel) {
42879
42897
  case PREVIEW_GEMINI_MODEL:
@@ -42924,7 +42942,14 @@ function resolveModel(requestedModel, useGemini3_1 = false, useCustomToolModel =
42924
42942
  }
42925
42943
  return resolved;
42926
42944
  }
42927
- function resolveClassifierModel(requestedModel, modelAlias, useGemini3_1 = false, useCustomToolModel = false) {
42945
+ function resolveClassifierModel(requestedModel, modelAlias, useGemini3_1 = false, useCustomToolModel = false, hasAccessToPreview = true, config) {
42946
+ if (config?.getExperimentalDynamicModelConfiguration?.() === true) {
42947
+ return config.modelConfigService.resolveClassifierModelId(modelAlias, requestedModel, {
42948
+ useGemini3_1,
42949
+ useCustomTools: useCustomToolModel,
42950
+ hasAccessToPreview
42951
+ });
42952
+ }
42928
42953
  if (modelAlias === GEMINI_MODEL_ALIAS_FLASH) {
42929
42954
  if (requestedModel === DEFAULT_GEMINI_MODEL_AUTO || requestedModel === DEFAULT_GEMINI_MODEL) {
42930
42955
  return DEFAULT_GEMINI_FLASH_MODEL;
@@ -42983,7 +43008,7 @@ function isGemini2Model(model) {
42983
43008
  }
42984
43009
  function isCustomModel(model, config) {
42985
43010
  if (config?.getExperimentalDynamicModelConfiguration?.() === true) {
42986
- const resolved2 = resolveModel(model);
43011
+ const resolved2 = resolveModel(model, false, false, true, config);
42987
43012
  return config.modelConfigService.getModelDefinition(resolved2)?.tier === "custom" || !resolved2.startsWith("gemini-");
42988
43013
  }
42989
43014
  const resolved = resolveModel(model);
@@ -48931,6 +48956,7 @@ DO NOT use this tool for simple tasks that can be completed in less than 2 steps
48931
48956
  - in_progress: Marked just prior to beginning work on a given subtask. You should only have one subtask as in_progress at a time.
48932
48957
  - completed: Subtask was successfully completed with no errors or issues. If the subtask required more steps to complete, update the todo list with the subtasks. All steps should be identified as completed only when they are completed.
48933
48958
  - cancelled: As you update the todo list, some tasks are not required anymore due to the dynamic nature of the task. In this case, mark the subtasks as cancelled.
48959
+ - blocked: Subtask is blocked and cannot be completed at this time.
48934
48960
 
48935
48961
 
48936
48962
  ## Methodology for using this tool
@@ -48996,7 +49022,13 @@ The agent did not use the todo list because this task could be completed by a ti
48996
49022
  [TODOS_ITEM_PARAM_STATUS]: {
48997
49023
  type: "string",
48998
49024
  description: "The current status of the task.",
48999
- enum: ["pending", "in_progress", "completed", "cancelled"]
49025
+ enum: [
49026
+ "pending",
49027
+ "in_progress",
49028
+ "completed",
49029
+ "cancelled",
49030
+ "blocked"
49031
+ ]
49000
49032
  }
49001
49033
  },
49002
49034
  required: [TODOS_ITEM_PARAM_DESCRIPTION, TODOS_ITEM_PARAM_STATUS],
@@ -49484,6 +49516,7 @@ DO NOT use this tool for simple tasks that can be completed in less than 2 steps
49484
49516
  - in_progress: Marked just prior to beginning work on a given subtask. You should only have one subtask as in_progress at a time.
49485
49517
  - completed: Subtask was successfully completed with no errors or issues. If the subtask required more steps to complete, update the todo list with the subtasks. All steps should be identified as completed only when they are completed.
49486
49518
  - cancelled: As you update the todo list, some tasks are not required anymore due to the dynamic nature of the task. In this case, mark the subtasks as cancelled.
49519
+ - blocked: Subtask is blocked and cannot be completed at this time.
49487
49520
 
49488
49521
 
49489
49522
  ## Methodology for using this tool
@@ -49549,7 +49582,13 @@ The agent did not use the todo list because this task could be completed by a ti
49549
49582
  [TODOS_ITEM_PARAM_STATUS]: {
49550
49583
  type: "string",
49551
49584
  description: "The current status of the task.",
49552
- enum: ["pending", "in_progress", "completed", "cancelled"]
49585
+ enum: [
49586
+ "pending",
49587
+ "in_progress",
49588
+ "completed",
49589
+ "cancelled",
49590
+ "blocked"
49591
+ ]
49553
49592
  }
49554
49593
  },
49555
49594
  required: [TODOS_ITEM_PARAM_DESCRIPTION, TODOS_ITEM_PARAM_STATUS],
@@ -50484,10 +50523,8 @@ async function findProjectRoot(startDir) {
50484
50523
  while (true) {
50485
50524
  const gitPath = path8.join(currentDir, ".git");
50486
50525
  try {
50487
- const stats = await fs9.lstat(gitPath);
50488
- if (stats.isDirectory()) {
50489
- return currentDir;
50490
- }
50526
+ await fs9.access(gitPath);
50527
+ return currentDir;
50491
50528
  } catch {
50492
50529
  }
50493
50530
  const parentDir = path8.dirname(currentDir);
@@ -51420,16 +51457,15 @@ async function readGeminiMdFiles(filePaths, importFormat = "tree") {
51420
51457
  }
51421
51458
  return results;
51422
51459
  }
51423
- function concatenateInstructions(instructionContents, currentWorkingDirectoryForDisplay) {
51460
+ function concatenateInstructions(instructionContents) {
51424
51461
  return instructionContents.filter((item) => typeof item.content === "string").map((item) => {
51425
51462
  const trimmedContent = item.content.trim();
51426
51463
  if (trimmedContent.length === 0) {
51427
51464
  return null;
51428
51465
  }
51429
- const displayPath = path9.isAbsolute(item.filePath) ? path9.relative(currentWorkingDirectoryForDisplay, item.filePath) : item.filePath;
51430
- return `--- Context from: ${displayPath} ---
51466
+ return `--- Context from: ${item.filePath} ---
51431
51467
  ${trimmedContent}
51432
- --- End of Context from: ${displayPath} ---`;
51468
+ --- End of Context from: ${item.filePath} ---`;
51433
51469
  }).filter((block) => block !== null).join("\n\n");
51434
51470
  }
51435
51471
  async function getGlobalMemoryPaths() {
@@ -51464,8 +51500,8 @@ async function getEnvironmentMemoryPaths(trustedRoots) {
51464
51500
  pathArrays.flat().forEach((p) => allPaths.add(p));
51465
51501
  return Array.from(allPaths).sort();
51466
51502
  }
51467
- function categorizeAndConcatenate(paths, contentsMap, workingDir) {
51468
- const getConcatenated = (pList) => concatenateInstructions(pList.map((p) => contentsMap.get(p)).filter((c) => !!c), workingDir);
51503
+ function categorizeAndConcatenate(paths, contentsMap) {
51504
+ const getConcatenated = (pList) => concatenateInstructions(pList.map((p) => contentsMap.get(p)).filter((c) => !!c));
51469
51505
  return {
51470
51506
  global: getConcatenated(paths.global),
51471
51507
  extension: getConcatenated(paths.extension),
@@ -51541,7 +51577,7 @@ async function loadServerHierarchicalMemory(currentWorkingDirectory, includeDire
51541
51577
  global: discoveryResult.global,
51542
51578
  extension: extensionPaths,
51543
51579
  project: discoveryResult.project
51544
- }, contentsMap, currentWorkingDirectory);
51580
+ }, contentsMap);
51545
51581
  return {
51546
51582
  memoryContent: hierarchicalMemory,
51547
51583
  fileCount: allContents.filter((c) => c.content !== null).length,
@@ -51706,6 +51742,7 @@ export {
51706
51742
  PRIORITY_SUBAGENT_TOOL,
51707
51743
  ALWAYS_ALLOW_PRIORITY_FRACTION,
51708
51744
  ALWAYS_ALLOW_PRIORITY_OFFSET,
51745
+ PRIORITY_YOLO_ALLOW_ALL,
51709
51746
  safeJsonStringify,
51710
51747
  safeJsonStringifyBooleanValuesOnly,
51711
51748
  ToolErrorType,
@@ -51714,6 +51751,7 @@ export {
51714
51751
  require_fast_uri,
51715
51752
  require_dist,
51716
51753
  SchemaValidator,
51754
+ jsonToMarkdown,
51717
51755
  safeJsonToMarkdown,
51718
51756
  isRecord,
51719
51757
  MessageBusType,