niceeval 0.6.2 → 0.7.1

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 (218) hide show
  1. package/INDEX.md +23 -23
  2. package/README.zh.md +6 -6
  3. package/dist/agents/types.d.ts +2 -2
  4. package/dist/i18n/zh-CN.d.ts +3 -3
  5. package/dist/report/aggregate.d.ts +32 -26
  6. package/dist/report/aggregate.js +157 -76
  7. package/dist/report/built-in/index.d.ts +2 -0
  8. package/dist/report/built-in/index.js +8 -0
  9. package/dist/report/components.d.ts +91 -164
  10. package/dist/report/components.js +377 -114
  11. package/dist/report/compute.d.ts +86 -73
  12. package/dist/report/compute.js +592 -432
  13. package/dist/report/flag.d.ts +28 -17
  14. package/dist/report/flag.js +86 -16
  15. package/dist/report/format.d.ts +11 -11
  16. package/dist/report/format.js +17 -15
  17. package/dist/report/index.d.ts +16 -17
  18. package/dist/report/index.js +20 -22
  19. package/dist/report/load.js +3 -2
  20. package/dist/report/locale.d.ts +49 -34
  21. package/dist/report/locale.js +106 -58
  22. package/dist/report/metrics.d.ts +10 -3
  23. package/dist/report/metrics.js +46 -12
  24. package/dist/report/primitives.d.ts +42 -15
  25. package/dist/report/primitives.js +135 -26
  26. package/dist/report/react/AttemptList.d.ts +10 -8
  27. package/dist/report/react/AttemptList.js +18 -10
  28. package/dist/report/react/DeltaTable.js +19 -18
  29. package/dist/report/react/EvalList.d.ts +3 -3
  30. package/dist/report/react/EvalList.js +0 -0
  31. package/dist/report/react/ExperimentComparison.d.ts +4 -2
  32. package/dist/report/react/ExperimentComparison.js +5 -4
  33. package/dist/report/react/ExperimentList.d.ts +3 -3
  34. package/dist/report/react/ExperimentList.js +16 -15
  35. package/dist/report/react/MetricBars.js +5 -4
  36. package/dist/report/react/MetricLine.js +12 -5
  37. package/dist/report/react/MetricMatrix.js +1 -1
  38. package/dist/report/react/MetricScatter.js +54 -17
  39. package/dist/report/react/MetricTable.js +2 -12
  40. package/dist/report/react/ScopeSummary.d.ts +10 -0
  41. package/dist/report/react/ScopeSummary.js +17 -0
  42. package/dist/report/react/Scoreboard.js +6 -6
  43. package/dist/report/react/cell.js +2 -2
  44. package/dist/report/react/fixtures.d.ts +5 -9
  45. package/dist/report/react/fixtures.js +105 -149
  46. package/dist/report/react/index.d.ts +15 -5
  47. package/dist/report/react/index.js +18 -7
  48. package/dist/report/report.d.ts +137 -20
  49. package/dist/report/report.js +261 -34
  50. package/dist/report/text/faces.d.ts +17 -19
  51. package/dist/report/text/faces.js +225 -157
  52. package/dist/report/text/plot.js +1 -1
  53. package/dist/report/text/table.js +2 -2
  54. package/dist/report/tree.d.ts +90 -40
  55. package/dist/report/tree.js +252 -94
  56. package/dist/report/types.d.ts +245 -300
  57. package/dist/report/types.js +4 -3
  58. package/dist/report/web.d.ts +21 -5
  59. package/dist/report/web.js +42 -16
  60. package/dist/results/select.d.ts +38 -16
  61. package/dist/results/select.js +73 -25
  62. package/dist/results/types.d.ts +38 -14
  63. package/dist/shared/aggregate.d.ts +3 -2
  64. package/dist/shared/aggregate.js +5 -4
  65. package/docs-site/zh/README.md +44 -0
  66. package/docs-site/zh/examples/ai-agent-application.mdx +63 -0
  67. package/docs-site/zh/examples/coding-agent-extensions.mdx +57 -0
  68. package/docs-site/zh/examples/index.mdx +50 -0
  69. package/docs-site/zh/{concepts → explanation}/adapter.mdx +11 -11
  70. package/docs-site/zh/{concepts → explanation}/assert.mdx +7 -7
  71. package/docs-site/zh/{concepts → explanation}/drive.mdx +8 -8
  72. package/docs-site/zh/{concepts → explanation}/evals.mdx +4 -4
  73. package/docs-site/zh/{concepts → explanation}/experiment.mdx +8 -8
  74. package/docs-site/zh/{concepts → explanation}/hitl.mdx +8 -8
  75. package/docs-site/zh/{concepts → explanation}/judge.mdx +5 -5
  76. package/docs-site/zh/{concepts → explanation}/overview.mdx +5 -5
  77. package/docs-site/zh/{guides → explanation}/runner.mdx +1 -1
  78. package/docs-site/zh/{concepts → explanation}/tier.mdx +6 -6
  79. package/docs-site/zh/{guides → how-to}/agent-feedback-loop.mdx +7 -7
  80. package/docs-site/zh/{guides → how-to}/authoring.mdx +2 -2
  81. package/docs-site/zh/{guides → how-to}/connect-otel.mdx +6 -6
  82. package/docs-site/zh/{guides → how-to}/connect-your-agent.mdx +18 -18
  83. package/docs-site/zh/{guides → how-to}/custom-reports.mdx +6 -6
  84. package/docs-site/zh/{guides → how-to}/experiments.mdx +3 -3
  85. package/docs-site/zh/{guides → how-to}/publish-report.mdx +2 -2
  86. package/docs-site/zh/{guides → how-to}/sandbox-agent.mdx +2 -2
  87. package/docs-site/zh/{guides → how-to}/sandbox-providers.mdx +1 -1
  88. package/docs-site/zh/{guides → how-to}/viewing-results.mdx +6 -6
  89. package/docs-site/zh/{guides → how-to}/write-experiment.mdx +3 -3
  90. package/docs-site/zh/{guides → how-to}/write-send.mdx +13 -13
  91. package/docs-site/zh/index.mdx +23 -25
  92. package/docs-site/zh/introduction.mdx +8 -8
  93. package/docs-site/zh/reference/builtin-agents.mdx +5 -5
  94. package/docs-site/zh/reference/capabilities.mdx +6 -6
  95. package/docs-site/zh/reference/cli.mdx +9 -7
  96. package/docs-site/zh/reference/define-agent.mdx +1 -1
  97. package/docs-site/zh/reference/events.mdx +3 -3
  98. package/docs-site/zh/{guides → reference}/official-adapters.mdx +7 -7
  99. package/docs-site/zh/{guides → reference}/report-components.mdx +5 -5
  100. package/docs-site/zh/{guides → reference}/results-data.mdx +5 -5
  101. package/docs-site/zh/{guides → troubleshooting}/debug-sandbox.mdx +2 -2
  102. package/docs-site/zh/{guides → troubleshooting}/debugging.mdx +4 -2
  103. package/docs-site/zh/{quickstart.mdx → tutorials/quickstart.mdx} +5 -17
  104. package/package.json +6 -2
  105. package/src/agents/index.ts +2 -2
  106. package/src/agents/openai-compat.ts +1 -1
  107. package/src/agents/streaming.ts +2 -2
  108. package/src/agents/types.ts +3 -3
  109. package/src/cli.ts +42 -23
  110. package/src/context/context.ts +1 -1
  111. package/src/context/session.test.ts +1 -1
  112. package/src/context/session.ts +1 -1
  113. package/src/i18n/en.ts +18 -16
  114. package/src/i18n/zh-CN.ts +16 -15
  115. package/src/report/aggregate.ts +175 -87
  116. package/src/report/built-in/index.tsx +9 -0
  117. package/src/report/components.tsx +625 -285
  118. package/src/report/compute.ts +717 -515
  119. package/src/report/dual-render.test.tsx +738 -1148
  120. package/src/report/flag.ts +97 -33
  121. package/src/report/format.ts +18 -22
  122. package/src/report/index.ts +113 -58
  123. package/src/report/load.ts +3 -2
  124. package/src/report/locale.ts +120 -69
  125. package/src/report/metrics.ts +42 -12
  126. package/src/report/primitives.tsx +190 -45
  127. package/src/report/react/AttemptList.tsx +32 -20
  128. package/src/report/react/DeltaTable.tsx +63 -45
  129. package/src/report/react/EvalList.tsx +0 -0
  130. package/src/report/react/ExperimentComparison.tsx +12 -7
  131. package/src/report/react/ExperimentList.tsx +38 -26
  132. package/src/report/react/MetricBars.tsx +5 -4
  133. package/src/report/react/MetricLine.tsx +13 -8
  134. package/src/report/react/MetricMatrix.tsx +2 -2
  135. package/src/report/react/MetricScatter.tsx +74 -20
  136. package/src/report/react/MetricTable.tsx +4 -76
  137. package/src/report/react/ScopeSummary.tsx +86 -0
  138. package/src/report/react/Scoreboard.tsx +28 -10
  139. package/src/report/react/cell.tsx +2 -2
  140. package/src/report/react/enhance.js +57 -5
  141. package/src/report/react/fixtures.ts +109 -156
  142. package/src/report/react/index.tsx +24 -39
  143. package/src/report/react/render.test.tsx +139 -104
  144. package/src/report/react/styles.css +181 -91
  145. package/src/report/report.test.ts +761 -1031
  146. package/src/report/report.ts +425 -47
  147. package/src/report/text/faces.ts +257 -164
  148. package/src/report/text/plot.ts +1 -1
  149. package/src/report/text/table.ts +2 -2
  150. package/src/report/tree.ts +362 -104
  151. package/src/report/types.ts +257 -287
  152. package/src/report/web.ts +63 -20
  153. package/src/results/attempt-evidence.test.ts +4 -4
  154. package/src/results/attempt-evidence.ts +5 -5
  155. package/src/results/copy.ts +6 -6
  156. package/src/results/host-equivalence.test.ts +26 -14
  157. package/src/results/index.ts +10 -4
  158. package/src/results/open.ts +8 -4
  159. package/src/results/results.test.ts +4 -3
  160. package/src/results/select.ts +104 -34
  161. package/src/results/types.ts +36 -14
  162. package/src/runner/feedback/human.test.ts +1 -1
  163. package/src/runner/run.ts +1 -1
  164. package/src/sandbox/cli-commands.ts +2 -2
  165. package/src/scoring/judge.test.ts +1 -1
  166. package/src/shared/aggregate.ts +5 -4
  167. package/src/show/compose.ts +50 -67
  168. package/src/show/index.ts +107 -56
  169. package/src/show/render.ts +43 -27
  170. package/src/show/report-host.test.ts +188 -0
  171. package/src/show/report-host.ts +375 -0
  172. package/src/show/show.test.ts +86 -36
  173. package/src/view/app/App.test.tsx +69 -0
  174. package/src/view/app/App.tsx +144 -48
  175. package/src/view/app/components/AttemptModal.tsx +324 -63
  176. package/src/view/app/components/CodeView.tsx +10 -4
  177. package/src/view/app/i18n.ts +31 -17
  178. package/src/view/app/lib/artifact-url.ts +14 -3
  179. package/src/view/app/main.tsx +13 -8
  180. package/src/view/app/pages/{RunsPage.tsx → AttemptsPage.tsx} +6 -6
  181. package/src/view/app/types.ts +4 -1
  182. package/src/view/artifact-serving.test.ts +21 -1
  183. package/src/view/client-dist/app.css +1 -1
  184. package/src/view/client-dist/app.js +6 -6
  185. package/src/view/data.test.ts +9 -3
  186. package/src/view/data.ts +145 -49
  187. package/src/view/index.ts +48 -44
  188. package/src/view/server.ts +35 -15
  189. package/src/view/shared/types.ts +34 -5
  190. package/src/view/styles.css +224 -0
  191. package/src/view/view-report.test.ts +161 -57
  192. package/dist/report/built-ins/experiment-comparison.d.ts +0 -39
  193. package/dist/report/built-ins/experiment-comparison.js +0 -119
  194. package/dist/report/built-ins/index.d.ts +0 -2
  195. package/dist/report/built-ins/index.js +0 -2
  196. package/dist/report/react/GroupSummary.d.ts +0 -8
  197. package/dist/report/react/GroupSummary.js +0 -8
  198. package/dist/report/react/RunOverview.d.ts +0 -8
  199. package/dist/report/react/RunOverview.js +0 -12
  200. package/docs-site/zh/example/ai-agent-application.mdx +0 -152
  201. package/docs-site/zh/example/claude-code-codex-plugin.mdx +0 -167
  202. package/docs-site/zh/example/claude-code-codex-skill.mdx +0 -152
  203. package/docs-site/zh/example/showcase.mdx +0 -39
  204. package/src/report/built-in-user-parity.test.tsx +0 -597
  205. package/src/report/built-ins/experiment-comparison.tsx +0 -179
  206. package/src/report/built-ins/index.ts +0 -7
  207. package/src/report/react/GroupSummary.tsx +0 -66
  208. package/src/report/react/RunOverview.tsx +0 -109
  209. /package/docs-site/zh/{example/tier1-ai-sdk-v7.mdx → examples/integrations/ai-sdk-v7.mdx} +0 -0
  210. /package/docs-site/zh/{example/tier1-claude-sdk.mdx → examples/integrations/claude-sdk.mdx} +0 -0
  211. /package/docs-site/zh/{example/tier1-codex-sdk.mdx → examples/integrations/codex-sdk.mdx} +0 -0
  212. /package/docs-site/zh/{example/tier1-langgraph.mdx → examples/integrations/langgraph.mdx} +0 -0
  213. /package/docs-site/zh/{example/tier1-pi-sdk.mdx → examples/integrations/pi-sdk.mdx} +0 -0
  214. /package/docs-site/zh/{guides → how-to}/ci-integration.mdx +0 -0
  215. /package/docs-site/zh/{guides → how-to}/dataset-fanout.mdx +0 -0
  216. /package/docs-site/zh/{guides → how-to}/fixtures.mdx +0 -0
  217. /package/docs-site/zh/{guides → how-to}/reporters.mdx +0 -0
  218. /package/docs-site/zh/{guides → how-to}/scoring-guide.mdx +0 -0
@@ -1,186 +1,113 @@
1
- import type { ReportComponent } from "./tree.ts";
1
+ import { type ReportComponent } from "./tree.ts";
2
2
  import type { ReportLocale } from "./locale.ts";
3
3
  import type { AttemptLocator } from "../results/locator.ts";
4
- import type { Selection } from "../results/types.ts";
5
- import type { AttemptListItem, DeltaData, EvalListItem, ExperimentListItem, GroupSummaryData, LineData, MatrixData, OverviewData, ScatterData, ScoreboardData, TableData } from "./types.ts";
6
- import { attemptListData, deltaData, evalListData, experimentListData, groupSummaryData, lineData, matrixData, overviewData, scatterData, scoreboardData, tableData } from "./compute.ts";
7
- import type { ScatterDataOptions } from "./compute.ts";
8
- export interface RunOverviewProps {
9
- data: OverviewData;
10
- /** chrome 文案 locale;省略时随宿主上下文(宿主外默认 "en")。 */
11
- locale?: ReportLocale;
12
- className?: string;
13
- }
14
- export interface GroupSummaryProps {
15
- data: GroupSummaryData;
4
+ import type { AttemptListItem, DeltaData, EntityListDataOptions, EvalListItem, ExperimentComparisonData, ExperimentListItem, LineData, MatrixData, ReportInput, ScatterData, ScopeSummaryData, ScoreboardData, TableData } from "./types.ts";
5
+ import { type DeltaTableOptions, type MetricLineOptions, type MetricMatrixOptions, type MetricScatterOptions, type MetricTableOptions, type ScoreboardOptions } from "./compute.ts";
6
+ type Never<T> = {
7
+ [K in keyof T]?: never;
8
+ };
9
+ /**
10
+ * 官方数据组件的统一 props 组合(docs/feature/reports/library/metric-views.md):
11
+ * data 形态(接收配套 *Data 的产物)或 spec 形态(Options 平铺 + 可选 input)。
12
+ */
13
+ export type DataProps<Data, Options, Presentation> = ({
14
+ data: Data;
15
+ input?: never;
16
+ } & Never<Options> & Presentation) | ({
17
+ data?: never;
18
+ input?: ReportInput;
19
+ } & Options & Presentation);
20
+ interface ChromeProps {
16
21
  /** chrome 文案 locale;省略时随宿主上下文(宿主外默认 "en")。 */
17
22
  locale?: ReportLocale;
18
23
  className?: string;
19
24
  }
25
+ export type ScopeSummaryProps = DataProps<ScopeSummaryData, Record<never, never>, ChromeProps & {
26
+ /** 显示哪一级计票;默认 "eval"。data 恒携带两级,votes 只选择呈现。 */
27
+ votes?: "eval" | "attempt";
28
+ }>;
29
+ /** 范围摘要卡:时间窗、数量、两级计票、端到端成功率与总成本。 */
30
+ export declare const ScopeSummary: ReportComponent<ScopeSummaryProps>;
31
+ export type ExperimentComparisonProps = DataProps<ExperimentComparisonData, Record<never, never>, ChromeProps>;
20
32
  /**
21
- * 三个实体列表都只收算好的 `items`(`.data(selection)` 的产物,报告作者先 `.filter()`/
22
- * `.slice()` 再传入)——没有 selection-form,组件不提供另一套过滤 DSL
23
- * (docs/feature/reports/library.md「实体列表」)。
33
+ * 内建报告的默认组合件:先把 input 按可比组分区,再为每组分别计算 ScopeSummary、
34
+ * 成本 × 端到端成功率散点和 ExperimentList。web 面持有完整组索引并一次聚焦一组;
35
+ * text 面命中多个组时只显示组索引与可执行的单组查看命令,命中单组时才输出完整散点与列表。
24
36
  */
25
- export interface ExperimentListProps {
26
- items: ExperimentListItem[];
27
- /** web 面在比较表前显示实验过滤框;text 面忽略。 */
37
+ export declare const ExperimentComparison: ReportComponent<ExperimentComparisonProps>;
38
+ interface EntityListChrome extends ChromeProps {
39
+ attemptHref?: (locator: AttemptLocator) => string;
40
+ }
41
+ export type ExperimentListProps = DataProps<readonly ExperimentListItem[], EntityListDataOptions, EntityListChrome & {
42
+ /** web 面在比较表前显示实验过滤框;text 面忽略。 */
28
43
  filter?: boolean;
29
44
  /**
30
- * 可选父路径:两面的行标签去掉与它相同的前缀,只显示 experiment id 末段,避免在已经以组为
31
- * 标题的上下文里重复文件夹名(默认 `ExperimentComparison` 给每组传组键)。完整 id 仍是排序 /
32
- * 着色 / 过滤 / 折叠的键;不传或它不是前缀(如根目录单例组)时显示完整 id。
45
+ * 可选父路径:两面的行标签去掉与它相同的前缀,只显示 experiment id 末段(默认
46
+ * `ExperimentComparison` 给每组传组键)。完整 id 仍是排序 / 着色 / 过滤 / 折叠的键。
33
47
  */
34
48
  relativeTo?: string;
35
- /** chrome 文案 locale;省略时随宿主上下文(宿主外默认 "en")。 */
36
- locale?: ReportLocale;
37
- className?: string;
38
- }
39
- export interface EvalListProps {
40
- items: EvalListItem[];
41
- /** chrome 文案 locale;省略时随宿主上下文(宿主外默认 "en")。 */
42
- locale?: ReportLocale;
43
- className?: string;
44
- }
45
- export interface AttemptListProps {
46
- items: AttemptListItem[];
47
- /** items 被 slice 时如实显示剩余数量;省略即 items.length(未截断)。 */
49
+ }>;
50
+ /** 实验列表:每项一个 experiment,固定八列比较表 + 展开到 Eval / Attempt。 */
51
+ export declare const ExperimentList: ReportComponent<ExperimentListProps>;
52
+ export type EvalListProps = DataProps<readonly EvalListItem[], EntityListDataOptions, EntityListChrome>;
53
+ /** Eval 列表:每项一个 experimentId + evalId,展开到这道题的 Attempt。 */
54
+ export declare const EvalList: ReportComponent<EvalListProps>;
55
+ export type AttemptListProps = DataProps<readonly AttemptListItem[], EntityListDataOptions, EntityListChrome & {
56
+ /** 过滤 / 截断前的总数;省略时等于 data 长度。 */
48
57
  total?: number;
49
- /** chrome 文案 locale;省略时随宿主上下文(宿主外默认 "en")。 */
50
- locale?: ReportLocale;
51
- className?: string;
52
- }
53
- export interface MetricTableProps {
54
- data: TableData;
55
- /** 传了,格子可点、下钻去处你定;不传,宿主里走证据室深链,宿主外纯展示。 */
56
- attemptHref?: (locator: AttemptLocator) => string;
57
- /**
58
- * web 面在表格前渲染一个过滤输入框(`<input class="nre-filter" data-nre-filter>`),
59
- * 由渐进增强 runtime(enhance.js)接管:输入过滤行 textContent。无 JS 时输入框
60
- * 静默无功能,表格内容依旧完整可读。默认 false;text 面不受影响。
61
- */
62
- filter?: boolean;
63
- /** chrome 文案 locale;省略时随宿主上下文(宿主外默认 "en")。 */
64
- locale?: ReportLocale;
65
- className?: string;
66
- }
67
- export interface MetricMatrixProps {
68
- data: MatrixData;
58
+ }>;
59
+ /** Attempt 列表:实体列表的叶子层,每项一次 attempt 的判定、单行摘要与 locator。 */
60
+ export declare const AttemptList: ReportComponent<AttemptListProps>;
61
+ export interface FailureListProps {
62
+ /** 显示的最大条数;默认 20。 */
63
+ limit?: number;
64
+ /** 默认宿主注入的 Scope。 */
65
+ input?: ReportInput;
66
+ redact?: (text: string) => string;
69
67
  attemptHref?: (locator: AttemptLocator) => string;
70
- /** chrome 文案 locale;省略时随宿主上下文(宿主外默认 "en")。 */
71
- locale?: ReportLocale;
72
- className?: string;
73
- }
74
- export interface ScoreboardProps {
75
- data: ScoreboardData;
76
- /** chrome 文案 locale;省略时随宿主上下文(宿主外默认 "en")。 */
77
- locale?: ReportLocale;
78
- className?: string;
79
- }
80
- /** MetricScatter 两臂共享的纯渲染选项(不含数据来源)。 */
81
- interface MetricScatterRenderProps {
82
- /** 点一个点 → 该配置的下钻页。 */
83
- pointHref?: (row: ScatterData["rows"][number]) => string;
84
- /** chrome 文案 locale;省略时随宿主上下文(宿主外默认 "en")。 */
85
- locale?: ReportLocale;
86
- className?: string;
87
- }
88
- /** resolve 之后 web / text 面看到的形态:数据已备好,零 IO。 */
89
- export interface MetricScatterResolvedProps extends MetricScatterRenderProps {
90
- data: ScatterData;
91
- }
92
- /**
93
- * 互斥两臂:要么直接给算好的 `data`(用于用户自己的 React 页面 / 预计算 / 跨边界序列化),
94
- * 要么给 `selection` + 计算选项让宿主在渲染前解析(见 tree.ts 的 resolveReportTree)。
95
- * 同时传 `data` 与 `selection`、或两者都不传,都在 typecheck 阶段失败。计算选项复用
96
- * `ScatterDataOptions`,不手写会漂移的副本。
97
- */
98
- export type MetricScatterProps = (MetricScatterResolvedProps & {
99
- selection?: never;
100
- points?: never;
101
- series?: never;
102
- x?: never;
103
- y?: never;
104
- }) | ({
105
- data?: never;
106
- } & ScatterDataOptions & MetricScatterRenderProps & {
107
- selection: Selection;
108
- });
109
- export interface MetricLineProps {
110
- data: LineData;
111
- pointHref?: (row: LineData["rows"][number]) => string;
112
- /** chrome 文案 locale;省略时随宿主上下文(宿主外默认 "en")。 */
113
68
  locale?: ReportLocale;
114
69
  className?: string;
115
70
  }
116
- export interface DeltaTableProps {
117
- data: DeltaData;
118
- /** chrome 文案 locale;省略时随宿主上下文(宿主外默认 "en")。 */
119
- locale?: ReportLocale;
120
- className?: string;
121
- }
122
- /** 页头 KPI 条:何时跑的、几个配置、几道题、通过率、总成本;Selection 的警告随行显示在条内。 */
123
- export declare const RunOverview: ReportComponent<RunOverviewProps> & {
124
- data: typeof overviewData;
125
- };
126
71
  /**
127
- * 组摘要:一组 experiment(典型用法是同一 `<Section>` 内的全部 experiment)的紧凑统计——
128
- * 通过率(旧 GroupSelector 卡片口径)、experiment/eval/attempt 数、eval 级折叠计票、
129
- * 总成本、最后运行时间。
72
+ * 「现在有哪些失败要处理」的成品组合件:内部就是 attemptListData 过滤 → AttemptList
73
+ * data 形态,与手写组合严格等价、没有私有能力(docs/feature/reports/library/entity-lists.md)。
74
+ * verdict ∈ failed / errored,按 attempt 开始时间降序(同刻按 locator 字典序),
75
+ * 截断到 limit(默认 20),total 报告截断前总数。
130
76
  */
131
- export declare const GroupSummary: ReportComponent<GroupSummaryProps> & {
132
- data: typeof groupSummaryData;
133
- };
134
- /**
135
- * 实验列表:每项一个 experiment,固定展示身份、配置(flags)、Eval 判定构成和官方两级聚合
136
- * 汇总指标;展开到这个 experiment 的 Eval,每道题内联该题全部 Attempt 的 locator 徽标。
137
- * 没有 selection-form:`ExperimentList.data(selection)` 产出普通数组,过滤由报告作者对
138
- * 数组调用 `.filter()`。
139
- */
140
- export declare const ExperimentList: ReportComponent<ExperimentListProps> & {
141
- data: typeof experimentListData;
142
- };
143
- /**
144
- * Eval 列表:每项一个 `experimentId + evalId`,固定展示判定、Attempt 数、分数、成本、耗时
145
- * 与失败原因;展开到这道题的 Attempt(与 AttemptList 同一份 AttemptListItem)。
146
- */
147
- export declare const EvalList: ReportComponent<EvalListProps> & {
148
- data: typeof evalListData;
149
- };
150
- /**
151
- * Attempt 列表:实体列表的叶子层,每项一个 Attempt,固定展示判定、一条主失败断言摘要或
152
- * error 一层摘要与证据引用(locator)。完整 assertions / evidence 经 locator 下钻。它不预设只看失败;
153
- * 报告作者过滤 `AttemptListItem[]`、用 `.slice()` 限量,`total` 让渲染面如实报告剩余数量。
154
- */
155
- export declare const AttemptList: ReportComponent<AttemptListProps> & {
156
- data: typeof attemptListData;
157
- };
77
+ export declare const FailureList: ReportComponent<FailureListProps>;
78
+ export type MetricTableProps = DataProps<TableData, MetricTableOptions, ChromeProps & {
79
+ /** web 面在表格前渲染过滤输入框(enhance.js 接管);无 JS 时表格内容依旧完整。 */
80
+ filter?: boolean;
81
+ attemptHref?: (locator: AttemptLocator) => string;
82
+ }>;
158
83
  /** 榜单:一行一个维度值、一列一个指标,回答「谁整体更好」。 */
159
- export declare const MetricTable: ReportComponent<MetricTableProps> & {
160
- data: typeof tableData;
161
- };
84
+ export declare const MetricTable: ReportComponent<MetricTableProps>;
85
+ export type MetricMatrixProps = DataProps<MatrixData, MetricMatrixOptions, ChromeProps & {
86
+ attemptHref?: (locator: AttemptLocator) => string;
87
+ }>;
88
+ export type MetricBarsProps = MetricMatrixProps;
162
89
  /** 逐题格子:行 × 列两个维度、格子里一个指标,回答「哪道题谁挂了」。 */
163
- export declare const MetricMatrix: ReportComponent<MetricMatrixProps> & {
164
- data: typeof matrixData;
165
- };
166
- /** 分组条形:同一份矩阵数据的另一种摆法;MetricBars.data 就是 MetricMatrix.data 的别名。 */
167
- export declare const MetricBars: ReportComponent<MetricMatrixProps> & {
168
- data: typeof matrixData;
169
- };
170
- /** 考试成绩单:总分 + 分科小计,固定分母、missing 如实报。 */
171
- export declare const Scoreboard: ReportComponent<ScoreboardProps> & {
172
- data: typeof scoreboardData;
173
- };
174
- /** 质量 × 成本 frontier:每个点一个配置、两个指标各占一轴,「好」的角落恒在右上。 */
175
- export declare const MetricScatter: ReportComponent<MetricScatterProps> & {
176
- data: typeof scatterData;
177
- };
178
- /** 趋势线:x 是 experiment 声明的 flag(flag()),同系列按 x 排序连线。 */
179
- export declare const MetricLine: ReportComponent<MetricLineProps> & {
180
- data: typeof lineData;
181
- };
182
- /** 成对对比:每行一对配置、格子里 A、B、Δ 三个值,涨跌好坏由 better 判定。 */
183
- export declare const DeltaTable: ReportComponent<DeltaTableProps> & {
184
- data: typeof deltaData;
185
- };
90
+ export declare const MetricMatrix: ReportComponent<MetricMatrixProps>;
91
+ /** 分组条形:同一份矩阵数据的另一种摆法;与 MetricMatrix 写同一份 spec 时只计算一次。 */
92
+ export declare const MetricBars: ReportComponent<MetricBarsProps>;
93
+ export type ScoreboardProps = DataProps<ScoreboardData, ScoreboardOptions, ChromeProps & {
94
+ attemptHref?: (locator: AttemptLocator) => string;
95
+ }>;
96
+ /** 考试成绩单:总分 + 分科小计,固定分母、notRun / unscorable 分开如实报。 */
97
+ export declare const Scoreboard: ReportComponent<ScoreboardProps>;
98
+ export type MetricScatterProps = DataProps<ScatterData, MetricScatterOptions, ChromeProps & {
99
+ pointHref?: (row: ScatterData["rows"][number]) => string;
100
+ }>;
101
+ /** 两个指标之间的取舍:每个点一个维度值,x / y 各一个指标,series 只决定颜色和分组。 */
102
+ export declare const MetricScatter: ReportComponent<MetricScatterProps>;
103
+ export type MetricLineProps = DataProps<LineData, MetricLineOptions, ChromeProps & {
104
+ pointHref?: (row: LineData["rows"][number]) => string;
105
+ }>;
106
+ /** 趋势线:x NumericAxis(参数轴),点身份 = (series, x)。 */
107
+ export declare const MetricLine: ReportComponent<MetricLineProps>;
108
+ export type DeltaTableProps = DataProps<DeltaData, DeltaTableOptions, ChromeProps & {
109
+ attemptHref?: (locator: AttemptLocator) => string;
110
+ }>;
111
+ /** 成对对比:每行一对(字面声明或 pairsByFlag 派生),格子里 A、B、Δ 三个值。 */
112
+ export declare const DeltaTable: ReportComponent<DeltaTableProps>;
186
113
  export {};