@tangle-network/agent-eval 0.95.0 → 0.96.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 (968) hide show
  1. package/CHANGELOG.md +17 -0
  2. package/dist/adapters/http.d.ts +17 -10
  3. package/dist/adapters/langchain.d.ts +14 -7
  4. package/dist/adapters/otel.d.ts +25 -13
  5. package/dist/{rl/adversarial.d.ts → adversarial-DIVcDoI_.d.ts} +7 -6
  6. package/dist/analyst/index.d.ts +236 -28
  7. package/dist/analyst/index.js +1 -1
  8. package/dist/{trace-analyst/analyst.d.ts → analyst-C8HHvfJp.d.ts} +14 -12
  9. package/dist/{contract/analyze-runs.d.ts → analyze-runs-DtT6F_6T.d.ts} +10 -9
  10. package/dist/authenticity/index.d.ts +16 -15
  11. package/dist/{baseline.d.ts → baseline-Bbid3WoO.d.ts} +44 -8
  12. package/dist/belief-state/index.d.ts +605 -14
  13. package/dist/benchmarks/index.d.ts +5 -23
  14. package/dist/builder-eval/index.d.ts +250 -5
  15. package/dist/calibration-BPmzuVPk.d.ts +101 -0
  16. package/dist/campaign/index.d.ts +1452 -38
  17. package/dist/{chunk-AQ5WQAIV.js → chunk-3NHEO6ZC.js} +2 -2
  18. package/dist/chunk-3NHEO6ZC.js.map +1 -0
  19. package/dist/cli.d.ts +0 -2
  20. package/dist/{contract/intake/code-agent-session.d.ts → code-agent-session-CPHRCb4-.d.ts} +17 -15
  21. package/dist/contract/index.d.ts +824 -107
  22. package/dist/contract/index.js +145 -1
  23. package/dist/contract/index.js.map +1 -1
  24. package/dist/control-Doncu-B_.d.ts +259 -0
  25. package/dist/{control-runtime.d.ts → control-runtime-Acf9CGhw.d.ts} +26 -23
  26. package/dist/control.d.ts +10 -11
  27. package/dist/corpus-D4YW9UoJ.d.ts +560 -0
  28. package/dist/{cost-ledger.d.ts → cost-ledger-DuSqlw5B.d.ts} +11 -10
  29. package/dist/{counterfactual.d.ts → counterfactual-DlOz8PBx.d.ts} +13 -12
  30. package/dist/{dataset.d.ts → dataset-BbGkaN2I.d.ts} +14 -11
  31. package/dist/{analyst/registry.d.ts → default-registry-GyE8X5SP.d.ts} +37 -8
  32. package/dist/diagnose.d.ts +252 -1
  33. package/dist/{trace/emitter.d.ts → emitter-C2rqGH_l.d.ts} +12 -9
  34. package/dist/{errors.d.ts → errors-CzMUYo7b.d.ts} +11 -10
  35. package/dist/failure-cluster-DH9Flgcf.d.ts +76 -0
  36. package/dist/{feedback-trajectory.d.ts → feedback-trajectory-BxY0cKfs.d.ts} +38 -36
  37. package/dist/fuzz.d.ts +547 -1
  38. package/dist/gepa-Dprxvz8r.d.ts +414 -0
  39. package/dist/governance/index.d.ts +135 -5
  40. package/dist/harness-optimizer-mOl9XX_O.d.ts +106 -0
  41. package/dist/hosted/index.d.ts +239 -10
  42. package/dist/index-_Y4oNOOb.d.ts +159 -0
  43. package/dist/index.d.ts +5660 -277
  44. package/dist/index.js +1 -1
  45. package/dist/{contract/insight-report.d.ts → insight-report-BnRjTibG.d.ts} +19 -16
  46. package/dist/{trace/integrity.d.ts → integrity-D2t12mMw.d.ts} +14 -11
  47. package/dist/{judge-calibration.d.ts → judge-calibration-0p2QcWNE.d.ts} +17 -16
  48. package/dist/{analyst/kind-factory.d.ts → kind-factory-X3eDYbKn.d.ts} +61 -10
  49. package/dist/knowledge/index.d.ts +103 -3
  50. package/dist/{llm-client.d.ts → llm-client-Bj7g0rqu.d.ts} +23 -21
  51. package/dist/matrix/index.d.ts +30 -12
  52. package/dist/meta-eval/index.d.ts +182 -6
  53. package/dist/{multi-layer-verifier.d.ts → multi-layer-verifier-DUZXrPDA.d.ts} +15 -12
  54. package/dist/multishot/index.d.ts +290 -7
  55. package/dist/{rl/off-policy.d.ts → off-policy-DiwuKKg7.d.ts} +9 -8
  56. package/dist/openapi.json +1 -1
  57. package/dist/{meta-eval/outcome-store.d.ts → outcome-store-rnXLEqSn.d.ts} +8 -7
  58. package/dist/{pareto.d.ts → pareto-E-pembql.d.ts} +10 -9
  59. package/dist/perf/index.d.ts +119 -13
  60. package/dist/pipelines/index.d.ts +173 -8
  61. package/dist/pre-registration-nfUdc9EQ.d.ts +483 -0
  62. package/dist/prm/index.d.ts +104 -5
  63. package/dist/provenance-CIxfBnkl.d.ts +426 -0
  64. package/dist/query-B7GGjRox.d.ts +32 -0
  65. package/dist/{trace/raw-provider-sink.d.ts → raw-provider-sink-C46HDghv.d.ts} +14 -13
  66. package/dist/{red-team.d.ts → red-team-BWdoyleI.d.ts} +16 -14
  67. package/dist/{trace/redact.d.ts → redact-B40YG2M_.d.ts} +8 -7
  68. package/dist/release-report-pidWUMZ2.d.ts +233 -0
  69. package/dist/reporting.d.ts +16 -15
  70. package/dist/{eval-campaign.d.ts → researcher-Jr8ME1dZ.d.ts} +156 -34
  71. package/dist/rl.d.ts +1193 -1
  72. package/dist/{prm/rubric.d.ts → rubric-Cc6UHvUb.d.ts} +13 -10
  73. package/dist/{meta-eval/rubric-predictive-validity.d.ts → rubric-predictive-validity-C2hDKM8Z.d.ts} +11 -8
  74. package/dist/run-critic-CmMf05uV.d.ts +56 -0
  75. package/dist/{run-record.d.ts → run-record-CP2ObebC.d.ts} +117 -15
  76. package/dist/runtime-trajectory-BOUUjI0y.d.ts +49 -0
  77. package/dist/{trace/schema.d.ts → schema-m0gsnbt3.d.ts} +30 -29
  78. package/dist/semantic-concept-judge-DSBB2Cfp.d.ts +624 -0
  79. package/dist/{sequential.d.ts → sequential-5iSVfzl2.d.ts} +10 -9
  80. package/dist/{series-convergence.d.ts → series-convergence-D5OWMBg6.d.ts} +5 -4
  81. package/dist/sink-fetch-B1Yg4Til.d.ts +101 -0
  82. package/dist/{statistics.d.ts → statistics-CCJpTGOS.d.ts} +48 -46
  83. package/dist/{trace/store.d.ts → store-BcFXE6LG.d.ts} +12 -21
  84. package/dist/{trace-analyst/types.d.ts → store-C1YxJDEK.d.ts} +74 -18
  85. package/dist/storyboard/index.d.ts +81 -16
  86. package/dist/{summary-report.d.ts → summary-report-CInXwsza.d.ts} +160 -23
  87. package/dist/telemetry/{sink-file.d.ts → file.d.ts} +7 -5
  88. package/dist/telemetry/index.d.ts +35 -17
  89. package/dist/{sandbox-harness.d.ts → test-graded-scenario-DeODGLra.d.ts} +60 -15
  90. package/dist/{locked-jsonl-appender.d.ts → testing-C21CHsq2.d.ts} +4 -3
  91. package/dist/testing.d.ts +1 -5
  92. package/dist/traces.d.ts +976 -4
  93. package/dist/{trajectory.d.ts → trajectory-2TkpSEVh.d.ts} +9 -8
  94. package/dist/{analyst/types.d.ts → types-B5x54y6n.d.ts} +112 -19
  95. package/dist/{campaign/types.d.ts → types-BMahhhio.d.ts} +47 -44
  96. package/dist/{matrix/types.d.ts → types-BUxNaJ8c.d.ts} +11 -9
  97. package/dist/{types.d.ts → types-C7DGg5ex.d.ts} +33 -31
  98. package/dist/{verdict.d.ts → verdict-C9MlYujm.d.ts} +3 -2
  99. package/dist/wire/index.d.ts +570 -13
  100. package/dist/workflow/index.d.ts +496 -22
  101. package/package.json +2 -2
  102. package/dist/action-policy.d.ts +0 -24
  103. package/dist/action-policy.d.ts.map +0 -1
  104. package/dist/action-policy.test.d.ts +0 -2
  105. package/dist/action-policy.test.d.ts.map +0 -1
  106. package/dist/active-learning.d.ts +0 -41
  107. package/dist/active-learning.d.ts.map +0 -1
  108. package/dist/adapters/http.d.ts.map +0 -1
  109. package/dist/adapters/langchain.d.ts.map +0 -1
  110. package/dist/adapters/otel.d.ts.map +0 -1
  111. package/dist/agent-profile-cell.d.ts +0 -101
  112. package/dist/agent-profile-cell.d.ts.map +0 -1
  113. package/dist/agent-profile.d.ts +0 -27
  114. package/dist/agent-profile.d.ts.map +0 -1
  115. package/dist/agent-profile.test.d.ts +0 -2
  116. package/dist/agent-profile.test.d.ts.map +0 -1
  117. package/dist/analyst/adapters.d.ts +0 -62
  118. package/dist/analyst/adapters.d.ts.map +0 -1
  119. package/dist/analyst/analyst.test.d.ts +0 -2
  120. package/dist/analyst/analyst.test.d.ts.map +0 -1
  121. package/dist/analyst/ax-service.d.ts +0 -27
  122. package/dist/analyst/ax-service.d.ts.map +0 -1
  123. package/dist/analyst/behavioral-analyst.d.ts +0 -28
  124. package/dist/analyst/behavioral-analyst.d.ts.map +0 -1
  125. package/dist/analyst/chat-client.d.ts +0 -91
  126. package/dist/analyst/chat-client.d.ts.map +0 -1
  127. package/dist/analyst/default-registry.d.ts +0 -27
  128. package/dist/analyst/default-registry.d.ts.map +0 -1
  129. package/dist/analyst/default-registry.test.d.ts +0 -2
  130. package/dist/analyst/default-registry.test.d.ts.map +0 -1
  131. package/dist/analyst/finding-signature.d.ts +0 -48
  132. package/dist/analyst/finding-signature.d.ts.map +0 -1
  133. package/dist/analyst/finding-subject.d.ts +0 -146
  134. package/dist/analyst/finding-subject.d.ts.map +0 -1
  135. package/dist/analyst/finding-subject.test.d.ts +0 -2
  136. package/dist/analyst/finding-subject.test.d.ts.map +0 -1
  137. package/dist/analyst/findings-store.d.ts +0 -75
  138. package/dist/analyst/findings-store.d.ts.map +0 -1
  139. package/dist/analyst/index.d.ts.map +0 -1
  140. package/dist/analyst/kind-factory.d.ts.map +0 -1
  141. package/dist/analyst/kinds/failure-mode.d.ts +0 -19
  142. package/dist/analyst/kinds/failure-mode.d.ts.map +0 -1
  143. package/dist/analyst/kinds/improvement.d.ts +0 -23
  144. package/dist/analyst/kinds/improvement.d.ts.map +0 -1
  145. package/dist/analyst/kinds/index.d.ts +0 -22
  146. package/dist/analyst/kinds/index.d.ts.map +0 -1
  147. package/dist/analyst/kinds/kinds.test.d.ts +0 -2
  148. package/dist/analyst/kinds/kinds.test.d.ts.map +0 -1
  149. package/dist/analyst/kinds/knowledge-gap.d.ts +0 -28
  150. package/dist/analyst/kinds/knowledge-gap.d.ts.map +0 -1
  151. package/dist/analyst/kinds/knowledge-poisoning.d.ts +0 -22
  152. package/dist/analyst/kinds/knowledge-poisoning.d.ts.map +0 -1
  153. package/dist/analyst/kinds/skill-usage.d.ts +0 -84
  154. package/dist/analyst/kinds/skill-usage.d.ts.map +0 -1
  155. package/dist/analyst/kinds/skill-usage.test.d.ts +0 -2
  156. package/dist/analyst/kinds/skill-usage.test.d.ts.map +0 -1
  157. package/dist/analyst/parse-tolerant.d.ts +0 -26
  158. package/dist/analyst/parse-tolerant.d.ts.map +0 -1
  159. package/dist/analyst/parse-tolerant.test.d.ts +0 -2
  160. package/dist/analyst/parse-tolerant.test.d.ts.map +0 -1
  161. package/dist/analyst/registry.budget.test.d.ts +0 -2
  162. package/dist/analyst/registry.budget.test.d.ts.map +0 -1
  163. package/dist/analyst/registry.d.ts.map +0 -1
  164. package/dist/analyst/steer-firewall.d.ts +0 -35
  165. package/dist/analyst/steer-firewall.d.ts.map +0 -1
  166. package/dist/analyst/steer-firewall.test.d.ts +0 -2
  167. package/dist/analyst/steer-firewall.test.d.ts.map +0 -1
  168. package/dist/analyst/structure-findings.d.ts +0 -37
  169. package/dist/analyst/structure-findings.d.ts.map +0 -1
  170. package/dist/analyst/structure-findings.test.d.ts +0 -2
  171. package/dist/analyst/structure-findings.test.d.ts.map +0 -1
  172. package/dist/analyst/tool-groups.d.ts +0 -34
  173. package/dist/analyst/tool-groups.d.ts.map +0 -1
  174. package/dist/analyst/types.d.ts.map +0 -1
  175. package/dist/anti-slop.d.ts +0 -59
  176. package/dist/anti-slop.d.ts.map +0 -1
  177. package/dist/artifact-validator.d.ts +0 -74
  178. package/dist/artifact-validator.d.ts.map +0 -1
  179. package/dist/attestation.d.ts +0 -63
  180. package/dist/attestation.d.ts.map +0 -1
  181. package/dist/attestation.test.d.ts +0 -2
  182. package/dist/attestation.test.d.ts.map +0 -1
  183. package/dist/authenticity/index.d.ts.map +0 -1
  184. package/dist/authenticity/index.test.d.ts +0 -2
  185. package/dist/authenticity/index.test.d.ts.map +0 -1
  186. package/dist/auto-pr.d.ts +0 -120
  187. package/dist/auto-pr.d.ts.map +0 -1
  188. package/dist/baseline.d.ts.map +0 -1
  189. package/dist/behavior-dsl.d.ts +0 -73
  190. package/dist/behavior-dsl.d.ts.map +0 -1
  191. package/dist/belief-state/calibration.d.ts +0 -10
  192. package/dist/belief-state/calibration.d.ts.map +0 -1
  193. package/dist/belief-state/calibration.test.d.ts +0 -2
  194. package/dist/belief-state/calibration.test.d.ts.map +0 -1
  195. package/dist/belief-state/code-agent-corpus.d.ts +0 -66
  196. package/dist/belief-state/code-agent-corpus.d.ts.map +0 -1
  197. package/dist/belief-state/code-agent-corpus.test.d.ts +0 -2
  198. package/dist/belief-state/code-agent-corpus.test.d.ts.map +0 -1
  199. package/dist/belief-state/code-agent-evidence.d.ts +0 -22
  200. package/dist/belief-state/code-agent-evidence.d.ts.map +0 -1
  201. package/dist/belief-state/code-agent-evidence.test.d.ts +0 -2
  202. package/dist/belief-state/code-agent-evidence.test.d.ts.map +0 -1
  203. package/dist/belief-state/extract.d.ts +0 -7
  204. package/dist/belief-state/extract.d.ts.map +0 -1
  205. package/dist/belief-state/extract.test.d.ts +0 -2
  206. package/dist/belief-state/extract.test.d.ts.map +0 -1
  207. package/dist/belief-state/index.d.ts.map +0 -1
  208. package/dist/belief-state/ope.d.ts +0 -17
  209. package/dist/belief-state/ope.d.ts.map +0 -1
  210. package/dist/belief-state/ope.test.d.ts +0 -2
  211. package/dist/belief-state/ope.test.d.ts.map +0 -1
  212. package/dist/belief-state/phase0-measurement.d.ts +0 -55
  213. package/dist/belief-state/phase0-measurement.d.ts.map +0 -1
  214. package/dist/belief-state/report.d.ts +0 -17
  215. package/dist/belief-state/report.d.ts.map +0 -1
  216. package/dist/belief-state/report.test.d.ts +0 -2
  217. package/dist/belief-state/report.test.d.ts.map +0 -1
  218. package/dist/belief-state/research-evidence.d.ts +0 -23
  219. package/dist/belief-state/research-evidence.d.ts.map +0 -1
  220. package/dist/belief-state/research-evidence.test.d.ts +0 -2
  221. package/dist/belief-state/research-evidence.test.d.ts.map +0 -1
  222. package/dist/belief-state/runtime-benchmark-corpus.d.ts +0 -32
  223. package/dist/belief-state/runtime-benchmark-corpus.d.ts.map +0 -1
  224. package/dist/belief-state/runtime-hooks.d.ts +0 -87
  225. package/dist/belief-state/runtime-hooks.d.ts.map +0 -1
  226. package/dist/belief-state/runtime-hooks.test.d.ts +0 -2
  227. package/dist/belief-state/runtime-hooks.test.d.ts.map +0 -1
  228. package/dist/belief-state/selective.d.ts +0 -15
  229. package/dist/belief-state/selective.d.ts.map +0 -1
  230. package/dist/belief-state/selective.test.d.ts +0 -2
  231. package/dist/belief-state/selective.test.d.ts.map +0 -1
  232. package/dist/belief-state/shadow-probe.d.ts +0 -80
  233. package/dist/belief-state/shadow-probe.d.ts.map +0 -1
  234. package/dist/belief-state/shadow-probe.test.d.ts +0 -2
  235. package/dist/belief-state/shadow-probe.test.d.ts.map +0 -1
  236. package/dist/belief-state/types.d.ts +0 -195
  237. package/dist/belief-state/types.d.ts.map +0 -1
  238. package/dist/belief-state/types.test.d.ts +0 -2
  239. package/dist/belief-state/types.test.d.ts.map +0 -1
  240. package/dist/benchmark.d.ts +0 -14
  241. package/dist/benchmark.d.ts.map +0 -1
  242. package/dist/benchmarks/index.d.ts.map +0 -1
  243. package/dist/benchmarks/routing/dataset.d.ts +0 -34
  244. package/dist/benchmarks/routing/dataset.d.ts.map +0 -1
  245. package/dist/benchmarks/routing/index.d.ts +0 -34
  246. package/dist/benchmarks/routing/index.d.ts.map +0 -1
  247. package/dist/benchmarks/types.d.ts +0 -49
  248. package/dist/benchmarks/types.d.ts.map +0 -1
  249. package/dist/bisector.d.ts +0 -81
  250. package/dist/bisector.d.ts.map +0 -1
  251. package/dist/budget-guard.d.ts +0 -31
  252. package/dist/budget-guard.d.ts.map +0 -1
  253. package/dist/builder-eval/builder-session.d.ts +0 -111
  254. package/dist/builder-eval/builder-session.d.ts.map +0 -1
  255. package/dist/builder-eval/correlation.d.ts +0 -32
  256. package/dist/builder-eval/correlation.d.ts.map +0 -1
  257. package/dist/builder-eval/index.d.ts.map +0 -1
  258. package/dist/builder-eval/project-registry.d.ts +0 -51
  259. package/dist/builder-eval/project-registry.d.ts.map +0 -1
  260. package/dist/builder-eval/three-layer-eval.d.ts +0 -55
  261. package/dist/builder-eval/three-layer-eval.d.ts.map +0 -1
  262. package/dist/campaign/analyst-surface.d.ts +0 -108
  263. package/dist/campaign/analyst-surface.d.ts.map +0 -1
  264. package/dist/campaign/analyst-surface.test.d.ts +0 -2
  265. package/dist/campaign/analyst-surface.test.d.ts.map +0 -1
  266. package/dist/campaign/auto-pr.d.ts +0 -46
  267. package/dist/campaign/auto-pr.d.ts.map +0 -1
  268. package/dist/campaign/distillation/agreement-judge.d.ts +0 -69
  269. package/dist/campaign/distillation/agreement-judge.d.ts.map +0 -1
  270. package/dist/campaign/distillation/cli.d.ts +0 -35
  271. package/dist/campaign/distillation/cli.d.ts.map +0 -1
  272. package/dist/campaign/distillation/distillation.test.d.ts +0 -2
  273. package/dist/campaign/distillation/distillation.test.d.ts.map +0 -1
  274. package/dist/campaign/distillation/gold-scenarios.d.ts +0 -54
  275. package/dist/campaign/distillation/gold-scenarios.d.ts.map +0 -1
  276. package/dist/campaign/distillation/run-distillation.d.ts +0 -119
  277. package/dist/campaign/distillation/run-distillation.d.ts.map +0 -1
  278. package/dist/campaign/gates/compose.d.ts +0 -12
  279. package/dist/campaign/gates/compose.d.ts.map +0 -1
  280. package/dist/campaign/gates/default-production-gate.d.ts +0 -58
  281. package/dist/campaign/gates/default-production-gate.d.ts.map +0 -1
  282. package/dist/campaign/gates/heldout-gate.d.ts +0 -12
  283. package/dist/campaign/gates/heldout-gate.d.ts.map +0 -1
  284. package/dist/campaign/gates/promotion-policy.d.ts +0 -125
  285. package/dist/campaign/gates/promotion-policy.d.ts.map +0 -1
  286. package/dist/campaign/gates/promotion-policy.test.d.ts +0 -2
  287. package/dist/campaign/gates/promotion-policy.test.d.ts.map +0 -1
  288. package/dist/campaign/gates/sequential.d.ts +0 -146
  289. package/dist/campaign/gates/sequential.d.ts.map +0 -1
  290. package/dist/campaign/gates/sequential.test.d.ts +0 -2
  291. package/dist/campaign/gates/sequential.test.d.ts.map +0 -1
  292. package/dist/campaign/gates/statistical-heldout.d.ts +0 -99
  293. package/dist/campaign/gates/statistical-heldout.d.ts.map +0 -1
  294. package/dist/campaign/gates/statistical-heldout.test.d.ts +0 -2
  295. package/dist/campaign/gates/statistical-heldout.test.d.ts.map +0 -1
  296. package/dist/campaign/index.d.ts.map +0 -1
  297. package/dist/campaign/labeled-store/fs-adapter.d.ts +0 -59
  298. package/dist/campaign/labeled-store/fs-adapter.d.ts.map +0 -1
  299. package/dist/campaign/presets/compare-proposers.d.ts +0 -146
  300. package/dist/campaign/presets/compare-proposers.d.ts.map +0 -1
  301. package/dist/campaign/presets/playback.d.ts +0 -120
  302. package/dist/campaign/presets/playback.d.ts.map +0 -1
  303. package/dist/campaign/presets/playback.test.d.ts +0 -2
  304. package/dist/campaign/presets/playback.test.d.ts.map +0 -1
  305. package/dist/campaign/presets/run-eval.d.ts +0 -14
  306. package/dist/campaign/presets/run-eval.d.ts.map +0 -1
  307. package/dist/campaign/presets/run-improvement-loop.d.ts +0 -63
  308. package/dist/campaign/presets/run-improvement-loop.d.ts.map +0 -1
  309. package/dist/campaign/presets/run-improvement-loop.test.d.ts +0 -2
  310. package/dist/campaign/presets/run-improvement-loop.test.d.ts.map +0 -1
  311. package/dist/campaign/presets/run-optimization.d.ts +0 -92
  312. package/dist/campaign/presets/run-optimization.d.ts.map +0 -1
  313. package/dist/campaign/presets/run-profile-matrix.d.ts +0 -151
  314. package/dist/campaign/presets/run-profile-matrix.d.ts.map +0 -1
  315. package/dist/campaign/presets/run-skill-opt.d.ts +0 -96
  316. package/dist/campaign/presets/run-skill-opt.d.ts.map +0 -1
  317. package/dist/campaign/proposers/_findings-text.d.ts +0 -22
  318. package/dist/campaign/proposers/_findings-text.d.ts.map +0 -1
  319. package/dist/campaign/proposers/ace.d.ts +0 -33
  320. package/dist/campaign/proposers/ace.d.ts.map +0 -1
  321. package/dist/campaign/proposers/ace.test.d.ts +0 -2
  322. package/dist/campaign/proposers/ace.test.d.ts.map +0 -1
  323. package/dist/campaign/proposers/analysis-edit.d.ts +0 -32
  324. package/dist/campaign/proposers/analysis-edit.d.ts.map +0 -1
  325. package/dist/campaign/proposers/evolutionary.d.ts +0 -20
  326. package/dist/campaign/proposers/evolutionary.d.ts.map +0 -1
  327. package/dist/campaign/proposers/fapo.d.ts +0 -120
  328. package/dist/campaign/proposers/fapo.d.ts.map +0 -1
  329. package/dist/campaign/proposers/gepa.d.ts +0 -86
  330. package/dist/campaign/proposers/gepa.d.ts.map +0 -1
  331. package/dist/campaign/proposers/halo.d.ts +0 -44
  332. package/dist/campaign/proposers/halo.d.ts.map +0 -1
  333. package/dist/campaign/proposers/halo.test.d.ts +0 -2
  334. package/dist/campaign/proposers/halo.test.d.ts.map +0 -1
  335. package/dist/campaign/proposers/memory.d.ts +0 -47
  336. package/dist/campaign/proposers/memory.d.ts.map +0 -1
  337. package/dist/campaign/proposers/memory.test.d.ts +0 -2
  338. package/dist/campaign/proposers/memory.test.d.ts.map +0 -1
  339. package/dist/campaign/proposers/skill-opt.d.ts +0 -88
  340. package/dist/campaign/proposers/skill-opt.d.ts.map +0 -1
  341. package/dist/campaign/proposers/trace-analyst.d.ts +0 -48
  342. package/dist/campaign/proposers/trace-analyst.d.ts.map +0 -1
  343. package/dist/campaign/proposers/trace-analyst.test.d.ts +0 -2
  344. package/dist/campaign/proposers/trace-analyst.test.d.ts.map +0 -1
  345. package/dist/campaign/provenance.d.ts +0 -185
  346. package/dist/campaign/provenance.d.ts.map +0 -1
  347. package/dist/campaign/run-campaign.d.ts +0 -90
  348. package/dist/campaign/run-campaign.d.ts.map +0 -1
  349. package/dist/campaign/score-utils.d.ts +0 -26
  350. package/dist/campaign/score-utils.d.ts.map +0 -1
  351. package/dist/campaign/skill-patch.d.ts +0 -62
  352. package/dist/campaign/skill-patch.d.ts.map +0 -1
  353. package/dist/campaign/storage.d.ts +0 -38
  354. package/dist/campaign/storage.d.ts.map +0 -1
  355. package/dist/campaign/types.d.ts.map +0 -1
  356. package/dist/campaign/worktree/index.d.ts +0 -53
  357. package/dist/campaign/worktree/index.d.ts.map +0 -1
  358. package/dist/canary.d.ts +0 -101
  359. package/dist/canary.d.ts.map +0 -1
  360. package/dist/causal-attribution.d.ts +0 -45
  361. package/dist/causal-attribution.d.ts.map +0 -1
  362. package/dist/chunk-AQ5WQAIV.js.map +0 -1
  363. package/dist/ci-gate.d.ts +0 -44
  364. package/dist/ci-gate.d.ts.map +0 -1
  365. package/dist/cli.d.ts.map +0 -1
  366. package/dist/client.d.ts +0 -77
  367. package/dist/client.d.ts.map +0 -1
  368. package/dist/client.test.d.ts +0 -2
  369. package/dist/client.test.d.ts.map +0 -1
  370. package/dist/command-runner.d.ts +0 -74
  371. package/dist/command-runner.d.ts.map +0 -1
  372. package/dist/command-runner.test.d.ts +0 -2
  373. package/dist/command-runner.test.d.ts.map +0 -1
  374. package/dist/completion-verifier.d.ts +0 -147
  375. package/dist/completion-verifier.d.ts.map +0 -1
  376. package/dist/completion-verifier.test.d.ts +0 -9
  377. package/dist/completion-verifier.test.d.ts.map +0 -1
  378. package/dist/concurrency.d.ts +0 -23
  379. package/dist/concurrency.d.ts.map +0 -1
  380. package/dist/contamination-guard.d.ts +0 -81
  381. package/dist/contamination-guard.d.ts.map +0 -1
  382. package/dist/contract/analyze-runs.d.ts.map +0 -1
  383. package/dist/contract/define-agent-eval.d.ts +0 -52
  384. package/dist/contract/define-agent-eval.d.ts.map +0 -1
  385. package/dist/contract/diff.d.ts +0 -114
  386. package/dist/contract/diff.d.ts.map +0 -1
  387. package/dist/contract/index.d.ts.map +0 -1
  388. package/dist/contract/insight-report.d.ts.map +0 -1
  389. package/dist/contract/insight-types-fwd.d.ts +0 -7
  390. package/dist/contract/insight-types-fwd.d.ts.map +0 -1
  391. package/dist/contract/intake/agent-trace.d.ts +0 -97
  392. package/dist/contract/intake/agent-trace.d.ts.map +0 -1
  393. package/dist/contract/intake/code-agent-session.d.ts.map +0 -1
  394. package/dist/contract/intake/feedback-table.d.ts +0 -87
  395. package/dist/contract/intake/feedback-table.d.ts.map +0 -1
  396. package/dist/contract/intake/index.d.ts +0 -22
  397. package/dist/contract/intake/index.d.ts.map +0 -1
  398. package/dist/contract/intake/otel-spans.d.ts +0 -33
  399. package/dist/contract/intake/otel-spans.d.ts.map +0 -1
  400. package/dist/contract/self-improve.d.ts +0 -284
  401. package/dist/contract/self-improve.d.ts.map +0 -1
  402. package/dist/control-runtime.d.ts.map +0 -1
  403. package/dist/control-runtime.test.d.ts +0 -2
  404. package/dist/control-runtime.test.d.ts.map +0 -1
  405. package/dist/control.d.ts.map +0 -1
  406. package/dist/convergence.d.ts +0 -29
  407. package/dist/convergence.d.ts.map +0 -1
  408. package/dist/cost-ledger.d.ts.map +0 -1
  409. package/dist/cost-ledger.test.d.ts +0 -2
  410. package/dist/cost-ledger.test.d.ts.map +0 -1
  411. package/dist/cost-report.d.ts +0 -43
  412. package/dist/cost-report.d.ts.map +0 -1
  413. package/dist/cost-report.test.d.ts +0 -2
  414. package/dist/cost-report.test.d.ts.map +0 -1
  415. package/dist/cost-tracker.d.ts +0 -76
  416. package/dist/cost-tracker.d.ts.map +0 -1
  417. package/dist/counterfactual.d.ts.map +0 -1
  418. package/dist/cross-trace-diff.d.ts +0 -56
  419. package/dist/cross-trace-diff.d.ts.map +0 -1
  420. package/dist/dataset.d.ts.map +0 -1
  421. package/dist/deploy-gate-layer.d.ts +0 -125
  422. package/dist/deploy-gate-layer.d.ts.map +0 -1
  423. package/dist/deploy-gate-layer.test.d.ts +0 -2
  424. package/dist/deploy-gate-layer.test.d.ts.map +0 -1
  425. package/dist/description-length-gate.d.ts +0 -119
  426. package/dist/description-length-gate.d.ts.map +0 -1
  427. package/dist/detectors/edge.test.d.ts +0 -2
  428. package/dist/detectors/edge.test.d.ts.map +0 -1
  429. package/dist/detectors/index.d.ts +0 -81
  430. package/dist/detectors/index.d.ts.map +0 -1
  431. package/dist/detectors/index.test.d.ts +0 -2
  432. package/dist/detectors/index.test.d.ts.map +0 -1
  433. package/dist/diagnose/causal-sweep.d.ts +0 -100
  434. package/dist/diagnose/causal-sweep.d.ts.map +0 -1
  435. package/dist/diagnose/index.d.ts +0 -36
  436. package/dist/diagnose/index.d.ts.map +0 -1
  437. package/dist/diagnose/remediation.d.ts +0 -68
  438. package/dist/diagnose/remediation.d.ts.map +0 -1
  439. package/dist/diagnose/repair.d.ts +0 -77
  440. package/dist/diagnose/repair.d.ts.map +0 -1
  441. package/dist/discover-personas.d.ts +0 -35
  442. package/dist/discover-personas.d.ts.map +0 -1
  443. package/dist/driver.d.ts +0 -95
  444. package/dist/driver.d.ts.map +0 -1
  445. package/dist/driver.test.d.ts +0 -8
  446. package/dist/driver.test.d.ts.map +0 -1
  447. package/dist/dual-agent-bench.d.ts +0 -81
  448. package/dist/dual-agent-bench.d.ts.map +0 -1
  449. package/dist/error-count-extractor.d.ts +0 -47
  450. package/dist/error-count-extractor.d.ts.map +0 -1
  451. package/dist/error-count-extractor.test.d.ts +0 -2
  452. package/dist/error-count-extractor.test.d.ts.map +0 -1
  453. package/dist/errors.d.ts.map +0 -1
  454. package/dist/eval-campaign.d.ts.map +0 -1
  455. package/dist/eval-campaign.test.d.ts +0 -2
  456. package/dist/eval-campaign.test.d.ts.map +0 -1
  457. package/dist/eval-tools.d.ts +0 -55
  458. package/dist/eval-tools.d.ts.map +0 -1
  459. package/dist/eval-trace-store.d.ts +0 -107
  460. package/dist/eval-trace-store.d.ts.map +0 -1
  461. package/dist/eval-trace-store.test.d.ts +0 -2
  462. package/dist/eval-trace-store.test.d.ts.map +0 -1
  463. package/dist/executor.d.ts +0 -38
  464. package/dist/executor.d.ts.map +0 -1
  465. package/dist/executor.test.d.ts +0 -10
  466. package/dist/executor.test.d.ts.map +0 -1
  467. package/dist/experiment-tracker.d.ts +0 -178
  468. package/dist/experiment-tracker.d.ts.map +0 -1
  469. package/dist/experiment-tracker.test.d.ts +0 -2
  470. package/dist/experiment-tracker.test.d.ts.map +0 -1
  471. package/dist/failure-taxonomy.d.ts +0 -38
  472. package/dist/failure-taxonomy.d.ts.map +0 -1
  473. package/dist/feedback-trajectory.d.ts.map +0 -1
  474. package/dist/feedback-trajectory.test.d.ts +0 -2
  475. package/dist/feedback-trajectory.test.d.ts.map +0 -1
  476. package/dist/flow-layer.d.ts +0 -90
  477. package/dist/flow-layer.d.ts.map +0 -1
  478. package/dist/flow-layer.test.d.ts +0 -2
  479. package/dist/flow-layer.test.d.ts.map +0 -1
  480. package/dist/fuzz/capsule.d.ts +0 -46
  481. package/dist/fuzz/capsule.d.ts.map +0 -1
  482. package/dist/fuzz/cube.d.ts +0 -36
  483. package/dist/fuzz/cube.d.ts.map +0 -1
  484. package/dist/fuzz/explorer-cost.test.d.ts +0 -2
  485. package/dist/fuzz/explorer-cost.test.d.ts.map +0 -1
  486. package/dist/fuzz/explorer.d.ts +0 -64
  487. package/dist/fuzz/explorer.d.ts.map +0 -1
  488. package/dist/fuzz/fuzz-agent.d.ts +0 -16
  489. package/dist/fuzz/fuzz-agent.d.ts.map +0 -1
  490. package/dist/fuzz/fuzz-agent.test.d.ts +0 -2
  491. package/dist/fuzz/fuzz-agent.test.d.ts.map +0 -1
  492. package/dist/fuzz/gates.d.ts +0 -33
  493. package/dist/fuzz/gates.d.ts.map +0 -1
  494. package/dist/fuzz/index.d.ts +0 -26
  495. package/dist/fuzz/index.d.ts.map +0 -1
  496. package/dist/fuzz/policies.d.ts +0 -28
  497. package/dist/fuzz/policies.d.ts.map +0 -1
  498. package/dist/fuzz/tools.d.ts +0 -20
  499. package/dist/fuzz/tools.d.ts.map +0 -1
  500. package/dist/fuzz/types.d.ts +0 -307
  501. package/dist/fuzz/types.d.ts.map +0 -1
  502. package/dist/golden-matcher.d.ts +0 -71
  503. package/dist/golden-matcher.d.ts.map +0 -1
  504. package/dist/governance/eu-ai-act.d.ts +0 -37
  505. package/dist/governance/eu-ai-act.d.ts.map +0 -1
  506. package/dist/governance/index.d.ts.map +0 -1
  507. package/dist/governance/nist-ai-rmf.d.ts +0 -15
  508. package/dist/governance/nist-ai-rmf.d.ts.map +0 -1
  509. package/dist/governance/soc2.d.ts +0 -12
  510. package/dist/governance/soc2.d.ts.map +0 -1
  511. package/dist/governance/types.d.ts +0 -66
  512. package/dist/governance/types.d.ts.map +0 -1
  513. package/dist/harness-optimizer.d.ts +0 -82
  514. package/dist/harness-optimizer.d.ts.map +0 -1
  515. package/dist/held-out-gate.d.ts +0 -135
  516. package/dist/held-out-gate.d.ts.map +0 -1
  517. package/dist/hosted/client.d.ts +0 -73
  518. package/dist/hosted/client.d.ts.map +0 -1
  519. package/dist/hosted/from-env.test.d.ts +0 -8
  520. package/dist/hosted/from-env.test.d.ts.map +0 -1
  521. package/dist/hosted/index.d.ts.map +0 -1
  522. package/dist/hosted/types.d.ts +0 -159
  523. package/dist/hosted/types.d.ts.map +0 -1
  524. package/dist/index.d.ts.map +0 -1
  525. package/dist/integrity/backend-integrity.d.ts +0 -71
  526. package/dist/integrity/backend-integrity.d.ts.map +0 -1
  527. package/dist/integrity/preflight.d.ts +0 -72
  528. package/dist/integrity/preflight.d.ts.map +0 -1
  529. package/dist/integrity/preflight.test.d.ts +0 -2
  530. package/dist/integrity/preflight.test.d.ts.map +0 -1
  531. package/dist/integrity/single-backend.d.ts +0 -67
  532. package/dist/integrity/single-backend.d.ts.map +0 -1
  533. package/dist/intent-match-judge.d.ts +0 -69
  534. package/dist/intent-match-judge.d.ts.map +0 -1
  535. package/dist/intent-match-judge.test.d.ts +0 -2
  536. package/dist/intent-match-judge.test.d.ts.map +0 -1
  537. package/dist/judge-calibration.d.ts.map +0 -1
  538. package/dist/judge-ensemble.d.ts +0 -66
  539. package/dist/judge-ensemble.d.ts.map +0 -1
  540. package/dist/judge-ensemble.test.d.ts +0 -8
  541. package/dist/judge-ensemble.test.d.ts.map +0 -1
  542. package/dist/judge-families.d.ts +0 -38
  543. package/dist/judge-families.d.ts.map +0 -1
  544. package/dist/judge-panel.d.ts +0 -65
  545. package/dist/judge-panel.d.ts.map +0 -1
  546. package/dist/judge-retry.d.ts +0 -70
  547. package/dist/judge-retry.d.ts.map +0 -1
  548. package/dist/judge-runner.d.ts +0 -36
  549. package/dist/judge-runner.d.ts.map +0 -1
  550. package/dist/judge-runner.test.d.ts +0 -2
  551. package/dist/judge-runner.test.d.ts.map +0 -1
  552. package/dist/judges.d.ts +0 -74
  553. package/dist/judges.d.ts.map +0 -1
  554. package/dist/keyword-coverage-judge.d.ts +0 -89
  555. package/dist/keyword-coverage-judge.d.ts.map +0 -1
  556. package/dist/keyword-coverage-judge.test.d.ts +0 -2
  557. package/dist/keyword-coverage-judge.test.d.ts.map +0 -1
  558. package/dist/knowledge/index.d.ts.map +0 -1
  559. package/dist/knowledge/readiness.d.ts +0 -26
  560. package/dist/knowledge/readiness.d.ts.map +0 -1
  561. package/dist/knowledge/types.d.ts +0 -75
  562. package/dist/knowledge/types.d.ts.map +0 -1
  563. package/dist/live-proof.d.ts +0 -62
  564. package/dist/live-proof.d.ts.map +0 -1
  565. package/dist/llm-client.d.ts.map +0 -1
  566. package/dist/llm-client.test.d.ts +0 -2
  567. package/dist/llm-client.test.d.ts.map +0 -1
  568. package/dist/locked-jsonl-appender.d.ts.map +0 -1
  569. package/dist/matrix/aggregation.d.ts +0 -16
  570. package/dist/matrix/aggregation.d.ts.map +0 -1
  571. package/dist/matrix/index.d.ts.map +0 -1
  572. package/dist/matrix/runner.d.ts +0 -15
  573. package/dist/matrix/runner.d.ts.map +0 -1
  574. package/dist/matrix/types.d.ts.map +0 -1
  575. package/dist/meta-eval/calibration.d.ts +0 -47
  576. package/dist/meta-eval/calibration.d.ts.map +0 -1
  577. package/dist/meta-eval/correlation-study.d.ts +0 -53
  578. package/dist/meta-eval/correlation-study.d.ts.map +0 -1
  579. package/dist/meta-eval/index.d.ts.map +0 -1
  580. package/dist/meta-eval/outcome-store.d.ts.map +0 -1
  581. package/dist/meta-eval/rubric-predictive-validity.d.ts.map +0 -1
  582. package/dist/meta-eval/sentinel.d.ts +0 -169
  583. package/dist/meta-eval/sentinel.d.ts.map +0 -1
  584. package/dist/metrics.d.ts +0 -63
  585. package/dist/metrics.d.ts.map +0 -1
  586. package/dist/model-seats.d.ts +0 -71
  587. package/dist/model-seats.d.ts.map +0 -1
  588. package/dist/model-seats.test.d.ts +0 -2
  589. package/dist/model-seats.test.d.ts.map +0 -1
  590. package/dist/muffled-gate-scanner.d.ts +0 -102
  591. package/dist/muffled-gate-scanner.d.ts.map +0 -1
  592. package/dist/multi-layer-verifier.d.ts.map +0 -1
  593. package/dist/multi-layer-verifier.test.d.ts +0 -2
  594. package/dist/multi-layer-verifier.test.d.ts.map +0 -1
  595. package/dist/multi-toolchain-layer.d.ts +0 -80
  596. package/dist/multi-toolchain-layer.d.ts.map +0 -1
  597. package/dist/multi-toolchain-layer.test.d.ts +0 -2
  598. package/dist/multi-toolchain-layer.test.d.ts.map +0 -1
  599. package/dist/multishot/default-tools.d.ts +0 -34
  600. package/dist/multishot/default-tools.d.ts.map +0 -1
  601. package/dist/multishot/index.d.ts.map +0 -1
  602. package/dist/multishot/judges.d.ts +0 -32
  603. package/dist/multishot/judges.d.ts.map +0 -1
  604. package/dist/multishot/matrix.d.ts +0 -107
  605. package/dist/multishot/matrix.d.ts.map +0 -1
  606. package/dist/multishot/multishot.d.ts +0 -23
  607. package/dist/multishot/multishot.d.ts.map +0 -1
  608. package/dist/multishot/router.d.ts +0 -37
  609. package/dist/multishot/router.d.ts.map +0 -1
  610. package/dist/multishot/types.d.ts +0 -60
  611. package/dist/multishot/types.d.ts.map +0 -1
  612. package/dist/observability.d.ts +0 -71
  613. package/dist/observability.d.ts.map +0 -1
  614. package/dist/oracle.d.ts +0 -55
  615. package/dist/oracle.d.ts.map +0 -1
  616. package/dist/orthogonality.d.ts +0 -35
  617. package/dist/orthogonality.d.ts.map +0 -1
  618. package/dist/otel-pipeline.d.ts +0 -31
  619. package/dist/otel-pipeline.d.ts.map +0 -1
  620. package/dist/paraphrase.d.ts +0 -107
  621. package/dist/paraphrase.d.ts.map +0 -1
  622. package/dist/pareto.d.ts.map +0 -1
  623. package/dist/partition-held-out.d.ts +0 -70
  624. package/dist/partition-held-out.d.ts.map +0 -1
  625. package/dist/partition-held-out.test.d.ts +0 -2
  626. package/dist/partition-held-out.test.d.ts.map +0 -1
  627. package/dist/perf/index.d.ts.map +0 -1
  628. package/dist/perf/integrity.d.ts +0 -30
  629. package/dist/perf/integrity.d.ts.map +0 -1
  630. package/dist/perf/journey.d.ts +0 -45
  631. package/dist/perf/journey.d.ts.map +0 -1
  632. package/dist/perf/ratchet.d.ts +0 -47
  633. package/dist/perf/ratchet.d.ts.map +0 -1
  634. package/dist/pipelines/budget-breach.d.ts +0 -31
  635. package/dist/pipelines/budget-breach.d.ts.map +0 -1
  636. package/dist/pipelines/budget-breach.test.d.ts +0 -2
  637. package/dist/pipelines/budget-breach.test.d.ts.map +0 -1
  638. package/dist/pipelines/failure-cluster.d.ts +0 -38
  639. package/dist/pipelines/failure-cluster.d.ts.map +0 -1
  640. package/dist/pipelines/failure-cluster.test.d.ts +0 -2
  641. package/dist/pipelines/failure-cluster.test.d.ts.map +0 -1
  642. package/dist/pipelines/first-divergence.d.ts +0 -26
  643. package/dist/pipelines/first-divergence.d.ts.map +0 -1
  644. package/dist/pipelines/first-divergence.test.d.ts +0 -2
  645. package/dist/pipelines/first-divergence.test.d.ts.map +0 -1
  646. package/dist/pipelines/index.d.ts.map +0 -1
  647. package/dist/pipelines/judge-agreement.d.ts +0 -26
  648. package/dist/pipelines/judge-agreement.d.ts.map +0 -1
  649. package/dist/pipelines/judge-agreement.test.d.ts +0 -2
  650. package/dist/pipelines/judge-agreement.test.d.ts.map +0 -1
  651. package/dist/pipelines/regression.d.ts +0 -23
  652. package/dist/pipelines/regression.d.ts.map +0 -1
  653. package/dist/pipelines/regression.test.d.ts +0 -2
  654. package/dist/pipelines/regression.test.d.ts.map +0 -1
  655. package/dist/pipelines/stuck-loop.d.ts +0 -32
  656. package/dist/pipelines/stuck-loop.d.ts.map +0 -1
  657. package/dist/pipelines/stuck-loop.test.d.ts +0 -2
  658. package/dist/pipelines/stuck-loop.test.d.ts.map +0 -1
  659. package/dist/pipelines/tool-waste.d.ts +0 -34
  660. package/dist/pipelines/tool-waste.d.ts.map +0 -1
  661. package/dist/pipelines/tool-waste.test.d.ts +0 -2
  662. package/dist/pipelines/tool-waste.test.d.ts.map +0 -1
  663. package/dist/playbook.d.ts +0 -16
  664. package/dist/playbook.d.ts.map +0 -1
  665. package/dist/pr-review-benchmark.d.ts +0 -88
  666. package/dist/pr-review-benchmark.d.ts.map +0 -1
  667. package/dist/pr-review-benchmark.test.d.ts +0 -2
  668. package/dist/pr-review-benchmark.test.d.ts.map +0 -1
  669. package/dist/pre-registration.d.ts +0 -125
  670. package/dist/pre-registration.d.ts.map +0 -1
  671. package/dist/prm/builtin-rubrics.d.ts +0 -33
  672. package/dist/prm/builtin-rubrics.d.ts.map +0 -1
  673. package/dist/prm/index.d.ts.map +0 -1
  674. package/dist/prm/inference.d.ts +0 -29
  675. package/dist/prm/inference.d.ts.map +0 -1
  676. package/dist/prm/inference.test.d.ts +0 -2
  677. package/dist/prm/inference.test.d.ts.map +0 -1
  678. package/dist/prm/rubric.d.ts.map +0 -1
  679. package/dist/prm/training-export.d.ts +0 -38
  680. package/dist/prm/training-export.d.ts.map +0 -1
  681. package/dist/produced-state.d.ts +0 -63
  682. package/dist/produced-state.d.ts.map +0 -1
  683. package/dist/produced-state.test.d.ts +0 -8
  684. package/dist/produced-state.test.d.ts.map +0 -1
  685. package/dist/profile/baselines.d.ts +0 -37
  686. package/dist/profile/baselines.d.ts.map +0 -1
  687. package/dist/profile/index.d.ts +0 -105
  688. package/dist/profile/index.d.ts.map +0 -1
  689. package/dist/promotion-gate.d.ts +0 -93
  690. package/dist/promotion-gate.d.ts.map +0 -1
  691. package/dist/prompt-registry.d.ts +0 -41
  692. package/dist/prompt-registry.d.ts.map +0 -1
  693. package/dist/propose-review-control.d.ts +0 -49
  694. package/dist/propose-review-control.d.ts.map +0 -1
  695. package/dist/propose-review-control.test.d.ts +0 -2
  696. package/dist/propose-review-control.test.d.ts.map +0 -1
  697. package/dist/propose-review.d.ts +0 -155
  698. package/dist/propose-review.d.ts.map +0 -1
  699. package/dist/red-team.d.ts.map +0 -1
  700. package/dist/reference-replay-steering.d.ts +0 -11
  701. package/dist/reference-replay-steering.d.ts.map +0 -1
  702. package/dist/reference-replay.d.ts +0 -176
  703. package/dist/reference-replay.d.ts.map +0 -1
  704. package/dist/reflective-mutation.d.ts +0 -79
  705. package/dist/reflective-mutation.d.ts.map +0 -1
  706. package/dist/registry.d.ts +0 -31
  707. package/dist/registry.d.ts.map +0 -1
  708. package/dist/release-confidence.d.ts +0 -128
  709. package/dist/release-confidence.d.ts.map +0 -1
  710. package/dist/release-report.d.ts +0 -11
  711. package/dist/release-report.d.ts.map +0 -1
  712. package/dist/replay.d.ts +0 -120
  713. package/dist/replay.d.ts.map +0 -1
  714. package/dist/reporter.d.ts +0 -14
  715. package/dist/reporter.d.ts.map +0 -1
  716. package/dist/reporting.d.ts.map +0 -1
  717. package/dist/researcher.d.ts +0 -140
  718. package/dist/researcher.d.ts.map +0 -1
  719. package/dist/reviewer.d.ts +0 -118
  720. package/dist/reviewer.d.ts.map +0 -1
  721. package/dist/reviewer.test.d.ts +0 -2
  722. package/dist/reviewer.test.d.ts.map +0 -1
  723. package/dist/reward-model-export.d.ts +0 -60
  724. package/dist/reward-model-export.d.ts.map +0 -1
  725. package/dist/rl/active-curriculum.d.ts +0 -110
  726. package/dist/rl/active-curriculum.d.ts.map +0 -1
  727. package/dist/rl/adaptation-eval.d.ts +0 -109
  728. package/dist/rl/adaptation-eval.d.ts.map +0 -1
  729. package/dist/rl/adversarial.d.ts.map +0 -1
  730. package/dist/rl/compute-curves.d.ts +0 -127
  731. package/dist/rl/compute-curves.d.ts.map +0 -1
  732. package/dist/rl/contamination.d.ts +0 -117
  733. package/dist/rl/contamination.d.ts.map +0 -1
  734. package/dist/rl/corpus.d.ts +0 -55
  735. package/dist/rl/corpus.d.ts.map +0 -1
  736. package/dist/rl/corpus.test.d.ts +0 -2
  737. package/dist/rl/corpus.test.d.ts.map +0 -1
  738. package/dist/rl/dataset.d.ts +0 -102
  739. package/dist/rl/dataset.d.ts.map +0 -1
  740. package/dist/rl/dataset.test.d.ts +0 -2
  741. package/dist/rl/dataset.test.d.ts.map +0 -1
  742. package/dist/rl/exporters.d.ts +0 -141
  743. package/dist/rl/exporters.d.ts.map +0 -1
  744. package/dist/rl/index.d.ts +0 -49
  745. package/dist/rl/index.d.ts.map +0 -1
  746. package/dist/rl/off-policy.d.ts.map +0 -1
  747. package/dist/rl/predictive-validity-researcher.d.ts +0 -69
  748. package/dist/rl/predictive-validity-researcher.d.ts.map +0 -1
  749. package/dist/rl/preferences.d.ts +0 -141
  750. package/dist/rl/preferences.d.ts.map +0 -1
  751. package/dist/rl/process-reward.d.ts +0 -122
  752. package/dist/rl/process-reward.d.ts.map +0 -1
  753. package/dist/rl/reward-hacking.d.ts +0 -104
  754. package/dist/rl/reward-hacking.d.ts.map +0 -1
  755. package/dist/rl/rl-campaign.d.ts +0 -85
  756. package/dist/rl/rl-campaign.d.ts.map +0 -1
  757. package/dist/rl/run-record-adapters.d.ts +0 -56
  758. package/dist/rl/run-record-adapters.d.ts.map +0 -1
  759. package/dist/rl/sim-fidelity.d.ts +0 -166
  760. package/dist/rl/sim-fidelity.d.ts.map +0 -1
  761. package/dist/rl/sim-fidelity.test.d.ts +0 -2
  762. package/dist/rl/sim-fidelity.test.d.ts.map +0 -1
  763. package/dist/rl/tournament.d.ts +0 -115
  764. package/dist/rl/tournament.d.ts.map +0 -1
  765. package/dist/rl/verifiable-reward.d.ts +0 -124
  766. package/dist/rl/verifiable-reward.d.ts.map +0 -1
  767. package/dist/run-critic.d.ts +0 -23
  768. package/dist/run-critic.d.ts.map +0 -1
  769. package/dist/run-evidence.d.ts +0 -32
  770. package/dist/run-evidence.d.ts.map +0 -1
  771. package/dist/run-record.d.ts.map +0 -1
  772. package/dist/run-record.test.d.ts +0 -2
  773. package/dist/run-record.test.d.ts.map +0 -1
  774. package/dist/run-score.d.ts +0 -31
  775. package/dist/run-score.d.ts.map +0 -1
  776. package/dist/runtime-trajectory.d.ts +0 -47
  777. package/dist/runtime-trajectory.d.ts.map +0 -1
  778. package/dist/sandbox-harness.d.ts.map +0 -1
  779. package/dist/sandbox-harness.test.d.ts +0 -2
  780. package/dist/sandbox-harness.test.d.ts.map +0 -1
  781. package/dist/sandbox-pool.d.ts +0 -74
  782. package/dist/sandbox-pool.d.ts.map +0 -1
  783. package/dist/sandbox-pool.test.d.ts +0 -2
  784. package/dist/sandbox-pool.test.d.ts.map +0 -1
  785. package/dist/scorecard.d.ts +0 -133
  786. package/dist/scorecard.d.ts.map +0 -1
  787. package/dist/scorecard.test.d.ts +0 -2
  788. package/dist/scorecard.test.d.ts.map +0 -1
  789. package/dist/self-play.d.ts +0 -69
  790. package/dist/self-play.d.ts.map +0 -1
  791. package/dist/semantic-concept-judge.d.ts +0 -135
  792. package/dist/semantic-concept-judge.d.ts.map +0 -1
  793. package/dist/semantic-concept-judge.test.d.ts +0 -2
  794. package/dist/semantic-concept-judge.test.d.ts.map +0 -1
  795. package/dist/sequential.d.ts.map +0 -1
  796. package/dist/series-convergence.d.ts.map +0 -1
  797. package/dist/slo.d.ts +0 -48
  798. package/dist/slo.d.ts.map +0 -1
  799. package/dist/state-continuity.d.ts +0 -47
  800. package/dist/state-continuity.d.ts.map +0 -1
  801. package/dist/statistics.d.ts.map +0 -1
  802. package/dist/statistics.test.d.ts +0 -2
  803. package/dist/statistics.test.d.ts.map +0 -1
  804. package/dist/steering-optimizer.d.ts +0 -58
  805. package/dist/steering-optimizer.d.ts.map +0 -1
  806. package/dist/steering.d.ts +0 -24
  807. package/dist/steering.d.ts.map +0 -1
  808. package/dist/storyboard/code-edit.d.ts +0 -64
  809. package/dist/storyboard/code-edit.d.ts.map +0 -1
  810. package/dist/storyboard/code-edit.test.d.ts +0 -2
  811. package/dist/storyboard/code-edit.test.d.ts.map +0 -1
  812. package/dist/storyboard/index.d.ts.map +0 -1
  813. package/dist/storyboard/index.test.d.ts +0 -2
  814. package/dist/storyboard/index.test.d.ts.map +0 -1
  815. package/dist/summary-report.d.ts.map +0 -1
  816. package/dist/telemetry/client.d.ts +0 -35
  817. package/dist/telemetry/client.d.ts.map +0 -1
  818. package/dist/telemetry/index.d.ts.map +0 -1
  819. package/dist/telemetry/schema.d.ts +0 -61
  820. package/dist/telemetry/schema.d.ts.map +0 -1
  821. package/dist/telemetry/sink-fetch.d.ts +0 -39
  822. package/dist/telemetry/sink-fetch.d.ts.map +0 -1
  823. package/dist/telemetry/sink-file.d.ts.map +0 -1
  824. package/dist/test-graded-scenario.d.ts +0 -42
  825. package/dist/test-graded-scenario.d.ts.map +0 -1
  826. package/dist/testing.d.ts.map +0 -1
  827. package/dist/tool-use-metrics.d.ts +0 -35
  828. package/dist/tool-use-metrics.d.ts.map +0 -1
  829. package/dist/trace/capture-fetch.d.ts +0 -48
  830. package/dist/trace/capture-fetch.d.ts.map +0 -1
  831. package/dist/trace/capture-fetch.test.d.ts +0 -2
  832. package/dist/trace/capture-fetch.test.d.ts.map +0 -1
  833. package/dist/trace/emitter.d.ts.map +0 -1
  834. package/dist/trace/extract-usage.d.ts +0 -46
  835. package/dist/trace/extract-usage.d.ts.map +0 -1
  836. package/dist/trace/extract-usage.test.d.ts +0 -2
  837. package/dist/trace/extract-usage.test.d.ts.map +0 -1
  838. package/dist/trace/index.d.ts +0 -15
  839. package/dist/trace/index.d.ts.map +0 -1
  840. package/dist/trace/integrity.d.ts.map +0 -1
  841. package/dist/trace/otel-bridge.d.ts +0 -29
  842. package/dist/trace/otel-bridge.d.ts.map +0 -1
  843. package/dist/trace/otel-export.d.ts +0 -52
  844. package/dist/trace/otel-export.d.ts.map +0 -1
  845. package/dist/trace/otel.d.ts +0 -57
  846. package/dist/trace/otel.d.ts.map +0 -1
  847. package/dist/trace/otlp-attributes.d.ts +0 -17
  848. package/dist/trace/otlp-attributes.d.ts.map +0 -1
  849. package/dist/trace/query.d.ts +0 -29
  850. package/dist/trace/query.d.ts.map +0 -1
  851. package/dist/trace/query.test.d.ts +0 -2
  852. package/dist/trace/query.test.d.ts.map +0 -1
  853. package/dist/trace/raw-provider-sink.d.ts.map +0 -1
  854. package/dist/trace/redact.d.ts.map +0 -1
  855. package/dist/trace/schema.d.ts.map +0 -1
  856. package/dist/trace/store-to-otlp.d.ts +0 -72
  857. package/dist/trace/store-to-otlp.d.ts.map +0 -1
  858. package/dist/trace/store-to-otlp.test.d.ts +0 -2
  859. package/dist/trace/store-to-otlp.test.d.ts.map +0 -1
  860. package/dist/trace/store.d.ts.map +0 -1
  861. package/dist/trace/store.test.d.ts +0 -2
  862. package/dist/trace/store.test.d.ts.map +0 -1
  863. package/dist/trace-analyst/analyst.d.ts.map +0 -1
  864. package/dist/trace-analyst/analyst.test.d.ts +0 -2
  865. package/dist/trace-analyst/analyst.test.d.ts.map +0 -1
  866. package/dist/trace-analyst/behavioral-metrics.d.ts +0 -40
  867. package/dist/trace-analyst/behavioral-metrics.d.ts.map +0 -1
  868. package/dist/trace-analyst/behavioral-metrics.test.d.ts +0 -2
  869. package/dist/trace-analyst/behavioral-metrics.test.d.ts.map +0 -1
  870. package/dist/trace-analyst/hook.d.ts +0 -55
  871. package/dist/trace-analyst/hook.d.ts.map +0 -1
  872. package/dist/trace-analyst/index.d.ts +0 -18
  873. package/dist/trace-analyst/index.d.ts.map +0 -1
  874. package/dist/trace-analyst/insights.d.ts +0 -71
  875. package/dist/trace-analyst/insights.d.ts.map +0 -1
  876. package/dist/trace-analyst/insights.test.d.ts +0 -2
  877. package/dist/trace-analyst/insights.test.d.ts.map +0 -1
  878. package/dist/trace-analyst/otlp-flatten.d.ts +0 -42
  879. package/dist/trace-analyst/otlp-flatten.d.ts.map +0 -1
  880. package/dist/trace-analyst/otlp-span.d.ts +0 -85
  881. package/dist/trace-analyst/otlp-span.d.ts.map +0 -1
  882. package/dist/trace-analyst/otlp-span.test.d.ts +0 -2
  883. package/dist/trace-analyst/otlp-span.test.d.ts.map +0 -1
  884. package/dist/trace-analyst/otlp-to-run-records.d.ts +0 -115
  885. package/dist/trace-analyst/otlp-to-run-records.d.ts.map +0 -1
  886. package/dist/trace-analyst/otlp-to-run-records.test.d.ts +0 -2
  887. package/dist/trace-analyst/otlp-to-run-records.test.d.ts.map +0 -1
  888. package/dist/trace-analyst/otlp-to-run-records.timestamps.test.d.ts +0 -2
  889. package/dist/trace-analyst/otlp-to-run-records.timestamps.test.d.ts.map +0 -1
  890. package/dist/trace-analyst/prompts.d.ts +0 -6
  891. package/dist/trace-analyst/prompts.d.ts.map +0 -1
  892. package/dist/trace-analyst/store-otlp.d.ts +0 -126
  893. package/dist/trace-analyst/store-otlp.d.ts.map +0 -1
  894. package/dist/trace-analyst/store-otlp.test.d.ts +0 -8
  895. package/dist/trace-analyst/store-otlp.test.d.ts.map +0 -1
  896. package/dist/trace-analyst/store-otlp.timestamps.test.d.ts +0 -2
  897. package/dist/trace-analyst/store-otlp.timestamps.test.d.ts.map +0 -1
  898. package/dist/trace-analyst/store.d.ts +0 -63
  899. package/dist/trace-analyst/store.d.ts.map +0 -1
  900. package/dist/trace-analyst/tools.d.ts +0 -44
  901. package/dist/trace-analyst/tools.d.ts.map +0 -1
  902. package/dist/trace-analyst/tools.test.d.ts +0 -10
  903. package/dist/trace-analyst/tools.test.d.ts.map +0 -1
  904. package/dist/trace-analyst/types.d.ts.map +0 -1
  905. package/dist/trace-contracts.d.ts +0 -180
  906. package/dist/trace-contracts.d.ts.map +0 -1
  907. package/dist/traced-analyst.d.ts +0 -26
  908. package/dist/traced-analyst.d.ts.map +0 -1
  909. package/dist/traced-judges.d.ts +0 -27
  910. package/dist/traced-judges.d.ts.map +0 -1
  911. package/dist/traces.d.ts.map +0 -1
  912. package/dist/trajectory.d.ts.map +0 -1
  913. package/dist/types.d.ts.map +0 -1
  914. package/dist/ui-finding.d.ts +0 -104
  915. package/dist/ui-finding.d.ts.map +0 -1
  916. package/dist/verdict-cache.d.ts +0 -78
  917. package/dist/verdict-cache.d.ts.map +0 -1
  918. package/dist/verdict-cache.test.d.ts +0 -2
  919. package/dist/verdict-cache.test.d.ts.map +0 -1
  920. package/dist/verdict.d.ts.map +0 -1
  921. package/dist/visual-diff.d.ts +0 -32
  922. package/dist/visual-diff.d.ts.map +0 -1
  923. package/dist/wire/handlers.d.ts +0 -54
  924. package/dist/wire/handlers.d.ts.map +0 -1
  925. package/dist/wire/index.d.ts.map +0 -1
  926. package/dist/wire/openapi.d.ts +0 -3
  927. package/dist/wire/openapi.d.ts.map +0 -1
  928. package/dist/wire/rpc.d.ts +0 -21
  929. package/dist/wire/rpc.d.ts.map +0 -1
  930. package/dist/wire/rubrics.d.ts +0 -34
  931. package/dist/wire/rubrics.d.ts.map +0 -1
  932. package/dist/wire/schemas.d.ts +0 -410
  933. package/dist/wire/schemas.d.ts.map +0 -1
  934. package/dist/wire/server.d.ts +0 -60
  935. package/dist/wire/server.d.ts.map +0 -1
  936. package/dist/workflow/event-schema.d.ts +0 -5
  937. package/dist/workflow/event-schema.d.ts.map +0 -1
  938. package/dist/workflow/feedback-pack.d.ts +0 -99
  939. package/dist/workflow/feedback-pack.d.ts.map +0 -1
  940. package/dist/workflow/index.d.ts.map +0 -1
  941. package/dist/workflow/intelligence-export.d.ts +0 -62
  942. package/dist/workflow/intelligence-export.d.ts.map +0 -1
  943. package/dist/workflow/partner-report.d.ts +0 -49
  944. package/dist/workflow/partner-report.d.ts.map +0 -1
  945. package/dist/workflow/phase-graph.d.ts +0 -43
  946. package/dist/workflow/phase-graph.d.ts.map +0 -1
  947. package/dist/workflow/promotion-gate.d.ts +0 -61
  948. package/dist/workflow/promotion-gate.d.ts.map +0 -1
  949. package/dist/workflow/run-record.d.ts +0 -12
  950. package/dist/workflow/run-record.d.ts.map +0 -1
  951. package/dist/workflow/runtime-adapter.d.ts +0 -20
  952. package/dist/workflow/runtime-adapter.d.ts.map +0 -1
  953. package/dist/workflow/sanitize.d.ts +0 -21
  954. package/dist/workflow/sanitize.d.ts.map +0 -1
  955. package/dist/workflow/schema.d.ts +0 -5
  956. package/dist/workflow/schema.d.ts.map +0 -1
  957. package/dist/workflow/summary.d.ts +0 -43
  958. package/dist/workflow/summary.d.ts.map +0 -1
  959. package/dist/workflow/trace-event-fields.d.ts +0 -6
  960. package/dist/workflow/trace-event-fields.d.ts.map +0 -1
  961. package/dist/workflow/trajectory.d.ts +0 -15
  962. package/dist/workflow/trajectory.d.ts.map +0 -1
  963. package/dist/workflow/types.d.ts +0 -68
  964. package/dist/workflow/types.d.ts.map +0 -1
  965. package/dist/workspace-inspector.d.ts +0 -67
  966. package/dist/workspace-inspector.d.ts.map +0 -1
  967. package/dist/wrangler-deploy-runner.test.d.ts +0 -2
  968. package/dist/wrangler-deploy-runner.test.d.ts.map +0 -1
@@ -1,39 +1,1453 @@
1
+ import { A as AnalyzeTracesOptions, a as AnalyzeTracesInput, b as AnalyzeTracesResult } from '../analyst-C8HHvfJp.js';
2
+ import { S as Scenario, M as MutableSurface, b as DispatchContext, a as JudgeConfig, d as GenerationRecord, f as Gate, J as JudgeScore, L as LabeledScenarioStore, s as LabeledScenarioWrite, t as LabeledScenarioSampleArgs, u as LabeledScenarioRecord, v as LabelTrust, e as SurfaceProposer, w as ProposedCandidate, x as ProposeContext, y as LabeledScenarioSource, C as CampaignResult, n as CodeSurface } from '../types-BMahhhio.js';
3
+ export { j as CampaignAggregates, k as CampaignArtifactWriter, l as CampaignCellResult, m as CampaignCostMeter, z as CampaignTokenUsage, c as CampaignTraceWriter, D as DispatchFn, g as GateContext, i as GateDecision, G as GateResult, o as GenerationCandidate, A as JudgeAggregate, p as JudgeDimension, h as Mutator, O as OptimizationProposer, q as OptimizerConfig, P as ParetoParent, R as RedactionStatus, B as ScenarioAggregate, r as SessionScript, T as TraceSpan, E as isProposedCandidate, F as labelTrustRank } from '../types-BMahhhio.js';
4
+ import { R as RunCampaignOptions, c as RunImprovementLoopOptions, C as CampaignStorage } from '../gepa-Dprxvz8r.js';
5
+ export { e as GepaProposerConstraints, G as GepaProposerOptions, O as OpenAutoPrOptions, h as OpenAutoPrResult, b as RunImprovementLoopResult, a as RunOptimizationOptions, j as RunOptimizationResult, k as countSentenceEdits, l as defaultRenderDiff, m as extractH2Sections, f as fsCampaignStorage, g as gepaProposer, i as inMemoryCampaignStorage, o as openAutoPr, r as runCampaign, d as runImprovementLoop, n as runOptimization, s as surfaceHash } from '../gepa-Dprxvz8r.js';
6
+ export { A as AxisEvidence, a as AxisVerdict, B as BuildEvidenceVectorOptions, k as BuildLoopProvenanceArgs, D as DefaultProductionGateOptions, l as EmitLoopProvenanceArgs, m as EmitLoopProvenanceResult, E as EvidenceVector, b as EvolutionaryProposerOptions, H as HeldOutGateOptions, n as LoopProvenanceBackend, o as LoopProvenanceCandidate, L as LoopProvenanceRecord, O as ObjectiveSource, P as ParetoSignificanceGateOptions, c as PromotionObjective, d as PromotionPolicy, R as RunEvalOptions, e as buildEvidenceVector, q as buildLoopProvenanceRecord, f as composeGate, g as defaultProductionGate, s as emitLoopProvenance, h as evolutionaryProposer, i as heldOutGate, t as loopProvenanceSpans, p as paretoPolicy, j as paretoSignificanceGate, u as provenanceRecordPath, v as provenanceSpansPath, r as runEval, w as surfaceContentHash } from '../provenance-CIxfBnkl.js';
7
+ import { S as SignedManifest, B as BackendIntegrityReport, C as CompletionRequirement, R as RuntimeEventLike, a as CompletionVerdict, P as ProducedState, b as CorrectnessChecker } from '../pre-registration-nfUdc9EQ.js';
8
+ import { E as EProcessState, a as PairedBootstrapResult } from '../statistics-CCJpTGOS.js';
9
+ import { L as LlmClientOptions } from '../llm-client-Bj7g0rqu.js';
10
+ import { AgentProfile } from '@tangle-network/agent-interface';
11
+ import { A as AgentEvalError } from '../errors-CzMUYo7b.js';
12
+ import { a as RunSplitTag, R as RunRecord } from '../run-record-CP2ObebC.js';
13
+ import { T as TraceAnalystKindSpec } from '../kind-factory-X3eDYbKn.js';
14
+ import { c as AnalystFinding } from '../types-B5x54y6n.js';
15
+ import '@ax-llm/ax';
16
+ import '../store-C1YxJDEK.js';
17
+ import '../red-team-BWdoyleI.js';
18
+ import '../dataset-BbGkaN2I.js';
19
+ import '../store-BcFXE6LG.js';
20
+ import '../schema-m0gsnbt3.js';
21
+ import '../pareto-E-pembql.js';
22
+ import '../hosted/index.js';
23
+ import '../insight-report-BnRjTibG.js';
24
+ import '../summary-report-CInXwsza.js';
25
+ import '../failure-cluster-DH9Flgcf.js';
26
+ import '../judge-calibration-0p2QcWNE.js';
27
+ import '@tangle-network/tcloud';
28
+ import '../verdict-C9MlYujm.js';
29
+ import '../types-C7DGg5ex.js';
30
+ import '../raw-provider-sink-C46HDghv.js';
31
+ import 'zod';
32
+
1
33
  /**
2
- * `@tangle-network/agent-eval/campaign` measurement + improvement loop.
3
- *
4
- * `runCampaign` is the measurement primitive (a surface scored over scenarios);
5
- * `runImprovementLoop` is the proposer-agnostic improvement loop on top of it.
6
- */
7
- export { type AnalystArtifact, type AnalystScenario, type BuildAnalystSurfaceDispatchOptions, buildAnalystSurfaceDispatch, type FailureModeRecallJudgeOptions, failureModeRecallJudge, } from './analyst-surface';
8
- export { type OpenAutoPrOptions, type OpenAutoPrResult, openAutoPr, } from './auto-pr';
9
- export { composeGate } from './gates/compose';
10
- export { type DefaultProductionGateOptions, defaultProductionGate, } from './gates/default-production-gate';
11
- export { type HeldOutGateOptions, heldOutGate } from './gates/heldout-gate';
12
- export { type AxisEvidence, type AxisVerdict, type BuildEvidenceVectorOptions, buildEvidenceVector, type EvidenceVector, type ObjectiveSource, type ParetoSignificanceGateOptions, type PromotionObjective, type PromotionPolicy, paretoPolicy, paretoSignificanceGate, } from './gates/promotion-policy';
13
- export { type SequentialDecideFn, type SequentialDecideOptions, type SequentialDecision, type SequentialObservation, type SequentialPairedGate, type SequentialPairedGateOptions, sequentialDecide, sequentialPairedGate, } from './gates/sequential';
14
- export { type DimensionRegression, detectScale, dimensionRegressions, type HeldoutSignificance, type HeldoutSignificanceOptions, heldoutSignificance, type PairedHoldout, pairHoldout, } from './gates/statistical-heldout';
15
- export { FsLabeledScenarioStore, type FsLabeledScenarioStoreOptions, LabeledScenarioStoreError, } from './labeled-store/fs-adapter';
16
- export { type CompareProposersOptions, compareProposers, type FapoEntryConfig, fapoEscalationEntry, gepaParetoEntry, gepaReflectionEntry, type OptimizerEntryConfig, type ProposerComparison, type ProposerEntry, type ProposerPairwise, type ProposerScore, skillOptEntry, } from './presets/compare-proposers';
17
- export { makePlaybackDispatch, type PlaybackContext, type PlaybackDriver, type PlaybackStep, renderScoreboardMarkdown, type ScoreboardRenderOptions, type ScoreboardRow, type ScoreboardSummary, scoreboardSummary, scoreUserStory, type UserStory, type UserStoryVerdict, userStoryScoreboard, } from './presets/playback';
18
- export { type RunEvalOptions, runEval } from './presets/run-eval';
19
- export { defaultRenderDiff, type RunImprovementLoopOptions, type RunImprovementLoopResult, runImprovementLoop, } from './presets/run-improvement-loop';
20
- export { type RunOptimizationOptions, type RunOptimizationResult, runOptimization, surfaceHash, } from './presets/run-optimization';
21
- export { type ProfileDispatchFn, ProfileMatrixError, type ProfileSummary, type RunProfileMatrixOptions, type RunProfileMatrixResult, runProfileMatrix, type ScenarioRollup, } from './presets/run-profile-matrix';
22
- export { type AcceptedEdit, type RunSkillOptOptions, type RunSkillOptResult, runSkillOpt, type SkillOptEpochRecord, } from './presets/run-skill-opt';
23
- export { type AceProposerOptions, aceProposer } from './proposers/ace';
24
- export { type EvolutionaryProposerOptions, evolutionaryProposer } from './proposers/evolutionary';
25
- export { extractFapoAttributionSignals, type FapoAttributionSignals, type FapoFailureCluster, type FapoOptimizationLevel, type FapoProposerOptions, type FapoReviewInput, type FapoReviewIssue, type FapoReviewResult, type FapoScopeContract, fapoProposer, type JsonPrimitive, type JsonValue, type ParameterCandidate, type ParameterChange, type ParameterSweepProposerOptions, parameterSweepProposer, } from './proposers/fapo';
26
- export { countSentenceEdits, extractH2Sections, type GepaProposerConstraints, type GepaProposerOptions, gepaProposer, } from './proposers/gepa';
27
- export { type HaloProposerOptions, haloProposer } from './proposers/halo';
28
- export { type MemoryCurationProposerOptions, memoryCurationProposer } from './proposers/memory';
29
- export { type ProposePatchesArgs, parseSkillPatchResponse, type RejectedEdit, type SkillOptEvidence, type SkillOptProposer, type SkillOptProposerOptions, SkillPatchParseError, skillOptProposer, } from './proposers/skill-opt';
30
- export { type TraceAnalystProposerOptions, traceAnalystProposer } from './proposers/trace-analyst';
31
- export { type BuildLoopProvenanceArgs, buildLoopProvenanceRecord, type EmitLoopProvenanceArgs, type EmitLoopProvenanceResult, emitLoopProvenance, type LoopProvenanceBackend, type LoopProvenanceCandidate, type LoopProvenanceRecord, loopProvenanceSpans, provenanceRecordPath, provenanceSpansPath, surfaceContentHash, } from './provenance';
32
- export { type RunCampaignOptions, runCampaign } from './run-campaign';
33
- export { type CampaignBreakdown, campaignBreakdown, campaignMeanComposite } from './score-utils';
34
- export { type ApplySkillPatchResult, applySkillPatch, patchEditCount, type SkillPatch, type SkillPatchOp, type SkillPatchRejection, } from './skill-patch';
35
- export { type CampaignStorage, fsCampaignStorage, inMemoryCampaignStorage } from './storage';
36
- export type { CampaignAggregates, CampaignArtifactWriter, CampaignCellResult, CampaignCostMeter, CampaignResult, CampaignTokenUsage, CampaignTraceWriter, CodeSurface, DispatchContext, DispatchFn, Gate, GateContext, GateDecision, GateResult, GenerationCandidate, GenerationRecord, JudgeAggregate, JudgeConfig, JudgeDimension, JudgeScore, LabeledScenarioRecord, LabeledScenarioSampleArgs, LabeledScenarioSource, LabeledScenarioStore, LabeledScenarioWrite, LabelTrust, MutableSurface, Mutator, OptimizationProposer, OptimizerConfig, ParetoParent, ProposeContext, ProposedCandidate, RedactionStatus, Scenario, ScenarioAggregate, SessionScript, SurfaceProposer, TraceSpan, } from './types';
37
- export { isProposedCandidate, labelTrustRank } from './types';
38
- export { type GitWorktreeAdapterOptions, gitWorktreeAdapter, resolveWorktreePath, type Worktree, type WorktreeAdapter, WorktreeAdapterError, } from './worktree';
39
- //# sourceMappingURL=index.d.ts.map
34
+ * Make the trace-analyst's OWN prompt a GEPA-optimizable surface.
35
+ *
36
+ * The analyst that drives self-improvement is itself a prompt and a
37
+ * hand-tuned one (a hardcoded, hand-versioned `const`). This module lets the
38
+ * loop optimize it: the analyst `actorDescription` becomes a `MutableSurface`
39
+ * that `gepaProposer` / `haloProposer` / any `SurfaceProposer` can mutate inside
40
+ * `runImprovementLoop` or `compareProposers`. That is the second-order loop —
41
+ * optimizing the optimizer's eyes, not just the agent's prompt.
42
+ *
43
+ * Two pieces, both deliberately small (the loop engine already exists — this
44
+ * only supplies the analyst-shaped dispatch + an objective scorer):
45
+ *
46
+ * - `buildAnalystSurfaceDispatch` `dispatchWithSurface(surface, scenario)`
47
+ * runs `analyzeTraces` with `surface` as the actorDescription over the
48
+ * scenario's fixed trace corpus, returning its findings.
49
+ * - `failureModeRecallJudge` a DETERMINISTIC judge (no LLM, no opinion)
50
+ * that scores those findings against the scenario's GROUND-TRUTH failure
51
+ * modes. This is what keeps optimizing the analyst prompt ungameable: the
52
+ * labels come from objective signal (e.g. AppWorld `world.evaluate()` tells
53
+ * us which task failed and which API calls were wrong), so we reward an
54
+ * analyst for surfacing the failures that really happened not for
55
+ * pleasing a judge that could be talked into anything (Goodhart).
56
+ *
57
+ * Wiring (the loop is unchanged; you only pass these in):
58
+ *
59
+ * const dispatchWithSurface = buildAnalystSurfaceDispatch({ analystOptions: { ai } })
60
+ * await runImprovementLoop({
61
+ * baselineSurface: TRACE_ANALYST_ACTOR_DESCRIPTION, // the prompt under optimization
62
+ * scenarios: trainScenarios, // labeled trace corpora
63
+ * holdoutScenarios: heldOutScenarios,
64
+ * dispatchWithSurface,
65
+ * judges: [failureModeRecallJudge()],
66
+ * proposer: gepaProposer({ baseUrl, apiKey }),
67
+ * gate: heldOutGate({ minDelta: 0.02 }),
68
+ * autoOnPromote: 'none',
69
+ * })
70
+ */
71
+
72
+ /**
73
+ * A labeled trace scenario: a FIXED trace corpus plus the failure modes a
74
+ * competent analyst MUST surface from it. The labels are ground truth — the
75
+ * objective failures that actually occurred — which is what makes optimizing
76
+ * the analyst prompt against them meaningful rather than circular.
77
+ */
78
+ interface AnalystScenario extends Scenario {
79
+ kind: 'analyst-surface';
80
+ /** OTLP-JSONL path or an in-memory store of the traces to analyze. */
81
+ source: AnalyzeTracesOptions['source'];
82
+ /** The domain question handed to the analyst (framing lives here, not in
83
+ * the surface under optimization). */
84
+ question: string;
85
+ /**
86
+ * Ground-truth failure modes a good analyst must identify. A finding "hits"
87
+ * a mode when it contains ANY of the mode's case-insensitive cues. Derive
88
+ * these from objective signal (failed task + which step broke), never from
89
+ * the analyst's own prior output.
90
+ */
91
+ expectedFailureModes: Array<{
92
+ id: string;
93
+ cues: string[];
94
+ }>;
95
+ /**
96
+ * Cues that mark a finding as HALLUCINATED / out-of-scope for this corpus —
97
+ * naming a tool, error, or failure that did not occur. Presence penalizes
98
+ * precision. Optional; omit to score recall only.
99
+ */
100
+ forbiddenCues?: string[];
101
+ }
102
+ /** The analyst's output for one scenario — the artifact the judge scores. */
103
+ interface AnalystArtifact {
104
+ answer: string;
105
+ findings: string[];
106
+ /** The hardcoded-prompt version the analyst reported (provenance only; the
107
+ * optimized surface overrides the actual prompt text used). */
108
+ actorPromptVersion: string;
109
+ }
110
+ interface BuildAnalystSurfaceDispatchOptions {
111
+ /**
112
+ * Everything `analyzeTraces` needs EXCEPT `actorDescription` (supplied by the
113
+ * surface under optimization) and `source` (supplied by the scenario). `ai`
114
+ * (the AxAIService) is required for a live run.
115
+ */
116
+ analystOptions: Omit<AnalyzeTracesOptions, 'actorDescription' | 'source'>;
117
+ /** Test seam: defaults to the real `analyzeTraces`. */
118
+ analyze?: (input: AnalyzeTracesInput, options: AnalyzeTracesOptions) => Promise<AnalyzeTracesResult>;
119
+ }
120
+ /**
121
+ * Build the `dispatchWithSurface(surface, scenario, ctx)` the improvement loop
122
+ * calls: run the analyst with `surface` as its actorDescription over the
123
+ * scenario's trace corpus and return its findings.
124
+ */
125
+ declare function buildAnalystSurfaceDispatch(opts: BuildAnalystSurfaceDispatchOptions): (surface: MutableSurface, scenario: AnalystScenario, ctx: DispatchContext) => Promise<AnalystArtifact>;
126
+ interface FailureModeRecallJudgeOptions {
127
+ /** Weight on recall when precision is also scored (forbiddenCues present).
128
+ * Default 0.5 (equal). Recall-only when no forbiddenCues exist. */
129
+ recallWeight?: number;
130
+ }
131
+ /**
132
+ * Deterministic, ground-truth judge for analyst findings. Composite =
133
+ * recall of the scenario's `expectedFailureModes` (optionally blended with a
134
+ * precision term that penalizes findings tripping `forbiddenCues`). No LLM —
135
+ * the score is a function of the labels, so the analyst prompt is optimized
136
+ * toward surfacing real failures, not toward a judge it can flatter.
137
+ */
138
+ declare function failureModeRecallJudge(opts?: FailureModeRecallJudgeOptions): JudgeConfig<AnalystArtifact, AnalystScenario>;
139
+
140
+ /**
141
+ * Anytime-valid sequential promotion gate — an e-process (betting
142
+ * test-martingale, see `eProcess` in `statistics.ts`) over paired
143
+ * per-scenario deltas, so a campaign stops the MOMENT evidence decides
144
+ * instead of burning a fixed-n budget. Decisions remain valid at any
145
+ * data-dependent stopping time (Ville's inequality), which is exactly what
146
+ * fixed-n machinery cannot offer: peeking at a bootstrap CI after every
147
+ * observation and stopping on the first significant peek inflates type-I
148
+ * error far beyond alpha.
149
+ *
150
+ * REPLACES, never layers on, a fixed-n gate. Running `heldoutSignificance`
151
+ * or `paretoSignificanceGate` repeatedly on a growing sample and stopping
152
+ * early is optional stopping no matter how it is dressed up; this gate is
153
+ * the valid way to stop early. Use one or the other per evidence stream.
154
+ *
155
+ * Pre-registration binding: anytime validity holds only for the
156
+ * PRE-REGISTERED statistic. When a `SignedManifest` is bound, the gate takes
157
+ * alpha from `manifest.alpha`, the observation budget from
158
+ * `manifest.preRegisteredN`, orients deltas by `manifest.direction`, and
159
+ * shifts the null boundary by `manifest.minEffect` — re-deciding the same
160
+ * stream under different parameters after seeing data would reopen optional
161
+ * stopping under a fancier name. The manifest's content hash is verified at
162
+ * construction (sync, same `sha256-content` scheme as `signManifest`).
163
+ *
164
+ * Non-iid caveat (stated honestly): the supermartingale guarantee needs each
165
+ * delta's conditional mean under H0 to stay ≤ the null boundary given the
166
+ * past — exchangeable scenario deltas suffice. Scenario streams ordered by
167
+ * difficulty or by scenario family violate this; `decide(ctx)` therefore
168
+ * shuffles the paired deltas with a SEEDED permutation by default (the
169
+ * permutation is data-independent, so bet predictability is preserved).
170
+ * Stratified betting (per-stratum λ) is future work, not implemented here.
171
+ */
172
+
173
+ type SequentialDecision = 'promote' | 'continue' | 'undecided-at-maxN';
174
+ interface SequentialObservation {
175
+ decision: SequentialDecision;
176
+ /** Current e-value (the betting wealth) against H0. */
177
+ eValue: number;
178
+ /** Paired deltas consumed so far. */
179
+ n: number;
180
+ /** Names the decision basis. For 'undecided-at-maxN' it states explicitly
181
+ * that exhausting the budget is NOT evidence of no effect. */
182
+ reason: string;
183
+ }
184
+ interface SequentialPairedGateOptions {
185
+ /** Type-I budget. With `preRegistration` bound this MUST match
186
+ * `manifest.alpha` (conflict throws). Default 0.05. */
187
+ alpha?: number;
188
+ /** Minimum paired deltas before a promote may fire. The stopping rule is
189
+ * "first n ≥ minN with e-value ≥ 1/alpha" — still a valid stopping time.
190
+ * Default 5. */
191
+ minN?: number;
192
+ /** Pre-registered observation budget. Required unless `preRegistration`
193
+ * supplies it via `preRegisteredN` (conflict throws). */
194
+ maxN?: number;
195
+ /** Bet truncation forwarded to `eProcess`. Default 0.5. */
196
+ maxBet?: number;
197
+ /** Bound on |delta| in the judge's native scale; deltas are mapped to
198
+ * x = (d/scale + 1)/2 ∈ [0,1]. A delta outside ±scale throws (use
199
+ * `detectScale` to pick 1 vs 100 BEFORE streaming). Default 1. */
200
+ scale?: number;
201
+ /** Seed for the data-independent shuffle of paired deltas in `decide(ctx)`
202
+ * (exchangeability guard). Default 1337. */
203
+ shuffleSeed?: number;
204
+ /** Bind the pre-registered hypothesis. Verified (content hash) at
205
+ * construction; alpha/maxN/direction/minEffect come FROM the manifest. */
206
+ preRegistration?: SignedManifest;
207
+ /** Override the gate name in reports. */
208
+ name?: string;
209
+ }
210
+ interface SequentialPairedGate<TArtifact = unknown, TScenario extends Scenario = Scenario> extends Gate<TArtifact, TScenario> {
211
+ /** Streaming entry point: feed one paired per-scenario delta
212
+ * (candidate − baseline, native scale). Each gate instance carries ONE
213
+ * observe-stream; `decide(ctx)` runs on its own fresh stream and never
214
+ * consumes or advances this one. 'promote' is sticky; observing past the
215
+ * pre-registered maxN throws (extending a finished stream after seeing
216
+ * the result reopens optional stopping — start a NEW pre-registered
217
+ * test). */
218
+ observe(delta: number): SequentialObservation;
219
+ /** Read-only snapshot of the observe-stream. */
220
+ state(): EProcessState & {
221
+ decision: SequentialDecision;
222
+ };
223
+ }
224
+ /**
225
+ * Anytime-valid sequential paired gate. Conforms to the existing `Gate`
226
+ * contract (`decide(ctx)` consumes candidate vs baseline judge scores via
227
+ * `pairHoldout` — same pairing granularity as the fixed-n gates: full cellId,
228
+ * never scenarioId) and adds a streaming `observe(delta)` entry for campaigns
229
+ * that score cells incrementally and want to stop mid-stream.
230
+ *
231
+ * Decision mapping onto the substrate's five-valued `GateDecision`:
232
+ * - 'promote' → 'ship'
233
+ * - 'continue' → 'need_more_work' (stream ended before maxN with
234
+ * the e-value undecided — more reps could decide)
235
+ * - 'undecided-at-maxN' → 'hold', with the reason stating it is NOT
236
+ * evidence of no effect (never a silent default)
237
+ */
238
+ declare function sequentialPairedGate<TArtifact = unknown, TScenario extends Scenario = Scenario>(options: SequentialPairedGateOptions): SequentialPairedGate<TArtifact, TScenario>;
239
+ interface SequentialDecideOptions {
240
+ /** Type-I budget for the early-stop evidence. Default 0.05. */
241
+ alpha?: number;
242
+ /** Minimum paired deltas before a stop may fire. Default 5. */
243
+ minN?: number;
244
+ /** Bet truncation forwarded to `eProcess`. Default 0.5. */
245
+ maxBet?: number;
246
+ /** Bound on |per-scenario composite delta|. Default 1. */
247
+ scale?: number;
248
+ }
249
+ interface SequentialDecideFn {
250
+ (args: {
251
+ history: GenerationRecord[];
252
+ }): {
253
+ stop: boolean;
254
+ reason?: string;
255
+ };
256
+ /** Read-only snapshot of the accumulated e-process (observability + tests). */
257
+ state(): EProcessState;
258
+ }
259
+ /**
260
+ * `SurfaceProposer.decide` adapter — stops the optimization loop the moment
261
+ * the e-process decides the loop has produced a real improvement, instead of
262
+ * always running `maxGenerations`.
263
+ *
264
+ * Stream: for each generation g ≥ 1, the per-scenario composite deltas of
265
+ * generation g's top candidate vs the generation-0 top candidate (the
266
+ * incumbent the loop set out to beat), paired by scenarioId. H0: no proposed
267
+ * surface improves any scenario's expected composite over the incumbent —
268
+ * under it every delta has conditional mean ≤ 0 and the e-process is valid.
269
+ * Once wealth ≥ 1/alpha the loop stops and hands the winner to the promotion
270
+ * gate (which re-scores on HELD-OUT data — this adapter only spends the
271
+ * exploration budget, it never promotes).
272
+ *
273
+ * Honesty caveats: (1) the incumbent's scores are measured once and shared
274
+ * across all generations' deltas, so type-I control is exact only insofar as
275
+ * those scores approximate the incumbent's true per-scenario means (more reps
276
+ * → tighter); (2) an UNDECIDED process never stops the loop — absence of a
277
+ * crossing is NOT evidence of no effect, so the loop simply runs its normal
278
+ * course. Calling the adapter repeatedly with a growing history consumes each
279
+ * generation exactly once (re-feeding an already-seen record would double-count
280
+ * evidence).
281
+ */
282
+ declare function sequentialDecide(options?: SequentialDecideOptions): SequentialDecideFn;
283
+
284
+ /**
285
+ * Statistical held-out promotion machinery — the trustworthy core the
286
+ * point-estimate `heldout-delta` gate lacked.
287
+ *
288
+ * The shipped false positive it prevents: a winner re-scored against the
289
+ * baseline on the holdout read run-to-run model NOISE (e.g. 91 vs 95) as a
290
+ * "+4 lift" and shipped, because the gate compared point estimates with no
291
+ * confidence interval. Here we pair candidate vs baseline holdout observations
292
+ * and bootstrap a CI on the paired delta — a candidate ships only when the CI
293
+ * lower bound clears the effect-size threshold (the gain is real at the
294
+ * confidence level, not noise), and is blocked when a critical dimension
295
+ * (e.g. `hallucination_free` for a legal agent) significantly regresses even if
296
+ * the net composite rose (anti-Goodhart).
297
+ *
298
+ * Two traps this module is built around (both produce a NEW false positive if
299
+ * gotten wrong):
300
+ * 1. PAIRING GRANULARITY — pairs by FULL `cellId` (`scenario:rep`), never by
301
+ * `scenarioId` (which averages reps away and destroys the within-pair
302
+ * variance reduction that makes a paired bootstrap tighter than unpaired).
303
+ * One paired observation per cell ⇒ reps multiply n.
304
+ * 2. SCALE — a judge may emit composites/dimensions on [0,1] or 0-100. The
305
+ * threshold + tolerance are interpreted in the judge's NATIVE scale; the
306
+ * per-dimension tolerance auto-scales off the observed baseline magnitudes
307
+ * so `-0.10` on [0,1] doesn't silently become a no-op on a 0-100 dimension.
308
+ */
309
+
310
+ interface PairedHoldout {
311
+ /** Baseline scalar per paired cell (same order as `after`/`cellIds`). */
312
+ before: number[];
313
+ /** Candidate scalar per paired cell. */
314
+ after: number[];
315
+ /** The full cellIds (`scenario:rep`) that paired, in order. */
316
+ cellIds: string[];
317
+ }
318
+ /**
319
+ * Pair candidate vs baseline holdout observations by FULL cellId. `select`
320
+ * pulls the scalar from a cell's judge reports (composite, or a named
321
+ * dimension); a cell contributes the mean of `select` across its judges. Cells
322
+ * whose scenario is not in `scenarioIds`, or where `select` is undefined for
323
+ * every judge on either side, are skipped on BOTH sides so the arrays stay
324
+ * paired. Throws when the two maps disagree on which holdout cells exist — a
325
+ * load-bearing invariant: the baseline + winner holdout campaigns run the same
326
+ * scenarios with the same seed base, so their cellIds MUST align; a mismatch
327
+ * means a silent pairing bug, not a soft fallback.
328
+ */
329
+ declare function pairHoldout(candidate: Map<string, Record<string, JudgeScore>>, baseline: Map<string, Record<string, JudgeScore>>, scenarioIds: Set<string>, select: (s: JudgeScore) => number | undefined): PairedHoldout;
330
+ interface HeldoutSignificance {
331
+ paired: PairedHoldout;
332
+ bootstrap: PairedBootstrapResult;
333
+ /** n paired observations. */
334
+ n: number;
335
+ /** True iff n >= minProductiveRuns AND the CI lower bound clears the threshold. */
336
+ significant: boolean;
337
+ /** Set when n < minProductiveRuns — too little evidence to claim significance. */
338
+ fewRuns: boolean;
339
+ }
340
+ interface HeldoutSignificanceOptions {
341
+ deltaThreshold?: number;
342
+ minProductiveRuns?: number;
343
+ confidence?: number;
344
+ resamples?: number;
345
+ /** Fixed by default for a deterministic, reproducible gate verdict. */
346
+ seed?: number;
347
+ statistic?: 'mean' | 'median';
348
+ }
349
+ /** Significance of the held-out composite lift: ship only when the paired
350
+ * bootstrap CI lower bound on (candidate − baseline) exceeds `deltaThreshold`
351
+ * (default 0 ⇒ "confidently positive"). Below `minProductiveRuns` paired
352
+ * observations there is not enough evidence to claim significance → not
353
+ * significant (`fewRuns`). Interpret `deltaThreshold` in the judge's native
354
+ * composite scale. */
355
+ declare function heldoutSignificance(paired: PairedHoldout, opts?: HeldoutSignificanceOptions): HeldoutSignificance;
356
+ interface DimensionRegression {
357
+ dimension: string;
358
+ bootstrap: PairedBootstrapResult;
359
+ /** True iff the CI lower bound on (candidate − baseline) is below −tolerance:
360
+ * the candidate may have regressed this dimension by more than tolerance. */
361
+ regressed: boolean;
362
+ tolerance: number;
363
+ n: number;
364
+ }
365
+ /** Detect the native scale of a set of scores: 0-100 when any magnitude clears
366
+ * 1.5, else [0,1]. Used to auto-scale the regression tolerance so a default
367
+ * expressed for [0,1] is not silently a no-op on a 0-100 dimension. */
368
+ declare function detectScale(values: number[]): 1 | 100;
369
+ /** Per-critical-dimension regression guard. For each dimension, pair the
370
+ * candidate vs baseline values by full cellId and bootstrap the paired delta;
371
+ * a dimension is "regressed" when the CI lower bound < −tolerance (conservative
372
+ * — blocks if the credible worst case exceeds tolerance, which is the right
373
+ * posture for safety dimensions like `hallucination_free`). When `tolerance`
374
+ * is omitted it auto-scales: 0.05 on [0,1], 5 on 0-100. */
375
+ declare function dimensionRegressions(candidate: Map<string, Record<string, JudgeScore>>, baseline: Map<string, Record<string, JudgeScore>>, scenarioIds: Set<string>, criticalDimensions: string[], opts?: {
376
+ tolerance?: number;
377
+ confidence?: number;
378
+ resamples?: number;
379
+ seed?: number;
380
+ }): DimensionRegression[];
381
+
382
+ /**
383
+ * Filesystem `LabeledScenarioStore` adapter. The default capture sink for
384
+ * traces + eval artifacts. Production deployments typically swap for a
385
+ * Turso/SQLite adapter (same interface).
386
+ *
387
+ * Records land as one JSONL file per source under `<root>/<source>.jsonl`.
388
+ * Each line is a `LabeledScenarioRecord`. Append-only — no in-place edits.
389
+ *
390
+ * Safety properties enforced at write-time:
391
+ *
392
+ * - **Provenance required**: writes without `source`, `sourceVersionHash`,
393
+ * `capturedAt`, `redactionStatus` are rejected. Closes the alignment
394
+ * reviewer's data-poisoning gap.
395
+ * - **Per-source rate limits**: optional `rateLimitBucket` + `maxWritesPerMinute`
396
+ * stops a single tenant/source from flooding the store.
397
+ *
398
+ * Safety properties enforced at sample-time:
399
+ *
400
+ * - **Required split + capturedBefore**: substrate refuses to sample without
401
+ * an explicit `split` ('train' | 'test') AND a temporal cutoff. Eliminates
402
+ * accidental train/test contamination.
403
+ * - **Default training-source filter**: when the store is sampled with
404
+ * `split: 'train'`, production-trace records are EXCLUDED unless the
405
+ * caller passes `filter.source: 'production-trace'` explicitly. Closes
406
+ * the contamination-by-default gap flagged by the senior eval engineer.
407
+ */
408
+
409
+ interface FsLabeledScenarioStoreOptions {
410
+ /** Root directory for JSONL files. Created if missing. */
411
+ root: string;
412
+ /** Per-source rate limit. When set, writes exceeding the cap are rejected
413
+ * with a typed error. Default: no limit. */
414
+ maxWritesPerMinutePerBucket?: number;
415
+ /** Test seam — override `Date.now()` for deterministic tests. */
416
+ now?: () => number;
417
+ }
418
+ declare class LabeledScenarioStoreError extends Error {
419
+ readonly code: string;
420
+ constructor(code: string, message: string);
421
+ }
422
+ declare class FsLabeledScenarioStore implements LabeledScenarioStore {
423
+ private readonly options;
424
+ private readonly now;
425
+ private readonly rateLimits;
426
+ constructor(options: FsLabeledScenarioStoreOptions);
427
+ observe(write: LabeledScenarioWrite): Promise<void>;
428
+ sample(args: LabeledScenarioSampleArgs): Promise<LabeledScenarioRecord[]>;
429
+ size(): Promise<{
430
+ train: number;
431
+ test: number;
432
+ bySource: Record<string, number>;
433
+ byTrust: Record<LabelTrust, number>;
434
+ }>;
435
+ private assertProvenance;
436
+ private assertRateLimit;
437
+ private toRecord;
438
+ private pathForSource;
439
+ }
440
+
441
+ /**
442
+ * FAPO (Fully Autonomous Prompt Optimization) is an orchestration policy, not
443
+ * a new prompt mutation primitive. The paper's loop evaluates an inspectable
444
+ * workflow, attributes failures to an edit level, proposes ONE scoped change,
445
+ * reviews it, measures it, and escalates from prompt -> parameters -> structure
446
+ * only when prompt-level search is exhausted and attribution supports the
447
+ * higher-cost edit.
448
+ *
449
+ * This substrate proposer encodes that policy while keeping the edit generators
450
+ * pluggable:
451
+ * - prompt: usually `gepaProposer`, `skillOptProposer`, or a runtime reflective proposer
452
+ * - parameter: `parameterSweepProposer` or a caller-supplied config proposer
453
+ * - structural: a caller-supplied code/worktree proposer from agent-runtime
454
+ *
455
+ * It deliberately does not import Claude Code, LangGraph, or Cisco's tenant
456
+ * runtime. agent-eval owns measurement and proposer contracts; runtime-shaped
457
+ * code generation stays downstream.
458
+ *
459
+ * Grounded sources:
460
+ * - Kassianik et al., "FAPO: Fully Autonomous Prompt Optimization of
461
+ * Multi-Step LLM Pipelines", arXiv:2606.19605v1.
462
+ * - cisco-foundation-ai/fully-automated-prompt-optimization at
463
+ * 376b50c57d5e2423e5a5de46e0d315a761d272d8.
464
+ */
465
+
466
+ type FapoOptimizationLevel = 'prompt' | 'parameter' | 'structural';
467
+ interface FapoScopeContract {
468
+ /** Levels the tenant/playbook allows. Defaults to the levels with proposers. */
469
+ allowedLevels?: readonly FapoOptimizationLevel[];
470
+ /** Explicitly forbidden levels; wins over `allowedLevels`. */
471
+ forbiddenLevels?: readonly FapoOptimizationLevel[];
472
+ }
473
+ interface FapoFailureCluster {
474
+ label: string;
475
+ level: FapoOptimizationLevel;
476
+ count: number;
477
+ confidence?: 'high' | 'medium' | 'low';
478
+ suggestedFix?: string;
479
+ caseIds?: string[];
480
+ }
481
+ interface FapoAttributionSignals {
482
+ counts: Record<FapoOptimizationLevel, number>;
483
+ clusters: FapoFailureCluster[];
484
+ }
485
+ interface FapoReviewIssue {
486
+ checkName: string;
487
+ severity: 'block' | 'warn';
488
+ description: string;
489
+ location?: string;
490
+ }
491
+ interface FapoReviewResult {
492
+ verdict: 'pass' | 'warn' | 'fail';
493
+ issues?: FapoReviewIssue[];
494
+ suggestions?: string[];
495
+ }
496
+ interface FapoReviewInput<TFindings = unknown> {
497
+ level: FapoOptimizationLevel;
498
+ candidate: ProposedCandidate;
499
+ context: ProposeContext<TFindings>;
500
+ reason: string;
501
+ }
502
+ interface FapoProposerOptions<TFindings = unknown> {
503
+ /** Level-specific candidate proposers. At least one is required. */
504
+ proposers?: Partial<Record<FapoOptimizationLevel, SurfaceProposer<TFindings>>>;
505
+ /** Convenience aliases for `proposers.<level>`. */
506
+ promptProposer?: SurfaceProposer<TFindings>;
507
+ parameterProposer?: SurfaceProposer<TFindings>;
508
+ structuralProposer?: SurfaceProposer<TFindings>;
509
+ /** Tenant/playbook-derived allowed and forbidden edit levels. */
510
+ scope?: FapoScopeContract;
511
+ /**
512
+ * Independent reviewer hook. Return `fail` to block a candidate before eval,
513
+ * mirroring FAPO's variant-reviewer phase.
514
+ */
515
+ reviewCandidate?: (input: FapoReviewInput<TFindings>) => Promise<FapoReviewResult>;
516
+ /**
517
+ * FAPO proposes one scoped change per cycle. Keep this at 1 unless you are
518
+ * intentionally relaxing the paper loop for a batch experiment.
519
+ */
520
+ proposalsPerCycle?: number;
521
+ /** Consecutive non-improving variants required before a level is exhausted. Default 3. */
522
+ plateauWindow?: number;
523
+ /** Distinct strategies required before declaring a plateau. Default 3. */
524
+ minDistinctStrategies?: number;
525
+ /** Candidate score delta needed to count as an improvement. Default 0. */
526
+ minImprovement?: number;
527
+ /** Paper-faithful default: try prompt edits before escalating. */
528
+ promptFirst?: boolean;
529
+ /** Paper-faithful default: try parameter/config edits before structural code edits. */
530
+ parameterBeforeStructural?: boolean;
531
+ }
532
+ /** Build a FAPO policy proposer from level-specific candidate generators. */
533
+ declare function fapoProposer<TFindings = unknown>(opts: FapoProposerOptions<TFindings>): SurfaceProposer<TFindings>;
534
+ declare function extractFapoAttributionSignals(findings: readonly unknown[]): FapoAttributionSignals;
535
+ type JsonPrimitive = string | number | boolean | null;
536
+ type JsonValue = JsonPrimitive | JsonValue[] | {
537
+ [key: string]: JsonValue;
538
+ };
539
+ interface ParameterChange {
540
+ path: string | readonly string[];
541
+ value: JsonValue;
542
+ }
543
+ interface ParameterCandidate {
544
+ label: string;
545
+ rationale: string;
546
+ /** Deep-merged into the current JSON surface. */
547
+ patch?: Record<string, JsonValue>;
548
+ /** Dot-path writes, e.g. `{ path: 'retrieval.k', value: 10 }`. */
549
+ changes?: readonly ParameterChange[];
550
+ }
551
+ interface ParameterSweepProposerOptions {
552
+ candidates: readonly ParameterCandidate[];
553
+ /** Optional parser for non-JSON config surface strings. */
554
+ parse?: (surface: string) => Record<string, JsonValue>;
555
+ /** Optional serializer for non-JSON config surface strings. */
556
+ stringify?: (config: Record<string, JsonValue>) => string;
557
+ }
558
+ /** Config/parameter-level proposer for FAPO's middle escalation level. */
559
+ declare function parameterSweepProposer(opts: ParameterSweepProposerOptions): SurfaceProposer;
560
+
561
+ /**
562
+ * `compareProposers` — a head-to-head lift benchmark across surface proposers
563
+ * on ONE corpus. This is the forcing function: optimizer quality (GEPA
564
+ * reflection vs GEPA+Pareto vs SkillOpt) becomes a NUMBER with a confidence
565
+ * interval, so a proposer regression — or shipping a simplified proposer and
566
+ * calling it the real one — turns a build red instead of going
567
+ * measurement-invisible.
568
+ *
569
+ * Every entrant is scored the SAME way: each proposer returns the surface it
570
+ * promoted, then the benchmark scores the baseline + every winner on the
571
+ * SAME held-out scenarios with the SAME judges. Apples-to-apples by
572
+ * construction — the comparison never depends on how a proposer measured itself.
573
+ * The per-scenario held-out composites feed a paired bootstrap (`statistics.ts`)
574
+ * for each proposer's lift CI and for the pairwise "which proposer wins" CI.
575
+ */
576
+
577
+ /** What an optimizer produced: the surface it promoted + what it cost to get
578
+ * there. The comparison does the held-out scoring itself, so an entry only
579
+ * needs to run its loop and hand back the winner. */
580
+ interface ProposerEntry {
581
+ name: string;
582
+ optimize: () => Promise<{
583
+ winnerSurface: MutableSurface;
584
+ costUsd: number;
585
+ durationMs?: number;
586
+ }>;
587
+ }
588
+ interface ProposerScore {
589
+ name: string;
590
+ /** Mean held-out composite of the baseline (identical across proposers). */
591
+ baselineComposite: number;
592
+ /** Mean held-out composite of this proposer's promoted surface. */
593
+ winnerComposite: number;
594
+ /** Mean per-scenario held-out lift (winner − baseline). */
595
+ lift: number;
596
+ /** Paired-bootstrap CI of the per-scenario lift. `low > 0` ⇒ a real gain. */
597
+ liftCi: {
598
+ low: number;
599
+ high: number;
600
+ };
601
+ costUsd: number;
602
+ durationMs?: number;
603
+ winnerSurface: MutableSurface;
604
+ /** 1-based, by descending lift. */
605
+ rank: number;
606
+ }
607
+ interface ProposerPairwise {
608
+ /** Higher-ranked proposer. */
609
+ a: string;
610
+ b: string;
611
+ /** Mean per-scenario held-out delta (a − b). */
612
+ deltaMean: number;
613
+ low: number;
614
+ high: number;
615
+ /** `a` if the CI clears 0, `b` if it is entirely negative, else `'tie'`. */
616
+ favored: string;
617
+ }
618
+ interface ProposerComparison {
619
+ /** Sorted by descending lift; `rank` set accordingly. */
620
+ scores: ProposerScore[];
621
+ best: ProposerScore;
622
+ /** Best vs each other proposer, paired-bootstrap on the held-out winners. */
623
+ pairwise: ProposerPairwise[];
624
+ holdoutScenarioIds: string[];
625
+ }
626
+ interface CompareProposersOptions<TScenario extends Scenario, TArtifact> extends Omit<RunCampaignOptions<TScenario, TArtifact>, 'dispatch' | 'scenarios'> {
627
+ proposers: ProposerEntry[];
628
+ baselineSurface: MutableSurface;
629
+ /** The held-out scenarios every winner is scored on. */
630
+ holdoutScenarios: TScenario[];
631
+ /** Scores a surface on a scenario — the same dispatcher the proposers used. */
632
+ dispatchWithSurface: (surface: MutableSurface, scenario: TScenario, ctx: DispatchContext) => Promise<TArtifact>;
633
+ /** Bootstrap resamples for the lift CIs. Default 2000. */
634
+ resamples?: number;
635
+ /** CI confidence. Default 0.95. */
636
+ confidence?: number;
637
+ }
638
+ declare function compareProposers<TScenario extends Scenario, TArtifact>(opts: CompareProposersOptions<TScenario, TArtifact>): Promise<ProposerComparison>;
639
+ /** Shared corpus + transport for the three built-in optimizer entries. */
640
+ interface OptimizerEntryConfig<TScenario extends Scenario, TArtifact> {
641
+ baselineSurface: string;
642
+ /** Training scenarios the proposers reflect on. */
643
+ trainScenarios: TScenario[];
644
+ /** Held-out scenarios (the gate axis + the benchmark scoring axis). */
645
+ holdoutScenarios: TScenario[];
646
+ dispatchWithSurface: (surface: MutableSurface, scenario: TScenario, ctx: DispatchContext) => Promise<TArtifact>;
647
+ judges: JudgeConfig<TArtifact, TScenario>[];
648
+ llm: LlmClientOptions;
649
+ model: string;
650
+ target: string;
651
+ runDir: string;
652
+ seed?: number;
653
+ /** GEPA population per generation. Default 2. */
654
+ populationSize?: number;
655
+ /** GEPA generations. Default 3. */
656
+ maxGenerations?: number;
657
+ /** SkillOpt epochs. Default 6. */
658
+ maxEpochs?: number;
659
+ mutationPrimitives?: string[];
660
+ /** Static findings seed forwarded to each GEPA proposer's `propose()` as
661
+ * `ctx.findings`. Forwarded by `gepaReflectionEntry` / `gepaParetoEntry`;
662
+ * `skillOptEntry` runs without findings (see its doc). */
663
+ findings?: unknown[];
664
+ /** Per-generation findings producer: after each generation scores, this
665
+ * re-diagnoses and REPLACES `ctx.findings` for the
666
+ * next generation's `propose()`. Reuses the `runOptimization` field type so
667
+ * it cannot drift. GEPA entries only. */
668
+ analyzeGeneration?: RunImprovementLoopOptions<TScenario, TArtifact>['analyzeGeneration'];
669
+ /** Optional analysis report forwarded to `propose()` as `ctx.report`. */
670
+ report?: unknown;
671
+ }
672
+ /** GEPA, reflection-only (single-parent, no Pareto combine). */
673
+ declare function gepaReflectionEntry<TScenario extends Scenario, TArtifact>(config: OptimizerEntryConfig<TScenario, TArtifact>, name?: string): ProposerEntry;
674
+ /** GEPA with the Pareto frontier + combine-complementary-lessons. */
675
+ declare function gepaParetoEntry<TScenario extends Scenario, TArtifact>(config: OptimizerEntryConfig<TScenario, TArtifact>, name?: string): ProposerEntry;
676
+ /** SkillOpt patch-mode hill-climb. Runs findings-BLIND: `runSkillOpt` owns its
677
+ * own epoch acceptance/budget loop and does not thread `analyzeGeneration`, so
678
+ * `config.findings` is intentionally NOT forwarded here. In a findings-fed
679
+ * comparison this entry is the blind control — do not read its result as
680
+ * findings-fed. (Threading findings into the SkillOpt epoch loop is a separate
681
+ * refactor, deferred not faked.) */
682
+ declare function skillOptEntry<TScenario extends Scenario, TArtifact>(config: OptimizerEntryConfig<TScenario, TArtifact>, name?: string): ProposerEntry;
683
+ /** FAPO reviewed-escalation policy. This is an orchestration layer over
684
+ * level-specific proposers, not a new mutation operator:
685
+ * prompt -> parameter -> structural, with scope + reviewer + plateau rules in
686
+ * `fapoProposer`. The prompt proposer defaults to GEPA+Pareto because that is
687
+ * the package's strongest prompt-tier proposer; parameter/structural proposers
688
+ * are opt-in so we do not fake code-generation inside agent-eval. */
689
+ interface FapoEntryConfig<TScenario extends Scenario, TArtifact> extends OptimizerEntryConfig<TScenario, TArtifact> {
690
+ /** Override the prompt-level proposer. Default: `gepaProposer({ combineParents: true })`. */
691
+ promptProposer?: SurfaceProposer;
692
+ /** Parameter/config-level proposer. If omitted, `parameterCandidates` builds one. */
693
+ parameterProposer?: SurfaceProposer;
694
+ /** Structural/code-level proposer, typically supplied by agent-runtime. */
695
+ structuralProposer?: SurfaceProposer;
696
+ /** Convenience: build a `parameterSweepProposer` from these candidates. */
697
+ parameterCandidates?: readonly ParameterCandidate[];
698
+ /** FAPO policy knobs: scope, reviewer, plateau thresholds. */
699
+ fapo?: Omit<FapoProposerOptions, 'proposers' | 'promptProposer' | 'parameterProposer' | 'structuralProposer'>;
700
+ }
701
+ declare function fapoEscalationEntry<TScenario extends Scenario, TArtifact>(config: FapoEntryConfig<TScenario, TArtifact>, name?: string): ProposerEntry;
702
+
703
+ /**
704
+ * `runProfileMatrix` — the missing keystone between `runAgentMatrix` and the
705
+ * backend-integrity guard.
706
+ *
707
+ * The gap it closes: `runAgentMatrix` is a topology-opaque scheduler whose
708
+ * cells return a bare `{ output, verdict, costUsd }` — no `tokenUsage`, not a
709
+ * `RunRecord`. `assertRealBackend` / `summarizeBackendIntegrity` key on
710
+ * `RunRecord.tokenUsage`, so they cannot run on a raw matrix result. Every
711
+ * consumer therefore hand-writes the same bridge: fan a profile × scenario
712
+ * cartesian, call dispatch, fabricate a `RunRecord` with token usage, thread it
713
+ * back, run the integrity guard. That hand-rolled bridge is exactly the pile of
714
+ * bespoke `eval:*` scripts the adoption skills keep trying (and failing) to
715
+ * forbid.
716
+ *
717
+ * `runProfileMatrix` IS that bridge, once:
718
+ *
719
+ * - axis 3 (PROFILE) = `profiles: AgentProfile[]`
720
+ * - axis 1 (PERSONA/SCENARIO) = `scenarios: Scenario[]` (each scenario carries
721
+ * its persona; `personaOf` groups them for the `byPersona` pivot)
722
+ * - the scoring axis = `judges`
723
+ *
724
+ * It runs `runCampaign` once per profile (reusing its seeds, reps, bootstrap
725
+ * CIs, resumability, and the `LabeledScenarioStore` capture flywheel), maps
726
+ * every cell to a validated `RunRecord` carrying the real `tokenUsage` the
727
+ * dispatch reported via `ctx.cost.observeTokens`, and runs `assertRealBackend`
728
+ * BY CONSTRUCTION before returning — so a stub-backend run fails loudly instead
729
+ * of reporting a clean 0/N leaderboard.
730
+ *
731
+ * Dispatch contract: a dispatch that calls an LLM MUST report usage via
732
+ * `ctx.cost.observeTokens({ input, output })` (and cost via `ctx.cost.observe`).
733
+ * A dispatch that reports zero tokens is indistinguishable from a stub and the
734
+ * integrity guard treats it as one.
735
+ */
736
+
737
+ /** Thrown when the matrix is misconfigured (no profiles, a profile whose model
738
+ * lacks a snapshot version, etc.). Distinct from `BackendIntegrityError`,
739
+ * which signals a stub backend at run time. */
740
+ declare class ProfileMatrixError extends AgentEvalError {
741
+ constructor(message: string);
742
+ }
743
+ /** Dispatch for one cell: render `profile` against `scenario`, returning the
744
+ * artifact the judges score. Report LLM usage via `ctx.cost.observeTokens`
745
+ * and `ctx.cost.observe` — the integrity guard depends on it. */
746
+ type ProfileDispatchFn<TScenario extends Scenario, TArtifact> = (profile: AgentProfile, scenario: TScenario, ctx: DispatchContext) => Promise<TArtifact>;
747
+ interface RunProfileMatrixOptions<TScenario extends Scenario, TArtifact> {
748
+ /** Axis 3 — the agent-under-test configurations. Each is one column. */
749
+ profiles: AgentProfile[];
750
+ /** Axis 1 — the persona/scenario corpus, run against every profile. */
751
+ scenarios: TScenario[];
752
+ /** Renders one (profile, scenario) cell. */
753
+ dispatch: ProfileDispatchFn<TScenario, TArtifact>;
754
+ /** The scoring axis. */
755
+ judges?: JudgeConfig<TArtifact, TScenario>[];
756
+ /** Where each profile's campaign writes artifacts/traces. One subdir per
757
+ * profile. */
758
+ runDir: string;
759
+ /** Git SHA the harness ran from — stamped onto every RunRecord (mandatory
760
+ * for paper-grade records). */
761
+ commitSha: string;
762
+ /** Logical experiment id shared across the whole matrix so the promotion
763
+ * gate can pair profiles on matched scenarios. Default: a hash of the
764
+ * profile + scenario ids. */
765
+ experimentId?: string;
766
+ /** Which split these runs belong to. Default `'search'`. */
767
+ splitTag?: RunSplitTag;
768
+ /** Replicates per (profile, scenario) cell for CI bands. Default 1. */
769
+ reps?: number;
770
+ /** Campaign seed (per profile). Default 42. */
771
+ seed?: number;
772
+ /**
773
+ * Backend-integrity posture, enforced AFTER the matrix completes:
774
+ * - `'assert'` (default) — throw `BackendIntegrityError` if the run was a
775
+ * stub (and, with `allowMixed:false`, if it was mixed).
776
+ * - `'warn'` — log the verdict but never throw.
777
+ * - `'off'` — skip the guard entirely (only for offline/replay analysis).
778
+ */
779
+ integrity?: 'assert' | 'warn' | 'off';
780
+ /** Forwarded to `assertRealBackend`. Default true (tolerate partial 429
781
+ * cascades); set false for strict CI gates. */
782
+ allowMixed?: boolean;
783
+ /** Max concurrent cells WITHIN each profile's campaign. Default 2.
784
+ * Profiles run sequentially so the cost ceiling is honored deterministically. */
785
+ maxConcurrency?: number;
786
+ /** Cumulative USD cap per profile campaign. */
787
+ costCeiling?: number;
788
+ /** Capture flywheel — forwarded to each campaign. */
789
+ labeledStore?: LabeledScenarioStore | 'off';
790
+ captureSource?: LabeledScenarioSource;
791
+ /** Storage backend. Default `fsCampaignStorage`. Pass
792
+ * `inMemoryCampaignStorage()` for edge/CF-Worker/test runs. */
793
+ storage?: CampaignStorage;
794
+ /** Test seam — override the wall clock. */
795
+ now?: () => Date;
796
+ /** Optional persona key per scenario — drives the `byPersona` pivot. When
797
+ * unset, `byPersona` is omitted. */
798
+ personaOf?: (scenario: TScenario) => string;
799
+ /** Validate every produced RunRecord with `validateRunRecord` (fail-loud).
800
+ * Default true — catches bad model snapshots and non-finite judge dims at
801
+ * the boundary instead of letting them poison downstream analysis. */
802
+ validate?: boolean;
803
+ /** Corpus-by-default: derive the trajectory text (`prompt` + `completion`)
804
+ * for each cell from its artifact + scenario. When set, every produced
805
+ * record carries `prompt`/`completion` (a `CorpusRecord`) so the run's
806
+ * graded trajectories can be appended to the durable RL corpus with no
807
+ * side-channel — `appendToCorpus(result.records, path)`. Fail-soft: a
808
+ * throwing or undefined-returning extractor just omits the text. */
809
+ corpusText?: (artifact: TArtifact, scenario: TScenario) => {
810
+ prompt: string;
811
+ completion: string;
812
+ } | undefined;
813
+ }
814
+ interface ProfileSummary {
815
+ profileId: string;
816
+ profileHash: string;
817
+ model: string;
818
+ /** RunRecords produced for this profile (= scenarios × reps). */
819
+ records: number;
820
+ /** Mean composite across this profile's records. */
821
+ meanComposite: number;
822
+ totalCostUsd: number;
823
+ /** Per-profile integrity verdict — surfaces a single profile that ran stub
824
+ * even when the matrix as a whole looks real. */
825
+ integrity: BackendIntegrityReport;
826
+ }
827
+ interface ScenarioRollup {
828
+ meanComposite: number;
829
+ n: number;
830
+ }
831
+ interface RunProfileMatrixResult<TArtifact, TScenario extends Scenario> {
832
+ matrixId: string;
833
+ experimentId: string;
834
+ /** One RunRecord per (profile, scenario, rep) cell — the integrity-checked,
835
+ * paper-grade output. Feed straight into `analyzeRuns`, `HeldOutGate`,
836
+ * scorecards, the hosted wire format. */
837
+ records: RunRecord[];
838
+ byProfile: Record<string, ProfileSummary>;
839
+ byScenario: Record<string, ScenarioRollup>;
840
+ /** Present only when `personaOf` was supplied. */
841
+ byPersona?: Record<string, ScenarioRollup>;
842
+ /** Whole-matrix integrity report (the one `integrity:'assert'` enforces). */
843
+ integrity: BackendIntegrityReport;
844
+ /** The raw per-profile campaign results, keyed by profile id. */
845
+ campaigns: Record<string, CampaignResult<TArtifact, TScenario>>;
846
+ }
847
+ declare function runProfileMatrix<TScenario extends Scenario, TArtifact>(opts: RunProfileMatrixOptions<TScenario, TArtifact>): Promise<RunProfileMatrixResult<TArtifact, TScenario>>;
848
+
849
+ /**
850
+ * Product-flow playback — drive the REAL product through a user story and
851
+ * score the produced state per requirement (the launch "Jira tick-off").
852
+ *
853
+ * This is the substrate adapter + contract only. It plugs a `PlaybackDriver`
854
+ * into the existing `runProfileMatrix` dispatch seam: a driver drives the real
855
+ * product (a Playwright UI session or a sandbox workspace) and returns the
856
+ * runtime event stream; `extractProducedState` + `verifyCompletion` then score
857
+ * each requirement PASS/FAIL. The concrete drivers live in consumers — they
858
+ * depend on browser / runtime infra the substrate must not import — so
859
+ * agent-eval owns the seam, the `UserStory` contract, and the scoreboard.
860
+ */
861
+
862
+ /** One step of a user story — what the user does. The driver interprets
863
+ * `payload` (a Playwright selector + action, or a sandbox chat turn). */
864
+ interface PlaybackStep {
865
+ /** Human-readable action, captured verbatim in the UX narrative. */
866
+ action: string;
867
+ /** Driver-specific payload (e.g. `{ selector, fill }` or `{ turn }`). */
868
+ payload?: Record<string, unknown>;
869
+ }
870
+ /**
871
+ * A user story = a runnable product journey plus the requirements that define
872
+ * "this story works". Each requirement is one Jira ticket line. Extends
873
+ * `Scenario` so a catalog drops straight into `runProfileMatrix({ scenarios })`.
874
+ */
875
+ interface UserStory extends Scenario {
876
+ /** Human-readable story title (the ticket headline). */
877
+ title: string;
878
+ /** Ordered steps the driver executes. */
879
+ steps: PlaybackStep[];
880
+ /** What must hold in the produced state for the story to pass. */
881
+ requirements: CompletionRequirement[];
882
+ }
883
+ /** Dispatch context plus the profile under test (which cheap model, etc.). */
884
+ interface PlaybackContext extends DispatchContext {
885
+ profile: AgentProfile;
886
+ }
887
+ /**
888
+ * Drives the real product through a story and returns the runtime event stream
889
+ * `extractProducedState` consumes. Implemented by CONSUMERS —
890
+ * `SandboxPlaybackDriver` (real API / sandbox workspace) and
891
+ * `PlaywrightPlaybackDriver` (real UI) — because they depend on runtime /
892
+ * browser infra the substrate must not import. The driver MUST report LLM
893
+ * usage via `ctx.cost.observeTokens` so the backend-integrity guard sees real
894
+ * tokens (a run that never reports tokens reads as a stub).
895
+ */
896
+ interface PlaybackDriver<TStory extends UserStory = UserStory> {
897
+ run(story: TStory, ctx: PlaybackContext): Promise<readonly RuntimeEventLike[]>;
898
+ }
899
+ /**
900
+ * Adapt a `PlaybackDriver` into a `runProfileMatrix` dispatch. The artifact the
901
+ * matrix scores is the `ProducedState` extracted from the driver's event
902
+ * stream — grade it with `scoreUserStory` (or a judge wrapping it).
903
+ */
904
+ declare function makePlaybackDispatch<TStory extends UserStory>(driver: PlaybackDriver<TStory>): ProfileDispatchFn<TStory, ProducedState>;
905
+ /** A scored user story — the completion verdict plus its human title. */
906
+ interface UserStoryVerdict extends CompletionVerdict {
907
+ title: string;
908
+ }
909
+ /**
910
+ * Score one story's produced state against its requirements. Thin wrapper over
911
+ * `verifyCompletion` that builds the gold from the story and returns a
912
+ * per-requirement PASS/FAIL verdict. `checkCorrectness` is injected — a
913
+ * deterministic stub in tests, `createLlmCorrectnessChecker` in production.
914
+ */
915
+ declare function scoreUserStory(story: UserStory, state: ProducedState, checkCorrectness: CorrectnessChecker): Promise<UserStoryVerdict>;
916
+ /** One row of the launch scoreboard — story × requirement → PASS/FAIL. */
917
+ interface ScoreboardRow {
918
+ storyId: string;
919
+ storyTitle: string;
920
+ reqId: string;
921
+ reqTitle: string;
922
+ status: 'PASS' | 'FAIL';
923
+ evidence: string[];
924
+ }
925
+ /**
926
+ * Flatten story verdicts into the per-requirement scoreboard — the literal
927
+ * Jira tick-off: one row per (story, requirement) with PASS/FAIL and the
928
+ * evidence behind the verdict.
929
+ */
930
+ declare function userStoryScoreboard(verdicts: readonly UserStoryVerdict[]): ScoreboardRow[];
931
+ /** Launch-readiness headline counts rolled up from the per-requirement rows. */
932
+ interface ScoreboardSummary {
933
+ /** Distinct user stories on the board. */
934
+ stories: number;
935
+ /** Stories whose every requirement passed. */
936
+ storiesFullyComplete: number;
937
+ /** Total (story, requirement) rows. */
938
+ requirements: number;
939
+ /** Rows with status PASS. */
940
+ passed: number;
941
+ /** Rows with status FAIL. */
942
+ failed: number;
943
+ /** passed / requirements; 0 when there are no rows. */
944
+ passRate: number;
945
+ }
946
+ /** Roll the per-requirement rows up into the launch headline counts. */
947
+ declare function scoreboardSummary(rows: readonly ScoreboardRow[]): ScoreboardSummary;
948
+ interface ScoreboardRenderOptions {
949
+ /** Document H1. Defaults to a generic playback title. */
950
+ title?: string;
951
+ /** Key/value run metadata rendered under the headline (runId, backend, model, date). */
952
+ meta?: Record<string, string>;
953
+ /** Max chars of joined evidence shown per row. Default 160. */
954
+ maxEvidenceChars?: number;
955
+ }
956
+ /**
957
+ * Render the scoreboard as a launch-readiness Markdown document — the literal
958
+ * "tick off every user story" artifact: a headline roll-up, the open tickets
959
+ * (FAIL rows) up top as the launch blockers, then a per-story table of
960
+ * requirement → PASS/FAIL with the evidence behind each verdict. Pure: same
961
+ * rows in, same bytes out (no clock/random), so it is safe to snapshot.
962
+ */
963
+ declare function renderScoreboardMarkdown(rows: readonly ScoreboardRow[], opts?: ScoreboardRenderOptions): string;
964
+
965
+ /**
966
+ * SkillOpt patch primitives (Microsoft, arXiv:2605.23904 — "Executive
967
+ * Strategy for Self-Evolving Agent Skills"). Where GEPA regenerates a surface
968
+ * by reflection, SkillOpt emits BOUNDED, anchored edits to ONE skill document
969
+ * — add / delete / replace — and accepts an edit only if it strictly improves
970
+ * a held-out score. Bounded edits are the "textual learning rate": small,
971
+ * reversible, and cheap to accept/reject, so a good rule introduced earlier is
972
+ * not overwritten by a later sweeping rewrite.
973
+ *
974
+ * This module applies a patch deterministically and reports, per op, what
975
+ * applied and what could not (a missing anchor is a rejected op, never a
976
+ * silently dropped one). Pure, no I/O.
977
+ */
978
+ /** A single bounded edit against a skill surface.
979
+ * - `add` — insert `text` after the first line containing `after`
980
+ * (append to the end when `after` is absent/empty).
981
+ * - `delete` — remove the first line containing `anchor`.
982
+ * - `replace` — replace the first line containing `anchor` with `text`.
983
+ * `text` may be multi-line; it is spliced in as multiple lines. Anchors match
984
+ * the FIRST line that contains the substring (deterministic; SkillOpt is
985
+ * expected to anchor on unique text). */
986
+ type SkillPatchOp = {
987
+ op: 'add';
988
+ after?: string;
989
+ text: string;
990
+ } | {
991
+ op: 'delete';
992
+ anchor: string;
993
+ } | {
994
+ op: 'replace';
995
+ anchor: string;
996
+ text: string;
997
+ };
998
+ /** A named, attributable bundle of ops the optimizer proposes as one edit. */
999
+ interface SkillPatch {
1000
+ label: string;
1001
+ rationale: string;
1002
+ ops: SkillPatchOp[];
1003
+ }
1004
+ interface SkillPatchRejection {
1005
+ op: SkillPatchOp;
1006
+ reason: string;
1007
+ }
1008
+ interface ApplySkillPatchResult {
1009
+ surface: string;
1010
+ /** Count of ops that mutated the surface. */
1011
+ applied: number;
1012
+ /** Ops that could not apply (unanchored / empty), with the reason. The
1013
+ * surface still reflects every APPLIED op — partial application is honest,
1014
+ * and the caller decides whether a partial patch is worth scoring. */
1015
+ rejected: SkillPatchRejection[];
1016
+ }
1017
+ /**
1018
+ * Apply a SkillOpt patch to a text surface. Ops apply in array order against
1019
+ * the evolving line buffer (an `add after X` followed by a `delete X` sees the
1020
+ * inserted lines). A missing anchor rejects only that op; the rest still apply.
1021
+ */
1022
+ declare function applySkillPatch(surface: string, patch: SkillPatch): ApplySkillPatchResult;
1023
+ /** Total ops in a patch — the edit-budget axis (SkillOpt's "textual learning
1024
+ * rate" caps this per epoch). */
1025
+ declare function patchEditCount(patch: SkillPatch): number;
1026
+
1027
+ /**
1028
+ * `skillOptProposer` — a patch-mode `SurfaceProposer` implementing SkillOpt
1029
+ * (Microsoft, arXiv:2605.23904). Where `gepaProposer` regenerates the whole
1030
+ * surface by reflection, SkillOpt proposes BOUNDED, anchored edits
1031
+ * (add/delete/replace) to ONE skill document, so a good rule introduced
1032
+ * earlier is not clobbered by a later sweeping rewrite. The edit budget is the
1033
+ * paper's "textual learning rate"; a rejected-edit buffer + a slow-update
1034
+ * meta-note steer the optimizer away from dead ends.
1035
+ *
1036
+ * This module is the PROPOSER — the LLM call that turns evidence into
1037
+ * structured patches. The accept-only-if-held-out-improves loop, the budget
1038
+ * annealing, and the rejected buffer live in the `runSkillOpt` preset, which
1039
+ * owns the epoch hill-climb. The proposer also conforms to `SurfaceProposer`
1040
+ * (`propose` applies its patches to the current surface and returns the
1041
+ * candidate surfaces) so it is a drop-in for `runOptimization` and a fair
1042
+ * entrant in `compareProposers`.
1043
+ */
1044
+
1045
+ /** Evidence the optimizer reflects on: where the current surface is weakest.
1046
+ * Computed by the caller (the preset uses a TRAIN campaign so proposals never
1047
+ * see the held-out split; the generic loop derives it from history). */
1048
+ interface SkillOptEvidence {
1049
+ /** Lowest-scoring scenarios (drives WHICH behavior to patch). */
1050
+ weakScenarios: Array<{
1051
+ scenarioId: string;
1052
+ composite: number;
1053
+ }>;
1054
+ /** Lowest-scoring judge dimensions (drives WHAT to patch for). */
1055
+ weakDimensions: Array<{
1056
+ dimension: string;
1057
+ score: number;
1058
+ }>;
1059
+ }
1060
+ /** A patch that was tried and not accepted — fed back to the model so it does
1061
+ * not re-propose a dead end (SkillOpt's rejected-edit buffer). */
1062
+ interface RejectedEdit {
1063
+ label: string;
1064
+ rationale: string;
1065
+ reason: string;
1066
+ }
1067
+ interface ProposePatchesArgs {
1068
+ surface: string;
1069
+ evidence: SkillOptEvidence;
1070
+ /** Max ops per patch this round (the annealed textual learning rate). */
1071
+ editBudget: number;
1072
+ rejectedBuffer: RejectedEdit[];
1073
+ /** Slow-update meta guidance accumulated across epochs. */
1074
+ metaNote?: string;
1075
+ /** Analyst findings + research report rendered as a prompt block so a patch
1076
+ * targets a NAMED diagnosed root cause. Built by
1077
+ * the proposer from `ctx.findings`/`ctx.report`; the patch-native `runSkillOpt`
1078
+ * path may also supply it. */
1079
+ findingsNote?: string;
1080
+ /** How many candidate patches to propose. */
1081
+ count: number;
1082
+ signal: AbortSignal;
1083
+ }
1084
+ interface SkillOptProposerOptions {
1085
+ llm: LlmClientOptions;
1086
+ model: string;
1087
+ /** What the skill document governs — orients the prompt. */
1088
+ target: string;
1089
+ /** Default ops-per-patch cap when used as a bare `SurfaceProposer`. The
1090
+ * `runSkillOpt` preset overrides this per epoch as it anneals. Default 3. */
1091
+ editBudget?: number;
1092
+ temperature?: number;
1093
+ maxTokens?: number;
1094
+ /** Top-K weak scenarios/dimensions surfaced as evidence. Default 3. */
1095
+ evidenceK?: number;
1096
+ }
1097
+ interface SkillOptProposer extends SurfaceProposer {
1098
+ /** Patch-native path used by `runSkillOpt` (the SkillOpt epoch loop owns
1099
+ * acceptance/budget/buffer). Returns structured patches, NOT surfaces. */
1100
+ proposePatches(args: ProposePatchesArgs): Promise<SkillPatch[]>;
1101
+ }
1102
+ declare function skillOptProposer(opts: SkillOptProposerOptions): SkillOptProposer;
1103
+ /** Parse + validate the patch response. Throws `SkillPatchParseError` when the
1104
+ * response is not valid JSON at all (a router/model failure the caller must
1105
+ * see — never a silent no-op epoch). Returns `[]` only for the legitimate
1106
+ * "valid JSON, zero usable patches" case. Malformed ops within a patch are
1107
+ * dropped (not silently mutated); each patch is truncated to the edit budget. */
1108
+ declare class SkillPatchParseError extends Error {
1109
+ constructor(message: string);
1110
+ }
1111
+ declare function parseSkillPatchResponse(raw: string, maxPatches: number, editBudget: number): SkillPatch[];
1112
+
1113
+ /**
1114
+ * `runSkillOpt` — the SkillOpt epoch hill-climb (Microsoft, arXiv:2605.23904).
1115
+ * Unlike `runOptimization`'s population/promote-top-K search, SkillOpt is a
1116
+ * sequential, held-out-gated hill-climb on ONE skill document:
1117
+ *
1118
+ * each epoch:
1119
+ * 1. reflect on the CURRENT surface's weakest TRAIN scenarios/dimensions
1120
+ * (never the held-out split — proposals must not see the acceptance axis)
1121
+ * 2. propose ≤ `patchesPerEpoch` bounded patches (≤ `editBudget` ops each)
1122
+ * 3. apply each; score the candidate on the HELD-OUT split
1123
+ * 4. ACCEPT the first patch that STRICTLY improves the held-out composite;
1124
+ * otherwise push it to the rejected-edit buffer (fed back so the model
1125
+ * does not re-propose dead ends)
1126
+ * 5. anneal the edit budget down after consecutive rejections (the
1127
+ * "textual learning rate" decay); refresh the slow-update meta note
1128
+ * 6. stop at `maxEpochs` or after `patience` epochs with no acceptance
1129
+ *
1130
+ * The accept-only-if-held-out-improves rule is the same discipline as
1131
+ * `HeldOutGate`/`defaultProductionGate`, applied per edit instead of once at
1132
+ * the end — which is why the held-out composite is monotonically
1133
+ * non-decreasing and a regression can never ship. `runCampaign` is the
1134
+ * measurement; `applySkillPatch` applies the edits; `skillOptProposer` proposes
1135
+ * them.
1136
+ */
1137
+
1138
+ interface RunSkillOptOptions<TScenario extends Scenario, TArtifact> extends Omit<RunCampaignOptions<TScenario, TArtifact>, 'dispatch' | 'scenarios'> {
1139
+ /** The skill document being optimized. */
1140
+ baselineSurface: string;
1141
+ /** Dispatcher taking the CURRENT skill surface + scenario → artifact. */
1142
+ dispatchWithSurface: (surface: string, scenario: TScenario, ctx: DispatchContext) => Promise<TArtifact>;
1143
+ proposer: SkillOptProposer;
1144
+ /** Scenarios the optimizer reflects on for evidence. MUST be disjoint from
1145
+ * `holdoutScenarios` — proposals never see the acceptance axis. */
1146
+ trainScenarios: TScenario[];
1147
+ /** Held-out scenarios. An edit is accepted ONLY if it strictly improves the
1148
+ * mean composite here. */
1149
+ holdoutScenarios: TScenario[];
1150
+ maxEpochs: number;
1151
+ /** Candidate patches proposed per epoch. Default 2. */
1152
+ patchesPerEpoch?: number;
1153
+ /** Initial ops-per-patch cap (the textual learning rate). Default 3. */
1154
+ editBudget?: number;
1155
+ /** Strict acceptance margin: accept iff the held-out composite improves by
1156
+ * MORE than this. Default 0 (any strict improvement). */
1157
+ minImprovement?: number;
1158
+ /** Stop after this many consecutive epochs with no acceptance. Default =
1159
+ * `maxEpochs` (never early-stop). */
1160
+ patience?: number;
1161
+ /** Shrink the edit budget by 1 after 2 consecutive rejected epochs (min 1).
1162
+ * Default true. */
1163
+ budgetAnneal?: boolean;
1164
+ /** Cap on the rejected-edit buffer (most-recent kept). Default 12. */
1165
+ rejectedBufferSize?: number;
1166
+ /** Refresh the slow-update meta note every N epochs. Default 2. 0 disables. */
1167
+ slowMetaEvery?: number;
1168
+ /** Top-K weak scenarios/dimensions surfaced as evidence each epoch. Default 3. */
1169
+ evidenceK?: number;
1170
+ /** Abort signal forwarded to the patch-proposing LLM calls. */
1171
+ signal?: AbortSignal;
1172
+ }
1173
+ interface AcceptedEdit {
1174
+ epoch: number;
1175
+ label: string;
1176
+ rationale: string;
1177
+ /** Held-out composite improvement vs the surface before this edit. */
1178
+ holdoutDelta: number;
1179
+ }
1180
+ interface SkillOptEpochRecord {
1181
+ epoch: number;
1182
+ editBudget: number;
1183
+ proposed: number;
1184
+ /** The accepted edit this epoch, or null if every proposal was rejected. */
1185
+ accepted: AcceptedEdit | null;
1186
+ rejected: RejectedEdit[];
1187
+ /** Held-out composite of the CURRENT surface at the END of the epoch. */
1188
+ holdoutComposite: number;
1189
+ }
1190
+ interface RunSkillOptResult {
1191
+ winnerSurface: string;
1192
+ baselineHoldoutComposite: number;
1193
+ winnerHoldoutComposite: number;
1194
+ /** `winnerHoldoutComposite - baselineHoldoutComposite` — monotonically ≥ 0
1195
+ * by construction (only strictly-improving edits are accepted). */
1196
+ lift: number;
1197
+ acceptedEdits: AcceptedEdit[];
1198
+ rejectedEdits: RejectedEdit[];
1199
+ epochsRun: number;
1200
+ history: SkillOptEpochRecord[];
1201
+ /** Total cost across every scoring campaign (train evidence + holdout
1202
+ * acceptance) the hill-climb ran. */
1203
+ totalCostUsd: number;
1204
+ }
1205
+ declare function runSkillOpt<TScenario extends Scenario, TArtifact>(opts: RunSkillOptOptions<TScenario, TArtifact>): Promise<RunSkillOptResult>;
1206
+
1207
+ /**
1208
+ * `aceProposer` — Agentic Context Engineering: an APPEND-MOSTLY curator, the
1209
+ * deliberate contrast to `memoryCurationProposer`'s dedup-and-replace. ACE's
1210
+ * thesis (arXiv:2510.04618) is that aggressively deduping/rewriting a context
1211
+ * causes "context collapse" — hard-won specific lessons get summarized away. So
1212
+ * the playbook GROWS by appending each generation's new lessons as provenance-
1213
+ * tagged delta bullets; existing bullets are preserved verbatim, never merged.
1214
+ *
1215
+ * Each generation it:
1216
+ * 1. reads the playbook block already in the parent surface (verbatim);
1217
+ * 2. turns this generation's `findings` into lessons, keeping only the ones not
1218
+ * already present (idempotency — a recurring finding is not re-appended, but
1219
+ * a genuinely NEW lesson always is, even if similar to an old one);
1220
+ * 3. appends the new lessons as `- [gN] <lesson>` deltas and re-emits the block.
1221
+ *
1222
+ * Bounded WITHOUT collapse: when the playbook exceeds `maxEntries`, the OLDEST
1223
+ * deltas are evicted (FIFO) — recency is kept, but no two distinct lessons are
1224
+ * ever merged into one. Deterministic (no LLM) so a lift is attributable to the
1225
+ * accumulated lessons, not a rewrite's model noise.
1226
+ *
1227
+ * Fail-loud: with no new lesson this generation it returns NO candidate (the
1228
+ * playbook is unchanged — nothing to propose), never a fabricated bullet.
1229
+ */
1230
+
1231
+ interface AceProposerOptions {
1232
+ /** Max delta bullets retained in the playbook. On overflow the OLDEST are
1233
+ * evicted (FIFO) — never merged. Default 50 (ACE keeps a long context). */
1234
+ maxEntries?: number;
1235
+ /** Heading rendered above the bullets inside the block. */
1236
+ sectionHeading?: string;
1237
+ }
1238
+ declare function aceProposer(opts?: AceProposerOptions): SurfaceProposer;
1239
+
1240
+ /**
1241
+ * `haloProposer` — wraps the REAL halo-engine (Inference.net's hierarchical
1242
+ * agentic trace analyzer, `pip install halo-engine`, repo context-labs/halo)
1243
+ * as an agent-eval `SurfaceProposer`, so HALO competes head-to-head with
1244
+ * `gepaProposer` — and with our own `traceAnalystProposer` — inside `compareProposers`
1245
+ * on identical traces / scenarios / held-out scoring.
1246
+ *
1247
+ * It PRESERVES halo's actual working usage — `analyze` shells out to the
1248
+ * published CLI (`halo <traces.jsonl> -p <prompt> -m <model>`) and uses its real
1249
+ * RLM findings verbatim. We do NOT reimplement its analysis; that would make the
1250
+ * benchmark meaningless. The materialize/apply pipeline is the shared
1251
+ * `analysisEditProposer` — identical to `traceAnalystProposer`, which is what makes
1252
+ * the comparison apples-to-apples.
1253
+ *
1254
+ * Fail-loud: no traces → throw; halo errors → throw; empty findings → throw.
1255
+ */
1256
+
1257
+ interface HaloProposerOptions {
1258
+ /** OpenAI-compatible base URL for BOTH halo's RLM analysis and the apply
1259
+ * step (e.g. the Tangle router `https://router.tangle.tools/v1`). */
1260
+ baseUrl: string;
1261
+ /** Bearer key (else relies on OPENAI_API_KEY in the env halo inherits). */
1262
+ apiKey?: string;
1263
+ /** Model for halo's `--model` (its RLM). Default 'gpt-5.4-mini' (halo's own default). */
1264
+ model?: string;
1265
+ /** Model used to APPLY halo's findings to the prompt surface. Default = `model`. */
1266
+ applyModel?: string;
1267
+ /** The real halo binary. Default 'halo' (from `pip install halo-engine`). */
1268
+ haloBin?: string;
1269
+ /** Resolve the OTLP traces (JSONL string) halo should analyze for THIS
1270
+ * generation. Returning empty throws (halo has nothing to analyze). */
1271
+ resolveTraces: (ctx: ProposeContext) => string | Promise<string>;
1272
+ /** halo's analysis prompt (`-p`). Default targets the failure taxonomy. */
1273
+ analysisPrompt?: string;
1274
+ /** halo `--max-depth` / `--max-turns` passthrough. */
1275
+ maxDepth?: number;
1276
+ maxTurns?: number;
1277
+ /** Test seam: inject a fetch for the apply-step callLlm (no network in unit tests). */
1278
+ fetchImpl?: LlmClientOptions['fetch'];
1279
+ }
1280
+ /** Wrap the real halo-engine CLI as a SurfaceProposer (prompt-tier). */
1281
+ declare function haloProposer(opts: HaloProposerOptions): SurfaceProposer;
1282
+
1283
+ /**
1284
+ * `memoryCurationProposer` — a CURATOR `SurfaceProposer`, the complement to the
1285
+ * OPTIMIZER proposers (`gepaProposer` rewrites the prompt; this one BUILDS a
1286
+ * searchable memory of what prior trajectories taught and grafts the most
1287
+ * relevant lessons onto the surface).
1288
+ *
1289
+ * Each generation it:
1290
+ * 1. collects lessons — this generation's trace-analyst `findings` PLUS the
1291
+ * memory already carried in the parent surface (so memory accumulates
1292
+ * across generations instead of resetting);
1293
+ * 2. curates them — normalizes, deduplicates near-identical lessons, and ranks
1294
+ * by recurrence (a lesson seen across many findings outranks a one-off);
1295
+ * 3. retrieves the top-K and writes them back as a single delimited memory
1296
+ * block in the surface (idempotent — the block is replaced, never stacked,
1297
+ * so the prompt does not grow without bound).
1298
+ *
1299
+ * This is the substrate behind the "knowledge base of working trajectories" the
1300
+ * agent searches: the curated block IS the retrieved memory the next run reads.
1301
+ * Curation is DETERMINISTIC (no LLM) so a lift it produces is attributable to
1302
+ * the lessons, not to model noise in a rewrite. An optional `distill` LLM step
1303
+ * can compress raw findings into crisp imperatives; default is verbatim.
1304
+ *
1305
+ * Fail-loud: never fabricates a lesson. With no findings and no prior memory it
1306
+ * returns no candidate (nothing learned yet — gen 0). It does not throw on an
1307
+ * empty generation because early generations legitimately have no findings.
1308
+ */
1309
+
1310
+ interface MemoryCurationProposerOptions {
1311
+ /** Top-K lessons retained in the surface memory block. Default 12. */
1312
+ maxEntries?: number;
1313
+ /** Heading rendered above the lessons inside the block. Default below. */
1314
+ sectionHeading?: string;
1315
+ /**
1316
+ * Optional LLM distillation: compress raw findings into crisp, generalizable
1317
+ * one-line imperatives before curating. Omit for verbatim (deterministic).
1318
+ */
1319
+ distill?: {
1320
+ baseUrl: string;
1321
+ apiKey?: string;
1322
+ model: string;
1323
+ fetchImpl?: LlmClientOptions['fetch'];
1324
+ };
1325
+ }
1326
+ /** Build the CURATOR proposer. */
1327
+ declare function memoryCurationProposer(opts?: MemoryCurationProposerOptions): SurfaceProposer;
1328
+
1329
+ /**
1330
+ * `traceAnalystProposer` — wraps agent-eval's OWN trace-analyst engine
1331
+ * (`AnalystRegistry` over the agentic OTLP reader) as a `SurfaceProposer`.
1332
+ * It is the symmetric opponent to `haloProposer`: both run the SAME shared
1333
+ * `analysisEditProposer` pipeline (materialize identical traces → apply via one
1334
+ * identical LLM edit), so a `compareProposers` lift delta isolates a single
1335
+ * variable — ANALYSIS QUALITY. The benchmark answers "is our HALO clone as good
1336
+ * as the real HALO?" as a held-out lift CI, not a vibe.
1337
+ *
1338
+ * Findings come from the REGISTRY (structured `AnalystFinding[]` carrying
1339
+ * area / severity / recommended_action), rendered into the report the shared
1340
+ * apply step consumes.
1341
+ *
1342
+ * Fail-loud: no traces → throw; analyst run errors → throw; zero findings →
1343
+ * throw. Never fabricate a candidate.
1344
+ */
1345
+
1346
+ interface TraceAnalystProposerOptions {
1347
+ /** OpenAI-compatible base URL for BOTH the analyst's agentic reads and the
1348
+ * apply step (e.g. `https://api.deepseek.com/v1` or the Tangle router). */
1349
+ baseUrl: string;
1350
+ /** Bearer key. Required — the Ax AI service has no env fallback here. */
1351
+ apiKey: string;
1352
+ /** Model the analyst kinds use for their agentic trace reads. */
1353
+ model: string;
1354
+ /** Model used to APPLY findings to the prompt surface. Default = `model`.
1355
+ * Keep this EQUAL to haloProposer's `applyModel` for an apples-to-apples run. */
1356
+ applyModel?: string;
1357
+ /** Ax provider name. Default 'openai' — works for any OpenAI-compatible base
1358
+ * via `apiURL`. Use 'deepseek' to hit DeepSeek's native provider. */
1359
+ provider?: string;
1360
+ /** Which analyst kinds to run. Default = the full shipped suite. */
1361
+ kinds?: readonly TraceAnalystKindSpec[];
1362
+ /** Resolve the OTLP traces (JSONL string) the analyst should read for THIS
1363
+ * generation — identical contract to `haloProposer.resolveTraces`. */
1364
+ resolveTraces: (ctx: ProposeContext) => string | Promise<string>;
1365
+ /** Override the findings producer. Default: the shipped `AnalystRegistry`
1366
+ * over `kinds`. The unit suite injects canned findings here. */
1367
+ analyze?: (tracePath: string, ctx: ProposeContext) => Promise<ReadonlyArray<AnalystFinding>>;
1368
+ /** Test seam: inject a fetch for the apply-step `callLlm`. */
1369
+ fetchImpl?: LlmClientOptions['fetch'];
1370
+ }
1371
+ /** Wrap agent-eval's trace-analyst registry as a SurfaceProposer (prompt-tier). */
1372
+ declare function traceAnalystProposer(opts: TraceAnalystProposerOptions): SurfaceProposer;
1373
+
1374
+ /**
1375
+ * Shared campaign-score reductions used by every optimizer preset
1376
+ * (`runOptimization`, `runSkillOpt`, `compareProposers`). ONE definition of
1377
+ * "composite of a campaign" and "per-scenario / per-dimension breakdown" so
1378
+ * the optimizers cannot drift on how a surface's score is computed.
1379
+ */
1380
+
1381
+ /** Mean composite across a campaign: per cell, the mean of its judges'
1382
+ * composites; then the mean across cells. Cells with no judge scores are
1383
+ * skipped. Empty ⇒ 0. */
1384
+ declare function campaignMeanComposite<TArtifact, TScenario extends Scenario>(campaign: CampaignResult<TArtifact, TScenario>): number;
1385
+ interface CampaignBreakdown {
1386
+ /** Mean score per judge dimension across all cells. */
1387
+ dimensions: Record<string, number>;
1388
+ /** Per-scenario composite (mean over reps + judges) + the judge's free-form
1389
+ * `notes` for that scenario (the "why" a reflective proposer grounds on). */
1390
+ scenarios: Array<{
1391
+ scenarioId: string;
1392
+ composite: number;
1393
+ notes?: string;
1394
+ }>;
1395
+ }
1396
+ /** Per-candidate evidence a reflective/patch proposer grounds its next proposal
1397
+ * on: mean score per judge dimension + per-scenario composite. */
1398
+ declare function campaignBreakdown<TArtifact, TScenario extends Scenario>(campaign: CampaignResult<TArtifact, TScenario>): CampaignBreakdown;
1399
+
1400
+ /**
1401
+ * VCS-pluggable worktree adapter. One improvement = one worktree, PR-like
1402
+ * (multiple commits allowed). A code-tier proposer's `propose()` creates a
1403
+ * worktree, an agent commits the change into it, and `finalize()` returns a
1404
+ * `CodeSurface{ worktreeRef }` the measurement checks out to run the worker
1405
+ * against the changed code. On promotion the worktree becomes the PR branch.
1406
+ *
1407
+ * The interface is VCS-agnostic so a future `jj` ([jj-vcs](https://github.com/jj-vcs/jj))
1408
+ * adapter can slot in without touching proposer code. Only the git adapter
1409
+ * ships today. See `docs/design/loop-taxonomy.md`.
1410
+ */
1411
+
1412
+ interface Worktree {
1413
+ /** Absolute path to the checked-out worktree directory. */
1414
+ path: string;
1415
+ /** The branch the worktree is on (becomes the PR branch on promotion). */
1416
+ branch: string;
1417
+ /** The ref the worktree was forked from. */
1418
+ baseRef: string;
1419
+ }
1420
+ interface WorktreeAdapter {
1421
+ /** Create an isolated worktree on a fresh branch off `baseRef`. */
1422
+ create(opts: {
1423
+ baseRef: string;
1424
+ label: string;
1425
+ }): Promise<Worktree>;
1426
+ /** Commit any pending changes in the worktree, then return a CodeSurface
1427
+ * pointing at it. The agent has already written its change into
1428
+ * `worktree.path` by the time this is called. */
1429
+ finalize(worktree: Worktree, summary: string): Promise<CodeSurface>;
1430
+ /** Remove the worktree (and its branch) — called for losing candidates. */
1431
+ discard(worktree: Worktree): Promise<void>;
1432
+ }
1433
+ declare class WorktreeAdapterError extends Error {
1434
+ readonly cause?: unknown | undefined;
1435
+ constructor(message: string, cause?: unknown | undefined);
1436
+ }
1437
+ interface GitWorktreeAdapterOptions {
1438
+ /** Repo root the worktrees fork from. */
1439
+ repoRoot: string;
1440
+ /** Directory worktrees are created under. Default: `<repoRoot>/.worktrees`. */
1441
+ worktreeDir?: string;
1442
+ /** Branch-name prefix. Default: `improve`. */
1443
+ branchPrefix?: string;
1444
+ /** Test seam — defaults to a real `git` runner. */
1445
+ git?: (args: string[], cwd: string) => string;
1446
+ }
1447
+ declare function gitWorktreeAdapter(opts: GitWorktreeAdapterOptions): WorktreeAdapter;
1448
+ /** Resolve a `CodeSurface`'s worktreeRef to a directory the measurement can
1449
+ * run the worker in. A path ref is returned as-is; anything else is treated
1450
+ * as a ref under the adapter's worktree dir. */
1451
+ declare function resolveWorktreePath(surface: CodeSurface, worktreeDir?: string): string;
1452
+
1453
+ export { type AcceptedEdit, type AceProposerOptions, type AnalystArtifact, type AnalystScenario, type ApplySkillPatchResult, type BuildAnalystSurfaceDispatchOptions, type CampaignBreakdown, CampaignResult, CampaignStorage, CodeSurface, type CompareProposersOptions, type DimensionRegression, DispatchContext, type FailureModeRecallJudgeOptions, type FapoAttributionSignals, type FapoEntryConfig, type FapoFailureCluster, type FapoOptimizationLevel, type FapoProposerOptions, type FapoReviewInput, type FapoReviewIssue, type FapoReviewResult, type FapoScopeContract, FsLabeledScenarioStore, type FsLabeledScenarioStoreOptions, Gate, GenerationRecord, type GitWorktreeAdapterOptions, type HaloProposerOptions, type HeldoutSignificance, type HeldoutSignificanceOptions, type JsonPrimitive, type JsonValue, JudgeConfig, JudgeScore, LabelTrust, LabeledScenarioRecord, LabeledScenarioSampleArgs, LabeledScenarioSource, LabeledScenarioStore, LabeledScenarioStoreError, LabeledScenarioWrite, type MemoryCurationProposerOptions, MutableSurface, type OptimizerEntryConfig, type PairedHoldout, type ParameterCandidate, type ParameterChange, type ParameterSweepProposerOptions, type PlaybackContext, type PlaybackDriver, type PlaybackStep, type ProfileDispatchFn, ProfileMatrixError, type ProfileSummary, ProposeContext, type ProposePatchesArgs, ProposedCandidate, type ProposerComparison, type ProposerEntry, type ProposerPairwise, type ProposerScore, type RejectedEdit, RunCampaignOptions, RunImprovementLoopOptions, type RunProfileMatrixOptions, type RunProfileMatrixResult, type RunSkillOptOptions, type RunSkillOptResult, Scenario, type ScenarioRollup, type ScoreboardRenderOptions, type ScoreboardRow, type ScoreboardSummary, type SequentialDecideFn, type SequentialDecideOptions, type SequentialDecision, type SequentialObservation, type SequentialPairedGate, type SequentialPairedGateOptions, type SkillOptEpochRecord, type SkillOptEvidence, type SkillOptProposer, type SkillOptProposerOptions, type SkillPatch, type SkillPatchOp, SkillPatchParseError, type SkillPatchRejection, SurfaceProposer, type TraceAnalystProposerOptions, type UserStory, type UserStoryVerdict, type Worktree, type WorktreeAdapter, WorktreeAdapterError, aceProposer, applySkillPatch, buildAnalystSurfaceDispatch, campaignBreakdown, campaignMeanComposite, compareProposers, detectScale, dimensionRegressions, extractFapoAttributionSignals, failureModeRecallJudge, fapoEscalationEntry, fapoProposer, gepaParetoEntry, gepaReflectionEntry, gitWorktreeAdapter, haloProposer, heldoutSignificance, makePlaybackDispatch, memoryCurationProposer, pairHoldout, parameterSweepProposer, parseSkillPatchResponse, patchEditCount, renderScoreboardMarkdown, resolveWorktreePath, runProfileMatrix, runSkillOpt, scoreUserStory, scoreboardSummary, sequentialDecide, sequentialPairedGate, skillOptEntry, skillOptProposer, traceAnalystProposer, userStoryScoreboard };