niceeval 0.5.4 → 0.6.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 +55 -0
- package/dist/agents/types.d.ts +317 -0
- package/dist/context/types.d.ts +335 -0
- package/dist/i18n/core.d.ts +11 -0
- package/dist/i18n/en.d.ts +181 -0
- package/dist/i18n/index.d.ts +5 -0
- package/dist/i18n/zh-CN.d.ts +183 -0
- package/dist/o11y/execution-tree.d.ts +103 -0
- package/dist/o11y/otlp/parse.d.ts +3 -0
- package/dist/o11y/otlp/receiver.d.ts +21 -0
- package/dist/o11y/otlp/select.d.ts +22 -0
- package/dist/o11y/otlp/turn-otel.d.ts +43 -0
- package/dist/o11y/types.d.ts +190 -0
- package/dist/report/aggregate.d.ts +57 -0
- package/dist/report/aggregate.js +212 -0
- package/dist/report/built-ins/cost-pass-rate-comparison.d.ts +1 -0
- package/dist/report/built-ins/cost-pass-rate-comparison.js +17 -0
- package/dist/report/built-ins/index.d.ts +1 -0
- package/dist/report/built-ins/index.js +2 -0
- package/dist/report/components.d.ts +178 -0
- package/dist/report/components.js +132 -0
- package/dist/report/compute.d.ts +106 -0
- package/dist/report/compute.js +618 -0
- package/dist/report/flag.d.ts +6 -0
- package/dist/report/flag.js +8 -0
- package/dist/report/format.d.ts +32 -0
- package/dist/report/format.js +126 -0
- package/dist/report/index.d.ts +19 -0
- package/dist/report/index.js +30 -0
- package/dist/report/load.d.ts +12 -0
- package/dist/report/load.js +56 -0
- package/dist/report/locale.d.ts +83 -0
- package/dist/report/locale.js +160 -0
- package/dist/report/metrics.d.ts +21 -0
- package/dist/report/metrics.js +115 -0
- package/dist/report/primitives.d.ts +64 -0
- package/dist/report/primitives.js +113 -0
- package/dist/report/react/AttemptList.d.ts +23 -0
- package/dist/report/react/AttemptList.js +20 -0
- package/dist/report/react/DeltaTable.d.ts +8 -0
- package/dist/report/react/DeltaTable.js +24 -0
- package/dist/report/react/EvalList.d.ts +10 -0
- package/dist/report/react/EvalList.js +0 -0
- package/dist/report/react/ExperimentList.d.ts +10 -0
- package/dist/report/react/ExperimentList.js +15 -0
- package/dist/report/react/GroupSummary.d.ts +8 -0
- package/dist/report/react/GroupSummary.js +8 -0
- package/dist/report/react/MetricBars.d.ts +10 -0
- package/dist/report/react/MetricBars.js +48 -0
- package/dist/report/react/MetricLine.d.ts +9 -0
- package/dist/report/react/MetricLine.js +68 -0
- package/dist/report/react/MetricMatrix.d.ts +10 -0
- package/dist/report/react/MetricMatrix.js +23 -0
- package/dist/report/react/MetricScatter.d.ts +9 -0
- package/dist/report/react/MetricScatter.js +100 -0
- package/dist/report/react/MetricTable.d.ts +11 -0
- package/dist/report/react/MetricTable.js +26 -0
- package/dist/report/react/RunOverview.d.ts +8 -0
- package/dist/report/react/RunOverview.js +12 -0
- package/dist/report/react/Scoreboard.d.ts +8 -0
- package/dist/report/react/Scoreboard.js +26 -0
- package/dist/report/react/cell.d.ts +9 -0
- package/dist/report/react/cell.js +9 -0
- package/dist/report/react/chart-math.d.ts +14 -0
- package/dist/report/react/chart-math.js +68 -0
- package/dist/report/react/colors.d.ts +14 -0
- package/dist/report/react/colors.js +45 -0
- package/dist/report/react/fixtures.d.ts +19 -0
- package/dist/report/react/fixtures.js +393 -0
- package/dist/report/react/format.d.ts +3 -0
- package/dist/report/react/format.js +7 -0
- package/dist/report/react/index.d.ts +6 -0
- package/dist/report/react/index.js +14 -0
- package/dist/report/report.d.ts +24 -0
- package/dist/report/report.js +49 -0
- package/dist/report/text/faces.d.ts +29 -0
- package/dist/report/text/faces.js +503 -0
- package/dist/report/text/layout.d.ts +75 -0
- package/dist/report/text/layout.js +173 -0
- package/dist/report/text/plot.d.ts +37 -0
- package/dist/report/text/plot.js +81 -0
- package/dist/report/text/table.d.ts +8 -0
- package/dist/report/text/table.js +86 -0
- package/dist/report/tree.d.ts +99 -0
- package/dist/report/tree.js +228 -0
- package/dist/report/types.d.ts +420 -0
- package/dist/report/types.js +4 -0
- package/dist/report/web.d.ts +15 -0
- package/dist/report/web.js +37 -0
- package/dist/results/annotated-source.d.ts +61 -0
- package/dist/results/attempt-evidence.d.ts +69 -0
- package/dist/results/attempt-source.d.ts +15 -0
- package/dist/results/locator.d.ts +75 -0
- package/dist/results/locator.js +0 -0
- package/dist/results/select.d.ts +45 -0
- package/dist/results/select.js +230 -0
- package/dist/results/source-hash.d.ts +9 -0
- package/dist/results/types.d.ts +204 -0
- package/dist/runner/eval-source.d.ts +22 -0
- package/dist/runner/fingerprint.d.ts +23 -0
- package/dist/runner/types.d.ts +332 -0
- package/dist/sandbox/docker-stream.d.ts +24 -0
- package/dist/sandbox/docker.d.ts +84 -0
- package/dist/sandbox/e2b.d.ts +31 -0
- package/dist/sandbox/errors.d.ts +4 -0
- package/dist/sandbox/local-files.d.ts +6 -0
- package/dist/sandbox/paths.d.ts +4 -0
- package/dist/sandbox/registry.d.ts +13 -0
- package/dist/sandbox/resolve.d.ts +40 -0
- package/dist/sandbox/retry.d.ts +10 -0
- package/dist/sandbox/shell.d.ts +11 -0
- package/dist/sandbox/source-files.d.ts +13 -0
- package/dist/sandbox/types.d.ts +203 -0
- package/dist/sandbox/vercel.d.ts +37 -0
- package/dist/scoring/types.d.ts +70 -0
- package/dist/shared/aggregate.d.ts +29 -0
- package/dist/shared/aggregate.js +55 -0
- package/dist/shared/types.d.ts +27 -0
- package/dist/shared/verdict.d.ts +27 -0
- package/dist/shared/verdict.js +34 -0
- package/dist/tty-line.d.ts +6 -0
- package/dist/types.d.ts +7 -0
- package/dist/util.d.ts +22 -0
- package/docs-site/zh/concepts/adapter.mdx +5 -5
- package/docs-site/zh/concepts/assert.mdx +8 -8
- package/docs-site/zh/concepts/evals.mdx +5 -5
- package/docs-site/zh/concepts/experiment.mdx +2 -2
- package/docs-site/zh/concepts/judge.mdx +9 -9
- package/docs-site/zh/concepts/overview.mdx +2 -2
- package/docs-site/zh/concepts/tier.mdx +6 -6
- package/docs-site/zh/example/claude-code-codex-plugin.mdx +9 -5
- package/docs-site/zh/example/claude-code-codex-skill.mdx +12 -7
- package/docs-site/zh/guides/agent-feedback-loop.mdx +235 -78
- package/docs-site/zh/guides/connect-otel.mdx +3 -3
- package/docs-site/zh/guides/connect-your-agent.mdx +2 -2
- package/docs-site/zh/guides/custom-reports.mdx +196 -36
- package/docs-site/zh/guides/experiments.mdx +7 -1
- package/docs-site/zh/guides/fixtures.mdx +1 -1
- package/docs-site/zh/guides/official-adapters.mdx +31 -9
- package/docs-site/zh/guides/publish-report.mdx +3 -3
- package/docs-site/zh/guides/report-components.mdx +194 -55
- package/docs-site/zh/guides/reporters.mdx +2 -2
- package/docs-site/zh/guides/results-data.mdx +35 -34
- package/docs-site/zh/guides/runner.mdx +2 -2
- package/docs-site/zh/guides/sandbox-agent.mdx +2 -2
- package/docs-site/zh/guides/{sandbox-backends.mdx → sandbox-providers.mdx} +11 -11
- package/docs-site/zh/guides/viewing-results.mdx +199 -79
- package/docs-site/zh/guides/write-experiment.mdx +9 -1
- package/docs-site/zh/guides/write-send.mdx +2 -2
- package/docs-site/zh/index.mdx +4 -3
- package/docs-site/zh/introduction.mdx +2 -1
- package/docs-site/zh/quickstart.mdx +5 -3
- package/docs-site/zh/reference/builtin-agents.mdx +38 -13
- package/docs-site/zh/reference/capabilities.mdx +1 -1
- package/docs-site/zh/reference/cli.mdx +36 -13
- package/docs-site/zh/reference/define-agent.mdx +12 -12
- package/docs-site/zh/reference/define-config.mdx +1 -1
- package/docs-site/zh/reference/define-eval.mdx +3 -3
- package/docs-site/zh/reference/events.mdx +7 -1
- package/docs-site/zh/reference/expect.mdx +3 -3
- package/package.json +10 -6
- package/src/agents/bub.ts +129 -42
- package/src/agents/claude-code.test.ts +152 -0
- package/src/agents/claude-code.ts +127 -13
- package/src/agents/codex.test.ts +192 -0
- package/src/agents/codex.ts +151 -12
- package/src/agents/index.ts +9 -3
- package/src/agents/manifest.ts +41 -0
- package/src/agents/plugin-config.test.ts +94 -0
- package/src/agents/shared.ts +33 -2
- package/src/agents/skills.test.ts +214 -0
- package/src/agents/skills.ts +304 -0
- package/src/agents/streaming.ts +5 -5
- package/src/agents/types.ts +54 -2
- package/src/cli.ts +74 -47
- package/src/context/context.test.ts +20 -2
- package/src/context/control-flow.ts +1 -1
- package/src/context/session.test.ts +92 -1
- package/src/context/session.ts +23 -1
- package/src/context/types.ts +4 -4
- package/src/define.test.ts +8 -8
- package/src/define.ts +11 -11
- package/src/expect/index.ts +5 -5
- package/src/i18n/en.ts +34 -15
- package/src/i18n/zh-CN.ts +37 -21
- package/src/index.ts +1 -1
- package/src/o11y/execution-tree.test.ts +452 -0
- package/src/o11y/execution-tree.ts +367 -0
- package/src/o11y/otlp/receiver.ts +1 -1
- package/src/o11y/otlp/select.ts +7 -3
- package/src/o11y/parsers/claude-code.test.ts +175 -0
- package/src/o11y/parsers/claude-code.ts +32 -0
- package/src/o11y/types.ts +6 -1
- package/src/report/aggregate.ts +26 -20
- package/src/report/built-in-user-parity.test.tsx +643 -0
- package/src/report/built-ins/cost-pass-rate-comparison.tsx +23 -0
- package/src/report/built-ins/index.ts +2 -0
- package/src/report/components.tsx +223 -50
- package/src/report/compute.ts +358 -53
- package/src/report/dual-render.test.tsx +1125 -0
- package/src/report/flag.ts +1 -1
- package/src/report/format.ts +50 -2
- package/src/report/index.ts +48 -14
- package/src/report/load.ts +1 -1
- package/src/report/locale.ts +206 -0
- package/src/report/metrics.ts +39 -15
- package/src/report/primitives.tsx +100 -2
- package/src/report/react/AttemptList.tsx +115 -0
- package/src/report/react/DeltaTable.tsx +9 -6
- package/src/report/react/EvalList.tsx +0 -0
- package/src/report/react/ExperimentList.tsx +108 -0
- package/src/report/react/GroupSummary.tsx +66 -0
- package/src/report/react/MetricBars.tsx +24 -13
- package/src/report/react/MetricLine.tsx +21 -21
- package/src/report/react/MetricMatrix.tsx +8 -4
- package/src/report/react/MetricScatter.tsx +136 -96
- package/src/report/react/MetricTable.tsx +115 -15
- package/src/report/react/RunOverview.tsx +48 -26
- package/src/report/react/Scoreboard.tsx +15 -7
- package/src/report/react/cell.tsx +18 -9
- package/src/{view/app/lib/chart.ts → report/react/chart-math.ts} +2 -6
- package/src/report/react/colors.ts +24 -15
- package/src/report/react/enhance.js +129 -0
- package/src/report/react/fixtures.ts +163 -34
- package/src/report/react/format.ts +1 -1
- package/src/report/react/index.tsx +22 -6
- package/src/report/react/render.test.tsx +164 -31
- package/src/report/react/styles.css +405 -213
- package/src/report/report.test.ts +403 -94
- package/src/report/report.ts +29 -11
- package/src/report/text/faces.ts +303 -95
- package/src/report/text/layout.ts +76 -11
- package/src/report/text/table.ts +98 -0
- package/src/report/tree.ts +103 -20
- package/src/report/types.ts +196 -25
- package/src/report/web.ts +46 -19
- package/src/results/annotated-source.test.ts +146 -0
- package/src/results/annotated-source.ts +128 -0
- package/src/results/attempt-evidence.test.ts +158 -0
- package/src/results/attempt-evidence.ts +158 -0
- package/src/results/attempt-source.ts +48 -0
- package/src/results/copy.ts +154 -139
- package/src/results/format.ts +54 -47
- package/src/results/host-equivalence.test.ts +527 -0
- package/src/results/index.ts +56 -14
- package/src/results/locator.test.ts +198 -0
- package/src/results/locator.ts +0 -0
- package/src/results/open.ts +392 -175
- package/src/results/results.test.ts +943 -494
- package/src/results/select.ts +129 -23
- package/src/results/skipped-notice.ts +0 -0
- package/src/results/source-hash.ts +28 -0
- package/src/results/types.ts +98 -62
- package/src/results/writer.ts +304 -176
- package/src/runner/attempt.test.ts +170 -0
- package/src/runner/attempt.ts +48 -13
- package/src/runner/discover.test.ts +65 -0
- package/src/runner/discover.ts +6 -2
- package/src/runner/eval-source.test.ts +121 -0
- package/src/runner/eval-source.ts +45 -0
- package/src/runner/fingerprint.ts +54 -1
- package/src/runner/remote-sandbox.ts +1 -1
- package/src/runner/report.test.ts +6 -8
- package/src/runner/report.ts +5 -4
- package/src/runner/reporters/artifacts.ts +27 -41
- package/src/runner/reporters/braintrust.test.ts +3 -3
- package/src/runner/reporters/braintrust.ts +1 -1
- package/src/runner/reporters/console.ts +6 -6
- package/src/runner/reporters/json.ts +4 -4
- package/src/runner/reporters/live.test.ts +56 -0
- package/src/runner/reporters/live.ts +36 -10
- package/src/runner/reporters/quiet.test.ts +66 -0
- package/src/runner/reporters/quiet.ts +49 -0
- package/src/runner/reporters/shared.ts +5 -5
- package/src/runner/reporters/table.ts +17 -17
- package/src/runner/run.ts +61 -102
- package/src/runner/types.ts +43 -32
- package/src/sandbox/checkpoint.ts +1 -1
- package/src/sandbox/docker.ts +15 -2
- package/src/sandbox/e2b.ts +11 -5
- package/src/sandbox/errors.ts +13 -0
- package/src/sandbox/index.ts +3 -3
- package/src/sandbox/local-files.ts +1 -1
- package/src/sandbox/registry.ts +6 -5
- package/src/sandbox/resolve.ts +38 -23
- package/src/sandbox/retry.test.ts +68 -0
- package/src/sandbox/retry.ts +44 -0
- package/src/sandbox/types.ts +24 -24
- package/src/sandbox/vercel.ts +17 -3
- package/src/scoring/collector.ts +3 -3
- package/src/scoring/judge.ts +2 -2
- package/src/scoring/scoped.ts +13 -1
- package/src/scoring/types.ts +7 -7
- package/src/scoring/verdict.ts +4 -4
- package/src/shared/aggregate.ts +23 -3
- package/src/shared/types.ts +2 -2
- package/src/shared/{outcome.ts → verdict.ts} +15 -15
- package/src/show/compose.ts +12 -132
- package/src/show/index.ts +125 -94
- package/src/show/render.ts +660 -160
- package/src/show/show.test.ts +472 -253
- package/src/source-loc.ts +1 -1
- package/src/tty-line.ts +32 -0
- package/src/types.ts +2 -2
- package/src/util.test.ts +21 -1
- package/src/util.ts +5 -1
- package/src/view/app/App.tsx +33 -198
- package/src/view/app/components/AttemptModal.tsx +6 -6
- package/src/view/app/components/CodeView.tsx +2 -2
- package/src/view/app/components/CopyControls.tsx +32 -36
- package/src/view/app/components/SkippedRunsBanner.tsx +140 -0
- package/src/view/app/components/ui/badge.tsx +1 -1
- package/src/view/app/components/ui/dialog.tsx +2 -2
- package/src/view/app/i18n.ts +40 -31
- package/src/view/app/lib/artifact-url.ts +1 -1
- package/src/view/app/lib/attempt-route.test.ts +37 -47
- package/src/view/app/lib/attempt-route.ts +26 -26
- package/src/view/app/lib/rows.ts +9 -112
- package/src/view/app/lib/verdict.ts +25 -0
- package/src/view/app/main.tsx +9 -12
- package/src/view/app/pages/RunsPage.tsx +4 -4
- package/src/view/app/pages/TracesPage.tsx +3 -3
- package/src/view/app/shared.ts +0 -1
- package/src/view/app/types.ts +6 -51
- package/src/view/artifact-serving.test.ts +136 -0
- package/src/view/client-dist/app.css +1 -1
- package/src/view/client-dist/app.js +21 -21
- package/src/view/data.test.ts +214 -143
- package/src/view/data.ts +166 -120
- package/src/view/index.ts +23 -11
- package/src/view/server.ts +52 -17
- package/src/view/shared/types.ts +22 -31
- package/src/view/styles.css +117 -327
- package/src/view/view-report.test.ts +146 -98
- package/src/report/default-report.tsx +0 -222
- package/src/report/dual-face.test.tsx +0 -527
- package/src/report/react/CaseList.tsx +0 -70
- package/src/view/app/components/CostScoreChart.tsx +0 -147
- package/src/view/app/components/ExperimentTable.tsx +0 -284
- package/src/view/app/components/GroupSelector.tsx +0 -61
- package/src/view/app/components/primitives.tsx +0 -43
- package/src/view/app/lib/outcome.ts +0 -82
|
@@ -0,0 +1,335 @@
|
|
|
1
|
+
import type { InputRequest, StreamEvent, ToolCall, Usage } from "../o11y/types.ts";
|
|
2
|
+
import type { AssertionHandle, ValueAssertion } from "../scoring/types.ts";
|
|
3
|
+
import type { CommandOptions, CommandResult, ReadSourceFilesOptions, SandboxFile, SourceFiles } from "../sandbox/types.ts";
|
|
4
|
+
/** t.send() 返回的句柄:从事件流派生便利字段 + expectOk。 */
|
|
5
|
+
export interface TurnHandle {
|
|
6
|
+
/** 本轮的原始事件流(工具调用、消息增量等);下面的派生字段都算自它。 */
|
|
7
|
+
readonly events: StreamEvent[];
|
|
8
|
+
/** 本轮内被调用的工具列表,从 events 派生。 */
|
|
9
|
+
readonly toolCalls: readonly ToolCall[];
|
|
10
|
+
/** 本轮结束状态:"completed" 正常结束、"failed" 出错、"waiting" 卡在 HITL 输入请求上。 */
|
|
11
|
+
readonly status: "completed" | "failed" | "waiting";
|
|
12
|
+
/** 本轮助手最终文本回复(events 里的消息增量拼接结果)。 */
|
|
13
|
+
readonly message: string;
|
|
14
|
+
/** adapter 附带的结构化输出(如有),供 outputEquals / outputMatches 比对。 */
|
|
15
|
+
readonly data?: unknown;
|
|
16
|
+
/** 本轮 token 用量与估算成本(仅上报了 usage 的 agent 才有)。 */
|
|
17
|
+
readonly usage?: Usage;
|
|
18
|
+
/** 上一轮若 failed 则抛(中止后续)。 */
|
|
19
|
+
expectOk(): TurnHandle;
|
|
20
|
+
/** 断言 data 与给定值深度相等。 */
|
|
21
|
+
outputEquals(value: unknown): AssertionHandle;
|
|
22
|
+
/** 断言 data 满足给定 schema(如 zod schema)。 */
|
|
23
|
+
outputMatches(schema: unknown): AssertionHandle;
|
|
24
|
+
/** 断言本轮助手回复包含 token(仅限本轮事件流,不跨轮)。 */
|
|
25
|
+
messageIncludes(token: string | RegExp): AssertionHandle;
|
|
26
|
+
/** 断言本轮 status 为 "completed"。 */
|
|
27
|
+
succeeded(): AssertionHandle;
|
|
28
|
+
/** 断言本轮卡在 HITL 输入请求上(status 为 "waiting")。 */
|
|
29
|
+
parked(): AssertionHandle;
|
|
30
|
+
/** 断言本轮调用过指定名字的工具;`match` 可进一步约束入参 / 次数 / 状态。 */
|
|
31
|
+
calledTool(name: string, match?: ToolMatch): AssertionHandle;
|
|
32
|
+
/** 断言本轮未调用指定工具(或未按 match 条件调用)。 */
|
|
33
|
+
notCalledTool(name: string, match?: ToolMatch): AssertionHandle;
|
|
34
|
+
/** 断言本轮工具调用按给定顺序出现(允许中间夹杂其它调用)。 */
|
|
35
|
+
toolOrder(names: string[]): AssertionHandle;
|
|
36
|
+
/** 断言本轮未调用任何工具。 */
|
|
37
|
+
usedNoTools(): AssertionHandle;
|
|
38
|
+
/** 断言本轮工具调用总数不超过 max。 */
|
|
39
|
+
maxToolCalls(max: number): AssertionHandle;
|
|
40
|
+
/** 断言本轮加载过指定 skill。 */
|
|
41
|
+
loadedSkill(skill: string): AssertionHandle;
|
|
42
|
+
/** 断言本轮没有失败的工具调用 / 命令。 */
|
|
43
|
+
noFailedActions(): AssertionHandle;
|
|
44
|
+
/** 断言本轮出现过指定类型的事件;`opts.count` 可约束出现次数。 */
|
|
45
|
+
event(type: StreamEvent["type"], opts?: {
|
|
46
|
+
count?: number;
|
|
47
|
+
}): AssertionHandle;
|
|
48
|
+
/** 断言本轮未出现指定类型的事件。 */
|
|
49
|
+
notEvent(type: StreamEvent["type"]): AssertionHandle;
|
|
50
|
+
/** 断言本轮调用过指定名字的子 agent;`match` 可约束次数 / 状态 / remoteUrl。 */
|
|
51
|
+
calledSubagent(name: string, match?: SubagentMatch): AssertionHandle;
|
|
52
|
+
/** 断言本轮事件按给定类型顺序出现(允许中间夹杂其它事件)。 */
|
|
53
|
+
eventOrder(types: StreamEvent["type"][]): AssertionHandle;
|
|
54
|
+
/** 用自定义谓词对本轮整段事件流断言;失败时用 label 说明原因。 */
|
|
55
|
+
eventsSatisfy(predicate: (events: readonly StreamEvent[]) => boolean, label?: string): AssertionHandle;
|
|
56
|
+
/** 断言本轮 token 用量不超过 max。 */
|
|
57
|
+
maxTokens(max: number): AssertionHandle;
|
|
58
|
+
/** 断言本轮花费(USD)不超过 usd。 */
|
|
59
|
+
maxCost(usd: number): AssertionHandle;
|
|
60
|
+
/** 本轮可用的 judge 命名空间(t.judge.autoevals.*)。 */
|
|
61
|
+
readonly judge: JudgeNamespace;
|
|
62
|
+
}
|
|
63
|
+
/** autoevals 子命名空间:结构化的参考材料对照评估(closedQA / factuality / summarizes)。 */
|
|
64
|
+
export interface AutoevalsNamespace {
|
|
65
|
+
closedQA(question: string, opts?: {
|
|
66
|
+
on?: string;
|
|
67
|
+
model?: string;
|
|
68
|
+
}): AssertionHandle;
|
|
69
|
+
factuality(expected: string, opts?: {
|
|
70
|
+
on?: string;
|
|
71
|
+
model?: string;
|
|
72
|
+
}): AssertionHandle;
|
|
73
|
+
summarizes(source: string, opts?: {
|
|
74
|
+
on?: string;
|
|
75
|
+
model?: string;
|
|
76
|
+
}): AssertionHandle;
|
|
77
|
+
}
|
|
78
|
+
export interface JudgeNamespace {
|
|
79
|
+
/** 结构化对照评估的子命名空间(t.judge.autoevals.closedQA / .factuality / .summarizes)。 */
|
|
80
|
+
autoevals: AutoevalsNamespace;
|
|
81
|
+
}
|
|
82
|
+
/** 最终 diff 的只读视图(t.sandbox.diff);内容在 test() 跑完、finalize 前才落定。 */
|
|
83
|
+
export interface DiffView {
|
|
84
|
+
/** 取某个生成 / 修改文件的最终内容;文件不在 diff 里则 undefined。 */
|
|
85
|
+
get(path: string): string | undefined;
|
|
86
|
+
/** 整个 diff 是否为空(既没有生成/修改的文件,也没有删除的文件)。 */
|
|
87
|
+
isEmpty(): boolean;
|
|
88
|
+
/** 正则是否命中 diff 里任意文件的路径或内容。 */
|
|
89
|
+
matches(re: RegExp): boolean;
|
|
90
|
+
}
|
|
91
|
+
/** 工具匹配小语言。 */
|
|
92
|
+
export interface ToolMatch {
|
|
93
|
+
/** 只匹配入参包含这些键值的调用(浅层包含,非深度相等)。 */
|
|
94
|
+
input?: Record<string, unknown>;
|
|
95
|
+
/** 精确匹配调用次数,省略则只要求「至少一次」。 */
|
|
96
|
+
count?: number;
|
|
97
|
+
/** 只匹配处于该状态的调用(如 HITL 场景下的 rejected)。 */
|
|
98
|
+
status?: "completed" | "failed" | "rejected";
|
|
99
|
+
}
|
|
100
|
+
/** calledSubagent 的匹配小语言,语义同 ToolMatch。 */
|
|
101
|
+
export interface SubagentMatch {
|
|
102
|
+
/** 精确匹配调用次数,省略则只要求「至少一次」。 */
|
|
103
|
+
count?: number;
|
|
104
|
+
status?: "completed" | "failed";
|
|
105
|
+
/** 只匹配指向该远程地址的子 agent 调用。 */
|
|
106
|
+
remoteUrl?: string | RegExp;
|
|
107
|
+
}
|
|
108
|
+
/** requireInputRequest 的过滤条件;多个字段之间是 AND 关系。 */
|
|
109
|
+
export interface InputRequestFilter {
|
|
110
|
+
id?: string | RegExp;
|
|
111
|
+
prompt?: string | RegExp;
|
|
112
|
+
display?: string | RegExp;
|
|
113
|
+
action?: string | RegExp;
|
|
114
|
+
input?: Record<string, unknown>;
|
|
115
|
+
/** 请求的可选项 id 集合必须与此完全一致(顺序无关)。 */
|
|
116
|
+
optionIds?: readonly string[];
|
|
117
|
+
}
|
|
118
|
+
/**
|
|
119
|
+
* `t.respond(...)` 的对象形式:显式指名回答的是哪条请求(多个请求并停时用它消歧,
|
|
120
|
+
* 字符串形式做不到)。`optionId` 与 `text` 二选一——`optionId` 必须存在于
|
|
121
|
+
* `request.options` 里,写错直接抛;`text` 是自由文本,不做校验。
|
|
122
|
+
*/
|
|
123
|
+
export interface RespondAnswer {
|
|
124
|
+
readonly request: InputRequest;
|
|
125
|
+
readonly optionId?: string;
|
|
126
|
+
readonly text?: string;
|
|
127
|
+
}
|
|
128
|
+
/** eval 作者可见的受限沙箱视图:能执行命令 / 文件 IO / 读最终 diff,但不能 stop。 */
|
|
129
|
+
export interface SandboxHandle {
|
|
130
|
+
/** 沙箱内的工作目录绝对路径。 */
|
|
131
|
+
readonly workdir: string;
|
|
132
|
+
/** 在沙箱里执行一条命令(argv 形式,不经 shell)。装系统依赖等需要 root 时传 `{ root: true }`。 */
|
|
133
|
+
runCommand(cmd: string, args?: string[], opts?: CommandOptions): Promise<CommandResult>;
|
|
134
|
+
/** 在沙箱里执行一段 shell 脚本(经 shell 解释,支持管道 / 重定向)。 */
|
|
135
|
+
runShell(script: string, opts?: CommandOptions): Promise<CommandResult>;
|
|
136
|
+
/** 读沙箱内某文件此刻的文本内容(实时读,不是 diff 快照)。 */
|
|
137
|
+
readFile(path: string): Promise<string>;
|
|
138
|
+
/** 沙箱内某路径此刻是否存在。 */
|
|
139
|
+
fileExists(path: string): Promise<boolean>;
|
|
140
|
+
/** 按选项批量读回沙箱里的源文件,供比对 / judge 用材料。 */
|
|
141
|
+
readSourceFiles(opts?: ReadSourceFilesOptions): Promise<SourceFiles>;
|
|
142
|
+
/** 把一组内容写进沙箱(路径相对 targetDir,默认 workdir)。 */
|
|
143
|
+
writeFiles(files: Record<string, string>, targetDir?: string): Promise<void>;
|
|
144
|
+
/** 把一批内存中的文件上传进沙箱。 */
|
|
145
|
+
uploadFiles(files: SandboxFile[], targetDir?: string): Promise<void>;
|
|
146
|
+
/** 把本地目录整体上传进沙箱;`opts.ignore` 排除指定路径。 */
|
|
147
|
+
uploadDirectory(localDir: string, targetDir?: string, opts?: {
|
|
148
|
+
ignore?: string[];
|
|
149
|
+
}): Promise<void>;
|
|
150
|
+
/** 从沙箱下载某文件内容。 */
|
|
151
|
+
downloadFile(path: string): Promise<Buffer>;
|
|
152
|
+
/** 把一段内容上传成沙箱里的单个文件。 */
|
|
153
|
+
uploadFile(path: string, content: Buffer): Promise<void>;
|
|
154
|
+
/** 沙箱 provider 分配的实例 id,用于排查 / 关联日志。 */
|
|
155
|
+
readonly sandboxId: string;
|
|
156
|
+
/** 相对 git 基线的最终 diff 视图(test() 跑完、finalize 前才落定)。 */
|
|
157
|
+
readonly diff: DiffView;
|
|
158
|
+
/** 取沙箱内某文件的最终内容,占位延迟到 finalize 才真正读取;只能配合 t.check 使用。 */
|
|
159
|
+
file(path: string): string;
|
|
160
|
+
/** 断言 diff 里某路径发生了变化(新增或修改)。 */
|
|
161
|
+
fileChanged(path: string): AssertionHandle;
|
|
162
|
+
/** 断言 diff 里某路径被删除。 */
|
|
163
|
+
fileDeleted(path: string): AssertionHandle;
|
|
164
|
+
/** 断言 diff 的路径与内容都不匹配给定正则(常用来否定式检查不该出现的改动)。 */
|
|
165
|
+
notInDiff(re: RegExp): AssertionHandle;
|
|
166
|
+
/** 断言沙箱里执行过的命令都没有失败退出。 */
|
|
167
|
+
noFailedShellCommands(): AssertionHandle;
|
|
168
|
+
}
|
|
169
|
+
/**
|
|
170
|
+
* `t.newSession()` 返回的独立会话句柄:另开一路对话,发送与断言都与默认会话及其它
|
|
171
|
+
* `newSession()` 会话相互隔离(各自的 events / usage 互不叠加)。下面的断言方法都按
|
|
172
|
+
* 「这个会话到目前为止的累计事件流」评估(跨该会话所有轮次),不是仅最后一轮——
|
|
173
|
+
* 只看最后一轮要用 `send()` 返回的 TurnHandle。
|
|
174
|
+
*/
|
|
175
|
+
export interface SessionHandle {
|
|
176
|
+
/** 在这个会话里发一条消息,返回该轮的 TurnHandle。 */
|
|
177
|
+
send(text: string): Promise<TurnHandle>;
|
|
178
|
+
/** 在这个会话里发一条带文件的消息,语义同 TestContext.sendFile。 */
|
|
179
|
+
sendFile(path: string, text?: string): Promise<TurnHandle>;
|
|
180
|
+
/** 取这个会话里等待中的 HITL 输入请求;拿不到就抛,语义同 TestContext.requireInputRequest。 */
|
|
181
|
+
requireInputRequest(filter?: InputRequestFilter): InputRequest;
|
|
182
|
+
/** 回答这个会话里等待中的输入请求,返回续接的 TurnHandle。 */
|
|
183
|
+
respond(...responses: (string | RespondAnswer)[]): Promise<TurnHandle>;
|
|
184
|
+
/** 用同一个 optionId 批量回答这个会话里全部等待中的输入请求。 */
|
|
185
|
+
respondAll(optionId: string): Promise<TurnHandle>;
|
|
186
|
+
/** 这个会话最近一轮的助手回复文本。 */
|
|
187
|
+
readonly reply: string;
|
|
188
|
+
/** adapter 侧的会话 id(有会话概念的 agent 才有)。 */
|
|
189
|
+
readonly sessionId: string | undefined;
|
|
190
|
+
/** 这个会话累计的事件流(跨该会话内所有轮次,不含其它会话)。 */
|
|
191
|
+
readonly events: readonly StreamEvent[];
|
|
192
|
+
/** 断言这个会话累计状态为 "completed"(跨全部轮次)。 */
|
|
193
|
+
succeeded(): AssertionHandle;
|
|
194
|
+
/** 断言这个会话当前卡在 HITL 输入请求上。 */
|
|
195
|
+
parked(): AssertionHandle;
|
|
196
|
+
/** 断言这个会话累计的助手回复包含 token(跨全部轮次)。 */
|
|
197
|
+
messageIncludes(token: string | RegExp): AssertionHandle;
|
|
198
|
+
/** 断言这个会话累计调用过指定名字的工具;match 可约束入参 / 次数 / 状态。 */
|
|
199
|
+
calledTool(name: string, match?: ToolMatch): AssertionHandle;
|
|
200
|
+
/** 断言这个会话累计未调用指定工具(或未按 match 条件调用)。 */
|
|
201
|
+
notCalledTool(name: string, match?: ToolMatch): AssertionHandle;
|
|
202
|
+
/** 断言这个会话累计工具调用按给定顺序出现。 */
|
|
203
|
+
toolOrder(names: string[]): AssertionHandle;
|
|
204
|
+
/** 断言这个会话至今未调用任何工具。 */
|
|
205
|
+
usedNoTools(): AssertionHandle;
|
|
206
|
+
/** 断言这个会话累计工具调用总数不超过 max。 */
|
|
207
|
+
maxToolCalls(max: number): AssertionHandle;
|
|
208
|
+
/** 断言这个会话累计加载过指定 skill。 */
|
|
209
|
+
loadedSkill(skill: string): AssertionHandle;
|
|
210
|
+
/** 断言这个会话累计没有失败的工具调用 / 命令。 */
|
|
211
|
+
noFailedActions(): AssertionHandle;
|
|
212
|
+
/** 断言这个会话累计出现过指定类型的事件;opts.count 可约束次数。 */
|
|
213
|
+
event(type: StreamEvent["type"], opts?: {
|
|
214
|
+
count?: number;
|
|
215
|
+
}): AssertionHandle;
|
|
216
|
+
/** 断言这个会话累计未出现指定类型的事件。 */
|
|
217
|
+
notEvent(type: StreamEvent["type"]): AssertionHandle;
|
|
218
|
+
/** 断言这个会话累计调用过指定名字的子 agent;match 可约束次数 / 状态 / remoteUrl。 */
|
|
219
|
+
calledSubagent(name: string, match?: SubagentMatch): AssertionHandle;
|
|
220
|
+
/** 断言这个会话累计事件按给定类型顺序出现。 */
|
|
221
|
+
eventOrder(types: StreamEvent["type"][]): AssertionHandle;
|
|
222
|
+
/** 用自定义谓词对这个会话累计的整段事件流断言。 */
|
|
223
|
+
eventsSatisfy(predicate: (events: readonly StreamEvent[]) => boolean, label?: string): AssertionHandle;
|
|
224
|
+
/** 断言这个会话累计 token 用量不超过 max。 */
|
|
225
|
+
maxTokens(max: number): AssertionHandle;
|
|
226
|
+
/** 断言这个会话累计花费(USD)不超过 usd。 */
|
|
227
|
+
maxCost(usd: number): AssertionHandle;
|
|
228
|
+
/** 这个会话累计的 token 用量与估算成本。 */
|
|
229
|
+
readonly usage: Usage;
|
|
230
|
+
/** 这个会话可用的 judge 命名空间。 */
|
|
231
|
+
readonly judge: JudgeNamespace;
|
|
232
|
+
}
|
|
233
|
+
/**
|
|
234
|
+
* eval 作者拿到的高层上下文。运行器按 agent 能力组装;tsx 不做类型检查,所以这里
|
|
235
|
+
* 用一个宽接口承载全部动作(运行时按 capability 守卫)。
|
|
236
|
+
*/
|
|
237
|
+
export interface TestContext {
|
|
238
|
+
/** 向默认会话发一条消息,返回该轮的 TurnHandle。事件同时累加进默认会话的累计事件流,供下面的作用域断言使用。 */
|
|
239
|
+
send(text: string): Promise<TurnHandle>;
|
|
240
|
+
/** 发一条带文件(图片等多模态输入)的消息。`path` 相对项目根;读出后 base64 随 TurnInput.files 交给 adapter。 */
|
|
241
|
+
sendFile(path: string, text?: string): Promise<TurnHandle>;
|
|
242
|
+
/** 取默认会话里等待中的 HITL 输入请求;不传 filter 要求恰好一条,拿不到就抛。 */
|
|
243
|
+
requireInputRequest(filter?: InputRequestFilter): InputRequest;
|
|
244
|
+
/**
|
|
245
|
+
* 回答默认会话里等待中的输入请求,返回续接的 TurnHandle。字符串形式按顺序对应各请求;
|
|
246
|
+
* 多个请求并停、需要指名回答哪一条时用 RespondAnswer 对象形式(见其类型注释)。
|
|
247
|
+
*/
|
|
248
|
+
respond(...responses: (string | RespondAnswer)[]): Promise<TurnHandle>;
|
|
249
|
+
/** 用同一个 optionId 批量回答默认会话里全部等待中的输入请求。 */
|
|
250
|
+
respondAll(optionId: string): Promise<TurnHandle>;
|
|
251
|
+
/** 默认会话最近一轮的助手回复文本。 */
|
|
252
|
+
readonly reply: string;
|
|
253
|
+
/** adapter 侧的默认会话 id(有会话概念的 agent 才有)。 */
|
|
254
|
+
readonly sessionId: string | undefined;
|
|
255
|
+
/** 默认会话累计的事件流(跨该会话所有轮次)。 */
|
|
256
|
+
readonly events: readonly StreamEvent[];
|
|
257
|
+
/**
|
|
258
|
+
* 另开一路独立会话,返回它的 SessionHandle——不是 void。多会话隔离的关键入口:
|
|
259
|
+
* 新会话的发送与断言都与默认会话及其它 newSession() 会话相互隔离,常用于「多用户
|
|
260
|
+
* 并行对话」「一条主线 + 一条旁支」这类场景。
|
|
261
|
+
*/
|
|
262
|
+
newSession(): SessionHandle;
|
|
263
|
+
/** 本次 attempt 的中止信号;超时 / 首过即停 / 用户 Ctrl-C 时触发,传给 adapter 的长耗时调用做取消。 */
|
|
264
|
+
readonly signal: AbortSignal;
|
|
265
|
+
/** 本次 attempt 使用的模型名(由 experiment/CLI flag 决定);省略即 agent 原生默认,不代表「无模型」。 */
|
|
266
|
+
readonly model?: string;
|
|
267
|
+
/** 本次 attempt 的推理努力程度(如 "low"/"medium"/"high",取值由 adapter/模型决定)。 */
|
|
268
|
+
readonly reasoningEffort?: string;
|
|
269
|
+
/** 本次 attempt 生效的实验 flags(experiment.flags 的只读视图;实验条件,非命令行开关)。 */
|
|
270
|
+
readonly flags: Readonly<Record<string, unknown>>;
|
|
271
|
+
/** 打一行调试日志;有 live 进度回调时走该回调,否则落到 stderr,不出现在最终结果里。 */
|
|
272
|
+
log(msg: string): void;
|
|
273
|
+
/** 立即中止本 eval 并标记为 skipped(verdict / EvalResult.skipReason),reason 不能为空。 */
|
|
274
|
+
skip(reason: string): never;
|
|
275
|
+
/**
|
|
276
|
+
* 对任意值跑一个 ValueAssertion,返回可链 `.gate()` / `.atLeast()` 的 AssertionHandle。
|
|
277
|
+
* 打分延迟到 eval 结束后统一 finalize,调用本身同步、不抛错——不通过只是记一条失败断言,
|
|
278
|
+
* 不会中止后续代码。要「不满足就立即中止 eval」用 require。
|
|
279
|
+
*/
|
|
280
|
+
check(value: unknown, assertion: ValueAssertion): AssertionHandle;
|
|
281
|
+
/**
|
|
282
|
+
* 对任意值跑一个 ValueAssertion,立即(await 时)求值;不满足就抛错中止整个 eval 剩余步骤
|
|
283
|
+
* (仍会把这条断言计入报告,不影响已记录的其它断言)。跟 check 的区别:check 只记录、
|
|
284
|
+
* 从不抛错,打分留到最后统一算;require 当场判定、失败即中止,适合「前置条件不满足,
|
|
285
|
+
* 后面写了也没意义」的场景。
|
|
286
|
+
*/
|
|
287
|
+
require(value: unknown, assertion: ValueAssertion): Promise<unknown>;
|
|
288
|
+
/**
|
|
289
|
+
* 把一组断言归到一个有标题的分组下(对照 vitest 的 test('title', ...))。纯组织/报告用,
|
|
290
|
+
* 不改打分:组里每条断言仍独立计分。可嵌套(标题用 › 连接)。
|
|
291
|
+
*/
|
|
292
|
+
group<T>(title: string, fn: () => Promise<T> | T): Promise<T>;
|
|
293
|
+
/** 断言默认会话累计状态为 "completed"(跨该会话所有轮次,不止最后一轮)。 */
|
|
294
|
+
succeeded(): AssertionHandle;
|
|
295
|
+
/** 断言默认会话当前卡在 HITL 输入请求上。 */
|
|
296
|
+
parked(): AssertionHandle;
|
|
297
|
+
/** 断言默认会话累计的助手回复包含 token(跨该会话所有轮次,不止最后一轮)。 */
|
|
298
|
+
messageIncludes(token: string | RegExp): AssertionHandle;
|
|
299
|
+
/** 断言默认会话累计调用过指定名字的工具;match 可约束入参 / 次数 / 状态。 */
|
|
300
|
+
calledTool(name: string, match?: ToolMatch): AssertionHandle;
|
|
301
|
+
/** 断言默认会话累计未调用指定工具(或未按 match 条件调用)。 */
|
|
302
|
+
notCalledTool(name: string, match?: ToolMatch): AssertionHandle;
|
|
303
|
+
/** 断言默认会话累计工具调用按给定顺序出现(允许中间夹杂其它调用)。 */
|
|
304
|
+
toolOrder(names: string[]): AssertionHandle;
|
|
305
|
+
/** 断言默认会话至今未调用任何工具。 */
|
|
306
|
+
usedNoTools(): AssertionHandle;
|
|
307
|
+
/** 断言默认会话累计工具调用总数不超过 max。 */
|
|
308
|
+
maxToolCalls(max: number): AssertionHandle;
|
|
309
|
+
/** 断言默认会话累计加载过指定 skill。 */
|
|
310
|
+
loadedSkill(skill: string): AssertionHandle;
|
|
311
|
+
/** 断言默认会话累计没有失败的工具调用 / 命令。 */
|
|
312
|
+
noFailedActions(): AssertionHandle;
|
|
313
|
+
/** 断言默认会话累计出现过指定类型的事件;opts.count 可约束出现次数。 */
|
|
314
|
+
event(type: StreamEvent["type"], opts?: {
|
|
315
|
+
count?: number;
|
|
316
|
+
}): AssertionHandle;
|
|
317
|
+
/** 断言默认会话累计未出现指定类型的事件。 */
|
|
318
|
+
notEvent(type: StreamEvent["type"]): AssertionHandle;
|
|
319
|
+
/** 断言默认会话累计调用过指定名字的子 agent;match 可约束次数 / 状态 / remoteUrl。 */
|
|
320
|
+
calledSubagent(name: string, match?: SubagentMatch): AssertionHandle;
|
|
321
|
+
/** 断言默认会话累计事件按给定类型顺序出现(允许中间夹杂其它事件)。 */
|
|
322
|
+
eventOrder(types: StreamEvent["type"][]): AssertionHandle;
|
|
323
|
+
/** 用自定义谓词对默认会话累计的整段事件流断言;失败时用 label 说明原因。 */
|
|
324
|
+
eventsSatisfy(predicate: (events: readonly StreamEvent[]) => boolean, label?: string): AssertionHandle;
|
|
325
|
+
/** 受限沙箱视图:能执行命令 / 读写文件 / 看最终 diff,不能 stop 沙箱本身(见 SandboxHandle)。 */
|
|
326
|
+
readonly sandbox: SandboxHandle;
|
|
327
|
+
/** 默认会话累计的 token 用量与估算成本。 */
|
|
328
|
+
readonly usage: Usage;
|
|
329
|
+
/** 断言默认会话累计 token 用量不超过 max。 */
|
|
330
|
+
maxTokens(max: number): AssertionHandle;
|
|
331
|
+
/** 断言默认会话累计花费(USD)不超过 usd。 */
|
|
332
|
+
maxCost(usd: number): AssertionHandle;
|
|
333
|
+
/** 可用的 judge 命名空间(t.judge.autoevals.*)。 */
|
|
334
|
+
readonly judge: JudgeNamespace;
|
|
335
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export type Locale = "zh-CN" | "en";
|
|
2
|
+
export type Vars = Record<string, string | number | boolean | undefined>;
|
|
3
|
+
/** 一份字典:消息 key → 文案(可含 {{var}} 占位)。 */
|
|
4
|
+
export type Dictionary<K extends string = string> = Record<K, string>;
|
|
5
|
+
/** 把 {{var}} 占位替换成 vars 里的值;缺失的变量替换成空串而不是保留占位。 */
|
|
6
|
+
export declare function interpolate(message: string, vars?: Vars): string;
|
|
7
|
+
/**
|
|
8
|
+
* 把 "zh_CN"、"en-US"、navigator.language 这类原始值归一成受支持的 Locale。
|
|
9
|
+
* C / POSIX 视为「未指定」返回 undefined(交给下一个候选);非中文一律落 en。
|
|
10
|
+
*/
|
|
11
|
+
export declare function normalizeLocale(raw: string | undefined): Locale | undefined;
|
|
@@ -0,0 +1,181 @@
|
|
|
1
|
+
export declare const en: {
|
|
2
|
+
"agent.installFailed": string;
|
|
3
|
+
"agent.unknown": string;
|
|
4
|
+
"agent.diagnose.exitCode": string;
|
|
5
|
+
"agent.diagnose.lastError": string;
|
|
6
|
+
"agent.diagnose.noTranscript": string;
|
|
7
|
+
"agent.diagnose.outputTail": string;
|
|
8
|
+
"agent.diagnose.zeroEvents": string;
|
|
9
|
+
"bub.homeDetectFailed": string;
|
|
10
|
+
"bub.checkpointCaptureFailed": string;
|
|
11
|
+
"bub.checkpointRestoreFailed": string;
|
|
12
|
+
"bub.installFailed": string;
|
|
13
|
+
"bub.setupNotRun": string;
|
|
14
|
+
"checkpoint.emptyTar": string;
|
|
15
|
+
"skill.localMissing": string;
|
|
16
|
+
"skill.localDirNoSkillFile": string;
|
|
17
|
+
"skill.localUnsupportedShape": string;
|
|
18
|
+
"skill.repoCloneFailed": string;
|
|
19
|
+
"skill.repoNoSkills": string;
|
|
20
|
+
"skill.repoAmbiguous": string;
|
|
21
|
+
"skill.repoUnknownSkill": string;
|
|
22
|
+
"skill.copyFailed": string;
|
|
23
|
+
"plugin.marketplaceFailed": string;
|
|
24
|
+
"plugin.installFailed": string;
|
|
25
|
+
"cli.all": string;
|
|
26
|
+
"cli.browserOpenFailed": string;
|
|
27
|
+
"cli.clean.done": string;
|
|
28
|
+
"cli.config.missing": string;
|
|
29
|
+
"cli.config.noDefault": string;
|
|
30
|
+
"cli.dry.header": string;
|
|
31
|
+
"cli.dry.noMatches": string;
|
|
32
|
+
"cli.dry.row": string;
|
|
33
|
+
"cli.error": string;
|
|
34
|
+
"cli.flag.invalidNumber": string;
|
|
35
|
+
"runner.budgetUnenforceable": string;
|
|
36
|
+
"judge.modelMissing": string;
|
|
37
|
+
"loaders.yamlMissing": string;
|
|
38
|
+
"cli.flag.parseError": string;
|
|
39
|
+
"cli.envInvalidNumber": string;
|
|
40
|
+
"cli.help": string;
|
|
41
|
+
"cli.show.noResults": string;
|
|
42
|
+
"cli.show.runDirMissing": string;
|
|
43
|
+
"cli.show.noEvalMatch": string;
|
|
44
|
+
"cli.show.noExperimentMatch": string;
|
|
45
|
+
"cli.show.historyReportConflict": string;
|
|
46
|
+
"cli.show.evidenceNeedsEval": string;
|
|
47
|
+
"cli.show.locatorMalformed": string;
|
|
48
|
+
"cli.show.locatorNotFound": string;
|
|
49
|
+
"cli.eval.noMatch": string;
|
|
50
|
+
"cli.eval.noMatchHintExperiment": string;
|
|
51
|
+
"cli.eval.noMatchKnown": string;
|
|
52
|
+
"cli.exp.agentModelFlagUnsupported": string;
|
|
53
|
+
"cli.experiment.noMatch": string;
|
|
54
|
+
"cli.experimentGroup": string;
|
|
55
|
+
"cli.fallbackCleanupTimeout": string;
|
|
56
|
+
"cli.forceCleanupExit": string;
|
|
57
|
+
"cli.init.done": string;
|
|
58
|
+
"cli.interruptCleanup": string;
|
|
59
|
+
"cli.list.header": string;
|
|
60
|
+
"cli.noAgent": string;
|
|
61
|
+
"cli.none": string;
|
|
62
|
+
"cli.pressCtrlC": string;
|
|
63
|
+
"cli.resultsPath": string;
|
|
64
|
+
"cli.run.experimentRequired": string;
|
|
65
|
+
"cli.run.experimentRequiredHint": string;
|
|
66
|
+
"cli.run.experimentRequiredKnown": string;
|
|
67
|
+
"cli.unimplemented": string;
|
|
68
|
+
"cli.view.exportedDir": string;
|
|
69
|
+
"cli.view.incompatible": string;
|
|
70
|
+
"cli.view.noResults": string;
|
|
71
|
+
"cli.view.incompatibleForeign": string;
|
|
72
|
+
"cli.view.url": string;
|
|
73
|
+
"context.capabilityMissing": string;
|
|
74
|
+
"context.skipEmpty": string;
|
|
75
|
+
"context.turnFailed": string;
|
|
76
|
+
"context.turnFailedDefault": string;
|
|
77
|
+
"define.agentNameRequired": string;
|
|
78
|
+
"define.evalIdRejected": string;
|
|
79
|
+
"define.evalTestRequired": string;
|
|
80
|
+
"define.experimentAgentRequired": string;
|
|
81
|
+
"define.experimentIdRejected": string;
|
|
82
|
+
"define.sandboxAgentNameRequired": string;
|
|
83
|
+
"define.sandboxCreateRequired": string;
|
|
84
|
+
"define.sandboxNameRequired": string;
|
|
85
|
+
"docker.commandTimeout": string;
|
|
86
|
+
"docker.containerNotInitialized": string;
|
|
87
|
+
"docker.imagePullDone": string;
|
|
88
|
+
"docker.imagePullStart": string;
|
|
89
|
+
"docker.readFileFailed": string;
|
|
90
|
+
"docker.unsupportedRuntime": string;
|
|
91
|
+
"hitl.answerNeedsOptionOrText": string;
|
|
92
|
+
"hitl.invalidOption": string;
|
|
93
|
+
"hitl.noOptions": string;
|
|
94
|
+
"hitl.requestMissingId": string;
|
|
95
|
+
"hitl.respondAllEmpty": string;
|
|
96
|
+
"hitl.respondEmpty": string;
|
|
97
|
+
"hitl.stringAmbiguous": string;
|
|
98
|
+
"judge.apiKeyMissing": string;
|
|
99
|
+
"judge.httpError": string;
|
|
100
|
+
"judge.probeFailed": string;
|
|
101
|
+
"judge.probeMissingKey": string;
|
|
102
|
+
"live.more": string;
|
|
103
|
+
"live.running": string;
|
|
104
|
+
"live.runningUnknown": string;
|
|
105
|
+
"live.waiting": string;
|
|
106
|
+
"report.assertionThreshold": string;
|
|
107
|
+
"report.error": string;
|
|
108
|
+
"report.errored": string;
|
|
109
|
+
"report.failed": string;
|
|
110
|
+
"report.gate": string;
|
|
111
|
+
"report.passed": string;
|
|
112
|
+
"report.result": string;
|
|
113
|
+
"report.runStart": string;
|
|
114
|
+
"report.runStartExtra": string;
|
|
115
|
+
"report.viewHint": string;
|
|
116
|
+
"report.skipped": string;
|
|
117
|
+
"report.soft": string;
|
|
118
|
+
"report.summary.errored": string;
|
|
119
|
+
"report.summary.failed": string;
|
|
120
|
+
"report.summary.passed": string;
|
|
121
|
+
"report.summary.skipped": string;
|
|
122
|
+
"report.table.agent": string;
|
|
123
|
+
"report.table.avgDuration": string;
|
|
124
|
+
"report.table.cost": string;
|
|
125
|
+
"report.table.default": string;
|
|
126
|
+
"report.table.duration": string;
|
|
127
|
+
"report.table.eval": string;
|
|
128
|
+
"report.table.evalTitle": string;
|
|
129
|
+
"report.table.experiment": string;
|
|
130
|
+
"report.table.experimentsTitle": string;
|
|
131
|
+
"report.table.model": string;
|
|
132
|
+
"report.table.reason": string;
|
|
133
|
+
"report.table.result": string;
|
|
134
|
+
"report.table.runs": string;
|
|
135
|
+
"report.table.status": string;
|
|
136
|
+
"report.table.successRate": string;
|
|
137
|
+
"report.table.tokens": string;
|
|
138
|
+
"otel.noSpans": string;
|
|
139
|
+
"otel.portInUse": string;
|
|
140
|
+
"otel.windowAttribution": string;
|
|
141
|
+
"runner.diffProgress": string;
|
|
142
|
+
"runner.driveAgent": string;
|
|
143
|
+
"runner.evalSetup": string;
|
|
144
|
+
"runner.interrupted": string;
|
|
145
|
+
"runner.judgePrecheck": string;
|
|
146
|
+
"runner.otlpInSandbox": string;
|
|
147
|
+
"runner.otlpOverride": string;
|
|
148
|
+
"runner.otlpReceiver": string;
|
|
149
|
+
"runner.otlpShared": string;
|
|
150
|
+
"runner.remoteSandboxUnavailable": string;
|
|
151
|
+
"runner.reporterDiagnostic": string;
|
|
152
|
+
"runner.scoreJudge": string;
|
|
153
|
+
"runner.skip": string;
|
|
154
|
+
"runner.startAgentSetup": string;
|
|
155
|
+
"runner.startAgentTracing": string;
|
|
156
|
+
"runner.startSandbox": string;
|
|
157
|
+
"runner.startSandboxSetup": string;
|
|
158
|
+
"runner.startSandboxTeardown": string;
|
|
159
|
+
"runner.timeout": string;
|
|
160
|
+
"runner.traceSelected": string;
|
|
161
|
+
"runner.resumeCarry": string;
|
|
162
|
+
"runner.resumeCarryDetail": string;
|
|
163
|
+
"runner.useRemoteAgent": string;
|
|
164
|
+
"sandbox.providerNotImplemented": string;
|
|
165
|
+
"sandbox.missingSpec": string;
|
|
166
|
+
"sandbox.dependencyMissing.docker": string;
|
|
167
|
+
"sandbox.dependencyMissing.e2b": string;
|
|
168
|
+
"sandbox.dependencyMissing.vercel": string;
|
|
169
|
+
"sandbox.forceCleanup": string;
|
|
170
|
+
"sandbox.stopFailed": string;
|
|
171
|
+
"sandbox.stopTimeout": string;
|
|
172
|
+
"scoring.evalError": string;
|
|
173
|
+
"session.fileFallback": string;
|
|
174
|
+
"session.tools": string;
|
|
175
|
+
"session.turn.primary": string;
|
|
176
|
+
"session.turn.secondary": string;
|
|
177
|
+
"util.requiredEnv": string;
|
|
178
|
+
"vercel.fileNotFound": string;
|
|
179
|
+
"vercel.rotateFailed": string;
|
|
180
|
+
"vercel.rotated": string;
|
|
181
|
+
};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { type MessageKey } from "./zh-CN.ts";
|
|
2
|
+
import { type Locale, type Vars } from "./core.ts";
|
|
3
|
+
export type { Locale, Vars } from "./core.ts";
|
|
4
|
+
export declare function detectLocale(env?: NodeJS.ProcessEnv): Locale;
|
|
5
|
+
export declare function t(key: MessageKey, vars?: Vars): string;
|