niceeval 0.6.1 → 0.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/INDEX.md +23 -23
- package/README.zh.md +6 -6
- package/dist/agents/types.d.ts +69 -7
- package/dist/context/types.d.ts +32 -12
- package/dist/i18n/en.d.ts +54 -0
- package/dist/i18n/zh-CN.d.ts +57 -3
- package/dist/o11y/types.d.ts +16 -2
- package/dist/report/aggregate.d.ts +32 -24
- package/dist/report/aggregate.js +158 -50
- package/dist/report/built-in/index.d.ts +2 -0
- package/dist/report/built-in/index.js +8 -0
- package/dist/report/components.d.ts +93 -160
- package/dist/report/components.js +377 -114
- package/dist/report/compute.d.ts +87 -81
- package/dist/report/compute.js +597 -417
- package/dist/report/flag.d.ts +32 -6
- package/dist/report/flag.js +92 -4
- package/dist/report/format.d.ts +19 -11
- package/dist/report/format.js +30 -13
- package/dist/report/index.d.ts +16 -16
- package/dist/report/index.js +20 -21
- package/dist/report/load.js +3 -2
- package/dist/report/locale.d.ts +57 -33
- package/dist/report/locale.js +122 -56
- package/dist/report/metrics.d.ts +23 -4
- package/dist/report/metrics.js +110 -25
- package/dist/report/primitives.d.ts +48 -15
- package/dist/report/primitives.js +135 -26
- package/dist/report/react/AttemptList.d.ts +9 -7
- package/dist/report/react/AttemptList.js +17 -10
- package/dist/report/react/DeltaTable.js +19 -18
- package/dist/report/react/EvalList.d.ts +4 -4
- package/dist/report/react/EvalList.js +0 -0
- package/dist/report/react/ExperimentComparison.d.ts +10 -0
- package/dist/report/react/ExperimentComparison.js +12 -0
- package/dist/report/react/ExperimentList.d.ts +4 -3
- package/dist/report/react/ExperimentList.js +17 -18
- package/dist/report/react/MetricBars.js +5 -4
- package/dist/report/react/MetricLine.js +12 -5
- package/dist/report/react/MetricMatrix.js +1 -1
- package/dist/report/react/MetricScatter.js +59 -28
- package/dist/report/react/MetricTable.js +2 -12
- package/dist/report/react/ScopeSummary.d.ts +10 -0
- package/dist/report/react/ScopeSummary.js +17 -0
- package/dist/report/react/Scoreboard.js +6 -6
- package/dist/report/react/cell.js +2 -2
- package/dist/report/react/chart-math.d.ts +23 -6
- package/dist/report/react/chart-math.js +71 -19
- package/dist/report/react/fixtures.d.ts +5 -9
- package/dist/report/react/fixtures.js +110 -147
- package/dist/report/react/index.d.ts +15 -5
- package/dist/report/react/index.js +18 -7
- package/dist/report/report.d.ts +137 -16
- package/dist/report/report.js +259 -28
- package/dist/report/text/faces.d.ts +17 -19
- package/dist/report/text/faces.js +253 -184
- package/dist/report/text/plot.js +1 -1
- package/dist/report/text/table.js +38 -7
- package/dist/report/tree.d.ts +90 -40
- package/dist/report/tree.js +252 -94
- package/dist/report/types.d.ts +247 -284
- package/dist/report/types.js +4 -3
- package/dist/report/web.d.ts +21 -5
- package/dist/report/web.js +42 -16
- package/dist/results/select.d.ts +38 -16
- package/dist/results/select.js +73 -25
- package/dist/results/types.d.ts +49 -14
- package/dist/runner/feedback/sink.d.ts +110 -0
- package/dist/runner/types.d.ts +513 -22
- package/dist/sandbox/docker.d.ts +23 -2
- package/dist/sandbox/e2b.d.ts +15 -1
- package/dist/sandbox/errors.d.ts +30 -3
- package/dist/sandbox/io-retry.d.ts +17 -0
- package/dist/sandbox/registry.d.ts +2 -0
- package/dist/sandbox/resolve.d.ts +18 -5
- package/dist/sandbox/retry.d.ts +11 -1
- package/dist/sandbox/types.d.ts +39 -5
- package/dist/sandbox/vercel.d.ts +7 -1
- package/dist/scoring/coverage.d.ts +30 -0
- package/dist/scoring/display.d.ts +21 -0
- package/dist/scoring/display.js +120 -0
- package/dist/scoring/types.d.ts +103 -20
- package/dist/shared/aggregate.d.ts +4 -2
- package/dist/shared/aggregate.js +8 -7
- package/dist/shared/types.d.ts +28 -0
- package/dist/tty-line.d.ts +0 -4
- package/dist/util.d.ts +23 -0
- package/docs-site/zh/README.md +44 -0
- package/docs-site/zh/examples/ai-agent-application.mdx +63 -0
- package/docs-site/zh/examples/coding-agent-extensions.mdx +57 -0
- package/docs-site/zh/examples/index.mdx +50 -0
- package/docs-site/zh/{concepts → explanation}/adapter.mdx +31 -13
- package/docs-site/zh/{concepts → explanation}/assert.mdx +7 -7
- package/docs-site/zh/{concepts → explanation}/drive.mdx +8 -8
- package/docs-site/zh/{concepts → explanation}/evals.mdx +4 -4
- package/docs-site/zh/{concepts → explanation}/experiment.mdx +8 -8
- package/docs-site/zh/{concepts → explanation}/hitl.mdx +8 -8
- package/docs-site/zh/{concepts → explanation}/judge.mdx +5 -5
- package/docs-site/zh/{concepts → explanation}/overview.mdx +11 -11
- package/docs-site/zh/{guides → explanation}/runner.mdx +18 -8
- package/docs-site/zh/{concepts → explanation}/tier.mdx +6 -6
- package/docs-site/zh/{guides → how-to}/agent-feedback-loop.mdx +35 -33
- package/docs-site/zh/{guides → how-to}/authoring.mdx +35 -2
- package/docs-site/zh/{guides → how-to}/ci-integration.mdx +23 -12
- package/docs-site/zh/{guides → how-to}/connect-otel.mdx +6 -6
- package/docs-site/zh/{guides → how-to}/connect-your-agent.mdx +47 -21
- package/docs-site/zh/{guides → how-to}/custom-reports.mdx +34 -39
- package/docs-site/zh/{guides → how-to}/dataset-fanout.mdx +25 -3
- package/docs-site/zh/{guides → how-to}/experiments.mdx +12 -5
- package/docs-site/zh/how-to/publish-report.mdx +105 -0
- package/docs-site/zh/{guides → how-to}/reporters.mdx +2 -2
- package/docs-site/zh/{guides → how-to}/sandbox-agent.mdx +56 -7
- package/docs-site/zh/how-to/sandbox-providers.mdx +350 -0
- package/docs-site/zh/{guides → how-to}/scoring-guide.mdx +4 -4
- package/docs-site/zh/{guides → how-to}/viewing-results.mdx +82 -39
- package/docs-site/zh/{guides → how-to}/write-experiment.mdx +6 -4
- package/docs-site/zh/{guides → how-to}/write-send.mdx +30 -14
- package/docs-site/zh/index.mdx +24 -26
- package/docs-site/zh/introduction.mdx +8 -8
- package/docs-site/zh/reference/builtin-agents.mdx +32 -5
- package/docs-site/zh/reference/capabilities.mdx +8 -8
- package/docs-site/zh/reference/cli.mdx +40 -12
- package/docs-site/zh/reference/define-agent.mdx +58 -5
- package/docs-site/zh/reference/define-config.mdx +1 -1
- package/docs-site/zh/reference/define-eval.mdx +42 -9
- package/docs-site/zh/reference/events.mdx +3 -3
- package/docs-site/zh/reference/expect.mdx +26 -1
- package/docs-site/zh/{guides → reference}/official-adapters.mdx +32 -8
- package/docs-site/zh/{guides → reference}/report-components.mdx +45 -33
- package/docs-site/zh/{guides → reference}/results-data.mdx +21 -13
- package/docs-site/zh/troubleshooting/debug-sandbox.mdx +57 -0
- package/docs-site/zh/troubleshooting/debugging.mdx +212 -0
- package/docs-site/zh/{quickstart.mdx → tutorials/quickstart.mdx} +5 -17
- package/package.json +10 -2
- package/src/agents/ai-sdk-otel.test.ts +1 -0
- package/src/agents/ai-sdk.test.ts +3 -0
- package/src/agents/ai-sdk.ts +3 -0
- package/src/agents/bub-install-spec.test.ts +34 -0
- package/src/agents/bub-install-spec.ts +32 -0
- package/src/agents/bub.ts +31 -32
- package/src/agents/claude-code.test.ts +130 -9
- package/src/agents/claude-code.ts +76 -4
- package/src/agents/codex.test.ts +189 -40
- package/src/agents/codex.ts +155 -14
- package/src/agents/coding-cli-versions.test.ts +15 -0
- package/src/agents/coding-cli-versions.ts +3 -0
- package/src/agents/index.ts +13 -2
- package/src/agents/langgraph.test.ts +204 -0
- package/src/agents/langgraph.ts +495 -0
- package/src/agents/marketplace.ts +85 -0
- package/src/agents/native-config.test.ts +179 -0
- package/src/agents/native-config.ts +267 -0
- package/src/agents/openai-compat.test.ts +1 -0
- package/src/agents/openai-compat.ts +1 -1
- package/src/agents/openclaw.test.ts +31 -0
- package/src/agents/openclaw.ts +171 -0
- package/src/agents/plugin-config.test.ts +1 -0
- package/src/agents/sdk-streams.test.ts +79 -0
- package/src/agents/sdk-streams.ts +55 -10
- package/src/agents/skills.test.ts +1 -0
- package/src/agents/streaming.test.ts +3 -9
- package/src/agents/streaming.ts +2 -2
- package/src/agents/types.ts +71 -8
- package/src/agents/ui-message-stream.test.ts +3 -0
- package/src/cli.ts +446 -124
- package/src/context/context.test.ts +51 -12
- package/src/context/context.ts +162 -30
- package/src/context/session.test.ts +2 -1
- package/src/context/session.ts +115 -7
- package/src/context/types.ts +30 -12
- package/src/define.test.ts +13 -8
- package/src/define.ts +25 -4
- package/src/expect/index.ts +53 -23
- package/src/i18n/en.ts +81 -17
- package/src/i18n/zh-CN.ts +80 -17
- package/src/o11y/cost.test.ts +1 -0
- package/src/o11y/execution-tree.test.ts +1 -20
- package/src/o11y/otlp/mappers/claude-code.test.ts +1 -0
- package/src/o11y/otlp/parse.test.ts +1 -0
- package/src/o11y/otlp/turn-otel.test.ts +1 -0
- package/src/o11y/parsers/bub.test.ts +1 -0
- package/src/o11y/parsers/claude-code.test.ts +1 -34
- package/src/o11y/parsers/openclaw.test.ts +154 -0
- package/src/o11y/parsers/openclaw.ts +310 -0
- package/src/o11y/prices.json +746 -311
- package/src/o11y/tool-names.test.ts +1 -0
- package/src/o11y/types.ts +16 -2
- package/src/report/aggregate.ts +178 -61
- package/src/report/built-in/index.tsx +9 -0
- package/src/report/components.tsx +625 -279
- package/src/report/compute.ts +723 -491
- package/src/report/dual-render.test.tsx +741 -1024
- package/src/report/flag.ts +104 -12
- package/src/report/format.ts +32 -12
- package/src/report/index.ts +119 -46
- package/src/report/load.ts +3 -2
- package/src/report/locale.ts +136 -65
- package/src/report/metrics.ts +108 -25
- package/src/report/primitives.tsx +196 -45
- package/src/report/react/AttemptList.tsx +30 -43
- package/src/report/react/DeltaTable.tsx +63 -45
- package/src/report/react/EvalList.tsx +0 -0
- package/src/report/react/ExperimentComparison.tsx +73 -0
- package/src/report/react/ExperimentList.tsx +50 -32
- package/src/report/react/MetricBars.tsx +5 -4
- package/src/report/react/MetricLine.tsx +13 -8
- package/src/report/react/MetricMatrix.tsx +2 -2
- package/src/report/react/MetricScatter.tsx +86 -34
- package/src/report/react/MetricTable.tsx +4 -76
- package/src/report/react/ScopeSummary.tsx +86 -0
- package/src/report/react/Scoreboard.tsx +28 -10
- package/src/report/react/cell.tsx +2 -2
- package/src/report/react/chart-math.test.ts +85 -0
- package/src/report/react/chart-math.ts +101 -22
- package/src/report/react/enhance.js +89 -5
- package/src/report/react/fixtures.ts +114 -154
- package/src/report/react/index.tsx +24 -39
- package/src/report/react/render.test.tsx +138 -158
- package/src/report/react/styles.css +243 -82
- package/src/report/report.test.ts +779 -841
- package/src/report/report.ts +423 -41
- package/src/report/text/faces.ts +290 -193
- package/src/report/text/plot.ts +1 -1
- package/src/report/text/table.ts +44 -7
- package/src/report/tree.ts +362 -104
- package/src/report/types.ts +261 -271
- package/src/report/web.ts +63 -20
- package/src/results/annotated-source.test.ts +62 -9
- package/src/results/annotated-source.ts +64 -6
- package/src/results/attempt-evidence.test.ts +13 -11
- package/src/results/attempt-evidence.ts +20 -13
- package/src/results/attempt-source.ts +6 -3
- package/src/results/copy.ts +150 -60
- package/src/results/host-equivalence.test.ts +34 -20
- package/src/results/index.ts +12 -4
- package/src/results/locator.test.ts +1 -22
- package/src/results/open.ts +15 -5
- package/src/results/publish.ts +149 -0
- package/src/results/results.test.ts +89 -54
- package/src/results/select.ts +104 -34
- package/src/results/truncate.ts +90 -0
- package/src/results/types.ts +43 -14
- package/src/results/writer.ts +31 -13
- package/src/runner/attempt.test.ts +138 -7
- package/src/runner/attempt.ts +603 -104
- package/src/runner/discover.test.ts +47 -0
- package/src/runner/discover.ts +36 -2
- package/src/runner/eval-source.test.ts +1 -27
- package/src/runner/feedback/agent.test.ts +504 -0
- package/src/runner/feedback/agent.ts +409 -0
- package/src/runner/feedback/ci.test.ts +562 -0
- package/src/runner/feedback/ci.ts +401 -0
- package/src/runner/feedback/coordinator.test.ts +317 -0
- package/src/runner/feedback/coordinator.ts +397 -0
- package/src/runner/feedback/failure.ts +40 -0
- package/src/runner/feedback/human.test.ts +616 -0
- package/src/runner/feedback/human.ts +535 -0
- package/src/runner/feedback/index.ts +66 -0
- package/src/runner/feedback/io.ts +78 -0
- package/src/runner/feedback/profile.test.ts +50 -0
- package/src/runner/feedback/profile.ts +58 -0
- package/src/runner/feedback/reducer.test.ts +395 -0
- package/src/runner/feedback/reducer.ts +260 -0
- package/src/runner/feedback/renderer.ts +82 -0
- package/src/runner/feedback/sink.ts +203 -0
- package/src/runner/feedback/testing.ts +106 -0
- package/src/runner/ledger.test.ts +230 -0
- package/src/runner/ledger.ts +329 -0
- package/src/runner/report.test.ts +128 -3
- package/src/runner/report.ts +33 -9
- package/src/runner/reporters/artifacts.ts +8 -2
- package/src/runner/reporters/braintrust.test.ts +8 -7
- package/src/runner/reporters/braintrust.ts +9 -2
- package/src/runner/reporters/index.ts +2 -2
- package/src/runner/reporters/json.test.ts +162 -0
- package/src/runner/reporters/json.ts +35 -8
- package/src/runner/reporters/shared.ts +1 -5
- package/src/runner/run.test.ts +760 -3
- package/src/runner/run.ts +243 -37
- package/src/runner/sandbox-prep.ts +3 -42
- package/src/runner/timing.ts +158 -0
- package/src/runner/types.ts +518 -22
- package/src/sandbox/checkpoint.test.ts +55 -0
- package/src/sandbox/checkpoint.ts +29 -8
- package/src/sandbox/cli-commands.ts +407 -0
- package/src/sandbox/docker.ts +115 -16
- package/src/sandbox/e2b-agent-template.test.ts +56 -0
- package/src/sandbox/e2b-agent-template.ts +94 -0
- package/src/sandbox/e2b.ts +74 -9
- package/src/sandbox/errors.ts +111 -4
- package/src/sandbox/index.ts +2 -0
- package/src/sandbox/io-retry.test.ts +58 -0
- package/src/sandbox/io-retry.ts +45 -0
- package/src/sandbox/keep-registry.test.ts +86 -0
- package/src/sandbox/keep-registry.ts +142 -0
- package/src/sandbox/keep.ts +178 -0
- package/src/sandbox/paths.test.ts +1 -0
- package/src/sandbox/paths.ts +19 -8
- package/src/sandbox/registry.ts +20 -3
- package/src/sandbox/resolve.ts +76 -11
- package/src/sandbox/retry.test.ts +70 -0
- package/src/sandbox/retry.ts +46 -4
- package/src/sandbox/types.ts +44 -6
- package/src/sandbox/vercel.ts +43 -20
- package/src/scoring/collector.ts +60 -17
- package/src/scoring/coverage.ts +95 -0
- package/src/scoring/diff.ts +81 -0
- package/src/scoring/display.test.ts +121 -0
- package/src/scoring/display.ts +133 -0
- package/src/scoring/evidence.test.ts +189 -0
- package/src/scoring/judge.test.ts +142 -0
- package/src/scoring/judge.ts +15 -18
- package/src/scoring/scoped.ts +217 -50
- package/src/scoring/types.ts +117 -20
- package/src/scoring/verdict.ts +16 -4
- package/src/shared/aggregate.ts +8 -6
- package/src/shared/types.ts +31 -0
- package/src/show/compose.ts +50 -67
- package/src/show/index.ts +127 -56
- package/src/show/render.ts +662 -131
- package/src/show/report-host.test.ts +188 -0
- package/src/show/report-host.ts +375 -0
- package/src/show/show.test.ts +320 -54
- package/src/tty-line.ts +8 -26
- package/src/util.test.ts +1 -0
- package/src/util.ts +41 -0
- package/src/view/app/App.test.tsx +69 -0
- package/src/view/app/App.tsx +144 -48
- package/src/view/app/components/AttemptModal.tsx +423 -11
- package/src/view/app/components/CodeView.tsx +41 -14
- package/src/view/app/components/CopyControls.tsx +2 -2
- package/src/view/app/i18n.ts +37 -17
- package/src/view/app/lib/attempt-route.test.ts +1 -0
- package/src/view/app/lib/verdict.ts +7 -9
- package/src/view/app/main.tsx +13 -8
- package/src/view/app/pages/{RunsPage.tsx → AttemptsPage.tsx} +6 -6
- package/src/view/app/types.ts +4 -1
- package/src/view/artifact-serving.test.ts +2 -1
- package/src/view/client-dist/app.css +1 -1
- package/src/view/client-dist/app.js +17 -17
- package/src/view/data.test.ts +10 -3
- package/src/view/data.ts +155 -49
- package/src/view/index.ts +56 -41
- package/src/view/server.ts +37 -15
- package/src/view/shared/types.ts +34 -5
- package/src/view/styles.css +227 -0
- package/src/view/view-report.test.ts +167 -62
- package/dist/report/built-ins/experiment-comparison.d.ts +0 -1
- package/dist/report/built-ins/experiment-comparison.js +0 -13
- package/dist/report/built-ins/index.d.ts +0 -1
- package/dist/report/built-ins/index.js +0 -2
- package/dist/report/react/GroupSummary.d.ts +0 -8
- package/dist/report/react/GroupSummary.js +0 -8
- package/dist/report/react/RunOverview.d.ts +0 -8
- package/dist/report/react/RunOverview.js +0 -12
- package/docs-site/zh/example/ai-agent-application.mdx +0 -152
- package/docs-site/zh/example/claude-code-codex-plugin.mdx +0 -167
- package/docs-site/zh/example/claude-code-codex-skill.mdx +0 -152
- package/docs-site/zh/example/showcase.mdx +0 -39
- package/docs-site/zh/guides/publish-report.mdx +0 -91
- package/docs-site/zh/guides/sandbox-providers.mdx +0 -102
- package/src/report/built-in-user-parity.test.tsx +0 -640
- package/src/report/built-ins/experiment-comparison.tsx +0 -19
- package/src/report/built-ins/index.ts +0 -2
- package/src/report/react/GroupSummary.tsx +0 -66
- package/src/report/react/RunOverview.tsx +0 -109
- package/src/runner/reporters/console.ts +0 -70
- package/src/runner/reporters/live.test.ts +0 -56
- package/src/runner/reporters/live.ts +0 -247
- package/src/runner/reporters/quiet.test.ts +0 -66
- package/src/runner/reporters/quiet.ts +0 -49
- package/src/runner/reporters/table.ts +0 -277
- /package/docs-site/zh/{example/tier1-ai-sdk-v7.mdx → examples/integrations/ai-sdk-v7.mdx} +0 -0
- /package/docs-site/zh/{example/tier1-claude-sdk.mdx → examples/integrations/claude-sdk.mdx} +0 -0
- /package/docs-site/zh/{example/tier1-codex-sdk.mdx → examples/integrations/codex-sdk.mdx} +0 -0
- /package/docs-site/zh/{example/tier1-langgraph.mdx → examples/integrations/langgraph.mdx} +0 -0
- /package/docs-site/zh/{example/tier1-pi-sdk.mdx → examples/integrations/pi-sdk.mdx} +0 -0
- /package/docs-site/zh/{guides → how-to}/fixtures.mdx +0 -0
package/src/i18n/en.ts
CHANGED
|
@@ -14,6 +14,8 @@ export const en = {
|
|
|
14
14
|
"bub.installFailed": "bub install failed after {{attempts}} attempts:\n{{tail}}",
|
|
15
15
|
"bub.setupNotRun": "bub adapter setup() has not run in this sandbox (missing home/workspace info). The runner must call setup before send.",
|
|
16
16
|
"checkpoint.emptyTar": "checkpoint: tar is empty (paths: {{paths}})",
|
|
17
|
+
"checkpoint.archiveFailed": "checkpoint archive failed (exit {{exitCode}}): {{detail}}",
|
|
18
|
+
"checkpoint.restoreFailed": "checkpoint restore failed (exit {{exitCode}}): {{detail}}",
|
|
17
19
|
"skill.localMissing": "Local skill path \"{{path}}\" does not exist (resolved to {{resolved}}). Paths are resolved from the project root you run niceeval in.",
|
|
18
20
|
"skill.localDirNoSkillFile": "Local skill directory \"{{path}}\" has no SKILL.md. A directory-shaped skill must contain SKILL.md at its root.",
|
|
19
21
|
"skill.localUnsupportedShape": "Local skill path \"{{path}}\" has an unsupported shape. Accepted: a directory containing SKILL.md, or a single .md file.",
|
|
@@ -23,7 +25,21 @@ export const en = {
|
|
|
23
25
|
"skill.repoUnknownSkill": "Repo skill {{source}} (ref: {{ref}}) has no skill named \"{{skill}}\". Available: {{available}}.",
|
|
24
26
|
"skill.copyFailed": "Could not install skill \"{{name}}\" into {{dest}}:\n{{tail}}",
|
|
25
27
|
"plugin.marketplaceFailed": "Could not connect {{agent}} marketplace \"{{name}}\" (source: {{source}}, ref: {{ref}}):\n{{tail}}",
|
|
28
|
+
"plugin.marketplaceVerifyFailed": "Could not read back the registered marketplace list after adding {{agent}} marketplace \"{{name}}\" ({{command}}):\n{{tail}}",
|
|
29
|
+
"plugin.marketplaceNameMismatch":
|
|
30
|
+
"{{agent}} marketplace name mismatch: the configured name \"{{expected}}\" (source: {{source}}) is not in the registered list after add; actually registered: {{actual}}. " +
|
|
31
|
+
"marketplace.name must equal the name declared in the target repo's manifest — use the real name.",
|
|
26
32
|
"plugin.installFailed": "Could not install {{agent}} plugin \"{{name}}\" (marketplace: {{marketplace}}):\n{{tail}}",
|
|
33
|
+
"nativeConfig.pathNotProjectRelative":
|
|
34
|
+
"{{agent}} {{field}} only accepts relative paths inside the project root, got \"{{path}}\". Absolute paths, `..` segments and `~` paths are rejected; copy configs from outside the project into it first.",
|
|
35
|
+
"nativeConfig.missing":
|
|
36
|
+
"{{agent}} {{field}} points to a missing file: \"{{path}}\" (resolved to {{resolved}}). Paths resolve from the project root you run niceeval in (the directory containing niceeval.config.ts), not from eval / experiment source files.",
|
|
37
|
+
"nativeConfig.escapesRoot": "{{agent}} {{field}} \"{{path}}\" resolves through a symlink to outside the project root ({{resolved}}). The config file must physically live inside the project root.",
|
|
38
|
+
"nativeConfig.notFile": "{{agent}} {{field}} \"{{path}}\" is not a regular file. Point it at a complete official config file.",
|
|
39
|
+
"nativeConfig.invalidSyntax": "{{agent}} {{field}} \"{{path}}\" is not valid {{format}}: {{detail}}",
|
|
40
|
+
"nativeConfig.reservedKeys":
|
|
41
|
+
"{{agent}} {{field}} \"{{path}}\" contains reserved keys: {{keys}}. These keys are owned by the experiment and the Adapter (model, auth, MCP and OTel are layered separately) — remove them from the file.",
|
|
42
|
+
"nativeConfig.uploadFailed": "Could not upload native config file \"{{path}}\" into the sandbox ({{dest}}):\n{{tail}}",
|
|
27
43
|
"cli.all": "(all)",
|
|
28
44
|
"cli.browserOpenFailed": "Could not open the browser automatically. Open manually: {{url}}\n",
|
|
29
45
|
"cli.clean.done": "Deleted .niceeval/ historical run artifacts.\n",
|
|
@@ -32,18 +48,19 @@ export const en = {
|
|
|
32
48
|
"Ways to fix:\n" +
|
|
33
49
|
" - [init] Run `npx niceeval init` to scaffold niceeval.config.ts and evals/\n" +
|
|
34
50
|
" - [cd] Run from the project root that contains niceeval.config.ts\n" +
|
|
35
|
-
" Docs: node_modules/niceeval/docs-site/zh/quickstart.mdx",
|
|
51
|
+
" Docs: node_modules/niceeval/docs-site/zh/tutorials/quickstart.mdx",
|
|
36
52
|
"cli.config.noDefault": "niceeval.config.ts must default export defineConfig(...).",
|
|
37
53
|
"cli.dry.header": "\n[dry] {{evals}} evals × {{configs}} run configs:\n",
|
|
38
54
|
"cli.dry.noMatches": "(no matches)",
|
|
39
55
|
"cli.dry.row": " {{who}}{{experiment}}: {{evals}} ×{{runs}}\n",
|
|
40
56
|
"cli.error": "niceeval error: {{error}}\n",
|
|
41
57
|
"cli.flag.invalidNumber": "Flag --{{flag}} expects a number, got \"{{value}}\".\n",
|
|
58
|
+
"cli.flag.invalidOutput": "Flag --output expects one of auto|human|agent|ci, got \"{{value}}\".\n",
|
|
42
59
|
"runner.budgetUnenforceable":
|
|
43
60
|
"budget for {{budgetKey}}: several attempts completed without any cost data (agent reports no usage and the model is not in the price table) — the budget cannot be enforced for this agent; continuing without the guard.\n",
|
|
44
61
|
"judge.modelMissing":
|
|
45
62
|
"No judge model configured. Set it in defineConfig({ judge: { model: \"...\" } }), the eval's judge config, or the NICEEVAL_JUDGE_MODEL environment variable (there is no built-in default model).\n" +
|
|
46
|
-
" Docs: node_modules/niceeval/docs-site/zh/
|
|
63
|
+
" Docs: node_modules/niceeval/docs-site/zh/how-to/scoring-guide.mdx",
|
|
47
64
|
"loaders.yamlMissing":
|
|
48
65
|
"loadYaml(\"{{path}}\") needs a YAML parser: run `pnpm add yaml` first (or switch to loadJson with a JSON dataset).",
|
|
49
66
|
"cli.flag.parseError": "{{message}}\nRun `niceeval --help` for usage.\n",
|
|
@@ -58,26 +75,31 @@ export const en = {
|
|
|
58
75
|
" a single eval id: attempts + assertion details\n" +
|
|
59
76
|
" @<locator> exactly one attempt: no flag -> compact overview;\n" +
|
|
60
77
|
" with a flag -> that evidence slice\n" +
|
|
61
|
-
" --
|
|
78
|
+
" --source the Eval source captured when this attempt ran,\n" +
|
|
62
79
|
" assertions mapped back to source lines\n" +
|
|
63
80
|
" --execution this attempt's execution event stream (messages/thinking/\n" +
|
|
64
81
|
" Skill loads/tool calls); OTel adds timing to the same node when present\n" +
|
|
82
|
+
" --timing unified timing tree for the attempt (phases + hooks/commands/turns + per-turn OTel)\n" +
|
|
65
83
|
" --diff[=file] sandbox workspace file-change summary; =file expands one file\n" +
|
|
66
|
-
" --history
|
|
67
|
-
" --
|
|
68
|
-
" --report <file> custom report\n" +
|
|
84
|
+
" --history per experiment × eval execution timeline (mutually exclusive with --report)\n" +
|
|
85
|
+
" --results <dir> pin a results root --experiment <id> one experiment\n" +
|
|
86
|
+
" --report <file> custom report --page <id> pick a page (multi-page\n" +
|
|
87
|
+
" reports print a page index with copyable commands)\n" +
|
|
69
88
|
" niceeval list list discovered evals\n" +
|
|
70
|
-
" niceeval view [eval-id-prefix
|
|
71
|
-
" report
|
|
72
|
-
" (same file as show); --
|
|
73
|
-
" --
|
|
89
|
+
" niceeval view [eval-id-prefix…] [--out dir] [--port n] [--no-open]\n" +
|
|
90
|
+
" report pages + evidence rooms; --report <file> swaps in your report\n" +
|
|
91
|
+
" (same file as show); --page <id> picks the initial page;\n" +
|
|
92
|
+
" --results <dir> pins a results root; --snapshot <file> opens exactly\n" +
|
|
93
|
+
" one snapshot; --experiment <id> one experiment\n" +
|
|
74
94
|
" --out <dir> exports a static site: index.html plus the viewer\n" +
|
|
75
95
|
" artifacts, ready for any static host\n" +
|
|
96
|
+
" niceeval sandbox list|enter|history|diff|stop inspect & destroy sandboxes kept by --keep-sandbox\n" +
|
|
76
97
|
" niceeval clean delete .niceeval/ artifacts\n" +
|
|
77
98
|
" niceeval init scaffold config + evals/\n\n" +
|
|
78
99
|
"Flags:\n" +
|
|
79
100
|
" --runs n --max-concurrency n --timeout ms --budget usd --tag t\n" +
|
|
80
|
-
" --early-exit / --no-early-exit --strict --force --dry
|
|
101
|
+
" --early-exit / --no-early-exit --strict --force --dry\n" +
|
|
102
|
+
" --output auto|human|agent|ci\n" +
|
|
81
103
|
" --junit path --json path --out dir --port n --open / --no-open -h, --help -v, --version\n\n" +
|
|
82
104
|
"Positional args only select which evals to run (id prefixes); which agent and\n" +
|
|
83
105
|
"how to run come from experiments/ + flags. Env overrides (flag > env > config):\n" +
|
|
@@ -87,16 +109,19 @@ export const en = {
|
|
|
87
109
|
"cli.show.noEvalMatch": "No results matched: {{patterns}}. Evals with results: {{evals}}\n",
|
|
88
110
|
"cli.show.noExperimentMatch": "No experiment matched --experiment {{arg}}. Experiments with results: {{experiments}}\n",
|
|
89
111
|
"cli.show.historyReportConflict":
|
|
90
|
-
"`--history` and `--report` are mutually exclusive: --history is the
|
|
112
|
+
"`--history` and `--report` are mutually exclusive: both take over the main output. --history is the host's per-attempt execution timeline; for snapshot-level trends, compose exp.snapshots inside your report file instead.\n",
|
|
91
113
|
"cli.show.evidenceNeedsEval":
|
|
92
|
-
"--
|
|
114
|
+
"--source / --execution / --diff show one attempt's evidence, but the selection matched {{matched}} evals. Pick an attempt locator from the index below:\n{{index}}\n",
|
|
93
115
|
"cli.show.locatorMalformed": "{{message}}\n",
|
|
94
116
|
"cli.show.locatorNotFound": "{{message}}\n",
|
|
95
117
|
"cli.eval.noMatch": "No eval matched: {{patterns}}.\n",
|
|
96
118
|
"cli.eval.noMatchHintExperiment": "Hint: \"{{pattern}}\" is an experiment{{kind}}; you probably meant: niceeval exp {{pattern}}\n",
|
|
97
119
|
"cli.eval.noMatchKnown": "Discovered {{count}} evals: {{evals}}\n",
|
|
98
|
-
"cli.exp.agentModelFlagUnsupported": "
|
|
120
|
+
"cli.exp.agentModelFlagUnsupported": "experiment runs do not support --agent / --model. Add or copy an experiment file and change its model instead.\n",
|
|
121
|
+
"cli.exp.viewerFlagUnsupported": "`{{flag}}` only applies to niceeval {{command}}, not niceeval exp.\n",
|
|
99
122
|
"cli.experiment.noMatch": "No experiment matched: {{arg}}. Discovered: {{experiments}}\n",
|
|
123
|
+
"cli.experiment.viewerCommandHint": "Did you mean: niceeval {{command}}{{args}}\n",
|
|
124
|
+
"cli.experiment.noEvalsSelected": "No evals selected: {{selection}} matched 0 evals. Available experiments: {{experiments}}.\n",
|
|
100
125
|
"cli.experimentGroup": " group",
|
|
101
126
|
"cli.fallbackCleanupTimeout": "\ngraceful cleanup timed out; force-cleaning sandboxes...\n",
|
|
102
127
|
"cli.forceCleanupExit": "\nForce-cleaning sandboxes and exiting...\n",
|
|
@@ -109,7 +134,7 @@ export const en = {
|
|
|
109
134
|
"cli.resultsPath": "Structured results: {{path}} (snapshot.json + per-attempt result.json / events.json / trace.json / diff.json)\n",
|
|
110
135
|
"cli.run.experimentRequired":
|
|
111
136
|
"Run evals through an experiment: use `niceeval exp [group|config] [eval id prefix]`.\n" +
|
|
112
|
-
" Docs: node_modules/niceeval/docs-site/zh/
|
|
137
|
+
" Docs: node_modules/niceeval/docs-site/zh/how-to/write-experiment.mdx\n",
|
|
113
138
|
"cli.run.experimentRequiredHint": "Hint: \"{{pattern}}\" is an experiment{{kind}}; you probably meant: niceeval exp {{pattern}}\n",
|
|
114
139
|
"cli.run.experimentRequiredKnown": "Discovered experiments: {{experiments}}\n",
|
|
115
140
|
"cli.unimplemented": "Command \"{{command}}\" is not implemented yet (MVP).\n",
|
|
@@ -120,7 +145,7 @@ export const en = {
|
|
|
120
145
|
"cli.view.url": "niceeval view: {{url}}\n",
|
|
121
146
|
"context.capabilityMissing":
|
|
122
147
|
"Agent \"{{agent}}\" is not sandbox-backed (built with defineSandboxAgent), so t.{{method}} is unavailable. Use an agent built with defineSandboxAgent, or drop this assertion.\n" +
|
|
123
|
-
" Docs: node_modules/niceeval/docs-site/zh/
|
|
148
|
+
" Docs: node_modules/niceeval/docs-site/zh/how-to/sandbox-agent.mdx",
|
|
124
149
|
"context.skipEmpty": "skip() requires a non-empty reason.",
|
|
125
150
|
"context.turnFailed": "This send returned failed (turn status = failed): {{message}}",
|
|
126
151
|
"context.turnFailedDefault": "This send returned failed (turn status = failed)",
|
|
@@ -128,6 +153,7 @@ export const en = {
|
|
|
128
153
|
"define.evalIdRejected": "defineEval does not accept id; ids are derived from file paths.",
|
|
129
154
|
"define.evalTestRequired": "defineEval requires an async test(t) function.",
|
|
130
155
|
"define.experimentAgentRequired": "defineExperiment requires agent.",
|
|
156
|
+
"define.experimentFlagNotJson": "experiment.flags.{{key}} is not JSON-serializable (functions / undefined / cycles / bigint are not allowed); flags are persisted verbatim into result snapshots and must be plain JSON.",
|
|
131
157
|
"define.experimentIdRejected": "defineExperiment does not accept id; ids are derived from file paths.",
|
|
132
158
|
"define.sandboxAgentNameRequired": "defineSandboxAgent requires name.",
|
|
133
159
|
"define.sandboxCreateRequired": "defineSandbox requires a create() function.",
|
|
@@ -138,6 +164,41 @@ export const en = {
|
|
|
138
164
|
"docker.imagePullStart": "Pulling Docker image: {{image}}...",
|
|
139
165
|
"docker.readFileFailed": "Failed to read file {{path}}: {{stderr}}",
|
|
140
166
|
"docker.unsupportedRuntime": "Unsupported runtime: {{runtime}}",
|
|
167
|
+
"feedback.human.active": "ACTIVE",
|
|
168
|
+
"feedback.human.budgetExhausted": "budget exhausted for {{experimentId}} (spent {{spent}}, unstarted {{unstarted}})",
|
|
169
|
+
"feedback.human.compare": "Compare: niceeval view {{group}}",
|
|
170
|
+
"feedback.human.counts": "{{total}} total · {{reused}} reused · {{running}} running · {{queued}} queued · {{completed}} completed",
|
|
171
|
+
"feedback.human.diffHint": "Diff: niceeval show {{locator}} --diff",
|
|
172
|
+
"feedback.human.evalHint": "Eval: niceeval show {{locator}} --source",
|
|
173
|
+
"feedback.human.failuresHeader": "FAILURES",
|
|
174
|
+
"feedback.human.heartbeat": "{{elapsed}} elapsed · {{counts}}",
|
|
175
|
+
"feedback.human.inspect": "Inspect: niceeval show {{locator}}",
|
|
176
|
+
"feedback.human.moreActive": "… {{count}} more active",
|
|
177
|
+
"feedback.human.plan": "Plan: {{total}} attempts · {{evals}} evals × {{configs}} configs · concurrency {{concurrency}}",
|
|
178
|
+
"feedback.human.resultFailed": "FAILED",
|
|
179
|
+
"feedback.human.resultIncomplete": "INCOMPLETE",
|
|
180
|
+
"feedback.human.resultInterrupted": "INTERRUPTED",
|
|
181
|
+
"feedback.human.resultPassed": "PASSED",
|
|
182
|
+
"feedback.human.resultsHeader": "Results:",
|
|
183
|
+
"feedback.human.resultsMore": "… {{count}} more",
|
|
184
|
+
"feedback.human.reuse": "Reuse: {{reused}} of {{total}} carried in from cache · {{toRun}} to run",
|
|
185
|
+
"feedback.human.summaryLine": "{{passed}} passed · {{failed}} failed · {{errored}} errored ({{reused}} reused)",
|
|
186
|
+
"feedback.human.summaryAllReusedLine": "{{passed}} passed · {{failed}} failed · {{errored}} errored (all {{reused}} reused)",
|
|
187
|
+
"feedback.human.suppressedFailures": "… {{count}} more failures suppressed",
|
|
188
|
+
"feedback.human.trace": "Trace: niceeval show {{locator}} --execution",
|
|
189
|
+
"feedback.phase.agentSetup": "agent setup",
|
|
190
|
+
"feedback.phase.evalRun": "running eval",
|
|
191
|
+
"feedback.phase.evalSetup": "eval setup",
|
|
192
|
+
"feedback.phase.sandboxCreate": "creating sandbox",
|
|
193
|
+
"feedback.phase.sandboxQueue": "queued for sandbox",
|
|
194
|
+
"feedback.phase.sandboxSetup": "sandbox setup",
|
|
195
|
+
"feedback.phase.scoring": "scoring",
|
|
196
|
+
"feedback.phase.teardown": "cleaning up",
|
|
197
|
+
"feedback.phase.telemetryCollect": "collecting trace",
|
|
198
|
+
"feedback.phase.telemetryConfigure": "configuring telemetry",
|
|
199
|
+
"feedback.phase.workspaceBaseline": "preparing workspace",
|
|
200
|
+
"feedback.phase.workspaceDiff": "capturing diff",
|
|
201
|
+
"feedback.rendererError": " · [feedback] renderer failed while handling {{context}} (ignored): {{message}}\n",
|
|
141
202
|
"hitl.answerNeedsOptionOrText": "The object form of t.respond needs either optionId or text (neither was given).",
|
|
142
203
|
"hitl.invalidOption": "Answer \"{{optionId}}\" is not an option of request {{requestId}} ({{options}}).",
|
|
143
204
|
"hitl.noOptions": "this request has no options",
|
|
@@ -189,6 +250,7 @@ export const en = {
|
|
|
189
250
|
"otel.portInUse": "OTLP receiver port {{port}} is already in use (another process is bound to it). Pick a free port in defineConfig({ telemetry: { port } }), or stop whatever is using {{port}} and retry.",
|
|
190
251
|
"otel.windowAttribution": "otel: spans missing our traceparent, attributing by time window (turns for this agent serialized; concurrency resumes once W3C propagation is confirmed)",
|
|
191
252
|
"runner.diffProgress": "captured diff: {{changed}} changed / {{deleted}} deleted",
|
|
253
|
+
"runner.failFast": "error {{code}} recurred consecutively on {{evalId}}; treating it as deterministic and skipping the remaining attempts for this config (fail-fast).",
|
|
192
254
|
"runner.driveAgent": "driving agent...",
|
|
193
255
|
"runner.evalSetup": "eval setup (installing dependencies)...",
|
|
194
256
|
"runner.interrupted": " · interrupted: sandbox containers cleaned up; printing partial results completed so far.\n",
|
|
@@ -214,11 +276,13 @@ export const en = {
|
|
|
214
276
|
"sandbox.providerNotImplemented": "{{provider}} sandbox provider is not implemented; use docker, vercel, or e2b",
|
|
215
277
|
"sandbox.missingSpec":
|
|
216
278
|
"sandbox agent needs a sandbox, but none was given. niceeval no longer picks a default — set `sandbox` in defineExperiment()/defineConfig() to dockerSandbox() / vercelSandbox() / e2bSandbox() (import from \"niceeval/sandbox\").\n" +
|
|
217
|
-
" Docs: node_modules/niceeval/docs-site/zh/
|
|
279
|
+
" Docs: node_modules/niceeval/docs-site/zh/how-to/sandbox-providers.mdx",
|
|
218
280
|
"sandbox.dependencyMissing.docker": "Docker sandbox requires 'dockerode'. Install it with: pnpm add dockerode @types/dockerode",
|
|
219
281
|
"sandbox.dependencyMissing.e2b": "E2B sandbox requires 'e2b'. Install it with: pnpm add e2b",
|
|
220
282
|
"sandbox.dependencyMissing.vercel": "Vercel sandbox requires '@vercel/sandbox'. Install it with: pnpm add @vercel/sandbox",
|
|
221
283
|
"sandbox.forceCleanup": " · [sandbox] force-cleaning {{count}} sandboxes...\n",
|
|
284
|
+
"sandbox.provisionReconcileFailed": " · [sandbox] provision reconcile failed, aborting retry (a possibly-created instance could not be verified/killed): {{error}}\n",
|
|
285
|
+
"sandbox.provisionRetry": " · [sandbox] provisioning rate-limited, retrying in {{delayMs}}ms (attempt {{attempt}}/{{maxAttempts}})...\n",
|
|
222
286
|
"sandbox.stopFailed": " · [sandbox] failed to stop sandbox {{id}} (ignored; provider TTL should clean it up): {{message}}\n",
|
|
223
287
|
"sandbox.stopTimeout": "stop timed out ({{timeoutMs}}ms)",
|
|
224
288
|
"scoring.evalError": "evaluation error: {{error}}",
|
package/src/i18n/zh-CN.ts
CHANGED
|
@@ -12,6 +12,8 @@ export const zhCN = {
|
|
|
12
12
|
"bub.installFailed": "bub 安装失败(重试 {{attempts}} 次):\n{{tail}}",
|
|
13
13
|
"bub.setupNotRun": "bub adapter 的 setup() 尚未在该沙箱运行(缺 home/workspace 信息);运行器应先调 setup 再 send。",
|
|
14
14
|
"checkpoint.emptyTar": "checkpoint: tar 为空(paths: {{paths}})",
|
|
15
|
+
"checkpoint.archiveFailed": "checkpoint 归档失败(exit {{exitCode}}): {{detail}}",
|
|
16
|
+
"checkpoint.restoreFailed": "checkpoint 恢复失败(exit {{exitCode}}): {{detail}}",
|
|
15
17
|
"skill.localMissing": "本地 skill 路径不存在:\"{{path}}\"(解析到 {{resolved}})。path 相对跑 niceeval 的项目根解析。",
|
|
16
18
|
"skill.localDirNoSkillFile": "本地 skill 目录 \"{{path}}\" 里没有 SKILL.md。目录形态的 skill 必须在根下带一个 SKILL.md。",
|
|
17
19
|
"skill.localUnsupportedShape": "本地 skill 路径 \"{{path}}\" 形态不支持。只接受:含 SKILL.md 的目录,或单个 .md 文件。",
|
|
@@ -21,7 +23,21 @@ export const zhCN = {
|
|
|
21
23
|
"skill.repoUnknownSkill": "repo skill {{source}}(ref: {{ref}})里没有名为 \"{{skill}}\" 的 skill。可选:{{available}}。",
|
|
22
24
|
"skill.copyFailed": "skill \"{{name}}\" 装进 {{dest}} 失败:\n{{tail}}",
|
|
23
25
|
"plugin.marketplaceFailed": "{{agent}} marketplace \"{{name}}\" 连接失败(source: {{source}}, ref: {{ref}}):\n{{tail}}",
|
|
26
|
+
"plugin.marketplaceVerifyFailed": "{{agent}} marketplace \"{{name}}\" add 后回读注册列表失败({{command}}):\n{{tail}}",
|
|
27
|
+
"plugin.marketplaceNameMismatch":
|
|
28
|
+
"{{agent}} marketplace 名不匹配:配置的 name \"{{expected}}\"(source: {{source}})不在 add 后回读的注册列表里,本次实际注册为:{{actual}}。" +
|
|
29
|
+
"marketplace.name 必须等于目标仓库 manifest 声明的 name,改成真实名字再跑。",
|
|
24
30
|
"plugin.installFailed": "{{agent}} plugin \"{{name}}\"(marketplace: {{marketplace}})安装失败:\n{{tail}}",
|
|
31
|
+
"nativeConfig.pathNotProjectRelative":
|
|
32
|
+
"{{agent}} {{field}} 只接受项目根内的相对路径,收到 \"{{path}}\"。绝对路径、包含 `..` 的路径和 `~` 路径都不行;项目根外的配置先复制进项目再引用。",
|
|
33
|
+
"nativeConfig.missing":
|
|
34
|
+
"{{agent}} {{field}} 指向的文件不存在:\"{{path}}\"(解析到 {{resolved}})。路径相对运行 niceeval 的项目根(含 niceeval.config.ts 的目录)解析,不相对 eval / experiment 源码文件。",
|
|
35
|
+
"nativeConfig.escapesRoot": "{{agent}} {{field}} \"{{path}}\" 经符号链接解析到项目根之外({{resolved}})。配置文件必须真实位于项目根内。",
|
|
36
|
+
"nativeConfig.notFile": "{{agent}} {{field}} \"{{path}}\" 不是普通文件。指向一份完整的官方配置文件。",
|
|
37
|
+
"nativeConfig.invalidSyntax": "{{agent}} {{field}} \"{{path}}\" 不是合法的 {{format}}:{{detail}}",
|
|
38
|
+
"nativeConfig.reservedKeys":
|
|
39
|
+
"{{agent}} {{field}} \"{{path}}\" 含保留键:{{keys}}。这些键由 experiment 与 Adapter 拥有(model、鉴权、MCP、OTel 经独立配置层叠加),从文件里删掉再跑。",
|
|
40
|
+
"nativeConfig.uploadFailed": "原生配置文件 \"{{path}}\" 上传沙箱失败({{dest}}):\n{{tail}}",
|
|
25
41
|
"cli.all": "(全部)",
|
|
26
42
|
"cli.browserOpenFailed": "无法自动打开浏览器,请手动访问:{{url}}\n",
|
|
27
43
|
"cli.clean.done": "已删除 .niceeval/ 历史运行 artifact。\n",
|
|
@@ -30,18 +46,19 @@ export const zhCN = {
|
|
|
30
46
|
"修法:\n" +
|
|
31
47
|
" - [init] 运行 `npx niceeval init` 生成 niceeval.config.ts 和 evals/\n" +
|
|
32
48
|
" - [cd] 切到包含 niceeval.config.ts 的项目根再运行\n" +
|
|
33
|
-
" 文档:node_modules/niceeval/docs-site/zh/quickstart.mdx",
|
|
49
|
+
" 文档:node_modules/niceeval/docs-site/zh/tutorials/quickstart.mdx",
|
|
34
50
|
"cli.config.noDefault": "niceeval.config.ts 需要 default export(defineConfig(...))。",
|
|
35
51
|
"cli.dry.header": "\n[dry] {{evals}} 个 eval × {{configs}} 个运行配置:\n",
|
|
36
52
|
"cli.dry.noMatches": "(无匹配)",
|
|
37
53
|
"cli.dry.row": " {{who}}{{experiment}}: {{evals}} ×{{runs}}\n",
|
|
38
54
|
"cli.error": "niceeval 出错:{{error}}\n",
|
|
39
55
|
"cli.flag.invalidNumber": "标志 --{{flag}} 需要数字,收到 \"{{value}}\"。\n",
|
|
56
|
+
"cli.flag.invalidOutput": "标志 --output 需要 auto|human|agent|ci 之一,收到 \"{{value}}\"。\n",
|
|
40
57
|
"runner.budgetUnenforceable":
|
|
41
58
|
"{{budgetKey}} 的 budget:连续多个 attempt 完成后都拿不到成本数据(agent 不上报用量且模型不在价格表)——该 agent 的 budget 无法执行,取消护栏继续跑。\n",
|
|
42
59
|
"judge.modelMissing":
|
|
43
60
|
"judge 未配置模型:在 defineConfig({ judge: { model: \"...\" } })、eval 的 judge 配置或环境变量 NICEEVAL_JUDGE_MODEL 里指定裁判模型(没有内置默认模型)。\n" +
|
|
44
|
-
" 文档:node_modules/niceeval/docs-site/zh/
|
|
61
|
+
" 文档:node_modules/niceeval/docs-site/zh/how-to/scoring-guide.mdx",
|
|
45
62
|
"loaders.yamlMissing":
|
|
46
63
|
"loadYaml(\"{{path}}\") 需要 YAML 解析器:请先 `pnpm add yaml`(或改用 loadJson + JSON 数据集)。",
|
|
47
64
|
"cli.flag.parseError": "{{message}}\n运行 `niceeval --help` 查看用法。\n",
|
|
@@ -55,23 +72,27 @@ export const zhCN = {
|
|
|
55
72
|
" (locator + 失败原因)\n" +
|
|
56
73
|
" 单个 eval id:attempt 与断言明细\n" +
|
|
57
74
|
" @<locator> 精确一个 attempt:无 flag → 紧凑全景;带 flag → 对应证据切面\n" +
|
|
58
|
-
" --
|
|
75
|
+
" --source 该 attempt 运行时保存的 Eval 源码,断言标回源码行\n" +
|
|
59
76
|
" --execution 该 attempt 的执行事件流(消息/thinking/Skill/工具调用),\n" +
|
|
60
77
|
" 有 OTel 时同一节点补时间\n" +
|
|
61
|
-
" --
|
|
62
|
-
" --
|
|
63
|
-
" --
|
|
64
|
-
" --
|
|
78
|
+
" --timing 整个 attempt 的统一时间树(阶段 + hook/命令/turn + 轮内 OTel)\n" +
|
|
79
|
+
" --diff[=文件] agent 归因的文件改动摘要;=文件 按窗口展开单个文件\n" +
|
|
80
|
+
" --history 逐 experiment × eval 的执行时间轴(与 --report 互斥)\n" +
|
|
81
|
+
" --results <目录> 钉死结果根 --experiment <id> 只看该实验\n" +
|
|
82
|
+
" --report <文件> 自定义报告 --page <id> 选页(多页报告先输出页索引)\n" +
|
|
65
83
|
" niceeval list 列出发现到的 eval\n" +
|
|
66
|
-
" niceeval view [eval-id
|
|
67
|
-
"
|
|
68
|
-
" --
|
|
84
|
+
" niceeval view [eval-id 前缀…] [--out 目录] [--port n] [--no-open]\n" +
|
|
85
|
+
" 报告页 + 证据室;--report <文件> 整槽换成自定义报告(与 show 同一文件)\n" +
|
|
86
|
+
" --page <id> 定初始页 --results <目录> 钉死结果根\n" +
|
|
87
|
+
" --snapshot <文件> 只打开这一份快照 --experiment <id> 只看该实验\n" +
|
|
69
88
|
" --out <目录> 静态导出:index.html 连同查看器 artifact,可直接静态托管\n" +
|
|
89
|
+
" niceeval sandbox list|enter|history|diff|stop 查看与销毁 --keep-sandbox 留下的现场\n" +
|
|
70
90
|
" niceeval clean 删除 .niceeval/ 历史 artifact\n" +
|
|
71
91
|
" niceeval init 脚手架 config + evals/\n\n" +
|
|
72
92
|
"标志:\n" +
|
|
73
93
|
" --runs n --max-concurrency n --timeout ms --budget usd --tag t\n" +
|
|
74
|
-
" --early-exit / --no-early-exit --strict --force --dry --
|
|
94
|
+
" --early-exit / --no-early-exit --strict --force --dry --keep-sandbox[=failed|all]\n" +
|
|
95
|
+
" --output auto|human|agent|ci\n" +
|
|
75
96
|
" --junit path --json path --out dir --port n --open / --no-open -h, --help -v, --version\n\n" +
|
|
76
97
|
"位置参数只选「跑哪些 eval」(id 前缀);对着哪个 agent、怎么跑来自 experiments/ 与\n" +
|
|
77
98
|
"标志。环境变量覆盖(标志 > 环境变量 > config):\n" +
|
|
@@ -82,16 +103,19 @@ export const zhCN = {
|
|
|
82
103
|
"cli.show.noEvalMatch": "No results matched: {{patterns}}. Evals with results: {{evals}}\n",
|
|
83
104
|
"cli.show.noExperimentMatch": "No experiment matched --experiment {{arg}}. Experiments with results: {{experiments}}\n",
|
|
84
105
|
"cli.show.historyReportConflict":
|
|
85
|
-
"`--history` and `--report` are mutually exclusive: --history is the
|
|
106
|
+
"`--history` and `--report` are mutually exclusive: both take over the main output. --history is the host's per-attempt execution timeline; for snapshot-level trends, compose exp.snapshots inside your report file instead.\n",
|
|
86
107
|
"cli.show.evidenceNeedsEval":
|
|
87
|
-
"--
|
|
108
|
+
"--source / --execution / --diff show one attempt's evidence, but the selection matched {{matched}} evals. Pick an attempt locator from the index below:\n{{index}}\n",
|
|
88
109
|
"cli.show.locatorMalformed": "{{message}}\n",
|
|
89
110
|
"cli.show.locatorNotFound": "{{message}}\n",
|
|
90
111
|
"cli.eval.noMatch": "没有匹配的 eval:{{patterns}}。\n",
|
|
91
112
|
"cli.eval.noMatchHintExperiment": "提示:\"{{pattern}}\" 是实验{{kind}},你大概想跑:niceeval exp {{pattern}}\n",
|
|
92
113
|
"cli.eval.noMatchKnown": "已发现 {{count}} 个 eval:{{evals}}\n",
|
|
93
|
-
"cli.exp.agentModelFlagUnsupported": "
|
|
114
|
+
"cli.exp.agentModelFlagUnsupported": "experiment 运行不支持 --agent / --model。请新增或复制一个 experiment 文件并修改 model。\n",
|
|
115
|
+
"cli.exp.viewerFlagUnsupported": "`{{flag}}` 只适用于 niceeval {{command}},不能用于 niceeval exp。\n",
|
|
94
116
|
"cli.experiment.noMatch": "没有匹配的实验:{{arg}}。已发现:{{experiments}}\n",
|
|
117
|
+
"cli.experiment.viewerCommandHint": "你可能想运行:niceeval {{command}}{{args}}\n",
|
|
118
|
+
"cli.experiment.noEvalsSelected": "未选择任何 eval:{{selection}} 匹配到 0 个 eval。可用实验:{{experiments}}。\n",
|
|
95
119
|
"cli.experimentGroup": "组",
|
|
96
120
|
"cli.fallbackCleanupTimeout": "\ngraceful 清理超时,强制清理沙箱…\n",
|
|
97
121
|
"cli.forceCleanupExit": "\n强制清理沙箱并退出…\n",
|
|
@@ -104,7 +128,7 @@ export const zhCN = {
|
|
|
104
128
|
"cli.resultsPath": "结构化结果:{{path}}(snapshot.json + 每 attempt 的 result.json / events.json / trace.json / diff.json)\n",
|
|
105
129
|
"cli.run.experimentRequired":
|
|
106
130
|
"运行 eval 必须通过 experiment:用 `niceeval exp [实验组|配置] [eval id 前缀]`。\n" +
|
|
107
|
-
" 文档:node_modules/niceeval/docs-site/zh/
|
|
131
|
+
" 文档:node_modules/niceeval/docs-site/zh/how-to/write-experiment.mdx\n",
|
|
108
132
|
"cli.run.experimentRequiredHint": "提示:\"{{pattern}}\" 是实验{{kind}},你大概想跑:niceeval exp {{pattern}}\n",
|
|
109
133
|
"cli.run.experimentRequiredKnown": "已发现实验:{{experiments}}\n",
|
|
110
134
|
"cli.unimplemented": "命令 \"{{command}}\" 暂未实现(MVP)。\n",
|
|
@@ -115,7 +139,7 @@ export const zhCN = {
|
|
|
115
139
|
"cli.view.url": "niceeval view: {{url}}\n",
|
|
116
140
|
"context.capabilityMissing":
|
|
117
141
|
"agent \"{{agent}}\" 不是沙箱型(defineSandboxAgent 构造),t.{{method}} 这类断言只有沙箱型 agent 可用。换用 defineSandboxAgent 构造的 agent,或去掉这条断言。\n" +
|
|
118
|
-
" 文档:node_modules/niceeval/docs-site/zh/
|
|
142
|
+
" 文档:node_modules/niceeval/docs-site/zh/how-to/sandbox-agent.mdx",
|
|
119
143
|
"context.skipEmpty": "skip() 需要一个非空理由。",
|
|
120
144
|
"context.turnFailed": "本轮 send 返回 failed(turn status = failed):{{message}}",
|
|
121
145
|
"context.turnFailedDefault": "本轮 send 返回 failed(turn status = failed)",
|
|
@@ -123,6 +147,7 @@ export const zhCN = {
|
|
|
123
147
|
"define.evalIdRejected": "defineEval 不接受 id —— id 由文件路径推导。",
|
|
124
148
|
"define.evalTestRequired": "defineEval 需要一个 async test(t) 函数。",
|
|
125
149
|
"define.experimentAgentRequired": "defineExperiment 需要 agent。",
|
|
150
|
+
"define.experimentFlagNotJson": "experiment.flags.{{key}} 不是可 JSON 序列化的值(函数 / undefined / 循环引用 / bigint 不允许);flags 会原样进入结果快照,必须是纯 JSON。",
|
|
126
151
|
"define.experimentIdRejected": "defineExperiment 不接受 id —— id 由文件路径推导。",
|
|
127
152
|
"define.sandboxAgentNameRequired": "defineSandboxAgent 需要 name。",
|
|
128
153
|
"define.sandboxCreateRequired": "defineSandbox 需要一个 create() 函数。",
|
|
@@ -133,6 +158,41 @@ export const zhCN = {
|
|
|
133
158
|
"docker.imagePullStart": "Pulling Docker image: {{image}}...",
|
|
134
159
|
"docker.readFileFailed": "Failed to read file {{path}}: {{stderr}}",
|
|
135
160
|
"docker.unsupportedRuntime": "Unsupported runtime: {{runtime}}",
|
|
161
|
+
"feedback.human.active": "ACTIVE",
|
|
162
|
+
"feedback.human.budgetExhausted": "{{experimentId}} 预算已耗尽(已花 {{spent}},未跑 {{unstarted}})",
|
|
163
|
+
"feedback.human.compare": "Compare: niceeval view {{group}}",
|
|
164
|
+
"feedback.human.counts": "共 {{total}} · 复用 {{reused}} · 运行中 {{running}} · 排队 {{queued}} · 已完成 {{completed}}",
|
|
165
|
+
"feedback.human.diffHint": "Diff: niceeval show {{locator}} --diff",
|
|
166
|
+
"feedback.human.evalHint": "Eval: niceeval show {{locator}} --source",
|
|
167
|
+
"feedback.human.failuresHeader": "FAILURES",
|
|
168
|
+
"feedback.human.heartbeat": "已运行 {{elapsed}} · {{counts}}",
|
|
169
|
+
"feedback.human.inspect": "Inspect: niceeval show {{locator}}",
|
|
170
|
+
"feedback.human.moreActive": "… 还有 {{count}} 项运行中",
|
|
171
|
+
"feedback.human.plan": "计划:{{total}} 个 attempt · {{evals}} 个 eval × {{configs}} 个配置 · 并发 {{concurrency}}",
|
|
172
|
+
"feedback.human.resultFailed": "FAILED",
|
|
173
|
+
"feedback.human.resultIncomplete": "INCOMPLETE",
|
|
174
|
+
"feedback.human.resultInterrupted": "INTERRUPTED",
|
|
175
|
+
"feedback.human.resultPassed": "PASSED",
|
|
176
|
+
"feedback.human.resultsHeader": "Results:",
|
|
177
|
+
"feedback.human.resultsMore": "… 还有 {{count}} 个",
|
|
178
|
+
"feedback.human.reuse": "复用:{{total}} 中 {{reused}} 条来自缓存 · {{toRun}} 待跑",
|
|
179
|
+
"feedback.human.summaryLine": "{{passed}} 通过 · {{failed}} 失败 · {{errored}} 出错 (复用 {{reused}})",
|
|
180
|
+
"feedback.human.summaryAllReusedLine": "{{passed}} 通过 · {{failed}} 失败 · {{errored}} 出错 (全部 {{reused}} 条复用)",
|
|
181
|
+
"feedback.human.suppressedFailures": "… 还有 {{count}} 条失败被折叠",
|
|
182
|
+
"feedback.human.trace": "Trace: niceeval show {{locator}} --execution",
|
|
183
|
+
"feedback.phase.agentSetup": "agent 预置",
|
|
184
|
+
"feedback.phase.evalRun": "运行 eval",
|
|
185
|
+
"feedback.phase.evalSetup": "eval 预置",
|
|
186
|
+
"feedback.phase.sandboxCreate": "创建沙箱",
|
|
187
|
+
"feedback.phase.sandboxQueue": "排队等沙箱",
|
|
188
|
+
"feedback.phase.sandboxSetup": "沙箱预置",
|
|
189
|
+
"feedback.phase.scoring": "评分",
|
|
190
|
+
"feedback.phase.teardown": "清理中",
|
|
191
|
+
"feedback.phase.telemetryCollect": "收集 trace",
|
|
192
|
+
"feedback.phase.telemetryConfigure": "配置 telemetry",
|
|
193
|
+
"feedback.phase.workspaceBaseline": "准备工作区",
|
|
194
|
+
"feedback.phase.workspaceDiff": "采集 diff",
|
|
195
|
+
"feedback.rendererError": " · [feedback] renderer 处理 {{context}} 失败(已忽略):{{message}}\n",
|
|
136
196
|
"hitl.answerNeedsOptionOrText": "t.respond 的对象形式需要 optionId 或 text 二选一(两者都没给)。",
|
|
137
197
|
"hitl.invalidOption": "回答 \"{{optionId}}\" 不是请求 {{requestId}} 的可选项({{options}})。",
|
|
138
198
|
"hitl.noOptions": "该请求没有可选项",
|
|
@@ -184,6 +244,7 @@ export const zhCN = {
|
|
|
184
244
|
"otel.portInUse": "OTLP 接收端口 {{port}} 已被占用(另一个进程占着这个端口)。在 defineConfig({ telemetry: { port } }) 里换一个空闲端口,或者停掉占用 {{port}} 的进程后重试。",
|
|
185
245
|
"otel.windowAttribution": "otel:span 未带本轮 traceparent,按时间窗口归属(该 agent 的轮次已串行;应用支持 W3C 传播后自动并发)",
|
|
186
246
|
"runner.diffProgress": "采 diff:{{changed}} 改 / {{deleted}} 删",
|
|
247
|
+
"runner.failFast": "{{evalId}} 的错误 {{code}} 连续复现,判定为确定性错误;停止派发该配置剩余的 attempt(fail-fast)。",
|
|
187
248
|
"runner.driveAgent": "驱动 agent…",
|
|
188
249
|
"runner.evalSetup": "eval setup(装依赖)…",
|
|
189
250
|
"runner.interrupted": " · 已中断:沙箱容器已清理,输出本次已完成的部分结果。\n",
|
|
@@ -209,11 +270,13 @@ export const zhCN = {
|
|
|
209
270
|
"sandbox.providerNotImplemented": "{{provider}} sandbox provider not implemented; use docker, vercel, or e2b",
|
|
210
271
|
"sandbox.missingSpec":
|
|
211
272
|
"沙箱型 agent 需要一个 sandbox,但没有提供。niceeval 不再自动选默认 provider——请在 defineExperiment()/defineConfig() 里把 sandbox 设成 dockerSandbox() / vercelSandbox() / e2bSandbox()(从 \"niceeval/sandbox\" 导入)。\n" +
|
|
212
|
-
" 文档:node_modules/niceeval/docs-site/zh/
|
|
273
|
+
" 文档:node_modules/niceeval/docs-site/zh/how-to/sandbox-providers.mdx",
|
|
213
274
|
"sandbox.dependencyMissing.docker": "Docker sandbox requires 'dockerode'. Install it with: pnpm add dockerode @types/dockerode",
|
|
214
275
|
"sandbox.dependencyMissing.e2b": "E2B sandbox requires 'e2b'. Install it with: pnpm add e2b",
|
|
215
276
|
"sandbox.dependencyMissing.vercel": "Vercel sandbox requires '@vercel/sandbox'. Install it with: pnpm add @vercel/sandbox",
|
|
216
277
|
"sandbox.forceCleanup": " · [sandbox] 强制清理 {{count}} 个沙箱…\n",
|
|
278
|
+
"sandbox.provisionReconcileFailed": " · [sandbox] 创建重试前对账失败,放弃重试(可能已创建的实例无法核实/销毁):{{error}}\n",
|
|
279
|
+
"sandbox.provisionRetry": " · [sandbox] 创建被限流,{{delayMs}}ms 后重试(第 {{attempt}}/{{maxAttempts}} 次)…\n",
|
|
217
280
|
"sandbox.stopFailed": " · [sandbox] 停沙箱 {{id}} 失败(已忽略,靠 provider 过期兜底):{{message}}\n",
|
|
218
281
|
"sandbox.stopTimeout": "stop 超时({{timeoutMs}}ms)",
|
|
219
282
|
"scoring.evalError": "评估出错: {{error}}",
|
package/src/o11y/cost.test.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
// cases: docs/engineering/unit-tests/adapters/cases.md
|
|
1
2
|
// buildExecutionTree 的单测(定稿见 docs/observability.md「OTLP traces → 统一瀑布图」、
|
|
2
3
|
// docs/concepts.md「执行树」词条)。覆盖:无 OTel 时骨架完整、有 OTel 时按 callId 精确合并、
|
|
3
4
|
// 唯一关联不上时降级成 telemetry-only 节点(不猜)、同 callId 撞多条 span 时不強行择一、
|
|
@@ -147,18 +148,6 @@ describe("buildExecutionTree", () => {
|
|
|
147
148
|
expect(Object.keys(tree.nodes[0].span?.attributes ?? {})).toEqual(["call_id"]);
|
|
148
149
|
});
|
|
149
150
|
|
|
150
|
-
it("correlates a subagent node the same way as an action node", () => {
|
|
151
|
-
const events: StreamEvent[] = [
|
|
152
|
-
{ type: "subagent.called", callId: "s1", name: "Task" },
|
|
153
|
-
{ type: "subagent.completed", callId: "s1", output: "done", status: "completed" },
|
|
154
|
-
];
|
|
155
|
-
const agentSpan = span({ spanId: "sp1", attributes: { call_id: "s1" } });
|
|
156
|
-
|
|
157
|
-
const tree = buildExecutionTree(events, [agentSpan]);
|
|
158
|
-
|
|
159
|
-
expect(tree.nodes[0]).toMatchObject({ kind: "subagent", callId: "s1", span: agentSpan });
|
|
160
|
-
});
|
|
161
|
-
|
|
162
151
|
it("never guesses by name/text: a span whose call_id matches no node becomes a telemetry-only node, and the skeleton node's span stays absent", () => {
|
|
163
152
|
const events: StreamEvent[] = [
|
|
164
153
|
{ type: "action.called", callId: "c1", name: "Bash", input: {}, tool: "shell" },
|
|
@@ -252,14 +241,6 @@ describe("buildExecutionTree", () => {
|
|
|
252
241
|
expect(action.span?.status).toBe("error");
|
|
253
242
|
});
|
|
254
243
|
|
|
255
|
-
it("skill.loaded is a first-class node carrying the skill name (and optional callId), never a generic action", () => {
|
|
256
|
-
const events: StreamEvent[] = [{ type: "skill.loaded", skill: "pdf-processing", callId: "tool_1" }];
|
|
257
|
-
|
|
258
|
-
const tree = buildExecutionTree(events, []);
|
|
259
|
-
|
|
260
|
-
expect(tree.nodes).toEqual([{ id: "skill-0", kind: "skill.loaded", skill: "pdf-processing", callId: "tool_1" }]);
|
|
261
|
-
});
|
|
262
|
-
|
|
263
244
|
it("a skill.loaded node passes through immediately as its own node — it has no result event to pair with, so it never gets stuck 'pending' the way action/subagent nodes do while awaiting a result", () => {
|
|
264
245
|
const events: StreamEvent[] = [
|
|
265
246
|
{ type: "action.called", callId: "c1", name: "Bash", input: {}, tool: "shell" },
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
// cases: docs/engineering/unit-tests/adapters/cases.md
|
|
1
2
|
// claude-code transcript 解析器单测。
|
|
2
3
|
//
|
|
3
4
|
// 重点覆盖 Skill 加载识别(定稿见 docs/observability.md「OTLP traces → 统一瀑布图」、
|
|
@@ -40,14 +41,6 @@ describe("parseClaudeCodeTranscript — Skill 加载", () => {
|
|
|
40
41
|
expect(events).toEqual([{ type: "skill.loaded", skill: "ms-office-suite:pdf", callId: "toolu_02" }]);
|
|
41
42
|
});
|
|
42
43
|
|
|
43
|
-
it("工具名大小写不定也能识别(防御性小写比较)", () => {
|
|
44
|
-
const raw = toolUseLine({ id: "toolu_03", name: "skill", input: { skill: "xlsx" } });
|
|
45
|
-
|
|
46
|
-
const { events } = parseClaudeCodeTranscript(raw);
|
|
47
|
-
|
|
48
|
-
expect(events).toEqual([{ type: "skill.loaded", skill: "xlsx", callId: "toolu_03" }]);
|
|
49
|
-
});
|
|
50
|
-
|
|
51
44
|
it("Skill 加载的 tool_result 被吃掉,不补发孤儿 action.result", () => {
|
|
52
45
|
const raw = [
|
|
53
46
|
toolUseLine({ id: "toolu_01", name: "Skill", input: { skill: "pdf" } }),
|
|
@@ -75,20 +68,6 @@ describe("parseClaudeCodeTranscript — Skill 加载", () => {
|
|
|
75
68
|
]);
|
|
76
69
|
});
|
|
77
70
|
|
|
78
|
-
it("普通(非 Skill)工具调用完全不受影响:Bash 仍产出 action.called + action.result,顺序不变", () => {
|
|
79
|
-
const raw = [
|
|
80
|
-
toolUseLine({ id: "toolu_06", name: "Bash", input: { command: "ls" } }),
|
|
81
|
-
toolResultLine("toolu_06", "a.ts\nb.ts", false),
|
|
82
|
-
].join("\n");
|
|
83
|
-
|
|
84
|
-
const { events } = parseClaudeCodeTranscript(raw);
|
|
85
|
-
|
|
86
|
-
expect(events).toEqual([
|
|
87
|
-
{ type: "action.called", callId: "toolu_06", name: "Bash", input: { command: "ls" }, tool: "shell" },
|
|
88
|
-
{ type: "action.result", callId: "toolu_06", output: "a.ts\nb.ts", status: "completed" },
|
|
89
|
-
]);
|
|
90
|
-
});
|
|
91
|
-
|
|
92
71
|
it("Skill 加载与普通工具调用混合出现时,各自独立、顺序保持事件出现顺序", () => {
|
|
93
72
|
const raw = [
|
|
94
73
|
toolUseLine({ id: "t1", name: "Skill", input: { skill: "pdf" } }),
|
|
@@ -106,18 +85,6 @@ describe("parseClaudeCodeTranscript — Skill 加载", () => {
|
|
|
106
85
|
]);
|
|
107
86
|
});
|
|
108
87
|
|
|
109
|
-
it("Read/Write/Edit/WebFetch/WebSearch/Task 等既有别名归一不受 Skill 识别改动影响(回归锁)", () => {
|
|
110
|
-
const raw = [
|
|
111
|
-
toolUseLine({ id: "a", name: "Write", input: { file_path: "/x", content: "y" } }),
|
|
112
|
-
toolUseLine({ id: "b", name: "Task", input: { prompt: "go" } }),
|
|
113
|
-
toolUseLine({ id: "c", name: "WebSearch", input: { query: "q" } }),
|
|
114
|
-
].join("\n");
|
|
115
|
-
|
|
116
|
-
const { events } = parseClaudeCodeTranscript(raw);
|
|
117
|
-
const tools = events.filter((e) => e.type === "action.called").map((e) => (e as { tool?: string }).tool);
|
|
118
|
-
|
|
119
|
-
expect(tools).toEqual(["file_write", "agent_task", "web_search"]);
|
|
120
|
-
});
|
|
121
88
|
});
|
|
122
89
|
|
|
123
90
|
describe("parseClaudeCodeTranscript — 既有行为回归", () => {
|