@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,36 +1,35 @@
1
- import { a as hashCanonical, i as compareCodeUnits, r as canonicalString } from "./canonical-BsZVgBhW.js";
2
- import { i as modelHasSnapshot, s as searchCellRunId } from "./run-record-DlTZ_lqe.js";
3
- import { n as MemoryLedgerJournal, r as replayLedgerText, t as FileLedgerJournal } from "./journal-DvKCvjty.js";
4
- import "./ledger-core-B2hahzrt.js";
5
- import { a as SearchLedgerError, i as SearchLedgerConflictError, o as SearchLedgerIntegrityError, t as SEARCH_LEDGER_FILE_CONTEXT } from "./search-ledger-file-BqOo-bVo.js";
6
- import { n as evaluationClaimSchema } from "./claim-BXcZw-jo.js";
1
+ import { a as hashCanonical, i as compareCodeUnits, r as canonicalString } from "./canonical-B2RqLofv.js";
2
+ import { i as modelHasSnapshot, s as searchCellRunId } from "./run-record-Boc5IUTp.js";
3
+ import { n as MemoryLedgerJournal, r as replayLedgerText, t as FileLedgerJournal } from "./journal-DfRz9kps.js";
4
+ import "./ledger-core-Gq7yp8lP.js";
5
+ import { a as SearchLedgerError, i as SearchLedgerConflictError, o as SearchLedgerIntegrityError, t as SEARCH_LEDGER_FILE_CONTEXT } from "./search-ledger-file-DDQUgvCg.js";
6
+ import { n as evaluationClaimSchema } from "./claim-q4HQhK1G.js";
7
+ import { t as roundDecimal } from "./round-decimal-COrKglMh.js";
7
8
  import { createHash } from "node:crypto";
8
9
  import { z } from "zod";
9
- //#region src/campaign/search-ledger-ordering.ts
10
- function artifactKey(artifact) {
11
- return canonicalString(artifact);
10
+ //#region src/campaign/search-ledger-constraints.ts
11
+ /** Shared ledger limits and structural event constraints for writers and replay. */
12
+ const USD_TOLERANCE = 1e-9;
13
+ function assertStageSplit(cellId, stage, split, isRoot) {
14
+ if (!{
15
+ root: ["train", "selection"],
16
+ train: ["train"],
17
+ screen: ["selection"],
18
+ rung: ["selection"],
19
+ claim: ["test"],
20
+ external: ["train", "selection"]
21
+ }[stage].includes(split)) throw integrity(`cell ${cellId}: a ${stage} cell cannot run on the ${split} split`);
22
+ if (stage === "root" && !isRoot) throw integrity(`cell ${cellId}: only the root node runs root cells`);
12
23
  }
13
- function compareStrings(a, b) {
14
- return a < b ? -1 : a > b ? 1 : 0;
24
+ function assertUnique(values, label, eventId) {
25
+ if (new Set(values).size !== values.length) throw integrity(`event ${eventId} contains duplicate ${label} values`);
26
+ }
27
+ function integrity(message) {
28
+ return new SearchLedgerIntegrityError(message);
15
29
  }
16
30
  //#endregion
17
- //#region src/campaign/search-state.ts
18
- /**
19
- * `SearchState`: the one projection of a search ledger.
20
- *
21
- * The same code checks every invariant for the producer's journal, the kernel,
22
- * and the Intelligence verifier, and builds the read model they share. It keeps
23
- * compact indexes (nodes, edges, cells, per-unit score sums, running audit
24
- * totals), not the raw event list, and applies each entry in time proportional
25
- * to that entry, so a search of any length appends at a constant cost.
26
- *
27
- * The journal asks for a snapshot after every append. A snapshot is a
28
- * `SearchStateView` that reads the live indexes, so taking one costs nothing.
29
- * The view is valid until the state applies its next entry; a read after that
30
- * throws rather than returning numbers from a later ledger position. Read the
31
- * ledger's state again to see newer entries. The audit, header, head and claim
32
- * on a view are plain values and stay readable.
33
- */
31
+ //#region src/campaign/search-state-identity.ts
32
+ /** Canonical identities for search nodes, cells, and split task sets. */
34
33
  /** Deterministic node id: identical content in one search is one node. */
35
34
  function searchNodeId(searchId, artifactDigest) {
36
35
  return `node_${shortDigest([searchId, artifactDigest])}`;
@@ -54,13 +53,17 @@ function searchTaskSetDigest(tasks) {
54
53
  function shortDigest(value) {
55
54
  return createHash("sha256").update(canonicalString(value)).digest("hex").slice(0, 32);
56
55
  }
57
- const MAX_LABEL_CHARS = 200;
58
- const USD_TOLERANCE = 1e-9;
59
- const SPLITS = [
60
- "train",
61
- "selection",
62
- "test"
63
- ];
56
+ //#endregion
57
+ //#region src/campaign/search-ledger-ordering.ts
58
+ function artifactKey(artifact) {
59
+ return canonicalString(artifact);
60
+ }
61
+ function compareStrings(a, b) {
62
+ return a < b ? -1 : a > b ? 1 : 0;
63
+ }
64
+ //#endregion
65
+ //#region src/campaign/search-state-view.ts
66
+ /** Position-bound search snapshots and deterministic scored-unit reads. */
64
67
  /**
65
68
  * Per-unit means of scored cells, in unitId order. Each unit sums its cells in
66
69
  * cellId order, so the result depends on the set of cells alone, never on the
@@ -86,6 +89,151 @@ function searchUnitScores(cells) {
86
89
  });
87
90
  }
88
91
  /**
92
+ * A read of `SearchState` at one ledger position. Header, head, audit and
93
+ * claim are values. Node, edge, cell and score reads go to the live indexes and
94
+ * throw once the state has applied a later entry.
95
+ */
96
+ var SearchStateView = class {
97
+ searchId;
98
+ header;
99
+ closed;
100
+ head;
101
+ /** `occurredAt` of the head entry; a writer stamps later events at or after it. */
102
+ lastOccurredAt;
103
+ audit;
104
+ completion;
105
+ /**
106
+ * The admission rule's room: `headroomUsd` is the largest reservation a new
107
+ * non-claim cell or operation may hold (committed spend, open holds and the
108
+ * unspent claim reserve all count against the cap), or null when the search
109
+ * declares no cap. `claimReserveUsd` is what claim cells may still draw.
110
+ */
111
+ budget;
112
+ state;
113
+ version;
114
+ constructor(state, version) {
115
+ this.state = state;
116
+ this.version = version;
117
+ this.searchId = state.searchId;
118
+ this.header = state.readHeader();
119
+ this.closed = state.readClosed();
120
+ this.head = state.readHead();
121
+ this.lastOccurredAt = state.readLastOccurredAt();
122
+ this.audit = state.readAudit();
123
+ this.budget = state.readBudget();
124
+ const reasons = state.incompleteReasons();
125
+ if (!this.closed) reasons.unshift("search is open");
126
+ this.completion = {
127
+ complete: this.closed !== null,
128
+ reasons
129
+ };
130
+ }
131
+ /** The node the search started from: the first registered. */
132
+ get rootNodeId() {
133
+ return this.live().readNodeIds()[0] ?? null;
134
+ }
135
+ node(nodeId) {
136
+ return this.live().readNode(nodeId);
137
+ }
138
+ hasNode(nodeId) {
139
+ return this.live().readHasNode(nodeId);
140
+ }
141
+ /** Node ids in registration order. */
142
+ nodeIds() {
143
+ return [...this.live().readNodeIds()];
144
+ }
145
+ /** Nodes in registration order. */
146
+ nodes() {
147
+ const state = this.live();
148
+ return state.readNodeIds().map((nodeId) => state.readNode(nodeId));
149
+ }
150
+ nodeIdForDigest(artifactDigest) {
151
+ return this.live().readNodeIdForDigest(artifactDigest);
152
+ }
153
+ edge(edgeId) {
154
+ return this.live().readEdge(edgeId);
155
+ }
156
+ /** Edges in ledger order. */
157
+ edges() {
158
+ const state = this.live();
159
+ return state.readEdgeIds().map((edgeId) => state.readEdge(edgeId));
160
+ }
161
+ cell(cellId) {
162
+ return this.live().readCell(cellId);
163
+ }
164
+ /** Cells in allocation order, optionally of one node. */
165
+ cells(filter = {}) {
166
+ const state = this.live();
167
+ return state.readCellIds(filter.nodeId).map((cellId) => state.readCell(cellId));
168
+ }
169
+ operation(operationId) {
170
+ return this.live().readOperation(operationId);
171
+ }
172
+ /** A node's scored cells on one split, in allocation order. Unscored cells
173
+ * (errored, cancelled or in flight) are absent, never zero. */
174
+ scoredCells(nodeId, split) {
175
+ return this.live().readScoredCells(nodeId, split);
176
+ }
177
+ /** Per-unit score means of a node on one split, in unitId order. */
178
+ unitScores(nodeId, split) {
179
+ return searchUnitScores(this.scoredCells(nodeId, split));
180
+ }
181
+ /** The lineage a RunRecord mint needs for one cell attempt. */
182
+ lineage(coordinates) {
183
+ const state = this.live();
184
+ if (coordinates.searchId !== this.searchId) throw new SearchLedgerError(`coordinates name search ${coordinates.searchId}, not ${this.searchId}`);
185
+ const cell = state.readCell(coordinates.cellId);
186
+ if (!cell || cell.nodeId !== coordinates.nodeId) throw new SearchLedgerError(`cell ${coordinates.cellId} of node ${coordinates.nodeId} is not in search ${this.searchId}`);
187
+ if (coordinates.attempt < 1 || coordinates.attempt > cell.attempts) throw new SearchLedgerError(`cell ${coordinates.cellId} has ${cell.attempts} settled attempt(s), not attempt ${coordinates.attempt}`);
188
+ const node = state.readNode(cell.nodeId);
189
+ if (node.depth === null) throw new SearchLedgerError(`node ${node.nodeId} has unknown lineage, so its depth is unknown`);
190
+ const containment = this.header?.containment ?? null;
191
+ return {
192
+ depth: node.depth,
193
+ ordinal: node.ordinal,
194
+ rep: cell.rep,
195
+ containingRunId: containment ? searchCellRunId({
196
+ cellId: containment.cellId,
197
+ attempt: containment.attempt
198
+ }) : null
199
+ };
200
+ }
201
+ live() {
202
+ if (!this.state.isAt(this.version)) throw new SearchLedgerError(`this SearchStateView is from sequence ${this.head?.sequence ?? -1}, and the ledger has moved on; read the ledger's state again`);
203
+ return this.state;
204
+ }
205
+ };
206
+ function nodeView(record) {
207
+ const latest = record.decisions.at(-1)?.decision ?? null;
208
+ return {
209
+ nodeId: record.event.nodeId,
210
+ ordinal: record.ordinal,
211
+ artifactDigest: record.event.artifactDigest,
212
+ artifact: record.event.artifact,
213
+ surfaces: record.event.surfaces,
214
+ primaryParentId: record.primaryParentId,
215
+ depth: record.depth,
216
+ parents: [...record.parents],
217
+ children: [...record.children],
218
+ edgeIds: [...record.edgeIds],
219
+ status: latest?.status ?? null,
220
+ rung: latest?.status === "advanced" ? latest.rung : null,
221
+ finalist: record.finalist,
222
+ decisions: [...record.decisions],
223
+ cellCount: record.cellIds.length,
224
+ spend: { ...record.spend },
225
+ registeredSequence: record.registeredSequence,
226
+ updatedSequence: record.updatedSequence
227
+ };
228
+ }
229
+ //#endregion
230
+ //#region src/campaign/search-state-projection.ts
231
+ const SPLITS = [
232
+ "train",
233
+ "selection",
234
+ "test"
235
+ ];
236
+ /**
89
237
  * The pure, incremental projection of one search ledger. `apply` refuses any
90
238
  * entry that breaks an invariant; the journal then discards this instance and
91
239
  * replays into a new one, so a refused entry leaves no partial state behind.
@@ -254,7 +402,7 @@ var SearchState = class {
254
402
  if (seen.length > 0) throw integrity(`test units ${seen.join(", ")} also appear in train or selection, but the splits declare heldOutUnits`);
255
403
  }
256
404
  const { budget } = event;
257
- if (budget.maxUsd !== null && budget.reservedClaimUsd > budget.maxUsd + USD_TOLERANCE) throw integrity(`the claim reserve $${budget.reservedClaimUsd} exceeds the search cap $${budget.maxUsd}`);
405
+ if (budget.maxUsd !== null && budget.reservedClaimUsd > budget.maxUsd + 1e-9) throw integrity(`the claim reserve $${budget.reservedClaimUsd} exceeds the search cap $${budget.maxUsd}`);
258
406
  this.header = event;
259
407
  }
260
408
  startOperation(event) {
@@ -336,7 +484,7 @@ var SearchState = class {
336
484
  const child = this.nodes.get(event.childNodeId);
337
485
  if (!child) throw integrity(`edge ${event.edgeId} names unregistered child ${event.childNodeId}`);
338
486
  this.assertSearching(`edge ${event.edgeId}`);
339
- if (event.label.length > MAX_LABEL_CHARS) throw integrity(`edge ${event.edgeId} label exceeds ${MAX_LABEL_CHARS} characters`);
487
+ if (event.label.length > 200) throw integrity(`edge ${event.edgeId} label exceeds 200 characters`);
340
488
  if (event.diffs.length !== event.parents.length) throw integrity(`edge ${event.edgeId} needs one diff per parent`);
341
489
  assertUnique(event.parents.map((parent) => canonicalString(parent)), "parent", event.eventId);
342
490
  const { operator, attribution, parents } = event;
@@ -633,8 +781,8 @@ var SearchState = class {
633
781
  const hold = reservation?.usd ?? 0;
634
782
  if (maxUsd === null || hold === 0) return;
635
783
  const remainingClaim = Math.max(0, reservedClaimUsd - this.claimUsedUsd);
636
- if (claim && hold <= remainingClaim + USD_TOLERANCE) return;
637
- if (this.audit.spend.committedUsd + this.audit.spend.openReservationUsd + (claim ? 0 : remainingClaim) + hold > maxUsd + USD_TOLERANCE) throw integrity(`${subject} is not admissible: committed $${round(this.audit.spend.committedUsd)} + open $${round(this.audit.spend.openReservationUsd)} + claim reserve $${round(remainingClaim)} + hold $${round(hold)} exceeds the cap $${maxUsd}`);
784
+ if (claim && hold <= remainingClaim + 1e-9) return;
785
+ if (this.audit.spend.committedUsd + this.audit.spend.openReservationUsd + (claim ? 0 : remainingClaim) + hold > maxUsd + 1e-9) throw integrity(`${subject} is not admissible: committed $${roundDecimal(this.audit.spend.committedUsd, 6)} + open $${roundDecimal(this.audit.spend.openReservationUsd, 6)} + claim reserve $${roundDecimal(remainingClaim, 6)} + hold $${roundDecimal(hold, 6)} exceeds the cap $${maxUsd}`);
638
786
  }
639
787
  /** @internal The largest hold a new non-claim cell or operation may take,
640
788
  * and the claim reserve still unspent. */
@@ -738,168 +886,10 @@ var SearchState = class {
738
886
  return scored;
739
887
  }
740
888
  };
741
- /**
742
- * A read of `SearchState` at one ledger position. Header, head, audit and
743
- * claim are values. Node, edge, cell and score reads go to the live indexes and
744
- * throw once the state has applied a later entry.
745
- */
746
- var SearchStateView = class {
747
- searchId;
748
- header;
749
- closed;
750
- head;
751
- /** `occurredAt` of the head entry; a writer stamps later events at or after it. */
752
- lastOccurredAt;
753
- audit;
754
- completion;
755
- /**
756
- * The admission rule's room: `headroomUsd` is the largest reservation a new
757
- * non-claim cell or operation may hold (committed spend, open holds and the
758
- * unspent claim reserve all count against the cap), or null when the search
759
- * declares no cap. `claimReserveUsd` is what claim cells may still draw.
760
- */
761
- budget;
762
- state;
763
- version;
764
- constructor(state, version) {
765
- this.state = state;
766
- this.version = version;
767
- this.searchId = state.searchId;
768
- this.header = state.readHeader();
769
- this.closed = state.readClosed();
770
- this.head = state.readHead();
771
- this.lastOccurredAt = state.readLastOccurredAt();
772
- this.audit = state.readAudit();
773
- this.budget = state.readBudget();
774
- const reasons = state.incompleteReasons();
775
- if (!this.closed) reasons.unshift("search is open");
776
- this.completion = {
777
- complete: this.closed !== null,
778
- reasons
779
- };
780
- }
781
- /** The node the search started from: the first registered. */
782
- get rootNodeId() {
783
- return this.live().readNodeIds()[0] ?? null;
784
- }
785
- node(nodeId) {
786
- return this.live().readNode(nodeId);
787
- }
788
- hasNode(nodeId) {
789
- return this.live().readHasNode(nodeId);
790
- }
791
- /** Node ids in registration order. */
792
- nodeIds() {
793
- return [...this.live().readNodeIds()];
794
- }
795
- /** Nodes in registration order. */
796
- nodes() {
797
- const state = this.live();
798
- return state.readNodeIds().map((nodeId) => state.readNode(nodeId));
799
- }
800
- nodeIdForDigest(artifactDigest) {
801
- return this.live().readNodeIdForDigest(artifactDigest);
802
- }
803
- edge(edgeId) {
804
- return this.live().readEdge(edgeId);
805
- }
806
- /** Edges in ledger order. */
807
- edges() {
808
- const state = this.live();
809
- return state.readEdgeIds().map((edgeId) => state.readEdge(edgeId));
810
- }
811
- cell(cellId) {
812
- return this.live().readCell(cellId);
813
- }
814
- /** Cells in allocation order, optionally of one node. */
815
- cells(filter = {}) {
816
- const state = this.live();
817
- return state.readCellIds(filter.nodeId).map((cellId) => state.readCell(cellId));
818
- }
819
- operation(operationId) {
820
- return this.live().readOperation(operationId);
821
- }
822
- /** A node's scored cells on one split, in allocation order. Unscored cells
823
- * (errored, cancelled or in flight) are absent, never zero. */
824
- scoredCells(nodeId, split) {
825
- return this.live().readScoredCells(nodeId, split);
826
- }
827
- /** Per-unit score means of a node on one split, in unitId order. */
828
- unitScores(nodeId, split) {
829
- return searchUnitScores(this.scoredCells(nodeId, split));
830
- }
831
- /** The lineage a RunRecord mint needs for one cell attempt. */
832
- lineage(coordinates) {
833
- const state = this.live();
834
- if (coordinates.searchId !== this.searchId) throw new SearchLedgerError(`coordinates name search ${coordinates.searchId}, not ${this.searchId}`);
835
- const cell = state.readCell(coordinates.cellId);
836
- if (!cell || cell.nodeId !== coordinates.nodeId) throw new SearchLedgerError(`cell ${coordinates.cellId} of node ${coordinates.nodeId} is not in search ${this.searchId}`);
837
- if (coordinates.attempt < 1 || coordinates.attempt > cell.attempts) throw new SearchLedgerError(`cell ${coordinates.cellId} has ${cell.attempts} settled attempt(s), not attempt ${coordinates.attempt}`);
838
- const node = state.readNode(cell.nodeId);
839
- if (node.depth === null) throw new SearchLedgerError(`node ${node.nodeId} has unknown lineage, so its depth is unknown`);
840
- const containment = this.header?.containment ?? null;
841
- return {
842
- depth: node.depth,
843
- ordinal: node.ordinal,
844
- rep: cell.rep,
845
- containingRunId: containment ? searchCellRunId({
846
- cellId: containment.cellId,
847
- attempt: containment.attempt
848
- }) : null
849
- };
850
- }
851
- live() {
852
- if (!this.state.isAt(this.version)) throw new SearchLedgerError(`this SearchStateView is from sequence ${this.head?.sequence ?? -1}, and the ledger has moved on; read the ledger's state again`);
853
- return this.state;
854
- }
855
- };
856
- function nodeView(record) {
857
- const latest = record.decisions.at(-1)?.decision ?? null;
858
- return {
859
- nodeId: record.event.nodeId,
860
- ordinal: record.ordinal,
861
- artifactDigest: record.event.artifactDigest,
862
- artifact: record.event.artifact,
863
- surfaces: record.event.surfaces,
864
- primaryParentId: record.primaryParentId,
865
- depth: record.depth,
866
- parents: [...record.parents],
867
- children: [...record.children],
868
- edgeIds: [...record.edgeIds],
869
- status: latest?.status ?? null,
870
- rung: latest?.status === "advanced" ? latest.rung : null,
871
- finalist: record.finalist,
872
- decisions: [...record.decisions],
873
- cellCount: record.cellIds.length,
874
- spend: { ...record.spend },
875
- registeredSequence: record.registeredSequence,
876
- updatedSequence: record.updatedSequence
877
- };
878
- }
879
- function assertStageSplit(cellId, stage, split, isRoot) {
880
- if (!{
881
- root: ["train", "selection"],
882
- train: ["train"],
883
- screen: ["selection"],
884
- rung: ["selection"],
885
- claim: ["test"],
886
- external: ["train", "selection"]
887
- }[stage].includes(split)) throw integrity(`cell ${cellId}: a ${stage} cell cannot run on the ${split} split`);
888
- if (stage === "root" && !isRoot) throw integrity(`cell ${cellId}: only the root node runs root cells`);
889
- }
890
- function assertUnique(values, label, eventId) {
891
- if (new Set(values).size !== values.length) throw integrity(`event ${eventId} contains duplicate ${label} values`);
892
- }
893
889
  function count(value, noun, predicate) {
894
890
  const verb = predicate.replace(/^(has|is) /, (word) => value === 1 ? word : word === "has " ? "have " : "are ");
895
891
  return `${value} ${value === 1 ? noun : `${noun}s`} ${verb}`;
896
892
  }
897
- function round(usd) {
898
- return Math.round(usd * 1e6) / 1e6;
899
- }
900
- function integrity(message) {
901
- return new SearchLedgerIntegrityError(message);
902
- }
903
893
  //#endregion
904
894
  //#region src/campaign/search-ledger-types.ts
905
895
  /**
@@ -1590,6 +1580,6 @@ function formatZodError(error) {
1590
1580
  return error.issues.map((issue) => `${issue.path.length > 0 ? issue.path.join(".") : "<root>"}: ${issue.message}`).join("; ");
1591
1581
  }
1592
1582
  //#endregion
1593
- export { validateSearchLedgerEvent as a, SearchStateView as c, searchTaskSetDigest as d, searchUnitScores as f, replaySearchLedgerText as i, searchCellId as l, openSearchLedger as n, SEARCH_LEDGER_SCHEMA as o, parseSearchLedgerLine as r, SearchState as s, FileSearchLedger as t, searchNodeId as u };
1583
+ export { validateSearchLedgerEvent as a, SearchStateView as c, searchNodeId as d, searchTaskSetDigest as f, replaySearchLedgerText as i, searchUnitScores as l, openSearchLedger as n, SEARCH_LEDGER_SCHEMA as o, USD_TOLERANCE as p, parseSearchLedgerLine as r, SearchState as s, FileSearchLedger as t, searchCellId as u };
1594
1584
 
1595
- //# sourceMappingURL=search-ledger-d7V8o9Lk.js.map
1585
+ //# sourceMappingURL=search-ledger-CVUGLDZp.js.map