@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,376 +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
- exports.extractTestUpdates = extractTestUpdates;
7
- exports.extractCreateTestUpdates = extractCreateTestUpdates;
8
- exports.extractAppendTestUpdates = extractAppendTestUpdates;
9
- exports.extractTestStepsSuggestions = extractTestStepsSuggestions;
10
- exports.validateTypesAndFormatCode = validateTypesAndFormatCode;
11
- exports.applyFileChangesUsingStrReplace = applyFileChangesUsingStrReplace;
12
- exports.applyFileChangesForCreateTest = applyFileChangesForCreateTest;
13
- exports.searchAndReplaceCode = searchAndReplaceCode;
14
- exports.applyFileChanges = applyFileChanges;
15
- const llm_1 = require("@empiricalrun/llm");
16
- const fs_1 = __importDefault(require("fs"));
17
- const ts_morph_1 = require("ts-morph");
18
- const web_1 = require("../../bin/utils/platform/web");
19
- const fix_ts_errors_1 = require("./fix-ts-errors");
20
- /**
21
- *
22
- * method to extract file path and code updates for the LLM response of update flow
23
- * @export
24
- * @param {string} input
25
- * @return {*} {({
26
- * filePath: string | undefined;
27
- * oldCode: string | undefined;
28
- * newCode: string | undefined;
29
- * reason: string | undefined;
30
- * }[])}
31
- */
32
- function extractTestUpdates(input) {
33
- const result = [];
34
- // TODO: use better structure for this. Do not kill me for this please.
35
- const regex = /<file_path>(.*?)<\/file_path>[\s\S]*?<old_code_block>([\s\S]*?)<\/old_code_block>[\s\S]*?<new_code_block>([\s\S]*?)<\/new_code_block>[\s\S]*?<change>([\s\S]*?)<\/change>/g;
36
- let match;
37
- while ((match = regex.exec(input)) !== null) {
38
- const [, filePath, oldCode, newCode, reason] = match;
39
- result.push({
40
- filePath: filePath?.trim(),
41
- oldCode: oldCode?.trim(),
42
- newCode: newCode?.trim(),
43
- reason: reason?.trim(),
44
- });
45
- }
46
- return result;
47
- }
48
- /**
49
- *
50
- * method to extract file path and code updates for the LLM response of create flow
51
- * @export
52
- * @param {string} input
53
- * @return {*} {({
54
- * filePath: string | undefined;
55
- * code: string | undefined;
56
- * reason: string | undefined;
57
- * }[])}
58
- */
59
- function extractCreateTestUpdates(input) {
60
- const result = [];
61
- // TODO: use better structure for this. Do not kill me for this please.
62
- const regex = /<file_path>(.*?)<\/file_path>[\s\S]*?<code_block>([\s\S]*?)<\/code_block>[\s\S]*?<change>([\s\S]*?)<\/change>/g;
63
- let match;
64
- while ((match = regex.exec(input)) !== null) {
65
- const [, filePath, code, reason] = match;
66
- result.push({
67
- filePath: filePath?.trim(),
68
- code: code?.trim(),
69
- reason: reason?.trim(),
70
- });
71
- }
72
- return result;
73
- }
74
- /**
75
- *
76
- * method to extract append create test updates
77
- * @export
78
- * @param {string} input
79
- * @return {*} {({
80
- * intent: string | undefined,
81
- * updateLocation: string | undefined,
82
- * filePath: string | undefined;
83
- * oldCode: string | undefined;
84
- * newCode: string | undefined;
85
- * reason: string | undefined;
86
- * }[])}
87
- */
88
- function extractAppendTestUpdates(input) {
89
- const result = [];
90
- // TODO: use better structure for this. Do not kill me for this please.
91
- const regex = /<reason_for_intent>(.*?)<\/reason_for_intent>[\s\S]*?<intent>(.*?)<\/intent>[\s\S]*?<location_of_update>([\s\S]*?)<\/location_of_update>[\s\S]*?<file_path>([\s\S]*?)<\/file_path>[\s\S]*?<old_code_block>([\s\S]*?)<\/old_code_block>[\s\S]*?<new_code_block>([\s\S]*?)<\/new_code_block>[\s\S]*?<change>([\s\S]*?)<\/change>/g;
92
- let match;
93
- while ((match = regex.exec(input)) !== null) {
94
- const [, reasonForIntent, intent, updateLocation, filePath, oldCode, newCode, reason,] = match;
95
- result.push({
96
- reasonForIntent: reasonForIntent?.trim(),
97
- intent: intent?.trim(),
98
- updateLocation: updateLocation?.trim(),
99
- filePath: filePath?.trim(),
100
- oldCode: oldCode?.trim(),
101
- newCode: newCode?.trim(),
102
- reason: reason?.trim(),
103
- });
104
- }
105
- return result;
106
- }
107
- function extractTestStepsSuggestions(input) {
108
- const result = [];
109
- // Extract all sections with their subtask tags first
110
- const subtaskRegex = /<subtask>([\s\S]*?)<\/subtask>([\s\S]*?)(?=<subtask>|$)/g;
111
- let subtaskMatch;
112
- while ((subtaskMatch = subtaskRegex.exec(input)) !== null) {
113
- const [, testStepText = "", content = ""] = subtaskMatch;
114
- // Extract individual tag content regardless of order
115
- const reasonMatch = /<reason>([\s\S]*?)<\/reason>/i.exec(content);
116
- const filePathMatch = /<file_import_path>([\s\S]*?)<\/file_import_path>/i.exec(content);
117
- const usageExampleMatch = /<usage_example>([\s\S]*?)<\/usage_example>/i.exec(content);
118
- const methodNameMatch = /<method_name>([\s\S]*?)<\/method_name>/i.exec(content);
119
- // Extract values or use empty strings if not found
120
- const reasonText = reasonMatch?.[1] || "";
121
- const filePathText = filePathMatch?.[1] || "";
122
- const usageExampleText = usageExampleMatch?.[1] || "";
123
- const methodNameText = methodNameMatch?.[1] || "";
124
- result.push({
125
- testStep: testStepText.trim(),
126
- filePath: filePathText.trim(),
127
- usageExample: usageExampleText.trim(),
128
- reason: reasonText.trim(),
129
- methodName: methodNameText.trim(),
130
- });
131
- }
132
- return result.filter((r) => !!r.filePath && !!r.usageExample);
133
- }
134
- async function validateTypesAndFormatCode({ validateTypes = true, trace, testCase, filePaths, logger, pomPrompt, nonSpecFilePrompt, }) {
135
- for (let filePath of filePaths) {
136
- if (!filePath) {
137
- continue;
138
- }
139
- try {
140
- if (validateTypes) {
141
- await (0, fix_ts_errors_1.validateAndFixTypescriptErrors)({
142
- trace,
143
- logger,
144
- file: filePath,
145
- pomCode: pomPrompt ?? "",
146
- nonSpecFileCode: nonSpecFilePrompt ?? "",
147
- testCase: testCase,
148
- });
149
- }
150
- trace?.event({ name: "format-file" });
151
- await (0, web_1.formatCode)(filePath, trace);
152
- logger?.success(`${filePath} file formatted successfully!`);
153
- }
154
- catch (e) {
155
- console.error(`Error while formatting the file ${filePath}`, e);
156
- }
157
- }
158
- await (0, llm_1.flushAllTraces)();
159
- }
160
- async function applyFileChangesUsingStrReplace({ trace, fileChanges, logger, }) {
161
- const repoEditFileChangesSpan = trace?.span({
162
- name: "repo-edit-file-changes",
163
- });
164
- const results = [];
165
- for (const fileChange of fileChanges) {
166
- if (!fileChange.filePath) {
167
- continue;
168
- }
169
- try {
170
- const readWriteFileSpan = repoEditFileChangesSpan?.span({
171
- name: "write-to-file",
172
- input: {
173
- fileChange,
174
- },
175
- });
176
- const { result, updatedContent } = await searchAndReplaceCode({
177
- logger,
178
- fileChange,
179
- });
180
- if (result.error) {
181
- logger?.error(`Unable to find the code to update in ${result.filePath}, full error:`, result);
182
- }
183
- else {
184
- fs_1.default.writeFileSync(fileChange.filePath, updatedContent, "utf-8");
185
- readWriteFileSpan?.end({ output: { updatedContent } });
186
- }
187
- results.push(result);
188
- }
189
- catch (e) {
190
- trace?.event({
191
- name: "repo-edit-file-changes-error",
192
- output: {
193
- filePath: fileChange.filePath,
194
- error: e,
195
- },
196
- });
197
- console.error(`Error while applying changes to file ${fileChange.filePath}`, e);
198
- }
199
- }
200
- return results;
201
- }
202
- async function applyFileChangesForCreateTest({ trace, fileChanges, }) {
203
- const repoEditFileChangesSpan = trace?.span({
204
- name: "create-test-file-changes",
205
- });
206
- for (const fileChange of fileChanges) {
207
- if (!fileChange.filePath) {
208
- continue;
209
- }
210
- try {
211
- const readWriteFileSpan = repoEditFileChangesSpan?.span({
212
- name: "write-to-file",
213
- input: {
214
- fileChange,
215
- },
216
- });
217
- if (fileChange.code) {
218
- const currentContent = fs_1.default.existsSync(fileChange.filePath)
219
- ? fs_1.default.readFileSync(fileChange.filePath, "utf-8")
220
- : "";
221
- fs_1.default.writeFileSync(fileChange.filePath, currentContent
222
- ? `${currentContent}\n\n${fileChange.code}`
223
- : fileChange.code, "utf-8");
224
- const updatedFileContent = fs_1.default.readFileSync(fileChange.filePath, "utf-8");
225
- readWriteFileSpan?.end({
226
- output: { fileChange, updatedFile: updatedFileContent },
227
- });
228
- }
229
- }
230
- catch (e) {
231
- trace?.event({
232
- name: "create-test-file-changes-error",
233
- output: {
234
- filePath: fileChange.filePath,
235
- error: e,
236
- },
237
- });
238
- console.error(`Error while applying changes to file ${fileChange.filePath}`, e);
239
- }
240
- }
241
- }
242
- async function searchAndReplaceCode({ logger, fileChange, }) {
243
- let contents = fs_1.default.readFileSync(fileChange.filePath, "utf-8");
244
- // since we dont know what is getting updated,
245
- // we believe that the patch is correct and contains few before and after lines
246
- // to make the change unique for search & replace
247
- if (contents.includes(fileChange.oldCode)) {
248
- const updatedContent = contents.replace(fileChange.oldCode, `\n\n${fileChange.newCode}`);
249
- return {
250
- result: {
251
- error: false,
252
- errorMessage: "",
253
- filePath: fileChange.filePath,
254
- },
255
- updatedContent,
256
- };
257
- }
258
- logger?.error(`Unable to find the code to update in ${fileChange.filePath}`);
259
- return {
260
- result: {
261
- error: true,
262
- // TODO: old_code_block should be replaced with oldCode
263
- errorMessage: `The content of "old_code_block" corresponding to file path "${fileChange.filePath}" did not match the current content of the file "${fileChange.filePath}"`,
264
- filePath: fileChange.filePath,
265
- },
266
- updatedContent: contents,
267
- };
268
- }
269
- async function applyFileChanges({ trace, testCase, fileChanges, logger, }) {
270
- const results = [];
271
- for (const fileChange of fileChanges) {
272
- if (!fileChange.filePath) {
273
- continue;
274
- }
275
- try {
276
- const hasTestCaseAsUpdateContext = !!testCase?.name;
277
- let testBlockUpdate = undefined;
278
- if (hasTestCaseAsUpdateContext) {
279
- const applyFileChangesSpan = trace?.span({
280
- name: "apply-file-changes",
281
- });
282
- const block = (0, web_1.getTypescriptTestBlock)({
283
- scenarioName: testCase?.name,
284
- content: fileChange.newCode || "",
285
- suites: [], // // suites should be empty here since we ask LLM to send immediate parent AST node for the code update. so there won't be any nesting here, just the test block
286
- });
287
- testBlockUpdate = block.testBlock;
288
- applyFileChangesSpan?.end({ output: { testBlock: testBlockUpdate } });
289
- }
290
- if (testBlockUpdate) {
291
- // assuming the test case getting updated
292
- // maintaining the previous accuracy of the test case update
293
- const readWriteFileSpan = trace?.span({ name: "write-to-file" });
294
- let contents = fs_1.default.readFileSync(fileChange.filePath, "utf-8");
295
- const [prependContent, strippedContent] = await (0, web_1.stripAndPrependImports)(fileChange.newCode, testCase?.name);
296
- let updatedContent = prependContent + contents + `\n\n${strippedContent}`;
297
- const { testBlock } = (0, web_1.getTypescriptTestBlock)({
298
- scenarioName: testCase?.name,
299
- content: contents,
300
- suites: testCase?.suites,
301
- });
302
- contents = contents.replace(testBlock, `\n\n${strippedContent}`);
303
- updatedContent = prependContent + contents;
304
- fs_1.default.writeFileSync(fileChange.filePath, updatedContent, "utf-8");
305
- readWriteFileSpan?.end({ output: { updatedContent } });
306
- }
307
- else {
308
- const readWriteFileSpan = trace?.span({ name: "write-to-file" });
309
- let contents = fs_1.default.readFileSync(fileChange.filePath, "utf-8");
310
- const project = new ts_morph_1.Project();
311
- const sourceFile = project.createSourceFile("updated-code.ts", fileChange.newCode);
312
- const functions = sourceFile.getFunctions();
313
- const checkForMethodSrc = project.createSourceFile("check-method.ts", `class A {
314
- ${fileChange.newCode}
315
- }`);
316
- const methods = checkForMethodSrc.getDescendantsOfKind(ts_morph_1.SyntaxKind.MethodDeclaration);
317
- const originalSource = project.createSourceFile("current-code.ts", contents);
318
- // if there is a single function update in the file
319
- if (functions.length === 1 &&
320
- functions[0]?.getText() === fileChange.newCode) {
321
- const updatedCodeFuncNames = functions.map((f) => f.getName());
322
- const funcName = updatedCodeFuncNames[0];
323
- const matchingNodes = originalSource
324
- .getDescendantsOfKind(ts_morph_1.SyntaxKind.FunctionDeclaration)
325
- .filter((node) => node.getName() === funcName);
326
- matchingNodes[0]?.replaceWithText(functions[0]?.getText());
327
- contents = originalSource.getFullText();
328
- }
329
- else if (
330
- // if there is a update in method of a class in the file
331
- methods.length === 1 &&
332
- methods[0]?.getText() === fileChange.newCode) {
333
- const method = methods[0];
334
- const funcName = method?.getName();
335
- const matchingNodes = originalSource
336
- .getDescendantsOfKind(ts_morph_1.SyntaxKind.MethodDeclaration)
337
- .filter((node) => node.getName() === funcName);
338
- matchingNodes[0]?.replaceWithText(method?.getText());
339
- contents = originalSource.getFullText();
340
- }
341
- else {
342
- const { result, updatedContent } = await searchAndReplaceCode({
343
- logger,
344
- fileChange,
345
- });
346
- if (result.error) {
347
- logger?.error(`Unable to find the code to update in ${fileChange.filePath}`);
348
- results.push(result);
349
- continue;
350
- }
351
- else {
352
- contents = updatedContent;
353
- }
354
- }
355
- fs_1.default.writeFileSync(fileChange.filePath, contents, "utf-8");
356
- readWriteFileSpan?.end({ output: { contents } });
357
- results.push({
358
- filePath: fileChange.filePath,
359
- error: false,
360
- errorMessage: "",
361
- });
362
- }
363
- }
364
- catch (e) {
365
- trace?.event({
366
- name: "apply-file-changes-error",
367
- output: {
368
- filePath: fileChange.filePath,
369
- error: e,
370
- },
371
- });
372
- console.error(`Error while applying changes to file ${fileChange.filePath}`, e);
373
- }
374
- }
375
- return results;
376
- }
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=skills.spec.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"skills.spec.d.ts","sourceRoot":"","sources":["../../../../src/agent/master/browser-tests/skills.spec.ts"],"names":[],"mappings":""}
@@ -1,112 +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 fs_1 = __importDefault(require("fs"));
7
- const run_1 = require("../run");
8
- const fixtures_1 = require("./fixtures");
9
- fixtures_1.test.describe.configure({ mode: "default" });
10
- fixtures_1.test.beforeEach(async () => {
11
- // Setup repo with POM file
12
- fs_1.default.mkdirSync("pages");
13
- const pomContent = `
14
- import type { Page } from "@playwright/test";
15
-
16
- export async function subscribeToBlog({ page, email }: { page: Page; email: string }) {
17
- await page.getByPlaceholder("Enter your email").fill(email);
18
- await page.getByRole("button", { name: "Subscribe" }).click();
19
- }
20
-
21
- export async function extractTitleForPost({ page, nth }: { page: Page; nth: number }) {
22
- // nth is zero-indexed
23
- const title = await page.locator("h2").nth(nth).textContent();
24
- return title;
25
- }
26
- `;
27
- fs_1.default.writeFileSync("pages/blog.ts", pomContent);
28
- });
29
- fixtures_1.test.afterEach(async () => {
30
- // Clean up the repo in cwd
31
- fs_1.default.rmSync("pages", { recursive: true });
32
- });
33
- (0, fixtures_1.test)("use skills to subscribe to blog", async ({ page, server }) => {
34
- fixtures_1.test.skip(!run_1.IS_ALLOWED_TO_USE_SKILLS, "Skills are disabled");
35
- await page.goto(`${server.baseURL}/blog-page.html`);
36
- const response = await (0, run_1.createTestUsingMasterAgent)({
37
- task: `subscribe as user@example.com`,
38
- page,
39
- testCase: {
40
- id: 1,
41
- name: "subscribe to blog",
42
- steps: ["subscribe as user@example.com"],
43
- filePath: "blog.spec.ts",
44
- suites: [],
45
- },
46
- options: {},
47
- });
48
- // Assert execution was successful
49
- await (0, fixtures_1.expect)(page.getByText("Thanks for subscribing")).toBeVisible();
50
- // Assert code generated is correct
51
- console.log(response);
52
- (0, fixtures_1.expect)(response.importPaths.length).toBeGreaterThan(0);
53
- (0, fixtures_1.expect)(response.importPaths[0]).toBe("pages/blog.ts");
54
- (0, fixtures_1.expect)(response.code.length).toBeGreaterThan(0);
55
- (0, fixtures_1.expect)(response.code).toMatch(/await.*subscribeToBlog.*page.*email.*user@example\.com/);
56
- });
57
- (0, fixtures_1.test)("use skills to extract blog post title", async ({ page, server }) => {
58
- fixtures_1.test.skip(!run_1.IS_ALLOWED_TO_USE_SKILLS, "Skills are disabled");
59
- await page.goto(`${server.baseURL}/blog-page.html`);
60
- const response = await (0, run_1.createTestUsingMasterAgent)({
61
- // TODO: Extend this to click on "read more" and verify generated code
62
- // uses the state variable created by the skill
63
- task: `extract title of 2nd blog post`,
64
- page,
65
- testCase: {
66
- id: 1,
67
- name: "extract blog post title",
68
- steps: ["extract title of 2nd blog post"],
69
- filePath: "blog.spec.ts",
70
- suites: [],
71
- },
72
- options: {},
73
- });
74
- // Assert code generated is correct
75
- console.log(response);
76
- (0, fixtures_1.expect)(response.importPaths.length).toBeGreaterThan(0);
77
- (0, fixtures_1.expect)(response.importPaths[0]).toBe("pages/blog.ts");
78
- (0, fixtures_1.expect)(response.code.length).toBeGreaterThan(0);
79
- (0, fixtures_1.expect)(response.code).toMatch(/^const.*=.*await extractTitleForPost.*page.*nth:.*1/);
80
- });
81
- (0, fixtures_1.test)("use skills to subscribe with multiple pages", async ({ page, server, }) => {
82
- fixtures_1.test.skip(!run_1.IS_ALLOWED_TO_USE_SKILLS, "Skills are disabled");
83
- await page.goto(`${server.baseURL}/icons-navbar.html`);
84
- const blogPage = await page.context().newPage();
85
- await blogPage.goto(`${server.baseURL}/blog-page.html`);
86
- const response = await (0, run_1.createTestUsingMasterAgent)({
87
- task: `we have 2 pages open inside a web browser, and your task is to subscribe as user@example.com on the blogPage`,
88
- page,
89
- testCase: {
90
- id: 1,
91
- name: "subscribe to blog",
92
- steps: [
93
- "we have 2 pages open inside a web browser, and your task is to subscribe as user@example.com on the blogPage",
94
- ],
95
- filePath: "blog.spec.ts",
96
- suites: [],
97
- },
98
- scopeVars: {
99
- page,
100
- blogPage,
101
- },
102
- options: {},
103
- });
104
- // Assert execution was successful
105
- await (0, fixtures_1.expect)(blogPage.getByText("Thanks for subscribing")).toBeVisible();
106
- // Assert code generated is correct
107
- console.log(response);
108
- (0, fixtures_1.expect)(response.importPaths.length).toBeGreaterThan(0);
109
- (0, fixtures_1.expect)(response.importPaths[0]).toBe("pages/blog.ts");
110
- (0, fixtures_1.expect)(response.code.length).toBeGreaterThan(0);
111
- (0, fixtures_1.expect)(response.code).toMatch(/await.*subscribeToBlog.*blogPage.*email.*user@example\.com/);
112
- });
@@ -1,11 +0,0 @@
1
- import { TraceClient } from "@empiricalrun/llm";
2
- import { PlaywrightActions } from "../../actions";
3
- export declare function executeSkillAction({ actions, nextAction, trace, }: {
4
- actions: PlaywrightActions;
5
- nextAction: {
6
- actionType: string;
7
- toolCallArgs: string;
8
- };
9
- trace?: TraceClient | undefined;
10
- }): Promise<string | undefined>;
11
- //# sourceMappingURL=execute-skill-action.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"execute-skill-action.d.ts","sourceRoot":"","sources":["../../../src/agent/master/execute-skill-action.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAEhD,OAAO,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAC;AAMlD,wBAAsB,kBAAkB,CAAC,EACvC,OAAO,EACP,UAAU,EACV,KAAK,GACN,EAAE;IACD,OAAO,EAAE,iBAAiB,CAAC;IAC3B,UAAU,EAAE;QACV,UAAU,EAAE,MAAM,CAAC;QACnB,YAAY,EAAE,MAAM,CAAC;KACtB,CAAC;IACF,KAAK,CAAC,EAAE,WAAW,GAAG,SAAS,CAAC;CACjC,+BAeA"}
@@ -1,23 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.executeSkillAction = executeSkillAction;
4
- const skill_1 = require("../../actions/skill");
5
- const errors_1 = require("../../errors");
6
- const human_in_the_loop_1 = require("../../human-in-the-loop");
7
- const env_1 = require("../../utils/env");
8
- async function executeSkillAction({ actions, nextAction, trace, }) {
9
- const args = JSON.parse(nextAction.toolCallArgs);
10
- if (!(0, env_1.isRunningOnCloud)()) {
11
- const { skillDetails } = (0, skill_1.extractSkillFromArgs)(args);
12
- const feedback = await human_in_the_loop_1.humanLoop.getFeedback({
13
- message: `Should I use this skill?\n\n${skillDetails?.usageExample}\n\nfrom: ${skillDetails?.filePath}\n\nAnswer with "yes" or "no"`,
14
- });
15
- if (feedback.toLowerCase().trim().includes("no")) {
16
- throw new errors_1.HumanApprovalDenied("Skill usage approval not provided");
17
- }
18
- }
19
- const code = await actions.executeAction(nextAction.actionType, args, trace);
20
- if (code) {
21
- return code;
22
- }
23
- }
@@ -1,5 +0,0 @@
1
- import { BaseToolExecutor, BaseToolExecutorProps } from "../../../tools/executor/base";
2
- export declare class VideoAnalysisToolExecutor extends BaseToolExecutor {
3
- constructor(params: Omit<BaseToolExecutorProps, "tools">);
4
- }
5
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/agent/video-analysis/executor/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,gBAAgB,EAChB,qBAAqB,EACtB,MAAM,8BAA8B,CAAC;AAEtC,qBAAa,yBAA0B,SAAQ,gBAAgB;gBACjD,MAAM,EAAE,IAAI,CAAC,qBAAqB,EAAE,OAAO,CAAC;CAGzD"}
@@ -1,10 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.VideoAnalysisToolExecutor = void 0;
4
- const base_1 = require("../../../tools/executor/base");
5
- class VideoAnalysisToolExecutor extends base_1.BaseToolExecutor {
6
- constructor(params) {
7
- super({ ...params, tools: [] });
8
- }
9
- }
10
- exports.VideoAnalysisToolExecutor = VideoAnalysisToolExecutor;
@@ -1,7 +0,0 @@
1
- import type { ToolsForLLM } from "@empiricalrun/shared-types";
2
- import { BaseAgent } from "../base";
3
- export declare class VideoAnalysisAgent extends BaseAgent {
4
- protected getTools(): ToolsForLLM;
5
- protected buildSystemPrompt(): Promise<string>;
6
- }
7
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/agent/video-analysis/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;AAC9D,OAAO,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAEpC,qBAAa,kBAAmB,SAAQ,SAAS;IAC/C,SAAS,CAAC,QAAQ,IAAI,WAAW;cAOjB,iBAAiB,IAAI,OAAO,CAAC,MAAM,CAAC;CA+CrD"}
@@ -1,60 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.VideoAnalysisAgent = void 0;
4
- const base_1 = require("../base");
5
- class VideoAnalysisAgent extends base_1.BaseAgent {
6
- getTools() {
7
- return {
8
- custom: [],
9
- builtInTextEditor: false,
10
- };
11
- }
12
- async buildSystemPrompt() {
13
- return `
14
- You are a video analysis agent specialized in analyzing screen recordings and user interface interactions.
15
-
16
- You will receive individual video frames with their Frame IDs as user input for detailed visual analysis.
17
-
18
- When analyzing the provided frames:
19
- 1. Analyze each frame for UI elements, user actions, and state changes
20
- 2. Provide specific observations about what's happening in each frame
21
- 3. The Summary should be in the given XML format
22
-
23
- Your analysis should be:
24
- - Detailed and specific about UI elements and interactions
25
- - Sequential, following the flow of actions in the video
26
-
27
- CRITICAL: You MUST use the EXACT frame IDs that are provided with each frame. Each frame will be labeled with text like "Frame ID: frame_000000" - use this exact ID in your <key_frame> tags.
28
-
29
- Note: The Last frame from the attachments should always be included in the <key_frame> tag
30
-
31
- # Output format
32
- <summary>
33
- <section>
34
- <key_frame>frame_id</key_frame>
35
- <description>text description of the frame</description>
36
- </section>
37
- <section>
38
- <key_frame>frame_id</key_frame>
39
- <description>text description of the frame</description>
40
- </section>
41
- .
42
- .
43
- .
44
- <section>
45
- <key_frame>frame_id</key_frame>
46
- <description>text description of the frame</description>
47
- </section>
48
- </summary>
49
-
50
- ## Example
51
- If the attachments include "frame_000000.png", "frame_000078.png", and "frame_000156.png", then:
52
- - To reference the first frame, use: <key_frame>frame_000000</key_frame>
53
- - To reference the second frame, use: <key_frame>frame_000078</key_frame>
54
- - To reference the third frame, use: <key_frame>frame_000156</key_frame>
55
-
56
- WRONG: <key_frame>frame_000001</key_frame> (unless there's actually a file named frame_000001.png in the attachments)
57
- `;
58
- }
59
- }
60
- exports.VideoAnalysisAgent = VideoAnalysisAgent;
@@ -1,4 +0,0 @@
1
- import { EvaluateFn } from "./type";
2
- declare const appendCreateTestAgentEvaluate: EvaluateFn;
3
- export default appendCreateTestAgentEvaluate;
4
- //# sourceMappingURL=append-create-test-agent.evals.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"append-create-test-agent.evals.d.ts","sourceRoot":"","sources":["../../src/evals/append-create-test-agent.evals.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,UAAU,EAAE,MAAM,QAAQ,CAAC;AA8GpC,QAAA,MAAM,6BAA6B,EAAE,UAsCpC,CAAC;AAEF,eAAe,6BAA6B,CAAC"}