@google/gemini-cli 0.37.0-preview.0 → 0.37.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-LEK5YYAR.js → chunk-4GDVEGW6.js} +66 -29
- package/bundle/{chunk-TJ76C6AA.js → chunk-4HLDGHKQ.js} +5903 -11016
- package/bundle/{chunk-R5X4CMUM.js → chunk-5OOT636U.js} +30 -23
- package/bundle/{chunk-7UZ4Y32N.js → chunk-JS5WSGB2.js} +30 -23
- package/bundle/{chunk-ULC3DHVX.js → chunk-KVB2FEJR.js} +6 -6
- package/bundle/{chunk-A62NZYIK.js → chunk-Q7WBFJC3.js} +73 -61
- package/bundle/chunk-RKV6HN7Q.js +98376 -0
- package/bundle/{chunk-3TN4SOLW.js → chunk-T475D6CB.js} +72 -29
- package/bundle/{chunk-XX7JYMTE.js → chunk-TZN2SS4V.js} +6 -6
- package/bundle/chunk-WY42FI6I.js +356418 -0
- package/bundle/{core-5OME6LT4.js → core-YYXQJ7TH.js} +4 -2
- package/bundle/{devtoolsService-4FIYD6OW.js → devtoolsService-B6RHLEYB.js} +3 -3
- package/bundle/{devtoolsService-TVWW3DBW.js → devtoolsService-DHRIWISR.js} +3 -3
- package/bundle/{devtoolsService-IDLWLZFQ.js → devtoolsService-MSTYJNTU.js} +5 -4
- package/bundle/devtoolsService-NRFH67X5.js +871 -0
- package/bundle/{core-CUCGSGCA.js → dist-2HVISZHF.js} +4 -2
- package/bundle/{dist-YWCADMDD.js → dist-KYKNBAEA.js} +4 -2
- package/bundle/dist-WQ7AVR5S.js +1942 -0
- package/bundle/docs/cli/plan-mode.md +10 -3
- package/bundle/docs/cli/settings.md +33 -33
- package/bundle/docs/reference/configuration.md +2 -2
- package/bundle/docs/reference/policy-engine.md +20 -1
- package/bundle/gemini.js +7 -7
- package/bundle/{interactiveCli-4WFWOVAQ.js → interactiveCli-M5FR2TSQ.js} +4 -4
- package/bundle/{interactiveCli-4ZZ72DR3.js → interactiveCli-NNZT57UA.js} +264 -247
- package/bundle/interactiveCli-WM3LDBWK.js +50355 -0
- package/bundle/{interactiveCli-6SIGBRWS.js → interactiveCli-Z6APHR6N.js} +4 -4
- package/bundle/{memoryDiscovery-NS2EGHYH.js → memoryDiscovery-A265O6ML.js} +1 -1
- package/bundle/{memoryDiscovery-VL3OH25S.js → memoryDiscovery-H6J7KIH2.js} +1 -1
- package/bundle/node_modules/@google/gemini-cli-devtools/package.json +1 -1
- package/bundle/{oauth2-provider-HGHECKPY.js → oauth2-provider-3Z6BMHEW.js} +2 -2
- package/bundle/{oauth2-provider-YYRJ44X5.js → oauth2-provider-6573WD2M.js} +39 -73
- package/bundle/{oauth2-provider-TYBJKXSJ.js → oauth2-provider-DFCNEZQQ.js} +2 -2
- package/bundle/oauth2-provider-UMCNQ5DH.js +237 -0
- package/package.json +1 -1
|
@@ -71,6 +71,7 @@ import {
|
|
|
71
71
|
MAX_LINE_LENGTH_TEXT_FILE,
|
|
72
72
|
MCP_TOOL_PREFIX,
|
|
73
73
|
MEMORY_TOOL_NAME,
|
|
74
|
+
MODES_BY_PERMISSIVENESS,
|
|
74
75
|
MemoryTool,
|
|
75
76
|
OAUTH_FILE,
|
|
76
77
|
PARAM_ADDITIONAL_PERMISSIONS,
|
|
@@ -197,7 +198,7 @@ import {
|
|
|
197
198
|
toFriendlyError,
|
|
198
199
|
unescapePath,
|
|
199
200
|
zodToJsonSchema
|
|
200
|
-
} from "./chunk-
|
|
201
|
+
} from "./chunk-5OOT636U.js";
|
|
201
202
|
import {
|
|
202
203
|
require_dist as require_dist2,
|
|
203
204
|
require_src
|
|
@@ -251001,8 +251002,8 @@ var Float64Vector = import_vector.default.Float64Vector;
|
|
|
251001
251002
|
var PointerVector = import_vector.default.PointerVector;
|
|
251002
251003
|
|
|
251003
251004
|
// packages/core/src/generated/git-commit.ts
|
|
251004
|
-
var GIT_COMMIT_INFO = "
|
|
251005
|
-
var CLI_VERSION = "0.
|
|
251005
|
+
var GIT_COMMIT_INFO = "ac3452077";
|
|
251006
|
+
var CLI_VERSION = "0.37.0-preview.1";
|
|
251006
251007
|
|
|
251007
251008
|
// packages/core/src/ide/detect-ide.ts
|
|
251008
251009
|
var IDE_DEFINITIONS = {
|
|
@@ -277534,7 +277535,7 @@ function getVersion() {
|
|
|
277534
277535
|
}
|
|
277535
277536
|
versionPromise = (async () => {
|
|
277536
277537
|
const pkgJson = await getPackageJson(__dirname4);
|
|
277537
|
-
return "0.
|
|
277538
|
+
return "0.37.0-preview.1";
|
|
277538
277539
|
})();
|
|
277539
277540
|
return versionPromise;
|
|
277540
277541
|
}
|
|
@@ -331831,7 +331832,7 @@ var A2AAuthProviderFactory = class _A2AAuthProviderFactory {
|
|
|
331831
331832
|
return provider;
|
|
331832
331833
|
}
|
|
331833
331834
|
case "oauth2": {
|
|
331834
|
-
const { OAuth2AuthProvider } = await import("./oauth2-provider-
|
|
331835
|
+
const { OAuth2AuthProvider } = await import("./oauth2-provider-DFCNEZQQ.js");
|
|
331835
331836
|
const provider = new OAuth2AuthProvider(
|
|
331836
331837
|
authConfig,
|
|
331837
331838
|
options.agentName ?? "unknown",
|
|
@@ -333413,6 +333414,14 @@ async function updatePolicy(tool, outcome, confirmationDetails, context2, messag
|
|
|
333413
333414
|
return;
|
|
333414
333415
|
}
|
|
333415
333416
|
let persistScope;
|
|
333417
|
+
let modes;
|
|
333418
|
+
const currentMode = context2.config.getApprovalMode();
|
|
333419
|
+
if (outcome === "proceed_always" /* ProceedAlways */ || outcome === "proceed_always_tool" /* ProceedAlwaysTool */ || outcome === "proceed_always_server" /* ProceedAlwaysServer */ || outcome === "proceed_always_and_save" /* ProceedAlwaysAndSave */) {
|
|
333420
|
+
const modeIndex = MODES_BY_PERMISSIVENESS.indexOf(currentMode);
|
|
333421
|
+
if (modeIndex !== -1) {
|
|
333422
|
+
modes = MODES_BY_PERMISSIVENESS.slice(modeIndex);
|
|
333423
|
+
}
|
|
333424
|
+
}
|
|
333416
333425
|
if (outcome === "proceed_always_and_save" /* ProceedAlwaysAndSave */) {
|
|
333417
333426
|
if (context2.config && context2.config.isTrustedFolder() && context2.config.getWorkspacePoliciesDir() !== void 0) {
|
|
333418
333427
|
persistScope = "workspace";
|
|
@@ -333426,7 +333435,8 @@ async function updatePolicy(tool, outcome, confirmationDetails, context2, messag
|
|
|
333426
333435
|
outcome,
|
|
333427
333436
|
confirmationDetails,
|
|
333428
333437
|
messageBus,
|
|
333429
|
-
persistScope
|
|
333438
|
+
persistScope,
|
|
333439
|
+
modes
|
|
333430
333440
|
);
|
|
333431
333441
|
return;
|
|
333432
333442
|
}
|
|
@@ -333437,13 +333447,14 @@ async function updatePolicy(tool, outcome, confirmationDetails, context2, messag
|
|
|
333437
333447
|
messageBus,
|
|
333438
333448
|
persistScope,
|
|
333439
333449
|
toolInvocation,
|
|
333440
|
-
context2.config
|
|
333450
|
+
context2.config,
|
|
333451
|
+
modes
|
|
333441
333452
|
);
|
|
333442
333453
|
}
|
|
333443
333454
|
function isAutoEditTransition(tool, outcome) {
|
|
333444
333455
|
return outcome === "proceed_always" /* ProceedAlways */ && EDIT_TOOL_NAMES.has(tool.name);
|
|
333445
333456
|
}
|
|
333446
|
-
async function handleStandardPolicyUpdate(tool, outcome, confirmationDetails, messageBus, persistScope, toolInvocation, config2) {
|
|
333457
|
+
async function handleStandardPolicyUpdate(tool, outcome, confirmationDetails, messageBus, persistScope, toolInvocation, config2, modes) {
|
|
333447
333458
|
if (outcome === "proceed_always" /* ProceedAlways */ || outcome === "proceed_always_and_save" /* ProceedAlwaysAndSave */) {
|
|
333448
333459
|
const options = toolInvocation?.getPolicyUpdateOptions?.(outcome) || {};
|
|
333449
333460
|
if (!options.commandPrefix && confirmationDetails?.type === "exec") {
|
|
@@ -333457,11 +333468,12 @@ async function handleStandardPolicyUpdate(tool, outcome, confirmationDetails, me
|
|
|
333457
333468
|
toolName: tool.name,
|
|
333458
333469
|
persist: outcome === "proceed_always_and_save" /* ProceedAlwaysAndSave */,
|
|
333459
333470
|
persistScope,
|
|
333471
|
+
modes,
|
|
333460
333472
|
...options
|
|
333461
333473
|
});
|
|
333462
333474
|
}
|
|
333463
333475
|
}
|
|
333464
|
-
async function handleMcpPolicyUpdate(tool, outcome, confirmationDetails, messageBus, persistScope) {
|
|
333476
|
+
async function handleMcpPolicyUpdate(tool, outcome, confirmationDetails, messageBus, persistScope, modes) {
|
|
333465
333477
|
const isMcpAlways = outcome === "proceed_always" /* ProceedAlways */ || outcome === "proceed_always_tool" /* ProceedAlwaysTool */ || outcome === "proceed_always_server" /* ProceedAlwaysServer */ || outcome === "proceed_always_and_save" /* ProceedAlwaysAndSave */;
|
|
333466
333478
|
if (!isMcpAlways) {
|
|
333467
333479
|
return;
|
|
@@ -333476,7 +333488,8 @@ async function handleMcpPolicyUpdate(tool, outcome, confirmationDetails, message
|
|
|
333476
333488
|
toolName,
|
|
333477
333489
|
mcpName: confirmationDetails.serverName,
|
|
333478
333490
|
persist,
|
|
333479
|
-
persistScope
|
|
333491
|
+
persistScope,
|
|
333492
|
+
modes
|
|
333480
333493
|
});
|
|
333481
333494
|
}
|
|
333482
333495
|
|
|
@@ -340258,6 +340271,33 @@ async function createPolicyEngineConfig(settings, approvalMode, defaultPoliciesD
|
|
|
340258
340271
|
disableAlwaysAllow: settings.disableAlwaysAllow
|
|
340259
340272
|
};
|
|
340260
340273
|
}
|
|
340274
|
+
function findMatchingRule(rules, criteria) {
|
|
340275
|
+
return rules.find(
|
|
340276
|
+
(r2) => r2.toolName === criteria.toolName && r2.mcpName === criteria.mcpName && JSON.stringify(r2.commandPrefix) === JSON.stringify(criteria.commandPrefix) && r2.argsPattern === criteria.argsPattern
|
|
340277
|
+
);
|
|
340278
|
+
}
|
|
340279
|
+
function createTomlRule(toolName, message) {
|
|
340280
|
+
const rule = {
|
|
340281
|
+
decision: "allow",
|
|
340282
|
+
priority: getAlwaysAllowPriorityFraction(),
|
|
340283
|
+
toolName
|
|
340284
|
+
};
|
|
340285
|
+
if (message.mcpName) {
|
|
340286
|
+
rule.mcpName = message.mcpName;
|
|
340287
|
+
}
|
|
340288
|
+
if (message.commandPrefix) {
|
|
340289
|
+
rule.commandPrefix = message.commandPrefix;
|
|
340290
|
+
} else if (message.argsPattern) {
|
|
340291
|
+
rule.argsPattern = message.argsPattern;
|
|
340292
|
+
}
|
|
340293
|
+
if (message.allowRedirection !== void 0) {
|
|
340294
|
+
rule.allowRedirection = message.allowRedirection;
|
|
340295
|
+
}
|
|
340296
|
+
if (message.modes) {
|
|
340297
|
+
rule.modes = message.modes;
|
|
340298
|
+
}
|
|
340299
|
+
return rule;
|
|
340300
|
+
}
|
|
340261
340301
|
function createPolicyUpdater(policyEngine, messageBus, storage2) {
|
|
340262
340302
|
let persistenceQueue = Promise.resolve();
|
|
340263
340303
|
messageBus.subscribe(
|
|
@@ -340282,6 +340322,7 @@ function createPolicyUpdater(policyEngine, messageBus, storage2) {
|
|
|
340282
340322
|
priority,
|
|
340283
340323
|
argsPattern: new RegExp(pattern),
|
|
340284
340324
|
mcpName: message.mcpName,
|
|
340325
|
+
modes: message.modes,
|
|
340285
340326
|
source: "Dynamic (Confirmed)",
|
|
340286
340327
|
allowRedirection: message.allowRedirection
|
|
340287
340328
|
});
|
|
@@ -340310,6 +340351,7 @@ function createPolicyUpdater(policyEngine, messageBus, storage2) {
|
|
|
340310
340351
|
priority,
|
|
340311
340352
|
argsPattern,
|
|
340312
340353
|
mcpName: message.mcpName,
|
|
340354
|
+
modes: message.modes,
|
|
340313
340355
|
source: "Dynamic (Confirmed)",
|
|
340314
340356
|
allowRedirection: message.allowRedirection
|
|
340315
340357
|
});
|
|
@@ -340337,30 +340379,31 @@ function createPolicyUpdater(policyEngine, messageBus, storage2) {
|
|
|
340337
340379
|
if (!existingData.rule) {
|
|
340338
340380
|
existingData.rule = [];
|
|
340339
340381
|
}
|
|
340340
|
-
|
|
340341
|
-
decision: "allow",
|
|
340342
|
-
priority: getAlwaysAllowPriorityFraction()
|
|
340343
|
-
};
|
|
340382
|
+
let normalizedToolName = toolName;
|
|
340344
340383
|
if (message.mcpName) {
|
|
340345
|
-
newRule.mcpName = message.mcpName;
|
|
340346
340384
|
const expectedPrefix = `${MCP_TOOL_PREFIX}${message.mcpName}_`;
|
|
340347
340385
|
if (toolName.startsWith(expectedPrefix)) {
|
|
340348
|
-
|
|
340349
|
-
} else {
|
|
340350
|
-
newRule.toolName = toolName;
|
|
340386
|
+
normalizedToolName = toolName.slice(expectedPrefix.length);
|
|
340351
340387
|
}
|
|
340352
|
-
} else {
|
|
340353
|
-
newRule.toolName = toolName;
|
|
340354
|
-
}
|
|
340355
|
-
if (message.commandPrefix) {
|
|
340356
|
-
newRule.commandPrefix = message.commandPrefix;
|
|
340357
|
-
} else if (message.argsPattern) {
|
|
340358
|
-
newRule.argsPattern = message.argsPattern;
|
|
340359
340388
|
}
|
|
340360
|
-
|
|
340361
|
-
|
|
340389
|
+
const existingRule = findMatchingRule(existingData.rule, {
|
|
340390
|
+
toolName: normalizedToolName,
|
|
340391
|
+
mcpName: message.mcpName,
|
|
340392
|
+
commandPrefix: message.commandPrefix,
|
|
340393
|
+
argsPattern: message.argsPattern
|
|
340394
|
+
});
|
|
340395
|
+
if (existingRule) {
|
|
340396
|
+
if (message.allowRedirection !== void 0) {
|
|
340397
|
+
existingRule.allowRedirection = message.allowRedirection;
|
|
340398
|
+
}
|
|
340399
|
+
if (message.modes) {
|
|
340400
|
+
existingRule.modes = message.modes;
|
|
340401
|
+
}
|
|
340402
|
+
} else {
|
|
340403
|
+
existingData.rule.push(
|
|
340404
|
+
createTomlRule(normalizedToolName, message)
|
|
340405
|
+
);
|
|
340362
340406
|
}
|
|
340363
|
-
existingData.rule.push(newRule);
|
|
340364
340407
|
const newContent = import_toml3.default.stringify(existingData);
|
|
340365
340408
|
const tmpSuffix = crypto18.randomBytes(8).toString("hex");
|
|
340366
340409
|
const tmpFile = `${policyFile}.${tmpSuffix}.tmp`;
|
|
@@ -354168,7 +354211,7 @@ var Config = class {
|
|
|
354168
354211
|
if (this.experimentalJitContext && this.contextManager) {
|
|
354169
354212
|
await this.contextManager.refresh();
|
|
354170
354213
|
} else {
|
|
354171
|
-
const { refreshServerHierarchicalMemory: refreshServerHierarchicalMemory2 } = await import("./memoryDiscovery-
|
|
354214
|
+
const { refreshServerHierarchicalMemory: refreshServerHierarchicalMemory2 } = await import("./memoryDiscovery-H6J7KIH2.js");
|
|
354172
354215
|
await refreshServerHierarchicalMemory2(this);
|
|
354173
354216
|
}
|
|
354174
354217
|
if (this._geminiClient?.isInitialized()) {
|
|
@@ -156,7 +156,7 @@ import {
|
|
|
156
156
|
tokenLimit,
|
|
157
157
|
uiTelemetryService,
|
|
158
158
|
yellowBright
|
|
159
|
-
} from "./chunk-
|
|
159
|
+
} from "./chunk-T475D6CB.js";
|
|
160
160
|
import {
|
|
161
161
|
ApprovalMode,
|
|
162
162
|
CoreEvent,
|
|
@@ -184,7 +184,7 @@ import {
|
|
|
184
184
|
shortenPath,
|
|
185
185
|
tildeifyPath,
|
|
186
186
|
unescapePath
|
|
187
|
-
} from "./chunk-
|
|
187
|
+
} from "./chunk-5OOT636U.js";
|
|
188
188
|
import {
|
|
189
189
|
AppEvent,
|
|
190
190
|
appEvents
|
|
@@ -59621,8 +59621,8 @@ var SETTINGS_SCHEMA = {
|
|
|
59621
59621
|
label: "Loading Phrases",
|
|
59622
59622
|
category: "UI",
|
|
59623
59623
|
requiresRestart: false,
|
|
59624
|
-
default: "
|
|
59625
|
-
description: "What to show while the model is working: tips, witty comments,
|
|
59624
|
+
default: "off",
|
|
59625
|
+
description: "What to show while the model is working: tips, witty comments, all, or off.",
|
|
59626
59626
|
showInDialog: true,
|
|
59627
59627
|
options: [
|
|
59628
59628
|
{ value: "tips", label: "Tips" },
|
|
@@ -88055,7 +88055,7 @@ var authCommand = {
|
|
|
88055
88055
|
import process34 from "node:process";
|
|
88056
88056
|
|
|
88057
88057
|
// packages/cli/src/generated/git-commit.ts
|
|
88058
|
-
var GIT_COMMIT_INFO = "
|
|
88058
|
+
var GIT_COMMIT_INFO = "ac3452077";
|
|
88059
88059
|
|
|
88060
88060
|
// packages/cli/src/ui/utils/historyExportUtils.ts
|
|
88061
88061
|
import * as fsPromises2 from "node:fs/promises";
|
|
@@ -93554,7 +93554,7 @@ Use /mcp auth <server-name> to authenticate.`
|
|
|
93554
93554
|
type: "info",
|
|
93555
93555
|
text: `Starting OAuth authentication for MCP server '${serverName}'...`
|
|
93556
93556
|
});
|
|
93557
|
-
const { MCPOAuthProvider } = await import("./core-
|
|
93557
|
+
const { MCPOAuthProvider } = await import("./core-YYXQJ7TH.js");
|
|
93558
93558
|
let oauthConfig = server.oauth;
|
|
93559
93559
|
if (!oauthConfig) {
|
|
93560
93560
|
oauthConfig = { enabled: false };
|