@empiricalrun/test-gen 0.77.0 → 0.78.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (402) hide show
  1. package/CHANGELOG.md +25 -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 +30 -17
  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 -3
  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 +10 -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 +13 -25
  28. package/dist/agent/chat/state.d.ts.map +1 -1
  29. package/dist/agent/chat/state.js +10 -60
  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 +17 -31
  35. package/dist/agent/code-review/index.d.ts +5 -4
  36. package/dist/agent/code-review/index.d.ts.map +1 -1
  37. package/dist/agent/code-review/index.js +13 -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 +13 -5
  44. package/dist/agent/cua/pw-codegen/pw-pause/for-recorder.d.ts.map +1 -1
  45. package/dist/agent/cua/pw-codegen/pw-pause/for-recorder.js +0 -3
  46. package/dist/agent/cua/pw-codegen/pw-pause/index.js +1 -1
  47. package/dist/agent/index.d.ts +1 -5
  48. package/dist/agent/index.d.ts.map +1 -1
  49. package/dist/agent/index.js +1 -11
  50. package/dist/agent/master/element-annotation.d.ts +1 -1
  51. package/dist/agent/master/element-annotation.d.ts.map +1 -1
  52. package/dist/agent/master/next-action.d.ts +1 -1
  53. package/dist/agent/master/next-action.d.ts.map +1 -1
  54. package/dist/agent/master/next-action.js +1 -6
  55. package/dist/agent/master/run.d.ts +3 -2
  56. package/dist/agent/master/run.d.ts.map +1 -1
  57. package/dist/agent/master/run.js +0 -26
  58. package/dist/agent/triage/index.d.ts +4 -3
  59. package/dist/agent/triage/index.d.ts.map +1 -1
  60. package/dist/agent/triage/index.js +35 -29
  61. package/dist/artifacts/index.d.ts +1 -1
  62. package/dist/artifacts/index.d.ts.map +1 -1
  63. package/dist/artifacts/utils.d.ts +1 -1
  64. package/dist/artifacts/utils.d.ts.map +1 -1
  65. package/dist/bin/environments.d.ts +1 -1
  66. package/dist/bin/environments.d.ts.map +1 -1
  67. package/dist/bin/index.js +2 -57
  68. package/dist/bin/setup.d.ts +1 -1
  69. package/dist/bin/setup.d.ts.map +1 -1
  70. package/dist/bin/utils/fs/index.d.ts +1 -1
  71. package/dist/bin/utils/fs/index.d.ts.map +1 -1
  72. package/dist/bin/utils/platform/web/index.d.ts +2 -2
  73. package/dist/bin/utils/platform/web/index.d.ts.map +1 -1
  74. package/dist/bin/utils/platform/web/index.js +1 -1
  75. package/dist/bin/utils/scenarios/index.d.ts +1 -1
  76. package/dist/bin/utils/scenarios/index.d.ts.map +1 -1
  77. package/dist/constants/index.d.ts +0 -4
  78. package/dist/constants/index.d.ts.map +1 -1
  79. package/dist/constants/index.js +0 -6
  80. package/dist/dashboard/client.d.ts +1 -1
  81. package/dist/dashboard/client.d.ts.map +1 -1
  82. package/dist/dashboard/index.d.ts +1 -0
  83. package/dist/dashboard/index.d.ts.map +1 -1
  84. package/dist/dashboard/index.js +4 -1
  85. package/dist/dashboard/tool-response.d.ts +5 -0
  86. package/dist/dashboard/tool-response.d.ts.map +1 -0
  87. package/dist/dashboard/tool-response.js +88 -0
  88. package/dist/dashboard/totp.js +1 -1
  89. package/dist/file/server.d.ts +1 -1
  90. package/dist/file/server.d.ts.map +1 -1
  91. package/dist/file/server.js +2 -1
  92. package/dist/file-info/adapters/file-system/index.d.ts +1 -1
  93. package/dist/file-info/adapters/file-system/index.d.ts.map +1 -1
  94. package/dist/file-info/adapters/file-system/reader.d.ts +1 -1
  95. package/dist/file-info/adapters/file-system/reader.d.ts.map +1 -1
  96. package/dist/file-info/adapters/github/index.d.ts +2 -1
  97. package/dist/file-info/adapters/github/index.d.ts.map +1 -1
  98. package/dist/file-info/adapters/github/reader.d.ts +2 -1
  99. package/dist/file-info/adapters/github/reader.d.ts.map +1 -1
  100. package/dist/recorder/index.d.ts.map +1 -1
  101. package/dist/recorder/index.js +2 -1
  102. package/dist/recorder/upload.d.ts +1 -1
  103. package/dist/recorder/upload.d.ts.map +1 -1
  104. package/dist/tools/analyse-video/index.d.ts +1 -1
  105. package/dist/tools/analyse-video/index.d.ts.map +1 -1
  106. package/dist/tools/analyse-video/index.js +28 -15
  107. package/dist/tools/create-pull-request/index.d.ts +1 -1
  108. package/dist/tools/create-pull-request/index.d.ts.map +1 -1
  109. package/dist/tools/create-pull-request/utils.d.ts +2 -1
  110. package/dist/tools/create-pull-request/utils.d.ts.map +1 -1
  111. package/dist/tools/definitions/analyse-video.d.ts +9 -19
  112. package/dist/tools/definitions/analyse-video.d.ts.map +1 -1
  113. package/dist/tools/definitions/analyse-video.js +13 -26
  114. package/dist/tools/definitions/delete-file.d.ts +9 -1
  115. package/dist/tools/definitions/delete-file.d.ts.map +1 -1
  116. package/dist/tools/definitions/delete-file.js +3 -3
  117. package/dist/tools/definitions/download-build.d.ts +1 -1
  118. package/dist/tools/definitions/download-build.d.ts.map +1 -1
  119. package/dist/tools/definitions/grep.d.ts +1 -1
  120. package/dist/tools/definitions/grep.d.ts.map +1 -1
  121. package/dist/tools/definitions/list-tests-and-projects.d.ts +1 -1
  122. package/dist/tools/definitions/list-tests-and-projects.d.ts.map +1 -1
  123. package/dist/tools/definitions/list-tests-and-projects.js +1 -1
  124. package/dist/tools/definitions/merge-conflicts.d.ts +1 -1
  125. package/dist/tools/definitions/merge-conflicts.d.ts.map +1 -1
  126. package/dist/tools/definitions/merge-conflicts.js +2 -2
  127. package/dist/tools/definitions/rename-file.d.ts +1 -1
  128. package/dist/tools/definitions/rename-file.d.ts.map +1 -1
  129. package/dist/tools/definitions/review-pull-request.d.ts +1 -1
  130. package/dist/tools/definitions/review-pull-request.d.ts.map +1 -1
  131. package/dist/tools/definitions/review-pull-request.js +1 -1
  132. package/dist/tools/definitions/run-test.d.ts +1 -1
  133. package/dist/tools/definitions/run-test.d.ts.map +1 -1
  134. package/dist/tools/definitions/str_replace_editor.d.ts +1 -1
  135. package/dist/tools/definitions/str_replace_editor.d.ts.map +1 -1
  136. package/dist/tools/definitions/test-gen-browser.d.ts +1 -1
  137. package/dist/tools/definitions/test-gen-browser.d.ts.map +1 -1
  138. package/dist/tools/definitions/upgrade-packages.d.ts +1 -1
  139. package/dist/tools/definitions/upgrade-packages.d.ts.map +1 -1
  140. package/dist/tools/definitions/utils.js +1 -1
  141. package/dist/tools/delete-file/index.d.ts +1 -1
  142. package/dist/tools/delete-file/index.d.ts.map +1 -1
  143. package/dist/tools/delete-file/index.js +6 -2
  144. package/dist/tools/diagnosis-fetcher.d.ts +1 -1
  145. package/dist/tools/diagnosis-fetcher.d.ts.map +1 -1
  146. package/dist/tools/diagnosis-fetcher.js +92 -47
  147. package/dist/tools/download-build/index.d.ts +1 -1
  148. package/dist/tools/download-build/index.d.ts.map +1 -1
  149. package/dist/tools/executor/base.d.ts +4 -3
  150. package/dist/tools/executor/base.d.ts.map +1 -1
  151. package/dist/tools/executor/base.js +16 -2
  152. package/dist/tools/executor/index.d.ts +3 -0
  153. package/dist/tools/executor/index.d.ts.map +1 -1
  154. package/dist/tools/executor/index.js +10 -10
  155. package/dist/tools/executor/utils/checkpoint.d.ts.map +1 -1
  156. package/dist/tools/executor/utils/checkpoint.js +0 -4
  157. package/dist/tools/executor/utils/git.d.ts +7 -1
  158. package/dist/tools/executor/utils/git.d.ts.map +1 -1
  159. package/dist/tools/executor/utils/git.js +10 -3
  160. package/dist/tools/executor/utils/index.d.ts +4 -3
  161. package/dist/tools/executor/utils/index.d.ts.map +1 -1
  162. package/dist/tools/executor/utils/index.js +2 -1
  163. package/dist/tools/executor/utils/pr-description.d.ts +1 -1
  164. package/dist/tools/executor/utils/pr-description.d.ts.map +1 -1
  165. package/dist/tools/fetch-file/index.d.ts +1 -1
  166. package/dist/tools/fetch-file/index.d.ts.map +1 -1
  167. package/dist/tools/fetch-file/index.js +53 -13
  168. package/dist/tools/fetch-file/utils.d.ts +3 -0
  169. package/dist/tools/fetch-file/utils.d.ts.map +1 -0
  170. package/dist/tools/fetch-file/utils.js +136 -0
  171. package/dist/tools/fetch-session-diff/index.d.ts +1 -1
  172. package/dist/tools/fetch-session-diff/index.d.ts.map +1 -1
  173. package/dist/tools/fetch-session-diff/index.js +26 -2
  174. package/dist/tools/file-operations/create.d.ts +1 -1
  175. package/dist/tools/file-operations/create.d.ts.map +1 -1
  176. package/dist/tools/file-operations/index.d.ts +2 -1
  177. package/dist/tools/file-operations/index.d.ts.map +1 -1
  178. package/dist/tools/file-operations/insert.d.ts +1 -1
  179. package/dist/tools/file-operations/insert.d.ts.map +1 -1
  180. package/dist/tools/file-operations/replace.d.ts +1 -1
  181. package/dist/tools/file-operations/replace.d.ts.map +1 -1
  182. package/dist/tools/file-operations/replace.js +20 -22
  183. package/dist/tools/file-operations/shared/helpers.d.ts +3 -5
  184. package/dist/tools/file-operations/shared/helpers.d.ts.map +1 -1
  185. package/dist/tools/file-operations/shared/helpers.js +1 -5
  186. package/dist/tools/file-operations/view/index.d.ts +2 -1
  187. package/dist/tools/file-operations/view/index.d.ts.map +1 -1
  188. package/dist/tools/grep/index.d.ts +1 -1
  189. package/dist/tools/grep/index.d.ts.map +1 -1
  190. package/dist/tools/grep/index.js +15 -12
  191. package/dist/tools/index.d.ts +3 -24
  192. package/dist/tools/index.d.ts.map +1 -1
  193. package/dist/tools/index.js +13 -42
  194. package/dist/tools/issues-v1/create-issue.d.ts +3 -0
  195. package/dist/tools/issues-v1/create-issue.d.ts.map +1 -0
  196. package/dist/tools/{issues → issues-v1}/create-issue.js +5 -9
  197. package/dist/tools/issues-v1/index.d.ts.map +1 -0
  198. package/dist/tools/issues-v1/list-issues.d.ts +3 -0
  199. package/dist/tools/issues-v1/list-issues.d.ts.map +1 -0
  200. package/dist/tools/issues-v1/update-issue.d.ts +3 -0
  201. package/dist/tools/issues-v1/update-issue.d.ts.map +1 -0
  202. package/dist/tools/{issues → issues-v1}/update-issue.js +1 -9
  203. package/dist/tools/{issues → issues-v1}/utils.d.ts +2 -1
  204. package/dist/tools/issues-v1/utils.d.ts.map +1 -0
  205. package/dist/tools/issues-v2/create-issue.d.ts +3 -0
  206. package/dist/tools/issues-v2/create-issue.d.ts.map +1 -0
  207. package/dist/tools/issues-v2/create-issue.js +86 -0
  208. package/dist/tools/issues-v2/update-issue.d.ts +3 -0
  209. package/dist/tools/issues-v2/update-issue.d.ts.map +1 -0
  210. package/dist/tools/issues-v2/update-issue.js +87 -0
  211. package/dist/tools/list-environments.d.ts +1 -1
  212. package/dist/tools/list-environments.d.ts.map +1 -1
  213. package/dist/tools/list-tests-and-projects/index.d.ts +1 -1
  214. package/dist/tools/list-tests-and-projects/index.d.ts.map +1 -1
  215. package/dist/tools/list-tests-and-projects/index.js +14 -4
  216. package/dist/tools/merge-conflicts/index.d.ts +1 -1
  217. package/dist/tools/merge-conflicts/index.d.ts.map +1 -1
  218. package/dist/tools/merge-conflicts/index.js +23 -10
  219. package/dist/tools/rename-file/index.d.ts +1 -1
  220. package/dist/tools/rename-file/index.d.ts.map +1 -1
  221. package/dist/tools/rename-file/index.js +0 -1
  222. package/dist/tools/review-pull-request/index.d.ts +1 -1
  223. package/dist/tools/review-pull-request/index.d.ts.map +1 -1
  224. package/dist/tools/review-pull-request/index.js +9 -15
  225. package/dist/tools/run-test.d.ts +1 -1
  226. package/dist/tools/run-test.d.ts.map +1 -1
  227. package/dist/tools/test-gen-browser.d.ts +1 -1
  228. package/dist/tools/test-gen-browser.d.ts.map +1 -1
  229. package/dist/tools/test-gen-browser.js +55 -19
  230. package/dist/tools/test-run-fetcher/index.d.ts +2 -2
  231. package/dist/tools/test-run-fetcher/index.d.ts.map +1 -1
  232. package/dist/tools/test-run-fetcher/index.js +67 -66
  233. package/dist/tools/trace-dot-zip/index.d.ts +1 -1
  234. package/dist/tools/trace-dot-zip/index.d.ts.map +1 -1
  235. package/dist/tools/trace-dot-zip/utils/network-trace.d.ts.map +1 -1
  236. package/dist/tools/trace-dot-zip/utils/network-trace.js +5 -10
  237. package/dist/tools/triage-summary/index.d.ts +1 -1
  238. package/dist/tools/triage-summary/index.d.ts.map +1 -1
  239. package/dist/tools/triage-summary/index.js +5 -2
  240. package/dist/tools/triage-summary/utils.d.ts +1 -1
  241. package/dist/tools/triage-summary/utils.d.ts.map +1 -1
  242. package/dist/tools/upgrade-packages/index.d.ts +1 -1
  243. package/dist/tools/upgrade-packages/index.d.ts.map +1 -1
  244. package/dist/tools/upgrade-packages/index.js +18 -8
  245. package/dist/tools/upgrade-packages/utils.d.ts +10 -5
  246. package/dist/tools/upgrade-packages/utils.d.ts.map +1 -1
  247. package/dist/tools/upgrade-packages/utils.js +57 -16
  248. package/dist/tools/utils/queue.d.ts +1 -1
  249. package/dist/tools/utils/queue.d.ts.map +1 -1
  250. package/dist/tools/utils/validate-schema.d.ts +3 -0
  251. package/dist/tools/utils/validate-schema.d.ts.map +1 -0
  252. package/dist/tools/utils/validate-schema.js +22 -0
  253. package/dist/trace-utils/index.d.ts +1 -1
  254. package/dist/trace-utils/index.d.ts.map +1 -1
  255. package/dist/trace-utils/index.js +1 -1
  256. package/dist/utils/SQSClient.d.ts +1 -1
  257. package/dist/utils/SQSClient.d.ts.map +1 -1
  258. package/dist/utils/dedup/dedup-image.d.ts +22 -0
  259. package/dist/utils/dedup/dedup-image.d.ts.map +1 -0
  260. package/dist/utils/dedup/dedup-image.js +26 -0
  261. package/dist/utils/dedup/find-threshold.d.ts +2 -0
  262. package/dist/utils/dedup/find-threshold.d.ts.map +1 -0
  263. package/dist/utils/{find-threshold.js → dedup/find-threshold.js} +2 -15
  264. package/dist/utils/model.d.ts +1 -1
  265. package/dist/utils/model.d.ts.map +1 -1
  266. package/dist/utils/model.js +4 -3
  267. package/dist/utils/playwright-report-parser.d.ts +1 -1
  268. package/dist/utils/playwright-report-parser.d.ts.map +1 -1
  269. package/dist/utils/playwright-test-id.d.ts +8 -0
  270. package/dist/utils/playwright-test-id.d.ts.map +1 -0
  271. package/dist/utils/playwright-test-id.js +21 -0
  272. package/dist/utils/repo-tree.d.ts +1 -1
  273. package/dist/utils/repo-tree.d.ts.map +1 -1
  274. package/dist/utils/slug.d.ts.map +1 -1
  275. package/dist/utils/slug.js +15 -4
  276. package/dist/utils/url-validation.d.ts +2 -0
  277. package/dist/utils/url-validation.d.ts.map +1 -0
  278. package/dist/utils/url-validation.js +16 -0
  279. package/dist/video-core/index.d.ts +14 -36
  280. package/dist/video-core/index.d.ts.map +1 -1
  281. package/dist/video-core/index.js +118 -181
  282. package/dist/video-core/model-limits.d.ts +2 -2
  283. package/dist/video-core/model-limits.d.ts.map +1 -1
  284. package/dist/video-core/model-limits.js +16 -20
  285. package/dist/video-core/storage-manager.d.ts +2 -1
  286. package/dist/video-core/storage-manager.d.ts.map +1 -1
  287. package/dist/video-core/storage-manager.js +13 -6
  288. package/dist/video-core/types.d.ts +1 -1
  289. package/dist/video-core/types.d.ts.map +1 -1
  290. package/dist/video-core/utils.d.ts +5 -17
  291. package/dist/video-core/utils.d.ts.map +1 -1
  292. package/dist/video-core/utils.js +39 -149
  293. package/package.json +10 -5
  294. package/tsconfig.tsbuildinfo +1 -1
  295. package/dist/actions/skill.d.ts +0 -21
  296. package/dist/actions/skill.d.ts.map +0 -1
  297. package/dist/actions/skill.js +0 -127
  298. package/dist/agent/chat/filesystem-cache.d.ts +0 -12
  299. package/dist/agent/chat/filesystem-cache.d.ts.map +0 -1
  300. package/dist/agent/chat/filesystem-cache.js +0 -101
  301. package/dist/agent/codegen/create-test-block.d.ts +0 -8
  302. package/dist/agent/codegen/create-test-block.d.ts.map +0 -1
  303. package/dist/agent/codegen/create-test-block.js +0 -47
  304. package/dist/agent/codegen/fix-ts-errors.d.ts +0 -12
  305. package/dist/agent/codegen/fix-ts-errors.d.ts.map +0 -1
  306. package/dist/agent/codegen/fix-ts-errors.js +0 -78
  307. package/dist/agent/codegen/lexical-scoped-vars.d.ts +0 -9
  308. package/dist/agent/codegen/lexical-scoped-vars.d.ts.map +0 -1
  309. package/dist/agent/codegen/lexical-scoped-vars.js +0 -55
  310. package/dist/agent/codegen/skills-retriever.d.ts +0 -26
  311. package/dist/agent/codegen/skills-retriever.d.ts.map +0 -1
  312. package/dist/agent/codegen/skills-retriever.js +0 -93
  313. package/dist/agent/codegen/test-update-feedback.d.ts +0 -12
  314. package/dist/agent/codegen/test-update-feedback.d.ts.map +0 -1
  315. package/dist/agent/codegen/test-update-feedback.js +0 -49
  316. package/dist/agent/codegen/types.d.ts +0 -25
  317. package/dist/agent/codegen/types.d.ts.map +0 -1
  318. package/dist/agent/codegen/types.js +0 -8
  319. package/dist/agent/codegen/update-flow.d.ts +0 -36
  320. package/dist/agent/codegen/update-flow.d.ts.map +0 -1
  321. package/dist/agent/codegen/update-flow.js +0 -259
  322. package/dist/agent/codegen/use-skill.d.ts +0 -11
  323. package/dist/agent/codegen/use-skill.d.ts.map +0 -1
  324. package/dist/agent/codegen/use-skill.js +0 -53
  325. package/dist/agent/codegen/utils.d.ts +0 -110
  326. package/dist/agent/codegen/utils.d.ts.map +0 -1
  327. package/dist/agent/codegen/utils.js +0 -376
  328. package/dist/agent/master/browser-tests/skills.spec.d.ts +0 -2
  329. package/dist/agent/master/browser-tests/skills.spec.d.ts.map +0 -1
  330. package/dist/agent/master/browser-tests/skills.spec.js +0 -112
  331. package/dist/agent/master/execute-skill-action.d.ts +0 -11
  332. package/dist/agent/master/execute-skill-action.d.ts.map +0 -1
  333. package/dist/agent/master/execute-skill-action.js +0 -23
  334. package/dist/agent/video-analysis/executor/index.d.ts +0 -5
  335. package/dist/agent/video-analysis/executor/index.d.ts.map +0 -1
  336. package/dist/agent/video-analysis/executor/index.js +0 -10
  337. package/dist/agent/video-analysis/index.d.ts +0 -7
  338. package/dist/agent/video-analysis/index.d.ts.map +0 -1
  339. package/dist/agent/video-analysis/index.js +0 -60
  340. package/dist/evals/append-create-test-agent.evals.d.ts +0 -4
  341. package/dist/evals/append-create-test-agent.evals.d.ts.map +0 -1
  342. package/dist/evals/append-create-test-agent.evals.js +0 -117
  343. package/dist/evals/fetch-pom-skills-agent.evals.d.ts +0 -4
  344. package/dist/evals/fetch-pom-skills-agent.evals.d.ts.map +0 -1
  345. package/dist/evals/fetch-pom-skills-agent.evals.js +0 -36
  346. package/dist/evals/master-agent.evals.d.ts +0 -4
  347. package/dist/evals/master-agent.evals.d.ts.map +0 -1
  348. package/dist/evals/master-agent.evals.js +0 -35
  349. package/dist/evals/type.d.ts +0 -12
  350. package/dist/evals/type.d.ts.map +0 -1
  351. package/dist/evals/type.js +0 -2
  352. package/dist/evals/update-scenario-agent.evals.d.ts +0 -4
  353. package/dist/evals/update-scenario-agent.evals.d.ts.map +0 -1
  354. package/dist/evals/update-scenario-agent.evals.js +0 -47
  355. package/dist/tools/fetch-last-successful-test-run/index.d.ts +0 -3
  356. package/dist/tools/fetch-last-successful-test-run/index.d.ts.map +0 -1
  357. package/dist/tools/fetch-last-successful-test-run/index.js +0 -60
  358. package/dist/tools/issues/create-issue.d.ts +0 -3
  359. package/dist/tools/issues/create-issue.d.ts.map +0 -1
  360. package/dist/tools/issues/index.d.ts.map +0 -1
  361. package/dist/tools/issues/list-issues.d.ts +0 -3
  362. package/dist/tools/issues/list-issues.d.ts.map +0 -1
  363. package/dist/tools/issues/metadata-schema.d.ts +0 -24
  364. package/dist/tools/issues/metadata-schema.d.ts.map +0 -1
  365. package/dist/tools/issues/metadata-schema.js +0 -22
  366. package/dist/tools/issues/update-issue.d.ts +0 -3
  367. package/dist/tools/issues/update-issue.d.ts.map +0 -1
  368. package/dist/tools/issues/utils.d.ts.map +0 -1
  369. package/dist/tools/utils/urls.d.ts +0 -5
  370. package/dist/tools/utils/urls.d.ts.map +0 -1
  371. package/dist/tools/utils/urls.js +0 -19
  372. package/dist/tools/view-failed-test-run-report/index.d.ts +0 -12
  373. package/dist/tools/view-failed-test-run-report/index.d.ts.map +0 -1
  374. package/dist/tools/view-failed-test-run-report/index.js +0 -151
  375. package/dist/utils/artifact-paths.d.ts +0 -20
  376. package/dist/utils/artifact-paths.d.ts.map +0 -1
  377. package/dist/utils/artifact-paths.js +0 -16
  378. package/dist/utils/dedup-image-fs.d.ts +0 -13
  379. package/dist/utils/dedup-image-fs.d.ts.map +0 -1
  380. package/dist/utils/dedup-image-fs.js +0 -84
  381. package/dist/utils/dedup-image.d.ts +0 -12
  382. package/dist/utils/dedup-image.d.ts.map +0 -1
  383. package/dist/utils/dedup-image.js +0 -25
  384. package/dist/utils/ffmpeg/index.d.ts +0 -26
  385. package/dist/utils/ffmpeg/index.d.ts.map +0 -1
  386. package/dist/utils/ffmpeg/index.js +0 -415
  387. package/dist/utils/find-threshold.d.ts +0 -8
  388. package/dist/utils/find-threshold.d.ts.map +0 -1
  389. package/dist/video-core/agent-orchestrator.d.ts +0 -14
  390. package/dist/video-core/agent-orchestrator.d.ts.map +0 -1
  391. package/dist/video-core/agent-orchestrator.js +0 -78
  392. package/dist/video-core/analysis-server.d.ts +0 -24
  393. package/dist/video-core/analysis-server.d.ts.map +0 -1
  394. package/dist/video-core/analysis-server.js +0 -398
  395. package/dist/video-core/analysis-viewer.html +0 -1374
  396. package/dist/video-core/xml-parser.d.ts +0 -3
  397. package/dist/video-core/xml-parser.d.ts.map +0 -1
  398. package/dist/video-core/xml-parser.js +0 -27
  399. /package/dist/tools/{issues → issues-v1}/index.d.ts +0 -0
  400. /package/dist/tools/{issues → issues-v1}/index.js +0 -0
  401. /package/dist/tools/{issues → issues-v1}/list-issues.js +0 -0
  402. /package/dist/tools/{issues → issues-v1}/utils.js +0 -0
@@ -1,117 +0,0 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- const js_levenshtein_1 = __importDefault(require("js-levenshtein"));
7
- const ts_morph_1 = require("ts-morph");
8
- const update_flow_1 = require("../agent/codegen/update-flow");
9
- const utils_1 = require("../agent/codegen/utils");
10
- const web_1 = require("../bin/utils/platform/web");
11
- const hasSingleCreateTestBlock = (result) => {
12
- // Returns 1 if there is exactly 1 `createTest` block
13
- // 0 if there is no `createTest` or if there are >1
14
- if (result.length && result[0].newCode) {
15
- const createTestBlocks = result[0].newCode.match(/createTest/g);
16
- if (createTestBlocks) {
17
- return createTestBlocks.length === 1 ? 1 : 0;
18
- }
19
- }
20
- return 0;
21
- };
22
- const newCodeBlockIsComplete = (testCase, result, expectedOutput) => {
23
- // Returns 1 if the new code block is complete
24
- // i.e., it includes test('...', async () => {
25
- if (!expectedOutput.length || !expectedOutput[0]) {
26
- return 0;
27
- }
28
- if (!result[0]?.newCode) {
29
- return 0;
30
- }
31
- if (result.length &&
32
- result[0].newCode &&
33
- expectedOutput[0]?.newCode?.includes("test(")) {
34
- const newCode = result[0].newCode;
35
- return newCode.includes("test(") && newCode.includes(testCase.name) ? 1 : 0;
36
- }
37
- else {
38
- const project = new ts_morph_1.Project();
39
- const expectedSourceFile = project.createSourceFile("expected-updated-code.ts", expectedOutput[0].newCode);
40
- const resultSourceFile = project.createSourceFile("updated-code.ts", result[0].newCode);
41
- const expectedFunctions = expectedSourceFile.getFunctions();
42
- const resultFunctions = resultSourceFile.getFunctions();
43
- if (!expectedFunctions.length) {
44
- // check for class method updates
45
- const expectedCheckForMethod = project.createSourceFile("expected-check-method.ts", `class A {
46
- ${expectedOutput[0].newCode}
47
- }`);
48
- const expectedMethods = expectedCheckForMethod.getDescendantsOfKind(ts_morph_1.SyntaxKind.MethodDeclaration);
49
- const resultCheckForMethod = project.createSourceFile("check-method.ts", `class A {
50
- ${result[0].newCode}
51
- }`);
52
- const resultMethods = resultCheckForMethod.getDescendantsOfKind(ts_morph_1.SyntaxKind.MethodDeclaration);
53
- if (resultMethods.length === 1 && expectedMethods.length === 1) {
54
- return expectedMethods[0]?.getName() === resultMethods[0]?.getName()
55
- ? 1
56
- : 0;
57
- }
58
- else {
59
- return 0;
60
- }
61
- }
62
- else {
63
- // check for function updates
64
- return expectedFunctions[0]?.getName() === resultFunctions[0]?.getName()
65
- ? 1
66
- : 0;
67
- }
68
- }
69
- };
70
- const oldCodeTestBlockIsComplete = (result, expected) => {
71
- if (result.length && result[0].oldCode) {
72
- const oldCodeFromLlm = result[0].oldCode;
73
- const expectedOldCode = expected[0]?.oldCode || "";
74
- return (1 -
75
- (0, js_levenshtein_1.default)(expectedOldCode || "", oldCodeFromLlm || "") /
76
- expectedOldCode.length);
77
- }
78
- return 0;
79
- };
80
- const appendCreateTestAgentEvaluate = async ({ item, trace }) => {
81
- const { testCase, testFiles, pageFiles, testFilePath } = item.input;
82
- const response = await (0, update_flow_1.getAppendCreateTestBlockCompletion)({
83
- testCase,
84
- testFiles,
85
- pageFiles,
86
- testFilePath,
87
- trace,
88
- });
89
- const parsed = (0, utils_1.extractAppendTestUpdates)(response);
90
- const expectedOutputParsed = (0, utils_1.extractAppendTestUpdates)(item.expectedOutput);
91
- return {
92
- scores: [
93
- {
94
- name: "returns_single_create_test",
95
- value: hasSingleCreateTestBlock(parsed),
96
- },
97
- {
98
- name: "returns_complete_code_block",
99
- value: newCodeBlockIsComplete(testCase, parsed, expectedOutputParsed),
100
- },
101
- {
102
- name: "copies_old_block_correctly",
103
- value: oldCodeTestBlockIsComplete(parsed, expectedOutputParsed),
104
- },
105
- {
106
- name: "syntax_check",
107
- value: parsed[0]?.newCode
108
- ? (0, web_1.isSyntaxValid)(parsed[0]?.newCode || "")
109
- ? 1
110
- : 0
111
- : 0,
112
- },
113
- ],
114
- output: response,
115
- };
116
- };
117
- exports.default = appendCreateTestAgentEvaluate;
@@ -1,4 +0,0 @@
1
- import { EvaluateFn } from "./type";
2
- declare const fetchSkillsAgentEvaluator: EvaluateFn;
3
- export default fetchSkillsAgentEvaluator;
4
- //# sourceMappingURL=fetch-pom-skills-agent.evals.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"fetch-pom-skills-agent.evals.d.ts","sourceRoot":"","sources":["../../src/evals/fetch-pom-skills-agent.evals.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,QAAQ,CAAC;AAEpC,QAAA,MAAM,yBAAyB,EAAE,UAiChC,CAAC;AAEF,eAAe,yBAAyB,CAAC"}
@@ -1,36 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const skills_retriever_1 = require("../agent/codegen/skills-retriever");
4
- const fetchSkillsAgentEvaluator = async ({ item, trace }) => {
5
- const { testCase, pomFiles } = item.input;
6
- const output = await (0, skills_retriever_1.fetchPomSkills)({
7
- testCase,
8
- pomFiles,
9
- trace,
10
- });
11
- if (item.expectedOutput.length === 0 && output.length === 0) {
12
- return {
13
- scores: [
14
- {
15
- name: "equality",
16
- value: 1,
17
- },
18
- ],
19
- output,
20
- };
21
- }
22
- return {
23
- scores: [
24
- {
25
- name: "equality",
26
- value: output.some((o) => {
27
- return item.expectedOutput.some((e) => e.methodName === o.methodName);
28
- })
29
- ? 1
30
- : 0,
31
- },
32
- ],
33
- output,
34
- };
35
- };
36
- exports.default = fetchSkillsAgentEvaluator;
@@ -1,4 +0,0 @@
1
- import { EvaluateFn } from "./type";
2
- export declare const masterGetNextActionEvaluator: EvaluateFn;
3
- export default masterGetNextActionEvaluator;
4
- //# sourceMappingURL=master-agent.evals.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"master-agent.evals.d.ts","sourceRoot":"","sources":["../../src/evals/master-agent.evals.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,UAAU,EAAE,MAAM,QAAQ,CAAC;AAEpC,eAAO,MAAM,4BAA4B,EAAE,UAoC1C,CAAC;AAEF,eAAe,4BAA4B,CAAC"}
@@ -1,35 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.masterGetNextActionEvaluator = void 0;
4
- const actions_1 = require("../actions");
5
- const skill_1 = require("../actions/skill");
6
- const next_action_1 = require("../agent/master/next-action");
7
- const page_1 = require("../page");
8
- const masterGetNextActionEvaluator = async ({ item, trace, }) => {
9
- const { task, executedActions, failedActions, options, pageScreenshot, disableSkills, skills = [], } = item.input;
10
- const page = {};
11
- skill_1.testCaseSkills.updateSkills(skills);
12
- const actions = new actions_1.PlaywrightActions(new page_1.TestGenPage(page, "page"));
13
- const output = await (0, next_action_1.getNextAction)({
14
- task,
15
- executedActions,
16
- failedActions,
17
- trace,
18
- options,
19
- pageScreenshot,
20
- actions,
21
- disableSkills,
22
- page,
23
- });
24
- return {
25
- scores: [
26
- {
27
- name: "action_correctness",
28
- value: item.expectedOutput.function.name === output?.actionType ? 1 : 0,
29
- },
30
- ],
31
- output,
32
- };
33
- };
34
- exports.masterGetNextActionEvaluator = masterGetNextActionEvaluator;
35
- exports.default = exports.masterGetNextActionEvaluator;
@@ -1,12 +0,0 @@
1
- import { TraceClient } from "@empiricalrun/llm";
2
- export type EvaluateFn = ({ trace, item, }: {
3
- trace: TraceClient;
4
- item: any;
5
- }) => Promise<{
6
- output: any;
7
- scores: {
8
- name: string;
9
- value: number;
10
- }[];
11
- }>;
12
- //# sourceMappingURL=type.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"type.d.ts","sourceRoot":"","sources":["../../src/evals/type.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAEhD,MAAM,MAAM,UAAU,GAAG,CAAC,EACxB,KAAK,EACL,IAAI,GACL,EAAE;IACD,KAAK,EAAE,WAAW,CAAC;IACnB,IAAI,EAAE,GAAG,CAAC;CACX,KAAK,OAAO,CAAC;IACZ,MAAM,EAAE,GAAG,CAAC;IACZ,MAAM,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,EAAE,CAAC;CAC3C,CAAC,CAAC"}
@@ -1,2 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,4 +0,0 @@
1
- import { EvaluateFn } from "./type";
2
- declare const updateScenarioCodeAgentEvaluate: EvaluateFn;
3
- export default updateScenarioCodeAgentEvaluate;
4
- //# sourceMappingURL=update-scenario-agent.evals.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"update-scenario-agent.evals.d.ts","sourceRoot":"","sources":["../../src/evals/update-scenario-agent.evals.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,UAAU,EAAE,MAAM,QAAQ,CAAC;AAUpC,QAAA,MAAM,+BAA+B,EAAE,UAqDtC,CAAC;AAEF,eAAe,+BAA+B,CAAC"}
@@ -1,47 +0,0 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- const js_levenshtein_1 = __importDefault(require("js-levenshtein"));
7
- const update_flow_1 = require("../agent/codegen/update-flow");
8
- const updateScenarioCodeAgentEvaluate = async ({ item, trace }) => {
9
- const { testCase, testFiles, pageFiles, testFilePath, testFileContent } = item.input;
10
- const { fileChanges } = await (0, update_flow_1.getUpdateTestCodeCompletion)({
11
- testCase,
12
- testFiles,
13
- pageFiles,
14
- testFilePath,
15
- testFileContent,
16
- trace,
17
- });
18
- const expectedFileChanges = item.expectedOutput;
19
- const fileChangeCount = fileChanges.length;
20
- const expectedFileChangeCount = expectedFileChanges.length;
21
- const correctFilePathChanges = expectedFileChanges.every((ef) => fileChanges.some((f) => f.filePath === ef.filePath));
22
- const distanceScores = [];
23
- expectedFileChanges.forEach((ef) => fileChanges.forEach((f) => {
24
- if (f.filePath === ef.filePath && f.newCode && ef.newCode) {
25
- const maxLength = ef.newCode.length > f.newCode.length
26
- ? ef.newCode.length
27
- : f.newCode.length;
28
- distanceScores.push(1 - (0, js_levenshtein_1.default)(f.newCode || "", ef.newCode || "") / maxLength);
29
- }
30
- }));
31
- let score = 0;
32
- if (fileChangeCount === expectedFileChangeCount && correctFilePathChanges) {
33
- score = distanceScores.length
34
- ? distanceScores.reduce((agg, s) => agg * s)
35
- : 0;
36
- }
37
- return {
38
- scores: [
39
- {
40
- name: "score",
41
- value: score,
42
- },
43
- ],
44
- output: fileChanges,
45
- };
46
- };
47
- exports.default = updateScenarioCodeAgentEvaluate;
@@ -1,3 +0,0 @@
1
- import type { Tool } from "@empiricalrun/shared-types";
2
- export declare const fetchLastSuccessfulTestRunTool: Tool;
3
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/tools/fetch-last-successful-test-run/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAuB,IAAI,EAAE,MAAM,4BAA4B,CAAC;AAQ5E,eAAO,MAAM,8BAA8B,EAAE,IAgE5C,CAAC"}
@@ -1,60 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.fetchLastSuccessfulTestRunTool = void 0;
4
- const utils_1 = require("../definitions/utils");
5
- const FetchLastSuccessfulTestRunSchema = (0, utils_1.getCommonTestNameSuitesFilePathSchema)("The name of the test to find the last successful run for");
6
- exports.fetchLastSuccessfulTestRunTool = {
7
- schema: {
8
- name: "fetchLastSuccessfulTestRun",
9
- description: "Fetch details about the last successful test run for a specific test. Tool response is a JSON of key-value pairs, where the key is the Playwright project name and the value is the object containing the test run id, summary url, timestamp, and test case from the last successful test run data",
10
- parameters: FetchLastSuccessfulTestRunSchema,
11
- },
12
- needsBrowser: false,
13
- isInlineTool: true,
14
- execute: async ({ input, apiClient }) => {
15
- try {
16
- const { testName, suites, filePath } = input;
17
- if (!apiClient) {
18
- throw new Error("Dashboard API client is not available.");
19
- }
20
- const formattedSuites = suites.length
21
- ? suites.filter((suite) => suite !== filePath).join("~~")
22
- : "~~";
23
- const response = await apiClient.request(`/api/test-cases/last-successful-run`, {
24
- method: "GET",
25
- params: {
26
- test_case_name: testName,
27
- file_path: filePath,
28
- suites: formattedSuites,
29
- },
30
- });
31
- if (!response?.data) {
32
- return {
33
- isError: true,
34
- result: `Failed to fetch last successful test run: ${response?.error?.message || "No data received"}`,
35
- };
36
- }
37
- const last_successful_run = response.data.last_successful_run;
38
- if (Object.keys(last_successful_run).length === 0) {
39
- return {
40
- isError: false,
41
- result: `No last successful test run found for ${testName}`,
42
- };
43
- }
44
- return {
45
- result: `
46
- Note: the paths in the test run report are relative to the tests directory and not the repo directory.
47
-
48
- Last successful test run details: ${JSON.stringify(last_successful_run, null, 2)}`,
49
- isError: false,
50
- };
51
- }
52
- catch (error) {
53
- console.error("Error in fetchLastSuccessfulTestRun:", error);
54
- return {
55
- isError: true,
56
- result: `Failed to fetch last successful test run: ${error instanceof Error ? error.message : String(error)}`,
57
- };
58
- }
59
- },
60
- };
@@ -1,3 +0,0 @@
1
- import type { Tool } from "@empiricalrun/shared-types";
2
- export declare const createIssueTool: Tool;
3
- //# sourceMappingURL=create-issue.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"create-issue.d.ts","sourceRoot":"","sources":["../../../src/tools/issues/create-issue.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,4BAA4B,CAAC;AA2BvD,eAAO,MAAM,eAAe,EAAE,IAmE7B,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/tools/issues/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AACjD,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAC/C,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC"}
@@ -1,3 +0,0 @@
1
- import type { Tool } from "@empiricalrun/shared-types";
2
- export declare const listIssuesTool: Tool;
3
- //# sourceMappingURL=list-issues.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"list-issues.d.ts","sourceRoot":"","sources":["../../../src/tools/issues/list-issues.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,4BAA4B,CAAC;AAKvD,eAAO,MAAM,cAAc,EAAE,IA2B5B,CAAC"}
@@ -1,24 +0,0 @@
1
- import { z } from "zod";
2
- export declare const issueMetadataFields: {
3
- test_cases_affected: z.ZodArray<z.ZodObject<{
4
- name: z.ZodString;
5
- suites: z.ZodArray<z.ZodString, "many">;
6
- file_path: z.ZodString;
7
- }, "strip", z.ZodTypeAny, {
8
- name: string;
9
- suites: string[];
10
- file_path: string;
11
- }, {
12
- name: string;
13
- suites: string[];
14
- file_path: string;
15
- }>, "many">;
16
- test_run_info: z.ZodArray<z.ZodObject<{
17
- test_run_id: z.ZodNumber;
18
- }, "strip", z.ZodTypeAny, {
19
- test_run_id: number;
20
- }, {
21
- test_run_id: number;
22
- }>, "many">;
23
- };
24
- //# sourceMappingURL=metadata-schema.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"metadata-schema.d.ts","sourceRoot":"","sources":["../../../src/tools/issues/metadata-schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;CAwB/B,CAAC"}
@@ -1,22 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.issueMetadataFields = void 0;
4
- const zod_1 = require("zod");
5
- exports.issueMetadataFields = {
6
- test_cases_affected: zod_1.z
7
- .array(zod_1.z.object({
8
- name: zod_1.z.string().describe("The test case name"),
9
- suites: zod_1.z
10
- .array(zod_1.z.string())
11
- .describe("The nested suite names (describe blocks) leading to this test"),
12
- file_path: zod_1.z.string().describe("The file path of the test case"),
13
- }))
14
- .describe("An array of test cases that are affected by this issue"),
15
- test_run_info: zod_1.z
16
- .array(zod_1.z.object({
17
- test_run_id: zod_1.z
18
- .number()
19
- .describe("The ID of the test run in which this issue was observed"),
20
- }))
21
- .describe("An array of test runs where this issue occurred"),
22
- };
@@ -1,3 +0,0 @@
1
- import type { Tool } from "@empiricalrun/shared-types";
2
- export declare const updateIssueTool: Tool;
3
- //# sourceMappingURL=update-issue.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"update-issue.d.ts","sourceRoot":"","sources":["../../../src/tools/issues/update-issue.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAS,IAAI,EAAE,MAAM,4BAA4B,CAAC;AAwB9D,eAAO,MAAM,eAAe,EAAE,IAsE7B,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/tools/issues/utils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,sBAAsB,EACtB,oBAAoB,EACpB,mBAAmB,EACnB,KAAK,EACL,sBAAsB,EACvB,MAAM,4BAA4B,CAAC;AAEpC,wBAAsB,WAAW,CAC/B,SAAS,EAAE,mBAAmB,GAC7B,OAAO,CAAC,oBAAoB,CAAC,KAAK,CAAC,CAAC,CAStC;AAED,wBAAsB,WAAW,CAC/B,SAAS,EAAE,mBAAmB,EAC9B,SAAS,EAAE,IAAI,CACb,KAAK,EACL,IAAI,GAAG,YAAY,GAAG,YAAY,GAAG,QAAQ,GAAG,YAAY,CAC7D,GACA,OAAO,CAAC,sBAAsB,CAAC,KAAK,CAAC,CAAC,CASxC;AAED,wBAAsB,WAAW,CAC/B,SAAS,EAAE,mBAAmB,EAC9B,OAAO,EAAE,MAAM,EACf,UAAU,EAAE,OAAO,CACjB,IAAI,CAAC,KAAK,EAAE,IAAI,GAAG,YAAY,GAAG,YAAY,GAAG,YAAY,CAAC,CAC/D,GACA,OAAO,CAAC,sBAAsB,CAAC,KAAK,CAAC,CAAC,CASxC"}
@@ -1,5 +0,0 @@
1
- export declare function extractProjectFromUrl(testRunUrl: string): {
2
- repoName: string;
3
- runId: string;
4
- };
5
- //# sourceMappingURL=urls.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"urls.d.ts","sourceRoot":"","sources":["../../../src/tools/utils/urls.ts"],"names":[],"mappings":"AAAA,wBAAgB,qBAAqB,CAAC,UAAU,EAAE,MAAM;;;EAiBvD"}
@@ -1,19 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.extractProjectFromUrl = extractProjectFromUrl;
4
- function extractProjectFromUrl(testRunUrl) {
5
- // Remove query parameters if they exist
6
- const urlWithoutParams = testRunUrl.split("?")[0] || testRunUrl;
7
- // Extract the run ID and repo name from the URL
8
- const urlParts = urlWithoutParams.split("/");
9
- const runId = urlParts.pop();
10
- const projectSlug = urlParts[urlParts.length - 2];
11
- if (!runId || !projectSlug) {
12
- throw new Error("Invalid test run URL - could not extract run ID or project slug");
13
- }
14
- const repoName = `${projectSlug}-tests`;
15
- return {
16
- repoName,
17
- runId,
18
- };
19
- }
@@ -1,12 +0,0 @@
1
- import { Tool } from "@empiricalrun/shared-types";
2
- import { z } from "zod";
3
- export declare const ViewFailedTestRunReportSchema: z.ZodObject<{
4
- testRunUrl: z.ZodString;
5
- }, "strip", z.ZodTypeAny, {
6
- testRunUrl: string;
7
- }, {
8
- testRunUrl: string;
9
- }>;
10
- export type ViewFailedTestRunReportInput = z.infer<typeof ViewFailedTestRunReportSchema>;
11
- export declare const viewFailedTestRunReportTool: Tool;
12
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/tools/view-failed-test-run-report/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAc,MAAM,4BAA4B,CAAC;AAE9D,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAQxB,eAAO,MAAM,6BAA6B;;;;;;EAExC,CAAC;AAEH,MAAM,MAAM,4BAA4B,GAAG,CAAC,CAAC,KAAK,CAChD,OAAO,6BAA6B,CACrC,CAAC;AAEF,eAAO,MAAM,2BAA2B,EAAE,IAsKzC,CAAC"}
@@ -1,151 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.viewFailedTestRunReportTool = exports.ViewFailedTestRunReportSchema = void 0;
4
- // import fs from "fs";
5
- const zod_1 = require("zod");
6
- const playwright_report_parser_1 = require("../../utils/playwright-report-parser");
7
- const urls_1 = require("../utils/urls");
8
- exports.ViewFailedTestRunReportSchema = zod_1.z.object({
9
- testRunUrl: zod_1.z.string().describe("The URL of the test run to process."),
10
- });
11
- exports.viewFailedTestRunReportTool = {
12
- schema: {
13
- name: "viewFailedTestRunReport",
14
- description: "View the test run report using its URL. the report only contains information about failed tests.",
15
- parameters: exports.ViewFailedTestRunReportSchema,
16
- },
17
- needsBrowser: false,
18
- isInlineTool: true,
19
- execute: async ({ input, apiClient }) => {
20
- const { testRunUrl } = input;
21
- const { repoName, runId } = (0, urls_1.extractProjectFromUrl)(testRunUrl);
22
- let result = {
23
- testRun: null,
24
- summary: null,
25
- environment: null,
26
- currentBuild: null,
27
- };
28
- let data = null;
29
- if (!apiClient) {
30
- throw new Error("Dashboard API client is not available.");
31
- }
32
- try {
33
- data = await apiClient.request(`/api/test-runs/${runId}?repo_name=${repoName}`, { method: "GET" });
34
- }
35
- catch (error) {
36
- return {
37
- isError: true,
38
- result: `Failed to fetch test run details: ${error instanceof Error ? error.message : String(error)}`,
39
- };
40
- }
41
- const testRun = data?.data?.test_run?.testRun;
42
- const project = data?.data?.test_run?.project;
43
- const environmentSlug = testRun?.environment_slug;
44
- const summaryUrl = testRun?.summary_url;
45
- // TODO: Remove html from this tool
46
- const indexHtmlUrl = summaryUrl?.replace("summary.json", "index.html");
47
- if (testRun) {
48
- result = {
49
- testRun: testRun,
50
- currentBuild: {
51
- id: testRun?.build_id,
52
- build_url: testRun?.build_url,
53
- project_id: testRun?.project_id,
54
- build_id: testRun?.build_id,
55
- branch: testRun?.test_run_branch,
56
- commit: testRun?.commit,
57
- commit_url: testRun?.commit_url,
58
- version: "",
59
- },
60
- };
61
- }
62
- if (summaryUrl && indexHtmlUrl) {
63
- try {
64
- const summaryJson = await fetch(summaryUrl);
65
- const summaryData = await summaryJson.json();
66
- // fs.writeFileSync(
67
- // "download-summary.json",
68
- // summaryJson ? JSON.stringify(summaryData, null, 2) : "",
69
- // "utf-8",
70
- // );
71
- const htmlDetailed = await apiClient.request(`/api/reports/html-detailed`, {
72
- method: "GET",
73
- params: { url: indexHtmlUrl },
74
- });
75
- const parsedReport = (0, playwright_report_parser_1.parsePlaywrightTestReport)(summaryData);
76
- // fs.writeFileSync(
77
- // "parsed-report.json",
78
- // parsedReport ? JSON.stringify(parsedReport, null, 2) : "",
79
- // "utf-8",
80
- // );
81
- const failedTests = parsedReport.tests.filter((test) => test.status === "failed");
82
- const reportJson = htmlDetailed.files["report.json"];
83
- const testsWithResults = failedTests.map((test) => {
84
- let matchingTest = (0, playwright_report_parser_1.findTestInReport)(reportJson, test, htmlDetailed.files);
85
- // to reduce the token size of the final response, we remove the steps from the results
86
- if (matchingTest && Array.isArray(matchingTest.results)) {
87
- matchingTest.results = matchingTest.results.map((result) => ({
88
- ...result,
89
- steps: [],
90
- errors: result.errors.map((error) => {
91
- return {
92
- message: error.message.slice(0, 100),
93
- };
94
- }),
95
- }));
96
- }
97
- if (matchingTest) {
98
- return {
99
- ...test,
100
- results: matchingTest.results,
101
- steps: [],
102
- error: { ...test.error, snippet: "" },
103
- };
104
- }
105
- });
106
- const updatedReport = {
107
- ...parsedReport,
108
- tests: testsWithResults,
109
- };
110
- result = {
111
- ...result,
112
- summary: updatedReport,
113
- };
114
- }
115
- catch (err) {
116
- console.error("Failed to save summary: ", err);
117
- const errMsg = `Failed to save summary: ${err instanceof Error ? err.message : String(err)}`;
118
- return {
119
- isError: true,
120
- result: errMsg,
121
- };
122
- }
123
- }
124
- if (environmentSlug && project?.repo_name) {
125
- const environment = await apiClient.request(`/api/environments`, {
126
- method: "GET",
127
- params: {
128
- project_repo_name: repoName,
129
- environment_slug: environmentSlug,
130
- },
131
- });
132
- if (environment?.data?.environment && environment?.data?.build) {
133
- result = {
134
- ...result,
135
- environment: environment?.data?.environment,
136
- currentBuild: {
137
- ...result.currentBuild,
138
- environment_id: environment?.data?.build?.environment_id,
139
- },
140
- };
141
- }
142
- }
143
- return {
144
- isError: false,
145
- result: `
146
- Note: the paths in the test run report are relative to the tests directory and not the repo directory.
147
-
148
- Test run report: ${JSON.stringify(result, null, 2)}`,
149
- };
150
- },
151
- };