@google/gemini-cli 0.46.0-preview.1 → 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 (69) hide show
  1. package/bundle/{chunk-YIOYXRDP.js → chunk-3W7O744A.js} +7 -7
  2. package/bundle/{chunk-ONUDATHO.js → chunk-6NI3XGUW.js} +3 -3
  3. package/bundle/{chunk-5CWORGE3.js → chunk-A3QBI6HT.js} +1 -1
  4. package/bundle/{chunk-7Y6NU65D.js → chunk-AW75DLSA.js} +1 -1
  5. package/bundle/{chunk-UM53YDCH.js → chunk-BB7JWK6H.js} +1 -1
  6. package/bundle/{chunk-EG7USKV5.js → chunk-C2QIEMR3.js} +1 -1
  7. package/bundle/{chunk-JF6RJW53.js → chunk-CHV5VX6V.js} +1 -1
  8. package/bundle/{chunk-24H54ISH.js → chunk-CRXOPS47.js} +7 -7
  9. package/bundle/{chunk-ITC7TFJU.js → chunk-CVUIGVVW.js} +46 -20
  10. package/bundle/{chunk-5IBYZHR7.js → chunk-D6S4W2BY.js} +2 -2
  11. package/bundle/{chunk-VEHSYWQT.js → chunk-DJ4OX7HV.js} +1 -1
  12. package/bundle/{chunk-KQ4V7ZN4.js → chunk-EO3RKLTR.js} +7 -7
  13. package/bundle/{chunk-3EC3ZLRQ.js → chunk-FKA6UHBW.js} +2 -2
  14. package/bundle/{chunk-EZDKSTIF.js → chunk-GRGDQ7OF.js} +2 -2
  15. package/bundle/{chunk-4B7MDBUK.js → chunk-H3N5WAYS.js} +1 -1
  16. package/bundle/{chunk-GRD2P7HY.js → chunk-IIRRE2XB.js} +1 -1
  17. package/bundle/{chunk-QMCEWHRR.js → chunk-K2SOQJMX.js} +1 -1
  18. package/bundle/{chunk-YINW7YTJ.js → chunk-KAOVKGFU.js} +1 -1
  19. package/bundle/{chunk-RXYIE5L5.js → chunk-MCHAK65W.js} +1 -1
  20. package/bundle/{chunk-3WW2LTMX.js → chunk-NGEP3723.js} +1 -1
  21. package/bundle/{chunk-QEVRJ7HY.js → chunk-OQQDPZ7U.js} +48 -22
  22. package/bundle/{chunk-QFWAILKU.js → chunk-P2LFCR6H.js} +3 -3
  23. package/bundle/{chunk-KOJR46UO.js → chunk-PML6IHTI.js} +46 -20
  24. package/bundle/{chunk-O3UKVEBS.js → chunk-PQODER6W.js} +7 -7
  25. package/bundle/{chunk-R4LEIQZM.js → chunk-S6TN66XT.js} +3 -3
  26. package/bundle/{chunk-HQNVDCXK.js → chunk-SHFWC7OK.js} +1 -1
  27. package/bundle/{chunk-WRWCUHAM.js → chunk-SMQML5YF.js} +1 -1
  28. package/bundle/{chunk-XVDCGVTF.js → chunk-UGUHWSGX.js} +46 -20
  29. package/bundle/{chunk-ILHDA6XU.js → chunk-WMO6YVSB.js} +1 -1
  30. package/bundle/{chunk-VETILJQA.js → chunk-WXZDGQ54.js} +1 -1
  31. package/bundle/{chunk-VOFVOS4I.js → chunk-XV2S2W35.js} +3 -3
  32. package/bundle/{chunk-JPYTHGMI.js → chunk-XYFHAF63.js} +2 -2
  33. package/bundle/{cleanup-4ZTB4WMN.js → cleanup-BW23QVLV.js} +2 -2
  34. package/bundle/{cleanup-7LLX4OFN.js → cleanup-JXW2VUDZ.js} +2 -2
  35. package/bundle/{cleanup-GI5426XS.js → cleanup-KBVHA63R.js} +2 -2
  36. package/bundle/{cleanup-ZBLVGXIK.js → cleanup-R6VVJEFJ.js} +2 -2
  37. package/bundle/{core-3UQQYNJF.js → core-63AY4S7W.js} +1 -1
  38. package/bundle/{devtoolsService-ZYGDAPOV.js → devtoolsService-3QDYHBLU.js} +2 -2
  39. package/bundle/{devtoolsService-GJWWZ2KK.js → devtoolsService-6YXHJCBF.js} +2 -2
  40. package/bundle/{devtoolsService-UNQILSWI.js → devtoolsService-RXKSY7NL.js} +2 -2
  41. package/bundle/{devtoolsService-Z2YXVMYF.js → devtoolsService-YMGOQMUC.js} +2 -2
  42. package/bundle/{dist-4NVM6I2N.js → dist-N2CG2AMX.js} +1 -1
  43. package/bundle/{dist-LIQULVXZ.js → dist-VGFRXX7L.js} +1 -1
  44. package/bundle/{dist-XPP357J7.js → dist-YXW6V43L.js} +1 -1
  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/{gemini-RBKWBGCC.js → gemini-AAMKVFDD.js} +14 -14
  49. package/bundle/{gemini-7GZVH4VW.js → gemini-EXJ4NN2B.js} +14 -14
  50. package/bundle/{gemini-QDOVPRKF.js → gemini-KQNXT2ZJ.js} +14 -14
  51. package/bundle/{gemini-5WY2YO7R.js → gemini-ZYAZIA2G.js} +14 -14
  52. package/bundle/gemini.js +7 -7
  53. package/bundle/{interactiveCli-OEFOYFJU.js → interactiveCli-3IVXIVOK.js} +8 -8
  54. package/bundle/{interactiveCli-OGE5OTZB.js → interactiveCli-3NDTSBQY.js} +8 -8
  55. package/bundle/{interactiveCli-W3CMLQIM.js → interactiveCli-BZXT4YE7.js} +8 -8
  56. package/bundle/{interactiveCli-BMKHWEH4.js → interactiveCli-DQQXO4EG.js} +8 -8
  57. package/bundle/{liteRtServerManager-3QOJEGNL.js → liteRtServerManager-3QE47ARR.js} +4 -4
  58. package/bundle/{liteRtServerManager-HPVNUYFX.js → liteRtServerManager-BQ6ESYAD.js} +4 -4
  59. package/bundle/{liteRtServerManager-Q6LTEYH4.js → liteRtServerManager-OHUH3BTG.js} +4 -4
  60. package/bundle/{liteRtServerManager-YL4YRHOA.js → liteRtServerManager-TZR3DY3E.js} +4 -4
  61. package/bundle/{oauth2-provider-3WXIASQA.js → oauth2-provider-7XEK25LP.js} +1 -1
  62. package/bundle/{oauth2-provider-K52EY6RG.js → oauth2-provider-JSOMG32Z.js} +1 -1
  63. package/bundle/{oauth2-provider-CTPS7JLT.js → oauth2-provider-TLVZNHJT.js} +1 -1
  64. package/bundle/{oauth2-provider-PJJE326A.js → oauth2-provider-Z6MAYPWZ.js} +1 -1
  65. package/bundle/{start-25W6VZG6.js → start-7ARDPJQK.js} +6 -6
  66. package/bundle/{start-JBJSIKIB.js → start-IYTVBQDA.js} +6 -6
  67. package/bundle/{start-PK22QMBT.js → start-JFCYACG2.js} +6 -6
  68. package/bundle/{start-XAEHV6FV.js → start-Y7LRN45L.js} +6 -6
  69. 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) {
@@ -279559,8 +279559,8 @@ function isValidToolName(name3, options = {}) {
279559
279559
  }
279560
279560
 
279561
279561
  // packages/core/src/generated/git-commit.ts
279562
- var GIT_COMMIT_INFO = "700c96118";
279563
- var CLI_VERSION = "0.46.0-preview.0";
279562
+ var GIT_COMMIT_INFO = "4196596f7";
279563
+ var CLI_VERSION = "0.47.0-nightly.20260602.gcfcecebe8";
279564
279564
 
279565
279565
  // packages/core/src/ide/detect-ide.ts
279566
279566
  var IDE_DEFINITIONS = {
@@ -304029,7 +304029,7 @@ function getVersion() {
304029
304029
  }
304030
304030
  versionPromise = (async () => {
304031
304031
  const pkgJson = await getPackageJson(__dirname4);
304032
- return "0.46.0-preview.0";
304032
+ return "0.47.0-nightly.20260602.gcfcecebe8";
304033
304033
  })();
304034
304034
  return versionPromise;
304035
304035
  }
@@ -338373,7 +338373,7 @@ var A2AAuthProviderFactory = class _A2AAuthProviderFactory {
338373
338373
  return provider;
338374
338374
  }
338375
338375
  case "oauth2": {
338376
- const { OAuth2AuthProvider } = await import("./oauth2-provider-CTPS7JLT.js");
338376
+ const { OAuth2AuthProvider } = await import("./oauth2-provider-TLVZNHJT.js");
338377
338377
  const provider = new OAuth2AuthProvider(
338378
338378
  authConfig,
338379
338379
  options.agentName ?? "unknown",
@@ -366472,6 +366472,7 @@ function createPolicyUpdater(policyEngine, messageBus, storage2) {
366472
366472
  }
366473
366473
  if (message.persist) {
366474
366474
  persistenceQueue = persistenceQueue.then(async () => {
366475
+ let tmpFile;
366475
366476
  try {
366476
366477
  const policyFile = message.persistScope === "workspace" ? storage2.getWorkspaceAutoSavedPolicyPath() : storage2.getAutoSavedPolicyPath();
366477
366478
  await fs73.mkdir(path83.dirname(policyFile), { recursive: true });
@@ -366483,11 +366484,19 @@ function createPolicyUpdater(policyEngine, messageBus, storage2) {
366483
366484
  existingData = parsed;
366484
366485
  }
366485
366486
  } catch (error40) {
366486
- if (!isNodeError(error40) || error40.code !== "ENOENT") {
366487
- debugLogger.warn(
366488
- `Failed to parse ${policyFile}, overwriting with new policy.`,
366489
- 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.`
366490
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;
366491
366500
  }
366492
366501
  }
366493
366502
  if (!existingData.rule) {
@@ -366520,7 +366529,7 @@ function createPolicyUpdater(policyEngine, messageBus, storage2) {
366520
366529
  }
366521
366530
  const newContent = import_toml3.default.stringify(existingData);
366522
366531
  const tmpSuffix = crypto18.randomBytes(8).toString("hex");
366523
- const tmpFile = `${policyFile}.${tmpSuffix}.tmp`;
366532
+ tmpFile = `${policyFile}.${tmpSuffix}.tmp`;
366524
366533
  let handle2;
366525
366534
  try {
366526
366535
  handle2 = await fs73.open(tmpFile, "wx");
@@ -366528,11 +366537,28 @@ function createPolicyUpdater(policyEngine, messageBus, storage2) {
366528
366537
  } finally {
366529
366538
  await handle2?.close();
366530
366539
  }
366531
- 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
+ }
366532
366553
  } catch (error40) {
366554
+ if (tmpFile) {
366555
+ await fs73.unlink(tmpFile).catch(() => {
366556
+ });
366557
+ }
366558
+ const reason = error40 instanceof Error ? error40.message : String(error40);
366533
366559
  coreEvents.emitFeedback(
366534
366560
  "error",
366535
- `Failed to persist policy for ${toolName}`,
366561
+ `Failed to persist policy for ${toolName}: ${reason}`,
366536
366562
  error40
366537
366563
  );
366538
366564
  }
@@ -387432,7 +387458,7 @@ import { readdir as readdir11, stat as stat11 } from "node:fs/promises";
387432
387458
  import * as sp2 from "node:path";
387433
387459
 
387434
387460
  // packages/core/node_modules/readdirp/index.js
387435
- 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";
387436
387462
  import { join as pjoin, relative as prelative, resolve as presolve, sep as psep } from "node:path";
387437
387463
  import { Readable as Readable4 } from "node:stream";
387438
387464
  var EntryTypes = {
@@ -387513,7 +387539,7 @@ var ReaddirpStream = class extends Readable4 {
387513
387539
  const { root, type: type2 } = opts;
387514
387540
  this._fileFilter = normalizeFilter(opts.fileFilter);
387515
387541
  this._directoryFilter = normalizeFilter(opts.directoryFilter);
387516
- const statMethod = opts.lstat ? lstat3 : stat9;
387542
+ const statMethod = opts.lstat ? lstat4 : stat9;
387517
387543
  if (wantBigintFsStats) {
387518
387544
  this._stat = (path113) => statMethod(path113, { bigint: true });
387519
387545
  } else {
@@ -387623,7 +387649,7 @@ var ReaddirpStream = class extends Readable4 {
387623
387649
  const full = entry.fullPath;
387624
387650
  try {
387625
387651
  const entryRealPath = await realpath4(full);
387626
- const entryRealPathStats = await lstat3(entryRealPath);
387652
+ const entryRealPathStats = await lstat4(entryRealPath);
387627
387653
  if (entryRealPathStats.isFile()) {
387628
387654
  return "file";
387629
387655
  }
@@ -387666,7 +387692,7 @@ function readdirp(root, options = {}) {
387666
387692
 
387667
387693
  // packages/core/node_modules/chokidar/handler.js
387668
387694
  import { watch as fs_watch, unwatchFile, watchFile } from "node:fs";
387669
- 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";
387670
387696
  import { type as osType } from "node:os";
387671
387697
  import * as sp from "node:path";
387672
387698
  var STR_DATA = "data";
@@ -387693,7 +387719,7 @@ var EVENTS = {
387693
387719
  };
387694
387720
  var EV = EVENTS;
387695
387721
  var THROTTLE_MODE_WATCH = "watch";
387696
- var statMethods = { lstat: lstat4, stat: stat10 };
387722
+ var statMethods = { lstat: lstat5, stat: stat10 };
387697
387723
  var KEY_LISTENERS = "listeners";
387698
387724
  var KEY_ERR = "errHandlers";
387699
387725
  var KEY_RAW = "rawEmitters";
@@ -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-QMCEWHRR.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-EG7USKV5.js";
17
+ } from "./chunk-WMO6YVSB.js";
18
18
  import {
19
19
  debugLogger
20
- } from "./chunk-KOJR46UO.js";
20
+ } from "./chunk-PML6IHTI.js";
21
21
  import {
22
22
  __toESM
23
23
  } from "./chunk-34MYV7JD.js";
@@ -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) {
@@ -279300,8 +279300,8 @@ function isValidToolName(name3, options = {}) {
279300
279300
  }
279301
279301
 
279302
279302
  // packages/core/dist/src/generated/git-commit.js
279303
- var GIT_COMMIT_INFO = "700c96118";
279304
- var CLI_VERSION = "0.46.0-preview.0";
279303
+ var GIT_COMMIT_INFO = "4196596f7";
279304
+ var CLI_VERSION = "0.47.0-nightly.20260602.gcfcecebe8";
279305
279305
 
279306
279306
  // packages/core/dist/src/ide/detect-ide.js
279307
279307
  var IDE_DEFINITIONS = {
@@ -303466,7 +303466,7 @@ function getVersion() {
303466
303466
  }
303467
303467
  versionPromise = (async () => {
303468
303468
  const pkgJson = await getPackageJson(__dirname4);
303469
- return "0.46.0-preview.0";
303469
+ return "0.47.0-nightly.20260602.gcfcecebe8";
303470
303470
  })();
303471
303471
  return versionPromise;
303472
303472
  }
@@ -335804,7 +335804,7 @@ var A2AAuthProviderFactory = class _A2AAuthProviderFactory {
335804
335804
  return provider;
335805
335805
  }
335806
335806
  case "oauth2": {
335807
- const { OAuth2AuthProvider } = await import("./oauth2-provider-3WXIASQA.js");
335807
+ const { OAuth2AuthProvider } = await import("./oauth2-provider-Z6MAYPWZ.js");
335808
335808
  const provider = new OAuth2AuthProvider(authConfig, options.agentName ?? "unknown", agentCard, options.agentCardUrl);
335809
335809
  await provider.initialize();
335810
335810
  return provider;
@@ -361489,6 +361489,7 @@ function createPolicyUpdater(policyEngine, messageBus, storage2) {
361489
361489
  }
361490
361490
  if (message.persist) {
361491
361491
  persistenceQueue = persistenceQueue.then(async () => {
361492
+ let tmpFile;
361492
361493
  try {
361493
361494
  const policyFile = message.persistScope === "workspace" ? storage2.getWorkspaceAutoSavedPolicyPath() : storage2.getAutoSavedPolicyPath();
361494
361495
  await fs73.mkdir(path83.dirname(policyFile), { recursive: true });
@@ -361500,8 +361501,16 @@ function createPolicyUpdater(policyEngine, messageBus, storage2) {
361500
361501
  existingData = parsed;
361501
361502
  }
361502
361503
  } catch (error40) {
361503
- if (!isNodeError(error40) || error40.code !== "ENOENT") {
361504
- debugLogger.warn(`Failed to parse ${policyFile}, overwriting with new policy.`, error40);
361504
+ if (isNodeError(error40) && error40.code === "ENOENT") {
361505
+ } else if (!isNodeError(error40)) {
361506
+ coreEvents.emitFeedback("warning", `Syntax error found in policy file. Backing up corrupted file to ${policyFile}.bak and starting fresh.`);
361507
+ if (!(await fs73.lstat(policyFile).catch(() => null))?.isSymbolicLink()) {
361508
+ await fs73.copyFile(policyFile, `${policyFile}.bak`).catch(() => {
361509
+ });
361510
+ }
361511
+ existingData = {};
361512
+ } else {
361513
+ throw error40;
361505
361514
  }
361506
361515
  }
361507
361516
  if (!existingData.rule) {
@@ -361532,7 +361541,7 @@ function createPolicyUpdater(policyEngine, messageBus, storage2) {
361532
361541
  }
361533
361542
  const newContent = import_toml3.default.stringify(existingData);
361534
361543
  const tmpSuffix = crypto18.randomBytes(8).toString("hex");
361535
- const tmpFile = `${policyFile}.${tmpSuffix}.tmp`;
361544
+ tmpFile = `${policyFile}.${tmpSuffix}.tmp`;
361536
361545
  let handle2;
361537
361546
  try {
361538
361547
  handle2 = await fs73.open(tmpFile, "wx");
@@ -361540,9 +361549,26 @@ function createPolicyUpdater(policyEngine, messageBus, storage2) {
361540
361549
  } finally {
361541
361550
  await handle2?.close();
361542
361551
  }
361543
- await fs73.rename(tmpFile, policyFile);
361552
+ try {
361553
+ await fs73.rename(tmpFile, policyFile);
361554
+ } catch (renameError) {
361555
+ if (isNodeError(renameError) && (renameError.code === "EXDEV" || renameError.code === "EBUSY")) {
361556
+ if ((await fs73.lstat(policyFile).catch(() => null))?.isSymbolicLink())
361557
+ throw renameError;
361558
+ await fs73.copyFile(tmpFile, policyFile);
361559
+ await fs73.unlink(tmpFile).catch(() => {
361560
+ });
361561
+ } else {
361562
+ throw renameError;
361563
+ }
361564
+ }
361544
361565
  } catch (error40) {
361545
- coreEvents.emitFeedback("error", `Failed to persist policy for ${toolName}`, error40);
361566
+ if (tmpFile) {
361567
+ await fs73.unlink(tmpFile).catch(() => {
361568
+ });
361569
+ }
361570
+ const reason = error40 instanceof Error ? error40.message : String(error40);
361571
+ coreEvents.emitFeedback("error", `Failed to persist policy for ${toolName}: ${reason}`, error40);
361546
361572
  }
361547
361573
  });
361548
361574
  }
@@ -381153,7 +381179,7 @@ import { readdir as readdir11, stat as stat11 } from "node:fs/promises";
381153
381179
  import * as sp2 from "node:path";
381154
381180
 
381155
381181
  // packages/core/node_modules/readdirp/index.js
381156
- import { lstat as lstat3, readdir as readdir10, realpath as realpath4, stat as stat9 } from "node:fs/promises";
381182
+ import { lstat as lstat4, readdir as readdir10, realpath as realpath4, stat as stat9 } from "node:fs/promises";
381157
381183
  import { join as pjoin, relative as prelative, resolve as presolve, sep as psep } from "node:path";
381158
381184
  import { Readable as Readable4 } from "node:stream";
381159
381185
  var EntryTypes = {
@@ -381234,7 +381260,7 @@ var ReaddirpStream = class extends Readable4 {
381234
381260
  const { root, type: type2 } = opts;
381235
381261
  this._fileFilter = normalizeFilter(opts.fileFilter);
381236
381262
  this._directoryFilter = normalizeFilter(opts.directoryFilter);
381237
- const statMethod = opts.lstat ? lstat3 : stat9;
381263
+ const statMethod = opts.lstat ? lstat4 : stat9;
381238
381264
  if (wantBigintFsStats) {
381239
381265
  this._stat = (path113) => statMethod(path113, { bigint: true });
381240
381266
  } else {
@@ -381344,7 +381370,7 @@ var ReaddirpStream = class extends Readable4 {
381344
381370
  const full = entry.fullPath;
381345
381371
  try {
381346
381372
  const entryRealPath = await realpath4(full);
381347
- const entryRealPathStats = await lstat3(entryRealPath);
381373
+ const entryRealPathStats = await lstat4(entryRealPath);
381348
381374
  if (entryRealPathStats.isFile()) {
381349
381375
  return "file";
381350
381376
  }
@@ -381387,7 +381413,7 @@ function readdirp(root, options = {}) {
381387
381413
 
381388
381414
  // packages/core/node_modules/chokidar/handler.js
381389
381415
  import { watch as fs_watch, unwatchFile, watchFile } from "node:fs";
381390
- import { realpath as fsrealpath, lstat as lstat4, open as open7, stat as stat10 } from "node:fs/promises";
381416
+ import { realpath as fsrealpath, lstat as lstat5, open as open7, stat as stat10 } from "node:fs/promises";
381391
381417
  import { type as osType } from "node:os";
381392
381418
  import * as sp from "node:path";
381393
381419
  var STR_DATA = "data";
@@ -381414,7 +381440,7 @@ var EVENTS = {
381414
381440
  };
381415
381441
  var EV = EVENTS;
381416
381442
  var THROTTLE_MODE_WATCH = "watch";
381417
- var statMethods = { lstat: lstat4, stat: stat10 };
381443
+ var statMethods = { lstat: lstat5, stat: stat10 };
381418
381444
  var KEY_LISTENERS = "listeners";
381419
381445
  var KEY_ERR = "errHandlers";
381420
381446
  var KEY_RAW = "rawEmitters";
@@ -6,7 +6,7 @@ import {
6
6
  import {
7
7
  exitCli,
8
8
  require_source
9
- } from "./chunk-RXYIE5L5.js";
9
+ } from "./chunk-MCHAK65W.js";
10
10
  import {
11
11
  DEFAULT_BACKGROUND_OPACITY,
12
12
  DEFAULT_BORDER_OPACITY,
@@ -58,14 +58,14 @@ import {
58
58
  stripUnsafeCharacters,
59
59
  toCodePoints,
60
60
  validateCustomTheme
61
- } from "./chunk-5CWORGE3.js";
61
+ } from "./chunk-A3QBI6HT.js";
62
62
  import {
63
63
  isDevelopment
64
- } from "./chunk-JPYTHGMI.js";
64
+ } from "./chunk-GRGDQ7OF.js";
65
65
  import {
66
66
  emptyIcon,
67
67
  require_react
68
- } from "./chunk-WRWCUHAM.js";
68
+ } from "./chunk-BB7JWK6H.js";
69
69
  import {
70
70
  ALL_EDITORS,
71
71
  ApprovalMode,
@@ -243,7 +243,7 @@ import {
243
243
  tokenLimit,
244
244
  uiTelemetryService,
245
245
  unescapePath
246
- } from "./chunk-ITC7TFJU.js";
246
+ } from "./chunk-UGUHWSGX.js";
247
247
  import {
248
248
  require_src
249
249
  } from "./chunk-TUDYL3X4.js";
@@ -56514,7 +56514,7 @@ var authCommand = {
56514
56514
  import process28 from "node:process";
56515
56515
 
56516
56516
  // packages/cli/src/generated/git-commit.ts
56517
- var GIT_COMMIT_INFO = "0ded806d2";
56517
+ var GIT_COMMIT_INFO = "4196596f7";
56518
56518
 
56519
56519
  // packages/cli/src/ui/utils/historyExportUtils.ts
56520
56520
  import * as fsPromises from "node:fs/promises";
@@ -62275,7 +62275,7 @@ Use /mcp auth <server-name> to authenticate.`
62275
62275
  type: "info",
62276
62276
  text: `Starting OAuth authentication for MCP server '${serverName}'...`
62277
62277
  });
62278
- const { MCPOAuthProvider } = await import("./dist-LIQULVXZ.js");
62278
+ const { MCPOAuthProvider } = await import("./dist-VGFRXX7L.js");
62279
62279
  let oauthConfig = server.oauth;
62280
62280
  if (!oauthConfig) {
62281
62281
  oauthConfig = { enabled: false };
@@ -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-VETILJQA.js";
5
+ } from "./chunk-MCHAK65W.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-4B7MDBUK.js";
17
+ } from "./chunk-A3QBI6HT.js";
18
18
  import {
19
19
  debugLogger
20
- } from "./chunk-QEVRJ7HY.js";
20
+ } from "./chunk-UGUHWSGX.js";
21
21
  import {
22
22
  __toESM
23
23
  } from "./chunk-34MYV7JD.js";
@@ -5,7 +5,7 @@ import {
5
5
  isTelemetrySdkInitialized,
6
6
  resetBrowserSession,
7
7
  shutdownTelemetry
8
- } from "./chunk-QEVRJ7HY.js";
8
+ } from "./chunk-UGUHWSGX.js";
9
9
 
10
10
  // packages/cli/src/utils/cleanup.ts
11
11
  import { promises as fs } from "node:fs";
@@ -2,7 +2,7 @@ const require = (await import('node:module')).createRequire(import.meta.url); co
2
2
  import {
3
3
  CoreToolCallStatus,
4
4
  checkExhaustive
5
- } from "./chunk-ITC7TFJU.js";
5
+ } from "./chunk-PML6IHTI.js";
6
6
  import {
7
7
  __commonJS,
8
8
  __toESM
@@ -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) {
@@ -279300,8 +279300,8 @@ function isValidToolName(name3, options = {}) {
279300
279300
  }
279301
279301
 
279302
279302
  // packages/core/dist/src/generated/git-commit.js
279303
- var GIT_COMMIT_INFO = "700c96118";
279304
- var CLI_VERSION = "0.46.0-preview.0";
279303
+ var GIT_COMMIT_INFO = "4196596f7";
279304
+ var CLI_VERSION = "0.47.0-nightly.20260602.gcfcecebe8";
279305
279305
 
279306
279306
  // packages/core/dist/src/ide/detect-ide.js
279307
279307
  var IDE_DEFINITIONS = {
@@ -303466,7 +303466,7 @@ function getVersion() {
303466
303466
  }
303467
303467
  versionPromise = (async () => {
303468
303468
  const pkgJson = await getPackageJson(__dirname4);
303469
- return "0.46.0-preview.1";
303469
+ return "0.47.0-nightly.20260604.g4196596f7";
303470
303470
  })();
303471
303471
  return versionPromise;
303472
303472
  }
@@ -335804,7 +335804,7 @@ var A2AAuthProviderFactory = class _A2AAuthProviderFactory {
335804
335804
  return provider;
335805
335805
  }
335806
335806
  case "oauth2": {
335807
- const { OAuth2AuthProvider } = await import("./oauth2-provider-K52EY6RG.js");
335807
+ const { OAuth2AuthProvider } = await import("./oauth2-provider-7XEK25LP.js");
335808
335808
  const provider = new OAuth2AuthProvider(authConfig, options.agentName ?? "unknown", agentCard, options.agentCardUrl);
335809
335809
  await provider.initialize();
335810
335810
  return provider;
@@ -361489,6 +361489,7 @@ function createPolicyUpdater(policyEngine, messageBus, storage2) {
361489
361489
  }
361490
361490
  if (message.persist) {
361491
361491
  persistenceQueue = persistenceQueue.then(async () => {
361492
+ let tmpFile;
361492
361493
  try {
361493
361494
  const policyFile = message.persistScope === "workspace" ? storage2.getWorkspaceAutoSavedPolicyPath() : storage2.getAutoSavedPolicyPath();
361494
361495
  await fs73.mkdir(path83.dirname(policyFile), { recursive: true });
@@ -361500,8 +361501,16 @@ function createPolicyUpdater(policyEngine, messageBus, storage2) {
361500
361501
  existingData = parsed;
361501
361502
  }
361502
361503
  } catch (error40) {
361503
- if (!isNodeError(error40) || error40.code !== "ENOENT") {
361504
- debugLogger.warn(`Failed to parse ${policyFile}, overwriting with new policy.`, error40);
361504
+ if (isNodeError(error40) && error40.code === "ENOENT") {
361505
+ } else if (!isNodeError(error40)) {
361506
+ coreEvents.emitFeedback("warning", `Syntax error found in policy file. Backing up corrupted file to ${policyFile}.bak and starting fresh.`);
361507
+ if (!(await fs73.lstat(policyFile).catch(() => null))?.isSymbolicLink()) {
361508
+ await fs73.copyFile(policyFile, `${policyFile}.bak`).catch(() => {
361509
+ });
361510
+ }
361511
+ existingData = {};
361512
+ } else {
361513
+ throw error40;
361505
361514
  }
361506
361515
  }
361507
361516
  if (!existingData.rule) {
@@ -361532,7 +361541,7 @@ function createPolicyUpdater(policyEngine, messageBus, storage2) {
361532
361541
  }
361533
361542
  const newContent = import_toml3.default.stringify(existingData);
361534
361543
  const tmpSuffix = crypto18.randomBytes(8).toString("hex");
361535
- const tmpFile = `${policyFile}.${tmpSuffix}.tmp`;
361544
+ tmpFile = `${policyFile}.${tmpSuffix}.tmp`;
361536
361545
  let handle2;
361537
361546
  try {
361538
361547
  handle2 = await fs73.open(tmpFile, "wx");
@@ -361540,9 +361549,26 @@ function createPolicyUpdater(policyEngine, messageBus, storage2) {
361540
361549
  } finally {
361541
361550
  await handle2?.close();
361542
361551
  }
361543
- await fs73.rename(tmpFile, policyFile);
361552
+ try {
361553
+ await fs73.rename(tmpFile, policyFile);
361554
+ } catch (renameError) {
361555
+ if (isNodeError(renameError) && (renameError.code === "EXDEV" || renameError.code === "EBUSY")) {
361556
+ if ((await fs73.lstat(policyFile).catch(() => null))?.isSymbolicLink())
361557
+ throw renameError;
361558
+ await fs73.copyFile(tmpFile, policyFile);
361559
+ await fs73.unlink(tmpFile).catch(() => {
361560
+ });
361561
+ } else {
361562
+ throw renameError;
361563
+ }
361564
+ }
361544
361565
  } catch (error40) {
361545
- coreEvents.emitFeedback("error", `Failed to persist policy for ${toolName}`, error40);
361566
+ if (tmpFile) {
361567
+ await fs73.unlink(tmpFile).catch(() => {
361568
+ });
361569
+ }
361570
+ const reason = error40 instanceof Error ? error40.message : String(error40);
361571
+ coreEvents.emitFeedback("error", `Failed to persist policy for ${toolName}: ${reason}`, error40);
361546
361572
  }
361547
361573
  });
361548
361574
  }
@@ -381153,7 +381179,7 @@ import { readdir as readdir11, stat as stat11 } from "node:fs/promises";
381153
381179
  import * as sp2 from "node:path";
381154
381180
 
381155
381181
  // packages/core/node_modules/readdirp/index.js
381156
- import { lstat as lstat3, readdir as readdir10, realpath as realpath4, stat as stat9 } from "node:fs/promises";
381182
+ import { lstat as lstat4, readdir as readdir10, realpath as realpath4, stat as stat9 } from "node:fs/promises";
381157
381183
  import { join as pjoin, relative as prelative, resolve as presolve, sep as psep } from "node:path";
381158
381184
  import { Readable as Readable4 } from "node:stream";
381159
381185
  var EntryTypes = {
@@ -381234,7 +381260,7 @@ var ReaddirpStream = class extends Readable4 {
381234
381260
  const { root, type: type2 } = opts;
381235
381261
  this._fileFilter = normalizeFilter(opts.fileFilter);
381236
381262
  this._directoryFilter = normalizeFilter(opts.directoryFilter);
381237
- const statMethod = opts.lstat ? lstat3 : stat9;
381263
+ const statMethod = opts.lstat ? lstat4 : stat9;
381238
381264
  if (wantBigintFsStats) {
381239
381265
  this._stat = (path113) => statMethod(path113, { bigint: true });
381240
381266
  } else {
@@ -381344,7 +381370,7 @@ var ReaddirpStream = class extends Readable4 {
381344
381370
  const full = entry.fullPath;
381345
381371
  try {
381346
381372
  const entryRealPath = await realpath4(full);
381347
- const entryRealPathStats = await lstat3(entryRealPath);
381373
+ const entryRealPathStats = await lstat4(entryRealPath);
381348
381374
  if (entryRealPathStats.isFile()) {
381349
381375
  return "file";
381350
381376
  }
@@ -381387,7 +381413,7 @@ function readdirp(root, options = {}) {
381387
381413
 
381388
381414
  // packages/core/node_modules/chokidar/handler.js
381389
381415
  import { watch as fs_watch, unwatchFile, watchFile } from "node:fs";
381390
- import { realpath as fsrealpath, lstat as lstat4, open as open7, stat as stat10 } from "node:fs/promises";
381416
+ import { realpath as fsrealpath, lstat as lstat5, open as open7, stat as stat10 } from "node:fs/promises";
381391
381417
  import { type as osType } from "node:os";
381392
381418
  import * as sp from "node:path";
381393
381419
  var STR_DATA = "data";
@@ -381414,7 +381440,7 @@ var EVENTS = {
381414
381440
  };
381415
381441
  var EV = EVENTS;
381416
381442
  var THROTTLE_MODE_WATCH = "watch";
381417
- var statMethods = { lstat: lstat4, stat: stat10 };
381443
+ var statMethods = { lstat: lstat5, stat: stat10 };
381418
381444
  var KEY_LISTENERS = "listeners";
381419
381445
  var KEY_ERR = "errHandlers";
381420
381446
  var KEY_RAW = "rawEmitters";