@tangle-network/agent-eval 1.0.29 → 1.0.31

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 (292) hide show
  1. package/CHANGELOG.md +46 -0
  2. package/README.md +1 -0
  3. package/dist/adapters/http.d.ts +2 -2
  4. package/dist/{agent-profile-BF1WLMco.d.ts → agent-profile-BpLyM2kL.d.ts} +2 -2
  5. package/dist/{agent-profile-BF1WLMco.d.ts.map → agent-profile-BpLyM2kL.d.ts.map} +1 -1
  6. package/dist/{agent-profile-cell-3kYxUsK2.d.ts → agent-profile-cell-BTsrta0H.d.ts} +2 -9
  7. package/dist/agent-profile-cell-BTsrta0H.d.ts.map +1 -0
  8. package/dist/agent-profile-cell-CT5JYueM.js.map +1 -1
  9. package/dist/analyst/index.d.ts +13 -13
  10. package/dist/analyst/index.js +11 -11
  11. package/dist/{analyze-runs-BaziIw93.d.ts → analyze-runs-DfUDLaCk.d.ts} +6 -16
  12. package/dist/analyze-runs-DfUDLaCk.d.ts.map +1 -0
  13. package/dist/{analyze-runs-BCSHzqna.js → analyze-runs-YagfYgfx.js} +5 -5
  14. package/dist/{analyze-runs-BCSHzqna.js.map → analyze-runs-YagfYgfx.js.map} +1 -1
  15. package/dist/app-grade/index.d.ts +3 -5
  16. package/dist/app-grade/index.d.ts.map +1 -1
  17. package/dist/app-grade/index.js +2 -6
  18. package/dist/app-grade/index.js.map +1 -1
  19. package/dist/{benchmark-command-DRAHkn4D.js → benchmark-command-wpWa71ul.js} +11 -10
  20. package/dist/benchmark-command-wpWa71ul.js.map +1 -0
  21. package/dist/benchmarks/index.d.ts +7 -6
  22. package/dist/benchmarks/index.d.ts.map +1 -1
  23. package/dist/benchmarks/index.js +13 -5
  24. package/dist/benchmarks/index.js.map +1 -1
  25. package/dist/builder-eval/index.js +1 -1
  26. package/dist/{calibration-Cf-wpqqO.js → calibration-DE2WQmlX.js} +2 -2
  27. package/dist/{calibration-Cf-wpqqO.js.map → calibration-DE2WQmlX.js.map} +1 -1
  28. package/dist/campaign/index.d.ts +8 -8
  29. package/dist/campaign/index.js +14 -14
  30. package/dist/{campaign-Cqz2vk2p.js → campaign-CtdTo5em.js} +15 -15
  31. package/dist/{campaign-Cqz2vk2p.js.map → campaign-CtdTo5em.js.map} +1 -1
  32. package/dist/{campaign-evidence-CVNKiK0q.js → campaign-evidence-BS2-OSFN.js} +4 -4
  33. package/dist/{campaign-evidence-CVNKiK0q.js.map → campaign-evidence-BS2-OSFN.js.map} +1 -1
  34. package/dist/cli.js +9 -8
  35. package/dist/cli.js.map +1 -1
  36. package/dist/{cluster-bootstrap-B0MTOBRU.js → cluster-bootstrap-ClPYIWoX.js} +2 -2
  37. package/dist/{cluster-bootstrap-B0MTOBRU.js.map → cluster-bootstrap-ClPYIWoX.js.map} +1 -1
  38. package/dist/contract/index.d.ts +12 -11
  39. package/dist/contract/index.js +56 -34
  40. package/dist/contract/index.js.map +1 -1
  41. package/dist/{decision-point-CQOczIIH.js → decision-point-DvX1Z4Ue.js} +3 -3
  42. package/dist/{decision-point-CQOczIIH.js.map → decision-point-DvX1Z4Ue.js.map} +1 -1
  43. package/dist/{default-registry-DoIBhuS-.d.ts → default-registry-2Ziw-0sL.d.ts} +7 -7
  44. package/dist/{default-registry-DoIBhuS-.d.ts.map → default-registry-2Ziw-0sL.d.ts.map} +1 -1
  45. package/dist/{default-registry-D-xd7KxV.js → default-registry-DeiYGNKW.js} +3 -3
  46. package/dist/{default-registry-D-xd7KxV.js.map → default-registry-DeiYGNKW.js.map} +1 -1
  47. package/dist/{define-agent-eval-Be2Ser8j.d.ts → define-agent-eval-DmCV1TZo.d.ts} +7 -7
  48. package/dist/{define-agent-eval-Be2Ser8j.d.ts.map → define-agent-eval-DmCV1TZo.d.ts.map} +1 -1
  49. package/dist/{define-agent-eval-BLVewqJm.js → define-agent-eval-GgvRcpNL.js} +7 -7
  50. package/dist/{define-agent-eval-BLVewqJm.js.map → define-agent-eval-GgvRcpNL.js.map} +1 -1
  51. package/dist/diagnosis/index.d.ts +4 -3
  52. package/dist/diagnosis/index.d.ts.map +1 -1
  53. package/dist/diagnosis/index.js +1 -1
  54. package/dist/{dspy-rlm-engine-BS_jxE0P.js → dspy-rlm-engine-DJ_4E-PM.js} +3 -3
  55. package/dist/{dspy-rlm-engine-BS_jxE0P.js.map → dspy-rlm-engine-DJ_4E-PM.js.map} +1 -1
  56. package/dist/{engine-CPBhCLJR.d.ts → engine-yaSDTpEa.d.ts} +2 -2
  57. package/dist/{engine-CPBhCLJR.d.ts.map → engine-yaSDTpEa.d.ts.map} +1 -1
  58. package/dist/{eval-campaign-DpkToY_w.js → eval-campaign-bpSlwr6t.js} +2 -2
  59. package/dist/{eval-campaign-DpkToY_w.js.map → eval-campaign-bpSlwr6t.js.map} +1 -1
  60. package/dist/{evaluation-BjRgUyst.d.ts → evaluation-BQQ2ga5W.d.ts} +4 -4
  61. package/dist/{evaluation-BjRgUyst.d.ts.map → evaluation-BQQ2ga5W.d.ts.map} +1 -1
  62. package/dist/evaluation.d.ts +1 -1
  63. package/dist/{exact-types-DEnrf7NX.d.ts → exact-types-xrjBO9sb.d.ts} +2 -2
  64. package/dist/{exact-types-DEnrf7NX.d.ts.map → exact-types-xrjBO9sb.d.ts.map} +1 -1
  65. package/dist/execution-insight-B-My58JW.d.ts +14 -0
  66. package/dist/execution-insight-B-My58JW.d.ts.map +1 -0
  67. package/dist/experiment/index.d.ts +3 -3
  68. package/dist/experiment/index.js +7 -7
  69. package/dist/{exporters-BKZLt1Px.js → exporters-CfKvJlti.js} +70 -43
  70. package/dist/exporters-CfKvJlti.js.map +1 -0
  71. package/dist/{external-optimizer-process-m9xln7zN.js → external-optimizer-process-jiq4CZD0.js} +2 -2
  72. package/dist/{external-optimizer-process-m9xln7zN.js.map → external-optimizer-process-jiq4CZD0.js.map} +1 -1
  73. package/dist/{external-optimizer-subprocess-GO6s84Ov.js → external-optimizer-subprocess-DUOcOqly.js} +2 -2
  74. package/dist/{external-optimizer-subprocess-GO6s84Ov.js.map → external-optimizer-subprocess-DUOcOqly.js.map} +1 -1
  75. package/dist/failure-cluster-OvKQ0BTq.d.ts +32 -0
  76. package/dist/failure-cluster-OvKQ0BTq.d.ts.map +1 -0
  77. package/dist/{failure-cluster-DOoa7CBg.d.ts → failure-taxonomy-C_SQZ_SJ.d.ts} +2 -30
  78. package/dist/failure-taxonomy-C_SQZ_SJ.d.ts.map +1 -0
  79. package/dist/{feedback-trajectory-DxkG5EPi.d.ts → feedback-trajectory-BbwTH49m.d.ts} +3 -3
  80. package/dist/{feedback-trajectory-DxkG5EPi.d.ts.map → feedback-trajectory-BbwTH49m.d.ts.map} +1 -1
  81. package/dist/{findings-store-CTy71Lnr.js → findings-store-B7JpmgJx.js} +3 -3
  82. package/dist/{findings-store-CTy71Lnr.js.map → findings-store-B7JpmgJx.js.map} +1 -1
  83. package/dist/fuzz.js +1 -1
  84. package/dist/harness-session-lines-hAxOvmtP.js +205 -0
  85. package/dist/harness-session-lines-hAxOvmtP.js.map +1 -0
  86. package/dist/{hf-dataset-Bv114tzB.js → hf-dataset-Cc81I0vQ.js} +65 -141
  87. package/dist/hf-dataset-Cc81I0vQ.js.map +1 -0
  88. package/dist/hosted/index.js +1 -1
  89. package/dist/{index-BI9ecONy.d.ts → index-8hbrQwdR.d.ts} +26 -11
  90. package/dist/index-8hbrQwdR.d.ts.map +1 -0
  91. package/dist/{index-AjfEHHA8.d.ts → index-BFpDeCuS.d.ts} +7 -7
  92. package/dist/{index-AjfEHHA8.d.ts.map → index-BFpDeCuS.d.ts.map} +1 -1
  93. package/dist/{index-DHWFYUVW.d.ts → index-Bcy00QoN.d.ts} +87 -144
  94. package/dist/index-Bcy00QoN.d.ts.map +1 -0
  95. package/dist/{index-BriU7rfL.d.ts → index-BfxYoHGF.d.ts} +226 -6
  96. package/dist/index-BfxYoHGF.d.ts.map +1 -0
  97. package/dist/{index-D-0mg-eu.d.ts → index-BnqugnsM.d.ts} +31 -11
  98. package/dist/index-BnqugnsM.d.ts.map +1 -0
  99. package/dist/{index-C8a9Dyan.d.ts → index-BwJtNdaj.d.ts} +21 -24
  100. package/dist/index-BwJtNdaj.d.ts.map +1 -0
  101. package/dist/{index-VSN1IZQp.d.ts → index-Yec_iihg.d.ts} +4 -3
  102. package/dist/index-Yec_iihg.d.ts.map +1 -0
  103. package/dist/index.d.ts +34 -31
  104. package/dist/index.js +21 -21
  105. package/dist/{integrity-BHM4voOx.js → integrity-BSs9dgKW.js} +3 -3
  106. package/dist/{integrity-BHM4voOx.js.map → integrity-BSs9dgKW.js.map} +1 -1
  107. package/dist/{journal-CTX5uK-n.js → journal-F3msN9OD.js} +5 -399
  108. package/dist/journal-F3msN9OD.js.map +1 -0
  109. package/dist/journal-file-AekB57Er.js +400 -0
  110. package/dist/journal-file-AekB57Er.js.map +1 -0
  111. package/dist/judge-calibration-DnrbQaXI.d.ts +144 -0
  112. package/dist/judge-calibration-DnrbQaXI.d.ts.map +1 -0
  113. package/dist/{judge-gate-DsoI5tx7.js → judge-gate-MP1rHOB4.js} +2 -2
  114. package/dist/{judge-gate-DsoI5tx7.js.map → judge-gate-MP1rHOB4.js.map} +1 -1
  115. package/dist/ledger-core/index.js +3 -2
  116. package/dist/{ledger-core-24IxvmVY.js → ledger-core-COxrkkZi.js} +2 -2
  117. package/dist/{ledger-core-24IxvmVY.js.map → ledger-core-COxrkkZi.js.map} +1 -1
  118. package/dist/{llm-judge-DzAT7Wka.js → llm-judge-Cc33WVHX.js} +102 -27
  119. package/dist/llm-judge-Cc33WVHX.js.map +1 -0
  120. package/dist/{matrix-DdniPG_M.d.ts → matrix-D0fEU0fq.d.ts} +2 -2
  121. package/dist/{matrix-DdniPG_M.d.ts.map → matrix-D0fEU0fq.d.ts.map} +1 -1
  122. package/dist/meta-eval/index.d.ts +3 -3
  123. package/dist/meta-eval/index.js +6 -6
  124. package/dist/{mint-Ck92efNo.js → mint-g8elU5yW.js} +11 -35
  125. package/dist/mint-g8elU5yW.js.map +1 -0
  126. package/dist/multishot/golden/index.d.ts +1 -1
  127. package/dist/multishot/index.d.ts +2 -2
  128. package/dist/openapi.json +1 -1
  129. package/dist/{outcome-observations-DPkH-LHQ.js → outcome-observations-YFFmdGGW.js} +2 -2
  130. package/dist/{outcome-observations-DPkH-LHQ.js.map → outcome-observations-YFFmdGGW.js.map} +1 -1
  131. package/dist/{paired-arms-DjMEtYI9.js → paired-arms-CMSTbLqX.js} +2 -2
  132. package/dist/{paired-arms-DjMEtYI9.js.map → paired-arms-CMSTbLqX.js.map} +1 -1
  133. package/dist/{paired-promotion-decision-DawN2o0G.d.ts → paired-promotion-decision-BBSxTo-h.d.ts} +2 -2
  134. package/dist/{paired-promotion-decision-DawN2o0G.d.ts.map → paired-promotion-decision-BBSxTo-h.d.ts.map} +1 -1
  135. package/dist/{paired-promotion-decision-Bi9__RQS.js → paired-promotion-decision-BoWHWL1i.js} +2 -2
  136. package/dist/{paired-promotion-decision-Bi9__RQS.js.map → paired-promotion-decision-BoWHWL1i.js.map} +1 -1
  137. package/dist/{paired-promotion-power-D03cUj9E.js → paired-promotion-power-BXH3gzvs.js} +3 -3
  138. package/dist/{paired-promotion-power-D03cUj9E.js.map → paired-promotion-power-BXH3gzvs.js.map} +1 -1
  139. package/dist/{pareto-UzjB3ZBk.js → pareto-B226QGVD.js} +54 -47
  140. package/dist/pareto-B226QGVD.js.map +1 -0
  141. package/dist/pipelines/index.d.ts +1 -1
  142. package/dist/pipelines/index.js +1 -1
  143. package/dist/{prime-protocol-RUPtoYiI.d.ts → prime-protocol-3aHqoxSH.d.ts} +2 -2
  144. package/dist/{prime-protocol-RUPtoYiI.d.ts.map → prime-protocol-3aHqoxSH.d.ts.map} +1 -1
  145. package/dist/profile-cell.d.ts +2 -2
  146. package/dist/{promotion-gate-DG_PSJx_.d.ts → promotion-gate-D-ffRHFQ.d.ts} +3 -3
  147. package/dist/{promotion-gate-DG_PSJx_.d.ts.map → promotion-gate-D-ffRHFQ.d.ts.map} +1 -1
  148. package/dist/{promotion-policy-DCgftbnd.js → promotion-policy-CfgRPGx0.js} +4 -4
  149. package/dist/{promotion-policy-DCgftbnd.js.map → promotion-policy-CfgRPGx0.js.map} +1 -1
  150. package/dist/{proposal-findings-CS6LoGGp.js → proposal-findings-BFtn6Lcx.js} +2 -2
  151. package/dist/{proposal-findings-CS6LoGGp.js.map → proposal-findings-BFtn6Lcx.js.map} +1 -1
  152. package/dist/{registry-BqoX13FD.d.ts → registry-x5n4GeBx.d.ts} +3 -3
  153. package/dist/{registry-BqoX13FD.d.ts.map → registry-x5n4GeBx.d.ts.map} +1 -1
  154. package/dist/{release-confidence-B4Xxdpmn.js → release-confidence-baM0TqCx.js} +2 -2
  155. package/dist/{release-confidence-B4Xxdpmn.js.map → release-confidence-baM0TqCx.js.map} +1 -1
  156. package/dist/reporting.d.ts +13 -6
  157. package/dist/reporting.d.ts.map +1 -1
  158. package/dist/reporting.js +5 -5
  159. package/dist/{summary-report-9kwI6jFQ.d.ts → research-report-CUbXuGX-.d.ts} +6 -121
  160. package/dist/research-report-CUbXuGX-.d.ts.map +1 -0
  161. package/dist/{researcher-BuojS14L.d.ts → researcher-D6D7q9uQ.d.ts} +4 -4
  162. package/dist/{researcher-BuojS14L.d.ts.map → researcher-D6D7q9uQ.d.ts.map} +1 -1
  163. package/dist/{reward-hacking-BYiDFbIl.js → reward-hacking-DNiHskry.js} +2 -2
  164. package/dist/{reward-hacking-BYiDFbIl.js.map → reward-hacking-DNiHskry.js.map} +1 -1
  165. package/dist/{reward-hacking-CIdVwVe4.d.ts → reward-hacking-_CAip56v.d.ts} +2 -2
  166. package/dist/{reward-hacking-CIdVwVe4.d.ts.map → reward-hacking-_CAip56v.d.ts.map} +1 -1
  167. package/dist/rl.d.ts +35 -17
  168. package/dist/rl.d.ts.map +1 -1
  169. package/dist/rl.js +116 -24
  170. package/dist/rl.js.map +1 -1
  171. package/dist/rollout/index.d.ts +5 -6
  172. package/dist/rollout/index.js +7 -6
  173. package/dist/{rollout-B86tqluQ.js → rollout-CCh4eSB3.js} +6 -5
  174. package/dist/{rollout-B86tqluQ.js.map → rollout-CCh4eSB3.js.map} +1 -1
  175. package/dist/{rollout-nodes-DhSPJ2X7.js → rollout-nodes-DzmHlPAC.js} +2 -2
  176. package/dist/rollout-nodes-DzmHlPAC.js.map +1 -0
  177. package/dist/{rubric-predictive-validity-Bbi88Aut.d.ts → rubric-predictive-validity-BTN3nNhC.d.ts} +2 -2
  178. package/dist/{rubric-predictive-validity-Bbi88Aut.d.ts.map → rubric-predictive-validity-BTN3nNhC.d.ts.map} +1 -1
  179. package/dist/{rubric-predictive-validity-DL7gJ51F.js → rubric-predictive-validity-Cln7r56F.js} +2 -2
  180. package/dist/{rubric-predictive-validity-DL7gJ51F.js.map → rubric-predictive-validity-Cln7r56F.js.map} +1 -1
  181. package/dist/{run-record-DTTx9Ktr.js → run-record-CbrxTcCO.js} +2 -2
  182. package/dist/{run-record-DTTx9Ktr.js.map → run-record-CbrxTcCO.js.map} +1 -1
  183. package/dist/{run-record-pBlhZizT.d.ts → run-record-hti3ETmO.d.ts} +2 -2
  184. package/dist/{run-record-pBlhZizT.d.ts.map → run-record-hti3ETmO.d.ts.map} +1 -1
  185. package/dist/{runtime-rollouts-BNrm5nC_.js → runtime-rollouts-eO9qpGE9.js} +269 -55
  186. package/dist/{runtime-rollouts-BNrm5nC_.js.map → runtime-rollouts-eO9qpGE9.js.map} +1 -1
  187. package/dist/{schema-PDKQ_iNE.d.ts → schema-BTTzvMnn.d.ts} +24 -5
  188. package/dist/schema-BTTzvMnn.d.ts.map +1 -0
  189. package/dist/{schema-ChIZfnqY.js → schema-b18jtzZw.js} +56 -3
  190. package/dist/schema-b18jtzZw.js.map +1 -0
  191. package/dist/search/index.d.ts +2 -2
  192. package/dist/search/index.js +2 -2
  193. package/dist/{search-kernel-C4XnLKIW.d.ts → search-kernel-IpyhPDQd.d.ts} +287 -276
  194. package/dist/search-kernel-IpyhPDQd.d.ts.map +1 -0
  195. package/dist/{search-ledger-9liYyZf5.js → search-ledger-D_ENQh0d.js} +4 -4
  196. package/dist/{search-ledger-9liYyZf5.js.map → search-ledger-D_ENQh0d.js.map} +1 -1
  197. package/dist/{search-ledger-file-BhOdgYIt.js → search-ledger-file-J8Xh9pU_.js} +3 -3
  198. package/dist/{search-ledger-file-BhOdgYIt.js.map → search-ledger-file-J8Xh9pU_.js.map} +1 -1
  199. package/dist/{search-shipper-B6tMNx1I.js → search-shipper-BUf7s92U.js} +3 -3
  200. package/dist/{search-shipper-B6tMNx1I.js.map → search-shipper-BUf7s92U.js.map} +1 -1
  201. package/dist/{search-summary-CISbbxyr.js → search-summary-B2RpvkkQ.js} +5 -5
  202. package/dist/{search-summary-CISbbxyr.js.map → search-summary-B2RpvkkQ.js.map} +1 -1
  203. package/dist/{sequential-1-T2oi1_.d.ts → sequential-B-zx24n_.d.ts} +2 -2
  204. package/dist/{sequential-1-T2oi1_.d.ts.map → sequential-B-zx24n_.d.ts.map} +1 -1
  205. package/dist/{sequential-Ko7T-zvu.js → sequential-C6k0Wrb7.js} +3 -3
  206. package/dist/{sequential-Ko7T-zvu.js.map → sequential-C6k0Wrb7.js.map} +1 -1
  207. package/dist/{sequential-9TVb5Nu5.js → sequential-pLr7Ukad.js} +3 -3
  208. package/dist/{sequential-9TVb5Nu5.js.map → sequential-pLr7Ukad.js.map} +1 -1
  209. package/dist/{single-run-lock-CUj2tjxT.js → single-run-lock-BSKsoeQF.js} +2 -2
  210. package/dist/{single-run-lock-CUj2tjxT.js.map → single-run-lock-BSKsoeQF.js.map} +1 -1
  211. package/dist/{skillopt-optimization-method-BtX7xXDd.js → skillopt-optimization-method-BnR2yh-a.js} +11 -11
  212. package/dist/{skillopt-optimization-method-BtX7xXDd.js.map → skillopt-optimization-method-BnR2yh-a.js.map} +1 -1
  213. package/dist/{statistical-heldout-Bx1QUDNy.d.ts → statistical-heldout-AvgLVFp6.d.ts} +6 -6
  214. package/dist/{statistical-heldout-Bx1QUDNy.d.ts.map → statistical-heldout-AvgLVFp6.d.ts.map} +1 -1
  215. package/dist/{statistical-heldout-DLO4Ebos.js → statistical-heldout-BvcAVtof.js} +3 -3
  216. package/dist/{statistical-heldout-DLO4Ebos.js.map → statistical-heldout-BvcAVtof.js.map} +1 -1
  217. package/dist/{statistics-CvvC-MPv.js → statistics-CHs0jlsY.js} +184 -2
  218. package/dist/statistics-CHs0jlsY.js.map +1 -0
  219. package/dist/statistics.d.ts +2 -2
  220. package/dist/statistics.js +2 -2
  221. package/dist/{store-tool-spans-kCDPEwjL.d.ts → store-tool-spans-Bm0-YhHG.d.ts} +5 -5
  222. package/dist/{store-tool-spans-kCDPEwjL.d.ts.map → store-tool-spans-Bm0-YhHG.d.ts.map} +1 -1
  223. package/dist/{summary-report-BEhqoxrA.js → summary-report-BgdIlM_w.js} +3 -3
  224. package/dist/{summary-report-BEhqoxrA.js.map → summary-report-BgdIlM_w.js.map} +1 -1
  225. package/dist/summary-report-figures-BoFCoiOP.d.ts +112 -0
  226. package/dist/summary-report-figures-BoFCoiOP.d.ts.map +1 -0
  227. package/dist/supervisor-run/index.d.ts +32 -8
  228. package/dist/supervisor-run/index.d.ts.map +1 -1
  229. package/dist/supervisor-run/index.js +3 -3
  230. package/dist/{systemone-CSwi1hp-.d.ts → systemone-DPVj7a1g.d.ts} +7 -7
  231. package/dist/{systemone-CSwi1hp-.d.ts.map → systemone-DPVj7a1g.d.ts.map} +1 -1
  232. package/dist/{systemone-review-WpWosn3a.d.ts → systemone-review-CrnsTRav.d.ts} +2 -2
  233. package/dist/{systemone-review-WpWosn3a.d.ts.map → systemone-review-CrnsTRav.d.ts.map} +1 -1
  234. package/dist/systemone.d.ts +3 -3
  235. package/dist/systemone.js +1 -1
  236. package/dist/{tool-groups-Bcasvncd.d.ts → tool-groups-5pgmtTmE.d.ts} +3 -3
  237. package/dist/tool-groups-5pgmtTmE.d.ts.map +1 -0
  238. package/dist/{tool-waste-BqSmmPUz.js → tool-waste-DWSohyd3.js} +2 -2
  239. package/dist/{tool-waste-BqSmmPUz.js.map → tool-waste-DWSohyd3.js.map} +1 -1
  240. package/dist/{trace-questions-DI42jXPj.d.ts → trace-questions-ETZDn5ax.d.ts} +3 -3
  241. package/dist/{trace-questions-DI42jXPj.d.ts.map → trace-questions-ETZDn5ax.d.ts.map} +1 -1
  242. package/dist/trace-repair/index.d.ts +2 -2
  243. package/dist/trace-repair/index.js +1 -1
  244. package/dist/traces.d.ts +4 -4
  245. package/dist/training-admission-xaDOlQ_U.d.ts +31 -0
  246. package/dist/training-admission-xaDOlQ_U.d.ts.map +1 -0
  247. package/dist/{tree-D2cNtu9m.js → tree-DA_WI1aV.js} +5 -5
  248. package/dist/{tree-D2cNtu9m.js.map → tree-DA_WI1aV.js.map} +1 -1
  249. package/dist/{types-DbGSC2No.d.ts → types-Dtt11Ppr.d.ts} +2 -2
  250. package/dist/{types-DbGSC2No.d.ts.map → types-Dtt11Ppr.d.ts.map} +1 -1
  251. package/dist/{types-CLGrB4Sv.d.ts → types-_dfu6Ox2.d.ts} +4 -4
  252. package/dist/{types-CLGrB4Sv.d.ts.map → types-_dfu6Ox2.d.ts.map} +1 -1
  253. package/dist/{types-ByrbgALT.d.ts → types-qJwFZTqa.d.ts} +7 -6
  254. package/dist/types-qJwFZTqa.d.ts.map +1 -0
  255. package/dist/{types-CEgIBy0W.d.ts → types-rf0yhJmW.d.ts} +3 -3
  256. package/dist/{types-CEgIBy0W.d.ts.map → types-rf0yhJmW.d.ts.map} +1 -1
  257. package/dist/wire/index.d.ts +1 -1
  258. package/docs/adopt-stack.md +2 -0
  259. package/docs/concepts.md +4 -1
  260. package/docs/design/statistics-decisions.md +17 -0
  261. package/docs/rollout.md +124 -4
  262. package/docs/search-ledger.md +18 -1
  263. package/docs/trace-analysis.md +11 -3
  264. package/package.json +3 -3
  265. package/dist/agent-profile-cell-3kYxUsK2.d.ts.map +0 -1
  266. package/dist/analyze-runs-BaziIw93.d.ts.map +0 -1
  267. package/dist/benchmark-command-DRAHkn4D.js.map +0 -1
  268. package/dist/exporters-BKZLt1Px.js.map +0 -1
  269. package/dist/exporters-dQKYD_Zo.d.ts +0 -159
  270. package/dist/exporters-dQKYD_Zo.d.ts.map +0 -1
  271. package/dist/failure-cluster-DOoa7CBg.d.ts.map +0 -1
  272. package/dist/hf-dataset-Bv114tzB.js.map +0 -1
  273. package/dist/index-BI9ecONy.d.ts.map +0 -1
  274. package/dist/index-BriU7rfL.d.ts.map +0 -1
  275. package/dist/index-C8a9Dyan.d.ts.map +0 -1
  276. package/dist/index-D-0mg-eu.d.ts.map +0 -1
  277. package/dist/index-DHWFYUVW.d.ts.map +0 -1
  278. package/dist/index-VSN1IZQp.d.ts.map +0 -1
  279. package/dist/journal-CTX5uK-n.js.map +0 -1
  280. package/dist/llm-judge-DzAT7Wka.js.map +0 -1
  281. package/dist/mint-Ck92efNo.js.map +0 -1
  282. package/dist/pareto-UzjB3ZBk.js.map +0 -1
  283. package/dist/reward-ap_R9mCH.d.ts +0 -53
  284. package/dist/reward-ap_R9mCH.d.ts.map +0 -1
  285. package/dist/rollout-nodes-DhSPJ2X7.js.map +0 -1
  286. package/dist/schema-ChIZfnqY.js.map +0 -1
  287. package/dist/schema-PDKQ_iNE.d.ts.map +0 -1
  288. package/dist/search-kernel-C4XnLKIW.d.ts.map +0 -1
  289. package/dist/statistics-CvvC-MPv.js.map +0 -1
  290. package/dist/summary-report-9kwI6jFQ.d.ts.map +0 -1
  291. package/dist/tool-groups-Bcasvncd.d.ts.map +0 -1
  292. package/dist/types-ByrbgALT.d.ts.map +0 -1
@@ -1,9 +1,11 @@
1
- import { a as assertMinted, c as assertRolloutLine, d as isTrainableSplit, g as gateErrors, h as GATE_POLICIES, m as GATE_CHECK_IDS, n as ROLLOUT_ROLES, r as ROLLOUT_SCHEMA, v as undeclaredStepPayload, x as licenseClassOf } from "./schema-ChIZfnqY.js";
2
- import { a as toRftItems, o as toSftRows, r as toJsonl, s as toVerifiersRolloutOutputs } from "./exporters-BKZLt1Px.js";
1
+ import { a as hashCanonical, o as jsonDocument, r as canonicalString, t as LEDGER_HASH_PATTERN } from "./canonical-CicJlINA.js";
2
+ import { a as writeLedgerFileAtomically, i as withLedgerFileLock } from "./journal-file-AekB57Er.js";
3
+ import { _ as GATE_CHECK_IDS, a as assertMinted, c as assertRolloutLine, d as isTrainableSplit, n as ROLLOUT_ROLES, r as ROLLOUT_SCHEMA, v as GATE_POLICIES, x as undeclaredStepPayload, y as gateErrors } from "./schema-b18jtzZw.js";
4
+ import { a as toSftRows, i as toRftItems, n as toJsonl, o as toVerifiersRolloutOutputs } from "./exporters-CfKvJlti.js";
5
+ import { readFileSync } from "node:fs";
3
6
  import { basename, dirname, join } from "node:path";
4
7
  import { spawnSync } from "node:child_process";
5
- import { appendFile, mkdir, readFile, stat, writeFile } from "node:fs/promises";
6
- import { claudeCodeRefForFile, codexRefForFile, kimiRefForFile, listReaders, opencodeSessionsInStore, piRefForFile, readerFor, toChatMessages } from "@tangle-network/harness-sessions";
8
+ import { appendFile, mkdir, readFile, writeFile } from "node:fs/promises";
7
9
  // src/rollout/ledger.ts
8
10
  /**
9
11
  * Rollout-ledger file API — append-only JSONL of validated `tangle.rollout.v1`
@@ -78,6 +80,62 @@ async function readLines(path, admit) {
78
80
  }
79
81
  return lines;
80
82
  }
83
+ /**
84
+ * Retain one canonical journal batch exactly once. A receipt commits the fsynced
85
+ * rows; an interrupted write can be finished with the same content. This uses
86
+ * journal validation, so missing labels, explicit gaps and unscreened outcomes
87
+ * remain evidence without being approved for training.
88
+ */
89
+ function admitRolloutBatch(directory, identity, lines) {
90
+ if (!identity.key.trim() || !identity.projection.trim() || !LEDGER_HASH_PATTERN.test(identity.sourceDigest)) throw new Error("rollout batch requires a key, projection version and canonical source digest");
91
+ for (const [index, line] of lines.entries()) assertRolloutLine(line, `rollout batch [${index}]`);
92
+ const document = jsonDocument(lines);
93
+ const digest = hashCanonical(document);
94
+ const batch = join(directory, hashCanonical(identity.key).slice(7));
95
+ const path = join(batch, "rows.jsonl");
96
+ const receiptPath = join(batch, "receipt.json");
97
+ const stored = {
98
+ ...identity,
99
+ digest,
100
+ rowCount: lines.length
101
+ };
102
+ const receipt = {
103
+ ...stored,
104
+ path
105
+ };
106
+ const payload = lines.map((line) => canonicalString(jsonDocument(line))).join("\n") + (lines.length ? "\n" : "");
107
+ const context = {
108
+ subject: "rollout batch",
109
+ integrityError: (message, options) => new Error(message, options)
110
+ };
111
+ const read = (file) => {
112
+ try {
113
+ return readFileSync(file, "utf8");
114
+ } catch (error) {
115
+ if (error.code === "ENOENT") return null;
116
+ throw error;
117
+ }
118
+ };
119
+ return withLedgerFileLock(receiptPath, context, () => {
120
+ const existing = read(receiptPath);
121
+ const rows = read(path);
122
+ if (existing !== null) {
123
+ if (hashCanonical(JSON.parse(existing)) !== hashCanonical(stored)) throw new Error(`rollout batch key ${identity.key} already names different source or projection content`);
124
+ if (rows !== payload) throw new Error(`rollout batch ${identity.key} retained rows failed integrity verification`);
125
+ return {
126
+ disposition: "existing",
127
+ receipt
128
+ };
129
+ }
130
+ if (rows !== null && rows !== payload) throw new Error(`rollout batch ${identity.key} has different uncommitted rows; refusing to overwrite evidence`);
131
+ writeLedgerFileAtomically(path, payload, context);
132
+ writeLedgerFileAtomically(receiptPath, `${canonicalString(stored)}\n`, context);
133
+ return {
134
+ disposition: "admitted",
135
+ receipt
136
+ };
137
+ });
138
+ }
81
139
  // src/rollout/readers/gate-receipts.ts
82
140
  /**
83
141
  * `beelink-gate` receipts (`~/.local/state/beelink-gate/receipts.jsonl`) as
@@ -180,140 +238,6 @@ async function gateReceiptRolloutLines(path, capturedAt = (/* @__PURE__ */ new D
180
238
  skipped
181
239
  };
182
240
  }
183
- // src/rollout/readers/harness-session-lines.ts
184
- /**
185
- * Native harness sessions (OpenCode, Kimi, Claude Code, Codex, Pi, Factory) as
186
- * `tangle.rollout.v1` rows, through @tangle-network/harness-sessions — the one
187
- * reader of those stores. A session carries no task verdict, so its reward is
188
- * null and `provenance.gap` says so; a later labeler supplies the reward.
189
- *
190
- * The producer comes from the models that answered (`servedModels`), never from
191
- * the request, and the license class from that model and the harness.
192
- */
193
- const REF_FOR_FILE = {
194
- "claude-code": (path) => claudeCodeRefForFile(path, null),
195
- codex: codexRefForFile,
196
- "kimi-code": kimiRefForFile,
197
- pi: piRefForFile
198
- };
199
- /** Session refs under a HOME or store directory, or in one session file / OpenCode store. */
200
- async function harnessSessionRefs(target, options = {}) {
201
- const entry = await stat(target);
202
- let refs;
203
- if (entry.isDirectory()) {
204
- const readers = options.harness ? [readerFor(options.harness)] : listReaders();
205
- refs = [];
206
- const locate = options.sinceMs === void 0 ? {} : { sinceMs: options.sinceMs };
207
- for (const reader of readers) refs.push(...await reader.locate(target, locate));
208
- } else if (/\.db$/u.test(target)) refs = await opencodeSessionsInStore(target, null, {});
209
- else {
210
- const refFor = options.harness ? REF_FOR_FILE[options.harness] : void 0;
211
- if (refFor === void 0) throw new Error(`${target}: pass --harness (${Object.keys(REF_FOR_FILE).join("|")}) for a file`);
212
- refs = [refFor(target)];
213
- }
214
- return options.sinceMs === void 0 ? refs : refs.filter((ref) => ref.mtimeMs >= options.sinceMs);
215
- }
216
- /** The model that answered most calls, split into provider and model. */
217
- function producer(session) {
218
- const [top] = Object.entries(session.servedModels).sort((a, b) => b[1] - a[1]);
219
- if (top === void 0) return {
220
- provider: null,
221
- model: null
222
- };
223
- const call = session.modelCalls.find((c) => c.servedModel !== null && top[0].endsWith(c.servedModel));
224
- return {
225
- provider: call?.provider ?? null,
226
- model: call?.servedModel ?? top[0]
227
- };
228
- }
229
- const sum = (values) => values.some((v) => v !== null) ? values.reduce((a, v) => a + (v ?? 0), 0) : null;
230
- /** One normalized session as a rollout row. */
231
- function harnessSessionRolloutLine(session, ref, capturedAt = (/* @__PURE__ */ new Date()).toISOString()) {
232
- const { provider, model } = producer(session);
233
- const id = `${session.harness}:${session.nativeSessionId}`;
234
- const startedMs = session.startedAt === null ? null : Date.parse(session.startedAt);
235
- const endedMs = session.endedAt === null ? null : Date.parse(session.endedAt);
236
- const line = {
237
- schema: ROLLOUT_SCHEMA,
238
- rollout_id: id,
239
- parent_rollout_id: session.parentNativeSessionId === null ? null : `${session.harness}:${session.parentNativeSessionId}`,
240
- run_id: id,
241
- experiment_id: null,
242
- candidate_id: null,
243
- generation: null,
244
- candidate_index: null,
245
- role: "agent",
246
- task: {
247
- suite: `harness/${session.harness}`,
248
- instance_id: session.nativeSessionId,
249
- split: "search",
250
- seed: null,
251
- rep: 0
252
- },
253
- policy: {
254
- harness: session.harness,
255
- harness_version: null,
256
- model,
257
- provider,
258
- profile_commit: null,
259
- sampling: null
260
- },
261
- messages: toChatMessages(session),
262
- tool_defs: [],
263
- outcome: {
264
- reward: null,
265
- reward_source: null,
266
- verdict: null,
267
- metrics: {
268
- ending: session.ending.status,
269
- model_calls: session.modelCalls.length,
270
- tool_calls: session.toolCalls.length,
271
- served_models: session.servedModels
272
- },
273
- is_completed: session.ending.status === "completed",
274
- is_truncated: ref.truncated === true,
275
- error: session.ending.error?.message ?? null,
276
- realness_gated: false
277
- },
278
- cost: {
279
- usd: sum(session.modelCalls.map((c) => c.costUsd)),
280
- tokens_in: session.usage?.input ?? null,
281
- tokens_out: session.usage?.output ?? null,
282
- tokens_reasoning: session.usage?.reasoning ?? null,
283
- cache_read: session.usage?.cacheRead ?? null,
284
- cache_write: session.usage?.cacheWrite ?? null,
285
- wall_s: startedMs !== null && endedMs !== null && endedMs >= startedMs ? (endedMs - startedMs) / 1e3 : null,
286
- llm_call_count: session.modelCalls.length
287
- },
288
- artifacts: {
289
- patch_path: null,
290
- run_dir: session.cwd,
291
- transcript_ref: ref.path
292
- },
293
- provenance: {
294
- captured_at: capturedAt,
295
- capture: "backfill",
296
- gap: "imported harness session: no task verdict"
297
- }
298
- };
299
- const license = licenseClassOf(line);
300
- if (license !== null) line.policy.license_class = license;
301
- return line;
302
- }
303
- /** Read each ref in turn; a session its reader refuses is reported, never guessed. */
304
- async function* harnessSessionRolloutLines(refs, capturedAt) {
305
- for (const ref of refs) try {
306
- yield {
307
- ref,
308
- line: harnessSessionRolloutLine(await readerFor(ref.harness).read(ref), ref, capturedAt)
309
- };
310
- } catch (error) {
311
- yield {
312
- ref,
313
- error: error instanceof Error ? error.message : String(error)
314
- };
315
- }
316
- }
317
241
  // src/rollout/release/gate-report.ts
318
242
  const FORMAT_GATE_DISPOSITION = {
319
243
  sft: "exclude",
@@ -463,7 +387,7 @@ const FORMAT_FILES = {
463
387
  raw: "raw/train.jsonl"
464
388
  };
465
389
  const FORMAT_DESCRIPTIONS = {
466
- sft: "Successful trainable-split transcripts (`reward >= 1`, never realness-gated) as `{messages, metadata}` chat JSONL.",
390
+ sft: "Successful trainable-split transcripts (`reward >= 1`, never realness-gated) as `{messages, message_loss_mask, tools, metadata}` chat JSONL. Copied assistant turns carry `weight: 0` and every copied message has mask 0; a trainer that reads neither field is unsafe for rows with copied context.",
467
391
  verifiers: "Prime Intellect verifiers `RolloutOutput`: prompt/completion split at the first assistant turn, plus reward, metrics, tool defs, and token usage.",
468
392
  rft: "OpenAI RFT items: prompt turns plus `reference.*` verdict fields for a grader (completions are re-sampled during RFT).",
469
393
  raw: `Full \`${ROLLOUT_SCHEMA}\` ledger lines (scrubbed), one per agent invocation.`
@@ -1079,6 +1003,6 @@ async function runRolloutReleaseCli(argv) {
1079
1003
  }
1080
1004
  return 0;
1081
1005
  }
1082
- export { writeRolloutLedger as _, privacyHit as a, buildDatasetCard as c, harnessSessionRolloutLine as d, harnessSessionRolloutLines as f, readRolloutLedger as g, readRolloutJournal as h, defaultRolloutScrubber as i, assertGateReport as l, appendRolloutLines as m, runRolloutReleaseCli as n, scrubLines as o, gateReceiptRolloutLines as p, PRIVACY_RULE_NAMES as r, scrubText as s, buildHfDataset as t, harnessSessionRefs as u };
1006
+ export { privacyHit as a, buildDatasetCard as c, admitRolloutBatch as d, appendRolloutLines as f, writeRolloutLedger as h, defaultRolloutScrubber as i, assertGateReport as l, readRolloutLedger as m, runRolloutReleaseCli as n, scrubLines as o, readRolloutJournal as p, PRIVACY_RULE_NAMES as r, scrubText as s, buildHfDataset as t, gateReceiptRolloutLines as u };
1083
1007
 
1084
- //# sourceMappingURL=hf-dataset-Bv114tzB.js.map
1008
+ //# sourceMappingURL=hf-dataset-Cc81I0vQ.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"hf-dataset-Cc81I0vQ.js","names":[],"sources":["../src/rollout/ledger.ts","../src/rollout/readers/gate-receipts.ts","../src/rollout/release/gate-report.ts","../src/rollout/release/card.ts","../src/rollout/release/scrub.ts","../src/rollout/release/hf-dataset.ts"],"sourcesContent":["/**\n * Rollout-ledger file API — append-only JSONL of validated `tangle.rollout.v1`\n * lines. Writes validate BEFORE touching disk (a bad line never lands);\n * reads validate line-by-line and fail loud with the line number, because a\n * silently-skipped rollout is a corrupted dataset.\n *\n * \"Validate\" includes the anti-Goodhart invariant (a realness-gated line may\n * not carry a positive reward), so a poisoned line can neither enter a ledger\n * nor leave one.\n *\n * Two read modes, matching the two write-side row classes: `readRolloutLedger`\n * re-validates under the mint policy (training data), `readRolloutJournal`\n * under the write policy (supervision journals, whose unscreened positive\n * rewards are writable and must stay readable).\n */\n\nimport { readFileSync } from 'node:fs'\nimport { appendFile, mkdir, readFile, writeFile } from 'node:fs/promises'\nimport { dirname, join } from 'node:path'\nimport {\n canonicalString,\n hashCanonical,\n jsonDocument,\n LEDGER_HASH_PATTERN,\n type LedgerHash,\n} from '../ledger-core/canonical'\nimport { withLedgerFileLock, writeLedgerFileAtomically } from '../ledger-core/journal-file'\nimport { assertMinted, assertRolloutLine, type MintedRolloutLine, type RolloutLine } from './schema'\n\nfunction serialize(lines: RolloutLine[]): string {\n for (const [i, line] of lines.entries()) assertRolloutLine(line, `rollout line [${i}]`)\n return lines.map((line) => JSON.stringify(line)).join('\\n') + (lines.length > 0 ? '\\n' : '')\n}\n\n/** Replace the ledger file with exactly `lines`. */\nexport async function writeRolloutLedger(path: string, lines: RolloutLine[]): Promise<void> {\n const payload = serialize(lines)\n await mkdir(dirname(path), { recursive: true })\n await writeFile(path, payload)\n}\n\n/** Append `lines` to the ledger file (created if absent). */\nexport async function appendRolloutLines(path: string, lines: RolloutLine[]): Promise<void> {\n if (lines.length === 0) return\n const payload = serialize(lines)\n await mkdir(dirname(path), { recursive: true })\n await appendFile(path, payload)\n}\n\n/**\n * Read and validate every line. Throws on the first malformed/invalid line\n * (with its 1-based line number) — fail-closed, never a silent drop.\n *\n * Validation includes the anti-Goodhart invariant, which is why the result is\n * `MintedRolloutLine[]`: a ledger file is the main way a rollout reaches this\n * process from outside the type system (another run, another machine, a\n * hand-edited JSONL), so this read is the runtime boundary where a poisoned\n * line is refused rather than exported.\n */\nexport async function readRolloutLedger(path: string): Promise<MintedRolloutLine[]> {\n return readLines(path, (parsed, context) => assertMinted(parsed, context))\n}\n\n/**\n * Read under the write policy: imported and supervision rows whose positive\n * rewards no realness screen has seen stay readable, as they were writable.\n * Not training input until a screen mints them.\n */\nexport async function readRolloutJournal(path: string): Promise<RolloutLine[]> {\n return readLines(path, (parsed, context) => {\n assertRolloutLine(parsed, context)\n return parsed\n })\n}\n\nasync function readLines<T>(\n path: string,\n admit: (parsed: unknown, context: string) => T,\n): Promise<T[]> {\n const raw = await readFile(path, 'utf8')\n const lines: T[] = []\n const rawLines = raw.split('\\n')\n for (let i = 0; i < rawLines.length; i++) {\n const text = rawLines[i]\n if (!text?.trim()) continue\n let parsed: unknown\n try {\n parsed = JSON.parse(text)\n } catch (error) {\n throw new Error(\n `${path}:${i + 1}: malformed JSON — ${error instanceof Error ? error.message : String(error)}`,\n )\n }\n lines.push(admit(parsed, `${path}:${i + 1}`))\n }\n return lines\n}\n\n/** A caller's immutable source and projection identity; a batch key is never overwritten. */\nexport interface RolloutBatchIdentity {\n key: string\n sourceDigest: LedgerHash\n /** Pin the reader/projection version, such as a package version or source commit. */\n projection: string\n}\n\nexport interface RolloutBatchReceipt extends RolloutBatchIdentity {\n digest: LedgerHash\n rowCount: number\n path: string\n}\n\n/**\n * Retain one canonical journal batch exactly once. A receipt commits the fsynced\n * rows; an interrupted write can be finished with the same content. This uses\n * journal validation, so missing labels, explicit gaps and unscreened outcomes\n * remain evidence without being approved for training.\n */\nexport function admitRolloutBatch(\n directory: string,\n identity: RolloutBatchIdentity,\n lines: RolloutLine[],\n): { disposition: 'admitted' | 'existing'; receipt: RolloutBatchReceipt } {\n if (\n !identity.key.trim() ||\n !identity.projection.trim() ||\n !LEDGER_HASH_PATTERN.test(identity.sourceDigest)\n )\n throw new Error('rollout batch requires a key, projection version and canonical source digest')\n for (const [index, line] of lines.entries()) assertRolloutLine(line, `rollout batch [${index}]`)\n const document = jsonDocument(lines)\n const digest = hashCanonical(document)\n const batch = join(directory, hashCanonical(identity.key).slice('sha256:'.length))\n const path = join(batch, 'rows.jsonl')\n const receiptPath = join(batch, 'receipt.json')\n const stored = { ...identity, digest, rowCount: lines.length }\n const receipt: RolloutBatchReceipt = { ...stored, path }\n const payload =\n lines.map((line) => canonicalString(jsonDocument(line))).join('\\n') + (lines.length ? '\\n' : '')\n const context = {\n subject: 'rollout batch',\n integrityError: (message: string, options?: { cause?: unknown }) => new Error(message, options),\n }\n const read = (file: string): string | null => {\n try {\n return readFileSync(file, 'utf8')\n } catch (error) {\n if ((error as NodeJS.ErrnoException).code === 'ENOENT') return null\n throw error\n }\n }\n return withLedgerFileLock(receiptPath, context, () => {\n const existing = read(receiptPath)\n const rows = read(path)\n if (existing !== null) {\n if (hashCanonical(JSON.parse(existing)) !== hashCanonical(stored))\n throw new Error(\n `rollout batch key ${identity.key} already names different source or projection content`,\n )\n if (rows !== payload)\n throw new Error(`rollout batch ${identity.key} retained rows failed integrity verification`)\n return { disposition: 'existing', receipt }\n }\n if (rows !== null && rows !== payload)\n throw new Error(\n `rollout batch ${identity.key} has different uncommitted rows; refusing to overwrite evidence`,\n )\n writeLedgerFileAtomically(path, payload, context)\n writeLedgerFileAtomically(receiptPath, `${canonicalString(stored)}\\n`, context)\n return { disposition: 'admitted', receipt }\n })\n}\n","/**\n * `beelink-gate` receipts (`~/.local/state/beelink-gate/receipts.jsonl`) as\n * verifiable labels: one `judge` row per gated (repo, head SHA, command), with\n * reward 1 for exit 0 and 0 for any other recorded exit. A gate that did not\n * run its command to a verdict — exit 75 (TEMPFAIL), a timeout, the watchdog —\n * labels nothing and is skipped. The row carries no transcript; it labels the\n * commit, and joins to the sessions that produced it by `task.instance_id`.\n */\n\nimport { readFile } from 'node:fs/promises'\nimport { ROLLOUT_SCHEMA, type RolloutLine } from '../schema'\n\nconst TEMPFAIL = 75\n\nexport async function gateReceiptRolloutLines(\n path: string,\n capturedAt: string = new Date().toISOString(),\n): Promise<{ lines: RolloutLine[]; skipped: number }> {\n const lines: RolloutLine[] = []\n let skipped = 0\n for (const raw of (await readFile(path, 'utf8')).split('\\n')) {\n if (!raw.trim()) continue\n let r: Record<string, unknown>\n try {\n r = JSON.parse(raw)\n } catch {\n skipped += 1\n continue\n }\n const { repo, sha, exit, gate_id: gateId } = r\n if (\n typeof repo !== 'string' ||\n typeof sha !== 'string' ||\n !/^[0-9a-f]{40}$/u.test(sha) ||\n typeof exit !== 'number' ||\n exit === TEMPFAIL ||\n r.timed_out === true ||\n r.watchdog === true\n ) {\n skipped += 1\n continue\n }\n const id = typeof gateId === 'string' ? `beelink-gate:${gateId}` : `beelink-gate:${sha}:${r.at}`\n lines.push({\n schema: ROLLOUT_SCHEMA,\n rollout_id: id,\n parent_rollout_id: null,\n run_id: id,\n experiment_id: null,\n candidate_id: null,\n generation: null,\n candidate_index: null,\n role: 'judge',\n task: {\n suite: `beelink-gate/${repo}`,\n instance_id: sha,\n split: 'search',\n seed: null,\n rep: 0,\n },\n policy: {\n harness: 'beelink-gate',\n harness_version: null,\n model: null,\n provider: null,\n profile_commit: sha,\n sampling: null,\n },\n messages: [],\n tool_defs: [],\n outcome: {\n reward: exit === 0 ? 1 : 0,\n reward_source: 'beelink-gate/exit',\n verdict: {\n exit,\n command: r.command ?? null,\n mode: r.mode ?? null,\n class: r.class ?? null,\n pr_number: r.pr_number ?? null,\n base_sha: r.base_sha ?? null,\n lane: r.lane ?? null,\n host: r.host ?? null,\n at: r.at ?? null,\n },\n metrics: {},\n is_completed: true,\n is_truncated: false,\n error: null,\n realness_gated: false,\n realness_screened: false,\n },\n cost: {\n usd: null,\n tokens_in: null,\n tokens_out: null,\n tokens_reasoning: null,\n cache_read: null,\n cache_write: null,\n wall_s: typeof r.ran_s === 'number' ? r.ran_s : null,\n },\n artifacts: { patch_path: null, run_dir: null, transcript_ref: null },\n provenance: {\n captured_at: capturedAt,\n capture: 'backfill',\n gap: `gate receipt: verifiable label for ${repo}@${sha}; no transcript`,\n },\n })\n }\n return { lines, skipped }\n}\n","/**\n * Per-format accounting of the anti-Goodhart gate for one dataset release.\n *\n * The defect this exists to make impossible: a dataset card that STATES what\n * the gate does while the build does something else. A sentence in a README is\n * a claim about bytes it never reads, so it drifts the moment an exporter\n * changes — and the drift ships to whoever downloads the dataset.\n *\n * So the card is not allowed to assert anything about the gate. The build\n * measures the rows it is ABOUT TO WRITE (`measureFormatGate`), the measurement\n * is checked against the declared per-format disposition (`assertGateReport`,\n * which throws rather than warns), and the card renders only numbers handed to\n * it. A card that disagrees with its own data files cannot be produced without\n * failing the build first.\n *\n * The dispositions themselves are the release policy, stated once as data:\n *\n * sft EXCLUDE — an SFT row is an imitation target. A gamed\n * trajectory must never be imitated, at any weight.\n * verifiers ZERO_AND_FLAG — reward is a signed learning signal here, so a\n * gamed trajectory at reward 0 is a correct\n * negative. Dropping it would bias the negative\n * population toward honest failures and leave a\n * trainer no example of what gaming looks like\n * when it is penalized.\n * rft ZERO_AND_FLAG — RFT re-samples the completion; only the prompt\n * and the grader's `reference.*` verdict ship, so\n * nothing gamed is imitated. The flag is what lets\n * a grader author skip the instance.\n * raw ZERO_AND_FLAG — a faithful audit dump. Removing rows from it\n * would defeat its only purpose, and the gated\n * row is the one an auditor most wants.\n *\n * `ZERO_AND_FLAG` is never `reward: 0` alone. Zeroing without the label makes a\n * faked success indistinguishable from an honest failure — it hides the gamed\n * population from the buyer instead of disclosing it. Every included format\n * carries `realness_gated` on the row itself.\n *\n * And `ZERO_AND_FLAG` means the whole outcome, not the scalar. A gated row that\n * ships `reward: 0` beside the per-layer verifier scores the reward was\n * computed from has not been zeroed in any sense a trainer respects; the\n * accounting therefore measures every reward-derived number each format writes,\n * not just the one field.\n */\n\nimport type { RftItem, SftRow, VerifiersRolloutOutput } from '../exporters'\nimport {\n GATE_CHECK_IDS,\n GATE_POLICIES,\n type GateCheckId,\n undeclaredStepPayload,\n} from '../gate-checks'\nimport type { MintedRolloutLine } from '../schema'\nimport type { ReleaseFormat } from './card'\n\n/** What a format does with a line the realness gate flagged. */\nexport type GateDisposition = 'exclude' | 'zero-and-flag'\n\nexport const FORMAT_GATE_DISPOSITION: Record<ReleaseFormat, GateDisposition> = {\n sft: 'exclude',\n verifiers: 'zero-and-flag',\n rft: 'zero-and-flag',\n raw: 'zero-and-flag',\n}\n\n/** What the gate accounting reads off an emitted row, per format. */\nexport interface ReleaseRowRef {\n rollout_id: string\n reward: number | null\n /**\n * The rest of the row that was DERIVED from the reward — the per-layer score\n * dict, the judge verdict record, whatever this format ships beside the\n * scalar. Walked for positive numbers, so the certification is about the\n * whole outcome rather than one field.\n *\n * Absent when the format's row carries nothing but the scalar. NOT the whole\n * row: `cost.tokens_in`, `wall_s` and `total_steps` are positive numbers that\n * have nothing to do with the reward, and a certification that flags them is\n * a certification nobody can act on.\n */\n evidence?: unknown\n /**\n * The screen claim AS EMITTED — read off the row, not off the line it came\n * from, because what ships is what matters. Required, not optional: an\n * optional field is how a format quietly opts out of the check that reads it,\n * and every emitted row shape carries `RealnessLabels` precisely so no adapter\n * has to.\n */\n realness_screened: boolean | null\n /**\n * The part of an emitted `steps[]` the wire format does not declare.\n *\n * Separate from `evidence` because the declared step fields are FULL of\n * legitimate positive numbers — `durationMs`, `llm_call_count`,\n * `prompt_token_ids` — and a certification that flags those is one nobody can\n * act on. Only the undeclared remainder is unclassified reward-bearing\n * payload, which is the same partition the check applies.\n *\n * Set only by formats whose row carries steps: today `raw` alone.\n */\n stepEvidence?: unknown\n}\n\n/** A positive number found inside an emitted gated row, with where it was. */\nexport interface EmittedEvidence {\n /** JSON-ish path from the row's evidence root, e.g. `metrics['layer.tests']`. */\n path: string\n value: number\n}\n\nexport interface FormatGateCounts {\n /** Gated lines that reached this format's exporter. */\n input: number\n /** Gated rows the format actually wrote. */\n emitted: number\n /**\n * Gated lines this format did not write. Not all of these are the gate:\n * `verifiers` also drops gap lines (empty transcript) and `rft` drops lines\n * with no prompt turn, so an excluded count can mix both causes.\n */\n excluded: number\n /** Highest reward on an emitted gated row; `null` when none was emitted. */\n maxEmittedReward: number | null\n /**\n * The largest positive number found in the reward-DERIVED payload of an\n * emitted gated row, and its path; `null` when there is none.\n *\n * This column exists because the release once certified CLEAN while leaking.\n * `assertGateReport` inspected `outcome.reward` alone, so a gated row shipping\n * `reward: 0` next to `metrics['layer.tests']: 1` — the deterministic verifier\n * score the reward was computed from, and the per-rubric score dict of the\n * Prime Intellect verifiers format — passed, and the card rendered \"max reward\n * | 0\" over a file that carried the gamed signal at full value. A wrong\n * certification is worse than the leak: it is the leak plus a document saying\n * there isn't one.\n */\n maxEmittedEvidence: EmittedEvidence | null\n /**\n * Rows this format wrote carrying a positive reward whose producer DECLARED\n * that no authenticity screen ever ran on it (`realness_screened: false`).\n *\n * Measured over EVERY emitted row, not just the gated ones: an unscreened\n * reward is by definition one the gate never had a verdict on, so it is not in\n * the gated set and a measurement scoped to that set would report 0 forever.\n * `assertMinted` already refuses these, which is exactly why the release still\n * measures them — the last door before a public dataset does not get to assume\n * the earlier doors held.\n */\n unscreenedPositiveRows: number\n /** Highest reward on such a row; `null` when there is none. */\n maxUnscreenedReward: number | null\n /**\n * The largest positive number found in an emitted gated row's UNDECLARED\n * per-step payload, and its path; `null` when there is none.\n *\n * The column exists because the gate read `outcome` and nothing else for\n * three rounds, so a gated line shipping `steps: [{kind, name, reward: 0.86}]`\n * certified clean — the release accounting agreed with the exporter that a\n * per-step reward was not a reward.\n */\n maxEmittedStepEvidence: EmittedEvidence | null\n}\n\nexport interface GateReport {\n /** Gated lines in the release input, after the split/proposer filters. */\n gatedLines: number\n byFormat: Partial<Record<ReleaseFormat, FormatGateCounts>>\n}\n\n/** Rollout ids of every gated line, the key the emitted rows are matched on. */\nexport function gatedRolloutIds(lines: readonly MintedRolloutLine[]): Set<string> {\n return new Set(lines.filter((line) => line.outcome.realness_gated).map((line) => line.rollout_id))\n}\n\n/**\n * Row refs per format. Written as one adapter per format so that the knowledge\n * of WHERE the id and reward live in each published shape sits next to the\n * assertion that uses it — an exporter that moves either field breaks here\n * rather than silently reporting zero gated rows.\n */\nexport const releaseRowRefs = {\n // An SFT row is `{messages, metadata}` and `metadata` holds ids plus the\n // scalar — no reward-derived payload beyond `reward` itself, and the gated\n // disposition is EXCLUDE anyway.\n sft: (rows: readonly SftRow[]): ReleaseRowRef[] =>\n rows.map((row) => ({\n rollout_id: row.metadata.rollout_id,\n reward: row.metadata.reward,\n realness_screened: row.metadata.realness_screened,\n })),\n // `metrics` IS the per-rubric score dict in the Prime Intellect verifiers\n // format — the same numbers the reward was computed from. This is the leak\n // that shipped.\n verifiers: (rows: readonly VerifiersRolloutOutput[]): ReleaseRowRef[] =>\n rows.map((row) => ({\n rollout_id: row.info.rollout_id,\n reward: row.reward,\n evidence: row.metrics,\n realness_screened: row.info.realness_screened,\n })),\n // RFT re-samples the completion, but the grader reads `item.reference.*`, so\n // the verbatim judge verdict is a reward-bearing field on the row.\n rft: (rows: readonly RftItem[]): ReleaseRowRef[] =>\n rows.map((row) => ({\n rollout_id: row.reference.rollout_id,\n reward: row.reference.reward,\n evidence: row.reference.verdict,\n realness_screened: row.reference.realness_screened,\n })),\n raw: (lines: readonly MintedRolloutLine[]): ReleaseRowRef[] =>\n lines.map((line) => ({\n rollout_id: line.rollout_id,\n reward: line.outcome.reward,\n // `provenance.gated_evidence` is deliberately NOT walked: relocating the\n // diagnostics there is what the gate DOES, and the raw config is the\n // audit dump those diagnostics exist for.\n evidence: { metrics: line.outcome.metrics, verdict: line.outcome.verdict },\n // `raw` is the only config that writes the whole line, so it is the only\n // one whose rows can carry a per-step reward.\n stepEvidence: undeclaredStepPayload(line.steps),\n realness_screened: line.outcome.realness_screened ?? null,\n })),\n}\n\n/** Every positive finite number inside a row's reward-derived payload, with its path. */\nfunction positiveNumbersIn(value: unknown, path: string): EmittedEvidence[] {\n if (typeof value === 'number') {\n return Number.isFinite(value) && value > 0 ? [{ path, value }] : []\n }\n if (Array.isArray(value)) {\n return value.flatMap((item, i) => positiveNumbersIn(item, `${path}[${i}]`))\n }\n if (typeof value === 'object' && value !== null) {\n return Object.entries(value).flatMap(([key, child]) =>\n positiveNumbersIn(child, path === '' ? key : `${path}.${key}`),\n )\n }\n return []\n}\n\n/** Measure one format's gated rows from the refs of the rows about to be written. */\nexport function measureFormatGate(\n gated: ReadonlySet<string>,\n refs: readonly ReleaseRowRef[],\n): FormatGateCounts {\n const emitted = refs.filter((ref) => gated.has(ref.rollout_id))\n const rewards = emitted.map((ref) => ref.reward).filter((r): r is number => r !== null)\n const evidence = emitted.flatMap((ref) => positiveNumbersIn(ref.evidence, ''))\n const stepEvidence = emitted.flatMap((ref) => positiveNumbersIn(ref.stepEvidence, 'steps'))\n const unscreened = refs\n .filter((ref) => ref.realness_screened === false)\n .map((ref) => ref.reward)\n .filter((r): r is number => r !== null && r > 0)\n return {\n input: gated.size,\n emitted: emitted.length,\n excluded: gated.size - emitted.length,\n maxEmittedReward: rewards.length === 0 ? null : Math.max(...rewards),\n maxEmittedEvidence: evidence.reduce<EmittedEvidence | null>(\n (best, found) => (best === null || found.value > best.value ? found : best),\n null,\n ),\n unscreenedPositiveRows: unscreened.length,\n maxUnscreenedReward: unscreened.length === 0 ? null : Math.max(...unscreened),\n maxEmittedStepEvidence: stepEvidence.reduce<EmittedEvidence | null>(\n (best, found) => (best === null || found.value > best.value ? found : best),\n null,\n ),\n }\n}\n\n/**\n * The measured form of each canonical gate check, over the rows a release is\n * ABOUT TO WRITE. Returns the failure message, or `null` when the format is\n * clean on that check.\n *\n * TOTAL over `GateCheckId` — this map and `GATE_POLICIES.assertGateReport` are\n * the two things a new check breaks here, so the release certifier cannot be\n * left behind by a check added anywhere else in the package. That is the whole\n * point: for four rounds each guard composed its own subset by hand, and a\n * release certifying CLEAN while leaking is the most expensive version of that\n * mistake, because it is the leak plus a document saying there isn't one.\n */\nconst REPORT_MEASURES: {\n readonly [K in GateCheckId]: (format: ReleaseFormat, counts: FormatGateCounts) => string | null\n} = {\n 'reward-relationship': (format, counts) =>\n counts.maxEmittedReward === null || counts.maxEmittedReward <= 0\n ? null\n : `release format \"${format}\": ${counts.emitted} realness-gated row(s) carry a positive ` +\n `reward (max ${counts.maxEmittedReward}). A run flagged as gamed may not ship a ` +\n 'positive reward in any config.',\n 'gated-evidence': (format, counts) => {\n if (counts.maxEmittedEvidence === null) return null\n const { path, value } = counts.maxEmittedEvidence\n return (\n `release format \"${format}\": ${counts.emitted} realness-gated row(s) carry a positive ` +\n `reward-derived number (${path} = ${value}). Zeroing the scalar is not enough — the ` +\n 'per-layer scores and judge verdict a fabricated reward was computed FROM are the ' +\n 'same signal in component form, and in this format they are read as training input. ' +\n 'They belong in `provenance.gated_evidence` (see `gateGamedOutcome`), not on the row.'\n )\n },\n 'undeclared-step-payload': (format, counts) => {\n if (counts.maxEmittedStepEvidence === null) return null\n const { path, value } = counts.maxEmittedStepEvidence\n return (\n `release format \"${format}\": ${counts.emitted} realness-gated row(s) carry a positive ` +\n `per-step number under a field \\`tangle.rollout.v1\\` does not declare (${path} = ${value}). ` +\n 'A per-step reward is the same training signal as the scalar, in credit-assignment form, ' +\n 'and the exporters copy `steps` through verbatim — so the row ships it beside a `reward` ' +\n 'of 0. It belongs in `provenance.gated_evidence.steps` (see `gateGamedOutcome`).'\n )\n },\n 'unscreened-reward': (format, counts) =>\n counts.maxUnscreenedReward === null\n ? null\n : `release format \"${format}\": ${counts.unscreenedPositiveRows} row(s) carry a positive ` +\n `reward (max ${counts.maxUnscreenedReward}) whose producer declares that NO authenticity ` +\n 'screen ran on it (`realness_screened: false`). Nothing has established those successes ' +\n 'are real, and a published dataset may not present an unqualified verdict as a measured ' +\n 'one. Screen the runs, or publish them at `reward: null`.',\n}\n\n/**\n * Fail the build when the measurement disagrees with the declared policy.\n *\n * Throws, never filters: an emitted positive reward on a gated row means an\n * exporter upstream stopped applying the gate, and silently dropping the row\n * would hide the producer that made it — the producer is the actual defect.\n *\n * Certifies the whole emitted outcome, not `reward` alone. The earlier version\n * checked one field and therefore certified a release CLEAN while its\n * `verifiers/train.jsonl` shipped the gamed run's per-layer scores at 1.0 in\n * the top-level `metrics` dict — the card then rendered \"max reward | 0\" over\n * exactly that file. A certification that is wrong is worse than an\n * uncertified leak, so the checks it runs are no longer written down here at\n * all: it iterates `GATE_CHECK_IDS` under its own declared policy.\n */\nexport function assertGateReport(report: GateReport): void {\n for (const [format, counts] of Object.entries(report.byFormat) as Array<\n [ReleaseFormat, FormatGateCounts]\n >) {\n for (const id of GATE_CHECK_IDS) {\n if (GATE_POLICIES.assertGateReport[id].kind !== 'enforce') continue\n const failure = REPORT_MEASURES[id](format, counts)\n if (failure !== null) throw new Error(failure)\n }\n // Not a gate check: this one is the RELEASE POLICY (`FORMAT_GATE_DISPOSITION`)\n // rather than the anti-Goodhart invariant — it asks whether the format did\n // what it said it would with gated rows, not whether a row is poisoned.\n if (FORMAT_GATE_DISPOSITION[format] === 'exclude' && counts.emitted > 0) {\n throw new Error(\n `release format \"${format}\" declares gated lines EXCLUDED but wrote ${counts.emitted} ` +\n 'of them.',\n )\n }\n }\n}\n","/**\n * HuggingFace dataset-card (README.md) generation for a rollout-ledger release.\n *\n * The card is a pure function of the SCRUBBED lines plus the release options —\n * no timestamps, no environment reads — so rebuilding from the same ledger\n * yields byte-identical output. It documents the schema, provenance (run ids,\n * generations, the official judge), per-role reward semantics including the\n * inherited/contribution caveat, and a role × reward counts table.\n */\n\nimport { type MintedRolloutLine, ROLLOUT_ROLES, ROLLOUT_SCHEMA, type RolloutRole } from '../schema'\nimport { assertGateReport, FORMAT_GATE_DISPOSITION, type GateReport } from './gate-report'\nimport type { ScrubCounts } from './scrub'\n\nexport const RELEASE_FORMATS = ['sft', 'verifiers', 'rft', 'raw'] as const\nexport type ReleaseFormat = (typeof RELEASE_FORMATS)[number]\n\n/** Format → data file path inside the dataset dir (train split only). */\nexport const FORMAT_FILES: Record<ReleaseFormat, string> = {\n sft: 'sft/train.jsonl',\n verifiers: 'verifiers/train.jsonl',\n rft: 'rft/train.jsonl',\n raw: 'raw/train.jsonl',\n}\n\nconst FORMAT_DESCRIPTIONS: Record<ReleaseFormat, string> = {\n sft:\n 'Successful trainable-split transcripts (`reward >= 1`, never realness-gated) as `{messages, message_loss_mask, tools, metadata}` chat JSONL. ' +\n 'Copied assistant turns carry `weight: 0` and every copied message has mask 0; a trainer that reads neither field is unsafe for rows with copied context.',\n verifiers:\n 'Prime Intellect verifiers `RolloutOutput`: prompt/completion split at the first assistant turn, plus reward, metrics, tool defs, and token usage.',\n rft: 'OpenAI RFT items: prompt turns plus `reference.*` verdict fields for a grader (completions are re-sampled during RFT).',\n raw: `Full \\`${ROLLOUT_SCHEMA}\\` ledger lines (scrubbed), one per agent invocation.`,\n}\n\nexport interface DatasetCardInputs {\n /** Scrubbed, release-filtered lines (what actually ships). */\n lines: MintedRolloutLine[]\n formats: ReleaseFormat[]\n includeProposers: boolean\n /** Source ledger basenames, for provenance. */\n sourceFiles: string[]\n scrubTotals: ScrubCounts\n excluded: { proposers: number; nonTrain: number; privacy: number }\n formatCounts: Partial<Record<ReleaseFormat, number>>\n /**\n * Per-format anti-Goodhart accounting MEASURED on the rows the build wrote.\n * Required, not optional: the card's only statement about the gate is a\n * render of these numbers, so a card cannot be produced without them and\n * cannot drift from the data files it ships beside.\n */\n gate: GateReport\n}\n\nfunction unique(values: Array<string | null>): string[] {\n return [...new Set(values.filter((v): v is string => v !== null))].sort()\n}\n\nfunction formatReward(reward: number | null): string {\n if (reward === null) return 'null'\n return Number.isInteger(reward) ? String(reward) : reward.toFixed(4)\n}\n\nfunction markdownTable(header: string[], rows: string[][]): string {\n return [\n `| ${header.join(' | ')} |`,\n `| ${header.map(() => '---').join(' | ')} |`,\n ...rows.map((row) => `| ${row.join(' | ')} |`),\n ].join('\\n')\n}\n\n/** Where the anti-Goodhart flag lives on each format's emitted row. */\nconst GATE_FLAG_FIELD: Record<ReleaseFormat, string> = {\n sft: '— (no gated row is written)',\n verifiers: '`info.realness_gated`',\n rft: '`reference.realness_gated`',\n raw: '`outcome.realness_gated`',\n}\n\nconst GATE_POLICY_LABEL: Record<ReleaseFormat, string> = {\n sft: 'EXCLUDED — an SFT row is an imitation target',\n verifiers: 'INCLUDED, reward forced to 0, flagged',\n rft: 'INCLUDED, reward forced to 0, flagged',\n raw: 'INCLUDED verbatim, flagged',\n}\n\nfunction gateSection(formats: ReleaseFormat[], gate: GateReport, totalLines: number): string {\n const rows = formats.map((format) => {\n const counts = gate.byFormat[format]\n return [\n format,\n GATE_POLICY_LABEL[format],\n String(counts?.emitted ?? 0),\n String(counts?.excluded ?? 0),\n counts?.maxEmittedReward === null || counts === undefined\n ? '—'\n : formatReward(counts.maxEmittedReward),\n counts?.maxEmittedEvidence == null\n ? '—'\n : `${counts.maxEmittedEvidence.path} = ${counts.maxEmittedEvidence.value}`,\n GATE_FLAG_FIELD[format],\n ]\n })\n const mixedExclusion = formats.some(\n (format) => FORMAT_GATE_DISPOSITION[format] === 'zero-and-flag',\n )\n return [\n `\\`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.**`,\n '',\n '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 — 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 — or any positive number derived from one — in ANY config.',\n '',\n 'The table below is **measured on the rows in this release**, not a description of intent — the build counts the emitted rows and this card renders those counts:',\n '',\n markdownTable(\n [\n 'config',\n 'policy',\n 'gated rows written',\n 'gated rows not written',\n 'max reward',\n 'max reward-derived number',\n 'flag',\n ],\n rows,\n ),\n '',\n '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 — 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.',\n '',\n \"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 — 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.\",\n mixedExclusion\n ? '\\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.'\n : '',\n ]\n .join('\\n')\n .trimEnd()\n}\n\nfunction roleRewardRows(lines: MintedRolloutLine[]): string[][] {\n const counts = new Map<RolloutRole, Map<string, number>>()\n for (const line of lines) {\n const byReward = counts.get(line.role) ?? new Map<string, number>()\n const key = formatReward(line.outcome.reward)\n byReward.set(key, (byReward.get(key) ?? 0) + 1)\n counts.set(line.role, byReward)\n }\n const rows: string[][] = []\n for (const role of ROLLOUT_ROLES) {\n const byReward = counts.get(role)\n if (!byReward) continue\n const keys = [...byReward.keys()].sort((a, b) => {\n if (a === 'null') return 1\n if (b === 'null') return -1\n return Number(b) - Number(a)\n })\n for (const key of keys) rows.push([role, key, String(byReward.get(key))])\n }\n return rows\n}\n\nexport function buildDatasetCard(inputs: DatasetCardInputs): string {\n const {\n lines,\n formats,\n includeProposers,\n sourceFiles,\n scrubTotals,\n excluded,\n formatCounts,\n gate,\n } = inputs\n // The card is the artifact a buyer reads; it may not render a gate report\n // that violates the release policy even when called outside the build.\n assertGateReport(gate)\n\n const runIds = unique(lines.map((line) => line.run_id))\n const generations = [...new Set(lines.map((line) => line.generation))]\n .filter((g): g is number => g !== null)\n .sort((a, b) => a - b)\n const models = unique(lines.map((line) => line.policy.model))\n const harnesses = unique(lines.map((line) => line.policy.harness))\n const captures = unique(lines.map((line) => line.provenance.capture))\n const rewardSources = unique(lines.map((line) => line.outcome.reward_source))\n const gapLines = lines.filter((line) => line.messages.length === 0).length\n const gatedLines = lines.filter((line) => line.outcome.realness_gated).length\n if (gatedLines !== gate.gatedLines) {\n throw new Error(\n `dataset card: gate report claims ${gate.gatedLines} realness-gated line(s) but the lines ` +\n `it describes contain ${gatedLines} — the card and the build measured different data.`,\n )\n }\n\n const configs = formats\n .map((format) =>\n [\n ` - config_name: ${format}`,\n ' data_files:',\n ' - split: train',\n ` path: ${FORMAT_FILES[format]}`,\n ].join('\\n'),\n )\n .join('\\n')\n\n const frontmatter = [\n '---',\n 'license: unknown',\n 'pretty_name: Tangle rollout ledger — agent trajectories',\n 'configs:',\n configs,\n '---',\n ].join('\\n')\n\n const formatsTable = markdownTable(\n ['config', 'path', 'rows', 'contents'],\n formats.map((format) => [\n format,\n `\\`${FORMAT_FILES[format]}\\``,\n String(formatCounts[format] ?? 0),\n FORMAT_DESCRIPTIONS[format],\n ]),\n )\n\n const countsTable = markdownTable(['role', 'reward', 'lines'], roleRewardRows(lines))\n\n const scrubTable = markdownTable(\n ['rule', 'rewrites'],\n Object.entries(scrubTotals).map(([rule, count]) => [rule, String(count)]),\n )\n\n const proposerNote = includeProposers\n ? 'Proposer sessions are INCLUDED (`--include-proposers`); their transcripts contain improvement-loop harness source.'\n : `Proposer sessions are excluded by default (${excluded.proposers} lines dropped); they contain improvement-loop harness source. Rebuild with \\`--include-proposers\\` to keep them.`\n\n return `${frontmatter}\n\n# Tangle rollout ledger — agent trajectories\n\nOne 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.\n\nThis 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). Lines with any secret or private detail (${excluded.privacy}) are dropped whole, never redacted into the release.\n\n## Formats\n\n${formatsTable}\n\n## Anti-Goodhart gate (\\`realness_gated\\`)\n\n${gateSection(formats, gate, lines.length)}\n\n## Schema (\\`${ROLLOUT_SCHEMA}\\`)\n\nEach raw line carries:\n\n- \\`rollout_id\\` / \\`parent_rollout_id\\` — invocation identity; workers point at their spawning supervisor episode.\n- \\`run_id\\`, \\`experiment_id\\`, \\`candidate_id\\` — run/experiment/candidate identity from the producing RunRecord, when present.\n- \\`generation\\`, \\`candidate_index\\` — improvement-loop coordinates (\\`-1\\` = baseline campaign; \\`null\\` = not an improvement loop).\n- \\`role\\` — one of ${ROLLOUT_ROLES.map((role) => `\\`${role}\\``).join(', ')}.\n- \\`task\\` — suite, instance id, split, seed, replicate index.\n- \\`policy\\` — harness, model, provider, profile commit, prompt/config hashes, sampling params.\n- \\`messages\\` / \\`tool_defs\\` — 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).\n- \\`outcome\\` — \\`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).\n- \\`cost\\` — usd, token counts, wall time.\n- \\`artifacts\\` / \\`provenance\\` — patch/run-dir/transcript pointers (scrubbed) and capture metadata.\n\n## Provenance\n\n- Source ledgers: ${sourceFiles.map((file) => `\\`${file}\\``).join(', ')}\n- Run ids: ${runIds.map((id) => `\\`${id}\\``).join(', ')}\n- Generations: ${generations.join(', ')} (\\`-1\\` = baseline campaign)\n- Models: ${models.map((m) => `\\`${m}\\``).join(', ')}\n- Harnesses: ${harnesses.map((h) => `\\`${h}\\``).join(', ')}\n- Capture modes: ${captures.join(', ')}\n- Every reward traces to a named source (reward sources in this release: ${rewardSources.map((s) => `\\`${s}\\``).join(', ')}).\n\n${proposerNote}\n\n## Reward semantics per role\n\n- **agent** — the producing RunRecord's holdout/search score, with the realness gate forcing gamed successes to 0.\n- **supervisor** — the official-judge verdict on the episode's delivered artifact (1 = resolved, 0 = not).\n- **worker** — INHERITED from the parent supervisor episode (\\`…/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.\n- **proposer** — the fraction of improvement-set instances the proposed candidate resolved (\\`…/candidate-resolved-fraction\\`); a scalar in [0, 1], not a binary verdict.\n- **judge / analyst** — carry the episode verdict where one applies; otherwise \\`reward: null\\` (a labeled gap, never 0).\n\n## Counts\n\n${countsTable}\n\nTotal lines: ${lines.length}\n\n## Scrubbing\n\nAbsolute 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\\`):\n\n${scrubTable}\n\n## License\n\n\\`license: unknown\\` is a placeholder — the releasing operator must set the real SPDX license id in the frontmatter above before publishing.\n\n## Citation\n\n\\`\\`\\`bibtex\n@misc{tangle_rollout_ledger,\n title = {Tangle rollout ledger — agent trajectories},\n author = {{Tangle Network}},\n howpublished = {HuggingFace Datasets},\n note = {Operator: fill in the repository URL, authors, and year before publishing}\n}\n\\`\\`\\`\n`\n}\n","/**\n * Deterministic scrubbing pass over rollout-ledger lines before public release.\n *\n * Every rule is a pure regex rewrite applied to every string value in a line\n * (messages, artifacts, run ids, tool arguments — everywhere), so the scrubbed\n * line is still a valid `tangle.rollout.v1` line. Rules are idempotent:\n * scrub(scrub(x)) === scrub(x), and a second pass counts zero hits — that is\n * the property the release pipeline relies on to prove nothing half-scrubbed\n * ships. Rule order matters: whole `KEY=value` env pairs are redacted before\n * the bare-key rule so one secret is never counted twice.\n */\n\nimport { assertMinted, type MintedRolloutLine } from '../schema'\n\nexport interface ScrubRule {\n name: string\n pattern: RegExp\n /** Rewrite for one match; `g1` is the first capture group when present. */\n rewrite: (match: string, g1?: string) => string\n}\n\nconst SCRUB_RULES: readonly ScrubRule[] = [\n {\n // /home/<user> and /Users/<user> prefixes → $WORK ($HOME-derived paths).\n name: 'home-path',\n pattern: /\\/(?:home|Users)\\/[A-Za-z0-9._-]+/g,\n rewrite: () => '$WORK',\n },\n {\n // Harness stores encode cwd as a dashed path segment (-home-drew-…);\n // strip the leading -home-<user> so the username never ships.\n name: 'home-path-encoded',\n pattern: /(?<=\\/)-(?:home|Users)-[A-Za-z0-9_.]+/g,\n rewrite: () => '$WORK',\n },\n {\n // pytest names its tmpdir after the invoking user (/tmp/pytest-of-drew).\n name: 'tmp-user-dir',\n pattern: /\\/tmp\\/pytest-of-[A-Za-z0-9._-]+/g,\n rewrite: () => '/tmp/pytest-of-$USER',\n },\n {\n // `ls -l` owner/group columns leak the username in captured tool output.\n // The `(?!user user…)` guard keeps a second pass at zero rewrites.\n name: 'ls-owner',\n pattern:\n /([-bcdlps][-rwxsStT]{9}[.+@]?\\s+\\d+\\s+)(?!user user(?=\\s))[A-Za-z0-9._-]+\\s+[A-Za-z0-9._-]+(?=\\s)/g,\n rewrite: (_match, prefix) => `${prefix}user user`,\n },\n {\n // Env-var-shaped secrets: NAME=value where NAME looks credential-bearing.\n // The (?!\\[REDACTED:) guard keeps the rule idempotent on its own output.\n name: 'env-secret',\n pattern:\n /\\b([A-Z][A-Z0-9_]*(?:KEY|TOKEN|SECRET|PASSWORD|PASSWD|CREDENTIALS?))=(?!\\[REDACTED:)(\"[^\"]*\"|'[^']*'|[^\\s\"']+)/g,\n rewrite: (_match, name) => `${name}=[REDACTED:env]`,\n },\n {\n name: 'bearer-token',\n // A short plain word is English (\"the Basic Version.\"), not a credential.\n pattern:\n /\\b(Bearer|Basic)\\s+(?!\\[REDACTED:)(?![A-Za-z]{1,16}\\.?(?:[^\\w\\-.~+/=]|$))[A-Za-z0-9\\-._~+/=]{8,}/g,\n rewrite: (_match, scheme) => `${scheme} [REDACTED:bearer]`,\n },\n {\n // Bare provider-prefixed keys (OpenAI/Anthropic sk-, GitHub ghp_/gho_/…,\n // fine-grained PATs, HuggingFace hf_, Slack xox*, AWS AKIA).\n name: 'api-key',\n pattern:\n /\\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,\n rewrite: () => '[REDACTED:api-key]',\n },\n {\n // Our infra hostnames → placeholder domain, subdomain preserved\n // (router.tangle.tools → router.internal.example).\n name: 'infra-host',\n pattern: /(?<![A-Za-z0-9.-])((?:[A-Za-z0-9-]+\\.)*)tangle\\.(?:tools|network)(?![A-Za-z0-9-])/g,\n rewrite: (_match, prefix) => `${prefix ?? ''}internal.example`,\n },\n {\n // Known workstation hostnames leak through email Message-IDs and fqdn\n // lookups inside captured test output; extend the list as machines join.\n name: 'machine-host',\n pattern: /\\b[A-Za-z0-9]+-GTR-Pro\\b/g,\n rewrite: () => 'workstation',\n },\n]\n\n/** Rule name → number of matches rewritten. Always carries every rule (0 is data). */\nexport type ScrubCounts = Record<string, number>\n\nexport function emptyScrubCounts(): ScrubCounts {\n return Object.fromEntries(SCRUB_RULES.map((rule) => [rule.name, 0]))\n}\n\nexport function addScrubCounts(into: ScrubCounts, from: ScrubCounts): ScrubCounts {\n for (const [name, count] of Object.entries(from)) into[name] = (into[name] ?? 0) + count\n return into\n}\n\nexport function scrubText(text: string, counts: ScrubCounts): string {\n let out = text\n for (const rule of SCRUB_RULES) {\n out = out.replace(rule.pattern, (match: string, ...rest: unknown[]) => {\n counts[rule.name] = (counts[rule.name] ?? 0) + 1\n return rule.rewrite(match, typeof rest[0] === 'string' ? rest[0] : undefined)\n })\n }\n return out\n}\n\nfunction scrubValue(value: unknown, counts: ScrubCounts): unknown {\n if (typeof value === 'string') return scrubText(value, counts)\n if (Array.isArray(value)) return value.map((item) => scrubValue(item, counts))\n if (value !== null && typeof value === 'object') {\n const out: Record<string, unknown> = {}\n for (const [key, item] of Object.entries(value)) out[key] = scrubValue(item, counts)\n return out\n }\n return value\n}\n\n/**\n * Scrub every string value in a line; structure and key order are preserved.\n *\n * `assertMinted` on the way out rather than a cast: scrubbing rebuilds the\n * object, so the brand has to be re-earned, and re-validating proves the rules\n * did not rewrite a field the schema constrains (`reward` is a number, not a\n * string, so no rule should ever touch it — this is what checks that).\n */\nfunction scrubRolloutLine(line: MintedRolloutLine, counts: ScrubCounts): MintedRolloutLine {\n return assertMinted(scrubValue(line, counts), `scrubbed rollout line ${line.rollout_id}`)\n}\n\nexport function scrubLines(lines: MintedRolloutLine[]): {\n lines: MintedRolloutLine[]\n counts: ScrubCounts\n} {\n const counts = emptyScrubCounts()\n return { lines: lines.map((line) => scrubRolloutLine(line, counts)), counts }\n}\n\n/**\n * A `RolloutScrubber` (text → text) applying the full rule set — the\n * default hook to pass to `mintRolloutRows({ scrub })` so lines are\n * scrubbed at mint time, before they ever reach a ledger file. Release\n * builds re-run `scrubLines` regardless (idempotent), so double-scrubbing\n * is safe and counted as zero.\n */\nexport function defaultRolloutScrubber(text: string): string {\n return scrubText(text, emptyScrubCounts())\n}\n\n// ---------------------------------------------------------------------------\n// Row screen: a secret or private detail drops the WHOLE line.\n// ---------------------------------------------------------------------------\n\n/**\n * Redaction leaves the row; this refuses it. A rewrite can only redact the\n * shapes it knows, and a live seat token split across a tool result, or a\n * phone number in a pasted message, sits beside the rest of the context that\n * made it sensitive. So the release build drops any line with one hit and\n * counts the drop by rule, and importers apply the same screen before a line\n * reaches a ledger.\n */\ninterface PrivacyRule {\n name: string\n hit: (text: string) => boolean\n}\n\nconst scrubPattern = (name: string): RegExp => {\n const rule = SCRUB_RULES.find((r) => r.name === name)\n if (!rule) throw new Error(`no scrub rule \"${name}\"`)\n return rule.pattern\n}\n\n/** Bits per character over the token's own symbols. */\nfunction entropy(token: string): number {\n const counts = new Map<string, number>()\n for (const char of token) counts.set(char, (counts.get(char) ?? 0) + 1)\n let bits = 0\n for (const count of counts.values()) {\n const p = count / token.length\n bits -= p * Math.log2(p)\n }\n return bits\n}\n\n// 32+ chars mixing upper, lower and digits at over 4.3 bits/char: random keys,\n// not hex digests (at most 4 bits/char) or identifiers. `/` and `.` end a token, so\n// a path is judged segment by segment: a whole mixed-case temp path read as one key.\nconst ENTROPY_TOKEN = /[A-Za-z0-9+=_-]{32,}/g\n// A segment that is a one-case word (`toolu_01…`, `cite_note-…`, `USCODE-2023-title42…`) marks a generated\n// identifier, not a key: on 21 Discovery runs every high-entropy hit was one of these.\nconst NAMED = /(?:^|[-_])(?:[a-z]{4,}|[A-Z]{4,})(?:$|[-_])/\nconst highEntropy = (text: string): boolean => {\n for (const [token] of text.matchAll(ENTROPY_TOKEN)) {\n if (NAMED.test(token)) continue\n if (/[A-Z]/.test(token) && /[a-z]/.test(token) && /\\d/.test(token) && entropy(token) > 4.3) {\n return true\n }\n }\n return false\n}\n\nconst EMAIL = /[A-Za-z0-9._%+-]+@[A-Za-z0-9-]+(?:\\.[A-Za-z0-9-]+)*\\.[A-Za-z]{2,}/g\n// RFC 2606 example domains and `git@host` remotes are not personal addresses.\nconst NOT_PERSONAL_EMAIL = /^git@|@(?:[\\w-]+\\.)*example\\.(?:com|org|net)$/i\nconst email = (text: string): boolean => {\n for (const [match] of text.matchAll(EMAIL)) if (!NOT_PERSONAL_EMAIL.test(match)) return true\n return false\n}\n\nconst PRIVACY_RULES: readonly PrivacyRule[] = [\n ...['api-key', 'env-secret', 'bearer-token'].map((name) => {\n const pattern = scrubPattern(name)\n // `search` ignores the global flag's lastIndex, so the shared regex stays stateless.\n return { name, hit: (text: string) => text.search(pattern) >= 0 }\n }),\n { name: 'private-key', hit: (text) => /-----BEGIN [A-Z0-9 ]*PRIVATE KEY-----/.test(text) },\n { name: 'high-entropy', hit: highEntropy },\n { name: 'email', hit: email },\n {\n name: 'phone',\n hit: (text) => /(?<![\\d.]\\s?)(?:\\+?1[ .-]?)?\\(?\\d{3}\\)?[ .-]\\d{3}[ .-]\\d{4}(?![\\d.])/.test(text),\n },\n {\n name: 'postal-address',\n hit: (text) =>\n /\\b\\d{1,6}\\s+(?:[NSEW]\\.?\\s+)?(?:[A-Z][a-z]+\\s+){1,3}(?:Street|St|Avenue|Ave|Road|Rd|Boulevard|Blvd|Lane|Ln|Drive|Dr|Court|Ct|Place|Pl|Way|Terrace|Parkway|Pkwy)\\b/.test(\n text,\n ),\n },\n]\n\nexport const PRIVACY_RULE_NAMES: readonly string[] = [\n ...PRIVACY_RULES.map((rule) => rule.name),\n 'denylist',\n]\n\nfunction* stringsOf(value: unknown): Generator<string> {\n if (typeof value === 'string') yield value\n else if (Array.isArray(value)) for (const item of value) yield* stringsOf(item)\n else if (value !== null && typeof value === 'object') {\n for (const item of Object.values(value)) yield* stringsOf(item)\n }\n}\n\n/**\n * The first privacy rule any string in `value` hits, or `null` when clean.\n * `denylist` holds literal terms (names, addresses, numbers) matched without\n * case; it is supplied at run time and never committed.\n */\nexport function privacyHit(value: unknown, denylist: readonly string[] = []): string | null {\n const terms = denylist.map((term) => term.toLowerCase()).filter(Boolean)\n for (const text of stringsOf(value)) {\n for (const rule of PRIVACY_RULES) if (rule.hit(text)) return rule.name\n if (terms.length > 0) {\n const lower = text.toLowerCase()\n if (terms.some((term) => lower.includes(term))) return 'denylist'\n }\n }\n return null\n}\n","/**\n * One-command HuggingFace dataset release from rollout ledgers:\n *\n * agent-eval rollout-release <ledger.jsonl...> --out <dir> \\\n * [--formats sft,verifiers,rft,raw] [--include-proposers] [--push <org/name>]\n *\n * Pipeline per input ledger: read + validate → fail-closed filters\n * (trainable split only; proposer sessions dropped unless\n * --include-proposers, they contain improvement-loop harness source; any line\n * with a secret or private detail, or a `--denylist` term, dropped whole) →\n * deterministic scrub → export the requested formats + scrub-report.json +\n * auto-generated README.md card. Deterministic: same inputs and flags →\n * byte-identical output dir.\n *\n * --push uploads the built dir with `huggingface-cli upload` only when the\n * CLI exists on PATH and HF_TOKEN is present in the env; the token is\n * never printed. Everything else runs fully offline.\n */\n\nimport { spawnSync } from 'node:child_process'\nimport { mkdir, readFile, writeFile } from 'node:fs/promises'\nimport { basename, dirname, join } from 'node:path'\nimport { toJsonl, toRftItems, toSftRows, toVerifiersRolloutOutputs } from '../exporters'\nimport { GATE_POLICIES, gateErrors } from '../gate-checks'\nimport { readRolloutJournal, writeRolloutLedger } from '../ledger'\nimport { isTrainableSplit, type MintedRolloutLine } from '../schema'\nimport { buildDatasetCard, FORMAT_FILES, RELEASE_FORMATS, type ReleaseFormat } from './card'\nimport {\n assertGateReport,\n FORMAT_GATE_DISPOSITION,\n type GateReport,\n gatedRolloutIds,\n measureFormatGate,\n releaseRowRefs,\n} from './gate-report'\nimport {\n addScrubCounts,\n emptyScrubCounts,\n PRIVACY_RULE_NAMES,\n privacyHit,\n type ScrubCounts,\n scrubLines,\n} from './scrub'\n\nexport interface BuildOptions {\n out: string\n formats: ReleaseFormat[]\n includeProposers: boolean\n /** Literal terms whose presence drops a line (case-insensitive). */\n denylist?: string[]\n}\n\nexport interface ScrubReport {\n /** Input ledger path → rule → rewrite count (only shipped lines are scrubbed). */\n files: Record<string, ScrubCounts>\n totals: ScrubCounts\n excluded: { proposers: number; nonTrain: number; privacy: number }\n /** Privacy rule → lines dropped whole on its first hit. */\n dropped: Record<string, number>\n}\n\nexport interface BuildSummary {\n inputs: string[]\n read: number\n kept: number\n scrub: ScrubReport\n formatCounts: Partial<Record<ReleaseFormat, number>>\n /** Per-format anti-Goodhart accounting, measured on the rows written. */\n gate: GateReport\n files: string[]\n}\n\nexport async function buildHfDataset(\n inputs: string[],\n options: BuildOptions,\n): Promise<BuildSummary> {\n if (inputs.length === 0) throw new Error('no input ledgers given')\n if (options.formats.length === 0) throw new Error('no formats selected')\n\n const report: ScrubReport = {\n files: {},\n totals: emptyScrubCounts(),\n excluded: { proposers: 0, nonTrain: 0, privacy: 0 },\n dropped: Object.fromEntries(PRIVACY_RULE_NAMES.map((name) => [name, 0])),\n }\n const kept: MintedRolloutLine[] = []\n let read = 0\n\n for (const input of inputs) {\n // An importer's ledger is a journal: a row the gate refuses is counted as not trainable.\n const lines = await readRolloutJournal(input)\n read += lines.length\n const shippable = lines.filter((line) => {\n const refused = gateErrors(line, GATE_POLICIES.assertMinted).length > 0\n if (refused || !isTrainableSplit(line.task.split)) {\n report.excluded.nonTrain += 1\n return false\n }\n if (!options.includeProposers && line.role === 'proposer') {\n report.excluded.proposers += 1\n return false\n }\n const hit = privacyHit(line, options.denylist)\n if (hit !== null) {\n report.excluded.privacy += 1\n report.dropped[hit] = (report.dropped[hit] ?? 0) + 1\n return false\n }\n return true\n })\n const scrubbed = scrubLines(shippable as MintedRolloutLine[])\n report.files[input] = scrubbed.counts\n addScrubCounts(report.totals, scrubbed.counts)\n kept.push(...scrubbed.lines)\n }\n\n const formatCounts: Partial<Record<ReleaseFormat, number>> = {}\n const files: string[] = []\n const gated = gatedRolloutIds(kept)\n const gate: GateReport = { gatedLines: gated.size, byFormat: {} }\n\n // Every selected format's rows are exported and gate-measured BEFORE the\n // first byte is written. A build that would ship a gamed run at a positive\n // reward fails with nothing on disk, rather than leaving a poisoned config\n // behind for someone to `--push`.\n const pending: Array<{ path: string; write: () => Promise<void> }> = []\n\n for (const format of options.formats) {\n const path = join(options.out, FORMAT_FILES[format])\n if (format === 'raw') {\n // writeRolloutLedger re-validates every scrubbed line before it lands.\n gate.byFormat.raw = measureFormatGate(gated, releaseRowRefs.raw(kept))\n formatCounts.raw = kept.length\n pending.push({ path, write: () => writeRolloutLedger(path, kept) })\n } else if (format === 'sft') {\n const rows = toSftRows(kept)\n gate.byFormat.sft = measureFormatGate(gated, releaseRowRefs.sft(rows))\n formatCounts.sft = rows.length\n pending.push({ path, write: () => writeFile(path, toJsonl(rows)) })\n } else if (format === 'verifiers') {\n // The declared disposition drives the exporter: 'zero-and-flag' ships\n // gated lines and honest failures as labeled negatives at reward 0.\n const outputs = toVerifiersRolloutOutputs(kept, {\n gatedLines: FORMAT_GATE_DISPOSITION.verifiers,\n })\n gate.byFormat.verifiers = measureFormatGate(gated, releaseRowRefs.verifiers(outputs))\n formatCounts.verifiers = outputs.length\n pending.push({ path, write: () => writeFile(path, toJsonl(outputs)) })\n } else {\n const items = toRftItems(kept, { gatedLines: FORMAT_GATE_DISPOSITION.rft })\n gate.byFormat.rft = measureFormatGate(gated, releaseRowRefs.rft(items))\n formatCounts.rft = items.length\n pending.push({ path, write: () => writeFile(path, toJsonl(items)) })\n }\n }\n\n assertGateReport(gate)\n\n for (const { path, write } of pending) {\n await mkdir(dirname(path), { recursive: true })\n await write()\n files.push(path)\n }\n\n const reportPath = join(options.out, 'scrub-report.json')\n await writeFile(reportPath, `${JSON.stringify(report, null, 2)}\\n`)\n files.push(reportPath)\n\n const cardPath = join(options.out, 'README.md')\n await writeFile(\n cardPath,\n buildDatasetCard({\n lines: kept,\n formats: options.formats,\n includeProposers: options.includeProposers,\n sourceFiles: inputs.map((input) => basename(input)),\n scrubTotals: report.totals,\n excluded: report.excluded,\n formatCounts,\n gate,\n }),\n )\n files.push(cardPath)\n\n return { inputs, read, kept: kept.length, scrub: report, formatCounts, gate, files }\n}\n\nfunction planPushCommand(repo: string, outDir: string): string[] {\n return ['huggingface-cli', 'upload', repo, outDir, '.', '--repo-type', 'dataset']\n}\n\nfunction pushDataset(repo: string, outDir: string): void {\n const found = spawnSync('which', ['huggingface-cli'], { stdio: 'ignore' })\n if (found.status !== 0) {\n throw new Error(\n 'huggingface-cli not found on PATH — install huggingface_hub[cli] before --push',\n )\n }\n if (!process.env.HF_TOKEN) {\n throw new Error('HF_TOKEN not present in env — refusing to push')\n }\n const [command, ...args] = planPushCommand(repo, outDir) as [string, ...string[]]\n // Token stays in the inherited env; it is never echoed or interpolated.\n const run = spawnSync(command, args, { stdio: 'inherit' })\n if (run.status !== 0) throw new Error(`huggingface-cli upload exited ${String(run.status)}`)\n}\n\nexport interface RolloutReleaseCliArgs extends BuildOptions {\n inputs: string[]\n push: string | null\n denylistPath: string | null\n}\n\nconst ROLLOUT_RELEASE_USAGE =\n 'usage: agent-eval rollout-release <ledger.jsonl...> --out <dir> [--formats sft,verifiers,rft,raw] [--include-proposers] [--denylist <terms.txt>] [--push <org/name>]'\n\nfunction parseRolloutReleaseArgs(argv: string[]): RolloutReleaseCliArgs {\n const args: RolloutReleaseCliArgs = {\n inputs: [],\n out: '',\n formats: [...RELEASE_FORMATS],\n includeProposers: false,\n push: null,\n denylistPath: null,\n }\n for (let i = 0; i < argv.length; i++) {\n const arg = argv[i]!\n if (arg === '--out') {\n args.out = argv[++i] ?? ''\n } else if (arg === '--formats') {\n args.formats = (argv[++i] ?? '').split(',').filter(Boolean) as ReleaseFormat[]\n const unknown = args.formats.find((format) => !RELEASE_FORMATS.includes(format))\n if (unknown) throw new Error(`unknown format \"${unknown}\" — expected one of ${RELEASE_FORMATS}`)\n } else if (arg === '--include-proposers') {\n args.includeProposers = true\n } else if (arg === '--denylist') {\n args.denylistPath = argv[++i] ?? null\n } else if (arg === '--push') {\n args.push = argv[++i] ?? null\n } else if (arg.startsWith('--')) {\n throw new Error(`unknown flag \"${arg}\"`)\n } else {\n args.inputs.push(arg)\n }\n }\n if (args.inputs.length === 0 || !args.out) {\n throw new Error(ROLLOUT_RELEASE_USAGE)\n }\n if (args.push !== null && !/^[\\w.-]+\\/[\\w.-]+$/.test(args.push)) {\n throw new Error(`--push expects <org/name>, got \"${args.push}\"`)\n }\n return args\n}\n\n/** CLI driver for `agent-eval rollout-release`. Returns the process exit code. */\nexport async function runRolloutReleaseCli(argv: string[]): Promise<number> {\n let args: RolloutReleaseCliArgs\n try {\n args = parseRolloutReleaseArgs(argv)\n } catch (error) {\n process.stderr.write(`${error instanceof Error ? error.message : String(error)}\\n`)\n return 2\n }\n if (args.denylistPath !== null) {\n // One term per line; `#` starts a comment. Terms are never echoed.\n args.denylist = (await readFile(args.denylistPath, 'utf8'))\n .split('\\n')\n .map((line) => line.replace(/#.*/, '').trim())\n .filter(Boolean)\n }\n const summary = await buildHfDataset(args.inputs, args)\n process.stdout.write(\n `${JSON.stringify(\n {\n read: summary.read,\n kept: summary.kept,\n formatCounts: summary.formatCounts,\n gate: summary.gate,\n scrub: summary.scrub,\n },\n null,\n 2,\n )}\\n`,\n )\n process.stdout.write(`dataset → ${args.out} (${summary.files.length} files)\\n`)\n if (args.push !== null) {\n pushDataset(args.push, args.out)\n process.stdout.write(`pushed → ${args.push}\\n`)\n }\n return 0\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AA6BA,SAAS,UAAU,OAA8B;CAC/C,KAAK,MAAM,CAAC,GAAG,SAAS,MAAM,QAAQ,GAAG,kBAAkB,MAAM,iBAAiB,EAAE,EAAE;CACtF,OAAO,MAAM,KAAK,SAAS,KAAK,UAAU,IAAI,CAAC,CAAC,CAAC,KAAK,IAAI,KAAK,MAAM,SAAS,IAAI,OAAO;AAC3F;;AAGA,eAAsB,mBAAmB,MAAc,OAAqC;CAC1F,MAAM,UAAU,UAAU,KAAK;CAC/B,MAAM,MAAM,QAAQ,IAAI,GAAG,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Ae,KAAK,QAAQ,IAAI;CACtD,QAAQ,OAAO,MACb,GAAG,KAAK,UACN;EACE,MAAM,QAAQ;EACd,MAAM,QAAQ;EACd,cAAc,QAAQ;EACtB,MAAM,QAAQ;EACd,OAAO,QAAQ;CACjB,GACA,MACA,CACF,EAAE,GACJ;CACA,QAAQ,OAAO,MAAM,aAAa,KAAK,IAAI,IAAI,QAAQ,MAAM,OAAO,UAAU;CAC9E,IAAI,KAAK,SAAS,MAAM;EACtB,YAAY,KAAK,MAAM,KAAK,GAAG;EAC/B,QAAQ,OAAO,MAAM,YAAY,KAAK,KAAK,GAAG;CAChD;CACA,OAAO;AACT"}
@@ -1 +1 @@
1
- export { b as HOSTED_WIRE_VERSION, g as IngestResponseSchema, c as IngestSearchLedgerRequestSchema, _ as IngestTracesRequestSchema, l as SEARCH_LEDGER_BATCH_MAX_BYTES, u as SEARCH_LEDGER_INGEST_PATH, d as SearchBlobPutResponseSchema, f as SearchLedgerConflictSchema, p as SearchLedgerHeadSchema, t as SearchShipConflictError, v as TraceSpanEventSchema, y as UnixNanoTimestampSchema, h as admitSearchLedgerBatch, a as createHostedClient, o as hostedClientFromEnv, s as hostedTenantFromEnv, r as shipSearchLedger, i as startSearchShipper } from "../search-shipper-B6tMNx1I.js";
1
+ export { b as HOSTED_WIRE_VERSION, g as IngestResponseSchema, c as IngestSearchLedgerRequestSchema, _ as IngestTracesRequestSchema, l as SEARCH_LEDGER_BATCH_MAX_BYTES, u as SEARCH_LEDGER_INGEST_PATH, d as SearchBlobPutResponseSchema, f as SearchLedgerConflictSchema, p as SearchLedgerHeadSchema, t as SearchShipConflictError, v as TraceSpanEventSchema, y as UnixNanoTimestampSchema, h as admitSearchLedgerBatch, a as createHostedClient, o as hostedClientFromEnv, s as hostedTenantFromEnv, r as shipSearchLedger, i as startSearchShipper } from "../search-shipper-BUf7s92U.js";
@@ -1,18 +1,18 @@
1
1
  import { d as CostReceipt, l as CostLedgerSummary, o as CostLedgerHandle, p as CostUsage, r as CostBreakdown, u as CostProvenance } from "./cost-ledger-Czro9wmo.js";
2
2
  import { c as ValidationError, t as AgentEvalError } from "./errors-E9I2hldP.js";
3
- import { a as RunRecord, c as RunSplitTag } from "./run-record-pBlhZizT.js";
4
- import { Y as TraceAnalysisStore, i as AnalystFinding, p as AnalystUsageReceipt, u as AnalystRunResult, v as ProposalFinding } from "./types-DbGSC2No.js";
3
+ import { a as RunRecord, c as RunSplitTag } from "./run-record-hti3ETmO.js";
4
+ import { Y as TraceAnalysisStore, i as AnalystFinding, p as AnalystUsageReceipt, u as AnalystRunResult, v as ProposalFinding } from "./types-Dtt11Ppr.js";
5
5
  import { O as ChatClient, dt as ServedModelPolicy, z as LlmCallMetadata } from "./cluster-CSd0LE_M.js";
6
- import { E as PairedBootstrapResult } from "./index-DHWFYUVW.js";
6
+ import { F as PairedBootstrapResult } from "./index-Bcy00QoN.js";
7
7
  import { E as SearchExecutionIdentity, G as SearchSplit, V as SearchProposer, a as SearchAttemptAccounting, i as SearchArtifactRef, j as SearchModelIdentity, nt as EvaluationClaim, rt as EvaluationUnitSummary, tt as SearchUnknown, z as SearchOperationRecordedEvent } from "./search-ledger-types-qiYRUo_N.js";
8
8
  import { r as LedgerHash } from "./canonical-gLeHiqzd.js";
9
- import { C as JudgeDimension, H as SurfaceProposer, N as ParetoParent, O as LabeledScenarioSource, R as Scenario, S as JudgeConfig, _ as GateDecision, a as CampaignResult, b as GenerationRecord, c as CampaignTraceWriter, d as DispatchContext, f as DispatchFn, g as GateContribution, i as CampaignCostMeter, j as MutableSurface, k as LabeledScenarioStore, l as CodeSurface, o as CampaignScenarioIdentity, p as Gate, r as CampaignCellResult, u as ComponentSurface, v as GateResult, y as GenerationCandidate } from "./types-ByrbgALT.js";
10
- import { Dt as FinalEvidenceRecord, M as PairedArmsComparison, at as CampaignEvidenceContext, dt as EvidenceReceipt, wt as FinalEvidenceLedger } from "./statistical-heldout-Bx1QUDNy.js";
11
- import { At as SearchHistoryReceipt, Dt as SearchHistoryCoverage, I as SearchPolicy, Tt as SearchHistoryAdmissionOptions, Wt as CampaignStorage, gt as SearchRecorder, mt as SearchLedgerBinding, o as SearchCellResult, pt as RegisterSearchNodeInput, vt as SearchRunIdentity } from "./search-kernel-C4XnLKIW.js";
12
- import { E as AnalystIssueExpectation, G as ExternalOptimizerRunnerCommand, I as ExternalOptimizerEvaluationObservation, J as ExternalTextEvaluationRequest, K as ExternalOptimizerWireCounts, N as ExternalOptimizerCallbackLimits, R as ExternalOptimizerModelBudget, W as ExternalOptimizerResumeMode, m as AnalystBenchmarkLabelState, q as ExternalTextCandidate, t as AgentProfile$1, u as AnalystBenchmarkCase, z as ExternalOptimizerModelCall } from "./agent-profile-BF1WLMco.js";
13
- import { a as PairedPromotionDecision } from "./paired-promotion-decision-DawN2o0G.js";
9
+ import { C as JudgeDimension, H as SurfaceProposer, N as ParetoParent, O as LabeledScenarioSource, R as Scenario, S as JudgeConfig, _ as GateDecision, a as CampaignResult, b as GenerationRecord, c as CampaignTraceWriter, d as DispatchContext, f as DispatchFn, g as GateContribution, i as CampaignCostMeter, j as MutableSurface, k as LabeledScenarioStore, l as CodeSurface, o as CampaignScenarioIdentity, p as Gate, r as CampaignCellResult, u as ComponentSurface, v as GateResult, y as GenerationCandidate } from "./types-qJwFZTqa.js";
10
+ import { Dt as FinalEvidenceRecord, M as PairedArmsComparison, at as CampaignEvidenceContext, dt as EvidenceReceipt, wt as FinalEvidenceLedger } from "./statistical-heldout-AvgLVFp6.js";
11
+ import { Q as SearchRecorder, X as SearchLedgerBinding, Y as RegisterSearchNodeInput, _t as CampaignStorage, et as SearchRunIdentity, ft as SearchHistoryReceipt, i as RunSearchOptions, lt as SearchHistoryCoverage, o as SearchCellResult, st as SearchHistoryAdmissionOptions, v as SearchPolicy } from "./search-kernel-IpyhPDQd.js";
12
+ import { a as PairedPromotionDecision } from "./paired-promotion-decision-BBSxTo-h.js";
13
+ import { E as AnalystIssueExpectation, G as ExternalOptimizerRunnerCommand, I as ExternalOptimizerEvaluationObservation, J as ExternalTextEvaluationRequest, K as ExternalOptimizerWireCounts, N as ExternalOptimizerCallbackLimits, R as ExternalOptimizerModelBudget, W as ExternalOptimizerResumeMode, m as AnalystBenchmarkLabelState, q as ExternalTextCandidate, t as AgentProfile$1, u as AnalystBenchmarkCase, z as ExternalOptimizerModelCall } from "./agent-profile-BpLyM2kL.js";
14
14
  import { r as DatasetScenario, t as Dataset } from "./dataset-DThC1S6G.js";
15
- import { t as DetectRewardHackingInput } from "./reward-hacking-CIdVwVe4.js";
15
+ import { t as DetectRewardHackingInput } from "./reward-hacking-_CAip56v.js";
16
16
  import { f as TraceSpanEvent, t as HostedClient } from "./client-BIFwUg7I.js";
17
17
  import { n as CompletionVerdict, o as ProducedState, r as CorrectnessChecker, t as CompletionRequirement } from "./completion-verifier-oAgSwdFe.js";
18
18
  import { AgentProfile } from "@tangle-network/agent-interface";
@@ -50,6 +50,21 @@ interface FinalEvidenceUse {
50
50
  claim: EvaluationClaim;
51
51
  record: FinalEvidenceRecord;
52
52
  }
53
+ /** Capture identities before an asynchronous search can mutate its caller's options. */
54
+ declare function captureFinalEvidencePolicy(policy: FinalEvidencePolicy): FinalEvidencePolicy;
55
+ type BeforeSearchClaim = NonNullable<RunSearchOptions<unknown>['beforeClaim']>;
56
+ /** Reserve before development; expose only the recorder's durable sealed roster.
57
+ * An exposed request can resume that exact search, never a fresh adaptive search. */
58
+ declare function prepareSearchFinalEvidence<TScenario extends Scenario>(input: {
59
+ policy: FinalEvidencePolicy;
60
+ recorder: SearchRecorder;
61
+ claim: EvaluationClaim;
62
+ finalScenarios: readonly TScenario[];
63
+ developmentScenarios: readonly TScenario[];
64
+ }): Promise<{
65
+ beforeClaim: BeforeSearchClaim;
66
+ receipt: () => FinalEvidenceUse;
67
+ }>;
53
68
  declare function buildCellSchedule<TScenario extends Scenario>(scenarios: TScenario[], seed: number, reps: number): Array<{
54
69
  scenario: TScenario;
55
70
  rep: number;
@@ -2918,5 +2933,5 @@ declare function verifyCodeSurface(surface: CodeSurface, worktreeDir?: string):
2918
2933
  /** Resolve a code candidate for evaluation only after verifying its immutable
2919
2934
  * identity against the checkout at `worktreeRef`. */
2920
2935
  declare function resolveWorktreePath(surface: CodeSurface, worktreeDir?: string): string;
2921
- export { summarizeBackendIntegrity as $, RedTeamCategory as $n, ExternalOptimizerObservationArtifact as $r, CrossSurfaceCandidate as $t, RetainedDispatchOptions as A, CampaignRunPlanCell as Ai, BuildLoopProvenanceArgs as An, externalTextOptimizationMethod as Ar, importExternalEvaluations as At, RunProfileMatrixSegmentOptions as B, CampaignCoverage as Bi, emitLoopProvenance as Bn, OptimizationMethodProvenance as Br, LoadEvalFixtureScenariosOptions as Bt, searchModelIdentity as C, RunEvalOptions as Ci, CrossSurfaceSelectionPolicy as Cn, GepaEngineRun as Cr, RolloutCall as Ct, ScenarioSignal as D, RunCampaignOptions as Di, BuildTraceAnalystSurfaceDispatchOptions as Dn, gepaOptimizationMethod as Dr, GepaEvaluationImport as Dt, DiscriminationScore as E, CampaignCellRetryPolicy as Ei, measureCampaignCost as En, GepaRunnerCommand as Er, ExternalSearchOptimizer as Et, FinalizedProfileMatrixResult as F, CellScheduleSlot as Fi, LoopProvenanceCandidate as Fn, ExternalTextEvaluationResponse as Fr, EvalFixtureFile as Ft, ProfileSummary as G, campaignSplitDigestFromIdentities as Gi, HeldOutGateOptions as Gn, OptimizationTokenUsage as Gr, planEvalFixtureRun as Gt, finalizeProfileMatrix as H, campaignCoverage as Hi, CampaignComparisonUnits as Hn, OptimizationMethodRunOptions as Hr, discoverEvalFixtures as Ht, ProfileMatrixCoverage as I, buildCellSchedule as Ii, LoopProvenanceEvidence as In, decodeExternalTextCandidate as Ir, EvalFixtureLoadOptions as It, ScenarioRollup as J, DefaultProductionGateOptions as Jn, GepaCandidatePopulationCandidate as Jr, CrossSurfaceAdditionDecision as Jt, RunProfileMatrixOptions as K, SearchLedgerError as Ki, heldOutGate as Kn, costFromLedgerSummary as Kr, analyzeCrossSurfaceInteractions as Kt, ProfileMatrixPlan as L, cellCachePath as Li, LoopProvenanceOptimizationMethod as Ln, OptimizationMethod as Lr, EvalFixtureRunPlan as Lt, createRetainedDispatch as M, planCampaignRun as Mi, EmitLoopProvenanceResult as Mn, ExternalTextOptimizerContext as Mr, NeutralizationGateOptions as Mt, CreateProfileMatrixPlanOptions as N, CacheIssueReason as Ni, LoopProvenanceArgsFromResult as Nn, ExternalTextOptimizerResult as Nr, neutralizationGate as Nt, scoreDiscrimination as O, runCampaign as Oi, TraceAnalystArtifact as On, OpenAICompatibleOptimizerModel as Or, GepaPopulationImport as Ot, FinalizeProfileMatrixOptions as P, CacheRead as Pi, LoopProvenanceBackend as Pn, ExternalOptimizationExample as Pr, EvalFixture as Pt, assertRealBackend as Q, RedTeamCase as Qn, ExternalOptimizerExecutionSummary as Qr, CrossSurfaceBootstrapPolicy as Qt, ProfileMatrixRow as R, FinalEvidencePolicy as Ri, LoopProvenanceRecord as Rn, OptimizationMethodComposition as Rr, EvalFixtureScenario as Rt, campaignCellSearchResult as S, openAutoPr as Si, CrossSurfaceRelativeCost as Sn, GepaEngineOptions as Sr, RolloutArgumentDiffOptions as St, searchReceiptAccounting as T, CampaignCellFailureReceipt as Ti, CrossSurfaceTaskRow as Tn, GepaOptimizationRecipe as Tr, UngroundedLiteralReport as Tt, runProfileMatrixSegment as U, campaignScenarioIdentity as Ui, campaignBreakdown as Un, OptimizationPackageSource as Ur, loadEvalFixture as Ut, createProfileMatrixPlan as V, assertCampaignDesign as Vi, CampaignBreakdown as Vn, OptimizationMethodResult as Vr, PlanEvalFixtureRunOptions as Vt, ProfileDispatchFn as W, campaignSplitDigest as Wi, campaignMeanComposite as Wn, ComparisonCost as Wr, loadEvalFixtureScenarios as Wt, BackendIntegrityError as X, defaultProductionGate as Xn, GepaCandidateSelectionScore as Xr, CrossSurfaceAttemptCompleteness as Xt, runProfileMatrix as Y, DefaultProductionRewardHackingOptions as Yn, GepaCandidatePopulationSummary as Yr, CrossSurfaceAdditionRejectionReason as Yt, BackendIntegrityReport as Z, DEFAULT_RED_TEAM_CORPUS as Zn, readGepaCandidatePopulationArtifact as Zr, CrossSurfaceBestSingleSelection as Zt, surfaceDispatchRef as _, RunOptimizationOptions as _i, CrossSurfacePairCompatibility as _n, OptimizationMethodComparison as _r, scopedOptimizationMethod as _t, gitWorktreeAdapter as a, ReferenceEquivalenceJudgeResult as ai, CrossSurfaceComponentEvidence as an, CanaryAlert as ar, ScoreboardSummary as at, SingleRunLockOptions as b, OpenAutoPrOptions as bi, CrossSurfacePairwiseEntry as bn, compareOptimizationMethods as br, FsLabeledScenarioStoreOptions as bt, AutoevalsScoreLike as c, LlmJudgeOptions as ci, CrossSurfaceEligibility as cn, CanaryOptions as cr, renderScoreboardMarkdown as ct, PhoenixEvaluatorLike as d, isTransientTransportFailure as di, CrossSurfaceInteractionAwareSelection as dn, composeGate as dr, userStoryScoreboard as dt, ExternalOptimizerObservationSummary as ei, CrossSurfaceCandidateComparison as en, RedTeamFinding as er, PlaybackContext as et, assertCodeSurfaceIdentity as f, transientDispatchFailure as fi, CrossSurfaceInteractionEffect as fn, SkillOptOptimizationMethodConfig as fr, ArtifactEventLike as ft, surfaceContentHash as g, PremeasuredOptimizationBaseline as gi, CrossSurfaceNaiveStackSelection as gn, CompareOptimizationMethodsOptions as gr, extractProducedState as gt, renderSurfaceDiff as h, runImprovementLoop as hi, CrossSurfaceInteractionTask as hn, skillOptOptimizationMethod as hr, ToolCallEventLike as ht, WorktreeAdapter as i, ReferenceEquivalenceJudgeOptions as ii, CrossSurfaceComponent as in, scoreRedTeamOutput as ir, ScoreboardRow as it, RetainedDispatchOutcome as j, PlanCampaignRunOptions as ji, EmitLoopProvenanceArgs as jn, ExternalTextOptimizationMethodConfig as jr, importGepaPopulation as jt, resolveRunDir as k, CampaignRunPlan as ki, TraceAnalystScenario as kn, OptimizerModelBudget as kr, externalSurface as kt, AutoevalsScorerLike as l, llmJudge as li, CrossSurfaceEvidenceBreakdown as ln, CanaryReport as lr, scoreUserStory as lt, componentSurfaceIdentityMaterial as m, RunImprovementLoopResult as mi, CrossSurfaceInteractionReport as mn, SkillOptTrainerConfig as mr, RuntimeEventLike as mt, GitWorktreeAdapterOptions as n, readExternalOptimizerObservationArtifact as ni, CrossSurfaceCandidateOutcome as nn, redTeamDataset as nr, PlaybackStep as nt, resolveWorktreePath as o, ReferenceEquivalenceScenario as oi, CrossSurfaceCompositionStep as on, CanaryEvaluation as or, UserStory as ot, codeSurfaceIdentityMaterial as p, RunImprovementLoopOptions as pi, CrossSurfaceInteractionPath as pn, SkillOptRunnerCommand as pr, ProposalEventLike as pt, RunProfileMatrixResult as q, SearchLedgerIntegrityError as qi, DefaultProductionGateCheck as qn, GepaCandidatePopulationArtifact as qr, AnalyzeCrossSurfaceInteractionsInput as qt, Worktree as r, ReferenceEquivalenceJudgeInput as ri, CrossSurfaceCandidateSummary as rn, redTeamReport as rr, ScoreboardRenderOptions as rt, verifyCodeSurface as s, LlmJudgeDimension as si, CrossSurfaceDistribution as sn, CanaryKind as sr, UserStoryVerdict as st, CodeSurfaceVerification as t, ExternalOptimizerSubmittedCandidate as ti, CrossSurfaceCandidateEvidence as tn, RedTeamReport as tr, PlaybackDriver as tt, PhoenixEvaluationResultLike as u, TransientFailureOptions as ui, CrossSurfaceIneligibilityReason as un, runCanaries as ur, scoreboardSummary as ut, surfaceHash as v, RunOptimizationResult as vi, CrossSurfacePairEvidence as vn, OptimizationMethodPairwise as vr, sequentialOptimizationMethod as vt, searchProposalExecution as w, runEval as wi, CrossSurfaceSelections as wn, GepaOptimizationMethodConfig as wr, ScoredRollout as wt, acquireSingleRunLock as x, OpenAutoPrResult as xi, CrossSurfaceRankedSingle as xn, GepaAdaptiveEngineRun as xr, RolloutArgumentDiff as xt, SingleRunLock as y, runOptimization as yi, CrossSurfacePairIncompatibilityReason as yn, OptimizationMethodScore as yr, neutralizeText as yt, ProfileMatrixSegmentResult as z, FinalEvidenceUse as zi, canonicalDigest as zn, OptimizationMethodInput as zr, EvalFixtureValidationMode as zt };
2922
- //# sourceMappingURL=index-BI9ecONy.d.ts.map
2936
+ export { summarizeBackendIntegrity as $, RedTeamCategory as $n, ExternalOptimizerObservationArtifact as $r, CrossSurfaceCandidate as $t, RetainedDispatchOptions as A, CampaignRunPlanCell as Ai, BuildLoopProvenanceArgs as An, externalTextOptimizationMethod as Ar, importExternalEvaluations as At, RunProfileMatrixSegmentOptions as B, captureFinalEvidencePolicy as Bi, emitLoopProvenance as Bn, OptimizationMethodProvenance as Br, LoadEvalFixtureScenariosOptions as Bt, searchModelIdentity as C, RunEvalOptions as Ci, CrossSurfaceSelectionPolicy as Cn, GepaEngineRun as Cr, RolloutCall as Ct, ScenarioSignal as D, RunCampaignOptions as Di, BuildTraceAnalystSurfaceDispatchOptions as Dn, gepaOptimizationMethod as Dr, GepaEvaluationImport as Dt, DiscriminationScore as E, CampaignCellRetryPolicy as Ei, measureCampaignCost as En, GepaRunnerCommand as Er, ExternalSearchOptimizer as Et, FinalizedProfileMatrixResult as F, CellScheduleSlot as Fi, LoopProvenanceCandidate as Fn, ExternalTextEvaluationResponse as Fr, EvalFixtureFile as Ft, ProfileSummary as G, campaignScenarioIdentity as Gi, HeldOutGateOptions as Gn, OptimizationTokenUsage as Gr, planEvalFixtureRun as Gt, finalizeProfileMatrix as H, CampaignCoverage as Hi, CampaignComparisonUnits as Hn, OptimizationMethodRunOptions as Hr, discoverEvalFixtures as Ht, ProfileMatrixCoverage as I, buildCellSchedule as Ii, LoopProvenanceEvidence as In, decodeExternalTextCandidate as Ir, EvalFixtureLoadOptions as It, ScenarioRollup as J, SearchLedgerError as Ji, DefaultProductionGateOptions as Jn, GepaCandidatePopulationCandidate as Jr, CrossSurfaceAdditionDecision as Jt, RunProfileMatrixOptions as K, campaignSplitDigest as Ki, heldOutGate as Kn, costFromLedgerSummary as Kr, analyzeCrossSurfaceInteractions as Kt, ProfileMatrixPlan as L, cellCachePath as Li, LoopProvenanceOptimizationMethod as Ln, OptimizationMethod as Lr, EvalFixtureRunPlan as Lt, createRetainedDispatch as M, planCampaignRun as Mi, EmitLoopProvenanceResult as Mn, ExternalTextOptimizerContext as Mr, NeutralizationGateOptions as Mt, CreateProfileMatrixPlanOptions as N, CacheIssueReason as Ni, LoopProvenanceArgsFromResult as Nn, ExternalTextOptimizerResult as Nr, neutralizationGate as Nt, scoreDiscrimination as O, runCampaign as Oi, TraceAnalystArtifact as On, OpenAICompatibleOptimizerModel as Or, GepaPopulationImport as Ot, FinalizeProfileMatrixOptions as P, CacheRead as Pi, LoopProvenanceBackend as Pn, ExternalOptimizationExample as Pr, EvalFixture as Pt, assertRealBackend as Q, RedTeamCase as Qn, ExternalOptimizerExecutionSummary as Qr, CrossSurfaceBootstrapPolicy as Qt, ProfileMatrixRow as R, FinalEvidencePolicy as Ri, LoopProvenanceRecord as Rn, OptimizationMethodComposition as Rr, EvalFixtureScenario as Rt, campaignCellSearchResult as S, openAutoPr as Si, CrossSurfaceRelativeCost as Sn, GepaEngineOptions as Sr, RolloutArgumentDiffOptions as St, searchReceiptAccounting as T, CampaignCellFailureReceipt as Ti, CrossSurfaceTaskRow as Tn, GepaOptimizationRecipe as Tr, UngroundedLiteralReport as Tt, runProfileMatrixSegment as U, assertCampaignDesign as Ui, campaignBreakdown as Un, OptimizationPackageSource as Ur, loadEvalFixture as Ut, createProfileMatrixPlan as V, prepareSearchFinalEvidence as Vi, CampaignBreakdown as Vn, OptimizationMethodResult as Vr, PlanEvalFixtureRunOptions as Vt, ProfileDispatchFn as W, campaignCoverage as Wi, campaignMeanComposite as Wn, ComparisonCost as Wr, loadEvalFixtureScenarios as Wt, BackendIntegrityError as X, defaultProductionGate as Xn, GepaCandidateSelectionScore as Xr, CrossSurfaceAttemptCompleteness as Xt, runProfileMatrix as Y, SearchLedgerIntegrityError as Yi, DefaultProductionRewardHackingOptions as Yn, GepaCandidatePopulationSummary as Yr, CrossSurfaceAdditionRejectionReason as Yt, BackendIntegrityReport as Z, DEFAULT_RED_TEAM_CORPUS as Zn, readGepaCandidatePopulationArtifact as Zr, CrossSurfaceBestSingleSelection as Zt, surfaceDispatchRef as _, RunOptimizationOptions as _i, CrossSurfacePairCompatibility as _n, OptimizationMethodComparison as _r, scopedOptimizationMethod as _t, gitWorktreeAdapter as a, ReferenceEquivalenceJudgeResult as ai, CrossSurfaceComponentEvidence as an, CanaryAlert as ar, ScoreboardSummary as at, SingleRunLockOptions as b, OpenAutoPrOptions as bi, CrossSurfacePairwiseEntry as bn, compareOptimizationMethods as br, FsLabeledScenarioStoreOptions as bt, AutoevalsScoreLike as c, LlmJudgeOptions as ci, CrossSurfaceEligibility as cn, CanaryOptions as cr, renderScoreboardMarkdown as ct, PhoenixEvaluatorLike as d, isTransientTransportFailure as di, CrossSurfaceInteractionAwareSelection as dn, composeGate as dr, userStoryScoreboard as dt, ExternalOptimizerObservationSummary as ei, CrossSurfaceCandidateComparison as en, RedTeamFinding as er, PlaybackContext as et, assertCodeSurfaceIdentity as f, transientDispatchFailure as fi, CrossSurfaceInteractionEffect as fn, SkillOptOptimizationMethodConfig as fr, ArtifactEventLike as ft, surfaceContentHash as g, PremeasuredOptimizationBaseline as gi, CrossSurfaceNaiveStackSelection as gn, CompareOptimizationMethodsOptions as gr, extractProducedState as gt, renderSurfaceDiff as h, runImprovementLoop as hi, CrossSurfaceInteractionTask as hn, skillOptOptimizationMethod as hr, ToolCallEventLike as ht, WorktreeAdapter as i, ReferenceEquivalenceJudgeOptions as ii, CrossSurfaceComponent as in, scoreRedTeamOutput as ir, ScoreboardRow as it, RetainedDispatchOutcome as j, PlanCampaignRunOptions as ji, EmitLoopProvenanceArgs as jn, ExternalTextOptimizationMethodConfig as jr, importGepaPopulation as jt, resolveRunDir as k, CampaignRunPlan as ki, TraceAnalystScenario as kn, OptimizerModelBudget as kr, externalSurface as kt, AutoevalsScorerLike as l, llmJudge as li, CrossSurfaceEvidenceBreakdown as ln, CanaryReport as lr, scoreUserStory as lt, componentSurfaceIdentityMaterial as m, RunImprovementLoopResult as mi, CrossSurfaceInteractionReport as mn, SkillOptTrainerConfig as mr, RuntimeEventLike as mt, GitWorktreeAdapterOptions as n, readExternalOptimizerObservationArtifact as ni, CrossSurfaceCandidateOutcome as nn, redTeamDataset as nr, PlaybackStep as nt, resolveWorktreePath as o, ReferenceEquivalenceScenario as oi, CrossSurfaceCompositionStep as on, CanaryEvaluation as or, UserStory as ot, codeSurfaceIdentityMaterial as p, RunImprovementLoopOptions as pi, CrossSurfaceInteractionPath as pn, SkillOptRunnerCommand as pr, ProposalEventLike as pt, RunProfileMatrixResult as q, campaignSplitDigestFromIdentities as qi, DefaultProductionGateCheck as qn, GepaCandidatePopulationArtifact as qr, AnalyzeCrossSurfaceInteractionsInput as qt, Worktree as r, ReferenceEquivalenceJudgeInput as ri, CrossSurfaceCandidateSummary as rn, redTeamReport as rr, ScoreboardRenderOptions as rt, verifyCodeSurface as s, LlmJudgeDimension as si, CrossSurfaceDistribution as sn, CanaryKind as sr, UserStoryVerdict as st, CodeSurfaceVerification as t, ExternalOptimizerSubmittedCandidate as ti, CrossSurfaceCandidateEvidence as tn, RedTeamReport as tr, PlaybackDriver as tt, PhoenixEvaluationResultLike as u, TransientFailureOptions as ui, CrossSurfaceIneligibilityReason as un, runCanaries as ur, scoreboardSummary as ut, surfaceHash as v, RunOptimizationResult as vi, CrossSurfacePairEvidence as vn, OptimizationMethodPairwise as vr, sequentialOptimizationMethod as vt, searchProposalExecution as w, runEval as wi, CrossSurfaceSelections as wn, GepaOptimizationMethodConfig as wr, ScoredRollout as wt, acquireSingleRunLock as x, OpenAutoPrResult as xi, CrossSurfaceRankedSingle as xn, GepaAdaptiveEngineRun as xr, RolloutArgumentDiff as xt, SingleRunLock as y, runOptimization as yi, CrossSurfacePairIncompatibilityReason as yn, OptimizationMethodScore as yr, neutralizeText as yt, ProfileMatrixSegmentResult as z, FinalEvidenceUse as zi, canonicalDigest as zn, OptimizationMethodInput as zr, EvalFixtureValidationMode as zt };
2937
+ //# sourceMappingURL=index-8hbrQwdR.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index-8hbrQwdR.d.ts","names":["_$__external_optimizer_process0.ExternalTextEvaluationRequest","AgentProfile","AgentProfile"],"sources":["../src/campaign/search-ledger-errors.ts","../src/campaign/coverage.ts","../src/campaign/final-evidence.ts","../src/campaign/cell-schedule.ts","../src/campaign/cell-cache.ts","../src/campaign/plan-campaign-run.ts","../src/campaign/run-campaign.ts","../src/campaign/presets/run-eval.ts","../src/campaign/auto-pr.ts","../src/campaign/presets/run-optimization.ts","../src/campaign/presets/run-improvement-loop.ts","../src/campaign/transient-failure.ts","../src/llm-judge.ts","../src/reference-equivalence-judge.ts","../src/campaign/external-optimizer-observations.ts","../src/campaign/gepa-candidate-population.ts","../src/campaign/optimization-cost.ts","../src/campaign/optimization-method.ts","../src/campaign/external-text-evaluation.ts","../src/campaign/external-text-optimization-contract.ts","../src/campaign/external-text-optimization.ts","../src/campaign/optimizer-model.ts","../src/campaign/gepa-optimization-method.ts","../src/campaign/presets/compare-optimization-methods.ts","../src/campaign/skillopt-optimization-method.ts","../src/campaign/gates/compose.ts","../src/canary.ts","../src/red-team.ts","../src/campaign/gates/default-production-gate.ts","../src/campaign/gates/heldout-gate.ts","../src/campaign/score-utils.ts","../src/campaign/provenance.ts","../src/campaign/analyst-surface.ts","../src/campaign/cost-breakdown.ts","../src/campaign/cross-surface-types.ts","../src/campaign/cross-surface-interaction.ts","../src/campaign/fixtures.ts","../src/campaign/gates/neutralization-gate.ts","../src/campaign/gepa-search-import.ts","../src/campaign/grounded-reflection.ts","../src/campaign/labeled-store/fs-adapter.ts","../src/campaign/neutralize.ts","../src/campaign/optimization-method-composition.ts","../src/produced-state.ts","../src/campaign/presets/playback.ts","../src/integrity/backend-integrity.ts","../src/campaign/presets/run-profile-matrix.ts","../src/campaign/presets/segmented-profile-matrix.ts","../src/campaign/retained-dispatch.ts","../src/campaign/run-dir.ts","../src/campaign/scenario-selection.ts","../src/campaign/search-campaign-cell.ts","../src/campaign/single-run-lock.ts","../src/campaign/surface-identity.ts","../src/campaign/upstream-evaluators.ts","../src/campaign/worktree/index.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;cAGa,0BAA0B;;cAG1B,mCAAmC;UCE/B;EACf;EACA;EACA;EACA,iBAAiB;IAAQ;IAAgB;;;;iBAI3B,qBAAqB,kBAAkB,UACrD,oBAAoB,aACpB;;iBA2Bc,yBAAyB,kBAAkB,UACzD,UAAU,YACT,2BAA2B,KAAK;;iBAUnB,kCACd,oBAAoB,4BACpB;;iBAgBc,oBAAoB,kBAAkB,UACpD,oBAAoB,aACpB;;iBAkBc,iBAAiB,WAAW,kBAAkB,UAC5D,gBAAgB,mBAAmB,cACnC,oBAAoB,aACpB,cACA,6BACC;;UCzEc;EACf,QAAQ;EACR;EACA,iBAAiB;;UAGF;EACf,OAAO;EACP,QAAQ;;;iBAIM,2BAA2B,QAAQ,sBAAsB;KA0HpE,oBAAoB,YAAY;;;iBA0Cf,2BAA2B,kBAAkB,UAAU;EAC3E,QAAQ;EACR,UAAU;EACV,OAAO;EACP,yBAAyB;EACzB,+BAA+B;IAC7B;EAAU,aAAa;EAAmB,eAAe;;iBCvM7C,kBAAkB,kBAAkB,UAClD,WAAW,aACX,cACA,eACC;EAAQ,UAAU;EAAW;EAAa;EAAgB;;KA4BjD,iBAAiB,kBAAkB,YAAY,kBAClD,kBAAkB;iBAoBX,cAAc,gBAAgB;KCqDlC;KASA,UAAU;EAChB;EAAe,MAAM,mBAAmB;;EACxC;EAAgB,QAAQ;;UCjHb;EACf;EACA;EACA;EACA;EACA;EACA;EACA,SAAS;;UAGM;EACf;EACA;EACA;EACA;EACA;EACA;EACA,OAAO;;UAGQ,uBAAuB,kBAAkB,UAAU;EAClE,WAAW;EACX,WAAW,WAAW,WAAW;EACjC;EACA,SAAS,YAAY,WAAW;EAChC;EACA;EACA;;EAEA;EACA;;EAEA;EACA,UAAU;;EAEV,aAAa;;EAEb,WAAW,SAAS;;;;;;i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GU;UAWK;EACf;EACA,SAAS;;UAGM;EACf;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;UAGe;EACf,WAAW;EACX,SAAS;EACT,OAAO;EACP,OAAO,eAAe;EACtB,QAAQ;EACR,QAAQ;;EAER,sBAAsB;;EAEtB,aAAa;;UAGE;EACf;EACA;EACA;;EAEA;;UAGe;EACf;EACA;EACA;EACA;EACA;EACA,QAAQ;EACR,cAAc,eAAe;;UAGd;EACf;EACA;EACA;EACA;EACA;;UAGe;EACf;;EAEA;EACA;;UAGe;EACf,SAAS;EACT;EACA;EACA;EACA;EACA,eAAe;EACf,gBAAgB;;KAGN;UAYK;EACf;EACA,SAAS;EACT;;UAGe;EACf;EACA;EACA;EACA;EACA;EACA;EACA;EACA,4BAA4B,iCAAiC;EAC7D,wBAAwB,eAAe;EACvC,QAAQ;EACR,QAAQ;EACR,aAAa;EACb,eAAe;;UAGA;EACf;EACA;EACA;;UAGe;EACf;EACA;EACA,SAAS;;UAGM;;EAEf;EACA;;KAGU;UAaK;EACf;EACA;EACA;EACA;EACA;EACA,uBAAuB;EACvB;EACA;EACA,SAAS;;UAGM;EACf;EACA;EACA,YAAY;EACZ;;;UAIe;EACf;EACA;EACA;EACA;EACA,OAAO;;UAGQ;;EAEf;;EAEA;EACA;;EAEA;EACA;;EAEA,gBAAgB;;EAEhB,OAAO;;UAGQ;EACf,YAAY;EACZ,YAAY;EACZ,kBAAkB;;UAGH,8BACf,aAAa,sBAAsB;EAEnC;EACA;EACA;EACA;;EAEA,MAAM;EACN,iBAAiB;EACjB,iBAAiB;EACjB,YAAY;EACZ,UAAU;EACV,YAAY;;;;;;;iBC9QE,gCAAgC,aAAa,qBAC3D,OAAO,qCAAqC,QAC3C,8BAA8B;KClDrB;UAEK;EACf;EACA;EACA;;UAGe;EACf;EACA;EACA;EACA;EACA;EACA;EACA,OAAO;EACP;;UAGe,4BAA4B;EAC3C;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;UAGe;;EAEf,aAAa;;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