@machina.ai/cell-cli-core 1.22.5-rc1 → 1.25.0-rc1

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 (732) hide show
  1. package/dist/docs/AFTER_MERGE_PROMPT.md +26 -0
  2. package/dist/docs/CHANGES.md +124 -0
  3. package/dist/docs/api-proxy.md +27 -0
  4. package/dist/docs/architecture.md +80 -0
  5. package/dist/docs/assets/connected_devtools.png +0 -0
  6. package/dist/docs/assets/gemini-screenshot.png +0 -0
  7. package/dist/docs/assets/monitoring-dashboard-logs.png +0 -0
  8. package/dist/docs/assets/monitoring-dashboard-metrics.png +0 -0
  9. package/dist/docs/assets/monitoring-dashboard-overview.png +0 -0
  10. package/dist/docs/assets/release_patch.png +0 -0
  11. package/dist/docs/assets/theme-ansi-light.png +0 -0
  12. package/dist/docs/assets/theme-ansi.png +0 -0
  13. package/dist/docs/assets/theme-atom-one.png +0 -0
  14. package/dist/docs/assets/theme-ayu-light.png +0 -0
  15. package/dist/docs/assets/theme-ayu.png +0 -0
  16. package/dist/docs/assets/theme-custom.png +0 -0
  17. package/dist/docs/assets/theme-default-light.png +0 -0
  18. package/dist/docs/assets/theme-default.png +0 -0
  19. package/dist/docs/assets/theme-dracula.png +0 -0
  20. package/dist/docs/assets/theme-github-light.png +0 -0
  21. package/dist/docs/assets/theme-github.png +0 -0
  22. package/dist/docs/assets/theme-google-light.png +0 -0
  23. package/dist/docs/assets/theme-xcode-light.png +0 -0
  24. package/dist/docs/changelogs/index.md +612 -0
  25. package/dist/docs/changelogs/latest.md +153 -0
  26. package/dist/docs/changelogs/preview.md +131 -0
  27. package/dist/docs/changelogs/releases.md +1162 -0
  28. package/dist/docs/cli/authentication.md +3 -0
  29. package/dist/docs/cli/checkpointing.md +94 -0
  30. package/dist/docs/cli/commands.md +357 -0
  31. package/dist/docs/cli/custom-commands.md +315 -0
  32. package/dist/docs/cli/enterprise.md +564 -0
  33. package/dist/docs/cli/gemini-ignore.md +71 -0
  34. package/dist/docs/cli/gemini-md.md +109 -0
  35. package/dist/docs/cli/generation-settings.md +210 -0
  36. package/dist/docs/cli/headless.md +388 -0
  37. package/dist/docs/cli/index.md +63 -0
  38. package/dist/docs/cli/keyboard-shortcuts.md +136 -0
  39. package/dist/docs/cli/model-routing.md +37 -0
  40. package/dist/docs/cli/model.md +62 -0
  41. package/dist/docs/cli/sandbox.md +171 -0
  42. package/dist/docs/cli/session-management.md +158 -0
  43. package/dist/docs/cli/settings.md +148 -0
  44. package/dist/docs/cli/skills.md +188 -0
  45. package/dist/docs/cli/system-prompt.md +94 -0
  46. package/dist/docs/cli/telemetry.md +813 -0
  47. package/dist/docs/cli/themes.md +237 -0
  48. package/dist/docs/cli/token-caching.md +20 -0
  49. package/dist/docs/cli/trusted-folders.md +95 -0
  50. package/dist/docs/cli/tutorials/skills-getting-started.md +124 -0
  51. package/dist/docs/cli/tutorials.md +87 -0
  52. package/dist/docs/cli/uninstall.md +47 -0
  53. package/dist/docs/core/index.md +101 -0
  54. package/dist/docs/core/memport.md +246 -0
  55. package/dist/docs/core/policy-engine.md +268 -0
  56. package/dist/docs/core/tools-api.md +131 -0
  57. package/dist/docs/examples/proxy-script.md +83 -0
  58. package/dist/docs/extensions/extension-releasing.md +183 -0
  59. package/dist/docs/extensions/getting-started-extensions.md +244 -0
  60. package/dist/docs/extensions/index.md +343 -0
  61. package/dist/docs/faq.md +153 -0
  62. package/dist/docs/get-started/authentication.md +321 -0
  63. package/dist/docs/get-started/configuration-v1.md +890 -0
  64. package/dist/docs/get-started/configuration.md +1643 -0
  65. package/dist/docs/get-started/examples.md +218 -0
  66. package/dist/docs/get-started/gemini-3.md +101 -0
  67. package/dist/docs/get-started/index.md +71 -0
  68. package/dist/docs/get-started/installation.md +141 -0
  69. package/dist/docs/hooks/best-practices.md +856 -0
  70. package/dist/docs/hooks/index.md +723 -0
  71. package/dist/docs/hooks/reference.md +178 -0
  72. package/dist/docs/hooks/writing-hooks.md +1044 -0
  73. package/dist/docs/ide-integration/ide-companion-spec.md +267 -0
  74. package/dist/docs/ide-integration/index.md +201 -0
  75. package/dist/docs/index.md +147 -0
  76. package/dist/docs/integration-tests.md +211 -0
  77. package/dist/docs/issue-and-pr-automation.md +134 -0
  78. package/dist/docs/local-development.md +128 -0
  79. package/dist/docs/mcp_integration.md +160 -0
  80. package/dist/docs/mermaid/context.mmd +103 -0
  81. package/dist/docs/mermaid/render-path.mmd +64 -0
  82. package/dist/docs/npm.md +62 -0
  83. package/dist/docs/quota-and-pricing.md +158 -0
  84. package/dist/docs/release-confidence.md +164 -0
  85. package/dist/docs/releases.md +540 -0
  86. package/dist/docs/sidebar.json +301 -0
  87. package/dist/docs/tools/file-system.md +217 -0
  88. package/dist/docs/tools/index.md +95 -0
  89. package/dist/docs/tools/mcp-server.md +1045 -0
  90. package/dist/docs/tools/memory.md +54 -0
  91. package/dist/docs/tools/shell.md +260 -0
  92. package/dist/docs/tools/todos.md +56 -0
  93. package/dist/docs/tools/web-fetch.md +59 -0
  94. package/dist/docs/tools/web-search.md +42 -0
  95. package/dist/docs/tos-privacy.md +96 -0
  96. package/dist/docs/troubleshooting.md +162 -0
  97. package/dist/package.json +7 -4
  98. package/dist/src/agents/a2a-client-manager.d.ts +82 -0
  99. package/dist/src/agents/a2a-client-manager.js +295 -0
  100. package/dist/src/agents/a2a-client-manager.js.map +1 -0
  101. package/dist/src/agents/a2a-client-manager.test.js +281 -0
  102. package/dist/src/agents/a2a-client-manager.test.js.map +1 -0
  103. package/dist/src/agents/a2aUtils.d.ts +29 -0
  104. package/dist/src/agents/a2aUtils.js +113 -0
  105. package/dist/src/agents/a2aUtils.js.map +1 -0
  106. package/dist/src/agents/a2aUtils.test.js +147 -0
  107. package/dist/src/agents/a2aUtils.test.js.map +1 -0
  108. package/dist/src/agents/agentLoader.d.ts +68 -0
  109. package/dist/src/agents/agentLoader.js +255 -0
  110. package/dist/src/agents/agentLoader.js.map +1 -0
  111. package/dist/src/agents/agentLoader.test.js +307 -0
  112. package/dist/src/agents/agentLoader.test.js.map +1 -0
  113. package/dist/src/agents/cli-help-agent.d.ts +24 -0
  114. package/dist/src/agents/cli-help-agent.js +85 -0
  115. package/dist/src/agents/cli-help-agent.js.map +1 -0
  116. package/dist/src/agents/cli-help-agent.test.js +65 -0
  117. package/dist/src/agents/cli-help-agent.test.js.map +1 -0
  118. package/dist/src/agents/codebase-investigator.d.ts +2 -2
  119. package/dist/src/agents/codebase-investigator.js +14 -8
  120. package/dist/src/agents/codebase-investigator.js.map +1 -1
  121. package/dist/src/agents/delegate-to-agent-tool.d.ts +2 -2
  122. package/dist/src/agents/delegate-to-agent-tool.js +25 -14
  123. package/dist/src/agents/delegate-to-agent-tool.js.map +1 -1
  124. package/dist/src/agents/delegate-to-agent-tool.test.js +101 -21
  125. package/dist/src/agents/delegate-to-agent-tool.test.js.map +1 -1
  126. package/dist/src/agents/{executor.d.ts → local-executor.d.ts} +5 -11
  127. package/dist/src/agents/{executor.js → local-executor.js} +123 -62
  128. package/dist/src/agents/local-executor.js.map +1 -0
  129. package/dist/src/agents/local-executor.test.d.ts +6 -0
  130. package/dist/src/agents/{executor.test.js → local-executor.test.js} +136 -58
  131. package/dist/src/agents/local-executor.test.js.map +1 -0
  132. package/dist/src/agents/{invocation.d.ts → local-invocation.d.ts} +6 -7
  133. package/dist/src/agents/{invocation.js → local-invocation.js} +9 -10
  134. package/dist/src/agents/local-invocation.js.map +1 -0
  135. package/dist/src/agents/local-invocation.test.d.ts +6 -0
  136. package/dist/src/agents/{invocation.test.js → local-invocation.test.js} +29 -20
  137. package/dist/src/agents/local-invocation.test.js.map +1 -0
  138. package/dist/src/agents/registry.d.ts +22 -1
  139. package/dist/src/agents/registry.js +192 -35
  140. package/dist/src/agents/registry.js.map +1 -1
  141. package/dist/src/agents/registry.test.js +407 -33
  142. package/dist/src/agents/registry.test.js.map +1 -1
  143. package/dist/src/agents/remote-invocation.d.ts +35 -0
  144. package/dist/src/agents/remote-invocation.js +126 -0
  145. package/dist/src/agents/remote-invocation.js.map +1 -0
  146. package/dist/src/agents/remote-invocation.test.d.ts +6 -0
  147. package/dist/src/agents/remote-invocation.test.js +201 -0
  148. package/dist/src/agents/remote-invocation.test.js.map +1 -0
  149. package/dist/src/agents/subagent-tool-wrapper.d.ts +2 -2
  150. package/dist/src/agents/subagent-tool-wrapper.js +11 -6
  151. package/dist/src/agents/subagent-tool-wrapper.js.map +1 -1
  152. package/dist/src/agents/subagent-tool-wrapper.test.js +33 -19
  153. package/dist/src/agents/subagent-tool-wrapper.test.js.map +1 -1
  154. package/dist/src/agents/types.d.ts +21 -15
  155. package/dist/src/agents/types.js.map +1 -1
  156. package/dist/src/availability/fallbackIntegration.test.d.ts +6 -0
  157. package/dist/src/availability/fallbackIntegration.test.js +58 -0
  158. package/dist/src/availability/fallbackIntegration.test.js.map +1 -0
  159. package/dist/src/availability/modelAvailabilityService.d.ts +2 -1
  160. package/dist/src/availability/policyHelpers.d.ts +4 -3
  161. package/dist/src/availability/policyHelpers.js +13 -22
  162. package/dist/src/availability/policyHelpers.js.map +1 -1
  163. package/dist/src/availability/policyHelpers.test.js +28 -18
  164. package/dist/src/availability/policyHelpers.test.js.map +1 -1
  165. package/dist/src/code_assist/experiments/experiments.d.ts +1 -1
  166. package/dist/src/code_assist/experiments/experiments.js +21 -0
  167. package/dist/src/code_assist/experiments/experiments.js.map +1 -1
  168. package/dist/src/code_assist/experiments/experiments_local.test.d.ts +6 -0
  169. package/dist/src/code_assist/experiments/experiments_local.test.js +110 -0
  170. package/dist/src/code_assist/experiments/experiments_local.test.js.map +1 -0
  171. package/dist/src/code_assist/oauth-credential-storage.js +3 -4
  172. package/dist/src/code_assist/oauth-credential-storage.js.map +1 -1
  173. package/dist/src/code_assist/oauth2.js +32 -2
  174. package/dist/src/code_assist/oauth2.js.map +1 -1
  175. package/dist/src/code_assist/oauth2.test.js +111 -16
  176. package/dist/src/code_assist/oauth2.test.js.map +1 -1
  177. package/dist/src/code_assist/server.d.ts +9 -1
  178. package/dist/src/code_assist/server.js +74 -11
  179. package/dist/src/code_assist/server.js.map +1 -1
  180. package/dist/src/code_assist/server.test.js +199 -27
  181. package/dist/src/code_assist/server.test.js.map +1 -1
  182. package/dist/src/code_assist/setup.js +6 -4
  183. package/dist/src/code_assist/setup.js.map +1 -1
  184. package/dist/src/code_assist/setup.test.js +63 -0
  185. package/dist/src/code_assist/setup.test.js.map +1 -1
  186. package/dist/src/code_assist/telemetry.d.ts +14 -0
  187. package/dist/src/code_assist/telemetry.js +157 -0
  188. package/dist/src/code_assist/telemetry.js.map +1 -0
  189. package/dist/src/code_assist/telemetry.test.d.ts +6 -0
  190. package/dist/src/code_assist/telemetry.test.js +301 -0
  191. package/dist/src/code_assist/telemetry.test.js.map +1 -0
  192. package/dist/src/code_assist/types.d.ts +77 -1
  193. package/dist/src/code_assist/types.js +28 -0
  194. package/dist/src/code_assist/types.js.map +1 -1
  195. package/dist/src/commands/memory.d.ts +11 -0
  196. package/dist/src/commands/memory.js +80 -0
  197. package/dist/src/commands/memory.js.map +1 -0
  198. package/dist/src/commands/memory.test.d.ts +6 -0
  199. package/dist/src/commands/memory.test.js +155 -0
  200. package/dist/src/commands/memory.test.js.map +1 -0
  201. package/dist/src/config/config.d.ts +120 -26
  202. package/dist/src/config/config.js +241 -120
  203. package/dist/src/config/config.js.map +1 -1
  204. package/dist/src/config/config.test.js +215 -43
  205. package/dist/src/config/config.test.js.map +1 -1
  206. package/dist/src/config/flashFallback.test.js +11 -35
  207. package/dist/src/config/flashFallback.test.js.map +1 -1
  208. package/dist/src/config/models.d.ts +8 -9
  209. package/dist/src/config/models.js +18 -15
  210. package/dist/src/config/models.js.map +1 -1
  211. package/dist/src/config/models.test.js +52 -16
  212. package/dist/src/config/models.test.js.map +1 -1
  213. package/dist/src/config/storage.d.ts +5 -0
  214. package/dist/src/config/storage.js +17 -2
  215. package/dist/src/config/storage.js.map +1 -1
  216. package/dist/src/config/storage.test.js +16 -0
  217. package/dist/src/config/storage.test.js.map +1 -1
  218. package/dist/src/confirmation-bus/message-bus.js +2 -1
  219. package/dist/src/confirmation-bus/message-bus.js.map +1 -1
  220. package/dist/src/core/baseLlmClient.js +44 -43
  221. package/dist/src/core/baseLlmClient.js.map +1 -1
  222. package/dist/src/core/baseLlmClient.test.js +12 -19
  223. package/dist/src/core/baseLlmClient.test.js.map +1 -1
  224. package/dist/src/core/client.d.ts +7 -1
  225. package/dist/src/core/client.js +245 -114
  226. package/dist/src/core/client.js.map +1 -1
  227. package/dist/src/core/client.test.js +277 -74
  228. package/dist/src/core/client.test.js.map +1 -1
  229. package/dist/src/core/clientHookTriggers.js +2 -2
  230. package/dist/src/core/clientHookTriggers.js.map +1 -1
  231. package/dist/src/core/contentGenerator.js +3 -3
  232. package/dist/src/core/contentGenerator.js.map +1 -1
  233. package/dist/src/core/contentGenerator.test.js +1 -7
  234. package/dist/src/core/contentGenerator.test.js.map +1 -1
  235. package/dist/src/core/coreToolHookTriggers.d.ts +9 -5
  236. package/dist/src/core/coreToolHookTriggers.js +119 -21
  237. package/dist/src/core/coreToolHookTriggers.js.map +1 -1
  238. package/dist/src/core/coreToolHookTriggers.test.d.ts +6 -0
  239. package/dist/src/core/coreToolHookTriggers.test.js +191 -0
  240. package/dist/src/core/coreToolHookTriggers.test.js.map +1 -0
  241. package/dist/src/core/coreToolScheduler.d.ts +7 -93
  242. package/dist/src/core/coreToolScheduler.js +133 -369
  243. package/dist/src/core/coreToolScheduler.js.map +1 -1
  244. package/dist/src/core/coreToolScheduler.test.js +252 -394
  245. package/dist/src/core/coreToolScheduler.test.js.map +1 -1
  246. package/dist/src/core/geminiChat.d.ts +26 -1
  247. package/dist/src/core/geminiChat.js +112 -79
  248. package/dist/src/core/geminiChat.js.map +1 -1
  249. package/dist/src/core/geminiChat.test.js +125 -92
  250. package/dist/src/core/geminiChat.test.js.map +1 -1
  251. package/dist/src/core/geminiChatHookTriggers.d.ts +8 -4
  252. package/dist/src/core/geminiChatHookTriggers.js +34 -12
  253. package/dist/src/core/geminiChatHookTriggers.js.map +1 -1
  254. package/dist/src/core/geminiChatHookTriggers.test.d.ts +6 -0
  255. package/dist/src/core/geminiChatHookTriggers.test.js +153 -0
  256. package/dist/src/core/geminiChatHookTriggers.test.js.map +1 -0
  257. package/dist/src/core/geminiChat_network_retry.test.js +4 -6
  258. package/dist/src/core/geminiChat_network_retry.test.js.map +1 -1
  259. package/dist/src/core/loggingContentGenerator.js +19 -2
  260. package/dist/src/core/loggingContentGenerator.js.map +1 -1
  261. package/dist/src/core/loggingContentGenerator.test.js +30 -0
  262. package/dist/src/core/loggingContentGenerator.test.js.map +1 -1
  263. package/dist/src/core/nonInteractiveToolExecutor.test.js +4 -4
  264. package/dist/src/core/nonInteractiveToolExecutor.test.js.map +1 -1
  265. package/dist/src/core/prompts.js +37 -13
  266. package/dist/src/core/prompts.js.map +1 -1
  267. package/dist/src/core/prompts.test.js +47 -3
  268. package/dist/src/core/prompts.test.js.map +1 -1
  269. package/dist/src/core/tokenLimits.js +6 -12
  270. package/dist/src/core/tokenLimits.js.map +1 -1
  271. package/dist/src/core/tokenLimits.test.js +8 -4
  272. package/dist/src/core/tokenLimits.test.js.map +1 -1
  273. package/dist/src/core/turn.d.ts +21 -22
  274. package/dist/src/core/turn.js +31 -21
  275. package/dist/src/core/turn.js.map +1 -1
  276. package/dist/src/core/turn.test.js +79 -5
  277. package/dist/src/core/turn.test.js.map +1 -1
  278. package/dist/src/fallback/handler.js +1 -7
  279. package/dist/src/fallback/handler.js.map +1 -1
  280. package/dist/src/fallback/handler.test.js +10 -29
  281. package/dist/src/fallback/handler.test.js.map +1 -1
  282. package/dist/src/generated/git-commit.d.ts +3 -3
  283. package/dist/src/generated/git-commit.js +3 -3
  284. package/dist/src/hooks/hookAggregator.js +7 -0
  285. package/dist/src/hooks/hookAggregator.js.map +1 -1
  286. package/dist/src/hooks/hookEventHandler.d.ts +9 -5
  287. package/dist/src/hooks/hookEventHandler.js +61 -15
  288. package/dist/src/hooks/hookEventHandler.js.map +1 -1
  289. package/dist/src/hooks/hookEventHandler.test.js +223 -8
  290. package/dist/src/hooks/hookEventHandler.test.js.map +1 -1
  291. package/dist/src/hooks/hookPlanner.d.ts +1 -5
  292. package/dist/src/hooks/hookPlanner.js +2 -7
  293. package/dist/src/hooks/hookPlanner.js.map +1 -1
  294. package/dist/src/hooks/hookPlanner.test.js +62 -2
  295. package/dist/src/hooks/hookPlanner.test.js.map +1 -1
  296. package/dist/src/hooks/hookRegistry.d.ts +6 -11
  297. package/dist/src/hooks/hookRegistry.js +41 -14
  298. package/dist/src/hooks/hookRegistry.js.map +1 -1
  299. package/dist/src/hooks/hookRegistry.test.js +166 -2
  300. package/dist/src/hooks/hookRegistry.test.js.map +1 -1
  301. package/dist/src/hooks/hookRunner.d.ts +5 -3
  302. package/dist/src/hooks/hookRunner.js +57 -17
  303. package/dist/src/hooks/hookRunner.js.map +1 -1
  304. package/dist/src/hooks/hookRunner.test.js +172 -35
  305. package/dist/src/hooks/hookRunner.test.js.map +1 -1
  306. package/dist/src/hooks/hookSystem.d.ts +12 -0
  307. package/dist/src/hooks/hookSystem.js +39 -1
  308. package/dist/src/hooks/hookSystem.js.map +1 -1
  309. package/dist/src/hooks/hookTranslator.js +2 -1
  310. package/dist/src/hooks/hookTranslator.js.map +1 -1
  311. package/dist/src/hooks/index.d.ts +1 -2
  312. package/dist/src/hooks/index.js +1 -3
  313. package/dist/src/hooks/index.js.map +1 -1
  314. package/dist/src/hooks/trustedHooks.d.ts +28 -0
  315. package/dist/src/hooks/trustedHooks.js +90 -0
  316. package/dist/src/hooks/trustedHooks.js.map +1 -0
  317. package/dist/src/hooks/trustedHooks.test.d.ts +6 -0
  318. package/dist/src/hooks/trustedHooks.test.js +154 -0
  319. package/dist/src/hooks/trustedHooks.test.js.map +1 -0
  320. package/dist/src/hooks/types.d.ts +41 -9
  321. package/dist/src/hooks/types.js +31 -41
  322. package/dist/src/hooks/types.js.map +1 -1
  323. package/dist/src/hooks/types.test.js +9 -52
  324. package/dist/src/hooks/types.test.js.map +1 -1
  325. package/dist/src/ide/detect-ide.d.ts +4 -0
  326. package/dist/src/ide/detect-ide.js +7 -2
  327. package/dist/src/ide/detect-ide.js.map +1 -1
  328. package/dist/src/ide/detect-ide.test.js +10 -0
  329. package/dist/src/ide/detect-ide.test.js.map +1 -1
  330. package/dist/src/ide/ide-client.js +4 -1
  331. package/dist/src/ide/ide-client.js.map +1 -1
  332. package/dist/src/ide/ide-installer.js +2 -2
  333. package/dist/src/ide/ide-installer.js.map +1 -1
  334. package/dist/src/ide/ide-installer.test.js +11 -2
  335. package/dist/src/ide/ide-installer.test.js.map +1 -1
  336. package/dist/src/index.d.ts +16 -2
  337. package/dist/src/index.js +18 -3
  338. package/dist/src/index.js.map +1 -1
  339. package/dist/src/mcp/oauth-provider.js +7 -3
  340. package/dist/src/mcp/oauth-provider.js.map +1 -1
  341. package/dist/src/mcp/oauth-provider.test.js +4 -1
  342. package/dist/src/mcp/oauth-provider.test.js.map +1 -1
  343. package/dist/src/mcp/oauth-utils.d.ts +8 -1
  344. package/dist/src/mcp/oauth-utils.js +31 -2
  345. package/dist/src/mcp/oauth-utils.js.map +1 -1
  346. package/dist/src/mcp/oauth-utils.test.js +42 -0
  347. package/dist/src/mcp/oauth-utils.test.js.map +1 -1
  348. package/dist/src/mcp/token-storage/file-token-storage.js +2 -2
  349. package/dist/src/mcp/token-storage/file-token-storage.js.map +1 -1
  350. package/dist/src/mcp/token-storage/keychain-token-storage.js +1 -1
  351. package/dist/src/mcp/token-storage/keychain-token-storage.js.map +1 -1
  352. package/dist/src/policy/config.js +62 -23
  353. package/dist/src/policy/config.js.map +1 -1
  354. package/dist/src/policy/config.test.js +24 -2
  355. package/dist/src/policy/config.test.js.map +1 -1
  356. package/dist/src/policy/persistence.test.js +1 -1
  357. package/dist/src/policy/persistence.test.js.map +1 -1
  358. package/dist/src/policy/policies/agent.toml +1 -1
  359. package/dist/src/policy/policies/write.toml +5 -0
  360. package/dist/src/policy/policies/yolo.toml +1 -0
  361. package/dist/src/policy/policy-engine.d.ts +4 -0
  362. package/dist/src/policy/policy-engine.js +137 -53
  363. package/dist/src/policy/policy-engine.js.map +1 -1
  364. package/dist/src/policy/policy-engine.test.js +289 -1
  365. package/dist/src/policy/policy-engine.test.js.map +1 -1
  366. package/dist/src/policy/policy-updater.test.js +5 -5
  367. package/dist/src/policy/policy-updater.test.js.map +1 -1
  368. package/dist/src/policy/shell-safety.test.js +371 -8
  369. package/dist/src/policy/shell-safety.test.js.map +1 -1
  370. package/dist/src/policy/toml-loader.d.ts +0 -8
  371. package/dist/src/policy/toml-loader.js +13 -45
  372. package/dist/src/policy/toml-loader.js.map +1 -1
  373. package/dist/src/policy/toml-loader.test.js +13 -0
  374. package/dist/src/policy/toml-loader.test.js.map +1 -1
  375. package/dist/src/policy/types.d.ts +10 -0
  376. package/dist/src/policy/utils.d.ts +21 -0
  377. package/dist/src/policy/utils.js +45 -0
  378. package/dist/src/policy/utils.js.map +1 -0
  379. package/dist/src/policy/utils.test.d.ts +6 -0
  380. package/dist/src/policy/utils.test.js +92 -0
  381. package/dist/src/policy/utils.test.js.map +1 -0
  382. package/dist/src/routing/routingStrategy.d.ts +2 -0
  383. package/dist/src/routing/strategies/classifierStrategy.js +1 -1
  384. package/dist/src/routing/strategies/classifierStrategy.js.map +1 -1
  385. package/dist/src/routing/strategies/classifierStrategy.test.js +16 -0
  386. package/dist/src/routing/strategies/classifierStrategy.test.js.map +1 -1
  387. package/dist/src/routing/strategies/compositeStrategy.js +4 -2
  388. package/dist/src/routing/strategies/compositeStrategy.js.map +1 -1
  389. package/dist/src/routing/strategies/compositeStrategy.test.js +11 -10
  390. package/dist/src/routing/strategies/compositeStrategy.test.js.map +1 -1
  391. package/dist/src/routing/strategies/fallbackStrategy.d.ts +1 -1
  392. package/dist/src/routing/strategies/fallbackStrategy.js +2 -5
  393. package/dist/src/routing/strategies/fallbackStrategy.js.map +1 -1
  394. package/dist/src/routing/strategies/fallbackStrategy.test.js +13 -6
  395. package/dist/src/routing/strategies/fallbackStrategy.test.js.map +1 -1
  396. package/dist/src/routing/strategies/overrideStrategy.d.ts +1 -1
  397. package/dist/src/routing/strategies/overrideStrategy.js +6 -6
  398. package/dist/src/routing/strategies/overrideStrategy.js.map +1 -1
  399. package/dist/src/routing/strategies/overrideStrategy.test.js +14 -0
  400. package/dist/src/routing/strategies/overrideStrategy.test.js.map +1 -1
  401. package/dist/src/scheduler/tool-executor.d.ts +22 -0
  402. package/dist/src/scheduler/tool-executor.js +198 -0
  403. package/dist/src/scheduler/tool-executor.js.map +1 -0
  404. package/dist/src/scheduler/tool-executor.test.d.ts +6 -0
  405. package/dist/src/scheduler/tool-executor.test.js +231 -0
  406. package/dist/src/scheduler/tool-executor.test.js.map +1 -0
  407. package/dist/src/scheduler/tool-modifier.d.ts +23 -0
  408. package/dist/src/scheduler/tool-modifier.js +50 -0
  409. package/dist/src/scheduler/tool-modifier.js.map +1 -0
  410. package/dist/src/scheduler/tool-modifier.test.d.ts +6 -0
  411. package/dist/src/scheduler/tool-modifier.test.js +159 -0
  412. package/dist/src/scheduler/tool-modifier.test.js.map +1 -0
  413. package/dist/src/scheduler/types.d.ts +95 -0
  414. package/dist/src/scheduler/types.js +7 -0
  415. package/dist/src/scheduler/types.js.map +1 -0
  416. package/dist/src/services/chatCompressionService.js +3 -10
  417. package/dist/src/services/chatCompressionService.js.map +1 -1
  418. package/dist/src/services/chatCompressionService.test.js +1 -0
  419. package/dist/src/services/chatCompressionService.test.js.map +1 -1
  420. package/dist/src/services/chatRecordingService.d.ts +7 -1
  421. package/dist/src/services/chatRecordingService.js +20 -2
  422. package/dist/src/services/chatRecordingService.js.map +1 -1
  423. package/dist/src/services/chatRecordingService.test.js +43 -0
  424. package/dist/src/services/chatRecordingService.test.js.map +1 -1
  425. package/dist/src/services/contextManager.d.ts +5 -11
  426. package/dist/src/services/contextManager.js +20 -17
  427. package/dist/src/services/contextManager.js.map +1 -1
  428. package/dist/src/services/contextManager.test.js +40 -41
  429. package/dist/src/services/contextManager.test.js.map +1 -1
  430. package/dist/src/services/environmentSanitization.d.ts +15 -0
  431. package/dist/src/services/environmentSanitization.js +142 -0
  432. package/dist/src/services/environmentSanitization.js.map +1 -0
  433. package/dist/src/services/environmentSanitization.test.d.ts +6 -0
  434. package/dist/src/services/environmentSanitization.test.js +284 -0
  435. package/dist/src/services/environmentSanitization.test.js.map +1 -0
  436. package/dist/src/services/gitService.js +10 -1
  437. package/dist/src/services/gitService.js.map +1 -1
  438. package/dist/src/services/gitService.test.js +28 -2
  439. package/dist/src/services/gitService.test.js.map +1 -1
  440. package/dist/src/services/loopDetectionService.js +2 -1
  441. package/dist/src/services/loopDetectionService.js.map +1 -1
  442. package/dist/src/services/loopDetectionService.test.js +14 -8
  443. package/dist/src/services/loopDetectionService.test.js.map +1 -1
  444. package/dist/src/services/modelConfig.integration.test.js +3 -3
  445. package/dist/src/services/modelConfig.integration.test.js.map +1 -1
  446. package/dist/src/services/modelConfigService.d.ts +38 -4
  447. package/dist/src/services/modelConfigService.js +135 -76
  448. package/dist/src/services/modelConfigService.js.map +1 -1
  449. package/dist/src/services/modelConfigService.test.js +116 -0
  450. package/dist/src/services/modelConfigService.test.js.map +1 -1
  451. package/dist/src/services/shellExecutionService.d.ts +2 -0
  452. package/dist/src/services/shellExecutionService.js +6 -50
  453. package/dist/src/services/shellExecutionService.js.map +1 -1
  454. package/dist/src/services/shellExecutionService.test.js +68 -4
  455. package/dist/src/services/shellExecutionService.test.js.map +1 -1
  456. package/dist/src/skills/skillLoader.d.ts +31 -0
  457. package/dist/src/skills/skillLoader.js +77 -0
  458. package/dist/src/skills/skillLoader.js.map +1 -0
  459. package/dist/src/skills/skillLoader.test.d.ts +6 -0
  460. package/dist/src/skills/skillLoader.test.js +75 -0
  461. package/dist/src/skills/skillLoader.test.js.map +1 -0
  462. package/dist/src/skills/skillManager.d.ts +69 -0
  463. package/dist/src/skills/skillManager.js +127 -0
  464. package/dist/src/skills/skillManager.js.map +1 -0
  465. package/dist/src/skills/skillManager.test.d.ts +6 -0
  466. package/dist/src/skills/skillManager.test.js +210 -0
  467. package/dist/src/skills/skillManager.test.js.map +1 -0
  468. package/dist/src/telemetry/clearcut-logger/clearcut-logger.d.ts +18 -9
  469. package/dist/src/telemetry/clearcut-logger/clearcut-logger.js +234 -160
  470. package/dist/src/telemetry/clearcut-logger/clearcut-logger.js.map +1 -1
  471. package/dist/src/telemetry/clearcut-logger/clearcut-logger.test.js +162 -32
  472. package/dist/src/telemetry/clearcut-logger/clearcut-logger.test.js.map +1 -1
  473. package/dist/src/telemetry/clearcut-logger/event-metadata-key.d.ts +11 -3
  474. package/dist/src/telemetry/clearcut-logger/event-metadata-key.js +24 -5
  475. package/dist/src/telemetry/clearcut-logger/event-metadata-key.js.map +1 -1
  476. package/dist/src/telemetry/loggers.d.ts +3 -3
  477. package/dist/src/telemetry/loggers.js +6 -5
  478. package/dist/src/telemetry/loggers.js.map +1 -1
  479. package/dist/src/telemetry/loggers.test.circular.js +1 -0
  480. package/dist/src/telemetry/loggers.test.circular.js.map +1 -1
  481. package/dist/src/telemetry/loggers.test.js +51 -10
  482. package/dist/src/telemetry/loggers.test.js.map +1 -1
  483. package/dist/src/telemetry/sdk.js +5 -6
  484. package/dist/src/telemetry/sdk.js.map +1 -1
  485. package/dist/src/telemetry/types.d.ts +7 -7
  486. package/dist/src/telemetry/types.js +14 -12
  487. package/dist/src/telemetry/types.js.map +1 -1
  488. package/dist/src/test-utils/mock-message-bus.d.ts +1 -0
  489. package/dist/src/test-utils/mock-message-bus.js +29 -0
  490. package/dist/src/test-utils/mock-message-bus.js.map +1 -1
  491. package/dist/src/test-utils/mock-tool.d.ts +5 -3
  492. package/dist/src/test-utils/mock-tool.js +11 -10
  493. package/dist/src/test-utils/mock-tool.js.map +1 -1
  494. package/dist/src/tools/activate-skill.d.ts +27 -0
  495. package/dist/src/tools/activate-skill.js +133 -0
  496. package/dist/src/tools/activate-skill.js.map +1 -0
  497. package/dist/src/tools/activate-skill.test.d.ts +6 -0
  498. package/dist/src/tools/activate-skill.test.js +113 -0
  499. package/dist/src/tools/activate-skill.test.js.map +1 -0
  500. package/dist/src/tools/confirmation-policy.test.js +3 -12
  501. package/dist/src/tools/confirmation-policy.test.js.map +1 -1
  502. package/dist/src/tools/edit.d.ts +27 -5
  503. package/dist/src/tools/edit.js +455 -136
  504. package/dist/src/tools/edit.js.map +1 -1
  505. package/dist/src/tools/edit.test.js +292 -526
  506. package/dist/src/tools/edit.test.js.map +1 -1
  507. package/dist/src/tools/get-internal-docs.d.ts +27 -0
  508. package/dist/src/tools/get-internal-docs.js +122 -0
  509. package/dist/src/tools/get-internal-docs.js.map +1 -0
  510. package/dist/src/tools/get-internal-docs.test.d.ts +6 -0
  511. package/dist/src/tools/get-internal-docs.test.js +57 -0
  512. package/dist/src/tools/get-internal-docs.test.js.map +1 -0
  513. package/dist/src/tools/glob.d.ts +2 -2
  514. package/dist/src/tools/glob.js +1 -1
  515. package/dist/src/tools/glob.js.map +1 -1
  516. package/dist/src/tools/glob.test.js +2 -1
  517. package/dist/src/tools/glob.test.js.map +1 -1
  518. package/dist/src/tools/grep.d.ts +2 -2
  519. package/dist/src/tools/grep.js +1 -1
  520. package/dist/src/tools/grep.js.map +1 -1
  521. package/dist/src/tools/grep.test.js +5 -4
  522. package/dist/src/tools/grep.test.js.map +1 -1
  523. package/dist/src/tools/ls.d.ts +2 -2
  524. package/dist/src/tools/ls.js +2 -2
  525. package/dist/src/tools/ls.js.map +1 -1
  526. package/dist/src/tools/ls.test.js +2 -1
  527. package/dist/src/tools/ls.test.js.map +1 -1
  528. package/dist/src/tools/mcp-client-manager.js +14 -7
  529. package/dist/src/tools/mcp-client-manager.js.map +1 -1
  530. package/dist/src/tools/mcp-client-manager.test.js +28 -0
  531. package/dist/src/tools/mcp-client-manager.test.js.map +1 -1
  532. package/dist/src/tools/mcp-client.d.ts +5 -4
  533. package/dist/src/tools/mcp-client.js +10 -8
  534. package/dist/src/tools/mcp-client.js.map +1 -1
  535. package/dist/src/tools/mcp-client.test.js +47 -42
  536. package/dist/src/tools/mcp-client.test.js.map +1 -1
  537. package/dist/src/tools/mcp-tool.d.ts +20 -5
  538. package/dist/src/tools/mcp-tool.js +8 -8
  539. package/dist/src/tools/mcp-tool.js.map +1 -1
  540. package/dist/src/tools/mcp-tool.test.js +11 -6
  541. package/dist/src/tools/mcp-tool.test.js.map +1 -1
  542. package/dist/src/tools/memoryTool.d.ts +3 -3
  543. package/dist/src/tools/memoryTool.js +2 -4
  544. package/dist/src/tools/memoryTool.js.map +1 -1
  545. package/dist/src/tools/memoryTool.test.js +5 -2
  546. package/dist/src/tools/memoryTool.test.js.map +1 -1
  547. package/dist/src/tools/message-bus-integration.test.js +10 -37
  548. package/dist/src/tools/message-bus-integration.test.js.map +1 -1
  549. package/dist/src/tools/read-file.d.ts +2 -2
  550. package/dist/src/tools/read-file.js +1 -1
  551. package/dist/src/tools/read-file.js.map +1 -1
  552. package/dist/src/tools/read-file.test.js +3 -2
  553. package/dist/src/tools/read-file.test.js.map +1 -1
  554. package/dist/src/tools/read-many-files.d.ts +2 -2
  555. package/dist/src/tools/read-many-files.js +2 -3
  556. package/dist/src/tools/read-many-files.js.map +1 -1
  557. package/dist/src/tools/read-many-files.test.js +3 -2
  558. package/dist/src/tools/read-many-files.test.js.map +1 -1
  559. package/dist/src/tools/ripGrep.d.ts +3 -2
  560. package/dist/src/tools/ripGrep.js +18 -7
  561. package/dist/src/tools/ripGrep.js.map +1 -1
  562. package/dist/src/tools/ripGrep.test.js +60 -4
  563. package/dist/src/tools/ripGrep.test.js.map +1 -1
  564. package/dist/src/tools/shell.d.ts +3 -6
  565. package/dist/src/tools/shell.js +21 -49
  566. package/dist/src/tools/shell.js.map +1 -1
  567. package/dist/src/tools/shell.test.js +35 -59
  568. package/dist/src/tools/shell.test.js.map +1 -1
  569. package/dist/src/tools/tool-error.d.ts +6 -1
  570. package/dist/src/tools/tool-error.js +6 -0
  571. package/dist/src/tools/tool-error.js.map +1 -1
  572. package/dist/src/tools/tool-names.d.ts +15 -0
  573. package/dist/src/tools/tool-names.js +57 -0
  574. package/dist/src/tools/tool-names.js.map +1 -1
  575. package/dist/src/tools/tool-names.test.d.ts +6 -0
  576. package/dist/src/tools/tool-names.test.js +43 -0
  577. package/dist/src/tools/tool-names.test.js.map +1 -0
  578. package/dist/src/tools/tool-registry.d.ts +11 -7
  579. package/dist/src/tools/tool-registry.js +15 -10
  580. package/dist/src/tools/tool-registry.js.map +1 -1
  581. package/dist/src/tools/tool-registry.test.js +16 -11
  582. package/dist/src/tools/tool-registry.test.js.map +1 -1
  583. package/dist/src/tools/tools.d.ts +8 -6
  584. package/dist/src/tools/tools.js +16 -18
  585. package/dist/src/tools/tools.js.map +1 -1
  586. package/dist/src/tools/tools.test.js +3 -1
  587. package/dist/src/tools/tools.test.js.map +1 -1
  588. package/dist/src/tools/web-fetch.d.ts +2 -2
  589. package/dist/src/tools/web-fetch.js +4 -4
  590. package/dist/src/tools/web-fetch.js.map +1 -1
  591. package/dist/src/tools/web-fetch.test.js +17 -19
  592. package/dist/src/tools/web-fetch.test.js.map +1 -1
  593. package/dist/src/tools/web-search.d.ts +2 -2
  594. package/dist/src/tools/web-search.js +5 -5
  595. package/dist/src/tools/web-search.js.map +1 -1
  596. package/dist/src/tools/web-search.test.js +2 -1
  597. package/dist/src/tools/web-search.test.js.map +1 -1
  598. package/dist/src/tools/write-file.d.ts +2 -2
  599. package/dist/src/tools/write-file.js +9 -6
  600. package/dist/src/tools/write-file.js.map +1 -1
  601. package/dist/src/tools/write-file.test.js +49 -7
  602. package/dist/src/tools/write-file.test.js.map +1 -1
  603. package/dist/src/tools/write-todos.d.ts +2 -2
  604. package/dist/src/tools/write-todos.js +5 -4
  605. package/dist/src/tools/write-todos.js.map +1 -1
  606. package/dist/src/tools/write-todos.test.js +2 -1
  607. package/dist/src/tools/write-todos.test.js.map +1 -1
  608. package/dist/src/utils/apiConversionUtils.d.ts +12 -0
  609. package/dist/src/utils/apiConversionUtils.js +46 -0
  610. package/dist/src/utils/apiConversionUtils.js.map +1 -0
  611. package/dist/src/utils/apiConversionUtils.test.d.ts +6 -0
  612. package/dist/src/utils/apiConversionUtils.test.js +150 -0
  613. package/dist/src/utils/apiConversionUtils.test.js.map +1 -0
  614. package/dist/src/utils/checkpointUtils.d.ts +1 -1
  615. package/dist/src/utils/checkpointUtils.js +1 -1
  616. package/dist/src/utils/checkpointUtils.js.map +1 -1
  617. package/dist/src/utils/checkpointUtils.test.js +1 -1
  618. package/dist/src/utils/checkpointUtils.test.js.map +1 -1
  619. package/dist/src/utils/debugLogger.js +1 -0
  620. package/dist/src/utils/debugLogger.js.map +1 -1
  621. package/dist/src/utils/editCorrector.d.ts +3 -3
  622. package/dist/src/utils/editCorrector.js +27 -10
  623. package/dist/src/utils/editCorrector.js.map +1 -1
  624. package/dist/src/utils/editCorrector.test.js +23 -23
  625. package/dist/src/utils/editCorrector.test.js.map +1 -1
  626. package/dist/src/utils/editor.d.ts +3 -2
  627. package/dist/src/utils/editor.js +26 -6
  628. package/dist/src/utils/editor.js.map +1 -1
  629. package/dist/src/utils/editor.test.js +27 -4
  630. package/dist/src/utils/editor.test.js.map +1 -1
  631. package/dist/src/utils/environmentContext.d.ts +1 -0
  632. package/dist/src/utils/environmentContext.js +4 -0
  633. package/dist/src/utils/environmentContext.js.map +1 -1
  634. package/dist/src/utils/environmentContext.test.js +2 -0
  635. package/dist/src/utils/environmentContext.test.js.map +1 -1
  636. package/dist/src/utils/errorReporting.d.ts +1 -1
  637. package/dist/src/utils/errorReporting.js +13 -12
  638. package/dist/src/utils/errorReporting.js.map +1 -1
  639. package/dist/src/utils/errorReporting.test.js +17 -14
  640. package/dist/src/utils/errorReporting.test.js.map +1 -1
  641. package/dist/src/utils/events.d.ts +71 -19
  642. package/dist/src/utils/events.js +35 -9
  643. package/dist/src/utils/events.js.map +1 -1
  644. package/dist/src/utils/events.test.js +25 -0
  645. package/dist/src/utils/events.test.js.map +1 -1
  646. package/dist/src/utils/fileDiffUtils.d.ts +18 -0
  647. package/dist/src/utils/fileDiffUtils.js +37 -0
  648. package/dist/src/utils/fileDiffUtils.js.map +1 -0
  649. package/dist/src/utils/fileDiffUtils.test.d.ts +6 -0
  650. package/dist/src/utils/fileDiffUtils.test.js +84 -0
  651. package/dist/src/utils/fileDiffUtils.test.js.map +1 -0
  652. package/dist/src/utils/fileUtils.d.ts +4 -0
  653. package/dist/src/utils/fileUtils.js +53 -0
  654. package/dist/src/utils/fileUtils.js.map +1 -1
  655. package/dist/src/utils/fileUtils.test.js +112 -1
  656. package/dist/src/utils/fileUtils.test.js.map +1 -1
  657. package/dist/src/utils/geminiIgnoreParser.d.ts +11 -0
  658. package/dist/src/utils/geminiIgnoreParser.js +20 -0
  659. package/dist/src/utils/geminiIgnoreParser.js.map +1 -1
  660. package/dist/src/utils/geminiIgnoreParser.test.js +48 -0
  661. package/dist/src/utils/geminiIgnoreParser.test.js.map +1 -1
  662. package/dist/src/utils/generateContentResponseUtilities.d.ts +3 -1
  663. package/dist/src/utils/generateContentResponseUtilities.js +106 -0
  664. package/dist/src/utils/generateContentResponseUtilities.js.map +1 -1
  665. package/dist/src/utils/generateContentResponseUtilities.test.js +279 -2
  666. package/dist/src/utils/generateContentResponseUtilities.test.js.map +1 -1
  667. package/dist/src/utils/getFolderStructure.js +7 -2
  668. package/dist/src/utils/getFolderStructure.js.map +1 -1
  669. package/dist/src/utils/gitIgnoreParser.js +9 -10
  670. package/dist/src/utils/gitIgnoreParser.js.map +1 -1
  671. package/dist/src/utils/installationManager.test.js +11 -3
  672. package/dist/src/utils/installationManager.test.js.map +1 -1
  673. package/dist/src/utils/memoryDiscovery.js +3 -4
  674. package/dist/src/utils/memoryDiscovery.js.map +1 -1
  675. package/dist/src/utils/memoryDiscovery.test.js +12 -1
  676. package/dist/src/utils/memoryDiscovery.test.js.map +1 -1
  677. package/dist/src/utils/partUtils.js +1 -1
  678. package/dist/src/utils/partUtils.js.map +1 -1
  679. package/dist/src/utils/paths.d.ts +10 -0
  680. package/dist/src/utils/paths.js +20 -1
  681. package/dist/src/utils/paths.js.map +1 -1
  682. package/dist/src/utils/retry.d.ts +1 -0
  683. package/dist/src/utils/retry.js +17 -5
  684. package/dist/src/utils/retry.js.map +1 -1
  685. package/dist/src/utils/retry.test.js +11 -11
  686. package/dist/src/utils/retry.test.js.map +1 -1
  687. package/dist/src/utils/shell-utils.d.ts +6 -0
  688. package/dist/src/utils/shell-utils.js +97 -12
  689. package/dist/src/utils/shell-utils.js.map +1 -1
  690. package/dist/src/utils/shell-utils.test.js +99 -1
  691. package/dist/src/utils/shell-utils.test.js.map +1 -1
  692. package/dist/src/utils/summarizer.test.js +3 -2
  693. package/dist/src/utils/summarizer.test.js.map +1 -1
  694. package/dist/src/utils/terminal.d.ts +4 -0
  695. package/dist/src/utils/terminal.js +12 -0
  696. package/dist/src/utils/terminal.js.map +1 -1
  697. package/dist/src/utils/tokenCalculation.js +20 -5
  698. package/dist/src/utils/tokenCalculation.js.map +1 -1
  699. package/dist/src/utils/tokenCalculation.test.js +11 -2
  700. package/dist/src/utils/tokenCalculation.test.js.map +1 -1
  701. package/dist/src/utils/tool-utils.d.ts +9 -0
  702. package/dist/src/utils/tool-utils.js +29 -0
  703. package/dist/src/utils/tool-utils.js.map +1 -1
  704. package/dist/src/utils/tool-utils.test.js +17 -2
  705. package/dist/src/utils/tool-utils.test.js.map +1 -1
  706. package/dist/src/utils/userAccountManager.test.js +5 -5
  707. package/dist/src/utils/userAccountManager.test.js.map +1 -1
  708. package/dist/src/utils/workspaceContext.test.js +1 -1
  709. package/dist/src/utils/workspaceContext.test.js.map +1 -1
  710. package/dist/tsconfig.tsbuildinfo +1 -1
  711. package/package.json +8 -6
  712. package/dist/src/agents/executor.js.map +0 -1
  713. package/dist/src/agents/executor.test.js.map +0 -1
  714. package/dist/src/agents/invocation.js.map +0 -1
  715. package/dist/src/agents/invocation.test.js.map +0 -1
  716. package/dist/src/core/sessionHookTriggers.d.ts +0 -28
  717. package/dist/src/core/sessionHookTriggers.js +0 -68
  718. package/dist/src/core/sessionHookTriggers.js.map +0 -1
  719. package/dist/src/tools/smart-edit.d.ts +0 -78
  720. package/dist/src/tools/smart-edit.js +0 -722
  721. package/dist/src/tools/smart-edit.js.map +0 -1
  722. package/dist/src/tools/smart-edit.test.js +0 -592
  723. package/dist/src/tools/smart-edit.test.js.map +0 -1
  724. package/dist/src/utils/shell-permissions.d.ts +0 -52
  725. package/dist/src/utils/shell-permissions.js +0 -188
  726. package/dist/src/utils/shell-permissions.js.map +0 -1
  727. package/dist/src/utils/shell-permissions.test.js +0 -347
  728. package/dist/src/utils/shell-permissions.test.js.map +0 -1
  729. /package/dist/src/agents/{executor.test.d.ts → a2a-client-manager.test.d.ts} +0 -0
  730. /package/dist/src/agents/{invocation.test.d.ts → a2aUtils.test.d.ts} +0 -0
  731. /package/dist/src/{tools/smart-edit.test.d.ts → agents/agentLoader.test.d.ts} +0 -0
  732. /package/dist/src/{utils/shell-permissions.test.d.ts → agents/cli-help-agent.test.d.ts} +0 -0
@@ -0,0 +1,813 @@
1
+ # Observability with OpenTelemetry
2
+
3
+ Learn how to enable and setup OpenTelemetry for Cell CLI.
4
+
5
+ - [Observability with OpenTelemetry](#observability-with-opentelemetry)
6
+ - [Key benefits](#key-benefits)
7
+ - [OpenTelemetry integration](#opentelemetry-integration)
8
+ - [Configuration](#configuration)
9
+ - [Google Cloud telemetry](#google-cloud-telemetry)
10
+ - [Prerequisites](#prerequisites)
11
+ - [Authenticating with CLI Credentials](#authenticating-with-cli-credentials)
12
+ - [Direct export (recommended)](#direct-export-recommended)
13
+ - [Collector-based export (advanced)](#collector-based-export-advanced)
14
+ - [Monitoring Dashboards](#monitoring-dashboards)
15
+ - [Local telemetry](#local-telemetry)
16
+ - [File-based output (recommended)](#file-based-output-recommended)
17
+ - [Collector-based export (advanced)](#collector-based-export-advanced-1)
18
+ - [Logs and metrics](#logs-and-metrics)
19
+ - [Logs](#logs)
20
+ - [Sessions](#sessions)
21
+ - [Tools](#tools)
22
+ - [Files](#files)
23
+ - [API](#api)
24
+ - [Model routing](#model-routing)
25
+ - [Chat and streaming](#chat-and-streaming)
26
+ - [Resilience](#resilience)
27
+ - [Extensions](#extensions)
28
+ - [Agent runs](#agent-runs)
29
+ - [IDE](#ide)
30
+ - [UI](#ui)
31
+ - [Metrics](#metrics)
32
+ - [Custom](#custom)
33
+ - [Sessions](#sessions-1)
34
+ - [Tools](#tools-1)
35
+ - [API](#api-1)
36
+ - [Token usage](#token-usage)
37
+ - [Files](#files-1)
38
+ - [Chat and streaming](#chat-and-streaming-1)
39
+ - [Model routing](#model-routing-1)
40
+ - [Agent runs](#agent-runs-1)
41
+ - [UI](#ui-1)
42
+ - [Performance](#performance)
43
+ - [GenAI semantic convention](#genai-semantic-convention)
44
+
45
+ ## Key benefits
46
+
47
+ - **🔍 Usage analytics**: Understand interaction patterns and feature adoption
48
+ across your team
49
+ - **⚡ Performance monitoring**: Track response times, token consumption, and
50
+ resource utilization
51
+ - **🐛 Real-time debugging**: Identify bottlenecks, failures, and error patterns
52
+ as they occur
53
+ - **📊 Workflow optimization**: Make informed decisions to improve
54
+ configurations and processes
55
+ - **🏢 Enterprise governance**: Monitor usage across teams, track costs, ensure
56
+ compliance, and integrate with existing monitoring infrastructure
57
+
58
+ ## OpenTelemetry integration
59
+
60
+ Built on **[OpenTelemetry]** — the vendor-neutral, industry-standard
61
+ observability framework — Cell CLI's observability system provides:
62
+
63
+ - **Universal compatibility**: Export to any OpenTelemetry backend (Google
64
+ Cloud, Jaeger, Prometheus, Datadog, etc.)
65
+ - **Standardized data**: Use consistent formats and collection methods across
66
+ your toolchain
67
+ - **Future-proof integration**: Connect with existing and future observability
68
+ infrastructure
69
+ - **No vendor lock-in**: Switch between backends without changing your
70
+ instrumentation
71
+
72
+ [OpenTelemetry]: https://opentelemetry.io/
73
+
74
+ ## Configuration
75
+
76
+ All telemetry behavior is controlled through your `.cell-cli/settings.json`
77
+ file. Environment variables can be used to override the settings in the file.
78
+
79
+ | Setting | Environment Variable | Description | Values | Default |
80
+ | -------------- | ------------------------------ | --------------------------------------------------- | ----------------- | ----------------------- |
81
+ | `enabled` | `CELL_TELEMETRY_ENABLED` | Enable or disable telemetry | `true`/`false` | `false` |
82
+ | `target` | `CELL_TELEMETRY_TARGET` | Where to send telemetry data | `"gcp"`/`"local"` | `"local"` |
83
+ | `otlpEndpoint` | `CELL_TELEMETRY_OTLP_ENDPOINT` | OTLP collector endpoint | URL string | `http://localhost:4317` |
84
+ | `otlpProtocol` | `CELL_TELEMETRY_OTLP_PROTOCOL` | OTLP transport protocol | `"grpc"`/`"http"` | `"grpc"` |
85
+ | `outfile` | `CELL_TELEMETRY_OUTFILE` | Save telemetry to file (overrides `otlpEndpoint`) | file path | - |
86
+ | `logPrompts` | `CELL_TELEMETRY_LOG_PROMPTS` | Include prompts in telemetry logs | `true`/`false` | `true` |
87
+ | `useCollector` | `CELL_TELEMETRY_USE_COLLECTOR` | Use external OTLP collector (advanced) | `true`/`false` | `false` |
88
+ | `useCliAuth` | `CELL_TELEMETRY_USE_CLI_AUTH` | Use CLI credentials for telemetry (GCP target only) | `true`/`false` | `false` |
89
+
90
+ **Note on boolean environment variables:** For the boolean settings (`enabled`,
91
+ `logPrompts`, `useCollector`), setting the corresponding environment variable to
92
+ `true` or `1` will enable the feature. Any other value will disable it.
93
+
94
+ For detailed information about all configuration options, see the
95
+ [Configuration guide](../get-started/configuration.md).
96
+
97
+ ## Google Cloud telemetry
98
+
99
+ ### Prerequisites
100
+
101
+ Before using either method below, complete these steps:
102
+
103
+ 1. Set your Google Cloud project ID:
104
+ - For telemetry in a separate project from inference:
105
+ ```bash
106
+ export OTLP_GOOGLE_CLOUD_PROJECT="your-telemetry-project-id"
107
+ ```
108
+ - For telemetry in the same project as inference:
109
+ ```bash
110
+ export GOOGLE_CLOUD_PROJECT="your-project-id"
111
+ ```
112
+
113
+ 2. Authenticate with Google Cloud:
114
+ - If using a user account:
115
+ ```bash
116
+ gcloud auth application-default login
117
+ ```
118
+ - If using a service account:
119
+ ```bash
120
+ export GOOGLE_APPLICATION_CREDENTIALS="/path/to/your/service-account.json"
121
+ ```
122
+ 3. Make sure your account or service account has these IAM roles:
123
+ - Cloud Trace Agent
124
+ - Monitoring Metric Writer
125
+ - Logs Writer
126
+
127
+ 4. Enable the required Google Cloud APIs (if not already enabled):
128
+ ```bash
129
+ gcloud services enable \
130
+ cloudtrace.googleapis.com \
131
+ monitoring.googleapis.com \
132
+ logging.googleapis.com \
133
+ --project="$OTLP_GOOGLE_CLOUD_PROJECT"
134
+ ```
135
+
136
+ ### Authenticating with CLI Credentials
137
+
138
+ By default, the telemetry collector for Google Cloud uses Application Default
139
+ Credentials (ADC). However, you can configure it to use the same OAuth
140
+ credentials that you use to log in to the Cell CLI. This is useful in
141
+ environments where you don't have ADC set up.
142
+
143
+ To enable this, set the `useCliAuth` property in your `telemetry` settings to
144
+ `true`:
145
+
146
+ ```json
147
+ {
148
+ "telemetry": {
149
+ "enabled": true,
150
+ "target": "gcp",
151
+ "useCliAuth": true
152
+ }
153
+ }
154
+ ```
155
+
156
+ **Important:**
157
+
158
+ - This setting requires the use of **Direct Export** (in-process exporters).
159
+ - It **cannot** be used with `useCollector: true`. If you enable both, telemetry
160
+ will be disabled and an error will be logged.
161
+ - The CLI will automatically use your credentials to authenticate with Google
162
+ Cloud Trace, Metrics, and Logging APIs.
163
+
164
+ ### Direct export (recommended)
165
+
166
+ Sends telemetry directly to Google Cloud services. No collector needed.
167
+
168
+ 1. Enable telemetry in your `.cell-cli/settings.json`:
169
+ ```json
170
+ {
171
+ "telemetry": {
172
+ "enabled": true,
173
+ "target": "gcp"
174
+ }
175
+ }
176
+ ```
177
+ 2. Run Cell CLI and send prompts.
178
+ 3. View logs and metrics:
179
+ - Open the Google Cloud Console in your browser after sending prompts:
180
+ - Logs: https://console.cloud.google.com/logs/
181
+ - Metrics: https://console.cloud.google.com/monitoring/metrics-explorer
182
+ - Traces: https://console.cloud.google.com/traces/list
183
+
184
+ ### Collector-based export (advanced)
185
+
186
+ For custom processing, filtering, or routing, use an OpenTelemetry collector to
187
+ forward data to Google Cloud.
188
+
189
+ 1. Configure your `.cell-cli/settings.json`:
190
+ ```json
191
+ {
192
+ "telemetry": {
193
+ "enabled": true,
194
+ "target": "gcp",
195
+ "useCollector": true
196
+ }
197
+ }
198
+ ```
199
+ 2. Run the automation script:
200
+ ```bash
201
+ npm run telemetry -- --target=gcp
202
+ ```
203
+ This will:
204
+ - Start a local OTEL collector that forwards to Google Cloud
205
+ - Configure your workspace
206
+ - Provide links to view traces, metrics, and logs in Google Cloud Console
207
+ - Save collector logs to
208
+ `~/.cell-cli/tmp/<projectHash>/otel/collector-gcp.log`
209
+ - Stop collector on exit (e.g. `Ctrl+C`)
210
+ 3. Run Cell CLI and send prompts.
211
+ 4. View logs and metrics:
212
+ - Open the Google Cloud Console in your browser after sending prompts:
213
+ - Logs: https://console.cloud.google.com/logs/
214
+ - Metrics: https://console.cloud.google.com/monitoring/metrics-explorer
215
+ - Traces: https://console.cloud.google.com/traces/list
216
+ - Open `~/.cell-cli/tmp/<projectHash>/otel/collector-gcp.log` to view local
217
+ collector logs.
218
+
219
+ ### Monitoring Dashboards
220
+
221
+ Cell CLI provides a pre-configured
222
+ [Google Cloud Monitoring](https://cloud.google.com/monitoring) dashboard to
223
+ visualize your telemetry.
224
+
225
+ This dashboard can be found under **Google Cloud Monitoring Dashboard
226
+ Templates** as "**Cell CLI Monitoring**".
227
+
228
+ ![Cell CLI Monitoring Dashboard Overview](../assets/monitoring-dashboard-overview.png)
229
+
230
+ ![Cell CLI Monitoring Dashboard Metrics](../assets/monitoring-dashboard-metrics.png)
231
+
232
+ ![Cell CLI Monitoring Dashboard Logs](../assets/monitoring-dashboard-logs.png)
233
+
234
+ To learn more, check out this blog post:
235
+ [Instant insights: Cell CLI’s new pre-configured monitoring dashboards](https://cloud.google.com/blog/topics/developers-practitioners/instant-insights-gemini-clis-new-pre-configured-monitoring-dashboards/).
236
+
237
+ ## Local telemetry
238
+
239
+ For local development and debugging, you can capture telemetry data locally:
240
+
241
+ ### File-based output (recommended)
242
+
243
+ 1. Enable telemetry in your `.cell-cli/settings.json`:
244
+ ```json
245
+ {
246
+ "telemetry": {
247
+ "enabled": true,
248
+ "target": "local",
249
+ "otlpEndpoint": "",
250
+ "outfile": ".cell-cli/telemetry.log"
251
+ }
252
+ }
253
+ ```
254
+ 2. Run Cell CLI and send prompts.
255
+ 3. View logs and metrics in the specified file (e.g.,
256
+ `.cell-cli/telemetry.log`).
257
+
258
+ ### Collector-based export (advanced)
259
+
260
+ 1. Run the automation script:
261
+ ```bash
262
+ npm run telemetry -- --target=local
263
+ ```
264
+ This will:
265
+ - Download and start Jaeger and OTEL collector
266
+ - Configure your workspace for local telemetry
267
+ - Provide a Jaeger UI at http://localhost:16686
268
+ - Save logs/metrics to `~/.cell-cli/tmp/<projectHash>/otel/collector.log`
269
+ - Stop collector on exit (e.g. `Ctrl+C`)
270
+ 2. Run Cell CLI and send prompts.
271
+ 3. View traces at http://localhost:16686 and logs/metrics in the collector log
272
+ file.
273
+
274
+ ## Logs and metrics
275
+
276
+ The following section describes the structure of logs and metrics generated for
277
+ Cell CLI.
278
+
279
+ The `session.id`, `installation.id`, and `user.email` (available only when
280
+ authenticated with a Google account) are included as common attributes on all
281
+ logs and metrics.
282
+
283
+ ### Logs
284
+
285
+ Logs are timestamped records of specific events. The following events are logged
286
+ for Cell CLI, grouped by category.
287
+
288
+ #### Sessions
289
+
290
+ Captures startup configuration and user prompt submissions.
291
+
292
+ - `gemini_cli.config`: Emitted once at startup with the CLI configuration.
293
+ - **Attributes**:
294
+ - `model` (string)
295
+ - `embedding_model` (string)
296
+ - `sandbox_enabled` (boolean)
297
+ - `core_tools_enabled` (string)
298
+ - `approval_mode` (string)
299
+ - `api_key_enabled` (boolean)
300
+ - `vertex_ai_enabled` (boolean)
301
+ - `log_user_prompts_enabled` (boolean)
302
+ - `file_filtering_respect_git_ignore` (boolean)
303
+ - `debug_mode` (boolean)
304
+ - `mcp_servers` (string)
305
+ - `mcp_servers_count` (int)
306
+ - `extensions` (string)
307
+ - `extension_ids` (string)
308
+ - `extension_count` (int)
309
+ - `mcp_tools` (string, if applicable)
310
+ - `mcp_tools_count` (int, if applicable)
311
+ - `output_format` ("text", "json", or "stream-json")
312
+
313
+ - `gemini_cli.user_prompt`: Emitted when a user submits a prompt.
314
+ - **Attributes**:
315
+ - `prompt_length` (int)
316
+ - `prompt_id` (string)
317
+ - `prompt` (string; excluded if `telemetry.logPrompts` is `false`)
318
+ - `auth_type` (string)
319
+
320
+ #### Tools
321
+
322
+ Captures tool executions, output truncation, and Edit behavior.
323
+
324
+ - `gemini_cli.tool_call`: Emitted for each tool (function) call.
325
+ - **Attributes**:
326
+ - `function_name`
327
+ - `function_args`
328
+ - `duration_ms`
329
+ - `success` (boolean)
330
+ - `decision` ("accept", "reject", "auto_accept", or "modify", if applicable)
331
+ - `error` (if applicable)
332
+ - `error_type` (if applicable)
333
+ - `prompt_id` (string)
334
+ - `tool_type` ("native" or "mcp")
335
+ - `mcp_server_name` (string, if applicable)
336
+ - `extension_name` (string, if applicable)
337
+ - `extension_id` (string, if applicable)
338
+ - `content_length` (int, if applicable)
339
+ - `metadata` (if applicable)
340
+
341
+ - `gemini_cli.tool_output_truncated`: Output of a tool call was truncated.
342
+ - **Attributes**:
343
+ - `tool_name` (string)
344
+ - `original_content_length` (int)
345
+ - `truncated_content_length` (int)
346
+ - `threshold` (int)
347
+ - `lines` (int)
348
+ - `prompt_id` (string)
349
+
350
+ - `gemini_cli.edit_strategy`: Edit strategy chosen.
351
+ - **Attributes**:
352
+ - `strategy` (string)
353
+
354
+ - `gemini_cli.edit_correction`: Edit correction result.
355
+ - **Attributes**:
356
+ - `correction` ("success" | "failure")
357
+
358
+ - `gen_ai.client.inference.operation.details`: This event provides detailed
359
+ information about the GenAI operation, aligned with [OpenTelemetry GenAI
360
+ semantic conventions for events].
361
+ - **Attributes**:
362
+ - `gen_ai.request.model` (string)
363
+ - `gen_ai.provider.name` (string)
364
+ - `gen_ai.operation.name` (string)
365
+ - `gen_ai.input.messages` (json string)
366
+ - `gen_ai.output.messages` (json string)
367
+ - `gen_ai.response.finish_reasons` (array of strings)
368
+ - `gen_ai.usage.input_tokens` (int)
369
+ - `gen_ai.usage.output_tokens` (int)
370
+ - `gen_ai.request.temperature` (float)
371
+ - `gen_ai.request.top_p` (float)
372
+ - `gen_ai.request.top_k` (int)
373
+ - `gen_ai.request.max_tokens` (int)
374
+ - `gen_ai.system_instructions` (json string)
375
+ - `server.address` (string)
376
+ - `server.port` (int)
377
+
378
+ #### Files
379
+
380
+ Tracks file operations performed by tools.
381
+
382
+ - `gemini_cli.file_operation`: Emitted for each file operation.
383
+ - **Attributes**:
384
+ - `tool_name` (string)
385
+ - `operation` ("create" | "read" | "update")
386
+ - `lines` (int, optional)
387
+ - `mimetype` (string, optional)
388
+ - `extension` (string, optional)
389
+ - `programming_language` (string, optional)
390
+
391
+ #### API
392
+
393
+ Captures Gemini API requests, responses, and errors.
394
+
395
+ - `gemini_cli.api_request`: Request sent to Gemini API.
396
+ - **Attributes**:
397
+ - `model` (string)
398
+ - `prompt_id` (string)
399
+ - `request_text` (string, optional)
400
+
401
+ - `gemini_cli.api_response`: Response received from Gemini API.
402
+ - **Attributes**:
403
+ - `model` (string)
404
+ - `status_code` (int|string)
405
+ - `duration_ms` (int)
406
+ - `input_token_count` (int)
407
+ - `output_token_count` (int)
408
+ - `cached_content_token_count` (int)
409
+ - `thoughts_token_count` (int)
410
+ - `tool_token_count` (int)
411
+ - `total_token_count` (int)
412
+ - `response_text` (string, optional)
413
+ - `prompt_id` (string)
414
+ - `auth_type` (string)
415
+ - `finish_reasons` (array of strings)
416
+
417
+ - `gemini_cli.api_error`: API request failed.
418
+ - **Attributes**:
419
+ - `model` (string)
420
+ - `error` (string)
421
+ - `error_type` (string)
422
+ - `status_code` (int|string)
423
+ - `duration_ms` (int)
424
+ - `prompt_id` (string)
425
+ - `auth_type` (string)
426
+
427
+ - `gemini_cli.malformed_json_response`: `generateJson` response could not be
428
+ parsed.
429
+ - **Attributes**:
430
+ - `model` (string)
431
+
432
+ #### Model routing
433
+
434
+ - `gemini_cli.slash_command`: A slash command was executed.
435
+ - **Attributes**:
436
+ - `command` (string)
437
+ - `subcommand` (string, optional)
438
+ - `status` ("success" | "error")
439
+
440
+ - `gemini_cli.slash_command.model`: Model was selected via slash command.
441
+ - **Attributes**:
442
+ - `model_name` (string)
443
+
444
+ - `gemini_cli.model_routing`: Model router made a decision.
445
+ - **Attributes**:
446
+ - `decision_model` (string)
447
+ - `decision_source` (string)
448
+ - `routing_latency_ms` (int)
449
+ - `reasoning` (string, optional)
450
+ - `failed` (boolean)
451
+ - `error_message` (string, optional)
452
+
453
+ #### Chat and streaming
454
+
455
+ - `gemini_cli.chat_compression`: Chat context was compressed.
456
+ - **Attributes**:
457
+ - `tokens_before` (int)
458
+ - `tokens_after` (int)
459
+
460
+ - `gemini_cli.chat.invalid_chunk`: Invalid chunk received from a stream.
461
+ - **Attributes**:
462
+ - `error.message` (string, optional)
463
+
464
+ - `gemini_cli.chat.content_retry`: Retry triggered due to a content error.
465
+ - **Attributes**:
466
+ - `attempt_number` (int)
467
+ - `error_type` (string)
468
+ - `retry_delay_ms` (int)
469
+ - `model` (string)
470
+
471
+ - `gemini_cli.chat.content_retry_failure`: All content retries failed.
472
+ - **Attributes**:
473
+ - `total_attempts` (int)
474
+ - `final_error_type` (string)
475
+ - `total_duration_ms` (int, optional)
476
+ - `model` (string)
477
+
478
+ - `gemini_cli.conversation_finished`: Conversation session ended.
479
+ - **Attributes**:
480
+ - `approvalMode` (string)
481
+ - `turnCount` (int)
482
+
483
+ - `gemini_cli.next_speaker_check`: Next speaker determination.
484
+ - **Attributes**:
485
+ - `prompt_id` (string)
486
+ - `finish_reason` (string)
487
+ - `result` (string)
488
+
489
+ #### Resilience
490
+
491
+ Records fallback mechanisms for models and network operations.
492
+
493
+ - `gemini_cli.flash_fallback`: Switched to a flash model as fallback.
494
+ - **Attributes**:
495
+ - `auth_type` (string)
496
+
497
+ - `gemini_cli.ripgrep_fallback`: Switched to grep as fallback for file search.
498
+ - **Attributes**:
499
+ - `error` (string, optional)
500
+
501
+ - `gemini_cli.web_fetch_fallback_attempt`: Attempted web-fetch fallback.
502
+ - **Attributes**:
503
+ - `reason` ("private_ip" | "primary_failed")
504
+
505
+ #### Extensions
506
+
507
+ Tracks extension lifecycle and settings changes.
508
+
509
+ - `gemini_cli.extension_install`: An extension was installed.
510
+ - **Attributes**:
511
+ - `extension_name` (string)
512
+ - `extension_version` (string)
513
+ - `extension_source` (string)
514
+ - `status` (string)
515
+
516
+ - `gemini_cli.extension_uninstall`: An extension was uninstalled.
517
+ - **Attributes**:
518
+ - `extension_name` (string)
519
+ - `status` (string)
520
+
521
+ - `gemini_cli.extension_enable`: An extension was enabled.
522
+ - **Attributes**:
523
+ - `extension_name` (string)
524
+ - `setting_scope` (string)
525
+
526
+ - `gemini_cli.extension_disable`: An extension was disabled.
527
+ - **Attributes**:
528
+ - `extension_name` (string)
529
+ - `setting_scope` (string)
530
+
531
+ - `gemini_cli.extension_update`: An extension was updated.
532
+ - **Attributes**:
533
+ - `extension_name` (string)
534
+ - `extension_version` (string)
535
+ - `extension_previous_version` (string)
536
+ - `extension_source` (string)
537
+ - `status` (string)
538
+
539
+ #### Agent runs
540
+
541
+ - `gemini_cli.agent.start`: Agent run started.
542
+ - **Attributes**:
543
+ - `agent_id` (string)
544
+ - `agent_name` (string)
545
+
546
+ - `gemini_cli.agent.finish`: Agent run finished.
547
+ - **Attributes**:
548
+ - `agent_id` (string)
549
+ - `agent_name` (string)
550
+ - `duration_ms` (int)
551
+ - `turn_count` (int)
552
+ - `terminate_reason` (string)
553
+
554
+ #### IDE
555
+
556
+ Captures IDE connectivity and conversation lifecycle events.
557
+
558
+ - `gemini_cli.ide_connection`: IDE companion connection.
559
+ - **Attributes**:
560
+ - `connection_type` (string)
561
+
562
+ #### UI
563
+
564
+ Tracks terminal rendering issues and related signals.
565
+
566
+ - `kitty_sequence_overflow`: Terminal kitty control sequence overflow.
567
+ - **Attributes**:
568
+ - `sequence_length` (int)
569
+ - `truncated_sequence` (string)
570
+
571
+ ### Metrics
572
+
573
+ Metrics are numerical measurements of behavior over time.
574
+
575
+ #### Custom
576
+
577
+ ##### Sessions
578
+
579
+ Counts CLI sessions at startup.
580
+
581
+ - `gemini_cli.session.count` (Counter, Int): Incremented once per CLI startup.
582
+
583
+ ##### Tools
584
+
585
+ Measures tool usage and latency.
586
+
587
+ - `gemini_cli.tool.call.count` (Counter, Int): Counts tool calls.
588
+ - **Attributes**:
589
+ - `function_name`
590
+ - `success` (boolean)
591
+ - `decision` (string: "accept", "reject", "modify", or "auto_accept", if
592
+ applicable)
593
+ - `tool_type` (string: "mcp" or "native", if applicable)
594
+
595
+ - `gemini_cli.tool.call.latency` (Histogram, ms): Measures tool call latency.
596
+ - **Attributes**:
597
+ - `function_name`
598
+
599
+ ##### API
600
+
601
+ Tracks API request volume and latency.
602
+
603
+ - `gemini_cli.api.request.count` (Counter, Int): Counts all API requests.
604
+ - **Attributes**:
605
+ - `model`
606
+ - `status_code`
607
+ - `error_type` (if applicable)
608
+
609
+ - `gemini_cli.api.request.latency` (Histogram, ms): Measures API request
610
+ latency.
611
+ - **Attributes**:
612
+ - `model`
613
+ - Note: Overlaps with `gen_ai.client.operation.duration` (GenAI conventions).
614
+
615
+ ##### Token usage
616
+
617
+ Tracks tokens used by model and type.
618
+
619
+ - `gemini_cli.token.usage` (Counter, Int): Counts tokens used.
620
+ - **Attributes**:
621
+ - `model`
622
+ - `type` ("input", "output", "thought", "cache", or "tool")
623
+ - Note: Overlaps with `gen_ai.client.token.usage` for `input`/`output`.
624
+
625
+ ##### Files
626
+
627
+ Counts file operations with basic context.
628
+
629
+ - `gemini_cli.file.operation.count` (Counter, Int): Counts file operations.
630
+ - **Attributes**:
631
+ - `operation` ("create", "read", "update")
632
+ - `lines` (Int, optional)
633
+ - `mimetype` (string, optional)
634
+ - `extension` (string, optional)
635
+ - `programming_language` (string, optional)
636
+
637
+ - `gemini_cli.lines.changed` (Counter, Int): Number of lines changed (from file
638
+ diffs).
639
+ - **Attributes**:
640
+ - `function_name`
641
+ - `type` ("added" or "removed")
642
+
643
+ ##### Chat and streaming
644
+
645
+ Resilience counters for compression, invalid chunks, and retries.
646
+
647
+ - `gemini_cli.chat_compression` (Counter, Int): Counts chat compression
648
+ operations.
649
+ - **Attributes**:
650
+ - `tokens_before` (Int)
651
+ - `tokens_after` (Int)
652
+
653
+ - `gemini_cli.chat.invalid_chunk.count` (Counter, Int): Counts invalid chunks
654
+ from streams.
655
+
656
+ - `gemini_cli.chat.content_retry.count` (Counter, Int): Counts retries due to
657
+ content errors.
658
+
659
+ - `gemini_cli.chat.content_retry_failure.count` (Counter, Int): Counts requests
660
+ where all content retries failed.
661
+
662
+ ##### Model routing
663
+
664
+ Routing latency/failures and slash-command selections.
665
+
666
+ - `gemini_cli.slash_command.model.call_count` (Counter, Int): Counts model
667
+ selections via slash command.
668
+ - **Attributes**:
669
+ - `slash_command.model.model_name` (string)
670
+
671
+ - `gemini_cli.model_routing.latency` (Histogram, ms): Model routing decision
672
+ latency.
673
+ - **Attributes**:
674
+ - `routing.decision_model` (string)
675
+ - `routing.decision_source` (string)
676
+
677
+ - `gemini_cli.model_routing.failure.count` (Counter, Int): Counts model routing
678
+ failures.
679
+ - **Attributes**:
680
+ - `routing.decision_source` (string)
681
+ - `routing.error_message` (string)
682
+
683
+ ##### Agent runs
684
+
685
+ Agent lifecycle metrics: runs, durations, and turns.
686
+
687
+ - `gemini_cli.agent.run.count` (Counter, Int): Counts agent runs.
688
+ - **Attributes**:
689
+ - `agent_name` (string)
690
+ - `terminate_reason` (string)
691
+
692
+ - `gemini_cli.agent.duration` (Histogram, ms): Agent run durations.
693
+ - **Attributes**:
694
+ - `agent_name` (string)
695
+
696
+ - `gemini_cli.agent.turns` (Histogram, turns): Turns taken per agent run.
697
+ - **Attributes**:
698
+ - `agent_name` (string)
699
+
700
+ ##### UI
701
+
702
+ UI stability signals such as flicker count.
703
+
704
+ - `gemini_cli.ui.flicker.count` (Counter, Int): Counts UI frames that flicker
705
+ (render taller than terminal).
706
+
707
+ ##### Performance
708
+
709
+ Optional performance monitoring for startup, CPU/memory, and phase timing.
710
+
711
+ - `gemini_cli.startup.duration` (Histogram, ms): CLI startup time by phase.
712
+ - **Attributes**:
713
+ - `phase` (string)
714
+ - `details` (map, optional)
715
+
716
+ - `gemini_cli.memory.usage` (Histogram, bytes): Memory usage.
717
+ - **Attributes**:
718
+ - `memory_type` ("heap_used", "heap_total", "external", "rss")
719
+ - `component` (string, optional)
720
+
721
+ - `gemini_cli.cpu.usage` (Histogram, percent): CPU usage percentage.
722
+ - **Attributes**:
723
+ - `component` (string, optional)
724
+
725
+ - `gemini_cli.tool.queue.depth` (Histogram, count): Number of tools in the
726
+ execution queue.
727
+
728
+ - `gemini_cli.tool.execution.breakdown` (Histogram, ms): Tool time by phase.
729
+ - **Attributes**:
730
+ - `function_name` (string)
731
+ - `phase` ("validation", "preparation", "execution", "result_processing")
732
+
733
+ - `gemini_cli.api.request.breakdown` (Histogram, ms): API request time by phase.
734
+ - **Attributes**:
735
+ - `model` (string)
736
+ - `phase` ("request_preparation", "network_latency", "response_processing",
737
+ "token_processing")
738
+
739
+ - `gemini_cli.token.efficiency` (Histogram, ratio): Token efficiency metrics.
740
+ - **Attributes**:
741
+ - `model` (string)
742
+ - `metric` (string)
743
+ - `context` (string, optional)
744
+
745
+ - `gemini_cli.performance.score` (Histogram, score): Composite performance
746
+ score.
747
+ - **Attributes**:
748
+ - `category` (string)
749
+ - `baseline` (number, optional)
750
+
751
+ - `gemini_cli.performance.regression` (Counter, Int): Regression detection
752
+ events.
753
+ - **Attributes**:
754
+ - `metric` (string)
755
+ - `severity` ("low", "medium", "high")
756
+ - `current_value` (number)
757
+ - `baseline_value` (number)
758
+
759
+ - `gemini_cli.performance.regression.percentage_change` (Histogram, percent):
760
+ Percent change from baseline when regression detected.
761
+ - **Attributes**:
762
+ - `metric` (string)
763
+ - `severity` ("low", "medium", "high")
764
+ - `current_value` (number)
765
+ - `baseline_value` (number)
766
+
767
+ - `gemini_cli.performance.baseline.comparison` (Histogram, percent): Comparison
768
+ to baseline.
769
+ - **Attributes**:
770
+ - `metric` (string)
771
+ - `category` (string)
772
+ - `current_value` (number)
773
+ - `baseline_value` (number)
774
+
775
+ #### GenAI semantic convention
776
+
777
+ The following metrics comply with [OpenTelemetry GenAI semantic conventions] for
778
+ standardized observability across GenAI applications:
779
+
780
+ - `gen_ai.client.token.usage` (Histogram, token): Number of input and output
781
+ tokens used per operation.
782
+ - **Attributes**:
783
+ - `gen_ai.operation.name` (string): The operation type (e.g.,
784
+ "generate_content", "chat")
785
+ - `gen_ai.provider.name` (string): The GenAI provider ("gcp.gen_ai" or
786
+ "gcp.vertex_ai")
787
+ - `gen_ai.token.type` (string): The token type ("input" or "output")
788
+ - `gen_ai.request.model` (string, optional): The model name used for the
789
+ request
790
+ - `gen_ai.response.model` (string, optional): The model name that generated
791
+ the response
792
+ - `server.address` (string, optional): GenAI server address
793
+ - `server.port` (int, optional): GenAI server port
794
+
795
+ - `gen_ai.client.operation.duration` (Histogram, s): GenAI operation duration in
796
+ seconds.
797
+ - **Attributes**:
798
+ - `gen_ai.operation.name` (string): The operation type (e.g.,
799
+ "generate_content", "chat")
800
+ - `gen_ai.provider.name` (string): The GenAI provider ("gcp.gen_ai" or
801
+ "gcp.vertex_ai")
802
+ - `gen_ai.request.model` (string, optional): The model name used for the
803
+ request
804
+ - `gen_ai.response.model` (string, optional): The model name that generated
805
+ the response
806
+ - `server.address` (string, optional): GenAI server address
807
+ - `server.port` (int, optional): GenAI server port
808
+ - `error.type` (string, optional): Error type if the operation failed
809
+
810
+ [OpenTelemetry GenAI semantic conventions]:
811
+ https://github.com/open-telemetry/semantic-conventions/blob/main/docs/gen-ai/gen-ai-metrics.md
812
+ [OpenTelemetry GenAI semantic conventions for events]:
813
+ https://github.com/open-telemetry/semantic-conventions/blob/8b4f210f43136e57c1f6f47292eb6d38e3bf30bb/docs/gen-ai/gen-ai-events.md