@google/gemini-cli 0.65.0-preview.0 → 0.66.0-nightly.20261017.ged96faedf

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 (75) hide show
  1. package/README.md +21 -56
  2. package/bundle/{chunk-NL7ZHGCH.js → chunk-464WBVYM.js} +1 -1
  3. package/bundle/{chunk-QJK54DSE.js → chunk-5VQUE3OF.js} +1 -1
  4. package/bundle/{chunk-VF5WQSOE.js → chunk-7ARQMEMX.js} +1 -1
  5. package/bundle/{chunk-2WVLIJA5.js → chunk-BUG4N6U5.js} +145 -77
  6. package/bundle/{chunk-F6AJM4WN.js → chunk-DPV3ZEOC.js} +3 -3
  7. package/bundle/{chunk-GSQEBEGC.js → chunk-ERBSM2HU.js} +3 -3
  8. package/bundle/{chunk-WTRK3NVX.js → chunk-GEUFOF2X.js} +106 -1500
  9. package/bundle/{chunk-V2R74WAG.js → chunk-H4U2CWBQ.js} +151 -81
  10. package/bundle/chunk-HDP6V6JI.js +1956 -0
  11. package/bundle/{chunk-RPHDSDL6.js → chunk-IDCWFZU3.js} +1 -1
  12. package/bundle/{chunk-SN7QZKXC.js → chunk-IGOTAEJY.js} +170 -1551
  13. package/bundle/chunk-J5QPCO3J.js +101859 -0
  14. package/bundle/{chunk-H2CZXS7F.js → chunk-JY3DYBJT.js} +1 -1
  15. package/bundle/{chunk-HLOOE7YN.js → chunk-LDGJJCVW.js} +9 -8
  16. package/bundle/chunk-MH4KAY5W.js +512 -0
  17. package/bundle/{chunk-LLE5Z636.js → chunk-NAPT3FAL.js} +106 -1500
  18. package/bundle/chunk-NOSWGXRT.js +1956 -0
  19. package/bundle/{chunk-43EXRO7A.js → chunk-NU74STQ5.js} +145 -77
  20. package/bundle/{chunk-K7NOVQ6G.js → chunk-QCWGLPCO.js} +376 -231
  21. package/bundle/{chunk-WGL5FJOS.js → chunk-QF3ALSJN.js} +3 -3
  22. package/bundle/{chunk-K4G5D5ZZ.js → chunk-R4KPURFC.js} +1 -1
  23. package/bundle/chunk-R6XDLHLP.js +1956 -0
  24. package/bundle/chunk-R7UPATQC.js +1956 -0
  25. package/bundle/chunk-RACMC24X.js +118 -0
  26. package/bundle/{chunk-4JGVVJGK.js → chunk-RE4V6I3G.js} +1 -1
  27. package/bundle/{chunk-S7BCRBI4.js → chunk-UTTFPWGQ.js} +1 -1
  28. package/bundle/chunk-VXYA6LA4.js +1571 -0
  29. package/bundle/chunk-XY2QSBID.js +17603 -0
  30. package/bundle/{chunk-K7AA35SP.js → chunk-YOI4DS3V.js} +365 -230
  31. package/bundle/chunk-YP27UYI4.js +154 -0
  32. package/bundle/{chunk-TP236FKO.js → chunk-YPLMNSM4.js} +8243 -15166
  33. package/bundle/chunk-ZFQ347ZN.js +402181 -0
  34. package/bundle/{cleanup-HPADDONA.js → cleanup-6FAZDCL3.js} +2 -2
  35. package/bundle/{cleanup-JOMSXKMP.js → cleanup-GNZLZG55.js} +2 -2
  36. package/bundle/{cleanup-LYRJHMMO.js → cleanup-RX3AC5ET.js} +2 -2
  37. package/bundle/cleanup-WAU2KYGS.js +32 -0
  38. package/bundle/{core-NCJTYARO.js → core-AGGXDQOT.js} +13 -1
  39. package/bundle/{devtoolsService-WP2OPVPB.js → devtoolsService-6XOCGTLC.js} +2 -2
  40. package/bundle/{devtoolsService-JFJBTZ4B.js → devtoolsService-FBTSVQ57.js} +4 -3
  41. package/bundle/{devtoolsService-HIZA3JGR.js → devtoolsService-UO6ZB72B.js} +2 -2
  42. package/bundle/devtoolsService-W5QGZ3SW.js +4359 -0
  43. package/bundle/{dist-GQKLLBDW.js → dist-2ELAEESC.js} +13 -1
  44. package/bundle/{core-IVQAI4S6.js → dist-2R7C2WHA.js} +13 -1
  45. package/bundle/dist-PALH7PJS.js +2280 -0
  46. package/bundle/docs/changelogs/index.md +22 -0
  47. package/bundle/docs/changelogs/latest.md +64 -54
  48. package/bundle/docs/changelogs/preview.md +91 -55
  49. package/bundle/docs/reference/configuration.md +8 -3
  50. package/bundle/docs/reference/keyboard-shortcuts.md +18 -4
  51. package/bundle/{gemini-5TUKZVGS.js → gemini-6MH55Y7F.js} +37 -18
  52. package/bundle/{gemini-7CHJYSHM.js → gemini-DOXUDJDY.js} +37 -18
  53. package/bundle/{gemini-546WMAHG.js → gemini-OHYXI52N.js} +237 -202
  54. package/bundle/gemini-OUEDCH4P.js +17970 -0
  55. package/bundle/gemini.js +14 -15
  56. package/bundle/{interactiveCli-E3PUPYMZ.js → interactiveCli-7LIKGDTJ.js} +1061 -989
  57. package/bundle/{interactiveCli-5XIAIY74.js → interactiveCli-EGQYN3KR.js} +1371 -1280
  58. package/bundle/{interactiveCli-L4PK7YY3.js → interactiveCli-TG7PGV4V.js} +1061 -989
  59. package/bundle/interactiveCli-YEXCUIFZ.js +35601 -0
  60. package/bundle/{liteRtServerManager-JCTYJBV5.js → liteRtServerManager-KAPXZ3EU.js} +4 -4
  61. package/bundle/{liteRtServerManager-JERG6KYC.js → liteRtServerManager-MSJIWMWP.js} +4 -4
  62. package/bundle/{liteRtServerManager-22ISMNN2.js → liteRtServerManager-PD2N3GLD.js} +4 -4
  63. package/bundle/liteRtServerManager-X5SCFYXM.js +65 -0
  64. package/bundle/{oauth2-provider-XRUER2XR.js → oauth2-provider-IUN6Z4IO.js} +1 -1
  65. package/bundle/{oauth2-provider-477UJQX6.js → oauth2-provider-MKJIQNWP.js} +41 -79
  66. package/bundle/{oauth2-provider-MKWWBW4K.js → oauth2-provider-RMF7U2UN.js} +1 -1
  67. package/bundle/oauth2-provider-ZM5GWCNX.js +273 -0
  68. package/bundle/{start-MVIPJNQ5.js → start-5GIUIER3.js} +6 -6
  69. package/bundle/{start-RZWSVT55.js → start-APIVGXZ3.js} +6 -6
  70. package/bundle/{start-AGMBPY3O.js → start-GJ4TH4KZ.js} +6 -6
  71. package/bundle/start-WDS52ZNE.js +18 -0
  72. package/package.json +1 -1
  73. package/bundle/chunk-4DCA4L53.js +0 -425
  74. package/bundle/chunk-BFIV7GTA.js +0 -425
  75. package/bundle/chunk-V72FRESD.js +0 -425
@@ -0,0 +1,154 @@
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-QCWGLPCO.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
+ */