@google/gemini-cli 0.42.0-preview.2 → 0.42.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 (67) hide show
  1. package/bundle/{chunk-6QBZKEWW.js → chunk-3IS7GD6D.js} +2 -2
  2. package/bundle/{chunk-OFOKTVUH.js → chunk-4SLGT6YD.js} +1 -1
  3. package/bundle/{chunk-OP6THN3K.js → chunk-7C6GGDK6.js} +2 -2
  4. package/bundle/{chunk-77HSANAH.js → chunk-7VVHSNDQ.js} +4 -4
  5. package/bundle/{chunk-S3WIE72K.js → chunk-BCYBA52D.js} +1 -1
  6. package/bundle/{chunk-2KRAWFEQ.js → chunk-CHERUG6W.js} +7 -7
  7. package/bundle/{chunk-AAU5XCLJ.js → chunk-COKAF5GM.js} +1 -1
  8. package/bundle/{chunk-SJ6AOVZF.js → chunk-COQP2M4D.js} +54 -67
  9. package/bundle/{chunk-QM234EIA.js → chunk-CYEIWMZJ.js} +1 -1
  10. package/bundle/{chunk-WOGMVEEF.js → chunk-DMWX7UP6.js} +4 -4
  11. package/bundle/{chunk-E54WEGH3.js → chunk-DN4XSYRG.js} +12729 -6831
  12. package/bundle/{chunk-BLNG7CSO.js → chunk-EDKX67D6.js} +1 -1
  13. package/bundle/{chunk-LHVIO4J4.js → chunk-FCAODPNO.js} +7 -7
  14. package/bundle/{chunk-LYMYMKWM.js → chunk-G2VTSEZ6.js} +1 -1
  15. package/bundle/{chunk-M6ZQAQKH.js → chunk-GA527JB7.js} +1 -1
  16. package/bundle/{chunk-4NXNVHPO.js → chunk-I7AME6VC.js} +8 -9
  17. package/bundle/{chunk-Q24MYLMP.js → chunk-KVEAHIIV.js} +3 -3
  18. package/bundle/{chunk-DEKZKOVU.js → chunk-LATVEETM.js} +1 -1
  19. package/bundle/{chunk-JW36FWGZ.js → chunk-NTOPH4WG.js} +2 -2
  20. package/bundle/{chunk-THNM4JU6.js → chunk-PUDLNWHE.js} +2 -2
  21. package/bundle/{chunk-FIIOJPLW.js → chunk-QOZSZYL7.js} +2 -2
  22. package/bundle/{chunk-R7BHIYZD.js → chunk-WIXUKOZA.js} +1 -1
  23. package/bundle/{chunk-I6IY72IP.js → chunk-XUMRUXOT.js} +6 -9
  24. package/bundle/{chunk-ODIOD5TJ.js → chunk-ZNMQA242.js} +3 -3
  25. package/bundle/{cleanup-G7DNOS4V.js → cleanup-3RILFNVM.js} +2 -2
  26. package/bundle/{cleanup-GZM5KIZA.js → cleanup-SVRKYBR6.js} +3 -3
  27. package/bundle/{cleanup-5FPOUEHR.js → cleanup-XFVHHDVO.js} +2 -2
  28. package/bundle/{core-IYSSLWMM.js → core-B5S6HZJT.js} +1 -1
  29. package/bundle/{dist-GF2RNVWZ.js → core-FRVSDP2C.js} +2 -2
  30. package/bundle/{devtoolsService-UADEEKOH.js → devtoolsService-RUEO5PGP.js} +2 -2
  31. package/bundle/{devtoolsService-7ZN7CSSO.js → devtoolsService-TRDGMQLJ.js} +4 -5
  32. package/bundle/{devtoolsService-3XOQOECV.js → devtoolsService-VM2WTHBX.js} +2 -2
  33. package/bundle/{dist-D7FZVGG3.js → dist-6BN2CJPN.js} +1 -1
  34. package/bundle/{gemini-IRKIMLB4.js → gemini-GHUELHBF.js} +14 -14
  35. package/bundle/{gemini-IMX43TZ4.js → gemini-NQPVX5JC.js} +186 -200
  36. package/bundle/{gemini-MWN2MSYV.js → gemini-QSTQ2DBG.js} +14 -14
  37. package/bundle/gemini.js +7 -7
  38. package/bundle/{interactiveCli-752P4PTI.js → interactiveCli-453M2IVE.js} +8 -8
  39. package/bundle/{interactiveCli-37SKHAKX.js → interactiveCli-AG2YWL2O.js} +8 -8
  40. package/bundle/{interactiveCli-VX6GBWOV.js → interactiveCli-MZFG35NB.js} +276 -294
  41. package/bundle/{liteRtServerManager-OWPZ35U6.js → liteRtServerManager-BXQ6VVWP.js} +4 -4
  42. package/bundle/{liteRtServerManager-FPYU5KEK.js → liteRtServerManager-G4Q7OVBX.js} +4 -4
  43. package/bundle/{liteRtServerManager-CDLVKT7N.js → liteRtServerManager-S7WL25VD.js} +5 -5
  44. package/bundle/node_modules/@google/gemini-cli-devtools/package.json +1 -1
  45. package/bundle/{oauth2-provider-RQNNLGWV.js → oauth2-provider-5UF5WEE2.js} +1 -1
  46. package/bundle/{oauth2-provider-6W4IY3LC.js → oauth2-provider-H7G6RSFW.js} +1 -1
  47. package/bundle/{oauth2-provider-446FDCUW.js → oauth2-provider-VR4DL6AL.js} +73 -39
  48. package/bundle/{start-KUNHDGRA.js → start-2SKRN43X.js} +6 -6
  49. package/bundle/{start-TZXEJLTH.js → start-CQBSKFYB.js} +7 -7
  50. package/bundle/{start-6U3XBAVH.js → start-NIMXQJYB.js} +6 -6
  51. package/package.json +1 -1
  52. package/bundle/chunk-76KOJPMV.js +0 -391
  53. package/bundle/chunk-RO2XVFEU.js +0 -512
  54. package/bundle/chunk-WFKT4UTI.js +0 -118
  55. package/bundle/chunk-WLPWIJ3Y.js +0 -81544
  56. package/bundle/chunk-WRDVEMWE.js +0 -1571
  57. package/bundle/chunk-YDC4M26X.js +0 -156
  58. package/bundle/chunk-ZDP2ZWKG.js +0 -17230
  59. package/bundle/chunk-ZFOGBX2H.js +0 -356008
  60. package/bundle/cleanup-J6AUEKWI.js +0 -33
  61. package/bundle/devtoolsService-KTUMQHXG.js +0 -857
  62. package/bundle/dist-HBMVDPXB.js +0 -2096
  63. package/bundle/gemini-SYFUC6XO.js +0 -16256
  64. package/bundle/interactiveCli-SAMKYHUU.js +0 -34505
  65. package/bundle/liteRtServerManager-OWTQEYE6.js +0 -66
  66. package/bundle/oauth2-provider-TITPL3DN.js +0 -237
  67. package/bundle/start-TTLMBKNX.js +0 -19
@@ -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-ZFOGBX2H.js";
8
- import {
9
- Storage
10
- } from "./chunk-JEW7ZIWE.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
- */