niceeval 0.11.1 → 0.11.3

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 (179) hide show
  1. package/INDEX.md +1 -0
  2. package/README.md +4 -2
  3. package/README.zh.md +4 -2
  4. package/dist/agents/types.d.ts +2 -2
  5. package/dist/o11y/types.d.ts +3 -3
  6. package/dist/report/assets/colors.d.ts +1 -1
  7. package/dist/report/assets/colors.js +1 -1
  8. package/dist/report/components/attempt-detail/AttemptSource.js +1 -2
  9. package/dist/report/components/attempt-detail/compute.d.ts +4 -4
  10. package/dist/report/components/attempt-detail/compute.js +6 -6
  11. package/dist/report/components/attempt-detail/faces.d.ts +1 -1
  12. package/dist/report/components/attempt-detail/faces.js +3 -3
  13. package/dist/report/components/entity-lists/AttemptList.d.ts +3 -3
  14. package/dist/report/components/entity-lists/AttemptList.js +3 -3
  15. package/dist/report/components/entity-lists/ExperimentList.js +2 -2
  16. package/dist/report/components/entity-lists/compute.js +1 -1
  17. package/dist/report/components/entity-lists/faces.js +1 -1
  18. package/dist/report/components/entity-lists/index.d.ts +1 -1
  19. package/dist/report/components/entity-lists/index.js +1 -1
  20. package/dist/report/components/metric-views/chart-math.d.ts +2 -2
  21. package/dist/report/components/metric-views/chart-math.js +2 -2
  22. package/dist/report/components/metric-views/compute.d.ts +2 -3
  23. package/dist/report/components/metric-views/compute.js +3 -4
  24. package/dist/report/components/shared.d.ts +1 -1
  25. package/dist/report/components/site-components/compute.d.ts +5 -5
  26. package/dist/report/components/site-components/compute.js +6 -6
  27. package/dist/report/components/site-components/index.d.ts +7 -7
  28. package/dist/report/components/site-components/index.js +7 -7
  29. package/dist/report/components/site-components/scope-warnings.d.ts +1 -1
  30. package/dist/report/components/site-components/scope-warnings.js +3 -3
  31. package/dist/report/components/site-components/snapshot-diagnostics.js +1 -1
  32. package/dist/report/components/summaries/compute.d.ts +1 -1
  33. package/dist/report/components/summaries/compute.js +2 -2
  34. package/dist/report/components/summaries/faces.js +1 -1
  35. package/dist/report/components/summaries/index.d.ts +1 -1
  36. package/dist/report/components/summaries/index.js +1 -1
  37. package/dist/report/index.js +1 -1
  38. package/dist/report/model/aggregate.d.ts +2 -2
  39. package/dist/report/model/aggregate.js +2 -2
  40. package/dist/report/model/format.d.ts +2 -2
  41. package/dist/report/model/format.js +2 -2
  42. package/dist/report/model/metrics.js +3 -3
  43. package/dist/report/model/types.d.ts +11 -12
  44. package/dist/results/locator.js +1 -1
  45. package/dist/results/select.d.ts +4 -4
  46. package/dist/results/select.js +5 -5
  47. package/dist/results/types.d.ts +8 -8
  48. package/dist/runner/types.d.ts +14 -14
  49. package/dist/sandbox/resolve.d.ts +1 -1
  50. package/dist/sandbox/types.d.ts +1 -1
  51. package/docs-site/zh/reference/builtin-agents.mdx +21 -0
  52. package/docs-site/zh/reference/define-agent.mdx +1 -1
  53. package/docs-site/zh/reference/report-components.mdx +156 -74
  54. package/docs-site/zh/tutorials/custom-reports.mdx +112 -22
  55. package/docs-site/zh/tutorials/sandbox-agent.mdx +3 -4
  56. package/docs-site/zh/tutorials/sandbox-providers.mdx +15 -15
  57. package/docs-site/zh/tutorials/theming.mdx +169 -0
  58. package/package.json +2 -1
  59. package/src/agents/ai-sdk.test.ts +1 -1
  60. package/src/agents/bub-install-spec.ts +26 -8
  61. package/src/agents/bub.ts +40 -15
  62. package/src/agents/builtin.ts +11 -1
  63. package/src/agents/coding-cli-versions.ts +67 -0
  64. package/src/agents/hermes.ts +235 -0
  65. package/src/agents/index.ts +4 -0
  66. package/src/agents/langgraph.test.ts +1 -1
  67. package/src/agents/manifest.ts +1 -1
  68. package/src/agents/openai-compat.test.ts +1 -1
  69. package/src/agents/openclaw.ts +103 -24
  70. package/src/agents/opencode.ts +183 -0
  71. package/src/agents/sdk-streams.test.ts +1 -1
  72. package/src/agents/shared.ts +13 -2
  73. package/src/agents/types.ts +2 -2
  74. package/src/context/session.test.ts +1 -1
  75. package/src/context/session.ts +1 -1
  76. package/src/o11y/cost.ts +1 -1
  77. package/src/o11y/parsers/bub.test.ts +1 -1
  78. package/src/o11y/parsers/bub.ts +1 -1
  79. package/src/o11y/parsers/codex.test.ts +1 -1
  80. package/src/o11y/parsers/codex.ts +1 -1
  81. package/src/o11y/parsers/hermes.ts +198 -0
  82. package/src/o11y/parsers/openclaw.ts +25 -3
  83. package/src/o11y/parsers/opencode.ts +295 -0
  84. package/src/o11y/types.ts +3 -3
  85. package/src/report/assets/colors.ts +1 -1
  86. package/src/report/assets/styles.css +17 -15
  87. package/src/report/components/attempt-detail/AttemptAssertions.tsx +1 -1
  88. package/src/report/components/attempt-detail/AttemptConversation.tsx +1 -1
  89. package/src/report/components/attempt-detail/AttemptDiagnostics.tsx +1 -1
  90. package/src/report/components/attempt-detail/AttemptDiff.tsx +1 -1
  91. package/src/report/components/attempt-detail/AttemptError.tsx +1 -1
  92. package/src/report/components/attempt-detail/AttemptFixPrompt.tsx +1 -1
  93. package/src/report/components/attempt-detail/AttemptSource.tsx +2 -3
  94. package/src/report/components/attempt-detail/AttemptSummary.tsx +1 -1
  95. package/src/report/components/attempt-detail/AttemptTimeline.tsx +1 -1
  96. package/src/report/components/attempt-detail/AttemptTrace.tsx +1 -1
  97. package/src/report/components/attempt-detail/UsageTable.tsx +1 -1
  98. package/src/report/components/attempt-detail/attempt-components.test.tsx +1 -1
  99. package/src/report/components/attempt-detail/compute.ts +6 -6
  100. package/src/report/components/attempt-detail/faces.ts +3 -3
  101. package/src/report/components/attempt-detail/index.tsx +1 -1
  102. package/src/report/components/entity-lists/AttemptList.tsx +3 -3
  103. package/src/report/components/entity-lists/ExperimentList.tsx +2 -2
  104. package/src/report/components/entity-lists/compute.ts +1 -1
  105. package/src/report/components/entity-lists/faces.ts +1 -1
  106. package/src/report/components/entity-lists/index.tsx +1 -1
  107. package/src/report/components/metric-views/DeltaTable.tsx +1 -2
  108. package/src/report/components/metric-views/StabilityMatrix.tsx +1 -1
  109. package/src/report/components/metric-views/chart-math.test.ts +1 -1
  110. package/src/report/components/metric-views/chart-math.ts +2 -2
  111. package/src/report/components/metric-views/compute.ts +3 -4
  112. package/src/report/components/shared.ts +1 -1
  113. package/src/report/components/site-components/CopyFixPrompt.tsx +1 -1
  114. package/src/report/components/site-components/HeroCard.tsx +1 -1
  115. package/src/report/components/site-components/PoweredBy.tsx +1 -1
  116. package/src/report/components/site-components/ScopeWarnings.tsx +1 -1
  117. package/src/report/components/site-components/SnapshotDiagnostics.tsx +1 -1
  118. package/src/report/components/site-components/TraceWaterfall.tsx +1 -1
  119. package/src/report/components/site-components/compute.ts +6 -6
  120. package/src/report/components/site-components/index.tsx +7 -7
  121. package/src/report/components/site-components/scope-warnings.ts +3 -3
  122. package/src/report/components/site-components/snapshot-diagnostics.ts +1 -1
  123. package/src/report/components/summaries/ScopeSummary.tsx +2 -2
  124. package/src/report/components/summaries/compute.ts +2 -2
  125. package/src/report/components/summaries/faces.ts +1 -1
  126. package/src/report/components/summaries/index.tsx +1 -1
  127. package/src/report/index.ts +1 -1
  128. package/src/report/model/aggregate.ts +2 -2
  129. package/src/report/model/format.ts +2 -2
  130. package/src/report/model/metrics.ts +3 -3
  131. package/src/report/model/types.ts +12 -13
  132. package/src/results/annotated-source.test.ts +1 -1
  133. package/src/results/attempt-evidence.test.ts +1 -1
  134. package/src/results/copy.ts +3 -3
  135. package/src/results/format.ts +3 -3
  136. package/src/results/host-equivalence.test.ts +6 -6
  137. package/src/results/index.ts +1 -1
  138. package/src/results/locator.test.ts +2 -2
  139. package/src/results/locator.ts +1 -1
  140. package/src/results/open.ts +2 -2
  141. package/src/results/publish.ts +1 -1
  142. package/src/results/results.test.ts +6 -323
  143. package/src/results/select.test.ts +438 -0
  144. package/src/results/select.ts +6 -6
  145. package/src/results/skipped-notice.ts +1 -1
  146. package/src/results/truncate.ts +2 -2
  147. package/src/results/types.ts +9 -9
  148. package/src/results/writer.ts +4 -4
  149. package/src/runner/attempt.test.ts +2 -2
  150. package/src/runner/attempt.ts +6 -6
  151. package/src/runner/eval-source.test.ts +1 -1
  152. package/src/runner/eval-source.ts +1 -1
  153. package/src/runner/reporters/artifacts.ts +1 -1
  154. package/src/runner/run.ts +2 -2
  155. package/src/runner/timing.ts +1 -1
  156. package/src/runner/types.ts +14 -14
  157. package/src/sandbox/docker-agent-image.ts +36 -0
  158. package/src/sandbox/e2b-agent-template.test.ts +6 -21
  159. package/src/sandbox/e2b-agent-template.ts +44 -11
  160. package/src/sandbox/index.ts +8 -0
  161. package/src/sandbox/official-baselines.test.ts +175 -0
  162. package/src/sandbox/resolve.ts +1 -1
  163. package/src/sandbox/types.ts +1 -1
  164. package/src/scoring/diff.ts +1 -1
  165. package/src/scoring/types.ts +1 -1
  166. package/src/shared/facts.ts +1 -1
  167. package/src/show/index.ts +1 -1
  168. package/src/show/render.ts +1 -1
  169. package/src/show/show.test.ts +3 -3
  170. package/src/view/app/App.tsx +3 -1
  171. package/src/view/client-dist/app.css +1 -1
  172. package/src/view/client-dist/app.js +1 -1
  173. package/src/view/data.test.ts +2 -2
  174. package/src/view/data.ts +1 -1
  175. package/src/view/site-base.test.ts +51 -0
  176. package/src/view/site.ts +16 -0
  177. package/src/view/styles.css +1 -2
  178. package/src/view/template.html +1 -0
  179. package/src/view/view-report.test.ts +1 -1
package/INDEX.md CHANGED
@@ -34,6 +34,7 @@
34
34
  - `docs-site/zh/tutorials/sandbox-agent.mdx` — Sandbox Agent:评估 Claude Code、Codex 和 bub:使用 NiceEval 内置 agents 或自定义 adapter,在 Docker 或云端 sandbox 中运行 coding-agent CLI。
35
35
  - `docs-site/zh/tutorials/sandbox-providers.mdx` — Sandbox:官方 Sandbox Docker、Vercel 或 E2B Provider。通过预制快照加速评估
36
36
  - `docs-site/zh/tutorials/scoring-guide.mdx` — 断言、judge 和成本限制:值断言、作用域断言、LLM-as-judge、test-as-scoring 和效率检查。
37
+ - `docs-site/zh/tutorials/theming.mdx` — 给报告换一套主题:用 --theme 换报告外观,用 defineTheme 写一份自己的主题,并把它设成项目默认或发成 npm 包。
37
38
  - `docs-site/zh/tutorials/viewing-results.mdx` — 查看 NiceEval 结果并调试 agent 行为:用 niceeval show 在终端按 @<locator> 查看 Attempt 的评估用例源码、执行记录与 diff,对照多个条件、看稳定性与用量、跨 Attempt 搜索执行记录,或用 niceeval view 在网页中查看同一份证据。
38
39
  - `docs-site/zh/tutorials/write-experiment.mdx` — 实验与生命周期:如何写好实验。选择 Agent、传递 model 和 flags,设置 runs、预算、并发与 Sandbox,并用 setup / teardown 起停实验级共享服务。
39
40
  - `docs-site/zh/tutorials/write-send.mdx` — 编写 Send:分七步编写 Adapter 的 send 函数:发送消息、续接会话、记录用量、映射工具事件、处理人工介入(HITL)、接入 OTel trace,并透传 Experiment flags。
package/README.md CHANGED
@@ -7,6 +7,7 @@
7
7
  [![typescript](https://img.shields.io/badge/typescript-5.6-blue?style=flat-square)](tsconfig.json)
8
8
  [![license](https://img.shields.io/badge/license-MIT-green?style=flat-square)](package.json)
9
9
  [![docs](https://img.shields.io/badge/docs-readable-111827?style=flat-square)](docs/README.md)
10
+ [![discord](https://img.shields.io/badge/discord-join%20chat-5865F2?style=flat-square&logo=discord&logoColor=white)](https://discord.gg/yTMdZjFFJ)
10
11
 
11
12
  [中文](README.zh.md) | [Deutsch](assets/README.de.md) | [Español](assets/README.es.md) | [français](assets/README.fr.md) | [日本語](assets/README.ja.md) | [한국어](assets/README.ko.md) | [Português](assets/README.pt.md) | [Русский](assets/README.ru.md)
12
13
 
@@ -145,8 +146,9 @@ Official Adapters
145
146
  - [x] Claude Code
146
147
  - [x] Codex
147
148
  - [x] Bub
148
- - [ ] OpenClaw
149
- - [ ] Hermess Agent
149
+ - [x] OpenCode
150
+ - [x] Hermes Agent
151
+ - [x] OpenClaw
150
152
  - [ ] Alma
151
153
  - [ ] ...
152
154
 
package/README.zh.md CHANGED
@@ -7,6 +7,7 @@
7
7
  [![typescript](https://img.shields.io/badge/typescript-5.6-blue?style=flat-square)](tsconfig.json)
8
8
  [![license](https://img.shields.io/badge/license-MIT-green?style=flat-square)](package.json)
9
9
  [![docs](https://img.shields.io/badge/docs-readable-111827?style=flat-square)](docs/README.md)
10
+ [![discord](https://img.shields.io/badge/discord-join%20chat-5865F2?style=flat-square&logo=discord&logoColor=white)](https://discord.gg/yTMdZjFFJ)
10
11
 
11
12
  [English](README.md) | [Deutsch](assets/README.de.md) | [Español](assets/README.es.md) | [français](assets/README.fr.md) | [日本語](assets/README.ja.md) | [한국어](assets/README.ko.md) | [Português](assets/README.pt.md) | [Русский](assets/README.ru.md)
12
13
 
@@ -145,8 +146,9 @@ READ https://niceeval.com/INIT.md and set up niceeval for this repo: install it,
145
146
  - [x] Claude Code
146
147
  - [x] Codex
147
148
  - [x] Bub
148
- - [ ] OpenClaw
149
- - [ ] Hermess Agent
149
+ - [x] OpenCode
150
+ - [x] Hermes Agent
151
+ - [x] OpenClaw
150
152
  - [ ] Alma
151
153
  - [ ] ...
152
154
 
@@ -71,7 +71,7 @@ export type AgentSetupSkill = {
71
71
  /**
72
72
  * 一次 Agent setup 实际装了什么 —— 沙箱型 Coding Agent Adapter 在 setup 收尾写出的安装清单。
73
73
  * 沙箱内落在 `__niceeval__/agent-setup.json`,运行器把它作为 attempt artifact 存成
74
- * `agent-setup.json`(见 docs/feature/results/architecture.md)。不参与评分,只回答「这次实际
74
+ * `agent-setup.json`(见 docs/feature/record/architecture.md)。不参与评分,只回答「这次实际
75
75
  * 装了什么」;**环境变量值与 secret 不写进来**(所以 mcpServers 只记 name/command/args)。
76
76
  */
77
77
  export interface AgentSetupManifest {
@@ -325,7 +325,7 @@ export interface AgentContext {
325
325
  * 第三条反馈通道:上报本次运行的中性环境观测(如实际生效的 agent 配置、缓存命中状态)。
326
326
  * 落进 `AttemptRecord.facts` 成为一等观测量;不影响 Turn status 或 verdict,不参与
327
327
  * verdict / 评分 / 指纹。key 匹配 `[a-z0-9._-]{1,64}`,value 是标量;同 key 后写覆盖先写,
328
- * 非法 key 或非标量 value 抛错。形状与归属语义见 docs/feature/results/architecture.md#facts运行事实。
328
+ * 非法 key 或非标量 value 抛错。形状与归属语义见 docs/feature/record/architecture.md#facts运行事实。
329
329
  */
330
330
  fact(key: string, value: string | number | boolean): void;
331
331
  /**
@@ -4,7 +4,7 @@ import type { JsonValue, SourceLoc } from "../shared/types.ts";
4
4
  * send 的 `Turn.usage` 直接返回)。每个字段只在协议真实提供该值时存在——原始协议没有 usage 时
5
5
  * 省略,不编造数值;不存在「默认 0」或「默认 1」的字段。三个输入侧桶恒互斥:相加才是送进模型的
6
6
  * 完整上下文量;把协议原生口径归一到互斥是 adapter 的落值义务——OpenAI 系报「含缓存的输入总量 +
7
- * 缓存命中子集」,落 inputTokens 前先扣掉子集(docs/feature/results/architecture.md#usage,
7
+ * 缓存命中子集」,落 inputTokens 前先扣掉子集(docs/feature/record/architecture.md#usage,
8
8
  * 各协议明细见 docs/feature/adapters/sdk/<name>/cost.md)。
9
9
  */
10
10
  export interface Usage {
@@ -49,7 +49,7 @@ export interface InputRequest {
49
49
  }[];
50
50
  }
51
51
  /**
52
- * 落盘截断的结构化标记(见 docs/feature/results/architecture.md「大值截断」):
52
+ * 落盘截断的结构化标记(见 docs/feature/record/architecture.md「大值截断」):
53
53
  * `path` 是被截断的位置(事件里是字段名,如 "output";span 里是 attribute key,如 "output.value"),
54
54
  * `originalBytes` 是截断前的 UTF-8 字节数。view 显示「输出过大,已截断」靠它,不正则匹配 marker。
55
55
  */
@@ -208,7 +208,7 @@ export interface TraceSpan {
208
208
  * 给人 / 给 EVAL.ts 看的 o11y 摘要(注入沙箱 __niceeval__/results.json)。从 `events.json` 派生的
209
209
  * 行为计数缓存,不是权威——同一 niceeval 版本写读,删除后可从 `events.json` 重算。token 用量、
210
210
  * 成本与耗时不在这里:权威唯一在 `result.json` 的 `Usage` / `estimatedCostUSD` 与 `durationMs`
211
- * / `phases`(见 docs/feature/results/architecture.md「o11y.json」)。
211
+ * / `phases`(见 docs/feature/record/architecture.md「o11y.json」)。
212
212
  */
213
213
  export interface O11ySummary {
214
214
  totalTurns: number;
@@ -7,7 +7,7 @@ export declare function colorIndexForKey(key: string): number;
7
7
  * 同一张图内 series 键集合的配色:每个键仍以稳定散列为起点(无冲突时与跨图配色一致),
8
8
  * 图内撞色时按传入顺序(图例顺序)线性探测下一个空色格——跨图稳定让位给图内可辨;
9
9
  * 键数超过色板后无空格可探,回落散列格(复用不可避免)。返回键 → 色板下标。
10
- * 契约见 docs/feature/reports/library/metric-views.md「MetricScatter」;
10
+ * 契约见 docs/feature/reports/components/README.md「系列色:分配单位是页」;
11
11
  * 修法台账见 memory/scatter-series-color-collision.md。
12
12
  */
13
13
  export declare function colorIndicesForKeys(keys: readonly string[]): Map<string, number>;
@@ -32,7 +32,7 @@ export function colorIndexForKey(key) {
32
32
  * 同一张图内 series 键集合的配色:每个键仍以稳定散列为起点(无冲突时与跨图配色一致),
33
33
  * 图内撞色时按传入顺序(图例顺序)线性探测下一个空色格——跨图稳定让位给图内可辨;
34
34
  * 键数超过色板后无空格可探,回落散列格(复用不可避免)。返回键 → 色板下标。
35
- * 契约见 docs/feature/reports/library/metric-views.md「MetricScatter」;
35
+ * 契约见 docs/feature/reports/components/README.md「系列色:分配单位是页」;
36
36
  * 修法台账见 memory/scatter-series-color-collision.md。
37
37
  */
38
38
  export function colorIndicesForKeys(keys) {
@@ -100,8 +100,7 @@ function AssertionDetail({ assertion, locale }) {
100
100
  return (_jsxs("div", { className: `nre-assertion-row nre-tone-${assertTone(assertion)}`, children: [_jsxs("div", { className: "nre-source-assertion-head", children: [_jsx("span", { className: "nre-assertion-badge", children: assertion.outcome }), _jsx("span", { className: "nre-assertion-name", children: assertion.name }), assertion.outcome !== "unavailable" ? _jsx("span", { className: "nre-source-assertion-score", children: assertion.score }) : null] }), assertion.detail ? _jsx("div", { className: "nre-assertion-detail", children: assertion.detail }) : null, assertion.outcome === "unavailable" ? (_jsxs("div", { className: "nre-assertion-body", children: ["reason: ", assertion.reason === undefined ? undefined : stripControl(assertion.reason)] })) : assertion.expected !== undefined || assertion.received !== undefined || assertion.evidence !== undefined ? (_jsxs("div", { className: "nre-assertion-body", children: [assertion.expected !== undefined ? _jsxs("span", { children: ["expected: ", stripControl(assertion.expected)] }) : null, assertion.received !== undefined ? _jsxs("span", { children: ["received: ", stripControl(assertion.received)] }) : null, assertion.evidence !== undefined ? _jsxs("span", { children: ["evidence: ", stripControl(assertion.evidence)] }) : null] })) : null, assertion.aborted ? _jsxs("div", { className: "nre-assertion-abort", children: ["\u2913 ", localeText(locale, "attemptSource.abortReason")] }) : null] }));
101
101
  }
102
102
  /** `t.score(label, n)` 调用行的展开区:给分记录本体(label、挣分、分组路径),不着判定色——
103
- * 给分是分数面事实,不是判定(docs/feature/reports/library/attempt-detail.md「AttemptSource
104
- * web 面视觉规范」给分行)。 */
103
+ * 给分是分数面事实,不是判定(docs/feature/reports/components/attempt-detail/attempt-source.md「给分行」)。 */
105
104
  function ScoreEntryDetail({ entry }) {
106
105
  return (_jsxs("div", { className: "nre-score-entry-row", children: [entry.groupPath?.length ? _jsxs("span", { className: "nre-score-entry-group", children: [entry.groupPath.join(" > "), " \u00B7 "] }) : null, _jsx("span", { className: "nre-score-entry-label", children: entry.label }), _jsx("span", { className: "nre-assertion-points", children: formatPointsSuffix(entry.points) })] }));
107
106
  }
@@ -6,15 +6,15 @@ export declare function attemptAssertionsData(evidence: AttemptEvidence): Attemp
6
6
  export declare function attemptSourceData(evidence: AttemptEvidence): AttemptSourceData | null;
7
7
  /**
8
8
  * 单条 attempt 版的批量修复 prompt(与 CopyFixPrompt 的多条版本同一份步骤文案)。三态
9
- * (docs/feature/reports/library/attempt-detail.md「`AttemptFixPrompt`」):计分制丢分或中止 →
9
+ * (docs/feature/reports/components/attempt-detail/README.md「`AttemptFixPrompt`」):计分制丢分或中止 →
10
10
  * 非 null(围绕丢分检查点组装);计分制挣满且未中止、或通过制 passed → null;skipped 恒 null。
11
11
  */
12
12
  export declare function attemptFixPromptData(evidence: AttemptEvidence): AttemptFixPromptData | null;
13
- /** 收尾段的阶段名(见 docs/feature/results/architecture.md);两面渲染都把这些单列在主链之后,不计入主链总耗时。 */
13
+ /** 收尾段的阶段名(见 docs/feature/record/architecture.md);两面渲染都把这些单列在主链之后,不计入主链总耗时。 */
14
14
  export declare const TIMELINE_CLOSING_PHASES: ReadonlySet<string>;
15
15
  export declare function attemptTimelineData(evidence: AttemptEvidence): AttemptTimelineData | null;
16
16
  /**
17
- * 标准事件流按 `loc` 分轮(docs/feature/reports/library/attempt-detail.md「Attempt 详情组件」):
17
+ * 标准事件流按 `loc` 分轮(docs/feature/reports/components/attempt-detail/README.md「Attempt 详情组件」):
18
18
  * 带 loc 的 user 消息开一轮;无 loc 的 user 消息不开新轮——与当前轮 sent 同文本的回显直接
19
19
  * 吃掉,其它(stop-hook 反馈、skill 注入等轮内注入)作为回复条目留在当前轮。流首出现无 loc
20
20
  * 的 user 消息(没有当前轮可归入)时退化开一条 loc 缺省的兜底轮,不丢弃。未识别的事件类型
@@ -26,7 +26,7 @@ export declare function attemptTimelineData(evidence: AttemptEvidence): AttemptT
26
26
  export declare function attemptConversationData(evidence: AttemptEvidence): AttemptConversationData | null;
27
27
  export declare function attemptDiagnosticsData(evidence: AttemptEvidence): AttemptDiagnosticsData | null;
28
28
  /**
29
- * 组装口径单源:docs/feature/reports/library/attempt-detail.md#usagetable-组装口径单源。
29
+ * 组装口径单源:docs/feature/reports/components/attempt-detail/usage-table.md#组装口径单源。
30
30
  * identity 字段(locator/experimentId/evalId/attempt/verdict)恒有;turns/toolCalls 是 events
31
31
  * 派生(与 o11y.json 行为摘要同源,buildO11ySummary 与 o11y.json 落盘走同一份纯函数),没有
32
32
  * events 就整对省略——不因为其中一个恰好是 0 就当作"缺失"处理,0 是观测到的事实。
@@ -1,4 +1,4 @@
1
- // Attempt 详情组件族的计算函数(docs/feature/reports/library/attempt-detail.md)。每个
1
+ // Attempt 详情组件族的计算函数(docs/feature/reports/components/attempt-detail/README.md)。每个
2
2
  // `attempt*Data(evidence)` 都是纯同步派生:evidence 已经由 loadAttemptEvidence 一次性
3
3
  // 装配好全部证据,这里只做适合展示与序列化的取舍,不读文件、不 fetch、不重复调用
4
4
  // attempt.events() / trace() / diff()。
@@ -229,7 +229,7 @@ export function attemptSourceData(evidence) {
229
229
  // ───────────────────────── AttemptFixPrompt ─────────────────────────
230
230
  /**
231
231
  * 单条 attempt 版的批量修复 prompt(与 CopyFixPrompt 的多条版本同一份步骤文案)。三态
232
- * (docs/feature/reports/library/attempt-detail.md「`AttemptFixPrompt`」):计分制丢分或中止 →
232
+ * (docs/feature/reports/components/attempt-detail/README.md「`AttemptFixPrompt`」):计分制丢分或中止 →
233
233
  * 非 null(围绕丢分检查点组装);计分制挣满且未中止、或通过制 passed → null;skipped 恒 null。
234
234
  */
235
235
  export function attemptFixPromptData(evidence) {
@@ -270,7 +270,7 @@ export function attemptFixPromptData(evidence) {
270
270
  return { prompt };
271
271
  }
272
272
  // ───────────────────────── AttemptTimeline ─────────────────────────
273
- /** 收尾段的阶段名(见 docs/feature/results/architecture.md);两面渲染都把这些单列在主链之后,不计入主链总耗时。 */
273
+ /** 收尾段的阶段名(见 docs/feature/record/architecture.md);两面渲染都把这些单列在主链之后,不计入主链总耗时。 */
274
274
  export const TIMELINE_CLOSING_PHASES = new Set([
275
275
  "eval.teardown",
276
276
  "agent.teardown",
@@ -307,7 +307,7 @@ function commandStartOffsetMs(phases, timingNodeId) {
307
307
  return undefined;
308
308
  }
309
309
  /**
310
- * 失败命令按关联 timing 节点的 `startOffsetMs` 排序(docs/feature/results/architecture.md
310
+ * 失败命令按关联 timing 节点的 `startOffsetMs` 排序(docs/feature/record/architecture.md
311
311
  * 「commandsjson」);关联不到 timing 节点的排在最后,组内保持 `commands.json` 原始顺序作稳定
312
312
  * tie-break,不按数组偶然顺序猜时间。
313
313
  */
@@ -318,7 +318,7 @@ function sortFailedCommands(commands, phases) {
318
318
  .map((entry) => entry.command);
319
319
  }
320
320
  /**
321
- * 标准事件流按 `loc` 分轮(docs/feature/reports/library/attempt-detail.md「Attempt 详情组件」):
321
+ * 标准事件流按 `loc` 分轮(docs/feature/reports/components/attempt-detail/README.md「Attempt 详情组件」):
322
322
  * 带 loc 的 user 消息开一轮;无 loc 的 user 消息不开新轮——与当前轮 sent 同文本的回显直接
323
323
  * 吃掉,其它(stop-hook 反馈、skill 注入等轮内注入)作为回复条目留在当前轮。流首出现无 loc
324
324
  * 的 user 消息(没有当前轮可归入)时退化开一条 loc 缺省的兜底轮,不丢弃。未识别的事件类型
@@ -437,7 +437,7 @@ export function attemptDiagnosticsData(evidence) {
437
437
  }
438
438
  // ───────────────────────── UsageTable ─────────────────────────
439
439
  /**
440
- * 组装口径单源:docs/feature/reports/library/attempt-detail.md#usagetable-组装口径单源。
440
+ * 组装口径单源:docs/feature/reports/components/attempt-detail/usage-table.md#组装口径单源。
441
441
  * identity 字段(locator/experimentId/evalId/attempt/verdict)恒有;turns/toolCalls 是 events
442
442
  * 派生(与 o11y.json 行为摘要同源,buildO11ySummary 与 o11y.json 落盘走同一份纯函数),没有
443
443
  * events 就整对省略——不因为其中一个恰好是 0 就当作"缺失"处理,0 是观测到的事实。
@@ -10,7 +10,7 @@ export declare function attemptTimelineText(data: AttemptTimelineData | null, ct
10
10
  export declare function attemptConversationText(data: AttemptConversationData | null, ctx: TextContext): string;
11
11
  export declare function attemptDiagnosticsText(data: AttemptDiagnosticsData | null, _ctx: TextContext): string;
12
12
  /**
13
- * 单行装配形态,与 docs/feature/reports/library/attempt-detail.md#usagetable-组装口径单源
13
+ * 单行装配形态,与 docs/feature/reports/components/attempt-detail/usage-table.md#组装口径单源
14
14
  * 的示例行文案是同一形态本身,不是它的近似摘要:
15
15
  * `usage: 6 turns · 21 tool calls · 62.3k uncached in + 942.6k cache read / 6.7k out · 24 requests · $1.14`
16
16
  * 每个片段独立地只在对应事实存在时出现,顺序保持不变;全部缺失时整行不出现(返回 ""),
@@ -1,4 +1,4 @@
1
- // Attempt 详情组件族的 text 面(docs/feature/reports/library/attempt-detail.md「在 show 与
1
+ // Attempt 详情组件族的 text 面(docs/feature/reports/components/attempt-detail/README.md「在 show 与
2
2
  // view 怎样渲染」):与 web 面共享同一次 resolve 产出的 data 事实(verdict、计数、能力位、
3
3
  // 引用),允许把大块内容折成摘要 + 专用证据命令,但不得改变判定、计数或引用。
4
4
  // 零 react、零 IO、纯同步——text 宿主不需要 react-dom 的那一半。
@@ -283,7 +283,7 @@ export function attemptDiagnosticsText(data, _ctx) {
283
283
  }
284
284
  // ───────────────────────── UsageTable ─────────────────────────
285
285
  /**
286
- * 单行装配形态,与 docs/feature/reports/library/attempt-detail.md#usagetable-组装口径单源
286
+ * 单行装配形态,与 docs/feature/reports/components/attempt-detail/usage-table.md#组装口径单源
287
287
  * 的示例行文案是同一形态本身,不是它的近似摘要:
288
288
  * `usage: 6 turns · 21 tool calls · 62.3k uncached in + 942.6k cache read / 6.7k out · 24 requests · $1.14`
289
289
  * 每个片段独立地只在对应事实存在时出现,顺序保持不变;全部缺失时整行不出现(返回 ""),
@@ -309,7 +309,7 @@ export function usageTableText(data, _ctx) {
309
309
  data.toolCalls !== undefined ? `${data.toolCalls} tool call${data.toolCalls === 1 ? "" : "s"}` : undefined,
310
310
  tokenSegment || undefined,
311
311
  // requests 只在协议真实提供时显示——协议不提供就整段省略,绝不凑一个 1
312
- // (docs/feature/reports/library/attempt-detail.md#usagetable-组装口径单源)。
312
+ // (docs/feature/reports/components/attempt-detail/usage-table.md#组装口径单源)。
313
313
  usage?.requests !== undefined ? `${usage.requests} requests` : undefined,
314
314
  data.estimatedCostUSD !== undefined ? formatUSD(data.estimatedCostUSD) : undefined,
315
315
  ].filter((s) => s !== undefined);
@@ -4,7 +4,7 @@ import type { AttemptLocator } from "../../../results/locator.ts";
4
4
  import { type ReportLocale } from "../../model/locale.ts";
5
5
  /**
6
6
  * 时效标注(`↩` + 紧凑时距):历史执行(携带,或跨快照拼入)才渲染,新执行不标——subdued
7
- * 行内事实,不占框、不用警示色(docs/feature/reports/library/entity-lists.md「时效标注」)。
7
+ * 行内事实,不占框、不用警示色(docs/feature/reports/components/entity-lists/README.md「时效标注」)。
8
8
  * web 面 hover 显示完整执行时刻;ExperimentList / EvalList / AttemptList 三处共用。
9
9
  */
10
10
  export declare function HistoricalMark({ item, locale, }: {
@@ -13,7 +13,7 @@ export declare function HistoricalMark({ item, locale, }: {
13
13
  }): ReactElement | null;
14
14
  /**
15
15
  * Eval 父行的时效标注:全部 attempt 均为历史执行时,标最近一次执行(startedAt 最大)的时距;
16
- * 新旧混合时父行不标,子行各自可见(docs/feature/reports/library/entity-lists.md「时效标注」)。
16
+ * 新旧混合时父行不标,子行各自可见(docs/feature/reports/components/entity-lists/README.md「时效标注」)。
17
17
  * EvalList 与 ExperimentList 的 Eval 父行共用。
18
18
  */
19
19
  export declare function EvalHistoricalMark({ attempts, }: {
@@ -31,7 +31,7 @@ export declare function AttemptLocatorBadge({ item, attemptHref, }: {
31
31
  /**
32
32
  * failureSummary + moreFailures 的展示形态:摘要原样,+N 计数由 moreFailures 驱动。计分制
33
33
  * passed attempt 的非 null 摘要只可能来自丢分得分点(规则 6)——"+N more lost points",不是
34
- * "+N more failures":丢分不是失败,措辞分开(docs/feature/reports/library/entity-lists.md
34
+ * "+N more failures":丢分不是失败,措辞分开(docs/feature/reports/components/entity-lists/README.md
35
35
  * `AttemptListItem.moreFailures` 字段注释)。
36
36
  */
37
37
  export declare function failureSummaryText(item: Pick<AttemptListItem, "failureSummary" | "moreFailures" | "verdict">, locale: ReportLocale): string | null;
@@ -5,7 +5,7 @@ import { formatDurationMs, formatHistoricalGap, formatReportDateTime, formatUSD,
5
5
  import { cx } from "../shared.js";
6
6
  /**
7
7
  * 时效标注(`↩` + 紧凑时距):历史执行(携带,或跨快照拼入)才渲染,新执行不标——subdued
8
- * 行内事实,不占框、不用警示色(docs/feature/reports/library/entity-lists.md「时效标注」)。
8
+ * 行内事实,不占框、不用警示色(docs/feature/reports/components/entity-lists/README.md「时效标注」)。
9
9
  * web 面 hover 显示完整执行时刻;ExperimentList / EvalList / AttemptList 三处共用。
10
10
  */
11
11
  export function HistoricalMark({ item, locale = DEFAULT_REPORT_LOCALE, }) {
@@ -15,7 +15,7 @@ export function HistoricalMark({ item, locale = DEFAULT_REPORT_LOCALE, }) {
15
15
  }
16
16
  /**
17
17
  * Eval 父行的时效标注:全部 attempt 均为历史执行时,标最近一次执行(startedAt 最大)的时距;
18
- * 新旧混合时父行不标,子行各自可见(docs/feature/reports/library/entity-lists.md「时效标注」)。
18
+ * 新旧混合时父行不标,子行各自可见(docs/feature/reports/components/entity-lists/README.md「时效标注」)。
19
19
  * EvalList 与 ExperimentList 的 Eval 父行共用。
20
20
  */
21
21
  export function EvalHistoricalMark({ attempts, }) {
@@ -37,7 +37,7 @@ export function AttemptLocatorBadge({ item, attemptHref, }) {
37
37
  /**
38
38
  * failureSummary + moreFailures 的展示形态:摘要原样,+N 计数由 moreFailures 驱动。计分制
39
39
  * passed attempt 的非 null 摘要只可能来自丢分得分点(规则 6)——"+N more lost points",不是
40
- * "+N more failures":丢分不是失败,措辞分开(docs/feature/reports/library/entity-lists.md
40
+ * "+N more failures":丢分不是失败,措辞分开(docs/feature/reports/components/entity-lists/README.md
41
41
  * `AttemptListItem.moreFailures` 字段注释)。
42
42
  */
43
43
  export function failureSummaryText(item, locale) {
@@ -48,7 +48,7 @@ function EvalAttempts({ row, scoring, attemptHref, locale, }) {
48
48
  /**
49
49
  * 覆盖缺口的占位行:状态列为 —,结果列为「当前配置下无结果」+ 可复制的补跑命令,无 attempt
50
50
  * 子行,不参与任何指标聚合——只把分母缺口摆进读者正在看的表里
51
- * (docs/feature/reports/library/entity-lists.md「ExperimentList」)。
51
+ * (docs/feature/reports/components/entity-lists/experiment-list.md)。
52
52
  */
53
53
  function MissingEvalRow({ evalId, experimentId, locale, }) {
54
54
  const command = `niceeval exp ${experimentId}`;
@@ -74,7 +74,7 @@ function ExperimentRow({ item, label, composition, attemptHref, locale, }) {
74
74
  export function ExperimentList({ data, attemptHref, filter = false, className, locale = DEFAULT_REPORT_LOCALE, }) {
75
75
  const experimentLabels = shortestUniqueLabels(data.map((item) => item.experimentId));
76
76
  // 主读数列按列表内题型构成选择;web/text 共用同一份判据,不各自重新判断
77
- // (docs/feature/reports/library/entity-lists.md「ExperimentList」)。
77
+ // (docs/feature/reports/components/entity-lists/experiment-list.md)。
78
78
  const composition = experimentListScoringComposition(data);
79
79
  const showPassRate = composition !== "points";
80
80
  const showTotalScore = composition !== "pass";
@@ -1,5 +1,5 @@
1
1
  // 计算函数(*Data):ReportInput → 一份组件数据。实体列表族(ExperimentList / EvalList /
2
- // AttemptList / FailureList)的 *Data 都住在这里(docs/feature/reports/library/entity-lists.md)。
2
+ // AttemptList / FailureList)的 *Data 都住在这里(docs/feature/reports/components/entity-lists/README.md)。
3
3
  //
4
4
  // 共同约定(docs/feature/reports/architecture.md「指标聚合不变量」):
5
5
  // - 第一参收 ReportInput = Scope | readonly Snapshot[];warnings 不进组件数据(宿主统一显示);
@@ -19,7 +19,7 @@ function locatorBadge(item) {
19
19
  /**
20
20
  * 时效标注(`↩` + 紧凑时距)的 text 面:历史执行(携带,或跨快照拼入)才输出,新执行为
21
21
  * 空串;三面(ExperimentList / EvalList / AttemptList)共用
22
- * (docs/feature/reports/library/entity-lists.md「时效标注」)。
22
+ * (docs/feature/reports/components/entity-lists/README.md「时效标注」)。
23
23
  */
24
24
  function historicalSuffix(item) {
25
25
  return item.historical ? ` ↩ ${formatHistoricalGap(item.startedAt)}` : "";
@@ -41,7 +41,7 @@ export interface FailureListProps {
41
41
  }
42
42
  /**
43
43
  * 「现在有哪些失败要处理」的成品组合件:内部就是 attemptListData → 过滤 → AttemptList
44
- * data 形态,与手写组合严格等价、没有私有能力(docs/feature/reports/library/entity-lists.md)。
44
+ * data 形态,与手写组合严格等价、没有私有能力(docs/feature/reports/components/entity-lists/README.md)。
45
45
  * verdict ∈ failed / errored,按 attempt 开始时间降序(同刻按 locator 字典序),
46
46
  * 截断到 limit(默认 20),total 报告截断前总数。
47
47
  */
@@ -165,7 +165,7 @@ export const AttemptList = makeDataComponent({
165
165
  });
166
166
  /**
167
167
  * 「现在有哪些失败要处理」的成品组合件:内部就是 attemptListData → 过滤 → AttemptList
168
- * data 形态,与手写组合严格等价、没有私有能力(docs/feature/reports/library/entity-lists.md)。
168
+ * data 形态,与手写组合严格等价、没有私有能力(docs/feature/reports/components/entity-lists/README.md)。
169
169
  * verdict ∈ failed / errored,按 attempt 开始时间降序(同刻按 locator 字典序),
170
170
  * 截断到 limit(默认 20),total 报告截断前总数。
171
171
  */
@@ -4,7 +4,7 @@ export interface AxisBounds {
4
4
  max?: number;
5
5
  }
6
6
  /**
7
- * 图轴值域推定(docs/feature/reports/library/metric-views.md「图轴值域」),两步:
7
+ * 图轴值域推定(docs/feature/reports/components/charts/README.md「值域」),两步:
8
8
  *
9
9
  * ① 呼吸边距:数据极值向两端各扩数据跨度的 20%,数据极值点因此不落在绘图框线上。数据跨度
10
10
  * 为零(单点,或全部点同值)时,边距改取该值绝对值的 20%;值恰为 0 时取 1(否则唯一的点仍会
@@ -39,7 +39,7 @@ export interface AxisScale {
39
39
  * `ticksInDomain` 在域内取整齐刻度,最后按 `[pixelLo, pixelHi]` 做线性映射。`invert` 只影响
40
40
  * 最后这一步的映射方向(`better: "lower"` 的轴反向渲染)——值域先按呼吸边距 / bounds 推定,
41
41
  * 再决定要不要反向,反向不改变值域本身或钳制结果。MetricScatter 与 MetricLine 的两轴共用
42
- * 这一个函数(docs/feature/reports/library/metric-views.md「图轴值域」)。
42
+ * 这一个函数(docs/feature/reports/components/charts/README.md「值域」)。
43
43
  */
44
44
  export declare function axisScale(values: readonly number[], bounds: AxisBounds | undefined, pixelLo: number, pixelHi: number, invert: boolean): AxisScale;
45
45
  export interface PointLabelInput {
@@ -28,7 +28,7 @@ function niceNumber(range, round) {
28
28
  return niceFraction * 10 ** exponent;
29
29
  }
30
30
  /**
31
- * 图轴值域推定(docs/feature/reports/library/metric-views.md「图轴值域」),两步:
31
+ * 图轴值域推定(docs/feature/reports/components/charts/README.md「值域」),两步:
32
32
  *
33
33
  * ① 呼吸边距:数据极值向两端各扩数据跨度的 20%,数据极值点因此不落在绘图框线上。数据跨度
34
34
  * 为零(单点,或全部点同值)时,边距改取该值绝对值的 20%;值恰为 0 时取 1(否则唯一的点仍会
@@ -105,7 +105,7 @@ export function ticksInDomain(lo, hi, count = 5) {
105
105
  * `ticksInDomain` 在域内取整齐刻度,最后按 `[pixelLo, pixelHi]` 做线性映射。`invert` 只影响
106
106
  * 最后这一步的映射方向(`better: "lower"` 的轴反向渲染)——值域先按呼吸边距 / bounds 推定,
107
107
  * 再决定要不要反向,反向不改变值域本身或钳制结果。MetricScatter 与 MetricLine 的两轴共用
108
- * 这一个函数(docs/feature/reports/library/metric-views.md「图轴值域」)。
108
+ * 这一个函数(docs/feature/reports/components/charts/README.md「值域」)。
109
109
  */
110
110
  export function axisScale(values, bounds, pixelLo, pixelHi, invert) {
111
111
  const [lo, hi] = paddedAxisDomain(values, bounds);
@@ -68,7 +68,7 @@ export interface MetricLineOptions {
68
68
  */
69
69
  export declare function metricLineData(input: ReportInput, options: MetricLineOptions): Promise<LineData>;
70
70
  /**
71
- * 按 flag 机械导出全部有序条件(docs/feature/reports/library/metric-views.md「DeltaTable」):
71
+ * 按 flag 机械导出全部有序条件(docs/feature/reports/components/tables/delta-table.md):
72
72
  * 条件域 = input Scope 内 `by: "experiment"` 的全部取值,删除该 flag 后必须可比性配置深相等
73
73
  * (不额外按 experiment id 的目录前缀分组——architecture.md「Scope 是默认报告的比较边界」同一条
74
74
  * 契约);基准取 `baseline` 声明的值(缺省 = 未声明该 flag),候选是该 flag 每个其它取值各一个
@@ -94,8 +94,7 @@ export interface StabilityMatrixOptions {
94
94
  }
95
95
  /**
96
96
  * 历史全执行的稳定性矩阵:行是 eval,列是 by 维度上的取值,格是该组合全部历史执行(跨快照按
97
- * 身份键去重、不设可比性门槛)的判定计数(docs/feature/reports/library/metric-views.md
98
- * 「StabilityMatrix」)。消费的是调用方传入的 input 本身——传 current() Scope 只看得到现刻
97
+ * 身份键去重、不设可比性门槛)的判定计数(docs/feature/reports/components/tables/stability-matrix.md)。消费的是调用方传入的 input 本身——传 current() Scope 只看得到现刻
99
98
  * 水位,要看完整历史需由调用方从 ctx.results 显式选择 Snapshot[] 传入。
100
99
  */
101
100
  export declare function stabilityMatrixData(input: ReportInput, options?: StabilityMatrixOptions): Promise<StabilityMatrixData>;
@@ -1,7 +1,7 @@
1
1
  // 计算函数(*Data):ReportInput → 一份组件数据。跑在 Node 侧,产物是算好的、可序列化的
2
2
  // 普通 JSON(终值 + 渲染提示,不含公式);渲染面(web/text)只做展示。指标图形族
3
3
  // (MetricTable / MetricMatrix / MetricBars / Scoreboard / MetricScatter / MetricLine /
4
- // DeltaTable)的 *Data 与配套 Options 都住在这里(docs/feature/reports/library/metric-views.md)。
4
+ // DeltaTable)的 *Data 与配套 Options 都住在这里(docs/feature/reports/components/tables/README.md)。
5
5
  //
6
6
  // 共同约定(docs/feature/reports/architecture.md「指标聚合不变量」):
7
7
  // - 第一参收 ReportInput = Scope | readonly Snapshot[];warnings 不进组件数据(宿主统一显示);
@@ -324,7 +324,7 @@ export async function metricLineData(input, options) {
324
324
  }
325
325
  // ───────────────────────── deltaTableData 与 conditionsByFlag ─────────────────────────
326
326
  /**
327
- * 按 flag 机械导出全部有序条件(docs/feature/reports/library/metric-views.md「DeltaTable」):
327
+ * 按 flag 机械导出全部有序条件(docs/feature/reports/components/tables/delta-table.md):
328
328
  * 条件域 = input Scope 内 `by: "experiment"` 的全部取值,删除该 flag 后必须可比性配置深相等
329
329
  * (不额外按 experiment id 的目录前缀分组——architecture.md「Scope 是默认报告的比较边界」同一条
330
330
  * 契约);基准取 `baseline` 声明的值(缺省 = 未声明该 flag),候选是该 flag 每个其它取值各一个
@@ -662,8 +662,7 @@ export async function deltaTableData(input, options) {
662
662
  }
663
663
  /**
664
664
  * 历史全执行的稳定性矩阵:行是 eval,列是 by 维度上的取值,格是该组合全部历史执行(跨快照按
665
- * 身份键去重、不设可比性门槛)的判定计数(docs/feature/reports/library/metric-views.md
666
- * 「StabilityMatrix」)。消费的是调用方传入的 input 本身——传 current() Scope 只看得到现刻
665
+ * 身份键去重、不设可比性门槛)的判定计数(docs/feature/reports/components/tables/stability-matrix.md)。消费的是调用方传入的 input 本身——传 current() Scope 只看得到现刻
667
666
  * 水位,要看完整历史需由调用方从 ctx.results 显式选择 Snapshot[] 传入。
668
667
  */
669
668
  export async function stabilityMatrixData(input, options) {
@@ -9,7 +9,7 @@ type Never<T> = {
9
9
  [K in keyof T]?: never;
10
10
  };
11
11
  /**
12
- * 官方数据组件的统一 props 组合(docs/feature/reports/library/metric-views.md):
12
+ * 官方数据组件的统一 props 组合(docs/feature/reports/components/tables/README.md):
13
13
  * data 形态(接收配套 *Data 的产物)或 spec 形态(Options 平铺 + 可选 input)。
14
14
  */
15
15
  export type DataProps<Data, Options, Presentation> = ({
@@ -2,26 +2,26 @@ import type { CopyFixPromptData, HeroData, ReportInput, ScopeWarning, SnapshotDi
2
2
  /**
3
3
  * `heroData(input)`:站点标题区的运行 meta——`latestStartedAt` 取范围内最新快照的开始时间
4
4
  * (空范围为 null,不编造当前时间),`snapshots` 计贡献当前水位的快照数
5
- * (docs/feature/reports/library/site-components.md「HeroCard」)。
5
+ * (docs/feature/reports/components/site/hero-card.md)。
6
6
  */
7
7
  export declare function heroData(input: ReportInput): Promise<HeroData>;
8
8
  /**
9
9
  * `scopeWarningsData(input)`:Scope 携带的挑选警告原样透出;`input` 是裸 `Snapshot[]` 时
10
10
  * 没有挑选过程、没有警告,返回空数组,也如实
11
- * (docs/feature/reports/library/site-components.md「ScopeWarnings」)。
11
+ * (docs/feature/reports/components/site/sample-warnings.md)。
12
12
  */
13
13
  export declare function scopeWarningsData(input: ReportInput): Promise<readonly ScopeWarning[]>;
14
14
  /**
15
15
  * `snapshotDiagnosticsData(input)`:只投影 diagnostics 非空的真实 Snapshot,不携带 `evals` 或
16
16
  * `AttemptHandle`,不跨快照合并;按 experiment id 字典序排列,同一实验内按 startedAt 从新到旧
17
- * (docs/feature/reports/library/site-components.md「SnapshotDiagnostics」)。
17
+ * (docs/feature/reports/components/site/run-diagnostics.md)。
18
18
  */
19
19
  export declare function snapshotDiagnosticsData(input: ReportInput): Promise<SnapshotDiagnosticsData>;
20
20
  /**
21
21
  * `copyFixPromptData(input)`:把范围内全部失败(verdict 为 failed / errored 的 attempt)
22
22
  * 整理成一段可交给 coding agent 的修复 prompt——逐失败含 eval id、主失败摘要与 attempt
23
23
  * 下钻命令(`niceeval show @<locator>`)。prompt 面向 agent,固定英文
24
- * (docs/feature/reports/library/site-components.md「CopyFixPrompt」)。
24
+ * (docs/feature/reports/components/site/copy-fix-prompt.md)。
25
25
  */
26
26
  export declare function copyFixPromptData(input: ReportInput): Promise<CopyFixPromptData>;
27
27
  /**
@@ -29,6 +29,6 @@ export declare function copyFixPromptData(input: ReportInput): Promise<CopyFixPr
29
29
  * trace artifact(经 AttemptHandle 懒加载的 canonical OTel span);runner 生命周期节点
30
30
  * (`result.phases`)不进瀑布。行内只汇总顶层 span(parentSpanId 缺失或不在本 trace 内),
31
31
  * 按 startOffsetMs 升序;trace 缺失或为空时 `durationMs` 为 null、行照常出现
32
- * (docs/feature/reports/library/site-components.md「TraceWaterfall」)。
32
+ * (docs/feature/reports/components/site/trace-waterfall.md)。
33
33
  */
34
34
  export declare function traceWaterfallData(input: ReportInput): Promise<readonly TraceWaterfallRow[]>;
@@ -1,6 +1,6 @@
1
1
  // 计算函数(*Data):ReportInput → 一份组件数据。站点组件族(Hero / ScopeWarnings /
2
2
  // CopyFixPrompt / TraceWaterfall)的 *Data 都住在这里
3
- // (docs/feature/reports/library/site-components.md)。
3
+ // (docs/feature/reports/components/site/README.md)。
4
4
  //
5
5
  // 共同约定(docs/feature/reports/architecture.md「指标聚合不变量」):
6
6
  // - 第一参收 ReportInput = Scope | readonly Snapshot[];warnings 不进组件数据(宿主统一显示);
@@ -11,7 +11,7 @@ import { attemptListData } from "../entity-lists/compute.js";
11
11
  /**
12
12
  * `heroData(input)`:站点标题区的运行 meta——`latestStartedAt` 取范围内最新快照的开始时间
13
13
  * (空范围为 null,不编造当前时间),`snapshots` 计贡献当前水位的快照数
14
- * (docs/feature/reports/library/site-components.md「HeroCard」)。
14
+ * (docs/feature/reports/components/site/hero-card.md)。
15
15
  */
16
16
  export async function heroData(input) {
17
17
  const { snapshots } = resolveInput(input);
@@ -25,7 +25,7 @@ export async function heroData(input) {
25
25
  /**
26
26
  * `scopeWarningsData(input)`:Scope 携带的挑选警告原样透出;`input` 是裸 `Snapshot[]` 时
27
27
  * 没有挑选过程、没有警告,返回空数组,也如实
28
- * (docs/feature/reports/library/site-components.md「ScopeWarnings」)。
28
+ * (docs/feature/reports/components/site/sample-warnings.md)。
29
29
  */
30
30
  export async function scopeWarningsData(input) {
31
31
  return resolveInput(input).warnings;
@@ -33,7 +33,7 @@ export async function scopeWarningsData(input) {
33
33
  /**
34
34
  * `snapshotDiagnosticsData(input)`:只投影 diagnostics 非空的真实 Snapshot,不携带 `evals` 或
35
35
  * `AttemptHandle`,不跨快照合并;按 experiment id 字典序排列,同一实验内按 startedAt 从新到旧
36
- * (docs/feature/reports/library/site-components.md「SnapshotDiagnostics」)。
36
+ * (docs/feature/reports/components/site/run-diagnostics.md)。
37
37
  */
38
38
  export async function snapshotDiagnosticsData(input) {
39
39
  const { snapshots } = resolveInput(input);
@@ -46,7 +46,7 @@ export async function snapshotDiagnosticsData(input) {
46
46
  * `copyFixPromptData(input)`:把范围内全部失败(verdict 为 failed / errored 的 attempt)
47
47
  * 整理成一段可交给 coding agent 的修复 prompt——逐失败含 eval id、主失败摘要与 attempt
48
48
  * 下钻命令(`niceeval show @<locator>`)。prompt 面向 agent,固定英文
49
- * (docs/feature/reports/library/site-components.md「CopyFixPrompt」)。
49
+ * (docs/feature/reports/components/site/copy-fix-prompt.md)。
50
50
  */
51
51
  export async function copyFixPromptData(input) {
52
52
  const items = await attemptListData(input);
@@ -104,7 +104,7 @@ function waterfallKindOf(kind) {
104
104
  * trace artifact(经 AttemptHandle 懒加载的 canonical OTel span);runner 生命周期节点
105
105
  * (`result.phases`)不进瀑布。行内只汇总顶层 span(parentSpanId 缺失或不在本 trace 内),
106
106
  * 按 startOffsetMs 升序;trace 缺失或为空时 `durationMs` 为 null、行照常出现
107
- * (docs/feature/reports/library/site-components.md「TraceWaterfall」)。
107
+ * (docs/feature/reports/components/site/trace-waterfall.md)。
108
108
  */
109
109
  export async function traceWaterfallData(input) {
110
110
  const { snapshots, attempts } = resolveInput(input);