niceeval 0.9.1 → 0.10.2

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 (432) hide show
  1. package/INDEX.md +31 -33
  2. package/dist/agents/types.d.ts +20 -17
  3. package/dist/context/types.d.ts +21 -21
  4. package/dist/i18n/en.d.ts +10 -2
  5. package/dist/i18n/zh-CN.d.ts +14 -6
  6. package/dist/o11y/execution-tree.d.ts +103 -0
  7. package/dist/o11y/otlp/select.d.ts +22 -0
  8. package/dist/report/{react → assets}/colors.d.ts +8 -0
  9. package/dist/report/{react → assets}/colors.js +23 -0
  10. package/dist/report/built-in/index.d.ts +2 -2
  11. package/dist/report/built-in/index.js +2 -2
  12. package/dist/report/built-in/standard.d.ts +8 -1
  13. package/dist/report/built-in/standard.js +17 -7
  14. package/dist/report/components/attempt-detail/AttemptAssertions.d.ts +6 -0
  15. package/dist/report/components/attempt-detail/AttemptAssertions.js +17 -0
  16. package/dist/report/components/attempt-detail/AttemptConversation.d.ts +10 -0
  17. package/dist/report/components/attempt-detail/AttemptConversation.js +74 -0
  18. package/dist/report/components/attempt-detail/AttemptDiagnostics.d.ts +6 -0
  19. package/dist/report/components/attempt-detail/AttemptDiagnostics.js +7 -0
  20. package/dist/report/components/attempt-detail/AttemptDiff.d.ts +6 -0
  21. package/dist/report/components/attempt-detail/AttemptDiff.js +11 -0
  22. package/dist/report/components/attempt-detail/AttemptError.d.ts +6 -0
  23. package/dist/report/components/attempt-detail/AttemptError.js +16 -0
  24. package/dist/report/components/attempt-detail/AttemptFixPrompt.d.ts +6 -0
  25. package/dist/report/components/attempt-detail/AttemptFixPrompt.js +7 -0
  26. package/dist/report/components/attempt-detail/AttemptSource.d.ts +6 -0
  27. package/dist/report/components/attempt-detail/AttemptSource.js +97 -0
  28. package/dist/report/components/attempt-detail/AttemptSummary.d.ts +8 -0
  29. package/dist/report/components/attempt-detail/AttemptSummary.js +20 -0
  30. package/dist/report/components/attempt-detail/AttemptTimeline.d.ts +6 -0
  31. package/dist/report/components/attempt-detail/AttemptTimeline.js +28 -0
  32. package/dist/report/components/attempt-detail/AttemptTrace.d.ts +6 -0
  33. package/dist/report/components/attempt-detail/AttemptTrace.js +29 -0
  34. package/dist/report/components/attempt-detail/AttemptUsage.d.ts +6 -0
  35. package/dist/report/components/attempt-detail/AttemptUsage.js +20 -0
  36. package/dist/report/components/attempt-detail/compute.d.ts +24 -0
  37. package/dist/report/components/attempt-detail/compute.js +297 -0
  38. package/dist/report/components/attempt-detail/faces.d.ts +14 -0
  39. package/dist/report/components/attempt-detail/faces.js +239 -0
  40. package/dist/report/components/attempt-detail/index.d.ts +38 -0
  41. package/dist/report/components/attempt-detail/index.js +547 -0
  42. package/dist/report/{react → components}/cell.d.ts +5 -3
  43. package/dist/report/{react → components}/cell.js +3 -3
  44. package/dist/report/{react → components/entity-lists}/AttemptList.d.ts +8 -4
  45. package/dist/report/{react → components/entity-lists}/AttemptList.js +16 -10
  46. package/dist/report/{react → components/entity-lists}/EvalList.d.ts +3 -3
  47. package/dist/report/{react → components/entity-lists}/EvalList.js +0 -0
  48. package/dist/report/{react → components/entity-lists}/ExperimentList.d.ts +4 -5
  49. package/dist/report/{react → components/entity-lists}/ExperimentList.js +12 -11
  50. package/dist/report/components/entity-lists/compute.d.ts +23 -0
  51. package/dist/report/components/entity-lists/compute.js +171 -0
  52. package/dist/report/components/entity-lists/faces.d.ts +5 -0
  53. package/dist/report/components/entity-lists/faces.js +175 -0
  54. package/dist/report/components/entity-lists/index.d.ts +49 -0
  55. package/dist/report/components/entity-lists/index.js +169 -0
  56. package/dist/report/{react → components}/fixtures.d.ts +2 -2
  57. package/dist/report/{react → components}/fixtures.js +1 -1
  58. package/dist/report/{react → components/metric-views}/DeltaTable.d.ts +2 -2
  59. package/dist/report/{react → components/metric-views}/DeltaTable.js +4 -4
  60. package/dist/report/{react → components/metric-views}/MetricBars.d.ts +3 -3
  61. package/dist/report/{react → components/metric-views}/MetricBars.js +3 -3
  62. package/dist/report/{react → components/metric-views}/MetricLine.d.ts +2 -2
  63. package/dist/report/{react → components/metric-views}/MetricLine.js +8 -5
  64. package/dist/report/{react → components/metric-views}/MetricMatrix.d.ts +3 -3
  65. package/dist/report/{react → components/metric-views}/MetricMatrix.js +4 -4
  66. package/dist/report/components/metric-views/MetricScatter.d.ts +11 -0
  67. package/dist/report/{react → components/metric-views}/MetricScatter.js +27 -60
  68. package/dist/report/{react → components/metric-views}/MetricTable.d.ts +3 -3
  69. package/dist/report/{react → components/metric-views}/MetricTable.js +4 -4
  70. package/dist/report/{react → components/metric-views}/Scoreboard.d.ts +2 -2
  71. package/dist/report/{react → components/metric-views}/Scoreboard.js +3 -3
  72. package/dist/report/components/metric-views/compute.d.ts +89 -0
  73. package/dist/report/{compute.js → components/metric-views/compute.js} +32 -415
  74. package/dist/report/components/metric-views/faces.d.ts +13 -0
  75. package/dist/report/components/metric-views/faces.js +381 -0
  76. package/dist/report/components/metric-views/index.d.ts +50 -0
  77. package/dist/report/components/metric-views/index.js +273 -0
  78. package/dist/report/{text → components/metric-views}/plot.js +1 -1
  79. package/dist/report/components/shared-compute.d.ts +22 -0
  80. package/dist/report/components/shared-compute.js +47 -0
  81. package/dist/report/components/shared-faces.d.ts +9 -0
  82. package/dist/report/components/shared-faces.js +26 -0
  83. package/dist/report/components/shared.d.ts +68 -0
  84. package/dist/report/components/shared.js +125 -0
  85. package/dist/report/{react → components/site-components}/CopyFixPrompt.d.ts +2 -2
  86. package/dist/report/{react → components/site-components}/CopyFixPrompt.js +2 -2
  87. package/dist/report/{react → components/site-components}/HeroCard.d.ts +2 -2
  88. package/dist/report/{react → components/site-components}/HeroCard.js +2 -2
  89. package/dist/report/{react → components/site-components}/ScopeWarnings.d.ts +2 -2
  90. package/dist/report/{react → components/site-components}/ScopeWarnings.js +3 -3
  91. package/dist/report/{react → components/site-components}/TraceWaterfall.d.ts +3 -3
  92. package/dist/report/{react → components/site-components}/TraceWaterfall.js +5 -5
  93. package/dist/report/components/site-components/compute.d.ts +28 -0
  94. package/dist/report/components/site-components/compute.js +132 -0
  95. package/dist/report/components/site-components/faces.d.ts +21 -0
  96. package/dist/report/components/site-components/faces.js +75 -0
  97. package/dist/report/components/site-components/index.d.ts +74 -0
  98. package/dist/report/components/site-components/index.js +220 -0
  99. package/dist/report/{scope-warnings.d.ts → components/site-components/scope-warnings.d.ts} +2 -2
  100. package/dist/report/{scope-warnings.js → components/site-components/scope-warnings.js} +2 -2
  101. package/dist/report/{react → components/summaries}/ScopeSummary.d.ts +2 -2
  102. package/dist/report/{react → components/summaries}/ScopeSummary.js +17 -8
  103. package/dist/report/components/summaries/compute.d.ts +7 -0
  104. package/dist/report/components/summaries/compute.js +51 -0
  105. package/dist/report/components/summaries/faces.d.ts +7 -0
  106. package/dist/report/components/summaries/faces.js +38 -0
  107. package/dist/report/components/summaries/index.d.ts +27 -0
  108. package/dist/report/components/summaries/index.js +78 -0
  109. package/dist/report/definition/grid-layout.d.ts +50 -0
  110. package/dist/report/definition/grid-layout.js +89 -0
  111. package/dist/report/{primitives.d.ts → definition/primitives.d.ts} +34 -4
  112. package/dist/report/{primitives.js → definition/primitives.js} +101 -10
  113. package/dist/report/{report.d.ts → definition/report.d.ts} +36 -65
  114. package/dist/report/{report.js → definition/report.js} +58 -90
  115. package/dist/report/{text/table.d.ts → definition/table-text.d.ts} +2 -2
  116. package/dist/report/{text/table.js → definition/table-text.js} +2 -2
  117. package/dist/report/{tree.d.ts → definition/tree.d.ts} +43 -11
  118. package/dist/report/{tree.js → definition/tree.js} +9 -11
  119. package/dist/report/index.d.ts +33 -18
  120. package/dist/report/index.js +23 -14
  121. package/dist/report/{aggregate.d.ts → model/aggregate.d.ts} +12 -4
  122. package/dist/report/{aggregate.js → model/aggregate.js} +28 -8
  123. package/dist/report/{flag.d.ts → model/flag.d.ts} +14 -1
  124. package/dist/report/{flag.js → model/flag.js} +35 -0
  125. package/dist/report/{format.d.ts → model/format.d.ts} +13 -7
  126. package/dist/report/{format.js → model/format.js} +79 -9
  127. package/dist/report/{locale.d.ts → model/locale.d.ts} +17 -17
  128. package/dist/report/{locale.js → model/locale.js} +31 -33
  129. package/dist/report/{metrics.d.ts → model/metrics.d.ts} +2 -2
  130. package/dist/report/{metrics.js → model/metrics.js} +2 -2
  131. package/dist/report/{types.d.ts → model/types.d.ts} +154 -20
  132. package/dist/report/react/index.d.ts +32 -21
  133. package/dist/report/react/index.js +33 -21
  134. package/dist/report/{load.d.ts → runtime/load.d.ts} +1 -1
  135. package/dist/report/{load.js → runtime/load.js} +1 -1
  136. package/dist/report/runtime/text.d.ts +67 -0
  137. package/dist/report/runtime/text.js +114 -0
  138. package/dist/report/runtime/web.d.ts +35 -0
  139. package/dist/report/runtime/web.js +70 -0
  140. package/dist/results/annotated-source.d.ts +87 -0
  141. package/dist/results/attempt-evidence.d.ts +74 -0
  142. package/dist/results/attempt-source.d.ts +15 -0
  143. package/dist/results/select.d.ts +11 -1
  144. package/dist/results/select.js +27 -5
  145. package/dist/runner/eval-selection.d.ts +26 -0
  146. package/dist/runner/feedback/sink.d.ts +26 -1
  147. package/dist/runner/types.d.ts +151 -24
  148. package/dist/sandbox/docker.d.ts +6 -0
  149. package/dist/sandbox/e2b.d.ts +0 -1
  150. package/dist/sandbox/types.d.ts +23 -21
  151. package/dist/scoring/display.d.ts +7 -2
  152. package/dist/scoring/display.js +42 -4
  153. package/dist/scoring/types.d.ts +3 -3
  154. package/dist/shared/aggregate.d.ts +14 -0
  155. package/dist/shared/aggregate.js +31 -0
  156. package/dist/shared/types.d.ts +6 -1
  157. package/docs-site/images/logo-dark.svg +7 -0
  158. package/docs-site/images/logo.svg +6 -5
  159. package/docs-site/zh/README.md +8 -7
  160. package/docs-site/zh/examples/ai-agent-application.mdx +5 -5
  161. package/docs-site/zh/examples/coding-agent-extensions.mdx +4 -4
  162. package/docs-site/zh/examples/index.mdx +3 -3
  163. package/docs-site/zh/examples/integrations/ai-sdk-v7.mdx +6 -6
  164. package/docs-site/zh/examples/integrations/claude-sdk.mdx +3 -3
  165. package/docs-site/zh/examples/integrations/codex-sdk.mdx +3 -3
  166. package/docs-site/zh/examples/integrations/langgraph.mdx +3 -3
  167. package/docs-site/zh/examples/integrations/pi-sdk.mdx +2 -2
  168. package/docs-site/zh/explanation/adapter.mdx +19 -19
  169. package/docs-site/zh/explanation/assert.mdx +9 -9
  170. package/docs-site/zh/explanation/drive.mdx +4 -4
  171. package/docs-site/zh/explanation/evals.mdx +8 -8
  172. package/docs-site/zh/explanation/experiment.mdx +8 -8
  173. package/docs-site/zh/explanation/hitl.mdx +13 -13
  174. package/docs-site/zh/explanation/judge.mdx +3 -3
  175. package/docs-site/zh/explanation/overview.mdx +7 -7
  176. package/docs-site/zh/explanation/runner.mdx +17 -13
  177. package/docs-site/zh/explanation/tier.mdx +6 -6
  178. package/docs-site/zh/index.mdx +14 -14
  179. package/docs-site/zh/introduction.mdx +13 -16
  180. package/docs-site/zh/reference/builtin-agents.mdx +61 -28
  181. package/docs-site/zh/reference/capabilities.mdx +7 -27
  182. package/docs-site/zh/reference/cli.mdx +36 -33
  183. package/docs-site/zh/reference/define-agent.mdx +32 -31
  184. package/docs-site/zh/reference/define-config.mdx +6 -6
  185. package/docs-site/zh/reference/define-eval.mdx +33 -20
  186. package/docs-site/zh/reference/events.mdx +4 -4
  187. package/docs-site/zh/reference/expect.mdx +3 -3
  188. package/docs-site/zh/reference/official-adapters.mdx +17 -17
  189. package/docs-site/zh/reference/report-components.mdx +195 -121
  190. package/docs-site/zh/reference/results-data.mdx +13 -13
  191. package/docs-site/zh/troubleshooting/debug-sandbox.mdx +11 -11
  192. package/docs-site/zh/troubleshooting/debugging.mdx +40 -16
  193. package/docs-site/zh/{how-to → tutorials}/agent-feedback-loop.mdx +38 -38
  194. package/docs-site/zh/tutorials/agent-onboarding.mdx +100 -0
  195. package/docs-site/zh/tutorials/authoring.mdx +211 -0
  196. package/docs-site/zh/{how-to → tutorials}/ci-integration.mdx +8 -8
  197. package/docs-site/zh/{how-to → tutorials}/connect-otel.mdx +22 -22
  198. package/docs-site/zh/{how-to → tutorials}/connect-your-agent.mdx +58 -63
  199. package/docs-site/zh/tutorials/custom-reports.mdx +453 -0
  200. package/docs-site/zh/{how-to → tutorials}/dataset-fanout.mdx +4 -4
  201. package/docs-site/zh/tutorials/experiments.mdx +102 -0
  202. package/docs-site/zh/{how-to → tutorials}/fixtures.mdx +9 -9
  203. package/docs-site/zh/{how-to → tutorials}/publish-report.mdx +6 -6
  204. package/docs-site/zh/tutorials/quickstart.mdx +18 -18
  205. package/docs-site/zh/{how-to → tutorials}/reporters.mdx +6 -6
  206. package/docs-site/zh/{how-to → tutorials}/sandbox-agent.mdx +6 -6
  207. package/docs-site/zh/{how-to → tutorials}/sandbox-providers.mdx +41 -19
  208. package/docs-site/zh/{how-to → tutorials}/scoring-guide.mdx +4 -4
  209. package/docs-site/zh/{how-to → tutorials}/viewing-results.mdx +60 -57
  210. package/docs-site/zh/tutorials/write-experiment.mdx +353 -0
  211. package/docs-site/zh/{how-to → tutorials}/write-send.mdx +40 -40
  212. package/package.json +10 -7
  213. package/src/agents/bub.ts +21 -8
  214. package/src/agents/claude-code.ts +23 -10
  215. package/src/agents/codex.test.ts +22 -7
  216. package/src/agents/codex.ts +22 -9
  217. package/src/agents/index.ts +2 -2
  218. package/src/agents/openai-compat.ts +1 -1
  219. package/src/agents/post-setup.ts +45 -22
  220. package/src/agents/streaming.ts +1 -1
  221. package/src/agents/types.ts +20 -17
  222. package/src/agents/ui-message-stream.test.ts +10 -0
  223. package/src/agents/ui-message-stream.ts +12 -1
  224. package/src/cli.ts +75 -59
  225. package/src/context/types.ts +21 -21
  226. package/src/define.ts +13 -0
  227. package/src/i18n/en.ts +27 -12
  228. package/src/i18n/zh-CN.ts +27 -12
  229. package/src/index.ts +2 -0
  230. package/src/o11y/prices.json +176 -99
  231. package/src/report/{react → assets}/colors.ts +22 -0
  232. package/src/report/{react → assets}/enhance.js +1 -33
  233. package/src/report/assets/styles.css +1785 -0
  234. package/src/report/built-in/index.tsx +2 -2
  235. package/src/report/built-in/standard.tsx +18 -6
  236. package/src/report/components/attempt-detail/AttemptAssertions.tsx +67 -0
  237. package/src/report/components/attempt-detail/AttemptConversation.tsx +158 -0
  238. package/src/report/components/attempt-detail/AttemptDiagnostics.tsx +38 -0
  239. package/src/report/components/attempt-detail/AttemptDiff.tsx +35 -0
  240. package/src/report/components/attempt-detail/AttemptError.tsx +31 -0
  241. package/src/report/components/attempt-detail/AttemptFixPrompt.tsx +26 -0
  242. package/src/report/components/attempt-detail/AttemptSource.tsx +224 -0
  243. package/src/report/components/attempt-detail/AttemptSummary.tsx +74 -0
  244. package/src/report/components/attempt-detail/AttemptTimeline.tsx +108 -0
  245. package/src/report/components/attempt-detail/AttemptTrace.tsx +63 -0
  246. package/src/report/components/attempt-detail/AttemptUsage.tsx +29 -0
  247. package/src/report/components/attempt-detail/attempt-components.test.tsx +758 -0
  248. package/src/report/components/attempt-detail/compute.ts +336 -0
  249. package/src/report/components/attempt-detail/faces.ts +260 -0
  250. package/src/report/components/attempt-detail/index.tsx +600 -0
  251. package/src/report/components/attempt-detail/validate.test.ts +252 -0
  252. package/src/report/{react → components}/cell.tsx +6 -3
  253. package/src/report/{report.test.ts → components/compute.test.ts} +316 -46
  254. package/src/report/{react → components/entity-lists}/AttemptList.tsx +24 -16
  255. package/src/report/{react → components/entity-lists}/EvalList.tsx +0 -0
  256. package/src/report/{react → components/entity-lists}/ExperimentList.tsx +33 -27
  257. package/src/report/components/entity-lists/compute.ts +196 -0
  258. package/src/report/components/entity-lists/faces.ts +208 -0
  259. package/src/report/components/entity-lists/index.tsx +238 -0
  260. package/src/report/components/entity-lists/validate.test.ts +114 -0
  261. package/src/report/{react → components}/fixtures.ts +2 -2
  262. package/src/report/{react → components/metric-views}/DeltaTable.tsx +5 -5
  263. package/src/report/{react → components/metric-views}/MetricBars.tsx +5 -5
  264. package/src/report/{react → components/metric-views}/MetricLine.tsx +9 -6
  265. package/src/report/{react → components/metric-views}/MetricMatrix.tsx +6 -6
  266. package/src/report/{react → components/metric-views}/MetricScatter.tsx +42 -70
  267. package/src/report/{react → components/metric-views}/MetricTable.tsx +6 -6
  268. package/src/report/{react → components/metric-views}/Scoreboard.tsx +4 -4
  269. package/src/report/{compute.ts → components/metric-views/compute.ts} +51 -477
  270. package/src/report/components/metric-views/faces.ts +423 -0
  271. package/src/report/components/metric-views/index.tsx +352 -0
  272. package/src/report/{text → components/metric-views}/plot.ts +1 -1
  273. package/src/report/components/metric-views/validate.test.ts +211 -0
  274. package/src/report/{react → components}/render.test.tsx +66 -26
  275. package/src/report/components/shared-compute.ts +59 -0
  276. package/src/report/components/shared-faces.ts +30 -0
  277. package/src/report/components/shared.ts +192 -0
  278. package/src/report/{react → components/site-components}/CopyFixPrompt.tsx +3 -3
  279. package/src/report/{react → components/site-components}/HeroCard.tsx +3 -3
  280. package/src/report/{react → components/site-components}/ScopeWarnings.tsx +4 -4
  281. package/src/report/{react → components/site-components}/TraceWaterfall.tsx +13 -10
  282. package/src/report/components/site-components/compute.ts +144 -0
  283. package/src/report/components/site-components/faces.ts +80 -0
  284. package/src/report/components/site-components/index.tsx +265 -0
  285. package/src/report/{scope-warnings.ts → components/site-components/scope-warnings.ts} +3 -3
  286. package/src/report/{site-components.test.tsx → components/site-components/site-components.test.tsx} +23 -21
  287. package/src/report/components/site-components/validate.test.ts +89 -0
  288. package/src/report/{react → components/summaries}/ScopeSummary.tsx +26 -11
  289. package/src/report/components/summaries/compute.ts +56 -0
  290. package/src/report/components/summaries/faces.ts +48 -0
  291. package/src/report/components/summaries/index.tsx +127 -0
  292. package/src/report/components/summaries/validate.test.ts +49 -0
  293. package/src/report/definition/grid-layout.test.ts +124 -0
  294. package/src/report/definition/grid-layout.ts +146 -0
  295. package/src/report/{primitives.tsx → definition/primitives.tsx} +168 -18
  296. package/src/report/{report.ts → definition/report.ts} +98 -165
  297. package/src/report/{shell-head.test.ts → definition/shell-head.test.ts} +2 -2
  298. package/src/report/{text/table.ts → definition/table-text.ts} +4 -4
  299. package/src/report/{tree.ts → definition/tree.ts} +56 -20
  300. package/src/report/index.ts +128 -66
  301. package/src/report/{aggregate.ts → model/aggregate.ts} +31 -9
  302. package/src/report/{flag.ts → model/flag.ts} +39 -1
  303. package/src/report/{format.ts → model/format.ts} +89 -10
  304. package/src/report/{locale.ts → model/locale.ts} +34 -36
  305. package/src/report/{metrics.ts → model/metrics.ts} +3 -3
  306. package/src/report/{types.ts → model/types.ts} +159 -22
  307. package/src/report/react/index.tsx +54 -26
  308. package/src/report/{dual-render.test.tsx → runtime/dual-render.test.tsx} +601 -53
  309. package/src/report/runtime/host.test.ts +44 -0
  310. package/src/report/runtime/host.ts +138 -0
  311. package/src/report/{load.ts → runtime/load.ts} +1 -1
  312. package/src/report/runtime/text.ts +192 -0
  313. package/src/report/runtime/web.ts +106 -0
  314. package/src/results/attempt-evidence.ts +5 -1
  315. package/src/results/host-equivalence.test.ts +53 -2
  316. package/src/results/select.ts +29 -5
  317. package/src/runner/attempt.test.ts +48 -1
  318. package/src/runner/attempt.ts +62 -42
  319. package/src/runner/cleanup-timeout.test.ts +16 -0
  320. package/src/runner/cleanup-timeout.ts +23 -0
  321. package/src/runner/discover.ts +1 -2
  322. package/src/runner/eval-selection.test.ts +187 -0
  323. package/src/runner/eval-selection.ts +109 -0
  324. package/src/runner/experiment-cleanup-registry.test.ts +89 -0
  325. package/src/runner/experiment-cleanup-registry.ts +39 -0
  326. package/src/runner/experiment-labels.test.ts +71 -0
  327. package/src/runner/feedback/agent.test.ts +33 -1
  328. package/src/runner/feedback/agent.ts +12 -16
  329. package/src/runner/feedback/ci.test.ts +35 -1
  330. package/src/runner/feedback/ci.ts +16 -18
  331. package/src/runner/feedback/coordinator.ts +28 -0
  332. package/src/runner/feedback/human.test.ts +108 -1
  333. package/src/runner/feedback/human.ts +71 -21
  334. package/src/runner/feedback/reducer.test.ts +64 -0
  335. package/src/runner/feedback/reducer.ts +26 -0
  336. package/src/runner/feedback/sink.ts +40 -1
  337. package/src/runner/fingerprint.ts +2 -1
  338. package/src/runner/report.test.ts +14 -0
  339. package/src/runner/report.ts +3 -1
  340. package/src/runner/run.test.ts +390 -12
  341. package/src/runner/run.ts +259 -26
  342. package/src/runner/sandbox-selection.test.ts +13 -3
  343. package/src/runner/sandbox-selection.ts +4 -2
  344. package/src/runner/types.ts +160 -24
  345. package/src/sandbox/docker.ts +7 -0
  346. package/src/sandbox/e2b-reconcile.test.ts +125 -0
  347. package/src/sandbox/e2b.ts +47 -12
  348. package/src/sandbox/types.ts +23 -21
  349. package/src/scoring/display.test.ts +28 -2
  350. package/src/scoring/display.ts +38 -5
  351. package/src/scoring/types.ts +3 -3
  352. package/src/shared/aggregate.test.ts +52 -0
  353. package/src/shared/aggregate.ts +29 -0
  354. package/src/shared/types.ts +6 -1
  355. package/src/show/command.test.ts +34 -0
  356. package/src/show/command.ts +16 -0
  357. package/src/show/compose.ts +1 -1
  358. package/src/show/index.ts +56 -20
  359. package/src/show/render.ts +15 -239
  360. package/src/show/show.test.ts +127 -34
  361. package/src/view/app/App.test.tsx +1 -1
  362. package/src/view/app/App.tsx +119 -47
  363. package/src/view/app/i18n.ts +7 -147
  364. package/src/view/app/lib/attempt-dialog.test.ts +65 -0
  365. package/src/view/app/lib/attempt-dialog.ts +69 -0
  366. package/src/view/app/main.tsx +0 -1
  367. package/src/view/app/types.ts +3 -86
  368. package/src/view/artifact-serving.test.ts +22 -38
  369. package/src/view/client-dist/app.css +1 -1
  370. package/src/view/client-dist/app.js +15 -22
  371. package/src/view/data.test.ts +48 -36
  372. package/src/view/data.ts +105 -83
  373. package/src/view/index.ts +1 -1
  374. package/src/view/server.ts +32 -2
  375. package/src/view/shared/types.ts +6 -31
  376. package/src/view/site-parity.test.ts +24 -1
  377. package/src/view/site.ts +144 -17
  378. package/src/view/styles.css +0 -805
  379. package/src/view/view-report.test.ts +143 -22
  380. package/dist/report/components.d.ts +0 -179
  381. package/dist/report/components.js +0 -544
  382. package/dist/report/compute.d.ts +0 -139
  383. package/dist/report/react/ExperimentComparison.d.ts +0 -10
  384. package/dist/report/react/ExperimentComparison.js +0 -12
  385. package/dist/report/react/MetricScatter.d.ts +0 -9
  386. package/dist/report/react/format.d.ts +0 -3
  387. package/dist/report/react/format.js +0 -7
  388. package/dist/report/text/faces.d.ts +0 -45
  389. package/dist/report/text/faces.js +0 -671
  390. package/dist/report/web.d.ts +0 -32
  391. package/dist/report/web.js +0 -48
  392. package/docs-site/zh/how-to/authoring.mdx +0 -162
  393. package/docs-site/zh/how-to/custom-reports.mdx +0 -414
  394. package/docs-site/zh/how-to/experiments.mdx +0 -86
  395. package/docs-site/zh/how-to/write-experiment.mdx +0 -164
  396. package/src/report/components.tsx +0 -925
  397. package/src/report/react/ExperimentComparison.tsx +0 -73
  398. package/src/report/react/format.ts +0 -9
  399. package/src/report/react/styles.css +0 -945
  400. package/src/report/text/faces.ts +0 -767
  401. package/src/report/web.ts +0 -77
  402. package/src/show/report-host.test.ts +0 -205
  403. package/src/show/report-host.ts +0 -389
  404. package/src/view/app/components/AttemptModal.tsx +0 -496
  405. package/src/view/app/components/CodeView.test.tsx +0 -142
  406. package/src/view/app/components/CodeView.tsx +0 -310
  407. package/src/view/app/components/CopyControls.tsx +0 -106
  408. package/src/view/app/components/Trace.tsx +0 -100
  409. package/src/view/app/components/Transcript.tsx +0 -157
  410. package/src/view/app/components/ui/badge.tsx +0 -21
  411. package/src/view/app/lib/artifact-url.ts +0 -17
  412. package/src/view/app/lib/attempt-route.test.ts +0 -80
  413. package/src/view/app/lib/attempt-route.ts +0 -52
  414. package/src/view/app/lib/format.ts +0 -70
  415. package/src/view/app/lib/guards.test.ts +0 -108
  416. package/src/view/app/lib/guards.ts +0 -71
  417. package/src/view/app/lib/rows.ts +0 -22
  418. package/src/view/app/lib/transcript-data.tsx +0 -151
  419. package/src/view/app/lib/verdict.ts +0 -23
  420. package/src/view/app/shared.ts +0 -8
  421. /package/dist/report/{react → components/metric-views}/chart-math.d.ts +0 -0
  422. /package/dist/report/{react → components/metric-views}/chart-math.js +0 -0
  423. /package/dist/report/{text → components/metric-views}/plot.d.ts +0 -0
  424. /package/dist/report/{react → components/site-components}/PoweredBy.d.ts +0 -0
  425. /package/dist/report/{react → components/site-components}/PoweredBy.js +0 -0
  426. /package/dist/report/{text/layout.d.ts → model/text-layout.d.ts} +0 -0
  427. /package/dist/report/{text/layout.js → model/text-layout.js} +0 -0
  428. /package/dist/report/{types.js → model/types.js} +0 -0
  429. /package/src/report/{react → components/metric-views}/chart-math.test.ts +0 -0
  430. /package/src/report/{react → components/metric-views}/chart-math.ts +0 -0
  431. /package/src/report/{react → components/site-components}/PoweredBy.tsx +0 -0
  432. /package/src/report/{text/layout.ts → model/text-layout.ts} +0 -0
@@ -1,29 +1,32 @@
1
1
  ---
2
2
  title: "查看 NiceEval 结果并调试 agent 行为"
3
3
  sidebarTitle: "查看结果"
4
- description: "每次运行写入 .niceeval/ 的结构化 artifact 有两扇门:niceeval show 在终端用 @<locator> 精确定位一次 Attempt,逐级下钻 Eval 源码、执行记录与 diff;niceeval view 在网页看同一份证据。"
4
+ description: " niceeval show 在终端按 @<locator> 查看 Attempt 的评估用例源码、执行记录与 diff,或用 niceeval view 在网页中查看同一份证据。"
5
5
  ---
6
6
 
7
- 每次运行后,[NiceEval](https://niceeval.com/) 都会把结构化结果写入该实验的**结果快照**目录 `.niceeval/<experiment>/<快照>/`。看结果有两扇门,读的是同一批 artifact:`niceeval show` 是终端读法,人和 coding agent 都能用;`niceeval view` 是网页读法,适合人浏览证据。两扇门共用判定公式、选结果规则和默认报告:对每个 experiment 的每道 eval,取时间上最新的那份判定,同一个 experiment 跨多次运行拼出来;再按 experiment id 的父目录分组,只在同组内比较。`show` 输出文本面,`view` 输出网页面。
7
+ 每次运行后,[NiceEval](https://niceeval.com/) 都会把结构化结果写入该实验的**结果快照**目录 `.niceeval/<experiment>/<快照>/`。快照记录本次运行实际选择的 `selectedEvalIds`;`show` / `view` 直接比较当前 Scope 中的 experiments。
8
8
 
9
9
  ## 控制台输出
10
10
 
11
11
  ```text
12
- Plan: 45 attempts · 9 evals × 5 configs · concurrency 19
12
+ ╭─ PLAN ─────────────────────────────────────────────────────────────────────────╮
13
+ │ 45 attempts · 9 evals × 5 configs · concurrency 19 │
14
+ │ 6 of 45 carried in from cache · 39 to run │
15
+ ╰────────────────────────────────────────────────────────────────────────────────╯
13
16
  ✗ @12h8m4k1 fixtures/button [compare/claude-e2b] errored · sandbox.create
14
17
  sandbox-rate-limit: E2B sandbox allocation failed after 5 attempts
15
18
  Inspect: niceeval show @12h8m4k1
16
19
 
17
- niceeval exp compare 2m 14s
18
- 45 total · 6 reused · 19 running · 12 queued · 8 completed $0.84
19
-
20
- ACTIVE
21
- ● memory/agent-029-use-cache compare/bub-e2b 1m 42s running tests
22
- memory/agent-030-app-route compare/codex 1m 18s editing src/app.ts
23
- 17 more active
20
+ ╭─ niceeval exp compare ──────────────────────────────────────────────── 2m 14s ─╮
21
+ 45 total · 6 reused · 19 running · 12 queued · 8 completed
22
+ ├─ ACTIVE ───────────────────────────────────────────────────────────────────────┤
23
+ │ ● memory/agent-029-use-cache compare/bub-e2b 1m 42s running tests │
24
+ ● memory/agent-030-app-route compare/codex 1m 18s editing src/app.ts │
25
+ 17 more active │
26
+ ╰──────────────────────────────────────────────────────────────────────── $0.84 ─╯
24
27
  ```
25
28
 
26
- Human profile 只原位更新当前总数和 active slots,不把历史帧推入 scrollback。失败、错误和去重后的 diagnostic 永久追加,并带 locator。结束块只保留摘要、失败 locator、下钻命令和结果路径。这段输出怎么进「跑→读→修→再跑」的循环,见 [Agent 反馈闭环](/zh/how-to/agent-feedback-loop)。
29
+ 在终端里跑的时候,运行中的那个框会原位刷新总数和 active slots,不把历史帧推进 scrollback;失败、错误和去重后的 diagnostic 以无框行留下来,都带 locator。输出被管道接走或终端太窄时,同样的内容会退化成不带框的纯文本。跑完框会换成结论、失败清单和下一步命令三块。完整的运行、读取、修复与重跑流程见 [Coding Agent 反馈闭环](/zh/tutorials/agent-feedback-loop)。
27
30
 
28
31
  ## `.niceeval/<experiment>/<快照>/`
29
32
 
@@ -45,14 +48,14 @@ Human profile 只原位更新当前总数和 active slots,不把历史帧推
45
48
 
46
49
  ## `niceeval show`:终端下钻
47
50
 
48
- `niceeval show` 的位置参数有两种形态:eval id 前缀选「看哪些 eval」,`@<locator>` 精确指名「看哪一次 Attempt」。flag 选「看哪个切面」:
51
+ `niceeval show` 的位置参数有两种形态:评估用例 ID 前缀选择评估用例范围,`@<locator>` 精确指定一次 Attempt。Flag 选择证据类型:
49
52
 
50
53
  ```bash
51
- niceeval show # 默认报告:按实验组分区,组内比较配置并下钻到 Attempt
54
+ niceeval show # 默认报告:比较当前 Scope 并下钻到 Attempt
52
55
  niceeval show weather # 前缀过滤:weather/* 下每个 eval 的判定
53
56
  niceeval show weather/brooklyn # 单个 eval:各 experiment 的 attempt 行(含 @<locator>)、默认 attempt 的断言明细
54
- niceeval show @1k2m9qrs # 精确到一次 Attempt:紧凑全景(断言/执行/diff 摘要 + 可用证据一览)
55
- niceeval show @1k2m9qrs --eval # 该 Attempt 运行时保存的 Eval 源码,断言标回源码行
57
+ niceeval show @1k2m9qrs # 精确到一次 Attempt:断言、执行、diff 与可用证据摘要
58
+ niceeval show @1k2m9qrs --source # 该 Attempt 运行时保存的 Eval 源码,断言标回源码行
56
59
  niceeval show @1k2m9qrs --execution # 该 Attempt 的消息、thinking、Skill 加载、工具调用,有 OTel 时补时间
57
60
  niceeval show @1c3h6twx --timing # 有界诊断时间树:phase、hook、operation、shell、turn、OTel 与收尾
58
61
  niceeval show @1c3h6twx --timing=full # 同一棵时间树逐节点完整展开
@@ -64,18 +67,18 @@ niceeval show weather/brooklyn --history # 跨 run 时间轴:抖动与回
64
67
 
65
68
  Sandbox 创建、setup 或 teardown 错误不依赖 trace。`result.json` 保存错误的 `code`、`message`、生命周期阶段(`phase`)、有限 cause/stack 和 diagnostics;trace 只在存在时补调用关系与耗时。Attempt 在 cleanup、teardown 和 sandbox stop 结束后才封口写入,因此收尾 diagnostic 也能回顾。
66
69
 
67
- 同一个实验多次跑会留下多份结果,不带 `@<locator>` 的默认视图只回答一个问题——「现在整体怎样」:每个 experiment × eval 取时间上最新的那份判定,同一个 experiment 跨多次运行拼出来。按前缀只重跑了部分 eval 时,其余 eval 的判定从更早的运行补齐,报告永远是全局最新,不会因为一次局部重跑变残缺。合成是有标注的:每份判定都带上它产生的时间,能看出报告是从哪几次运行拼出来的。合成结果可能混着不同版本的被测代码——所以收工判定以 `--force` 全量重跑为准,迭代途中的 `show` 负责快、收尾的全量跑负责真。
70
+ 同一个 Experiment 多次运行会留下多份结果。不带 `@<locator>` 的默认视图显示每个 Experiment × 评估用例最新的判定,并可能从同一个 Experiment 的多次运行中组合结果。按前缀只重跑部分评估用例时,其余评估用例的判定从更早的运行补齐。每份判定都带有生成时间,因此可以识别组合结果的来源。组合结果可能包含不同版本的被测代码,最终判定应以 `--force` 全量重跑为准。
68
71
 
69
- 单个 eval 视图里,多 experiment、多 Attempt 时的断言明细块默认挑最新一次失败的 Attempt 展开;没有失败就挑最新一次。这只是一个默认展开的启发式,不是精确选择——需要精确看某一次 Attempt,复制那一行的 `@<locator>` 直接 `show` 它即可。`--exp compare` 按路径段前缀把 Selection 收窄到整个 `compare` 组,`--exp compare/bub` 只留一个 experiment;`--results <目录>` 换结果根,`--snapshot <snapshot.json>` 只看某一次落盘的快照,`--history` 看跨 run 趋势。`--report <文件>` 同时替换 `show` / `view` 的默认报告。位置前缀、`--results`、`--exp` 对自定义报告同样生效;`--history` 与 `--report` 互斥。
72
+ 单个评估用例视图里,多 experiment、多 Attempt 时默认展开最新一次失败的 Attempt;需要精确查看就复制该行的 `@<locator>`。`--exp agents/codex` experiment id 路径收窄;`--results` 换结果根,`--snapshot` 只看某一次快照。
70
73
 
71
74
  `niceeval view` 的每个视图都有 CLI 对应物:
72
75
 
73
76
  | `niceeval view` 里的视图 | 终端对应 |
74
77
  | --- | --- |
75
78
  | 当前结果的分组比较报告 | `niceeval show` |
76
- | eval 各 experiment 的判定行 + 默认 attempt 的断言明细 | `niceeval show <eval id>` |
77
- | 单次 Attempt 的紧凑全景(断言、执行、diff 摘要与证据可用性) | `niceeval show @<locator>` |
78
- | Eval 源码标注(断言标回源码行) | `niceeval show @<locator> --eval` |
79
+ | 该评估用例各 experiment 的判定行 + 默认 attempt 的断言明细 | `niceeval show <eval id>` |
80
+ | 单次 Attempt 摘要(断言、执行、diff 与证据可用性) | `niceeval show @<locator>` |
81
+ | 评估用例源码标注(断言标回源码行) | `niceeval show @<locator> --source` |
79
82
  | AI 对话、thinking、Skill 加载与工具调用(有 OTel 时补时间) | `niceeval show @<locator> --execution` |
80
83
  | 单次 Attempt 的阶段耗时分解 | `niceeval show @<locator> --timing`;逐节点审计用 `--timing=full` |
81
84
  | 文件改动 | `niceeval show @<locator> --diff` |
@@ -83,11 +86,11 @@ Sandbox 创建、setup 或 teardown 错误不依赖 trace。`result.json` 保存
83
86
 
84
87
  ### 默认分组比较报告
85
88
 
86
- 不带 flag 的 `niceeval show` 如果命中多个可比组,只列组索引和可直接执行的 `niceeval show --exp <group>` 命令;Selection 只剩一个组时才输出该组的成本 × 端到端成功率图和实验列表。组的边界来自 experiment id 的完整父目录:`compare/*` `dev-e2b/*` 不共享坐标系、连线、排序或汇总数字;顶层 experiment 各自形成单例组。
89
+ 不带 flag 的 `niceeval show` 直接输出当前 Scope 的成本 × 端到端成功率图和实验列表。每个 experiment eval 数与指标分母读取其快照 `selectedEvalIds`;未选择的评估用例不补成失败。
87
90
 
88
- 组内实验列表先给固定列汇总,再按 experiment → Eval → Attempt 展开。locator 只保留 `@<id>`,失败原因优先显示期望值/实际值或命令退出码;完整断言和 evidence 留在 `niceeval show @<locator>`。某组只有一个 experiment 时散点仍显示单点,不出现“至少两个实验才能比较”的空态。快照未完成、过旧或覆盖不全的 warning 位于组索引前,同一条 warning 只显示一次。
91
+ 实验列表先给固定列汇总,再按 experiment → 评估用例 → Attempt 展开。locator 只保留 `@<id>`;完整断言和 evidence 留在 `niceeval show @<locator>`。只有一个 experiment 时散点仍显示单点。
89
92
 
90
- ### 单个 eval
93
+ ### 单个评估用例
91
94
 
92
95
  ```text
93
96
  $ niceeval show weather/brooklyn
@@ -103,14 +106,14 @@ attempt 3 · compare/codex-gpt-5.4 · failed · 41.2s · 12.3k tokens · $0.04
103
106
 
104
107
  artifacts: .niceeval/compare_codex-gpt-5.4/2026-07-09T10-00-00-000Z-x1f2/weather/brooklyn/a2/
105
108
  attempt locator: @1k2m9qrs
106
- next: niceeval show @1k2m9qrs [--eval|--execution]
109
+ next: niceeval show @1k2m9qrs [--source|--execution]
107
110
  ```
108
111
 
109
112
  每个 experiment 一行的紧凑索引末尾就带着代表 attempt 的 `@<locator>`(`compare/bub-gpt-5.4` 只有一次 attempt 就代表它自己,`compare/codex-gpt-5.4` 代表的是默认展开的那一次失败);展开的明细块结尾再重复一次精确的 `attempt locator:`,两处给的是同一个值。想看别的 attempt(比如 `compare/codex-gpt-5.4` 更早失败的那次),去 `--history` 或 artifact 目录里找到它的 locator,`niceeval show @<locator>` 直接跳过去,不需要先回到这张列表。
110
113
 
111
- ### `@<locator>`:一次 Attempt 的全景
114
+ ### `@<locator>`:一次 Attempt 的摘要
112
115
 
113
- 不带证据 flag 的 `niceeval show @<locator>` 是失败诊断首页:除断言计票外,失败项直接列 group、matcher、expected、received、原因和源码位置;随后给 Eval 源码是否可用、Agent 事件计数、OTel 计时可用性与工作区 diff 摘要。通常这一页已经能回答“为什么失败”,需要解释 Agent 为什么产生该结果时再打开证据切面:
116
+ 不带证据 flag 的 `niceeval show @<locator>` 是失败诊断首页:除断言计票外,失败项直接列 group、matcher、expected、received、原因和源码位置;随后给出评估用例源码可用性、Agent 事件计数、OTel 计时可用性与工作区 diff 摘要。该页用于定位失败原因;需要追查 Agent 结果的来源时,再打开对应证据视图:
114
117
 
115
118
  ```text
116
119
  $ niceeval show @1k2m9qrs
@@ -134,21 +137,21 @@ changes: diff unavailable · no workspace diff was recorded for this attempt
134
137
 
135
138
  artifacts: .niceeval/compare_codex-gpt-5.4/2026-07-09T10-00-00-000Z-x1f2/weather/brooklyn/a2/
136
139
  available:
137
- niceeval show @1k2m9qrs --eval
140
+ niceeval show @1k2m9qrs --source
138
141
  niceeval show @1k2m9qrs --execution
139
142
  niceeval show @1k2m9qrs --timing
140
143
  ```
141
144
 
142
- 这份全景只给摘要,不复现某个切面的完整内容——完整源码、完整事件流或完整文件列表分别要对应的证据 flag 才给。`changes` 一行永远说明 diff 不可用的具体原因:这里是「这次 Attempt 从未收集过 diff」(`weather/brooklyn` 不是 sandbox eval,压根不会有工作区改动可收集);如果是 sandbox eval 但 agent 确实没碰任何文件,会是另一句「没有产生工作区文件改动」;两种「不可用」原因不同,不共用一句含糊的提示。
145
+ 该视图只给摘要,不复现完整证据。完整源码、事件流和文件列表分别由对应的证据 flag 展开。`changes` 行会说明 diff 不可用的具体原因:此处的 `weather/brooklyn` 不是 Sandbox 评估用例,因此从未收集工作区改动;Sandbox 评估用例未修改文件时则显示「没有产生工作区文件改动」。
143
146
 
144
- ### `--eval`、`--execution`、`--timing`、`--diff`:四个证据切面
147
+ ### `--source`、`--execution`、`--timing`、`--diff`:四个证据切面
145
148
 
146
- 四个证据 flag 既可以加在 `@<locator>` 后面(精确到一次 Attempt),也可以加在能唯一收窄到一个 eval 的前缀后面(挑同一套默认启发式选中的 attempt——最新一次失败,没有失败就挑最新一次,与单 eval 详情块展开的是同一次);前缀撞到不止一个 eval 时会报错,报错正文直接给出每个候选 eval 的 `@<locator>`,照抄一个继续即可。可以同时传多个证据 flag,一次输出全部要看的切面。
149
+ 四个证据 flag 既可以加在 `@<locator>` 后面(精确到一次 Attempt),也可以加在能唯一收窄到一个评估用例的前缀后面(挑同一套默认启发式选中的 attempt——最新一次失败,没有失败就挑最新一次,与单个评估用例详情块展开的是同一次);前缀撞到不止一个评估用例时会报错,报错正文直接给出每个候选评估用例的 `@<locator>`,照抄一个继续即可。可以同时传多个证据 flag,一次输出全部要看的切面。
147
150
 
148
- `--eval` 是运行时保存的 Eval 源码,按行标注每条断言、gate 失败与 soft 分数直接排在对应源码行下面,源码里没能对应到具体行的断言(没有位置信息,或位置指向另一个文件)单独成一段,永不丢弃:
151
+ `--source` 是运行时保存的评估用例源码,按行标注每条断言、gate 失败与 soft 分数直接排在对应源码行下面,源码里没能对应到具体行的断言(没有位置信息,或位置指向另一个文件)单独成一段,永不丢弃:
149
152
 
150
153
  ```text
151
- $ niceeval show @1k2m9qrs --eval
154
+ $ niceeval show @1k2m9qrs --source
152
155
  @1k2m9qrs · weather/brooklyn · compare/codex-gpt-5.4 · failed
153
156
 
154
157
  eval source: evals/weather/brooklyn.eval.ts · sha256:a3fa4555…
@@ -170,7 +173,7 @@ assertions: 1 passed · 1 gate failed · 1 soft below target
170
173
  full eval source: .niceeval/compare_codex-gpt-5.4/2026-07-09T10-00-00-000Z-x1f2/weather/brooklyn/a2/sources.json
171
174
  ```
172
175
 
173
- 它展示的是**这次 Attempt 运行当时保存的源码**,不是当前工作区里同名文件的最新内容——eval 改过之后再看旧 Attempt,看到的仍是它跑的那一版。没有捕获到源码时如实说明「eval source unavailable for this attempt」,不伪造一份空文档。
176
+ 它展示的是**这次 Attempt 运行当时保存的源码**,不是当前工作区里同名文件的最新内容——评估用例改过之后再看旧 Attempt,看到的仍是它跑的那一版。没有捕获到源码时如实说明「eval source unavailable for this attempt」,不伪造一份空文档。
174
177
 
175
178
  `--execution` 把标准事件流(消息、thinking、Skill 加载、工具调用/结果、subagent、错误)排成一棵执行树;这次 Attempt 接入过 OTel 时,同一节点能关联到的 span 会补上相对时间与耗时。无法关联到 Agent 事件的 SDK / runtime span 不逐行混入执行记录,只在结尾报告省略数量并指向完整 `trace.json`。没接入 OTel 时骨架、顺序和内容不变,只去掉时间列并标 `timing unavailable`:
176
179
 
@@ -189,7 +192,7 @@ full events: .niceeval/compare_codex-gpt-5.4/2026-07-09T10-00-00-000Z-x1f2/weath
189
192
  full OTel trace: .niceeval/compare_codex-gpt-5.4/2026-07-09T10-00-00-000Z-x1f2/weather/brooklyn/a2/trace.json
190
193
  ```
191
194
 
192
- 这次 Attempt 只有两条消息、没有任何工具调用节点——这正是上面 `calledTool("get_weather")` 这条 gate 断言失败的原因,`--execution` 在这里直接印证了 `--eval` 那份断言标注。有 Skill 加载和工具调用时,`--execution` 把它们按发生顺序一起排进同一棵树,工具调用拆成「调用」与「结果」两行读:
195
+ 这次 Attempt 只有两条消息、没有任何工具调用节点——这正是上面 `calledTool("get_weather")` 这条 gate 断言失败的原因,`--execution` 在这里直接印证了 `--source` 那份断言标注。有 Skill 加载和工具调用时,`--execution` 把它们按发生顺序一起排进同一棵树,工具调用拆成「调用」与「结果」两行读:
193
196
 
194
197
  ```text
195
198
  $ niceeval show @1c3h6twx --execution
@@ -234,7 +237,7 @@ timing unavailable · OTel trace was not collected
234
237
  full events: .niceeval/compare_codex-gpt-5.4/2026-07-09T10-00-00-000Z-x1f2/weather/brooklyn/a2/events.json
235
238
  ```
236
239
 
237
- `--timing` 回答「整个 Attempt 的时间花在哪里」。runner 把 lifecycle、setup/teardown hook、批量工作的 operation、所有经 Sandbox API 发出的 shell 命令,以及每个 session/turn 的 send 墙钟包络记进 `result.json`;某轮有 OTel 时,再按 `traceId` 把 agent/model/tool span 挂到该轮下面。没有 OTel 时,phase、hook、operation、shell 与 turn 时间仍完整,只缺轮内细分。出错或超时的 Attempt 在已知的最深节点用 `✗` 标出死在哪里:
240
+ `--timing` 显示整个 Attempt 的阶段耗时。Runner 把 lifecycle、setup/teardown hook、批量工作的 operation、所有经 Sandbox API 发出的 shell 命令,以及每个 session/turn 的 `send` 墙钟时间记入 `result.json`。某轮有 OTel 时,再按 `traceId` 把 Agent、modeltool span 挂到该轮下面。没有 OTel 时,phase、hook、operation、shell 与 Turn 时间仍完整,只缺轮内细分。出错或超时的 Attempt 会在已知的最深节点用 `✗` 标出:
238
241
 
239
242
  ```text
240
243
  $ niceeval show @1c3h6twx --timing
@@ -271,9 +274,9 @@ sandbox.stop 1.2s
271
274
 
272
275
  裸 `--timing` 会完整列出 phase,并把 phase 下的细节控制在 80 个节点内。超过上限时,它优先保留失败路径、最慢节点与首尾时序,在省略位置显示节点数、未展示的失败数,并给出 `--timing=full`。小树中两种模式输出相同;`--timing=full` 不设节点上限,适合审计旧结果或把完整树重定向到文件。NiceEval 不自动启动 pager,因此管道、CI 和 coding agent 不会等待键盘输入。命令可能并发,省略行不会把子节点耗时相加。
273
276
 
274
- operation 的名称由执行这段工作的组件在采集时写入。例如一次 workspace diff 导出可以显示成 `export workspace diff · 1 window · 3,302 files`,下面只有一条真实的批量 shell。展示层不会解析 `git show` 等命令文本、猜出一个 `git show ×N` 分组;如果旧 artifact 确实记录了几千次调用,默认模式有界摘要,`--timing=full` 仍能逐条核对。一次超时到底是 Sandbox 创建慢、某条安装命令慢,还是一轮里的模型/工具慢,`--timing` 一眼可判。旧结果或第三方写入的结果没有阶段数据时,两种模式都如实提示 `phase timing unavailable`。
277
+ Operation 名称由执行工作的组件在采集时写入。例如一次 Workspace diff 导出可以显示为 `export workspace diff · 1 window · 3,302 files`,并包含一条真实的批量 shell。展示层不会解析 `git show` 等命令文本来推测 `git show ×N` 分组。旧 artifact 记录大量调用时,默认模式提供有界摘要,`--timing=full` 可以逐条核对。`--timing` 会分别显示 Sandbox 创建、安装命令和轮内模型或工具耗时。旧结果或第三方结果没有阶段数据时,两种模式都会提示 `phase timing unavailable`。
275
278
 
276
- `--diff` 默认给文件级摘要(落盘的 diff 只有改动后的全文,没有基线可比对增删行数,所以每个改动过的文件都标 `M`、后面跟它现在的行数,不区分新建与修改);看单个文件的完整内容用 `--diff=<文件路径>`——路径必须用 `=` 连写,位置参数永远留给 eval id 前缀 / `@<locator>`:
279
+ `--diff` 默认给文件级摘要(落盘的 diff 只有改动后的全文,没有基线可比对增删行数,所以每个改动过的文件都标 `M`、后面跟它现在的行数,不区分新建与修改);看单个文件的完整内容用 `--diff=<文件路径>`——路径必须用 `=` 连写,位置参数永远留给评估用例 id 前缀 / `@<locator>`:
277
280
 
278
281
  ```text
279
282
  $ niceeval show @1c3h6twx --diff
@@ -296,17 +299,17 @@ $ niceeval show @1c3h6twx --diff=src/components/Button.tsx
296
299
  1. 运行 niceeval show,找到失败或出错的 eval,从紧凑索引里摘一个 @<locator>。
297
300
  2. 运行 niceeval show <eval-id>,读取该题各 experiment 的判定、默认 attempt 的断言明细,
298
301
  以及每行末尾的 @<locator>。
299
- 3. 运行 niceeval show @<locator>,看紧凑全景确认这次 Attempt 实际捕获到了哪些证据。
300
- 4. 按问题选择 --eval、--execution、--timing 或 --diff;可以同时传多个证据 flag。
302
+ 3. 运行 niceeval show @<locator>,从摘要确认这次 Attempt 捕获的证据类型。
303
+ 4. 按问题选择 --source、--execution、--timing 或 --diff;可以同时传多个证据 flag。
301
304
  5. 输出被截断时,读取末尾标出的 sources.json、events.json、trace.json 或 diff.json 原始路径。
302
305
  6. 修复后重跑该 eval,再用 niceeval show <eval-id> 验证新的 @<locator>;收工前用 --force 全量重跑确认整体结果。
303
306
  ```
304
307
 
305
- `--eval` 回答“这道题实际检查了什么、哪条断言为什么过或没过”,`--execution` 回答“agent 做了什么、调用了什么”(可关联时附 OTel 时间),`--timing` 回答“整个 Attempt 的时间花在哪里”,`--diff` 回答“沙箱里的文件实际改成了什么”。先按问题选证据,不需要每次把四份都读完。
308
+ `--source` 显示评估用例检查内容和断言结果,`--execution` 显示 Agent 消息与调用(可关联时附 OTel 时间),`--timing` 显示 Attempt 各阶段耗时,`--diff` 显示 Sandbox 文件改动。按诊断目标选择证据,不需要每次读取全部四种视图。
306
309
 
307
310
  ### 历史与抖动:`--history`
308
311
 
309
- 榜单和单个 eval 视图回答「现在」;「这个 eval 稳不稳」「什么时候开始坏的」问的是趋势。`--history` 给跨 run 时间轴,每次真实执行一行:
312
+ 默认报告和单个评估用例视图显示最新判定。`--history` 用跨 run 时间轴显示稳定性和回归起点,每次真实执行一行:
310
313
 
311
314
  ```text
312
315
  $ niceeval show weather/brooklyn --history
@@ -319,9 +322,9 @@ compare/codex-gpt-5.4 · 5 runs · passed 2/5
319
322
  2026-07-07T16-40 ✗ failed 3 attempts $0.05 gate calledTool("get_weather")
320
323
  ```
321
324
 
322
- ✓✗ 交替说明这个 eval 在抖,该修的是稳定性(被测程序或断言),反复重跑碰运气只会烧钱;连续绿转红的拐点就是回归引入的位置,用 `view --snapshot <snapshot.json>` 钉住拐点前后两次细看。时间轴只列真实执行——缓存携带的旧结果是判定的复印件,不占行,否则趋势会被复印件灌满假数据。不带 eval id 的 `niceeval show --history` 给每个 experiment 的 per-run 通过率序列,同一份趋势的榜单视角。
325
+ ✓✗ 交替说明这个评估用例在抖,该修的是稳定性(被测程序或断言),反复重跑碰运气只会烧钱;连续绿转红的拐点就是回归引入的位置,用 `view --snapshot <snapshot.json>` 钉住拐点前后两次细看。时间轴只列真实执行——缓存携带的旧结果是判定的复印件,不占行,否则趋势会被复印件灌满假数据。不带评估用例 id 的 `niceeval show --history` 给每个 experiment 的 per-run 通过率序列,同一份趋势的榜单视角。
323
326
 
324
- 两次 run 的精确对比(这次修复具体翻转了哪些 eval)不做成 flag:用 `DeltaTable` 积木写一份报告递给 `--report`,几行就是一份自定义对比报告,终端和网页两扇门都认——内置命令只管固定摆法,自定义口径见[自定义报告](/zh/how-to/custom-reports)。
327
+ 两次 run 的精确对比不提供专用 flag。使用 `DeltaTable` 组件编写自定义对比报告,再把文件传给 `--report`;终端和网页会渲染同一份报告。具体写法见[自定义报告](/zh/tutorials/custom-reports)。
325
328
 
326
329
  ## `niceeval view`:在网页看证据
327
330
 
@@ -329,19 +332,19 @@ compare/codex-gpt-5.4 · 5 runs · passed 2/5
329
332
  npx niceeval view
330
333
  ```
331
334
 
332
- 这会打开本地结果查看器。它的首页报告和 `niceeval show` 选结果的规则一模一样:对每个 experiment 的每道 eval,取时间上最新的那份判定,同一个 experiment 跨多次运行拼出来;收窄范围(eval ID 前缀、`--exp`)时按同一条规则收窄。你可以浏览 eval、查看 agent 的对话与工具调用、读 diff、检查断言结果。数据不会上传到外部服务。
335
+ 这会打开本地结果查看器。它的首页报告和 `niceeval show` 选结果的规则一模一样:对每个 experiment 的每道评估用例,取时间上最新的那份判定,同一个 experiment 跨多次运行拼出来;收窄范围(评估用例 ID 前缀、`--exp`)时按同一条规则收窄。你可以浏览评估用例、查看 agent 的对话与工具调用、读 diff、检查断言结果。数据不会上传到外部服务。
333
336
 
334
337
  <Tip>
335
338
  失败后立刻运行 `npx niceeval view`,可以直接打开刚刚那次运行的 artifacts。
336
339
  </Tip>
337
340
 
338
- `view` 的首页是一份报告:不传 `--report` 时完整加载当前结果并显示全部可比组索引,选中一组后只显示该组的成本 × 端到端成功率散点图与实验表。切组只改变页面状态,不重新读取或计算;不同组不会混进同一张图或榜单。浏览器禁用 JS 时,每组作为独立的 `<details>` 完整可读;启用 JS 后一次聚焦一组。传了 `--report` 就换成你自己的报告(与 `show --report` 吃同一个文件),页面与导航完全由报告文件决定,见[自定义报告](/zh/how-to/custom-reports)。Attempt 详情(弹窗里的 transcript、时间树、tracediff)始终可用——它是查看器自身的能力,报告里的每个数字点进去都是对应证据;默认报告另有 Attempts 列表页和追踪瀑布页,自己的报告要同款页面就摆同名组件。
341
+ `view` 的首页直接显示当前 Scope 的摘要、成本 × 端到端成功率散点图与实验表。传 `--report` 就换成自己的报告。Attempt 详情里的 transcript、时间树、tracediff 始终可用。
339
342
 
340
- 网页版多几样浏览操作:切换可比组、点表头就地排序、在当前组的过滤框里筛行、点开一个 experiment 行看它每道题的判定与原因、悬停散点看数值——这些只影响眼前的视图,不改判定口径,刷新即恢复。Attempt 弹窗里有与 `show --timing` 同源的统一时间树:Sandbox 启动、setup hook 及其 shell、agent 安装命令、每轮 send 与可关联的 OTel model/tool、评分与收尾都能逐层展开。默认报告页里有 **Copy fix prompt** 按钮(`CopyFixPrompt` 组件,自己的报告可以直接摆同款),把全部失败打包成可直接粘给 coding agent 的修复 prompt(attempt 弹窗里有单条版)。报告文案有中英两份,随界面语言切换。
343
+ 网页版可以排序实验表、筛行、展开 experiment、悬停散点看数值;这些操作不改判定口径。
341
344
 
342
345
  ## 导出与静态托管
343
346
 
344
- 发布结果只有一种导出:`--out <目录>` 整站导出,完整带上能查看的一切。想要自己的页面形态,用报告积木自建(见[自定义报告](/zh/how-to/custom-reports))。
347
+ 发布结果使用 `--out <目录>` 导出完整静态站。需要自定义页面时,使用报告组件编写报告,见[自定义报告](/zh/tutorials/custom-reports)
345
348
 
346
349
  ### 内置查看器整站:静态托管
347
350
 
@@ -354,7 +357,7 @@ NiceEval 写入 `<dir>/index.html`,并把查看器要读取的 artifact(`sou
354
357
  只想发布一部分结果时,把本地查看用的收窄直接交给导出:
355
358
 
356
359
  ```bash
357
- npx niceeval view --exp compare --out site # 只发布 compare 可比组
360
+ npx niceeval view --exp agents/codex --out site # 只发布一个 experiment 路径范围
358
361
  npx niceeval view weather --out site # 只发布 weather 开头的 eval
359
362
  ```
360
363
 
@@ -369,7 +372,7 @@ npx niceeval view weather --out site # 只发布 weather 开头
369
372
  - `o11y.json` 不会被复制——报告数字已经算进页面,查看器不读取它。
370
373
  - 用 `file://` 直接打开 `index.html` 时浏览器不允许 fetch artifact,代码视图会提示源码不可用。本地预览用 http 服务打开。
371
374
 
372
- 最简单的流程是在跑过 eval 的机器上导出,把产物目录直接部署,不需要额外步骤。要让站点随 push 自动更新,先用 `copySnapshots` 生成经过单文件预算检查的发布结果根,把它提交进仓库,再让 CI 对这个目录运行 `view --results <目录> --out`——workflow 与平台接线见[通过 CI 发布报告](/zh/how-to/publish-report)。
375
+ 最短流程是在运行评估用例的机器上导出并直接部署产物目录。要让站点随 push 自动更新,先用 `copySnapshots` 生成经过单文件预算检查的发布结果根并提交到仓库,再让 CI 对该目录运行 `view --results <目录> --out`。Workflow 与托管平台配置见[通过 CI 发布报告](/zh/tutorials/publish-report)。
373
376
 
374
377
  ## Artifact 说明
375
378
 
@@ -387,15 +390,15 @@ npx niceeval view weather --out site # 只发布 weather 开头
387
390
 
388
391
  ### `diff.json`
389
392
 
390
- Sandbox eval agent 改动的文件 diff。
393
+ Sandbox 评估用例中 agent 改动的文件 diff。
391
394
 
392
395
  ### `sources.json`
393
396
 
394
- eval 源码位置和断言位置,用于查看器把失败断言对应回代码。
397
+ 评估用例源码位置和断言位置,用于查看器把失败断言对应回代码。
395
398
 
396
399
  ### `trace.json`
397
400
 
398
- OTLP trace 或标准化后的 span 数据。它是可选的执行关系和耗时证据,不是错误存储:沙箱创建(`sandbox.create`)可能早于 telemetry,teardown 可能晚于 trace collect。
401
+ OTLP trace 或标准化后的 span 数据。它是可选的执行关系和耗时证据,不是错误存储:Sandbox 创建(`sandbox.create`)可能早于 telemetry,teardown 可能晚于 trace collect。
399
402
 
400
403
  ### `o11y.json`
401
404
 
@@ -407,7 +410,7 @@ OTLP trace 或标准化后的 span 数据。它是可选的执行关系和耗时
407
410
  <Tab title="passed">所有 gate 通过。</Tab>
408
411
  <Tab title="failed">至少一个 gate 失败,或 `--strict` 下 soft 断言低于阈值。</Tab>
409
412
  <Tab title="errored">环境、超时、adapter 或 agent runtime 出错。</Tab>
410
- <Tab title="skipped">eval 被主动跳过。</Tab>
413
+ <Tab title="skipped">评估用例被主动跳过。</Tab>
411
414
  </Tabs>
412
415
 
413
416
  Soft 断言的分数记录在 `assertions[].score` 里;非 `--strict` 模式下,它们不会产生额外的 verdict。
@@ -415,8 +418,8 @@ Soft 断言的分数记录在 `assertions[].score` 里;非 `--strict` 模式
415
418
  ## 调试建议
416
419
 
417
420
  - 榜单里失败/错误的题每条自带下钻命令:`niceeval show <eval id>` 先看断言明细,行尾的 `@<locator>` 可以直接精确下钻到某一次 Attempt。
418
- - 想知道 eval 实际检查了什么、断言为什么过或没过,看 `--eval`(标回源码行的断言标注)。
419
- - 想知道 agent 做了什么、调用了什么,看 `--execution`;关联成功的 OTel 时间会贴在同一事件旁。
421
+ - 检查评估用例内容和断言结果时使用 `--source`,断言标注会对应到源码行。
422
+ - 检查 Agent 消息和调用时使用 `--execution`;关联成功的 OTel 时间会显示在同一事件旁。
420
423
  - coding-agent 失败时看 `--diff` 和 `--execution` 里的工具调用;两者结合能看出「改错了文件」还是「压根没调用该调用的工具」。
421
- - Sandbox eval 跑得慢或超时,先看 `--timing`:排队、Sandbox 启动、setup hook 里的每条 shell、agent 安装命令、每轮 send 与可关联的 OTel model/tool 各花多久,一眼可判;收尾卡住也在这里单独列出。
422
- - 判断缺陷在被测程序还是 eval 本身、修完怎么重跑,流程见 [Agent 反馈闭环](/zh/how-to/agent-feedback-loop)。
424
+ - Sandbox 评估用例运行缓慢或超时时,先看 `--timing`。该视图分别列出排队、Sandbox 启动、setup hook 中的 shell、Agent 安装命令、每轮 `send`、可关联的 OTel model/tool 以及收尾阶段耗时。
425
+ - 定位被测程序或评估用例缺陷并完成重跑的流程见 [Coding Agent 反馈闭环](/zh/tutorials/agent-feedback-loop)。