@mmmbuto/gemini-cli-termux 0.42.0-termux → 0.46.0-termux
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 +22 -2
- package/bundle/builtin/antigravity-support/SKILL.md +58 -0
- package/bundle/{chunk-BF6DCDLJ.js → chunk-4TSWR3AN.js} +145 -55
- package/bundle/{chunk-PL5MCDGY.js → chunk-6HI7VNOG.js} +55 -70
- package/bundle/{chunk-6PXDEURC.js → chunk-7QZTHDKK.js} +2 -4
- package/bundle/{chunk-ORXUJRZC.js → chunk-B7I47N5E.js} +3 -3
- package/bundle/{chunk-EHTAR2YP.js → chunk-G2G6HEZZ.js} +1 -1
- package/bundle/{chunk-LX6GOGBA.js → chunk-IB4Q6NBY.js} +123186 -73766
- package/bundle/{chunk-MP2YMAMR.js → chunk-IT3YFQ3I.js} +1 -1
- package/bundle/{chunk-RJTRUG2J.js → chunk-TUDYL3X4.js} +29 -5
- package/bundle/{chunk-A6KCGXPK.js → chunk-WUVOS6TV.js} +13 -6
- package/bundle/{chunk-SLMD2AMF.js → chunk-YGU42N5I.js} +847 -655
- package/bundle/{cleanup-RTDYF5DD.js → cleanup-GEP2OOHM.js} +4 -5
- package/bundle/{devtools-ZLHMA45S.js → devtools-V7NE4CQA.js} +1 -1
- package/bundle/{devtoolsService-SKRXJOXW.js → devtoolsService-EVM2JJLB.js} +5 -6
- package/bundle/{dist-B3HBIK36.js → dist-R3LOFA4X.js} +331 -285
- package/bundle/docs/changelogs/index.md +59 -0
- package/bundle/docs/changelogs/latest.md +201 -167
- package/bundle/docs/changelogs/preview.md +45 -102
- package/bundle/docs/cli/auto-memory.md +61 -40
- package/bundle/docs/cli/gemini-md.md +0 -2
- package/bundle/docs/cli/plan-mode.md +0 -1
- package/bundle/docs/cli/settings.md +19 -19
- package/bundle/docs/cli/tutorials/memory-management.md +3 -3
- package/bundle/docs/extensions/reference.md +16 -0
- package/bundle/docs/extensions/releasing.md +58 -24
- package/bundle/docs/extensions/writing-extensions.md +7 -0
- package/bundle/docs/get-started/installation.mdx +2 -2
- package/bundle/docs/issue-and-pr-automation.md +29 -1
- package/bundle/docs/reference/commands.md +0 -3
- package/bundle/docs/reference/configuration.md +173 -78
- package/bundle/docs/reference/keyboard-shortcuts.md +23 -0
- package/bundle/docs/reference/tools.md +0 -2
- package/bundle/docs/tools/mcp-server.md +24 -3
- package/bundle/docs/tools/memory.md +10 -13
- package/bundle/examples/custom-commands/commands/fs/grep-code.toml +6 -0
- package/bundle/examples/custom-commands/gemini-extension.json +4 -0
- package/bundle/examples/exclude-tools/gemini-extension.json +5 -0
- package/bundle/examples/hooks/gemini-extension.json +4 -0
- package/bundle/examples/hooks/hooks/hooks.json +14 -0
- package/bundle/examples/hooks/scripts/on-start.js +8 -0
- package/bundle/examples/mcp-server/README.md +35 -0
- package/bundle/examples/mcp-server/example.js +60 -0
- package/bundle/examples/mcp-server/gemini-extension.json +11 -0
- package/bundle/examples/mcp-server/package.json +11 -0
- package/bundle/examples/policies/README.md +41 -0
- package/bundle/examples/policies/gemini-extension.json +5 -0
- package/bundle/examples/policies/policies/policies.toml +28 -0
- package/bundle/examples/skills/gemini-extension.json +4 -0
- package/bundle/examples/skills/skills/greeter/SKILL.md +7 -0
- package/bundle/examples/themes-example/README.md +31 -0
- package/bundle/examples/themes-example/gemini-extension.json +29 -0
- package/bundle/{gemini-NJWIVDFH.js → gemini-SGAFQX2R.js} +450 -297
- package/bundle/gemini.js +18 -13
- package/bundle/{dist-T73EYRDX.js → https-proxy-agent-AVGR4LHR.js} +8 -3
- package/bundle/{interactiveCli-QHKQZZJU.js → interactiveCli-MEEXSI2X.js} +1922 -1675
- package/bundle/{liteRtServerManager-USDJEPCM.js → liteRtServerManager-3EZO3JZ5.js} +6 -7
- package/bundle/{oauth2-provider-ARATJNEE.js → oauth2-provider-AJMTKEL6.js} +8 -10
- package/bundle/package.json +1 -1
- package/bundle/policies/plan.toml +1 -1
- package/bundle/policies/write.toml +0 -7
- package/bundle/src-LG4OHBW7.js +343 -0
- package/bundle/{start-IWR7MCIR.js → start-YW7YIVR7.js} +8 -9
- package/bundle/worker/worker-entry.js +7863 -0
- package/package.json +3 -3
- package/bundle/chunk-2X6HJV2G.js +0 -52710
- package/bundle/memoryDiscovery-EEGUKQ5C.js +0 -29
- package/bundle/node_modules/@google/gemini-cli-devtools/dist/client/main.js +0 -96
- package/bundle/node_modules/@google/gemini-cli-devtools/dist/src/_client-assets.d.ts +0 -7
- package/bundle/node_modules/@google/gemini-cli-devtools/dist/src/_client-assets.js +0 -9
- package/bundle/node_modules/@google/gemini-cli-devtools/dist/src/_client-assets.js.map +0 -1
- package/bundle/node_modules/@google/gemini-cli-devtools/dist/src/index.d.ts +0 -48
- package/bundle/node_modules/@google/gemini-cli-devtools/dist/src/index.js +0 -333
- package/bundle/node_modules/@google/gemini-cli-devtools/dist/src/index.js.map +0 -1
- package/bundle/node_modules/@google/gemini-cli-devtools/dist/src/types.d.ts +0 -36
- package/bundle/node_modules/@google/gemini-cli-devtools/dist/src/types.js +0 -7
- package/bundle/node_modules/@google/gemini-cli-devtools/dist/src/types.js.map +0 -1
- package/bundle/node_modules/@google/gemini-cli-devtools/package.json +0 -33
- package/bundle/policies/memory-manager.toml +0 -20
package/README.md
CHANGED
|
@@ -3,13 +3,33 @@
|
|
|
3
3
|
[](https://www.npmjs.com/package/@mmmbuto/gemini-cli-termux)
|
|
4
4
|
[](./LICENSE)
|
|
5
5
|
|
|
6
|
+
> ⚠️ **End-of-life notice — effective 18 June 2026**
|
|
7
|
+
>
|
|
8
|
+
> On **18 June 2026**, Google will stop serving Gemini CLI requests for the
|
|
9
|
+
> Google AI free tier, Google AI Pro and Google AI Ultra, including the OAuth
|
|
10
|
+
> path used by most Termux users. Free-tier users are being migrated upstream to
|
|
11
|
+
> [Antigravity CLI](https://antigravity.google/docs/gcli-migration).
|
|
12
|
+
>
|
|
13
|
+
> Upstream `google-gemini/gemini-cli` remains Apache-2.0 open source, but only
|
|
14
|
+
> paid enterprise paths (Vertex AI, Gemini Enterprise, Gemini Code Assist
|
|
15
|
+
> Standard/Enterprise) are expected to keep working after that date.
|
|
16
|
+
>
|
|
17
|
+
> **Despite the scheduled EOL, this fork has been refreshed one last time to
|
|
18
|
+
> `0.46.0-termux`** to align with the final upstream stable line. This is a
|
|
19
|
+
> one-time courtesy update past the freeze; no further upstream tracking is
|
|
20
|
+
> planned. The repository stays as an Apache-2.0 working archive for study and
|
|
21
|
+
> reference.
|
|
22
|
+
>
|
|
23
|
+
> _Per aspera ad astra._
|
|
24
|
+
|
|
6
25
|
Termux-first build of [Gemini CLI](https://github.com/google-gemini/gemini-cli)
|
|
7
26
|
for Android ARM64.
|
|
8
27
|
|
|
9
|
-
This fork
|
|
28
|
+
This fork tracked upstream release-by-release with the fork delta limited to
|
|
10
29
|
Android/Termux compatibility, packaging, and validation assets.
|
|
11
30
|
|
|
12
|
-
|
|
31
|
+
Latest fork release: `0.46.0-termux` (one-time refresh past the freeze;
|
|
32
|
+
consumer EOL effective 18 June 2026).
|
|
13
33
|
|
|
14
34
|
## Install
|
|
15
35
|
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: antigravity-support
|
|
3
|
+
description: Use when the user asks questions, seeks help, or requests instructions related to installing, setting up, or migrating to Antigravity CLI. This skill provides the latest up to date details, requirements, and commands sourced from the official Antigravity CLI documentation.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Antigravity CLI Support
|
|
7
|
+
|
|
8
|
+
This skill provides up-to-date information on how to install, configure, use, and migrate to Antigravity CLI, sourced from the official documentation at https://antigravity.google/docs/cli-getting-started.
|
|
9
|
+
|
|
10
|
+
## What is Antigravity CLI?
|
|
11
|
+
|
|
12
|
+
Antigravity CLI is a next-generation terminal interface for collaborating with autonomous agents on local codebases. It is designed to be highly interactive and agent-driven, launching a Terminal User Interface (TUI) to coordinate code generation, reasoning, and workspace tasks.
|
|
13
|
+
|
|
14
|
+
Key Features:
|
|
15
|
+
- **Autonomous Agent Collaboration:** Work directly with agents within your terminal.
|
|
16
|
+
- **Interactive TUI:** A full terminal user interface designed for agent workflows.
|
|
17
|
+
- **Workspace Integration:** Deep understanding of your local workspace structure and context.
|
|
18
|
+
|
|
19
|
+
## Installation
|
|
20
|
+
|
|
21
|
+
To install the Antigravity CLI on your machine:
|
|
22
|
+
|
|
23
|
+
### macOS / Linux (Fast-Path Script)
|
|
24
|
+
Run the following standard curl command in your terminal:
|
|
25
|
+
```bash
|
|
26
|
+
curl -fsSL https://antigravity.google/cli/install.sh | bash
|
|
27
|
+
```
|
|
28
|
+
This script downloads, verifies, and installs the latest version of Antigravity, and automatically registers the `agy` binary in your PATH.
|
|
29
|
+
|
|
30
|
+
### Windows (PowerShell)
|
|
31
|
+
For Windows environments, install via the official PowerShell setup command:
|
|
32
|
+
```powershell
|
|
33
|
+
irm https://antigravity.google/cli/install.ps1 | iex
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
## Initial Setup & Configuration
|
|
37
|
+
|
|
38
|
+
Once installed, navigate to any project or workspace directory and run:
|
|
39
|
+
```bash
|
|
40
|
+
agy
|
|
41
|
+
```
|
|
42
|
+
This command starts the Antigravity CLI. The first time you launch it, the interactive TUI will guide you through:
|
|
43
|
+
1. **Workspace Trust Verification:** Confirming trust for the workspace folder to allow secure local command execution and file edits.
|
|
44
|
+
2. **Visual Theme Configuration:** Setting up your preferred interactive terminal aesthetic and layout.
|
|
45
|
+
3. **Rendering Modes:** Tailoring TUI performance and drawing behaviors to your terminal capabilities.
|
|
46
|
+
|
|
47
|
+
## How to Migrate to Antigravity CLI
|
|
48
|
+
|
|
49
|
+
If you are transitioning or migrating from another tool (such as Gemini CLI) to Antigravity CLI, follow these steps:
|
|
50
|
+
1. **Check Requirements:** Ensure your local environment meets standard requirements (e.g., node, git, shell access) and is running a compatible operating system (macOS, Linux, or Windows).
|
|
51
|
+
2. **Install Antigravity:** Run the installation script above to make the `agy` command globally available.
|
|
52
|
+
3. **Verify Installation:** Test the installation by running `agy --version` or launching `agy` in an empty or sample directory.
|
|
53
|
+
4. **Transition Workspaces:** Run `agy` directly inside your project workspace root. The initial setup assistant will guide you to import or configure trust policies, similar to those you might have used previously.
|
|
54
|
+
|
|
55
|
+
## Official Resources and Learning More
|
|
56
|
+
|
|
57
|
+
If you need more details or have advanced configuration/migration needs, please visit the official documentation:
|
|
58
|
+
- **Official Documentation:** https://antigravity.google/docs/cli-getting-started
|
|
@@ -2,18 +2,28 @@ const require = (await import('node:module')).createRequire(import.meta.url); co
|
|
|
2
2
|
import {
|
|
3
3
|
AuthProviderType,
|
|
4
4
|
AuthType,
|
|
5
|
+
CoreEvent,
|
|
5
6
|
CoreToolCallStatus,
|
|
6
7
|
DEFAULT_MODEL_CONFIGS,
|
|
7
8
|
DEFAULT_TRUNCATE_TOOL_OUTPUT_THRESHOLD,
|
|
9
|
+
EDITOR_OPTIONS,
|
|
10
|
+
FatalConfigError,
|
|
11
|
+
GEMINI_DIR,
|
|
8
12
|
SESSION_FILE_PREFIX,
|
|
13
|
+
Storage,
|
|
9
14
|
TOOL_OUTPUTS_DIR,
|
|
10
15
|
ansiRegex,
|
|
11
16
|
checkExhaustive,
|
|
12
17
|
checkPathTrust,
|
|
18
|
+
coreEvents,
|
|
13
19
|
createCache,
|
|
20
|
+
debugLogger,
|
|
14
21
|
deleteSessionArtifactsAsync,
|
|
15
22
|
deleteSubagentSessionDirAndArtifactsAsync,
|
|
23
|
+
external_exports,
|
|
24
|
+
getErrorMessage,
|
|
16
25
|
getFsErrorMessage,
|
|
26
|
+
homedir,
|
|
17
27
|
import_lru_cache,
|
|
18
28
|
isHeadlessMode,
|
|
19
29
|
loadConversationRecord,
|
|
@@ -22,18 +32,7 @@ import {
|
|
|
22
32
|
require_strip_json_comments,
|
|
23
33
|
sanitizeFilenamePart,
|
|
24
34
|
stripAnsi
|
|
25
|
-
} from "./chunk-
|
|
26
|
-
import {
|
|
27
|
-
CoreEvent,
|
|
28
|
-
FatalConfigError,
|
|
29
|
-
GEMINI_DIR,
|
|
30
|
-
Storage,
|
|
31
|
-
coreEvents,
|
|
32
|
-
debugLogger,
|
|
33
|
-
external_exports,
|
|
34
|
-
getErrorMessage,
|
|
35
|
-
homedir
|
|
36
|
-
} from "./chunk-2X6HJV2G.js";
|
|
35
|
+
} from "./chunk-IB4Q6NBY.js";
|
|
37
36
|
import {
|
|
38
37
|
__commonJS,
|
|
39
38
|
__require,
|
|
@@ -9962,9 +9961,13 @@ var getAllSessionFiles = async (chatsDir, currentSessionId, options = {}) => {
|
|
|
9962
9961
|
if (!content) {
|
|
9963
9962
|
return { fileName: file, sessionInfo: null };
|
|
9964
9963
|
}
|
|
9965
|
-
if (!content.sessionId
|
|
9964
|
+
if (!content.sessionId) {
|
|
9966
9965
|
return { fileName: file, sessionInfo: null };
|
|
9967
9966
|
}
|
|
9967
|
+
const fileTimestamp = !content.startTime || !content.lastUpdated ? (await fs.stat(filePath).catch(() => void 0))?.mtime.toISOString() : void 0;
|
|
9968
|
+
const fallbackTimestamp = fileTimestamp ?? (/* @__PURE__ */ new Date()).toISOString();
|
|
9969
|
+
const startTime = content.startTime || content.lastUpdated || fallbackTimestamp;
|
|
9970
|
+
const lastUpdated = content.lastUpdated || content.startTime || fallbackTimestamp;
|
|
9968
9971
|
if (!content.hasUserOrAssistantMessage) {
|
|
9969
9972
|
return { fileName: file, sessionInfo: null };
|
|
9970
9973
|
}
|
|
@@ -9986,8 +9989,8 @@ var getAllSessionFiles = async (chatsDir, currentSessionId, options = {}) => {
|
|
|
9986
9989
|
id: content.sessionId,
|
|
9987
9990
|
file: file.replace(/\.jsonl?$/, ""),
|
|
9988
9991
|
fileName: file,
|
|
9989
|
-
startTime
|
|
9990
|
-
lastUpdated
|
|
9992
|
+
startTime,
|
|
9993
|
+
lastUpdated,
|
|
9991
9994
|
messageCount: content.messageCount ?? content.messages.length,
|
|
9992
9995
|
displayName: content.summary ? stripUnsafeCharacters(content.summary) : firstUserMessage,
|
|
9993
9996
|
firstUserMessage,
|
|
@@ -10141,10 +10144,15 @@ var SessionSelector = class {
|
|
|
10141
10144
|
if (!sessionData) {
|
|
10142
10145
|
throw new Error("Failed to load session data");
|
|
10143
10146
|
}
|
|
10147
|
+
const normalizedSessionData = {
|
|
10148
|
+
...sessionData,
|
|
10149
|
+
startTime: sessionData.startTime || sessionInfo.startTime,
|
|
10150
|
+
lastUpdated: sessionData.lastUpdated || sessionInfo.lastUpdated
|
|
10151
|
+
};
|
|
10144
10152
|
const displayInfo = `Session ${sessionInfo.index}: ${sessionInfo.firstUserMessage} (${sessionInfo.messageCount} messages, ${formatRelativeTime(sessionInfo.lastUpdated)})`;
|
|
10145
10153
|
return {
|
|
10146
10154
|
sessionPath,
|
|
10147
|
-
sessionData,
|
|
10155
|
+
sessionData: normalizedSessionData,
|
|
10148
10156
|
displayInfo
|
|
10149
10157
|
};
|
|
10150
10158
|
} catch (error) {
|
|
@@ -10171,7 +10179,11 @@ function convertSessionToHistoryFormats(messages) {
|
|
|
10171
10179
|
const displayContentString = msg.displayContent ? partListUnionToString(msg.displayContent) : void 0;
|
|
10172
10180
|
const contentString = partListUnionToString(msg.content);
|
|
10173
10181
|
const uiText = displayContentString || contentString;
|
|
10174
|
-
|
|
10182
|
+
const trimmedText = uiText.trim();
|
|
10183
|
+
if (trimmedText.startsWith("<session_context>") || trimmedText.startsWith("<hook_context>")) {
|
|
10184
|
+
continue;
|
|
10185
|
+
}
|
|
10186
|
+
if (trimmedText) {
|
|
10175
10187
|
let messageType;
|
|
10176
10188
|
switch (msg.type) {
|
|
10177
10189
|
case "user":
|
|
@@ -10531,8 +10543,8 @@ async function cleanupToolOutputFiles(settings, debugMode = false, projectTempDi
|
|
|
10531
10543
|
files.map(async (file) => {
|
|
10532
10544
|
try {
|
|
10533
10545
|
const filePath = path2.join(toolOutputDir, file.name);
|
|
10534
|
-
const
|
|
10535
|
-
return { name: file.name, mtime:
|
|
10546
|
+
const stat3 = await fs2.stat(filePath);
|
|
10547
|
+
return { name: file.name, mtime: stat3.mtime };
|
|
10536
10548
|
} catch (error) {
|
|
10537
10549
|
debugLogger.debug(
|
|
10538
10550
|
`Failed to stat file ${file.name}: ${error instanceof Error ? error.message : "Unknown error"}`
|
|
@@ -10585,12 +10597,12 @@ async function cleanupToolOutputFiles(settings, debugMode = false, projectTempDi
|
|
|
10585
10597
|
continue;
|
|
10586
10598
|
}
|
|
10587
10599
|
const subdirPath = path2.join(toolOutputDir, subdir.name);
|
|
10588
|
-
const
|
|
10600
|
+
const stat3 = await fs2.stat(subdirPath);
|
|
10589
10601
|
let shouldDelete = false;
|
|
10590
10602
|
if (retentionConfig.maxAge) {
|
|
10591
10603
|
const maxAgeMs = parseRetentionPeriod(retentionConfig.maxAge);
|
|
10592
10604
|
const cutoffDate = new Date(now.getTime() - maxAgeMs);
|
|
10593
|
-
if (
|
|
10605
|
+
if (stat3.mtime < cutoffDate) {
|
|
10594
10606
|
shouldDelete = true;
|
|
10595
10607
|
}
|
|
10596
10608
|
}
|
|
@@ -12403,12 +12415,26 @@ var SETTINGS_SCHEMA = {
|
|
|
12403
12415
|
showInDialog: false,
|
|
12404
12416
|
properties: {
|
|
12405
12417
|
preferredEditor: {
|
|
12406
|
-
type: "
|
|
12418
|
+
type: "enum",
|
|
12407
12419
|
label: "Preferred Editor",
|
|
12408
12420
|
category: "General",
|
|
12409
12421
|
requiresRestart: false,
|
|
12410
12422
|
default: void 0,
|
|
12411
|
-
description:
|
|
12423
|
+
description: oneLine`
|
|
12424
|
+
The preferred editor to open files in. Must be one of the built-in
|
|
12425
|
+
supported identifiers. Use /editor in the CLI to pick interactively,
|
|
12426
|
+
or leave unset to use $VISUAL/$EDITOR.
|
|
12427
|
+
`,
|
|
12428
|
+
showInDialog: false,
|
|
12429
|
+
options: EDITOR_OPTIONS
|
|
12430
|
+
},
|
|
12431
|
+
openEditorInNewWindow: {
|
|
12432
|
+
type: "boolean",
|
|
12433
|
+
label: "Open Editor in New Window",
|
|
12434
|
+
category: "General",
|
|
12435
|
+
requiresRestart: false,
|
|
12436
|
+
default: false,
|
|
12437
|
+
description: "Open VS Code-family editors in a new window when editing files.",
|
|
12412
12438
|
showInDialog: false
|
|
12413
12439
|
},
|
|
12414
12440
|
vimMode: {
|
|
@@ -12630,6 +12656,15 @@ var SETTINGS_SCHEMA = {
|
|
|
12630
12656
|
default: true,
|
|
12631
12657
|
description: "Enable the Topic & Update communication model for reduced chattiness and structured progress reporting.",
|
|
12632
12658
|
showInDialog: true
|
|
12659
|
+
},
|
|
12660
|
+
logRagSnippets: {
|
|
12661
|
+
type: "boolean",
|
|
12662
|
+
label: "Log RAG Snippets",
|
|
12663
|
+
category: "General",
|
|
12664
|
+
requiresRestart: false,
|
|
12665
|
+
default: false,
|
|
12666
|
+
description: "Log full Code Customization (RAG) retrieved snippets to a local file for debugging.",
|
|
12667
|
+
showInDialog: true
|
|
12633
12668
|
}
|
|
12634
12669
|
}
|
|
12635
12670
|
},
|
|
@@ -14268,7 +14303,7 @@ var SETTINGS_SCHEMA = {
|
|
|
14268
14303
|
label: "Voice Stop Grace Period (ms)",
|
|
14269
14304
|
category: "Experimental",
|
|
14270
14305
|
requiresRestart: false,
|
|
14271
|
-
default:
|
|
14306
|
+
default: 4e3,
|
|
14272
14307
|
description: "How long to wait for final transcription after stopping recording.",
|
|
14273
14308
|
showInDialog: true
|
|
14274
14309
|
}
|
|
@@ -14300,6 +14335,15 @@ var SETTINGS_SCHEMA = {
|
|
|
14300
14335
|
default: false,
|
|
14301
14336
|
description: "Enable the agent session implementation for the interactive CLI.",
|
|
14302
14337
|
showInDialog: false
|
|
14338
|
+
},
|
|
14339
|
+
agentSessionSubagentEnabled: {
|
|
14340
|
+
type: "boolean",
|
|
14341
|
+
label: "Agent Session Subagent Enabled",
|
|
14342
|
+
category: "Experimental",
|
|
14343
|
+
requiresRestart: true,
|
|
14344
|
+
default: false,
|
|
14345
|
+
description: "Route subagent invocations through the AgentSession protocol instead of legacy executors.",
|
|
14346
|
+
showInDialog: false
|
|
14303
14347
|
}
|
|
14304
14348
|
}
|
|
14305
14349
|
},
|
|
@@ -14366,15 +14410,6 @@ var SETTINGS_SCHEMA = {
|
|
|
14366
14410
|
description: "Enables extension loading/unloading within the CLI session.",
|
|
14367
14411
|
showInDialog: false
|
|
14368
14412
|
},
|
|
14369
|
-
jitContext: {
|
|
14370
|
-
type: "boolean",
|
|
14371
|
-
label: "JIT Context Loading",
|
|
14372
|
-
category: "Experimental",
|
|
14373
|
-
requiresRestart: true,
|
|
14374
|
-
default: true,
|
|
14375
|
-
description: "Enable Just-In-Time (JIT) context loading. Defaults to true; set to false to opt out and load all GEMINI.md files into the system instruction up-front.",
|
|
14376
|
-
showInDialog: false
|
|
14377
|
-
},
|
|
14378
14413
|
useOSC52Paste: {
|
|
14379
14414
|
type: "boolean",
|
|
14380
14415
|
label: "Use OSC 52 Paste",
|
|
@@ -14496,15 +14531,6 @@ var SETTINGS_SCHEMA = {
|
|
|
14496
14531
|
}
|
|
14497
14532
|
}
|
|
14498
14533
|
},
|
|
14499
|
-
memoryV2: {
|
|
14500
|
-
type: "boolean",
|
|
14501
|
-
label: "Memory v2",
|
|
14502
|
-
category: "Experimental",
|
|
14503
|
-
requiresRestart: true,
|
|
14504
|
-
default: true,
|
|
14505
|
-
description: "Disable the built-in save_memory tool and let the main agent persist project context by editing markdown files directly with edit/write_file. Route facts across four tiers: team-shared conventions go to project GEMINI.md files, project-specific personal notes go to the per-project private memory folder (MEMORY.md as index + sibling .md files for detail), and cross-project personal preferences go to the global ~/.gemini/GEMINI.md (the only file under ~/.gemini/ that the agent can edit \u2014 settings, credentials, etc. remain off-limits). Set to false to fall back to the legacy save_memory tool.",
|
|
14506
|
-
showInDialog: true
|
|
14507
|
-
},
|
|
14508
14534
|
stressTestProfile: {
|
|
14509
14535
|
type: "boolean",
|
|
14510
14536
|
label: "Use the stress test profile to aggressively trigger context management.",
|
|
@@ -14532,6 +14558,15 @@ var SETTINGS_SCHEMA = {
|
|
|
14532
14558
|
description: "Suitable for general coding and software development tasks.",
|
|
14533
14559
|
showInDialog: true
|
|
14534
14560
|
},
|
|
14561
|
+
powerUserProfile: {
|
|
14562
|
+
type: "boolean",
|
|
14563
|
+
label: "Use the power user profile to manage agent contexts.",
|
|
14564
|
+
category: "Experimental",
|
|
14565
|
+
requiresRestart: true,
|
|
14566
|
+
default: false,
|
|
14567
|
+
description: "Less cache friendly version of the generalist profile.",
|
|
14568
|
+
showInDialog: false
|
|
14569
|
+
},
|
|
14535
14570
|
contextManagement: {
|
|
14536
14571
|
type: "boolean",
|
|
14537
14572
|
label: "Enable Context Management",
|
|
@@ -15500,7 +15535,10 @@ var SETTINGS_SCHEMA_DEFINITIONS = {
|
|
|
15500
15535
|
family: { type: "string" },
|
|
15501
15536
|
isPreview: { type: "boolean" },
|
|
15502
15537
|
isVisible: { type: "boolean" },
|
|
15503
|
-
dialogDescription: {
|
|
15538
|
+
dialogDescription: {
|
|
15539
|
+
type: "string",
|
|
15540
|
+
description: "A description of the model to display in the model selection dialog. For the 'auto' alias, this value is dynamically generated and any value provided here will be ignored."
|
|
15541
|
+
},
|
|
15504
15542
|
features: {
|
|
15505
15543
|
type: "object",
|
|
15506
15544
|
properties: {
|
|
@@ -15614,17 +15652,19 @@ function resolveEnvVarsInObjectInternal(obj, visited, customEnv) {
|
|
|
15614
15652
|
}
|
|
15615
15653
|
if (Array.isArray(obj)) {
|
|
15616
15654
|
if (visited.has(obj)) {
|
|
15617
|
-
|
|
15655
|
+
const copy = [...obj];
|
|
15656
|
+
const isTArray2 = (val) => Array.isArray(val);
|
|
15657
|
+
if (isTArray2(copy)) return copy;
|
|
15658
|
+
throw new Error("Unreachable");
|
|
15618
15659
|
}
|
|
15619
15660
|
visited.add(obj);
|
|
15620
|
-
const
|
|
15621
|
-
(item) => (
|
|
15622
|
-
// eslint-disable-next-line @typescript-eslint/no-unsafe-return
|
|
15623
|
-
resolveEnvVarsInObjectInternal(item, visited, customEnv)
|
|
15624
|
-
)
|
|
15661
|
+
const mapped = obj.map(
|
|
15662
|
+
(item) => resolveEnvVarsInObjectInternal(item, visited, customEnv)
|
|
15625
15663
|
);
|
|
15626
15664
|
visited.delete(obj);
|
|
15627
|
-
|
|
15665
|
+
const isTArray = (val) => Array.isArray(val);
|
|
15666
|
+
if (isTArray(mapped)) return mapped;
|
|
15667
|
+
throw new Error("Unreachable");
|
|
15628
15668
|
}
|
|
15629
15669
|
if (typeof obj === "object") {
|
|
15630
15670
|
if (visited.has(obj)) {
|
|
@@ -16175,6 +16215,14 @@ var LoadedSettings = class {
|
|
|
16175
16215
|
get merged() {
|
|
16176
16216
|
return this._merged;
|
|
16177
16217
|
}
|
|
16218
|
+
/**
|
|
16219
|
+
* Returns a merged settings object as if the folder were trusted.
|
|
16220
|
+
* This is useful for commands like 'mcp list' that want to show
|
|
16221
|
+
* what's configured even if it's currently disabled for security reasons.
|
|
16222
|
+
*/
|
|
16223
|
+
getMergedSettingsAsIfTrusted() {
|
|
16224
|
+
return this.computeMergedSettings(true);
|
|
16225
|
+
}
|
|
16178
16226
|
setTrusted(isTrusted) {
|
|
16179
16227
|
if (this.isTrusted === isTrusted) {
|
|
16180
16228
|
return;
|
|
@@ -16191,13 +16239,15 @@ var LoadedSettings = class {
|
|
|
16191
16239
|
originalSettings: {}
|
|
16192
16240
|
};
|
|
16193
16241
|
}
|
|
16194
|
-
computeMergedSettings() {
|
|
16242
|
+
computeMergedSettings(forceTrusted = false) {
|
|
16243
|
+
const isTrusted = forceTrusted || this.isTrusted;
|
|
16244
|
+
const workspace = forceTrusted ? this._workspaceFile : this.workspace;
|
|
16195
16245
|
const merged = mergeSettings(
|
|
16196
16246
|
this.system.settings,
|
|
16197
16247
|
this.systemDefaults.settings,
|
|
16198
16248
|
this.user.settings,
|
|
16199
|
-
|
|
16200
|
-
|
|
16249
|
+
workspace.settings,
|
|
16250
|
+
isTrusted
|
|
16201
16251
|
);
|
|
16202
16252
|
const adminSettingSchema = getSettingsSchema().admin;
|
|
16203
16253
|
if (adminSettingSchema?.properties) {
|
|
@@ -16213,8 +16263,7 @@ var LoadedSettings = class {
|
|
|
16213
16263
|
}
|
|
16214
16264
|
computeSnapshot() {
|
|
16215
16265
|
const cloneSettingsFile = (file) => ({
|
|
16216
|
-
|
|
16217
|
-
rawJson: file.rawJson,
|
|
16266
|
+
...file,
|
|
16218
16267
|
settings: structuredClone(file.settings),
|
|
16219
16268
|
originalSettings: structuredClone(file.originalSettings)
|
|
16220
16269
|
});
|
|
@@ -16294,6 +16343,47 @@ var LoadedSettings = class {
|
|
|
16294
16343
|
this._remoteAdminSettings = { admin };
|
|
16295
16344
|
this._merged = this.computeMergedSettings();
|
|
16296
16345
|
}
|
|
16346
|
+
/**
|
|
16347
|
+
* Returns a consolidated list of excluded MCP servers across all settings files.
|
|
16348
|
+
*/
|
|
16349
|
+
getConsolidatedExcludedMcpServers() {
|
|
16350
|
+
const scopes = [
|
|
16351
|
+
this.system,
|
|
16352
|
+
this.systemDefaults,
|
|
16353
|
+
this.user,
|
|
16354
|
+
this.workspace
|
|
16355
|
+
];
|
|
16356
|
+
return scopes.flatMap((scope) => {
|
|
16357
|
+
const excluded = scope?.settings?.mcp?.excluded;
|
|
16358
|
+
return Array.isArray(excluded) ? excluded : [];
|
|
16359
|
+
});
|
|
16360
|
+
}
|
|
16361
|
+
/**
|
|
16362
|
+
* Returns a consolidated list of allowed MCP servers (via intersection of all defined lists).
|
|
16363
|
+
*/
|
|
16364
|
+
getConsolidatedAllowedMcpServers() {
|
|
16365
|
+
const scopes = [
|
|
16366
|
+
this.system,
|
|
16367
|
+
this.systemDefaults,
|
|
16368
|
+
this.user,
|
|
16369
|
+
this.workspace
|
|
16370
|
+
];
|
|
16371
|
+
const definedAllowlists = scopes.flatMap((scope) => {
|
|
16372
|
+
const allowed = scope?.settings?.mcp?.allowed;
|
|
16373
|
+
return Array.isArray(allowed) ? [allowed] : [];
|
|
16374
|
+
});
|
|
16375
|
+
if (definedAllowlists.length === 0) {
|
|
16376
|
+
return void 0;
|
|
16377
|
+
}
|
|
16378
|
+
return definedAllowlists.reduce((acc, current) => {
|
|
16379
|
+
const normalizedCurrent = new Set(
|
|
16380
|
+
current.map((item) => item.toLowerCase().trim())
|
|
16381
|
+
);
|
|
16382
|
+
return acc.filter(
|
|
16383
|
+
(item) => normalizedCurrent.has(item.toLowerCase().trim())
|
|
16384
|
+
);
|
|
16385
|
+
});
|
|
16386
|
+
}
|
|
16297
16387
|
};
|
|
16298
16388
|
function findEnvFile(startDir, isTrusted, ignoreLocalEnv) {
|
|
16299
16389
|
let currentDir = path3.resolve(startDir);
|