@tangle-network/agent-eval 0.150.1 → 0.161.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 (353) hide show
  1. package/CHANGELOG.md +178 -1
  2. package/README.md +7 -3
  3. package/dist/{active-curriculum-C4mk67HP.js → active-curriculum-CD5TU2yW.js} +3 -13
  4. package/dist/active-curriculum-CD5TU2yW.js.map +1 -0
  5. package/dist/{agent-profile-cell-BkcRDikH.d.ts → agent-profile-cell-CTOZJUuE.d.ts} +4 -2
  6. package/dist/agent-profile-cell-CTOZJUuE.d.ts.map +1 -0
  7. package/dist/analyst/index.d.ts +19 -36
  8. package/dist/analyst/index.d.ts.map +1 -1
  9. package/dist/analyst/index.js +8 -8
  10. package/dist/analyst/index.js.map +1 -1
  11. package/dist/{backend-integrity-DOCa_QrR.d.ts → backend-integrity-DxuQCu_A.d.ts} +4 -3
  12. package/dist/backend-integrity-DxuQCu_A.d.ts.map +1 -0
  13. package/dist/{benchmark-BtAWA8nT.d.ts → benchmark-CGPp-kDC.d.ts} +3 -3
  14. package/dist/{benchmark-BtAWA8nT.d.ts.map → benchmark-CGPp-kDC.d.ts.map} +1 -1
  15. package/dist/{benchmark-command-CAFwbH0L.js → benchmark-command-BVtaq_ve.js} +26 -31
  16. package/dist/benchmark-command-BVtaq_ve.js.map +1 -0
  17. package/dist/benchmarks/index.d.ts +6 -19
  18. package/dist/benchmarks/index.d.ts.map +1 -1
  19. package/dist/benchmarks/index.js +4 -4
  20. package/dist/benchmarks/index.js.map +1 -1
  21. package/dist/builder-eval/index.d.ts +3 -3
  22. package/dist/builder-eval/index.js +3 -3
  23. package/dist/campaign/index.d.ts +9 -9
  24. package/dist/campaign/index.js +7 -7
  25. package/dist/{campaign-CN_7xJdV.js → campaign-BSmOwskD.js} +77 -795
  26. package/dist/campaign-BSmOwskD.js.map +1 -0
  27. package/dist/{canonical-D-XsTQ6_.js → canonical-IL-Bu-14.js} +26 -2
  28. package/dist/canonical-IL-Bu-14.js.map +1 -0
  29. package/dist/{capture-fetch-BBVFzhkk.d.ts → capture-fetch-CqwsJkkG.d.ts} +3 -3
  30. package/dist/{capture-fetch-BBVFzhkk.d.ts.map → capture-fetch-CqwsJkkG.d.ts.map} +1 -1
  31. package/dist/{chat-client-2bVfrzhN.js → chat-client-DlMlAeYI.js} +5 -55
  32. package/dist/{chat-client-2bVfrzhN.js.map → chat-client-DlMlAeYI.js.map} +1 -1
  33. package/dist/chat-json-call-6g5sJobJ.js +53 -0
  34. package/dist/chat-json-call-6g5sJobJ.js.map +1 -0
  35. package/dist/cli.js +54 -19
  36. package/dist/cli.js.map +1 -1
  37. package/dist/{client-LIuo-KPv.js → client-CX7KqIdB.js} +3 -3
  38. package/dist/client-CX7KqIdB.js.map +1 -0
  39. package/dist/{client-kPQYT_56.d.ts → client-L9VVPkim.d.ts} +4 -4
  40. package/dist/{client-kPQYT_56.d.ts.map → client-L9VVPkim.d.ts.map} +1 -1
  41. package/dist/contract/index.d.ts +13 -27
  42. package/dist/contract/index.d.ts.map +1 -1
  43. package/dist/contract/index.js +14 -17
  44. package/dist/contract/index.js.map +1 -1
  45. package/dist/{counterfactual--bpysZF0.d.ts → counterfactual-BaFUWK3H.d.ts} +4 -4
  46. package/dist/{counterfactual--bpysZF0.d.ts.map → counterfactual-BaFUWK3H.d.ts.map} +1 -1
  47. package/dist/{counterfactual-lDfCx0Uz.js → counterfactual-D_VWavVm.js} +2 -2
  48. package/dist/{counterfactual-lDfCx0Uz.js.map → counterfactual-D_VWavVm.js.map} +1 -1
  49. package/dist/{dataset-CJjKqQfA.d.ts → dataset-DQqhOCPt.d.ts} +5 -4
  50. package/dist/{dataset-CJjKqQfA.d.ts.map → dataset-DQqhOCPt.d.ts.map} +1 -1
  51. package/dist/{default-registry-Cw0Ohdoj.d.ts → default-registry-G9CKMNkc.d.ts} +7 -8
  52. package/dist/{default-registry-Cw0Ohdoj.d.ts.map → default-registry-G9CKMNkc.d.ts.map} +1 -1
  53. package/dist/{define-agent-eval-CEQWL9Hy.d.ts → define-agent-eval-Dx1JnPEa.d.ts} +26 -6
  54. package/dist/define-agent-eval-Dx1JnPEa.d.ts.map +1 -0
  55. package/dist/{define-agent-eval-rqNyVhVV.js → define-agent-eval-h-s-sI-v.js} +17 -11
  56. package/dist/define-agent-eval-h-s-sI-v.js.map +1 -0
  57. package/dist/{descriptive-B5MwKfbf.js → descriptive-jDOuI6mz.js} +22 -2
  58. package/dist/descriptive-jDOuI6mz.js.map +1 -0
  59. package/dist/{dspy-rlm-engine-DHI0WrUU.js → dspy-rlm-engine-DptEII26.js} +95 -15
  60. package/dist/dspy-rlm-engine-DptEII26.js.map +1 -0
  61. package/dist/{emitter-CPBAhxum.js → emitter-BpYFQPj4.js} +2 -18
  62. package/dist/emitter-BpYFQPj4.js.map +1 -0
  63. package/dist/{emitter-DGQGoLyj.d.ts → emitter-D_jYSGRd.d.ts} +4 -20
  64. package/dist/{emitter-DGQGoLyj.d.ts.map → emitter-D_jYSGRd.d.ts.map} +1 -1
  65. package/dist/{engine-BLzhNzoY.d.ts → engine-Cu5qD5Fc.d.ts} +9 -11
  66. package/dist/{engine-BLzhNzoY.d.ts.map → engine-Cu5qD5Fc.d.ts.map} +1 -1
  67. package/dist/{eval-campaign-C4jmuM-b.js → eval-campaign-BsXWL2-2.js} +17 -28
  68. package/dist/eval-campaign-BsXWL2-2.js.map +1 -0
  69. package/dist/{exact-types-ccQAyut1.d.ts → exact-types-qnexxJ1Z.d.ts} +2 -2
  70. package/dist/{exact-types-ccQAyut1.d.ts.map → exact-types-qnexxJ1Z.d.ts.map} +1 -1
  71. package/dist/{exec-y-DCLqK7.js → exec-D9WpA2p-.js} +2 -2
  72. package/dist/exec-D9WpA2p-.js.map +1 -0
  73. package/dist/experiment/index.d.ts +45 -11
  74. package/dist/experiment/index.d.ts.map +1 -1
  75. package/dist/experiment/index.js +30 -11
  76. package/dist/experiment/index.js.map +1 -1
  77. package/dist/{experiment-tracker-0MhuPArU.d.ts → experiment-tracker-DCO6Cz4s.d.ts} +2 -2
  78. package/dist/{experiment-tracker-0MhuPArU.d.ts.map → experiment-tracker-DCO6Cz4s.d.ts.map} +1 -1
  79. package/dist/{exporters-q9iL-2Jf.js → exporters-Df7TgHFv.js} +3 -3
  80. package/dist/exporters-Df7TgHFv.js.map +1 -0
  81. package/dist/{external-optimizer-contracts-DbLsm4Po.d.ts → external-optimizer-contracts-szBJ_1vh.d.ts} +2 -2
  82. package/dist/{external-optimizer-contracts-DbLsm4Po.d.ts.map → external-optimizer-contracts-szBJ_1vh.d.ts.map} +1 -1
  83. package/dist/{external-optimizer-process-Bhmzngf-.js → external-optimizer-process-WosTBChy.js} +4 -4
  84. package/dist/{external-optimizer-process-Bhmzngf-.js.map → external-optimizer-process-WosTBChy.js.map} +1 -1
  85. package/dist/{external-optimizer-subprocess-Dn90UqN2.js → external-optimizer-subprocess-BIWbHpgD.js} +10 -6
  86. package/dist/external-optimizer-subprocess-BIWbHpgD.js.map +1 -0
  87. package/dist/{failure-cluster-BLURuWG4.d.ts → failure-cluster-CXL8NbEw.d.ts} +3 -3
  88. package/dist/{failure-cluster-BLURuWG4.d.ts.map → failure-cluster-CXL8NbEw.d.ts.map} +1 -1
  89. package/dist/{feedback-trajectory-DpTTjo0q.d.ts → feedback-trajectory-B3ZHaHV_.d.ts} +7 -7
  90. package/dist/{feedback-trajectory-DpTTjo0q.d.ts.map → feedback-trajectory-B3ZHaHV_.d.ts.map} +1 -1
  91. package/dist/fuzz.js +1 -1
  92. package/dist/{hf-dataset-XggBupCr.js → hf-dataset-D8_RNIis.js} +4 -4
  93. package/dist/{hf-dataset-XggBupCr.js.map → hf-dataset-D8_RNIis.js.map} +1 -1
  94. package/dist/hosted/index.d.ts +3 -14
  95. package/dist/hosted/index.d.ts.map +1 -1
  96. package/dist/hosted/index.js +2 -2
  97. package/dist/{index-CTKpu9ry.d.ts → index-CGtH1piv.d.ts} +48 -26
  98. package/dist/index-CGtH1piv.d.ts.map +1 -0
  99. package/dist/{index-BNPtkBPf.d.ts → index-D-IiQIBB.d.ts} +5 -10
  100. package/dist/index-D-IiQIBB.d.ts.map +1 -0
  101. package/dist/{index-IQccV3Ou.d.ts → index-D-V8gCs_.d.ts} +13 -90
  102. package/dist/index-D-V8gCs_.d.ts.map +1 -0
  103. package/dist/{index-B8Ui1mr1.d.ts → index-lfaSeKSD.d.ts} +18 -2
  104. package/dist/index-lfaSeKSD.d.ts.map +1 -0
  105. package/dist/index-vrJugRal.d.ts +1 -0
  106. package/dist/index.d.ts +68 -125
  107. package/dist/index.d.ts.map +1 -1
  108. package/dist/index.js +61 -112
  109. package/dist/index.js.map +1 -1
  110. package/dist/{insight-report-BeT8KCgI.d.ts → insight-report-DRe8LB6d.d.ts} +4 -4
  111. package/dist/{insight-report-BeT8KCgI.d.ts.map → insight-report-DRe8LB6d.d.ts.map} +1 -1
  112. package/dist/{integrity-DysDBWDu.js → integrity-CyWSSoQS.js} +17 -4
  113. package/dist/integrity-CyWSSoQS.js.map +1 -0
  114. package/dist/{integrity-B0dZ96EO.d.ts → integrity-DUNX9Fao.d.ts} +3 -3
  115. package/dist/{integrity-B0dZ96EO.d.ts.map → integrity-DUNX9Fao.d.ts.map} +1 -1
  116. package/dist/{judge-calibration-DZkWrm5H.js → judge-calibration-zZjLz8hr.js} +2 -2
  117. package/dist/{judge-calibration-DZkWrm5H.js.map → judge-calibration-zZjLz8hr.js.map} +1 -1
  118. package/dist/{kind-factory-DmAa0h3K.js → kind-factory-DY8FdoXf.js} +3 -71
  119. package/dist/kind-factory-DY8FdoXf.js.map +1 -0
  120. package/dist/ledger-core/index.d.ts +2 -2
  121. package/dist/ledger-core/index.js +3 -3
  122. package/dist/{ledger-core-DTae9rv_.js → ledger-core-BOzlRygb.js} +2 -2
  123. package/dist/{ledger-core-DTae9rv_.js.map → ledger-core-BOzlRygb.js.map} +1 -1
  124. package/dist/{llm-client-Bg32RW0j.js → llm-client-hgDieDNN.js} +53 -98
  125. package/dist/llm-client-hgDieDNN.js.map +1 -0
  126. package/dist/{llm-judge-CVq33oz1.js → llm-judge-BhasIPFT.js} +1136 -78
  127. package/dist/llm-judge-BhasIPFT.js.map +1 -0
  128. package/dist/{matrix-DrVnRp4G.d.ts → matrix-eXKRMHnL.d.ts} +74 -72
  129. package/dist/matrix-eXKRMHnL.d.ts.map +1 -0
  130. package/dist/meta-eval/index.d.ts +8 -6
  131. package/dist/meta-eval/index.d.ts.map +1 -1
  132. package/dist/meta-eval/index.js +9 -7
  133. package/dist/meta-eval/index.js.map +1 -1
  134. package/dist/{mint-BV6tLVWl.js → mint-DfODW1KW.js} +3 -3
  135. package/dist/{mint-BV6tLVWl.js.map → mint-DfODW1KW.js.map} +1 -1
  136. package/dist/multishot/golden/index.d.ts +2 -8
  137. package/dist/multishot/golden/index.d.ts.map +1 -1
  138. package/dist/multishot/golden/index.js +56 -86
  139. package/dist/multishot/golden/index.js.map +1 -1
  140. package/dist/multishot/index.d.ts +11 -46
  141. package/dist/multishot/index.d.ts.map +1 -1
  142. package/dist/multishot/index.js +30 -83
  143. package/dist/multishot/index.js.map +1 -1
  144. package/dist/openapi.json +1 -1
  145. package/dist/{opencode-sqlite-DJWAXLms.js → opencode-sqlite-eK6HW6dr.js} +2 -6
  146. package/dist/{opencode-sqlite-DJWAXLms.js.map → opencode-sqlite-eK6HW6dr.js.map} +1 -1
  147. package/dist/pipelines/index.d.ts +5 -5
  148. package/dist/pipelines/index.js +3 -3
  149. package/dist/{pre-registration-zFSLEiFU.d.ts → pre-registration-CzFCcwYk.d.ts} +55 -40
  150. package/dist/pre-registration-CzFCcwYk.d.ts.map +1 -0
  151. package/dist/pre-registration-KN9jkh58.js +110 -0
  152. package/dist/pre-registration-KN9jkh58.js.map +1 -0
  153. package/dist/{produced-state-jfk8Du3b.js → produced-state-DZ89riy5.js} +8 -8
  154. package/dist/produced-state-DZ89riy5.js.map +1 -0
  155. package/dist/profile-cell.d.ts +1 -1
  156. package/dist/profile-cell.js +31 -5
  157. package/dist/profile-cell.js.map +1 -1
  158. package/dist/{promotion-policy-DLOUkYhI.d.ts → promotion-policy-DtnOIZvk.d.ts} +2 -2
  159. package/dist/{promotion-policy-DLOUkYhI.d.ts.map → promotion-policy-DtnOIZvk.d.ts.map} +1 -1
  160. package/dist/{query-Di7eEQ79.js → query-CHmMP42p.js} +20 -11
  161. package/dist/query-CHmMP42p.js.map +1 -0
  162. package/dist/{query-CJ_DX8vl.d.ts → query-DxPYqpmT.d.ts} +10 -4
  163. package/dist/query-DxPYqpmT.d.ts.map +1 -0
  164. package/dist/raw-provider-sink-BU29Sh8h.d.ts +134 -0
  165. package/dist/raw-provider-sink-BU29Sh8h.d.ts.map +1 -0
  166. package/dist/{registry-BQwrSYpC.d.ts → registry-8You7OK1.d.ts} +5 -7
  167. package/dist/{registry-BQwrSYpC.d.ts.map → registry-8You7OK1.d.ts.map} +1 -1
  168. package/dist/{release-confidence-BknrpBnO.js → release-confidence-DKfD2RYU.js} +28 -14
  169. package/dist/release-confidence-DKfD2RYU.js.map +1 -0
  170. package/dist/{release-confidence-4XrqlpFD.d.ts → release-confidence-Dqt0NFep.d.ts} +7 -6
  171. package/dist/release-confidence-Dqt0NFep.d.ts.map +1 -0
  172. package/dist/reporting.d.ts +3 -3
  173. package/dist/reporting.js +3 -3
  174. package/dist/{researcher-DJnoUE8c.d.ts → researcher-Cz565b7D.d.ts} +34 -21
  175. package/dist/researcher-Cz565b7D.d.ts.map +1 -0
  176. package/dist/{reward-hacking-62tojkQd.d.ts → reward-hacking-MBf7qpSB.d.ts} +2 -2
  177. package/dist/{reward-hacking-62tojkQd.d.ts.map → reward-hacking-MBf7qpSB.d.ts.map} +1 -1
  178. package/dist/{reward-hacking-DKI9T52l.js → reward-hacking-t4lB1yt8.js} +3 -3
  179. package/dist/{reward-hacking-DKI9T52l.js.map → reward-hacking-t4lB1yt8.js.map} +1 -1
  180. package/dist/rl.d.ts +11 -42
  181. package/dist/rl.d.ts.map +1 -1
  182. package/dist/rl.js +41 -24
  183. package/dist/rl.js.map +1 -1
  184. package/dist/rollout/index.d.ts +3 -3
  185. package/dist/rollout/index.js +7 -7
  186. package/dist/{rollout-ytVQ7WT8.js → rollout-Dm2tSdiQ.js} +6 -6
  187. package/dist/{rollout-ytVQ7WT8.js.map → rollout-Dm2tSdiQ.js.map} +1 -1
  188. package/dist/{rubric-predictive-validity-Cwwyd7ah.js → rubric-predictive-validity-CK8SCOg-.js} +6 -16
  189. package/dist/rubric-predictive-validity-CK8SCOg-.js.map +1 -0
  190. package/dist/{rubric-predictive-validity-C7LnNvF2.d.ts → rubric-predictive-validity-CxycqzX5.d.ts} +4 -3
  191. package/dist/rubric-predictive-validity-CxycqzX5.d.ts.map +1 -0
  192. package/dist/{run-record-D2lDdSAz.js → run-record-BC0ebuRP.js} +2 -2
  193. package/dist/{run-record-D2lDdSAz.js.map → run-record-BC0ebuRP.js.map} +1 -1
  194. package/dist/{run-record-DVV82Gwh.d.ts → run-record-VVy4T9OW.d.ts} +3 -3
  195. package/dist/{run-record-DVV82Gwh.d.ts.map → run-record-VVy4T9OW.d.ts.map} +1 -1
  196. package/dist/{schema-BtVldJ3T.d.ts → schema-Bjgdsn73.d.ts} +2 -4
  197. package/dist/{schema-BtVldJ3T.d.ts.map → schema-Bjgdsn73.d.ts.map} +1 -1
  198. package/dist/{schema-Cef2cFmb.d.ts → schema-BzWDXhOR.d.ts} +2 -5
  199. package/dist/schema-BzWDXhOR.d.ts.map +1 -0
  200. package/dist/{schema-C6DW4ZHR.js → schema-C1aaAxTf.js} +2 -2
  201. package/dist/schema-C1aaAxTf.js.map +1 -0
  202. package/dist/{schema-CRhEY1SO.js → schema-k6ZBftVv.js} +2 -8
  203. package/dist/{schema-CRhEY1SO.js.map → schema-k6ZBftVv.js.map} +1 -1
  204. package/dist/{semantic-concept-judge-laMCnTLn.js → semantic-concept-judge-BSkKKHeq.js} +14 -38
  205. package/dist/semantic-concept-judge-BSkKKHeq.js.map +1 -0
  206. package/dist/{sequential-eprocess-CbUt2htw.js → sequential-eprocess-D1jKoihe.js} +49 -2
  207. package/dist/sequential-eprocess-D1jKoihe.js.map +1 -0
  208. package/dist/{sequential-C458DXNf.js → sequential-rYW-Ophm.js} +41 -16
  209. package/dist/sequential-rYW-Ophm.js.map +1 -0
  210. package/dist/{series-convergence-BxKEgBwA.d.ts → series-convergence-D9WgpXGi.d.ts} +2 -2
  211. package/dist/{series-convergence-BxKEgBwA.d.ts.map → series-convergence-D9WgpXGi.d.ts.map} +1 -1
  212. package/dist/{server-dIWwF3j_.js → server-BtFd4uzB.js} +19 -42
  213. package/dist/server-BtFd4uzB.js.map +1 -0
  214. package/dist/{skillopt-optimization-method-DLeUcK-K.js → skillopt-optimization-method-DbaekMcn.js} +794 -8
  215. package/dist/skillopt-optimization-method-DbaekMcn.js.map +1 -0
  216. package/dist/{skillopt-optimization-method-BDD_o1xE.d.ts → skillopt-optimization-method-x7TTF23P.d.ts} +20 -7
  217. package/dist/{skillopt-optimization-method-BDD_o1xE.d.ts.map → skillopt-optimization-method-x7TTF23P.d.ts.map} +1 -1
  218. package/dist/{statistical-heldout-_woZ9q9j.d.ts → statistical-heldout-Cy3EhjlC.d.ts} +21 -8
  219. package/dist/statistical-heldout-Cy3EhjlC.d.ts.map +1 -0
  220. package/dist/{steps-AmkT-GIM.d.ts → steps-CiNVJry_.d.ts} +2 -17
  221. package/dist/steps-CiNVJry_.d.ts.map +1 -0
  222. package/dist/{store-CT9YIIve.d.ts → store-B06JdC56.d.ts} +2 -2
  223. package/dist/{store-CT9YIIve.d.ts.map → store-B06JdC56.d.ts.map} +1 -1
  224. package/dist/{store-otlp-CDYWW_8N.js → store-otlp-C_Rq5I4D.js} +2 -2
  225. package/dist/{store-otlp-CDYWW_8N.js.map → store-otlp-C_Rq5I4D.js.map} +1 -1
  226. package/dist/{store-tool-spans-Br2_IUhm.d.ts → store-tool-spans-DPUG7UUY.d.ts} +6 -6
  227. package/dist/{store-tool-spans-Br2_IUhm.d.ts.map → store-tool-spans-DPUG7UUY.d.ts.map} +1 -1
  228. package/dist/{store-tool-spans-CykkbOlv.js → store-tool-spans-Dlh9vkFK.js} +3 -3
  229. package/dist/{store-tool-spans-CykkbOlv.js.map → store-tool-spans-Dlh9vkFK.js.map} +1 -1
  230. package/dist/storyboard/index.d.ts +1 -1
  231. package/dist/{summary-report-Blysd6Z2.js → summary-report-BI5hUtvK.js} +7 -17
  232. package/dist/summary-report-BI5hUtvK.js.map +1 -0
  233. package/dist/{summary-report-B__Y5ub3.d.ts → summary-report-CC07PhEL.d.ts} +6 -5
  234. package/dist/summary-report-CC07PhEL.d.ts.map +1 -0
  235. package/dist/supervisor-run/index.d.ts +27 -18
  236. package/dist/supervisor-run/index.d.ts.map +1 -1
  237. package/dist/supervisor-run/index.js +104 -26
  238. package/dist/supervisor-run/index.js.map +1 -1
  239. package/dist/{task-failure-attributes--ZTP3tYO.js → task-failure-attributes-DTl-7-Kw.js} +3 -3
  240. package/dist/{task-failure-attributes--ZTP3tYO.js.map → task-failure-attributes-DTl-7-Kw.js.map} +1 -1
  241. package/dist/{tool-groups-B4tqh8jB.d.ts → tool-groups-Ci8i9ErB.d.ts} +3 -3
  242. package/dist/tool-groups-Ci8i9ErB.d.ts.map +1 -0
  243. package/dist/{tool-waste-BDdBZG1F.js → tool-waste-BqzmVdJk.js} +4 -4
  244. package/dist/{tool-waste-BDdBZG1F.js.map → tool-waste-BqzmVdJk.js.map} +1 -1
  245. package/dist/{tool-waste-DjRDEsuI.d.ts → tool-waste-Dro0gJi3.d.ts} +4 -4
  246. package/dist/{tool-waste-DjRDEsuI.d.ts.map → tool-waste-Dro0gJi3.d.ts.map} +1 -1
  247. package/dist/trace-repair/index.d.ts +4 -77
  248. package/dist/trace-repair/index.d.ts.map +1 -1
  249. package/dist/trace-repair/index.js +5 -15
  250. package/dist/trace-repair/index.js.map +1 -1
  251. package/dist/traces.d.ts +13 -23
  252. package/dist/traces.d.ts.map +1 -1
  253. package/dist/traces.js +9 -20
  254. package/dist/traces.js.map +1 -1
  255. package/dist/{trajectory-YC15QDYQ.d.ts → trajectory-Bi157Gun.d.ts} +3 -3
  256. package/dist/{trajectory-YC15QDYQ.d.ts.map → trajectory-Bi157Gun.d.ts.map} +1 -1
  257. package/dist/trajectory-replay/index.d.ts +5 -5
  258. package/dist/trajectory-replay/index.js +5 -5
  259. package/dist/{provenance-oA4-zUqm.d.ts → transient-failure-DKF5Mofa.d.ts} +468 -13
  260. package/dist/transient-failure-DKF5Mofa.d.ts.map +1 -0
  261. package/dist/types-B3jzCp0p.js.map +1 -1
  262. package/dist/{types-CLAwnY-L.d.ts → types-BPb2Kf_C2.d.ts} +3 -3
  263. package/dist/types-BPb2Kf_C2.d.ts.map +1 -0
  264. package/dist/types-Bfk0uxRj.d.ts +443 -0
  265. package/dist/types-Bfk0uxRj.d.ts.map +1 -0
  266. package/dist/{types-DdFNuyxQ.d.ts → types-D4s7Z6nq.d.ts} +30 -6
  267. package/dist/types-D4s7Z6nq.d.ts.map +1 -0
  268. package/dist/{types-B2NsbrNy.d.ts → types-D9ssmxKL.d.ts} +3 -3
  269. package/dist/{types-B2NsbrNy.d.ts.map → types-D9ssmxKL.d.ts.map} +1 -1
  270. package/dist/{types-yLK8gXE9.d.ts → types-DeIUdzNd.d.ts} +160 -10
  271. package/dist/types-DeIUdzNd.d.ts.map +1 -0
  272. package/dist/{verdict-BndeTAh_.js → verdict-B0xltqu6.js} +2 -2
  273. package/dist/{verdict-BndeTAh_.js.map → verdict-B0xltqu6.js.map} +1 -1
  274. package/dist/verdict-cache-CdVVTVmn.js +88 -0
  275. package/dist/verdict-cache-CdVVTVmn.js.map +1 -0
  276. package/dist/wire/index.d.ts +21 -111
  277. package/dist/wire/index.d.ts.map +1 -1
  278. package/dist/wire/index.js +2 -2
  279. package/docs/adapters-observability.md +9 -23
  280. package/docs/building-doctrine.md +3 -3
  281. package/docs/campaign-proposers.md +54 -15
  282. package/docs/concepts.md +3 -4
  283. package/docs/design/statistics-decisions.md +89 -1
  284. package/docs/eval-surface-map.md +14 -0
  285. package/docs/experiment.md +19 -2
  286. package/docs/feedback-trajectories.md +1 -1
  287. package/docs/multishot-golden-records.md +4 -4
  288. package/docs/public-api.md +1616 -0
  289. package/docs/research-report-methodology.md +1 -1
  290. package/docs/search-history-receipts.md +39 -1
  291. package/docs/trace-analysis.md +1 -1
  292. package/docs/trace-repair-admission.md +1 -1
  293. package/docs/trace-repair-continuation.md +1 -1
  294. package/docs/verdicts.md +24 -0
  295. package/docs/wire-protocol.md +1 -1
  296. package/package.json +6 -2
  297. package/dist/active-curriculum-C4mk67HP.js.map +0 -1
  298. package/dist/agent-profile-cell-BkcRDikH.d.ts.map +0 -1
  299. package/dist/backend-integrity-DOCa_QrR.d.ts.map +0 -1
  300. package/dist/benchmark-command-CAFwbH0L.js.map +0 -1
  301. package/dist/campaign-CN_7xJdV.js.map +0 -1
  302. package/dist/canonical-D-XsTQ6_.js.map +0 -1
  303. package/dist/client-LIuo-KPv.js.map +0 -1
  304. package/dist/define-agent-eval-CEQWL9Hy.d.ts.map +0 -1
  305. package/dist/define-agent-eval-rqNyVhVV.js.map +0 -1
  306. package/dist/descriptive-B5MwKfbf.js.map +0 -1
  307. package/dist/dspy-rlm-engine-DHI0WrUU.js.map +0 -1
  308. package/dist/emitter-CPBAhxum.js.map +0 -1
  309. package/dist/eval-campaign-C4jmuM-b.js.map +0 -1
  310. package/dist/exec-y-DCLqK7.js.map +0 -1
  311. package/dist/exporters-q9iL-2Jf.js.map +0 -1
  312. package/dist/external-optimizer-subprocess-Dn90UqN2.js.map +0 -1
  313. package/dist/index-B8Ui1mr1.d.ts.map +0 -1
  314. package/dist/index-BNPtkBPf.d.ts.map +0 -1
  315. package/dist/index-C1ravkGA.d.ts +0 -1
  316. package/dist/index-CTKpu9ry.d.ts.map +0 -1
  317. package/dist/index-IQccV3Ou.d.ts.map +0 -1
  318. package/dist/integrity-DysDBWDu.js.map +0 -1
  319. package/dist/kind-factory-DmAa0h3K.js.map +0 -1
  320. package/dist/llm-client-Bg32RW0j.js.map +0 -1
  321. package/dist/llm-judge-CVq33oz1.js.map +0 -1
  322. package/dist/matrix-DrVnRp4G.d.ts.map +0 -1
  323. package/dist/pre-registration-DakwTRXk.js +0 -96
  324. package/dist/pre-registration-DakwTRXk.js.map +0 -1
  325. package/dist/pre-registration-zFSLEiFU.d.ts.map +0 -1
  326. package/dist/produced-state-jfk8Du3b.js.map +0 -1
  327. package/dist/provenance-oA4-zUqm.d.ts.map +0 -1
  328. package/dist/query-CJ_DX8vl.d.ts.map +0 -1
  329. package/dist/query-Di7eEQ79.js.map +0 -1
  330. package/dist/release-confidence-4XrqlpFD.d.ts.map +0 -1
  331. package/dist/release-confidence-BknrpBnO.js.map +0 -1
  332. package/dist/researcher-DJnoUE8c.d.ts.map +0 -1
  333. package/dist/rubric-predictive-validity-C7LnNvF2.d.ts.map +0 -1
  334. package/dist/rubric-predictive-validity-Cwwyd7ah.js.map +0 -1
  335. package/dist/schema-C6DW4ZHR.js.map +0 -1
  336. package/dist/schema-Cef2cFmb.d.ts.map +0 -1
  337. package/dist/semantic-concept-judge-laMCnTLn.js.map +0 -1
  338. package/dist/sequential-C458DXNf.js.map +0 -1
  339. package/dist/sequential-eprocess-CbUt2htw.js.map +0 -1
  340. package/dist/server-dIWwF3j_.js.map +0 -1
  341. package/dist/skillopt-optimization-method-DLeUcK-K.js.map +0 -1
  342. package/dist/statistical-heldout-_woZ9q9j.d.ts.map +0 -1
  343. package/dist/steps-AmkT-GIM.d.ts.map +0 -1
  344. package/dist/summary-report-B__Y5ub3.d.ts.map +0 -1
  345. package/dist/summary-report-Blysd6Z2.js.map +0 -1
  346. package/dist/tool-groups-B4tqh8jB.d.ts.map +0 -1
  347. package/dist/types-CLAwnY-L.d.ts.map +0 -1
  348. package/dist/types-DdFNuyxQ.d.ts.map +0 -1
  349. package/dist/types-jUBXJ7Iz.d.ts +0 -884
  350. package/dist/types-jUBXJ7Iz.d.ts.map +0 -1
  351. package/dist/types-yLK8gXE9.d.ts.map +0 -1
  352. package/dist/verdict-cache-mZf5FEiY.js +0 -107
  353. package/dist/verdict-cache-mZf5FEiY.js.map +0 -1
@@ -0,0 +1 @@
1
+ {"version":3,"file":"transient-failure-DKF5Mofa.d.ts","names":[],"sources":["../src/judge-families.ts","../src/integrity/served-model.ts","../src/llm-judge.ts","../src/campaign/auto-pr.ts","../src/campaign/storage.ts","../src/campaign/plan-campaign-run.ts","../src/campaign/run-campaign.ts","../src/campaign/cell-schedule.ts","../src/campaign/cell-cache.ts","../src/campaign/external-optimizer-observations.ts","../src/campaign/gepa-candidate-population.ts","../src/campaign/search-ledger.ts","../src/campaign/search-history-receipt.ts","../src/campaign/presets/compare-optimization-methods.ts","../src/canary.ts","../src/red-team.ts","../src/campaign/search-ledger-recording.ts","../src/campaign/parent-selection.ts","../src/campaign/presets/run-eval.ts","../src/campaign/presets/run-optimization.ts","../src/campaign/presets/run-improvement-loop.ts","../src/campaign/provenance.ts","../src/campaign/transient-failure.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;KAWY;;;;;;;iBAkEI,YAAY,kBAAkB;UAc7B;;EAEf;;;;EAIA;;cAGW,yBAAyB;WAGlB,UAAU;WACV;EAHlB,YACE,iBACgB,UAAU,eACV;;;;;;;;;;;;;;;iBAoBJ,kBACd,kBACA,OAAM,2BACL;;;;KCnFS;;;;;;;;;;;UAYK;;EAEf;;EAEA;EACA,iBAAiB;;EAEjB,cAAc;EACd,SAAS;;EAET;;;;;;;;;;;;iBA4Cc,iBACd,mBACA,oCACC;cA4CU,+BAA+B;WAGxB,QAAQ,cAAc;EAFxC,YACE,iBACgB,QAAQ,cAAc;;;;;;;;;KAc9B;UAWK;;;;;;EAMf;;;;;EAKA;;EAEA;;;;;;;iBAQc,sBACd,OAAO,kBACP,OAAM;;;;;;iBA6BQ,kBACd,mBACA,mCACA,OAAM,2BACL;;;;;iBAea,mBACd,OAAO;EAAgB;EAAmB;IAC1C,OAAM,2BACL;UAec,uCAAuC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":["../src/multishot/types.ts"],"sourcesContent":["// Public types for the multishot substrate.\n\nimport type { CostProvenance } from '../cost-ledger'\n\nexport interface MultishotMessage {\n role: 'user' | 'assistant' | 'tool'\n content: string\n toolCallId?: string\n toolCalls?: Array<{ id: string; name: string; args: Record<string, unknown> }>\n}\n\nexport interface MultishotArtifact {\n type: string\n turn: number\n invocation: { name: string; args: Record<string, unknown> }\n content: string\n}\n\nexport interface MultishotResult {\n transcript: MultishotMessage[]\n artifacts: MultishotArtifact[]\n toolCalls: number\n durationMs: number\n /** Known spend. A subtotal, not a total, when `costProvenance.kind` is\n * `uncaptured`. */\n costUsd: number\n /** Origin of `costUsd`. A shot that priced every call reports `estimated`\n * or `observed`; a shot with a call the router priced at nothing reports\n * `uncaptured`, and the matrix records the cell as under-counted instead of\n * presenting the subtotal as a complete estimate.\n *\n * Optional so an engine written before this field keeps working; the matrix\n * then judges the cell on judge receipts alone, as it did before. */\n costProvenance?: CostProvenance\n}\n\nexport interface MultishotToolDefinition {\n type: 'function'\n function: {\n name: string\n description: string\n parameters: Record<string, unknown>\n }\n}\n\n/** One chat-completion request the multishot loop issues for a single agent\n * (or driver) inference step. Mirrors the OpenAI-compat body the loop would\n * otherwise POST to the Tangle router. */\nexport interface MultishotTransportRequest {\n model: string\n messages: Array<Record<string, unknown>>\n tools?: MultishotToolDefinition[]\n temperature?: number\n maxTokens?: number\n signal?: AbortSignal\n}\n\nexport interface MultishotTransportToolCall {\n id: string\n type: 'function'\n function: { name: string; arguments: string }\n}\n\nexport interface MultishotTransportResponse {\n message: { content?: string | null; tool_calls?: MultishotTransportToolCall[] }\n usage?: { prompt_tokens?: number; completion_tokens?: number }\n /** Actual spend for this call. When omitted, the loop meters cost from\n * `usage` via the per-model router estimator (estimateRouterCost). */\n costUsd?: number\n}\n\n/** Execution seam for one leg of the multishot loop. When provided, it\n * replaces the internal router HTTP call for that leg — the loop still owns\n * turn scheduling, tool dispatch, transcript capture, and cost metering.\n * agent-eval has no dependency on agent-runtime; adapt agent-runtime's\n * resolveAgentBackend (or any sandbox/cli-bridge/router client) into this\n * signature product-side. */\nexport type MultishotTransport = (\n req: MultishotTransportRequest,\n) => Promise<MultishotTransportResponse>\n\nexport type MultishotToolExecutor = (\n args: Record<string, unknown>,\n ctx: { apiKey: string; baseUrl: string; signal?: AbortSignal },\n) => Promise<{ content: string; costUsd: number }>\n\nexport interface MultishotPersona {\n /** Stable identifier — used for per-cell artifact paths + matrix axis keys. */\n id: string\n /** Per-domain payload (income/profile/voice/etc.) shaped by the consumer. */\n [k: string]: unknown\n}\n\n/**\n * Persona-shaping callbacks. Both are OPTIONAL: when omitted, the loop derives\n * them from the `AgentProfile` + persona payload (see `defaultShapeFromProfile`)\n * so a pure-profile call — `runMultishot({ profile, persona })` — works with no\n * role-builder functions. Provide callbacks only to override the derived shape.\n */\nexport interface MultishotShape<TPersona extends MultishotPersona> {\n /** Opening user message (turn 0) — the persona's first ask. */\n buildOpener?: (persona: TPersona) => string\n /** System prompt the driver LLM uses to roleplay the persona. Should set\n * voice, goals, constraints, time-pressure, and the \"never go silent\" rule. */\n buildDriverSystemPrompt?: (persona: TPersona) => string\n}\n\nexport class MultishotDriverEmptyError extends Error {\n constructor(public readonly turn: number) {\n super(`multishot: driver returned empty content twice at turn ${turn} — failing loud`)\n this.name = 'MultishotDriverEmptyError'\n }\n}\n\nexport class MultishotFatalToolError extends Error {\n constructor(message: string) {\n super(message)\n this.name = 'MultishotFatalToolError'\n }\n}\n\nexport class MultishotShotResultError extends Error {\n constructor(reason: string) {\n super(`multishot: shot returned an invalid MultishotResult — ${reason}`)\n this.name = 'MultishotShotResultError'\n }\n}\n\nconst MULTISHOT_ROLES = new Set(['user', 'assistant', 'tool'])\n\n/** Contract guard for the value a caller-supplied shot resolves with. The\n * matrix writes per-cell artifacts, builds judge inputs, and meters cost from\n * this value, so a malformed result must stop the cell instead of scoring a\n * degraded one. Two silent degradations this closes: an artifact with no\n * `type` matches neither the code nor the content artifact set, so the cell\n * scores as though the artifact was never produced; a non-finite `costUsd`\n * reaches `summary.totalCostUsd` and makes every cost number NaN.\n *\n * A rejected cell is still billed: the matrix cell reads the shot's own\n * `costUsd` when it is a usable amount and declares that spend on the throw,\n * so money the shot spent before returning a malformed result stays in the\n * cumulative sum the cost ceiling reads. A result whose `costUsd` is itself\n * malformed carries no usable amount, and the cell records as `uncaptured`.\n *\n * Every required field of `MultishotMessage` and `MultishotArtifact` is\n * checked, including `toolCalls` elements and `invocation.args`. Optional\n * fields are checked only when present. */\nexport function assertMultishotShotResult(value: unknown): asserts value is MultishotResult {\n if (typeof value !== 'object' || value === null) {\n throw new MultishotShotResultError(`expected an object, received ${describeValue(value)}`)\n }\n const result = value as Record<string, unknown>\n if (!Array.isArray(result.transcript)) {\n throw new MultishotShotResultError(\n `transcript must be an array, received ${describeValue(result.transcript)}`,\n )\n }\n if (!Array.isArray(result.artifacts)) {\n throw new MultishotShotResultError(\n `artifacts must be an array, received ${describeValue(result.artifacts)}`,\n )\n }\n result.transcript.forEach(assertMessage)\n result.artifacts.forEach(assertArtifact)\n assertFiniteCount(result.toolCalls, 'toolCalls')\n assertFiniteCount(result.durationMs, 'durationMs')\n assertFiniteCount(result.costUsd, 'costUsd')\n if (result.costProvenance !== undefined) assertCostProvenance(result.costProvenance)\n}\n\nfunction assertCostProvenance(value: unknown): void {\n const row = requireRow(value, 'costProvenance')\n if (row.kind !== 'observed' && row.kind !== 'estimated' && row.kind !== 'uncaptured') {\n throw new MultishotShotResultError(\n `costProvenance.kind must be observed, estimated or uncaptured, received ${describeValue(row.kind)}`,\n )\n }\n // The matrix reads the amount from `costUsd`; `usd` only has to agree with\n // the kind, so an uncaptured provenance cannot smuggle in a total.\n if (row.kind === 'uncaptured') {\n if (row.usd !== null) {\n throw new MultishotShotResultError(\n `uncaptured costProvenance.usd must be null, received ${describeValue(row.usd)}`,\n )\n }\n return\n }\n assertFiniteCount(row.usd, 'costProvenance.usd')\n}\n\nfunction assertMessage(value: unknown, index: number): void {\n const row = requireRow(value, `transcript[${index}]`)\n if (typeof row.role !== 'string' || !MULTISHOT_ROLES.has(row.role)) {\n throw new MultishotShotResultError(\n `transcript[${index}].role must be user, assistant or tool, received ${describeValue(row.role)}`,\n )\n }\n assertString(row.content, `transcript[${index}].content`)\n if (row.toolCallId !== undefined) {\n assertString(row.toolCallId, `transcript[${index}].toolCallId`)\n }\n if (row.toolCalls === undefined) return\n if (!Array.isArray(row.toolCalls)) {\n throw new MultishotShotResultError(\n `transcript[${index}].toolCalls must be an array when present, received ${describeValue(row.toolCalls)}`,\n )\n }\n row.toolCalls.forEach((call, callIndex) => {\n const field = `transcript[${index}].toolCalls[${callIndex}]`\n const row = requireRow(call, field)\n assertString(row.id, `${field}.id`)\n assertString(row.name, `${field}.name`)\n requireRow(row.args, `${field}.args`)\n })\n}\n\nfunction assertArtifact(value: unknown, index: number): void {\n const row = requireRow(value, `artifacts[${index}]`)\n assertString(row.type, `artifacts[${index}].type`)\n assertString(row.content, `artifacts[${index}].content`)\n assertFiniteCount(row.turn, `artifacts[${index}].turn`)\n const invocation = requireRow(row.invocation, `artifacts[${index}].invocation`)\n assertString(invocation.name, `artifacts[${index}].invocation.name`)\n requireRow(invocation.args, `artifacts[${index}].invocation.args`)\n}\n\nfunction requireRow(value: unknown, field: string): Record<string, unknown> {\n if (typeof value !== 'object' || value === null || Array.isArray(value)) {\n throw new MultishotShotResultError(\n `${field} must be an object, received ${describeValue(value)}`,\n )\n }\n return value as Record<string, unknown>\n}\n\nfunction assertString(value: unknown, field: string): void {\n if (typeof value !== 'string') {\n throw new MultishotShotResultError(\n `${field} must be a string, received ${describeValue(value)}`,\n )\n }\n}\n\nfunction assertFiniteCount(value: unknown, field: string): void {\n if (typeof value !== 'number' || !Number.isFinite(value) || value < 0) {\n throw new MultishotShotResultError(\n `${field} must be a finite number >= 0, received ${describeValue(value)}`,\n )\n }\n}\n\nfunction describeValue(value: unknown): string {\n if (value === null) return 'null'\n if (Array.isArray(value)) return 'an array'\n if (typeof value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AW,WAAW,MAAM,aAAa,MAAM,kBAAkB;AACnE;AAEA,SAAS,WAAW,OAAgB,OAAwC;CAC1E,IAAI,OAAO,UAAU,YAAY,UAAU,QAAQ,MAAM,QAAQ,KAAK,GACpE,MAAM,IAAI,yBACR,GAAG,MAAM,+BAA+B,cAAc,KAAK,GAC7D;CAEF,OAAO;AACT;AAEA,SAAS,aAAa,OAAgB,OAAqB;CACzD,IAAI,OAAO,UAAU,UACnB,MAAM,IAAI,yBACR,GAAG,MAAM,8BAA8B,cAAc,KAAK,GAC5D;AAEJ;AAEA,SAAS,kBAAkB,OAAgB,OAAqB;CAC9D,IAAI,OAAO,UAAU,YAAY,CAAC,OAAO,SAAS,KAAK,KAAK,QAAQ,GAClE,MAAM,IAAI,yBACR,GAAG,MAAM,0CAA0C,cAAc,KAAK,GACxE;AAEJ;AAEA,SAAS,cAAc,OAAwB;CAC7C,IAAI,UAAU,MAAM,OAAO;CAC3B,IAAI,MAAM,QAAQ,KAAK,GAAG,OAAO;CACjC,IAAI,OAAO,UAAU,UAAU,OAAO;CACtC,OAAO,GAAG,OAAO,MAAM,GAAG,OAAO,KAAK;AACxC"}
1
+ {"version":3,"file":"types-B3jzCp0p.js","names":[],"sources":["../src/multishot/types.ts"],"sourcesContent":["// Public types for the multishot substrate.\n\nimport type { CostProvenance } from '../cost-ledger'\n\nexport interface MultishotMessage {\n role: 'user' | 'assistant' | 'tool'\n content: string\n toolCallId?: string\n toolCalls?: Array<{ id: string; name: string; args: Record<string, unknown> }>\n}\n\nexport interface MultishotArtifact {\n type: string\n turn: number\n invocation: { name: string; args: Record<string, unknown> }\n content: string\n}\n\nexport interface MultishotResult {\n transcript: MultishotMessage[]\n artifacts: MultishotArtifact[]\n toolCalls: number\n durationMs: number\n /** Known spend. A subtotal, not a total, when `costProvenance.kind` is\n * `uncaptured`. */\n costUsd: number\n /** Origin of `costUsd`. A shot that priced every call reports `estimated`\n * or `observed`; a shot with a call the router priced at nothing reports\n * `uncaptured`, and the matrix records the cell as under-counted instead of\n * presenting the subtotal as a complete estimate.\n *\n * Optional so an engine written before this field keeps working; the matrix\n * then judges the cell on judge receipts alone, as it did before. */\n costProvenance?: CostProvenance\n}\n\nexport interface MultishotToolDefinition {\n type: 'function'\n function: {\n name: string\n description: string\n parameters: Record<string, unknown>\n }\n}\n\n/** One chat-completion request the multishot loop issues for a single agent\n * (or driver) inference step. Mirrors the OpenAI-compat body the loop would\n * otherwise POST to the Tangle router. */\nexport interface MultishotTransportRequest {\n model: string\n messages: Array<Record<string, unknown>>\n tools?: MultishotToolDefinition[]\n temperature?: number\n maxTokens?: number\n signal?: AbortSignal\n}\n\nexport interface MultishotTransportToolCall {\n id: string\n type: 'function'\n function: { name: string; arguments: string }\n}\n\nexport interface MultishotTransportResponse {\n message: { content?: string | null; tool_calls?: MultishotTransportToolCall[] }\n usage?: { prompt_tokens?: number; completion_tokens?: number }\n /** Actual spend for this call. When omitted, the loop meters cost from\n * `usage` via the per-model estimator (estimateMultishotCost). */\n costUsd?: number\n /** Model identity the provider reported, when the transport observed one.\n * Omitted means unreported, and the requested model is used for\n * attribution — which is not proof that model answered. */\n model?: string\n}\n\n/** Execution seam for one leg of the multishot loop. The caller owns model\n * execution: agent-eval issues no provider request and holds no credential.\n * The loop still owns turn scheduling, tool dispatch, transcript capture, and\n * cost metering. agent-eval has no dependency on agent-runtime; adapt\n * agent-runtime's `profileChatClient` (or any sandbox, bridge, or router\n * client) into this signature product-side. */\nexport type MultishotTransport = (\n req: MultishotTransportRequest,\n) => Promise<MultishotTransportResponse>\n\nexport type MultishotToolExecutor = (\n args: Record<string, unknown>,\n ctx: {\n /** Caller-owned execution seam for the specialist leg this tool runs. */\n transport: MultishotTransport\n signal?: AbortSignal\n },\n) => Promise<{ content: string; costUsd: number }>\n\nexport interface MultishotPersona {\n /** Stable identifier — used for per-cell artifact paths + matrix axis keys. */\n id: string\n /** Per-domain payload (income/profile/voice/etc.) shaped by the consumer. */\n [k: string]: unknown\n}\n\n/**\n * Persona-shaping callbacks. Both are OPTIONAL: when omitted, the loop derives\n * them from the `AgentProfile` + persona payload (see `defaultShapeFromProfile`)\n * so a pure-profile call — `runMultishot({ profile, persona })` — works with no\n * role-builder functions. Provide callbacks only to override the derived shape.\n */\nexport interface MultishotShape<TPersona extends MultishotPersona> {\n /** Opening user message (turn 0) — the persona's first ask. */\n buildOpener?: (persona: TPersona) => string\n /** System prompt the driver LLM uses to roleplay the persona. Should set\n * voice, goals, constraints, time-pressure, and the \"never go silent\" rule. */\n buildDriverSystemPrompt?: (persona: TPersona) => string\n}\n\nexport class MultishotDriverEmptyError extends Error {\n constructor(public readonly turn: number) {\n super(`multishot: driver returned empty content twice at turn ${turn} — failing loud`)\n this.name = 'MultishotDriverEmptyError'\n }\n}\n\nexport class MultishotFatalToolError extends Error {\n constructor(message: string) {\n super(message)\n this.name = 'MultishotFatalToolError'\n }\n}\n\nexport class MultishotShotResultError extends Error {\n constructor(reason: string) {\n super(`multishot: shot returned an invalid MultishotResult — ${reason}`)\n this.name = 'MultishotShotResultError'\n }\n}\n\nconst MULTISHOT_ROLES = new Set(['user', 'assistant', 'tool'])\n\n/** Contract guard for the value a caller-supplied shot resolves with. The\n * matrix writes per-cell artifacts, builds judge inputs, and meters cost from\n * this value, so a malformed result must stop the cell instead of scoring a\n * degraded one. Two silent degradations this closes: an artifact with no\n * `type` matches neither the code nor the content artifact set, so the cell\n * scores as though the artifact was never produced; a non-finite `costUsd`\n * reaches `summary.totalCostUsd` and makes every cost number NaN.\n *\n * A rejected cell is still billed: the matrix cell reads the shot's own\n * `costUsd` when it is a usable amount and declares that spend on the throw,\n * so money the shot spent before returning a malformed result stays in the\n * cumulative sum the cost ceiling reads. A result whose `costUsd` is itself\n * malformed carries no usable amount, and the cell records as `uncaptured`.\n *\n * Every required field of `MultishotMessage` and `MultishotArtifact` is\n * checked, including `toolCalls` elements and `invocation.args`. Optional\n * fields are checked only when present. */\nexport function assertMultishotShotResult(value: unknown): asserts value is MultishotResult {\n if (typeof value !== 'object' || value === null) {\n throw new MultishotShotResultError(`expected an object, received ${describeValue(value)}`)\n }\n const result = value as Record<string, unknown>\n if (!Array.isArray(result.transcript)) {\n throw new MultishotShotResultError(\n `transcript must be an array, received ${describeValue(result.transcript)}`,\n )\n }\n if (!Array.isArray(result.artifacts)) {\n throw new MultishotShotResultError(\n `artifacts must be an array, received ${describeValue(result.artifacts)}`,\n )\n }\n result.transcript.forEach(assertMessage)\n result.artifacts.forEach(assertArtifact)\n assertFiniteCount(result.toolCalls, 'toolCalls')\n assertFiniteCount(result.durationMs, 'durationMs')\n assertFiniteCount(result.costUsd, 'costUsd')\n if (result.costProvenance !== undefined) assertCostProvenance(result.costProvenance)\n}\n\nfunction assertCostProvenance(value: unknown): void {\n const row = requireRow(value, 'costProvenance')\n if (row.kind !== 'observed' && row.kind !== 'estimated' && row.kind !== 'uncaptured') {\n throw new MultishotShotResultError(\n `costProvenance.kind must be observed, estimated or uncaptured, received ${describeValue(row.kind)}`,\n )\n }\n // The matrix reads the amount from `costUsd`; `usd` only has to agree with\n // the kind, so an uncaptured provenance cannot smuggle in a total.\n if (row.kind === 'uncaptured') {\n if (row.usd !== null) {\n throw new MultishotShotResultError(\n `uncaptured costProvenance.usd must be null, received ${describeValue(row.usd)}`,\n )\n }\n return\n }\n assertFiniteCount(row.usd, 'costProvenance.usd')\n}\n\nfunction assertMessage(value: unknown, index: number): void {\n const row = requireRow(value, `transcript[${index}]`)\n if (typeof row.role !== 'string' || !MULTISHOT_ROLES.has(row.role)) {\n throw new MultishotShotResultError(\n `transcript[${index}].role must be user, assistant or tool, received ${describeValue(row.role)}`,\n )\n }\n assertString(row.content, `transcript[${index}].content`)\n if (row.toolCallId !== undefined) {\n assertString(row.toolCallId, `transcript[${index}].toolCallId`)\n }\n if (row.toolCalls === undefined) return\n if (!Array.isArray(row.toolCalls)) {\n throw new MultishotShotResultError(\n `transcript[${index}].toolCalls must be an array when present, received ${describeValue(row.toolCalls)}`,\n )\n }\n row.toolCalls.forEach((call, callIndex) => {\n const field = `transcript[${index}].toolCalls[${callIndex}]`\n const row = requireRow(call, field)\n assertString(row.id, `${field}.id`)\n assertString(row.name, `${field}.name`)\n requireRow(row.args, `${field}.args`)\n })\n}\n\nfunction assertArtifact(value: unknown, index: number): void {\n const row = requireRow(value, `artifacts[${index}]`)\n assertString(row.type, `artifacts[${index}].type`)\n assertString(row.content, `artifacts[${index}].content`)\n assertFiniteCount(row.turn, `artifacts[${index}].turn`)\n const invocation = requireRow(row.invocation, `artifacts[${index}].invocation`)\n assertString(invocation.name, `artifacts[${index}].invocation.name`)\n requireRow(invocation.args, `artifacts[${index}].invocation.args`)\n}\n\nfunction requireRow(value: unknown, field: string): Record<string, unknown> {\n if (typeof value !== 'object' || value === null || Array.isArray(value)) {\n throw new MultishotShotResultError(\n `${field} must be an object, received ${describeValue(value)}`,\n )\n }\n return value as Record<string, unknown>\n}\n\nfunction assertString(value: unknown, field: string): void {\n if (typeof value !== 'string') {\n throw new MultishotShotResultError(\n `${field} must be a string, received ${describeValue(value)}`,\n )\n }\n}\n\nfunction assertFiniteCount(value: unknown, field: string): void {\n if (typeof value !== 'number' || !Number.isFinite(value) || value < 0) {\n throw new MultishotShotResultError(\n `${field} must be a finite number >= 0, received ${describeValue(value)}`,\n )\n }\n}\n\nfunction describeValue(value: unknown): string {\n if (value === null) return 'null'\n if (Array.isArray(value)) return 'an array'\n if (typeof value === 'object') return 'an object'\n return `${typeof value} ${String(value)}`\n}\n"],"mappings":";AAmHA,IAAa,4BAAb,cAA+C,MAAM;CACvB;CAA5B,YAAY,MAA8B;EACxC,MAAM,0DAA0D,KAAK,gBAAgB;EAD3D,KAAA,OAAA;EAE1B,KAAK,OAAO;CACd;AACF;AAEA,IAAa,0BAAb,cAA6C,MAAM;CACjD,YAAY,SAAiB;EAC3B,MAAM,OAAO;EACb,KAAK,OAAO;CACd;AACF;AAEA,IAAa,2BAAb,cAA8C,MAAM;CAClD,YAAY,QAAgB;EAC1B,MAAM,yDAA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AAkB,OAAgB,OAAqB;CAC9D,IAAI,OAAO,UAAU,YAAY,CAAC,OAAO,SAAS,KAAK,KAAK,QAAQ,GAClE,MAAM,IAAI,yBACR,GAAG,MAAM,0CAA0C,cAAc,KAAK,GACxE;AAEJ;AAEA,SAAS,cAAc,OAAwB;CAC7C,IAAI,UAAU,MAAM,OAAO;CAC3B,IAAI,MAAM,QAAQ,KAAK,GAAG,OAAO;CACjC,IAAI,OAAO,UAAU,UAAU,OAAO;CACtC,OAAO,GAAG,OAAO,MAAM,GAAG,OAAO,KAAK;AACxC"}
@@ -1,5 +1,5 @@
1
- import { s as RunSplitTag } from "./run-record-DVV82Gwh.js";
2
- import { R as Scenario, d as DispatchContext } from "./types-DdFNuyxQ.js";
1
+ import { s as RunSplitTag } from "./run-record-VVy4T9OW.js";
2
+ import { R as Scenario, d as DispatchContext } from "./types-D4s7Z6nq.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-CLAwnY-L.d.ts.map
93
+ //# sourceMappingURL=types-BPb2Kf_C2.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types-BPb2Kf_C2.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"}
@@ -0,0 +1,443 @@
1
+ import { t as AgentEvalError } from "./errors-DEE6u6ot.js";
2
+ import { b as CustomTokenPricing, c as CostLedgerHandle, g as CostReceiptInput, x as MaximumCharge } from "./cost-ledger-DbQdN3nO.js";
3
+ //#region src/llm-client.d.ts
4
+ interface LlmMessage {
5
+ role: 'system' | 'user' | 'assistant' | 'tool';
6
+ /**
7
+ * Either a plain text content string OR a multimodal content array
8
+ * (text + image_url parts) for vision-capable models.
9
+ */
10
+ content: string | Array<{
11
+ type: 'text';
12
+ text: string;
13
+ } | {
14
+ type: 'image_url';
15
+ image_url: {
16
+ url: string;
17
+ detail?: 'auto' | 'low' | 'high';
18
+ };
19
+ }>;
20
+ /** Tool invocations made by an `assistant` message earlier in the turn. */
21
+ toolCalls?: LlmToolCall[];
22
+ /** The invocation a `tool` message answers. Required when role is `tool`. */
23
+ toolCallId?: string;
24
+ }
25
+ type LlmThinkingMode = 'enabled' | 'disabled';
26
+ /** Canonical function-tool definition offered to the model. */
27
+ interface LlmToolDefinition {
28
+ type: 'function';
29
+ function: {
30
+ name: string;
31
+ description?: string;
32
+ parameters: Record<string, unknown>;
33
+ };
34
+ }
35
+ /** Canonical tool-choice policy; meaningful only when `tools` is present. */
36
+ type LlmToolChoice = 'auto' | 'none' | 'required' | {
37
+ type: 'function';
38
+ function: {
39
+ name: string;
40
+ };
41
+ };
42
+ /** One tool invocation on a response or an assistant history message. */
43
+ interface LlmToolCall {
44
+ id: string;
45
+ name: string;
46
+ /** JSON-encoded arguments, exactly as the provider produced them. */
47
+ argumentsJson: string;
48
+ }
49
+ interface LlmCallRequest {
50
+ model: string;
51
+ messages: LlmMessage[];
52
+ /** Optional JSON-mode response format (response_format: json_object). */
53
+ jsonMode?: boolean;
54
+ /** Optional structured output via JSON Schema. Falls back to json_object on 400. */
55
+ jsonSchema?: {
56
+ name: string;
57
+ schema: Record<string, unknown>;
58
+ };
59
+ /** Function tools offered to the model for this call. */
60
+ tools?: LlmToolDefinition[];
61
+ /** Tool-choice policy for `tools`. */
62
+ toolChoice?: LlmToolChoice;
63
+ temperature?: number;
64
+ maxTokens?: number;
65
+ /** Ask the provider for the log-probability of each sampled token and its
66
+ * `topLogprobs` most likely alternatives. Sends `logprobs: true` with
67
+ * `top_logprobs`. A provider that ignores the field returns
68
+ * `LlmCallResult.logprobs === null`; nothing is inferred from its absence. */
69
+ logprobs?: {
70
+ topLogprobs: number;
71
+ };
72
+ /** OpenAI-compatible reasoning mode. Omitted when the provider default should apply. */
73
+ thinking?: LlmThinkingMode;
74
+ /** Per-call timeout, default 300s. */
75
+ timeoutMs?: number;
76
+ }
77
+ /** Conservative priced bound for the exact text request sent to a provider.
78
+ * Returns undefined when output or multimodal input is not bounded, causing a
79
+ * capped CostLedger to reject the call before execution. Pass
80
+ * `customTokenPricing` when package pricing does not cover the model or endpoint. */
81
+ interface LlmChargeBounds {
82
+ /** Total provider attempts the transport may make for this call. Default 3. */
83
+ maximumAttempts?: number;
84
+ /** The transport sends JSON mode instead of a response schema. */
85
+ jsonSchemaTransport?: 'native' | 'json-object';
86
+ /** Default provider reasoning mode the transport applies. */
87
+ thinking?: LlmThinkingMode;
88
+ /** Token rates used when the provider omits cost or package pricing does not cover the model. */
89
+ customTokenPricing?: CustomTokenPricing;
90
+ }
91
+ declare function maximumChargeForLlmRequest(request: Pick<LlmCallRequest, 'model' | 'messages' | 'jsonSchema' | 'tools' | 'toolChoice' | 'maxTokens' | 'thinking'>, options?: LlmChargeBounds): MaximumCharge | undefined;
92
+ interface LlmUsage {
93
+ promptTokens: number;
94
+ completionTokens: number;
95
+ totalTokens: number;
96
+ /** False when the provider omitted or malformed prompt/completion usage. */
97
+ captured?: boolean;
98
+ /** Reasoning-token subset of completionTokens, when reported. */
99
+ reasoningTokens?: number;
100
+ /** Proxies populate this when prompt caching is on. */
101
+ cachedPromptTokens?: number;
102
+ }
103
+ /** One sampled token with its own log probability and the alternatives the
104
+ * provider ranked at that position. */
105
+ interface LlmTokenLogprob {
106
+ token: string;
107
+ logprob: number;
108
+ top: ReadonlyArray<{
109
+ token: string;
110
+ logprob: number;
111
+ }>;
112
+ }
113
+ interface LlmCallResult {
114
+ /** The text content of the first choice. Empty string if none. */
115
+ content: string;
116
+ /** Tool invocations from the first choice, when the model called tools. */
117
+ toolCalls?: LlmToolCall[];
118
+ usage: LlmUsage;
119
+ /**
120
+ * Cost in USD. Uses the provider's reported cost when present, otherwise
121
+ * caller-supplied token pricing. `null` when neither is available.
122
+ */
123
+ costUsd: number | null;
124
+ /**
125
+ * Model id used for attribution (cost, pricing, log lines). The response's
126
+ * echoed id when the provider sent one, else the requested id.
127
+ *
128
+ * NOT evidence of which model answered — read `servedModel` for that. A
129
+ * provider that omits `model` makes this equal to the request, which is
130
+ * exactly the case an identity check must be able to distinguish.
131
+ */
132
+ model: string;
133
+ /**
134
+ * The model id the provider echoed on the response, verbatim; `null` when
135
+ * the body carried none. This is the only field that can witness a gateway
136
+ * substituting a different model for the one requested — compare it with
137
+ * `assertServedModel` / `checkServedModel` (src/integrity/served-model.ts).
138
+ *
139
+ * Optional so hand-built results (mock/custom transports) still typecheck,
140
+ * but omitting it is not a pass: the identity checks read `undefined` as
141
+ * `unreported` and reject it by default. A transport that knows which model
142
+ * answered should say so.
143
+ */
144
+ servedModel?: string | null;
145
+ /** Wall-clock duration of the HTTP call (last attempt, if retried). */
146
+ durationMs: number;
147
+ /**
148
+ * `finish_reason` echoed from the first choice (`stop`, `length`,
149
+ * `content_filter`, `tool_calls`, ...). `null` when the provider omits it.
150
+ * Exposed so a free-form `callLlm` caller CAN detect a truncated answer
151
+ * (`length`) instead of treating a cut-off completion as complete. Note:
152
+ * `callLlm` does not itself reject on it — acting on this signal is the
153
+ * caller's responsibility (in-repo free-form drivers do not yet enforce it).
154
+ */
155
+ finishReason?: string | null;
156
+ /**
157
+ * True when `content.trim()` is empty. An empty completion is a silent zero
158
+ * for free-form `callLlm` callers; this flag is the signal a caller can
159
+ * inspect to fail loud rather than proceed on an empty string. `callLlm`
160
+ * surfaces it but does not throw on it.
161
+ */
162
+ contentEmpty?: boolean;
163
+ /**
164
+ * Per-token log probabilities for the first choice, in emission order, when
165
+ * the request asked for them and the provider returned
166
+ * `choices[0].logprobs.content`. `null` when the provider returned none, so a
167
+ * caller can tell "not requested or not supported" from "requested and
168
+ * empty". Absent when the request did not ask for logprobs.
169
+ */
170
+ logprobs?: ReadonlyArray<LlmTokenLogprob> | null;
171
+ /** Raw response body. */
172
+ raw: Record<string, unknown>;
173
+ }
174
+ type LlmCallMetadata = Pick<LlmCallResult, 'usage' | 'costUsd' | 'model' | 'durationMs'>;
175
+ /** Convert a provider result into the canonical paid-call receipt input.
176
+ * The receipt is JSON-clean: absent optional fields are omitted, never carried
177
+ * as explicit-undefined keys. Receipts cross JSON boundaries (the external
178
+ * optimizer's loopback proxy validates them with `assertJsonValue`), where an
179
+ * explicit-undefined value is rejected as non-serializable. */
180
+ declare function costReceiptFromLlm(result: LlmCallResult, customTokenPricing?: CustomTokenPricing): CostReceiptInput;
181
+ /** Structured-response failures retain their completed provider receipt. */
182
+ declare function costReceiptFromLlmError(error: Error, customTokenPricing?: CustomTokenPricing): CostReceiptInput | undefined;
183
+ declare class LlmCallError extends AgentEvalError {
184
+ readonly status: number;
185
+ readonly body: string;
186
+ readonly model: string;
187
+ constructor(message: string, status: number, body: string, model: string);
188
+ }
189
+ /** A provider response completed and incurred measurable usage, but its content
190
+ * could not satisfy the caller's response contract. The response envelope is
191
+ * retained so accounting can commit the receipt before the error propagates. */
192
+ declare class LlmResponseError extends AgentEvalError {
193
+ readonly result: LlmCallResult;
194
+ constructor(message: string, result: LlmCallResult, options?: {
195
+ cause?: unknown;
196
+ });
197
+ }
198
+ /**
199
+ * True when an error is a transient transport/network fault worth retrying,
200
+ * as opposed to a deterministic failure (4xx schema reject, JSON parse) that
201
+ * a retry cannot fix. Inspects `LlmCallError.status`, then the error's
202
+ * name/message/code, then recurses into `error.cause` — undici nests the
203
+ * real socket fault one or more levels under `.cause`.
204
+ *
205
+ * This is the retry classifier for the package: `callLlm` and
206
+ * `withJudgeRetry` both route through it, so connection failures are treated
207
+ * consistently across transports.
208
+ */
209
+ declare function isTransientLlmError(err: unknown): boolean;
210
+ /**
211
+ * Strip a ```json / ``` code fence if the model emitted one.
212
+ * Idempotent for naked JSON. Some models (claude-code via router, certain
213
+ * deepseek models) wrap output even under json_object.
214
+ */
215
+ declare function stripFencedJson(raw: string): string;
216
+ //#endregion
217
+ //#region src/analyst/chat-client.d.ts
218
+ /**
219
+ * Unified chat interface using the package's canonical LLM request and result.
220
+ */
221
+ interface ChatClient {
222
+ /** Display name of the bound transport, included in telemetry. */
223
+ readonly transport: ChatTransport;
224
+ /** Default model when the caller omits one. */
225
+ readonly defaultModel?: string;
226
+ /** Total provider attempts this transport can make for one chat call. */
227
+ readonly maximumAttempts?: number;
228
+ /** Implementations must enforce `req.maxTokens` when it is present. */
229
+ chat(req: ChatRequest, opts?: ChatCallOpts): Promise<ChatResponse>;
230
+ }
231
+ type ChatTransport = 'sandbox-sdk' | 'custom' | 'mock';
232
+ interface ChatRequest extends Omit<LlmCallRequest, 'model'> {
233
+ /** Optional — falls back to ChatClient.defaultModel. */
234
+ model?: string;
235
+ }
236
+ type ChatResponse = LlmCallResult;
237
+ interface ChatCallOpts {
238
+ /** Cancel the in-flight request. */
239
+ signal?: AbortSignal;
240
+ /** Hard USD ceiling for this single call (informational; the underlying transport may not enforce). */
241
+ maxCostUsd?: number;
242
+ /** Correlation tag carried into request headers when the transport allows. */
243
+ correlationId?: string;
244
+ /** Stable provider idempotency key for retries/redrives of one paid call. */
245
+ idempotencyKey?: string;
246
+ }
247
+ type CreateChatClientOpts = SandboxSdkTransportOpts | CustomTransportOpts | MockTransportOpts;
248
+ interface BaseTransportOpts {
249
+ defaultModel?: string;
250
+ /** Total provider attempts. Required for opaque transports used in capped runs. */
251
+ maximumAttempts?: number;
252
+ }
253
+ /**
254
+ * Sandbox-SDK transport. The caller supplies a canonical chat function for an
255
+ * already-configured Sandbox handle, so agent-eval does not import the SDK.
256
+ */
257
+ interface SandboxSdkTransportOpts extends BaseTransportOpts {
258
+ transport: 'sandbox-sdk';
259
+ chat: (req: ChatRequest, opts?: ChatCallOpts) => Promise<ChatResponse>;
260
+ }
261
+ /** Caller-adapted SDK or transport returning the canonical ChatResponse shape. */
262
+ interface CustomTransportOpts extends BaseTransportOpts {
263
+ transport: 'custom';
264
+ chat: (req: ChatRequest, opts?: ChatCallOpts) => Promise<ChatResponse>;
265
+ }
266
+ /**
267
+ * Mock transport for tests. The handler receives the request and returns
268
+ * whatever the test wants. No retries, no JSON-schema degrade.
269
+ */
270
+ interface MockTransportOpts extends BaseTransportOpts {
271
+ transport: 'mock';
272
+ handler: (req: ChatRequest, opts?: ChatCallOpts) => Promise<ChatResponse>;
273
+ }
274
+ /**
275
+ * Build a ChatClient bound to a specific transport. The returned client
276
+ * is safe to share across analysts in a single registry run.
277
+ */
278
+ declare function createChatClient(opts: CreateChatClientOpts): ChatClient;
279
+ //#endregion
280
+ //#region src/types.d.ts
281
+ interface Scenario {
282
+ id: string;
283
+ persona: string;
284
+ label: string;
285
+ thesis: string;
286
+ dimensions: string[];
287
+ turns: Turn[];
288
+ artifactChecks: ArtifactCheck[];
289
+ systemPromptAppend?: string;
290
+ }
291
+ interface Turn {
292
+ user: string;
293
+ expectedBehaviors: string[];
294
+ adversarial?: boolean;
295
+ feedbackType?: 'correction' | 'rejection' | 'vague' | 'contradictory' | 'escalation';
296
+ }
297
+ interface ArtifactCheck {
298
+ type: 'vault_file_exists' | 'vault_file_contains' | 'block_extracted' | 'code_valid' | 'generation_produced' | 'tool_created' | string;
299
+ target: string;
300
+ contains?: string;
301
+ minCount?: number;
302
+ description: string;
303
+ }
304
+ interface JudgeRubric {
305
+ name: string;
306
+ description: string;
307
+ dimensions: RubricDimension[];
308
+ }
309
+ interface RubricDimension {
310
+ name: string;
311
+ description: string;
312
+ anchor_low: string;
313
+ anchor_high: string;
314
+ weight: number;
315
+ }
316
+ interface TurnResult {
317
+ turnIndex: number;
318
+ userMessage: string;
319
+ agentResponse: string;
320
+ durationMs: number;
321
+ blocksExtracted: {
322
+ type: string;
323
+ title: string;
324
+ }[];
325
+ containsCode: boolean;
326
+ containsToolCall: boolean;
327
+ }
328
+ interface JudgeScore {
329
+ judgeName: string;
330
+ dimension: string;
331
+ score: number;
332
+ reasoning: string;
333
+ evidence?: string;
334
+ }
335
+ interface CollectedArtifacts {
336
+ vaultFiles: {
337
+ path: string;
338
+ content: string;
339
+ }[];
340
+ blocksExtracted: {
341
+ type: string;
342
+ fields: Record<string, string>;
343
+ }[];
344
+ codeBlocks: {
345
+ language: string;
346
+ code: string;
347
+ }[];
348
+ toolCalls: string[];
349
+ }
350
+ interface RouteMap {
351
+ signup?: string;
352
+ login?: string;
353
+ workspaces?: string;
354
+ threads?: string;
355
+ chat?: string;
356
+ tasks?: string;
357
+ events?: string;
358
+ approvals?: string;
359
+ vault?: string;
360
+ generations?: string;
361
+ [key: string]: string | undefined;
362
+ }
363
+ interface ProductClientConfig {
364
+ baseUrl: string;
365
+ routes: RouteMap;
366
+ /** Per-request timeout in ms before the request is aborted. Default 30s. */
367
+ timeoutMs?: number;
368
+ }
369
+ interface CompletionCriterion {
370
+ name: string;
371
+ check: (state: DriverState) => boolean;
372
+ progress?: (state: DriverState) => number;
373
+ }
374
+ /**
375
+ * How hard the simulated user pushes back. The driver LLM scales its tone
376
+ * and follow-up aggression to this:
377
+ * cooperative — forgiving early adopter; accepts reasonable answers.
378
+ * demanding — experienced professional; rejects vague or hedged answers.
379
+ * relentless — senior partner reviewing for a client who will litigate;
380
+ * interrogates every claim, accepts nothing undefended.
381
+ */
382
+ type PersonaRigor = 'cooperative' | 'demanding' | 'relentless';
383
+ interface PersonaConfig {
384
+ id: string;
385
+ role: string;
386
+ goal: string;
387
+ completionCriteria: CompletionCriterion[];
388
+ maxTurns: number;
389
+ /** How adversarial the simulated user is. Defaults to 'demanding'. */
390
+ rigor?: PersonaRigor;
391
+ /**
392
+ * Domain expertise the simulated user holds — quoted into the driver
393
+ * prompt so it challenges the agent with authority instead of vague
394
+ * dissatisfaction. e.g. "a 15-year M&A partner who knows GAAP
395
+ * working-capital mechanics cold".
396
+ */
397
+ expertise?: string;
398
+ /**
399
+ * Substantive issues a senior professional in this role would
400
+ * interrogate — traps the scenario hides, claims that must be defended.
401
+ * The driver probes these without revealing them verbatim; the agent
402
+ * must surface them on its own.
403
+ */
404
+ pressurePoints?: string[];
405
+ /**
406
+ * Curveballs the driver may inject once the agent is coasting — changed
407
+ * facts, a hostile counterparty position, a new constraint. Forces the
408
+ * agent to re-derive rather than recite.
409
+ */
410
+ curveballs?: string[];
411
+ }
412
+ interface DriverState {
413
+ tasks: number;
414
+ events: number;
415
+ proposals: {
416
+ pending: number;
417
+ approved: number;
418
+ rejected: number;
419
+ };
420
+ vaultFiles: string[];
421
+ codeBlocks: number;
422
+ generations: number;
423
+ }
424
+ interface JudgeInput {
425
+ scenario: Scenario;
426
+ turns: TurnResult[];
427
+ artifacts: CollectedArtifacts;
428
+ /** Shared ledger for paid built-in judges. Direct calls default to an uncapped ledger. */
429
+ costLedger?: CostLedgerHandle;
430
+ costPhase?: string;
431
+ costTags?: Record<string, string>;
432
+ signal?: AbortSignal;
433
+ }
434
+ type JudgeFn = (chat: ChatClient, input: JudgeInput) => Promise<JudgeScore[]>;
435
+ interface CheckResult {
436
+ name: string;
437
+ passed: boolean;
438
+ expected: string;
439
+ actual: string;
440
+ }
441
+ //#endregion
442
+ export { LlmToolCall as A, LlmCallMetadata as C, LlmMessage as D, LlmChargeBounds as E, costReceiptFromLlmError as F, isTransientLlmError as I, maximumChargeForLlmRequest as L, LlmToolDefinition as M, LlmUsage as N, LlmResponseError as O, costReceiptFromLlm as P, stripFencedJson as R, LlmCallError as S, LlmCallResult as T, CreateChatClientOpts as _, JudgeInput as a, SandboxSdkTransportOpts as b, PersonaConfig as c, Scenario as d, ChatCallOpts as f, ChatTransport as g, ChatResponse as h, JudgeFn as i, LlmToolChoice as j, LlmTokenLogprob as k, ProductClientConfig as l, ChatRequest as m, CompletionCriterion as n, JudgeRubric as o, ChatClient as p, DriverState as r, JudgeScore as s, CheckResult as t, RouteMap as u, CustomTransportOpts as v, LlmCallRequest as w, createChatClient as x, MockTransportOpts as y };
443
+ //# sourceMappingURL=types-Bfk0uxRj.d.ts.map
@@ -0,0 +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;E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,MAAM,uBAAuB;;;UClF7C;EACf;EACA;EACA;EACA;EACA;EACA,OAAO;EACP,gBAAgB;EAChB;;UAGe;EACf;EACA;EACA;EACA;;UAKe;EACf;EAQA;EACA;EACA;EACA;;UAKe;EACf;EACA;EACA,YAAY;;UAGG;EACf;EACA;EACA;EACA;EACA;;UAmBe;EACf;EACA;EACA;EACA;EACA;IAAmB;IAAc;;EACjC;EACA;;UASe;EACf;EACA;EACA;EACA;EACA;;UAGe;EACf;IAAc;IAAc;;EAC5B;IAAmB;IAAc,QAAQ;;EACzC;IAAc;IAAkB;;EAChC;;UAKe;EACf;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;GACC;;UAGc;EACf;EACA,QAAQ;;EAER;;UAyBe;EACf;EACA,QAAQ,OAAO;EACf,YAAY,OAAO;;;;;;;;;;KAWT;UAEK;EACf;EACA;EACA;EACA,oBAAoB;EACpB;;EAEA,QAAQ;;;;;;;EAOR;;;;;;;EAOA;;;;;;EAMA;;UAGe;EACf;EACA;EACA;IAAa;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,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-DVV82Gwh.js";
3
- import { E as LlmCallMetadata } from "./types-jUBXJ7Iz.js";
4
- import { _ as ProposalFinding } from "./types-B2NsbrNy.js";
2
+ import { u as RunTokenUsage } from "./run-record-VVy4T9OW.js";
3
+ 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, ...). */
@@ -110,6 +110,20 @@ interface JudgeScore {
110
110
  notes: string;
111
111
  /** Provider metadata for display and diagnostics; accounting uses CostLedger receipts. */
112
112
  llmCall?: LlmCallMetadata;
113
+ /** How the numbers in `dimensions` were produced. `'sampled'` reads the
114
+ * score the model emitted. `'expectation'` reads the model's probability
115
+ * distribution over the score token and returns its expected value, which
116
+ * separates candidates that tie on a sampled grade. Absent for a judge that
117
+ * does not report the distinction. Records what actually produced the
118
+ * score, so a declared method that fell back reads `'sampled'`. */
119
+ scoringMethod?: 'sampled' | 'expectation';
120
+ /** Probability mass over the integer grades the model considered, per
121
+ * dimension, on the judge's native scale. Present only under
122
+ * `scoringMethod: 'expectation'`. */
123
+ distribution?: Record<string, Array<{
124
+ score: number;
125
+ probability: number;
126
+ }>>;
113
127
  /** Set when the judge itself failed (call error, unparseable output).
114
128
  * `composite`/`dimensions` carry no signal — aggregators MUST exclude
115
129
  * failed scores from means instead of folding them into zeros. */
@@ -245,6 +259,8 @@ interface ScoredSurfaceOutcome {
245
259
  /** Search state supplied to one candidate-generation call.
246
260
  * Final evaluation data is not represented in this contract. */
247
261
  interface ProposeContext<TFindings = ProposalFinding> {
262
+ /** The parent surface this proposal mutates: the global incumbent by
263
+ * default, or the frontier parent a `selectParent` policy drew. */
248
264
  readonly currentSurface: MutableSurface;
249
265
  readonly history: ReadonlyArray<GenerationRecord>;
250
266
  readonly findings: ReadonlyArray<TFindings>;
@@ -257,9 +273,13 @@ interface ProposeContext<TFindings = ProposalFinding> {
257
273
  /** Measured baseline for this optimization run. `runOptimization` always
258
274
  * supplies it; optional for standalone proposer callers. */
259
275
  readonly baselineOutcome?: ScoredSurfaceOutcome;
260
- /** Measured result for `currentSurface`, the complete global incumbent every
261
- * new candidate mutates. `runOptimization` always supplies it. */
276
+ /** Measured result for the complete global incumbent, the surface a
277
+ * candidate must beat to promote. `runOptimization` always supplies it. */
262
278
  readonly incumbentOutcome?: ScoredSurfaceOutcome;
279
+ /** Measured result for `currentSurface`, the parent this proposal mutates.
280
+ * Equal to `incumbentOutcome` unless the run draws parents from the Pareto
281
+ * frontier through `selectParent`. `runOptimization` always supplies it. */
282
+ readonly parentOutcome?: ScoredSurfaceOutcome;
263
283
  /** DEPTH: max iterations the agentic generator may take per candidate.
264
284
  * 1 = single-shot; >1 = it may iterate on its own change before handing it
265
285
  * back to be measured. */
@@ -501,6 +521,10 @@ interface CampaignCellResult<TArtifact> {
501
521
  durationMs: number;
502
522
  seed: number;
503
523
  cached: boolean;
524
+ /** Failed attempts dispatched before this result under `cellRetry`.
525
+ * Missing when the first attempt produced this result. Each earlier
526
+ * attempt keeps its own `<cell>/failure-receipt.attempt-<n>.json`. */
527
+ retryAttempts?: number;
504
528
  /** Stage that produced `error`. Missing on successful cells. */
505
529
  errorStage?: 'dispatch' | 'judge';
506
530
  /** Judge that threw when `errorStage` is `judge`. */
@@ -626,4 +650,4 @@ interface CampaignResult<TArtifact = unknown, TScenario extends Scenario = Scena
626
650
  }
627
651
  //#endregion
628
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 };
629
- //# sourceMappingURL=types-DdFNuyxQ.d.ts.map
653
+ //# sourceMappingURL=types-D4s7Z6nq.d.ts.map
@@ -0,0 +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;EAC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