@google/gemini-cli-core 0.0.3-preview.4

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 (669) hide show
  1. package/LICENSE +202 -0
  2. package/README.md +310 -0
  3. package/dist/.last_build +0 -0
  4. package/dist/google-gemini-cli-core-0.3.0-preview.3.tgz +0 -0
  5. package/dist/index.d.ts +12 -0
  6. package/dist/index.js +13 -0
  7. package/dist/index.js.map +1 -0
  8. package/dist/src/__mocks__/fs/promises.d.ts +11 -0
  9. package/dist/src/__mocks__/fs/promises.js +17 -0
  10. package/dist/src/__mocks__/fs/promises.js.map +1 -0
  11. package/dist/src/code_assist/codeAssist.d.ts +10 -0
  12. package/dist/src/code_assist/codeAssist.js +19 -0
  13. package/dist/src/code_assist/codeAssist.js.map +1 -0
  14. package/dist/src/code_assist/converter.d.ts +72 -0
  15. package/dist/src/code_assist/converter.js +159 -0
  16. package/dist/src/code_assist/converter.js.map +1 -0
  17. package/dist/src/code_assist/converter.test.d.ts +6 -0
  18. package/dist/src/code_assist/converter.test.js +362 -0
  19. package/dist/src/code_assist/converter.test.js.map +1 -0
  20. package/dist/src/code_assist/oauth2.d.ts +22 -0
  21. package/dist/src/code_assist/oauth2.js +353 -0
  22. package/dist/src/code_assist/oauth2.js.map +1 -0
  23. package/dist/src/code_assist/oauth2.test.d.ts +6 -0
  24. package/dist/src/code_assist/oauth2.test.js +427 -0
  25. package/dist/src/code_assist/oauth2.test.js.map +1 -0
  26. package/dist/src/code_assist/server.d.ts +37 -0
  27. package/dist/src/code_assist/server.js +125 -0
  28. package/dist/src/code_assist/server.js.map +1 -0
  29. package/dist/src/code_assist/server.test.d.ts +6 -0
  30. package/dist/src/code_assist/server.test.js +134 -0
  31. package/dist/src/code_assist/server.test.js.map +1 -0
  32. package/dist/src/code_assist/setup.d.ts +20 -0
  33. package/dist/src/code_assist/setup.js +101 -0
  34. package/dist/src/code_assist/setup.js.map +1 -0
  35. package/dist/src/code_assist/setup.test.d.ts +6 -0
  36. package/dist/src/code_assist/setup.test.js +171 -0
  37. package/dist/src/code_assist/setup.test.js.map +1 -0
  38. package/dist/src/code_assist/types.d.ts +148 -0
  39. package/dist/src/code_assist/types.js +46 -0
  40. package/dist/src/code_assist/types.js.map +1 -0
  41. package/dist/src/config/config.d.ts +318 -0
  42. package/dist/src/config/config.js +633 -0
  43. package/dist/src/config/config.js.map +1 -0
  44. package/dist/src/config/config.test.d.ts +6 -0
  45. package/dist/src/config/config.test.js +585 -0
  46. package/dist/src/config/config.test.js.map +1 -0
  47. package/dist/src/config/flashFallback.test.d.ts +6 -0
  48. package/dist/src/config/flashFallback.test.js +87 -0
  49. package/dist/src/config/flashFallback.test.js.map +1 -0
  50. package/dist/src/config/models.d.ts +9 -0
  51. package/dist/src/config/models.js +10 -0
  52. package/dist/src/config/models.js.map +1 -0
  53. package/dist/src/config/storage.d.ts +32 -0
  54. package/dist/src/config/storage.js +90 -0
  55. package/dist/src/config/storage.js.map +1 -0
  56. package/dist/src/config/storage.test.d.ts +6 -0
  57. package/dist/src/config/storage.test.js +43 -0
  58. package/dist/src/config/storage.test.js.map +1 -0
  59. package/dist/src/core/client.d.ts +65 -0
  60. package/dist/src/core/client.js +689 -0
  61. package/dist/src/core/client.js.map +1 -0
  62. package/dist/src/core/client.test.d.ts +6 -0
  63. package/dist/src/core/client.test.js +1857 -0
  64. package/dist/src/core/client.test.js.map +1 -0
  65. package/dist/src/core/contentGenerator.d.ts +33 -0
  66. package/dist/src/core/contentGenerator.js +80 -0
  67. package/dist/src/core/contentGenerator.js.map +1 -0
  68. package/dist/src/core/contentGenerator.test.d.ts +6 -0
  69. package/dist/src/core/contentGenerator.test.js +124 -0
  70. package/dist/src/core/contentGenerator.test.js.map +1 -0
  71. package/dist/src/core/coreToolScheduler.d.ts +126 -0
  72. package/dist/src/core/coreToolScheduler.js +605 -0
  73. package/dist/src/core/coreToolScheduler.js.map +1 -0
  74. package/dist/src/core/coreToolScheduler.test.d.ts +6 -0
  75. package/dist/src/core/coreToolScheduler.test.js +923 -0
  76. package/dist/src/core/coreToolScheduler.test.js.map +1 -0
  77. package/dist/src/core/geminiChat.d.ts +122 -0
  78. package/dist/src/core/geminiChat.js +547 -0
  79. package/dist/src/core/geminiChat.js.map +1 -0
  80. package/dist/src/core/geminiChat.test.d.ts +6 -0
  81. package/dist/src/core/geminiChat.test.js +875 -0
  82. package/dist/src/core/geminiChat.test.js.map +1 -0
  83. package/dist/src/core/geminiRequest.d.ts +13 -0
  84. package/dist/src/core/geminiRequest.js +11 -0
  85. package/dist/src/core/geminiRequest.js.map +1 -0
  86. package/dist/src/core/logger.d.ts +60 -0
  87. package/dist/src/core/logger.js +360 -0
  88. package/dist/src/core/logger.js.map +1 -0
  89. package/dist/src/core/logger.test.d.ts +6 -0
  90. package/dist/src/core/logger.test.js +534 -0
  91. package/dist/src/core/logger.test.js.map +1 -0
  92. package/dist/src/core/loggingContentGenerator.d.ts +25 -0
  93. package/dist/src/core/loggingContentGenerator.js +97 -0
  94. package/dist/src/core/loggingContentGenerator.js.map +1 -0
  95. package/dist/src/core/nonInteractiveToolExecutor.d.ts +10 -0
  96. package/dist/src/core/nonInteractiveToolExecutor.js +24 -0
  97. package/dist/src/core/nonInteractiveToolExecutor.js.map +1 -0
  98. package/dist/src/core/nonInteractiveToolExecutor.test.d.ts +6 -0
  99. package/dist/src/core/nonInteractiveToolExecutor.test.js +236 -0
  100. package/dist/src/core/nonInteractiveToolExecutor.test.js.map +1 -0
  101. package/dist/src/core/prompts.d.ts +12 -0
  102. package/dist/src/core/prompts.js +359 -0
  103. package/dist/src/core/prompts.js.map +1 -0
  104. package/dist/src/core/prompts.test.d.ts +6 -0
  105. package/dist/src/core/prompts.test.js +214 -0
  106. package/dist/src/core/prompts.test.js.map +1 -0
  107. package/dist/src/core/subagent.d.ts +236 -0
  108. package/dist/src/core/subagent.js +485 -0
  109. package/dist/src/core/subagent.js.map +1 -0
  110. package/dist/src/core/subagent.test.d.ts +6 -0
  111. package/dist/src/core/subagent.test.js +520 -0
  112. package/dist/src/core/subagent.test.js.map +1 -0
  113. package/dist/src/core/tokenLimits.d.ts +10 -0
  114. package/dist/src/core/tokenLimits.js +28 -0
  115. package/dist/src/core/tokenLimits.js.map +1 -0
  116. package/dist/src/core/turn.d.ts +125 -0
  117. package/dist/src/core/turn.js +154 -0
  118. package/dist/src/core/turn.js.map +1 -0
  119. package/dist/src/core/turn.test.d.ts +6 -0
  120. package/dist/src/core/turn.test.js +388 -0
  121. package/dist/src/core/turn.test.js.map +1 -0
  122. package/dist/src/generated/git-commit.d.ts +7 -0
  123. package/dist/src/generated/git-commit.js +10 -0
  124. package/dist/src/generated/git-commit.js.map +1 -0
  125. package/dist/src/ide/constants.d.ts +6 -0
  126. package/dist/src/ide/constants.js +7 -0
  127. package/dist/src/ide/constants.js.map +1 -0
  128. package/dist/src/ide/detect-ide.d.ts +25 -0
  129. package/dist/src/ide/detect-ide.js +104 -0
  130. package/dist/src/ide/detect-ide.js.map +1 -0
  131. package/dist/src/ide/detect-ide.test.d.ts +6 -0
  132. package/dist/src/ide/detect-ide.test.js +109 -0
  133. package/dist/src/ide/detect-ide.test.js.map +1 -0
  134. package/dist/src/ide/ide-client.d.ts +67 -0
  135. package/dist/src/ide/ide-client.js +418 -0
  136. package/dist/src/ide/ide-client.js.map +1 -0
  137. package/dist/src/ide/ide-client.test.d.ts +6 -0
  138. package/dist/src/ide/ide-client.test.js +155 -0
  139. package/dist/src/ide/ide-client.test.js.map +1 -0
  140. package/dist/src/ide/ide-installer.d.ts +14 -0
  141. package/dist/src/ide/ide-installer.js +107 -0
  142. package/dist/src/ide/ide-installer.js.map +1 -0
  143. package/dist/src/ide/ide-installer.test.d.ts +6 -0
  144. package/dist/src/ide/ide-installer.test.js +113 -0
  145. package/dist/src/ide/ide-installer.test.js.map +1 -0
  146. package/dist/src/ide/ideContext.d.ts +374 -0
  147. package/dist/src/ide/ideContext.js +147 -0
  148. package/dist/src/ide/ideContext.js.map +1 -0
  149. package/dist/src/ide/ideContext.test.d.ts +6 -0
  150. package/dist/src/ide/ideContext.test.js +265 -0
  151. package/dist/src/ide/ideContext.test.js.map +1 -0
  152. package/dist/src/ide/process-utils.d.ts +22 -0
  153. package/dist/src/ide/process-utils.js +153 -0
  154. package/dist/src/ide/process-utils.js.map +1 -0
  155. package/dist/src/ide/process-utils.test.d.ts +6 -0
  156. package/dist/src/ide/process-utils.test.js +72 -0
  157. package/dist/src/ide/process-utils.test.js.map +1 -0
  158. package/dist/src/index.d.ts +81 -0
  159. package/dist/src/index.js +90 -0
  160. package/dist/src/index.js.map +1 -0
  161. package/dist/src/index.test.d.ts +6 -0
  162. package/dist/src/index.test.js +12 -0
  163. package/dist/src/index.test.js.map +1 -0
  164. package/dist/src/mcp/google-auth-provider.d.ts +23 -0
  165. package/dist/src/mcp/google-auth-provider.js +72 -0
  166. package/dist/src/mcp/google-auth-provider.js.map +1 -0
  167. package/dist/src/mcp/google-auth-provider.test.d.ts +6 -0
  168. package/dist/src/mcp/google-auth-provider.test.js +89 -0
  169. package/dist/src/mcp/google-auth-provider.test.js.map +1 -0
  170. package/dist/src/mcp/oauth-provider.d.ts +146 -0
  171. package/dist/src/mcp/oauth-provider.js +601 -0
  172. package/dist/src/mcp/oauth-provider.js.map +1 -0
  173. package/dist/src/mcp/oauth-provider.test.d.ts +6 -0
  174. package/dist/src/mcp/oauth-provider.test.js +672 -0
  175. package/dist/src/mcp/oauth-provider.test.js.map +1 -0
  176. package/dist/src/mcp/oauth-token-storage.d.ts +61 -0
  177. package/dist/src/mcp/oauth-token-storage.js +148 -0
  178. package/dist/src/mcp/oauth-token-storage.js.map +1 -0
  179. package/dist/src/mcp/oauth-token-storage.test.d.ts +6 -0
  180. package/dist/src/mcp/oauth-token-storage.test.js +206 -0
  181. package/dist/src/mcp/oauth-token-storage.test.js.map +1 -0
  182. package/dist/src/mcp/oauth-utils.d.ts +119 -0
  183. package/dist/src/mcp/oauth-utils.js +235 -0
  184. package/dist/src/mcp/oauth-utils.js.map +1 -0
  185. package/dist/src/mcp/oauth-utils.test.d.ts +6 -0
  186. package/dist/src/mcp/oauth-utils.test.js +199 -0
  187. package/dist/src/mcp/oauth-utils.test.js.map +1 -0
  188. package/dist/src/mcp/token-storage/base-token-storage.d.ts +19 -0
  189. package/dist/src/mcp/token-storage/base-token-storage.js +36 -0
  190. package/dist/src/mcp/token-storage/base-token-storage.js.map +1 -0
  191. package/dist/src/mcp/token-storage/base-token-storage.test.d.ts +6 -0
  192. package/dist/src/mcp/token-storage/base-token-storage.test.js +160 -0
  193. package/dist/src/mcp/token-storage/base-token-storage.test.js.map +1 -0
  194. package/dist/src/mcp/token-storage/types.d.ts +34 -0
  195. package/dist/src/mcp/token-storage/types.js +7 -0
  196. package/dist/src/mcp/token-storage/types.js.map +1 -0
  197. package/dist/src/mocks/msw.d.ts +6 -0
  198. package/dist/src/mocks/msw.js +8 -0
  199. package/dist/src/mocks/msw.js.map +1 -0
  200. package/dist/src/prompts/mcp-prompts.d.ts +8 -0
  201. package/dist/src/prompts/mcp-prompts.js +13 -0
  202. package/dist/src/prompts/mcp-prompts.js.map +1 -0
  203. package/dist/src/prompts/prompt-registry.d.ts +34 -0
  204. package/dist/src/prompts/prompt-registry.js +63 -0
  205. package/dist/src/prompts/prompt-registry.js.map +1 -0
  206. package/dist/src/services/chatRecordingService.d.ts +150 -0
  207. package/dist/src/services/chatRecordingService.js +321 -0
  208. package/dist/src/services/chatRecordingService.js.map +1 -0
  209. package/dist/src/services/chatRecordingService.test.d.ts +6 -0
  210. package/dist/src/services/chatRecordingService.test.js +290 -0
  211. package/dist/src/services/chatRecordingService.test.js.map +1 -0
  212. package/dist/src/services/fileDiscoveryService.d.ts +35 -0
  213. package/dist/src/services/fileDiscoveryService.js +91 -0
  214. package/dist/src/services/fileDiscoveryService.js.map +1 -0
  215. package/dist/src/services/fileDiscoveryService.test.d.ts +6 -0
  216. package/dist/src/services/fileDiscoveryService.test.js +143 -0
  217. package/dist/src/services/fileDiscoveryService.test.js.map +1 -0
  218. package/dist/src/services/fileSystemService.d.ts +31 -0
  219. package/dist/src/services/fileSystemService.js +18 -0
  220. package/dist/src/services/fileSystemService.js.map +1 -0
  221. package/dist/src/services/fileSystemService.test.d.ts +6 -0
  222. package/dist/src/services/fileSystemService.test.js +41 -0
  223. package/dist/src/services/fileSystemService.test.js.map +1 -0
  224. package/dist/src/services/gitService.d.ts +23 -0
  225. package/dist/src/services/gitService.js +110 -0
  226. package/dist/src/services/gitService.js.map +1 -0
  227. package/dist/src/services/gitService.test.d.ts +6 -0
  228. package/dist/src/services/gitService.test.js +212 -0
  229. package/dist/src/services/gitService.test.js.map +1 -0
  230. package/dist/src/services/loopDetectionService.d.ts +98 -0
  231. package/dist/src/services/loopDetectionService.js +363 -0
  232. package/dist/src/services/loopDetectionService.js.map +1 -0
  233. package/dist/src/services/loopDetectionService.test.d.ts +6 -0
  234. package/dist/src/services/loopDetectionService.test.js +558 -0
  235. package/dist/src/services/loopDetectionService.test.js.map +1 -0
  236. package/dist/src/services/shellExecutionService.d.ts +68 -0
  237. package/dist/src/services/shellExecutionService.js +332 -0
  238. package/dist/src/services/shellExecutionService.js.map +1 -0
  239. package/dist/src/services/shellExecutionService.test.d.ts +6 -0
  240. package/dist/src/services/shellExecutionService.test.js +517 -0
  241. package/dist/src/services/shellExecutionService.test.js.map +1 -0
  242. package/dist/src/telemetry/clearcut-logger/clearcut-logger.d.ts +121 -0
  243. package/dist/src/telemetry/clearcut-logger/clearcut-logger.js +773 -0
  244. package/dist/src/telemetry/clearcut-logger/clearcut-logger.js.map +1 -0
  245. package/dist/src/telemetry/clearcut-logger/clearcut-logger.test.d.ts +17 -0
  246. package/dist/src/telemetry/clearcut-logger/clearcut-logger.test.js +407 -0
  247. package/dist/src/telemetry/clearcut-logger/clearcut-logger.test.js.map +1 -0
  248. package/dist/src/telemetry/clearcut-logger/event-metadata-key.d.ts +90 -0
  249. package/dist/src/telemetry/clearcut-logger/event-metadata-key.js +229 -0
  250. package/dist/src/telemetry/clearcut-logger/event-metadata-key.js.map +1 -0
  251. package/dist/src/telemetry/constants.d.ts +32 -0
  252. package/dist/src/telemetry/constants.js +33 -0
  253. package/dist/src/telemetry/constants.js.map +1 -0
  254. package/dist/src/telemetry/file-exporters.d.ts +29 -0
  255. package/dist/src/telemetry/file-exporters.js +62 -0
  256. package/dist/src/telemetry/file-exporters.js.map +1 -0
  257. package/dist/src/telemetry/index.d.ts +21 -0
  258. package/dist/src/telemetry/index.js +21 -0
  259. package/dist/src/telemetry/index.js.map +1 -0
  260. package/dist/src/telemetry/integration.test.circular.d.ts +6 -0
  261. package/dist/src/telemetry/integration.test.circular.js +54 -0
  262. package/dist/src/telemetry/integration.test.circular.js.map +1 -0
  263. package/dist/src/telemetry/loggers.d.ts +26 -0
  264. package/dist/src/telemetry/loggers.js +404 -0
  265. package/dist/src/telemetry/loggers.js.map +1 -0
  266. package/dist/src/telemetry/loggers.test.circular.d.ts +6 -0
  267. package/dist/src/telemetry/loggers.test.circular.js +107 -0
  268. package/dist/src/telemetry/loggers.test.circular.js.map +1 -0
  269. package/dist/src/telemetry/loggers.test.d.ts +6 -0
  270. package/dist/src/telemetry/loggers.test.js +658 -0
  271. package/dist/src/telemetry/loggers.test.js.map +1 -0
  272. package/dist/src/telemetry/metrics.d.ts +36 -0
  273. package/dist/src/telemetry/metrics.js +208 -0
  274. package/dist/src/telemetry/metrics.js.map +1 -0
  275. package/dist/src/telemetry/metrics.test.d.ts +6 -0
  276. package/dist/src/telemetry/metrics.test.js +242 -0
  277. package/dist/src/telemetry/metrics.test.js.map +1 -0
  278. package/dist/src/telemetry/sdk.d.ts +9 -0
  279. package/dist/src/telemetry/sdk.js +163 -0
  280. package/dist/src/telemetry/sdk.js.map +1 -0
  281. package/dist/src/telemetry/sdk.test.d.ts +6 -0
  282. package/dist/src/telemetry/sdk.test.js +82 -0
  283. package/dist/src/telemetry/sdk.test.js.map +1 -0
  284. package/dist/src/telemetry/telemetry-utils.d.ts +6 -0
  285. package/dist/src/telemetry/telemetry-utils.js +14 -0
  286. package/dist/src/telemetry/telemetry-utils.js.map +1 -0
  287. package/dist/src/telemetry/telemetry-utils.test.d.ts +6 -0
  288. package/dist/src/telemetry/telemetry-utils.test.js +40 -0
  289. package/dist/src/telemetry/telemetry-utils.test.js.map +1 -0
  290. package/dist/src/telemetry/telemetry.test.d.ts +6 -0
  291. package/dist/src/telemetry/telemetry.test.js +50 -0
  292. package/dist/src/telemetry/telemetry.test.js.map +1 -0
  293. package/dist/src/telemetry/tool-call-decision.d.ts +13 -0
  294. package/dist/src/telemetry/tool-call-decision.js +29 -0
  295. package/dist/src/telemetry/tool-call-decision.js.map +1 -0
  296. package/dist/src/telemetry/types.d.ts +220 -0
  297. package/dist/src/telemetry/types.js +383 -0
  298. package/dist/src/telemetry/types.js.map +1 -0
  299. package/dist/src/telemetry/uiTelemetry.d.ts +75 -0
  300. package/dist/src/telemetry/uiTelemetry.js +153 -0
  301. package/dist/src/telemetry/uiTelemetry.js.map +1 -0
  302. package/dist/src/telemetry/uiTelemetry.test.d.ts +6 -0
  303. package/dist/src/telemetry/uiTelemetry.test.js +558 -0
  304. package/dist/src/telemetry/uiTelemetry.test.js.map +1 -0
  305. package/dist/src/test-utils/config.d.ts +17 -0
  306. package/dist/src/test-utils/config.js +32 -0
  307. package/dist/src/test-utils/config.js.map +1 -0
  308. package/dist/src/test-utils/mockWorkspaceContext.d.ts +13 -0
  309. package/dist/src/test-utils/mockWorkspaceContext.js +24 -0
  310. package/dist/src/test-utils/mockWorkspaceContext.js.map +1 -0
  311. package/dist/src/test-utils/tools.d.ts +45 -0
  312. package/dist/src/test-utils/tools.js +105 -0
  313. package/dist/src/test-utils/tools.js.map +1 -0
  314. package/dist/src/tools/diffOptions.d.ts +9 -0
  315. package/dist/src/tools/diffOptions.js +38 -0
  316. package/dist/src/tools/diffOptions.js.map +1 -0
  317. package/dist/src/tools/diffOptions.test.d.ts +6 -0
  318. package/dist/src/tools/diffOptions.test.js +119 -0
  319. package/dist/src/tools/diffOptions.test.js.map +1 -0
  320. package/dist/src/tools/edit.d.ts +56 -0
  321. package/dist/src/tools/edit.js +423 -0
  322. package/dist/src/tools/edit.js.map +1 -0
  323. package/dist/src/tools/edit.test.d.ts +6 -0
  324. package/dist/src/tools/edit.test.js +713 -0
  325. package/dist/src/tools/edit.test.js.map +1 -0
  326. package/dist/src/tools/glob.d.ts +52 -0
  327. package/dist/src/tools/glob.js +236 -0
  328. package/dist/src/tools/glob.js.map +1 -0
  329. package/dist/src/tools/glob.test.d.ts +6 -0
  330. package/dist/src/tools/glob.test.js +375 -0
  331. package/dist/src/tools/glob.test.js.map +1 -0
  332. package/dist/src/tools/grep.d.ts +47 -0
  333. package/dist/src/tools/grep.js +517 -0
  334. package/dist/src/tools/grep.js.map +1 -0
  335. package/dist/src/tools/grep.test.d.ts +6 -0
  336. package/dist/src/tools/grep.test.js +295 -0
  337. package/dist/src/tools/grep.test.js.map +1 -0
  338. package/dist/src/tools/ls.d.ts +68 -0
  339. package/dist/src/tools/ls.js +227 -0
  340. package/dist/src/tools/ls.js.map +1 -0
  341. package/dist/src/tools/ls.test.d.ts +6 -0
  342. package/dist/src/tools/ls.test.js +389 -0
  343. package/dist/src/tools/ls.test.js.map +1 -0
  344. package/dist/src/tools/mcp-client-manager.d.ts +38 -0
  345. package/dist/src/tools/mcp-client-manager.js +74 -0
  346. package/dist/src/tools/mcp-client-manager.js.map +1 -0
  347. package/dist/src/tools/mcp-client-manager.test.d.ts +6 -0
  348. package/dist/src/tools/mcp-client-manager.test.js +39 -0
  349. package/dist/src/tools/mcp-client-manager.test.js.map +1 -0
  350. package/dist/src/tools/mcp-client.d.ts +199 -0
  351. package/dist/src/tools/mcp-client.js +995 -0
  352. package/dist/src/tools/mcp-client.js.map +1 -0
  353. package/dist/src/tools/mcp-client.test.d.ts +6 -0
  354. package/dist/src/tools/mcp-client.test.js +454 -0
  355. package/dist/src/tools/mcp-client.test.js.map +1 -0
  356. package/dist/src/tools/mcp-tool.d.ts +23 -0
  357. package/dist/src/tools/mcp-tool.js +240 -0
  358. package/dist/src/tools/mcp-tool.js.map +1 -0
  359. package/dist/src/tools/mcp-tool.test.d.ts +6 -0
  360. package/dist/src/tools/mcp-tool.test.js +576 -0
  361. package/dist/src/tools/mcp-tool.test.js.map +1 -0
  362. package/dist/src/tools/memoryTool.d.ts +40 -0
  363. package/dist/src/tools/memoryTool.js +296 -0
  364. package/dist/src/tools/memoryTool.js.map +1 -0
  365. package/dist/src/tools/memoryTool.test.d.ts +6 -0
  366. package/dist/src/tools/memoryTool.test.js +298 -0
  367. package/dist/src/tools/memoryTool.test.js.map +1 -0
  368. package/dist/src/tools/modifiable-tool.d.ts +32 -0
  369. package/dist/src/tools/modifiable-tool.js +88 -0
  370. package/dist/src/tools/modifiable-tool.js.map +1 -0
  371. package/dist/src/tools/modifiable-tool.test.d.ts +6 -0
  372. package/dist/src/tools/modifiable-tool.test.js +193 -0
  373. package/dist/src/tools/modifiable-tool.test.js.map +1 -0
  374. package/dist/src/tools/read-file.d.ts +35 -0
  375. package/dist/src/tools/read-file.js +127 -0
  376. package/dist/src/tools/read-file.js.map +1 -0
  377. package/dist/src/tools/read-file.test.d.ts +6 -0
  378. package/dist/src/tools/read-file.test.js +311 -0
  379. package/dist/src/tools/read-file.test.js.map +1 -0
  380. package/dist/src/tools/read-many-files.d.ts +60 -0
  381. package/dist/src/tools/read-many-files.js +414 -0
  382. package/dist/src/tools/read-many-files.js.map +1 -0
  383. package/dist/src/tools/read-many-files.test.d.ts +6 -0
  384. package/dist/src/tools/read-many-files.test.js +565 -0
  385. package/dist/src/tools/read-many-files.test.js.map +1 -0
  386. package/dist/src/tools/ripGrep.d.ts +47 -0
  387. package/dist/src/tools/ripGrep.js +368 -0
  388. package/dist/src/tools/ripGrep.js.map +1 -0
  389. package/dist/src/tools/ripGrep.test.d.ts +6 -0
  390. package/dist/src/tools/ripGrep.test.js +874 -0
  391. package/dist/src/tools/ripGrep.test.js.map +1 -0
  392. package/dist/src/tools/shell.d.ts +22 -0
  393. package/dist/src/tools/shell.js +320 -0
  394. package/dist/src/tools/shell.js.map +1 -0
  395. package/dist/src/tools/shell.test.d.ts +6 -0
  396. package/dist/src/tools/shell.test.js +336 -0
  397. package/dist/src/tools/shell.test.js.map +1 -0
  398. package/dist/src/tools/tool-error.d.ts +43 -0
  399. package/dist/src/tools/tool-error.js +58 -0
  400. package/dist/src/tools/tool-error.js.map +1 -0
  401. package/dist/src/tools/tool-registry.d.ts +86 -0
  402. package/dist/src/tools/tool-registry.js +369 -0
  403. package/dist/src/tools/tool-registry.js.map +1 -0
  404. package/dist/src/tools/tool-registry.test.d.ts +6 -0
  405. package/dist/src/tools/tool-registry.test.js +332 -0
  406. package/dist/src/tools/tool-registry.test.js.map +1 -0
  407. package/dist/src/tools/tools.d.ts +274 -0
  408. package/dist/src/tools/tools.js +250 -0
  409. package/dist/src/tools/tools.js.map +1 -0
  410. package/dist/src/tools/tools.test.d.ts +6 -0
  411. package/dist/src/tools/tools.test.js +205 -0
  412. package/dist/src/tools/tools.test.js.map +1 -0
  413. package/dist/src/tools/web-fetch.d.ts +27 -0
  414. package/dist/src/tools/web-fetch.js +243 -0
  415. package/dist/src/tools/web-fetch.js.map +1 -0
  416. package/dist/src/tools/web-fetch.test.d.ts +6 -0
  417. package/dist/src/tools/web-fetch.test.js +114 -0
  418. package/dist/src/tools/web-fetch.test.js.map +1 -0
  419. package/dist/src/tools/web-search.d.ts +49 -0
  420. package/dist/src/tools/web-search.js +137 -0
  421. package/dist/src/tools/web-search.js.map +1 -0
  422. package/dist/src/tools/web-search.test.d.ts +6 -0
  423. package/dist/src/tools/web-search.test.js +207 -0
  424. package/dist/src/tools/web-search.test.js.map +1 -0
  425. package/dist/src/tools/write-file.d.ts +52 -0
  426. package/dist/src/tools/write-file.js +314 -0
  427. package/dist/src/tools/write-file.js.map +1 -0
  428. package/dist/src/tools/write-file.test.d.ts +6 -0
  429. package/dist/src/tools/write-file.test.js +531 -0
  430. package/dist/src/tools/write-file.test.js.map +1 -0
  431. package/dist/src/utils/LruCache.d.ts +13 -0
  432. package/dist/src/utils/LruCache.js +38 -0
  433. package/dist/src/utils/LruCache.js.map +1 -0
  434. package/dist/src/utils/bfsFileSearch.d.ts +24 -0
  435. package/dist/src/utils/bfsFileSearch.js +89 -0
  436. package/dist/src/utils/bfsFileSearch.js.map +1 -0
  437. package/dist/src/utils/bfsFileSearch.test.d.ts +6 -0
  438. package/dist/src/utils/bfsFileSearch.test.js +163 -0
  439. package/dist/src/utils/bfsFileSearch.test.js.map +1 -0
  440. package/dist/src/utils/browser.d.ts +13 -0
  441. package/dist/src/utils/browser.js +50 -0
  442. package/dist/src/utils/browser.js.map +1 -0
  443. package/dist/src/utils/editCorrector.d.ts +53 -0
  444. package/dist/src/utils/editCorrector.js +545 -0
  445. package/dist/src/utils/editCorrector.js.map +1 -0
  446. package/dist/src/utils/editCorrector.test.d.ts +6 -0
  447. package/dist/src/utils/editCorrector.test.js +564 -0
  448. package/dist/src/utils/editCorrector.test.js.map +1 -0
  449. package/dist/src/utils/editor.d.ts +28 -0
  450. package/dist/src/utils/editor.js +186 -0
  451. package/dist/src/utils/editor.js.map +1 -0
  452. package/dist/src/utils/editor.test.d.ts +6 -0
  453. package/dist/src/utils/editor.test.js +445 -0
  454. package/dist/src/utils/editor.test.js.map +1 -0
  455. package/dist/src/utils/environmentContext.d.ts +21 -0
  456. package/dist/src/utils/environmentContext.js +90 -0
  457. package/dist/src/utils/environmentContext.js.map +1 -0
  458. package/dist/src/utils/environmentContext.test.d.ts +6 -0
  459. package/dist/src/utils/environmentContext.test.js +140 -0
  460. package/dist/src/utils/environmentContext.test.js.map +1 -0
  461. package/dist/src/utils/errorParsing.d.ts +8 -0
  462. package/dist/src/utils/errorParsing.js +93 -0
  463. package/dist/src/utils/errorParsing.js.map +1 -0
  464. package/dist/src/utils/errorParsing.test.d.ts +6 -0
  465. package/dist/src/utils/errorParsing.test.js +172 -0
  466. package/dist/src/utils/errorParsing.test.js.map +1 -0
  467. package/dist/src/utils/errorReporting.d.ts +14 -0
  468. package/dist/src/utils/errorReporting.js +88 -0
  469. package/dist/src/utils/errorReporting.js.map +1 -0
  470. package/dist/src/utils/errorReporting.test.d.ts +6 -0
  471. package/dist/src/utils/errorReporting.test.js +130 -0
  472. package/dist/src/utils/errorReporting.test.js.map +1 -0
  473. package/dist/src/utils/errors.d.ts +33 -0
  474. package/dist/src/utils/errors.js +86 -0
  475. package/dist/src/utils/errors.js.map +1 -0
  476. package/dist/src/utils/fetch.d.ts +11 -0
  477. package/dist/src/utils/fetch.js +51 -0
  478. package/dist/src/utils/fetch.js.map +1 -0
  479. package/dist/src/utils/fileUtils.d.ts +52 -0
  480. package/dist/src/utils/fileUtils.js +283 -0
  481. package/dist/src/utils/fileUtils.js.map +1 -0
  482. package/dist/src/utils/fileUtils.test.d.ts +6 -0
  483. package/dist/src/utils/fileUtils.test.js +364 -0
  484. package/dist/src/utils/fileUtils.test.js.map +1 -0
  485. package/dist/src/utils/filesearch/crawlCache.d.ts +25 -0
  486. package/dist/src/utils/filesearch/crawlCache.js +57 -0
  487. package/dist/src/utils/filesearch/crawlCache.js.map +1 -0
  488. package/dist/src/utils/filesearch/crawlCache.test.d.ts +6 -0
  489. package/dist/src/utils/filesearch/crawlCache.test.js +103 -0
  490. package/dist/src/utils/filesearch/crawlCache.test.js.map +1 -0
  491. package/dist/src/utils/filesearch/crawler.d.ts +15 -0
  492. package/dist/src/utils/filesearch/crawler.js +50 -0
  493. package/dist/src/utils/filesearch/crawler.js.map +1 -0
  494. package/dist/src/utils/filesearch/crawler.test.d.ts +6 -0
  495. package/dist/src/utils/filesearch/crawler.test.js +468 -0
  496. package/dist/src/utils/filesearch/crawler.test.js.map +1 -0
  497. package/dist/src/utils/filesearch/fileSearch.d.ts +38 -0
  498. package/dist/src/utils/filesearch/fileSearch.js +191 -0
  499. package/dist/src/utils/filesearch/fileSearch.js.map +1 -0
  500. package/dist/src/utils/filesearch/fileSearch.test.d.ts +6 -0
  501. package/dist/src/utils/filesearch/fileSearch.test.js +642 -0
  502. package/dist/src/utils/filesearch/fileSearch.test.js.map +1 -0
  503. package/dist/src/utils/filesearch/ignore.d.ts +42 -0
  504. package/dist/src/utils/filesearch/ignore.js +106 -0
  505. package/dist/src/utils/filesearch/ignore.js.map +1 -0
  506. package/dist/src/utils/filesearch/ignore.test.d.ts +6 -0
  507. package/dist/src/utils/filesearch/ignore.test.js +144 -0
  508. package/dist/src/utils/filesearch/ignore.test.js.map +1 -0
  509. package/dist/src/utils/filesearch/result-cache.d.ts +33 -0
  510. package/dist/src/utils/filesearch/result-cache.js +59 -0
  511. package/dist/src/utils/filesearch/result-cache.js.map +1 -0
  512. package/dist/src/utils/filesearch/result-cache.test.d.ts +6 -0
  513. package/dist/src/utils/filesearch/result-cache.test.js +46 -0
  514. package/dist/src/utils/filesearch/result-cache.test.js.map +1 -0
  515. package/dist/src/utils/flashFallback.integration.test.d.ts +6 -0
  516. package/dist/src/utils/flashFallback.integration.test.js +118 -0
  517. package/dist/src/utils/flashFallback.integration.test.js.map +1 -0
  518. package/dist/src/utils/formatters.d.ts +6 -0
  519. package/dist/src/utils/formatters.js +16 -0
  520. package/dist/src/utils/formatters.js.map +1 -0
  521. package/dist/src/utils/generateContentResponseUtilities.d.ts +13 -0
  522. package/dist/src/utils/generateContentResponseUtilities.js +80 -0
  523. package/dist/src/utils/generateContentResponseUtilities.js.map +1 -0
  524. package/dist/src/utils/generateContentResponseUtilities.test.d.ts +6 -0
  525. package/dist/src/utils/generateContentResponseUtilities.test.js +235 -0
  526. package/dist/src/utils/generateContentResponseUtilities.test.js.map +1 -0
  527. package/dist/src/utils/getFolderStructure.d.ts +31 -0
  528. package/dist/src/utils/getFolderStructure.js +246 -0
  529. package/dist/src/utils/getFolderStructure.js.map +1 -0
  530. package/dist/src/utils/getFolderStructure.test.d.ts +6 -0
  531. package/dist/src/utils/getFolderStructure.test.js +282 -0
  532. package/dist/src/utils/getFolderStructure.test.js.map +1 -0
  533. package/dist/src/utils/getPty.d.ts +19 -0
  534. package/dist/src/utils/getPty.js +23 -0
  535. package/dist/src/utils/getPty.js.map +1 -0
  536. package/dist/src/utils/gitIgnoreParser.d.ts +20 -0
  537. package/dist/src/utils/gitIgnoreParser.js +61 -0
  538. package/dist/src/utils/gitIgnoreParser.js.map +1 -0
  539. package/dist/src/utils/gitIgnoreParser.test.d.ts +6 -0
  540. package/dist/src/utils/gitIgnoreParser.test.js +154 -0
  541. package/dist/src/utils/gitIgnoreParser.test.js.map +1 -0
  542. package/dist/src/utils/gitUtils.d.ts +17 -0
  543. package/dist/src/utils/gitUtils.js +61 -0
  544. package/dist/src/utils/gitUtils.js.map +1 -0
  545. package/dist/src/utils/ignorePatterns.d.ts +103 -0
  546. package/dist/src/utils/ignorePatterns.js +220 -0
  547. package/dist/src/utils/ignorePatterns.js.map +1 -0
  548. package/dist/src/utils/ignorePatterns.test.d.ts +6 -0
  549. package/dist/src/utils/ignorePatterns.test.js +250 -0
  550. package/dist/src/utils/ignorePatterns.test.js.map +1 -0
  551. package/dist/src/utils/installationManager.d.ts +16 -0
  552. package/dist/src/utils/installationManager.js +50 -0
  553. package/dist/src/utils/installationManager.js.map +1 -0
  554. package/dist/src/utils/installationManager.test.d.ts +6 -0
  555. package/dist/src/utils/installationManager.test.js +83 -0
  556. package/dist/src/utils/installationManager.test.js.map +1 -0
  557. package/dist/src/utils/language-detection.d.ts +6 -0
  558. package/dist/src/utils/language-detection.js +101 -0
  559. package/dist/src/utils/language-detection.js.map +1 -0
  560. package/dist/src/utils/memoryDiscovery.d.ts +15 -0
  561. package/dist/src/utils/memoryDiscovery.js +253 -0
  562. package/dist/src/utils/memoryDiscovery.js.map +1 -0
  563. package/dist/src/utils/memoryDiscovery.test.d.ts +6 -0
  564. package/dist/src/utils/memoryDiscovery.test.js +219 -0
  565. package/dist/src/utils/memoryDiscovery.test.js.map +1 -0
  566. package/dist/src/utils/memoryImportProcessor.d.ts +42 -0
  567. package/dist/src/utils/memoryImportProcessor.js +296 -0
  568. package/dist/src/utils/memoryImportProcessor.js.map +1 -0
  569. package/dist/src/utils/memoryImportProcessor.test.d.ts +6 -0
  570. package/dist/src/utils/memoryImportProcessor.test.js +573 -0
  571. package/dist/src/utils/memoryImportProcessor.test.js.map +1 -0
  572. package/dist/src/utils/messageInspectors.d.ts +8 -0
  573. package/dist/src/utils/messageInspectors.js +16 -0
  574. package/dist/src/utils/messageInspectors.js.map +1 -0
  575. package/dist/src/utils/nextSpeakerChecker.d.ts +12 -0
  576. package/dist/src/utils/nextSpeakerChecker.js +91 -0
  577. package/dist/src/utils/nextSpeakerChecker.js.map +1 -0
  578. package/dist/src/utils/nextSpeakerChecker.test.d.ts +6 -0
  579. package/dist/src/utils/nextSpeakerChecker.test.js +168 -0
  580. package/dist/src/utils/nextSpeakerChecker.test.js.map +1 -0
  581. package/dist/src/utils/partUtils.d.ts +35 -0
  582. package/dist/src/utils/partUtils.js +133 -0
  583. package/dist/src/utils/partUtils.js.map +1 -0
  584. package/dist/src/utils/partUtils.test.d.ts +6 -0
  585. package/dist/src/utils/partUtils.test.js +241 -0
  586. package/dist/src/utils/partUtils.test.js.map +1 -0
  587. package/dist/src/utils/pathReader.d.ts +17 -0
  588. package/dist/src/utils/pathReader.js +92 -0
  589. package/dist/src/utils/pathReader.js.map +1 -0
  590. package/dist/src/utils/pathReader.test.d.ts +6 -0
  591. package/dist/src/utils/pathReader.test.js +363 -0
  592. package/dist/src/utils/pathReader.test.js.map +1 -0
  593. package/dist/src/utils/paths.d.ts +58 -0
  594. package/dist/src/utils/paths.js +159 -0
  595. package/dist/src/utils/paths.js.map +1 -0
  596. package/dist/src/utils/paths.test.d.ts +6 -0
  597. package/dist/src/utils/paths.test.js +225 -0
  598. package/dist/src/utils/paths.test.js.map +1 -0
  599. package/dist/src/utils/quotaErrorDetection.d.ts +18 -0
  600. package/dist/src/utils/quotaErrorDetection.js +65 -0
  601. package/dist/src/utils/quotaErrorDetection.js.map +1 -0
  602. package/dist/src/utils/retry.d.ts +30 -0
  603. package/dist/src/utils/retry.js +276 -0
  604. package/dist/src/utils/retry.js.map +1 -0
  605. package/dist/src/utils/retry.test.d.ts +6 -0
  606. package/dist/src/utils/retry.test.js +325 -0
  607. package/dist/src/utils/retry.test.js.map +1 -0
  608. package/dist/src/utils/safeJsonStringify.d.ts +13 -0
  609. package/dist/src/utils/safeJsonStringify.js +25 -0
  610. package/dist/src/utils/safeJsonStringify.js.map +1 -0
  611. package/dist/src/utils/safeJsonStringify.test.d.ts +6 -0
  612. package/dist/src/utils/safeJsonStringify.test.js +61 -0
  613. package/dist/src/utils/safeJsonStringify.test.js.map +1 -0
  614. package/dist/src/utils/schemaValidator.d.ts +15 -0
  615. package/dist/src/utils/schemaValidator.js +38 -0
  616. package/dist/src/utils/schemaValidator.js.map +1 -0
  617. package/dist/src/utils/secure-browser-launcher.d.ts +23 -0
  618. package/dist/src/utils/secure-browser-launcher.js +165 -0
  619. package/dist/src/utils/secure-browser-launcher.js.map +1 -0
  620. package/dist/src/utils/secure-browser-launcher.test.d.ts +6 -0
  621. package/dist/src/utils/secure-browser-launcher.test.js +149 -0
  622. package/dist/src/utils/secure-browser-launcher.test.js.map +1 -0
  623. package/dist/src/utils/session.d.ts +6 -0
  624. package/dist/src/utils/session.js +8 -0
  625. package/dist/src/utils/session.js.map +1 -0
  626. package/dist/src/utils/shell-utils.d.ts +117 -0
  627. package/dist/src/utils/shell-utils.js +370 -0
  628. package/dist/src/utils/shell-utils.js.map +1 -0
  629. package/dist/src/utils/shell-utils.test.d.ts +6 -0
  630. package/dist/src/utils/shell-utils.test.js +332 -0
  631. package/dist/src/utils/shell-utils.test.js.map +1 -0
  632. package/dist/src/utils/summarizer.d.ts +25 -0
  633. package/dist/src/utils/summarizer.js +51 -0
  634. package/dist/src/utils/summarizer.js.map +1 -0
  635. package/dist/src/utils/summarizer.test.d.ts +6 -0
  636. package/dist/src/utils/summarizer.test.js +131 -0
  637. package/dist/src/utils/summarizer.test.js.map +1 -0
  638. package/dist/src/utils/systemEncoding.d.ts +40 -0
  639. package/dist/src/utils/systemEncoding.js +149 -0
  640. package/dist/src/utils/systemEncoding.js.map +1 -0
  641. package/dist/src/utils/systemEncoding.test.d.ts +6 -0
  642. package/dist/src/utils/systemEncoding.test.js +368 -0
  643. package/dist/src/utils/systemEncoding.test.js.map +1 -0
  644. package/dist/src/utils/testUtils.d.ts +29 -0
  645. package/dist/src/utils/testUtils.js +70 -0
  646. package/dist/src/utils/testUtils.js.map +1 -0
  647. package/dist/src/utils/textUtils.d.ts +13 -0
  648. package/dist/src/utils/textUtils.js +28 -0
  649. package/dist/src/utils/textUtils.js.map +1 -0
  650. package/dist/src/utils/tool-utils.d.ts +19 -0
  651. package/dist/src/utils/tool-utils.js +58 -0
  652. package/dist/src/utils/tool-utils.js.map +1 -0
  653. package/dist/src/utils/tool-utils.test.d.ts +6 -0
  654. package/dist/src/utils/tool-utils.test.js +61 -0
  655. package/dist/src/utils/tool-utils.test.js.map +1 -0
  656. package/dist/src/utils/userAccountManager.d.ts +20 -0
  657. package/dist/src/utils/userAccountManager.js +114 -0
  658. package/dist/src/utils/userAccountManager.js.map +1 -0
  659. package/dist/src/utils/userAccountManager.test.d.ts +6 -0
  660. package/dist/src/utils/userAccountManager.test.js +223 -0
  661. package/dist/src/utils/userAccountManager.test.js.map +1 -0
  662. package/dist/src/utils/workspaceContext.d.ts +66 -0
  663. package/dist/src/utils/workspaceContext.js +171 -0
  664. package/dist/src/utils/workspaceContext.js.map +1 -0
  665. package/dist/src/utils/workspaceContext.test.d.ts +6 -0
  666. package/dist/src/utils/workspaceContext.test.js +318 -0
  667. package/dist/src/utils/workspaceContext.test.js.map +1 -0
  668. package/dist/tsconfig.tsbuildinfo +1 -0
  669. package/package.json +85 -0
package/LICENSE ADDED
@@ -0,0 +1,202 @@
1
+
2
+ Apache License
3
+ Version 2.0, January 2004
4
+ http://www.apache.org/licenses/
5
+
6
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
7
+
8
+ 1. Definitions.
9
+
10
+ "License" shall mean the terms and conditions for use, reproduction,
11
+ and distribution as defined by Sections 1 through 9 of this document.
12
+
13
+ "Licensor" shall mean the copyright owner or entity authorized by
14
+ the copyright owner that is granting the License.
15
+
16
+ "Legal Entity" shall mean the union of the acting entity and all
17
+ other entities that control, are controlled by, or are under common
18
+ control with that entity. For the purposes of this definition,
19
+ "control" means (i) the power, direct or indirect, to cause the
20
+ direction or management of such entity, whether by contract or
21
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
22
+ outstanding shares, or (iii) beneficial ownership of such entity.
23
+
24
+ "You" (or "Your") shall mean an individual or Legal Entity
25
+ exercising permissions granted by this License.
26
+
27
+ "Source" form shall mean the preferred form for making modifications,
28
+ including but not limited to software source code, documentation
29
+ source, and configuration files.
30
+
31
+ "Object" form shall mean any form resulting from mechanical
32
+ transformation or translation of a Source form, including but
33
+ not limited to compiled object code, generated documentation,
34
+ and conversions to other media types.
35
+
36
+ "Work" shall mean the work of authorship, whether in Source or
37
+ Object form, made available under the License, as indicated by a
38
+ copyright notice that is included in or attached to the work
39
+ (an example is provided in the Appendix below).
40
+
41
+ "Derivative Works" shall mean any work, whether in Source or Object
42
+ form, that is based on (or derived from) the Work and for which the
43
+ editorial revisions, annotations, elaborations, or other modifications
44
+ represent, as a whole, an original work of authorship. For the purposes
45
+ of this License, Derivative Works shall not include works that remain
46
+ separable from, or merely link (or bind by name) to the interfaces of,
47
+ the Work and Derivative Works thereof.
48
+
49
+ "Contribution" shall mean any work of authorship, including
50
+ the original version of the Work and any modifications or additions
51
+ to that Work or Derivative Works thereof, that is intentionally
52
+ submitted to Licensor for inclusion in the Work by the copyright owner
53
+ or by an individual or Legal Entity authorized to submit on behalf of
54
+ the copyright owner. For the purposes of this definition, "submitted"
55
+ means any form of electronic, verbal, or written communication sent
56
+ to the Licensor or its representatives, including but not limited to
57
+ communication on electronic mailing lists, source code control systems,
58
+ and issue tracking systems that are managed by, or on behalf of, the
59
+ Licensor for the purpose of discussing and improving the Work, but
60
+ excluding communication that is conspicuously marked or otherwise
61
+ designated in writing by the copyright owner as "Not a Contribution."
62
+
63
+ "Contributor" shall mean Licensor and any individual or Legal Entity
64
+ on behalf of whom a Contribution has been received by Licensor and
65
+ subsequently incorporated within the Work.
66
+
67
+ 2. Grant of Copyright License. Subject to the terms and conditions of
68
+ this License, each Contributor hereby grants to You a perpetual,
69
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
70
+ copyright license to reproduce, prepare Derivative Works of,
71
+ publicly display, publicly perform, sublicense, and distribute the
72
+ Work and such Derivative Works in Source or Object form.
73
+
74
+ 3. Grant of Patent License. Subject to the terms and conditions of
75
+ this License, each Contributor hereby grants to You a perpetual,
76
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
77
+ (except as stated in this section) patent license to make, have made,
78
+ use, offer to sell, sell, import, and otherwise transfer the Work,
79
+ where such license applies only to those patent claims licensable
80
+ by such Contributor that are necessarily infringed by their
81
+ Contribution(s) alone or by combination of their Contribution(s)
82
+ with the Work to which such Contribution(s) was submitted. If You
83
+ institute patent litigation against any entity (including a
84
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
85
+ or a Contribution incorporated within the Work constitutes direct
86
+ or contributory patent infringement, then any patent licenses
87
+ granted to You under this License for that Work shall terminate
88
+ as of the date such litigation is filed.
89
+
90
+ 4. Redistribution. You may reproduce and distribute copies of the
91
+ Work or Derivative Works thereof in any medium, with or without
92
+ modifications, and in Source or Object form, provided that You
93
+ meet the following conditions:
94
+
95
+ (a) You must give any other recipients of the Work or
96
+ Derivative Works a copy of this License; and
97
+
98
+ (b) You must cause any modified files to carry prominent notices
99
+ stating that You changed the files; and
100
+
101
+ (c) You must retain, in the Source form of any Derivative Works
102
+ that You distribute, all copyright, patent, trademark, and
103
+ attribution notices from the Source form of the Work,
104
+ excluding those notices that do not pertain to any part of
105
+ the Derivative Works; and
106
+
107
+ (d) If the Work includes a "NOTICE" text file as part of its
108
+ distribution, then any Derivative Works that You distribute must
109
+ include a readable copy of the attribution notices contained
110
+ within such NOTICE file, excluding those notices that do not
111
+ pertain to any part of the Derivative Works, in at least one
112
+ of the following places: within a NOTICE text file distributed
113
+ as part of the Derivative Works; within the Source form or
114
+ documentation, if provided along with the Derivative Works; or,
115
+ within a display generated by the Derivative Works, if and
116
+ wherever such third-party notices normally appear. The contents
117
+ of the NOTICE file are for informational purposes only and
118
+ do not modify the License. You may add Your own attribution
119
+ notices within Derivative Works that You distribute, alongside
120
+ or as an addendum to the NOTICE text from the Work, provided
121
+ that such additional attribution notices cannot be construed
122
+ as modifying the License.
123
+
124
+ You may add Your own copyright statement to Your modifications and
125
+ may provide additional or different license terms and conditions
126
+ for use, reproduction, or distribution of Your modifications, or
127
+ for any such Derivative Works as a whole, provided Your use,
128
+ reproduction, and distribution of the Work otherwise complies with
129
+ the conditions stated in this License.
130
+
131
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
132
+ any Contribution intentionally submitted for inclusion in the Work
133
+ by You to the Licensor shall be under the terms and conditions of
134
+ this License, without any additional terms or conditions.
135
+ Notwithstanding the above, nothing herein shall supersede or modify
136
+ the terms of any separate license agreement you may have executed
137
+ with Licensor regarding such Contributions.
138
+
139
+ 6. Trademarks. This License does not grant permission to use the trade
140
+ names, trademarks, service marks, or product names of the Licensor,
141
+ except as required for reasonable and customary use in describing the
142
+ origin of the Work and reproducing the content of the NOTICE file.
143
+
144
+ 7. Disclaimer of Warranty. Unless required by applicable law or
145
+ agreed to in writing, Licensor provides the Work (and each
146
+ Contributor provides its Contributions) on an "AS IS" BASIS,
147
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
148
+ implied, including, without limitation, any warranties or conditions
149
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
150
+ PARTICULAR PURPOSE. You are solely responsible for determining the
151
+ appropriateness of using or redistributing the Work and assume any
152
+ risks associated with Your exercise of permissions under this License.
153
+
154
+ 8. Limitation of Liability. In no event and under no legal theory,
155
+ whether in tort (including negligence), contract, or otherwise,
156
+ unless required by applicable law (such as deliberate and grossly
157
+ negligent acts) or agreed to in writing, shall any Contributor be
158
+ liable to You for damages, including any direct, indirect, special,
159
+ incidental, or consequential damages of any character arising as a
160
+ result of this License or out of the use or inability to use the
161
+ Work (including but not limited to damages for loss of goodwill,
162
+ work stoppage, computer failure or malfunction, or any and all
163
+ other commercial damages or losses), even if such Contributor
164
+ has been advised of the possibility of such damages.
165
+
166
+ 9. Accepting Warranty or Additional Liability. While redistributing
167
+ the Work or Derivative Works thereof, You may choose to offer,
168
+ and charge a fee for, acceptance of support, warranty, indemnity,
169
+ or other liability obligations and/or rights consistent with this
170
+ License. However, in accepting such obligations, You may act only
171
+ on Your own behalf and on Your sole responsibility, not on behalf
172
+ of any other Contributor, and only if You agree to indemnify,
173
+ defend, and hold each Contributor harmless for any liability
174
+ incurred by, or claims asserted against, such Contributor by reason
175
+ of your accepting any such warranty or additional liability.
176
+
177
+ END OF TERMS AND CONDITIONS
178
+
179
+ APPENDIX: How to apply the Apache License to your work.
180
+
181
+ To apply the Apache License to your work, attach the following
182
+ boilerplate notice, with the fields enclosed by brackets "[]"
183
+ replaced with your own identifying information. (Don't include
184
+ the brackets!) The text should be enclosed in the appropriate
185
+ comment syntax for the file format. We also recommend that a
186
+ file or class name and description of purpose be included on the
187
+ same "printed page" as the copyright notice for easier
188
+ identification within third-party archives.
189
+
190
+ Copyright 2025 Google LLC
191
+
192
+ Licensed under the Apache License, Version 2.0 (the "License");
193
+ you may not use this file except in compliance with the License.
194
+ You may obtain a copy of the License at
195
+
196
+ http://www.apache.org/licenses/LICENSE-2.0
197
+
198
+ Unless required by applicable law or agreed to in writing, software
199
+ distributed under the License is distributed on an "AS IS" BASIS,
200
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
201
+ See the License for the specific language governing permissions and
202
+ limitations under the License.
package/README.md ADDED
@@ -0,0 +1,310 @@
1
+ # Gemini CLI
2
+
3
+ [![Gemini CLI CI](https://github.com/google-gemini/gemini-cli/actions/workflows/ci.yml/badge.svg)](https://github.com/google-gemini/gemini-cli/actions/workflows/ci.yml)
4
+ [![Version](https://img.shields.io/npm/v/@google/gemini-cli)](https://www.npmjs.com/package/@google/gemini-cli)
5
+ [![License](https://img.shields.io/github/license/google-gemini/gemini-cli)](https://github.com/google-gemini/gemini-cli/blob/main/LICENSE)
6
+
7
+ ![Gemini CLI Screenshot](./docs/assets/gemini-screenshot.png)
8
+
9
+ Gemini CLI is an open-source AI agent that brings the power of Gemini directly into your terminal. It provides lightweight access to Gemini, giving you the most direct path from your prompt to our model.
10
+
11
+ ## 🚀 Why Gemini CLI?
12
+
13
+ - **🎯 Free tier**: 60 requests/min and 1,000 requests/day with personal Google account
14
+ - **🧠 Powerful Gemini 2.5 Pro**: Access to 1M token context window
15
+ - **🔧 Built-in tools**: Google Search grounding, file operations, shell commands, web fetching
16
+ - **🔌 Extensible**: MCP (Model Context Protocol) support for custom integrations
17
+ - **💻 Terminal-first**: Designed for developers who live in the command line
18
+ - **🛡️ Open source**: Apache 2.0 licensed
19
+
20
+ ## 📦 Installation
21
+
22
+ ### Quick Install
23
+
24
+ #### Run instantly with npx
25
+
26
+ ```bash
27
+ # Using npx (no installation required)
28
+ npx https://github.com/google-gemini/gemini-cli
29
+ ```
30
+
31
+ #### Install globally with npm
32
+
33
+ ```bash
34
+ npm install -g @google/gemini-cli
35
+ ```
36
+
37
+ #### Install globally with Homebrew (macOS/Linux)
38
+
39
+ ```bash
40
+ brew install gemini-cli
41
+ ```
42
+
43
+ #### System Requirements
44
+
45
+ - Node.js version 20 or higher
46
+ - macOS, Linux, or Windows
47
+
48
+ ## Release Cadence and Tags
49
+
50
+ See [Releases](./docs/releases.md) for more details.
51
+
52
+ ### Preview
53
+
54
+ New preview releases will be published each week at UTC 2359 on Tuesdays. These releases will not have been fully vetted and may contain regressions or other outstanding issues. Please help us test and install with `preview` tag.
55
+
56
+ ```bash
57
+ npm install -g @google/gemini-cli@preview
58
+ ```
59
+
60
+ ### Stable
61
+
62
+ - New stable releases will be published each week at UTC 2000 on Tuesdays, this will be the full promotion of last week's `preview` release + any bug fixes and validations. Use `latest` tag.
63
+
64
+ ```bash
65
+ npm install -g @google/gemini-cli@latest
66
+ ```
67
+
68
+ ### Nightly
69
+
70
+ - New releases will be published each week at UTC 0000 each day, This will be all changes from the main branch as represented at time of release. It should be assumed there are pending validations and issues. Use `nightly` tag.
71
+
72
+ ```bash
73
+ npm install -g @google/gemini-cli@nightly
74
+ ```
75
+
76
+ ## 📋 Key Features
77
+
78
+ ### Code Understanding & Generation
79
+
80
+ - Query and edit large codebases
81
+ - Generate new apps from PDFs, images, or sketches using multimodal capabilities
82
+ - Debug issues and troubleshoot with natural language
83
+
84
+ ### Automation & Integration
85
+
86
+ - Automate operational tasks like querying pull requests or handling complex rebases
87
+ - Use MCP servers to connect new capabilities, including [media generation with Imagen, Veo or Lyria](https://github.com/GoogleCloudPlatform/vertex-ai-creative-studio/tree/main/experiments/mcp-genmedia)
88
+ - Run non-interactively in scripts for workflow automation
89
+
90
+ ### Advanced Capabilities
91
+
92
+ - Ground your queries with built-in [Google Search](https://ai.google.dev/gemini-api/docs/grounding) for real-time information
93
+ - Conversation checkpointing to save and resume complex sessions
94
+ - Custom context files (GEMINI.md) to tailor behavior for your projects
95
+
96
+ ### GitHub Integration
97
+
98
+ Integrate Gemini CLI directly into your GitHub workflows with [**Gemini CLI GitHub Action**](https://github.com/google-github-actions/run-gemini-cli):
99
+
100
+ - **Pull Request Reviews**: Automated code review with contextual feedback and suggestions
101
+ - **Issue Triage**: Automated labeling and prioritization of GitHub issues based on content analysis
102
+ - **On-demand Assistance**: Mention `@gemini-cli` in issues and pull requests for help with debugging, explanations, or task delegation
103
+ - **Custom Workflows**: Build automated, scheduled and on-demand workflows tailored to your team's needs
104
+
105
+ ## 🔐 Authentication Options
106
+
107
+ Choose the authentication method that best fits your needs:
108
+
109
+ ### Option 1: OAuth login (Using your Google Account)
110
+
111
+ **✨ Best for:** Individual developers as well as anyone who has a Gemini Code Assist License. (see [quota limits and terms of service](https://cloud.google.com/gemini/docs/quotas) for details)
112
+
113
+ **Benefits:**
114
+
115
+ - **Free tier**: 60 requests/min and 1,000 requests/day
116
+ - **Gemini 2.5 Pro** with 1M token context window
117
+ - **No API key management** - just sign in with your Google account
118
+ - **Automatic updates** to latest models
119
+
120
+ #### Start Gemini CLI, then choose OAuth and follow the browser authentication flow when prompted
121
+
122
+ ```bash
123
+ gemini
124
+ ```
125
+
126
+ #### If you are using a paid Code Assist License from your organization, remember to set the Google Cloud Project
127
+
128
+ ```bash
129
+ # Set your Google Cloud Project
130
+ export GOOGLE_CLOUD_PROJECT="YOUR_PROJECT_NAME"
131
+ gemini
132
+ ```
133
+
134
+ ### Option 2: Gemini API Key
135
+
136
+ **✨ Best for:** Developers who need specific model control or paid tier access
137
+
138
+ **Benefits:**
139
+
140
+ - **Free tier**: 100 requests/day with Gemini 2.5 Pro
141
+ - **Model selection**: Choose specific Gemini models
142
+ - **Usage-based billing**: Upgrade for higher limits when needed
143
+
144
+ ```bash
145
+ # Get your key from https://aistudio.google.com/apikey
146
+ export GEMINI_API_KEY="YOUR_API_KEY"
147
+ gemini
148
+ ```
149
+
150
+ ### Option 3: Vertex AI
151
+
152
+ **✨ Best for:** Enterprise teams and production workloads
153
+
154
+ **Benefits:**
155
+
156
+ - **Enterprise features**: Advanced security and compliance
157
+ - **Scalable**: Higher rate limits with billing account
158
+ - **Integration**: Works with existing Google Cloud infrastructure
159
+
160
+ ```bash
161
+ # Get your key from Google Cloud Console
162
+ export GOOGLE_API_KEY="YOUR_API_KEY"
163
+ export GOOGLE_GENAI_USE_VERTEXAI=true
164
+ gemini
165
+ ```
166
+
167
+ For Google Workspace accounts and other authentication methods, see the [authentication guide](./docs/cli/authentication.md).
168
+
169
+ ## 🚀 Getting Started
170
+
171
+ ### Basic Usage
172
+
173
+ #### Start in current directory
174
+
175
+ ```bash
176
+ gemini
177
+ ```
178
+
179
+ #### Include multiple directories
180
+
181
+ ```bash
182
+ gemini --include-directories ../lib,../docs
183
+ ```
184
+
185
+ #### Use specific model
186
+
187
+ ```bash
188
+ gemini -m gemini-2.5-flash
189
+ ```
190
+
191
+ #### Non-interactive mode for scripts
192
+
193
+ ```bash
194
+ gemini -p "Explain the architecture of this codebase"
195
+ ```
196
+
197
+ ### Quick Examples
198
+
199
+ #### Start a new project
200
+
201
+ ```bash
202
+ cd new-project/
203
+ gemini
204
+ > Write me a Discord bot that answers questions using a FAQ.md file I will provide
205
+ ```
206
+
207
+ #### Analyze existing code
208
+
209
+ ```bash
210
+ git clone https://github.com/google-gemini/gemini-cli
211
+ cd gemini-cli
212
+ gemini
213
+ > Give me a summary of all of the changes that went in yesterday
214
+ ```
215
+
216
+ ## 📚 Documentation
217
+
218
+ ### Getting Started
219
+
220
+ - [**Quickstart Guide**](./docs/cli/index.md) - Get up and running quickly
221
+ - [**Authentication Setup**](./docs/cli/authentication.md) - Detailed auth configuration
222
+ - [**Configuration Guide**](./docs/cli/configuration.md) - Settings and customization
223
+ - [**Keyboard Shortcuts**](./docs/keyboard-shortcuts.md) - Productivity tips
224
+
225
+ ### Core Features
226
+
227
+ - [**Commands Reference**](./docs/cli/commands.md) - All slash commands (`/help`, `/chat`, `/mcp`, etc.)
228
+ - [**Checkpointing**](./docs/checkpointing.md) - Save and resume conversations
229
+ - [**Memory Management**](./docs/tools/memory.md) - Using GEMINI.md context files
230
+ - [**Token Caching**](./docs/cli/token-caching.md) - Optimize token usage
231
+
232
+ ### Tools & Extensions
233
+
234
+ - [**Built-in Tools Overview**](./docs/tools/index.md)
235
+ - [File System Operations](./docs/tools/file-system.md)
236
+ - [Shell Commands](./docs/tools/shell.md)
237
+ - [Web Fetch & Search](./docs/tools/web-fetch.md)
238
+ - [Multi-file Operations](./docs/tools/multi-file.md)
239
+ - [**MCP Server Integration**](./docs/tools/mcp-server.md) - Extend with custom tools
240
+ - [**Custom Extensions**](./docs/extension.md) - Build your own commands
241
+
242
+ ### Advanced Topics
243
+
244
+ - [**Architecture Overview**](./docs/architecture.md) - How Gemini CLI works
245
+ - [**IDE Integration**](./docs/ide-integration.md) - VS Code companion
246
+ - [**Sandboxing & Security**](./docs/sandbox.md) - Safe execution environments
247
+ - [**Enterprise Deployment**](./docs/deployment.md) - Docker, system-wide config
248
+ - [**Telemetry & Monitoring**](./docs/telemetry.md) - Usage tracking
249
+ - [**Tools API Development**](./docs/core/tools-api.md) - Create custom tools
250
+
251
+ ### Configuration & Customization
252
+
253
+ - [**Settings Reference**](./docs/cli/configuration.md) - All configuration options
254
+ - [**Theme Customization**](./docs/cli/themes.md) - Visual customization
255
+ - [**.gemini Directory**](./docs/gemini-ignore.md) - Project-specific settings
256
+ - [**Environment Variables**](./docs/cli/configuration.md#environment-variables)
257
+
258
+ ### Troubleshooting & Support
259
+
260
+ - [**Troubleshooting Guide**](./docs/troubleshooting.md) - Common issues and solutions
261
+ - [**FAQ**](./docs/troubleshooting.md#frequently-asked-questions) - Quick answers
262
+ - Use `/bug` command to report issues directly from the CLI
263
+
264
+ ### Using MCP Servers
265
+
266
+ Configure MCP servers in `~/.gemini/settings.json` to extend Gemini CLI with custom tools:
267
+
268
+ ```text
269
+ > @github List my open pull requests
270
+ > @slack Send a summary of today's commits to #dev channel
271
+ > @database Run a query to find inactive users
272
+ ```
273
+
274
+ See the [MCP Server Integration guide](./docs/tools/mcp-server.md) for setup instructions.
275
+
276
+ ## 🤝 Contributing
277
+
278
+ We welcome contributions! Gemini CLI is fully open source (Apache 2.0), and we encourage the community to:
279
+
280
+ - Report bugs and suggest features
281
+ - Improve documentation
282
+ - Submit code improvements
283
+ - Share your MCP servers and extensions
284
+
285
+ See our [Contributing Guide](./CONTRIBUTING.md) for development setup, coding standards, and how to submit pull requests.
286
+
287
+ Check our [Official Roadmap](https://github.com/orgs/google-gemini/projects/11/) for planned features and priorities.
288
+
289
+ ## 📖 Resources
290
+
291
+ - **[Official Roadmap](./ROADMAP.md)** - See what's coming next
292
+ - **[NPM Package](https://www.npmjs.com/package/@google/gemini-cli)** - Package registry
293
+ - **[GitHub Issues](https://github.com/google-gemini/gemini-cli/issues)** - Report bugs or request features
294
+ - **[Security Advisories](https://github.com/google-gemini/gemini-cli/security/advisories)** - Security updates
295
+
296
+ ### Uninstall
297
+
298
+ See the [Uninstall Guide](docs/Uninstall.md) for removal instructions.
299
+
300
+ ## 📄 Legal
301
+
302
+ - **License**: [Apache License 2.0](LICENSE)
303
+ - **Terms of Service**: [Terms & Privacy](./docs/tos-privacy.md)
304
+ - **Security**: [Security Policy](SECURITY.md)
305
+
306
+ ---
307
+
308
+ <p align="center">
309
+ Built with ❤️ by Google and the open source community
310
+ </p>
File without changes
@@ -0,0 +1,12 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2025 Google LLC
4
+ * SPDX-License-Identifier: Apache-2.0
5
+ */
6
+ export * from './src/index.js';
7
+ export { Storage } from './src/config/storage.js';
8
+ export { DEFAULT_GEMINI_MODEL, DEFAULT_GEMINI_FLASH_MODEL, DEFAULT_GEMINI_FLASH_LITE_MODEL, DEFAULT_GEMINI_EMBEDDING_MODEL, } from './src/config/models.js';
9
+ export { logIdeConnection } from './src/telemetry/loggers.js';
10
+ export { IdeConnectionEvent, IdeConnectionType, } from './src/telemetry/types.js';
11
+ export { makeFakeConfig } from './src/test-utils/config.js';
12
+ export * from './src/utils/pathReader.js';
package/dist/index.js ADDED
@@ -0,0 +1,13 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2025 Google LLC
4
+ * SPDX-License-Identifier: Apache-2.0
5
+ */
6
+ export * from './src/index.js';
7
+ export { Storage } from './src/config/storage.js';
8
+ export { DEFAULT_GEMINI_MODEL, DEFAULT_GEMINI_FLASH_MODEL, DEFAULT_GEMINI_FLASH_LITE_MODEL, DEFAULT_GEMINI_EMBEDDING_MODEL, } from './src/config/models.js';
9
+ export { logIdeConnection } from './src/telemetry/loggers.js';
10
+ export { IdeConnectionEvent, IdeConnectionType, } from './src/telemetry/types.js';
11
+ export { makeFakeConfig } from './src/test-utils/config.js';
12
+ export * from './src/utils/pathReader.js';
13
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,cAAc,gBAAgB,CAAC;AAC/B,OAAO,EAAE,OAAO,EAAE,MAAM,yBAAyB,CAAC;AAClD,OAAO,EACL,oBAAoB,EACpB,0BAA0B,EAC1B,+BAA+B,EAC/B,8BAA8B,GAC/B,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AAC9D,OAAO,EACL,kBAAkB,EAClB,iBAAiB,GAClB,MAAM,0BAA0B,CAAC;AAClC,OAAO,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AAC5D,cAAc,2BAA2B,CAAC"}
@@ -0,0 +1,11 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2025 Google LLC
4
+ * SPDX-License-Identifier: Apache-2.0
5
+ */
6
+ import * as actualFsPromises from 'node:fs/promises';
7
+ export declare const mockControl: {
8
+ mockReadFile: import("vitest").Mock<(...args: any[]) => any>;
9
+ };
10
+ export declare const access: typeof actualFsPromises.access, appendFile: typeof actualFsPromises.appendFile, chmod: typeof actualFsPromises.chmod, chown: typeof actualFsPromises.chown, copyFile: typeof actualFsPromises.copyFile, cp: typeof actualFsPromises.cp, lchmod: typeof actualFsPromises.lchmod, lchown: typeof actualFsPromises.lchown, link: typeof actualFsPromises.link, lstat: typeof actualFsPromises.lstat, mkdir: typeof actualFsPromises.mkdir, open: typeof actualFsPromises.open, opendir: typeof actualFsPromises.opendir, readdir: typeof actualFsPromises.readdir, readlink: typeof actualFsPromises.readlink, realpath: typeof actualFsPromises.realpath, rename: typeof actualFsPromises.rename, rmdir: typeof actualFsPromises.rmdir, rm: typeof actualFsPromises.rm, stat: typeof actualFsPromises.stat, symlink: typeof actualFsPromises.symlink, truncate: typeof actualFsPromises.truncate, unlink: typeof actualFsPromises.unlink, utimes: typeof actualFsPromises.utimes, watch: typeof actualFsPromises.watch, writeFile: typeof actualFsPromises.writeFile;
11
+ export declare const readFile: import("vitest").Mock<(...args: any[]) => any>;
@@ -0,0 +1,17 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2025 Google LLC
4
+ * SPDX-License-Identifier: Apache-2.0
5
+ */
6
+ import { vi } from 'vitest';
7
+ import * as actualFsPromises from 'node:fs/promises';
8
+ const readFileMock = vi.fn();
9
+ // Export a control object so tests can access and manipulate the mock
10
+ export const mockControl = {
11
+ mockReadFile: readFileMock,
12
+ };
13
+ // Export all other functions from the actual fs/promises module
14
+ export const { access, appendFile, chmod, chown, copyFile, cp, lchmod, lchown, link, lstat, mkdir, open, opendir, readdir, readlink, realpath, rename, rmdir, rm, stat, symlink, truncate, unlink, utimes, watch, writeFile, } = actualFsPromises;
15
+ // Override readFile with our mock
16
+ export const readFile = readFileMock;
17
+ //# sourceMappingURL=promises.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"promises.js","sourceRoot":"","sources":["../../../../src/__mocks__/fs/promises.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,EAAE,EAAE,MAAM,QAAQ,CAAC;AAC5B,OAAO,KAAK,gBAAgB,MAAM,kBAAkB,CAAC;AAErD,MAAM,YAAY,GAAG,EAAE,CAAC,EAAE,EAAE,CAAC;AAE7B,sEAAsE;AACtE,MAAM,CAAC,MAAM,WAAW,GAAG;IACzB,YAAY,EAAE,YAAY;CAC3B,CAAC;AAEF,gEAAgE;AAChE,MAAM,CAAC,MAAM,EACX,MAAM,EACN,UAAU,EACV,KAAK,EACL,KAAK,EACL,QAAQ,EACR,EAAE,EACF,MAAM,EACN,MAAM,EACN,IAAI,EACJ,KAAK,EACL,KAAK,EACL,IAAI,EACJ,OAAO,EACP,OAAO,EACP,QAAQ,EACR,QAAQ,EACR,MAAM,EACN,KAAK,EACL,EAAE,EACF,IAAI,EACJ,OAAO,EACP,QAAQ,EACR,MAAM,EACN,MAAM,EACN,KAAK,EACL,SAAS,GACV,GAAG,gBAAgB,CAAC;AAErB,kCAAkC;AAClC,MAAM,CAAC,MAAM,QAAQ,GAAG,YAAY,CAAC"}
@@ -0,0 +1,10 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2025 Google LLC
4
+ * SPDX-License-Identifier: Apache-2.0
5
+ */
6
+ import type { ContentGenerator } from '../core/contentGenerator.js';
7
+ import { AuthType } from '../core/contentGenerator.js';
8
+ import type { HttpOptions } from './server.js';
9
+ import type { Config } from '../config/config.js';
10
+ export declare function createCodeAssistContentGenerator(httpOptions: HttpOptions, authType: AuthType, config: Config, sessionId?: string): Promise<ContentGenerator>;
@@ -0,0 +1,19 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2025 Google LLC
4
+ * SPDX-License-Identifier: Apache-2.0
5
+ */
6
+ import { AuthType } from '../core/contentGenerator.js';
7
+ import { getOauthClient } from './oauth2.js';
8
+ import { setupUser } from './setup.js';
9
+ import { CodeAssistServer } from './server.js';
10
+ export async function createCodeAssistContentGenerator(httpOptions, authType, config, sessionId) {
11
+ if (authType === AuthType.LOGIN_WITH_GOOGLE ||
12
+ authType === AuthType.CLOUD_SHELL) {
13
+ const authClient = await getOauthClient(authType, config);
14
+ const userData = await setupUser(authClient);
15
+ return new CodeAssistServer(authClient, userData.projectId, httpOptions, sessionId, userData.userTier);
16
+ }
17
+ throw new Error(`Unsupported authType: ${authType}`);
18
+ }
19
+ //# sourceMappingURL=codeAssist.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"codeAssist.js","sourceRoot":"","sources":["../../../src/code_assist/codeAssist.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,EAAE,QAAQ,EAAE,MAAM,6BAA6B,CAAC;AACvD,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAC7C,OAAO,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAEvC,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAG/C,MAAM,CAAC,KAAK,UAAU,gCAAgC,CACpD,WAAwB,EACxB,QAAkB,EAClB,MAAc,EACd,SAAkB;IAElB,IACE,QAAQ,KAAK,QAAQ,CAAC,iBAAiB;QACvC,QAAQ,KAAK,QAAQ,CAAC,WAAW,EACjC,CAAC;QACD,MAAM,UAAU,GAAG,MAAM,cAAc,CAAC,QAAQ,EAAE,MAAM,CAAC,CAAC;QAC1D,MAAM,QAAQ,GAAG,MAAM,SAAS,CAAC,UAAU,CAAC,CAAC;QAC7C,OAAO,IAAI,gBAAgB,CACzB,UAAU,EACV,QAAQ,CAAC,SAAS,EAClB,WAAW,EACX,SAAS,EACT,QAAQ,CAAC,QAAQ,CAClB,CAAC;IACJ,CAAC;IAED,MAAM,IAAI,KAAK,CAAC,yBAAyB,QAAQ,EAAE,CAAC,CAAC;AACvD,CAAC"}