@tangle-network/agent-eval 0.208.2 → 0.210.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (237) hide show
  1. package/CHANGELOG.md +26 -0
  2. package/README.md +1 -1
  3. package/dist/adapters/http.d.ts +2 -2
  4. package/dist/{agent-profile-CEhxR_I3.d.ts → agent-profile-BGyt2z8U.d.ts} +3 -3
  5. package/dist/{agent-profile-CEhxR_I3.d.ts.map → agent-profile-BGyt2z8U.d.ts.map} +1 -1
  6. package/dist/{agent-profile-cell-BHcB-mZX.d.ts → agent-profile-cell-BNp-Js9F.d.ts} +2 -3
  7. package/dist/agent-profile-cell-BNp-Js9F.d.ts.map +1 -0
  8. package/dist/{agent-profile-cell-DcFW4vOc.js → agent-profile-cell-BYc0bxsL.js} +2 -2
  9. package/dist/agent-profile-cell-BYc0bxsL.js.map +1 -0
  10. package/dist/analyst/index.d.ts +12 -12
  11. package/dist/analyst/index.js +5 -5
  12. package/dist/{analyze-runs-GZ0VSwui.js → analyze-runs-3xpby3p2.js} +6 -6
  13. package/dist/analyze-runs-3xpby3p2.js.map +1 -0
  14. package/dist/{analyze-runs-CTJyUplR.d.ts → analyze-runs-BlslTkOJ.d.ts} +4 -4
  15. package/dist/{analyze-runs-CTJyUplR.d.ts.map → analyze-runs-BlslTkOJ.d.ts.map} +1 -1
  16. package/dist/{benchmark-command-BC265T1r.js → benchmark-command-S8tCtkxh.js} +6 -6
  17. package/dist/{benchmark-command-BC265T1r.js.map → benchmark-command-S8tCtkxh.js.map} +1 -1
  18. package/dist/benchmarks/index.d.ts +5 -7
  19. package/dist/benchmarks/index.d.ts.map +1 -1
  20. package/dist/benchmarks/index.js +3 -3
  21. package/dist/builder-eval/index.js +1 -1
  22. package/dist/campaign/index.d.ts +6 -6
  23. package/dist/campaign/index.js +10 -10
  24. package/dist/{campaign-evidence-DW3Krxov.js → campaign-evidence-OcUciD-N.js} +4 -4
  25. package/dist/campaign-evidence-OcUciD-N.js.map +1 -0
  26. package/dist/{campaign-C5pjR-Qn.js → campaign-wvvJA1ps.js} +14 -14
  27. package/dist/{campaign-C5pjR-Qn.js.map → campaign-wvvJA1ps.js.map} +1 -1
  28. package/dist/claude-jsonl-dZir12m6.js +86 -0
  29. package/dist/claude-jsonl-dZir12m6.js.map +1 -0
  30. package/dist/cli.js +7 -7
  31. package/dist/contract/index.d.ts +10 -10
  32. package/dist/contract/index.js +92 -16
  33. package/dist/contract/index.js.map +1 -1
  34. package/dist/counterfactual-DtMWvn7D.js.map +1 -1
  35. package/dist/{default-registry-DZFWY2_E.d.ts → default-registry-Crk3QEy1.d.ts} +6 -6
  36. package/dist/{default-registry-DZFWY2_E.d.ts.map → default-registry-Crk3QEy1.d.ts.map} +1 -1
  37. package/dist/{default-registry-DX5R7_n9.js → default-registry-DF4Yp7HQ.js} +2 -2
  38. package/dist/{default-registry-DX5R7_n9.js.map → default-registry-DF4Yp7HQ.js.map} +1 -1
  39. package/dist/{define-agent-eval-C8zBSbsc.d.ts → define-agent-eval-B_zZY2AZ.d.ts} +7 -7
  40. package/dist/{define-agent-eval-C8zBSbsc.d.ts.map → define-agent-eval-B_zZY2AZ.d.ts.map} +1 -1
  41. package/dist/{define-agent-eval-BjKXcDQp.js → define-agent-eval-CoXXDCMu.js} +7 -7
  42. package/dist/{define-agent-eval-BjKXcDQp.js.map → define-agent-eval-CoXXDCMu.js.map} +1 -1
  43. package/dist/diagnosis/index.d.ts +2 -5
  44. package/dist/diagnosis/index.d.ts.map +1 -1
  45. package/dist/diagnosis/index.js +2 -26
  46. package/dist/diagnosis/index.js.map +1 -1
  47. package/dist/{dspy-rlm-engine-sHwdSxK3.js → dspy-rlm-engine-BpaKVKJA.js} +2 -2
  48. package/dist/{dspy-rlm-engine-sHwdSxK3.js.map → dspy-rlm-engine-BpaKVKJA.js.map} +1 -1
  49. package/dist/{engine-DProXJ7A.d.ts → engine-D-YZ32ZJ.d.ts} +5 -12
  50. package/dist/engine-D-YZ32ZJ.d.ts.map +1 -0
  51. package/dist/{eval-campaign-DU_p8qVt.js → eval-campaign-4byTtqrf.js} +4 -4
  52. package/dist/{eval-campaign-DU_p8qVt.js.map → eval-campaign-4byTtqrf.js.map} +1 -1
  53. package/dist/evaluation.d.ts +2 -2
  54. package/dist/{exact-types-Cq6xXNVR.d.ts → exact-types-DjhfZglz.d.ts} +2 -2
  55. package/dist/{exact-types-Cq6xXNVR.d.ts.map → exact-types-DjhfZglz.d.ts.map} +1 -1
  56. package/dist/experiment/index.d.ts +2 -2
  57. package/dist/experiment/index.js +8 -8
  58. package/dist/{feedback-trajectory-C6Z8PRoF.d.ts → feedback-trajectory-CX01700m.d.ts} +3 -3
  59. package/dist/{feedback-trajectory-C6Z8PRoF.d.ts.map → feedback-trajectory-CX01700m.d.ts.map} +1 -1
  60. package/dist/hosted/index.js +1 -1
  61. package/dist/{index-CbBfavbT.d.ts → index-D0_l25We.d.ts} +21 -42
  62. package/dist/{index-CbBfavbT.d.ts.map → index-D0_l25We.d.ts.map} +1 -1
  63. package/dist/{index-nwNoS582.d.ts → index-DnZdBxCL.d.ts} +14 -11
  64. package/dist/{index-nwNoS582.d.ts.map → index-DnZdBxCL.d.ts.map} +1 -1
  65. package/dist/{index-DkucR0KJ.d.ts → index-UxNTvn-w.d.ts} +6 -6
  66. package/dist/{index-DkucR0KJ.d.ts.map → index-UxNTvn-w.d.ts.map} +1 -1
  67. package/dist/{index-Bzto04CY.d.ts → index-xnhRdqik.d.ts} +9 -20
  68. package/dist/{index-Bzto04CY.d.ts.map → index-xnhRdqik.d.ts.map} +1 -1
  69. package/dist/index.d.ts +28 -37
  70. package/dist/index.d.ts.map +1 -1
  71. package/dist/index.js +28 -90
  72. package/dist/index.js.map +1 -1
  73. package/dist/judge-gate-C59znGmR.js +638 -0
  74. package/dist/judge-gate-C59znGmR.js.map +1 -0
  75. package/dist/judge-gate-D2hCppem.d.ts +439 -0
  76. package/dist/judge-gate-D2hCppem.d.ts.map +1 -0
  77. package/dist/{kind-factory-Cn1lbsAd.js → kind-factory-ivTx6koH.js} +2 -11
  78. package/dist/{kind-factory-Cn1lbsAd.js.map → kind-factory-ivTx6koH.js.map} +1 -1
  79. package/dist/{llm-judge-HLWASwUJ.js → llm-judge-Tr7MBUnf.js} +9 -9
  80. package/dist/llm-judge-Tr7MBUnf.js.map +1 -0
  81. package/dist/{matrix-Cqkk7eYI.d.ts → matrix-jHTsHEkR.d.ts} +2 -2
  82. package/dist/{matrix-Cqkk7eYI.d.ts.map → matrix-jHTsHEkR.d.ts.map} +1 -1
  83. package/dist/meta-eval/index.d.ts +3 -133
  84. package/dist/meta-eval/index.d.ts.map +1 -1
  85. package/dist/meta-eval/index.js +3 -276
  86. package/dist/meta-eval/index.js.map +1 -1
  87. package/dist/{mint-C1W8w5wo.d.ts → mint-CDy-brUR.d.ts} +2 -2
  88. package/dist/{mint-C1W8w5wo.d.ts.map → mint-CDy-brUR.d.ts.map} +1 -1
  89. package/dist/{mint-CWG-s2mI.js → mint-Csor1BLJ.js} +2 -2
  90. package/dist/{mint-CWG-s2mI.js.map → mint-Csor1BLJ.js.map} +1 -1
  91. package/dist/multishot/golden/index.d.ts +1 -1
  92. package/dist/multishot/index.d.ts +2 -2
  93. package/dist/openapi.json +1 -1
  94. package/dist/{paired-arms-CgWT7sHy.js → paired-arms-DzKn0TfY.js} +3 -5
  95. package/dist/{paired-arms-CgWT7sHy.js.map → paired-arms-DzKn0TfY.js.map} +1 -1
  96. package/dist/{paired-binary-b2L3WKqr.js → paired-binary-Q36bhn2R.js} +13 -9
  97. package/dist/paired-binary-Q36bhn2R.js.map +1 -0
  98. package/dist/{paired-promotion-decision-2deJ7sDX.js → paired-promotion-decision-BN6IQTiu.js} +2 -2
  99. package/dist/{paired-promotion-decision-2deJ7sDX.js.map → paired-promotion-decision-BN6IQTiu.js.map} +1 -1
  100. package/dist/pipelines/index.d.ts +1 -1
  101. package/dist/pipelines/index.js +2 -2
  102. package/dist/{prime-protocol-Csr9kcOM.d.ts → prime-protocol-B7et3tI7.d.ts} +2 -2
  103. package/dist/{prime-protocol-Csr9kcOM.d.ts.map → prime-protocol-B7et3tI7.d.ts.map} +1 -1
  104. package/dist/{produced-state-Bzlh09oj.js → produced-state-CKybuR9F.js} +3 -3
  105. package/dist/produced-state-CKybuR9F.js.map +1 -0
  106. package/dist/profile-cell.d.ts +2 -2
  107. package/dist/profile-cell.js +2 -2
  108. package/dist/{promotion-policy-CCmyEH_c.js → promotion-policy-CWW35UWq.js} +3 -3
  109. package/dist/{promotion-policy-CCmyEH_c.js.map → promotion-policy-CWW35UWq.js.map} +1 -1
  110. package/dist/{query-DlV0pdx4.js → query-B1D1qp2Z.js} +2 -2
  111. package/dist/{query-DlV0pdx4.js.map → query-B1D1qp2Z.js.map} +1 -1
  112. package/dist/{query-DBUQhehH.d.ts → query-DK1nWcmp.d.ts} +2 -3
  113. package/dist/{query-DBUQhehH.d.ts.map → query-DK1nWcmp.d.ts.map} +1 -1
  114. package/dist/{registry-DMkmhBQ5.d.ts → registry-BL7H33tj.d.ts} +3 -3
  115. package/dist/{registry-DMkmhBQ5.d.ts.map → registry-BL7H33tj.d.ts.map} +1 -1
  116. package/dist/{release-confidence-CkoXFx9I.d.ts → release-confidence-C4kI7lQi.d.ts} +4 -12
  117. package/dist/release-confidence-C4kI7lQi.d.ts.map +1 -0
  118. package/dist/{release-confidence-CiFg1EPq.js → release-confidence-Dbe9AS_X.js} +2 -2
  119. package/dist/{release-confidence-CiFg1EPq.js.map → release-confidence-Dbe9AS_X.js.map} +1 -1
  120. package/dist/{report-command-pXtxg5YK.js → report-command-CtIIsQKP.js} +3 -28
  121. package/dist/{report-command-pXtxg5YK.js.map → report-command-CtIIsQKP.js.map} +1 -1
  122. package/dist/reporting.d.ts +3 -3
  123. package/dist/reporting.js +3 -3
  124. package/dist/{researcher-CZFZjj-u.d.ts → researcher-DuIJ9IaA.d.ts} +4 -4
  125. package/dist/{researcher-CZFZjj-u.d.ts.map → researcher-DuIJ9IaA.d.ts.map} +1 -1
  126. package/dist/{reward-hacking-Cyk-QHk9.d.ts → reward-hacking-C6Kp54Av.d.ts} +2 -2
  127. package/dist/{reward-hacking-Cyk-QHk9.d.ts.map → reward-hacking-C6Kp54Av.d.ts.map} +1 -1
  128. package/dist/reward-nw2xZGZG.js.map +1 -1
  129. package/dist/rl.d.ts +10 -29
  130. package/dist/rl.d.ts.map +1 -1
  131. package/dist/rl.js +7 -7
  132. package/dist/rl.js.map +1 -1
  133. package/dist/rollout/index.d.ts +3 -3
  134. package/dist/rollout/index.js +4 -4
  135. package/dist/{rollout-l9w3Gdvh.js → rollout-D9bKKBnZ.js} +30 -165
  136. package/dist/rollout-D9bKKBnZ.js.map +1 -0
  137. package/dist/{rubric-predictive-validity-DIUwJJ9Y.d.ts → rubric-predictive-validity-BiNNEjpG.d.ts} +2 -2
  138. package/dist/{rubric-predictive-validity-DIUwJJ9Y.d.ts.map → rubric-predictive-validity-BiNNEjpG.d.ts.map} +1 -1
  139. package/dist/{run-record-BRlM99rX.js → run-record-DlTZ_lqe.js} +3 -13
  140. package/dist/run-record-DlTZ_lqe.js.map +1 -0
  141. package/dist/{run-record-BB290Y9A.js → run-record-ES07wfz9.js} +2 -2
  142. package/dist/{run-record-BB290Y9A.js.map → run-record-ES07wfz9.js.map} +1 -1
  143. package/dist/{run-record-DF-fuu31.d.ts → run-record-p2AYTrCn.d.ts} +3 -7
  144. package/dist/run-record-p2AYTrCn.d.ts.map +1 -0
  145. package/dist/search/index.d.ts +2 -24
  146. package/dist/search/index.d.ts.map +1 -1
  147. package/dist/search/index.js +3 -3
  148. package/dist/{search-kernel-CIie6xig.js → search-kernel-BIXWM7YV.js} +4 -4
  149. package/dist/search-kernel-BIXWM7YV.js.map +1 -0
  150. package/dist/{search-kernel-uKdPVRAe.d.ts → search-kernel-ah2GESe3.d.ts} +3 -3
  151. package/dist/{search-kernel-uKdPVRAe.d.ts.map → search-kernel-ah2GESe3.d.ts.map} +1 -1
  152. package/dist/{search-ledger-CXQPwdWz.js → search-ledger-aMTNQn_m.js} +2 -2
  153. package/dist/{search-ledger-CXQPwdWz.js.map → search-ledger-aMTNQn_m.js.map} +1 -1
  154. package/dist/{search-shipper-DhhofkDX.js → search-shipper-DKXWuLnp.js} +2 -2
  155. package/dist/{search-shipper-DhhofkDX.js.map → search-shipper-DKXWuLnp.js.map} +1 -1
  156. package/dist/{search-summary-BV5uehLd.js → search-summary-nwrtXxC_.js} +3 -3
  157. package/dist/{search-summary-BV5uehLd.js.map → search-summary-nwrtXxC_.js.map} +1 -1
  158. package/dist/{semantic-concept-judge-D1wH-YKc.js → semantic-concept-judge-BQxZyXdN.js} +3 -3
  159. package/dist/{semantic-concept-judge-D1wH-YKc.js.map → semantic-concept-judge-BQxZyXdN.js.map} +1 -1
  160. package/dist/{sequential-DMqr3sni.js → sequential-D-1PPCmM.js} +3 -3
  161. package/dist/{sequential-DMqr3sni.js.map → sequential-D-1PPCmM.js.map} +1 -1
  162. package/dist/{skillopt-optimization-method-Dcnh5Pvr.js → skillopt-optimization-method-DujPOiwD.js} +5 -5
  163. package/dist/{skillopt-optimization-method-Dcnh5Pvr.js.map → skillopt-optimization-method-DujPOiwD.js.map} +1 -1
  164. package/dist/{statistical-heldout-BP6iEJvR.js → statistical-heldout-1Gbmex7v.js} +2 -2
  165. package/dist/{statistical-heldout-BP6iEJvR.js.map → statistical-heldout-1Gbmex7v.js.map} +1 -1
  166. package/dist/{statistical-heldout-DFKtp-Qm.d.ts → statistical-heldout-8RGPIeyo.d.ts} +17 -14
  167. package/dist/statistical-heldout-8RGPIeyo.d.ts.map +1 -0
  168. package/dist/{store-otlp-BA7G1Du-.js → store-otlp-__ebQ6Hn.js} +2 -2
  169. package/dist/{store-otlp-BA7G1Du-.js.map → store-otlp-__ebQ6Hn.js.map} +1 -1
  170. package/dist/{store-tool-spans-DKoVbE-w.js → store-tool-spans-TbRBuIM7.js} +3 -3
  171. package/dist/{store-tool-spans-DKoVbE-w.js.map → store-tool-spans-TbRBuIM7.js.map} +1 -1
  172. package/dist/{store-tool-spans-9YJNMP-z.d.ts → store-tool-spans-wQ9idsnn.d.ts} +5 -5
  173. package/dist/{store-tool-spans-9YJNMP-z.d.ts.map → store-tool-spans-wQ9idsnn.d.ts.map} +1 -1
  174. package/dist/{summary-report-DvvesgR_.d.ts → summary-report-CK0ueoJd.d.ts} +2 -2
  175. package/dist/{summary-report-DvvesgR_.d.ts.map → summary-report-CK0ueoJd.d.ts.map} +1 -1
  176. package/dist/{summary-report-fXurE2TR.js → summary-report-DtdRucM0.js} +3 -3
  177. package/dist/{summary-report-fXurE2TR.js.map → summary-report-DtdRucM0.js.map} +1 -1
  178. package/dist/supervisor-run/index.d.ts +0 -8
  179. package/dist/supervisor-run/index.d.ts.map +1 -1
  180. package/dist/supervisor-run/index.js +36 -71
  181. package/dist/supervisor-run/index.js.map +1 -1
  182. package/dist/{systemone-review-Bt4JcxMc.d.ts → systemone-review-BReh3mvm.d.ts} +2 -2
  183. package/dist/{systemone-review-Bt4JcxMc.d.ts.map → systemone-review-BReh3mvm.d.ts.map} +1 -1
  184. package/dist/systemone.d.ts +3 -3
  185. package/dist/{tool-groups-j19pmOfP.d.ts → tool-groups-v28A-ZAF.d.ts} +3 -3
  186. package/dist/tool-groups-v28A-ZAF.d.ts.map +1 -0
  187. package/dist/{tool-waste-x_E8h9Ih.js → tool-waste-BYt5rdt8.js} +2 -2
  188. package/dist/{tool-waste-x_E8h9Ih.js.map → tool-waste-BYt5rdt8.js.map} +1 -1
  189. package/dist/{tool-waste-DxlebQkx.d.ts → tool-waste-Wi4g6Ekb.d.ts} +2 -2
  190. package/dist/{tool-waste-DxlebQkx.d.ts.map → tool-waste-Wi4g6Ekb.d.ts.map} +1 -1
  191. package/dist/{trace-questions-dRvmsbTk.d.ts → trace-questions-C26UvI3D.d.ts} +3 -3
  192. package/dist/{trace-questions-dRvmsbTk.d.ts.map → trace-questions-C26UvI3D.d.ts.map} +1 -1
  193. package/dist/trace-repair/index.d.ts +2 -9
  194. package/dist/trace-repair/index.d.ts.map +1 -1
  195. package/dist/trace-repair/index.js +1 -1
  196. package/dist/traces.d.ts +6 -8
  197. package/dist/traces.d.ts.map +1 -1
  198. package/dist/traces.js +6 -6
  199. package/dist/trajectory-replay/index.d.ts +0 -2
  200. package/dist/trajectory-replay/index.d.ts.map +1 -1
  201. package/dist/trajectory-replay/index.js +1 -1
  202. package/dist/{tree-CJOXbVcv.js → tree-kc1d80yF.js} +5 -25
  203. package/dist/tree-kc1d80yF.js.map +1 -0
  204. package/dist/{types-CFCUZk0B.d.ts → types-Dv9sYwBB.d.ts} +4 -4
  205. package/dist/{types-CFCUZk0B.d.ts.map → types-Dv9sYwBB.d.ts.map} +1 -1
  206. package/dist/{types-DAPpAkd4.d.ts → types-KEkKkETv.d.ts} +2 -2
  207. package/dist/{types-DAPpAkd4.d.ts.map → types-KEkKkETv.d.ts.map} +1 -1
  208. package/dist/{types-BlSBUNRd.d.ts → types-tWFY6bON.d.ts} +3 -3
  209. package/dist/{types-BlSBUNRd.d.ts.map → types-tWFY6bON.d.ts.map} +1 -1
  210. package/dist/wire/index.d.ts +1 -1
  211. package/docs/concepts.md +13 -0
  212. package/docs/experiment.md +10 -0
  213. package/docs/public-api.md +399 -424
  214. package/docs/trace-analysis.md +3 -0
  215. package/package.json +6 -5
  216. package/dist/agent-profile-cell-BHcB-mZX.d.ts.map +0 -1
  217. package/dist/agent-profile-cell-DcFW4vOc.js.map +0 -1
  218. package/dist/analyze-runs-GZ0VSwui.js.map +0 -1
  219. package/dist/campaign-evidence-DW3Krxov.js.map +0 -1
  220. package/dist/claude-jsonl-CG3JUbTJ.js +0 -211
  221. package/dist/claude-jsonl-CG3JUbTJ.js.map +0 -1
  222. package/dist/engine-DProXJ7A.d.ts.map +0 -1
  223. package/dist/llm-judge-HLWASwUJ.js.map +0 -1
  224. package/dist/paired-binary-b2L3WKqr.js.map +0 -1
  225. package/dist/produced-state-Bzlh09oj.js.map +0 -1
  226. package/dist/release-confidence-CkoXFx9I.d.ts.map +0 -1
  227. package/dist/rollout-l9w3Gdvh.js.map +0 -1
  228. package/dist/run-record-BRlM99rX.js.map +0 -1
  229. package/dist/run-record-DF-fuu31.d.ts.map +0 -1
  230. package/dist/search-kernel-CIie6xig.js.map +0 -1
  231. package/dist/series-convergence-CjO2QdRW.js +0 -43
  232. package/dist/series-convergence-CjO2QdRW.js.map +0 -1
  233. package/dist/series-convergence-hEfKdoi-.d.ts +0 -126
  234. package/dist/series-convergence-hEfKdoi-.d.ts.map +0 -1
  235. package/dist/statistical-heldout-DFKtp-Qm.d.ts.map +0 -1
  236. package/dist/tool-groups-j19pmOfP.d.ts.map +0 -1
  237. package/dist/tree-CJOXbVcv.js.map +0 -1
@@ -1,5 +1,5 @@
1
1
  import { p as CostProvenance } from "./cost-ledger-DbQdN3nO.js";
2
- import { w as JudgeScore } from "./types-CFCUZk0B.js";
2
+ import { w as JudgeScore } from "./types-Dv9sYwBB.js";
3
3
  import { o as MatrixResult } from "./index-DNgf5gyG.js";
4
4
  import { AgentProfile } from "@tangle-network/agent-interface";
5
5
  //#region src/multishot/types.d.ts
@@ -398,4 +398,4 @@ interface RunMultishotMatrixResult {
398
398
  declare function runMultishotMatrix<TPersona extends MultishotPersona>(opts: RunMultishotMatrixOptions<TPersona>): Promise<RunMultishotMatrixResult>;
399
399
  //#endregion
400
400
  export { MultishotToolExecutor as A, MultishotFatalToolError as C, MultishotShape as D, MultishotResult as E, assertMultishotShotResult as F, MultishotTransportRequest as M, MultishotTransportResponse as N, MultishotShotResultError as O, MultishotTransportToolCall as P, MultishotDriverEmptyError as S, MultishotPersona as T, JudgeRunResult as _, MultishotCellOutput as a, runJudge as b, RunMultishotMatrixResult as c, MultishotShot as d, RunMultishotOptions as f, JudgeDimension as g, JudgeConfig as h, ConversationJudgeInput as i, MultishotTransport as j, MultishotToolDefinition as k, computeCellComposite as l, DEFAULT_JUDGE_MODEL as m, CellCompositeInput as n, MultishotJudges as o, runMultishot as p, CellCompositeScore as r, RunMultishotMatrixOptions as s, ArtifactJudgeInput as t, runMultishotMatrix as u, renderDimensions as v, MultishotMessage as w, MultishotArtifact as x, renderJsonFooter as y };
401
- //# sourceMappingURL=matrix-Cqkk7eYI.d.ts.map
401
+ //# sourceMappingURL=matrix-jHTsHEkR.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"matrix-Cqkk7eYI.d.ts","names":[],"sources":["../src/multishot/types.ts","../src/multishot/judges.ts","../src/multishot/multishot.ts","../src/multishot/matrix.ts"],"mappings":";;;;;UAIiB;EACf;EACA;EACA;EACA,YAAY;IAAQ;IAAY;IAAc,MAAM;;;UAGrC;EACf;EACA;EACA;IAAc;IAAc,MAAM;;EAClC;;UAGe;EACf,YAAY;EACZ,WAAW;EACX;EACA;;;EAGA;;;;;;;;EAQA,iBAAiB;;UAGF;EACf;EACA;IACE;IACA;IACA,YAAY;;;;;;UAOC;EACf;EACA,UAAU,MAAM;EAChB,QAAQ;EACR;EACA;EACA,SAAS;;UAGM;EACf;EACA;EACA;IAAY;IAAc;;;UAGX;EACf;IAAW;IAAyB,aAAa;;EACjD;IAAU;IAAwB;;;;EAGlC;;;;EAIA;;;;;;;;KASU,sBACV,KAAK,8BACF,QAAQ;KAED,yBACV,MAAM,yBACN;;EAEE,WAAW;EACX,SAAS;MAER;EAAU;EAAiB;;UAEf;;EAEf;;GAEC;;;;;;;;UASc,eAAe,iBAAiB;;EAE/C,eAAe,SAAS;;;EAGxB,2BAA2B,SAAS;;cAGzB,kCAAkC;WACjB;EAA5B,YAA4B;;cAMjB,gCAAgC;EAC3C,YAAY;;cAMD,iCAAiC;EAC5C,YAAY;;;;;;;;;;;;;;;;;;;iBAyBE,0BAA0B,yBAAyB,SAAS;;;cCvI/D;UAEI;;EAEf;;EAEA;;UAGe,YAAY;;EAE3B;;;EAGA,WAAW;;EAEX;;EAEA,YAAY;;EAEZ;;;EAGA,cAAc,OAAO;;EAErB;;UAGe;;EAEf,OAAO;;EAEP,MAAM;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AAc;;EAEd,cAAc,cAAc;;EAE5B,iBAAiB,cAAc;;;;;;;iBAQjB,qBAAqB,OAAO;EAC1C;EACA;EACA;EACA;;UAuBe;EACf,QAAQ,aAAa;;iBAGD,mBAAmB,iBAAiB,kBACxD,MAAM,0BAA0B,YAC/B,QAAQ"}
1
+ {"version":3,"file":"matrix-jHTsHEkR.d.ts","names":[],"sources":["../src/multishot/types.ts","../src/multishot/judges.ts","../src/multishot/multishot.ts","../src/multishot/matrix.ts"],"mappings":";;;;;UAIiB;EACf;EACA;EACA;EACA,YAAY;IAAQ;IAAY;IAAc,MAAM;;;UAGrC;EACf;EACA;EACA;IAAc;IAAc,MAAM;;EAClC;;UAGe;EACf,YAAY;EACZ,WAAW;EACX;EACA;;;EAGA;;;;;;;;EAQA,iBAAiB;;UAGF;EACf;EACA;IACE;IACA;IACA,YAAY;;;;;;UAOC;EACf;EACA,UAAU,MAAM;EAChB,QAAQ;EACR;EACA;EACA,SAAS;;UAGM;EACf;EACA;EACA;IAAY;IAAc;;;UAGX;EACf;IAAW;IAAyB,aAAa;;EACjD;IAAU;IAAwB;;;;EAGlC;;;;EAIA;;;;;;;;KASU,sBACV,KAAK,8BACF,QAAQ;KAED,yBACV,MAAM,yBACN;;EAEE,WAAW;EACX,SAAS;MAER;EAAU;EAAiB;;UAEf;;EAEf;;GAEC;;;;;;;;UASc,eAAe,iBAAiB;;EAE/C,eAAe,SAAS;;;EAGxB,2BAA2B,SAAS;;cAGzB,kCAAkC;WACjB;EAA5B,YAA4B;;cAMjB,gCAAgC;EAC3C,YAAY;;cAMD,iCAAiC;EAC5C,YAAY;;;;;;;;;;;;;;;;;;;iBAyBE,0BAA0B,yBAAyB,SAAS;;;cCvI/D;UAEI;;EAEf;;EAEA;;UAGe,YAAY;;EAE3B;;;EAGA,WAAW;;EAEX;;EAEA,YAAY;;EAEZ;;;EAGA,cAAc,OAAO;;EAErB;;UAGe;;EAEf,OAAO;;EAEP,MAAM;;iBAGc,SAAS,QAC7B,O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;;EAE5B,iBAAiB,cAAc;;;;;;;iBAQjB,qBAAqB,OAAO;EAC1C;EACA;EACA;EACA;;UAuBe;EACf,QAAQ,aAAa;;iBAGD,mBAAmB,iBAAiB,kBACxD,MAAM,0BAA0B,YAC/B,QAAQ"}
@@ -1,11 +1,11 @@
1
1
  import { f as Run } from "../schema-2g7trUwH.js";
2
2
  import { a as ContinuousCalibrationResult, c as SelfPreferenceResult, d as calibrateJudgeContinuous, f as continuousAgreement, h as verbosityBias, i as ContinuousAgreementOptions, l as VerbosityBiasResult, m as selfPreference, n as CandidateScore, o as GoldenItem, p as positionalBias, r as ContinuousAgreement, s as PositionalBiasResult, t as CalibrationResult, u as calibrateJudge } from "../judge-calibration-DFtEMlde.js";
3
- import { n as SeriesConvergenceResult, o as CorpusAgreementReport, t as SeriesConvergenceOptions } from "../series-convergence-hEfKdoi-.js";
3
+ import { A as SentinelThresholds, B as validateSentinelSnapshot, C as JudgeSentinelOptions, D as SentinelSetOptions, E as SentinelReport, F as inMemorySentinelStore, I as judgeSentinelReport, L as snapshotFromAgreement, M as SnapshotMeta, N as evalHealthStamp, O as SentinelSnapshot, P as fileSentinelStore, R as snapshotFromCalibration, S as EvalHealthStamp, T as SentinelMetrics, _ as assertJudgeMayGate, a as JudgeCalibrationSet, b as registerCalibrationSet, c as JudgeGateDecision, d as JudgeGateRefusedError, f as JudgeGateStatus, g as addCalibrationVerdicts, h as OwnerVerdict, i as JudgeAgreement, j as SentinelTrend, k as SentinelStore, l as JudgeGateInput, m as JudgeRunMeta, n as CalibrationMerge, o as JudgeConfusion, p as JudgeRun, r as DEFAULT_JUDGE_GATE_POLICY, s as JudgeExampleAgreement, t as CalibrationExample, u as JudgeGatePolicy, v as judgeGateDecision, w as SentinelMetricName, x as snapshotFromJudgeAgreement, y as measureJudgeAgreement, z as snapshotFromSentinelSet } from "../judge-gate-D2hCppem.js";
4
4
  import { r as LedgerHash } from "../canonical-CFpojCN5.js";
5
5
  import { s as TraceStore } from "../store-C4avFjIi.js";
6
6
  import { a as OutcomeFilter, i as InMemoryOutcomeStore, n as FileSystemOutcomeStore, o as OutcomeStore, r as FileSystemOutcomeStoreOptions, s as OutcomeStoreError, t as DeploymentOutcome } from "../outcome-store-CNt4iZ67.js";
7
7
  import { a as ComputedInterval } from "../ast-hI-vjW6J.js";
8
- import { a as RubricPredictiveValidityReport, c as CorrelationInterval, i as RubricPredictiveValidityInput, l as OutcomeReduction, n as RubricOutcomeExclusion, o as RubricRanking, r as RubricOutcomePair, s as rubricPredictiveValidity, t as OutcomeMetricSpec } from "../rubric-predictive-validity-DIUwJJ9Y.js";
8
+ import { a as RubricPredictiveValidityReport, c as CorrelationInterval, i as RubricPredictiveValidityInput, l as OutcomeReduction, n as RubricOutcomeExclusion, o as RubricRanking, r as RubricOutcomePair, s as rubricPredictiveValidity, t as OutcomeMetricSpec } from "../rubric-predictive-validity-BiNNEjpG.js";
9
9
  import { z } from "zod";
10
10
  //#region src/meta-eval/correlation-study.d.ts
11
11
  export interface EvalMetricSpec {
@@ -635,135 +635,5 @@ export interface CatchRateReport {
635
635
  */
636
636
  export declare function catchRate(results: readonly PlantOutcome[], manifest: PlantManifest): CatchRateReport;
637
637
  //#endregion
638
- //#region src/meta-eval/sentinel.d.ts
639
- declare const SENTINEL_METRIC_NAMES: readonly ['irr', 'calibrationKappa', 'sentinelPassRate'];
640
- export type SentinelMetricName = (typeof SENTINEL_METRIC_NAMES)[number];
641
- export interface SentinelMetrics {
642
- /** Inter-rater reliability — ICC(2,1) from agreement instruments. */
643
- irr?: number;
644
- /** Weighted κ vs the human golden set (`calibrateJudge*`). */
645
- calibrationKappa?: number;
646
- /** Fraction of a fixed sentinel golden set the judge still scores within tolerance. */
647
- sentinelPassRate?: number;
648
- }
649
- export interface SentinelSnapshot {
650
- /** Caller-supplied ISO-8601 timestamp — the module never reads a clock. */
651
- at: string;
652
- judgeId: string;
653
- /** Exact model identity behind the judge (pin the full version string). */
654
- judgeModel: string;
655
- /**
656
- * Metrics measured at `at`. May be empty: an empty-metrics snapshot is a
657
- * model-change marker — it records the new `judgeModel` immediately and
658
- * the silent-upgrade alarm stays raised until a golden-grounded snapshot
659
- * (calibrationKappa or sentinelPassRate) follows.
660
- */
661
- metrics: SentinelMetrics;
662
- }
663
- /** Identity + timestamp the caller supplies alongside an instrument output. */
664
- export interface SnapshotMeta {
665
- at: string;
666
- judgeId: string;
667
- judgeModel: string;
668
- }
669
- /** Shape guard for snapshots crossing a boundary (store append, JSONL load, report input). */
670
- export declare function validateSentinelSnapshot(snapshot: SentinelSnapshot, source?: string): void;
671
- /**
672
- * From `calibrateJudge` / `calibrateJudgeContinuous` output. Prefers the
673
- * un-rounded continuous κ_w when the report carries one (integer κ
674
- * discards information for [0,1] judges).
675
- */
676
- export declare function snapshotFromCalibration(report: CalibrationResult | ContinuousCalibrationResult, meta: SnapshotMeta): SentinelSnapshot;
677
- /**
678
- * From `corpusInterRaterAgreement` (statistics.ts) or `continuousAgreement`
679
- * (judge-calibration.ts) output. IRR = ICC(2,1) — the reliability
680
- * coefficient both instruments compute. For ensemble-level agreement,
681
- * `meta.judgeId` names the ensemble and `meta.judgeModel` pins its
682
- * composition (e.g. a joined list of member model strings).
683
- */
684
- export declare function snapshotFromAgreement(report: CorpusAgreementReport | ContinuousAgreement, meta: SnapshotMeta): SentinelSnapshot;
685
- export interface SentinelSetOptions {
686
- /** Max |judge − human| for an item to count as passed. Default 0.1 (tuned for [0,1] scores). */
687
- tolerance?: number;
688
- }
689
- /**
690
- * From a rerun of a fixed sentinel golden set: the same `GoldenItem`s the
691
- * judge was originally calibrated on, re-scored periodically. Pass rate =
692
- * fraction of joined items where the judge stays within `tolerance` of the
693
- * human score. Items the judge didn't score are excluded from the
694
- * denominator; zero joined items is an error, not a 0% pass rate.
695
- */
696
- export declare function snapshotFromSentinelSet(scores: CandidateScore[], golden: GoldenItem[], meta: SnapshotMeta, options?: SentinelSetOptions): SentinelSnapshot;
697
- export interface SentinelStore {
698
- append(snapshot: SentinelSnapshot): Promise<void>;
699
- /** All snapshots (optionally for one judge), in append order. */
700
- history(judgeId?: string): Promise<SentinelSnapshot[]>;
701
- }
702
- export declare function inMemorySentinelStore(initial?: SentinelSnapshot[]): SentinelStore;
703
- /**
704
- * JSONL store — one snapshot per line, appended atomically per call.
705
- * A corrupt or shape-invalid line is a loud error naming the file and
706
- * line number: a sentinel history that silently drops records would
707
- * defeat the drift detection it exists to provide.
708
- */
709
- export declare function fileSentinelStore(path: string): SentinelStore;
710
- export interface SentinelThresholds {
711
- /** Floor for irr — below it the judge ensemble is unreliable regardless of trend. Default 0.6. */
712
- minIrr?: number;
713
- /** Max tolerated calibrationKappa drop vs the series baseline. Default 0.15. */
714
- maxKappaDrop?: number;
715
- /** Max tolerated sentinelPassRate drop vs the series baseline. Default 0.1. */
716
- maxSentinelDrop?: number;
717
- /** Newest snapshot older than this (days, vs asOf) = the sentinel itself went blind. Default 30. */
718
- staleAfterDays?: number;
719
- }
720
- export interface JudgeSentinelOptions {
721
- /** Caller-supplied ISO timestamp staleness is measured against. */
722
- asOf: string;
723
- thresholds?: SentinelThresholds;
724
- /** Forwarded to `analyzeSeries` (window, stableCv, driftRun). */
725
- convergence?: SeriesConvergenceOptions;
726
- }
727
- export interface SentinelTrend {
728
- judgeId: string;
729
- metric: SentinelMetricName;
730
- /** Verbatim `analyzeSeries` state for this judge×metric history. */
731
- state: SeriesConvergenceResult['state'];
732
- /** Newest value in the series. */
733
- current: number;
734
- /** Oldest value in the series — the reference the drop thresholds compare against. */
735
- baseline: number;
736
- /** current − baseline (signed; negative = decayed). */
737
- drift: number;
738
- alarmed: boolean;
739
- reason?: string;
740
- }
741
- export interface SentinelReport {
742
- perJudge: SentinelTrend[];
743
- alarms: string[];
744
- healthy: boolean;
745
- /**
746
- * `judgeId:metric` pairs with too few snapshots for the convergence
747
- * machine. Named, not counted — a blind spot you can't see is a blind
748
- * spot you won't fix. Floor/drop checks still apply to thin series, so
749
- * insufficient history alone never masks an alarm.
750
- */
751
- insufficientHistory: string[];
752
- }
753
- export declare function judgeSentinelReport(history: SentinelSnapshot[], opts: JudgeSentinelOptions): SentinelReport;
754
- export interface EvalHealthStamp {
755
- healthy: boolean;
756
- alarms: string[];
757
- }
758
- /**
759
- * The object a campaign attaches to its verdicts. Compute it from the
760
- * sentinel report in a post-campaign hook (or a nightly job feeding the
761
- * next day's campaigns) and store it alongside the verdict payload.
762
- * `healthy: false` means the judges that produced those verdicts have an
763
- * unresolved drift / decay / silent-upgrade / staleness alarm — treat the
764
- * verdicts as carrying an integrity warning until recalibration clears it.
765
- */
766
- export declare function evalHealthStamp(report: SentinelReport): EvalHealthStamp;
767
- //#endregion
768
- export { type CalibrationResult, type CandidateScore, type ContinuousAgreement, type ContinuousAgreementOptions, type ContinuousCalibrationResult, type CorrelationInterval, DeploymentOutcome, type EvaluatorAdmissionPolicy, type EvaluatorAdmissionReport, type EvaluatorAuditInput, type EvaluatorAuditObservation, type EvaluatorAuditPlan, type EvaluatorAuditPlanInput, type EvaluatorErrorRate, FileSystemOutcomeStore, FileSystemOutcomeStoreOptions, type GoldenItem, InMemoryOutcomeStore, OutcomeFilter, OutcomeMetricSpec, type OutcomeReduction, OutcomeStore, OutcomeStoreError, type PositionalBiasResult, type ProbabilityPolicyAuditInput, type ProbabilityPolicyAuditReport, RubricOutcomeExclusion, RubricOutcomePair, RubricPredictiveValidityInput, RubricPredictiveValidityReport, RubricRanking, type SelfPreferenceResult, type VerbosityBiasResult, calibrateJudge, calibrateJudgeContinuous, continuousAgreement, positionalBias, rubricPredictiveValidity, selfPreference, verbosityBias };
638
+ export { CalibrationExample, CalibrationMerge, type CalibrationResult, type CandidateScore, type ContinuousAgreement, type ContinuousAgreementOptions, type ContinuousCalibrationResult, type CorrelationInterval, DEFAULT_JUDGE_GATE_POLICY, DeploymentOutcome, EvalHealthStamp, type EvaluatorAdmissionPolicy, type EvaluatorAdmissionReport, type EvaluatorAuditInput, type EvaluatorAuditObservation, type EvaluatorAuditPlan, type EvaluatorAuditPlanInput, type EvaluatorErrorRate, FileSystemOutcomeStore, FileSystemOutcomeStoreOptions, type GoldenItem, InMemoryOutcomeStore, JudgeAgreement, JudgeCalibrationSet, JudgeConfusion, JudgeExampleAgreement, JudgeGateDecision, JudgeGateInput, JudgeGatePolicy, JudgeGateRefusedError, JudgeGateStatus, JudgeRun, JudgeRunMeta, JudgeSentinelOptions, OutcomeFilter, OutcomeMetricSpec, type OutcomeReduction, OutcomeStore, OutcomeStoreError, OwnerVerdict, type PositionalBiasResult, type ProbabilityPolicyAuditInput, type ProbabilityPolicyAuditReport, RubricOutcomeExclusion, RubricOutcomePair, RubricPredictiveValidityInput, RubricPredictiveValidityReport, RubricRanking, type SelfPreferenceResult, SentinelMetricName, SentinelMetrics, SentinelReport, SentinelSetOptions, SentinelSnapshot, SentinelStore, SentinelThresholds, SentinelTrend, SnapshotMeta, type VerbosityBiasResult, addCalibrationVerdicts, assertJudgeMayGate, calibrateJudge, calibrateJudgeContinuous, continuousAgreement, evalHealthStamp, fileSentinelStore, inMemorySentinelStore, judgeGateDecision, judgeSentinelReport, measureJudgeAgreement, positionalBias, registerCalibrationSet, rubricPredictiveValidity, selfPreference, snapshotFromAgreement, snapshotFromCalibration, snapshotFromJudgeAgreement, snapshotFromSentinelSet, validateSentinelSnapshot, verbosityBias };
769
639
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","names":[],"sources":["../../src/meta-eval/correlation-study.ts","../../src/meta-eval/calibration.ts","../../src/meta-eval/cluster-bootstrap.ts","../../src/meta-eval/evaluator-admission.ts","../../src/meta-eval/plants.ts","../../src/meta-eval/sentinel.ts"],"mappings":";;;;;;;;;;iBAoBiB;EACf;;;EAGA,WAAW,KAAK,KAAK,OAAO,eAAe;;iBAG5B;EACf;EACA;;iBAGe;EACf;EACA;EACA;EACA;EACA;;EAEA;IAAe;IAAe;;;EAE9B;IAAgB;IAAe;;;EAE/B;;iBAGe;EACf,OAAO;;EAEP,eAAe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;;;iBASe;EACf;EACA;EACA;;EAEA;;iBAGe;EACf,QAAQ;;EAER;EACA;EACA;EACA;;;;;EAKA;;EAEA;;EAEA,QAAQ,QAAQ,OAAO,WAAW;;EAElC;;EAEA;EACA,UAAU;;;;;;;;;;wBAWI,UACd,kBAAkB,gBAClB,UAAU,gBACT;;;cC/lBG;YAEM,6BAA6B;iBAExB;;EAEf;;EAEA;;EAEA;;iBAGe;;EAEf;EACA;;EAEA;;;;;;;EAOA,SAAS;;;iBAIM;EACf;EACA;EACA;;;wBAcc,yBAAyB,UAAU,kBAAkB;;;;;;wBAiCrD,wBACd,QAAQ,oBAAoB,6BAC5B,MAAM,eACL;;;;;;;;wBAmBa,sBACd,QAAQ,wBAAwB,qBAChC,MAAM,eACL;iBAYc;;EAEf;;;;;;;;;wBAUc,wBACd,QAAQ,kBACR,QAAQ,cACR,MAAM,cACN,UAAS,qBACR;iBA4Cc;EACf,OAAO,UAAU,mBAAmB;;EAEpC,QAAQ,mBAAmB,QAAQ;;wBAGrB,sBAAsB,UAAS,qBAA0B;;;;;;;wBAqBzD,kBAAkB,eAAe;iBA0ChC;;EAEf;;EAEA;;EAEA;;EAEA;;iBAGe;;EAEf;EACA,aAAa;;EAEb,cAAc;;iBAGC;EACf;EACA,QAAQ;;EAER,OAAO;;EAEP;;EAEA;;EAEA;EACA;EACA;;iBAGe;EACf,UAAU;EACV;EACA;;;;;;;EAOA;;wBAKc,oBACd,SAAS,oBACT,MAAM,uBACL;iBA6Gc;EACf;EACA;;;;;;;;;;wBAWc,gBAAgB,QAAQ,iBAAiB"}
1
+ {"version":3,"file":"index.d.ts","names":[],"sources":["../../src/meta-eval/correlation-study.ts","../../src/meta-eval/calibration.ts","../../src/meta-eval/cluster-bootstrap.ts","../../src/meta-eval/evaluator-admission.ts","../../src/meta-eval/plants.ts"],"mappings":";;;;;;;;;;iBAoBiB;EACf;;;EAGA,WAAW,KAAK,KAAK,OAAO,eAAe;;iBAG5B;EACf;EACA;;iBAGe;EACf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B,iBAAiB,SACjB,UAAS,oBACR;;;;;;iBAqGc;EACf;EACA;;;;;;YAOU;iBAEK;EACf;EACA;EACA;EACA;;EAEA;;;;;;;;iBASe;EACf;EACA;EACA;;EAEA;;iBAGe;EACf,QAAQ;;EAER;EACA;EACA;EACA;;;;;EAKA;;EAEA;;EAEA,QAAQ,QAAQ,OAAO,WAAW;;EAElC;;EAEA;EACA,UAAU;;;;;;;;;;wBAWI,UACd,kBAAkB,gBAClB,UAAU,gBACT"}
@@ -3,9 +3,9 @@ import { a as hashCanonical, i as compareCodeUnits } from "../canonical-BsZVgBhW
3
3
  import { i as makeRng } from "../internal-CRHwS9iz.js";
4
4
  import { t as mulberry32 } from "../random-Dn5fPWkt.js";
5
5
  import { a as selfPreference, i as positionalBias, n as calibrateJudgeContinuous, o as verbosityBias, r as continuousAgreement, t as calibrateJudge } from "../judge-calibration-N44V04Se.js";
6
- import { u as runMetricExtractor } from "../query-DlV0pdx4.js";
6
+ import { l as runMetricExtractor } from "../query-B1D1qp2Z.js";
7
7
  import { r as computeInterval } from "../ast-DJ6Bc7ab.js";
8
- import { t as analyzeSeries } from "../series-convergence-CjO2QdRW.js";
8
+ import { a as judgeGateDecision, c as snapshotFromJudgeAgreement, d as inMemorySentinelStore, f as judgeSentinelReport, g as validateSentinelSnapshot, h as snapshotFromSentinelSet, i as assertJudgeMayGate, l as evalHealthStamp, m as snapshotFromCalibration, n as JudgeGateRefusedError, o as measureJudgeAgreement, p as snapshotFromAgreement, r as addCalibrationVerdicts, s as registerCalibrationSet, t as DEFAULT_JUDGE_GATE_POLICY, u as fileSentinelStore } from "../judge-gate-C59znGmR.js";
9
9
  import { a as reduceOutcomeMetric, i as hasVariation, n as assertUniqueObservationIds, o as validateObservationOptions, r as correlationSummary, t as rubricPredictiveValidity } from "../rubric-predictive-validity-BsgkBfT0.js";
10
10
  import { n as InMemoryOutcomeStore, r as OutcomeStoreError, t as FileSystemOutcomeStore } from "../outcome-store-DUcMj-3D.js";
11
11
  import { z } from "zod";
@@ -1104,279 +1104,6 @@ function unseededRejection(manifest, scoreByItemId) {
1104
1104
  };
1105
1105
  }
1106
1106
  //#endregion
1107
- //#region src/meta-eval/sentinel.ts
1108
- /**
1109
- * Judge sentinel — eval trustworthiness as a continuously measured,
1110
- * alarmed trend.
1111
- *
1112
- * Judges are models; models change underneath us; calibration decays.
1113
- * This module composes three existing instruments into one loop:
1114
- *
1115
- * snapshot — adapters turn real instrument outputs (`calibrateJudge` /
1116
- * `calibrateJudgeContinuous`, `corpusInterRaterAgreement` /
1117
- * `continuousAgreement`, a rerun sentinel golden set) into
1118
- * `SentinelSnapshot`s
1119
- * series — `analyzeSeries` (src/series-convergence) classifies each
1120
- * judge×metric history as stabilized / drifting / noisy
1121
- * alarm — `judgeSentinelReport` turns trends + thresholds into named
1122
- * alarms; `evalHealthStamp` is the tiny object a campaign
1123
- * attaches to its verdicts
1124
- *
1125
- * Alarm conditions:
1126
- * - convergence state `drifting-down` on any tracked metric
1127
- * - irr below `minIrr`
1128
- * - calibrationKappa / sentinelPassRate dropped vs the series baseline
1129
- * beyond `maxKappaDrop` / `maxSentinelDrop`
1130
- * - judge model changed with no post-change golden-grounded snapshot
1131
- * (the silent-upgrade trap: judges agreeing with each other after a
1132
- * model swap proves nothing — only re-measuring against gold does)
1133
- * - newest snapshot older than `staleAfterDays` relative to `asOf`
1134
- *
1135
- * Wire-in: run the snapshot adapters from a post-campaign hook or a
1136
- * nightly job, append to a `SentinelStore`, then compute
1137
- * `judgeSentinelReport(await store.history(), { asOf })` with `asOf` =
1138
- * the campaign timestamp. Attach `evalHealthStamp(report)` to campaign
1139
- * verdicts: an alarmed sentinel means every downstream verdict carries
1140
- * an integrity warning until the judge is recalibrated.
1141
- *
1142
- * The module is clock-free — every timestamp (`at`, `asOf`) is
1143
- * caller-supplied ISO-8601, so reports are reproducible.
1144
- */
1145
- const SENTINEL_METRIC_NAMES = [
1146
- "irr",
1147
- "calibrationKappa",
1148
- "sentinelPassRate"
1149
- ];
1150
- function parseIso(value, label) {
1151
- const ms = typeof value === "string" ? Date.parse(value) : NaN;
1152
- if (!Number.isFinite(ms)) throw new ValidationError(`judge-sentinel: ${label} is not a parseable ISO timestamp: ${JSON.stringify(value)}`);
1153
- return ms;
1154
- }
1155
- /** Shape guard for snapshots crossing a boundary (store append, JSONL load, report input). */
1156
- function validateSentinelSnapshot(snapshot, source = "snapshot") {
1157
- parseIso(snapshot.at, `${source}.at`);
1158
- if (typeof snapshot.judgeId !== "string" || snapshot.judgeId.length === 0) throw new ValidationError(`judge-sentinel: ${source}.judgeId must be a non-empty string`);
1159
- if (typeof snapshot.judgeModel !== "string" || snapshot.judgeModel.length === 0) throw new ValidationError(`judge-sentinel: ${source}.judgeModel must be a non-empty string`);
1160
- if (snapshot.metrics === null || typeof snapshot.metrics !== "object") throw new ValidationError(`judge-sentinel: ${source}.metrics must be an object (may be empty)`);
1161
- for (const [key, value] of Object.entries(snapshot.metrics)) {
1162
- if (!SENTINEL_METRIC_NAMES.includes(key)) throw new ValidationError(`judge-sentinel: ${source}.metrics carries unknown key "${key}" — known: ${SENTINEL_METRIC_NAMES.join(", ")}`);
1163
- if (value !== void 0 && !Number.isFinite(value)) throw new ValidationError(`judge-sentinel: ${source}.metrics.${key} is not a finite number: ${String(value)}`);
1164
- }
1165
- }
1166
- /**
1167
- * From `calibrateJudge` / `calibrateJudgeContinuous` output. Prefers the
1168
- * un-rounded continuous κ_w when the report carries one (integer κ
1169
- * discards information for [0,1] judges).
1170
- */
1171
- function snapshotFromCalibration(report, meta) {
1172
- const kappa = "weightedKappaContinuous" in report ? report.weightedKappaContinuous : report.kappa;
1173
- if (!Number.isFinite(kappa)) throw new ValidationError(`snapshotFromCalibration: κ is not finite (n=${report.n}) — calibrate against ≥2 joined golden items before snapshotting`);
1174
- const snapshot = {
1175
- ...meta,
1176
- metrics: { calibrationKappa: kappa }
1177
- };
1178
- validateSentinelSnapshot(snapshot);
1179
- return snapshot;
1180
- }
1181
- /**
1182
- * From `corpusInterRaterAgreement` (statistics.ts) or `continuousAgreement`
1183
- * (judge-calibration.ts) output. IRR = ICC(2,1) — the reliability
1184
- * coefficient both instruments compute. For ensemble-level agreement,
1185
- * `meta.judgeId` names the ensemble and `meta.judgeModel` pins its
1186
- * composition (e.g. a joined list of member model strings).
1187
- */
1188
- function snapshotFromAgreement(report, meta) {
1189
- const irr = "overallIcc" in report ? report.overallIcc : report.icc;
1190
- if (!Number.isFinite(irr)) throw new ValidationError("snapshotFromAgreement: ICC is not finite — agreement needs ≥2 raters and ≥2 complete items");
1191
- const snapshot = {
1192
- ...meta,
1193
- metrics: { irr }
1194
- };
1195
- validateSentinelSnapshot(snapshot);
1196
- return snapshot;
1197
- }
1198
- /**
1199
- * From a rerun of a fixed sentinel golden set: the same `GoldenItem`s the
1200
- * judge was originally calibrated on, re-scored periodically. Pass rate =
1201
- * fraction of joined items where the judge stays within `tolerance` of the
1202
- * human score. Items the judge didn't score are excluded from the
1203
- * denominator; zero joined items is an error, not a 0% pass rate.
1204
- */
1205
- function snapshotFromSentinelSet(scores, golden, meta, options = {}) {
1206
- const tolerance = options.tolerance ?? .1;
1207
- if (!Number.isFinite(tolerance) || tolerance < 0) throw new ValidationError(`snapshotFromSentinelSet: tolerance must be a finite number ≥ 0, got ${tolerance}`);
1208
- const goldenById = /* @__PURE__ */ new Map();
1209
- for (const item of golden) {
1210
- if (!Number.isFinite(item.humanScore)) throw new ValidationError(`snapshotFromSentinelSet: golden item "${item.itemId}" has a non-finite humanScore`);
1211
- if (goldenById.has(item.itemId)) throw new ValidationError(`snapshotFromSentinelSet: duplicate golden itemId "${item.itemId}"`);
1212
- goldenById.set(item.itemId, item.humanScore);
1213
- }
1214
- let joined = 0;
1215
- let passed = 0;
1216
- for (const s of scores) {
1217
- const human = goldenById.get(s.itemId);
1218
- if (human === void 0) continue;
1219
- if (!Number.isFinite(s.score)) throw new ValidationError(`snapshotFromSentinelSet: judge score for item "${s.itemId}" is not finite`);
1220
- joined++;
1221
- if (Math.abs(s.score - human) <= tolerance) passed++;
1222
- }
1223
- if (joined === 0) throw new ValidationError("snapshotFromSentinelSet: no judge scores joined the golden set — itemIds mismatch or empty sentinel run");
1224
- const snapshot = {
1225
- ...meta,
1226
- metrics: { sentinelPassRate: passed / joined }
1227
- };
1228
- validateSentinelSnapshot(snapshot);
1229
- return snapshot;
1230
- }
1231
- function inMemorySentinelStore(initial = []) {
1232
- for (const s of initial) validateSentinelSnapshot(s);
1233
- const items = initial.map((s) => ({
1234
- ...s,
1235
- metrics: { ...s.metrics }
1236
- }));
1237
- return {
1238
- async append(snapshot) {
1239
- validateSentinelSnapshot(snapshot);
1240
- items.push({
1241
- ...snapshot,
1242
- metrics: { ...snapshot.metrics }
1243
- });
1244
- },
1245
- async history(judgeId) {
1246
- const all = items.map((s) => ({
1247
- ...s,
1248
- metrics: { ...s.metrics }
1249
- }));
1250
- return judgeId === void 0 ? all : all.filter((s) => s.judgeId === judgeId);
1251
- }
1252
- };
1253
- }
1254
- /**
1255
- * JSONL store — one snapshot per line, appended atomically per call.
1256
- * A corrupt or shape-invalid line is a loud error naming the file and
1257
- * line number: a sentinel history that silently drops records would
1258
- * defeat the drift detection it exists to provide.
1259
- */
1260
- function fileSentinelStore(path) {
1261
- return {
1262
- async append(snapshot) {
1263
- validateSentinelSnapshot(snapshot);
1264
- const fs = await import("node:fs/promises");
1265
- const pathMod = await import("node:path");
1266
- await fs.mkdir(pathMod.dirname(path), { recursive: true });
1267
- await fs.appendFile(path, `${JSON.stringify(snapshot)}\n`, "utf8");
1268
- },
1269
- async history(judgeId) {
1270
- const fs = await import("node:fs/promises");
1271
- let raw;
1272
- try {
1273
- raw = await fs.readFile(path, "utf8");
1274
- } catch (err) {
1275
- if (err.code === "ENOENT") return [];
1276
- throw err;
1277
- }
1278
- const lines = raw.split("\n");
1279
- const snapshots = [];
1280
- for (let i = 0; i < lines.length; i++) {
1281
- const line = lines[i];
1282
- if (line.trim().length === 0) continue;
1283
- let parsed;
1284
- try {
1285
- parsed = JSON.parse(line);
1286
- } catch (err) {
1287
- throw new ValidationError(`judge-sentinel: store at ${path} has a corrupt JSONL line ${i + 1}: ${err.message}`);
1288
- }
1289
- const snapshot = parsed;
1290
- validateSentinelSnapshot(snapshot, `${path}:${i + 1}`);
1291
- snapshots.push(snapshot);
1292
- }
1293
- return judgeId === void 0 ? snapshots : snapshots.filter((s) => s.judgeId === judgeId);
1294
- }
1295
- };
1296
- }
1297
- const MS_PER_DAY = 864e5;
1298
- function judgeSentinelReport(history, opts) {
1299
- const asOfMs = parseIso(opts.asOf, "asOf");
1300
- const minIrr = opts.thresholds?.minIrr ?? .6;
1301
- const maxKappaDrop = opts.thresholds?.maxKappaDrop ?? .15;
1302
- const maxSentinelDrop = opts.thresholds?.maxSentinelDrop ?? .1;
1303
- const staleAfterDays = opts.thresholds?.staleAfterDays ?? 30;
1304
- const byJudge = /* @__PURE__ */ new Map();
1305
- for (const snapshot of history) {
1306
- validateSentinelSnapshot(snapshot);
1307
- const atMs = parseIso(snapshot.at, `snapshot.at (judge "${snapshot.judgeId}")`);
1308
- const arr = byJudge.get(snapshot.judgeId) ?? [];
1309
- arr.push({
1310
- ...snapshot,
1311
- atMs
1312
- });
1313
- byJudge.set(snapshot.judgeId, arr);
1314
- }
1315
- const perJudge = [];
1316
- const alarms = [];
1317
- const insufficientHistory = [];
1318
- for (const judgeId of [...byJudge.keys()].sort()) {
1319
- const snaps = byJudge.get(judgeId).sort((a, b) => a.atMs - b.atMs);
1320
- const newest = snaps[snaps.length - 1];
1321
- const ageDays = (asOfMs - newest.atMs) / MS_PER_DAY;
1322
- if (ageDays > staleAfterDays) alarms.push(`judge "${judgeId}": stale — newest snapshot ${newest.at} is ${ageDays.toFixed(1)}d old vs asOf (limit ${staleAfterDays}d)`);
1323
- let changeIdx = -1;
1324
- for (let i = 1; i < snaps.length; i++) if (snaps[i].judgeModel !== snaps[i - 1].judgeModel) changeIdx = i;
1325
- if (changeIdx >= 0) {
1326
- if (!snaps.slice(changeIdx).some((s) => Number.isFinite(s.metrics.calibrationKappa) || Number.isFinite(s.metrics.sentinelPassRate))) alarms.push(`judge "${judgeId}": model changed "${snaps[changeIdx - 1].judgeModel}" → "${snaps[changeIdx].judgeModel}" at ${snaps[changeIdx].at} with no post-change calibration snapshot — silent-upgrade trap; rerun calibrateJudge or the sentinel set against the new model`);
1327
- }
1328
- for (const metric of SENTINEL_METRIC_NAMES) {
1329
- const values = snaps.filter((s) => typeof s.metrics[metric] === "number").map((s) => s.metrics[metric]);
1330
- if (values.length === 0) continue;
1331
- const convergence = analyzeSeries(values, opts.convergence);
1332
- if (convergence.state === "insufficient-data") insufficientHistory.push(`${judgeId}:${metric}`);
1333
- const current = values[values.length - 1];
1334
- const baseline = values[0];
1335
- const drift = current - baseline;
1336
- const reasons = [];
1337
- if (convergence.state === "drifting-down") reasons.push(`convergence state drifting-down (tail run ${convergence.tailRun}, window mean ${convergence.windowMean.toFixed(3)})`);
1338
- if (metric === "irr" && current < minIrr) reasons.push(`irr ${current.toFixed(3)} below floor ${minIrr}`);
1339
- if (metric === "calibrationKappa" && baseline - current > maxKappaDrop) reasons.push(`calibrationKappa dropped ${(baseline - current).toFixed(3)} from baseline ${baseline.toFixed(3)} (limit ${maxKappaDrop})`);
1340
- if (metric === "sentinelPassRate" && baseline - current > maxSentinelDrop) reasons.push(`sentinelPassRate dropped ${(baseline - current).toFixed(3)} from baseline ${baseline.toFixed(3)} (limit ${maxSentinelDrop})`);
1341
- const alarmed = reasons.length > 0;
1342
- const trend = {
1343
- judgeId,
1344
- metric,
1345
- state: convergence.state,
1346
- current,
1347
- baseline,
1348
- drift,
1349
- alarmed
1350
- };
1351
- if (alarmed) {
1352
- trend.reason = reasons.join("; ");
1353
- alarms.push(`judge "${judgeId}" ${metric}: ${trend.reason}`);
1354
- }
1355
- perJudge.push(trend);
1356
- }
1357
- }
1358
- return {
1359
- perJudge,
1360
- alarms,
1361
- healthy: alarms.length === 0,
1362
- insufficientHistory
1363
- };
1364
- }
1365
- /**
1366
- * The object a campaign attaches to its verdicts. Compute it from the
1367
- * sentinel report in a post-campaign hook (or a nightly job feeding the
1368
- * next day's campaigns) and store it alongside the verdict payload.
1369
- * `healthy: false` means the judges that produced those verdicts have an
1370
- * unresolved drift / decay / silent-upgrade / staleness alarm — treat the
1371
- * verdicts as carrying an integrity warning until recalibration clears it.
1372
- */
1373
- function evalHealthStamp(report) {
1374
- return {
1375
- healthy: report.healthy,
1376
- alarms: [...report.alarms]
1377
- };
1378
- }
1379
- //#endregion
1380
- export { FileSystemOutcomeStore, InMemoryOutcomeStore, OutcomeStoreError, auditEvaluator, auditProbabilityPolicy, brierScore, calibrateJudge, calibrateJudgeContinuous, calibrationCurve, calibrationFromPairs, catchRate, clusterBootstrapMean, continuousAgreement, correlationStudy, definePlant, evalHealthStamp, evaluatorAdmissionPolicySchema, evaluatorAuditObservationSchema, fileSentinelStore, inMemorySentinelStore, judgeSentinelReport, multiclassBrierScore, perturbEvidence, planEvaluatorAudit, plantByPerturbation, positionalBias, rankedProbabilityScore, rubricPredictiveValidity, seedPlants, selfPreference, snapshotFromAgreement, snapshotFromCalibration, snapshotFromSentinelSet, validateSentinelSnapshot, verbosityBias };
1107
+ export { DEFAULT_JUDGE_GATE_POLICY, FileSystemOutcomeStore, InMemoryOutcomeStore, JudgeGateRefusedError, OutcomeStoreError, addCalibrationVerdicts, assertJudgeMayGate, auditEvaluator, auditProbabilityPolicy, brierScore, calibrateJudge, calibrateJudgeContinuous, calibrationCurve, calibrationFromPairs, catchRate, clusterBootstrapMean, continuousAgreement, correlationStudy, definePlant, evalHealthStamp, evaluatorAdmissionPolicySchema, evaluatorAuditObservationSchema, fileSentinelStore, inMemorySentinelStore, judgeGateDecision, judgeSentinelReport, measureJudgeAgreement, multiclassBrierScore, perturbEvidence, planEvaluatorAudit, plantByPerturbation, positionalBias, rankedProbabilityScore, registerCalibrationSet, rubricPredictiveValidity, seedPlants, selfPreference, snapshotFromAgreement, snapshotFromCalibration, snapshotFromJudgeAgreement, snapshotFromSentinelSet, validateSentinelSnapshot, verbosityBias };
1381
1108
 
1382
1109
  //# sourceMappingURL=index.js.map