@tangle-network/agent-eval 2.0.5 → 2.0.9

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 (309) hide show
  1. package/CHANGELOG.md +24 -0
  2. package/dist/adapters/http.d.ts +2 -2
  3. package/dist/{agent-profile-CcOq7bOO.d.ts → agent-profile-ORN4aArD.d.ts} +5 -5
  4. package/dist/{agent-profile-CcOq7bOO.d.ts.map → agent-profile-ORN4aArD.d.ts.map} +1 -1
  5. package/dist/analyst/index.d.ts +15 -15
  6. package/dist/analyst/index.js +18 -14
  7. package/dist/analyst/index.js.map +1 -1
  8. package/dist/{analyze-runs-C_9cXPZn.js → analyze-runs-CE_5VKh2.js} +6 -5
  9. package/dist/{analyze-runs-C_9cXPZn.js.map → analyze-runs-CE_5VKh2.js.map} +1 -1
  10. package/dist/analyze-runs-DT693FJ7.d.ts +65 -0
  11. package/dist/analyze-runs-DT693FJ7.d.ts.map +1 -0
  12. package/dist/app-grade/index.d.ts +4 -4
  13. package/dist/app-grade/index.js +1 -1
  14. package/dist/{benchmark-command-MfXRocwZ.js → benchmark-command-DLg8E4y8.js} +16 -9
  15. package/dist/benchmark-command-DLg8E4y8.js.map +1 -0
  16. package/dist/benchmarks/index.d.ts +4 -4
  17. package/dist/benchmarks/index.js +4 -4
  18. package/dist/builder-eval/index.js +2 -2
  19. package/dist/calibration-CrORXMWx.d.ts +128 -0
  20. package/dist/calibration-CrORXMWx.d.ts.map +1 -0
  21. package/dist/{calibration-Cfoup0xz.js → calibration-Dz8mQb5P.js} +2 -2
  22. package/dist/{calibration-Cfoup0xz.js.map → calibration-Dz8mQb5P.js.map} +1 -1
  23. package/dist/campaign/index.d.ts +8 -8
  24. package/dist/campaign/index.js +12 -11
  25. package/dist/{campaign-DfSWSreo.js → campaign-C_S3MOYa.js} +1589 -14
  26. package/dist/campaign-C_S3MOYa.js.map +1 -0
  27. package/dist/{campaign-evidence-D_oBFfLc.js → campaign-evidence-BTfzZo1u.js} +4 -4
  28. package/dist/{campaign-evidence-D_oBFfLc.js.map → campaign-evidence-BTfzZo1u.js.map} +1 -1
  29. package/dist/{campaign-evidence-BmMs8YJt.d.ts → campaign-evidence-CM4FBOkX.d.ts} +5 -5
  30. package/dist/{campaign-evidence-BmMs8YJt.d.ts.map → campaign-evidence-CM4FBOkX.d.ts.map} +1 -1
  31. package/dist/{cluster-Bj90LK-1.d.ts → chat-client-uQNXGuO4.d.ts} +3 -240
  32. package/dist/chat-client-uQNXGuO4.d.ts.map +1 -0
  33. package/dist/cli.js +6 -6
  34. package/dist/cluster-C-K0N2br.d.ts +241 -0
  35. package/dist/cluster-C-K0N2br.d.ts.map +1 -0
  36. package/dist/{cluster-bootstrap-DPzVy3_K.js → cluster-bootstrap-DXbnIdm8.js} +3 -2
  37. package/dist/{cluster-bootstrap-DPzVy3_K.js.map → cluster-bootstrap-DXbnIdm8.js.map} +1 -1
  38. package/dist/{completion-verifier-Cy38EpGE.d.ts → completion-verifier-C7wipJOK.d.ts} +2 -2
  39. package/dist/{completion-verifier-Cy38EpGE.d.ts.map → completion-verifier-C7wipJOK.d.ts.map} +1 -1
  40. package/dist/contract/index.d.ts +14 -12
  41. package/dist/contract/index.js +13 -11
  42. package/dist/contract/index.js.map +1 -1
  43. package/dist/{decision-point-C46p-p9v.js → decision-point-CfqtnGop.js} +3 -3
  44. package/dist/{decision-point-C46p-p9v.js.map → decision-point-CfqtnGop.js.map} +1 -1
  45. package/dist/{default-registry-CUuorCWZ.d.ts → default-registry-Bskl2HzV.d.ts} +6 -7
  46. package/dist/default-registry-Bskl2HzV.d.ts.map +1 -0
  47. package/dist/{default-registry-IkE3byrA.js → default-registry-kps1SOaD.js} +27 -15
  48. package/dist/default-registry-kps1SOaD.js.map +1 -0
  49. package/dist/define-agent-eval-Dnh4jXLX.js +96 -0
  50. package/dist/define-agent-eval-Dnh4jXLX.js.map +1 -0
  51. package/dist/define-agent-eval-tu3anVlk.d.ts +52 -0
  52. package/dist/define-agent-eval-tu3anVlk.d.ts.map +1 -0
  53. package/dist/diagnosis/index.d.ts +3 -3
  54. package/dist/diagnosis/index.js +1 -1
  55. package/dist/{dspy-rlm-engine-DE11iBcC.js → dspy-rlm-engine-DQbPdT_o.js} +8 -4
  56. package/dist/{dspy-rlm-engine-DE11iBcC.js.map → dspy-rlm-engine-DQbPdT_o.js.map} +1 -1
  57. package/dist/{emitter-BjW3NnX-.js → emitter-xN9wGTVw.js} +9 -2
  58. package/dist/{emitter-BjW3NnX-.js.map → emitter-xN9wGTVw.js.map} +1 -1
  59. package/dist/{eval-campaign-Cyk-tkLh.js → eval-campaign-DswSn7Gm.js} +3 -3
  60. package/dist/{eval-campaign-Cyk-tkLh.js.map → eval-campaign-DswSn7Gm.js.map} +1 -1
  61. package/dist/{evaluation-DfyLPVL1.d.ts → evaluation-C4-tf3Z_.d.ts} +4 -4
  62. package/dist/{evaluation-DfyLPVL1.d.ts.map → evaluation-C4-tf3Z_.d.ts.map} +1 -1
  63. package/dist/evaluation.d.ts +1 -1
  64. package/dist/{exact-types-CiCXYhNK.d.ts → exact-types-CUsSMW3n.d.ts} +2 -2
  65. package/dist/{exact-types-CiCXYhNK.d.ts.map → exact-types-CUsSMW3n.d.ts.map} +1 -1
  66. package/dist/{execution-insight-wUNXxo5Y.d.ts → execution-insight-YihQrSqd.d.ts} +2 -2
  67. package/dist/{execution-insight-wUNXxo5Y.d.ts.map → execution-insight-YihQrSqd.d.ts.map} +1 -1
  68. package/dist/experiment/index.d.ts +5 -5
  69. package/dist/experiment/index.js +10 -184
  70. package/dist/experiment/index.js.map +1 -1
  71. package/dist/{external-optimizer-process-4QdcF7Kd.js → external-optimizer-process-CVi1x2nb.js} +2 -2
  72. package/dist/{external-optimizer-process-4QdcF7Kd.js.map → external-optimizer-process-CVi1x2nb.js.map} +1 -1
  73. package/dist/{external-optimizer-subprocess-BW0ZWUUr.js → external-optimizer-subprocess-mV-2swJI.js} +3 -357
  74. package/dist/external-optimizer-subprocess-mV-2swJI.js.map +1 -0
  75. package/dist/{feedback-trajectory-HJticMDz.d.ts → feedback-trajectory-D7hgL6y5.d.ts} +3 -3
  76. package/dist/{feedback-trajectory-HJticMDz.d.ts.map → feedback-trajectory-D7hgL6y5.d.ts.map} +1 -1
  77. package/dist/finding-scope-B_As3F_v.js +359 -0
  78. package/dist/finding-scope-B_As3F_v.js.map +1 -0
  79. package/dist/{findings-store-BxpV-hfH.js → findings-store-CZy5kUDo.js} +26 -19
  80. package/dist/findings-store-CZy5kUDo.js.map +1 -0
  81. package/dist/fuzz.js +1 -1
  82. package/dist/{harness-session-lines-CSxKR6no.js → harness-session-lines-CTh1-uOb.js} +21 -19
  83. package/dist/harness-session-lines-CTh1-uOb.js.map +1 -0
  84. package/dist/{index-Ucp54Pcl.d.ts → index--vDCtdaj.d.ts} +7 -8
  85. package/dist/index--vDCtdaj.d.ts.map +1 -0
  86. package/dist/{index-CKjqN9_U.d.ts → index-CIqYaySd.d.ts} +89 -3
  87. package/dist/index-CIqYaySd.d.ts.map +1 -0
  88. package/dist/{index-C6TG1LwA.d.ts → index-Cav3abKy.d.ts} +256 -131
  89. package/dist/index-Cav3abKy.d.ts.map +1 -0
  90. package/dist/{index-CR-guIiZ.d.ts → index-DmMHTDjT.d.ts} +10 -8
  91. package/dist/index-DmMHTDjT.d.ts.map +1 -0
  92. package/dist/{index-oX0TuJFv.d.ts → index-Er8TKQ3q.d.ts} +4 -4
  93. package/dist/{index-oX0TuJFv.d.ts.map → index-Er8TKQ3q.d.ts.map} +1 -1
  94. package/dist/{index-B_k8aY9k.d.ts → index-moZnazVj.d.ts} +22 -21
  95. package/dist/index-moZnazVj.d.ts.map +1 -0
  96. package/dist/index.d.ts +33 -30
  97. package/dist/index.js +27 -24
  98. package/dist/index.js.map +1 -1
  99. package/dist/{analyze-runs-Ke0WbAf6.d.ts → insight-report-DYofCMLx.d.ts} +4 -64
  100. package/dist/insight-report-DYofCMLx.d.ts.map +1 -0
  101. package/dist/{integrity-B9320cw1.d.ts → integrity-BJGstiCh.d.ts} +2 -2
  102. package/dist/{integrity-B9320cw1.d.ts.map → integrity-BJGstiCh.d.ts.map} +1 -1
  103. package/dist/{judge-gate-DqlzOBOm.js → judge-gate-DANg5FLq.js} +2 -2
  104. package/dist/{judge-gate-DqlzOBOm.js.map → judge-gate-DANg5FLq.js.map} +1 -1
  105. package/dist/{kind-factory-BDd4rhML.js → kind-factory-B-xCxG7p.js} +33 -5
  106. package/dist/kind-factory-B-xCxG7p.js.map +1 -0
  107. package/dist/llm-judge-DFoSy4Qn.js +476 -0
  108. package/dist/llm-judge-DFoSy4Qn.js.map +1 -0
  109. package/dist/{matrix-DlSrRl_v.d.ts → matrix-OgdWQBQa.d.ts} +6 -2
  110. package/dist/matrix-OgdWQBQa.d.ts.map +1 -0
  111. package/dist/measure-validity-plan-B1_qYlsk.d.ts +143 -0
  112. package/dist/measure-validity-plan-B1_qYlsk.d.ts.map +1 -0
  113. package/dist/measure-validity-plan-t0YQRzJQ.js +117 -0
  114. package/dist/measure-validity-plan-t0YQRzJQ.js.map +1 -0
  115. package/dist/meta-eval/index.d.ts +5 -3
  116. package/dist/meta-eval/index.js +664 -14
  117. package/dist/meta-eval/index.js.map +1 -1
  118. package/dist/multishot/golden/index.d.ts +1 -1
  119. package/dist/multishot/index.d.ts +458 -4
  120. package/dist/multishot/index.d.ts.map +1 -1
  121. package/dist/multishot/index.js +926 -47
  122. package/dist/multishot/index.js.map +1 -1
  123. package/dist/openapi.json +1 -1
  124. package/dist/{llm-judge-DQJTQx01.js → optimization-method-D4CpYsVA.js} +18 -482
  125. package/dist/optimization-method-D4CpYsVA.js.map +1 -0
  126. package/dist/{outcome-observations-DL3CC8w1.js → outcome-observations-DEh8_V_P.js} +31 -6
  127. package/dist/outcome-observations-DEh8_V_P.js.map +1 -0
  128. package/dist/outcome-store-CHtuvstd.d.ts +56 -0
  129. package/dist/outcome-store-CHtuvstd.d.ts.map +1 -0
  130. package/dist/{paired-arms-DZhH3FGu.js → paired-arms-B6EXnI47.js} +3 -2
  131. package/dist/{paired-arms-DZhH3FGu.js.map → paired-arms-B6EXnI47.js.map} +1 -1
  132. package/dist/{paired-promotion-decision-ChHBuuHV.d.ts → paired-promotion-decision-DuvRdnsW.d.ts} +2 -2
  133. package/dist/{paired-promotion-decision-ChHBuuHV.d.ts.map → paired-promotion-decision-DuvRdnsW.d.ts.map} +1 -1
  134. package/dist/{paired-promotion-decision-Dn3-jaq4.js → paired-promotion-decision-xYe881cD.js} +3 -2
  135. package/dist/{paired-promotion-decision-Dn3-jaq4.js.map → paired-promotion-decision-xYe881cD.js.map} +1 -1
  136. package/dist/{paired-promotion-power-BlzXdgMD.js → paired-promotion-power-DirShsIs.js} +3 -3
  137. package/dist/{paired-promotion-power-BlzXdgMD.js.map → paired-promotion-power-DirShsIs.js.map} +1 -1
  138. package/dist/paired-tests-CXcD_B80.js +688 -0
  139. package/dist/paired-tests-CXcD_B80.js.map +1 -0
  140. package/dist/pareto-DIVE5D0T.js +81 -0
  141. package/dist/pareto-DIVE5D0T.js.map +1 -0
  142. package/dist/pipelines/index.d.ts +2 -1
  143. package/dist/pipelines/index.d.ts.map +1 -1
  144. package/dist/pipelines/index.js +1 -1
  145. package/dist/{sequential-BphITa5b.js → power-DTg6u30w.js} +181 -4
  146. package/dist/power-DTg6u30w.js.map +1 -0
  147. package/dist/{prime-protocol-iEaSEGZB.d.ts → prime-protocol-Jm2pWh--.d.ts} +2 -2
  148. package/dist/{prime-protocol-iEaSEGZB.d.ts.map → prime-protocol-Jm2pWh--.d.ts.map} +1 -1
  149. package/dist/{promotion-gate-CGkxh36r.d.ts → promotion-gate-BXgcORnM.d.ts} +2 -2
  150. package/dist/{promotion-gate-CGkxh36r.d.ts.map → promotion-gate-BXgcORnM.d.ts.map} +1 -1
  151. package/dist/{promotion-policy-CxDIh-9p.js → promotion-policy-Z5E-C32U.js} +4 -4
  152. package/dist/{promotion-policy-CxDIh-9p.js.map → promotion-policy-Z5E-C32U.js.map} +1 -1
  153. package/dist/{proposal-findings-DedMih-u.js → proposal-findings-CfRFCFXS.js} +2 -2
  154. package/dist/{proposal-findings-DedMih-u.js.map → proposal-findings-CfRFCFXS.js.map} +1 -1
  155. package/dist/{registry-V8o2kZtn.d.ts → registry-DEZDECdr.d.ts} +4 -4
  156. package/dist/{registry-V8o2kZtn.d.ts.map → registry-DEZDECdr.d.ts.map} +1 -1
  157. package/dist/{release-confidence-BLHOMK5Q.js → release-confidence-Cndq1hwi.js} +2 -2
  158. package/dist/{release-confidence-BLHOMK5Q.js.map → release-confidence-Cndq1hwi.js.map} +1 -1
  159. package/dist/reporting.d.ts +5 -5
  160. package/dist/reporting.js +6 -5
  161. package/dist/reporting.js.map +1 -1
  162. package/dist/{research-report-D6XIK0eK.d.ts → research-report-CIgUe1lv.d.ts} +2 -2
  163. package/dist/{research-report-D6XIK0eK.d.ts.map → research-report-CIgUe1lv.d.ts.map} +1 -1
  164. package/dist/{researcher---DhHG4J.d.ts → researcher-CY_byuZl.d.ts} +4 -4
  165. package/dist/{researcher---DhHG4J.d.ts.map → researcher-CY_byuZl.d.ts.map} +1 -1
  166. package/dist/{reward-hacking-DKAflk2c.js → reward-hacking-DMTm1OBd.js} +2 -2
  167. package/dist/{reward-hacking-DKAflk2c.js.map → reward-hacking-DMTm1OBd.js.map} +1 -1
  168. package/dist/rl.d.ts +9 -8
  169. package/dist/rl.d.ts.map +1 -1
  170. package/dist/rl.js +11 -10
  171. package/dist/rl.js.map +1 -1
  172. package/dist/rollout/index.d.ts +2 -2
  173. package/dist/rollout/index.js +2 -2
  174. package/dist/{rollout-DVwpCHBC.js → rollout-B_lrpd9a.js} +2 -2
  175. package/dist/{rollout-DVwpCHBC.js.map → rollout-B_lrpd9a.js.map} +1 -1
  176. package/dist/{rubric-predictive-validity--6z0q8s6.js → rubric-predictive-validity-BXJ92Jp_.js} +3 -9
  177. package/dist/rubric-predictive-validity-BXJ92Jp_.js.map +1 -0
  178. package/dist/{rubric-predictive-validity-C9wc7f_D.d.ts → rubric-predictive-validity-DH94_0Q1.d.ts} +3 -56
  179. package/dist/rubric-predictive-validity-DH94_0Q1.d.ts.map +1 -0
  180. package/dist/{run-improvement-loop-CtLyPb5-.d.ts → run-improvement-loop-BaPDVbW8.d.ts} +384 -11
  181. package/dist/run-improvement-loop-BaPDVbW8.d.ts.map +1 -0
  182. package/dist/{run-record-Bqg0NZ_e.js → run-record-CuO8ErrI.js} +3 -2
  183. package/dist/run-record-CuO8ErrI.js.map +1 -0
  184. package/dist/{runtime-rollouts-DdUijr_t.js → runtime-rollouts-Vv-BAqmq.js} +3 -3
  185. package/dist/{runtime-rollouts-DdUijr_t.js.map → runtime-rollouts-Vv-BAqmq.js.map} +1 -1
  186. package/dist/search/index.d.ts +2 -2
  187. package/dist/search/index.js +2 -2
  188. package/dist/{search-kernel-DXA1EhnN.d.ts → search-kernel-BzTeb89p.d.ts} +3 -3
  189. package/dist/{search-kernel-DXA1EhnN.d.ts.map → search-kernel-BzTeb89p.d.ts.map} +1 -1
  190. package/dist/{pareto-Bg75Gajo.js → search-kernel-DOPW08Hx.js} +6 -88
  191. package/dist/search-kernel-DOPW08Hx.js.map +1 -0
  192. package/dist/{search-summary-B1x1Vmzh.js → search-summary-CYOHZAAy.js} +4 -4
  193. package/dist/{search-summary-B1x1Vmzh.js.map → search-summary-CYOHZAAy.js.map} +1 -1
  194. package/dist/{define-agent-eval-B6uE3gNu.js → self-improve-CIFqccHV.js} +8 -97
  195. package/dist/self-improve-CIFqccHV.js.map +1 -0
  196. package/dist/{define-agent-eval-D17XsdAt.d.ts → self-improve-DY8ZY4lY.d.ts} +8 -54
  197. package/dist/self-improve-DY8ZY4lY.d.ts.map +1 -0
  198. package/dist/{sequential-BhbTSxpt.d.ts → sequential-B9iROM1S.d.ts} +2 -2
  199. package/dist/{sequential-BhbTSxpt.d.ts.map → sequential-B9iROM1S.d.ts.map} +1 -1
  200. package/dist/{sequential-ux_XrjBf.js → sequential-tZjGysXY.js} +3 -3
  201. package/dist/{sequential-ux_XrjBf.js.map → sequential-tZjGysXY.js.map} +1 -1
  202. package/dist/{skillopt-optimization-method-D_swD0Cy.js → skillopt-optimization-method-CbHBkopM.js} +9 -8
  203. package/dist/{skillopt-optimization-method-D_swD0Cy.js.map → skillopt-optimization-method-CbHBkopM.js.map} +1 -1
  204. package/dist/{statistical-heldout-CaS4T-43.js → statistical-heldout-C7Jjo5nP.js} +3 -3
  205. package/dist/{statistical-heldout-CaS4T-43.js.map → statistical-heldout-C7Jjo5nP.js.map} +1 -1
  206. package/dist/{statistics-DSidA5I2.js → statistics-BPl13X3G.js} +208 -700
  207. package/dist/statistics-BPl13X3G.js.map +1 -0
  208. package/dist/statistics.d.ts +3 -3
  209. package/dist/statistics.js +3 -2
  210. package/dist/{store-otlp-CR9fWum6.js → store-otlp-CdeW7NWq.js} +2 -2
  211. package/dist/{store-otlp-CR9fWum6.js.map → store-otlp-CdeW7NWq.js.map} +1 -1
  212. package/dist/{store-tool-spans-tkdUJWup.js → store-tool-spans-CVX-jfkk.js} +3 -3
  213. package/dist/{store-tool-spans-tkdUJWup.js.map → store-tool-spans-CVX-jfkk.js.map} +1 -1
  214. package/dist/{store-tool-spans-C47hUUVM.d.ts → store-tool-spans-Dq8r0PbJ.d.ts} +4 -5
  215. package/dist/store-tool-spans-Dq8r0PbJ.d.ts.map +1 -0
  216. package/dist/{summary-report-CI4J6gxU.js → summary-report-DzbnK81K.js} +15 -7
  217. package/dist/summary-report-DzbnK81K.js.map +1 -0
  218. package/dist/summary-report-figures-CJHygLgw.d.ts.map +1 -1
  219. package/dist/supervisor-run/index.d.ts +1 -1
  220. package/dist/supervisor-run/index.js +1 -1
  221. package/dist/{systemone-MXhFSYdy.d.ts → systemone-BuSZTI88.d.ts} +8 -7
  222. package/dist/systemone-BuSZTI88.d.ts.map +1 -0
  223. package/dist/{systemone-review-C9kbs3zD.d.ts → systemone-review-mlfxWdLz.d.ts} +2 -2
  224. package/dist/{systemone-review-C9kbs3zD.d.ts.map → systemone-review-mlfxWdLz.d.ts.map} +1 -1
  225. package/dist/systemone.d.ts +3 -3
  226. package/dist/systemone.js +1 -1
  227. package/dist/{tool-groups-BSd08M7B.d.ts → tool-groups-PNDX8fd-.d.ts} +2 -3
  228. package/dist/tool-groups-PNDX8fd-.d.ts.map +1 -0
  229. package/dist/{tool-waste-u7JJ_BlE.js → tool-waste-783VCo1y.js} +3 -2
  230. package/dist/{tool-waste-u7JJ_BlE.js.map → tool-waste-783VCo1y.js.map} +1 -1
  231. package/dist/tool-waste-B01AMpID.d.ts +121 -0
  232. package/dist/tool-waste-B01AMpID.d.ts.map +1 -0
  233. package/dist/{trace-questions-CJANeK9P.d.ts → trace-questions-DBtr4jWi.d.ts} +2 -3
  234. package/dist/trace-questions-DBtr4jWi.d.ts.map +1 -0
  235. package/dist/trace-repair/index.d.ts +1 -1
  236. package/dist/trace-repair/index.js +1 -1
  237. package/dist/traces.d.ts +4 -5
  238. package/dist/traces.d.ts.map +1 -1
  239. package/dist/traces.js +4 -4
  240. package/dist/trajectory-B3o6Ald_.d.ts +100 -0
  241. package/dist/trajectory-B3o6Ald_.d.ts.map +1 -0
  242. package/dist/trajectory-replay/index.js +1 -1
  243. package/dist/{tree-DQMlcNFI.js → tree-CtlQQL1w.js} +6 -4
  244. package/dist/{tree-DQMlcNFI.js.map → tree-CtlQQL1w.js.map} +1 -1
  245. package/dist/{types-DD1eUTLn.d.ts → types-BO948H-U.d.ts} +7 -4
  246. package/dist/{types-DD1eUTLn.d.ts.map → types-BO948H-U.d.ts.map} +1 -1
  247. package/dist/{types-AGUuvnae.d.ts → types-CKNAzCSA.d.ts} +158 -3
  248. package/dist/types-CKNAzCSA.d.ts.map +1 -0
  249. package/dist/{types-BLv2Ngla.d.ts → types-D-WF1KM3.d.ts} +2 -2
  250. package/dist/{types-BLv2Ngla.d.ts.map → types-D-WF1KM3.d.ts.map} +1 -1
  251. package/dist/types-DK4vNv5q.js.map +1 -1
  252. package/dist/{types-CE9JMZhk.d.ts → types-DbeIGi73.d.ts} +2 -2
  253. package/dist/{types-CE9JMZhk.d.ts.map → types-DbeIGi73.d.ts.map} +1 -1
  254. package/dist/types-_tlhWGUq.js.map +1 -1
  255. package/dist/wire/index.d.ts +4 -4
  256. package/dist/world/index.d.ts +529 -0
  257. package/dist/world/index.d.ts.map +1 -0
  258. package/dist/world/index.js +1356 -0
  259. package/dist/world/index.js.map +1 -0
  260. package/docs/campaign-proposers.md +7 -0
  261. package/docs/concepts.md +2 -0
  262. package/docs/design/statistics-decisions.md +31 -0
  263. package/docs/eval-surface-map.md +4 -1
  264. package/docs/feature-guide.md +2 -0
  265. package/docs/multi-turn-optimization.md +80 -0
  266. package/docs/outcome-validity.md +69 -0
  267. package/docs/public-api.md +86 -31
  268. package/docs/trace-analysis.md +1 -0
  269. package/docs/world.md +104 -0
  270. package/package.json +7 -2
  271. package/dist/analyze-runs-Ke0WbAf6.d.ts.map +0 -1
  272. package/dist/benchmark-command-MfXRocwZ.js.map +0 -1
  273. package/dist/campaign-DfSWSreo.js.map +0 -1
  274. package/dist/cluster-Bj90LK-1.d.ts.map +0 -1
  275. package/dist/default-registry-CUuorCWZ.d.ts.map +0 -1
  276. package/dist/default-registry-IkE3byrA.js.map +0 -1
  277. package/dist/define-agent-eval-B6uE3gNu.js.map +0 -1
  278. package/dist/define-agent-eval-D17XsdAt.d.ts.map +0 -1
  279. package/dist/engine-BZVXOc6n.d.ts +0 -152
  280. package/dist/engine-BZVXOc6n.d.ts.map +0 -1
  281. package/dist/external-optimizer-subprocess-BW0ZWUUr.js.map +0 -1
  282. package/dist/findings-store-BxpV-hfH.js.map +0 -1
  283. package/dist/harness-session-lines-CSxKR6no.js.map +0 -1
  284. package/dist/index-B_k8aY9k.d.ts.map +0 -1
  285. package/dist/index-C6TG1LwA.d.ts.map +0 -1
  286. package/dist/index-CKjqN9_U.d.ts.map +0 -1
  287. package/dist/index-CR-guIiZ.d.ts.map +0 -1
  288. package/dist/index-Ucp54Pcl.d.ts.map +0 -1
  289. package/dist/interval-CWyxqDpE.d.ts +0 -43
  290. package/dist/interval-CWyxqDpE.d.ts.map +0 -1
  291. package/dist/kind-factory-BDd4rhML.js.map +0 -1
  292. package/dist/llm-judge-DQJTQx01.js.map +0 -1
  293. package/dist/matrix-DlSrRl_v.d.ts.map +0 -1
  294. package/dist/outcome-observations-DL3CC8w1.js.map +0 -1
  295. package/dist/pareto-Bg75Gajo.js.map +0 -1
  296. package/dist/rubric-predictive-validity--6z0q8s6.js.map +0 -1
  297. package/dist/rubric-predictive-validity-C9wc7f_D.d.ts.map +0 -1
  298. package/dist/run-improvement-loop-CtLyPb5-.d.ts.map +0 -1
  299. package/dist/run-record-Bqg0NZ_e.js.map +0 -1
  300. package/dist/sequential-BphITa5b.js.map +0 -1
  301. package/dist/statistics-DSidA5I2.js.map +0 -1
  302. package/dist/store-tool-spans-C47hUUVM.d.ts.map +0 -1
  303. package/dist/summary-report-CI4J6gxU.js.map +0 -1
  304. package/dist/systemone-MXhFSYdy.d.ts.map +0 -1
  305. package/dist/tool-groups-BSd08M7B.d.ts.map +0 -1
  306. package/dist/tool-waste-CIhtU1ad.d.ts +0 -217
  307. package/dist/tool-waste-CIhtU1ad.d.ts.map +0 -1
  308. package/dist/trace-questions-CJANeK9P.d.ts.map +0 -1
  309. package/dist/types-AGUuvnae.d.ts.map +0 -1
@@ -1,7 +1,386 @@
1
- import { P as DEFAULT_JUDGE_MODEL } from "../cluster-Bj90LK-1.js";
2
- import { C as JudgeDimension, w as JudgeScore } from "../types-DD1eUTLn.js";
3
- 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-DlSrRl_v.js";
1
+ import { h as MaximumCharge, o as CostLedgerHandle } from "../cost-ledger-CSP-OfFe.js";
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";
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";
4
13
  import { AgentProfile } from "@tangle-network/agent-interface";
14
+ /** A scenario a simulated user plays: its persona, and optionally a plan. */
15
+ interface ConversationScenario<TPersona extends MultishotPersona = MultishotPersona> extends Scenario {
16
+ persona: TPersona;
17
+ /** What the simulated user sets out to do in this scenario, appended to its
18
+ * prompt. Part of the simulated-user identity. */
19
+ userPlan?: string;
20
+ /** Set on a scenario an adversarial-user search emitted. Such a scenario
21
+ * trains the agent side and never enters a held-out split. */
22
+ origin?: {
23
+ kind: 'adversarial-user';
24
+ sourceScenarioId: string;
25
+ planDigest: string;
26
+ };
27
+ }
28
+ /** The code-checked outcome of one conversation: the objective part of its score. */
29
+ interface ConversationOutcome {
30
+ passed: boolean;
31
+ detail: string;
32
+ }
33
+ /** How a conversation ended. `turn` is the agent turn after which it ended. */
34
+ interface ConversationEnding {
35
+ kind: 'signed-off' | 'gave-up' | 'turn-cap';
36
+ turn: number;
37
+ }
38
+ type UserEndingClassification = {
39
+ kind: 'continue';
40
+ } | {
41
+ kind: 'signed-off' | 'gave-up';
42
+ message: string;
43
+ };
44
+ /** How the simulated user ends a conversation before the turn cap. */
45
+ interface UserEndingProtocol {
46
+ /** Stable name of `classify`'s rule. Part of the simulated-user identity. */
47
+ ref: string;
48
+ /** Appended to the simulated user's prompt. Part of its identity. */
49
+ instructions: string;
50
+ /** Reads one simulated-user message. An ending returns the message with its
51
+ * protocol marker removed: the marker is protocol, never something the
52
+ * agent sees or the user said. */
53
+ classify(message: string): UserEndingClassification;
54
+ }
55
+ /** Ends on `[[signed-off]]` when the user's problem is resolved and on
56
+ * `[[gave-up]]` when the user would stop using the service. */
57
+ export declare const DEFAULT_USER_ENDING: UserEndingProtocol;
58
+ /** The simulated user. Its options never depend on the candidate surface. */
59
+ interface SimulatedUserOptions<TPersona extends MultishotPersona = MultishotPersona> {
60
+ model: string;
61
+ /** Tried in order when a model returns an empty message twice. */
62
+ fallbackModels?: string[];
63
+ transport: MultishotTransport;
64
+ /** Default `'demanding'`. */
65
+ rigor?: PersonaRigor;
66
+ /** How the user refers to the agent. Fixed for the simulated user: its
67
+ * prompt never derives from the candidate profile. Default `'an AI agent'`. */
68
+ agentDescription?: string;
69
+ /** Overrides the derived opener and prompt; requires `shapeRef`. */
70
+ shape?: MultishotShape<TPersona>;
71
+ /** Stable name for `shape`'s callbacks. Part of the simulated-user identity. */
72
+ shapeRef?: string;
73
+ /** Maximum output tokens per simulated-user message. Default 600. */
74
+ maxTokens?: number;
75
+ /** Default `DEFAULT_USER_ENDING`. */
76
+ ending?: UserEndingProtocol;
77
+ /** Recognizes a user message that pushes back on the agent's last reply.
78
+ * Without it the first pushback turn is reported as undetermined. */
79
+ pushback?: (message: string) => boolean;
80
+ }
81
+ /** The agent leg: everything about the agent except the candidate surface. */
82
+ interface ConversationAgentOptions {
83
+ model: string;
84
+ transport: MultishotTransport;
85
+ /** Tools advertised to the agent. Default: none. */
86
+ tools?: MultishotToolDefinition[];
87
+ /** Required with `tools`. Paid work runs through the executor's
88
+ * `ctx.transport`, which is metered; other executor spend is not. */
89
+ toolExecutors?: Record<string, MultishotToolExecutor>;
90
+ artifactTypeFor?: (toolName: string) => string | undefined;
91
+ /** Default: `transport`. */
92
+ toolTransport?: MultishotTransport;
93
+ maxTokens?: number;
94
+ toolFollowupMaxTokens?: number;
95
+ maxToolDispatches?: number;
96
+ }
97
+ /** What the outcome check reads. */
98
+ interface ConversationRecord {
99
+ transcript: MultishotMessage[];
100
+ artifacts: MultishotArtifact[];
101
+ ending: ConversationEnding;
102
+ }
103
+ type ConversationLeg = 'agent' | 'user' | 'tool';
104
+ interface MultishotRolloutOptions<TScenario extends ConversationScenario> {
105
+ agent: ConversationAgentOptions;
106
+ /** The agent profile a candidate surface becomes. Default: a text surface
107
+ * is the agent's system prompt; any other surface needs this mapping. */
108
+ profile?: (surface: MutableSurface, scenario: TScenario) => AgentProfile;
109
+ user: SimulatedUserOptions<TScenario['persona']>;
110
+ /** Agent turns at most. The simulated user may end the conversation sooner. */
111
+ maxTurns: number;
112
+ /** Decides by code whether the conversation reached its goal. */
113
+ outcome: (conversation: ConversationRecord, scenario: TScenario) => ConversationOutcome;
114
+ /** Hard maximum for one leg's call, required by a capped campaign. */
115
+ maximumCharge?: (leg: ConversationLeg, request: MultishotTransportRequest) => MaximumCharge | undefined;
116
+ /** Version of behavior the options cannot show, such as tool executor code
117
+ * or the outcome rule. Part of `dispatchRef`. */
118
+ revision?: string;
119
+ }
120
+ /** Who the agent talked to. Equal digests mean the same simulated user: model,
121
+ * fallbacks, rigor, persona, prompt, opener and ending protocol. */
122
+ interface SimulatedUserIdentity {
123
+ digest: string;
124
+ model: string;
125
+ fallbackModels: string[];
126
+ rigor: PersonaRigor;
127
+ personaId: string;
128
+ personaDigest: string;
129
+ promptDigest: string;
130
+ openerDigest: string;
131
+ endingRef: string;
132
+ shapeRef: string;
133
+ maxTokens: number;
134
+ }
135
+ type PushbackReading = {
136
+ determined: false;
137
+ } | {
138
+ determined: true;
139
+ firstTurn: number | null;
140
+ };
141
+ /** One conversation, as the dispatch returns it. */
142
+ interface ConversationArtifact {
143
+ transcript: MultishotMessage[];
144
+ artifacts: MultishotArtifact[];
145
+ toolCalls: number;
146
+ agentTurns: number;
147
+ ending: ConversationEnding;
148
+ outcome: ConversationOutcome;
149
+ /** The driver turn at which the user first pushed back on the agent. */
150
+ pushback: PushbackReading;
151
+ simulatedUser: SimulatedUserIdentity;
152
+ /** The campaign cell seed every leg asked for. */
153
+ seed: number;
154
+ /** Which side of the conversation the candidate surface was. A score on
155
+ * the agent's success only reads `'agent'` conversations. */
156
+ optimizedRole: 'agent' | 'user';
157
+ }
158
+ interface MultishotRollout<TScenario extends ConversationScenario> {
159
+ /** The dispatch: run one conversation with `surface` as the agent. */
160
+ agent: (surface: MutableSurface, scenario: TScenario, ctx: DispatchContext) => Promise<ConversationArtifact>;
161
+ /** Version of everything but the surface, for measurement caches. */
162
+ dispatchRef: string;
163
+ /** The simulated user `agent` puts in front of the agent for `scenario`. */
164
+ simulatedUser: (scenario: TScenario) => SimulatedUserIdentity;
165
+ }
166
+ /**
167
+ * Run a multishot conversation as the `agent(surface, scenario, ctx)` dispatch
168
+ * of `selfImprove` and `compareOptimizationMethods`. Pass `dispatchRef` along
169
+ * with `agent`, score with `conversationJudge`, gate with `conversationGate`
170
+ * and show the optimizer `describeConversation`.
171
+ */
172
+ export declare function multishotRollout<TScenario extends ConversationScenario>(opts: MultishotRolloutOptions<TScenario>): MultishotRollout<TScenario>;
173
+ /** One real user turn and the context the user wrote it in. */
174
+ interface RecordedUserTurn {
175
+ /** The independent unit: one recorded conversation. */
176
+ conversationId: string;
177
+ /** The task the conversation served. Absent when the record names none. */
178
+ taskId?: string;
179
+ /** Index of the message among the conversation's user messages; the opener is 0. */
180
+ turn: number;
181
+ /** What the user saw before writing: user and agent messages, in order. */
182
+ context: Array<{
183
+ role: 'user' | 'assistant';
184
+ content: string;
185
+ }>;
186
+ /** `userTurnContextDigest` of `taskId` and `context`; absent without a task. */
187
+ contextDigest?: string;
188
+ realMessage: string;
189
+ /** Where the turn was recorded. */
190
+ evidenceRefs?: EvidenceRef[];
191
+ }
192
+ /** The shared-context identity of a user turn: its task and visible context. */
193
+ export declare function userTurnContextDigest(input: {
194
+ taskId: string;
195
+ context: RecordedUserTurn['context'];
196
+ }): string;
197
+ /**
198
+ * The real user turns of one recorded conversation, from its trajectory: each
199
+ * model call whose input ends in a user message that answers an agent message
200
+ * is one turn. System and tool messages are not part of what the user saw. A
201
+ * run without a task identity yields rows without a context digest.
202
+ */
203
+ export declare function recordedUserTurns(trajectory: Trajectory, run: Pick<Run, 'scenarioId' | 'layer' | 'tags'> | undefined): RecordedUserTurn[];
204
+ /** A recorded turn carries no proof of a shared context, or a proof its
205
+ * context does not match. */
206
+ export declare class SharedContextIdentityError extends Error {
207
+ readonly conversationId: string;
208
+ readonly turn: number;
209
+ constructor(row: Pick<RecordedUserTurn, 'conversationId' | 'turn'>, reason: string);
210
+ }
211
+ /** Writes the user's next message for a recorded context. */
212
+ interface RealismDriver {
213
+ /** Stable identity of everything that shapes the driver's message. */
214
+ identity: string;
215
+ next(input: {
216
+ turn: RecordedUserTurn;
217
+ signal?: AbortSignal;
218
+ costLedger?: CostLedgerHandle;
219
+ }): Promise<string>;
220
+ }
221
+ /**
222
+ * The simulated user a rollout runs, as a realism driver: the same prompt,
223
+ * the same driver point of view on the recorded context, the same model
224
+ * rotation. An ending marker is removed, as a rollout removes it.
225
+ */
226
+ export declare function simulatedUserDriver<TPersona extends MultishotPersona>(opts: {
227
+ user: SimulatedUserOptions<TPersona>;
228
+ /** The persona the user plays for a recorded conversation. */
229
+ persona: (turn: RecordedUserTurn) => TPersona;
230
+ plan?: string;
231
+ }): RealismDriver;
232
+ /** The realism question: which of two messages did the real user write. */
233
+ export declare const SIMULATOR_REALISM_QUESTIONS: {
234
+ readonly real: {
235
+ readonly type: "choice";
236
+ readonly instructions: string;
237
+ readonly criteria: {
238
+ readonly a: "The real user wrote message a.";
239
+ readonly b: "The real user wrote message b.";
240
+ };
241
+ };
242
+ };
243
+ interface SimulatorRealismJudgeOptions {
244
+ id: string;
245
+ version: string;
246
+ /** Requested judge model. */
247
+ model: string;
248
+ ledger: FindingsLedger;
249
+ evaluator: SystemOneEvaluatorOptions;
250
+ /** Agreement with independent real-or-simulated labels, bound to this exact
251
+ * question, model and served model through `questionDigest`. Without it
252
+ * every judgment is recorded as uncalibrated. */
253
+ calibration?: FindingCalibration & {
254
+ servedModel: string;
255
+ questionDigest: string;
256
+ evidenceRefs: EvidenceRef[];
257
+ };
258
+ /** Default 0.6. */
259
+ minimumProbability?: number;
260
+ /** Default 0.2. */
261
+ minimumMargin?: number;
262
+ }
263
+ interface SimulatorRealismJudge {
264
+ id: string;
265
+ definitionDigest: string;
266
+ /** The digest a calibration of this judge must carry, for the served model
267
+ * the calibration names, else the requested model. */
268
+ questionDigest: string;
269
+ /** The calibration clears `DECISION_POINT_MIN_KAPPA` and binds this question. */
270
+ calibrated: boolean;
271
+ decide: ReturnType<typeof decisionPoint<typeof SIMULATOR_REALISM_QUESTIONS>>['decide'];
272
+ }
273
+ /** The realism judge as a System One decision point at the turn layer. */
274
+ export declare function simulatorRealismJudge(opts: SimulatorRealismJudgeOptions): SimulatorRealismJudge;
275
+ interface MeasureSimulatorRealismOptions {
276
+ turns: readonly RecordedUserTurn[];
277
+ driver: RealismDriver;
278
+ judge: SimulatorRealismJudge;
279
+ /** Ledger run the judgments are recorded under. Repeating a measurement
280
+ * under the same run replays its recorded judgments, and a changed input
281
+ * under it counts as a failed judgment, so use a new run per measurement. */
282
+ runId: string;
283
+ /** ISO-8601 time stamped on the judgments. Default: now. */
284
+ at?: string;
285
+ /** Judge at most this many turns, drawn with `seed`. Default: all. */
286
+ sample?: number;
287
+ confidence?: number;
288
+ resamples?: number;
289
+ seed?: number;
290
+ costLedger?: CostLedgerHandle;
291
+ signal?: AbortSignal;
292
+ }
293
+ interface SimulatorRealismReport {
294
+ driver: string;
295
+ judge: {
296
+ id: string;
297
+ definitionDigest: string;
298
+ /** Calibrated, and every judgment ran on the calibrated model. */
299
+ calibrated: boolean;
300
+ /** Judgments by System One reason: threshold, uncertain, uncalibrated, model-mismatch. */
301
+ reasons: Record<string, number>;
302
+ };
303
+ conversations: number;
304
+ turns: number;
305
+ /** Judged presentations; each turn is shown in both orders. */
306
+ presentations: number;
307
+ failedJudgments: number;
308
+ /** Share of presentations where the judge picked the real message, each
309
+ * conversation weighted equally, with a bootstrap interval over conversations. */
310
+ accuracy: {
311
+ mean: number;
312
+ low: number;
313
+ high: number;
314
+ confidence: number;
315
+ resamples: number;
316
+ };
317
+ meanProbabilityOnReal: number;
318
+ /** The interval contains 0.5. */
319
+ indistinguishable: boolean;
320
+ }
321
+ /** Measure how often a judge tells the driver's message from the real user's. */
322
+ export declare function measureSimulatorRealism(opts: MeasureSimulatorRealismOptions): Promise<SimulatorRealismReport>;
323
+ /** Scenarios for the user-side search would reach the agent's held-out split. */
324
+ export declare class AdversarialSplitError extends Error {
325
+ readonly scenarioIds: string[];
326
+ constructor(scenarioIds: string[]);
327
+ }
328
+ interface AdversarialUserOptions<TScenario extends ConversationScenario> {
329
+ /** The conversation; the agent side is fixed to `agentProfile`. */
330
+ rollout: Omit<MultishotRolloutOptions<TScenario>, 'profile'>;
331
+ agentProfile: AgentProfile;
332
+ /** The plan the search starts from: the user's surface. */
333
+ baselinePlan: string;
334
+ /** Personas the search runs on, held-out cases included. */
335
+ scenarios: TScenario[];
336
+ /** The agent side's held-out scenarios. No scenario of this search may share
337
+ * an id or a persona with them. */
338
+ agentHeldOut: readonly TScenario[];
339
+ proposer?: SurfaceProposer;
340
+ method?: OptimizationMethod<TScenario, ConversationArtifact>;
341
+ selectionScenarios?: TScenario[];
342
+ budget?: SelfImproveBudget;
343
+ runDir?: string;
344
+ storage?: CampaignStorage;
345
+ expectUsage?: 'assert' | 'warn' | 'off';
346
+ /** Snapshot model id, for an agent leg that reports no receipt model. */
347
+ model?: string;
348
+ /** The admission floor, measured on the winning plan. */
349
+ realism: {
350
+ turns: readonly RecordedUserTurn[];
351
+ judge: SimulatorRealismJudge;
352
+ runId: string;
353
+ at?: string;
354
+ /** The persona the user plays for a recorded conversation. */
355
+ persona: (turn: RecordedUserTurn) => TScenario['persona'];
356
+ /** Highest judge accuracy, at the interval's upper end, a plan may reach
357
+ * and still count as realistic. 0.5 is indistinguishable. */
358
+ maxJudgeAccuracy: number;
359
+ sample?: number;
360
+ confidence?: number;
361
+ resamples?: number;
362
+ seed?: number;
363
+ costLedger?: CostLedgerHandle;
364
+ };
365
+ }
366
+ interface AdversarialUserResult<TScenario extends ConversationScenario> {
367
+ /** The user-side search, scored on the agent's failure rate. */
368
+ improvement: SelfImproveResult<TScenario, ConversationArtifact>;
369
+ /** The selected plan. */
370
+ plan: string;
371
+ /** Realism of the selected plan; null when the search did not ship. */
372
+ realism: SimulatorRealismReport | null;
373
+ admitted: boolean;
374
+ 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. */
377
+ trainScenarios: TScenario[];
378
+ }
379
+ /**
380
+ * Search for a simulated-user plan that makes a fixed agent fail, admit it
381
+ * only above a realism floor, and emit what it breaks as agent train scenarios.
382
+ */
383
+ export declare function improveAdversarialUser<TScenario extends ConversationScenario>(opts: AdversarialUserOptions<TScenario>): Promise<AdversarialUserResult<TScenario>>;
5
384
  /** Prompt and completion tokens one leg reported. */
6
385
  interface MultishotLegTokens {
7
386
  input: number;
@@ -48,6 +427,81 @@ type MultishotConversationDriver = (conversation: MultishotConversation) => Prom
48
427
  * matrix bills the failed cell for the turns it already paid for.
49
428
  */
50
429
  export declare function runMultishotConversation<TPersona extends MultishotPersona>(opts: RunMultishotOptions<TPersona>, drive: MultishotConversationDriver): Promise<MultishotResult>;
430
+ interface SimulatedUserMismatch {
431
+ cellId: string;
432
+ /** `missing`: a cell carries no identity. `simulated-user`: the identities
433
+ * differ. `seed`: the same user ran on different seeds. */
434
+ reason: 'missing' | 'simulated-user' | 'seed';
435
+ detail: string;
436
+ }
437
+ /** Paired conversations did not meet the same simulated user on the same seed. */
438
+ export declare class SimulatedUserMismatchError extends Error {
439
+ readonly mismatches: SimulatedUserMismatch[];
440
+ constructor(mismatches: SimulatedUserMismatch[]);
441
+ }
442
+ /** A score on the agent's success was asked to read a conversation whose
443
+ * user side was the candidate. Optimizing the user to raise the agent's
444
+ * success would teach it to be easy; the user side's objective is the
445
+ * agent's failure rate, through `improveAdversarialUser` only. */
446
+ export declare class UserSideObjectiveError extends Error {
447
+ constructor(message: string);
448
+ }
449
+ /** A scenario an adversarial-user search emitted reached a held-out split. */
450
+ export declare class AdversarialScenarioInHeldOutError extends Error {
451
+ readonly scenarioIds: string[];
452
+ constructor(scenarioIds: string[]);
453
+ }
454
+ /**
455
+ * Refuse a comparison whose paired conversations (same cell id) met different
456
+ * simulated users or ran on different seeds, or carry no identity to show it.
457
+ */
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`. */
461
+ export declare function assertHeldOutExcludesAdversarial(scenarios: readonly ConversationScenario[]): void;
462
+ interface ConversationJudgeOptions<TScenario extends ConversationScenario> {
463
+ /** Scores a passed conversation on [0, 1] for what the outcome check does
464
+ * not see, such as tone. A failed conversation scores 0 without it. */
465
+ semantic?: JudgeConfig<ConversationArtifact, TScenario>;
466
+ }
467
+ /**
468
+ * Score the agent side of a conversation: 0 when the code-checked outcome
469
+ * failed, else 1, or the semantic judge's composite when one is given. The
470
+ * `outcome` dimension is always the code check. Refuses a conversation whose
471
+ * user side was the candidate.
472
+ */
473
+ export declare function conversationJudge<TScenario extends ConversationScenario>(opts?: ConversationJudgeOptions<TScenario>): JudgeConfig<ConversationArtifact, TScenario>;
474
+ interface ConversationGateOptions<TScenario extends ConversationScenario> {
475
+ /** The decision once conditions hold. Default `defaultProductionGate` over
476
+ * the gate's held-out scenarios with `deltaThreshold`. */
477
+ inner?: Gate<ConversationArtifact, TScenario>;
478
+ /** Default 0.05, as `selfImprove`'s default gate. */
479
+ deltaThreshold?: number;
480
+ independentUnitByScenarioId?: ReadonlyMap<string, string>;
481
+ }
482
+ /**
483
+ * The promotion gate for conversations: refuses a held-out split containing
484
+ * adversarial-user scenarios and any comparison whose arms met different
485
+ * simulated users or seeds, then decides with `inner`.
486
+ */
487
+ export declare function conversationGate<TScenario extends ConversationScenario>(opts?: ConversationGateOptions<TScenario>): Gate<ConversationArtifact, TScenario>;
488
+ interface ConversationEvidence {
489
+ /** The code-checked outcome. */
490
+ outcome: {
491
+ passed: boolean;
492
+ detail: string;
493
+ };
494
+ /** How the simulated user ended the conversation. */
495
+ ending: ConversationEnding;
496
+ agentTurns: number;
497
+ /** The driver turn at which the user first pushed back; `null` when the
498
+ * user never did, `'undetermined'` when the rollout has no pushback rule. */
499
+ firstPushbackTurn: number | null | 'undetermined';
500
+ /** The transcript, its head and tail kept when it is long. */
501
+ transcript: string;
502
+ }
503
+ /** The evidence a reflection reads for one conversation. */
504
+ export declare function describeConversation(artifact: ConversationArtifact): ConversationEvidence;
51
505
  /**
52
506
  * Rough per-model cost estimate from token counts. Underestimates Anthropic,
53
507
  * overestimates open-weight models — accurate enough for a cost ceiling, and
@@ -87,5 +541,5 @@ export declare function defaultDelegationTools(config?: DefaultToolsConfig): Def
87
541
  /** The fully-resolved shape for a profile: caller overrides win, the
88
542
  * profile-derived defaults fill the rest. */
89
543
  export declare function defaultShapeFromProfile<TPersona extends MultishotPersona>(profile: AgentProfile, shape?: MultishotShape<TPersona>): Required<MultishotShape<TPersona>>;
90
- export { type ArtifactJudgeInput, type CellCompositeInput, type CellCompositeScore, type ConversationJudgeInput, DEFAULT_JUDGE_MODEL, type DefaultCoderConfig, type DefaultResearcherConfig, type DefaultToolsBundle, type DefaultToolsConfig, type JudgeDimension, type JudgeRunResult, type JudgeScore, 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 MultishotShape, type MultishotShot, type MultishotToolDefinition, type MultishotToolExecutor, type MultishotTransport, type MultishotTransportRequest, type MultishotTransportResponse, type MultishotTransportToolCall, type RunMultishotMatrixOptions, type RunMultishotMatrixResult, type RunMultishotOptions, assertMultishotShotResult, computeCellComposite, renderDimensions, renderJsonFooter, runJudge, runMultishot, runMultishotMatrix };
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 };
91
545
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","names":[],"sources":["../../src/multishot/conversation.ts","../../src/multishot/cost.ts","../../src/multishot/default-tools.ts","../../src/multishot/shape-defaults.ts"],"mappings":";;;;;UA2BiB;EACf;EACA;;;;;UAMe;EACf,QAAQ;EACR;;;;UAKe;;WAEN;;WAEA;;WAEA;;WAEA;;WAEA;;;;EAIT,UAAU,eAAe,QAAQ;;;;EAIjC,WAAW,eAAe,QAAQ;IAAsB;;;;KAI9C,+BAA+B,cAAc,0BAA0B;;;;;;;;wBAiB7D,yBAAyB,iBAAiB,kBAC9D,MAAM,oBAAoB,WAC1B,OAAO,8BACN,QAAQ;;;;;;;wBC3EK,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
+ {"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,UAAU,cAAc;;;;;;;;wBA6D1B,iBAAiB,kBAAkB,sBACjD,MAAM,wBAAwB,aAC7B,iBAAiB;;UChPH;;EAEf;;EAEA;;EAEA;;EAEA,SAAS;IAAQ;IAA4B;;;EAE7C;EACA;;EAEA,eAAe;;;wBAID,sBAAsB;EACpC;EACA,SAAS;;;;;;;;wBAWK,kBACd,YAAY,YACZ,KAAK,KAAK,oDACT;;;qBAqCU,mCAAmC;WACrC;WACA;EACG,YAAA,KAAK,KAAK,8CAA8C;;;UAqBrD;;EAEf;EACA,KAAK;IACH,MAAM;IACN,SAAS;IACT,aAAa;MACX;;;;;;;wBAQU,oBAAoB,iBAAiB,kBAAkB;EACrE,MAAM,qBAAqB;;EAE3B,UAAU,MAAM,qBAAqB;EACrC;IACE;;qBAuDS;;;;;;;;;;UAgBI;EACf;EACA;;EAEA;EACA,QAAQ;EACR,WAAW;;;;EAIX,cAAc;IACZ;IACA;IACA,cAAc;;;EAGhB;;EAEA;;UAGe;EACf;EACA;;;EAGA;;EAEA;EACA,QAAQ,kBAAkB,qBAAqB;;;wBAIjC,sBAAsB,MAAM,+BAA+B;UAsC1D;EACf,gBAAgB;EAChB,QAAQ;EACR,OAAO;;;;EAIP;;EAEA;;EAEA;EACA;EACA;EACA;EACA,aAAa;EACb,SAAS;;UAGM;EACf;EACA;IACE;IACA;;IAEA;;IAEA,SAAS;;EAEX;EACA;;EAEA;EACA;;;EAGA;IAAY;IAAc;IAAa;IAAc;IAAoB;;EACzE;;EAEA;;;wBAIoB,wBACpB,MAAM,iCACL,QAAQ;;qBC/SE,8BAA8B;WAChC;EACG,YAAA;;UAUG,uBAAuB,kBAAkB;;EAExD,SAAS,KAAK,wBAAwB;EACtC,cAAc;;EAEd;;EAEA,WAAW;;;EAGX,uBAAuB;EACvB,WAAW;EACX,SAAS,mBAAmB,WAAW;EACvC,qBAAqB;EACrB,SAAS;EACT;EACA,UAAU;EACV;;EAEA;;EAEA;IACE,gBAAgB;IAChB,OAAO;IACP;IACA;;IAEA,UAAU,MAAM,qBAAqB;;;IAGrC;IACA;IACA;IACA;IACA;IACA,aAAa;;;UAIA,sBAAsB,kBAAkB;;EAEvD,aAAa,kBAAkB,WAAW;;EAE1C;;EAEA,SAAS;EACT;EACA;;;EAGA,gBAAgB;;;;;;wBAOI,uBAAuB,kBAAkB,sBAC7D,MAAM,uBAAuB,aAC5B,QAAQ,sBAAsB;;UCnFhB;EACf;EACA;;;;;UAMe;EACf,QAAQ;EACR;;;;UAKe;;WAEN;;WAEA;;WAEA;;WAEA;;WAEA;;;;EAIT,UAAU,eAAe,QAAQ;;;;EAIjC,WAAW,eAAe,QAAQ;IAAsB;;;;KAI9C,+BAA+B,cAAc,0BAA0B;;;;;;;;wBAiB7D,yBAAyB,iBAAiB,kBAC9D,MAAM,oBAAoB,WAC1B,OAAO,8BACN,QAAQ;UChEM;EACf;;;EAGA;EACA;;;qBAIW,mCAAmC;WACrC,YAAY;EACT,YAAA,YAAY;;;;;;qBAkBb,+BAA+B;EAC9B,YAAA;;;qBAOD,0CAA0C;WAC5C;EACG,YAAA;;;;;;wBAcE,wBACd,UAAU,oBAAoB,uBAC9B,WAAW,oBAAoB;;;wBAiDjB,iCAAiC,oBAAoB;UAOpD,yBAAyB,kBAAkB;;;EAG1D,WAAW,YAAY,sBAAsB;;;;;;;;wBAS/B,kBAAkB,kBAAkB,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;UCxLb;;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"}