@tangle-network/agent-eval 2.0.7 → 2.0.10

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 (314) hide show
  1. package/CHANGELOG.md +80 -16
  2. package/dist/adapters/http.d.ts +2 -2
  3. package/dist/{agent-profile-CRdalpZv.d.ts → agent-profile-_JzxgLDM.d.ts} +11 -5
  4. package/dist/{agent-profile-CRdalpZv.d.ts.map → agent-profile-_JzxgLDM.d.ts.map} +1 -1
  5. package/dist/analyst/index.d.ts +14 -13
  6. package/dist/analyst/index.d.ts.map +1 -1
  7. package/dist/analyst/index.js +34 -13
  8. package/dist/analyst/index.js.map +1 -1
  9. package/dist/analyze-runs-Izz_ZeWg.d.ts +65 -0
  10. package/dist/analyze-runs-Izz_ZeWg.d.ts.map +1 -0
  11. package/dist/{analyze-runs-C_9cXPZn.js → analyze-runs-xhH2Qxoc.js} +6 -5
  12. package/dist/{analyze-runs-C_9cXPZn.js.map → analyze-runs-xhH2Qxoc.js.map} +1 -1
  13. package/dist/app-grade/index.d.ts +4 -4
  14. package/dist/app-grade/index.js +1 -1
  15. package/dist/{benchmark-command-DkBMUDwy.js → benchmark-command-CGQXNFj7.js} +12 -8
  16. package/dist/benchmark-command-CGQXNFj7.js.map +1 -0
  17. package/dist/benchmarks/index.d.ts +4 -4
  18. package/dist/benchmarks/index.js +4 -4
  19. package/dist/builder-eval/index.js +2 -2
  20. package/dist/calibration-CrORXMWx.d.ts +128 -0
  21. package/dist/calibration-CrORXMWx.d.ts.map +1 -0
  22. package/dist/{calibration-Cfoup0xz.js → calibration-Dz8mQb5P.js} +2 -2
  23. package/dist/{calibration-Cfoup0xz.js.map → calibration-Dz8mQb5P.js.map} +1 -1
  24. package/dist/campaign/index.d.ts +8 -8
  25. package/dist/campaign/index.js +13 -12
  26. package/dist/{campaign-DfSWSreo.js → campaign-eus7YRs2.js} +1590 -15
  27. package/dist/campaign-eus7YRs2.js.map +1 -0
  28. package/dist/{campaign-evidence-BojANgU7.d.ts → campaign-evidence-BOcX4w0r.d.ts} +5 -5
  29. package/dist/{campaign-evidence-BojANgU7.d.ts.map → campaign-evidence-BOcX4w0r.d.ts.map} +1 -1
  30. package/dist/{campaign-evidence-D_oBFfLc.js → campaign-evidence-KM5GTsHG.js} +5 -5
  31. package/dist/{campaign-evidence-D_oBFfLc.js.map → campaign-evidence-KM5GTsHG.js.map} +1 -1
  32. package/dist/{cluster-Bj90LK-1.d.ts → chat-client-BlTooBDA.d.ts} +9 -241
  33. package/dist/chat-client-BlTooBDA.d.ts.map +1 -0
  34. package/dist/{chat-client-CvyDOQBv.js → chat-client-Oyot5tyo.js} +2 -2
  35. package/dist/{chat-client-CvyDOQBv.js.map → chat-client-Oyot5tyo.js.map} +1 -1
  36. package/dist/{chat-json-call-DMrwmB-k.js → chat-json-call-DTmv2uNY.js} +2 -2
  37. package/dist/{chat-json-call-DMrwmB-k.js.map → chat-json-call-DTmv2uNY.js.map} +1 -1
  38. package/dist/cli.js +7 -7
  39. package/dist/cluster-BJ0nW3P7.d.ts +241 -0
  40. package/dist/cluster-BJ0nW3P7.d.ts.map +1 -0
  41. package/dist/{cluster-bootstrap-DPzVy3_K.js → cluster-bootstrap-CTC8Dd30.js} +3 -2
  42. package/dist/{cluster-bootstrap-DPzVy3_K.js.map → cluster-bootstrap-CTC8Dd30.js.map} +1 -1
  43. package/dist/{completion-verifier-DsotH2l3.js → completion-verifier-CCPG2Yc0.js} +3 -3
  44. package/dist/{completion-verifier-DsotH2l3.js.map → completion-verifier-CCPG2Yc0.js.map} +1 -1
  45. package/dist/{completion-verifier-Cy38EpGE.d.ts → completion-verifier-CQOC3_bm.d.ts} +2 -2
  46. package/dist/{completion-verifier-Cy38EpGE.d.ts.map → completion-verifier-CQOC3_bm.d.ts.map} +1 -1
  47. package/dist/contract/index.d.ts +14 -12
  48. package/dist/contract/index.js +14 -12
  49. package/dist/contract/index.js.map +1 -1
  50. package/dist/{decision-point-C46p-p9v.js → decision-point-CfqtnGop.js} +3 -3
  51. package/dist/{decision-point-C46p-p9v.js.map → decision-point-CfqtnGop.js.map} +1 -1
  52. package/dist/{default-registry-BWFPtmuI.js → default-registry-Rs5uzlfJ.js} +4 -4
  53. package/dist/{default-registry-BWFPtmuI.js.map → default-registry-Rs5uzlfJ.js.map} +1 -1
  54. package/dist/{default-registry-xoX0PMCb.d.ts → default-registry-X8McMoUV.d.ts} +6 -6
  55. package/dist/{default-registry-xoX0PMCb.d.ts.map → default-registry-X8McMoUV.d.ts.map} +1 -1
  56. package/dist/define-agent-eval-D8ntOXqV.js +96 -0
  57. package/dist/define-agent-eval-D8ntOXqV.js.map +1 -0
  58. package/dist/define-agent-eval-DH5-xi-F.d.ts +52 -0
  59. package/dist/define-agent-eval-DH5-xi-F.d.ts.map +1 -0
  60. package/dist/diagnosis/index.d.ts +3 -3
  61. package/dist/diagnosis/index.js +1 -1
  62. package/dist/{dspy-rlm-engine-r7YpKLhS.js → dspy-rlm-engine-ChE1PUM5.js} +3 -3
  63. package/dist/{dspy-rlm-engine-r7YpKLhS.js.map → dspy-rlm-engine-ChE1PUM5.js.map} +1 -1
  64. package/dist/{emitter-BjW3NnX-.js → emitter-xN9wGTVw.js} +9 -2
  65. package/dist/{emitter-BjW3NnX-.js.map → emitter-xN9wGTVw.js.map} +1 -1
  66. package/dist/{eval-campaign-Cyk-tkLh.js → eval-campaign-BciGnrGy.js} +3 -3
  67. package/dist/{eval-campaign-Cyk-tkLh.js.map → eval-campaign-BciGnrGy.js.map} +1 -1
  68. package/dist/{evaluation-X5E22NQK.d.ts → evaluation-CjZH6gW0.d.ts} +4 -4
  69. package/dist/{evaluation-X5E22NQK.d.ts.map → evaluation-CjZH6gW0.d.ts.map} +1 -1
  70. package/dist/evaluation.d.ts +1 -1
  71. package/dist/{exact-types-DjuabhUV.d.ts → exact-types-BIHqYBYf.d.ts} +2 -2
  72. package/dist/{exact-types-DjuabhUV.d.ts.map → exact-types-BIHqYBYf.d.ts.map} +1 -1
  73. package/dist/{execution-insight-CE20Bxq0.d.ts → execution-insight-YihQrSqd.d.ts} +2 -2
  74. package/dist/{execution-insight-CE20Bxq0.d.ts.map → execution-insight-YihQrSqd.d.ts.map} +1 -1
  75. package/dist/experiment/index.d.ts +5 -5
  76. package/dist/experiment/index.js +10 -184
  77. package/dist/experiment/index.js.map +1 -1
  78. package/dist/{external-optimizer-contracts-ZDBfbZ_s.js → external-optimizer-contracts-BFV8lnhl.js} +7 -2
  79. package/dist/{external-optimizer-contracts-ZDBfbZ_s.js.map → external-optimizer-contracts-BFV8lnhl.js.map} +1 -1
  80. package/dist/{external-optimizer-process-4QdcF7Kd.js → external-optimizer-process-B6emPodQ.js} +3 -3
  81. package/dist/{external-optimizer-process-4QdcF7Kd.js.map → external-optimizer-process-B6emPodQ.js.map} +1 -1
  82. package/dist/{external-optimizer-subprocess-BW0ZWUUr.js → external-optimizer-subprocess-_O06eDVA.js} +35 -376
  83. package/dist/external-optimizer-subprocess-_O06eDVA.js.map +1 -0
  84. package/dist/{feedback-trajectory-BMkJezPc.d.ts → feedback-trajectory-CoQPmSJV.d.ts} +3 -3
  85. package/dist/{feedback-trajectory-BMkJezPc.d.ts.map → feedback-trajectory-CoQPmSJV.d.ts.map} +1 -1
  86. package/dist/finding-scope-B_As3F_v.js +359 -0
  87. package/dist/finding-scope-B_As3F_v.js.map +1 -0
  88. package/dist/{findings-store-DV8WA5nD.js → findings-store-CvYUzQBR.js} +4 -4
  89. package/dist/{findings-store-DV8WA5nD.js.map → findings-store-CvYUzQBR.js.map} +1 -1
  90. package/dist/fuzz.js +1 -1
  91. package/dist/{index-C6TG1LwA.d.ts → index-BSb3fJyZ.d.ts} +318 -131
  92. package/dist/index-BSb3fJyZ.d.ts.map +1 -0
  93. package/dist/{index-CKjqN9_U.d.ts → index-Bk1XEkP7.d.ts} +99 -3
  94. package/dist/index-Bk1XEkP7.d.ts.map +1 -0
  95. package/dist/{index-DAFZRMlF.d.ts → index-BmWw8zN6.d.ts} +10 -8
  96. package/dist/index-BmWw8zN6.d.ts.map +1 -0
  97. package/dist/{index-DKpMyD_Z.d.ts → index-CCOaNmh2.d.ts} +7 -7
  98. package/dist/{index-DKpMyD_Z.d.ts.map → index-CCOaNmh2.d.ts.map} +1 -1
  99. package/dist/{index-xEM_SoCl.d.ts → index-ZffK_5sD.d.ts} +22 -20
  100. package/dist/index-ZffK_5sD.d.ts.map +1 -0
  101. package/dist/{index-BqAPIToS.d.ts → index-aRalB_Ma.d.ts} +3 -3
  102. package/dist/{index-BqAPIToS.d.ts.map → index-aRalB_Ma.d.ts.map} +1 -1
  103. package/dist/index.d.ts +33 -29
  104. package/dist/index.js +28 -25
  105. package/dist/index.js.map +1 -1
  106. package/dist/{analyze-runs-xjKBBqIB.d.ts → insight-report-DYofCMLx.d.ts} +4 -64
  107. package/dist/insight-report-DYofCMLx.d.ts.map +1 -0
  108. package/dist/{integrity-BF0tJK21.js → integrity-DacT3oJ1.js} +2 -2
  109. package/dist/{integrity-BF0tJK21.js.map → integrity-DacT3oJ1.js.map} +1 -1
  110. package/dist/{integrity-B9320cw1.d.ts → integrity-DotDLWtj.d.ts} +2 -2
  111. package/dist/{integrity-B9320cw1.d.ts.map → integrity-DotDLWtj.d.ts.map} +1 -1
  112. package/dist/{judge-gate-DqlzOBOm.js → judge-gate-CpD3wmcf.js} +3 -3
  113. package/dist/{judge-gate-DqlzOBOm.js.map → judge-gate-CpD3wmcf.js.map} +1 -1
  114. package/dist/{llm-client-Dw4x6EdE.js → llm-client-Dk8lBnMh.js} +15 -2
  115. package/dist/{llm-client-Dw4x6EdE.js.map → llm-client-Dk8lBnMh.js.map} +1 -1
  116. package/dist/llm-judge-DYmEdo3M.js +476 -0
  117. package/dist/llm-judge-DYmEdo3M.js.map +1 -0
  118. package/dist/{matrix-CqZSpwgN.d.ts → matrix-BDl7hoBr.d.ts} +6 -2
  119. package/dist/matrix-BDl7hoBr.d.ts.map +1 -0
  120. package/dist/measure-validity-plan-BReXzcVh.d.ts +201 -0
  121. package/dist/measure-validity-plan-BReXzcVh.d.ts.map +1 -0
  122. package/dist/measure-validity-plan-CJkBNzX_.js +154 -0
  123. package/dist/measure-validity-plan-CJkBNzX_.js.map +1 -0
  124. package/dist/meta-eval/index.d.ts +5 -3
  125. package/dist/meta-eval/index.js +808 -15
  126. package/dist/meta-eval/index.js.map +1 -1
  127. package/dist/multishot/golden/index.d.ts +1 -1
  128. package/dist/multishot/index.d.ts +497 -4
  129. package/dist/multishot/index.d.ts.map +1 -1
  130. package/dist/multishot/index.js +1000 -48
  131. package/dist/multishot/index.js.map +1 -1
  132. package/dist/node-transport-DJno8V46.js +62 -0
  133. package/dist/node-transport-DJno8V46.js.map +1 -0
  134. package/dist/openapi.json +1 -1
  135. package/dist/{llm-judge-DQJTQx01.js → optimization-method-4JlbMxd2.js} +38 -513
  136. package/dist/optimization-method-4JlbMxd2.js.map +1 -0
  137. package/dist/{outcome-observations-DL3CC8w1.js → outcome-observations-DEh8_V_P.js} +31 -6
  138. package/dist/outcome-observations-DEh8_V_P.js.map +1 -0
  139. package/dist/outcome-store-CHtuvstd.d.ts +56 -0
  140. package/dist/outcome-store-CHtuvstd.d.ts.map +1 -0
  141. package/dist/{paired-arms-DZhH3FGu.js → paired-arms-CJH5Q0wx.js} +3 -2
  142. package/dist/{paired-arms-DZhH3FGu.js.map → paired-arms-CJH5Q0wx.js.map} +1 -1
  143. package/dist/{paired-promotion-decision-Dn3-jaq4.js → paired-promotion-decision-BtfVwEAk.js} +3 -2
  144. package/dist/{paired-promotion-decision-Dn3-jaq4.js.map → paired-promotion-decision-BtfVwEAk.js.map} +1 -1
  145. package/dist/{paired-promotion-decision-ChHBuuHV.d.ts → paired-promotion-decision-DJlI4z_k.d.ts} +2 -2
  146. package/dist/{paired-promotion-decision-ChHBuuHV.d.ts.map → paired-promotion-decision-DJlI4z_k.d.ts.map} +1 -1
  147. package/dist/{paired-promotion-power-BlzXdgMD.js → paired-promotion-power-DG1avBKf.js} +3 -3
  148. package/dist/{paired-promotion-power-BlzXdgMD.js.map → paired-promotion-power-DG1avBKf.js.map} +1 -1
  149. package/dist/paired-tests-CXcD_B80.js +688 -0
  150. package/dist/paired-tests-CXcD_B80.js.map +1 -0
  151. package/dist/pareto-DIVE5D0T.js +81 -0
  152. package/dist/pareto-DIVE5D0T.js.map +1 -0
  153. package/dist/pipelines/index.d.ts +2 -1
  154. package/dist/pipelines/index.d.ts.map +1 -1
  155. package/dist/pipelines/index.js +1 -1
  156. package/dist/{sequential-BphITa5b.js → power-COie_o6E.js} +181 -4
  157. package/dist/power-COie_o6E.js.map +1 -0
  158. package/dist/{prime-protocol-Cv6_47rh.d.ts → prime-protocol-BRMk6dGI.d.ts} +2 -2
  159. package/dist/{prime-protocol-Cv6_47rh.d.ts.map → prime-protocol-BRMk6dGI.d.ts.map} +1 -1
  160. package/dist/{promotion-gate-CGkxh36r.d.ts → promotion-gate-B0VTBoXg.d.ts} +2 -2
  161. package/dist/{promotion-gate-CGkxh36r.d.ts.map → promotion-gate-B0VTBoXg.d.ts.map} +1 -1
  162. package/dist/{promotion-policy-CxDIh-9p.js → promotion-policy-BgI7PsQn.js} +4 -4
  163. package/dist/{promotion-policy-CxDIh-9p.js.map → promotion-policy-BgI7PsQn.js.map} +1 -1
  164. package/dist/{proposal-findings-DedMih-u.js → proposal-findings-CfRFCFXS.js} +2 -2
  165. package/dist/{proposal-findings-DedMih-u.js.map → proposal-findings-CfRFCFXS.js.map} +1 -1
  166. package/dist/{registry-CIjC6SdV.d.ts → registry-BeInzotS.d.ts} +4 -4
  167. package/dist/{registry-CIjC6SdV.d.ts.map → registry-BeInzotS.d.ts.map} +1 -1
  168. package/dist/{release-confidence-BLHOMK5Q.js → release-confidence-Cndq1hwi.js} +2 -2
  169. package/dist/{release-confidence-BLHOMK5Q.js.map → release-confidence-Cndq1hwi.js.map} +1 -1
  170. package/dist/reporting.d.ts +5 -5
  171. package/dist/reporting.js +6 -5
  172. package/dist/reporting.js.map +1 -1
  173. package/dist/{research-report-D6XIK0eK.d.ts → research-report-CL5_UqCX.d.ts} +2 -2
  174. package/dist/{research-report-D6XIK0eK.d.ts.map → research-report-CL5_UqCX.d.ts.map} +1 -1
  175. package/dist/{researcher---DhHG4J.d.ts → researcher-BOpZP_Ja.d.ts} +4 -4
  176. package/dist/{researcher---DhHG4J.d.ts.map → researcher-BOpZP_Ja.d.ts.map} +1 -1
  177. package/dist/{reward-hacking-DKAflk2c.js → reward-hacking-DMTm1OBd.js} +2 -2
  178. package/dist/{reward-hacking-DKAflk2c.js.map → reward-hacking-DMTm1OBd.js.map} +1 -1
  179. package/dist/rl.d.ts +9 -8
  180. package/dist/rl.d.ts.map +1 -1
  181. package/dist/rl.js +11 -10
  182. package/dist/rl.js.map +1 -1
  183. package/dist/rollout/index.d.ts +2 -2
  184. package/dist/rollout/index.js +1 -1
  185. package/dist/{rollout-B_lrpd9a.js → rollout--rSr43Pd.js} +2 -2
  186. package/dist/{rollout-B_lrpd9a.js.map → rollout--rSr43Pd.js.map} +1 -1
  187. package/dist/{rollout-nodes-Vas6OSxX.js → rollout-nodes-DFxKpIr2.js} +39 -10
  188. package/dist/rollout-nodes-DFxKpIr2.js.map +1 -0
  189. package/dist/{rubric-predictive-validity--6z0q8s6.js → rubric-predictive-validity-BXJ92Jp_.js} +3 -9
  190. package/dist/rubric-predictive-validity-BXJ92Jp_.js.map +1 -0
  191. package/dist/{rubric-predictive-validity-C9wc7f_D.d.ts → rubric-predictive-validity-DH94_0Q1.d.ts} +3 -56
  192. package/dist/rubric-predictive-validity-DH94_0Q1.d.ts.map +1 -0
  193. package/dist/{run-improvement-loop-BfwOUudy.d.ts → run-improvement-loop-BeHu5D9Z.d.ts} +396 -11
  194. package/dist/run-improvement-loop-BeHu5D9Z.d.ts.map +1 -0
  195. package/dist/{run-record-Bqg0NZ_e.js → run-record-CuO8ErrI.js} +3 -2
  196. package/dist/run-record-CuO8ErrI.js.map +1 -0
  197. package/dist/{runtime-rollouts-drQynu3t.js → runtime-rollouts-CE0MbQPq.js} +55 -8
  198. package/dist/runtime-rollouts-CE0MbQPq.js.map +1 -0
  199. package/dist/search/index.d.ts +2 -2
  200. package/dist/search/index.js +2 -2
  201. package/dist/{search-kernel-DJq9bUDU.d.ts → search-kernel-CJZ-ZSV1.d.ts} +3 -3
  202. package/dist/{search-kernel-DJq9bUDU.d.ts.map → search-kernel-CJZ-ZSV1.d.ts.map} +1 -1
  203. package/dist/{pareto-Bg75Gajo.js → search-kernel-mZc79S6N.js} +6 -88
  204. package/dist/search-kernel-mZc79S6N.js.map +1 -0
  205. package/dist/{search-summary-B1x1Vmzh.js → search-summary-CCgP2qXz.js} +4 -4
  206. package/dist/{search-summary-B1x1Vmzh.js.map → search-summary-CCgP2qXz.js.map} +1 -1
  207. package/dist/{define-agent-eval-Cjc0wWnO.d.ts → self-improve-B1fsNejr.d.ts} +8 -54
  208. package/dist/self-improve-B1fsNejr.d.ts.map +1 -0
  209. package/dist/{define-agent-eval-B6uE3gNu.js → self-improve-C_Bcdmv8.js} +9 -97
  210. package/dist/self-improve-C_Bcdmv8.js.map +1 -0
  211. package/dist/{sequential-BhbTSxpt.d.ts → sequential-CHplorpC.d.ts} +2 -2
  212. package/dist/{sequential-BhbTSxpt.d.ts.map → sequential-CHplorpC.d.ts.map} +1 -1
  213. package/dist/{sequential-ux_XrjBf.js → sequential-DR-pnYQ7.js} +3 -3
  214. package/dist/{sequential-ux_XrjBf.js.map → sequential-DR-pnYQ7.js.map} +1 -1
  215. package/dist/{server-1fzBCxMh.js → server-aZFmRucn.js} +3 -3
  216. package/dist/{server-1fzBCxMh.js.map → server-aZFmRucn.js.map} +1 -1
  217. package/dist/{skillopt-optimization-method-D_swD0Cy.js → skillopt-optimization-method-DHk1K757.js} +95 -40
  218. package/dist/skillopt-optimization-method-DHk1K757.js.map +1 -0
  219. package/dist/{statistical-heldout-CaS4T-43.js → statistical-heldout-CL_7mI5C.js} +3 -3
  220. package/dist/{statistical-heldout-CaS4T-43.js.map → statistical-heldout-CL_7mI5C.js.map} +1 -1
  221. package/dist/{statistics-DSidA5I2.js → statistics-AKnVFnK-.js} +233 -700
  222. package/dist/statistics-AKnVFnK-.js.map +1 -0
  223. package/dist/statistics.d.ts +3 -3
  224. package/dist/statistics.js +3 -2
  225. package/dist/{store-tool-spans-DniaFwjM.d.ts → store-tool-spans-M3WxeRrG.d.ts} +4 -4
  226. package/dist/{store-tool-spans-DniaFwjM.d.ts.map → store-tool-spans-M3WxeRrG.d.ts.map} +1 -1
  227. package/dist/{summary-report-CI4J6gxU.js → summary-report-DyBkOC6V.js} +15 -7
  228. package/dist/summary-report-DyBkOC6V.js.map +1 -0
  229. package/dist/summary-report-figures-CJHygLgw.d.ts.map +1 -1
  230. package/dist/supervisor-run/index.d.ts +12 -2
  231. package/dist/supervisor-run/index.d.ts.map +1 -1
  232. package/dist/supervisor-run/index.js +3 -3
  233. package/dist/{systemone-DzY-2Zri.d.ts → systemone-4PadCE4C.d.ts} +8 -7
  234. package/dist/systemone-4PadCE4C.d.ts.map +1 -0
  235. package/dist/{systemone-review-CXecR_m-.d.ts → systemone-review-DpAXWDkL.d.ts} +2 -2
  236. package/dist/{systemone-review-CXecR_m-.d.ts.map → systemone-review-DpAXWDkL.d.ts.map} +1 -1
  237. package/dist/systemone.d.ts +3 -3
  238. package/dist/systemone.js +1 -1
  239. package/dist/{tool-groups-DF6OqhoG.d.ts → tool-groups-SlnoQNyT.d.ts} +2 -2
  240. package/dist/tool-groups-SlnoQNyT.d.ts.map +1 -0
  241. package/dist/tool-waste-B01AMpID.d.ts +121 -0
  242. package/dist/tool-waste-B01AMpID.d.ts.map +1 -0
  243. package/dist/{tool-waste-u7JJ_BlE.js → tool-waste-BZnYSa6J.js} +3 -2
  244. package/dist/{tool-waste-u7JJ_BlE.js.map → tool-waste-BZnYSa6J.js.map} +1 -1
  245. package/dist/{trace-questions-DO8y3J-E.d.ts → trace-questions-ybyF0B6N.d.ts} +2 -2
  246. package/dist/{trace-questions-DO8y3J-E.d.ts.map → trace-questions-ybyF0B6N.d.ts.map} +1 -1
  247. package/dist/trace-repair/index.d.ts +1 -1
  248. package/dist/trace-repair/index.js +1 -1
  249. package/dist/traces.d.ts +4 -4
  250. package/dist/traces.js +1 -1
  251. package/dist/trajectory-B3o6Ald_.d.ts +100 -0
  252. package/dist/trajectory-B3o6Ald_.d.ts.map +1 -0
  253. package/dist/trajectory-replay/index.js +1 -1
  254. package/dist/{tree-DQMlcNFI.js → tree-CiIe-f3f.js} +6 -4
  255. package/dist/{tree-DQMlcNFI.js.map → tree-CiIe-f3f.js.map} +1 -1
  256. package/dist/{types-fuOwNq1C.d.ts → types-B1W3v8dT.d.ts} +3 -2
  257. package/dist/types-B1W3v8dT.d.ts.map +1 -0
  258. package/dist/{types-BMSDkS8l.d.ts → types-D5XtEH9Q.d.ts} +11 -4
  259. package/dist/{types-BMSDkS8l.d.ts.map → types-D5XtEH9Q.d.ts.map} +1 -1
  260. package/dist/types-DK4vNv5q.js.map +1 -1
  261. package/dist/{types-D_PfKC59.d.ts → types-an-CUndX.d.ts} +2 -2
  262. package/dist/{types-D_PfKC59.d.ts.map → types-an-CUndX.d.ts.map} +1 -1
  263. package/dist/{types-BLv2Ngla.d.ts → types-xVtEOBhO.d.ts} +31 -8
  264. package/dist/types-xVtEOBhO.d.ts.map +1 -0
  265. package/dist/wire/index.d.ts +2 -2
  266. package/dist/wire/index.js +1 -1
  267. package/dist/world/index.d.ts +529 -0
  268. package/dist/world/index.d.ts.map +1 -0
  269. package/dist/world/index.js +1356 -0
  270. package/dist/world/index.js.map +1 -0
  271. package/docs/campaign-proposers.md +7 -0
  272. package/docs/concepts.md +2 -0
  273. package/docs/design/statistics-decisions.md +48 -0
  274. package/docs/eval-surface-map.md +5 -2
  275. package/docs/feature-guide.md +3 -1
  276. package/docs/multi-turn-optimization.md +84 -0
  277. package/docs/outcome-validity.md +108 -0
  278. package/docs/public-api.md +89 -34
  279. package/docs/{multi-shot-optimization.md → trajectory-optimization.md} +1 -1
  280. package/docs/world.md +104 -0
  281. package/package.json +6 -1
  282. package/dist/analyze-runs-xjKBBqIB.d.ts.map +0 -1
  283. package/dist/benchmark-command-DkBMUDwy.js.map +0 -1
  284. package/dist/campaign-DfSWSreo.js.map +0 -1
  285. package/dist/cluster-Bj90LK-1.d.ts.map +0 -1
  286. package/dist/define-agent-eval-B6uE3gNu.js.map +0 -1
  287. package/dist/define-agent-eval-Cjc0wWnO.d.ts.map +0 -1
  288. package/dist/external-optimizer-subprocess-BW0ZWUUr.js.map +0 -1
  289. package/dist/index-C6TG1LwA.d.ts.map +0 -1
  290. package/dist/index-CKjqN9_U.d.ts.map +0 -1
  291. package/dist/index-DAFZRMlF.d.ts.map +0 -1
  292. package/dist/index-xEM_SoCl.d.ts.map +0 -1
  293. package/dist/interval-CWyxqDpE.d.ts +0 -43
  294. package/dist/interval-CWyxqDpE.d.ts.map +0 -1
  295. package/dist/llm-judge-DQJTQx01.js.map +0 -1
  296. package/dist/matrix-CqZSpwgN.d.ts.map +0 -1
  297. package/dist/outcome-observations-DL3CC8w1.js.map +0 -1
  298. package/dist/pareto-Bg75Gajo.js.map +0 -1
  299. package/dist/rollout-nodes-Vas6OSxX.js.map +0 -1
  300. package/dist/rubric-predictive-validity--6z0q8s6.js.map +0 -1
  301. package/dist/rubric-predictive-validity-C9wc7f_D.d.ts.map +0 -1
  302. package/dist/run-improvement-loop-BfwOUudy.d.ts.map +0 -1
  303. package/dist/run-record-Bqg0NZ_e.js.map +0 -1
  304. package/dist/runtime-rollouts-drQynu3t.js.map +0 -1
  305. package/dist/sequential-BphITa5b.js.map +0 -1
  306. package/dist/skillopt-optimization-method-D_swD0Cy.js.map +0 -1
  307. package/dist/statistics-DSidA5I2.js.map +0 -1
  308. package/dist/summary-report-CI4J6gxU.js.map +0 -1
  309. package/dist/systemone-DzY-2Zri.d.ts.map +0 -1
  310. package/dist/tool-groups-DF6OqhoG.d.ts.map +0 -1
  311. package/dist/tool-waste-CIhtU1ad.d.ts +0 -217
  312. package/dist/tool-waste-CIhtU1ad.d.ts.map +0 -1
  313. package/dist/types-BLv2Ngla.d.ts.map +0 -1
  314. package/dist/types-fuOwNq1C.d.ts.map +0 -1
package/dist/fuzz.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { s as ValidationError } from "./errors-DeEEV9Vx.js";
2
- import { ut as summarizeNumberSeries } from "./statistics-DSidA5I2.js";
2
+ import { m as summarizeNumberSeries } from "./paired-tests-CXcD_B80.js";
3
3
  import { t as mulberry32 } from "./random-DrzcgC7F.js";
4
4
  import { o as CostReceiptCaptureError, t as CostLedger } from "./cost-ledger-C5CCidPm.js";
5
5
  // src/fuzz/cube.ts
@@ -1,136 +1,11 @@
1
1
  import { a as JudgeError } from "./errors-E9I2hldP.js";
2
- import { f as Run } from "./schema-CkIvnmLU.js";
3
- import { U as LlmClientOptions } from "./cluster-Bj90LK-1.js";
2
+ import { _ as LlmClientOptions } from "./chat-client-BlTooBDA.js";
4
3
  import { a as ContinuousCalibrationResult, n as CandidateScore, o as GoldenItem, r as ContinuousAgreement, t as CalibrationResult } from "./judge-calibration-DnrbQaXI.js";
5
- import { Vt as CorpusAgreementReport } from "./index-CKjqN9_U.js";
4
+ import { Bt as ClusteredAssociation, Jt as CorpusAgreementReport } from "./index-Bk1XEkP7.js";
6
5
  import { r as LedgerHash } from "./canonical-CGXS21f_.js";
7
- import { s as TraceStore } from "./store-CMs5wGXP.js";
8
- import { h as OutcomeStore, m as OutcomeFilter } from "./rubric-predictive-validity-C9wc7f_D.js";
9
- import { t as ComputedInterval } from "./interval-CWyxqDpE.js";
6
+ import { o as OutcomeStore } from "./outcome-store-CHtuvstd.js";
7
+ import { f as ComputedInterval, i as MeasureValidityPlan, l as SealedMeasureValidityPlan } from "./measure-validity-plan-BReXzcVh.js";
10
8
  import { z } from "zod";
11
- interface EvalMetricSpec {
12
- id: string;
13
- /** Extract a scalar from a run. Omit it and `id` must name one of
14
- * `RUN_METRICS`; any other `id` is refused. */
15
- extract?: (run: Run, store: TraceStore) => Promise<number | null>;
16
- }
17
- interface OutcomePair {
18
- evalMetric: string;
19
- outcomeMetric: string;
20
- }
21
- interface CorrelationResult {
22
- evalMetric: string;
23
- outcomeMetric: string;
24
- n: number;
25
- pearson: number;
26
- spearman: number;
27
- /** 95% bootstrap CI for Pearson. */
28
- pearsonCi95: {
29
- lower: number;
30
- upper: number;
31
- } | null;
32
- /** 95% bootstrap CI for Spearman; null when no resample is estimable. */
33
- spearmanCi95: {
34
- lower: number;
35
- upper: number;
36
- } | null;
37
- /** Rough verdict: 'strong' ≥ 0.7, 'moderate' ≥ 0.4, else 'weak'. */
38
- verdict: 'strong' | 'moderate' | 'weak';
39
- }
40
- interface CorrelationStudyResult {
41
- pairs: CorrelationResult[];
42
- /** Declared pairs without an estimable correlation, including their usable sample count. */
43
- excludedPairs: Array<OutcomePair & {
44
- n: number;
45
- reason: 'insufficient_samples' | 'constant_eval_metric' | 'constant_outcome';
46
- }>;
47
- joinedSamples: number;
48
- skippedRuns: number;
49
- }
50
- interface CorrelationStudyOptions {
51
- /** Only join outcomes captured within this window after run.startedAt. */
52
- maxCaptureLagMs?: number;
53
- /** Restrict to a subset of outcomes (cohort, region, source). */
54
- outcomeFilter?: OutcomeFilter;
55
- /** Which outcome per run to use when multiple exist. Default 'latest'. */
56
- reduction?: 'latest' | 'mean' | 'max';
57
- /** Bootstrap iterations for the CI. Default 500. */
58
- bootstrapIterations?: number;
59
- /** Seed for the bootstrap resampler. Absent, the seed is derived from the
60
- * paired observations, so the same study reproduces the same interval. */
61
- seed?: number;
62
- }
63
- declare function correlationStudy(traceStore: TraceStore, outcomeStore: OutcomeStore, evalMetrics: EvalMetricSpec[], outcomeMetricNames: string[], options?: CorrelationStudyOptions): Promise<CorrelationStudyResult>;
64
- interface CalibrationBin {
65
- lower: number;
66
- upper: number;
67
- n: number;
68
- evalMean: number;
69
- outcomeMean: number;
70
- /** |outcomeMean − evalMean|; contributes to ECE weighted by n/total. */
71
- gap: number;
72
- }
73
- interface CalibrationReport {
74
- evalMetric: string;
75
- outcomeMetric: string;
76
- n: number;
77
- bins: CalibrationBin[];
78
- /** Expected Calibration Error — Σ (n_i/N) × |outcomeMean_i − evalMean_i|. */
79
- ece: number;
80
- /** Largest observed difference between a bin's mean score and mean outcome. */
81
- maxGap: number;
82
- }
83
- interface CalibrationOptions {
84
- /** Positive integer; empty bins are omitted. Default 10. */
85
- bins?: number;
86
- /** Equal-width (fixed bin edges) or equal-frequency (quantile bins). */
87
- binning?: 'equal-width' | 'equal-frequency';
88
- /** Clip eval values to [lo, hi] before binning. */
89
- range?: {
90
- lo: number;
91
- hi: number;
92
- };
93
- }
94
- interface CalibrationPair {
95
- evalScore: number;
96
- outcome: number;
97
- }
98
- declare function calibrationCurve(traceStore: TraceStore, outcomeStore: OutcomeStore, evalMetric: EvalMetricSpec, outcomeMetric: string, options?: CalibrationOptions): Promise<CalibrationReport | null>;
99
- /** Measure already joined observations without constructing trace and outcome stores. */
100
- declare function calibrationFromPairs(inputPairs: readonly CalibrationPair[], evalMetric: string, outcomeMetric: string, options?: CalibrationOptions): CalibrationReport | null;
101
- /**
102
- * Mean squared error of probability forecasts against binary outcomes, Σ(p − y)²/N; always
103
- * forecasting 0.5 scores 0.25. For the reliability table and ECE use `calibrationFromPairs`
104
- * with `range: { lo: 0, hi: 1 }` (`binning: 'equal-frequency'` gives equal-mass bins).
105
- */
106
- declare function brierScore(pairs: readonly CalibrationPair[]): number;
107
- /** One categorical forecast: a distribution over named outcomes and the outcome that occurred. */
108
- interface CategoricalForecast {
109
- /** Probability per outcome name. Must sum to 1 within 1e-6 and include `outcome`. */
110
- probabilities: Readonly<Record<string, number>>;
111
- outcome: string;
112
- }
113
- /**
114
- * Multiclass Brier score in its sum form, mean over forecasts of Σₖ(pₖ − yₖ)², range [0, 2].
115
- * With two outcomes it is twice the binary `brierScore`. A uniform forecast over K outcomes
116
- * scores 1 − 1/K. The distribution is not renormalized here: repair provider rounding before
117
- * scoring (`normalizeSystemOneResult` in `/systemone/protocol`), so a defective answer stays
118
- * visible instead of being scored as if it were valid.
119
- */
120
- declare function multiclassBrierScore(forecasts: readonly CategoricalForecast[]): number;
121
- /** One ordinal forecast: probabilities in level order, lowest level first. */
122
- interface OrdinalForecast {
123
- probabilities: readonly number[];
124
- /** Index into `probabilities` of the level that occurred. */
125
- outcome: number;
126
- }
127
- /**
128
- * Ranked probability score, mean over forecasts of Σₖ₌₁ᴷ⁻¹(Fₖ − Oₖ)² / (K − 1), where F and O are
129
- * the cumulative forecast and observation, range [0, 1]. Unlike multiclass Brier it charges
130
- * less for mass on a level next to the outcome than for mass far from it, which is the right
131
- * penalty for score questions. With two levels it equals the binary Brier score.
132
- */
133
- declare function rankedProbabilityScore(forecasts: readonly OrdinalForecast[]): number;
134
9
  /** One observation and the source cluster it belongs to. */
135
10
  interface ClusteredObservation {
136
11
  cluster: string;
@@ -826,6 +701,318 @@ interface JudgeCalibrationGate {
826
701
  declare function gateJudgeCalibration(perJudge: Record<string, Record<string, {
827
702
  calibration: CalibrationResult;
828
703
  }>>, config: JudgeCalibrationGateConfig): JudgeCalibrationGate;
704
+ /** A change and the numbers known when it was made. */
705
+ interface MeasuredChange {
706
+ /** Joins `DeploymentOutcome.runId`. */
707
+ id: string;
708
+ /** Epoch milliseconds when the change was made. */
709
+ at: number;
710
+ /** Independent unit, such as a repository, session or customer. Intervals resample whole units. */
711
+ unit: string;
712
+ /** Finite values; an absent key is unmeasured, never zero. */
713
+ measures: Record<string, number>;
714
+ /** The measure before and after the change, when both were recorded. */
715
+ movements?: Record<string, {
716
+ before: number;
717
+ after: number;
718
+ }>;
719
+ }
720
+ interface MeasureValidityInput {
721
+ plan: SealedMeasureValidityPlan;
722
+ changes: readonly MeasuredChange[];
723
+ outcomes: OutcomeStore;
724
+ /**
725
+ * Epoch milliseconds at which the outcomes were read. An observation
726
+ * captured after it is excluded, and a change after the cut counts for an
727
+ * outcome with `windowMs` only when its window closed by it. Required when
728
+ * any outcome declares `windowMs`; at or after the cut.
729
+ */
730
+ asOf?: number;
731
+ }
732
+ type MeasureValidityReason = 'below-minimum-count' | 'too-few-units' | 'too-little-variation' | 'no-pre-cut-direction' | 'constant-after-cut' | 'not-significant' | 'direction-reversed' | 'within-unit-not-shown' | 'within-unit-untested' | 'within-exposure-not-shown' | 'within-exposure-untested';
733
+ interface MeasureCoverage {
734
+ measure: string;
735
+ changes: number;
736
+ measured: number;
737
+ share: number;
738
+ preCut: {
739
+ changes: number;
740
+ measured: number;
741
+ };
742
+ postCut: {
743
+ changes: number;
744
+ measured: number;
745
+ };
746
+ /** Changes recording a before and after value. */
747
+ movements: number;
748
+ }
749
+ interface MeasureMovementValidity {
750
+ label: 'moves-with-outcome' | 'agreement-not-shown' | 'moves-against-outcome' | 'insensitive' | 'insufficient';
751
+ /** Changes after the cut that record a movement. */
752
+ changes: number;
753
+ units: number;
754
+ /** Changes whose `|after - before|` exceeds the declared noise. */
755
+ moved: number;
756
+ /** Share of changes that moved beyond noise, with a whole-unit interval. */
757
+ sensitivity: {
758
+ estimate: number;
759
+ low: number;
760
+ high: number;
761
+ } | null;
762
+ /**
763
+ * Among moved changes with an outcome, the AUC of the movement's direction
764
+ * (aligned to the measure's predictive direction) for the better outcome.
765
+ * This is balanced agreement: 0.5 under no relation whatever the base rates.
766
+ */
767
+ agreement: ClusteredAssociation | null;
768
+ qValue: number | null;
769
+ }
770
+ interface MeasureOutcomeValidity {
771
+ measure: string;
772
+ outcome: string;
773
+ statistic: 'auc' | 'spearman';
774
+ /**
775
+ * `predicts`: the pooled test passes, the test inside exposure bins passes
776
+ * when the outcome names an exposure, and the within-unit test passes when
777
+ * it is tested (`reason` is `within-unit-untested` when it is not).
778
+ * `predicts-through-exposure`: the pooled test passes and the test inside
779
+ * exposure bins does not, so the measure may predict only by tracking the
780
+ * exposure. `predicts-pooled-only`: the pooled test passes and the tested
781
+ * within-unit test does not, so the ranking may come from differences
782
+ * between units rather than between changes. `not-shown`: tested and not
783
+ * admitted. `insufficient`: not tested; `reason` says why.
784
+ */
785
+ label: 'predicts' | 'predicts-through-exposure' | 'predicts-pooled-only' | 'not-shown' | 'insufficient';
786
+ reason: MeasureValidityReason | null;
787
+ /** Which end of the measure predicts the better outcome, fixed before the cut. */
788
+ direction: 'higher' | 'lower' | null;
789
+ /** The outcome's declared exposure measure, or null; the exposure's own pair has no exposure test. */
790
+ exposure: string | null;
791
+ /** Which end predicts the better outcome inside exposure bins, fixed before the cut on that statistic. */
792
+ withinExposureDirection: 'higher' | 'lower' | null;
793
+ /**
794
+ * Before the cut, outcome known by the cut: the measure as recorded against
795
+ * the better outcome, pooled and inside exposure bins.
796
+ */
797
+ preCut: {
798
+ n: number;
799
+ units: number;
800
+ estimate: number | null;
801
+ withinExposure: number | null;
802
+ };
803
+ /**
804
+ * After the cut, measure aligned to its fixed direction: above the null
805
+ * favors the better outcome. Every test is one-sided in that direction.
806
+ * `withinUnit` is estimated when at least two units hold a comparable pair
807
+ * and tested (given a q-value) only when `minUnits` do. `withinExposure`
808
+ * compares changes in the same exposure bin, aligned to
809
+ * `withinExposureDirection`.
810
+ */
811
+ postCut: {
812
+ n: number;
813
+ units: number;
814
+ /** Joined changes whose value differs from the measure's most common value. */
815
+ minority: number;
816
+ association: ClusteredAssociation | null;
817
+ qValue: number | null;
818
+ withinUnit: ClusteredAssociation | null;
819
+ withinUnitQValue: number | null;
820
+ withinExposure: ClusteredAssociation | null;
821
+ withinExposureQValue: number | null;
822
+ };
823
+ /** Outcome capture time minus change time over the joined changes after the cut. */
824
+ leadTimeMs: {
825
+ median: number;
826
+ min: number;
827
+ max: number;
828
+ } | null;
829
+ movement: MeasureMovementValidity | null;
830
+ }
831
+ /** An outcome's exposure and the bins fixed before the cut. */
832
+ interface MeasureExposureBins {
833
+ outcome: string;
834
+ measure: string;
835
+ bins: number;
836
+ /**
837
+ * Interior edges at the exposure's quantiles over the changes before the cut
838
+ * joined to the outcome, with repeats removed; a value at an edge falls in
839
+ * the lower bin.
840
+ */
841
+ edges: number[];
842
+ }
843
+ interface MeasureValidityReport {
844
+ planDigest: string;
845
+ plan: MeasureValidityPlan;
846
+ claim: {
847
+ causal: false;
848
+ scope: string;
849
+ causeRequires: string;
850
+ };
851
+ /** How every p-value feeding the false-discovery correction was computed. */
852
+ hypothesis: string;
853
+ changes: {
854
+ total: number;
855
+ preCut: number;
856
+ postCut: number;
857
+ };
858
+ units: {
859
+ preCut: number;
860
+ postCut: number;
861
+ both: number;
862
+ };
863
+ /** Outcome observations not joined, by reason. */
864
+ /** When the outcomes were read, as given; null when not given. */
865
+ asOf: number | null;
866
+ excludedObservations: {
867
+ capturedBeforeChange: number;
868
+ /** Captured after `asOf`. */
869
+ capturedAfterAsOf: number;
870
+ capturedAfterCutForPreCutChange: number;
871
+ beyondMaxCaptureLag: number;
872
+ /**
873
+ * Change-outcome pairs before the cut with an outcome known by the cut
874
+ * whose `windowMs` had not closed at the cut.
875
+ */
876
+ windowOpenAtCut: number;
877
+ /**
878
+ * Change-outcome pairs after the cut with an outcome known by `asOf`
879
+ * whose `windowMs` had not closed at `asOf`.
880
+ */
881
+ windowOpenAtEnd: number;
882
+ };
883
+ exposures: MeasureExposureBins[];
884
+ coverage: MeasureCoverage[];
885
+ pairs: MeasureOutcomeValidity[];
886
+ /** Pairs given a pooled p-value: the false-discovery family. */
887
+ tested: number;
888
+ /**
889
+ * Pairs given a pooled p-value whose within-unit statistic is tested, whatever
890
+ * their pooled result: a second Benjamini-Hochberg family at the same level.
891
+ */
892
+ withinUnitTested: number;
893
+ /**
894
+ * Pairs given a pooled p-value with a statistic inside exposure bins, whatever
895
+ * their pooled result: a third Benjamini-Hochberg family at the same level.
896
+ */
897
+ withinExposureTested: number;
898
+ /** Pairs labelled `predicts`. */
899
+ admitted: number;
900
+ /** Pairs whose movement agreement was tested: a second family at the same level. */
901
+ movementTested: number;
902
+ selections: MeasureSelection[];
903
+ }
904
+ /** Rank every planned measure against every planned outcome on changes after the cut. */
905
+ declare function measureValidityStudy(input: MeasureValidityInput): Promise<MeasureValidityReport>;
906
+ interface MeasureReference {
907
+ /** Before-cut median and robust scale; `z = direction * (x - center) / scale`. */
908
+ center: number;
909
+ scale: number;
910
+ /** Mean of the aligned `z` before the cut. */
911
+ meanZ: number;
912
+ }
913
+ interface ClimbedMeasure {
914
+ measure: string;
915
+ direction: 'higher' | 'lower';
916
+ /** Gain the measure added to the before-cut composite statistic; the first is its gain over the null. */
917
+ preCutGain: number;
918
+ postCutEstimate: number;
919
+ leadTimeMs: {
920
+ median: number;
921
+ min: number;
922
+ max: number;
923
+ } | null;
924
+ cost: number | null;
925
+ reference: MeasureReference;
926
+ }
927
+ interface GuardMeasure {
928
+ measure: string;
929
+ direction: 'higher' | 'lower';
930
+ reason: 'redundant' | 'no-gain' | 'size-limit';
931
+ redundantWith: string | null;
932
+ /** Largest absolute before-cut rank correlation with a climbed measure. */
933
+ correlation: number | null;
934
+ reference: MeasureReference;
935
+ }
936
+ interface MeasureSelection {
937
+ outcome: string;
938
+ climb: ClimbedMeasure[];
939
+ /** Admitted measures to keep unoptimized; a climbed measure drifting away from them is visible. */
940
+ guards: GuardMeasure[];
941
+ /**
942
+ * Measures admitted on the pooled test that cannot be climbed: the outcome's
943
+ * exposure itself, measures that predict only by tracking it, only across
944
+ * units, that do not move under change or move against the outcome, or
945
+ * whose after-cut estimate (inside exposure bins when the outcome has an
946
+ * exposure) is closer to the null than `selection.minEffect`.
947
+ */
948
+ excluded: Array<{
949
+ measure: string;
950
+ reason: 'exposure' | 'through-exposure' | 'pooled-only' | 'insensitive' | 'moves-against-outcome' | 'below-minimum-effect';
951
+ }>;
952
+ /**
953
+ * Equal-weight mean of the climbed measures' aligned z. The post-cut score
954
+ * reads the changes admission read, so it describes the subset; the next
955
+ * batch is its independent check.
956
+ */
957
+ composite: {
958
+ preCut: {
959
+ n: number;
960
+ estimate: number;
961
+ } | null;
962
+ postCut: ClusteredAssociation | null;
963
+ };
964
+ /** Before-cut outcome reference for drift checks on later batches. */
965
+ outcomeReference: {
966
+ kind: 'binary';
967
+ betterRate: number;
968
+ } | {
969
+ kind: 'continuous';
970
+ center: number;
971
+ scale: number;
972
+ meanZ: number;
973
+ } | null;
974
+ }
975
+ interface GuardDriftInput {
976
+ report: MeasureValidityReport;
977
+ outcome: string;
978
+ /** Changes made after the study, read against the study's before-cut references. */
979
+ batch: readonly MeasuredChange[];
980
+ /** Largest rise of a climbed measure over its guards, in before-cut scale units, that is not drift. */
981
+ tolerance: number;
982
+ /** Outcomes for the batch, when known; drift itself needs none. */
983
+ outcomes?: OutcomeStore;
984
+ }
985
+ interface GuardDriftInterval {
986
+ n: number;
987
+ units: number;
988
+ estimate: number;
989
+ low: number;
990
+ high: number;
991
+ }
992
+ interface GuardDriftMeasure {
993
+ measure: string;
994
+ status: 'drift' | 'within-tolerance' | 'insufficient';
995
+ /** The climbed measure's aligned z, minus its before-cut mean. */
996
+ shift: GuardDriftInterval | null;
997
+ /** The mean of its guards' aligned z, each minus its before-cut mean. */
998
+ guardShift: GuardDriftInterval | null;
999
+ /** Per change, shift minus guard shift: drift when its lower bound exceeds the tolerance. */
1000
+ divergence: GuardDriftInterval | null;
1001
+ }
1002
+ interface GuardDriftReport {
1003
+ outcome: string;
1004
+ guards: string[];
1005
+ status: 'drift' | 'no-drift' | 'no-guards' | 'insufficient';
1006
+ measures: GuardDriftMeasure[];
1007
+ /** Better-outcome rate minus the before-cut rate (binary), or the aligned z shift (continuous). */
1008
+ outcomeShift: GuardDriftInterval | null;
1009
+ }
1010
+ /**
1011
+ * Whether a climbed measure rose while its guards did not, in a batch of
1012
+ * later changes. Guards are measured at change time, so this reads before the
1013
+ * outcome arrives; the outcome shift is reported when the batch has outcomes.
1014
+ */
1015
+ declare function guardDrift(input: GuardDriftInput): Promise<GuardDriftReport>;
829
1016
  /**
830
1017
  * How a plant item was authored wrong. The class is reported separately in
831
1018
  * {@link CatchRateReport.byKind} because a grader is routinely sharp on one
@@ -1078,5 +1265,5 @@ interface CatchRateReport {
1078
1265
  * across two runs is a fabrication.
1079
1266
  */
1080
1267
  declare function catchRate(results: readonly PlantOutcome[], manifest: PlantManifest): CatchRateReport;
1081
- export { measureJudgeAgreement as $, CorrelationStudyOptions as $t, JudgePanelOutput as A, ProbabilityPolicyAuditInput as At, JudgeConfusion as B, clusterBootstrapMean as Bt, JudgeCalibrationCellVerdict as C, EvaluatorAdmissionPolicy as Ct, JudgeCalibrationGoldItem as D, EvaluatorAuditPlan as Dt, JudgeCalibrationGateConfig as E, EvaluatorAuditObservation as Et, CalibrationExample as F, evaluatorAuditObservationSchema as Ft, JudgeGateRefusedError as G, CategoricalForecast as Gt, JudgeGateDecision as H, CalibrationOptions as Ht, CalibrationMerge as I, planEvaluatorAudit as It, JudgeRunMeta as J, calibrationCurve as Jt, JudgeGateStatus as K, OrdinalForecast as Kt, DEFAULT_JUDGE_GATE_POLICY as L, ClusterBootstrapOptions as Lt, RubricDimensionGuide as M, auditEvaluator as Mt, calibrateJudgePanel as N, auditProbabilityPolicy as Nt, JudgeDimensionCalibration as O, EvaluatorAuditPlanInput as Ot, gateJudgeCalibration as P, evaluatorAdmissionPolicySchema as Pt, judgeGateDecision as Q, CorrelationResult as Qt, JudgeAgreement as R, ClusterBootstrapResult as Rt, CalibrateJudgePanelInput as S, analyzeSeries as St, JudgeCalibrationGateCell as T, EvaluatorAuditInput as Tt, JudgeGateInput as U, CalibrationPair as Ut, JudgeExampleAgreement as V, CalibrationBin as Vt, JudgeGatePolicy as W, CalibrationReport as Wt, addCalibrationVerdicts as X, multiclassBrierScore as Xt, OwnerVerdict as Y, calibrationFromPairs as Yt, assertJudgeMayGate as Z, rankedProbabilityScore as Zt, catchRate as _, snapshotFromCalibration as _t, PerturbedField as a, SentinelMetrics as at, plantByPerturbation as b, SeriesConvergenceOptions as bt, PlantEvidence as c, SentinelSnapshot as ct, PlantKindCounts as d, SentinelTrend as dt, CorrelationStudyResult as en, registerCalibrationSet as et, PlantManifest as f, SnapshotMeta as ft, UnseededRejection as g, snapshotFromAgreement as gt, SeededGradingSet as h, judgeSentinelReport as ht, PerturbationKind as i, SentinelMetricName as it, JudgePanelPrompt as j, ProbabilityPolicyAuditReport as jt, JudgePanelCalibration as k, EvaluatorErrorRate as kt, PlantExpectation as l, SentinelStore as lt, SeedPlantsOptions as m, fileSentinelStore as mt, CatchRateStatus as n, OutcomePair as nn, EvalHealthStamp as nt, PerturbedPlant as o, SentinelReport as ot, PlantOutcome as p, evalHealthStamp as pt, JudgeRun as q, brierScore as qt, EvidencePerturbation as r, correlationStudy as rn, JudgeSentinelOptions as rt, Plant as s, SentinelSetOptions as st, CatchRateReport as t, EvalMetricSpec as tn, snapshotFromJudgeAgreement as tt, PlantKind as u, SentinelThresholds as ut, definePlant as v, snapshotFromSentinelSet as vt, JudgeCalibrationGate as w, EvaluatorAdmissionReport as wt, seedPlants as x, SeriesConvergenceResult as xt, perturbEvidence as y, validateSentinelSnapshot as yt, JudgeCalibrationSet as z, ClusteredObservation as zt };
1082
- //# sourceMappingURL=index-C6TG1LwA.d.ts.map
1268
+ export { CalibrationExample as $, evaluatorAuditObservationSchema as $t, guardDrift as A, SnapshotMeta as At, CalibrateJudgePanelInput as B, analyzeSeries as Bt, GuardDriftInput as C, SentinelMetrics as Ct, GuardMeasure as D, SentinelStore as Dt, GuardDriftReport as E, SentinelSnapshot as Et, MeasureValidityInput as F, snapshotFromCalibration as Ft, JudgeCalibrationGoldItem as G, EvaluatorAuditPlan as Gt, JudgeCalibrationGate as H, EvaluatorAdmissionReport as Ht, MeasureValidityReason as I, snapshotFromSentinelSet as It, JudgePanelOutput as J, ProbabilityPolicyAuditInput as Jt, JudgeDimensionCalibration as K, EvaluatorAuditPlanInput as Kt, MeasureValidityReport as L, validateSentinelSnapshot as Lt, MeasureExposureBins as M, fileSentinelStore as Mt, MeasureMovementValidity as N, judgeSentinelReport as Nt, MeasureReference as O, SentinelThresholds as Ot, MeasureOutcomeValidity as P, snapshotFromAgreement as Pt, gateJudgeCalibration as Q, evaluatorAdmissionPolicySchema as Qt, measureValidityStudy as R, SeriesConvergenceOptions as Rt, ClimbedMeasure as S, SentinelMetricName as St, GuardDriftMeasure as T, SentinelSetOptions as Tt, JudgeCalibrationGateCell as U, EvaluatorAuditInput as Ut, JudgeCalibrationCellVerdict as V, EvaluatorAdmissionPolicy as Vt, JudgeCalibrationGateConfig as W, EvaluatorAuditObservation as Wt, RubricDimensionGuide as X, auditEvaluator as Xt, JudgePanelPrompt as Y, ProbabilityPolicyAuditReport as Yt, calibrateJudgePanel as Z, auditProbabilityPolicy as Zt, catchRate as _, measureJudgeAgreement as _t, PerturbedField as a, JudgeExampleAgreement as at, plantByPerturbation as b, EvalHealthStamp as bt, PlantEvidence as c, JudgeGatePolicy as ct, PlantKindCounts as d, JudgeRun as dt, planEvaluatorAudit as en, CalibrationMerge as et, PlantManifest as f, JudgeRunMeta as ft, UnseededRejection as g, judgeGateDecision as gt, SeededGradingSet as h, assertJudgeMayGate as ht, PerturbationKind as i, clusterBootstrapMean as in, JudgeConfusion as it, MeasureCoverage as j, evalHealthStamp as jt, MeasureSelection as k, SentinelTrend as kt, PlantExpectation as l, JudgeGateRefusedError as lt, SeedPlantsOptions as m, addCalibrationVerdicts as mt, CatchRateStatus as n, ClusterBootstrapResult as nn, JudgeAgreement as nt, PerturbedPlant as o, JudgeGateDecision as ot, PlantOutcome as p, OwnerVerdict as pt, JudgePanelCalibration as q, EvaluatorErrorRate as qt, EvidencePerturbation as r, ClusteredObservation as rn, JudgeCalibrationSet as rt, Plant as s, JudgeGateInput as st, CatchRateReport as t, ClusterBootstrapOptions as tn, DEFAULT_JUDGE_GATE_POLICY as tt, PlantKind as u, JudgeGateStatus as ut, definePlant as v, registerCalibrationSet as vt, GuardDriftInterval as w, SentinelReport as wt, seedPlants as x, JudgeSentinelOptions as xt, perturbEvidence as y, snapshotFromJudgeAgreement as yt, MeasuredChange as z, SeriesConvergenceResult as zt };
1269
+ //# sourceMappingURL=index-BSb3fJyZ.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index-BSb3fJyZ.d.ts","names":[],"sources":["../src/meta-eval/cluster-bootstrap.ts","../src/meta-eval/evaluator-admission.ts","../src/series-convergence.ts","../src/meta-eval/sentinel.ts","../src/meta-eval/judge-gate.ts","../src/meta-eval/judge-panel-calibration.ts","../src/meta-eval/measure-records.ts","../src/meta-eval/measure-validity.ts","../src/meta-eval/measure-selection.ts","../src/meta-eval/plants.ts"],"mappings":";;;;;;;;;UAKiB;EACf;EACA;EACA;;UAGe;;EAEf;;EAEA;;EAEA;;UAGe;EACf;EACA;;EAEA;EACA;EACA;EACA;EACA;;;iBAIc,qBACd,uBAAuB,wBACvB,UAAS,0BACR;cC1BU,gCAA8B,EAAA;;;;GAMhC,EAAA,KAAA;;KAGC,2BAA2B,EAAE,aAAa;cAEzC,iCAA+B,EAAA;;;;;;;;;;;;;;;;;GASjC,EAAA,KAAA;;KAGC,4BAA4B,EAAE,aAAa;cAEjD,aAAW,EAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAeN,EAAA,KAAA;KAEC,sBAAsB,EAAE,aAAa;UAEhC;;EAEf;EACA;;EAEA;;EAEA;EACA;;EAEA;;EAEA,UAAU;EACV;EACA;;UAGe;EACf,iBAAiB;EACjB,cAAc;EACd,aAAa;EACb,cAAc;EACd;EACA;EACA,WAAW;EACX,QAAQ;;EAER;EACA;EACA;EACA;EACA,cAAc;EACd;IACE;IACA;IACA;IACA;IACA;IACA;;EAEF,YAAY;IAAQ;IAAY;IAA2B;;EAC3D,iBAAiB;EACjB,gBAAgB;;cAkGZ,gBAAc,EAAA;;;;;;;;;;;;;;;;;;GAOT,EAAA,KAAA;KAEC,0BAA0B,EAAE,aAAa;;;;;;iBA0BrC,mBAAmB,OAAO;;;;;;;;;;;;;;;;;KAiC9B,qBAAqB,kBAAkB;;;;;;iBAOnC,eAAe,OAAO,sBAAsB;cAoFtD,wBAAsB,EAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAG1B,EAAA,KAA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UAqGc;EACf;EACA;;;;;;KAOU;UAEK;EACf;EACA;EACA;EACA;;EAEA;;;;;;;;UASe;EACf;EACA;EACA;;EAEA;;UAGe;EACf,QAAQ;;EAER;EACA;EACA;EACA;;;;;EAKA;;EAEA;;EAEA,QAAQ,QAAQ,OAAO,WAAW;;EAElC;;EAEA;EACA,UAAU;;;;;;;;;;iBAWI,UACd,kBAAkB,gBAClB,UAAU,gBACT"}
@@ -1,4 +1,4 @@
1
- import { p as DimensionJudgeScore, t as BootstrapInterval } from "./cluster-Bj90LK-1.js";
1
+ import { p as DimensionJudgeScore, t as BootstrapInterval } from "./cluster-BJ0nW3P7.js";
2
2
  import { i as ContinuousAgreementOptions, r as ContinuousAgreement } from "./judge-calibration-DnrbQaXI.js";
3
3
  /**
4
4
  * Inter-rater reliability — Krippendorff's α under the squared-difference
@@ -106,6 +106,91 @@ interface NominalAgreementOptions {
106
106
  * near miss counts as a miss; use `calibrateJudge` for ordinal scores.
107
107
  */
108
108
  declare function nominalAgreement(pairs: ReadonlyArray<readonly [string, string]>, options?: NominalAgreementOptions): NominalAgreement;
109
+ /** One observation of a score and an outcome, and the independent unit it belongs to. */
110
+ interface ClusteredAssociationRow {
111
+ x: number;
112
+ /** 0 or 1 for `auc`; any finite value for `spearman`. */
113
+ y: number;
114
+ unit: string;
115
+ /** The comparison group under the `stratified` scope, such as a bin of an exposure. */
116
+ stratum?: string;
117
+ }
118
+ type ClusteredAssociationScope = 'pooled' | 'within-unit' | 'stratified';
119
+ interface ClusteredAssociationOptions {
120
+ /** `auc`: probability a 1 outranks a 0 on x (null 0.5). `spearman`: rank correlation (null 0). */
121
+ statistic: 'auc' | 'spearman';
122
+ /**
123
+ * `pooled` compares rows across all units. `stratified` compares rows only
124
+ * inside each `stratum` and averages the strata, weighting each by its
125
+ * comparable pairs, so differences between strata cannot move it.
126
+ * `within-unit` is the stratified statistic with the unit as the stratum.
127
+ * Every scope resamples whole units. Default `pooled`.
128
+ */
129
+ scope?: ClusteredAssociationScope;
130
+ /** `greater` tests only for an association above the null. Default `two-sided`. */
131
+ alternative?: 'two-sided' | 'greater';
132
+ /** Whole-unit resamples. Default 1000. */
133
+ resamples?: number;
134
+ /** Percentile interval level. Default 0.95. */
135
+ confidence?: number;
136
+ /** Absent, the seed is derived from the rows, so the same rows give the same result. */
137
+ seed?: number;
138
+ }
139
+ interface ClusteredAssociation {
140
+ statistic: 'auc' | 'spearman';
141
+ scope: ClusteredAssociationScope;
142
+ alternative: 'two-sided' | 'greater';
143
+ /** Rows and distinct units the estimate reads; within strata or units, only those holding a comparable pair. */
144
+ n: number;
145
+ units: number;
146
+ estimate: number;
147
+ /** Value of the statistic under no association. */
148
+ null: number;
149
+ /** Standard deviation of the statistic over whole-unit resamples. */
150
+ standardError: number;
151
+ /** Percentile interval over the same resamples. */
152
+ low: number;
153
+ high: number;
154
+ confidence: number;
155
+ /** p-value of `(estimate - null) / standardError` on Student-t with `units - 1` degrees of freedom, under `alternative`. */
156
+ pValue: number;
157
+ resamples: number;
158
+ /** Resamples whose statistic was defined; a resample with one outcome class or a constant side is omitted. */
159
+ definedResamples: number;
160
+ }
161
+ /**
162
+ * Association between a score and an outcome when rows share independent units.
163
+ *
164
+ * The interval and the standard error come from resampling whole units, never
165
+ * rows: rows of one unit share whatever makes that unit differ, and a row
166
+ * resample counts them as independent evidence. The p-value is a Wald test on
167
+ * that standard error with `units - 1` degrees of freedom, so it stays
168
+ * continuous for a false-discovery correction across many measures instead of
169
+ * stopping at the bootstrap's `1 / resamples` floor. When every defined
170
+ * resample gives the same value the standard error is zero and the p-value
171
+ * falls back to `1 / (definedResamples + 1)` for an estimate on the tested
172
+ * side of the null, and 1 otherwise.
173
+ *
174
+ * The stratified scope answers whether the score separates rows of the same
175
+ * stratum: AUC inside each stratum weighted by its positive-negative pairs, or
176
+ * Spearman inside each stratum weighted by its row pairs, where a score
177
+ * constant inside a stratum counts as no association there. A resample draws
178
+ * whole units and regroups their rows by stratum. The within-unit scope is the
179
+ * same statistic with each unit its own stratum, so a drawn unit is drawn with
180
+ * its stratum.
181
+ */
182
+ declare function clusteredAssociation(rows: readonly ClusteredAssociationRow[], options: ClusteredAssociationOptions): ClusteredAssociation;
183
+ /**
184
+ * The point statistic alone, pooled, within units or within strata; NaN when
185
+ * it is undefined on these rows. Within units it needs `unit` on every row,
186
+ * within strata `stratum`.
187
+ */
188
+ declare function associationEstimate(statistic: 'auc' | 'spearman', rows: readonly {
189
+ x: number;
190
+ y: number;
191
+ unit?: string;
192
+ stratum?: string;
193
+ }[], scope?: ClusteredAssociationScope): number;
109
194
  /** One paired difference (treatment minus control) and the cluster it belongs to. */
110
195
  interface ClusteredPair {
111
196
  cluster: string;
@@ -639,6 +724,17 @@ declare function pairedBinaryScale(before: ArrayLike<number>, after: ArrayLike<n
639
724
  * form. Requires 1 ≤ k ≤ n and 0 ≤ c ≤ n.
640
725
  */
641
726
  declare function passAtK(n: number, c: number, k: number): number;
727
+ /**
728
+ * Unbiased pass^k (Yao et al. 2024, τ-bench): the probability that every one
729
+ * of a random k of the `n` independent attempts at one task passes, given `c`
730
+ * of them passed — C(c, k) / C(n, k). With n = k it is 1 when all k passed and
731
+ * 0 otherwise: success in all k of k repeats. pass@k rewards one lucky attempt;
732
+ * pass^k charges every unreliable one, so the two diverge exactly on tasks that
733
+ * pass in some repeats only. Average the per-task values across the suite.
734
+ * Shares `passAtK`'s argument rules; computed in product form, so no factorial
735
+ * overflows.
736
+ */
737
+ declare function passHatK(n: number, c: number, k: number): number;
642
738
  /**
643
739
  * Paired significance tests on continuous scores: the paired t-test, the
644
740
  * promotion-gate paired bootstrap, the exact sign test, and the package-wide
@@ -1040,5 +1136,5 @@ interface EProcess {
1040
1136
  * the decision time is the first crossing.
1041
1137
  */
1042
1138
  declare function eProcess(opts?: EProcessOptions): EProcess;
1043
- export { chiSquaredPValue as $, pairedBootstrap as A, ClusteredBinaryDesign as At, independentRiskDifference as B, CorpusAgreementPerDimension as Bt, BOOTSTRAP_GATE_MIN_N as C, ranks as Ct, PairedSignTestResult as D, weightedComposite as Dt, PairedBootstrapResult as E, summarizeNumberSeries as Et, IndependentRiskDifferenceResult as F, clusterSignFlipTest as Ft, pairedRiskDifferenceScore as G, corpusInterRaterAgreement as Gt, pairedBinaryScale as H, CorpusScoreRecord as Ht, McNemarResult as I, clusteredBinaryMde as It, benjaminiHochberg as J, nominalAgreement as Jt, passAtK as K, corpusInterRaterAgreementFromJudgeScores as Kt, ProportionInterval as L, clusteredPairedContrast as Lt, pairedSignTest as M, ClusteredPairedContrast as Mt, pairedTTest as N, JackknifeInterval as Nt, PairedTTestResult as O, weightedMean as Ot, ExactRiskDifferenceResult as P, clusterJackknife as Pt, chiSquared as Q, RiskDifferenceResult as R, simulateClusteredBinaryContrast as Rt, requiredSampleSize as S, pearsonR as St, PairedBootstrapOptions as T, studentTCritical as Tt, pairedRiskDifference as U, NominalAgreement as Ut, mcnemar as V, CorpusAgreementReport as Vt, pairedRiskDifferenceExact as W, NominalAgreementOptions as Wt, holm as X, bonferroni as Y, LinearRegressionResult as Z, mulberry32 as _, WeightedCompositeInput as _t, eProcess as a, CliffsMagnitude as at, pairedMde as b, meanConfidenceInterval as bt, sampleMedian as c, interpretCliffs as ct, RankTestMethod as d, SampleDistribution as dt, fisherExactTwoSided as et, RankTestMethodRequest as f, percentileNearestRank as ft, wilcoxonSignedRank as g, SeriesDistributionOptions as gt, mannWhitneyU as h, SeriesDistribution as ht, EProcessStep as i, twoByTwoPValue as it, pairedDeltaTieFraction as j, ClusteredPair as jt, SignTestAlternative as k, rocAuc as kt, summarizeSample as l, pairedCohensDz as lt, WilcoxonSignedRankResult as m, MeanConfidenceInterval as mt, EProcessOptions as n, normalTwoSidedPValue as nt, SampleSummary as o, cliffsDelta as ot, RankTestOptions as p, summarizeDistribution as pt, wilson as q, interRaterReliability as qt, EProcessState as r, studentTTwoSidedPValue as rt, SampleSummaryOptions as s, cohensD as st, EProcess as t, linearRegressionSlope as tt, MannWhitneyResult as u, DistributionSummaryOptions as ut, mcnemarPower as v, WeightedCompositeResult as vt, DECISION_PAIRED_DELTA_STATISTIC as w, spearmanR as wt, requiredPairedSampleSize as x, partialCredit as xt, mcnemarRequiredN as y, confidenceInterval as yt, ScoreRiskDifferenceResult as z, CorpusAgreementOptions as zt };
1044
- //# sourceMappingURL=index-CKjqN9_U.d.ts.map
1139
+ export { chiSquared as $, corpusInterRaterAgreementFromJudgeScores as $t, pairedBootstrap as A, rocAuc as At, independentRiskDifference as B, ClusteredAssociation as Bt, BOOTSTRAP_GATE_MIN_N as C, pearsonR as Ct, PairedSignTestResult as D, summarizeNumberSeries as Dt, PairedBootstrapResult as E, studentTCritical as Et, IndependentRiskDifferenceResult as F, clusterJackknife as Ft, pairedRiskDifferenceScore as G, clusteredAssociation as Gt, pairedBinaryScale as H, ClusteredAssociationRow as Ht, McNemarResult as I, clusterSignFlipTest as It, wilson as J, CorpusAgreementReport as Jt, passAtK as K, CorpusAgreementOptions as Kt, ProportionInterval as L, clusteredBinaryMde as Lt, pairedSignTest as M, ClusteredPair as Mt, pairedTTest as N, ClusteredPairedContrast as Nt, PairedTTestResult as O, weightedComposite as Ot, ExactRiskDifferenceResult as P, JackknifeInterval as Pt, LinearRegressionResult as Q, corpusInterRaterAgreement as Qt, RiskDifferenceResult as R, clusteredPairedContrast as Rt, requiredSampleSize as S, partialCredit as St, PairedBootstrapOptions as T, spearmanR as Tt, pairedRiskDifference as U, ClusteredAssociationScope as Ut, mcnemar as V, ClusteredAssociationOptions as Vt, pairedRiskDifferenceExact as W, associationEstimate as Wt, bonferroni as X, NominalAgreement as Xt, benjaminiHochberg as Y, CorpusScoreRecord as Yt, holm as Z, NominalAgreementOptions as Zt, mulberry32 as _, SeriesDistributionOptions as _t, eProcess as a, twoByTwoPValue as at, pairedMde as b, confidenceInterval as bt, sampleMedian as c, cohensD as ct, RankTestMethod as d, DistributionSummaryOptions as dt, interRaterReliability as en, chiSquaredPValue as et, RankTestMethodRequest as f, SampleDistribution as ft, wilcoxonSignedRank as g, SeriesDistribution as gt, mannWhitneyU as h, MeanConfidenceInterval as ht, EProcessStep as i, studentTTwoSidedPValue as it, pairedDeltaTieFraction as j, ClusteredBinaryDesign as jt, SignTestAlternative as k, weightedMean as kt, summarizeSample as l, interpretCliffs as lt, WilcoxonSignedRankResult as m, summarizeDistribution as mt, EProcessOptions as n, linearRegressionSlope as nt, SampleSummary as o, CliffsMagnitude as ot, RankTestOptions as p, percentileNearestRank as pt, passHatK as q, CorpusAgreementPerDimension as qt, EProcessState as r, normalTwoSidedPValue as rt, SampleSummaryOptions as s, cliffsDelta as st, EProcess as t, nominalAgreement as tn, fisherExactTwoSided as tt, MannWhitneyResult as u, pairedCohensDz as ut, mcnemarPower as v, WeightedCompositeInput as vt, DECISION_PAIRED_DELTA_STATISTIC as w, ranks as wt, requiredPairedSampleSize as x, meanConfidenceInterval as xt, mcnemarRequiredN as y, WeightedCompositeResult as yt, ScoreRiskDifferenceResult as z, simulateClusteredBinaryContrast as zt };
1140
+ //# sourceMappingURL=index-Bk1XEkP7.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index-Bk1XEkP7.d.ts","names":[],"sources":["../src/statistics/agreement-irr.ts","../src/statistics/clustered-association.ts","../src/statistics/clustered-paired.ts","../src/statistics/comparison-effects.ts","../src/statistics/descriptive.ts","../src/statistics/distribution-summary.ts","../src/statistics/effect-sizes.ts","../src/statistics/inference.ts","../src/statistics/multiplicity.ts","../src/statistics/paired-binary.ts","../src/statistics/paired-tests.ts","../src/statistics/power-and-mde.ts","../src/statistics/random.ts","../src/statistics/rank-tests.ts","../src/statistics/samples.ts","../src/statistics/sequential-eprocess.ts"],"mappings":";;;;;;;;;;;;;;;;;;;iBA0BgB,sBAAsB,aAAa;UA2DlC;;EAEf;;EAEA;;EAEA;;EAEA;;UAGe,oCAAoC;EACnD;;EAEA;;EAEA;;UAGe;;EAEf,cAAc;;EAEd;;EAEA;;EAEA;;EAEA;;UAGe,+BAA+B;;EAE9C;;EAEA;;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