@google/gemini-cli-core 0.22.0-preview.3 → 0.23.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 (342) hide show
  1. package/dist/docs/CONTRIBUTING.md +546 -0
  2. package/dist/docs/architecture.md +80 -0
  3. package/dist/docs/assets/connected_devtools.png +0 -0
  4. package/dist/docs/assets/gemini-screenshot.png +0 -0
  5. package/dist/docs/assets/release_patch.png +0 -0
  6. package/dist/docs/assets/theme-ansi-light.png +0 -0
  7. package/dist/docs/assets/theme-ansi.png +0 -0
  8. package/dist/docs/assets/theme-atom-one.png +0 -0
  9. package/dist/docs/assets/theme-ayu-light.png +0 -0
  10. package/dist/docs/assets/theme-ayu.png +0 -0
  11. package/dist/docs/assets/theme-custom.png +0 -0
  12. package/dist/docs/assets/theme-default-light.png +0 -0
  13. package/dist/docs/assets/theme-default.png +0 -0
  14. package/dist/docs/assets/theme-dracula.png +0 -0
  15. package/dist/docs/assets/theme-github-light.png +0 -0
  16. package/dist/docs/assets/theme-github.png +0 -0
  17. package/dist/docs/assets/theme-google-light.png +0 -0
  18. package/dist/docs/assets/theme-xcode-light.png +0 -0
  19. package/dist/docs/changelogs/index.md +592 -0
  20. package/dist/docs/changelogs/latest.md +225 -0
  21. package/dist/docs/changelogs/preview.md +129 -0
  22. package/dist/docs/changelogs/releases.md +896 -0
  23. package/dist/docs/cli/authentication.md +3 -0
  24. package/dist/docs/cli/checkpointing.md +94 -0
  25. package/dist/docs/cli/commands.md +354 -0
  26. package/dist/docs/cli/configuration.md +780 -0
  27. package/dist/docs/cli/custom-commands.md +315 -0
  28. package/dist/docs/cli/enterprise.md +565 -0
  29. package/dist/docs/cli/gemini-ignore.md +71 -0
  30. package/dist/docs/cli/gemini-md.md +108 -0
  31. package/dist/docs/cli/generation-settings.md +210 -0
  32. package/dist/docs/cli/headless.md +388 -0
  33. package/dist/docs/cli/index.md +63 -0
  34. package/dist/docs/cli/keyboard-shortcuts.md +143 -0
  35. package/dist/docs/cli/model-routing.md +37 -0
  36. package/dist/docs/cli/model.md +62 -0
  37. package/dist/docs/cli/sandbox.md +171 -0
  38. package/dist/docs/cli/session-management.md +158 -0
  39. package/dist/docs/cli/settings.md +112 -0
  40. package/dist/docs/cli/system-prompt.md +93 -0
  41. package/dist/docs/cli/telemetry.md +791 -0
  42. package/dist/docs/cli/themes.md +237 -0
  43. package/dist/docs/cli/token-caching.md +20 -0
  44. package/dist/docs/cli/trusted-folders.md +95 -0
  45. package/dist/docs/cli/tutorials.md +83 -0
  46. package/dist/docs/cli/uninstall.md +47 -0
  47. package/dist/docs/core/index.md +101 -0
  48. package/dist/docs/core/memport.md +244 -0
  49. package/dist/docs/core/policy-engine.md +267 -0
  50. package/dist/docs/core/tools-api.md +131 -0
  51. package/dist/docs/examples/proxy-script.md +83 -0
  52. package/dist/docs/extensions/extension-releasing.md +183 -0
  53. package/dist/docs/extensions/getting-started-extensions.md +245 -0
  54. package/dist/docs/extensions/index.md +293 -0
  55. package/dist/docs/faq.md +154 -0
  56. package/dist/docs/get-started/authentication.md +321 -0
  57. package/dist/docs/get-started/configuration-v1.md +888 -0
  58. package/dist/docs/get-started/configuration.md +1444 -0
  59. package/dist/docs/get-started/deployment.md +143 -0
  60. package/dist/docs/get-started/examples.md +219 -0
  61. package/dist/docs/get-started/gemini-3.md +116 -0
  62. package/dist/docs/get-started/index.md +71 -0
  63. package/dist/docs/get-started/installation.md +141 -0
  64. package/dist/docs/hooks/best-practices.md +806 -0
  65. package/dist/docs/hooks/index.md +665 -0
  66. package/dist/docs/hooks/reference.md +168 -0
  67. package/dist/docs/hooks/writing-hooks.md +1026 -0
  68. package/dist/docs/ide-integration/ide-companion-spec.md +267 -0
  69. package/dist/docs/ide-integration/index.md +202 -0
  70. package/dist/docs/index.md +147 -0
  71. package/dist/docs/integration-tests.md +211 -0
  72. package/dist/docs/issue-and-pr-automation.md +134 -0
  73. package/dist/docs/local-development.md +128 -0
  74. package/dist/docs/mermaid/context.mmd +103 -0
  75. package/dist/docs/mermaid/render-path.mmd +64 -0
  76. package/dist/docs/npm.md +62 -0
  77. package/dist/docs/quota-and-pricing.md +158 -0
  78. package/dist/docs/release-confidence.md +164 -0
  79. package/dist/docs/releases.md +540 -0
  80. package/dist/docs/sidebar.json +297 -0
  81. package/dist/docs/tools/file-system.md +217 -0
  82. package/dist/docs/tools/index.md +95 -0
  83. package/dist/docs/tools/mcp-server.md +1044 -0
  84. package/dist/docs/tools/memory.md +54 -0
  85. package/dist/docs/tools/shell.md +260 -0
  86. package/dist/docs/tools/todos.md +57 -0
  87. package/dist/docs/tools/web-fetch.md +59 -0
  88. package/dist/docs/tools/web-search.md +42 -0
  89. package/dist/docs/tos-privacy.md +96 -0
  90. package/dist/docs/troubleshooting.md +158 -0
  91. package/dist/src/agents/codebase-investigator.d.ts +2 -2
  92. package/dist/src/agents/codebase-investigator.js +4 -3
  93. package/dist/src/agents/codebase-investigator.js.map +1 -1
  94. package/dist/src/agents/delegate-to-agent-tool.js +8 -4
  95. package/dist/src/agents/delegate-to-agent-tool.js.map +1 -1
  96. package/dist/src/agents/delegate-to-agent-tool.test.js +6 -4
  97. package/dist/src/agents/delegate-to-agent-tool.test.js.map +1 -1
  98. package/dist/src/agents/introspection-agent.d.ts +23 -0
  99. package/dist/src/agents/introspection-agent.js +72 -0
  100. package/dist/src/agents/introspection-agent.js.map +1 -0
  101. package/dist/src/agents/introspection-agent.test.js +47 -0
  102. package/dist/src/agents/introspection-agent.test.js.map +1 -0
  103. package/dist/src/agents/{executor.d.ts → local-executor.d.ts} +5 -11
  104. package/dist/src/agents/{executor.js → local-executor.js} +79 -53
  105. package/dist/src/agents/local-executor.js.map +1 -0
  106. package/dist/src/agents/{executor.test.js → local-executor.test.js} +64 -45
  107. package/dist/src/agents/local-executor.test.js.map +1 -0
  108. package/dist/src/agents/{invocation.d.ts → local-invocation.d.ts} +5 -6
  109. package/dist/src/agents/{invocation.js → local-invocation.js} +8 -9
  110. package/dist/src/agents/local-invocation.js.map +1 -0
  111. package/dist/src/agents/local-invocation.test.d.ts +6 -0
  112. package/dist/src/agents/{invocation.test.js → local-invocation.test.js} +18 -17
  113. package/dist/src/agents/local-invocation.test.js.map +1 -0
  114. package/dist/src/agents/registry.d.ts +1 -0
  115. package/dist/src/agents/registry.js +68 -20
  116. package/dist/src/agents/registry.js.map +1 -1
  117. package/dist/src/agents/registry.test.js +113 -1
  118. package/dist/src/agents/registry.test.js.map +1 -1
  119. package/dist/src/agents/remote-invocation.d.ts +21 -0
  120. package/dist/src/agents/remote-invocation.js +31 -0
  121. package/dist/src/agents/remote-invocation.js.map +1 -0
  122. package/dist/src/agents/remote-invocation.test.d.ts +6 -0
  123. package/dist/src/agents/remote-invocation.test.js +35 -0
  124. package/dist/src/agents/remote-invocation.test.js.map +1 -0
  125. package/dist/src/agents/subagent-tool-wrapper.js +7 -3
  126. package/dist/src/agents/subagent-tool-wrapper.js.map +1 -1
  127. package/dist/src/agents/subagent-tool-wrapper.test.js +10 -9
  128. package/dist/src/agents/subagent-tool-wrapper.test.js.map +1 -1
  129. package/dist/src/agents/toml-loader.d.ts +65 -0
  130. package/dist/src/agents/toml-loader.js +176 -0
  131. package/dist/src/agents/toml-loader.js.map +1 -0
  132. package/dist/src/agents/toml-loader.test.d.ts +6 -0
  133. package/dist/src/agents/toml-loader.test.js +190 -0
  134. package/dist/src/agents/toml-loader.test.js.map +1 -0
  135. package/dist/src/agents/types.d.ts +12 -4
  136. package/dist/src/availability/modelAvailabilityService.d.ts +2 -1
  137. package/dist/src/availability/policyHelpers.d.ts +4 -3
  138. package/dist/src/availability/policyHelpers.js +13 -20
  139. package/dist/src/availability/policyHelpers.js.map +1 -1
  140. package/dist/src/availability/policyHelpers.test.js +28 -18
  141. package/dist/src/availability/policyHelpers.test.js.map +1 -1
  142. package/dist/src/code_assist/oauth2.js +1 -1
  143. package/dist/src/code_assist/oauth2.js.map +1 -1
  144. package/dist/src/code_assist/oauth2.test.js +6 -8
  145. package/dist/src/code_assist/oauth2.test.js.map +1 -1
  146. package/dist/src/code_assist/server.d.ts +4 -1
  147. package/dist/src/code_assist/server.js +50 -7
  148. package/dist/src/code_assist/server.js.map +1 -1
  149. package/dist/src/code_assist/server.test.js +177 -27
  150. package/dist/src/code_assist/server.test.js.map +1 -1
  151. package/dist/src/code_assist/telemetry.d.ts +14 -0
  152. package/dist/src/code_assist/telemetry.js +156 -0
  153. package/dist/src/code_assist/telemetry.js.map +1 -0
  154. package/dist/src/code_assist/telemetry.test.d.ts +6 -0
  155. package/dist/src/code_assist/telemetry.test.js +300 -0
  156. package/dist/src/code_assist/telemetry.test.js.map +1 -0
  157. package/dist/src/code_assist/types.d.ts +52 -1
  158. package/dist/src/code_assist/types.js +21 -0
  159. package/dist/src/code_assist/types.js.map +1 -1
  160. package/dist/src/config/config.d.ts +10 -13
  161. package/dist/src/config/config.js +32 -32
  162. package/dist/src/config/config.js.map +1 -1
  163. package/dist/src/config/config.test.js +72 -19
  164. package/dist/src/config/config.test.js.map +1 -1
  165. package/dist/src/config/flashFallback.test.js +0 -37
  166. package/dist/src/config/flashFallback.test.js.map +1 -1
  167. package/dist/src/config/storage.d.ts +2 -0
  168. package/dist/src/config/storage.js +6 -0
  169. package/dist/src/config/storage.js.map +1 -1
  170. package/dist/src/config/storage.test.js +8 -0
  171. package/dist/src/config/storage.test.js.map +1 -1
  172. package/dist/src/core/baseLlmClient.js +44 -43
  173. package/dist/src/core/baseLlmClient.js.map +1 -1
  174. package/dist/src/core/baseLlmClient.test.js +12 -19
  175. package/dist/src/core/baseLlmClient.test.js.map +1 -1
  176. package/dist/src/core/client.js +23 -35
  177. package/dist/src/core/client.js.map +1 -1
  178. package/dist/src/core/client.test.js +32 -65
  179. package/dist/src/core/client.test.js.map +1 -1
  180. package/dist/src/core/clientHookTriggers.js +2 -2
  181. package/dist/src/core/clientHookTriggers.js.map +1 -1
  182. package/dist/src/core/contentGenerator.test.js +0 -6
  183. package/dist/src/core/contentGenerator.test.js.map +1 -1
  184. package/dist/src/core/coreToolHookTriggers.js +3 -3
  185. package/dist/src/core/coreToolHookTriggers.js.map +1 -1
  186. package/dist/src/core/geminiChat.js +21 -71
  187. package/dist/src/core/geminiChat.js.map +1 -1
  188. package/dist/src/core/geminiChat.test.js +16 -92
  189. package/dist/src/core/geminiChat.test.js.map +1 -1
  190. package/dist/src/core/geminiChatHookTriggers.js +3 -3
  191. package/dist/src/core/geminiChatHookTriggers.js.map +1 -1
  192. package/dist/src/core/geminiChat_network_retry.test.js +4 -6
  193. package/dist/src/core/geminiChat_network_retry.test.js.map +1 -1
  194. package/dist/src/core/prompts.test.js +0 -2
  195. package/dist/src/core/prompts.test.js.map +1 -1
  196. package/dist/src/core/sessionHookTriggers.js +3 -3
  197. package/dist/src/core/sessionHookTriggers.js.map +1 -1
  198. package/dist/src/core/turn.d.ts +1 -0
  199. package/dist/src/core/turn.js +4 -12
  200. package/dist/src/core/turn.js.map +1 -1
  201. package/dist/src/core/turn.test.js +0 -5
  202. package/dist/src/core/turn.test.js.map +1 -1
  203. package/dist/src/fallback/handler.test.js +0 -21
  204. package/dist/src/fallback/handler.test.js.map +1 -1
  205. package/dist/src/generated/git-commit.d.ts +2 -2
  206. package/dist/src/generated/git-commit.js +2 -2
  207. package/dist/src/hooks/hookEventHandler.js +10 -4
  208. package/dist/src/hooks/hookEventHandler.js.map +1 -1
  209. package/dist/src/hooks/hookEventHandler.test.js +47 -0
  210. package/dist/src/hooks/hookEventHandler.test.js.map +1 -1
  211. package/dist/src/hooks/hookPlanner.js +3 -1
  212. package/dist/src/hooks/hookPlanner.js.map +1 -1
  213. package/dist/src/hooks/hookPlanner.test.js +61 -0
  214. package/dist/src/hooks/hookPlanner.test.js.map +1 -1
  215. package/dist/src/hooks/hookRegistry.d.ts +1 -1
  216. package/dist/src/hooks/hookRegistry.js +2 -2
  217. package/dist/src/hooks/hookRegistry.js.map +1 -1
  218. package/dist/src/hooks/hookRegistry.test.js +73 -0
  219. package/dist/src/hooks/hookRegistry.test.js.map +1 -1
  220. package/dist/src/hooks/hookRunner.js +14 -10
  221. package/dist/src/hooks/hookRunner.js.map +1 -1
  222. package/dist/src/hooks/hookRunner.test.js +81 -33
  223. package/dist/src/hooks/hookRunner.test.js.map +1 -1
  224. package/dist/src/hooks/types.d.ts +2 -0
  225. package/dist/src/hooks/types.js.map +1 -1
  226. package/dist/src/index.d.ts +2 -0
  227. package/dist/src/index.js +2 -0
  228. package/dist/src/index.js.map +1 -1
  229. package/dist/src/mcp/oauth-provider.js +6 -2
  230. package/dist/src/mcp/oauth-provider.js.map +1 -1
  231. package/dist/src/mcp/oauth-provider.test.js +4 -1
  232. package/dist/src/mcp/oauth-provider.test.js.map +1 -1
  233. package/dist/src/mcp/oauth-utils.d.ts +8 -1
  234. package/dist/src/mcp/oauth-utils.js +30 -1
  235. package/dist/src/mcp/oauth-utils.js.map +1 -1
  236. package/dist/src/mcp/oauth-utils.test.js +42 -0
  237. package/dist/src/mcp/oauth-utils.test.js.map +1 -1
  238. package/dist/src/routing/strategies/fallbackStrategy.js +0 -3
  239. package/dist/src/routing/strategies/fallbackStrategy.js.map +1 -1
  240. package/dist/src/routing/strategies/fallbackStrategy.test.js +0 -6
  241. package/dist/src/routing/strategies/fallbackStrategy.test.js.map +1 -1
  242. package/dist/src/services/contextManager.d.ts +5 -11
  243. package/dist/src/services/contextManager.js +20 -17
  244. package/dist/src/services/contextManager.js.map +1 -1
  245. package/dist/src/services/contextManager.test.js +40 -41
  246. package/dist/src/services/contextManager.test.js.map +1 -1
  247. package/dist/src/services/loopDetectionService.js +2 -1
  248. package/dist/src/services/loopDetectionService.js.map +1 -1
  249. package/dist/src/services/loopDetectionService.test.js +14 -8
  250. package/dist/src/services/loopDetectionService.test.js.map +1 -1
  251. package/dist/src/services/modelConfig.integration.test.js +1 -1
  252. package/dist/src/services/modelConfig.integration.test.js.map +1 -1
  253. package/dist/src/services/shellExecutionService.js +18 -2
  254. package/dist/src/services/shellExecutionService.js.map +1 -1
  255. package/dist/src/telemetry/clearcut-logger/clearcut-logger.d.ts +4 -2
  256. package/dist/src/telemetry/clearcut-logger/clearcut-logger.js +25 -0
  257. package/dist/src/telemetry/clearcut-logger/clearcut-logger.js.map +1 -1
  258. package/dist/src/telemetry/clearcut-logger/clearcut-logger.test.js +32 -1
  259. package/dist/src/telemetry/clearcut-logger/clearcut-logger.test.js.map +1 -1
  260. package/dist/src/telemetry/clearcut-logger/event-metadata-key.d.ts +5 -1
  261. package/dist/src/telemetry/clearcut-logger/event-metadata-key.js +12 -1
  262. package/dist/src/telemetry/clearcut-logger/event-metadata-key.js.map +1 -1
  263. package/dist/src/telemetry/loggers.js +1 -0
  264. package/dist/src/telemetry/loggers.js.map +1 -1
  265. package/dist/src/telemetry/loggers.test.js +37 -2
  266. package/dist/src/telemetry/loggers.test.js.map +1 -1
  267. package/dist/src/telemetry/sdk.js +2 -2
  268. package/dist/src/telemetry/sdk.js.map +1 -1
  269. package/dist/src/tools/confirmation-policy.test.d.ts +6 -0
  270. package/dist/src/tools/confirmation-policy.test.js +152 -0
  271. package/dist/src/tools/confirmation-policy.test.js.map +1 -0
  272. package/dist/src/tools/edit.js +5 -1
  273. package/dist/src/tools/edit.js.map +1 -1
  274. package/dist/src/tools/get-internal-docs.d.ts +27 -0
  275. package/dist/src/tools/get-internal-docs.js +129 -0
  276. package/dist/src/tools/get-internal-docs.js.map +1 -0
  277. package/dist/src/tools/get-internal-docs.test.d.ts +6 -0
  278. package/dist/src/tools/get-internal-docs.test.js +56 -0
  279. package/dist/src/tools/get-internal-docs.test.js.map +1 -0
  280. package/dist/src/tools/ripGrep.d.ts +1 -0
  281. package/dist/src/tools/ripGrep.js +16 -4
  282. package/dist/src/tools/ripGrep.js.map +1 -1
  283. package/dist/src/tools/ripGrep.test.js +55 -0
  284. package/dist/src/tools/ripGrep.test.js.map +1 -1
  285. package/dist/src/tools/smart-edit.js +5 -1
  286. package/dist/src/tools/smart-edit.js.map +1 -1
  287. package/dist/src/tools/tool-names.d.ts +14 -0
  288. package/dist/src/tools/tool-names.js +55 -0
  289. package/dist/src/tools/tool-names.js.map +1 -1
  290. package/dist/src/tools/tool-names.test.d.ts +6 -0
  291. package/dist/src/tools/tool-names.test.js +43 -0
  292. package/dist/src/tools/tool-names.test.js.map +1 -0
  293. package/dist/src/tools/tool-registry.d.ts +0 -1
  294. package/dist/src/tools/tool-registry.js +1 -1
  295. package/dist/src/tools/tool-registry.js.map +1 -1
  296. package/dist/src/tools/tool-registry.test.js +2 -1
  297. package/dist/src/tools/tool-registry.test.js.map +1 -1
  298. package/dist/src/tools/web-fetch.js +5 -1
  299. package/dist/src/tools/web-fetch.js.map +1 -1
  300. package/dist/src/tools/write-file.js +5 -1
  301. package/dist/src/tools/write-file.js.map +1 -1
  302. package/dist/src/utils/checkpointUtils.js +1 -1
  303. package/dist/src/utils/checkpointUtils.js.map +1 -1
  304. package/dist/src/utils/checkpointUtils.test.js +1 -1
  305. package/dist/src/utils/checkpointUtils.test.js.map +1 -1
  306. package/dist/src/utils/editCorrector.js +1 -1
  307. package/dist/src/utils/editCorrector.js.map +1 -1
  308. package/dist/src/utils/editCorrector.test.js +2 -2
  309. package/dist/src/utils/editCorrector.test.js.map +1 -1
  310. package/dist/src/utils/environmentContext.d.ts +1 -0
  311. package/dist/src/utils/environmentContext.js +4 -0
  312. package/dist/src/utils/environmentContext.js.map +1 -1
  313. package/dist/src/utils/environmentContext.test.js +2 -0
  314. package/dist/src/utils/environmentContext.test.js.map +1 -1
  315. package/dist/src/utils/events.d.ts +3 -18
  316. package/dist/src/utils/events.js +0 -9
  317. package/dist/src/utils/events.js.map +1 -1
  318. package/dist/src/utils/geminiIgnoreParser.d.ts +11 -0
  319. package/dist/src/utils/geminiIgnoreParser.js +20 -0
  320. package/dist/src/utils/geminiIgnoreParser.js.map +1 -1
  321. package/dist/src/utils/geminiIgnoreParser.test.js +48 -0
  322. package/dist/src/utils/geminiIgnoreParser.test.js.map +1 -1
  323. package/dist/src/utils/generateContentResponseUtilities.d.ts +1 -0
  324. package/dist/src/utils/generateContentResponseUtilities.js +10 -0
  325. package/dist/src/utils/generateContentResponseUtilities.js.map +1 -1
  326. package/dist/src/utils/generateContentResponseUtilities.test.js +59 -2
  327. package/dist/src/utils/generateContentResponseUtilities.test.js.map +1 -1
  328. package/dist/src/utils/memoryDiscovery.js +1 -1
  329. package/dist/src/utils/memoryDiscovery.js.map +1 -1
  330. package/dist/src/utils/memoryDiscovery.test.js +3 -1
  331. package/dist/src/utils/memoryDiscovery.test.js.map +1 -1
  332. package/dist/src/utils/shell-utils.js +25 -4
  333. package/dist/src/utils/shell-utils.js.map +1 -1
  334. package/dist/tsconfig.tsbuildinfo +1 -1
  335. package/package.json +1 -6
  336. package/dist/google-gemini-cli-core-0.22.0-preview.2.tgz +0 -0
  337. package/dist/src/agents/executor.js.map +0 -1
  338. package/dist/src/agents/executor.test.js.map +0 -1
  339. package/dist/src/agents/invocation.js.map +0 -1
  340. package/dist/src/agents/invocation.test.js.map +0 -1
  341. /package/dist/src/agents/{executor.test.d.ts → introspection-agent.test.d.ts} +0 -0
  342. /package/dist/src/agents/{invocation.test.d.ts → local-executor.test.d.ts} +0 -0
@@ -0,0 +1,540 @@
1
+ # Gemini CLI releases
2
+
3
+ ## `dev` vs `prod` environment
4
+
5
+ Our release flows support both `dev` and `prod` environments.
6
+
7
+ The `dev` environment pushes to a private Github-hosted NPM repository, with the
8
+ package names beginning with `@google-gemini/**` instead of `@google/**`.
9
+
10
+ The `prod` environment pushes to the public global NPM registry via Wombat
11
+ Dressing Room, which is Google's system for managing NPM packages in the
12
+ `@google/**` namespace. The packages are all named `@google/**`.
13
+
14
+ More information can be found about these systems in the
15
+ [maintainer repo guide](https://github.com/google-gemini/maintainers-gemini-cli/blob/main/npm.md)
16
+
17
+ ### Package scopes
18
+
19
+ | Package | `prod` (Wombat Dressing Room) | `dev` (Github Private NPM Repo) |
20
+ | ---------- | ----------------------------- | ----------------------------------------- |
21
+ | CLI | @google/gemini-cli | @google-gemini/gemini-cli |
22
+ | Core | @google/gemini-cli-core | @google-gemini/gemini-cli-core A2A Server |
23
+ | A2A Server | @google/gemini-cli-a2a-server | @google-gemini/gemini-cli-a2a-server |
24
+
25
+ ## Release cadence and tags
26
+
27
+ We will follow https://semver.org/ as closely as possible but will call out when
28
+ or if we have to deviate from it. Our weekly releases will be minor version
29
+ increments and any bug or hotfixes between releases will go out as patch
30
+ versions on the most recent release.
31
+
32
+ Each Tuesday ~2000 UTC new Stable and Preview releases will be cut. The
33
+ promotion flow is:
34
+
35
+ - Code is committed to main and pushed each night to nightly
36
+ - After no more than 1 week on main, code is promoted to the `preview` channel
37
+ - After 1 week the most recent `preview` channel is promoted to `stable` channel
38
+ - Patch fixes will be produced against both `preview` and `stable` as needed,
39
+ with the final 'patch' version number incrementing each time.
40
+
41
+ ### Preview
42
+
43
+ These releases will not have been fully vetted and may contain regressions or
44
+ other outstanding issues. Please help us test and install with `preview` tag.
45
+
46
+ ```bash
47
+ npm install -g @google/gemini-cli@preview
48
+ ```
49
+
50
+ ### Stable
51
+
52
+ This will be the full promotion of last week's release + any bug fixes and
53
+ validations. Use `latest` tag.
54
+
55
+ ```bash
56
+ npm install -g @google/gemini-cli@latest
57
+ ```
58
+
59
+ ### Nightly
60
+
61
+ - New releases will be published each day at UTC 0000. This will be all changes
62
+ from the main branch as represented at time of release. It should be assumed
63
+ there are pending validations and issues. Use `nightly` tag.
64
+
65
+ ```bash
66
+ npm install -g @google/gemini-cli@nightly
67
+ ```
68
+
69
+ ## Weekly release promotion
70
+
71
+ Each Tuesday, the on-call engineer will trigger the "Promote Release" workflow.
72
+ This single action automates the entire weekly release process:
73
+
74
+ 1. **Promotes preview to stable:** The workflow identifies the latest `preview`
75
+ release and promotes it to `stable`. This becomes the new `latest` version
76
+ on npm.
77
+ 2. **Promotes nightly to preview:** The latest `nightly` release is then
78
+ promoted to become the new `preview` version.
79
+ 3. **Prepares for next nightly:** A pull request is automatically created and
80
+ merged to bump the version in `main` in preparation for the next nightly
81
+ release.
82
+
83
+ This process ensures a consistent and reliable release cadence with minimal
84
+ manual intervention.
85
+
86
+ ### Source of truth for versioning
87
+
88
+ To ensure the highest reliability, the release promotion process uses the **NPM
89
+ registry as the single source of truth** for determining the current version of
90
+ each release channel (`stable`, `preview`, and `nightly`).
91
+
92
+ 1. **Fetch from NPM:** The workflow begins by querying NPM's `dist-tags`
93
+ (`latest`, `preview`, `nightly`) to get the exact version strings for the
94
+ packages currently available to users.
95
+ 2. **Cross-check for integrity:** For each version retrieved from NPM, the
96
+ workflow performs a critical integrity check:
97
+ - It verifies that a corresponding **git tag** exists in the repository.
98
+ - It verifies that a corresponding **GitHub release** has been created.
99
+ 3. **Halt on discrepancy:** If either the git tag or the GitHub Release is
100
+ missing for a version listed on NPM, the workflow will immediately fail.
101
+ This strict check prevents promotions from a broken or incomplete previous
102
+ release and alerts the on-call engineer to a release state inconsistency
103
+ that must be manually resolved.
104
+ 4. **Calculate next version:** Only after these checks pass does the workflow
105
+ proceed to calculate the next semantic version based on the trusted version
106
+ numbers retrieved from NPM.
107
+
108
+ This NPM-first approach, backed by integrity checks, makes the release process
109
+ highly robust and prevents the kinds of versioning discrepancies that can arise
110
+ from relying solely on git history or API outputs.
111
+
112
+ ## Manual releases
113
+
114
+ For situations requiring a release outside of the regular nightly and weekly
115
+ promotion schedule, and NOT already covered by patching process, you can use the
116
+ `Release: Manual` workflow. This workflow provides a direct way to publish a
117
+ specific version from any branch, tag, or commit SHA.
118
+
119
+ ### How to create a manual release
120
+
121
+ 1. Navigate to the **Actions** tab of the repository.
122
+ 2. Select the **Release: Manual** workflow from the list.
123
+ 3. Click the **Run workflow** dropdown button.
124
+ 4. Fill in the required inputs:
125
+ - **Version**: The exact version to release (e.g., `v0.6.1`). This must be a
126
+ valid semantic version with a `v` prefix.
127
+ - **Ref**: The branch, tag, or full commit SHA to release from.
128
+ - **NPM Channel**: The npm channel to publish to. The options are `preview`,
129
+ `nightly`, `latest` (for stable releases), and `dev`. The default is
130
+ `dev`.
131
+ - **Dry Run**: Leave as `true` to run all steps without publishing, or set
132
+ to `false` to perform a live release.
133
+ - **Force Skip Tests**: Set to `true` to skip the test suite. This is not
134
+ recommended for production releases.
135
+ - **Skip GitHub Release**: Set to `true` to skip creating a GitHub release
136
+ and create an npm release only.
137
+ - **Environment**: Select the appropriate environment. The `dev` environment
138
+ is intended for testing. The `prod` environment is intended for production
139
+ releases. `prod` is the default and will require authorization from a
140
+ release administrator.
141
+ 5. Click **Run workflow**.
142
+
143
+ The workflow will then proceed to test (if not skipped), build, and publish the
144
+ release. If the workflow fails during a non-dry run, it will automatically
145
+ create a GitHub issue with the failure details.
146
+
147
+ ## Rollback/rollforward
148
+
149
+ In the event that a release has a critical regression, you can quickly roll back
150
+ to a previous stable version or roll forward to a new patch by changing the npm
151
+ `dist-tag`. The `Release: Change Tags` workflow provides a safe and controlled
152
+ way to do this.
153
+
154
+ This is the preferred method for both rollbacks and rollforwards, as it does not
155
+ require a full release cycle.
156
+
157
+ ### How to change a release tag
158
+
159
+ 1. Navigate to the **Actions** tab of the repository.
160
+ 2. Select the **Release: Change Tags** workflow from the list.
161
+ 3. Click the **Run workflow** dropdown button.
162
+ 4. Fill in the required inputs:
163
+ - **Version**: The existing package version that you want to point the tag
164
+ to (e.g., `0.5.0-preview-2`). This version **must** already be published
165
+ to the npm registry.
166
+ - **Channel**: The npm `dist-tag` to apply (e.g., `preview`, `stable`).
167
+ - **Dry Run**: Leave as `true` to log the action without making changes, or
168
+ set to `false` to perform the live tag change.
169
+ - **Environment**: Select the appropriate environment. The `dev` environment
170
+ is intended for testing. The `prod` environment is intended for production
171
+ releases. `prod` is the default and will require authorization from a
172
+ release administrator.
173
+ 5. Click **Run workflow**.
174
+
175
+ The workflow will then run `npm dist-tag add` for the appropriate `gemini-cli`,
176
+ `gemini-cli-core` and `gemini-cli-a2a-server` packages, pointing the specified
177
+ channel to the specified version.
178
+
179
+ ## Patching
180
+
181
+ If a critical bug that is already fixed on `main` needs to be patched on a
182
+ `stable` or `preview` release, the process is now highly automated.
183
+
184
+ ### How to patch
185
+
186
+ #### 1. Create the patch pull request
187
+
188
+ There are two ways to create a patch pull request:
189
+
190
+ **Option A: From a GitHub comment (recommended)**
191
+
192
+ After a pull request containing the fix has been merged, a maintainer can add a
193
+ comment on that same PR with the following format:
194
+
195
+ `/patch [channel]`
196
+
197
+ - **channel** (optional):
198
+ - _no channel_ - patches both stable and preview channels (default,
199
+ recommended for most fixes)
200
+ - `both` - patches both stable and preview channels (same as default)
201
+ - `stable` - patches only the stable channel
202
+ - `preview` - patches only the preview channel
203
+
204
+ Examples:
205
+
206
+ - `/patch` (patches both stable and preview - default)
207
+ - `/patch both` (patches both stable and preview - explicit)
208
+ - `/patch stable` (patches only stable)
209
+ - `/patch preview` (patches only preview)
210
+
211
+ The `Release: Patch from Comment` workflow will automatically find the merge
212
+ commit SHA and trigger the `Release: Patch (1) Create PR` workflow. If the PR is
213
+ not yet merged, it will post a comment indicating the failure.
214
+
215
+ **Option B: Manually triggering the workflow**
216
+
217
+ Navigate to the **Actions** tab and run the **Release: Patch (1) Create PR**
218
+ workflow.
219
+
220
+ - **Commit**: The full SHA of the commit on `main` that you want to cherry-pick.
221
+ - **Channel**: The channel you want to patch (`stable` or `preview`).
222
+
223
+ This workflow will automatically:
224
+
225
+ 1. Find the latest release tag for the channel.
226
+ 2. Create a release branch from that tag if one doesn't exist (e.g.,
227
+ `release/v0.5.1-pr-12345`).
228
+ 3. Create a new hotfix branch from the release branch.
229
+ 4. Cherry-pick your specified commit into the hotfix branch.
230
+ 5. Create a pull request from the hotfix branch back to the release branch.
231
+
232
+ #### 2. Review and merge
233
+
234
+ Review the automatically created pull request(s) to ensure the cherry-pick was
235
+ successful and the changes are correct. Once approved, merge the pull request.
236
+
237
+ **Security note:** The `release/*` branches are protected by branch protection
238
+ rules. A pull request to one of these branches requires at least one review from
239
+ a code owner before it can be merged. This ensures that no unauthorized code is
240
+ released.
241
+
242
+ #### 2.5. Adding multiple commits to a hotfix (advanced)
243
+
244
+ If you need to include multiple fixes in a single patch release, you can add
245
+ additional commits to the hotfix branch after the initial patch PR has been
246
+ created:
247
+
248
+ 1. **Start with the primary fix**: Use `/patch` (or `/patch both`) on the most
249
+ important PR to create the initial hotfix branch and PR.
250
+
251
+ 2. **Checkout the hotfix branch locally**:
252
+
253
+ ```bash
254
+ git fetch origin
255
+ git checkout hotfix/v0.5.1/stable/cherry-pick-abc1234 # Use the actual branch name from the PR
256
+ ```
257
+
258
+ 3. **Cherry-pick additional commits**:
259
+
260
+ ```bash
261
+ git cherry-pick <commit-sha-1>
262
+ git cherry-pick <commit-sha-2>
263
+ # Add as many commits as needed
264
+ ```
265
+
266
+ 4. **Push the updated branch**:
267
+
268
+ ```bash
269
+ git push origin hotfix/v0.5.1/stable/cherry-pick-abc1234
270
+ ```
271
+
272
+ 5. **Test and review**: The existing patch PR will automatically update with
273
+ your additional commits. Test thoroughly since you're now releasing multiple
274
+ changes together.
275
+
276
+ 6. **Update the PR description**: Consider updating the PR title and description
277
+ to reflect that it includes multiple fixes.
278
+
279
+ This approach allows you to group related fixes into a single patch release
280
+ while maintaining full control over what gets included and how conflicts are
281
+ resolved.
282
+
283
+ #### 3. Automatic release
284
+
285
+ Upon merging the pull request, the `Release: Patch (2) Trigger` workflow is
286
+ automatically triggered. It will then start the `Release: Patch (3) Release`
287
+ workflow, which will:
288
+
289
+ 1. Build and test the patched code.
290
+ 2. Publish the new patch version to npm.
291
+ 3. Create a new GitHub release with the patch notes.
292
+
293
+ This fully automated process ensures that patches are created and released
294
+ consistently and reliably.
295
+
296
+ #### Troubleshooting: Older branch workflows
297
+
298
+ **Issue**: If the patch trigger workflow fails with errors like "Resource not
299
+ accessible by integration" or references to non-existent workflow files (e.g.,
300
+ `patch-release.yml`), this indicates the hotfix branch contains an outdated
301
+ version of the workflow files.
302
+
303
+ **Root cause**: When a PR is merged, GitHub Actions runs the workflow definition
304
+ from the **source branch** (the hotfix branch), not from the target branch (the
305
+ release branch). If the hotfix branch was created from an older release branch
306
+ that predates workflow improvements, it will use the old workflow logic.
307
+
308
+ **Solutions**:
309
+
310
+ **Option 1: Manual trigger (quick fix)** Manually trigger the updated workflow
311
+ from the branch with the latest workflow code:
312
+
313
+ ```bash
314
+ # For a preview channel patch with tests skipped
315
+ gh workflow run release-patch-2-trigger.yml --ref <branch-with-updated-workflow> \
316
+ --field ref="hotfix/v0.6.0-preview.2/preview/cherry-pick-abc1234" \
317
+ --field workflow_ref=<branch-with-updated-workflow> \
318
+ --field dry_run=false \
319
+ --field force_skip_tests=true
320
+
321
+ # For a stable channel patch
322
+ gh workflow run release-patch-2-trigger.yml --ref <branch-with-updated-workflow> \
323
+ --field ref="hotfix/v0.5.1/stable/cherry-pick-abc1234" \
324
+ --field workflow_ref=<branch-with-updated-workflow> \
325
+ --field dry_run=false \
326
+ --field force_skip_tests=false
327
+
328
+ # Example using main branch (most common case)
329
+ gh workflow run release-patch-2-trigger.yml --ref main \
330
+ --field ref="hotfix/v0.6.0-preview.2/preview/cherry-pick-abc1234" \
331
+ --field workflow_ref=main \
332
+ --field dry_run=false \
333
+ --field force_skip_tests=true
334
+ ```
335
+
336
+ **Note**: Replace `<branch-with-updated-workflow>` with the branch containing
337
+ the latest workflow improvements (usually `main`, but could be a feature branch
338
+ if testing updates).
339
+
340
+ **Option 2: Update the hotfix branch** Merge the latest main branch into your
341
+ hotfix branch to get the updated workflows:
342
+
343
+ ```bash
344
+ git checkout hotfix/v0.6.0-preview.2/preview/cherry-pick-abc1234
345
+ git merge main
346
+ git push
347
+ ```
348
+
349
+ Then close and reopen the PR to retrigger the workflow with the updated version.
350
+
351
+ **Option 3: Direct release trigger** Skip the trigger workflow entirely and
352
+ directly run the release workflow:
353
+
354
+ ```bash
355
+ # Replace channel and release_ref with appropriate values
356
+ gh workflow run release-patch-3-release.yml --ref main \
357
+ --field type="preview" \
358
+ --field dry_run=false \
359
+ --field force_skip_tests=true \
360
+ --field release_ref="release/v0.6.0-preview.2"
361
+ ```
362
+
363
+ ### Docker
364
+
365
+ We also run a Google cloud build called
366
+ [release-docker.yml](../.gcp/release-docker.yml). Which publishes the sandbox
367
+ docker to match your release. This will also be moved to GH and combined with
368
+ the main release file once service account permissions are sorted out.
369
+
370
+ ## Release validation
371
+
372
+ After pushing a new release smoke testing should be performed to ensure that the
373
+ packages are working as expected. This can be done by installing the packages
374
+ locally and running a set of tests to ensure that they are functioning
375
+ correctly.
376
+
377
+ - `npx -y @google/gemini-cli@latest --version` to validate the push worked as
378
+ expected if you were not doing a rc or dev tag
379
+ - `npx -y @google/gemini-cli@<release tag> --version` to validate the tag pushed
380
+ appropriately
381
+ - _This is destructive locally_
382
+ `npm uninstall @google/gemini-cli && npm uninstall -g @google/gemini-cli && npm cache clean --force && npm install @google/gemini-cli@<version>`
383
+ - Smoke testing a basic run through of exercising a few llm commands and tools
384
+ is recommended to ensure that the packages are working as expected. We'll
385
+ codify this more in the future.
386
+
387
+ ## Local testing and validation: Changes to the packaging and publishing process
388
+
389
+ If you need to test the release process without actually publishing to NPM or
390
+ creating a public GitHub release, you can trigger the workflow manually from the
391
+ GitHub UI.
392
+
393
+ 1. Go to the
394
+ [Actions tab](https://github.com/google-gemini/gemini-cli/actions/workflows/release-manual.yml)
395
+ of the repository.
396
+ 2. Click on the "Run workflow" dropdown.
397
+ 3. Leave the `dry_run` option checked (`true`).
398
+ 4. Click the "Run workflow" button.
399
+
400
+ This will run the entire release process but will skip the `npm publish` and
401
+ `gh release create` steps. You can inspect the workflow logs to ensure
402
+ everything is working as expected.
403
+
404
+ It is crucial to test any changes to the packaging and publishing process
405
+ locally before committing them. This ensures that the packages will be published
406
+ correctly and that they will work as expected when installed by a user.
407
+
408
+ To validate your changes, you can perform a dry run of the publishing process.
409
+ This will simulate the publishing process without actually publishing the
410
+ packages to the npm registry.
411
+
412
+ ```bash
413
+ npm_package_version=9.9.9 SANDBOX_IMAGE_REGISTRY="registry" SANDBOX_IMAGE_NAME="thename" npm run publish:npm --dry-run
414
+ ```
415
+
416
+ This command will do the following:
417
+
418
+ 1. Build all the packages.
419
+ 2. Run all the prepublish scripts.
420
+ 3. Create the package tarballs that would be published to npm.
421
+ 4. Print a summary of the packages that would be published.
422
+
423
+ You can then inspect the generated tarballs to ensure that they contain the
424
+ correct files and that the `package.json` files have been updated correctly. The
425
+ tarballs will be created in the root of each package's directory (e.g.,
426
+ `packages/cli/google-gemini-cli-0.1.6.tgz`).
427
+
428
+ By performing a dry run, you can be confident that your changes to the packaging
429
+ process are correct and that the packages will be published successfully.
430
+
431
+ ## Release deep dive
432
+
433
+ The release process creates two distinct types of artifacts for different
434
+ distribution channels: standard packages for the NPM registry and a single,
435
+ self-contained executable for GitHub Releases.
436
+
437
+ Here are the key stages:
438
+
439
+ **Stage 1: Pre-release sanity checks and versioning**
440
+
441
+ - **What happens:** Before any files are moved, the process ensures the project
442
+ is in a good state. This involves running tests, linting, and type-checking
443
+ (`npm run preflight`). The version number in the root `package.json` and
444
+ `packages/cli/package.json` is updated to the new release version.
445
+
446
+ **Stage 2: Building the source code for NPM**
447
+
448
+ - **What happens:** The TypeScript source code in `packages/core/src` and
449
+ `packages/cli/src` is compiled into standard JavaScript.
450
+ - **File movement:**
451
+ - `packages/core/src/**/*.ts` -> compiled to -> `packages/core/dist/`
452
+ - `packages/cli/src/**/*.ts` -> compiled to -> `packages/cli/dist/`
453
+ - **Why:** The TypeScript code written during development needs to be converted
454
+ into plain JavaScript that can be run by Node.js. The `core` package is built
455
+ first as the `cli` package depends on it.
456
+
457
+ **Stage 3: Publishing standard packages to NPM**
458
+
459
+ - **What happens:** The `npm publish` command is run for the
460
+ `@google/gemini-cli-core` and `@google/gemini-cli` packages.
461
+ - **Why:** This publishes them as standard Node.js packages. Users installing
462
+ via `npm install -g @google/gemini-cli` will download these packages, and
463
+ `npm` will handle installing the `@google/gemini-cli-core` dependency
464
+ automatically. The code in these packages is not bundled into a single file.
465
+
466
+ **Stage 4: Assembling and creating the GitHub release asset**
467
+
468
+ This stage happens _after_ the NPM publish and creates the single-file
469
+ executable that enables `npx` usage directly from the GitHub repository.
470
+
471
+ 1. **The JavaScript bundle is created:**
472
+ - **What happens:** The built JavaScript from both `packages/core/dist` and
473
+ `packages/cli/dist`, along with all third-party JavaScript dependencies,
474
+ are bundled by `esbuild` into a single, executable JavaScript file (e.g.,
475
+ `gemini.js`). The `node-pty` library is excluded from this bundle as it
476
+ contains native binaries.
477
+ - **Why:** This creates a single, optimized file that contains all the
478
+ necessary application code. It simplifies execution for users who want to
479
+ run the CLI without a full `npm install`, as all dependencies (including
480
+ the `core` package) are included directly.
481
+
482
+ 2. **The `bundle` directory is assembled:**
483
+ - **What happens:** A temporary `bundle` folder is created at the project
484
+ root. The single `gemini.js` executable is placed inside it, along with
485
+ other essential files.
486
+ - **File movement:**
487
+ - `gemini.js` (from esbuild) -> `bundle/gemini.js`
488
+ - `README.md` -> `bundle/README.md`
489
+ - `LICENSE` -> `bundle/LICENSE`
490
+ - `packages/cli/src/utils/*.sb` (sandbox profiles) -> `bundle/`
491
+ - **Why:** This creates a clean, self-contained directory with everything
492
+ needed to run the CLI and understand its license and usage.
493
+
494
+ 3. **The GitHub release is created:**
495
+ - **What happens:** The contents of the `bundle` directory, including the
496
+ `gemini.js` executable, are attached as assets to a new GitHub Release.
497
+ - **Why:** This makes the single-file version of the CLI available for
498
+ direct download and enables the
499
+ `npx https://github.com/google-gemini/gemini-cli` command, which downloads
500
+ and runs this specific bundled asset.
501
+
502
+ **Summary of artifacts**
503
+
504
+ - **NPM:** Publishes standard, un-bundled Node.js packages. The primary artifact
505
+ is the code in `packages/cli/dist`, which depends on
506
+ `@google/gemini-cli-core`.
507
+ - **GitHub release:** Publishes a single, bundled `gemini.js` file that contains
508
+ all dependencies, for easy execution via `npx`.
509
+
510
+ This dual-artifact process ensures that both traditional `npm` users and those
511
+ who prefer the convenience of `npx` have an optimized experience.
512
+
513
+ ## Notifications
514
+
515
+ Failing release workflows will automatically create an issue with the label
516
+ `release-failure`.
517
+
518
+ A notification will be posted to the maintainer's chat channel when issues with
519
+ this type are created.
520
+
521
+ ### Modifying chat notifications
522
+
523
+ Notifications use
524
+ [GitHub for Google Chat](https://workspace.google.com/marketplace/app/github_for_google_chat/536184076190).
525
+ To modify the notifications, use `/github-settings` within the chat space.
526
+
527
+ > [!WARNING] The following instructions describe a fragile workaround that
528
+ > depends on the internal structure of the chat application's UI. It is likely
529
+ > to break with future updates.
530
+
531
+ The list of available labels is not currently populated correctly. If you want
532
+ to add a label that does not appear alphabetically in the first 30 labels in the
533
+ repo, you must use your browser's developer tools to manually modify the UI:
534
+
535
+ 1. Open your browser's developer tools (e.g., Chrome DevTools).
536
+ 2. In the `/github-settings` dialog, inspect the list of labels.
537
+ 3. Locate one of the `<li>` elements representing a label.
538
+ 4. In the HTML, modify the `data-option-value` attribute of that `<li>` element
539
+ to the desired label name (e.g., `release-failure`).
540
+ 5. Click on your modified label in the UI to select it, then save your settings.