@google/gemini-cli 0.67.0-preview.0 → 0.68.0-preview.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.
- package/README.md +18 -24
- package/bundle/{chunk-4HG5TEPY.js → chunk-44PCK4QK.js} +1 -1
- package/bundle/{chunk-QVUC4J7B.js → chunk-6A5BTTNC.js} +9 -11
- package/bundle/{chunk-BFZQO5OI.js → chunk-B2FKXXUH.js} +327 -106
- package/bundle/{chunk-GTLUHCZL.js → chunk-BKVNBJ5C.js} +327 -106
- package/bundle/{chunk-IQFMOPBP.js → chunk-CXMHAFLN.js} +2 -2
- package/bundle/{chunk-76P7AV5J.js → chunk-G7EMTV2Q.js} +327 -106
- package/bundle/{chunk-VIWQUHCM.js → chunk-HRM7UWGB.js} +9 -11
- package/bundle/{chunk-WTMW35TZ.js → chunk-JMHCFAD6.js} +1 -1
- package/bundle/{chunk-WANMK7VA.js → chunk-KKKD4FID.js} +2 -2
- package/bundle/{chunk-5FYAQBC3.js → chunk-L57AYV6U.js} +1558 -996
- package/bundle/{chunk-6HF2HP2S.js → chunk-LQDISFTJ.js} +2 -2
- package/bundle/{chunk-R6BM7NWC.js → chunk-ODU7Z2RJ.js} +1 -1
- package/bundle/{chunk-THOV46FY.js → chunk-OZOUOK43.js} +1 -1
- package/bundle/{chunk-FPCAOQBY.js → chunk-Q76ZDILI.js} +3 -3
- package/bundle/{chunk-EAO5GUJT.js → chunk-RCF66HCI.js} +1625 -1006
- package/bundle/{chunk-FYX6LSG6.js → chunk-RD2EMHV2.js} +1 -1
- package/bundle/{chunk-QPO46AOD.js → chunk-VBHMFLBY.js} +1 -1
- package/bundle/{chunk-2BG2OMW3.js → chunk-VCO4TMD6.js} +9 -11
- package/bundle/{chunk-GI2BMP6K.js → chunk-WEP47ZZU.js} +1 -1
- package/bundle/{chunk-RNBD6XQX.js → chunk-XPTXBYQQ.js} +3 -3
- package/bundle/{chunk-SJ64DOGM.js → chunk-XVNEFQR3.js} +1 -1
- package/bundle/{chunk-JLA2J5MI.js → chunk-YPPJDFYP.js} +3 -3
- package/bundle/{chunk-SAQV5Q3G.js → chunk-ZEK4UYYW.js} +1 -1
- package/bundle/{chunk-HWPQINPO.js → chunk-ZZOOHVBL.js} +1627 -1008
- package/bundle/{cleanup-QXMGRCCJ.js → cleanup-CCR2EOHA.js} +2 -2
- package/bundle/{cleanup-R3QZGL6L.js → cleanup-OQV2G5Y3.js} +2 -2
- package/bundle/{cleanup-S6DWGSDA.js → cleanup-T24OFMOA.js} +2 -2
- package/bundle/{core-NQRYED5S.js → core-NQRKBS47.js} +3 -1
- package/bundle/{dist-XT4ZXTSC.js → core-UIPNZ5VU.js} +3 -1
- package/bundle/{devtoolsService-GPRO4RRU.js → devtoolsService-3G5ZA3JV.js} +2 -2
- package/bundle/{devtoolsService-WR3IFLZC.js → devtoolsService-EWNQDTC7.js} +2 -2
- package/bundle/{devtoolsService-ALST4BXH.js → devtoolsService-V3OEHE5V.js} +2 -2
- package/bundle/{core-3N7UGMI2.js → dist-OYZDNSTI.js} +3 -1
- package/bundle/docs/changelogs/index.md +24 -0
- package/bundle/docs/changelogs/latest.md +83 -90
- package/bundle/docs/changelogs/preview.md +89 -87
- package/bundle/docs/cli/sandbox.md +8 -2
- package/bundle/docs/cli/themes.md +6 -3
- package/bundle/docs/extensions/releasing.md +32 -0
- package/bundle/docs/reference/configuration.md +2 -10
- package/bundle/{gemini-K3EMSEQ5.js → gemini-2P73372G.js} +122 -24
- package/bundle/{gemini-MWKDIT7M.js → gemini-FSHMUCSM.js} +122 -24
- package/bundle/{gemini-5DCBUXWG.js → gemini-YFCTZ76S.js} +121 -23
- package/bundle/gemini.js +7 -7
- package/bundle/{interactiveCli-3B2SSFOJ.js → interactiveCli-F5RRE2VJ.js} +1350 -1145
- package/bundle/{interactiveCli-63JD5B2Z.js → interactiveCli-I75IWUIA.js} +1350 -1145
- package/bundle/{interactiveCli-QUIZ4FA2.js → interactiveCli-X54KN2EM.js} +1350 -1145
- package/bundle/{liteRtServerManager-M6NTFF5C.js → liteRtServerManager-FLPMMDNM.js} +4 -4
- package/bundle/{liteRtServerManager-QHOOPEJV.js → liteRtServerManager-JTOIS4KU.js} +4 -4
- package/bundle/{liteRtServerManager-AQUTLRTC.js → liteRtServerManager-UVQ2I6NL.js} +4 -4
- package/bundle/{oauth2-provider-3JCCMSND.js → oauth2-provider-AYO4BU7A.js} +1 -1
- package/bundle/{oauth2-provider-X55SWENY.js → oauth2-provider-NCQY7TJE.js} +1 -1
- package/bundle/{oauth2-provider-GCJTOYXK.js → oauth2-provider-VMBYZOC7.js} +1 -1
- package/bundle/{start-VKITAPOP.js → start-DFHM4HI4.js} +6 -6
- package/bundle/{start-X73XUSSH.js → start-IXQ2E7L6.js} +6 -6
- package/bundle/{start-4QIXXTMW.js → start-YEKGRZVH.js} +6 -6
- package/package.json +1 -1
|
@@ -2,7 +2,7 @@ const require = (await import('node:module')).createRequire(import.meta.url); co
|
|
|
2
2
|
import {
|
|
3
3
|
startCommand,
|
|
4
4
|
startServer
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-Q76ZDILI.js";
|
|
6
6
|
import {
|
|
7
7
|
BuiltinCommandLoader,
|
|
8
8
|
CommandService,
|
|
@@ -45,11 +45,11 @@ import {
|
|
|
45
45
|
updateExtension,
|
|
46
46
|
validateAuthMethod,
|
|
47
47
|
validateContextFilePath
|
|
48
|
-
} from "./chunk-
|
|
48
|
+
} from "./chunk-B2FKXXUH.js";
|
|
49
49
|
import {
|
|
50
50
|
exitCli,
|
|
51
51
|
require_source
|
|
52
|
-
} from "./chunk-
|
|
52
|
+
} from "./chunk-JMHCFAD6.js";
|
|
53
53
|
import {
|
|
54
54
|
appEvents
|
|
55
55
|
} from "./chunk-5PS3AYFU.js";
|
|
@@ -89,12 +89,12 @@ import {
|
|
|
89
89
|
saveModelChange,
|
|
90
90
|
setAmbiguousCharactersWide,
|
|
91
91
|
stripAnsi
|
|
92
|
-
} from "./chunk-
|
|
92
|
+
} from "./chunk-HRM7UWGB.js";
|
|
93
93
|
import {
|
|
94
94
|
RELAUNCH_EXIT_CODE,
|
|
95
95
|
require_semver
|
|
96
|
-
} from "./chunk-
|
|
97
|
-
import "./chunk-
|
|
96
|
+
} from "./chunk-CXMHAFLN.js";
|
|
97
|
+
import "./chunk-VBHMFLBY.js";
|
|
98
98
|
import {
|
|
99
99
|
cleanupCheckpoints,
|
|
100
100
|
registerCleanup,
|
|
@@ -103,7 +103,7 @@ import {
|
|
|
103
103
|
runExitCleanup,
|
|
104
104
|
runSyncCleanup,
|
|
105
105
|
setupSignalHandlers
|
|
106
|
-
} from "./chunk-
|
|
106
|
+
} from "./chunk-RD2EMHV2.js";
|
|
107
107
|
import {
|
|
108
108
|
ASK_USER_TOOL_NAME,
|
|
109
109
|
AjvJsonSchemaValidator,
|
|
@@ -273,7 +273,7 @@ import {
|
|
|
273
273
|
updatePolicy,
|
|
274
274
|
writeToStderr,
|
|
275
275
|
writeToStdout
|
|
276
|
-
} from "./chunk-
|
|
276
|
+
} from "./chunk-RCF66HCI.js";
|
|
277
277
|
import "./chunk-664ZODQF.js";
|
|
278
278
|
import "./chunk-IUUIT4SU.js";
|
|
279
279
|
import "./chunk-L6PII3GR.js";
|
|
@@ -6496,6 +6496,57 @@ async function validateExtension(args) {
|
|
|
6496
6496
|
`Warning: Version '${extensionConfig.version}' does not appear to be standard semver (e.g., 1.0.0).`
|
|
6497
6497
|
);
|
|
6498
6498
|
}
|
|
6499
|
+
if (extensionConfig.mcpServers) {
|
|
6500
|
+
if (typeof extensionConfig.mcpServers !== "object" || extensionConfig.mcpServers === null || Array.isArray(extensionConfig.mcpServers)) {
|
|
6501
|
+
errors.push('The "mcpServers" field must be an object.');
|
|
6502
|
+
} else {
|
|
6503
|
+
for (const [serverName, serverConfig] of Object.entries(
|
|
6504
|
+
extensionConfig.mcpServers
|
|
6505
|
+
)) {
|
|
6506
|
+
if (typeof serverConfig !== "object" || serverConfig === null || Array.isArray(serverConfig)) {
|
|
6507
|
+
errors.push(
|
|
6508
|
+
`MCP server configuration for "${serverName}" must be an object.`
|
|
6509
|
+
);
|
|
6510
|
+
continue;
|
|
6511
|
+
}
|
|
6512
|
+
const hasCommand = typeof serverConfig.command === "string" && serverConfig.command.trim().length > 0;
|
|
6513
|
+
const hasUrl = typeof serverConfig.url === "string" && serverConfig.url.trim().length > 0;
|
|
6514
|
+
const hasHttpUrl = typeof serverConfig.httpUrl === "string" && serverConfig.httpUrl.trim().length > 0;
|
|
6515
|
+
const hasTcp = typeof serverConfig.tcp === "string" && serverConfig.tcp.trim().length > 0 || typeof serverConfig.tcp === "number";
|
|
6516
|
+
if (!hasCommand && !hasUrl && !hasHttpUrl && !hasTcp) {
|
|
6517
|
+
errors.push(
|
|
6518
|
+
`MCP server "${serverName}" must specify a transport (e.g., "command", "url", or "httpUrl").`
|
|
6519
|
+
);
|
|
6520
|
+
}
|
|
6521
|
+
if (hasHttpUrl) {
|
|
6522
|
+
warnings.push(
|
|
6523
|
+
`MCP server "${serverName}" uses deprecated "httpUrl". Consider using "url" with "type": "http" instead.`
|
|
6524
|
+
);
|
|
6525
|
+
}
|
|
6526
|
+
const errorPrefix = `MCP server "${serverName}" specifies an invalid `;
|
|
6527
|
+
if (hasUrl && serverConfig.url) {
|
|
6528
|
+
const hasPlaceholder = serverConfig.url.includes("$");
|
|
6529
|
+
if (!hasPlaceholder) {
|
|
6530
|
+
try {
|
|
6531
|
+
new URL(serverConfig.url);
|
|
6532
|
+
} catch {
|
|
6533
|
+
errors.push(`${errorPrefix}URL: "${serverConfig.url}".`);
|
|
6534
|
+
}
|
|
6535
|
+
}
|
|
6536
|
+
}
|
|
6537
|
+
if (hasHttpUrl && serverConfig.httpUrl) {
|
|
6538
|
+
const hasPlaceholder = serverConfig.httpUrl.includes("$");
|
|
6539
|
+
if (!hasPlaceholder) {
|
|
6540
|
+
try {
|
|
6541
|
+
new URL(serverConfig.httpUrl);
|
|
6542
|
+
} catch {
|
|
6543
|
+
errors.push(`${errorPrefix}httpUrl: "${serverConfig.httpUrl}".`);
|
|
6544
|
+
}
|
|
6545
|
+
}
|
|
6546
|
+
}
|
|
6547
|
+
}
|
|
6548
|
+
}
|
|
6549
|
+
}
|
|
6499
6550
|
if (warnings.length > 0) {
|
|
6500
6551
|
debugLogger.warn("Validation warnings:");
|
|
6501
6552
|
for (const warning of warnings) {
|
|
@@ -6940,8 +6991,10 @@ var EVENT_MAPPING = {
|
|
|
6940
6991
|
PostToolUse: "AfterTool",
|
|
6941
6992
|
UserPromptSubmit: "BeforeAgent",
|
|
6942
6993
|
Stop: "AfterAgent",
|
|
6943
|
-
|
|
6994
|
+
SubagentStop: "AfterAgent",
|
|
6944
6995
|
// Gemini doesn't have sub-agents, map to AfterAgent
|
|
6996
|
+
SubAgentStop: "AfterAgent",
|
|
6997
|
+
// Fallback for alternate casing
|
|
6945
6998
|
SessionStart: "SessionStart",
|
|
6946
6999
|
SessionEnd: "SessionEnd",
|
|
6947
7000
|
PreCompact: "PreCompress",
|
|
@@ -7029,7 +7082,10 @@ function migrateClaudeHooks(claudeConfig) {
|
|
|
7029
7082
|
}
|
|
7030
7083
|
return migratedDef;
|
|
7031
7084
|
});
|
|
7032
|
-
geminiHooks[geminiEventName] =
|
|
7085
|
+
geminiHooks[geminiEventName] = [
|
|
7086
|
+
...geminiHooks[geminiEventName] || [],
|
|
7087
|
+
...migratedDefinitions
|
|
7088
|
+
];
|
|
7033
7089
|
}
|
|
7034
7090
|
return geminiHooks;
|
|
7035
7091
|
}
|
|
@@ -11376,6 +11432,45 @@ function isRecord3(value) {
|
|
|
11376
11432
|
}
|
|
11377
11433
|
var execAsync = promisify(exec);
|
|
11378
11434
|
var execFileAsync = promisify(execFile);
|
|
11435
|
+
var PODMAN_INFO_TIMEOUT_MS = 5e3;
|
|
11436
|
+
async function isPodmanRootless() {
|
|
11437
|
+
const formats = [
|
|
11438
|
+
"{{.Host.Security.Rootless}}",
|
|
11439
|
+
"{{.Host.ServiceIsRootless}}"
|
|
11440
|
+
];
|
|
11441
|
+
for (const format3 of formats) {
|
|
11442
|
+
try {
|
|
11443
|
+
const { stdout } = await execFileAsync(
|
|
11444
|
+
"podman",
|
|
11445
|
+
["info", "--format", format3],
|
|
11446
|
+
{
|
|
11447
|
+
encoding: "utf-8",
|
|
11448
|
+
timeout: PODMAN_INFO_TIMEOUT_MS,
|
|
11449
|
+
killSignal: "SIGKILL"
|
|
11450
|
+
}
|
|
11451
|
+
);
|
|
11452
|
+
const trimmed = String(stdout ?? "").trim().toLowerCase();
|
|
11453
|
+
if (trimmed === "true") {
|
|
11454
|
+
return true;
|
|
11455
|
+
}
|
|
11456
|
+
if (trimmed === "false") {
|
|
11457
|
+
return false;
|
|
11458
|
+
}
|
|
11459
|
+
} catch (err) {
|
|
11460
|
+
const isMissingBinary = isNodeError(err) && err.code === "ENOENT";
|
|
11461
|
+
const timedOut = isRecord3(err) && err["killed"] === true;
|
|
11462
|
+
if (isMissingBinary || timedOut) {
|
|
11463
|
+
break;
|
|
11464
|
+
}
|
|
11465
|
+
}
|
|
11466
|
+
}
|
|
11467
|
+
return false;
|
|
11468
|
+
}
|
|
11469
|
+
function hasUsernsFlag(flags) {
|
|
11470
|
+
return flags.some(
|
|
11471
|
+
(flag) => flag === "--userns" || flag.startsWith("--userns=")
|
|
11472
|
+
);
|
|
11473
|
+
}
|
|
11379
11474
|
async function start_sandbox(config, nodeArgs = [], cliConfig, cliArgs = []) {
|
|
11380
11475
|
const patcher = new ConsolePatcher({
|
|
11381
11476
|
debugMode: cliConfig?.getDebugMode() || !!process.env["DEBUG"],
|
|
@@ -11714,12 +11809,10 @@ async function start_sandbox(config, nodeArgs = [], cliConfig, cliArgs = []) {
|
|
|
11714
11809
|
if (config.command === "runsc") {
|
|
11715
11810
|
args.push("--runtime=runsc");
|
|
11716
11811
|
}
|
|
11717
|
-
|
|
11718
|
-
|
|
11719
|
-
|
|
11720
|
-
|
|
11721
|
-
args.push(...flags);
|
|
11722
|
-
}
|
|
11812
|
+
const customFlags = process.env["SANDBOX_FLAGS"] ? (0, import_shell_quote2.parse)(process.env["SANDBOX_FLAGS"], process.env).filter(
|
|
11813
|
+
(f) => typeof f === "string"
|
|
11814
|
+
) : [];
|
|
11815
|
+
args.push(...customFlags);
|
|
11723
11816
|
if (process.stdin.isTTY) {
|
|
11724
11817
|
args.push("-t");
|
|
11725
11818
|
}
|
|
@@ -12032,6 +12125,9 @@ async function start_sandbox(config, nodeArgs = [], cliConfig, cliArgs = []) {
|
|
|
12032
12125
|
userFlag = "--user root";
|
|
12033
12126
|
} else if (await shouldUseCurrentUserInSandbox()) {
|
|
12034
12127
|
args.push("--user", "root");
|
|
12128
|
+
if (command2 === "podman" && !hasUsernsFlag(customFlags) && await isPodmanRootless()) {
|
|
12129
|
+
args.push("--userns=keep-id");
|
|
12130
|
+
}
|
|
12035
12131
|
const uid = (await execAsync("id -u")).stdout.trim();
|
|
12036
12132
|
const gid = (await execAsync("id -g")).stdout.trim();
|
|
12037
12133
|
const username = "gemini";
|
|
@@ -12936,7 +13032,7 @@ async function runNonInteractive({
|
|
|
12936
13032
|
}
|
|
12937
13033
|
});
|
|
12938
13034
|
if (process.env["GEMINI_CLI_ACTIVITY_LOG_TARGET"]) {
|
|
12939
|
-
const { setupInitialActivityLogger } = await import("./devtoolsService-
|
|
13035
|
+
const { setupInitialActivityLogger } = await import("./devtoolsService-EWNQDTC7.js");
|
|
12940
13036
|
setupInitialActivityLogger(config);
|
|
12941
13037
|
}
|
|
12942
13038
|
const { stdout: workingStdout } = createWorkingStdio();
|
|
@@ -13464,7 +13560,7 @@ async function runNonInteractive2(params) {
|
|
|
13464
13560
|
}
|
|
13465
13561
|
});
|
|
13466
13562
|
if (process.env["GEMINI_CLI_ACTIVITY_LOG_TARGET"]) {
|
|
13467
|
-
const { setupInitialActivityLogger } = await import("./devtoolsService-
|
|
13563
|
+
const { setupInitialActivityLogger } = await import("./devtoolsService-EWNQDTC7.js");
|
|
13468
13564
|
setupInitialActivityLogger(config);
|
|
13469
13565
|
}
|
|
13470
13566
|
const { stdout: workingStdout } = createWorkingStdio();
|
|
@@ -17714,9 +17810,11 @@ var AcpSessionManager = class {
|
|
|
17714
17810
|
currentModelId
|
|
17715
17811
|
}
|
|
17716
17812
|
};
|
|
17717
|
-
|
|
17813
|
+
try {
|
|
17814
|
+
await session.streamHistory(messages);
|
|
17815
|
+
} catch (err) {
|
|
17718
17816
|
debugLogger.error(`Error streaming history: ${err}`);
|
|
17719
|
-
}
|
|
17817
|
+
}
|
|
17720
17818
|
setTimeout(() => {
|
|
17721
17819
|
session?.sendAvailableCommands().catch((err) => {
|
|
17722
17820
|
debugLogger.error(`Error sending available commands: ${err}`);
|
|
@@ -18625,7 +18723,7 @@ async function resolveSessionId(resumeArg, sessionIdArg, sessionFileArg) {
|
|
|
18625
18723
|
}
|
|
18626
18724
|
}
|
|
18627
18725
|
async function startInteractiveUI(config, settings, startupWarnings, workspaceRoot = process.cwd(), resumedSessionData, initializationResult) {
|
|
18628
|
-
const { startInteractiveUI: doStartUI } = await import("./interactiveCli-
|
|
18726
|
+
const { startInteractiveUI: doStartUI } = await import("./interactiveCli-X54KN2EM.js");
|
|
18629
18727
|
await doStartUI(
|
|
18630
18728
|
config,
|
|
18631
18729
|
settings,
|
|
@@ -18850,7 +18948,7 @@ ${finalArgs[promptIndex + 1]}`;
|
|
|
18850
18948
|
await config.storage.initialize();
|
|
18851
18949
|
adminControlsListner.setConfig(config);
|
|
18852
18950
|
if (config.isInteractive() && settings.merged.general.devtools) {
|
|
18853
|
-
const { setupInitialActivityLogger } = await import("./devtoolsService-
|
|
18951
|
+
const { setupInitialActivityLogger } = await import("./devtoolsService-EWNQDTC7.js");
|
|
18854
18952
|
setupInitialActivityLogger(config);
|
|
18855
18953
|
}
|
|
18856
18954
|
registerTelemetryConfig(config);
|
|
@@ -18909,7 +19007,7 @@ ${finalArgs[promptIndex + 1]}`;
|
|
|
18909
19007
|
const initAppHandle = startupProfiler.start("initialize_app");
|
|
18910
19008
|
const initializationResult = await initializeApp(config, settings);
|
|
18911
19009
|
initAppHandle?.end();
|
|
18912
|
-
import("./liteRtServerManager-
|
|
19010
|
+
import("./liteRtServerManager-FLPMMDNM.js").then(({ LiteRtServerManager }) => {
|
|
18913
19011
|
const mergedGemma = settings.merged.experimental?.gemmaModelRouter;
|
|
18914
19012
|
if (!mergedGemma) return;
|
|
18915
19013
|
const userGemma = settings.forScope("User" /* User */).settings.experimental?.gemmaModelRouter;
|
package/bundle/gemini.js
CHANGED
|
@@ -6,10 +6,10 @@ import {
|
|
|
6
6
|
getSpawnConfig,
|
|
7
7
|
handleChildProcessClose,
|
|
8
8
|
setupSignalForwarding
|
|
9
|
-
} from "./chunk-
|
|
10
|
-
import "./chunk-
|
|
11
|
-
import "./chunk-
|
|
12
|
-
import "./chunk-
|
|
9
|
+
} from "./chunk-KKKD4FID.js";
|
|
10
|
+
import "./chunk-44PCK4QK.js";
|
|
11
|
+
import "./chunk-WEP47ZZU.js";
|
|
12
|
+
import "./chunk-L57AYV6U.js";
|
|
13
13
|
import "./chunk-664ZODQF.js";
|
|
14
14
|
import "./chunk-IUUIT4SU.js";
|
|
15
15
|
import "./chunk-L6PII3GR.js";
|
|
@@ -106,9 +106,9 @@ ${error instanceof Error ? error.stack ?? error.message : String(error)}
|
|
|
106
106
|
}
|
|
107
107
|
}
|
|
108
108
|
} else {
|
|
109
|
-
const { main } = await import("./gemini-
|
|
110
|
-
const { FatalError, writeToStderr } = await import("./dist-
|
|
111
|
-
const { runExitCleanup } = await import("./cleanup-
|
|
109
|
+
const { main } = await import("./gemini-2P73372G.js");
|
|
110
|
+
const { FatalError, writeToStderr } = await import("./dist-OYZDNSTI.js");
|
|
111
|
+
const { runExitCleanup } = await import("./cleanup-CCR2EOHA.js");
|
|
112
112
|
main().catch(async (error) => {
|
|
113
113
|
const cleanupTimeout = setTimeout(() => {
|
|
114
114
|
writeToStderr("Cleanup timed out, forcing exit...\n");
|