@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.
Files changed (259) hide show
  1. package/dist/docs/changelogs/index.md +21 -0
  2. package/dist/docs/changelogs/latest.md +253 -407
  3. package/dist/docs/changelogs/preview.md +236 -247
  4. package/dist/docs/cli/auto-memory.md +143 -0
  5. package/dist/docs/cli/enterprise.md +1 -1
  6. package/dist/docs/cli/plan-mode.md +3 -1
  7. package/dist/docs/cli/settings.md +29 -25
  8. package/dist/docs/cli/system-prompt.md +6 -6
  9. package/dist/docs/cli/telemetry.md +18 -11
  10. package/dist/docs/cli/tutorials/memory-management.md +2 -0
  11. package/dist/docs/get-started/{authentication.md → authentication.mdx} +139 -93
  12. package/dist/docs/get-started/index.md +3 -2
  13. package/dist/docs/get-started/installation.mdx +201 -0
  14. package/dist/docs/index.md +2 -2
  15. package/dist/docs/reference/configuration.md +88 -12
  16. package/dist/docs/reference/policy-engine.md +18 -12
  17. package/dist/docs/reference/tools.md +22 -0
  18. package/dist/docs/sidebar.json +13 -1
  19. package/dist/docs/tools/mcp-resources.md +44 -0
  20. package/dist/docs/tools/mcp-server.md +2 -1
  21. package/dist/docs/tools/tracker.md +61 -0
  22. package/dist/src/agents/agent-tool.js +1 -0
  23. package/dist/src/agents/agent-tool.js.map +1 -1
  24. package/dist/src/agents/agentLoader.d.ts +4 -4
  25. package/dist/src/agents/generalist-agent.js +3 -2
  26. package/dist/src/agents/generalist-agent.js.map +1 -1
  27. package/dist/src/agents/local-executor.js +4 -1
  28. package/dist/src/agents/local-executor.js.map +1 -1
  29. package/dist/src/agents/registry.js +0 -8
  30. package/dist/src/agents/registry.js.map +1 -1
  31. package/dist/src/agents/skill-extraction-agent.d.ts +3 -2
  32. package/dist/src/agents/skill-extraction-agent.js +72 -67
  33. package/dist/src/agents/skill-extraction-agent.js.map +1 -1
  34. package/dist/src/agents/skill-extraction-agent.test.js +54 -0
  35. package/dist/src/agents/skill-extraction-agent.test.js.map +1 -0
  36. package/dist/src/config/config.d.ts +21 -6
  37. package/dist/src/config/config.js +103 -19
  38. package/dist/src/config/config.js.map +1 -1
  39. package/dist/src/config/config.test.js +262 -6
  40. package/dist/src/config/config.test.js.map +1 -1
  41. package/dist/src/config/constants.d.ts +1 -0
  42. package/dist/src/config/constants.js +2 -0
  43. package/dist/src/config/constants.js.map +1 -1
  44. package/dist/src/config/memory.js +1 -1
  45. package/dist/src/config/memory.js.map +1 -1
  46. package/dist/src/config/path-validation.test.js +15 -6
  47. package/dist/src/config/path-validation.test.js.map +1 -1
  48. package/dist/src/config/projectRegistry.js +113 -32
  49. package/dist/src/config/projectRegistry.js.map +1 -1
  50. package/dist/src/config/projectRegistry.test.js +51 -0
  51. package/dist/src/config/projectRegistry.test.js.map +1 -1
  52. package/dist/src/config/storage.d.ts +3 -1
  53. package/dist/src/config/storage.js +6 -0
  54. package/dist/src/config/storage.js.map +1 -1
  55. package/dist/src/config/storage.test.js +12 -0
  56. package/dist/src/config/storage.test.js.map +1 -1
  57. package/dist/src/core/contentGenerator.d.ts +8 -1
  58. package/dist/src/core/contentGenerator.js +46 -4
  59. package/dist/src/core/contentGenerator.js.map +1 -1
  60. package/dist/src/core/contentGenerator.test.js +174 -8
  61. package/dist/src/core/contentGenerator.test.js.map +1 -1
  62. package/dist/src/core/geminiChat.test.js +1 -0
  63. package/dist/src/core/geminiChat.test.js.map +1 -1
  64. package/dist/src/core/geminiChat_network_retry.test.js +42 -0
  65. package/dist/src/core/geminiChat_network_retry.test.js.map +1 -1
  66. package/dist/src/core/localLiteRtLmClient.js +2 -0
  67. package/dist/src/core/localLiteRtLmClient.js.map +1 -1
  68. package/dist/src/core/localLiteRtLmClient.test.js +7 -0
  69. package/dist/src/core/localLiteRtLmClient.test.js.map +1 -1
  70. package/dist/src/core/loggingContentGenerator.js +3 -0
  71. package/dist/src/core/loggingContentGenerator.js.map +1 -1
  72. package/dist/src/core/loggingContentGenerator.test.js +1 -0
  73. package/dist/src/core/loggingContentGenerator.test.js.map +1 -1
  74. package/dist/src/core/prompts.d.ts +1 -1
  75. package/dist/src/core/prompts.js +2 -2
  76. package/dist/src/core/prompts.js.map +1 -1
  77. package/dist/src/core/prompts.test.js +2 -2
  78. package/dist/src/core/prompts.test.js.map +1 -1
  79. package/dist/src/generated/git-commit.d.ts +2 -2
  80. package/dist/src/generated/git-commit.js +2 -2
  81. package/dist/src/ide/ide-client.js +3 -4
  82. package/dist/src/ide/ide-client.js.map +1 -1
  83. package/dist/src/policy/policies/read-only.toml +4 -1
  84. package/dist/src/policy/policy-engine.js +4 -0
  85. package/dist/src/policy/policy-engine.js.map +1 -1
  86. package/dist/src/policy/policy-engine.test.js +25 -0
  87. package/dist/src/policy/policy-engine.test.js.map +1 -1
  88. package/dist/src/policy/toml-loader.test.js +5 -0
  89. package/dist/src/policy/toml-loader.test.js.map +1 -1
  90. package/dist/src/prompts/promptProvider.d.ts +1 -1
  91. package/dist/src/prompts/promptProvider.js +15 -7
  92. package/dist/src/prompts/promptProvider.js.map +1 -1
  93. package/dist/src/prompts/promptProvider.test.js +31 -1
  94. package/dist/src/prompts/promptProvider.test.js.map +1 -1
  95. package/dist/src/prompts/snippets-memory-v2.test.js +94 -0
  96. package/dist/src/prompts/snippets-memory-v2.test.js.map +1 -0
  97. package/dist/src/prompts/snippets.d.ts +19 -1
  98. package/dist/src/prompts/snippets.js +24 -3
  99. package/dist/src/prompts/snippets.js.map +1 -1
  100. package/dist/src/prompts/snippets.legacy.d.ts +6 -1
  101. package/dist/src/prompts/snippets.legacy.js +10 -3
  102. package/dist/src/prompts/snippets.legacy.js.map +1 -1
  103. package/dist/src/sandbox/linux/LinuxSandboxManager.js +16 -2
  104. package/dist/src/sandbox/linux/LinuxSandboxManager.js.map +1 -1
  105. package/dist/src/sandbox/linux/bwrapArgsBuilder.js +64 -36
  106. package/dist/src/sandbox/linux/bwrapArgsBuilder.js.map +1 -1
  107. package/dist/src/sandbox/linux/bwrapArgsBuilder.test.js +3 -3
  108. package/dist/src/sandbox/linux/bwrapArgsBuilder.test.js.map +1 -1
  109. package/dist/src/sandbox/macos/MacOsSandboxManager.js +13 -1
  110. package/dist/src/sandbox/macos/MacOsSandboxManager.js.map +1 -1
  111. package/dist/src/sandbox/macos/seatbeltArgsBuilder.js +61 -42
  112. package/dist/src/sandbox/macos/seatbeltArgsBuilder.js.map +1 -1
  113. package/dist/src/sandbox/windows/WindowsSandboxManager.js +12 -1
  114. package/dist/src/sandbox/windows/WindowsSandboxManager.js.map +1 -1
  115. package/dist/src/scheduler/policy.js +1 -2
  116. package/dist/src/scheduler/policy.js.map +1 -1
  117. package/dist/src/scheduler/policy.test.js +35 -2
  118. package/dist/src/scheduler/policy.test.js.map +1 -1
  119. package/dist/src/scheduler/scheduler.js +1 -0
  120. package/dist/src/scheduler/scheduler.js.map +1 -1
  121. package/dist/src/scheduler/scheduler.test.js +2 -0
  122. package/dist/src/scheduler/scheduler.test.js.map +1 -1
  123. package/dist/src/scheduler/scheduler_hooks.test.js +1 -0
  124. package/dist/src/scheduler/scheduler_hooks.test.js.map +1 -1
  125. package/dist/src/scheduler/scheduler_parallel.test.js +1 -0
  126. package/dist/src/scheduler/scheduler_parallel.test.js.map +1 -1
  127. package/dist/src/scheduler/tool-executor.js +1 -0
  128. package/dist/src/scheduler/tool-executor.js.map +1 -1
  129. package/dist/src/services/chatRecordingService.d.ts +1 -0
  130. package/dist/src/services/chatRecordingService.js +48 -19
  131. package/dist/src/services/chatRecordingService.js.map +1 -1
  132. package/dist/src/services/memoryService.d.ts +15 -1
  133. package/dist/src/services/memoryService.js +276 -57
  134. package/dist/src/services/memoryService.js.map +1 -1
  135. package/dist/src/services/memoryService.test.js +296 -2
  136. package/dist/src/services/memoryService.test.js.map +1 -1
  137. package/dist/src/services/sandboxManager.integration.test.js +204 -0
  138. package/dist/src/services/sandboxManager.integration.test.js.map +1 -1
  139. package/dist/src/services/sandboxManager.js +16 -0
  140. package/dist/src/services/sandboxManager.js.map +1 -1
  141. package/dist/src/services/sessionSummaryUtils.d.ts +1 -1
  142. package/dist/src/services/sessionSummaryUtils.js +111 -38
  143. package/dist/src/services/sessionSummaryUtils.js.map +1 -1
  144. package/dist/src/services/sessionSummaryUtils.test.js +204 -51
  145. package/dist/src/services/sessionSummaryUtils.test.js.map +1 -1
  146. package/dist/src/services/shellExecutionService.js +7 -1
  147. package/dist/src/services/shellExecutionService.js.map +1 -1
  148. package/dist/src/telemetry/config.js +3 -0
  149. package/dist/src/telemetry/config.js.map +1 -1
  150. package/dist/src/telemetry/conseca-logger.test.js +1 -0
  151. package/dist/src/telemetry/conseca-logger.test.js.map +1 -1
  152. package/dist/src/telemetry/loggers.test.js +72 -4
  153. package/dist/src/telemetry/loggers.test.js.map +1 -1
  154. package/dist/src/telemetry/memory-monitor.d.ts +1 -0
  155. package/dist/src/telemetry/memory-monitor.js +8 -1
  156. package/dist/src/telemetry/memory-monitor.js.map +1 -1
  157. package/dist/src/telemetry/memory-monitor.test.js +6 -1
  158. package/dist/src/telemetry/memory-monitor.test.js.map +1 -1
  159. package/dist/src/telemetry/trace.d.ts +1 -0
  160. package/dist/src/telemetry/trace.js +33 -13
  161. package/dist/src/telemetry/trace.js.map +1 -1
  162. package/dist/src/telemetry/trace.test.js +50 -10
  163. package/dist/src/telemetry/trace.test.js.map +1 -1
  164. package/dist/src/telemetry/types.js +11 -4
  165. package/dist/src/telemetry/types.js.map +1 -1
  166. package/dist/src/tools/definitions/base-declarations.d.ts +2 -0
  167. package/dist/src/tools/definitions/base-declarations.js +3 -0
  168. package/dist/src/tools/definitions/base-declarations.js.map +1 -1
  169. package/dist/src/tools/definitions/coreTools.d.ts +3 -1
  170. package/dist/src/tools/definitions/coreTools.js +13 -1
  171. package/dist/src/tools/definitions/coreTools.js.map +1 -1
  172. package/dist/src/tools/definitions/model-family-sets/default-legacy.js +29 -1
  173. package/dist/src/tools/definitions/model-family-sets/default-legacy.js.map +1 -1
  174. package/dist/src/tools/definitions/model-family-sets/gemini-3.js +29 -1
  175. package/dist/src/tools/definitions/model-family-sets/gemini-3.js.map +1 -1
  176. package/dist/src/tools/definitions/types.d.ts +2 -0
  177. package/dist/src/tools/get-internal-docs.js +5 -2
  178. package/dist/src/tools/get-internal-docs.js.map +1 -1
  179. package/dist/src/tools/list-mcp-resources.d.ts +24 -0
  180. package/dist/src/tools/list-mcp-resources.js +74 -0
  181. package/dist/src/tools/list-mcp-resources.js.map +1 -0
  182. package/dist/src/tools/list-mcp-resources.test.d.ts +6 -0
  183. package/dist/src/tools/list-mcp-resources.test.js +79 -0
  184. package/dist/src/tools/list-mcp-resources.test.js.map +1 -0
  185. package/dist/src/tools/mcp-client-manager.d.ts +3 -1
  186. package/dist/src/tools/mcp-client-manager.js +24 -1
  187. package/dist/src/tools/mcp-client-manager.js.map +1 -1
  188. package/dist/src/tools/mcp-client-manager.test.js +43 -0
  189. package/dist/src/tools/mcp-client-manager.test.js.map +1 -1
  190. package/dist/src/tools/memoryTool.d.ts +2 -1
  191. package/dist/src/tools/memoryTool.js +42 -13
  192. package/dist/src/tools/memoryTool.js.map +1 -1
  193. package/dist/src/tools/memoryTool.test.js +23 -3
  194. package/dist/src/tools/memoryTool.test.js.map +1 -1
  195. package/dist/src/tools/read-mcp-resource.d.ts +25 -0
  196. package/dist/src/tools/read-mcp-resource.js +120 -0
  197. package/dist/src/tools/read-mcp-resource.js.map +1 -0
  198. package/dist/src/tools/read-mcp-resource.test.d.ts +6 -0
  199. package/dist/src/tools/read-mcp-resource.test.js +110 -0
  200. package/dist/src/tools/read-mcp-resource.test.js.map +1 -0
  201. package/dist/src/tools/ripGrep.d.ts +3 -2
  202. package/dist/src/tools/ripGrep.js +25 -54
  203. package/dist/src/tools/ripGrep.js.map +1 -1
  204. package/dist/src/tools/ripGrep.test.js +73 -131
  205. package/dist/src/tools/ripGrep.test.js.map +1 -1
  206. package/dist/src/tools/shell.js +38 -12
  207. package/dist/src/tools/shell.js.map +1 -1
  208. package/dist/src/tools/shell.test.js +410 -25
  209. package/dist/src/tools/shell.test.js.map +1 -1
  210. package/dist/src/tools/tool-error.d.ts +1 -0
  211. package/dist/src/tools/tool-error.js +1 -0
  212. package/dist/src/tools/tool-error.js.map +1 -1
  213. package/dist/src/tools/tool-names.d.ts +4 -4
  214. package/dist/src/tools/tool-names.js +6 -2
  215. package/dist/src/tools/tool-names.js.map +1 -1
  216. package/dist/src/tools/tool-registry.js +8 -1
  217. package/dist/src/tools/tool-registry.js.map +1 -1
  218. package/dist/src/utils/filesearch/fileSearch.d.ts +2 -0
  219. package/dist/src/utils/filesearch/fileSearch.js +97 -6
  220. package/dist/src/utils/filesearch/fileSearch.js.map +1 -1
  221. package/dist/src/utils/filesearch/fileSearch.test.js +54 -0
  222. package/dist/src/utils/filesearch/fileSearch.test.js.map +1 -1
  223. package/dist/src/utils/filesearch/fileWatcher.d.ts +25 -0
  224. package/dist/src/utils/filesearch/fileWatcher.js +86 -0
  225. package/dist/src/utils/filesearch/fileWatcher.js.map +1 -0
  226. package/dist/src/utils/filesearch/fileWatcher.test.d.ts +6 -0
  227. package/dist/src/utils/filesearch/fileWatcher.test.js +142 -0
  228. package/dist/src/utils/filesearch/fileWatcher.test.js.map +1 -0
  229. package/dist/src/utils/gitIgnoreParser.js +1 -1
  230. package/dist/src/utils/gitIgnoreParser.js.map +1 -1
  231. package/dist/src/utils/ignoreFileParser.js +1 -1
  232. package/dist/src/utils/ignoreFileParser.js.map +1 -1
  233. package/dist/src/utils/memoryDiscovery.js +15 -5
  234. package/dist/src/utils/memoryDiscovery.js.map +1 -1
  235. package/dist/src/utils/retry.js +18 -6
  236. package/dist/src/utils/retry.js.map +1 -1
  237. package/dist/src/utils/retry.test.js +30 -0
  238. package/dist/src/utils/retry.test.js.map +1 -1
  239. package/dist/src/utils/shell-utils.d.ts +1 -0
  240. package/dist/src/utils/shell-utils.js +106 -0
  241. package/dist/src/utils/shell-utils.js.map +1 -1
  242. package/dist/tsconfig.tsbuildinfo +1 -1
  243. package/package.json +5 -3
  244. package/vendor/ripgrep/rg-darwin-arm64 +0 -0
  245. package/vendor/ripgrep/rg-darwin-x64 +0 -0
  246. package/vendor/ripgrep/rg-linux-arm64 +0 -0
  247. package/vendor/ripgrep/rg-linux-x64 +0 -0
  248. package/vendor/ripgrep/rg-win32-x64.exe +0 -0
  249. package/dist/docs/get-started/installation.md +0 -181
  250. package/dist/google-gemini-cli-core-0.39.0-preview.1.tgz +0 -0
  251. package/dist/src/agents/memory-manager-agent.d.ts +0 -25
  252. package/dist/src/agents/memory-manager-agent.js +0 -138
  253. package/dist/src/agents/memory-manager-agent.js.map +0 -1
  254. package/dist/src/agents/memory-manager-agent.test.js +0 -123
  255. package/dist/src/agents/memory-manager-agent.test.js.map +0 -1
  256. package/dist/src/prompts/snippets-memory-manager.test.js +0 -31
  257. package/dist/src/prompts/snippets-memory-manager.test.js.map +0 -1
  258. /package/dist/src/agents/{memory-manager-agent.test.d.ts → skill-extraction-agent.test.d.ts} +0 -0
  259. /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.md) for more details.
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`) are allowed.
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 | 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 Notifications | `general.enableNotifications` | Enable run-event notifications for action-required prompts and session completion. | `false` |
33
- | Enable Plan Mode | `general.plan.enabled` | Enable Plan Mode for read-only safety during planning. | `true` |
34
- | 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` |
35
- | 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` |
36
- | Retry Fetch Errors | `general.retryFetchErrors` | Retry on "exception TypeError: fetch failed sending request" errors. | `true` |
37
- | Max Chat Model Attempts | `general.maxAttempts` | Maximum number of attempts for requests to the main chat model. Cannot exceed 10. | `10` |
38
- | Debug Keystroke Logging | `general.debugKeystrokeLogging` | Enable debug logging of keystrokes to the console. | `false` |
39
- | Enable Session Cleanup | `general.sessionRetention.enabled` | Enable automatic session cleanup | `true` |
40
- | Keep chat history | `general.sessionRetention.maxAge` | Automatically delete chats older than this time period (e.g., "30d", "7d", "24h", "1w") | `"30d"` |
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 | Description | Default |
163
- | ---------------------------------------------------- | ----------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------- | ------- |
164
- | Enable Git Worktrees | `experimental.worktrees` | Enable automated Git worktree management for parallel work. | `false` |
165
- | 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` |
166
- | 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` |
167
- | Model Steering | `experimental.modelSteering` | Enable model steering (user hints) to guide the model during tool execution. | `false` |
168
- | Direct Web Fetch | `experimental.directWebFetch` | Enable web fetch behavior that bypasses LLM summarization. | `false` |
169
- | Memory Manager Agent | `experimental.memoryManager` | Replace the built-in save_memory tool with a memory manager subagent that supports adding, removing, de-duplicating, and organizing memories. | `false` |
170
- | Use the generalist profile to manage agent contexts. | `experimental.generalistProfile` | Suitable for general coding and software development tasks. | `false` |
171
- | Enable Context Management | `experimental.contextManagement` | Enable logic for context management. | `false` |
172
- | Topic & Update Narration | `experimental.topicUpdateNarration` | Enable the experimental Topic & Update communication model for reduced chattiness and structured progress reporting. | `false` |
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.md#persisting-environment-variables).
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/SYSTEM.md gemini`
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: SYSTEM.md vs GEMINI.md
105
+ ## Best practices: system.md vs GEMINI.md
106
106
 
107
- - SYSTEM.md (firmware):
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 SYSTEM.md for safe execution.
113
+ - Evolves per task; relies on system.md for safe execution.
114
114
 
115
- Keep SYSTEM.md minimal but complete for safety and tool operation. 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 | Description | Values | Default |
39
- | -------------- | -------------------------------- | --------------------------------------------------- | ----------------- | ----------------------- |
40
- | `enabled` | `GEMINI_TELEMETRY_ENABLED` | Enable or disable telemetry | `true`/`false` | `false` |
41
- | `target` | `GEMINI_TELEMETRY_TARGET` | Where to send telemetry data | `"gcp"`/`"local"` | `"local"` |
42
- | `otlpEndpoint` | `GEMINI_TELEMETRY_OTLP_ENDPOINT` | OTLP collector endpoint | URL string | `http://localhost:4317` |
43
- | `otlpProtocol` | `GEMINI_TELEMETRY_OTLP_PROTOCOL` | OTLP transport protocol | `"grpc"`/`"http"` | `"grpc"` |
44
- | `outfile` | `GEMINI_TELEMETRY_OUTFILE` | Save telemetry to file (overrides `otlpEndpoint`) | file path | - |
45
- | `logPrompts` | `GEMINI_TELEMETRY_LOG_PROMPTS` | Include prompts in telemetry logs | `true`/`false` | `true` |
46
- | `useCollector` | `GEMINI_TELEMETRY_USE_COLLECTOR` | Use external OTLP collector (advanced) | `true`/`false` | `false` |
47
- | `useCliAuth` | `GEMINI_TELEMETRY_USE_CLI_AUTH` | Use CLI credentials for telemetry (GCP target only) | `true`/`false` | `false` |
48
- | - | `GEMINI_CLI_SURFACE` | Optional custom label for traffic reporting | string | - |
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.