@google/gemini-cli 0.71.0-nightly.20261124.gaafdfdfb5 → 0.71.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 (76) hide show
  1. package/bundle/{chunk-YFNHROPZ.js → chunk-226R5C3B.js} +7 -40
  2. package/bundle/{chunk-AGSD6TCG.js → chunk-7CKWIN5G.js} +7 -7
  3. package/bundle/{chunk-DRIECEHM.js → chunk-AXBBOMHQ.js} +1 -1
  4. package/bundle/{chunk-VCGPM2FI.js → chunk-AYSLHXA4.js} +5 -12
  5. package/bundle/{chunk-S77ELOW4.js → chunk-DYLFWJSS.js} +1 -1
  6. package/bundle/{chunk-OKOAEJ5I.js → chunk-EKWALRKF.js} +15418 -8096
  7. package/bundle/{chunk-AJWHZBWZ.js → chunk-HF6ORJX7.js} +5 -12
  8. package/bundle/{chunk-OR77J7SA.js → chunk-HMO6GZYF.js} +9 -18
  9. package/bundle/{chunk-HTEFFFDQ.js → chunk-I7BKOSH3.js} +1 -1
  10. package/bundle/{chunk-WHSJKDVL.js → chunk-IWQOZRAT.js} +1 -1
  11. package/bundle/{chunk-YA4BFII4.js → chunk-JLAW7BA6.js} +1 -1
  12. package/bundle/{chunk-3HVCGWLE.js → chunk-JT7GL77Z.js} +1 -1
  13. package/bundle/{chunk-BZ5FSDRR.js → chunk-K767QEGB.js} +3 -3
  14. package/bundle/{chunk-3DMQRTF3.js → chunk-KYHTL3DC.js} +2 -2
  15. package/bundle/{chunk-MZIBUEBF.js → chunk-NFKOBXZH.js} +3 -3
  16. package/bundle/{chunk-DIMNI6AC.js → chunk-NNVHJBJY.js} +2 -2
  17. package/bundle/{chunk-JTWV2RYT.js → chunk-NVQIJ42N.js} +1 -1
  18. package/bundle/{chunk-UYXW53A5.js → chunk-QCSQIXGM.js} +8 -9
  19. package/bundle/{chunk-OT5HDWN7.js → chunk-SENWXNTO.js} +2 -2
  20. package/bundle/{chunk-XER4IQTC.js → chunk-SJAGJ77Z.js} +1 -1
  21. package/bundle/{chunk-TLQ4STKV.js → chunk-SLGLHOV2.js} +7 -7
  22. package/bundle/{chunk-SJKJH5QA.js → chunk-SXKZW3JE.js} +1 -1
  23. package/bundle/{chunk-HUJ3STFG.js → chunk-TB7QMWM2.js} +3 -3
  24. package/bundle/{chunk-CXCKAA7X.js → chunk-TRYE6AUM.js} +7 -35
  25. package/bundle/{chunk-T3JZW5UQ.js → chunk-WHN36NNK.js} +58 -71
  26. package/bundle/{chunk-IRVNAGCT.js → chunk-ZVHUCZP3.js} +1 -1
  27. package/bundle/{chunk-3HYEMESH.js → chunk-ZZJKFKG7.js} +1 -1
  28. package/bundle/{cleanup-A7CTJL7Z.js → cleanup-35H7WFOM.js} +2 -2
  29. package/bundle/{cleanup-HZHRK5GO.js → cleanup-HF6T3GQ6.js} +2 -2
  30. package/bundle/{cleanup-QWGDJK3S.js → cleanup-XECNNSOD.js} +2 -2
  31. package/bundle/{core-UF6OK2YN.js → core-74O6JBFD.js} +1 -1
  32. package/bundle/{dist-3B3LPZX5.js → core-PNHLJ262.js} +1 -1
  33. package/bundle/{devtoolsService-Q4IBIWY4.js → devtoolsService-43KC32ZN.js} +2 -2
  34. package/bundle/{devtoolsService-Q5HYPUU7.js → devtoolsService-E2R3RE2K.js} +2 -2
  35. package/bundle/{devtoolsService-XNGB5DAQ.js → devtoolsService-Y7BMPXKB.js} +3 -4
  36. package/bundle/{dist-O2WNU5JL.js → dist-PS73JTWM.js} +1 -1
  37. package/bundle/docs/changelogs/index.md +0 -23
  38. package/bundle/docs/changelogs/latest.md +110 -78
  39. package/bundle/{formatError-EPXVZRF4.js → formatError-6GUCXQAC.js} +2 -2
  40. package/bundle/{formatError-RZ6FNHFK.js → formatError-NEW4YLDY.js} +2 -2
  41. package/bundle/{formatError-XWW6LQFY.js → formatError-ZZYUJD6F.js} +2 -2
  42. package/bundle/{gemini-DQYZ2M5M.js → gemini-2HTL6LHD.js} +17 -18
  43. package/bundle/{gemini-ADD3CNLQ.js → gemini-CUUSRGL5.js} +17 -18
  44. package/bundle/{gemini-F4BYOGFK.js → gemini-LRATVZEI.js} +210 -227
  45. package/bundle/gemini.js +8 -8
  46. package/bundle/{interactiveCli-DBUWQW3L.js → interactiveCli-BTNJSUQE.js} +8 -8
  47. package/bundle/{interactiveCli-WR3WORG7.js → interactiveCli-EI6DXDED.js} +8 -8
  48. package/bundle/{interactiveCli-NVUAURHX.js → interactiveCli-NJEZNU22.js} +300 -319
  49. package/bundle/{liteRtServerManager-7JMYMQOE.js → liteRtServerManager-3ASA64JU.js} +4 -4
  50. package/bundle/{liteRtServerManager-BEHQ2LRW.js → liteRtServerManager-YWW2KXDB.js} +4 -4
  51. package/bundle/{liteRtServerManager-D247SBY4.js → liteRtServerManager-ZVBNBHNG.js} +4 -4
  52. package/bundle/{oauth2-provider-2JRAM5FI.js → oauth2-provider-2E2SN4NL.js} +1 -1
  53. package/bundle/{oauth2-provider-RAQB4WZV.js → oauth2-provider-CNHAHID7.js} +1 -1
  54. package/bundle/{oauth2-provider-2RZGLMFW.js → oauth2-provider-Y4FLXHNF.js} +79 -41
  55. package/bundle/{start-2XM3XTTW.js → start-3UMKH57P.js} +6 -6
  56. package/bundle/{start-4BURN4I2.js → start-I5FBIWR2.js} +6 -6
  57. package/bundle/{start-HKOWOXAN.js → start-PEGW57CI.js} +6 -6
  58. package/package.json +1 -1
  59. package/bundle/chunk-6GP7SK3F.js +0 -1571
  60. package/bundle/chunk-ME7E2KHV.js +0 -65
  61. package/bundle/chunk-MWO4GVYF.js +0 -190
  62. package/bundle/chunk-SXB2352W.js +0 -1962
  63. package/bundle/chunk-SZHRRWXK.js +0 -40031
  64. package/bundle/chunk-TIBJCQPU.js +0 -420386
  65. package/bundle/chunk-WS2FFQOK.js +0 -512
  66. package/bundle/chunk-XY4WHKUF.js +0 -118
  67. package/bundle/chunk-Y52IZU6D.js +0 -60338
  68. package/bundle/cleanup-ZAAJYUK2.js +0 -34
  69. package/bundle/devtoolsService-XIWA55RM.js +0 -919
  70. package/bundle/dist-QEVE76NU.js +0 -2372
  71. package/bundle/formatError-YLQB5WCI.js +0 -14
  72. package/bundle/gemini-M5L5KDE3.js +0 -20021
  73. package/bundle/interactiveCli-UUF5EPF5.js +0 -36447
  74. package/bundle/liteRtServerManager-TW3MMGOA.js +0 -65
  75. package/bundle/oauth2-provider-4UDPSMA6.js +0 -273
  76. package/bundle/start-KCXHIBOT.js +0 -18
@@ -1,65 +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
- normalizeError,
4
- safeSerializeErrorValue
5
- } from "./chunk-CXCKAA7X.js";
6
-
7
- // packages/cli/src/utils/formatError.ts
8
- function isCliDebugEnabled(argv = process.argv.slice(2), env = process.env) {
9
- if ([env["DEBUG"], env["DEBUG_MODE"]].some((v) => v === "true" || v === "1")) {
10
- return true;
11
- }
12
- for (const arg of argv) {
13
- if (arg === "--") {
14
- break;
15
- }
16
- if (arg === "--debug" || arg === "-d" || arg === "--debug=true" || arg === "--debug=1") {
17
- return true;
18
- }
19
- }
20
- return false;
21
- }
22
- function formatStatusSuffix(message, status) {
23
- const statusText = typeof status === "string" ? status.trim() : status !== void 0 ? String(status) : "";
24
- if (!statusText) {
25
- return "";
26
- }
27
- if (message.toLowerCase().includes(statusText.toLowerCase())) {
28
- return "";
29
- }
30
- return ` (Status: ${statusText})`;
31
- }
32
- function formatCliError(error, options = {}) {
33
- const normalized = normalizeError(error);
34
- const prefix = options.prefix ?? "Error: ";
35
- const statusSuffix = formatStatusSuffix(
36
- normalized.message,
37
- normalized.status
38
- );
39
- if (options.debug) {
40
- if (error instanceof Error && error.stack) {
41
- const stackStartsWithError = error.stack.startsWith("Error: ") || error.name.endsWith("Error") && error.stack.startsWith(`${error.name}: `);
42
- const stackPrefix = prefix === "Error: " && stackStartsWithError ? "" : prefix;
43
- let debugOutput = error.stack.includes(normalized.message) && !statusSuffix ? `${stackPrefix}${error.stack}` : `${prefix}${normalized.message}${statusSuffix}
44
- ${error.stack}`;
45
- if (normalized.details !== void 0) {
46
- debugOutput += `
47
- Debug Details: ${safeSerializeErrorValue(normalized.details, 2)}`;
48
- }
49
- return debugOutput;
50
- }
51
- return `${prefix}${normalized.message}${statusSuffix}
52
- Debug Context: ${safeSerializeErrorValue(normalized.originalError, 2)}`;
53
- }
54
- return `${prefix}${normalized.message}${statusSuffix}`;
55
- }
56
-
57
- export {
58
- isCliDebugEnabled,
59
- formatCliError
60
- };
61
- /**
62
- * @license
63
- * Copyright 2026 Google LLC
64
- * SPDX-License-Identifier: Apache-2.0
65
- */
@@ -1,190 +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
- ShellExecutionService,
5
- Storage,
6
- isTelemetrySdkInitialized,
7
- resetBrowserSession,
8
- shutdownTelemetry
9
- } from "./chunk-OKOAEJ5I.js";
10
-
11
- // packages/cli/src/utils/cleanup.ts
12
- import { promises as fs } from "node:fs";
13
- import { join } from "node:path";
14
- var cleanupFunctions = [];
15
- var syncCleanupFunctions = [];
16
- var configForTelemetry = null;
17
- var isShuttingDown = false;
18
- var CleanupState = /* @__PURE__ */ ((CleanupState2) => {
19
- CleanupState2["IDLE"] = "IDLE";
20
- CleanupState2["RUNNING"] = "RUNNING";
21
- CleanupState2["COMPLETED"] = "COMPLETED";
22
- return CleanupState2;
23
- })(CleanupState || {});
24
- var cleanupState = "IDLE" /* IDLE */;
25
- var cleanupPromise = null;
26
- function registerCleanup(fn) {
27
- cleanupFunctions.push(fn);
28
- }
29
- function removeCleanup(fn) {
30
- const index = cleanupFunctions.indexOf(fn);
31
- if (index !== -1) {
32
- cleanupFunctions.splice(index, 1);
33
- }
34
- }
35
- function registerSyncCleanup(fn) {
36
- syncCleanupFunctions.push(fn);
37
- }
38
- function removeSyncCleanup(fn) {
39
- const index = syncCleanupFunctions.indexOf(fn);
40
- if (index !== -1) {
41
- syncCleanupFunctions.splice(index, 1);
42
- }
43
- }
44
- function resetCleanupForTesting() {
45
- cleanupFunctions.length = 0;
46
- syncCleanupFunctions.length = 0;
47
- configForTelemetry = null;
48
- isShuttingDown = false;
49
- cleanupState = "IDLE" /* IDLE */;
50
- cleanupPromise = null;
51
- }
52
- function runSyncCleanup() {
53
- for (const fn of syncCleanupFunctions) {
54
- try {
55
- fn();
56
- } catch {
57
- }
58
- }
59
- syncCleanupFunctions.length = 0;
60
- }
61
- function registerTelemetryConfig(config) {
62
- configForTelemetry = config;
63
- }
64
- async function runExitCleanup() {
65
- if (cleanupState === "COMPLETED" /* COMPLETED */) {
66
- return;
67
- }
68
- if (cleanupState === "RUNNING" /* RUNNING */ && cleanupPromise) {
69
- await cleanupPromise;
70
- return;
71
- }
72
- cleanupState = "RUNNING" /* RUNNING */;
73
- cleanupPromise = (async () => {
74
- try {
75
- try {
76
- await drainStdin();
77
- } catch {
78
- }
79
- runSyncCleanup();
80
- for (const fn of cleanupFunctions) {
81
- try {
82
- await fn();
83
- } catch {
84
- }
85
- }
86
- cleanupFunctions.length = 0;
87
- try {
88
- await resetBrowserSession();
89
- } catch {
90
- }
91
- try {
92
- await ShellExecutionService.cleanupAllActiveProcesses();
93
- } catch {
94
- }
95
- if (configForTelemetry) {
96
- try {
97
- await configForTelemetry.dispose();
98
- } catch {
99
- }
100
- }
101
- if (configForTelemetry && isTelemetrySdkInitialized()) {
102
- try {
103
- await shutdownTelemetry(configForTelemetry);
104
- } catch {
105
- }
106
- }
107
- } finally {
108
- cleanupState = "COMPLETED" /* COMPLETED */;
109
- cleanupPromise = null;
110
- }
111
- })();
112
- await cleanupPromise;
113
- }
114
- async function drainStdin() {
115
- if (!process.stdin?.isTTY) return;
116
- process.stdin.resume().removeAllListeners("data").on("data", () => {
117
- });
118
- await new Promise((resolve) => setTimeout(resolve, 50));
119
- }
120
- async function gracefulShutdown(reason) {
121
- if (isShuttingDown) {
122
- return;
123
- }
124
- isShuttingDown = true;
125
- await runExitCleanup();
126
- const exitCode = reason === "SIGINT" ? 130 : reason === "SIGTERM" ? 143 : reason === "SIGHUP" ? 129 : ExitCodes.SUCCESS;
127
- process.exit(exitCode);
128
- }
129
- function setupSignalHandlers() {
130
- process.on("SIGHUP", () => gracefulShutdown("SIGHUP"));
131
- process.on("SIGTERM", () => gracefulShutdown("SIGTERM"));
132
- process.on("SIGINT", () => gracefulShutdown("SIGINT"));
133
- }
134
- function setupTtyCheck() {
135
- let intervalId = null;
136
- let isCheckingTty = false;
137
- intervalId = setInterval(async () => {
138
- if (isCheckingTty || isShuttingDown) {
139
- return;
140
- }
141
- if (process.env["SANDBOX"]) {
142
- return;
143
- }
144
- if (!process.stdin.isTTY && !process.stdout.isTTY) {
145
- isCheckingTty = true;
146
- if (intervalId) {
147
- clearInterval(intervalId);
148
- intervalId = null;
149
- }
150
- await gracefulShutdown("TTY loss");
151
- }
152
- }, 5e3);
153
- intervalId.unref();
154
- return () => {
155
- if (intervalId) {
156
- clearInterval(intervalId);
157
- intervalId = null;
158
- }
159
- };
160
- }
161
- async function cleanupCheckpoints() {
162
- const storage = new Storage(process.cwd());
163
- await storage.initialize();
164
- const tempDir = storage.getProjectTempDir();
165
- const checkpointsDir = join(tempDir, "checkpoints");
166
- try {
167
- await fs.rm(checkpointsDir, { recursive: true, force: true });
168
- } catch {
169
- }
170
- }
171
-
172
- export {
173
- CleanupState,
174
- registerCleanup,
175
- removeCleanup,
176
- registerSyncCleanup,
177
- removeSyncCleanup,
178
- resetCleanupForTesting,
179
- runSyncCleanup,
180
- registerTelemetryConfig,
181
- runExitCleanup,
182
- setupSignalHandlers,
183
- setupTtyCheck,
184
- cleanupCheckpoints
185
- };
186
- /**
187
- * @license
188
- * Copyright 2025 Google LLC
189
- * SPDX-License-Identifier: Apache-2.0
190
- */