@google/gemini-cli 0.57.0-preview.1 → 0.57.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 (66) hide show
  1. package/bundle/{chunk-S5UX3QS5.js → chunk-4H4K2RBL.js} +3 -3
  2. package/bundle/{chunk-G65GW52B.js → chunk-7HKQGPWB.js} +4 -4
  3. package/bundle/{chunk-EAK33LFP.js → chunk-7IKUWYZO.js} +1 -1
  4. package/bundle/{chunk-ALVDOQNA.js → chunk-7ZGWPQVZ.js} +1 -1
  5. package/bundle/{chunk-ZMPGHLGO.js → chunk-AOE6E7MU.js} +2 -2
  6. package/bundle/{chunk-65C235NM.js → chunk-ASZFEU6C.js} +7 -7
  7. package/bundle/{chunk-O7SBKM7M.js → chunk-DFPYJMVX.js} +4 -4
  8. package/bundle/{chunk-VBK54QCZ.js → chunk-FVC4WCSP.js} +1 -1
  9. package/bundle/{chunk-3BVBON3V.js → chunk-FYAMITQ2.js} +1 -1
  10. package/bundle/{chunk-GK7NUJ35.js → chunk-GAROUUGQ.js} +1 -1
  11. package/bundle/{chunk-3NPMAHLX.js → chunk-GAS2GAYB.js} +1 -1
  12. package/bundle/{chunk-4ALCU2HQ.js → chunk-GPOBVDAD.js} +5 -8
  13. package/bundle/{chunk-RLDNUS35.js → chunk-HY6GN2F7.js} +1 -1
  14. package/bundle/{chunk-AKCYXG7C.js → chunk-IKHAM2LG.js} +7 -7
  15. package/bundle/{chunk-MBWROXYM.js → chunk-ISXOUBN5.js} +2 -2
  16. package/bundle/{chunk-NMMXRZ53.js → chunk-LQJHQ4BU.js} +2 -2
  17. package/bundle/{chunk-UMQE7UC6.js → chunk-MNBBUQQS.js} +3 -3
  18. package/bundle/{chunk-W23OOD2C.js → chunk-O7TOZUUB.js} +3 -3
  19. package/bundle/{chunk-FHDRG5U4.js → chunk-QJ33O2NH.js} +54 -67
  20. package/bundle/{chunk-Q73BPF7A.js → chunk-RLDNVR77.js} +1 -1
  21. package/bundle/{chunk-NPOI4K6X.js → chunk-S3MXVTTY.js} +14357 -7673
  22. package/bundle/{chunk-NQ4RH42O.js → chunk-TAWZWX2B.js} +8 -9
  23. package/bundle/{chunk-GMQ6QNZB.js → chunk-XG56CL6B.js} +1 -1
  24. package/bundle/{chunk-SCBVGZXH.js → chunk-YW7SDLZQ.js} +1 -1
  25. package/bundle/{cleanup-2W5DPMY3.js → cleanup-2HUWGXK6.js} +2 -2
  26. package/bundle/{cleanup-OTHE7RNU.js → cleanup-7N2HFE2E.js} +2 -2
  27. package/bundle/{cleanup-SM67K64R.js → cleanup-DA7OSZS5.js} +2 -2
  28. package/bundle/{core-US34OW5M.js → core-2NMRPWUN.js} +1 -1
  29. package/bundle/{dist-5TYMQVIZ.js → core-CFPIDJ4Z.js} +1 -1
  30. package/bundle/{devtoolsService-5J53UK6Z.js → devtoolsService-7YYOUGVF.js} +2 -2
  31. package/bundle/{devtoolsService-JBFUXTCT.js → devtoolsService-VQSLUOYF.js} +3 -4
  32. package/bundle/{devtoolsService-GU2GQSOF.js → devtoolsService-WMEEEXY6.js} +2 -2
  33. package/bundle/{dist-OWKHVWTR.js → dist-AMP5W5P2.js} +1 -1
  34. package/bundle/{gemini-W2B6CLJC.js → gemini-5LF4JAP7.js} +198 -214
  35. package/bundle/{gemini-LSMTDETS.js → gemini-OYYGXMHL.js} +14 -14
  36. package/bundle/{gemini-3M22N2C3.js → gemini-PSRJNVY5.js} +14 -14
  37. package/bundle/gemini.js +7 -7
  38. package/bundle/{interactiveCli-LQJM6LRE.js → interactiveCli-5E2C3XOC.js} +8 -8
  39. package/bundle/{interactiveCli-D6H37PJQ.js → interactiveCli-5O6FZS57.js} +8 -8
  40. package/bundle/{interactiveCli-L3ZXOVEV.js → interactiveCli-PP7WTUZL.js} +296 -315
  41. package/bundle/{liteRtServerManager-3BY6TBHG.js → liteRtServerManager-5QBFCLBK.js} +4 -4
  42. package/bundle/{liteRtServerManager-C5WZRQUF.js → liteRtServerManager-LK6HOSMO.js} +4 -4
  43. package/bundle/{liteRtServerManager-IGKUGGP4.js → liteRtServerManager-ZPDALIDY.js} +4 -4
  44. package/bundle/{oauth2-provider-KSRLPOK3.js → oauth2-provider-BGMEA7RS.js} +1 -1
  45. package/bundle/{oauth2-provider-RWKTMYJF.js → oauth2-provider-BYKBBEKI.js} +1 -1
  46. package/bundle/{oauth2-provider-VHNLCU4Y.js → oauth2-provider-CO22I6UM.js} +72 -38
  47. package/bundle/{start-EXAQFM4Y.js → start-JRTTCV3K.js} +6 -6
  48. package/bundle/{start-IPZF32E3.js → start-KH6WSP5C.js} +6 -6
  49. package/bundle/{start-SVNTSNHV.js → start-O6LWZY6K.js} +6 -6
  50. package/package.json +1 -1
  51. package/bundle/chunk-4SNEOO5E.js +0 -398
  52. package/bundle/chunk-LNXGFWGZ.js +0 -17332
  53. package/bundle/chunk-QJP6CMLN.js +0 -118
  54. package/bundle/chunk-SWQAIZEQ.js +0 -102506
  55. package/bundle/chunk-VGGWKRAC.js +0 -154
  56. package/bundle/chunk-WDFSF5L4.js +0 -397601
  57. package/bundle/chunk-XESAM7IL.js +0 -512
  58. package/bundle/chunk-Y3APL4PE.js +0 -1571
  59. package/bundle/cleanup-XAUT5CMD.js +0 -32
  60. package/bundle/devtoolsService-V46GUHRF.js +0 -4359
  61. package/bundle/dist-V5VJYW6J.js +0 -2180
  62. package/bundle/gemini-OZOYJF22.js +0 -17091
  63. package/bundle/interactiveCli-RGOYDSMH.js +0 -34984
  64. package/bundle/liteRtServerManager-IJ4I2PZA.js +0 -65
  65. package/bundle/oauth2-provider-ZT4OFVMK.js +0 -235
  66. 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
- */