@google/gemini-cli 0.41.0-preview.0 → 0.41.0-preview.2
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.
- package/bundle/{chunk-EOA2HX63.js → chunk-2E4E2OEF.js} +2 -2
- package/bundle/{chunk-YBG43HPA.js → chunk-2YV27CKR.js} +1 -1
- package/bundle/{chunk-NQUBPNAU.js → chunk-3GHJ5HPF.js} +6 -6
- package/bundle/{chunk-IEYJEBJX.js → chunk-3Q7BP33C.js} +67 -54
- package/bundle/{chunk-3ANRVMZF.js → chunk-4GYMEM7F.js} +2 -2
- package/bundle/{chunk-LAT5YFL4.js → chunk-6P6WKPYI.js} +2 -2
- package/bundle/{chunk-HR7I3HEY.js → chunk-7CD6GCRT.js} +1 -1
- package/bundle/{chunk-PXLG652S.js → chunk-ANBD6P4M.js} +97 -49
- package/bundle/{chunk-WSDOIL74.js → chunk-BDZNOCWJ.js} +74 -39
- package/bundle/{chunk-JC6VKC3C.js → chunk-BYSXGJG3.js} +1 -1
- package/bundle/chunk-FQGCL5I2.js +80034 -0
- package/bundle/{chunk-MVAX27IS.js → chunk-FZXNSS2J.js} +3 -3
- package/bundle/chunk-HOQYVHXU.js +118 -0
- package/bundle/{chunk-WROAWEH3.js → chunk-L35AXZHM.js} +6728 -12460
- package/bundle/chunk-LBPROGQS.js +156 -0
- package/bundle/{chunk-MJJLAQ6U.js → chunk-ODPEYGXR.js} +1 -1
- package/bundle/{chunk-42DYHGPE.js → chunk-OR5JBPQX.js} +1 -1
- package/bundle/{chunk-WYBLOXVK.js → chunk-RYFTYJ75.js} +1 -1
- package/bundle/{chunk-X2LHBPEJ.js → chunk-S4SLTOZU.js} +14 -12
- package/bundle/chunk-SR4PMLVP.js +354496 -0
- package/bundle/{chunk-BKZ2ONXI.js → chunk-V2QQW5SA.js} +1 -1
- package/bundle/chunk-VHJM22NK.js +1571 -0
- package/bundle/chunk-XBNSSOYA.js +17656 -0
- package/bundle/{chunk-FZCJQ7YB.js → chunk-ZHHJJC4N.js} +6 -6
- package/bundle/{cleanup-UES5UWIG.js → cleanup-2BMR4MMJ.js} +2 -2
- package/bundle/{cleanup-Z4RYESBA.js → cleanup-FHOD65Y6.js} +3 -3
- package/bundle/{cleanup-KLFDN77S.js → cleanup-HRWHMMWM.js} +2 -2
- package/bundle/cleanup-TCNEYDWT.js +33 -0
- package/bundle/{core-Q32MZ3QF.js → core-TKDA7N4G.js} +1 -1
- package/bundle/{devtoolsService-ZDMUH5GA.js → devtoolsService-6EOO2BQ7.js} +2 -2
- package/bundle/{devtoolsService-N3SEUDJ7.js → devtoolsService-7LCCYOTU.js} +5 -4
- package/bundle/devtoolsService-EFVBXKEX.js +857 -0
- package/bundle/{devtoolsService-P5BXPJX5.js → devtoolsService-V2NU6TJG.js} +2 -2
- package/bundle/{dist-UL5N47TA.js → dist-KFV2ASJV.js} +1 -1
- package/bundle/{core-3W43VO4W.js → dist-PGH3GHGN.js} +2 -2
- package/bundle/dist-VXU5NT6O.js +2068 -0
- package/bundle/{gemini-PL45Y473.js → gemini-FLUMXCL4.js} +12 -12
- package/bundle/{gemini-K6LJN552.js → gemini-GNABGJLN.js} +12 -12
- package/bundle/{gemini-DGVTFOIS.js → gemini-V7YPSW3T.js} +191 -175
- package/bundle/gemini-YG4MES4L.js +15988 -0
- package/bundle/gemini.js +3 -3
- package/bundle/{interactiveCli-O7Y36MPM.js → interactiveCli-JNHY7R4J.js} +6 -6
- package/bundle/{interactiveCli-JL5IXH2I.js → interactiveCli-MD3WNLOS.js} +290 -272
- package/bundle/{interactiveCli-ZJGQKU2Z.js → interactiveCli-VP7SGM2Z.js} +6 -6
- package/bundle/interactiveCli-ZWNNSDPF.js +35052 -0
- package/bundle/{liteRtServerManager-QGTT3QOY.js → liteRtServerManager-4OYQKJDU.js} +3 -3
- package/bundle/{liteRtServerManager-2LAXDWUG.js → liteRtServerManager-D3KQXYD2.js} +4 -4
- package/bundle/liteRtServerManager-ONE7YJHO.js +65 -0
- package/bundle/{liteRtServerManager-YCLQ2VZR.js → liteRtServerManager-OYB4D65F.js} +3 -3
- package/bundle/node_modules/@google/gemini-cli-devtools/package.json +1 -1
- package/bundle/{oauth2-provider-ZUEDS4RO.js → oauth2-provider-BT67SZ33.js} +1 -1
- package/bundle/{oauth2-provider-RR3PO6KR.js → oauth2-provider-KNDXPBH3.js} +39 -73
- package/bundle/{oauth2-provider-Q5QVFX4W.js → oauth2-provider-LDPCE34C.js} +1 -1
- package/bundle/oauth2-provider-RGOB2KSE.js +237 -0
- package/bundle/{start-V4W5V2EL.js → start-3OOWLPJZ.js} +5 -5
- package/bundle/{start-P6O7G2IY.js → start-6T3XMMID.js} +5 -5
- package/bundle/{start-6ZXD64J4.js → start-LNWEO65C.js} +6 -6
- package/bundle/start-U3FP4KVT.js +18 -0
- package/package.json +1 -1
|
@@ -0,0 +1,156 @@
|
|
|
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-SR4PMLVP.js";
|
|
8
|
+
import {
|
|
9
|
+
Storage
|
|
10
|
+
} from "./chunk-SAJ72M2G.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
|
+
*/
|
|
@@ -1,7 +1,7 @@
|
|
|
1
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
2
|
import {
|
|
3
3
|
runExitCleanup
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-LBPROGQS.js";
|
|
5
5
|
import {
|
|
6
6
|
__commonJS,
|
|
7
7
|
__require
|
|
@@ -1,7 +1,7 @@
|
|
|
1
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
2
|
import {
|
|
3
3
|
runExitCleanup
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-BYSXGJG3.js";
|
|
5
5
|
import {
|
|
6
6
|
__commonJS,
|
|
7
7
|
__require
|
|
@@ -1,6 +1,7 @@
|
|
|
1
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
2
|
import {
|
|
3
3
|
AuthProviderType,
|
|
4
|
+
CoreToolCallStatus,
|
|
4
5
|
DEFAULT_MODEL_CONFIGS,
|
|
5
6
|
DEFAULT_TRUNCATE_TOOL_OUTPUT_THRESHOLD,
|
|
6
7
|
SESSION_FILE_PREFIX,
|
|
@@ -20,8 +21,9 @@ import {
|
|
|
20
21
|
require_strip_json_comments,
|
|
21
22
|
sanitizeFilenamePart,
|
|
22
23
|
stripAnsi
|
|
23
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-BDZNOCWJ.js";
|
|
24
25
|
import {
|
|
26
|
+
CoreEvent,
|
|
25
27
|
FatalConfigError,
|
|
26
28
|
GEMINI_DIR,
|
|
27
29
|
Storage,
|
|
@@ -30,7 +32,7 @@ import {
|
|
|
30
32
|
external_exports,
|
|
31
33
|
getErrorMessage,
|
|
32
34
|
homedir
|
|
33
|
-
} from "./chunk-
|
|
35
|
+
} from "./chunk-SAJ72M2G.js";
|
|
34
36
|
import {
|
|
35
37
|
__commonJS,
|
|
36
38
|
__require,
|
|
@@ -10064,19 +10066,19 @@ function isWorkspaceTrusted(settings, workspaceDir = process.cwd(), headlessOpti
|
|
|
10064
10066
|
var import_react = __toESM(require_react(), 1);
|
|
10065
10067
|
function mapCoreStatusToDisplayStatus(coreStatus) {
|
|
10066
10068
|
switch (coreStatus) {
|
|
10067
|
-
case
|
|
10069
|
+
case CoreToolCallStatus.Validating:
|
|
10068
10070
|
return "Pending" /* Pending */;
|
|
10069
|
-
case
|
|
10071
|
+
case CoreToolCallStatus.AwaitingApproval:
|
|
10070
10072
|
return "Confirming" /* Confirming */;
|
|
10071
|
-
case
|
|
10073
|
+
case CoreToolCallStatus.Executing:
|
|
10072
10074
|
return "Executing" /* Executing */;
|
|
10073
|
-
case
|
|
10075
|
+
case CoreToolCallStatus.Success:
|
|
10074
10076
|
return "Success" /* Success */;
|
|
10075
|
-
case
|
|
10077
|
+
case CoreToolCallStatus.Cancelled:
|
|
10076
10078
|
return "Canceled" /* Canceled */;
|
|
10077
|
-
case
|
|
10079
|
+
case CoreToolCallStatus.Error:
|
|
10078
10080
|
return "Error" /* Error */;
|
|
10079
|
-
case
|
|
10081
|
+
case CoreToolCallStatus.Scheduled:
|
|
10080
10082
|
return "Pending" /* Pending */;
|
|
10081
10083
|
default:
|
|
10082
10084
|
return checkExhaustive(coreStatus);
|
|
@@ -10683,7 +10685,7 @@ function convertSessionToHistoryFormats(messages) {
|
|
|
10683
10685
|
args: tool.args,
|
|
10684
10686
|
description: tool.description || "",
|
|
10685
10687
|
renderOutputAsMarkdown: tool.renderOutputAsMarkdown ?? true,
|
|
10686
|
-
status: tool.status === "success" ?
|
|
10688
|
+
status: tool.status === "success" ? CoreToolCallStatus.Success : CoreToolCallStatus.Error,
|
|
10687
10689
|
resultDisplay: tool.resultDisplay,
|
|
10688
10690
|
confirmationDetails: void 0
|
|
10689
10691
|
}))
|
|
@@ -16664,8 +16666,8 @@ var LoadedSettings = class {
|
|
|
16664
16666
|
// React will pass a listener fn into this subscribe fn
|
|
16665
16667
|
// that listener fn will perform an object identity check on the snapshot and trigger a React re render if the snapshot has changed
|
|
16666
16668
|
subscribe(listener) {
|
|
16667
|
-
coreEvents.on(
|
|
16668
|
-
return () => coreEvents.off(
|
|
16669
|
+
coreEvents.on(CoreEvent.SettingsChanged, listener);
|
|
16670
|
+
return () => coreEvents.off(CoreEvent.SettingsChanged, listener);
|
|
16669
16671
|
}
|
|
16670
16672
|
getSnapshot() {
|
|
16671
16673
|
return this._snapshot;
|