@machina.ai/cell-cli-core 1.0.13-rc3

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 (435) hide show
  1. package/dist/.last_build +0 -0
  2. package/dist/index.d.ts +7 -0
  3. package/dist/index.js +8 -0
  4. package/dist/index.js.map +1 -0
  5. package/dist/src/__mocks__/fs/promises.d.ts +11 -0
  6. package/dist/src/__mocks__/fs/promises.js +17 -0
  7. package/dist/src/__mocks__/fs/promises.js.map +1 -0
  8. package/dist/src/code_assist/codeAssist.d.ts +9 -0
  9. package/dist/src/code_assist/codeAssist.js +19 -0
  10. package/dist/src/code_assist/codeAssist.js.map +1 -0
  11. package/dist/src/code_assist/converter.d.ts +68 -0
  12. package/dist/src/code_assist/converter.js +125 -0
  13. package/dist/src/code_assist/converter.js.map +1 -0
  14. package/dist/src/code_assist/converter.test.d.ts +6 -0
  15. package/dist/src/code_assist/converter.test.js +229 -0
  16. package/dist/src/code_assist/converter.test.js.map +1 -0
  17. package/dist/src/code_assist/oauth2.d.ts +20 -0
  18. package/dist/src/code_assist/oauth2.js +329 -0
  19. package/dist/src/code_assist/oauth2.js.map +1 -0
  20. package/dist/src/code_assist/oauth2.test.d.ts +6 -0
  21. package/dist/src/code_assist/oauth2.test.js +244 -0
  22. package/dist/src/code_assist/oauth2.test.js.map +1 -0
  23. package/dist/src/code_assist/server.d.ts +37 -0
  24. package/dist/src/code_assist/server.js +125 -0
  25. package/dist/src/code_assist/server.js.map +1 -0
  26. package/dist/src/code_assist/server.test.d.ts +6 -0
  27. package/dist/src/code_assist/server.test.js +131 -0
  28. package/dist/src/code_assist/server.test.js.map +1 -0
  29. package/dist/src/code_assist/setup.d.ts +20 -0
  30. package/dist/src/code_assist/setup.js +70 -0
  31. package/dist/src/code_assist/setup.js.map +1 -0
  32. package/dist/src/code_assist/setup.test.d.ts +6 -0
  33. package/dist/src/code_assist/setup.test.js +65 -0
  34. package/dist/src/code_assist/setup.test.js.map +1 -0
  35. package/dist/src/code_assist/types.d.ts +148 -0
  36. package/dist/src/code_assist/types.js +46 -0
  37. package/dist/src/code_assist/types.js.map +1 -0
  38. package/dist/src/config/config.d.ts +239 -0
  39. package/dist/src/config/config.js +484 -0
  40. package/dist/src/config/config.js.map +1 -0
  41. package/dist/src/config/config.test.d.ts +6 -0
  42. package/dist/src/config/config.test.js +304 -0
  43. package/dist/src/config/config.test.js.map +1 -0
  44. package/dist/src/config/flashFallback.test.d.ts +6 -0
  45. package/dist/src/config/flashFallback.test.js +115 -0
  46. package/dist/src/config/flashFallback.test.js.map +1 -0
  47. package/dist/src/config/models.d.ts +8 -0
  48. package/dist/src/config/models.js +9 -0
  49. package/dist/src/config/models.js.map +1 -0
  50. package/dist/src/core/client.d.ts +60 -0
  51. package/dist/src/core/client.js +502 -0
  52. package/dist/src/core/client.js.map +1 -0
  53. package/dist/src/core/client.test.d.ts +6 -0
  54. package/dist/src/core/client.test.js +853 -0
  55. package/dist/src/core/client.test.js.map +1 -0
  56. package/dist/src/core/contentGenerator.d.ts +36 -0
  57. package/dist/src/core/contentGenerator.js +110 -0
  58. package/dist/src/core/contentGenerator.js.map +1 -0
  59. package/dist/src/core/contentGenerator.test.d.ts +6 -0
  60. package/dist/src/core/contentGenerator.test.js +225 -0
  61. package/dist/src/core/contentGenerator.test.js.map +1 -0
  62. package/dist/src/core/coreToolScheduler.d.ts +104 -0
  63. package/dist/src/core/coreToolScheduler.js +410 -0
  64. package/dist/src/core/coreToolScheduler.js.map +1 -0
  65. package/dist/src/core/coreToolScheduler.test.d.ts +6 -0
  66. package/dist/src/core/coreToolScheduler.test.js +402 -0
  67. package/dist/src/core/coreToolScheduler.test.js.map +1 -0
  68. package/dist/src/core/geminiChat.d.ts +116 -0
  69. package/dist/src/core/geminiChat.js +511 -0
  70. package/dist/src/core/geminiChat.js.map +1 -0
  71. package/dist/src/core/geminiChat.test.d.ts +6 -0
  72. package/dist/src/core/geminiChat.test.js +424 -0
  73. package/dist/src/core/geminiChat.test.js.map +1 -0
  74. package/dist/src/core/geminiRequest.d.ts +13 -0
  75. package/dist/src/core/geminiRequest.js +45 -0
  76. package/dist/src/core/geminiRequest.js.map +1 -0
  77. package/dist/src/core/geminiRequest.test.d.ts +6 -0
  78. package/dist/src/core/geminiRequest.test.js +72 -0
  79. package/dist/src/core/geminiRequest.test.js.map +1 -0
  80. package/dist/src/core/logger.d.ts +35 -0
  81. package/dist/src/core/logger.js +235 -0
  82. package/dist/src/core/logger.js.map +1 -0
  83. package/dist/src/core/logger.test.d.ts +6 -0
  84. package/dist/src/core/logger.test.js +387 -0
  85. package/dist/src/core/logger.test.js.map +1 -0
  86. package/dist/src/core/modelCheck.d.ts +14 -0
  87. package/dist/src/core/modelCheck.js +62 -0
  88. package/dist/src/core/modelCheck.js.map +1 -0
  89. package/dist/src/core/nonInteractiveToolExecutor.d.ts +12 -0
  90. package/dist/src/core/nonInteractiveToolExecutor.js +97 -0
  91. package/dist/src/core/nonInteractiveToolExecutor.js.map +1 -0
  92. package/dist/src/core/nonInteractiveToolExecutor.test.d.ts +6 -0
  93. package/dist/src/core/nonInteractiveToolExecutor.test.js +189 -0
  94. package/dist/src/core/nonInteractiveToolExecutor.test.js.map +1 -0
  95. package/dist/src/core/prompts.d.ts +12 -0
  96. package/dist/src/core/prompts.js +335 -0
  97. package/dist/src/core/prompts.js.map +1 -0
  98. package/dist/src/core/prompts.test.d.ts +6 -0
  99. package/dist/src/core/prompts.test.js +97 -0
  100. package/dist/src/core/prompts.test.js.map +1 -0
  101. package/dist/src/core/tokenLimits.d.ts +10 -0
  102. package/dist/src/core/tokenLimits.js +27 -0
  103. package/dist/src/core/tokenLimits.js.map +1 -0
  104. package/dist/src/core/turn.d.ts +111 -0
  105. package/dist/src/core/turn.js +139 -0
  106. package/dist/src/core/turn.js.map +1 -0
  107. package/dist/src/core/turn.test.d.ts +6 -0
  108. package/dist/src/core/turn.test.js +365 -0
  109. package/dist/src/core/turn.test.js.map +1 -0
  110. package/dist/src/index.d.ts +57 -0
  111. package/dist/src/index.js +64 -0
  112. package/dist/src/index.js.map +1 -0
  113. package/dist/src/index.test.d.ts +6 -0
  114. package/dist/src/index.test.js +12 -0
  115. package/dist/src/index.test.js.map +1 -0
  116. package/dist/src/mcp/oauth-provider.d.ts +142 -0
  117. package/dist/src/mcp/oauth-provider.js +446 -0
  118. package/dist/src/mcp/oauth-provider.js.map +1 -0
  119. package/dist/src/mcp/oauth-provider.test.d.ts +6 -0
  120. package/dist/src/mcp/oauth-provider.test.js +520 -0
  121. package/dist/src/mcp/oauth-provider.test.js.map +1 -0
  122. package/dist/src/mcp/oauth-token-storage.d.ts +81 -0
  123. package/dist/src/mcp/oauth-token-storage.js +149 -0
  124. package/dist/src/mcp/oauth-token-storage.js.map +1 -0
  125. package/dist/src/mcp/oauth-token-storage.test.d.ts +6 -0
  126. package/dist/src/mcp/oauth-token-storage.test.js +205 -0
  127. package/dist/src/mcp/oauth-token-storage.test.js.map +1 -0
  128. package/dist/src/mcp/oauth-utils.d.ts +109 -0
  129. package/dist/src/mcp/oauth-utils.js +183 -0
  130. package/dist/src/mcp/oauth-utils.js.map +1 -0
  131. package/dist/src/mcp/oauth-utils.test.d.ts +6 -0
  132. package/dist/src/mcp/oauth-utils.test.js +144 -0
  133. package/dist/src/mcp/oauth-utils.test.js.map +1 -0
  134. package/dist/src/services/fileDiscoveryService.d.ts +35 -0
  135. package/dist/src/services/fileDiscoveryService.js +91 -0
  136. package/dist/src/services/fileDiscoveryService.js.map +1 -0
  137. package/dist/src/services/fileDiscoveryService.test.d.ts +6 -0
  138. package/dist/src/services/fileDiscoveryService.test.js +102 -0
  139. package/dist/src/services/fileDiscoveryService.test.js.map +1 -0
  140. package/dist/src/services/gitService.d.ts +21 -0
  141. package/dist/src/services/gitService.js +101 -0
  142. package/dist/src/services/gitService.js.map +1 -0
  143. package/dist/src/services/gitService.test.d.ts +6 -0
  144. package/dist/src/services/gitService.test.js +228 -0
  145. package/dist/src/services/gitService.test.js.map +1 -0
  146. package/dist/src/services/ideContext.d.ts +178 -0
  147. package/dist/src/services/ideContext.js +105 -0
  148. package/dist/src/services/ideContext.js.map +1 -0
  149. package/dist/src/services/ideContext.test.d.ts +6 -0
  150. package/dist/src/services/ideContext.test.js +111 -0
  151. package/dist/src/services/ideContext.test.js.map +1 -0
  152. package/dist/src/services/loopDetectionService.d.ts +51 -0
  153. package/dist/src/services/loopDetectionService.js +232 -0
  154. package/dist/src/services/loopDetectionService.js.map +1 -0
  155. package/dist/src/services/loopDetectionService.test.d.ts +6 -0
  156. package/dist/src/services/loopDetectionService.test.js +339 -0
  157. package/dist/src/services/loopDetectionService.test.js.map +1 -0
  158. package/dist/src/telemetry/clearcut-logger/clearcut-logger.d.ts +37 -0
  159. package/dist/src/telemetry/clearcut-logger/clearcut-logger.js +456 -0
  160. package/dist/src/telemetry/clearcut-logger/clearcut-logger.js.map +1 -0
  161. package/dist/src/telemetry/clearcut-logger/event-metadata-key.d.ts +49 -0
  162. package/dist/src/telemetry/clearcut-logger/event-metadata-key.js +127 -0
  163. package/dist/src/telemetry/clearcut-logger/event-metadata-key.js.map +1 -0
  164. package/dist/src/telemetry/constants.d.ts +20 -0
  165. package/dist/src/telemetry/constants.js +21 -0
  166. package/dist/src/telemetry/constants.js.map +1 -0
  167. package/dist/src/telemetry/index.d.ts +18 -0
  168. package/dist/src/telemetry/index.js +20 -0
  169. package/dist/src/telemetry/index.js.map +1 -0
  170. package/dist/src/telemetry/integration.test.circular.d.ts +6 -0
  171. package/dist/src/telemetry/integration.test.circular.js +53 -0
  172. package/dist/src/telemetry/integration.test.circular.js.map +1 -0
  173. package/dist/src/telemetry/loggers.d.ts +15 -0
  174. package/dist/src/telemetry/loggers.js +220 -0
  175. package/dist/src/telemetry/loggers.js.map +1 -0
  176. package/dist/src/telemetry/loggers.test.circular.d.ts +6 -0
  177. package/dist/src/telemetry/loggers.test.circular.js +100 -0
  178. package/dist/src/telemetry/loggers.test.circular.js.map +1 -0
  179. package/dist/src/telemetry/loggers.test.d.ts +6 -0
  180. package/dist/src/telemetry/loggers.test.js +558 -0
  181. package/dist/src/telemetry/loggers.test.js.map +1 -0
  182. package/dist/src/telemetry/metrics.d.ts +19 -0
  183. package/dist/src/telemetry/metrics.js +144 -0
  184. package/dist/src/telemetry/metrics.js.map +1 -0
  185. package/dist/src/telemetry/metrics.test.d.ts +6 -0
  186. package/dist/src/telemetry/metrics.test.js +162 -0
  187. package/dist/src/telemetry/metrics.test.js.map +1 -0
  188. package/dist/src/telemetry/sdk.d.ts +9 -0
  189. package/dist/src/telemetry/sdk.js +116 -0
  190. package/dist/src/telemetry/sdk.js.map +1 -0
  191. package/dist/src/telemetry/telemetry.test.d.ts +6 -0
  192. package/dist/src/telemetry/telemetry.test.js +50 -0
  193. package/dist/src/telemetry/telemetry.test.js.map +1 -0
  194. package/dist/src/telemetry/types.d.ts +116 -0
  195. package/dist/src/telemetry/types.js +218 -0
  196. package/dist/src/telemetry/types.js.map +1 -0
  197. package/dist/src/telemetry/uiTelemetry.d.ts +68 -0
  198. package/dist/src/telemetry/uiTelemetry.js +138 -0
  199. package/dist/src/telemetry/uiTelemetry.js.map +1 -0
  200. package/dist/src/telemetry/uiTelemetry.test.d.ts +6 -0
  201. package/dist/src/telemetry/uiTelemetry.test.js +504 -0
  202. package/dist/src/telemetry/uiTelemetry.test.js.map +1 -0
  203. package/dist/src/tools/diffOptions.d.ts +7 -0
  204. package/dist/src/tools/diffOptions.js +10 -0
  205. package/dist/src/tools/diffOptions.js.map +1 -0
  206. package/dist/src/tools/edit.d.ts +79 -0
  207. package/dist/src/tools/edit.js +362 -0
  208. package/dist/src/tools/edit.js.map +1 -0
  209. package/dist/src/tools/edit.test.d.ts +6 -0
  210. package/dist/src/tools/edit.test.js +512 -0
  211. package/dist/src/tools/edit.test.js.map +1 -0
  212. package/dist/src/tools/glob.d.ts +58 -0
  213. package/dist/src/tools/glob.js +193 -0
  214. package/dist/src/tools/glob.js.map +1 -0
  215. package/dist/src/tools/glob.test.d.ts +6 -0
  216. package/dist/src/tools/glob.test.js +294 -0
  217. package/dist/src/tools/glob.test.js.map +1 -0
  218. package/dist/src/tools/grep.d.ts +78 -0
  219. package/dist/src/tools/grep.js +422 -0
  220. package/dist/src/tools/grep.js.map +1 -0
  221. package/dist/src/tools/grep.test.d.ts +6 -0
  222. package/dist/src/tools/grep.test.js +188 -0
  223. package/dist/src/tools/grep.test.js.map +1 -0
  224. package/dist/src/tools/ls.d.ts +86 -0
  225. package/dist/src/tools/ls.js +223 -0
  226. package/dist/src/tools/ls.js.map +1 -0
  227. package/dist/src/tools/mcp-client.d.ts +110 -0
  228. package/dist/src/tools/mcp-client.js +319 -0
  229. package/dist/src/tools/mcp-client.js.map +1 -0
  230. package/dist/src/tools/mcp-client.test.d.ts +6 -0
  231. package/dist/src/tools/mcp-client.test.js +156 -0
  232. package/dist/src/tools/mcp-client.test.js.map +1 -0
  233. package/dist/src/tools/mcp-tool.d.ts +29 -0
  234. package/dist/src/tools/mcp-tool.js +143 -0
  235. package/dist/src/tools/mcp-tool.js.map +1 -0
  236. package/dist/src/tools/mcp-tool.test.d.ts +6 -0
  237. package/dist/src/tools/mcp-tool.test.js +189 -0
  238. package/dist/src/tools/mcp-tool.test.js.map +1 -0
  239. package/dist/src/tools/memoryTool.d.ts +28 -0
  240. package/dist/src/tools/memoryTool.js +172 -0
  241. package/dist/src/tools/memoryTool.js.map +1 -0
  242. package/dist/src/tools/memoryTool.test.d.ts +6 -0
  243. package/dist/src/tools/memoryTool.test.js +181 -0
  244. package/dist/src/tools/memoryTool.test.js.map +1 -0
  245. package/dist/src/tools/modifiable-tool.d.ts +29 -0
  246. package/dist/src/tools/modifiable-tool.js +85 -0
  247. package/dist/src/tools/modifiable-tool.js.map +1 -0
  248. package/dist/src/tools/modifiable-tool.test.d.ts +6 -0
  249. package/dist/src/tools/modifiable-tool.test.js +204 -0
  250. package/dist/src/tools/modifiable-tool.test.js.map +1 -0
  251. package/dist/src/tools/read-file.d.ts +36 -0
  252. package/dist/src/tools/read-file.js +102 -0
  253. package/dist/src/tools/read-file.js.map +1 -0
  254. package/dist/src/tools/read-file.test.d.ts +6 -0
  255. package/dist/src/tools/read-file.test.js +181 -0
  256. package/dist/src/tools/read-file.test.js.map +1 -0
  257. package/dist/src/tools/read-many-files.d.ts +62 -0
  258. package/dist/src/tools/read-many-files.js +362 -0
  259. package/dist/src/tools/read-many-files.js.map +1 -0
  260. package/dist/src/tools/read-many-files.test.d.ts +6 -0
  261. package/dist/src/tools/read-many-files.test.js +315 -0
  262. package/dist/src/tools/read-many-files.test.js.map +1 -0
  263. package/dist/src/tools/shell.d.ts +43 -0
  264. package/dist/src/tools/shell.js +435 -0
  265. package/dist/src/tools/shell.js.map +1 -0
  266. package/dist/src/tools/shell.test.d.ts +6 -0
  267. package/dist/src/tools/shell.test.js +406 -0
  268. package/dist/src/tools/shell.test.js.map +1 -0
  269. package/dist/src/tools/tool-registry.d.ts +66 -0
  270. package/dist/src/tools/tool-registry.js +329 -0
  271. package/dist/src/tools/tool-registry.js.map +1 -0
  272. package/dist/src/tools/tool-registry.test.d.ts +6 -0
  273. package/dist/src/tools/tool-registry.test.js +424 -0
  274. package/dist/src/tools/tool-registry.test.js.map +1 -0
  275. package/dist/src/tools/tools.d.ts +219 -0
  276. package/dist/src/tools/tools.js +111 -0
  277. package/dist/src/tools/tools.js.map +1 -0
  278. package/dist/src/tools/web-fetch.d.ts +29 -0
  279. package/dist/src/tools/web-fetch.js +246 -0
  280. package/dist/src/tools/web-fetch.js.map +1 -0
  281. package/dist/src/tools/web-fetch.test.d.ts +6 -0
  282. package/dist/src/tools/web-fetch.test.js +71 -0
  283. package/dist/src/tools/web-fetch.test.js.map +1 -0
  284. package/dist/src/tools/web-search.d.ts +49 -0
  285. package/dist/src/tools/web-search.js +120 -0
  286. package/dist/src/tools/web-search.js.map +1 -0
  287. package/dist/src/tools/write-file.d.ts +42 -0
  288. package/dist/src/tools/write-file.js +253 -0
  289. package/dist/src/tools/write-file.js.map +1 -0
  290. package/dist/src/tools/write-file.test.d.ts +6 -0
  291. package/dist/src/tools/write-file.test.js +413 -0
  292. package/dist/src/tools/write-file.test.js.map +1 -0
  293. package/dist/src/utils/LruCache.d.ts +13 -0
  294. package/dist/src/utils/LruCache.js +38 -0
  295. package/dist/src/utils/LruCache.js.map +1 -0
  296. package/dist/src/utils/bfsFileSearch.d.ts +24 -0
  297. package/dist/src/utils/bfsFileSearch.js +65 -0
  298. package/dist/src/utils/bfsFileSearch.js.map +1 -0
  299. package/dist/src/utils/bfsFileSearch.test.d.ts +6 -0
  300. package/dist/src/utils/bfsFileSearch.test.js +162 -0
  301. package/dist/src/utils/bfsFileSearch.test.js.map +1 -0
  302. package/dist/src/utils/browser.d.ts +13 -0
  303. package/dist/src/utils/browser.js +49 -0
  304. package/dist/src/utils/browser.js.map +1 -0
  305. package/dist/src/utils/editCorrector.d.ts +53 -0
  306. package/dist/src/utils/editCorrector.js +546 -0
  307. package/dist/src/utils/editCorrector.js.map +1 -0
  308. package/dist/src/utils/editCorrector.test.d.ts +6 -0
  309. package/dist/src/utils/editCorrector.test.js +564 -0
  310. package/dist/src/utils/editCorrector.test.js.map +1 -0
  311. package/dist/src/utils/editor.d.ts +28 -0
  312. package/dist/src/utils/editor.js +169 -0
  313. package/dist/src/utils/editor.js.map +1 -0
  314. package/dist/src/utils/editor.test.d.ts +6 -0
  315. package/dist/src/utils/editor.test.js +393 -0
  316. package/dist/src/utils/editor.test.js.map +1 -0
  317. package/dist/src/utils/errorReporting.d.ts +14 -0
  318. package/dist/src/utils/errorReporting.js +88 -0
  319. package/dist/src/utils/errorReporting.js.map +1 -0
  320. package/dist/src/utils/errorReporting.test.d.ts +6 -0
  321. package/dist/src/utils/errorReporting.test.js +124 -0
  322. package/dist/src/utils/errorReporting.test.js.map +1 -0
  323. package/dist/src/utils/errors.d.ts +14 -0
  324. package/dist/src/utils/errors.js +54 -0
  325. package/dist/src/utils/errors.js.map +1 -0
  326. package/dist/src/utils/fetch.d.ts +11 -0
  327. package/dist/src/utils/fetch.js +51 -0
  328. package/dist/src/utils/fetch.js.map +1 -0
  329. package/dist/src/utils/fileUtils.d.ts +49 -0
  330. package/dist/src/utils/fileUtils.js +300 -0
  331. package/dist/src/utils/fileUtils.js.map +1 -0
  332. package/dist/src/utils/fileUtils.test.d.ts +6 -0
  333. package/dist/src/utils/fileUtils.test.js +321 -0
  334. package/dist/src/utils/fileUtils.test.js.map +1 -0
  335. package/dist/src/utils/flashFallback.integration.test.d.ts +6 -0
  336. package/dist/src/utils/flashFallback.integration.test.js +112 -0
  337. package/dist/src/utils/flashFallback.integration.test.js.map +1 -0
  338. package/dist/src/utils/generateContentResponseUtilities.d.ts +14 -0
  339. package/dist/src/utils/generateContentResponseUtilities.js +92 -0
  340. package/dist/src/utils/generateContentResponseUtilities.js.map +1 -0
  341. package/dist/src/utils/generateContentResponseUtilities.test.d.ts +6 -0
  342. package/dist/src/utils/generateContentResponseUtilities.test.js +273 -0
  343. package/dist/src/utils/generateContentResponseUtilities.test.js.map +1 -0
  344. package/dist/src/utils/getFolderStructure.d.ts +31 -0
  345. package/dist/src/utils/getFolderStructure.js +246 -0
  346. package/dist/src/utils/getFolderStructure.js.map +1 -0
  347. package/dist/src/utils/getFolderStructure.test.d.ts +6 -0
  348. package/dist/src/utils/getFolderStructure.test.js +284 -0
  349. package/dist/src/utils/getFolderStructure.test.js.map +1 -0
  350. package/dist/src/utils/gitIgnoreParser.d.ts +20 -0
  351. package/dist/src/utils/gitIgnoreParser.js +67 -0
  352. package/dist/src/utils/gitIgnoreParser.js.map +1 -0
  353. package/dist/src/utils/gitIgnoreParser.test.d.ts +6 -0
  354. package/dist/src/utils/gitIgnoreParser.test.js +157 -0
  355. package/dist/src/utils/gitIgnoreParser.test.js.map +1 -0
  356. package/dist/src/utils/gitUtils.d.ts +17 -0
  357. package/dist/src/utils/gitUtils.js +61 -0
  358. package/dist/src/utils/gitUtils.js.map +1 -0
  359. package/dist/src/utils/memoryDiscovery.d.ts +15 -0
  360. package/dist/src/utils/memoryDiscovery.js +226 -0
  361. package/dist/src/utils/memoryDiscovery.js.map +1 -0
  362. package/dist/src/utils/memoryDiscovery.test.d.ts +6 -0
  363. package/dist/src/utils/memoryDiscovery.test.js +432 -0
  364. package/dist/src/utils/memoryDiscovery.test.js.map +1 -0
  365. package/dist/src/utils/memoryImportProcessor.d.ts +35 -0
  366. package/dist/src/utils/memoryImportProcessor.js +141 -0
  367. package/dist/src/utils/memoryImportProcessor.js.map +1 -0
  368. package/dist/src/utils/memoryImportProcessor.test.d.ts +6 -0
  369. package/dist/src/utils/memoryImportProcessor.test.js +170 -0
  370. package/dist/src/utils/memoryImportProcessor.test.js.map +1 -0
  371. package/dist/src/utils/messageInspectors.d.ts +8 -0
  372. package/dist/src/utils/messageInspectors.js +16 -0
  373. package/dist/src/utils/messageInspectors.js.map +1 -0
  374. package/dist/src/utils/nextSpeakerChecker.d.ts +12 -0
  375. package/dist/src/utils/nextSpeakerChecker.js +112 -0
  376. package/dist/src/utils/nextSpeakerChecker.js.map +1 -0
  377. package/dist/src/utils/nextSpeakerChecker.test.d.ts +6 -0
  378. package/dist/src/utils/nextSpeakerChecker.test.js +168 -0
  379. package/dist/src/utils/nextSpeakerChecker.test.js.map +1 -0
  380. package/dist/src/utils/paths.d.ts +59 -0
  381. package/dist/src/utils/paths.js +153 -0
  382. package/dist/src/utils/paths.js.map +1 -0
  383. package/dist/src/utils/quotaErrorDetection.d.ts +22 -0
  384. package/dist/src/utils/quotaErrorDetection.js +65 -0
  385. package/dist/src/utils/quotaErrorDetection.js.map +1 -0
  386. package/dist/src/utils/retry.d.ts +27 -0
  387. package/dist/src/utils/retry.js +276 -0
  388. package/dist/src/utils/retry.js.map +1 -0
  389. package/dist/src/utils/retry.test.d.ts +6 -0
  390. package/dist/src/utils/retry.test.js +322 -0
  391. package/dist/src/utils/retry.test.js.map +1 -0
  392. package/dist/src/utils/safeJsonStringify.d.ts +13 -0
  393. package/dist/src/utils/safeJsonStringify.js +25 -0
  394. package/dist/src/utils/safeJsonStringify.js.map +1 -0
  395. package/dist/src/utils/safeJsonStringify.test.d.ts +6 -0
  396. package/dist/src/utils/safeJsonStringify.test.js +61 -0
  397. package/dist/src/utils/safeJsonStringify.test.js.map +1 -0
  398. package/dist/src/utils/schemaValidator.d.ts +22 -0
  399. package/dist/src/utils/schemaValidator.js +65 -0
  400. package/dist/src/utils/schemaValidator.js.map +1 -0
  401. package/dist/src/utils/session.d.ts +6 -0
  402. package/dist/src/utils/session.js +8 -0
  403. package/dist/src/utils/session.js.map +1 -0
  404. package/dist/src/utils/stripJsonCodeBlock.d.ts +13 -0
  405. package/dist/src/utils/stripJsonCodeBlock.js +21 -0
  406. package/dist/src/utils/stripJsonCodeBlock.js.map +1 -0
  407. package/dist/src/utils/summarizer.d.ts +25 -0
  408. package/dist/src/utils/summarizer.js +80 -0
  409. package/dist/src/utils/summarizer.js.map +1 -0
  410. package/dist/src/utils/summarizer.test.d.ts +6 -0
  411. package/dist/src/utils/summarizer.test.js +131 -0
  412. package/dist/src/utils/summarizer.test.js.map +1 -0
  413. package/dist/src/utils/systemEncoding.d.ts +40 -0
  414. package/dist/src/utils/systemEncoding.js +149 -0
  415. package/dist/src/utils/systemEncoding.js.map +1 -0
  416. package/dist/src/utils/systemEncoding.test.d.ts +6 -0
  417. package/dist/src/utils/systemEncoding.test.js +368 -0
  418. package/dist/src/utils/systemEncoding.test.js.map +1 -0
  419. package/dist/src/utils/testUtils.d.ts +29 -0
  420. package/dist/src/utils/testUtils.js +70 -0
  421. package/dist/src/utils/testUtils.js.map +1 -0
  422. package/dist/src/utils/user_account.d.ts +9 -0
  423. package/dist/src/utils/user_account.js +99 -0
  424. package/dist/src/utils/user_account.js.map +1 -0
  425. package/dist/src/utils/user_account.test.d.ts +6 -0
  426. package/dist/src/utils/user_account.test.js +153 -0
  427. package/dist/src/utils/user_account.test.js.map +1 -0
  428. package/dist/src/utils/user_id.d.ts +11 -0
  429. package/dist/src/utils/user_id.js +49 -0
  430. package/dist/src/utils/user_id.js.map +1 -0
  431. package/dist/src/utils/user_id.test.d.ts +6 -0
  432. package/dist/src/utils/user_id.test.js +21 -0
  433. package/dist/src/utils/user_id.test.js.map +1 -0
  434. package/dist/tsconfig.tsbuildinfo +1 -0
  435. package/package.json +62 -0
@@ -0,0 +1,362 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2025 Google LLC
4
+ * SPDX-License-Identifier: Apache-2.0
5
+ */
6
+ import { BaseTool, Icon } 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 { Type } from '@google/genai';
14
+ import { DEFAULT_FILE_FILTERING_OPTIONS } from '../config/config.js';
15
+ import { recordFileOperationMetric, FileOperation, } from '../telemetry/metrics.js';
16
+ /**
17
+ * Default exclusion patterns for commonly ignored directories and binary file types.
18
+ * These are compatible with glob ignore patterns.
19
+ * TODO(adh): Consider making this configurable or extendable through a command line argument.
20
+ * TODO(adh): Look into sharing this list with the glob tool.
21
+ */
22
+ const DEFAULT_EXCLUDES = [
23
+ '**/node_modules/**',
24
+ '**/.git/**',
25
+ '**/.vscode/**',
26
+ '**/.idea/**',
27
+ '**/dist/**',
28
+ '**/build/**',
29
+ '**/coverage/**',
30
+ '**/__pycache__/**',
31
+ '**/*.pyc',
32
+ '**/*.pyo',
33
+ '**/*.bin',
34
+ '**/*.exe',
35
+ '**/*.dll',
36
+ '**/*.so',
37
+ '**/*.dylib',
38
+ '**/*.class',
39
+ '**/*.jar',
40
+ '**/*.war',
41
+ '**/*.zip',
42
+ '**/*.tar',
43
+ '**/*.gz',
44
+ '**/*.bz2',
45
+ '**/*.rar',
46
+ '**/*.7z',
47
+ '**/*.doc',
48
+ '**/*.docx',
49
+ '**/*.xls',
50
+ '**/*.xlsx',
51
+ '**/*.ppt',
52
+ '**/*.pptx',
53
+ '**/*.odt',
54
+ '**/*.ods',
55
+ '**/*.odp',
56
+ '**/*.DS_Store',
57
+ '**/.env',
58
+ `**/${getCurrentGeminiMdFilename()}`,
59
+ ];
60
+ const DEFAULT_OUTPUT_SEPARATOR_FORMAT = '--- {filePath} ---';
61
+ /**
62
+ * Tool implementation for finding and reading multiple text files from the local filesystem
63
+ * within a specified target directory. The content is concatenated.
64
+ * It is intended to run in an environment with access to the local file system (e.g., a Node.js backend).
65
+ */
66
+ export class ReadManyFilesTool extends BaseTool {
67
+ config;
68
+ static Name = 'read_many_files';
69
+ geminiIgnorePatterns = [];
70
+ constructor(config) {
71
+ const parameterSchema = {
72
+ type: Type.OBJECT,
73
+ properties: {
74
+ paths: {
75
+ type: Type.ARRAY,
76
+ items: {
77
+ type: Type.STRING,
78
+ minLength: '1',
79
+ },
80
+ minItems: '1',
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: Type.ARRAY,
85
+ items: {
86
+ type: Type.STRING,
87
+ minLength: '1',
88
+ },
89
+ 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.',
90
+ default: [],
91
+ },
92
+ exclude: {
93
+ type: Type.ARRAY,
94
+ items: {
95
+ type: Type.STRING,
96
+ minLength: '1',
97
+ },
98
+ description: 'Optional. Glob patterns for files/directories to exclude. Added to default excludes if useDefaultExcludes is true. Example: ["**/*.log", "temp/"]',
99
+ default: [],
100
+ },
101
+ recursive: {
102
+ type: Type.BOOLEAN,
103
+ description: 'Optional. Whether to search recursively (primarily controlled by `**` in glob patterns). Defaults to true.',
104
+ default: true,
105
+ },
106
+ useDefaultExcludes: {
107
+ type: Type.BOOLEAN,
108
+ description: 'Optional. Whether to apply a list of default exclusion patterns (e.g., node_modules, .git, binary files). Defaults to true.',
109
+ default: true,
110
+ },
111
+ file_filtering_options: {
112
+ description: 'Whether to respect ignore patterns from .gitignore or .geminiignore',
113
+ type: Type.OBJECT,
114
+ properties: {
115
+ respect_git_ignore: {
116
+ description: 'Optional: Whether to respect .gitignore patterns when listing files. Only available in git repositories. Defaults to true.',
117
+ type: Type.BOOLEAN,
118
+ },
119
+ respect_gemini_ignore: {
120
+ description: 'Optional: Whether to respect .geminiignore patterns when listing files. Defaults to true.',
121
+ type: Type.BOOLEAN,
122
+ },
123
+ },
124
+ },
125
+ },
126
+ required: ['paths'],
127
+ };
128
+ 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).
129
+
130
+ This tool is useful when you need to understand or analyze a collection of files, such as:
131
+ - Getting an overview of a codebase or parts of it (e.g., all TypeScript files in the 'src' directory).
132
+ - Finding where specific functionality is implemented if the user asks broad questions about code.
133
+ - Reviewing documentation files (e.g., all Markdown files in the 'docs' directory).
134
+ - Gathering context from multiple configuration files.
135
+ - When the user asks to "read all files in X directory" or "show me the content of all Y files".
136
+
137
+ 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.`, Icon.FileSearch, parameterSchema);
138
+ this.config = config;
139
+ this.geminiIgnorePatterns = config
140
+ .getFileService()
141
+ .getGeminiIgnorePatterns();
142
+ }
143
+ validateParams(params) {
144
+ const errors = SchemaValidator.validate(this.schema.parameters, params);
145
+ if (errors) {
146
+ return errors;
147
+ }
148
+ return null;
149
+ }
150
+ getDescription(params) {
151
+ const allPatterns = [...params.paths, ...(params.include || [])];
152
+ const pathDesc = `using patterns: \`${allPatterns.join('`, `')}\` (within target directory: \`${this.config.getTargetDir()}\`)`;
153
+ // Determine the final list of exclusion patterns exactly as in execute method
154
+ const paramExcludes = params.exclude || [];
155
+ const paramUseDefaultExcludes = params.useDefaultExcludes !== false;
156
+ const finalExclusionPatternsForDescription = paramUseDefaultExcludes
157
+ ? [...DEFAULT_EXCLUDES, ...paramExcludes, ...this.geminiIgnorePatterns]
158
+ : [...paramExcludes, ...this.geminiIgnorePatterns];
159
+ let excludeDesc = `Excluding: ${finalExclusionPatternsForDescription.length > 0 ? `patterns like \`${finalExclusionPatternsForDescription.slice(0, 2).join('`, `')}${finalExclusionPatternsForDescription.length > 2 ? '...`' : '`'}` : 'none specified'}`;
160
+ // Add a note if .geminiignore patterns contributed to the final list of exclusions
161
+ if (this.geminiIgnorePatterns.length > 0) {
162
+ const geminiPatternsInEffect = this.geminiIgnorePatterns.filter((p) => finalExclusionPatternsForDescription.includes(p)).length;
163
+ if (geminiPatternsInEffect > 0) {
164
+ excludeDesc += ` (includes ${geminiPatternsInEffect} from .geminiignore)`;
165
+ }
166
+ }
167
+ 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')}".`;
168
+ }
169
+ async execute(params, signal) {
170
+ const validationError = this.validateParams(params);
171
+ if (validationError) {
172
+ return {
173
+ llmContent: `Error: Invalid parameters for ${this.displayName}. Reason: ${validationError}`,
174
+ returnDisplay: `## Parameter Error\n\n${validationError}`,
175
+ };
176
+ }
177
+ const { paths: inputPatterns, include = [], exclude = [], useDefaultExcludes = true, } = params;
178
+ const defaultFileIgnores = this.config.getFileFilteringOptions() ?? DEFAULT_FILE_FILTERING_OPTIONS;
179
+ const fileFilteringOptions = {
180
+ respectGitIgnore: params.file_filtering_options?.respect_git_ignore ??
181
+ defaultFileIgnores.respectGitIgnore, // Use the property from the returned object
182
+ respectGeminiIgnore: params.file_filtering_options?.respect_gemini_ignore ??
183
+ defaultFileIgnores.respectGeminiIgnore, // Use the property from the returned object
184
+ };
185
+ // Get centralized file discovery service
186
+ const fileDiscovery = this.config.getFileService();
187
+ const filesToConsider = new Set();
188
+ const skippedFiles = [];
189
+ const processedFilesRelativePaths = [];
190
+ const contentParts = [];
191
+ const effectiveExcludes = useDefaultExcludes
192
+ ? [...DEFAULT_EXCLUDES, ...exclude]
193
+ : [...exclude];
194
+ const searchPatterns = [...inputPatterns, ...include];
195
+ if (searchPatterns.length === 0) {
196
+ return {
197
+ llmContent: 'No search paths or include patterns provided.',
198
+ returnDisplay: `## Information\n\nNo search paths or include patterns were specified. Nothing to read or concatenate.`,
199
+ };
200
+ }
201
+ try {
202
+ const entries = await glob(searchPatterns, {
203
+ cwd: this.config.getTargetDir(),
204
+ ignore: effectiveExcludes,
205
+ nodir: true,
206
+ dot: true,
207
+ absolute: true,
208
+ nocase: true,
209
+ signal,
210
+ });
211
+ const gitFilteredEntries = fileFilteringOptions.respectGitIgnore
212
+ ? fileDiscovery
213
+ .filterFiles(entries.map((p) => path.relative(this.config.getTargetDir(), p)), {
214
+ respectGitIgnore: true,
215
+ respectGeminiIgnore: false,
216
+ })
217
+ .map((p) => path.resolve(this.config.getTargetDir(), p))
218
+ : entries;
219
+ // Apply gemini ignore filtering if enabled
220
+ const finalFilteredEntries = fileFilteringOptions.respectGeminiIgnore
221
+ ? fileDiscovery
222
+ .filterFiles(gitFilteredEntries.map((p) => path.relative(this.config.getTargetDir(), p)), {
223
+ respectGitIgnore: false,
224
+ respectGeminiIgnore: true,
225
+ })
226
+ .map((p) => path.resolve(this.config.getTargetDir(), p))
227
+ : gitFilteredEntries;
228
+ let gitIgnoredCount = 0;
229
+ let geminiIgnoredCount = 0;
230
+ for (const absoluteFilePath of entries) {
231
+ // Security check: ensure the glob library didn't return something outside targetDir.
232
+ if (!absoluteFilePath.startsWith(this.config.getTargetDir())) {
233
+ skippedFiles.push({
234
+ path: absoluteFilePath,
235
+ reason: `Security: Glob library returned path outside target directory. Base: ${this.config.getTargetDir()}, Path: ${absoluteFilePath}`,
236
+ });
237
+ continue;
238
+ }
239
+ // Check if this file was filtered out by git ignore
240
+ if (fileFilteringOptions.respectGitIgnore &&
241
+ !gitFilteredEntries.includes(absoluteFilePath)) {
242
+ gitIgnoredCount++;
243
+ continue;
244
+ }
245
+ // Check if this file was filtered out by gemini ignore
246
+ if (fileFilteringOptions.respectGeminiIgnore &&
247
+ !finalFilteredEntries.includes(absoluteFilePath)) {
248
+ geminiIgnoredCount++;
249
+ continue;
250
+ }
251
+ filesToConsider.add(absoluteFilePath);
252
+ }
253
+ // Add info about git-ignored files if any were filtered
254
+ if (gitIgnoredCount > 0) {
255
+ skippedFiles.push({
256
+ path: `${gitIgnoredCount} file(s)`,
257
+ reason: 'git ignored',
258
+ });
259
+ }
260
+ // Add info about gemini-ignored files if any were filtered
261
+ if (geminiIgnoredCount > 0) {
262
+ skippedFiles.push({
263
+ path: `${geminiIgnoredCount} file(s)`,
264
+ reason: 'gemini ignored',
265
+ });
266
+ }
267
+ }
268
+ catch (error) {
269
+ return {
270
+ llmContent: `Error during file search: ${getErrorMessage(error)}`,
271
+ returnDisplay: `## File Search Error\n\nAn error occurred while searching for files:\n\`\`\`\n${getErrorMessage(error)}\n\`\`\``,
272
+ };
273
+ }
274
+ const sortedFiles = Array.from(filesToConsider).sort();
275
+ for (const filePath of sortedFiles) {
276
+ const relativePathForDisplay = path
277
+ .relative(this.config.getTargetDir(), filePath)
278
+ .replace(/\\/g, '/');
279
+ const fileType = await detectFileType(filePath);
280
+ if (fileType === 'image' || fileType === 'pdf') {
281
+ const fileExtension = path.extname(filePath).toLowerCase();
282
+ const fileNameWithoutExtension = path.basename(filePath, fileExtension);
283
+ const requestedExplicitly = inputPatterns.some((pattern) => pattern.toLowerCase().includes(fileExtension) ||
284
+ pattern.includes(fileNameWithoutExtension));
285
+ if (!requestedExplicitly) {
286
+ skippedFiles.push({
287
+ path: relativePathForDisplay,
288
+ reason: 'asset file (image/pdf) was not explicitly requested by name or extension',
289
+ });
290
+ continue;
291
+ }
292
+ }
293
+ // Use processSingleFileContent for all file types now
294
+ const fileReadResult = await processSingleFileContent(filePath, this.config.getTargetDir());
295
+ if (fileReadResult.error) {
296
+ skippedFiles.push({
297
+ path: relativePathForDisplay,
298
+ reason: `Read error: ${fileReadResult.error}`,
299
+ });
300
+ }
301
+ else {
302
+ if (typeof fileReadResult.llmContent === 'string') {
303
+ const separator = DEFAULT_OUTPUT_SEPARATOR_FORMAT.replace('{filePath}', filePath);
304
+ contentParts.push(`${separator}\n\n${fileReadResult.llmContent}\n\n`);
305
+ }
306
+ else {
307
+ contentParts.push(fileReadResult.llmContent); // This is a Part for image/pdf
308
+ }
309
+ processedFilesRelativePaths.push(relativePathForDisplay);
310
+ const lines = typeof fileReadResult.llmContent === 'string'
311
+ ? fileReadResult.llmContent.split('\n').length
312
+ : undefined;
313
+ const mimetype = getSpecificMimeType(filePath);
314
+ recordFileOperationMetric(this.config, FileOperation.READ, lines, mimetype, path.extname(filePath));
315
+ }
316
+ }
317
+ let displayMessage = `### ReadManyFiles Result (Target Dir: \`${this.config.getTargetDir()}\`)\n\n`;
318
+ if (processedFilesRelativePaths.length > 0) {
319
+ displayMessage += `Successfully read and concatenated content from **${processedFilesRelativePaths.length} file(s)**.\n`;
320
+ if (processedFilesRelativePaths.length <= 10) {
321
+ displayMessage += `\n**Processed Files:**\n`;
322
+ processedFilesRelativePaths.forEach((p) => (displayMessage += `- \`${p}\`\n`));
323
+ }
324
+ else {
325
+ displayMessage += `\n**Processed Files (first 10 shown):**\n`;
326
+ processedFilesRelativePaths
327
+ .slice(0, 10)
328
+ .forEach((p) => (displayMessage += `- \`${p}\`\n`));
329
+ displayMessage += `- ...and ${processedFilesRelativePaths.length - 10} more.\n`;
330
+ }
331
+ }
332
+ if (skippedFiles.length > 0) {
333
+ if (processedFilesRelativePaths.length === 0) {
334
+ displayMessage += `No files were read and concatenated based on the criteria.\n`;
335
+ }
336
+ if (skippedFiles.length <= 5) {
337
+ displayMessage += `\n**Skipped ${skippedFiles.length} item(s):**\n`;
338
+ }
339
+ else {
340
+ displayMessage += `\n**Skipped ${skippedFiles.length} item(s) (first 5 shown):**\n`;
341
+ }
342
+ skippedFiles
343
+ .slice(0, 5)
344
+ .forEach((f) => (displayMessage += `- \`${f.path}\` (Reason: ${f.reason})\n`));
345
+ if (skippedFiles.length > 5) {
346
+ displayMessage += `- ...and ${skippedFiles.length - 5} more.\n`;
347
+ }
348
+ }
349
+ else if (processedFilesRelativePaths.length === 0 &&
350
+ skippedFiles.length === 0) {
351
+ displayMessage += `No files were read and concatenated based on the criteria.\n`;
352
+ }
353
+ if (contentParts.length === 0) {
354
+ contentParts.push('No files matching the criteria were found or all were skipped.');
355
+ }
356
+ return {
357
+ llmContent: contentParts,
358
+ returnDisplay: displayMessage.trim(),
359
+ };
360
+ }
361
+ }
362
+ //# 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,EAAE,IAAI,EAAc,MAAM,YAAY,CAAC;AACxD,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,EAC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