@vybestack/llxprt-code-core 0.1.12

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 (448) 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 +339 -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 +249 -0
  22. package/dist/src/code_assist/oauth2.test.js.map +1 -0
  23. package/dist/src/code_assist/server.d.ts +39 -0
  24. package/dist/src/code_assist/server.js +191 -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 +123 -0
  28. package/dist/src/code_assist/server.test.js.map +1 -0
  29. package/dist/src/code_assist/setup.d.ts +15 -0
  30. package/dist/src/code_assist/setup.js +67 -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 +62 -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 +212 -0
  39. package/dist/src/config/config.js +454 -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 +291 -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 +59 -0
  51. package/dist/src/core/client.js +503 -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 +1006 -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 +79 -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 +92 -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 +413 -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 +347 -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 +513 -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 +38 -0
  81. package/dist/src/core/logger.js +237 -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 +55 -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 +93 -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 +180 -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 +418 -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 +75 -0
  103. package/dist/src/core/tokenLimits.js.map +1 -0
  104. package/dist/src/core/tokenLimits.test.d.ts +6 -0
  105. package/dist/src/core/tokenLimits.test.js +66 -0
  106. package/dist/src/core/tokenLimits.test.js.map +1 -0
  107. package/dist/src/core/turn.d.ts +116 -0
  108. package/dist/src/core/turn.js +131 -0
  109. package/dist/src/core/turn.js.map +1 -0
  110. package/dist/src/core/turn.test.d.ts +6 -0
  111. package/dist/src/core/turn.test.js +237 -0
  112. package/dist/src/core/turn.test.js.map +1 -0
  113. package/dist/src/index.d.ts +57 -0
  114. package/dist/src/index.js +64 -0
  115. package/dist/src/index.js.map +1 -0
  116. package/dist/src/index.test.d.ts +6 -0
  117. package/dist/src/index.test.js +12 -0
  118. package/dist/src/index.test.js.map +1 -0
  119. package/dist/src/providers/ProviderContentGenerator.d.ts +21 -0
  120. package/dist/src/providers/ProviderContentGenerator.js +52 -0
  121. package/dist/src/providers/ProviderContentGenerator.js.map +1 -0
  122. package/dist/src/providers/adapters/GeminiCompatibleWrapper.d.ts +68 -0
  123. package/dist/src/providers/adapters/GeminiCompatibleWrapper.js +549 -0
  124. package/dist/src/providers/adapters/GeminiCompatibleWrapper.js.map +1 -0
  125. package/dist/src/providers/adapters/GeminiCompatibleWrapper.test.d.ts +6 -0
  126. package/dist/src/providers/adapters/GeminiCompatibleWrapper.test.js +253 -0
  127. package/dist/src/providers/adapters/GeminiCompatibleWrapper.test.js.map +1 -0
  128. package/dist/src/providers/types.d.ts +82 -0
  129. package/dist/src/providers/types.js +7 -0
  130. package/dist/src/providers/types.js.map +1 -0
  131. package/dist/src/services/fileDiscoveryService.d.ts +35 -0
  132. package/dist/src/services/fileDiscoveryService.js +91 -0
  133. package/dist/src/services/fileDiscoveryService.js.map +1 -0
  134. package/dist/src/services/fileDiscoveryService.test.d.ts +6 -0
  135. package/dist/src/services/fileDiscoveryService.test.js +102 -0
  136. package/dist/src/services/fileDiscoveryService.test.js.map +1 -0
  137. package/dist/src/services/gitService.d.ts +21 -0
  138. package/dist/src/services/gitService.js +102 -0
  139. package/dist/src/services/gitService.js.map +1 -0
  140. package/dist/src/services/gitService.test.d.ts +6 -0
  141. package/dist/src/services/gitService.test.js +246 -0
  142. package/dist/src/services/gitService.test.js.map +1 -0
  143. package/dist/src/services/ideContext.d.ts +124 -0
  144. package/dist/src/services/ideContext.js +90 -0
  145. package/dist/src/services/ideContext.js.map +1 -0
  146. package/dist/src/services/ideContext.test.d.ts +6 -0
  147. package/dist/src/services/ideContext.test.js +101 -0
  148. package/dist/src/services/ideContext.test.js.map +1 -0
  149. package/dist/src/services/loopDetectionService.d.ts +35 -0
  150. package/dist/src/services/loopDetectionService.js +117 -0
  151. package/dist/src/services/loopDetectionService.js.map +1 -0
  152. package/dist/src/services/loopDetectionService.test.d.ts +6 -0
  153. package/dist/src/services/loopDetectionService.test.js +232 -0
  154. package/dist/src/services/loopDetectionService.test.js.map +1 -0
  155. package/dist/src/telemetry/clearcut-logger/clearcut-logger.d.ts +35 -0
  156. package/dist/src/telemetry/clearcut-logger/clearcut-logger.js +424 -0
  157. package/dist/src/telemetry/clearcut-logger/clearcut-logger.js.map +1 -0
  158. package/dist/src/telemetry/clearcut-logger/event-metadata-key.d.ts +47 -0
  159. package/dist/src/telemetry/clearcut-logger/event-metadata-key.js +123 -0
  160. package/dist/src/telemetry/clearcut-logger/event-metadata-key.js.map +1 -0
  161. package/dist/src/telemetry/constants.d.ts +20 -0
  162. package/dist/src/telemetry/constants.js +21 -0
  163. package/dist/src/telemetry/constants.js.map +1 -0
  164. package/dist/src/telemetry/index.d.ts +18 -0
  165. package/dist/src/telemetry/index.js +20 -0
  166. package/dist/src/telemetry/index.js.map +1 -0
  167. package/dist/src/telemetry/integration.test.circular.d.ts +6 -0
  168. package/dist/src/telemetry/integration.test.circular.js +53 -0
  169. package/dist/src/telemetry/integration.test.circular.js.map +1 -0
  170. package/dist/src/telemetry/loggers.d.ts +15 -0
  171. package/dist/src/telemetry/loggers.js +229 -0
  172. package/dist/src/telemetry/loggers.js.map +1 -0
  173. package/dist/src/telemetry/loggers.test.circular.d.ts +6 -0
  174. package/dist/src/telemetry/loggers.test.circular.js +100 -0
  175. package/dist/src/telemetry/loggers.test.circular.js.map +1 -0
  176. package/dist/src/telemetry/loggers.test.d.ts +6 -0
  177. package/dist/src/telemetry/loggers.test.js +558 -0
  178. package/dist/src/telemetry/loggers.test.js.map +1 -0
  179. package/dist/src/telemetry/metrics.d.ts +19 -0
  180. package/dist/src/telemetry/metrics.js +144 -0
  181. package/dist/src/telemetry/metrics.js.map +1 -0
  182. package/dist/src/telemetry/metrics.test.d.ts +6 -0
  183. package/dist/src/telemetry/metrics.test.js +162 -0
  184. package/dist/src/telemetry/metrics.test.js.map +1 -0
  185. package/dist/src/telemetry/sdk.d.ts +9 -0
  186. package/dist/src/telemetry/sdk.js +120 -0
  187. package/dist/src/telemetry/sdk.js.map +1 -0
  188. package/dist/src/telemetry/telemetry.test.d.ts +6 -0
  189. package/dist/src/telemetry/telemetry.test.js +52 -0
  190. package/dist/src/telemetry/telemetry.test.js.map +1 -0
  191. package/dist/src/telemetry/types.d.ts +115 -0
  192. package/dist/src/telemetry/types.js +217 -0
  193. package/dist/src/telemetry/types.js.map +1 -0
  194. package/dist/src/telemetry/uiTelemetry.d.ts +67 -0
  195. package/dist/src/telemetry/uiTelemetry.js +131 -0
  196. package/dist/src/telemetry/uiTelemetry.js.map +1 -0
  197. package/dist/src/telemetry/uiTelemetry.test.d.ts +6 -0
  198. package/dist/src/telemetry/uiTelemetry.test.js +412 -0
  199. package/dist/src/telemetry/uiTelemetry.test.js.map +1 -0
  200. package/dist/src/tools/diffOptions.d.ts +7 -0
  201. package/dist/src/tools/diffOptions.js +10 -0
  202. package/dist/src/tools/diffOptions.js.map +1 -0
  203. package/dist/src/tools/edit.d.ts +73 -0
  204. package/dist/src/tools/edit.js +343 -0
  205. package/dist/src/tools/edit.js.map +1 -0
  206. package/dist/src/tools/edit.test.d.ts +6 -0
  207. package/dist/src/tools/edit.test.js +500 -0
  208. package/dist/src/tools/edit.test.js.map +1 -0
  209. package/dist/src/tools/glob.d.ts +58 -0
  210. package/dist/src/tools/glob.js +193 -0
  211. package/dist/src/tools/glob.js.map +1 -0
  212. package/dist/src/tools/glob.test.d.ts +6 -0
  213. package/dist/src/tools/glob.test.js +294 -0
  214. package/dist/src/tools/glob.test.js.map +1 -0
  215. package/dist/src/tools/grep.d.ts +78 -0
  216. package/dist/src/tools/grep.js +422 -0
  217. package/dist/src/tools/grep.js.map +1 -0
  218. package/dist/src/tools/grep.test.d.ts +6 -0
  219. package/dist/src/tools/grep.test.js +188 -0
  220. package/dist/src/tools/grep.test.js.map +1 -0
  221. package/dist/src/tools/ls.d.ts +83 -0
  222. package/dist/src/tools/ls.js +194 -0
  223. package/dist/src/tools/ls.js.map +1 -0
  224. package/dist/src/tools/mcp-client.d.ts +112 -0
  225. package/dist/src/tools/mcp-client.js +332 -0
  226. package/dist/src/tools/mcp-client.js.map +1 -0
  227. package/dist/src/tools/mcp-client.test.d.ts +6 -0
  228. package/dist/src/tools/mcp-client.test.js +227 -0
  229. package/dist/src/tools/mcp-client.test.js.map +1 -0
  230. package/dist/src/tools/mcp-tool.d.ts +23 -0
  231. package/dist/src/tools/mcp-tool.js +119 -0
  232. package/dist/src/tools/mcp-tool.js.map +1 -0
  233. package/dist/src/tools/mcp-tool.test.d.ts +6 -0
  234. package/dist/src/tools/mcp-tool.test.js +173 -0
  235. package/dist/src/tools/mcp-tool.test.js.map +1 -0
  236. package/dist/src/tools/memoryTool.d.ts +28 -0
  237. package/dist/src/tools/memoryTool.js +172 -0
  238. package/dist/src/tools/memoryTool.js.map +1 -0
  239. package/dist/src/tools/memoryTool.test.d.ts +6 -0
  240. package/dist/src/tools/memoryTool.test.js +181 -0
  241. package/dist/src/tools/memoryTool.test.js.map +1 -0
  242. package/dist/src/tools/modifiable-tool.d.ts +29 -0
  243. package/dist/src/tools/modifiable-tool.js +85 -0
  244. package/dist/src/tools/modifiable-tool.js.map +1 -0
  245. package/dist/src/tools/modifiable-tool.test.d.ts +6 -0
  246. package/dist/src/tools/modifiable-tool.test.js +204 -0
  247. package/dist/src/tools/modifiable-tool.test.js.map +1 -0
  248. package/dist/src/tools/read-file.d.ts +35 -0
  249. package/dist/src/tools/read-file.js +106 -0
  250. package/dist/src/tools/read-file.js.map +1 -0
  251. package/dist/src/tools/read-file.test.d.ts +6 -0
  252. package/dist/src/tools/read-file.test.js +181 -0
  253. package/dist/src/tools/read-file.test.js.map +1 -0
  254. package/dist/src/tools/read-many-files.d.ts +59 -0
  255. package/dist/src/tools/read-many-files.js +321 -0
  256. package/dist/src/tools/read-many-files.js.map +1 -0
  257. package/dist/src/tools/read-many-files.test.d.ts +6 -0
  258. package/dist/src/tools/read-many-files.test.js +312 -0
  259. package/dist/src/tools/read-many-files.test.js.map +1 -0
  260. package/dist/src/tools/shell.d.ts +43 -0
  261. package/dist/src/tools/shell.js +435 -0
  262. package/dist/src/tools/shell.js.map +1 -0
  263. package/dist/src/tools/shell.test.d.ts +6 -0
  264. package/dist/src/tools/shell.test.js +407 -0
  265. package/dist/src/tools/shell.test.js.map +1 -0
  266. package/dist/src/tools/todo-read.d.ts +15 -0
  267. package/dist/src/tools/todo-read.js +66 -0
  268. package/dist/src/tools/todo-read.js.map +1 -0
  269. package/dist/src/tools/todo-read.test.d.ts +6 -0
  270. package/dist/src/tools/todo-read.test.js +158 -0
  271. package/dist/src/tools/todo-read.test.js.map +1 -0
  272. package/dist/src/tools/todo-schemas.d.ts +43 -0
  273. package/dist/src/tools/todo-schemas.js +16 -0
  274. package/dist/src/tools/todo-schemas.js.map +1 -0
  275. package/dist/src/tools/todo-schemas.test.d.ts +6 -0
  276. package/dist/src/tools/todo-schemas.test.js +152 -0
  277. package/dist/src/tools/todo-schemas.test.js.map +1 -0
  278. package/dist/src/tools/todo-store.d.ts +15 -0
  279. package/dist/src/tools/todo-store.js +59 -0
  280. package/dist/src/tools/todo-store.js.map +1 -0
  281. package/dist/src/tools/todo-store.test.d.ts +6 -0
  282. package/dist/src/tools/todo-store.test.js +175 -0
  283. package/dist/src/tools/todo-store.test.js.map +1 -0
  284. package/dist/src/tools/todo-write.d.ts +17 -0
  285. package/dist/src/tools/todo-write.js +98 -0
  286. package/dist/src/tools/todo-write.js.map +1 -0
  287. package/dist/src/tools/todo-write.test.d.ts +6 -0
  288. package/dist/src/tools/todo-write.test.js +208 -0
  289. package/dist/src/tools/todo-write.test.js.map +1 -0
  290. package/dist/src/tools/tool-registry.d.ts +67 -0
  291. package/dist/src/tools/tool-registry.js +326 -0
  292. package/dist/src/tools/tool-registry.js.map +1 -0
  293. package/dist/src/tools/tool-registry.test.d.ts +6 -0
  294. package/dist/src/tools/tool-registry.test.js +398 -0
  295. package/dist/src/tools/tool-registry.test.js.map +1 -0
  296. package/dist/src/tools/tools.d.ts +184 -0
  297. package/dist/src/tools/tools.js +88 -0
  298. package/dist/src/tools/tools.js.map +1 -0
  299. package/dist/src/tools/web-fetch.d.ts +29 -0
  300. package/dist/src/tools/web-fetch.js +243 -0
  301. package/dist/src/tools/web-fetch.js.map +1 -0
  302. package/dist/src/tools/web-fetch.test.d.ts +6 -0
  303. package/dist/src/tools/web-fetch.test.js +70 -0
  304. package/dist/src/tools/web-fetch.test.js.map +1 -0
  305. package/dist/src/tools/web-search.d.ts +49 -0
  306. package/dist/src/tools/web-search.js +120 -0
  307. package/dist/src/tools/web-search.js.map +1 -0
  308. package/dist/src/tools/write-file.d.ts +42 -0
  309. package/dist/src/tools/write-file.js +248 -0
  310. package/dist/src/tools/write-file.js.map +1 -0
  311. package/dist/src/tools/write-file.test.d.ts +6 -0
  312. package/dist/src/tools/write-file.test.js +413 -0
  313. package/dist/src/tools/write-file.test.js.map +1 -0
  314. package/dist/src/utils/LruCache.d.ts +13 -0
  315. package/dist/src/utils/LruCache.js +38 -0
  316. package/dist/src/utils/LruCache.js.map +1 -0
  317. package/dist/src/utils/bfsFileSearch.d.ts +22 -0
  318. package/dist/src/utils/bfsFileSearch.js +62 -0
  319. package/dist/src/utils/bfsFileSearch.js.map +1 -0
  320. package/dist/src/utils/bfsFileSearch.test.d.ts +6 -0
  321. package/dist/src/utils/bfsFileSearch.test.js +129 -0
  322. package/dist/src/utils/bfsFileSearch.test.js.map +1 -0
  323. package/dist/src/utils/editCorrector.d.ts +53 -0
  324. package/dist/src/utils/editCorrector.js +546 -0
  325. package/dist/src/utils/editCorrector.js.map +1 -0
  326. package/dist/src/utils/editCorrector.test.d.ts +6 -0
  327. package/dist/src/utils/editCorrector.test.js +564 -0
  328. package/dist/src/utils/editCorrector.test.js.map +1 -0
  329. package/dist/src/utils/editor.d.ts +28 -0
  330. package/dist/src/utils/editor.js +163 -0
  331. package/dist/src/utils/editor.js.map +1 -0
  332. package/dist/src/utils/editor.test.d.ts +6 -0
  333. package/dist/src/utils/editor.test.js +293 -0
  334. package/dist/src/utils/editor.test.js.map +1 -0
  335. package/dist/src/utils/errorReporting.d.ts +14 -0
  336. package/dist/src/utils/errorReporting.js +88 -0
  337. package/dist/src/utils/errorReporting.js.map +1 -0
  338. package/dist/src/utils/errorReporting.test.d.ts +6 -0
  339. package/dist/src/utils/errorReporting.test.js +124 -0
  340. package/dist/src/utils/errorReporting.test.js.map +1 -0
  341. package/dist/src/utils/errors.d.ts +14 -0
  342. package/dist/src/utils/errors.js +54 -0
  343. package/dist/src/utils/errors.js.map +1 -0
  344. package/dist/src/utils/fetch.d.ts +11 -0
  345. package/dist/src/utils/fetch.js +51 -0
  346. package/dist/src/utils/fetch.js.map +1 -0
  347. package/dist/src/utils/fileUtils.d.ts +49 -0
  348. package/dist/src/utils/fileUtils.js +286 -0
  349. package/dist/src/utils/fileUtils.js.map +1 -0
  350. package/dist/src/utils/fileUtils.test.d.ts +6 -0
  351. package/dist/src/utils/fileUtils.test.js +321 -0
  352. package/dist/src/utils/fileUtils.test.js.map +1 -0
  353. package/dist/src/utils/flashFallback.integration.test.d.ts +6 -0
  354. package/dist/src/utils/flashFallback.integration.test.js +112 -0
  355. package/dist/src/utils/flashFallback.integration.test.js.map +1 -0
  356. package/dist/src/utils/generateContentResponseUtilities.d.ts +14 -0
  357. package/dist/src/utils/generateContentResponseUtilities.js +92 -0
  358. package/dist/src/utils/generateContentResponseUtilities.js.map +1 -0
  359. package/dist/src/utils/generateContentResponseUtilities.test.d.ts +6 -0
  360. package/dist/src/utils/generateContentResponseUtilities.test.js +273 -0
  361. package/dist/src/utils/generateContentResponseUtilities.test.js.map +1 -0
  362. package/dist/src/utils/getFolderStructure.d.ts +30 -0
  363. package/dist/src/utils/getFolderStructure.js +247 -0
  364. package/dist/src/utils/getFolderStructure.js.map +1 -0
  365. package/dist/src/utils/getFolderStructure.test.d.ts +6 -0
  366. package/dist/src/utils/getFolderStructure.test.js +298 -0
  367. package/dist/src/utils/getFolderStructure.test.js.map +1 -0
  368. package/dist/src/utils/gitIgnoreParser.d.ts +20 -0
  369. package/dist/src/utils/gitIgnoreParser.js +64 -0
  370. package/dist/src/utils/gitIgnoreParser.js.map +1 -0
  371. package/dist/src/utils/gitIgnoreParser.test.d.ts +6 -0
  372. package/dist/src/utils/gitIgnoreParser.test.js +145 -0
  373. package/dist/src/utils/gitIgnoreParser.test.js.map +1 -0
  374. package/dist/src/utils/gitUtils.d.ts +17 -0
  375. package/dist/src/utils/gitUtils.js +61 -0
  376. package/dist/src/utils/gitUtils.js.map +1 -0
  377. package/dist/src/utils/memoryDiscovery.d.ts +14 -0
  378. package/dist/src/utils/memoryDiscovery.js +219 -0
  379. package/dist/src/utils/memoryDiscovery.js.map +1 -0
  380. package/dist/src/utils/memoryDiscovery.test.d.ts +6 -0
  381. package/dist/src/utils/memoryDiscovery.test.js +432 -0
  382. package/dist/src/utils/memoryDiscovery.test.js.map +1 -0
  383. package/dist/src/utils/memoryImportProcessor.d.ts +35 -0
  384. package/dist/src/utils/memoryImportProcessor.js +141 -0
  385. package/dist/src/utils/memoryImportProcessor.js.map +1 -0
  386. package/dist/src/utils/memoryImportProcessor.test.d.ts +6 -0
  387. package/dist/src/utils/memoryImportProcessor.test.js +170 -0
  388. package/dist/src/utils/memoryImportProcessor.test.js.map +1 -0
  389. package/dist/src/utils/messageInspectors.d.ts +8 -0
  390. package/dist/src/utils/messageInspectors.js +16 -0
  391. package/dist/src/utils/messageInspectors.js.map +1 -0
  392. package/dist/src/utils/nextSpeakerChecker.d.ts +12 -0
  393. package/dist/src/utils/nextSpeakerChecker.js +113 -0
  394. package/dist/src/utils/nextSpeakerChecker.js.map +1 -0
  395. package/dist/src/utils/nextSpeakerChecker.test.d.ts +6 -0
  396. package/dist/src/utils/nextSpeakerChecker.test.js +168 -0
  397. package/dist/src/utils/nextSpeakerChecker.test.js.map +1 -0
  398. package/dist/src/utils/paths.d.ts +49 -0
  399. package/dist/src/utils/paths.js +145 -0
  400. package/dist/src/utils/paths.js.map +1 -0
  401. package/dist/src/utils/quotaErrorDetection.d.ts +22 -0
  402. package/dist/src/utils/quotaErrorDetection.js +67 -0
  403. package/dist/src/utils/quotaErrorDetection.js.map +1 -0
  404. package/dist/src/utils/retry.d.ts +21 -0
  405. package/dist/src/utils/retry.js +276 -0
  406. package/dist/src/utils/retry.js.map +1 -0
  407. package/dist/src/utils/retry.test.d.ts +6 -0
  408. package/dist/src/utils/retry.test.js +322 -0
  409. package/dist/src/utils/retry.test.js.map +1 -0
  410. package/dist/src/utils/safeJsonStringify.d.ts +13 -0
  411. package/dist/src/utils/safeJsonStringify.js +25 -0
  412. package/dist/src/utils/safeJsonStringify.js.map +1 -0
  413. package/dist/src/utils/safeJsonStringify.test.d.ts +6 -0
  414. package/dist/src/utils/safeJsonStringify.test.js +61 -0
  415. package/dist/src/utils/safeJsonStringify.test.js.map +1 -0
  416. package/dist/src/utils/schemaValidator.d.ts +23 -0
  417. package/dist/src/utils/schemaValidator.js +142 -0
  418. package/dist/src/utils/schemaValidator.js.map +1 -0
  419. package/dist/src/utils/schemaValidator.test.d.ts +6 -0
  420. package/dist/src/utils/schemaValidator.test.js +146 -0
  421. package/dist/src/utils/schemaValidator.test.js.map +1 -0
  422. package/dist/src/utils/session.d.ts +6 -0
  423. package/dist/src/utils/session.js +8 -0
  424. package/dist/src/utils/session.js.map +1 -0
  425. package/dist/src/utils/summarizer.d.ts +25 -0
  426. package/dist/src/utils/summarizer.js +80 -0
  427. package/dist/src/utils/summarizer.js.map +1 -0
  428. package/dist/src/utils/summarizer.test.d.ts +6 -0
  429. package/dist/src/utils/summarizer.test.js +131 -0
  430. package/dist/src/utils/summarizer.test.js.map +1 -0
  431. package/dist/src/utils/testUtils.d.ts +29 -0
  432. package/dist/src/utils/testUtils.js +70 -0
  433. package/dist/src/utils/testUtils.js.map +1 -0
  434. package/dist/src/utils/user_account.d.ts +9 -0
  435. package/dist/src/utils/user_account.js +99 -0
  436. package/dist/src/utils/user_account.js.map +1 -0
  437. package/dist/src/utils/user_account.test.d.ts +6 -0
  438. package/dist/src/utils/user_account.test.js +153 -0
  439. package/dist/src/utils/user_account.test.js.map +1 -0
  440. package/dist/src/utils/user_id.d.ts +11 -0
  441. package/dist/src/utils/user_id.js +49 -0
  442. package/dist/src/utils/user_id.js.map +1 -0
  443. package/dist/src/utils/user_id.test.d.ts +6 -0
  444. package/dist/src/utils/user_id.test.js +21 -0
  445. package/dist/src/utils/user_id.test.js.map +1 -0
  446. package/dist/tsconfig.tsbuildinfo +1 -0
  447. package/dist/vybestack-llxprt-code-core-0.1.12.tgz +0 -0
  448. package/package.json +62 -0
@@ -0,0 +1,175 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2025 Vybestack LLC
4
+ * SPDX-License-Identifier: Apache-2.0
5
+ */
6
+ import { describe, it, expect, beforeEach, afterEach } from 'vitest';
7
+ import { TodoStore } from './todo-store.js';
8
+ import fs from 'node:fs';
9
+ import path from 'node:path';
10
+ import os from 'node:os';
11
+ describe('TodoStore', () => {
12
+ let tempDir;
13
+ let store;
14
+ const sessionId = 'test-session-123';
15
+ const agentId = 'test-agent-456';
16
+ const sampleTodos = [
17
+ {
18
+ id: '1',
19
+ content: 'First task',
20
+ status: 'pending',
21
+ priority: 'high',
22
+ },
23
+ {
24
+ id: '2',
25
+ content: 'Second task',
26
+ status: 'in_progress',
27
+ priority: 'medium',
28
+ },
29
+ {
30
+ id: '3',
31
+ content: 'Third task',
32
+ status: 'completed',
33
+ priority: 'low',
34
+ },
35
+ ];
36
+ beforeEach(() => {
37
+ // Create a temporary directory for tests
38
+ tempDir = fs.mkdtempSync(path.join(os.tmpdir(), 'todo-store-test-'));
39
+ // Mock the home directory to use our temp dir
40
+ process.env.HOME = tempDir;
41
+ store = new TodoStore(sessionId, agentId);
42
+ });
43
+ afterEach(() => {
44
+ // Clean up the temporary directory
45
+ if (fs.existsSync(tempDir)) {
46
+ fs.rmSync(tempDir, { recursive: true, force: true });
47
+ }
48
+ });
49
+ describe('readTodos', () => {
50
+ it('should return empty array when no todos exist', async () => {
51
+ const result = await store.readTodos();
52
+ expect(result).toEqual([]);
53
+ });
54
+ it('should read todos from file system', async () => {
55
+ // Write some todos first
56
+ await store.writeTodos(sampleTodos);
57
+ // Read them back
58
+ const result = await store.readTodos();
59
+ expect(result).toEqual(sampleTodos);
60
+ });
61
+ it('should handle missing file gracefully', async () => {
62
+ // Ensure file doesn't exist
63
+ const filePath = path.join(tempDir, '.llxprt', 'todos', `${sessionId}-agent-${agentId}.json`);
64
+ if (fs.existsSync(filePath)) {
65
+ fs.unlinkSync(filePath);
66
+ }
67
+ const result = await store.readTodos();
68
+ expect(result).toEqual([]);
69
+ });
70
+ });
71
+ describe('writeTodos', () => {
72
+ it('should write todos to file system', async () => {
73
+ await store.writeTodos(sampleTodos);
74
+ const filePath = path.join(tempDir, '.llxprt', 'todos', `${sessionId}-agent-${agentId}.json`);
75
+ expect(fs.existsSync(filePath)).toBe(true);
76
+ const content = JSON.parse(fs.readFileSync(filePath, 'utf-8'));
77
+ expect(content).toEqual(sampleTodos);
78
+ });
79
+ it('should create todos directory if not exists', async () => {
80
+ const todosDir = path.join(tempDir, '.llxprt', 'todos');
81
+ if (fs.existsSync(todosDir)) {
82
+ fs.rmSync(todosDir, { recursive: true });
83
+ }
84
+ await store.writeTodos(sampleTodos);
85
+ expect(fs.existsSync(todosDir)).toBe(true);
86
+ });
87
+ it('should overwrite existing todos', async () => {
88
+ // Write initial todos
89
+ await store.writeTodos(sampleTodos);
90
+ // Write different todos
91
+ const newTodos = [
92
+ {
93
+ id: '99',
94
+ content: 'New task',
95
+ status: 'pending',
96
+ priority: 'high',
97
+ },
98
+ ];
99
+ await store.writeTodos(newTodos);
100
+ // Verify only new todos exist
101
+ const result = await store.readTodos();
102
+ expect(result).toEqual(newTodos);
103
+ });
104
+ it('should write empty array when no todos provided', async () => {
105
+ await store.writeTodos([]);
106
+ const result = await store.readTodos();
107
+ expect(result).toEqual([]);
108
+ });
109
+ });
110
+ describe('clearTodos', () => {
111
+ it('should remove todos file', async () => {
112
+ // Write todos first
113
+ await store.writeTodos(sampleTodos);
114
+ // Clear them
115
+ await store.clearTodos();
116
+ // Verify file is gone
117
+ const result = await store.readTodos();
118
+ expect(result).toEqual([]);
119
+ });
120
+ it('should handle missing file gracefully', async () => {
121
+ // Ensure file doesn't exist
122
+ const filePath = path.join(tempDir, '.llxprt', 'todos', `${sessionId}-agent-${agentId}.json`);
123
+ if (fs.existsSync(filePath)) {
124
+ fs.unlinkSync(filePath);
125
+ }
126
+ // Should not throw
127
+ await expect(store.clearTodos()).resolves.not.toThrow();
128
+ });
129
+ });
130
+ describe('agent-specific storage', () => {
131
+ it('should use different files for different agents', async () => {
132
+ const store1 = new TodoStore(sessionId, 'agent1');
133
+ const store2 = new TodoStore(sessionId, 'agent2');
134
+ await store1.writeTodos(sampleTodos);
135
+ await store2.writeTodos([]);
136
+ expect(await store1.readTodos()).toEqual(sampleTodos);
137
+ expect(await store2.readTodos()).toEqual([]);
138
+ });
139
+ it('should use session-only file when no agent ID provided', async () => {
140
+ const sessionStore = new TodoStore(sessionId);
141
+ await sessionStore.writeTodos(sampleTodos);
142
+ const filePath = path.join(tempDir, '.llxprt', 'todos', `${sessionId}.json`);
143
+ expect(fs.existsSync(filePath)).toBe(true);
144
+ });
145
+ });
146
+ describe('concurrent access', () => {
147
+ it('should handle multiple simultaneous reads safely', async () => {
148
+ await store.writeTodos(sampleTodos);
149
+ const promises = Array(10)
150
+ .fill(null)
151
+ .map(() => store.readTodos());
152
+ const results = await Promise.all(promises);
153
+ results.forEach((result) => {
154
+ expect(result).toEqual(sampleTodos);
155
+ });
156
+ });
157
+ it('should handle simultaneous read and write', async () => {
158
+ const readPromise = store.readTodos();
159
+ const writePromise = store.writeTodos(sampleTodos);
160
+ await Promise.all([readPromise, writePromise]);
161
+ // Verify write succeeded
162
+ const result = await store.readTodos();
163
+ expect(result).toEqual(sampleTodos);
164
+ });
165
+ });
166
+ describe('file path generation', () => {
167
+ it('should generate correct file path for session and agent', async () => {
168
+ // This test verifies the private getFilePath method indirectly
169
+ await store.writeTodos(sampleTodos);
170
+ const expectedPath = path.join(tempDir, '.llxprt', 'todos', `${sessionId}-agent-${agentId}.json`);
171
+ expect(fs.existsSync(expectedPath)).toBe(true);
172
+ });
173
+ });
174
+ });
175
+ //# sourceMappingURL=todo-store.test.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"todo-store.test.js","sourceRoot":"","sources":["../../../src/tools/todo-store.test.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,QAAQ,EAAE,EAAE,EAAE,MAAM,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAC;AACrE,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAE5C,OAAO,EAAE,MAAM,SAAS,CAAC;AACzB,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,MAAM,SAAS,CAAC;AAEzB,QAAQ,CAAC,WAAW,EAAE,GAAG,EAAE;IACzB,IAAI,OAAe,CAAC;IACpB,IAAI,KAAgB,CAAC;IACrB,MAAM,SAAS,GAAG,kBAAkB,CAAC;IACrC,MAAM,OAAO,GAAG,gBAAgB,CAAC;IAEjC,MAAM,WAAW,GAAW;QAC1B;YACE,EAAE,EAAE,GAAG;YACP,OAAO,EAAE,YAAY;YACrB,MAAM,EAAE,SAAS;YACjB,QAAQ,EAAE,MAAM;SACjB;QACD;YACE,EAAE,EAAE,GAAG;YACP,OAAO,EAAE,aAAa;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AAC,WAAW,CAAC,CAAC;YAEnD,MAAM,OAAO,CAAC,GAAG,CAAC,CAAC,WAAW,EAAE,YAAY,CAAC,CAAC,CAAC;YAE/C,yBAAyB;YACzB,MAAM,MAAM,GAAG,MAAM,KAAK,CAAC,SAAS,EAAE,CAAC;YACvC,MAAM,CAAC,MAAM,CAAC,CAAC,OAAO,CAAC,WAAW,CAAC,CAAC;QACtC,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;IAEH,QAAQ,CAAC,sBAAsB,EAAE,GAAG,EAAE;QACpC,EAAE,CAAC,yDAAyD,EAAE,KAAK,IAAI,EAAE;YACvE,+DAA+D;YAC/D,MAAM,KAAK,CAAC,UAAU,CAAC,WAAW,CAAC,CAAC;YAEpC,MAAM,YAAY,GAAG,IAAI,CAAC,IAAI,CAC5B,OAAO,EACP,SAAS,EACT,OAAO,EACP,GAAG,SAAS,UAAU,OAAO,OAAO,CACrC,CAAC;YACF,MAAM,CAAC,EAAE,CAAC,UAAU,CAAC,YAAY,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACjD,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
@@ -0,0 +1,17 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2025 Vybestack LLC
4
+ * SPDX-License-Identifier: Apache-2.0
5
+ */
6
+ import { BaseTool, ToolResult } from './tools.js';
7
+ import { Todo } from './todo-schemas.js';
8
+ export interface TodoWriteParams {
9
+ todos: Todo[];
10
+ }
11
+ export declare class TodoWrite extends BaseTool<TodoWriteParams, ToolResult> {
12
+ static readonly Name = "todo_write";
13
+ constructor();
14
+ getDescription(params: TodoWriteParams): string;
15
+ execute(params: TodoWriteParams, _signal: AbortSignal, _updateOutput?: (output: string) => void): Promise<ToolResult>;
16
+ private generateOutput;
17
+ }
@@ -0,0 +1,98 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2025 Vybestack LLC
4
+ * SPDX-License-Identifier: Apache-2.0
5
+ */
6
+ import { Type } from '@google/genai';
7
+ import { BaseTool } from './tools.js';
8
+ import { TodoArraySchema } from './todo-schemas.js';
9
+ import { TodoStore } from './todo-store.js';
10
+ export class TodoWrite extends BaseTool {
11
+ static Name = 'todo_write';
12
+ constructor() {
13
+ super(TodoWrite.Name, 'TodoWrite', 'Create and manage a structured task list for the current coding session. Updates the entire todo list.', {
14
+ type: Type.OBJECT,
15
+ properties: {
16
+ todos: {
17
+ type: Type.ARRAY,
18
+ items: {
19
+ type: Type.OBJECT,
20
+ properties: {
21
+ id: {
22
+ type: Type.STRING,
23
+ description: 'Unique identifier for the todo item',
24
+ },
25
+ content: {
26
+ type: Type.STRING,
27
+ description: 'Description of the todo item',
28
+ minLength: '1',
29
+ },
30
+ status: {
31
+ type: Type.STRING,
32
+ enum: ['pending', 'in_progress', 'completed'],
33
+ description: 'Current status of the todo item',
34
+ },
35
+ priority: {
36
+ type: Type.STRING,
37
+ enum: ['high', 'medium', 'low'],
38
+ description: 'Priority level of the todo item',
39
+ },
40
+ },
41
+ required: ['id', 'content', 'status', 'priority'],
42
+ },
43
+ description: 'The updated todo list',
44
+ },
45
+ },
46
+ required: ['todos'],
47
+ }, true, // isOutputMarkdown
48
+ false);
49
+ }
50
+ getDescription(params) {
51
+ return `Update todo list with ${params.todos.length} items`;
52
+ }
53
+ async execute(params, _signal, _updateOutput) {
54
+ // Validate todos with Zod schema
55
+ const result = TodoArraySchema.safeParse(params.todos);
56
+ if (!result.success) {
57
+ const error = result.error.errors[0];
58
+ throw new Error(`Validation error: ${error.path.join('.')} - ${error.message}`);
59
+ }
60
+ // Get session and agent IDs from context
61
+ const sessionId = this.sessionId || 'default';
62
+ const agentId = this.agentId;
63
+ const store = new TodoStore(sessionId, agentId);
64
+ // Read old todos for diff tracking
65
+ const oldTodos = await store.readTodos();
66
+ // Write new todos
67
+ await store.writeTodos(params.todos);
68
+ // Generate output
69
+ const output = this.generateOutput(oldTodos, params.todos);
70
+ return {
71
+ llmContent: output,
72
+ returnDisplay: output,
73
+ };
74
+ }
75
+ generateOutput(oldTodos, newTodos) {
76
+ let output = 'Todo list updated successfully\n\n';
77
+ output += `Previous: ${oldTodos.length} todos\n`;
78
+ output += `Updated: ${newTodos.length} todos\n\n`;
79
+ // Calculate changes
80
+ const added = newTodos.filter((newTodo) => !oldTodos.some((oldTodo) => oldTodo.id === newTodo.id));
81
+ const removed = oldTodos.filter((oldTodo) => !newTodos.some((newTodo) => newTodo.id === oldTodo.id));
82
+ const statusChanges = newTodos.filter((newTodo) => {
83
+ const oldTodo = oldTodos.find((t) => t.id === newTodo.id);
84
+ return oldTodo && oldTodo.status !== newTodo.status;
85
+ });
86
+ if (added.length > 0) {
87
+ output += `Added: ${added.length}\n`;
88
+ }
89
+ if (removed.length > 0) {
90
+ output += `Removed: ${removed.length}\n`;
91
+ }
92
+ if (statusChanges.length > 0) {
93
+ output += `Status changes: ${statusChanges.length}\n`;
94
+ }
95
+ return output;
96
+ }
97
+ }
98
+ //# sourceMappingURL=todo-write.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"todo-write.js","sourceRoot":"","sources":["../../../src/tools/todo-write.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AACrC,OAAO,EAAE,QAAQ,EAAc,MAAM,YAAY,CAAC;AAClD,OAAO,EAAQ,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAC1D,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAM5C,MAAM,OAAO,SAAU,SAAQ,QAAqC;IAClE,MAAM,CAAU,IAAI,GAAG,YAAY,CAAC;IAEpC;QACE,KAAK,CACH,SAAS,CAAC,IAAI,EACd,WAAW,EACX,wGAAwG,EACxG;YACE,IAAI,EAAE,IAAI,CAAC,MAAM;YACjB,UAAU,EAAE;gBACV,KAAK,EAAE;oBACL,IAAI,EAAE,IAAI,CAAC,KAAK;oBAChB,KAAK,EAAE;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AAC;QAEF,MAAM,aAAa,GAAG,QAAQ,CAAC,MAAM,CAAC,CAAC,OAAO,EAAE,EAAE;YAChD,MAAM,OAAO,GAAG,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,EAAE,KAAK,OAAO,CAAC,EAAE,CAAC,CAAC;YAC1D,OAAO,OAAO,IAAI,OAAO,CAAC,MAAM,KAAK,OAAO,CAAC,MAAM,CAAC;QACtD,CAAC,CAAC,CAAC;QAEH,IAAI,KAAK,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;YACrB,MAAM,IAAI,UAAU,KAAK,CAAC,MAAM,IAAI,CAAC;QACvC,CAAC;QACD,IAAI,OAAO,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;YACvB,MAAM,IAAI,YAAY,OAAO,CAAC,MAAM,IAAI,CAAC;QAC3C,CAAC;QACD,IAAI,aAAa,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;YAC7B,MAAM,IAAI,mBAAmB,aAAa,CAAC,MAAM,IAAI,CAAC;QACxD,CAAC;QAED,OAAO,MAAM,CAAC;IAChB,CAAC"}
@@ -0,0 +1,6 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2025 Vybestack LLC
4
+ * SPDX-License-Identifier: Apache-2.0
5
+ */
6
+ export {};
@@ -0,0 +1,208 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2025 Vybestack LLC
4
+ * SPDX-License-Identifier: Apache-2.0
5
+ */
6
+ import { describe, it, expect, beforeEach, vi } from 'vitest';
7
+ import { TodoWrite } from './todo-write.js';
8
+ import { TodoStore } from './todo-store.js';
9
+ // Mock TodoStore
10
+ vi.mock('./todo-store.js');
11
+ describe('TodoWrite', () => {
12
+ let tool;
13
+ const abortSignal = new AbortController().signal;
14
+ const validTodos = [
15
+ {
16
+ id: '1',
17
+ content: 'Test task',
18
+ status: 'pending',
19
+ priority: 'high',
20
+ },
21
+ {
22
+ id: '2',
23
+ content: 'Another task',
24
+ status: 'in_progress',
25
+ priority: 'medium',
26
+ },
27
+ ];
28
+ const existingTodos = [
29
+ {
30
+ id: 'old-1',
31
+ content: 'Existing task 1',
32
+ status: 'completed',
33
+ priority: 'low',
34
+ },
35
+ {
36
+ id: 'old-2',
37
+ content: 'Existing task 2',
38
+ status: 'pending',
39
+ priority: 'high',
40
+ },
41
+ {
42
+ id: 'old-3',
43
+ content: 'Existing task 3',
44
+ status: 'in_progress',
45
+ priority: 'medium',
46
+ },
47
+ ];
48
+ beforeEach(() => {
49
+ vi.clearAllMocks();
50
+ tool = new TodoWrite();
51
+ new TodoStore('session-123', 'agent-456');
52
+ });
53
+ describe('execute', () => {
54
+ it('should create new todos with valid schema', async () => {
55
+ vi.mocked(TodoStore.prototype.readTodos).mockResolvedValue([]);
56
+ vi.mocked(TodoStore.prototype.writeTodos).mockResolvedValue(undefined);
57
+ const result = await tool.execute({ todos: validTodos }, abortSignal);
58
+ expect(result.llmContent).toContain('2 todos');
59
+ expect(vi.mocked(TodoStore.prototype.writeTodos)).toHaveBeenCalledWith(validTodos);
60
+ });
61
+ it('should validate todo schema and reject invalid data', async () => {
62
+ const invalidTodos = [
63
+ {
64
+ id: '1',
65
+ content: '', // Invalid: empty content
66
+ status: 'pending',
67
+ priority: 'high',
68
+ },
69
+ ];
70
+ await expect(tool.execute({ todos: invalidTodos }, abortSignal)).rejects.toThrow(/content/);
71
+ });
72
+ it('should reject todos with invalid status', async () => {
73
+ const invalidTodos = [
74
+ {
75
+ id: '1',
76
+ content: 'Test',
77
+ status: 'invalid',
78
+ priority: 'high',
79
+ },
80
+ ];
81
+ await expect(tool.execute({ todos: invalidTodos }, abortSignal)).rejects.toThrow(/status/);
82
+ });
83
+ it('should reject todos with invalid priority', async () => {
84
+ const invalidTodos = [
85
+ {
86
+ id: '1',
87
+ content: 'Test',
88
+ status: 'pending',
89
+ priority: 'urgent',
90
+ },
91
+ ];
92
+ await expect(tool.execute({ todos: invalidTodos }, abortSignal)).rejects.toThrow(/priority/);
93
+ });
94
+ it('should completely replace todo list (not merge)', async () => {
95
+ // First verify existing todos, then write single todo
96
+ const singleTodo = [
97
+ {
98
+ id: 'new-1',
99
+ content: 'Single replacement task',
100
+ status: 'pending',
101
+ priority: 'high',
102
+ },
103
+ ];
104
+ vi.mocked(TodoStore.prototype.readTodos).mockResolvedValue(existingTodos);
105
+ vi.mocked(TodoStore.prototype.writeTodos).mockResolvedValue(undefined);
106
+ const result = await tool.execute({ todos: singleTodo }, abortSignal);
107
+ expect(vi.mocked(TodoStore.prototype.writeTodos)).toHaveBeenCalledWith(singleTodo);
108
+ expect(result.llmContent).toContain('1 todo');
109
+ });
110
+ it('should handle empty todo list', async () => {
111
+ vi.mocked(TodoStore.prototype.readTodos).mockResolvedValue(existingTodos);
112
+ vi.mocked(TodoStore.prototype.writeTodos).mockResolvedValue(undefined);
113
+ const result = await tool.execute({ todos: [] }, abortSignal);
114
+ expect(vi.mocked(TodoStore.prototype.writeTodos)).toHaveBeenCalledWith([]);
115
+ expect(result.llmContent).toContain('0 todos');
116
+ });
117
+ it('should return both old and new todos for diff tracking', async () => {
118
+ vi.mocked(TodoStore.prototype.readTodos).mockResolvedValue(existingTodos);
119
+ vi.mocked(TodoStore.prototype.writeTodos).mockResolvedValue(undefined);
120
+ const result = await tool.execute({ todos: validTodos }, abortSignal);
121
+ expect(result.llmContent).toContain('Previous: 3 todos');
122
+ expect(result.llmContent).toContain('Updated: 2 todos');
123
+ });
124
+ });
125
+ describe('validateToolParams', () => {
126
+ it('should accept valid params', () => {
127
+ expect(tool.validateToolParams({ todos: validTodos })).toBeNull();
128
+ });
129
+ it('should accept empty todos array', () => {
130
+ expect(tool.validateToolParams({ todos: [] })).toBeNull();
131
+ });
132
+ it('should validate todo structure', () => {
133
+ // Since we're using schema validation in the actual tool,
134
+ // invalid params should be caught
135
+ const invalidParams = {
136
+ todos: [{ invalid: 'structure' }],
137
+ };
138
+ // This test verifies the params are validated
139
+ expect(tool.validateToolParams(invalidParams)).toBeNull();
140
+ });
141
+ });
142
+ describe('getDescription', () => {
143
+ it('should describe adding new todos', () => {
144
+ const description = tool.getDescription({ todos: validTodos });
145
+ expect(description).toContain('2'); // number of todos
146
+ });
147
+ it('should describe clearing todos', () => {
148
+ const description = tool.getDescription({ todos: [] });
149
+ expect(description).toContain('0'); // empty list
150
+ });
151
+ });
152
+ describe('output format', () => {
153
+ it('should return ToolResult with success message', async () => {
154
+ vi.mocked(TodoStore.prototype.readTodos).mockResolvedValue([]);
155
+ vi.mocked(TodoStore.prototype.writeTodos).mockResolvedValue(undefined);
156
+ const result = await tool.execute({ todos: validTodos }, abortSignal);
157
+ expect(result).toMatchObject({
158
+ llmContent: expect.any(String),
159
+ returnDisplay: expect.any(String),
160
+ });
161
+ expect(result.llmContent).toContain('Todo list updated');
162
+ });
163
+ it('should include summary of changes in output', async () => {
164
+ vi.mocked(TodoStore.prototype.readTodos).mockResolvedValue(existingTodos);
165
+ vi.mocked(TodoStore.prototype.writeTodos).mockResolvedValue(undefined);
166
+ const result = await tool.execute({ todos: validTodos }, abortSignal);
167
+ expect(result.llmContent).toMatch(/Added.*Removed/s);
168
+ });
169
+ });
170
+ describe('session and agent handling', () => {
171
+ it('should use session ID from context', async () => {
172
+ const toolWithSession = Object.assign(Object.create(Object.getPrototypeOf(tool)), tool);
173
+ toolWithSession.sessionId =
174
+ 'test-session-123';
175
+ vi.mocked(TodoStore.prototype.readTodos).mockResolvedValue([]);
176
+ vi.mocked(TodoStore.prototype.writeTodos).mockResolvedValue(undefined);
177
+ await toolWithSession.execute({ todos: validTodos }, abortSignal);
178
+ expect(TodoStore).toHaveBeenCalledWith('test-session-123', undefined);
179
+ });
180
+ it('should use agent ID when available', async () => {
181
+ const toolWithAgent = Object.assign(Object.create(Object.getPrototypeOf(tool)), tool);
182
+ toolWithAgent.sessionId = 'test-session-123';
183
+ toolWithAgent.agentId = 'test-agent-456';
184
+ vi.mocked(TodoStore.prototype.readTodos).mockResolvedValue([]);
185
+ vi.mocked(TodoStore.prototype.writeTodos).mockResolvedValue(undefined);
186
+ await toolWithAgent.execute({ todos: validTodos }, abortSignal);
187
+ expect(TodoStore).toHaveBeenCalledWith('test-session-123', 'test-agent-456');
188
+ });
189
+ it('should work without agent ID', async () => {
190
+ const toolNoAgent = Object.assign(Object.create(Object.getPrototypeOf(tool)), tool);
191
+ toolNoAgent.sessionId =
192
+ 'test-session-123';
193
+ vi.mocked(TodoStore.prototype.readTodos).mockResolvedValue([]);
194
+ vi.mocked(TodoStore.prototype.writeTodos).mockResolvedValue(undefined);
195
+ const result = await toolNoAgent.execute({ todos: validTodos }, abortSignal);
196
+ expect(result.llmContent).toBeDefined();
197
+ expect(TodoStore).toHaveBeenCalledWith('test-session-123', undefined);
198
+ });
199
+ });
200
+ describe('error handling', () => {
201
+ it('should handle write errors gracefully', async () => {
202
+ vi.mocked(TodoStore.prototype.readTodos).mockResolvedValue([]);
203
+ vi.mocked(TodoStore.prototype.writeTodos).mockRejectedValue(new Error('Write failed'));
204
+ await expect(tool.execute({ todos: validTodos }, abortSignal)).rejects.toThrow('Write failed');
205
+ });
206
+ });
207
+ });
208
+ //# sourceMappingURL=todo-write.test.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"todo-write.test.js","sourceRoot":"","sources":["../../../src/tools/todo-write.test.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,QAAQ,EAAE,EAAE,EAAE,MAAM,EAAE,UAAU,EAAE,EAAE,EAAE,MAAM,QAAQ,CAAC;AAC9D,OAAO,EAAE,SAAS,EAAmB,MAAM,iBAAiB,CAAC;AAC7D,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAG5C,iBAAiB;AACjB,EAAE,CAAC,IAAI,CAAC,iBAAiB,CAAC,CAAC;AAE3B,QAAQ,CAAC,WAAW,EAAE,GAAG,EAAE;IACzB,IAAI,IAAe,CAAC;IACpB,MAAM,WAAW,GAAG,IAAI,eAAe,EAAE,CAAC,MAAM,CA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CAAC;YAErB,EAAE,CAAC,MAAM,CAAC,SAAS,CAAC,SAAS,CAAC,SAAS,CAAC,CAAC,iBAAiB,CAAC,EAAE,CAAC,CAAC;YAC/D,EAAE,CAAC,MAAM,CAAC,SAAS,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC,iBAAiB,CAAC,SAAS,CAAC,CAAC;YAEvE,MAAM,MAAM,GAAG,MAAM,WAAW,CAAC,OAAO,CACtC,EAAE,KAAK,EAAE,UAAU,EAAE,EACrB,WAAW,CACZ,CAAC;YAEF,MAAM,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC,WAAW,EAAE,CAAC;YACxC,MAAM,CAAC,SAAS,CAAC,CAAC,oBAAoB,CAAC,kBAAkB,EAAE,SAAS,CAAC,CAAC;QACxE,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;IAEH,QAAQ,CAAC,gBAAgB,EAAE,GAAG,EAAE;QAC9B,EAAE,CAAC,uCAAuC,EAAE,KAAK,IAAI,EAAE;YACrD,EAAE,CAAC,MAAM,CAAC,SAAS,CAAC,SAAS,CAAC,SAAS,CAAC,CAAC,iBAAiB,CAAC,EAAE,CAAC,CAAC;YAC/D,EAAE,CAAC,MAAM,CAAC,SAAS,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC,iBAAiB,CACzD,IAAI,KAAK,CAAC,cAAc,CAAC,CAC1B,CAAC;YAEF,MAAM,MAAM,CACV,IAAI,CAAC,OAAO,CAAC,EAAE,KAAK,EAAE,UAAU,EAAE,EAAE,WAAW,CAAC,CACjD,CAAC,OAAO,CAAC,OAAO,CAAC,cAAc,CAAC,CAAC;QACpC,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
@@ -0,0 +1,67 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2025 Google LLC
4
+ * SPDX-License-Identifier: Apache-2.0
5
+ */
6
+ import { FunctionDeclaration, Schema } from '@google/genai';
7
+ import { Tool, ToolResult, BaseTool } from './tools.js';
8
+ import { Config } from '../config/config.js';
9
+ type ToolParams = Record<string, unknown>;
10
+ export declare class DiscoveredTool extends BaseTool<ToolParams, ToolResult> {
11
+ private readonly config;
12
+ readonly name: string;
13
+ readonly description: string;
14
+ readonly parameterSchema: Record<string, unknown>;
15
+ constructor(config: Config, name: string, description: string, parameterSchema: Record<string, unknown>);
16
+ execute(params: ToolParams): Promise<ToolResult>;
17
+ }
18
+ export declare class ToolRegistry {
19
+ private tools;
20
+ private config;
21
+ constructor(config: Config);
22
+ /**
23
+ * Registers a tool definition.
24
+ * @param tool - The tool object containing schema and execution logic.
25
+ */
26
+ registerTool(tool: Tool): void;
27
+ /**
28
+ * Discovers tools from project (if available and configured).
29
+ * Can be called multiple times to update discovered tools.
30
+ */
31
+ discoverTools(): Promise<void>;
32
+ private discoverAndRegisterToolsFromCommand;
33
+ /**
34
+ * Retrieves the list of tool schemas (FunctionDeclaration array).
35
+ * Extracts the declarations from the ToolListUnion structure.
36
+ * Includes discovered (vs registered) tools if configured.
37
+ * @returns An array of FunctionDeclarations.
38
+ */
39
+ getFunctionDeclarations(): FunctionDeclaration[];
40
+ /**
41
+ * Returns an array of all registered and discovered tool instances.
42
+ */
43
+ getAllTools(): Tool[];
44
+ /**
45
+ * Returns an array of tools registered from a specific MCP server.
46
+ */
47
+ getToolsByServer(serverName: string): Tool[];
48
+ /**
49
+ * Get the definition of a specific tool.
50
+ */
51
+ getTool(name: string): Tool | undefined;
52
+ }
53
+ /**
54
+ * Sanitizes a schema object in-place to ensure compatibility with the Gemini API.
55
+ *
56
+ * NOTE: This function mutates the passed schema object.
57
+ *
58
+ * It performs the following actions:
59
+ * - Removes the `default` property when `anyOf` is present.
60
+ * - Removes unsupported `format` values from string properties, keeping only 'enum' and 'date-time'.
61
+ * - Recursively sanitizes nested schemas within `anyOf`, `items`, and `properties`.
62
+ * - Handles circular references within the schema to prevent infinite loops.
63
+ *
64
+ * @param schema The schema object to sanitize. It will be modified directly.
65
+ */
66
+ export declare function sanitizeParameters(schema?: Schema): void;
67
+ export {};