@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,728 +0,0 @@
1
- import {
2
- toJsonl,
3
- toRftItems,
4
- toSftRows,
5
- toVerifiersRolloutOutputs
6
- } from "./chunk-OWN5NPMC.js";
7
- import {
8
- GATE_CHECK_IDS,
9
- GATE_POLICIES,
10
- ROLLOUT_ROLES,
11
- ROLLOUT_SCHEMA,
12
- assertMinted,
13
- assertRolloutLine,
14
- isTrainableSplit,
15
- undeclaredStepPayload
16
- } from "./chunk-PC5DOSM7.js";
17
-
18
- // src/rollout/ledger.ts
19
- import { appendFile, mkdir, readFile, writeFile } from "fs/promises";
20
- import { dirname } from "path";
21
- function serialize(lines) {
22
- for (const [i, line] of lines.entries()) assertRolloutLine(line, `rollout line [${i}]`);
23
- return lines.map((line) => JSON.stringify(line)).join("\n") + (lines.length > 0 ? "\n" : "");
24
- }
25
- async function writeRolloutLedger(path, lines) {
26
- const payload = serialize(lines);
27
- await mkdir(dirname(path), { recursive: true });
28
- await writeFile(path, payload);
29
- }
30
- async function appendRolloutLines(path, lines) {
31
- if (lines.length === 0) return;
32
- const payload = serialize(lines);
33
- await mkdir(dirname(path), { recursive: true });
34
- await appendFile(path, payload);
35
- }
36
- async function readRolloutLedger(path) {
37
- return readLines(path, (parsed, context) => assertMinted(parsed, context));
38
- }
39
- async function readRolloutJournal(path) {
40
- return readLines(path, (parsed, context) => {
41
- assertRolloutLine(parsed, context);
42
- return parsed;
43
- });
44
- }
45
- async function readLines(path, admit) {
46
- const raw = await readFile(path, "utf8");
47
- const lines = [];
48
- const rawLines = raw.split("\n");
49
- for (let i = 0; i < rawLines.length; i++) {
50
- const text = rawLines[i];
51
- if (!text?.trim()) continue;
52
- let parsed;
53
- try {
54
- parsed = JSON.parse(text);
55
- } catch (error) {
56
- throw new Error(
57
- `${path}:${i + 1}: malformed JSON \u2014 ${error instanceof Error ? error.message : String(error)}`
58
- );
59
- }
60
- lines.push(admit(parsed, `${path}:${i + 1}`));
61
- }
62
- return lines;
63
- }
64
-
65
- // src/rollout/release/gate-report.ts
66
- var FORMAT_GATE_DISPOSITION = {
67
- sft: "exclude",
68
- verifiers: "zero-and-flag",
69
- rft: "zero-and-flag",
70
- raw: "zero-and-flag"
71
- };
72
- function gatedRolloutIds(lines) {
73
- return new Set(lines.filter((line) => line.outcome.realness_gated).map((line) => line.rollout_id));
74
- }
75
- var releaseRowRefs = {
76
- // An SFT row is `{messages, metadata}` and `metadata` holds ids plus the
77
- // scalar — no reward-derived payload beyond `reward` itself, and the gated
78
- // disposition is EXCLUDE anyway.
79
- sft: (rows) => rows.map((row) => ({
80
- rollout_id: row.metadata.rollout_id,
81
- reward: row.metadata.reward,
82
- realness_screened: row.metadata.realness_screened
83
- })),
84
- // `metrics` IS the per-rubric score dict in the Prime Intellect verifiers
85
- // format — the same numbers the reward was computed from. This is the leak
86
- // that shipped.
87
- verifiers: (rows) => rows.map((row) => ({
88
- rollout_id: row.info.rollout_id,
89
- reward: row.reward,
90
- evidence: row.metrics,
91
- realness_screened: row.info.realness_screened
92
- })),
93
- // RFT re-samples the completion, but the grader reads `item.reference.*`, so
94
- // the verbatim judge verdict is a reward-bearing field on the row.
95
- rft: (rows) => rows.map((row) => ({
96
- rollout_id: row.reference.rollout_id,
97
- reward: row.reference.reward,
98
- evidence: row.reference.verdict,
99
- realness_screened: row.reference.realness_screened
100
- })),
101
- raw: (lines) => lines.map((line) => ({
102
- rollout_id: line.rollout_id,
103
- reward: line.outcome.reward,
104
- // `provenance.gated_evidence` is deliberately NOT walked: relocating the
105
- // diagnostics there is what the gate DOES, and the raw config is the
106
- // audit dump those diagnostics exist for.
107
- evidence: { metrics: line.outcome.metrics, verdict: line.outcome.verdict },
108
- // `raw` is the only config that writes the whole line, so it is the only
109
- // one whose rows can carry a per-step reward.
110
- stepEvidence: undeclaredStepPayload(line.steps),
111
- realness_screened: line.outcome.realness_screened ?? null
112
- }))
113
- };
114
- function positiveNumbersIn(value, path) {
115
- if (typeof value === "number") {
116
- return Number.isFinite(value) && value > 0 ? [{ path, value }] : [];
117
- }
118
- if (Array.isArray(value)) {
119
- return value.flatMap((item, i) => positiveNumbersIn(item, `${path}[${i}]`));
120
- }
121
- if (typeof value === "object" && value !== null) {
122
- return Object.entries(value).flatMap(
123
- ([key, child]) => positiveNumbersIn(child, path === "" ? key : `${path}.${key}`)
124
- );
125
- }
126
- return [];
127
- }
128
- function measureFormatGate(gated, refs) {
129
- const emitted = refs.filter((ref) => gated.has(ref.rollout_id));
130
- const rewards = emitted.map((ref) => ref.reward).filter((r) => r !== null);
131
- const evidence = emitted.flatMap((ref) => positiveNumbersIn(ref.evidence, ""));
132
- const stepEvidence = emitted.flatMap((ref) => positiveNumbersIn(ref.stepEvidence, "steps"));
133
- const unscreened = refs.filter((ref) => ref.realness_screened === false).map((ref) => ref.reward).filter((r) => r !== null && r > 0);
134
- return {
135
- input: gated.size,
136
- emitted: emitted.length,
137
- excluded: gated.size - emitted.length,
138
- maxEmittedReward: rewards.length === 0 ? null : Math.max(...rewards),
139
- maxEmittedEvidence: evidence.reduce(
140
- (best, found) => best === null || found.value > best.value ? found : best,
141
- null
142
- ),
143
- unscreenedPositiveRows: unscreened.length,
144
- maxUnscreenedReward: unscreened.length === 0 ? null : Math.max(...unscreened),
145
- maxEmittedStepEvidence: stepEvidence.reduce(
146
- (best, found) => best === null || found.value > best.value ? found : best,
147
- null
148
- )
149
- };
150
- }
151
- var REPORT_MEASURES = {
152
- "reward-relationship": (format, counts) => counts.maxEmittedReward === null || counts.maxEmittedReward <= 0 ? null : `release format "${format}": ${counts.emitted} realness-gated row(s) carry a positive reward (max ${counts.maxEmittedReward}). A run flagged as gamed may not ship a positive reward in any config.`,
153
- "gated-evidence": (format, counts) => {
154
- if (counts.maxEmittedEvidence === null) return null;
155
- const { path, value } = counts.maxEmittedEvidence;
156
- return `release format "${format}": ${counts.emitted} realness-gated row(s) carry a positive reward-derived number (${path} = ${value}). Zeroing the scalar is not enough \u2014 the per-layer scores and judge verdict a fabricated reward was computed FROM are the same signal in component form, and in this format they are read as training input. They belong in \`provenance.gated_evidence\` (see \`gateGamedOutcome\`), not on the row.`;
157
- },
158
- "undeclared-step-payload": (format, counts) => {
159
- if (counts.maxEmittedStepEvidence === null) return null;
160
- const { path, value } = counts.maxEmittedStepEvidence;
161
- return `release format "${format}": ${counts.emitted} realness-gated row(s) carry a positive per-step number under a field \`tangle.rollout.v1\` does not declare (${path} = ${value}). A per-step reward is the same training signal as the scalar, in credit-assignment form, and the exporters copy \`steps\` through verbatim \u2014 so the row ships it beside a \`reward\` of 0. It belongs in \`provenance.gated_evidence.steps\` (see \`gateGamedOutcome\`).`;
162
- },
163
- "unscreened-reward": (format, counts) => counts.maxUnscreenedReward === null ? null : `release format "${format}": ${counts.unscreenedPositiveRows} row(s) carry a positive reward (max ${counts.maxUnscreenedReward}) whose producer declares that NO authenticity screen ran on it (\`realness_screened: false\`). Nothing has established those successes are real, and a published dataset may not present an unqualified verdict as a measured one. Screen the runs, or publish them at \`reward: null\`.`
164
- };
165
- function assertGateReport(report) {
166
- for (const [format, counts] of Object.entries(report.byFormat)) {
167
- for (const id of GATE_CHECK_IDS) {
168
- if (GATE_POLICIES.assertGateReport[id].kind !== "enforce") continue;
169
- const failure = REPORT_MEASURES[id](format, counts);
170
- if (failure !== null) throw new Error(failure);
171
- }
172
- if (FORMAT_GATE_DISPOSITION[format] === "exclude" && counts.emitted > 0) {
173
- throw new Error(
174
- `release format "${format}" declares gated lines EXCLUDED but wrote ${counts.emitted} of them.`
175
- );
176
- }
177
- }
178
- }
179
-
180
- // src/rollout/release/card.ts
181
- var RELEASE_FORMATS = ["sft", "verifiers", "rft", "raw"];
182
- var FORMAT_FILES = {
183
- sft: "sft/train.jsonl",
184
- verifiers: "verifiers/train.jsonl",
185
- rft: "rft/train.jsonl",
186
- raw: "raw/train.jsonl"
187
- };
188
- var FORMAT_DESCRIPTIONS = {
189
- sft: "Successful trainable-split transcripts (`reward >= 1`, never realness-gated) as `{messages, metadata}` chat JSONL.",
190
- verifiers: "Prime Intellect verifiers `RolloutOutput`: prompt/completion split at the first assistant turn, plus reward, metrics, tool defs, and token usage.",
191
- rft: "OpenAI RFT items: prompt turns plus `reference.*` verdict fields for a grader (completions are re-sampled during RFT).",
192
- raw: `Full \`${ROLLOUT_SCHEMA}\` ledger lines (scrubbed), one per agent invocation.`
193
- };
194
- function unique(values) {
195
- return [...new Set(values.filter((v) => v !== null))].sort();
196
- }
197
- function formatReward(reward) {
198
- if (reward === null) return "null";
199
- return Number.isInteger(reward) ? String(reward) : reward.toFixed(4);
200
- }
201
- function markdownTable(header, rows) {
202
- return [
203
- `| ${header.join(" | ")} |`,
204
- `| ${header.map(() => "---").join(" | ")} |`,
205
- ...rows.map((row) => `| ${row.join(" | ")} |`)
206
- ].join("\n");
207
- }
208
- var GATE_FLAG_FIELD = {
209
- sft: "\u2014 (no gated row is written)",
210
- verifiers: "`info.realness_gated`",
211
- rft: "`reference.realness_gated`",
212
- raw: "`outcome.realness_gated`"
213
- };
214
- var GATE_POLICY_LABEL = {
215
- sft: "EXCLUDED \u2014 an SFT row is an imitation target",
216
- verifiers: "INCLUDED, reward forced to 0, flagged",
217
- rft: "INCLUDED, reward forced to 0, flagged",
218
- raw: "INCLUDED verbatim, flagged"
219
- };
220
- function gateSection(formats, gate, totalLines) {
221
- const rows = formats.map((format) => {
222
- const counts = gate.byFormat[format];
223
- return [
224
- format,
225
- GATE_POLICY_LABEL[format],
226
- String(counts?.emitted ?? 0),
227
- String(counts?.excluded ?? 0),
228
- counts?.maxEmittedReward === null || counts === void 0 ? "\u2014" : formatReward(counts.maxEmittedReward),
229
- counts?.maxEmittedEvidence == null ? "\u2014" : `${counts.maxEmittedEvidence.path} = ${counts.maxEmittedEvidence.value}`,
230
- GATE_FLAG_FIELD[format]
231
- ];
232
- });
233
- const mixedExclusion = formats.some(
234
- (format) => FORMAT_GATE_DISPOSITION[format] === "zero-and-flag"
235
- );
236
- return [
237
- `\`outcome.realness_gated: true\` marks a run whose success signal was faked (it satisfied the proxy without doing the work). **${gate.gatedLines} of ${totalLines} lines in this release are gated.**`,
238
- "",
239
- "The gate is enforced, not asserted. A line pairing `realness_gated: true` with a reward above 0 is rejected by the schema validator, so it cannot be read out of a source ledger or written into `raw/train.jsonl` at all; on a gated line the numbers the reward was computed from (`outcome.metrics`, the verbatim judge `outcome.verdict`, and any per-step field the schema does not declare \u2014 a per-step reward is the same signal in credit-assignment form) are moved out of `outcome` and `steps[]` and into `provenance.gated_evidence`, where no config reads them as training input; the exporters re-check the same invariant on every line; and the release build measures the rows it is about to write and refuses to write ANY file if a gated row carries a positive reward \u2014 or any positive number derived from one \u2014 in ANY config.",
240
- "",
241
- "The table below is **measured on the rows in this release**, not a description of intent \u2014 the build counts the emitted rows and this card renders those counts:",
242
- "",
243
- markdownTable(
244
- [
245
- "config",
246
- "policy",
247
- "gated rows written",
248
- "gated rows not written",
249
- "max reward",
250
- "max reward-derived number",
251
- "flag"
252
- ],
253
- rows
254
- ),
255
- "",
256
- "Why gated rows are kept where they are kept: an SFT row is imitated verbatim, so a gamed trajectory must never appear in one at any weight. In `verifiers` the reward is a signed learning signal, and a gamed trajectory at reward 0 is a correct negative \u2014 dropping it would bias the negative population toward honest failures and leave a trainer no example of gaming being penalized. `rft` re-samples the completion, so only the prompt and the grader reference ship. `raw` is a faithful audit dump, where the gated row is the one an auditor most wants.",
257
- "",
258
- "Reward 0 is never the only label: every included config carries the flag on the row itself, because zeroing alone makes a faked success indistinguishable from an honest failure. Filter on the flag to drop the gamed population, or select on it to mine it. The gated run's own measurements are not destroyed either \u2014 they are parked verbatim under `provenance.gated_evidence` in `raw/train.jsonl`, which is where an auditor can see what the run claimed and why it was flagged.",
259
- mixedExclusion ? '\n"Gated rows not written" is not all gate: `verifiers` also drops gap lines (empty transcript) and `rft` drops lines with no prompt turn, so that column can mix both causes.' : ""
260
- ].join("\n").trimEnd();
261
- }
262
- function roleRewardRows(lines) {
263
- const counts = /* @__PURE__ */ new Map();
264
- for (const line of lines) {
265
- const byReward = counts.get(line.role) ?? /* @__PURE__ */ new Map();
266
- const key = formatReward(line.outcome.reward);
267
- byReward.set(key, (byReward.get(key) ?? 0) + 1);
268
- counts.set(line.role, byReward);
269
- }
270
- const rows = [];
271
- for (const role of ROLLOUT_ROLES) {
272
- const byReward = counts.get(role);
273
- if (!byReward) continue;
274
- const keys = [...byReward.keys()].sort((a, b) => {
275
- if (a === "null") return 1;
276
- if (b === "null") return -1;
277
- return Number(b) - Number(a);
278
- });
279
- for (const key of keys) rows.push([role, key, String(byReward.get(key))]);
280
- }
281
- return rows;
282
- }
283
- function buildDatasetCard(inputs) {
284
- const {
285
- lines,
286
- formats,
287
- includeProposers,
288
- sourceFiles,
289
- scrubTotals,
290
- excluded,
291
- formatCounts,
292
- gate
293
- } = inputs;
294
- assertGateReport(gate);
295
- const runIds = unique(lines.map((line) => line.run_id));
296
- const generations = [...new Set(lines.map((line) => line.generation))].filter((g) => g !== null).sort((a, b) => a - b);
297
- const models = unique(lines.map((line) => line.policy.model));
298
- const harnesses = unique(lines.map((line) => line.policy.harness));
299
- const captures = unique(lines.map((line) => line.provenance.capture));
300
- const rewardSources = unique(lines.map((line) => line.outcome.reward_source));
301
- const gapLines = lines.filter((line) => line.messages.length === 0).length;
302
- const gatedLines = lines.filter((line) => line.outcome.realness_gated).length;
303
- if (gatedLines !== gate.gatedLines) {
304
- throw new Error(
305
- `dataset card: gate report claims ${gate.gatedLines} realness-gated line(s) but the lines it describes contain ${gatedLines} \u2014 the card and the build measured different data.`
306
- );
307
- }
308
- const configs = formats.map(
309
- (format) => [
310
- ` - config_name: ${format}`,
311
- " data_files:",
312
- " - split: train",
313
- ` path: ${FORMAT_FILES[format]}`
314
- ].join("\n")
315
- ).join("\n");
316
- const frontmatter = [
317
- "---",
318
- "license: unknown",
319
- "pretty_name: Tangle rollout ledger \u2014 agent trajectories",
320
- "configs:",
321
- configs,
322
- "---"
323
- ].join("\n");
324
- const formatsTable = markdownTable(
325
- ["config", "path", "rows", "contents"],
326
- formats.map((format) => [
327
- format,
328
- `\`${FORMAT_FILES[format]}\``,
329
- String(formatCounts[format] ?? 0),
330
- FORMAT_DESCRIPTIONS[format]
331
- ])
332
- );
333
- const countsTable = markdownTable(["role", "reward", "lines"], roleRewardRows(lines));
334
- const scrubTable = markdownTable(
335
- ["rule", "rewrites"],
336
- Object.entries(scrubTotals).map(([rule, count]) => [rule, String(count)])
337
- );
338
- const proposerNote = includeProposers ? "Proposer sessions are INCLUDED (`--include-proposers`); their transcripts contain improvement-loop harness source." : `Proposer sessions are excluded by default (${excluded.proposers} lines dropped); they contain improvement-loop harness source. Rebuild with \`--include-proposers\` to keep them.`;
339
- return `${frontmatter}
340
-
341
- # Tangle rollout ledger \u2014 agent trajectories
342
-
343
- One line per agent invocation (supervisor episode, worker session, proposer shot, judge call, analyst pass) captured by the \`${ROLLOUT_SCHEMA}\` rollout ledger, labeled with improvement-loop coordinates and the official-judge reward, with the full message transcript inline.
344
-
345
- This release contains the **trainable split only** (\`search\`). Holdout, dev, and canary splits are structurally excluded at build time, and the build additionally drops any non-trainable line as a fail-closed filter (${excluded.nonTrain} dropped here).
346
-
347
- ## Formats
348
-
349
- ${formatsTable}
350
-
351
- ## Anti-Goodhart gate (\`realness_gated\`)
352
-
353
- ${gateSection(formats, gate, lines.length)}
354
-
355
- ## Schema (\`${ROLLOUT_SCHEMA}\`)
356
-
357
- Each raw line carries:
358
-
359
- - \`rollout_id\` / \`parent_rollout_id\` \u2014 invocation identity; workers point at their spawning supervisor episode.
360
- - \`run_id\`, \`experiment_id\`, \`candidate_id\` \u2014 run/experiment/candidate identity from the producing RunRecord, when present.
361
- - \`generation\`, \`candidate_index\` \u2014 improvement-loop coordinates (\`-1\` = baseline campaign; \`null\` = not an improvement loop).
362
- - \`role\` \u2014 one of ${ROLLOUT_ROLES.map((role) => `\`${role}\``).join(", ")}.
363
- - \`task\` \u2014 suite, instance id, split, seed, replicate index.
364
- - \`policy\` \u2014 harness, model, provider, profile commit, prompt/config hashes, sampling params.
365
- - \`messages\` / \`tool_defs\` \u2014 full transcript in canonical OpenAI chat-with-tools form (including \`reasoning_content\`). An empty \`messages\` array is a labeled gap line; \`provenance.gap\` says why the transcript could not be recovered (${gapLines} gap lines in this release).
366
- - \`outcome\` \u2014 \`reward\` (the single scalar), \`reward_source\`, the verbatim judge \`verdict\`, non-scalar \`metrics\`, and \`realness_gated\` (anti-Goodhart flag; see [Anti-Goodhart gate](#anti-goodhart-gate-realness_gated) for the per-config treatment and the measured counts).
367
- - \`cost\` \u2014 usd, token counts, wall time.
368
- - \`artifacts\` / \`provenance\` \u2014 patch/run-dir/transcript pointers (scrubbed) and capture metadata.
369
-
370
- ## Provenance
371
-
372
- - Source ledgers: ${sourceFiles.map((file) => `\`${file}\``).join(", ")}
373
- - Run ids: ${runIds.map((id) => `\`${id}\``).join(", ")}
374
- - Generations: ${generations.join(", ")} (\`-1\` = baseline campaign)
375
- - Models: ${models.map((m) => `\`${m}\``).join(", ")}
376
- - Harnesses: ${harnesses.map((h) => `\`${h}\``).join(", ")}
377
- - Capture modes: ${captures.join(", ")}
378
- - Every reward traces to a named source (reward sources in this release: ${rewardSources.map((s) => `\`${s}\``).join(", ")}).
379
-
380
- ${proposerNote}
381
-
382
- ## Reward semantics per role
383
-
384
- - **agent** \u2014 the producing RunRecord's holdout/search score, with the realness gate forcing gamed successes to 0.
385
- - **supervisor** \u2014 the official-judge verdict on the episode's delivered artifact (1 = resolved, 0 = not).
386
- - **worker** \u2014 INHERITED from the parent supervisor episode (\`\u2026/inherited\`). Caveat: reward 1 does not establish this worker's individual contribution (sibling workers in the same episode share the episode outcome), and reward 0 does not prove this worker failed.
387
- - **proposer** \u2014 the fraction of improvement-set instances the proposed candidate resolved (\`\u2026/candidate-resolved-fraction\`); a scalar in [0, 1], not a binary verdict.
388
- - **judge / analyst** \u2014 carry the episode verdict where one applies; otherwise \`reward: null\` (a labeled gap, never 0).
389
-
390
- ## Counts
391
-
392
- ${countsTable}
393
-
394
- Total lines: ${lines.length}
395
-
396
- ## Scrubbing
397
-
398
- Absolute home paths were rewritten to \`$WORK\`, credential-shaped strings were replaced with \`[REDACTED:<kind>]\` markers, internal hostnames were normalized to \`*.internal.example\`, and username-bearing incidentals (\`ls -l\` owner columns, per-user pytest tmpdirs) were normalized to \`user\` / \`$USER\`. Rewrite counts for this release (full per-file breakdown in \`scrub-report.json\`):
399
-
400
- ${scrubTable}
401
-
402
- ## License
403
-
404
- \`license: unknown\` is a placeholder \u2014 the releasing operator must set the real SPDX license id in the frontmatter above before publishing.
405
-
406
- ## Citation
407
-
408
- \`\`\`bibtex
409
- @misc{tangle_rollout_ledger,
410
- title = {Tangle rollout ledger \u2014 agent trajectories},
411
- author = {{Tangle Network}},
412
- howpublished = {HuggingFace Datasets},
413
- note = {Operator: fill in the repository URL, authors, and year before publishing}
414
- }
415
- \`\`\`
416
- `;
417
- }
418
-
419
- // src/rollout/release/scrub.ts
420
- var SCRUB_RULES = [
421
- {
422
- // /home/<user> and /Users/<user> prefixes → $WORK ($HOME-derived paths).
423
- name: "home-path",
424
- pattern: /\/(?:home|Users)\/[A-Za-z0-9._-]+/g,
425
- rewrite: () => "$WORK"
426
- },
427
- {
428
- // Harness stores encode cwd as a dashed path segment (-home-drew-…);
429
- // strip the leading -home-<user> so the username never ships.
430
- name: "home-path-encoded",
431
- pattern: /(?<=\/)-(?:home|Users)-[A-Za-z0-9_.]+/g,
432
- rewrite: () => "$WORK"
433
- },
434
- {
435
- // pytest names its tmpdir after the invoking user (/tmp/pytest-of-drew).
436
- name: "tmp-user-dir",
437
- pattern: /\/tmp\/pytest-of-[A-Za-z0-9._-]+/g,
438
- rewrite: () => "/tmp/pytest-of-$USER"
439
- },
440
- {
441
- // `ls -l` owner/group columns leak the username in captured tool output.
442
- // The `(?!user user…)` guard keeps a second pass at zero rewrites.
443
- name: "ls-owner",
444
- pattern: /([-bcdlps][-rwxsStT]{9}[.+@]?\s+\d+\s+)(?!user user(?=\s))[A-Za-z0-9._-]+\s+[A-Za-z0-9._-]+(?=\s)/g,
445
- rewrite: (_match, prefix) => `${prefix}user user`
446
- },
447
- {
448
- // Env-var-shaped secrets: NAME=value where NAME looks credential-bearing.
449
- // The (?!\[REDACTED:) guard keeps the rule idempotent on its own output.
450
- name: "env-secret",
451
- pattern: /\b([A-Z][A-Z0-9_]*(?:KEY|TOKEN|SECRET|PASSWORD|PASSWD|CREDENTIALS?))=(?!\[REDACTED:)("[^"]*"|'[^']*'|[^\s"']+)/g,
452
- rewrite: (_match, name) => `${name}=[REDACTED:env]`
453
- },
454
- {
455
- name: "bearer-token",
456
- pattern: /\b(Bearer|Basic)\s+(?!\[REDACTED:)[A-Za-z0-9\-._~+/=]{8,}/g,
457
- rewrite: (_match, scheme) => `${scheme} [REDACTED:bearer]`
458
- },
459
- {
460
- // Bare provider-prefixed keys (OpenAI/Anthropic sk-, GitHub ghp_/gho_/…,
461
- // fine-grained PATs, HuggingFace hf_, Slack xox*, AWS AKIA).
462
- name: "api-key",
463
- pattern: /\b(?:sk-[A-Za-z0-9_-]{16,}|gh[pousr]_[A-Za-z0-9]{16,}|github_pat_[A-Za-z0-9_]{20,}|hf_[A-Za-z0-9]{16,}|xox[baprs]-[A-Za-z0-9-]{10,}|AKIA[0-9A-Z]{16})\b/g,
464
- rewrite: () => "[REDACTED:api-key]"
465
- },
466
- {
467
- // Our infra hostnames → placeholder domain, subdomain preserved
468
- // (router.tangle.tools → router.internal.example).
469
- name: "infra-host",
470
- pattern: /(?<![A-Za-z0-9.-])((?:[A-Za-z0-9-]+\.)*)tangle\.(?:tools|network)(?![A-Za-z0-9-])/g,
471
- rewrite: (_match, prefix) => `${prefix ?? ""}internal.example`
472
- },
473
- {
474
- // Known workstation hostnames leak through email Message-IDs and fqdn
475
- // lookups inside captured test output; extend the list as machines join.
476
- name: "machine-host",
477
- pattern: /\b[A-Za-z0-9]+-GTR-Pro\b/g,
478
- rewrite: () => "workstation"
479
- }
480
- ];
481
- function emptyScrubCounts() {
482
- return Object.fromEntries(SCRUB_RULES.map((rule) => [rule.name, 0]));
483
- }
484
- function addScrubCounts(into, from) {
485
- for (const [name, count] of Object.entries(from)) into[name] = (into[name] ?? 0) + count;
486
- return into;
487
- }
488
- function scrubText(text, counts) {
489
- let out = text;
490
- for (const rule of SCRUB_RULES) {
491
- out = out.replace(rule.pattern, (match, ...rest) => {
492
- counts[rule.name] = (counts[rule.name] ?? 0) + 1;
493
- return rule.rewrite(match, typeof rest[0] === "string" ? rest[0] : void 0);
494
- });
495
- }
496
- return out;
497
- }
498
- function scrubValue(value, counts) {
499
- if (typeof value === "string") return scrubText(value, counts);
500
- if (Array.isArray(value)) return value.map((item) => scrubValue(item, counts));
501
- if (value !== null && typeof value === "object") {
502
- const out = {};
503
- for (const [key, item] of Object.entries(value)) out[key] = scrubValue(item, counts);
504
- return out;
505
- }
506
- return value;
507
- }
508
- function scrubRolloutLine(line, counts) {
509
- return assertMinted(scrubValue(line, counts), `scrubbed rollout line ${line.rollout_id}`);
510
- }
511
- function scrubLines(lines) {
512
- const counts = emptyScrubCounts();
513
- return { lines: lines.map((line) => scrubRolloutLine(line, counts)), counts };
514
- }
515
- function defaultRolloutScrubber(text) {
516
- return scrubText(text, emptyScrubCounts());
517
- }
518
-
519
- // src/rollout/release/hf-dataset.ts
520
- import { spawnSync } from "child_process";
521
- import { mkdir as mkdir2, writeFile as writeFile2 } from "fs/promises";
522
- import { basename, dirname as dirname2, join } from "path";
523
- async function buildHfDataset(inputs, options) {
524
- if (inputs.length === 0) throw new Error("no input ledgers given");
525
- if (options.formats.length === 0) throw new Error("no formats selected");
526
- const report = {
527
- files: {},
528
- totals: emptyScrubCounts(),
529
- excluded: { proposers: 0, nonTrain: 0 }
530
- };
531
- const kept = [];
532
- let read = 0;
533
- for (const input of inputs) {
534
- const lines = await readRolloutLedger(input);
535
- read += lines.length;
536
- const shippable = lines.filter((line) => {
537
- if (!isTrainableSplit(line.task.split)) {
538
- report.excluded.nonTrain += 1;
539
- return false;
540
- }
541
- if (!options.includeProposers && line.role === "proposer") {
542
- report.excluded.proposers += 1;
543
- return false;
544
- }
545
- return true;
546
- });
547
- const scrubbed = scrubLines(shippable);
548
- report.files[input] = scrubbed.counts;
549
- addScrubCounts(report.totals, scrubbed.counts);
550
- kept.push(...scrubbed.lines);
551
- }
552
- const formatCounts = {};
553
- const files = [];
554
- const gated = gatedRolloutIds(kept);
555
- const gate = { gatedLines: gated.size, byFormat: {} };
556
- const pending = [];
557
- for (const format of options.formats) {
558
- const path = join(options.out, FORMAT_FILES[format]);
559
- if (format === "raw") {
560
- gate.byFormat.raw = measureFormatGate(gated, releaseRowRefs.raw(kept));
561
- formatCounts.raw = kept.length;
562
- pending.push({ path, write: () => writeRolloutLedger(path, kept) });
563
- } else if (format === "sft") {
564
- const rows = toSftRows(kept);
565
- gate.byFormat.sft = measureFormatGate(gated, releaseRowRefs.sft(rows));
566
- formatCounts.sft = rows.length;
567
- pending.push({ path, write: () => writeFile2(path, toJsonl(rows)) });
568
- } else if (format === "verifiers") {
569
- const outputs = toVerifiersRolloutOutputs(kept, {
570
- gatedLines: FORMAT_GATE_DISPOSITION.verifiers
571
- });
572
- gate.byFormat.verifiers = measureFormatGate(gated, releaseRowRefs.verifiers(outputs));
573
- formatCounts.verifiers = outputs.length;
574
- pending.push({ path, write: () => writeFile2(path, toJsonl(outputs)) });
575
- } else {
576
- const items = toRftItems(kept, { gatedLines: FORMAT_GATE_DISPOSITION.rft });
577
- gate.byFormat.rft = measureFormatGate(gated, releaseRowRefs.rft(items));
578
- formatCounts.rft = items.length;
579
- pending.push({ path, write: () => writeFile2(path, toJsonl(items)) });
580
- }
581
- }
582
- assertGateReport(gate);
583
- for (const { path, write } of pending) {
584
- await mkdir2(dirname2(path), { recursive: true });
585
- await write();
586
- files.push(path);
587
- }
588
- const reportPath = join(options.out, "scrub-report.json");
589
- await writeFile2(reportPath, `${JSON.stringify(report, null, 2)}
590
- `);
591
- files.push(reportPath);
592
- const cardPath = join(options.out, "README.md");
593
- await writeFile2(
594
- cardPath,
595
- buildDatasetCard({
596
- lines: kept,
597
- formats: options.formats,
598
- includeProposers: options.includeProposers,
599
- sourceFiles: inputs.map((input) => basename(input)),
600
- scrubTotals: report.totals,
601
- excluded: report.excluded,
602
- formatCounts,
603
- gate
604
- })
605
- );
606
- files.push(cardPath);
607
- return { inputs, read, kept: kept.length, scrub: report, formatCounts, gate, files };
608
- }
609
- function planPushCommand(repo, outDir) {
610
- return ["huggingface-cli", "upload", repo, outDir, ".", "--repo-type", "dataset"];
611
- }
612
- function pushDataset(repo, outDir) {
613
- const found = spawnSync("which", ["huggingface-cli"], { stdio: "ignore" });
614
- if (found.status !== 0) {
615
- throw new Error(
616
- "huggingface-cli not found on PATH \u2014 install huggingface_hub[cli] before --push"
617
- );
618
- }
619
- if (!process.env.HF_TOKEN) {
620
- throw new Error("HF_TOKEN not present in env \u2014 refusing to push");
621
- }
622
- const [command, ...args] = planPushCommand(repo, outDir);
623
- const run = spawnSync(command, args, { stdio: "inherit" });
624
- if (run.status !== 0) throw new Error(`huggingface-cli upload exited ${String(run.status)}`);
625
- }
626
- var ROLLOUT_RELEASE_USAGE = "usage: agent-eval rollout-release <ledger.jsonl...> --out <dir> [--formats sft,verifiers,rft,raw] [--include-proposers] [--push <org/name>]";
627
- function parseRolloutReleaseArgs(argv) {
628
- const args = {
629
- inputs: [],
630
- out: "",
631
- formats: [...RELEASE_FORMATS],
632
- includeProposers: false,
633
- push: null
634
- };
635
- for (let i = 0; i < argv.length; i++) {
636
- const arg = argv[i];
637
- if (arg === "--out") {
638
- args.out = argv[++i] ?? "";
639
- } else if (arg === "--formats") {
640
- const raw = (argv[++i] ?? "").split(",").filter(Boolean);
641
- for (const format of raw) {
642
- if (!RELEASE_FORMATS.includes(format)) {
643
- throw new Error(
644
- `unknown format "${format}" \u2014 expected one of ${RELEASE_FORMATS.join(",")}`
645
- );
646
- }
647
- }
648
- args.formats = raw;
649
- } else if (arg === "--include-proposers") {
650
- args.includeProposers = true;
651
- } else if (arg === "--push") {
652
- args.push = argv[++i] ?? null;
653
- } else if (arg.startsWith("--")) {
654
- throw new Error(`unknown flag "${arg}"`);
655
- } else {
656
- args.inputs.push(arg);
657
- }
658
- }
659
- if (args.inputs.length === 0 || !args.out) {
660
- throw new Error(ROLLOUT_RELEASE_USAGE);
661
- }
662
- if (args.push !== null && !/^[\w.-]+\/[\w.-]+$/.test(args.push)) {
663
- throw new Error(`--push expects <org/name>, got "${args.push}"`);
664
- }
665
- return args;
666
- }
667
- async function runRolloutReleaseCli(argv) {
668
- let args;
669
- try {
670
- args = parseRolloutReleaseArgs(argv);
671
- } catch (error) {
672
- process.stderr.write(`${error instanceof Error ? error.message : String(error)}
673
- `);
674
- return 2;
675
- }
676
- const summary = await buildHfDataset(args.inputs, args);
677
- process.stdout.write(
678
- `${JSON.stringify(
679
- {
680
- read: summary.read,
681
- kept: summary.kept,
682
- formatCounts: summary.formatCounts,
683
- gate: summary.gate,
684
- scrub: summary.scrub
685
- },
686
- null,
687
- 2
688
- )}
689
- `
690
- );
691
- process.stdout.write(`dataset \u2192 ${args.out} (${summary.files.length} files)
692
- `);
693
- if (args.push !== null) {
694
- pushDataset(args.push, args.out);
695
- process.stdout.write(`pushed \u2192 ${args.push}
696
- `);
697
- }
698
- return 0;
699
- }
700
-
701
- export {
702
- writeRolloutLedger,
703
- appendRolloutLines,
704
- readRolloutLedger,
705
- readRolloutJournal,
706
- FORMAT_GATE_DISPOSITION,
707
- gatedRolloutIds,
708
- releaseRowRefs,
709
- measureFormatGate,
710
- assertGateReport,
711
- RELEASE_FORMATS,
712
- FORMAT_FILES,
713
- buildDatasetCard,
714
- SCRUB_RULES,
715
- emptyScrubCounts,
716
- addScrubCounts,
717
- scrubText,
718
- scrubRolloutLine,
719
- scrubLines,
720
- defaultRolloutScrubber,
721
- buildHfDataset,
722
- planPushCommand,
723
- pushDataset,
724
- ROLLOUT_RELEASE_USAGE,
725
- parseRolloutReleaseArgs,
726
- runRolloutReleaseCli
727
- };
728
- //# sourceMappingURL=chunk-3OCR4R5I.js.map