@google/gemini-cli-core 0.39.0-preview.2 → 0.40.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/dist/docs/changelogs/index.md +21 -0
- package/dist/docs/changelogs/latest.md +253 -407
- package/dist/docs/changelogs/preview.md +236 -247
- package/dist/docs/cli/auto-memory.md +143 -0
- package/dist/docs/cli/enterprise.md +1 -1
- package/dist/docs/cli/plan-mode.md +3 -1
- package/dist/docs/cli/settings.md +29 -25
- package/dist/docs/cli/system-prompt.md +6 -6
- package/dist/docs/cli/telemetry.md +18 -11
- package/dist/docs/cli/tutorials/memory-management.md +2 -0
- package/dist/docs/get-started/{authentication.md → authentication.mdx} +139 -93
- package/dist/docs/get-started/index.md +3 -2
- package/dist/docs/get-started/installation.mdx +201 -0
- package/dist/docs/index.md +2 -2
- package/dist/docs/reference/configuration.md +88 -12
- package/dist/docs/reference/policy-engine.md +18 -12
- package/dist/docs/reference/tools.md +22 -0
- package/dist/docs/sidebar.json +13 -1
- package/dist/docs/tools/mcp-resources.md +44 -0
- package/dist/docs/tools/mcp-server.md +2 -1
- package/dist/docs/tools/tracker.md +61 -0
- package/dist/src/agents/agent-tool.js +1 -0
- package/dist/src/agents/agent-tool.js.map +1 -1
- package/dist/src/agents/agentLoader.d.ts +4 -4
- package/dist/src/agents/generalist-agent.js +3 -2
- package/dist/src/agents/generalist-agent.js.map +1 -1
- package/dist/src/agents/local-executor.js +4 -1
- package/dist/src/agents/local-executor.js.map +1 -1
- package/dist/src/agents/registry.js +0 -8
- package/dist/src/agents/registry.js.map +1 -1
- package/dist/src/agents/skill-extraction-agent.d.ts +3 -2
- package/dist/src/agents/skill-extraction-agent.js +72 -67
- package/dist/src/agents/skill-extraction-agent.js.map +1 -1
- package/dist/src/agents/skill-extraction-agent.test.js +54 -0
- package/dist/src/agents/skill-extraction-agent.test.js.map +1 -0
- package/dist/src/config/config.d.ts +21 -6
- package/dist/src/config/config.js +103 -19
- package/dist/src/config/config.js.map +1 -1
- package/dist/src/config/config.test.js +262 -6
- package/dist/src/config/config.test.js.map +1 -1
- package/dist/src/config/constants.d.ts +1 -0
- package/dist/src/config/constants.js +2 -0
- package/dist/src/config/constants.js.map +1 -1
- package/dist/src/config/memory.js +1 -1
- package/dist/src/config/memory.js.map +1 -1
- package/dist/src/config/path-validation.test.js +15 -6
- package/dist/src/config/path-validation.test.js.map +1 -1
- package/dist/src/config/projectRegistry.js +113 -32
- package/dist/src/config/projectRegistry.js.map +1 -1
- package/dist/src/config/projectRegistry.test.js +51 -0
- package/dist/src/config/projectRegistry.test.js.map +1 -1
- package/dist/src/config/storage.d.ts +3 -1
- package/dist/src/config/storage.js +6 -0
- package/dist/src/config/storage.js.map +1 -1
- package/dist/src/config/storage.test.js +12 -0
- package/dist/src/config/storage.test.js.map +1 -1
- package/dist/src/core/contentGenerator.d.ts +8 -1
- package/dist/src/core/contentGenerator.js +46 -4
- package/dist/src/core/contentGenerator.js.map +1 -1
- package/dist/src/core/contentGenerator.test.js +174 -8
- package/dist/src/core/contentGenerator.test.js.map +1 -1
- package/dist/src/core/geminiChat.test.js +1 -0
- package/dist/src/core/geminiChat.test.js.map +1 -1
- package/dist/src/core/geminiChat_network_retry.test.js +42 -0
- package/dist/src/core/geminiChat_network_retry.test.js.map +1 -1
- package/dist/src/core/localLiteRtLmClient.js +2 -0
- package/dist/src/core/localLiteRtLmClient.js.map +1 -1
- package/dist/src/core/localLiteRtLmClient.test.js +7 -0
- package/dist/src/core/localLiteRtLmClient.test.js.map +1 -1
- package/dist/src/core/loggingContentGenerator.js +3 -0
- package/dist/src/core/loggingContentGenerator.js.map +1 -1
- package/dist/src/core/loggingContentGenerator.test.js +1 -0
- package/dist/src/core/loggingContentGenerator.test.js.map +1 -1
- package/dist/src/core/prompts.d.ts +1 -1
- package/dist/src/core/prompts.js +2 -2
- package/dist/src/core/prompts.js.map +1 -1
- package/dist/src/core/prompts.test.js +2 -2
- package/dist/src/core/prompts.test.js.map +1 -1
- package/dist/src/generated/git-commit.d.ts +2 -2
- package/dist/src/generated/git-commit.js +2 -2
- package/dist/src/ide/ide-client.js +3 -4
- package/dist/src/ide/ide-client.js.map +1 -1
- package/dist/src/policy/policies/read-only.toml +4 -1
- package/dist/src/policy/policy-engine.js +4 -0
- package/dist/src/policy/policy-engine.js.map +1 -1
- package/dist/src/policy/policy-engine.test.js +25 -0
- package/dist/src/policy/policy-engine.test.js.map +1 -1
- package/dist/src/policy/toml-loader.test.js +5 -0
- package/dist/src/policy/toml-loader.test.js.map +1 -1
- package/dist/src/prompts/promptProvider.d.ts +1 -1
- package/dist/src/prompts/promptProvider.js +15 -7
- package/dist/src/prompts/promptProvider.js.map +1 -1
- package/dist/src/prompts/promptProvider.test.js +31 -1
- package/dist/src/prompts/promptProvider.test.js.map +1 -1
- package/dist/src/prompts/snippets-memory-v2.test.js +94 -0
- package/dist/src/prompts/snippets-memory-v2.test.js.map +1 -0
- package/dist/src/prompts/snippets.d.ts +19 -1
- package/dist/src/prompts/snippets.js +24 -3
- package/dist/src/prompts/snippets.js.map +1 -1
- package/dist/src/prompts/snippets.legacy.d.ts +6 -1
- package/dist/src/prompts/snippets.legacy.js +10 -3
- package/dist/src/prompts/snippets.legacy.js.map +1 -1
- package/dist/src/sandbox/linux/LinuxSandboxManager.js +16 -2
- package/dist/src/sandbox/linux/LinuxSandboxManager.js.map +1 -1
- package/dist/src/sandbox/linux/bwrapArgsBuilder.js +64 -36
- package/dist/src/sandbox/linux/bwrapArgsBuilder.js.map +1 -1
- package/dist/src/sandbox/linux/bwrapArgsBuilder.test.js +3 -3
- package/dist/src/sandbox/linux/bwrapArgsBuilder.test.js.map +1 -1
- package/dist/src/sandbox/macos/MacOsSandboxManager.js +13 -1
- package/dist/src/sandbox/macos/MacOsSandboxManager.js.map +1 -1
- package/dist/src/sandbox/macos/seatbeltArgsBuilder.js +61 -42
- package/dist/src/sandbox/macos/seatbeltArgsBuilder.js.map +1 -1
- package/dist/src/sandbox/windows/WindowsSandboxManager.js +12 -1
- package/dist/src/sandbox/windows/WindowsSandboxManager.js.map +1 -1
- package/dist/src/scheduler/policy.js +1 -2
- package/dist/src/scheduler/policy.js.map +1 -1
- package/dist/src/scheduler/policy.test.js +35 -2
- package/dist/src/scheduler/policy.test.js.map +1 -1
- package/dist/src/scheduler/scheduler.js +1 -0
- package/dist/src/scheduler/scheduler.js.map +1 -1
- package/dist/src/scheduler/scheduler.test.js +2 -0
- package/dist/src/scheduler/scheduler.test.js.map +1 -1
- package/dist/src/scheduler/scheduler_hooks.test.js +1 -0
- package/dist/src/scheduler/scheduler_hooks.test.js.map +1 -1
- package/dist/src/scheduler/scheduler_parallel.test.js +1 -0
- package/dist/src/scheduler/scheduler_parallel.test.js.map +1 -1
- package/dist/src/scheduler/tool-executor.js +1 -0
- package/dist/src/scheduler/tool-executor.js.map +1 -1
- package/dist/src/services/chatRecordingService.d.ts +1 -0
- package/dist/src/services/chatRecordingService.js +48 -19
- package/dist/src/services/chatRecordingService.js.map +1 -1
- package/dist/src/services/memoryService.d.ts +15 -1
- package/dist/src/services/memoryService.js +276 -57
- package/dist/src/services/memoryService.js.map +1 -1
- package/dist/src/services/memoryService.test.js +296 -2
- package/dist/src/services/memoryService.test.js.map +1 -1
- package/dist/src/services/sandboxManager.integration.test.js +204 -0
- package/dist/src/services/sandboxManager.integration.test.js.map +1 -1
- package/dist/src/services/sandboxManager.js +16 -0
- package/dist/src/services/sandboxManager.js.map +1 -1
- package/dist/src/services/sessionSummaryUtils.d.ts +1 -1
- package/dist/src/services/sessionSummaryUtils.js +111 -38
- package/dist/src/services/sessionSummaryUtils.js.map +1 -1
- package/dist/src/services/sessionSummaryUtils.test.js +204 -51
- package/dist/src/services/sessionSummaryUtils.test.js.map +1 -1
- package/dist/src/services/shellExecutionService.js +7 -1
- package/dist/src/services/shellExecutionService.js.map +1 -1
- package/dist/src/telemetry/config.js +3 -0
- package/dist/src/telemetry/config.js.map +1 -1
- package/dist/src/telemetry/conseca-logger.test.js +1 -0
- package/dist/src/telemetry/conseca-logger.test.js.map +1 -1
- package/dist/src/telemetry/loggers.test.js +72 -4
- package/dist/src/telemetry/loggers.test.js.map +1 -1
- package/dist/src/telemetry/memory-monitor.d.ts +1 -0
- package/dist/src/telemetry/memory-monitor.js +8 -1
- package/dist/src/telemetry/memory-monitor.js.map +1 -1
- package/dist/src/telemetry/memory-monitor.test.js +6 -1
- package/dist/src/telemetry/memory-monitor.test.js.map +1 -1
- package/dist/src/telemetry/trace.d.ts +1 -0
- package/dist/src/telemetry/trace.js +33 -13
- package/dist/src/telemetry/trace.js.map +1 -1
- package/dist/src/telemetry/trace.test.js +50 -10
- package/dist/src/telemetry/trace.test.js.map +1 -1
- package/dist/src/telemetry/types.js +11 -4
- package/dist/src/telemetry/types.js.map +1 -1
- package/dist/src/tools/definitions/base-declarations.d.ts +2 -0
- package/dist/src/tools/definitions/base-declarations.js +3 -0
- package/dist/src/tools/definitions/base-declarations.js.map +1 -1
- package/dist/src/tools/definitions/coreTools.d.ts +3 -1
- package/dist/src/tools/definitions/coreTools.js +13 -1
- package/dist/src/tools/definitions/coreTools.js.map +1 -1
- package/dist/src/tools/definitions/model-family-sets/default-legacy.js +29 -1
- package/dist/src/tools/definitions/model-family-sets/default-legacy.js.map +1 -1
- package/dist/src/tools/definitions/model-family-sets/gemini-3.js +29 -1
- package/dist/src/tools/definitions/model-family-sets/gemini-3.js.map +1 -1
- package/dist/src/tools/definitions/types.d.ts +2 -0
- package/dist/src/tools/get-internal-docs.js +5 -2
- package/dist/src/tools/get-internal-docs.js.map +1 -1
- package/dist/src/tools/list-mcp-resources.d.ts +24 -0
- package/dist/src/tools/list-mcp-resources.js +74 -0
- package/dist/src/tools/list-mcp-resources.js.map +1 -0
- package/dist/src/tools/list-mcp-resources.test.d.ts +6 -0
- package/dist/src/tools/list-mcp-resources.test.js +79 -0
- package/dist/src/tools/list-mcp-resources.test.js.map +1 -0
- package/dist/src/tools/mcp-client-manager.d.ts +3 -1
- package/dist/src/tools/mcp-client-manager.js +24 -1
- package/dist/src/tools/mcp-client-manager.js.map +1 -1
- package/dist/src/tools/mcp-client-manager.test.js +43 -0
- package/dist/src/tools/mcp-client-manager.test.js.map +1 -1
- package/dist/src/tools/memoryTool.d.ts +2 -1
- package/dist/src/tools/memoryTool.js +42 -13
- package/dist/src/tools/memoryTool.js.map +1 -1
- package/dist/src/tools/memoryTool.test.js +23 -3
- package/dist/src/tools/memoryTool.test.js.map +1 -1
- package/dist/src/tools/read-mcp-resource.d.ts +25 -0
- package/dist/src/tools/read-mcp-resource.js +120 -0
- package/dist/src/tools/read-mcp-resource.js.map +1 -0
- package/dist/src/tools/read-mcp-resource.test.d.ts +6 -0
- package/dist/src/tools/read-mcp-resource.test.js +110 -0
- package/dist/src/tools/read-mcp-resource.test.js.map +1 -0
- package/dist/src/tools/ripGrep.d.ts +3 -2
- package/dist/src/tools/ripGrep.js +25 -54
- package/dist/src/tools/ripGrep.js.map +1 -1
- package/dist/src/tools/ripGrep.test.js +73 -131
- package/dist/src/tools/ripGrep.test.js.map +1 -1
- package/dist/src/tools/shell.js +38 -12
- package/dist/src/tools/shell.js.map +1 -1
- package/dist/src/tools/shell.test.js +410 -25
- package/dist/src/tools/shell.test.js.map +1 -1
- package/dist/src/tools/tool-error.d.ts +1 -0
- package/dist/src/tools/tool-error.js +1 -0
- package/dist/src/tools/tool-error.js.map +1 -1
- package/dist/src/tools/tool-names.d.ts +4 -4
- package/dist/src/tools/tool-names.js +6 -2
- package/dist/src/tools/tool-names.js.map +1 -1
- package/dist/src/tools/tool-registry.js +8 -1
- package/dist/src/tools/tool-registry.js.map +1 -1
- package/dist/src/utils/filesearch/fileSearch.d.ts +2 -0
- package/dist/src/utils/filesearch/fileSearch.js +97 -6
- package/dist/src/utils/filesearch/fileSearch.js.map +1 -1
- package/dist/src/utils/filesearch/fileSearch.test.js +54 -0
- package/dist/src/utils/filesearch/fileSearch.test.js.map +1 -1
- package/dist/src/utils/filesearch/fileWatcher.d.ts +25 -0
- package/dist/src/utils/filesearch/fileWatcher.js +86 -0
- package/dist/src/utils/filesearch/fileWatcher.js.map +1 -0
- package/dist/src/utils/filesearch/fileWatcher.test.d.ts +6 -0
- package/dist/src/utils/filesearch/fileWatcher.test.js +142 -0
- package/dist/src/utils/filesearch/fileWatcher.test.js.map +1 -0
- package/dist/src/utils/gitIgnoreParser.js +1 -1
- package/dist/src/utils/gitIgnoreParser.js.map +1 -1
- package/dist/src/utils/ignoreFileParser.js +1 -1
- package/dist/src/utils/ignoreFileParser.js.map +1 -1
- package/dist/src/utils/memoryDiscovery.js +15 -5
- package/dist/src/utils/memoryDiscovery.js.map +1 -1
- package/dist/src/utils/retry.js +18 -6
- package/dist/src/utils/retry.js.map +1 -1
- package/dist/src/utils/retry.test.js +30 -0
- package/dist/src/utils/retry.test.js.map +1 -1
- package/dist/src/utils/shell-utils.d.ts +1 -0
- package/dist/src/utils/shell-utils.js +106 -0
- package/dist/src/utils/shell-utils.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +5 -3
- package/vendor/ripgrep/rg-darwin-arm64 +0 -0
- package/vendor/ripgrep/rg-darwin-x64 +0 -0
- package/vendor/ripgrep/rg-linux-arm64 +0 -0
- package/vendor/ripgrep/rg-linux-x64 +0 -0
- package/vendor/ripgrep/rg-win32-x64.exe +0 -0
- package/dist/docs/get-started/installation.md +0 -181
- package/dist/google-gemini-cli-core-0.39.0-preview.1.tgz +0 -0
- package/dist/src/agents/memory-manager-agent.d.ts +0 -25
- package/dist/src/agents/memory-manager-agent.js +0 -138
- package/dist/src/agents/memory-manager-agent.js.map +0 -1
- package/dist/src/agents/memory-manager-agent.test.js +0 -123
- package/dist/src/agents/memory-manager-agent.test.js.map +0 -1
- package/dist/src/prompts/snippets-memory-manager.test.js +0 -31
- package/dist/src/prompts/snippets-memory-manager.test.js.map +0 -1
- /package/dist/src/agents/{memory-manager-agent.test.d.ts → skill-extraction-agent.test.d.ts} +0 -0
- /package/dist/src/prompts/{snippets-memory-manager.test.d.ts → snippets-memory-v2.test.d.ts} +0 -0
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
# Auto Memory
|
|
2
|
+
|
|
3
|
+
Auto Memory is an experimental feature that mines your past Gemini CLI sessions
|
|
4
|
+
in the background and turns recurring workflows into reusable
|
|
5
|
+
[Agent Skills](./skills.md). You review, accept, or discard each extracted skill
|
|
6
|
+
before it becomes available to future sessions.
|
|
7
|
+
|
|
8
|
+
<!-- prettier-ignore -->
|
|
9
|
+
> [!NOTE]
|
|
10
|
+
> This is an experimental feature currently under active development.
|
|
11
|
+
|
|
12
|
+
## Overview
|
|
13
|
+
|
|
14
|
+
Every session you run with Gemini CLI is recorded locally as a transcript. Auto
|
|
15
|
+
Memory scans those transcripts for procedural patterns that recur across
|
|
16
|
+
sessions, then drafts each pattern as a `SKILL.md` file in a project-local
|
|
17
|
+
inbox. You inspect the draft, decide whether it captures real expertise, and
|
|
18
|
+
promote it to your global or workspace skills directory if you want it.
|
|
19
|
+
|
|
20
|
+
You'll use Auto Memory when you want to:
|
|
21
|
+
|
|
22
|
+
- **Capture team workflows** that you find yourself walking the agent through
|
|
23
|
+
more than once.
|
|
24
|
+
- **Codify hard-won fixes** for project-specific landmines so future sessions
|
|
25
|
+
avoid them.
|
|
26
|
+
- **Bootstrap a skills library** without writing every `SKILL.md` by hand.
|
|
27
|
+
|
|
28
|
+
Auto Memory complements—but does not replace—the
|
|
29
|
+
[`save_memory` tool](../tools/memory.md), which captures single facts into
|
|
30
|
+
`GEMINI.md`. Auto Memory captures multi-step procedures into skills.
|
|
31
|
+
|
|
32
|
+
## Prerequisites
|
|
33
|
+
|
|
34
|
+
- Gemini CLI installed and authenticated.
|
|
35
|
+
- At least 10 user messages across recent, idle sessions in the project. Auto
|
|
36
|
+
Memory ignores active or trivial sessions.
|
|
37
|
+
|
|
38
|
+
## How to enable Auto Memory
|
|
39
|
+
|
|
40
|
+
Auto Memory is off by default. Enable it in your settings file:
|
|
41
|
+
|
|
42
|
+
1. Open your global settings file at `~/.gemini/settings.json`. If you only
|
|
43
|
+
want Auto Memory in one project, edit `.gemini/settings.json` in that
|
|
44
|
+
project instead.
|
|
45
|
+
|
|
46
|
+
2. Add the experimental flag:
|
|
47
|
+
|
|
48
|
+
```json
|
|
49
|
+
{
|
|
50
|
+
"experimental": {
|
|
51
|
+
"autoMemory": true
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
3. Restart Gemini CLI. The flag requires a restart because the extraction
|
|
57
|
+
service starts during session boot.
|
|
58
|
+
|
|
59
|
+
## How Auto Memory works
|
|
60
|
+
|
|
61
|
+
Auto Memory runs as a background task on session startup. It does not block the
|
|
62
|
+
UI, consume your interactive turns, or surface tool prompts.
|
|
63
|
+
|
|
64
|
+
1. **Eligibility scan.** The service indexes recent sessions from
|
|
65
|
+
`~/.gemini/tmp/<project>/chats/`. Sessions are eligible only if they have
|
|
66
|
+
been idle for at least three hours and contain at least 10 user messages.
|
|
67
|
+
2. **Lock acquisition.** A lock file in the project's memory directory
|
|
68
|
+
coordinates across multiple CLI instances so extraction runs at most once at
|
|
69
|
+
a time.
|
|
70
|
+
3. **Sub-agent extraction.** A specialized sub-agent (named `confucius`)
|
|
71
|
+
reviews the session index, reads any sessions that look like they contain
|
|
72
|
+
repeated procedural workflows, and drafts new `SKILL.md` files. Its
|
|
73
|
+
instructions tell it to default to creating zero skills unless the evidence
|
|
74
|
+
is strong, so most runs produce no inbox items.
|
|
75
|
+
4. **Patch validation.** If the sub-agent proposes edits to skills outside the
|
|
76
|
+
inbox (for example, an existing global skill), it writes a unified diff
|
|
77
|
+
`.patch` file. Auto Memory dry-runs each patch and discards any that do not
|
|
78
|
+
apply cleanly.
|
|
79
|
+
5. **Notification.** When a run produces new skills or patches, Gemini CLI
|
|
80
|
+
surfaces an inline message telling you how many items are waiting.
|
|
81
|
+
|
|
82
|
+
## How to review extracted skills
|
|
83
|
+
|
|
84
|
+
Use the `/memory inbox` slash command to open the inbox dialog at any time:
|
|
85
|
+
|
|
86
|
+
**Command:** `/memory inbox`
|
|
87
|
+
|
|
88
|
+
The dialog lists each draft skill with its name, description, and source
|
|
89
|
+
sessions. From there you can:
|
|
90
|
+
|
|
91
|
+
- **Read** the full `SKILL.md` body before deciding.
|
|
92
|
+
- **Promote** a skill to your user (`~/.gemini/skills/`) or workspace
|
|
93
|
+
(`.gemini/skills/`) directory.
|
|
94
|
+
- **Discard** a skill you do not want.
|
|
95
|
+
- **Apply** or reject a `.patch` proposal against an existing skill.
|
|
96
|
+
|
|
97
|
+
Promoted skills become discoverable in the next session and follow the standard
|
|
98
|
+
[skill discovery precedence](./skills.md#skill-discovery-tiers).
|
|
99
|
+
|
|
100
|
+
## How to disable Auto Memory
|
|
101
|
+
|
|
102
|
+
To turn off background extraction, set the flag back to `false` in your settings
|
|
103
|
+
file and restart Gemini CLI:
|
|
104
|
+
|
|
105
|
+
```json
|
|
106
|
+
{
|
|
107
|
+
"experimental": {
|
|
108
|
+
"autoMemory": false
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
Disabling the flag stops the background service immediately on the next session
|
|
114
|
+
start. Existing inbox items remain on disk; you can either drain them with
|
|
115
|
+
`/memory inbox` first or remove the project memory directory manually.
|
|
116
|
+
|
|
117
|
+
## Data and privacy
|
|
118
|
+
|
|
119
|
+
- Auto Memory only reads session files that already exist locally on your
|
|
120
|
+
machine. Nothing is uploaded to Gemini outside the normal API calls the
|
|
121
|
+
extraction sub-agent makes during its run.
|
|
122
|
+
- The sub-agent is instructed to redact secrets, tokens, and credentials it
|
|
123
|
+
encounters and to never copy large tool outputs verbatim.
|
|
124
|
+
- Drafted skills live in your project's memory directory until you promote or
|
|
125
|
+
discard them. They are not automatically loaded into any session.
|
|
126
|
+
|
|
127
|
+
## Limitations
|
|
128
|
+
|
|
129
|
+
- The sub-agent runs on a preview Gemini Flash model. Extraction quality depends
|
|
130
|
+
on the model's ability to recognize durable patterns versus one-off incidents.
|
|
131
|
+
- Auto Memory does not extract skills from the current session. It only
|
|
132
|
+
considers sessions that have been idle for three hours or more.
|
|
133
|
+
- Inbox items are stored per project. Skills extracted in one workspace are not
|
|
134
|
+
visible from another until you promote them to the user-scope skills
|
|
135
|
+
directory.
|
|
136
|
+
|
|
137
|
+
## Next steps
|
|
138
|
+
|
|
139
|
+
- Learn how skills are discovered and activated in [Agent Skills](./skills.md).
|
|
140
|
+
- Explore the [memory management tutorial](./tutorials/memory-management.md) for
|
|
141
|
+
the complementary `save_memory` and `GEMINI.md` workflows.
|
|
142
|
+
- Review the experimental settings catalog in
|
|
143
|
+
[Settings](./settings.md#experimental).
|
|
@@ -507,7 +507,7 @@ events. For more information, see the [telemetry documentation](./telemetry.md).
|
|
|
507
507
|
You can enforce a specific authentication method for all users by setting the
|
|
508
508
|
`security.auth.enforcedType` in the system-level `settings.json` file. This
|
|
509
509
|
prevents users from choosing a different authentication method. See the
|
|
510
|
-
[Authentication docs](../get-started/authentication.
|
|
510
|
+
[Authentication docs](../get-started/authentication.mdx) for more details.
|
|
511
511
|
|
|
512
512
|
**Example:** Enforce the use of Google login for all users.
|
|
513
513
|
|
|
@@ -130,7 +130,9 @@ These are the only allowed tools:
|
|
|
130
130
|
[`cli_help`](../core/subagents.md#cli-help-agent)
|
|
131
131
|
- **Interaction:** [`ask_user`](../tools/ask-user.md)
|
|
132
132
|
- **MCP tools (Read):** Read-only [MCP tools](../tools/mcp-server.md) (for
|
|
133
|
-
example, `github_read_issue`, `postgres_read_schema`)
|
|
133
|
+
example, `github_read_issue`, `postgres_read_schema`) and core
|
|
134
|
+
[MCP resource tools](../tools/mcp-resources.md) (`list_mcp_resources`,
|
|
135
|
+
`read_mcp_resource`) are allowed.
|
|
134
136
|
- **Planning (Write):**
|
|
135
137
|
[`write_file`](../tools/file-system.md#3-write_file-writefile) and
|
|
136
138
|
[`replace`](../tools/file-system.md#6-replace-edit) only allowed for `.md`
|
|
@@ -24,20 +24,22 @@ they appear in the UI.
|
|
|
24
24
|
|
|
25
25
|
### General
|
|
26
26
|
|
|
27
|
-
| UI Label
|
|
28
|
-
|
|
|
29
|
-
| Vim Mode
|
|
30
|
-
| Default Approval Mode
|
|
31
|
-
| Enable Auto Update
|
|
32
|
-
| Enable Notifications
|
|
33
|
-
|
|
|
34
|
-
| Plan
|
|
35
|
-
| Plan
|
|
36
|
-
|
|
|
37
|
-
|
|
|
38
|
-
|
|
|
39
|
-
|
|
|
40
|
-
|
|
|
27
|
+
| UI Label | Setting | Description | Default |
|
|
28
|
+
| ----------------------------- | ---------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------- |
|
|
29
|
+
| Vim Mode | `general.vimMode` | Enable Vim keybindings | `false` |
|
|
30
|
+
| Default Approval Mode | `general.defaultApprovalMode` | The default approval mode for tool execution. 'default' prompts for approval, 'auto_edit' auto-approves edit tools, and 'plan' is read-only mode. YOLO mode (auto-approve all actions) can only be enabled via command line (--yolo or --approval-mode=yolo). | `"default"` |
|
|
31
|
+
| Enable Auto Update | `general.enableAutoUpdate` | Enable automatic updates. | `true` |
|
|
32
|
+
| Enable Terminal Notifications | `general.enableNotifications` | Enable terminal run-event notifications for action-required prompts and session completion. | `false` |
|
|
33
|
+
| Terminal Notification Method | `general.notificationMethod` | How to send terminal notifications. | `"auto"` |
|
|
34
|
+
| Enable Plan Mode | `general.plan.enabled` | Enable Plan Mode for read-only safety during planning. | `true` |
|
|
35
|
+
| Plan Directory | `general.plan.directory` | The directory where planning artifacts are stored. If not specified, defaults to the system temporary directory. A custom directory requires a policy to allow write access in Plan Mode. | `undefined` |
|
|
36
|
+
| Plan Model Routing | `general.plan.modelRouting` | Automatically switch between Pro and Flash models based on Plan Mode status. Uses Pro for the planning phase and Flash for the implementation phase. | `true` |
|
|
37
|
+
| Retry Fetch Errors | `general.retryFetchErrors` | Retry on "exception TypeError: fetch failed sending request" errors. | `true` |
|
|
38
|
+
| Max Chat Model Attempts | `general.maxAttempts` | Maximum number of attempts for requests to the main chat model. Cannot exceed 10. | `10` |
|
|
39
|
+
| Debug Keystroke Logging | `general.debugKeystrokeLogging` | Enable debug logging of keystrokes to the console. | `false` |
|
|
40
|
+
| Enable Session Cleanup | `general.sessionRetention.enabled` | Enable automatic session cleanup | `true` |
|
|
41
|
+
| Keep chat history | `general.sessionRetention.maxAge` | Automatically delete chats older than this time period (e.g., "30d", "7d", "24h", "1w") | `"30d"` |
|
|
42
|
+
| Topic & Update Narration | `general.topicUpdateNarration` | Enable the Topic & Update communication model for reduced chattiness and structured progress reporting. | `true` |
|
|
41
43
|
|
|
42
44
|
### Output
|
|
43
45
|
|
|
@@ -159,17 +161,19 @@ they appear in the UI.
|
|
|
159
161
|
|
|
160
162
|
### Experimental
|
|
161
163
|
|
|
162
|
-
| UI Label | Setting
|
|
163
|
-
| ---------------------------------------------------- |
|
|
164
|
-
| Enable Git Worktrees | `experimental.worktrees`
|
|
165
|
-
| Use OSC 52 Paste | `experimental.useOSC52Paste`
|
|
166
|
-
| Use OSC 52 Copy | `experimental.useOSC52Copy`
|
|
167
|
-
| Model Steering | `experimental.modelSteering`
|
|
168
|
-
| Direct Web Fetch | `experimental.directWebFetch`
|
|
169
|
-
|
|
|
170
|
-
|
|
|
171
|
-
|
|
|
172
|
-
|
|
|
164
|
+
| UI Label | Setting | Description | Default |
|
|
165
|
+
| ---------------------------------------------------- | ----------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------- |
|
|
166
|
+
| Enable Git Worktrees | `experimental.worktrees` | Enable automated Git worktree management for parallel work. | `false` |
|
|
167
|
+
| Use OSC 52 Paste | `experimental.useOSC52Paste` | Use OSC 52 for pasting. This may be more robust than the default system when using remote terminal sessions (if your terminal is configured to allow it). | `false` |
|
|
168
|
+
| Use OSC 52 Copy | `experimental.useOSC52Copy` | Use OSC 52 for copying. This may be more robust than the default system when using remote terminal sessions (if your terminal is configured to allow it). | `false` |
|
|
169
|
+
| Model Steering | `experimental.modelSteering` | Enable model steering (user hints) to guide the model during tool execution. | `false` |
|
|
170
|
+
| Direct Web Fetch | `experimental.directWebFetch` | Enable web fetch behavior that bypasses LLM summarization. | `false` |
|
|
171
|
+
| Enable Gemma Model Router | `experimental.gemmaModelRouter.enabled` | Enable the Gemma Model Router (experimental). Requires a local endpoint serving Gemma via the Gemini API using LiteRT-LM shim. | `false` |
|
|
172
|
+
| Auto-start LiteRT Server | `experimental.gemmaModelRouter.autoStartServer` | Automatically start the LiteRT-LM server when Gemini CLI starts and the Gemma router is enabled. | `false` |
|
|
173
|
+
| Memory v2 | `experimental.memoryV2` | 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 — settings, credentials, etc. remain off-limits). Set to false to fall back to the legacy save_memory tool. | `true` |
|
|
174
|
+
| Auto Memory | `experimental.autoMemory` | Automatically extract reusable skills from past sessions in the background. Review results with /memory inbox. | `false` |
|
|
175
|
+
| Use the generalist profile to manage agent contexts. | `experimental.generalistProfile` | Suitable for general coding and software development tasks. | `false` |
|
|
176
|
+
| Enable Context Management | `experimental.contextManagement` | Enable logic for context management. | `false` |
|
|
173
177
|
|
|
174
178
|
### Skills
|
|
175
179
|
|
|
@@ -24,7 +24,7 @@ project-specific behavior or create a customized persona.
|
|
|
24
24
|
|
|
25
25
|
You can set the environment variable temporarily in your shell, or persist it
|
|
26
26
|
via a `.gemini/.env` file. See
|
|
27
|
-
[Persisting Environment Variables](../get-started/authentication.
|
|
27
|
+
[Persisting Environment Variables](../get-started/authentication.mdx#persisting-environment-variables).
|
|
28
28
|
|
|
29
29
|
- Use the project default path (`.gemini/system.md`):
|
|
30
30
|
- `GEMINI_SYSTEM_MD=true` or `GEMINI_SYSTEM_MD=1`
|
|
@@ -51,7 +51,7 @@ error with: `missing system prompt file '<path>'`.
|
|
|
51
51
|
- Create `.gemini/system.md`, then add to `.gemini/.env`:
|
|
52
52
|
- `GEMINI_SYSTEM_MD=1`
|
|
53
53
|
- Use a custom file under your home directory:
|
|
54
|
-
- `GEMINI_SYSTEM_MD=~/prompts/
|
|
54
|
+
- `GEMINI_SYSTEM_MD=~/prompts/system.md gemini`
|
|
55
55
|
|
|
56
56
|
## UI indicator
|
|
57
57
|
|
|
@@ -102,17 +102,17 @@ safety and workflow rules.
|
|
|
102
102
|
|
|
103
103
|
This creates the file and writes the current built‑in system prompt to it.
|
|
104
104
|
|
|
105
|
-
## Best practices:
|
|
105
|
+
## Best practices: system.md vs GEMINI.md
|
|
106
106
|
|
|
107
|
-
-
|
|
107
|
+
- system.md (firmware):
|
|
108
108
|
- Non‑negotiable operational rules: safety, tool‑use protocols, approvals, and
|
|
109
109
|
mechanics that keep the CLI reliable.
|
|
110
110
|
- Stable across tasks and projects (or per project when needed).
|
|
111
111
|
- GEMINI.md (strategy):
|
|
112
112
|
- Persona, goals, methodologies, and project/domain context.
|
|
113
|
-
- Evolves per task; relies on
|
|
113
|
+
- Evolves per task; relies on system.md for safe execution.
|
|
114
114
|
|
|
115
|
-
Keep
|
|
115
|
+
Keep system.md minimal but complete for safety and tool operation. Keep
|
|
116
116
|
GEMINI.md focused on high‑level guidance and project specifics.
|
|
117
117
|
|
|
118
118
|
## Troubleshooting
|
|
@@ -35,17 +35,18 @@ The observability system provides:
|
|
|
35
35
|
You control telemetry behavior through the `.gemini/settings.json` file.
|
|
36
36
|
Environment variables can override these settings.
|
|
37
37
|
|
|
38
|
-
| Setting | Environment Variable
|
|
39
|
-
| -------------- |
|
|
40
|
-
| `enabled` | `GEMINI_TELEMETRY_ENABLED`
|
|
41
|
-
| `
|
|
42
|
-
| `
|
|
43
|
-
| `
|
|
44
|
-
| `
|
|
45
|
-
| `
|
|
46
|
-
| `
|
|
47
|
-
| `
|
|
48
|
-
|
|
|
38
|
+
| Setting | Environment Variable | Description | Values | Default |
|
|
39
|
+
| -------------- | --------------------------------- | --------------------------------------------------- | ----------------- | ----------------------- |
|
|
40
|
+
| `enabled` | `GEMINI_TELEMETRY_ENABLED` | Enable or disable telemetry | `true`/`false` | `false` |
|
|
41
|
+
| `traces` | `GEMINI_TELEMETRY_TRACES_ENABLED` | Enable detailed attribute tracing | `true`/`false` | `false` |
|
|
42
|
+
| `target` | `GEMINI_TELEMETRY_TARGET` | Where to send telemetry data | `"gcp"`/`"local"` | `"local"` |
|
|
43
|
+
| `otlpEndpoint` | `GEMINI_TELEMETRY_OTLP_ENDPOINT` | OTLP collector endpoint | URL string | `http://localhost:4317` |
|
|
44
|
+
| `otlpProtocol` | `GEMINI_TELEMETRY_OTLP_PROTOCOL` | OTLP transport protocol | `"grpc"`/`"http"` | `"grpc"` |
|
|
45
|
+
| `outfile` | `GEMINI_TELEMETRY_OUTFILE` | Save telemetry to file (overrides `otlpEndpoint`) | file path | - |
|
|
46
|
+
| `logPrompts` | `GEMINI_TELEMETRY_LOG_PROMPTS` | Include prompts in telemetry logs | `true`/`false` | `true` |
|
|
47
|
+
| `useCollector` | `GEMINI_TELEMETRY_USE_COLLECTOR` | Use external OTLP collector (advanced) | `true`/`false` | `false` |
|
|
48
|
+
| `useCliAuth` | `GEMINI_TELEMETRY_USE_CLI_AUTH` | Use CLI credentials for telemetry (GCP target only) | `true`/`false` | `false` |
|
|
49
|
+
| - | `GEMINI_CLI_SURFACE` | Optional custom label for traffic reporting | string | - |
|
|
49
50
|
|
|
50
51
|
**Note on boolean environment variables:** For boolean settings like `enabled`,
|
|
51
52
|
setting the environment variable to `true` or `1` enables the feature.
|
|
@@ -1235,6 +1236,12 @@ These metrics follow standard [OpenTelemetry GenAI semantic conventions].
|
|
|
1235
1236
|
Traces provide an "under-the-hood" view of agent and backend operations. Use
|
|
1236
1237
|
traces to debug tool interactions and optimize performance.
|
|
1237
1238
|
|
|
1239
|
+
<!-- prettier-ignore -->
|
|
1240
|
+
> [!NOTE]
|
|
1241
|
+
> Detailed trace attributes (like full prompts and tool outputs) are disabled by default
|
|
1242
|
+
> to minimize overhead. You must explicitly set `telemetry.traces` to `true` (or set
|
|
1243
|
+
> `GEMINI_TELEMETRY_TRACES_ENABLED=true`) to capture them.
|
|
1244
|
+
|
|
1238
1245
|
Every trace captures rich metadata via standard span attributes.
|
|
1239
1246
|
|
|
1240
1247
|
<details open>
|
|
@@ -124,3 +124,5 @@ immediately. Force a reload with:
|
|
|
124
124
|
- Explore the [Command reference](../../reference/commands.md) for more
|
|
125
125
|
`/memory` options.
|
|
126
126
|
- Read the technical spec for [Project context](../../cli/gemini-md.md).
|
|
127
|
+
- Try the experimental [Auto Memory](../auto-memory.md) feature to extract
|
|
128
|
+
reusable skills from your past sessions automatically.
|