@empiricalrun/test-gen 0.78.0 → 0.78.2

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 (406) hide show
  1. package/CHANGELOG.md +19 -0
  2. package/dist/actions/index.d.ts +0 -1
  3. package/dist/actions/index.d.ts.map +1 -1
  4. package/dist/actions/index.js +0 -10
  5. package/dist/agent/base/index.d.ts +28 -19
  6. package/dist/agent/base/index.d.ts.map +1 -1
  7. package/dist/agent/base/index.js +25 -14
  8. package/dist/agent/browsing/run.d.ts +1 -1
  9. package/dist/agent/browsing/run.d.ts.map +1 -1
  10. package/dist/agent/chat/agent-loop.d.ts +5 -5
  11. package/dist/agent/chat/agent-loop.d.ts.map +1 -1
  12. package/dist/agent/chat/exports.d.ts +3 -4
  13. package/dist/agent/chat/exports.d.ts.map +1 -1
  14. package/dist/agent/chat/exports.js +5 -11
  15. package/dist/agent/chat/index.d.ts +4 -3
  16. package/dist/agent/chat/index.d.ts.map +1 -1
  17. package/dist/agent/chat/index.js +12 -5
  18. package/dist/agent/chat/models.d.ts +1 -1
  19. package/dist/agent/chat/models.d.ts.map +1 -1
  20. package/dist/agent/chat/models.js +3 -3
  21. package/dist/agent/chat/prompt/pw-utils-docs.d.ts +1 -1
  22. package/dist/agent/chat/prompt/pw-utils-docs.d.ts.map +1 -1
  23. package/dist/agent/chat/prompt/pw-utils-docs.js +42 -0
  24. package/dist/agent/chat/prompt/repo.d.ts +2 -2
  25. package/dist/agent/chat/prompt/repo.d.ts.map +1 -1
  26. package/dist/agent/chat/prompt/repo.js +2 -2
  27. package/dist/agent/chat/state.d.ts +14 -19
  28. package/dist/agent/chat/state.d.ts.map +1 -1
  29. package/dist/agent/chat/state.js +10 -45
  30. package/dist/agent/chat/utils.d.ts +5 -5
  31. package/dist/agent/chat/utils.d.ts.map +1 -1
  32. package/dist/agent/cli.d.ts +2 -2
  33. package/dist/agent/cli.d.ts.map +1 -1
  34. package/dist/agent/cli.js +5 -6
  35. package/dist/agent/code-review/index.d.ts +4 -3
  36. package/dist/agent/code-review/index.d.ts.map +1 -1
  37. package/dist/agent/code-review/index.js +10 -4
  38. package/dist/agent/code-review/types.d.ts +2 -35
  39. package/dist/agent/code-review/types.d.ts.map +1 -1
  40. package/dist/agent/code-review/types.js +4 -11
  41. package/dist/agent/cua/index.d.ts +1 -1
  42. package/dist/agent/cua/index.d.ts.map +1 -1
  43. package/dist/agent/cua/index.js +24 -13
  44. package/dist/agent/cua/pw-codegen/factory.d.ts +15 -0
  45. package/dist/agent/cua/pw-codegen/factory.d.ts.map +1 -0
  46. package/dist/agent/cua/pw-codegen/factory.js +59 -0
  47. package/dist/agent/cua/pw-codegen/index.d.ts +7 -0
  48. package/dist/agent/cua/pw-codegen/index.d.ts.map +1 -0
  49. package/dist/agent/cua/pw-codegen/index.js +14 -0
  50. package/dist/agent/cua/pw-codegen/pw-event-sink/index.d.ts +43 -0
  51. package/dist/agent/cua/pw-codegen/pw-event-sink/index.d.ts.map +1 -0
  52. package/dist/agent/cua/pw-codegen/pw-event-sink/index.js +250 -0
  53. package/dist/agent/cua/pw-codegen/pw-pause/for-recorder.d.ts.map +1 -1
  54. package/dist/agent/cua/pw-codegen/pw-pause/for-recorder.js +0 -3
  55. package/dist/agent/cua/pw-codegen/pw-pause/index.d.ts +1 -1
  56. package/dist/agent/cua/pw-codegen/pw-pause/index.d.ts.map +1 -1
  57. package/dist/agent/cua/pw-codegen/pw-pause/index.js +7 -3
  58. package/dist/agent/cua/pw-codegen/pw-pause/patch.d.ts +15 -3
  59. package/dist/agent/cua/pw-codegen/pw-pause/patch.d.ts.map +1 -1
  60. package/dist/agent/cua/pw-codegen/pw-pause/patch.js +38 -10
  61. package/dist/agent/cua/pw-codegen/version.d.ts +25 -0
  62. package/dist/agent/cua/pw-codegen/version.d.ts.map +1 -0
  63. package/dist/agent/cua/pw-codegen/version.js +86 -0
  64. package/dist/agent/index.d.ts +1 -5
  65. package/dist/agent/index.d.ts.map +1 -1
  66. package/dist/agent/index.js +1 -11
  67. package/dist/agent/master/element-annotation.d.ts +1 -1
  68. package/dist/agent/master/element-annotation.d.ts.map +1 -1
  69. package/dist/agent/master/next-action.d.ts +1 -1
  70. package/dist/agent/master/next-action.d.ts.map +1 -1
  71. package/dist/agent/master/next-action.js +1 -6
  72. package/dist/agent/master/run.d.ts +3 -2
  73. package/dist/agent/master/run.d.ts.map +1 -1
  74. package/dist/agent/master/run.js +0 -26
  75. package/dist/agent/triage/index.d.ts +4 -3
  76. package/dist/agent/triage/index.d.ts.map +1 -1
  77. package/dist/agent/triage/index.js +33 -20
  78. package/dist/artifacts/index.d.ts +1 -1
  79. package/dist/artifacts/index.d.ts.map +1 -1
  80. package/dist/artifacts/utils.d.ts +1 -1
  81. package/dist/artifacts/utils.d.ts.map +1 -1
  82. package/dist/bin/environments.d.ts +1 -1
  83. package/dist/bin/environments.d.ts.map +1 -1
  84. package/dist/bin/index.js +2 -2
  85. package/dist/bin/setup.d.ts +1 -1
  86. package/dist/bin/setup.d.ts.map +1 -1
  87. package/dist/bin/utils/fs/index.d.ts +1 -1
  88. package/dist/bin/utils/fs/index.d.ts.map +1 -1
  89. package/dist/bin/utils/platform/web/index.d.ts +2 -2
  90. package/dist/bin/utils/platform/web/index.d.ts.map +1 -1
  91. package/dist/bin/utils/platform/web/index.js +1 -1
  92. package/dist/bin/utils/scenarios/index.d.ts +1 -1
  93. package/dist/bin/utils/scenarios/index.d.ts.map +1 -1
  94. package/dist/constants/index.d.ts +0 -4
  95. package/dist/constants/index.d.ts.map +1 -1
  96. package/dist/constants/index.js +0 -6
  97. package/dist/dashboard/client.d.ts +1 -1
  98. package/dist/dashboard/client.d.ts.map +1 -1
  99. package/dist/dashboard/index.d.ts +1 -0
  100. package/dist/dashboard/index.d.ts.map +1 -1
  101. package/dist/dashboard/index.js +4 -1
  102. package/dist/dashboard/tool-response.d.ts +5 -0
  103. package/dist/dashboard/tool-response.d.ts.map +1 -0
  104. package/dist/dashboard/tool-response.js +88 -0
  105. package/dist/dashboard/totp.js +1 -1
  106. package/dist/file/server.d.ts +1 -1
  107. package/dist/file/server.d.ts.map +1 -1
  108. package/dist/file/server.js +2 -1
  109. package/dist/file-info/adapters/file-system/index.d.ts +1 -1
  110. package/dist/file-info/adapters/file-system/index.d.ts.map +1 -1
  111. package/dist/file-info/adapters/file-system/reader.d.ts +1 -1
  112. package/dist/file-info/adapters/file-system/reader.d.ts.map +1 -1
  113. package/dist/file-info/adapters/github/index.d.ts +2 -1
  114. package/dist/file-info/adapters/github/index.d.ts.map +1 -1
  115. package/dist/file-info/adapters/github/reader.d.ts +2 -1
  116. package/dist/file-info/adapters/github/reader.d.ts.map +1 -1
  117. package/dist/recorder/index.d.ts.map +1 -1
  118. package/dist/recorder/index.js +9 -3
  119. package/dist/recorder/upload.d.ts +1 -1
  120. package/dist/recorder/upload.d.ts.map +1 -1
  121. package/dist/tools/analyse-video/index.d.ts +1 -1
  122. package/dist/tools/analyse-video/index.d.ts.map +1 -1
  123. package/dist/tools/analyse-video/index.js +20 -13
  124. package/dist/tools/create-pull-request/index.d.ts +1 -1
  125. package/dist/tools/create-pull-request/index.d.ts.map +1 -1
  126. package/dist/tools/create-pull-request/utils.d.ts +3 -2
  127. package/dist/tools/create-pull-request/utils.d.ts.map +1 -1
  128. package/dist/tools/definitions/analyse-video.d.ts +5 -37
  129. package/dist/tools/definitions/analyse-video.d.ts.map +1 -1
  130. package/dist/tools/definitions/analyse-video.js +12 -25
  131. package/dist/tools/definitions/delete-file.d.ts +5 -1
  132. package/dist/tools/definitions/delete-file.d.ts.map +1 -1
  133. package/dist/tools/definitions/delete-file.js +3 -3
  134. package/dist/tools/definitions/download-build.d.ts +2 -6
  135. package/dist/tools/definitions/download-build.d.ts.map +1 -1
  136. package/dist/tools/definitions/grep.d.ts +1 -1
  137. package/dist/tools/definitions/grep.d.ts.map +1 -1
  138. package/dist/tools/definitions/list-tests-and-projects.d.ts +2 -6
  139. package/dist/tools/definitions/list-tests-and-projects.d.ts.map +1 -1
  140. package/dist/tools/definitions/list-tests-and-projects.js +1 -1
  141. package/dist/tools/definitions/merge-conflicts.d.ts +1 -1
  142. package/dist/tools/definitions/merge-conflicts.d.ts.map +1 -1
  143. package/dist/tools/definitions/merge-conflicts.js +2 -2
  144. package/dist/tools/definitions/rename-file.d.ts +1 -1
  145. package/dist/tools/definitions/rename-file.d.ts.map +1 -1
  146. package/dist/tools/definitions/review-pull-request.d.ts +1 -1
  147. package/dist/tools/definitions/review-pull-request.d.ts.map +1 -1
  148. package/dist/tools/definitions/review-pull-request.js +1 -1
  149. package/dist/tools/definitions/run-test.d.ts +3 -15
  150. package/dist/tools/definitions/run-test.d.ts.map +1 -1
  151. package/dist/tools/definitions/safe-bash.d.ts +8 -0
  152. package/dist/tools/definitions/safe-bash.d.ts.map +1 -0
  153. package/dist/tools/definitions/safe-bash.js +32 -0
  154. package/dist/tools/definitions/str_replace_editor.d.ts +1 -1
  155. package/dist/tools/definitions/str_replace_editor.d.ts.map +1 -1
  156. package/dist/tools/definitions/test-gen-browser.d.ts +3 -15
  157. package/dist/tools/definitions/test-gen-browser.d.ts.map +1 -1
  158. package/dist/tools/definitions/upgrade-packages.d.ts +4 -26
  159. package/dist/tools/definitions/upgrade-packages.d.ts.map +1 -1
  160. package/dist/tools/definitions/utils.d.ts +2 -10
  161. package/dist/tools/definitions/utils.d.ts.map +1 -1
  162. package/dist/tools/definitions/utils.js +1 -1
  163. package/dist/tools/delete-file/index.d.ts +1 -1
  164. package/dist/tools/delete-file/index.d.ts.map +1 -1
  165. package/dist/tools/delete-file/index.js +6 -2
  166. package/dist/tools/diagnosis-fetcher.d.ts +1 -1
  167. package/dist/tools/diagnosis-fetcher.d.ts.map +1 -1
  168. package/dist/tools/diagnosis-fetcher.js +92 -47
  169. package/dist/tools/download-build/index.d.ts +1 -1
  170. package/dist/tools/download-build/index.d.ts.map +1 -1
  171. package/dist/tools/executor/base.d.ts +3 -2
  172. package/dist/tools/executor/base.d.ts.map +1 -1
  173. package/dist/tools/executor/base.js +5 -8
  174. package/dist/tools/executor/index.d.ts +3 -0
  175. package/dist/tools/executor/index.d.ts.map +1 -1
  176. package/dist/tools/executor/index.js +12 -10
  177. package/dist/tools/executor/utils/checkpoint.d.ts.map +1 -1
  178. package/dist/tools/executor/utils/checkpoint.js +0 -4
  179. package/dist/tools/executor/utils/git.d.ts +7 -1
  180. package/dist/tools/executor/utils/git.d.ts.map +1 -1
  181. package/dist/tools/executor/utils/git.js +10 -3
  182. package/dist/tools/executor/utils/index.d.ts +1 -2
  183. package/dist/tools/executor/utils/index.d.ts.map +1 -1
  184. package/dist/tools/executor/utils/index.js +0 -20
  185. package/dist/tools/executor/utils/pr-description.d.ts +1 -1
  186. package/dist/tools/executor/utils/pr-description.d.ts.map +1 -1
  187. package/dist/tools/fetch-file/index.d.ts +2 -6
  188. package/dist/tools/fetch-file/index.d.ts.map +1 -1
  189. package/dist/tools/fetch-file/index.js +53 -13
  190. package/dist/tools/fetch-file/utils.d.ts +3 -0
  191. package/dist/tools/fetch-file/utils.d.ts.map +1 -0
  192. package/dist/tools/fetch-file/utils.js +136 -0
  193. package/dist/tools/fetch-session-diff/index.d.ts +1 -1
  194. package/dist/tools/fetch-session-diff/index.d.ts.map +1 -1
  195. package/dist/tools/fetch-session-diff/index.js +26 -2
  196. package/dist/tools/file-operations/create.d.ts +1 -1
  197. package/dist/tools/file-operations/create.d.ts.map +1 -1
  198. package/dist/tools/file-operations/index.d.ts +2 -1
  199. package/dist/tools/file-operations/index.d.ts.map +1 -1
  200. package/dist/tools/file-operations/insert.d.ts +1 -1
  201. package/dist/tools/file-operations/insert.d.ts.map +1 -1
  202. package/dist/tools/file-operations/replace.d.ts +1 -1
  203. package/dist/tools/file-operations/replace.d.ts.map +1 -1
  204. package/dist/tools/file-operations/replace.js +0 -1
  205. package/dist/tools/file-operations/view/index.d.ts +2 -1
  206. package/dist/tools/file-operations/view/index.d.ts.map +1 -1
  207. package/dist/tools/firecrawl-scrape/index.d.ts +9 -0
  208. package/dist/tools/firecrawl-scrape/index.d.ts.map +1 -0
  209. package/dist/tools/firecrawl-scrape/index.js +107 -0
  210. package/dist/tools/grep/index.d.ts +1 -1
  211. package/dist/tools/grep/index.d.ts.map +1 -1
  212. package/dist/tools/grep/index.js +15 -12
  213. package/dist/tools/index.d.ts +5 -24
  214. package/dist/tools/index.d.ts.map +1 -1
  215. package/dist/tools/index.js +21 -42
  216. package/dist/tools/issues-v1/create-issue.d.ts +3 -0
  217. package/dist/tools/issues-v1/create-issue.d.ts.map +1 -0
  218. package/dist/tools/{issues → issues-v1}/create-issue.js +5 -9
  219. package/dist/tools/issues-v1/index.d.ts.map +1 -0
  220. package/dist/tools/issues-v1/list-issues.d.ts +3 -0
  221. package/dist/tools/issues-v1/list-issues.d.ts.map +1 -0
  222. package/dist/tools/issues-v1/update-issue.d.ts +3 -0
  223. package/dist/tools/issues-v1/update-issue.d.ts.map +1 -0
  224. package/dist/tools/{issues → issues-v1}/update-issue.js +1 -9
  225. package/dist/tools/{issues → issues-v1}/utils.d.ts +2 -1
  226. package/dist/tools/issues-v1/utils.d.ts.map +1 -0
  227. package/dist/tools/issues-v2/create-issue.d.ts +3 -0
  228. package/dist/tools/issues-v2/create-issue.d.ts.map +1 -0
  229. package/dist/tools/issues-v2/create-issue.js +82 -0
  230. package/dist/tools/issues-v2/set-issue-description.d.ts +3 -0
  231. package/dist/tools/issues-v2/set-issue-description.d.ts.map +1 -0
  232. package/dist/tools/issues-v2/set-issue-description.js +59 -0
  233. package/dist/tools/issues-v2/update-issue.d.ts +3 -0
  234. package/dist/tools/issues-v2/update-issue.d.ts.map +1 -0
  235. package/dist/tools/issues-v2/update-issue.js +85 -0
  236. package/dist/tools/list-environments.d.ts +1 -1
  237. package/dist/tools/list-environments.d.ts.map +1 -1
  238. package/dist/tools/list-tests-and-projects/index.d.ts +1 -1
  239. package/dist/tools/list-tests-and-projects/index.d.ts.map +1 -1
  240. package/dist/tools/list-tests-and-projects/index.js +14 -4
  241. package/dist/tools/merge-conflicts/index.d.ts +1 -1
  242. package/dist/tools/merge-conflicts/index.d.ts.map +1 -1
  243. package/dist/tools/merge-conflicts/index.js +23 -10
  244. package/dist/tools/rename-file/index.d.ts +1 -1
  245. package/dist/tools/rename-file/index.d.ts.map +1 -1
  246. package/dist/tools/rename-file/index.js +0 -1
  247. package/dist/tools/review-pull-request/index.d.ts +1 -1
  248. package/dist/tools/review-pull-request/index.d.ts.map +1 -1
  249. package/dist/tools/review-pull-request/index.js +5 -4
  250. package/dist/tools/run-test.d.ts +1 -1
  251. package/dist/tools/run-test.d.ts.map +1 -1
  252. package/dist/tools/safe-bash/index.d.ts +3 -0
  253. package/dist/tools/safe-bash/index.d.ts.map +1 -0
  254. package/dist/tools/safe-bash/index.js +128 -0
  255. package/dist/tools/test-gen-browser.d.ts +1 -1
  256. package/dist/tools/test-gen-browser.d.ts.map +1 -1
  257. package/dist/tools/test-gen-browser.js +64 -21
  258. package/dist/tools/test-run-fetcher/index.d.ts +2 -2
  259. package/dist/tools/test-run-fetcher/index.d.ts.map +1 -1
  260. package/dist/tools/test-run-fetcher/index.js +67 -66
  261. package/dist/tools/trace-dot-zip/index.d.ts +1 -1
  262. package/dist/tools/trace-dot-zip/index.d.ts.map +1 -1
  263. package/dist/tools/trace-dot-zip/utils/network-trace.d.ts.map +1 -1
  264. package/dist/tools/trace-dot-zip/utils/network-trace.js +5 -10
  265. package/dist/tools/triage-summary/index.d.ts +1 -1
  266. package/dist/tools/triage-summary/index.d.ts.map +1 -1
  267. package/dist/tools/triage-summary/index.js +5 -2
  268. package/dist/tools/triage-summary/utils.d.ts +1 -1
  269. package/dist/tools/triage-summary/utils.d.ts.map +1 -1
  270. package/dist/tools/upgrade-packages/index.d.ts +1 -1
  271. package/dist/tools/upgrade-packages/index.d.ts.map +1 -1
  272. package/dist/tools/upgrade-packages/index.js +14 -8
  273. package/dist/tools/upgrade-packages/utils.d.ts +9 -5
  274. package/dist/tools/upgrade-packages/utils.d.ts.map +1 -1
  275. package/dist/tools/upgrade-packages/utils.js +56 -16
  276. package/dist/tools/utils/queue.d.ts +1 -1
  277. package/dist/tools/utils/queue.d.ts.map +1 -1
  278. package/dist/tools/utils/validate-schema.d.ts +3 -0
  279. package/dist/tools/utils/validate-schema.d.ts.map +1 -0
  280. package/dist/tools/utils/validate-schema.js +27 -0
  281. package/dist/utils/SQSClient.d.ts +1 -1
  282. package/dist/utils/SQSClient.d.ts.map +1 -1
  283. package/dist/utils/dedup/dedup-image.js +2 -2
  284. package/dist/utils/dedup/find-threshold.d.ts +1 -1
  285. package/dist/utils/dedup/find-threshold.d.ts.map +1 -1
  286. package/dist/utils/dedup/find-threshold.js +2 -2
  287. package/dist/utils/model.d.ts +1 -1
  288. package/dist/utils/model.d.ts.map +1 -1
  289. package/dist/utils/model.js +6 -10
  290. package/dist/utils/playwright-report-parser.d.ts +1 -1
  291. package/dist/utils/playwright-report-parser.d.ts.map +1 -1
  292. package/dist/utils/playwright-test-id.d.ts +8 -0
  293. package/dist/utils/playwright-test-id.d.ts.map +1 -0
  294. package/dist/utils/playwright-test-id.js +21 -0
  295. package/dist/utils/repo-tree.d.ts +1 -1
  296. package/dist/utils/repo-tree.d.ts.map +1 -1
  297. package/dist/utils/slug.d.ts.map +1 -1
  298. package/dist/utils/slug.js +15 -4
  299. package/dist/utils/url-validation.d.ts +2 -0
  300. package/dist/utils/url-validation.d.ts.map +1 -0
  301. package/dist/utils/url-validation.js +16 -0
  302. package/dist/video-core/index.d.ts +7 -24
  303. package/dist/video-core/index.d.ts.map +1 -1
  304. package/dist/video-core/index.js +32 -25
  305. package/dist/video-core/model-limits.d.ts +2 -2
  306. package/dist/video-core/model-limits.d.ts.map +1 -1
  307. package/dist/video-core/model-limits.js +9 -19
  308. package/dist/video-core/storage-manager.d.ts +2 -1
  309. package/dist/video-core/storage-manager.d.ts.map +1 -1
  310. package/dist/video-core/types.d.ts +1 -1
  311. package/dist/video-core/types.d.ts.map +1 -1
  312. package/dist/video-core/utils.d.ts +5 -7
  313. package/dist/video-core/utils.d.ts.map +1 -1
  314. package/dist/video-core/utils.js +39 -132
  315. package/package.json +10 -6
  316. package/tsconfig.tsbuildinfo +1 -1
  317. package/dist/actions/skill.d.ts +0 -21
  318. package/dist/actions/skill.d.ts.map +0 -1
  319. package/dist/actions/skill.js +0 -127
  320. package/dist/agent/chat/filesystem-cache.d.ts +0 -12
  321. package/dist/agent/chat/filesystem-cache.d.ts.map +0 -1
  322. package/dist/agent/chat/filesystem-cache.js +0 -101
  323. package/dist/agent/codegen/create-test-block.d.ts +0 -8
  324. package/dist/agent/codegen/create-test-block.d.ts.map +0 -1
  325. package/dist/agent/codegen/create-test-block.js +0 -47
  326. package/dist/agent/codegen/fix-ts-errors.d.ts +0 -12
  327. package/dist/agent/codegen/fix-ts-errors.d.ts.map +0 -1
  328. package/dist/agent/codegen/fix-ts-errors.js +0 -78
  329. package/dist/agent/codegen/lexical-scoped-vars.d.ts +0 -9
  330. package/dist/agent/codegen/lexical-scoped-vars.d.ts.map +0 -1
  331. package/dist/agent/codegen/lexical-scoped-vars.js +0 -55
  332. package/dist/agent/codegen/skills-retriever.d.ts +0 -26
  333. package/dist/agent/codegen/skills-retriever.d.ts.map +0 -1
  334. package/dist/agent/codegen/skills-retriever.js +0 -93
  335. package/dist/agent/codegen/test-update-feedback.d.ts +0 -12
  336. package/dist/agent/codegen/test-update-feedback.d.ts.map +0 -1
  337. package/dist/agent/codegen/test-update-feedback.js +0 -49
  338. package/dist/agent/codegen/types.d.ts +0 -25
  339. package/dist/agent/codegen/types.d.ts.map +0 -1
  340. package/dist/agent/codegen/types.js +0 -8
  341. package/dist/agent/codegen/update-flow.d.ts +0 -36
  342. package/dist/agent/codegen/update-flow.d.ts.map +0 -1
  343. package/dist/agent/codegen/update-flow.js +0 -259
  344. package/dist/agent/codegen/use-skill.d.ts +0 -11
  345. package/dist/agent/codegen/use-skill.d.ts.map +0 -1
  346. package/dist/agent/codegen/use-skill.js +0 -53
  347. package/dist/agent/codegen/utils.d.ts +0 -110
  348. package/dist/agent/codegen/utils.d.ts.map +0 -1
  349. package/dist/agent/codegen/utils.js +0 -376
  350. package/dist/agent/master/browser-tests/skills.spec.d.ts +0 -2
  351. package/dist/agent/master/browser-tests/skills.spec.d.ts.map +0 -1
  352. package/dist/agent/master/browser-tests/skills.spec.js +0 -112
  353. package/dist/agent/master/execute-skill-action.d.ts +0 -11
  354. package/dist/agent/master/execute-skill-action.d.ts.map +0 -1
  355. package/dist/agent/master/execute-skill-action.js +0 -23
  356. package/dist/agent/video-analysis/executor/index.d.ts +0 -5
  357. package/dist/agent/video-analysis/executor/index.d.ts.map +0 -1
  358. package/dist/agent/video-analysis/executor/index.js +0 -10
  359. package/dist/agent/video-analysis/index.d.ts +0 -7
  360. package/dist/agent/video-analysis/index.d.ts.map +0 -1
  361. package/dist/agent/video-analysis/index.js +0 -60
  362. package/dist/evals/append-create-test-agent.evals.d.ts +0 -4
  363. package/dist/evals/append-create-test-agent.evals.d.ts.map +0 -1
  364. package/dist/evals/append-create-test-agent.evals.js +0 -117
  365. package/dist/evals/fetch-pom-skills-agent.evals.d.ts +0 -4
  366. package/dist/evals/fetch-pom-skills-agent.evals.d.ts.map +0 -1
  367. package/dist/evals/fetch-pom-skills-agent.evals.js +0 -36
  368. package/dist/evals/master-agent.evals.d.ts +0 -4
  369. package/dist/evals/master-agent.evals.d.ts.map +0 -1
  370. package/dist/evals/master-agent.evals.js +0 -35
  371. package/dist/evals/type.d.ts +0 -12
  372. package/dist/evals/type.d.ts.map +0 -1
  373. package/dist/evals/type.js +0 -2
  374. package/dist/evals/update-scenario-agent.evals.d.ts +0 -4
  375. package/dist/evals/update-scenario-agent.evals.d.ts.map +0 -1
  376. package/dist/evals/update-scenario-agent.evals.js +0 -47
  377. package/dist/tools/fetch-last-successful-test-run/index.d.ts +0 -3
  378. package/dist/tools/fetch-last-successful-test-run/index.d.ts.map +0 -1
  379. package/dist/tools/fetch-last-successful-test-run/index.js +0 -60
  380. package/dist/tools/issues/create-issue.d.ts +0 -3
  381. package/dist/tools/issues/create-issue.d.ts.map +0 -1
  382. package/dist/tools/issues/index.d.ts.map +0 -1
  383. package/dist/tools/issues/list-issues.d.ts +0 -3
  384. package/dist/tools/issues/list-issues.d.ts.map +0 -1
  385. package/dist/tools/issues/metadata-schema.d.ts +0 -24
  386. package/dist/tools/issues/metadata-schema.d.ts.map +0 -1
  387. package/dist/tools/issues/metadata-schema.js +0 -22
  388. package/dist/tools/issues/update-issue.d.ts +0 -3
  389. package/dist/tools/issues/update-issue.d.ts.map +0 -1
  390. package/dist/tools/issues/utils.d.ts.map +0 -1
  391. package/dist/tools/utils/urls.d.ts +0 -5
  392. package/dist/tools/utils/urls.d.ts.map +0 -1
  393. package/dist/tools/utils/urls.js +0 -19
  394. package/dist/tools/view-failed-test-run-report/index.d.ts +0 -12
  395. package/dist/tools/view-failed-test-run-report/index.d.ts.map +0 -1
  396. package/dist/tools/view-failed-test-run-report/index.js +0 -151
  397. package/dist/video-core/agent-orchestrator.d.ts +0 -13
  398. package/dist/video-core/agent-orchestrator.d.ts.map +0 -1
  399. package/dist/video-core/agent-orchestrator.js +0 -59
  400. package/dist/video-core/xml-parser.d.ts +0 -3
  401. package/dist/video-core/xml-parser.d.ts.map +0 -1
  402. package/dist/video-core/xml-parser.js +0 -27
  403. /package/dist/tools/{issues → issues-v1}/index.d.ts +0 -0
  404. /package/dist/tools/{issues → issues-v1}/index.js +0 -0
  405. /package/dist/tools/{issues → issues-v1}/list-issues.js +0 -0
  406. /package/dist/tools/{issues → issues-v1}/utils.js +0 -0
@@ -1 +1 @@
1
- {"version":3,"file":"test-gen-browser.d.ts","sourceRoot":"","sources":["../../../src/tools/definitions/test-gen-browser.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AAC5D,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAQxB,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;EAe7B,CAAC;AAsFH,eAAO,MAAM,4BAA4B,EAAE,cAQ1C,CAAC"}
1
+ {"version":3,"file":"test-gen-browser.d.ts","sourceRoot":"","sources":["../../../src/tools/definitions/test-gen-browser.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,uCAAuC,CAAC;AACvE,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAQxB,eAAO,MAAM,kBAAkB;;;;;;iBAe7B,CAAC;AAsFH,eAAO,MAAM,4BAA4B,EAAE,cAQ1C,CAAC"}
@@ -1,36 +1,14 @@
1
- import type { ToolDefinition } from "@empiricalrun/shared-types";
1
+ import type { ToolDefinition } from "@empiricalrun/shared-types/chat-agent";
2
2
  import { z } from "zod";
3
3
  export declare const packageSpecSchema: z.ZodObject<{
4
4
  name: z.ZodString;
5
5
  version: z.ZodString;
6
- }, "strip", z.ZodTypeAny, {
7
- name: string;
8
- version: string;
9
- }, {
10
- name: string;
11
- version: string;
12
- }>;
6
+ }, z.core.$strip>;
13
7
  export declare const upgradePackagesSchema: z.ZodObject<{
14
8
  packages: z.ZodArray<z.ZodObject<{
15
9
  name: z.ZodString;
16
10
  version: z.ZodString;
17
- }, "strip", z.ZodTypeAny, {
18
- name: string;
19
- version: string;
20
- }, {
21
- name: string;
22
- version: string;
23
- }>, "many">;
24
- }, "strip", z.ZodTypeAny, {
25
- packages: {
26
- name: string;
27
- version: string;
28
- }[];
29
- }, {
30
- packages: {
31
- name: string;
32
- version: string;
33
- }[];
34
- }>;
11
+ }, z.core.$strip>>;
12
+ }, z.core.$strip>;
35
13
  export declare const upgradePackagesTool: ToolDefinition;
36
14
  //# sourceMappingURL=upgrade-packages.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"upgrade-packages.d.ts","sourceRoot":"","sources":["../../../src/tools/definitions/upgrade-packages.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AACjE,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAO,MAAM,iBAAiB;;;;;;;;;EAG5B,CAAC;AAEH,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;EAEhC,CAAC;AAEH,eAAO,MAAM,mBAAmB,EAAE,cASjC,CAAC"}
1
+ {"version":3,"file":"upgrade-packages.d.ts","sourceRoot":"","sources":["../../../src/tools/definitions/upgrade-packages.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,uCAAuC,CAAC;AAC5E,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAO,MAAM,iBAAiB;;;iBAG5B,CAAC;AAEH,eAAO,MAAM,qBAAqB;;;;;iBAEhC,CAAC;AAEH,eAAO,MAAM,mBAAmB,EAAE,cASjC,CAAC"}
@@ -1,15 +1,7 @@
1
1
  import { z } from "zod";
2
2
  export declare const getCommonTestNameSuitesFilePathSchema: (testNameDescription?: string) => z.ZodObject<{
3
3
  testName: z.ZodString;
4
- suites: z.ZodArray<z.ZodString, "many">;
4
+ suites: z.ZodArray<z.ZodString>;
5
5
  filePath: z.ZodString;
6
- }, "strip", z.ZodTypeAny, {
7
- suites: string[];
8
- testName: string;
9
- filePath: string;
10
- }, {
11
- suites: string[];
12
- testName: string;
13
- filePath: string;
14
- }>;
6
+ }, z.core.$strip>;
15
7
  //# sourceMappingURL=utils.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/tools/definitions/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAO,MAAM,qCAAqC,GAChD,sBAAsB,MAAM;;;;;;;;;;;;EAgB1B,CAAC"}
1
+ {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/tools/definitions/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAO,MAAM,qCAAqC,GAChD,sBAAsB,MAAM;;;;iBAgB1B,CAAC"}
@@ -11,6 +11,6 @@ const getCommonTestNameSuitesFilePathSchema = (testNameDescription) => zod_1.z.o
11
11
  .describe("The suites (describe blocks) where the test is located. If the test is not in any describe block, provide an empty array."),
12
12
  filePath: zod_1.z
13
13
  .string()
14
- .describe("Path of the file where the test is located. Path must be relative to the root of the repository. File name must end with .spec.ts. For example: tests/lesson.spec.ts"),
14
+ .describe("Path of the file where the test is located. Path must be relative to the repository. File name must end with .spec.ts. For example: tests/lesson.spec.ts - and NOT /repo/tests/lesson.spec.ts"),
15
15
  });
16
16
  exports.getCommonTestNameSuitesFilePathSchema = getCommonTestNameSuitesFilePathSchema;
@@ -1,3 +1,3 @@
1
- import type { Tool } from "@empiricalrun/shared-types";
1
+ import type { Tool } from "@empiricalrun/shared-types/chat-agent";
2
2
  export declare const deleteFileTool: Tool;
3
3
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/tools/delete-file/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAc,MAAM,4BAA4B,CAAC;AAQnE,eAAO,MAAM,cAAc,EAAE,IA2D5B,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/tools/delete-file/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAEV,IAAI,EAEL,MAAM,uCAAuC,CAAC;AAY/C,eAAO,MAAM,cAAc,EAAE,IAqE5B,CAAC"}
@@ -11,7 +11,7 @@ const web_1 = require("../../bin/utils/platform/web");
11
11
  const delete_file_1 = require("../definitions/delete-file");
12
12
  exports.deleteFileTool = {
13
13
  ...delete_file_1.deleteFileTool,
14
- execute: async ({ input, repoPath, collectArtifacts, }) => {
14
+ execute: async ({ input, repoPath, collectArtifacts, logger, }) => {
15
15
  try {
16
16
  const filePath = path_1.default.join(repoPath, input.path);
17
17
  // Validate that the file exists and is actually a file (not a directory)
@@ -55,7 +55,11 @@ exports.deleteFileTool = {
55
55
  };
56
56
  }
57
57
  catch (error) {
58
- console.error("Error deleting file", error);
58
+ logger.error("Error deleting file", {
59
+ tool: "deleteFileTool",
60
+ filePath: input.path,
61
+ error,
62
+ });
59
63
  return {
60
64
  isError: true,
61
65
  result: error instanceof Error ? error.message : String(error),
@@ -1,3 +1,3 @@
1
- import type { Tool } from "@empiricalrun/shared-types";
1
+ import type { Tool } from "@empiricalrun/shared-types/chat-agent";
2
2
  export declare const fetchDiagnosisReportTool: Tool;
3
3
  //# sourceMappingURL=diagnosis-fetcher.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"diagnosis-fetcher.d.ts","sourceRoot":"","sources":["../../src/tools/diagnosis-fetcher.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,4BAA4B,CAAC;AAcvD,eAAO,MAAM,wBAAwB,EAAE,IA+EtC,CAAC"}
1
+ {"version":3,"file":"diagnosis-fetcher.d.ts","sourceRoot":"","sources":["../../src/tools/diagnosis-fetcher.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,uCAAuC,CAAC;AAalE,eAAO,MAAM,wBAAwB,EAAE,IA6FtC,CAAC"}
@@ -1,45 +1,59 @@
1
1
  "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
2
  Object.defineProperty(exports, "__esModule", { value: true });
6
3
  exports.fetchDiagnosisReportTool = void 0;
7
- const path_1 = __importDefault(require("path"));
8
4
  const zod_1 = require("zod");
9
- const slug_1 = require("../utils/slug");
5
+ const playwright_report_parser_1 = require("../utils/playwright-report-parser");
10
6
  const DiagnosisSchema = zod_1.z.object({
11
- diagnosisUrl: zod_1.z
7
+ diagnosisId: zod_1.z
12
8
  .string()
13
- .describe("The full URL of the diagnosis (e.g. https://dash.empirical.run/shopflo-tests/diagnosis/split-cod-place-the-order--byynrPjCml57)"),
9
+ .describe("12 character random string that identifies a failing test case in a test run"),
14
10
  });
15
11
  exports.fetchDiagnosisReportTool = {
16
12
  schema: {
17
13
  name: "fetchDiagnosisDetails",
18
- description: "Fetch details about a test case diagnosis using its URL or slug. Returns diagnosis data including test metadata, error details, and file path. Use fileViewTool separately to read the actual test source code if needed.",
14
+ description: `Fetch details about a failed test case using its URL or slug.
15
+ This tool returns error stack, failing line, across multiple retries (generally, 3) for the
16
+ test case in a particular test run (identified by an id, like #3450).
17
+
18
+ ## How to use this tool?
19
+ - The input to this tool is a diagnosis identifier, which is random 12 character string (e.g byynrPjCml57).
20
+ Internally, this string is generated by nanoid.
21
+
22
+ - To get this diagnosis id, you can interpret incoming URLs that contain this id.
23
+
24
+ ### URL format 1
25
+
26
+ https://dash.empirical.run/<project-name>/test-runs/34548?detail=ULRHHNwiGZ2W
27
+
28
+ In the above, the test run id is #34548 and the diagnosis id is "ULRHHNwiGZ2W"
29
+
30
+ ### URL format 2
31
+
32
+ https://dash.empirical.run/<project-name>/diagnosis/slug-of-test-case-name--ULRHHNwiGZ2W
33
+
34
+ In the above, the diagnosis id is after the double hyphen, which is "ULRHHNwiGZ2W"
35
+
36
+ ## Related tools
37
+ - You can use the file view tool to read the actual test source code, or helper methods that
38
+ are imported in the test to get a complete sense of what the test case was testing.
39
+ - You can also fetch the entire test run report, which contains a list of failed test cases.`,
19
40
  parameters: DiagnosisSchema,
20
41
  },
21
42
  needsBrowser: false,
22
43
  isInlineTool: true,
23
- execute: async ({ input, repoPath, apiClient }) => {
24
- const { diagnosisUrl } = input;
25
- let slug;
26
- try {
27
- slug = (0, slug_1.extractSlugFromDiagnosisUrl)(diagnosisUrl);
28
- }
29
- catch (error) {
30
- return {
31
- isError: true,
32
- result: `Invalid diagnosis URL - could not extract slug: ${error instanceof Error ? error.message : String(error)}`,
33
- };
34
- }
44
+ execute: async ({ input, apiClient }) => {
45
+ const { diagnosisId } = input;
35
46
  let data = null;
36
47
  if (!apiClient) {
37
48
  throw new Error("Dashboard API client is not available.");
38
49
  }
39
50
  try {
40
- data = await apiClient.request(`/api/diagnosis/${slug}/detailed`, {
51
+ data = await apiClient.request(`/api/diagnosis/${diagnosisId}/detailed`, {
41
52
  method: "GET",
42
53
  });
54
+ if (!data || !data.data) {
55
+ throw new Error("No API response from /api/diagnosis/<slug>/detailed");
56
+ }
43
57
  }
44
58
  catch (error) {
45
59
  return {
@@ -48,37 +62,33 @@ exports.fetchDiagnosisReportTool = {
48
62
  };
49
63
  }
50
64
  const { test_case, diagnosis } = data.data;
51
- const project = diagnosis?.test_project || "unknown";
52
- const repoName = path_1.default.basename(repoPath);
53
- const cleanErrorStack = diagnosis?.failed_run_metadata?.stack?.replace(`"/runner/_work/${repoName}/${repoName}/source-repo/"`, "");
54
- // Format the response as markdown
65
+ const project = diagnosis.test_project || "unknown";
66
+ const retries = diagnosis.retry_details?.retries;
67
+ const retryInfo = retries?.reduce((acc, current) => {
68
+ return `${acc}\n\n## Retry ${current.retryIndex}\n\n${JSON.stringify(current, null, 2)}`;
69
+ }, "");
70
+ const lastSuccessRunForProject = await getDataForLastSuccessfulRuns(test_case);
71
+ let lastSuccessRunInfo = "No successful runs found.";
72
+ if (Object.keys(lastSuccessRunForProject).length > 0) {
73
+ lastSuccessRunInfo = Object.entries(lastSuccessRunForProject).reduce((acc, current) => {
74
+ const [project, value] = current;
75
+ return `${acc}\n\n## Playwright project: ${project}\n\n${JSON.stringify(value, null, 2)}`;
76
+ }, "");
77
+ }
55
78
  const markdownResponse = `
56
- # Test Case Diagnosis
57
-
58
- ## Test Case Information
59
- - **Test Case Name**: ${test_case.name}
60
- - **Test Suite**: ${test_case.suites}
61
- - **File Path**: tests/${test_case.file_path}
62
- - **Project**: ${project}
63
-
64
- ## What Happened in the Test Run
65
-
66
- ### Failure Details
67
- - **Failing Line**: ${diagnosis?.failing_line || "No failing line available"}
79
+ # Test Case Information
80
+ - **Name**: ${test_case.name}
81
+ - **Test suite** (Describe blocks): ${test_case.suites}
82
+ - **File path**: tests/${test_case.file_path}
83
+ - **Playwright project**: ${project}
68
84
 
69
- #### Error Stack
70
- \`\`\`
71
- ${cleanErrorStack || "No error stack available"}
72
- \`\`\`
85
+ # What happened in this test run
73
86
 
74
- #### Error Summary
75
- ${diagnosis?.error_stack_summary?.content || "No error summary available"}
87
+ ${retryInfo}
76
88
 
77
- #### Visual Analysis
78
- ${diagnosis?.visual_diff_summary?.summary || "No visual analysis available"}
89
+ # Last successful runs
79
90
 
80
- #### Merged Summary
81
- ${diagnosis?.merged_summary?.content || "No merged summary available"}
91
+ ${lastSuccessRunInfo}
82
92
  `;
83
93
  return {
84
94
  result: markdownResponse,
@@ -86,3 +96,38 @@ ${diagnosis?.merged_summary?.content || "No merged summary available"}
86
96
  };
87
97
  },
88
98
  };
99
+ async function getDataForLastSuccessfulRuns(testCase) {
100
+ const lastSuccessfulRun = testCase.metadata?.last_successful_run;
101
+ const runData = {};
102
+ const projectPromises = Object.entries(lastSuccessfulRun ?? {}).map(async ([project, testCaseMetaData]) => {
103
+ if (!testCaseMetaData.summary_url)
104
+ return { project, success: false, data: null };
105
+ try {
106
+ const testCaseData = await (0, playwright_report_parser_1.fetchAndFindTestCase)(testCaseMetaData.summary_url, {
107
+ name: testCase.name,
108
+ suites: testCase.suites,
109
+ file_path: testCase.file_path,
110
+ });
111
+ return {
112
+ project,
113
+ success: true,
114
+ data: {
115
+ ...testCaseMetaData,
116
+ test_case: testCaseData,
117
+ },
118
+ };
119
+ }
120
+ catch {
121
+ return { project, success: false, data: null };
122
+ }
123
+ });
124
+ const results = await Promise.allSettled(projectPromises);
125
+ for (const result of results) {
126
+ if (result.status === "fulfilled" &&
127
+ result.value.success &&
128
+ result.value.data) {
129
+ runData[result.value.project] = result.value.data;
130
+ }
131
+ }
132
+ return runData;
133
+ }
@@ -1,3 +1,3 @@
1
- import type { Tool } from "@empiricalrun/shared-types";
1
+ import type { Tool } from "@empiricalrun/shared-types/chat-agent";
2
2
  export declare const downloadBuildTool: Tool;
3
3
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/tools/download-build/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAe,MAAM,4BAA4B,CAAC;AAQpE,eAAO,MAAM,iBAAiB,EAAE,IA4B/B,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/tools/download-build/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAe,MAAM,uCAAuC,CAAC;AAQ/E,eAAO,MAAM,iBAAiB,EAAE,IA4B/B,CAAC"}
@@ -1,6 +1,7 @@
1
- import { TraceClient } from "@empiricalrun/llm";
1
+ import type { TraceClient } from "@empiricalrun/llm";
2
2
  import { PendingToolCall, ToolResult } from "@empiricalrun/llm/chat";
3
- import type { ChatSessionInfo, IDashboardAPIClient, Logger, MessageCheckpoint, Tool, ToolExecute } from "@empiricalrun/shared-types";
3
+ import type { IDashboardAPIClient } from "@empiricalrun/shared-types/api/base";
4
+ import type { ChatSessionInfo, Logger, MessageCheckpoint, Tool, ToolExecute } from "@empiricalrun/shared-types/chat-agent";
4
5
  export type BaseToolExecutorProps = {
5
6
  tools: Array<Tool>;
6
7
  chatSession: ChatSessionInfo | {
@@ -1 +1 @@
1
- {"version":3,"file":"base.d.ts","sourceRoot":"","sources":["../../../src/tools/executor/base.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,EAAE,eAAe,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AACrE,OAAO,KAAK,EACV,eAAe,EAEf,mBAAmB,EACnB,MAAM,EACN,iBAAiB,EACjB,IAAI,EACJ,WAAW,EACZ,MAAM,4BAA4B,CAAC;AAcpC,MAAM,MAAM,qBAAqB,GAAG;IAClC,KAAK,EAAE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OAAO,CAAC;QACnD,WAAW,EAAE,UAAU,EAAE,CAAC;QAC1B,UAAU,EAAE,iBAAiB,GAAG,IAAI,CAAC;KACtC,CAAC;CAsGH"}
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.BaseToolExecutor = void 0;
4
4
  const artifacts_1 = require("../../artifacts");
5
5
  const file_operations_1 = require("../file-operations");
6
- const utils_1 = require("./utils");
6
+ const validate_schema_1 = require("../utils/validate-schema");
7
7
  const checkpoint_1 = require("./utils/checkpoint");
8
8
  const LOGGER = {
9
9
  info: (msg, meta) => console.log(`[info] ${msg}`, meta || ""),
@@ -78,16 +78,13 @@ class BaseToolExecutor {
78
78
  ? toolExecutor
79
79
  : toolExecutor.execute;
80
80
  if (toolInputSchema) {
81
- const validationErroToolresult = (0, utils_1.validateToolInput)(toolCall, toolInputSchema);
82
- if (validationErroToolresult) {
83
- toolResults.push(validationErroToolresult);
84
- span?.end({ output: validationErroToolresult });
81
+ const validationErrorToolresult = (0, validate_schema_1.validateToolInput)(toolCall, toolInputSchema);
82
+ if (validationErrorToolresult) {
83
+ toolResults.push(validationErrorToolresult);
84
+ span?.end({ output: validationErrorToolresult });
85
85
  continue;
86
86
  }
87
87
  }
88
- else {
89
- console.log(`No schema found for tool ${toolCall.name}. Skipping validation.`);
90
- }
91
88
  try {
92
89
  const result = await executeFn({
93
90
  input: toolCall.input,
@@ -1,4 +1,7 @@
1
1
  import { BaseToolExecutor, BaseToolExecutorProps } from "./base";
2
+ export type { BaseToolExecutorProps } from "./base";
3
+ export { BaseToolExecutor } from "./base";
4
+ export { gitPushChanges } from "./utils/git";
2
5
  export declare class ToolExecutor extends BaseToolExecutor {
3
6
  constructor(params: Omit<BaseToolExecutorProps, "tools">);
4
7
  }
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/tools/executor/index.ts"],"names":[],"mappings":"AA0BA,OAAO,EAAE,gBAAgB,EAAE,qBAAqB,EAAE,MAAM,QAAQ,CAAC;AAEjE,qBAAa,YAAa,SAAQ,gBAAgB;gBACpC,MAAM,EAAE,IAAI,CAAC,qBAAqB,EAAE,OAAO,CAAC;CAgCzD"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/tools/executor/index.ts"],"names":[],"mappings":"AAyBA,OAAO,EAAE,gBAAgB,EAAE,qBAAqB,EAAE,MAAM,QAAQ,CAAC;AAEjE,YAAY,EAAE,qBAAqB,EAAE,MAAM,QAAQ,CAAC;AACpD,OAAO,EAAE,gBAAgB,EAAE,MAAM,QAAQ,CAAC;AAC1C,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAE7C,qBAAa,YAAa,SAAQ,gBAAgB;gBACpC,MAAM,EAAE,IAAI,CAAC,qBAAqB,EAAE,OAAO,CAAC;CA+BzD"}
@@ -1,44 +1,47 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ToolExecutor = void 0;
3
+ exports.ToolExecutor = exports.gitPushChanges = exports.BaseToolExecutor = void 0;
4
4
  const analyse_video_1 = require("../analyse-video");
5
5
  const create_pull_request_1 = require("../create-pull-request");
6
6
  const delete_file_1 = require("../delete-file");
7
7
  const diagnosis_fetcher_1 = require("../diagnosis-fetcher");
8
8
  const download_build_1 = require("../download-build");
9
9
  const fetch_file_1 = require("../fetch-file");
10
- const fetch_last_successful_test_run_1 = require("../fetch-last-successful-test-run");
11
10
  const fetch_session_diff_1 = require("../fetch-session-diff");
12
11
  const file_operations_1 = require("../file-operations");
13
12
  const grep_1 = require("../grep");
14
- const issues_1 = require("../issues");
13
+ const issues_v1_1 = require("../issues-v1");
15
14
  const list_environments_1 = require("../list-environments");
16
15
  const list_tests_and_projects_1 = require("../list-tests-and-projects");
17
16
  const merge_conflicts_1 = require("../merge-conflicts");
18
17
  const rename_file_1 = require("../rename-file");
19
18
  const review_pull_request_1 = require("../review-pull-request");
20
19
  const run_test_1 = require("../run-test");
20
+ const safe_bash_1 = require("../safe-bash");
21
21
  const test_gen_browser_1 = require("../test-gen-browser");
22
22
  const test_run_fetcher_1 = require("../test-run-fetcher");
23
23
  const trace_dot_zip_1 = require("../trace-dot-zip");
24
24
  const triage_summary_1 = require("../triage-summary");
25
25
  const upgrade_packages_1 = require("../upgrade-packages");
26
- const view_failed_test_run_report_1 = require("../view-failed-test-run-report");
27
26
  const base_1 = require("./base");
27
+ var base_2 = require("./base");
28
+ Object.defineProperty(exports, "BaseToolExecutor", { enumerable: true, get: function () { return base_2.BaseToolExecutor; } });
29
+ var git_1 = require("./utils/git");
30
+ Object.defineProperty(exports, "gitPushChanges", { enumerable: true, get: function () { return git_1.gitPushChanges; } });
28
31
  class ToolExecutor extends base_1.BaseToolExecutor {
29
32
  constructor(params) {
30
33
  // Found for "Tool Executor Tools List" and add any new tools to the list
31
34
  const tools = [
32
35
  grep_1.grepTool,
33
36
  run_test_1.runTestTool,
34
- test_run_fetcher_1.fetchTestRunReportTool,
37
+ test_run_fetcher_1.fetchTestRunDetailsTool,
35
38
  diagnosis_fetcher_1.fetchDiagnosisReportTool,
36
39
  test_gen_browser_1.generateTestWithBrowserAgent,
37
40
  create_pull_request_1.createPullRequestTool,
38
41
  merge_conflicts_1.mergeConflictsTool,
39
42
  list_environments_1.listEnvironmentsTool,
40
- issues_1.listIssuesTool,
41
- issues_1.createIssueTool,
43
+ issues_v1_1.listIssuesTool,
44
+ issues_v1_1.createIssueTool,
42
45
  download_build_1.downloadBuildTool,
43
46
  upgrade_packages_1.upgradePackagesTool,
44
47
  fetch_file_1.fetchFileTool,
@@ -46,14 +49,13 @@ class ToolExecutor extends base_1.BaseToolExecutor {
46
49
  delete_file_1.deleteFileTool,
47
50
  rename_file_1.renameFileTool,
48
51
  trace_dot_zip_1.traceDotZipTool,
49
- view_failed_test_run_report_1.viewFailedTestRunReportTool,
50
- issues_1.updateIssueTool,
51
- fetch_last_successful_test_run_1.fetchLastSuccessfulTestRunTool,
52
+ issues_v1_1.updateIssueTool,
52
53
  triage_summary_1.sendTriageSummaryTool,
53
54
  list_tests_and_projects_1.listProjectsTool,
54
55
  fetch_session_diff_1.fetchSessionDiffTool,
55
56
  review_pull_request_1.reviewPullRequestTool,
56
57
  list_tests_and_projects_1.listTestsForProjectTool,
58
+ safe_bash_1.safeBashTool,
57
59
  ...file_operations_1.textEditorTools,
58
60
  ];
59
61
  super({ ...params, tools });
@@ -1 +1 @@
1
- {"version":3,"file":"checkpoint.d.ts","sourceRoot":"","sources":["../../../../src/tools/executor/utils/checkpoint.ts"],"names":[],"mappings":"AAIA,wBAAgB,sBAAsB,CAAC,EACrC,UAAU,EACV,QAAQ,GACT,EAAE;IACD,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,MAAM,CAAC;CAClB,GAAG,MAAM,GAAG,IAAI,CA2BhB"}
1
+ {"version":3,"file":"checkpoint.d.ts","sourceRoot":"","sources":["../../../../src/tools/executor/utils/checkpoint.ts"],"names":[],"mappings":"AAEA,wBAAgB,sBAAsB,CAAC,EACrC,UAAU,EACV,QAAQ,GACT,EAAE;IACD,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,MAAM,CAAC;CAClB,GAAG,MAAM,GAAG,IAAI,CAwBhB"}
@@ -1,7 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.createCommitCheckpoint = createCommitCheckpoint;
4
- const child_process_1 = require("child_process");
5
4
  const git_1 = require("./git");
6
5
  function createCommitCheckpoint({ branchName, repoPath, }) {
7
6
  const filesChanged = (0, git_1.getStagedFiles)(repoPath);
@@ -21,9 +20,6 @@ function createCommitCheckpoint({ branchName, repoPath, }) {
21
20
  const commitMessage = commitMessages.join(", ");
22
21
  // Files are already staged by individual tools, just commit
23
22
  const commitSha = (0, git_1.commitAsBotUser)(commitMessage, repoPath);
24
- if (commitSha) {
25
- (0, child_process_1.execSync)(`git push origin ${branchName}`, { cwd: repoPath });
26
- }
27
23
  return commitSha;
28
24
  }
29
25
  return null;
@@ -1,4 +1,6 @@
1
- import { IDashboardAPIClient } from "@empiricalrun/shared-types";
1
+ import { IDashboardAPIClient } from "@empiricalrun/shared-types/api/base";
2
+ export declare const GIT_USER_NAME = "empiricalrun[bot]";
3
+ export declare const GIT_USER_EMAIL = "180257021+empiricalrun[bot]@users.noreply.github.com";
2
4
  export declare function getGitDiff(filepath: string, cwd: string): string;
3
5
  export declare function getGitDiffStaged(filepath: string, cwd: string): string;
4
6
  export declare function getGitDiffForStagedOrUnstaged(filepath: string, cwd: string): string;
@@ -24,4 +26,8 @@ export declare function mergePullRequest({ repoName, prNumber, apiClient, }: {
24
26
  prNumber: number;
25
27
  apiClient: IDashboardAPIClient;
26
28
  }): Promise<boolean>;
29
+ export declare function gitPushChanges({ branch, workingDirectory, }: {
30
+ branch: string;
31
+ workingDirectory: string;
32
+ }): void;
27
33
  //# sourceMappingURL=git.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"git.d.ts","sourceRoot":"","sources":["../../../../src/tools/executor/utils/git.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AAMjE,wBAAgB,UAAU,CAAC,QAAQ,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,MAAM,CAMhE;AAED,wBAAgB,gBAAgB,CAAC,QAAQ,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,MAAM,CAMtE;AAED,wBAAgB,6BAA6B,CAC3C,QAAQ,EAAE,MAAM,EAChB,GAAG,EAAE,MAAM,GACV,MAAM,CAaR;AAED,wBAAgB,oBAAoB,CAAC,QAAQ,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,MAAM,CAe1E;AAED,wBAAsB,cAAc,CAAC,UAAU,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,iBAMnE;AAED,wBAAgB,eAAe,CAC7B,aAAa,EAAE,MAAM,EACrB,GAAG,EAAE,MAAM,GACV,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,EAC7B,MAAM,EACN,gBAAgB,GACjB,EAAE;IACD,MAAM,EAAE,MAAM,CAAC;IACf,gBAAgB,EAAE,MAAM,CAAC;CAC1B,QAIA"}
@@ -1,5 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.GIT_USER_EMAIL = exports.GIT_USER_NAME = void 0;
3
4
  exports.getGitDiff = getGitDiff;
4
5
  exports.getGitDiffStaged = getGitDiffStaged;
5
6
  exports.getGitDiffForStagedOrUnstaged = getGitDiffForStagedOrUnstaged;
@@ -12,9 +13,10 @@ exports.stageAndCommitFilesAsBotUser = stageAndCommitFilesAsBotUser;
12
13
  exports.getStagedFiles = getStagedFiles;
13
14
  exports.getFilesChanged = getFilesChanged;
14
15
  exports.mergePullRequest = mergePullRequest;
16
+ exports.gitPushChanges = gitPushChanges;
15
17
  const child_process_1 = require("child_process");
16
- const GIT_USER_NAME = "empiricalrun[bot]";
17
- const GIT_USER_EMAIL = "180257021+empiricalrun[bot]@users.noreply.github.com";
18
+ exports.GIT_USER_NAME = "empiricalrun[bot]";
19
+ exports.GIT_USER_EMAIL = "180257021+empiricalrun[bot]@users.noreply.github.com";
18
20
  function getGitDiff(filepath, cwd) {
19
21
  const diff = (0, child_process_1.execSync)(`git diff ${filepath}`, {
20
22
  encoding: "utf-8",
@@ -77,7 +79,7 @@ function commitAsBotUser(commitMessage, cwd) {
77
79
  return null;
78
80
  }
79
81
  const commitMessageWithSkipCi = `${commitMessage} [skip ci]`;
80
- (0, child_process_1.execSync)(`git -c user.name="${GIT_USER_NAME}" -c user.email="${GIT_USER_EMAIL}" commit -m "${commitMessageWithSkipCi}"`, { cwd });
82
+ (0, child_process_1.execSync)(`git -c user.name="${exports.GIT_USER_NAME}" -c user.email="${exports.GIT_USER_EMAIL}" commit -m "${commitMessageWithSkipCi}"`, { cwd });
81
83
  const commitSha = (0, child_process_1.execSync)("git rev-parse HEAD", {
82
84
  encoding: "utf-8",
83
85
  cwd,
@@ -179,3 +181,8 @@ async function mergePullRequest({ repoName, prNumber, apiClient, }) {
179
181
  return false;
180
182
  }
181
183
  }
184
+ function gitPushChanges({ branch, workingDirectory, }) {
185
+ (0, child_process_1.execSync)(`git push origin ${branch}`, {
186
+ cwd: workingDirectory,
187
+ });
188
+ }
@@ -1,4 +1,4 @@
1
- import { IDashboardAPIClient, PendingToolCall, ToolResult } from "@empiricalrun/shared-types";
1
+ import { IDashboardAPIClient } from "@empiricalrun/shared-types/api/base";
2
2
  export interface GitHubRepoInfo {
3
3
  owner: string;
4
4
  repo: string;
@@ -75,5 +75,4 @@ export declare function findOrCreatePullRequest({ owner, repo, branchName, title
75
75
  pr: PullRequestInfo;
76
76
  isNew: boolean;
77
77
  }>;
78
- export declare function validateToolInput<T>(toolCall: PendingToolCall, schema: T): ToolResult | null;
79
78
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/tools/executor/utils/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,mBAAmB,EACnB,eAAe,EACf,UAAU,EACX,MAAM,4BAA4B,CAAC;AAEpC,MAAM,WAAW,cAAc;IAC7B,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;CACd;AAED,wBAAgB,cAAc,CAAC,GAAG,EAAE,MAAM,GAAG,cAAc,CAiB1D;AAED,MAAM,WAAW,eAAe;IAC9B,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE;QACJ,GAAG,EAAE,MAAM,CAAC;QACZ,GAAG,EAAE,MAAM,CAAC;KACb,CAAC;IACF,IAAI,EAAE;QACJ,GAAG,EAAE,MAAM,CAAC;QACZ,GAAG,EAAE,MAAM,CAAC;KACb,CAAC;IACF,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,UAAU,EAAE,MAAM,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K,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC;IAClB,SAAS,EAAE,mBAAmB,CAAC;CAChC,GAAG,OAAO,CAAC,eAAe,CAAC,CAoB3B;AAED,wBAAsB,iBAAiB,CAAC,EACtC,KAAK,EACL,IAAI,EACJ,QAAQ,EACR,IAAI,EACJ,SAAS,GACV,EAAE;IACD,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,mBAAmB,CAAC;CAChC,GAAG,OAAO,CAAC,eAAe,CAAC,CAS3B;AAED,wBAAsB,uBAAuB,CAAC,EAC5C,KAAK,EACL,IAAI,EACJ,UAAU,EACV,KAAK,EACL,IAAI,EACJ,IAAI,EACJ,MAAM,EACN,SAAS,GACV,EAAE;IACD,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,UAAU,EAAE,MAAM,CAAC;IACnB,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC;IAClB,SAAS,EAAE,mBAAmB,CAAC;CAChC,GAAG,OAAO,CAAC;IAAE,EAAE,EAAE,eAAe,CAAC;IAAC,KAAK,EAAE,OAAO,CAAA;CAAE,CAAC,CAqBnD;AAED,wBAAgB,iBAAiB,CAAC,CAAC,EACjC,QAAQ,EAAE,eAAe,EACzB,MAAM,EAAE,CAAC,GACR,UAAU,GAAG,IAAI,CAwBnB"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/tools/executor/utils/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE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IAAI,EAAE,MAAM,CAAC;IACb,UAAU,EAAE,MAAM,CAAC;IACnB,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC;IAClB,SAAS,EAAE,mBAAmB,CAAC;CAChC,GAAG,OAAO,CAAC;IAAE,EAAE,EAAE,eAAe,CAAC;IAAC,KAAK,EAAE,OAAO,CAAA;CAAE,CAAC,CAqBnD"}
@@ -7,7 +7,6 @@ exports.getMergeableStateDescription = getMergeableStateDescription;
7
7
  exports.createPullRequest = createPullRequest;
8
8
  exports.updatePullRequest = updatePullRequest;
9
9
  exports.findOrCreatePullRequest = findOrCreatePullRequest;
10
- exports.validateToolInput = validateToolInput;
11
10
  function parseGitHubUrl(url) {
12
11
  const githubIndex = url.indexOf("github.com");
13
12
  if (githubIndex === -1) {
@@ -121,22 +120,3 @@ async function findOrCreatePullRequest({ owner, repo, branchName, title, body, b
121
120
  });
122
121
  return { pr: newPR, isNew: true };
123
122
  }
124
- function validateToolInput(toolCall, schema) {
125
- const { name: toolName, input } = toolCall;
126
- const strictSchema = schema._def?.typeName === "ZodObject"
127
- ? schema.strict()
128
- : schema;
129
- const validation = strictSchema.safeParse(input);
130
- if (!validation.success) {
131
- const errorMessage = [
132
- `Schema validation failed for tool "${toolName}".`,
133
- `\nValidation errors: ${JSON.stringify(validation.error.issues, null, 2)}`,
134
- ].join("\n");
135
- return {
136
- isError: true,
137
- result: errorMessage,
138
- artifacts: null,
139
- };
140
- }
141
- return null;
142
- }
@@ -1,4 +1,4 @@
1
- import type { ChatSessionInfo } from "@empiricalrun/shared-types";
1
+ import type { ChatSessionInfo } from "@empiricalrun/shared-types/chat-agent";
2
2
  export declare function generateSessionMetadata(chatSession: ChatSessionInfo | null): string;
3
3
  export declare function addMetadataToPRDescription(description: string, chatSession: ChatSessionInfo | null | undefined): string;
4
4
  //# sourceMappingURL=pr-description.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"pr-description.d.ts","sourceRoot":"","sources":["../../../../src/tools/executor/utils/pr-description.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAElE,wBAAgB,uBAAuB,CACrC,WAAW,EAAE,eAAe,GAAG,IAAI,GAClC,MAAM,CASR;AAED,wBAAgB,0BAA0B,CACxC,WAAW,EAAE,MAAM,EACnB,WAAW,EAAE,eAAe,GAAG,IAAI,GAAG,SAAS,GAC9C,MAAM,CAWR"}
1
+ {"version":3,"file":"pr-description.d.ts","sourceRoot":"","sources":["../../../../src/tools/executor/utils/pr-description.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,uCAAuC,CAAC;AAE7E,wBAAgB,uBAAuB,CACrC,WAAW,EAAE,eAAe,GAAG,IAAI,GAClC,MAAM,CASR;AAED,wBAAgB,0BAA0B,CACxC,WAAW,EAAE,MAAM,EACnB,WAAW,EAAE,eAAe,GAAG,IAAI,GAAG,SAAS,GAC9C,MAAM,CAWR"}