@tangle-network/agent-eval 0.161.1 → 0.170.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 (307) hide show
  1. package/CHANGELOG.md +156 -0
  2. package/README.md +2 -0
  3. package/dist/{active-curriculum-CD5TU2yW.js → active-curriculum-OjIWgrUJ.js} +2 -2
  4. package/dist/{active-curriculum-CD5TU2yW.js.map → active-curriculum-OjIWgrUJ.js.map} +1 -1
  5. package/dist/adapters/http.d.ts +108 -0
  6. package/dist/adapters/http.d.ts.map +1 -0
  7. package/dist/adapters/http.js +208 -0
  8. package/dist/adapters/http.js.map +1 -0
  9. package/dist/analyst/index.d.ts +40 -70
  10. package/dist/analyst/index.d.ts.map +1 -1
  11. package/dist/analyst/index.js +18 -311
  12. package/dist/analyst/index.js.map +1 -1
  13. package/dist/{backend-integrity-DxuQCu_A.d.ts → backend-integrity-e79K3UPD.d.ts} +3 -3
  14. package/dist/{backend-integrity-DxuQCu_A.d.ts.map → backend-integrity-e79K3UPD.d.ts.map} +1 -1
  15. package/dist/{baseline-BhPRQBVn.js → baseline-BC-eBZ7U.js} +2 -2
  16. package/dist/{baseline-BhPRQBVn.js.map → baseline-BC-eBZ7U.js.map} +1 -1
  17. package/dist/{benchmark-BhT16ep9.js → benchmark-C4wk_Sjr.js} +10 -3
  18. package/dist/benchmark-C4wk_Sjr.js.map +1 -0
  19. package/dist/{benchmark-command-BDC3Gocz.js → benchmark-command-BA7qOdWw.js} +239 -253
  20. package/dist/benchmark-command-BA7qOdWw.js.map +1 -0
  21. package/dist/{benchmark-CGPp-kDC.d.ts → benchmark-h-h4bfqj.d.ts} +3 -3
  22. package/dist/{benchmark-CGPp-kDC.d.ts.map → benchmark-h-h4bfqj.d.ts.map} +1 -1
  23. package/dist/benchmarks/index.d.ts +5 -5
  24. package/dist/benchmarks/index.js +3 -3
  25. package/dist/builder-eval/index.d.ts +3 -3
  26. package/dist/builder-eval/index.d.ts.map +1 -1
  27. package/dist/builder-eval/index.js +22 -8
  28. package/dist/builder-eval/index.js.map +1 -1
  29. package/dist/campaign/index.d.ts +8 -8
  30. package/dist/campaign/index.js +9 -9
  31. package/dist/{campaign-BSmOwskD.js → campaign-BeCbxFqs.js} +19 -18
  32. package/dist/campaign-BeCbxFqs.js.map +1 -0
  33. package/dist/{canonical-IL-Bu-14.js → canonical-DPyQ_rpt.js} +22 -2
  34. package/dist/{canonical-IL-Bu-14.js.map → canonical-DPyQ_rpt.js.map} +1 -1
  35. package/dist/{chat-client-DlMlAeYI.js → chat-client-DEtybj5i.js} +5 -5
  36. package/dist/{chat-client-DlMlAeYI.js.map → chat-client-DEtybj5i.js.map} +1 -1
  37. package/dist/{chat-json-call-6g5sJobJ.js → chat-json-call-5Jxna-aV.js} +2 -2
  38. package/dist/{chat-json-call-6g5sJobJ.js.map → chat-json-call-5Jxna-aV.js.map} +1 -1
  39. package/dist/cli.js +3 -3
  40. package/dist/{client-CX7KqIdB.js → client-BvwNkIRN.js} +2 -2
  41. package/dist/{client-CX7KqIdB.js.map → client-BvwNkIRN.js.map} +1 -1
  42. package/dist/{client-L9VVPkim.d.ts → client-_Fsa5c2_.d.ts} +4 -4
  43. package/dist/{client-L9VVPkim.d.ts.map → client-_Fsa5c2_.d.ts.map} +1 -1
  44. package/dist/contract/index.d.ts +12 -703
  45. package/dist/contract/index.js +14 -14
  46. package/dist/{counterfactual-BaFUWK3H.d.ts → counterfactual-Bee5_BIn.d.ts} +4 -4
  47. package/dist/{counterfactual-BaFUWK3H.d.ts.map → counterfactual-Bee5_BIn.d.ts.map} +1 -1
  48. package/dist/{counterfactual-D_VWavVm.js → counterfactual-Bjq1mlUu.js} +2 -2
  49. package/dist/{counterfactual-D_VWavVm.js.map → counterfactual-Bjq1mlUu.js.map} +1 -1
  50. package/dist/{default-registry-G9CKMNkc.d.ts → default-registry-ovxrOP0_.d.ts} +6 -6
  51. package/dist/{default-registry-G9CKMNkc.d.ts.map → default-registry-ovxrOP0_.d.ts.map} +1 -1
  52. package/dist/{define-agent-eval-h-s-sI-v.js → define-agent-eval-Clj-8igZ.js} +27 -15
  53. package/dist/{define-agent-eval-h-s-sI-v.js.map → define-agent-eval-Clj-8igZ.js.map} +1 -1
  54. package/dist/{define-agent-eval-Dx1JnPEa.d.ts → define-agent-eval-DVJm8Xlh.d.ts} +7 -7
  55. package/dist/{define-agent-eval-Dx1JnPEa.d.ts.map → define-agent-eval-DVJm8Xlh.d.ts.map} +1 -1
  56. package/dist/{descriptive-jDOuI6mz.js → descriptive-1V17A-qa.js} +2 -2
  57. package/dist/{descriptive-jDOuI6mz.js.map → descriptive-1V17A-qa.js.map} +1 -1
  58. package/dist/{dspy-rlm-engine-DptEII26.js → dspy-rlm-engine-CS3qcCEk.js} +3 -10
  59. package/dist/dspy-rlm-engine-CS3qcCEk.js.map +1 -0
  60. package/dist/{emitter-D_jYSGRd.d.ts → emitter-Bvnu0VzL.d.ts} +3 -3
  61. package/dist/{emitter-D_jYSGRd.d.ts.map → emitter-Bvnu0VzL.d.ts.map} +1 -1
  62. package/dist/{emitter-BpYFQPj4.js → emitter-DeQHiDMm.js} +13 -6
  63. package/dist/emitter-DeQHiDMm.js.map +1 -0
  64. package/dist/{engine-Cu5qD5Fc.d.ts → engine-D12Rb6WB.d.ts} +7 -7
  65. package/dist/{engine-Cu5qD5Fc.d.ts.map → engine-D12Rb6WB.d.ts.map} +1 -1
  66. package/dist/{eval-campaign-BsXWL2-2.js → eval-campaign-JDTeE6Pl.js} +5 -5
  67. package/dist/{eval-campaign-BsXWL2-2.js.map → eval-campaign-JDTeE6Pl.js.map} +1 -1
  68. package/dist/{exact-types-qnexxJ1Z.d.ts → exact-types-BEecmnWm.d.ts} +2 -2
  69. package/dist/{exact-types-qnexxJ1Z.d.ts.map → exact-types-BEecmnWm.d.ts.map} +1 -1
  70. package/dist/experiment/index.d.ts +5 -5
  71. package/dist/experiment/index.js +11 -11
  72. package/dist/{experiment-tracker-Ym6rEQT1.js → experiment-tracker-BKEumQug.js} +2 -2
  73. package/dist/{experiment-tracker-Ym6rEQT1.js.map → experiment-tracker-BKEumQug.js.map} +1 -1
  74. package/dist/{experiment-tracker-DCO6Cz4s.d.ts → experiment-tracker-Dm8yQMqb.d.ts} +2 -2
  75. package/dist/{experiment-tracker-DCO6Cz4s.d.ts.map → experiment-tracker-Dm8yQMqb.d.ts.map} +1 -1
  76. package/dist/{external-optimizer-process-WosTBChy.js → external-optimizer-process-CQxylYeG.js} +4 -11
  77. package/dist/external-optimizer-process-CQxylYeG.js.map +1 -0
  78. package/dist/{external-optimizer-subprocess-BIWbHpgD.js → external-optimizer-subprocess-Cex8Da2i.js} +26 -12
  79. package/dist/external-optimizer-subprocess-Cex8Da2i.js.map +1 -0
  80. package/dist/{failure-cluster-CXL8NbEw.d.ts → failure-cluster-6YSvsKlp.d.ts} +3 -3
  81. package/dist/{failure-cluster-CXL8NbEw.d.ts.map → failure-cluster-6YSvsKlp.d.ts.map} +1 -1
  82. package/dist/{feedback-trajectory-B3ZHaHV_.d.ts → feedback-trajectory-DIqpCyF0.d.ts} +6 -6
  83. package/dist/{feedback-trajectory-B3ZHaHV_.d.ts.map → feedback-trajectory-DIqpCyF0.d.ts.map} +1 -1
  84. package/dist/fuzz.d.ts +2 -3
  85. package/dist/fuzz.d.ts.map +1 -1
  86. package/dist/fuzz.js +4 -10
  87. package/dist/fuzz.js.map +1 -1
  88. package/dist/{skillopt-optimization-method-x7TTF23P.d.ts → heldout-gate-Bn7_xWCv.d.ts} +111 -111
  89. package/dist/heldout-gate-Bn7_xWCv.d.ts.map +1 -0
  90. package/dist/hosted/index.d.ts +2 -2
  91. package/dist/hosted/index.js +1 -1
  92. package/dist/index-Bfs5aufo.d.ts +704 -0
  93. package/dist/index-Bfs5aufo.d.ts.map +1 -0
  94. package/dist/{index-CGtH1piv.d.ts → index-CM-SM00y.d.ts} +7 -38
  95. package/dist/index-CM-SM00y.d.ts.map +1 -0
  96. package/dist/{index-D-V8gCs_.d.ts → index-DBbivBNs.d.ts} +30 -22
  97. package/dist/index-DBbivBNs.d.ts.map +1 -0
  98. package/dist/{index-D-IiQIBB.d.ts → index-DMoxLG8P.d.ts} +3 -3
  99. package/dist/{index-D-IiQIBB.d.ts.map → index-DMoxLG8P.d.ts.map} +1 -1
  100. package/dist/{index-D_P7Ye43.d.ts → index-DNgf5gyG.d.ts} +2 -2
  101. package/dist/{index-D_P7Ye43.d.ts.map → index-DNgf5gyG.d.ts.map} +1 -1
  102. package/dist/index.d.ts +67 -37
  103. package/dist/index.d.ts.map +1 -1
  104. package/dist/index.js +47 -41
  105. package/dist/index.js.map +1 -1
  106. package/dist/{insight-report-DRe8LB6d.d.ts → insight-report-08F022xN.d.ts} +4 -4
  107. package/dist/{insight-report-DRe8LB6d.d.ts.map → insight-report-08F022xN.d.ts.map} +1 -1
  108. package/dist/{integrity-DUNX9Fao.d.ts → integrity-B_EDELom.d.ts} +2 -2
  109. package/dist/{integrity-DUNX9Fao.d.ts.map → integrity-B_EDELom.d.ts.map} +1 -1
  110. package/dist/{internal-BDHPCnjk.js → internal-BMFSR8Ns.js} +3 -19
  111. package/dist/internal-BMFSR8Ns.js.map +1 -0
  112. package/dist/{judge-calibration-zZjLz8hr.js → judge-calibration-BnpVKtnb.js} +3 -13
  113. package/dist/judge-calibration-BnpVKtnb.js.map +1 -0
  114. package/dist/judge-calibration-C5CbMYce.d.ts.map +1 -1
  115. package/dist/{kind-factory-DY8FdoXf.js → kind-factory-DMeEoMQZ.js} +3 -10
  116. package/dist/kind-factory-DMeEoMQZ.js.map +1 -0
  117. package/dist/ledger-core/index.js +2 -2
  118. package/dist/{ledger-core-BOzlRygb.js → ledger-core-PIfjCbKn.js} +2 -2
  119. package/dist/{ledger-core-BOzlRygb.js.map → ledger-core-PIfjCbKn.js.map} +1 -1
  120. package/dist/{llm-client-hgDieDNN.js → llm-client-BFMRpmqb.js} +8 -11
  121. package/dist/llm-client-BFMRpmqb.js.map +1 -0
  122. package/dist/{llm-judge-BhasIPFT.js → llm-judge-DbJdo8Nj.js} +101 -23
  123. package/dist/llm-judge-DbJdo8Nj.js.map +1 -0
  124. package/dist/matrix/index.d.ts +2 -2
  125. package/dist/{matrix-eXKRMHnL.d.ts → matrix-BpI5Trmo.d.ts} +3 -3
  126. package/dist/{matrix-eXKRMHnL.d.ts.map → matrix-BpI5Trmo.d.ts.map} +1 -1
  127. package/dist/meta-eval/index.d.ts +5 -4
  128. package/dist/meta-eval/index.d.ts.map +1 -1
  129. package/dist/meta-eval/index.js +14 -22
  130. package/dist/meta-eval/index.js.map +1 -1
  131. package/dist/{mint-DfODW1KW.js → mint-DjfDUMHr.js} +2 -2
  132. package/dist/{mint-DfODW1KW.js.map → mint-DjfDUMHr.js.map} +1 -1
  133. package/dist/multishot/golden/index.d.ts +1 -1
  134. package/dist/multishot/index.d.ts +2 -2
  135. package/dist/openapi.json +4 -4
  136. package/dist/{paired-arms-D-XRF_fy.js → paired-arms-D4aeIHUy.js} +3 -3
  137. package/dist/{paired-arms-D-XRF_fy.js.map → paired-arms-D4aeIHUy.js.map} +1 -1
  138. package/dist/{paired-tests-BHIhYVdu.js → paired-tests-C8iCsioC.js} +3 -3
  139. package/dist/{paired-tests-BHIhYVdu.js.map → paired-tests-C8iCsioC.js.map} +1 -1
  140. package/dist/pipelines/index.d.ts +7 -6
  141. package/dist/pipelines/index.d.ts.map +1 -1
  142. package/dist/pipelines/index.js +5 -20
  143. package/dist/pipelines/index.js.map +1 -1
  144. package/dist/{power-and-mde-CHIrXJll.js → power-and-mde-B8F2RdcD.js} +3 -3
  145. package/dist/{power-and-mde-CHIrXJll.js.map → power-and-mde-B8F2RdcD.js.map} +1 -1
  146. package/dist/{power-preflight-DEw-uC7q.js → power-preflight-CFXm0Vjo.js} +3 -3
  147. package/dist/{power-preflight-DEw-uC7q.js.map → power-preflight-CFXm0Vjo.js.map} +1 -1
  148. package/dist/{pareto-BqNW3LJR.d.ts → power-preflight-Ptse_Kq7.d.ts} +43 -43
  149. package/dist/power-preflight-Ptse_Kq7.d.ts.map +1 -0
  150. package/dist/{pre-registration-KN9jkh58.js → pre-registration-D94b7Of5.js} +2 -2
  151. package/dist/{pre-registration-KN9jkh58.js.map → pre-registration-D94b7Of5.js.map} +1 -1
  152. package/dist/{pre-registration-CzFCcwYk.d.ts → pre-registration-DHz6P_6f.d.ts} +2 -2
  153. package/dist/{pre-registration-CzFCcwYk.d.ts.map → pre-registration-DHz6P_6f.d.ts.map} +1 -1
  154. package/dist/{produced-state-DZ89riy5.js → produced-state-CtSIp5cQ.js} +5 -5
  155. package/dist/{produced-state-DZ89riy5.js.map → produced-state-CtSIp5cQ.js.map} +1 -1
  156. package/dist/profile-cell.js +1 -1
  157. package/dist/{promotion-policy-DtnOIZvk.d.ts → promotion-policy-CkXSgKkF.d.ts} +3 -3
  158. package/dist/{promotion-policy-DtnOIZvk.d.ts.map → promotion-policy-CkXSgKkF.d.ts.map} +1 -1
  159. package/dist/{promotion-policy-xzA40Evo.js → promotion-policy-LY9mVQ7W.js} +3 -3
  160. package/dist/{promotion-policy-xzA40Evo.js.map → promotion-policy-LY9mVQ7W.js.map} +1 -1
  161. package/dist/{run-score-lDzV0X8j.js → proposal-findings-bko3GGy-.js} +2 -31
  162. package/dist/proposal-findings-bko3GGy-.js.map +1 -0
  163. package/dist/{transient-failure-DKF5Mofa.d.ts → provenance-CIRUardl.d.ts} +891 -891
  164. package/dist/provenance-CIRUardl.d.ts.map +1 -0
  165. package/dist/{query-CHmMP42p.js → query-BPGMVlbM.js} +46 -4
  166. package/dist/query-BPGMVlbM.js.map +1 -0
  167. package/dist/{query-DxPYqpmT.d.ts → query-Na5gEIGd.d.ts} +21 -4
  168. package/dist/query-Na5gEIGd.d.ts.map +1 -0
  169. package/dist/random-Dn5fPWkt.js +21 -0
  170. package/dist/random-Dn5fPWkt.js.map +1 -0
  171. package/dist/record-id-DUgsK5qp.js +17 -0
  172. package/dist/record-id-DUgsK5qp.js.map +1 -0
  173. package/dist/{registry-8You7OK1.d.ts → registry-xEb_xfns.d.ts} +3 -3
  174. package/dist/{registry-8You7OK1.d.ts.map → registry-xEb_xfns.d.ts.map} +1 -1
  175. package/dist/{release-confidence-DKfD2RYU.js → release-confidence-CzUHc4z4.js} +4 -4
  176. package/dist/{release-confidence-DKfD2RYU.js.map → release-confidence-CzUHc4z4.js.map} +1 -1
  177. package/dist/{release-confidence-Dqt0NFep.d.ts → release-confidence-D6lQw_o7.d.ts} +4 -4
  178. package/dist/{release-confidence-Dqt0NFep.d.ts.map → release-confidence-D6lQw_o7.d.ts.map} +1 -1
  179. package/dist/reporting.d.ts +3 -3
  180. package/dist/reporting.js +6 -6
  181. package/dist/{researcher-Cz565b7D.d.ts → researcher-CMUTQXD7.d.ts} +6 -6
  182. package/dist/{researcher-Cz565b7D.d.ts.map → researcher-CMUTQXD7.d.ts.map} +1 -1
  183. package/dist/{reward-hacking-MBf7qpSB.d.ts → reward-hacking-CgPRUesA.d.ts} +2 -2
  184. package/dist/{reward-hacking-MBf7qpSB.d.ts.map → reward-hacking-CgPRUesA.d.ts.map} +1 -1
  185. package/dist/{reward-hacking-t4lB1yt8.js → reward-hacking-SkxYgT0x.js} +3 -3
  186. package/dist/{reward-hacking-t4lB1yt8.js.map → reward-hacking-SkxYgT0x.js.map} +1 -1
  187. package/dist/rl.d.ts +8 -8
  188. package/dist/rl.d.ts.map +1 -1
  189. package/dist/rl.js +13 -18
  190. package/dist/rl.js.map +1 -1
  191. package/dist/rollout/index.d.ts +1 -1
  192. package/dist/rollout/index.js +2 -2
  193. package/dist/{rollout-Dm2tSdiQ.js → rollout-Crypdx8s.js} +2 -2
  194. package/dist/{rollout-Dm2tSdiQ.js.map → rollout-Crypdx8s.js.map} +1 -1
  195. package/dist/{rubric-predictive-validity-CK8SCOg-.js → rubric-predictive-validity-2D5Gw9z9.js} +3 -3
  196. package/dist/{rubric-predictive-validity-CK8SCOg-.js.map → rubric-predictive-validity-2D5Gw9z9.js.map} +1 -1
  197. package/dist/{rubric-predictive-validity-CxycqzX5.d.ts → rubric-predictive-validity-DluJLCKQ.d.ts} +2 -2
  198. package/dist/{rubric-predictive-validity-CxycqzX5.d.ts.map → rubric-predictive-validity-DluJLCKQ.d.ts.map} +1 -1
  199. package/dist/{run-record-BC0ebuRP.js → run-record-DLORoL7t.js} +2 -2
  200. package/dist/{run-record-BC0ebuRP.js.map → run-record-DLORoL7t.js.map} +1 -1
  201. package/dist/{run-record-VVy4T9OW.d.ts → run-record-DQjRcYwA.d.ts} +3 -3
  202. package/dist/{run-record-VVy4T9OW.d.ts.map → run-record-DQjRcYwA.d.ts.map} +1 -1
  203. package/dist/{schema-k6ZBftVv.js → schema-CdIX2aHu.js} +5 -1
  204. package/dist/{schema-k6ZBftVv.js.map → schema-CdIX2aHu.js.map} +1 -1
  205. package/dist/{schema-Bjgdsn73.d.ts → schema-DID1Cqct.d.ts} +7 -3
  206. package/dist/{schema-Bjgdsn73.d.ts.map → schema-DID1Cqct.d.ts.map} +1 -1
  207. package/dist/{semantic-concept-judge-BSkKKHeq.js → semantic-concept-judge-I36eejJx.js} +3 -3
  208. package/dist/{semantic-concept-judge-BSkKKHeq.js.map → semantic-concept-judge-I36eejJx.js.map} +1 -1
  209. package/dist/{sequential-rYW-Ophm.js → sequential-B51qAYE4.js} +4 -4
  210. package/dist/{sequential-rYW-Ophm.js.map → sequential-B51qAYE4.js.map} +1 -1
  211. package/dist/{server-BtFd4uzB.js → server-CCEnywOR.js} +27 -19
  212. package/dist/server-CCEnywOR.js.map +1 -0
  213. package/dist/{skillopt-optimization-method-DbaekMcn.js → skillopt-optimization-method-B2R9C5aG.js} +11 -11
  214. package/dist/{skillopt-optimization-method-DbaekMcn.js.map → skillopt-optimization-method-B2R9C5aG.js.map} +1 -1
  215. package/dist/{statistical-heldout-Cy3EhjlC.d.ts → statistical-heldout-DFS7QGpS.d.ts} +3 -3
  216. package/dist/{statistical-heldout-Cy3EhjlC.d.ts.map → statistical-heldout-DFS7QGpS.d.ts.map} +1 -1
  217. package/dist/{store-B06JdC56.d.ts → store-Cq9oOrI1.d.ts} +2 -2
  218. package/dist/{store-B06JdC56.d.ts.map → store-Cq9oOrI1.d.ts.map} +1 -1
  219. package/dist/{store-otlp-C_Rq5I4D.js → store-otlp-CHjBvWQY.js} +2 -2
  220. package/dist/{store-otlp-C_Rq5I4D.js.map → store-otlp-CHjBvWQY.js.map} +1 -1
  221. package/dist/{store-tool-spans-DPUG7UUY.d.ts → store-tool-spans-B2DJ_82T.d.ts} +102 -36
  222. package/dist/store-tool-spans-B2DJ_82T.d.ts.map +1 -0
  223. package/dist/{store-tool-spans-Dlh9vkFK.js → store-tool-spans-B9o6tU8f.js} +23 -19
  224. package/dist/store-tool-spans-B9o6tU8f.js.map +1 -0
  225. package/dist/storyboard/index.d.ts +1 -1
  226. package/dist/{student-t-CvBq2mve.js → student-t-BA-Uy51p.js} +2 -2
  227. package/dist/{student-t-CvBq2mve.js.map → student-t-BA-Uy51p.js.map} +1 -1
  228. package/dist/{summary-report-BI5hUtvK.js → summary-report-Bgh8CpNK.js} +7 -7
  229. package/dist/{summary-report-BI5hUtvK.js.map → summary-report-Bgh8CpNK.js.map} +1 -1
  230. package/dist/{summary-report-CC07PhEL.d.ts → summary-report-DRstQNBX.d.ts} +3 -3
  231. package/dist/{summary-report-CC07PhEL.d.ts.map → summary-report-DRstQNBX.d.ts.map} +1 -1
  232. package/dist/supervisor-run/index.js +1 -1
  233. package/dist/{task-failure-attributes-DTl-7-Kw.js → task-failure-attributes-CBGtLS_H.js} +3 -3
  234. package/dist/{task-failure-attributes-DTl-7-Kw.js.map → task-failure-attributes-CBGtLS_H.js.map} +1 -1
  235. package/dist/{tool-groups-Ci8i9ErB.d.ts → tool-groups-BnXlCJZQ.d.ts} +3 -3
  236. package/dist/tool-groups-BnXlCJZQ.d.ts.map +1 -0
  237. package/dist/{tool-waste-Dro0gJi3.d.ts → tool-waste-BrmLKxMw.d.ts} +4 -4
  238. package/dist/{tool-waste-Dro0gJi3.d.ts.map → tool-waste-BrmLKxMw.d.ts.map} +1 -1
  239. package/dist/{tool-waste-BqzmVdJk.js → tool-waste-CwGHzBzX.js} +4 -4
  240. package/dist/{tool-waste-BqzmVdJk.js.map → tool-waste-CwGHzBzX.js.map} +1 -1
  241. package/dist/trace-repair/index.d.ts +3 -3
  242. package/dist/trace-repair/index.d.ts.map +1 -1
  243. package/dist/trace-repair/index.js +5 -4
  244. package/dist/trace-repair/index.js.map +1 -1
  245. package/dist/traces.d.ts +60 -62
  246. package/dist/traces.d.ts.map +1 -1
  247. package/dist/traces.js +13 -22
  248. package/dist/traces.js.map +1 -1
  249. package/dist/{trajectory-Bi157Gun.d.ts → trajectory-r1bQqvBQ.d.ts} +3 -3
  250. package/dist/{trajectory-Bi157Gun.d.ts.map → trajectory-r1bQqvBQ.d.ts.map} +1 -1
  251. package/dist/trajectory-replay/index.d.ts +3 -3
  252. package/dist/trajectory-replay/index.d.ts.map +1 -1
  253. package/dist/trajectory-replay/index.js +4 -14
  254. package/dist/trajectory-replay/index.js.map +1 -1
  255. package/dist/types-Bfk0uxRj.d.ts.map +1 -1
  256. package/dist/{types-BI4fT3HN.js → types-CiWITkGo.js} +11 -2
  257. package/dist/types-CiWITkGo.js.map +1 -0
  258. package/dist/{types-D9ssmxKL.d.ts → types-DMoNFDWi.d.ts} +6 -3
  259. package/dist/{types-D9ssmxKL.d.ts.map → types-DMoNFDWi.d.ts.map} +1 -1
  260. package/dist/{types-D4s7Z6nq.d.ts → types-Dy237wiH.d.ts} +3 -3
  261. package/dist/{types-D4s7Z6nq.d.ts.map → types-Dy237wiH.d.ts.map} +1 -1
  262. package/dist/{types-BPb2Kf_C2.d.ts → types-i21ccEkr.d.ts} +3 -3
  263. package/dist/types-i21ccEkr.d.ts.map +1 -0
  264. package/dist/{verdict-B0xltqu6.js → verdict-BQ3pCFf8.js} +2 -2
  265. package/dist/{verdict-B0xltqu6.js.map → verdict-BQ3pCFf8.js.map} +1 -1
  266. package/dist/{verdict-cache-CdVVTVmn.js → verdict-cache-B3eCVQtY.js} +2 -2
  267. package/dist/{verdict-cache-CdVVTVmn.js.map → verdict-cache-B3eCVQtY.js.map} +1 -1
  268. package/dist/wire/index.d.ts +23 -8
  269. package/dist/wire/index.d.ts.map +1 -1
  270. package/dist/wire/index.js +2 -2
  271. package/docs/code-agent-intake.md +64 -0
  272. package/docs/concepts.md +1 -1
  273. package/docs/design/statistics-decisions.md +1 -1
  274. package/docs/distributed-driver.md +3 -6
  275. package/docs/public-api.md +122 -106
  276. package/docs/wire-protocol.md +5 -3
  277. package/package.json +9 -2
  278. package/dist/benchmark-BhT16ep9.js.map +0 -1
  279. package/dist/benchmark-command-BDC3Gocz.js.map +0 -1
  280. package/dist/campaign-BSmOwskD.js.map +0 -1
  281. package/dist/capture-fetch-CqwsJkkG.d.ts +0 -68
  282. package/dist/capture-fetch-CqwsJkkG.d.ts.map +0 -1
  283. package/dist/contract/index.d.ts.map +0 -1
  284. package/dist/dspy-rlm-engine-DptEII26.js.map +0 -1
  285. package/dist/emitter-BpYFQPj4.js.map +0 -1
  286. package/dist/external-optimizer-process-WosTBChy.js.map +0 -1
  287. package/dist/external-optimizer-subprocess-BIWbHpgD.js.map +0 -1
  288. package/dist/index-CGtH1piv.d.ts.map +0 -1
  289. package/dist/index-D-V8gCs_.d.ts.map +0 -1
  290. package/dist/index-vrJugRal.d.ts +0 -1
  291. package/dist/internal-BDHPCnjk.js.map +0 -1
  292. package/dist/judge-calibration-zZjLz8hr.js.map +0 -1
  293. package/dist/kind-factory-DY8FdoXf.js.map +0 -1
  294. package/dist/llm-client-hgDieDNN.js.map +0 -1
  295. package/dist/llm-judge-BhasIPFT.js.map +0 -1
  296. package/dist/pareto-BqNW3LJR.d.ts.map +0 -1
  297. package/dist/query-CHmMP42p.js.map +0 -1
  298. package/dist/query-DxPYqpmT.d.ts.map +0 -1
  299. package/dist/run-score-lDzV0X8j.js.map +0 -1
  300. package/dist/server-BtFd4uzB.js.map +0 -1
  301. package/dist/skillopt-optimization-method-x7TTF23P.d.ts.map +0 -1
  302. package/dist/store-tool-spans-DPUG7UUY.d.ts.map +0 -1
  303. package/dist/store-tool-spans-Dlh9vkFK.js.map +0 -1
  304. package/dist/tool-groups-Ci8i9ErB.d.ts.map +0 -1
  305. package/dist/transient-failure-DKF5Mofa.d.ts.map +0 -1
  306. package/dist/types-BI4fT3HN.js.map +0 -1
  307. package/dist/types-BPb2Kf_C2.d.ts.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"types-Bfk0uxRj.d.ts","names":[],"sources":["../src/llm-client.ts","../src/analyst/chat-client.ts","../src/types.ts"],"mappings":";;;UAsDiB;EACf;;;;;EAKA,kBAEI;IACM;IAAc;;IACd;IAAmB;MAAa;MAAa;;;;EAGvD,YAAY;;EAEZ;;KAGU;;UAGK;EACf;EACA;IACE;IACA;IACA,YAAY;;;;KAKJ;EAIN;EAAkB;IAAY;;;;UAGnB;EACf;EACA;;EAEA;;UAGe;EACf;EACA,UAAU;;EAEV;;EAEA;IAAe;IAAc,QAAQ;;;EAErC,QAAQ;;EAER,aAAa;EACb;EACA;;;;;EAKA;IAAa;;;EAEb,WAAW;;EAEX;;;;;;UAOe;;EAEf;;EAEA;;EAEA,WAAW;;EAEX,qBAAqB;;iBAGP,2BACd,SAAS,KACP,0GAGF,UAAS,kBACR;UAgCc;EACf;EACA;EACA;;EAEA;;EAEA;;EAEA;;;;UAKe;EACf;EACA;EACA,KAAK;IAAgB;IAAe;;;UAGrB;;EAEf;;EAEA,YAAY;EACZ,OAAO;;;;;EAKP;;;;;;;;;EASA;;;;;;;;;;;;EAYA;;EAEA;;;;;;;;;EASA;;;;;;;EAOA;;;;;;;;EAQA,WAAW,cAAc;;EAEzB,KAAK;;KAGK,kBAAkB,KAAK;;;;;;iBAOnB,mBACd,QAAQ,eACR,qBAAqB,qBACpB;;iBA6Ba,wBACd,OAAO,OACP,qBAAqB,qBACpB;cAMU,qBAAqB;WAGd;WACA;WACA;EAJlB,YACE,iBACgB,gBACA,cAC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a;IAAiB;IAAkB;;EAChD;EACA;EACA;;UAGe;EACf,UAAU;EACV,OAAO;EACP,WAAW;;EAEX,aAAa;EACb;EACA,WAAW;EACX,SAAS;;KAGC,WAAW,MAAM,YAAY,OAAO,eAAe,QAAQ;UAYtD;EACf;EACA;EACA;EACA"}
1
+ {"version":3,"file":"types-Bfk0uxRj.d.ts","names":[],"sources":["../src/llm-client.ts","../src/analyst/chat-client.ts","../src/types.ts"],"mappings":";;;UAuDiB;EACf;;;;;EAKA,kBAEI;IACM;IAAc;;IACd;IAAmB;MAAa;MAAa;;;;EAGvD,YAAY;;EAEZ;;KAGU;;UAGK;EACf;EACA;IACE;IACA;IACA,YAAY;;;;KAKJ;EAIN;EAAkB;IAAY;;;;UAGnB;EACf;EACA;;EAEA;;UAGe;EACf;EACA,UAAU;;EAEV;;EAEA;IAAe;IAAc,QAAQ;;;EAErC,QAAQ;;EAER,aAAa;EACb;EACA;;;;;EAKA;IAAa;;;EAEb,WAAW;;EAEX;;;;;;UAOe;;EAEf;;EAEA;;EAEA,WAAW;;EAEX,qBAAqB;;iBAGP,2BACd,SAAS,KACP,0GAGF,UAAS,kBACR;UAgCc;EACf;EACA;EACA;;EAEA;;EAEA;;EAEA;;;;UAKe;EACf;EACA;EACA,KAAK;IAAgB;IAAe;;;UAGrB;;EAEf;;EAEA,YAAY;EACZ,OAAO;;;;;EAKP;;;;;;;;;EASA;;;;;;;;;;;;EAYA;;EAEA;;;;;;;;;EASA;;;;;;;EAOA;;;;;;;;EAQA,WAAW,cAAc;;EAEzB,KAAK;;KAGK,kBAAkB,KAAK;;;;;;iBAOnB,mBACd,QAAQ,eACR,qBAAqB,qBACpB;;iBA6Ba,wBACd,OAAO,OACP,qBAAqB,qBACpB;cAMU,qBAAqB;WAGd;WACA;WACA;EAJlB,YACE,iBACgB,gBACA,cACA;;;;;cASP,yBAAyB;WAGlB,QAAQ;EAF1B,YACE,iBACgB,QAAQ,eACxB;IAAY;;;;;;;;;;;;;;iBA2IA,o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AW;EACX,SAAS;;KAGC,WAAW,MAAM,YAAY,OAAO,eAAe,QAAQ;UAYtD;EACf;EACA;EACA;EACA"}
@@ -101,6 +101,15 @@ function assertNonNegativeFinite(value, field, context) {
101
101
  * a RunRecord, a JudgeInput, or `custom`), and the registry routes
102
102
  * the matching input from `AnalystRunInputs`.
103
103
  */
104
+ /** Finding severity. `AnalystSeverity` derives from this array, so the type
105
+ * and the schema that validates a finding cannot name different levels. */
106
+ const ANALYST_SEVERITIES = [
107
+ "critical",
108
+ "high",
109
+ "medium",
110
+ "low",
111
+ "info"
112
+ ];
104
113
  /**
105
114
  * Compute the stable finding_id from the identity-defining fields.
106
115
  * Default implementation hashes {analyst_id, area, subject, normalized claim}.
@@ -149,6 +158,6 @@ function makeProposalFinding(init) {
149
158
  };
150
159
  }
151
160
  //#endregion
152
- export { settleUsageReceiptFromCostLedger as a, deepFreezeCanonicalJson as c, assertValidAnalystUsageReceipt as i, makeFinding as n, usageReceiptFromCostLedger as o, makeProposalFinding as r, validateUsageSettlementTimeout as s, computeFindingId as t };
161
+ export { assertValidAnalystUsageReceipt as a, validateUsageSettlementTimeout as c, makeProposalFinding as i, deepFreezeCanonicalJson as l, computeFindingId as n, settleUsageReceiptFromCostLedger as o, makeFinding as r, usageReceiptFromCostLedger as s, ANALYST_SEVERITIES as t };
153
162
 
154
- //# sourceMappingURL=types-BI4fT3HN.js.map
163
+ //# sourceMappingURL=types-CiWITkGo.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types-CiWITkGo.js","names":[],"sources":["../src/ledger-core/deep-freeze.ts","../src/analyst/usage-receipt.ts","../src/analyst/types.ts"],"sourcesContent":["/** Freeze a detached canonical-JSON graph. Canonicalization has already ruled out cycles.\n *\n * Lives outside canonical.ts so the analyst-benchmark implementation digest,\n * which covers canonical.ts, stays bound to the published benchmark evidence. */\nexport function deepFreezeCanonicalJson<T>(value: T): T {\n if (value && typeof value === 'object' && !Object.isFrozen(value)) {\n Object.freeze(value)\n for (const nested of Object.values(value)) deepFreezeCanonicalJson(nested)\n }\n return value\n}\n","import type { CostChannel, CostLedgerFilter, CostLedgerHandle } from '../cost-ledger'\nimport type { AnalystUsageReceipt } from './types'\n\nexport const DEFAULT_USAGE_SETTLEMENT_TIMEOUT_MS = 5_000\n\n/** Convert one ledger channel's complete call set into one analyst receipt. */\nexport function usageReceiptFromCostLedger(\n ledger: CostLedgerHandle,\n filter: CostChannel | CostLedgerFilter = 'analyst',\n): AnalystUsageReceipt {\n const resolvedFilter = typeof filter === 'string' ? { channel: filter } : filter\n const summary = ledger.summary(resolvedFilter)\n const receipts = ledger.list(resolvedFilter)\n const hasReasoningUsage = receipts.some((receipt) => receipt.reasoningTokens !== undefined)\n const hasCacheWriteUsage = receipts.some((receipt) => receipt.cacheWriteTokens !== undefined)\n const cost = summary.costProvenance\n return {\n calls: summary.totalCalls + summary.pendingCalls,\n tokens: summary.usageComplete\n ? {\n input: summary.inputTokens,\n output: summary.outputTokens,\n ...(hasReasoningUsage ? { reasoning: summary.reasoningTokens ?? 0 } : {}),\n ...(summary.cachedTokens > 0 ? { cached: summary.cachedTokens } : {}),\n ...(hasCacheWriteUsage ? { cacheWrite: summary.cacheWriteTokens ?? 0 } : {}),\n }\n : null,\n cost,\n ...(cost.kind === 'uncaptured' ? { knownCostUsd: summary.totalCostUsd } : {}),\n }\n}\n\nexport interface SettledUsageReceipt {\n settled: boolean\n pendingCalls: number\n receipt: AnalystUsageReceipt\n}\n\n/** Wait a bounded time for late provider receipts, then take one immutable snapshot. */\nexport async function settleUsageReceiptFromCostLedger(\n ledger: CostLedgerHandle,\n options: CostLedgerFilter & { timeoutMs?: number } = {},\n): Promise<SettledUsageReceipt> {\n const { timeoutMs: requestedTimeoutMs, ...requestedFilter } = options\n const filter: CostLedgerFilter = {\n channel: requestedFilter.channel ?? 'analyst',\n ...(requestedFilter.phase === undefined ? {} : { phase: requestedFilter.phase }),\n ...(requestedFilter.tags === undefined ? {} : { tags: requestedFilter.tags }),\n }\n const timeoutMs = validateUsageSettlementTimeout(requestedTimeoutMs)\n const initial = ledger.summary(filter)\n const waitResult =\n initial.pendingCalls === 0\n ? true\n : ledger.waitForIdle\n ? await ledger.waitForIdle({ timeoutMs })\n : false\n const pendingCalls = ledger.summary(filter).pendingCalls\n return {\n settled: waitResult && pendingCalls === 0,\n pendingCalls,\n receipt: usageReceiptFromCostLedger(ledger, filter),\n }\n}\n\nexport function validateUsageSettlementTimeout(timeoutMs?: number): number {\n const resolved = timeoutMs ?? DEFAULT_USAGE_SETTLEMENT_TIMEOUT_MS\n if (!Number.isSafeInteger(resolved) || resolved < 0 || resolved > 2_147_483_647) {\n throw new TypeError(\n 'settlementTimeoutMs must be a non-negative safe integer no greater than 2147483647',\n )\n }\n return resolved\n}\n\nexport function assertValidAnalystUsageReceipt(\n receipt: AnalystUsageReceipt,\n context = 'AnalystContext.recordUsage',\n): void {\n if (receipt.calls !== null && (!Number.isSafeInteger(receipt.calls) || receipt.calls < 0)) {\n throw new Error(`${context}: calls must be a non-negative safe integer or null`)\n }\n if (receipt.tokens) {\n assertNonNegativeSafeInteger(receipt.tokens.input, 'tokens.input', context)\n assertNonNegativeSafeInteger(receipt.tokens.output, 'tokens.output', context)\n if (receipt.tokens.reasoning !== undefined) {\n assertNonNegativeSafeInteger(receipt.tokens.reasoning, 'tokens.reasoning', context)\n if (receipt.tokens.reasoning > receipt.tokens.output) {\n throw new Error(`${context}: tokens.reasoning must not exceed tokens.output`)\n }\n }\n if (receipt.tokens.cached !== undefined) {\n assertNonNegativeSafeInteger(receipt.tokens.cached, 'tokens.cached', context)\n }\n if (receipt.tokens.cacheWrite !== undefined) {\n assertNonNegativeSafeInteger(receipt.tokens.cacheWrite, 'tokens.cacheWrite', context)\n }\n }\n if (receipt.cost.kind !== 'uncaptured') {\n assertNonNegativeFinite(receipt.cost.usd, 'cost.usd', context)\n } else if (receipt.cost.usd !== null) {\n throw new Error(`${context}: uncaptured cost.usd must be null`)\n }\n if (receipt.knownCostUsd !== undefined) {\n assertNonNegativeFinite(receipt.knownCostUsd, 'knownCostUsd', context)\n }\n if (receipt.partialTokens) {\n const { input, output } = receipt.partialTokens\n if (receipt.tokens) {\n throw new Error(`${context}: partialTokens must be absent when tokens is complete`)\n }\n if (input === null && output === null) {\n throw new Error(`${context}: partialTokens must carry at least one reported side`)\n }\n if (input !== null) assertNonNegativeSafeInteger(input, 'partialTokens.input', context)\n if (output !== null) assertNonNegativeSafeInteger(output, 'partialTokens.output', context)\n }\n}\n\nfunction assertNonNegativeSafeInteger(value: number, field: string, context: string): void {\n if (!Number.isSafeInteger(value) || value < 0) {\n throw new Error(`${context}: ${field} must be a non-negative safe integer`)\n }\n}\n\nfunction assertNonNegativeFinite(value: number, field: string, context: string): void {\n if (!Number.isFinite(value) || value < 0) {\n throw new Error(`${context}: ${field} must be a non-negative finite number`)\n }\n}\n","/**\n * Analyst contract — the missing orchestration layer over agent-eval's\n * existing analyzers (analyzeTraces, MultiLayerVerifier, RunCritic,\n * SemanticConceptJudge, JudgeFn, ...).\n *\n * Each existing primitive returns its own output shape. The Analyst\n * contract is the single envelope every primitive lifts into, so a\n * registry can run N analysts against a run and a single renderer can\n * compose findings without knowing which analyzer produced them.\n *\n * The contract is intentionally domain-agnostic: nothing here knows\n * about code, voice, RAG, or any particular agent stack. Analysts\n * declare what INPUT KIND they need (a trace store, an artifact dir,\n * a RunRecord, a JudgeInput, or `custom`), and the registry routes\n * the matching input from `AnalystRunInputs`.\n */\n\nimport { createHash } from 'node:crypto'\nimport type { CostLedgerHandle } from '../cost-ledger'\nimport type { RunCostProvenance, RunRecord, RunTokenUsage } from '../run-record'\nimport type { TraceAnalysisStore } from '../trace-analyst/store'\nimport type { JudgeInput } from '../types'\nimport type { ChatClient } from './chat-client'\n\n/**\n * Unified envelope every analyst emits. Schema-versioned so renderers\n * and time-series diffs survive future field additions.\n */\nexport interface AnalystFinding {\n schema_version: '1.0.0'\n /**\n * Stable hash over identity-defining fields (analyst_id + canonical\n * claim + area + optional subject). Two findings from two runs that\n * \"are the same finding\" share this id — that's what `diffFindings`\n * uses to compute appeared/disappeared sets across runs.\n */\n finding_id: string\n analyst_id: string\n produced_at: string\n severity: AnalystSeverity\n /**\n * Coarse classification. Renderers group by this. Free-form so\n * domain-specific analysts can introduce categories without a\n * schema change ('agent-reasoning', 'verification', 'cost',\n * 'tool-use', 'safety', 'latency', 'data-quality', ...).\n */\n area: string\n claim: string\n rationale?: string\n evidence_refs: EvidenceRef[]\n recommended_action?: string\n validation_plan?: string\n /** 0..1 — the analyst's own confidence. Not calibrated across analysts. */\n confidence: number\n /**\n * Optional subject the finding is about — leaf id, agent id, request\n * id. Included in finding_id when present so per-subject findings\n * diff cleanly across runs.\n */\n subject?: string\n /** True when this finding was lifted from a judge result rather than observed\n * directly in a trace or artifact. Descriptive only: proposal access is\n * controlled by `ProposalFinding.proposal_origin`. */\n derived_from_judge?: boolean\n /** Analyst-private extras; renderers ignore unless they know the analyst. */\n metadata?: Record<string, unknown>\n}\n\n/** Finding severity. `AnalystSeverity` derives from this array, so the type\n * and the schema that validates a finding cannot name different levels. */\nexport const ANALYST_SEVERITIES = ['critical', 'high', 'medium', 'low', 'info'] as const\n\nexport type AnalystSeverity = (typeof ANALYST_SEVERITIES)[number]\n\n/** Data sources that candidate generation may intentionally learn from. */\nexport type ProposalFindingOrigin = 'search' | 'production'\n\n/** A finding explicitly admitted as candidate-generation input. */\nexport type ProposalFinding = AnalystFinding & {\n readonly proposal_origin: ProposalFindingOrigin\n}\n\nexport interface EvidenceRef {\n /**\n * Where the evidence lives. `span` and `event` refer to OTLP trace\n * elements; `artifact` to a file inside the run's artifact tree;\n * `finding` to another AnalystFinding (cross-analyst chaining);\n * `metric` to a named scalar reading the renderer knows how to read.\n */\n kind: 'span' | 'event' | 'artifact' | 'finding' | 'metric'\n uri: string\n excerpt?: string\n}\n\n// ── Analyst contract ─────────────────────────────────────────────────\n\n/**\n * The discriminator the registry uses to pass the right input.\n * `custom` is the escape hatch — analysts that need something else\n * (e.g. an embedding cache, a partner SDK handle) read it from\n * `AnalystRunInputs.custom[<analyst id>]`.\n */\nexport type AnalystInputKind =\n | 'trace-store'\n | 'artifact-dir'\n | 'run-record'\n | 'judge-input'\n | 'custom'\n\nexport interface AnalystCost {\n /** `deterministic` analysts MUST NOT call the LLM. */\n kind: 'deterministic' | 'llm'\n /** Optional declared upper bound; the registry can enforce a budget. */\n est_usd_per_run?: number\n /** Models the analyst expects to use (informational). */\n models?: string[]\n /** Maximum post-cancellation wait for provider usage. Model analysts default to 5 seconds. */\n settlement_timeout_ms?: number\n}\n\nexport interface AnalystRequirements {\n /** Min number of shots / samples the analyst needs to produce signal. */\n min_shots?: number\n /** Capabilities the runtime must supply (e.g. ['network', 'gpu']). */\n capabilities?: string[]\n}\n\n/**\n * What's passed to every analyst call. The registry resolves which\n * field the analyst's `inputKind` selects and asserts it's present.\n */\nexport interface AnalystRunInputs {\n traceStore?: TraceAnalysisStore\n artifactDir?: string\n runRecord?: RunRecord\n judgeInput?: JudgeInput\n /** Keyed by analyst id; populated by callers that registered custom analysts. */\n custom?: Record<string, unknown>\n}\n\nexport interface AnalystContext {\n runId: string\n /** Stable correlation id so logs from a single registry.run() share a tag. */\n correlationId: string\n /** Enforced wall-clock deadline (epoch ms). */\n deadlineMs?: number\n /** Per-analyst USD budget. Analysts MAY check before issuing LLM calls. */\n budgetUsd?: number\n /** Shared paid-call account when the analyst runs inside a larger campaign. */\n costLedger?: CostLedgerHandle\n /** Attribution phase used when writing to the shared paid-call account. */\n costPhase?: string\n /**\n * Shared chat client. Analysts that call an LLM go through this so\n * the operator picks transport (sandbox-sdk | router | cli-bridge |\n * direct-provider | mock) at the registry boundary without touching\n * analyst code.\n */\n chat?: ChatClient\n /**\n * Findings from a prior run the operator wants the analyst to see as\n * retrieval context. Kinds that take advantage of cross-run memory\n * (failure-mode \"I saw this cluster last run\", knowledge-gap \"the wiki\n * page I asked for is still missing\") render these into the actor's\n * working set. Filtering is the operator's job: pass the slice that\n * matches the analyst's id, or pass everything and let the kind\n * filter. Empty / absent means no cross-run context.\n */\n priorFindings?: ReadonlyArray<AnalystFinding>\n /**\n * Findings emitted by analysts that completed earlier in this registry run.\n * This is separate from `priorFindings`: upstream findings are dependency\n * context for the current pass, while prior findings are cross-run memory.\n * The registry populates this only when `RegistryRunOpts.chainFindings` is on.\n */\n upstreamFindings?: ReadonlyArray<AnalystFinding>\n /**\n * Report metered work independently of findings. This keeps an empty finding\n * set from erasing token/cost telemetry. Multiple receipts are accumulated.\n */\n recordUsage?: (receipt: AnalystUsageReceipt) => void\n /** Free-form runtime tags (env, host, op). Findings can echo these into metadata. */\n tags?: Record<string, string>\n /** Logger callback — analysts SHOULD prefer this over console.* for testability. */\n log?: (msg: string, fields?: Record<string, unknown>) => void\n /** Optional abort signal. Analysts SHOULD pass it through to LLM calls. */\n signal?: AbortSignal\n /**\n * Optional live-execution port. A runtime that owns a sandbox or checkout\n * fills it so an analyst can execute a bounded probe against the run's\n * produced state instead of reasoning about it from the trace alone. This\n * package defines only the port: no field here reaches for an agent loop,\n * and an absent probe means the analyst works from recorded evidence.\n */\n probe?: ExecutionProbe\n}\n\n// ── Live-execution port ─────────────────────────────────────────────\n\n/** One bounded command an analyst asks the probe to run. */\nexport interface ExecutionProbeRequest {\n command: string\n /** Working directory inside the probed environment. */\n cwd?: string\n /** Hard wall-clock deadline for this one execution. */\n timeoutMs: number\n /** Bytes of combined output retained; the prober truncates beyond it. */\n maxOutputBytes?: number\n signal?: AbortSignal\n}\n\n/**\n * Typed outcome of one probe execution. `succeeded: false` is a PROBE failure\n * (the environment could not run the command); a command that ran and exited\n * non-zero is a successful observation with a non-zero `exitCode`.\n */\nexport type ExecutionProbeOutcome =\n | {\n succeeded: true\n exitCode: number\n stdout: string\n stderr: string\n durationMs: number\n /** True when output was cut at `maxOutputBytes`. */\n truncated: boolean\n }\n | { succeeded: false; error: { class: string; message: string } }\n\n/**\n * The seam a runtime fills to let analysts observe produced state live.\n * Implementations own sandboxing, credentials, and cleanup; analysts only\n * submit bounded requests and read typed outcomes.\n */\nexport interface ExecutionProbe {\n /** One plain sentence naming what is being probed (e.g. a sandbox id). */\n readonly description: string\n execute(request: ExecutionProbeRequest): Promise<ExecutionProbeOutcome>\n}\n\n/**\n * The minimal contract. Concrete analysts can refine `TInput` so\n * implementations stay type-safe (e.g. a trace analyst's `TInput` is\n * `TraceAnalysisStore`); the registry passes the right field from\n * `AnalystRunInputs` based on `inputKind`.\n */\nexport interface Analyst<TInput = unknown> {\n /** Stable identifier — appears in finding_id, telemetry, and registry exclusion lists. */\n readonly id: string\n /** Human-readable. One sentence. */\n readonly description: string\n readonly inputKind: AnalystInputKind\n readonly cost: AnalystCost\n readonly requires?: AnalystRequirements\n /** Bump on breaking changes to claim wording or area so old finding_ids don't collide. */\n readonly version: string\n analyze(input: TInput, ctx: AnalystContext): Promise<AnalystFinding[]>\n}\n\n/** Metered work performed by one analyst call. */\nexport interface AnalystUsageReceipt {\n /** Number of model-usage records observed at the provider boundary. */\n calls: number | null\n /** Null when the provider did not return token accounting. */\n tokens: RunTokenUsage | null\n /** Observed, estimated, or explicitly uncaptured dollar cost. */\n cost: RunCostProvenance\n /** Known lower bound when one or more calls have uncaptured cost. */\n knownCostUsd?: number\n /**\n * Token counts the provider reported on only one side. Present exactly when\n * `tokens` is null and at least one side WAS reported: `RunTokenUsage` has no\n * nullable side, so a one-sided count cannot live in `tokens` without writing\n * a zero nobody measured. Read it as a lower bound, never as a total — the\n * field exists so a null `tokens` cannot hide a real count.\n */\n partialTokens?: { input: number | null; output: number | null }\n /**\n * True when the token counts were DERIVED by the transport (from character\n * lengths, say) rather than measured by the model provider. `cost.kind` is\n * `estimated` both for a rate estimate over exact tokens and for one over\n * derived tokens; this is the field that separates them.\n */\n tokensEstimated?: boolean\n}\n\n// ── finding_id stability ─────────────────────────────────────────────\n\n/**\n * Compute the stable finding_id from the identity-defining fields.\n * Default implementation hashes {analyst_id, area, subject, normalized claim}.\n * Analysts that emit findings whose claim text varies per run (timestamps,\n * counts) SHOULD either: (a) pass an explicit `id_basis` to fix the hash,\n * or (b) move the variable part into `rationale`/`metadata` and keep the\n * `claim` static.\n */\nexport function computeFindingId(input: {\n analyst_id: string\n area: string\n subject?: string\n claim: string\n /** Override the claim for hashing — use when the displayed claim has run-specific bits. */\n id_basis?: string\n}): string {\n const basis = JSON.stringify({\n a: input.analyst_id,\n r: input.area,\n s: input.subject ?? '',\n c: normalizeClaim(input.id_basis ?? input.claim),\n })\n return `f_${createHash('sha256').update(basis).digest('hex').slice(0, 20)}`\n}\n\nfunction normalizeClaim(c: string): string {\n // Lowercase, collapse whitespace, strip trailing punctuation. Goal:\n // \"Leaf X failed install\" and \"Leaf X failed install.\" hash the same.\n return c\n .toLowerCase()\n .replace(/\\s+/g, ' ')\n .replace(/[.!?;:,]+$/g, '')\n .trim()\n}\n\n/**\n * Convenience factory: produce a fully-formed AnalystFinding with the\n * id computed automatically. Analyst code stays terse.\n */\nexport function makeFinding(\n init: Omit<AnalystFinding, 'schema_version' | 'finding_id' | 'produced_at'> & {\n id_basis?: string\n produced_at?: string\n },\n): AnalystFinding {\n const { id_basis, produced_at, ...rest } = init\n return {\n schema_version: '1.0.0',\n finding_id: computeFindingId({\n analyst_id: rest.analyst_id,\n area: rest.area,\n subject: rest.subject,\n claim: rest.claim,\n id_basis,\n }),\n produced_at: produced_at ?? new Date().toISOString(),\n ...rest,\n }\n}\n\n/** Build a finding whose source is explicitly allowed during candidate generation. */\nexport function makeProposalFinding(\n init: Omit<ProposalFinding, 'schema_version' | 'finding_id' | 'produced_at'> & {\n id_basis?: string\n produced_at?: string\n },\n): ProposalFinding {\n const { proposal_origin, ...finding } = init\n return { ...makeFinding(finding), proposal_origin }\n}\n\n// ── Registry result envelope ────────────────────────────────────────\n\nexport interface AnalystRunSummary {\n analyst_id: string\n status: 'ok' | 'skipped' | 'failed'\n /** Why skipped — missing input, budget exceeded, capability unmet. */\n reason?: string\n findings_count: number\n latency_ms: number\n /** Additive model usage and cost provenance for this analyst. */\n usage: AnalystUsageReceipt\n /** When `status='failed'`: the error class + message, never the full stack. */\n error?: { class: string; message: string }\n}\n\nexport interface AnalystRunResult {\n run_id: string\n correlation_id: string\n started_at: string\n ended_at: string\n findings: AnalystFinding[]\n per_analyst: AnalystRunSummary[]\n /** Total LLM cost in USD across all analysts in this registry.run(). */\n total_cost_usd: number\n /**\n * Provenance for `total_cost_usd`. When uncaptured, the numeric field is only\n * the known subtotal and must not be treated as the run's total spend.\n */\n total_cost_provenance?: RunCostProvenance\n}\n\n// ── Streaming event envelope ────────────────────────────────────────\n\n/**\n * Events emitted by `AnalystRegistry.runStream(...)` in real time as\n * the registry executes. UIs subscribe via `for await (const ev of\n * registry.runStream(...))`; `registry.run(...)` is a thin collector\n * over the same stream, so the two surfaces share their invariants.\n *\n * Per-finding events are intentionally omitted — analyzers are batch\n * operations (a recursive engine returns the full `findings:json[]` at the\n * end of the responder), so streaming inside one analyst would only\n * emit partial JSON consumers can't render. The kind-completion event\n * is the right granularity; subscribers wanting per-finding rendering\n * iterate `event.findings` themselves.\n */\nexport type AnalystRunEvent =\n | {\n type: 'run-started'\n run_id: string\n correlation_id: string\n started_at: string\n /** The ordered list of analyst ids the registry will run. */\n analyst_ids: ReadonlyArray<string>\n }\n | {\n type: 'analyst-skipped'\n summary: AnalystRunSummary\n }\n | {\n type: 'analyst-started'\n analyst_id: string\n started_at: string\n }\n | {\n type: 'analyst-completed'\n /** `summary.status` is `'ok'` for clean completion or `'failed'` for thrown analysts. */\n summary: AnalystRunSummary\n findings: ReadonlyArray<AnalystFinding>\n }\n | {\n type: 'run-completed'\n result: AnalystRunResult\n }\n"],"mappings":";;;;;;AAIA,SAAgB,wBAA2B,OAAa;CACtD,IAAI,SAAS,OAAO,UAAU,YAAY,CAAC,OAAO,SAAS,KAAK,GAAG;EACjE,OAAO,OAAO,KAAK;EACnB,KAAK,MAAM,UAAU,OAAO,OAAO,KAAK,GAAG,wBAAwB,MAAM;CAC3E;CACA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,KAAK;GACjB,MAAM,KAAK;GACX,SAAS,KAAK;GACd,OAAO,KAAK;GACZ;EACF,CAAC;EACD,aAAa,gCAAe,IAAI,KAAK,EAAA,CAAE,YAAY;EACnD,GAAG;CACL;AACF;;AAGA,SAAgB,oBACd,MAIiB;CACjB,MAAM,EAAE,iBAAiB,GAAG,YAAY;CACxC,OAAO;EAAE,GAAG,YAAY,OAAO;EAAG;CAAgB;AACpD"}
@@ -1,5 +1,5 @@
1
1
  import { c as CostLedgerHandle } from "./cost-ledger-DbQdN3nO.js";
2
- import { a as RunRecord, n as RunCostProvenance, u as RunTokenUsage } from "./run-record-VVy4T9OW.js";
2
+ import { a as RunRecord, n as RunCostProvenance, u as RunTokenUsage } from "./run-record-DQjRcYwA.js";
3
3
  import { a as JudgeInput, p as ChatClient } from "./types-Bfk0uxRj.js";
4
4
  import { RE2JS } from "re2js";
5
5
  //#region src/trace-analyst/types.d.ts
@@ -300,7 +300,10 @@ interface AnalystFinding {
300
300
  /** Analyst-private extras; renderers ignore unless they know the analyst. */
301
301
  metadata?: Record<string, unknown>;
302
302
  }
303
- type AnalystSeverity = 'critical' | 'high' | 'medium' | 'low' | 'info';
303
+ /** Finding severity. `AnalystSeverity` derives from this array, so the type
304
+ * and the schema that validates a finding cannot name different levels. */
305
+ declare const ANALYST_SEVERITIES: readonly ['critical', 'high', 'medium', 'low', 'info'];
306
+ type AnalystSeverity = (typeof ANALYST_SEVERITIES)[number];
304
307
  /** Data sources that candidate generation may intentionally learn from. */
305
308
  type ProposalFindingOrigin = 'search' | 'production';
306
309
  /** A finding explicitly admitted as candidate-generation input. */
@@ -594,4 +597,4 @@ type AnalystRunEvent = {
594
597
  };
595
598
  //#endregion
596
599
  export { SearchSpanResult as A, ViewSpansResult as B, TRACE_ANALYSIS_LIMITS as C, DatasetOverview as D, DEFAULT_TRACE_ANALYST_BUDGETS as E, TraceAnalystFilters as F, ViewTraceResult as H, TraceAnalystSpan as I, TraceAnalystSpanKind as L, SpanMatchRecord as M, TRACE_ANALYST_TRUNCATION_MARKER_PREFIX as N, ErrorCluster as O, TraceAnalystByteBudgets as P, TraceAnalystSpanStatus as R, BoundedTraceAnalysisStoreOptions as S, TraceAnalysisStoreContext as T, ViewTraceOversized as V, ProposalFinding as _, AnalystInputKind as a, makeFinding as b, AnalystRunInputs as c, AnalystSeverity as d, AnalystUsageReceipt as f, ExecutionProbeRequest as g, ExecutionProbeOutcome as h, AnalystFinding as i, SearchTraceResult as j, QueryTracesPage as k, AnalystRunResult as l, ExecutionProbe as m, AnalystContext as n, AnalystRequirements as o, EvidenceRef as p, AnalystCost as r, AnalystRunEvent as s, Analyst as t, AnalystRunSummary as u, ProposalFindingOrigin as v, TraceAnalysisStore as w, makeProposalFinding as x, computeFindingId as y, TraceAnalystTraceSummary as z };
597
- //# sourceMappingURL=types-D9ssmxKL.d.ts.map
600
+ //# sourceMappingURL=types-DMoNFDWi.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"types-D9ssmxKL.d.ts","names":[],"sources":["../src/trace-analyst/types.ts","../src/trace-analyst/store-contract.ts","../src/analyst/types.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;KAgBY;KAUA;;;;UAKK;EACf;EACA;EACA;EACA;EACA,MAAM;EACN;EACA;EACA;EACA,QAAQ;EACR;EACA;EACA;EACA;EACA;;;EAGA,YAAY;;UAGG;EACf;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;UAGe;;EAEf;;EAEA;;EAEA;;EAEA;;EAEA;;EAEA;;EAEA;;;EAGA;;;;;;;UAQe;;EAEf;;EAEA;;EAEA;;EAEA;EACA;EACA;;EAEA;;EAEA;;EAEA;;UAGe;EACf;EACA;EACA;EACA;EACA;EACA;;EAEA;EACA;IAAU;IAAqB;;;;;;EAK/B,gBAAgB;EAChB;IAAc;IAAkB;;;UAGjB;EACf,QAAQ;EACR;EACA;;;;;UAMe;EACf;EACA,QAAQ;EACR,YAAY;;UAGG;EACf;;EAEA,gBAAgB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B,cAAc;;;;;;;EAO9B,mBAAmB,cAAc;;;;;EAKjC,eAAe,SAAS;;EAExB,OAAO;;EAEP,OAAO,aAAa,SAAS;;EAE7B,SAAS;;;;;;;;EAQT,QAAQ;;;UAMO;EACf;;EAEA;;EAEA;;EAEA;EACA,SAAS;;;;;;;KAQC;EAEN;EACA;EACA;EACA;EACA;;EAEA;;EAEA;EAAkB;IAAS;IAAe;;;;;;;;UAO/B;;WAEN;EACT,QAAQ,SAAS,wBAAwB,QAAQ;;;;;;;;UASlC,QAAQ;;WAEd;;WAEA;WACA,WAAW;WACX,MAAM;WACN,WAAW;;WAEX;EACT,QAAQ,OAAO,QAAQ,KAAK,iBAAiB,QAAQ;;;UAItC;;EAEf;;EAEA,QAAQ;;EAER,MAAM;;EAEN;;;;;;;;EAQA;IAAkB;IAAsB;;;;;;;;EAOxC;;;;;;;;;;iBAac,iBAAiB;EAC/B;EACA;EACA;EACA;;EAEA;;;;;;iBAyBc,YACd,MAAM,KAAK;EACT;EACA;IAED;;iBAiBa,oBACd,MAAM,KAAK;EACT;EACA;IAED;UAOc;EACf;EACA;;EAEA;EACA;EACA;;EAEA,OAAO;;EAEP;IAAU;IAAe;;;UAGV;EACf;EACA;EACA;EACA;EACA,UAAU;EACV,aAAa;;EAEb;;;;;EAKA,wBAAwB;;;;;;;;;;;;;;;KAkBd;EAEN;EACA;EACA;EACA;;EAEA,aAAa;;EAGb;EACA,SAAS;;EAGT;EACA;EACA;;EAGA;;EAEA,SAAS;EACT,UAAU,cAAc;;EAGxB;EACA,QAAQ"}
1
+ {"version":3,"file":"types-DMoNFDWi.d.ts","names":[],"sources":["../src/trace-analyst/types.ts","../src/trace-analyst/store-contract.ts","../src/analyst/types.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;KAgBY;KAUA;;;;UAKK;EACf;EACA;EACA;EACA;EACA,MAAM;EACN;EACA;EACA;EACA,QAAQ;EACR;EACA;EACA;EACA;EACA;;;EAGA,YAAY;;UAGG;EACf;EACA;EAC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EN;EACA;EACA;EACA;;EAEA,aAAa;;EAGb;EACA,SAAS;;EAGT;EACA;EACA;;EAGA;;EAEA,SAAS;EACT,UAAU,cAAc;;EAGxB;EACA,QAAQ"}
@@ -1,7 +1,7 @@
1
1
  import { S as PaidCallResult, T as RunPaidCallInput, a as CostChannel, c as CostLedgerHandle, f as CostLedgerSummary, p as CostProvenance } from "./cost-ledger-DbQdN3nO.js";
2
- import { u as RunTokenUsage } from "./run-record-VVy4T9OW.js";
2
+ import { u as RunTokenUsage } from "./run-record-DQjRcYwA.js";
3
+ import { _ as ProposalFinding } from "./types-DMoNFDWi.js";
3
4
  import { C as LlmCallMetadata } from "./types-Bfk0uxRj.js";
4
- import { _ as ProposalFinding } from "./types-D9ssmxKL.js";
5
5
  //#region src/campaign/types.d.ts
6
6
  /** Stable identifier + kind tag for any scenario. Consumers
7
7
  * extend with their per-domain payload (persona, task, requirement, ...). */
@@ -650,4 +650,4 @@ interface CampaignResult<TArtifact = unknown, TScenario extends Scenario = Scena
650
650
  }
651
651
  //#endregion
652
652
  export { LabeledScenarioWrite as A, ScoredSurfaceOutcome as B, JudgeDimension as C, LabeledScenarioSampleArgs as D, LabeledScenarioRecord as E, ProposeContext as F, labelTrustRank as G, SurfaceProposer as H, ProposedCandidate as I, RedactionStatus as L, OptimizerConfig as M, ParetoParent as N, LabeledScenarioSource as O, ProposalTrackContext as P, Scenario as R, JudgeConfig as S, LabelTrust as T, TraceSpan as U, SessionScript as V, isProposedCandidate as W, GateDecision as _, CampaignResult as a, GenerationRecord as b, CampaignTraceWriter as c, DispatchContext as d, DispatchFn as f, GateContribution as g, GateContext as h, CampaignCostMeter as i, MutableSurface as j, LabeledScenarioStore as k, CodeSurface as l, GateCheckStatus as m, CampaignArtifactWriter as n, CampaignScenarioIdentity as o, Gate as p, CampaignCellResult as r, CampaignTokenUsage as s, CampaignAggregates as t, ComponentSurface as u, GateResult as v, JudgeScore as w, JudgeAggregate as x, GenerationCandidate as y, ScenarioAggregate as z };
653
- //# sourceMappingURL=types-D4s7Z6nq.d.ts.map
653
+ //# sourceMappingURL=types-Dy237wiH.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"types-D4s7Z6nq.d.ts","names":[],"sources":["../src/campaign/types.ts"],"mappings":";;;;;;;UAgCiB;EACf;EACA;EACA;;;;;EAKA;;;UAIe,iCAAiC,KAAK;EACrD;;;;;UAMe;EACf;;EAEA;EACA;EACA;EACA;EACA,QAAQ;EACR,OAAO;EACP,WAAW;EACX,MAAM;;EAEN;;EAEA;;;;;;;;EAQA;;;;KAKU,WAAW,kBAAkB,UAAU,cACjD,UAAU,WACV,KAAK,oBACF,QAAQ;;;;UAOI,cAAc,WAAW;EACxC;EACA;EACA;;EAEA;;;EAGA,sBAAsB,UAAU,WAAW,sBAAsB,UAAU,cAAc;;UAK1E;;EAEf;;EAEA;;;;;;;;;UAUe,YAAY,WAAW,kBAAkB,WAAW;EACnE;EACA,YAAY;;;;EAIZ;;;EAGA,MAAM;IACJ,UAAU;IACV,UAAU;IACV,QAAQ;;IAER,aAAa;IACb;IACA,WAAW;MACT,aAAa,QAAQ;EACzB,aAAa,UAAU;;;;;;;;;;;UAYR;EACf,YAAY;EACZ;EACA;;EAEA,UAAU;;;;;;;EAOV;;;;EAIA,eAAe,eAAe;IAAQ;IAAe;;;;;EAIrD;;;EAGA;;EAEA;;EAEA,WAAW,eAAe;;;;;;;UAUX;WACN;;;WAGA;;WAEA;;WAEA;;WAEA;;WAEA;;WAEA;;;WAGA;aACE;aACA;aACA;;;WAGF;;;UAIM;WACN;WACA,YAAY,SAAS;;;;;;;;;;;KAYpB,0BAA0B,mBAAmB;;;;;;;UAQxC;EACf,SAAS;;EAET;;;;EAIA;;;;iBAKc,oBACd,OAAO,iBAAiB,oBACvB,SAAS;;;;;;;;;UAkBK;EACf,SAAS;EACT;;;EAGA,YAAY;;;EAGZ;;EAEA;EACA;EACA;;;UAIe;EACf;EACA;EACA;EACA;EACA;;;;;UAMe;;;EAGf;;EAEA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4T9OW.js";
2
- import { R as Scenario, d as DispatchContext } from "./types-D4s7Z6nq.js";
1
+ import { s as RunSplitTag } from "./run-record-DQjRcYwA.js";
2
+ import { R as Scenario, d as DispatchContext } from "./types-Dy237wiH.js";
3
3
  //#region src/benchmarks/types.d.ts
4
4
  type BenchmarkTaskKind = 'retrieval' | 'rag-answer' | 'hallucination' | 'kb-improvement' | 'routing' | 'custom';
5
5
  type BenchmarkFamily = 'beir' | 'mteb-retrieval' | 'msmarco' | 'trec-dl' | 'miracl' | 'lotte' | 'bright' | 'crag' | 'hotpotqa' | 'kilt' | 'ragtruth' | 'faithbench' | 'first-party' | 'custom';
@@ -90,4 +90,4 @@ declare const BENCHMARK_SPLIT_SEED = "agent-eval-v1";
90
90
  declare function deterministicSplit(itemId: string, seed?: string): RunSplitTag;
91
91
  //#endregion
92
92
  export { BenchmarkFamily as a, BenchmarkSource as c, BenchmarkEvaluation as i, BenchmarkTaskKind as l, BenchmarkAdapter as n, BenchmarkResponder as o, BenchmarkDatasetItem as r, BenchmarkScenario as s, BENCHMARK_SPLIT_SEED as t, deterministicSplit as u };
93
- //# sourceMappingURL=types-BPb2Kf_C2.d.ts.map
93
+ //# sourceMappingURL=types-i21ccEkr.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types-i21ccEkr.d.ts","names":[],"sources":["../src/benchmarks/types.ts"],"mappings":";;;KASY;KAQA;UAgBK,qBAAqB;;;EAGpC;;EAEA,SAAS;;EAET,QAAQ;;EAER,SAAS;;EAET,WAAW;;EAEX;;EAEA,SAAS;EACT,WAAW;;UAGI;;;;EAIf;;EAEA;;EAEA,aAAa;;;EAGb,KAAK;EACL;;UAGe;EACf;EACA;EACA;EACA;EACA;;;UAQe,iBAAiB,kBAAkB,oBAAoB;;EAEtE;EACA,SAAS;EACT,WAAW;EACX;EACA,SAAS;EACT;;;;;EAKA,YAAY,OAAO,cAAc,QAAQ,qBAAqB;;EAE9D,SAAS,MAAM,qBAAqB,WAAW,UAAU,YAAY,QAAQ;;;;EAI7E,YAAY,iBAAiB;;UAGd,kBAAkB,4BAA4B;EAC7D;EACA;EACA,QAAQ;EACR,UAAU;EACV,UAAU;EACV,MAAM,qBAAqB;;KAGjB,mBAAmB,oBAAoB,uBAAuB;EACxE,UAAU,kBAAkB;EAC5B,MAAM,qBAAqB;EAC3B,SAAS;MACL,QAAQ,aAAa;;;cAoBd;;;;;;;;;iBAUG,mBACd,gBACA,gBACC"}
@@ -1,4 +1,4 @@
1
- import { n as contentHash } from "./verdict-cache-CdVVTVmn.js";
1
+ import { n as contentHash } from "./verdict-cache-B3eCVQtY.js";
2
2
  //#region src/verdict.ts
3
3
  /**
4
4
  * Validator-output verdict — substrate primitive for "did this output pass,
@@ -58,4 +58,4 @@ function equivalenceVerdict(record) {
58
58
  //#endregion
59
59
  export { equivalenceVerdict as n, certificationEvidenceDigest as t };
60
60
 
61
- //# sourceMappingURL=verdict-B0xltqu6.js.map
61
+ //# sourceMappingURL=verdict-BQ3pCFf8.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"verdict-B0xltqu6.js","names":[],"sources":["../src/verdict.ts"],"sourcesContent":["/**\n * Validator-output verdict — substrate primitive for \"did this output pass,\n * and how well?\"\n *\n * Used by:\n * - `@tangle-network/agent-eval/matrix` — verdict per cell in the cartesian.\n * - `@tangle-network/agent-runtime` — Validator<Output, Verdict = DefaultVerdict>.\n * Runtime keeps `Validator` because it's coupled to runtime-shaped\n * `ValidationCtx` (iteration, signal, traceEmitter); the verdict TYPE\n * itself is a substrate concept and lives here.\n *\n * Repo layering: agent-eval is the substrate (no upward deps). Both\n * agent-runtime and agent-knowledge consume this type FROM agent-eval —\n * never the other way around. See CLAUDE.md \"Repo layering\" for the rule.\n */\n\nimport { contentHash } from './verdict-cache'\nimport type {\n CheckerIdentity,\n EquivalenceRecord,\n VerificationStrategySource,\n} from './verification-strategy'\n\n/**\n * What certified a verdict — the epistemics a bare `valid` + `score` pair\n * cannot carry. A kernel-checked proof and an LLM judge can produce the\n * same `{ valid: true, score: 1 }`; this record is what tells them apart.\n *\n * Every field is required on purpose. A certification without a checker\n * identity or an evidence digest is exactly the unverifiable claim this\n * record exists to kill.\n */\nexport interface VerdictCertification {\n /**\n * Which verification-strategy member produced the certificate. Each\n * member's failure mode is documented on the family type and in\n * `VERIFICATION_STRATEGIES` (src/verification-strategy.ts).\n */\n strategy: VerificationStrategySource\n /**\n * Exact checker identity, e.g. `{ name: 'lean4', version: '4.33.0',\n * pins: { mathlib: 'db584cd6d46c' } }` for a kernel, or a judge model\n * id + snapshot for a judge.\n */\n checker: CheckerIdentity\n /**\n * Every step the certificate rests on that the checker did NOT verify,\n * e.g. 'diagonal embedding argued in prose' or 'agreement arms share\n * training-corpus blind spots'. An empty array is the producer's\n * explicit, auditable claim that there are none — it is not a default.\n */\n assumptions: string[]\n /** Digest (e.g. sha256) of the evidence artifact the checker consumed or produced. */\n evidenceDigest: string\n}\n\n/**\n * Minimal verdict shape — `valid` + `score` are required; `scores` +\n * `notes` are optional surface. Validators that need richer shapes\n * parameterise `Validator<Output, MyVerdict>` with their own type.\n *\n * Need structured extras? Extend DefaultVerdict with typed fields — never\n * serialize extras into `notes`.\n */\nexport interface DefaultVerdict {\n /** Whether the output meets the validator's pass criteria. */\n valid: boolean\n /** Aggregate score in [0, 1]. Drivers use this for winner selection. */\n score: number\n /** Per-dimension scores. Free-form; weighted into `score` by the validator. */\n scores?: Record<string, number>\n /** Human-readable rationale; surfaces in trace + final-result `winner.verdict`. */\n notes?: string\n /**\n * What certified this verdict, when anything did. Absent = uncertified:\n * scored, but no strategy vouches for it. A consumer that cares reads\n * `certification.strategy` to tell a kernel-checked verdict from a\n * judge-scored one; a consumer that does not read it sees the exact\n * verdict it always saw.\n */\n certification?: VerdictCertification\n}\n\n/**\n * Digest a certification's evidence artifact: sha-256 over the canonical\n * JSON of the evidence AS SERIALIZED. The JSON round-trip drops\n * `undefined`-valued fields on purpose — certified verdicts persist as\n * JSON, so the digest must cover exactly what a reader of the persisted\n * artifact can re-digest, nothing the wire cannot carry. Throws when the\n * evidence has no JSON form at all.\n */\nexport function certificationEvidenceDigest(evidence: unknown): string {\n const serialized = JSON.stringify(evidence)\n if (serialized === undefined) {\n throw new Error(\n 'certificationEvidenceDigest: evidence has no JSON form — a certificate over nothing is the unverifiable claim this record exists to kill',\n )\n }\n return contentHash(JSON.parse(serialized))\n}\n\n/**\n * Land a finished statement-equivalence record in the shared verdict\n * spine. `valid` answers the protocol's question — are the two blind\n * statements equivalent — so a refutation is `valid: false` even though a\n * separating witness in hand is a successful protocol outcome.\n *\n * Certification is present exactly when the obligation was discharged\n * (proved or refuted): the checker vouches for the discharge either way.\n * An unresolved obligation certifies nothing and keeps its reason in\n * `notes`.\n */\nexport function equivalenceVerdict(record: EquivalenceRecord): DefaultVerdict {\n const { obligation, spec, arms } = record\n const discharged = obligation.status !== 'unresolved'\n const notes =\n obligation.status === 'proved'\n ? `statements equivalent: ${spec.artifact}`\n : obligation.status === 'refuted-with-separating-witness'\n ? `formalization gap witnessed: ${obligation.separatingWitness}`\n : `obligation undischarged: ${obligation.unresolvedReason}`\n return {\n valid: obligation.status === 'proved',\n score: obligation.status === 'proved' ? 1 : 0,\n notes,\n ...(discharged && obligation.evidenceDigest !== undefined\n ? {\n certification: {\n strategy: spec.source,\n checker: obligation.checker,\n // The arms' blindness declarations are attested by the arms,\n // never verified by the checker — the one step every\n // equivalence certificate rests on.\n assumptions: [\n `arm '${arms[0].armId}' and arm '${arms[1].armId}' self-declare blind derivation`,\n ],\n evidenceDigest: obligation.evidenceDigest,\n } satisfies VerdictCertification,\n }\n : {}),\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AA2FA,SAAgB,4BAA4B,UAA2B;CACrE,MAAM,aAAa,KAAK,UAAU,QAAQ;CAC1C,IAAI,eAAe,KAAA,GACjB,MAAM,IAAI,MACR,0IACF;CAEF,OAAO,YAAY,KAAK,MAAM,UAAU,CAAC;AAC3C;;;;;;;;;;;;AAaA,SAAgB,mBAAmB,QAA2C;CAC5E,MAAM,EAAE,YAAY,MAAM,SAAS;CACnC,MAAM,aAAa,WAAW,WAAW;CACzC,MAAM,QACJ,WAAW,WAAW,WAClB,0BAA0B,KAAK,aAC/B,WAAW,WAAW,oCACpB,gCAAgC,WAAW,sBAC3C,4BAA4B,WAAW;CAC/C,OAAO;EACL,OAAO,WAAW,WAAW;EAC7B,OAAO,WAAW,WAAW,WAAW,IAAI;EAC5C;EACA,GAAI,cAAc,WAAW,mBAAmB,KAAA,IAC5C,EACE,eAAe;GACb,UAAU,KAAK;GACf,SAAS,WAAW;GAIpB,aAAa,CACX,QAAQ,KAAK,EAAE,CAAC,MAAM,aAAa,KAAK,EAAE,CAAC,MAAM,gCACnD;GACA,gBAAgB,WAAW;EAC7B,EACF,IACA,CAAC;CACP;AACF"}
1
+ {"version":3,"file":"verdict-BQ3pCFf8.js","names":[],"sources":["../src/verdict.ts"],"sourcesContent":["/**\n * Validator-output verdict — substrate primitive for \"did this output pass,\n * and how well?\"\n *\n * Used by:\n * - `@tangle-network/agent-eval/matrix` — verdict per cell in the cartesian.\n * - `@tangle-network/agent-runtime` — Validator<Output, Verdict = DefaultVerdict>.\n * Runtime keeps `Validator` because it's coupled to runtime-shaped\n * `ValidationCtx` (iteration, signal, traceEmitter); the verdict TYPE\n * itself is a substrate concept and lives here.\n *\n * Repo layering: agent-eval is the substrate (no upward deps). Both\n * agent-runtime and agent-knowledge consume this type FROM agent-eval —\n * never the other way around. See CLAUDE.md \"Repo layering\" for the rule.\n */\n\nimport { contentHash } from './verdict-cache'\nimport type {\n CheckerIdentity,\n EquivalenceRecord,\n VerificationStrategySource,\n} from './verification-strategy'\n\n/**\n * What certified a verdict — the epistemics a bare `valid` + `score` pair\n * cannot carry. A kernel-checked proof and an LLM judge can produce the\n * same `{ valid: true, score: 1 }`; this record is what tells them apart.\n *\n * Every field is required on purpose. A certification without a checker\n * identity or an evidence digest is exactly the unverifiable claim this\n * record exists to kill.\n */\nexport interface VerdictCertification {\n /**\n * Which verification-strategy member produced the certificate. Each\n * member's failure mode is documented on the family type and in\n * `VERIFICATION_STRATEGIES` (src/verification-strategy.ts).\n */\n strategy: VerificationStrategySource\n /**\n * Exact checker identity, e.g. `{ name: 'lean4', version: '4.33.0',\n * pins: { mathlib: 'db584cd6d46c' } }` for a kernel, or a judge model\n * id + snapshot for a judge.\n */\n checker: CheckerIdentity\n /**\n * Every step the certificate rests on that the checker did NOT verify,\n * e.g. 'diagonal embedding argued in prose' or 'agreement arms share\n * training-corpus blind spots'. An empty array is the producer's\n * explicit, auditable claim that there are none — it is not a default.\n */\n assumptions: string[]\n /** Digest (e.g. sha256) of the evidence artifact the checker consumed or produced. */\n evidenceDigest: string\n}\n\n/**\n * Minimal verdict shape — `valid` + `score` are required; `scores` +\n * `notes` are optional surface. Validators that need richer shapes\n * parameterise `Validator<Output, MyVerdict>` with their own type.\n *\n * Need structured extras? Extend DefaultVerdict with typed fields — never\n * serialize extras into `notes`.\n */\nexport interface DefaultVerdict {\n /** Whether the output meets the validator's pass criteria. */\n valid: boolean\n /** Aggregate score in [0, 1]. Drivers use this for winner selection. */\n score: number\n /** Per-dimension scores. Free-form; weighted into `score` by the validator. */\n scores?: Record<string, number>\n /** Human-readable rationale; surfaces in trace + final-result `winner.verdict`. */\n notes?: string\n /**\n * What certified this verdict, when anything did. Absent = uncertified:\n * scored, but no strategy vouches for it. A consumer that cares reads\n * `certification.strategy` to tell a kernel-checked verdict from a\n * judge-scored one; a consumer that does not read it sees the exact\n * verdict it always saw.\n */\n certification?: VerdictCertification\n}\n\n/**\n * Digest a certification's evidence artifact: sha-256 over the canonical\n * JSON of the evidence AS SERIALIZED. The JSON round-trip drops\n * `undefined`-valued fields on purpose — certified verdicts persist as\n * JSON, so the digest must cover exactly what a reader of the persisted\n * artifact can re-digest, nothing the wire cannot carry. Throws when the\n * evidence has no JSON form at all.\n */\nexport function certificationEvidenceDigest(evidence: unknown): string {\n const serialized = JSON.stringify(evidence)\n if (serialized === undefined) {\n throw new Error(\n 'certificationEvidenceDigest: evidence has no JSON form — a certificate over nothing is the unverifiable claim this record exists to kill',\n )\n }\n return contentHash(JSON.parse(serialized))\n}\n\n/**\n * Land a finished statement-equivalence record in the shared verdict\n * spine. `valid` answers the protocol's question — are the two blind\n * statements equivalent — so a refutation is `valid: false` even though a\n * separating witness in hand is a successful protocol outcome.\n *\n * Certification is present exactly when the obligation was discharged\n * (proved or refuted): the checker vouches for the discharge either way.\n * An unresolved obligation certifies nothing and keeps its reason in\n * `notes`.\n */\nexport function equivalenceVerdict(record: EquivalenceRecord): DefaultVerdict {\n const { obligation, spec, arms } = record\n const discharged = obligation.status !== 'unresolved'\n const notes =\n obligation.status === 'proved'\n ? `statements equivalent: ${spec.artifact}`\n : obligation.status === 'refuted-with-separating-witness'\n ? `formalization gap witnessed: ${obligation.separatingWitness}`\n : `obligation undischarged: ${obligation.unresolvedReason}`\n return {\n valid: obligation.status === 'proved',\n score: obligation.status === 'proved' ? 1 : 0,\n notes,\n ...(discharged && obligation.evidenceDigest !== undefined\n ? {\n certification: {\n strategy: spec.source,\n checker: obligation.checker,\n // The arms' blindness declarations are attested by the arms,\n // never verified by the checker — the one step every\n // equivalence certificate rests on.\n assumptions: [\n `arm '${arms[0].armId}' and arm '${arms[1].armId}' self-declare blind derivation`,\n ],\n evidenceDigest: obligation.evidenceDigest,\n } satisfies VerdictCertification,\n }\n : {}),\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AA2FA,SAAgB,4BAA4B,UAA2B;CACrE,MAAM,aAAa,KAAK,UAAU,QAAQ;CAC1C,IAAI,eAAe,KAAA,GACjB,MAAM,IAAI,MACR,0IACF;CAEF,OAAO,YAAY,KAAK,MAAM,UAAU,CAAC;AAC3C;;;;;;;;;;;;AAaA,SAAgB,mBAAmB,QAA2C;CAC5E,MAAM,EAAE,YAAY,MAAM,SAAS;CACnC,MAAM,aAAa,WAAW,WAAW;CACzC,MAAM,QACJ,WAAW,WAAW,WAClB,0BAA0B,KAAK,aAC/B,WAAW,WAAW,oCACpB,gCAAgC,WAAW,sBAC3C,4BAA4B,WAAW;CAC/C,OAAO;EACL,OAAO,WAAW,WAAW;EAC7B,OAAO,WAAW,WAAW,WAAW,IAAI;EAC5C;EACA,GAAI,cAAc,WAAW,mBAAmB,KAAA,IAC5C,EACE,eAAe;GACb,UAAU,KAAK;GACf,SAAS,WAAW;GAIpB,aAAa,CACX,QAAQ,KAAK,EAAE,CAAC,MAAM,aAAa,KAAK,EAAE,CAAC,MAAM,gCACnD;GACA,gBAAgB,WAAW;EAC7B,EACF,IACA,CAAC;CACP;AACF"}
@@ -1,4 +1,4 @@
1
- import { i as hashCanonical, r as canonicalString } from "./canonical-IL-Bu-14.js";
1
+ import { a as hashCanonical, r as canonicalString } from "./canonical-DPyQ_rpt.js";
2
2
  import { appendFileSync, existsSync, readFileSync } from "node:fs";
3
3
  //#region src/verdict-cache.ts
4
4
  /**
@@ -85,4 +85,4 @@ function fileVerdictCache(path) {
85
85
  //#endregion
86
86
  export { contentHash as n, fileVerdictCache as r, canonicalJson as t };
87
87
 
88
- //# sourceMappingURL=verdict-cache-CdVVTVmn.js.map
88
+ //# sourceMappingURL=verdict-cache-B3eCVQtY.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"verdict-cache-CdVVTVmn.js","names":[],"sources":["../src/verdict-cache.ts"],"sourcesContent":["/**\n * Content-addressed judge-verdict caching.\n *\n * LAW: cache JUDGE VERDICTS only — judging the same artifact with the same\n * judge+rubric is pure. NEVER cache agent rollouts. (A router that cached\n * identical fanout prompts silently destroyed best-of-N diversity; rollout\n * caching reintroduces that failure class. Judging has no diversity to\n * destroy — same artifact + same rubric ⇒ same verdict is the desired\n * property, not a bug.)\n *\n * The cache key is `v2:` + a sha-256 over the canonical JSON of everything\n * that can change a verdict: the artifact content, the scenario id, the judge\n * name, the full dimension list (key + description — the description IS the\n * rubric text shown to the judge), and a caller-supplied `judgeVersion`.\n * `judgeVersion` is REQUIRED: a judge whose prompt/model/ensemble changes\n * without a version bump would otherwise silently serve stale verdicts.\n * The `v2:` prefix names the key scheme; a store written under another scheme\n * misses once and repopulates.\n *\n * Canonical JSON is RFC 8785 from `ledger-core/canonical` — the package's one\n * identity scheme. It refuses `undefined`, functions, symbols, non-finite\n * numbers, class instances (including `Date`), `Map`, `Set`, cycles, and\n * unpaired surrogates: an artifact that cannot be unambiguously serialized\n * cannot be content-addressed, and coercing it would let two different\n * artifacts collide on one key. Pass timestamps as ISO strings.\n */\n\nimport { appendFileSync, existsSync, readFileSync } from 'node:fs'\nimport type { JudgeConfig, JudgeScore, Scenario } from './campaign/types'\nimport { canonicalString, hashCanonical } from './ledger-core/canonical'\n\n// ── canonical JSON + content hash ─────────────────────────────────────────\n\n/** Key scheme of every entry `cachedJudge` writes. */\nexport const VERDICT_CACHE_KEY_SCHEME = 'v2'\n\n/**\n * Canonical JSON (RFC 8785): object keys sorted recursively, so two\n * semantically equal values produce byte-identical output regardless of key\n * insertion order. Throws `LedgerCanonicalizationError` on any value with no\n * faithful JSON form — see `ledger-core/canonical`.\n */\nexport function canonicalJson(value: unknown): string {\n return canonicalString(value)\n}\n\n/** Hex sha-256 over `canonicalJson(value)`. The content address used by the\n * verdict cache and report attestation. Equals `hashCanonical(value)` with\n * the `sha256:` prefix removed. */\nexport function contentHash(value: unknown): string {\n return hashCanonical(value).slice('sha256:'.length)\n}\n\n// ── store contract ─────────────────────────────────────────────────────────\n\n/** Pluggable verdict store. Sync or async on both legs — `cachedJudge`\n * awaits the results either way. */\nexport interface VerdictCacheStore {\n get(key: string): Promise<JudgeScore | undefined> | JudgeScore | undefined\n set(key: string, score: JudgeScore): Promise<void> | void\n}\n\n/** Process-local Map-backed store. */\nexport function inMemoryVerdictCache(): VerdictCacheStore {\n const entries = new Map<string, JudgeScore>()\n return {\n get: (key) => entries.get(key),\n set: (key, score) => {\n entries.set(key, score)\n },\n }\n}\n\ninterface VerdictCacheLine {\n key: string\n score: JudgeScore\n}\n\nfunction parseCacheLine(line: string, path: string, lineNo: number): VerdictCacheLine {\n let parsed: unknown\n try {\n parsed = JSON.parse(line)\n } catch (err) {\n throw new Error(\n `fileVerdictCache: corrupt JSONL at ${path}:${lineNo} — ${err instanceof Error ? err.message : String(err)}`,\n )\n }\n const rec = parsed as Partial<VerdictCacheLine>\n if (\n typeof rec !== 'object' ||\n rec === null ||\n typeof rec.key !== 'string' ||\n typeof rec.score !== 'object' ||\n rec.score === null ||\n typeof rec.score.composite !== 'number' ||\n typeof rec.score.dimensions !== 'object'\n ) {\n throw new Error(\n `fileVerdictCache: invalid record shape at ${path}:${lineNo} — expected {key, score:{dimensions, composite, notes}}`,\n )\n }\n return rec as VerdictCacheLine\n}\n\n/**\n * JSONL-file-backed store: the full file is loaded into an in-memory index at\n * construction; every `set` appends one line synchronously (durable before\n * the verdict is returned). A corrupt or malformed line throws at load with\n * file:line — a skipped line would silently re-judge (cost) or, worse, mask\n * a half-written file that needs operator attention.\n */\nexport function fileVerdictCache(path: string): VerdictCacheStore {\n const entries = new Map<string, JudgeScore>()\n if (existsSync(path)) {\n const lines = readFileSync(path, 'utf8').split('\\n')\n for (let i = 0; i < lines.length; i++) {\n const line = lines[i]\n if (line === undefined || line.trim() === '') continue\n const rec = parseCacheLine(line, path, i + 1)\n entries.set(rec.key, rec.score)\n }\n }\n return {\n get: (key) => entries.get(key),\n set: (key, score) => {\n appendFileSync(path, `${JSON.stringify({ key, score })}\\n`, 'utf8')\n entries.set(key, score)\n },\n }\n}\n\n// ── cached judge wrapper ───────────────────────────────────────────────────\n\nexport interface VerdictCacheStats {\n hits: number\n misses: number\n}\n\nexport interface CachedJudgeOptions {\n /** REQUIRED — part of the cache key. Bump on any change to the judge's\n * prompt, model, ensemble, or scoring logic; silent judge upgrades must\n * never serve stale verdicts. */\n judgeVersion: string\n}\n\n/** The wrapped judge: same `JudgeConfig` seam, plus hit/miss observability. */\nexport type CachedJudge<TArtifact, TScenario extends Scenario = Scenario> = JudgeConfig<\n TArtifact,\n TScenario\n> & {\n stats(): VerdictCacheStats\n}\n\n/**\n * Wrap a `JudgeConfig` so repeat judgments of the same artifact are served\n * from the store instead of re-invoking `score()`. The wrapper is generic\n * over the judge's own type parameters and preserves `appliesTo` — it is a\n * drop-in replacement anywhere a `JudgeConfig` is accepted.\n *\n * A judge that throws is NOT cached: the error propagates and the next\n * attempt re-judges (caching a failure would pin a transient outage forever).\n */\nexport function cachedJudge<TArtifact, TScenario extends Scenario = Scenario>(\n judge: JudgeConfig<TArtifact, TScenario>,\n store: VerdictCacheStore,\n options: CachedJudgeOptions,\n): CachedJudge<TArtifact, TScenario> {\n if (typeof options.judgeVersion !== 'string' || options.judgeVersion.trim() === '') {\n throw new Error('cachedJudge: judgeVersion is required and must be a non-empty string')\n }\n const stats: VerdictCacheStats = { hits: 0, misses: 0 }\n const wrapped: CachedJudge<TArtifact, TScenario> = {\n name: judge.name,\n dimensions: judge.dimensions,\n judgeVersion: options.judgeVersion,\n async score(input) {\n const key = `${VERDICT_CACHE_KEY_SCHEME}:${contentHash({\n artifact: canonicalJson(input.artifact),\n scenarioId: input.scenario.id,\n judgeName: judge.name,\n dimensions: judge.dimensions,\n judgeVersion: options.judgeVersion,\n })}`\n const cached = await store.get(key)\n if (cached !== undefined) {\n stats.hits += 1\n return cached\n }\n const score = await judge.score(input)\n await store.set(key, score)\n stats.misses += 1\n return score\n },\n stats: () => ({ ...stats }),\n }\n if (judge.appliesTo) wrapped.appliesTo = judge.appliesTo\n return wrapped\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA0CA,SAAgB,cAAc,OAAwB;CACpD,OAAO,gBAAgB,KAAK;AAC9B;;;;AAKA,SAAgB,YAAY,OAAwB;CAClD,OAAO,cAAc,KAAK,CAAC,CAAC,MAAM,CAAgB;AACpD;AA2BA,SAAS,eAAe,MAAc,MAAc,QAAkC;CACpF,IAAI;CACJ,IAAI;EACF,SAAS,KAAK,MAAM,IAAI;CAC1B,SAAS,KAAK;EACZ,MAAM,IAAI,MACR,sCAAsC,KAAK,GAAG,OAAO,KAAK,eAAe,QAAQ,IAAI,UAAU,OAAO,GAAG,GAC3G;CACF;CACA,MAAM,MAAM;CACZ,IACE,OAAO,QAAQ,YACf,QAAQ,QACR,OAAO,IAAI,QAAQ,YACnB,OAAO,IAAI,UAAU,YACrB,IAAI,UAAU,QACd,OAAO,IAAI,MAAM,cAAc,YAC/B,OAAO,IAAI,MAAM,eAAe,UAEhC,MAAM,IAAI,MACR,6CAA6C,KAAK,GAAG,OAAO,wDAC9D;CAEF,OAAO;AACT;;;;;;;;AASA,SAAgB,iBAAiB,MAAiC;CAChE,MAAM,0BAAU,IAAI,IAAwB;CAC5C,IAAI,WAAW,IAAI,GAAG;EACpB,MAAM,QAAQ,aAAa,MAAM,MAAM,CAAC,CAAC,MAAM,IAAI;EACnD,KAAK,IAAI,IAAI,GAAG,IAAI,MAAM,QAAQ,KAAK;GACrC,MAAM,OAAO,MAAM;GACnB,IAAI,SAAS,KAAA,KAAa,KAAK,KAAK,MAAM,IAAI;GAC9C,MAAM,MAAM,eAAe,MAAM,MAAM,IAAI,CAAC;GAC5C,QAAQ,IAAI,IAAI,KAAK,IAAI,KAAK;EAChC;CACF;CACA,OAAO;EACL,MAAM,QAAQ,QAAQ,IAAI,GAAG;EAC7B,MAAM,KAAK,UAAU;GACnB,eAAe,MAAM,GAAG,KAAK,UAAU;IAAE;IAAK;GAAM,CAAC,EAAE,KAAK,MAAM;GAClE,QAAQ,IAAI,KAAK,KAAK;EACxB;CACF;AACF"}
1
+ {"version":3,"file":"verdict-cache-B3eCVQtY.js","names":[],"sources":["../src/verdict-cache.ts"],"sourcesContent":["/**\n * Content-addressed judge-verdict caching.\n *\n * LAW: cache JUDGE VERDICTS only — judging the same artifact with the same\n * judge+rubric is pure. NEVER cache agent rollouts. (A router that cached\n * identical fanout prompts silently destroyed best-of-N diversity; rollout\n * caching reintroduces that failure class. Judging has no diversity to\n * destroy — same artifact + same rubric ⇒ same verdict is the desired\n * property, not a bug.)\n *\n * The cache key is `v2:` + a sha-256 over the canonical JSON of everything\n * that can change a verdict: the artifact content, the scenario id, the judge\n * name, the full dimension list (key + description — the description IS the\n * rubric text shown to the judge), and a caller-supplied `judgeVersion`.\n * `judgeVersion` is REQUIRED: a judge whose prompt/model/ensemble changes\n * without a version bump would otherwise silently serve stale verdicts.\n * The `v2:` prefix names the key scheme; a store written under another scheme\n * misses once and repopulates.\n *\n * Canonical JSON is RFC 8785 from `ledger-core/canonical` — the package's one\n * identity scheme. It refuses `undefined`, functions, symbols, non-finite\n * numbers, class instances (including `Date`), `Map`, `Set`, cycles, and\n * unpaired surrogates: an artifact that cannot be unambiguously serialized\n * cannot be content-addressed, and coercing it would let two different\n * artifacts collide on one key. Pass timestamps as ISO strings.\n */\n\nimport { appendFileSync, existsSync, readFileSync } from 'node:fs'\nimport type { JudgeConfig, JudgeScore, Scenario } from './campaign/types'\nimport { canonicalString, hashCanonical } from './ledger-core/canonical'\n\n// ── canonical JSON + content hash ─────────────────────────────────────────\n\n/** Key scheme of every entry `cachedJudge` writes. */\nexport const VERDICT_CACHE_KEY_SCHEME = 'v2'\n\n/**\n * Canonical JSON (RFC 8785): object keys sorted recursively, so two\n * semantically equal values produce byte-identical output regardless of key\n * insertion order. Throws `LedgerCanonicalizationError` on any value with no\n * faithful JSON form — see `ledger-core/canonical`.\n */\nexport function canonicalJson(value: unknown): string {\n return canonicalString(value)\n}\n\n/** Hex sha-256 over `canonicalJson(value)`. The content address used by the\n * verdict cache and report attestation. Equals `hashCanonical(value)` with\n * the `sha256:` prefix removed. */\nexport function contentHash(value: unknown): string {\n return hashCanonical(value).slice('sha256:'.length)\n}\n\n// ── store contract ─────────────────────────────────────────────────────────\n\n/** Pluggable verdict store. Sync or async on both legs — `cachedJudge`\n * awaits the results either way. */\nexport interface VerdictCacheStore {\n get(key: string): Promise<JudgeScore | undefined> | JudgeScore | undefined\n set(key: string, score: JudgeScore): Promise<void> | void\n}\n\n/** Process-local Map-backed store. */\nexport function inMemoryVerdictCache(): VerdictCacheStore {\n const entries = new Map<string, JudgeScore>()\n return {\n get: (key) => entries.get(key),\n set: (key, score) => {\n entries.set(key, score)\n },\n }\n}\n\ninterface VerdictCacheLine {\n key: string\n score: JudgeScore\n}\n\nfunction parseCacheLine(line: string, path: string, lineNo: number): VerdictCacheLine {\n let parsed: unknown\n try {\n parsed = JSON.parse(line)\n } catch (err) {\n throw new Error(\n `fileVerdictCache: corrupt JSONL at ${path}:${lineNo} — ${err instanceof Error ? err.message : String(err)}`,\n )\n }\n const rec = parsed as Partial<VerdictCacheLine>\n if (\n typeof rec !== 'object' ||\n rec === null ||\n typeof rec.key !== 'string' ||\n typeof rec.score !== 'object' ||\n rec.score === null ||\n typeof rec.score.composite !== 'number' ||\n typeof rec.score.dimensions !== 'object'\n ) {\n throw new Error(\n `fileVerdictCache: invalid record shape at ${path}:${lineNo} — expected {key, score:{dimensions, composite, notes}}`,\n )\n }\n return rec as VerdictCacheLine\n}\n\n/**\n * JSONL-file-backed store: the full file is loaded into an in-memory index at\n * construction; every `set` appends one line synchronously (durable before\n * the verdict is returned). A corrupt or malformed line throws at load with\n * file:line — a skipped line would silently re-judge (cost) or, worse, mask\n * a half-written file that needs operator attention.\n */\nexport function fileVerdictCache(path: string): VerdictCacheStore {\n const entries = new Map<string, JudgeScore>()\n if (existsSync(path)) {\n const lines = readFileSync(path, 'utf8').split('\\n')\n for (let i = 0; i < lines.length; i++) {\n const line = lines[i]\n if (line === undefined || line.trim() === '') continue\n const rec = parseCacheLine(line, path, i + 1)\n entries.set(rec.key, rec.score)\n }\n }\n return {\n get: (key) => entries.get(key),\n set: (key, score) => {\n appendFileSync(path, `${JSON.stringify({ key, score })}\\n`, 'utf8')\n entries.set(key, score)\n },\n }\n}\n\n// ── cached judge wrapper ───────────────────────────────────────────────────\n\nexport interface VerdictCacheStats {\n hits: number\n misses: number\n}\n\nexport interface CachedJudgeOptions {\n /** REQUIRED — part of the cache key. Bump on any change to the judge's\n * prompt, model, ensemble, or scoring logic; silent judge upgrades must\n * never serve stale verdicts. */\n judgeVersion: string\n}\n\n/** The wrapped judge: same `JudgeConfig` seam, plus hit/miss observability. */\nexport type CachedJudge<TArtifact, TScenario extends Scenario = Scenario> = JudgeConfig<\n TArtifact,\n TScenario\n> & {\n stats(): VerdictCacheStats\n}\n\n/**\n * Wrap a `JudgeConfig` so repeat judgments of the same artifact are served\n * from the store instead of re-invoking `score()`. The wrapper is generic\n * over the judge's own type parameters and preserves `appliesTo` — it is a\n * drop-in replacement anywhere a `JudgeConfig` is accepted.\n *\n * A judge that throws is NOT cached: the error propagates and the next\n * attempt re-judges (caching a failure would pin a transient outage forever).\n */\nexport function cachedJudge<TArtifact, TScenario extends Scenario = Scenario>(\n judge: JudgeConfig<TArtifact, TScenario>,\n store: VerdictCacheStore,\n options: CachedJudgeOptions,\n): CachedJudge<TArtifact, TScenario> {\n if (typeof options.judgeVersion !== 'string' || options.judgeVersion.trim() === '') {\n throw new Error('cachedJudge: judgeVersion is required and must be a non-empty string')\n }\n const stats: VerdictCacheStats = { hits: 0, misses: 0 }\n const wrapped: CachedJudge<TArtifact, TScenario> = {\n name: judge.name,\n dimensions: judge.dimensions,\n judgeVersion: options.judgeVersion,\n async score(input) {\n const key = `${VERDICT_CACHE_KEY_SCHEME}:${contentHash({\n artifact: canonicalJson(input.artifact),\n scenarioId: input.scenario.id,\n judgeName: judge.name,\n dimensions: judge.dimensions,\n judgeVersion: options.judgeVersion,\n })}`\n const cached = await store.get(key)\n if (cached !== undefined) {\n stats.hits += 1\n return cached\n }\n const score = await judge.score(input)\n await store.set(key, score)\n stats.misses += 1\n return score\n },\n stats: () => ({ ...stats }),\n }\n if (judge.appliesTo) wrapped.appliesTo = judge.appliesTo\n return wrapped\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA0CA,SAAgB,cAAc,OAAwB;CACpD,OAAO,gBAAgB,KAAK;AAC9B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3nO.js";
2
- import { s as TraceStore } from "../store-B06JdC56.js";
3
2
  import { p as ChatClient } from "../types-Bfk0uxRj.js";
4
- import { m as FeedbackTrajectoryStore } from "../feedback-trajectory-B3ZHaHV_.js";
3
+ import { s as TraceStore } from "../store-Cq9oOrI1.js";
4
+ import { m as FeedbackTrajectoryStore } from "../feedback-trajectory-DIqpCyF0.js";
5
5
  import { z } from "zod";
6
6
  import { ServerType } from "@hono/node-server";
7
7
  import { Hono } from "hono";
@@ -308,13 +308,28 @@ type ListRubricsResponse = z.infer<typeof ListRubricsResponseSchema>;
308
308
  type VersionResponse = z.infer<typeof VersionResponseSchema>;
309
309
  type ErrorResponse = z.infer<typeof ErrorResponseSchema>;
310
310
  /**
311
- * Bump on any breaking change to a request/response schema.
312
- * Non-breaking (additive) changes don't require a bump.
311
+ * Bump the major on any breaking change to a request/response schema — the
312
+ * Python client compares majors and refuses a mismatch. Bump the minor when a
313
+ * response value changes meaning without changing its shape, which a client
314
+ * can detect but does not have to act on.
313
315
  */
314
- declare const WIRE_VERSION = "1.0.0";
316
+ declare const WIRE_VERSION = "1.1.0";
315
317
  /**
316
- * Stable hash of a rubric. Used to make scores comparable across runs:
317
- * if the rubricVersion matches, the rubric was identical.
318
+ * The digest scheme `hashRubric` mints, named inside the value it produces.
319
+ * A consumer holding a tag from an earlier release reads a different scheme
320
+ * here and can tell "this package changed how it hashes" from "the rubric
321
+ * changed" — the two are indistinguishable when the value is an untagged hex
322
+ * string.
323
+ */
324
+ declare const RUBRIC_VERSION_SCHEME = "sha256-rfc8785";
325
+ /**
326
+ * Stable identity of a rubric, as `<name>@sha256-rfc8785:<hex>`. Two scores
327
+ * are comparable when this matches exactly.
328
+ *
329
+ * The digest comes from `hashCanonical`, this package's only canonical-JSON
330
+ * encoder (RFC 8785). RFC 8785 orders keys by UTF-16 code unit, which is a
331
+ * property of the value alone — so the same rubric produces the same tag on
332
+ * every machine, which a locale-collated key order does not guarantee.
318
333
  */
319
334
  declare function hashRubric(rubric: Rubric): string;
320
335
  //#endregion
@@ -783,5 +798,5 @@ interface StartedServer {
783
798
  */
784
799
  declare function startServerAsync(opts?: ServeOptions): Promise<StartedServer>;
785
800
  //#endregion
786
- export { ErrorResponse, ErrorResponseSchema, FailureMode, FeedbackIngestResponse, FeedbackIngestResponseSchema, FeedbackTrajectory, FeedbackTrajectorySchema, HandleJudgeOptions, HealthResponseSchema, IngestionStores, JudgeRequest, JudgeRequestSchema, JudgeResult, JudgeResultSchema, ListRubricsResponse, ListRubricsResponseSchema, type RpcOptions, Rubric, RubricDimension, RubricDimensionSchema, RubricInfo, RubricSchema, type ServeOptions, type StartedServer, TraceEvent, TraceEventSchema, TracesIngestRequest, TracesIngestRequestSchema, TracesIngestResponse, TracesIngestResponseSchema, VersionResponse, VersionResponseSchema, WIRE_VERSION, WireError, buildOpenApi, createApp, dispatchRpc, getBuiltinRubric, handleFeedbackIngest, handleJudge, handleListRubrics, handleTracesIngest, handleVersion, hashRubric, listBuiltinRubrics, runRpcBatch, runRpcOnce, startServer, startServerAsync };
801
+ export { ErrorResponse, ErrorResponseSchema, FailureMode, FeedbackIngestResponse, FeedbackIngestResponseSchema, FeedbackTrajectory, FeedbackTrajectorySchema, HandleJudgeOptions, HealthResponseSchema, IngestionStores, JudgeRequest, JudgeRequestSchema, JudgeResult, JudgeResultSchema, ListRubricsResponse, ListRubricsResponseSchema, RUBRIC_VERSION_SCHEME, type RpcOptions, Rubric, RubricDimension, RubricDimensionSchema, RubricInfo, RubricSchema, type ServeOptions, type StartedServer, TraceEvent, TraceEventSchema, TracesIngestRequest, TracesIngestRequestSchema, TracesIngestResponse, TracesIngestResponseSchema, VersionResponse, VersionResponseSchema, WIRE_VERSION, WireError, buildOpenApi, createApp, dispatchRpc, getBuiltinRubric, handleFeedbackIngest, handleJudge, handleListRubrics, handleTracesIngest, handleVersion, hashRubric, listBuiltinRubrics, runRpcBatch, runRpcOnce, startServer, startServerAsync };
787
802
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","names":[],"sources":["../../src/wire/schemas.ts","../../src/wire/handlers.ts","../../node_modules/.pnpm/openapi3-ts@4.6.0/node_modules/openapi3-ts/dist/model/specification-extension.d.ts","../../node_modules/.pnpm/openapi3-ts@4.6.0/node_modules/openapi3-ts/dist/model/oas-common.d.ts","../../node_modules/.pnpm/openapi3-ts@4.6.0/node_modules/openapi3-ts/dist/model/openapi31.d.ts","../../src/wire/openapi.ts","../../src/wire/rpc.ts","../../src/wire/rubrics.ts","../../src/wire/server.ts"],"x_google_ignoreList":[2,3,4],"mappings":";;;;;;;;cAmBa,uBAAqB,EAAA;;;;;;GAkBL,EAAA,KAAA;cAEvB,mBAAiB,EAAA;;;GAKE,EAAA,KAAA;cAIZ,cAAY,EAAA;;;;;;;;;;;;;;;;;;;GA6BL,EAAA,KAAA;cAIP,oBAAkB,EAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAwBL,EAAA,KAAA;cAEb,mBAAiB,EAAA;;;;;;;;;GA6BL,EAAA,KAAA;cAInB,kBAAgB,EAAA;;;;;;;;;;GAUE,EAAA,KAAA;cAEX,2BAAyB,EAAA;;;;;;;;;;;;GAIL,EAAA,KAAA;cAIpB,uBAAqB,EAAA;;;;;GAWL,EAAA,KAAA;cAEhB,sBAAoB,EAAA;;;GAKL,EAAA,KAAA;;;;;;;cAUf,kBAAgB,EAAA;;;;;;;;;;;;;;;;GA0BL,EAAA,KAAA;cAEX,2BAAyB,EAAA;;;;;;;;;;;;;;;;;;GAQL,EAAA,KAAA;cAEpB,4BAA0B,EAAA;;;;;;;GAiBL,EAAA,KAAA;cA2DrB,0BAAwB,EAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BL,EAAA,KAAA;cAEnB,8BAA4B,EAAA;;;GAKL,EAA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,mBAAmB,4BAA4B;;;iBAMnC,UAAU,OAAM,mBAAqB,0BAAA,+BAAA;UA0IpC,qBAAqB;;EAEpC;;EAEA;;iBAGc,YAAY,OAAM,eAAoB;UAUrC;EACf,QAAQ;;;;EAIR;;EAEA;;EAEA,SAAS;;;;;;;iBAQK,iBAAiB,OAAM,eAAoB,QAAQ"}
1
+ {"version":3,"file":"index.d.ts","names":[],"sources":["../../src/wire/schemas.ts","../../src/wire/handlers.ts","../../node_modules/.pnpm/openapi3-ts@4.6.0/node_modules/openapi3-ts/dist/model/specification-extension.d.ts","../../node_modules/.pnpm/openapi3-ts@4.6.0/node_modules/openapi3-ts/dist/model/oas-common.d.ts","../../node_modules/.pnpm/openapi3-ts@4.6.0/node_modules/openapi3-ts/dist/model/openapi31.d.ts","../../src/wire/openapi.ts","../../src/wire/rpc.ts","../../src/wire/rubrics.ts","../../src/wire/server.ts"],"x_google_ignoreList":[2,3,4],"mappings":";;;;;;;;cAoBa,uBAAqB,EAAA;;;;;;GAkBL,EAAA,KAAA;cAEvB,mBAAiB,EAAA;;;GAKE,EAAA,KAAA;cAIZ,cAAY,EAAA;;;;;;;;;;;;;;;;;;;GA6BL,EAAA,KAAA;cAIP,oBAAkB,EAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAwBL,EAAA,KAAA;cAEb,mBAAiB,EAAA;;;;;;;;;GA6BL,EAAA,KAAA;cAInB,kBAAgB,EAAA;;;;;;;;;;GAcE,EAAA,KAAA;cAEX,2BAAyB,EAAA;;;;;;;;;;;;GAIL,EAAA,KAAA;cAIpB,uBAAqB,EAAA;;;;;GAWL,EAAA,KAAA;cAEhB,sBAAoB,EAAA;;;GAKL,EAAA,KAAA;;;;;;;cAUf,kBAAgB,EAAA;;;;;;;;;;;;;;;;GA0BL,EAAA,KAAA;cAEX,2BAAyB,EAAA;;;;;;;;;;;;;;;;;;GAQL,EAAA,KAAA;cAEpB,4BAA0B,EAAA;;;;;;;GAiBL,EAAA,KAAA;cA2DrB,0BA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pB,KAAK,YACL,UAAS,aACR,QAAQ,aAAa;;iBAqDF,WAAW,iBAAiB,UAAS,aAAkB;;iBAuBvD,YAAY,iBAAiB,UAAS,aAAkB;;;;iBCjB9D,iBAAiB,eAAe;;iBAKhC;;;;;;;;;;;;;UCtEC;;EAEf,SAAS;;;;;;EAMT,OAAO;;EAEP;;;;;;;;;;EAUA;IACE,mBAAmB,4BAA4B;;;iBAMnC,UAAU,OAAM,mBAAqB,0BAAA,+BAAA;UA0IpC,qBAAqB;;EAEpC;;EAEA;;iBAGc,YAAY,OAAM,eAAoB;UAUrC;EACf,QAAQ;;;;EAIR;;EAEA;;EAEA,SAAS;;;;;;;iBAQK,iBAAiB,OAAM,eAAoB,QAAQ"}
@@ -1,2 +1,2 @@
1
- import { A as hashRubric, C as RubricDimensionSchema, D as TracesIngestResponseSchema, E as TracesIngestRequestSchema, O as VersionResponseSchema, S as ListRubricsResponseSchema, T as TraceEventSchema, _ as FeedbackIngestResponseSchema, a as runRpcBatch, b as JudgeRequestSchema, c as WireError, d as handleListRubrics, f as handleTracesIngest, g as ErrorResponseSchema, h as listBuiltinRubrics, i as dispatchRpc, k as WIRE_VERSION, l as handleFeedbackIngest, m as getBuiltinRubric, n as startServer, o as runRpcOnce, p as handleVersion, r as startServerAsync, s as buildOpenApi, t as createApp, u as handleJudge, v as FeedbackTrajectorySchema, w as RubricSchema, x as JudgeResultSchema, y as HealthResponseSchema } from "../server-BtFd4uzB.js";
2
- export { ErrorResponseSchema, FeedbackIngestResponseSchema, FeedbackTrajectorySchema, HealthResponseSchema, JudgeRequestSchema, JudgeResultSchema, ListRubricsResponseSchema, RubricDimensionSchema, RubricSchema, TraceEventSchema, TracesIngestRequestSchema, TracesIngestResponseSchema, VersionResponseSchema, WIRE_VERSION, WireError, buildOpenApi, createApp, dispatchRpc, getBuiltinRubric, handleFeedbackIngest, handleJudge, handleListRubrics, handleTracesIngest, handleVersion, hashRubric, listBuiltinRubrics, runRpcBatch, runRpcOnce, startServer, startServerAsync };
1
+ import { A as WIRE_VERSION, C as RUBRIC_VERSION_SCHEME, D as TracesIngestRequestSchema, E as TraceEventSchema, O as TracesIngestResponseSchema, S as ListRubricsResponseSchema, T as RubricSchema, _ as FeedbackIngestResponseSchema, a as runRpcBatch, b as JudgeRequestSchema, c as WireError, d as handleListRubrics, f as handleTracesIngest, g as ErrorResponseSchema, h as listBuiltinRubrics, i as dispatchRpc, j as hashRubric, k as VersionResponseSchema, l as handleFeedbackIngest, m as getBuiltinRubric, n as startServer, o as runRpcOnce, p as handleVersion, r as startServerAsync, s as buildOpenApi, t as createApp, u as handleJudge, v as FeedbackTrajectorySchema, w as RubricDimensionSchema, x as JudgeResultSchema, y as HealthResponseSchema } from "../server-CCEnywOR.js";
2
+ export { ErrorResponseSchema, FeedbackIngestResponseSchema, FeedbackTrajectorySchema, HealthResponseSchema, JudgeRequestSchema, JudgeResultSchema, ListRubricsResponseSchema, RUBRIC_VERSION_SCHEME, RubricDimensionSchema, RubricSchema, TraceEventSchema, TracesIngestRequestSchema, TracesIngestResponseSchema, VersionResponseSchema, WIRE_VERSION, WireError, buildOpenApi, createApp, dispatchRpc, getBuiltinRubric, handleFeedbackIngest, handleJudge, handleListRubrics, handleTracesIngest, handleVersion, hashRubric, listBuiltinRubrics, runRpcBatch, runRpcOnce, startServer, startServerAsync };
@@ -0,0 +1,64 @@
1
+ # Coding-agent session intake
2
+
3
+ A coding agent writes its session to a JSONL transcript.
4
+ This package turns that transcript into `RunRecord`s, a provider-neutral action stream, and per-session metrics, so a session that already happened can be scored, compared, and analyzed like any other run.
5
+
6
+ Import from `@tangle-network/agent-eval/contract`.
7
+
8
+ ## The three steps
9
+
10
+ ```ts
11
+ import {
12
+ fromCodexSession,
13
+ parseCodeAgentJsonlFile,
14
+ } from '@tangle-network/agent-eval/contract'
15
+
16
+ const { entries, malformedLines } = await parseCodeAgentJsonlFile('/path/to/rollout.jsonl')
17
+ const { runs, diagnostics, metrics, observations } = fromCodexSession({
18
+ entries,
19
+ malformedLines,
20
+ sourcePath: '/path/to/rollout.jsonl',
21
+ scenarioId: 'refactor-billing',
22
+ })
23
+ ```
24
+
25
+ 1. **Read the transcript.** `parseCodeAgentJsonl(text)` for a string you already hold, `parseCodeAgentJsonlFile(path)` for a file. Both return `{ entries, malformedLines }`; a line that is not JSON is counted, never dropped silently.
26
+ 2. **Convert it.** One function per harness, below. Each returns `runs`, `diagnostics`, `metrics`, and `observations`.
27
+ 3. **Read `diagnostics` before `runs`.** One `CodeAgentSessionDiagnostic` per session records what the transcript actually carried: `malformedLines`, `hasExplicitTerminalSignal`, `hasFinalOutput`, `hasQualityLabel`, `hasTokenUsage`, `hasCost`, the `costKind` that was used, and any `warnings`. A run whose diagnostic says `hasCost: false` has no cost, not a cost of zero — check the flag before you aggregate the field.
28
+
29
+ ## One function per harness
30
+
31
+ | Harness | Function |
32
+ |---|---|
33
+ | Codex | `fromCodexSession` |
34
+ | Claude Code | `fromClaudeCodeSession` |
35
+ | OpenCode | `fromOpenCodeSession` |
36
+ | Kimi Code | `fromKimiCodeSession` |
37
+ | Pi | `fromPiSession` |
38
+
39
+ They share one implementation and one options shape (`CodeAgentSessionIntakeOptions`); the harness decides how a session id, a terminal state, and a cost receipt are read out of the entries.
40
+ Supply `experimentId`, `candidateId`, `seed`, `splitTag`, `scenarioId`, `model`, `promptHash`, `configHash`, `commitSha`, and `score` when the surrounding experiment knows them — an unsupplied field stays unknown rather than becoming a zero.
41
+ `costProvenance` sets the cost receipt explicitly; without it a source-reported cost wins, then a token-priced estimate, then uncaptured.
42
+
43
+ `metrics` carries the per-session counts a comparison needs without re-reading the transcript: `userMessages`, `assistantMessages`, `reasoningItems`, `toolCalls`, `toolOutputs`, `toolErrors`, `unclassifiedErrors`, `patchAttempts`, `patchSuccesses`, `patchFailures`, `turnsStarted`.
44
+
45
+ ## Transcripts larger than memory
46
+
47
+ `parseCodeAgentJsonlFile` holds every entry, so it grows with the transcript.
48
+ `streamCodeAgentJsonlFile(path)` is an async generator that keeps live memory bounded by the longest single line — use it when a rollout is large enough that the entry array itself is the problem.
49
+ Reading a session above V8's ~512MB string ceiling through the string path throws `ERR_STRING_TOO_LONG`; the streaming path does not.
50
+
51
+ ## The action stream on its own
52
+
53
+ `observeCodeAgentSession({ source, entries })` returns just the `CodeAgentSessionObservation`: the final text, the terminal state, and the provider-neutral action list.
54
+ Raw prompts, tool inputs, and tool outputs stay out of that projection — keep the source JSONL as the evidence for them.
55
+
56
+ ## Traces that are not coding-agent sessions
57
+
58
+ `parseAgentTrace(records)` indexes a generic agent trace, and `partitionRunsByAuthoringModel(...)` splits its runs by the model that authored them, which is what a contamination check or a per-model comparison needs.
59
+ `fromOtelSpans(...)` is the entry point for OTLP spans.
60
+
61
+ ## Related
62
+
63
+ - [`docs/concepts.md`](./concepts.md) — what a `RunRecord` is.
64
+ - [`docs/trace-analysis.md`](./trace-analysis.md) — analyzing the runs once they exist.
package/docs/concepts.md CHANGED
@@ -214,7 +214,7 @@ A rubric describes:
214
214
  Built-in rubrics ship in `src/wire/rubrics.ts`, including `anti-slop` for technical-buyer voice.
215
215
  You can also pass the same rubric shape inline at the call site.
216
216
 
217
- A rubric is plain data. The hash of that data is the `rubricVersion`. Two scores are only comparable if they used the same `rubricVersion`: change the rubric and you start a new comparison series.
217
+ A rubric is plain data. The digest of that data, tagged with the scheme that produced it, is the `rubricVersion`. Two scores are only comparable if they used the same `rubricVersion`: change the rubric and you start a new comparison series.
218
218
 
219
219
  ## How verifiers work
220
220
 
@@ -354,6 +354,6 @@ Result:
354
354
  - **3 fences were not TypeScript** and are now marked `text`: an object fragment in `campaign-proposers.md`, a call elided as `{ ... }` in `feedback-trajectories.md`, and a method sketch in `examples/benchmarks/README.md`.
355
355
  - **2 fences imported a path that cannot resolve** — `@tangle-network/agent-eval/../src/trace-repair` in `trace-repair-admission.md` and `trace-repair-continuation.md` — now `@tangle-network/agent-eval/trace-repair`.
356
356
  - **0 of the remaining 63 name an export that does not exist.** Every symbol a fence imports is on the current surface.
357
- - The remaining compiler complaints are inherent to an excerpt: a name declared in the prose around it, a shorthand property, top-level `await` outside a module. Three fences import a deliberate placeholder (`your-text-optimizer`, `./my-engine`), and three import `@tangle-network/agent-eval/adapters/http`, which `distributed-driver.md` already declares as source-only and unpublished.
357
+ - The remaining compiler complaints are inherent to an excerpt: a name declared in the prose around it, a shorthand property, top-level `await` outside a module. Three fences import a deliberate placeholder (`your-text-optimizer`, `./my-engine`).
358
358
 
359
359
  There is no fence checker in `scripts/` and no CI job. Compiling illustrative snippets fails builds for prose edits, and the failure mode it catches — a doc naming a symbol that no longer exists — is what the export census and review already cover. Repeat this pass by hand after a large surface change.
@@ -1,8 +1,5 @@
1
1
  # Distributed campaign execution: coordinator-on-A, workers-on-B
2
2
 
3
- > **Status: source-only, not published as of 0.140.x.** `@tangle-network/agent-eval/adapters/http` (`httpDispatch`, `runDispatchServer`) exists in source at `src/adapters/http.ts` but has no matching entry in `package.json` `exports`.
4
- > This doc describes the design and the wire shape.
5
- > Every `import` line below, run against `@tangle-network/agent-eval` installed from npm, throws `ERR_PACKAGE_PATH_NOT_EXPORTED`.
6
3
 
7
4
  The coordinator process runs `runCampaign()`, `runImprovementLoop()`, or `compareOptimizationMethods()`.
8
5
  The worker runs your actual agent.
@@ -62,7 +59,7 @@ Coordinator-on-A talks to one worker-on-B over HTTP.
62
59
  **Coordinator side (machine A):**
63
60
 
64
61
  ```ts
65
- import { httpDispatch } from '@tangle-network/agent-eval/adapters/http' // not currently published — see status note
62
+ import { httpDispatch } from '@tangle-network/agent-eval/adapters/http'
66
63
 
67
64
  const dispatch = httpDispatch<MyScenario, MyArtifact>({
68
65
  url: 'https://worker.your-infra.com/dispatch',
@@ -79,7 +76,7 @@ await runImprovementLoop({ scenarios, baselineSurface, dispatchWithSurface: (sur
79
76
  **Worker side (machine B):**
80
77
 
81
78
  ```ts
82
- import { runDispatchServer } from '@tangle-network/agent-eval/adapters/http' // not currently published — see status note
79
+ import { runDispatchServer } from '@tangle-network/agent-eval/adapters/http'
83
80
 
84
81
  const handle = await runDispatchServer<MyScenario, MyArtifact>({
85
82
  dispatch: async (scenario, ctx) => {
@@ -102,7 +99,7 @@ The coordinator picks a region per cell; the same `httpDispatch` routes to
102
99
  different worker URLs based on placement.
103
100
 
104
101
  ```ts
105
- import { httpDispatch } from '@tangle-network/agent-eval/adapters/http' // not currently published — see status note
102
+ import { httpDispatch } from '@tangle-network/agent-eval/adapters/http'
106
103
 
107
104
  const REGION_URLS: Record<string, string> = {
108
105
  'us-east': 'https://worker-use1.your-infra.com/dispatch',