@midscene/core 1.12.10-beta-20260920031616.0 → 1.13.0

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 (319) hide show
  1. package/dist/es/agent/agent.mjs +103 -6
  2. package/dist/es/agent/agent.mjs.map +1 -1
  3. package/dist/es/agent/index.mjs +4 -3
  4. package/dist/es/agent/tasks.mjs +2 -2
  5. package/dist/es/agent/tasks.mjs.map +1 -1
  6. package/dist/es/agent/test-runner-nodes.mjs +291 -40
  7. package/dist/es/agent/test-runner-nodes.mjs.map +1 -1
  8. package/dist/es/agent/utils.mjs +1 -1
  9. package/dist/es/device/index.mjs +15 -2
  10. package/dist/es/device/index.mjs.map +1 -1
  11. package/dist/es/dump/html-utils.mjs +37 -4
  12. package/dist/es/dump/html-utils.mjs.map +1 -1
  13. package/dist/es/dump/screenshot-store.mjs +8 -1
  14. package/dist/es/dump/screenshot-store.mjs.map +1 -1
  15. package/dist/es/report-cli.mjs +9 -4
  16. package/dist/es/report-cli.mjs.map +1 -1
  17. package/dist/es/report-generator.mjs +117 -4
  18. package/dist/es/report-generator.mjs.map +1 -1
  19. package/dist/es/report-html-template.mjs +1 -1
  20. package/dist/es/report.mjs +190 -41
  21. package/dist/es/report.mjs.map +1 -1
  22. package/dist/es/test-run-report.mjs.map +1 -1
  23. package/dist/es/test-runner/engine/case-runner.mjs +52 -0
  24. package/dist/es/test-runner/engine/case-runner.mjs.map +1 -0
  25. package/dist/es/test-runner/engine/document-runtime.mjs +273 -0
  26. package/dist/es/test-runner/engine/document-runtime.mjs.map +1 -0
  27. package/dist/es/test-runner/engine/execute-step.mjs +177 -0
  28. package/dist/es/test-runner/engine/execute-step.mjs.map +1 -0
  29. package/dist/es/test-runner/engine/execution-failure.mjs +39 -0
  30. package/dist/es/test-runner/engine/execution-failure.mjs.map +1 -0
  31. package/dist/es/test-runner/engine/index.mjs +12 -0
  32. package/dist/es/test-runner/engine/project-runtime.mjs +142 -0
  33. package/dist/es/test-runner/engine/project-runtime.mjs.map +1 -0
  34. package/dist/es/test-runner/engine/registry.mjs +61 -0
  35. package/dist/es/test-runner/engine/registry.mjs.map +1 -0
  36. package/dist/es/test-runner/engine/resource-operations.mjs +211 -0
  37. package/dist/es/test-runner/engine/resource-operations.mjs.map +1 -0
  38. package/dist/es/test-runner/engine/run-collected-case.mjs +193 -0
  39. package/dist/es/test-runner/engine/run-collected-case.mjs.map +1 -0
  40. package/dist/es/test-runner/engine/run-workflow-document.mjs +155 -0
  41. package/dist/es/test-runner/engine/run-workflow-document.mjs.map +1 -0
  42. package/dist/es/test-runner/engine/scheduler.mjs +27 -0
  43. package/dist/es/test-runner/engine/scheduler.mjs.map +1 -0
  44. package/dist/es/test-runner/engine/scope-teardown.mjs +16 -0
  45. package/dist/es/test-runner/engine/scope-teardown.mjs.map +1 -0
  46. package/dist/es/test-runner/engine/types.mjs +0 -0
  47. package/dist/es/test-runner/errors.mjs +201 -0
  48. package/dist/es/test-runner/errors.mjs.map +1 -0
  49. package/dist/es/test-runner/execution-record.mjs +83 -0
  50. package/dist/es/test-runner/execution-record.mjs.map +1 -0
  51. package/dist/es/test-runner/index.mjs +12 -0
  52. package/dist/es/test-runner/node/define-node.mjs +44 -0
  53. package/dist/es/test-runner/node/define-node.mjs.map +1 -0
  54. package/dist/es/test-runner/node/index.mjs +2 -0
  55. package/dist/es/test-runner/node/types.mjs +0 -0
  56. package/dist/es/test-runner/parser/document-format.mjs +21 -0
  57. package/dist/es/test-runner/parser/document-format.mjs.map +1 -0
  58. package/dist/es/test-runner/parser/normalize.mjs +87 -0
  59. package/dist/es/test-runner/parser/normalize.mjs.map +1 -0
  60. package/dist/es/test-runner/parser/types.mjs +0 -0
  61. package/dist/es/test-runner/project.mjs +0 -0
  62. package/dist/es/test-runner/reporting/agent-report.mjs +23 -0
  63. package/dist/es/test-runner/reporting/agent-report.mjs.map +1 -0
  64. package/dist/es/test-runner/reporting/execution-record.mjs +73 -0
  65. package/dist/es/test-runner/reporting/execution-record.mjs.map +1 -0
  66. package/dist/es/test-runner/reporting/merge-report.mjs +231 -0
  67. package/dist/es/test-runner/reporting/merge-report.mjs.map +1 -0
  68. package/dist/es/test-runner/reporting/sanitize.mjs +162 -0
  69. package/dist/es/test-runner/reporting/sanitize.mjs.map +1 -0
  70. package/dist/es/test-runner/reporting/test-run-report.mjs +327 -0
  71. package/dist/es/test-runner/reporting/test-run-report.mjs.map +1 -0
  72. package/dist/es/test-runner/reporting/types.mjs +0 -0
  73. package/dist/es/utils.mjs +1 -1
  74. package/dist/es/yaml/execution-context.node.mjs +6 -0
  75. package/dist/es/yaml/execution-context.node.mjs.map +1 -0
  76. package/dist/es/yaml/execution-context.stub.mjs +8 -0
  77. package/dist/es/yaml/execution-context.stub.mjs.map +1 -0
  78. package/dist/es/yaml/execution-session.mjs +90 -0
  79. package/dist/es/yaml/execution-session.mjs.map +1 -0
  80. package/dist/es/yaml/index.mjs +2 -1
  81. package/dist/es/yaml/legacy-yaml-execution-record.mjs +47 -0
  82. package/dist/es/yaml/legacy-yaml-execution-record.mjs.map +1 -0
  83. package/dist/es/yaml/legacy-yaml-report.mjs +52 -0
  84. package/dist/es/yaml/legacy-yaml-report.mjs.map +1 -0
  85. package/dist/es/yaml/legacy-yaml-runtime.mjs +119 -0
  86. package/dist/es/yaml/legacy-yaml-runtime.mjs.map +1 -0
  87. package/dist/es/yaml/player-state.mjs +15 -0
  88. package/dist/es/yaml/player-state.mjs.map +1 -0
  89. package/dist/es/yaml/player.mjs +214 -348
  90. package/dist/es/yaml/player.mjs.map +1 -1
  91. package/dist/es/yaml/report-policy.mjs +7 -0
  92. package/dist/es/yaml/report-policy.mjs.map +1 -0
  93. package/dist/es/yaml/test-runner-compat.mjs +301 -0
  94. package/dist/es/yaml/test-runner-compat.mjs.map +1 -0
  95. package/dist/es/yaml/test-runner-nodes.mjs +147 -0
  96. package/dist/es/yaml/test-runner-nodes.mjs.map +1 -0
  97. package/dist/es/yaml/utils.mjs +12 -1
  98. package/dist/es/yaml/utils.mjs.map +1 -1
  99. package/dist/es/yaml-runtime.mjs +7 -0
  100. package/dist/es/yaml.mjs.map +1 -1
  101. package/dist/lib/agent/agent.js +103 -6
  102. package/dist/lib/agent/agent.js.map +1 -1
  103. package/dist/lib/agent/index.js +37 -3
  104. package/dist/lib/agent/tasks.js +2 -2
  105. package/dist/lib/agent/tasks.js.map +1 -1
  106. package/dist/lib/agent/test-runner-nodes.js +329 -45
  107. package/dist/lib/agent/test-runner-nodes.js.map +1 -1
  108. package/dist/lib/agent/utils.js +1 -1
  109. package/dist/lib/device/index.js +15 -2
  110. package/dist/lib/device/index.js.map +1 -1
  111. package/dist/lib/dump/html-utils.js +43 -4
  112. package/dist/lib/dump/html-utils.js.map +1 -1
  113. package/dist/lib/dump/screenshot-store.js +8 -1
  114. package/dist/lib/dump/screenshot-store.js.map +1 -1
  115. package/dist/lib/report-cli.js +8 -3
  116. package/dist/lib/report-cli.js.map +1 -1
  117. package/dist/lib/report-generator.js +114 -1
  118. package/dist/lib/report-generator.js.map +1 -1
  119. package/dist/lib/report-html-template.js +1 -1
  120. package/dist/lib/report.js +187 -38
  121. package/dist/lib/report.js.map +1 -1
  122. package/dist/lib/test-run-report.js.map +1 -1
  123. package/dist/lib/test-runner/engine/case-runner.js +89 -0
  124. package/dist/lib/test-runner/engine/case-runner.js.map +1 -0
  125. package/dist/lib/test-runner/engine/document-runtime.js +307 -0
  126. package/dist/lib/test-runner/engine/document-runtime.js.map +1 -0
  127. package/dist/lib/test-runner/engine/execute-step.js +211 -0
  128. package/dist/lib/test-runner/engine/execute-step.js.map +1 -0
  129. package/dist/lib/test-runner/engine/execution-failure.js +79 -0
  130. package/dist/lib/test-runner/engine/execution-failure.js.map +1 -0
  131. package/dist/lib/test-runner/engine/index.js +137 -0
  132. package/dist/lib/test-runner/engine/index.js.map +1 -0
  133. package/dist/lib/test-runner/engine/project-runtime.js +176 -0
  134. package/dist/lib/test-runner/engine/project-runtime.js.map +1 -0
  135. package/dist/lib/test-runner/engine/registry.js +95 -0
  136. package/dist/lib/test-runner/engine/registry.js.map +1 -0
  137. package/dist/lib/test-runner/engine/resource-operations.js +272 -0
  138. package/dist/lib/test-runner/engine/resource-operations.js.map +1 -0
  139. package/dist/lib/test-runner/engine/run-collected-case.js +227 -0
  140. package/dist/lib/test-runner/engine/run-collected-case.js.map +1 -0
  141. package/dist/lib/test-runner/engine/run-workflow-document.js +189 -0
  142. package/dist/lib/test-runner/engine/run-workflow-document.js.map +1 -0
  143. package/dist/lib/test-runner/engine/scheduler.js +64 -0
  144. package/dist/lib/test-runner/engine/scheduler.js.map +1 -0
  145. package/dist/lib/test-runner/engine/scope-teardown.js +50 -0
  146. package/dist/lib/test-runner/engine/scope-teardown.js.map +1 -0
  147. package/dist/lib/test-runner/engine/types.js +20 -0
  148. package/dist/lib/test-runner/engine/types.js.map +1 -0
  149. package/dist/lib/test-runner/errors.js +283 -0
  150. package/dist/lib/test-runner/errors.js.map +1 -0
  151. package/dist/lib/test-runner/execution-record.js +123 -0
  152. package/dist/lib/test-runner/execution-record.js.map +1 -0
  153. package/dist/lib/test-runner/index.js +137 -0
  154. package/dist/lib/test-runner/index.js.map +1 -0
  155. package/dist/lib/test-runner/node/define-node.js +78 -0
  156. package/dist/lib/test-runner/node/define-node.js.map +1 -0
  157. package/dist/lib/test-runner/node/index.js +67 -0
  158. package/dist/lib/test-runner/node/index.js.map +1 -0
  159. package/dist/lib/test-runner/node/types.js +20 -0
  160. package/dist/lib/test-runner/node/types.js.map +1 -0
  161. package/dist/lib/test-runner/parser/document-format.js +58 -0
  162. package/dist/lib/test-runner/parser/document-format.js.map +1 -0
  163. package/dist/lib/test-runner/parser/normalize.js +124 -0
  164. package/dist/lib/test-runner/parser/normalize.js.map +1 -0
  165. package/dist/lib/test-runner/parser/types.js +20 -0
  166. package/dist/lib/test-runner/parser/types.js.map +1 -0
  167. package/dist/lib/test-runner/project.js +20 -0
  168. package/dist/lib/test-runner/project.js.map +1 -0
  169. package/dist/lib/test-runner/reporting/agent-report.js +57 -0
  170. package/dist/lib/test-runner/reporting/agent-report.js.map +1 -0
  171. package/dist/lib/test-runner/reporting/execution-record.js +107 -0
  172. package/dist/lib/test-runner/reporting/execution-record.js.map +1 -0
  173. package/dist/lib/test-runner/reporting/merge-report.js +265 -0
  174. package/dist/lib/test-runner/reporting/merge-report.js.map +1 -0
  175. package/dist/lib/test-runner/reporting/sanitize.js +202 -0
  176. package/dist/lib/test-runner/reporting/sanitize.js.map +1 -0
  177. package/dist/lib/test-runner/reporting/test-run-report.js +364 -0
  178. package/dist/lib/test-runner/reporting/test-run-report.js.map +1 -0
  179. package/dist/lib/test-runner/reporting/types.js +20 -0
  180. package/dist/lib/test-runner/reporting/types.js.map +1 -0
  181. package/dist/lib/utils.js +1 -1
  182. package/dist/lib/yaml/execution-context.node.js +43 -0
  183. package/dist/lib/yaml/execution-context.node.js.map +1 -0
  184. package/dist/lib/yaml/execution-context.stub.js +45 -0
  185. package/dist/lib/yaml/execution-context.stub.js.map +1 -0
  186. package/dist/lib/yaml/execution-session.js +136 -0
  187. package/dist/lib/yaml/execution-session.js.map +1 -0
  188. package/dist/lib/yaml/index.js +49 -7
  189. package/dist/lib/yaml/legacy-yaml-execution-record.js +81 -0
  190. package/dist/lib/yaml/legacy-yaml-execution-record.js.map +1 -0
  191. package/dist/lib/yaml/legacy-yaml-report.js +86 -0
  192. package/dist/lib/yaml/legacy-yaml-report.js.map +1 -0
  193. package/dist/lib/yaml/legacy-yaml-runtime.js +156 -0
  194. package/dist/lib/yaml/legacy-yaml-runtime.js.map +1 -0
  195. package/dist/lib/yaml/player-state.js +52 -0
  196. package/dist/lib/yaml/player-state.js.map +1 -0
  197. package/dist/lib/yaml/player.js +213 -347
  198. package/dist/lib/yaml/player.js.map +1 -1
  199. package/dist/lib/yaml/report-policy.js +41 -0
  200. package/dist/lib/yaml/report-policy.js.map +1 -0
  201. package/dist/lib/yaml/test-runner-compat.js +344 -0
  202. package/dist/lib/yaml/test-runner-compat.js.map +1 -0
  203. package/dist/lib/yaml/test-runner-nodes.js +184 -0
  204. package/dist/lib/yaml/test-runner-nodes.js.map +1 -0
  205. package/dist/lib/yaml/utils.js +18 -1
  206. package/dist/lib/yaml/utils.js.map +1 -1
  207. package/dist/lib/yaml-runtime.js +67 -0
  208. package/dist/lib/yaml-runtime.js.map +1 -0
  209. package/dist/lib/yaml.js.map +1 -1
  210. package/dist/types/agent/agent.d.ts +14 -1
  211. package/dist/types/agent/agent.d.ts.map +1 -1
  212. package/dist/types/agent/index.d.ts +4 -3
  213. package/dist/types/agent/index.d.ts.map +1 -1
  214. package/dist/types/agent/tasks.d.ts +1 -1
  215. package/dist/types/agent/tasks.d.ts.map +1 -1
  216. package/dist/types/agent/test-runner-nodes.d.ts +226 -0
  217. package/dist/types/agent/test-runner-nodes.d.ts.map +1 -1
  218. package/dist/types/device/index.d.ts +1 -1
  219. package/dist/types/device/index.d.ts.map +1 -1
  220. package/dist/types/dump/html-utils.d.ts +4 -0
  221. package/dist/types/dump/html-utils.d.ts.map +1 -1
  222. package/dist/types/dump/screenshot-store.d.ts +2 -1
  223. package/dist/types/dump/screenshot-store.d.ts.map +1 -1
  224. package/dist/types/report-cli.d.ts.map +1 -1
  225. package/dist/types/report-generator.d.ts +10 -0
  226. package/dist/types/report-generator.d.ts.map +1 -1
  227. package/dist/types/report.d.ts +3 -1
  228. package/dist/types/report.d.ts.map +1 -1
  229. package/dist/types/test-run-report.d.ts +18 -2
  230. package/dist/types/test-run-report.d.ts.map +1 -1
  231. package/dist/types/test-runner/engine/case-runner.d.ts +13 -0
  232. package/dist/types/test-runner/engine/case-runner.d.ts.map +1 -0
  233. package/dist/types/test-runner/engine/document-runtime.d.ts +4 -0
  234. package/dist/types/test-runner/engine/document-runtime.d.ts.map +1 -0
  235. package/dist/types/test-runner/engine/execute-step.d.ts +17 -0
  236. package/dist/types/test-runner/engine/execute-step.d.ts.map +1 -0
  237. package/dist/types/test-runner/engine/execution-failure.d.ts +13 -0
  238. package/dist/types/test-runner/engine/execution-failure.d.ts.map +1 -0
  239. package/dist/types/test-runner/engine/index.d.ts +13 -0
  240. package/dist/types/test-runner/engine/index.d.ts.map +1 -0
  241. package/dist/types/test-runner/engine/project-runtime.d.ts +3 -0
  242. package/dist/types/test-runner/engine/project-runtime.d.ts.map +1 -0
  243. package/dist/types/test-runner/engine/registry.d.ts +12 -0
  244. package/dist/types/test-runner/engine/registry.d.ts.map +1 -0
  245. package/dist/types/test-runner/engine/resource-operations.d.ts +32 -0
  246. package/dist/types/test-runner/engine/resource-operations.d.ts.map +1 -0
  247. package/dist/types/test-runner/engine/run-collected-case.d.ts +4 -0
  248. package/dist/types/test-runner/engine/run-collected-case.d.ts.map +1 -0
  249. package/dist/types/test-runner/engine/run-workflow-document.d.ts +4 -0
  250. package/dist/types/test-runner/engine/run-workflow-document.d.ts.map +1 -0
  251. package/dist/types/test-runner/engine/scheduler.d.ts +12 -0
  252. package/dist/types/test-runner/engine/scheduler.d.ts.map +1 -0
  253. package/dist/types/test-runner/engine/scope-teardown.d.ts +3 -0
  254. package/dist/types/test-runner/engine/scope-teardown.d.ts.map +1 -0
  255. package/dist/types/test-runner/engine/types.d.ts +226 -0
  256. package/dist/types/test-runner/engine/types.d.ts.map +1 -0
  257. package/dist/types/test-runner/errors.d.ts +79 -0
  258. package/dist/types/test-runner/errors.d.ts.map +1 -0
  259. package/dist/types/test-runner/execution-record.d.ts +43 -0
  260. package/dist/types/test-runner/execution-record.d.ts.map +1 -0
  261. package/dist/types/test-runner/index.d.ts +20 -0
  262. package/dist/types/test-runner/index.d.ts.map +1 -0
  263. package/dist/types/test-runner/node/define-node.d.ts +4 -0
  264. package/dist/types/test-runner/node/define-node.d.ts.map +1 -0
  265. package/dist/types/test-runner/node/index.d.ts +3 -0
  266. package/dist/types/test-runner/node/index.d.ts.map +1 -0
  267. package/dist/types/test-runner/node/types.d.ts +66 -0
  268. package/dist/types/test-runner/node/types.d.ts.map +1 -0
  269. package/dist/types/test-runner/parser/document-format.d.ts +8 -0
  270. package/dist/types/test-runner/parser/document-format.d.ts.map +1 -0
  271. package/dist/types/test-runner/parser/normalize.d.ts +9 -0
  272. package/dist/types/test-runner/parser/normalize.d.ts.map +1 -0
  273. package/dist/types/test-runner/parser/types.d.ts +69 -0
  274. package/dist/types/test-runner/parser/types.d.ts.map +1 -0
  275. package/dist/types/test-runner/project.d.ts +75 -0
  276. package/dist/types/test-runner/project.d.ts.map +1 -0
  277. package/dist/types/test-runner/reporting/agent-report.d.ts +9 -0
  278. package/dist/types/test-runner/reporting/agent-report.d.ts.map +1 -0
  279. package/dist/types/test-runner/reporting/execution-record.d.ts +9 -0
  280. package/dist/types/test-runner/reporting/execution-record.d.ts.map +1 -0
  281. package/dist/types/test-runner/reporting/merge-report.d.ts +15 -0
  282. package/dist/types/test-runner/reporting/merge-report.d.ts.map +1 -0
  283. package/dist/types/test-runner/reporting/sanitize.d.ts +6 -0
  284. package/dist/types/test-runner/reporting/sanitize.d.ts.map +1 -0
  285. package/dist/types/test-runner/reporting/test-run-report.d.ts +5 -0
  286. package/dist/types/test-runner/reporting/test-run-report.d.ts.map +1 -0
  287. package/dist/types/test-runner/reporting/types.d.ts +34 -0
  288. package/dist/types/test-runner/reporting/types.d.ts.map +1 -0
  289. package/dist/types/yaml/execution-context.node.d.ts +4 -0
  290. package/dist/types/yaml/execution-context.node.d.ts.map +1 -0
  291. package/dist/types/yaml/execution-context.stub.d.ts +6 -0
  292. package/dist/types/yaml/execution-context.stub.d.ts.map +1 -0
  293. package/dist/types/yaml/execution-session.d.ts +17 -0
  294. package/dist/types/yaml/execution-session.d.ts.map +1 -0
  295. package/dist/types/yaml/index.d.ts +1 -1
  296. package/dist/types/yaml/index.d.ts.map +1 -1
  297. package/dist/types/yaml/legacy-yaml-execution-record.d.ts +24 -0
  298. package/dist/types/yaml/legacy-yaml-execution-record.d.ts.map +1 -0
  299. package/dist/types/yaml/legacy-yaml-report.d.ts +19 -0
  300. package/dist/types/yaml/legacy-yaml-report.d.ts.map +1 -0
  301. package/dist/types/yaml/legacy-yaml-runtime.d.ts +23 -0
  302. package/dist/types/yaml/legacy-yaml-runtime.d.ts.map +1 -0
  303. package/dist/types/yaml/player-state.d.ts +11 -0
  304. package/dist/types/yaml/player-state.d.ts.map +1 -0
  305. package/dist/types/yaml/player.d.ts +11 -3
  306. package/dist/types/yaml/player.d.ts.map +1 -1
  307. package/dist/types/yaml/report-policy.d.ts +4 -0
  308. package/dist/types/yaml/report-policy.d.ts.map +1 -0
  309. package/dist/types/yaml/test-runner-compat.d.ts +17 -0
  310. package/dist/types/yaml/test-runner-compat.d.ts.map +1 -0
  311. package/dist/types/yaml/test-runner-nodes.d.ts +6 -0
  312. package/dist/types/yaml/test-runner-nodes.d.ts.map +1 -0
  313. package/dist/types/yaml/utils.d.ts +9 -0
  314. package/dist/types/yaml/utils.d.ts.map +1 -1
  315. package/dist/types/yaml-runtime.d.ts +13 -0
  316. package/dist/types/yaml-runtime.d.ts.map +1 -0
  317. package/dist/types/yaml.d.ts +25 -7
  318. package/dist/types/yaml.d.ts.map +1 -1
  319. package/package.json +28 -2
@@ -0,0 +1,43 @@
1
+ import type { WorkflowDocumentExecutionResult, WorkflowReportSource } from './engine/types';
2
+ import type { CollectedWorkflowDocument } from './parser/types';
3
+ /**
4
+ * One complete document invocation, including work outside the pure kernel.
5
+ * The entry adapter owns resources and records their lifecycle here. A failed
6
+ * setup has a record even though no document could be executed.
7
+ *
8
+ * runId identifies this invocation, not an Agent/report resource. File retries
9
+ * create new records; they do not become per-Case retries. Report projection
10
+ * must not mutate these records or redact the original API output.
11
+ */
12
+ export interface WorkflowExecutionRecord {
13
+ readonly runId: string;
14
+ readonly attemptIndex: number;
15
+ readonly sourcePath: string;
16
+ readonly platform: string;
17
+ readonly projectName?: string;
18
+ readonly document: CollectedWorkflowDocument;
19
+ readonly status: 'success' | 'failed';
20
+ readonly startedAt: string;
21
+ readonly endedAt: string;
22
+ readonly durationMs: number;
23
+ readonly execution?: WorkflowDocumentExecutionResult;
24
+ readonly setupError?: unknown;
25
+ readonly executionError?: unknown;
26
+ readonly cleanupErrors: readonly unknown[];
27
+ readonly outputs: Readonly<Record<string, unknown>>;
28
+ readonly reportPaths: readonly string[];
29
+ readonly reportSources?: readonly WorkflowReportSource[];
30
+ readonly children?: readonly WorkflowExecutionRecord[];
31
+ readonly reportError?: unknown;
32
+ /** Entry-owned report copies or result files failed after execution finished. */
33
+ readonly publicationErrors?: readonly unknown[];
34
+ /** Entry progress/result observers failed, independently of action outcomes. */
35
+ readonly observerErrors?: readonly unknown[];
36
+ }
37
+ /** Complete host facts as a kernel result. Report and summary consume this view. */
38
+ export declare function executionRecordToResult(record: WorkflowExecutionRecord): WorkflowDocumentExecutionResult;
39
+ /** Persist execution facts across workers without dropping native Error fields. */
40
+ export declare function serializeWorkflowExecutionRecord(record: WorkflowExecutionRecord): string;
41
+ /** The same error-preserving encoding for entry results and worker envelopes. */
42
+ export declare function serializeWorkflowValue(value: unknown): string;
43
+ //# sourceMappingURL=execution-record.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"execution-record.d.ts","sourceRoot":"","sources":["../../../src/test-runner/execution-record.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,+BAA+B,EAE/B,oBAAoB,EACrB,MAAM,gBAAgB,CAAC;AACxB,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,gBAAgB,CAAC;AAEhE;;;;;;;;GAQG;AACH,MAAM,WAAW,uBAAuB;IACtC,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;IAC9B,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,CAAC;IAC9B,QAAQ,CAAC,QAAQ,EAAE,yBAAyB,CAAC;IAC7C,QAAQ,CAAC,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ration surface, not a user-facing
6
+ * replacement for `@midscene/test`.
7
+ */
8
+ export * from './engine';
9
+ export * from './errors';
10
+ export * from './execution-record';
11
+ export * from './node';
12
+ export * from './parser/normalize';
13
+ export * from './parser/document-format';
14
+ export * from './parser/types';
15
+ export * from './project';
16
+ export * from './reporting/types';
17
+ export * from './reporting/sanitize';
18
+ export * from './reporting/test-run-report';
19
+ export * from './reporting/execution-record';
20
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/test-runner/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,oBAAoB,CAAC;AACnC,cAAc,QAAQ,CAAC;AACvB,cAAc,oBAAoB,CAAC;AACnC,cAAc,0BAA0B,CAAC;AACzC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,WAAW,CAAC;AAC1B,cAAc,mBAAmB,CAAC;AAClC,cAAc,sBAAsB,CAAC;AACrC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,8BAA8B,CAAC"}
@@ -0,0 +1,4 @@
1
+ import type { DefineNodeOptions, DefineNodeWithSchemaOptions, NodeDefinition, NodeDefinitionWithSchema, NodeInputSchema } from './types';
2
+ export declare function defineNode<TSchema extends NodeInputSchema, TData = unknown, TContext = unknown>(options: DefineNodeWithSchemaOptions<TSchema, TData, TContext>): NodeDefinitionWithSchema<TSchema, TData, TContext>;
3
+ export declare function defineNode<TInput = unknown, TData = unknown, TContext = unknown>(options: DefineNodeOptions<TInput, TData, TContext>): NodeDefinition<TInput, TData, TContext>;
4
+ //# sourceMappingURL=define-node.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"define-node.d.ts","sourceRoot":"","sources":["../../../../src/test-runner/node/define-node.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EACV,iBAAiB,EACjB,2BAA2B,EAC3B,cAAc,EACd,wBAAwB,EACxB,eAAe,EAChB,MAAM,SAAS,CAAC;AAoFjB,wBAAgB,UAAU,CACxB,OAAO,SAAS,eAAe,EAC/B,KAAK,GAAG,OAAO,EACf,QAAQ,GAAG,OAAO,EAElB,OAAO,EAAE,2BAA2B,CAAC,OAAO,EAAE,KAAK,EAAE,QAAQ,CAAC,GAC7D,wBAAwB,CAAC,OAAO,EAAE,KAAK,EAAE,QAAQ,CAAC,CAAC;AAEtD,wBAAgB,UAAU,CACxB,MAAM,GAAG,OAAO,EAChB,KAAK,GAAG,OAAO,EACf,QAAQ,GAAG,OAAO,EAElB,OAAO,EAAE,iBAAiB,CAAC,MAAM,EAAE,KAAK,EAAE,QAAQ,CAAC,GAClD,cAAc,CAAC,MAAM,EAAE,KAAK,EAAE,QAAQ,CAAC,CAAC"}
@@ -0,0 +1,3 @@
1
+ export * from './define-node';
2
+ export * from './types';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/test-runner/node/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAC;AAC9B,cAAc,SAAS,CAAC"}
@@ -0,0 +1,66 @@
1
+ import type { z } from 'zod/v4';
2
+ import type { NodeCaseContext, NodeDocumentContext, NodeScopeTeardown } from '../engine/types';
3
+ import type { NormalizedStepMeta } from '../parser/types';
4
+ export interface NodeResult<TData = unknown> {
5
+ /** Human-readable summary for reports. */
6
+ summary?: string;
7
+ /** Structured data included in the step result. */
8
+ data?: TData;
9
+ }
10
+ /** A stable reference from one Runner Step to report detail data. */
11
+ export interface NodeReportTrace {
12
+ type: 'midscene-execution';
13
+ executionId: string;
14
+ }
15
+ /** Collects report references produced while the current Step is executing. */
16
+ export interface NodeReportCollector {
17
+ addTrace(trace: NodeReportTrace): void;
18
+ }
19
+ interface NodeExecutionContextBase<TInput = unknown, TContext = unknown> {
20
+ /** The validated node input without `$`. */
21
+ input: TInput;
22
+ /** The normalized engine metadata for this step. */
23
+ $: Readonly<NormalizedStepMeta>;
24
+ /** The timeout and cancellation signal for this step. */
25
+ signal: AbortSignal;
26
+ /** Resources shared by the current workflow document. */
27
+ context: TContext;
28
+ /** Register resource cleanup for the current case attempt or document. */
29
+ onTeardown(teardown: NodeScopeTeardown): void;
30
+ /** Attach stable Agent execution references to the current Step result. */
31
+ report: NodeReportCollector;
32
+ }
33
+ export type NodeExecutionContext<TInput = unknown, TContext = unknown> = NodeExecutionContextBase<TInput, TContext> & ({
34
+ /** The node is running for one case. */
35
+ scope: 'case';
36
+ /** Identity and phase information for the case being executed. */
37
+ case: NodeCaseContext;
38
+ document?: never;
39
+ } | {
40
+ /** The node is running for the workflow document. */
41
+ scope: 'document';
42
+ /** Identity and phase information for the document being executed. */
43
+ document: NodeDocumentContext;
44
+ case?: never;
45
+ });
46
+ export type NodeExecutionReturn<TData = unknown> = Promise<NodeResult<TData> | void> | NodeResult<TData> | void;
47
+ export type NodeInputSchema = z.ZodObject;
48
+ export interface DefineNodeOptions<TInput = unknown, TData = unknown, TContext = unknown> {
49
+ name: string;
50
+ title?: string;
51
+ description?: string;
52
+ /** Object field populated by string shorthand. Omit or set false to disable it. */
53
+ stringInputKey?: string | false;
54
+ inputSchema?: NodeInputSchema;
55
+ execute(ctx: NodeExecutionContext<TInput, TContext>): NodeExecutionReturn<TData>;
56
+ }
57
+ export type DefineNodeWithSchemaOptions<TSchema extends NodeInputSchema, TData = unknown, TContext = unknown> = Omit<DefineNodeOptions<z.output<TSchema>, TData, TContext>, 'inputSchema'> & {
58
+ inputSchema: TSchema;
59
+ };
60
+ export interface NodeDefinition<TInput = unknown, TData = unknown, TContext = unknown> extends DefineNodeOptions<TInput, TData, TContext> {
61
+ }
62
+ export type NodeDefinitionWithSchema<TSchema extends NodeInputSchema, TData = unknown, TContext = unknown> = NodeDefinition<z.output<TSchema>, TData, TContext> & {
63
+ inputSchema: TSchema;
64
+ };
65
+ export {};
66
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 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,SAAQ,iBAAiB,CAAC,MAAM,EAAE,KAAK,EAAE,QAAQ,CAAC;CAAG;AAEvD,MAAM,MAAM,wBAAwB,CAClC,OAAO,SAAS,eAAe,EAC/B,KAAK,GAAG,OAAO,EACf,QAAQ,GAAG,OAAO,IAChB,cAAc,CAAC,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,EAAE,KAAK,EAAE,QAAQ,CAAC,GAAG;IACvD,WAAW,EAAE,OAAO,CAAC;CACtB,CAAC"}
@@ -0,0 +1,8 @@
1
+ export declare const nativeWorkflowRootKeys: readonly ["beforeAll", "beforeEach", "cases", "afterEach", "afterAll"];
2
+ export type WorkflowDocumentFormat = 'legacy' | 'legacy-batch' | 'native' | 'mixed' | 'unknown';
3
+ /**
4
+ * Classify only the document envelope. Parsing and schema validation remain
5
+ * owned by the selected command so this helper can never route execution.
6
+ */
7
+ export declare const classifyWorkflowDocumentFormat: (value: unknown) => WorkflowDocumentFormat;
8
+ //# sourceMappingURL=document-format.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"document-format.d.ts","sourceRoot":"","sources":["../../../../src/test-runner/parser/document-format.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,sBAAsB,wEAMzB,CAAC;AAEX,MAAM,MAAM,sBAAsB,GAC9B,QAAQ,GACR,cAAc,GACd,QAAQ,GACR,OAAO,GACP,SAAS,CAAC;AAKd;;;GAGG;AACH,eAAO,MAAM,8BAA8B,GACzC,OAAO,OAAO,KACb,sBAaF,CAAC"}
@@ -0,0 +1,9 @@
1
+ import type { NormalizedStep } from './types';
2
+ interface StringInputNodeDefinition {
3
+ stringInputKey?: string | false;
4
+ }
5
+ export type ResolveNodeForNormalization = (name: string) => StringInputNodeDefinition | undefined;
6
+ export declare function normalizeStep(value: unknown, index?: number, resolveNode?: ResolveNodeForNormalization): NormalizedStep;
7
+ export declare function normalizeSteps(steps: unknown, resolveNode?: ResolveNodeForNormalization): NormalizedStep[];
8
+ export {};
9
+ //# sourceMappingURL=normalize.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"normalize.d.ts","sourceRoot":"","sources":["../../../../src/test-runner/parser/normalize.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAsB,MAAM,SAAS,CAAC;AAElE,UAAU,yBAAyB;IACjC,cAAc,CAAC,EAAE,MAAM,GAAG,KAAK,CAAC;CACjC;AAED,MAAM,MAAM,2BAA2B,GAAG,CACxC,IAAI,EAAE,MAAM,KACT,yBAAyB,GAAG,SAAS,CAAC;AAgE3C,wBAAgB,aAAa,CAC3B,KAAK,EAAE,OAAO,EACd,KAAK,SAAI,EACT,WAAW,CAAC,EAAE,2BAA2B,GACxC,cAAc,CAuDhB;AAED,wBAAgB,cAAc,CAC5B,KAAK,EAAE,OAAO,EACd,WAAW,CAAC,EAAE,2BAA2B,GACxC,cAAc,EAAE,CAKlB"}
@@ -0,0 +1,69 @@
1
+ export type DurationInput = number;
2
+ export interface StepMetaInput {
3
+ timeout?: DurationInput;
4
+ 'continue-on-error'?: boolean;
5
+ }
6
+ export interface NormalizedStepMeta {
7
+ /** Input adapter requests the legacy raw-result view, including unnamed values. */
8
+ captureResult?: boolean;
9
+ timeoutMs?: number;
10
+ continueOnError: boolean;
11
+ resultName?: string;
12
+ }
13
+ export type StepValue = string | Record<string, unknown>;
14
+ export type StepInput = Record<string, unknown>;
15
+ export interface CaseInput {
16
+ name?: string;
17
+ tags?: readonly string[];
18
+ steps: readonly StepInput[];
19
+ }
20
+ export interface WorkflowDocumentDefinition {
21
+ beforeAll?: readonly StepInput[];
22
+ beforeEach?: readonly StepInput[];
23
+ cases: readonly CaseDefinition[];
24
+ afterEach?: readonly StepInput[];
25
+ afterAll?: readonly StepInput[];
26
+ }
27
+ export interface CaseDefinition<TStep = StepInput> {
28
+ name: string;
29
+ tags?: readonly string[];
30
+ steps: readonly TStep[];
31
+ }
32
+ export interface NormalizedStep {
33
+ node: string;
34
+ input: Record<string, unknown>;
35
+ meta: NormalizedStepMeta;
36
+ }
37
+ /** Adapter-only policy; native Case inputs do not expose this switch. */
38
+ export type NormalizedCaseDefinition = CaseDefinition<NormalizedStep> & {
39
+ onFailure?: 'continue' | 'stop-document';
40
+ };
41
+ export interface WorkflowDocumentSource {
42
+ projectId: string;
43
+ projectName?: string;
44
+ sourcePath: string;
45
+ absolutePath: string;
46
+ /** Repeated occurrences of this path are distinct logical invocations. */
47
+ invocationIndex?: number;
48
+ }
49
+ export interface CollectedCase {
50
+ caseId: string;
51
+ projectId: string;
52
+ sourcePath: string;
53
+ caseIndex: number;
54
+ definition: NormalizedCaseDefinition;
55
+ }
56
+ export interface CollectedWorkflowDocument {
57
+ documentId: string;
58
+ projectId: string;
59
+ sourcePath: string;
60
+ lifecycle: CollectedDocumentLifecycle;
61
+ cases: readonly CollectedCase[];
62
+ }
63
+ export interface CollectedDocumentLifecycle {
64
+ beforeAll: readonly NormalizedStep[];
65
+ beforeEach: readonly NormalizedStep[];
66
+ afterEach: readonly NormalizedStep[];
67
+ afterAll: readonly NormalizedStep[];
68
+ }
69
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/test-runner/parser/types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,aAAa,GAAG,MAAM,CAAC;AAEnC,MAAM,WAAW,aAAa;IAC5B,OAAO,CAAC,EAAE,aAAa,CAAC;IACxB,mBAAmB,CAAC,EAAE,OAAO,CAAC;CAC/B;AAED,MAAM,WAAW,kBAAkB;IACjC,mFAAmF;IACnF,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,eAAe,EAAE,OAAO,CAAC;IACzB,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,MAAM,SAAS,GAAG,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;AAEzD,MAAM,MAAM,SAAS,GAAG,MAA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U,EAAE,MAAM,CAAC;IACnB,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,wBAAwB,CAAC;CACtC;AAED,MAAM,WAAW,yBAAyB;IACxC,UAAU,EAAE,MAAM,CAAC;IACnB,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,MAAM,CAAC;IACnB,SAAS,EAAE,0BAA0B,CAAC;IACtC,KAAK,EAAE,SAAS,aAAa,EAAE,CAAC;CACjC;AAED,MAAM,WAAW,0BAA0B;IACzC,SAAS,EAAE,SAAS,cAAc,EAAE,CAAC;IACrC,UAAU,EAAE,SAAS,cAAc,EAAE,CAAC;IACtC,SAAS,EAAE,SAAS,cAAc,EAAE,CAAC;IACrC,QAAQ,EAAE,SAAS,cAAc,EAAE,CAAC;CACrC"}
@@ -0,0 +1,75 @@
1
+ import type { NodeScopeTeardown, WorkflowDocumentRunResult } from './engine/types';
2
+ import type { WorkflowError } from './errors';
3
+ import type { NodeDefinition } from './node/types';
4
+ type Awaitable<T> = T | Promise<T>;
5
+ export type JsonPrimitive = string | number | boolean | null;
6
+ export type JsonValue = JsonPrimitive | readonly JsonValue[] | {
7
+ readonly [key: string]: JsonValue;
8
+ };
9
+ export interface TestFileSelection {
10
+ include: readonly string[];
11
+ exclude?: readonly string[];
12
+ }
13
+ export interface TestTagSelection {
14
+ include?: readonly string[];
15
+ exclude?: readonly string[];
16
+ }
17
+ export interface ExecutionProjectDefinition<TProjectContext = unknown> {
18
+ name: string;
19
+ setup?: ProjectSetupDefinition<TProjectContext>;
20
+ /** Project-local Nodes override global Nodes with the same name. */
21
+ nodes?: readonly NodeDefinition<any, any, TProjectContext>[];
22
+ files?: TestFileSelection;
23
+ tags?: TestTagSelection;
24
+ retry?: number;
25
+ variables?: Readonly<Record<string, JsonValue>>;
26
+ }
27
+ export interface ResolvedExecutionProject<TProjectContext = unknown> {
28
+ readonly projectId: string;
29
+ readonly name: string;
30
+ readonly setup?: ProjectSetupDefinition<TProjectContext>;
31
+ readonly files?: TestFileSelection;
32
+ readonly tags: Readonly<Required<TestTagSelection>>;
33
+ readonly retry: number;
34
+ readonly variables: Readonly<Record<string, JsonValue>>;
35
+ }
36
+ /** The document kernel does not consume selection rules or host setup. */
37
+ export type WorkflowExecutionProject = Pick<ResolvedExecutionProject, 'projectId' | 'name' | 'retry'>;
38
+ export interface ProjectSetupContext<TProjectContext = unknown> {
39
+ readonly project: ResolvedExecutionProject<TProjectContext>;
40
+ readonly env: Readonly<NodeJS.ProcessEnv>;
41
+ readonly signal: AbortSignal;
42
+ onTeardown(teardown: ProjectTeardown<TProjectContext>): void;
43
+ }
44
+ export interface ProjectTeardownContext<TProjectContext = unknown> {
45
+ readonly project: ResolvedExecutionProject<TProjectContext>;
46
+ readonly context: TProjectContext | undefined;
47
+ readonly status: 'success' | 'failed';
48
+ readonly setupError?: WorkflowError;
49
+ }
50
+ export type ProjectTeardown<TProjectContext = unknown> = (ctx: ProjectTeardownContext<TProjectContext>) => Awaitable<void>;
51
+ export interface ProjectSetupDefinition<TProjectContext = unknown> {
52
+ name: string;
53
+ setup(ctx: ProjectSetupContext<TProjectContext>): Awaitable<TProjectContext>;
54
+ }
55
+ export interface DocumentSetupContext<TContext = unknown> {
56
+ readonly project: WorkflowExecutionProject;
57
+ readonly projectContext: TContext | undefined;
58
+ readonly document: {
59
+ readonly documentId: string;
60
+ readonly documentRunId: string;
61
+ readonly sourcePath: string;
62
+ readonly attemptIndex: number;
63
+ };
64
+ readonly signal: AbortSignal;
65
+ /** Runs after authored afterAll steps and Node teardowns, including failed setup. */
66
+ onTeardown(teardown: NodeScopeTeardown): void;
67
+ }
68
+ export interface DocumentSetupDefinition<TContext = unknown> {
69
+ name: string;
70
+ setup(ctx: DocumentSetupContext<TContext>): Awaitable<TContext>;
71
+ /** Publishes completed facts after resource cleanup; failure never retries actions. */
72
+ onDocumentResult?(document: WorkflowDocumentRunResult, context: TContext | undefined): Awaitable<void>;
73
+ }
74
+ export {};
75
+ //# sourceMappingURL=project.d.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RunReportInput } from './types';
4
+ export declare function buildAgentTestRunReportDump(input: RunReportInput, agentDump: ReportActionDump, source: {
5
+ scopeId: string;
6
+ reportId: string;
7
+ sourcePath: string;
8
+ }): TestRunReportDump;
9
+ //# sourceMappingURL=agent-report.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"agent-report.d.ts","sourceRoot":"","sources":["../../../../src/test-runner/reporting/agent-report.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAC/D,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAEpD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAE9C,wBAAgB,2BAA2B,CACzC,KAAK,EAAE,cAAc,EACrB,SAAS,EAAE,gBAAgB,EAC3B,MAAM,EAAE;IAAE,OAAO,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAC;IAAC,UAAU,EAAE,MAAM,CAAA;CAAE,GAChE,iBAAiB,CAmBnB"}
@@ -0,0 +1,9 @@
1
+ import { type WorkflowExecutionRecord } from '../execution-record';
2
+ import type { RunReportInput } from './types';
3
+ /** Project complete invocations without changing their legacy/API state. */
4
+ export declare function executionRecordsToReportInput(records: readonly WorkflowExecutionRecord[], options: {
5
+ runId: string;
6
+ startedAt?: string;
7
+ endedAt?: string;
8
+ }): RunReportInput;
9
+ //# sourceMappingURL=execution-record.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"execution-record.d.ts","sourceRoot":"","sources":["../../../../src/test-runner/reporting/execution-record.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,uBAAuB,EAE7B,MAAM,qBAAqB,CAAC;AAC7B,OAAO,KAAK,EAAE,cAAc,EAAyB,MAAM,SAAS,CAAC;AAErE,4EAA4E;AAC5E,wBAAgB,6BAA6B,CAC3C,OAAO,EAAE,SAAS,uBAAuB,EAAE,EAC3C,OAAO,EAAE;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,SAAS,CAAC,EAAE,MAAM,CAAC;IAAC,OAAO,CAAC,EAAE,MAAM,CAAA;CAAE,GAC/D,cAAc,CA6FhB"}
@@ -0,0 +1,15 @@
1
+ import type { TestRunReportDump, TestRunReportMetrics } from '../../test-run-report';
2
+ import type { ReportFileAttributes } from '../../types';
3
+ export interface MergeTestRunReportSource {
4
+ reportId: string;
5
+ sourcePath: string;
6
+ attributes: ReportFileAttributes;
7
+ dump?: TestRunReportDump;
8
+ timing?: {
9
+ startedAt: string;
10
+ endedAt: string;
11
+ durationMs: number;
12
+ };
13
+ }
14
+ export declare function mergeTestRunReportDumps(sources: readonly MergeTestRunReportSource[], metrics: TestRunReportMetrics, runId: string): TestRunReportDump;
15
+ //# sourceMappingURL=merge-report.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"merge-report.d.ts","sourceRoot":"","sources":["../../../../src/test-runner/reporting/merge-report.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAEV,iBAAiB,EACjB,oBAAoB,EAErB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAC;AAExD,MAAM,WAAW,wBAAwB;IACvC,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,oBAAoB,CAAC;IACjC,IAAI,CAAC,EAAE,iBAAiB,CAAC;IACzB,MAAM,CAAC,EAAE;QAAE,SAAS,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,CAAC;QAAC,UAAU,EAAE,MAAM,CAAA;KAAE,CAAC;CACrE;AAgKD,wBAAgB,uBAAuB,CACrC,OAAO,EAAE,SAAS,wBAAwB,EAAE,EAC5C,OAAO,EAAE,oBAAoB,EAC7B,KAAK,EAAE,MAAM,GACZ,iBAAiB,CA2HnB"}
@@ -0,0 +1,6 @@
1
+ import type { TestRunReportError, TestRunReportValue } from '../../test-run-report';
2
+ export declare function sanitizeReportText(value: string, maximumLength?: number): string;
3
+ /** Convert arbitrary Node input/output to a bounded, JSON-safe display value. */
4
+ export declare function sanitizeReportValue(value: unknown): TestRunReportValue;
5
+ export declare function sanitizeReportError(error: unknown): TestRunReportError;
6
+ //# sourceMappingURL=sanitize.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sanitize.d.ts","sourceRoot":"","sources":["../../../../src/test-runner/reporting/sanitize.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,kBAAkB,EAClB,kBAAkB,EACnB,MAAM,uBAAuB,CAAC;AAmC/B,wBAAgB,kBAAkB,CAChC,KAAK,EAAE,MAAM,EACb,aAAa,SAAoB,GAChC,MAAM,CAIR;AAED,iFAAiF;AACjF,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,OAAO,GAAG,kBAAkB,CAgItE;AAED,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,OAAO,GAAG,kBAAkB,CA6BtE"}
@@ -0,0 +1,5 @@
1
+ import type { TestRunReportDump, TestRunReportSource, TestRunReportSourceIndex } from '../../test-run-report';
2
+ import type { RunReportInput } from './types';
3
+ export declare function collectTestRunReportSources(result: RunReportInput): TestRunReportSource[];
4
+ export declare function buildTestRunReportDump(result: RunReportInput, index: TestRunReportSourceIndex): TestRunReportDump;
5
+ //# sourceMappingURL=test-run-report.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"test-run-report.d.ts","sourceRoot":"","sources":["../../../../src/test-runner/reporting/test-run-report.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAOV,iBAAiB,EAEjB,mBAAmB,EACnB,wBAAwB,EAEzB,MAAM,uBAAuB,CAAC;AAW/B,OAAO,KAAK,EAAsB,cAAc,EAAE,MAAM,SAAS,CAAC;AA6YlE,wBAAgB,2BAA2B,CACzC,MAAM,EAAE,cAAc,GACrB,mBAAmB,EAAE,CAiCvB;AAED,wBAAgB,sBAAsB,CACpC,MAAM,EAAE,cAAc,EACtB,KAAK,EAAE,wBAAwB,GAC9B,iBAAiB,CA4DnB"}
@@ -0,0 +1,34 @@
1
+ import type { TestRunReportSummary } from '../../test-run-report';
2
+ import type { CaseRunOutcome, ProjectRuntimeResult, WorkflowDocumentRunResult } from '../engine/types';
3
+ /** Minimal report input: no CLI options, filesystem paths or exit codes. */
4
+ export interface RunReportCaseInput extends CaseRunOutcome {
5
+ documentId: string;
6
+ /** Required when the same logical document has multiple invocations. */
7
+ documentRunId?: string;
8
+ }
9
+ export interface RunReportProjectInput {
10
+ projectId: string;
11
+ name: string;
12
+ platform: string;
13
+ status: 'success' | 'failed';
14
+ retry: number;
15
+ lifecycle?: ProjectRuntimeResult;
16
+ cases: readonly RunReportCaseInput[];
17
+ documents: readonly WorkflowDocumentRunResult[];
18
+ collectionErrors: readonly {
19
+ sourcePath: string;
20
+ error: unknown;
21
+ }[];
22
+ }
23
+ export interface RunReportInput {
24
+ runId: string;
25
+ status: 'success' | 'failed';
26
+ startedAt: string;
27
+ endedAt: string;
28
+ durationMs: number;
29
+ summary: TestRunReportSummary;
30
+ projects: readonly RunReportProjectInput[];
31
+ /** Run-level infrastructure errors that do not belong to a test action. */
32
+ errors?: readonly unknown[];
33
+ }
34
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/test-runner/reporting/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,uBAAuB,CAAC;AAClE,OAAO,KAAK,EACV,cAAc,EACd,oBAAoB,EACpB,yBAAyB,EAC1B,MAAM,iBAAiB,CAAC;AAEzB,4EAA4E;AAC5E,MAAM,WAAW,kBAAmB,SAAQ,cAAc;IACxD,UAAU,EAAE,MAAM,CAAC;IACnB,wEAAwE;IACxE,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAED,MAAM,WAAW,qBAAqB;IACpC,SAAS,EAAE,MAAM,CAAC;IAClB,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,SAAS,GAAG,QAAQ,CAAC;IAC7B,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,CAAC,EAAE,oBAAoB,CAAC;IACjC,KAAK,EAAE,SAAS,kBAAkB,EAAE,CAAC;IACrC,SAAS,EAAE,SAAS,yBAAyB,EAAE,CAAC;IAChD,gBAAgB,EAAE,SAAS;QAAE,UAAU,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,OAAO,CAAA;KAAE,EAAE,CAAC;CACrE;AAED,MAAM,WAAW,cAAc;IAC7B,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,SAAS,GAAG,QAAQ,CAAC;IAC7B,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,EAAE,MAAM,CAAC;IACnB,OAAO,EAAE,oBAAoB,CAAC;IAC9B,QAAQ,EAAE,SAAS,qBAAqB,EAAE,CAAC;IAC3C,2EAA2E;IAC3E,MAAM,CAAC,EAAE,SAAS,OAAO,EAAE,CAAC;CAC7B"}
@@ -0,0 +1,4 @@
1
+ import { AsyncLocalStorage } from 'node:async_hooks';
2
+ export declare const supportsAsyncContext = true;
3
+ export declare const createExecutionContext: <T>() => AsyncLocalStorage<T>;
4
+ //# sourceMappingURL=execution-context.node.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"execution-context.node.d.ts","sourceRoot":"","sources":["../../../src/yaml/execution-context.node.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AAErD,eAAO,MAAM,oBAAoB,OAAO,CAAC;AACzC,eAAO,MAAM,sBAAsB,GAAI,CAAC,2BAAiC,CAAC"}
@@ -0,0 +1,6 @@
1
+ export declare const supportsAsyncContext = false;
2
+ export declare const createExecutionContext: <T>() => {
3
+ getStore: () => T | undefined;
4
+ run: <R>(_store: T, callback: () => R) => R;
5
+ };
6
+ //# sourceMappingURL=execution-context.stub.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"execution-context.stub.d.ts","sourceRoot":"","sources":["../../../src/yaml/execution-context.stub.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,oBAAoB,QAAQ,CAAC;AAC1C,eAAO,MAAM,sBAAsB,GAAI,CAAC;oBACxB,CAAC,GAAG,SAAS;UACrB,CAAC,UAAU,CAAC,YAAY,MAAM,CAAC,KAAG,CAAC;CACzC,CAAC"}
@@ -0,0 +1,17 @@
1
+ import { WorkflowError } from '../test-runner/errors';
2
+ import type { WorkflowExecutionRecord } from '../test-runner/execution-record';
3
+ /** Every entry gets its own async frame, shared across CJS and ESM copies. */
4
+ export declare function runInYamlExecutionContext<T>(callback: () => Promise<T>): Promise<T>;
5
+ export declare const currentYamlSignal: (agent: object) => AbortSignal | undefined;
6
+ export declare function enterYamlAction(agent: object, signal: AbortSignal): () => void;
7
+ export declare class YamlExecutionOwnershipError extends WorkflowError {
8
+ }
9
+ /** Nested runs borrow ownership. They never finalize or drain their parent. */
10
+ export declare function enterYamlExecution(agent: object, options?: {
11
+ allowIndependentOverlap?: boolean;
12
+ }): {
13
+ isRoot: boolean;
14
+ children: WorkflowExecutionRecord[];
15
+ finish: (record?: WorkflowExecutionRecord) => void;
16
+ };
17
+ //# sourceMappingURL=execution-session.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"execution-session.d.ts","sourceRoot":"","sources":["../../../src/yaml/execution-session.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AACtD,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,iCAAiC,CAAC;AA8B/E,8EAA8E;AAC9E,wBAAgB,yBAAyB,CAAC,CAAC,EACzC,QAAQ,EAAE,MAAM,OAAO,CAAC,CAAC,CAAC,GACzB,OAAO,CAAC,CAAC,CAAC,CAYZ;AAED,eAAO,MAAM,iBAAiB,GAAI,OAAO,MAAM,KAAG,WAAW,GAAG,SAO/D,CAAC;AAEF,wBAAgB,eAAe,CAC7B,KAAK,EAAE,MAAM,EACb,MAAM,EAAE,WAAW,GAClB,MAAM,IAAI,CAeZ;AAED,qBAAa,2BAA4B,SAAQ,aAAa;CAAG;AAEjE,+EAA+E;AAC/E,wBAAgB,kBAAkB,CAChC,KAAK,EAAE,MAAM,EACb,OAAO,GAAE;IAAE,uBAAuB,CAAC,EAAE,OAAO,CAAA;CAAO;;;sBA3EnC,uBAAuB,KAAG,IAAI;EA0H/C"}
@@ -1,5 +1,5 @@
1
1
  export * from '../yaml';
2
2
  export * from './player';
3
3
  export * from './builder';
4
- export * from './utils';
4
+ export { type WebTargetSource, type ResolvedWebTarget, type WebTargetConfig, resolveWebTarget, resolveYamlOutputConfig, interpolateEnvVars, parseYamlScript, buildDetailedLocateParam, buildDetailedLocateParamAndRestParams, } from './utils';
5
5
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/yaml/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC;AACxB,cAAc,UAAU,CAAC;AACzB,cAAc,WAAW,CAAC;AAC1B,cAAc,SAAS,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/yaml/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC;AACxB,cAAc,UAAU,CAAC;AACzB,cAAc,WAAW,CAAC;AAC1B,OAAO,EACL,KAAK,eAAe,EACpB,KAAK,iBAAiB,EACtB,KAAK,eAAe,EACpB,gBAAgB,EAChB,uBAAuB,EACvB,kBAAkB,EAClB,eAAe,EACf,wBAAwB,EACxB,qCAAqC,GACtC,MAAM,SAAS,CAAC"}
@@ -0,0 +1,24 @@
1
+ import type { MidsceneYamlScript } from '../types';
2
+ import type { CollectedWorkflowDocument, WorkflowDocumentExecutionResult, WorkflowExecutionRecord } from '../test-runner';
3
+ interface CreateLegacyYamlExecutionRecordOptions {
4
+ runId: string;
5
+ attemptIndex: number;
6
+ projectName?: string;
7
+ script: MidsceneYamlScript;
8
+ document: CollectedWorkflowDocument;
9
+ startedAt: Date;
10
+ endedAt: Date;
11
+ execution?: WorkflowDocumentExecutionResult;
12
+ setupError?: unknown;
13
+ executionError?: unknown;
14
+ cleanupErrors: readonly unknown[];
15
+ aborted: boolean;
16
+ publicationErrors: readonly unknown[];
17
+ outputs: Readonly<Record<string, unknown>>;
18
+ reportFile?: string | null;
19
+ children?: readonly WorkflowExecutionRecord[];
20
+ }
21
+ /** Convert compatibility-host state into the shared immutable run record. */
22
+ export declare function createLegacyYamlExecutionRecord(options: CreateLegacyYamlExecutionRecordOptions): WorkflowExecutionRecord;
23
+ export {};
24
+ //# sourceMappingURL=legacy-yaml-execution-record.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"legacy-yaml-execution-record.d.ts","sourceRoot":"","sources":["../../../src/yaml/legacy-yaml-execution-record.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAClD,OAAO,KAAK,EACV,yBAAyB,EACzB,+BAA+B,EAC/B,uBAAuB,EACxB,MAAM,gBAAgB,CAAC;AAExB,UAAU,sCAAsC;IAC9C,KAAK,EAAE,MAAM,CAAC;IACd,YAAY,EAAE,MAAM,CAAC;IACrB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,MAAM,EAAE,kBAAkB,CAAC;IAC3B,QAAQ,EAAE,yBAAyB,CAAC;IACpC,SAAS,EAAE,IAAI,CAAC;IAChB,OAAO,EAAE,IAAI,CAAC;IACd,SAAS,CAAC,EAAE,+BAA+B,CAAC;IAC5C,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,aAAa,EAAE,SAAS,OAAO,EAAE,CAAC;IAClC,OAAO,EAAE,OAAO,CAAC;IACjB,iBAAiB,EAAE,SAAS,OAAO,EAAE,CAAC;IACtC,OAAO,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC;IAC3C,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,QAAQ,CAAC,EAAE,SAAS,uBAAuB,EAAE,CAAC;CAC/C;AAeD,6EAA6E;AAC7E,wBAAgB,+BAA+B,CAC7C,OAAO,EAAE,sCAAsC,GAC9C,uBAAuB,CAyCzB"}
@@ -0,0 +1,19 @@
1
+ import type { Agent } from '../agent/agent';
2
+ import type { MidsceneYamlScript } from '../types';
3
+ import type { WorkflowExecutionRecord } from '../test-runner';
4
+ interface PublishLegacyYamlReportOptions {
5
+ agent: Agent | null;
6
+ record: WorkflowExecutionRecord;
7
+ runId: string;
8
+ script: MidsceneYamlScript;
9
+ scriptPath?: string;
10
+ fallbackReportFileName?: string;
11
+ }
12
+ export interface PublishedLegacyYamlReport {
13
+ record: WorkflowExecutionRecord;
14
+ reportFile?: string | null;
15
+ }
16
+ /** Report publication is a host projection, not a ScriptPlayer state concern. */
17
+ export declare function publishLegacyYamlReport(options: PublishLegacyYamlReportOptions): Promise<PublishedLegacyYamlReport>;
18
+ export {};
19
+ //# sourceMappingURL=legacy-yaml-report.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"legacy-yaml-report.d.ts","sourceRoot":"","sources":["../../../src/yaml/legacy-yaml-report.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAGlD,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,gBAAgB,CAAC;AAK9D,UAAU,8BAA8B;IACtC,KAAK,EAAE,KAAK,GAAG,IAAI,CAAC;IACpB,MAAM,EAAE,uBAAuB,CAAC;IAChC,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,kBAAkB,CAAC;IAC3B,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,sBAAsB,CAAC,EAAE,MAAM,CAAC;CACjC;AAED,MAAM,WAAW,yBAAyB;IACxC,MAAM,EAAE,uBAAuB,CAAC;IAChC,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CAC5B;AAED,iFAAiF;AACjF,wBAAsB,uBAAuB,CAC3C,OAAO,EAAE,8BAA8B,GACtC,OAAO,CAAC,yBAAyB,CAAC,CAmCpC"}
@@ -0,0 +1,23 @@
1
+ import type { Agent } from '../agent/agent';
2
+ import type { DeviceAction, MidsceneYamlScript, MidsceneYamlTask } from '../types';
3
+ import { type CaseRunOutcome, type CollectedWorkflowDocument, type RunWorkflowDocumentOptions, type WorkflowDocumentExecutionResult } from '../test-runner';
4
+ type SetLegacyYamlResult = (key: string | undefined, value: any) => void | Promise<void>;
5
+ export type LegacyYamlRuntimeRunOptions = Omit<RunWorkflowDocumentOptions<Agent>, 'projectContext' | 'resolveCaseReportScopeId' | 'resolveNode' | 'retry'> & {
6
+ document?: CollectedWorkflowDocument;
7
+ };
8
+ export interface LegacyYamlRuntimeOptions {
9
+ agent: Agent;
10
+ actionSpace: readonly DeviceAction[];
11
+ sourcePath?: string;
12
+ setResult: SetLegacyYamlResult;
13
+ }
14
+ export interface LegacyYamlRuntime {
15
+ /** Wait before releasing an Agent whose non-cooperative action was aborted. */
16
+ waitForIdle(): Promise<void>;
17
+ runScript(script: MidsceneYamlScript, options?: LegacyYamlRuntimeRunOptions): Promise<WorkflowDocumentExecutionResult>;
18
+ runTask(task: MidsceneYamlTask, taskIndex: number, options?: LegacyYamlRuntimeRunOptions): Promise<WorkflowDocumentExecutionResult>;
19
+ }
20
+ export declare const createLegacyYamlRuntime: (options: LegacyYamlRuntimeOptions) => LegacyYamlRuntime;
21
+ export declare const legacyYamlOutcomeError: (outcome: CaseRunOutcome) => Error;
22
+ export {};
23
+ //# sourceMappingURL=legacy-yaml-runtime.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":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