@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
package/dist/traces.d.ts CHANGED
@@ -1,4 +1,976 @@
1
- export * from './replay';
2
- export * from './trace';
3
- export * from './trace-analyst';
4
- //# sourceMappingURL=traces.d.ts.map
1
+ import { N as NotFoundError, R as ReplayError } from './errors-CzMUYo7b.js';
2
+ import { P as ProviderRedactor, R as RawProviderSink, d as RawProviderEvent } from './raw-provider-sink-C46HDghv.js';
3
+ export { F as FileSystemRawProviderSink, a as FileSystemRawProviderSinkOptions, I as InMemoryRawProviderSink, b as InMemoryRawProviderSinkOptions, N as NoopRawProviderSink, c as RawProviderDirection, e as RawProviderSinkFilter, f as defaultProviderRedactor, p as providerFromBaseUrl } from './raw-provider-sink-C46HDghv.js';
4
+ import { a as RunCompleteHookContext, R as RunCompleteHook } from './emitter-C2rqGH_l.js';
5
+ export { S as SpanHandle, T as TraceEmitter, b as TraceEmitterOptions, l as llmSpanFromProvider } from './emitter-C2rqGH_l.js';
6
+ export { b as RunIntegrityError, R as RunIntegrityExpectations, c as RunIntegrityIssue, d as RunIntegrityIssueCode, a as RunIntegrityReport, e as assertRunCaptured, t as throwIfRunIncomplete } from './integrity-D2t12mMw.js';
7
+ import { T as TraceStore } from './store-BcFXE6LG.js';
8
+ export { E as EventFilter, F as FileSystemTraceStore, a as FileSystemTraceStoreOptions, I as InMemoryTraceStore, R as RunFilter, S as SpanFilter } from './store-BcFXE6LG.js';
9
+ export { a as aggregateLlm, b as argHash, g as groupBy, j as judgeSpans, l as llmSpans, r as runFailureClass, c as runsForScenario, t as toolSpans } from './query-B7GGjRox.js';
10
+ export { D as DEFAULT_REDACTION_RULES, b as REDACTION_VERSION, a as RedactionReport, R as RedactionRule, r as redactString, c as redactValue } from './redact-B40YG2M_.js';
11
+ import { R as Run } from './schema-m0gsnbt3.js';
12
+ export { A as Artifact, B as BudgetLedgerEntry, h as BudgetSpec, E as EventKind, i as FAILURE_CLASSES, F as FailureClass, G as GenericSpan, J as JudgeSpan, L as LlmSpan, M as Message, d as RetrievalSpan, g as RunLayer, b as RunOutcome, f as RunStatus, e as SandboxSpan, S as Span, j as SpanBase, c as SpanKind, k as SpanStatus, l as TRACE_SCHEMA_VERSION, T as ToolSpan, a as TraceEvent, m as isJudgeSpan, n as isLlmSpan, o as isRetrievalSpan, p as isSandboxSpan, q as isToolSpan } from './schema-m0gsnbt3.js';
13
+ import { A as AnalyzeTracesOptions, b as AnalyzeTracesResult } from './analyst-C8HHvfJp.js';
14
+ export { a as AnalyzeTracesInput, c as AnalyzeTracesTurnSnapshot, d as analyzeTraces } from './analyst-C8HHvfJp.js';
15
+ import { h as TraceAnalystSpanKind, i as TraceAnalystSpanStatus, T as TraceAnalysisStore, g as TraceAnalystFilters, b as DatasetOverview, Q as QueryTracesPage, l as ViewTraceResult, V as ViewSpansResult, c as SearchTraceResult, S as SearchSpanResult } from './store-C1YxJDEK.js';
16
+ export { D as DEFAULT_TRACE_ANALYST_BUDGETS, E as ErrorCluster, d as SpanMatchRecord, e as TRACE_ANALYST_TRUNCATION_MARKER_PREFIX, f as TraceAnalystByteBudgets, a as TraceAnalystSpan, j as TraceAnalystTraceSummary, k as ViewTraceOversized } from './store-C1YxJDEK.js';
17
+ import { a as RunSplitTag, b as RunTokenUsage, R as RunRecord } from './run-record-CP2ObebC.js';
18
+ import { AxFunction } from '@ax-llm/ax';
19
+ import '@tangle-network/agent-interface';
20
+
21
+ /** Canonical OpenInference-over-OTLP attribute vocabulary used at the trace boundary. */
22
+ declare const OPENINFERENCE_SPAN_KIND = "openinference.span.kind";
23
+ declare const LLM_MODEL_NAME = "llm.model_name";
24
+ declare const LLM_INPUT_TOKENS = "llm.token_count.prompt";
25
+ declare const LLM_OUTPUT_TOKENS = "llm.token_count.completion";
26
+ declare const LLM_CACHED_TOKENS = "llm.token_count.prompt_cache_hit";
27
+ declare const LLM_COST_USD = "llm.cost_usd";
28
+ declare const TOOL_NAME = "tool.name";
29
+ declare const SPAN_KIND_ATTR_KEYS: readonly ["openinference.span.kind", "inference.observation_kind"];
30
+ declare const LLM_MODEL_ATTR_KEYS: readonly ["llm.model_name", "inference.llm.model_name", "llm.model", "gen_ai.request.model", "gen_ai.response.model"];
31
+ declare const LLM_INPUT_TOKEN_ATTR_KEYS: readonly ["llm.token_count.prompt", "inference.llm.input_tokens", "llm.input_tokens", "gen_ai.usage.input_tokens", "gen_ai.usage.prompt_tokens"];
32
+ declare const LLM_OUTPUT_TOKEN_ATTR_KEYS: readonly ["llm.token_count.completion", "inference.llm.output_tokens", "llm.output_tokens", "gen_ai.usage.output_tokens", "gen_ai.usage.completion_tokens"];
33
+ declare const LLM_CACHED_TOKEN_ATTR_KEYS: readonly ["llm.token_count.prompt_cache_hit", "inference.llm.cached_tokens", "llm.cached_tokens", "gen_ai.usage.cached_tokens"];
34
+ declare const LLM_COST_ATTR_KEYS: readonly ["llm.cost_usd", "inference.llm.cost.total", "llm.cost.total", "gen_ai.usage.cost"];
35
+ declare const TOOL_NAME_ATTR_KEYS: readonly ["tool.name", "inference.tool.name"];
36
+ declare function traceSpanKindToOpenInferenceKind(kind: string): string;
37
+
38
+ /**
39
+ * Trace-analyst auto-execution hook.
40
+ *
41
+ * Wires `analyzeTraces` into a `TraceEmitter`'s `onRunComplete` so a
42
+ * direct matrix run produces an analysis artifact without an out-of-band
43
+ * step. Designed for the case where the consumer reports "the analyst
44
+ * never ran" — the cause is almost always orchestration, not the analyst.
45
+ *
46
+ * Usage:
47
+ *
48
+ * const emitter = new TraceEmitter(store, {
49
+ * onRunComplete: [traceAnalystOnRunComplete({ analyze: opts, save })],
50
+ * })
51
+ *
52
+ * Hooks are best-effort by default — they never crash the underlying run.
53
+ * The caller decides whether to gate the run on the analysis result via
54
+ * the `gateOn` callback.
55
+ */
56
+
57
+ interface TraceAnalystHookOptions {
58
+ /**
59
+ * Options forwarded to `analyzeTraces`. The hook supplies the question
60
+ * if you don't pass one — defaulting to a launch-grade prompt that asks
61
+ * for failure modes, surprising findings, and a recommendation.
62
+ */
63
+ analyze: Omit<AnalyzeTracesOptions, 'source'> & {
64
+ source?: AnalyzeTracesOptions['source'];
65
+ };
66
+ /**
67
+ * Override the question. The default is intentionally generic:
68
+ * "Summarise what happened in this run, surface any failure modes,
69
+ * surprising findings, or evidence the verdict is wrong."
70
+ */
71
+ question?: string;
72
+ /**
73
+ * Persist the result. The hook calls this with the analysis output and
74
+ * the run context. Common implementations write to a TraceAnalysisStore
75
+ * or append to a per-run JSONL.
76
+ */
77
+ save?: (result: AnalyzeTracesResult, ctx: RunCompleteHookContext) => Promise<void>;
78
+ /**
79
+ * Predicate gating execution per run. Default: every completed run.
80
+ * Use to skip aborted runs, debug runs, or runs without LLM activity.
81
+ */
82
+ shouldRun?: (ctx: RunCompleteHookContext) => boolean;
83
+ /**
84
+ * Optional gate: if set and returns false, the hook records the failure
85
+ * as a log event on the run instead of staying quiet. The caller can
86
+ * then trigger downstream alerts off `analyst_gate_failed` log events.
87
+ */
88
+ gateOn?: (result: AnalyzeTracesResult, ctx: RunCompleteHookContext) => boolean;
89
+ }
90
+ declare function traceAnalystOnRunComplete(opts: TraceAnalystHookOptions): RunCompleteHook;
91
+
92
+ interface TraceInsightTask {
93
+ id: string;
94
+ name: string;
95
+ prompt?: string;
96
+ difficulty?: string;
97
+ tags?: string[];
98
+ outcome?: string;
99
+ score?: number;
100
+ gaps?: string[];
101
+ }
102
+ interface TraceInsightSuite {
103
+ name: string;
104
+ collectionId?: string;
105
+ tasks: TraceInsightTask[];
106
+ }
107
+ interface TraceInsightFinding {
108
+ kind: string;
109
+ severity?: string;
110
+ taskIds: string[];
111
+ evidence?: string;
112
+ proposedFixClass?: string;
113
+ }
114
+ interface TraceInsightQuestion {
115
+ id: string;
116
+ question: string;
117
+ why: string;
118
+ }
119
+ interface TraceInsightPanelRole {
120
+ id: string;
121
+ name: string;
122
+ responsibility: string;
123
+ }
124
+ interface TraceInsightPromptInput {
125
+ suite: TraceInsightSuite;
126
+ findings?: TraceInsightFinding[];
127
+ agent?: Record<string, unknown>;
128
+ totals?: Record<string, unknown>;
129
+ maxRepresentativeTraces?: number;
130
+ }
131
+ interface TraceInsightContext {
132
+ suite: TraceInsightSuite;
133
+ scope: string;
134
+ keywords: string[];
135
+ questions: TraceInsightQuestion[];
136
+ panel: TraceInsightPanelRole[];
137
+ findings: TraceInsightFinding[];
138
+ agent: Record<string, unknown> | null;
139
+ totals: Record<string, unknown> | null;
140
+ }
141
+ interface TraceInsightQualityGate {
142
+ id: string;
143
+ label: string;
144
+ passed: boolean;
145
+ severity: 'critical' | 'high' | 'medium' | 'low';
146
+ detail: string;
147
+ }
148
+ interface TraceInsightReadiness {
149
+ score: number;
150
+ grade: 'external-ready' | 'internal-review' | 'raw-analysis';
151
+ gates: TraceInsightQualityGate[];
152
+ }
153
+ declare function tokenizeDomainWords(value: string): string[];
154
+ declare function inferDomainKeywords(suite: TraceInsightSuite): string[];
155
+ declare function domainEvidencePattern(keywords: string[]): RegExp;
156
+ declare function describeTraceInsightScope(suite: TraceInsightSuite): string;
157
+ declare function planTraceInsightQuestions(input: TraceInsightPromptInput): TraceInsightQuestion[];
158
+ declare function buildTraceInsightContext(input: TraceInsightPromptInput): TraceInsightContext;
159
+ declare function scoreTraceInsightReadiness(context: TraceInsightContext): TraceInsightReadiness;
160
+ declare function defaultTraceInsightPanel(): TraceInsightPanelRole[];
161
+ declare function buildTraceInsightPrompt(input: TraceInsightPromptInput): string;
162
+
163
+ /**
164
+ * OpenTelemetry JSON export — maps TraceSchema v1 to OTLP/JSON so
165
+ * traces render natively in Jaeger / Honeycomb / Langfuse / Grafana.
166
+ *
167
+ * Wire format only. We do NOT depend on the @opentelemetry SDK — that
168
+ * would drag in polyfills incompatible with Workers/Edge. Consumers
169
+ * push the JSON to their collector of choice via HTTP.
170
+ *
171
+ * Reference: OTLP 1.3.2 (ResourceSpans / ScopeSpans / Span).
172
+ */
173
+
174
+ declare const OTEL_AGENT_EVAL_SCOPE: {
175
+ name: string;
176
+ version: string;
177
+ };
178
+ interface OtlpSpan {
179
+ traceId: string;
180
+ spanId: string;
181
+ parentSpanId?: string;
182
+ name: string;
183
+ kind: number;
184
+ startTimeUnixNano: string;
185
+ endTimeUnixNano: string;
186
+ attributes: Array<{
187
+ key: string;
188
+ value: {
189
+ stringValue?: string;
190
+ intValue?: string;
191
+ doubleValue?: number;
192
+ boolValue?: boolean;
193
+ };
194
+ }>;
195
+ events?: Array<{
196
+ timeUnixNano: string;
197
+ name: string;
198
+ attributes?: OtlpSpan['attributes'];
199
+ }>;
200
+ status?: {
201
+ code: number;
202
+ message?: string;
203
+ };
204
+ }
205
+ interface OtlpResourceSpans {
206
+ resource: {
207
+ attributes: OtlpSpan['attributes'];
208
+ };
209
+ scopeSpans: Array<{
210
+ scope: typeof OTEL_AGENT_EVAL_SCOPE;
211
+ spans: OtlpSpan[];
212
+ }>;
213
+ }
214
+ interface OtlpExport {
215
+ resourceSpans: OtlpResourceSpans[];
216
+ }
217
+ /** Export a single run's spans + events in OTLP/JSON. */
218
+ declare function exportRunAsOtlp(store: TraceStore, runId: string, resourceAttrs?: Record<string, string | number | boolean>): Promise<OtlpExport>;
219
+
220
+ /**
221
+ * `flattenOtlpExportToNdjson` — flatten an `OtlpExport` (the shape
222
+ * `exportRunAsOtlp` produces) into the per-line JSON the analyst's
223
+ * `OtlpFileTraceStore` index reads. Replaces three per-consumer OTLP
224
+ * flatteners with one canonical projection.
225
+ *
226
+ * Pure function, no I/O — the caller does `.map(JSON.stringify).join('\n')`
227
+ * and writes the file (consumers want control over rotation + naming).
228
+ */
229
+
230
+ interface OtlpFlatLine {
231
+ trace_id: string;
232
+ span_id: string;
233
+ parent_span_id: string | null;
234
+ name: string;
235
+ kind: string;
236
+ start_time: string;
237
+ end_time: string;
238
+ status: {
239
+ code: 'STATUS_CODE_OK' | 'STATUS_CODE_ERROR' | 'STATUS_CODE_UNSET';
240
+ message?: string;
241
+ };
242
+ resource: {
243
+ attributes: Record<string, string | number | boolean>;
244
+ };
245
+ attributes: Record<string, string | number | boolean>;
246
+ events?: Array<{
247
+ name: string;
248
+ timeUnixNano?: string;
249
+ attributes?: Record<string, unknown>;
250
+ }>;
251
+ }
252
+ interface FlattenOtlpOptions {
253
+ /** `'openinference'` (default) mirrors legacy per-span attributes into the
254
+ * canonical OpenInference vocabulary the analyst readers consume. `'none'`
255
+ * passes attributes through untouched. */
256
+ attributeVocabulary?: 'openinference' | 'none';
257
+ /** Override the numeric-kind → otlp-string mapping. */
258
+ kindMap?: Partial<Record<number, string>>;
259
+ }
260
+ declare function flattenOtlpExportToNdjson(otlpExport: OtlpExport, opts?: FlattenOtlpOptions): OtlpFlatLine[];
261
+
262
+ /**
263
+ * Canonical OTLP-flat-line readers shared by every consumer of the
264
+ * OTLP-JSONL wire shape (one OTLP span per line; the form
265
+ * `flattenOtlpExportToNdjson` produces and the form AppWorld / HALO
266
+ * emit via their OpenInference OTLP exporter).
267
+ *
268
+ * `OtlpFileTraceStore` indexes spans with these; `otlpToRunRecords`
269
+ * aggregates spans into `RunRecord`s with the same readers. One parser,
270
+ * one vocabulary — a divergence between the analyst's view of a trace and
271
+ * the RunRecord projected from it is a class of bug this consolidation
272
+ * removes by construction.
273
+ *
274
+ * Vocabulary. The readers understand BOTH dialects that appear in the
275
+ * wild:
276
+ * - the substrate's own `llm.*` / `tool.*` / `span.kind` attributes
277
+ * (`flattenSpanAttributes` in `trace/otel.ts`), and
278
+ * - the OpenInference / inference-export attributes AppWorld / HALO
279
+ * emit (`openinference.span.kind`, `inference.observation_kind`,
280
+ * `inference.llm.input_tokens`, `llm.token_count.prompt`, …).
281
+ *
282
+ * Pure, no I/O.
283
+ */
284
+
285
+ /**
286
+ * The structural fields a flat OTLP-JSONL line projects to. `attributes`
287
+ * is the merged resource+span attribute map (span overrides resource);
288
+ * the named fields are the pivots every reader of a trace needs without
289
+ * paying the full attribute materialisation.
290
+ */
291
+ interface ProjectedOtlpSpan {
292
+ trace_id: string;
293
+ span_id: string;
294
+ parent_span_id: string | null;
295
+ name: string;
296
+ kind: TraceAnalystSpanKind;
297
+ start_time: string;
298
+ end_time: string;
299
+ duration_ms: number;
300
+ status: TraceAnalystSpanStatus;
301
+ status_message: string | undefined;
302
+ service_name: string | null;
303
+ agent_name: string | null;
304
+ model_name: string | null;
305
+ tool_name: string | null;
306
+ /** Merged resource + span attributes, span winning on overlap. */
307
+ attributes: Record<string, unknown>;
308
+ }
309
+ /**
310
+ * Project one parsed OTLP-JSONL object to `ProjectedOtlpSpan`, or `null`
311
+ * when the line is missing the mandatory `trace_id` + `span_id`.
312
+ */
313
+ declare function projectOtlpFlatLine(raw: Record<string, unknown>): ProjectedOtlpSpan | null;
314
+ declare function readOtlpStatus(raw: Record<string, unknown>): {
315
+ code: TraceAnalystSpanStatus;
316
+ message: string | undefined;
317
+ };
318
+ declare function inferOtlpKind(attrs: Record<string, unknown>): TraceAnalystSpanKind;
319
+ /**
320
+ * Flatten OTLP `attributes` + `resource.attributes` into a single
321
+ * dotted-key map. Span attributes override resource attributes when keys
322
+ * overlap. Nested objects/arrays are preserved as-is.
323
+ */
324
+ declare function extractOtlpAttributes(raw: Record<string, unknown>): Record<string, unknown>;
325
+ declare function stringField(raw: Record<string, unknown>, key: string): string | undefined;
326
+ declare function asString(v: unknown): string | null;
327
+ /** Read a numeric attribute, tolerating numeric strings; `null` if absent/NaN. */
328
+ declare function asNumber(v: unknown): number | null;
329
+ /** First finite numeric value across a list of candidate attribute keys. */
330
+ declare function firstNumberAttr(attrs: Record<string, unknown>, keys: readonly string[]): number | null;
331
+ /** First non-empty string value across a list of candidate attribute keys. */
332
+ declare function firstStringAttr(attrs: Record<string, unknown>, keys: readonly string[]): string | null;
333
+
334
+ /**
335
+ * `otlpToRunRecords` — fold an OTLP traces.jsonl (one OTLP span per line;
336
+ * the form AppWorld / HALO emit via their OpenInference OTLP exporter, the
337
+ * same shape `flattenOtlpExportToNdjson` produces) into validated
338
+ * `RunRecord[]` — one record per `trace_id` (one trace == one task).
339
+ *
340
+ * This is the offline ingestion primitive the AppWorld proposer bench and the
341
+ * hosted Intelligence product both stand on: traces in, paper-grade rows
342
+ * out, ready for `compareProposers` / `analyzeRuns` / the promotion gate.
343
+ *
344
+ * Aggregation per trace:
345
+ * - tokenUsage: sum LLM-span `input` / `output` (+ `cached` when present)
346
+ * across every LLM span in the trace.
347
+ * - costUsd: sum per-span LLM cost when present; else priced via
348
+ * `opts.priceUsdPerToken` from the aggregated tokens; else 0 with a
349
+ * loud `raw.cost_unpriced = 1` marker so a missing price is visible, not
350
+ * a silent zero folded into a gate.
351
+ * - failureMode: the first `STATUS_CODE_ERROR` span's normalized status
352
+ * message (carries the real failure signature, not a generic class).
353
+ * - model: the dominant LLM model in the trace (snapshot-padded to satisfy
354
+ * `validateRunRecord` when the trace's model is a bare alias).
355
+ * - outcome score: `opts.scoreForTrace` (AppWorld `world.evaluate()` →
356
+ * TGC/SGC) when supplied; else 1 when the trace had no error span, 0
357
+ * when it did — a defensible default the caller can override.
358
+ * - prompt / completion: carried into `raw` as token-count signals and,
359
+ * when the first/last LLM span exposes `input.value` / `output.value`,
360
+ * the verbatim text is preserved on the optional `promptText` /
361
+ * `completionText` of the returned `OtlpTraceRunRecord`.
362
+ *
363
+ * Fail-loud: an OTLP file with zero valid spans throws. A trace with no
364
+ * spans is impossible (a trace exists only because a span referenced it).
365
+ * `validateRunRecord` runs on every row — a malformed projection throws
366
+ * rather than silently producing a half-record.
367
+ */
368
+
369
+ interface OtlpToRunRecordsOptions {
370
+ /** Logical experiment grouping for every produced record. */
371
+ experimentId: string;
372
+ /** Candidate (variant) id — the surface these traces exercised. The
373
+ * bench passes the proposer label here so `compareProposers` can pair rows. */
374
+ candidateId: string;
375
+ /** Split assignment for every produced record. Default `'holdout'` —
376
+ * ingested traces are evidence, not the optimizer's training pool. */
377
+ splitTag?: RunSplitTag;
378
+ /** Git SHA the traces were produced from. Default `'unknown'`. */
379
+ commitSha?: string;
380
+ /** sha256 of the effective prompt surface. Default `'unknown'`. */
381
+ promptHash?: string;
382
+ /** sha256 of the effective config. Default `'unknown'`. */
383
+ configHash?: string;
384
+ /** RNG seed recorded on every row. Default 0. */
385
+ seed?: number;
386
+ /**
387
+ * Fallback model snapshot when the trace exposes no LLM model attribute
388
+ * OR exposes a bare alias `validateRunRecord` would reject. The trace's
389
+ * own model wins when it already carries a snapshot. Default
390
+ * `'unknown@otlp'` (opaque-snapshot form the validator accepts).
391
+ */
392
+ fallbackModel?: string;
393
+ /**
394
+ * USD per total token (input+output) used to price a trace when no
395
+ * per-span cost attribute is present. When unset, an unpriced trace
396
+ * records `costUsd: 0` AND `raw.cost_unpriced = 1` — the zero is flagged,
397
+ * never silent.
398
+ */
399
+ priceUsdPerToken?: number;
400
+ /**
401
+ * Score for a trace's outcome (AppWorld `world.evaluate()` → TGC/SGC, or
402
+ * any [0,1] task-success signal). Keyed by `trace_id`; falls through to
403
+ * the error-derived default (1 = no error span, 0 = had one) when the map
404
+ * has no entry or the function returns undefined.
405
+ */
406
+ scoreForTrace?: (traceId: string, span: TraceAggregate) => number | undefined;
407
+ /**
408
+ * Per-record judge metadata when an external judge produced the score.
409
+ * Keyed by `trace_id`.
410
+ */
411
+ judgeMetadataForTrace?: (traceId: string) => RunRecord['judgeMetadata'] | undefined;
412
+ }
413
+ /** A `RunRecord` plus the verbatim prompt/completion text when the trace's
414
+ * LLM spans exposed it. The text is NOT on the validated `RunRecord`
415
+ * (`outcome.raw` is numeric-only) but consumers ingesting full traces want
416
+ * it — so it rides alongside. */
417
+ interface OtlpTraceRunRecord {
418
+ record: RunRecord;
419
+ /** Verbatim first-LLM-span `input.value`, when present. */
420
+ promptText?: string;
421
+ /** Verbatim last-LLM-span `output.value`, when present. */
422
+ completionText?: string;
423
+ }
424
+ /** Per-trace rollup the score callback can inspect. */
425
+ interface TraceAggregate {
426
+ traceId: string;
427
+ spanCount: number;
428
+ llmSpanCount: number;
429
+ toolSpanCount: number;
430
+ agentSpanCount: number;
431
+ errorSpanCount: number;
432
+ tokenUsage: RunTokenUsage;
433
+ /** First error span's normalized status message, if any. */
434
+ firstErrorMessage?: string;
435
+ model: string;
436
+ startTime: string;
437
+ endTime: string;
438
+ wallMs: number;
439
+ }
440
+ /**
441
+ * Parse + aggregate an OTLP traces.jsonl string into validated
442
+ * `RunRecord[]` (one per trace). Use {@link otlpToTraceRunRecords} when you
443
+ * also want the verbatim prompt/completion text alongside each record.
444
+ */
445
+ declare function otlpToRunRecords(otlpJsonl: string, opts: OtlpToRunRecordsOptions): RunRecord[];
446
+ /** As {@link otlpToRunRecords} but returns the prompt/completion text too. */
447
+ declare function otlpToTraceRunRecords(otlpJsonl: string, opts: OtlpToRunRecordsOptions): OtlpTraceRunRecord[];
448
+
449
+ /** Ax RLM prompt for bounded trace discovery and evidence-backed analysis. */
450
+ declare const TRACE_ANALYST_ACTOR_DESCRIPTION = "You answer questions about an OTLP-shaped JSONL trace dataset using the trace tools provided in the `traces` namespace.\n\nDISCOVERY \u2192 NARROW \u2192 DEEP-READ protocol \u2014 follow exactly:\n\n1. ALWAYS call `traces.getDatasetOverview({})` FIRST without a regex_pattern. The result tells you total_traces, raw_jsonl_bytes, services, agents, models, and sample_trace_ids (real ids \u2014 never fabricate one).\n\n2. Use raw_jsonl_bytes to gauge how expensive raw scans will be. `filters.regex_pattern` is the one scan-heavy filter on getDatasetOverview / queryTraces / countTraces \u2014 narrow with indexed fields (has_errors, model_names, service_names, agent_names, time bounds) BEFORE adding a regex on a large dataset.\n\n3. To list more traces than the sample, call `traces.queryTraces({ filters?, limit, offset? })`. Each summary carries raw_jsonl_bytes \u2014 use it to choose between viewTrace and searchTrace BEFORE calling either.\n\n4. Per-trace inspection:\n - SMALL trace (raw_jsonl_bytes well under 150_000): call `traces.viewTrace({ trace_id })`. Returns all spans. Per-attribute payloads are head-capped at ~4KB; large `input.value` / `output.value` / `llm.input_messages` will show a `[trace-analyst truncated: N bytes]` marker.\n - LARGE trace (raw_jsonl_bytes near or above 150_000, or you saw an `oversized` response): use `traces.searchTrace({ trace_id, regex_pattern })` to get bounded SpanMatchRecords (span metadata + matched text + surrounding context). Then call `traces.viewSpans({ trace_id, span_ids: [...] })` for surgical reads (~16KB cap, 4\u00D7 higher than discovery), or `traces.searchSpan({ trace_id, span_id, regex_pattern })` for one large span. Stays bounded regardless of trace size.\n - Useful regex patterns: `STATUS_CODE_ERROR` (failures), tool names like `grep` or `view_trace`, error strings like `MaxTurnsExceeded`, model names, attribute keys.\n\n5. ONLY call viewTrace / viewSpans / searchTrace / searchSpan with trace/span ids you have already seen in sample_trace_ids, a queryTraces page, or a previous search result. Never invent ids.\n\n5a. **Result-shape contract** \u2014 searchTrace and searchSpan return `{ trace_id, hits, total_matches, has_more }`. Iterate `result.hits` (NOT result.matches). Each hit has `{ span_id, span_name, span_kind, attribute_path, matched_text, context_before, context_after, match_offset }`. viewTrace returns `{ trace_id, spans }` (or `oversized`). viewSpans returns `{ trace_id, spans, missing_span_ids, truncated_attribute_count }`. Never assume a field name \u2014 log the result shape first if unsure.\n\n6. If viewTrace returns an `oversized` summary instead of `spans`, DO NOT retry the same call. Read the summary's top_span_names, span_count, span_response_bytes_max, error_span_count to plan a follow-up: switch to searchTrace (or searchSpan for one large span), then viewSpans on a smaller, surgical span_ids set.\n\n7. If searchTrace or searchSpan returns has_more=true, REFINE the regex to be more specific rather than blindly raising max_matches.\n\n8. If a tool errors (invalid regex, range error), STOP and reconsider \u2014 don't retry with a guessed id or argument. Use the discovery tools above to recover.\n\n9. If a ~4KB-truncated payload from viewTrace / searchTrace matters for your answer, first try viewSpans on that span id (~16KB cap). If a 16KB-truncated payload from viewSpans still matters, narrow further with searchSpan against a more specific regex rather than asking for the full payload again.\n\n10. If maxDepth > 0 and the question splits into independent semantic branches, delegate well-defined subtasks to subagents using `await llmQuery(...)`. Pass narrow context and a focused query. Examples:\n\n const reviews = await llmQuery([\n { query: 'Drill into trace abc123 \u2014 what tool calls preceded the failure?', context: { trace_id: 'abc123' } },\n { query: 'Drill into trace def456 \u2014 same failure mode?', context: { trace_id: 'def456' } },\n ]);\n\nOBSERVABILITY rules:\n- Each non-final actor turn must emit at least one `console.log(...)` for evidence. Up to 3 logs per turn is fine when correlating multiple data sources (e.g. one log for findings list, one for source-file content, one for derived analysis).\n- Do NOT combine `console.log` with `final(...)` or `askClarification(...)` in the same turn \u2014 finish gathering data first, then call final on its own turn.\n- Reuse runtime variables across turns; don't recompute.\n- When done, call `await final(answer)` with the fully-formed report. The responder rewrites the answer into output fields; if you only pass a vague summary string the responder has nothing concrete to format.\n\nCRITICAL \u2014 `final()` payload contract for evidence-grounded analysis tasks:\n- Pass a STRUCTURED object as the second arg with the actual data the responder needs to format the answer. Do NOT pass abstract instructions; pass evidence.\n- Example for per-item verdict tasks:\n ```js\n await final(\"Format the per-item verdict report from the evidence below.\", {\n findings: [\n { id: 'sub-1-finding-1', claim: '...', verdict: 'TRUE-POSITIVE', evidence: 'lines 42-45 of contracts/X.sol show ...' },\n ...all items\n ],\n systemic_summary: '3 sentences I wrote based on the evidence above'\n });\n ```\n- Calling `final(\"answer\", {})` with no evidence is a failure mode \u2014 the responder will hallucinate or echo back the field names. Always include the gathered data.\n- Premature final after a single viewSpans call is INSUFFICIENT for per-finding analysis tasks. Read the requested attributes (e.g. `spans[i].attributes['redteam.finding.title']`), and for each one perform the requested cross-reference (e.g. read the source SPAN's `attributes['source.content']`).\n\nOUTPUT contract \u2014 your final answer must include:\n- A clear prose conclusion answering the user's question.\n- Trace ids and span ids cited as evidence for each claim.\n- Failure modes named in the user's domain language, with frequency and concrete examples.\n\nDo NOT invent trace ids, span ids, error messages, or model names. Every fact must be traceable to a tool result.";
451
+ declare const TRACE_ANALYST_ACTOR_DESCRIPTION_VERSION = "trace-analyst-actor-v5-2026-05-06";
452
+ /** Subagent prompt for focused trace-inspection subtasks. */
453
+ declare const TRACE_ANALYST_SUBAGENT_DESCRIPTION = "You are a trace-analyst subagent. Your parent has delegated a focused trace-inspection question. Use the same DISCOVERY \u2192 NARROW \u2192 DEEP-READ protocol but stay tightly scoped: do exactly what was asked, return a concise compact answer, do NOT spawn further subagents unless the parent's question is genuinely multi-branch.\n\nCite trace ids and span ids for every claim. Do NOT invent ids.";
454
+
455
+ /**
456
+ * `OtlpFileTraceStore` — read-only OTLP-JSONL trace store for the
457
+ * trace-analyst.
458
+ *
459
+ * Wire shape. Each line of the input file is one OTLP-shaped span. The
460
+ * store understands flattened OTLP JSONL plus the OpenInference vocab.
461
+ * We project upstream's full
462
+ * span shape down to `TraceAnalystSpan` lazily — full materialisation
463
+ * only happens for the spans the agent actually requests.
464
+ *
465
+ * Indexing. On first read the store builds an in-memory index keyed
466
+ * by `trace_id` carrying:
467
+ * - byte offsets + lengths for each span line (for surgical reads
468
+ * without re-parsing the whole file)
469
+ * - a `TraceAnalystTraceSummary` rollup
470
+ * - sets of services / agents / models / tools / has_errors
471
+ * - byte size of the trace's JSONL slab
472
+ *
473
+ * Memory bound. The index keeps span metadata only — names, kinds,
474
+ * offsets, status. Attribute payloads stay on disk until requested.
475
+ * For a 50MB JSONL with 50k spans, the index is ~5MB.
476
+ *
477
+ * Concurrency. The store builds the index once on first read and
478
+ * caches it. Subsequent reads reuse the index. The file is opened on
479
+ * each read; we never hold a long-lived FD.
480
+ */
481
+
482
+ interface OtlpFileTraceStoreOptions {
483
+ /** Path to the OTLP-JSONL file. */
484
+ path: string;
485
+ /** Override the discovery (`viewTrace`) per-attribute byte cap. */
486
+ perAttributeViewBudget?: number;
487
+ /** Override the surgical (`viewSpans`) per-attribute byte cap. */
488
+ perAttributeSpanBudget?: number;
489
+ /** Override the per-call ceiling that triggers oversized summaries. */
490
+ perCallByteCeiling?: number;
491
+ /** Override the per-match text budget. */
492
+ perMatchTextBudget?: number;
493
+ /**
494
+ * Hard ceiling on the trace file size in bytes. The store reads the
495
+ * whole file into one Buffer and indexes it in memory, so an
496
+ * unbounded file OOMs the process. Above this size the store fails
497
+ * loud with `TraceFileTooLargeError` instead of degrading silently.
498
+ * Default 256 MiB.
499
+ */
500
+ maxFileBytes?: number;
501
+ }
502
+ declare class OtlpFileTraceStore implements TraceAnalysisStore {
503
+ private readonly path;
504
+ private readonly perAttributeViewBudget;
505
+ private readonly perAttributeSpanBudget;
506
+ private readonly perCallByteCeiling;
507
+ private readonly perMatchTextBudget;
508
+ private readonly maxFileBytes;
509
+ private indexPromise?;
510
+ /** Cached UTF-8 buffer of the file. We pin it once because every
511
+ * read needs slice access and re-reading on each call balloons the
512
+ * syscall count. */
513
+ private bufferPromise?;
514
+ constructor(opts: OtlpFileTraceStoreOptions);
515
+ getOverview(filters?: TraceAnalystFilters): Promise<DatasetOverview>;
516
+ queryTraces(opts: {
517
+ filters?: TraceAnalystFilters;
518
+ limit: number;
519
+ offset?: number;
520
+ }): Promise<QueryTracesPage>;
521
+ countTraces(filters?: TraceAnalystFilters): Promise<number>;
522
+ viewTrace(opts: {
523
+ trace_id: string;
524
+ per_attribute_byte_cap?: number;
525
+ }): Promise<ViewTraceResult>;
526
+ viewSpans(opts: {
527
+ trace_id: string;
528
+ span_ids: readonly string[];
529
+ per_attribute_byte_cap?: number;
530
+ }): Promise<ViewSpansResult>;
531
+ searchTrace(opts: {
532
+ trace_id: string;
533
+ regex_pattern: string;
534
+ max_matches?: number;
535
+ }): Promise<SearchTraceResult>;
536
+ searchSpan(opts: {
537
+ trace_id: string;
538
+ span_id: string;
539
+ regex_pattern: string;
540
+ max_matches?: number;
541
+ }): Promise<SearchSpanResult>;
542
+ /** Force the index to materialise. Useful to amortise startup cost
543
+ * before the first agent call. */
544
+ ensureIndexed(): Promise<void>;
545
+ private buffer;
546
+ /** Stat-then-read so an oversized file fails loud BEFORE we allocate a
547
+ * multi-hundred-MB Buffer and OOM the process. A missing file surfaces
548
+ * as TraceFileMissingError; any other stat/read error propagates. */
549
+ private readGuarded;
550
+ private index;
551
+ private buildIndex;
552
+ private matchedTraces;
553
+ private toSummary;
554
+ private projectSpan;
555
+ private buildOversizedSummary;
556
+ private scanSpanForMatches;
557
+ }
558
+ declare class TraceFileMissingError extends NotFoundError {
559
+ constructor(path: string);
560
+ }
561
+ declare class TraceNotFoundError extends NotFoundError {
562
+ readonly trace_id: string;
563
+ constructor(trace_id: string);
564
+ }
565
+ declare class SpanNotFoundError extends NotFoundError {
566
+ readonly trace_id: string;
567
+ readonly span_id: string;
568
+ constructor(trace_id: string, span_id: string);
569
+ }
570
+
571
+ /**
572
+ * Trace-analyst tool surface — six namespaced AxFunctions the analyst
573
+ * agent calls from generated JS code via `traces.<name>(...)`.
574
+ *
575
+ * Discovery → narrow → deep-read protocol. Tool names + ordering
576
+ * support RLM discovery:
577
+ *
578
+ * 1. `getDatasetOverview` (cheap) — first call, sizes the dataset
579
+ * 2. `queryTraces` — paginated summaries with `raw_jsonl_bytes`
580
+ * 3. `countTraces` — cheap pre-flight before regex
581
+ * 4. `viewTrace` — full span list, oversized → summary
582
+ * 5. `viewSpans` — surgical 16KB-cap reads
583
+ * 6. `searchTrace` / `searchSpan` — bounded regex hits
584
+ *
585
+ * Failure mode. Tool handlers throw on bad input (invalid trace ids,
586
+ * out-of-range pagination, malformed regex). Ax converts thrown errors
587
+ * into actor-visible `[ERROR]` strings so the analyst can adjust on
588
+ * the next turn instead of looping.
589
+ */
590
+
591
+ interface BuildTraceAnalystToolsOpts {
592
+ store: TraceAnalysisStore;
593
+ /** Override the default sample-trace-id slot count (20). Mostly for tests. */
594
+ sampleTraceLimit?: number;
595
+ }
596
+ /**
597
+ * Build the trace-analyst function set. Pass the result into
598
+ * `agent(...).functions.local`.
599
+ */
600
+ declare function buildTraceAnalystTools(opts: BuildTraceAnalystToolsOpts): AxFunction[];
601
+ /**
602
+ * Convenience: same shape as `buildTraceAnalystTools` but returns the
603
+ * grouped form expected when registering trace tools alongside other
604
+ * agent function modules. */
605
+ declare function traceAnalystFunctionGroup(opts: BuildTraceAnalystToolsOpts): {
606
+ namespace: string;
607
+ title: string;
608
+ selectionCriteria: string;
609
+ description: string;
610
+ functions: AxFunction[];
611
+ };
612
+
613
+ /**
614
+ * Token-usage extraction from chat-completions responses and SSE streams.
615
+ *
616
+ * `captureFetchToRawSink` records the raw provider triple but deliberately does
617
+ * not interpret token usage — cost is a per-consumer axis. Three consumers each
618
+ * re-implement the same `usage` parser on top of the captured response (the
619
+ * OpenAI `prompt_tokens`/`completion_tokens` shape, the Anthropic
620
+ * `input_tokens`/`output_tokens` shape, and the camelCase variants), plus an
621
+ * SSE accumulator that sums the per-chunk `usage` deltas. This is the one
622
+ * canonical version.
623
+ *
624
+ * Both functions return `null` (not a silent `{ input: 0, output: 0 }`) when no
625
+ * usage is present, so a caller can tell "no usage reported" from "zero tokens".
626
+ */
627
+ interface ExtractedUsage {
628
+ input: number;
629
+ output: number;
630
+ /** Cached prompt tokens, when the provider reports them. */
631
+ cached?: number;
632
+ }
633
+ /**
634
+ * Pull `{ input, output, cached? }` from a parsed chat-completions response
635
+ * body. Accepts a top-level `usage` object (the common case) or a body that IS
636
+ * the usage object. Returns null when neither an input nor an output count is
637
+ * present — callers must inspect for null rather than treat it as zero cost.
638
+ */
639
+ declare function extractUsage(body: unknown): ExtractedUsage | null;
640
+ /**
641
+ * Sum token usage across an SSE response body. Each `data:` line is parsed and
642
+ * fed to `extractUsage`; the per-chunk counts are accumulated. The `[DONE]`
643
+ * sentinel and non-JSON lines are skipped. Returns null when no chunk carried
644
+ * usage — distinguishing a usage-less stream from a genuine zero.
645
+ *
646
+ * Providers report SSE usage in two ways: a single terminal chunk with the full
647
+ * totals, or incremental per-chunk deltas. Summing is correct for the delta
648
+ * case and harmless for the terminal case (one non-null chunk ⇒ the total).
649
+ */
650
+ declare function extractUsageFromSse(text: string): ExtractedUsage | null;
651
+ /**
652
+ * Extract usage from an HTTP `Response` without consuming the caller's body:
653
+ * clones, reads the text, and tries the JSON parser first, then the SSE
654
+ * accumulator. Best-effort — returns null on any read/parse miss so a usage tee
655
+ * never takes down the underlying call.
656
+ */
657
+ declare function extractUsageFromResponse(response: Response): Promise<ExtractedUsage | null>;
658
+
659
+ /**
660
+ * `captureFetchToRawSink` — wrap a `fetch` so every request / response / error
661
+ * against a provider is recorded into a `RawProviderSink` as the canonical
662
+ * `RawProviderEvent` triple. The one substrate copy of the fetch-capture
663
+ * pattern four consumers hand-roll (legal ships two copies).
664
+ *
665
+ * The returned value is a plain `typeof fetch` — pass it as the `fetchImpl` to
666
+ * any OpenAI-compatible backend factory. Capture is best-effort by default: a
667
+ * sink write that throws does NOT take down the underlying LLM call (set
668
+ * `failClosed` to change that). Uses the existing `defaultProviderRedactor` +
669
+ * `providerFromBaseUrl` — no new redaction policy.
670
+ */
671
+
672
+ interface CaptureFetchContext {
673
+ /** Logical run id stamped on every captured event. Required — without it
674
+ * the raw events can't be paired with their parent `Run`. */
675
+ runId: string;
676
+ /** Optional logical span id (enables span-level sink filtering). */
677
+ spanId?: string;
678
+ /** Resolved base URL (normalised, no trailing slash). Used for the event's
679
+ * `baseUrl` and for endpoint-path extraction. */
680
+ baseUrl: string;
681
+ /** Model id the caller intends to invoke. Stamped on every event. */
682
+ model: string;
683
+ /** Provider override. When omitted, `providerFromBaseUrl(baseUrl)`. */
684
+ provider?: string;
685
+ }
686
+ interface CaptureFetchOptions {
687
+ /** Override the capture-time redactor. Default `defaultProviderRedactor`. */
688
+ redactor?: ProviderRedactor;
689
+ /** Cap on captured response-body bytes; beyond it the body is truncated and
690
+ * `body_truncated` is added to `redactedFields`. Default 2 MiB. */
691
+ responseBodyByteCap?: number;
692
+ /** When true, a sink-write failure propagates to the caller. Default false
693
+ * — capture is best-effort so a sink failure never kills the LLM call. */
694
+ failClosed?: boolean;
695
+ /**
696
+ * Invoked with the token usage parsed off each successful response (JSON or
697
+ * SSE), keyed by the captured context. Lets a caller fold usage → cost without
698
+ * re-cloning the response themselves. Not called when the response carries no
699
+ * usage. Best-effort: a throw here is swallowed (it never kills the LLM call)
700
+ * unless `failClosed` is set.
701
+ */
702
+ onUsage?: (usage: ExtractedUsage, ctx: CaptureFetchContext) => void;
703
+ }
704
+ declare function captureFetchToRawSink(fetch: typeof globalThis.fetch, sink: RawProviderSink, ctx: CaptureFetchContext, opts?: CaptureFetchOptions): typeof globalThis.fetch;
705
+
706
+ /**
707
+ * OTEL span exporter — streams spans to an OTLP/HTTP collector.
708
+ *
709
+ * Reads OTEL_EXPORTER_OTLP_ENDPOINT + OTEL_EXPORTER_OTLP_HEADERS from env
710
+ * when no explicit config is given. Batches spans and flushes periodically
711
+ * or when the batch fills. No @opentelemetry SDK dependency — minimal
712
+ * OTLP/JSON serializer (~120 LOC) using the existing otel.ts helpers.
713
+ */
714
+ interface OtelExportConfig {
715
+ /** OTLP endpoint. Reads OTEL_EXPORTER_OTLP_ENDPOINT env by default. */
716
+ endpoint?: string;
717
+ /** OTLP headers. Reads OTEL_EXPORTER_OTLP_HEADERS env by default. */
718
+ headers?: Record<string, string>;
719
+ /** Batch size before flush. Default 64. */
720
+ batchSize?: number;
721
+ /** Flush interval ms. Default 5000. */
722
+ flushIntervalMs?: number;
723
+ /** Resource attributes stamped on every export. */
724
+ resourceAttributes?: Record<string, string | number | boolean>;
725
+ /** Service name. Default 'agent-eval'. */
726
+ serviceName?: string;
727
+ }
728
+ interface OtelExporter {
729
+ /** Called by the TraceEmitter on every span close. */
730
+ exportSpan(span: ExportableSpan): void;
731
+ /** Force flush pending spans. */
732
+ flush(): Promise<void>;
733
+ /** Shutdown cleanly — flushes remaining spans and stops the timer. */
734
+ shutdown(): Promise<void>;
735
+ }
736
+ interface ExportableSpan {
737
+ traceId: string;
738
+ spanId: string;
739
+ parentSpanId?: string;
740
+ name: string;
741
+ kind: string;
742
+ startedAt: number;
743
+ endedAt?: number;
744
+ status?: string;
745
+ error?: string;
746
+ model?: string;
747
+ inputTokens?: number;
748
+ outputTokens?: number;
749
+ costUsd?: number;
750
+ attributes?: Record<string, unknown>;
751
+ }
752
+ /**
753
+ * Create an OTEL exporter. Returns undefined when no endpoint is configured
754
+ * (neither via config nor env) — callers should check before attaching.
755
+ */
756
+ declare function createOtelExporter(config?: OtelExportConfig): OtelExporter | undefined;
757
+
758
+ /**
759
+ * OTEL bridge — connects TraceEmitter span lifecycle to the OtelExporter.
760
+ *
761
+ * When an OtelExporter is active, every span that closes through the
762
+ * TraceEmitter is also pushed to the exporter for real-time streaming to
763
+ * the user's OTEL collector.
764
+ *
765
+ * The bridge is opt-in: attach via `otelRunCompleteHook(exporter)` as a
766
+ * RunCompleteHook, or wrap the store with `createOtelTracingStore` for
767
+ * real-time per-span export.
768
+ */
769
+
770
+ /**
771
+ * Create a RunCompleteHook that exports all spans from the completed run
772
+ * to the OTEL exporter, then flushes.
773
+ */
774
+ declare function otelRunCompleteHook(exporter: OtelExporter): RunCompleteHook;
775
+ /**
776
+ * Create an auto-exporting TraceStore wrapper that intercepts updateSpan
777
+ * calls. When a span gets an endedAt, it's exported immediately. This
778
+ * gives real-time streaming instead of batch-at-end.
779
+ *
780
+ * This is the preferred integration path: wrap the store before
781
+ * constructing the TraceEmitter.
782
+ */
783
+ declare function createOtelTracingStore(inner: TraceStore, exporter: OtelExporter, traceId: string): TraceStore;
784
+
785
+ /**
786
+ * Convert agent-eval's internal trace shape (`FileSystemTraceStore` → `Run`,
787
+ * `Span`, `TraceEvent`) into the OTLP-flat JSONL the trace analyst
788
+ * (`analyzeTraces` + `OtlpFileTraceStore`) reads.
789
+ *
790
+ * Eval harnesses shard a `FileSystemTraceStore` per cell (persona / variant)
791
+ * under a run directory. The analyst consumes a single OTLP-NDJSON file keyed
792
+ * on `trace_id` + `span_id` with `start_time`/`end_time` in ISO-8601 and
793
+ * resource + `attributes` rolled up per-span. This module walks every shard,
794
+ * projects each `Span` (plus events pinned to it) into the flat OTLP shape,
795
+ * and emits one NDJSON file.
796
+ *
797
+ * Generic OTLP/OpenInference fields are always emitted (`service.name`,
798
+ * `agent.name`, `run.id`/`run.status`, `openinference.span.kind`,
799
+ * `llm.model_name`, …). Domain attributes (`legal.*`, `tax.*`, …) are injected
800
+ * per-run via {@link TraceStoreToOtlpOptions.resourceAttributes} /
801
+ * {@link TraceStoreToOtlpOptions.runAttributes} so consumers don't re-roll the
802
+ * walker.
803
+ */
804
+
805
+ interface TracesToOtlpResult {
806
+ /** Total spans emitted across every cell. */
807
+ spanCount: number;
808
+ /** Total run-anchor spans (one per Run) appended for analyst visibility. */
809
+ runCount: number;
810
+ /** Cells whose shards parsed cleanly. */
811
+ cellCount: number;
812
+ /** Cells that errored mid-conversion — surfaced so a partial conversion
813
+ * isn't silently masked. */
814
+ cellErrorCount: number;
815
+ }
816
+ /**
817
+ * A trace source the analyst should ingest. Two layouts are supported:
818
+ *
819
+ * - `celled` (default): the root holds one cell subdirectory per
820
+ * persona/variant, each a `FileSystemTraceStore` (`runs.ndjson`,
821
+ * `spans.ndjson`, `events.ndjson`).
822
+ * - `flat`: the root is itself a single `FileSystemTraceStore` (e.g. a
823
+ * production-ingestion sidecar that appends one ndjson set directly under
824
+ * the chosen directory).
825
+ */
826
+ interface TraceStoreSource {
827
+ /** Absolute path to the trace store root. */
828
+ root: string;
829
+ /** Layout — `celled` (default) or `flat`. */
830
+ layout?: 'celled' | 'flat';
831
+ /** OTLP `service.name` for this source. Overrides the options default. */
832
+ serviceName?: string;
833
+ }
834
+ /** Domain hooks. The walker is generic; consumers inject the namespaced
835
+ * attributes that ride along on every run + span for analyst discovery. */
836
+ interface TraceStoreToOtlpOptions {
837
+ /** Default OTLP `service.name` when a source doesn't set its own.
838
+ * Default `agent-eval`. */
839
+ serviceName?: string;
840
+ /** Extra resource attributes per run, e.g.
841
+ * `(run) => ({ 'legal.persona_id': run.tags?.personaId ?? '' })`. */
842
+ resourceAttributes?: (run: Run) => Record<string, unknown>;
843
+ /** Extra attributes on the per-run anchor span, e.g. domain outcome fields. */
844
+ runAttributes?: (run: Run) => Record<string, unknown>;
845
+ }
846
+ /**
847
+ * Read every per-cell shard under each source root and write a flat OTLP-JSONL
848
+ * view of the corpus to `outPath`. Each cell directory is a
849
+ * `FileSystemTraceStore` — NDJSON append-only with size-based rotation;
850
+ * `updateRun`/`updateSpan` append `{ id, ...patch, _update: true }` rows
851
+ * rather than rewriting, so readers must merge those patches in (done here).
852
+ *
853
+ * A `string` source is treated as a celled root.
854
+ */
855
+ declare function convertTraceStoresToOtlp(source: string | TraceStoreSource | readonly TraceStoreSource[], outPath: string, opts?: TraceStoreToOtlpOptions): TracesToOtlpResult;
856
+
857
+ /**
858
+ * Replay-from-raw-events — turn every captured campaign run into a
859
+ * re-runnable artifact.
860
+ *
861
+ * `RawProviderSink` captures every provider HTTP envelope; `runEvalCampaign`
862
+ * makes that capture the default. Together they make every past run a
863
+ * complete fingerprint of what happened on the wire — enough to replay
864
+ * the run without burning new LLM cost.
865
+ *
866
+ * Three use cases this primitive enables:
867
+ *
868
+ * 1. **Post-hoc judging** — apply a new judge / rubric / scoring callback
869
+ * to last week's runs without re-calling any LLM. The cost of trying
870
+ * a new rubric drops from "another full sweep" to a CPU-bound replay.
871
+ * 2. **Determinism audits** — replay the same campaign and verify the
872
+ * raw responses match byte-for-byte. Any drift is a non-determinism
873
+ * bug (in the harness, the prompt builder, the sandbox, …).
874
+ * 3. **Free judge calibration** — run two judges on identical responses
875
+ * and measure inter-judge agreement without doubling LLM spend.
876
+ *
877
+ * The interface is deliberately fetch-shaped. Inject `createReplayFetch`
878
+ * into `LlmClientOptions.fetch` and every `callLlm` transparently reads
879
+ * from the cache instead of calling the network. No new code path through
880
+ * the LLM client is needed; the cache hit is invisible to the runner.
881
+ */
882
+
883
+ declare class ReplayCacheMissError extends ReplayError {
884
+ readonly url: string;
885
+ readonly requestKey: string;
886
+ constructor(url: string, requestKey: string, message?: string);
887
+ }
888
+ interface ReplayCacheEntry {
889
+ request: RawProviderEvent;
890
+ response: RawProviderEvent;
891
+ }
892
+ interface ReplayCacheStats {
893
+ total: number;
894
+ byProvider: Record<string, number>;
895
+ byModel: Record<string, number>;
896
+ /** Spans for which we have a request but no response (run aborted mid-call). */
897
+ orphanRequests: number;
898
+ }
899
+ /**
900
+ * In-memory deterministic cache of (request → response) keyed on a stable
901
+ * hash of the request body. Built from a `RawProviderSink` containing
902
+ * paired `request` and `response` events from a previous run.
903
+ *
904
+ * The cache is the source of truth for replay; `createReplayFetch` is a
905
+ * thin wrapper that reads from it.
906
+ */
907
+ declare class ReplayCache {
908
+ private byKey;
909
+ private orphans;
910
+ private byProvider;
911
+ private byModel;
912
+ /**
913
+ * Build a cache from a sink's events. The sink must implement `list()`.
914
+ * Filter by `runId` / `spanId` to scope to a specific replay.
915
+ */
916
+ static fromSink(sink: RawProviderSink, filter?: {
917
+ runId?: string;
918
+ spanId?: string;
919
+ }): Promise<ReplayCache>;
920
+ /** Build a cache from an in-memory event list. */
921
+ static fromEvents(events: RawProviderEvent[]): Promise<ReplayCache>;
922
+ /** Number of cacheable (request, response) pairs in the cache. */
923
+ size(): number;
924
+ stats(): ReplayCacheStats;
925
+ /** Iterate every cached `(request, response)` pair in insertion order. */
926
+ entries(): IterableIterator<ReplayCacheEntry>;
927
+ /**
928
+ * Look up a cached response by hashing the (model, messages, temperature,
929
+ * maxTokens, response_format) shape. Returns `undefined` on miss; the
930
+ * caller decides whether to throw, fall back to the network, or skip.
931
+ */
932
+ lookup(requestBody: unknown): Promise<ReplayCacheEntry | undefined>;
933
+ }
934
+ interface ReplayFetchOptions {
935
+ /**
936
+ * Behaviour on cache miss. Default `'throw'`. `'fallback'` calls the
937
+ * `fallbackFetch` (typically `globalThis.fetch`) so a partial replay can
938
+ * still complete; `'fail-closed'` returns a synthetic 599 response so the
939
+ * call site sees a non-retriable failure.
940
+ */
941
+ onMiss?: 'throw' | 'fallback' | 'fail-closed';
942
+ fallbackFetch?: typeof fetch;
943
+ /** Optional callback fired once per replayed call (for telemetry / counters). */
944
+ onHit?: (info: {
945
+ url: string;
946
+ provider: string;
947
+ model: string;
948
+ }) => void;
949
+ /** Optional callback fired on cache miss before the `onMiss` policy applies. */
950
+ onMissNotify?: (info: {
951
+ url: string;
952
+ requestBody: unknown;
953
+ }) => void;
954
+ }
955
+ /**
956
+ * Build a `fetch`-shaped function that serves cached responses out of a
957
+ * `ReplayCache` for any URL ending in `/chat/completions`. Pass through
958
+ * `LlmClientOptions.fetch` and `callLlm` becomes free.
959
+ *
960
+ * Non-`/chat/completions` URLs are passed straight to the fallback fetch
961
+ * (default: `globalThis.fetch`). This matters because non-LLM HTTP work
962
+ * (judge HTTP servers, sandbox callbacks) sometimes flows through the same
963
+ * `fetch` and shouldn't be intercepted.
964
+ */
965
+ declare function createReplayFetch(cache: ReplayCache, opts?: ReplayFetchOptions): typeof fetch;
966
+ /**
967
+ * Convenience iterator over `(request, response)` pairs in a sink — for
968
+ * post-hoc scoring that doesn't need a `fetch` shim. The judge or scorer
969
+ * runs purely in-process over cached LLM outputs.
970
+ */
971
+ declare function iterateRawCalls(sink: RawProviderSink, filter?: {
972
+ runId?: string;
973
+ spanId?: string;
974
+ }): AsyncGenerator<ReplayCacheEntry>;
975
+
976
+ export { AnalyzeTracesOptions, AnalyzeTracesResult, type CaptureFetchContext, type CaptureFetchOptions, DatasetOverview, type ExportableSpan, type ExtractedUsage, type FlattenOtlpOptions, LLM_CACHED_TOKENS, LLM_CACHED_TOKEN_ATTR_KEYS, LLM_COST_ATTR_KEYS, LLM_COST_USD, LLM_INPUT_TOKENS, LLM_INPUT_TOKEN_ATTR_KEYS, LLM_MODEL_ATTR_KEYS, LLM_MODEL_NAME, LLM_OUTPUT_TOKENS, LLM_OUTPUT_TOKEN_ATTR_KEYS, OPENINFERENCE_SPAN_KIND, OTEL_AGENT_EVAL_SCOPE, type OtelExportConfig, type OtelExporter, type OtlpExport, OtlpFileTraceStore, type OtlpFileTraceStoreOptions, type OtlpFlatLine, type OtlpResourceSpans, type OtlpSpan, type OtlpToRunRecordsOptions, type OtlpTraceRunRecord, type ProjectedOtlpSpan, ProviderRedactor, QueryTracesPage, RawProviderEvent, RawProviderSink, ReplayCache, type ReplayCacheEntry, ReplayCacheMissError, type ReplayCacheStats, type ReplayFetchOptions, Run, RunCompleteHook, RunCompleteHookContext, SPAN_KIND_ATTR_KEYS, SearchSpanResult, SearchTraceResult, SpanNotFoundError, TOOL_NAME, TOOL_NAME_ATTR_KEYS, TRACE_ANALYST_ACTOR_DESCRIPTION, TRACE_ANALYST_ACTOR_DESCRIPTION_VERSION, TRACE_ANALYST_SUBAGENT_DESCRIPTION, type TraceAggregate, TraceAnalysisStore, TraceAnalystFilters, type TraceAnalystHookOptions, TraceAnalystSpanKind, TraceAnalystSpanStatus, TraceFileMissingError, type TraceInsightContext, type TraceInsightFinding, type TraceInsightPanelRole, type TraceInsightPromptInput, type TraceInsightQualityGate, type TraceInsightQuestion, type TraceInsightReadiness, type TraceInsightSuite, type TraceInsightTask, TraceNotFoundError, TraceStore, type TraceStoreSource, type TraceStoreToOtlpOptions, type TracesToOtlpResult, ViewSpansResult, ViewTraceResult, asNumber, asString, buildTraceAnalystTools, buildTraceInsightContext, buildTraceInsightPrompt, captureFetchToRawSink, convertTraceStoresToOtlp, createOtelExporter, createOtelTracingStore, createReplayFetch, defaultTraceInsightPanel, describeTraceInsightScope, domainEvidencePattern, exportRunAsOtlp, extractOtlpAttributes, extractUsage, extractUsageFromResponse, extractUsageFromSse, firstNumberAttr, firstStringAttr, flattenOtlpExportToNdjson, inferDomainKeywords, inferOtlpKind, iterateRawCalls, otelRunCompleteHook, otlpToRunRecords, otlpToTraceRunRecords, planTraceInsightQuestions, projectOtlpFlatLine, readOtlpStatus, scoreTraceInsightReadiness, stringField, tokenizeDomainWords, traceAnalystFunctionGroup, traceAnalystOnRunComplete, traceSpanKindToOpenInferenceKind };