@google/gemini-cli 0.46.0-preview.0 → 0.47.0-nightly.20260604.g4196596f7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (70) hide show
  1. package/bundle/{chunk-773AJHDP.js → chunk-3W7O744A.js} +7 -7
  2. package/bundle/{chunk-S2ICEQVC.js → chunk-6NI3XGUW.js} +3 -3
  3. package/bundle/{chunk-J444UQD3.js → chunk-A3QBI6HT.js} +1 -1
  4. package/bundle/{chunk-2GMVQS2Q.js → chunk-AW75DLSA.js} +1 -1
  5. package/bundle/{chunk-GTRQQGSJ.js → chunk-BB7JWK6H.js} +1 -1
  6. package/bundle/{chunk-4K3E3G6Z.js → chunk-C2QIEMR3.js} +8 -5
  7. package/bundle/{chunk-BOJOJVNV.js → chunk-CHV5VX6V.js} +1 -1
  8. package/bundle/{chunk-4AGOZ7LL.js → chunk-CRXOPS47.js} +7 -7
  9. package/bundle/{chunk-FIM2LOYZ.js → chunk-CVUIGVVW.js} +84 -41
  10. package/bundle/{chunk-F2LLVPPS.js → chunk-D6S4W2BY.js} +2 -2
  11. package/bundle/{chunk-YMNECODB.js → chunk-DJ4OX7HV.js} +9 -8
  12. package/bundle/{chunk-MFYAVF7Y.js → chunk-EO3RKLTR.js} +67 -54
  13. package/bundle/{chunk-HMR43ZX2.js → chunk-FKA6UHBW.js} +2 -2
  14. package/bundle/{chunk-SHFHGDWR.js → chunk-GRGDQ7OF.js} +2 -2
  15. package/bundle/{chunk-ZXN4VW7M.js → chunk-H3N5WAYS.js} +1 -1
  16. package/bundle/{chunk-QFEJQS5X.js → chunk-IIRRE2XB.js} +1 -1
  17. package/bundle/{chunk-HZNEV3DS.js → chunk-K2SOQJMX.js} +1 -1
  18. package/bundle/{chunk-TDYUKPZH.js → chunk-KAOVKGFU.js} +1 -1
  19. package/bundle/{chunk-5LUCCXOB.js → chunk-MCHAK65W.js} +1 -1
  20. package/bundle/{chunk-RXG3JOOZ.js → chunk-NGEP3723.js} +1 -1
  21. package/bundle/{chunk-HHFFICNK.js → chunk-OQQDPZ7U.js} +92 -43
  22. package/bundle/{chunk-LBE2WKE7.js → chunk-P2LFCR6H.js} +3 -3
  23. package/bundle/{chunk-XRDSBRG4.js → chunk-PML6IHTI.js} +7596 -14082
  24. package/bundle/chunk-PQODER6W.js +81685 -0
  25. package/bundle/{chunk-ZQGZKIDD.js → chunk-S6TN66XT.js} +3 -3
  26. package/bundle/chunk-SHFWC7OK.js +154 -0
  27. package/bundle/chunk-SMQML5YF.js +512 -0
  28. package/bundle/chunk-UGUHWSGX.js +394571 -0
  29. package/bundle/chunk-WMO6YVSB.js +17320 -0
  30. package/bundle/chunk-WXZDGQ54.js +1571 -0
  31. package/bundle/chunk-XV2S2W35.js +118 -0
  32. package/bundle/chunk-XYFHAF63.js +398 -0
  33. package/bundle/{cleanup-2WXD6UQP.js → cleanup-BW23QVLV.js} +2 -2
  34. package/bundle/{cleanup-L3CLNVX6.js → cleanup-JXW2VUDZ.js} +2 -2
  35. package/bundle/{cleanup-SUDL37MT.js → cleanup-KBVHA63R.js} +2 -2
  36. package/bundle/cleanup-R6VVJEFJ.js +32 -0
  37. package/bundle/{core-VVRQ2GQD.js → core-63AY4S7W.js} +3 -1
  38. package/bundle/{devtoolsService-GLW7S6PS.js → devtoolsService-3QDYHBLU.js} +2 -2
  39. package/bundle/{devtoolsService-ZYCBBAV3.js → devtoolsService-6YXHJCBF.js} +2 -2
  40. package/bundle/{devtoolsService-E62WA3CY.js → devtoolsService-RXKSY7NL.js} +4 -3
  41. package/bundle/devtoolsService-YMGOQMUC.js +856 -0
  42. package/bundle/{dist-GPCRVPKS.js → dist-N2CG2AMX.js} +3 -1
  43. package/bundle/{core-MOYKPEYV.js → dist-VGFRXX7L.js} +3 -1
  44. package/bundle/dist-YXW6V43L.js +2140 -0
  45. package/bundle/docs/changelogs/index.md +18 -0
  46. package/bundle/docs/changelogs/latest.md +46 -202
  47. package/bundle/docs/changelogs/preview.md +28 -46
  48. package/bundle/docs/reference/configuration.md +3 -1
  49. package/bundle/{gemini-KV5CHM4H.js → gemini-AAMKVFDD.js} +18 -15
  50. package/bundle/{gemini-2JTOIMGM.js → gemini-EXJ4NN2B.js} +216 -197
  51. package/bundle/{gemini-R5NCXCEL.js → gemini-KQNXT2ZJ.js} +18 -15
  52. package/bundle/gemini-ZYAZIA2G.js +16409 -0
  53. package/bundle/gemini.js +7 -7
  54. package/bundle/{interactiveCli-RMWTSIEN.js → interactiveCli-3IVXIVOK.js} +17 -11
  55. package/bundle/{interactiveCli-7SIMXKNU.js → interactiveCli-3NDTSBQY.js} +323 -298
  56. package/bundle/{interactiveCli-HVAQTBJK.js → interactiveCli-BZXT4YE7.js} +17 -11
  57. package/bundle/interactiveCli-DQQXO4EG.js +34742 -0
  58. package/bundle/{liteRtServerManager-FY23PYSD.js → liteRtServerManager-3QE47ARR.js} +4 -4
  59. package/bundle/{liteRtServerManager-LDS45QKP.js → liteRtServerManager-BQ6ESYAD.js} +4 -4
  60. package/bundle/{liteRtServerManager-BP7XKGNU.js → liteRtServerManager-OHUH3BTG.js} +4 -4
  61. package/bundle/liteRtServerManager-TZR3DY3E.js +65 -0
  62. package/bundle/{oauth2-provider-VVNBQH45.js → oauth2-provider-7XEK25LP.js} +1 -1
  63. package/bundle/{oauth2-provider-4SSSEI6P.js → oauth2-provider-JSOMG32Z.js} +38 -72
  64. package/bundle/{oauth2-provider-KL44D6HV.js → oauth2-provider-TLVZNHJT.js} +1 -1
  65. package/bundle/oauth2-provider-Z6MAYPWZ.js +235 -0
  66. package/bundle/{start-FRM2XDGC.js → start-7ARDPJQK.js} +6 -6
  67. package/bundle/{start-OEPJINIW.js → start-IYTVBQDA.js} +6 -6
  68. package/bundle/{start-DLEOBFRC.js → start-JFCYACG2.js} +6 -6
  69. package/bundle/start-Y7LRN45L.js +18 -0
  70. package/package.json +1 -1
@@ -3017,8 +3017,8 @@ var require_graceful_fs = __commonJS({
3017
3017
  }
3018
3018
  var fs$copyFile = fs95.copyFile;
3019
3019
  if (fs$copyFile)
3020
- fs95.copyFile = copyFile;
3021
- function copyFile(src, dest, flags2, cb) {
3020
+ fs95.copyFile = copyFile2;
3021
+ function copyFile2(src, dest, flags2, cb) {
3022
3022
  if (typeof flags2 === "function") {
3023
3023
  cb = flags2;
3024
3024
  flags2 = 0;
@@ -14069,7 +14069,7 @@ var require_filesubjecttokensupplier = __commonJS({
14069
14069
  }));
14070
14070
  var realpath5 = (0, util_1.promisify)(fs94.realpath ?? (() => {
14071
14071
  }));
14072
- var lstat5 = (0, util_1.promisify)(fs94.lstat ?? (() => {
14072
+ var lstat6 = (0, util_1.promisify)(fs94.lstat ?? (() => {
14073
14073
  }));
14074
14074
  var FileSubjectTokenSupplier = class {
14075
14075
  filePath;
@@ -14095,7 +14095,7 @@ var require_filesubjecttokensupplier = __commonJS({
14095
14095
  let parsedFilePath = this.filePath;
14096
14096
  try {
14097
14097
  parsedFilePath = await realpath5(parsedFilePath);
14098
- if (!(await lstat5(parsedFilePath)).isFile()) {
14098
+ if (!(await lstat6(parsedFilePath)).isFile()) {
14099
14099
  throw new Error();
14100
14100
  }
14101
14101
  } catch (err2) {
@@ -25004,7 +25004,7 @@ var require_filesubjecttokensupplier2 = __commonJS({
25004
25004
  });
25005
25005
  var realpath5 = (0, util_1.promisify)((_b = fs94.realpath) !== null && _b !== void 0 ? _b : () => {
25006
25006
  });
25007
- var lstat5 = (0, util_1.promisify)((_c = fs94.lstat) !== null && _c !== void 0 ? _c : () => {
25007
+ var lstat6 = (0, util_1.promisify)((_c = fs94.lstat) !== null && _c !== void 0 ? _c : () => {
25008
25008
  });
25009
25009
  var FileSubjectTokenSupplier = class {
25010
25010
  /**
@@ -25027,7 +25027,7 @@ var require_filesubjecttokensupplier2 = __commonJS({
25027
25027
  let parsedFilePath = this.filePath;
25028
25028
  try {
25029
25029
  parsedFilePath = await realpath5(parsedFilePath);
25030
- if (!(await lstat5(parsedFilePath)).isFile()) {
25030
+ if (!(await lstat6(parsedFilePath)).isFile()) {
25031
25031
  throw new Error();
25032
25032
  }
25033
25033
  } catch (err2) {
@@ -276237,6 +276237,7 @@ var PREVIEW_GEMINI_FLASH_MODEL = "gemini-3-flash-preview";
276237
276237
  var DEFAULT_GEMINI_MODEL = "gemini-2.5-pro";
276238
276238
  var DEFAULT_GEMINI_FLASH_MODEL = "gemini-2.5-flash";
276239
276239
  var DEFAULT_GEMINI_3_5_FLASH_MODEL = "gemini-3.5-flash";
276240
+ var SECONDARY_GEMINI_3_5_FLASH_MODEL = "gemini-3-flash";
276240
276241
  function setFlashModels(preview, defaultFlash) {
276241
276242
  PREVIEW_GEMINI_FLASH_MODEL = preview;
276242
276243
  DEFAULT_GEMINI_FLASH_MODEL = defaultFlash;
@@ -276254,6 +276255,7 @@ var VALID_GEMINI_MODELS = /* @__PURE__ */ new Set([
276254
276255
  DEFAULT_GEMINI_MODEL,
276255
276256
  DEFAULT_GEMINI_FLASH_MODEL,
276256
276257
  DEFAULT_GEMINI_3_5_FLASH_MODEL,
276258
+ SECONDARY_GEMINI_3_5_FLASH_MODEL,
276257
276259
  DEFAULT_GEMINI_FLASH_LITE_MODEL,
276258
276260
  GEMMA_4_31B_IT_MODEL,
276259
276261
  GEMMA_4_26B_A4B_IT_MODEL
@@ -276266,10 +276268,10 @@ var GEMINI_MODEL_ALIAS_FLASH = "flash";
276266
276268
  var GEMINI_MODEL_ALIAS_FLASH_LITE = "flash-lite";
276267
276269
  var DEFAULT_GEMINI_EMBEDDING_MODEL = "gemini-embedding-001";
276268
276270
  var DEFAULT_THINKING_MODE = 8192;
276269
- function getAutoModelDescription(hasAccessToPreview, useGemini3_1 = false) {
276271
+ function getAutoModelDescription(hasAccessToPreview, useGemini3_1 = false, useGemini3_5Flash = false) {
276270
276272
  const proModel = hasAccessToPreview ? useGemini3_1 ? PREVIEW_GEMINI_3_1_MODEL : PREVIEW_GEMINI_MODEL : DEFAULT_GEMINI_MODEL;
276271
- const flashModel = hasAccessToPreview ? PREVIEW_GEMINI_FLASH_MODEL : DEFAULT_GEMINI_FLASH_MODEL;
276272
- return `Let Gemini CLI decide the best model for the task: ${proModel}, ${flashModel}`;
276273
+ const flashModel = hasAccessToPreview ? useGemini3_5Flash ? DEFAULT_GEMINI_3_5_FLASH_MODEL : PREVIEW_GEMINI_FLASH_MODEL : DEFAULT_GEMINI_FLASH_MODEL;
276274
+ return `Let Gemini CLI decide the best model for the task: ${getDisplayString(proModel)}, ${getDisplayString(flashModel)}`;
276273
276275
  }
276274
276276
  function resolveModel(requestedModel, useGemini3_1 = false, useCustomToolModel = false, hasAccessToPreview = true, config2, useGemini3_5Flash = false) {
276275
276277
  const normalizedModel = Array.isArray(requestedModel) ? String(requestedModel.at(-1) ?? "").trim() || "" : typeof requestedModel !== "string" ? String(requestedModel ?? "").trim() || "" : requestedModel.trim() || "";
@@ -276285,7 +276287,7 @@ function resolveModel(requestedModel, useGemini3_1 = false, useCustomToolModel =
276285
276287
  return DEFAULT_GEMINI_FLASH_LITE_MODEL;
276286
276288
  }
276287
276289
  if (resolved2.includes("flash")) {
276288
- return useGemini3_5Flash ? DEFAULT_GEMINI_3_5_FLASH_MODEL : DEFAULT_GEMINI_FLASH_MODEL;
276290
+ return DEFAULT_GEMINI_FLASH_MODEL;
276289
276291
  }
276290
276292
  return DEFAULT_GEMINI_MODEL;
276291
276293
  }
@@ -276314,7 +276316,7 @@ function resolveModel(requestedModel, useGemini3_1 = false, useCustomToolModel =
276314
276316
  break;
276315
276317
  }
276316
276318
  case GEMINI_MODEL_ALIAS_FLASH: {
276317
- resolved = useGemini3_5Flash ? DEFAULT_GEMINI_3_5_FLASH_MODEL : PREVIEW_GEMINI_FLASH_MODEL;
276319
+ resolved = useGemini3_5Flash ? DEFAULT_GEMINI_FLASH_MODEL : PREVIEW_GEMINI_FLASH_MODEL;
276318
276320
  break;
276319
276321
  }
276320
276322
  case GEMINI_MODEL_ALIAS_FLASH_LITE: {
@@ -276329,13 +276331,13 @@ function resolveModel(requestedModel, useGemini3_1 = false, useCustomToolModel =
276329
276331
  if (resolved === "none") {
276330
276332
  return DEFAULT_GEMINI_FLASH_LITE_MODEL;
276331
276333
  }
276332
- if (useGemini3_5Flash && isFlashModel(resolved)) {
276333
- return DEFAULT_GEMINI_3_5_FLASH_MODEL;
276334
+ if (useGemini3_5Flash && isFlashModel(resolved) && normalizedModel !== PREVIEW_GEMINI_FLASH_MODEL) {
276335
+ return DEFAULT_GEMINI_FLASH_MODEL;
276334
276336
  }
276335
276337
  if (!hasAccessToPreview && isPreviewModel(resolved)) {
276336
276338
  switch (resolved) {
276337
276339
  case PREVIEW_GEMINI_FLASH_MODEL:
276338
- return useGemini3_5Flash ? DEFAULT_GEMINI_3_5_FLASH_MODEL : DEFAULT_GEMINI_FLASH_MODEL;
276340
+ return DEFAULT_GEMINI_FLASH_MODEL;
276339
276341
  case PREVIEW_GEMINI_MODEL:
276340
276342
  case PREVIEW_GEMINI_3_1_MODEL:
276341
276343
  case PREVIEW_GEMINI_3_1_CUSTOM_TOOLS_MODEL:
@@ -276345,7 +276347,7 @@ function resolveModel(requestedModel, useGemini3_1 = false, useCustomToolModel =
276345
276347
  return DEFAULT_GEMINI_FLASH_LITE_MODEL;
276346
276348
  }
276347
276349
  if (resolved.includes("flash")) {
276348
- return useGemini3_5Flash ? DEFAULT_GEMINI_3_5_FLASH_MODEL : DEFAULT_GEMINI_FLASH_MODEL;
276350
+ return DEFAULT_GEMINI_FLASH_MODEL;
276349
276351
  }
276350
276352
  return DEFAULT_GEMINI_MODEL;
276351
276353
  }
@@ -276353,7 +276355,7 @@ function resolveModel(requestedModel, useGemini3_1 = false, useCustomToolModel =
276353
276355
  return resolved;
276354
276356
  }
276355
276357
  function isFlashModel(model) {
276356
- return model === DEFAULT_GEMINI_FLASH_MODEL || model === PREVIEW_GEMINI_FLASH_MODEL || model === DEFAULT_GEMINI_3_5_FLASH_MODEL || model === "flash" || model.endsWith("flash");
276358
+ return model === DEFAULT_GEMINI_FLASH_MODEL || model === PREVIEW_GEMINI_FLASH_MODEL || model === DEFAULT_GEMINI_3_5_FLASH_MODEL || model === SECONDARY_GEMINI_3_5_FLASH_MODEL || model === "flash" || model.endsWith("flash");
276357
276359
  }
276358
276360
  function resolveClassifierModel(requestedModel, modelAlias, useGemini3_1 = false, useCustomToolModel = false, hasAccessToPreview = true, config2, useGemini3_5Flash = false) {
276359
276361
  if (config2?.getExperimentalDynamicModelConfiguration?.() === true) {
@@ -276370,11 +276372,11 @@ function resolveClassifierModel(requestedModel, modelAlias, useGemini3_1 = false
276370
276372
  }
276371
276373
  if (modelAlias === GEMINI_MODEL_ALIAS_FLASH) {
276372
276374
  if (requestedModel === DEFAULT_GEMINI_MODEL_AUTO || requestedModel === DEFAULT_GEMINI_MODEL) {
276373
- return useGemini3_5Flash ? DEFAULT_GEMINI_3_5_FLASH_MODEL : DEFAULT_GEMINI_FLASH_MODEL;
276375
+ return DEFAULT_GEMINI_FLASH_MODEL;
276374
276376
  }
276375
276377
  if (requestedModel === PREVIEW_GEMINI_MODEL_AUTO || requestedModel === PREVIEW_GEMINI_MODEL || requestedModel === GEMINI_MODEL_ALIAS_AUTO) {
276376
276378
  if (useGemini3_5Flash) {
276377
- return DEFAULT_GEMINI_3_5_FLASH_MODEL;
276379
+ return DEFAULT_GEMINI_FLASH_MODEL;
276378
276380
  }
276379
276381
  return hasAccessToPreview ? PREVIEW_GEMINI_FLASH_MODEL : DEFAULT_GEMINI_FLASH_MODEL;
276380
276382
  }
@@ -276404,6 +276406,8 @@ function getDisplayString(model, config2) {
276404
276406
  }
276405
276407
  }
276406
276408
  switch (model) {
276409
+ case "gemini-3-flash":
276410
+ return DEFAULT_GEMINI_3_5_FLASH_MODEL;
276407
276411
  case GEMINI_MODEL_ALIAS_AUTO:
276408
276412
  return "Auto";
276409
276413
  case PREVIEW_GEMINI_MODEL_AUTO:
@@ -279555,8 +279559,8 @@ function isValidToolName(name3, options = {}) {
279555
279559
  }
279556
279560
 
279557
279561
  // packages/core/src/generated/git-commit.ts
279558
- var GIT_COMMIT_INFO = "cfcecebe8";
279559
- var CLI_VERSION = "0.46.0-preview.0";
279562
+ var GIT_COMMIT_INFO = "4196596f7";
279563
+ var CLI_VERSION = "0.47.0-nightly.20260602.gcfcecebe8";
279560
279564
 
279561
279565
  // packages/core/src/ide/detect-ide.ts
279562
279566
  var IDE_DEFINITIONS = {
@@ -304025,7 +304029,7 @@ function getVersion() {
304025
304029
  }
304026
304030
  versionPromise = (async () => {
304027
304031
  const pkgJson = await getPackageJson(__dirname4);
304028
- return "0.46.0-preview.0";
304032
+ return "0.47.0-nightly.20260602.gcfcecebe8";
304029
304033
  })();
304030
304034
  return versionPromise;
304031
304035
  }
@@ -338369,7 +338373,7 @@ var A2AAuthProviderFactory = class _A2AAuthProviderFactory {
338369
338373
  return provider;
338370
338374
  }
338371
338375
  case "oauth2": {
338372
- const { OAuth2AuthProvider } = await import("./oauth2-provider-KL44D6HV.js");
338376
+ const { OAuth2AuthProvider } = await import("./oauth2-provider-TLVZNHJT.js");
338373
338377
  const provider = new OAuth2AuthProvider(
338374
338378
  authConfig,
338375
338379
  options.agentName ?? "unknown",
@@ -338540,6 +338544,7 @@ var ModelConfigService = class _ModelConfigService {
338540
338544
  const definitions = this.config.modelDefinitions ?? {};
338541
338545
  const shouldShowPreviewModels = context2.hasAccessToPreview ?? false;
338542
338546
  const useGemini31 = context2.useGemini3_1 ?? false;
338547
+ const useGemini3_5Flash = context2.useGemini3_5Flash ?? false;
338543
338548
  const mainOptions = Object.entries(definitions).filter(([_2, m]) => {
338544
338549
  if (m.isVisible !== true) return false;
338545
338550
  if (m.isPreview && !shouldShowPreviewModels) return false;
@@ -338550,7 +338555,8 @@ var ModelConfigService = class _ModelConfigService {
338550
338555
  if (id === "auto") {
338551
338556
  description = getAutoModelDescription(
338552
338557
  shouldShowPreviewModels,
338553
- useGemini31
338558
+ useGemini31,
338559
+ useGemini3_5Flash
338554
338560
  );
338555
338561
  } else if (id === "auto-gemini-3" && useGemini31) {
338556
338562
  description = description.replace("gemini-3-pro", "gemini-3.1-pro");
@@ -360043,13 +360049,15 @@ ${formattedHistory}
360043
360049
  config2.getUseCustomToolModel(),
360044
360050
  config2.getHasAccessToPreviewModel()
360045
360051
  ]);
360052
+ const useGemini3_5Flash = config2.hasGemini35FlashGAAccess?.() ?? false;
360046
360053
  const selectedModel = resolveClassifierModel(
360047
360054
  context2.requestedModel ?? config2.getModel(),
360048
360055
  routerResponse.model_choice,
360049
360056
  useGemini3_1,
360050
360057
  useCustomToolModel,
360051
360058
  hasAccessToPreview,
360052
- config2
360059
+ config2,
360060
+ useGemini3_5Flash
360053
360061
  );
360054
360062
  return {
360055
360063
  model: selectedModel,
@@ -360222,6 +360230,7 @@ var ClassifierStrategy = class {
360222
360230
  config2.getGemini31Launched(),
360223
360231
  config2.getUseCustomToolModel()
360224
360232
  ]);
360233
+ const useGemini3_5Flash = config2.hasGemini35FlashGAAccess?.() ?? false;
360225
360234
  const selectedModel = normalizeModelId(
360226
360235
  resolveClassifierModel(
360227
360236
  normalizeModelId(model),
@@ -360229,7 +360238,8 @@ var ClassifierStrategy = class {
360229
360238
  useGemini3_1,
360230
360239
  useCustomToolModel,
360231
360240
  config2.getHasAccessToPreviewModel?.() ?? true,
360232
- config2
360241
+ config2,
360242
+ useGemini3_5Flash
360233
360243
  )
360234
360244
  );
360235
360245
  const service = config2.getModelAvailabilityService();
@@ -360378,6 +360388,7 @@ var NumericalClassifierStrategy = class {
360378
360388
  config2.getGemini31Launched(),
360379
360389
  config2.getUseCustomToolModel()
360380
360390
  ]);
360391
+ const useGemini3_5Flash = config2.hasGemini35FlashGAAccess?.() ?? false;
360381
360392
  const selectedModel = normalizeModelId(
360382
360393
  resolveClassifierModel(
360383
360394
  normalizeModelId(model),
@@ -360385,7 +360396,8 @@ var NumericalClassifierStrategy = class {
360385
360396
  useGemini3_1,
360386
360397
  useCustomToolModel,
360387
360398
  config2.getHasAccessToPreviewModel?.() ?? true,
360388
- config2
360399
+ config2,
360400
+ useGemini3_5Flash
360389
360401
  )
360390
360402
  );
360391
360403
  const service = config2.getModelAvailabilityService();
@@ -360576,6 +360588,7 @@ var ApprovalModeStrategy = class {
360576
360588
  config2.getUseCustomToolModel(),
360577
360589
  config2.getHasAccessToPreviewModel()
360578
360590
  ]);
360591
+ const useGemini3_5Flash = config2.hasGemini35FlashGAAccess?.() ?? false;
360579
360592
  if (approvalMode === "plan" /* PLAN */) {
360580
360593
  const proModel = resolveClassifierModel(
360581
360594
  model,
@@ -360583,7 +360596,8 @@ var ApprovalModeStrategy = class {
360583
360596
  useGemini3_1,
360584
360597
  useCustomToolModel,
360585
360598
  hasAccessToPreview,
360586
- config2
360599
+ config2,
360600
+ useGemini3_5Flash
360587
360601
  );
360588
360602
  return {
360589
360603
  model: proModel,
@@ -360600,7 +360614,8 @@ var ApprovalModeStrategy = class {
360600
360614
  useGemini3_1,
360601
360615
  useCustomToolModel,
360602
360616
  hasAccessToPreview,
360603
- config2
360617
+ config2,
360618
+ useGemini3_5Flash
360604
360619
  );
360605
360620
  return {
360606
360621
  model: flashModel,
@@ -361173,9 +361188,12 @@ var DEFAULT_MODEL_CONFIGS = {
361173
361188
  "gemini-3-flash-preview": {
361174
361189
  default: "gemini-3-flash-preview",
361175
361190
  contexts: [
361176
- { condition: { useGemini3_5Flash: true }, target: "gemini-3.5-flash" },
361177
361191
  {
361178
- condition: { hasAccessToPreview: false },
361192
+ condition: { hasAccessToPreview: false, useGemini3_5Flash: true },
361193
+ target: "gemini-3.5-flash"
361194
+ },
361195
+ {
361196
+ condition: { hasAccessToPreview: false, useGemini3_5Flash: false },
361179
361197
  target: "gemini-2.5-flash"
361180
361198
  }
361181
361199
  ]
@@ -366454,6 +366472,7 @@ function createPolicyUpdater(policyEngine, messageBus, storage2) {
366454
366472
  }
366455
366473
  if (message.persist) {
366456
366474
  persistenceQueue = persistenceQueue.then(async () => {
366475
+ let tmpFile;
366457
366476
  try {
366458
366477
  const policyFile = message.persistScope === "workspace" ? storage2.getWorkspaceAutoSavedPolicyPath() : storage2.getAutoSavedPolicyPath();
366459
366478
  await fs73.mkdir(path83.dirname(policyFile), { recursive: true });
@@ -366465,11 +366484,19 @@ function createPolicyUpdater(policyEngine, messageBus, storage2) {
366465
366484
  existingData = parsed;
366466
366485
  }
366467
366486
  } catch (error40) {
366468
- if (!isNodeError(error40) || error40.code !== "ENOENT") {
366469
- debugLogger.warn(
366470
- `Failed to parse ${policyFile}, overwriting with new policy.`,
366471
- error40
366487
+ if (isNodeError(error40) && error40.code === "ENOENT") {
366488
+ } else if (!isNodeError(error40)) {
366489
+ coreEvents.emitFeedback(
366490
+ "warning",
366491
+ `Syntax error found in policy file. Backing up corrupted file to ${policyFile}.bak and starting fresh.`
366472
366492
  );
366493
+ if (!(await fs73.lstat(policyFile).catch(() => null))?.isSymbolicLink()) {
366494
+ await fs73.copyFile(policyFile, `${policyFile}.bak`).catch(() => {
366495
+ });
366496
+ }
366497
+ existingData = {};
366498
+ } else {
366499
+ throw error40;
366473
366500
  }
366474
366501
  }
366475
366502
  if (!existingData.rule) {
@@ -366502,7 +366529,7 @@ function createPolicyUpdater(policyEngine, messageBus, storage2) {
366502
366529
  }
366503
366530
  const newContent = import_toml3.default.stringify(existingData);
366504
366531
  const tmpSuffix = crypto18.randomBytes(8).toString("hex");
366505
- const tmpFile = `${policyFile}.${tmpSuffix}.tmp`;
366532
+ tmpFile = `${policyFile}.${tmpSuffix}.tmp`;
366506
366533
  let handle2;
366507
366534
  try {
366508
366535
  handle2 = await fs73.open(tmpFile, "wx");
@@ -366510,11 +366537,28 @@ function createPolicyUpdater(policyEngine, messageBus, storage2) {
366510
366537
  } finally {
366511
366538
  await handle2?.close();
366512
366539
  }
366513
- await fs73.rename(tmpFile, policyFile);
366540
+ try {
366541
+ await fs73.rename(tmpFile, policyFile);
366542
+ } catch (renameError) {
366543
+ if (isNodeError(renameError) && (renameError.code === "EXDEV" || renameError.code === "EBUSY")) {
366544
+ if ((await fs73.lstat(policyFile).catch(() => null))?.isSymbolicLink())
366545
+ throw renameError;
366546
+ await fs73.copyFile(tmpFile, policyFile);
366547
+ await fs73.unlink(tmpFile).catch(() => {
366548
+ });
366549
+ } else {
366550
+ throw renameError;
366551
+ }
366552
+ }
366514
366553
  } catch (error40) {
366554
+ if (tmpFile) {
366555
+ await fs73.unlink(tmpFile).catch(() => {
366556
+ });
366557
+ }
366558
+ const reason = error40 instanceof Error ? error40.message : String(error40);
366515
366559
  coreEvents.emitFeedback(
366516
366560
  "error",
366517
- `Failed to persist policy for ${toolName}`,
366561
+ `Failed to persist policy for ${toolName}: ${reason}`,
366518
366562
  error40
366519
366563
  );
366520
366564
  }
@@ -381434,7 +381478,11 @@ ${sections.join("\n")}
381434
381478
  return this.experiments?.flags[ExperimentFlags.GEMINI_3_5_FLASH_GA_LAUNCHED]?.boolValue ?? false;
381435
381479
  })();
381436
381480
  if (hasAccess) {
381437
- setFlashModels("gemini-3.5-flash", "gemini-3.5-flash");
381481
+ if (authType === "gemini-api-key" /* USE_GEMINI */) {
381482
+ setFlashModels("gemini-3-flash-preview", "gemini-3.5-flash");
381483
+ } else {
381484
+ setFlashModels("gemini-3-flash", "gemini-3-flash");
381485
+ }
381438
381486
  } else {
381439
381487
  setFlashModels("gemini-3-flash-preview", "gemini-2.5-flash");
381440
381488
  }
@@ -387410,7 +387458,7 @@ import { readdir as readdir11, stat as stat11 } from "node:fs/promises";
387410
387458
  import * as sp2 from "node:path";
387411
387459
 
387412
387460
  // packages/core/node_modules/readdirp/index.js
387413
- import { lstat as lstat3, readdir as readdir10, realpath as realpath4, stat as stat9 } from "node:fs/promises";
387461
+ import { lstat as lstat4, readdir as readdir10, realpath as realpath4, stat as stat9 } from "node:fs/promises";
387414
387462
  import { join as pjoin, relative as prelative, resolve as presolve, sep as psep } from "node:path";
387415
387463
  import { Readable as Readable4 } from "node:stream";
387416
387464
  var EntryTypes = {
@@ -387491,7 +387539,7 @@ var ReaddirpStream = class extends Readable4 {
387491
387539
  const { root, type: type2 } = opts;
387492
387540
  this._fileFilter = normalizeFilter(opts.fileFilter);
387493
387541
  this._directoryFilter = normalizeFilter(opts.directoryFilter);
387494
- const statMethod = opts.lstat ? lstat3 : stat9;
387542
+ const statMethod = opts.lstat ? lstat4 : stat9;
387495
387543
  if (wantBigintFsStats) {
387496
387544
  this._stat = (path113) => statMethod(path113, { bigint: true });
387497
387545
  } else {
@@ -387601,7 +387649,7 @@ var ReaddirpStream = class extends Readable4 {
387601
387649
  const full = entry.fullPath;
387602
387650
  try {
387603
387651
  const entryRealPath = await realpath4(full);
387604
- const entryRealPathStats = await lstat3(entryRealPath);
387652
+ const entryRealPathStats = await lstat4(entryRealPath);
387605
387653
  if (entryRealPathStats.isFile()) {
387606
387654
  return "file";
387607
387655
  }
@@ -387644,7 +387692,7 @@ function readdirp(root, options = {}) {
387644
387692
 
387645
387693
  // packages/core/node_modules/chokidar/handler.js
387646
387694
  import { watch as fs_watch, unwatchFile, watchFile } from "node:fs";
387647
- import { realpath as fsrealpath, lstat as lstat4, open as open7, stat as stat10 } from "node:fs/promises";
387695
+ import { realpath as fsrealpath, lstat as lstat5, open as open7, stat as stat10 } from "node:fs/promises";
387648
387696
  import { type as osType } from "node:os";
387649
387697
  import * as sp from "node:path";
387650
387698
  var STR_DATA = "data";
@@ -387671,7 +387719,7 @@ var EVENTS = {
387671
387719
  };
387672
387720
  var EV = EVENTS;
387673
387721
  var THROTTLE_MODE_WATCH = "watch";
387674
- var statMethods = { lstat: lstat4, stat: stat10 };
387722
+ var statMethods = { lstat: lstat5, stat: stat10 };
387675
387723
  var KEY_LISTENERS = "listeners";
387676
387724
  var KEY_ERR = "errHandlers";
387677
387725
  var KEY_RAW = "rawEmitters";
@@ -399870,6 +399918,7 @@ export {
399870
399918
  DEFAULT_GEMINI_MODEL,
399871
399919
  DEFAULT_GEMINI_FLASH_MODEL,
399872
399920
  DEFAULT_GEMINI_3_5_FLASH_MODEL,
399921
+ SECONDARY_GEMINI_3_5_FLASH_MODEL,
399873
399922
  setFlashModels,
399874
399923
  DEFAULT_GEMINI_FLASH_LITE_MODEL,
399875
399924
  PREVIEW_GEMINI_FLASH_LITE_MODEL,
@@ -2,7 +2,7 @@ const require = (await import('node:module')).createRequire(import.meta.url); co
2
2
  import {
3
3
  exitCli,
4
4
  require_source
5
- } from "./chunk-HZNEV3DS.js";
5
+ } from "./chunk-WXZDGQ54.js";
6
6
  import {
7
7
  DEFAULT_PORT,
8
8
  SERVER_START_WAIT_MS,
@@ -14,10 +14,10 @@ import {
14
14
  isServerRunning,
15
15
  resolveGemmaConfig,
16
16
  writeServerProcessInfo
17
- } from "./chunk-ZXN4VW7M.js";
17
+ } from "./chunk-WMO6YVSB.js";
18
18
  import {
19
19
  debugLogger
20
- } from "./chunk-XRDSBRG4.js";
20
+ } from "./chunk-PML6IHTI.js";
21
21
  import {
22
22
  __toESM
23
23
  } from "./chunk-34MYV7JD.js";