gemini-cli-leo 0.1.26 → 0.1.27
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/gemini.mjs +30 -7
- package/package.json +1 -1
package/gemini.mjs
CHANGED
|
@@ -173286,8 +173286,8 @@ var GIT_COMMIT_INFO, CLI_VERSION;
|
|
|
173286
173286
|
var init_git_commit = __esm({
|
|
173287
173287
|
"packages/core/dist/src/generated/git-commit.js"() {
|
|
173288
173288
|
"use strict";
|
|
173289
|
-
GIT_COMMIT_INFO = "
|
|
173290
|
-
CLI_VERSION = "0.1.
|
|
173289
|
+
GIT_COMMIT_INFO = "3868b69";
|
|
173290
|
+
CLI_VERSION = "0.1.27";
|
|
173291
173291
|
}
|
|
173292
173292
|
});
|
|
173293
173293
|
|
|
@@ -316489,7 +316489,7 @@ function getVersion() {
|
|
|
316489
316489
|
}
|
|
316490
316490
|
versionPromise = (async () => {
|
|
316491
316491
|
const pkgJson = await getPackageJson(__dirname4);
|
|
316492
|
-
return "0.1.
|
|
316492
|
+
return "0.1.27";
|
|
316493
316493
|
})();
|
|
316494
316494
|
return versionPromise;
|
|
316495
316495
|
}
|
|
@@ -319095,6 +319095,19 @@ function resetModifiedBuildFiles(sessionKey) {
|
|
|
319095
319095
|
delete sessionKey[MODIFIED_BUILD_FILES_SYMBOL];
|
|
319096
319096
|
}
|
|
319097
319097
|
}
|
|
319098
|
+
function acknowledgeAllSecurityWarnings(sessionKey) {
|
|
319099
|
+
if (hasSessionRecord(sessionKey)) {
|
|
319100
|
+
sessionKey[SECURITY_WARNING_BYPASS_SYMBOL] = true;
|
|
319101
|
+
}
|
|
319102
|
+
}
|
|
319103
|
+
function isSecurityWarningBypassEnabled(sessionKey) {
|
|
319104
|
+
return hasSessionRecord(sessionKey) && sessionKey[SECURITY_WARNING_BYPASS_SYMBOL] === true;
|
|
319105
|
+
}
|
|
319106
|
+
function resetSecurityWarningBypass(sessionKey) {
|
|
319107
|
+
if (hasSessionRecord(sessionKey)) {
|
|
319108
|
+
delete sessionKey[SECURITY_WARNING_BYPASS_SYMBOL];
|
|
319109
|
+
}
|
|
319110
|
+
}
|
|
319098
319111
|
function getRootCommandScope(rootCommands) {
|
|
319099
319112
|
return [...new Set(rootCommands)].sort().join(",");
|
|
319100
319113
|
}
|
|
@@ -319123,7 +319136,7 @@ function resetAcknowledgedUntrustedFlags(sessionKey) {
|
|
|
319123
319136
|
delete sessionKey[ACKNOWLEDGED_UNTRUSTED_FLAGS_SYMBOL];
|
|
319124
319137
|
}
|
|
319125
319138
|
}
|
|
319126
|
-
var import_shell_quote5, UNTRUSTED_CONTEXT_REGEX, REMOTE_SHELL_OUTPUT_SOURCE, REMOTE_CONTENT_COMMAND_ROOTS, COMMAND_WRAPPER_ROOTS, SOURCE_ATTRIBUTE_REGEX, BUILD_TEST_COMMAND_ROOTS, BENIGN_SUBCOMMAND_TOKENS, SAFE_SHORT_FLAGS, SAFE_LONG_FLAGS, HIGH_RISK_VALUE_FLAGS, FILE_MODE_STRING_REGEX, BARE_DASHES_REGEX, BARE_SHELL_VARIABLE_REGEX, EXECUTABLE_SCRIPT_REGEX, MODIFIED_BUILD_FILES_SYMBOL, ACKNOWLEDGED_UNTRUSTED_FLAGS_SYMBOL;
|
|
319139
|
+
var import_shell_quote5, UNTRUSTED_CONTEXT_REGEX, REMOTE_SHELL_OUTPUT_SOURCE, REMOTE_CONTENT_COMMAND_ROOTS, COMMAND_WRAPPER_ROOTS, SOURCE_ATTRIBUTE_REGEX, BUILD_TEST_COMMAND_ROOTS, BENIGN_SUBCOMMAND_TOKENS, SAFE_SHORT_FLAGS, SAFE_LONG_FLAGS, HIGH_RISK_VALUE_FLAGS, FILE_MODE_STRING_REGEX, BARE_DASHES_REGEX, BARE_SHELL_VARIABLE_REGEX, EXECUTABLE_SCRIPT_REGEX, MODIFIED_BUILD_FILES_SYMBOL, ACKNOWLEDGED_UNTRUSTED_FLAGS_SYMBOL, SECURITY_WARNING_BYPASS_SYMBOL;
|
|
319127
319140
|
var init_untrustedContextTracker = __esm({
|
|
319128
319141
|
"packages/core/dist/src/utils/untrustedContextTracker.js"() {
|
|
319129
319142
|
"use strict";
|
|
@@ -319328,6 +319341,7 @@ var init_untrustedContextTracker = __esm({
|
|
|
319328
319341
|
EXECUTABLE_SCRIPT_REGEX = /\.(sh|bash|zsh|ps1|bat|cmd|exe)$/i;
|
|
319329
319342
|
MODIFIED_BUILD_FILES_SYMBOL = Symbol("sessionModifiedBuildFiles");
|
|
319330
319343
|
ACKNOWLEDGED_UNTRUSTED_FLAGS_SYMBOL = Symbol("sessionAcknowledgedUntrustedFlags");
|
|
319344
|
+
SECURITY_WARNING_BYPASS_SYMBOL = Symbol("sessionSecurityWarningBypass");
|
|
319331
319345
|
}
|
|
319332
319346
|
});
|
|
319333
319347
|
|
|
@@ -343130,6 +343144,9 @@ exit $__code`;
|
|
|
343130
343144
|
return getUnacknowledgedUntrustedFlags(untrustedFlags, roots, config2);
|
|
343131
343145
|
}
|
|
343132
343146
|
hasTaintedOrBuildFileRisk() {
|
|
343147
|
+
if (isSecurityWarningBypassEnabled(this.context.config)) {
|
|
343148
|
+
return false;
|
|
343149
|
+
}
|
|
343133
343150
|
const command2 = stripShellWrapper(this.params.command);
|
|
343134
343151
|
const untrustedFlags = this.getUntrustedFlags(command2);
|
|
343135
343152
|
const modifiedBuildFiles = getModifiedBuildFiles(this.context.config);
|
|
@@ -343286,6 +343303,9 @@ exit $__code`;
|
|
|
343286
343303
|
return;
|
|
343287
343304
|
}
|
|
343288
343305
|
acknowledgeUntrustedFlags(untrustedFlags, rootCommands, this.context.config);
|
|
343306
|
+
if (hasSecurityWarning && (outcome === ToolConfirmationOutcome.ProceedAlways || outcome === ToolConfirmationOutcome.ProceedAlwaysAndSave)) {
|
|
343307
|
+
acknowledgeAllSecurityWarnings(this.context.config);
|
|
343308
|
+
}
|
|
343289
343309
|
if (isBuildCmd && modifiedBuildFiles.length > 0) {
|
|
343290
343310
|
resetModifiedBuildFiles(this.context.config);
|
|
343291
343311
|
}
|
|
@@ -401425,6 +401445,7 @@ var init_config4 = __esm({
|
|
|
401425
401445
|
this.skillManager.reset();
|
|
401426
401446
|
resetModifiedBuildFiles(this);
|
|
401427
401447
|
resetAcknowledgedUntrustedFlags(this);
|
|
401448
|
+
resetSecurityWarningBypass(this);
|
|
401428
401449
|
this.latestApiRequest = void 0;
|
|
401429
401450
|
this.lastModeSwitchTime = performance.now();
|
|
401430
401451
|
this.compressionTruncationCounter = 0;
|
|
@@ -481386,7 +481407,7 @@ var GIT_COMMIT_INFO2;
|
|
|
481386
481407
|
var init_git_commit2 = __esm({
|
|
481387
481408
|
"packages/cli/src/generated/git-commit.ts"() {
|
|
481388
481409
|
"use strict";
|
|
481389
|
-
GIT_COMMIT_INFO2 = "
|
|
481410
|
+
GIT_COMMIT_INFO2 = "3868b69";
|
|
481390
481411
|
}
|
|
481391
481412
|
});
|
|
481392
481413
|
|
|
@@ -603703,7 +603724,8 @@ Inspect every line of the change below carefully before approving.`;
|
|
|
603703
603724
|
The following flags/arguments were sourced from external untrusted input (e.g., Buganizer ticket, external document):
|
|
603704
603725
|
` + confirmationDetails.untrustedFlags.map((f5) => ` \u2022 ${f5}`).join("\n") + `
|
|
603705
603726
|
Executing commands with flags sourced from untrusted input can execute arbitrary code on your machine.
|
|
603706
|
-
Carefully verify these flags before approving
|
|
603727
|
+
Carefully verify these flags before approving.
|
|
603728
|
+
"Allow for this session" approves these flags and stops further security prompts until the session ends.`;
|
|
603707
603729
|
securityWarnings2 = securityWarnings2 ? /* @__PURE__ */ (0, import_jsx_runtime113.jsxs)(import_jsx_runtime113.Fragment, { children: [
|
|
603708
603730
|
securityWarnings2,
|
|
603709
603731
|
/* @__PURE__ */ (0, import_jsx_runtime113.jsx)(WarningMessage, { text: flagsWarningText })
|
|
@@ -603719,7 +603741,8 @@ Carefully verify these flags before approving.`;
|
|
|
603719
603741
|
].join(", ");
|
|
603720
603742
|
const buildModWarningText = `\u26A0\uFE0F CAUTION: Build Configuration Was Recently Modified
|
|
603721
603743
|
Build file(s) (${modifiedBuildFileNames}) were modified earlier in this session. Running '${confirmationDetails.rootCommand}' will execute the updated build definitions.
|
|
603722
|
-
Ensure you trust all modifications made to build files before approving execution
|
|
603744
|
+
Ensure you trust all modifications made to build files before approving execution.
|
|
603745
|
+
"Allow for this session" stops further security prompts until the session ends.`;
|
|
603723
603746
|
securityWarnings2 = securityWarnings2 ? /* @__PURE__ */ (0, import_jsx_runtime113.jsxs)(import_jsx_runtime113.Fragment, { children: [
|
|
603724
603747
|
securityWarnings2,
|
|
603725
603748
|
/* @__PURE__ */ (0, import_jsx_runtime113.jsx)(WarningMessage, { text: buildModWarningText })
|