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.
- package/INDEX.md +31 -33
- package/dist/agents/types.d.ts +20 -17
- package/dist/context/types.d.ts +21 -21
- package/dist/i18n/en.d.ts +10 -2
- package/dist/i18n/zh-CN.d.ts +14 -6
- package/dist/o11y/execution-tree.d.ts +103 -0
- package/dist/o11y/otlp/select.d.ts +22 -0
- package/dist/report/{react → assets}/colors.d.ts +8 -0
- package/dist/report/{react → assets}/colors.js +23 -0
- package/dist/report/built-in/index.d.ts +2 -2
- package/dist/report/built-in/index.js +2 -2
- package/dist/report/built-in/standard.d.ts +8 -1
- package/dist/report/built-in/standard.js +17 -7
- package/dist/report/components/attempt-detail/AttemptAssertions.d.ts +6 -0
- package/dist/report/components/attempt-detail/AttemptAssertions.js +17 -0
- package/dist/report/components/attempt-detail/AttemptConversation.d.ts +10 -0
- package/dist/report/components/attempt-detail/AttemptConversation.js +74 -0
- package/dist/report/components/attempt-detail/AttemptDiagnostics.d.ts +6 -0
- package/dist/report/components/attempt-detail/AttemptDiagnostics.js +7 -0
- package/dist/report/components/attempt-detail/AttemptDiff.d.ts +6 -0
- package/dist/report/components/attempt-detail/AttemptDiff.js +11 -0
- package/dist/report/components/attempt-detail/AttemptError.d.ts +6 -0
- package/dist/report/components/attempt-detail/AttemptError.js +16 -0
- package/dist/report/components/attempt-detail/AttemptFixPrompt.d.ts +6 -0
- package/dist/report/components/attempt-detail/AttemptFixPrompt.js +7 -0
- package/dist/report/components/attempt-detail/AttemptSource.d.ts +6 -0
- package/dist/report/components/attempt-detail/AttemptSource.js +97 -0
- package/dist/report/components/attempt-detail/AttemptSummary.d.ts +8 -0
- package/dist/report/components/attempt-detail/AttemptSummary.js +20 -0
- package/dist/report/components/attempt-detail/AttemptTimeline.d.ts +6 -0
- package/dist/report/components/attempt-detail/AttemptTimeline.js +28 -0
- package/dist/report/components/attempt-detail/AttemptTrace.d.ts +6 -0
- package/dist/report/components/attempt-detail/AttemptTrace.js +29 -0
- package/dist/report/components/attempt-detail/AttemptUsage.d.ts +6 -0
- package/dist/report/components/attempt-detail/AttemptUsage.js +20 -0
- package/dist/report/components/attempt-detail/compute.d.ts +24 -0
- package/dist/report/components/attempt-detail/compute.js +297 -0
- package/dist/report/components/attempt-detail/faces.d.ts +14 -0
- package/dist/report/components/attempt-detail/faces.js +239 -0
- package/dist/report/components/attempt-detail/index.d.ts +38 -0
- package/dist/report/components/attempt-detail/index.js +547 -0
- package/dist/report/{react → components}/cell.d.ts +5 -3
- package/dist/report/{react → components}/cell.js +3 -3
- package/dist/report/{react → components/entity-lists}/AttemptList.d.ts +8 -4
- package/dist/report/{react → components/entity-lists}/AttemptList.js +16 -10
- package/dist/report/{react → components/entity-lists}/EvalList.d.ts +3 -3
- package/dist/report/{react → components/entity-lists}/EvalList.js +0 -0
- package/dist/report/{react → components/entity-lists}/ExperimentList.d.ts +4 -5
- package/dist/report/{react → components/entity-lists}/ExperimentList.js +12 -11
- package/dist/report/components/entity-lists/compute.d.ts +23 -0
- package/dist/report/components/entity-lists/compute.js +171 -0
- package/dist/report/components/entity-lists/faces.d.ts +5 -0
- package/dist/report/components/entity-lists/faces.js +175 -0
- package/dist/report/components/entity-lists/index.d.ts +49 -0
- package/dist/report/components/entity-lists/index.js +169 -0
- package/dist/report/{react → components}/fixtures.d.ts +2 -2
- package/dist/report/{react → components}/fixtures.js +1 -1
- package/dist/report/{react → components/metric-views}/DeltaTable.d.ts +2 -2
- package/dist/report/{react → components/metric-views}/DeltaTable.js +4 -4
- package/dist/report/{react → components/metric-views}/MetricBars.d.ts +3 -3
- package/dist/report/{react → components/metric-views}/MetricBars.js +3 -3
- package/dist/report/{react → components/metric-views}/MetricLine.d.ts +2 -2
- package/dist/report/{react → components/metric-views}/MetricLine.js +8 -5
- package/dist/report/{react → components/metric-views}/MetricMatrix.d.ts +3 -3
- package/dist/report/{react → components/metric-views}/MetricMatrix.js +4 -4
- package/dist/report/components/metric-views/MetricScatter.d.ts +11 -0
- package/dist/report/{react → components/metric-views}/MetricScatter.js +27 -60
- package/dist/report/{react → components/metric-views}/MetricTable.d.ts +3 -3
- package/dist/report/{react → components/metric-views}/MetricTable.js +4 -4
- package/dist/report/{react → components/metric-views}/Scoreboard.d.ts +2 -2
- package/dist/report/{react → components/metric-views}/Scoreboard.js +3 -3
- package/dist/report/components/metric-views/compute.d.ts +89 -0
- package/dist/report/{compute.js → components/metric-views/compute.js} +32 -415
- package/dist/report/components/metric-views/faces.d.ts +13 -0
- package/dist/report/components/metric-views/faces.js +381 -0
- package/dist/report/components/metric-views/index.d.ts +50 -0
- package/dist/report/components/metric-views/index.js +273 -0
- package/dist/report/{text → components/metric-views}/plot.js +1 -1
- package/dist/report/components/shared-compute.d.ts +22 -0
- package/dist/report/components/shared-compute.js +47 -0
- package/dist/report/components/shared-faces.d.ts +9 -0
- package/dist/report/components/shared-faces.js +26 -0
- package/dist/report/components/shared.d.ts +68 -0
- package/dist/report/components/shared.js +125 -0
- package/dist/report/{react → components/site-components}/CopyFixPrompt.d.ts +2 -2
- package/dist/report/{react → components/site-components}/CopyFixPrompt.js +2 -2
- package/dist/report/{react → components/site-components}/HeroCard.d.ts +2 -2
- package/dist/report/{react → components/site-components}/HeroCard.js +2 -2
- package/dist/report/{react → components/site-components}/ScopeWarnings.d.ts +2 -2
- package/dist/report/{react → components/site-components}/ScopeWarnings.js +3 -3
- package/dist/report/{react → components/site-components}/TraceWaterfall.d.ts +3 -3
- package/dist/report/{react → components/site-components}/TraceWaterfall.js +5 -5
- package/dist/report/components/site-components/compute.d.ts +28 -0
- package/dist/report/components/site-components/compute.js +132 -0
- package/dist/report/components/site-components/faces.d.ts +21 -0
- package/dist/report/components/site-components/faces.js +75 -0
- package/dist/report/components/site-components/index.d.ts +74 -0
- package/dist/report/components/site-components/index.js +220 -0
- package/dist/report/{scope-warnings.d.ts → components/site-components/scope-warnings.d.ts} +2 -2
- package/dist/report/{scope-warnings.js → components/site-components/scope-warnings.js} +2 -2
- package/dist/report/{react → components/summaries}/ScopeSummary.d.ts +2 -2
- package/dist/report/{react → components/summaries}/ScopeSummary.js +17 -8
- package/dist/report/components/summaries/compute.d.ts +7 -0
- package/dist/report/components/summaries/compute.js +51 -0
- package/dist/report/components/summaries/faces.d.ts +7 -0
- package/dist/report/components/summaries/faces.js +38 -0
- package/dist/report/components/summaries/index.d.ts +27 -0
- package/dist/report/components/summaries/index.js +78 -0
- package/dist/report/definition/grid-layout.d.ts +50 -0
- package/dist/report/definition/grid-layout.js +89 -0
- package/dist/report/{primitives.d.ts → definition/primitives.d.ts} +34 -4
- package/dist/report/{primitives.js → definition/primitives.js} +101 -10
- package/dist/report/{report.d.ts → definition/report.d.ts} +36 -65
- package/dist/report/{report.js → definition/report.js} +58 -90
- package/dist/report/{text/table.d.ts → definition/table-text.d.ts} +2 -2
- package/dist/report/{text/table.js → definition/table-text.js} +2 -2
- package/dist/report/{tree.d.ts → definition/tree.d.ts} +43 -11
- package/dist/report/{tree.js → definition/tree.js} +9 -11
- package/dist/report/index.d.ts +33 -18
- package/dist/report/index.js +23 -14
- package/dist/report/{aggregate.d.ts → model/aggregate.d.ts} +12 -4
- package/dist/report/{aggregate.js → model/aggregate.js} +28 -8
- package/dist/report/{flag.d.ts → model/flag.d.ts} +14 -1
- package/dist/report/{flag.js → model/flag.js} +35 -0
- package/dist/report/{format.d.ts → model/format.d.ts} +13 -7
- package/dist/report/{format.js → model/format.js} +79 -9
- package/dist/report/{locale.d.ts → model/locale.d.ts} +17 -17
- package/dist/report/{locale.js → model/locale.js} +31 -33
- package/dist/report/{metrics.d.ts → model/metrics.d.ts} +2 -2
- package/dist/report/{metrics.js → model/metrics.js} +2 -2
- package/dist/report/{types.d.ts → model/types.d.ts} +154 -20
- package/dist/report/react/index.d.ts +32 -21
- package/dist/report/react/index.js +33 -21
- package/dist/report/{load.d.ts → runtime/load.d.ts} +1 -1
- package/dist/report/{load.js → runtime/load.js} +1 -1
- package/dist/report/runtime/text.d.ts +67 -0
- package/dist/report/runtime/text.js +114 -0
- package/dist/report/runtime/web.d.ts +35 -0
- package/dist/report/runtime/web.js +70 -0
- package/dist/results/annotated-source.d.ts +87 -0
- package/dist/results/attempt-evidence.d.ts +74 -0
- package/dist/results/attempt-source.d.ts +15 -0
- package/dist/results/select.d.ts +11 -1
- package/dist/results/select.js +27 -5
- package/dist/runner/eval-selection.d.ts +26 -0
- package/dist/runner/feedback/sink.d.ts +26 -1
- package/dist/runner/types.d.ts +151 -24
- package/dist/sandbox/docker.d.ts +6 -0
- package/dist/sandbox/e2b.d.ts +0 -1
- package/dist/sandbox/types.d.ts +23 -21
- package/dist/scoring/display.d.ts +7 -2
- package/dist/scoring/display.js +42 -4
- package/dist/scoring/types.d.ts +3 -3
- package/dist/shared/aggregate.d.ts +14 -0
- package/dist/shared/aggregate.js +31 -0
- package/dist/shared/types.d.ts +6 -1
- package/docs-site/images/logo-dark.svg +7 -0
- package/docs-site/images/logo.svg +6 -5
- package/docs-site/zh/README.md +8 -7
- package/docs-site/zh/examples/ai-agent-application.mdx +5 -5
- package/docs-site/zh/examples/coding-agent-extensions.mdx +4 -4
- package/docs-site/zh/examples/index.mdx +3 -3
- package/docs-site/zh/examples/integrations/ai-sdk-v7.mdx +6 -6
- package/docs-site/zh/examples/integrations/claude-sdk.mdx +3 -3
- package/docs-site/zh/examples/integrations/codex-sdk.mdx +3 -3
- package/docs-site/zh/examples/integrations/langgraph.mdx +3 -3
- package/docs-site/zh/examples/integrations/pi-sdk.mdx +2 -2
- package/docs-site/zh/explanation/adapter.mdx +19 -19
- package/docs-site/zh/explanation/assert.mdx +9 -9
- package/docs-site/zh/explanation/drive.mdx +4 -4
- package/docs-site/zh/explanation/evals.mdx +8 -8
- package/docs-site/zh/explanation/experiment.mdx +8 -8
- package/docs-site/zh/explanation/hitl.mdx +13 -13
- package/docs-site/zh/explanation/judge.mdx +3 -3
- package/docs-site/zh/explanation/overview.mdx +7 -7
- package/docs-site/zh/explanation/runner.mdx +17 -13
- package/docs-site/zh/explanation/tier.mdx +6 -6
- package/docs-site/zh/index.mdx +14 -14
- package/docs-site/zh/introduction.mdx +13 -16
- package/docs-site/zh/reference/builtin-agents.mdx +61 -28
- package/docs-site/zh/reference/capabilities.mdx +7 -27
- package/docs-site/zh/reference/cli.mdx +36 -33
- package/docs-site/zh/reference/define-agent.mdx +32 -31
- package/docs-site/zh/reference/define-config.mdx +6 -6
- package/docs-site/zh/reference/define-eval.mdx +33 -20
- package/docs-site/zh/reference/events.mdx +4 -4
- package/docs-site/zh/reference/expect.mdx +3 -3
- package/docs-site/zh/reference/official-adapters.mdx +17 -17
- package/docs-site/zh/reference/report-components.mdx +195 -121
- package/docs-site/zh/reference/results-data.mdx +13 -13
- package/docs-site/zh/troubleshooting/debug-sandbox.mdx +11 -11
- package/docs-site/zh/troubleshooting/debugging.mdx +40 -16
- package/docs-site/zh/{how-to → tutorials}/agent-feedback-loop.mdx +38 -38
- package/docs-site/zh/tutorials/agent-onboarding.mdx +100 -0
- package/docs-site/zh/tutorials/authoring.mdx +211 -0
- package/docs-site/zh/{how-to → tutorials}/ci-integration.mdx +8 -8
- package/docs-site/zh/{how-to → tutorials}/connect-otel.mdx +22 -22
- package/docs-site/zh/{how-to → tutorials}/connect-your-agent.mdx +58 -63
- package/docs-site/zh/tutorials/custom-reports.mdx +453 -0
- package/docs-site/zh/{how-to → tutorials}/dataset-fanout.mdx +4 -4
- package/docs-site/zh/tutorials/experiments.mdx +102 -0
- package/docs-site/zh/{how-to → tutorials}/fixtures.mdx +9 -9
- package/docs-site/zh/{how-to → tutorials}/publish-report.mdx +6 -6
- package/docs-site/zh/tutorials/quickstart.mdx +18 -18
- package/docs-site/zh/{how-to → tutorials}/reporters.mdx +6 -6
- package/docs-site/zh/{how-to → tutorials}/sandbox-agent.mdx +6 -6
- package/docs-site/zh/{how-to → tutorials}/sandbox-providers.mdx +41 -19
- package/docs-site/zh/{how-to → tutorials}/scoring-guide.mdx +4 -4
- package/docs-site/zh/{how-to → tutorials}/viewing-results.mdx +60 -57
- package/docs-site/zh/tutorials/write-experiment.mdx +353 -0
- package/docs-site/zh/{how-to → tutorials}/write-send.mdx +40 -40
- package/package.json +10 -7
- package/src/agents/bub.ts +21 -8
- package/src/agents/claude-code.ts +23 -10
- package/src/agents/codex.test.ts +22 -7
- package/src/agents/codex.ts +22 -9
- package/src/agents/index.ts +2 -2
- package/src/agents/openai-compat.ts +1 -1
- package/src/agents/post-setup.ts +45 -22
- package/src/agents/streaming.ts +1 -1
- package/src/agents/types.ts +20 -17
- package/src/agents/ui-message-stream.test.ts +10 -0
- package/src/agents/ui-message-stream.ts +12 -1
- package/src/cli.ts +75 -59
- package/src/context/types.ts +21 -21
- package/src/define.ts +13 -0
- package/src/i18n/en.ts +27 -12
- package/src/i18n/zh-CN.ts +27 -12
- package/src/index.ts +2 -0
- package/src/o11y/prices.json +176 -99
- package/src/report/{react → assets}/colors.ts +22 -0
- package/src/report/{react → assets}/enhance.js +1 -33
- package/src/report/assets/styles.css +1785 -0
- package/src/report/built-in/index.tsx +2 -2
- package/src/report/built-in/standard.tsx +18 -6
- package/src/report/components/attempt-detail/AttemptAssertions.tsx +67 -0
- package/src/report/components/attempt-detail/AttemptConversation.tsx +158 -0
- package/src/report/components/attempt-detail/AttemptDiagnostics.tsx +38 -0
- package/src/report/components/attempt-detail/AttemptDiff.tsx +35 -0
- package/src/report/components/attempt-detail/AttemptError.tsx +31 -0
- package/src/report/components/attempt-detail/AttemptFixPrompt.tsx +26 -0
- package/src/report/components/attempt-detail/AttemptSource.tsx +224 -0
- package/src/report/components/attempt-detail/AttemptSummary.tsx +74 -0
- package/src/report/components/attempt-detail/AttemptTimeline.tsx +108 -0
- package/src/report/components/attempt-detail/AttemptTrace.tsx +63 -0
- package/src/report/components/attempt-detail/AttemptUsage.tsx +29 -0
- package/src/report/components/attempt-detail/attempt-components.test.tsx +758 -0
- package/src/report/components/attempt-detail/compute.ts +336 -0
- package/src/report/components/attempt-detail/faces.ts +260 -0
- package/src/report/components/attempt-detail/index.tsx +600 -0
- package/src/report/components/attempt-detail/validate.test.ts +252 -0
- package/src/report/{react → components}/cell.tsx +6 -3
- package/src/report/{report.test.ts → components/compute.test.ts} +316 -46
- package/src/report/{react → components/entity-lists}/AttemptList.tsx +24 -16
- package/src/report/{react → components/entity-lists}/EvalList.tsx +0 -0
- package/src/report/{react → components/entity-lists}/ExperimentList.tsx +33 -27
- package/src/report/components/entity-lists/compute.ts +196 -0
- package/src/report/components/entity-lists/faces.ts +208 -0
- package/src/report/components/entity-lists/index.tsx +238 -0
- package/src/report/components/entity-lists/validate.test.ts +114 -0
- package/src/report/{react → components}/fixtures.ts +2 -2
- package/src/report/{react → components/metric-views}/DeltaTable.tsx +5 -5
- package/src/report/{react → components/metric-views}/MetricBars.tsx +5 -5
- package/src/report/{react → components/metric-views}/MetricLine.tsx +9 -6
- package/src/report/{react → components/metric-views}/MetricMatrix.tsx +6 -6
- package/src/report/{react → components/metric-views}/MetricScatter.tsx +42 -70
- package/src/report/{react → components/metric-views}/MetricTable.tsx +6 -6
- package/src/report/{react → components/metric-views}/Scoreboard.tsx +4 -4
- package/src/report/{compute.ts → components/metric-views/compute.ts} +51 -477
- package/src/report/components/metric-views/faces.ts +423 -0
- package/src/report/components/metric-views/index.tsx +352 -0
- package/src/report/{text → components/metric-views}/plot.ts +1 -1
- package/src/report/components/metric-views/validate.test.ts +211 -0
- package/src/report/{react → components}/render.test.tsx +66 -26
- package/src/report/components/shared-compute.ts +59 -0
- package/src/report/components/shared-faces.ts +30 -0
- package/src/report/components/shared.ts +192 -0
- package/src/report/{react → components/site-components}/CopyFixPrompt.tsx +3 -3
- package/src/report/{react → components/site-components}/HeroCard.tsx +3 -3
- package/src/report/{react → components/site-components}/ScopeWarnings.tsx +4 -4
- package/src/report/{react → components/site-components}/TraceWaterfall.tsx +13 -10
- package/src/report/components/site-components/compute.ts +144 -0
- package/src/report/components/site-components/faces.ts +80 -0
- package/src/report/components/site-components/index.tsx +265 -0
- package/src/report/{scope-warnings.ts → components/site-components/scope-warnings.ts} +3 -3
- package/src/report/{site-components.test.tsx → components/site-components/site-components.test.tsx} +23 -21
- package/src/report/components/site-components/validate.test.ts +89 -0
- package/src/report/{react → components/summaries}/ScopeSummary.tsx +26 -11
- package/src/report/components/summaries/compute.ts +56 -0
- package/src/report/components/summaries/faces.ts +48 -0
- package/src/report/components/summaries/index.tsx +127 -0
- package/src/report/components/summaries/validate.test.ts +49 -0
- package/src/report/definition/grid-layout.test.ts +124 -0
- package/src/report/definition/grid-layout.ts +146 -0
- package/src/report/{primitives.tsx → definition/primitives.tsx} +168 -18
- package/src/report/{report.ts → definition/report.ts} +98 -165
- package/src/report/{shell-head.test.ts → definition/shell-head.test.ts} +2 -2
- package/src/report/{text/table.ts → definition/table-text.ts} +4 -4
- package/src/report/{tree.ts → definition/tree.ts} +56 -20
- package/src/report/index.ts +128 -66
- package/src/report/{aggregate.ts → model/aggregate.ts} +31 -9
- package/src/report/{flag.ts → model/flag.ts} +39 -1
- package/src/report/{format.ts → model/format.ts} +89 -10
- package/src/report/{locale.ts → model/locale.ts} +34 -36
- package/src/report/{metrics.ts → model/metrics.ts} +3 -3
- package/src/report/{types.ts → model/types.ts} +159 -22
- package/src/report/react/index.tsx +54 -26
- package/src/report/{dual-render.test.tsx → runtime/dual-render.test.tsx} +601 -53
- package/src/report/runtime/host.test.ts +44 -0
- package/src/report/runtime/host.ts +138 -0
- package/src/report/{load.ts → runtime/load.ts} +1 -1
- package/src/report/runtime/text.ts +192 -0
- package/src/report/runtime/web.ts +106 -0
- package/src/results/attempt-evidence.ts +5 -1
- package/src/results/host-equivalence.test.ts +53 -2
- package/src/results/select.ts +29 -5
- package/src/runner/attempt.test.ts +48 -1
- package/src/runner/attempt.ts +62 -42
- package/src/runner/cleanup-timeout.test.ts +16 -0
- package/src/runner/cleanup-timeout.ts +23 -0
- package/src/runner/discover.ts +1 -2
- package/src/runner/eval-selection.test.ts +187 -0
- package/src/runner/eval-selection.ts +109 -0
- package/src/runner/experiment-cleanup-registry.test.ts +89 -0
- package/src/runner/experiment-cleanup-registry.ts +39 -0
- package/src/runner/experiment-labels.test.ts +71 -0
- package/src/runner/feedback/agent.test.ts +33 -1
- package/src/runner/feedback/agent.ts +12 -16
- package/src/runner/feedback/ci.test.ts +35 -1
- package/src/runner/feedback/ci.ts +16 -18
- package/src/runner/feedback/coordinator.ts +28 -0
- package/src/runner/feedback/human.test.ts +108 -1
- package/src/runner/feedback/human.ts +71 -21
- package/src/runner/feedback/reducer.test.ts +64 -0
- package/src/runner/feedback/reducer.ts +26 -0
- package/src/runner/feedback/sink.ts +40 -1
- package/src/runner/fingerprint.ts +2 -1
- package/src/runner/report.test.ts +14 -0
- package/src/runner/report.ts +3 -1
- package/src/runner/run.test.ts +390 -12
- package/src/runner/run.ts +259 -26
- package/src/runner/sandbox-selection.test.ts +13 -3
- package/src/runner/sandbox-selection.ts +4 -2
- package/src/runner/types.ts +160 -24
- package/src/sandbox/docker.ts +7 -0
- package/src/sandbox/e2b-reconcile.test.ts +125 -0
- package/src/sandbox/e2b.ts +47 -12
- package/src/sandbox/types.ts +23 -21
- package/src/scoring/display.test.ts +28 -2
- package/src/scoring/display.ts +38 -5
- package/src/scoring/types.ts +3 -3
- package/src/shared/aggregate.test.ts +52 -0
- package/src/shared/aggregate.ts +29 -0
- package/src/shared/types.ts +6 -1
- package/src/show/command.test.ts +34 -0
- package/src/show/command.ts +16 -0
- package/src/show/compose.ts +1 -1
- package/src/show/index.ts +56 -20
- package/src/show/render.ts +15 -239
- package/src/show/show.test.ts +127 -34
- package/src/view/app/App.test.tsx +1 -1
- package/src/view/app/App.tsx +119 -47
- package/src/view/app/i18n.ts +7 -147
- package/src/view/app/lib/attempt-dialog.test.ts +65 -0
- package/src/view/app/lib/attempt-dialog.ts +69 -0
- package/src/view/app/main.tsx +0 -1
- package/src/view/app/types.ts +3 -86
- package/src/view/artifact-serving.test.ts +22 -38
- package/src/view/client-dist/app.css +1 -1
- package/src/view/client-dist/app.js +15 -22
- package/src/view/data.test.ts +48 -36
- package/src/view/data.ts +105 -83
- package/src/view/index.ts +1 -1
- package/src/view/server.ts +32 -2
- package/src/view/shared/types.ts +6 -31
- package/src/view/site-parity.test.ts +24 -1
- package/src/view/site.ts +144 -17
- package/src/view/styles.css +0 -805
- package/src/view/view-report.test.ts +143 -22
- package/dist/report/components.d.ts +0 -179
- package/dist/report/components.js +0 -544
- package/dist/report/compute.d.ts +0 -139
- package/dist/report/react/ExperimentComparison.d.ts +0 -10
- package/dist/report/react/ExperimentComparison.js +0 -12
- package/dist/report/react/MetricScatter.d.ts +0 -9
- package/dist/report/react/format.d.ts +0 -3
- package/dist/report/react/format.js +0 -7
- package/dist/report/text/faces.d.ts +0 -45
- package/dist/report/text/faces.js +0 -671
- package/dist/report/web.d.ts +0 -32
- package/dist/report/web.js +0 -48
- package/docs-site/zh/how-to/authoring.mdx +0 -162
- package/docs-site/zh/how-to/custom-reports.mdx +0 -414
- package/docs-site/zh/how-to/experiments.mdx +0 -86
- package/docs-site/zh/how-to/write-experiment.mdx +0 -164
- package/src/report/components.tsx +0 -925
- package/src/report/react/ExperimentComparison.tsx +0 -73
- package/src/report/react/format.ts +0 -9
- package/src/report/react/styles.css +0 -945
- package/src/report/text/faces.ts +0 -767
- package/src/report/web.ts +0 -77
- package/src/show/report-host.test.ts +0 -205
- package/src/show/report-host.ts +0 -389
- package/src/view/app/components/AttemptModal.tsx +0 -496
- package/src/view/app/components/CodeView.test.tsx +0 -142
- package/src/view/app/components/CodeView.tsx +0 -310
- package/src/view/app/components/CopyControls.tsx +0 -106
- package/src/view/app/components/Trace.tsx +0 -100
- package/src/view/app/components/Transcript.tsx +0 -157
- package/src/view/app/components/ui/badge.tsx +0 -21
- package/src/view/app/lib/artifact-url.ts +0 -17
- package/src/view/app/lib/attempt-route.test.ts +0 -80
- package/src/view/app/lib/attempt-route.ts +0 -52
- package/src/view/app/lib/format.ts +0 -70
- package/src/view/app/lib/guards.test.ts +0 -108
- package/src/view/app/lib/guards.ts +0 -71
- package/src/view/app/lib/rows.ts +0 -22
- package/src/view/app/lib/transcript-data.tsx +0 -151
- package/src/view/app/lib/verdict.ts +0 -23
- package/src/view/app/shared.ts +0 -8
- /package/dist/report/{react → components/metric-views}/chart-math.d.ts +0 -0
- /package/dist/report/{react → components/metric-views}/chart-math.js +0 -0
- /package/dist/report/{text → components/metric-views}/plot.d.ts +0 -0
- /package/dist/report/{react → components/site-components}/PoweredBy.d.ts +0 -0
- /package/dist/report/{react → components/site-components}/PoweredBy.js +0 -0
- /package/dist/report/{text/layout.d.ts → model/text-layout.d.ts} +0 -0
- /package/dist/report/{text/layout.js → model/text-layout.js} +0 -0
- /package/dist/report/{types.js → model/types.js} +0 -0
- /package/src/report/{react → components/metric-views}/chart-math.test.ts +0 -0
- /package/src/report/{react → components/metric-views}/chart-math.ts +0 -0
- /package/src/report/{react → components/site-components}/PoweredBy.tsx +0 -0
- /package/src/report/{text/layout.ts → model/text-layout.ts} +0 -0
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
// 维度键、warnings 的 message 不经这里。
|
|
6
6
|
// 刻意不 import src/i18n/(CLI 专用字典,locale 来源与 key 面完全不同)。
|
|
7
7
|
|
|
8
|
-
import type { LocalizedText } from "
|
|
8
|
+
import type { LocalizedText } from "../../types.ts";
|
|
9
9
|
|
|
10
10
|
export type { LocalizedText };
|
|
11
11
|
|
|
@@ -52,6 +52,9 @@ const en = {
|
|
|
52
52
|
"verdict.errored": "errored",
|
|
53
53
|
"verdict.skipped": "skipped",
|
|
54
54
|
|
|
55
|
+
/** AttemptSummary 的重试序号(0 起的 identity.attempt 显示前 +1)。 */
|
|
56
|
+
"attemptSummary.attempt": "attempt {n}",
|
|
57
|
+
|
|
55
58
|
/** 全 null / 无样本的统一文案,绝不画 0。 */
|
|
56
59
|
"cell.missing": "no data",
|
|
57
60
|
"cell.measuredTitle": "{samples}/{total} attempts measured",
|
|
@@ -71,11 +74,12 @@ const en = {
|
|
|
71
74
|
/** <Table> 的 locator 列表头(行带 locator 时自动追加)。 */
|
|
72
75
|
"table.attempt": "attempt",
|
|
73
76
|
"experimentList.experiment": "Experiment",
|
|
74
|
-
"experimentList.avgDuration": "Avg
|
|
75
|
-
"experimentList.passRate": "
|
|
77
|
+
"experimentList.avgDuration": "Avg. time",
|
|
78
|
+
"experimentList.passRate": "Pass rate",
|
|
79
|
+
"experimentList.passRateDescription": "End-to-end pass rate: passed = 1; failed and errored = 0",
|
|
76
80
|
"experimentList.tokens": "Tokens",
|
|
77
81
|
"experimentList.cost": "Cost",
|
|
78
|
-
"experimentList.result": "
|
|
82
|
+
"experimentList.result": "Results",
|
|
79
83
|
"experimentList.status": "Status",
|
|
80
84
|
"experimentList.evalAttempt": "Eval / Attempt",
|
|
81
85
|
"experimentList.duration": "Duration",
|
|
@@ -92,32 +96,28 @@ const en = {
|
|
|
92
96
|
/** ScopeSummary 的 KPI 标签。 */
|
|
93
97
|
"scopeSummary.experiments": "Experiments",
|
|
94
98
|
"scopeSummary.evals": "Evals",
|
|
95
|
-
"scopeSummary.attempts": "
|
|
96
|
-
"scopeSummary.passRate": "
|
|
99
|
+
"scopeSummary.attempts": "Attempts",
|
|
100
|
+
"scopeSummary.passRate": "Pass rate",
|
|
97
101
|
"scopeSummary.totalCost": "Total cost",
|
|
98
|
-
"scopeSummary.
|
|
99
|
-
"scopeSummary.
|
|
100
|
-
"scopeSummary.
|
|
102
|
+
"scopeSummary.lastRun": "Last run · {time}",
|
|
103
|
+
"scopeSummary.runRange": "Run range · {from} – {to}",
|
|
104
|
+
"scopeSummary.costCoverage": "Cost available for {samples}/{total} attempts",
|
|
105
|
+
"scopeSummary.votesEval": "Eval results",
|
|
106
|
+
"scopeSummary.votesAttempt": "Attempt results",
|
|
101
107
|
"overview.experiments.one": "{n} experiment",
|
|
102
108
|
"overview.experiments.other": "{n} experiments",
|
|
103
109
|
"overview.evalsCount": "{n} evals",
|
|
104
110
|
"overview.attemptsCount": "{n} attempts",
|
|
105
111
|
"overview.evals": "Evals",
|
|
106
|
-
"overview.passRate": "
|
|
112
|
+
"overview.passRate": "Pass rate",
|
|
107
113
|
"overview.totalCost": "Cost",
|
|
108
114
|
|
|
109
|
-
"experimentComparison.groups": "Experiment groups",
|
|
110
|
-
"experimentComparison.group": "Experiment group",
|
|
111
|
-
"experimentComparison.results": "Eval results",
|
|
112
|
-
"experimentComparison.lastRun": "Last run",
|
|
113
|
-
"experimentComparison.selectGroup": "Select experiment group {group}",
|
|
114
|
-
"experimentComparison.commandsHead": "Group details:",
|
|
115
|
-
"experimentComparison.empty": "No experiment groups",
|
|
116
|
-
|
|
117
115
|
/** 方向提示唯一文案:轴向已随 better 反正,「更好」恒指向右上(两轴都声明 better 时才显示)。 */
|
|
118
116
|
"scatter.betterUpperRight": "better → upper right",
|
|
119
117
|
/** 0 个可画点:x/y 指标没有可用数据。 */
|
|
120
118
|
"scatter.noData": "No data to plot {x} × {y}",
|
|
119
|
+
/** 标题行尾的归类维度标注(series 维度存在时显示)。 */
|
|
120
|
+
"scatter.groupedBy": "grouped by {dim}",
|
|
121
121
|
"pointsMissing.one": "{n} point missing data",
|
|
122
122
|
"pointsMissing.other": "{n} points missing data",
|
|
123
123
|
|
|
@@ -200,6 +200,8 @@ const zhCN: Record<ReportMessageKey, string> = {
|
|
|
200
200
|
"verdict.errored": "错误",
|
|
201
201
|
"verdict.skipped": "跳过",
|
|
202
202
|
|
|
203
|
+
"attemptSummary.attempt": "第 {n} 次",
|
|
204
|
+
|
|
203
205
|
"cell.missing": "无数据",
|
|
204
206
|
"cell.measuredTitle": "{samples}/{total} 次 attempt 测得",
|
|
205
207
|
"cell.noneMeasurableTitle": "0/{total} 次 attempt 可测",
|
|
@@ -218,7 +220,8 @@ const zhCN: Record<ReportMessageKey, string> = {
|
|
|
218
220
|
"table.attempt": "Attempt",
|
|
219
221
|
"experimentList.experiment": "实验",
|
|
220
222
|
"experimentList.avgDuration": "平均耗时",
|
|
221
|
-
"experimentList.passRate": "
|
|
223
|
+
"experimentList.passRate": "通过率",
|
|
224
|
+
"experimentList.passRateDescription": "端到端通过率:passed = 1;failed 和 errored = 0",
|
|
222
225
|
"experimentList.tokens": "Tokens",
|
|
223
226
|
"experimentList.cost": "成本",
|
|
224
227
|
"experimentList.result": "结果",
|
|
@@ -234,32 +237,27 @@ const zhCN: Record<ReportMessageKey, string> = {
|
|
|
234
237
|
"table.columnsHidden.one": "(还有 {n} 列未列出)",
|
|
235
238
|
"table.columnsHidden.other": "(还有 {n} 列未列出)",
|
|
236
239
|
|
|
237
|
-
"scopeSummary.experiments": "
|
|
238
|
-
"scopeSummary.evals": "
|
|
239
|
-
"scopeSummary.attempts": "
|
|
240
|
-
"scopeSummary.passRate": "
|
|
240
|
+
"scopeSummary.experiments": "实验",
|
|
241
|
+
"scopeSummary.evals": "Eval",
|
|
242
|
+
"scopeSummary.attempts": "Attempt",
|
|
243
|
+
"scopeSummary.passRate": "通过率",
|
|
241
244
|
"scopeSummary.totalCost": "总成本",
|
|
242
|
-
"scopeSummary.
|
|
243
|
-
"scopeSummary.
|
|
244
|
-
"scopeSummary.
|
|
245
|
+
"scopeSummary.lastRun": "最近运行 · {time}",
|
|
246
|
+
"scopeSummary.runRange": "运行范围 · {from} – {to}",
|
|
247
|
+
"scopeSummary.costCoverage": "{samples}/{total} 次有成本数据",
|
|
248
|
+
"scopeSummary.votesEval": "Eval 结果",
|
|
249
|
+
"scopeSummary.votesAttempt": "Attempt 结果",
|
|
245
250
|
"overview.experiments.one": "{n} 个实验",
|
|
246
251
|
"overview.experiments.other": "{n} 个实验",
|
|
247
|
-
"overview.evalsCount": "{n}
|
|
252
|
+
"overview.evalsCount": "{n} 个 Eval",
|
|
248
253
|
"overview.attemptsCount": "{n} 次 attempt",
|
|
249
254
|
"overview.evals": "Eval",
|
|
250
|
-
"overview.passRate": "
|
|
255
|
+
"overview.passRate": "通过率",
|
|
251
256
|
"overview.totalCost": "成本",
|
|
252
257
|
|
|
253
|
-
"experimentComparison.groups": "实验组",
|
|
254
|
-
"experimentComparison.group": "实验组",
|
|
255
|
-
"experimentComparison.results": "Eval 结果",
|
|
256
|
-
"experimentComparison.lastRun": "最后运行",
|
|
257
|
-
"experimentComparison.selectGroup": "选择实验组 {group}",
|
|
258
|
-
"experimentComparison.commandsHead": "查看组内详情:",
|
|
259
|
-
"experimentComparison.empty": "没有实验组",
|
|
260
|
-
|
|
261
258
|
"scatter.betterUpperRight": "越靠右上越好",
|
|
262
259
|
"scatter.noData": "{x} × {y} 没有可绘制的数据",
|
|
260
|
+
"scatter.groupedBy": "按 {dim} 归类",
|
|
263
261
|
"pointsMissing.one": "{n} 个点缺数据",
|
|
264
262
|
"pointsMissing.other": "{n} 个点缺数据",
|
|
265
263
|
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
// 后两个读 attempt.o11y()(懒加载 artifact),发布时若 o11y 没随行就诚实渲染缺数据「—」,
|
|
22
22
|
// 不算 0——报告作者自己摆时心里要有这根弦,内置报告不用它们。
|
|
23
23
|
|
|
24
|
-
import type { EvalResult } from "
|
|
24
|
+
import type { EvalResult } from "../../types.ts";
|
|
25
25
|
import type { Metric } from "./types.ts";
|
|
26
26
|
|
|
27
27
|
/**
|
|
@@ -46,7 +46,7 @@ export function attemptCostUSD(result: EvalResult): number | null {
|
|
|
46
46
|
|
|
47
47
|
/**
|
|
48
48
|
* 条件答题质量:passed = 1,failed = 0,errored 记 null 不进分母。
|
|
49
|
-
*
|
|
49
|
+
* 这是「已形成可信判定」条件下的诊断指标,不能简称默认通过率
|
|
50
50
|
* (docs/feature/reports/library.md「内置指标」)。
|
|
51
51
|
*/
|
|
52
52
|
export const taskPassRate = defineMetric({
|
|
@@ -94,7 +94,7 @@ export const executionReliability = defineMetric({
|
|
|
94
94
|
*/
|
|
95
95
|
export const endToEndPassRate = defineMetric({
|
|
96
96
|
name: "end-to-end-pass-rate",
|
|
97
|
-
label: { en: "
|
|
97
|
+
label: { en: "Pass rate", "zh-CN": "通过率" },
|
|
98
98
|
description: "End-to-end composite: passed = 1, failed / errored = 0. Split blame with taskPassRate and executionReliability.",
|
|
99
99
|
better: "higher",
|
|
100
100
|
unit: "%",
|
|
@@ -3,9 +3,24 @@
|
|
|
3
3
|
// 这些不是持久化格式,没有 format / schemaVersion 信封,兼容性跟随 npm 版本
|
|
4
4
|
// (组件消费 data 时校验结构,不符按完整用户反馈报错并提示版本漂移)。
|
|
5
5
|
|
|
6
|
-
import type { AttemptHandle, Scope, ScopeWarning, Snapshot } from "
|
|
7
|
-
import type { AttemptLocator } from "
|
|
8
|
-
import type {
|
|
6
|
+
import type { AttemptHandle, Scope, ScopeWarning, Snapshot } from "../../results/types.ts";
|
|
7
|
+
import type { AttemptIdentity, AttemptLocator } from "../../results/locator.ts";
|
|
8
|
+
import type { AttemptEvidenceCapabilities } from "../../results/attempt-evidence.ts";
|
|
9
|
+
import type { AnnotatedEvalSourceSummary, AnnotatedSourceLine } from "../../results/annotated-source.ts";
|
|
10
|
+
import type {
|
|
11
|
+
AssertionResult,
|
|
12
|
+
AttemptError,
|
|
13
|
+
DiagnosticRecord,
|
|
14
|
+
ExperimentRunInfo,
|
|
15
|
+
InputRequest,
|
|
16
|
+
JsonValue,
|
|
17
|
+
PhaseTiming,
|
|
18
|
+
SourceLoc,
|
|
19
|
+
ToolName,
|
|
20
|
+
TraceSpan,
|
|
21
|
+
Usage,
|
|
22
|
+
Verdict,
|
|
23
|
+
} from "../../types.ts";
|
|
9
24
|
import type { LocalizedText, ReportLocale } from "./locale.ts";
|
|
10
25
|
|
|
11
26
|
export type { ScopeWarning };
|
|
@@ -74,20 +89,27 @@ export interface CustomDimension {
|
|
|
74
89
|
}
|
|
75
90
|
|
|
76
91
|
/**
|
|
77
|
-
* flag() / runConfig() 的产物:把 experiment 声明的 flag
|
|
78
|
-
*
|
|
79
|
-
* `(missing)`,不同原始值撞出同一显示键时计算报错并要求改用 CustomDimension。
|
|
92
|
+
* flag() / label() / runConfig() 的产物:把 experiment 声明的 flag、报告标注 label 或
|
|
93
|
+
* 顶层运行配置当分组维度。读取的落盘值可能是任意形状,分组显示键按稳定 JSON 规则生成;
|
|
94
|
+
* 缺失值显示内置文案 `(missing)`,不同原始值撞出同一显示键时计算报错并要求改用 CustomDimension。
|
|
80
95
|
*/
|
|
81
96
|
export interface DimensionRef {
|
|
82
|
-
readonly kind: "flag" | "runConfig";
|
|
97
|
+
readonly kind: "flag" | "runConfig" | "label";
|
|
83
98
|
readonly name: string;
|
|
84
99
|
readonly label?: LocalizedText;
|
|
85
100
|
readonly unit?: string;
|
|
86
101
|
}
|
|
87
102
|
|
|
88
|
-
/** 维度槽的输入:内置维度、自定义维度,或 flag() / runConfig() 的产物。 */
|
|
103
|
+
/** 维度槽的输入:内置维度、自定义维度,或 flag() / label() / runConfig() 的产物。 */
|
|
89
104
|
export type DimensionInput = BuiltInDimension | CustomDimension | DimensionRef;
|
|
90
105
|
|
|
106
|
+
/**
|
|
107
|
+
* series 类选项(MetricScatter / MetricLine / ExperimentComparison)的输入:单维度,或
|
|
108
|
+
* 非空数组解析为复合维度——name 依声明顺序以 ` × ` 连接,每个 attempt 的值为各成员显示键
|
|
109
|
+
* 以 ` · ` 连接,任一成员缺失沿用 `(missing)` 显示键参与连接(docs/feature/reports/library/metrics.md)。
|
|
110
|
+
*/
|
|
111
|
+
export type SeriesInput = DimensionInput | readonly [DimensionInput, ...DimensionInput[]];
|
|
112
|
+
|
|
91
113
|
/** MetricLine 的 x 轴:必须是数值;字符串配置显式映射,组件不猜 low < medium < high。 */
|
|
92
114
|
export interface NumericAxis {
|
|
93
115
|
name: string;
|
|
@@ -278,7 +300,7 @@ export interface VerdictTally {
|
|
|
278
300
|
}
|
|
279
301
|
|
|
280
302
|
/**
|
|
281
|
-
* 一个范围的摘要:快照时间窗、experiment / eval / attempt
|
|
303
|
+
* 一个范围的摘要:快照时间窗、experiment / eval / attempt 数、两级判定计票、端到端通过率
|
|
282
304
|
* 和总成本。eval 的身份键是 experimentId + evalId;data 恒携带两级计票,渲染面显示哪一级
|
|
283
305
|
* 由呈现 prop `votes` 决定,不改变 data(docs/feature/reports/library/summaries.md)。
|
|
284
306
|
*/
|
|
@@ -350,19 +372,6 @@ export interface TraceWaterfallRow {
|
|
|
350
372
|
spans: readonly TraceSpanSummary[];
|
|
351
373
|
}
|
|
352
374
|
|
|
353
|
-
/** 一个可比组的数据;三个子块都只消费本组快照,不能含其它父目录的引用。 */
|
|
354
|
-
export interface ExperimentComparisonGroupData {
|
|
355
|
-
/** experiment id 的完整父路径;根目录 experiment 使用完整 id。 */
|
|
356
|
-
key: string;
|
|
357
|
-
summary: ScopeSummaryData;
|
|
358
|
-
scatter: ScatterData;
|
|
359
|
-
experiments: ExperimentListItem[];
|
|
360
|
-
}
|
|
361
|
-
|
|
362
|
-
export interface ExperimentComparisonData {
|
|
363
|
-
groups: ExperimentComparisonGroupData[];
|
|
364
|
-
}
|
|
365
|
-
|
|
366
375
|
// ───────────────────────── 实体列表(ExperimentList / EvalList / AttemptList)─────────────────────────
|
|
367
376
|
//
|
|
368
377
|
// 三个组件按「experiment → experimentId × eval → attempt」逐级下钻,固定展示实体事实,
|
|
@@ -445,3 +454,131 @@ export interface ExperimentListItem {
|
|
|
445
454
|
lastRunAt: string;
|
|
446
455
|
evalRows: ExperimentListEvalRow[];
|
|
447
456
|
}
|
|
457
|
+
|
|
458
|
+
// ───────────────────────── Attempt 详情组件族 ─────────────────────────
|
|
459
|
+
//
|
|
460
|
+
// 11 个叶子组件的 data 契约(docs/feature/reports/library/attempt-detail.md)。每个都由
|
|
461
|
+
// 同名 `attempt*Data(evidence: AttemptEvidence)` 同步派生,不读文件、不 fetch——
|
|
462
|
+
// loadAttemptEvidence 已经一次性装配好全部证据。`AttemptSummary` 恒非空;其余在对应
|
|
463
|
+
// 能力位为空时函数返回 null,两面渲染为空输出。
|
|
464
|
+
|
|
465
|
+
/** `AttemptSummary` 的 data:身份、verdict、时间与成本——恒非空。 */
|
|
466
|
+
export interface AttemptSummaryData {
|
|
467
|
+
locator: AttemptLocator;
|
|
468
|
+
identity: AttemptIdentity;
|
|
469
|
+
verdict: Verdict;
|
|
470
|
+
startedAt?: string;
|
|
471
|
+
durationMs: number;
|
|
472
|
+
costUSD: number | null;
|
|
473
|
+
capabilities: AttemptEvidenceCapabilities;
|
|
474
|
+
}
|
|
475
|
+
|
|
476
|
+
/** `AttemptError` 的 data:结构化 error 一层原因 + cause + stack;没有 error 时 null。 */
|
|
477
|
+
export type AttemptErrorData = AttemptError;
|
|
478
|
+
|
|
479
|
+
/** `AttemptAssertions` 的 data:非 passed 条目默认展开,passed 按 group 折叠计数;没有 assertion 时 null。 */
|
|
480
|
+
export interface AttemptAssertionsData {
|
|
481
|
+
/** failed / unavailable / soft 全部非 passed 条目,按原始声明顺序。 */
|
|
482
|
+
attention: AssertionResult[];
|
|
483
|
+
/** passed 条目按 groupPath.join(" > ") 分组(无分组键为 ""),组内保持原始顺序。 */
|
|
484
|
+
passedGroups: { group: string; items: AssertionResult[] }[];
|
|
485
|
+
}
|
|
486
|
+
|
|
487
|
+
/** `AttemptSource` 源码行内的一轮执行:send 头事实 + 标准事件流归并出的完整回复。 */
|
|
488
|
+
export interface AttemptSourceTurn {
|
|
489
|
+
label: string;
|
|
490
|
+
status: "completed" | "failed" | "waiting";
|
|
491
|
+
durationMs?: number;
|
|
492
|
+
sentText: string;
|
|
493
|
+
replies: AttemptConversationReply[];
|
|
494
|
+
}
|
|
495
|
+
|
|
496
|
+
/** AnnotatedSourceLine 加上 web 源码视图需要的行内执行轮。 */
|
|
497
|
+
export interface AttemptSourceLineData extends AnnotatedSourceLine {
|
|
498
|
+
turns: AttemptSourceTurn[];
|
|
499
|
+
}
|
|
500
|
+
|
|
501
|
+
/** `AttemptSource` 的 data:AnnotatedEvalSource + 按 loc 投影的标准事件流;没有 source 时 null。 */
|
|
502
|
+
export interface AttemptSourceData {
|
|
503
|
+
/** text 面拼 `niceeval show <locator> --source` 下钻命令用;web 面不需要。 */
|
|
504
|
+
locator: AttemptLocator;
|
|
505
|
+
sourcePath: string;
|
|
506
|
+
lines: AttemptSourceLineData[];
|
|
507
|
+
unmapped: AssertionResult[];
|
|
508
|
+
/** 没有 loc、指向其它文件或越界的轮次;不能静默丢弃,放在源码块末尾。 */
|
|
509
|
+
unlocatedTurns: AttemptSourceTurn[];
|
|
510
|
+
summary: AnnotatedEvalSourceSummary;
|
|
511
|
+
}
|
|
512
|
+
|
|
513
|
+
/** `AttemptFixPrompt` 的 data:单条 attempt 的复制修复 prompt;passed/skipped 或无可操作失败时 null。 */
|
|
514
|
+
export interface AttemptFixPromptData {
|
|
515
|
+
prompt: string;
|
|
516
|
+
}
|
|
517
|
+
|
|
518
|
+
/** `AttemptTimeline` 的 data:runner 阶段主链 + 收尾段,以及可选的 trace(供 turn 节点按 traceId 关联 span);没有 phase 时 null。 */
|
|
519
|
+
export interface AttemptTimelineData {
|
|
520
|
+
/** text 面拼 `niceeval show <locator> --timing` 下钻命令用;web 面不需要。 */
|
|
521
|
+
locator: AttemptLocator;
|
|
522
|
+
phases: PhaseTiming[];
|
|
523
|
+
trace: TraceSpan[] | null;
|
|
524
|
+
}
|
|
525
|
+
|
|
526
|
+
/** `AttemptConversation` 一轮:由带 `loc` 的 user 消息开启;`loc` 缺省表示流首无位置信息的兜底轮(旧 artifact)。 */
|
|
527
|
+
export interface AttemptConversationRound {
|
|
528
|
+
loc?: SourceLoc;
|
|
529
|
+
sentText: string;
|
|
530
|
+
replies: AttemptConversationReply[];
|
|
531
|
+
}
|
|
532
|
+
|
|
533
|
+
/** 一轮内的回复条目;`raw` 是未识别事件类型的原样兜底,不吞没其余事件。 */
|
|
534
|
+
export type AttemptConversationReply =
|
|
535
|
+
| { kind: "assistant" | "user" | "thinking" | "error"; text: string }
|
|
536
|
+
| { kind: "tool"; callId: string; name: string; tool?: ToolName; input: JsonValue; output?: JsonValue; status?: "completed" | "failed" | "rejected" }
|
|
537
|
+
| { kind: "skill"; skill: string }
|
|
538
|
+
| { kind: "subagent"; callId: string; name: string; remoteUrl?: string; output?: JsonValue; status?: "completed" | "failed" }
|
|
539
|
+
| { kind: "input"; request: InputRequest }
|
|
540
|
+
| { kind: "compaction"; reason?: string }
|
|
541
|
+
| { kind: "raw"; raw: JsonValue };
|
|
542
|
+
|
|
543
|
+
/** `AttemptConversation` 的 data:标准事件流按 loc 分轮;没有 events 时 null。 */
|
|
544
|
+
export interface AttemptConversationData {
|
|
545
|
+
/** text 面拼 `niceeval show <locator> --execution` 下钻命令用;web 面不需要。 */
|
|
546
|
+
locator: AttemptLocator;
|
|
547
|
+
rounds: AttemptConversationRound[];
|
|
548
|
+
}
|
|
549
|
+
|
|
550
|
+
/** `AttemptDiagnostics` 的 data:按 lifecycle phase 分组;没有 diagnostics 时 null。 */
|
|
551
|
+
export interface AttemptDiagnosticsData {
|
|
552
|
+
groups: { phase: string; items: DiagnosticRecord[] }[];
|
|
553
|
+
}
|
|
554
|
+
|
|
555
|
+
/** `AttemptUsage` 的 data:token / cache token / provider usage 明细;没有 usage 时 null。 */
|
|
556
|
+
export interface AttemptUsageData {
|
|
557
|
+
usage: Usage;
|
|
558
|
+
costUSD: number | null;
|
|
559
|
+
}
|
|
560
|
+
|
|
561
|
+
/** `AttemptTrace` 的 data:不与 runner 节点合并的原始 OTel span 列表;没有 trace 时 null。 */
|
|
562
|
+
export interface AttemptTraceData {
|
|
563
|
+
/** text 面拼 `niceeval show <locator> --timing` 下钻命令用;web 面不需要。 */
|
|
564
|
+
locator: AttemptLocator;
|
|
565
|
+
spans: TraceSpan[];
|
|
566
|
+
}
|
|
567
|
+
|
|
568
|
+
/** `AttemptDiff` 一个文件的摘要:`net` 恒 !== "none"(净无变化的触碰不进这份列表)。 */
|
|
569
|
+
export interface AttemptDiffFileEntry {
|
|
570
|
+
path: string;
|
|
571
|
+
net: "added" | "modified" | "deleted";
|
|
572
|
+
/** 净行数变化(公共前后缀修剪后的近似上界,与 `niceeval show --diff` 同一算法)。 */
|
|
573
|
+
lines: { added: number; deleted: number };
|
|
574
|
+
binary?: true;
|
|
575
|
+
/** 触碰过该文件的窗口标签,按时序;供 text 面引用 `--diff` 深挖同一批窗口。 */
|
|
576
|
+
windows: string[];
|
|
577
|
+
}
|
|
578
|
+
|
|
579
|
+
/** `AttemptDiff` 的 data:generated / modified / deleted 的文件级摘要;没有变更时 null。 */
|
|
580
|
+
export interface AttemptDiffData {
|
|
581
|
+
/** text 面拼 `niceeval show <locator> --diff` 下钻命令用;web 面不需要。 */
|
|
582
|
+
locator: AttemptLocator;
|
|
583
|
+
files: AttemptDiffFileEntry[];
|
|
584
|
+
}
|
|
@@ -6,37 +6,64 @@
|
|
|
6
6
|
// - 组件只认「算好的可序列化数据」:零 hooks、零数据操作;
|
|
7
7
|
// - 样式随包发布:配套 ./styles.css(nre-* 稳定类名),使用者在其后加载覆盖即可;
|
|
8
8
|
// - 渐进增强脚本 ./enhance.js 可选加载,初始静态 HTML 无 JS 完整可读;
|
|
9
|
-
// - 跨块配色一致:维度键 → 稳定散列 → 固定调色板下标(colors.ts)。
|
|
9
|
+
// - 跨块配色一致:维度键 → 稳定散列 → 固定调色板下标(../assets/colors.ts)。
|
|
10
10
|
|
|
11
|
-
export { AttemptList } from "
|
|
12
|
-
export { EvalList } from "
|
|
13
|
-
export { ExperimentList } from "
|
|
14
|
-
export { ScopeSummary } from "
|
|
15
|
-
export {
|
|
16
|
-
export {
|
|
17
|
-
export {
|
|
18
|
-
export {
|
|
19
|
-
export {
|
|
20
|
-
export {
|
|
21
|
-
export {
|
|
22
|
-
export { Scoreboard } from "./Scoreboard.tsx";
|
|
11
|
+
export { AttemptList } from "../components/entity-lists/AttemptList.tsx";
|
|
12
|
+
export { EvalList } from "../components/entity-lists/EvalList.tsx";
|
|
13
|
+
export { ExperimentList } from "../components/entity-lists/ExperimentList.tsx";
|
|
14
|
+
export { ScopeSummary } from "../components/summaries/ScopeSummary.tsx";
|
|
15
|
+
export { MetricTable } from "../components/metric-views/MetricTable.tsx";
|
|
16
|
+
export { MetricMatrix } from "../components/metric-views/MetricMatrix.tsx";
|
|
17
|
+
export { MetricBars } from "../components/metric-views/MetricBars.tsx";
|
|
18
|
+
export { MetricScatter } from "../components/metric-views/MetricScatter.tsx";
|
|
19
|
+
export { MetricLine } from "../components/metric-views/MetricLine.tsx";
|
|
20
|
+
export { DeltaTable } from "../components/metric-views/DeltaTable.tsx";
|
|
21
|
+
export { Scoreboard } from "../components/metric-views/Scoreboard.tsx";
|
|
23
22
|
|
|
24
23
|
// 站点组件的纯 web 面(data 形态;Hero 是组合组件,只住 niceeval/report)
|
|
25
|
-
export { HeroCard } from "
|
|
26
|
-
export { PoweredBy } from "
|
|
27
|
-
export { ScopeWarnings } from "
|
|
28
|
-
export { CopyFixPrompt } from "
|
|
29
|
-
export { TraceWaterfall } from "
|
|
24
|
+
export { HeroCard } from "../components/site-components/HeroCard.tsx";
|
|
25
|
+
export { PoweredBy } from "../components/site-components/PoweredBy.tsx";
|
|
26
|
+
export { ScopeWarnings } from "../components/site-components/ScopeWarnings.tsx";
|
|
27
|
+
export { CopyFixPrompt } from "../components/site-components/CopyFixPrompt.tsx";
|
|
28
|
+
export { TraceWaterfall } from "../components/site-components/TraceWaterfall.tsx";
|
|
30
29
|
|
|
31
|
-
//
|
|
30
|
+
// Attempt 详情组件族的纯 web 面(data 形态;AttemptAssessment / AttemptDetail 是组合组件,
|
|
31
|
+
// 不产生新渲染面,只住 niceeval/report)
|
|
32
|
+
export { AttemptSummary } from "../components/attempt-detail/AttemptSummary.tsx";
|
|
33
|
+
export { AttemptError } from "../components/attempt-detail/AttemptError.tsx";
|
|
34
|
+
export { AttemptAssertions } from "../components/attempt-detail/AttemptAssertions.tsx";
|
|
35
|
+
export { AttemptSource } from "../components/attempt-detail/AttemptSource.tsx";
|
|
36
|
+
export { AttemptFixPrompt } from "../components/attempt-detail/AttemptFixPrompt.tsx";
|
|
37
|
+
export { AttemptTimeline } from "../components/attempt-detail/AttemptTimeline.tsx";
|
|
38
|
+
export { AttemptConversation } from "../components/attempt-detail/AttemptConversation.tsx";
|
|
39
|
+
export { AttemptDiagnostics } from "../components/attempt-detail/AttemptDiagnostics.tsx";
|
|
40
|
+
export { AttemptUsage } from "../components/attempt-detail/AttemptUsage.tsx";
|
|
41
|
+
export { AttemptTrace } from "../components/attempt-detail/AttemptTrace.tsx";
|
|
42
|
+
export { AttemptDiff } from "../components/attempt-detail/AttemptDiff.tsx";
|
|
43
|
+
|
|
44
|
+
// 数据契约类型(家在 ../model/types.ts,「算」与「画」两侧共用同一份)
|
|
32
45
|
export type {
|
|
46
|
+
AttemptAssertionsData,
|
|
47
|
+
AttemptConversationData,
|
|
48
|
+
AttemptConversationReply,
|
|
49
|
+
AttemptConversationRound,
|
|
50
|
+
AttemptDiagnosticsData,
|
|
51
|
+
AttemptDiffData,
|
|
52
|
+
AttemptDiffFileEntry,
|
|
53
|
+
AttemptErrorData,
|
|
54
|
+
AttemptFixPromptData,
|
|
33
55
|
AttemptListItem,
|
|
34
56
|
AttemptLocator,
|
|
57
|
+
AttemptSourceData,
|
|
58
|
+
AttemptSourceLineData,
|
|
59
|
+
AttemptSourceTurn,
|
|
60
|
+
AttemptSummaryData,
|
|
61
|
+
AttemptTimelineData,
|
|
62
|
+
AttemptTraceData,
|
|
63
|
+
AttemptUsageData,
|
|
35
64
|
CopyFixPromptData,
|
|
36
65
|
DeltaData,
|
|
37
66
|
EvalListItem,
|
|
38
|
-
ExperimentComparisonData,
|
|
39
|
-
ExperimentComparisonGroupData,
|
|
40
67
|
ExperimentListEvalRow,
|
|
41
68
|
ExperimentListItem,
|
|
42
69
|
HeroData,
|
|
@@ -52,11 +79,12 @@ export type {
|
|
|
52
79
|
TraceSpanSummary,
|
|
53
80
|
TraceWaterfallRow,
|
|
54
81
|
VerdictTally,
|
|
55
|
-
} from "../types.ts";
|
|
82
|
+
} from "../model/types.ts";
|
|
83
|
+
export type { AttemptEvidence, AttemptEvidenceCapabilities } from "../../results/attempt-evidence.ts";
|
|
56
84
|
|
|
57
|
-
// locale(官方组件 chrome
|
|
58
|
-
export { DEFAULT_REPORT_LOCALE, resolveLocalizedText, resolveMetricLabel } from "../locale.ts";
|
|
59
|
-
export type { LocalizedText, ReportLocale } from "../locale.ts";
|
|
85
|
+
// locale(官方组件 chrome 文案的语言;LocalizedText 的按 locale 解析也用它)
|
|
86
|
+
export { DEFAULT_REPORT_LOCALE, resolveLocalizedText, resolveMetricLabel } from "../model/locale.ts";
|
|
87
|
+
export type { LocalizedText, ReportLocale } from "../model/locale.ts";
|
|
60
88
|
|
|
61
89
|
// 稳定配色(自定义组件想与官方组件同键同色时用;seriesClassForKey 配 CSS 的 --nre-series)
|
|
62
|
-
export { NRE_PALETTE, colorClassForKey, colorHexForKey, colorIndexForKey, seriesClassForKey } from "
|
|
90
|
+
export { NRE_PALETTE, colorClassForKey, colorHexForKey, colorIndexForKey, seriesClassForKey } from "../assets/colors.ts";
|