@google/gemini-cli-core 0.34.0-nightly.20260307.6c3a90645 → 0.34.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 (401) hide show
  1. package/README.md +3 -3
  2. package/dist/docs/CONTRIBUTING.md +42 -18
  3. package/dist/docs/assets/theme-ansi-dark.png +0 -0
  4. package/dist/docs/assets/theme-ansi-light.png +0 -0
  5. package/dist/docs/assets/theme-atom-one-dark.png +0 -0
  6. package/dist/docs/assets/theme-ayu-dark.png +0 -0
  7. package/dist/docs/assets/theme-ayu-light.png +0 -0
  8. package/dist/docs/assets/theme-default-dark.png +0 -0
  9. package/dist/docs/assets/theme-default-light.png +0 -0
  10. package/dist/docs/assets/theme-dracula-dark.png +0 -0
  11. package/dist/docs/assets/theme-github-dark.png +0 -0
  12. package/dist/docs/assets/theme-github-light.png +0 -0
  13. package/dist/docs/assets/theme-google-light.png +0 -0
  14. package/dist/docs/assets/theme-holiday-dark.png +0 -0
  15. package/dist/docs/assets/theme-shades-of-purple-dark.png +0 -0
  16. package/dist/docs/assets/theme-solarized-dark.png +0 -0
  17. package/dist/docs/assets/theme-solarized-light.png +0 -0
  18. package/dist/docs/assets/theme-xcode-light.png +0 -0
  19. package/dist/docs/changelogs/preview.md +10 -3
  20. package/dist/docs/cli/cli-reference.md +21 -5
  21. package/dist/docs/cli/gemini-md.md +1 -1
  22. package/dist/docs/cli/headless.md +3 -2
  23. package/dist/docs/cli/notifications.md +58 -0
  24. package/dist/docs/cli/plan-mode.md +96 -91
  25. package/dist/docs/cli/session-management.md +24 -0
  26. package/dist/docs/cli/settings.md +4 -3
  27. package/dist/docs/cli/telemetry.md +1017 -750
  28. package/dist/docs/cli/themes.md +26 -16
  29. package/dist/docs/cli/tutorials/automation.md +12 -11
  30. package/dist/docs/cli/tutorials/mcp-setup.md +3 -3
  31. package/dist/docs/cli/tutorials/memory-management.md +1 -1
  32. package/dist/docs/cli/tutorials/session-management.md +4 -4
  33. package/dist/docs/core/remote-agents.md +1 -1
  34. package/dist/docs/core/subagents.md +2 -2
  35. package/dist/docs/extensions/reference.md +8 -2
  36. package/dist/docs/extensions/releasing.md +26 -0
  37. package/dist/docs/get-started/authentication.md +8 -8
  38. package/dist/docs/get-started/gemini-3.md +1 -1
  39. package/dist/docs/get-started/index.md +1 -1
  40. package/dist/docs/get-started/installation.md +1 -1
  41. package/dist/docs/hooks/best-practices.md +1 -1
  42. package/dist/docs/hooks/index.md +6 -6
  43. package/dist/docs/hooks/reference.md +3 -3
  44. package/dist/docs/local-development.md +71 -27
  45. package/dist/docs/reference/commands.md +48 -11
  46. package/dist/docs/reference/configuration.md +30 -12
  47. package/dist/docs/reference/keyboard-shortcuts.md +21 -17
  48. package/dist/docs/reference/policy-engine.md +34 -12
  49. package/dist/docs/release-confidence.md +2 -2
  50. package/dist/docs/resources/quota-and-pricing.md +1 -1
  51. package/dist/docs/resources/tos-privacy.md +5 -5
  52. package/dist/docs/resources/troubleshooting.md +2 -2
  53. package/dist/docs/sidebar.json +6 -1
  54. package/dist/docs/tools/file-system.md +2 -2
  55. package/dist/docs/tools/mcp-server.md +29 -16
  56. package/dist/src/agents/a2a-client-manager.js +38 -25
  57. package/dist/src/agents/a2a-client-manager.js.map +1 -1
  58. package/dist/src/agents/a2a-client-manager.test.js +43 -3
  59. package/dist/src/agents/a2a-client-manager.test.js.map +1 -1
  60. package/dist/src/agents/a2a-errors.d.ts +65 -0
  61. package/dist/src/agents/a2a-errors.js +164 -0
  62. package/dist/src/agents/a2a-errors.js.map +1 -0
  63. package/dist/src/agents/a2a-errors.test.d.ts +6 -0
  64. package/dist/src/agents/a2a-errors.test.js +183 -0
  65. package/dist/src/agents/a2a-errors.test.js.map +1 -0
  66. package/dist/src/agents/a2aUtils.d.ts +34 -3
  67. package/dist/src/agents/a2aUtils.js +226 -27
  68. package/dist/src/agents/a2aUtils.js.map +1 -1
  69. package/dist/src/agents/a2aUtils.test.js +192 -2
  70. package/dist/src/agents/a2aUtils.test.js.map +1 -1
  71. package/dist/src/agents/agent-scheduler.js +7 -1
  72. package/dist/src/agents/agent-scheduler.js.map +1 -1
  73. package/dist/src/agents/agent-scheduler.test.js +37 -6
  74. package/dist/src/agents/agent-scheduler.test.js.map +1 -1
  75. package/dist/src/agents/agentLoader.d.ts +6 -2
  76. package/dist/src/agents/agentLoader.js +30 -7
  77. package/dist/src/agents/agentLoader.js.map +1 -1
  78. package/dist/src/agents/agentLoader.test.js +115 -7
  79. package/dist/src/agents/agentLoader.test.js.map +1 -1
  80. package/dist/src/agents/auth-provider/factory.d.ts +2 -0
  81. package/dist/src/agents/auth-provider/factory.js +9 -3
  82. package/dist/src/agents/auth-provider/factory.js.map +1 -1
  83. package/dist/src/agents/auth-provider/factory.test.js +62 -1
  84. package/dist/src/agents/auth-provider/factory.test.js.map +1 -1
  85. package/dist/src/agents/auth-provider/oauth2-provider.d.ts +65 -0
  86. package/dist/src/agents/auth-provider/oauth2-provider.js +233 -0
  87. package/dist/src/agents/auth-provider/oauth2-provider.js.map +1 -0
  88. package/dist/src/agents/auth-provider/oauth2-provider.test.d.ts +6 -0
  89. package/dist/src/agents/auth-provider/oauth2-provider.test.js +490 -0
  90. package/dist/src/agents/auth-provider/oauth2-provider.test.js.map +1 -0
  91. package/dist/src/agents/auth-provider/types.d.ts +4 -1
  92. package/dist/src/agents/browser/automationOverlay.d.ts +26 -0
  93. package/dist/src/agents/browser/automationOverlay.js +100 -0
  94. package/dist/src/agents/browser/automationOverlay.js.map +1 -0
  95. package/dist/src/agents/browser/browserAgentFactory.js +9 -0
  96. package/dist/src/agents/browser/browserAgentFactory.js.map +1 -1
  97. package/dist/src/agents/browser/browserAgentFactory.test.js +54 -0
  98. package/dist/src/agents/browser/browserAgentFactory.test.js.map +1 -1
  99. package/dist/src/agents/browser/browserAgentInvocation.d.ts +1 -10
  100. package/dist/src/agents/browser/browserAgentInvocation.js +289 -12
  101. package/dist/src/agents/browser/browserAgentInvocation.js.map +1 -1
  102. package/dist/src/agents/browser/browserAgentInvocation.test.js +295 -0
  103. package/dist/src/agents/browser/browserAgentInvocation.test.js.map +1 -1
  104. package/dist/src/agents/browser/browserManager.d.ts +5 -0
  105. package/dist/src/agents/browser/browserManager.js +62 -15
  106. package/dist/src/agents/browser/browserManager.js.map +1 -1
  107. package/dist/src/agents/browser/browserManager.test.js +68 -0
  108. package/dist/src/agents/browser/browserManager.test.js.map +1 -1
  109. package/dist/src/agents/browser/mcpToolWrapper.d.ts +1 -1
  110. package/dist/src/agents/browser/mcpToolWrapper.js +3 -1
  111. package/dist/src/agents/browser/mcpToolWrapper.js.map +1 -1
  112. package/dist/src/agents/browser/mcpToolWrapperConfirmation.test.js +2 -0
  113. package/dist/src/agents/browser/mcpToolWrapperConfirmation.test.js.map +1 -1
  114. package/dist/src/agents/generalist-agent.test.js +8 -1
  115. package/dist/src/agents/generalist-agent.test.js.map +1 -1
  116. package/dist/src/agents/local-executor.js +23 -1
  117. package/dist/src/agents/local-executor.js.map +1 -1
  118. package/dist/src/agents/local-executor.test.js +15 -13
  119. package/dist/src/agents/local-executor.test.js.map +1 -1
  120. package/dist/src/agents/local-invocation.js +3 -1
  121. package/dist/src/agents/local-invocation.js.map +1 -1
  122. package/dist/src/agents/registry.d.ts +3 -0
  123. package/dist/src/agents/registry.js +25 -4
  124. package/dist/src/agents/registry.js.map +1 -1
  125. package/dist/src/agents/registry.test.js +77 -1
  126. package/dist/src/agents/registry.test.js.map +1 -1
  127. package/dist/src/agents/remote-invocation.d.ts +6 -0
  128. package/dist/src/agents/remote-invocation.js +20 -2
  129. package/dist/src/agents/remote-invocation.js.map +1 -1
  130. package/dist/src/agents/remote-invocation.test.js +40 -0
  131. package/dist/src/agents/remote-invocation.test.js.map +1 -1
  132. package/dist/src/availability/policyHelpers.js +1 -3
  133. package/dist/src/availability/policyHelpers.js.map +1 -1
  134. package/dist/src/availability/policyHelpers.test.js +15 -7
  135. package/dist/src/availability/policyHelpers.test.js.map +1 -1
  136. package/dist/src/billing/billing.js +2 -1
  137. package/dist/src/billing/billing.js.map +1 -1
  138. package/dist/src/billing/billing.test.js +3 -3
  139. package/dist/src/billing/billing.test.js.map +1 -1
  140. package/dist/src/code_assist/oauth2.js +1 -0
  141. package/dist/src/code_assist/oauth2.js.map +1 -1
  142. package/dist/src/code_assist/server.js +5 -0
  143. package/dist/src/code_assist/server.js.map +1 -1
  144. package/dist/src/commands/memory.js +2 -2
  145. package/dist/src/commands/memory.js.map +1 -1
  146. package/dist/src/commands/memory.test.js +2 -2
  147. package/dist/src/commands/memory.test.js.map +1 -1
  148. package/dist/src/commands/types.d.ts +6 -1
  149. package/dist/src/config/agent-loop-context.d.ts +22 -0
  150. package/dist/src/config/agent-loop-context.js +7 -0
  151. package/dist/src/config/agent-loop-context.js.map +1 -0
  152. package/dist/src/config/config.d.ts +38 -5
  153. package/dist/src/config/config.js +82 -37
  154. package/dist/src/config/config.js.map +1 -1
  155. package/dist/src/config/config.test.js +48 -2
  156. package/dist/src/config/config.test.js.map +1 -1
  157. package/dist/src/config/models.js +2 -1
  158. package/dist/src/config/models.js.map +1 -1
  159. package/dist/src/config/storage.d.ts +2 -0
  160. package/dist/src/config/storage.js +6 -0
  161. package/dist/src/config/storage.js.map +1 -1
  162. package/dist/src/config/storage.test.js +3 -3
  163. package/dist/src/config/storage.test.js.map +1 -1
  164. package/dist/src/confirmation-bus/message-bus.js +1 -1
  165. package/dist/src/confirmation-bus/message-bus.js.map +1 -1
  166. package/dist/src/confirmation-bus/message-bus.test.js +1 -1
  167. package/dist/src/confirmation-bus/message-bus.test.js.map +1 -1
  168. package/dist/src/confirmation-bus/types.d.ts +7 -0
  169. package/dist/src/confirmation-bus/types.js.map +1 -1
  170. package/dist/src/core/apiKeyCredentialStorage.d.ts +5 -0
  171. package/dist/src/core/apiKeyCredentialStorage.js +28 -11
  172. package/dist/src/core/apiKeyCredentialStorage.js.map +1 -1
  173. package/dist/src/core/apiKeyCredentialStorage.test.js +61 -16
  174. package/dist/src/core/apiKeyCredentialStorage.test.js.map +1 -1
  175. package/dist/src/core/client.d.ts +2 -2
  176. package/dist/src/core/client.js.map +1 -1
  177. package/dist/src/core/coreToolScheduler.js +1 -1
  178. package/dist/src/core/coreToolScheduler.js.map +1 -1
  179. package/dist/src/core/coreToolScheduler.test.js +1 -0
  180. package/dist/src/core/coreToolScheduler.test.js.map +1 -1
  181. package/dist/src/core/geminiChat.d.ts +3 -3
  182. package/dist/src/core/geminiChat.js +13 -26
  183. package/dist/src/core/geminiChat.js.map +1 -1
  184. package/dist/src/core/geminiChat.test.js +1 -0
  185. package/dist/src/core/geminiChat.test.js.map +1 -1
  186. package/dist/src/core/geminiChat_network_retry.test.js +1 -0
  187. package/dist/src/core/geminiChat_network_retry.test.js.map +1 -1
  188. package/dist/src/core/logger.d.ts +1 -1
  189. package/dist/src/fallback/handler.d.ts +1 -0
  190. package/dist/src/fallback/handler.js +6 -2
  191. package/dist/src/fallback/handler.js.map +1 -1
  192. package/dist/src/fallback/handler.test.js +1 -0
  193. package/dist/src/fallback/handler.test.js.map +1 -1
  194. package/dist/src/generated/git-commit.d.ts +2 -2
  195. package/dist/src/generated/git-commit.js +2 -2
  196. package/dist/src/generated/git-commit.js.map +1 -1
  197. package/dist/src/hooks/hookAggregator.js +1 -0
  198. package/dist/src/hooks/hookAggregator.js.map +1 -1
  199. package/dist/src/index.d.ts +3 -0
  200. package/dist/src/index.js +4 -0
  201. package/dist/src/index.js.map +1 -1
  202. package/dist/src/mcp/oauth-provider.js +2 -0
  203. package/dist/src/mcp/oauth-provider.js.map +1 -1
  204. package/dist/src/mcp/oauth-token-storage.d.ts +5 -1
  205. package/dist/src/mcp/oauth-token-storage.js +10 -3
  206. package/dist/src/mcp/oauth-token-storage.js.map +1 -1
  207. package/dist/src/mcp/oauth-utils.js +2 -0
  208. package/dist/src/mcp/oauth-utils.js.map +1 -1
  209. package/dist/src/output/stream-json-formatter.d.ts +1 -1
  210. package/dist/src/output/stream-json-formatter.js +25 -14
  211. package/dist/src/output/stream-json-formatter.js.map +1 -1
  212. package/dist/src/output/stream-json-formatter.test.js +39 -0
  213. package/dist/src/output/stream-json-formatter.test.js.map +1 -1
  214. package/dist/src/output/types.d.ts +8 -0
  215. package/dist/src/policy/config.d.ts +15 -1
  216. package/dist/src/policy/config.js +46 -16
  217. package/dist/src/policy/config.js.map +1 -1
  218. package/dist/src/policy/persistence.test.js +96 -102
  219. package/dist/src/policy/persistence.test.js.map +1 -1
  220. package/dist/src/policy/policy-engine.d.ts +1 -1
  221. package/dist/src/policy/policy-engine.js +20 -8
  222. package/dist/src/policy/policy-engine.js.map +1 -1
  223. package/dist/src/policy/policy-engine.test.js +30 -0
  224. package/dist/src/policy/policy-engine.test.js.map +1 -1
  225. package/dist/src/policy/policy-updater.test.js +4 -3
  226. package/dist/src/policy/policy-updater.test.js.map +1 -1
  227. package/dist/src/policy/toml-loader.js +7 -0
  228. package/dist/src/policy/toml-loader.js.map +1 -1
  229. package/dist/src/policy/types.d.ts +5 -0
  230. package/dist/src/policy/types.js.map +1 -1
  231. package/dist/src/policy/utils.d.ts +16 -0
  232. package/dist/src/policy/utils.js +32 -6
  233. package/dist/src/policy/utils.js.map +1 -1
  234. package/dist/src/policy/utils.test.js +17 -16
  235. package/dist/src/policy/utils.test.js.map +1 -1
  236. package/dist/src/prompts/promptProvider.test.js +6 -1
  237. package/dist/src/prompts/promptProvider.test.js.map +1 -1
  238. package/dist/src/prompts/snippets.js +1 -1
  239. package/dist/src/prompts/snippets.js.map +1 -1
  240. package/dist/src/routing/routingStrategy.d.ts +1 -1
  241. package/dist/src/routing/strategies/approvalModeStrategy.js +7 -6
  242. package/dist/src/routing/strategies/approvalModeStrategy.js.map +1 -1
  243. package/dist/src/routing/strategies/approvalModeStrategy.test.js +31 -1
  244. package/dist/src/routing/strategies/approvalModeStrategy.test.js.map +1 -1
  245. package/dist/src/routing/strategies/classifierStrategy.js +4 -4
  246. package/dist/src/routing/strategies/classifierStrategy.js.map +1 -1
  247. package/dist/src/routing/strategies/classifierStrategy.test.js +5 -0
  248. package/dist/src/routing/strategies/classifierStrategy.test.js.map +1 -1
  249. package/dist/src/routing/strategies/numericalClassifierStrategy.js +4 -4
  250. package/dist/src/routing/strategies/numericalClassifierStrategy.js.map +1 -1
  251. package/dist/src/routing/strategies/numericalClassifierStrategy.test.js +5 -0
  252. package/dist/src/routing/strategies/numericalClassifierStrategy.test.js.map +1 -1
  253. package/dist/src/safety/context-builder.js.map +1 -1
  254. package/dist/src/scheduler/policy.d.ts +2 -1
  255. package/dist/src/scheduler/policy.js +38 -6
  256. package/dist/src/scheduler/policy.js.map +1 -1
  257. package/dist/src/scheduler/policy.test.js +132 -2
  258. package/dist/src/scheduler/policy.test.js.map +1 -1
  259. package/dist/src/scheduler/scheduler.d.ts +2 -1
  260. package/dist/src/scheduler/scheduler.js +8 -5
  261. package/dist/src/scheduler/scheduler.js.map +1 -1
  262. package/dist/src/scheduler/scheduler.test.js +3 -1
  263. package/dist/src/scheduler/scheduler.test.js.map +1 -1
  264. package/dist/src/scheduler/scheduler_parallel.test.js +2 -1
  265. package/dist/src/scheduler/scheduler_parallel.test.js.map +1 -1
  266. package/dist/src/scheduler/scheduler_waiting_callback.test.js +1 -1
  267. package/dist/src/scheduler/scheduler_waiting_callback.test.js.map +1 -1
  268. package/dist/src/scheduler/tool-executor.d.ts +3 -2
  269. package/dist/src/scheduler/tool-executor.js +12 -7
  270. package/dist/src/scheduler/tool-executor.js.map +1 -1
  271. package/dist/src/scheduler/tool-executor.test.js +68 -1
  272. package/dist/src/scheduler/tool-executor.test.js.map +1 -1
  273. package/dist/src/services/FolderTrustDiscoveryService.js +3 -1
  274. package/dist/src/services/FolderTrustDiscoveryService.js.map +1 -1
  275. package/dist/src/services/chatCompressionService.js +2 -0
  276. package/dist/src/services/chatCompressionService.js.map +1 -1
  277. package/dist/src/services/chatRecordingService.d.ts +7 -1
  278. package/dist/src/services/chatRecordingService.js +55 -24
  279. package/dist/src/services/chatRecordingService.js.map +1 -1
  280. package/dist/src/services/chatRecordingService.test.js +102 -0
  281. package/dist/src/services/chatRecordingService.test.js.map +1 -1
  282. package/dist/src/services/environmentSanitization.js +4 -0
  283. package/dist/src/services/environmentSanitization.js.map +1 -1
  284. package/dist/src/services/environmentSanitization.test.js +21 -0
  285. package/dist/src/services/environmentSanitization.test.js.map +1 -1
  286. package/dist/src/services/keychainService.d.ts +0 -1
  287. package/dist/src/services/keychainService.js +2 -4
  288. package/dist/src/services/keychainService.js.map +1 -1
  289. package/dist/src/services/loopDetectionService.js +9 -2
  290. package/dist/src/services/loopDetectionService.js.map +1 -1
  291. package/dist/src/services/shellExecutionService.d.ts +7 -1
  292. package/dist/src/services/shellExecutionService.js +224 -78
  293. package/dist/src/services/shellExecutionService.js.map +1 -1
  294. package/dist/src/services/shellExecutionService.test.js +247 -4
  295. package/dist/src/services/shellExecutionService.test.js.map +1 -1
  296. package/dist/src/services/toolOutputMaskingService.d.ts +2 -2
  297. package/dist/src/services/toolOutputMaskingService.js.map +1 -1
  298. package/dist/src/telemetry/clearcut-logger/clearcut-logger.js +53 -0
  299. package/dist/src/telemetry/clearcut-logger/clearcut-logger.js.map +1 -1
  300. package/dist/src/telemetry/clearcut-logger/clearcut-logger.test.js +76 -0
  301. package/dist/src/telemetry/clearcut-logger/clearcut-logger.test.js.map +1 -1
  302. package/dist/src/telemetry/clearcut-logger/event-metadata-key.d.ts +4 -0
  303. package/dist/src/telemetry/clearcut-logger/event-metadata-key.js +9 -1
  304. package/dist/src/telemetry/clearcut-logger/event-metadata-key.js.map +1 -1
  305. package/dist/src/telemetry/semantic.js +2 -0
  306. package/dist/src/telemetry/semantic.js.map +1 -1
  307. package/dist/src/tools/edit.js +51 -30
  308. package/dist/src/tools/edit.js.map +1 -1
  309. package/dist/src/tools/glob.js +6 -0
  310. package/dist/src/tools/glob.js.map +1 -1
  311. package/dist/src/tools/grep.js +6 -0
  312. package/dist/src/tools/grep.js.map +1 -1
  313. package/dist/src/tools/ls.js +6 -0
  314. package/dist/src/tools/ls.js.map +1 -1
  315. package/dist/src/tools/mcp-client.d.ts +5 -1
  316. package/dist/src/tools/mcp-client.js +5 -0
  317. package/dist/src/tools/mcp-client.js.map +1 -1
  318. package/dist/src/tools/mcp-client.test.js.map +1 -1
  319. package/dist/src/tools/mcp-tool.d.ts +1 -1
  320. package/dist/src/tools/mcp-tool.js +1 -1
  321. package/dist/src/tools/mcp-tool.js.map +1 -1
  322. package/dist/src/tools/read-file.js +6 -0
  323. package/dist/src/tools/read-file.js.map +1 -1
  324. package/dist/src/tools/read-many-files.js +8 -0
  325. package/dist/src/tools/read-many-files.js.map +1 -1
  326. package/dist/src/tools/read-many-files.test.js +1 -1
  327. package/dist/src/tools/read-many-files.test.js.map +1 -1
  328. package/dist/src/tools/shell.d.ts +1 -1
  329. package/dist/src/tools/shell.js.map +1 -1
  330. package/dist/src/tools/tool-names.d.ts +10 -5
  331. package/dist/src/tools/tool-names.js +21 -6
  332. package/dist/src/tools/tool-names.js.map +1 -1
  333. package/dist/src/tools/tools.d.ts +7 -1
  334. package/dist/src/tools/tools.js.map +1 -1
  335. package/dist/src/tools/trackerTools.js +1 -1
  336. package/dist/src/tools/trackerTools.js.map +1 -1
  337. package/dist/src/tools/web-fetch.js +14 -0
  338. package/dist/src/tools/web-fetch.js.map +1 -1
  339. package/dist/src/tools/web-search.js +7 -1
  340. package/dist/src/tools/web-search.js.map +1 -1
  341. package/dist/src/tools/write-file.js +6 -0
  342. package/dist/src/tools/write-file.js.map +1 -1
  343. package/dist/src/utils/checkpointUtils.d.ts +1 -1
  344. package/dist/src/utils/editCorrector.js +1 -0
  345. package/dist/src/utils/editCorrector.js.map +1 -1
  346. package/dist/src/utils/editor.js +18 -5
  347. package/dist/src/utils/editor.js.map +1 -1
  348. package/dist/src/utils/editor.test.js +56 -2
  349. package/dist/src/utils/editor.test.js.map +1 -1
  350. package/dist/src/utils/fetch.d.ts +46 -0
  351. package/dist/src/utils/fetch.js +190 -16
  352. package/dist/src/utils/fetch.js.map +1 -1
  353. package/dist/src/utils/fetch.test.d.ts +6 -0
  354. package/dist/src/utils/fetch.test.js +206 -0
  355. package/dist/src/utils/fetch.test.js.map +1 -0
  356. package/dist/src/utils/fileUtils.js +1 -1
  357. package/dist/src/utils/fileUtils.js.map +1 -1
  358. package/dist/src/utils/googleErrors.d.ts +0 -4
  359. package/dist/src/utils/googleErrors.js +29 -5
  360. package/dist/src/utils/googleErrors.js.map +1 -1
  361. package/dist/src/utils/googleErrors.test.js +67 -0
  362. package/dist/src/utils/googleErrors.test.js.map +1 -1
  363. package/dist/src/utils/googleQuotaErrors.js +31 -10
  364. package/dist/src/utils/googleQuotaErrors.js.map +1 -1
  365. package/dist/src/utils/googleQuotaErrors.test.js +105 -3
  366. package/dist/src/utils/googleQuotaErrors.test.js.map +1 -1
  367. package/dist/src/utils/markdownUtils.d.ts +22 -0
  368. package/dist/src/utils/markdownUtils.js +126 -0
  369. package/dist/src/utils/markdownUtils.js.map +1 -0
  370. package/dist/src/utils/markdownUtils.test.d.ts +6 -0
  371. package/dist/src/utils/markdownUtils.test.js +107 -0
  372. package/dist/src/utils/markdownUtils.test.js.map +1 -0
  373. package/dist/src/utils/oauth-flow.js +13 -3
  374. package/dist/src/utils/oauth-flow.js.map +1 -1
  375. package/dist/src/utils/paths.d.ts +1 -1
  376. package/dist/src/utils/paths.js +37 -7
  377. package/dist/src/utils/paths.js.map +1 -1
  378. package/dist/src/utils/paths.test.js +34 -2
  379. package/dist/src/utils/paths.test.js.map +1 -1
  380. package/dist/src/utils/sessionUtils.js +20 -11
  381. package/dist/src/utils/sessionUtils.js.map +1 -1
  382. package/dist/src/utils/sessionUtils.test.js +34 -0
  383. package/dist/src/utils/sessionUtils.test.js.map +1 -1
  384. package/dist/src/utils/workspaceContext.d.ts +0 -4
  385. package/dist/src/utils/workspaceContext.js +2 -27
  386. package/dist/src/utils/workspaceContext.js.map +1 -1
  387. package/dist/src/voice/responseFormatter.d.ts +38 -0
  388. package/dist/src/voice/responseFormatter.js +130 -0
  389. package/dist/src/voice/responseFormatter.js.map +1 -0
  390. package/dist/src/voice/responseFormatter.test.d.ts +6 -0
  391. package/dist/src/voice/responseFormatter.test.js +214 -0
  392. package/dist/src/voice/responseFormatter.test.js.map +1 -0
  393. package/dist/tsconfig.tsbuildinfo +1 -1
  394. package/package.json +7 -4
  395. package/dist/docs/assets/theme-ansi.png +0 -0
  396. package/dist/docs/assets/theme-atom-one.png +0 -0
  397. package/dist/docs/assets/theme-ayu.png +0 -0
  398. package/dist/docs/assets/theme-default.png +0 -0
  399. package/dist/docs/assets/theme-dracula.png +0 -0
  400. package/dist/docs/assets/theme-github.png +0 -0
  401. package/dist/google-gemini-cli-core-0.34.0-nightly.20260304.28af4e127.tgz +0 -0
package/README.md CHANGED
@@ -6,7 +6,7 @@
6
6
  [![License](https://img.shields.io/github/license/google-gemini/gemini-cli)](https://github.com/google-gemini/gemini-cli/blob/main/LICENSE)
7
7
  [![View Code Wiki](https://assets.codewiki.google/readme-badge/static.svg)](https://codewiki.google/github.com/google-gemini/gemini-cli?utm_source=badge&utm_medium=github&utm_campaign=github.com/google-gemini/gemini-cli)
8
8
 
9
- ![Gemini CLI Screenshot](./docs/assets/gemini-screenshot.png)
9
+ ![Gemini CLI Screenshot](/docs/assets/gemini-screenshot.png)
10
10
 
11
11
  Gemini CLI is an open-source AI agent that brings the power of Gemini directly
12
12
  into your terminal. It provides lightweight access to Gemini, giving you the
@@ -147,7 +147,7 @@ Integrate Gemini CLI directly into your GitHub workflows with
147
147
 
148
148
  Choose the authentication method that best fits your needs:
149
149
 
150
- ### Option 1: Login with Google (OAuth login using your Google Account)
150
+ ### Option 1: Sign in with Google (OAuth login using your Google Account)
151
151
 
152
152
  **✨ Best for:** Individual developers as well as anyone who has a Gemini Code
153
153
  Assist License. (see
@@ -161,7 +161,7 @@ for details)
161
161
  - **No API key management** - just sign in with your Google account
162
162
  - **Automatic updates** to latest models
163
163
 
164
- #### Start Gemini CLI, then choose _Login with Google_ and follow the browser authentication flow when prompted
164
+ #### Start Gemini CLI, then choose _Sign in with Google_ and follow the browser authentication flow when prompted
165
165
 
166
166
  ```bash
167
167
  gemini
@@ -60,20 +60,45 @@ All submissions, including submissions by project members, require review. We
60
60
  use [GitHub pull requests](https://docs.github.com/articles/about-pull-requests)
61
61
  for this purpose.
62
62
 
63
- If your pull request involves changes to `packages/cli` (the frontend), we
64
- recommend running our automated frontend review tool. **Note: This tool is
65
- currently experimental.** It helps detect common React anti-patterns, testing
66
- issues, and other frontend-specific best practices that are easy to miss.
63
+ To assist with the review process, we provide an automated review tool that
64
+ helps detect common anti-patterns, testing issues, and other best practices that
65
+ are easy to miss.
67
66
 
68
- To run the review tool, enter the following command from within Gemini CLI:
67
+ #### Using the automated review tool
69
68
 
70
- ```text
71
- /review-frontend <PR_NUMBER>
72
- ```
69
+ You can run the review tool in two ways:
70
+
71
+ 1. **Using the helper script (Recommended):** We provide a script that
72
+ automatically handles checking out the PR into a separate worktree,
73
+ installing dependencies, building the project, and launching the review
74
+ tool.
75
+
76
+ ```bash
77
+ ./scripts/review.sh <PR_NUMBER> [model]
78
+ ```
79
+
80
+ **Warning:** If you run `scripts/review.sh`, you must have first verified
81
+ that the code for the PR being reviewed is safe to run and does not contain
82
+ data exfiltration attacks.
83
+
84
+ **Authors are strongly encouraged to run this script on their own PRs**
85
+ immediately after creation. This allows you to catch and fix simple issues
86
+ locally before a maintainer performs a full review.
87
+
88
+ **Note on Models:** By default, the script uses the latest Pro model
89
+ (`gemini-3.1-pro-preview`). If you do not have enough Pro quota, you can run
90
+ it with the latest Flash model instead:
91
+ `./scripts/review.sh <PR_NUMBER> gemini-3-flash-preview`.
92
+
93
+ 2. **Manually from within Gemini CLI:** If you already have the PR checked out
94
+ and built, you can run the tool directly from the CLI prompt:
95
+
96
+ ```text
97
+ /review-frontend <PR_NUMBER>
98
+ ```
73
99
 
74
- Replace `<PR_NUMBER>` with your pull request number. Authors are encouraged to
75
- run this on their own PRs for self-review, and reviewers should use it to
76
- augment their manual review process.
100
+ Replace `<PR_NUMBER>` with your pull request number. Reviewers should use this
101
+ tool to augment, not replace, their manual review process.
77
102
 
78
103
  ### Self-assigning and unassigning issues
79
104
 
@@ -267,7 +292,8 @@ npm run test:e2e
267
292
  ```
268
293
 
269
294
  For more detailed information on the integration testing framework, please see
270
- the [Integration Tests documentation](/docs/integration-tests.md).
295
+ the
296
+ [Integration Tests documentation](https://geminicli.com/docs/integration-tests).
271
297
 
272
298
  ### Linting and preflight checks
273
299
 
@@ -320,11 +346,9 @@ npm run lint
320
346
 
321
347
  - Please adhere to the coding style, patterns, and conventions used throughout
322
348
  the existing codebase.
323
- - Consult
324
- [GEMINI.md](https://github.com/google-gemini/gemini-cli/blob/main/GEMINI.md)
325
- (typically found in the project root) for specific instructions related to
326
- AI-assisted development, including conventions for React, comments, and Git
327
- usage.
349
+ - Consult [GEMINI.md](../GEMINI.md) (typically found in the project root) for
350
+ specific instructions related to AI-assisted development, including
351
+ conventions for React, comments, and Git usage.
328
352
  - **Imports:** Pay special attention to import paths. The project uses ESLint to
329
353
  enforce restrictions on relative imports between packages.
330
354
 
@@ -548,7 +572,7 @@ Before submitting your documentation pull request, please:
548
572
 
549
573
  If you have questions about contributing documentation:
550
574
 
551
- - Check our [FAQ](/docs/resources/faq.md).
575
+ - Check our [FAQ](https://geminicli.com/docs/resources/faq).
552
576
  - Review existing documentation for examples.
553
577
  - Open [an issue](https://github.com/google-gemini/gemini-cli/issues) to discuss
554
578
  your proposed changes.
@@ -1,6 +1,6 @@
1
- # Preview release: v0.33.0-preview.4
1
+ # Preview release: v0.33.0-preview.14
2
2
 
3
- Released: March 06, 2026
3
+ Released: March 10, 2026
4
4
 
5
5
  Our preview release includes the latest, new, and experimental features. This
6
6
  release may not be as stable as our [latest weekly release](latest.md).
@@ -29,6 +29,13 @@ npm install -g @google/gemini-cli@preview
29
29
 
30
30
  ## What's Changed
31
31
 
32
+ - fix(patch): cherry-pick 1b69637 to release/v0.33.0-preview.13-pr-21467
33
+ [CONFLICTS] by @gemini-cli-robot in
34
+ [#21930](https://github.com/google-gemini/gemini-cli/pull/21930)
35
+ - fix(patch): cherry-pick e5615f4 to release/v0.33.0-preview.12-pr-21037 to
36
+ patch version v0.33.0-preview.12 and create version 0.33.0-preview.13 by
37
+ @gemini-cli-robot in
38
+ [#21922](https://github.com/google-gemini/gemini-cli/pull/21922)
32
39
  - fix(patch): cherry-pick 7ec477d to release/v0.33.0-preview.3-pr-21305 to patch
33
40
  version v0.33.0-preview.3 and create version 0.33.0-preview.4 by
34
41
  @gemini-cli-robot in
@@ -198,4 +205,4 @@ npm install -g @google/gemini-cli@preview
198
205
  [#20991](https://github.com/google-gemini/gemini-cli/pull/20991)
199
206
 
200
207
  **Full Changelog**:
201
- https://github.com/google-gemini/gemini-cli/compare/v0.32.0-preview.0...v0.33.0-preview.4
208
+ https://github.com/google-gemini/gemini-cli/compare/v0.32.0-preview.0...v0.33.0-preview.14
@@ -8,7 +8,8 @@ and parameters.
8
8
  | Command | Description | Example |
9
9
  | ---------------------------------- | ---------------------------------- | ------------------------------------------------------------ |
10
10
  | `gemini` | Start interactive REPL | `gemini` |
11
- | `gemini "query"` | Query non-interactively, then exit | `gemini "explain this project"` |
11
+ | `gemini -p "query"` | Query non-interactively | `gemini -p "summarize README.md"` |
12
+ | `gemini "query"` | Query and continue interactively | `gemini "explain this project"` |
12
13
  | `cat file \| gemini` | Process piped content | `cat logs.txt \| gemini`<br>`Get-Content logs.txt \| gemini` |
13
14
  | `gemini -i "query"` | Execute and continue interactively | `gemini -i "What is the purpose of this project?"` |
14
15
  | `gemini -r "latest"` | Continue most recent session | `gemini -r "latest"` |
@@ -20,9 +21,24 @@ and parameters.
20
21
 
21
22
  ### Positional arguments
22
23
 
23
- | Argument | Type | Description |
24
- | -------- | ----------------- | ------------------------------------------------------------------------------------------------------------------ |
25
- | `query` | string (variadic) | Positional prompt. Defaults to one-shot mode. Use `-i/--prompt-interactive` to execute and continue interactively. |
24
+ | Argument | Type | Description |
25
+ | -------- | ----------------- | ---------------------------------------------------------------------------------------------------------- |
26
+ | `query` | string (variadic) | Positional prompt. Defaults to interactive mode in a TTY. Use `-p/--prompt` for non-interactive execution. |
27
+
28
+ ## Interactive commands
29
+
30
+ These commands are available within the interactive REPL.
31
+
32
+ | Command | Description |
33
+ | -------------------- | ---------------------------------------- |
34
+ | `/skills reload` | Reload discovered skills from disk |
35
+ | `/agents reload` | Reload the agent registry |
36
+ | `/commands reload` | Reload custom slash commands |
37
+ | `/memory reload` | Reload context files (e.g., `GEMINI.md`) |
38
+ | `/mcp reload` | Restart and reload MCP servers |
39
+ | `/extensions reload` | Reload all active extensions |
40
+ | `/help` | Show help for all commands |
41
+ | `/quit` | Exit the interactive session |
26
42
 
27
43
  ## CLI Options
28
44
 
@@ -32,7 +48,7 @@ and parameters.
32
48
  | `--version` | `-v` | - | - | Show CLI version number and exit |
33
49
  | `--help` | `-h` | - | - | Show help information |
34
50
  | `--model` | `-m` | string | `auto` | Model to use. See [Model Selection](#model-selection) for available values. |
35
- | `--prompt` | `-p` | string | - | Prompt text. Appended to stdin input if provided. **Deprecated:** Use positional arguments instead. |
51
+ | `--prompt` | `-p` | string | - | Prompt text. Appended to stdin input if provided. Forces non-interactive mode. |
36
52
  | `--prompt-interactive` | `-i` | string | - | Execute prompt and continue in interactive mode |
37
53
  | `--sandbox` | `-s` | boolean | `false` | Run in a sandboxed environment for safer execution |
38
54
  | `--approval-mode` | - | string | `default` | Approval mode for tool execution. Choices: `default`, `auto_edit`, `yolo` |
@@ -63,7 +63,7 @@ You can interact with the loaded context files by using the `/memory` command.
63
63
  - **`/memory show`**: Displays the full, concatenated content of the current
64
64
  hierarchical memory. This lets you inspect the exact instructional context
65
65
  being provided to the model.
66
- - **`/memory refresh`**: Forces a re-scan and reload of all `GEMINI.md` files
66
+ - **`/memory reload`**: Forces a re-scan and reload of all `GEMINI.md` files
67
67
  from all configured locations.
68
68
  - **`/memory add <text>`**: Appends your text to your global
69
69
  `~/.gemini/GEMINI.md` file. This lets you add persistent memories on the fly.
@@ -6,7 +6,7 @@ structured text or JSON output without an interactive terminal UI.
6
6
  ## Technical reference
7
7
 
8
8
  Headless mode is triggered when the CLI is run in a non-TTY environment or when
9
- providing a query as a positional argument without the interactive flag.
9
+ providing a query with the `-p` (or `--prompt`) flag.
10
10
 
11
11
  ### Output formats
12
12
 
@@ -31,7 +31,8 @@ Returns a stream of newline-delimited JSON (JSONL) events.
31
31
  - `tool_use`: Tool call requests with arguments.
32
32
  - `tool_result`: Output from executed tools.
33
33
  - `error`: Non-fatal warnings and system errors.
34
- - `result`: Final outcome with aggregated statistics.
34
+ - `result`: Final outcome with aggregated statistics and per-model token usage
35
+ breakdowns.
35
36
 
36
37
  ## Exit codes
37
38
 
@@ -0,0 +1,58 @@
1
+ # Notifications (experimental)
2
+
3
+ Gemini CLI can send system notifications to alert you when a session completes
4
+ or when it needs your attention, such as when it's waiting for you to approve a
5
+ tool call.
6
+
7
+ > **Note:** This is a preview feature currently under active development.
8
+ > Preview features may be available on the **Preview** channel or may need to be
9
+ > enabled under `/settings`.
10
+
11
+ Notifications are particularly useful when running long-running tasks or using
12
+ [Plan Mode](./plan-mode.md), letting you switch to other windows while Gemini
13
+ CLI works in the background.
14
+
15
+ ## Requirements
16
+
17
+ Currently, system notifications are only supported on macOS.
18
+
19
+ ### Terminal support
20
+
21
+ The CLI uses the OSC 9 terminal escape sequence to trigger system notifications.
22
+ This is supported by several modern terminal emulators. If your terminal does
23
+ not support OSC 9 notifications, Gemini CLI falls back to a system alert sound
24
+ to get your attention.
25
+
26
+ ## Enable notifications
27
+
28
+ Notifications are disabled by default. You can enable them using the `/settings`
29
+ command or by updating your `settings.json` file.
30
+
31
+ 1. Open the settings dialog by typing `/settings` in an interactive session.
32
+ 2. Navigate to the **General** category.
33
+ 3. Toggle the **Enable Notifications** setting to **On**.
34
+
35
+ Alternatively, add the following to your `settings.json`:
36
+
37
+ ```json
38
+ {
39
+ "general": {
40
+ "enableNotifications": true
41
+ }
42
+ }
43
+ ```
44
+
45
+ ## Types of notifications
46
+
47
+ Gemini CLI sends notifications for the following events:
48
+
49
+ - **Action required:** Triggered when the model is waiting for user input or
50
+ tool approval. This helps you know when the CLI has paused and needs you to
51
+ intervene.
52
+ - **Session complete:** Triggered when a session finishes successfully. This is
53
+ useful for tracking the completion of automated tasks.
54
+
55
+ ## Next steps
56
+
57
+ - Start planning with [Plan Mode](./plan-mode.md).
58
+ - Configure your experience with other [settings](./settings.md).
@@ -1,4 +1,4 @@
1
- # Plan Mode (experimental)
1
+ # Plan Mode
2
2
 
3
3
  Plan Mode is a read-only environment for architecting robust solutions before
4
4
  implementation. With Plan Mode, you can:
@@ -8,27 +8,8 @@ implementation. With Plan Mode, you can:
8
8
  - **Design:** Understand problems, evaluate trade-offs, and choose a solution.
9
9
  - **Plan:** Align on an execution strategy before any code is modified.
10
10
 
11
- > **Note:** This is a preview feature currently under active development. Your
12
- > feedback is invaluable as we refine this feature. If you have ideas,
13
- > suggestions, or encounter issues:
14
- >
15
- > - [Open an issue] on GitHub.
16
- > - Use the **/bug** command within Gemini CLI to file an issue.
17
-
18
- ## How to enable Plan Mode
19
-
20
- Enable Plan Mode in **Settings** or by editing your configuration file.
21
-
22
- - **Settings:** Use the `/settings` command and set **Plan** to `true`.
23
- - **Configuration:** Add the following to your `settings.json`:
24
-
25
- ```json
26
- {
27
- "experimental": {
28
- "plan": true
29
- }
30
- }
31
- ```
11
+ Plan Mode is enabled by default. You can manage this setting using the
12
+ `/settings` command.
32
13
 
33
14
  ## How to enter Plan Mode
34
15
 
@@ -62,8 +43,11 @@ To start Plan Mode while using Gemini CLI:
62
43
  - **Command:** Type `/plan` in the input box.
63
44
 
64
45
  - **Natural Language:** Ask Gemini CLI to "start a plan for...". Gemini CLI
65
- calls the [`enter_plan_mode`] tool to switch modes.
66
- > **Note:** This tool is not available when Gemini CLI is in [YOLO mode].
46
+ calls the
47
+ [`enter_plan_mode`](../tools/planning.md#1-enter_plan_mode-enterplanmode) tool
48
+ to switch modes.
49
+ > **Note:** This tool is not available when Gemini CLI is in
50
+ > [YOLO mode](../reference/configuration.md#command-line-arguments).
67
51
 
68
52
  ## How to use Plan Mode
69
53
 
@@ -74,7 +58,8 @@ Gemini CLI takes action.
74
58
  will then enter Plan Mode (if it's not already) to research the task.
75
59
  2. **Review research and provide input:** As Gemini CLI analyzes your codebase,
76
60
  it may ask you questions or present different implementation options using
77
- [`ask_user`]. Provide your preferences to help guide the design.
61
+ [`ask_user`](../tools/ask-user.md). Provide your preferences to help guide
62
+ the design.
78
63
  3. **Review the plan:** Once Gemini CLI has a proposed strategy, it creates a
79
64
  detailed implementation plan as a Markdown file in your plans directory. You
80
65
  can open and read this file to understand the proposed changes.
@@ -116,25 +101,33 @@ Plan Mode enforces strict safety policies to prevent accidental changes.
116
101
 
117
102
  These are the only allowed tools:
118
103
 
119
- - **FileSystem (Read):** [`read_file`], [`list_directory`], [`glob`]
120
- - **Search:** [`grep_search`], [`google_web_search`]
121
- - **Research Subagents:** [`codebase_investigator`], [`cli_help`]
122
- - **Interaction:** [`ask_user`]
123
- - **MCP tools (Read):** Read-only [MCP tools] (for example, `github_read_issue`,
124
- `postgres_read_schema`) are allowed.
125
- - **Planning (Write):** [`write_file`] and [`replace`] only allowed for `.md`
104
+ - **FileSystem (Read):**
105
+ [`read_file`](../tools/file-system.md#2-read_file-readfile),
106
+ [`list_directory`](../tools/file-system.md#1-list_directory-readfolder),
107
+ [`glob`](../tools/file-system.md#4-glob-findfiles)
108
+ - **Search:** [`grep_search`](../tools/file-system.md#5-grep_search-searchtext),
109
+ [`google_web_search`](../tools/web-search.md)
110
+ - **Research Subagents:**
111
+ [`codebase_investigator`](../core/subagents.md#codebase-investigator),
112
+ [`cli_help`](../core/subagents.md#cli-help-agent)
113
+ - **Interaction:** [`ask_user`](../tools/ask-user.md)
114
+ - **MCP tools (Read):** Read-only [MCP tools](../tools/mcp-server.md) (for
115
+ example, `github_read_issue`, `postgres_read_schema`) are allowed.
116
+ - **Planning (Write):**
117
+ [`write_file`](../tools/file-system.md#3-write_file-writefile) and
118
+ [`replace`](../tools/file-system.md#6-replace-edit) only allowed for `.md`
126
119
  files in the `~/.gemini/tmp/<project>/<session-id>/plans/` directory or your
127
120
  [custom plans directory](#custom-plan-directory-and-policies).
128
- - **Memory:** [`save_memory`]
129
- - **Skills:** [`activate_skill`] (allows loading specialized instructions and
130
- resources in a read-only manner)
121
+ - **Memory:** [`save_memory`](../tools/memory.md)
122
+ - **Skills:** [`activate_skill`](../cli/skills.md) (allows loading specialized
123
+ instructions and resources in a read-only manner)
131
124
 
132
125
  ### Custom planning with skills
133
126
 
134
- You can use [Agent Skills] to customize how Gemini CLI approaches planning for
135
- specific types of tasks. When a skill is activated during Plan Mode, its
136
- specialized instructions and procedural workflows will guide the research,
137
- design, and planning phases.
127
+ You can use [Agent Skills](../cli/skills.md) to customize how Gemini CLI
128
+ approaches planning for specific types of tasks. When a skill is activated
129
+ during Plan Mode, its specialized instructions and procedural workflows will
130
+ guide the research, design, and planning phases.
138
131
 
139
132
  For example:
140
133
 
@@ -151,10 +144,32 @@ based on the task description.
151
144
 
152
145
  ### Custom policies
153
146
 
154
- Plan Mode's default tool restrictions are managed by the [policy engine] and
155
- defined in the built-in [`plan.toml`] file. The built-in policy (Tier 1)
156
- enforces the read-only state, but you can customize these rules by creating your
157
- own policies in your `~/.gemini/policies/` directory (Tier 2).
147
+ Plan Mode's default tool restrictions are managed by the
148
+ [policy engine](../reference/policy-engine.md) and defined in the built-in
149
+ [`plan.toml`] file. The built-in policy (Tier 1) enforces the read-only state,
150
+ but you can customize these rules by creating your own policies in your
151
+ `~/.gemini/policies/` directory (Tier 2).
152
+
153
+ #### Global vs. mode-specific rules
154
+
155
+ As described in the
156
+ [policy engine documentation](../reference/policy-engine.md#approval-modes), any
157
+ rule that does not explicitly specify `modes` is considered "always active" and
158
+ will apply to Plan Mode as well.
159
+
160
+ If you want a rule to apply to other modes but _not_ to Plan Mode, you must
161
+ explicitly specify the target modes. For example, to allow `npm test` in default
162
+ and Auto-Edit modes but not in Plan Mode:
163
+
164
+ ```toml
165
+ [[rule]]
166
+ toolName = "run_shell_command"
167
+ commandPrefix = "npm test"
168
+ decision = "allow"
169
+ priority = 100
170
+ # By omitting "plan", this rule will not be active in Plan Mode.
171
+ modes = ["default", "autoEdit"]
172
+ ```
158
173
 
159
174
  #### Example: Automatically approve read-only MCP tools
160
175
 
@@ -173,8 +188,8 @@ priority = 100
173
188
  modes = ["plan"]
174
189
  ```
175
190
 
176
- For more information on how the policy engine works, see the [policy engine]
177
- docs.
191
+ For more information on how the policy engine works, see the
192
+ [policy engine](../reference/policy-engine.md) docs.
178
193
 
179
194
  #### Example: Allow git commands in Plan Mode
180
195
 
@@ -194,9 +209,12 @@ modes = ["plan"]
194
209
 
195
210
  #### Example: Enable custom subagents in Plan Mode
196
211
 
197
- Built-in research [subagents] like [`codebase_investigator`] and [`cli_help`]
198
- are enabled by default in Plan Mode. You can enable additional [custom
199
- subagents] by adding a rule to your policy.
212
+ Built-in research [subagents](../core/subagents.md) like
213
+ [`codebase_investigator`](../core/subagents.md#codebase-investigator) and
214
+ [`cli_help`](../core/subagents.md#cli-help-agent) are enabled by default in Plan
215
+ Mode. You can enable additional
216
+ [custom subagents](../core/subagents.md#creating-custom-subagents) by adding a
217
+ rule to your policy.
200
218
 
201
219
  `~/.gemini/policies/research-subagents.toml`
202
220
 
@@ -235,10 +253,11 @@ locations defined within a project's workspace cannot be used to escape and
235
253
  overwrite sensitive files elsewhere. Any user-configured directory must reside
236
254
  within the project boundary.
237
255
 
238
- Using a custom directory requires updating your [policy engine] configurations
239
- to allow `write_file` and `replace` in that specific location. For example, to
240
- allow writing to the `.gemini/plans` directory within your project, create a
241
- policy file at `~/.gemini/policies/plan-custom-directory.toml`:
256
+ Using a custom directory requires updating your
257
+ [policy engine](../reference/policy-engine.md) configurations to allow
258
+ `write_file` and `replace` in that specific location. For example, to allow
259
+ writing to the `.gemini/plans` directory within your project, create a policy
260
+ file at `~/.gemini/policies/plan-custom-directory.toml`:
242
261
 
243
262
  ```toml
244
263
  [[rule]]
@@ -254,13 +273,16 @@ argsPattern = "\"file_path\":\"[^\"]+[\\\\/]+\\.gemini[\\\\/]+plans[\\\\/]+[\\w-
254
273
  ## Planning workflows
255
274
 
256
275
  Plan Mode provides building blocks for structured research and design. These are
257
- implemented as [extensions] using core planning tools like [`enter_plan_mode`],
258
- [`exit_plan_mode`], and [`ask_user`].
276
+ implemented as [extensions](../extensions/index.md) using core planning tools
277
+ like [`enter_plan_mode`](../tools/planning.md#1-enter_plan_mode-enterplanmode),
278
+ [`exit_plan_mode`](../tools/planning.md#2-exit_plan_mode-exitplanmode), and
279
+ [`ask_user`](../tools/ask-user.md).
259
280
 
260
281
  ### Built-in planning workflow
261
282
 
262
283
  The built-in planner uses an adaptive workflow to analyze your project, consult
263
- you on trade-offs via [`ask_user`], and draft a plan for your approval.
284
+ you on trade-offs via [`ask_user`](../tools/ask-user.md), and draft a plan for
285
+ your approval.
264
286
 
265
287
  ### Custom planning workflows
266
288
 
@@ -272,23 +294,29 @@ You can install or create specialized planners to suit your workflow.
272
294
  "tracks" and stores persistent artifacts in your project's `conductor/`
273
295
  directory:
274
296
 
275
- - **Automate transitions:** Switches to read-only mode via [`enter_plan_mode`].
276
- - **Streamline decisions:** Uses [`ask_user`] for architectural choices.
297
+ - **Automate transitions:** Switches to read-only mode via
298
+ [`enter_plan_mode`](../tools/planning.md#1-enter_plan_mode-enterplanmode).
299
+ - **Streamline decisions:** Uses [`ask_user`](../tools/ask-user.md) for
300
+ architectural choices.
277
301
  - **Maintain project context:** Stores artifacts in the project directory using
278
302
  [custom plan directory and policies](#custom-plan-directory-and-policies).
279
- - **Handoff execution:** Transitions to implementation via [`exit_plan_mode`].
303
+ - **Handoff execution:** Transitions to implementation via
304
+ [`exit_plan_mode`](../tools/planning.md#2-exit_plan_mode-exitplanmode).
280
305
 
281
306
  #### Build your own
282
307
 
283
308
  Since Plan Mode is built on modular building blocks, you can develop your own
284
- custom planning workflow as an [extensions]. By leveraging core tools and
285
- [custom policies](#custom-policies), you can define how Gemini CLI researches
286
- and stores plans for your specific domain.
309
+ custom planning workflow as an [extensions](../extensions/index.md). By
310
+ leveraging core tools and [custom policies](#custom-policies), you can define
311
+ how Gemini CLI researches and stores plans for your specific domain.
287
312
 
288
313
  To build a custom planning workflow, you can use:
289
314
 
290
- - **Tool usage:** Use core tools like [`enter_plan_mode`], [`ask_user`], and
291
- [`exit_plan_mode`] to manage the research and design process.
315
+ - **Tool usage:** Use core tools like
316
+ [`enter_plan_mode`](../tools/planning.md#1-enter_plan_mode-enterplanmode),
317
+ [`ask_user`](../tools/ask-user.md), and
318
+ [`exit_plan_mode`](../tools/planning.md#2-exit_plan_mode-exitplanmode) to
319
+ manage the research and design process.
292
320
  - **Customization:** Set your own storage locations and policy rules using
293
321
  [custom plan directories](#custom-plan-directory-and-policies) and
294
322
  [custom policies](#custom-policies).
@@ -302,8 +330,9 @@ high-reasoning model routing.
302
330
 
303
331
  ## Automatic Model Routing
304
332
 
305
- When using an [auto model], Gemini CLI automatically optimizes [model routing]
306
- based on the current phase of your task:
333
+ When using an [auto model](../reference/configuration.md#model), Gemini CLI
334
+ automatically optimizes [model routing](../cli/telemetry.md#model-routing) based
335
+ on the current phase of your task:
307
336
 
308
337
  1. **Planning Phase:** While in Plan Mode, the CLI routes requests to a
309
338
  high-reasoning **Pro** model to ensure robust architectural decisions and
@@ -334,7 +363,8 @@ associated plan files and task trackers.
334
363
  - **Default behavior:** Sessions (and their plans) are retained for **30 days**.
335
364
  - **Configuration:** You can customize this behavior via the `/settings` command
336
365
  (search for **Session Retention**) or in your `settings.json` file. See
337
- [session retention] for more details.
366
+ [session retention](../cli/session-management.md#session-retention) for more
367
+ details.
338
368
 
339
369
  Manual deletion also removes all associated artifacts:
340
370
 
@@ -344,32 +374,7 @@ Manual deletion also removes all associated artifacts:
344
374
  If you use a [custom plans directory](#custom-plan-directory-and-policies),
345
375
  those files are not automatically deleted and must be managed manually.
346
376
 
347
- [`list_directory`]: /docs/tools/file-system.md#1-list_directory-readfolder
348
- [`read_file`]: /docs/tools/file-system.md#2-read_file-readfile
349
- [`grep_search`]: /docs/tools/file-system.md#5-grep_search-searchtext
350
- [`write_file`]: /docs/tools/file-system.md#3-write_file-writefile
351
- [`glob`]: /docs/tools/file-system.md#4-glob-findfiles
352
- [`google_web_search`]: /docs/tools/web-search.md
353
- [`replace`]: /docs/tools/file-system.md#6-replace-edit
354
- [MCP tools]: /docs/tools/mcp-server.md
355
- [`save_memory`]: /docs/tools/memory.md
356
- [`activate_skill`]: /docs/cli/skills.md
357
- [`codebase_investigator`]: /docs/core/subagents.md#codebase-investigator
358
- [`cli_help`]: /docs/core/subagents.md#cli-help-agent
359
- [subagents]: /docs/core/subagents.md
360
- [custom subagents]: /docs/core/subagents.md#creating-custom-subagents
361
- [policy engine]: /docs/reference/policy-engine.md
362
- [`enter_plan_mode`]: /docs/tools/planning.md#1-enter_plan_mode-enterplanmode
363
- [`exit_plan_mode`]: /docs/tools/planning.md#2-exit_plan_mode-exitplanmode
364
- [`ask_user`]: /docs/tools/ask-user.md
365
- [YOLO mode]: /docs/reference/configuration.md#command-line-arguments
366
377
  [`plan.toml`]:
367
378
  https://github.com/google-gemini/gemini-cli/blob/main/packages/core/src/policy/policies/plan.toml
368
- [auto model]: /docs/reference/configuration.md#model
369
- [model routing]: /docs/cli/telemetry.md#model-routing
370
- [preferred external editor]: /docs/reference/configuration.md#general
371
- [session retention]: /docs/cli/session-management.md#session-retention
372
- [extensions]: /docs/extensions/
373
379
  [Conductor]: https://github.com/gemini-cli-extensions/conductor
374
380
  [open an issue]: https://github.com/google-gemini/gemini-cli/issues
375
- [Agent Skills]: /docs/cli/skills.md