@tangle-network/agent-eval 0.94.0 → 0.95.0

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 (1056) hide show
  1. package/CHANGELOG.md +15 -0
  2. package/README.md +44 -30
  3. package/dist/action-policy.d.ts +24 -0
  4. package/dist/action-policy.d.ts.map +1 -0
  5. package/dist/action-policy.test.d.ts +2 -0
  6. package/dist/action-policy.test.d.ts.map +1 -0
  7. package/dist/active-learning.d.ts +41 -0
  8. package/dist/active-learning.d.ts.map +1 -0
  9. package/dist/adapters/http.d.ts +15 -21
  10. package/dist/adapters/http.d.ts.map +1 -0
  11. package/dist/adapters/http.js.map +1 -1
  12. package/dist/adapters/langchain.d.ts +7 -13
  13. package/dist/adapters/langchain.d.ts.map +1 -0
  14. package/dist/adapters/otel.d.ts +13 -24
  15. package/dist/adapters/otel.d.ts.map +1 -0
  16. package/dist/agent-profile-cell.d.ts +101 -0
  17. package/dist/agent-profile-cell.d.ts.map +1 -0
  18. package/dist/agent-profile.d.ts +27 -0
  19. package/dist/agent-profile.d.ts.map +1 -0
  20. package/dist/agent-profile.test.d.ts +2 -0
  21. package/dist/agent-profile.test.d.ts.map +1 -0
  22. package/dist/analyst/adapters.d.ts +62 -0
  23. package/dist/analyst/adapters.d.ts.map +1 -0
  24. package/dist/analyst/analyst.test.d.ts +2 -0
  25. package/dist/analyst/analyst.test.d.ts.map +1 -0
  26. package/dist/analyst/ax-service.d.ts +27 -0
  27. package/dist/analyst/ax-service.d.ts.map +1 -0
  28. package/dist/analyst/behavioral-analyst.d.ts +28 -0
  29. package/dist/analyst/behavioral-analyst.d.ts.map +1 -0
  30. package/dist/analyst/chat-client.d.ts +91 -0
  31. package/dist/analyst/chat-client.d.ts.map +1 -0
  32. package/dist/analyst/default-registry.d.ts +27 -0
  33. package/dist/analyst/default-registry.d.ts.map +1 -0
  34. package/dist/analyst/default-registry.test.d.ts +2 -0
  35. package/dist/analyst/default-registry.test.d.ts.map +1 -0
  36. package/dist/analyst/finding-signature.d.ts +48 -0
  37. package/dist/analyst/finding-signature.d.ts.map +1 -0
  38. package/dist/analyst/finding-subject.d.ts +146 -0
  39. package/dist/analyst/finding-subject.d.ts.map +1 -0
  40. package/dist/analyst/finding-subject.test.d.ts +2 -0
  41. package/dist/analyst/finding-subject.test.d.ts.map +1 -0
  42. package/dist/analyst/findings-store.d.ts +75 -0
  43. package/dist/analyst/findings-store.d.ts.map +1 -0
  44. package/dist/analyst/index.d.ts +28 -256
  45. package/dist/analyst/index.d.ts.map +1 -0
  46. package/dist/analyst/index.js +5 -65
  47. package/dist/analyst/index.js.map +1 -1
  48. package/dist/{kind-factory-0BhLSI27.d.ts → analyst/kind-factory.d.ts} +11 -63
  49. package/dist/analyst/kind-factory.d.ts.map +1 -0
  50. package/dist/analyst/kinds/failure-mode.d.ts +19 -0
  51. package/dist/analyst/kinds/failure-mode.d.ts.map +1 -0
  52. package/dist/analyst/kinds/improvement.d.ts +23 -0
  53. package/dist/analyst/kinds/improvement.d.ts.map +1 -0
  54. package/dist/analyst/kinds/index.d.ts +22 -0
  55. package/dist/analyst/kinds/index.d.ts.map +1 -0
  56. package/dist/analyst/kinds/kinds.test.d.ts +2 -0
  57. package/dist/analyst/kinds/kinds.test.d.ts.map +1 -0
  58. package/dist/analyst/kinds/knowledge-gap.d.ts +28 -0
  59. package/dist/analyst/kinds/knowledge-gap.d.ts.map +1 -0
  60. package/dist/analyst/kinds/knowledge-poisoning.d.ts +22 -0
  61. package/dist/analyst/kinds/knowledge-poisoning.d.ts.map +1 -0
  62. package/dist/analyst/kinds/skill-usage.d.ts +84 -0
  63. package/dist/analyst/kinds/skill-usage.d.ts.map +1 -0
  64. package/dist/analyst/kinds/skill-usage.test.d.ts +2 -0
  65. package/dist/analyst/kinds/skill-usage.test.d.ts.map +1 -0
  66. package/dist/analyst/parse-tolerant.d.ts +26 -0
  67. package/dist/analyst/parse-tolerant.d.ts.map +1 -0
  68. package/dist/analyst/parse-tolerant.test.d.ts +2 -0
  69. package/dist/analyst/parse-tolerant.test.d.ts.map +1 -0
  70. package/dist/analyst/registry.budget.test.d.ts +2 -0
  71. package/dist/analyst/registry.budget.test.d.ts.map +1 -0
  72. package/dist/{default-registry-6dhErQbs.d.ts → analyst/registry.d.ts} +8 -37
  73. package/dist/analyst/registry.d.ts.map +1 -0
  74. package/dist/analyst/steer-firewall.d.ts +35 -0
  75. package/dist/analyst/steer-firewall.d.ts.map +1 -0
  76. package/dist/analyst/steer-firewall.test.d.ts +2 -0
  77. package/dist/analyst/steer-firewall.test.d.ts.map +1 -0
  78. package/dist/analyst/structure-findings.d.ts +37 -0
  79. package/dist/analyst/structure-findings.d.ts.map +1 -0
  80. package/dist/analyst/structure-findings.test.d.ts +2 -0
  81. package/dist/analyst/structure-findings.test.d.ts.map +1 -0
  82. package/dist/analyst/tool-groups.d.ts +34 -0
  83. package/dist/analyst/tool-groups.d.ts.map +1 -0
  84. package/dist/{types-Ce17tDlG.d.ts → analyst/types.d.ts} +19 -112
  85. package/dist/analyst/types.d.ts.map +1 -0
  86. package/dist/anti-slop.d.ts +59 -0
  87. package/dist/anti-slop.d.ts.map +1 -0
  88. package/dist/artifact-validator.d.ts +74 -0
  89. package/dist/artifact-validator.d.ts.map +1 -0
  90. package/dist/attestation.d.ts +63 -0
  91. package/dist/attestation.d.ts.map +1 -0
  92. package/dist/attestation.test.d.ts +2 -0
  93. package/dist/attestation.test.d.ts.map +1 -0
  94. package/dist/authenticity/index.d.ts +15 -16
  95. package/dist/authenticity/index.d.ts.map +1 -0
  96. package/dist/authenticity/index.test.d.ts +2 -0
  97. package/dist/authenticity/index.test.d.ts.map +1 -0
  98. package/dist/auto-pr.d.ts +120 -0
  99. package/dist/auto-pr.d.ts.map +1 -0
  100. package/dist/{baseline-Bbid3WoO.d.ts → baseline.d.ts} +8 -44
  101. package/dist/baseline.d.ts.map +1 -0
  102. package/dist/behavior-dsl.d.ts +73 -0
  103. package/dist/behavior-dsl.d.ts.map +1 -0
  104. package/dist/belief-state/calibration.d.ts +10 -0
  105. package/dist/belief-state/calibration.d.ts.map +1 -0
  106. package/dist/belief-state/calibration.test.d.ts +2 -0
  107. package/dist/belief-state/calibration.test.d.ts.map +1 -0
  108. package/dist/belief-state/code-agent-corpus.d.ts +66 -0
  109. package/dist/belief-state/code-agent-corpus.d.ts.map +1 -0
  110. package/dist/belief-state/code-agent-corpus.test.d.ts +2 -0
  111. package/dist/belief-state/code-agent-corpus.test.d.ts.map +1 -0
  112. package/dist/belief-state/code-agent-evidence.d.ts +22 -0
  113. package/dist/belief-state/code-agent-evidence.d.ts.map +1 -0
  114. package/dist/belief-state/code-agent-evidence.test.d.ts +2 -0
  115. package/dist/belief-state/code-agent-evidence.test.d.ts.map +1 -0
  116. package/dist/belief-state/extract.d.ts +7 -0
  117. package/dist/belief-state/extract.d.ts.map +1 -0
  118. package/dist/belief-state/extract.test.d.ts +2 -0
  119. package/dist/belief-state/extract.test.d.ts.map +1 -0
  120. package/dist/belief-state/index.d.ts +14 -604
  121. package/dist/belief-state/index.d.ts.map +1 -0
  122. package/dist/belief-state/ope.d.ts +17 -0
  123. package/dist/belief-state/ope.d.ts.map +1 -0
  124. package/dist/belief-state/ope.test.d.ts +2 -0
  125. package/dist/belief-state/ope.test.d.ts.map +1 -0
  126. package/dist/belief-state/phase0-measurement.d.ts +55 -0
  127. package/dist/belief-state/phase0-measurement.d.ts.map +1 -0
  128. package/dist/belief-state/report.d.ts +17 -0
  129. package/dist/belief-state/report.d.ts.map +1 -0
  130. package/dist/belief-state/report.test.d.ts +2 -0
  131. package/dist/belief-state/report.test.d.ts.map +1 -0
  132. package/dist/belief-state/research-evidence.d.ts +23 -0
  133. package/dist/belief-state/research-evidence.d.ts.map +1 -0
  134. package/dist/belief-state/research-evidence.test.d.ts +2 -0
  135. package/dist/belief-state/research-evidence.test.d.ts.map +1 -0
  136. package/dist/belief-state/runtime-benchmark-corpus.d.ts +32 -0
  137. package/dist/belief-state/runtime-benchmark-corpus.d.ts.map +1 -0
  138. package/dist/belief-state/runtime-hooks.d.ts +87 -0
  139. package/dist/belief-state/runtime-hooks.d.ts.map +1 -0
  140. package/dist/belief-state/runtime-hooks.test.d.ts +2 -0
  141. package/dist/belief-state/runtime-hooks.test.d.ts.map +1 -0
  142. package/dist/belief-state/selective.d.ts +15 -0
  143. package/dist/belief-state/selective.d.ts.map +1 -0
  144. package/dist/belief-state/selective.test.d.ts +2 -0
  145. package/dist/belief-state/selective.test.d.ts.map +1 -0
  146. package/dist/belief-state/shadow-probe.d.ts +80 -0
  147. package/dist/belief-state/shadow-probe.d.ts.map +1 -0
  148. package/dist/belief-state/shadow-probe.test.d.ts +2 -0
  149. package/dist/belief-state/shadow-probe.test.d.ts.map +1 -0
  150. package/dist/belief-state/types.d.ts +195 -0
  151. package/dist/belief-state/types.d.ts.map +1 -0
  152. package/dist/belief-state/types.test.d.ts +2 -0
  153. package/dist/belief-state/types.test.d.ts.map +1 -0
  154. package/dist/benchmark.d.ts +14 -0
  155. package/dist/benchmark.d.ts.map +1 -0
  156. package/dist/benchmarks/index.d.ts +23 -4
  157. package/dist/benchmarks/index.d.ts.map +1 -0
  158. package/dist/benchmarks/routing/dataset.d.ts +34 -0
  159. package/dist/benchmarks/routing/dataset.d.ts.map +1 -0
  160. package/dist/benchmarks/routing/index.d.ts +34 -0
  161. package/dist/benchmarks/routing/index.d.ts.map +1 -0
  162. package/dist/benchmarks/types.d.ts +49 -0
  163. package/dist/benchmarks/types.d.ts.map +1 -0
  164. package/dist/bisector.d.ts +81 -0
  165. package/dist/bisector.d.ts.map +1 -0
  166. package/dist/budget-guard.d.ts +31 -0
  167. package/dist/budget-guard.d.ts.map +1 -0
  168. package/dist/builder-eval/builder-session.d.ts +111 -0
  169. package/dist/builder-eval/builder-session.d.ts.map +1 -0
  170. package/dist/builder-eval/correlation.d.ts +32 -0
  171. package/dist/builder-eval/correlation.d.ts.map +1 -0
  172. package/dist/builder-eval/index.d.ts +5 -250
  173. package/dist/builder-eval/index.d.ts.map +1 -0
  174. package/dist/builder-eval/project-registry.d.ts +51 -0
  175. package/dist/builder-eval/project-registry.d.ts.map +1 -0
  176. package/dist/builder-eval/three-layer-eval.d.ts +55 -0
  177. package/dist/builder-eval/three-layer-eval.d.ts.map +1 -0
  178. package/dist/campaign/analyst-surface.d.ts +108 -0
  179. package/dist/campaign/analyst-surface.d.ts.map +1 -0
  180. package/dist/campaign/analyst-surface.test.d.ts +2 -0
  181. package/dist/campaign/analyst-surface.test.d.ts.map +1 -0
  182. package/dist/campaign/auto-pr.d.ts +46 -0
  183. package/dist/campaign/auto-pr.d.ts.map +1 -0
  184. package/dist/campaign/distillation/agreement-judge.d.ts +69 -0
  185. package/dist/campaign/distillation/agreement-judge.d.ts.map +1 -0
  186. package/dist/campaign/distillation/cli.d.ts +35 -0
  187. package/dist/campaign/distillation/cli.d.ts.map +1 -0
  188. package/dist/campaign/distillation/distillation.test.d.ts +2 -0
  189. package/dist/campaign/distillation/distillation.test.d.ts.map +1 -0
  190. package/dist/campaign/distillation/gold-scenarios.d.ts +54 -0
  191. package/dist/campaign/distillation/gold-scenarios.d.ts.map +1 -0
  192. package/dist/campaign/distillation/run-distillation.d.ts +119 -0
  193. package/dist/campaign/distillation/run-distillation.d.ts.map +1 -0
  194. package/dist/campaign/gates/compose.d.ts +12 -0
  195. package/dist/campaign/gates/compose.d.ts.map +1 -0
  196. package/dist/campaign/gates/default-production-gate.d.ts +58 -0
  197. package/dist/campaign/gates/default-production-gate.d.ts.map +1 -0
  198. package/dist/campaign/gates/heldout-gate.d.ts +12 -0
  199. package/dist/campaign/gates/heldout-gate.d.ts.map +1 -0
  200. package/dist/campaign/gates/promotion-policy.d.ts +125 -0
  201. package/dist/campaign/gates/promotion-policy.d.ts.map +1 -0
  202. package/dist/campaign/gates/promotion-policy.test.d.ts +2 -0
  203. package/dist/campaign/gates/promotion-policy.test.d.ts.map +1 -0
  204. package/dist/campaign/gates/sequential.d.ts +146 -0
  205. package/dist/campaign/gates/sequential.d.ts.map +1 -0
  206. package/dist/campaign/gates/sequential.test.d.ts +2 -0
  207. package/dist/campaign/gates/sequential.test.d.ts.map +1 -0
  208. package/dist/campaign/gates/statistical-heldout.d.ts +99 -0
  209. package/dist/campaign/gates/statistical-heldout.d.ts.map +1 -0
  210. package/dist/campaign/gates/statistical-heldout.test.d.ts +2 -0
  211. package/dist/campaign/gates/statistical-heldout.test.d.ts.map +1 -0
  212. package/dist/campaign/index.d.ts +38 -1341
  213. package/dist/campaign/index.d.ts.map +1 -0
  214. package/dist/campaign/index.js +1863 -1316
  215. package/dist/campaign/index.js.map +1 -1
  216. package/dist/campaign/labeled-store/fs-adapter.d.ts +59 -0
  217. package/dist/campaign/labeled-store/fs-adapter.d.ts.map +1 -0
  218. package/dist/campaign/presets/compare-proposers.d.ts +146 -0
  219. package/dist/campaign/presets/compare-proposers.d.ts.map +1 -0
  220. package/dist/campaign/presets/playback.d.ts +120 -0
  221. package/dist/campaign/presets/playback.d.ts.map +1 -0
  222. package/dist/campaign/presets/playback.test.d.ts +2 -0
  223. package/dist/campaign/presets/playback.test.d.ts.map +1 -0
  224. package/dist/campaign/presets/run-eval.d.ts +14 -0
  225. package/dist/campaign/presets/run-eval.d.ts.map +1 -0
  226. package/dist/campaign/presets/run-improvement-loop.d.ts +63 -0
  227. package/dist/campaign/presets/run-improvement-loop.d.ts.map +1 -0
  228. package/dist/campaign/presets/run-improvement-loop.test.d.ts +2 -0
  229. package/dist/campaign/presets/run-improvement-loop.test.d.ts.map +1 -0
  230. package/dist/campaign/presets/run-optimization.d.ts +92 -0
  231. package/dist/campaign/presets/run-optimization.d.ts.map +1 -0
  232. package/dist/campaign/presets/run-profile-matrix.d.ts +151 -0
  233. package/dist/campaign/presets/run-profile-matrix.d.ts.map +1 -0
  234. package/dist/campaign/presets/run-skill-opt.d.ts +96 -0
  235. package/dist/campaign/presets/run-skill-opt.d.ts.map +1 -0
  236. package/dist/campaign/proposers/_findings-text.d.ts +22 -0
  237. package/dist/campaign/proposers/_findings-text.d.ts.map +1 -0
  238. package/dist/campaign/proposers/ace.d.ts +33 -0
  239. package/dist/campaign/proposers/ace.d.ts.map +1 -0
  240. package/dist/campaign/proposers/ace.test.d.ts +2 -0
  241. package/dist/campaign/proposers/ace.test.d.ts.map +1 -0
  242. package/dist/campaign/proposers/analysis-edit.d.ts +32 -0
  243. package/dist/campaign/proposers/analysis-edit.d.ts.map +1 -0
  244. package/dist/campaign/proposers/evolutionary.d.ts +20 -0
  245. package/dist/campaign/proposers/evolutionary.d.ts.map +1 -0
  246. package/dist/campaign/proposers/fapo.d.ts +120 -0
  247. package/dist/campaign/proposers/fapo.d.ts.map +1 -0
  248. package/dist/campaign/proposers/gepa.d.ts +86 -0
  249. package/dist/campaign/proposers/gepa.d.ts.map +1 -0
  250. package/dist/campaign/proposers/halo.d.ts +44 -0
  251. package/dist/campaign/proposers/halo.d.ts.map +1 -0
  252. package/dist/campaign/proposers/halo.test.d.ts +2 -0
  253. package/dist/campaign/proposers/halo.test.d.ts.map +1 -0
  254. package/dist/campaign/proposers/memory.d.ts +47 -0
  255. package/dist/campaign/proposers/memory.d.ts.map +1 -0
  256. package/dist/campaign/proposers/memory.test.d.ts +2 -0
  257. package/dist/campaign/proposers/memory.test.d.ts.map +1 -0
  258. package/dist/campaign/proposers/skill-opt.d.ts +88 -0
  259. package/dist/campaign/proposers/skill-opt.d.ts.map +1 -0
  260. package/dist/campaign/proposers/trace-analyst.d.ts +48 -0
  261. package/dist/campaign/proposers/trace-analyst.d.ts.map +1 -0
  262. package/dist/campaign/proposers/trace-analyst.test.d.ts +2 -0
  263. package/dist/campaign/proposers/trace-analyst.test.d.ts.map +1 -0
  264. package/dist/campaign/provenance.d.ts +185 -0
  265. package/dist/campaign/provenance.d.ts.map +1 -0
  266. package/dist/campaign/run-campaign.d.ts +90 -0
  267. package/dist/campaign/run-campaign.d.ts.map +1 -0
  268. package/dist/campaign/score-utils.d.ts +26 -0
  269. package/dist/campaign/score-utils.d.ts.map +1 -0
  270. package/dist/campaign/skill-patch.d.ts +62 -0
  271. package/dist/campaign/skill-patch.d.ts.map +1 -0
  272. package/dist/campaign/storage.d.ts +38 -0
  273. package/dist/campaign/storage.d.ts.map +1 -0
  274. package/dist/{types-BU-7W85F.d.ts → campaign/types.d.ts} +98 -99
  275. package/dist/campaign/types.d.ts.map +1 -0
  276. package/dist/campaign/worktree/index.d.ts +53 -0
  277. package/dist/campaign/worktree/index.d.ts.map +1 -0
  278. package/dist/canary.d.ts +101 -0
  279. package/dist/canary.d.ts.map +1 -0
  280. package/dist/causal-attribution.d.ts +45 -0
  281. package/dist/causal-attribution.d.ts.map +1 -0
  282. package/dist/{chunk-2K6UUZ7P.js → chunk-2T4EZACH.js} +1 -1
  283. package/dist/chunk-2T4EZACH.js.map +1 -0
  284. package/dist/{chunk-CTBHKLEU.js → chunk-77T4STFI.js} +59 -86
  285. package/dist/chunk-77T4STFI.js.map +1 -0
  286. package/dist/{chunk-EGPMSBEZ.js → chunk-7QTQKIDD.js} +178 -177
  287. package/dist/chunk-7QTQKIDD.js.map +1 -0
  288. package/dist/{chunk-MIFZUPEK.js → chunk-AQ5WQAIV.js} +21 -6
  289. package/dist/chunk-AQ5WQAIV.js.map +1 -0
  290. package/dist/chunk-DJWX3GVS.js +81 -0
  291. package/dist/chunk-DJWX3GVS.js.map +1 -0
  292. package/dist/{chunk-S6OZEZQK.js → chunk-HMA63UEO.js} +37 -9
  293. package/dist/{chunk-S6OZEZQK.js.map → chunk-HMA63UEO.js.map} +1 -1
  294. package/dist/{chunk-TBDR6PAI.js → chunk-IZCEK2HR.js} +2 -2
  295. package/dist/{chunk-SD2YFWQQ.js → chunk-KKWJD5E6.js} +20 -20
  296. package/dist/chunk-KKWJD5E6.js.map +1 -0
  297. package/dist/{chunk-KWRRMR3J.js → chunk-LO6IOIJ2.js} +10 -10
  298. package/dist/chunk-LO6IOIJ2.js.map +1 -0
  299. package/dist/{chunk-E4GH6USR.js → chunk-NZEQVRH5.js} +2 -2
  300. package/dist/chunk-NZEQVRH5.js.map +1 -0
  301. package/dist/{chunk-MPQWFX6Y.js → chunk-PSWWQXHF.js} +13 -88
  302. package/dist/chunk-PSWWQXHF.js.map +1 -0
  303. package/dist/{chunk-Q5LIB7BC.js → chunk-S4SYLDFX.js} +2 -2
  304. package/dist/chunk-S4SYLDFX.js.map +1 -0
  305. package/dist/{chunk-KW53MSA5.js → chunk-X74V6ESX.js} +2 -2
  306. package/dist/{chunk-QMUEXQJS.js → chunk-YBIGNSCZ.js} +81 -4
  307. package/dist/chunk-YBIGNSCZ.js.map +1 -0
  308. package/dist/{chunk-2KNZHH3P.js → chunk-Z6L6YSU6.js} +2 -2
  309. package/dist/ci-gate.d.ts +44 -0
  310. package/dist/ci-gate.d.ts.map +1 -0
  311. package/dist/cli.d.ts +2 -0
  312. package/dist/cli.d.ts.map +1 -0
  313. package/dist/client.d.ts +77 -0
  314. package/dist/client.d.ts.map +1 -0
  315. package/dist/client.test.d.ts +2 -0
  316. package/dist/client.test.d.ts.map +1 -0
  317. package/dist/command-runner.d.ts +74 -0
  318. package/dist/command-runner.d.ts.map +1 -0
  319. package/dist/command-runner.test.d.ts +2 -0
  320. package/dist/command-runner.test.d.ts.map +1 -0
  321. package/dist/completion-verifier.d.ts +147 -0
  322. package/dist/completion-verifier.d.ts.map +1 -0
  323. package/dist/completion-verifier.test.d.ts +9 -0
  324. package/dist/completion-verifier.test.d.ts.map +1 -0
  325. package/dist/concurrency.d.ts +23 -0
  326. package/dist/concurrency.d.ts.map +1 -0
  327. package/dist/contamination-guard.d.ts +81 -0
  328. package/dist/contamination-guard.d.ts.map +1 -0
  329. package/dist/{analyze-runs-B6Ljo_dI.d.ts → contract/analyze-runs.d.ts} +9 -10
  330. package/dist/contract/analyze-runs.d.ts.map +1 -0
  331. package/dist/contract/define-agent-eval.d.ts +52 -0
  332. package/dist/contract/define-agent-eval.d.ts.map +1 -0
  333. package/dist/contract/diff.d.ts +114 -0
  334. package/dist/contract/diff.d.ts.map +1 -0
  335. package/dist/contract/index.d.ts +106 -640
  336. package/dist/contract/index.d.ts.map +1 -0
  337. package/dist/contract/index.js +127 -17
  338. package/dist/contract/index.js.map +1 -1
  339. package/dist/{insight-report-DWl3z9tl.d.ts → contract/insight-report.d.ts} +16 -19
  340. package/dist/contract/insight-report.d.ts.map +1 -0
  341. package/dist/contract/insight-types-fwd.d.ts +7 -0
  342. package/dist/contract/insight-types-fwd.d.ts.map +1 -0
  343. package/dist/contract/intake/agent-trace.d.ts +97 -0
  344. package/dist/contract/intake/agent-trace.d.ts.map +1 -0
  345. package/dist/{code-agent-session-BO8nCnv3.d.ts → contract/intake/code-agent-session.d.ts} +15 -17
  346. package/dist/contract/intake/code-agent-session.d.ts.map +1 -0
  347. package/dist/contract/intake/feedback-table.d.ts +87 -0
  348. package/dist/contract/intake/feedback-table.d.ts.map +1 -0
  349. package/dist/contract/intake/index.d.ts +22 -0
  350. package/dist/contract/intake/index.d.ts.map +1 -0
  351. package/dist/contract/intake/otel-spans.d.ts +33 -0
  352. package/dist/contract/intake/otel-spans.d.ts.map +1 -0
  353. package/dist/contract/self-improve.d.ts +284 -0
  354. package/dist/contract/self-improve.d.ts.map +1 -0
  355. package/dist/{control-runtime-Acf9CGhw.d.ts → control-runtime.d.ts} +23 -26
  356. package/dist/control-runtime.d.ts.map +1 -0
  357. package/dist/control-runtime.test.d.ts +2 -0
  358. package/dist/control-runtime.test.d.ts.map +1 -0
  359. package/dist/control.d.ts +11 -9
  360. package/dist/control.d.ts.map +1 -0
  361. package/dist/control.js +2 -2
  362. package/dist/convergence.d.ts +29 -0
  363. package/dist/convergence.d.ts.map +1 -0
  364. package/dist/{cost-ledger-DuSqlw5B.d.ts → cost-ledger.d.ts} +10 -11
  365. package/dist/cost-ledger.d.ts.map +1 -0
  366. package/dist/cost-ledger.test.d.ts +2 -0
  367. package/dist/cost-ledger.test.d.ts.map +1 -0
  368. package/dist/cost-report.d.ts +43 -0
  369. package/dist/cost-report.d.ts.map +1 -0
  370. package/dist/cost-report.test.d.ts +2 -0
  371. package/dist/cost-report.test.d.ts.map +1 -0
  372. package/dist/cost-tracker.d.ts +76 -0
  373. package/dist/cost-tracker.d.ts.map +1 -0
  374. package/dist/{counterfactual-DlOz8PBx.d.ts → counterfactual.d.ts} +12 -13
  375. package/dist/counterfactual.d.ts.map +1 -0
  376. package/dist/cross-trace-diff.d.ts +56 -0
  377. package/dist/cross-trace-diff.d.ts.map +1 -0
  378. package/dist/{dataset-BbGkaN2I.d.ts → dataset.d.ts} +11 -14
  379. package/dist/dataset.d.ts.map +1 -0
  380. package/dist/deploy-gate-layer.d.ts +125 -0
  381. package/dist/deploy-gate-layer.d.ts.map +1 -0
  382. package/dist/deploy-gate-layer.test.d.ts +2 -0
  383. package/dist/deploy-gate-layer.test.d.ts.map +1 -0
  384. package/dist/description-length-gate.d.ts +119 -0
  385. package/dist/description-length-gate.d.ts.map +1 -0
  386. package/dist/detectors/edge.test.d.ts +2 -0
  387. package/dist/detectors/edge.test.d.ts.map +1 -0
  388. package/dist/detectors/index.d.ts +81 -0
  389. package/dist/detectors/index.d.ts.map +1 -0
  390. package/dist/detectors/index.test.d.ts +2 -0
  391. package/dist/detectors/index.test.d.ts.map +1 -0
  392. package/dist/diagnose/causal-sweep.d.ts +100 -0
  393. package/dist/diagnose/causal-sweep.d.ts.map +1 -0
  394. package/dist/diagnose/index.d.ts +36 -0
  395. package/dist/diagnose/index.d.ts.map +1 -0
  396. package/dist/diagnose/remediation.d.ts +68 -0
  397. package/dist/diagnose/remediation.d.ts.map +1 -0
  398. package/dist/diagnose/repair.d.ts +77 -0
  399. package/dist/diagnose/repair.d.ts.map +1 -0
  400. package/dist/diagnose.d.ts +1 -251
  401. package/dist/diagnose.js +1 -1
  402. package/dist/discover-personas.d.ts +35 -0
  403. package/dist/discover-personas.d.ts.map +1 -0
  404. package/dist/driver.d.ts +95 -0
  405. package/dist/driver.d.ts.map +1 -0
  406. package/dist/driver.test.d.ts +8 -0
  407. package/dist/driver.test.d.ts.map +1 -0
  408. package/dist/dual-agent-bench.d.ts +81 -0
  409. package/dist/dual-agent-bench.d.ts.map +1 -0
  410. package/dist/error-count-extractor.d.ts +47 -0
  411. package/dist/error-count-extractor.d.ts.map +1 -0
  412. package/dist/error-count-extractor.test.d.ts +2 -0
  413. package/dist/error-count-extractor.test.d.ts.map +1 -0
  414. package/dist/{errors-CzMUYo7b.d.ts → errors.d.ts} +10 -11
  415. package/dist/errors.d.ts.map +1 -0
  416. package/dist/{researcher-B0C2_fVO.d.ts → eval-campaign.d.ts} +34 -156
  417. package/dist/eval-campaign.d.ts.map +1 -0
  418. package/dist/eval-campaign.test.d.ts +2 -0
  419. package/dist/eval-campaign.test.d.ts.map +1 -0
  420. package/dist/eval-tools.d.ts +55 -0
  421. package/dist/eval-tools.d.ts.map +1 -0
  422. package/dist/eval-trace-store.d.ts +107 -0
  423. package/dist/eval-trace-store.d.ts.map +1 -0
  424. package/dist/eval-trace-store.test.d.ts +2 -0
  425. package/dist/eval-trace-store.test.d.ts.map +1 -0
  426. package/dist/executor.d.ts +38 -0
  427. package/dist/executor.d.ts.map +1 -0
  428. package/dist/executor.test.d.ts +10 -0
  429. package/dist/executor.test.d.ts.map +1 -0
  430. package/dist/experiment-tracker.d.ts +178 -0
  431. package/dist/experiment-tracker.d.ts.map +1 -0
  432. package/dist/experiment-tracker.test.d.ts +2 -0
  433. package/dist/experiment-tracker.test.d.ts.map +1 -0
  434. package/dist/failure-taxonomy.d.ts +38 -0
  435. package/dist/failure-taxonomy.d.ts.map +1 -0
  436. package/dist/{feedback-trajectory-BxY0cKfs.d.ts → feedback-trajectory.d.ts} +36 -38
  437. package/dist/feedback-trajectory.d.ts.map +1 -0
  438. package/dist/feedback-trajectory.test.d.ts +2 -0
  439. package/dist/feedback-trajectory.test.d.ts.map +1 -0
  440. package/dist/flow-layer.d.ts +90 -0
  441. package/dist/flow-layer.d.ts.map +1 -0
  442. package/dist/flow-layer.test.d.ts +2 -0
  443. package/dist/flow-layer.test.d.ts.map +1 -0
  444. package/dist/fuzz/capsule.d.ts +46 -0
  445. package/dist/fuzz/capsule.d.ts.map +1 -0
  446. package/dist/fuzz/cube.d.ts +36 -0
  447. package/dist/fuzz/cube.d.ts.map +1 -0
  448. package/dist/fuzz/explorer-cost.test.d.ts +2 -0
  449. package/dist/fuzz/explorer-cost.test.d.ts.map +1 -0
  450. package/dist/fuzz/explorer.d.ts +64 -0
  451. package/dist/fuzz/explorer.d.ts.map +1 -0
  452. package/dist/fuzz/fuzz-agent.d.ts +16 -0
  453. package/dist/fuzz/fuzz-agent.d.ts.map +1 -0
  454. package/dist/fuzz/fuzz-agent.test.d.ts +2 -0
  455. package/dist/fuzz/fuzz-agent.test.d.ts.map +1 -0
  456. package/dist/fuzz/gates.d.ts +33 -0
  457. package/dist/fuzz/gates.d.ts.map +1 -0
  458. package/dist/fuzz/index.d.ts +26 -0
  459. package/dist/fuzz/index.d.ts.map +1 -0
  460. package/dist/fuzz/policies.d.ts +28 -0
  461. package/dist/fuzz/policies.d.ts.map +1 -0
  462. package/dist/fuzz/tools.d.ts +20 -0
  463. package/dist/fuzz/tools.d.ts.map +1 -0
  464. package/dist/fuzz/types.d.ts +307 -0
  465. package/dist/fuzz/types.d.ts.map +1 -0
  466. package/dist/fuzz.d.ts +1 -547
  467. package/dist/golden-matcher.d.ts +71 -0
  468. package/dist/golden-matcher.d.ts.map +1 -0
  469. package/dist/governance/eu-ai-act.d.ts +37 -0
  470. package/dist/governance/eu-ai-act.d.ts.map +1 -0
  471. package/dist/governance/index.d.ts +5 -135
  472. package/dist/governance/index.d.ts.map +1 -0
  473. package/dist/governance/nist-ai-rmf.d.ts +15 -0
  474. package/dist/governance/nist-ai-rmf.d.ts.map +1 -0
  475. package/dist/governance/soc2.d.ts +12 -0
  476. package/dist/governance/soc2.d.ts.map +1 -0
  477. package/dist/governance/types.d.ts +66 -0
  478. package/dist/governance/types.d.ts.map +1 -0
  479. package/dist/harness-optimizer.d.ts +82 -0
  480. package/dist/harness-optimizer.d.ts.map +1 -0
  481. package/dist/held-out-gate.d.ts +135 -0
  482. package/dist/held-out-gate.d.ts.map +1 -0
  483. package/dist/hosted/client.d.ts +73 -0
  484. package/dist/hosted/client.d.ts.map +1 -0
  485. package/dist/hosted/from-env.test.d.ts +8 -0
  486. package/dist/hosted/from-env.test.d.ts.map +1 -0
  487. package/dist/hosted/index.d.ts +10 -238
  488. package/dist/hosted/index.d.ts.map +1 -0
  489. package/dist/hosted/types.d.ts +159 -0
  490. package/dist/hosted/types.d.ts.map +1 -0
  491. package/dist/index.d.ts +277 -5665
  492. package/dist/index.d.ts.map +1 -0
  493. package/dist/index.js +66 -31
  494. package/dist/index.js.map +1 -1
  495. package/dist/integrity/backend-integrity.d.ts +71 -0
  496. package/dist/integrity/backend-integrity.d.ts.map +1 -0
  497. package/dist/integrity/preflight.d.ts +72 -0
  498. package/dist/integrity/preflight.d.ts.map +1 -0
  499. package/dist/integrity/preflight.test.d.ts +2 -0
  500. package/dist/integrity/preflight.test.d.ts.map +1 -0
  501. package/dist/integrity/single-backend.d.ts +67 -0
  502. package/dist/integrity/single-backend.d.ts.map +1 -0
  503. package/dist/intent-match-judge.d.ts +69 -0
  504. package/dist/intent-match-judge.d.ts.map +1 -0
  505. package/dist/intent-match-judge.test.d.ts +2 -0
  506. package/dist/intent-match-judge.test.d.ts.map +1 -0
  507. package/dist/{judge-calibration-0p2QcWNE.d.ts → judge-calibration.d.ts} +16 -17
  508. package/dist/judge-calibration.d.ts.map +1 -0
  509. package/dist/judge-ensemble.d.ts +66 -0
  510. package/dist/judge-ensemble.d.ts.map +1 -0
  511. package/dist/judge-ensemble.test.d.ts +8 -0
  512. package/dist/judge-ensemble.test.d.ts.map +1 -0
  513. package/dist/judge-families.d.ts +38 -0
  514. package/dist/judge-families.d.ts.map +1 -0
  515. package/dist/judge-panel.d.ts +65 -0
  516. package/dist/judge-panel.d.ts.map +1 -0
  517. package/dist/judge-retry.d.ts +70 -0
  518. package/dist/judge-retry.d.ts.map +1 -0
  519. package/dist/judge-runner.d.ts +36 -0
  520. package/dist/judge-runner.d.ts.map +1 -0
  521. package/dist/judge-runner.test.d.ts +2 -0
  522. package/dist/judge-runner.test.d.ts.map +1 -0
  523. package/dist/judges.d.ts +74 -0
  524. package/dist/judges.d.ts.map +1 -0
  525. package/dist/keyword-coverage-judge.d.ts +89 -0
  526. package/dist/keyword-coverage-judge.d.ts.map +1 -0
  527. package/dist/keyword-coverage-judge.test.d.ts +2 -0
  528. package/dist/keyword-coverage-judge.test.d.ts.map +1 -0
  529. package/dist/knowledge/index.d.ts +3 -103
  530. package/dist/knowledge/index.d.ts.map +1 -0
  531. package/dist/knowledge/readiness.d.ts +26 -0
  532. package/dist/knowledge/readiness.d.ts.map +1 -0
  533. package/dist/knowledge/types.d.ts +75 -0
  534. package/dist/knowledge/types.d.ts.map +1 -0
  535. package/dist/live-proof.d.ts +62 -0
  536. package/dist/live-proof.d.ts.map +1 -0
  537. package/dist/{llm-client-Bj7g0rqu.d.ts → llm-client.d.ts} +21 -23
  538. package/dist/llm-client.d.ts.map +1 -0
  539. package/dist/llm-client.test.d.ts +2 -0
  540. package/dist/llm-client.test.d.ts.map +1 -0
  541. package/dist/locked-jsonl-appender.d.ts +19 -0
  542. package/dist/locked-jsonl-appender.d.ts.map +1 -0
  543. package/dist/matrix/aggregation.d.ts +16 -0
  544. package/dist/matrix/aggregation.d.ts.map +1 -0
  545. package/dist/matrix/index.d.ts +12 -30
  546. package/dist/matrix/index.d.ts.map +1 -0
  547. package/dist/matrix/runner.d.ts +15 -0
  548. package/dist/matrix/runner.d.ts.map +1 -0
  549. package/dist/{types-mn5Aqk7x.d.ts → matrix/types.d.ts} +11 -15
  550. package/dist/matrix/types.d.ts.map +1 -0
  551. package/dist/meta-eval/calibration.d.ts +47 -0
  552. package/dist/meta-eval/calibration.d.ts.map +1 -0
  553. package/dist/meta-eval/correlation-study.d.ts +53 -0
  554. package/dist/meta-eval/correlation-study.d.ts.map +1 -0
  555. package/dist/meta-eval/index.d.ts +6 -181
  556. package/dist/meta-eval/index.d.ts.map +1 -0
  557. package/dist/{outcome-store-rnXLEqSn.d.ts → meta-eval/outcome-store.d.ts} +7 -8
  558. package/dist/meta-eval/outcome-store.d.ts.map +1 -0
  559. package/dist/{rubric-predictive-validity-Cy_W-hWZ.d.ts → meta-eval/rubric-predictive-validity.d.ts} +8 -11
  560. package/dist/meta-eval/rubric-predictive-validity.d.ts.map +1 -0
  561. package/dist/meta-eval/sentinel.d.ts +169 -0
  562. package/dist/meta-eval/sentinel.d.ts.map +1 -0
  563. package/dist/metrics.d.ts +63 -0
  564. package/dist/metrics.d.ts.map +1 -0
  565. package/dist/model-seats.d.ts +71 -0
  566. package/dist/model-seats.d.ts.map +1 -0
  567. package/dist/model-seats.test.d.ts +2 -0
  568. package/dist/model-seats.test.d.ts.map +1 -0
  569. package/dist/muffled-gate-scanner.d.ts +102 -0
  570. package/dist/muffled-gate-scanner.d.ts.map +1 -0
  571. package/dist/{multi-layer-verifier-DUZXrPDA.d.ts → multi-layer-verifier.d.ts} +12 -15
  572. package/dist/multi-layer-verifier.d.ts.map +1 -0
  573. package/dist/multi-layer-verifier.test.d.ts +2 -0
  574. package/dist/multi-layer-verifier.test.d.ts.map +1 -0
  575. package/dist/multi-toolchain-layer.d.ts +80 -0
  576. package/dist/multi-toolchain-layer.d.ts.map +1 -0
  577. package/dist/multi-toolchain-layer.test.d.ts +2 -0
  578. package/dist/multi-toolchain-layer.test.d.ts.map +1 -0
  579. package/dist/multishot/default-tools.d.ts +34 -0
  580. package/dist/multishot/default-tools.d.ts.map +1 -0
  581. package/dist/multishot/index.d.ts +7 -290
  582. package/dist/multishot/index.d.ts.map +1 -0
  583. package/dist/multishot/index.js.map +1 -1
  584. package/dist/multishot/judges.d.ts +32 -0
  585. package/dist/multishot/judges.d.ts.map +1 -0
  586. package/dist/multishot/matrix.d.ts +107 -0
  587. package/dist/multishot/matrix.d.ts.map +1 -0
  588. package/dist/multishot/multishot.d.ts +23 -0
  589. package/dist/multishot/multishot.d.ts.map +1 -0
  590. package/dist/multishot/router.d.ts +37 -0
  591. package/dist/multishot/router.d.ts.map +1 -0
  592. package/dist/multishot/types.d.ts +60 -0
  593. package/dist/multishot/types.d.ts.map +1 -0
  594. package/dist/observability.d.ts +71 -0
  595. package/dist/observability.d.ts.map +1 -0
  596. package/dist/openapi.json +1 -1
  597. package/dist/oracle.d.ts +55 -0
  598. package/dist/oracle.d.ts.map +1 -0
  599. package/dist/orthogonality.d.ts +35 -0
  600. package/dist/orthogonality.d.ts.map +1 -0
  601. package/dist/otel-pipeline.d.ts +31 -0
  602. package/dist/otel-pipeline.d.ts.map +1 -0
  603. package/dist/paraphrase.d.ts +107 -0
  604. package/dist/paraphrase.d.ts.map +1 -0
  605. package/dist/{pareto-E-pembql.d.ts → pareto.d.ts} +9 -10
  606. package/dist/pareto.d.ts.map +1 -0
  607. package/dist/partition-held-out.d.ts +70 -0
  608. package/dist/partition-held-out.d.ts.map +1 -0
  609. package/dist/partition-held-out.test.d.ts +2 -0
  610. package/dist/partition-held-out.test.d.ts.map +1 -0
  611. package/dist/perf/index.d.ts +13 -119
  612. package/dist/perf/index.d.ts.map +1 -0
  613. package/dist/perf/integrity.d.ts +30 -0
  614. package/dist/perf/integrity.d.ts.map +1 -0
  615. package/dist/perf/journey.d.ts +45 -0
  616. package/dist/perf/journey.d.ts.map +1 -0
  617. package/dist/perf/ratchet.d.ts +47 -0
  618. package/dist/perf/ratchet.d.ts.map +1 -0
  619. package/dist/pipelines/budget-breach.d.ts +31 -0
  620. package/dist/pipelines/budget-breach.d.ts.map +1 -0
  621. package/dist/pipelines/budget-breach.test.d.ts +2 -0
  622. package/dist/pipelines/budget-breach.test.d.ts.map +1 -0
  623. package/dist/pipelines/failure-cluster.d.ts +38 -0
  624. package/dist/pipelines/failure-cluster.d.ts.map +1 -0
  625. package/dist/pipelines/failure-cluster.test.d.ts +2 -0
  626. package/dist/pipelines/failure-cluster.test.d.ts.map +1 -0
  627. package/dist/pipelines/first-divergence.d.ts +26 -0
  628. package/dist/pipelines/first-divergence.d.ts.map +1 -0
  629. package/dist/pipelines/first-divergence.test.d.ts +2 -0
  630. package/dist/pipelines/first-divergence.test.d.ts.map +1 -0
  631. package/dist/pipelines/index.d.ts +8 -173
  632. package/dist/pipelines/index.d.ts.map +1 -0
  633. package/dist/pipelines/judge-agreement.d.ts +26 -0
  634. package/dist/pipelines/judge-agreement.d.ts.map +1 -0
  635. package/dist/pipelines/judge-agreement.test.d.ts +2 -0
  636. package/dist/pipelines/judge-agreement.test.d.ts.map +1 -0
  637. package/dist/pipelines/regression.d.ts +23 -0
  638. package/dist/pipelines/regression.d.ts.map +1 -0
  639. package/dist/pipelines/regression.test.d.ts +2 -0
  640. package/dist/pipelines/regression.test.d.ts.map +1 -0
  641. package/dist/pipelines/stuck-loop.d.ts +32 -0
  642. package/dist/pipelines/stuck-loop.d.ts.map +1 -0
  643. package/dist/pipelines/stuck-loop.test.d.ts +2 -0
  644. package/dist/pipelines/stuck-loop.test.d.ts.map +1 -0
  645. package/dist/pipelines/tool-waste.d.ts +34 -0
  646. package/dist/pipelines/tool-waste.d.ts.map +1 -0
  647. package/dist/pipelines/tool-waste.test.d.ts +2 -0
  648. package/dist/pipelines/tool-waste.test.d.ts.map +1 -0
  649. package/dist/playbook.d.ts +16 -0
  650. package/dist/playbook.d.ts.map +1 -0
  651. package/dist/pr-review-benchmark.d.ts +88 -0
  652. package/dist/pr-review-benchmark.d.ts.map +1 -0
  653. package/dist/pr-review-benchmark.test.d.ts +2 -0
  654. package/dist/pr-review-benchmark.test.d.ts.map +1 -0
  655. package/dist/pre-registration.d.ts +125 -0
  656. package/dist/pre-registration.d.ts.map +1 -0
  657. package/dist/prm/builtin-rubrics.d.ts +33 -0
  658. package/dist/prm/builtin-rubrics.d.ts.map +1 -0
  659. package/dist/prm/index.d.ts +5 -104
  660. package/dist/prm/index.d.ts.map +1 -0
  661. package/dist/prm/inference.d.ts +29 -0
  662. package/dist/prm/inference.d.ts.map +1 -0
  663. package/dist/prm/inference.test.d.ts +2 -0
  664. package/dist/prm/inference.test.d.ts.map +1 -0
  665. package/dist/{rubric-Cc6UHvUb.d.ts → prm/rubric.d.ts} +10 -13
  666. package/dist/prm/rubric.d.ts.map +1 -0
  667. package/dist/prm/training-export.d.ts +38 -0
  668. package/dist/prm/training-export.d.ts.map +1 -0
  669. package/dist/produced-state.d.ts +63 -0
  670. package/dist/produced-state.d.ts.map +1 -0
  671. package/dist/produced-state.test.d.ts +8 -0
  672. package/dist/produced-state.test.d.ts.map +1 -0
  673. package/dist/profile/baselines.d.ts +37 -0
  674. package/dist/profile/baselines.d.ts.map +1 -0
  675. package/dist/profile/index.d.ts +105 -0
  676. package/dist/profile/index.d.ts.map +1 -0
  677. package/dist/promotion-gate.d.ts +93 -0
  678. package/dist/promotion-gate.d.ts.map +1 -0
  679. package/dist/prompt-registry.d.ts +41 -0
  680. package/dist/prompt-registry.d.ts.map +1 -0
  681. package/dist/propose-review-control.d.ts +49 -0
  682. package/dist/propose-review-control.d.ts.map +1 -0
  683. package/dist/propose-review-control.test.d.ts +2 -0
  684. package/dist/propose-review-control.test.d.ts.map +1 -0
  685. package/dist/propose-review.d.ts +155 -0
  686. package/dist/propose-review.d.ts.map +1 -0
  687. package/dist/{red-team-BWdoyleI.d.ts → red-team.d.ts} +14 -16
  688. package/dist/red-team.d.ts.map +1 -0
  689. package/dist/reference-replay-steering.d.ts +11 -0
  690. package/dist/reference-replay-steering.d.ts.map +1 -0
  691. package/dist/reference-replay.d.ts +176 -0
  692. package/dist/reference-replay.d.ts.map +1 -0
  693. package/dist/reflective-mutation.d.ts +79 -0
  694. package/dist/reflective-mutation.d.ts.map +1 -0
  695. package/dist/registry.d.ts +31 -0
  696. package/dist/registry.d.ts.map +1 -0
  697. package/dist/release-confidence.d.ts +128 -0
  698. package/dist/release-confidence.d.ts.map +1 -0
  699. package/dist/release-report.d.ts +11 -0
  700. package/dist/release-report.d.ts.map +1 -0
  701. package/dist/replay.d.ts +120 -0
  702. package/dist/replay.d.ts.map +1 -0
  703. package/dist/reporter.d.ts +14 -0
  704. package/dist/reporter.d.ts.map +1 -0
  705. package/dist/reporting.d.ts +15 -15
  706. package/dist/reporting.d.ts.map +1 -0
  707. package/dist/researcher.d.ts +140 -0
  708. package/dist/researcher.d.ts.map +1 -0
  709. package/dist/reviewer.d.ts +118 -0
  710. package/dist/reviewer.d.ts.map +1 -0
  711. package/dist/reviewer.test.d.ts +2 -0
  712. package/dist/reviewer.test.d.ts.map +1 -0
  713. package/dist/reward-model-export.d.ts +60 -0
  714. package/dist/reward-model-export.d.ts.map +1 -0
  715. package/dist/rl/active-curriculum.d.ts +110 -0
  716. package/dist/rl/active-curriculum.d.ts.map +1 -0
  717. package/dist/rl/adaptation-eval.d.ts +109 -0
  718. package/dist/rl/adaptation-eval.d.ts.map +1 -0
  719. package/dist/{adversarial-DIVcDoI_.d.ts → rl/adversarial.d.ts} +6 -7
  720. package/dist/rl/adversarial.d.ts.map +1 -0
  721. package/dist/rl/compute-curves.d.ts +127 -0
  722. package/dist/rl/compute-curves.d.ts.map +1 -0
  723. package/dist/rl/contamination.d.ts +117 -0
  724. package/dist/rl/contamination.d.ts.map +1 -0
  725. package/dist/rl/corpus.d.ts +55 -0
  726. package/dist/rl/corpus.d.ts.map +1 -0
  727. package/dist/rl/corpus.test.d.ts +2 -0
  728. package/dist/rl/corpus.test.d.ts.map +1 -0
  729. package/dist/rl/dataset.d.ts +102 -0
  730. package/dist/rl/dataset.d.ts.map +1 -0
  731. package/dist/rl/dataset.test.d.ts +2 -0
  732. package/dist/rl/dataset.test.d.ts.map +1 -0
  733. package/dist/rl/exporters.d.ts +141 -0
  734. package/dist/rl/exporters.d.ts.map +1 -0
  735. package/dist/rl/index.d.ts +49 -0
  736. package/dist/rl/index.d.ts.map +1 -0
  737. package/dist/{off-policy-DiwuKKg7.d.ts → rl/off-policy.d.ts} +8 -9
  738. package/dist/rl/off-policy.d.ts.map +1 -0
  739. package/dist/rl/predictive-validity-researcher.d.ts +69 -0
  740. package/dist/rl/predictive-validity-researcher.d.ts.map +1 -0
  741. package/dist/rl/preferences.d.ts +141 -0
  742. package/dist/rl/preferences.d.ts.map +1 -0
  743. package/dist/rl/process-reward.d.ts +122 -0
  744. package/dist/rl/process-reward.d.ts.map +1 -0
  745. package/dist/rl/reward-hacking.d.ts +104 -0
  746. package/dist/rl/reward-hacking.d.ts.map +1 -0
  747. package/dist/rl/rl-campaign.d.ts +85 -0
  748. package/dist/rl/rl-campaign.d.ts.map +1 -0
  749. package/dist/rl/run-record-adapters.d.ts +56 -0
  750. package/dist/rl/run-record-adapters.d.ts.map +1 -0
  751. package/dist/rl/sim-fidelity.d.ts +166 -0
  752. package/dist/rl/sim-fidelity.d.ts.map +1 -0
  753. package/dist/rl/sim-fidelity.test.d.ts +2 -0
  754. package/dist/rl/sim-fidelity.test.d.ts.map +1 -0
  755. package/dist/rl/tournament.d.ts +115 -0
  756. package/dist/rl/tournament.d.ts.map +1 -0
  757. package/dist/rl/verifiable-reward.d.ts +124 -0
  758. package/dist/rl/verifiable-reward.d.ts.map +1 -0
  759. package/dist/rl.d.ts +1 -1192
  760. package/dist/rl.js +612 -612
  761. package/dist/rl.js.map +1 -1
  762. package/dist/{run-campaign-7WNXMDSN.js → run-campaign-WXY7KI67.js} +2 -2
  763. package/dist/run-critic.d.ts +23 -0
  764. package/dist/run-critic.d.ts.map +1 -0
  765. package/dist/run-evidence.d.ts +32 -0
  766. package/dist/run-evidence.d.ts.map +1 -0
  767. package/dist/{run-record-e7vj1uZQ.d.ts → run-record.d.ts} +16 -122
  768. package/dist/run-record.d.ts.map +1 -0
  769. package/dist/run-record.test.d.ts +2 -0
  770. package/dist/run-record.test.d.ts.map +1 -0
  771. package/dist/run-score.d.ts +31 -0
  772. package/dist/run-score.d.ts.map +1 -0
  773. package/dist/runtime-trajectory.d.ts +47 -0
  774. package/dist/runtime-trajectory.d.ts.map +1 -0
  775. package/dist/{test-graded-scenario-DeODGLra.d.ts → sandbox-harness.d.ts} +15 -60
  776. package/dist/sandbox-harness.d.ts.map +1 -0
  777. package/dist/sandbox-harness.test.d.ts +2 -0
  778. package/dist/sandbox-harness.test.d.ts.map +1 -0
  779. package/dist/sandbox-pool.d.ts +74 -0
  780. package/dist/sandbox-pool.d.ts.map +1 -0
  781. package/dist/sandbox-pool.test.d.ts +2 -0
  782. package/dist/sandbox-pool.test.d.ts.map +1 -0
  783. package/dist/scorecard.d.ts +133 -0
  784. package/dist/scorecard.d.ts.map +1 -0
  785. package/dist/scorecard.test.d.ts +2 -0
  786. package/dist/scorecard.test.d.ts.map +1 -0
  787. package/dist/self-play.d.ts +69 -0
  788. package/dist/self-play.d.ts.map +1 -0
  789. package/dist/semantic-concept-judge.d.ts +135 -0
  790. package/dist/semantic-concept-judge.d.ts.map +1 -0
  791. package/dist/semantic-concept-judge.test.d.ts +2 -0
  792. package/dist/semantic-concept-judge.test.d.ts.map +1 -0
  793. package/dist/{sequential-5iSVfzl2.d.ts → sequential.d.ts} +9 -10
  794. package/dist/sequential.d.ts.map +1 -0
  795. package/dist/{series-convergence-D5OWMBg6.d.ts → series-convergence.d.ts} +4 -5
  796. package/dist/series-convergence.d.ts.map +1 -0
  797. package/dist/slo.d.ts +48 -0
  798. package/dist/slo.d.ts.map +1 -0
  799. package/dist/state-continuity.d.ts +47 -0
  800. package/dist/state-continuity.d.ts.map +1 -0
  801. package/dist/{statistics-CCJpTGOS.d.ts → statistics.d.ts} +46 -48
  802. package/dist/statistics.d.ts.map +1 -0
  803. package/dist/statistics.test.d.ts +2 -0
  804. package/dist/statistics.test.d.ts.map +1 -0
  805. package/dist/steering-optimizer.d.ts +58 -0
  806. package/dist/steering-optimizer.d.ts.map +1 -0
  807. package/dist/steering.d.ts +24 -0
  808. package/dist/steering.d.ts.map +1 -0
  809. package/dist/storyboard/code-edit.d.ts +64 -0
  810. package/dist/storyboard/code-edit.d.ts.map +1 -0
  811. package/dist/storyboard/code-edit.test.d.ts +2 -0
  812. package/dist/storyboard/code-edit.test.d.ts.map +1 -0
  813. package/dist/storyboard/index.d.ts +16 -81
  814. package/dist/storyboard/index.d.ts.map +1 -0
  815. package/dist/storyboard/index.test.d.ts +2 -0
  816. package/dist/storyboard/index.test.d.ts.map +1 -0
  817. package/dist/{summary-report-BDOFevaT.d.ts → summary-report.d.ts} +23 -160
  818. package/dist/summary-report.d.ts.map +1 -0
  819. package/dist/telemetry/client.d.ts +35 -0
  820. package/dist/telemetry/client.d.ts.map +1 -0
  821. package/dist/telemetry/index.d.ts +17 -35
  822. package/dist/telemetry/index.d.ts.map +1 -0
  823. package/dist/telemetry/schema.d.ts +61 -0
  824. package/dist/telemetry/schema.d.ts.map +1 -0
  825. package/dist/telemetry/sink-fetch.d.ts +39 -0
  826. package/dist/telemetry/sink-fetch.d.ts.map +1 -0
  827. package/dist/telemetry/{file.d.ts → sink-file.d.ts} +5 -7
  828. package/dist/telemetry/sink-file.d.ts.map +1 -0
  829. package/dist/test-graded-scenario.d.ts +42 -0
  830. package/dist/test-graded-scenario.d.ts.map +1 -0
  831. package/dist/testing.d.ts +5 -0
  832. package/dist/testing.d.ts.map +1 -0
  833. package/dist/testing.js +8 -0
  834. package/dist/testing.js.map +1 -0
  835. package/dist/tool-use-metrics.d.ts +35 -0
  836. package/dist/tool-use-metrics.d.ts.map +1 -0
  837. package/dist/trace/capture-fetch.d.ts +48 -0
  838. package/dist/trace/capture-fetch.d.ts.map +1 -0
  839. package/dist/trace/capture-fetch.test.d.ts +2 -0
  840. package/dist/trace/capture-fetch.test.d.ts.map +1 -0
  841. package/dist/{emitter-C2rqGH_l.d.ts → trace/emitter.d.ts} +9 -12
  842. package/dist/trace/emitter.d.ts.map +1 -0
  843. package/dist/trace/extract-usage.d.ts +46 -0
  844. package/dist/trace/extract-usage.d.ts.map +1 -0
  845. package/dist/trace/extract-usage.test.d.ts +2 -0
  846. package/dist/trace/extract-usage.test.d.ts.map +1 -0
  847. package/dist/trace/index.d.ts +15 -0
  848. package/dist/trace/index.d.ts.map +1 -0
  849. package/dist/{integrity-D2t12mMw.d.ts → trace/integrity.d.ts} +11 -14
  850. package/dist/trace/integrity.d.ts.map +1 -0
  851. package/dist/trace/otel-bridge.d.ts +29 -0
  852. package/dist/trace/otel-bridge.d.ts.map +1 -0
  853. package/dist/trace/otel-export.d.ts +52 -0
  854. package/dist/trace/otel-export.d.ts.map +1 -0
  855. package/dist/trace/otel.d.ts +57 -0
  856. package/dist/trace/otel.d.ts.map +1 -0
  857. package/dist/trace/otlp-attributes.d.ts +17 -0
  858. package/dist/trace/otlp-attributes.d.ts.map +1 -0
  859. package/dist/trace/query.d.ts +29 -0
  860. package/dist/trace/query.d.ts.map +1 -0
  861. package/dist/trace/query.test.d.ts +2 -0
  862. package/dist/trace/query.test.d.ts.map +1 -0
  863. package/dist/{raw-provider-sink-C46HDghv.d.ts → trace/raw-provider-sink.d.ts} +13 -14
  864. package/dist/trace/raw-provider-sink.d.ts.map +1 -0
  865. package/dist/{redact-B40YG2M_.d.ts → trace/redact.d.ts} +7 -8
  866. package/dist/trace/redact.d.ts.map +1 -0
  867. package/dist/{schema-m0gsnbt3.d.ts → trace/schema.d.ts} +29 -30
  868. package/dist/trace/schema.d.ts.map +1 -0
  869. package/dist/trace/store-to-otlp.d.ts +72 -0
  870. package/dist/trace/store-to-otlp.d.ts.map +1 -0
  871. package/dist/trace/store-to-otlp.test.d.ts +2 -0
  872. package/dist/trace/store-to-otlp.test.d.ts.map +1 -0
  873. package/dist/{store-BcFXE6LG.d.ts → trace/store.d.ts} +21 -12
  874. package/dist/trace/store.d.ts.map +1 -0
  875. package/dist/trace/store.test.d.ts +2 -0
  876. package/dist/trace/store.test.d.ts.map +1 -0
  877. package/dist/{analyst-C8HHvfJp.d.ts → trace-analyst/analyst.d.ts} +12 -14
  878. package/dist/trace-analyst/analyst.d.ts.map +1 -0
  879. package/dist/trace-analyst/analyst.test.d.ts +2 -0
  880. package/dist/trace-analyst/analyst.test.d.ts.map +1 -0
  881. package/dist/trace-analyst/behavioral-metrics.d.ts +40 -0
  882. package/dist/trace-analyst/behavioral-metrics.d.ts.map +1 -0
  883. package/dist/trace-analyst/behavioral-metrics.test.d.ts +2 -0
  884. package/dist/trace-analyst/behavioral-metrics.test.d.ts.map +1 -0
  885. package/dist/trace-analyst/hook.d.ts +55 -0
  886. package/dist/trace-analyst/hook.d.ts.map +1 -0
  887. package/dist/trace-analyst/index.d.ts +18 -0
  888. package/dist/trace-analyst/index.d.ts.map +1 -0
  889. package/dist/trace-analyst/insights.d.ts +71 -0
  890. package/dist/trace-analyst/insights.d.ts.map +1 -0
  891. package/dist/trace-analyst/insights.test.d.ts +2 -0
  892. package/dist/trace-analyst/insights.test.d.ts.map +1 -0
  893. package/dist/trace-analyst/otlp-flatten.d.ts +42 -0
  894. package/dist/trace-analyst/otlp-flatten.d.ts.map +1 -0
  895. package/dist/trace-analyst/otlp-span.d.ts +85 -0
  896. package/dist/trace-analyst/otlp-span.d.ts.map +1 -0
  897. package/dist/trace-analyst/otlp-span.test.d.ts +2 -0
  898. package/dist/trace-analyst/otlp-span.test.d.ts.map +1 -0
  899. package/dist/trace-analyst/otlp-to-run-records.d.ts +115 -0
  900. package/dist/trace-analyst/otlp-to-run-records.d.ts.map +1 -0
  901. package/dist/trace-analyst/otlp-to-run-records.test.d.ts +2 -0
  902. package/dist/trace-analyst/otlp-to-run-records.test.d.ts.map +1 -0
  903. package/dist/trace-analyst/otlp-to-run-records.timestamps.test.d.ts +2 -0
  904. package/dist/trace-analyst/otlp-to-run-records.timestamps.test.d.ts.map +1 -0
  905. package/dist/trace-analyst/prompts.d.ts +6 -0
  906. package/dist/trace-analyst/prompts.d.ts.map +1 -0
  907. package/dist/trace-analyst/store-otlp.d.ts +126 -0
  908. package/dist/trace-analyst/store-otlp.d.ts.map +1 -0
  909. package/dist/trace-analyst/store-otlp.test.d.ts +8 -0
  910. package/dist/trace-analyst/store-otlp.test.d.ts.map +1 -0
  911. package/dist/trace-analyst/store-otlp.timestamps.test.d.ts +2 -0
  912. package/dist/trace-analyst/store-otlp.timestamps.test.d.ts.map +1 -0
  913. package/dist/trace-analyst/store.d.ts +63 -0
  914. package/dist/trace-analyst/store.d.ts.map +1 -0
  915. package/dist/trace-analyst/tools.d.ts +44 -0
  916. package/dist/trace-analyst/tools.d.ts.map +1 -0
  917. package/dist/trace-analyst/tools.test.d.ts +10 -0
  918. package/dist/trace-analyst/tools.test.d.ts.map +1 -0
  919. package/dist/{store-C1YxJDEK.d.ts → trace-analyst/types.d.ts} +18 -74
  920. package/dist/trace-analyst/types.d.ts.map +1 -0
  921. package/dist/trace-contracts.d.ts +180 -0
  922. package/dist/trace-contracts.d.ts.map +1 -0
  923. package/dist/traced-analyst.d.ts +26 -0
  924. package/dist/traced-analyst.d.ts.map +1 -0
  925. package/dist/traced-judges.d.ts +27 -0
  926. package/dist/traced-judges.d.ts.map +1 -0
  927. package/dist/traces.d.ts +4 -960
  928. package/dist/traces.d.ts.map +1 -0
  929. package/dist/traces.js +41 -11
  930. package/dist/{trajectory-2TkpSEVh.d.ts → trajectory.d.ts} +8 -9
  931. package/dist/trajectory.d.ts.map +1 -0
  932. package/dist/{types-C7DGg5ex.d.ts → types.d.ts} +31 -33
  933. package/dist/types.d.ts.map +1 -0
  934. package/dist/ui-finding.d.ts +104 -0
  935. package/dist/ui-finding.d.ts.map +1 -0
  936. package/dist/verdict-cache.d.ts +78 -0
  937. package/dist/verdict-cache.d.ts.map +1 -0
  938. package/dist/verdict-cache.test.d.ts +2 -0
  939. package/dist/verdict-cache.test.d.ts.map +1 -0
  940. package/dist/{verdict-C9MlYujm.d.ts → verdict.d.ts} +2 -3
  941. package/dist/verdict.d.ts.map +1 -0
  942. package/dist/visual-diff.d.ts +32 -0
  943. package/dist/visual-diff.d.ts.map +1 -0
  944. package/dist/wire/handlers.d.ts +54 -0
  945. package/dist/wire/handlers.d.ts.map +1 -0
  946. package/dist/wire/index.d.ts +13 -570
  947. package/dist/wire/index.d.ts.map +1 -0
  948. package/dist/wire/openapi.d.ts +3 -0
  949. package/dist/wire/openapi.d.ts.map +1 -0
  950. package/dist/wire/rpc.d.ts +21 -0
  951. package/dist/wire/rpc.d.ts.map +1 -0
  952. package/dist/wire/rubrics.d.ts +34 -0
  953. package/dist/wire/rubrics.d.ts.map +1 -0
  954. package/dist/wire/schemas.d.ts +410 -0
  955. package/dist/wire/schemas.d.ts.map +1 -0
  956. package/dist/wire/server.d.ts +60 -0
  957. package/dist/wire/server.d.ts.map +1 -0
  958. package/dist/workflow/event-schema.d.ts +5 -0
  959. package/dist/workflow/event-schema.d.ts.map +1 -0
  960. package/dist/workflow/feedback-pack.d.ts +99 -0
  961. package/dist/workflow/feedback-pack.d.ts.map +1 -0
  962. package/dist/workflow/index.d.ts +22 -495
  963. package/dist/workflow/index.d.ts.map +1 -0
  964. package/dist/workflow/index.js +1 -1
  965. package/dist/workflow/intelligence-export.d.ts +62 -0
  966. package/dist/workflow/intelligence-export.d.ts.map +1 -0
  967. package/dist/workflow/partner-report.d.ts +49 -0
  968. package/dist/workflow/partner-report.d.ts.map +1 -0
  969. package/dist/workflow/phase-graph.d.ts +43 -0
  970. package/dist/workflow/phase-graph.d.ts.map +1 -0
  971. package/dist/workflow/promotion-gate.d.ts +61 -0
  972. package/dist/workflow/promotion-gate.d.ts.map +1 -0
  973. package/dist/workflow/run-record.d.ts +12 -0
  974. package/dist/workflow/run-record.d.ts.map +1 -0
  975. package/dist/workflow/runtime-adapter.d.ts +20 -0
  976. package/dist/workflow/runtime-adapter.d.ts.map +1 -0
  977. package/dist/workflow/sanitize.d.ts +21 -0
  978. package/dist/workflow/sanitize.d.ts.map +1 -0
  979. package/dist/workflow/schema.d.ts +5 -0
  980. package/dist/workflow/schema.d.ts.map +1 -0
  981. package/dist/workflow/summary.d.ts +43 -0
  982. package/dist/workflow/summary.d.ts.map +1 -0
  983. package/dist/workflow/trace-event-fields.d.ts +6 -0
  984. package/dist/workflow/trace-event-fields.d.ts.map +1 -0
  985. package/dist/workflow/trajectory.d.ts +15 -0
  986. package/dist/workflow/trajectory.d.ts.map +1 -0
  987. package/dist/workflow/types.d.ts +68 -0
  988. package/dist/workflow/types.d.ts.map +1 -0
  989. package/dist/workspace-inspector.d.ts +67 -0
  990. package/dist/workspace-inspector.d.ts.map +1 -0
  991. package/dist/wrangler-deploy-runner.test.d.ts +2 -0
  992. package/dist/wrangler-deploy-runner.test.d.ts.map +1 -0
  993. package/docs/campaign-proposers.md +170 -0
  994. package/docs/concepts.md +8 -4
  995. package/docs/customer-journeys.md +15 -13
  996. package/docs/design/loop-taxonomy.md +34 -66
  997. package/docs/distributed-driver.md +14 -14
  998. package/docs/feature-guide.md +1 -1
  999. package/docs/hosted-ingest-spec.md +2 -3
  1000. package/docs/multi-shot-optimization.md +8 -8
  1001. package/docs/product-eval-adoption.md +1 -1
  1002. package/docs/self-improvement-map.md +33 -29
  1003. package/package.json +9 -15
  1004. package/dist/calibration-BPmzuVPk.d.ts +0 -101
  1005. package/dist/chunk-2K6UUZ7P.js.map +0 -1
  1006. package/dist/chunk-CTBHKLEU.js.map +0 -1
  1007. package/dist/chunk-E4GH6USR.js.map +0 -1
  1008. package/dist/chunk-EGPMSBEZ.js.map +0 -1
  1009. package/dist/chunk-KWRRMR3J.js.map +0 -1
  1010. package/dist/chunk-MIFZUPEK.js.map +0 -1
  1011. package/dist/chunk-MPQWFX6Y.js.map +0 -1
  1012. package/dist/chunk-Q5LIB7BC.js.map +0 -1
  1013. package/dist/chunk-QMUEXQJS.js.map +0 -1
  1014. package/dist/chunk-SD2YFWQQ.js.map +0 -1
  1015. package/dist/control-D6qwHXIR.d.ts +0 -259
  1016. package/dist/corpus-B8A4BDR3.d.ts +0 -560
  1017. package/dist/failure-cluster-DH9Flgcf.d.ts +0 -76
  1018. package/dist/harness-optimizer-mOl9XX_O.d.ts +0 -106
  1019. package/dist/index-Bx3gZ8xl.d.ts +0 -159
  1020. package/dist/pre-registration-mAnCugl9.d.ts +0 -523
  1021. package/dist/provenance-P-bCL2Fo.d.ts +0 -441
  1022. package/dist/query-B7GGjRox.d.ts +0 -32
  1023. package/dist/release-report-BEbWmVYj.d.ts +0 -233
  1024. package/dist/run-critic-CmMf05uV.d.ts +0 -56
  1025. package/dist/run-improvement-loop-DBahB8Ax.d.ts +0 -427
  1026. package/dist/runtime-trajectory-BDgfGZSr.d.ts +0 -49
  1027. package/dist/semantic-concept-judge-B9MgmBnM.d.ts +0 -624
  1028. package/dist/sink-fetch-B1Yg4Til.d.ts +0 -101
  1029. package/docs/design/external-agent-wedge.md +0 -89
  1030. package/docs/design/phase-d-rfc.md +0 -125
  1031. package/docs/design/phase4-consumer-migration.md +0 -70
  1032. package/docs/design/primitives-integration-spec.md +0 -393
  1033. package/docs/design/product-self-improvement-loop.md +0 -146
  1034. package/docs/design/self-improvement-engine.md +0 -140
  1035. package/docs/design/self-improvement-protocol.md +0 -223
  1036. package/docs/design/self-improvement-roadmap.md +0 -106
  1037. package/docs/design/substrate-gaps.md +0 -118
  1038. package/docs/phase-b-pairing-kit.md +0 -188
  1039. package/docs/phase-b-runbook.md +0 -176
  1040. package/docs/pilot/README.md +0 -62
  1041. package/docs/pilot/customer-checklist.md +0 -90
  1042. package/docs/pilot/integration-foreign-stack.md +0 -296
  1043. package/docs/pilot/integration-tangle-stack.md +0 -248
  1044. package/docs/pilot/one-pager.md +0 -161
  1045. package/docs/pilot/sample-insight-report.json +0 -172
  1046. package/docs/quickstart-external.md +0 -229
  1047. package/docs/research/belief-state-agent-eval-roadmap.md +0 -593
  1048. package/docs/research/research-roadmap.md +0 -205
  1049. package/docs/specs/driver-honest-spec.md +0 -251
  1050. package/docs/specs/hermes-self-improvement-audit.md +0 -93
  1051. package/docs/specs/profile-versioning.md +0 -291
  1052. package/docs/three-package-architecture.md +0 -168
  1053. /package/dist/{chunk-TBDR6PAI.js.map → chunk-IZCEK2HR.js.map} +0 -0
  1054. /package/dist/{chunk-KW53MSA5.js.map → chunk-X74V6ESX.js.map} +0 -0
  1055. /package/dist/{chunk-2KNZHH3P.js.map → chunk-Z6L6YSU6.js.map} +0 -0
  1056. /package/dist/{run-campaign-7WNXMDSN.js.map → run-campaign-WXY7KI67.js.map} +0 -0
package/dist/rl.d.ts CHANGED
@@ -1,1192 +1 @@
1
- export { O as OffPolicyEstimate, a as OffPolicyOptions, b as OffPolicyTrajectory, d as doublyRobust, i as inverseProbabilityWeighting, o as offPolicyEstimateAll, s as selfNormalizedImportanceWeighting } from './off-policy-DiwuKKg7.js';
2
- import { P as PreferenceExtractionReport, D as DpoExportRow, G as GrpoExportRow, S as SftExportRow, E as ExtractPreferencesOptions, a as DpoLookups, b as GrpoLookups, c as SftLookups } from './corpus-B8A4BDR3.js';
3
- export { d as CorpusAppendResult, C as CorpusRecord, e as DatasetFormat, f as ExtractStepRewardsOptions, H as HarvestOptions, g as PreferenceStrategy, h as PreferenceTriple, i as PrmExportRow, j as PrmLookups, k as PrmTrainingTriple, R as RewardKind, l as RewardStats, m as RlDatasetBundle, n as RlDatasetConfig, o as RlDatasetManifest, p as RlDatasetStats, q as RunwiseStepSummary, r as StepReward, s as StepRewardJsonlRow, t as StepScorer, u as appendToCorpus, v as buildDatasetFromCorpus, w as buildRlDataset, x as datasheetToMarkdown, y as extractPreferences, z as extractStepRewards, A as prmTrainingPairs, B as readCorpus, F as runwiseStepRewardSummary, I as stepRewardsToJsonl, J as toAnthropicFormat, K as toDpoJsonl, L as toDpoRows, M as toGrpoJsonl, N as toGrpoRows, O as toPrmJsonl, Q as toPrmRows, T as toSftJsonl, U as toSftRows, V as toTRLFormat } from './corpus-B8A4BDR3.js';
4
- import { g as CampaignResult } from './types-BU-7W85F.js';
5
- import { a as RunSplitTag, R as RunRecord } from './run-record-e7vj1uZQ.js';
6
- import { a as VerificationReport } from './multi-layer-verifier-DUZXrPDA.js';
7
- export { A as AdversarialMutation, a as AdversarialScenario, b as AdversarialSearchOptions, c as AdversarialSearchReport, d as adversarialScenarioSearch } from './adversarial-DIVcDoI_.js';
8
- import { b as OutcomeStore } from './outcome-store-rnXLEqSn.js';
9
- export { D as DeploymentOutcome, F as FileSystemOutcomeStore, a as FileSystemOutcomeStoreOptions, I as InMemoryOutcomeStore } from './outcome-store-rnXLEqSn.js';
10
- import { b as RubricPredictiveValidityReport } from './rubric-predictive-validity-Cy_W-hWZ.js';
11
- import { R as Researcher, F as FailureMode, S as SteeringChange, E as ExperimentPlan, a as ExperimentResult, b as EvalCampaignResult, c as EvalCampaignOptions } from './researcher-B0C2_fVO.js';
12
- export { r as runEvalCampaign } from './researcher-B0C2_fVO.js';
13
- import { I as InterimReleaseConfidence } from './sequential-5iSVfzl2.js';
14
- import './schema-m0gsnbt3.js';
15
- import './store-BcFXE6LG.js';
16
- import './errors-CzMUYo7b.js';
17
- import './verdict-C9MlYujm.js';
18
- import './llm-client-Bj7g0rqu.js';
19
- import './raw-provider-sink-C46HDghv.js';
20
- import './summary-report-BDOFevaT.js';
21
- import './failure-cluster-DH9Flgcf.js';
22
- import './emitter-C2rqGH_l.js';
23
- import './integrity-D2t12mMw.js';
24
-
25
- /**
26
- * Test-time compute scaling curves.
27
- *
28
- * The test-time-compute frontier paper (Snell et al. 2024) and the
29
- * subsequent o1-style scaling work both show that LLM-agent capability
30
- * is a function of the compute budget at inference, not just of the
31
- * training run. The right way to characterize a candidate is therefore
32
- * a *curve* — score at compute budgets {1×, 4×, 16×, …} — not a single
33
- * point.
34
- *
35
- * This module ships:
36
- *
37
- * 1. The compute-curve harness — `runComputeCurve(runner, budgets)` —
38
- * that evaluates one candidate at a sequence of compute budgets
39
- * and returns the (compute, score) curve.
40
- * 2. A best-of-N evaluator — `bestOfN(runner, n, scoreFn)` — the
41
- * simplest test-time-compute scaling primitive: sample N
42
- * independent rollouts, return the best.
43
- * 3. A self-consistency evaluator — `selfConsistency(runner, n)` —
44
- * the majority-vote variant of best-of-N for tasks with a small
45
- * categorical answer space.
46
- * 4. Pareto-frontier extraction over multiple candidates — given
47
- * (candidate, compute, score) tuples, return the set of
48
- * candidate-compute combinations that aren't dominated.
49
- *
50
- * Caveat: "compute" here is the caller's notion of a compute unit. For
51
- * agent eval that's typically wall-time × parallelism, or token budget,
52
- * or LLM-call count. We accept whatever the caller provides; the curve
53
- * is on whatever axis they pick.
54
- */
55
- interface ComputeCurveBudget {
56
- /** Identifier — for the report. Common: '1x', '4x', '16x'. */
57
- id: string;
58
- /** Numeric value on the chosen axis (tokens, calls, USD, ms — caller picks). */
59
- cost: number;
60
- /** Free-form metadata (the caller can carry per-budget config). */
61
- meta?: Record<string, unknown>;
62
- }
63
- interface ComputeCurvePoint {
64
- budgetId: string;
65
- cost: number;
66
- score: number;
67
- /** Number of underlying samples used at this budget. */
68
- samples: number;
69
- /** Optional spread / variance information. */
70
- std?: number;
71
- /** Any extra metrics the runner returned. */
72
- metrics?: Record<string, number>;
73
- }
74
- interface ComputeCurve {
75
- candidateId: string;
76
- points: ComputeCurvePoint[];
77
- /** Rough exponent fit: score ≈ a + b * log(cost). Useful for "how steep is the curve?" */
78
- logSlope: number | null;
79
- /** Best (highest-score) point on the curve. */
80
- best: ComputeCurvePoint;
81
- }
82
- interface RunComputeCurveOptions {
83
- candidateId: string;
84
- budgets: ComputeCurveBudget[];
85
- /**
86
- * Run the candidate at one budget. Returns the realized score plus
87
- * optional spread + extra metrics.
88
- */
89
- runAtBudget: (budget: ComputeCurveBudget) => Promise<{
90
- score: number;
91
- samples: number;
92
- std?: number;
93
- metrics?: Record<string, number>;
94
- }>;
95
- }
96
- declare function runComputeCurve(opts: RunComputeCurveOptions): Promise<ComputeCurve>;
97
- interface ComputeBestOfNOptions<O> {
98
- /** Number of independent samples to draw. */
99
- n: number;
100
- /** Sampler — produces one rollout. */
101
- sample: (sampleIdx: number) => Promise<O>;
102
- /** Score one rollout. */
103
- scoreFn: (rollout: O) => Promise<number> | number;
104
- }
105
- interface ComputeBestOfNResult<O> {
106
- best: O;
107
- bestScore: number;
108
- scores: number[];
109
- meanScore: number;
110
- /** Index of the best rollout, for diagnostics. */
111
- bestIndex: number;
112
- }
113
- /** The simplest test-time scaling primitive. */
114
- declare function bestOfN<O>(opts: ComputeBestOfNOptions<O>): Promise<ComputeBestOfNResult<O>>;
115
- interface SelfConsistencyOptions<O> {
116
- n: number;
117
- sample: (sampleIdx: number) => Promise<O>;
118
- /** Extract the canonical answer key (string) from a rollout. */
119
- answerKey: (rollout: O) => string;
120
- }
121
- interface SelfConsistencyResult<O> {
122
- /** Modal answer (the majority vote). */
123
- answer: string;
124
- /** Fraction of samples voting for the modal answer in [0, 1]. */
125
- agreement: number;
126
- /** Histogram of all answers. */
127
- histogram: Record<string, number>;
128
- /** A representative rollout that voted for the modal answer. */
129
- representative: O;
130
- /** All rollouts. */
131
- rollouts: O[];
132
- }
133
- /**
134
- * Self-consistency / majority-vote test-time scaling. For tasks with a
135
- * small categorical answer space (math problems, multiple choice).
136
- */
137
- declare function selfConsistency<O>(opts: SelfConsistencyOptions<O>): Promise<SelfConsistencyResult<O>>;
138
- /**
139
- * Pareto frontier over (candidate, compute, score) tuples. A point is on
140
- * the frontier iff no other point dominates it in both score (higher
141
- * better) and cost (lower better). Returns the frontier sorted ascending
142
- * by cost.
143
- */
144
- interface ParetoPointInput {
145
- candidateId: string;
146
- budgetId: string;
147
- cost: number;
148
- score: number;
149
- }
150
- declare function paretoFrontier(points: ParetoPointInput[]): ParetoPointInput[];
151
-
152
- /**
153
- * Contamination probe — held-out perturbation tests.
154
- *
155
- * The bug class: once a benchmark scenario set is published, models train
156
- * on it, and your scores become invalid. SWE-Bench-Verified, GPQA, and
157
- * MMLU-Pro all exist because their predecessors got contaminated within
158
- * months. The right defense is to keep a held-out *perturbed* version of
159
- * every scenario — same task, slightly different surface — and check
160
- * whether scores diverge significantly. Genuine capability transfers; rote
161
- * memorization doesn't.
162
- *
163
- * This module ships the probe contract:
164
- *
165
- * 1. A `ScenarioPerturbation` strategy type — function that produces a
166
- * perturbed scenario from an original.
167
- * 2. `runContaminationProbe({ originals, perturbed, scoreFn })` — runs
168
- * both halves and reports per-scenario score divergence + a global
169
- * contamination verdict via paired Wilcoxon.
170
- * 3. Several stock perturbations: `renameVariables`, `shuffleOrder`,
171
- * `paraphrasePrompt`, `injectIrrelevantClause`. Each preserves the
172
- * task's structural difficulty while breaking surface memorization.
173
- *
174
- * The verdict is conservative: if the perturbed-vs-original score
175
- * difference is statistically significant (BH-adjusted p < 0.05) AND
176
- * the median drop is > 5 percentage points, we flag *contamination
177
- * suspected*. False positives are possible (the perturbation might
178
- * actually be harder); the default is to flag for review, not to
179
- * autoreject.
180
- */
181
- type ScenarioPerturbationKind = 'rename_variables' | 'shuffle_order' | 'paraphrase' | 'inject_irrelevant_clause' | 'custom';
182
- interface ScenarioPerturbation<S> {
183
- kind: ScenarioPerturbationKind;
184
- /** Apply to one scenario, return its perturbed sibling. */
185
- apply: (scenario: S) => Promise<S> | S;
186
- /** Optional id — for the report. */
187
- id?: string;
188
- }
189
- interface ContaminationProbeInput<S> {
190
- /** Identity of every scenario. The probe's `runFingerprint` keys on these. */
191
- scenarioId: (s: S) => string;
192
- /** Original scenarios. */
193
- originals: S[];
194
- /**
195
- * Either pre-computed perturbations (one per original, same order) OR a
196
- * `perturbation` strategy that synthesizes them on the fly.
197
- */
198
- perturbed?: S[];
199
- perturbation?: ScenarioPerturbation<S>;
200
- /**
201
- * Run the policy/agent against one scenario and return a scalar score
202
- * in [0, 1]. The probe doesn't care what the policy is — that's the
203
- * caller's contract.
204
- */
205
- scoreFn: (s: S) => Promise<number>;
206
- }
207
- interface ContaminationProbeOptions {
208
- /** Drop scores below this from the probe; treats partial failures separately. Default 0. */
209
- scoreFloor?: number;
210
- /**
211
- * BH-FDR threshold for declaring contamination on each per-scenario
212
- * delta. Default 0.05.
213
- */
214
- fdr?: number;
215
- /**
216
- * Minimum median per-scenario drop to flag global contamination. Default
217
- * 0.05 (5 percentage points). Smaller drops may be noise.
218
- */
219
- minMedianDrop?: number;
220
- }
221
- interface ContaminationProbeReport {
222
- perScenario: Array<{
223
- scenarioId: string;
224
- originalScore: number;
225
- perturbedScore: number;
226
- delta: number;
227
- /** Per-scenario q-value (single-test BH for a single scenario). Mainly for display. */
228
- qValue: number;
229
- }>;
230
- /** Wilcoxon paired-test on the deltas. */
231
- pairedTest: {
232
- w: number;
233
- p: number;
234
- };
235
- medianDelta: number;
236
- meanDelta: number;
237
- contaminationSuspected: boolean;
238
- reason: string;
239
- /** Number of scenarios processed. */
240
- n: number;
241
- }
242
- declare function runContaminationProbe<S>(input: ContaminationProbeInput<S>, opts?: ContaminationProbeOptions): Promise<ContaminationProbeReport>;
243
- /**
244
- * Identifier-rename perturbation for code/text scenarios. Replaces every
245
- * occurrence of the listed identifiers with synthesized aliases. Use when
246
- * the scenario's structural difficulty is independent of variable names
247
- * (e.g. SWE-Bench-style coding tasks).
248
- */
249
- declare function renameVariables<S extends {
250
- prompt: string;
251
- }>(identifiers: string[], rename?: (name: string, idx: number) => string): ScenarioPerturbation<S>;
252
- /**
253
- * Order-shuffle perturbation. Reshuffles a list-shaped section of the
254
- * prompt (for QA scenarios that present options A/B/C/D — answer depends
255
- * on the option labels, not order). Caller provides the section extractor.
256
- */
257
- declare function shuffleOrder<S extends {
258
- prompt: string;
259
- }>(shuffleSection: (prompt: string, rng: () => number) => string, seed: number): ScenarioPerturbation<S>;
260
- /**
261
- * Inject-irrelevant-clause perturbation. Adds a benign sentence that
262
- * shouldn't change the answer. Tests for "did the model just memorize
263
- * the input string."
264
- */
265
- declare function injectIrrelevantClause<S extends {
266
- prompt: string;
267
- }>(clause: string, position?: 'prefix' | 'suffix'): ScenarioPerturbation<S>;
268
-
269
- /**
270
- * Adapters: convert measurement outputs into the canonical `RunRecord[]`
271
- * artifact that `replayCache`, `pairedEvalueSequence`, and
272
- * `rubricPredictiveValidity` consume. Two sources:
273
- * - `campaignToRunRecords` — the campaign substrate's per-cell results
274
- * (the modern path: `runCampaign` / `runImprovementLoop` → records).
275
- * - `verificationReportToRunRecord` — a `MultiLayerVerifier` report.
276
- *
277
- * Adapters are thin and explicit — every mandatory `RunRecord` field comes
278
- * from a caller-supplied context (`commitSha`, `model`, `promptHash`,
279
- * `configHash`) plus the cell's runtime data. The validator still rejects
280
- * bare-alias model strings — the caller snapshot-pins.
281
- */
282
-
283
- interface AdapterContext {
284
- /** Logical experiment id — typically the campaign or sweep identifier. */
285
- experimentId: string;
286
- /** Snapshot model id (e.g. `claude-sonnet-4-6@2025-04-15`). */
287
- model: string;
288
- /** Git SHA the harness was run from. */
289
- commitSha: string;
290
- /** Hash of the effective prompt sent to the model. */
291
- promptHash: string;
292
- /** Hash of the effective config (model, temperature, tools, judges, splits). */
293
- configHash: string;
294
- /** Default split tag. Default `'search'`. */
295
- splitTag?: RunSplitTag;
296
- /** Default cost in USD when the source doesn't record one. Default `0`. */
297
- defaultCostUsd?: number;
298
- }
299
- /**
300
- * Convert a `CampaignResult` into canonical `RunRecord[]` — one record per
301
- * scored cell. The cell's mean judge composite becomes the split score; every
302
- * judge dimension is carried through to `outcome.raw`. A cell that errored
303
- * becomes a record with `failureMode: 'cell_error'` (kept, not dropped — an
304
- * unscored cell is signal). `candidateId` identifies the measured surface
305
- * (defaults to the campaign manifest hash).
306
- */
307
- declare function campaignToRunRecords(campaign: CampaignResult, ctx: AdapterContext & {
308
- candidateId?: string;
309
- }): RunRecord[];
310
- /**
311
- * Convert a `MultiLayerVerifier` `VerificationReport` into a `RunRecord`.
312
- * `outcome.searchScore` (or `holdoutScore`) is `report.blendedScore`;
313
- * `outcome.raw` carries every layer's score + a pass indicator; `failureMode`
314
- * is the first failing layer's reason.
315
- */
316
- declare function verificationReportToRunRecord(report: VerificationReport, ctx: AdapterContext & {
317
- candidateId: string;
318
- scenarioId?: string;
319
- }, opts?: {
320
- runId?: string;
321
- }): RunRecord;
322
-
323
- /**
324
- * Bradley-Terry / Elo tournament evaluation.
325
- *
326
- * For multi-candidate sweeps, comparing every candidate's score against
327
- * a fixed comparator wastes information — the comparator becomes a high-
328
- * variance reference and rank flips between near-tied middle-rank
329
- * candidates are dominated by noise. Pairwise tournaments fix this:
330
- * every (i, j) pair contributes a comparison to a Bradley-Terry MLE that
331
- * estimates each candidate's strength on a unified scale.
332
- *
333
- * For online updating (rolling campaigns where new candidates arrive
334
- * over time), we also ship classical Elo with configurable K-factor.
335
- *
336
- * References:
337
- * - Bradley, R. A., Terry, M. E. (1952). Rank analysis of incomplete
338
- * block designs. Biometrika, 39(3/4), 324–345.
339
- * - Hunter, D. R. (2004). MM algorithms for generalized Bradley-Terry
340
- * models. Annals of Statistics, 32(1), 384–406. (The MLE algorithm
341
- * used here.)
342
- * - Elo, A. E. (1978). The Rating of Chess Players, Past and Present.
343
- *
344
- * This is a useful primitive because most LLM-eval communities (Chatbot
345
- * Arena, AlpacaEval, ELO-style ablation) have converged on pairwise
346
- * tournament eval as the most sample-efficient and most rank-stable
347
- * method when you have many candidates.
348
- */
349
- interface PairwiseOutcome {
350
- /** Winner candidate id. */
351
- winner: string;
352
- /** Loser candidate id. */
353
- loser: string;
354
- /**
355
- * Optional draw flag. When true, both candidates get half-credit
356
- * (Bradley-Terry handles draws as half-wins for each side).
357
- */
358
- draw?: boolean;
359
- /**
360
- * Optional weight — useful if some pairwise comparisons are stronger
361
- * signals than others (e.g. a paired test with a wider score gap is
362
- * a more confident comparison). Default 1.
363
- */
364
- weight?: number;
365
- }
366
- interface BradleyTerryRating {
367
- candidateId: string;
368
- /** Latent strength θ ≥ 0 from the BT MLE. */
369
- strength: number;
370
- /** Log-strength = log(θ) — interpretable on a linear scale. */
371
- logStrength: number;
372
- /** Number of pairwise comparisons this candidate appears in. */
373
- n: number;
374
- /** Win count (+ 0.5 per draw). */
375
- wins: number;
376
- }
377
- interface BradleyTerryFit {
378
- ratings: BradleyTerryRating[];
379
- /** Iterations of the MM algorithm before convergence. */
380
- iterations: number;
381
- /** Final maximum |θ_new - θ_old| / θ_old. */
382
- finalDelta: number;
383
- converged: boolean;
384
- }
385
- /**
386
- * Bradley-Terry MLE via Hunter's MM algorithm.
387
- *
388
- * Iteration: θ_i^new = W_i / Σ_{j ≠ i} N_ij / (θ_i + θ_j)
389
- * where W_i = wins by i (+ 0.5 per draw), N_ij = total comparisons.
390
- *
391
- * Returns log-strengths normalized so the smallest is 0 (any constant
392
- * offset is unobservable in BT — only differences are identified).
393
- */
394
- declare function fitBradleyTerry(outcomes: PairwiseOutcome[], opts?: {
395
- tolerance?: number;
396
- maxIterations?: number;
397
- smoothing?: number;
398
- }): BradleyTerryFit;
399
- /**
400
- * Online Elo updates. Use when comparisons arrive over time and you want
401
- * a running rating without re-fitting the full BT MLE on every update.
402
- *
403
- * Initialize ratings to `defaultRating` (1500 by default). Each call to
404
- * `applyEloUpdate` mutates the map in place and returns the deltas so
405
- * the caller can log per-comparison rating changes.
406
- */
407
- interface EloOptions {
408
- /** Default rating for unseen candidates. Default 1500. */
409
- defaultRating?: number;
410
- /** K-factor controls the step size. Default 32 (FIDE-ish). */
411
- kFactor?: number;
412
- }
413
- declare function applyEloUpdate(ratings: Map<string, number>, outcome: PairwiseOutcome, opts?: EloOptions): {
414
- winnerDelta: number;
415
- loserDelta: number;
416
- };
417
- /**
418
- * Build pairwise outcomes from the campaign artifact: for every scenario
419
- * shared by two candidates, the higher-scoring run wins. Useful when you
420
- * want a tournament view of an existing campaign without an additional
421
- * pairwise judge call.
422
- */
423
- interface BuildPairwiseFromCampaignInput {
424
- runs: Array<{
425
- candidateId: string;
426
- /** Stable identifier for the matching unit (typically scenarioId). */
427
- matchKey: string;
428
- score: number;
429
- }>;
430
- /**
431
- * Tied-score margin. Below this, the comparison is a draw. Default 0
432
- * (no ties).
433
- */
434
- drawMargin?: number;
435
- }
436
- declare function buildPairwiseFromCampaign(input: BuildPairwiseFromCampaignInput): PairwiseOutcome[];
437
-
438
- /**
439
- * Verifiable reward channel.
440
- *
441
- * For RL on coding / math / theorem-proving / structured-output tasks, the
442
- * reward signal is *decidable* — a test passes or fails, a proof checks or
443
- * doesn't, an output validates against a schema or doesn't. These rewards
444
- * are dramatically more useful for RL training than LLM-judge scores
445
- * because they don't drift, can't be Goodhart-gamed by the policy in the
446
- * same way, and don't require a separate calibration loop.
447
- *
448
- * The `MultiLayerVerifier` already produces this signal — it just doesn't
449
- * surface it in a shape that's clean enough for RL training. This module
450
- * wraps the verifier output so consumers can:
451
- *
452
- * 1. Extract a clean `VerifiableReward` from a `VerificationReport`
453
- * 2. Distinguish *deterministic* rewards (compile, test, schema) from
454
- * *probabilistic* rewards (judge) so they can be weighted differently
455
- * in the RL training step
456
- * 3. Filter `RunRecord[]` to only those with a verifiable reward,
457
- * producing the clean training set that DeepSeek-R1-style GRPO and
458
- * AlphaProof-style search both depend on
459
- *
460
- * Why this matters: every credible 2025-2026 frontier RL result on coding
461
- * agents leans on verifiable reward (DeepSeek-R1 GRPO on test pass-rate,
462
- * o-series RL on math/code, AlphaProof on Lean kernel checking). Mixing
463
- * judge scores into the reward signal poisons the gradient. This module
464
- * is the seam.
465
- */
466
-
467
- type VerifiableRewardSource = 'compile' | 'test' | 'schema' | 'sandbox' | 'judge' | 'composite';
468
- interface VerifiableReward {
469
- /** Scalar in [0, 1]. The RL training signal. */
470
- value: number;
471
- /** What produced the reward — different sources have different determinism. */
472
- source: VerifiableRewardSource;
473
- /**
474
- * Determinism class. `'deterministic'` rewards are repeatable byte-for-byte
475
- * given the same inputs (compile, test, schema validation, sandbox exit code).
476
- * `'probabilistic'` rewards depend on a stochastic component (LLM judge).
477
- * Mixing these in the same training batch without separation is a known
478
- * footgun in production RLHF pipelines.
479
- */
480
- determinism: 'deterministic' | 'probabilistic';
481
- /**
482
- * Confidence in the reward value. For deterministic sources this is 1.0
483
- * (the bit either flipped or didn't). For judge sources this is the
484
- * judge-reported confidence or — when missing — a calibrated prior.
485
- */
486
- confidence: number;
487
- /** The layer / judge id that produced the signal, for provenance. */
488
- origin: string;
489
- /**
490
- * Per-source contribution to `value`, keyed by layer/judge id. Single-source
491
- * rewards carry one entry (`{ [origin]: value }`); composite rewards carry
492
- * every contributing layer's score — the anti-scalar-collapse surface RL
493
- * consumers weight per-source instead of trusting one blended number.
494
- */
495
- components: Record<string, number>;
496
- /**
497
- * @deprecated Read `components` for per-source reward values. Kept for
498
- * published-API compatibility: single-source rewards carry the layer's
499
- * diagnostics here (e.g. `{ tests_passed: 7 }`); composite rewards carry
500
- * the same per-layer scores `components` now holds.
501
- */
502
- breakdown?: Record<string, number>;
503
- }
504
- interface VerifiableRewardExtractionOptions {
505
- /**
506
- * Which layers count as deterministic-reward sources. The verifier doesn't
507
- * tag layers as "this is verifiable"; the caller declares it via this list
508
- * (or via the layer name → source mapping). Default treats common names
509
- * (`install`, `typecheck`, `build`, `lint`, `test`, `compile`, `schema`,
510
- * `sandbox`) as deterministic.
511
- */
512
- deterministicLayers?: string[];
513
- /**
514
- * Map layer name → reward source. Defaults to a sensible string-match.
515
- */
516
- sourceFor?: (layerName: string) => VerifiableRewardSource;
517
- /**
518
- * Whether to fall back to a probabilistic (judge) reward when no
519
- * deterministic layer produced a numeric score. Default `true`. Set to
520
- * `false` for "deterministic-only" training pipelines that should
521
- * discard runs without a verifiable signal.
522
- */
523
- fallbackToJudge?: boolean;
524
- /**
525
- * Default confidence for probabilistic (judge) rewards when the judge
526
- * doesn't report one. Default `0.7`.
527
- */
528
- judgeConfidenceFloor?: number;
529
- }
530
- /**
531
- * Extract a `VerifiableReward` from a `VerificationReport`.
532
- *
533
- * Strategy: prefer the deterministic layers (in order: test → compile →
534
- * schema → sandbox), fall back to the judge layer if `fallbackToJudge` is
535
- * true, return `null` if no signal qualifies. When multiple deterministic
536
- * layers contribute, return a `'composite'` source with a weighted blend.
537
- */
538
- declare function extractVerifiableReward(report: VerificationReport, opts?: VerifiableRewardExtractionOptions): VerifiableReward | null;
539
- /**
540
- * Extract verifiable rewards from `RunRecord[]` produced via the
541
- * `verificationReportToRunRecord` adapter (which encodes per-layer scores
542
- * in `outcome.raw['layer.<name>']`). For records that don't carry layer
543
- * scores, returns `null` for that record.
544
- *
545
- * This is the canonical bridge from "campaign-shaped artifacts" to
546
- * "RL-training-ready reward signals": every record that has a clean
547
- * verifiable reward becomes a training datum, every record that doesn't
548
- * gets filtered out (or kept with `'probabilistic'` determinism for
549
- * separate downstream handling).
550
- */
551
- declare function extractVerifiableRewardsFromRecords(runs: RunRecord[], opts?: VerifiableRewardExtractionOptions): Array<{
552
- runId: string;
553
- reward: VerifiableReward | null;
554
- }>;
555
- /** Filter `RunRecord[]` to those with deterministic verifiable rewards. */
556
- declare function filterDeterministicallyRewarded(runs: RunRecord[], opts?: VerifiableRewardExtractionOptions): Array<{
557
- run: RunRecord;
558
- reward: VerifiableReward;
559
- }>;
560
-
561
- /**
562
- * Adaptive curriculum / active scenario selection.
563
- *
564
- * Fixed scenario sets waste sample budget on cells the policy already
565
- * passes (no information left) and cells the policy never passes (no
566
- * gradient available either). Active learning over scenarios fixes this
567
- * by allocating the next sample budget to cells where the policy's
568
- * outcome is *uncertain* — those carry the most decision-relevant signal.
569
- *
570
- * This module ships two complementary strategies:
571
- *
572
- * 1. **Variance-based** — score each (variant, scenario) cell by the
573
- * empirical variance of past observations. Allocate next-round budget
574
- * proportional to variance. Standard active-learning-by-uncertainty
575
- * heuristic; works well when the policy is non-deterministic and
576
- * cells differ in observation noise.
577
- *
578
- * 2. **Bandit-based (Thompson sampling)** — model each (variant,
579
- * scenario) cell as a Beta-Bernoulli arm; sample a posterior; pick
580
- * cells whose posterior mean is closest to the per-scenario decision
581
- * threshold. The right primitive when scenarios are
582
- * "pass/fail" rather than continuous, and when promotion gates fire
583
- * at a known threshold (e.g., 0.5).
584
- *
585
- * The output is a *next-round budget allocation* — a list of (variant,
586
- * scenario, count) triples. The consumer's matrix runner consumes the
587
- * allocation, runs those cells, feeds the new observations back. Loop.
588
- *
589
- * Out of scope (deliberate): scenario *generation* — that's the
590
- * adversarial primitive's job. This module allocates over an existing
591
- * scenario pool.
592
- */
593
-
594
- interface CellObservation {
595
- variantId: string;
596
- scenarioId: string;
597
- /** Observed score in [0, 1]. */
598
- score: number;
599
- /** For Bernoulli arms — derive from the score with a threshold if needed. */
600
- pass?: boolean;
601
- }
602
- interface CurriculumAllocation {
603
- variantId: string;
604
- scenarioId: string;
605
- /** How many additional reps to run on this cell. */
606
- count: number;
607
- /** Strategy-specific reason for the allocation. */
608
- reason: string;
609
- }
610
- interface VarianceCurriculumOptions {
611
- /** Total reps to allocate across all cells. */
612
- budget: number;
613
- /**
614
- * Smoothing prior on variance — keeps the allocator from concentrating
615
- * on a cell with one observation just because its 1-sample variance is
616
- * 0. Default 0.05.
617
- */
618
- variancePrior?: number;
619
- /**
620
- * Minimum reps per cell — even when the variance estimate is low, give
621
- * every cell at least this many. Default 1.
622
- */
623
- floorPerCell?: number;
624
- }
625
- /**
626
- * Variance-proportional allocation. For each cell, estimate variance from
627
- * past observations + a prior, then allocate the budget proportional to
628
- * (sqrt(variance) + 1/sqrt(n)) — a classical optimal-allocation rule
629
- * (Neyman 1934) that balances "explore noisy cells" with "explore
630
- * under-sampled cells."
631
- */
632
- declare function varianceBasedCurriculum(observations: CellObservation[], candidateCells: Array<{
633
- variantId: string;
634
- scenarioId: string;
635
- }>, opts: VarianceCurriculumOptions): CurriculumAllocation[];
636
- interface ThompsonCurriculumOptions {
637
- budget: number;
638
- /**
639
- * The per-scenario decision threshold. Cells whose posterior mean is
640
- * closest to this get the most budget — that's where the next observation
641
- * has the highest information value for the gate decision. Default 0.5.
642
- */
643
- decisionThreshold?: number;
644
- /** Beta prior parameters. Default α=β=1 (uniform). */
645
- priorAlpha?: number;
646
- priorBeta?: number;
647
- /** Seed the Thompson sampler. Default unset (Math.random). */
648
- seed?: number;
649
- }
650
- /**
651
- * Thompson-sampling-style allocation for pass/fail cells. For each cell:
652
- *
653
- * - Maintain Beta(α + passes, β + failures) posterior on pass-rate
654
- * - Allocation weight ∝ exp(-((sampledMean - threshold) / σ)^2):
655
- * cells whose sampled posterior straddles the decision boundary get
656
- * the most weight; cells already clearly above or below get less.
657
- *
658
- * This is the right primitive when promotion gates fire at a known
659
- * threshold and you want to sharpen the posterior near the boundary.
660
- */
661
- declare function thompsonCurriculum(observations: CellObservation[], candidateCells: Array<{
662
- variantId: string;
663
- scenarioId: string;
664
- }>, opts: ThompsonCurriculumOptions): CurriculumAllocation[];
665
- /** Convenience: extract `CellObservation[]` directly from `RunRecord[]`. */
666
- declare function observationsFromRunRecords(runs: RunRecord[], opts?: {
667
- passThreshold?: number;
668
- useHoldout?: boolean;
669
- }): CellObservation[];
670
-
671
- /**
672
- * Sample-efficient adaptation evaluation.
673
- *
674
- * For foundation-model-based agents, the load-bearing capability isn't
675
- * raw end-state performance — it's *how fast the agent reaches that
676
- * performance from cold start*. The same model with a worse prompt that
677
- * adapts in 5 demonstrations beats the same model with a better prompt
678
- * that needs 50. Standard meta-learning eval (Finn et al., MAML, RL² lit)
679
- * reports an *adaptation curve*: score after k=0, 1, 2, 4, 8, 16, …
680
- * in-context examples or fine-tune steps.
681
- *
682
- * This module ships:
683
- *
684
- * 1. `runAdaptationCurve` — given a runner that takes k demonstrations
685
- * and returns a score, produce the (k, score) curve.
686
- * 2. `compareAdaptationCurves` — paired comparison across two policies.
687
- * Returns per-k delta with bootstrap CIs and an "area-under-curve"
688
- * summary statistic.
689
- * 3. `firstPassK` — for pass/fail evaluation, the minimum k at which
690
- * the policy reliably passes (≥ pass-rate threshold over reps).
691
- *
692
- * Use cases:
693
- * - Compare two prompt designs that have similar end-state performance
694
- * but different in-context efficiency.
695
- * - Decide between fine-tuning and prompting based on adaptation cost.
696
- * - Detect when a policy "memorizes" k=0 inputs vs. genuinely adapts.
697
- */
698
- interface AdaptationRunner<S> {
699
- /**
700
- * Runs the policy on `scenario` with `k` demonstrations. Returns a
701
- * scalar score in [0, 1]. The runner is responsible for any caching;
702
- * the harness calls it once per (scenario, k, rep) cell.
703
- */
704
- run(args: {
705
- scenario: S;
706
- k: number;
707
- rep: number;
708
- }): Promise<number>;
709
- }
710
- interface RunAdaptationCurveOptions<S> {
711
- scenarios: S[];
712
- /** Number-of-shots to evaluate at. Default `[0, 1, 2, 4, 8, 16]`. */
713
- ks?: number[];
714
- /** Reps per (scenario, k) cell. Default 3. */
715
- reps?: number;
716
- runner: AdaptationRunner<S>;
717
- /** Pass-rate threshold for `firstPassK` reporting. Default 0.5. */
718
- passThreshold?: number;
719
- }
720
- interface AdaptationPoint {
721
- k: number;
722
- meanScore: number;
723
- passRate: number;
724
- std: number;
725
- n: number;
726
- /** Per-scenario means at this k. */
727
- perScenario: Array<{
728
- scenarioId: string;
729
- meanScore: number;
730
- passes: number;
731
- total: number;
732
- }>;
733
- }
734
- interface AdaptationCurve {
735
- points: AdaptationPoint[];
736
- /**
737
- * Smallest `k` at which `passRate ≥ passThreshold`. `null` if no `k`
738
- * tested reaches it.
739
- */
740
- firstPassK: number | null;
741
- /**
742
- * Area under the (k, meanScore) curve, normalized by max-k. A
743
- * single-number summary of "how well does this policy adapt from
744
- * cold-start to fully-conditioned." Higher = better adapter.
745
- */
746
- adaptationArea: number;
747
- }
748
- declare function runAdaptationCurve<S extends {
749
- scenarioId?: string;
750
- }>(opts: RunAdaptationCurveOptions<S>): Promise<AdaptationCurve>;
751
- interface CompareCurvesResult {
752
- perK: Array<{
753
- k: number;
754
- deltaMean: number;
755
- aLow: number;
756
- aHigh: number;
757
- bLow: number;
758
- bHigh: number;
759
- }>;
760
- areaDelta: number;
761
- firstPassKDelta: number | null;
762
- /** Verdict: 'a_better' | 'b_better' | 'similar'. */
763
- verdict: 'a_better' | 'b_better' | 'similar';
764
- /** Rationale, ready to render. */
765
- rationale: string;
766
- }
767
- /**
768
- * Paired comparison of two adaptation curves. Per-k deltas with 95%
769
- * bootstrap CIs (constructed from each curve's `perScenario` per-k means
770
- * — the bootstrap unit is the scenario, not the rep).
771
- */
772
- declare function compareAdaptationCurves(a: AdaptationCurve, b: AdaptationCurve, opts?: {
773
- confidence?: number;
774
- bootstrapResamples?: number;
775
- seed?: number;
776
- }): CompareCurvesResult;
777
- /** First k at which the curve's per-scenario pass rate reliably hits the threshold. */
778
- declare function firstPassK(curve: AdaptationCurve, threshold?: number): number | null;
779
-
780
- /**
781
- * `PredictiveValidityResearcher` — concrete `Researcher` implementation
782
- * that drives selection from outcome-anchored predictive validity.
783
- *
784
- * Each method:
785
- *
786
- * - `inspectFailures(runs)` — synthesizes failure modes from the
787
- * bottom-quartile of `RunRecord`s on the configured proxy reward.
788
- * - `proposeChange(failures)` — proposes steering changes that target
789
- * the rubrics with the lowest predictive validity (decorative ones).
790
- * Either reduce their weight in the composite, or recalibrate them.
791
- * - `applyChange(changes, baseline)` — merges the proposed steering
792
- * into the experiment plan.
793
- * - `evaluateChange(plan)` — re-runs the predictive-validity check on
794
- * the post-change runs and reports the delta.
795
- *
796
- * The result is a closed loop: the rubric weights drift toward the ones
797
- * that actually predict deployment outcomes, automatically. Pair with
798
- * `runRLCampaign` for the full auto-research story.
799
- */
800
-
801
- interface PredictiveValidityResearcherOptions {
802
- outcomes: OutcomeStore;
803
- outcomeMetrics: string[];
804
- /** Score threshold below which a run counts as a "failure." Default 0.5. */
805
- failureThreshold?: number;
806
- /** Spearman bucket below which a rubric is "decorative." Default 0.4. */
807
- decorativeThreshold?: number;
808
- /** Optional steering-namespace prefix for proposed changes. Default `'rubric_weight'`. */
809
- steeringNamespace?: string;
810
- /** Override the rubric set the researcher inspects. Default: every numeric `outcome.raw` key seen. */
811
- rubrics?: string[];
812
- /**
813
- * Snapshot stash hook — called with the most recent predictive-validity
814
- * report. Useful when a downstream system wants to log rubric drift over
815
- * time. Default no-op.
816
- */
817
- onReport?: (report: RubricPredictiveValidityReport) => void | Promise<void>;
818
- }
819
- /**
820
- * Concrete `Researcher` driven by `rubricPredictiveValidity`. The brain:
821
- * rubrics that don't predict deployment outcomes don't earn weight.
822
- */
823
- declare class PredictiveValidityResearcher implements Researcher {
824
- private opts;
825
- private lastReport;
826
- constructor(opts: PredictiveValidityResearcherOptions);
827
- inspectFailures(runs: RunRecord[]): Promise<FailureMode[]>;
828
- proposeChange(failures: FailureMode[]): Promise<SteeringChange[]>;
829
- applyChange(changes: SteeringChange[], baseline: ExperimentPlan): Promise<ExperimentPlan>;
830
- evaluateChange(plan: ExperimentPlan): Promise<ExperimentResult>;
831
- /**
832
- * Run the predictive-validity check explicitly against a fresh RunRecord
833
- * set. Updates the researcher's cached report so subsequent
834
- * `proposeChange` calls have evidence to draw from.
835
- */
836
- runValidityCheck(runs: RunRecord[]): Promise<RubricPredictiveValidityReport>;
837
- /**
838
- * Force-feed a predictive-validity report into the researcher state —
839
- * useful when the consumer ran the report out-of-band and wants the
840
- * researcher's later proposals informed by it.
841
- */
842
- setReport(report: RubricPredictiveValidityReport): void;
843
- getLastReport(): RubricPredictiveValidityReport | null;
844
- }
845
-
846
- /**
847
- * Reward hacking / Goodhart detection.
848
- *
849
- * Goodhart's Law says: when a measure becomes a target, it ceases to be
850
- * a good measure. In RLHF and agentic-RL settings this is the dominant
851
- * failure mode — the policy learns to produce outputs that score well on
852
- * the proxy reward (judge, rubric, test pass-rate) without producing
853
- * the underlying capability the proxy was meant to track.
854
- *
855
- * Krakovna et al. (2020, "Specification Gaming Examples in AI") and the
856
- * subsequent RLHF reward-hacking literature (Skalse et al. 2022, Kim et al.
857
- * 2023) converge on a few diagnostic signatures:
858
- *
859
- * 1. **Reward divergence:** the proxy reward grows while the held-out
860
- * ground-truth signal stagnates or drops. Predictive validity over
861
- * time captures this.
862
- * 2. **Distributional shift in outputs:** after RL, the policy produces
863
- * outputs that no longer match the reference distribution — usually
864
- * because it found a high-reward attractor that's degenerate (e.g.
865
- * one-token responses, repetition, formatting tricks).
866
- * 3. **Disagreement between independent rewards:** if you train on
867
- * reward A and a held-out independent reward B drops sharply, you're
868
- * probably hacking A.
869
- * 4. **Calibration drift:** the verifiable / deterministic component of
870
- * the reward is stable; the probabilistic / judge component drifts up
871
- * while the deterministic component doesn't. The judge is being
872
- * gamed.
873
- *
874
- * This module ships explicit detectors for all four signatures, plus a
875
- * combined verdict. The output is diagnostic — actionable signals,
876
- * not autoreject — because each signature has known false positives
877
- * (e.g., a policy that genuinely improves can show distributional shift).
878
- *
879
- * Differs from `rubricPredictiveValidity` (which is a *standing* check on
880
- * whether rubrics correlate with deployment outcomes) — this is a
881
- * *temporal* check on whether the reward-vs-truth gap is *widening over
882
- * time during a training run*.
883
- */
884
-
885
- type RewardHackingSignal = 'reward_divergence' | 'distribution_shift' | 'reward_disagreement' | 'judge_drift';
886
- interface RewardHackingFinding {
887
- signal: RewardHackingSignal;
888
- /** Severity in [0, 1]. >0.5 = strong signal. */
889
- severity: number;
890
- message: string;
891
- /** Numeric evidence the consumer can render. */
892
- detail: Record<string, number>;
893
- }
894
- interface RewardHackingReport {
895
- findings: RewardHackingFinding[];
896
- /**
897
- * Composite verdict. `'clean'` if every signal severity < 0.3;
898
- * `'suspect'` if at least one ≥ 0.3 but none ≥ 0.6; `'gaming'` if any ≥ 0.6.
899
- */
900
- verdict: 'clean' | 'suspect' | 'gaming';
901
- /** Rationale for the verdict, ready to paste into an audit log. */
902
- rationale: string[];
903
- /** Number of paired (proxy, truth) data points the report saw. */
904
- n: number;
905
- }
906
- interface DetectRewardHackingInput {
907
- /**
908
- * Run records ordered by recency (oldest first). The detector segments
909
- * them into prefix/suffix windows to compute "did the gap widen."
910
- */
911
- runs: RunRecord[];
912
- /**
913
- * The metric the policy was trained to optimize. Should be present on
914
- * `outcome.raw` or `outcome.holdoutScore`. Default reads `outcome.holdoutScore`.
915
- */
916
- proxyOf?: (run: RunRecord) => number | null;
917
- /**
918
- * The held-out ground-truth metric. For RL on coding, this is typically
919
- * test pass-rate. For RLHF, it's downstream task performance or human
920
- * preference. For knowledge tasks, it's an independently-graded score.
921
- */
922
- truthOf?: (run: RunRecord) => number | null;
923
- /**
924
- * Independent secondary reward. Used for the `reward_disagreement`
925
- * signal. Default uses the verifiable reward extractor (deterministic
926
- * sources only).
927
- */
928
- secondaryRewardOf?: (run: RunRecord) => number | null;
929
- /**
930
- * Window size — how many of the most recent runs count as the "after"
931
- * cohort. Default min(50, half the runs).
932
- */
933
- windowSize?: number;
934
- /**
935
- * Severity threshold to flag a signal. Default 0.3 (suspect) and 0.6
936
- * (gaming).
937
- */
938
- thresholds?: {
939
- suspect?: number;
940
- gaming?: number;
941
- };
942
- /**
943
- * Verifiable-reward options used for the secondary-reward fallback.
944
- */
945
- verifiableRewardOptions?: VerifiableRewardExtractionOptions;
946
- }
947
- declare function detectRewardHacking(input: DetectRewardHackingInput): RewardHackingReport;
948
-
949
- /**
950
- * `runRLCampaign` — top-level orchestrator that runs the matrix and
951
- * produces every RL-ready artifact in one call.
952
- *
953
- * Wires:
954
- * 1. `runEvalCampaign` for the matrix run (capture, integrity, hooks)
955
- * 2. `extractVerifiableReward` over each run, separating deterministic
956
- * from probabilistic reward sources for the trainer
957
- * 3. `extractPreferences` to produce DPO/PPO/KTO triples
958
- * 4. `evaluateInterimReleaseConfidence` over paired deltas (anytime-valid)
959
- * 5. `rubricPredictiveValidity` against an outcome store, when provided
960
- * 6. `detectRewardHacking` as a standing hygiene check
961
- * 7. Trainer-format export rows ready for prime-rl / TRL / verl
962
- *
963
- * The output `RLCampaignResult` is a single, audit-ready artifact: every
964
- * stage's output is in there. The consumer's downstream fits in a single
965
- * line: pass `result.preferences` to their DPO trainer, `result.grpoRows`
966
- * to GRPO, `result.runs` plus `result.rewardSignals` to a custom RL loop.
967
- */
968
-
969
- interface RunRLCampaignOptions<V> extends EvalCampaignOptions<V> {
970
- /** Preference-extraction options. Default uses paired-by-scenario-and-seed with min-margin 0.05. */
971
- preferences?: ExtractPreferencesOptions;
972
- /** Verifiable-reward extraction options. */
973
- verifiableReward?: VerifiableRewardExtractionOptions;
974
- /** Outcome store + metric names — when supplied, runs `rubricPredictiveValidity` post-campaign. */
975
- outcomeStore?: OutcomeStore;
976
- outcomeMetrics?: string[];
977
- /** Anytime-valid sequential evaluation options. */
978
- sequential?: {
979
- alpha?: number;
980
- bound?: number;
981
- rope?: {
982
- low: number;
983
- high: number;
984
- };
985
- };
986
- /** Trainer-format export lookups. When provided, the orchestrator builds the corresponding rows. */
987
- trainerExport?: {
988
- dpo?: DpoLookups;
989
- grpo?: GrpoLookups;
990
- sft?: SftLookups;
991
- };
992
- }
993
- interface RLCampaignResult<V> {
994
- campaign: EvalCampaignResult;
995
- /** Per-run verifiable reward (deterministic when available, probabilistic fallback otherwise). */
996
- rewardSignals: Array<{
997
- runId: string;
998
- reward: VerifiableReward | null;
999
- }>;
1000
- /** Preference extraction report. */
1001
- preferences: PreferenceExtractionReport;
1002
- /** Anytime-valid interim verdict over the paired deltas (vs comparator). */
1003
- interimConfidence: InterimReleaseConfidence | null;
1004
- /** Standing reward-hacking hygiene check. */
1005
- rewardHacking: RewardHackingReport;
1006
- /** Predictive validity, when an outcome store was supplied. */
1007
- predictiveValidity: RubricPredictiveValidityReport | null;
1008
- /** Trainer-export rows, populated only for the formats the caller requested via `trainerExport`. */
1009
- trainerRows: {
1010
- dpo?: DpoExportRow[];
1011
- grpo?: GrpoExportRow[];
1012
- sft?: SftExportRow[];
1013
- };
1014
- /**
1015
- * One-line top-level summary the consumer can log.
1016
- */
1017
- summary: string;
1018
- /**
1019
- * Convenience type-tag — consumers can branch on `result.kind`.
1020
- */
1021
- kind: 'agent-eval-rl-campaign';
1022
- unusedVariant?: V;
1023
- }
1024
- declare function runRLCampaign<V>(opts: RunRLCampaignOptions<V>): Promise<RLCampaignResult<V>>;
1025
-
1026
- /**
1027
- * Simulator fidelity — score a user SIMULATOR's realism against real-user
1028
- * trace distributions.
1029
- *
1030
- * Synthetic-persona evals (`PersonaConfig`-driven canonical evals, fuzz
1031
- * user-simulator objectives) stand in for real users in most of the numbers
1032
- * we publish. The standing threat is the Sim2Real gap: a simulator that is
1033
- * distributionally unlike production creates "easy mode" and silently
1034
- * inflates every score built on it. This module measures that gap from the
1035
- * SAME artifact both sides already produce — `RunRecord`s — so no new
1036
- * capture pipeline is needed:
1037
- *
1038
- * - `simFidelityReport` — per-feature Jensen-Shannon divergence between
1039
- * simulated and production record distributions, collapsed into a
1040
- * fidelity coefficient in [0,1].
1041
- * - `easyModeCheck` — the headline academic failure mode (sim inflates
1042
- * pass-rate over production) as its own named artifact.
1043
- *
1044
- * Every synthetic-persona eval result should publish its fidelity
1045
- * coefficient alongside the score — a number from an unrepresentative
1046
- * simulator is an unlabeled estimate. Wire-in points:
1047
- *
1048
- * - canonical persona evals: pass the campaign's `RunRecord`s as
1049
- * `simulated` and intake-adapter output (`contract/intake`: OTel spans,
1050
- * feedback tables, coding-agent sessions) as `production`
1051
- * - the fuzz user-sim objective: use `1 - report.fidelity` as a realism
1052
- * penalty when searching over generated personas
1053
- * - the durable corpus (`./corpus`): both sides read straight from
1054
- * `readCorpus` — tag sim vs production by `experimentId`
1055
- */
1056
-
1057
- /** Extracts a flat behavioral feature map from one record. `string` values
1058
- * are categorical, `number` values are quantile-bucketed over the union of
1059
- * both sides, `null` means the feature is absent on this record and is
1060
- * counted explicitly as its own category (never silently dropped). */
1061
- type BehaviorFeatures = (record: RunRecord) => Record<string, string | number | null>;
1062
- /** Reserved histogram category for `null` feature values. A capture-rate
1063
- * difference (one side instruments a signal, the other does not) registers
1064
- * as divergence by design: a simulator that produces no tool traces is not
1065
- * representative of production that does. */
1066
- declare const ABSENT_CATEGORY = "(absent)";
1067
- /** Minimum non-null observations PER SIDE for a feature to enter the
1068
- * fidelity mean. Below this the JSD estimate is sampling noise. */
1069
- declare const DEFAULT_MIN_N_PER_FEATURE = 20;
1070
- /** Quantile buckets used to discretize numeric features. Quartiles balance
1071
- * resolution against per-bucket sample size at the default minN. */
1072
- declare const DEFAULT_QUANTILE_BUCKETS = 4;
1073
- /** Fidelity at or above this → 'representative'; below → 'skewed'.
1074
- * 1 − 0.8 = mean JSD 0.2 ≈ distributions that mostly overlap with one
1075
- * clearly shifted mode — the point where per-feature shifts start changing
1076
- * which failure classes an eval can even observe. */
1077
- declare const REPRESENTATIVE_MIN_FIDELITY = 0.8;
1078
- /**
1079
- * Default feature set — ONLY fields verified present on both simulated and
1080
- * production records:
1081
- *
1082
- * - `score`, `wall_ms`, `output_tokens` — mandatory per the `RunRecord`
1083
- * validator (non-finite values read as absent rather than poisoning a
1084
- * bucket).
1085
- * - `failure_class` — optional taxonomy field; absent counted explicitly.
1086
- * - `turn_count`, `tool_errors`, `tool_error_recovery` — derived from the
1087
- * `outcome.raw` counters the intake adapters and eval harnesses write
1088
- * (`turns_completed`, `assistant_messages`, `tool_errors`,
1089
- * `turns_aborted`); absent on records whose producer did not capture
1090
- * them, counted explicitly.
1091
- * - `completion_length` — from the optional `CorpusRecord` trajectory
1092
- * text; the message-length proxy when records come from the corpus.
1093
- *
1094
- * `RunRecord` carries event COUNTS, not event ordering, so
1095
- * `tool_error_recovery` is a counts-only derivation: errors occurred and the
1096
- * run still completed cleanly ('recovered') vs aborted or classified as a
1097
- * failure ('unrecovered') — not a literal error→retry sequence check.
1098
- */
1099
- declare const defaultBehaviorFeatures: BehaviorFeatures;
1100
- /**
1101
- * Jensen-Shannon divergence between two categorical histograms (raw counts;
1102
- * normalized internally). Log base 2 → bounded [0,1]: 0 = identical
1103
- * distributions, 1 = disjoint support. Symmetric, defined even where the
1104
- * supports differ — exactly the regime sim-vs-production comparison lives in.
1105
- * Throws on zero-mass or negative/non-finite counts: an empty histogram has
1106
- * no distribution and a silent 0 would read as "perfectly representative".
1107
- */
1108
- declare function jsDivergence(p: Record<string, number>, q: Record<string, number>): number;
1109
- /**
1110
- * Deterministic quantile edges over a value set (the UNION of both sides, so
1111
- * sim and production land in the same buckets). Linear interpolation between
1112
- * order statistics; duplicate edges from heavy ties collapse into fewer,
1113
- * wider buckets. Returns `bucketCount - 1` edges before deduplication.
1114
- */
1115
- declare function quantileEdges(values: number[], bucketCount?: number): number[];
1116
- /** Stable half-open bucket label for a value against quantile edges:
1117
- * `[-inf,e0)`, `[e0,e1)`, …, `[eLast,+inf)`. */
1118
- declare function bucketLabel(value: number, edges: number[]): string;
1119
- interface FeatureShift {
1120
- /** Category label (a string value, a numeric bucket, or `ABSENT_CATEGORY`). */
1121
- value: string;
1122
- /** Probability of this category among ALL simulated records (nulls included
1123
- * via `ABSENT_CATEGORY`, so each side's shifts sum to 1). */
1124
- pSim: number;
1125
- /** Probability among ALL production records. */
1126
- pProd: number;
1127
- }
1128
- interface FeatureDivergence {
1129
- feature: string;
1130
- /** Jensen-Shannon divergence in [0,1] for this feature. */
1131
- divergence: number;
1132
- /** Largest |pSim − pProd| categories, descending — where the sim deviates. */
1133
- topShifts: FeatureShift[];
1134
- /** Non-null observations on the simulated side. */
1135
- nSim: number;
1136
- /** Non-null observations on the production side. */
1137
- nProd: number;
1138
- }
1139
- type FidelityVerdict = 'representative' | 'skewed' | 'insufficient-data';
1140
- interface FidelityReport {
1141
- perDimension: FeatureDivergence[];
1142
- /** 1 − mean divergence over features with sufficient data. NaN when the
1143
- * verdict is 'insufficient-data' — a 0 would read as "maximally skewed"
1144
- * and silently poison downstream aggregation; check `verdict` first. */
1145
- fidelity: number;
1146
- /** Features excluded because either side had fewer than `minNPerFeature`
1147
- * non-null observations. Named, never silently dropped. */
1148
- insufficientData: string[];
1149
- /** 'representative' when fidelity >= REPRESENTATIVE_MIN_FIDELITY (0.8),
1150
- * 'skewed' below, 'insufficient-data' when no feature met minN. */
1151
- verdict: FidelityVerdict;
1152
- }
1153
- interface SimFidelityOptions {
1154
- /** Feature extractor. Defaults to `defaultBehaviorFeatures`. */
1155
- features?: BehaviorFeatures;
1156
- /** Minimum non-null observations per side per feature. Default 20. */
1157
- minNPerFeature?: number;
1158
- }
1159
- /**
1160
- * Compare a simulator's RunRecords against production RunRecords, feature by
1161
- * feature. Numeric features are bucketed by deterministic quantiles of the
1162
- * union; nulls count as an explicit `ABSENT_CATEGORY`. Throws on empty
1163
- * inputs — "no records" is a wiring error, not a distribution.
1164
- */
1165
- declare function simFidelityReport(simulated: RunRecord[], production: RunRecord[], opts?: SimFidelityOptions): FidelityReport;
1166
- interface EasyModeOptions {
1167
- /** A run passes when its score (holdout, else search) >= this. Default 0.5
1168
- * — matches the pass-threshold convention across the rl/ primitives. */
1169
- passThreshold?: number;
1170
- /** Pass-rate gap above which the sim is flagged inflated. Default 0.1 —
1171
- * a 10-point inflation is enough to flip most promotion gates. */
1172
- inflationTolerance?: number;
1173
- }
1174
- interface EasyModeReport {
1175
- simPassRate: number;
1176
- prodPassRate: number;
1177
- /** simPassRate − prodPassRate. Positive = the simulator is easier than reality. */
1178
- gap: number;
1179
- /** True when gap > inflationTolerance: numbers measured against this
1180
- * simulator overstate production performance. */
1181
- inflated: boolean;
1182
- }
1183
- /**
1184
- * The headline simulator failure mode as its own named artifact: a simulator
1185
- * that creates "easy mode" inflates pass-rate relative to production, and
1186
- * every score measured against it overstates reality. Throws on empty inputs
1187
- * and on records carrying neither score — a silently-skipped record would
1188
- * bias the very rate this check exists to keep honest.
1189
- */
1190
- declare function easyModeCheck(simulated: RunRecord[], production: RunRecord[], opts?: EasyModeOptions): EasyModeReport;
1191
-
1192
- export { ABSENT_CATEGORY, type AdaptationCurve, type AdaptationPoint, type AdaptationRunner, type AdapterContext, type BehaviorFeatures, type BradleyTerryFit, type BradleyTerryRating, type BuildPairwiseFromCampaignInput, type CellObservation, type CompareCurvesResult, type ComputeBestOfNOptions, type ComputeBestOfNResult, type ComputeCurve, type ComputeCurveBudget, type ComputeCurvePoint, type ContaminationProbeInput, type ContaminationProbeOptions, type ContaminationProbeReport, type CurriculumAllocation, DEFAULT_MIN_N_PER_FEATURE, DEFAULT_QUANTILE_BUCKETS, type DetectRewardHackingInput, DpoExportRow, DpoLookups, type EasyModeOptions, type EasyModeReport, type EloOptions, ExtractPreferencesOptions, type FeatureDivergence, type FeatureShift, type FidelityReport, type FidelityVerdict, GrpoExportRow, GrpoLookups, OutcomeStore, type PairwiseOutcome, type ParetoPointInput, PredictiveValidityResearcher, type PredictiveValidityResearcherOptions, PreferenceExtractionReport, REPRESENTATIVE_MIN_FIDELITY, type RLCampaignResult, type RewardHackingFinding, type RewardHackingReport, type RewardHackingSignal, type RunAdaptationCurveOptions, type RunComputeCurveOptions, type RunRLCampaignOptions, type ScenarioPerturbation, type ScenarioPerturbationKind, type SelfConsistencyOptions, type SelfConsistencyResult, SftExportRow, SftLookups, type SimFidelityOptions, type ThompsonCurriculumOptions, type VarianceCurriculumOptions, type VerifiableReward, type VerifiableRewardExtractionOptions, type VerifiableRewardSource, applyEloUpdate, bestOfN, bucketLabel, buildPairwiseFromCampaign, campaignToRunRecords, compareAdaptationCurves, defaultBehaviorFeatures, detectRewardHacking, easyModeCheck, extractVerifiableReward, extractVerifiableRewardsFromRecords, filterDeterministicallyRewarded, firstPassK, fitBradleyTerry, injectIrrelevantClause, jsDivergence, observationsFromRunRecords, paretoFrontier, quantileEdges, renameVariables, runAdaptationCurve, runComputeCurve, runContaminationProbe, runRLCampaign, selfConsistency, shuffleOrder, simFidelityReport, thompsonCurriculum, varianceBasedCurriculum, verificationReportToRunRecord };
1
+ export * from './rl/index'