@tangle-network/agent-eval 0.129.0 → 0.130.1

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 (428) hide show
  1. package/CHANGELOG.md +21 -0
  2. package/README.md +2 -0
  3. package/dist/active-curriculum-C4mk67HP.js +214 -0
  4. package/dist/active-curriculum-C4mk67HP.js.map +1 -0
  5. package/dist/adversarial-smnADNFS.d.ts +21 -0
  6. package/dist/adversarial-smnADNFS.d.ts.map +1 -0
  7. package/dist/analyst/index.d.ts +81 -2872
  8. package/dist/analyst/index.d.ts.map +1 -0
  9. package/dist/analyst/index.js +319 -360
  10. package/dist/analyst/index.js.map +1 -1
  11. package/dist/analyst-BkTS3C58.d.ts +89 -0
  12. package/dist/analyst-BkTS3C58.d.ts.map +1 -0
  13. package/dist/analyst-LsnNpSkm.js +152 -0
  14. package/dist/analyst-LsnNpSkm.js.map +1 -0
  15. package/dist/analyze-runs-C1CavBMk.js +1067 -0
  16. package/dist/analyze-runs-C1CavBMk.js.map +1 -0
  17. package/dist/analyze-runs-FsgYCinh.d.ts +72 -0
  18. package/dist/analyze-runs-FsgYCinh.d.ts.map +1 -0
  19. package/dist/attribute-vocabulary-DLJ6303h.d.ts +54 -0
  20. package/dist/attribute-vocabulary-DLJ6303h.d.ts.map +1 -0
  21. package/dist/authenticity/index.d.ts +81 -79
  22. package/dist/authenticity/index.d.ts.map +1 -0
  23. package/dist/authenticity/index.js +209 -193
  24. package/dist/authenticity/index.js.map +1 -1
  25. package/dist/baseline-HsBvw_dk.js +550 -0
  26. package/dist/baseline-HsBvw_dk.js.map +1 -0
  27. package/dist/baseline-hG3K85h4.d.ts +125 -0
  28. package/dist/baseline-hG3K85h4.d.ts.map +1 -0
  29. package/dist/belief-state/index.d.ts +448 -1188
  30. package/dist/belief-state/index.d.ts.map +1 -0
  31. package/dist/belief-state/index.js +1617 -1709
  32. package/dist/belief-state/index.js.map +1 -1
  33. package/dist/benchmarks/index.d.ts +2 -891
  34. package/dist/benchmarks/index.js +2 -60
  35. package/dist/benchmarks-BJgDGkAD.js +754 -0
  36. package/dist/benchmarks-BJgDGkAD.js.map +1 -0
  37. package/dist/builder-eval/index.d.ts +150 -662
  38. package/dist/builder-eval/index.d.ts.map +1 -0
  39. package/dist/builder-eval/index.js +356 -345
  40. package/dist/builder-eval/index.js.map +1 -1
  41. package/dist/calibration-CNWWA6K8.js +94 -0
  42. package/dist/calibration-CNWWA6K8.js.map +1 -0
  43. package/dist/campaign/index.d.ts +5 -6381
  44. package/dist/campaign/index.js +3 -213
  45. package/dist/campaign-aKJt6emI.js +3886 -0
  46. package/dist/campaign-aKJt6emI.js.map +1 -0
  47. package/dist/cli.d.ts +1 -1
  48. package/dist/cli.js +164 -175
  49. package/dist/cli.js.map +1 -1
  50. package/dist/client-C97NMzqi.d.ts +581 -0
  51. package/dist/client-C97NMzqi.d.ts.map +1 -0
  52. package/dist/client-CYzbdJOZ.js +637 -0
  53. package/dist/client-CYzbdJOZ.js.map +1 -0
  54. package/dist/code-agent-session-BjkMTQ7H.js +1390 -0
  55. package/dist/code-agent-session-BjkMTQ7H.js.map +1 -0
  56. package/dist/code-agent-session-DqqgOJaz.d.ts +143 -0
  57. package/dist/code-agent-session-DqqgOJaz.d.ts.map +1 -0
  58. package/dist/concurrency-DIxRZF_J.js +85 -0
  59. package/dist/concurrency-DIxRZF_J.js.map +1 -0
  60. package/dist/contract/index.d.ts +645 -5565
  61. package/dist/contract/index.d.ts.map +1 -0
  62. package/dist/contract/index.js +1730 -1938
  63. package/dist/contract/index.js.map +1 -1
  64. package/dist/control.d.ts +3 -1030
  65. package/dist/control.js +2 -33
  66. package/dist/cost-ledger-DIgQUFZZ.js +801 -0
  67. package/dist/cost-ledger-DIgQUFZZ.js.map +1 -0
  68. package/dist/cost-ledger-Dye6jCgg.d.ts +236 -0
  69. package/dist/cost-ledger-Dye6jCgg.d.ts.map +1 -0
  70. package/dist/dataset-BvtnC8Dc.d.ts +115 -0
  71. package/dist/dataset-BvtnC8Dc.d.ts.map +1 -0
  72. package/dist/default-registry-C-vFCSEc.js +2579 -0
  73. package/dist/default-registry-C-vFCSEc.js.map +1 -0
  74. package/dist/default-registry-CNPo-Vsb.d.ts +540 -0
  75. package/dist/default-registry-CNPo-Vsb.d.ts.map +1 -0
  76. package/dist/emitter-CPBAhxum.js +266 -0
  77. package/dist/emitter-CPBAhxum.js.map +1 -0
  78. package/dist/emitter-DGQGoLyj.d.ts +113 -0
  79. package/dist/emitter-DGQGoLyj.d.ts.map +1 -0
  80. package/dist/errors-8YnH8WlF.js +64 -0
  81. package/dist/errors-8YnH8WlF.js.map +1 -0
  82. package/dist/errors-CEk209JS.d.ts +76 -0
  83. package/dist/errors-CEk209JS.d.ts.map +1 -0
  84. package/dist/eval-campaign-DEm6c8ru.js +349 -0
  85. package/dist/eval-campaign-DEm6c8ru.js.map +1 -0
  86. package/dist/execution-tracks-CpgFPpS5.js +93 -0
  87. package/dist/execution-tracks-CpgFPpS5.js.map +1 -0
  88. package/dist/exporters-q9iL-2Jf.js +148 -0
  89. package/dist/exporters-q9iL-2Jf.js.map +1 -0
  90. package/dist/extract-usage-BrQ8mCLX.js +155 -0
  91. package/dist/extract-usage-BrQ8mCLX.js.map +1 -0
  92. package/dist/failure-cluster-CqcvCcdR.d.ts +59 -0
  93. package/dist/failure-cluster-CqcvCcdR.d.ts.map +1 -0
  94. package/dist/feedback-trajectory-CVaeREXV.d.ts +340 -0
  95. package/dist/feedback-trajectory-CVaeREXV.d.ts.map +1 -0
  96. package/dist/fuzz.d.ts +320 -646
  97. package/dist/fuzz.d.ts.map +1 -0
  98. package/dist/fuzz.js +670 -618
  99. package/dist/fuzz.js.map +1 -1
  100. package/dist/hf-dataset-DBJXXoY1.js +763 -0
  101. package/dist/hf-dataset-DBJXXoY1.js.map +1 -0
  102. package/dist/hosted/index.d.ts +11 -831
  103. package/dist/hosted/index.d.ts.map +1 -0
  104. package/dist/hosted/index.js +2 -37
  105. package/dist/index-2JJSA6-r2.d.ts +926 -0
  106. package/dist/index-2JJSA6-r2.d.ts.map +1 -0
  107. package/dist/index-6N0aYmpW.d.ts +217 -0
  108. package/dist/index-6N0aYmpW.d.ts.map +1 -0
  109. package/dist/index-BAvgST_9.d.ts +131 -0
  110. package/dist/index-BAvgST_9.d.ts.map +1 -0
  111. package/dist/index-BvnJuTGD.d.ts +68 -0
  112. package/dist/index-BvnJuTGD.d.ts.map +1 -0
  113. package/dist/index-C61Wi7yg.d.ts +547 -0
  114. package/dist/index-C61Wi7yg.d.ts.map +1 -0
  115. package/dist/index-CD_WZ_Xr.d.ts +2250 -0
  116. package/dist/index-CD_WZ_Xr.d.ts.map +1 -0
  117. package/dist/index-DSC51roc.d.ts +102 -0
  118. package/dist/index-DSC51roc.d.ts.map +1 -0
  119. package/dist/index-Em67JBjs.d.ts +335 -0
  120. package/dist/index-Em67JBjs.d.ts.map +1 -0
  121. package/dist/index.d.ts +3755 -15555
  122. package/dist/index.d.ts.map +1 -0
  123. package/dist/index.js +11182 -11216
  124. package/dist/index.js.map +1 -1
  125. package/dist/integrity-BzRbCHzi.js +424 -0
  126. package/dist/integrity-BzRbCHzi.js.map +1 -0
  127. package/dist/integrity-rmVhXWA7.d.ts +61 -0
  128. package/dist/integrity-rmVhXWA7.d.ts.map +1 -0
  129. package/dist/judge-calibration-DFtEMlde.d.ts +146 -0
  130. package/dist/judge-calibration-DFtEMlde.d.ts.map +1 -0
  131. package/dist/ledger-core/index.d.ts +2 -0
  132. package/dist/ledger-core/index.js +2 -0
  133. package/dist/ledger-core-DtZz1RG0.js +388 -0
  134. package/dist/ledger-core-DtZz1RG0.js.map +1 -0
  135. package/dist/llm-client--GR4JbZE.js +687 -0
  136. package/dist/llm-client--GR4JbZE.js.map +1 -0
  137. package/dist/llm-client-B_nIBlYo.d.ts +290 -0
  138. package/dist/llm-client-B_nIBlYo.d.ts.map +1 -0
  139. package/dist/matrix/index.d.ts +3 -155
  140. package/dist/matrix/index.js +2 -8
  141. package/dist/matrix-BzQnu2S6.js +270 -0
  142. package/dist/matrix-BzQnu2S6.js.map +1 -0
  143. package/dist/meta-eval/index.d.ts +4 -1027
  144. package/dist/meta-eval/index.js +393 -390
  145. package/dist/meta-eval/index.js.map +1 -1
  146. package/dist/metrics-C9YY1OcL.js +239 -0
  147. package/dist/metrics-C9YY1OcL.js.map +1 -0
  148. package/dist/mint-yN2M2eh0.js +201 -0
  149. package/dist/mint-yN2M2eh0.js.map +1 -0
  150. package/dist/multi-layer-verifier-BHY1gWAc.d.ts +138 -0
  151. package/dist/multi-layer-verifier-BHY1gWAc.d.ts.map +1 -0
  152. package/dist/multishot/index.d.ts +273 -480
  153. package/dist/multishot/index.d.ts.map +1 -0
  154. package/dist/multishot/index.js +595 -548
  155. package/dist/multishot/index.js.map +1 -1
  156. package/dist/off-policy-DvgzvtIx.js +220 -0
  157. package/dist/off-policy-DvgzvtIx.js.map +1 -0
  158. package/dist/off-policy-mskQw8Mb.d.ts +153 -0
  159. package/dist/off-policy-mskQw8Mb.d.ts.map +1 -0
  160. package/dist/openapi.json +1 -1
  161. package/dist/opencode-sqlite-BGrHeDu3.js +318 -0
  162. package/dist/opencode-sqlite-BGrHeDu3.js.map +1 -0
  163. package/dist/outcome-store-BYHIuO0e.d.ts +65 -0
  164. package/dist/outcome-store-BYHIuO0e.d.ts.map +1 -0
  165. package/dist/outcome-store-ChBKlTd_.js +75 -0
  166. package/dist/outcome-store-ChBKlTd_.js.map +1 -0
  167. package/dist/paired-arms-D9D0wXj2.js +260 -0
  168. package/dist/paired-arms-D9D0wXj2.js.map +1 -0
  169. package/dist/pipelines/index.d.ts +95 -532
  170. package/dist/pipelines/index.d.ts.map +1 -0
  171. package/dist/pipelines/index.js +497 -478
  172. package/dist/pipelines/index.js.map +1 -1
  173. package/dist/pre-registration-DakwTRXk.js +96 -0
  174. package/dist/pre-registration-DakwTRXk.js.map +1 -0
  175. package/dist/propose-review-control-LhIWGzHl.js +1458 -0
  176. package/dist/propose-review-control-LhIWGzHl.js.map +1 -0
  177. package/dist/query-CJ_DX8vl.d.ts +28 -0
  178. package/dist/query-CJ_DX8vl.d.ts.map +1 -0
  179. package/dist/query-Di7eEQ79.js +83 -0
  180. package/dist/query-Di7eEQ79.js.map +1 -0
  181. package/dist/raw-provider-sink-BQd7mzyT.js +201 -0
  182. package/dist/raw-provider-sink-BQd7mzyT.js.map +1 -0
  183. package/dist/raw-provider-sink-BU29Sh8h.d.ts +134 -0
  184. package/dist/raw-provider-sink-BU29Sh8h.d.ts.map +1 -0
  185. package/dist/redact-7Aq1ukl-.js +107 -0
  186. package/dist/redact-7Aq1ukl-.js.map +1 -0
  187. package/dist/release-report-Cz9NKH39.js +603 -0
  188. package/dist/release-report-Cz9NKH39.js.map +1 -0
  189. package/dist/release-report-mvB2G4_J.d.ts +244 -0
  190. package/dist/release-report-mvB2G4_J.d.ts.map +1 -0
  191. package/dist/replay-GnyotH0J.js +1741 -0
  192. package/dist/replay-GnyotH0J.js.map +1 -0
  193. package/dist/replay-OoidtG1E.d.ts +749 -0
  194. package/dist/replay-OoidtG1E.d.ts.map +1 -0
  195. package/dist/reporting.d.ts +6 -1312
  196. package/dist/reporting.js +6 -51
  197. package/dist/researcher-CwTdwXG1.d.ts +314 -0
  198. package/dist/researcher-CwTdwXG1.d.ts.map +1 -0
  199. package/dist/reward-hacking-eAnOsynk.d.ts +224 -0
  200. package/dist/reward-hacking-eAnOsynk.d.ts.map +1 -0
  201. package/dist/reward-hacking-qipEpKvY.js +596 -0
  202. package/dist/reward-hacking-qipEpKvY.js.map +1 -0
  203. package/dist/reward-nw2xZGZG.js +137 -0
  204. package/dist/reward-nw2xZGZG.js.map +1 -0
  205. package/dist/rl.d.ts +760 -4010
  206. package/dist/rl.d.ts.map +1 -0
  207. package/dist/rl.js +2325 -1958
  208. package/dist/rl.js.map +1 -1
  209. package/dist/rolldown-runtime-8H4AJuhK.js +14 -0
  210. package/dist/rollout/index.d.ts +3 -2087
  211. package/dist/rollout/index.js +8 -168
  212. package/dist/rollout-BOYjemfR.js +624 -0
  213. package/dist/rollout-BOYjemfR.js.map +1 -0
  214. package/dist/rubric-predictive-validity-B3xmbmS1.js +141 -0
  215. package/dist/rubric-predictive-validity-B3xmbmS1.js.map +1 -0
  216. package/dist/rubric-predictive-validity-Ku_clp_1.d.ts +74 -0
  217. package/dist/rubric-predictive-validity-Ku_clp_1.d.ts.map +1 -0
  218. package/dist/run-evidence-ClRX_8A9.d.ts +225 -0
  219. package/dist/run-evidence-ClRX_8A9.d.ts.map +1 -0
  220. package/dist/run-record-BuoE80Dq.js +467 -0
  221. package/dist/{chunk-56TAVBOK.js.map → run-record-BuoE80Dq.js.map} +1 -1
  222. package/dist/run-record-CnZu_gjl.d.ts +357 -0
  223. package/dist/run-record-CnZu_gjl.d.ts.map +1 -0
  224. package/dist/run-score-iEEAWiBY.js +41 -0
  225. package/dist/run-score-iEEAWiBY.js.map +1 -0
  226. package/dist/runtime-trajectory-1gyaTOoC.js +93 -0
  227. package/dist/runtime-trajectory-1gyaTOoC.js.map +1 -0
  228. package/dist/runtime-trajectory-BvSZcCHD.d.ts +50 -0
  229. package/dist/runtime-trajectory-BvSZcCHD.d.ts.map +1 -0
  230. package/dist/schema-BtVldJ3T.d.ts +206 -0
  231. package/dist/schema-BtVldJ3T.d.ts.map +1 -0
  232. package/dist/schema-C6DW4ZHR.js +821 -0
  233. package/dist/schema-C6DW4ZHR.js.map +1 -0
  234. package/dist/schema-CRhEY1SO.js +69 -0
  235. package/dist/schema-CRhEY1SO.js.map +1 -0
  236. package/dist/schema-Cef2cFmb.d.ts +408 -0
  237. package/dist/schema-Cef2cFmb.d.ts.map +1 -0
  238. package/dist/semantic-concept-judge-B6cWNJ2K.js +725 -0
  239. package/dist/semantic-concept-judge-B6cWNJ2K.js.map +1 -0
  240. package/dist/sequential-Br0mAPHA.js +148 -0
  241. package/dist/sequential-Br0mAPHA.js.map +1 -0
  242. package/dist/sequential-CYwq6Ff_.d.ts +141 -0
  243. package/dist/sequential-CYwq6Ff_.d.ts.map +1 -0
  244. package/dist/series-convergence-CjO2QdRW.js +43 -0
  245. package/dist/series-convergence-CjO2QdRW.js.map +1 -0
  246. package/dist/series-convergence-ofsqPWhs.d.ts +35 -0
  247. package/dist/series-convergence-ofsqPWhs.d.ts.map +1 -0
  248. package/dist/server-m5D9cvnG.js +1040 -0
  249. package/dist/server-m5D9cvnG.js.map +1 -0
  250. package/dist/skill-usage-C_pXm7lP.d.ts +534 -0
  251. package/dist/skill-usage-C_pXm7lP.d.ts.map +1 -0
  252. package/dist/skillopt-optimization-method-CUmHkGbI.js +7718 -0
  253. package/dist/skillopt-optimization-method-CUmHkGbI.js.map +1 -0
  254. package/dist/skillopt-optimization-method-CWKVTnks.d.ts +1740 -0
  255. package/dist/skillopt-optimization-method-CWKVTnks.d.ts.map +1 -0
  256. package/dist/statistics-Cmj6nynr.d.ts +514 -0
  257. package/dist/statistics-Cmj6nynr.d.ts.map +1 -0
  258. package/dist/statistics-CnnxdpOg.js +1437 -0
  259. package/dist/statistics-CnnxdpOg.js.map +1 -0
  260. package/dist/store-CT9YIIve.d.ts +117 -0
  261. package/dist/store-CT9YIIve.d.ts.map +1 -0
  262. package/dist/store-CxJry_cs.d.ts +229 -0
  263. package/dist/store-CxJry_cs.d.ts.map +1 -0
  264. package/dist/storyboard/index.d.ts +84 -203
  265. package/dist/storyboard/index.d.ts.map +1 -0
  266. package/dist/storyboard/index.js +609 -542
  267. package/dist/storyboard/index.js.map +1 -1
  268. package/dist/summary-report-BNs5nmXI.js +862 -0
  269. package/dist/summary-report-BNs5nmXI.js.map +1 -0
  270. package/dist/summary-report-Cj9gdw4i.d.ts +407 -0
  271. package/dist/summary-report-Cj9gdw4i.d.ts.map +1 -0
  272. package/dist/supervisor-run/index.d.ts +2 -959
  273. package/dist/supervisor-run/index.js +2 -65
  274. package/dist/supervisor-run-_lnTLM3z.js +1679 -0
  275. package/dist/supervisor-run-_lnTLM3z.js.map +1 -0
  276. package/dist/task-failure-attributes-CQZlB3et.js +311 -0
  277. package/dist/task-failure-attributes-CQZlB3et.js.map +1 -0
  278. package/dist/test-graded-scenario-BsqWLmPt.js +318 -0
  279. package/dist/test-graded-scenario-BsqWLmPt.js.map +1 -0
  280. package/dist/test-graded-scenario-D1TaI2va.d.ts +141 -0
  281. package/dist/test-graded-scenario-D1TaI2va.d.ts.map +1 -0
  282. package/dist/tools-BmuN627J.js +1085 -0
  283. package/dist/tools-BmuN627J.js.map +1 -0
  284. package/dist/trace-attributes.d.ts +2 -52
  285. package/dist/trace-attributes.js +131 -61
  286. package/dist/trace-attributes.js.map +1 -1
  287. package/dist/traces.d.ts +12 -2365
  288. package/dist/traces.js +12 -252
  289. package/dist/trajectory-D_7rLrvE.js +56 -0
  290. package/dist/trajectory-D_7rLrvE.js.map +1 -0
  291. package/dist/types-DGsxbAEd.d.ts +387 -0
  292. package/dist/types-DGsxbAEd.d.ts.map +1 -0
  293. package/dist/types-k9tZGKUg.d.ts +640 -0
  294. package/dist/types-k9tZGKUg.d.ts.map +1 -0
  295. package/dist/verdict-Dps8_okt.d.ts +37 -0
  296. package/dist/verdict-Dps8_okt.d.ts.map +1 -0
  297. package/dist/wire/index.d.ts +702 -1173
  298. package/dist/wire/index.d.ts.map +1 -0
  299. package/dist/wire/index.js +2 -81
  300. package/docs/campaign-proposers.md +1 -0
  301. package/package.json +17 -9
  302. package/dist/benchmarks/index.js.map +0 -1
  303. package/dist/campaign/index.js.map +0 -1
  304. package/dist/chunk-2QU3YOPR.js +0 -7374
  305. package/dist/chunk-2QU3YOPR.js.map +0 -1
  306. package/dist/chunk-3OCR4R5I.js +0 -728
  307. package/dist/chunk-3OCR4R5I.js.map +0 -1
  308. package/dist/chunk-3RF76KTD.js +0 -84
  309. package/dist/chunk-3RF76KTD.js.map +0 -1
  310. package/dist/chunk-56TAVBOK.js +0 -698
  311. package/dist/chunk-5DTSBUL2.js +0 -159
  312. package/dist/chunk-5DTSBUL2.js.map +0 -1
  313. package/dist/chunk-7FO3TNPI.js +0 -232
  314. package/dist/chunk-7FO3TNPI.js.map +0 -1
  315. package/dist/chunk-7ZZMD7UK.js +0 -386
  316. package/dist/chunk-7ZZMD7UK.js.map +0 -1
  317. package/dist/chunk-BOD4O7OF.js +0 -40
  318. package/dist/chunk-BOD4O7OF.js.map +0 -1
  319. package/dist/chunk-BSO5JDQH.js +0 -2335
  320. package/dist/chunk-BSO5JDQH.js.map +0 -1
  321. package/dist/chunk-C6LXANRU.js +0 -1550
  322. package/dist/chunk-C6LXANRU.js.map +0 -1
  323. package/dist/chunk-DODXQREJ.js +0 -752
  324. package/dist/chunk-DODXQREJ.js.map +0 -1
  325. package/dist/chunk-DRYIUNWY.js +0 -622
  326. package/dist/chunk-DRYIUNWY.js.map +0 -1
  327. package/dist/chunk-E7QXT7SX.js +0 -183
  328. package/dist/chunk-E7QXT7SX.js.map +0 -1
  329. package/dist/chunk-EG66UGL4.js +0 -341
  330. package/dist/chunk-EG66UGL4.js.map +0 -1
  331. package/dist/chunk-FXTVJPYD.js +0 -576
  332. package/dist/chunk-FXTVJPYD.js.map +0 -1
  333. package/dist/chunk-G7MGMCZD.js +0 -153
  334. package/dist/chunk-G7MGMCZD.js.map +0 -1
  335. package/dist/chunk-GGE4NNQT.js +0 -65
  336. package/dist/chunk-GGE4NNQT.js.map +0 -1
  337. package/dist/chunk-H23X7XKK.js +0 -181
  338. package/dist/chunk-H23X7XKK.js.map +0 -1
  339. package/dist/chunk-HHWE3POT.js +0 -94
  340. package/dist/chunk-HHWE3POT.js.map +0 -1
  341. package/dist/chunk-HPWUNB47.js +0 -289
  342. package/dist/chunk-HPWUNB47.js.map +0 -1
  343. package/dist/chunk-IYCLP2N2.js +0 -766
  344. package/dist/chunk-IYCLP2N2.js.map +0 -1
  345. package/dist/chunk-JHCHEVET.js +0 -274
  346. package/dist/chunk-JHCHEVET.js.map +0 -1
  347. package/dist/chunk-JQSF5DQT.js +0 -701
  348. package/dist/chunk-JQSF5DQT.js.map +0 -1
  349. package/dist/chunk-K4DBDHLK.js +0 -158
  350. package/dist/chunk-K4DBDHLK.js.map +0 -1
  351. package/dist/chunk-K6N6XJJX.js +0 -306
  352. package/dist/chunk-K6N6XJJX.js.map +0 -1
  353. package/dist/chunk-M4YBQKIJ.js +0 -1040
  354. package/dist/chunk-M4YBQKIJ.js.map +0 -1
  355. package/dist/chunk-MA6HLL3S.js +0 -65
  356. package/dist/chunk-MA6HLL3S.js.map +0 -1
  357. package/dist/chunk-MAZ26DC7.js +0 -99
  358. package/dist/chunk-MAZ26DC7.js.map +0 -1
  359. package/dist/chunk-NPCTHQIO.js +0 -91
  360. package/dist/chunk-NPCTHQIO.js.map +0 -1
  361. package/dist/chunk-NY44NC4A.js +0 -1056
  362. package/dist/chunk-NY44NC4A.js.map +0 -1
  363. package/dist/chunk-OIUOT4QD.js +0 -44
  364. package/dist/chunk-OIUOT4QD.js.map +0 -1
  365. package/dist/chunk-ONWEPEDO.js +0 -57
  366. package/dist/chunk-ONWEPEDO.js.map +0 -1
  367. package/dist/chunk-OWN5NPMC.js +0 -152
  368. package/dist/chunk-OWN5NPMC.js.map +0 -1
  369. package/dist/chunk-P6FYH6K4.js +0 -1161
  370. package/dist/chunk-P6FYH6K4.js.map +0 -1
  371. package/dist/chunk-PC4UYEBM.js +0 -166
  372. package/dist/chunk-PC4UYEBM.js.map +0 -1
  373. package/dist/chunk-PC5DOSM7.js +0 -579
  374. package/dist/chunk-PC5DOSM7.js.map +0 -1
  375. package/dist/chunk-PXE2VKMX.js +0 -140
  376. package/dist/chunk-PXE2VKMX.js.map +0 -1
  377. package/dist/chunk-PZ5AY32C.js +0 -10
  378. package/dist/chunk-PZ5AY32C.js.map +0 -1
  379. package/dist/chunk-QB6BDBP2.js +0 -4464
  380. package/dist/chunk-QB6BDBP2.js.map +0 -1
  381. package/dist/chunk-RXHCETDZ.js +0 -536
  382. package/dist/chunk-RXHCETDZ.js.map +0 -1
  383. package/dist/chunk-RZTMDUO7.js +0 -49
  384. package/dist/chunk-RZTMDUO7.js.map +0 -1
  385. package/dist/chunk-SFLLL76A.js +0 -669
  386. package/dist/chunk-SFLLL76A.js.map +0 -1
  387. package/dist/chunk-SZLVEKMJ.js +0 -1446
  388. package/dist/chunk-SZLVEKMJ.js.map +0 -1
  389. package/dist/chunk-T4SQEITX.js +0 -95
  390. package/dist/chunk-T4SQEITX.js.map +0 -1
  391. package/dist/chunk-T6RLYGAD.js +0 -158
  392. package/dist/chunk-T6RLYGAD.js.map +0 -1
  393. package/dist/chunk-TJVT4QFF.js +0 -911
  394. package/dist/chunk-TJVT4QFF.js.map +0 -1
  395. package/dist/chunk-TQ7LNKZ3.js +0 -136
  396. package/dist/chunk-TQ7LNKZ3.js.map +0 -1
  397. package/dist/chunk-U4L7JRPZ.js +0 -1706
  398. package/dist/chunk-U4L7JRPZ.js.map +0 -1
  399. package/dist/chunk-U4PHLT2N.js +0 -419
  400. package/dist/chunk-U4PHLT2N.js.map +0 -1
  401. package/dist/chunk-VCZ5FQYW.js +0 -928
  402. package/dist/chunk-VCZ5FQYW.js.map +0 -1
  403. package/dist/chunk-VI2UW6B6.js +0 -162
  404. package/dist/chunk-VI2UW6B6.js.map +0 -1
  405. package/dist/chunk-VQMK5FMP.js +0 -247
  406. package/dist/chunk-VQMK5FMP.js.map +0 -1
  407. package/dist/chunk-WGXIEX7P.js +0 -116
  408. package/dist/chunk-WGXIEX7P.js.map +0 -1
  409. package/dist/chunk-WVATSFCP.js +0 -1553
  410. package/dist/chunk-WVATSFCP.js.map +0 -1
  411. package/dist/chunk-X4YIBDER.js +0 -1662
  412. package/dist/chunk-X4YIBDER.js.map +0 -1
  413. package/dist/chunk-YQN4ICPP.js +0 -355
  414. package/dist/chunk-YQN4ICPP.js.map +0 -1
  415. package/dist/chunk-ZET2UAYW.js +0 -89
  416. package/dist/chunk-ZET2UAYW.js.map +0 -1
  417. package/dist/chunk-ZHTZ4EYI.js +0 -1212
  418. package/dist/chunk-ZHTZ4EYI.js.map +0 -1
  419. package/dist/control.js.map +0 -1
  420. package/dist/hosted/index.js.map +0 -1
  421. package/dist/matrix/index.js.map +0 -1
  422. package/dist/reporting.js.map +0 -1
  423. package/dist/rollout/index.js.map +0 -1
  424. package/dist/run-campaign-OJJ7CZF4.js +0 -18
  425. package/dist/run-campaign-OJJ7CZF4.js.map +0 -1
  426. package/dist/supervisor-run/index.js.map +0 -1
  427. package/dist/traces.js.map +0 -1
  428. package/dist/wire/index.js.map +0 -1
@@ -1,837 +1,16 @@
1
- import { z } from 'zod';
2
-
3
- type FailureClass = 'success' | 'reasoning_error' | 'tool_selection_error' | 'tool_argument_error' | 'tool_recovery_failure' | 'hallucination' | 'instruction_following' | 'safety_refusal_miss' | 'policy_violation' | 'budget_exceeded' | 'format_drift' | 'permission_escalation' | 'pii_leak' | 'cost_overrun' | 'timeout' | 'sandbox_failure' | 'missing_user_data' | 'missing_domain_data' | 'missing_codebase_context' | 'missing_runtime_context' | 'missing_credentials' | 'missing_integration_connection' | 'missing_integration_scope' | 'integration_approval_required' | 'integration_auth_expired' | 'integration_provider_failure' | 'bad_integration_manifest' | 'unsafe_integration_write_denied' | 'stale_external_data' | 'bad_retrieval' | 'insufficient_evidence' | 'contradictory_evidence' | 'ambiguous_user_intent' | 'knowledge_readiness_blocked' | 'unknown';
4
-
5
- /**
6
- * Paper-grade RunRecord schema + runtime validator.
7
- *
8
- * Every run that participates in a promotion gate, paper table, or
9
- * researcher loop SHOULD be recorded as a `RunRecord`. The mandatory
10
- * fields are exactly those the paper "Two Loops, Three Roles" requires
11
- * for reproducibility: who/what/when/cost/seed/hash, plus the search vs
12
- * holdout split tag. A task score is optional because execution-only records
13
- * must preserve missing labels instead of converting errors into zero quality.
14
- *
15
- * This is intentionally NOT a replacement for the rich `Run` /
16
- * `ProposeReviewReport` / `ScenarioResult` types already in the
17
- * package. Those are runtime structures with full provenance. A
18
- * `RunRecord` is the analysis-time projection — the JSON-friendly
19
- * row you'd put in a parquet file or paste into a notebook.
20
- *
21
- * Validate at the boundary:
22
- *
23
- * const rec = validateRunRecord(rawJson) // throws on missing
24
- * const ok = isRunRecord(rawJson) // boolean check
25
- * const rec = parseRunRecordSafe(rawJson) // { ok, value | error }
26
- *
27
- * The validator runs in pure TS — zod is intentionally NOT a
28
- * dependency. Round-trip tested in `tests/run-record.test.ts`.
29
- */
30
-
31
- /**
32
- * Explicit execution-lifecycle result for a run.
33
- *
34
- * This is separate from task quality (`outcome`) and failure classification.
35
- * Producers set it only from root-run or process evidence.
36
- */
37
- type RunTerminalOutcome = 'succeeded' | 'failed' | 'cancelled' | 'incomplete' | 'unknown';
38
-
39
- /**
40
- * Pass A substrate types — `runCampaign` is the one primitive every
41
- * eval flow composes from. Three contracts in this file:
42
- *
43
- * - `Scenario` input set
44
- * - `DispatchFn` how to run one scenario → artifact
45
- * - `CampaignResult` defined output schema (the contract downstream tools depend on)
46
- *
47
- * Three more lifted from earlier substrate work (re-exported):
48
- *
49
- * - `JudgeConfig` pluggable dimensional scorer (0.38)
50
- * - `Mutator` optimization-loop surface mutator
51
- * - `Gate` promotion gate (`HeldOutGate` and friends adapt to this)
52
- *
53
- * No new architecture vs 0.38 — Pass A formalizes the shapes so consumers
54
- * can build dashboards / CI gates / regression diffs against a stable schema.
55
- */
56
-
57
- /** A tier-4 code surface — a finalized candidate change to the agent's
58
- * IMPLEMENTATION, not its prompt. Produced by autoresearch (reads codebase +
59
- * trace findings → opens a worktree). `worktreeRef` locates the candidate;
60
- * the exact commits, tree, and binary-patch digest identify it. See the
61
- * improvement-tier table in `docs/design/loop-taxonomy.md`. */
62
- interface CodeSurface {
63
- readonly kind: 'code';
64
- /** Worktree path or git ref holding the candidate code change. This is a
65
- * mutable locator and is deliberately excluded from content hashes. */
66
- readonly worktreeRef: string;
67
- /** Human-readable ref the worktree was forked from. Not identity-bearing. */
68
- readonly baseRef: string;
69
- /** Exact commit the candidate was forked from. */
70
- readonly baseCommit: string;
71
- /** Exact tree object for `baseCommit`. */
72
- readonly baseTree: string;
73
- /** Exact finalized candidate commit. */
74
- readonly candidateCommit: string;
75
- /** Exact tree object for `candidateCommit`. */
76
- readonly candidateTree: string;
77
- /** Identity of the exact patch artifact. The deployable candidate bundle
78
- * carries the same descriptor plus its base64-encoded content. */
79
- readonly patch: {
80
- readonly format: 'git-diff-binary';
81
- readonly sha256: `sha256:${string}`;
82
- readonly byteLength: number;
83
- };
84
- /** Human summary of what changed — rendered into the auto-PR body. */
85
- readonly summary?: string;
86
- }
87
- /** Named text components optimized together as one candidate. */
88
- interface ComponentSurface {
89
- readonly kind: 'components';
90
- readonly components: Readonly<Record<string, string>>;
91
- }
92
- /** The mutable surface a proposer changes. Tiers (see
93
- * `docs/design/loop-taxonomy.md`):
94
- * - `string` — tiers 1-2: system-prompt addendum / serialized tool
95
- * config. Cheap, reversible, text-diffable.
96
- * - `ComponentSurface` — named prompts, policies, and tool descriptions
97
- * optimized together.
98
- * - `CodeSurface` — tier 4: an implementation change behind a worktree ref.
99
- * Tier 3 (knowledge) is owned by agent-knowledge and rides its own adapter,
100
- * not this type. */
101
- type MutableSurface = string | ComponentSurface | CodeSurface;
102
- /** Five-valued verdict taxonomy (MOSS-paper alignment). */
103
- type GateDecision = 'ship' | 'hold' | 'need_more_work' | 'model_ceiling' | 'arch_ceiling';
104
-
105
- /**
106
- * Reporting helpers — production summaries and paper-quality figures — sit alongside `reporter.ts` rather
107
- * than replacing it.
108
- *
109
- * Three artefacts:
110
- *
111
- * - `summaryTable` Markdown table of per-candidate means,
112
- * 95% bootstrap CIs, BH-adjusted Wilcoxon
113
- * p-values, and Cohen's d versus a
114
- * comparator candidate.
115
- * - `paretoChart` Abstract spec for a cost vs quality
116
- * scatter, with gate decisions overlaid.
117
- * Returns numbers + labels — caller
118
- * chooses the plotting library.
119
- * - `gainHistogram`
120
- * Per-item paired holdout deltas as a
121
- * histogram spec (bins + counts + median +
122
- * CI). Same "data, not images" contract.
123
- *
124
- * The figure types are PlotSpecs — JSON-friendly, library-agnostic.
125
- * They aren't React components and they aren't PNGs; they are
126
- * what you'd hand to vega-lite, plotly, matplotlib, or your own
127
- * Canvas renderer to draw the actual figure.
128
- */
129
-
130
- interface ParetoPoint {
131
- candidateId: string;
132
- /** Mean USD cost per run on the chosen split. */
133
- cost: number;
134
- /** Mean score on the chosen split. */
135
- quality: number;
136
- /** Number of runs that informed this point. */
137
- n: number;
138
- /** Whether this candidate is on the Pareto frontier — high
139
- * quality, low cost, no dominator. */
140
- onFrontier: boolean;
141
- /** Optional gate verdict for this candidate, if a `GateDecision`
142
- * for it was passed in. */
143
- gate?: 'promote' | 'reject';
144
- }
145
- interface ParetoFigureSpec {
146
- kind: 'pareto-cost-quality';
147
- split: 'search' | 'holdout';
148
- points: ParetoPoint[];
149
- axes: {
150
- x: 'costUsd';
151
- y: 'score';
152
- };
153
- }
154
- interface GainDistributionBin {
155
- /** Inclusive lower edge. */
156
- lo: number;
157
- /** Exclusive upper edge (or inclusive if it's the last bin). */
158
- hi: number;
159
- /** Number of pairs whose delta lands in this bin. */
160
- count: number;
161
- }
162
-
163
- interface ContinuousAgreement {
164
- /** Cohen's κ_w with quadratic weights, computed on raw [0,1] scores. */
165
- weightedKappa: number;
166
- /** ICC(2,1): two-way random effects, absolute agreement, single rater. */
167
- icc: number;
168
- /** Pearson product-moment correlation (averaged over rater pairs if N>2). */
169
- pearson: number;
170
- /** Spearman rank correlation (averaged over rater pairs if N>2). */
171
- spearman: number;
172
- /** 95% bootstrap percentile CIs over items. */
173
- ci: {
174
- icc: [number, number];
175
- weightedKappa: [number, number];
176
- };
177
- /** Number of complete items (no NaN across raters). */
178
- n: number;
179
- /** Number of raters. */
180
- raters: number;
181
- }
182
-
183
- /**
184
- * # InsightReport — the rigorous decision packet for any set of agent runs.
185
- *
186
- * Returned by `analyzeRuns()` and embedded in `SelfImproveResult.insight` +
187
- * the hosted-tier `EvalRunEvent.insightReport`. One shape across two surfaces:
188
- *
189
- * - **Customer who has a closed loop** (`selfImprove`): the report ships
190
- * with the loop output. Their dashboard renders ship/hold + lift CI +
191
- * calibration + cluster + Pareto in one packet.
192
- * - **Customer who has observed runs but no loop** (`analyzeRuns` directly):
193
- * same packet from a `RunRecord[]` they already have — production traces,
194
- * approve/reject corpus, CSV gold set.
195
- *
196
- * Every field is optional except the distributional summary — fields are
197
- * populated when the input data supports them:
198
- *
199
- * - `lift` requires both baseline and candidate splits to be present.
200
- * - `interRater` requires multi-rater feedback (≥2 raters per run).
201
- * - `judges` populates per-judge stats only when the run records carry
202
- * `outcome.judgeScores`.
203
- * - `failureClusters` requires the optional `analystRegistry` to be wired.
204
- * - `contamination` requires canary scenarios to be passed in.
205
- * - `outcomeCorrelation` requires a downstream outcome signal.
206
- * - `sequential` requires the run set to be ordered (treats them as a
207
- * stream and emits an anytime-valid interim decision).
208
- *
209
- * Consumers read the `recommendations` array first — that's the
210
- * actionable layer, ranked by priority. The numeric sections back it up.
211
- */
212
-
213
- interface InsightReport {
214
- /** Number of runs analyzed. */
215
- n: number;
216
- /** Runtime facts carried by the run records. These describe execution,
217
- * not task quality: duration, queueing, token categories, models,
218
- * execution errors, and terminal outcomes. */
219
- execution: ExecutionInsight;
220
- /** Composite-score distribution across all runs. Always present. */
221
- composite: ScalarDistribution;
222
- /** Per-dimension distributions for every dimension that appeared in any
223
- * run's judge scores. Empty when no judge scores were recorded. */
224
- perDimension: Record<string, ScalarDistribution>;
225
- /** Cost/quality distribution and Pareto frontier. */
226
- costQuality: {
227
- cost: ScalarDistribution;
228
- pareto: ParetoFigureSpec;
229
- /** Cost source coverage. `uncaptured` rows are excluded from the USD
230
- * distribution and Pareto chart; observed and estimated totals remain
231
- * separate so reports never present estimates as billed spend. */
232
- provenance?: CostProvenanceSummary;
233
- /** Set when the cost/quality view is degraded because the input data
234
- * doesn't fully support it — e.g. all `costUsd` were zero, or only a
235
- * single candidate appears (so the Pareto is a single point). The
236
- * named fields name the degraded sub-view, free-text the reason. */
237
- degraded?: {
238
- cost?: string;
239
- pareto?: string;
240
- };
241
- };
242
- /** Per-judge calibration + bias detection. Populated for every judge name
243
- * that appears in `outcome.judgeScores`. Bias fields require either a
244
- * gold reference or multi-rater data. */
245
- judges: Record<string, JudgeInsight>;
246
- /** Inter-rater agreement when multiple judges scored the same runs.
247
- * Includes pairwise kappa and the specific run ids where raters
248
- * disagree — the cases worth a human meeting. */
249
- interRater?: InterRaterInsight;
250
- /** Pairwise lift (baseline → candidate) with bootstrap CI. Present when
251
- * `RunRecord.splitTag` includes both `holdout` and search/dev splits,
252
- * or when caller passes an explicit baseline/candidate split. */
253
- lift?: LiftInsight;
254
- /** Failure clusters with exemplars. Populated when an AnalystRegistry
255
- * is wired in `analyzeRuns({ analyst })`. */
256
- failureClusters?: FailureClusterInsight;
257
- /** Canary leak count + holdout audit status. Populated when canary
258
- * scenarios are passed in. */
259
- contamination?: ContaminationInsight;
260
- /** Correlation between judge composite and a downstream outcome the
261
- * caller supplies (engagement, revenue, downstream pass rate, etc.).
262
- * When present, the optional reward model is the model that maps
263
- * judge scores → predicted outcome. */
264
- outcomeCorrelation?: OutcomeCorrelationInsight;
265
- /** Aggregate release-readiness summary. A consumer needing the full
266
- * substrate `ReleaseConfidenceScorecard` (SLO-axis evaluation,
267
- * ActionableSideInfo bag) calls `evaluateReleaseConfidence()` directly;
268
- * this summary captures the analyzeRuns-derived axes. */
269
- release: ReleaseSummary;
270
- /** Delta vs a prior period when `baselineRuns` is passed. Per-metric
271
- * current vs baseline with Welch CI + Cohen's d + significance flag.
272
- * Answers "did my last change help?" — the customer-conversion question.
273
- * Surfaced metrics: composite, cost, duration, tokenUsage, plus any
274
- * per-dimension judge metric present in both windows. */
275
- priorPeriodComparison?: PriorPeriodComparison;
276
- /** Model-free task-failure breakdown from `RunRecord.failureClass`, ranked
277
- * by count descending. Domain-specific `failureMode` detail is retained on
278
- * each record but never creates a second aggregation vocabulary. */
279
- failureClasses?: FailureClassTally[];
280
- /** Top-N actionable recommendations, ranked by priority. The packet's
281
- * human-readable layer; the numeric sections are the evidence. */
282
- recommendations: Recommendation[];
283
- }
284
- interface CostProvenanceSummary {
285
- observed: {
286
- n: number;
287
- totalUsd: number;
288
- };
289
- estimated: {
290
- n: number;
291
- totalUsd: number;
292
- };
293
- uncaptured: {
294
- n: number;
295
- };
296
- knownFraction: number;
297
- }
298
- interface ExecutionInsight {
299
- /** End-to-end wall time for every run. */
300
- durationMs: ScalarDistribution;
301
- /** Queue time for the subset of runs that recorded it. */
302
- queueMs: ScalarDistribution;
303
- /** Token distributions plus corpus totals. Optional token categories use
304
- * distribution `n` to disclose how many runs recorded that category. */
305
- tokenUsage: TokenUsageInsight;
306
- /** Usage reported only by orchestration or agent aggregate spans.
307
- * Kept separate because it may duplicate model-call telemetry in other traces. */
308
- aggregateUsage: {
309
- runs: number;
310
- tokenUsage: TokenUsageInsight;
311
- costUsd: ScalarDistribution;
312
- totalCostUsd: number;
313
- };
314
- /** Stable model counts, largest cohort first. */
315
- models: Array<{
316
- model: string;
317
- runs: number;
318
- }>;
319
- /** Model-call coverage. `events` is available only from producers that
320
- * record `outcome.raw.llm_span_count`; `runs` also recognizes non-zero
321
- * token usage from other producers. */
322
- modelCalls: {
323
- runs: number;
324
- events: number;
325
- reportingRuns: number;
326
- };
327
- /** Runs with explicit execution-error telemetry. This is independent of
328
- * whether the root run ultimately succeeded, failed, or has no terminal
329
- * evidence. */
330
- executionErrors: {
331
- runs: number;
332
- /** Share among runs that supplied an execution-error count.
333
- * `null` when no run supplied error telemetry. */
334
- fraction: number | null;
335
- /** Execution-error events reported through the canonical count. */
336
- events: number;
337
- /** Runs that supplied an execution-error count, including explicit zeroes. */
338
- reportingRuns: number;
339
- /** Exact sum of `outcome.raw.error_span_count`, kept separate from other errors. */
340
- errorSpanEvents: number;
341
- /** Runs that supplied `outcome.raw.error_span_count`, including explicit zeroes. */
342
- errorSpanReportingRuns: number;
343
- /**
344
- * Error-telemetry coverage crossed with independently reported terminal
345
- * outcomes. `unreported` is distinct from a reported zero.
346
- */
347
- byTerminalOutcome: Record<RunTerminalOutcome, ExecutionErrorOutcomeCell>;
348
- };
349
- /** Root-run or process outcomes. Missing `RunRecord.terminalOutcome` values
350
- * count as `unknown`; child-span status never changes these counts. */
351
- terminalOutcomes: {
352
- succeeded: number;
353
- failed: number;
354
- cancelled: number;
355
- incomplete: number;
356
- unknown: number;
357
- };
358
- }
359
- interface ExecutionErrorOutcomeCell {
360
- /** Runs that explicitly reported one or more execution errors. */
361
- withErrors: number;
362
- /** Runs that explicitly reported zero execution errors. */
363
- withoutErrors: number;
364
- /** Runs with no execution-error count from the producer. */
365
- unreported: number;
366
- }
367
- interface TokenUsageInsight {
368
- input: ScalarDistribution;
369
- output: ScalarDistribution;
370
- reasoning: ScalarDistribution;
371
- cached: ScalarDistribution;
372
- cacheWrite: ScalarDistribution;
373
- totals: {
374
- input: number;
375
- output: number;
376
- reasoning: number;
377
- cached: number;
378
- cacheWrite: number;
379
- };
380
- }
381
- /** Distributional summary of a scalar-valued metric. */
382
- interface ScalarDistribution {
383
- /** Sample count after dropping non-finite values. */
384
- n: number;
385
- /** Null when `n` is zero. */
386
- mean: number | null;
387
- /** Null when `n` is zero. */
388
- p50: number | null;
389
- /** Null when `n` is zero. */
390
- p95: number | null;
391
- /** Null when `n` is zero. */
392
- stddev: number | null;
393
- /** Null when `n` is zero. */
394
- min: number | null;
395
- /** Null when `n` is zero. */
396
- max: number | null;
397
- /** Histogram bins using `agent-eval`'s `gainHistogram` primitive. */
398
- histogram: GainDistributionBin[];
399
- /** Worst-N runs by score, ascending. Populated for the composite
400
- * distribution so the report names the runs a customer should
401
- * inspect first. Undefined when the distribution was computed from a
402
- * raw value list with no run identity (e.g. cost). */
403
- tailRuns?: Array<{
404
- runId: string;
405
- score: number;
406
- }>;
407
- }
408
- interface JudgeInsight {
409
- /** Number of times this judge scored a run. */
410
- n: number;
411
- /** Mean composite over this judge's runs. */
412
- meanScore: number;
413
- /** Calibration against a gold reference, when provided. Cohen's κ for
414
- * binary thresholding + continuous agreement metrics. */
415
- calibration?: ContinuousAgreement;
416
- /** Positional bias — when the judge sees options in different orders,
417
- * do its preferences track the content or the position? */
418
- positionalBias?: number;
419
- /** Self-preference — when the judge sees its own model's output vs a
420
- * competitor, does it over-pick its own? */
421
- selfPreference?: number;
422
- /** Verbosity bias — does the judge reward longer outputs regardless of
423
- * quality? */
424
- verbosityBias?: number;
425
- }
426
- interface InterRaterInsight {
427
- /** Number of raters whose scores were aggregated. */
428
- raters: number;
429
- /** Number of runs every rater scored. */
430
- jointlyRated: number;
431
- /** Multi-rater weighted kappa over the jointly rated runs. */
432
- kappa: number;
433
- /** Absolute agreement across raters, using ICC(2,1). */
434
- icc: number;
435
- /** Mean pairwise Pearson correlation. Correlation is not agreement. */
436
- pearson: number;
437
- /** Mean pairwise Spearman rank correlation. */
438
- spearman: number;
439
- /** Pairwise weighted kappa per rater pair (key = `"raterA::raterB"`). */
440
- perPair: Record<string, number>;
441
- /** Run ids where raters disagree the most — the high-value triage list. */
442
- disagreementCases: Array<{
443
- runId: string;
444
- ratings: Array<{
445
- rater: string;
446
- score: number;
447
- }>;
448
- range: number;
449
- }>;
450
- }
451
- interface LiftInsight {
452
- baselineMean: number;
453
- candidateMean: number;
454
- /** Candidate − baseline. */
455
- delta: number;
456
- /** Lower / upper bound of bootstrap CI on the delta. */
457
- ci95: [number, number];
458
- /** Paired-t-test p-value. */
459
- pValue: number;
460
- /** Number of paired observations. */
461
- n: number;
462
- /** Scored baseline observations without a candidate match. */
463
- unpairedBaseline: number;
464
- /** Scored candidate observations without a baseline match. */
465
- unpairedCandidate: number;
466
- /** Cohen's dz for paired deltas; null when the observed delta variance is zero. */
467
- cohensD: number | null;
468
- /** Minimum detectable effect at current n, 80% power. */
469
- mde: number;
470
- /** Paired sample size needed to detect the standardized effect at 80% power. */
471
- requiredN: number | null;
472
- }
473
- interface FailureClusterInsight {
474
- /** All clusters identified by the registry, ranked by share descending. */
475
- clusters: Array<{
476
- id: string;
477
- name: string;
478
- /** Fraction of failed runs in this cluster, 0..1. */
479
- share: number;
480
- /** Exemplar `runId`s (≤ 5) the consumer can drill into. */
481
- exemplars: string[];
482
- /** Short LLM-generated suggested fix when the registry supports it. */
483
- suggestedFix?: string;
484
- }>;
485
- totalFailures: number;
486
- }
487
- /** Model-free task-failure breakdown over canonical `RunRecord.failureClass`
488
- * values. Unlike semantic failure clusters, this is computed directly from
489
- * run records and does not require a model analyst. */
490
- interface FailureClassTally {
491
- /** Canonical task-failure class. */
492
- failureClass: FailureClass;
493
- /** Number of failed runs carrying this class. */
494
- count: number;
495
- /** Share of the whole corpus, 0..1. */
496
- share: number;
497
- }
498
- interface ContaminationInsight {
499
- /** Canary phrases that leaked into outputs. */
500
- leaks: number;
501
- /** Holdout audit verdict — did any holdout-tagged run end up in the
502
- * search/dev pool, or vice versa? */
503
- holdoutAuditPassed: boolean;
504
- details?: Array<{
505
- runId: string;
506
- canary: string;
507
- matched: string;
508
- }>;
509
- }
510
- interface OutcomeCorrelationInsight {
511
- /** What outcome the consumer is correlating against (e.g.
512
- * `'engagement_rate'`, `'approval_rate'`, `'downstream_pass'`). */
513
- metric: string;
514
- /** Number of (run, outcome) pairs used. */
515
- n: number;
516
- /** Pearson correlation between composite score and outcome. */
517
- pearson: number;
518
- /** Spearman rank correlation — robust to monotonic non-linearity. */
519
- spearman: number;
520
- /** When present, the simple linear reward model fit to the data. */
521
- rewardModel?: {
522
- intercept: number;
523
- slope: number;
524
- r2: number;
525
- };
526
- }
527
- interface ReleaseSummary {
528
- /** Overall verdict across axes — fail if any axis fails, else warn if any
529
- * warns, else pass. */
530
- status: 'pass' | 'warn' | 'fail';
531
- axes: Array<{
532
- name: 'quality-lift' | 'contamination' | 'composite-distribution';
533
- status: 'pass' | 'warn' | 'fail' | 'not_evaluated';
534
- detail: string;
535
- }>;
536
- /** Free-form issues surfaced beyond the standard axes. Empty by default;
537
- * consumers can post-process to populate. */
538
- issues: string[];
539
- }
540
- interface MetricDelta {
541
- /** Current-period mean. */
542
- current: number;
543
- /** Baseline-period mean. */
544
- baseline: number;
545
- /** current - baseline. Positive means improved (or, for cost/duration,
546
- * the consumer-side interpretation: "higher current" — semantic
547
- * direction depends on the metric). */
548
- delta: number;
549
- /** Welch 95% confidence interval on the delta. Two-sample, unpaired —
550
- * the baseline and current run sets may have different scenarios. */
551
- ci95: [number, number];
552
- /** Welch t-test p-value (two-sided). */
553
- pValue: number;
554
- /** Cohen's d (pooled stddev). Effect size, signed. */
555
- cohensD: number;
556
- /** Sample sizes. */
557
- baselineN: number;
558
- currentN: number;
559
- /** True when p < 0.05 AND |d| >= 0.2 (small-effect threshold). The
560
- * conjunction prevents large-effect-but-noisy and significant-but-
561
- * tiny from triggering recommendations. */
562
- significant: boolean;
563
- }
564
- interface PriorPeriodComparison {
565
- /** Sample counts. */
566
- baselineN: number;
567
- currentN: number;
568
- /** Optional human-readable label — "vs prior 7 days", "vs v3 release". */
569
- windowLabel?: string;
570
- /** Every metric we could compare. Keys: 'composite', 'cost', 'duration',
571
- * 'tokenUsage' for always-present ones; per-dimension keys when both
572
- * windows have judge scores on the same dimension. */
573
- metrics: Record<string, MetricDelta>;
574
- /** Metric names where current is significantly WORSE than baseline.
575
- * Direction-aware: for cost/duration, higher current = worse. */
576
- regressedMetrics: string[];
577
- /** Metric names where current is significantly BETTER than baseline. */
578
- improvedMetrics: string[];
579
- }
580
- interface Recommendation {
581
- priority: 'critical' | 'high' | 'medium' | 'low';
582
- kind: 'ship' | 'hold' | 'investigate' | 'fix' | 'recalibrate' | 'expand-corpus';
583
- title: string;
584
- detail: string;
585
- /** Optional pointer back into the report for the evidence. */
586
- evidencePath?: string;
587
- }
588
-
589
- /**
590
- * # Hosted-tier wire format — the schema that EVERY orchestrator (ours,
591
- * a partner's self-hosted one, a future open implementation) must accept.
592
- *
593
- * This package implements exactly one wire version. Servers reject every
594
- * other version instead of translating old payloads.
595
- *
596
- * The wire format is two event streams in one transport:
597
- *
598
- * 1. **Eval-run events** (`POST /v1/ingest/eval-runs`). Posted when a
599
- * campaign / improvement-loop completes (or per-generation if
600
- * streaming). Carries the structured result + per-cell scores +
601
- * surface diffs the orchestrator stores for the dashboard.
602
- *
603
- * 2. **Trace spans** (`POST /v1/ingest/traces`). Standard OTLP-shaped
604
- * spans with a few additional attributes so the orchestrator can
605
- * pivot from eval-run → underlying execution. Compatible with any
606
- * OTel collector.
607
- *
608
- * Both endpoints are authenticated with a bearer token + a tenant id
609
- * header. Tenants isolate everything downstream of ingest; no tenant
610
- * ever sees another tenant's data.
611
- */
612
-
613
- declare const HOSTED_WIRE_VERSION: "2026-07-24.v1";
614
- type HostedWireVersion = typeof HOSTED_WIRE_VERSION;
615
- /** Every ingest request carries these. */
616
- interface HostedIngestHeaders {
617
- /** Bearer token. The orchestrator validates against the tenant key. */
618
- authorization: `Bearer ${string}`;
619
- /** Stable tenant id (the orchestrator-side primary key for the tenant). */
620
- 'x-tangle-tenant-id': string;
621
- /** Wire-version pin so the server can reject incompatible payloads. */
622
- 'x-tangle-wire-version': HostedWireVersion;
623
- /** Stable request key generated once and reused across retries. */
624
- 'idempotency-key': string;
625
- }
626
- /** Lifecycle stages of an eval-run as the substrate reports them. */
627
- type EvalRunStatus = 'started' | 'baseline-complete' | 'generation-complete' | 'gate-decided' | 'finished' | 'errored';
628
- interface EvalRunCellScore {
629
- /** Stable scenario id from the consumer's scenario set. */
630
- scenarioId: string;
631
- /** Repetition index when reps > 1; 0 for the default. */
632
- rep: number;
633
- /** Composite score across successful judges, or null when unscored. */
634
- compositeMean: number | null;
635
- /** Per-judge and per-dimension scores; failed or missing judges are absent. */
636
- dimensions: Record<string, Record<string, number>>;
637
- /** Root execution result, kept separate from task quality. */
638
- terminalOutcome: RunTerminalOutcome;
639
- /** Canonical execution-error count, or null when the producer did not measure it. */
640
- executionErrorCount: number | null;
641
- /** Per-cell dispatch or judge error. Missing on success. */
642
- errorMessage?: string;
643
- }
644
- interface EvalRunGenerationSnapshot {
645
- /** Generation index. 0 is baseline. */
646
- index: number;
647
- /** Candidate surface fingerprint (stable hash) — pivot key into the
648
- * trace stream to fetch the underlying execution. */
649
- surfaceHash: string;
650
- /** The candidate surface itself. May be omitted to avoid PII when the
651
- * consumer prefers not to ship verbatim prompts. */
652
- surface?: MutableSurface;
653
- /** Per-cell scores for this generation. */
654
- cells: EvalRunCellScore[];
655
- /** Mean across scored cells, or null when no cell has a task-quality label. */
656
- compositeMean: number | null;
657
- /** Total $ spent across this generation. */
658
- costUsd: number;
659
- /** Wall-clock duration of this generation. */
660
- durationMs: number;
661
- }
662
- /**
663
- * The top-level eval-run event. One ingest call per logical eval-run;
664
- * generations stream in incrementally via repeated calls with the same
665
- * `runId`. The orchestrator deduplicates by `(runId, generation.index)`.
666
- */
667
- interface EvalRunEvent {
668
- /** Stable run id (the substrate's `runId`). UUID or substrate-generated. */
669
- runId: string;
670
- /** Where this run was happening — derived from `RunCampaignOptions.runDir`. */
671
- runDir: string;
672
- /** ISO-8601 timestamp the substrate recorded the event. */
673
- timestamp: string;
674
- /** Lifecycle stage this event represents. */
675
- status: EvalRunStatus;
676
- /** Free-form consumer tags (env, branch, model id, etc.). Searchable. */
677
- labels: Record<string, string>;
678
- /** Baseline campaign snapshot. Present when status >= baseline-complete. */
679
- baseline?: EvalRunGenerationSnapshot;
680
- /** Per-generation snapshots. Streams in; orchestrator appends. */
681
- generations: EvalRunGenerationSnapshot[];
682
- /** Final gate decision. Present when status >= gate-decided. */
683
- gateDecision?: GateDecision;
684
- /** Held-out lift = winner-on-holdout - baseline-on-holdout. */
685
- holdoutLift?: number;
686
- /** Total $ spent across baseline + every generation. */
687
- totalCostUsd: number;
688
- /** Total wall-clock duration. */
689
- totalDurationMs: number;
690
- /** Error message if status === 'errored'. */
691
- errorMessage?: string;
692
- /** Rigor packet emitted alongside the run — distributional summary,
693
- * paired-bootstrap lift CI, judge stats, inter-rater agreement,
694
- * contamination check, failure clusters (when an analyst is wired),
695
- * outcome correlation (when downstream signal is supplied), and the
696
- * recommendations the dashboard surfaces verbatim. */
697
- insightReport?: InsightReport;
698
- }
699
- /**
700
- * Canonical unsigned 64-bit integer encoded as a base-10 string.
701
- * JSON numbers cannot represent OTLP nanosecond timestamps exactly.
702
- */
703
- type UnixNanoTimestamp = string;
704
- /**
705
- * OTel-shape span with a few additional attributes for eval-run pivoting.
706
- * Compatible with any OTLP collector — `name`, `traceId`, `spanId`,
707
- * `startTimeUnixNano`, `endTimeUnixNano`, `attributes` are stock OTel.
708
- */
709
- interface TraceSpanEvent {
710
- traceId: string;
711
- spanId: string;
712
- parentSpanId?: string;
713
- name: string;
714
- startTimeUnixNano: UnixNanoTimestamp;
715
- endTimeUnixNano: UnixNanoTimestamp;
716
- attributes: Record<string, string | number | boolean>;
717
- events?: Array<{
718
- timeUnixNano: UnixNanoTimestamp;
719
- name: string;
720
- attributes?: Record<string, string | number | boolean>;
721
- }>;
722
- status?: {
723
- code: 'OK' | 'ERROR' | 'UNSET';
724
- message?: string;
725
- };
726
- /** Pivot back into the eval-run stream. */
727
- 'tangle.runId'?: string;
728
- /** Pivot to the specific generation. */
729
- 'tangle.generation'?: number;
730
- /** Pivot to the specific cell. */
731
- 'tangle.cellId'?: string;
732
- /** Pivot to the specific scenario. */
733
- 'tangle.scenarioId'?: string;
734
- }
735
- interface IngestEvalRunsRequest {
736
- wireVersion: HostedWireVersion;
737
- events: EvalRunEvent[];
738
- }
739
- interface IngestTracesRequest {
740
- wireVersion: HostedWireVersion;
741
- spans: TraceSpanEvent[];
742
- }
743
- interface IngestResponse {
744
- /** Accepted events / spans count. */
745
- accepted: number;
746
- /** Rejected events with reasons (validation failures, dup idempotency key, etc.). */
747
- rejected: Array<{
748
- index: number;
749
- reason: string;
750
- }>;
751
- }
752
-
753
- /**
754
- * # Hosted-tier ingest client.
755
- *
756
- * Ships eval-run events + trace spans to any orchestrator (ours, a
757
- * partner's self-hosted one, or a future open implementation) that
758
- * speaks the wire format in `./types.ts`.
759
- *
760
- * Three modes:
761
- * - **Ours:** point at `https://orchestrator.tangle.tools` (the host root —
762
- * the client appends the versioned `/v1/ingest/...` path itself; a trailing
763
- * `/v1` on the endpoint is tolerated and normalized away). We handle ingest
764
- * + storage + dashboard.
765
- * - **Self-hosted:** point at whatever URL runs the reference receiver
766
- * from `examples/hosted-ingest-server/`.
767
- * - **Off (default):** when `hostedTenant` is unset, nothing is sent.
768
- * Everything stays local.
769
- */
770
-
771
- interface HostedTenant {
772
- /** Orchestrator endpoint base URL (no trailing slash). Required. */
773
- endpoint: string;
774
- /** Bearer token issued by the orchestrator. Required. */
775
- apiKey: string;
776
- /** Tenant id — the orchestrator's primary key for this consumer. Required. */
777
- tenantId: string;
778
- /** Optional `fetch` override (auth wrappers, custom agent, test mocks). */
779
- fetchImpl?: typeof fetch;
780
- /** Per-call timeout in ms. Default 30s. */
781
- timeoutMs?: number;
782
- /** Retries on 5xx / network errors. Default 2. */
783
- retries?: number;
784
- }
785
- interface HostedClient {
786
- ingestEvalRun(event: EvalRunEvent, idempotencyKey?: string): Promise<IngestResponse>;
787
- ingestEvalRuns(events: EvalRunEvent[], idempotencyKey?: string): Promise<IngestResponse>;
788
- ingestTraces(spans: TraceSpanEvent[], idempotencyKey?: string): Promise<IngestResponse>;
789
- readonly tenant: HostedTenant;
790
- readonly wireVersion: HostedWireVersion;
791
- }
792
- declare function createHostedClient(tenant: HostedTenant): HostedClient;
793
- /**
794
- * Build a `HostedClient` from environment, or `undefined` when ingest is not
795
- * configured — the canonical, fail-soft wiring every product uses so eval-run +
796
- * trace provenance lands in the Intelligence dashboard with ONE call:
797
- *
798
- * const hosted = hostedClientFromEnv()
799
- * // ...run the loop...
800
- * await emitLoopProvenance({ ..., hostedClient: hosted }) // no-op if undefined
801
- *
802
- * Returns `undefined` (NOT an error) when any of endpoint / apiKey / tenantId is
803
- * missing — so a product wires the ship call unconditionally and it stays a
804
- * no-op until the env is set. Env precedence:
805
- * - endpoint: `TANGLE_INGEST_URL` → `TANGLE_ORCHESTRATOR_URL`
806
- * - apiKey: `TANGLE_INGEST_API_KEY` → `TANGLE_API_KEY`
807
- * - tenantId: `TANGLE_TENANT_ID`
808
- * A trailing slash on the endpoint is stripped. Pass `overrides` to supply any
809
- * field directly (e.g. a fixed `tenantId` per product) — overrides win over env.
810
- */
811
- /**
812
- * Build a {@link HostedTenant} config from env — the input `selfImprove`'s
813
- * `hostedTenant` and `emitLoopProvenance` take. Same env precedence + overrides
814
- * as {@link hostedClientFromEnv}; returns `undefined` (not an error) when any of
815
- * endpoint / apiKey / tenantId is missing, so a product wires
816
- * `hostedTenant: hostedTenantFromEnv({ tenantId: 'my-agent' })` unconditionally
817
- * and it stays off until the env is set.
818
- */
819
- declare function hostedTenantFromEnv(overrides?: Partial<HostedTenant> & {
820
- env?: Record<string, string | undefined>;
821
- }): HostedTenant | undefined;
822
- declare function hostedClientFromEnv(overrides?: Partial<HostedTenant> & {
823
- env?: Record<string, string | undefined>;
824
- }): HostedClient | undefined;
825
-
1
+ import { j as MutableSurface } from "../types-k9tZGKUg.js";
2
+ import { C as InsightReport, _ as UnixNanoTimestamp, a as hostedTenantFromEnv, c as EvalRunGenerationSnapshot, d as HostedIngestHeaders, f as HostedWireVersion, g as TraceSpanEvent, h as IngestTracesRequest, i as hostedClientFromEnv, l as EvalRunStatus, m as IngestResponse, n as HostedTenant, o as EvalRunCellScore, p as IngestEvalRunsRequest, r as createHostedClient, s as EvalRunEvent, t as HostedClient, u as HOSTED_WIRE_VERSION } from "../client-C97NMzqi.js";
3
+ import { z } from "zod";
4
+ //#region src/hosted/schemas.d.ts
826
5
  declare const UnixNanoTimestampSchema: z.ZodType<UnixNanoTimestamp>;
827
6
  declare const InsightReportSchema: z.ZodType<InsightReport>;
828
7
  declare const MutableSurfaceSchema: z.ZodType<MutableSurface>;
829
8
  declare const RunTerminalOutcomeSchema: z.ZodEnum<{
830
- succeeded: "succeeded";
831
- unknown: "unknown";
832
- failed: "failed";
833
- cancelled: "cancelled";
834
- incomplete: "incomplete";
9
+ cancelled: "cancelled";
10
+ failed: "failed";
11
+ incomplete: "incomplete";
12
+ succeeded: "succeeded";
13
+ unknown: "unknown";
835
14
  }>;
836
15
  declare const EvalRunCellScoreSchema: z.ZodType<EvalRunCellScore>;
837
16
  declare const EvalRunGenerationSnapshotSchema: z.ZodType<EvalRunGenerationSnapshot>;
@@ -840,5 +19,6 @@ declare const TraceSpanEventSchema: z.ZodType<TraceSpanEvent>;
840
19
  declare const IngestEvalRunsRequestSchema: z.ZodType<IngestEvalRunsRequest>;
841
20
  declare const IngestTracesRequestSchema: z.ZodType<IngestTracesRequest>;
842
21
  declare const IngestResponseSchema: z.ZodType<IngestResponse>;
843
-
22
+ //#endregion
844
23
  export { type EvalRunCellScore, EvalRunCellScoreSchema, type EvalRunEvent, EvalRunEventSchema, type EvalRunGenerationSnapshot, EvalRunGenerationSnapshotSchema, type EvalRunStatus, HOSTED_WIRE_VERSION, type HostedClient, type HostedIngestHeaders, type HostedTenant, type HostedWireVersion, type IngestEvalRunsRequest, IngestEvalRunsRequestSchema, type IngestResponse, IngestResponseSchema, type IngestTracesRequest, IngestTracesRequestSchema, type InsightReport, InsightReportSchema, MutableSurfaceSchema, RunTerminalOutcomeSchema, type TraceSpanEvent, TraceSpanEventSchema, type UnixNanoTimestamp, UnixNanoTimestampSchema, createHostedClient, hostedClientFromEnv, hostedTenantFromEnv };
24
+ //# sourceMappingURL=index.d.ts.map