@google/gemini-cli-core 0.1.0-development.1

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 (365) hide show
  1. package/LICENSE +202 -0
  2. package/README.md +156 -0
  3. package/dist/.last_build +0 -0
  4. package/dist/index.d.ts +7 -0
  5. package/dist/index.js +8 -0
  6. package/dist/index.js.map +1 -0
  7. package/dist/src/__mocks__/fs/promises.d.ts +11 -0
  8. package/dist/src/__mocks__/fs/promises.js +17 -0
  9. package/dist/src/__mocks__/fs/promises.js.map +1 -0
  10. package/dist/src/code_assist/codeAssist.d.ts +8 -0
  11. package/dist/src/code_assist/codeAssist.js +19 -0
  12. package/dist/src/code_assist/codeAssist.js.map +1 -0
  13. package/dist/src/code_assist/converter.d.ts +68 -0
  14. package/dist/src/code_assist/converter.js +125 -0
  15. package/dist/src/code_assist/converter.js.map +1 -0
  16. package/dist/src/code_assist/converter.test.d.ts +6 -0
  17. package/dist/src/code_assist/converter.test.js +229 -0
  18. package/dist/src/code_assist/converter.test.js.map +1 -0
  19. package/dist/src/code_assist/oauth2.d.ts +26 -0
  20. package/dist/src/code_assist/oauth2.js +277 -0
  21. package/dist/src/code_assist/oauth2.js.map +1 -0
  22. package/dist/src/code_assist/oauth2.test.d.ts +6 -0
  23. package/dist/src/code_assist/oauth2.test.js +195 -0
  24. package/dist/src/code_assist/oauth2.test.js.map +1 -0
  25. package/dist/src/code_assist/server.d.ts +35 -0
  26. package/dist/src/code_assist/server.js +123 -0
  27. package/dist/src/code_assist/server.js.map +1 -0
  28. package/dist/src/code_assist/server.test.d.ts +6 -0
  29. package/dist/src/code_assist/server.test.js +123 -0
  30. package/dist/src/code_assist/server.test.js.map +1 -0
  31. package/dist/src/code_assist/setup.d.ts +15 -0
  32. package/dist/src/code_assist/setup.js +67 -0
  33. package/dist/src/code_assist/setup.js.map +1 -0
  34. package/dist/src/code_assist/types.d.ts +148 -0
  35. package/dist/src/code_assist/types.js +46 -0
  36. package/dist/src/code_assist/types.js.map +1 -0
  37. package/dist/src/config/config.d.ts +175 -0
  38. package/dist/src/config/config.js +385 -0
  39. package/dist/src/config/config.js.map +1 -0
  40. package/dist/src/config/config.test.d.ts +6 -0
  41. package/dist/src/config/config.test.js +263 -0
  42. package/dist/src/config/config.test.js.map +1 -0
  43. package/dist/src/config/flashFallback.test.d.ts +6 -0
  44. package/dist/src/config/flashFallback.test.js +115 -0
  45. package/dist/src/config/flashFallback.test.js.map +1 -0
  46. package/dist/src/config/models.d.ts +8 -0
  47. package/dist/src/config/models.js +9 -0
  48. package/dist/src/config/models.js.map +1 -0
  49. package/dist/src/core/client.d.ts +39 -0
  50. package/dist/src/core/client.js +386 -0
  51. package/dist/src/core/client.js.map +1 -0
  52. package/dist/src/core/client.test.d.ts +6 -0
  53. package/dist/src/core/client.test.js +630 -0
  54. package/dist/src/core/client.test.js.map +1 -0
  55. package/dist/src/core/contentGenerator.d.ts +29 -0
  56. package/dist/src/core/contentGenerator.js +71 -0
  57. package/dist/src/core/contentGenerator.js.map +1 -0
  58. package/dist/src/core/contentGenerator.test.d.ts +6 -0
  59. package/dist/src/core/contentGenerator.test.js +45 -0
  60. package/dist/src/core/contentGenerator.test.js.map +1 -0
  61. package/dist/src/core/coreToolScheduler.d.ts +104 -0
  62. package/dist/src/core/coreToolScheduler.js +397 -0
  63. package/dist/src/core/coreToolScheduler.js.map +1 -0
  64. package/dist/src/core/coreToolScheduler.test.d.ts +6 -0
  65. package/dist/src/core/coreToolScheduler.test.js +318 -0
  66. package/dist/src/core/coreToolScheduler.test.js.map +1 -0
  67. package/dist/src/core/geminiChat.d.ts +116 -0
  68. package/dist/src/core/geminiChat.js +491 -0
  69. package/dist/src/core/geminiChat.js.map +1 -0
  70. package/dist/src/core/geminiChat.test.d.ts +6 -0
  71. package/dist/src/core/geminiChat.test.js +422 -0
  72. package/dist/src/core/geminiChat.test.js.map +1 -0
  73. package/dist/src/core/geminiRequest.d.ts +13 -0
  74. package/dist/src/core/geminiRequest.js +45 -0
  75. package/dist/src/core/geminiRequest.js.map +1 -0
  76. package/dist/src/core/geminiRequest.test.d.ts +6 -0
  77. package/dist/src/core/geminiRequest.test.js +72 -0
  78. package/dist/src/core/geminiRequest.test.js.map +1 -0
  79. package/dist/src/core/logger.d.ts +35 -0
  80. package/dist/src/core/logger.js +235 -0
  81. package/dist/src/core/logger.js.map +1 -0
  82. package/dist/src/core/logger.test.d.ts +6 -0
  83. package/dist/src/core/logger.test.js +387 -0
  84. package/dist/src/core/logger.test.js.map +1 -0
  85. package/dist/src/core/modelCheck.d.ts +14 -0
  86. package/dist/src/core/modelCheck.js +55 -0
  87. package/dist/src/core/modelCheck.js.map +1 -0
  88. package/dist/src/core/nonInteractiveToolExecutor.d.ts +12 -0
  89. package/dist/src/core/nonInteractiveToolExecutor.js +92 -0
  90. package/dist/src/core/nonInteractiveToolExecutor.js.map +1 -0
  91. package/dist/src/core/nonInteractiveToolExecutor.test.d.ts +6 -0
  92. package/dist/src/core/nonInteractiveToolExecutor.test.js +181 -0
  93. package/dist/src/core/nonInteractiveToolExecutor.test.js.map +1 -0
  94. package/dist/src/core/prompts.d.ts +12 -0
  95. package/dist/src/core/prompts.js +334 -0
  96. package/dist/src/core/prompts.js.map +1 -0
  97. package/dist/src/core/prompts.test.d.ts +6 -0
  98. package/dist/src/core/prompts.test.js +97 -0
  99. package/dist/src/core/prompts.test.js.map +1 -0
  100. package/dist/src/core/tokenLimits.d.ts +10 -0
  101. package/dist/src/core/tokenLimits.js +27 -0
  102. package/dist/src/core/tokenLimits.js.map +1 -0
  103. package/dist/src/core/turn.d.ts +96 -0
  104. package/dist/src/core/turn.js +125 -0
  105. package/dist/src/core/turn.js.map +1 -0
  106. package/dist/src/core/turn.test.d.ts +6 -0
  107. package/dist/src/core/turn.test.js +236 -0
  108. package/dist/src/core/turn.test.js.map +1 -0
  109. package/dist/src/index.d.ts +46 -0
  110. package/dist/src/index.js +54 -0
  111. package/dist/src/index.js.map +1 -0
  112. package/dist/src/index.test.d.ts +6 -0
  113. package/dist/src/index.test.js +12 -0
  114. package/dist/src/index.test.js.map +1 -0
  115. package/dist/src/services/fileDiscoveryService.d.ts +35 -0
  116. package/dist/src/services/fileDiscoveryService.js +91 -0
  117. package/dist/src/services/fileDiscoveryService.js.map +1 -0
  118. package/dist/src/services/fileDiscoveryService.test.d.ts +6 -0
  119. package/dist/src/services/fileDiscoveryService.test.js +102 -0
  120. package/dist/src/services/fileDiscoveryService.test.js.map +1 -0
  121. package/dist/src/services/gitService.d.ts +21 -0
  122. package/dist/src/services/gitService.js +105 -0
  123. package/dist/src/services/gitService.js.map +1 -0
  124. package/dist/src/services/gitService.test.d.ts +6 -0
  125. package/dist/src/services/gitService.test.js +233 -0
  126. package/dist/src/services/gitService.test.js.map +1 -0
  127. package/dist/src/telemetry/clearcut-logger/clearcut-logger.d.ts +33 -0
  128. package/dist/src/telemetry/clearcut-logger/clearcut-logger.js +364 -0
  129. package/dist/src/telemetry/clearcut-logger/clearcut-logger.js.map +1 -0
  130. package/dist/src/telemetry/clearcut-logger/event-metadata-key.d.ts +43 -0
  131. package/dist/src/telemetry/clearcut-logger/event-metadata-key.js +109 -0
  132. package/dist/src/telemetry/clearcut-logger/event-metadata-key.js.map +1 -0
  133. package/dist/src/telemetry/constants.d.ts +19 -0
  134. package/dist/src/telemetry/constants.js +20 -0
  135. package/dist/src/telemetry/constants.js.map +1 -0
  136. package/dist/src/telemetry/index.d.ts +18 -0
  137. package/dist/src/telemetry/index.js +20 -0
  138. package/dist/src/telemetry/index.js.map +1 -0
  139. package/dist/src/telemetry/loggers.d.ts +13 -0
  140. package/dist/src/telemetry/loggers.js +187 -0
  141. package/dist/src/telemetry/loggers.js.map +1 -0
  142. package/dist/src/telemetry/loggers.test.d.ts +6 -0
  143. package/dist/src/telemetry/loggers.test.js +525 -0
  144. package/dist/src/telemetry/loggers.test.js.map +1 -0
  145. package/dist/src/telemetry/metrics.d.ts +19 -0
  146. package/dist/src/telemetry/metrics.js +144 -0
  147. package/dist/src/telemetry/metrics.js.map +1 -0
  148. package/dist/src/telemetry/metrics.test.d.ts +6 -0
  149. package/dist/src/telemetry/metrics.test.js +162 -0
  150. package/dist/src/telemetry/metrics.test.js.map +1 -0
  151. package/dist/src/telemetry/sdk.d.ts +9 -0
  152. package/dist/src/telemetry/sdk.js +116 -0
  153. package/dist/src/telemetry/sdk.js.map +1 -0
  154. package/dist/src/telemetry/telemetry.test.d.ts +6 -0
  155. package/dist/src/telemetry/telemetry.test.js +50 -0
  156. package/dist/src/telemetry/telemetry.test.js.map +1 -0
  157. package/dist/src/telemetry/types.d.ts +91 -0
  158. package/dist/src/telemetry/types.js +176 -0
  159. package/dist/src/telemetry/types.js.map +1 -0
  160. package/dist/src/telemetry/uiTelemetry.d.ts +67 -0
  161. package/dist/src/telemetry/uiTelemetry.js +131 -0
  162. package/dist/src/telemetry/uiTelemetry.js.map +1 -0
  163. package/dist/src/telemetry/uiTelemetry.test.d.ts +6 -0
  164. package/dist/src/telemetry/uiTelemetry.test.js +411 -0
  165. package/dist/src/telemetry/uiTelemetry.test.js.map +1 -0
  166. package/dist/src/tools/diffOptions.d.ts +7 -0
  167. package/dist/src/tools/diffOptions.js +10 -0
  168. package/dist/src/tools/diffOptions.js.map +1 -0
  169. package/dist/src/tools/edit.d.ts +84 -0
  170. package/dist/src/tools/edit.js +359 -0
  171. package/dist/src/tools/edit.js.map +1 -0
  172. package/dist/src/tools/edit.test.d.ts +6 -0
  173. package/dist/src/tools/edit.test.js +500 -0
  174. package/dist/src/tools/edit.test.js.map +1 -0
  175. package/dist/src/tools/glob.d.ts +71 -0
  176. package/dist/src/tools/glob.js +215 -0
  177. package/dist/src/tools/glob.js.map +1 -0
  178. package/dist/src/tools/glob.test.d.ts +6 -0
  179. package/dist/src/tools/glob.test.js +293 -0
  180. package/dist/src/tools/glob.test.js.map +1 -0
  181. package/dist/src/tools/grep.d.ts +81 -0
  182. package/dist/src/tools/grep.js +427 -0
  183. package/dist/src/tools/grep.js.map +1 -0
  184. package/dist/src/tools/grep.test.d.ts +6 -0
  185. package/dist/src/tools/grep.test.js +185 -0
  186. package/dist/src/tools/grep.test.js.map +1 -0
  187. package/dist/src/tools/ls.d.ts +94 -0
  188. package/dist/src/tools/ls.js +215 -0
  189. package/dist/src/tools/ls.js.map +1 -0
  190. package/dist/src/tools/mcp-client.d.ts +56 -0
  191. package/dist/src/tools/mcp-client.js +302 -0
  192. package/dist/src/tools/mcp-client.js.map +1 -0
  193. package/dist/src/tools/mcp-client.test.d.ts +6 -0
  194. package/dist/src/tools/mcp-client.test.js +608 -0
  195. package/dist/src/tools/mcp-client.test.js.map +1 -0
  196. package/dist/src/tools/mcp-tool.d.ts +23 -0
  197. package/dist/src/tools/mcp-tool.js +119 -0
  198. package/dist/src/tools/mcp-tool.js.map +1 -0
  199. package/dist/src/tools/mcp-tool.test.d.ts +6 -0
  200. package/dist/src/tools/mcp-tool.test.js +173 -0
  201. package/dist/src/tools/mcp-tool.test.js.map +1 -0
  202. package/dist/src/tools/memoryTool.d.ts +28 -0
  203. package/dist/src/tools/memoryTool.js +171 -0
  204. package/dist/src/tools/memoryTool.js.map +1 -0
  205. package/dist/src/tools/memoryTool.test.d.ts +6 -0
  206. package/dist/src/tools/memoryTool.test.js +181 -0
  207. package/dist/src/tools/memoryTool.test.js.map +1 -0
  208. package/dist/src/tools/modifiable-tool.d.ts +29 -0
  209. package/dist/src/tools/modifiable-tool.js +85 -0
  210. package/dist/src/tools/modifiable-tool.js.map +1 -0
  211. package/dist/src/tools/modifiable-tool.test.d.ts +6 -0
  212. package/dist/src/tools/modifiable-tool.test.js +204 -0
  213. package/dist/src/tools/modifiable-tool.test.js.map +1 -0
  214. package/dist/src/tools/read-file.d.ts +36 -0
  215. package/dist/src/tools/read-file.js +103 -0
  216. package/dist/src/tools/read-file.js.map +1 -0
  217. package/dist/src/tools/read-file.test.d.ts +6 -0
  218. package/dist/src/tools/read-file.test.js +180 -0
  219. package/dist/src/tools/read-file.test.js.map +1 -0
  220. package/dist/src/tools/read-many-files.d.ts +65 -0
  221. package/dist/src/tools/read-many-files.js +344 -0
  222. package/dist/src/tools/read-many-files.js.map +1 -0
  223. package/dist/src/tools/read-many-files.test.d.ts +6 -0
  224. package/dist/src/tools/read-many-files.test.js +300 -0
  225. package/dist/src/tools/read-many-files.test.js.map +1 -0
  226. package/dist/src/tools/shell.d.ts +43 -0
  227. package/dist/src/tools/shell.js +421 -0
  228. package/dist/src/tools/shell.js.map +1 -0
  229. package/dist/src/tools/shell.test.d.ts +6 -0
  230. package/dist/src/tools/shell.test.js +321 -0
  231. package/dist/src/tools/shell.test.js.map +1 -0
  232. package/dist/src/tools/tool-registry.d.ts +67 -0
  233. package/dist/src/tools/tool-registry.js +326 -0
  234. package/dist/src/tools/tool-registry.js.map +1 -0
  235. package/dist/src/tools/tool-registry.test.d.ts +6 -0
  236. package/dist/src/tools/tool-registry.test.js +353 -0
  237. package/dist/src/tools/tool-registry.test.js.map +1 -0
  238. package/dist/src/tools/tools.d.ts +179 -0
  239. package/dist/src/tools/tools.js +88 -0
  240. package/dist/src/tools/tools.js.map +1 -0
  241. package/dist/src/tools/web-fetch.d.ts +29 -0
  242. package/dist/src/tools/web-fetch.js +240 -0
  243. package/dist/src/tools/web-fetch.js.map +1 -0
  244. package/dist/src/tools/web-fetch.test.d.ts +6 -0
  245. package/dist/src/tools/web-fetch.test.js +70 -0
  246. package/dist/src/tools/web-fetch.test.js.map +1 -0
  247. package/dist/src/tools/web-search.d.ts +49 -0
  248. package/dist/src/tools/web-search.js +119 -0
  249. package/dist/src/tools/web-search.js.map +1 -0
  250. package/dist/src/tools/write-file.d.ts +50 -0
  251. package/dist/src/tools/write-file.js +261 -0
  252. package/dist/src/tools/write-file.js.map +1 -0
  253. package/dist/src/tools/write-file.test.d.ts +6 -0
  254. package/dist/src/tools/write-file.test.js +413 -0
  255. package/dist/src/tools/write-file.test.js.map +1 -0
  256. package/dist/src/utils/LruCache.d.ts +13 -0
  257. package/dist/src/utils/LruCache.js +38 -0
  258. package/dist/src/utils/LruCache.js.map +1 -0
  259. package/dist/src/utils/bfsFileSearch.d.ts +22 -0
  260. package/dist/src/utils/bfsFileSearch.js +62 -0
  261. package/dist/src/utils/bfsFileSearch.js.map +1 -0
  262. package/dist/src/utils/bfsFileSearch.test.d.ts +6 -0
  263. package/dist/src/utils/bfsFileSearch.test.js +129 -0
  264. package/dist/src/utils/bfsFileSearch.test.js.map +1 -0
  265. package/dist/src/utils/editCorrector.d.ts +53 -0
  266. package/dist/src/utils/editCorrector.js +546 -0
  267. package/dist/src/utils/editCorrector.js.map +1 -0
  268. package/dist/src/utils/editCorrector.test.d.ts +6 -0
  269. package/dist/src/utils/editCorrector.test.js +560 -0
  270. package/dist/src/utils/editCorrector.test.js.map +1 -0
  271. package/dist/src/utils/editor.d.ts +28 -0
  272. package/dist/src/utils/editor.js +163 -0
  273. package/dist/src/utils/editor.js.map +1 -0
  274. package/dist/src/utils/editor.test.d.ts +6 -0
  275. package/dist/src/utils/editor.test.js +293 -0
  276. package/dist/src/utils/editor.test.js.map +1 -0
  277. package/dist/src/utils/errorReporting.d.ts +14 -0
  278. package/dist/src/utils/errorReporting.js +88 -0
  279. package/dist/src/utils/errorReporting.js.map +1 -0
  280. package/dist/src/utils/errorReporting.test.d.ts +6 -0
  281. package/dist/src/utils/errorReporting.test.js +124 -0
  282. package/dist/src/utils/errorReporting.test.js.map +1 -0
  283. package/dist/src/utils/errors.d.ts +14 -0
  284. package/dist/src/utils/errors.js +54 -0
  285. package/dist/src/utils/errors.js.map +1 -0
  286. package/dist/src/utils/fetch.d.ts +11 -0
  287. package/dist/src/utils/fetch.js +51 -0
  288. package/dist/src/utils/fetch.js.map +1 -0
  289. package/dist/src/utils/fileUtils.d.ts +49 -0
  290. package/dist/src/utils/fileUtils.js +284 -0
  291. package/dist/src/utils/fileUtils.js.map +1 -0
  292. package/dist/src/utils/fileUtils.test.d.ts +6 -0
  293. package/dist/src/utils/fileUtils.test.js +321 -0
  294. package/dist/src/utils/fileUtils.test.js.map +1 -0
  295. package/dist/src/utils/flashFallback.integration.test.d.ts +6 -0
  296. package/dist/src/utils/flashFallback.integration.test.js +112 -0
  297. package/dist/src/utils/flashFallback.integration.test.js.map +1 -0
  298. package/dist/src/utils/generateContentResponseUtilities.d.ts +14 -0
  299. package/dist/src/utils/generateContentResponseUtilities.js +92 -0
  300. package/dist/src/utils/generateContentResponseUtilities.js.map +1 -0
  301. package/dist/src/utils/generateContentResponseUtilities.test.d.ts +6 -0
  302. package/dist/src/utils/generateContentResponseUtilities.test.js +273 -0
  303. package/dist/src/utils/generateContentResponseUtilities.test.js.map +1 -0
  304. package/dist/src/utils/getFolderStructure.d.ts +30 -0
  305. package/dist/src/utils/getFolderStructure.js +247 -0
  306. package/dist/src/utils/getFolderStructure.js.map +1 -0
  307. package/dist/src/utils/getFolderStructure.test.d.ts +6 -0
  308. package/dist/src/utils/getFolderStructure.test.js +300 -0
  309. package/dist/src/utils/getFolderStructure.test.js.map +1 -0
  310. package/dist/src/utils/gitIgnoreParser.d.ts +20 -0
  311. package/dist/src/utils/gitIgnoreParser.js +64 -0
  312. package/dist/src/utils/gitIgnoreParser.js.map +1 -0
  313. package/dist/src/utils/gitIgnoreParser.test.d.ts +6 -0
  314. package/dist/src/utils/gitIgnoreParser.test.js +145 -0
  315. package/dist/src/utils/gitIgnoreParser.test.js.map +1 -0
  316. package/dist/src/utils/gitUtils.d.ts +17 -0
  317. package/dist/src/utils/gitUtils.js +61 -0
  318. package/dist/src/utils/gitUtils.js.map +1 -0
  319. package/dist/src/utils/memoryDiscovery.d.ts +14 -0
  320. package/dist/src/utils/memoryDiscovery.js +219 -0
  321. package/dist/src/utils/memoryDiscovery.js.map +1 -0
  322. package/dist/src/utils/memoryDiscovery.test.d.ts +6 -0
  323. package/dist/src/utils/memoryDiscovery.test.js +432 -0
  324. package/dist/src/utils/memoryDiscovery.test.js.map +1 -0
  325. package/dist/src/utils/memoryImportProcessor.d.ts +35 -0
  326. package/dist/src/utils/memoryImportProcessor.js +141 -0
  327. package/dist/src/utils/memoryImportProcessor.js.map +1 -0
  328. package/dist/src/utils/memoryImportProcessor.test.d.ts +6 -0
  329. package/dist/src/utils/memoryImportProcessor.test.js +170 -0
  330. package/dist/src/utils/memoryImportProcessor.test.js.map +1 -0
  331. package/dist/src/utils/messageInspectors.d.ts +8 -0
  332. package/dist/src/utils/messageInspectors.js +16 -0
  333. package/dist/src/utils/messageInspectors.js.map +1 -0
  334. package/dist/src/utils/nextSpeakerChecker.d.ts +12 -0
  335. package/dist/src/utils/nextSpeakerChecker.js +111 -0
  336. package/dist/src/utils/nextSpeakerChecker.js.map +1 -0
  337. package/dist/src/utils/nextSpeakerChecker.test.d.ts +6 -0
  338. package/dist/src/utils/nextSpeakerChecker.test.js +152 -0
  339. package/dist/src/utils/nextSpeakerChecker.test.js.map +1 -0
  340. package/dist/src/utils/paths.d.ts +47 -0
  341. package/dist/src/utils/paths.js +136 -0
  342. package/dist/src/utils/paths.js.map +1 -0
  343. package/dist/src/utils/retry.d.ts +21 -0
  344. package/dist/src/utils/retry.js +220 -0
  345. package/dist/src/utils/retry.js.map +1 -0
  346. package/dist/src/utils/retry.test.d.ts +6 -0
  347. package/dist/src/utils/retry.test.js +322 -0
  348. package/dist/src/utils/retry.test.js.map +1 -0
  349. package/dist/src/utils/schemaValidator.d.ts +17 -0
  350. package/dist/src/utils/schemaValidator.js +50 -0
  351. package/dist/src/utils/schemaValidator.js.map +1 -0
  352. package/dist/src/utils/session.d.ts +6 -0
  353. package/dist/src/utils/session.js +8 -0
  354. package/dist/src/utils/session.js.map +1 -0
  355. package/dist/src/utils/testUtils.d.ts +29 -0
  356. package/dist/src/utils/testUtils.js +70 -0
  357. package/dist/src/utils/testUtils.js.map +1 -0
  358. package/dist/src/utils/user_id.d.ts +17 -0
  359. package/dist/src/utils/user_id.js +70 -0
  360. package/dist/src/utils/user_id.js.map +1 -0
  361. package/dist/src/utils/user_id.test.d.ts +6 -0
  362. package/dist/src/utils/user_id.test.js +42 -0
  363. package/dist/src/utils/user_id.test.js.map +1 -0
  364. package/dist/tsconfig.tsbuildinfo +1 -0
  365. package/package.json +60 -0
@@ -0,0 +1,344 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2025 Google LLC
4
+ * SPDX-License-Identifier: Apache-2.0
5
+ */
6
+ import { BaseTool } from './tools.js';
7
+ import { SchemaValidator } from '../utils/schemaValidator.js';
8
+ import { getErrorMessage } from '../utils/errors.js';
9
+ import * as path from 'path';
10
+ import { glob } from 'glob';
11
+ import { getCurrentGeminiMdFilename } from './memoryTool.js';
12
+ import { detectFileType, processSingleFileContent, DEFAULT_ENCODING, getSpecificMimeType, } from '../utils/fileUtils.js';
13
+ import { recordFileOperationMetric, FileOperation, } from '../telemetry/metrics.js';
14
+ /**
15
+ * Default exclusion patterns for commonly ignored directories and binary file types.
16
+ * These are compatible with glob ignore patterns.
17
+ * TODO(adh): Consider making this configurable or extendable through a command line argument.
18
+ * TODO(adh): Look into sharing this list with the glob tool.
19
+ */
20
+ const DEFAULT_EXCLUDES = [
21
+ '**/node_modules/**',
22
+ '**/.git/**',
23
+ '**/.vscode/**',
24
+ '**/.idea/**',
25
+ '**/dist/**',
26
+ '**/build/**',
27
+ '**/coverage/**',
28
+ '**/__pycache__/**',
29
+ '**/*.pyc',
30
+ '**/*.pyo',
31
+ '**/*.bin',
32
+ '**/*.exe',
33
+ '**/*.dll',
34
+ '**/*.so',
35
+ '**/*.dylib',
36
+ '**/*.class',
37
+ '**/*.jar',
38
+ '**/*.war',
39
+ '**/*.zip',
40
+ '**/*.tar',
41
+ '**/*.gz',
42
+ '**/*.bz2',
43
+ '**/*.rar',
44
+ '**/*.7z',
45
+ '**/*.doc',
46
+ '**/*.docx',
47
+ '**/*.xls',
48
+ '**/*.xlsx',
49
+ '**/*.ppt',
50
+ '**/*.pptx',
51
+ '**/*.odt',
52
+ '**/*.ods',
53
+ '**/*.odp',
54
+ '**/*.DS_Store',
55
+ '**/.env',
56
+ `**/${getCurrentGeminiMdFilename()}`,
57
+ ];
58
+ const DEFAULT_OUTPUT_SEPARATOR_FORMAT = '--- {filePath} ---';
59
+ /**
60
+ * Tool implementation for finding and reading multiple text files from the local filesystem
61
+ * within a specified target directory. The content is concatenated.
62
+ * It is intended to run in an environment with access to the local file system (e.g., a Node.js backend).
63
+ */
64
+ export class ReadManyFilesTool extends BaseTool {
65
+ targetDir;
66
+ config;
67
+ static Name = 'read_many_files';
68
+ geminiIgnorePatterns = [];
69
+ /**
70
+ * Creates an instance of ReadManyFilesTool.
71
+ * @param targetDir The absolute root directory within which this tool is allowed to operate.
72
+ * All paths provided in `params` will be resolved relative to this directory.
73
+ */
74
+ constructor(targetDir, config) {
75
+ const parameterSchema = {
76
+ type: 'object',
77
+ properties: {
78
+ paths: {
79
+ type: 'array',
80
+ items: { type: 'string' },
81
+ description: "Required. An array of glob patterns or paths relative to the tool's target directory. Examples: ['src/**/*.ts'], ['README.md', 'docs/']",
82
+ },
83
+ include: {
84
+ type: 'array',
85
+ items: { type: 'string' },
86
+ description: 'Optional. Additional glob patterns to include. These are merged with `paths`. Example: ["*.test.ts"] to specifically add test files if they were broadly excluded.',
87
+ default: [],
88
+ },
89
+ exclude: {
90
+ type: 'array',
91
+ items: { type: 'string' },
92
+ description: 'Optional. Glob patterns for files/directories to exclude. Added to default excludes if useDefaultExcludes is true. Example: ["**/*.log", "temp/"]',
93
+ default: [],
94
+ },
95
+ recursive: {
96
+ type: 'boolean',
97
+ description: 'Optional. Whether to search recursively (primarily controlled by `**` in glob patterns). Defaults to true.',
98
+ default: true,
99
+ },
100
+ useDefaultExcludes: {
101
+ type: 'boolean',
102
+ description: 'Optional. Whether to apply a list of default exclusion patterns (e.g., node_modules, .git, binary files). Defaults to true.',
103
+ default: true,
104
+ },
105
+ respect_git_ignore: {
106
+ type: 'boolean',
107
+ description: 'Optional. Whether to respect .gitignore patterns when discovering files. Only available in git repositories. Defaults to true.',
108
+ default: true,
109
+ },
110
+ },
111
+ required: ['paths'],
112
+ };
113
+ super(ReadManyFilesTool.Name, 'ReadManyFiles', `Reads content from multiple files specified by paths or glob patterns within a configured target directory. For text files, it concatenates their content into a single string. It is primarily designed for text-based files. However, it can also process image (e.g., .png, .jpg) and PDF (.pdf) files if their file names or extensions are explicitly included in the 'paths' argument. For these explicitly requested non-text files, their data is read and included in a format suitable for model consumption (e.g., base64 encoded).
114
+
115
+ This tool is useful when you need to understand or analyze a collection of files, such as:
116
+ - Getting an overview of a codebase or parts of it (e.g., all TypeScript files in the 'src' directory).
117
+ - Finding where specific functionality is implemented if the user asks broad questions about code.
118
+ - Reviewing documentation files (e.g., all Markdown files in the 'docs' directory).
119
+ - Gathering context from multiple configuration files.
120
+ - When the user asks to "read all files in X directory" or "show me the content of all Y files".
121
+
122
+ Use this tool when the user's query implies needing the content of several files simultaneously for context, analysis, or summarization. For text files, it uses default UTF-8 encoding and a '--- {filePath} ---' separator between file contents. Ensure paths are relative to the target directory. Glob patterns like 'src/**/*.js' are supported. Avoid using for single files if a more specific single-file reading tool is available, unless the user specifically requests to process a list containing just one file via this tool. Other binary files (not explicitly requested as image/PDF) are generally skipped. Default excludes apply to common non-text files (except for explicitly requested images/PDFs) and large dependency directories unless 'useDefaultExcludes' is false.`, parameterSchema);
123
+ this.targetDir = targetDir;
124
+ this.config = config;
125
+ this.targetDir = path.resolve(targetDir);
126
+ this.geminiIgnorePatterns = config
127
+ .getFileService()
128
+ .getGeminiIgnorePatterns();
129
+ }
130
+ validateParams(params) {
131
+ if (!params.paths ||
132
+ !Array.isArray(params.paths) ||
133
+ params.paths.length === 0) {
134
+ return 'The "paths" parameter is required and must be a non-empty array of strings/glob patterns.';
135
+ }
136
+ if (this.schema.parameters &&
137
+ !SchemaValidator.validate(this.schema.parameters, params)) {
138
+ if (!params.paths ||
139
+ !Array.isArray(params.paths) ||
140
+ params.paths.length === 0) {
141
+ return 'The "paths" parameter is required and must be a non-empty array of strings/glob patterns.';
142
+ }
143
+ return 'Parameters failed schema validation. Ensure "paths" is a non-empty array and other parameters match their expected types.';
144
+ }
145
+ for (const p of params.paths) {
146
+ if (typeof p !== 'string' || p.trim() === '') {
147
+ return 'Each item in "paths" must be a non-empty string/glob pattern.';
148
+ }
149
+ }
150
+ if (params.include &&
151
+ (!Array.isArray(params.include) ||
152
+ !params.include.every((item) => typeof item === 'string'))) {
153
+ return 'If provided, "include" must be an array of strings/glob patterns.';
154
+ }
155
+ if (params.exclude &&
156
+ (!Array.isArray(params.exclude) ||
157
+ !params.exclude.every((item) => typeof item === 'string'))) {
158
+ return 'If provided, "exclude" must be an array of strings/glob patterns.';
159
+ }
160
+ return null;
161
+ }
162
+ getDescription(params) {
163
+ const allPatterns = [...params.paths, ...(params.include || [])];
164
+ const pathDesc = `using patterns: \`${allPatterns.join('`, `')}\` (within target directory: \`${this.targetDir}\`)`;
165
+ // Determine the final list of exclusion patterns exactly as in execute method
166
+ const paramExcludes = params.exclude || [];
167
+ const paramUseDefaultExcludes = params.useDefaultExcludes !== false;
168
+ const finalExclusionPatternsForDescription = paramUseDefaultExcludes
169
+ ? [...DEFAULT_EXCLUDES, ...paramExcludes, ...this.geminiIgnorePatterns]
170
+ : [...paramExcludes, ...this.geminiIgnorePatterns];
171
+ let excludeDesc = `Excluding: ${finalExclusionPatternsForDescription.length > 0 ? `patterns like \`${finalExclusionPatternsForDescription.slice(0, 2).join('`, `')}${finalExclusionPatternsForDescription.length > 2 ? '...`' : '`'}` : 'none specified'}`;
172
+ // Add a note if .geminiignore patterns contributed to the final list of exclusions
173
+ if (this.geminiIgnorePatterns.length > 0) {
174
+ const geminiPatternsInEffect = this.geminiIgnorePatterns.filter((p) => finalExclusionPatternsForDescription.includes(p)).length;
175
+ if (geminiPatternsInEffect > 0) {
176
+ excludeDesc += ` (includes ${geminiPatternsInEffect} from .geminiignore)`;
177
+ }
178
+ }
179
+ return `Will attempt to read and concatenate files ${pathDesc}. ${excludeDesc}. File encoding: ${DEFAULT_ENCODING}. Separator: "${DEFAULT_OUTPUT_SEPARATOR_FORMAT.replace('{filePath}', 'path/to/file.ext')}".`;
180
+ }
181
+ async execute(params, signal) {
182
+ const validationError = this.validateParams(params);
183
+ if (validationError) {
184
+ return {
185
+ llmContent: `Error: Invalid parameters for ${this.displayName}. Reason: ${validationError}`,
186
+ returnDisplay: `## Parameter Error\n\n${validationError}`,
187
+ };
188
+ }
189
+ const { paths: inputPatterns, include = [], exclude = [], useDefaultExcludes = true, respect_git_ignore = true, } = params;
190
+ const respectGitIgnore = respect_git_ignore ?? this.config.getFileFilteringRespectGitIgnore();
191
+ // Get centralized file discovery service
192
+ const fileDiscovery = this.config.getFileService();
193
+ const toolBaseDir = this.targetDir;
194
+ const filesToConsider = new Set();
195
+ const skippedFiles = [];
196
+ const processedFilesRelativePaths = [];
197
+ const contentParts = [];
198
+ const effectiveExcludes = useDefaultExcludes
199
+ ? [...DEFAULT_EXCLUDES, ...exclude, ...this.geminiIgnorePatterns]
200
+ : [...exclude, ...this.geminiIgnorePatterns];
201
+ const searchPatterns = [...inputPatterns, ...include];
202
+ if (searchPatterns.length === 0) {
203
+ return {
204
+ llmContent: 'No search paths or include patterns provided.',
205
+ returnDisplay: `## Information\n\nNo search paths or include patterns were specified. Nothing to read or concatenate.`,
206
+ };
207
+ }
208
+ try {
209
+ const entries = await glob(searchPatterns, {
210
+ cwd: toolBaseDir,
211
+ ignore: effectiveExcludes,
212
+ nodir: true,
213
+ dot: true,
214
+ absolute: true,
215
+ nocase: true,
216
+ signal,
217
+ });
218
+ const filteredEntries = respectGitIgnore
219
+ ? fileDiscovery
220
+ .filterFiles(entries.map((p) => path.relative(toolBaseDir, p)), {
221
+ respectGitIgnore,
222
+ })
223
+ .map((p) => path.resolve(toolBaseDir, p))
224
+ : entries;
225
+ let gitIgnoredCount = 0;
226
+ for (const absoluteFilePath of entries) {
227
+ // Security check: ensure the glob library didn't return something outside targetDir.
228
+ if (!absoluteFilePath.startsWith(toolBaseDir)) {
229
+ skippedFiles.push({
230
+ path: absoluteFilePath,
231
+ reason: `Security: Glob library returned path outside target directory. Base: ${toolBaseDir}, Path: ${absoluteFilePath}`,
232
+ });
233
+ continue;
234
+ }
235
+ // Check if this file was filtered out by git ignore
236
+ if (respectGitIgnore && !filteredEntries.includes(absoluteFilePath)) {
237
+ gitIgnoredCount++;
238
+ continue;
239
+ }
240
+ filesToConsider.add(absoluteFilePath);
241
+ }
242
+ // Add info about git-ignored files if any were filtered
243
+ if (gitIgnoredCount > 0) {
244
+ skippedFiles.push({
245
+ path: `${gitIgnoredCount} file(s)`,
246
+ reason: 'ignored',
247
+ });
248
+ }
249
+ }
250
+ catch (error) {
251
+ return {
252
+ llmContent: `Error during file search: ${getErrorMessage(error)}`,
253
+ returnDisplay: `## File Search Error\n\nAn error occurred while searching for files:\n\`\`\`\n${getErrorMessage(error)}\n\`\`\``,
254
+ };
255
+ }
256
+ const sortedFiles = Array.from(filesToConsider).sort();
257
+ for (const filePath of sortedFiles) {
258
+ const relativePathForDisplay = path
259
+ .relative(toolBaseDir, filePath)
260
+ .replace(/\\/g, '/');
261
+ const fileType = detectFileType(filePath);
262
+ if (fileType === 'image' || fileType === 'pdf') {
263
+ const fileExtension = path.extname(filePath).toLowerCase();
264
+ const fileNameWithoutExtension = path.basename(filePath, fileExtension);
265
+ const requestedExplicitly = inputPatterns.some((pattern) => pattern.toLowerCase().includes(fileExtension) ||
266
+ pattern.includes(fileNameWithoutExtension));
267
+ if (!requestedExplicitly) {
268
+ skippedFiles.push({
269
+ path: relativePathForDisplay,
270
+ reason: 'asset file (image/pdf) was not explicitly requested by name or extension',
271
+ });
272
+ continue;
273
+ }
274
+ }
275
+ // Use processSingleFileContent for all file types now
276
+ const fileReadResult = await processSingleFileContent(filePath, toolBaseDir);
277
+ if (fileReadResult.error) {
278
+ skippedFiles.push({
279
+ path: relativePathForDisplay,
280
+ reason: `Read error: ${fileReadResult.error}`,
281
+ });
282
+ }
283
+ else {
284
+ if (typeof fileReadResult.llmContent === 'string') {
285
+ const separator = DEFAULT_OUTPUT_SEPARATOR_FORMAT.replace('{filePath}', relativePathForDisplay);
286
+ contentParts.push(`${separator}\n\n${fileReadResult.llmContent}\n\n`);
287
+ }
288
+ else {
289
+ contentParts.push(fileReadResult.llmContent); // This is a Part for image/pdf
290
+ }
291
+ processedFilesRelativePaths.push(relativePathForDisplay);
292
+ const lines = typeof fileReadResult.llmContent === 'string'
293
+ ? fileReadResult.llmContent.split('\n').length
294
+ : undefined;
295
+ const mimetype = getSpecificMimeType(filePath);
296
+ recordFileOperationMetric(this.config, FileOperation.READ, lines, mimetype, path.extname(filePath));
297
+ }
298
+ }
299
+ let displayMessage = `### ReadManyFiles Result (Target Dir: \`${this.targetDir}\`)\n\n`;
300
+ if (processedFilesRelativePaths.length > 0) {
301
+ displayMessage += `Successfully read and concatenated content from **${processedFilesRelativePaths.length} file(s)**.\n`;
302
+ if (processedFilesRelativePaths.length <= 10) {
303
+ displayMessage += `\n**Processed Files:**\n`;
304
+ processedFilesRelativePaths.forEach((p) => (displayMessage += `- \`${p}\`\n`));
305
+ }
306
+ else {
307
+ displayMessage += `\n**Processed Files (first 10 shown):**\n`;
308
+ processedFilesRelativePaths
309
+ .slice(0, 10)
310
+ .forEach((p) => (displayMessage += `- \`${p}\`\n`));
311
+ displayMessage += `- ...and ${processedFilesRelativePaths.length - 10} more.\n`;
312
+ }
313
+ }
314
+ if (skippedFiles.length > 0) {
315
+ if (processedFilesRelativePaths.length === 0) {
316
+ displayMessage += `No files were read and concatenated based on the criteria.\n`;
317
+ }
318
+ if (skippedFiles.length <= 5) {
319
+ displayMessage += `\n**Skipped ${skippedFiles.length} item(s):**\n`;
320
+ }
321
+ else {
322
+ displayMessage += `\n**Skipped ${skippedFiles.length} item(s) (first 5 shown):**\n`;
323
+ }
324
+ skippedFiles
325
+ .slice(0, 5)
326
+ .forEach((f) => (displayMessage += `- \`${f.path}\` (Reason: ${f.reason})\n`));
327
+ if (skippedFiles.length > 5) {
328
+ displayMessage += `- ...and ${skippedFiles.length - 5} more.\n`;
329
+ }
330
+ }
331
+ else if (processedFilesRelativePaths.length === 0 &&
332
+ skippedFiles.length === 0) {
333
+ displayMessage += `No files were read and concatenated based on the criteria.\n`;
334
+ }
335
+ if (contentParts.length === 0) {
336
+ contentParts.push('No files matching the criteria were found or all were skipped.');
337
+ }
338
+ return {
339
+ llmContent: contentParts,
340
+ returnDisplay: displayMessage.trim(),
341
+ };
342
+ }
343
+ }
344
+ //# sourceMappingURL=read-many-files.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"read-many-files.js","sourceRoot":"","sources":["../../../src/tools/read-many-files.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,QAAQ,EAAc,MAAM,YAAY,CAAC;AAClD,OAAO,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAC;AAC9D,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,KAAK,IAAI,MAAM,MAAM,CAAC;AAC7B,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AAC5B,OAAO,EAAE,0BAA0B,EAAE,MAAM,iBAAiB,CAAC;AAC7D,OAAO,EACL,cAAc,EACd,wBAAwB,EACxB,gBAAgB,EAChB,mBAAmB,GACpB,MAAM,uBAAuB,CAAC;AAG/B,OAAO,EACL,yBAAyB,EACzB,aAAa,GACd,MAAM,yBAAyB,CAAC;AA8CjC;;;;;GAKG;AACH,MAAM,gBAAgB,GAAa;IACjC,oBAAoB;IACpB,YAAY;IACZ,eAAe;IACf,aAAa;IACb,YAAY;IACZ,aAAa;IACb,gBAAgB;IAChB,mBAAmB;IACnB,UAAU;IACV,UAAU;IACV,UAAU;IACV,UAAU;IACV,UAAU;IACV,SAAS;IACT,YAAY;IACZ,YAAY;IACZ,UAAU;IACV,UAAU;IACV,UAAU;IACV,UAAU;IACV,SAAS;IACT,UAAU;IACV,UAAU;IACV,SAAS;IACT,UAAU;IACV,WAAW;IACX,UAAU;IACV,WAAW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