@google/gemini-cli 0.40.0-preview.4 → 0.40.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 (60) hide show
  1. package/bundle/{chunk-4XVBQQNJ.js → chunk-3F3SMPJP.js} +6 -6
  2. package/bundle/{chunk-KG7ZFMJL.js → chunk-3OSQ5US4.js} +12 -12
  3. package/bundle/{chunk-PRZIW6SM.js → chunk-BSQN7W2F.js} +1 -1
  4. package/bundle/{chunk-M76FWZ5L.js → chunk-DYY5TRG5.js} +1 -1
  5. package/bundle/{chunk-63PTTRTA.js → chunk-EITHKKXC.js} +2 -2
  6. package/bundle/{chunk-NV6UCR4K.js → chunk-FRSESBS3.js} +11912 -6390
  7. package/bundle/{chunk-G356GKHH.js → chunk-G6ODSHKI.js} +1 -1
  8. package/bundle/{chunk-HGFADN5A.js → chunk-HMR2JSPA.js} +1 -1
  9. package/bundle/{chunk-H7F2VOIJ.js → chunk-J76QO4KN.js} +6 -6
  10. package/bundle/{chunk-CJQVVQSH.js → chunk-MBLCGSJW.js} +1 -1
  11. package/bundle/{chunk-SYPUOR3U.js → chunk-ML7VG4QG.js} +2 -2
  12. package/bundle/{chunk-WSTHO4WR.js → chunk-O7SPQTAS.js} +2 -2
  13. package/bundle/{chunk-H4NQBTXN.js → chunk-OE2ZUR66.js} +12 -14
  14. package/bundle/{chunk-547AWTTH.js → chunk-OEIRJHU4.js} +54 -67
  15. package/bundle/{chunk-VQ7N6NVX.js → chunk-P7LA6IIC.js} +1 -1
  16. package/bundle/{chunk-ZQNX6OWU.js → chunk-RUHTTGS7.js} +3 -3
  17. package/bundle/{chunk-CIO3GUGQ.js → chunk-SZYCJREE.js} +12 -12
  18. package/bundle/{chunk-BV2W6YE6.js → chunk-URTDU3HF.js} +1 -1
  19. package/bundle/{cleanup-DNS7PXYC.js → cleanup-6MKBWA6V.js} +2 -2
  20. package/bundle/{cleanup-4EFDM2N7.js → cleanup-AJ7G3WEE.js} +2 -2
  21. package/bundle/{cleanup-4RRVO4GO.js → cleanup-SOJQVOTG.js} +3 -3
  22. package/bundle/{core-WQSFCPEO.js → core-KELRGMHQ.js} +1 -1
  23. package/bundle/{dist-RIVCP5ZD.js → core-O5TD6NYP.js} +2 -2
  24. package/bundle/{devtoolsService-JWET4G6G.js → devtoolsService-AR5HWQA7.js} +2 -2
  25. package/bundle/{devtoolsService-LPEBYJVD.js → devtoolsService-CCXHJEUM.js} +2 -2
  26. package/bundle/{devtoolsService-S2LBUUZU.js → devtoolsService-GQF7V6FB.js} +4 -5
  27. package/bundle/{dist-ANTOB3YW.js → dist-LZ5ASNAL.js} +1 -1
  28. package/bundle/docs/reference/configuration.md +7 -7
  29. package/bundle/{gemini-57EC2ZF7.js → gemini-LSLMD4HG.js} +12 -12
  30. package/bundle/{gemini-27FQ5BI4.js → gemini-TKPXJBGX.js} +175 -191
  31. package/bundle/{gemini-JAZVYRDD.js → gemini-YJTI2WQP.js} +12 -12
  32. package/bundle/gemini.js +3 -3
  33. package/bundle/{interactiveCli-E35R6QQC.js → interactiveCli-5YSP2IQI.js} +6 -6
  34. package/bundle/{interactiveCli-L3EK4XEX.js → interactiveCli-I56L63GE.js} +272 -290
  35. package/bundle/{interactiveCli-FPHSBRV3.js → interactiveCli-O3UYJUNT.js} +6 -6
  36. package/bundle/{liteRtServerManager-ORSW3R4F.js → liteRtServerManager-6INPACOA.js} +3 -3
  37. package/bundle/{liteRtServerManager-LXEAYAUP.js → liteRtServerManager-CIC7DD4U.js} +3 -3
  38. package/bundle/{liteRtServerManager-YYXO5Q3I.js → liteRtServerManager-XI56E5P3.js} +4 -4
  39. package/bundle/node_modules/@google/gemini-cli-devtools/package.json +1 -1
  40. package/bundle/{oauth2-provider-I3G773GE.js → oauth2-provider-HDKVDC2Q.js} +1 -1
  41. package/bundle/{oauth2-provider-B3NTBNAM.js → oauth2-provider-HUMYTY6K.js} +1 -1
  42. package/bundle/{oauth2-provider-ENF2D4Q7.js → oauth2-provider-VGGNG5XI.js} +73 -39
  43. package/bundle/{start-CRIFZ3SW.js → start-25VD33TV.js} +5 -5
  44. package/bundle/{start-S3REI3X2.js → start-U4YQCY2A.js} +6 -6
  45. package/bundle/{start-KVFKS3IT.js → start-VHURPYN7.js} +5 -5
  46. package/package.json +1 -1
  47. package/bundle/chunk-ATGIEBEB.js +0 -1571
  48. package/bundle/chunk-HF7X35D3.js +0 -80012
  49. package/bundle/chunk-LMVZLINC.js +0 -118
  50. package/bundle/chunk-LODNDE3S.js +0 -17505
  51. package/bundle/chunk-LVHUYMBU.js +0 -156
  52. package/bundle/chunk-RENFZ63F.js +0 -351149
  53. package/bundle/cleanup-DXHNV2J6.js +0 -33
  54. package/bundle/devtoolsService-YCRNWWXE.js +0 -852
  55. package/bundle/dist-UH565MTG.js +0 -2046
  56. package/bundle/gemini-TQZRS37Q.js +0 -16087
  57. package/bundle/interactiveCli-MVHR4VV7.js +0 -34448
  58. package/bundle/liteRtServerManager-PI4ZNFB5.js +0 -65
  59. package/bundle/oauth2-provider-WTF7AHQ2.js +0 -237
  60. package/bundle/start-OTLGMCNH.js +0 -18
@@ -1,156 +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
- isTelemetrySdkInitialized,
5
- resetBrowserSession,
6
- shutdownTelemetry
7
- } from "./chunk-CIO3GUGQ.js";
8
- import {
9
- Storage
10
- } from "./chunk-F73F75XM.js";
11
-
12
- // packages/cli/src/utils/cleanup.ts
13
- import { promises as fs } from "node:fs";
14
- import { join } from "node:path";
15
- var cleanupFunctions = [];
16
- var syncCleanupFunctions = [];
17
- var configForTelemetry = null;
18
- var isShuttingDown = false;
19
- function registerCleanup(fn) {
20
- cleanupFunctions.push(fn);
21
- }
22
- function removeCleanup(fn) {
23
- const index = cleanupFunctions.indexOf(fn);
24
- if (index !== -1) {
25
- cleanupFunctions.splice(index, 1);
26
- }
27
- }
28
- function registerSyncCleanup(fn) {
29
- syncCleanupFunctions.push(fn);
30
- }
31
- function removeSyncCleanup(fn) {
32
- const index = syncCleanupFunctions.indexOf(fn);
33
- if (index !== -1) {
34
- syncCleanupFunctions.splice(index, 1);
35
- }
36
- }
37
- function resetCleanupForTesting() {
38
- cleanupFunctions.length = 0;
39
- syncCleanupFunctions.length = 0;
40
- configForTelemetry = null;
41
- isShuttingDown = false;
42
- }
43
- function runSyncCleanup() {
44
- for (const fn of syncCleanupFunctions) {
45
- try {
46
- fn();
47
- } catch {
48
- }
49
- }
50
- syncCleanupFunctions.length = 0;
51
- }
52
- function registerTelemetryConfig(config) {
53
- configForTelemetry = config;
54
- }
55
- async function runExitCleanup() {
56
- await drainStdin();
57
- runSyncCleanup();
58
- for (const fn of cleanupFunctions) {
59
- try {
60
- await fn();
61
- } catch {
62
- }
63
- }
64
- cleanupFunctions.length = 0;
65
- try {
66
- await resetBrowserSession();
67
- } catch {
68
- }
69
- if (configForTelemetry) {
70
- try {
71
- await configForTelemetry.dispose();
72
- } catch {
73
- }
74
- }
75
- if (configForTelemetry && isTelemetrySdkInitialized()) {
76
- try {
77
- await shutdownTelemetry(configForTelemetry);
78
- } catch {
79
- }
80
- }
81
- }
82
- async function drainStdin() {
83
- if (!process.stdin?.isTTY) return;
84
- process.stdin.resume().removeAllListeners("data").on("data", () => {
85
- });
86
- await new Promise((resolve) => setTimeout(resolve, 50));
87
- }
88
- async function gracefulShutdown(_reason) {
89
- if (isShuttingDown) {
90
- return;
91
- }
92
- isShuttingDown = true;
93
- await runExitCleanup();
94
- process.exit(ExitCodes.SUCCESS);
95
- }
96
- function setupSignalHandlers() {
97
- process.on("SIGHUP", () => gracefulShutdown("SIGHUP"));
98
- process.on("SIGTERM", () => gracefulShutdown("SIGTERM"));
99
- process.on("SIGINT", () => gracefulShutdown("SIGINT"));
100
- }
101
- function setupTtyCheck() {
102
- let intervalId = null;
103
- let isCheckingTty = false;
104
- intervalId = setInterval(async () => {
105
- if (isCheckingTty || isShuttingDown) {
106
- return;
107
- }
108
- if (process.env["SANDBOX"]) {
109
- return;
110
- }
111
- if (!process.stdin.isTTY && !process.stdout.isTTY) {
112
- isCheckingTty = true;
113
- if (intervalId) {
114
- clearInterval(intervalId);
115
- intervalId = null;
116
- }
117
- await gracefulShutdown("TTY loss");
118
- }
119
- }, 5e3);
120
- intervalId.unref();
121
- return () => {
122
- if (intervalId) {
123
- clearInterval(intervalId);
124
- intervalId = null;
125
- }
126
- };
127
- }
128
- async function cleanupCheckpoints() {
129
- const storage = new Storage(process.cwd());
130
- await storage.initialize();
131
- const tempDir = storage.getProjectTempDir();
132
- const checkpointsDir = join(tempDir, "checkpoints");
133
- try {
134
- await fs.rm(checkpointsDir, { recursive: true, force: true });
135
- } catch {
136
- }
137
- }
138
-
139
- export {
140
- registerCleanup,
141
- removeCleanup,
142
- registerSyncCleanup,
143
- removeSyncCleanup,
144
- resetCleanupForTesting,
145
- runSyncCleanup,
146
- registerTelemetryConfig,
147
- runExitCleanup,
148
- setupSignalHandlers,
149
- setupTtyCheck,
150
- cleanupCheckpoints
151
- };
152
- /**
153
- * @license
154
- * Copyright 2025 Google LLC
155
- * SPDX-License-Identifier: Apache-2.0
156
- */