@google/gemini-cli 0.37.0 → 0.37.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-LP2WYGS4.js → chunk-4UMQLF27.js} +4 -4
- package/bundle/{chunk-2LDNSLWJ.js → chunk-6JWICRU7.js} +4 -4
- package/bundle/{chunk-4FL34AF3.js → chunk-FAE26AOD.js} +4 -4
- package/bundle/{chunk-JCJR4TJP.js → chunk-FNPZEX27.js} +4 -4
- package/bundle/{chunk-HPS5HLVY.js → chunk-MUTEY5LE.js} +5867 -11023
- package/bundle/chunk-PE2NGK4O.js +356418 -0
- package/bundle/{chunk-ZYD45INQ.js → chunk-XDYYZLVW.js} +72 -60
- package/bundle/chunk-ZCQAWKMD.js +98376 -0
- package/bundle/{core-7MVFLCVM.js → core-2SK7SRNF.js} +1 -1
- package/bundle/{devtoolsService-QN6DTOQ4.js → devtoolsService-7WYJNYOV.js} +2 -2
- package/bundle/{devtoolsService-QPXA3DYV.js → devtoolsService-FWKCOXYX.js} +5 -4
- package/bundle/devtoolsService-URDW7HBF.js +871 -0
- package/bundle/{devtoolsService-QQAGVUAL.js → devtoolsService-Y5A3EDJE.js} +2 -2
- package/bundle/{dist-OPAGMUAE.js → dist-GLIAC2IL.js} +1 -1
- package/bundle/{core-IAVFIQIJ.js → dist-TS22EKCG.js} +2 -2
- package/bundle/dist-Z2S5IB4B.js +1942 -0
- package/bundle/gemini.js +89 -7
- package/bundle/{interactiveCli-QUKUV3RI.js → interactiveCli-GCAC6FV6.js} +5 -5
- package/bundle/{interactiveCli-UE3SKHMT.js → interactiveCli-GX2NUXEE.js} +266 -249
- package/bundle/{interactiveCli-3PZKICTV.js → interactiveCli-IJTLUX4D.js} +5 -5
- package/bundle/interactiveCli-X4RY42N6.js +50355 -0
- package/bundle/node_modules/@google/gemini-cli-devtools/package.json +1 -1
- package/bundle/{oauth2-provider-NGPDVZHB.js → oauth2-provider-4TA2ENGZ.js} +1 -1
- package/bundle/{oauth2-provider-5PPDZYRY.js → oauth2-provider-TPB4LTUP.js} +39 -73
- package/bundle/oauth2-provider-YEU6QEFO.js +237 -0
- package/bundle/{oauth2-provider-4KPORHHZ.js → oauth2-provider-YVD7LHOL.js} +1 -1
- package/package.json +1 -1
package/bundle/gemini.js
CHANGED
|
@@ -66,7 +66,7 @@ import {
|
|
|
66
66
|
updateAllUpdatableExtensions,
|
|
67
67
|
updateExtension,
|
|
68
68
|
validateAuthMethod
|
|
69
|
-
} from "./chunk-
|
|
69
|
+
} from "./chunk-XDYYZLVW.js";
|
|
70
70
|
import {
|
|
71
71
|
AuthType,
|
|
72
72
|
ChatRecordingService,
|
|
@@ -77,6 +77,7 @@ import {
|
|
|
77
77
|
FileDiscoveryService,
|
|
78
78
|
FolderTrustDiscoveryService,
|
|
79
79
|
GeminiEventType,
|
|
80
|
+
IdeClient,
|
|
80
81
|
IntegrityStatus,
|
|
81
82
|
InvalidStreamError,
|
|
82
83
|
JsonFormatter,
|
|
@@ -96,6 +97,7 @@ import {
|
|
|
96
97
|
StreamEventType,
|
|
97
98
|
StreamJsonFormatter,
|
|
98
99
|
ToolCallEvent,
|
|
100
|
+
UserAccountManager,
|
|
99
101
|
UserPromptEvent,
|
|
100
102
|
ValidationCancelledError,
|
|
101
103
|
ValidationRequiredError,
|
|
@@ -155,7 +157,7 @@ import {
|
|
|
155
157
|
updatePolicy,
|
|
156
158
|
writeToStderr,
|
|
157
159
|
writeToStdout
|
|
158
|
-
} from "./chunk-
|
|
160
|
+
} from "./chunk-FNPZEX27.js";
|
|
159
161
|
import {
|
|
160
162
|
ASK_USER_TOOL_NAME,
|
|
161
163
|
ApprovalMode,
|
|
@@ -7251,7 +7253,7 @@ async function loadSandboxConfig(settings, argv) {
|
|
|
7251
7253
|
}
|
|
7252
7254
|
const command2 = getSandboxCommand(sandboxValue);
|
|
7253
7255
|
const packageJson = await getPackageJson(__dirname3);
|
|
7254
|
-
const image = process.env["GEMINI_SANDBOX_IMAGE"] ?? "us-docker.pkg.dev/gemini-code-dev/gemini-cli/sandbox:0.37.
|
|
7256
|
+
const image = process.env["GEMINI_SANDBOX_IMAGE"] ?? "us-docker.pkg.dev/gemini-code-dev/gemini-cli/sandbox:0.37.2" ?? customImage ?? packageJson?.config?.sandboxImageUri;
|
|
7255
7257
|
const isNative = command2 === "windows-native" || command2 === "sandbox-exec" || command2 === "lxc";
|
|
7256
7258
|
return command2 && (image || isNative) ? { enabled: true, allowedPaths, networkAccess, command: command2, image } : void 0;
|
|
7257
7259
|
}
|
|
@@ -9539,7 +9541,7 @@ async function runNonInteractive({
|
|
|
9539
9541
|
}
|
|
9540
9542
|
});
|
|
9541
9543
|
if (process.env["GEMINI_CLI_ACTIVITY_LOG_TARGET"]) {
|
|
9542
|
-
const { setupInitialActivityLogger } = await import("./devtoolsService-
|
|
9544
|
+
const { setupInitialActivityLogger } = await import("./devtoolsService-7WYJNYOV.js");
|
|
9543
9545
|
await setupInitialActivityLogger(config);
|
|
9544
9546
|
}
|
|
9545
9547
|
const { stdout: workingStdout } = createWorkingStdio();
|
|
@@ -12108,6 +12110,84 @@ ${formatted}`
|
|
|
12108
12110
|
}
|
|
12109
12111
|
};
|
|
12110
12112
|
|
|
12113
|
+
// packages/cli/src/acp/commands/about.ts
|
|
12114
|
+
import process5 from "node:process";
|
|
12115
|
+
var AboutCommand = class {
|
|
12116
|
+
name = "about";
|
|
12117
|
+
description = "Show version and environment info";
|
|
12118
|
+
async execute(context, _args = []) {
|
|
12119
|
+
const osVersion = process5.platform;
|
|
12120
|
+
let sandboxEnv = "no sandbox";
|
|
12121
|
+
if (process5.env["SANDBOX"] && process5.env["SANDBOX"] !== "sandbox-exec") {
|
|
12122
|
+
sandboxEnv = process5.env["SANDBOX"];
|
|
12123
|
+
} else if (process5.env["SANDBOX"] === "sandbox-exec") {
|
|
12124
|
+
sandboxEnv = `sandbox-exec (${process5.env["SEATBELT_PROFILE"] || "unknown"})`;
|
|
12125
|
+
}
|
|
12126
|
+
const modelVersion = context.agentContext.config.getModel() || "Unknown";
|
|
12127
|
+
const cliVersion = await getVersion();
|
|
12128
|
+
const selectedAuthType = context.settings.merged?.security?.auth?.selectedType ?? "";
|
|
12129
|
+
const gcpProject = process5.env["GOOGLE_CLOUD_PROJECT"] || "";
|
|
12130
|
+
const ideClient = await getIdeClientName(context);
|
|
12131
|
+
const userAccountManager = new UserAccountManager();
|
|
12132
|
+
const cachedAccount = userAccountManager.getCachedGoogleAccount();
|
|
12133
|
+
const userEmail = cachedAccount ?? "Unknown";
|
|
12134
|
+
const tier = context.agentContext.config.getUserTierName() || "Unknown";
|
|
12135
|
+
const info = [
|
|
12136
|
+
`- Version: ${cliVersion}`,
|
|
12137
|
+
`- OS: ${osVersion}`,
|
|
12138
|
+
`- Sandbox: ${sandboxEnv}`,
|
|
12139
|
+
`- Model: ${modelVersion}`,
|
|
12140
|
+
`- Auth Type: ${selectedAuthType}`,
|
|
12141
|
+
`- GCP Project: ${gcpProject}`,
|
|
12142
|
+
`- IDE Client: ${ideClient}`,
|
|
12143
|
+
`- User Email: ${userEmail}`,
|
|
12144
|
+
`- Tier: ${tier}`
|
|
12145
|
+
].join("\n");
|
|
12146
|
+
return {
|
|
12147
|
+
name: this.name,
|
|
12148
|
+
data: `Gemini CLI Info:
|
|
12149
|
+
${info}`
|
|
12150
|
+
};
|
|
12151
|
+
}
|
|
12152
|
+
};
|
|
12153
|
+
async function getIdeClientName(context) {
|
|
12154
|
+
if (!context.agentContext.config.getIdeMode()) {
|
|
12155
|
+
return "";
|
|
12156
|
+
}
|
|
12157
|
+
const ideClient = await IdeClient.getInstance();
|
|
12158
|
+
return ideClient?.getDetectedIdeDisplayName() ?? "";
|
|
12159
|
+
}
|
|
12160
|
+
|
|
12161
|
+
// packages/cli/src/acp/commands/help.ts
|
|
12162
|
+
var HelpCommand = class {
|
|
12163
|
+
constructor(registry) {
|
|
12164
|
+
this.registry = registry;
|
|
12165
|
+
}
|
|
12166
|
+
name = "help";
|
|
12167
|
+
description = "Show available commands";
|
|
12168
|
+
async execute(_context, _args = []) {
|
|
12169
|
+
const commands = this.registry.getAllCommands().sort((a, b) => a.name.localeCompare(b.name));
|
|
12170
|
+
const lines = [];
|
|
12171
|
+
lines.push("Gemini CLI Help:");
|
|
12172
|
+
lines.push("");
|
|
12173
|
+
lines.push("### Basics");
|
|
12174
|
+
lines.push(
|
|
12175
|
+
"- **Add context**: Use `@` to specify files for context (e.g., `@src/myFile.ts`) to target specific files or folders."
|
|
12176
|
+
);
|
|
12177
|
+
lines.push("");
|
|
12178
|
+
lines.push("### Commands");
|
|
12179
|
+
for (const cmd of commands) {
|
|
12180
|
+
if (cmd.description) {
|
|
12181
|
+
lines.push(`- **/${cmd.name}** - ${cmd.description}`);
|
|
12182
|
+
}
|
|
12183
|
+
}
|
|
12184
|
+
return {
|
|
12185
|
+
name: this.name,
|
|
12186
|
+
data: lines.join("\n")
|
|
12187
|
+
};
|
|
12188
|
+
}
|
|
12189
|
+
};
|
|
12190
|
+
|
|
12111
12191
|
// packages/cli/src/acp/commandHandler.ts
|
|
12112
12192
|
var CommandHandler = class _CommandHandler {
|
|
12113
12193
|
registry;
|
|
@@ -12120,6 +12200,8 @@ var CommandHandler = class _CommandHandler {
|
|
|
12120
12200
|
registry.register(new ExtensionsCommand());
|
|
12121
12201
|
registry.register(new InitCommand());
|
|
12122
12202
|
registry.register(new RestoreCommand());
|
|
12203
|
+
registry.register(new AboutCommand());
|
|
12204
|
+
registry.register(new HelpCommand(registry));
|
|
12123
12205
|
return registry;
|
|
12124
12206
|
}
|
|
12125
12207
|
getAvailableCommands() {
|
|
@@ -12806,7 +12888,7 @@ ${thought.description}`;
|
|
|
12806
12888
|
if (pendingSend.signal.aborted || error instanceof Error && error.name === "AbortError") {
|
|
12807
12889
|
return { stopReason: CoreToolCallStatus.Cancelled };
|
|
12808
12890
|
}
|
|
12809
|
-
if (error instanceof InvalidStreamError || error && typeof error === "object" && "type" in error && error.type === "NO_RESPONSE_TEXT") {
|
|
12891
|
+
if (error instanceof InvalidStreamError || error && typeof error === "object" && "type" in error && (error.type === "NO_RESPONSE_TEXT" || error.type === "NO_FINISH_REASON" || error.type === "MALFORMED_FUNCTION_CALL" || error.type === "UNEXPECTED_TOOL_CALL")) {
|
|
12810
12892
|
return {
|
|
12811
12893
|
stopReason: "end_turn",
|
|
12812
12894
|
_meta: {
|
|
@@ -14263,7 +14345,7 @@ ${reason.stack}` : ""}`;
|
|
|
14263
14345
|
});
|
|
14264
14346
|
}
|
|
14265
14347
|
async function startInteractiveUI(config, settings, startupWarnings, workspaceRoot = process.cwd(), resumedSessionData, initializationResult) {
|
|
14266
|
-
const { startInteractiveUI: doStartUI } = await import("./interactiveCli-
|
|
14348
|
+
const { startInteractiveUI: doStartUI } = await import("./interactiveCli-GCAC6FV6.js");
|
|
14267
14349
|
await doStartUI(
|
|
14268
14350
|
config,
|
|
14269
14351
|
settings,
|
|
@@ -14460,7 +14542,7 @@ ${finalArgs[promptIndex + 1]}`;
|
|
|
14460
14542
|
await config.storage.initialize();
|
|
14461
14543
|
adminControlsListner.setConfig(config);
|
|
14462
14544
|
if (config.isInteractive() && settings.merged.general.devtools) {
|
|
14463
|
-
const { setupInitialActivityLogger } = await import("./devtoolsService-
|
|
14545
|
+
const { setupInitialActivityLogger } = await import("./devtoolsService-7WYJNYOV.js");
|
|
14464
14546
|
await setupInitialActivityLogger(config);
|
|
14465
14547
|
}
|
|
14466
14548
|
registerTelemetryConfig(config);
|
|
@@ -154,8 +154,8 @@ import {
|
|
|
154
154
|
shouldSwitchTheme,
|
|
155
155
|
stringWidth,
|
|
156
156
|
stripUnsafeCharacters,
|
|
157
|
-
styledCharsToString,
|
|
158
157
|
styledCharsWidth,
|
|
158
|
+
styledLineToString,
|
|
159
159
|
terminalCapabilityManager,
|
|
160
160
|
theme,
|
|
161
161
|
themeManager,
|
|
@@ -186,7 +186,7 @@ import {
|
|
|
186
186
|
widestLineFromStyledChars,
|
|
187
187
|
wordBreakStyledChars,
|
|
188
188
|
wrapStyledChars
|
|
189
|
-
} from "./chunk-
|
|
189
|
+
} from "./chunk-XDYYZLVW.js";
|
|
190
190
|
import {
|
|
191
191
|
ApiKeyUpdatedEvent,
|
|
192
192
|
AsyncFzf,
|
|
@@ -306,7 +306,7 @@ import {
|
|
|
306
306
|
validatePlanContent,
|
|
307
307
|
validatePlanPath,
|
|
308
308
|
writeToStdout
|
|
309
|
-
} from "./chunk-
|
|
309
|
+
} from "./chunk-FNPZEX27.js";
|
|
310
310
|
import {
|
|
311
311
|
ACTIVATE_SKILL_TOOL_NAME,
|
|
312
312
|
ApprovalMode,
|
|
@@ -19999,7 +19999,7 @@ var TableRenderer = ({
|
|
|
19999
19999
|
maxLineWidth
|
|
20000
20000
|
);
|
|
20001
20001
|
const lines = wrappedStyledLines.map((line) => ({
|
|
20002
|
-
text:
|
|
20002
|
+
text: styledLineToString(line),
|
|
20003
20003
|
width: styledCharsWidth(line)
|
|
20004
20004
|
}));
|
|
20005
20005
|
rowResult.push(lines);
|
|
@@ -49406,7 +49406,7 @@ ${queuedText}` : queuedText;
|
|
|
49406
49406
|
if (keyMatchers["app.showErrorDetails" /* SHOW_ERROR_DETAILS */](key)) {
|
|
49407
49407
|
if (settings.merged.general.devtools) {
|
|
49408
49408
|
void (async () => {
|
|
49409
|
-
const { toggleDevToolsPanel } = await import("./devtoolsService-
|
|
49409
|
+
const { toggleDevToolsPanel } = await import("./devtoolsService-7WYJNYOV.js");
|
|
49410
49410
|
await toggleDevToolsPanel(
|
|
49411
49411
|
config,
|
|
49412
49412
|
showErrorDetails,
|