@tangle-network/agent-eval 0.216.0 → 0.216.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (384) hide show
  1. package/CHANGELOG.md +39 -0
  2. package/dist/adapters/http.d.ts +3 -3
  3. package/dist/{agent-profile-CIA2Atnt.d.ts → agent-profile-VFcQncbW.d.ts} +5 -5
  4. package/dist/{agent-profile-CIA2Atnt.d.ts.map → agent-profile-VFcQncbW.d.ts.map} +1 -1
  5. package/dist/{agent-profile-cell-BYc0bxsL.js → agent-profile-cell-BK8mlqlq.js} +3 -3
  6. package/dist/{agent-profile-cell-BYc0bxsL.js.map → agent-profile-cell-BK8mlqlq.js.map} +1 -1
  7. package/dist/{agreement-irr-DsTURxdr.js → agreement-irr-BEWLIF3_.js} +3 -3
  8. package/dist/{agreement-irr-DsTURxdr.js.map → agreement-irr-BEWLIF3_.js.map} +1 -1
  9. package/dist/analyst/index.d.ts +14 -14
  10. package/dist/analyst/index.d.ts.map +1 -1
  11. package/dist/analyst/index.js +15 -15
  12. package/dist/{analyze-runs-3xpby3p2.js → analyze-runs-C84irm4i.js} +608 -604
  13. package/dist/analyze-runs-C84irm4i.js.map +1 -0
  14. package/dist/{analyze-runs-CSDAh8A7.d.ts → analyze-runs-D68fd-su.d.ts} +17 -15
  15. package/dist/analyze-runs-D68fd-su.d.ts.map +1 -0
  16. package/dist/{baseline-Dm8966du.js → baseline-Udi_PLuT.js} +5 -5
  17. package/dist/{baseline-Dm8966du.js.map → baseline-Udi_PLuT.js.map} +1 -1
  18. package/dist/{benchmark-BywPeAUo.js → benchmark-CXmVVHH2.js} +2 -2
  19. package/dist/{benchmark-BywPeAUo.js.map → benchmark-CXmVVHH2.js.map} +1 -1
  20. package/dist/{benchmark-command-CByl9dxG.js → benchmark-command-By0vh8q7.js} +62 -45
  21. package/dist/benchmark-command-By0vh8q7.js.map +1 -0
  22. package/dist/benchmarks/index.d.ts +5 -5
  23. package/dist/benchmarks/index.js +3 -3
  24. package/dist/builder-eval/index.js +2 -2
  25. package/dist/campaign/index.d.ts +7 -7
  26. package/dist/campaign/index.js +13 -13
  27. package/dist/{campaign-BQ-Jujuj.js → campaign-BudZ70zo.js} +245 -247
  28. package/dist/campaign-BudZ70zo.js.map +1 -0
  29. package/dist/{campaign-evidence-OcUciD-N.js → campaign-evidence-Clrn4hBV.js} +8 -8
  30. package/dist/campaign-evidence-Clrn4hBV.js.map +1 -0
  31. package/dist/{canonical-BsZVgBhW.js → canonical-B2RqLofv.js} +2 -2
  32. package/dist/{canonical-BsZVgBhW.js.map → canonical-B2RqLofv.js.map} +1 -1
  33. package/dist/{chat-client-DthPOYGd.js → chat-client-l-MVDlDk.js} +2 -2
  34. package/dist/{chat-client-DthPOYGd.js.map → chat-client-l-MVDlDk.js.map} +1 -1
  35. package/dist/{chat-json-call-BrKsyspg.js → chat-json-call-puMArmtW.js} +2 -2
  36. package/dist/{chat-json-call-BrKsyspg.js.map → chat-json-call-puMArmtW.js.map} +1 -1
  37. package/dist/{claim-BXcZw-jo.js → claim-q4HQhK1G.js} +4 -4
  38. package/dist/claim-q4HQhK1G.js.map +1 -0
  39. package/dist/cli.js +9 -9
  40. package/dist/cli.js.map +1 -1
  41. package/dist/{cluster-bootstrap-B3JywQQn.js → cluster-bootstrap-qcUWYFl-.js} +3 -3
  42. package/dist/{cluster-bootstrap-B3JywQQn.js.map → cluster-bootstrap-qcUWYFl-.js.map} +1 -1
  43. package/dist/contract/index.d.ts +11 -11
  44. package/dist/contract/index.js +1022 -1078
  45. package/dist/contract/index.js.map +1 -1
  46. package/dist/{cost-ledger-D2FnJPBF.js → cost-ledger-BP8V4kUQ.js} +835 -816
  47. package/dist/cost-ledger-BP8V4kUQ.js.map +1 -0
  48. package/dist/{cost-ledger-CO7UyEcQ.d.ts → cost-ledger-Jk62OBfF.d.ts} +12 -47
  49. package/dist/cost-ledger-Jk62OBfF.d.ts.map +1 -0
  50. package/dist/{counterfactual-DtMWvn7D.js → counterfactual-Dn3veueY.js} +2 -2
  51. package/dist/{counterfactual-DtMWvn7D.js.map → counterfactual-Dn3veueY.js.map} +1 -1
  52. package/dist/{default-registry-Cn1LQ2Ve.js → default-registry-COhk9g36.js} +5 -5
  53. package/dist/{default-registry-Cn1LQ2Ve.js.map → default-registry-COhk9g36.js.map} +1 -1
  54. package/dist/{default-registry-BrWh62zf.d.ts → default-registry-DzHiGruW.d.ts} +6 -6
  55. package/dist/{default-registry-BrWh62zf.d.ts.map → default-registry-DzHiGruW.d.ts.map} +1 -1
  56. package/dist/{define-agent-eval-Ch3MWX6k.js → define-agent-eval-CNTPzIkp.js} +10 -10
  57. package/dist/define-agent-eval-CNTPzIkp.js.map +1 -0
  58. package/dist/{define-agent-eval-CEWkX5wZ.d.ts → define-agent-eval-WSck0CZJ.d.ts} +8 -8
  59. package/dist/{define-agent-eval-CEWkX5wZ.d.ts.map → define-agent-eval-WSck0CZJ.d.ts.map} +1 -1
  60. package/dist/{descriptive-CnU8Yq29.js → descriptive-DboxPZrG.js} +2 -2
  61. package/dist/{descriptive-CnU8Yq29.js.map → descriptive-DboxPZrG.js.map} +1 -1
  62. package/dist/diagnosis/index.d.ts +3 -3
  63. package/dist/diagnosis/index.js +4 -4
  64. package/dist/{dspy-rlm-engine-D-KX_e64.js → dspy-rlm-engine-LRCu61m5.js} +3 -3
  65. package/dist/{dspy-rlm-engine-D-KX_e64.js.map → dspy-rlm-engine-LRCu61m5.js.map} +1 -1
  66. package/dist/{effect-sizes-DiH8MGOH.js → effect-sizes-BhzEpXMc.js} +2 -2
  67. package/dist/{effect-sizes-DiH8MGOH.js.map → effect-sizes-BhzEpXMc.js.map} +1 -1
  68. package/dist/{engine-C_zNWfM8.d.ts → engine-3A_4jOlI.d.ts} +5 -5
  69. package/dist/{engine-C_zNWfM8.d.ts.map → engine-3A_4jOlI.d.ts.map} +1 -1
  70. package/dist/{equal-terms-Blx9Zk5I.js → equal-terms-BtdXayCJ.js} +2 -2
  71. package/dist/{equal-terms-Blx9Zk5I.js.map → equal-terms-BtdXayCJ.js.map} +1 -1
  72. package/dist/{errors-Dngq5h35.js → errors-DVZiqS7K.js} +6 -2
  73. package/dist/{errors-Dngq5h35.js.map → errors-DVZiqS7K.js.map} +1 -1
  74. package/dist/{eval-campaign-4byTtqrf.js → eval-campaign-90jeaCAI.js} +6 -6
  75. package/dist/{eval-campaign-4byTtqrf.js.map → eval-campaign-90jeaCAI.js.map} +1 -1
  76. package/dist/{evaluation-Cn2dRZIz.d.ts → evaluation-6Yoi74gM.d.ts} +4 -4
  77. package/dist/{evaluation-Cn2dRZIz.d.ts.map → evaluation-6Yoi74gM.d.ts.map} +1 -1
  78. package/dist/evaluation.d.ts +1 -1
  79. package/dist/evaluation.js +1 -1
  80. package/dist/{exact-types-CD0lf5Qd.d.ts → exact-types-ClugMJfI.d.ts} +2 -2
  81. package/dist/{exact-types-CD0lf5Qd.d.ts.map → exact-types-ClugMJfI.d.ts.map} +1 -1
  82. package/dist/experiment/index.d.ts +404 -3
  83. package/dist/experiment/index.d.ts.map +1 -1
  84. package/dist/experiment/index.js +313 -19
  85. package/dist/experiment/index.js.map +1 -1
  86. package/dist/{external-optimizer-process-nnsY5D_4.js → external-optimizer-process-BjMGUuds.js} +3 -3
  87. package/dist/{external-optimizer-process-nnsY5D_4.js.map → external-optimizer-process-BjMGUuds.js.map} +1 -1
  88. package/dist/{external-optimizer-subprocess-DcerlZSG.js → external-optimizer-subprocess-BqW0hHcI.js} +548 -548
  89. package/dist/external-optimizer-subprocess-BqW0hHcI.js.map +1 -0
  90. package/dist/{feedback-trajectory-DkaDj0dj.d.ts → feedback-trajectory-C4EG0nNH.d.ts} +5 -8
  91. package/dist/feedback-trajectory-C4EG0nNH.d.ts.map +1 -0
  92. package/dist/fuzz.d.ts +1 -1
  93. package/dist/fuzz.js +3 -3
  94. package/dist/hosted/index.js +1 -1
  95. package/dist/{index-CPJJr98o.d.ts → index-BFRO6chs.d.ts} +3 -2
  96. package/dist/index-BFRO6chs.d.ts.map +1 -0
  97. package/dist/{index-Ch9VxCpK.d.ts → index-BO41eGj5.d.ts} +2 -2
  98. package/dist/{index-Ch9VxCpK.d.ts.map → index-BO41eGj5.d.ts.map} +1 -1
  99. package/dist/{index-NvGBiO8H.d.ts → index-CyszSg4O.d.ts} +165 -162
  100. package/dist/index-CyszSg4O.d.ts.map +1 -0
  101. package/dist/{index-DlH0Y9gI.d.ts → index-DPcngtwt.d.ts} +30 -17
  102. package/dist/index-DPcngtwt.d.ts.map +1 -0
  103. package/dist/{index-oQ4aHziK.d.ts → index-DV-jSzxF.d.ts} +8 -8
  104. package/dist/{index-oQ4aHziK.d.ts.map → index-DV-jSzxF.d.ts.map} +1 -1
  105. package/dist/index.d.ts +1969 -1871
  106. package/dist/index.d.ts.map +1 -1
  107. package/dist/index.js +161 -201
  108. package/dist/index.js.map +1 -1
  109. package/dist/{integrity-BvnVARVl.js → integrity-BXOsAb3i.js} +2 -2
  110. package/dist/{integrity-BvnVARVl.js.map → integrity-BXOsAb3i.js.map} +1 -1
  111. package/dist/{integrity-CCAxGVK6.d.ts → integrity-DAMEDFaC.d.ts} +2 -2
  112. package/dist/{integrity-CCAxGVK6.d.ts.map → integrity-DAMEDFaC.d.ts.map} +1 -1
  113. package/dist/{integrity-BV1ZDf42.js → integrity-dLiDe2kD.js} +2 -5
  114. package/dist/integrity-dLiDe2kD.js.map +1 -0
  115. package/dist/{internal-CRHwS9iz.js → internal-Epl-YBZW.js} +3 -3
  116. package/dist/{internal-CRHwS9iz.js.map → internal-Epl-YBZW.js.map} +1 -1
  117. package/dist/interval-CELpye1n.js +219 -0
  118. package/dist/interval-CELpye1n.js.map +1 -0
  119. package/dist/interval-ohuOJurX.d.ts +47 -0
  120. package/dist/interval-ohuOJurX.d.ts.map +1 -0
  121. package/dist/{journal-DvKCvjty.js → journal-DfRz9kps.js} +2 -2
  122. package/dist/{journal-DvKCvjty.js.map → journal-DfRz9kps.js.map} +1 -1
  123. package/dist/{judge-calibration-N44V04Se.js → judge-calibration-BpCy5XQl.js} +3 -3
  124. package/dist/{judge-calibration-N44V04Se.js.map → judge-calibration-BpCy5XQl.js.map} +1 -1
  125. package/dist/{judge-gate-DNcUrRFA.d.ts → judge-gate-CE7CQAgt.d.ts} +3 -3
  126. package/dist/{judge-gate-DNcUrRFA.d.ts.map → judge-gate-CE7CQAgt.d.ts.map} +1 -1
  127. package/dist/{judge-gate-B1qYnkpi.js → judge-gate-iY9s4L44.js} +3 -3
  128. package/dist/judge-gate-iY9s4L44.js.map +1 -0
  129. package/dist/{kind-factory-CbZ-6tvu.js → kind-factory-BobI5Jy3.js} +4 -4
  130. package/dist/{kind-factory-CbZ-6tvu.js.map → kind-factory-BobI5Jy3.js.map} +1 -1
  131. package/dist/ledger-core/index.js +3 -3
  132. package/dist/{ledger-core-B2hahzrt.js → ledger-core-Gq7yp8lP.js} +4 -4
  133. package/dist/{ledger-core-B2hahzrt.js.map → ledger-core-Gq7yp8lP.js.map} +1 -1
  134. package/dist/{llm-client-DQveoxSM.js → llm-client-CyBAoYiX.js} +192 -219
  135. package/dist/llm-client-CyBAoYiX.js.map +1 -0
  136. package/dist/{llm-judge-PXV7Xljl.js → llm-judge-CG12SQJq.js} +499 -921
  137. package/dist/llm-judge-CG12SQJq.js.map +1 -0
  138. package/dist/matrix/index.d.ts +2 -2
  139. package/dist/matrix/index.js +1 -1
  140. package/dist/{matrix-CHMiebFx.d.ts → matrix-DSrSxjjy.d.ts} +4 -4
  141. package/dist/{matrix-CHMiebFx.d.ts.map → matrix-DSrSxjjy.d.ts.map} +1 -1
  142. package/dist/{matrix-_BV9-Lk5.js → matrix-Dm0BQW7U.js} +7 -11
  143. package/dist/matrix-Dm0BQW7U.js.map +1 -0
  144. package/dist/{paired-tests-jbwPdSz5.js → mean-DHoMiudD.js} +11 -5
  145. package/dist/mean-DHoMiudD.js.map +1 -0
  146. package/dist/meta-eval/index.d.ts +3 -3
  147. package/dist/meta-eval/index.js +9 -9
  148. package/dist/meta-eval/index.js.map +1 -1
  149. package/dist/mint-DNU8QPG4.d.ts +81 -0
  150. package/dist/mint-DNU8QPG4.d.ts.map +1 -0
  151. package/dist/{mint-Csor1BLJ.js → mint-QaD5cA0u.js} +3 -3
  152. package/dist/{mint-Csor1BLJ.js.map → mint-QaD5cA0u.js.map} +1 -1
  153. package/dist/{multiplicity-D9cjmStq.js → multiplicity-DQUFcbW4.js} +2 -2
  154. package/dist/{multiplicity-D9cjmStq.js.map → multiplicity-DQUFcbW4.js.map} +1 -1
  155. package/dist/multishot/golden/index.d.ts +1 -1
  156. package/dist/multishot/golden/index.d.ts.map +1 -1
  157. package/dist/multishot/golden/index.js +3 -6
  158. package/dist/multishot/golden/index.js.map +1 -1
  159. package/dist/multishot/index.d.ts +2 -2
  160. package/dist/multishot/index.js +1 -1
  161. package/dist/nonnegative-number-DvdMxg_f.js +9 -0
  162. package/dist/nonnegative-number-DvdMxg_f.js.map +1 -0
  163. package/dist/openapi.json +1 -1
  164. package/dist/{otel-spans-C8YIJWy1.js → otel-spans-B9tUXRHF.js} +3 -3
  165. package/dist/{otel-spans-C8YIJWy1.js.map → otel-spans-B9tUXRHF.js.map} +1 -1
  166. package/dist/{paired-arms-DzKn0TfY.js → paired-arms-CwMGJsrS.js} +5 -5
  167. package/dist/{paired-arms-DzKn0TfY.js.map → paired-arms-CwMGJsrS.js.map} +1 -1
  168. package/dist/{paired-binary-Q36bhn2R.js → paired-binary-CvpFHfKZ.js} +2 -2
  169. package/dist/{paired-binary-Q36bhn2R.js.map → paired-binary-CvpFHfKZ.js.map} +1 -1
  170. package/dist/{paired-promotion-decision-BN6IQTiu.js → paired-promotion-decision-DsAPYGCm.js} +3 -3
  171. package/dist/{paired-promotion-decision-BN6IQTiu.js.map → paired-promotion-decision-DsAPYGCm.js.map} +1 -1
  172. package/dist/{search-kernel-BztlERLv.js → pareto-Cm6ndrWN.js} +883 -861
  173. package/dist/pareto-Cm6ndrWN.js.map +1 -0
  174. package/dist/pipelines/index.d.ts +2 -2
  175. package/dist/pipelines/index.js +3 -3
  176. package/dist/{power-and-mde-fK5Qocwo.js → power-and-mde-Hj2ubb4B.js} +2 -2
  177. package/dist/{power-and-mde-fK5Qocwo.js.map → power-and-mde-Hj2ubb4B.js.map} +1 -1
  178. package/dist/predicate-FdKmElA_.js +38 -0
  179. package/dist/predicate-FdKmElA_.js.map +1 -0
  180. package/dist/{prime-protocol-DcAK9pC8.js → prime-protocol-CHKgA3a6.js} +2 -2
  181. package/dist/{prime-protocol-DcAK9pC8.js.map → prime-protocol-CHKgA3a6.js.map} +1 -1
  182. package/dist/{prime-protocol-CEE4BR9N.d.ts → prime-protocol-HiB9HX7E.d.ts} +3 -3
  183. package/dist/{prime-protocol-CEE4BR9N.d.ts.map → prime-protocol-HiB9HX7E.d.ts.map} +1 -1
  184. package/dist/{produced-state-ZCtDBxAE.js → produced-state-BsDmnwxc.js} +8 -8
  185. package/dist/{produced-state-ZCtDBxAE.js.map → produced-state-BsDmnwxc.js.map} +1 -1
  186. package/dist/profile-cell.js +1 -1
  187. package/dist/{release-confidence-BK2QCB5M.d.ts → promotion-gate-BawrdPYr.d.ts} +102 -102
  188. package/dist/promotion-gate-BawrdPYr.d.ts.map +1 -0
  189. package/dist/{promotion-policy-CWW35UWq.js → promotion-policy-KO57gbyV.js} +4 -4
  190. package/dist/{promotion-policy-CWW35UWq.js.map → promotion-policy-KO57gbyV.js.map} +1 -1
  191. package/dist/{proposal-findings-BZiMTzAF.js → proposal-findings-CY1xKn_a.js} +2 -2
  192. package/dist/{proposal-findings-BZiMTzAF.js.map → proposal-findings-CY1xKn_a.js.map} +1 -1
  193. package/dist/{query-B1D1qp2Z.js → query-BUCZCK7F.js} +3 -3
  194. package/dist/{query-B1D1qp2Z.js.map → query-BUCZCK7F.js.map} +1 -1
  195. package/dist/{random-Dn5fPWkt.js → random-ByUSnV9w.js} +2 -2
  196. package/dist/{random-Dn5fPWkt.js.map → random-ByUSnV9w.js.map} +1 -1
  197. package/dist/{raw-provider-sink-rB2DYxr6.js → raw-provider-sink-DoHz4JNG.js} +2 -2
  198. package/dist/{raw-provider-sink-rB2DYxr6.js.map → raw-provider-sink-DoHz4JNG.js.map} +1 -1
  199. package/dist/{redact-Dk1ZdJEm.js → redact-B5xXKqQ3.js} +97 -98
  200. package/dist/redact-B5xXKqQ3.js.map +1 -0
  201. package/dist/{redact-Cveoq6fJ.d.ts → redact-mtCCcT8z.d.ts} +4 -20
  202. package/dist/redact-mtCCcT8z.d.ts.map +1 -0
  203. package/dist/{registry-JYfPxcVz.d.ts → registry-D7_hm2fK.d.ts} +5 -5
  204. package/dist/{registry-JYfPxcVz.d.ts.map → registry-D7_hm2fK.d.ts.map} +1 -1
  205. package/dist/{release-confidence-Dbe9AS_X.js → release-confidence-CpuP65S5.js} +5 -5
  206. package/dist/{release-confidence-Dbe9AS_X.js.map → release-confidence-CpuP65S5.js.map} +1 -1
  207. package/dist/{report-command-y8H6RSX8.js → report-command-SC9nqb4M.js} +106 -171
  208. package/dist/report-command-SC9nqb4M.js.map +1 -0
  209. package/dist/reporting-html-Kvlc8oMt.js +100 -0
  210. package/dist/reporting-html-Kvlc8oMt.js.map +1 -0
  211. package/dist/reporting.d.ts +3 -3
  212. package/dist/reporting.js +6 -6
  213. package/dist/{researcher-f6mZhh58.d.ts → researcher-CEcfku-T.d.ts} +5 -5
  214. package/dist/{researcher-f6mZhh58.d.ts.map → researcher-CEcfku-T.d.ts.map} +1 -1
  215. package/dist/reward-CpCmAM8L.d.ts +78 -0
  216. package/dist/reward-CpCmAM8L.d.ts.map +1 -0
  217. package/dist/{reward-hacking-BFcQgkux.js → reward-hacking-E0d-WVcP.js} +2 -2
  218. package/dist/{reward-hacking-BFcQgkux.js.map → reward-hacking-E0d-WVcP.js.map} +1 -1
  219. package/dist/{reward-hacking-DHA7c1l8.d.ts → reward-hacking-RVdZ6Kkt.d.ts} +2 -2
  220. package/dist/{reward-hacking-DHA7c1l8.d.ts.map → reward-hacking-RVdZ6Kkt.d.ts.map} +1 -1
  221. package/dist/rl.d.ts +8 -8
  222. package/dist/rl.js +14 -14
  223. package/dist/rollout/index.d.ts +3 -2
  224. package/dist/rollout/index.js +2 -2
  225. package/dist/{rollout-D9bKKBnZ.js → rollout-DZV1t2Wg.js} +2 -2
  226. package/dist/{rollout-D9bKKBnZ.js.map → rollout-DZV1t2Wg.js.map} +1 -1
  227. package/dist/round-decimal-COrKglMh.js +10 -0
  228. package/dist/round-decimal-COrKglMh.js.map +1 -0
  229. package/dist/{rubric-predictive-validity-2SgHxoa5.d.ts → rubric-predictive-validity-C03EC7ZE.d.ts} +2 -2
  230. package/dist/{rubric-predictive-validity-2SgHxoa5.d.ts.map → rubric-predictive-validity-C03EC7ZE.d.ts.map} +1 -1
  231. package/dist/{rubric-predictive-validity-BsgkBfT0.js → rubric-predictive-validity-DaFW70y9.js} +3 -3
  232. package/dist/{rubric-predictive-validity-BsgkBfT0.js.map → rubric-predictive-validity-DaFW70y9.js.map} +1 -1
  233. package/dist/{run-record-DlTZ_lqe.js → run-record-Boc5IUTp.js} +4 -4
  234. package/dist/{run-record-DlTZ_lqe.js.map → run-record-Boc5IUTp.js.map} +1 -1
  235. package/dist/{run-record-D1Hw-Jml.d.ts → run-record-C1E24G2A.d.ts} +2 -2
  236. package/dist/{run-record-D1Hw-Jml.d.ts.map → run-record-C1E24G2A.d.ts.map} +1 -1
  237. package/dist/{run-record-ES07wfz9.js → run-record-C5e7FjhJ.js} +3 -5
  238. package/dist/run-record-C5e7FjhJ.js.map +1 -0
  239. package/dist/search/index.d.ts +46 -32
  240. package/dist/search/index.d.ts.map +1 -1
  241. package/dist/search/index.js +3 -3
  242. package/dist/{search-kernel-CpcKH5Ih.d.ts → search-kernel-DyNEa6IU.d.ts} +14 -10
  243. package/dist/search-kernel-DyNEa6IU.d.ts.map +1 -0
  244. package/dist/{search-ledger-d7V8o9Lk.js → search-ledger-CVUGLDZp.js} +189 -199
  245. package/dist/search-ledger-CVUGLDZp.js.map +1 -0
  246. package/dist/{search-ledger-file-BqOo-bVo.js → search-ledger-file-DDQUgvCg.js} +4 -4
  247. package/dist/{search-ledger-file-BqOo-bVo.js.map → search-ledger-file-DDQUgvCg.js.map} +1 -1
  248. package/dist/search-ledger-types-p2xKfiDJ.d.ts.map +1 -1
  249. package/dist/{search-shipper-er4pK5_Y.js → search-shipper-BOSD46qv.js} +3 -3
  250. package/dist/{search-shipper-er4pK5_Y.js.map → search-shipper-BOSD46qv.js.map} +1 -1
  251. package/dist/{search-summary-CBvz3u_S.js → search-summary-BQCSWf1g.js} +5 -5
  252. package/dist/{search-summary-CBvz3u_S.js.map → search-summary-BQCSWf1g.js.map} +1 -1
  253. package/dist/{semantic-concept-judge-zQBG9hHU.js → semantic-concept-judge-BQF8te0T.js} +12 -14
  254. package/dist/semantic-concept-judge-BQF8te0T.js.map +1 -0
  255. package/dist/{sequential-D-1PPCmM.js → sequential-Bf_pbE50.js} +5 -5
  256. package/dist/{sequential-D-1PPCmM.js.map → sequential-Bf_pbE50.js.map} +1 -1
  257. package/dist/{sequential-eprocess-D1jKoihe.js → sequential-eprocess-DM_qENCl.js} +2 -2
  258. package/dist/{sequential-eprocess-D1jKoihe.js.map → sequential-eprocess-DM_qENCl.js.map} +1 -1
  259. package/dist/{server-DbcC7xMl.js → server-e9oWO_bN.js} +4 -4
  260. package/dist/{server-DbcC7xMl.js.map → server-e9oWO_bN.js.map} +1 -1
  261. package/dist/{single-run-lock-fVu3MZWH.js → single-run-lock-CV9Eyd_q.js} +2 -2
  262. package/dist/{single-run-lock-fVu3MZWH.js.map → single-run-lock-CV9Eyd_q.js.map} +1 -1
  263. package/dist/{skillopt-optimization-method-CCtzralq.js → skillopt-optimization-method-BiwA8nfX.js} +427 -12
  264. package/dist/skillopt-optimization-method-BiwA8nfX.js.map +1 -0
  265. package/dist/{spans-D9_ehFuk.d.ts → spans-BHAUXMGN.d.ts} +2 -2
  266. package/dist/{spans-D9_ehFuk.d.ts.map → spans-BHAUXMGN.d.ts.map} +1 -1
  267. package/dist/{statistical-heldout-1Gbmex7v.js → statistical-heldout-42NlCNDe.js} +3 -3
  268. package/dist/{statistical-heldout-1Gbmex7v.js.map → statistical-heldout-42NlCNDe.js.map} +1 -1
  269. package/dist/{statistical-heldout-BeR4bOdg.d.ts → statistical-heldout-CYpGaoDH.d.ts} +3 -3
  270. package/dist/{statistical-heldout-BeR4bOdg.d.ts.map → statistical-heldout-CYpGaoDH.d.ts.map} +1 -1
  271. package/dist/{store-otlp-DtB4Slsr.js → store-otlp-DJ9dtA5x.js} +135 -132
  272. package/dist/store-otlp-DJ9dtA5x.js.map +1 -0
  273. package/dist/{store-tool-spans-fZIigrpP.js → store-tool-spans-CIX5arAG.js} +7 -7
  274. package/dist/{store-tool-spans-fZIigrpP.js.map → store-tool-spans-CIX5arAG.js.map} +1 -1
  275. package/dist/{store-tool-spans-DR1SrCLK.d.ts → store-tool-spans-DdCSPa7C.d.ts} +162 -161
  276. package/dist/store-tool-spans-DdCSPa7C.d.ts.map +1 -0
  277. package/dist/storyboard/index.d.ts.map +1 -1
  278. package/dist/storyboard/index.js +20 -3
  279. package/dist/storyboard/index.js.map +1 -1
  280. package/dist/{student-t-BQeKJx2N.js → student-t-DVPW7CdL.js} +2 -2
  281. package/dist/{student-t-BQeKJx2N.js.map → student-t-DVPW7CdL.js.map} +1 -1
  282. package/dist/{summary-report-DtdRucM0.js → summary-report-V_JACR4Y.js} +526 -614
  283. package/dist/summary-report-V_JACR4Y.js.map +1 -0
  284. package/dist/{summary-report-C-CtItCN.d.ts → summary-report-bdFDXq0b.d.ts} +10 -5
  285. package/dist/summary-report-bdFDXq0b.d.ts.map +1 -0
  286. package/dist/supervisor-run/index.d.ts +153 -149
  287. package/dist/supervisor-run/index.d.ts.map +1 -1
  288. package/dist/supervisor-run/index.js +65 -3
  289. package/dist/supervisor-run/index.js.map +1 -1
  290. package/dist/{systemone-CpTLAlqb.d.ts → systemone-BomhHr2c.d.ts} +6 -6
  291. package/dist/{systemone-CpTLAlqb.d.ts.map → systemone-BomhHr2c.d.ts.map} +1 -1
  292. package/dist/systemone-protocol.js +1 -1
  293. package/dist/{systemone-review-B_yo1xsd.d.ts → systemone-review-CUVcQJu6.d.ts} +2 -2
  294. package/dist/{systemone-review-B_yo1xsd.d.ts.map → systemone-review-CUVcQJu6.d.ts.map} +1 -1
  295. package/dist/{systemone-review-BZWfrtq1.js → systemone-review-D7sXwsqq.js} +2 -2
  296. package/dist/{systemone-review-BZWfrtq1.js.map → systemone-review-D7sXwsqq.js.map} +1 -1
  297. package/dist/systemone.d.ts +3 -3
  298. package/dist/systemone.js +4 -4
  299. package/dist/{task-failure-attributes-DngaLdE4.js → task-failure-attributes-hEmASjix.js} +2 -2
  300. package/dist/{task-failure-attributes-DngaLdE4.js.map → task-failure-attributes-hEmASjix.js.map} +1 -1
  301. package/dist/{terminal-record-BHocwFw1.js → terminal-record-DZyQZ3pz.js} +14 -10
  302. package/dist/terminal-record-DZyQZ3pz.js.map +1 -0
  303. package/dist/{tool-groups-mcxOXVlb.d.ts → tool-groups-C3NEcdCM.d.ts} +3 -3
  304. package/dist/tool-groups-C3NEcdCM.d.ts.map +1 -0
  305. package/dist/{tool-waste-Wi4g6Ekb.d.ts → tool-waste-BKgvd-TP.d.ts} +30 -30
  306. package/dist/tool-waste-BKgvd-TP.d.ts.map +1 -0
  307. package/dist/{tool-waste-D52PqU9Q.js → tool-waste-BlesqTqW.js} +4 -4
  308. package/dist/{tool-waste-D52PqU9Q.js.map → tool-waste-BlesqTqW.js.map} +1 -1
  309. package/dist/{trace-questions-DG7nqLQ7.d.ts → trace-questions-CM2CAocU.d.ts} +4 -4
  310. package/dist/{trace-questions-DG7nqLQ7.d.ts.map → trace-questions-CM2CAocU.d.ts.map} +1 -1
  311. package/dist/trace-repair/index.d.ts +3 -3
  312. package/dist/trace-repair/index.d.ts.map +1 -1
  313. package/dist/trace-repair/index.js +7 -13
  314. package/dist/trace-repair/index.js.map +1 -1
  315. package/dist/traces.d.ts +76 -58
  316. package/dist/traces.d.ts.map +1 -1
  317. package/dist/traces.js +9 -9
  318. package/dist/trajectory-replay/index.js +3 -3
  319. package/dist/{tree-rXLW3M_4.js → tree-C1XYeXvy.js} +2277 -2339
  320. package/dist/tree-C1XYeXvy.js.map +1 -0
  321. package/dist/{types-DBZ7keha.d.ts → types-C02qtnG8.d.ts} +4 -46
  322. package/dist/types-C02qtnG8.d.ts.map +1 -0
  323. package/dist/{types-oKRhQAde.d.ts → types-C1tnkEgM.d.ts} +4 -4
  324. package/dist/{types-oKRhQAde.d.ts.map → types-C1tnkEgM.d.ts.map} +1 -1
  325. package/dist/{types-CfZMIzB_.d.ts → types-Cbe2fWBa.d.ts} +3 -3
  326. package/dist/{types-CfZMIzB_.d.ts.map → types-Cbe2fWBa.d.ts.map} +1 -1
  327. package/dist/{types-B4C5nFw6.d.ts → types-Cq8mSbq8.d.ts} +78 -72
  328. package/dist/types-Cq8mSbq8.d.ts.map +1 -0
  329. package/dist/{verdict-DhPoXApk.js → verdict-Dl0tiT1X.js} +2 -2
  330. package/dist/{verdict-DhPoXApk.js.map → verdict-Dl0tiT1X.js.map} +1 -1
  331. package/dist/{verdict-cache-BQEsVy9n.js → verdict-cache-Bm8EKL2s.js} +2 -2
  332. package/dist/{verdict-cache-BQEsVy9n.js.map → verdict-cache-Bm8EKL2s.js.map} +1 -1
  333. package/dist/wire/index.d.ts +3 -3
  334. package/dist/wire/index.js +1 -1
  335. package/docs/design/mlbenchmarks-book-review.md +1 -1
  336. package/docs/design/mlbenchmarks-review/probes.mts +23 -31
  337. package/docs/experiment.md +1 -1
  338. package/package.json +1 -1
  339. package/dist/analyze-runs-3xpby3p2.js.map +0 -1
  340. package/dist/analyze-runs-CSDAh8A7.d.ts.map +0 -1
  341. package/dist/ast-DJ6Bc7ab.js +0 -558
  342. package/dist/ast-DJ6Bc7ab.js.map +0 -1
  343. package/dist/ast-hI-vjW6J.d.ts +0 -457
  344. package/dist/ast-hI-vjW6J.d.ts.map +0 -1
  345. package/dist/benchmark-command-CByl9dxG.js.map +0 -1
  346. package/dist/campaign-BQ-Jujuj.js.map +0 -1
  347. package/dist/campaign-evidence-OcUciD-N.js.map +0 -1
  348. package/dist/claim-BXcZw-jo.js.map +0 -1
  349. package/dist/cost-ledger-CO7UyEcQ.d.ts.map +0 -1
  350. package/dist/cost-ledger-D2FnJPBF.js.map +0 -1
  351. package/dist/define-agent-eval-Ch3MWX6k.js.map +0 -1
  352. package/dist/external-optimizer-subprocess-DcerlZSG.js.map +0 -1
  353. package/dist/feedback-trajectory-DkaDj0dj.d.ts.map +0 -1
  354. package/dist/index-CPJJr98o.d.ts.map +0 -1
  355. package/dist/index-DlH0Y9gI.d.ts.map +0 -1
  356. package/dist/index-NvGBiO8H.d.ts.map +0 -1
  357. package/dist/integrity-BV1ZDf42.js.map +0 -1
  358. package/dist/judge-gate-B1qYnkpi.js.map +0 -1
  359. package/dist/llm-client-DQveoxSM.js.map +0 -1
  360. package/dist/llm-judge-PXV7Xljl.js.map +0 -1
  361. package/dist/matrix-_BV9-Lk5.js.map +0 -1
  362. package/dist/mint-DCGoBYhB.d.ts +0 -155
  363. package/dist/mint-DCGoBYhB.d.ts.map +0 -1
  364. package/dist/paired-tests-jbwPdSz5.js.map +0 -1
  365. package/dist/redact-Cveoq6fJ.d.ts.map +0 -1
  366. package/dist/redact-Dk1ZdJEm.js.map +0 -1
  367. package/dist/release-confidence-BK2QCB5M.d.ts.map +0 -1
  368. package/dist/report-command-y8H6RSX8.js.map +0 -1
  369. package/dist/run-record-ES07wfz9.js.map +0 -1
  370. package/dist/search-kernel-BztlERLv.js.map +0 -1
  371. package/dist/search-kernel-CpcKH5Ih.d.ts.map +0 -1
  372. package/dist/search-ledger-d7V8o9Lk.js.map +0 -1
  373. package/dist/semantic-concept-judge-zQBG9hHU.js.map +0 -1
  374. package/dist/skillopt-optimization-method-CCtzralq.js.map +0 -1
  375. package/dist/store-otlp-DtB4Slsr.js.map +0 -1
  376. package/dist/store-tool-spans-DR1SrCLK.d.ts.map +0 -1
  377. package/dist/summary-report-C-CtItCN.d.ts.map +0 -1
  378. package/dist/summary-report-DtdRucM0.js.map +0 -1
  379. package/dist/terminal-record-BHocwFw1.js.map +0 -1
  380. package/dist/tool-groups-mcxOXVlb.d.ts.map +0 -1
  381. package/dist/tool-waste-Wi4g6Ekb.d.ts.map +0 -1
  382. package/dist/tree-rXLW3M_4.js.map +0 -1
  383. package/dist/types-B4C5nFw6.d.ts.map +0 -1
  384. package/dist/types-DBZ7keha.d.ts.map +0 -1
@@ -1,37 +1,423 @@
1
- import { i as pairedCohensDz } from "./effect-sizes-DiH8MGOH.js";
2
- import { r as welchsTTest } from "./baseline-Dm8966du.js";
3
- import { a as spearmanR, r as pearsonR } from "./descriptive-CnU8Yq29.js";
4
- import { r as continuousAgreement } from "./judge-calibration-N44V04Se.js";
5
- import { o as pairedTTest, r as pairedBootstrap } from "./paired-tests-jbwPdSz5.js";
6
- import { i as requiredPairedSampleSize, r as pairedMde } from "./power-and-mde-fK5Qocwo.js";
7
- import { r as pairRunRecords } from "./paired-arms-DzKn0TfY.js";
8
- import { n as aggregatePairedHoldout } from "./statistical-heldout-1Gbmex7v.js";
9
- import "./query-B1D1qp2Z.js";
10
1
  import { r as observedSplitScore } from "./reward-nw2xZGZG.js";
11
- import { c as validateRunRecord } from "./run-record-DlTZ_lqe.js";
12
- import { r as paretoChart } from "./summary-report-DtdRucM0.js";
13
- //#region src/contamination-guard.ts
14
- function checkCanaries(output, scenarios) {
15
- const leaks = [];
16
- for (const s of scenarios) {
17
- if (!s.canary) continue;
18
- if (output.includes(s.canary)) leaks.push({
19
- scenarioId: s.id,
20
- canary: s.canary,
21
- evidence: excerpt(output, s.canary)
2
+ import { c as validateRunRecord } from "./run-record-Boc5IUTp.js";
3
+ import { r as paretoChart } from "./summary-report-V_JACR4Y.js";
4
+ import { t as interpolatedQuantile } from "./quantile--0yb07pD.js";
5
+ import { a as spearmanR, r as pearsonR } from "./descriptive-DboxPZrG.js";
6
+ import { r as continuousAgreement } from "./judge-calibration-BpCy5XQl.js";
7
+ import { i as pairedCohensDz } from "./effect-sizes-BhzEpXMc.js";
8
+ import { r as welchsTTest } from "./baseline-Udi_PLuT.js";
9
+ import { i as pairedBootstrap, s as pairedTTest, t as mean$1 } from "./mean-DHoMiudD.js";
10
+ import { i as requiredPairedSampleSize, r as pairedMde } from "./power-and-mde-Hj2ubb4B.js";
11
+ import { r as pairRunRecords } from "./paired-arms-CwMGJsrS.js";
12
+ import { n as aggregatePairedHoldout } from "./statistical-heldout-42NlCNDe.js";
13
+ import "./query-BUCZCK7F.js";
14
+ //#region src/contract/quality-insight.ts
15
+ /** Observed score distributions, judge agreement, and downstream quality correlation. */
16
+ function resolveSplit(runs, pref) {
17
+ if (pref !== "auto") return pref;
18
+ return runs.some((r) => Number.isFinite(observedSplitScore(r, "holdout"))) ? "holdout" : "search";
19
+ }
20
+ /**
21
+ * RAW (`observedSplitScore`): `analyzeRuns` describes what a set of runs
22
+ * reported, and every downstream reader of this composite — distributions,
23
+ * per-candidate summaries, the reward-hacking correlation — needs the ungated
24
+ * number to see an inflated run at all.
25
+ */
26
+ function compositeOf(run, split) {
27
+ const score = observedSplitScore(run, split);
28
+ return Number.isFinite(score) ? score : NaN;
29
+ }
30
+ function distributionOf(values, bins, withIds) {
31
+ if (values.length === 0) return {
32
+ n: 0,
33
+ mean: null,
34
+ p50: null,
35
+ p95: null,
36
+ stddev: null,
37
+ min: null,
38
+ max: null,
39
+ histogram: []
40
+ };
41
+ const sorted = [...values].sort((a, b) => a - b);
42
+ const n = sorted.length;
43
+ const mean = mean$1(sorted);
44
+ const variance = sorted.reduce((s, v) => s + (v - mean) ** 2, 0) / n;
45
+ const stddev = Math.sqrt(variance);
46
+ const tailRuns = withIds ? [...withIds].sort((a, b) => a.score - b.score).slice(0, Math.min(5, withIds.length)) : void 0;
47
+ return {
48
+ n,
49
+ mean,
50
+ p50: interpolatedQuantile(sorted, .5),
51
+ p95: interpolatedQuantile(sorted, .95),
52
+ stddev,
53
+ min: sorted[0],
54
+ max: sorted[n - 1],
55
+ histogram: histogram(sorted, bins),
56
+ ...tailRuns ? { tailRuns } : {}
57
+ };
58
+ }
59
+ /** Even-width histogram over the value range. Returns inclusive-lo /
60
+ * exclusive-hi bins (closed on right for the last bin) compatible with
61
+ * the substrate's `GainDistributionBin` shape. */
62
+ function histogram(sorted, bins) {
63
+ if (sorted.length === 0 || bins < 1) return [];
64
+ const min = sorted[0];
65
+ const max = sorted[sorted.length - 1];
66
+ if (min === max) return [{
67
+ lo: min,
68
+ hi: max,
69
+ count: sorted.length
70
+ }];
71
+ const width = (max - min) / bins;
72
+ const out = [];
73
+ for (let i = 0; i < bins; i++) {
74
+ const lo = min + i * width;
75
+ const hi = i === bins - 1 ? max : lo + width;
76
+ out.push({
77
+ lo,
78
+ hi,
79
+ count: 0
22
80
  });
23
81
  }
24
- return leaks;
82
+ for (const v of sorted) {
83
+ const idx = Math.min(bins - 1, Math.floor((v - min) / width));
84
+ out[idx].count++;
85
+ }
86
+ return out;
25
87
  }
26
- function excerpt(source, needle) {
27
- const at = source.indexOf(needle);
28
- if (at < 0) return "";
29
- const start = Math.max(0, at - 30);
30
- const end = Math.min(source.length, at + needle.length + 30);
31
- return (start > 0 ? "…" : "") + source.slice(start, end) + (end < source.length ? "…" : "");
88
+ function computePerDimension(runs, bins) {
89
+ const byDim = /* @__PURE__ */ new Map();
90
+ for (const run of runs) {
91
+ const scores = run.outcome.judgeScores;
92
+ if (!scores) continue;
93
+ for (const [dim, value] of Object.entries(scores.perDimMean ?? {})) {
94
+ if (!Number.isFinite(value)) continue;
95
+ const arr = byDim.get(dim) ?? [];
96
+ arr.push(value);
97
+ byDim.set(dim, arr);
98
+ }
99
+ }
100
+ const out = {};
101
+ for (const [dim, values] of byDim) out[dim] = distributionOf(values, bins);
102
+ return out;
103
+ }
104
+ /** Collect per-dimension values across runs (from outcome.judgeScores.perDimMean). */
105
+ function collectPerDimension(runs) {
106
+ const out = {};
107
+ for (const r of runs) {
108
+ const perDim = r.outcome.judgeScores?.perDimMean;
109
+ if (!perDim) continue;
110
+ for (const [dim, value] of Object.entries(perDim)) {
111
+ if (!Number.isFinite(value)) continue;
112
+ if (!out[dim]) out[dim] = [];
113
+ out[dim].push(value);
114
+ }
115
+ }
116
+ return out;
117
+ }
118
+ function computeJudgeInsights(runs) {
119
+ const out = {};
120
+ const byJudge = /* @__PURE__ */ new Map();
121
+ for (const run of runs) {
122
+ const scores = run.outcome.judgeScores;
123
+ if (!scores?.perJudge) continue;
124
+ for (const [judgeId, dims] of Object.entries(scores.perJudge)) {
125
+ const dimValues = Object.values(dims).filter(Number.isFinite);
126
+ if (dimValues.length === 0) continue;
127
+ const judgeMean = dimValues.reduce((s, v) => s + v, 0) / dimValues.length;
128
+ const arr = byJudge.get(judgeId) ?? [];
129
+ arr.push(judgeMean);
130
+ byJudge.set(judgeId, arr);
131
+ }
132
+ }
133
+ for (const [judgeId, values] of byJudge) out[judgeId] = {
134
+ n: values.length,
135
+ meanScore: values.reduce((s, v) => s + v, 0) / values.length
136
+ };
137
+ return out;
138
+ }
139
+ function computeInterRater(ratings) {
140
+ const byRun = /* @__PURE__ */ new Map();
141
+ for (const r of ratings) {
142
+ if (!Number.isFinite(r.score)) continue;
143
+ const list = byRun.get(r.runId) ?? [];
144
+ list.push({
145
+ rater: r.rater,
146
+ score: r.score
147
+ });
148
+ byRun.set(r.runId, list);
149
+ }
150
+ const raters = new Set(ratings.map((r) => r.rater));
151
+ const jointlyRated = [];
152
+ for (const [runId, ratersForRun] of byRun) {
153
+ const seen = new Set(ratersForRun.map((r) => r.rater));
154
+ let all = true;
155
+ for (const r of raters) if (!seen.has(r)) all = false;
156
+ if (all) jointlyRated.push(runId);
157
+ }
158
+ if (raters.size < 2 || jointlyRated.length === 0) return void 0;
159
+ const raterList = [...raters].sort();
160
+ const perPair = {};
161
+ for (let i = 0; i < raterList.length; i++) for (let j = i + 1; j < raterList.length; j++) {
162
+ const a = raterList[i];
163
+ const b = raterList[j];
164
+ const aScores = [];
165
+ const bScores = [];
166
+ for (const runId of jointlyRated) {
167
+ const ratersForRun = byRun.get(runId);
168
+ const sa = ratersForRun.find((r) => r.rater === a)?.score;
169
+ const sb = ratersForRun.find((r) => r.rater === b)?.score;
170
+ if (sa !== void 0 && sb !== void 0) {
171
+ aScores.push(sa);
172
+ bScores.push(sb);
173
+ }
174
+ }
175
+ const agreement = continuousAgreement(aScores.map((score, index) => [score, bScores[index]]), { bootstrap: 0 });
176
+ perPair[`${a}::${b}`] = agreement.weightedKappa;
177
+ }
178
+ const matrix = jointlyRated.map((runId) => {
179
+ const ratingsByRater = new Map(byRun.get(runId).map((rating) => [rating.rater, rating.score]));
180
+ return raterList.map((rater) => ratingsByRater.get(rater));
181
+ });
182
+ const agreement = continuousAgreement(matrix, { bootstrap: 0 });
183
+ const disagreementCases = jointlyRated.map((runId) => {
184
+ const ratersForRun = byRun.get(runId);
185
+ const scores = ratersForRun.map((r) => r.score);
186
+ return {
187
+ runId,
188
+ ratings: ratersForRun,
189
+ range: Math.max(...scores) - Math.min(...scores)
190
+ };
191
+ }).sort((a, b) => b.range - a.range).slice(0, 20);
192
+ return {
193
+ raters: raters.size,
194
+ jointlyRated: jointlyRated.length,
195
+ kappa: Number.isFinite(agreement.weightedKappa) ? agreement.weightedKappa : 0,
196
+ icc: agreement.icc,
197
+ pearson: agreement.pearson,
198
+ spearman: agreement.spearman,
199
+ perPair,
200
+ disagreementCases
201
+ };
202
+ }
203
+ function computeOutcomeCorrelation(runs, outcome, split) {
204
+ const xs = [];
205
+ const ys = [];
206
+ for (const run of runs) {
207
+ const y = outcome.valueByRunId[run.runId];
208
+ if (y === void 0 || !Number.isFinite(y)) continue;
209
+ const x = compositeOf(run, split);
210
+ if (!Number.isFinite(x)) continue;
211
+ xs.push(x);
212
+ ys.push(y);
213
+ }
214
+ if (xs.length < 3) return void 0;
215
+ const p = pearsonR(xs, ys);
216
+ const s = spearmanR(xs, ys);
217
+ const meanX = mean(xs);
218
+ const meanY = mean(ys);
219
+ let num = 0;
220
+ let denom = 0;
221
+ for (let i = 0; i < xs.length; i++) {
222
+ num += (xs[i] - meanX) * (ys[i] - meanY);
223
+ denom += (xs[i] - meanX) ** 2;
224
+ }
225
+ const slope = denom === 0 ? 0 : num / denom;
226
+ const intercept = meanY - slope * meanX;
227
+ const ssTot = ys.reduce((a, y) => a + (y - meanY) ** 2, 0);
228
+ const ssRes = ys.reduce((a, y, i) => a + (y - (intercept + slope * xs[i])) ** 2, 0);
229
+ const r2 = ssTot === 0 ? 0 : 1 - ssRes / ssTot;
230
+ return {
231
+ metric: outcome.metric,
232
+ n: xs.length,
233
+ pearson: p,
234
+ spearman: s,
235
+ rewardModel: {
236
+ intercept,
237
+ slope,
238
+ r2
239
+ }
240
+ };
241
+ }
242
+ function finiteCompositeScores(runs, split) {
243
+ return runs.map((run) => compositeOf(run, split)).filter(Number.isFinite);
244
+ }
245
+ function isFiniteNumber(value) {
246
+ return typeof value === "number" && Number.isFinite(value);
247
+ }
248
+ function mean(arr) {
249
+ return arr.length === 0 ? 0 : mean$1(arr);
250
+ }
251
+ //#endregion
252
+ //#region src/contract/comparison-insight.ts
253
+ /** Paired candidate lift and independent prior-period metric comparisons. */
254
+ function computePriorPeriodComparison(current, baseline, split, windowLabel) {
255
+ if (current.length === 0 || baseline.length === 0) return void 0;
256
+ const metrics = {};
257
+ const directions = {};
258
+ const compositeCurrent = current.map((r) => compositeOf(r, split)).filter(Number.isFinite);
259
+ const compositeBaseline = baseline.map((r) => compositeOf(r, split)).filter(Number.isFinite);
260
+ if (compositeCurrent.length > 0 && compositeBaseline.length > 0) {
261
+ metrics.composite = welchCompare(compositeBaseline, compositeCurrent);
262
+ directions.composite = "higher-is-better";
263
+ }
264
+ const costCurrent = knownCostValues(current);
265
+ const costBaseline = knownCostValues(baseline);
266
+ if (costCurrent.length > 0 && costBaseline.length > 0) {
267
+ metrics.cost = welchCompare(costBaseline, costCurrent);
268
+ directions.cost = "lower-is-better";
269
+ }
270
+ const durCurrent = current.map((r) => r.wallMs).filter(Number.isFinite);
271
+ const durBaseline = baseline.map((r) => r.wallMs).filter(Number.isFinite);
272
+ if (durCurrent.length > 0 && durBaseline.length > 0) {
273
+ metrics.duration = welchCompare(durBaseline, durCurrent);
274
+ directions.duration = "lower-is-better";
275
+ }
276
+ const tokCurrent = current.map((r) => (r.tokenUsage.input ?? 0) + (r.tokenUsage.output ?? 0)).filter(Number.isFinite);
277
+ const tokBaseline = baseline.map((r) => (r.tokenUsage.input ?? 0) + (r.tokenUsage.output ?? 0)).filter(Number.isFinite);
278
+ if (tokCurrent.length > 0 && tokBaseline.length > 0) {
279
+ metrics.tokenUsage = welchCompare(tokBaseline, tokCurrent);
280
+ directions.tokenUsage = "lower-is-better";
281
+ }
282
+ const dimsCurrent = collectPerDimension(current);
283
+ const dimsBaseline = collectPerDimension(baseline);
284
+ for (const dim of Object.keys(dimsCurrent)) {
285
+ const b = dimsBaseline[dim];
286
+ const c = dimsCurrent[dim];
287
+ if (!b || b.length === 0 || !c || c.length === 0) continue;
288
+ metrics[`dim.${dim}`] = welchCompare(b, c);
289
+ directions[`dim.${dim}`] = "higher-is-better";
290
+ }
291
+ const regressedMetrics = [];
292
+ const improvedMetrics = [];
293
+ const inconclusiveMetrics = [];
294
+ for (const [name, delta] of Object.entries(metrics)) {
295
+ if (delta.status !== "ok") {
296
+ inconclusiveMetrics.push(name);
297
+ continue;
298
+ }
299
+ if (!delta.significant) continue;
300
+ if ((directions[name] ?? "higher-is-better") === "higher-is-better" ? delta.delta > 0 : delta.delta < 0) improvedMetrics.push(name);
301
+ else regressedMetrics.push(name);
302
+ }
303
+ return {
304
+ baselineN: baseline.length,
305
+ currentN: current.length,
306
+ ...windowLabel ? { windowLabel } : {},
307
+ metrics,
308
+ regressedMetrics,
309
+ improvedMetrics,
310
+ inconclusiveMetrics
311
+ };
312
+ }
313
+ function knownCostValues(runs) {
314
+ return runs.filter((run) => run.costProvenance.usd !== null).map((run) => run.costUsd).filter(isFiniteNumber);
315
+ }
316
+ /** Adapt the shared two-sample Welch result to the report contract. */
317
+ function welchCompare(baseline, current) {
318
+ const result = welchsTTest(baseline, current);
319
+ const base = {
320
+ current: result.meanB,
321
+ baseline: result.meanA,
322
+ delta: result.delta,
323
+ baselineN: baseline.length,
324
+ currentN: current.length
325
+ };
326
+ if (result.status !== "ok") return {
327
+ ...base,
328
+ status: result.status,
329
+ ci95: null,
330
+ pValue: null,
331
+ cohensD: null,
332
+ significant: false
333
+ };
334
+ return {
335
+ ...base,
336
+ status: "ok",
337
+ ci95: result.ci95,
338
+ pValue: result.p,
339
+ cohensD: result.cohensD,
340
+ significant: result.p < .05 && Math.abs(result.cohensD) >= .2
341
+ };
342
+ }
343
+ function computeLift(runs, baselineId, candidateId, split, independentUnitByScenarioId) {
344
+ let bId = baselineId;
345
+ let cId = candidateId;
346
+ if (!bId || !cId) {
347
+ const ids = [...new Set(runs.map((r) => r.candidateId))];
348
+ if (ids.length !== 2) return void 0;
349
+ const [idA, idB] = ids;
350
+ const scoresA = finiteCompositeScores(runs.filter((run) => run.candidateId === idA), split);
351
+ const scoresB = finiteCompositeScores(runs.filter((run) => run.candidateId === idB), split);
352
+ if (scoresA.length === 0 || scoresB.length === 0) return void 0;
353
+ const meanA = mean(scoresA);
354
+ const meanB = mean(scoresB);
355
+ bId = meanA <= meanB ? idA : idB;
356
+ cId = meanA <= meanB ? idB : idA;
357
+ }
358
+ const baseline = runs.filter((r) => r.candidateId === bId);
359
+ const candidate = runs.filter((r) => r.candidateId === cId);
360
+ if (baseline.length === 0 || candidate.length === 0) return void 0;
361
+ const scoredBaseline = baseline.filter((run) => Number.isFinite(compositeOf(run, split)));
362
+ const scoredCandidate = candidate.filter((run) => Number.isFinite(compositeOf(run, split)));
363
+ const pairing = pairRunRecords(scoredBaseline, scoredCandidate);
364
+ let pairedBaseline = pairing.pairs.map((pair) => compositeOf(pair.baseline, split));
365
+ let pairedCandidate = pairing.pairs.map((pair) => compositeOf(pair.treatment, split));
366
+ if (pairedBaseline.length === 0) return void 0;
367
+ const grouped = independentUnitByScenarioId ? aggregatePairedHoldout({
368
+ before: pairedBaseline,
369
+ after: pairedCandidate,
370
+ cellIds: pairing.pairs.map((pair, index) => `${pair.pairKey}:${index}`)
371
+ }, new Map(pairing.pairs.map((pair) => [pair.pairKey, independentUnitByScenarioId.get(pair.baseline.scenarioId)]))) : void 0;
372
+ if (grouped) {
373
+ pairedBaseline = grouped.before;
374
+ pairedCandidate = grouped.after;
375
+ }
376
+ const reverseInferredArms = grouped !== void 0 && (!baselineId || !candidateId) && mean(pairedBaseline) > mean(pairedCandidate);
377
+ if (reverseInferredArms) [pairedBaseline, pairedCandidate] = [pairedCandidate, pairedBaseline];
378
+ const baselineMean = mean(pairedBaseline);
379
+ const candidateMean = mean(pairedCandidate);
380
+ const delta = candidateMean - baselineMean;
381
+ const bootstrap = pairedBootstrap(pairedBaseline, pairedCandidate, {
382
+ confidence: .95,
383
+ resamples: 2e3,
384
+ statistic: "mean"
385
+ });
386
+ const tTest = pairedTTest(pairedBaseline, pairedCandidate);
387
+ const d = pairedCohensDz(pairedBaseline, pairedCandidate);
388
+ const mde = pairedMde({
389
+ nPaired: pairedBaseline.length,
390
+ power: .8,
391
+ alpha: .05
392
+ });
393
+ const requiredN = d === null || d === 0 ? null : requiredPairedSampleSize({
394
+ effect: Math.abs(d),
395
+ power: .8,
396
+ alpha: .05
397
+ });
398
+ return {
399
+ baselineMean,
400
+ candidateMean,
401
+ delta,
402
+ ci95: [bootstrap.low, bootstrap.high],
403
+ pValue: tTest.p,
404
+ n: pairedBaseline.length,
405
+ ...grouped ? {
406
+ pairedRunN: pairing.pairs.length,
407
+ independentUnitIds: grouped.unitIds
408
+ } : {},
409
+ minimumRequired: 20,
410
+ decisionEligible: bootstrap.gateEligible,
411
+ unpairedBaseline: (reverseInferredArms ? pairing.unpairedTreatment : pairing.unpairedBaseline).length,
412
+ unpairedCandidate: (reverseInferredArms ? pairing.unpairedBaseline : pairing.unpairedTreatment).length,
413
+ cohensD: d,
414
+ mde,
415
+ requiredN
416
+ };
32
417
  }
33
418
  //#endregion
34
- //#region src/contract/analyze-runs.ts
419
+ //#region src/contract/execution-insight.ts
420
+ /** Runtime usage, terminal outcomes, execution errors, and cost capture facts. */
35
421
  /** Summarize runtime facts without interpreting task quality or promotion readiness. */
36
422
  function summarizeExecution(opts) {
37
423
  const runs = opts.runs.map(validateRunRecord);
@@ -40,81 +426,6 @@ function summarizeExecution(opts) {
40
426
  costProvenance: summarizeCostProvenance(runs)
41
427
  };
42
428
  }
43
- /** A bootstrap interval with no spread: every resample landed on the same
44
- * value, so the interval carries no information about how far the point
45
- * estimate could be wrong and cannot support a directional claim. */
46
- function zeroWidth(ci) {
47
- return !Number.isFinite(ci[0]) || !Number.isFinite(ci[1]) || ci[0] === ci[1];
48
- }
49
- async function analyzeRuns(opts) {
50
- const runs = opts.runs.map(validateRunRecord);
51
- const bins = opts.histogramBins ?? 12;
52
- const threshold = opts.decisionThreshold ?? .02;
53
- if (!Number.isFinite(threshold)) throw new Error(`analyzeRuns: decisionThreshold must be finite, got ${threshold}`);
54
- const split = resolveSplit(runs, opts.split ?? "auto");
55
- const compositeWithIds = runs.map((r) => ({
56
- runId: r.runId,
57
- score: compositeOf(r, split)
58
- })).filter((p) => Number.isFinite(p.score));
59
- const composite = distributionOf(compositeWithIds.map((p) => p.score), bins, compositeWithIds);
60
- const perDimension = computePerDimension(runs, bins);
61
- const { execution, costProvenance: provenance } = summarizeExecution({
62
- runs,
63
- histogramBins: bins
64
- });
65
- const knownCostRuns = runs.filter((run) => run.costProvenance.usd !== null);
66
- const costs = knownCostRuns.map((r) => r.costUsd).filter(isFiniteNumber);
67
- const costDist = distributionOf(costs, bins);
68
- const pareto = paretoChart(knownCostRuns, { split });
69
- const degraded = {};
70
- if (provenance.uncaptured.n + provenance.lowerBound.n > 0) degraded.cost = diagnoseCostCoverage(runs, provenance);
71
- else if (costs.length === 0 || costs.every((c) => c === 0)) degraded.cost = `all ${runs.length} explicitly observed or estimated USD values are $0`;
72
- if (pareto.points.length < 2) degraded.pareto = pareto.points.length === 0 ? "no candidates — Pareto unavailable" : "single candidate — Pareto is a single point, not a frontier";
73
- const costQuality = {
74
- cost: costDist,
75
- pareto,
76
- provenance,
77
- ...degraded.cost || degraded.pareto ? { degraded } : {}
78
- };
79
- const judges = computeJudgeInsights(runs);
80
- const interRater = opts.raterScores ? computeInterRater(opts.raterScores) : void 0;
81
- const lift = computeLift(runs, opts.baselineCandidateId, opts.candidateCandidateId, split, opts.independentUnitByScenarioId);
82
- const failureClusters = opts.analyst ? await computeFailureClusters(runs, opts.analyst, split) : void 0;
83
- const failureClasses = computeFailureClasses(runs, split);
84
- const contamination = opts.canaryScenarios ? computeContamination(runs, opts.canaryScenarios) : void 0;
85
- const outcomeCorrelation = opts.outcomeSignal ? computeOutcomeCorrelation(runs, opts.outcomeSignal, split) : void 0;
86
- const release = buildReleaseScorecard(composite, lift, contamination);
87
- const priorPeriodComparison = opts.baselineRuns ? computePriorPeriodComparison(runs, opts.baselineRuns, split, opts.baselineLabel) : void 0;
88
- const recommendations = buildRecommendations({
89
- composite,
90
- judges,
91
- interRater,
92
- lift,
93
- failureClusters,
94
- failureClasses,
95
- contamination,
96
- outcomeCorrelation,
97
- priorPeriodComparison,
98
- threshold
99
- });
100
- return {
101
- n: runs.length,
102
- execution,
103
- composite,
104
- perDimension,
105
- costQuality,
106
- judges,
107
- interRater,
108
- lift,
109
- failureClusters,
110
- contamination,
111
- outcomeCorrelation,
112
- release,
113
- ...failureClasses ? { failureClasses } : {},
114
- ...priorPeriodComparison ? { priorPeriodComparison } : {},
115
- recommendations
116
- };
117
- }
118
429
  function computeExecutionInsight(runs, bins) {
119
430
  const aggregateRows = runs.flatMap((run) => {
120
431
  const usage = aggregateTokenUsage(run);
@@ -224,477 +535,133 @@ function computeExecutionInsight(runs, bins) {
224
535
  terminalOutcomes
225
536
  };
226
537
  }
227
- function reportedExecutionErrorEvents(run) {
228
- return nonNegativeCountRaw(run, "execution_error_count");
229
- }
230
- function nonNegativeCountRaw(run, key) {
231
- const value = finiteRaw(run, key);
232
- return value !== void 0 && Number.isInteger(value) && value >= 0 ? value : void 0;
233
- }
234
- function summarizeTokenUsage(usages, bins) {
235
- const reasoning = usages.flatMap((usage) => usage.reasoning !== void 0 ? [usage.reasoning] : []);
236
- const cached = usages.flatMap((usage) => usage.cached !== void 0 ? [usage.cached] : []);
237
- const cacheWrite = usages.flatMap((usage) => usage.cacheWrite !== void 0 ? [usage.cacheWrite] : []);
238
- return {
239
- input: distributionOf(usages.map((usage) => usage.input), bins),
240
- output: distributionOf(usages.map((usage) => usage.output), bins),
241
- reasoning: distributionOf(reasoning, bins),
242
- cached: distributionOf(cached, bins),
243
- cacheWrite: distributionOf(cacheWrite, bins),
244
- totals: {
245
- input: usages.reduce((total, usage) => total + usage.input, 0),
246
- output: usages.reduce((total, usage) => total + usage.output, 0),
247
- reasoning: reasoning.reduce((total, value) => total + value, 0),
248
- cached: cached.reduce((total, value) => total + value, 0),
249
- cacheWrite: cacheWrite.reduce((total, value) => total + value, 0)
250
- }
251
- };
252
- }
253
- function aggregateTokenUsage(run) {
254
- const input = finiteRaw(run, "aggregate_prompt_tokens");
255
- const output = finiteRaw(run, "aggregate_completion_tokens");
256
- const reasoning = finiteRaw(run, "aggregate_reasoning_tokens");
257
- const cached = finiteRaw(run, "aggregate_cached_tokens");
258
- const cacheWrite = finiteRaw(run, "aggregate_cache_write_tokens");
259
- if (input === void 0 && output === void 0 && reasoning === void 0 && cached === void 0 && cacheWrite === void 0) return void 0;
260
- return {
261
- input: input ?? 0,
262
- output: output ?? 0,
263
- ...reasoning !== void 0 ? { reasoning } : {},
264
- ...cached !== void 0 ? { cached } : {},
265
- ...cacheWrite !== void 0 ? { cacheWrite } : {}
266
- };
267
- }
268
- function finiteRaw(run, key) {
269
- const value = run.outcome.raw[key];
270
- return typeof value === "number" && Number.isFinite(value) && value >= 0 ? value : void 0;
271
- }
272
- function summarizeCostProvenance(runs) {
273
- const summary = {
274
- observed: {
275
- n: 0,
276
- totalUsd: 0
277
- },
278
- estimated: {
279
- n: 0,
280
- totalUsd: 0
281
- },
282
- lowerBound: {
283
- n: 0,
284
- floorUsd: 0
285
- },
286
- uncaptured: { n: 0 },
287
- knownFraction: 0
288
- };
289
- for (const run of runs) {
290
- const cost = run.costProvenance;
291
- if (cost.kind === "uncaptured") summary.uncaptured.n += 1;
292
- else if (cost.kind === "lower-bound") {
293
- summary.lowerBound.n += 1;
294
- summary.lowerBound.floorUsd += cost.knownLowerBoundUsd;
295
- } else {
296
- summary[cost.kind].n += 1;
297
- summary[cost.kind].totalUsd += cost.usd;
298
- }
299
- }
300
- const known = summary.observed.n + summary.estimated.n;
301
- summary.knownFraction = runs.length > 0 ? known / runs.length : 0;
302
- return summary;
303
- }
304
- function diagnoseCostCoverage(runs, provenance) {
305
- const unknown = provenance.uncaptured.n + provenance.lowerBound.n;
306
- const known = provenance.observed.n + provenance.estimated.n;
307
- const floor = provenance.lowerBound.n > 0 ? ` (${provenance.lowerBound.n} of them cost at least $${provenance.lowerBound.floorUsd.toFixed(6)} together)` : "";
308
- if (unknown === runs.length) return `USD cost total unknown for all ${runs.length} runs${floor} — no observed or estimated USD values; token and wall-time metrics remain available.`;
309
- return `USD cost total unknown for ${unknown}/${runs.length} runs${floor}; excluded those rows from cost statistics (${known}/${runs.length} retained: ${provenance.observed.n} observed, ${provenance.estimated.n} estimated).`;
310
- }
311
- /**
312
- * Model-free task-failure tally.
313
- *
314
- * Explicit non-success classes are task-failure evidence.
315
- * A low task score without a class is counted as `unknown`.
316
- */
317
- function computeFailureClasses(runs, split) {
318
- const counts = /* @__PURE__ */ new Map();
319
- for (const r of runs) {
320
- if (!isTaskFailure(r, split)) continue;
321
- const key = r.failureClass !== void 0 && r.failureClass !== "success" ? r.failureClass : "unknown";
322
- counts.set(key, (counts.get(key) ?? 0) + 1);
323
- }
324
- if (counts.size === 0) return void 0;
325
- const n = runs.length;
326
- return [...counts.entries()].map(([failureClass, count]) => ({
327
- failureClass,
328
- count,
329
- share: n > 0 ? count / n : 0
330
- })).sort((a, b) => b.count - a.count || a.failureClass.localeCompare(b.failureClass));
331
- }
332
- function computePriorPeriodComparison(current, baseline, split, windowLabel) {
333
- if (current.length === 0 || baseline.length === 0) return void 0;
334
- const metrics = {};
335
- const directions = {};
336
- const compositeCurrent = current.map((r) => compositeOf(r, split)).filter(Number.isFinite);
337
- const compositeBaseline = baseline.map((r) => compositeOf(r, split)).filter(Number.isFinite);
338
- if (compositeCurrent.length > 0 && compositeBaseline.length > 0) {
339
- metrics.composite = welchCompare(compositeBaseline, compositeCurrent);
340
- directions.composite = "higher-is-better";
341
- }
342
- const costCurrent = knownCostValues(current);
343
- const costBaseline = knownCostValues(baseline);
344
- if (costCurrent.length > 0 && costBaseline.length > 0) {
345
- metrics.cost = welchCompare(costBaseline, costCurrent);
346
- directions.cost = "lower-is-better";
347
- }
348
- const durCurrent = current.map((r) => r.wallMs).filter(Number.isFinite);
349
- const durBaseline = baseline.map((r) => r.wallMs).filter(Number.isFinite);
350
- if (durCurrent.length > 0 && durBaseline.length > 0) {
351
- metrics.duration = welchCompare(durBaseline, durCurrent);
352
- directions.duration = "lower-is-better";
353
- }
354
- const tokCurrent = current.map((r) => (r.tokenUsage.input ?? 0) + (r.tokenUsage.output ?? 0)).filter(Number.isFinite);
355
- const tokBaseline = baseline.map((r) => (r.tokenUsage.input ?? 0) + (r.tokenUsage.output ?? 0)).filter(Number.isFinite);
356
- if (tokCurrent.length > 0 && tokBaseline.length > 0) {
357
- metrics.tokenUsage = welchCompare(tokBaseline, tokCurrent);
358
- directions.tokenUsage = "lower-is-better";
359
- }
360
- const dimsCurrent = collectPerDimension(current);
361
- const dimsBaseline = collectPerDimension(baseline);
362
- for (const dim of Object.keys(dimsCurrent)) {
363
- const b = dimsBaseline[dim];
364
- const c = dimsCurrent[dim];
365
- if (!b || b.length === 0 || !c || c.length === 0) continue;
366
- metrics[`dim.${dim}`] = welchCompare(b, c);
367
- directions[`dim.${dim}`] = "higher-is-better";
368
- }
369
- const regressedMetrics = [];
370
- const improvedMetrics = [];
371
- const inconclusiveMetrics = [];
372
- for (const [name, delta] of Object.entries(metrics)) {
373
- if (delta.status !== "ok") {
374
- inconclusiveMetrics.push(name);
375
- continue;
376
- }
377
- if (!delta.significant) continue;
378
- if ((directions[name] ?? "higher-is-better") === "higher-is-better" ? delta.delta > 0 : delta.delta < 0) improvedMetrics.push(name);
379
- else regressedMetrics.push(name);
380
- }
381
- return {
382
- baselineN: baseline.length,
383
- currentN: current.length,
384
- ...windowLabel ? { windowLabel } : {},
385
- metrics,
386
- regressedMetrics,
387
- improvedMetrics,
388
- inconclusiveMetrics
389
- };
390
- }
391
- function knownCostValues(runs) {
392
- return runs.filter((run) => run.costProvenance.usd !== null).map((run) => run.costUsd).filter(isFiniteNumber);
393
- }
394
- function isFiniteNumber(value) {
395
- return typeof value === "number" && Number.isFinite(value);
538
+ function reportedExecutionErrorEvents(run) {
539
+ return nonNegativeCountRaw(run, "execution_error_count");
396
540
  }
397
- /** Collect per-dimension values across runs (from outcome.judgeScores.perDimMean). */
398
- function collectPerDimension(runs) {
399
- const out = {};
400
- for (const r of runs) {
401
- const perDim = r.outcome.judgeScores?.perDimMean;
402
- if (!perDim) continue;
403
- for (const [dim, value] of Object.entries(perDim)) {
404
- if (!Number.isFinite(value)) continue;
405
- if (!out[dim]) out[dim] = [];
406
- out[dim].push(value);
407
- }
408
- }
409
- return out;
541
+ function nonNegativeCountRaw(run, key) {
542
+ const value = finiteRaw(run, key);
543
+ return value !== void 0 && Number.isInteger(value) && value >= 0 ? value : void 0;
410
544
  }
411
- /** Adapt the shared two-sample Welch result to the report contract. */
412
- function welchCompare(baseline, current) {
413
- const result = welchsTTest(baseline, current);
414
- const base = {
415
- current: result.meanB,
416
- baseline: result.meanA,
417
- delta: result.delta,
418
- baselineN: baseline.length,
419
- currentN: current.length
420
- };
421
- if (result.status !== "ok") return {
422
- ...base,
423
- status: result.status,
424
- ci95: null,
425
- pValue: null,
426
- cohensD: null,
427
- significant: false
428
- };
545
+ function summarizeTokenUsage(usages, bins) {
546
+ const reasoning = usages.flatMap((usage) => usage.reasoning !== void 0 ? [usage.reasoning] : []);
547
+ const cached = usages.flatMap((usage) => usage.cached !== void 0 ? [usage.cached] : []);
548
+ const cacheWrite = usages.flatMap((usage) => usage.cacheWrite !== void 0 ? [usage.cacheWrite] : []);
429
549
  return {
430
- ...base,
431
- status: "ok",
432
- ci95: result.ci95,
433
- pValue: result.p,
434
- cohensD: result.cohensD,
435
- significant: result.p < .05 && Math.abs(result.cohensD) >= .2
550
+ input: distributionOf(usages.map((usage) => usage.input), bins),
551
+ output: distributionOf(usages.map((usage) => usage.output), bins),
552
+ reasoning: distributionOf(reasoning, bins),
553
+ cached: distributionOf(cached, bins),
554
+ cacheWrite: distributionOf(cacheWrite, bins),
555
+ totals: {
556
+ input: usages.reduce((total, usage) => total + usage.input, 0),
557
+ output: usages.reduce((total, usage) => total + usage.output, 0),
558
+ reasoning: reasoning.reduce((total, value) => total + value, 0),
559
+ cached: cached.reduce((total, value) => total + value, 0),
560
+ cacheWrite: cacheWrite.reduce((total, value) => total + value, 0)
561
+ }
436
562
  };
437
563
  }
438
- function resolveSplit(runs, pref) {
439
- if (pref !== "auto") return pref;
440
- return runs.some((r) => Number.isFinite(observedSplitScore(r, "holdout"))) ? "holdout" : "search";
441
- }
442
- /**
443
- * RAW (`observedSplitScore`): `analyzeRuns` describes what a set of runs
444
- * reported, and every downstream reader of this composite — distributions,
445
- * per-candidate summaries, the reward-hacking correlation — needs the ungated
446
- * number to see an inflated run at all.
447
- */
448
- function compositeOf(run, split) {
449
- const score = observedSplitScore(run, split);
450
- return Number.isFinite(score) ? score : NaN;
451
- }
452
- function distributionOf(values, bins, withIds) {
453
- if (values.length === 0) return {
454
- n: 0,
455
- mean: null,
456
- p50: null,
457
- p95: null,
458
- stddev: null,
459
- min: null,
460
- max: null,
461
- histogram: []
462
- };
463
- const sorted = [...values].sort((a, b) => a - b);
464
- const n = sorted.length;
465
- const mean = sorted.reduce((s, v) => s + v, 0) / n;
466
- const variance = sorted.reduce((s, v) => s + (v - mean) ** 2, 0) / n;
467
- const stddev = Math.sqrt(variance);
468
- const tailRuns = withIds ? [...withIds].sort((a, b) => a.score - b.score).slice(0, Math.min(5, withIds.length)) : void 0;
564
+ function aggregateTokenUsage(run) {
565
+ const input = finiteRaw(run, "aggregate_prompt_tokens");
566
+ const output = finiteRaw(run, "aggregate_completion_tokens");
567
+ const reasoning = finiteRaw(run, "aggregate_reasoning_tokens");
568
+ const cached = finiteRaw(run, "aggregate_cached_tokens");
569
+ const cacheWrite = finiteRaw(run, "aggregate_cache_write_tokens");
570
+ if (input === void 0 && output === void 0 && reasoning === void 0 && cached === void 0 && cacheWrite === void 0) return void 0;
469
571
  return {
470
- n,
471
- mean,
472
- p50: percentile(sorted, .5),
473
- p95: percentile(sorted, .95),
474
- stddev,
475
- min: sorted[0],
476
- max: sorted[n - 1],
477
- histogram: histogram(sorted, bins),
478
- ...tailRuns ? { tailRuns } : {}
572
+ input: input ?? 0,
573
+ output: output ?? 0,
574
+ ...reasoning !== void 0 ? { reasoning } : {},
575
+ ...cached !== void 0 ? { cached } : {},
576
+ ...cacheWrite !== void 0 ? { cacheWrite } : {}
479
577
  };
480
578
  }
481
- function percentile(sorted, q) {
482
- if (sorted.length === 0) return 0;
483
- if (sorted.length === 1) return sorted[0];
484
- const idx = (sorted.length - 1) * q;
485
- const lo = Math.floor(idx);
486
- const hi = Math.ceil(idx);
487
- if (lo === hi) return sorted[lo];
488
- const w = idx - lo;
489
- return sorted[lo] * (1 - w) + sorted[hi] * w;
490
- }
491
- /** Even-width histogram over the value range. Returns inclusive-lo /
492
- * exclusive-hi bins (closed on right for the last bin) compatible with
493
- * the substrate's `GainDistributionBin` shape. */
494
- function histogram(sorted, bins) {
495
- if (sorted.length === 0 || bins < 1) return [];
496
- const min = sorted[0];
497
- const max = sorted[sorted.length - 1];
498
- if (min === max) return [{
499
- lo: min,
500
- hi: max,
501
- count: sorted.length
502
- }];
503
- const width = (max - min) / bins;
504
- const out = [];
505
- for (let i = 0; i < bins; i++) {
506
- const lo = min + i * width;
507
- const hi = i === bins - 1 ? max : lo + width;
508
- out.push({
509
- lo,
510
- hi,
511
- count: 0
512
- });
513
- }
514
- for (const v of sorted) {
515
- const idx = Math.min(bins - 1, Math.floor((v - min) / width));
516
- out[idx].count++;
517
- }
518
- return out;
519
- }
520
- function computePerDimension(runs, bins) {
521
- const byDim = /* @__PURE__ */ new Map();
522
- for (const run of runs) {
523
- const scores = run.outcome.judgeScores;
524
- if (!scores) continue;
525
- for (const [dim, value] of Object.entries(scores.perDimMean ?? {})) {
526
- if (!Number.isFinite(value)) continue;
527
- const arr = byDim.get(dim) ?? [];
528
- arr.push(value);
529
- byDim.set(dim, arr);
530
- }
531
- }
532
- const out = {};
533
- for (const [dim, values] of byDim) out[dim] = distributionOf(values, bins);
534
- return out;
535
- }
536
- function computeJudgeInsights(runs) {
537
- const out = {};
538
- const byJudge = /* @__PURE__ */ new Map();
539
- for (const run of runs) {
540
- const scores = run.outcome.judgeScores;
541
- if (!scores?.perJudge) continue;
542
- for (const [judgeId, dims] of Object.entries(scores.perJudge)) {
543
- const dimValues = Object.values(dims).filter(Number.isFinite);
544
- if (dimValues.length === 0) continue;
545
- const judgeMean = dimValues.reduce((s, v) => s + v, 0) / dimValues.length;
546
- const arr = byJudge.get(judgeId) ?? [];
547
- arr.push(judgeMean);
548
- byJudge.set(judgeId, arr);
549
- }
550
- }
551
- for (const [judgeId, values] of byJudge) out[judgeId] = {
552
- n: values.length,
553
- meanScore: values.reduce((s, v) => s + v, 0) / values.length
554
- };
555
- return out;
579
+ function finiteRaw(run, key) {
580
+ const value = run.outcome.raw[key];
581
+ return typeof value === "number" && Number.isFinite(value) && value >= 0 ? value : void 0;
556
582
  }
557
- function computeInterRater(ratings) {
558
- const byRun = /* @__PURE__ */ new Map();
559
- for (const r of ratings) {
560
- if (!Number.isFinite(r.score)) continue;
561
- const list = byRun.get(r.runId) ?? [];
562
- list.push({
563
- rater: r.rater,
564
- score: r.score
565
- });
566
- byRun.set(r.runId, list);
567
- }
568
- const raters = new Set(ratings.map((r) => r.rater));
569
- const jointlyRated = [];
570
- for (const [runId, ratersForRun] of byRun) {
571
- const seen = new Set(ratersForRun.map((r) => r.rater));
572
- let all = true;
573
- for (const r of raters) if (!seen.has(r)) all = false;
574
- if (all) jointlyRated.push(runId);
575
- }
576
- if (raters.size < 2 || jointlyRated.length === 0) return void 0;
577
- const raterList = [...raters].sort();
578
- const perPair = {};
579
- for (let i = 0; i < raterList.length; i++) for (let j = i + 1; j < raterList.length; j++) {
580
- const a = raterList[i];
581
- const b = raterList[j];
582
- const aScores = [];
583
- const bScores = [];
584
- for (const runId of jointlyRated) {
585
- const ratersForRun = byRun.get(runId);
586
- const sa = ratersForRun.find((r) => r.rater === a)?.score;
587
- const sb = ratersForRun.find((r) => r.rater === b)?.score;
588
- if (sa !== void 0 && sb !== void 0) {
589
- aScores.push(sa);
590
- bScores.push(sb);
591
- }
592
- }
593
- const agreement = continuousAgreement(aScores.map((score, index) => [score, bScores[index]]), { bootstrap: 0 });
594
- perPair[`${a}::${b}`] = agreement.weightedKappa;
595
- }
596
- const matrix = jointlyRated.map((runId) => {
597
- const ratingsByRater = new Map(byRun.get(runId).map((rating) => [rating.rater, rating.score]));
598
- return raterList.map((rater) => ratingsByRater.get(rater));
599
- });
600
- const agreement = continuousAgreement(matrix, { bootstrap: 0 });
601
- const disagreementCases = jointlyRated.map((runId) => {
602
- const ratersForRun = byRun.get(runId);
603
- const scores = ratersForRun.map((r) => r.score);
604
- return {
605
- runId,
606
- ratings: ratersForRun,
607
- range: Math.max(...scores) - Math.min(...scores)
608
- };
609
- }).sort((a, b) => b.range - a.range).slice(0, 20);
610
- return {
611
- raters: raters.size,
612
- jointlyRated: jointlyRated.length,
613
- kappa: Number.isFinite(agreement.weightedKappa) ? agreement.weightedKappa : 0,
614
- icc: agreement.icc,
615
- pearson: agreement.pearson,
616
- spearman: agreement.spearman,
617
- perPair,
618
- disagreementCases
583
+ function summarizeCostProvenance(runs) {
584
+ const summary = {
585
+ observed: {
586
+ n: 0,
587
+ totalUsd: 0
588
+ },
589
+ estimated: {
590
+ n: 0,
591
+ totalUsd: 0
592
+ },
593
+ lowerBound: {
594
+ n: 0,
595
+ floorUsd: 0
596
+ },
597
+ uncaptured: { n: 0 },
598
+ knownFraction: 0
619
599
  };
620
- }
621
- function computeLift(runs, baselineId, candidateId, split, independentUnitByScenarioId) {
622
- let bId = baselineId;
623
- let cId = candidateId;
624
- if (!bId || !cId) {
625
- const ids = [...new Set(runs.map((r) => r.candidateId))];
626
- if (ids.length !== 2) return void 0;
627
- const [idA, idB] = ids;
628
- const scoresA = finiteCompositeScores(runs.filter((run) => run.candidateId === idA), split);
629
- const scoresB = finiteCompositeScores(runs.filter((run) => run.candidateId === idB), split);
630
- if (scoresA.length === 0 || scoresB.length === 0) return void 0;
631
- const meanA = mean(scoresA);
632
- const meanB = mean(scoresB);
633
- bId = meanA <= meanB ? idA : idB;
634
- cId = meanA <= meanB ? idB : idA;
600
+ for (const run of runs) {
601
+ const cost = run.costProvenance;
602
+ if (cost.kind === "uncaptured") summary.uncaptured.n += 1;
603
+ else if (cost.kind === "lower-bound") {
604
+ summary.lowerBound.n += 1;
605
+ summary.lowerBound.floorUsd += cost.knownLowerBoundUsd;
606
+ } else {
607
+ summary[cost.kind].n += 1;
608
+ summary[cost.kind].totalUsd += cost.usd;
609
+ }
635
610
  }
636
- const baseline = runs.filter((r) => r.candidateId === bId);
637
- const candidate = runs.filter((r) => r.candidateId === cId);
638
- if (baseline.length === 0 || candidate.length === 0) return void 0;
639
- const scoredBaseline = baseline.filter((run) => Number.isFinite(compositeOf(run, split)));
640
- const scoredCandidate = candidate.filter((run) => Number.isFinite(compositeOf(run, split)));
641
- const pairing = pairRunRecords(scoredBaseline, scoredCandidate);
642
- let pairedBaseline = pairing.pairs.map((pair) => compositeOf(pair.baseline, split));
643
- let pairedCandidate = pairing.pairs.map((pair) => compositeOf(pair.treatment, split));
644
- if (pairedBaseline.length === 0) return void 0;
645
- const grouped = independentUnitByScenarioId ? aggregatePairedHoldout({
646
- before: pairedBaseline,
647
- after: pairedCandidate,
648
- cellIds: pairing.pairs.map((pair, index) => `${pair.pairKey}:${index}`)
649
- }, new Map(pairing.pairs.map((pair) => [pair.pairKey, independentUnitByScenarioId.get(pair.baseline.scenarioId)]))) : void 0;
650
- if (grouped) {
651
- pairedBaseline = grouped.before;
652
- pairedCandidate = grouped.after;
611
+ const known = summary.observed.n + summary.estimated.n;
612
+ summary.knownFraction = runs.length > 0 ? known / runs.length : 0;
613
+ return summary;
614
+ }
615
+ function diagnoseCostCoverage(runs, provenance) {
616
+ const unknown = provenance.uncaptured.n + provenance.lowerBound.n;
617
+ const known = provenance.observed.n + provenance.estimated.n;
618
+ const floor = provenance.lowerBound.n > 0 ? ` (${provenance.lowerBound.n} of them cost at least $${provenance.lowerBound.floorUsd.toFixed(6)} together)` : "";
619
+ if (unknown === runs.length) return `USD cost total unknown for all ${runs.length} runs${floor} — no observed or estimated USD values; token and wall-time metrics remain available.`;
620
+ return `USD cost total unknown for ${unknown}/${runs.length} runs${floor}; excluded those rows from cost statistics (${known}/${runs.length} retained: ${provenance.observed.n} observed, ${provenance.estimated.n} estimated).`;
621
+ }
622
+ //#endregion
623
+ //#region src/contamination-guard.ts
624
+ function checkCanaries(output, scenarios) {
625
+ const leaks = [];
626
+ for (const s of scenarios) {
627
+ if (!s.canary) continue;
628
+ if (output.includes(s.canary)) leaks.push({
629
+ scenarioId: s.id,
630
+ canary: s.canary,
631
+ evidence: excerpt(output, s.canary)
632
+ });
653
633
  }
654
- const reverseInferredArms = grouped !== void 0 && (!baselineId || !candidateId) && mean(pairedBaseline) > mean(pairedCandidate);
655
- if (reverseInferredArms) [pairedBaseline, pairedCandidate] = [pairedCandidate, pairedBaseline];
656
- const baselineMean = mean(pairedBaseline);
657
- const candidateMean = mean(pairedCandidate);
658
- const delta = candidateMean - baselineMean;
659
- const bootstrap = pairedBootstrap(pairedBaseline, pairedCandidate, {
660
- confidence: .95,
661
- resamples: 2e3,
662
- statistic: "mean"
663
- });
664
- const tTest = pairedTTest(pairedBaseline, pairedCandidate);
665
- const d = pairedCohensDz(pairedBaseline, pairedCandidate);
666
- const mde = pairedMde({
667
- nPaired: pairedBaseline.length,
668
- power: .8,
669
- alpha: .05
670
- });
671
- const requiredN = d === null || d === 0 ? null : requiredPairedSampleSize({
672
- effect: Math.abs(d),
673
- power: .8,
674
- alpha: .05
675
- });
676
- return {
677
- baselineMean,
678
- candidateMean,
679
- delta,
680
- ci95: [bootstrap.low, bootstrap.high],
681
- pValue: tTest.p,
682
- n: pairedBaseline.length,
683
- ...grouped ? {
684
- pairedRunN: pairing.pairs.length,
685
- independentUnitIds: grouped.unitIds
686
- } : {},
687
- minimumRequired: 20,
688
- decisionEligible: bootstrap.gateEligible,
689
- unpairedBaseline: (reverseInferredArms ? pairing.unpairedTreatment : pairing.unpairedBaseline).length,
690
- unpairedCandidate: (reverseInferredArms ? pairing.unpairedBaseline : pairing.unpairedTreatment).length,
691
- cohensD: d,
692
- mde,
693
- requiredN
694
- };
634
+ return leaks;
695
635
  }
696
- function mean(arr) {
697
- return arr.length === 0 ? 0 : arr.reduce((s, v) => s + v, 0) / arr.length;
636
+ function excerpt(source, needle) {
637
+ const at = source.indexOf(needle);
638
+ if (at < 0) return "";
639
+ const start = Math.max(0, at - 30);
640
+ const end = Math.min(source.length, at + needle.length + 30);
641
+ return (start > 0 ? "…" : "") + source.slice(start, end) + (end < source.length ? "…" : "");
642
+ }
643
+ //#endregion
644
+ //#region src/contract/failure-insight.ts
645
+ /**
646
+ * Model-free task-failure tally.
647
+ *
648
+ * Explicit non-success classes are task-failure evidence.
649
+ * A low task score without a class is counted as `unknown`.
650
+ */
651
+ function computeFailureClasses(runs, split) {
652
+ const counts = /* @__PURE__ */ new Map();
653
+ for (const r of runs) {
654
+ if (!isTaskFailure(r, split)) continue;
655
+ const key = r.failureClass !== void 0 && r.failureClass !== "success" ? r.failureClass : "unknown";
656
+ counts.set(key, (counts.get(key) ?? 0) + 1);
657
+ }
658
+ if (counts.size === 0) return void 0;
659
+ const n = runs.length;
660
+ return [...counts.entries()].map(([failureClass, count]) => ({
661
+ failureClass,
662
+ count,
663
+ share: n > 0 ? count / n : 0
664
+ })).sort((a, b) => b.count - a.count || a.failureClass.localeCompare(b.failureClass));
698
665
  }
699
666
  async function computeFailureClusters(runs, analyst, split) {
700
667
  const failed = runs.filter((run) => isTaskFailure(run, split));
@@ -731,9 +698,6 @@ async function computeFailureClusters(runs, analyst, split) {
731
698
  totalFailures: failed.length
732
699
  };
733
700
  }
734
- function finiteCompositeScores(runs, split) {
735
- return runs.map((run) => compositeOf(run, split)).filter(Number.isFinite);
736
- }
737
701
  function isTaskFailure(run, split) {
738
702
  if (run.failureClass !== void 0 && run.failureClass !== "success") return true;
739
703
  const score = compositeOf(run, split);
@@ -766,44 +730,13 @@ function stringifyOutput(run) {
766
730
  if (typeof metadata?.output === "string") return metadata.output;
767
731
  if (typeof metadata?.text === "string") return metadata.text;
768
732
  }
769
- function computeOutcomeCorrelation(runs, outcome, split) {
770
- const xs = [];
771
- const ys = [];
772
- for (const run of runs) {
773
- const y = outcome.valueByRunId[run.runId];
774
- if (y === void 0 || !Number.isFinite(y)) continue;
775
- const x = compositeOf(run, split);
776
- if (!Number.isFinite(x)) continue;
777
- xs.push(x);
778
- ys.push(y);
779
- }
780
- if (xs.length < 3) return void 0;
781
- const p = pearsonR(xs, ys);
782
- const s = spearmanR(xs, ys);
783
- const meanX = mean(xs);
784
- const meanY = mean(ys);
785
- let num = 0;
786
- let denom = 0;
787
- for (let i = 0; i < xs.length; i++) {
788
- num += (xs[i] - meanX) * (ys[i] - meanY);
789
- denom += (xs[i] - meanX) ** 2;
790
- }
791
- const slope = denom === 0 ? 0 : num / denom;
792
- const intercept = meanY - slope * meanX;
793
- const ssTot = ys.reduce((a, y) => a + (y - meanY) ** 2, 0);
794
- const ssRes = ys.reduce((a, y, i) => a + (y - (intercept + slope * xs[i])) ** 2, 0);
795
- const r2 = ssTot === 0 ? 0 : 1 - ssRes / ssTot;
796
- return {
797
- metric: outcome.metric,
798
- n: xs.length,
799
- pearson: p,
800
- spearman: s,
801
- rewardModel: {
802
- intercept,
803
- slope,
804
- r2
805
- }
806
- };
733
+ //#endregion
734
+ //#region src/contract/insight-recommendations.ts
735
+ /** A bootstrap interval with no spread: every resample landed on the same
736
+ * value, so the interval carries no information about how far the point
737
+ * estimate could be wrong and cannot support a directional claim. */
738
+ function zeroWidth(ci) {
739
+ return !Number.isFinite(ci[0]) || !Number.isFinite(ci[1]) || ci[0] === ci[1];
807
740
  }
808
741
  function buildReleaseScorecard(composite, lift, contamination) {
809
742
  const axes = [];
@@ -985,6 +918,77 @@ function buildRecommendations(ctx) {
985
918
  return out;
986
919
  }
987
920
  //#endregion
988
- export { summarizeExecution as n, checkCanaries as r, analyzeRuns as t };
921
+ //#region src/contract/analyze-runs.ts
922
+ async function analyzeRuns(opts) {
923
+ const runs = opts.runs.map(validateRunRecord);
924
+ const bins = opts.histogramBins ?? 12;
925
+ const threshold = opts.decisionThreshold ?? .02;
926
+ if (!Number.isFinite(threshold)) throw new Error(`analyzeRuns: decisionThreshold must be finite, got ${threshold}`);
927
+ const split = resolveSplit(runs, opts.split ?? "auto");
928
+ const compositeWithIds = runs.map((r) => ({
929
+ runId: r.runId,
930
+ score: compositeOf(r, split)
931
+ })).filter((p) => Number.isFinite(p.score));
932
+ const composite = distributionOf(compositeWithIds.map((p) => p.score), bins, compositeWithIds);
933
+ const perDimension = computePerDimension(runs, bins);
934
+ const { execution, costProvenance: provenance } = summarizeExecution({
935
+ runs,
936
+ histogramBins: bins
937
+ });
938
+ const knownCostRuns = runs.filter((run) => run.costProvenance.usd !== null);
939
+ const costs = knownCostRuns.map((r) => r.costUsd).filter(isFiniteNumber);
940
+ const costDist = distributionOf(costs, bins);
941
+ const pareto = paretoChart(knownCostRuns, { split });
942
+ const degraded = {};
943
+ if (provenance.uncaptured.n + provenance.lowerBound.n > 0) degraded.cost = diagnoseCostCoverage(runs, provenance);
944
+ else if (costs.length === 0 || costs.every((c) => c === 0)) degraded.cost = `all ${runs.length} explicitly observed or estimated USD values are $0`;
945
+ if (pareto.points.length < 2) degraded.pareto = pareto.points.length === 0 ? "no candidates — Pareto unavailable" : "single candidate — Pareto is a single point, not a frontier";
946
+ const costQuality = {
947
+ cost: costDist,
948
+ pareto,
949
+ provenance,
950
+ ...degraded.cost || degraded.pareto ? { degraded } : {}
951
+ };
952
+ const judges = computeJudgeInsights(runs);
953
+ const interRater = opts.raterScores ? computeInterRater(opts.raterScores) : void 0;
954
+ const lift = computeLift(runs, opts.baselineCandidateId, opts.candidateCandidateId, split, opts.independentUnitByScenarioId);
955
+ const failureClusters = opts.analyst ? await computeFailureClusters(runs, opts.analyst, split) : void 0;
956
+ const failureClasses = computeFailureClasses(runs, split);
957
+ const contamination = opts.canaryScenarios ? computeContamination(runs, opts.canaryScenarios) : void 0;
958
+ const outcomeCorrelation = opts.outcomeSignal ? computeOutcomeCorrelation(runs, opts.outcomeSignal, split) : void 0;
959
+ const release = buildReleaseScorecard(composite, lift, contamination);
960
+ const priorPeriodComparison = opts.baselineRuns ? computePriorPeriodComparison(runs, opts.baselineRuns, split, opts.baselineLabel) : void 0;
961
+ const recommendations = buildRecommendations({
962
+ composite,
963
+ judges,
964
+ interRater,
965
+ lift,
966
+ failureClusters,
967
+ failureClasses,
968
+ contamination,
969
+ outcomeCorrelation,
970
+ priorPeriodComparison,
971
+ threshold
972
+ });
973
+ return {
974
+ n: runs.length,
975
+ execution,
976
+ composite,
977
+ perDimension,
978
+ costQuality,
979
+ judges,
980
+ interRater,
981
+ lift,
982
+ failureClusters,
983
+ contamination,
984
+ outcomeCorrelation,
985
+ release,
986
+ ...failureClasses ? { failureClasses } : {},
987
+ ...priorPeriodComparison ? { priorPeriodComparison } : {},
988
+ recommendations
989
+ };
990
+ }
991
+ //#endregion
992
+ export { checkCanaries as n, summarizeExecution as r, analyzeRuns as t };
989
993
 
990
- //# sourceMappingURL=analyze-runs-3xpby3p2.js.map
994
+ //# sourceMappingURL=analyze-runs-C84irm4i.js.map