@tangle-network/agent-eval 0.94.0 → 0.95.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (1056) hide show
  1. package/CHANGELOG.md +15 -0
  2. package/README.md +44 -30
  3. package/dist/action-policy.d.ts +24 -0
  4. package/dist/action-policy.d.ts.map +1 -0
  5. package/dist/action-policy.test.d.ts +2 -0
  6. package/dist/action-policy.test.d.ts.map +1 -0
  7. package/dist/active-learning.d.ts +41 -0
  8. package/dist/active-learning.d.ts.map +1 -0
  9. package/dist/adapters/http.d.ts +15 -21
  10. package/dist/adapters/http.d.ts.map +1 -0
  11. package/dist/adapters/http.js.map +1 -1
  12. package/dist/adapters/langchain.d.ts +7 -13
  13. package/dist/adapters/langchain.d.ts.map +1 -0
  14. package/dist/adapters/otel.d.ts +13 -24
  15. package/dist/adapters/otel.d.ts.map +1 -0
  16. package/dist/agent-profile-cell.d.ts +101 -0
  17. package/dist/agent-profile-cell.d.ts.map +1 -0
  18. package/dist/agent-profile.d.ts +27 -0
  19. package/dist/agent-profile.d.ts.map +1 -0
  20. package/dist/agent-profile.test.d.ts +2 -0
  21. package/dist/agent-profile.test.d.ts.map +1 -0
  22. package/dist/analyst/adapters.d.ts +62 -0
  23. package/dist/analyst/adapters.d.ts.map +1 -0
  24. package/dist/analyst/analyst.test.d.ts +2 -0
  25. package/dist/analyst/analyst.test.d.ts.map +1 -0
  26. package/dist/analyst/ax-service.d.ts +27 -0
  27. package/dist/analyst/ax-service.d.ts.map +1 -0
  28. package/dist/analyst/behavioral-analyst.d.ts +28 -0
  29. package/dist/analyst/behavioral-analyst.d.ts.map +1 -0
  30. package/dist/analyst/chat-client.d.ts +91 -0
  31. package/dist/analyst/chat-client.d.ts.map +1 -0
  32. package/dist/analyst/default-registry.d.ts +27 -0
  33. package/dist/analyst/default-registry.d.ts.map +1 -0
  34. package/dist/analyst/default-registry.test.d.ts +2 -0
  35. package/dist/analyst/default-registry.test.d.ts.map +1 -0
  36. package/dist/analyst/finding-signature.d.ts +48 -0
  37. package/dist/analyst/finding-signature.d.ts.map +1 -0
  38. package/dist/analyst/finding-subject.d.ts +146 -0
  39. package/dist/analyst/finding-subject.d.ts.map +1 -0
  40. package/dist/analyst/finding-subject.test.d.ts +2 -0
  41. package/dist/analyst/finding-subject.test.d.ts.map +1 -0
  42. package/dist/analyst/findings-store.d.ts +75 -0
  43. package/dist/analyst/findings-store.d.ts.map +1 -0
  44. package/dist/analyst/index.d.ts +28 -256
  45. package/dist/analyst/index.d.ts.map +1 -0
  46. package/dist/analyst/index.js +5 -65
  47. package/dist/analyst/index.js.map +1 -1
  48. package/dist/{kind-factory-0BhLSI27.d.ts → analyst/kind-factory.d.ts} +11 -63
  49. package/dist/analyst/kind-factory.d.ts.map +1 -0
  50. package/dist/analyst/kinds/failure-mode.d.ts +19 -0
  51. package/dist/analyst/kinds/failure-mode.d.ts.map +1 -0
  52. package/dist/analyst/kinds/improvement.d.ts +23 -0
  53. package/dist/analyst/kinds/improvement.d.ts.map +1 -0
  54. package/dist/analyst/kinds/index.d.ts +22 -0
  55. package/dist/analyst/kinds/index.d.ts.map +1 -0
  56. package/dist/analyst/kinds/kinds.test.d.ts +2 -0
  57. package/dist/analyst/kinds/kinds.test.d.ts.map +1 -0
  58. package/dist/analyst/kinds/knowledge-gap.d.ts +28 -0
  59. package/dist/analyst/kinds/knowledge-gap.d.ts.map +1 -0
  60. package/dist/analyst/kinds/knowledge-poisoning.d.ts +22 -0
  61. package/dist/analyst/kinds/knowledge-poisoning.d.ts.map +1 -0
  62. package/dist/analyst/kinds/skill-usage.d.ts +84 -0
  63. package/dist/analyst/kinds/skill-usage.d.ts.map +1 -0
  64. package/dist/analyst/kinds/skill-usage.test.d.ts +2 -0
  65. package/dist/analyst/kinds/skill-usage.test.d.ts.map +1 -0
  66. package/dist/analyst/parse-tolerant.d.ts +26 -0
  67. package/dist/analyst/parse-tolerant.d.ts.map +1 -0
  68. package/dist/analyst/parse-tolerant.test.d.ts +2 -0
  69. package/dist/analyst/parse-tolerant.test.d.ts.map +1 -0
  70. package/dist/analyst/registry.budget.test.d.ts +2 -0
  71. package/dist/analyst/registry.budget.test.d.ts.map +1 -0
  72. package/dist/{default-registry-6dhErQbs.d.ts → analyst/registry.d.ts} +8 -37
  73. package/dist/analyst/registry.d.ts.map +1 -0
  74. package/dist/analyst/steer-firewall.d.ts +35 -0
  75. package/dist/analyst/steer-firewall.d.ts.map +1 -0
  76. package/dist/analyst/steer-firewall.test.d.ts +2 -0
  77. package/dist/analyst/steer-firewall.test.d.ts.map +1 -0
  78. package/dist/analyst/structure-findings.d.ts +37 -0
  79. package/dist/analyst/structure-findings.d.ts.map +1 -0
  80. package/dist/analyst/structure-findings.test.d.ts +2 -0
  81. package/dist/analyst/structure-findings.test.d.ts.map +1 -0
  82. package/dist/analyst/tool-groups.d.ts +34 -0
  83. package/dist/analyst/tool-groups.d.ts.map +1 -0
  84. package/dist/{types-Ce17tDlG.d.ts → analyst/types.d.ts} +19 -112
  85. package/dist/analyst/types.d.ts.map +1 -0
  86. package/dist/anti-slop.d.ts +59 -0
  87. package/dist/anti-slop.d.ts.map +1 -0
  88. package/dist/artifact-validator.d.ts +74 -0
  89. package/dist/artifact-validator.d.ts.map +1 -0
  90. package/dist/attestation.d.ts +63 -0
  91. package/dist/attestation.d.ts.map +1 -0
  92. package/dist/attestation.test.d.ts +2 -0
  93. package/dist/attestation.test.d.ts.map +1 -0
  94. package/dist/authenticity/index.d.ts +15 -16
  95. package/dist/authenticity/index.d.ts.map +1 -0
  96. package/dist/authenticity/index.test.d.ts +2 -0
  97. package/dist/authenticity/index.test.d.ts.map +1 -0
  98. package/dist/auto-pr.d.ts +120 -0
  99. package/dist/auto-pr.d.ts.map +1 -0
  100. package/dist/{baseline-Bbid3WoO.d.ts → baseline.d.ts} +8 -44
  101. package/dist/baseline.d.ts.map +1 -0
  102. package/dist/behavior-dsl.d.ts +73 -0
  103. package/dist/behavior-dsl.d.ts.map +1 -0
  104. package/dist/belief-state/calibration.d.ts +10 -0
  105. package/dist/belief-state/calibration.d.ts.map +1 -0
  106. package/dist/belief-state/calibration.test.d.ts +2 -0
  107. package/dist/belief-state/calibration.test.d.ts.map +1 -0
  108. package/dist/belief-state/code-agent-corpus.d.ts +66 -0
  109. package/dist/belief-state/code-agent-corpus.d.ts.map +1 -0
  110. package/dist/belief-state/code-agent-corpus.test.d.ts +2 -0
  111. package/dist/belief-state/code-agent-corpus.test.d.ts.map +1 -0
  112. package/dist/belief-state/code-agent-evidence.d.ts +22 -0
  113. package/dist/belief-state/code-agent-evidence.d.ts.map +1 -0
  114. package/dist/belief-state/code-agent-evidence.test.d.ts +2 -0
  115. package/dist/belief-state/code-agent-evidence.test.d.ts.map +1 -0
  116. package/dist/belief-state/extract.d.ts +7 -0
  117. package/dist/belief-state/extract.d.ts.map +1 -0
  118. package/dist/belief-state/extract.test.d.ts +2 -0
  119. package/dist/belief-state/extract.test.d.ts.map +1 -0
  120. package/dist/belief-state/index.d.ts +14 -604
  121. package/dist/belief-state/index.d.ts.map +1 -0
  122. package/dist/belief-state/ope.d.ts +17 -0
  123. package/dist/belief-state/ope.d.ts.map +1 -0
  124. package/dist/belief-state/ope.test.d.ts +2 -0
  125. package/dist/belief-state/ope.test.d.ts.map +1 -0
  126. package/dist/belief-state/phase0-measurement.d.ts +55 -0
  127. package/dist/belief-state/phase0-measurement.d.ts.map +1 -0
  128. package/dist/belief-state/report.d.ts +17 -0
  129. package/dist/belief-state/report.d.ts.map +1 -0
  130. package/dist/belief-state/report.test.d.ts +2 -0
  131. package/dist/belief-state/report.test.d.ts.map +1 -0
  132. package/dist/belief-state/research-evidence.d.ts +23 -0
  133. package/dist/belief-state/research-evidence.d.ts.map +1 -0
  134. package/dist/belief-state/research-evidence.test.d.ts +2 -0
  135. package/dist/belief-state/research-evidence.test.d.ts.map +1 -0
  136. package/dist/belief-state/runtime-benchmark-corpus.d.ts +32 -0
  137. package/dist/belief-state/runtime-benchmark-corpus.d.ts.map +1 -0
  138. package/dist/belief-state/runtime-hooks.d.ts +87 -0
  139. package/dist/belief-state/runtime-hooks.d.ts.map +1 -0
  140. package/dist/belief-state/runtime-hooks.test.d.ts +2 -0
  141. package/dist/belief-state/runtime-hooks.test.d.ts.map +1 -0
  142. package/dist/belief-state/selective.d.ts +15 -0
  143. package/dist/belief-state/selective.d.ts.map +1 -0
  144. package/dist/belief-state/selective.test.d.ts +2 -0
  145. package/dist/belief-state/selective.test.d.ts.map +1 -0
  146. package/dist/belief-state/shadow-probe.d.ts +80 -0
  147. package/dist/belief-state/shadow-probe.d.ts.map +1 -0
  148. package/dist/belief-state/shadow-probe.test.d.ts +2 -0
  149. package/dist/belief-state/shadow-probe.test.d.ts.map +1 -0
  150. package/dist/belief-state/types.d.ts +195 -0
  151. package/dist/belief-state/types.d.ts.map +1 -0
  152. package/dist/belief-state/types.test.d.ts +2 -0
  153. package/dist/belief-state/types.test.d.ts.map +1 -0
  154. package/dist/benchmark.d.ts +14 -0
  155. package/dist/benchmark.d.ts.map +1 -0
  156. package/dist/benchmarks/index.d.ts +23 -4
  157. package/dist/benchmarks/index.d.ts.map +1 -0
  158. package/dist/benchmarks/routing/dataset.d.ts +34 -0
  159. package/dist/benchmarks/routing/dataset.d.ts.map +1 -0
  160. package/dist/benchmarks/routing/index.d.ts +34 -0
  161. package/dist/benchmarks/routing/index.d.ts.map +1 -0
  162. package/dist/benchmarks/types.d.ts +49 -0
  163. package/dist/benchmarks/types.d.ts.map +1 -0
  164. package/dist/bisector.d.ts +81 -0
  165. package/dist/bisector.d.ts.map +1 -0
  166. package/dist/budget-guard.d.ts +31 -0
  167. package/dist/budget-guard.d.ts.map +1 -0
  168. package/dist/builder-eval/builder-session.d.ts +111 -0
  169. package/dist/builder-eval/builder-session.d.ts.map +1 -0
  170. package/dist/builder-eval/correlation.d.ts +32 -0
  171. package/dist/builder-eval/correlation.d.ts.map +1 -0
  172. package/dist/builder-eval/index.d.ts +5 -250
  173. package/dist/builder-eval/index.d.ts.map +1 -0
  174. package/dist/builder-eval/project-registry.d.ts +51 -0
  175. package/dist/builder-eval/project-registry.d.ts.map +1 -0
  176. package/dist/builder-eval/three-layer-eval.d.ts +55 -0
  177. package/dist/builder-eval/three-layer-eval.d.ts.map +1 -0
  178. package/dist/campaign/analyst-surface.d.ts +108 -0
  179. package/dist/campaign/analyst-surface.d.ts.map +1 -0
  180. package/dist/campaign/analyst-surface.test.d.ts +2 -0
  181. package/dist/campaign/analyst-surface.test.d.ts.map +1 -0
  182. package/dist/campaign/auto-pr.d.ts +46 -0
  183. package/dist/campaign/auto-pr.d.ts.map +1 -0
  184. package/dist/campaign/distillation/agreement-judge.d.ts +69 -0
  185. package/dist/campaign/distillation/agreement-judge.d.ts.map +1 -0
  186. package/dist/campaign/distillation/cli.d.ts +35 -0
  187. package/dist/campaign/distillation/cli.d.ts.map +1 -0
  188. package/dist/campaign/distillation/distillation.test.d.ts +2 -0
  189. package/dist/campaign/distillation/distillation.test.d.ts.map +1 -0
  190. package/dist/campaign/distillation/gold-scenarios.d.ts +54 -0
  191. package/dist/campaign/distillation/gold-scenarios.d.ts.map +1 -0
  192. package/dist/campaign/distillation/run-distillation.d.ts +119 -0
  193. package/dist/campaign/distillation/run-distillation.d.ts.map +1 -0
  194. package/dist/campaign/gates/compose.d.ts +12 -0
  195. package/dist/campaign/gates/compose.d.ts.map +1 -0
  196. package/dist/campaign/gates/default-production-gate.d.ts +58 -0
  197. package/dist/campaign/gates/default-production-gate.d.ts.map +1 -0
  198. package/dist/campaign/gates/heldout-gate.d.ts +12 -0
  199. package/dist/campaign/gates/heldout-gate.d.ts.map +1 -0
  200. package/dist/campaign/gates/promotion-policy.d.ts +125 -0
  201. package/dist/campaign/gates/promotion-policy.d.ts.map +1 -0
  202. package/dist/campaign/gates/promotion-policy.test.d.ts +2 -0
  203. package/dist/campaign/gates/promotion-policy.test.d.ts.map +1 -0
  204. package/dist/campaign/gates/sequential.d.ts +146 -0
  205. package/dist/campaign/gates/sequential.d.ts.map +1 -0
  206. package/dist/campaign/gates/sequential.test.d.ts +2 -0
  207. package/dist/campaign/gates/sequential.test.d.ts.map +1 -0
  208. package/dist/campaign/gates/statistical-heldout.d.ts +99 -0
  209. package/dist/campaign/gates/statistical-heldout.d.ts.map +1 -0
  210. package/dist/campaign/gates/statistical-heldout.test.d.ts +2 -0
  211. package/dist/campaign/gates/statistical-heldout.test.d.ts.map +1 -0
  212. package/dist/campaign/index.d.ts +38 -1341
  213. package/dist/campaign/index.d.ts.map +1 -0
  214. package/dist/campaign/index.js +1863 -1316
  215. package/dist/campaign/index.js.map +1 -1
  216. package/dist/campaign/labeled-store/fs-adapter.d.ts +59 -0
  217. package/dist/campaign/labeled-store/fs-adapter.d.ts.map +1 -0
  218. package/dist/campaign/presets/compare-proposers.d.ts +146 -0
  219. package/dist/campaign/presets/compare-proposers.d.ts.map +1 -0
  220. package/dist/campaign/presets/playback.d.ts +120 -0
  221. package/dist/campaign/presets/playback.d.ts.map +1 -0
  222. package/dist/campaign/presets/playback.test.d.ts +2 -0
  223. package/dist/campaign/presets/playback.test.d.ts.map +1 -0
  224. package/dist/campaign/presets/run-eval.d.ts +14 -0
  225. package/dist/campaign/presets/run-eval.d.ts.map +1 -0
  226. package/dist/campaign/presets/run-improvement-loop.d.ts +63 -0
  227. package/dist/campaign/presets/run-improvement-loop.d.ts.map +1 -0
  228. package/dist/campaign/presets/run-improvement-loop.test.d.ts +2 -0
  229. package/dist/campaign/presets/run-improvement-loop.test.d.ts.map +1 -0
  230. package/dist/campaign/presets/run-optimization.d.ts +92 -0
  231. package/dist/campaign/presets/run-optimization.d.ts.map +1 -0
  232. package/dist/campaign/presets/run-profile-matrix.d.ts +151 -0
  233. package/dist/campaign/presets/run-profile-matrix.d.ts.map +1 -0
  234. package/dist/campaign/presets/run-skill-opt.d.ts +96 -0
  235. package/dist/campaign/presets/run-skill-opt.d.ts.map +1 -0
  236. package/dist/campaign/proposers/_findings-text.d.ts +22 -0
  237. package/dist/campaign/proposers/_findings-text.d.ts.map +1 -0
  238. package/dist/campaign/proposers/ace.d.ts +33 -0
  239. package/dist/campaign/proposers/ace.d.ts.map +1 -0
  240. package/dist/campaign/proposers/ace.test.d.ts +2 -0
  241. package/dist/campaign/proposers/ace.test.d.ts.map +1 -0
  242. package/dist/campaign/proposers/analysis-edit.d.ts +32 -0
  243. package/dist/campaign/proposers/analysis-edit.d.ts.map +1 -0
  244. package/dist/campaign/proposers/evolutionary.d.ts +20 -0
  245. package/dist/campaign/proposers/evolutionary.d.ts.map +1 -0
  246. package/dist/campaign/proposers/fapo.d.ts +120 -0
  247. package/dist/campaign/proposers/fapo.d.ts.map +1 -0
  248. package/dist/campaign/proposers/gepa.d.ts +86 -0
  249. package/dist/campaign/proposers/gepa.d.ts.map +1 -0
  250. package/dist/campaign/proposers/halo.d.ts +44 -0
  251. package/dist/campaign/proposers/halo.d.ts.map +1 -0
  252. package/dist/campaign/proposers/halo.test.d.ts +2 -0
  253. package/dist/campaign/proposers/halo.test.d.ts.map +1 -0
  254. package/dist/campaign/proposers/memory.d.ts +47 -0
  255. package/dist/campaign/proposers/memory.d.ts.map +1 -0
  256. package/dist/campaign/proposers/memory.test.d.ts +2 -0
  257. package/dist/campaign/proposers/memory.test.d.ts.map +1 -0
  258. package/dist/campaign/proposers/skill-opt.d.ts +88 -0
  259. package/dist/campaign/proposers/skill-opt.d.ts.map +1 -0
  260. package/dist/campaign/proposers/trace-analyst.d.ts +48 -0
  261. package/dist/campaign/proposers/trace-analyst.d.ts.map +1 -0
  262. package/dist/campaign/proposers/trace-analyst.test.d.ts +2 -0
  263. package/dist/campaign/proposers/trace-analyst.test.d.ts.map +1 -0
  264. package/dist/campaign/provenance.d.ts +185 -0
  265. package/dist/campaign/provenance.d.ts.map +1 -0
  266. package/dist/campaign/run-campaign.d.ts +90 -0
  267. package/dist/campaign/run-campaign.d.ts.map +1 -0
  268. package/dist/campaign/score-utils.d.ts +26 -0
  269. package/dist/campaign/score-utils.d.ts.map +1 -0
  270. package/dist/campaign/skill-patch.d.ts +62 -0
  271. package/dist/campaign/skill-patch.d.ts.map +1 -0
  272. package/dist/campaign/storage.d.ts +38 -0
  273. package/dist/campaign/storage.d.ts.map +1 -0
  274. package/dist/{types-BU-7W85F.d.ts → campaign/types.d.ts} +98 -99
  275. package/dist/campaign/types.d.ts.map +1 -0
  276. package/dist/campaign/worktree/index.d.ts +53 -0
  277. package/dist/campaign/worktree/index.d.ts.map +1 -0
  278. package/dist/canary.d.ts +101 -0
  279. package/dist/canary.d.ts.map +1 -0
  280. package/dist/causal-attribution.d.ts +45 -0
  281. package/dist/causal-attribution.d.ts.map +1 -0
  282. package/dist/{chunk-2K6UUZ7P.js → chunk-2T4EZACH.js} +1 -1
  283. package/dist/chunk-2T4EZACH.js.map +1 -0
  284. package/dist/{chunk-CTBHKLEU.js → chunk-77T4STFI.js} +59 -86
  285. package/dist/chunk-77T4STFI.js.map +1 -0
  286. package/dist/{chunk-EGPMSBEZ.js → chunk-7QTQKIDD.js} +178 -177
  287. package/dist/chunk-7QTQKIDD.js.map +1 -0
  288. package/dist/{chunk-MIFZUPEK.js → chunk-AQ5WQAIV.js} +21 -6
  289. package/dist/chunk-AQ5WQAIV.js.map +1 -0
  290. package/dist/chunk-DJWX3GVS.js +81 -0
  291. package/dist/chunk-DJWX3GVS.js.map +1 -0
  292. package/dist/{chunk-S6OZEZQK.js → chunk-HMA63UEO.js} +37 -9
  293. package/dist/{chunk-S6OZEZQK.js.map → chunk-HMA63UEO.js.map} +1 -1
  294. package/dist/{chunk-TBDR6PAI.js → chunk-IZCEK2HR.js} +2 -2
  295. package/dist/{chunk-SD2YFWQQ.js → chunk-KKWJD5E6.js} +20 -20
  296. package/dist/chunk-KKWJD5E6.js.map +1 -0
  297. package/dist/{chunk-KWRRMR3J.js → chunk-LO6IOIJ2.js} +10 -10
  298. package/dist/chunk-LO6IOIJ2.js.map +1 -0
  299. package/dist/{chunk-E4GH6USR.js → chunk-NZEQVRH5.js} +2 -2
  300. package/dist/chunk-NZEQVRH5.js.map +1 -0
  301. package/dist/{chunk-MPQWFX6Y.js → chunk-PSWWQXHF.js} +13 -88
  302. package/dist/chunk-PSWWQXHF.js.map +1 -0
  303. package/dist/{chunk-Q5LIB7BC.js → chunk-S4SYLDFX.js} +2 -2
  304. package/dist/chunk-S4SYLDFX.js.map +1 -0
  305. package/dist/{chunk-KW53MSA5.js → chunk-X74V6ESX.js} +2 -2
  306. package/dist/{chunk-QMUEXQJS.js → chunk-YBIGNSCZ.js} +81 -4
  307. package/dist/chunk-YBIGNSCZ.js.map +1 -0
  308. package/dist/{chunk-2KNZHH3P.js → chunk-Z6L6YSU6.js} +2 -2
  309. package/dist/ci-gate.d.ts +44 -0
  310. package/dist/ci-gate.d.ts.map +1 -0
  311. package/dist/cli.d.ts +2 -0
  312. package/dist/cli.d.ts.map +1 -0
  313. package/dist/client.d.ts +77 -0
  314. package/dist/client.d.ts.map +1 -0
  315. package/dist/client.test.d.ts +2 -0
  316. package/dist/client.test.d.ts.map +1 -0
  317. package/dist/command-runner.d.ts +74 -0
  318. package/dist/command-runner.d.ts.map +1 -0
  319. package/dist/command-runner.test.d.ts +2 -0
  320. package/dist/command-runner.test.d.ts.map +1 -0
  321. package/dist/completion-verifier.d.ts +147 -0
  322. package/dist/completion-verifier.d.ts.map +1 -0
  323. package/dist/completion-verifier.test.d.ts +9 -0
  324. package/dist/completion-verifier.test.d.ts.map +1 -0
  325. package/dist/concurrency.d.ts +23 -0
  326. package/dist/concurrency.d.ts.map +1 -0
  327. package/dist/contamination-guard.d.ts +81 -0
  328. package/dist/contamination-guard.d.ts.map +1 -0
  329. package/dist/{analyze-runs-B6Ljo_dI.d.ts → contract/analyze-runs.d.ts} +9 -10
  330. package/dist/contract/analyze-runs.d.ts.map +1 -0
  331. package/dist/contract/define-agent-eval.d.ts +52 -0
  332. package/dist/contract/define-agent-eval.d.ts.map +1 -0
  333. package/dist/contract/diff.d.ts +114 -0
  334. package/dist/contract/diff.d.ts.map +1 -0
  335. package/dist/contract/index.d.ts +106 -640
  336. package/dist/contract/index.d.ts.map +1 -0
  337. package/dist/contract/index.js +127 -17
  338. package/dist/contract/index.js.map +1 -1
  339. package/dist/{insight-report-DWl3z9tl.d.ts → contract/insight-report.d.ts} +16 -19
  340. package/dist/contract/insight-report.d.ts.map +1 -0
  341. package/dist/contract/insight-types-fwd.d.ts +7 -0
  342. package/dist/contract/insight-types-fwd.d.ts.map +1 -0
  343. package/dist/contract/intake/agent-trace.d.ts +97 -0
  344. package/dist/contract/intake/agent-trace.d.ts.map +1 -0
  345. package/dist/{code-agent-session-BO8nCnv3.d.ts → contract/intake/code-agent-session.d.ts} +15 -17
  346. package/dist/contract/intake/code-agent-session.d.ts.map +1 -0
  347. package/dist/contract/intake/feedback-table.d.ts +87 -0
  348. package/dist/contract/intake/feedback-table.d.ts.map +1 -0
  349. package/dist/contract/intake/index.d.ts +22 -0
  350. package/dist/contract/intake/index.d.ts.map +1 -0
  351. package/dist/contract/intake/otel-spans.d.ts +33 -0
  352. package/dist/contract/intake/otel-spans.d.ts.map +1 -0
  353. package/dist/contract/self-improve.d.ts +284 -0
  354. package/dist/contract/self-improve.d.ts.map +1 -0
  355. package/dist/{control-runtime-Acf9CGhw.d.ts → control-runtime.d.ts} +23 -26
  356. package/dist/control-runtime.d.ts.map +1 -0
  357. package/dist/control-runtime.test.d.ts +2 -0
  358. package/dist/control-runtime.test.d.ts.map +1 -0
  359. package/dist/control.d.ts +11 -9
  360. package/dist/control.d.ts.map +1 -0
  361. package/dist/control.js +2 -2
  362. package/dist/convergence.d.ts +29 -0
  363. package/dist/convergence.d.ts.map +1 -0
  364. package/dist/{cost-ledger-DuSqlw5B.d.ts → cost-ledger.d.ts} +10 -11
  365. package/dist/cost-ledger.d.ts.map +1 -0
  366. package/dist/cost-ledger.test.d.ts +2 -0
  367. package/dist/cost-ledger.test.d.ts.map +1 -0
  368. package/dist/cost-report.d.ts +43 -0
  369. package/dist/cost-report.d.ts.map +1 -0
  370. package/dist/cost-report.test.d.ts +2 -0
  371. package/dist/cost-report.test.d.ts.map +1 -0
  372. package/dist/cost-tracker.d.ts +76 -0
  373. package/dist/cost-tracker.d.ts.map +1 -0
  374. package/dist/{counterfactual-DlOz8PBx.d.ts → counterfactual.d.ts} +12 -13
  375. package/dist/counterfactual.d.ts.map +1 -0
  376. package/dist/cross-trace-diff.d.ts +56 -0
  377. package/dist/cross-trace-diff.d.ts.map +1 -0
  378. package/dist/{dataset-BbGkaN2I.d.ts → dataset.d.ts} +11 -14
  379. package/dist/dataset.d.ts.map +1 -0
  380. package/dist/deploy-gate-layer.d.ts +125 -0
  381. package/dist/deploy-gate-layer.d.ts.map +1 -0
  382. package/dist/deploy-gate-layer.test.d.ts +2 -0
  383. package/dist/deploy-gate-layer.test.d.ts.map +1 -0
  384. package/dist/description-length-gate.d.ts +119 -0
  385. package/dist/description-length-gate.d.ts.map +1 -0
  386. package/dist/detectors/edge.test.d.ts +2 -0
  387. package/dist/detectors/edge.test.d.ts.map +1 -0
  388. package/dist/detectors/index.d.ts +81 -0
  389. package/dist/detectors/index.d.ts.map +1 -0
  390. package/dist/detectors/index.test.d.ts +2 -0
  391. package/dist/detectors/index.test.d.ts.map +1 -0
  392. package/dist/diagnose/causal-sweep.d.ts +100 -0
  393. package/dist/diagnose/causal-sweep.d.ts.map +1 -0
  394. package/dist/diagnose/index.d.ts +36 -0
  395. package/dist/diagnose/index.d.ts.map +1 -0
  396. package/dist/diagnose/remediation.d.ts +68 -0
  397. package/dist/diagnose/remediation.d.ts.map +1 -0
  398. package/dist/diagnose/repair.d.ts +77 -0
  399. package/dist/diagnose/repair.d.ts.map +1 -0
  400. package/dist/diagnose.d.ts +1 -251
  401. package/dist/diagnose.js +1 -1
  402. package/dist/discover-personas.d.ts +35 -0
  403. package/dist/discover-personas.d.ts.map +1 -0
  404. package/dist/driver.d.ts +95 -0
  405. package/dist/driver.d.ts.map +1 -0
  406. package/dist/driver.test.d.ts +8 -0
  407. package/dist/driver.test.d.ts.map +1 -0
  408. package/dist/dual-agent-bench.d.ts +81 -0
  409. package/dist/dual-agent-bench.d.ts.map +1 -0
  410. package/dist/error-count-extractor.d.ts +47 -0
  411. package/dist/error-count-extractor.d.ts.map +1 -0
  412. package/dist/error-count-extractor.test.d.ts +2 -0
  413. package/dist/error-count-extractor.test.d.ts.map +1 -0
  414. package/dist/{errors-CzMUYo7b.d.ts → errors.d.ts} +10 -11
  415. package/dist/errors.d.ts.map +1 -0
  416. package/dist/{researcher-B0C2_fVO.d.ts → eval-campaign.d.ts} +34 -156
  417. package/dist/eval-campaign.d.ts.map +1 -0
  418. package/dist/eval-campaign.test.d.ts +2 -0
  419. package/dist/eval-campaign.test.d.ts.map +1 -0
  420. package/dist/eval-tools.d.ts +55 -0
  421. package/dist/eval-tools.d.ts.map +1 -0
  422. package/dist/eval-trace-store.d.ts +107 -0
  423. package/dist/eval-trace-store.d.ts.map +1 -0
  424. package/dist/eval-trace-store.test.d.ts +2 -0
  425. package/dist/eval-trace-store.test.d.ts.map +1 -0
  426. package/dist/executor.d.ts +38 -0
  427. package/dist/executor.d.ts.map +1 -0
  428. package/dist/executor.test.d.ts +10 -0
  429. package/dist/executor.test.d.ts.map +1 -0
  430. package/dist/experiment-tracker.d.ts +178 -0
  431. package/dist/experiment-tracker.d.ts.map +1 -0
  432. package/dist/experiment-tracker.test.d.ts +2 -0
  433. package/dist/experiment-tracker.test.d.ts.map +1 -0
  434. package/dist/failure-taxonomy.d.ts +38 -0
  435. package/dist/failure-taxonomy.d.ts.map +1 -0
  436. package/dist/{feedback-trajectory-BxY0cKfs.d.ts → feedback-trajectory.d.ts} +36 -38
  437. package/dist/feedback-trajectory.d.ts.map +1 -0
  438. package/dist/feedback-trajectory.test.d.ts +2 -0
  439. package/dist/feedback-trajectory.test.d.ts.map +1 -0
  440. package/dist/flow-layer.d.ts +90 -0
  441. package/dist/flow-layer.d.ts.map +1 -0
  442. package/dist/flow-layer.test.d.ts +2 -0
  443. package/dist/flow-layer.test.d.ts.map +1 -0
  444. package/dist/fuzz/capsule.d.ts +46 -0
  445. package/dist/fuzz/capsule.d.ts.map +1 -0
  446. package/dist/fuzz/cube.d.ts +36 -0
  447. package/dist/fuzz/cube.d.ts.map +1 -0
  448. package/dist/fuzz/explorer-cost.test.d.ts +2 -0
  449. package/dist/fuzz/explorer-cost.test.d.ts.map +1 -0
  450. package/dist/fuzz/explorer.d.ts +64 -0
  451. package/dist/fuzz/explorer.d.ts.map +1 -0
  452. package/dist/fuzz/fuzz-agent.d.ts +16 -0
  453. package/dist/fuzz/fuzz-agent.d.ts.map +1 -0
  454. package/dist/fuzz/fuzz-agent.test.d.ts +2 -0
  455. package/dist/fuzz/fuzz-agent.test.d.ts.map +1 -0
  456. package/dist/fuzz/gates.d.ts +33 -0
  457. package/dist/fuzz/gates.d.ts.map +1 -0
  458. package/dist/fuzz/index.d.ts +26 -0
  459. package/dist/fuzz/index.d.ts.map +1 -0
  460. package/dist/fuzz/policies.d.ts +28 -0
  461. package/dist/fuzz/policies.d.ts.map +1 -0
  462. package/dist/fuzz/tools.d.ts +20 -0
  463. package/dist/fuzz/tools.d.ts.map +1 -0
  464. package/dist/fuzz/types.d.ts +307 -0
  465. package/dist/fuzz/types.d.ts.map +1 -0
  466. package/dist/fuzz.d.ts +1 -547
  467. package/dist/golden-matcher.d.ts +71 -0
  468. package/dist/golden-matcher.d.ts.map +1 -0
  469. package/dist/governance/eu-ai-act.d.ts +37 -0
  470. package/dist/governance/eu-ai-act.d.ts.map +1 -0
  471. package/dist/governance/index.d.ts +5 -135
  472. package/dist/governance/index.d.ts.map +1 -0
  473. package/dist/governance/nist-ai-rmf.d.ts +15 -0
  474. package/dist/governance/nist-ai-rmf.d.ts.map +1 -0
  475. package/dist/governance/soc2.d.ts +12 -0
  476. package/dist/governance/soc2.d.ts.map +1 -0
  477. package/dist/governance/types.d.ts +66 -0
  478. package/dist/governance/types.d.ts.map +1 -0
  479. package/dist/harness-optimizer.d.ts +82 -0
  480. package/dist/harness-optimizer.d.ts.map +1 -0
  481. package/dist/held-out-gate.d.ts +135 -0
  482. package/dist/held-out-gate.d.ts.map +1 -0
  483. package/dist/hosted/client.d.ts +73 -0
  484. package/dist/hosted/client.d.ts.map +1 -0
  485. package/dist/hosted/from-env.test.d.ts +8 -0
  486. package/dist/hosted/from-env.test.d.ts.map +1 -0
  487. package/dist/hosted/index.d.ts +10 -238
  488. package/dist/hosted/index.d.ts.map +1 -0
  489. package/dist/hosted/types.d.ts +159 -0
  490. package/dist/hosted/types.d.ts.map +1 -0
  491. package/dist/index.d.ts +277 -5665
  492. package/dist/index.d.ts.map +1 -0
  493. package/dist/index.js +66 -31
  494. package/dist/index.js.map +1 -1
  495. package/dist/integrity/backend-integrity.d.ts +71 -0
  496. package/dist/integrity/backend-integrity.d.ts.map +1 -0
  497. package/dist/integrity/preflight.d.ts +72 -0
  498. package/dist/integrity/preflight.d.ts.map +1 -0
  499. package/dist/integrity/preflight.test.d.ts +2 -0
  500. package/dist/integrity/preflight.test.d.ts.map +1 -0
  501. package/dist/integrity/single-backend.d.ts +67 -0
  502. package/dist/integrity/single-backend.d.ts.map +1 -0
  503. package/dist/intent-match-judge.d.ts +69 -0
  504. package/dist/intent-match-judge.d.ts.map +1 -0
  505. package/dist/intent-match-judge.test.d.ts +2 -0
  506. package/dist/intent-match-judge.test.d.ts.map +1 -0
  507. package/dist/{judge-calibration-0p2QcWNE.d.ts → judge-calibration.d.ts} +16 -17
  508. package/dist/judge-calibration.d.ts.map +1 -0
  509. package/dist/judge-ensemble.d.ts +66 -0
  510. package/dist/judge-ensemble.d.ts.map +1 -0
  511. package/dist/judge-ensemble.test.d.ts +8 -0
  512. package/dist/judge-ensemble.test.d.ts.map +1 -0
  513. package/dist/judge-families.d.ts +38 -0
  514. package/dist/judge-families.d.ts.map +1 -0
  515. package/dist/judge-panel.d.ts +65 -0
  516. package/dist/judge-panel.d.ts.map +1 -0
  517. package/dist/judge-retry.d.ts +70 -0
  518. package/dist/judge-retry.d.ts.map +1 -0
  519. package/dist/judge-runner.d.ts +36 -0
  520. package/dist/judge-runner.d.ts.map +1 -0
  521. package/dist/judge-runner.test.d.ts +2 -0
  522. package/dist/judge-runner.test.d.ts.map +1 -0
  523. package/dist/judges.d.ts +74 -0
  524. package/dist/judges.d.ts.map +1 -0
  525. package/dist/keyword-coverage-judge.d.ts +89 -0
  526. package/dist/keyword-coverage-judge.d.ts.map +1 -0
  527. package/dist/keyword-coverage-judge.test.d.ts +2 -0
  528. package/dist/keyword-coverage-judge.test.d.ts.map +1 -0
  529. package/dist/knowledge/index.d.ts +3 -103
  530. package/dist/knowledge/index.d.ts.map +1 -0
  531. package/dist/knowledge/readiness.d.ts +26 -0
  532. package/dist/knowledge/readiness.d.ts.map +1 -0
  533. package/dist/knowledge/types.d.ts +75 -0
  534. package/dist/knowledge/types.d.ts.map +1 -0
  535. package/dist/live-proof.d.ts +62 -0
  536. package/dist/live-proof.d.ts.map +1 -0
  537. package/dist/{llm-client-Bj7g0rqu.d.ts → llm-client.d.ts} +21 -23
  538. package/dist/llm-client.d.ts.map +1 -0
  539. package/dist/llm-client.test.d.ts +2 -0
  540. package/dist/llm-client.test.d.ts.map +1 -0
  541. package/dist/locked-jsonl-appender.d.ts +19 -0
  542. package/dist/locked-jsonl-appender.d.ts.map +1 -0
  543. package/dist/matrix/aggregation.d.ts +16 -0
  544. package/dist/matrix/aggregation.d.ts.map +1 -0
  545. package/dist/matrix/index.d.ts +12 -30
  546. package/dist/matrix/index.d.ts.map +1 -0
  547. package/dist/matrix/runner.d.ts +15 -0
  548. package/dist/matrix/runner.d.ts.map +1 -0
  549. package/dist/{types-mn5Aqk7x.d.ts → matrix/types.d.ts} +11 -15
  550. package/dist/matrix/types.d.ts.map +1 -0
  551. package/dist/meta-eval/calibration.d.ts +47 -0
  552. package/dist/meta-eval/calibration.d.ts.map +1 -0
  553. package/dist/meta-eval/correlation-study.d.ts +53 -0
  554. package/dist/meta-eval/correlation-study.d.ts.map +1 -0
  555. package/dist/meta-eval/index.d.ts +6 -181
  556. package/dist/meta-eval/index.d.ts.map +1 -0
  557. package/dist/{outcome-store-rnXLEqSn.d.ts → meta-eval/outcome-store.d.ts} +7 -8
  558. package/dist/meta-eval/outcome-store.d.ts.map +1 -0
  559. package/dist/{rubric-predictive-validity-Cy_W-hWZ.d.ts → meta-eval/rubric-predictive-validity.d.ts} +8 -11
  560. package/dist/meta-eval/rubric-predictive-validity.d.ts.map +1 -0
  561. package/dist/meta-eval/sentinel.d.ts +169 -0
  562. package/dist/meta-eval/sentinel.d.ts.map +1 -0
  563. package/dist/metrics.d.ts +63 -0
  564. package/dist/metrics.d.ts.map +1 -0
  565. package/dist/model-seats.d.ts +71 -0
  566. package/dist/model-seats.d.ts.map +1 -0
  567. package/dist/model-seats.test.d.ts +2 -0
  568. package/dist/model-seats.test.d.ts.map +1 -0
  569. package/dist/muffled-gate-scanner.d.ts +102 -0
  570. package/dist/muffled-gate-scanner.d.ts.map +1 -0
  571. package/dist/{multi-layer-verifier-DUZXrPDA.d.ts → multi-layer-verifier.d.ts} +12 -15
  572. package/dist/multi-layer-verifier.d.ts.map +1 -0
  573. package/dist/multi-layer-verifier.test.d.ts +2 -0
  574. package/dist/multi-layer-verifier.test.d.ts.map +1 -0
  575. package/dist/multi-toolchain-layer.d.ts +80 -0
  576. package/dist/multi-toolchain-layer.d.ts.map +1 -0
  577. package/dist/multi-toolchain-layer.test.d.ts +2 -0
  578. package/dist/multi-toolchain-layer.test.d.ts.map +1 -0
  579. package/dist/multishot/default-tools.d.ts +34 -0
  580. package/dist/multishot/default-tools.d.ts.map +1 -0
  581. package/dist/multishot/index.d.ts +7 -290
  582. package/dist/multishot/index.d.ts.map +1 -0
  583. package/dist/multishot/index.js.map +1 -1
  584. package/dist/multishot/judges.d.ts +32 -0
  585. package/dist/multishot/judges.d.ts.map +1 -0
  586. package/dist/multishot/matrix.d.ts +107 -0
  587. package/dist/multishot/matrix.d.ts.map +1 -0
  588. package/dist/multishot/multishot.d.ts +23 -0
  589. package/dist/multishot/multishot.d.ts.map +1 -0
  590. package/dist/multishot/router.d.ts +37 -0
  591. package/dist/multishot/router.d.ts.map +1 -0
  592. package/dist/multishot/types.d.ts +60 -0
  593. package/dist/multishot/types.d.ts.map +1 -0
  594. package/dist/observability.d.ts +71 -0
  595. package/dist/observability.d.ts.map +1 -0
  596. package/dist/openapi.json +1 -1
  597. package/dist/oracle.d.ts +55 -0
  598. package/dist/oracle.d.ts.map +1 -0
  599. package/dist/orthogonality.d.ts +35 -0
  600. package/dist/orthogonality.d.ts.map +1 -0
  601. package/dist/otel-pipeline.d.ts +31 -0
  602. package/dist/otel-pipeline.d.ts.map +1 -0
  603. package/dist/paraphrase.d.ts +107 -0
  604. package/dist/paraphrase.d.ts.map +1 -0
  605. package/dist/{pareto-E-pembql.d.ts → pareto.d.ts} +9 -10
  606. package/dist/pareto.d.ts.map +1 -0
  607. package/dist/partition-held-out.d.ts +70 -0
  608. package/dist/partition-held-out.d.ts.map +1 -0
  609. package/dist/partition-held-out.test.d.ts +2 -0
  610. package/dist/partition-held-out.test.d.ts.map +1 -0
  611. package/dist/perf/index.d.ts +13 -119
  612. package/dist/perf/index.d.ts.map +1 -0
  613. package/dist/perf/integrity.d.ts +30 -0
  614. package/dist/perf/integrity.d.ts.map +1 -0
  615. package/dist/perf/journey.d.ts +45 -0
  616. package/dist/perf/journey.d.ts.map +1 -0
  617. package/dist/perf/ratchet.d.ts +47 -0
  618. package/dist/perf/ratchet.d.ts.map +1 -0
  619. package/dist/pipelines/budget-breach.d.ts +31 -0
  620. package/dist/pipelines/budget-breach.d.ts.map +1 -0
  621. package/dist/pipelines/budget-breach.test.d.ts +2 -0
  622. package/dist/pipelines/budget-breach.test.d.ts.map +1 -0
  623. package/dist/pipelines/failure-cluster.d.ts +38 -0
  624. package/dist/pipelines/failure-cluster.d.ts.map +1 -0
  625. package/dist/pipelines/failure-cluster.test.d.ts +2 -0
  626. package/dist/pipelines/failure-cluster.test.d.ts.map +1 -0
  627. package/dist/pipelines/first-divergence.d.ts +26 -0
  628. package/dist/pipelines/first-divergence.d.ts.map +1 -0
  629. package/dist/pipelines/first-divergence.test.d.ts +2 -0
  630. package/dist/pipelines/first-divergence.test.d.ts.map +1 -0
  631. package/dist/pipelines/index.d.ts +8 -173
  632. package/dist/pipelines/index.d.ts.map +1 -0
  633. package/dist/pipelines/judge-agreement.d.ts +26 -0
  634. package/dist/pipelines/judge-agreement.d.ts.map +1 -0
  635. package/dist/pipelines/judge-agreement.test.d.ts +2 -0
  636. package/dist/pipelines/judge-agreement.test.d.ts.map +1 -0
  637. package/dist/pipelines/regression.d.ts +23 -0
  638. package/dist/pipelines/regression.d.ts.map +1 -0
  639. package/dist/pipelines/regression.test.d.ts +2 -0
  640. package/dist/pipelines/regression.test.d.ts.map +1 -0
  641. package/dist/pipelines/stuck-loop.d.ts +32 -0
  642. package/dist/pipelines/stuck-loop.d.ts.map +1 -0
  643. package/dist/pipelines/stuck-loop.test.d.ts +2 -0
  644. package/dist/pipelines/stuck-loop.test.d.ts.map +1 -0
  645. package/dist/pipelines/tool-waste.d.ts +34 -0
  646. package/dist/pipelines/tool-waste.d.ts.map +1 -0
  647. package/dist/pipelines/tool-waste.test.d.ts +2 -0
  648. package/dist/pipelines/tool-waste.test.d.ts.map +1 -0
  649. package/dist/playbook.d.ts +16 -0
  650. package/dist/playbook.d.ts.map +1 -0
  651. package/dist/pr-review-benchmark.d.ts +88 -0
  652. package/dist/pr-review-benchmark.d.ts.map +1 -0
  653. package/dist/pr-review-benchmark.test.d.ts +2 -0
  654. package/dist/pr-review-benchmark.test.d.ts.map +1 -0
  655. package/dist/pre-registration.d.ts +125 -0
  656. package/dist/pre-registration.d.ts.map +1 -0
  657. package/dist/prm/builtin-rubrics.d.ts +33 -0
  658. package/dist/prm/builtin-rubrics.d.ts.map +1 -0
  659. package/dist/prm/index.d.ts +5 -104
  660. package/dist/prm/index.d.ts.map +1 -0
  661. package/dist/prm/inference.d.ts +29 -0
  662. package/dist/prm/inference.d.ts.map +1 -0
  663. package/dist/prm/inference.test.d.ts +2 -0
  664. package/dist/prm/inference.test.d.ts.map +1 -0
  665. package/dist/{rubric-Cc6UHvUb.d.ts → prm/rubric.d.ts} +10 -13
  666. package/dist/prm/rubric.d.ts.map +1 -0
  667. package/dist/prm/training-export.d.ts +38 -0
  668. package/dist/prm/training-export.d.ts.map +1 -0
  669. package/dist/produced-state.d.ts +63 -0
  670. package/dist/produced-state.d.ts.map +1 -0
  671. package/dist/produced-state.test.d.ts +8 -0
  672. package/dist/produced-state.test.d.ts.map +1 -0
  673. package/dist/profile/baselines.d.ts +37 -0
  674. package/dist/profile/baselines.d.ts.map +1 -0
  675. package/dist/profile/index.d.ts +105 -0
  676. package/dist/profile/index.d.ts.map +1 -0
  677. package/dist/promotion-gate.d.ts +93 -0
  678. package/dist/promotion-gate.d.ts.map +1 -0
  679. package/dist/prompt-registry.d.ts +41 -0
  680. package/dist/prompt-registry.d.ts.map +1 -0
  681. package/dist/propose-review-control.d.ts +49 -0
  682. package/dist/propose-review-control.d.ts.map +1 -0
  683. package/dist/propose-review-control.test.d.ts +2 -0
  684. package/dist/propose-review-control.test.d.ts.map +1 -0
  685. package/dist/propose-review.d.ts +155 -0
  686. package/dist/propose-review.d.ts.map +1 -0
  687. package/dist/{red-team-BWdoyleI.d.ts → red-team.d.ts} +14 -16
  688. package/dist/red-team.d.ts.map +1 -0
  689. package/dist/reference-replay-steering.d.ts +11 -0
  690. package/dist/reference-replay-steering.d.ts.map +1 -0
  691. package/dist/reference-replay.d.ts +176 -0
  692. package/dist/reference-replay.d.ts.map +1 -0
  693. package/dist/reflective-mutation.d.ts +79 -0
  694. package/dist/reflective-mutation.d.ts.map +1 -0
  695. package/dist/registry.d.ts +31 -0
  696. package/dist/registry.d.ts.map +1 -0
  697. package/dist/release-confidence.d.ts +128 -0
  698. package/dist/release-confidence.d.ts.map +1 -0
  699. package/dist/release-report.d.ts +11 -0
  700. package/dist/release-report.d.ts.map +1 -0
  701. package/dist/replay.d.ts +120 -0
  702. package/dist/replay.d.ts.map +1 -0
  703. package/dist/reporter.d.ts +14 -0
  704. package/dist/reporter.d.ts.map +1 -0
  705. package/dist/reporting.d.ts +15 -15
  706. package/dist/reporting.d.ts.map +1 -0
  707. package/dist/researcher.d.ts +140 -0
  708. package/dist/researcher.d.ts.map +1 -0
  709. package/dist/reviewer.d.ts +118 -0
  710. package/dist/reviewer.d.ts.map +1 -0
  711. package/dist/reviewer.test.d.ts +2 -0
  712. package/dist/reviewer.test.d.ts.map +1 -0
  713. package/dist/reward-model-export.d.ts +60 -0
  714. package/dist/reward-model-export.d.ts.map +1 -0
  715. package/dist/rl/active-curriculum.d.ts +110 -0
  716. package/dist/rl/active-curriculum.d.ts.map +1 -0
  717. package/dist/rl/adaptation-eval.d.ts +109 -0
  718. package/dist/rl/adaptation-eval.d.ts.map +1 -0
  719. package/dist/{adversarial-DIVcDoI_.d.ts → rl/adversarial.d.ts} +6 -7
  720. package/dist/rl/adversarial.d.ts.map +1 -0
  721. package/dist/rl/compute-curves.d.ts +127 -0
  722. package/dist/rl/compute-curves.d.ts.map +1 -0
  723. package/dist/rl/contamination.d.ts +117 -0
  724. package/dist/rl/contamination.d.ts.map +1 -0
  725. package/dist/rl/corpus.d.ts +55 -0
  726. package/dist/rl/corpus.d.ts.map +1 -0
  727. package/dist/rl/corpus.test.d.ts +2 -0
  728. package/dist/rl/corpus.test.d.ts.map +1 -0
  729. package/dist/rl/dataset.d.ts +102 -0
  730. package/dist/rl/dataset.d.ts.map +1 -0
  731. package/dist/rl/dataset.test.d.ts +2 -0
  732. package/dist/rl/dataset.test.d.ts.map +1 -0
  733. package/dist/rl/exporters.d.ts +141 -0
  734. package/dist/rl/exporters.d.ts.map +1 -0
  735. package/dist/rl/index.d.ts +49 -0
  736. package/dist/rl/index.d.ts.map +1 -0
  737. package/dist/{off-policy-DiwuKKg7.d.ts → rl/off-policy.d.ts} +8 -9
  738. package/dist/rl/off-policy.d.ts.map +1 -0
  739. package/dist/rl/predictive-validity-researcher.d.ts +69 -0
  740. package/dist/rl/predictive-validity-researcher.d.ts.map +1 -0
  741. package/dist/rl/preferences.d.ts +141 -0
  742. package/dist/rl/preferences.d.ts.map +1 -0
  743. package/dist/rl/process-reward.d.ts +122 -0
  744. package/dist/rl/process-reward.d.ts.map +1 -0
  745. package/dist/rl/reward-hacking.d.ts +104 -0
  746. package/dist/rl/reward-hacking.d.ts.map +1 -0
  747. package/dist/rl/rl-campaign.d.ts +85 -0
  748. package/dist/rl/rl-campaign.d.ts.map +1 -0
  749. package/dist/rl/run-record-adapters.d.ts +56 -0
  750. package/dist/rl/run-record-adapters.d.ts.map +1 -0
  751. package/dist/rl/sim-fidelity.d.ts +166 -0
  752. package/dist/rl/sim-fidelity.d.ts.map +1 -0
  753. package/dist/rl/sim-fidelity.test.d.ts +2 -0
  754. package/dist/rl/sim-fidelity.test.d.ts.map +1 -0
  755. package/dist/rl/tournament.d.ts +115 -0
  756. package/dist/rl/tournament.d.ts.map +1 -0
  757. package/dist/rl/verifiable-reward.d.ts +124 -0
  758. package/dist/rl/verifiable-reward.d.ts.map +1 -0
  759. package/dist/rl.d.ts +1 -1192
  760. package/dist/rl.js +612 -612
  761. package/dist/rl.js.map +1 -1
  762. package/dist/{run-campaign-7WNXMDSN.js → run-campaign-WXY7KI67.js} +2 -2
  763. package/dist/run-critic.d.ts +23 -0
  764. package/dist/run-critic.d.ts.map +1 -0
  765. package/dist/run-evidence.d.ts +32 -0
  766. package/dist/run-evidence.d.ts.map +1 -0
  767. package/dist/{run-record-e7vj1uZQ.d.ts → run-record.d.ts} +16 -122
  768. package/dist/run-record.d.ts.map +1 -0
  769. package/dist/run-record.test.d.ts +2 -0
  770. package/dist/run-record.test.d.ts.map +1 -0
  771. package/dist/run-score.d.ts +31 -0
  772. package/dist/run-score.d.ts.map +1 -0
  773. package/dist/runtime-trajectory.d.ts +47 -0
  774. package/dist/runtime-trajectory.d.ts.map +1 -0
  775. package/dist/{test-graded-scenario-DeODGLra.d.ts → sandbox-harness.d.ts} +15 -60
  776. package/dist/sandbox-harness.d.ts.map +1 -0
  777. package/dist/sandbox-harness.test.d.ts +2 -0
  778. package/dist/sandbox-harness.test.d.ts.map +1 -0
  779. package/dist/sandbox-pool.d.ts +74 -0
  780. package/dist/sandbox-pool.d.ts.map +1 -0
  781. package/dist/sandbox-pool.test.d.ts +2 -0
  782. package/dist/sandbox-pool.test.d.ts.map +1 -0
  783. package/dist/scorecard.d.ts +133 -0
  784. package/dist/scorecard.d.ts.map +1 -0
  785. package/dist/scorecard.test.d.ts +2 -0
  786. package/dist/scorecard.test.d.ts.map +1 -0
  787. package/dist/self-play.d.ts +69 -0
  788. package/dist/self-play.d.ts.map +1 -0
  789. package/dist/semantic-concept-judge.d.ts +135 -0
  790. package/dist/semantic-concept-judge.d.ts.map +1 -0
  791. package/dist/semantic-concept-judge.test.d.ts +2 -0
  792. package/dist/semantic-concept-judge.test.d.ts.map +1 -0
  793. package/dist/{sequential-5iSVfzl2.d.ts → sequential.d.ts} +9 -10
  794. package/dist/sequential.d.ts.map +1 -0
  795. package/dist/{series-convergence-D5OWMBg6.d.ts → series-convergence.d.ts} +4 -5
  796. package/dist/series-convergence.d.ts.map +1 -0
  797. package/dist/slo.d.ts +48 -0
  798. package/dist/slo.d.ts.map +1 -0
  799. package/dist/state-continuity.d.ts +47 -0
  800. package/dist/state-continuity.d.ts.map +1 -0
  801. package/dist/{statistics-CCJpTGOS.d.ts → statistics.d.ts} +46 -48
  802. package/dist/statistics.d.ts.map +1 -0
  803. package/dist/statistics.test.d.ts +2 -0
  804. package/dist/statistics.test.d.ts.map +1 -0
  805. package/dist/steering-optimizer.d.ts +58 -0
  806. package/dist/steering-optimizer.d.ts.map +1 -0
  807. package/dist/steering.d.ts +24 -0
  808. package/dist/steering.d.ts.map +1 -0
  809. package/dist/storyboard/code-edit.d.ts +64 -0
  810. package/dist/storyboard/code-edit.d.ts.map +1 -0
  811. package/dist/storyboard/code-edit.test.d.ts +2 -0
  812. package/dist/storyboard/code-edit.test.d.ts.map +1 -0
  813. package/dist/storyboard/index.d.ts +16 -81
  814. package/dist/storyboard/index.d.ts.map +1 -0
  815. package/dist/storyboard/index.test.d.ts +2 -0
  816. package/dist/storyboard/index.test.d.ts.map +1 -0
  817. package/dist/{summary-report-BDOFevaT.d.ts → summary-report.d.ts} +23 -160
  818. package/dist/summary-report.d.ts.map +1 -0
  819. package/dist/telemetry/client.d.ts +35 -0
  820. package/dist/telemetry/client.d.ts.map +1 -0
  821. package/dist/telemetry/index.d.ts +17 -35
  822. package/dist/telemetry/index.d.ts.map +1 -0
  823. package/dist/telemetry/schema.d.ts +61 -0
  824. package/dist/telemetry/schema.d.ts.map +1 -0
  825. package/dist/telemetry/sink-fetch.d.ts +39 -0
  826. package/dist/telemetry/sink-fetch.d.ts.map +1 -0
  827. package/dist/telemetry/{file.d.ts → sink-file.d.ts} +5 -7
  828. package/dist/telemetry/sink-file.d.ts.map +1 -0
  829. package/dist/test-graded-scenario.d.ts +42 -0
  830. package/dist/test-graded-scenario.d.ts.map +1 -0
  831. package/dist/testing.d.ts +5 -0
  832. package/dist/testing.d.ts.map +1 -0
  833. package/dist/testing.js +8 -0
  834. package/dist/testing.js.map +1 -0
  835. package/dist/tool-use-metrics.d.ts +35 -0
  836. package/dist/tool-use-metrics.d.ts.map +1 -0
  837. package/dist/trace/capture-fetch.d.ts +48 -0
  838. package/dist/trace/capture-fetch.d.ts.map +1 -0
  839. package/dist/trace/capture-fetch.test.d.ts +2 -0
  840. package/dist/trace/capture-fetch.test.d.ts.map +1 -0
  841. package/dist/{emitter-C2rqGH_l.d.ts → trace/emitter.d.ts} +9 -12
  842. package/dist/trace/emitter.d.ts.map +1 -0
  843. package/dist/trace/extract-usage.d.ts +46 -0
  844. package/dist/trace/extract-usage.d.ts.map +1 -0
  845. package/dist/trace/extract-usage.test.d.ts +2 -0
  846. package/dist/trace/extract-usage.test.d.ts.map +1 -0
  847. package/dist/trace/index.d.ts +15 -0
  848. package/dist/trace/index.d.ts.map +1 -0
  849. package/dist/{integrity-D2t12mMw.d.ts → trace/integrity.d.ts} +11 -14
  850. package/dist/trace/integrity.d.ts.map +1 -0
  851. package/dist/trace/otel-bridge.d.ts +29 -0
  852. package/dist/trace/otel-bridge.d.ts.map +1 -0
  853. package/dist/trace/otel-export.d.ts +52 -0
  854. package/dist/trace/otel-export.d.ts.map +1 -0
  855. package/dist/trace/otel.d.ts +57 -0
  856. package/dist/trace/otel.d.ts.map +1 -0
  857. package/dist/trace/otlp-attributes.d.ts +17 -0
  858. package/dist/trace/otlp-attributes.d.ts.map +1 -0
  859. package/dist/trace/query.d.ts +29 -0
  860. package/dist/trace/query.d.ts.map +1 -0
  861. package/dist/trace/query.test.d.ts +2 -0
  862. package/dist/trace/query.test.d.ts.map +1 -0
  863. package/dist/{raw-provider-sink-C46HDghv.d.ts → trace/raw-provider-sink.d.ts} +13 -14
  864. package/dist/trace/raw-provider-sink.d.ts.map +1 -0
  865. package/dist/{redact-B40YG2M_.d.ts → trace/redact.d.ts} +7 -8
  866. package/dist/trace/redact.d.ts.map +1 -0
  867. package/dist/{schema-m0gsnbt3.d.ts → trace/schema.d.ts} +29 -30
  868. package/dist/trace/schema.d.ts.map +1 -0
  869. package/dist/trace/store-to-otlp.d.ts +72 -0
  870. package/dist/trace/store-to-otlp.d.ts.map +1 -0
  871. package/dist/trace/store-to-otlp.test.d.ts +2 -0
  872. package/dist/trace/store-to-otlp.test.d.ts.map +1 -0
  873. package/dist/{store-BcFXE6LG.d.ts → trace/store.d.ts} +21 -12
  874. package/dist/trace/store.d.ts.map +1 -0
  875. package/dist/trace/store.test.d.ts +2 -0
  876. package/dist/trace/store.test.d.ts.map +1 -0
  877. package/dist/{analyst-C8HHvfJp.d.ts → trace-analyst/analyst.d.ts} +12 -14
  878. package/dist/trace-analyst/analyst.d.ts.map +1 -0
  879. package/dist/trace-analyst/analyst.test.d.ts +2 -0
  880. package/dist/trace-analyst/analyst.test.d.ts.map +1 -0
  881. package/dist/trace-analyst/behavioral-metrics.d.ts +40 -0
  882. package/dist/trace-analyst/behavioral-metrics.d.ts.map +1 -0
  883. package/dist/trace-analyst/behavioral-metrics.test.d.ts +2 -0
  884. package/dist/trace-analyst/behavioral-metrics.test.d.ts.map +1 -0
  885. package/dist/trace-analyst/hook.d.ts +55 -0
  886. package/dist/trace-analyst/hook.d.ts.map +1 -0
  887. package/dist/trace-analyst/index.d.ts +18 -0
  888. package/dist/trace-analyst/index.d.ts.map +1 -0
  889. package/dist/trace-analyst/insights.d.ts +71 -0
  890. package/dist/trace-analyst/insights.d.ts.map +1 -0
  891. package/dist/trace-analyst/insights.test.d.ts +2 -0
  892. package/dist/trace-analyst/insights.test.d.ts.map +1 -0
  893. package/dist/trace-analyst/otlp-flatten.d.ts +42 -0
  894. package/dist/trace-analyst/otlp-flatten.d.ts.map +1 -0
  895. package/dist/trace-analyst/otlp-span.d.ts +85 -0
  896. package/dist/trace-analyst/otlp-span.d.ts.map +1 -0
  897. package/dist/trace-analyst/otlp-span.test.d.ts +2 -0
  898. package/dist/trace-analyst/otlp-span.test.d.ts.map +1 -0
  899. package/dist/trace-analyst/otlp-to-run-records.d.ts +115 -0
  900. package/dist/trace-analyst/otlp-to-run-records.d.ts.map +1 -0
  901. package/dist/trace-analyst/otlp-to-run-records.test.d.ts +2 -0
  902. package/dist/trace-analyst/otlp-to-run-records.test.d.ts.map +1 -0
  903. package/dist/trace-analyst/otlp-to-run-records.timestamps.test.d.ts +2 -0
  904. package/dist/trace-analyst/otlp-to-run-records.timestamps.test.d.ts.map +1 -0
  905. package/dist/trace-analyst/prompts.d.ts +6 -0
  906. package/dist/trace-analyst/prompts.d.ts.map +1 -0
  907. package/dist/trace-analyst/store-otlp.d.ts +126 -0
  908. package/dist/trace-analyst/store-otlp.d.ts.map +1 -0
  909. package/dist/trace-analyst/store-otlp.test.d.ts +8 -0
  910. package/dist/trace-analyst/store-otlp.test.d.ts.map +1 -0
  911. package/dist/trace-analyst/store-otlp.timestamps.test.d.ts +2 -0
  912. package/dist/trace-analyst/store-otlp.timestamps.test.d.ts.map +1 -0
  913. package/dist/trace-analyst/store.d.ts +63 -0
  914. package/dist/trace-analyst/store.d.ts.map +1 -0
  915. package/dist/trace-analyst/tools.d.ts +44 -0
  916. package/dist/trace-analyst/tools.d.ts.map +1 -0
  917. package/dist/trace-analyst/tools.test.d.ts +10 -0
  918. package/dist/trace-analyst/tools.test.d.ts.map +1 -0
  919. package/dist/{store-C1YxJDEK.d.ts → trace-analyst/types.d.ts} +18 -74
  920. package/dist/trace-analyst/types.d.ts.map +1 -0
  921. package/dist/trace-contracts.d.ts +180 -0
  922. package/dist/trace-contracts.d.ts.map +1 -0
  923. package/dist/traced-analyst.d.ts +26 -0
  924. package/dist/traced-analyst.d.ts.map +1 -0
  925. package/dist/traced-judges.d.ts +27 -0
  926. package/dist/traced-judges.d.ts.map +1 -0
  927. package/dist/traces.d.ts +4 -960
  928. package/dist/traces.d.ts.map +1 -0
  929. package/dist/traces.js +41 -11
  930. package/dist/{trajectory-2TkpSEVh.d.ts → trajectory.d.ts} +8 -9
  931. package/dist/trajectory.d.ts.map +1 -0
  932. package/dist/{types-C7DGg5ex.d.ts → types.d.ts} +31 -33
  933. package/dist/types.d.ts.map +1 -0
  934. package/dist/ui-finding.d.ts +104 -0
  935. package/dist/ui-finding.d.ts.map +1 -0
  936. package/dist/verdict-cache.d.ts +78 -0
  937. package/dist/verdict-cache.d.ts.map +1 -0
  938. package/dist/verdict-cache.test.d.ts +2 -0
  939. package/dist/verdict-cache.test.d.ts.map +1 -0
  940. package/dist/{verdict-C9MlYujm.d.ts → verdict.d.ts} +2 -3
  941. package/dist/verdict.d.ts.map +1 -0
  942. package/dist/visual-diff.d.ts +32 -0
  943. package/dist/visual-diff.d.ts.map +1 -0
  944. package/dist/wire/handlers.d.ts +54 -0
  945. package/dist/wire/handlers.d.ts.map +1 -0
  946. package/dist/wire/index.d.ts +13 -570
  947. package/dist/wire/index.d.ts.map +1 -0
  948. package/dist/wire/openapi.d.ts +3 -0
  949. package/dist/wire/openapi.d.ts.map +1 -0
  950. package/dist/wire/rpc.d.ts +21 -0
  951. package/dist/wire/rpc.d.ts.map +1 -0
  952. package/dist/wire/rubrics.d.ts +34 -0
  953. package/dist/wire/rubrics.d.ts.map +1 -0
  954. package/dist/wire/schemas.d.ts +410 -0
  955. package/dist/wire/schemas.d.ts.map +1 -0
  956. package/dist/wire/server.d.ts +60 -0
  957. package/dist/wire/server.d.ts.map +1 -0
  958. package/dist/workflow/event-schema.d.ts +5 -0
  959. package/dist/workflow/event-schema.d.ts.map +1 -0
  960. package/dist/workflow/feedback-pack.d.ts +99 -0
  961. package/dist/workflow/feedback-pack.d.ts.map +1 -0
  962. package/dist/workflow/index.d.ts +22 -495
  963. package/dist/workflow/index.d.ts.map +1 -0
  964. package/dist/workflow/index.js +1 -1
  965. package/dist/workflow/intelligence-export.d.ts +62 -0
  966. package/dist/workflow/intelligence-export.d.ts.map +1 -0
  967. package/dist/workflow/partner-report.d.ts +49 -0
  968. package/dist/workflow/partner-report.d.ts.map +1 -0
  969. package/dist/workflow/phase-graph.d.ts +43 -0
  970. package/dist/workflow/phase-graph.d.ts.map +1 -0
  971. package/dist/workflow/promotion-gate.d.ts +61 -0
  972. package/dist/workflow/promotion-gate.d.ts.map +1 -0
  973. package/dist/workflow/run-record.d.ts +12 -0
  974. package/dist/workflow/run-record.d.ts.map +1 -0
  975. package/dist/workflow/runtime-adapter.d.ts +20 -0
  976. package/dist/workflow/runtime-adapter.d.ts.map +1 -0
  977. package/dist/workflow/sanitize.d.ts +21 -0
  978. package/dist/workflow/sanitize.d.ts.map +1 -0
  979. package/dist/workflow/schema.d.ts +5 -0
  980. package/dist/workflow/schema.d.ts.map +1 -0
  981. package/dist/workflow/summary.d.ts +43 -0
  982. package/dist/workflow/summary.d.ts.map +1 -0
  983. package/dist/workflow/trace-event-fields.d.ts +6 -0
  984. package/dist/workflow/trace-event-fields.d.ts.map +1 -0
  985. package/dist/workflow/trajectory.d.ts +15 -0
  986. package/dist/workflow/trajectory.d.ts.map +1 -0
  987. package/dist/workflow/types.d.ts +68 -0
  988. package/dist/workflow/types.d.ts.map +1 -0
  989. package/dist/workspace-inspector.d.ts +67 -0
  990. package/dist/workspace-inspector.d.ts.map +1 -0
  991. package/dist/wrangler-deploy-runner.test.d.ts +2 -0
  992. package/dist/wrangler-deploy-runner.test.d.ts.map +1 -0
  993. package/docs/campaign-proposers.md +170 -0
  994. package/docs/concepts.md +8 -4
  995. package/docs/customer-journeys.md +15 -13
  996. package/docs/design/loop-taxonomy.md +34 -66
  997. package/docs/distributed-driver.md +14 -14
  998. package/docs/feature-guide.md +1 -1
  999. package/docs/hosted-ingest-spec.md +2 -3
  1000. package/docs/multi-shot-optimization.md +8 -8
  1001. package/docs/product-eval-adoption.md +1 -1
  1002. package/docs/self-improvement-map.md +33 -29
  1003. package/package.json +9 -15
  1004. package/dist/calibration-BPmzuVPk.d.ts +0 -101
  1005. package/dist/chunk-2K6UUZ7P.js.map +0 -1
  1006. package/dist/chunk-CTBHKLEU.js.map +0 -1
  1007. package/dist/chunk-E4GH6USR.js.map +0 -1
  1008. package/dist/chunk-EGPMSBEZ.js.map +0 -1
  1009. package/dist/chunk-KWRRMR3J.js.map +0 -1
  1010. package/dist/chunk-MIFZUPEK.js.map +0 -1
  1011. package/dist/chunk-MPQWFX6Y.js.map +0 -1
  1012. package/dist/chunk-Q5LIB7BC.js.map +0 -1
  1013. package/dist/chunk-QMUEXQJS.js.map +0 -1
  1014. package/dist/chunk-SD2YFWQQ.js.map +0 -1
  1015. package/dist/control-D6qwHXIR.d.ts +0 -259
  1016. package/dist/corpus-B8A4BDR3.d.ts +0 -560
  1017. package/dist/failure-cluster-DH9Flgcf.d.ts +0 -76
  1018. package/dist/harness-optimizer-mOl9XX_O.d.ts +0 -106
  1019. package/dist/index-Bx3gZ8xl.d.ts +0 -159
  1020. package/dist/pre-registration-mAnCugl9.d.ts +0 -523
  1021. package/dist/provenance-P-bCL2Fo.d.ts +0 -441
  1022. package/dist/query-B7GGjRox.d.ts +0 -32
  1023. package/dist/release-report-BEbWmVYj.d.ts +0 -233
  1024. package/dist/run-critic-CmMf05uV.d.ts +0 -56
  1025. package/dist/run-improvement-loop-DBahB8Ax.d.ts +0 -427
  1026. package/dist/runtime-trajectory-BDgfGZSr.d.ts +0 -49
  1027. package/dist/semantic-concept-judge-B9MgmBnM.d.ts +0 -624
  1028. package/dist/sink-fetch-B1Yg4Til.d.ts +0 -101
  1029. package/docs/design/external-agent-wedge.md +0 -89
  1030. package/docs/design/phase-d-rfc.md +0 -125
  1031. package/docs/design/phase4-consumer-migration.md +0 -70
  1032. package/docs/design/primitives-integration-spec.md +0 -393
  1033. package/docs/design/product-self-improvement-loop.md +0 -146
  1034. package/docs/design/self-improvement-engine.md +0 -140
  1035. package/docs/design/self-improvement-protocol.md +0 -223
  1036. package/docs/design/self-improvement-roadmap.md +0 -106
  1037. package/docs/design/substrate-gaps.md +0 -118
  1038. package/docs/phase-b-pairing-kit.md +0 -188
  1039. package/docs/phase-b-runbook.md +0 -176
  1040. package/docs/pilot/README.md +0 -62
  1041. package/docs/pilot/customer-checklist.md +0 -90
  1042. package/docs/pilot/integration-foreign-stack.md +0 -296
  1043. package/docs/pilot/integration-tangle-stack.md +0 -248
  1044. package/docs/pilot/one-pager.md +0 -161
  1045. package/docs/pilot/sample-insight-report.json +0 -172
  1046. package/docs/quickstart-external.md +0 -229
  1047. package/docs/research/belief-state-agent-eval-roadmap.md +0 -593
  1048. package/docs/research/research-roadmap.md +0 -205
  1049. package/docs/specs/driver-honest-spec.md +0 -251
  1050. package/docs/specs/hermes-self-improvement-audit.md +0 -93
  1051. package/docs/specs/profile-versioning.md +0 -291
  1052. package/docs/three-package-architecture.md +0 -168
  1053. /package/dist/{chunk-TBDR6PAI.js.map → chunk-IZCEK2HR.js.map} +0 -0
  1054. /package/dist/{chunk-KW53MSA5.js.map → chunk-X74V6ESX.js.map} +0 -0
  1055. /package/dist/{chunk-2KNZHH3P.js.map → chunk-Z6L6YSU6.js.map} +0 -0
  1056. /package/dist/{run-campaign-7WNXMDSN.js.map → run-campaign-WXY7KI67.js.map} +0 -0
package/dist/traces.d.ts CHANGED
@@ -1,960 +1,4 @@
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-e7vj1uZQ.js';
18
- import { AxFunction } from '@ax-llm/ax';
19
-
20
- /**
21
- * Trace-analyst auto-execution hook.
22
- *
23
- * Wires `analyzeTraces` into a `TraceEmitter`'s `onRunComplete` so a
24
- * direct matrix run produces an analysis artifact without an out-of-band
25
- * step. Designed for the case where the consumer reports "the analyst
26
- * never ran" — the cause is almost always orchestration, not the analyst.
27
- *
28
- * Usage:
29
- *
30
- * const emitter = new TraceEmitter(store, {
31
- * onRunComplete: [traceAnalystOnRunComplete({ analyze: opts, save })],
32
- * })
33
- *
34
- * Hooks are best-effort by default — they never crash the underlying run.
35
- * The caller decides whether to gate the run on the analysis result via
36
- * the `gateOn` callback.
37
- */
38
-
39
- interface TraceAnalystHookOptions {
40
- /**
41
- * Options forwarded to `analyzeTraces`. The hook supplies the question
42
- * if you don't pass one — defaulting to a launch-grade prompt that asks
43
- * for failure modes, surprising findings, and a recommendation.
44
- */
45
- analyze: Omit<AnalyzeTracesOptions, 'source'> & {
46
- source?: AnalyzeTracesOptions['source'];
47
- };
48
- /**
49
- * Override the question. The default is intentionally generic:
50
- * "Summarise what happened in this run, surface any failure modes,
51
- * surprising findings, or evidence the verdict is wrong."
52
- */
53
- question?: string;
54
- /**
55
- * Persist the result. The hook calls this with the analysis output and
56
- * the run context. Common implementations write to a TraceAnalysisStore
57
- * or append to a per-run JSONL.
58
- */
59
- save?: (result: AnalyzeTracesResult, ctx: RunCompleteHookContext) => Promise<void>;
60
- /**
61
- * Predicate gating execution per run. Default: every completed run.
62
- * Use to skip aborted runs, debug runs, or runs without LLM activity.
63
- */
64
- shouldRun?: (ctx: RunCompleteHookContext) => boolean;
65
- /**
66
- * Optional gate: if set and returns false, the hook records the failure
67
- * as a log event on the run instead of staying quiet. The caller can
68
- * then trigger downstream alerts off `analyst_gate_failed` log events.
69
- */
70
- gateOn?: (result: AnalyzeTracesResult, ctx: RunCompleteHookContext) => boolean;
71
- }
72
- declare function traceAnalystOnRunComplete(opts: TraceAnalystHookOptions): RunCompleteHook;
73
-
74
- interface TraceInsightTask {
75
- id: string;
76
- name: string;
77
- prompt?: string;
78
- difficulty?: string;
79
- tags?: string[];
80
- outcome?: string;
81
- score?: number;
82
- gaps?: string[];
83
- }
84
- interface TraceInsightSuite {
85
- name: string;
86
- collectionId?: string;
87
- tasks: TraceInsightTask[];
88
- }
89
- interface TraceInsightFinding {
90
- kind: string;
91
- severity?: string;
92
- taskIds: string[];
93
- evidence?: string;
94
- proposedFixClass?: string;
95
- }
96
- interface TraceInsightQuestion {
97
- id: string;
98
- question: string;
99
- why: string;
100
- }
101
- interface TraceInsightPanelRole {
102
- id: string;
103
- name: string;
104
- responsibility: string;
105
- }
106
- interface TraceInsightPromptInput {
107
- suite: TraceInsightSuite;
108
- findings?: TraceInsightFinding[];
109
- agent?: Record<string, unknown>;
110
- totals?: Record<string, unknown>;
111
- maxRepresentativeTraces?: number;
112
- }
113
- interface TraceInsightContext {
114
- suite: TraceInsightSuite;
115
- scope: string;
116
- keywords: string[];
117
- questions: TraceInsightQuestion[];
118
- panel: TraceInsightPanelRole[];
119
- findings: TraceInsightFinding[];
120
- agent: Record<string, unknown> | null;
121
- totals: Record<string, unknown> | null;
122
- }
123
- interface TraceInsightQualityGate {
124
- id: string;
125
- label: string;
126
- passed: boolean;
127
- severity: 'critical' | 'high' | 'medium' | 'low';
128
- detail: string;
129
- }
130
- interface TraceInsightReadiness {
131
- score: number;
132
- grade: 'external-ready' | 'internal-review' | 'raw-analysis';
133
- gates: TraceInsightQualityGate[];
134
- }
135
- declare function tokenizeDomainWords(value: string): string[];
136
- declare function inferDomainKeywords(suite: TraceInsightSuite): string[];
137
- declare function domainEvidencePattern(keywords: string[]): RegExp;
138
- declare function describeTraceInsightScope(suite: TraceInsightSuite): string;
139
- declare function planTraceInsightQuestions(input: TraceInsightPromptInput): TraceInsightQuestion[];
140
- declare function buildTraceInsightContext(input: TraceInsightPromptInput): TraceInsightContext;
141
- declare function scoreTraceInsightReadiness(context: TraceInsightContext): TraceInsightReadiness;
142
- declare function defaultTraceInsightPanel(): TraceInsightPanelRole[];
143
- declare function buildTraceInsightPrompt(input: TraceInsightPromptInput): string;
144
-
145
- /**
146
- * OpenTelemetry JSON export — maps TraceSchema v1 to OTLP/JSON so
147
- * traces render natively in Jaeger / Honeycomb / Langfuse / Grafana.
148
- *
149
- * Wire format only. We do NOT depend on the @opentelemetry SDK — that
150
- * would drag in polyfills incompatible with Workers/Edge. Consumers
151
- * push the JSON to their collector of choice via HTTP.
152
- *
153
- * Reference: OTLP 1.3.2 (ResourceSpans / ScopeSpans / Span).
154
- */
155
-
156
- declare const OTEL_AGENT_EVAL_SCOPE: {
157
- name: string;
158
- version: string;
159
- };
160
- interface OtlpSpan {
161
- traceId: string;
162
- spanId: string;
163
- parentSpanId?: string;
164
- name: string;
165
- kind: number;
166
- startTimeUnixNano: string;
167
- endTimeUnixNano: string;
168
- attributes: Array<{
169
- key: string;
170
- value: {
171
- stringValue?: string;
172
- intValue?: string;
173
- doubleValue?: number;
174
- boolValue?: boolean;
175
- };
176
- }>;
177
- events?: Array<{
178
- timeUnixNano: string;
179
- name: string;
180
- attributes?: OtlpSpan['attributes'];
181
- }>;
182
- status?: {
183
- code: number;
184
- message?: string;
185
- };
186
- }
187
- interface OtlpResourceSpans {
188
- resource: {
189
- attributes: OtlpSpan['attributes'];
190
- };
191
- scopeSpans: Array<{
192
- scope: typeof OTEL_AGENT_EVAL_SCOPE;
193
- spans: OtlpSpan[];
194
- }>;
195
- }
196
- interface OtlpExport {
197
- resourceSpans: OtlpResourceSpans[];
198
- }
199
- /** Export a single run's spans + events in OTLP/JSON. */
200
- declare function exportRunAsOtlp(store: TraceStore, runId: string, resourceAttrs?: Record<string, string | number | boolean>): Promise<OtlpExport>;
201
-
202
- /**
203
- * `flattenOtlpExportToNdjson` — flatten an `OtlpExport` (the shape
204
- * `exportRunAsOtlp` produces) into the per-line JSON the analyst's
205
- * `OtlpFileTraceStore` index reads. Replaces three per-consumer OTLP
206
- * flatteners with one canonical projection.
207
- *
208
- * Pure function, no I/O — the caller does `.map(JSON.stringify).join('\n')`
209
- * and writes the file (consumers want control over rotation + naming).
210
- */
211
-
212
- interface OtlpFlatLine {
213
- trace_id: string;
214
- span_id: string;
215
- parent_span_id: string | null;
216
- name: string;
217
- kind: string;
218
- start_time: string;
219
- end_time: string;
220
- status: {
221
- code: 'STATUS_CODE_OK' | 'STATUS_CODE_ERROR' | 'STATUS_CODE_UNSET';
222
- message?: string;
223
- };
224
- resource: {
225
- attributes: Record<string, string | number | boolean>;
226
- };
227
- attributes: Record<string, string | number | boolean>;
228
- events?: Array<{
229
- name: string;
230
- timeUnixNano?: string;
231
- attributes?: Record<string, unknown>;
232
- }>;
233
- }
234
- interface FlattenOtlpOptions {
235
- /** `'openinference'` (default) mirrors per-span attributes into the
236
- * OpenInference vocabulary the analyst's `inferKind` reads
237
- * (`llm.model`→`llm.model_name`, `tool.name`→`inference.tool.name`,
238
- * `span.kind`→`openinference.span.kind` uppercased). `'none'` passes
239
- * attributes through untouched. */
240
- attributeVocabulary?: 'openinference' | 'none';
241
- /** Override the numeric-kind → otlp-string mapping. */
242
- kindMap?: Partial<Record<number, string>>;
243
- }
244
- declare function flattenOtlpExportToNdjson(otlpExport: OtlpExport, opts?: FlattenOtlpOptions): OtlpFlatLine[];
245
-
246
- /**
247
- * Canonical OTLP-flat-line readers shared by every consumer of the
248
- * OTLP-JSONL wire shape (one OTLP span per line; the form
249
- * `flattenOtlpExportToNdjson` produces and the form AppWorld / HALO
250
- * emit via their OpenInference OTLP exporter).
251
- *
252
- * `OtlpFileTraceStore` indexes spans with these; `otlpToRunRecords`
253
- * aggregates spans into `RunRecord`s with the same readers. One parser,
254
- * one vocabulary — a divergence between the analyst's view of a trace and
255
- * the RunRecord projected from it is a class of bug this consolidation
256
- * removes by construction.
257
- *
258
- * Vocabulary. The readers understand BOTH dialects that appear in the
259
- * wild:
260
- * - the substrate's own `llm.*` / `tool.*` / `span.kind` attributes
261
- * (`flattenSpanAttributes` in `trace/otel.ts`), and
262
- * - the OpenInference / inference-export attributes AppWorld / HALO
263
- * emit (`openinference.span.kind`, `inference.observation_kind`,
264
- * `inference.llm.input_tokens`, `llm.token_count.prompt`, …).
265
- *
266
- * Pure, no I/O.
267
- */
268
-
269
- /**
270
- * The structural fields a flat OTLP-JSONL line projects to. `attributes`
271
- * is the merged resource+span attribute map (span overrides resource);
272
- * the named fields are the pivots every reader of a trace needs without
273
- * paying the full attribute materialisation.
274
- */
275
- interface ProjectedOtlpSpan {
276
- trace_id: string;
277
- span_id: string;
278
- parent_span_id: string | null;
279
- name: string;
280
- kind: TraceAnalystSpanKind;
281
- start_time: string;
282
- end_time: string;
283
- duration_ms: number;
284
- status: TraceAnalystSpanStatus;
285
- status_message: string | undefined;
286
- service_name: string | null;
287
- agent_name: string | null;
288
- model_name: string | null;
289
- tool_name: string | null;
290
- /** Merged resource + span attributes, span winning on overlap. */
291
- attributes: Record<string, unknown>;
292
- }
293
- /**
294
- * Project one parsed OTLP-JSONL object to `ProjectedOtlpSpan`, or `null`
295
- * when the line is missing the mandatory `trace_id` + `span_id`.
296
- */
297
- declare function projectOtlpFlatLine(raw: Record<string, unknown>): ProjectedOtlpSpan | null;
298
- declare function readOtlpStatus(raw: Record<string, unknown>): {
299
- code: TraceAnalystSpanStatus;
300
- message: string | undefined;
301
- };
302
- declare function inferOtlpKind(attrs: Record<string, unknown>): TraceAnalystSpanKind;
303
- /**
304
- * Flatten OTLP `attributes` + `resource.attributes` into a single
305
- * dotted-key map. Span attributes override resource attributes when keys
306
- * overlap. Nested objects/arrays are preserved as-is.
307
- */
308
- declare function extractOtlpAttributes(raw: Record<string, unknown>): Record<string, unknown>;
309
- declare function stringField(raw: Record<string, unknown>, key: string): string | undefined;
310
- declare function asString(v: unknown): string | null;
311
- /** Read a numeric attribute, tolerating numeric strings; `null` if absent/NaN. */
312
- declare function asNumber(v: unknown): number | null;
313
- /** First finite numeric value across a list of candidate attribute keys. */
314
- declare function firstNumberAttr(attrs: Record<string, unknown>, keys: readonly string[]): number | null;
315
- /** First non-empty string value across a list of candidate attribute keys. */
316
- declare function firstStringAttr(attrs: Record<string, unknown>, keys: readonly string[]): string | null;
317
-
318
- /**
319
- * `otlpToRunRecords` — fold an OTLP traces.jsonl (one OTLP span per line;
320
- * the form AppWorld / HALO emit via their OpenInference OTLP exporter, the
321
- * same shape `flattenOtlpExportToNdjson` produces) into validated
322
- * `RunRecord[]` — one record per `trace_id` (one trace == one task).
323
- *
324
- * This is the offline ingestion primitive the AppWorld driver bench and the
325
- * hosted Intelligence product both stand on: traces in, paper-grade rows
326
- * out, ready for `compareDrivers` / `analyzeRuns` / the promotion gate.
327
- *
328
- * Aggregation per trace:
329
- * - tokenUsage: sum LLM-span `input` / `output` (+ `cached` when present)
330
- * across every LLM span in the trace.
331
- * - costUsd: sum per-span LLM cost when present; else priced via
332
- * `opts.priceUsdPerToken` from the aggregated tokens; else 0 with a
333
- * loud `raw.cost_unpriced = 1` marker so a missing price is visible, not
334
- * a silent zero folded into a gate.
335
- * - failureMode: the first `STATUS_CODE_ERROR` span's normalized status
336
- * message (carries the real failure signature, not a generic class).
337
- * - model: the dominant LLM model in the trace (snapshot-padded to satisfy
338
- * `validateRunRecord` when the trace's model is a bare alias).
339
- * - outcome score: `opts.scoreForTrace` (AppWorld `world.evaluate()` →
340
- * TGC/SGC) when supplied; else 1 when the trace had no error span, 0
341
- * when it did — a defensible default the caller can override.
342
- * - prompt / completion: carried into `raw` as token-count signals and,
343
- * when the first/last LLM span exposes `input.value` / `output.value`,
344
- * the verbatim text is preserved on the optional `promptText` /
345
- * `completionText` of the returned `OtlpTraceRunRecord`.
346
- *
347
- * Fail-loud: an OTLP file with zero valid spans throws. A trace with no
348
- * spans is impossible (a trace exists only because a span referenced it).
349
- * `validateRunRecord` runs on every row — a malformed projection throws
350
- * rather than silently producing a half-record.
351
- */
352
-
353
- interface OtlpToRunRecordsOptions {
354
- /** Logical experiment grouping for every produced record. */
355
- experimentId: string;
356
- /** Candidate (variant) id — the surface these traces exercised. The
357
- * bench passes the driver label here so `compareDrivers` can pair rows. */
358
- candidateId: string;
359
- /** Split assignment for every produced record. Default `'holdout'` —
360
- * ingested traces are evidence, not the optimizer's training pool. */
361
- splitTag?: RunSplitTag;
362
- /** Git SHA the traces were produced from. Default `'unknown'`. */
363
- commitSha?: string;
364
- /** sha256 of the effective prompt surface. Default `'unknown'`. */
365
- promptHash?: string;
366
- /** sha256 of the effective config. Default `'unknown'`. */
367
- configHash?: string;
368
- /** RNG seed recorded on every row. Default 0. */
369
- seed?: number;
370
- /**
371
- * Fallback model snapshot when the trace exposes no LLM model attribute
372
- * OR exposes a bare alias `validateRunRecord` would reject. The trace's
373
- * own model wins when it already carries a snapshot. Default
374
- * `'unknown@otlp'` (opaque-snapshot form the validator accepts).
375
- */
376
- fallbackModel?: string;
377
- /**
378
- * USD per total token (input+output) used to price a trace when no
379
- * per-span cost attribute is present. When unset, an unpriced trace
380
- * records `costUsd: 0` AND `raw.cost_unpriced = 1` — the zero is flagged,
381
- * never silent.
382
- */
383
- priceUsdPerToken?: number;
384
- /**
385
- * Score for a trace's outcome (AppWorld `world.evaluate()` → TGC/SGC, or
386
- * any [0,1] task-success signal). Keyed by `trace_id`; falls through to
387
- * the error-derived default (1 = no error span, 0 = had one) when the map
388
- * has no entry or the function returns undefined.
389
- */
390
- scoreForTrace?: (traceId: string, span: TraceAggregate) => number | undefined;
391
- /**
392
- * Per-record judge metadata when an external judge produced the score.
393
- * Keyed by `trace_id`.
394
- */
395
- judgeMetadataForTrace?: (traceId: string) => RunRecord['judgeMetadata'] | undefined;
396
- }
397
- /** A `RunRecord` plus the verbatim prompt/completion text when the trace's
398
- * LLM spans exposed it. The text is NOT on the validated `RunRecord`
399
- * (`outcome.raw` is numeric-only) but consumers ingesting full traces want
400
- * it — so it rides alongside. */
401
- interface OtlpTraceRunRecord {
402
- record: RunRecord;
403
- /** Verbatim first-LLM-span `input.value`, when present. */
404
- promptText?: string;
405
- /** Verbatim last-LLM-span `output.value`, when present. */
406
- completionText?: string;
407
- }
408
- /** Per-trace rollup the score callback can inspect. */
409
- interface TraceAggregate {
410
- traceId: string;
411
- spanCount: number;
412
- llmSpanCount: number;
413
- toolSpanCount: number;
414
- agentSpanCount: number;
415
- errorSpanCount: number;
416
- tokenUsage: RunTokenUsage;
417
- /** First error span's normalized status message, if any. */
418
- firstErrorMessage?: string;
419
- model: string;
420
- startTime: string;
421
- endTime: string;
422
- wallMs: number;
423
- }
424
- /**
425
- * Parse + aggregate an OTLP traces.jsonl string into validated
426
- * `RunRecord[]` (one per trace). Use {@link otlpToTraceRunRecords} when you
427
- * also want the verbatim prompt/completion text alongside each record.
428
- */
429
- declare function otlpToRunRecords(otlpJsonl: string, opts: OtlpToRunRecordsOptions): RunRecord[];
430
- /** As {@link otlpToRunRecords} but returns the prompt/completion text too. */
431
- declare function otlpToTraceRunRecords(otlpJsonl: string, opts: OtlpToRunRecordsOptions): OtlpTraceRunRecord[];
432
-
433
- /** Ax RLM prompt for bounded trace discovery and evidence-backed analysis. */
434
- 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.";
435
- declare const TRACE_ANALYST_ACTOR_DESCRIPTION_VERSION = "trace-analyst-actor-v5-2026-05-06";
436
- /** Subagent prompt for focused trace-inspection subtasks. */
437
- 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.";
438
-
439
- /**
440
- * `OtlpFileTraceStore` — read-only OTLP-JSONL trace store for the
441
- * trace-analyst.
442
- *
443
- * Wire shape. Each line of the input file is one OTLP-shaped span. The
444
- * store understands flattened OTLP JSONL plus the OpenInference vocab.
445
- * We project upstream's full
446
- * span shape down to `TraceAnalystSpan` lazily — full materialisation
447
- * only happens for the spans the agent actually requests.
448
- *
449
- * Indexing. On first read the store builds an in-memory index keyed
450
- * by `trace_id` carrying:
451
- * - byte offsets + lengths for each span line (for surgical reads
452
- * without re-parsing the whole file)
453
- * - a `TraceAnalystTraceSummary` rollup
454
- * - sets of services / agents / models / tools / has_errors
455
- * - byte size of the trace's JSONL slab
456
- *
457
- * Memory bound. The index keeps span metadata only — names, kinds,
458
- * offsets, status. Attribute payloads stay on disk until requested.
459
- * For a 50MB JSONL with 50k spans, the index is ~5MB.
460
- *
461
- * Concurrency. The store builds the index once on first read and
462
- * caches it. Subsequent reads reuse the index. The file is opened on
463
- * each read; we never hold a long-lived FD.
464
- */
465
-
466
- interface OtlpFileTraceStoreOptions {
467
- /** Path to the OTLP-JSONL file. */
468
- path: string;
469
- /** Override the discovery (`viewTrace`) per-attribute byte cap. */
470
- perAttributeViewBudget?: number;
471
- /** Override the surgical (`viewSpans`) per-attribute byte cap. */
472
- perAttributeSpanBudget?: number;
473
- /** Override the per-call ceiling that triggers oversized summaries. */
474
- perCallByteCeiling?: number;
475
- /** Override the per-match text budget. */
476
- perMatchTextBudget?: number;
477
- /**
478
- * Hard ceiling on the trace file size in bytes. The store reads the
479
- * whole file into one Buffer and indexes it in memory, so an
480
- * unbounded file OOMs the process. Above this size the store fails
481
- * loud with `TraceFileTooLargeError` instead of degrading silently.
482
- * Default 256 MiB.
483
- */
484
- maxFileBytes?: number;
485
- }
486
- declare class OtlpFileTraceStore implements TraceAnalysisStore {
487
- private readonly path;
488
- private readonly perAttributeViewBudget;
489
- private readonly perAttributeSpanBudget;
490
- private readonly perCallByteCeiling;
491
- private readonly perMatchTextBudget;
492
- private readonly maxFileBytes;
493
- private indexPromise?;
494
- /** Cached UTF-8 buffer of the file. We pin it once because every
495
- * read needs slice access and re-reading on each call balloons the
496
- * syscall count. */
497
- private bufferPromise?;
498
- constructor(opts: OtlpFileTraceStoreOptions);
499
- getOverview(filters?: TraceAnalystFilters): Promise<DatasetOverview>;
500
- queryTraces(opts: {
501
- filters?: TraceAnalystFilters;
502
- limit: number;
503
- offset?: number;
504
- }): Promise<QueryTracesPage>;
505
- countTraces(filters?: TraceAnalystFilters): Promise<number>;
506
- viewTrace(opts: {
507
- trace_id: string;
508
- per_attribute_byte_cap?: number;
509
- }): Promise<ViewTraceResult>;
510
- viewSpans(opts: {
511
- trace_id: string;
512
- span_ids: readonly string[];
513
- per_attribute_byte_cap?: number;
514
- }): Promise<ViewSpansResult>;
515
- searchTrace(opts: {
516
- trace_id: string;
517
- regex_pattern: string;
518
- max_matches?: number;
519
- }): Promise<SearchTraceResult>;
520
- searchSpan(opts: {
521
- trace_id: string;
522
- span_id: string;
523
- regex_pattern: string;
524
- max_matches?: number;
525
- }): Promise<SearchSpanResult>;
526
- /** Force the index to materialise. Useful to amortise startup cost
527
- * before the first agent call. */
528
- ensureIndexed(): Promise<void>;
529
- private buffer;
530
- /** Stat-then-read so an oversized file fails loud BEFORE we allocate a
531
- * multi-hundred-MB Buffer and OOM the process. A missing file surfaces
532
- * as TraceFileMissingError; any other stat/read error propagates. */
533
- private readGuarded;
534
- private index;
535
- private buildIndex;
536
- private matchedTraces;
537
- private toSummary;
538
- private projectSpan;
539
- private buildOversizedSummary;
540
- private scanSpanForMatches;
541
- }
542
- declare class TraceFileMissingError extends NotFoundError {
543
- constructor(path: string);
544
- }
545
- declare class TraceNotFoundError extends NotFoundError {
546
- readonly trace_id: string;
547
- constructor(trace_id: string);
548
- }
549
- declare class SpanNotFoundError extends NotFoundError {
550
- readonly trace_id: string;
551
- readonly span_id: string;
552
- constructor(trace_id: string, span_id: string);
553
- }
554
-
555
- /**
556
- * Trace-analyst tool surface — six namespaced AxFunctions the analyst
557
- * agent calls from generated JS code via `traces.<name>(...)`.
558
- *
559
- * Discovery → narrow → deep-read protocol. Tool names + ordering
560
- * support RLM discovery:
561
- *
562
- * 1. `getDatasetOverview` (cheap) — first call, sizes the dataset
563
- * 2. `queryTraces` — paginated summaries with `raw_jsonl_bytes`
564
- * 3. `countTraces` — cheap pre-flight before regex
565
- * 4. `viewTrace` — full span list, oversized → summary
566
- * 5. `viewSpans` — surgical 16KB-cap reads
567
- * 6. `searchTrace` / `searchSpan` — bounded regex hits
568
- *
569
- * Failure mode. Tool handlers throw on bad input (invalid trace ids,
570
- * out-of-range pagination, malformed regex). Ax converts thrown errors
571
- * into actor-visible `[ERROR]` strings so the analyst can adjust on
572
- * the next turn instead of looping.
573
- */
574
-
575
- interface BuildTraceAnalystToolsOpts {
576
- store: TraceAnalysisStore;
577
- /** Override the default sample-trace-id slot count (20). Mostly for tests. */
578
- sampleTraceLimit?: number;
579
- }
580
- /**
581
- * Build the trace-analyst function set. Pass the result into
582
- * `agent(...).functions.local`.
583
- */
584
- declare function buildTraceAnalystTools(opts: BuildTraceAnalystToolsOpts): AxFunction[];
585
- /**
586
- * Convenience: same shape as `buildTraceAnalystTools` but returns the
587
- * grouped form expected when registering trace tools alongside other
588
- * agent function modules. */
589
- declare function traceAnalystFunctionGroup(opts: BuildTraceAnalystToolsOpts): {
590
- namespace: string;
591
- title: string;
592
- selectionCriteria: string;
593
- description: string;
594
- functions: AxFunction[];
595
- };
596
-
597
- /**
598
- * Token-usage extraction from chat-completions responses and SSE streams.
599
- *
600
- * `captureFetchToRawSink` records the raw provider triple but deliberately does
601
- * not interpret token usage — cost is a per-consumer axis. Three consumers each
602
- * re-implement the same `usage` parser on top of the captured response (the
603
- * OpenAI `prompt_tokens`/`completion_tokens` shape, the Anthropic
604
- * `input_tokens`/`output_tokens` shape, and the camelCase variants), plus an
605
- * SSE accumulator that sums the per-chunk `usage` deltas. This is the one
606
- * canonical version.
607
- *
608
- * Both functions return `null` (not a silent `{ input: 0, output: 0 }`) when no
609
- * usage is present, so a caller can tell "no usage reported" from "zero tokens".
610
- */
611
- interface ExtractedUsage {
612
- input: number;
613
- output: number;
614
- /** Cached prompt tokens, when the provider reports them. */
615
- cached?: number;
616
- }
617
- /**
618
- * Pull `{ input, output, cached? }` from a parsed chat-completions response
619
- * body. Accepts a top-level `usage` object (the common case) or a body that IS
620
- * the usage object. Returns null when neither an input nor an output count is
621
- * present — callers must inspect for null rather than treat it as zero cost.
622
- */
623
- declare function extractUsage(body: unknown): ExtractedUsage | null;
624
- /**
625
- * Sum token usage across an SSE response body. Each `data:` line is parsed and
626
- * fed to `extractUsage`; the per-chunk counts are accumulated. The `[DONE]`
627
- * sentinel and non-JSON lines are skipped. Returns null when no chunk carried
628
- * usage — distinguishing a usage-less stream from a genuine zero.
629
- *
630
- * Providers report SSE usage in two ways: a single terminal chunk with the full
631
- * totals, or incremental per-chunk deltas. Summing is correct for the delta
632
- * case and harmless for the terminal case (one non-null chunk ⇒ the total).
633
- */
634
- declare function extractUsageFromSse(text: string): ExtractedUsage | null;
635
- /**
636
- * Extract usage from an HTTP `Response` without consuming the caller's body:
637
- * clones, reads the text, and tries the JSON parser first, then the SSE
638
- * accumulator. Best-effort — returns null on any read/parse miss so a usage tee
639
- * never takes down the underlying call.
640
- */
641
- declare function extractUsageFromResponse(response: Response): Promise<ExtractedUsage | null>;
642
-
643
- /**
644
- * `captureFetchToRawSink` — wrap a `fetch` so every request / response / error
645
- * against a provider is recorded into a `RawProviderSink` as the canonical
646
- * `RawProviderEvent` triple. The one substrate copy of the fetch-capture
647
- * pattern four consumers hand-roll (legal ships two copies).
648
- *
649
- * The returned value is a plain `typeof fetch` — pass it as the `fetchImpl` to
650
- * any OpenAI-compatible backend factory. Capture is best-effort by default: a
651
- * sink write that throws does NOT take down the underlying LLM call (set
652
- * `failClosed` to change that). Uses the existing `defaultProviderRedactor` +
653
- * `providerFromBaseUrl` — no new redaction policy.
654
- */
655
-
656
- interface CaptureFetchContext {
657
- /** Logical run id stamped on every captured event. Required — without it
658
- * the raw events can't be paired with their parent `Run`. */
659
- runId: string;
660
- /** Optional logical span id (enables span-level sink filtering). */
661
- spanId?: string;
662
- /** Resolved base URL (normalised, no trailing slash). Used for the event's
663
- * `baseUrl` and for endpoint-path extraction. */
664
- baseUrl: string;
665
- /** Model id the caller intends to invoke. Stamped on every event. */
666
- model: string;
667
- /** Provider override. When omitted, `providerFromBaseUrl(baseUrl)`. */
668
- provider?: string;
669
- }
670
- interface CaptureFetchOptions {
671
- /** Override the capture-time redactor. Default `defaultProviderRedactor`. */
672
- redactor?: ProviderRedactor;
673
- /** Cap on captured response-body bytes; beyond it the body is truncated and
674
- * `body_truncated` is added to `redactedFields`. Default 2 MiB. */
675
- responseBodyByteCap?: number;
676
- /** When true, a sink-write failure propagates to the caller. Default false
677
- * — capture is best-effort so a sink failure never kills the LLM call. */
678
- failClosed?: boolean;
679
- /**
680
- * Invoked with the token usage parsed off each successful response (JSON or
681
- * SSE), keyed by the captured context. Lets a caller fold usage → cost without
682
- * re-cloning the response themselves. Not called when the response carries no
683
- * usage. Best-effort: a throw here is swallowed (it never kills the LLM call)
684
- * unless `failClosed` is set.
685
- */
686
- onUsage?: (usage: ExtractedUsage, ctx: CaptureFetchContext) => void;
687
- }
688
- declare function captureFetchToRawSink(fetch: typeof globalThis.fetch, sink: RawProviderSink, ctx: CaptureFetchContext, opts?: CaptureFetchOptions): typeof globalThis.fetch;
689
-
690
- /**
691
- * OTEL span exporter — streams spans to an OTLP/HTTP collector.
692
- *
693
- * Reads OTEL_EXPORTER_OTLP_ENDPOINT + OTEL_EXPORTER_OTLP_HEADERS from env
694
- * when no explicit config is given. Batches spans and flushes periodically
695
- * or when the batch fills. No @opentelemetry SDK dependency — minimal
696
- * OTLP/JSON serializer (~120 LOC) using the existing otel.ts helpers.
697
- */
698
- interface OtelExportConfig {
699
- /** OTLP endpoint. Reads OTEL_EXPORTER_OTLP_ENDPOINT env by default. */
700
- endpoint?: string;
701
- /** OTLP headers. Reads OTEL_EXPORTER_OTLP_HEADERS env by default. */
702
- headers?: Record<string, string>;
703
- /** Batch size before flush. Default 64. */
704
- batchSize?: number;
705
- /** Flush interval ms. Default 5000. */
706
- flushIntervalMs?: number;
707
- /** Resource attributes stamped on every export. */
708
- resourceAttributes?: Record<string, string | number | boolean>;
709
- /** Service name. Default 'agent-eval'. */
710
- serviceName?: string;
711
- }
712
- interface OtelExporter {
713
- /** Called by the TraceEmitter on every span close. */
714
- exportSpan(span: ExportableSpan): void;
715
- /** Force flush pending spans. */
716
- flush(): Promise<void>;
717
- /** Shutdown cleanly — flushes remaining spans and stops the timer. */
718
- shutdown(): Promise<void>;
719
- }
720
- interface ExportableSpan {
721
- traceId: string;
722
- spanId: string;
723
- parentSpanId?: string;
724
- name: string;
725
- kind: string;
726
- startedAt: number;
727
- endedAt?: number;
728
- status?: string;
729
- error?: string;
730
- model?: string;
731
- inputTokens?: number;
732
- outputTokens?: number;
733
- costUsd?: number;
734
- attributes?: Record<string, unknown>;
735
- }
736
- /**
737
- * Create an OTEL exporter. Returns undefined when no endpoint is configured
738
- * (neither via config nor env) — callers should check before attaching.
739
- */
740
- declare function createOtelExporter(config?: OtelExportConfig): OtelExporter | undefined;
741
-
742
- /**
743
- * OTEL bridge — connects TraceEmitter span lifecycle to the OtelExporter.
744
- *
745
- * When an OtelExporter is active, every span that closes through the
746
- * TraceEmitter is also pushed to the exporter for real-time streaming to
747
- * the user's OTEL collector.
748
- *
749
- * The bridge is opt-in: attach via `otelRunCompleteHook(exporter)` as a
750
- * RunCompleteHook, or wrap the store with `createOtelTracingStore` for
751
- * real-time per-span export.
752
- */
753
-
754
- /**
755
- * Create a RunCompleteHook that exports all spans from the completed run
756
- * to the OTEL exporter, then flushes.
757
- */
758
- declare function otelRunCompleteHook(exporter: OtelExporter): RunCompleteHook;
759
- /**
760
- * Create an auto-exporting TraceStore wrapper that intercepts updateSpan
761
- * calls. When a span gets an endedAt, it's exported immediately. This
762
- * gives real-time streaming instead of batch-at-end.
763
- *
764
- * This is the preferred integration path: wrap the store before
765
- * constructing the TraceEmitter.
766
- */
767
- declare function createOtelTracingStore(inner: TraceStore, exporter: OtelExporter, traceId: string): TraceStore;
768
-
769
- /**
770
- * Convert agent-eval's internal trace shape (`FileSystemTraceStore` → `Run`,
771
- * `Span`, `TraceEvent`) into the OTLP-flat JSONL the trace analyst
772
- * (`analyzeTraces` + `OtlpFileTraceStore`) reads.
773
- *
774
- * Eval harnesses shard a `FileSystemTraceStore` per cell (persona / variant)
775
- * under a run directory. The analyst consumes a single OTLP-NDJSON file keyed
776
- * on `trace_id` + `span_id` with `start_time`/`end_time` in ISO-8601 and
777
- * resource + `attributes` rolled up per-span. This module walks every shard,
778
- * projects each `Span` (plus events pinned to it) into the flat OTLP shape,
779
- * and emits one NDJSON file.
780
- *
781
- * Generic OTLP/OpenInference fields are always emitted (`service.name`,
782
- * `agent.name`, `run.id`/`run.status`, `openinference.span.kind`,
783
- * `llm.model_name`, …). Domain attributes (`legal.*`, `tax.*`, …) are injected
784
- * per-run via {@link TraceStoreToOtlpOptions.resourceAttributes} /
785
- * {@link TraceStoreToOtlpOptions.runAttributes} so consumers don't re-roll the
786
- * walker.
787
- */
788
-
789
- interface TracesToOtlpResult {
790
- /** Total spans emitted across every cell. */
791
- spanCount: number;
792
- /** Total run-anchor spans (one per Run) appended for analyst visibility. */
793
- runCount: number;
794
- /** Cells whose shards parsed cleanly. */
795
- cellCount: number;
796
- /** Cells that errored mid-conversion — surfaced so a partial conversion
797
- * isn't silently masked. */
798
- cellErrorCount: number;
799
- }
800
- /**
801
- * A trace source the analyst should ingest. Two layouts are supported:
802
- *
803
- * - `celled` (default): the root holds one cell subdirectory per
804
- * persona/variant, each a `FileSystemTraceStore` (`runs.ndjson`,
805
- * `spans.ndjson`, `events.ndjson`).
806
- * - `flat`: the root is itself a single `FileSystemTraceStore` (e.g. a
807
- * production-ingestion sidecar that appends one ndjson set directly under
808
- * the chosen directory).
809
- */
810
- interface TraceStoreSource {
811
- /** Absolute path to the trace store root. */
812
- root: string;
813
- /** Layout — `celled` (default) or `flat`. */
814
- layout?: 'celled' | 'flat';
815
- /** OTLP `service.name` for this source. Overrides the options default. */
816
- serviceName?: string;
817
- }
818
- /** Domain hooks. The walker is generic; consumers inject the namespaced
819
- * attributes that ride along on every run + span for analyst discovery. */
820
- interface TraceStoreToOtlpOptions {
821
- /** Default OTLP `service.name` when a source doesn't set its own.
822
- * Default `agent-eval`. */
823
- serviceName?: string;
824
- /** Extra resource attributes per run, e.g.
825
- * `(run) => ({ 'legal.persona_id': run.tags?.personaId ?? '' })`. */
826
- resourceAttributes?: (run: Run) => Record<string, unknown>;
827
- /** Extra attributes on the per-run anchor span, e.g. domain outcome fields. */
828
- runAttributes?: (run: Run) => Record<string, unknown>;
829
- }
830
- /**
831
- * Read every per-cell shard under each source root and write a flat OTLP-JSONL
832
- * view of the corpus to `outPath`. Each cell directory is a
833
- * `FileSystemTraceStore` — NDJSON append-only with size-based rotation;
834
- * `updateRun`/`updateSpan` append `{ id, ...patch, _update: true }` rows
835
- * rather than rewriting, so readers must merge those patches in (done here).
836
- *
837
- * A `string` source is treated as a celled root.
838
- */
839
- declare function convertTraceStoresToOtlp(source: string | TraceStoreSource | readonly TraceStoreSource[], outPath: string, opts?: TraceStoreToOtlpOptions): TracesToOtlpResult;
840
-
841
- /**
842
- * Replay-from-raw-events — turn every captured campaign run into a
843
- * re-runnable artifact.
844
- *
845
- * `RawProviderSink` captures every provider HTTP envelope; `runEvalCampaign`
846
- * makes that capture the default. Together they make every past run a
847
- * complete fingerprint of what happened on the wire — enough to replay
848
- * the run without burning new LLM cost.
849
- *
850
- * Three use cases this primitive enables:
851
- *
852
- * 1. **Post-hoc judging** — apply a new judge / rubric / scoring callback
853
- * to last week's runs without re-calling any LLM. The cost of trying
854
- * a new rubric drops from "another full sweep" to a CPU-bound replay.
855
- * 2. **Determinism audits** — replay the same campaign and verify the
856
- * raw responses match byte-for-byte. Any drift is a non-determinism
857
- * bug (in the harness, the prompt builder, the sandbox, …).
858
- * 3. **Free judge calibration** — run two judges on identical responses
859
- * and measure inter-judge agreement without doubling LLM spend.
860
- *
861
- * The interface is deliberately fetch-shaped. Inject `createReplayFetch`
862
- * into `LlmClientOptions.fetch` and every `callLlm` transparently reads
863
- * from the cache instead of calling the network. No new code path through
864
- * the LLM client is needed; the cache hit is invisible to the runner.
865
- */
866
-
867
- declare class ReplayCacheMissError extends ReplayError {
868
- readonly url: string;
869
- readonly requestKey: string;
870
- constructor(url: string, requestKey: string, message?: string);
871
- }
872
- interface ReplayCacheEntry {
873
- request: RawProviderEvent;
874
- response: RawProviderEvent;
875
- }
876
- interface ReplayCacheStats {
877
- total: number;
878
- byProvider: Record<string, number>;
879
- byModel: Record<string, number>;
880
- /** Spans for which we have a request but no response (run aborted mid-call). */
881
- orphanRequests: number;
882
- }
883
- /**
884
- * In-memory deterministic cache of (request → response) keyed on a stable
885
- * hash of the request body. Built from a `RawProviderSink` containing
886
- * paired `request` and `response` events from a previous run.
887
- *
888
- * The cache is the source of truth for replay; `createReplayFetch` is a
889
- * thin wrapper that reads from it.
890
- */
891
- declare class ReplayCache {
892
- private byKey;
893
- private orphans;
894
- private byProvider;
895
- private byModel;
896
- /**
897
- * Build a cache from a sink's events. The sink must implement `list()`.
898
- * Filter by `runId` / `spanId` to scope to a specific replay.
899
- */
900
- static fromSink(sink: RawProviderSink, filter?: {
901
- runId?: string;
902
- spanId?: string;
903
- }): Promise<ReplayCache>;
904
- /** Build a cache from an in-memory event list. */
905
- static fromEvents(events: RawProviderEvent[]): Promise<ReplayCache>;
906
- /** Number of cacheable (request, response) pairs in the cache. */
907
- size(): number;
908
- stats(): ReplayCacheStats;
909
- /** Iterate every cached `(request, response)` pair in insertion order. */
910
- entries(): IterableIterator<ReplayCacheEntry>;
911
- /**
912
- * Look up a cached response by hashing the (model, messages, temperature,
913
- * maxTokens, response_format) shape. Returns `undefined` on miss; the
914
- * caller decides whether to throw, fall back to the network, or skip.
915
- */
916
- lookup(requestBody: unknown): Promise<ReplayCacheEntry | undefined>;
917
- }
918
- interface ReplayFetchOptions {
919
- /**
920
- * Behaviour on cache miss. Default `'throw'`. `'fallback'` calls the
921
- * `fallbackFetch` (typically `globalThis.fetch`) so a partial replay can
922
- * still complete; `'fail-closed'` returns a synthetic 599 response so the
923
- * call site sees a non-retriable failure.
924
- */
925
- onMiss?: 'throw' | 'fallback' | 'fail-closed';
926
- fallbackFetch?: typeof fetch;
927
- /** Optional callback fired once per replayed call (for telemetry / counters). */
928
- onHit?: (info: {
929
- url: string;
930
- provider: string;
931
- model: string;
932
- }) => void;
933
- /** Optional callback fired on cache miss before the `onMiss` policy applies. */
934
- onMissNotify?: (info: {
935
- url: string;
936
- requestBody: unknown;
937
- }) => void;
938
- }
939
- /**
940
- * Build a `fetch`-shaped function that serves cached responses out of a
941
- * `ReplayCache` for any URL ending in `/chat/completions`. Pass through
942
- * `LlmClientOptions.fetch` and `callLlm` becomes free.
943
- *
944
- * Non-`/chat/completions` URLs are passed straight to the fallback fetch
945
- * (default: `globalThis.fetch`). This matters because non-LLM HTTP work
946
- * (judge HTTP servers, sandbox callbacks) sometimes flows through the same
947
- * `fetch` and shouldn't be intercepted.
948
- */
949
- declare function createReplayFetch(cache: ReplayCache, opts?: ReplayFetchOptions): typeof fetch;
950
- /**
951
- * Convenience iterator over `(request, response)` pairs in a sink — for
952
- * post-hoc scoring that doesn't need a `fetch` shim. The judge or scorer
953
- * runs purely in-process over cached LLM outputs.
954
- */
955
- declare function iterateRawCalls(sink: RawProviderSink, filter?: {
956
- runId?: string;
957
- spanId?: string;
958
- }): AsyncGenerator<ReplayCacheEntry>;
959
-
960
- export { AnalyzeTracesOptions, AnalyzeTracesResult, type CaptureFetchContext, type CaptureFetchOptions, DatasetOverview, type ExportableSpan, type ExtractedUsage, type FlattenOtlpOptions, 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, SearchSpanResult, SearchTraceResult, SpanNotFoundError, 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 };
1
+ export * from './replay';
2
+ export * from './trace';
3
+ export * from './trace-analyst';
4
+ //# sourceMappingURL=traces.d.ts.map