@google/gemini-cli-core 0.22.0 → 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/generated/git-commit.js.map +1 -1
  208. package/dist/src/hooks/hookEventHandler.js +10 -4
  209. package/dist/src/hooks/hookEventHandler.js.map +1 -1
  210. package/dist/src/hooks/hookEventHandler.test.js +47 -0
  211. package/dist/src/hooks/hookEventHandler.test.js.map +1 -1
  212. package/dist/src/hooks/hookPlanner.js +3 -1
  213. package/dist/src/hooks/hookPlanner.js.map +1 -1
  214. package/dist/src/hooks/hookPlanner.test.js +61 -0
  215. package/dist/src/hooks/hookPlanner.test.js.map +1 -1
  216. package/dist/src/hooks/hookRegistry.d.ts +1 -1
  217. package/dist/src/hooks/hookRegistry.js +2 -2
  218. package/dist/src/hooks/hookRegistry.js.map +1 -1
  219. package/dist/src/hooks/hookRegistry.test.js +73 -0
  220. package/dist/src/hooks/hookRegistry.test.js.map +1 -1
  221. package/dist/src/hooks/hookRunner.js +14 -10
  222. package/dist/src/hooks/hookRunner.js.map +1 -1
  223. package/dist/src/hooks/hookRunner.test.js +81 -33
  224. package/dist/src/hooks/hookRunner.test.js.map +1 -1
  225. package/dist/src/hooks/types.d.ts +2 -0
  226. package/dist/src/hooks/types.js.map +1 -1
  227. package/dist/src/index.d.ts +2 -0
  228. package/dist/src/index.js +2 -0
  229. package/dist/src/index.js.map +1 -1
  230. package/dist/src/mcp/oauth-provider.js +6 -2
  231. package/dist/src/mcp/oauth-provider.js.map +1 -1
  232. package/dist/src/mcp/oauth-provider.test.js +4 -1
  233. package/dist/src/mcp/oauth-provider.test.js.map +1 -1
  234. package/dist/src/mcp/oauth-utils.d.ts +8 -1
  235. package/dist/src/mcp/oauth-utils.js +30 -1
  236. package/dist/src/mcp/oauth-utils.js.map +1 -1
  237. package/dist/src/mcp/oauth-utils.test.js +42 -0
  238. package/dist/src/mcp/oauth-utils.test.js.map +1 -1
  239. package/dist/src/routing/strategies/fallbackStrategy.js +0 -3
  240. package/dist/src/routing/strategies/fallbackStrategy.js.map +1 -1
  241. package/dist/src/routing/strategies/fallbackStrategy.test.js +0 -6
  242. package/dist/src/routing/strategies/fallbackStrategy.test.js.map +1 -1
  243. package/dist/src/services/contextManager.d.ts +5 -11
  244. package/dist/src/services/contextManager.js +20 -17
  245. package/dist/src/services/contextManager.js.map +1 -1
  246. package/dist/src/services/contextManager.test.js +40 -41
  247. package/dist/src/services/contextManager.test.js.map +1 -1
  248. package/dist/src/services/loopDetectionService.js +2 -1
  249. package/dist/src/services/loopDetectionService.js.map +1 -1
  250. package/dist/src/services/loopDetectionService.test.js +14 -8
  251. package/dist/src/services/loopDetectionService.test.js.map +1 -1
  252. package/dist/src/services/modelConfig.integration.test.js +1 -1
  253. package/dist/src/services/modelConfig.integration.test.js.map +1 -1
  254. package/dist/src/services/shellExecutionService.js +18 -2
  255. package/dist/src/services/shellExecutionService.js.map +1 -1
  256. package/dist/src/telemetry/clearcut-logger/clearcut-logger.d.ts +4 -2
  257. package/dist/src/telemetry/clearcut-logger/clearcut-logger.js +25 -0
  258. package/dist/src/telemetry/clearcut-logger/clearcut-logger.js.map +1 -1
  259. package/dist/src/telemetry/clearcut-logger/clearcut-logger.test.js +32 -1
  260. package/dist/src/telemetry/clearcut-logger/clearcut-logger.test.js.map +1 -1
  261. package/dist/src/telemetry/clearcut-logger/event-metadata-key.d.ts +5 -1
  262. package/dist/src/telemetry/clearcut-logger/event-metadata-key.js +12 -1
  263. package/dist/src/telemetry/clearcut-logger/event-metadata-key.js.map +1 -1
  264. package/dist/src/telemetry/loggers.js +1 -0
  265. package/dist/src/telemetry/loggers.js.map +1 -1
  266. package/dist/src/telemetry/loggers.test.js +37 -2
  267. package/dist/src/telemetry/loggers.test.js.map +1 -1
  268. package/dist/src/telemetry/sdk.js +2 -2
  269. package/dist/src/telemetry/sdk.js.map +1 -1
  270. package/dist/src/tools/confirmation-policy.test.d.ts +6 -0
  271. package/dist/src/tools/confirmation-policy.test.js +152 -0
  272. package/dist/src/tools/confirmation-policy.test.js.map +1 -0
  273. package/dist/src/tools/edit.js +5 -1
  274. package/dist/src/tools/edit.js.map +1 -1
  275. package/dist/src/tools/get-internal-docs.d.ts +27 -0
  276. package/dist/src/tools/get-internal-docs.js +129 -0
  277. package/dist/src/tools/get-internal-docs.js.map +1 -0
  278. package/dist/src/tools/get-internal-docs.test.d.ts +6 -0
  279. package/dist/src/tools/get-internal-docs.test.js +56 -0
  280. package/dist/src/tools/get-internal-docs.test.js.map +1 -0
  281. package/dist/src/tools/ripGrep.d.ts +1 -0
  282. package/dist/src/tools/ripGrep.js +16 -4
  283. package/dist/src/tools/ripGrep.js.map +1 -1
  284. package/dist/src/tools/ripGrep.test.js +55 -0
  285. package/dist/src/tools/ripGrep.test.js.map +1 -1
  286. package/dist/src/tools/smart-edit.js +5 -1
  287. package/dist/src/tools/smart-edit.js.map +1 -1
  288. package/dist/src/tools/tool-names.d.ts +14 -0
  289. package/dist/src/tools/tool-names.js +55 -0
  290. package/dist/src/tools/tool-names.js.map +1 -1
  291. package/dist/src/tools/tool-names.test.d.ts +6 -0
  292. package/dist/src/tools/tool-names.test.js +43 -0
  293. package/dist/src/tools/tool-names.test.js.map +1 -0
  294. package/dist/src/tools/tool-registry.d.ts +0 -1
  295. package/dist/src/tools/tool-registry.js +1 -1
  296. package/dist/src/tools/tool-registry.js.map +1 -1
  297. package/dist/src/tools/tool-registry.test.js +2 -1
  298. package/dist/src/tools/tool-registry.test.js.map +1 -1
  299. package/dist/src/tools/web-fetch.js +5 -1
  300. package/dist/src/tools/web-fetch.js.map +1 -1
  301. package/dist/src/tools/write-file.js +5 -1
  302. package/dist/src/tools/write-file.js.map +1 -1
  303. package/dist/src/utils/checkpointUtils.js +1 -1
  304. package/dist/src/utils/checkpointUtils.js.map +1 -1
  305. package/dist/src/utils/checkpointUtils.test.js +1 -1
  306. package/dist/src/utils/checkpointUtils.test.js.map +1 -1
  307. package/dist/src/utils/editCorrector.js +1 -1
  308. package/dist/src/utils/editCorrector.js.map +1 -1
  309. package/dist/src/utils/editCorrector.test.js +2 -2
  310. package/dist/src/utils/editCorrector.test.js.map +1 -1
  311. package/dist/src/utils/environmentContext.d.ts +1 -0
  312. package/dist/src/utils/environmentContext.js +4 -0
  313. package/dist/src/utils/environmentContext.js.map +1 -1
  314. package/dist/src/utils/environmentContext.test.js +2 -0
  315. package/dist/src/utils/environmentContext.test.js.map +1 -1
  316. package/dist/src/utils/events.d.ts +3 -18
  317. package/dist/src/utils/events.js +0 -9
  318. package/dist/src/utils/events.js.map +1 -1
  319. package/dist/src/utils/geminiIgnoreParser.d.ts +11 -0
  320. package/dist/src/utils/geminiIgnoreParser.js +20 -0
  321. package/dist/src/utils/geminiIgnoreParser.js.map +1 -1
  322. package/dist/src/utils/geminiIgnoreParser.test.js +48 -0
  323. package/dist/src/utils/geminiIgnoreParser.test.js.map +1 -1
  324. package/dist/src/utils/generateContentResponseUtilities.d.ts +1 -0
  325. package/dist/src/utils/generateContentResponseUtilities.js +10 -0
  326. package/dist/src/utils/generateContentResponseUtilities.js.map +1 -1
  327. package/dist/src/utils/generateContentResponseUtilities.test.js +59 -2
  328. package/dist/src/utils/generateContentResponseUtilities.test.js.map +1 -1
  329. package/dist/src/utils/memoryDiscovery.js +1 -1
  330. package/dist/src/utils/memoryDiscovery.js.map +1 -1
  331. package/dist/src/utils/memoryDiscovery.test.js +3 -1
  332. package/dist/src/utils/memoryDiscovery.test.js.map +1 -1
  333. package/dist/src/utils/shell-utils.js +25 -4
  334. package/dist/src/utils/shell-utils.js.map +1 -1
  335. package/dist/tsconfig.tsbuildinfo +1 -1
  336. package/package.json +1 -6
  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,158 @@
1
+ # Troubleshooting guide
2
+
3
+ This guide provides solutions to common issues and debugging tips, including
4
+ topics on:
5
+
6
+ - Authentication or login errors
7
+ - Frequently asked questions (FAQs)
8
+ - Debugging tips
9
+ - Existing GitHub Issues similar to yours or creating new Issues
10
+
11
+ ## Authentication or login errors
12
+
13
+ - **Error:
14
+ `You must be a named user on your organization's Gemini Code Assist Standard edition subscription to use this service. Please contact your administrator to request an entitlement to Gemini Code Assist Standard edition.`**
15
+ - **Cause:** This error might occur if Gemini CLI detects the
16
+ `GOOGLE_CLOUD_PROJECT` or `GOOGLE_CLOUD_PROJECT_ID` environment variable is
17
+ defined. Setting these variables forces an organization subscription check.
18
+ This might be an issue if you are using an individual Google account not
19
+ linked to an organizational subscription.
20
+
21
+ - **Solution:**
22
+ - **Individual Users:** Unset the `GOOGLE_CLOUD_PROJECT` and
23
+ `GOOGLE_CLOUD_PROJECT_ID` environment variables. Check and remove these
24
+ variables from your shell configuration files (for example, `.bashrc`,
25
+ `.zshrc`) and any `.env` files. If this doesn't resolve the issue, try
26
+ using a different Google account.
27
+
28
+ - **Organizational Users:** Contact your Google Cloud administrator to be
29
+ added to your organization's Gemini Code Assist subscription.
30
+
31
+ - **Error: `Failed to login. Message: Request contains an invalid argument`**
32
+ - **Cause:** Users with Google Workspace accounts or Google Cloud accounts
33
+ associated with their Gmail accounts may not be able to activate the free
34
+ tier of the Google Code Assist plan.
35
+ - **Solution:** For Google Cloud accounts, you can work around this by setting
36
+ `GOOGLE_CLOUD_PROJECT` to your project ID. Alternatively, you can obtain the
37
+ Gemini API key from
38
+ [Google AI Studio](http://aistudio.google.com/app/apikey), which also
39
+ includes a separate free tier.
40
+
41
+ - **Error: `UNABLE_TO_GET_ISSUER_CERT_LOCALLY` or
42
+ `unable to get local issuer certificate`**
43
+ - **Cause:** You may be on a corporate network with a firewall that intercepts
44
+ and inspects SSL/TLS traffic. This often requires a custom root CA
45
+ certificate to be trusted by Node.js.
46
+ - **Solution:** Set the `NODE_EXTRA_CA_CERTS` environment variable to the
47
+ absolute path of your corporate root CA certificate file.
48
+ - Example: `export NODE_EXTRA_CA_CERTS=/path/to/your/corporate-ca.crt`
49
+
50
+ ## Common error messages and solutions
51
+
52
+ - **Error: `EADDRINUSE` (Address already in use) when starting an MCP server.**
53
+ - **Cause:** Another process is already using the port that the MCP server is
54
+ trying to bind to.
55
+ - **Solution:** Either stop the other process that is using the port or
56
+ configure the MCP server to use a different port.
57
+
58
+ - **Error: Command not found (when attempting to run Gemini CLI with
59
+ `gemini`).**
60
+ - **Cause:** Gemini CLI is not correctly installed or it is not in your
61
+ system's `PATH`.
62
+ - **Solution:** The update depends on how you installed Gemini CLI:
63
+ - If you installed `gemini` globally, check that your `npm` global binary
64
+ directory is in your `PATH`. You can update Gemini CLI using the command
65
+ `npm install -g @google/gemini-cli@latest`.
66
+ - If you are running `gemini` from source, ensure you are using the correct
67
+ command to invoke it (e.g., `node packages/cli/dist/index.js ...`). To
68
+ update Gemini CLI, pull the latest changes from the repository, and then
69
+ rebuild using the command `npm run build`.
70
+
71
+ - **Error: `MODULE_NOT_FOUND` or import errors.**
72
+ - **Cause:** Dependencies are not installed correctly, or the project hasn't
73
+ been built.
74
+ - **Solution:**
75
+ 1. Run `npm install` to ensure all dependencies are present.
76
+ 2. Run `npm run build` to compile the project.
77
+ 3. Verify that the build completed successfully with `npm run start`.
78
+
79
+ - **Error: "Operation not permitted", "Permission denied", or similar.**
80
+ - **Cause:** When sandboxing is enabled, Gemini CLI may attempt operations
81
+ that are restricted by your sandbox configuration, such as writing outside
82
+ the project directory or system temp directory.
83
+ - **Solution:** Refer to the [Configuration: Sandboxing](./cli/sandbox.md)
84
+ documentation for more information, including how to customize your sandbox
85
+ configuration.
86
+
87
+ - **Gemini CLI is not running in interactive mode in "CI" environments**
88
+ - **Issue:** The Gemini CLI does not enter interactive mode (no prompt
89
+ appears) if an environment variable starting with `CI_` (e.g., `CI_TOKEN`)
90
+ is set. This is because the `is-in-ci` package, used by the underlying UI
91
+ framework, detects these variables and assumes a non-interactive CI
92
+ environment.
93
+ - **Cause:** The `is-in-ci` package checks for the presence of `CI`,
94
+ `CONTINUOUS_INTEGRATION`, or any environment variable with a `CI_` prefix.
95
+ When any of these are found, it signals that the environment is
96
+ non-interactive, which prevents the Gemini CLI from starting in its
97
+ interactive mode.
98
+ - **Solution:** If the `CI_` prefixed variable is not needed for the CLI to
99
+ function, you can temporarily unset it for the command. e.g.,
100
+ `env -u CI_TOKEN gemini`
101
+
102
+ - **DEBUG mode not working from project .env file**
103
+ - **Issue:** Setting `DEBUG=true` in a project's `.env` file doesn't enable
104
+ debug mode for gemini-cli.
105
+ - **Cause:** The `DEBUG` and `DEBUG_MODE` variables are automatically excluded
106
+ from project `.env` files to prevent interference with gemini-cli behavior.
107
+ - **Solution:** Use a `.gemini/.env` file instead, or configure the
108
+ `advanced.excludedEnvVars` setting in your `settings.json` to exclude fewer
109
+ variables.
110
+
111
+ ## Exit codes
112
+
113
+ The Gemini CLI uses specific exit codes to indicate the reason for termination.
114
+ This is especially useful for scripting and automation.
115
+
116
+ | Exit Code | Error Type | Description |
117
+ | --------- | -------------------------- | --------------------------------------------------------------------------------------------------- |
118
+ | 41 | `FatalAuthenticationError` | An error occurred during the authentication process. |
119
+ | 42 | `FatalInputError` | Invalid or missing input was provided to the CLI. (non-interactive mode only) |
120
+ | 44 | `FatalSandboxError` | An error occurred with the sandboxing environment (e.g., Docker, Podman, or Seatbelt). |
121
+ | 52 | `FatalConfigError` | A configuration file (`settings.json`) is invalid or contains errors. |
122
+ | 53 | `FatalTurnLimitedError` | The maximum number of conversational turns for the session was reached. (non-interactive mode only) |
123
+
124
+ ## Debugging tips
125
+
126
+ - **CLI debugging:**
127
+ - Use the `--debug` flag for more detailed output.
128
+ - Check the CLI logs, often found in a user-specific configuration or cache
129
+ directory.
130
+
131
+ - **Core debugging:**
132
+ - Check the server console output for error messages or stack traces.
133
+ - Increase log verbosity if configurable.
134
+ - Use Node.js debugging tools (e.g., `node --inspect`) if you need to step
135
+ through server-side code.
136
+
137
+ - **Tool issues:**
138
+ - If a specific tool is failing, try to isolate the issue by running the
139
+ simplest possible version of the command or operation the tool performs.
140
+ - For `run_shell_command`, check that the command works directly in your shell
141
+ first.
142
+ - For _file system tools_, verify that paths are correct and check the
143
+ permissions.
144
+
145
+ - **Pre-flight checks:**
146
+ - Always run `npm run preflight` before committing code. This can catch many
147
+ common issues related to formatting, linting, and type errors.
148
+
149
+ ## Existing GitHub issues similar to yours or creating new issues
150
+
151
+ If you encounter an issue that was not covered here in this _Troubleshooting
152
+ guide_, consider searching the Gemini CLI
153
+ [Issue tracker on GitHub](https://github.com/google-gemini/gemini-cli/issues).
154
+ If you can't find an issue similar to yours, consider creating a new GitHub
155
+ Issue with a detailed description. Pull requests are also welcome!
156
+
157
+ > **Note:** Issues tagged as "🔒Maintainers only" are reserved for project
158
+ > maintainers. We will not accept pull requests related to these issues.
@@ -3,7 +3,7 @@
3
3
  * Copyright 2025 Google LLC
4
4
  * SPDX-License-Identifier: Apache-2.0
5
5
  */
6
- import type { AgentDefinition } from './types.js';
6
+ import type { LocalAgentDefinition } from './types.js';
7
7
  import { z } from 'zod';
8
8
  declare const CodebaseInvestigationReportSchema: z.ZodObject<{
9
9
  SummaryOfFindings: z.ZodString;
@@ -42,5 +42,5 @@ declare const CodebaseInvestigationReportSchema: z.ZodObject<{
42
42
  * A Proof-of-Concept subagent specialized in analyzing codebase structure,
43
43
  * dependencies, and technologies.
44
44
  */
45
- export declare const CodebaseInvestigatorAgent: AgentDefinition<typeof CodebaseInvestigationReportSchema>;
45
+ export declare const CodebaseInvestigatorAgent: LocalAgentDefinition<typeof CodebaseInvestigationReportSchema>;
46
46
  export {};
@@ -28,14 +28,15 @@ const CodebaseInvestigationReportSchema = z.object({
28
28
  */
29
29
  export const CodebaseInvestigatorAgent = {
30
30
  name: 'codebase_investigator',
31
+ kind: 'local',
31
32
  displayName: 'Codebase Investigator Agent',
32
- description: `The specialized tool for codebase analysis, architectural mapping, and understanding system-wide dependencies.
33
- Invoke this tool for tasks like vague requests, bug root-cause analysis, system refactoring, comprehensive feature implementation or to answer questions about the codebase that require investigation.
33
+ description: `The specialized tool for codebase analysis, architectural mapping, and understanding system-wide dependencies.
34
+ Invoke this tool for tasks like vague requests, bug root-cause analysis, system refactoring, comprehensive feature implementation or to answer questions about the codebase that require investigation.
34
35
  It returns a structured report with key file paths, symbols, and actionable architectural insights.`,
35
36
  inputConfig: {
36
37
  inputs: {
37
38
  objective: {
38
- description: `A comprehensive and detailed description of the user's ultimate goal.
39
+ description: `A comprehensive and detailed description of the user's ultimate goal.
39
40
  You must include original user's objective as well as questions and any extra context and questions you may have.`,
40
41
  type: 'string',
41
42
  required: true,
@@ -1 +1 @@
1
- {"version":3,"file":"codebase-investigator.js","sourceRoot":"","sources":["../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SAAS,CAAC,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC;IAE1D,WAAW,EAAE;QACX,KAAK,EAAE,oBAAoB;QAC3B,IAAI,EAAE,GAAG;QACT,KAAK,EAAE,IAAI;QACX,cAAc,EAAE,CAAC,CAAC;KACnB;IAED,SAAS,EAAE;QACT,gBAAgB,EAAE,CAAC;QACnB,SAAS,EAAE,EAAE;KACd;IAED,UAAU,EAAE;QACV,wCAAwC;QACxC,KAAK,EAAE,CAAC,YAAY,EAAE,mBAAmB,EAAE,cAAc,EAAE,cAAc,CAAC;KAC3E;IAED,YAAY,EAAE;QACZ,KAAK,EAAE;;;aAGE;QACT,YAAY,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA0DjB;KACE;CACF,CAAC"}
1
+ {"version":3,"file":"codebase-investigator.js","sourceRoot":"","sources":["../../../src/agents/codebase-investigator.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,EACL,cAAc,EACd,cAAc,EACd,YAAY,EACZ,mBAAmB,GACpB,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAAE,oBAAoB,EAAE,MAAM,qBAAqB,CAAC;AAC3D,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,sEAAsE;AACtE,MAAM,iCAAiC,GAAG,CAAC,CAAC,MAAM,CAAC;IACjD,iBAAiB,EAAE,CAAC;SACjB,MAAM,EAAE;SACR,QAAQ,CACP,+EAA+E,CAChF;IACH,gBAAgB,EAAE,CAAC;SAChB,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC;SACjB,QAAQ,CACP,yEAAyE,CAC1E;IACH,iBAAiB,EAAE,CAAC;SACjB,KAAK,CACJ,CAAC,CAAC,MAAM,CAAC;QACP,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE;QACpB,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE;QACrB,UAAU,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC;KAChC,CAAC,CACH;SACA,QAAQ,CAAC,2DAA2D,CAAC;CACzE,CAAC,CAAC;AAEH;;;GAGG;AACH,MAAM,CAAC,MAAM,yBAAyB,GAElC;IACF,IAAI,EAAE,uBAAuB;IAC7B,IAAI,EAAE,OAAO;IACb,WAAW,EAAE,6BAA6B;IAC1C,WAAW,EAAE;;wGAEyF;IACtG,WAAW,EAAE;QACX,MAAM,EAAE;YACN,SAAS,EAAE;gBACT,WAAW,EAAE;4HACuG;gBACpH,IAAI,EAAE,QAAQ;gBACd,QAAQ,EAAE,IAAI;aACf;SACF;KACF;IACD,YAAY,EAAE;QACZ,UAAU,EAAE,QAAQ;QACpB,WAAW,EAAE,kDAAkD;QAC/D,MAAM,EAAE,iCAAiC;KAC1C;IAED,oFAAoF;IACpF,aAAa,EAAE,CAAC,MAAM,EAAE,EAAE,CAAC,IAAI,CAAC,SAAS,CAAC,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC;IAE1D,WAAW,EAAE;QACX,KAAK,EAAE,oBAAoB;QAC3B,IAAI,EAAE,GAAG;QACT,KAAK,EAAE,IAAI;QACX,cAAc,EAAE,CAAC,CAAC;KACnB;IAED,SAAS,EAAE;QACT,gBAAgB,EAAE,CAAC;QACnB,SAAS,EAAE,EAAE;KACd;IAED,UAAU,EAAE;QACV,wCAAwC;QACxC,KAAK,EAAE,CAAC,YAAY,EAAE,mBAAmB,EAAE,cAAc,EAAE,cAAc,CAAC;KAC3E;IAED,YAAY,EAAE;QACZ,KAAK,EAAE;;;aAGE;QACT,YAAY,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA0DjB;KACE;CACF,CAAC"}
@@ -7,7 +7,7 @@ import { z } from 'zod';
7
7
  import { zodToJsonSchema } from 'zod-to-json-schema';
8
8
  import { BaseDeclarativeTool, Kind, BaseToolInvocation, } from '../tools/tools.js';
9
9
  import { DELEGATE_TO_AGENT_TOOL_NAME } from '../tools/tool-names.js';
10
- import { SubagentInvocation } from './invocation.js';
10
+ import { SubagentToolWrapper } from './subagent-tool-wrapper.js';
11
11
  export class DelegateToAgentTool extends BaseDeclarativeTool {
12
12
  registry;
13
13
  config;
@@ -103,9 +103,13 @@ class DelegateInvocation extends BaseToolInvocation {
103
103
  // Extract arguments (everything except agent_name)
104
104
  // eslint-disable-next-line @typescript-eslint/no-unused-vars
105
105
  const { agent_name, ...agentArgs } = this.params;
106
- // Instantiate the Subagent Loop
107
- const subagentInvocation = new SubagentInvocation(agentArgs, definition, this.config, this.messageBus);
108
- return subagentInvocation.execute(signal, updateOutput);
106
+ // Delegate the creation of the specific invocation (Local or Remote) to the wrapper.
107
+ // This centralizes the logic and ensures consistent handling.
108
+ const wrapper = new SubagentToolWrapper(definition, this.config, this.messageBus);
109
+ // We could skip extra validation here if we trust the Registry's schema,
110
+ // but build() will do a safety check anyway.
111
+ const invocation = wrapper.build(agentArgs);
112
+ return invocation.execute(signal, updateOutput);
109
113
  }
110
114
  }
111
115
  //# sourceMappingURL=delegate-to-agent-tool.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"delegate-to-agent-tool.js","sourceRoot":"","sources":["../../../src/agents/delegate-to-agent-tool.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,EACL,mBAAmB,EACnB,IAAI,EAGJ,kBAAkB,GACnB,MAAM,mBAAmB,CAAC;AAE3B,OAAO,EAAE,2BAA2B,EAAE,MAAM,wBAAwB,CAAC;AAIrE,OAAO,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AAKrD,MAAM,OAAO,mBAAoB,SAAQ,mBAGxC;IAEoB;IACA;IAFnB,YACmB,QAAuB,EACvB,MAAc,EAC/B,UAAuB;QAEvB,MAAM,WAAW,GAAG,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U,IAAI,CAAC,MAAM,CAAC,UAAU,yEAAyE,CAC1G,CAAC;QACJ,CAAC;QAED,mDAAmD;QACnD,6DAA6D;QAC7D,MAAM,EAAE,UAAU,EAAE,GAAG,SAAS,EAAE,GAAG,IAAI,CAAC,MAAM,CAAC;QAEjD,qFAAqF;QACrF,8DAA8D;QAC9D,MAAM,OAAO,GAAG,IAAI,mBAAmB,CACrC,UAAU,EACV,IAAI,CAAC,MAAM,EACX,IAAI,CAAC,UAAU,CAChB,CAAC;QAEF,yEAAyE;QACzE,6CAA6C;QAC7C,MAAM,UAAU,GAAG,OAAO,CAAC,KAAK,CAAC,SAAwB,CAAC,CAAC;QAE3D,OAAO,UAAU,CAAC,OAAO,CAAC,MAAM,EAAE,YAAY,CAAC,CAAC;IAClD,CAAC;CACF"}
@@ -6,11 +6,11 @@
6
6
  import { describe, it, expect, vi, beforeEach } from 'vitest';
7
7
  import { DelegateToAgentTool } from './delegate-to-agent-tool.js';
8
8
  import { AgentRegistry } from './registry.js';
9
- import { SubagentInvocation } from './invocation.js';
9
+ import { LocalSubagentInvocation } from './local-invocation.js';
10
10
  import { MessageBusType } from '../confirmation-bus/types.js';
11
11
  import { DELEGATE_TO_AGENT_TOOL_NAME } from '../tools/tool-names.js';
12
- vi.mock('./invocation.js', () => ({
13
- SubagentInvocation: vi.fn().mockImplementation(() => ({
12
+ vi.mock('./local-invocation.js', () => ({
13
+ LocalSubagentInvocation: vi.fn().mockImplementation(() => ({
14
14
  execute: vi
15
15
  .fn()
16
16
  .mockResolvedValue({ content: [{ type: 'text', text: 'Success' }] }),
@@ -22,6 +22,7 @@ describe('DelegateToAgentTool', () => {
22
22
  let tool;
23
23
  let messageBus;
24
24
  const mockAgentDef = {
25
+ kind: 'local',
25
26
  name: 'test_agent',
26
27
  description: 'A test agent',
27
28
  promptConfig: {},
@@ -38,6 +39,7 @@ describe('DelegateToAgentTool', () => {
38
39
  beforeEach(() => {
39
40
  config = {
40
41
  getDebugMode: () => false,
42
+ getActiveModel: () => 'test-model',
41
43
  modelConfigService: {
42
44
  registerRuntimeModelConfig: vi.fn(),
43
45
  },
@@ -72,7 +74,7 @@ describe('DelegateToAgentTool', () => {
72
74
  });
73
75
  const result = await invocation.execute(new AbortController().signal);
74
76
  expect(result).toEqual({ content: [{ type: 'text', text: 'Success' }] });
75
- expect(SubagentInvocation).toHaveBeenCalledWith({ arg1: 'valid' }, mockAgentDef, config, messageBus);
77
+ expect(LocalSubagentInvocation).toHaveBeenCalledWith(mockAgentDef, config, { arg1: 'valid' }, messageBus);
76
78
  });
77
79
  it('should throw error for missing required argument', async () => {
78
80
  // Missing arg1 should fail Zod validation
@@ -1 +1 @@
1
- {"version":3,"file":"delegate-to-agent-tool.test.js","sourceRoot":"","sources":["../../../src/agents/delegate-to-agent-tool.test.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,QAAQ,EAAE,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,UAAU,EAAE,MAAM,QAAQ,CAAC;AAC9D,OAAO,EAAE,mBAAmB,EAAE,MAAM,6BAA6B,CAAC;AAClE,OAAO,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAG9C,OAAO,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AAErD,OAAO,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAC9D,OAAO,EAAE,2BAA2B,EAAE,MAAM,wBAAwB,CAAC;AAErE,EAAE,CAAC,IAAI,CAAC,iBAAiB,EAAE,GAAG,EAAE,CAAC,CAAC;IAChC,kBAAkB,EAAE,EAAE,CAAC,EAAE,EAAE,CAAC,kBAAkB,CAAC,GAAG,EAAE,CAAC,CAAC;QACpD,OAAO,EAAE,EAAE;aACR,EAAE,EAAE;aACJ,iBAAiB,CAAC,EAAE,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC,EAAE,CAAC;KACvE,CAAC,CAAC;CACJ,CAAC,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AAI,EAAE,QAAQ;wBACd,WAAW,EAAE,UAAU;wBACvB,QAAQ,EAAE,IAAI;qBACf;iBACF;aACF;SACF,CAAC;QAEF,8DAA8D;QAC7D,QAAgB,CAAC,MAAM,CAAC,GAAG,CAAC,eAAe,CAAC,IAAI,EAAE,eAAe,CAAC,CAAC;QAEpE,MAAM,CAAC,GAAG,EAAE,CAAC,IAAI,mBAAmB,CAAC,QAAQ,EAAE,MAAM,CAAC,CAAC,CAAC,OAAO,CAC7D,uHAAuH,CACxH,CAAC;IACJ,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,+EAA+E,EAAE,KAAK,IAAI,EAAE;QAC7F,MAAM,UAAU,GAAG,IAAI,CAAC,KAAK,CAAC;YAC5B,UAAU,EAAE,YAAY;YACxB,IAAI,EAAE,OAAO;SACd,CAAC,CAAC;QAEH,6BAA6B;QAC7B,MAAM,CAAC,GAAG,UAAU,CAAC,oBAAoB,CAAC,IAAI,eAAe,EAAE,CAAC,MAAM,CAAC,CAAC;QACxE,KAAK,CAAC,CAAC;QAEP,MAAM,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC,oBAAoB,CAC7C,MAAM,CAAC,gBAAgB,CAAC;YACtB,IAAI,EAAE,cAAc,CAAC,yBAAyB;YAC9C,QAAQ,EAAE,MAAM,CAAC,gBAAgB,CAAC;gBAChC,IAAI,EAAE,2BAA2B;aAClC,CAAC;SACH,CAAC,CACH,CAAC;IACJ,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
@@ -0,0 +1,23 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2025 Google LLC
4
+ * SPDX-License-Identifier: Apache-2.0
5
+ */
6
+ import type { AgentDefinition } from './types.js';
7
+ import { z } from 'zod';
8
+ declare const IntrospectionReportSchema: z.ZodObject<{
9
+ answer: z.ZodString;
10
+ sources: z.ZodArray<z.ZodString, "many">;
11
+ }, "strip", z.ZodTypeAny, {
12
+ sources: string[];
13
+ answer: string;
14
+ }, {
15
+ sources: string[];
16
+ answer: string;
17
+ }>;
18
+ /**
19
+ * An agent specialized in answering questions about Gemini CLI itself,
20
+ * using its own documentation and runtime state.
21
+ */
22
+ export declare const IntrospectionAgent: AgentDefinition<typeof IntrospectionReportSchema>;
23
+ export {};
@@ -0,0 +1,72 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2025 Google LLC
4
+ * SPDX-License-Identifier: Apache-2.0
5
+ */
6
+ import { GetInternalDocsTool } from '../tools/get-internal-docs.js';
7
+ import { GEMINI_MODEL_ALIAS_FLASH } from '../config/models.js';
8
+ import { z } from 'zod';
9
+ const IntrospectionReportSchema = z.object({
10
+ answer: z
11
+ .string()
12
+ .describe('The detailed answer to the user question about Gemini CLI.'),
13
+ sources: z
14
+ .array(z.string())
15
+ .describe('The documentation files used to answer the question.'),
16
+ });
17
+ /**
18
+ * An agent specialized in answering questions about Gemini CLI itself,
19
+ * using its own documentation and runtime state.
20
+ */
21
+ export const IntrospectionAgent = {
22
+ name: 'introspection_agent',
23
+ kind: 'local',
24
+ displayName: 'Introspection Agent',
25
+ description: 'Specialized in answering questions about yourself (Gemini CLI): features, documentation, and current runtime configuration.',
26
+ inputConfig: {
27
+ inputs: {
28
+ question: {
29
+ description: 'The specific question about Gemini CLI.',
30
+ type: 'string',
31
+ required: true,
32
+ },
33
+ },
34
+ },
35
+ outputConfig: {
36
+ outputName: 'report',
37
+ description: 'The final answer and sources as a JSON object.',
38
+ schema: IntrospectionReportSchema,
39
+ },
40
+ processOutput: (output) => JSON.stringify(output, null, 2),
41
+ modelConfig: {
42
+ model: GEMINI_MODEL_ALIAS_FLASH,
43
+ temp: 0.1,
44
+ top_p: 0.95,
45
+ thinkingBudget: -1,
46
+ },
47
+ runConfig: {
48
+ max_time_minutes: 3,
49
+ max_turns: 10,
50
+ },
51
+ toolConfig: {
52
+ tools: [new GetInternalDocsTool()],
53
+ },
54
+ promptConfig: {
55
+ query: 'Your task is to answer the following question about Gemini CLI:\n' +
56
+ '<question>\n' +
57
+ '${question}\n' +
58
+ '</question>',
59
+ systemPrompt: "You are **Introspection Agent**, an expert on Gemini CLI. Your purpose is to provide accurate information about Gemini CLI's features, configuration, and current state.\n\n" +
60
+ '### Runtime Context\n' +
61
+ '- **CLI Version:** ${cliVersion}\n' +
62
+ '- **Active Model:** ${activeModel}\n' +
63
+ "- **Today's Date:** ${today}\n\n" +
64
+ '### Instructions\n' +
65
+ "1. **Explore Documentation**: Use the `get_internal_docs` tool to find answers. If you don't know where to start, call `get_internal_docs()` without arguments to see the full list of available documentation files.\n" +
66
+ '2. **Be Precise**: Use the provided runtime context and documentation to give exact answers.\n' +
67
+ '3. **Cite Sources**: Always include the specific documentation files you used in your final report.\n' +
68
+ '4. **Non-Interactive**: You operate in a loop and cannot ask the user for more info. If the question is ambiguous, answer as best as you can with the information available.\n\n' +
69
+ 'You MUST call `complete_task` with a JSON report containing your `answer` and the `sources` you used.',
70
+ },
71
+ };
72
+ //# sourceMappingURL=introspection-agent.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"introspection-agent.js","sourceRoot":"","sources":["../../../src/agents/introspection-agent.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,EAAE,mBAAmB,EAAE,MAAM,+BAA+B,CAAC;AACpE,OAAO,EAAE,wBAAwB,EAAE,MAAM,qBAAqB,CAAC;AAC/D,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,MAAM,yBAAyB,GAAG,CAAC,CAAC,MAAM,CAAC;IACzC,MAAM,EAAE,CAAC;SACN,MAAM,EAAE;SACR,QAAQ,CAAC,4DAA4D,CAAC;IACzE,OAAO,EAAE,CAAC;SACP,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC;SACjB,QAAQ,CAAC,sDAAsD,CAAC;CACpE,CAAC,CAAC;AAEH;;;GAGG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAE3B;IACF,IAAI,EAAE,qBAAqB;IAC3B,IAAI,EAAE,OAAO;IACb,WAAW,EAAE,qBAAqB;IAClC,WAAW,EACT,6HAA6H;IAC/H,WAAW,EAAE;QACX,MAAM,EAAE;YACN,QAAQ,EAAE;gBACR,WAAW,EAAE,yCAAyC;gBACtD,IAAI,EAAE,QAAQ;gBACd,QAAQ,EAAE,IAAI;aACf;SACF;KACF;IACD,YAAY,EAAE;QACZ,UAAU,EAAE,QAAQ;QACpB,WAAW,EAAE,gDAAgD;QAC7D,MAAM,EAAE,yBAAyB;KAClC;IAED,aAAa,EAAE,CAAC,MAAM,EAAE,EAAE,CAAC,IAAI,CAAC,SAAS,CAAC,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC;IAE1D,WAAW,EAAE;QACX,KAAK,EAAE,wBAAwB;QAC/B,IAAI,EAAE,GAAG;QACT,KAAK,EAAE,IAAI;QACX,cAAc,EAAE,CAAC,CAAC;KACnB;IAED,SAAS,EAAE;QACT,gBAAgB,EAAE,CAAC;QACnB,SAAS,EAAE,EAAE;KACd;IAED,UAAU,EAAE;QACV,KAAK,EAAE,CAAC,IAAI,mBAAmB,EAAE,CAAC;KACnC;IAED,YAAY,EAAE;QACZ,KAAK,EACH,mEAAmE;YACnE,cAAc;YACd,eAAe;YACf,aAAa;QACf,YAAY,EACV,8KAA8K;YAC9K,uBAAuB;YACvB,oCAAoC;YACpC,sCAAsC;YACtC,kCAAkC;YAClC,oBAAoB;YACpB,yNAAyN;YACzN,gGAAgG;YAChG,uGAAuG;YACvG,kLAAkL;YAClL,uGAAuG;KAC1G;CACF,CAAC"}
@@ -0,0 +1,47 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2025 Google LLC
4
+ * SPDX-License-Identifier: Apache-2.0
5
+ */
6
+ import { describe, it, expect } from 'vitest';
7
+ import { IntrospectionAgent } from './introspection-agent.js';
8
+ import { GetInternalDocsTool } from '../tools/get-internal-docs.js';
9
+ import { GEMINI_MODEL_ALIAS_FLASH } from '../config/models.js';
10
+ describe('IntrospectionAgent', () => {
11
+ const localAgent = IntrospectionAgent;
12
+ it('should have the correct agent definition metadata', () => {
13
+ expect(localAgent.name).toBe('introspection_agent');
14
+ expect(localAgent.kind).toBe('local');
15
+ expect(localAgent.displayName).toBe('Introspection Agent');
16
+ expect(localAgent.description).toContain('Gemini CLI');
17
+ });
18
+ it('should have correctly configured inputs and outputs', () => {
19
+ expect(localAgent.inputConfig.inputs['question']).toBeDefined();
20
+ expect(localAgent.inputConfig.inputs['question'].required).toBe(true);
21
+ expect(localAgent.outputConfig?.outputName).toBe('report');
22
+ expect(localAgent.outputConfig?.description).toBeDefined();
23
+ });
24
+ it('should use the correct model and tools', () => {
25
+ expect(localAgent.modelConfig?.model).toBe(GEMINI_MODEL_ALIAS_FLASH);
26
+ const tools = localAgent.toolConfig?.tools || [];
27
+ const hasInternalDocsTool = tools.some((t) => t instanceof GetInternalDocsTool);
28
+ expect(hasInternalDocsTool).toBe(true);
29
+ });
30
+ it('should have expected prompt placeholders', () => {
31
+ const systemPrompt = localAgent.promptConfig.systemPrompt || '';
32
+ expect(systemPrompt).toContain('${cliVersion}');
33
+ expect(systemPrompt).toContain('${activeModel}');
34
+ expect(systemPrompt).toContain('${today}');
35
+ const query = localAgent.promptConfig.query || '';
36
+ expect(query).toContain('${question}');
37
+ });
38
+ it('should process output to a formatted JSON string', () => {
39
+ const mockOutput = {
40
+ answer: 'This is the answer.',
41
+ sources: ['file1.md', 'file2.md'],
42
+ };
43
+ const processed = localAgent.processOutput?.(mockOutput);
44
+ expect(processed).toBe(JSON.stringify(mockOutput, null, 2));
45
+ });
46
+ });
47
+ //# sourceMappingURL=introspection-agent.test.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"introspection-agent.test.js","sourceRoot":"","sources":["../../../src/agents/introspection-agent.test.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,QAAQ,EAAE,EAAE,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAC9C,OAAO,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AAC9D,OA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AAE,CAAC;QACjD,MAAM,mBAAmB,GAAG,KAAK,CAAC,IAAI,CACpC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,YAAY,mBAAmB,CACxC,CAAC;QACF,MAAM,CAAC,mBAAmB,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IACzC,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,0CAA0C,EAAE,GAAG,EAAE;QAClD,MAAM,YAAY,GAAG,UAAU,CAAC,YAAY,CAAC,YAAY,IAAI,EAAE,CAAC;QAChE,MAAM,CAAC,YAAY,CAAC,CAAC,SAAS,CAAC,eAAe,CAAC,CAAC;QAChD,MAAM,CAAC,YAAY,CAAC,CAAC,SAAS,CAAC,gBAAgB,CAAC,CAAC;QACjD,MAAM,CAAC,YAAY,CAAC,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC;QAE3C,MAAM,KAAK,GAAG,UAAU,CAAC,YAAY,CAAC,KAAK,IAAI,EAAE,CAAC;QAClD,MAAM,CAAC,KAAK,CAAC,CAAC,SAAS,CAAC,aAAa,CAAC,CAAC;IACzC,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,kDAAkD,EAAE,GAAG,EAAE;QAC1D,MAAM,UAAU,GAAG;YACjB,MAAM,EAAE,qBAAqB;YAC7B,OAAO,EAAE,CAAC,UAAU,EAAE,UAAU,CAAC;SAClC,CAAC;QACF,MAAM,SAAS,GAAG,UAAU,CAAC,aAAa,EAAE,CAAC,UAAU,CAAC,CAAC;QACzD,MAAM,CAAC,SAAS,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC,UAAU,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC;IAC9D,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
@@ -4,7 +4,7 @@
4
4
  * SPDX-License-Identifier: Apache-2.0
5
5
  */
6
6
  import type { Config } from '../config/config.js';
7
- import type { AgentDefinition, AgentInputs, OutputObject, SubagentActivityEvent } from './types.js';
7
+ import type { LocalAgentDefinition, AgentInputs, OutputObject, SubagentActivityEvent } from './types.js';
8
8
  import { type z } from 'zod';
9
9
  /** A callback function to report on agent activity. */
10
10
  export type ActivityCallback = (activity: SubagentActivityEvent) => void;
@@ -14,8 +14,8 @@ export type ActivityCallback = (activity: SubagentActivityEvent) => void;
14
14
  * This executor runs the agent in a loop, calling tools until it calls the
15
15
  * mandatory `complete_task` tool to signal completion.
16
16
  */
17
- export declare class AgentExecutor<TOutput extends z.ZodTypeAny> {
18
- readonly definition: AgentDefinition<TOutput>;
17
+ export declare class LocalAgentExecutor<TOutput extends z.ZodTypeAny> {
18
+ readonly definition: LocalAgentDefinition<TOutput>;
19
19
  private readonly agentId;
20
20
  private readonly toolRegistry;
21
21
  private readonly runtimeContext;
@@ -31,9 +31,9 @@ export declare class AgentExecutor<TOutput extends z.ZodTypeAny> {
31
31
  * @param definition The definition object for the agent.
32
32
  * @param runtimeContext The global runtime configuration.
33
33
  * @param onActivity An optional callback to receive activity events.
34
- * @returns A promise that resolves to a new `AgentExecutor` instance.
34
+ * @returns A promise that resolves to a new `LocalAgentExecutor` instance.
35
35
  */
36
- static create<TOutput extends z.ZodTypeAny>(definition: AgentDefinition<TOutput>, runtimeContext: Config, onActivity?: ActivityCallback): Promise<AgentExecutor<TOutput>>;
36
+ static create<TOutput extends z.ZodTypeAny>(definition: LocalAgentDefinition<TOutput>, runtimeContext: Config, onActivity?: ActivityCallback): Promise<LocalAgentExecutor<TOutput>>;
37
37
  /**
38
38
  * Constructs a new AgentExecutor instance.
39
39
  *
@@ -97,12 +97,6 @@ export declare class AgentExecutor<TOutput extends z.ZodTypeAny> {
97
97
  * @returns A new array of `Content` with templated strings.
98
98
  */
99
99
  private applyTemplateToInitialMessages;
100
- /**
101
- * Validates that all tools in a registry are safe for non-interactive use.
102
- *
103
- * @throws An error if a tool is not on the allow-list for non-interactive execution.
104
- */
105
- private static validateTools;
106
100
  /**
107
101
  * Checks if the agent should terminate due to exceeding configured limits.
108
102
  *