@google/gemini-cli 0.57.0-preview.1 → 0.58.0-preview.0

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 (74) hide show
  1. package/bundle/{chunk-3BVBON3V.js → chunk-2BLMLPHM.js} +1 -1
  2. package/bundle/{chunk-GK7NUJ35.js → chunk-2DH4DX65.js} +1 -1
  3. package/bundle/{chunk-ZMPGHLGO.js → chunk-2XOTT2FI.js} +2 -2
  4. package/bundle/{chunk-S5UX3QS5.js → chunk-4FKXMALD.js} +3 -3
  5. package/bundle/{chunk-O7SBKM7M.js → chunk-4KFMA4KD.js} +242 -106
  6. package/bundle/{chunk-UMQE7UC6.js → chunk-6EGII27G.js} +3 -3
  7. package/bundle/{chunk-VBK54QCZ.js → chunk-7HQEQECM.js} +1 -1
  8. package/bundle/{chunk-RLDNUS35.js → chunk-BOI2NL3I.js} +1 -1
  9. package/bundle/{chunk-EAK33LFP.js → chunk-CNAVMEMA.js} +1 -1
  10. package/bundle/{chunk-AKCYXG7C.js → chunk-E7K62ODO.js} +7 -7
  11. package/bundle/{chunk-ALVDOQNA.js → chunk-FJTXPUG2.js} +1 -1
  12. package/bundle/{chunk-4ALCU2HQ.js → chunk-FMLOQLUD.js} +5 -8
  13. package/bundle/{chunk-MBWROXYM.js → chunk-GNLIR4RW.js} +2 -2
  14. package/bundle/{chunk-GMQ6QNZB.js → chunk-JCGNL7TH.js} +1 -1
  15. package/bundle/{chunk-65C235NM.js → chunk-JO5YRKX4.js} +7 -7
  16. package/bundle/{chunk-3NPMAHLX.js → chunk-JPMNKIVX.js} +1 -1
  17. package/bundle/{chunk-NPOI4K6X.js → chunk-M33HH4UA.js} +14468 -7648
  18. package/bundle/{chunk-NQ4RH42O.js → chunk-OEY2TDVE.js} +8 -9
  19. package/bundle/{chunk-W23OOD2C.js → chunk-PGYTXBPD.js} +3 -3
  20. package/bundle/{chunk-SCBVGZXH.js → chunk-PXFYRLFH.js} +1 -1
  21. package/bundle/{chunk-Q73BPF7A.js → chunk-RBQHWQSS.js} +1 -1
  22. package/bundle/{chunk-G65GW52B.js → chunk-TYMOJXZO.js} +181 -45
  23. package/bundle/{chunk-FHDRG5U4.js → chunk-WE4JKUV6.js} +54 -67
  24. package/bundle/{chunk-NMMXRZ53.js → chunk-WHCFVERV.js} +2 -2
  25. package/bundle/{cleanup-2W5DPMY3.js → cleanup-KTXX3JEU.js} +2 -2
  26. package/bundle/{cleanup-OTHE7RNU.js → cleanup-NLNXSTS6.js} +2 -2
  27. package/bundle/{cleanup-SM67K64R.js → cleanup-RW3JYSTT.js} +2 -2
  28. package/bundle/{core-US34OW5M.js → core-SU4ABXSV.js} +3 -1
  29. package/bundle/{dist-5TYMQVIZ.js → core-WFITWJMX.js} +3 -1
  30. package/bundle/{devtoolsService-GU2GQSOF.js → devtoolsService-BUAVSMN6.js} +2 -2
  31. package/bundle/{devtoolsService-5J53UK6Z.js → devtoolsService-MNBGW66M.js} +2 -2
  32. package/bundle/{devtoolsService-JBFUXTCT.js → devtoolsService-P42LXPJX.js} +3 -4
  33. package/bundle/{dist-OWKHVWTR.js → dist-2CGQYGZC.js} +3 -1
  34. package/bundle/docs/changelogs/preview.md +78 -94
  35. package/bundle/{gemini-LSMTDETS.js → gemini-3PHRRMWS.js} +266 -20
  36. package/bundle/{gemini-W2B6CLJC.js → gemini-BUCCXM4N.js} +450 -220
  37. package/bundle/{gemini-3M22N2C3.js → gemini-VIRT6VT3.js} +266 -20
  38. package/bundle/gemini.js +7 -7
  39. package/bundle/{interactiveCli-LQJM6LRE.js → interactiveCli-BP2ZFGLX.js} +8 -9
  40. package/bundle/{interactiveCli-L3ZXOVEV.js → interactiveCli-GGARXT6P.js} +296 -316
  41. package/bundle/{interactiveCli-D6H37PJQ.js → interactiveCli-N6VXS5Z4.js} +8 -9
  42. package/bundle/{liteRtServerManager-3BY6TBHG.js → liteRtServerManager-L46MRFSW.js} +4 -4
  43. package/bundle/{liteRtServerManager-C5WZRQUF.js → liteRtServerManager-QUODN3RR.js} +4 -4
  44. package/bundle/{liteRtServerManager-IGKUGGP4.js → liteRtServerManager-YLOGF7RQ.js} +4 -4
  45. package/bundle/{oauth2-provider-KSRLPOK3.js → oauth2-provider-BKWSLZJ6.js} +1 -1
  46. package/bundle/{oauth2-provider-VHNLCU4Y.js → oauth2-provider-IIC2YPC5.js} +72 -38
  47. package/bundle/{oauth2-provider-RWKTMYJF.js → oauth2-provider-KVIL4ITH.js} +1 -1
  48. package/bundle/policies/write.toml +10 -2
  49. package/bundle/sandbox-macos-permissive-open.sb +50 -0
  50. package/bundle/sandbox-macos-permissive-proxied.sb +50 -0
  51. package/bundle/sandbox-macos-restrictive-open.sb +50 -1
  52. package/bundle/sandbox-macos-restrictive-proxied.sb +50 -0
  53. package/bundle/sandbox-macos-strict-open.sb +50 -0
  54. package/bundle/sandbox-macos-strict-proxied.sb +50 -0
  55. package/bundle/{start-EXAQFM4Y.js → start-2365H4YX.js} +6 -6
  56. package/bundle/{start-IPZF32E3.js → start-VPQOFEIR.js} +6 -6
  57. package/bundle/{start-SVNTSNHV.js → start-Y7LKFE47.js} +6 -6
  58. package/package.json +1 -1
  59. package/bundle/chunk-4SNEOO5E.js +0 -398
  60. package/bundle/chunk-LNXGFWGZ.js +0 -17332
  61. package/bundle/chunk-QJP6CMLN.js +0 -118
  62. package/bundle/chunk-SWQAIZEQ.js +0 -102506
  63. package/bundle/chunk-VGGWKRAC.js +0 -154
  64. package/bundle/chunk-WDFSF5L4.js +0 -397601
  65. package/bundle/chunk-XESAM7IL.js +0 -512
  66. package/bundle/chunk-Y3APL4PE.js +0 -1571
  67. package/bundle/cleanup-XAUT5CMD.js +0 -32
  68. package/bundle/devtoolsService-V46GUHRF.js +0 -4359
  69. package/bundle/dist-V5VJYW6J.js +0 -2180
  70. package/bundle/gemini-OZOYJF22.js +0 -17091
  71. package/bundle/interactiveCli-RGOYDSMH.js +0 -34984
  72. package/bundle/liteRtServerManager-IJ4I2PZA.js +0 -65
  73. package/bundle/oauth2-provider-ZT4OFVMK.js +0 -235
  74. package/bundle/start-ZXU5BFZY.js +0 -18
@@ -1,154 +0,0 @@
1
- const require = (await import('node:module')).createRequire(import.meta.url); const __chunk_filename = (await import('node:url')).fileURLToPath(import.meta.url); const __chunk_dirname = (await import('node:path')).dirname(__chunk_filename);
2
- import {
3
- ExitCodes,
4
- Storage,
5
- isTelemetrySdkInitialized,
6
- resetBrowserSession,
7
- shutdownTelemetry
8
- } from "./chunk-NPOI4K6X.js";
9
-
10
- // packages/cli/src/utils/cleanup.ts
11
- import { promises as fs } from "node:fs";
12
- import { join } from "node:path";
13
- var cleanupFunctions = [];
14
- var syncCleanupFunctions = [];
15
- var configForTelemetry = null;
16
- var isShuttingDown = false;
17
- function registerCleanup(fn) {
18
- cleanupFunctions.push(fn);
19
- }
20
- function removeCleanup(fn) {
21
- const index = cleanupFunctions.indexOf(fn);
22
- if (index !== -1) {
23
- cleanupFunctions.splice(index, 1);
24
- }
25
- }
26
- function registerSyncCleanup(fn) {
27
- syncCleanupFunctions.push(fn);
28
- }
29
- function removeSyncCleanup(fn) {
30
- const index = syncCleanupFunctions.indexOf(fn);
31
- if (index !== -1) {
32
- syncCleanupFunctions.splice(index, 1);
33
- }
34
- }
35
- function resetCleanupForTesting() {
36
- cleanupFunctions.length = 0;
37
- syncCleanupFunctions.length = 0;
38
- configForTelemetry = null;
39
- isShuttingDown = false;
40
- }
41
- function runSyncCleanup() {
42
- for (const fn of syncCleanupFunctions) {
43
- try {
44
- fn();
45
- } catch {
46
- }
47
- }
48
- syncCleanupFunctions.length = 0;
49
- }
50
- function registerTelemetryConfig(config) {
51
- configForTelemetry = config;
52
- }
53
- async function runExitCleanup() {
54
- await drainStdin();
55
- runSyncCleanup();
56
- for (const fn of cleanupFunctions) {
57
- try {
58
- await fn();
59
- } catch {
60
- }
61
- }
62
- cleanupFunctions.length = 0;
63
- try {
64
- await resetBrowserSession();
65
- } catch {
66
- }
67
- if (configForTelemetry) {
68
- try {
69
- await configForTelemetry.dispose();
70
- } catch {
71
- }
72
- }
73
- if (configForTelemetry && isTelemetrySdkInitialized()) {
74
- try {
75
- await shutdownTelemetry(configForTelemetry);
76
- } catch {
77
- }
78
- }
79
- }
80
- async function drainStdin() {
81
- if (!process.stdin?.isTTY) return;
82
- process.stdin.resume().removeAllListeners("data").on("data", () => {
83
- });
84
- await new Promise((resolve) => setTimeout(resolve, 50));
85
- }
86
- async function gracefulShutdown(_reason) {
87
- if (isShuttingDown) {
88
- return;
89
- }
90
- isShuttingDown = true;
91
- await runExitCleanup();
92
- process.exit(ExitCodes.SUCCESS);
93
- }
94
- function setupSignalHandlers() {
95
- process.on("SIGHUP", () => gracefulShutdown("SIGHUP"));
96
- process.on("SIGTERM", () => gracefulShutdown("SIGTERM"));
97
- process.on("SIGINT", () => gracefulShutdown("SIGINT"));
98
- }
99
- function setupTtyCheck() {
100
- let intervalId = null;
101
- let isCheckingTty = false;
102
- intervalId = setInterval(async () => {
103
- if (isCheckingTty || isShuttingDown) {
104
- return;
105
- }
106
- if (process.env["SANDBOX"]) {
107
- return;
108
- }
109
- if (!process.stdin.isTTY && !process.stdout.isTTY) {
110
- isCheckingTty = true;
111
- if (intervalId) {
112
- clearInterval(intervalId);
113
- intervalId = null;
114
- }
115
- await gracefulShutdown("TTY loss");
116
- }
117
- }, 5e3);
118
- intervalId.unref();
119
- return () => {
120
- if (intervalId) {
121
- clearInterval(intervalId);
122
- intervalId = null;
123
- }
124
- };
125
- }
126
- async function cleanupCheckpoints() {
127
- const storage = new Storage(process.cwd());
128
- await storage.initialize();
129
- const tempDir = storage.getProjectTempDir();
130
- const checkpointsDir = join(tempDir, "checkpoints");
131
- try {
132
- await fs.rm(checkpointsDir, { recursive: true, force: true });
133
- } catch {
134
- }
135
- }
136
-
137
- export {
138
- registerCleanup,
139
- removeCleanup,
140
- registerSyncCleanup,
141
- removeSyncCleanup,
142
- resetCleanupForTesting,
143
- runSyncCleanup,
144
- registerTelemetryConfig,
145
- runExitCleanup,
146
- setupSignalHandlers,
147
- setupTtyCheck,
148
- cleanupCheckpoints
149
- };
150
- /**
151
- * @license
152
- * Copyright 2025 Google LLC
153
- * SPDX-License-Identifier: Apache-2.0
154
- */