@tangle-network/agent-eval 2.0.9 → 2.0.11

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 (235) hide show
  1. package/CHANGELOG.md +68 -16
  2. package/dist/adapters/http.d.ts +2 -2
  3. package/dist/{agent-profile-ORN4aArD.d.ts → agent-profile-_JzxgLDM.d.ts} +11 -5
  4. package/dist/{agent-profile-ORN4aArD.d.ts.map → agent-profile-_JzxgLDM.d.ts.map} +1 -1
  5. package/dist/analyst/index.d.ts +14 -14
  6. package/dist/analyst/index.js +31 -10
  7. package/dist/analyst/index.js.map +1 -1
  8. package/dist/{analyze-runs-DT693FJ7.d.ts → analyze-runs-Izz_ZeWg.d.ts} +2 -2
  9. package/dist/{analyze-runs-DT693FJ7.d.ts.map → analyze-runs-Izz_ZeWg.d.ts.map} +1 -1
  10. package/dist/{analyze-runs-CE_5VKh2.js → analyze-runs-xhH2Qxoc.js} +5 -5
  11. package/dist/{analyze-runs-CE_5VKh2.js.map → analyze-runs-xhH2Qxoc.js.map} +1 -1
  12. package/dist/app-grade/index.d.ts +4 -4
  13. package/dist/{benchmark-command-DLg8E4y8.js → benchmark-command-CGQXNFj7.js} +8 -7
  14. package/dist/benchmark-command-CGQXNFj7.js.map +1 -0
  15. package/dist/benchmarks/index.d.ts +5 -5
  16. package/dist/benchmarks/index.d.ts.map +1 -1
  17. package/dist/benchmarks/index.js +18 -9
  18. package/dist/benchmarks/index.js.map +1 -1
  19. package/dist/campaign/index.d.ts +7 -7
  20. package/dist/campaign/index.js +11 -11
  21. package/dist/{campaign-C_S3MOYa.js → campaign-eus7YRs2.js} +13 -13
  22. package/dist/{campaign-C_S3MOYa.js.map → campaign-eus7YRs2.js.map} +1 -1
  23. package/dist/{campaign-evidence-CM4FBOkX.d.ts → campaign-evidence-BOcX4w0r.d.ts} +5 -5
  24. package/dist/{campaign-evidence-CM4FBOkX.d.ts.map → campaign-evidence-BOcX4w0r.d.ts.map} +1 -1
  25. package/dist/{campaign-evidence-BTfzZo1u.js → campaign-evidence-KM5GTsHG.js} +3 -3
  26. package/dist/{campaign-evidence-BTfzZo1u.js.map → campaign-evidence-KM5GTsHG.js.map} +1 -1
  27. package/dist/{chat-client-uQNXGuO4.d.ts → chat-client-BlTooBDA.d.ts} +7 -2
  28. package/dist/{chat-client-uQNXGuO4.d.ts.map → chat-client-BlTooBDA.d.ts.map} +1 -1
  29. package/dist/{chat-client-CvyDOQBv.js → chat-client-Oyot5tyo.js} +2 -2
  30. package/dist/{chat-client-CvyDOQBv.js.map → chat-client-Oyot5tyo.js.map} +1 -1
  31. package/dist/{chat-json-call-DMrwmB-k.js → chat-json-call-DTmv2uNY.js} +2 -2
  32. package/dist/{chat-json-call-DMrwmB-k.js.map → chat-json-call-DTmv2uNY.js.map} +1 -1
  33. package/dist/cli.js +7 -7
  34. package/dist/{cluster-C-K0N2br.d.ts → cluster-BJ0nW3P7.d.ts} +2 -2
  35. package/dist/{cluster-C-K0N2br.d.ts.map → cluster-BJ0nW3P7.d.ts.map} +1 -1
  36. package/dist/{cluster-bootstrap-DXbnIdm8.js → cluster-bootstrap-CTC8Dd30.js} +2 -2
  37. package/dist/{cluster-bootstrap-DXbnIdm8.js.map → cluster-bootstrap-CTC8Dd30.js.map} +1 -1
  38. package/dist/{completion-verifier-DsotH2l3.js → completion-verifier-CCPG2Yc0.js} +3 -3
  39. package/dist/{completion-verifier-DsotH2l3.js.map → completion-verifier-CCPG2Yc0.js.map} +1 -1
  40. package/dist/{completion-verifier-C7wipJOK.d.ts → completion-verifier-CQOC3_bm.d.ts} +2 -2
  41. package/dist/{completion-verifier-C7wipJOK.d.ts.map → completion-verifier-CQOC3_bm.d.ts.map} +1 -1
  42. package/dist/contract/index.d.ts +11 -11
  43. package/dist/contract/index.js +12 -12
  44. package/dist/{default-registry-kps1SOaD.js → default-registry-Rs5uzlfJ.js} +3 -3
  45. package/dist/{default-registry-kps1SOaD.js.map → default-registry-Rs5uzlfJ.js.map} +1 -1
  46. package/dist/{default-registry-Bskl2HzV.d.ts → default-registry-X8McMoUV.d.ts} +6 -6
  47. package/dist/{default-registry-Bskl2HzV.d.ts.map → default-registry-X8McMoUV.d.ts.map} +1 -1
  48. package/dist/{define-agent-eval-Dnh4jXLX.js → define-agent-eval-D8ntOXqV.js} +3 -3
  49. package/dist/{define-agent-eval-Dnh4jXLX.js.map → define-agent-eval-D8ntOXqV.js.map} +1 -1
  50. package/dist/{define-agent-eval-tu3anVlk.d.ts → define-agent-eval-DH5-xi-F.d.ts} +4 -4
  51. package/dist/{define-agent-eval-tu3anVlk.d.ts.map → define-agent-eval-DH5-xi-F.d.ts.map} +1 -1
  52. package/dist/diagnosis/index.d.ts +2 -2
  53. package/dist/diagnosis/index.js +1 -1
  54. package/dist/{dspy-rlm-engine-DQbPdT_o.js → dspy-rlm-engine-ChE1PUM5.js} +3 -3
  55. package/dist/{dspy-rlm-engine-DQbPdT_o.js.map → dspy-rlm-engine-ChE1PUM5.js.map} +1 -1
  56. package/dist/{eval-campaign-DswSn7Gm.js → eval-campaign-BciGnrGy.js} +2 -2
  57. package/dist/{eval-campaign-DswSn7Gm.js.map → eval-campaign-BciGnrGy.js.map} +1 -1
  58. package/dist/{evaluation-C4-tf3Z_.d.ts → evaluation-CjZH6gW0.d.ts} +4 -4
  59. package/dist/{evaluation-C4-tf3Z_.d.ts.map → evaluation-CjZH6gW0.d.ts.map} +1 -1
  60. package/dist/evaluation.d.ts +1 -1
  61. package/dist/{exact-types-CUsSMW3n.d.ts → exact-types-BIHqYBYf.d.ts} +2 -2
  62. package/dist/{exact-types-CUsSMW3n.d.ts.map → exact-types-BIHqYBYf.d.ts.map} +1 -1
  63. package/dist/experiment/index.d.ts +5 -5
  64. package/dist/experiment/index.js +8 -8
  65. package/dist/{external-optimizer-contracts-ZDBfbZ_s.js → external-optimizer-contracts-BFV8lnhl.js} +7 -2
  66. package/dist/{external-optimizer-contracts-ZDBfbZ_s.js.map → external-optimizer-contracts-BFV8lnhl.js.map} +1 -1
  67. package/dist/{external-optimizer-process-CVi1x2nb.js → external-optimizer-process-B6emPodQ.js} +3 -3
  68. package/dist/{external-optimizer-process-CVi1x2nb.js.map → external-optimizer-process-B6emPodQ.js.map} +1 -1
  69. package/dist/{external-optimizer-subprocess-mV-2swJI.js → external-optimizer-subprocess-_O06eDVA.js} +33 -20
  70. package/dist/external-optimizer-subprocess-_O06eDVA.js.map +1 -0
  71. package/dist/{feedback-trajectory-D7hgL6y5.d.ts → feedback-trajectory-CoQPmSJV.d.ts} +3 -3
  72. package/dist/{feedback-trajectory-D7hgL6y5.d.ts.map → feedback-trajectory-CoQPmSJV.d.ts.map} +1 -1
  73. package/dist/{findings-store-CZy5kUDo.js → findings-store-CvYUzQBR.js} +4 -4
  74. package/dist/{findings-store-CZy5kUDo.js.map → findings-store-CvYUzQBR.js.map} +1 -1
  75. package/dist/{index-Cav3abKy.d.ts → index-BSb3fJyZ.d.ts} +81 -19
  76. package/dist/{index-Cav3abKy.d.ts.map → index-BSb3fJyZ.d.ts.map} +1 -1
  77. package/dist/{index-CIqYaySd.d.ts → index-Bk1XEkP7.d.ts} +26 -16
  78. package/dist/index-Bk1XEkP7.d.ts.map +1 -0
  79. package/dist/{index-DmMHTDjT.d.ts → index-BmWw8zN6.d.ts} +9 -9
  80. package/dist/{index-DmMHTDjT.d.ts.map → index-BmWw8zN6.d.ts.map} +1 -1
  81. package/dist/{index--vDCtdaj.d.ts → index-CCOaNmh2.d.ts} +7 -7
  82. package/dist/{index--vDCtdaj.d.ts.map → index-CCOaNmh2.d.ts.map} +1 -1
  83. package/dist/{index-moZnazVj.d.ts → index-Cn9gB5Ca.d.ts} +21 -21
  84. package/dist/{index-moZnazVj.d.ts.map → index-Cn9gB5Ca.d.ts.map} +1 -1
  85. package/dist/{index-Er8TKQ3q.d.ts → index-aRalB_Ma.d.ts} +3 -3
  86. package/dist/{index-Er8TKQ3q.d.ts.map → index-aRalB_Ma.d.ts.map} +1 -1
  87. package/dist/index.d.ts +29 -29
  88. package/dist/index.js +23 -23
  89. package/dist/{integrity-BF0tJK21.js → integrity-DacT3oJ1.js} +2 -2
  90. package/dist/{integrity-BF0tJK21.js.map → integrity-DacT3oJ1.js.map} +1 -1
  91. package/dist/{integrity-BJGstiCh.d.ts → integrity-DotDLWtj.d.ts} +2 -2
  92. package/dist/{integrity-BJGstiCh.d.ts.map → integrity-DotDLWtj.d.ts.map} +1 -1
  93. package/dist/{judge-gate-DANg5FLq.js → judge-gate-CpD3wmcf.js} +2 -2
  94. package/dist/{judge-gate-DANg5FLq.js.map → judge-gate-CpD3wmcf.js.map} +1 -1
  95. package/dist/{llm-client-Dw4x6EdE.js → llm-client-Dk8lBnMh.js} +15 -2
  96. package/dist/{llm-client-Dw4x6EdE.js.map → llm-client-Dk8lBnMh.js.map} +1 -1
  97. package/dist/{llm-judge-DFoSy4Qn.js → llm-judge-DYmEdo3M.js} +3 -3
  98. package/dist/{llm-judge-DFoSy4Qn.js.map → llm-judge-DYmEdo3M.js.map} +1 -1
  99. package/dist/{matrix-OgdWQBQa.d.ts → matrix-BDl7hoBr.d.ts} +2 -2
  100. package/dist/{matrix-OgdWQBQa.d.ts.map → matrix-BDl7hoBr.d.ts.map} +1 -1
  101. package/dist/{measure-validity-plan-B1_qYlsk.d.ts → measure-validity-plan-BReXzcVh.d.ts} +62 -4
  102. package/dist/measure-validity-plan-BReXzcVh.d.ts.map +1 -0
  103. package/dist/{measure-validity-plan-t0YQRzJQ.js → measure-validity-plan-CJkBNzX_.js} +43 -6
  104. package/dist/measure-validity-plan-CJkBNzX_.js.map +1 -0
  105. package/dist/meta-eval/index.d.ts +2 -2
  106. package/dist/meta-eval/index.js +178 -35
  107. package/dist/meta-eval/index.js.map +1 -1
  108. package/dist/multishot/golden/index.d.ts +1 -1
  109. package/dist/multishot/index.d.ts +56 -17
  110. package/dist/multishot/index.d.ts.map +1 -1
  111. package/dist/multishot/index.js +93 -20
  112. package/dist/multishot/index.js.map +1 -1
  113. package/dist/node-transport-DJno8V46.js +62 -0
  114. package/dist/node-transport-DJno8V46.js.map +1 -0
  115. package/dist/openapi.json +1 -1
  116. package/dist/{optimization-method-D4CpYsVA.js → optimization-method-4JlbMxd2.js} +27 -38
  117. package/dist/optimization-method-4JlbMxd2.js.map +1 -0
  118. package/dist/{paired-arms-B6EXnI47.js → paired-arms-CJH5Q0wx.js} +2 -2
  119. package/dist/{paired-arms-B6EXnI47.js.map → paired-arms-CJH5Q0wx.js.map} +1 -1
  120. package/dist/{paired-promotion-decision-xYe881cD.js → paired-promotion-decision-BtfVwEAk.js} +2 -2
  121. package/dist/{paired-promotion-decision-xYe881cD.js.map → paired-promotion-decision-BtfVwEAk.js.map} +1 -1
  122. package/dist/{paired-promotion-decision-DuvRdnsW.d.ts → paired-promotion-decision-DJlI4z_k.d.ts} +2 -2
  123. package/dist/{paired-promotion-decision-DuvRdnsW.d.ts.map → paired-promotion-decision-DJlI4z_k.d.ts.map} +1 -1
  124. package/dist/{paired-promotion-power-DirShsIs.js → paired-promotion-power-DG1avBKf.js} +3 -3
  125. package/dist/{paired-promotion-power-DirShsIs.js.map → paired-promotion-power-DG1avBKf.js.map} +1 -1
  126. package/dist/pipelines/index.js +1 -1
  127. package/dist/{power-DTg6u30w.js → power-COie_o6E.js} +3 -3
  128. package/dist/{power-DTg6u30w.js.map → power-COie_o6E.js.map} +1 -1
  129. package/dist/{prime-protocol-Jm2pWh--.d.ts → prime-protocol-BRMk6dGI.d.ts} +2 -2
  130. package/dist/{prime-protocol-Jm2pWh--.d.ts.map → prime-protocol-BRMk6dGI.d.ts.map} +1 -1
  131. package/dist/{promotion-gate-BXgcORnM.d.ts → promotion-gate-B0VTBoXg.d.ts} +2 -2
  132. package/dist/{promotion-gate-BXgcORnM.d.ts.map → promotion-gate-B0VTBoXg.d.ts.map} +1 -1
  133. package/dist/{promotion-policy-Z5E-C32U.js → promotion-policy-BgI7PsQn.js} +3 -3
  134. package/dist/{promotion-policy-Z5E-C32U.js.map → promotion-policy-BgI7PsQn.js.map} +1 -1
  135. package/dist/{registry-DEZDECdr.d.ts → registry-BeInzotS.d.ts} +4 -4
  136. package/dist/{registry-DEZDECdr.d.ts.map → registry-BeInzotS.d.ts.map} +1 -1
  137. package/dist/reporting.d.ts +4 -4
  138. package/dist/reporting.js +3 -3
  139. package/dist/{research-report-CIgUe1lv.d.ts → research-report-CL5_UqCX.d.ts} +2 -2
  140. package/dist/{research-report-CIgUe1lv.d.ts.map → research-report-CL5_UqCX.d.ts.map} +1 -1
  141. package/dist/{researcher-CY_byuZl.d.ts → researcher-BOpZP_Ja.d.ts} +4 -4
  142. package/dist/{researcher-CY_byuZl.d.ts.map → researcher-BOpZP_Ja.d.ts.map} +1 -1
  143. package/dist/rl.d.ts +7 -7
  144. package/dist/rl.js +4 -4
  145. package/dist/rollout/index.d.ts +2 -2
  146. package/dist/rollout/index.js +1 -1
  147. package/dist/{rollout-B_lrpd9a.js → rollout--rSr43Pd.js} +2 -2
  148. package/dist/{rollout-B_lrpd9a.js.map → rollout--rSr43Pd.js.map} +1 -1
  149. package/dist/{rollout-nodes-Vas6OSxX.js → rollout-nodes-DFxKpIr2.js} +39 -10
  150. package/dist/rollout-nodes-DFxKpIr2.js.map +1 -0
  151. package/dist/{run-improvement-loop-BaPDVbW8.d.ts → run-improvement-loop-BeHu5D9Z.d.ts} +22 -10
  152. package/dist/run-improvement-loop-BeHu5D9Z.d.ts.map +1 -0
  153. package/dist/{runtime-rollouts-Vv-BAqmq.js → runtime-rollouts-CE0MbQPq.js} +54 -7
  154. package/dist/runtime-rollouts-CE0MbQPq.js.map +1 -0
  155. package/dist/search/index.d.ts +2 -2
  156. package/dist/search/index.js +2 -2
  157. package/dist/{search-kernel-BzTeb89p.d.ts → search-kernel-CJZ-ZSV1.d.ts} +3 -3
  158. package/dist/{search-kernel-BzTeb89p.d.ts.map → search-kernel-CJZ-ZSV1.d.ts.map} +1 -1
  159. package/dist/{search-kernel-DOPW08Hx.js → search-kernel-mZc79S6N.js} +4 -4
  160. package/dist/{search-kernel-DOPW08Hx.js.map → search-kernel-mZc79S6N.js.map} +1 -1
  161. package/dist/{search-summary-CYOHZAAy.js → search-summary-CCgP2qXz.js} +3 -3
  162. package/dist/{search-summary-CYOHZAAy.js.map → search-summary-CCgP2qXz.js.map} +1 -1
  163. package/dist/{self-improve-DY8ZY4lY.d.ts → self-improve-B1fsNejr.d.ts} +6 -6
  164. package/dist/{self-improve-DY8ZY4lY.d.ts.map → self-improve-B1fsNejr.d.ts.map} +1 -1
  165. package/dist/{self-improve-CIFqccHV.js → self-improve-C_Bcdmv8.js} +5 -4
  166. package/dist/{self-improve-CIFqccHV.js.map → self-improve-C_Bcdmv8.js.map} +1 -1
  167. package/dist/{sequential-B9iROM1S.d.ts → sequential-CHplorpC.d.ts} +2 -2
  168. package/dist/{sequential-B9iROM1S.d.ts.map → sequential-CHplorpC.d.ts.map} +1 -1
  169. package/dist/{sequential-tZjGysXY.js → sequential-DR-pnYQ7.js} +3 -3
  170. package/dist/{sequential-tZjGysXY.js.map → sequential-DR-pnYQ7.js.map} +1 -1
  171. package/dist/{server-1fzBCxMh.js → server-aZFmRucn.js} +3 -3
  172. package/dist/{server-1fzBCxMh.js.map → server-aZFmRucn.js.map} +1 -1
  173. package/dist/{skillopt-optimization-method-CbHBkopM.js → skillopt-optimization-method-DHk1K757.js} +93 -39
  174. package/dist/skillopt-optimization-method-DHk1K757.js.map +1 -0
  175. package/dist/{statistical-heldout-C7Jjo5nP.js → statistical-heldout-CL_7mI5C.js} +2 -2
  176. package/dist/{statistical-heldout-C7Jjo5nP.js.map → statistical-heldout-CL_7mI5C.js.map} +1 -1
  177. package/dist/{statistics-BPl13X3G.js → statistics-AKnVFnK-.js} +67 -42
  178. package/dist/statistics-AKnVFnK-.js.map +1 -0
  179. package/dist/statistics.d.ts +3 -3
  180. package/dist/statistics.js +1 -1
  181. package/dist/{store-tool-spans-Dq8r0PbJ.d.ts → store-tool-spans-M3WxeRrG.d.ts} +4 -4
  182. package/dist/{store-tool-spans-Dq8r0PbJ.d.ts.map → store-tool-spans-M3WxeRrG.d.ts.map} +1 -1
  183. package/dist/{summary-report-DzbnK81K.js → summary-report-DyBkOC6V.js} +3 -3
  184. package/dist/{summary-report-DzbnK81K.js.map → summary-report-DyBkOC6V.js.map} +1 -1
  185. package/dist/supervisor-run/index.d.ts +12 -2
  186. package/dist/supervisor-run/index.d.ts.map +1 -1
  187. package/dist/supervisor-run/index.js +3 -3
  188. package/dist/{systemone-BuSZTI88.d.ts → systemone-4PadCE4C.d.ts} +7 -7
  189. package/dist/{systemone-BuSZTI88.d.ts.map → systemone-4PadCE4C.d.ts.map} +1 -1
  190. package/dist/{systemone-review-mlfxWdLz.d.ts → systemone-review-DpAXWDkL.d.ts} +2 -2
  191. package/dist/{systemone-review-mlfxWdLz.d.ts.map → systemone-review-DpAXWDkL.d.ts.map} +1 -1
  192. package/dist/systemone.d.ts +3 -3
  193. package/dist/{tool-groups-PNDX8fd-.d.ts → tool-groups-SlnoQNyT.d.ts} +2 -2
  194. package/dist/tool-groups-SlnoQNyT.d.ts.map +1 -0
  195. package/dist/{tool-waste-783VCo1y.js → tool-waste-BZnYSa6J.js} +2 -2
  196. package/dist/{tool-waste-783VCo1y.js.map → tool-waste-BZnYSa6J.js.map} +1 -1
  197. package/dist/{trace-questions-DBtr4jWi.d.ts → trace-questions-ybyF0B6N.d.ts} +2 -2
  198. package/dist/{trace-questions-DBtr4jWi.d.ts.map → trace-questions-ybyF0B6N.d.ts.map} +1 -1
  199. package/dist/trace-repair/index.d.ts +1 -1
  200. package/dist/traces.d.ts +4 -4
  201. package/dist/{tree-CtlQQL1w.js → tree-CiIe-f3f.js} +4 -4
  202. package/dist/{tree-CtlQQL1w.js.map → tree-CiIe-f3f.js.map} +1 -1
  203. package/dist/{types-CKNAzCSA.d.ts → types-B1W3v8dT.d.ts} +3 -3
  204. package/dist/{types-CKNAzCSA.d.ts.map → types-B1W3v8dT.d.ts.map} +1 -1
  205. package/dist/{types-DbeIGi73.d.ts → types-Bte3EsFQ.d.ts} +52 -5
  206. package/dist/types-Bte3EsFQ.d.ts.map +1 -0
  207. package/dist/{types-BO948H-U.d.ts → types-D5XtEH9Q.d.ts} +8 -4
  208. package/dist/{types-BO948H-U.d.ts.map → types-D5XtEH9Q.d.ts.map} +1 -1
  209. package/dist/{types-D-WF1KM3.d.ts → types-xVtEOBhO.d.ts} +31 -8
  210. package/dist/types-xVtEOBhO.d.ts.map +1 -0
  211. package/dist/wire/index.d.ts +4 -4
  212. package/dist/wire/index.js +1 -1
  213. package/dist/world/index.d.ts +1 -1
  214. package/docs/design/statistics-decisions.md +18 -1
  215. package/docs/eval-surface-map.md +1 -1
  216. package/docs/feature-guide.md +1 -1
  217. package/docs/multi-turn-optimization.md +6 -2
  218. package/docs/outcome-validity.md +51 -12
  219. package/docs/public-api.md +17 -16
  220. package/docs/{multi-shot-optimization.md → trajectory-optimization.md} +1 -1
  221. package/package.json +1 -1
  222. package/dist/benchmark-command-DLg8E4y8.js.map +0 -1
  223. package/dist/external-optimizer-subprocess-mV-2swJI.js.map +0 -1
  224. package/dist/index-CIqYaySd.d.ts.map +0 -1
  225. package/dist/measure-validity-plan-B1_qYlsk.d.ts.map +0 -1
  226. package/dist/measure-validity-plan-t0YQRzJQ.js.map +0 -1
  227. package/dist/optimization-method-D4CpYsVA.js.map +0 -1
  228. package/dist/rollout-nodes-Vas6OSxX.js.map +0 -1
  229. package/dist/run-improvement-loop-BaPDVbW8.d.ts.map +0 -1
  230. package/dist/runtime-rollouts-Vv-BAqmq.js.map +0 -1
  231. package/dist/skillopt-optimization-method-CbHBkopM.js.map +0 -1
  232. package/dist/statistics-BPl13X3G.js.map +0 -1
  233. package/dist/tool-groups-PNDX8fd-.d.ts.map +0 -1
  234. package/dist/types-D-WF1KM3.d.ts.map +0 -1
  235. package/dist/types-DbeIGi73.d.ts.map +0 -1
@@ -1,4 +1,4 @@
1
- import { C as MultishotPersona, E as MultishotToolDefinition, c as RunMultishotMatrixResult, f as RunMultishotOptions, k as MultishotTransportRequest, s as RunMultishotMatrixOptions, w as MultishotResult } from "../../matrix-OgdWQBQa.js";
1
+ import { C as MultishotPersona, E as MultishotToolDefinition, c as RunMultishotMatrixResult, f as RunMultishotOptions, k as MultishotTransportRequest, s as RunMultishotMatrixOptions, w as MultishotResult } from "../../matrix-BDl7hoBr.js";
2
2
  interface CompareOptions {
3
3
  /** Stop after this many mismatches. A structural divergence high in the
4
4
  * tree would otherwise report every leaf below it. */
@@ -1,15 +1,15 @@
1
1
  import { h as MaximumCharge, o as CostLedgerHandle } from "../cost-ledger-CSP-OfFe.js";
2
2
  import { f as Run } from "../schema-CkIvnmLU.js";
3
- import { T as FindingCalibration, m as EvidenceRef } from "../types-CKNAzCSA.js";
4
- import { c as DEFAULT_JUDGE_MODEL } from "../chat-client-uQNXGuO4.js";
5
- import { y as PersonaRigor } from "../cluster-C-K0N2br.js";
6
- import { Ar as OptimizationMethod } from "../run-improvement-loop-BaPDVbW8.js";
7
- import { C as JudgeDimension, H as SurfaceProposer, R as Scenario, S as JudgeConfig, d as DispatchContext, j as MutableSurface, p as Gate, w as JudgeScore } from "../types-BO948H-U.js";
8
- import { _t as CampaignStorage } from "../search-kernel-BzTeb89p.js";
9
- import { s as SelfImproveResult, t as SelfImproveBudget } from "../self-improve-DY8ZY4lY.js";
10
- import { D as decisionPoint, j as FindingsLedger, r as SystemOneEvaluatorOptions } from "../systemone-BuSZTI88.js";
3
+ import { T as FindingCalibration, m as EvidenceRef } from "../types-B1W3v8dT.js";
4
+ import { c as DEFAULT_JUDGE_MODEL } from "../chat-client-BlTooBDA.js";
5
+ import { y as PersonaRigor } from "../cluster-BJ0nW3P7.js";
6
+ import { Ar as OptimizationMethod } from "../run-improvement-loop-BeHu5D9Z.js";
7
+ import { C as JudgeDimension, H as SurfaceProposer, R as Scenario, S as JudgeConfig, d as DispatchContext, j as MutableSurface, p as Gate, w as JudgeScore } from "../types-D5XtEH9Q.js";
8
+ import { _t as CampaignStorage } from "../search-kernel-CJZ-ZSV1.js";
9
+ import { s as SelfImproveResult, t as SelfImproveBudget } from "../self-improve-B1fsNejr.js";
10
+ import { D as decisionPoint, j as FindingsLedger, r as SystemOneEvaluatorOptions } from "../systemone-4PadCE4C.js";
11
11
  import { t as Trajectory } from "../trajectory-B3o6Ald_.js";
12
- import { A as MultishotTransportResponse, C as MultishotPersona, D as MultishotToolExecutor, E as MultishotToolDefinition, M as assertMultishotShotResult, O as MultishotTransport, S as MultishotMessage, T as MultishotShape, _ as renderJsonFooter, a as MultishotCellOutput, b as MultishotDriverEmptyError, c as RunMultishotMatrixResult, d as MultishotShot, f as RunMultishotOptions, g as renderDimensions, h as MultishotJudgeConfig, i as ConversationJudgeInput, j as MultishotTransportToolCall, k as MultishotTransportRequest, l as computeCellComposite, m as JudgeRunResult, n as CellCompositeInput, o as MultishotJudges, p as runMultishot, r as CellCompositeScore, s as RunMultishotMatrixOptions, t as ArtifactJudgeInput, u as runMultishotMatrix, v as runJudge, w as MultishotResult, x as MultishotFatalToolError, y as MultishotArtifact } from "../matrix-OgdWQBQa.js";
12
+ import { A as MultishotTransportResponse, C as MultishotPersona, D as MultishotToolExecutor, E as MultishotToolDefinition, M as assertMultishotShotResult, O as MultishotTransport, S as MultishotMessage, T as MultishotShape, _ as renderJsonFooter, a as MultishotCellOutput, b as MultishotDriverEmptyError, c as RunMultishotMatrixResult, d as MultishotShot, f as RunMultishotOptions, g as renderDimensions, h as MultishotJudgeConfig, i as ConversationJudgeInput, j as MultishotTransportToolCall, k as MultishotTransportRequest, l as computeCellComposite, m as JudgeRunResult, n as CellCompositeInput, o as MultishotJudges, p as runMultishot, r as CellCompositeScore, s as RunMultishotMatrixOptions, t as ArtifactJudgeInput, u as runMultishotMatrix, v as runJudge, w as MultishotResult, x as MultishotFatalToolError, y as MultishotArtifact } from "../matrix-BDl7hoBr.js";
13
13
  import { AgentProfile } from "@tangle-network/agent-interface";
14
14
  /** A scenario a simulated user plays: its persona, and optionally a plan. */
15
15
  interface ConversationScenario<TPersona extends MultishotPersona = MultishotPersona> extends Scenario {
@@ -23,8 +23,19 @@ interface ConversationScenario<TPersona extends MultishotPersona = MultishotPers
23
23
  kind: 'adversarial-user';
24
24
  sourceScenarioId: string;
25
25
  planDigest: string;
26
+ /** The conversation that showed the scenario can be passed under its
27
+ * plan. Set on every emitted scenario; absent on an unsolvable candidate. */
28
+ solvedBy?: ScenarioSolvedBy;
26
29
  };
27
30
  }
31
+ /** A passing conversation of an emitted scenario: which agent passed it, on
32
+ * which seed, and what the outcome check said. */
33
+ interface ScenarioSolvedBy {
34
+ agent: 'reference' | 'same';
35
+ profileDigest: string;
36
+ seed: number;
37
+ detail: string;
38
+ }
28
39
  /** The code-checked outcome of one conversation: the objective part of its score. */
29
40
  interface ConversationOutcome {
30
41
  passed: boolean;
@@ -302,9 +313,12 @@ interface SimulatorRealismReport {
302
313
  };
303
314
  conversations: number;
304
315
  turns: number;
305
- /** Judged presentations; each turn is shown in both orders. */
316
+ /** Judged presentations; each counted turn is shown in both orders. */
306
317
  presentations: number;
307
318
  failedJudgments: number;
319
+ /** Turns dropped because one of their two orders failed to judge: a turn
320
+ * counts only when it was judged in both positions. */
321
+ unbalancedTurns: number;
308
322
  /** Share of presentations where the judge picked the real message, each
309
323
  * conversation weighted equally, with a bootstrap interval over conversations. */
310
324
  accuracy: {
@@ -315,7 +329,10 @@ interface SimulatorRealismReport {
315
329
  resamples: number;
316
330
  };
317
331
  meanProbabilityOnReal: number;
318
- /** The interval contains 0.5. */
332
+ /** The interval contains 0.5: this sample does not show the judge telling
333
+ * the driver from real users. A small sample satisfies it with a wide
334
+ * interval, so it is not an admission rule; admit on `accuracy.high`
335
+ * against a stated bound, as `improveAdversarialUser` does. */
319
336
  indistinguishable: boolean;
320
337
  }
321
338
  /** Measure how often a judge tells the driver's message from the real user's. */
@@ -362,6 +379,23 @@ interface AdversarialUserOptions<TScenario extends ConversationScenario> {
362
379
  seed?: number;
363
380
  costLedger?: CostLedgerHandle;
364
381
  };
382
+ /** How an emitted scenario shows it can be passed under its plan. Default:
383
+ * the same agent, 3 seeded repeats. */
384
+ solvability?: {
385
+ /** An agent that runs each candidate in place of `agentProfile`. */
386
+ referenceProfile?: AgentProfile;
387
+ /** Seeded conversations per candidate; one pass is enough. Default 3. */
388
+ repeats?: number;
389
+ /** Campaign seed of the repeats. Default 42. */
390
+ seed?: number;
391
+ };
392
+ }
393
+ /** A failure the admitted plan caused that no solvability conversation passed. */
394
+ interface UnsolvableScenario<TScenario extends ConversationScenario> {
395
+ scenario: TScenario;
396
+ reason: string;
397
+ /** Conversations run on it. */
398
+ attempts: number;
365
399
  }
366
400
  interface AdversarialUserResult<TScenario extends ConversationScenario> {
367
401
  /** The user-side search, scored on the agent's failure rate. */
@@ -372,9 +406,12 @@ interface AdversarialUserResult<TScenario extends ConversationScenario> {
372
406
  realism: SimulatorRealismReport | null;
373
407
  admitted: boolean;
374
408
  reasons: string[];
375
- /** One per held-out conversation the admitted plan made the agent fail:
376
- * the source scenario with the plan as its `userPlan`. Train only. */
409
+ /** One per held-out conversation the admitted plan made the agent fail
410
+ * that a solvability conversation passed: the source scenario with the plan
411
+ * as its `userPlan` and the pass on `origin.solvedBy`. Train only. */
377
412
  trainScenarios: TScenario[];
413
+ /** Failures no solvability conversation passed. Never emitted. */
414
+ unsolvableScenarios: UnsolvableScenario<TScenario>[];
378
415
  }
379
416
  /**
380
417
  * Search for a simulated-user plan that makes a fixed agent fail, admit it
@@ -454,10 +491,12 @@ export declare class AdversarialScenarioInHeldOutError extends Error {
454
491
  /**
455
492
  * Refuse a comparison whose paired conversations (same cell id) met different
456
493
  * simulated users or ran on different seeds, or carry no identity to show it.
494
+ * Returns the number of pairs compared.
457
495
  */
458
- export declare function assertSameSimulatedUser(baseline: ReadonlyMap<string, ConversationArtifact>, candidate: ReadonlyMap<string, ConversationArtifact>): void;
459
- /** Refuse a held-out split that contains an adversarial-user scenario. Run it
460
- * on the test cases of any comparison that does not go through `conversationGate`. */
496
+ export declare function assertSameSimulatedUser(baseline: ReadonlyMap<string, ConversationArtifact>, candidate: ReadonlyMap<string, ConversationArtifact>): number;
497
+ /** Refuse a held-out split that contains an adversarial-user scenario.
498
+ * `conversationGate` runs it before the held-out run starts; run it on the
499
+ * test cases of any comparison that does not go through that gate. */
461
500
  export declare function assertHeldOutExcludesAdversarial(scenarios: readonly ConversationScenario[]): void;
462
501
  interface ConversationJudgeOptions<TScenario extends ConversationScenario> {
463
502
  /** Scores a passed conversation on [0, 1] for what the outcome check does
@@ -541,5 +580,5 @@ export declare function defaultDelegationTools(config?: DefaultToolsConfig): Def
541
580
  /** The fully-resolved shape for a profile: caller overrides win, the
542
581
  * profile-derived defaults fill the rest. */
543
582
  export declare function defaultShapeFromProfile<TPersona extends MultishotPersona>(profile: AgentProfile, shape?: MultishotShape<TPersona>): Required<MultishotShape<TPersona>>;
544
- export { type AdversarialUserOptions, type AdversarialUserResult, type ArtifactJudgeInput, type CellCompositeInput, type CellCompositeScore, type ConversationAgentOptions, type ConversationArtifact, type ConversationEnding, type ConversationEvidence, type ConversationGateOptions, type ConversationJudgeInput, type ConversationJudgeOptions, type ConversationLeg, type ConversationOutcome, type ConversationRecord, type ConversationScenario, DEFAULT_JUDGE_MODEL, type DefaultCoderConfig, type DefaultResearcherConfig, type DefaultToolsBundle, type DefaultToolsConfig, type JudgeDimension, type JudgeRunResult, type JudgeScore, type MeasureSimulatorRealismOptions, type MultishotArtifact, type MultishotCellOutput, type MultishotConversation, type MultishotConversationDriver, MultishotDriverEmptyError, MultishotFatalToolError, type MultishotJudgeConfig, type MultishotJudges, type MultishotLegSpend, type MultishotLegTokens, type MultishotMessage, type MultishotPersona, type MultishotResult, type MultishotRollout, type MultishotRolloutOptions, type MultishotShape, type MultishotShot, type MultishotToolDefinition, type MultishotToolExecutor, type MultishotTransport, type MultishotTransportRequest, type MultishotTransportResponse, type MultishotTransportToolCall, type PushbackReading, type RealismDriver, type RecordedUserTurn, type RunMultishotMatrixOptions, type RunMultishotMatrixResult, type RunMultishotOptions, type SimulatedUserIdentity, type SimulatedUserMismatch, type SimulatedUserOptions, type SimulatorRealismJudge, type SimulatorRealismJudgeOptions, type SimulatorRealismReport, type UserEndingClassification, type UserEndingProtocol, assertMultishotShotResult, computeCellComposite, renderDimensions, renderJsonFooter, runJudge, runMultishot, runMultishotMatrix };
583
+ export { type AdversarialUserOptions, type AdversarialUserResult, type ArtifactJudgeInput, type CellCompositeInput, type CellCompositeScore, type ConversationAgentOptions, type ConversationArtifact, type ConversationEnding, type ConversationEvidence, type ConversationGateOptions, type ConversationJudgeInput, type ConversationJudgeOptions, type ConversationLeg, type ConversationOutcome, type ConversationRecord, type ConversationScenario, DEFAULT_JUDGE_MODEL, type DefaultCoderConfig, type DefaultResearcherConfig, type DefaultToolsBundle, type DefaultToolsConfig, type JudgeDimension, type JudgeRunResult, type JudgeScore, type MeasureSimulatorRealismOptions, type MultishotArtifact, type MultishotCellOutput, type MultishotConversation, type MultishotConversationDriver, MultishotDriverEmptyError, MultishotFatalToolError, type MultishotJudgeConfig, type MultishotJudges, type MultishotLegSpend, type MultishotLegTokens, type MultishotMessage, type MultishotPersona, type MultishotResult, type MultishotRollout, type MultishotRolloutOptions, type MultishotShape, type MultishotShot, type MultishotToolDefinition, type MultishotToolExecutor, type MultishotTransport, type MultishotTransportRequest, type MultishotTransportResponse, type MultishotTransportToolCall, type PushbackReading, type RealismDriver, type RecordedUserTurn, type RunMultishotMatrixOptions, type RunMultishotMatrixResult, type RunMultishotOptions, type ScenarioSolvedBy, type SimulatedUserIdentity, type SimulatedUserMismatch, type SimulatedUserOptions, type SimulatorRealismJudge, type SimulatorRealismJudgeOptions, type SimulatorRealismReport, type UnsolvableScenario, type UserEndingClassification, type UserEndingProtocol, assertMultishotShotResult, computeCellComposite, renderDimensions, renderJsonFooter, runJudge, runMultishot, runMultishotMatrix };
545
584
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","names":[],"sources":["../../src/multishot/rollout.ts","../../src/multishot/realism.ts","../../src/multishot/adversarial-user.ts","../../src/multishot/conversation.ts","../../src/multishot/conversation-conditions.ts","../../src/multishot/conversation-evidence.ts","../../src/multishot/cost.ts","../../src/multishot/default-tools.ts","../../src/multishot/shape-defaults.ts"],"mappings":";;;;;;;;;;;;;;UA+BiB,qBAAqB,iBAAiB,mBAAmB,0BAChE;EACR,SAAS;;;EAGT;;;EAGA;IAAW;IAA0B;IAA0B;;;;UAIhD;EACf;EACA;;;UAIe;EACf;EACA;;KAGU;EACN;;EACA;EAAgC;;;UAGrB;;EAEf;;EAEA;;;;EAIA,SAAS,kBAAkB;;;;qBAQhB,qBAAqB;;UA8BjB,qBAAqB,iBAAiB,mBAAmB;EACxE;;EAEA;EACA,WAAW;;EAEX,QAAQ;;;EAGR;;EAEA,QAAQ,eAAe;;EAEvB;;EAEA;;EAEA,SAAS;;;EAGT,YAAY;;;UAIG;EACf;EACA,WAAW;;EAEX,QAAQ;;;EAGR,gBAAgB,eAAe;EAC/B,mBAAmB;;EAEnB,gBAAgB;EAChB;EACA;EACA;;;UAIe;EACf,YAAY;EACZ,WAAW;EACX,QAAQ;;KAGE;UAEK,wBAAwB,kBAAkB;EACzD,OAAO;;;EAGP,WAAW,SAAS,gBAAgB,UAAU,cAAc;EAC5D,MAAM,qBAAqB;;EAE3B;;EAEA,UAAU,cAAc,oBAAoB,UAAU,cAAc;;EAEpE,iBACE,KAAK,iBACL,SAAS,8BACN;;;EAGL;;;;UAKe;EACf;EACA;EACA;EACA,OAAO;EACP;EACA;EACA;EACA;EACA;EACA;EACA;;KAGU;EAAoB;;EAAwB;EAAkB;;;UAGzD;EACf,YAAY;EACZ,WAAW;EACX;EACA;EACA,QAAQ;EACR,SAAS;;EAET,UAAU;EACV,eAAe;;EAEf;;;EAGA;;UAGe,iBAAiB,kBAAkB;;EAElD,QACE,SAAS,gBACT,UAAU,WACV,KAAK,oBACF,QAAQ;;EAEb;;EAEA,gBAAgB,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Fe;EACf,WAAW;EACX,OAAO;;;EAGP;;UAGe;EACf,OAAO;EACP,WAAW,eAAe;EAC1B,kBAAkB;;wBAGJ,uBAAuB,SAAQ,qBAA0B;;;wBCpEzD,wBAAwB,iBAAiB,kBACvD,SAAS,cACT,QAAQ,eAAe,YACtB,SAAS,eAAe"}
1
+ {"version":3,"file":"index.d.ts","names":[],"sources":["../../src/multishot/rollout.ts","../../src/multishot/realism.ts","../../src/multishot/adversarial-user.ts","../../src/multishot/conversation.ts","../../src/multishot/conversation-conditions.ts","../../src/multishot/conversation-evidence.ts","../../src/multishot/cost.ts","../../src/multishot/default-tools.ts","../../src/multishot/shape-defaults.ts"],"mappings":";;;;;;;;;;;;;;UA+BiB,qBAAqB,iBAAiB,mBAAmB,0BAChE;EACR,SAAS;;;EAGT;;;EAGA;IACE;IACA;IACA;;;IAGA,WAAW;;;;;UAME;EACf;EACA;EACA;EACA;;;UAIe;EACf;EACA;;;UAIe;EACf;EACA;;KAGU;EACN;;EACA;EAAgC;;;UAGrB;;EAEf;;EAEA;;;;EAIA,SAAS,kBAAkB;;;;qBAQhB,qBAAqB;;UA8BjB,qBAAqB,iBAAiB,mBAAmB;EACxE;;EAEA;EACA,WAAW;;EAEX,QAAQ;;;EAGR;;EAEA,QAAQ,eAAe;;EAEvB;;EAEA;;EAEA,SAAS;;;EAGT,YAAY;;;UAIG;EACf;EACA,WAAW;;EAEX,QAAQ;;;EAGR,gBAAgB,eAAe;EAC/B,mBAAmB;;EAEnB,gBAAgB;EAChB;EACA;EACA;;;UAIe;EACf,YAAY;EACZ,WAAW;EACX,QAAQ;;KAGE;UAEK,wBAAwB,kBAAkB;EACzD,OAAO;;;EAGP,WAAW,SAAS,gBAAgB,UAAU,cAAc;EAC5D,MAAM,qBAAqB;;EAE3B;;EAEA,UAAU,cAAc,oBAAoB,UAAU,cAAc;;EAEpE,iBACE,KAAK,iBACL,SAAS,8BACN;;;EAGL;;;;UAKe;EACf;EACA;EACA;EACA,OAAO;EACP;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AAkB,sBAClD,OAAM,yBAAyB,aAC9B,YAAY,sBAAsB;UAgCpB,wBAAwB,kBAAkB;;;EAGzD,QAAQ,KAAK,sBAAsB;;EAEnC;EACA,8BAA8B;;;;;;;wBAQhB,iBAAiB,kBAAkB,sBACjD,OAAM,wBAAwB,aAC7B,KAAK,sBAAsB;UC7Lb;;EAEf;IAAW;IAAiB;;;EAE5B,QAAQ;EACR;;;EAGA;;EAEA;;;wBAOc,qBAAqB,UAAU,uBAAuB;;;;;;;wBCnBtD,sBACd,eACA;EAAU;EAAwB;;qBCAvB;UAEI;;;EAGf;EACA;;UAGe;;;EAGf;EACA;;UA+Fe;EACf,WAAW;EACX,OAAO;;;EAGP;;UAGe;EACf,OAAO;EACP,WAAW,eAAe;EAC1B,kBAAkB;;wBAGJ,uBAAuB,SAAQ,qBAA0B;;;wBCpEzD,wBAAwB,iBAAiB,kBACvD,SAAS,cACT,QAAQ,eAAe,YACtB,SAAS,eAAe"}
@@ -1,13 +1,14 @@
1
1
  import { a as hashCanonical, o as jsonDocument } from "../canonical-DKgL_Wby.js";
2
2
  import { S as makeRng } from "../paired-tests-CXcD_B80.js";
3
- import { L as defaultProductionGate } from "../optimization-method-D4CpYsVA.js";
3
+ import { Q as runCampaign, R as defaultProductionGate } from "../optimization-method-4JlbMxd2.js";
4
4
  import { d as estimateCost, p as isModelPriced } from "../cost-ledger-C5CCidPm.js";
5
- import { _ as EMITTED_EVIDENCE_MAX_CHARS, y as excerptEvidence } from "../campaign-evidence-BTfzZo1u.js";
6
- import { n as selfImprove } from "../self-improve-CIFqccHV.js";
5
+ import { _ as EMITTED_EVIDENCE_MAX_CHARS, y as excerptEvidence } from "../campaign-evidence-KM5GTsHG.js";
6
+ import { m as inMemoryCampaignStorage, p as fsCampaignStorage } from "../finding-scope-B_As3F_v.js";
7
+ import { n as selfImprove } from "../self-improve-C_Bcdmv8.js";
7
8
  import { n as runTaskId } from "../emitter-xN9wGTVw.js";
8
- import { t as DEFAULT_JUDGE_MODEL } from "../chat-client-CvyDOQBv.js";
9
+ import { t as DEFAULT_JUDGE_MODEL } from "../chat-client-Oyot5tyo.js";
9
10
  import { i as decisionQuestionDigest, r as decisionPoint } from "../decision-point-CfqtnGop.js";
10
- import { t as clusterBootstrapMean } from "../cluster-bootstrap-DXbnIdm8.js";
11
+ import { t as clusterBootstrapMean } from "../cluster-bootstrap-CTC8Dd30.js";
11
12
  import { n as withCellSpend } from "../cell-spend-zxmzg4GH.js";
12
13
  import { t as runAgentMatrix } from "../matrix-CgpX8wdm.js";
13
14
  import { n as MultishotFatalToolError, r as assertMultishotShotResult, t as MultishotDriverEmptyError } from "../types-DK4vNv5q.js";
@@ -46,12 +47,15 @@ var AdversarialScenarioInHeldOutError = class extends Error {
46
47
  /**
47
48
  * Refuse a comparison whose paired conversations (same cell id) met different
48
49
  * simulated users or ran on different seeds, or carry no identity to show it.
50
+ * Returns the number of pairs compared.
49
51
  */
50
52
  function assertSameSimulatedUser(baseline, candidate) {
51
53
  const mismatches = [];
54
+ let pairs = 0;
52
55
  for (const [cellId, other] of candidate) {
53
56
  const base = baseline.get(cellId);
54
57
  if (base === void 0) continue;
58
+ pairs += 1;
55
59
  const missing = ["baseline", "candidate"].filter((arm) => !hasIdentity(arm === "baseline" ? base : other));
56
60
  if (missing.length > 0) mismatches.push({
57
61
  cellId,
@@ -70,6 +74,7 @@ function assertSameSimulatedUser(baseline, candidate) {
70
74
  });
71
75
  }
72
76
  if (mismatches.length > 0) throw new SimulatedUserMismatchError(mismatches);
77
+ return pairs;
73
78
  }
74
79
  /** The first three items, and an ellipsis when there are more. Package-internal. */
75
80
  function listSome(items, separator = ", ") {
@@ -78,8 +83,9 @@ function listSome(items, separator = ", ") {
78
83
  function hasIdentity(artifact) {
79
84
  return typeof artifact?.simulatedUser?.digest === "string" && artifact.simulatedUser.digest.length > 0 && Number.isFinite(artifact.seed);
80
85
  }
81
- /** Refuse a held-out split that contains an adversarial-user scenario. Run it
82
- * on the test cases of any comparison that does not go through `conversationGate`. */
86
+ /** Refuse a held-out split that contains an adversarial-user scenario.
87
+ * `conversationGate` runs it before the held-out run starts; run it on the
88
+ * test cases of any comparison that does not go through that gate. */
83
89
  function assertHeldOutExcludesAdversarial(scenarios) {
84
90
  const emitted = scenarios.filter((scenario) => scenario.origin?.kind === "adversarial-user");
85
91
  if (emitted.length > 0) throw new AdversarialScenarioInHeldOutError(emitted.map((scenario) => scenario.id));
@@ -126,6 +132,7 @@ function conversationJudge(opts = {}) {
126
132
  function conversationGate(opts = {}) {
127
133
  return {
128
134
  name: "conversation",
135
+ admitHeldOut: assertHeldOutExcludesAdversarial,
129
136
  async decide(ctx) {
130
137
  assertHeldOutExcludesAdversarial(ctx.scenarios);
131
138
  if (ctx.baselineArtifacts === void 0) throw new SimulatedUserMismatchError([{
@@ -133,7 +140,7 @@ function conversationGate(opts = {}) {
133
140
  reason: "missing",
134
141
  detail: "the baseline arm carries no simulated-user identity: no baseline artifacts"
135
142
  }]);
136
- assertSameSimulatedUser(ctx.baselineArtifacts, ctx.candidateArtifacts);
143
+ const pairedConversations = assertSameSimulatedUser(ctx.baselineArtifacts, ctx.candidateArtifacts);
137
144
  if (ctx.neutralizedArtifacts) assertSameSimulatedUser(ctx.baselineArtifacts, ctx.neutralizedArtifacts);
138
145
  const result = await (opts.inner ?? defaultProductionGate({
139
146
  holdoutScenarios: ctx.scenarios,
@@ -145,7 +152,7 @@ function conversationGate(opts = {}) {
145
152
  contributingGates: [{
146
153
  name: "simulated-user-identity",
147
154
  status: "pass",
148
- detail: { pairedConversations: ctx.candidateArtifacts.size }
155
+ detail: { pairedConversations }
149
156
  }, ...result.contributingGates]
150
157
  };
151
158
  }
@@ -1075,16 +1082,17 @@ async function measureSimulatorRealism(opts) {
1075
1082
  const reasons = {};
1076
1083
  const probabilitiesOnReal = [];
1077
1084
  let failedJudgments = 0;
1085
+ let unbalancedTurns = 0;
1078
1086
  for (const row of turns) {
1079
1087
  const simulated = await opts.driver.next({
1080
1088
  turn: row,
1081
1089
  ...opts.signal ? { signal: opts.signal } : {},
1082
1090
  ...opts.costLedger ? { costLedger: opts.costLedger } : {}
1083
1091
  });
1092
+ const unit = `${row.conversationId}:${row.turn}`;
1093
+ const answers = [];
1084
1094
  for (const order of ["real-first", "real-second"]) {
1085
- const realOption = order === "real-first" ? "a" : "b";
1086
- const unit = `${row.conversationId}:${row.turn}`;
1087
- const answer = judgedAnswer(await opts.judge.decide({
1095
+ const judged = await opts.judge.decide({
1088
1096
  runId: opts.runId,
1089
1097
  invocationId: `${unit}:${order}`,
1090
1098
  layer: "turn",
@@ -1113,11 +1121,18 @@ async function measureSimulatorRealism(opts) {
1113
1121
  channel: "judge",
1114
1122
  actor: "simulator-realism-judge",
1115
1123
  costPhase: "realism.judge"
1116
- }));
1117
- if (!answer) {
1118
- failedJudgments += 1;
1119
- continue;
1120
- }
1124
+ });
1125
+ answers.push(judgedAnswer(judged));
1126
+ }
1127
+ const failed = answers.filter((answer) => !answer).length;
1128
+ failedJudgments += failed;
1129
+ if (failed > 0) {
1130
+ if (failed < answers.length) unbalancedTurns += 1;
1131
+ continue;
1132
+ }
1133
+ for (const [index, answer] of answers.entries()) {
1134
+ if (!answer) continue;
1135
+ const realOption = index === 0 ? "a" : "b";
1121
1136
  reasons[answer.reason] = (reasons[answer.reason] ?? 0) + 1;
1122
1137
  probabilitiesOnReal.push(answer.probabilities[realOption] ?? 0);
1123
1138
  const list = correctByConversation.get(row.conversationId) ?? [];
@@ -1147,6 +1162,7 @@ async function measureSimulatorRealism(opts) {
1147
1162
  turns: turns.length,
1148
1163
  presentations: probabilitiesOnReal.length,
1149
1164
  failedJudgments,
1165
+ unbalancedTurns,
1150
1166
  accuracy: {
1151
1167
  mean: interval.mean,
1152
1168
  low: interval.low,
@@ -1192,6 +1208,8 @@ var AdversarialSplitError = class extends Error {
1192
1208
  async function improveAdversarialUser(opts) {
1193
1209
  if ("judge" in opts || "gate" in opts) throw new UserSideObjectiveError("improveAdversarialUser: the user side's objective is the agent's failure rate; it accepts no judge or gate");
1194
1210
  if (!(opts.realism.maxJudgeAccuracy >= .5 && opts.realism.maxJudgeAccuracy <= 1)) throw new RangeError("improveAdversarialUser: realism.maxJudgeAccuracy must be in [0.5, 1]");
1211
+ const repeats = opts.solvability?.repeats ?? 3;
1212
+ if (!Number.isSafeInteger(repeats) || repeats < 1) throw new RangeError("improveAdversarialUser: solvability.repeats must be a positive integer");
1195
1213
  assertDisjointFromHeldOut([...opts.scenarios, ...opts.selectionScenarios ?? []], opts.agentHeldOut);
1196
1214
  const rollout = userSideRollout(opts.rollout, opts.agentProfile);
1197
1215
  const shared = {
@@ -1222,7 +1240,8 @@ async function improveAdversarialUser(opts) {
1222
1240
  realism: null,
1223
1241
  admitted: false,
1224
1242
  reasons: [`the user-side search did not ship (${improvement.gateDecision})`],
1225
- trainScenarios: []
1243
+ trainScenarios: [],
1244
+ unsolvableScenarios: []
1226
1245
  };
1227
1246
  const realism = await measureSimulatorRealism({
1228
1247
  turns: opts.realism.turns,
@@ -1252,7 +1271,61 @@ async function improveAdversarialUser(opts) {
1252
1271
  realism,
1253
1272
  admitted,
1254
1273
  reasons,
1255
- trainScenarios: admitted ? emittedScenarios(improvement, opts.scenarios, plan) : []
1274
+ ...await sortBySolvability(opts, admitted ? failedScenarios(improvement, opts.scenarios, plan) : [], repeats)
1275
+ };
1276
+ }
1277
+ /** Run each candidate under its plan; one pass makes it a train scenario. */
1278
+ async function sortBySolvability(opts, candidates, repeats) {
1279
+ if (candidates.length === 0) return {
1280
+ trainScenarios: [],
1281
+ unsolvableScenarios: []
1282
+ };
1283
+ const reference = opts.solvability?.referenceProfile;
1284
+ const profile = reference ?? opts.agentProfile;
1285
+ const solver = userSideRollout(opts.rollout, profile);
1286
+ const campaign = await runCampaign({
1287
+ scenarios: candidates,
1288
+ dispatch: (scenario, ctx) => solver.agent("", scenario, ctx),
1289
+ dispatchRef: `adversarial-solvability:${solver.dispatchRef}`,
1290
+ reps: repeats,
1291
+ seed: opts.solvability?.seed ?? 42,
1292
+ runDir: opts.runDir ? `${opts.runDir}/solvability` : `mem://adversarial-solvability`,
1293
+ storage: opts.storage ?? (opts.runDir ? fsCampaignStorage() : inMemoryCampaignStorage()),
1294
+ expectUsage: opts.expectUsage ?? "assert"
1295
+ });
1296
+ const agent = reference ? "reference" : "same";
1297
+ const profileDigest = hashCanonical(jsonDocument(profile));
1298
+ const trainScenarios = [];
1299
+ const unsolvableScenarios = [];
1300
+ for (const scenario of candidates) {
1301
+ const cells = campaign.cells.filter((cell) => cell.scenarioId === scenario.id);
1302
+ const passed = cells.find((cell) => cell.error === void 0 && cell.artifact.outcome.passed);
1303
+ if (passed) {
1304
+ const solvedBy = {
1305
+ agent,
1306
+ profileDigest,
1307
+ seed: passed.artifact.seed,
1308
+ detail: passed.artifact.outcome.detail
1309
+ };
1310
+ trainScenarios.push({
1311
+ ...scenario,
1312
+ origin: {
1313
+ ...scenario.origin,
1314
+ solvedBy
1315
+ }
1316
+ });
1317
+ continue;
1318
+ }
1319
+ const last = cells.at(-1);
1320
+ unsolvableScenarios.push({
1321
+ scenario,
1322
+ reason: `the ${agent} agent passed none of ${cells.length} conversation(s) under the plan (${last?.error ?? last?.artifact.outcome.detail ?? "no conversation ran"})`,
1323
+ attempts: cells.length
1324
+ });
1325
+ }
1326
+ return {
1327
+ trainScenarios,
1328
+ unsolvableScenarios
1256
1329
  };
1257
1330
  }
1258
1331
  /** Score of the user side: 1 when the agent failed the outcome check. */
@@ -1284,7 +1357,7 @@ function assertDisjointFromHeldOut(scenarios, heldOut) {
1284
1357
  function personaDigest(scenario) {
1285
1358
  return hashCanonical(jsonDocument(scenario.persona));
1286
1359
  }
1287
- function emittedScenarios(improvement, scenarios, plan) {
1360
+ function failedScenarios(improvement, scenarios, plan) {
1288
1361
  const planDigest = hashCanonical(plan);
1289
1362
  const emitted = /* @__PURE__ */ new Map();
1290
1363
  for (const cell of improvement.raw.winnerOnHoldout.cells) {