reeval 0.18.0 → 0.19.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 (380) hide show
  1. package/README.md +1 -1
  2. package/THIRD_PARTY_NOTICES.md +5 -5
  3. package/dist/{adapter-CptK032x.js → adapter-C8xPuXYq.js} +5 -4
  4. package/dist/adapter-C8xPuXYq.js.map +1 -0
  5. package/dist/{agent-B63OzUX9.js → agent-CBoLndM7.js} +30 -10
  6. package/dist/{agent-B63OzUX9.js.map → agent-CBoLndM7.js.map} +1 -1
  7. package/dist/agents-C6zhkxp3.js +1151 -0
  8. package/dist/agents-C6zhkxp3.js.map +1 -0
  9. package/dist/{app-files-sgqwfjtn.js → app-files-DT5mJyV4.js} +3 -3
  10. package/dist/app-files-DT5mJyV4.js.map +1 -0
  11. package/dist/assemble-UPCRrtOz.js +1 -0
  12. package/dist/{assemble-Me7Whp-y.js → assemble-t6h018An.js} +152 -129
  13. package/dist/assemble-t6h018An.js.map +1 -0
  14. package/dist/{attempt-Dp7Wtm8M.js → attempt-CAdlwlNu.js} +2 -2
  15. package/dist/{attempt-Dp7Wtm8M.js.map → attempt-CAdlwlNu.js.map} +1 -1
  16. package/dist/{attempt-host-Cik0SoIn.js → attempt-host-CIm1-11m.js} +6 -6
  17. package/dist/{attempt-host-Cik0SoIn.js.map → attempt-host-CIm1-11m.js.map} +1 -1
  18. package/dist/boat-BjLqFJIZ.js +108 -0
  19. package/dist/boat-BjLqFJIZ.js.map +1 -0
  20. package/dist/boat-CJCtzfB1.js +322 -0
  21. package/dist/boat-CJCtzfB1.js.map +1 -0
  22. package/dist/bridge/index.mjs +300 -78
  23. package/dist/capture-DoxFUN3J.js +1 -0
  24. package/dist/{capture-C3RmjPph.js → capture-iBzFiC0j.js} +27 -25
  25. package/dist/capture-iBzFiC0j.js.map +1 -0
  26. package/dist/cases-Dy0mifal.js +1 -0
  27. package/dist/cases-z9E6DCd5.js +639 -0
  28. package/dist/cases-z9E6DCd5.js.map +1 -0
  29. package/dist/{cli-BBOlXKPG.js → cli-20Fpvs5H.js} +442 -707
  30. package/dist/cli-20Fpvs5H.js.map +1 -0
  31. package/dist/{cli-spec-DZ0bnP0_.js → cli-spec-Dsr79Qy1.js} +38 -11
  32. package/dist/cli-spec-Dsr79Qy1.js.map +1 -0
  33. package/dist/cli.js +2 -2
  34. package/dist/{client-tZ2WBDxf.js → client-KM4C5r5_.js} +93 -3
  35. package/dist/client-KM4C5r5_.js.map +1 -0
  36. package/dist/{command-qGS802uX.js → command-B5OyHpOu.js} +21 -80
  37. package/dist/command-B5OyHpOu.js.map +1 -0
  38. package/dist/{command-DhiwsZl1.js → command-BLNVDiIg.js} +9 -9
  39. package/dist/{command-DhiwsZl1.js.map → command-BLNVDiIg.js.map} +1 -1
  40. package/dist/{command-fO0BFsTq.js → command-CRh-cb6Z.js} +37 -37
  41. package/dist/command-CRh-cb6Z.js.map +1 -0
  42. package/dist/{command-CFQ9c1hk.js → command-aUJvENwy.js} +16 -16
  43. package/dist/command-aUJvENwy.js.map +1 -0
  44. package/dist/{commands-CC60TOT5.js → commands-CWy-WndG.js} +186 -85
  45. package/dist/commands-CWy-WndG.js.map +1 -0
  46. package/dist/{commands-xYTMNTPv.js → commands-CfdBX-mc.js} +1 -1
  47. package/dist/{config-C2UtS9vy.js → config-B9mB1kF5.js} +261 -1708
  48. package/dist/config-B9mB1kF5.js.map +1 -0
  49. package/dist/{context-BajfiH0S.js → context-Bkv3ndjq.js} +3 -2
  50. package/dist/context-Bkv3ndjq.js.map +1 -0
  51. package/dist/{cost-BuVDamui.js → cost-BdRgySQl.js} +2 -2
  52. package/dist/{cost-BuVDamui.js.map → cost-BdRgySQl.js.map} +1 -1
  53. package/dist/cost-Cr26Alhq.js +1 -0
  54. package/dist/{cursor-catalog-BTK_apL-.js → cursor-catalog-BSn9xjmo.js} +3 -3
  55. package/dist/{cursor-catalog-BTK_apL-.js.map → cursor-catalog-BSn9xjmo.js.map} +1 -1
  56. package/dist/db-P2fXw4nx.js +2 -0
  57. package/dist/{db-C5SZ0510.js → db-zgC1tvKB.js} +130 -84
  58. package/dist/db-zgC1tvKB.js.map +1 -0
  59. package/dist/debug-CF4p4Lp_.js +1 -0
  60. package/dist/{debug-B5jDImcW.js → debug-CIXzB4wK.js} +2 -2
  61. package/dist/{debug-B5jDImcW.js.map → debug-CIXzB4wK.js.map} +1 -1
  62. package/dist/{default-effort-FEidNAIi.js → default-effort-BAy8ixd1.js} +1 -1
  63. package/dist/{default-effort-BVmx7r7L.js → default-effort-DGhQmu95.js} +4 -4
  64. package/dist/{default-effort-BVmx7r7L.js.map → default-effort-DGhQmu95.js.map} +1 -1
  65. package/dist/{dist-ByYk_wAs.js → dist-CAFD1yfv.js} +28 -6
  66. package/dist/dist-CAFD1yfv.js.map +1 -0
  67. package/dist/{docker-B2F8-PGC.js → docker-Cqw-CyWz.js} +3 -3
  68. package/dist/{docker-B2F8-PGC.js.map → docker-Cqw-CyWz.js.map} +1 -1
  69. package/dist/{docker-Dto8ROCq.js → docker-DAMnm3L9.js} +103 -73
  70. package/dist/docker-DAMnm3L9.js.map +1 -0
  71. package/dist/{docker-BlSopHpZ.js → docker-Dr4XeDc8.js} +1 -1
  72. package/dist/{doctor-BcvfKpBX.js → doctor-B2PohneB.js} +84 -27
  73. package/dist/doctor-B2PohneB.js.map +1 -0
  74. package/dist/{environment-CC1RV21n.js → environment-DB8o3hGi.js} +79 -39
  75. package/dist/environment-DB8o3hGi.js.map +1 -0
  76. package/dist/{errors-BQV__TzH.js → errors-BZgLSZtV.js} +2 -2
  77. package/dist/{errors-BQV__TzH.js.map → errors-BZgLSZtV.js.map} +1 -1
  78. package/dist/{eval-source-CzxdgFBW.js → eval-source-D3sbAzt-.js} +10 -10
  79. package/dist/{eval-source-CzxdgFBW.js.map → eval-source-D3sbAzt-.js.map} +1 -1
  80. package/dist/{evaluate-DToSB2bt.d.ts → evaluate-COdzf7Hl.d.ts} +17 -26
  81. package/dist/{evaluate-NTNJ8T9H.js → evaluate-CwKeN_fo.js} +377 -142
  82. package/dist/evaluate-CwKeN_fo.js.map +1 -0
  83. package/dist/files-B4KQUiM7.js +1 -0
  84. package/dist/files-BEwfjD8J.js +64 -0
  85. package/dist/files-BEwfjD8J.js.map +1 -0
  86. package/dist/{files-DsXULUi5.js → files-BRzV7aPh.js} +5 -5
  87. package/dist/{files-DsXULUi5.js.map → files-BRzV7aPh.js.map} +1 -1
  88. package/dist/{files-aAzoGNCB.js → files-BiFU16BW.js} +5 -5
  89. package/dist/{files-aAzoGNCB.js.map → files-BiFU16BW.js.map} +1 -1
  90. package/dist/files-C1Rk9FYA.js +1 -0
  91. package/dist/files-C3mCC8Mn.js +1 -0
  92. package/dist/{files-CZXrkPja.js → files-Cl7BQ5gE.js} +54 -13
  93. package/dist/{files-CZXrkPja.js.map → files-Cl7BQ5gE.js.map} +1 -1
  94. package/dist/{files-BGlHnC46.js → files-DgXyaAg6.js} +2 -2
  95. package/dist/{files-BGlHnC46.js.map → files-DgXyaAg6.js.map} +1 -1
  96. package/dist/{files-p-uTdOjA.js → files-DlQshsks.js} +3 -2
  97. package/dist/files-DlQshsks.js.map +1 -0
  98. package/dist/files-DnlA1A7N.js +1 -0
  99. package/dist/gate-CgYdaprG.js +49 -0
  100. package/dist/gate-CgYdaprG.js.map +1 -0
  101. package/dist/gateway.d.ts +1 -1
  102. package/dist/{git-C1MB5bjr.js → git-fDiJ8UIV.js} +2 -2
  103. package/dist/{git-C1MB5bjr.js.map → git-fDiJ8UIV.js.map} +1 -1
  104. package/dist/{harness-DGsRZDSo.js → harness-C2berMiM.js} +3 -3
  105. package/dist/{harness-DGsRZDSo.js.map → harness-C2berMiM.js.map} +1 -1
  106. package/dist/{harness-DYSC4zMh.js → harness-DXv2gnaT.js} +4 -2
  107. package/dist/harness-DXv2gnaT.js.map +1 -0
  108. package/dist/harness.d.ts +1 -1
  109. package/dist/harness.js +1 -1
  110. package/dist/{ids-DuK6xl4w.js → ids-C_advdJA.js} +3 -8
  111. package/dist/ids-C_advdJA.js.map +1 -0
  112. package/dist/{images-CNayXCp2.js → images-BNgcR77K.js} +98 -10
  113. package/dist/images-BNgcR77K.js.map +1 -0
  114. package/dist/index.d.ts +23 -3
  115. package/dist/index.js +5 -5
  116. package/dist/init-4RPeD-K-.js +1 -0
  117. package/dist/{init-D5HtmyMI.js → init-DbuZVRrW.js} +7 -6
  118. package/dist/init-DbuZVRrW.js.map +1 -0
  119. package/dist/{ink-list-Ca-5dunO.js → ink-list-BpfidQ1h.js} +121 -31
  120. package/dist/ink-list-BpfidQ1h.js.map +1 -0
  121. package/dist/{invocations-DrGXF9dT.js → invocations-CxGNOlh0.js} +3 -3
  122. package/dist/{invocations-DrGXF9dT.js.map → invocations-CxGNOlh0.js.map} +1 -1
  123. package/dist/judge-COMXT1Hx.js +230 -0
  124. package/dist/judge-COMXT1Hx.js.map +1 -0
  125. package/dist/judge.d.ts +1 -1
  126. package/dist/judge.js +1 -1
  127. package/dist/{judgments-m-mb0zv8.js → judgments-CzgpsTqv.js} +2 -2
  128. package/dist/{judgments-m-mb0zv8.js.map → judgments-CzgpsTqv.js.map} +1 -1
  129. package/dist/kinds-C1oY3qyC.js +697 -0
  130. package/dist/kinds-C1oY3qyC.js.map +1 -0
  131. package/dist/{summary-Uzc9osfV.js → layout-Cm85tQYk.js} +39 -150
  132. package/dist/layout-Cm85tQYk.js.map +1 -0
  133. package/dist/list-DuThsE28.js +1348 -0
  134. package/dist/list-DuThsE28.js.map +1 -0
  135. package/dist/live-CJCK11nh.js +1 -0
  136. package/dist/{live-B71o2TkX.js → live-CgYbO4Te.js} +6 -4
  137. package/dist/{live-B71o2TkX.js.map → live-CgYbO4Te.js.map} +1 -1
  138. package/dist/{live-uRURFDMZ.js → live-CnGrRM6j.js} +7 -7
  139. package/dist/{live-uRURFDMZ.js.map → live-CnGrRM6j.js.map} +1 -1
  140. package/dist/{matchers-Cs8aDqdU.js → matchers-CXLn-1jm.js} +3 -2
  141. package/dist/{matchers-Cs8aDqdU.js.map → matchers-CXLn-1jm.js.map} +1 -1
  142. package/dist/{model-CXVVB4RK.js → model-047Dcd-a.js} +1 -1
  143. package/dist/model-Cv4GuTsZ.js +1 -0
  144. package/dist/{model-1L19Zukh.js → model-CwwkrCb7.js} +5 -5
  145. package/dist/{model-1L19Zukh.js.map → model-CwwkrCb7.js.map} +1 -1
  146. package/dist/{model-BxBWFOZn.js → model-DJjLw-0r.js} +5 -5
  147. package/dist/{model-BxBWFOZn.js.map → model-DJjLw-0r.js.map} +1 -1
  148. package/dist/{model-Ce9l9_rF.js → model-V3mMXp6x.js} +203 -313
  149. package/dist/model-V3mMXp6x.js.map +1 -0
  150. package/dist/{node-DhIRSrrK.js → node-D7pAU--0.js} +14 -10
  151. package/dist/node-D7pAU--0.js.map +1 -0
  152. package/dist/{opencode-providers-Co7plCea.js → opencode-providers-BGiXt8_B.js} +104 -35
  153. package/dist/opencode-providers-BGiXt8_B.js.map +1 -0
  154. package/dist/{openrouter-models-DNvLRYM7.js → openrouter-models-Cw1z8-sq.js} +2 -2
  155. package/dist/{openrouter-models-DNvLRYM7.js.map → openrouter-models-Cw1z8-sq.js.map} +1 -1
  156. package/dist/options-CHubslQf.js +1 -0
  157. package/dist/{gate-Cp_pQoEe.js → pairs-BGb134Vu.js} +2 -48
  158. package/dist/pairs-BGb134Vu.js.map +1 -0
  159. package/dist/{patch-ug5HpMOj.js → patch-DH4e_Gkd.js} +2 -2
  160. package/dist/{patch-ug5HpMOj.js.map → patch-DH4e_Gkd.js.map} +1 -1
  161. package/dist/plain-BYUf_fUV.js +267 -0
  162. package/dist/plain-BYUf_fUV.js.map +1 -0
  163. package/dist/{plan-DqnzfDH1.js → plan-Cgq9NCEX.js} +110 -39
  164. package/dist/plan-Cgq9NCEX.js.map +1 -0
  165. package/dist/{plugins-B2KQ0y3P.js → plugins-BkmPxDiY.js} +10 -267
  166. package/dist/plugins-BkmPxDiY.js.map +1 -0
  167. package/dist/preflight-4gWSy0Pe.js +1 -0
  168. package/dist/{preflight-DyzmvK7i.js → preflight-BElE_q0u.js} +16 -9
  169. package/dist/preflight-BElE_q0u.js.map +1 -0
  170. package/dist/preflight-CtlloeOQ.js +68 -0
  171. package/dist/preflight-CtlloeOQ.js.map +1 -0
  172. package/dist/{preflight-DVXEvzFU.js → preflight-R-InZCQb.js} +1 -1
  173. package/dist/{prepare-21WMQZyt.js → prepare-C7f5mPl5.js} +9 -9
  174. package/dist/{prepare-21WMQZyt.js.map → prepare-C7f5mPl5.js.map} +1 -1
  175. package/dist/{prepare-BcSRa7-3.js → prepare-CzkAdbXm.js} +2 -2
  176. package/dist/{prices-DYJA0tJN.js → prices-5m3SzMZ3.js} +2 -2
  177. package/dist/{prices-DYJA0tJN.js.map → prices-5m3SzMZ3.js.map} +1 -1
  178. package/dist/{provenance-iRxjp4Pu.js → provenance-zsc4--dP.js} +4 -3
  179. package/dist/provenance-zsc4--dP.js.map +1 -0
  180. package/dist/provider-BnUoz4KB.js +1 -0
  181. package/dist/{provider-DZd8t_XW.js → provider-BxzZq3Th.js} +2 -2
  182. package/dist/{provider-DZd8t_XW.js.map → provider-BxzZq3Th.js.map} +1 -1
  183. package/dist/{providers-vXMXuwn-.js → providers-B8xYMeah.js} +152 -9
  184. package/dist/providers-B8xYMeah.js.map +1 -0
  185. package/dist/providers-CVu8e0xS.js +1 -0
  186. package/dist/{query-BhaKQ07P.js → query-Bb3SYICk.js} +2 -2
  187. package/dist/{query-BhaKQ07P.js.map → query-Bb3SYICk.js.map} +1 -1
  188. package/dist/query-DIfkUcPh.js +1 -0
  189. package/dist/{questions-BzdLdV3C.js → questions-CWlR9ffu.js} +9 -9
  190. package/dist/{questions-BzdLdV3C.js.map → questions-CWlR9ffu.js.map} +1 -1
  191. package/dist/{record-DhzwkSXc.js → record-6IUzwP9K.js} +5 -3
  192. package/dist/record-6IUzwP9K.js.map +1 -0
  193. package/dist/{remarks-NMgPd30U.js → remarks-DPCONFxZ.js} +71 -50
  194. package/dist/remarks-DPCONFxZ.js.map +1 -0
  195. package/dist/{remarks-CauU408t.js → remarks-vtkPmQb9.js} +115 -35
  196. package/dist/remarks-vtkPmQb9.js.map +1 -0
  197. package/dist/{remote-Dwy3fyo3.js → remote-BgYWqogI.js} +6 -6
  198. package/dist/{remote-Dwy3fyo3.js.map → remote-BgYWqogI.js.map} +1 -1
  199. package/dist/{resolve-B1zMnPwK.js → resolve-Do0ZaYH6.js} +10 -9
  200. package/dist/resolve-Do0ZaYH6.js.map +1 -0
  201. package/dist/resolve-amw_2Odz.js +1 -0
  202. package/dist/{results-CfC0id_u.js → results-JyuM64gy.js} +6 -6
  203. package/dist/{results-CfC0id_u.js.map → results-JyuM64gy.js.map} +1 -1
  204. package/dist/{resume-Dkhrpjow.js → resume-AW5oXzUc.js} +169 -27
  205. package/dist/resume-AW5oXzUc.js.map +1 -0
  206. package/dist/retry-ChzISxmy.js +105 -0
  207. package/dist/retry-ChzISxmy.js.map +1 -0
  208. package/dist/{runtime-DcvQcr36.js → runtime-BpW1f1Mx.js} +26 -7
  209. package/dist/runtime-BpW1f1Mx.js.map +1 -0
  210. package/dist/sandbox/boat.d.ts +26 -0
  211. package/dist/sandbox/boat.js +37 -0
  212. package/dist/sandbox/boat.js.map +1 -0
  213. package/dist/{sandbox-8zCrtuCf.js → sandbox-kSgr7vo5.js} +31 -3
  214. package/dist/sandbox-kSgr7vo5.js.map +1 -0
  215. package/dist/sandbox.d.ts +20 -2
  216. package/dist/sandbox.js +1 -1
  217. package/dist/server-2_gUnVvf.js +1 -0
  218. package/dist/{server-Dplq8g0r.js → server-Cn8VqO9S.js} +9 -9
  219. package/dist/{server-Dplq8g0r.js.map → server-Cn8VqO9S.js.map} +1 -1
  220. package/dist/{shared-ogqPJ0uo.js → shared-Cfi45Bvy.js} +9 -2
  221. package/dist/shared-Cfi45Bvy.js.map +1 -0
  222. package/dist/slug-IHh3f770.js +136 -0
  223. package/dist/slug-IHh3f770.js.map +1 -0
  224. package/dist/source-CY3etKzw.js +1 -0
  225. package/dist/{source-NWHqn5-o.js → source-CYOhR98B.js} +2 -2
  226. package/dist/{source-NWHqn5-o.js.map → source-CYOhR98B.js.map} +1 -1
  227. package/dist/src-6Zzyg4Qd.js +2 -0
  228. package/dist/{src-B9oE_mNS.js → src-BDhcPtnI.js} +2 -2
  229. package/dist/{src-B-L8O1Ld.js → src-BNQznj4z.js} +2 -2
  230. package/dist/{src-B-L8O1Ld.js.map → src-BNQznj4z.js.map} +1 -1
  231. package/dist/src-BRMsk9nh.js +2 -0
  232. package/dist/{src-BQXdf-Gw.js → src-CV_7DkPa.js} +47 -45
  233. package/dist/{src-BQXdf-Gw.js.map → src-CV_7DkPa.js.map} +1 -1
  234. package/dist/{src-KlDOGD0B.js → src-Cb2MWozp.js} +3 -1
  235. package/dist/{src-KlDOGD0B.js.map → src-Cb2MWozp.js.map} +1 -1
  236. package/dist/{src-BQ6BiXoc.js → src-Ck2r_EMT.js} +607 -72
  237. package/dist/src-Ck2r_EMT.js.map +1 -0
  238. package/dist/{src-HTG2SoNz.js → src-DAzaCTcN.js} +2 -2
  239. package/dist/{src-HTG2SoNz.js.map → src-DAzaCTcN.js.map} +1 -1
  240. package/dist/src-DB7N8TYJ.js +2 -0
  241. package/dist/src-DPDaAYwh.js +2 -0
  242. package/dist/{src-CUpoVVb8.js → src-Dbk19BiP.js} +2 -2
  243. package/dist/src-DtodMT59.js +1 -0
  244. package/dist/{src-uluei5nU.js → src-DvGns8cz.js} +2 -2
  245. package/dist/{src-uluei5nU.js.map → src-DvGns8cz.js.map} +1 -1
  246. package/dist/{src-B_igzM1O.js → src-Dw79VLa3.js} +3 -1
  247. package/dist/{src-B_igzM1O.js.map → src-Dw79VLa3.js.map} +1 -1
  248. package/dist/{src-D5t4OiRt.js → src-KxS91P7L.js} +3 -1
  249. package/dist/{src-D5t4OiRt.js.map → src-KxS91P7L.js.map} +1 -1
  250. package/dist/src-T-OeuJLr.js +2 -0
  251. package/dist/{src-BvM0jWuZ.js → src-YvblOrBU.js} +2 -2
  252. package/dist/{src-BvM0jWuZ.js.map → src-YvblOrBU.js.map} +1 -1
  253. package/dist/src-zntEDlnx.js +3 -0
  254. package/dist/{state-DDCGUhva.js → state-BOLt8pJg.js} +17 -17
  255. package/dist/{state-DDCGUhva.js.map → state-BOLt8pJg.js.map} +1 -1
  256. package/dist/state-kimtIhBP.js +1 -0
  257. package/dist/suite-CKBa6MKt.js +2 -0
  258. package/dist/{suite-M8_7xio7.js → suite-COglUhPd.js} +70 -92
  259. package/dist/suite-COglUhPd.js.map +1 -0
  260. package/dist/summary-DU5zaibx.js +148 -0
  261. package/dist/summary-DU5zaibx.js.map +1 -0
  262. package/dist/tart-BTVXp8rz.js +373 -0
  263. package/dist/tart-BTVXp8rz.js.map +1 -0
  264. package/dist/tart-cli-BIC9HqPg.js +37 -0
  265. package/dist/tart-cli-BIC9HqPg.js.map +1 -0
  266. package/dist/tart-cli-BMrkmBjI.js +1 -0
  267. package/dist/tart-images-DZ_Mbh-g.js +233 -0
  268. package/dist/tart-images-DZ_Mbh-g.js.map +1 -0
  269. package/dist/tart-ref-7Qv3cm3B.js +1 -0
  270. package/dist/tart-ref-DYZijjrU.js +55 -0
  271. package/dist/tart-ref-DYZijjrU.js.map +1 -0
  272. package/dist/testing.d.ts +2 -2
  273. package/dist/testing.js +4 -4
  274. package/dist/trace-Dx2NBE1O.js +311 -0
  275. package/dist/trace-Dx2NBE1O.js.map +1 -0
  276. package/dist/traits-DKnYkqeK.js +66 -0
  277. package/dist/traits-DKnYkqeK.js.map +1 -0
  278. package/dist/{transcript-Cg4SeqRX.js → transcript-CCf07UmU.js} +2 -2
  279. package/dist/{transcript-Cg4SeqRX.js.map → transcript-CCf07UmU.js.map} +1 -1
  280. package/dist/{types-C4OkYhZg.js → types-C2mLpph3.js} +3 -2
  281. package/dist/types-C2mLpph3.js.map +1 -0
  282. package/dist/{types-DGvexkcp.d.ts → types-DBwFsGem.d.ts} +352 -76
  283. package/dist/{judge-DYOF69Oe.js → vercel-CGlSBv63.js} +3 -229
  284. package/dist/vercel-CGlSBv63.js.map +1 -0
  285. package/dist/{vertex-BLQMayc1.js → vertex-Eb2wqahk.js} +2 -2
  286. package/dist/{vertex-BLQMayc1.js.map → vertex-Eb2wqahk.js.map} +1 -1
  287. package/dist/vertex-O88TCwgY.js +1 -0
  288. package/dist/view/index.d.ts +101 -58
  289. package/dist/view/index.js +9 -8
  290. package/dist/{views-BISrsIjw.js → views-DAIiLiV3.js} +7 -6
  291. package/dist/views-DAIiLiV3.js.map +1 -0
  292. package/dist/views-DtRhj2Tn.js +2 -0
  293. package/dist/{worker-entry-DJD_nHkS.js → worker-entry-BIROTPX1.js} +11 -8
  294. package/dist/{worker-entry-DJD_nHkS.js.map → worker-entry-BIROTPX1.js.map} +1 -1
  295. package/dist/workspace-CcQRT31C.js +1 -0
  296. package/dist/{workspace-BO1VhUR9.js → workspace-uuE51x35.js} +6 -6
  297. package/dist/{workspace-BO1VhUR9.js.map → workspace-uuE51x35.js.map} +1 -1
  298. package/package.json +24 -11
  299. package/skills/eval-rubric/SKILL.md +15 -7
  300. package/dist/adapter-CptK032x.js.map +0 -1
  301. package/dist/app-files-sgqwfjtn.js.map +0 -1
  302. package/dist/assemble-CxBHkavM.js +0 -1
  303. package/dist/assemble-Me7Whp-y.js.map +0 -1
  304. package/dist/capture-C3RmjPph.js.map +0 -1
  305. package/dist/capture-YPwxp_iK.js +0 -1
  306. package/dist/cli-BBOlXKPG.js.map +0 -1
  307. package/dist/cli-spec-DZ0bnP0_.js.map +0 -1
  308. package/dist/client-tZ2WBDxf.js.map +0 -1
  309. package/dist/command-CFQ9c1hk.js.map +0 -1
  310. package/dist/command-fO0BFsTq.js.map +0 -1
  311. package/dist/command-qGS802uX.js.map +0 -1
  312. package/dist/commands-CC60TOT5.js.map +0 -1
  313. package/dist/config-C2UtS9vy.js.map +0 -1
  314. package/dist/context-BajfiH0S.js.map +0 -1
  315. package/dist/contrasts-BjOg7wyr.js +0 -101
  316. package/dist/contrasts-BjOg7wyr.js.map +0 -1
  317. package/dist/cost-BJU0MAji.js +0 -1
  318. package/dist/db-C5SZ0510.js.map +0 -1
  319. package/dist/db-puzLzX4k.js +0 -2
  320. package/dist/debug-BnXV7JbX.js +0 -1
  321. package/dist/dist-ByYk_wAs.js.map +0 -1
  322. package/dist/docker-Dto8ROCq.js.map +0 -1
  323. package/dist/doctor-BcvfKpBX.js.map +0 -1
  324. package/dist/environment-CC1RV21n.js.map +0 -1
  325. package/dist/evaluate-NTNJ8T9H.js.map +0 -1
  326. package/dist/files-COW5JBJM.js +0 -1
  327. package/dist/files-DFtuRQJx.js +0 -1
  328. package/dist/files-oOYNR7ZH.js +0 -1
  329. package/dist/files-p-uTdOjA.js.map +0 -1
  330. package/dist/gate-Cp_pQoEe.js.map +0 -1
  331. package/dist/harness-DYSC4zMh.js.map +0 -1
  332. package/dist/ids-DuK6xl4w.js.map +0 -1
  333. package/dist/images-CNayXCp2.js.map +0 -1
  334. package/dist/init-8o6W3_fn.js +0 -1
  335. package/dist/init-D5HtmyMI.js.map +0 -1
  336. package/dist/ink-list-Ca-5dunO.js.map +0 -1
  337. package/dist/judge-DYOF69Oe.js.map +0 -1
  338. package/dist/list-CM_YSJXq.js +0 -374
  339. package/dist/list-CM_YSJXq.js.map +0 -1
  340. package/dist/live-DQc8jr6o.js +0 -1
  341. package/dist/model-Ce9l9_rF.js.map +0 -1
  342. package/dist/model-Cxzo4cjw.js +0 -1
  343. package/dist/node-DhIRSrrK.js.map +0 -1
  344. package/dist/opencode-providers-Co7plCea.js.map +0 -1
  345. package/dist/plan-DqnzfDH1.js.map +0 -1
  346. package/dist/plugins-B2KQ0y3P.js.map +0 -1
  347. package/dist/preflight-DyzmvK7i.js.map +0 -1
  348. package/dist/provenance-iRxjp4Pu.js.map +0 -1
  349. package/dist/provider-DCdTHQpk.js +0 -1
  350. package/dist/providers-D0ob_tra.js +0 -1
  351. package/dist/providers-vXMXuwn-.js.map +0 -1
  352. package/dist/query-CvgUsvep.js +0 -1
  353. package/dist/record-DhzwkSXc.js.map +0 -1
  354. package/dist/remarks-CauU408t.js.map +0 -1
  355. package/dist/remarks-NMgPd30U.js.map +0 -1
  356. package/dist/resolve-B1zMnPwK.js.map +0 -1
  357. package/dist/resolve-BIIeVT12.js +0 -1
  358. package/dist/resume-Dkhrpjow.js.map +0 -1
  359. package/dist/runtime-DcvQcr36.js.map +0 -1
  360. package/dist/sandbox-8zCrtuCf.js.map +0 -1
  361. package/dist/server-0tuj8VSa.js +0 -1
  362. package/dist/shared-ogqPJ0uo.js.map +0 -1
  363. package/dist/source-llwLewOU.js +0 -1
  364. package/dist/src-BQ6BiXoc.js.map +0 -1
  365. package/dist/src-BXnv0ViU.js +0 -2
  366. package/dist/src-BiS8YNN_.js +0 -3
  367. package/dist/src-BkH4GOxu.js +0 -1
  368. package/dist/src-C-tH5ebd.js +0 -2
  369. package/dist/src-Cg1bFs9g.js +0 -2
  370. package/dist/src-DV_UorZv.js +0 -2
  371. package/dist/src-XxUpr2sa.js +0 -2
  372. package/dist/state-DZbAO95a.js +0 -1
  373. package/dist/suite-M8_7xio7.js.map +0 -1
  374. package/dist/suite-u2KJnGpY.js +0 -2
  375. package/dist/summary-Uzc9osfV.js.map +0 -1
  376. package/dist/types-C4OkYhZg.js.map +0 -1
  377. package/dist/vertex-h_peaZTN.js +0 -1
  378. package/dist/views-BISrsIjw.js.map +0 -1
  379. package/dist/views-Bfab8fM9.js +0 -2
  380. package/dist/workspace-B8EOCuxl.js +0 -1
@@ -0,0 +1,1348 @@
1
+ import { a as plural, i as formatDuration, n as clip } from "./text-B8-W3Cvn.js";
2
+ import { s as debugTime } from "./debug-CIXzB4wK.js";
3
+ import { u as caseLabel } from "./cases-z9E6DCd5.js";
4
+ import { _ as formatUsage } from "./model-V3mMXp6x.js";
5
+ import { p as triesNote } from "./judgments-CzgpsTqv.js";
6
+ import { b as observedLine, i as effectOf, r as countedOf, s as isNotGatedResult } from "./suite-COglUhPd.js";
7
+ import { n as stripAnsi, t as colors } from "./colors-DcXBvAlU.js";
8
+ import { i as shownRemarks } from "./remarks-D9Lcd1fF.js";
9
+ import { i as checkLabel, m as statsLine, u as pairedStats } from "./layout-Cm85tQYk.js";
10
+ import stringWidth from "string-width";
11
+ // src/ui/format.ts
12
+ const plainColors = colors(false);
13
+ /** Most detail lines a `-vv` payload prints under its line. */
14
+ const DEBUG_DETAIL_LINES = 40;
15
+ /**
16
+ * A debug line as the terminal shows it, `12:50:01 image cache hit …` (with milliseconds under
17
+ * `-vv`), then its detail indented under it.
18
+ */
19
+ function debugLines(c, line, ms) {
20
+ const phase = line.phase.padEnd(9);
21
+ const head = `${c.dim(debugTime(line.at, ms))} ${c.dim(phase)} ${line.level === 2 ? c.dim(line.text) : line.text}`;
22
+ const detail = (line.detail ?? "").split("\n").filter((l) => l.trim());
23
+ const shown = detail.slice(0, DEBUG_DETAIL_LINES).map((l) => c.dim(` ${l}`));
24
+ const more = detail.length - shown.length;
25
+ return [
26
+ head,
27
+ ...shown,
28
+ ...more > 0 ? [c.dim(` … ${more} more lines in trace.ndjson`)] : []
29
+ ];
30
+ }
31
+ /** Offset into an attempt, `+1:05`. */
32
+ function offset(ms) {
33
+ const s = Math.max(0, Math.floor(ms / 1e3));
34
+ return `+${Math.floor(s / 60)}:${String(s % 60).padStart(2, "0")}`;
35
+ }
36
+ function outcomeOf(e) {
37
+ if (e.state === "skipped") return "skipped";
38
+ if (e.meta?.errorKind === "aborted") return "canceled";
39
+ return e.meta?.outcome ?? (e.state === "passed" ? "pass" : "fail");
40
+ }
41
+ /** What tells an eval's attempts apart: the axes that vary (`cursor:composer-2.5 · with-skill`), else the harness. */
42
+ function attemptAxes(a, fallback) {
43
+ return a?.label.replace(/\s*#\d+$/, "") || a?.harness.kind || fallback;
44
+ }
45
+ /** A command on one line: the first line, cut to 80 characters at a word boundary. */
46
+ function oneLine(text, max = 80) {
47
+ const [first = ""] = text.trim().split("\n");
48
+ const cut = clip(first, max);
49
+ return cut === first && text.trim().includes("\n") ? `${first}…` : cut;
50
+ }
51
+ /** One line per worker progress event, without prefix or offset. */
52
+ function progressLine(c, p) {
53
+ switch (p.kind) {
54
+ case "sandbox": return c.dim("sandbox starting");
55
+ case "sandbox-ready": return `sandbox ready ${c.dim(formatDuration(p.ms))}`;
56
+ case "turn-start": return `turn ${p.turn} started`;
57
+ case "turn-end": {
58
+ const status = p.status === "completed" ? "done" : c.red(p.status);
59
+ const activity = [plural(p.tools, "tool call"), ...p.filesChanged === void 0 ? [] : [`${plural(p.filesChanged, "file")} changed`]].join(", ");
60
+ const error = p.error ? `: ${c.red(oneLine(p.error, 160))}` : "";
61
+ return `turn ${p.turn} ${status}${error} ${c.dim(`${formatDuration(p.ms)} · ${activity}`)}`;
62
+ }
63
+ case "check-start": return c.dim(`$ ${oneLine(p.command)}`);
64
+ case "check-end": {
65
+ const exit = p.exitCode === 0 ? c.dim("exit 0") : c.red(`exit ${p.exitCode}`);
66
+ const tries = p.try && p.tries ? triesNote(p.exitCode, p.try, p.tries) : null;
67
+ return `$ ${oneLine(p.command)} ${exit} ${c.dim([formatDuration(p.ms), tries].filter(Boolean).join(" · "))}`;
68
+ }
69
+ case "judge-start": return c.dim(`judging: ${oneLine(p.question, 120)}`);
70
+ case "judge-end": return judgeLine(c, p);
71
+ case "cleanup": return c.dim("cleaning up");
72
+ case "warning": return c.yellow(`warning: ${p.text}`);
73
+ case "browser-download": {
74
+ const total = p.bytes == null ? "?" : formatBytes(p.bytes);
75
+ return `downloading ${p.name} ${p.version} ${formatBytes(p.received)} / ${total} → ${p.cache}`;
76
+ }
77
+ }
78
+ }
79
+ function formatBytes(n) {
80
+ if (n < 1024) return `${n} B`;
81
+ if (n < 1048576) return `${(n / 1024).toFixed(1)} KB`;
82
+ return `${(n / 1048576).toFixed(1)} MB`;
83
+ }
84
+ function judgeLine(c, j) {
85
+ const verdict = j.verdict === "pass" ? c.green("pass") : c.red(j.verdict);
86
+ const score = j.score === null ? "" : ` ${j.score.toFixed(2)}`;
87
+ const threshold = j.threshold === null ? "" : ` ${c.dim(`(≥ ${j.threshold})`)}`;
88
+ return `${c.dim("judge")} ${verdict}${score}${threshold} ${j.question}`;
89
+ }
90
+ /** The phase a running attempt is in, for the heartbeat. */
91
+ function phaseOf(p) {
92
+ switch (p?.kind) {
93
+ case void 0: return "starting";
94
+ case "sandbox": return "preparing sandbox";
95
+ case "sandbox-ready": return "sandbox ready";
96
+ case "turn-start": return `agent turn ${p.turn}`;
97
+ case "turn-end": return `turn ${p.turn} done`;
98
+ case "check-start":
99
+ case "check-end": return "running checks";
100
+ case "judge-start":
101
+ case "judge-end": return "judging";
102
+ case "cleanup": return "cleanup";
103
+ case "browser-download": return "browser download";
104
+ case "warning": return "running";
105
+ }
106
+ }
107
+ function capLines(text, max) {
108
+ const lines = text.replace(/\s+$/, "").split("\n");
109
+ if (lines.length <= max) return lines;
110
+ return [...lines.slice(0, max), `(+${lines.length - max} more lines)`];
111
+ }
112
+ /** An infra error's headline, then its last lines: the cause is at the end. */
113
+ function tailLines(text, max) {
114
+ const lines = text.replace(/\s+$/, "").split("\n");
115
+ if (lines.length <= max) return lines;
116
+ const rest = Math.max(1, max - 1);
117
+ return [
118
+ lines[0] ?? "",
119
+ `(${lines.length - 1 - rest} more lines)`,
120
+ ...lines.slice(-rest)
121
+ ];
122
+ }
123
+ /**
124
+ * Why an eval failed, as lines: the judge verdict (and reason) for judge failures, Vitest's
125
+ * formatted error (diff, code frame) for assertions, the tail of the message for infra errors.
126
+ */
127
+ function failureLines(c, e, options) {
128
+ const outcome = outcomeOf(e);
129
+ if (outcome === "canceled") return [c.yellow("canceled")];
130
+ const message = e.errors[0] ?? "";
131
+ const turns = (e.meta?.turnErrors ?? []).filter((t) => !message.includes(t.replace(/^turn \d+ error: /, ""))).map((t) => c.yellow(t));
132
+ return [
133
+ ...failureBody(c, e, outcome, message, options),
134
+ ...otherChecks(c, e),
135
+ ...turns
136
+ ];
137
+ }
138
+ /** The failed check the attempt's error is, when it is one. */
139
+ function errorCheck(e) {
140
+ const message = e.errors[0] ?? "";
141
+ return (e.meta?.failedChecks ?? []).find((x) => x.message && message.includes(x.message.replace(/…$/, "")));
142
+ }
143
+ /** `✗ failed label: why evals/a.eval.ts:7`: a failed check, which is a fail, not an error. */
144
+ function checkLine(c, x) {
145
+ const why = x.message.startsWith(`${x.label}: `) ? x.message.slice(x.label.length + 2) : x.message;
146
+ const what = why ? `${x.label}: ${c.dim(why)}` : x.label;
147
+ return [
148
+ c.red("✗ failed"),
149
+ what,
150
+ x.at && c.dim(x.at)
151
+ ].filter(Boolean).join(" ");
152
+ }
153
+ /** The failed checks the error isn't, each with its line: an `expect` failure doesn't end the body. */
154
+ function otherChecks(c, e) {
155
+ const shown = errorCheck(e);
156
+ return (e.meta?.failedChecks ?? []).filter((x) => x !== shown).map((x) => checkLine(c, x));
157
+ }
158
+ /**
159
+ * The plain classes before a message, `Error: ` and `AssertionError: `, which a fail doesn't print.
160
+ * Any other class (`TypeError`, `ReferenceError`) stays: it says the eval's own code broke.
161
+ */
162
+ const ERROR_NAME = /^(?:Assertion)?Error: /;
163
+ /**
164
+ * A failed attempt's reason on one line, as the live list prints it after `failed` or `errored`:
165
+ * the message without its error's class, the judge's verdict, or `canceled`.
166
+ */
167
+ function failureReason(e) {
168
+ if (outcomeOf(e) === "canceled") return "canceled";
169
+ const failed = (e.meta?.judgements ?? []).find((j) => j.verdict !== "pass");
170
+ if (e.meta?.errorKind === "judge" && failed) return stripAnsi(judgeLine(plainColors, failed)).replace(/\s+/g, " ").trim();
171
+ const [first = ""] = (e.errors[0] ?? "").split("\n").filter((l) => l.trim());
172
+ return first.trim().replace(ERROR_NAME, "");
173
+ }
174
+ function failureBody(c, e, outcome, message, options) {
175
+ if (outcome === "infra_error") {
176
+ if (e.meta?.prepare) {
177
+ const lines = message.trimEnd().split("\n");
178
+ return [
179
+ c.yellow("infra error"),
180
+ lines[0] ?? "",
181
+ lines.at(-1) ?? ""
182
+ ].filter((l, i, all) => all.indexOf(l) === i);
183
+ }
184
+ return [`${c.yellow("infra error")}`, ...tailLines(message, options.max)];
185
+ }
186
+ const failed = (e.meta?.judgements ?? []).filter((j) => j.verdict !== "pass");
187
+ if (e.meta?.errorKind === "judge" && failed.length) return failed.flatMap((j, i) => {
188
+ const reason = options.reasons?.[i];
189
+ return [judgeLine(c, {
190
+ ...j,
191
+ threshold: j.threshold
192
+ }), ...reason ? [` ${reason}`] : []];
193
+ });
194
+ const formatted = e.formattedErrors[0];
195
+ const body = formatted && e.meta?.errorKind !== "timeout" ? formatted : message;
196
+ const lines = capLines((c.enabled ? body : stripAnsi(body)).replace(/^\n+/, ""), options.max);
197
+ const check = errorCheck(e);
198
+ if (outcome === "fail" && (check || e.errorName === "AssertionError")) {
199
+ const [, ...rest] = lines;
200
+ return [check ? checkLine(c, check) : `${c.red("✗ failed")} ${c.dim(stripAnsi(lines[0] ?? "").replace(ERROR_NAME, ""))}`, ...rest.map((l) => body === message ? c.dim(l) : l)];
201
+ }
202
+ return lines.map((l) => c.enabled && body === message ? c.red(l) : l);
203
+ }
204
+ // src/ui/status.ts
205
+ /** The lines a detail shows, compact or `full`. */
206
+ const shownDetail = (lines, full) => lines.filter((l) => !l.only || l.only === "full" === full);
207
+ const EFFECT = {
208
+ better: "helped",
209
+ worse: "made it worse",
210
+ same: "same"
211
+ };
212
+ const ERROR_VERB = {
213
+ assertion: "failed",
214
+ timeout: "timed out",
215
+ aborted: "canceled",
216
+ infra: "hit an infrastructure error",
217
+ judge: "could not be judged",
218
+ turn: "ended a turn with an error"
219
+ };
220
+ const MESSAGE_LINES = 4;
221
+ const LINE_MAX = 160;
222
+ /** `cursor (composer-2.5)`, from the record's cell. */
223
+ function harnessLabel(record, cell) {
224
+ const model = record.evals.flatMap((e) => e.cells).find((c) => c.key === cell.key && c.harness === cell.harness)?.model;
225
+ return model && model !== cell.harness ? `${cell.harness} (${model})` : cell.harness;
226
+ }
227
+ /** The cells an eval's outcome reads: the gated ones, or every cell of a study. */
228
+ function deciding(cells) {
229
+ const gated = cells.filter((c) => c.gated);
230
+ return gated.length ? gated : cells;
231
+ }
232
+ const cellsOf = (e) => e.cells ?? (e.cases ?? []).flatMap((k) => k.cells);
233
+ /** Each part's label, adding the environment and sandbox only where the cells differ in them. */
234
+ function labeler(record, cells) {
235
+ const envs = new Set(cells.map((c) => c.environment)).size > 1;
236
+ const sandboxes = new Set(cells.map((c) => c.sandbox)).size > 1;
237
+ return (c) => [
238
+ harnessLabel(record, c),
239
+ envs ? `in ${c.environment}` : "",
240
+ sandboxes ? `on ${c.sandbox}` : ""
241
+ ].filter(Boolean).join(" ");
242
+ }
243
+ function tallyBy(cells, label) {
244
+ const by = /* @__PURE__ */ new Map();
245
+ for (const c of cells) {
246
+ const key = label(c);
247
+ const t = by.get(key) ?? {
248
+ label: key,
249
+ passed: 0,
250
+ counted: 0
251
+ };
252
+ t.passed += c.passed;
253
+ t.counted += countedOf(c);
254
+ by.set(key, t);
255
+ }
256
+ return [...by.values()];
257
+ }
258
+ const of = (t) => `${t.passed} of ${t.counted}`;
259
+ /** The outcome sentence, per the rules at the top. */
260
+ function outcomeSentence(tallies) {
261
+ const counted = tallies.filter((t) => t.counted > 0);
262
+ if (!counted.length) return "No run finished.";
263
+ const [one] = counted;
264
+ if (counted.length === 1 && one) {
265
+ const once = one.counted === 1;
266
+ if (one.passed === one.counted) return `Passed on ${one.label}${once ? "" : " every time"}.`;
267
+ if (one.passed === 0) return `Failed on ${one.label}${once ? "" : " every time"}.`;
268
+ return `Passed ${of(one)} on ${one.label}.`;
269
+ }
270
+ const names = counted.map((t) => t.label);
271
+ const all = `${names.slice(0, -1).join(", ")} and ${names.at(-1)}`;
272
+ if (counted.every((t) => t.passed === t.counted)) return `Passed on ${all} every time.`;
273
+ if (counted.every((t) => t.passed === 0)) return `Failed on ${all} every time.`;
274
+ const [first, ...rest] = counted;
275
+ return `${first?.label} passed ${first ? of(first) : ""}${rest.map((t) => `, ${t.label} ${of(t)}`).join("")}.`;
276
+ }
277
+ /** `(cursor 4 of 4, codex 1 of 4)` when the harnesses' pass rates differ; empty when they agree. */
278
+ function disagreement(record, cells) {
279
+ const tallies = tallyBy(cells, (c) => harnessLabel(record, c)).filter((t) => t.counted > 0);
280
+ if (tallies.length < 2) return "";
281
+ return new Set(tallies.map((t) => t.passed / t.counted)).size > 1 ? ` (${tallies.map((t) => `${t.label} ${of(t)}`).join(", ")})` : "";
282
+ }
283
+ /** `, not by minLift 60` when the variant's lift fell short of its `minLift`, which fails it. */
284
+ function minLiftShort(e, own) {
285
+ const keys = new Set(own.map((c) => c.key));
286
+ const pooled = (e.pooled ?? []).filter((p) => keys.has(p.key));
287
+ const missed = pooled.length ? pooled.find((p) => p.minLift !== null && p.outcome === "fail")?.minLift : own.find((c) => c.minLift !== null && c.interval && c.interval.low < c.minLift)?.minLift;
288
+ return missed == null ? "" : `, not by minLift ${Math.round(missed * 100)}`;
289
+ }
290
+ /**
291
+ * A variant's comparison with the control beyond pass rate: `5× faster · judge "tidy" +0.12`, per
292
+ * harness it ran on. Only the measures that hold; `verbose` adds the ones that only lean, each
293
+ * `(leans)`. A judged check reads as its judge's score, not again as its pass rate.
294
+ */
295
+ function measureSets(e, own, verbose) {
296
+ const keys = new Set(own.map((c) => c.key));
297
+ const pooled = (e.pooled ?? []).filter((p) => keys.has(p.key));
298
+ return (pooled.length ? pooled.map((p) => ({
299
+ harness: own.find((c) => c.key === p.key)?.harness ?? p.key,
300
+ measures: p.measures
301
+ })) : own.flatMap((c) => c.measures ? [{
302
+ harness: c.harness,
303
+ measures: c.measures
304
+ }] : [])).flatMap(({ harness, measures }) => {
305
+ const shown = measures.filter((m) => m.measure !== "pass" && (m.verdict === "better" || m.verdict === "worse" || verbose && m.verdict === "leans"));
306
+ const judged = new Set(shown.filter((m) => m.measure === "judge").map((m) => m.label));
307
+ const own = shown.filter((m) => m.measure !== "check" || !judged.has(m.label));
308
+ if (!own.length) return [];
309
+ return [{
310
+ harness,
311
+ text: own.map((m) => m.verdict === "leans" ? `${m.text} (leans)` : m.text).join(" · ")
312
+ }];
313
+ });
314
+ }
315
+ const padColumns = (text, width) => `${text}${" ".repeat(Math.max(0, width - stringWidth(text)))}`;
316
+ /** Rows of cells padded to one column each, two spaces apart, measured in terminal columns. */
317
+ function columns(rows) {
318
+ const widths = rows[0]?.map((_, i) => Math.max(...rows.map((r) => stringWidth(r[i] ?? "")))) ?? [];
319
+ return rows.map((r) => r.map((cell, i) => padColumns(cell, widths[i] ?? 0)).join(" ").trimEnd());
320
+ }
321
+ const upper = (text) => `${text.slice(0, 1).toUpperCase()}${text.slice(1)}`;
322
+ /** `Failed on react; 2 of 3 variants helped.`: what failed the compare, then what it found. */
323
+ function compareHeadline(failed, rows) {
324
+ const helped = rows.filter((r) => r.effect === "better").length;
325
+ const worse = rows.filter((r) => r.effect === "worse").length;
326
+ const [one] = rows;
327
+ const found = rows.length === 1 && one ? one.effect === "better" || one.effect === "worse" ? `the ${one.v} variant ${EFFECT[one.effect]}` : one.effect === "same" ? `the ${one.v} variant passed as often as the control` : "" : [helped ? `${helped} of ${rows.length} variants helped` : "", worse ? `${worse} made it worse` : ""].filter(Boolean).join(", ") || (rows.some((r) => r.effect) ? "no variant changed the pass rate" : "");
328
+ const text = [failed.length ? `failed on ${failed.join(", ")}` : "", found].filter(Boolean).join("; ");
329
+ return text ? `${upper(text)}.` : "";
330
+ }
331
+ /**
332
+ * A compare as a headline, then one table: the control and each variant (highest pass rate
333
+ * first) with its pass rate and effect, and a `vs control` column when some other measure holds.
334
+ */
335
+ function compareLines(record, e, cells, verbose) {
336
+ const base = cells.filter((c) => c.baseline);
337
+ const name = (c) => c.environment === "-" ? "no environment" : c.environment;
338
+ const baseTally = tallyBy(base, () => "baseline")[0] ?? {
339
+ passed: 0,
340
+ counted: 0
341
+ };
342
+ const baseName = [...new Set(base.map(name))].join(", ");
343
+ const baseRow = [`${baseName} (control)`, `${of(baseTally)}${disagreement(record, base)}`];
344
+ const variants = [...new Set(cells.filter((c) => c.variant !== null).map((c) => c.variant))];
345
+ if (!variants.length) return [{
346
+ depth: 0,
347
+ text: `Control ${baseName} passed ${of(baseTally)}${disagreement(record, base)}.`
348
+ }];
349
+ const rows = variants.map((v, order) => {
350
+ const own = cells.filter((c) => c.variant === v);
351
+ const t = tallyBy(own, () => v ?? "")[0] ?? {
352
+ passed: 0,
353
+ counted: 0
354
+ };
355
+ const effect = effectOf({
356
+ pass: t.passed,
357
+ counted: t.counted
358
+ }, {
359
+ pass: baseTally.passed,
360
+ counted: baseTally.counted
361
+ });
362
+ return {
363
+ v: v ?? "",
364
+ t,
365
+ effect,
366
+ own,
367
+ order
368
+ };
369
+ });
370
+ const rate = (t) => t.counted ? t.passed / t.counted : -1;
371
+ rows.sort((a, b) => rate(b.t) - rate(a.t) || a.order - b.order);
372
+ const sets = rows.map((r) => measureSets(e, r.own, verbose));
373
+ const several = new Set(cells.map((c) => c.harness)).size > 1;
374
+ const column = !several && sets.some((s) => s.length > 0);
375
+ const table = columns([
376
+ [
377
+ "arm",
378
+ "passed",
379
+ "verdict",
380
+ ...column ? ["vs control"] : []
381
+ ],
382
+ [
383
+ ...baseRow,
384
+ "",
385
+ ...column ? [""] : []
386
+ ],
387
+ ...rows.map((r, i) => {
388
+ const short = minLiftShort(e, r.own);
389
+ const word = r.effect ? `${EFFECT[r.effect]}${short}` : short.slice(2);
390
+ return [
391
+ r.v,
392
+ `${of(r.t)}${disagreement(record, r.own)}`,
393
+ word,
394
+ ...column ? [sets[i]?.[0]?.text ?? ""] : []
395
+ ];
396
+ })
397
+ ]);
398
+ const headline = compareHeadline(iconOf(e) === "fail" ? failedArms(cells) : [], rows);
399
+ const lines = [
400
+ ...headline ? [{
401
+ depth: 0,
402
+ text: headline
403
+ }] : [],
404
+ {
405
+ depth: 0,
406
+ text: table[0] ?? "",
407
+ tone: "dim"
408
+ },
409
+ {
410
+ depth: 0,
411
+ text: table[1] ?? ""
412
+ }
413
+ ];
414
+ for (const [i, r] of rows.entries()) {
415
+ lines.push({
416
+ depth: 0,
417
+ text: table[i + 2] ?? ""
418
+ });
419
+ if (several) for (const s of sets[i] ?? []) lines.push({
420
+ depth: 1,
421
+ text: `${s.harness}: ${s.text}`,
422
+ tone: "dim"
423
+ });
424
+ if (!verbose) continue;
425
+ if (e.pooled) {
426
+ const keys = new Set(r.own.map((c) => c.key));
427
+ for (const p of e.pooled.filter((x) => keys.has(x.key))) {
428
+ const cell = r.own.find((c) => c.key === p.key);
429
+ const who = keys.size > 1 && cell ? `${harnessLabel(record, cell)}: ` : "";
430
+ lines.push({
431
+ depth: 1,
432
+ text: `${who}${pairedStats(p)}`,
433
+ tone: "dim"
434
+ });
435
+ }
436
+ continue;
437
+ }
438
+ for (const cell of r.own) {
439
+ const stats = statsLine(cell, cells);
440
+ const who = r.own.length > 1 ? `${harnessLabel(record, cell)}: ` : "";
441
+ if (stats) lines.push({
442
+ depth: 1,
443
+ text: `${who}${stats}`,
444
+ tone: "dim"
445
+ });
446
+ }
447
+ }
448
+ return lines;
449
+ }
450
+ /** The arms whose gated cells failed, by name. */
451
+ function failedArms(cells) {
452
+ const missed = cells.filter((c) => c.gated && c.outcome !== "pass" && c.outcome !== "skipped");
453
+ return [...new Set(missed.map((c) => c.baseline ? "the control" : c.variant ?? "-"))];
454
+ }
455
+ function failedChecks(cells, groupOf) {
456
+ const by = /* @__PURE__ */ new Map();
457
+ for (const cell of cells) for (const k of cell.checks) {
458
+ if (k.outcome.status !== "ran" || k.outcome.failed + k.outcome.errored === 0) continue;
459
+ const n = k.outcome.failed + k.outcome.errored;
460
+ const f = by.get(k.label) ?? {
461
+ label: k.label,
462
+ failed: 0,
463
+ ran: 0,
464
+ byGroup: /* @__PURE__ */ new Map(),
465
+ gated: false,
466
+ first: k
467
+ };
468
+ f.failed += n;
469
+ f.gated ||= cell.gated;
470
+ const g = f.byGroup.get(groupOf(cell)) ?? {
471
+ failed: 0,
472
+ ran: 0
473
+ };
474
+ g.failed += n;
475
+ f.byGroup.set(groupOf(cell), g);
476
+ if (f.first.outcome.status === "ran" && !f.first.outcome.assertion) f.first = k;
477
+ by.set(k.label, f);
478
+ }
479
+ for (const f of by.values()) {
480
+ f.ran = 0;
481
+ for (const c of cells) {
482
+ const ran = c.checks.filter((k) => k.label === f.label).reduce((m, k) => m + ranOf(k), 0);
483
+ f.ran += ran;
484
+ const g = f.byGroup.get(groupOf(c));
485
+ if (g) g.ran += ran;
486
+ }
487
+ }
488
+ return [...by.values()].sort((a, b) => b.failed - a.failed || a.first.order - b.first.order);
489
+ }
490
+ /** `, all on H` or `, M of them on H`, per the rules at the top. */
491
+ function where(f, harnesses) {
492
+ if (harnesses < 2) return "";
493
+ const [top] = [...f.byGroup].sort((a, b) => b[1].failed - a[1].failed);
494
+ if (!top) return "";
495
+ const [h, { failed: n }] = top;
496
+ if (n === f.failed) return f.failed === 1 ? `, on ${h}` : `, all on ${h}`;
497
+ return n * 2 > f.failed ? `, ${n} of them on ${h}` : "";
498
+ }
499
+ /** A message's first lines, without the label it repeats or a command's empty output headings. */
500
+ function messageLines(text, label = "", max = LINE_MAX) {
501
+ return (label && text.startsWith(`${label}: `) ? text.slice(label.length + 2) : text).split("\n").map((l) => l.trimEnd()).filter((l) => l.trim() && !/^--- (stderr|stdout) ---$/.test(l.trim())).slice(0, MESSAGE_LINES).map((l) => clip(l, max));
502
+ }
503
+ /** The check's first failure's message: its assertion, else the judge's verdict. */
504
+ function messageOf(f) {
505
+ const o = f.first.outcome;
506
+ const judge = f.first.judge;
507
+ return o.status === "ran" && o.assertion ? o.assertion : judge ? `judge: ${judge.question} (scores ${judge.scores.join(", ")}, threshold ${judge.threshold})` : "";
508
+ }
509
+ const LABEL_COLUMN = 40;
510
+ /**
511
+ * `✗ label failed 2 of 4 runs`, then the first line of its message and where it is, dimmed, and a
512
+ * failed command's first stderr line; the message's other lines only in the full detail. A compare names the arms instead, the variants
513
+ * first: `failed on react · the control (expected)`, where a control that isn't gated is
514
+ * expected to fail. The `✗` is red only for a failure that counts against a failed eval.
515
+ */
516
+ function checkLines(cells, groupOf, o) {
517
+ const failed = failedChecks(cells, groupOf);
518
+ if (!failed.length) return [];
519
+ const groups = new Set(cells.map(groupOf)).size;
520
+ const several = o.cases || cells.some((c) => countedOf(c) > 1);
521
+ const baselineGated = cells.some((c) => c.baseline && c.gated);
522
+ const width = Math.max(...failed.map((f) => clip(checkLabel(f.label), LABEL_COLUMN).length));
523
+ const lines = [];
524
+ for (const f of failed) {
525
+ const label = clip(checkLabel(f.label), LABEL_COLUMN).padEnd(width);
526
+ let text;
527
+ let note;
528
+ if (o.compare) {
529
+ const count = (t) => several ? ` ${t.failed} of ${t.ran}` : "";
530
+ const arms = [...f.byGroup].filter(([arm]) => arm !== "the control");
531
+ const base = f.byGroup.get("the control");
532
+ const named = arms.map(([arm, t]) => `${arm}${count(t)}`).join(", ");
533
+ const baseText = base ? `the control${count(base)}` : "";
534
+ const expected = base && !baselineGated;
535
+ if (named) {
536
+ text = `${label} failed on ${named}`;
537
+ if (base) note = expected ? `${baseText} (expected)` : void 0;
538
+ if (base && !expected) text += ` · ${baseText}`;
539
+ } else {
540
+ text = `${label} failed on ${baseText}`;
541
+ if (expected) note = "expected";
542
+ }
543
+ } else if (o.cases) {
544
+ const shown = [...f.byGroup].slice(0, CASES_NAMED);
545
+ const named = shown.map(([k, t]) => t.ran > 1 ? `${k} (${t.failed} of ${t.ran} runs)` : k);
546
+ const more = f.byGroup.size - shown.length;
547
+ text = `${label} failed on ${named.join(", ")}${more ? ` and ${more} more` : ""}`;
548
+ } else text = `${label} failed ${f.failed} of ${plural(f.ran, "run")}${where(f, groups)}`;
549
+ lines.push({
550
+ depth: 0,
551
+ mark: o.failedEval && f.gated ? "fail" : "miss",
552
+ text: text.trimEnd(),
553
+ ...note ? { note } : {}
554
+ });
555
+ const message = messageOf(f);
556
+ const [first, ...rest] = messageLines(message, f.label);
557
+ const shown = [first, f.first.outcome.status === "ran" ? f.first.outcome.at : null].filter(Boolean).join(" · ");
558
+ if (shown) lines.push({
559
+ depth: 1,
560
+ text: shown,
561
+ tone: "dim"
562
+ });
563
+ const stderr = stderrHead(message);
564
+ if (stderr) lines.push({
565
+ depth: 1,
566
+ text: `stderr: ${clip(stderr, LINE_MAX)}`,
567
+ tone: "dim"
568
+ });
569
+ const after = stderr ? rest.filter((l) => l.trim() !== stderr) : rest;
570
+ for (const line of after) lines.push({
571
+ depth: 1,
572
+ text: line,
573
+ tone: "dim",
574
+ only: "full"
575
+ });
576
+ }
577
+ return lines;
578
+ }
579
+ /** A failed command's first line on stderr, which usually says why, before what followed from it. */
580
+ function stderrHead(message) {
581
+ return (/\n--- stderr ---\n([\s\S]*?)(?:\n--- stdout ---\n|$)/.exec(message)?.[1] ?? "").split("\n").map((l) => l.trim()).find(Boolean);
582
+ }
583
+ const ranOf = (k) => k.outcome.status === "ran" ? k.outcome.passed + k.outcome.failed + k.outcome.errored : 0;
584
+ /** Cases a sentence or a failed check names before `and N more`. */
585
+ const CASES_NAMED = 8;
586
+ /** Cases the compact case table lists, the failed ones; the full detail lists every case. */
587
+ const CASES_SHOWN = 8;
588
+ const ranCase = (k) => !k.notRun && k.outcome !== "skipped" && k.outcome !== "canceled";
589
+ const failedCase = (k) => ranCase(k) && k.outcome !== "pass";
590
+ const namedCases = (cases) => {
591
+ const shown = cases.slice(0, CASES_NAMED).map((k) => k.label);
592
+ const more = cases.length - shown.length;
593
+ return `${shown.join(", ")}${more ? ` and ${more} more` : ""}`;
594
+ };
595
+ /**
596
+ * `Failed on power; 2 of 3 cases passed.`: which cases failed and how many passed, or
597
+ * `Passed all 3 cases.`, `Ran 3 cases.` when nothing gates it.
598
+ */
599
+ function casesHeadline(e, cells) {
600
+ const cases = (e.cases ?? []).filter(ranCase);
601
+ if (!cases.length) return "No case finished.";
602
+ const all = plural(cases.length, "case");
603
+ if (!cells.some((c) => c.gated)) return `Ran ${all}.`;
604
+ const failed = cases.filter(failedCase);
605
+ if (!failed.length) return cases.length === 1 ? "Passed its case." : `Passed all ${all}.`;
606
+ const passed = `${cases.length - failed.length} of ${all} passed`;
607
+ return iconOf(e) === "fail" ? `Failed on ${namedCases(failed)}; ${passed}.` : `${upper(passed)}; ${namedCases(failed)} failed.`;
608
+ }
609
+ /** `Pass rate over the cases: 67%, below passRate 0.7.`, per cell gated on its rate. */
610
+ function rateLines(e, label) {
611
+ const rates = e.rates ?? [];
612
+ return rates.map((r) => {
613
+ const on = rates.length > 1 ? ` on ${label(r.key)}` : "";
614
+ const short = r.outcome === "fail" ? "below" : "clearing";
615
+ return {
616
+ depth: 0,
617
+ text: `Pass rate over the cases${on}: ${Math.round(r.rate * 100)}%, ${short} passRate ${r.passRate}.`,
618
+ ...r.outcome === "fail" ? { tone: "red" } : {}
619
+ };
620
+ });
621
+ }
622
+ /**
623
+ * The cases as a table: a row per case, marked with its outcome, and a column per cell (on a
624
+ * compare, the control and then each variant) with the case's passes there. A cell where
625
+ * `where` left the case out reads `–`. The compact detail lists every case up to `CASES_SHOWN`,
626
+ * else only the failed ones and a count of the rest.
627
+ */
628
+ function caseTable(record, e, cells, o) {
629
+ const cases = e.cases ?? [];
630
+ if (!cases.length) return [];
631
+ const byKey = /* @__PURE__ */ new Map();
632
+ for (const c of cells) if (!byKey.has(c.key)) byKey.set(c.key, c);
633
+ const heads = [...byKey.values()].sort((a, b) => Number(b.baseline) - Number(a.baseline) || a.order - b.order);
634
+ const harnesses = new Set(heads.map((c) => c.harness)).size > 1;
635
+ const own = labeler(record, heads);
636
+ const label = o.compare ? (c) => [c.baseline ? `${c.environment} (control)` : c.variant ?? c.environment, harnesses ? harnessLabel(record, c) : ""].filter(Boolean).join(" · ") : own;
637
+ const marked = cells.some((c) => c.gated);
638
+ const table = columns([["case", ...heads.map(label)], ...cases.map((k) => [k.label, ...heads.map((h) => {
639
+ const cell = k.cells.find((c) => c.key === h.key);
640
+ return cell && countedOf(cell) > 0 ? `${cell.passed} of ${countedOf(cell)}` : "–";
641
+ })])]);
642
+ const compact = cases.length <= CASES_SHOWN ? cases : cases.filter(failedCase).slice(0, CASES_SHOWN);
643
+ const shown = new Set(compact);
644
+ const lines = [{
645
+ depth: 0,
646
+ text: `${marked ? " " : ""}${table[0] ?? ""}`,
647
+ tone: "dim",
648
+ cases: "head",
649
+ ...compact.length ? {} : { only: "full" }
650
+ }];
651
+ for (const [i, k] of cases.entries()) {
652
+ const mark = !ranCase(k) ? "skipped" : k.outcome === "pass" ? "pass" : o.failedEval ? "fail" : "miss";
653
+ lines.push({
654
+ depth: 0,
655
+ text: table[i + 1] ?? "",
656
+ cases: "row",
657
+ ...marked ? { mark } : {},
658
+ ...shown.has(k) ? {} : { only: "full" }
659
+ });
660
+ }
661
+ const hidden = cases.filter((k) => !shown.has(k));
662
+ if (hidden.length) {
663
+ const word = hidden.length === 1 ? "case" : "cases";
664
+ const failedHidden = hidden.filter(failedCase).length;
665
+ const passedHidden = hidden.filter((k) => k.outcome === "pass").length;
666
+ const passed = passedHidden === hidden.length ? " passed" : failedHidden ? `: ${failedHidden} failed, ${passedHidden} passed` : "";
667
+ const count = compact.length ? `+${hidden.length} more ${word}` : `${hidden.length} ${word}`;
668
+ lines.push({
669
+ depth: 0,
670
+ text: `${count}${passed} (-v)`,
671
+ tone: "dim",
672
+ only: "compact",
673
+ cases: "more"
674
+ });
675
+ }
676
+ return lines;
677
+ }
678
+ /**
679
+ * Errors no failed check explains: timeouts, infrastructure errors, throws. Never clipped: their
680
+ * remedy is often last. A throw fails its attempt as a failed check does, so it reads as one; the
681
+ * rest are errors, red on a failed eval.
682
+ */
683
+ function errorLines(cells, failedEval) {
684
+ const by = /* @__PURE__ */ new Map();
685
+ for (const c of cells) for (const err of c.errors) {
686
+ const key = `${err.kind}\n${err.message}`;
687
+ const e = by.get(key) ?? {
688
+ kind: err.kind,
689
+ message: err.message,
690
+ n: 0
691
+ };
692
+ e.n += err.attempts;
693
+ by.set(key, e);
694
+ }
695
+ return [...by.values()].flatMap((e) => {
696
+ const fail = e.kind === "assertion";
697
+ const mark = e.kind === "aborted" ? "skipped" : !failedEval ? "miss" : fail ? "fail" : "error";
698
+ const tone = fail || !failedEval ? "dim" : "red";
699
+ return [{
700
+ depth: 0,
701
+ mark,
702
+ text: `${plural(e.n, "run")} ${ERROR_VERB[e.kind]}`
703
+ }, ...messageLines(e.message, "", Number.POSITIVE_INFINITY).map((text) => ({
704
+ depth: 1,
705
+ text,
706
+ tone
707
+ }))];
708
+ });
709
+ }
710
+ /** `evals/a.eval.ts:12` from `source:evals/a.eval.ts#L12`. */
711
+ const location = (at) => at.replace(/^source:/, "").replace(/#L(\d+)$/, ":$1");
712
+ /** `"npm test" passed on try 2 of 3.`: a check that needed its `c.exec` retries is flaky. */
713
+ function retriedLines(cells) {
714
+ const seen = /* @__PURE__ */ new Set();
715
+ return cells.flatMap((c) => c.checks.flatMap((k) => {
716
+ if (!k.retried || seen.has(k.label)) return [];
717
+ seen.add(k.label);
718
+ return [`"${checkLabel(k.label)}" ${k.retried}.`];
719
+ }));
720
+ }
721
+ function pageErrorNotes(cells) {
722
+ const [first, ...rest] = cells.flatMap((c) => c.pageErrors ?? []);
723
+ if (!first) return [];
724
+ const more = rest.length ? ` (+${plural(rest.length, "more capture")})` : "";
725
+ return [`${plural(first.errors, "page error")} in capture "${first.capture}" → ${first.file}${more}`];
726
+ }
727
+ /**
728
+ * `Worth knowing:` on the line itself when there's one remark or note, else as a heading over
729
+ * them. A remark with a short form (`brief`) gives it, and its whole sentence in the full detail.
730
+ */
731
+ function remarkLines(remarks, notes) {
732
+ const items = [...remarks.map((r) => {
733
+ const full = r.fix.edit ? `${r.text} Fix at ${location(r.fix.at)}: ${r.fix.edit}.` : `${r.text} At ${location(r.fix.at)}.`;
734
+ return {
735
+ full,
736
+ compact: r.brief ?? full
737
+ };
738
+ }), ...notes.map((text) => ({
739
+ full: text,
740
+ compact: text
741
+ }))];
742
+ if (!items.length) return [];
743
+ const one = items.length === 1;
744
+ const lines = one ? [] : [{
745
+ depth: 0,
746
+ text: "Worth knowing:",
747
+ tone: "heading"
748
+ }];
749
+ const depth = one ? 0 : 1;
750
+ const lead = one ? "Worth knowing: " : "";
751
+ for (const { full, compact } of items) if (compact === full) lines.push({
752
+ depth,
753
+ text: `${lead}${full}`
754
+ });
755
+ else {
756
+ lines.push({
757
+ depth,
758
+ text: `${lead}${compact}`,
759
+ only: "compact"
760
+ });
761
+ lines.push({
762
+ depth,
763
+ text: `${lead}${full}`,
764
+ only: "full"
765
+ });
766
+ }
767
+ return lines;
768
+ }
769
+ /** A compare's failures are told apart by arm: `the control`, or the variant's name. */
770
+ const armOf = (c) => c.baseline ? "the control" : c.variant ?? c.environment;
771
+ const nameOf = (e) => [...e.group, e.template ?? e.name].join(" › ");
772
+ function iconOf(e) {
773
+ if (e.todo || e.notRun) return "skipped";
774
+ if (e.outcome === "skipped") return "skipped";
775
+ if (e.outcome === "canceled") return "canceled";
776
+ if (e.outcome === "pass") return isNotGatedResult(e) ? "observe" : "pass";
777
+ return "fail";
778
+ }
779
+ function evalRow(record, e, remarks, verbose = false) {
780
+ const cells = cellsOf(e);
781
+ const decide = deciding(cells);
782
+ const passed = decide.reduce((n, c) => n + c.passed, 0);
783
+ const ran = decide.reduce((n, c) => n + c.passed + c.failed + c.infraError, 0);
784
+ const compare = cells.some((c) => c.baseline);
785
+ const counted = compare && decide.length < cells.length ? "variant run" : "run";
786
+ const summary = e.todo ? "todo" : e.notRun ? "not run" : ran === 0 ? e.outcome === "canceled" ? "canceled" : "skipped" : `${passed} of ${plural(ran, counted)} passed`;
787
+ const cases = e.cases ?? [];
788
+ const failedEval = iconOf(e) === "fail";
789
+ const notes = ran ? [...retriedLines(decide), ...pageErrorNotes(decide)] : [];
790
+ const caseOf = new Map(cases.flatMap((k) => k.cells.map((c) => [c, k.label])));
791
+ const answers = [...questionLines(e.questions ?? []), ...observedLines(e.observations ?? [], cells, (c) => compare ? armOf(c) : harnessLabel(record, c))];
792
+ const detail = ran ? [
793
+ ...compare ? compareLines(record, e, cells, verbose) : [{
794
+ depth: 0,
795
+ text: cases.length ? casesHeadline(e, decide) : outcomeSentence(tallyBy(decide, labeler(record, decide)))
796
+ }],
797
+ ...rateLines(e, (key) => {
798
+ const cell = decide.find((c) => c.key === key);
799
+ return cell ? labeler(record, decide)(cell) : key;
800
+ }),
801
+ ...caseTable(record, e, compare ? cells : decide, {
802
+ compare,
803
+ failedEval
804
+ }),
805
+ ...compare ? checkLines(cells, armOf, {
806
+ failedEval,
807
+ compare,
808
+ cases: false
809
+ }) : cases.length ? checkLines(decide, (c) => caseOf.get(c) ?? c.key, {
810
+ failedEval,
811
+ compare,
812
+ cases: true
813
+ }) : checkLines(decide, (c) => harnessLabel(record, c), {
814
+ failedEval,
815
+ compare,
816
+ cases: false
817
+ }),
818
+ ...errorLines(compare ? cells : decide, failedEval),
819
+ ...failedEval ? snapshotLines(cells) : [],
820
+ ...answers,
821
+ ...remarkLines(remarks, notes)
822
+ ] : remarkLines(remarks, []);
823
+ return {
824
+ id: e.id,
825
+ name: nameOf(e),
826
+ icon: iconOf(e),
827
+ summary: ran && cases.length ? `${summary} · ${plural(cases.length, "case")}` : summary,
828
+ detail,
829
+ remarks: remarks.length + notes.length,
830
+ compare,
831
+ ...ran && answers.length && iconOf(e) === "observe" ? { answers: true } : {}
832
+ };
833
+ }
834
+ /** Free-text answers shown per question; the rest are in the record. */
835
+ const ANSWERS_SHOWN = 3;
836
+ /** Rows of `[label, text]` at `depth`, the labels padded to one column. */
837
+ const aligned = (depth, rows) => {
838
+ const w = Math.max(0, ...rows.map(([label]) => label.length));
839
+ return rows.map(([label, text]) => ({
840
+ depth,
841
+ text: `${label.padEnd(w)} ${text}`
842
+ }));
843
+ };
844
+ /** Each question's answer: who won the pairs, the tally of choices, or the first answers. */
845
+ function questionLines(questions) {
846
+ return questions.flatMap((q) => {
847
+ const head = {
848
+ depth: 0,
849
+ text: `Question: ${clip(q.question, 100)}`,
850
+ tone: "heading"
851
+ };
852
+ if (q.kind === "attempts") {
853
+ const failed = q.error === null ? [] : [{
854
+ depth: 1,
855
+ text: `${q.failed} of ${q.asked} not answered: ${clip(q.error, 200)}`,
856
+ tone: "red"
857
+ }];
858
+ if (q.choices) return [
859
+ head,
860
+ {
861
+ depth: 1,
862
+ text: q.choices.map((t) => `${t.choice} ${t.n}`).join(" · ")
863
+ },
864
+ ...failed
865
+ ];
866
+ const shown = q.answers.slice(0, ANSWERS_SHOWN);
867
+ const more = q.answers.length - shown.length;
868
+ return [
869
+ head,
870
+ ...aligned(1, shown.map((a) => [a.attempt, clip(a.text.replace(/\s+/g, " "), 100)])),
871
+ ...more ? [{
872
+ depth: 1,
873
+ text: `${more} more: reeval query attempt_answers`,
874
+ tone: "dim"
875
+ }] : [],
876
+ ...failed
877
+ ];
878
+ }
879
+ if (q.votes === 0 && q.error === null) return [head, {
880
+ depth: 1,
881
+ text: "No pairs to judge: tries that failed their checks are left out.",
882
+ tone: "dim"
883
+ }];
884
+ if (q.rates.length === 0 && q.error === null) return [head, {
885
+ depth: 1,
886
+ text: `${plural(q.votes, "vote")}, every one a tie.`,
887
+ tone: "dim"
888
+ }];
889
+ const cuts = new Set(q.rates.map((r) => r.cut)).size > 1;
890
+ return [
891
+ head,
892
+ ...aligned(1, q.rates.map((r) => [cuts ? `${r.name} (${r.cut})` : r.name, `won ${r.wins} of ${r.n}`])),
893
+ ...q.error === null ? [] : [{
894
+ depth: 1,
895
+ text: `The model call failed: ${clip(q.error, 200)}`,
896
+ tone: "red"
897
+ }]
898
+ ];
899
+ });
900
+ }
901
+ /** Where a failed eval's first failed attempt's final workspace snapshot is, to open it. */
902
+ function snapshotLines(cells) {
903
+ const [first, ...others] = cells.flatMap((c) => c.snapshots ?? []);
904
+ if (!first) return [];
905
+ return [{
906
+ depth: 0,
907
+ text: `Snapshot: ${first}${others.length ? ` (+${others.length} more in summary.md)` : ""}`,
908
+ tone: "dim",
909
+ only: "full"
910
+ }];
911
+ }
912
+ /** What `c.observe` recorded, each name's tally on one line, or a line per cell under it. */
913
+ function observedLines(tallies, cells, label) {
914
+ if (!tallies.length) return [];
915
+ const byKey = new Map(cells.map((c) => [c.key, c]));
916
+ const perCell = new Set(tallies.map((t) => t.cell)).size > 1;
917
+ const width = Math.max(...tallies.map((t) => clip(t.name, 40).length));
918
+ const lines = [{
919
+ depth: 0,
920
+ text: "Observed:",
921
+ tone: "heading"
922
+ }];
923
+ if (!perCell) {
924
+ for (const t of tallies) lines.push({
925
+ depth: 1,
926
+ text: `${clip(t.name, 40).padEnd(width)} ${observedLine(t)}`
927
+ });
928
+ return lines;
929
+ }
930
+ for (const name of new Set(tallies.map((t) => t.name))) {
931
+ lines.push({
932
+ depth: 1,
933
+ text: clip(name, 40)
934
+ });
935
+ const rows = tallies.filter((t) => t.name === name).map((t) => {
936
+ const cell = byKey.get(t.cell);
937
+ return [cell ? label(cell) : t.cell, observedLine(t)];
938
+ });
939
+ const w = Math.max(...rows.map(([who]) => who.length));
940
+ for (const [who, line] of rows) lines.push({
941
+ depth: 2,
942
+ text: `${who.padEnd(w)} ${line}`
943
+ });
944
+ }
945
+ return lines;
946
+ }
947
+ /** `3 passed · 1 failed · 1 ran`, from the suite's tally. */
948
+ function tallyText(suite) {
949
+ const t = suite.tally;
950
+ return [
951
+ t.errors ? plural(t.errors, "run error") : "",
952
+ t.fail ? `${t.fail} failed` : "",
953
+ t.infraError ? plural(t.infraError, "infra error") : "",
954
+ t.canceled ? `${t.canceled} canceled` : "",
955
+ t.pass ? `${t.pass} passed` : "",
956
+ t.notGated ? `${t.notGated} ran` : "",
957
+ t.skipped ? `${t.skipped} skipped` : ""
958
+ ].filter(Boolean).join(" · ");
959
+ }
960
+ function statusList(input) {
961
+ const { record, suite } = input;
962
+ const { shown, hidden } = shownRemarks(input.remarks?.remarks ?? [], suite.runId, input.verbose);
963
+ const files = suite.files.map((f) => ({
964
+ path: f.path,
965
+ rows: f.evals.map((e) => evalRow(record, e, shown.filter((r) => r.evalId === e.path), input.verbose))
966
+ }));
967
+ const tokens = formatUsage(record.cost.usage);
968
+ const done = [
969
+ `Done in ${formatDuration(record.durationMs)}`,
970
+ tallyText(suite) || "nothing ran",
971
+ tokens
972
+ ].filter(Boolean).join(" · ");
973
+ const notes = [
974
+ ...input.notRun ? [`Incomplete: ${plural(input.notRun, "attempt")} this resume’s filters left out ${input.notRun === 1 ? "is" : "are"} not run; reeval run --resume ${record.runId} runs ${input.notRun === 1 ? "it" : "them"}`] : [],
975
+ ...record.status === "budget" && !input.notRun ? ["Budget reached: attempts that hadn’t started were skipped"] : [],
976
+ ...record.status === "interrupted" && !input.notRun ? ["Interrupted: attempts that hadn’t finished were canceled"] : []
977
+ ];
978
+ return {
979
+ files,
980
+ errors: suite.errors,
981
+ done,
982
+ notes,
983
+ hiddenRemarks: hidden
984
+ };
985
+ }
986
+ /** The pointers under the closing line: the studio and the run's summary.md. */
987
+ const pointerLine = (summaryPath) => `Browse it: reeval studio · summary ${summaryPath}`;
988
+ // src/ui/list.ts
989
+ const ICON = {
990
+ queued: "·",
991
+ running: "◌",
992
+ failing: "◌",
993
+ pass: "✓",
994
+ fail: "✗",
995
+ observe: "●",
996
+ skipped: "–",
997
+ canceled: "○"
998
+ };
999
+ /** The spinner the interactive list draws a running eval with. */
1000
+ const SPINNER = [
1001
+ "⠋",
1002
+ "⠙",
1003
+ "⠹",
1004
+ "⠸",
1005
+ "⠼",
1006
+ "⠴",
1007
+ "⠦",
1008
+ "⠧",
1009
+ "⠇",
1010
+ "⠏"
1011
+ ];
1012
+ function paintIcon(c, icon, glyph = ICON[icon]) {
1013
+ if (icon === "pass") return c.green(glyph);
1014
+ if (icon === "fail" || icon === "failing") return c.red(glyph);
1015
+ if (icon === "running") return c.teal(glyph);
1016
+ if (icon === "canceled") return c.yellow(glyph);
1017
+ if (icon === "observe") return c.blue(glyph);
1018
+ return c.dim(glyph);
1019
+ }
1020
+ const MARK = {
1021
+ spin: ICON.running,
1022
+ pass: ICON.pass,
1023
+ fail: ICON.fail,
1024
+ miss: ICON.fail,
1025
+ error: ICON.fail,
1026
+ queued: ICON.queued,
1027
+ skipped: ICON.skipped
1028
+ };
1029
+ function detailSegments(c, line, glyph) {
1030
+ const mark = line.mark;
1031
+ const markPaint = mark === "pass" ? c.green : mark === "fail" || mark === "error" ? c.red : mark === "spin" ? c.teal : c.dim;
1032
+ const textPaint = line.tone === "red" ? c.red : line.tone === "dim" ? c.dim : line.tone === "heading" ? c.bold : (t) => t;
1033
+ return [
1034
+ ...mark ? [{
1035
+ text: `${mark === "spin" && glyph ? glyph : MARK[mark]} `,
1036
+ paint: markPaint
1037
+ }] : [],
1038
+ {
1039
+ text: line.text,
1040
+ paint: textPaint
1041
+ },
1042
+ ...line.note ? [{
1043
+ text: ` · ${line.note}`,
1044
+ paint: c.dim
1045
+ }] : []
1046
+ ];
1047
+ }
1048
+ function paintDetail(c, line, glyph) {
1049
+ const parts = detailSegments(c, line, glyph).map((s) => s.text ? s.paint(s.text) : "");
1050
+ return `${" ".repeat(line.depth)}${parts.join("")}`;
1051
+ }
1052
+ const NAME_MAX = 60;
1053
+ /** The name column's width in a file: its longest name, at most `NAME_MAX`. */
1054
+ const nameWidth = (rows) => Math.min(NAME_MAX, Math.max(0, ...rows.map((r) => r.name.length)));
1055
+ const fit = (name, width) => name.length > width ? `${name.slice(0, width - 1)}…` : name.padEnd(width);
1056
+ const rowText = (c, row, width, glyph) => `${paintIcon(c, row.icon, glyph)} ${fit(row.name, width)} ${c.dim(row.summary)}`.trimEnd();
1057
+ /** Each file's heading and rows, a blank line between files. */
1058
+ function fileLines(files, o) {
1059
+ const c = o.colors;
1060
+ const out = [];
1061
+ for (const [i, file] of files.entries()) {
1062
+ if (i) out.push("");
1063
+ out.push(c.bold(file.path));
1064
+ const width = nameWidth(file.rows);
1065
+ for (const [j, row] of file.rows.entries()) {
1066
+ const last = j === file.rows.length - 1;
1067
+ const branch = o.glyphs ? c.dim(last ? "└─ " : "├─ ") : " ";
1068
+ out.push(`${branch}${rowText(c, row, width)}`);
1069
+ if (!o.expand(row)) continue;
1070
+ const down = o.glyphs ? c.dim(last ? " " : "│ ") : " ";
1071
+ for (const line of shownDetail(row.detail, o.full ?? false)) out.push(`${down}${paintDetail(c, line)}`.trimEnd());
1072
+ }
1073
+ }
1074
+ return out;
1075
+ }
1076
+ /**
1077
+ * The whole list once, as the run ends: failures, compares and evals with remarks expanded (with `-v`, every
1078
+ * row), other passes on one line each. `full` adds the detail the interactive list keeps behind
1079
+ * `→ more` (the rest of each message, file excerpts, snapshots); `-v` implies it.
1080
+ */
1081
+ function listLines(list, c, glyphs, pointer, verbose = false, full = verbose) {
1082
+ const expand = (row) => row.detail.length > 0 && (verbose || row.compare || row.answers || row.remarks > 0 || row.icon === "fail" || row.icon === "canceled");
1083
+ return [
1084
+ ...list.errors.flatMap((e) => [c.red(`error: ${e.split("\n")[0] ?? ""}`)]),
1085
+ ...list.errors.length ? [""] : [],
1086
+ ...fileLines(list.files, {
1087
+ colors: c,
1088
+ glyphs,
1089
+ expand,
1090
+ full
1091
+ }),
1092
+ "",
1093
+ ...list.hiddenRemarks ? [c.dim(`+${plural(list.hiddenRemarks, "more remark")} (-v)`)] : [],
1094
+ ...list.notes.map((n) => c.yellow(n)),
1095
+ list.done,
1096
+ c.dim(pointer)
1097
+ ];
1098
+ }
1099
+ /**
1100
+ * Whether some cell's ended attempts already miss its gate, whatever its other attempts do: under
1101
+ * `all` any fail or error, under `{ passRate }` once the passes it can still reach fall short. A
1102
+ * `minLift` is decided only from the record.
1103
+ */
1104
+ function gateMissed(attempts) {
1105
+ const unplaced = attempts.filter((a) => !a.cell).length;
1106
+ const cells = /* @__PURE__ */ new Map();
1107
+ for (const a of attempts) if (a.cell) cells.set(a.cell, [...cells.get(a.cell) ?? [], a]);
1108
+ return [...cells.values()].some((own) => {
1109
+ const gate = own[0]?.gate ?? "all";
1110
+ const failed = own.filter((a) => a.state === "fail").length;
1111
+ const errored = own.filter((a) => a.state === "error").length;
1112
+ if (gate === "all" || gate === "none") return failed + errored > 0;
1113
+ const passed = own.filter((a) => a.state === "pass").length;
1114
+ const left = own.filter((a) => a.state === "running").length + unplaced;
1115
+ const best = passed + left + failed;
1116
+ return best > 0 ? (passed + left) / best < gate.passRate : errored > 0;
1117
+ });
1118
+ }
1119
+ const ended = (a) => a.state !== "queued" && a.state !== "running";
1120
+ const counted = (a) => a.state !== "skipped" && a.state !== "canceled";
1121
+ /** A case's attempts in one cell: `2 of 2` once they've ended, else how far they've got. */
1122
+ function liveCell(own) {
1123
+ if (!own.length) return "–";
1124
+ const passed = own.filter((a) => a.state === "pass").length;
1125
+ const total = own.filter(counted).length;
1126
+ if (own.every(ended)) return total ? `${passed} of ${total}` : "–";
1127
+ if (!own.some(ended)) return own.some((a) => a.state === "running") ? "running" : "queued";
1128
+ return `${passed} of ${own.length} so far`;
1129
+ }
1130
+ /** A case's mark: spinning while an attempt runs, then its outcome once every attempt ended. */
1131
+ function liveMark(own, failedEval) {
1132
+ if (own.some((a) => a.state === "running")) return "spin";
1133
+ if (!own.every(ended)) return "queued";
1134
+ if (!own.some(counted)) return "skipped";
1135
+ return !own.some((a) => a.gated && (a.state === "fail" || a.state === "error")) ? "pass" : failedEval ? "fail" : "miss";
1136
+ }
1137
+ /**
1138
+ * The case table while an eval with cases runs, shaped as the finished one: a row per case and a
1139
+ * column per cell, the control first, each filling in as its attempts end.
1140
+ */
1141
+ function caseLines(attempts, failedEval) {
1142
+ const places = /* @__PURE__ */ new Map();
1143
+ for (const a of attempts) if (a.cell && a.place && !places.has(a.cell)) places.set(a.cell, a.place);
1144
+ const label = heading([...places.values()]);
1145
+ const heads = /* @__PURE__ */ new Map();
1146
+ const control = (a) => Number(a.place?.role === "control");
1147
+ for (const a of [...attempts].sort((x, y) => control(y) - control(x))) if (a.cell && !heads.has(a.cell)) heads.set(a.cell, a.place ? label(a.place) : a.axes);
1148
+ const cases = [...new Set(attempts.flatMap((a) => a.case === void 0 ? [] : [a.case]))];
1149
+ const of = (name) => attempts.filter((a) => a.case === name);
1150
+ const table = columns([["case", ...heads.values()], ...cases.map((name) => [name, ...[...heads.keys()].map((cell) => liveCell(of(name).filter((a) => a.cell === cell)))])]);
1151
+ return [{
1152
+ depth: 0,
1153
+ text: ` ${table[0] ?? ""}`,
1154
+ tone: "dim",
1155
+ cases: "head"
1156
+ }, ...cases.map((name, i) => {
1157
+ const failures = of(name).filter((a) => a.state === "fail" || a.state === "error");
1158
+ const first = failures.find((a) => a.error)?.error;
1159
+ const more = failures.length > 1 ? ` (+${failures.length - 1} more)` : "";
1160
+ return {
1161
+ depth: 0,
1162
+ text: table[i + 1] ?? "",
1163
+ mark: liveMark(of(name), failedEval),
1164
+ cases: "row",
1165
+ ...first ? { note: `${first}${more}` } : {}
1166
+ };
1167
+ })];
1168
+ }
1169
+ /**
1170
+ * A cell's column heading, as the finished case table words it: on a compare the control's
1171
+ * environment or the variant, with the harness when there are several; else the harness, with the
1172
+ * environment and sandbox where the cells differ in them.
1173
+ */
1174
+ function heading(cells) {
1175
+ const several = (part) => new Set(cells.map(part)).size > 1;
1176
+ const harnesses = several((c) => c.harness);
1177
+ const envs = several((c) => c.environment);
1178
+ const sandboxes = several((c) => c.sandbox);
1179
+ if (cells.some((c) => c.role === "variant")) return (c) => [c.role === "control" ? `${c.environment} (control)` : c.variant ?? c.environment, harnesses ? c.harness : ""].filter(Boolean).join(" · ");
1180
+ return (c) => [
1181
+ c.harness,
1182
+ envs ? `in ${c.environment}` : "",
1183
+ sandboxes ? `on ${c.sandbox}` : ""
1184
+ ].filter(Boolean).join(" ");
1185
+ }
1186
+ /** The list while a run goes, from its events: each eval's attempts and where they are. */
1187
+ var LiveList = class {
1188
+ #evals = /* @__PURE__ */ new Map();
1189
+ #byKey = /* @__PURE__ */ new Map();
1190
+ #harness;
1191
+ constructor(harness) {
1192
+ this.#harness = harness;
1193
+ }
1194
+ collected(file, evals) {
1195
+ for (const x of evals) {
1196
+ if (x.skipped) continue;
1197
+ const family = x.attempt?.family;
1198
+ const id = family?.id ?? x.id;
1199
+ const e = this.#evals.get(id) ?? {
1200
+ id,
1201
+ file,
1202
+ name: [...x.group, family?.name ?? x.name].join(" › "),
1203
+ attempts: []
1204
+ };
1205
+ const planned = x.attempt;
1206
+ const a = {
1207
+ key: x.key,
1208
+ axes: planned ? attemptAxes(planned, this.#harness) : "",
1209
+ n: planned?.n ?? e.attempts.length + 1,
1210
+ state: "queued",
1211
+ gated: planned?.gate !== "none",
1212
+ phase: "",
1213
+ ...planned ? {
1214
+ cell: planned.cell.key,
1215
+ gate: planned.gate,
1216
+ place: planned.cell
1217
+ } : {},
1218
+ ...family ? { case: caseLabel(family.name, x.name) } : {}
1219
+ };
1220
+ e.attempts.push(a);
1221
+ this.#byKey.set(x.key, a);
1222
+ this.#evals.set(id, e);
1223
+ }
1224
+ }
1225
+ start(ref) {
1226
+ const a = this.#byKey.get(ref.key);
1227
+ if (!a) return;
1228
+ a.state = "running";
1229
+ a.n = ref.attempt?.n ?? a.n;
1230
+ a.axes = attemptAxes(ref.attempt, this.#harness);
1231
+ a.gated = ref.attempt?.gate !== "none";
1232
+ if (ref.attempt) {
1233
+ a.cell = ref.attempt.cell.key;
1234
+ a.gate = ref.attempt.gate;
1235
+ a.place ??= ref.attempt.cell;
1236
+ }
1237
+ a.phase = phaseOf(void 0);
1238
+ }
1239
+ progress(key, progress) {
1240
+ const a = this.#byKey.get(key);
1241
+ if (a && progress.kind !== "warning") a.phase = phaseOf(progress);
1242
+ }
1243
+ end(result) {
1244
+ const a = this.#byKey.get(result.key);
1245
+ if (!a) return;
1246
+ const outcome = outcomeOf(result);
1247
+ a.gated = result.attempt?.gate !== "none";
1248
+ if (result.attempt) {
1249
+ a.cell = result.attempt.cell.key;
1250
+ a.gate = result.attempt.gate;
1251
+ a.place ??= result.attempt.cell;
1252
+ }
1253
+ a.state = outcome === "pass" ? "pass" : outcome === "skipped" ? "skipped" : outcome === "canceled" ? "canceled" : outcome === "fail" ? "fail" : "error";
1254
+ if (a.state === "fail" || a.state === "error") a.error = failureReason(result) || void 0;
1255
+ }
1256
+ /**
1257
+ * Evals with every attempt ended, and evals in all; of the ended ones, those that failed, and of
1258
+ * the rest, those with a run that already failed (`failing`), which isn't their outcome yet.
1259
+ */
1260
+ counts() {
1261
+ const rows = [...this.#evals.values()].map((e) => this.#row(e).icon);
1262
+ const all = [...this.#evals.values()];
1263
+ const finished = (e) => e.attempts.every((a) => a.state !== "queued" && a.state !== "running");
1264
+ return {
1265
+ done: all.filter(finished).length,
1266
+ total: all.length,
1267
+ running: all.filter((e) => e.attempts.some((a) => a.state === "running")).length,
1268
+ failed: rows.filter((i) => i === "fail").length,
1269
+ failing: rows.filter((i) => i === "failing").length
1270
+ };
1271
+ }
1272
+ files() {
1273
+ const by = /* @__PURE__ */ new Map();
1274
+ for (const e of this.#evals.values()) {
1275
+ const rows = by.get(e.file) ?? [];
1276
+ rows.push(this.#row(e));
1277
+ by.set(e.file, rows);
1278
+ }
1279
+ return [...by].sort(([a], [b]) => a < b ? -1 : a > b ? 1 : 0).map(([path, rows]) => ({
1280
+ path,
1281
+ rows
1282
+ }));
1283
+ }
1284
+ #row(e) {
1285
+ const ended = e.attempts.filter((a) => a.state !== "queued" && a.state !== "running");
1286
+ const running = e.attempts.some((a) => a.state === "running");
1287
+ const decide = e.attempts.some((a) => a.gated) ? e.attempts.filter((a) => a.gated) : e.attempts;
1288
+ const failed = gateMissed(decide);
1289
+ const done = ended.length === e.attempts.length;
1290
+ const icon = !done ? failed ? "failing" : running || ended.length ? "running" : "queued" : failed ? "fail" : decide.every((a) => !a.gated) ? "observe" : "pass";
1291
+ const passed = decide.filter((a) => a.state === "pass").length;
1292
+ const cases = new Set(e.attempts.flatMap((a) => a.case === void 0 ? [] : [a.case])).size;
1293
+ const summary = [done ? `${passed} of ${plural(decide.length, "run")} passed` : `${ended.length} of ${plural(e.attempts.length, "run")} done`, cases ? plural(cases, "case") : ""].filter(Boolean).join(" · ");
1294
+ const detail = cases ? caseLines(e.attempts, failed) : e.attempts.map((a) => this.#attemptLine(a));
1295
+ return {
1296
+ id: e.id,
1297
+ name: e.name,
1298
+ icon,
1299
+ summary,
1300
+ detail,
1301
+ remarks: 0,
1302
+ compare: false
1303
+ };
1304
+ }
1305
+ /** An attempt as a detail line. A failed check is a fail, its message dim; only an error (a timeout, infra) is red. */
1306
+ #attemptLine(a) {
1307
+ const who = `${a.axes || this.#harness}${a.case ? ` · ${a.case}` : ""} #${a.n}`;
1308
+ if (a.state === "running") return {
1309
+ depth: 0,
1310
+ mark: "spin",
1311
+ text: `${who} ${a.phase}`
1312
+ };
1313
+ if (a.state === "queued") return {
1314
+ depth: 0,
1315
+ mark: "queued",
1316
+ text: `${who} queued`,
1317
+ tone: "dim"
1318
+ };
1319
+ if (a.state === "pass") return {
1320
+ depth: 0,
1321
+ mark: "pass",
1322
+ text: `${who} passed`
1323
+ };
1324
+ if (a.state === "skipped" || a.state === "canceled") return {
1325
+ depth: 0,
1326
+ mark: "skipped",
1327
+ text: `${who} ${a.state}`,
1328
+ tone: "dim"
1329
+ };
1330
+ if (a.state === "fail") return {
1331
+ depth: 0,
1332
+ mark: a.gated ? "fail" : "miss",
1333
+ text: `${who} failed`,
1334
+ ...a.error ? { note: a.error } : {}
1335
+ };
1336
+ return {
1337
+ depth: 0,
1338
+ mark: "error",
1339
+ text: `${who} errored${a.error ? `: ${a.error}` : ""}`,
1340
+ tone: "red"
1341
+ };
1342
+ }
1343
+ };
1344
+ /** `… 2 of 5 evals done (3m 05s)`, the line CI prints on a timer while a run goes. */
1345
+ const progressText = (done, total, elapsedMs) => `… ${done} of ${plural(total, "eval")} done (${formatDuration(elapsedMs)})`;
1346
+ export { phaseOf as _, nameWidth as a, pointerLine as c, attemptAxes as d, debugLines as f, outcomeOf as g, offset as h, listLines as i, shownDetail as l, failureLines as m, SPINNER as n, paintIcon as o, errorCheck as p, detailSegments as r, progressText as s, LiveList as t, statusList as u, progressLine as v, tailLines as y };
1347
+
1348
+ //# sourceMappingURL=list-DuThsE28.js.map