@opensearch-project/agent-health 0.5.2 → 0.7.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 (230) hide show
  1. package/README.md +1 -0
  2. package/cli/dist/index.js +2325 -961
  3. package/dist/assets/index-D-Np_l_T.js +246 -0
  4. package/dist/assets/index-vZt9QZKf.css +1 -0
  5. package/dist/index.html +2 -2
  6. package/docs/CLI.md +183 -3
  7. package/docs/CONFIGURATION.md +1 -1
  8. package/docs/CONNECTORS.md +1 -1
  9. package/docs/INSTRUMENT_WITH_OTEL.md +7 -0
  10. package/docs/SDK.md +178 -5
  11. package/docs/STORAGE_INDEX_FIELD_LIMITS.md +216 -0
  12. package/docs/skills/AGENT_HEALTH.md +55 -1
  13. package/docs/skills/add-connector/SKILL.md +5 -1
  14. package/examples/eval-files/demo.eval.js +1 -1
  15. package/examples/eval-files/ops-rca-classification.eval.js +71 -0
  16. package/examples/eval-files/ops-rca-evaluator.json +15 -0
  17. package/examples/eval-files/sdk-demo.eval.js +72 -0
  18. package/examples/eval-files/sdk-describe-demo.eval.js +50 -0
  19. package/examples/eval-files/sdk-hooks-demo.eval.js +1 -1
  20. package/lib/dist/lib/agentTrends.d.ts +210 -0
  21. package/lib/dist/lib/agentTrends.d.ts.map +1 -0
  22. package/lib/dist/lib/agentTrends.js +360 -0
  23. package/lib/dist/lib/agentTrends.js.map +1 -0
  24. package/lib/dist/lib/bedrockCompat.d.ts +27 -0
  25. package/lib/dist/lib/bedrockCompat.d.ts.map +1 -0
  26. package/lib/dist/lib/bedrockCompat.js +83 -0
  27. package/lib/dist/lib/bedrockCompat.js.map +1 -0
  28. package/lib/dist/lib/benchmarkCaseReview.d.ts +114 -0
  29. package/lib/dist/lib/benchmarkCaseReview.d.ts.map +1 -0
  30. package/lib/dist/lib/benchmarkCaseReview.js +177 -0
  31. package/lib/dist/lib/benchmarkCaseReview.js.map +1 -0
  32. package/lib/dist/lib/benchmarkImage.d.ts +52 -0
  33. package/lib/dist/lib/benchmarkImage.d.ts.map +1 -0
  34. package/lib/dist/lib/benchmarkImage.js +113 -0
  35. package/lib/dist/lib/benchmarkImage.js.map +1 -0
  36. package/lib/dist/lib/benchmarkRunsTable.d.ts +109 -0
  37. package/lib/dist/lib/benchmarkRunsTable.d.ts.map +1 -0
  38. package/lib/dist/lib/benchmarkRunsTable.js +212 -0
  39. package/lib/dist/lib/benchmarkRunsTable.js.map +1 -0
  40. package/lib/dist/lib/benchmarkVersionUtils.d.ts +13 -0
  41. package/lib/dist/lib/benchmarkVersionUtils.d.ts.map +1 -1
  42. package/lib/dist/lib/benchmarkVersionUtils.js +21 -0
  43. package/lib/dist/lib/benchmarkVersionUtils.js.map +1 -1
  44. package/lib/dist/lib/chunkedFetch.d.ts +18 -0
  45. package/lib/dist/lib/chunkedFetch.d.ts.map +1 -0
  46. package/lib/dist/lib/chunkedFetch.js +40 -0
  47. package/lib/dist/lib/chunkedFetch.js.map +1 -0
  48. package/lib/dist/lib/comparisonInsights.d.ts +151 -0
  49. package/lib/dist/lib/comparisonInsights.d.ts.map +1 -0
  50. package/lib/dist/lib/comparisonInsights.js +270 -0
  51. package/lib/dist/lib/comparisonInsights.js.map +1 -0
  52. package/lib/dist/lib/config/loader.d.ts.map +1 -1
  53. package/lib/dist/lib/config/loader.js +16 -1
  54. package/lib/dist/lib/config/loader.js.map +1 -1
  55. package/lib/dist/lib/config/types.d.ts +14 -0
  56. package/lib/dist/lib/config/types.d.ts.map +1 -1
  57. package/lib/dist/lib/constants.d.ts +11 -0
  58. package/lib/dist/lib/constants.d.ts.map +1 -1
  59. package/lib/dist/lib/constants.js +10 -1
  60. package/lib/dist/lib/constants.js.map +1 -1
  61. package/lib/dist/lib/contextFormat.d.ts +26 -0
  62. package/lib/dist/lib/contextFormat.d.ts.map +1 -0
  63. package/lib/dist/lib/contextFormat.js +28 -0
  64. package/lib/dist/lib/contextFormat.js.map +1 -0
  65. package/lib/dist/lib/dashboardMetrics.d.ts +11 -2
  66. package/lib/dist/lib/dashboardMetrics.d.ts.map +1 -1
  67. package/lib/dist/lib/dashboardMetrics.js +38 -3
  68. package/lib/dist/lib/dashboardMetrics.js.map +1 -1
  69. package/lib/dist/lib/envCompat.d.ts.map +1 -1
  70. package/lib/dist/lib/envCompat.js +14 -5
  71. package/lib/dist/lib/envCompat.js.map +1 -1
  72. package/lib/dist/lib/evaluationRerun.d.ts +102 -0
  73. package/lib/dist/lib/evaluationRerun.d.ts.map +1 -0
  74. package/lib/dist/lib/evaluationRerun.js +134 -0
  75. package/lib/dist/lib/evaluationRerun.js.map +1 -0
  76. package/lib/dist/lib/judgeFailureSummary.d.ts +66 -0
  77. package/lib/dist/lib/judgeFailureSummary.d.ts.map +1 -0
  78. package/lib/dist/lib/judgeFailureSummary.js +68 -0
  79. package/lib/dist/lib/judgeFailureSummary.js.map +1 -0
  80. package/lib/dist/lib/judgeStrategies.d.ts +108 -0
  81. package/lib/dist/lib/judgeStrategies.d.ts.map +1 -0
  82. package/lib/dist/lib/judgeStrategies.js +135 -0
  83. package/lib/dist/lib/judgeStrategies.js.map +1 -0
  84. package/lib/dist/lib/matchers/expect.d.ts +21 -1
  85. package/lib/dist/lib/matchers/expect.d.ts.map +1 -1
  86. package/lib/dist/lib/matchers/expect.js +51 -0
  87. package/lib/dist/lib/matchers/expect.js.map +1 -1
  88. package/lib/dist/lib/matchers/judgeAccessor.d.ts +4 -0
  89. package/lib/dist/lib/matchers/judgeAccessor.d.ts.map +1 -1
  90. package/lib/dist/lib/matchers/judgeAccessor.js +13 -2
  91. package/lib/dist/lib/matchers/judgeAccessor.js.map +1 -1
  92. package/lib/dist/lib/matchers/judgeReasoningParse.d.ts +49 -0
  93. package/lib/dist/lib/matchers/judgeReasoningParse.d.ts.map +1 -0
  94. package/lib/dist/lib/matchers/judgeReasoningParse.js +128 -0
  95. package/lib/dist/lib/matchers/judgeReasoningParse.js.map +1 -0
  96. package/lib/dist/lib/matchers/traces.d.ts +17 -2
  97. package/lib/dist/lib/matchers/traces.d.ts.map +1 -1
  98. package/lib/dist/lib/matchers/traces.js +136 -16
  99. package/lib/dist/lib/matchers/traces.js.map +1 -1
  100. package/lib/dist/lib/matchers/tracesPricing.d.ts +38 -0
  101. package/lib/dist/lib/matchers/tracesPricing.d.ts.map +1 -0
  102. package/lib/dist/lib/matchers/tracesPricing.js +64 -0
  103. package/lib/dist/lib/matchers/tracesPricing.js.map +1 -0
  104. package/lib/dist/lib/matchers/types.d.ts +25 -0
  105. package/lib/dist/lib/matchers/types.d.ts.map +1 -1
  106. package/lib/dist/lib/resolveCanonicalRun.d.ts +23 -0
  107. package/lib/dist/lib/resolveCanonicalRun.d.ts.map +1 -0
  108. package/lib/dist/lib/resolveCanonicalRun.js +26 -0
  109. package/lib/dist/lib/resolveCanonicalRun.js.map +1 -0
  110. package/lib/dist/lib/runActions.d.ts +120 -0
  111. package/lib/dist/lib/runActions.d.ts.map +1 -0
  112. package/lib/dist/lib/runActions.js +130 -0
  113. package/lib/dist/lib/runActions.js.map +1 -0
  114. package/lib/dist/lib/runInsights.d.ts +86 -0
  115. package/lib/dist/lib/runInsights.d.ts.map +1 -0
  116. package/lib/dist/lib/runInsights.js +185 -0
  117. package/lib/dist/lib/runInsights.js.map +1 -0
  118. package/lib/dist/lib/runName.d.ts +29 -0
  119. package/lib/dist/lib/runName.d.ts.map +1 -0
  120. package/lib/dist/lib/runName.js +38 -0
  121. package/lib/dist/lib/runName.js.map +1 -0
  122. package/lib/dist/lib/runReportPath.d.ts +16 -0
  123. package/lib/dist/lib/runReportPath.d.ts.map +1 -0
  124. package/lib/dist/lib/runReportPath.js +22 -0
  125. package/lib/dist/lib/runReportPath.js.map +1 -0
  126. package/lib/dist/lib/runSort.d.ts +27 -0
  127. package/lib/dist/lib/runSort.d.ts.map +1 -0
  128. package/lib/dist/lib/runSort.js +31 -0
  129. package/lib/dist/lib/runSort.js.map +1 -0
  130. package/lib/dist/lib/runStats.d.ts +109 -5
  131. package/lib/dist/lib/runStats.d.ts.map +1 -1
  132. package/lib/dist/lib/runStats.js +193 -10
  133. package/lib/dist/lib/runStats.js.map +1 -1
  134. package/lib/dist/lib/testCases/define.d.ts.map +1 -1
  135. package/lib/dist/lib/testCases/define.js +93 -46
  136. package/lib/dist/lib/testCases/define.js.map +1 -1
  137. package/lib/dist/lib/testCases/judge.d.ts.map +1 -1
  138. package/lib/dist/lib/testCases/judge.js +22 -4
  139. package/lib/dist/lib/testCases/judge.js.map +1 -1
  140. package/lib/dist/lib/testCases/loader.d.ts +35 -1
  141. package/lib/dist/lib/testCases/loader.d.ts.map +1 -1
  142. package/lib/dist/lib/testCases/loader.js +278 -31
  143. package/lib/dist/lib/testCases/loader.js.map +1 -1
  144. package/lib/dist/lib/trajectoryStepDisplay.d.ts +25 -0
  145. package/lib/dist/lib/trajectoryStepDisplay.d.ts.map +1 -0
  146. package/lib/dist/lib/trajectoryStepDisplay.js +42 -0
  147. package/lib/dist/lib/trajectoryStepDisplay.js.map +1 -0
  148. package/lib/dist/lib/utils.d.ts +34 -0
  149. package/lib/dist/lib/utils.d.ts.map +1 -1
  150. package/lib/dist/lib/utils.js +49 -0
  151. package/lib/dist/lib/utils.js.map +1 -1
  152. package/lib/dist/services/connectors/claude-code/ClaudeCodeConnector.d.ts +68 -22
  153. package/lib/dist/services/connectors/claude-code/ClaudeCodeConnector.d.ts.map +1 -1
  154. package/lib/dist/services/connectors/claude-code/ClaudeCodeConnector.js +148 -111
  155. package/lib/dist/services/connectors/claude-code/ClaudeCodeConnector.js.map +1 -1
  156. package/lib/dist/services/connectors/kiro/KiroConnector.d.ts +21 -13
  157. package/lib/dist/services/connectors/kiro/KiroConnector.d.ts.map +1 -1
  158. package/lib/dist/services/connectors/kiro/KiroConnector.js +22 -25
  159. package/lib/dist/services/connectors/kiro/KiroConnector.js.map +1 -1
  160. package/lib/dist/services/connectors/pi/PiConnector.d.ts +49 -10
  161. package/lib/dist/services/connectors/pi/PiConnector.d.ts.map +1 -1
  162. package/lib/dist/services/connectors/pi/PiConnector.js +102 -86
  163. package/lib/dist/services/connectors/pi/PiConnector.js.map +1 -1
  164. package/lib/dist/services/connectors/subprocess/SubprocessConnector.d.ts +59 -14
  165. package/lib/dist/services/connectors/subprocess/SubprocessConnector.d.ts.map +1 -1
  166. package/lib/dist/services/connectors/subprocess/SubprocessConnector.js +95 -61
  167. package/lib/dist/services/connectors/subprocess/SubprocessConnector.js.map +1 -1
  168. package/lib/dist/services/evaluation/bedrockJudge.d.ts +18 -0
  169. package/lib/dist/services/evaluation/bedrockJudge.d.ts.map +1 -1
  170. package/lib/dist/services/evaluation/bedrockJudge.js +4 -0
  171. package/lib/dist/services/evaluation/bedrockJudge.js.map +1 -1
  172. package/lib/dist/services/evaluation/index.d.ts +18 -1
  173. package/lib/dist/services/evaluation/index.d.ts.map +1 -1
  174. package/lib/dist/services/evaluation/index.js +156 -19
  175. package/lib/dist/services/evaluation/index.js.map +1 -1
  176. package/lib/dist/services/metrics.d.ts +55 -0
  177. package/lib/dist/services/metrics.d.ts.map +1 -0
  178. package/lib/dist/services/metrics.js +89 -0
  179. package/lib/dist/services/metrics.js.map +1 -0
  180. package/lib/dist/services/storage/asyncBenchmarkStorage.d.ts +1 -1
  181. package/lib/dist/services/storage/asyncBenchmarkStorage.d.ts.map +1 -1
  182. package/lib/dist/services/storage/asyncBenchmarkStorage.js +30 -3
  183. package/lib/dist/services/storage/asyncBenchmarkStorage.js.map +1 -1
  184. package/lib/dist/services/storage/asyncRunStorage.d.ts +20 -1
  185. package/lib/dist/services/storage/asyncRunStorage.d.ts.map +1 -1
  186. package/lib/dist/services/storage/asyncRunStorage.js +125 -2
  187. package/lib/dist/services/storage/asyncRunStorage.js.map +1 -1
  188. package/lib/dist/services/storage/asyncTestCaseStorage.d.ts +18 -4
  189. package/lib/dist/services/storage/asyncTestCaseStorage.d.ts.map +1 -1
  190. package/lib/dist/services/storage/asyncTestCaseStorage.js +21 -4
  191. package/lib/dist/services/storage/asyncTestCaseStorage.js.map +1 -1
  192. package/lib/dist/services/storage/opensearchClient.d.ts +47 -12
  193. package/lib/dist/services/storage/opensearchClient.d.ts.map +1 -1
  194. package/lib/dist/services/storage/opensearchClient.js +12 -5
  195. package/lib/dist/services/storage/opensearchClient.js.map +1 -1
  196. package/lib/dist/services/traces/browserRecovery.d.ts +12 -1
  197. package/lib/dist/services/traces/browserRecovery.d.ts.map +1 -1
  198. package/lib/dist/services/traces/browserRecovery.js +35 -5
  199. package/lib/dist/services/traces/browserRecovery.js.map +1 -1
  200. package/lib/dist/services/traces/index.d.ts +8 -1
  201. package/lib/dist/services/traces/index.d.ts.map +1 -1
  202. package/lib/dist/services/traces/index.js +33 -12
  203. package/lib/dist/services/traces/index.js.map +1 -1
  204. package/lib/dist/services/traces/judgeAgentsHints.d.ts +98 -3
  205. package/lib/dist/services/traces/judgeAgentsHints.d.ts.map +1 -1
  206. package/lib/dist/services/traces/judgeAgentsHints.js +144 -3
  207. package/lib/dist/services/traces/judgeAgentsHints.js.map +1 -1
  208. package/lib/dist/services/traces/messageExtraction.d.ts.map +1 -1
  209. package/lib/dist/services/traces/messageExtraction.js +95 -33
  210. package/lib/dist/services/traces/messageExtraction.js.map +1 -1
  211. package/lib/dist/services/traces/spansToTrajectory.d.ts.map +1 -1
  212. package/lib/dist/services/traces/spansToTrajectory.js +51 -13
  213. package/lib/dist/services/traces/spansToTrajectory.js.map +1 -1
  214. package/lib/dist/services/traces/tracePoller.d.ts +27 -3
  215. package/lib/dist/services/traces/tracePoller.d.ts.map +1 -1
  216. package/lib/dist/services/traces/tracePoller.js +196 -33
  217. package/lib/dist/services/traces/tracePoller.js.map +1 -1
  218. package/lib/dist/services/traces/trajectoryMerge.d.ts +79 -0
  219. package/lib/dist/services/traces/trajectoryMerge.d.ts.map +1 -0
  220. package/lib/dist/services/traces/trajectoryMerge.js +109 -0
  221. package/lib/dist/services/traces/trajectoryMerge.js.map +1 -0
  222. package/lib/dist/types/index.d.ts +250 -3
  223. package/lib/dist/types/index.d.ts.map +1 -1
  224. package/lib/dist/types/index.js +24 -0
  225. package/lib/dist/types/index.js.map +1 -1
  226. package/package.json +8 -5
  227. package/server/dist/app.js +5490 -1557
  228. package/server/dist/index.js +5490 -1557
  229. package/dist/assets/index-CCQRDlO0.js +0 -243
  230. package/dist/assets/index-CNHQVbcj.css +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"tracePoller.js","sourceRoot":"","sources":["../../../../services/traces/tracePoller.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAUH,OAAO,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AACpC,OAAO,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAC;AAC9C,OAAO,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAC7D,OAAO,EAAE,0BAA0B,EAAE,MAAM,aAAa,CAAC;AACzD,OAAO,EAAE,wBAAwB,EAAE,MAAM,sCAAsC,CAAC;AAEhF,uEAAuE;AACvE,sEAAsE;AACtE,kEAAkE;AAClE,EAAE;AACF,4EAA4E;AAC5E,2EAA2E;AAC3E,oEAAoE;AACpE,gEAAgE;AAChE,MAAM,MAAM,GAAG,CAAC,IAAY,EAAE,QAAgB,EAAU,EAAE;IACxD,MAAM,GAAG,GACP,OAAO,OAAO,KAAK,WAAW,IAAI,OAAO,EAAE,GAAG,CAAC,CAAC,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;IACjF,IAAI,CAAC,GAAG;QAAE,OAAO,QAAQ,CAAC;IAC1B,MAAM,MAAM,GAAG,QAAQ,CAAC,GAAG,EAAE,EAAE,CAAC,CAAC;IACjC,OAAO,MAAM,CAAC,QAAQ,CAAC,MAAM,CAAC,IAAI,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,QAAQ,CAAC;AACnE,CAAC,CAAC;AACF,MAAM,wBAAwB,GAAG,MAAM,CAAC,wBAAwB,EAAE,KAAK,CAAC,CAAC,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C7B,KAAK,CAAC,WAAW,CAAC,GAAG,CACtB,CAAC;YAEF,IAAI,UAAU,KAAK,IAAI,EAAE,CAAC;gBACxB,OAAO,CAAC,GAAG,CAAC,+BAA+B,UAAU,CAAC,MAAM,mBAAmB,CAAC,CAAC;gBACjF,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,qBAAqB,EAAE,KAAK,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;YAClF,CAAC;iBAAM,CAAC;gBACN,OAAO,CAAC,GAAG,CAAC,wDAAwD,CAAC,CAAC;gBACtE,OAAO,EAAE,UAAU,EAAE,EAAE,EAAE,qBAAqB,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;YACzE,CAAC;QACH,CAAC;QAAC,OAAO,GAAG,EAAE,CAAC;YACb,OAAO,CAAC,KAAK,CAAC,gDAAgD,OAAO,GAAG,EAAE,GAAG,CAAC,CAAC;YAC/E,OAAO,EAAE,UAAU,EAAE,EAAE,EAAE,qBAAqB,EAAE,KAAK,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;QAC1E,CAAC;IACH,CAAC;CACF;AAED,qBAAqB;AACrB,MAAM,CAAC,MAAM,mBAAmB,GAAG,IAAI,mBAAmB,EAAE,CAAC"}
@@ -0,0 +1,79 @@
1
+ /**
2
+ * Trajectory replacement policy for the trace poller.
3
+ *
4
+ * When an agent's spans arrive, the poller converts them into a trajectory
5
+ * (via the agent's explicit `buildTrajectory` hook, or the default
6
+ * `spansToTrajectory()` conversion) and decides what the judge grades.
7
+ *
8
+ * Policy — **replacement must never lose evidence**:
9
+ *
10
+ * 1. An agent's explicit `buildTrajectory` HOOK is intentional — its output
11
+ * always wins (issue #320). Callers pass hook output straight through;
12
+ * this module is not consulted.
13
+ *
14
+ * 2. The DEFAULT span→trajectory conversion is a *best effort* view of the
15
+ * run. It adds things the connector trajectory lacks (tool calls for
16
+ * trace-only agents, span timing, gen_ai attributes) but it can also drop
17
+ * things the connector saw and the spans did not:
18
+ * - agents whose spans carry no tool payloads yield `tool_result` stubs
19
+ * ("tool succeeded") or no tool steps at all — while the connector /
20
+ * afterResponse-hook `tool_result` steps hold the real outputs
21
+ * (measured live: ~50% of a REST agent's reports ended with NO tool
22
+ * steps after replacement; the judge wrote "no intermediate
23
+ * retrieval steps" and graded without evidence);
24
+ * - Claude Code spans hold prompts/responses in OTel LOGS, so the
25
+ * span-built trajectory has no `response` content.
26
+ *
27
+ * So instead of wholesale replacement:
28
+ * a. **Tool evidence.** If the connector trajectory carries tool
29
+ * evidence the span trajectory would lose — fewer `action` /
30
+ * `tool_result` steps, or fewer bytes of `tool_result` evidence
31
+ * (`toolOutput`, else `content`) — the CONNECTOR trajectory is kept
32
+ * as the judged trajectory (its ordering of calls, results and
33
+ * answer is the faithful narrative). Where the span-derived tool
34
+ * steps line up one-to-one with the connector's — same count, same
35
+ * step types in order, AND the same tool name wherever both sides
36
+ * name one — the spans' timing (`latencyMs`) is folded onto the
37
+ * connector steps so the judge still sees per-step latency; nothing
38
+ * else is copied across (a wrong attribution would be worse than a
39
+ * missing one). The merged tool-step count is never lower than the
40
+ * connector's, and no `tool_result` that had an output loses it.
41
+ * Span-only narrative steps (`[LLM …]` markers, the echoed user
42
+ * prompt) are dropped in this branch — they carry no evidence. If
43
+ * the connector trajectory has no `response` content, the span
44
+ * trajectory's answer steps are appended.
45
+ * b. Otherwise (span tool steps are at least as complete as the
46
+ * connector's) the span trajectory is used, keeping the #320
47
+ * behaviour for trace-only agents — and if it has no non-empty
48
+ * `response` step, the connector's `response` / `assistant` steps
49
+ * are appended so the judge still sees the agent's actual answer
50
+ * (pre-existing rule: replacing wholesale with content-less span
51
+ * stubs failed every case of a live benchmark).
52
+ */
53
+ import type { TrajectoryStep } from '../../types/index.js';
54
+ /**
55
+ * The evidence text a `tool_result` step contributes to the judge: its
56
+ * `toolOutput` when present, else its `content`. Empty for non-result steps.
57
+ * An explicit empty result (`{}`, `[]`, `""`) IS evidence — "the search
58
+ * returned nothing" is often the crucial fact — so nothing is filtered here;
59
+ * only `undefined`/`null` fall through to `content`.
60
+ */
61
+ export declare function toolEvidenceText(step: TrajectoryStep | undefined | null): string;
62
+ /** Total bytes of `tool_result` evidence in a trajectory. */
63
+ export declare function toolEvidenceChars(trajectory: readonly TrajectoryStep[]): number;
64
+ /**
65
+ * Would replacing `connector` with `span` lose tool evidence?
66
+ *
67
+ * True when the connector has tool steps and either (a) the span trajectory
68
+ * has fewer tool steps, or (b) the span trajectory carries fewer bytes of
69
+ * `tool_result` evidence than the connector's (e.g. "tool succeeded" stubs
70
+ * standing in for multi-KB retrieval results).
71
+ */
72
+ export declare function spanTrajectoryLosesToolEvidence(connector: readonly TrajectoryStep[], span: readonly TrajectoryStep[]): boolean;
73
+ /**
74
+ * Build the trajectory the judge grades from the DEFAULT span-derived
75
+ * trajectory and the connector (pre-poll) trajectory. See the module doc for
76
+ * the policy. Hook-built trajectories must bypass this.
77
+ */
78
+ export declare function mergeSpanTrajectory(connector: readonly TrajectoryStep[] | undefined | null, span: readonly TrajectoryStep[]): TrajectoryStep[];
79
+ //# sourceMappingURL=trajectoryMerge.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"trajectoryMerge.d.ts","sourceRoot":"","sources":["../../../../services/traces/trajectoryMerge.ts"],"names":[],"mappings":"AAKA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmDG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAe9C;;;;;;GAMG;AACH,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,cAAc,GAAG,SAAS,GAAG,IAAI,GAAG,MAAM,CAIhF;AAMD,6DAA6D;AAC7D,wBAAgB,iBAAiB,CAAC,UAAU,EAAE,SAAS,cAAc,EAAE,GAAG,MAAM,CAE/E;AAED;;;;;;;GAOG;AACH,wBAAgB,+BAA+B,CAC7C,SAAS,EAAE,SAAS,cAAc,EAAE,EACpC,IAAI,EAAE,SAAS,cAAc,EAAE,GAC9B,OAAO,CAKT;AAED;;;;GAIG;AACH,wBAAgB,mBAAmB,CACjC,SAAS,EAAE,SAAS,cAAc,EAAE,GAAG,SAAS,GAAG,IAAI,EACvD,IAAI,EAAE,SAAS,cAAc,EAAE,GAC9B,cAAc,EAAE,CAkClB"}
@@ -0,0 +1,109 @@
1
+ /*
2
+ * Copyright OpenSearch Contributors
3
+ * SPDX-License-Identifier: Apache-2.0
4
+ */
5
+ /** Steps that constitute tool evidence for the judge. */
6
+ const TOOL_STEP_TYPES = new Set(['action', 'tool_result']);
7
+ function stringify(value) {
8
+ if (value == null)
9
+ return '';
10
+ if (typeof value === 'string')
11
+ return value;
12
+ try {
13
+ return JSON.stringify(value) ?? '';
14
+ }
15
+ catch {
16
+ return String(value);
17
+ }
18
+ }
19
+ /**
20
+ * The evidence text a `tool_result` step contributes to the judge: its
21
+ * `toolOutput` when present, else its `content`. Empty for non-result steps.
22
+ * An explicit empty result (`{}`, `[]`, `""`) IS evidence — "the search
23
+ * returned nothing" is often the crucial fact — so nothing is filtered here;
24
+ * only `undefined`/`null` fall through to `content`.
25
+ */
26
+ export function toolEvidenceText(step) {
27
+ if (!step || step.type !== 'tool_result')
28
+ return '';
29
+ if (step.toolOutput != null)
30
+ return stringify(step.toolOutput).trim();
31
+ return typeof step.content === 'string' ? step.content.trim() : '';
32
+ }
33
+ function toolSteps(trajectory) {
34
+ return trajectory.filter((s) => s && TOOL_STEP_TYPES.has(s.type));
35
+ }
36
+ /** Total bytes of `tool_result` evidence in a trajectory. */
37
+ export function toolEvidenceChars(trajectory) {
38
+ return trajectory.reduce((sum, s) => sum + toolEvidenceText(s).length, 0);
39
+ }
40
+ /**
41
+ * Would replacing `connector` with `span` lose tool evidence?
42
+ *
43
+ * True when the connector has tool steps and either (a) the span trajectory
44
+ * has fewer tool steps, or (b) the span trajectory carries fewer bytes of
45
+ * `tool_result` evidence than the connector's (e.g. "tool succeeded" stubs
46
+ * standing in for multi-KB retrieval results).
47
+ */
48
+ export function spanTrajectoryLosesToolEvidence(connector, span) {
49
+ const connectorTools = toolSteps(connector);
50
+ if (connectorTools.length === 0)
51
+ return false;
52
+ if (toolSteps(span).length < connectorTools.length)
53
+ return true;
54
+ return toolEvidenceChars(span) < toolEvidenceChars(connector);
55
+ }
56
+ /**
57
+ * Build the trajectory the judge grades from the DEFAULT span-derived
58
+ * trajectory and the connector (pre-poll) trajectory. See the module doc for
59
+ * the policy. Hook-built trajectories must bypass this.
60
+ */
61
+ export function mergeSpanTrajectory(connector, span) {
62
+ const original = connector ?? [];
63
+ if (span.length === 0)
64
+ return [...original];
65
+ if (spanTrajectoryLosesToolEvidence(original, span)) {
66
+ // (a) Keep the connector's evidence. Fold span TIMING onto the
67
+ // connector's tool steps only when the two tool sequences are
68
+ // unambiguously the same calls: same count, same step types in order,
69
+ // and — wherever both sides name the tool — the same tool name. Retries,
70
+ // filtered spans or parallel calls that merely preserve the type pattern
71
+ // fail the name check and get no cross-attribution at all.
72
+ const connectorTools = toolSteps(original);
73
+ const spanTools = toolSteps(span);
74
+ const sameCalls = spanTools.length === connectorTools.length &&
75
+ spanTools.every((s, i) => {
76
+ const c = connectorTools[i];
77
+ return s.type === c.type && (!s.toolName || !c.toolName || s.toolName === c.toolName);
78
+ });
79
+ if (!sameCalls)
80
+ return appendAnswerIfMissing([...original], span);
81
+ let toolIdx = 0;
82
+ const kept = original.map((step) => {
83
+ if (!TOOL_STEP_TYPES.has(step.type))
84
+ return step;
85
+ const from = spanTools[toolIdx++];
86
+ if (step.latencyMs != null || from.latencyMs == null)
87
+ return step;
88
+ return { ...step, latencyMs: from.latencyMs };
89
+ });
90
+ return appendAnswerIfMissing(kept, span);
91
+ }
92
+ // (b) Span trajectory wins; append the connector's answer if the spans
93
+ // carry no response content.
94
+ return appendAnswerIfMissing([...span], original);
95
+ }
96
+ /**
97
+ * If `base` has no non-empty `response` step, append `other`'s non-empty
98
+ * `response` / `assistant` steps so the judge always sees the agent's answer.
99
+ */
100
+ function appendAnswerIfMissing(base, other) {
101
+ const hasResponse = base.some((st) => st?.type === 'response' && typeof st.content === 'string' && st.content.trim().length > 0);
102
+ if (hasResponse)
103
+ return base;
104
+ const answers = other.filter((st) => (st?.type === 'response' || st?.type === 'assistant') &&
105
+ typeof st.content === 'string' &&
106
+ st.content.trim().length > 0);
107
+ return answers.length > 0 ? [...base, ...answers] : base;
108
+ }
109
+ //# sourceMappingURL=trajectoryMerge.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"trajectoryMerge.js","sourceRoot":"","sources":["../../../../services/traces/trajectoryMerge.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAyDH,yDAAyD;AACzD,MAAM,eAAe,GAAwC,IAAI,GAAG,CAAC,CAAC,QAAQ,EAAE,aAAa,CAAC,CAAC,CAAC;AAEhG,SAAS,SAAS,CAAC,KAAc;IAC/B,IAAI,KAAK,IAAI,IAAI;QAAE,OAAO,EAAE,CAAC;IAC7B,IAAI,OAAO,KAAK,KAAK,QAAQ;QAAE,OAAO,KAAK,CAAC;IAC5C,IAAI,CAAC;QACH,OAAO,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,IAAI,EAAE,CAAC;IACrC,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,MAAM,CAAC,KAAK,CAAC,CAAC;IACvB,CAAC;AACH,CAAC;AAED;;;;;;GAMG;AACH,MAAM,UAAU,gBAAgB,CAAC,IAAuC;IACtE,IAAI,CAAC,IAAI,IAAI,IAAI,CAAC,IAAI,KAAK,aAAa;QAAE,OAAO,EAAE,CAAC;IACpD,IAAI,IAAI,CAAC,UAAU,IAAI,IAAI;QAAE,OAAO,SAAS,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,IAAI,EAAE,CAAC;IACtE,OAAO,OAAO,IAAI,CAAC,OAAO,KAAK,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;AACrE,CAAC;A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AAM,WAAW,GAAG,IAAI,CAAC,IAAI,CAC3B,CAAC,EAAE,EAAE,EAAE,CAAC,EAAE,EAAE,IAAI,KAAK,UAAU,IAAI,OAAO,EAAE,CAAC,OAAO,KAAK,QAAQ,IAAI,EAAE,CAAC,OAAO,CAAC,IAAI,EAAE,CAAC,MAAM,GAAG,CAAC,CAClG,CAAC;IACF,IAAI,WAAW;QAAE,OAAO,IAAI,CAAC;IAC7B,MAAM,OAAO,GAAG,KAAK,CAAC,MAAM,CAC1B,CAAC,EAAE,EAAE,EAAE,CACL,CAAC,EAAE,EAAE,IAAI,KAAK,UAAU,IAAI,EAAE,EAAE,IAAI,KAAK,WAAW,CAAC;QACrD,OAAO,EAAE,CAAC,OAAO,KAAK,QAAQ;QAC9B,EAAE,CAAC,OAAO,CAAC,IAAI,EAAE,CAAC,MAAM,GAAG,CAAC,CAC/B,CAAC;IACF,OAAO,OAAO,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,IAAI,EAAE,GAAG,OAAO,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC;AAC3D,CAAC"}
@@ -198,7 +198,7 @@ export declare enum ToolCallStatus {
198
198
  export interface TrajectoryStep {
199
199
  id: string;
200
200
  timestamp: number;
201
- type: 'tool_result' | 'assistant' | 'action' | 'response' | 'thinking';
201
+ type: 'tool_result' | 'assistant' | 'action' | 'response' | 'thinking' | 'user';
202
202
  content: string;
203
203
  toolName?: string;
204
204
  toolArgs?: Record<string, any>;
@@ -437,11 +437,25 @@ export interface TestCaseRun {
437
437
  lastTraceFetchAt?: string;
438
438
  traceError?: string;
439
439
  spans?: Span[];
440
+ /**
441
+ * Set exclusively by the agent (trace) judge provider (`judgeModelId:
442
+ * 'agent-trace-judge'`) to record whether this verdict was backed by real
443
+ * OTel spans/logs (`'trace-tools'`) or had to reason from the trajectory
444
+ * alone because the run carried no trace correlation hint
445
+ * (`'trajectory-only'` — the normal case for an agent declared `useTraces:
446
+ * false`, i.e. not OTel-instrumented). Undefined for every other judge
447
+ * provider, and for agent-trace-judge reports persisted before this field
448
+ * existed. See server/services/piAgenticJudgeService.ts.
449
+ */
450
+ judgeMode?: 'trajectory-only' | 'trace-tools';
440
451
  }
441
452
  export type EvaluationReport = TestCaseRun;
453
+ export type ContextItemDisposition = 'prompt' | 'connector' | 'documentation';
442
454
  export interface AgentContextItem {
443
455
  description: string;
444
456
  value: string;
457
+ /** How this item is consumed. Absent is equivalent to `prompt`. */
458
+ disposition?: ContextItemDisposition;
445
459
  }
446
460
  export interface AgentToolDefinition {
447
461
  name: string;
@@ -476,6 +490,28 @@ export interface TestCaseVersion {
476
490
  businessValue: string;
477
491
  }[];
478
492
  }
493
+ /**
494
+ * Per-test definition captured when a code-SDK eval file is imported.
495
+ * Everything here is derived from the single `test(name, options, body)`
496
+ * call that registered the test — not from the surrounding file.
497
+ */
498
+ export interface TestCaseDefinitionCapture {
499
+ /** How the test was registered. Only `'sdk'` exists today. */
500
+ registeredAs: 'sdk';
501
+ /**
502
+ * The options object exactly as passed to `test()`, after the two-arg /
503
+ * three-arg overload is resolved, with non-JSON-serializable values
504
+ * (functions, symbols, undefined) dropped. Rendered as the "Pretty" view.
505
+ */
506
+ options: Record<string, unknown>;
507
+ /**
508
+ * `body.toString()` of the evaluate callback — the source text of THIS
509
+ * test's assertions, as it appeared in the executed file. Bounded to
510
+ * `DEFINITION_BODY_SOURCE_MAX_CHARS`; `bodyTruncated` is set when cut.
511
+ */
512
+ bodySource: string;
513
+ bodyTruncated?: boolean;
514
+ }
479
515
  export interface TestCase {
480
516
  id: string;
481
517
  name: string;
@@ -491,6 +527,10 @@ export interface TestCase {
491
527
  versions: TestCaseVersion[];
492
528
  sourceFile?: string;
493
529
  sourceHash?: string;
530
+ sourceCode?: string;
531
+ sourceFileName?: string;
532
+ sourceLanguage?: 'javascript' | 'typescript';
533
+ definition?: TestCaseDefinitionCapture;
494
534
  isPromoted: boolean;
495
535
  createdAt: string;
496
536
  updatedAt: string;
@@ -537,6 +577,16 @@ export interface TraceMetrics {
537
577
  toolCalls: number;
538
578
  toolsUsed: string[];
539
579
  status: 'success' | 'error' | 'pending';
580
+ /**
581
+ * Whether ANY trace spans were ingested for this runId at query time.
582
+ * `false` only means "no spans matched the query right now" -- it does
583
+ * NOT prove the run doesn't exist: ingestion lag, a wrong/narrow time
584
+ * window, or a query bug can also produce `false` for a real run. Do
585
+ * not treat this as a run-existence check; it distinguishes "some spans
586
+ * are visible" from "none are visible yet/at all", nothing stronger.
587
+ * Optional for backwards compatibility with older callers.
588
+ */
589
+ hasSpans?: boolean;
540
590
  }
541
591
  export interface SpanEvent {
542
592
  name: string;
@@ -777,6 +827,22 @@ export interface TestCasePerformanceMetrics {
777
827
  agentDurationMs: number;
778
828
  judgeDurationMs?: number;
779
829
  judgeAttempts?: number;
830
+ /**
831
+ * Total LLM token usage (prompt + completion) for this test case's agent
832
+ * invocation, read from the same OTel-derived TracesAccessor a code-SDK
833
+ * test body reads via `result.traces.totalTokens` / the `traces` fixture.
834
+ *
835
+ * Always-record guarantee (see docs/SDK.md): for code-SDK (deterministic)
836
+ * test cases, the runner stamps this immediately after `agent.run()`
837
+ * resolves — independent of whether any matcher in the test body actually
838
+ * asserted on it — so a later-failing gate doesn't erase this objective
839
+ * actual. Undefined when the agent was never invoked (no-prompt test), or
840
+ * when `useTraces: true` but spans were never retrievable (the "loud
841
+ * failure" case — see lib/matchers/traces.ts `unavailableTracesAccessor`).
842
+ */
843
+ totalTokens?: number;
844
+ /** Same always-record guarantee as {@link totalTokens}, for USD cost. */
845
+ totalCostUsd?: number;
780
846
  }
781
847
  /** Server-side performance metrics for an entire benchmark run */
782
848
  export interface RunPerformanceMetrics {
@@ -803,6 +869,17 @@ export interface RunStats {
803
869
  * read as 0.
804
870
  */
805
871
  errored?: number;
872
+ /**
873
+ * Number of planned test cases that never executed (or never finished)
874
+ * because the run reached a terminal status first — cancelled part-way, or
875
+ * the executor crashed. Not a pass, not a fail, not pending: excluded from
876
+ * the pass-rate denominator and rendered as "n not run" (never a spinner).
877
+ * See `lib/runStats.bucketRunResults`.
878
+ *
879
+ * Optional for backward-compat: stats persisted before this field read as 0
880
+ * (and `computeRunStats` re-homes a terminal run's stale `pending` here).
881
+ */
882
+ notRun?: number;
806
883
  /** Total number of test cases in the run */
807
884
  total: number;
808
885
  }
@@ -823,6 +900,7 @@ export interface BenchmarkRun {
823
900
  name: string;
824
901
  description?: string;
825
902
  createdAt: string;
903
+ completedAt?: string;
826
904
  status?: BenchmarkRunStatus;
827
905
  error?: string;
828
906
  agentKey: string;
@@ -848,7 +926,34 @@ export interface BenchmarkRun {
848
926
  performanceMetrics?: TestCasePerformanceMetrics;
849
927
  }>;
850
928
  stats?: RunStats;
929
+ /**
930
+ * One-line aggregate reason when a dominant share (>=50%) of this run's
931
+ * cases failed AT THE JUDGE STEP specifically (not the agent) -- e.g.
932
+ * every case hitting the agent-trace-judge's "needs a runId or trace
933
+ * correlation hint" validation error before that error was fixed to
934
+ * degrade instead of hard-failing (see piAgenticJudgeService.ts /
935
+ * judgeAgentsHints.ts). Computed by `lib/judgeFailureSummary.ts` from the
936
+ * per-case reports at run-completion time; undefined when no dominant
937
+ * judge-failure pattern is present. Surfaced in the runs list and run
938
+ * inspector so "62 errored" isn't silent about *why* -- pre-fix a run
939
+ * like this showed only a bare warning-triangle count with no reason.
940
+ */
941
+ judgeFailureSummary?: string;
851
942
  performanceMetrics?: RunPerformanceMetrics;
943
+ /**
944
+ * Content digest of this run's evaluation conditions (test-case contents +
945
+ * evaluator/judge conditions) -- same identity as {@link EvaluationRun.imageDigest}.
946
+ * Stamped by `POST /api/storage/benchmarks/:id/execute` (the legacy
947
+ * `benchmark -f test-cases.json` / `benchmark -n "Existing Benchmark"`
948
+ * path); runs with equal digests are directly comparable. See {@link BenchmarkImage}.
949
+ */
950
+ imageDigest?: string;
951
+ /**
952
+ * Audit note set when a run is cancelled without a live executor found
953
+ * (e.g. the server process that started it restarted or crashed —
954
+ * "zombie" run). See POST /api/storage/benchmarks/:id/cancel.
955
+ */
956
+ cancelNote?: string;
852
957
  }
853
958
  export interface Benchmark {
854
959
  id: string;
@@ -892,7 +997,33 @@ export type ExperimentStartedEvent = BenchmarkStartedEvent;
892
997
  * Discriminator for documents in evals_benchmarks index.
893
998
  * Legacy docs without this field default to 'benchmark' via normalization.
894
999
  */
895
- export type EvalDocType = 'benchmark' | 'evaluation-run';
1000
+ export type EvalDocType = 'benchmark' | 'evaluation-run' | 'benchmark-image';
1001
+ /**
1002
+ * BenchmarkImage — content-addressed snapshot of evaluation conditions
1003
+ * ("the controls"): test-case contents + evaluator/judge conditions. Runs
1004
+ * sharing a digest are comparable by construction; the digest is also the
1005
+ * inherent dedup key (same command → same digest → same image, never a
1006
+ * duplicate). Tags are docker-style mutable labels — never identity.
1007
+ * Stored in the evals_benchmarks index/dir with docType 'benchmark-image'.
1008
+ */
1009
+ export interface BenchmarkImage {
1010
+ id: string;
1011
+ docType: 'benchmark-image';
1012
+ digest: string;
1013
+ tags: string[];
1014
+ testCaseFingerprints: Array<{
1015
+ id?: string;
1016
+ name: string;
1017
+ contentHash: string;
1018
+ }>;
1019
+ testCaseCount: number;
1020
+ evalConditions: {
1021
+ evaluatorId?: string;
1022
+ judgeModelId?: string;
1023
+ };
1024
+ createdAt: string;
1025
+ lastRunAt?: string;
1026
+ }
896
1027
  /**
897
1028
  * Describes where test cases came from for an evaluation run.
898
1029
  * Multiple sources can be combined (union, deduplicated by test case ID).
@@ -932,7 +1063,17 @@ export interface EvaluationRun {
932
1063
  description?: string;
933
1064
  createdAt: string;
934
1065
  completedAt?: string;
1066
+ /**
1067
+ * `status` is TERMINAL only once the executor has drained: `cancelled` is
1068
+ * written by finalization (`services/evaluationRunFinalize.ts`) after every
1069
+ * in-flight case has landed, never by the cancel request itself. A cancel
1070
+ * request stamps `cancelRequestedAt` and leaves `status: 'running'` so
1071
+ * readers don't misreport still-finishing cases as "not run" during the
1072
+ * drain window. UI: running + cancelRequestedAt = "Cancelling…".
1073
+ */
935
1074
  status: BenchmarkRunStatus;
1075
+ /** Set by POST /:id/cancel; the run is draining and will become `cancelled`. */
1076
+ cancelRequestedAt?: string;
936
1077
  error?: string;
937
1078
  agentKey: string;
938
1079
  agentEndpoint?: string;
@@ -950,15 +1091,79 @@ export interface EvaluationRun {
950
1091
  testCaseSnapshots: TestCaseSnapshot[];
951
1092
  results: Record<string, {
952
1093
  reportId: string;
1094
+ /** `cancelled` = never started (run cancelled first); see contract above. */
953
1095
  status: RunResultStatus;
954
1096
  error?: string;
955
1097
  performanceMetrics?: TestCasePerformanceMetrics;
956
1098
  }>;
957
1099
  stats?: RunStats;
1100
+ /**
1101
+ * One-line aggregate reason when a dominant share (>=50%) of this run's
1102
+ * cases failed at the judge step specifically. See
1103
+ * {@link BenchmarkRun.judgeFailureSummary} for the full doc — same field,
1104
+ * same computation (`lib/judgeFailureSummary.ts`), duplicated here because
1105
+ * `EvaluationRun` and `BenchmarkRun` are independent doc shapes.
1106
+ */
1107
+ judgeFailureSummary?: string;
958
1108
  performanceMetrics?: RunPerformanceMetrics;
959
1109
  benchmarkId?: string;
960
1110
  benchmarkVersion?: number;
1111
+ /**
1112
+ * Content digest of this run's evaluation conditions (test-case contents +
1113
+ * evaluator/judge conditions). Runs with equal digests ran under identical
1114
+ * conditions and are directly comparable. See {@link BenchmarkImage}.
1115
+ */
1116
+ imageDigest?: string;
1117
+ /**
1118
+ * Provenance: id of the source {@link EvaluationRun} this run was created
1119
+ * from via `POST /api/storage/evaluation-runs/:id/rerun` ("kick off a
1120
+ * duplicate of the same run"). Undefined for runs created any other way.
1121
+ * The source run is NOT required to still exist for this run to be valid —
1122
+ * it's a point-in-time provenance link, not a live reference.
1123
+ */
1124
+ rerunOf?: string;
1125
+ /**
1126
+ * True when this run was created via re-run but with one or more config
1127
+ * overrides applied (agent/evaluator/judge model/concurrency/benchmark
1128
+ * source) — i.e. the launched config is NOT an exact duplicate of
1129
+ * `rerunOf`. `rerunOf` is still recorded either way; this flag just
1130
+ * distinguishes a faithful duplicate from a tweaked re-run so the UI can
1131
+ * label it accurately ("re-run" vs "re-run (modified)"). Undefined (not
1132
+ * `false`) when this run wasn't created via re-run at all.
1133
+ */
1134
+ modified?: boolean;
1135
+ /**
1136
+ * Audit note set when a run is cancelled without a live executor found
1137
+ * (e.g. the server process that started it restarted or crashed —
1138
+ * "zombie" run). Distinguishes a graceful in-process cancel from a
1139
+ * doc-status-only fallback cancel. See POST .../:id/cancel.
1140
+ */
1141
+ cancelNote?: string;
961
1142
  }
1143
+ /**
1144
+ * Typed discriminator between the two run shapes that flow through the UI:
1145
+ * `BenchmarkRun` (legacy, embedded in `benchmark.runs[]`, never carries
1146
+ * `docType`) and `EvaluationRun` (first-class doc, `docType:
1147
+ * 'evaluation-run'`). Runs created WITH a benchmarkId are dual-written as
1148
+ * BOTH shapes for the same logical run (see
1149
+ * `server/routes/storage/evaluationRuns.ts`), so the run object a component
1150
+ * is holding can be either shape regardless of which route loaded it —
1151
+ * `docType`, not the route/URL a component happened to load from, is the
1152
+ * only reliable signal for "does this run support EvaluationRun-only
1153
+ * capabilities (rerun, provenance, retry-judgement, ...)".
1154
+ *
1155
+ * Use this instead of inline `(run as any).docType === 'evaluation-run'`
1156
+ * checks or route-derived `mode` flags for anything that depends on the
1157
+ * RUN's actual shape (capabilities, fields like `rerunOf`). Route-derived
1158
+ * state (which endpoint to fetch, which breadcrumb/URL to build) is a
1159
+ * separate, legitimate concern and should stay keyed on the route.
1160
+ *
1161
+ * Adopted from #466 (`goyamegh/run-type-predicate`) ahead of that PR's
1162
+ * merge, per the note on #462: both PRs hit the same route-vs-doctype bug
1163
+ * class (Retry-judgement's button/dialog mount) and should not ship two
1164
+ * competing `(run as any).docType` patches.
1165
+ */
1166
+ export declare const isEvaluationRun: (r: BenchmarkRun | EvaluationRun) => r is EvaluationRun;
962
1167
  export interface TestCaseVersionRef {
963
1168
  id: string;
964
1169
  version: string;
@@ -975,7 +1180,23 @@ export interface RunAggregateMetrics {
975
1180
  failedCount: number;
976
1181
  /** Test cases the evaluator couldn't verdict (#242); excluded from pass rate. */
977
1182
  erroredCount?: number;
978
- avgAccuracy: number;
1183
+ /**
1184
+ * Mean `metrics.accuracy` over the reports that actually carry one.
1185
+ * `undefined` when no report in the run has an accuracy score (e.g.
1186
+ * custom evaluators scoring different metric keys) — renders "--", not 0%.
1187
+ */
1188
+ avgAccuracy?: number;
1189
+ /**
1190
+ * Run-level "Avg score" — mean, over test cases that have a derivable
1191
+ * score, of each case's overall score. Unlike `avgAccuracy` (accuracy-
1192
+ * only, `undefined` whenever a run's reports carry no `metrics.accuracy`),
1193
+ * this is defined for custom-evaluator runs too: per case the derivation
1194
+ * is `metrics.accuracy` -> the primary rubric -> the mean of every numeric
1195
+ * metric on the report (see `computeOverallScore` / `getPrimaryRubric` in
1196
+ * services/comparisonService.ts for the exact tiering and why). Only
1197
+ * `undefined` when NOT ONE case in the run has any numeric metric at all.
1198
+ */
1199
+ avgScore?: number;
979
1200
  passRatePercent: number;
980
1201
  totalTokens?: number;
981
1202
  totalInputTokens?: number;
@@ -1002,6 +1223,23 @@ export interface TestCaseRunResult {
1002
1223
  faithfulness?: number;
1003
1224
  trajectoryAlignment?: number;
1004
1225
  latencyScore?: number;
1226
+ /**
1227
+ * The report's PRIMARY RUBRIC — a heuristic single evaluator metric
1228
+ * MetricCell falls back to showing when `accuracy` is absent (custom
1229
+ * evaluators carry no accuracy field at all; e.g. fact_precision /
1230
+ * provenance_verifiability / abstention_integrity / payload_economy). See
1231
+ * `getPrimaryRubric` in services/comparisonService.ts for how the key is
1232
+ * chosen (alphabetically-first numeric metric — NOT necessarily the
1233
+ * evaluator's own declared/highest-weight rubric; see that function's doc
1234
+ * for why). Only populated when the report has no numeric `accuracy` —
1235
+ * `undefined` whenever `accuracy` IS present, since MetricCell never reads
1236
+ * it in that case and an unconditionally-populated "primary" field would
1237
+ * read as more authoritative than the heuristic actually is.
1238
+ */
1239
+ primaryRubric?: {
1240
+ key: string;
1241
+ value: number;
1242
+ };
1005
1243
  testCaseVersion?: string;
1006
1244
  /** Error message if status is 'failed' */
1007
1245
  error?: string;
@@ -1044,6 +1282,13 @@ export interface JudgeResponse {
1044
1282
  llmJudgeReasoning: string;
1045
1283
  improvementStrategies: ImprovementStrategy[];
1046
1284
  duration: number;
1285
+ /**
1286
+ * Set only by the demo/mock judge to flag that this verdict was NOT produced
1287
+ * by a real LLM (semi-random pass). A real provider never sets this. The
1288
+ * CLI/UI surface it so a "100% pass" from the mock can't be mistaken for a
1289
+ * real score.
1290
+ */
1291
+ warning?: string;
1047
1292
  }
1048
1293
  export interface AgentProxyRequest {
1049
1294
  endpoint: string;
@@ -1117,6 +1362,8 @@ export interface MetricsResult {
1117
1362
  toolCalls: number;
1118
1363
  toolsUsed: string[];
1119
1364
  status: 'pending' | 'success' | 'error';
1365
+ /** See TraceMetrics.hasSpans -- same semantics. */
1366
+ hasSpans?: boolean;
1120
1367
  }
1121
1368
  /**
1122
1369
  * Authentication type for OpenSearch clusters