@machina.ai/cell-cli-core 1.20.2-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 (898) 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/index.d.ts +1 -1
  98. package/dist/index.js +1 -1
  99. package/dist/index.js.map +1 -1
  100. package/dist/package.json +7 -4
  101. package/dist/src/agents/a2a-client-manager.d.ts +82 -0
  102. package/dist/src/agents/a2a-client-manager.js +295 -0
  103. package/dist/src/agents/a2a-client-manager.js.map +1 -0
  104. package/dist/src/agents/a2a-client-manager.test.js +281 -0
  105. package/dist/src/agents/a2a-client-manager.test.js.map +1 -0
  106. package/dist/src/agents/a2aUtils.d.ts +29 -0
  107. package/dist/src/agents/a2aUtils.js +113 -0
  108. package/dist/src/agents/a2aUtils.js.map +1 -0
  109. package/dist/src/agents/a2aUtils.test.js +147 -0
  110. package/dist/src/agents/a2aUtils.test.js.map +1 -0
  111. package/dist/src/agents/agentLoader.d.ts +68 -0
  112. package/dist/src/agents/agentLoader.js +255 -0
  113. package/dist/src/agents/agentLoader.js.map +1 -0
  114. package/dist/src/agents/agentLoader.test.js +307 -0
  115. package/dist/src/agents/agentLoader.test.js.map +1 -0
  116. package/dist/src/agents/cli-help-agent.d.ts +24 -0
  117. package/dist/src/agents/cli-help-agent.js +85 -0
  118. package/dist/src/agents/cli-help-agent.js.map +1 -0
  119. package/dist/src/agents/cli-help-agent.test.d.ts +6 -0
  120. package/dist/src/agents/cli-help-agent.test.js +65 -0
  121. package/dist/src/agents/cli-help-agent.test.js.map +1 -0
  122. package/dist/src/agents/codebase-investigator.d.ts +2 -2
  123. package/dist/src/agents/codebase-investigator.js +14 -8
  124. package/dist/src/agents/codebase-investigator.js.map +1 -1
  125. package/dist/src/agents/delegate-to-agent-tool.d.ts +19 -0
  126. package/dist/src/agents/delegate-to-agent-tool.js +122 -0
  127. package/dist/src/agents/delegate-to-agent-tool.js.map +1 -0
  128. package/dist/src/agents/delegate-to-agent-tool.test.d.ts +6 -0
  129. package/dist/src/agents/delegate-to-agent-tool.test.js +213 -0
  130. package/dist/src/agents/delegate-to-agent-tool.test.js.map +1 -0
  131. package/dist/src/agents/{executor.d.ts → local-executor.d.ts} +5 -11
  132. package/dist/src/agents/{executor.js → local-executor.js} +124 -63
  133. package/dist/src/agents/local-executor.js.map +1 -0
  134. package/dist/src/agents/local-executor.test.d.ts +6 -0
  135. package/dist/src/agents/{executor.test.js → local-executor.test.js} +136 -58
  136. package/dist/src/agents/local-executor.test.js.map +1 -0
  137. package/dist/src/agents/{invocation.d.ts → local-invocation.d.ts} +6 -7
  138. package/dist/src/agents/{invocation.js → local-invocation.js} +9 -10
  139. package/dist/src/agents/local-invocation.js.map +1 -0
  140. package/dist/src/agents/local-invocation.test.d.ts +6 -0
  141. package/dist/src/agents/{invocation.test.js → local-invocation.test.js} +29 -20
  142. package/dist/src/agents/local-invocation.test.js.map +1 -0
  143. package/dist/src/agents/registry.d.ts +37 -1
  144. package/dist/src/agents/registry.js +240 -27
  145. package/dist/src/agents/registry.js.map +1 -1
  146. package/dist/src/agents/registry.test.js +465 -30
  147. package/dist/src/agents/registry.test.js.map +1 -1
  148. package/dist/src/agents/remote-invocation.d.ts +35 -0
  149. package/dist/src/agents/remote-invocation.js +126 -0
  150. package/dist/src/agents/remote-invocation.js.map +1 -0
  151. package/dist/src/agents/remote-invocation.test.d.ts +6 -0
  152. package/dist/src/agents/remote-invocation.test.js +201 -0
  153. package/dist/src/agents/remote-invocation.test.js.map +1 -0
  154. package/dist/src/agents/subagent-tool-wrapper.d.ts +2 -2
  155. package/dist/src/agents/subagent-tool-wrapper.js +11 -6
  156. package/dist/src/agents/subagent-tool-wrapper.js.map +1 -1
  157. package/dist/src/agents/subagent-tool-wrapper.test.js +33 -19
  158. package/dist/src/agents/subagent-tool-wrapper.test.js.map +1 -1
  159. package/dist/src/agents/types.d.ts +21 -15
  160. package/dist/src/agents/types.js.map +1 -1
  161. package/dist/src/availability/errorClassification.d.ts +7 -0
  162. package/dist/src/availability/errorClassification.js +20 -0
  163. package/dist/src/availability/errorClassification.js.map +1 -0
  164. package/dist/src/availability/fallbackIntegration.test.d.ts +6 -0
  165. package/dist/src/availability/fallbackIntegration.test.js +58 -0
  166. package/dist/src/availability/fallbackIntegration.test.js.map +1 -0
  167. package/dist/src/availability/modelAvailabilityService.d.ts +3 -1
  168. package/dist/src/availability/modelAvailabilityService.js +3 -0
  169. package/dist/src/availability/modelAvailabilityService.js.map +1 -1
  170. package/dist/src/availability/modelPolicy.d.ts +8 -1
  171. package/dist/src/availability/policyCatalog.d.ts +1 -0
  172. package/dist/src/availability/policyCatalog.js +6 -7
  173. package/dist/src/availability/policyCatalog.js.map +1 -1
  174. package/dist/src/availability/policyCatalog.test.js +2 -2
  175. package/dist/src/availability/policyCatalog.test.js.map +1 -1
  176. package/dist/src/availability/policyHelpers.d.ts +34 -3
  177. package/dist/src/availability/policyHelpers.js +104 -13
  178. package/dist/src/availability/policyHelpers.js.map +1 -1
  179. package/dist/src/availability/policyHelpers.test.js +143 -13
  180. package/dist/src/availability/policyHelpers.test.js.map +1 -1
  181. package/dist/src/availability/testUtils.d.ts +10 -0
  182. package/dist/src/availability/testUtils.js +22 -0
  183. package/dist/src/availability/testUtils.js.map +1 -0
  184. package/dist/src/code_assist/experiments/client_metadata.js +2 -1
  185. package/dist/src/code_assist/experiments/client_metadata.js.map +1 -1
  186. package/dist/src/code_assist/experiments/client_metadata.test.js +7 -10
  187. package/dist/src/code_assist/experiments/client_metadata.test.js.map +1 -1
  188. package/dist/src/code_assist/experiments/experiments.d.ts +1 -1
  189. package/dist/src/code_assist/experiments/experiments.js +21 -0
  190. package/dist/src/code_assist/experiments/experiments.js.map +1 -1
  191. package/dist/src/code_assist/experiments/experiments_local.test.d.ts +6 -0
  192. package/dist/src/code_assist/experiments/experiments_local.test.js +110 -0
  193. package/dist/src/code_assist/experiments/experiments_local.test.js.map +1 -0
  194. package/dist/src/code_assist/oauth-credential-storage.js +3 -4
  195. package/dist/src/code_assist/oauth-credential-storage.js.map +1 -1
  196. package/dist/src/code_assist/oauth2.d.ts +2 -0
  197. package/dist/src/code_assist/oauth2.js +70 -14
  198. package/dist/src/code_assist/oauth2.js.map +1 -1
  199. package/dist/src/code_assist/oauth2.test.js +224 -22
  200. package/dist/src/code_assist/oauth2.test.js.map +1 -1
  201. package/dist/src/code_assist/server.d.ts +9 -1
  202. package/dist/src/code_assist/server.js +74 -11
  203. package/dist/src/code_assist/server.js.map +1 -1
  204. package/dist/src/code_assist/server.test.js +199 -27
  205. package/dist/src/code_assist/server.test.js.map +1 -1
  206. package/dist/src/code_assist/setup.js +6 -4
  207. package/dist/src/code_assist/setup.js.map +1 -1
  208. package/dist/src/code_assist/setup.test.js +63 -0
  209. package/dist/src/code_assist/setup.test.js.map +1 -1
  210. package/dist/src/code_assist/telemetry.d.ts +14 -0
  211. package/dist/src/code_assist/telemetry.js +157 -0
  212. package/dist/src/code_assist/telemetry.js.map +1 -0
  213. package/dist/src/code_assist/telemetry.test.d.ts +6 -0
  214. package/dist/src/code_assist/telemetry.test.js +301 -0
  215. package/dist/src/code_assist/telemetry.test.js.map +1 -0
  216. package/dist/src/code_assist/types.d.ts +77 -1
  217. package/dist/src/code_assist/types.js +28 -0
  218. package/dist/src/code_assist/types.js.map +1 -1
  219. package/dist/src/commands/init.d.ts +7 -0
  220. package/dist/src/commands/init.js +53 -0
  221. package/dist/src/commands/init.js.map +1 -0
  222. package/dist/src/commands/init.test.d.ts +6 -0
  223. package/dist/src/commands/init.test.js +25 -0
  224. package/dist/src/commands/init.test.js.map +1 -0
  225. package/dist/src/commands/memory.d.ts +11 -0
  226. package/dist/src/commands/memory.js +80 -0
  227. package/dist/src/commands/memory.js.map +1 -0
  228. package/dist/src/commands/memory.test.d.ts +6 -0
  229. package/dist/src/commands/memory.test.js +155 -0
  230. package/dist/src/commands/memory.test.js.map +1 -0
  231. package/dist/src/commands/restore.d.ts +9 -0
  232. package/dist/src/commands/restore.js +46 -0
  233. package/dist/src/commands/restore.js.map +1 -0
  234. package/dist/src/commands/restore.test.d.ts +6 -0
  235. package/dist/src/commands/restore.test.js +137 -0
  236. package/dist/src/commands/restore.test.js.map +1 -0
  237. package/dist/src/commands/types.d.ts +41 -0
  238. package/dist/src/commands/types.js +7 -0
  239. package/dist/src/commands/types.js.map +1 -0
  240. package/dist/src/config/config.d.ts +145 -25
  241. package/dist/src/config/config.js +370 -132
  242. package/dist/src/config/config.js.map +1 -1
  243. package/dist/src/config/config.test.js +416 -50
  244. package/dist/src/config/config.test.js.map +1 -1
  245. package/dist/src/config/defaultModelConfigs.js +21 -0
  246. package/dist/src/config/defaultModelConfigs.js.map +1 -1
  247. package/dist/src/config/flashFallback.test.js +11 -35
  248. package/dist/src/config/flashFallback.test.js.map +1 -1
  249. package/dist/src/config/models.d.ts +36 -15
  250. package/dist/src/config/models.js +89 -28
  251. package/dist/src/config/models.js.map +1 -1
  252. package/dist/src/config/models.test.js +107 -77
  253. package/dist/src/config/models.test.js.map +1 -1
  254. package/dist/src/config/storage.d.ts +5 -0
  255. package/dist/src/config/storage.js +17 -2
  256. package/dist/src/config/storage.js.map +1 -1
  257. package/dist/src/config/storage.test.js +16 -0
  258. package/dist/src/config/storage.test.js.map +1 -1
  259. package/dist/src/confirmation-bus/message-bus.js +3 -1
  260. package/dist/src/confirmation-bus/message-bus.js.map +1 -1
  261. package/dist/src/confirmation-bus/types.d.ts +4 -0
  262. package/dist/src/core/baseLlmClient.d.ts +3 -1
  263. package/dist/src/core/baseLlmClient.js +60 -22
  264. package/dist/src/core/baseLlmClient.js.map +1 -1
  265. package/dist/src/core/baseLlmClient.test.js +177 -7
  266. package/dist/src/core/baseLlmClient.test.js.map +1 -1
  267. package/dist/src/core/client.d.ts +7 -1
  268. package/dist/src/core/client.js +261 -96
  269. package/dist/src/core/client.js.map +1 -1
  270. package/dist/src/core/client.test.js +397 -67
  271. package/dist/src/core/client.test.js.map +1 -1
  272. package/dist/src/core/clientHookTriggers.js +2 -2
  273. package/dist/src/core/clientHookTriggers.js.map +1 -1
  274. package/dist/src/core/contentGenerator.js +6 -4
  275. package/dist/src/core/contentGenerator.js.map +1 -1
  276. package/dist/src/core/contentGenerator.test.js +24 -23
  277. package/dist/src/core/contentGenerator.test.js.map +1 -1
  278. package/dist/src/core/coreToolHookTriggers.d.ts +9 -5
  279. package/dist/src/core/coreToolHookTriggers.js +119 -21
  280. package/dist/src/core/coreToolHookTriggers.js.map +1 -1
  281. package/dist/src/core/coreToolHookTriggers.test.d.ts +6 -0
  282. package/dist/src/core/coreToolHookTriggers.test.js +191 -0
  283. package/dist/src/core/coreToolHookTriggers.test.js.map +1 -0
  284. package/dist/src/core/coreToolScheduler.d.ts +7 -93
  285. package/dist/src/core/coreToolScheduler.js +139 -333
  286. package/dist/src/core/coreToolScheduler.js.map +1 -1
  287. package/dist/src/core/coreToolScheduler.test.js +304 -348
  288. package/dist/src/core/coreToolScheduler.test.js.map +1 -1
  289. package/dist/src/core/geminiChat.d.ts +26 -1
  290. package/dist/src/core/geminiChat.js +144 -80
  291. package/dist/src/core/geminiChat.js.map +1 -1
  292. package/dist/src/core/geminiChat.test.js +334 -253
  293. package/dist/src/core/geminiChat.test.js.map +1 -1
  294. package/dist/src/core/geminiChatHookTriggers.d.ts +8 -4
  295. package/dist/src/core/geminiChatHookTriggers.js +34 -12
  296. package/dist/src/core/geminiChatHookTriggers.js.map +1 -1
  297. package/dist/src/core/geminiChatHookTriggers.test.d.ts +6 -0
  298. package/dist/src/core/geminiChatHookTriggers.test.js +153 -0
  299. package/dist/src/core/geminiChatHookTriggers.test.js.map +1 -0
  300. package/dist/src/core/geminiChat_network_retry.test.d.ts +6 -0
  301. package/dist/src/core/geminiChat_network_retry.test.js +196 -0
  302. package/dist/src/core/geminiChat_network_retry.test.js.map +1 -0
  303. package/dist/src/core/logger.js.map +1 -1
  304. package/dist/src/core/loggingContentGenerator.js +19 -2
  305. package/dist/src/core/loggingContentGenerator.js.map +1 -1
  306. package/dist/src/core/loggingContentGenerator.test.js +30 -0
  307. package/dist/src/core/loggingContentGenerator.test.js.map +1 -1
  308. package/dist/src/core/nonInteractiveToolExecutor.test.js +7 -8
  309. package/dist/src/core/nonInteractiveToolExecutor.test.js.map +1 -1
  310. package/dist/src/core/prompts.js +48 -22
  311. package/dist/src/core/prompts.js.map +1 -1
  312. package/dist/src/core/prompts.test.js +66 -11
  313. package/dist/src/core/prompts.test.js.map +1 -1
  314. package/dist/src/core/tokenLimits.js +6 -12
  315. package/dist/src/core/tokenLimits.js.map +1 -1
  316. package/dist/src/core/tokenLimits.test.js +8 -4
  317. package/dist/src/core/tokenLimits.test.js.map +1 -1
  318. package/dist/src/core/turn.d.ts +21 -21
  319. package/dist/src/core/turn.js +32 -22
  320. package/dist/src/core/turn.js.map +1 -1
  321. package/dist/src/core/turn.test.js +79 -5
  322. package/dist/src/core/turn.test.js.map +1 -1
  323. package/dist/src/fallback/handler.js +55 -120
  324. package/dist/src/fallback/handler.js.map +1 -1
  325. package/dist/src/fallback/handler.test.js +115 -288
  326. package/dist/src/fallback/handler.test.js.map +1 -1
  327. package/dist/src/generated/git-commit.d.ts +3 -3
  328. package/dist/src/generated/git-commit.js +3 -3
  329. package/dist/src/hooks/hookAggregator.js +7 -0
  330. package/dist/src/hooks/hookAggregator.js.map +1 -1
  331. package/dist/src/hooks/hookEventHandler.d.ts +9 -5
  332. package/dist/src/hooks/hookEventHandler.js +120 -16
  333. package/dist/src/hooks/hookEventHandler.js.map +1 -1
  334. package/dist/src/hooks/hookEventHandler.test.js +231 -9
  335. package/dist/src/hooks/hookEventHandler.test.js.map +1 -1
  336. package/dist/src/hooks/hookPlanner.d.ts +1 -5
  337. package/dist/src/hooks/hookPlanner.js +2 -7
  338. package/dist/src/hooks/hookPlanner.js.map +1 -1
  339. package/dist/src/hooks/hookPlanner.test.js +62 -2
  340. package/dist/src/hooks/hookPlanner.test.js.map +1 -1
  341. package/dist/src/hooks/hookRegistry.d.ts +6 -18
  342. package/dist/src/hooks/hookRegistry.js +49 -35
  343. package/dist/src/hooks/hookRegistry.js.map +1 -1
  344. package/dist/src/hooks/hookRegistry.test.js +167 -8
  345. package/dist/src/hooks/hookRegistry.test.js.map +1 -1
  346. package/dist/src/hooks/hookRunner.d.ts +5 -3
  347. package/dist/src/hooks/hookRunner.js +68 -18
  348. package/dist/src/hooks/hookRunner.js.map +1 -1
  349. package/dist/src/hooks/hookRunner.test.js +173 -36
  350. package/dist/src/hooks/hookRunner.test.js.map +1 -1
  351. package/dist/src/hooks/hookSystem.d.ts +10 -6
  352. package/dist/src/hooks/hookSystem.js +36 -16
  353. package/dist/src/hooks/hookSystem.js.map +1 -1
  354. package/dist/src/hooks/hookSystem.test.js +123 -18
  355. package/dist/src/hooks/hookSystem.test.js.map +1 -1
  356. package/dist/src/hooks/hookTranslator.js +2 -1
  357. package/dist/src/hooks/hookTranslator.js.map +1 -1
  358. package/dist/src/hooks/index.d.ts +2 -1
  359. package/dist/src/hooks/index.js +1 -0
  360. package/dist/src/hooks/index.js.map +1 -1
  361. package/dist/src/hooks/trustedHooks.d.ts +28 -0
  362. package/dist/src/hooks/trustedHooks.js +90 -0
  363. package/dist/src/hooks/trustedHooks.js.map +1 -0
  364. package/dist/src/hooks/trustedHooks.test.d.ts +6 -0
  365. package/dist/src/hooks/trustedHooks.test.js +154 -0
  366. package/dist/src/hooks/trustedHooks.test.js.map +1 -0
  367. package/dist/src/hooks/types.d.ts +42 -11
  368. package/dist/src/hooks/types.js +31 -42
  369. package/dist/src/hooks/types.js.map +1 -1
  370. package/dist/src/hooks/types.test.js +9 -52
  371. package/dist/src/hooks/types.test.js.map +1 -1
  372. package/dist/src/ide/detect-ide.d.ts +4 -0
  373. package/dist/src/ide/detect-ide.js +7 -2
  374. package/dist/src/ide/detect-ide.js.map +1 -1
  375. package/dist/src/ide/detect-ide.test.js +42 -1
  376. package/dist/src/ide/detect-ide.test.js.map +1 -1
  377. package/dist/src/ide/ide-client.js +6 -1
  378. package/dist/src/ide/ide-client.js.map +1 -1
  379. package/dist/src/ide/ide-installer.js +2 -2
  380. package/dist/src/ide/ide-installer.js.map +1 -1
  381. package/dist/src/ide/ide-installer.test.js +12 -3
  382. package/dist/src/ide/ide-installer.test.js.map +1 -1
  383. package/dist/src/index.d.ts +23 -1
  384. package/dist/src/index.js +25 -2
  385. package/dist/src/index.js.map +1 -1
  386. package/dist/src/mcp/oauth-provider.js +7 -3
  387. package/dist/src/mcp/oauth-provider.js.map +1 -1
  388. package/dist/src/mcp/oauth-provider.test.js +4 -1
  389. package/dist/src/mcp/oauth-provider.test.js.map +1 -1
  390. package/dist/src/mcp/oauth-utils.d.ts +8 -1
  391. package/dist/src/mcp/oauth-utils.js +31 -2
  392. package/dist/src/mcp/oauth-utils.js.map +1 -1
  393. package/dist/src/mcp/oauth-utils.test.js +42 -0
  394. package/dist/src/mcp/oauth-utils.test.js.map +1 -1
  395. package/dist/src/mcp/token-storage/file-token-storage.js +2 -2
  396. package/dist/src/mcp/token-storage/file-token-storage.js.map +1 -1
  397. package/dist/src/mcp/token-storage/keychain-token-storage.js +1 -1
  398. package/dist/src/mcp/token-storage/keychain-token-storage.js.map +1 -1
  399. package/dist/src/output/json-formatter.d.ts +2 -2
  400. package/dist/src/output/json-formatter.js +6 -3
  401. package/dist/src/output/json-formatter.js.map +1 -1
  402. package/dist/src/output/json-formatter.test.js +37 -9
  403. package/dist/src/output/json-formatter.test.js.map +1 -1
  404. package/dist/src/output/stream-json-formatter.js +6 -0
  405. package/dist/src/output/stream-json-formatter.js.map +1 -1
  406. package/dist/src/output/stream-json-formatter.test.js +98 -100
  407. package/dist/src/output/stream-json-formatter.test.js.map +1 -1
  408. package/dist/src/output/types.d.ts +3 -0
  409. package/dist/src/output/types.js.map +1 -1
  410. package/dist/src/policy/config.js +140 -15
  411. package/dist/src/policy/config.js.map +1 -1
  412. package/dist/src/policy/config.test.js +24 -2
  413. package/dist/src/policy/config.test.js.map +1 -1
  414. package/dist/src/policy/persistence.test.d.ts +6 -0
  415. package/dist/src/policy/persistence.test.js +154 -0
  416. package/dist/src/policy/persistence.test.js.map +1 -0
  417. package/dist/src/policy/policies/agent.toml +31 -0
  418. package/dist/src/policy/policies/write.toml +5 -0
  419. package/dist/src/policy/policies/yolo.toml +1 -0
  420. package/dist/src/policy/policy-engine.d.ts +14 -1
  421. package/dist/src/policy/policy-engine.js +165 -7
  422. package/dist/src/policy/policy-engine.js.map +1 -1
  423. package/dist/src/policy/policy-engine.test.js +315 -3
  424. package/dist/src/policy/policy-engine.test.js.map +1 -1
  425. package/dist/src/policy/policy-updater.test.d.ts +6 -0
  426. package/dist/src/policy/policy-updater.test.js +116 -0
  427. package/dist/src/policy/policy-updater.test.js.map +1 -0
  428. package/dist/src/policy/shell-safety.test.d.ts +6 -0
  429. package/dist/src/policy/shell-safety.test.js +438 -0
  430. package/dist/src/policy/shell-safety.test.js.map +1 -0
  431. package/dist/src/policy/toml-loader.d.ts +3 -5
  432. package/dist/src/policy/toml-loader.js +43 -60
  433. package/dist/src/policy/toml-loader.js.map +1 -1
  434. package/dist/src/policy/toml-loader.test.js +41 -7
  435. package/dist/src/policy/toml-loader.test.js.map +1 -1
  436. package/dist/src/policy/types.d.ts +25 -0
  437. package/dist/src/policy/utils.d.ts +21 -0
  438. package/dist/src/policy/utils.js +45 -0
  439. package/dist/src/policy/utils.js.map +1 -0
  440. package/dist/src/policy/utils.test.d.ts +6 -0
  441. package/dist/src/policy/utils.test.js +92 -0
  442. package/dist/src/policy/utils.test.js.map +1 -0
  443. package/dist/src/resources/resource-registry.d.ts +30 -0
  444. package/dist/src/resources/resource-registry.js +57 -0
  445. package/dist/src/resources/resource-registry.js.map +1 -0
  446. package/dist/src/resources/resource-registry.test.d.ts +6 -0
  447. package/dist/src/resources/resource-registry.test.js +54 -0
  448. package/dist/src/resources/resource-registry.test.js.map +1 -0
  449. package/dist/src/routing/modelRouterService.js +0 -15
  450. package/dist/src/routing/modelRouterService.js.map +1 -1
  451. package/dist/src/routing/modelRouterService.test.js +0 -62
  452. package/dist/src/routing/modelRouterService.test.js.map +1 -1
  453. package/dist/src/routing/routingStrategy.d.ts +2 -0
  454. package/dist/src/routing/strategies/classifierStrategy.js +10 -21
  455. package/dist/src/routing/strategies/classifierStrategy.js.map +1 -1
  456. package/dist/src/routing/strategies/classifierStrategy.test.js +18 -1
  457. package/dist/src/routing/strategies/classifierStrategy.test.js.map +1 -1
  458. package/dist/src/routing/strategies/compositeStrategy.js +4 -2
  459. package/dist/src/routing/strategies/compositeStrategy.js.map +1 -1
  460. package/dist/src/routing/strategies/compositeStrategy.test.js +11 -10
  461. package/dist/src/routing/strategies/compositeStrategy.test.js.map +1 -1
  462. package/dist/src/routing/strategies/fallbackStrategy.d.ts +1 -1
  463. package/dist/src/routing/strategies/fallbackStrategy.js +21 -13
  464. package/dist/src/routing/strategies/fallbackStrategy.js.map +1 -1
  465. package/dist/src/routing/strategies/fallbackStrategy.test.js +76 -39
  466. package/dist/src/routing/strategies/fallbackStrategy.test.js.map +1 -1
  467. package/dist/src/routing/strategies/overrideStrategy.d.ts +1 -1
  468. package/dist/src/routing/strategies/overrideStrategy.js +5 -4
  469. package/dist/src/routing/strategies/overrideStrategy.js.map +1 -1
  470. package/dist/src/routing/strategies/overrideStrategy.test.js +14 -0
  471. package/dist/src/routing/strategies/overrideStrategy.test.js.map +1 -1
  472. package/dist/src/safety/checker-runner.js +17 -6
  473. package/dist/src/safety/checker-runner.js.map +1 -1
  474. package/dist/src/scheduler/tool-executor.d.ts +22 -0
  475. package/dist/src/scheduler/tool-executor.js +198 -0
  476. package/dist/src/scheduler/tool-executor.js.map +1 -0
  477. package/dist/src/scheduler/tool-executor.test.d.ts +6 -0
  478. package/dist/src/scheduler/tool-executor.test.js +231 -0
  479. package/dist/src/scheduler/tool-executor.test.js.map +1 -0
  480. package/dist/src/scheduler/tool-modifier.d.ts +23 -0
  481. package/dist/src/scheduler/tool-modifier.js +50 -0
  482. package/dist/src/scheduler/tool-modifier.js.map +1 -0
  483. package/dist/src/scheduler/tool-modifier.test.d.ts +6 -0
  484. package/dist/src/scheduler/tool-modifier.test.js +159 -0
  485. package/dist/src/scheduler/tool-modifier.test.js.map +1 -0
  486. package/dist/src/scheduler/types.d.ts +95 -0
  487. package/dist/src/scheduler/types.js +7 -0
  488. package/dist/src/scheduler/types.js.map +1 -0
  489. package/dist/src/services/chatCompressionService.js +8 -1
  490. package/dist/src/services/chatCompressionService.js.map +1 -1
  491. package/dist/src/services/chatCompressionService.test.js +3 -0
  492. package/dist/src/services/chatCompressionService.test.js.map +1 -1
  493. package/dist/src/services/chatRecordingService.d.ts +21 -1
  494. package/dist/src/services/chatRecordingService.js +57 -2
  495. package/dist/src/services/chatRecordingService.js.map +1 -1
  496. package/dist/src/services/chatRecordingService.test.js +43 -0
  497. package/dist/src/services/chatRecordingService.test.js.map +1 -1
  498. package/dist/src/services/contextManager.d.ts +5 -11
  499. package/dist/src/services/contextManager.js +20 -17
  500. package/dist/src/services/contextManager.js.map +1 -1
  501. package/dist/src/services/contextManager.test.js +40 -41
  502. package/dist/src/services/contextManager.test.js.map +1 -1
  503. package/dist/src/services/environmentSanitization.d.ts +15 -0
  504. package/dist/src/services/environmentSanitization.js +142 -0
  505. package/dist/src/services/environmentSanitization.js.map +1 -0
  506. package/dist/src/services/environmentSanitization.test.d.ts +6 -0
  507. package/dist/src/services/environmentSanitization.test.js +284 -0
  508. package/dist/src/services/environmentSanitization.test.js.map +1 -0
  509. package/dist/src/services/fileSystemService.d.ts +0 -9
  510. package/dist/src/services/fileSystemService.js +0 -11
  511. package/dist/src/services/fileSystemService.js.map +1 -1
  512. package/dist/src/services/gitService.js +15 -1
  513. package/dist/src/services/gitService.js.map +1 -1
  514. package/dist/src/services/gitService.test.js +56 -2
  515. package/dist/src/services/gitService.test.js.map +1 -1
  516. package/dist/src/services/loopDetectionService.js +4 -3
  517. package/dist/src/services/loopDetectionService.js.map +1 -1
  518. package/dist/src/services/loopDetectionService.test.js +14 -8
  519. package/dist/src/services/loopDetectionService.test.js.map +1 -1
  520. package/dist/src/services/modelConfig.golden.test.js +32 -0
  521. package/dist/src/services/modelConfig.golden.test.js.map +1 -1
  522. package/dist/src/services/modelConfig.integration.test.js +3 -3
  523. package/dist/src/services/modelConfig.integration.test.js.map +1 -1
  524. package/dist/src/services/modelConfigService.d.ts +41 -4
  525. package/dist/src/services/modelConfigService.js +135 -75
  526. package/dist/src/services/modelConfigService.js.map +1 -1
  527. package/dist/src/services/modelConfigService.test.js +226 -0
  528. package/dist/src/services/modelConfigService.test.js.map +1 -1
  529. package/dist/src/services/modelConfigServiceTestUtils.d.ts +10 -0
  530. package/dist/src/services/modelConfigServiceTestUtils.js +17 -0
  531. package/dist/src/services/modelConfigServiceTestUtils.js.map +1 -0
  532. package/dist/src/services/sessionSummaryService.d.ts +28 -0
  533. package/dist/src/services/sessionSummaryService.js +131 -0
  534. package/dist/src/services/sessionSummaryService.js.map +1 -0
  535. package/dist/src/services/sessionSummaryService.test.d.ts +6 -0
  536. package/dist/src/services/sessionSummaryService.test.js +785 -0
  537. package/dist/src/services/sessionSummaryService.test.js.map +1 -0
  538. package/dist/src/services/sessionSummaryUtils.d.ts +16 -0
  539. package/dist/src/services/sessionSummaryUtils.js +129 -0
  540. package/dist/src/services/sessionSummaryUtils.js.map +1 -0
  541. package/dist/src/services/sessionSummaryUtils.test.d.ts +6 -0
  542. package/dist/src/services/sessionSummaryUtils.test.js +137 -0
  543. package/dist/src/services/sessionSummaryUtils.test.js.map +1 -0
  544. package/dist/src/services/shellExecutionService.d.ts +2 -0
  545. package/dist/src/services/shellExecutionService.js +34 -72
  546. package/dist/src/services/shellExecutionService.js.map +1 -1
  547. package/dist/src/services/shellExecutionService.test.js +114 -8
  548. package/dist/src/services/shellExecutionService.test.js.map +1 -1
  549. package/dist/src/services/test-data/resolved-aliases-retry.golden.json +238 -0
  550. package/dist/src/services/test-data/resolved-aliases.golden.json +16 -0
  551. package/dist/src/skills/skillLoader.d.ts +31 -0
  552. package/dist/src/skills/skillLoader.js +77 -0
  553. package/dist/src/skills/skillLoader.js.map +1 -0
  554. package/dist/src/skills/skillLoader.test.d.ts +6 -0
  555. package/dist/src/skills/skillLoader.test.js +75 -0
  556. package/dist/src/skills/skillLoader.test.js.map +1 -0
  557. package/dist/src/skills/skillManager.d.ts +69 -0
  558. package/dist/src/skills/skillManager.js +127 -0
  559. package/dist/src/skills/skillManager.js.map +1 -0
  560. package/dist/src/skills/skillManager.test.d.ts +6 -0
  561. package/dist/src/skills/skillManager.test.js +210 -0
  562. package/dist/src/skills/skillManager.test.js.map +1 -0
  563. package/dist/src/telemetry/activity-detector.test.js.map +1 -1
  564. package/dist/src/telemetry/clearcut-logger/clearcut-logger.d.ts +19 -9
  565. package/dist/src/telemetry/clearcut-logger/clearcut-logger.js +261 -164
  566. package/dist/src/telemetry/clearcut-logger/clearcut-logger.js.map +1 -1
  567. package/dist/src/telemetry/clearcut-logger/clearcut-logger.test.js +223 -27
  568. package/dist/src/telemetry/clearcut-logger/clearcut-logger.test.js.map +1 -1
  569. package/dist/src/telemetry/clearcut-logger/event-metadata-key.d.ts +12 -3
  570. package/dist/src/telemetry/clearcut-logger/event-metadata-key.js +26 -5
  571. package/dist/src/telemetry/clearcut-logger/event-metadata-key.js.map +1 -1
  572. package/dist/src/telemetry/config.js +2 -0
  573. package/dist/src/telemetry/config.js.map +1 -1
  574. package/dist/src/telemetry/config.test.js +25 -0
  575. package/dist/src/telemetry/config.test.js.map +1 -1
  576. package/dist/src/telemetry/gcp-exporters.d.ts +4 -3
  577. package/dist/src/telemetry/gcp-exporters.js +8 -4
  578. package/dist/src/telemetry/gcp-exporters.js.map +1 -1
  579. package/dist/src/telemetry/index.d.ts +1 -1
  580. package/dist/src/telemetry/index.js +1 -1
  581. package/dist/src/telemetry/index.js.map +1 -1
  582. package/dist/src/telemetry/loggers.d.ts +4 -3
  583. package/dist/src/telemetry/loggers.js +351 -340
  584. package/dist/src/telemetry/loggers.js.map +1 -1
  585. package/dist/src/telemetry/loggers.test.circular.js +1 -0
  586. package/dist/src/telemetry/loggers.test.circular.js.map +1 -1
  587. package/dist/src/telemetry/loggers.test.js +71 -15
  588. package/dist/src/telemetry/loggers.test.js.map +1 -1
  589. package/dist/src/telemetry/metrics.test.js.map +1 -1
  590. package/dist/src/telemetry/sdk.d.ts +9 -2
  591. package/dist/src/telemetry/sdk.js +142 -17
  592. package/dist/src/telemetry/sdk.js.map +1 -1
  593. package/dist/src/telemetry/sdk.test.js +130 -28
  594. package/dist/src/telemetry/sdk.test.js.map +1 -1
  595. package/dist/src/telemetry/startupProfiler.js +26 -3
  596. package/dist/src/telemetry/startupProfiler.js.map +1 -1
  597. package/dist/src/telemetry/startupProfiler.test.js +49 -7
  598. package/dist/src/telemetry/startupProfiler.test.js.map +1 -1
  599. package/dist/src/telemetry/telemetry.test.js +10 -3
  600. package/dist/src/telemetry/telemetry.test.js.map +1 -1
  601. package/dist/src/telemetry/trace.js.map +1 -1
  602. package/dist/src/telemetry/types.d.ts +37 -12
  603. package/dist/src/telemetry/types.js +61 -20
  604. package/dist/src/telemetry/types.js.map +1 -1
  605. package/dist/src/telemetry/uiTelemetry.d.ts +1 -0
  606. package/dist/src/telemetry/uiTelemetry.js +2 -0
  607. package/dist/src/telemetry/uiTelemetry.js.map +1 -1
  608. package/dist/src/telemetry/uiTelemetry.test.js +4 -0
  609. package/dist/src/telemetry/uiTelemetry.test.js.map +1 -1
  610. package/dist/src/test-utils/mock-message-bus.d.ts +1 -0
  611. package/dist/src/test-utils/mock-message-bus.js +29 -0
  612. package/dist/src/test-utils/mock-message-bus.js.map +1 -1
  613. package/dist/src/test-utils/mock-tool.d.ts +5 -3
  614. package/dist/src/test-utils/mock-tool.js +11 -10
  615. package/dist/src/test-utils/mock-tool.js.map +1 -1
  616. package/dist/src/tools/activate-skill.d.ts +27 -0
  617. package/dist/src/tools/activate-skill.js +133 -0
  618. package/dist/src/tools/activate-skill.js.map +1 -0
  619. package/dist/src/tools/activate-skill.test.d.ts +6 -0
  620. package/dist/src/tools/activate-skill.test.js +113 -0
  621. package/dist/src/tools/activate-skill.test.js.map +1 -0
  622. package/dist/src/tools/confirmation-policy.test.d.ts +6 -0
  623. package/dist/src/tools/confirmation-policy.test.js +143 -0
  624. package/dist/src/tools/confirmation-policy.test.js.map +1 -0
  625. package/dist/src/tools/edit.d.ts +27 -5
  626. package/dist/src/tools/edit.js +460 -136
  627. package/dist/src/tools/edit.js.map +1 -1
  628. package/dist/src/tools/edit.test.js +292 -526
  629. package/dist/src/tools/edit.test.js.map +1 -1
  630. package/dist/src/tools/get-internal-docs.d.ts +27 -0
  631. package/dist/src/tools/get-internal-docs.js +122 -0
  632. package/dist/src/tools/get-internal-docs.js.map +1 -0
  633. package/dist/src/tools/get-internal-docs.test.d.ts +6 -0
  634. package/dist/src/tools/get-internal-docs.test.js +57 -0
  635. package/dist/src/tools/get-internal-docs.test.js.map +1 -0
  636. package/dist/src/tools/glob.d.ts +2 -2
  637. package/dist/src/tools/glob.js +1 -1
  638. package/dist/src/tools/glob.js.map +1 -1
  639. package/dist/src/tools/glob.test.js +2 -1
  640. package/dist/src/tools/glob.test.js.map +1 -1
  641. package/dist/src/tools/grep.d.ts +2 -2
  642. package/dist/src/tools/grep.js +1 -1
  643. package/dist/src/tools/grep.js.map +1 -1
  644. package/dist/src/tools/grep.test.js +5 -4
  645. package/dist/src/tools/grep.test.js.map +1 -1
  646. package/dist/src/tools/ls.d.ts +2 -2
  647. package/dist/src/tools/ls.js +2 -2
  648. package/dist/src/tools/ls.js.map +1 -1
  649. package/dist/src/tools/ls.test.js +2 -1
  650. package/dist/src/tools/ls.test.js.map +1 -1
  651. package/dist/src/tools/mcp-client-manager.d.ts +2 -1
  652. package/dist/src/tools/mcp-client-manager.js +32 -9
  653. package/dist/src/tools/mcp-client-manager.js.map +1 -1
  654. package/dist/src/tools/mcp-client-manager.test.js +41 -10
  655. package/dist/src/tools/mcp-client-manager.test.js.map +1 -1
  656. package/dist/src/tools/mcp-client.d.ts +43 -6
  657. package/dist/src/tools/mcp-client.js +443 -176
  658. package/dist/src/tools/mcp-client.js.map +1 -1
  659. package/dist/src/tools/mcp-client.test.js +664 -39
  660. package/dist/src/tools/mcp-client.test.js.map +1 -1
  661. package/dist/src/tools/mcp-tool.d.ts +20 -5
  662. package/dist/src/tools/mcp-tool.js +21 -8
  663. package/dist/src/tools/mcp-tool.js.map +1 -1
  664. package/dist/src/tools/mcp-tool.test.js +35 -5
  665. package/dist/src/tools/mcp-tool.test.js.map +1 -1
  666. package/dist/src/tools/memoryTool.d.ts +3 -3
  667. package/dist/src/tools/memoryTool.js +3 -4
  668. package/dist/src/tools/memoryTool.js.map +1 -1
  669. package/dist/src/tools/memoryTool.test.js +5 -2
  670. package/dist/src/tools/memoryTool.test.js.map +1 -1
  671. package/dist/src/tools/message-bus-integration.test.js +10 -37
  672. package/dist/src/tools/message-bus-integration.test.js.map +1 -1
  673. package/dist/src/tools/modifiable-tool.js.map +1 -1
  674. package/dist/src/tools/modifiable-tool.test.js +22 -13
  675. package/dist/src/tools/modifiable-tool.test.js.map +1 -1
  676. package/dist/src/tools/read-file.d.ts +2 -2
  677. package/dist/src/tools/read-file.js +2 -2
  678. package/dist/src/tools/read-file.js.map +1 -1
  679. package/dist/src/tools/read-file.test.js +3 -2
  680. package/dist/src/tools/read-file.test.js.map +1 -1
  681. package/dist/src/tools/read-many-files.d.ts +2 -2
  682. package/dist/src/tools/read-many-files.js +7 -6
  683. package/dist/src/tools/read-many-files.js.map +1 -1
  684. package/dist/src/tools/read-many-files.test.js +4 -3
  685. package/dist/src/tools/read-many-files.test.js.map +1 -1
  686. package/dist/src/tools/ripGrep.d.ts +3 -2
  687. package/dist/src/tools/ripGrep.js +18 -7
  688. package/dist/src/tools/ripGrep.js.map +1 -1
  689. package/dist/src/tools/ripGrep.test.js +60 -4
  690. package/dist/src/tools/ripGrep.test.js.map +1 -1
  691. package/dist/src/tools/shell.d.ts +5 -7
  692. package/dist/src/tools/shell.js +35 -49
  693. package/dist/src/tools/shell.js.map +1 -1
  694. package/dist/src/tools/shell.test.js +36 -59
  695. package/dist/src/tools/shell.test.js.map +1 -1
  696. package/dist/src/tools/tool-error.d.ts +6 -1
  697. package/dist/src/tools/tool-error.js +6 -0
  698. package/dist/src/tools/tool-error.js.map +1 -1
  699. package/dist/src/tools/tool-names.d.ts +17 -0
  700. package/dist/src/tools/tool-names.js +59 -0
  701. package/dist/src/tools/tool-names.js.map +1 -1
  702. package/dist/src/tools/tool-names.test.d.ts +6 -0
  703. package/dist/src/tools/tool-names.test.js +43 -0
  704. package/dist/src/tools/tool-names.test.js.map +1 -0
  705. package/dist/src/tools/tool-registry.d.ts +11 -7
  706. package/dist/src/tools/tool-registry.js +15 -10
  707. package/dist/src/tools/tool-registry.js.map +1 -1
  708. package/dist/src/tools/tool-registry.test.js +16 -11
  709. package/dist/src/tools/tool-registry.test.js.map +1 -1
  710. package/dist/src/tools/tools.d.ts +27 -6
  711. package/dist/src/tools/tools.js +44 -25
  712. package/dist/src/tools/tools.js.map +1 -1
  713. package/dist/src/tools/tools.test.js +3 -1
  714. package/dist/src/tools/tools.test.js.map +1 -1
  715. package/dist/src/tools/web-fetch.d.ts +2 -2
  716. package/dist/src/tools/web-fetch.js +21 -8
  717. package/dist/src/tools/web-fetch.js.map +1 -1
  718. package/dist/src/tools/web-fetch.test.js +18 -19
  719. package/dist/src/tools/web-fetch.test.js.map +1 -1
  720. package/dist/src/tools/web-search.d.ts +2 -2
  721. package/dist/src/tools/web-search.js +5 -5
  722. package/dist/src/tools/web-search.js.map +1 -1
  723. package/dist/src/tools/web-search.test.js +2 -1
  724. package/dist/src/tools/web-search.test.js.map +1 -1
  725. package/dist/src/tools/write-file.d.ts +2 -2
  726. package/dist/src/tools/write-file.js +14 -6
  727. package/dist/src/tools/write-file.js.map +1 -1
  728. package/dist/src/tools/write-file.test.js +49 -7
  729. package/dist/src/tools/write-file.test.js.map +1 -1
  730. package/dist/src/tools/write-todos.d.ts +2 -2
  731. package/dist/src/tools/write-todos.js +5 -4
  732. package/dist/src/tools/write-todos.js.map +1 -1
  733. package/dist/src/tools/write-todos.test.js +2 -1
  734. package/dist/src/tools/write-todos.test.js.map +1 -1
  735. package/dist/src/utils/apiConversionUtils.d.ts +12 -0
  736. package/dist/src/utils/apiConversionUtils.js +46 -0
  737. package/dist/src/utils/apiConversionUtils.js.map +1 -0
  738. package/dist/src/utils/apiConversionUtils.test.d.ts +6 -0
  739. package/dist/src/utils/apiConversionUtils.test.js +150 -0
  740. package/dist/src/utils/apiConversionUtils.test.js.map +1 -0
  741. package/dist/src/utils/bfsFileSearch.d.ts +8 -0
  742. package/dist/src/utils/bfsFileSearch.js +63 -23
  743. package/dist/src/utils/bfsFileSearch.js.map +1 -1
  744. package/dist/src/utils/bfsFileSearch.test.js +65 -1
  745. package/dist/src/utils/bfsFileSearch.test.js.map +1 -1
  746. package/dist/src/utils/checkpointUtils.d.ts +82 -0
  747. package/dist/src/utils/checkpointUtils.js +117 -0
  748. package/dist/src/utils/checkpointUtils.js.map +1 -0
  749. package/dist/src/utils/checkpointUtils.test.d.ts +6 -0
  750. package/dist/src/utils/checkpointUtils.test.js +229 -0
  751. package/dist/src/utils/checkpointUtils.test.js.map +1 -0
  752. package/dist/src/utils/debugLogger.d.ts +3 -0
  753. package/dist/src/utils/debugLogger.js +28 -0
  754. package/dist/src/utils/debugLogger.js.map +1 -1
  755. package/dist/src/utils/editCorrector.d.ts +3 -3
  756. package/dist/src/utils/editCorrector.js +27 -10
  757. package/dist/src/utils/editCorrector.js.map +1 -1
  758. package/dist/src/utils/editCorrector.test.js +27 -23
  759. package/dist/src/utils/editCorrector.test.js.map +1 -1
  760. package/dist/src/utils/editor.d.ts +10 -1
  761. package/dist/src/utils/editor.js +48 -19
  762. package/dist/src/utils/editor.js.map +1 -1
  763. package/dist/src/utils/editor.test.js +27 -4
  764. package/dist/src/utils/editor.test.js.map +1 -1
  765. package/dist/src/utils/environmentContext.d.ts +1 -0
  766. package/dist/src/utils/environmentContext.js +4 -0
  767. package/dist/src/utils/environmentContext.js.map +1 -1
  768. package/dist/src/utils/environmentContext.test.js +2 -0
  769. package/dist/src/utils/environmentContext.test.js.map +1 -1
  770. package/dist/src/utils/errorReporting.d.ts +1 -1
  771. package/dist/src/utils/errorReporting.js +13 -12
  772. package/dist/src/utils/errorReporting.js.map +1 -1
  773. package/dist/src/utils/errorReporting.test.js +17 -14
  774. package/dist/src/utils/errorReporting.test.js.map +1 -1
  775. package/dist/src/utils/errors.d.ts +8 -0
  776. package/dist/src/utils/errors.js +39 -2
  777. package/dist/src/utils/errors.js.map +1 -1
  778. package/dist/src/utils/errors.test.d.ts +6 -0
  779. package/dist/src/utils/errors.test.js +155 -0
  780. package/dist/src/utils/errors.test.js.map +1 -0
  781. package/dist/src/utils/events.d.ts +71 -19
  782. package/dist/src/utils/events.js +35 -9
  783. package/dist/src/utils/events.js.map +1 -1
  784. package/dist/src/utils/events.test.js +25 -0
  785. package/dist/src/utils/events.test.js.map +1 -1
  786. package/dist/src/utils/extensionLoader.d.ts +2 -2
  787. package/dist/src/utils/extensionLoader.js +5 -6
  788. package/dist/src/utils/extensionLoader.js.map +1 -1
  789. package/dist/src/utils/extensionLoader.test.js +11 -0
  790. package/dist/src/utils/extensionLoader.test.js.map +1 -1
  791. package/dist/src/utils/fetch.d.ts +1 -1
  792. package/dist/src/utils/fetch.js +3 -3
  793. package/dist/src/utils/fetch.js.map +1 -1
  794. package/dist/src/utils/fileDiffUtils.d.ts +18 -0
  795. package/dist/src/utils/fileDiffUtils.js +37 -0
  796. package/dist/src/utils/fileDiffUtils.js.map +1 -0
  797. package/dist/src/utils/fileDiffUtils.test.d.ts +6 -0
  798. package/dist/src/utils/fileDiffUtils.test.js +84 -0
  799. package/dist/src/utils/fileDiffUtils.test.js.map +1 -0
  800. package/dist/src/utils/fileUtils.d.ts +4 -0
  801. package/dist/src/utils/fileUtils.js +53 -0
  802. package/dist/src/utils/fileUtils.js.map +1 -1
  803. package/dist/src/utils/fileUtils.test.js +127 -1
  804. package/dist/src/utils/fileUtils.test.js.map +1 -1
  805. package/dist/src/utils/filesearch/crawlCache.js.map +1 -1
  806. package/dist/src/utils/filesearch/fileSearch.js.map +1 -1
  807. package/dist/src/utils/flashFallback.test.js +1 -1
  808. package/dist/src/utils/flashFallback.test.js.map +1 -1
  809. package/dist/src/utils/geminiIgnoreParser.d.ts +11 -0
  810. package/dist/src/utils/geminiIgnoreParser.js +20 -0
  811. package/dist/src/utils/geminiIgnoreParser.js.map +1 -1
  812. package/dist/src/utils/geminiIgnoreParser.test.js +48 -0
  813. package/dist/src/utils/geminiIgnoreParser.test.js.map +1 -1
  814. package/dist/src/utils/generateContentResponseUtilities.d.ts +3 -1
  815. package/dist/src/utils/generateContentResponseUtilities.js +106 -0
  816. package/dist/src/utils/generateContentResponseUtilities.js.map +1 -1
  817. package/dist/src/utils/generateContentResponseUtilities.test.js +279 -2
  818. package/dist/src/utils/generateContentResponseUtilities.test.js.map +1 -1
  819. package/dist/src/utils/getFolderStructure.js +7 -2
  820. package/dist/src/utils/getFolderStructure.js.map +1 -1
  821. package/dist/src/utils/gitIgnoreParser.js +9 -10
  822. package/dist/src/utils/gitIgnoreParser.js.map +1 -1
  823. package/dist/src/utils/googleErrors.js +31 -18
  824. package/dist/src/utils/googleErrors.js.map +1 -1
  825. package/dist/src/utils/googleErrors.test.js +10 -2
  826. package/dist/src/utils/googleErrors.test.js.map +1 -1
  827. package/dist/src/utils/googleQuotaErrors.d.ts +3 -3
  828. package/dist/src/utils/googleQuotaErrors.js +32 -6
  829. package/dist/src/utils/googleQuotaErrors.js.map +1 -1
  830. package/dist/src/utils/googleQuotaErrors.test.js +94 -2
  831. package/dist/src/utils/googleQuotaErrors.test.js.map +1 -1
  832. package/dist/src/utils/installationManager.test.js +11 -3
  833. package/dist/src/utils/installationManager.test.js.map +1 -1
  834. package/dist/src/utils/memoryDiscovery.js +3 -4
  835. package/dist/src/utils/memoryDiscovery.js.map +1 -1
  836. package/dist/src/utils/memoryDiscovery.test.js +12 -1
  837. package/dist/src/utils/memoryDiscovery.test.js.map +1 -1
  838. package/dist/src/utils/nextSpeakerChecker.test.js +4 -0
  839. package/dist/src/utils/nextSpeakerChecker.test.js.map +1 -1
  840. package/dist/src/utils/partUtils.js +1 -1
  841. package/dist/src/utils/partUtils.js.map +1 -1
  842. package/dist/src/utils/pathCorrector.js +12 -2
  843. package/dist/src/utils/pathCorrector.js.map +1 -1
  844. package/dist/src/utils/pathCorrector.test.js +6 -2
  845. package/dist/src/utils/pathCorrector.test.js.map +1 -1
  846. package/dist/src/utils/paths.d.ts +10 -0
  847. package/dist/src/utils/paths.js +20 -1
  848. package/dist/src/utils/paths.js.map +1 -1
  849. package/dist/src/utils/retry.d.ts +12 -0
  850. package/dist/src/utils/retry.js +70 -17
  851. package/dist/src/utils/retry.js.map +1 -1
  852. package/dist/src/utils/retry.test.js +181 -21
  853. package/dist/src/utils/retry.test.js.map +1 -1
  854. package/dist/src/utils/shell-utils.d.ts +16 -47
  855. package/dist/src/utils/shell-utils.js +98 -194
  856. package/dist/src/utils/shell-utils.js.map +1 -1
  857. package/dist/src/utils/shell-utils.test.js +99 -288
  858. package/dist/src/utils/shell-utils.test.js.map +1 -1
  859. package/dist/src/utils/summarizer.test.js +3 -2
  860. package/dist/src/utils/summarizer.test.js.map +1 -1
  861. package/dist/src/utils/terminal.d.ts +4 -0
  862. package/dist/src/utils/terminal.js +12 -0
  863. package/dist/src/utils/terminal.js.map +1 -1
  864. package/dist/src/utils/terminalSerializer.test.js +17 -0
  865. package/dist/src/utils/terminalSerializer.test.js.map +1 -1
  866. package/dist/src/utils/tokenCalculation.js +20 -5
  867. package/dist/src/utils/tokenCalculation.js.map +1 -1
  868. package/dist/src/utils/tokenCalculation.test.js +11 -2
  869. package/dist/src/utils/tokenCalculation.test.js.map +1 -1
  870. package/dist/src/utils/tool-utils.d.ts +9 -0
  871. package/dist/src/utils/tool-utils.js +29 -0
  872. package/dist/src/utils/tool-utils.js.map +1 -1
  873. package/dist/src/utils/tool-utils.test.js +17 -2
  874. package/dist/src/utils/tool-utils.test.js.map +1 -1
  875. package/dist/src/utils/userAccountManager.test.js +5 -5
  876. package/dist/src/utils/userAccountManager.test.js.map +1 -1
  877. package/dist/src/utils/version.d.ts +6 -0
  878. package/dist/src/utils/version.js +15 -0
  879. package/dist/src/utils/version.js.map +1 -0
  880. package/dist/src/utils/version.test.d.ts +6 -0
  881. package/dist/src/utils/version.test.js +39 -0
  882. package/dist/src/utils/version.test.js.map +1 -0
  883. package/dist/src/utils/workspaceContext.test.js +1 -1
  884. package/dist/src/utils/workspaceContext.test.js.map +1 -1
  885. package/dist/tsconfig.tsbuildinfo +1 -1
  886. package/package.json +8 -6
  887. package/dist/src/agents/executor.js.map +0 -1
  888. package/dist/src/agents/executor.test.js.map +0 -1
  889. package/dist/src/agents/invocation.js.map +0 -1
  890. package/dist/src/agents/invocation.test.js.map +0 -1
  891. package/dist/src/tools/smart-edit.d.ts +0 -78
  892. package/dist/src/tools/smart-edit.js +0 -717
  893. package/dist/src/tools/smart-edit.js.map +0 -1
  894. package/dist/src/tools/smart-edit.test.js +0 -592
  895. package/dist/src/tools/smart-edit.test.js.map +0 -1
  896. /package/dist/src/agents/{executor.test.d.ts → a2a-client-manager.test.d.ts} +0 -0
  897. /package/dist/src/agents/{invocation.test.d.ts → a2aUtils.test.d.ts} +0 -0
  898. /package/dist/src/{tools/smart-edit.test.d.ts → agents/agentLoader.test.d.ts} +0 -0
@@ -0,0 +1,267 @@
1
+ # Cell CLI companion plugin: Interface specification
2
+
3
+ > Last Updated: September 15, 2025
4
+
5
+ This document defines the contract for building a companion plugin to enable
6
+ Cell CLI's IDE mode. For VS Code, these features (native diffing, context
7
+ awareness) are provided by the official extension
8
+ ([marketplace](https://marketplace.visualstudio.com/items?itemName=Google.cell-cli-cli-vscode-ide-companion)).
9
+ This specification is for contributors who wish to bring similar functionality
10
+ to other editors like JetBrains IDEs, Sublime Text, etc.
11
+
12
+ ## I. The communication interface
13
+
14
+ Cell CLI and the IDE plugin communicate through a local communication channel.
15
+
16
+ ### 1. Transport layer: MCP over HTTP
17
+
18
+ The plugin **MUST** run a local HTTP server that implements the **Model Context
19
+ Protocol (MCP)**.
20
+
21
+ - **Protocol:** The server must be a valid MCP server. We recommend using an
22
+ existing MCP SDK for your language of choice if available.
23
+ - **Endpoint:** The server should expose a single endpoint (e.g., `/mcp`) for
24
+ all MCP communication.
25
+ - **Port:** The server **MUST** listen on a dynamically assigned port (i.e.,
26
+ listen on port `0`).
27
+
28
+ ### 2. Discovery mechanism: The port file
29
+
30
+ For Cell CLI to connect, it needs to discover which IDE instance it's running in
31
+ and what port your server is using. The plugin **MUST** facilitate this by
32
+ creating a "discovery file."
33
+
34
+ - **How the CLI finds the file:** The CLI determines the Process ID (PID) of the
35
+ IDE it's running in by traversing the process tree. It then looks for a
36
+ discovery file that contains this PID in its name.
37
+ - **File location:** The file must be created in a specific directory:
38
+ `os.tmpdir()/gemini/ide/`. Your plugin must create this directory if it
39
+ doesn't exist.
40
+ - **File naming convention:** The filename is critical and **MUST** follow the
41
+ pattern: `cell-ide-server-${PID}-${PORT}.json`
42
+ - `${PID}`: The process ID of the parent IDE process. Your plugin must
43
+ determine this PID and include it in the filename.
44
+ - `${PORT}`: The port your MCP server is listening on.
45
+ - **File content and workspace validation:** The file **MUST** contain a JSON
46
+ object with the following structure:
47
+
48
+ ```json
49
+ {
50
+ "port": 12345,
51
+ "workspacePath": "/path/to/project1:/path/to/project2",
52
+ "authToken": "a-very-secret-token",
53
+ "ideInfo": {
54
+ "name": "vscode",
55
+ "displayName": "VS Code"
56
+ }
57
+ }
58
+ ```
59
+ - `port` (number, required): The port of the MCP server.
60
+ - `workspacePath` (string, required): A list of all open workspace root paths,
61
+ delimited by the OS-specific path separator (`:` for Linux/macOS, `;` for
62
+ Windows). The CLI uses this path to ensure it's running in the same project
63
+ folder that's open in the IDE. If the CLI's current working directory is not
64
+ a sub-directory of `workspacePath`, the connection will be rejected. Your
65
+ plugin **MUST** provide the correct, absolute path(s) to the root of the
66
+ open workspace(s).
67
+ - `authToken` (string, required): A secret token for securing the connection.
68
+ The CLI will include this token in an `Authorization: Bearer <token>` header
69
+ on all requests.
70
+ - `ideInfo` (object, required): Information about the IDE.
71
+ - `name` (string, required): A short, lowercase identifier for the IDE
72
+ (e.g., `vscode`, `jetbrains`).
73
+ - `displayName` (string, required): A user-friendly name for the IDE (e.g.,
74
+ `VS Code`, `JetBrains IDE`).
75
+
76
+ - **Authentication:** To secure the connection, the plugin **MUST** generate a
77
+ unique, secret token and include it in the discovery file. The CLI will then
78
+ include this token in the `Authorization` header for all requests to the MCP
79
+ server (e.g., `Authorization: Bearer a-very-secret-token`). Your server
80
+ **MUST** validate this token on every request and reject any that are
81
+ unauthorized.
82
+ - **Tie-breaking with environment variables (recommended):** For the most
83
+ reliable experience, your plugin **SHOULD** both create the discovery file and
84
+ set the `CELL_CLI_IDE_SERVER_PORT` environment variable in the integrated
85
+ terminal. The file serves as the primary discovery mechanism, but the
86
+ environment variable is crucial for tie-breaking. If a user has multiple IDE
87
+ windows open for the same workspace, the CLI uses the
88
+ `CELL_CLI_IDE_SERVER_PORT` variable to identify and connect to the correct
89
+ window's server.
90
+
91
+ ## II. The context interface
92
+
93
+ To enable context awareness, the plugin **MAY** provide the CLI with real-time
94
+ information about the user's activity in the IDE.
95
+
96
+ ### `ide/contextUpdate` notification
97
+
98
+ The plugin **MAY** send an `ide/contextUpdate`
99
+ [notification](https://modelcontextprotocol.io/specification/2025-06-18/basic/index#notifications)
100
+ to the CLI whenever the user's context changes.
101
+
102
+ - **Triggering events:** This notification should be sent (with a recommended
103
+ debounce of 50ms) when:
104
+ - A file is opened, closed, or focused.
105
+ - The user's cursor position or text selection changes in the active file.
106
+ - **Payload (`IdeContext`):** The notification parameters **MUST** be an
107
+ `IdeContext` object:
108
+
109
+ ```typescript
110
+ interface IdeContext {
111
+ workspaceState?: {
112
+ openFiles?: File[];
113
+ isTrusted?: boolean;
114
+ };
115
+ }
116
+
117
+ interface File {
118
+ // Absolute path to the file
119
+ path: string;
120
+ // Last focused Unix timestamp (for ordering)
121
+ timestamp: number;
122
+ // True if this is the currently focused file
123
+ isActive?: boolean;
124
+ cursor?: {
125
+ // 1-based line number
126
+ line: number;
127
+ // 1-based character number
128
+ character: number;
129
+ };
130
+ // The text currently selected by the user
131
+ selectedText?: string;
132
+ }
133
+ ```
134
+
135
+ **Note:** The `openFiles` list should only include files that exist on disk.
136
+ Virtual files (e.g., unsaved files without a path, editor settings pages)
137
+ **MUST** be excluded.
138
+
139
+ ### How the CLI uses this context
140
+
141
+ After receiving the `IdeContext` object, the CLI performs several normalization
142
+ and truncation steps before sending the information to the model.
143
+
144
+ - **File ordering:** The CLI uses the `timestamp` field to determine the most
145
+ recently used files. It sorts the `openFiles` list based on this value.
146
+ Therefore, your plugin **MUST** provide an accurate Unix timestamp for when a
147
+ file was last focused.
148
+ - **Active file:** The CLI considers only the most recent file (after sorting)
149
+ to be the "active" file. It will ignore the `isActive` flag on all other files
150
+ and clear their `cursor` and `selectedText` fields. Your plugin should focus
151
+ on setting `isActive: true` and providing cursor/selection details only for
152
+ the currently focused file.
153
+ - **Truncation:** To manage token limits, the CLI truncates both the file list
154
+ (to 10 files) and the `selectedText` (to 16KB).
155
+
156
+ While the CLI handles the final truncation, it is highly recommended that your
157
+ plugin also limits the amount of context it sends.
158
+
159
+ ## III. The diffing interface
160
+
161
+ To enable interactive code modifications, the plugin **MAY** expose a diffing
162
+ interface. This allows the CLI to request that the IDE open a diff view, showing
163
+ proposed changes to a file. The user can then review, edit, and ultimately
164
+ accept or reject these changes directly within the IDE.
165
+
166
+ ### `openDiff` tool
167
+
168
+ The plugin **MUST** register an `openDiff` tool on its MCP server.
169
+
170
+ - **Description:** This tool instructs the IDE to open a modifiable diff view
171
+ for a specific file.
172
+ - **Request (`OpenDiffRequest`):** The tool is invoked via a `tools/call`
173
+ request. The `arguments` field within the request's `params` **MUST** be an
174
+ `OpenDiffRequest` object.
175
+
176
+ ```typescript
177
+ interface OpenDiffRequest {
178
+ // The absolute path to the file to be diffed.
179
+ filePath: string;
180
+ // The proposed new content for the file.
181
+ newContent: string;
182
+ }
183
+ ```
184
+
185
+ - **Response (`CallToolResult`):** The tool **MUST** immediately return a
186
+ `CallToolResult` to acknowledge the request and report whether the diff view
187
+ was successfully opened.
188
+ - On Success: If the diff view was opened successfully, the response **MUST**
189
+ contain empty content (i.e., `content: []`).
190
+ - On Failure: If an error prevented the diff view from opening, the response
191
+ **MUST** have `isError: true` and include a `TextContent` block in the
192
+ `content` array describing the error.
193
+
194
+ The actual outcome of the diff (acceptance or rejection) is communicated
195
+ asynchronously via notifications.
196
+
197
+ ### `closeDiff` tool
198
+
199
+ The plugin **MUST** register a `closeDiff` tool on its MCP server.
200
+
201
+ - **Description:** This tool instructs the IDE to close an open diff view for a
202
+ specific file.
203
+ - **Request (`CloseDiffRequest`):** The tool is invoked via a `tools/call`
204
+ request. The `arguments` field within the request's `params` **MUST** be an
205
+ `CloseDiffRequest` object.
206
+
207
+ ```typescript
208
+ interface CloseDiffRequest {
209
+ // The absolute path to the file whose diff view should be closed.
210
+ filePath: string;
211
+ }
212
+ ```
213
+
214
+ - **Response (`CallToolResult`):** The tool **MUST** return a `CallToolResult`.
215
+ - On Success: If the diff view was closed successfully, the response **MUST**
216
+ include a single **TextContent** block in the content array containing the
217
+ file's final content before closing.
218
+ - On Failure: If an error prevented the diff view from closing, the response
219
+ **MUST** have `isError: true` and include a `TextContent` block in the
220
+ `content` array describing the error.
221
+
222
+ ### `ide/diffAccepted` notification
223
+
224
+ When the user accepts the changes in a diff view (e.g., by clicking an "Apply"
225
+ or "Save" button), the plugin **MUST** send an `ide/diffAccepted` notification
226
+ to the CLI.
227
+
228
+ - **Payload:** The notification parameters **MUST** include the file path and
229
+ the final content of the file. The content may differ from the original
230
+ `newContent` if the user made manual edits in the diff view.
231
+
232
+ ```typescript
233
+ {
234
+ // The absolute path to the file that was diffed.
235
+ filePath: string;
236
+ // The full content of the file after acceptance.
237
+ content: string;
238
+ }
239
+ ```
240
+
241
+ ### `ide/diffRejected` notification
242
+
243
+ When the user rejects the changes (e.g., by closing the diff view without
244
+ accepting), the plugin **MUST** send an `ide/diffRejected` notification to the
245
+ CLI.
246
+
247
+ - **Payload:** The notification parameters **MUST** include the file path of the
248
+ rejected diff.
249
+
250
+ ```typescript
251
+ {
252
+ // The absolute path to the file that was diffed.
253
+ filePath: string;
254
+ }
255
+ ```
256
+
257
+ ## IV. The lifecycle interface
258
+
259
+ The plugin **MUST** manage its resources and the discovery file correctly based
260
+ on the IDE's lifecycle.
261
+
262
+ - **On activation (IDE startup/plugin enabled):**
263
+ 1. Start the MCP server.
264
+ 2. Create the discovery file.
265
+ - **On deactivation (IDE shutdown/plugin disabled):**
266
+ 1. Stop the MCP server.
267
+ 2. Delete the discovery file.
@@ -0,0 +1,201 @@
1
+ # IDE integration
2
+
3
+ Cell CLI can integrate with your IDE to provide a more seamless and
4
+ context-aware experience. This integration allows the CLI to understand your
5
+ workspace better and enables powerful features like native in-editor diffing.
6
+
7
+ Currently, the supported IDEs are [Antigravity](https://antigravity.google),
8
+ [Visual Studio Code](https://code.visualstudio.com/), and other editors that
9
+ support VS Code extensions. To build support for other editors, see the
10
+ [IDE Companion Extension Spec](./ide-companion-spec.md).
11
+
12
+ ## Features
13
+
14
+ - **Workspace context:** The CLI automatically gains awareness of your workspace
15
+ to provide more relevant and accurate responses. This context includes:
16
+ - The **10 most recently accessed files** in your workspace.
17
+ - Your active cursor position.
18
+ - Any text you have selected (up to a 16KB limit; longer selections will be
19
+ truncated).
20
+
21
+ - **Native diffing:** When Gemini suggests code modifications, you can view the
22
+ changes directly within your IDE's native diff viewer. This allows you to
23
+ review, edit, and accept or reject the suggested changes seamlessly.
24
+
25
+ - **VS Code commands:** You can access Cell CLI features directly from the VS
26
+ Code Command Palette (`Cmd+Shift+P` or `Ctrl+Shift+P`):
27
+ - `Cell CLI: Run`: Starts a new Cell CLI session in the integrated terminal.
28
+ - `Cell CLI: Accept Diff`: Accepts the changes in the active diff editor.
29
+ - `Cell CLI: Close Diff Editor`: Rejects the changes and closes the active
30
+ diff editor.
31
+ - `Cell CLI: View Third-Party Notices`: Displays the third-party notices for
32
+ the extension.
33
+
34
+ ## Installation and setup
35
+
36
+ There are three ways to set up the IDE integration:
37
+
38
+ ### 1. Automatic nudge (recommended)
39
+
40
+ When you run Cell CLI inside a supported editor, it will automatically detect
41
+ your environment and prompt you to connect. Answering "Yes" will automatically
42
+ run the necessary setup, which includes installing the companion extension and
43
+ enabling the connection.
44
+
45
+ ### 2. Manual installation from CLI
46
+
47
+ If you previously dismissed the prompt or want to install the extension
48
+ manually, you can run the following command inside Cell CLI:
49
+
50
+ ```
51
+ /ide install
52
+ ```
53
+
54
+ This will find the correct extension for your IDE and install it.
55
+
56
+ ### 3. Manual installation from a marketplace
57
+
58
+ You can also install the extension directly from a marketplace.
59
+
60
+ - **For Visual Studio Code:** Install from the
61
+ [VS Code Marketplace](https://marketplace.visualstudio.com/items?itemName=google.cell-cli-vscode-ide-companion).
62
+ - **For VS Code forks:** To support forks of VS Code, the extension is also
63
+ published on the
64
+ [Open VSX Registry](https://open-vsx.org/extension/google/cell-cli-vscode-ide-companion).
65
+ Follow your editor's instructions for installing extensions from this
66
+ registry.
67
+
68
+ > NOTE: The "Cell CLI Companion" extension may appear towards the bottom of
69
+ > search results. If you don't see it immediately, try scrolling down or sorting
70
+ > by "Newly Published".
71
+ >
72
+ > After manually installing the extension, you must run `/ide enable` in the CLI
73
+ > to activate the integration.
74
+
75
+ ## Usage
76
+
77
+ ### Enabling and disabling
78
+
79
+ You can control the IDE integration from within the CLI:
80
+
81
+ - To enable the connection to the IDE, run:
82
+ ```
83
+ /ide enable
84
+ ```
85
+ - To disable the connection, run:
86
+ ```
87
+ /ide disable
88
+ ```
89
+
90
+ When enabled, Cell CLI will automatically attempt to connect to the IDE
91
+ companion extension.
92
+
93
+ ### Checking the status
94
+
95
+ To check the connection status and see the context the CLI has received from the
96
+ IDE, run:
97
+
98
+ ```
99
+ /ide status
100
+ ```
101
+
102
+ If connected, this command will show the IDE it's connected to and a list of
103
+ recently opened files it is aware of.
104
+
105
+ > [!NOTE] The file list is limited to 10 recently accessed files within your
106
+ > workspace and only includes local files on disk.)
107
+
108
+ ### Working with diffs
109
+
110
+ When you ask Gemini to modify a file, it can open a diff view directly in your
111
+ editor.
112
+
113
+ **To accept a diff**, you can perform any of the following actions:
114
+
115
+ - Click the **checkmark icon** in the diff editor's title bar.
116
+ - Save the file (e.g., with `Cmd+S` or `Ctrl+S`).
117
+ - Open the Command Palette and run **Cell CLI: Accept Diff**.
118
+ - Respond with `yes` in the CLI when prompted.
119
+
120
+ **To reject a diff**, you can:
121
+
122
+ - Click the **'x' icon** in the diff editor's title bar.
123
+ - Close the diff editor tab.
124
+ - Open the Command Palette and run **Cell CLI: Close Diff Editor**.
125
+ - Respond with `no` in the CLI when prompted.
126
+
127
+ You can also **modify the suggested changes** directly in the diff view before
128
+ accepting them.
129
+
130
+ If you select ‘Allow for this session’ in the CLI, changes will no longer show
131
+ up in the IDE as they will be auto-accepted.
132
+
133
+ ## Using with sandboxing
134
+
135
+ If you are using Cell CLI within a sandbox, please be aware of the following:
136
+
137
+ - **On macOS:** The IDE integration requires network access to communicate with
138
+ the IDE companion extension. You must use a Seatbelt profile that allows
139
+ network access.
140
+ - **In a Docker container:** If you run Cell CLI inside a Docker (or Podman)
141
+ container, the IDE integration can still connect to the VS Code extension
142
+ running on your host machine. The CLI is configured to automatically find the
143
+ IDE server on `host.docker.internal`. No special configuration is usually
144
+ required, but you may need to ensure your Docker networking setup allows
145
+ connections from the container to the host.
146
+
147
+ ## Troubleshooting
148
+
149
+ If you encounter issues with IDE integration, here are some common error
150
+ messages and how to resolve them.
151
+
152
+ ### Connection errors
153
+
154
+ - **Message:**
155
+ `🔴 Disconnected: Failed to connect to IDE companion extension in [IDE Name]. Please ensure the extension is running. To install the extension, run /ide install.`
156
+ - **Cause:** Cell CLI could not find the necessary environment variables
157
+ (`CELL_CLI_IDE_WORKSPACE_PATH` or `CELL_CLI_IDE_SERVER_PORT`) to connect to
158
+ the IDE. This usually means the IDE companion extension is not running or
159
+ did not initialize correctly.
160
+ - **Solution:**
161
+ 1. Make sure you have installed the **Cell CLI Companion** extension in
162
+ your IDE and that it is enabled.
163
+ 2. Open a new terminal window in your IDE to ensure it picks up the correct
164
+ environment.
165
+
166
+ - **Message:**
167
+ `🔴 Disconnected: IDE connection error. The connection was lost unexpectedly. Please try reconnecting by running /ide enable`
168
+ - **Cause:** The connection to the IDE companion was lost.
169
+ - **Solution:** Run `/ide enable` to try and reconnect. If the issue
170
+ continues, open a new terminal window or restart your IDE.
171
+
172
+ ### Configuration errors
173
+
174
+ - **Message:**
175
+ `🔴 Disconnected: Directory mismatch. Cell CLI is running in a different location than the open workspace in [IDE Name]. Please run the CLI from one of the following directories: [List of directories]`
176
+ - **Cause:** The CLI's current working directory is outside the workspace you
177
+ have open in your IDE.
178
+ - **Solution:** `cd` into the same directory that is open in your IDE and
179
+ restart the CLI.
180
+
181
+ - **Message:**
182
+ `🔴 Disconnected: To use this feature, please open a workspace folder in [IDE Name] and try again.`
183
+ - **Cause:** You have no workspace open in your IDE.
184
+ - **Solution:** Open a workspace in your IDE and restart the CLI.
185
+
186
+ ### General errors
187
+
188
+ - **Message:**
189
+ `IDE integration is not supported in your current environment. To use this feature, run Cell CLI in one of these supported IDEs: [List of IDEs]`
190
+ - **Cause:** You are running Cell CLI in a terminal or environment that is not
191
+ a supported IDE.
192
+ - **Solution:** Run Cell CLI from the integrated terminal of a supported IDE,
193
+ like Antigravity or VS Code.
194
+
195
+ - **Message:**
196
+ `No installer is available for IDE. Please install the Cell CLI Companion extension manually from the marketplace.`
197
+ - **Cause:** You ran `/ide install`, but the CLI does not have an automated
198
+ installer for your specific IDE.
199
+ - **Solution:** Open your IDE's extension marketplace, search for "Cell CLI
200
+ Companion", and
201
+ [install it manually](#3-manual-installation-from-a-marketplace).
@@ -0,0 +1,147 @@
1
+ # Welcome to Cell CLI documentation
2
+
3
+ This documentation provides a comprehensive guide to installing, using, and
4
+ developing Cell CLI, a tool that lets you interact with Gemini models through a
5
+ command-line interface.
6
+
7
+ ## Cell CLI overview
8
+
9
+ Cell CLI brings the capabilities of Gemini models to your terminal in an
10
+ interactive Read-Eval-Print Loop (REPL) environment. Cell CLI consists of a
11
+ client-side application (`packages/cli`) that communicates with a local server
12
+ (`packages/core`), which in turn manages requests to the Gemini API and its AI
13
+ models. Cell CLI also contains a variety of tools for tasks such as performing
14
+ file system operations, running shells, and web fetching, which are managed by
15
+ `packages/core`.
16
+
17
+ ## Navigating the documentation
18
+
19
+ This documentation is organized into the following sections:
20
+
21
+ ### Overview
22
+
23
+ - **[Architecture overview](./architecture.md):** Understand the high-level
24
+ design of Cell CLI, including its components and how they interact.
25
+ - **[Contribution guide](../CONTRIBUTING.md):** Information for contributors and
26
+ developers, including setup, building, testing, and coding conventions.
27
+
28
+ ### Get started
29
+
30
+ - **[Cell CLI quickstart](./get-started/index.md):** Let's get started with Cell
31
+ CLI.
32
+ - **[Gemini 3 Pro on Cell CLI](./get-started/gemini-3.md):** Learn how to enable
33
+ and use Gemini 3.
34
+ - **[Authentication](./get-started/authentication.md):** Authenticate to Gemini
35
+ CLI.
36
+ - **[Configuration](./get-started/configuration.md):** Learn how to configure
37
+ the CLI.
38
+ - **[Installation](./get-started/installation.md):** Install and run Cell CLI.
39
+ - **[Examples](./get-started/examples.md):** Example usage of Cell CLI.
40
+
41
+ ### CLI
42
+
43
+ - **[Introduction: Cell CLI](./cli/index.md):** Overview of the command-line
44
+ interface.
45
+ - **[Commands](./cli/commands.md):** Description of available CLI commands.
46
+ - **[Checkpointing](./cli/checkpointing.md):** Documentation for the
47
+ checkpointing feature.
48
+ - **[Custom commands](./cli/custom-commands.md):** Create your own commands and
49
+ shortcuts for frequently used prompts.
50
+ - **[Enterprise](./cli/enterprise.md):** Cell CLI for enterprise.
51
+ - **[Headless mode](./cli/headless.md):** Use Cell CLI programmatically for
52
+ scripting and automation.
53
+ - **[Keyboard shortcuts](./cli/keyboard-shortcuts.md):** A reference for all
54
+ keyboard shortcuts to improve your workflow.
55
+ - **[Model selection](./cli/model.md):** Select the model used to process your
56
+ commands with `/model`.
57
+ - **[Sandbox](./cli/sandbox.md):** Isolate tool execution in a secure,
58
+ containerized environment.
59
+ - **[Settings](./cli/settings.md):** Configure various aspects of the CLI's
60
+ behavior and appearance with `/settings`.
61
+ - **[Telemetry](./cli/telemetry.md):** Overview of telemetry in the CLI.
62
+ - **[Themes](./cli/themes.md):** Themes for Cell CLI.
63
+ - **[Token caching](./cli/token-caching.md):** Token caching and optimization.
64
+ - **[Trusted Folders](./cli/trusted-folders.md):** An overview of the Trusted
65
+ Folders security feature.
66
+ - **[Tutorials](./cli/tutorials.md):** Tutorials for Cell CLI.
67
+ - **[Uninstall](./cli/uninstall.md):** Methods for uninstalling the Cell CLI.
68
+
69
+ ### Core
70
+
71
+ - **[Introduction: Cell CLI core](./core/index.md):** Information about Gemini
72
+ CLI core.
73
+ - **[Memport](./core/memport.md):** Using the Memory Import Processor.
74
+ - **[Tools API](./core/tools-api.md):** Information on how the core manages and
75
+ exposes tools.
76
+ - **[System Prompt Override](./cli/system-prompt.md):** Replace built-in system
77
+ instructions using `CELL_SYSTEM_MD`.
78
+
79
+ - **[Policy Engine](./core/policy-engine.md):** Use the Policy Engine for
80
+ fine-grained control over tool execution.
81
+
82
+ ### Tools
83
+
84
+ - **[Introduction: Cell CLI tools](./tools/index.md):** Information about Cell
85
+ CLI's tools.
86
+ - **[File system tools](./tools/file-system.md):** Documentation for the
87
+ `read_file` and `write_file` tools.
88
+ - **[Shell tool](./tools/shell.md):** Documentation for the `run_shell_command`
89
+ tool.
90
+ - **[Web fetch tool](./tools/web-fetch.md):** Documentation for the `web_fetch`
91
+ tool.
92
+ - **[Web search tool](./tools/web-search.md):** Documentation for the
93
+ `google_web_search` tool.
94
+ - **[Memory tool](./tools/memory.md):** Documentation for the `save_memory`
95
+ tool.
96
+ - **[Todo tool](./tools/todos.md):** Documentation for the `write_todos` tool.
97
+ - **[MCP servers](./tools/mcp-server.md):** Using MCP servers with Cell CLI.
98
+
99
+ ### Extensions
100
+
101
+ - **[Introduction: Extensions](./extensions/index.md):** How to extend the CLI
102
+ with new functionality.
103
+ - **[Get Started with extensions](./extensions/getting-started-extensions.md):**
104
+ Learn how to build your own extension.
105
+ - **[Extension releasing](./extensions/extension-releasing.md):** How to release
106
+ Cell CLI extensions.
107
+
108
+ ### Hooks
109
+
110
+ - **[Hooks](./hooks/index.md):** Intercept and customize Cell CLI behavior at
111
+ key lifecycle points.
112
+ - **[Writing Hooks](./hooks/writing-hooks.md):** Learn how to create your first
113
+ hook with a comprehensive example.
114
+ - **[Best Practices](./hooks/best-practices.md):** Security, performance, and
115
+ debugging guidelines for hooks.
116
+
117
+ ### IDE integration
118
+
119
+ - **[Introduction to IDE integration](./ide-integration/index.md):** Connect the
120
+ CLI to your editor.
121
+ - **[IDE companion extension spec](./ide-integration/ide-companion-spec.md):**
122
+ Spec for building IDE companion extensions.
123
+
124
+ ### Development
125
+
126
+ - **[NPM](./npm.md):** Details on how the project's packages are structured.
127
+ - **[Releases](./releases.md):** Information on the project's releases and
128
+ deployment cadence.
129
+ - **[Changelog](./changelogs/index.md):** Highlights and notable changes to Cell
130
+ CLI.
131
+ - **[Integration tests](./integration-tests.md):** Information about the
132
+ integration testing framework used in this project.
133
+ - **[Issue and PR automation](./issue-and-pr-automation.md):** A detailed
134
+ overview of the automated processes we use to manage and triage issues and
135
+ pull requests.
136
+
137
+ ### Support
138
+
139
+ - **[FAQ](./faq.md):** Frequently asked questions.
140
+ - **[Troubleshooting guide](./troubleshooting.md):** Find solutions to common
141
+ problems.
142
+ - **[Quota and pricing](./quota-and-pricing.md):** Learn about the free tier and
143
+ paid options.
144
+ - **[Terms of service and privacy notice](./tos-privacy.md):** Information on
145
+ the terms of service and privacy notices applicable to your use of Cell CLI.
146
+
147
+ We hope this documentation helps you make the most of Cell CLI!