@tangle-network/agent-bench 3.0.0 → 4.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +21 -0
- package/README.md +8 -0
- package/dist/cli.js +44 -6
- package/dist/cli.js.map +1 -1
- package/dist/index.d.ts +35 -15
- package/dist/index.js +248 -89
- package/dist/index.js.map +1 -1
- package/dist/pier-trial-supervisor.mjs +352 -0
- package/package.json +5 -5
- package/pier_agents/candidate_contract.py +226 -74
- package/pier_agents/tangle_candidate.py +79 -1
- package/pier_agents/workspace_boundary.py +29 -1
- package/scripts/verify-packed-consumer.mjs +1 -0
- package/scripts/verify-pier-agent.mts +174 -123
- package/src/index.ts +3 -0
- package/src/pier-agent.ts +127 -39
- package/src/pier-trial-controller.test.mts +48 -1
- package/src/pier-trial-controller.ts +121 -8
- package/src/published.test.mts +29 -6
- package/src/published.ts +53 -8
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,26 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 4.0.2
|
|
4
|
+
|
|
5
|
+
The installed package includes the trial supervisor beside the code that
|
|
6
|
+
launches it, so an installed Factory CLI can start and settle a Pier trial.
|
|
7
|
+
|
|
8
|
+
## 4.0.1
|
|
9
|
+
|
|
10
|
+
The shared Pier executor now records the protected terminal trace required
|
|
11
|
+
for Runtime grading. The receipt keeps the actual trial interval, and
|
|
12
|
+
Runtime retains ownership of model accounting.
|
|
13
|
+
|
|
14
|
+
Published benchmark run records retain the publisher's reported usage when
|
|
15
|
+
the execution supplies it.
|
|
16
|
+
|
|
17
|
+
## 4.0.0
|
|
18
|
+
|
|
19
|
+
Bench's public candidate-execution types move to Runtime 11. Consumers that
|
|
20
|
+
import Runtime types alongside Bench should use the same major.
|
|
21
|
+
|
|
22
|
+
Pier can run an exact candidate from a standalone train or selection admission. The transport verifies the signed search, cell, and workspace identities before staging and retains the same protected results used by paired experiments.
|
|
23
|
+
|
|
3
24
|
## 3.0.0
|
|
4
25
|
|
|
5
26
|
Breaking: every adapter is now agent-eval's `BenchmarkAdapter` (agent-eval `^2.0.11`), the one benchmark contract, and agent-bench's own `BenchmarkAdapter`, `BenchScore` and the old `BenchTask` shape are gone.
|
package/README.md
CHANGED
|
@@ -113,9 +113,17 @@ The judge is a model call, so its score records the exact judge turn usage on `B
|
|
|
113
113
|
## Pier custom candidates
|
|
114
114
|
|
|
115
115
|
The package executes a branded `PreparedAgentCandidateExecution` from `@tangle-network/agent-runtime` through one atomic API and ships `pier_agents.tangle_candidate:TangleCandidateAgent` as its thin Pier transport.
|
|
116
|
+
Use `createPierCandidateExecutionOptions` in Runtime's `placeCell` execution callback to run sealed experiment cells through this transport.
|
|
117
|
+
For a standalone train or selection cell, pass the same factory to
|
|
118
|
+
`executeAgentCandidateSearchCell` as its `execution` callback and use a
|
|
119
|
+
`FilePierCandidateTrialController<'search'>`. The transport preserves the
|
|
120
|
+
admitted search identity through the verifier. Final assessment uses paired
|
|
121
|
+
experiment evidence.
|
|
116
122
|
The executor recreates every input from runtime-verified file bytes and reveals model credentials only inside the claimed execution callback.
|
|
123
|
+
An experiment can execute a code workspace, a materialized profile, and a measured Knowledge snapshot together. Pier checks the Knowledge files and optional retrieval configuration against the sealed bundle and excludes its own injected paths from the task patch.
|
|
117
124
|
Pier owns the task container and verifier; protected model usage and traces stay in `@tangle-network/agent-eval` and are finalized by the shared runtime.
|
|
118
125
|
`FilePierCandidateTrialController` atomically reserves a unique Pier job, then persists the supervisor PID, process-session identity, and that job's exact Docker projects so a fresh evaluator process can stop and remove an abandoned trial.
|
|
126
|
+
Use `createPierTaskTrialController` when each approved task digest already maps to an evaluator-owned Pier task directory. Give it the pinned Pier command and jobs directory. It launches exactly that task and reads the official result and patch through the same controller on completion or recovery. The evaluator still owns task staging and authorization.
|
|
119
127
|
Run `PIER_REPO=/path/to/pier pnpm verify:pier` for the zero-model failure/pass and fresh-process recovery proof, and see `HARNESS.md` for the exact invocation and failure contract.
|
|
120
128
|
From an installed npm package, expose the shipped Python module with `export PYTHONPATH="$(npm root)/@tangle-network/agent-bench${PYTHONPATH:+:$PYTHONPATH}"` before invoking Pier.
|
|
121
129
|
|
package/dist/cli.js
CHANGED
|
@@ -46,6 +46,12 @@ function agentApps(env) {
|
|
|
46
46
|
...Object.fromEntries(Object.entries(extra).map(([name, profileUrl]) => [name, { profileUrl }]))
|
|
47
47
|
};
|
|
48
48
|
}
|
|
49
|
+
function nonnegativeCounter(value) {
|
|
50
|
+
return typeof value === "number" && Number.isSafeInteger(value) && value >= 0 ? value : void 0;
|
|
51
|
+
}
|
|
52
|
+
function nonnegativeMeasurement(value) {
|
|
53
|
+
return typeof value === "number" && Number.isFinite(value) && value >= 0 ? value : void 0;
|
|
54
|
+
}
|
|
49
55
|
const PUBLISHED_BENCHMARKS = {
|
|
50
56
|
automationbench: {
|
|
51
57
|
name: "automationbench",
|
|
@@ -84,10 +90,25 @@ const PUBLISHED_BENCHMARKS = {
|
|
|
84
90
|
if (!Array.isArray(tasks)) throw new Error("AutomationBench result has no tasks array");
|
|
85
91
|
return tasks.map((task) => {
|
|
86
92
|
if (typeof task.name !== "string" || typeof task.score !== "number" || typeof task.passed !== "boolean") throw new Error(`AutomationBench task result is malformed: ${JSON.stringify(task).slice(0, 200)}`);
|
|
93
|
+
const raw = {};
|
|
94
|
+
const counters = {
|
|
95
|
+
publisherInputTokens: task.input_tokens,
|
|
96
|
+
publisherOutputTokens: task.output_tokens,
|
|
97
|
+
publisherCachedInputTokens: task.cached_input_tokens,
|
|
98
|
+
publisherReasoningTokens: task.reasoning_tokens,
|
|
99
|
+
publisherModelCalls: task.num_model_calls
|
|
100
|
+
};
|
|
101
|
+
for (const [key, counter] of Object.entries(counters)) {
|
|
102
|
+
const value = nonnegativeCounter(counter);
|
|
103
|
+
if (value !== void 0) raw[key] = value;
|
|
104
|
+
}
|
|
105
|
+
const estimate = nonnegativeMeasurement(task.cost);
|
|
106
|
+
if (estimate !== void 0) raw.publisherEstimatedCostUsd = estimate;
|
|
87
107
|
return {
|
|
88
108
|
id: task.name,
|
|
89
109
|
passed: task.passed,
|
|
90
|
-
score: task.score
|
|
110
|
+
score: task.score,
|
|
111
|
+
...Object.keys(raw).length && { raw }
|
|
91
112
|
};
|
|
92
113
|
});
|
|
93
114
|
}
|
|
@@ -182,12 +203,26 @@ const PUBLISHED_BENCHMARKS = {
|
|
|
182
203
|
const runs = (await readFile(path.join(resultPath, "tasks.tsv"), "utf8")).trim().split("\n").map((line) => line.split(" "));
|
|
183
204
|
return Promise.all(runs.map(async ([run, task]) => {
|
|
184
205
|
const read = (file) => readFile(path.join(resultPath, run, file), "utf8").then((text) => JSON.parse(text), () => null);
|
|
206
|
+
const metrics = await read("metrics.json");
|
|
207
|
+
const input = nonnegativeCounter(metrics?.input_tokens);
|
|
208
|
+
const output = nonnegativeCounter(metrics?.output_tokens);
|
|
209
|
+
const agentSeconds = nonnegativeMeasurement(metrics?.wall_clock_seconds);
|
|
210
|
+
const raw = agentSeconds === void 0 ? void 0 : { publisherAgentWallMs: agentSeconds * 1e3 };
|
|
211
|
+
const telemetry = {
|
|
212
|
+
...raw && { raw },
|
|
213
|
+
...input !== void 0 && output !== void 0 && { tokenUsage: {
|
|
214
|
+
input,
|
|
215
|
+
output,
|
|
216
|
+
tokensKnown: false
|
|
217
|
+
} }
|
|
218
|
+
};
|
|
185
219
|
const dual = await read("scores_dual.json");
|
|
186
220
|
if (dual) return {
|
|
187
221
|
id: task,
|
|
188
222
|
passed: dual.all_pass === true,
|
|
189
223
|
score: Number(dual.dual_all_pass_rate),
|
|
190
|
-
notes: `dual-judge criterion pass ${String(dual.dual_criterion_pass)}
|
|
224
|
+
notes: `dual-judge criterion pass ${String(dual.dual_criterion_pass)}`,
|
|
225
|
+
...telemetry
|
|
191
226
|
};
|
|
192
227
|
const single = await read("scores.json");
|
|
193
228
|
if (single) {
|
|
@@ -197,7 +232,9 @@ const PUBLISHED_BENCHMARKS = {
|
|
|
197
232
|
passed: single.all_pass === true,
|
|
198
233
|
score: single.all_pass === true ? 1 : 0,
|
|
199
234
|
notes: `${String(single.n_passed)} of ${String(single.n_criteria)} criteria passed${single.n_grading_errors ? `; ${String(single.n_grading_errors)} grading errors` : ""}`,
|
|
235
|
+
...telemetry,
|
|
200
236
|
raw: {
|
|
237
|
+
...raw,
|
|
201
238
|
criteria_passed: Number(single.n_passed) || 0,
|
|
202
239
|
criteria_total: Number(single.n_criteria) || 0,
|
|
203
240
|
...Object.fromEntries(criteria.filter((c) => typeof c.id === "string").map((c) => [`crit.${String(c.id)}`, c.verdict === "pass" ? 1 : 0]))
|
|
@@ -208,7 +245,8 @@ const PUBLISHED_BENCHMARKS = {
|
|
|
208
245
|
id: task,
|
|
209
246
|
passed: false,
|
|
210
247
|
score: 0,
|
|
211
|
-
notes: "no scores: the harness or the grader failed (see the runner log)"
|
|
248
|
+
notes: "no scores: the harness or the grader failed (see the runner log)",
|
|
249
|
+
...telemetry
|
|
212
250
|
};
|
|
213
251
|
}));
|
|
214
252
|
}
|
|
@@ -501,8 +539,8 @@ async function runPublished(name, target, options) {
|
|
|
501
539
|
return run;
|
|
502
540
|
}
|
|
503
541
|
/**
|
|
504
|
-
* One agent-eval RunRecord per task, validated by agent-eval's own validator.
|
|
505
|
-
*
|
|
542
|
+
* One agent-eval RunRecord per task, validated by agent-eval's own validator. Preserve an observed publisher subtotal
|
|
543
|
+
* and leave missing provider bills unknown. A RunRecord's model must name a served snapshot; a subscription harness
|
|
506
544
|
* reports none, and a snapshot invented from the date would be false, so such rows record `unknown` with terminal outcome
|
|
507
545
|
* `unknown` and keep the requested model in `candidateId`. A pinned model id (a Router snapshot) is recorded as served.
|
|
508
546
|
*/
|
|
@@ -532,7 +570,7 @@ function runRecords(run, options) {
|
|
|
532
570
|
kind: "uncaptured",
|
|
533
571
|
usd: null
|
|
534
572
|
},
|
|
535
|
-
tokenUsage: {
|
|
573
|
+
tokenUsage: task.tokenUsage ?? {
|
|
536
574
|
input: 0,
|
|
537
575
|
output: 0,
|
|
538
576
|
tokensKnown: false
|
package/dist/cli.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cli.js","names":[],"sources":["../src/published.ts","../src/cli.ts"],"sourcesContent":["/**\n * Published benchmarks, run by their publishers' own runners, unmodified, at a pinned commit.\n *\n * One registry entry per benchmark: the publisher's repository and commit, its install and run commands, a parser from the\n * publisher's result file to per-task scores (agent-eval's verdict names: `passed`, `score`, `notes`), the license, the data terms, and the judge the publisher names. Nothing here loads\n * tasks, drives an agent loop, or grades: the publisher's runner does all three. A target becomes the OpenAI-compatible\n * endpoint that runner calls:\n *\n * model:<router model> the Tangle Router with `TANGLE_API_KEY`; the target is a model driving the benchmark's tools.\n * profile:<harness/model> a CLI Bridge (`AGENT_BENCH_BRIDGE_URL`, default http://127.0.0.1:3344/v1) running that harness with\n * its own loop and tools; the benchmark's tools reach it as caller-executed MCP tools (cli-bridge#397).\n * app:<agent app>@<harness/model>\n * the AgentProfile the app serves in production (prompt, skills, subagents, resources), run by\n * that subscription harness through the same CLI Bridge at `/profiles/<id>/v1` (cli-bridge#408).\n * The app's production model and its own MCP servers are not part of it; the run record names both.\n *\n * Every run says what it measured: `model-shaped` (the target as a model calling the benchmark's tools, which the\n * benchmark executes) or `own-loop` (the agent with its own loop and tools). The two are never compared as one.\n */\nimport { spawn } from 'node:child_process'\nimport { createHash, randomUUID } from 'node:crypto'\nimport { existsSync } from 'node:fs'\nimport { mkdir, readdir, readFile, writeFile } from 'node:fs/promises'\nimport { homedir } from 'node:os'\nimport path from 'node:path'\nimport { fileURLToPath } from 'node:url'\nimport { canonicalJson, RunRecordValidationError, UNKNOWN_MODEL, validateRunRecord, type RunRecord } from '@tangle-network/agent-eval'\n\nexport type Measured = 'model-shaped' | 'own-loop'\n\n/** The OpenAI-compatible endpoint a publisher's runner calls for one target. */\nexport interface Endpoint {\n target: string\n baseUrl: string\n model: string\n /** The environment variable that holds the endpoint's key; the runner reads it, nothing here prints it. */\n apiKeyVar: string\n /** What a run through this endpoint measures. */\n measured: Measured\n /** For an app target: which served profile ran, and what of the app it leaves out. */\n app?: AppProfile\n}\n\n/** An agent app's served AgentProfile as an app target runs it. */\nexport interface AppProfile {\n app: string\n profileUrl: string\n profileName: string | null\n profileVersion: string | null\n /** sha256 of the profile as run (served profile without `model` and `mcp`). */\n profileDigest: string\n /** The model the app runs in production, replaced by the target's harness model. */\n productionModel: unknown\n /** The app's own MCP servers, which need the app's deployment and are not mounted. */\n omittedMcp: string[]\n}\n\n/**\n * Agent apps a benchmark can target, each by the executable AgentProfile it serves in production: the projection its own\n * sandbox sends a harness (gtm-agent toExecutableAgentProfile, legal-agent slimSandboxProfile). `AGENT_BENCH_APPS`, a JSON\n * object of app name to profile URL or absolute file path, adds an app or points one at another source: a staging deployment,\n * a profile exported from a checkout, or a candidate profile an optimizer is scoring.\n */\nexport const AGENT_APPS: Readonly<Record<string, { profileUrl: string }>> = {\n 'gtm-agent': { profileUrl: 'https://gtm.tangle.tools/api/tools/profile?definition=executable' },\n 'legal-agent': { profileUrl: 'https://legal.tangle.tools/api/tools/profile?definition=executable' },\n}\n\nfunction agentApps(env: NodeJS.ProcessEnv): Record<string, { profileUrl: string }> {\n if (!env.AGENT_BENCH_APPS) return { ...AGENT_APPS }\n const extra = JSON.parse(env.AGENT_BENCH_APPS) as unknown\n if (!extra || typeof extra !== 'object' || Array.isArray(extra) || !Object.values(extra).every((url) => typeof url === 'string')) {\n throw new Error('AGENT_BENCH_APPS must be a JSON object of app name to profile URL or absolute file path')\n }\n return { ...AGENT_APPS, ...Object.fromEntries(Object.entries(extra as Record<string, string>).map(([name, profileUrl]) => [name, { profileUrl }])) }\n}\n\nexport interface PublishedRunOptions {\n /** Run this many tasks in the publisher's order (a sample, never a full official run unless asked). */\n tasks?: number\n /** Run exactly these publisher task ids. */\n taskIds?: string[]\n /** Extra arguments passed to the publisher's runner unchanged, after the ones this registry sets. */\n args?: string[]\n /** Where the publisher's result file and this run's record are written. */\n out: string\n env?: NodeJS.ProcessEnv\n /** Where publisher checkouts are cached; defaults to ~/.cache/agent-bench/published. */\n cacheDir?: string\n /**\n * Replace the publisher's judge with `bridge/<harness/model>`, a model on a subscription seat behind a CLI Bridge\n * (AGENT_BENCH_JUDGE_URL, default the profile Bridge). The run is then not official, and its record says so.\n */\n judge?: string\n /** The agent-eval RunRecord identity each task row carries; defaults: experiment `<benchmark>@<ref>`, candidate the target, split holdout. */\n record?: { experimentId?: string; candidateId?: string; splitTag?: 'search' | 'dev' | 'holdout' }\n}\n\n/** One task's score; `raw` carries the publisher's numeric per-task detail (Harvey LAB: `crit.<id>` 1|0, criteria counts). */\nexport interface PublishedTaskScore {\n id: string\n passed: boolean\n score: number\n notes?: string\n raw?: Record<string, number>\n}\n\nexport interface PublishedBenchmark {\n name: string\n repository: string\n /** The exact publisher commit; a moved tag cannot change a recorded number. */\n ref: string\n version: string\n license: string\n terms: string\n /** The judge model the publisher names, or null when the publisher's grader is deterministic. */\n judge: string | null\n /** The benchmark's runner accepts a substituted judge (`--judge`). */\n judgeSubstitutable?: boolean\n /** Why no run of this entry is official, when the publisher reports from an implementation it does not release. */\n unofficial?: string\n measured: Measured\n /** The runner writes a folder of results rather than one file. */\n resultIsFolder?: boolean\n install: string[][]\n run(endpoint: Endpoint, options: PublishedRunOptions, resultPath: string): string[]\n /** Read the publisher's result (a file or a folder) into one score per task, as the publisher's grader reported it. */\n parse(resultPath: string): Promise<PublishedTaskScore[]>\n}\n\nexport interface PublishedRun {\n benchmark: string\n version: string\n ref: string\n target: string\n model: string\n measured: Measured\n judge: string | null\n /** The judge the publisher names, kept beside a substituted one. */\n publisherJudge: string | null\n /** True when the score comes from the publisher's own grader and judge; false whenever a judge was substituted. */\n official: boolean\n /** Why the entry is never official (`PublishedBenchmark.unofficial`). */\n unofficial?: string\n app?: AppProfile\n tasks: number\n passed: number\n /** Mean task score, 0..1, as the publisher's grader reports it. */\n score: number\n taskScores: PublishedTaskScore[]\n resultPath: string\n /** One agent-eval RunRecord per task (JSON lines), for the ledgers, dashboards and promotion gates every other run feeds. */\n runRecords: string\n license: string\n terms: string\n startedAt: string\n finishedAt: string\n}\n\nexport const PUBLISHED_BENCHMARKS: Readonly<Record<string, PublishedBenchmark>> = {\n automationbench: {\n name: 'automationbench',\n repository: 'https://github.com/zapier/AutomationBench.git',\n ref: '4a8e1061254004d9dac807054eed33fad7d1ff14',\n version: '1.0.6',\n license: 'MIT (Zapier, Inc.); third-party API schemas excluded',\n terms: 'MIT: tasks and code may be redistributed with attribution',\n judge: null,\n measured: 'model-shaped',\n install: [['uv', 'sync', '--frozen']],\n run: (endpoint, options, resultPath) => [\n 'uv', 'run', 'auto-bench',\n '--model', endpoint.model, '--base-url', endpoint.baseUrl, '--api-key-var', endpoint.apiKeyVar,\n ...(options.taskIds?.length ? ['--tasks', options.taskIds.join(',')] : []),\n ...(options.tasks === undefined ? [] : ['--num-examples', String(options.tasks)]),\n '--max-concurrent', String(Math.max(1, Math.min(options.tasks ?? options.taskIds?.length ?? 4, 4))),\n '--export-json', resultPath,\n ...(options.args ?? []),\n ],\n parse: async (resultPath) => {\n const tasks = (JSON.parse(await readFile(resultPath, 'utf8')) as { tasks?: Array<{ name?: unknown; score?: unknown; passed?: unknown }> }).tasks\n if (!Array.isArray(tasks)) throw new Error('AutomationBench result has no tasks array')\n return tasks.map((task) => {\n if (typeof task.name !== 'string' || typeof task.score !== 'number' || typeof task.passed !== 'boolean') {\n throw new Error(`AutomationBench task result is malformed: ${JSON.stringify(task).slice(0, 200)}`)\n }\n return { id: task.name, passed: task.passed, score: task.score }\n })\n },\n },\n 'enterpriseops-gym': {\n name: 'enterpriseops-gym',\n repository: 'https://github.com/ServiceNow/EnterpriseOps-Gym.git',\n ref: '271f2c357f763376997dfd16807fcde2474ae41b',\n version: '271f2c3 (no release tag)',\n license: 'Apache-2.0 (ServiceNow; code and the ServiceNow-AI/EnterpriseOps-Gym dataset)',\n terms: 'Apache-2.0: tasks may be redistributed with attribution',\n judge: null,\n measured: 'model-shaped',\n resultIsFolder: true,\n install: [['uv', 'sync', '--extra', 'openai'], ['python3', '-c', \"import zipfile; zipfile.ZipFile('gym_dbs.zip').extractall('.')\"]],\n // A sample runs `--task` ids or the first --tasks of the domain (default teams, mode oracle; pass `-- --domain d --mode m`).\n run: (endpoint, options, resultPath) => [\n 'sh', fileURLToPath(new URL('../scripts/enterpriseops-gym-run.sh', import.meta.url)),\n resultPath, endpoint.baseUrl, endpoint.model, endpoint.apiKeyVar,\n options.tasks === undefined ? 'all' : String(options.tasks), (options.taskIds ?? []).join(','),\n ...(options.args ?? []),\n ],\n parse: async (resultPath) => {\n const folder = path.join(resultPath, 'run_1')\n const files = (await readdir(folder)).filter((file) => file.startsWith('results_') && file.endsWith('.json')).sort()\n if (!files.length) throw new Error(`EnterpriseOps-Gym wrote no task results under ${folder}`)\n return Promise.all(files.map(async (file) => {\n const result = JSON.parse(await readFile(path.join(folder, file), 'utf8')) as {\n statistics?: { overall_success_rate?: unknown; verifier_level_pass_rate?: unknown }; runs?: Array<{ error?: unknown }>\n }\n const success = result.statistics?.overall_success_rate\n const verifiers = result.statistics?.verifier_level_pass_rate\n if (typeof success !== 'number') throw new Error(`EnterpriseOps-Gym result ${file} has no statistics.overall_success_rate`)\n const error = result.runs?.find((run) => run.error)?.error\n return {\n id: file.slice('results_'.length, -'.json'.length).split('__').pop()!, passed: success === 1, score: success,\n notes: `verifier pass rate ${typeof verifiers === 'number' ? verifiers : 'unknown'}${error ? `; runner error: ${String(error).slice(0, 200)}` : ''}`,\n }\n }))\n },\n },\n 'harvey-lab': {\n name: 'harvey-lab',\n repository: 'https://github.com/harveyai/harvey-labs.git',\n // v1.3.0, the latest tag: v1.0 has no OpenAI-compatible chat adapter; v1.3.0 ships baseten/ (chat completions with tools).\n ref: '81d6a31b22d7c9f661cda4770cffcc12a5735dc2',\n version: 'v1.3.0',\n license: 'MIT (Harvey AI)',\n terms: 'MIT: tasks and their synthetic documents ship in the repository; no training or redistribution restriction stated',\n judge: 'claude-sonnet-4-6 + gpt-5.5 (LAB standard dual judge, all-pass per criterion)',\n judgeSubstitutable: true,\n measured: 'model-shaped',\n resultIsFolder: true,\n install: [\n ['uv', 'sync', '--all-extras'],\n // The publisher's own pinned pandoc, which its grader needs for .docx deliverables, into the checkout.\n ['sh', 'lab_core/sandbox/install_pandoc.sh', '.agent-bench'],\n ['sh', fileURLToPath(new URL('../scripts/harvey-lab-sandbox.sh', import.meta.url))],\n ],\n // A sample runs --task ids or the first --tasks in sorted task-id order (pass `-- --area <practice area>` to stay in one).\n run: (endpoint, options, resultPath) => [\n 'sh', fileURLToPath(new URL('../scripts/harvey-lab-run.sh', import.meta.url)),\n resultPath, endpoint.baseUrl, endpoint.model, endpoint.apiKeyVar,\n options.tasks === undefined ? 'all' : String(options.tasks), (options.taskIds ?? []).join(','), options.judge ?? 'publisher',\n ...(options.args ?? []),\n ],\n parse: async (resultPath) => {\n const runs = (await readFile(path.join(resultPath, 'tasks.tsv'), 'utf8')).trim().split('\\n').map((line) => line.split('\\t') as [string, string])\n return Promise.all(runs.map(async ([run, task]) => {\n const read = (file: string) => readFile(path.join(resultPath, run, file), 'utf8').then((text) => JSON.parse(text) as Record<string, unknown>, () => null)\n const dual = await read('scores_dual.json')\n if (dual) return { id: task, passed: dual.all_pass === true, score: Number(dual.dual_all_pass_rate), notes: `dual-judge criterion pass ${String(dual.dual_criterion_pass)}` }\n const single = await read('scores.json')\n if (single) {\n const criteria = Array.isArray(single.criteria_results) ? single.criteria_results as Array<{ id?: unknown; verdict?: unknown }> : []\n return { id: task, passed: single.all_pass === true, score: single.all_pass === true ? 1 : 0,\n notes: `${String(single.n_passed)} of ${String(single.n_criteria)} criteria passed${single.n_grading_errors ? `; ${String(single.n_grading_errors)} grading errors` : ''}`,\n raw: { criteria_passed: Number(single.n_passed) || 0, criteria_total: Number(single.n_criteria) || 0,\n ...Object.fromEntries(criteria.filter((c) => typeof c.id === 'string').map((c) => [`crit.${String(c.id)}`, c.verdict === 'pass' ? 1 : 0])) } }\n }\n return { id: task, passed: false, score: 0, notes: 'no scores: the harness or the grader failed (see the runner log)' }\n }))\n },\n },\n prbench: {\n name: 'prbench',\n repository: 'https://github.com/scaleapi/PRBench.git',\n ref: '7b2df0a28bf99ec51263c41b90dd510a740a7711',\n version: '7b2df0a (no release tag)',\n license: 'MIT (Scale AI); dataset ScaleAI/PRBench CC-BY-4.0',\n terms: 'CC-BY-4.0 dataset, not gated, loaded from Hugging Face at run time; attribution required, no training restriction stated',\n judge: 'openai/o4-mini (reasoning effort high), one call per rubric criterion',\n judgeSubstitutable: true,\n measured: 'model-shaped',\n resultIsFolder: true,\n // The publisher pins no dependency versions (requirements.txt), so a fresh install resolves them anew.\n install: [['uv', 'venv', '--quiet', '--python', '3.12'], ['uv', 'pip', 'install', '--quiet', '-r', 'requirements.txt']],\n // A sample runs --task ids or the first --tasks rows of the split (default legal; pass `-- --split finance`).\n run: (endpoint, options, resultPath) => [\n 'sh', fileURLToPath(new URL('../scripts/prbench-run.sh', import.meta.url)),\n resultPath, endpoint.baseUrl, endpoint.model, endpoint.apiKeyVar,\n options.tasks === undefined ? 'all' : String(options.tasks), (options.taskIds ?? []).join(','), options.judge ?? 'publisher',\n ...(options.args ?? []),\n ],\n // Per task, the publisher's clipped score: rubric points over the positive weights (negative criteria can take it below\n // zero; clamped to 0..1 here). The publisher's aggregate, mean_clipped, is max(0, mean of the unclamped scores).\n parse: async (resultPath) => {\n const folder = path.join(resultPath, 'results')\n const files = (await readdir(folder)).filter((file) => file.endsWith('.json'))\n if (files.length !== 1) throw new Error(`PRBench wrote ${files.length} result files under ${folder}, expected one`)\n const result = JSON.parse(await readFile(path.join(folder, files[0]!), 'utf8')) as { outputs?: Record<string, Record<string, { points?: unknown; weights?: unknown }>> }\n const tasks = Object.values(result.outputs ?? {})[0]\n if (!tasks) throw new Error(`PRBench result ${files[0]} has no outputs`)\n return Object.entries(tasks).map(([id, task]) => {\n const weights = Array.isArray(task.weights) ? task.weights.filter((weight): weight is number => typeof weight === 'number') : []\n const best = weights.filter((weight) => weight > 0).reduce((sum, weight) => sum + weight, 0)\n const points = typeof task.points === 'number' ? task.points : Number.NaN\n if (!best || Number.isNaN(points)) throw new Error(`PRBench task ${id} has no points or weights`)\n return { id, passed: points >= best, score: Math.min(1, Math.max(0, points / best)), notes: `${points} of ${best} rubric points` }\n })\n },\n },\n 'healthbench-professional': {\n name: 'healthbench-professional',\n repository: 'https://github.com/openai/simple-evals.git',\n ref: '652c89d0ca9df547706735883097e9537d40dc47',\n version: '652c89d (no release tag), data openai/healthbench-professional@349962fd',\n license: 'MIT (OpenAI simple-evals); dataset openai/healthbench-professional MIT',\n terms: 'MIT dataset, not gated, fetched from Hugging Face at the pinned revision at run time and never committed: the authors ask that examples not be revealed in plain text or images online. No training restriction stated.',\n judge: 'gpt-5.4-2026-03-05 (reasoning effort low), one call per rubric item; length-adjusted (center 2000 characters, 1.47 points per 500)',\n judgeSubstitutable: true,\n unofficial: 'OpenAI reports HealthBench Professional from an internal implementation it does not release; simple-evals with its Professional settings is the reference implementation',\n measured: 'model-shaped',\n resultIsFolder: true,\n // The publisher pins no dependency versions and ships no requirements file; these are the imports HealthBenchEval needs.\n install: [['uv', 'venv', '--quiet', '--python', '3.12'], ['uv', 'pip', 'install', '--quiet', 'openai', 'blobfile', 'numpy', 'pandas', 'jinja2', 'requests', 'tqdm']],\n // A sample runs the publisher's seeded sample of --tasks examples, or the --task ids.\n run: (endpoint, options, resultPath) => [\n 'sh', fileURLToPath(new URL('../scripts/healthbench-professional-run.sh', import.meta.url)),\n resultPath, endpoint.baseUrl, endpoint.model, endpoint.apiKeyVar,\n options.tasks === undefined ? 'all' : String(options.tasks), (options.taskIds ?? []).join(','), options.judge ?? 'publisher',\n ...(options.args ?? []),\n ],\n // Per task, the publisher's length-adjusted rubric score, clamped to 0..1 (the publisher clips the mean, not each task).\n // Passed: every positive criterion met and no negative one.\n parse: async (resultPath) => {\n const result = JSON.parse(await readFile(path.join(resultPath, 'result.json'), 'utf8')) as {\n examples?: Array<{ prompt_id: string; overall_score: number; length_adjusted: number; response_chars: number; positive_met: number; positive_total: number; negative_met: number }>\n }\n if (!result.examples?.length) throw new Error(`HealthBench Professional wrote no examples under ${resultPath}`)\n return result.examples.map((example) => ({\n id: example.prompt_id,\n passed: example.positive_met === example.positive_total && example.negative_met === 0,\n score: Math.min(1, Math.max(0, example.length_adjusted)),\n notes: `${example.positive_met} of ${example.positive_total} positive criteria met, ${example.negative_met} negative met; rubric score ${example.overall_score.toFixed(3)}, length-adjusted for ${example.response_chars} characters`,\n raw: {\n overall_score: example.overall_score, length_adjusted: example.length_adjusted, response_chars: example.response_chars,\n positive_met: example.positive_met, positive_total: example.positive_total, negative_met: example.negative_met,\n },\n }))\n },\n },\n mlcr: {\n name: 'mlcr',\n repository: 'https://github.com/Wisedocs-AI/medical-long-context-reasoning.git',\n ref: 'ca822de2d274184bb0cd5bf280ff917922f3716f',\n version: 'v1.1 (ca822de, the release commit; no tag), data Wisedocs/mlcr-dataset@1198206e',\n license: 'none: neither the code nor the Wisedocs/mlcr-dataset release carries a license (the dataset card says \"other\")',\n terms: 'No license: run locally for evaluation only, never committed, redistributed, or used for training or prompt optimization. The dataset is not gated and is fetched from Hugging Face at the pinned revision at run time.',\n // A substituted judge sits all three jury seats, each sampling independently, so the publisher's two-of-three rule applies.\n judge: \"jury of gemini-3.1-pro-preview, claude-opus-4-8-gcp and gpt-5.5 (majority vote, medium thinking) on the publisher's Vertex, Anthropic-on-GCP and Azure OpenAI providers, after a conciseness gate\",\n judgeSubstitutable: true,\n measured: 'model-shaped',\n resultIsFolder: true,\n install: [['uv', 'venv', '--quiet', '--python', '3.12'], ['uv', 'pip', 'install', '--quiet', '-e', '.[all]']],\n // A sample is the runner's first --tasks rows of the publisher's smoke experiment; MLCR names rows by matrix cell, not id.\n run: (endpoint, options, resultPath) => [\n 'sh', fileURLToPath(new URL('../scripts/mlcr-run.sh', import.meta.url)),\n resultPath, endpoint.baseUrl, endpoint.model, endpoint.apiKeyVar,\n options.tasks === undefined ? 'all' : String(options.tasks), (options.taskIds ?? []).join(','), options.judge ?? 'publisher',\n ...(options.args ?? []),\n ],\n // Per row, the jury's verdict: correct (complete and accurate by majority) after the conciseness gate.\n parse: async (resultPath) => {\n const result = JSON.parse(await readFile(path.join(resultPath, 'result.json'), 'utf8')) as {\n examples?: Array<{ id: string; concise: string; complete: string; accurate: string; correct: string; judge_error: boolean; response_chars: number }>\n }\n if (!result.examples?.length) throw new Error(`MLCR wrote no scored rows under ${resultPath}`)\n const verdict = (value: string) => (value === '' ? undefined : Number(value))\n return result.examples.map((example) => {\n if (example.correct === '') throw new Error(`MLCR row ${example.id} has no jury verdict${example.judge_error ? ' (the judge failed)' : ''}`)\n const raw = Object.fromEntries(Object.entries({ concise: verdict(example.concise), complete: verdict(example.complete), accurate: verdict(example.accurate), correct: verdict(example.correct) })\n .filter((entry): entry is [string, number] => entry[1] !== undefined))\n return {\n id: example.id, passed: example.correct === '1', score: example.correct === '1' ? 1 : 0,\n notes: `concise ${example.concise || '-'}, complete ${example.complete || '-'}, accurate ${example.accurate || '-'}; ${example.response_chars} characters`,\n raw: { ...raw, response_chars: example.response_chars },\n }\n })\n },\n },\n}\n\n/** Resolve a `model:`, `app:` or `profile:` target to the endpoint a publisher's runner calls. */\nexport async function resolveEndpoint(target: string, benchmark: PublishedBenchmark, env: NodeJS.ProcessEnv = process.env): Promise<Endpoint> {\n const match = /^(model|app|profile):(.+)$/.exec(target)\n if (!match) throw new Error(`target must be model:<router model>, app:<agent app>@<harness/model> or profile:<harness/model>, not '${target}'`)\n const [, kind, id] = match as unknown as [string, 'model' | 'app' | 'profile', string]\n if (kind === 'model') {\n return { target, model: id, baseUrl: env.AGENT_BENCH_ROUTER_URL ?? 'https://router.tangle.tools/v1', apiKeyVar: 'TANGLE_API_KEY', measured: benchmark.measured }\n }\n // A loopback Bridge without a bearer accepts any key; the runner still needs one to send.\n const bridge = env.AGENT_BENCH_BRIDGE_URL ?? 'http://127.0.0.1:3344/v1'\n if (kind === 'profile') return { target, model: id, baseUrl: bridge, apiKeyVar: 'AGENT_BENCH_BRIDGE_KEY', measured: 'own-loop' }\n const at = id.indexOf('@')\n const [name, harness] = at === -1 ? [id, ''] : [id.slice(0, at), id.slice(at + 1)]\n const apps = agentApps(env)\n const app = apps[name]\n if (!app) throw new Error(`no agent app '${name}'; registered: ${Object.keys(apps).join(', ')} (add one with AGENT_BENCH_APPS)`)\n if (!harness) throw new Error(`app:${name} needs @<harness/model>, the subscription harness that runs the app's profile, e.g. app:${name}@opencode/zai-coding-plan/glm-5.3`)\n const catalog = env.AGENT_BENCH_BRIDGE_PROFILES_DIR\n if (!catalog) throw new Error(`AGENT_BENCH_BRIDGE_PROFILES_DIR is not set: point it at the CLI Bridge's SANDBOX_PROFILES_DIR, where app:${name} writes its profile`)\n const { mcp, model, ...profile } = await readAppProfile(name, app.profileUrl)\n const text = JSON.stringify(profile)\n const digest = createHash('sha256').update(text).digest('hex')\n // Content-addressed: the Bridge rereads its catalog only for an id it does not know.\n const profileId = `${name}-${digest.slice(0, 12)}`\n await mkdir(catalog, { recursive: true })\n await writeFile(path.join(catalog, `${profileId}.json`), text)\n return {\n target, model: harness, baseUrl: `${bridge.replace(/\\/v1\\/?$/, '')}/profiles/${profileId}/v1`, apiKeyVar: 'AGENT_BENCH_BRIDGE_KEY', measured: 'own-loop',\n app: {\n app: name, profileUrl: app.profileUrl, profileDigest: `sha256:${digest}`, productionModel: model ?? null,\n profileName: typeof profile.name === 'string' ? profile.name : null, profileVersion: typeof profile.version === 'string' ? profile.version : null,\n omittedMcp: mcp && typeof mcp === 'object' ? Object.keys(mcp) : [],\n },\n }\n}\n\n/** An app's profile from its URL, or from an absolute file path. */\nasync function readAppProfile(name: string, source: string): Promise<Record<string, unknown>> {\n if (path.isAbsolute(source)) return JSON.parse(await readFile(source, 'utf8')) as Record<string, unknown>\n const response = await fetch(source)\n if (!response.ok) throw new Error(`${source} answered ${response.status}; app:${name} needs the profile the app serves`)\n return await response.json() as Record<string, unknown>\n}\n\n/** Run one published benchmark against one target with the publisher's runner and grader, and record the result. */\nexport async function runPublished(name: string, target: string, options: PublishedRunOptions): Promise<PublishedRun> {\n const benchmark = PUBLISHED_BENCHMARKS[name]\n if (!benchmark) throw new Error(`no published benchmark '${name}'; registered: ${Object.keys(PUBLISHED_BENCHMARKS).join(', ')}`)\n const env = { ...process.env, ...options.env }\n if (options.judge !== undefined && !benchmark.judgeSubstitutable) {\n throw new Error(`${benchmark.name} grades ${benchmark.judge === null ? 'deterministically' : `with ${benchmark.judge}`}; this registry cannot substitute its judge`)\n }\n if (options.judge !== undefined && !options.judge.startsWith('bridge/')) throw new Error(`--judge must be bridge/<harness/model>, not '${options.judge}'`)\n env.AGENT_BENCH_JUDGE_URL ??= env.AGENT_BENCH_BRIDGE_URL ?? 'http://127.0.0.1:3344/v1'\n const endpoint = await resolveEndpoint(target, benchmark, env)\n if (!env[endpoint.apiKeyVar]) throw new Error(`${endpoint.apiKeyVar} is not set; the ${target} endpoint needs it`)\n const checkout = await publisherCheckout(benchmark, options.cacheDir, env)\n await mkdir(options.out, { recursive: true })\n const resultPath = path.resolve(options.out, `${benchmark.name}-result${benchmark.resultIsFolder ? '' : '.json'}`)\n const startedAt = new Date().toISOString()\n const [command, ...args] = benchmark.run(endpoint, options, resultPath)\n await execute(command!, args, checkout, env)\n const taskScores = await benchmark.parse(resultPath)\n const run: PublishedRun = {\n benchmark: benchmark.name, version: benchmark.version, ref: benchmark.ref, target, model: endpoint.model,\n measured: endpoint.measured, judge: options.judge ?? benchmark.judge, publisherJudge: benchmark.judge,\n official: options.judge === undefined && benchmark.unofficial === undefined,\n ...(benchmark.unofficial ? { unofficial: benchmark.unofficial } : {}),\n ...(endpoint.app ? { app: endpoint.app } : {}),\n tasks: taskScores.length, passed: taskScores.filter((task) => task.passed).length,\n score: taskScores.length ? taskScores.reduce((sum, task) => sum + task.score, 0) / taskScores.length : 0,\n taskScores, resultPath, runRecords: path.resolve(options.out, `${benchmark.name}-runrecords.jsonl`),\n license: benchmark.license, terms: benchmark.terms, startedAt, finishedAt: new Date().toISOString(),\n }\n await writeFile(run.runRecords, runRecords(run, options).map((record) => JSON.stringify(record)).join('\\n') + '\\n')\n await writeFile(path.resolve(options.out, `${benchmark.name}-run.json`), `${JSON.stringify(run, null, 2)}\\n`)\n return run\n}\n\n/**\n * One agent-eval RunRecord per task, validated by agent-eval's own validator. The publisher's runner makes the model calls,\n * so cost and tokens are uncaptured, never zero. A RunRecord's model must name a served snapshot; a subscription harness\n * reports none, and a snapshot invented from the date would be false, so such rows record `unknown` with terminal outcome\n * `unknown` and keep the requested model in `candidateId`. A pinned model id (a Router snapshot) is recorded as served.\n */\nfunction runRecords(run: PublishedRun, options: PublishedRunOptions): RunRecord[] {\n const split = options.record?.splitTag ?? 'holdout'\n const sha = (value: string) => `sha256:${createHash('sha256').update(value).digest('hex')}`\n const configHash = sha(canonicalJson({ benchmark: run.benchmark, ref: run.ref, target: run.target, judge: run.judge, args: options.args ?? [] }))\n return run.taskScores.map((task) => {\n const row = {\n runId: randomUUID(), experimentId: options.record?.experimentId ?? `${run.benchmark}@${run.ref}`,\n candidateId: options.record?.candidateId ?? run.target, seed: 0, model: run.model,\n // The publisher owns the prompt; an app run's prompt is its profile.\n promptHash: run.app?.profileDigest ?? sha(run.target), configHash, commitSha: run.ref,\n wallMs: Math.max(0, Date.parse(run.finishedAt) - Date.parse(run.startedAt)),\n costUsd: null, costProvenance: { kind: 'uncaptured', usd: null }, tokenUsage: { input: 0, output: 0, tokensKnown: false },\n terminalOutcome: 'succeeded',\n outcome: { [split === 'holdout' ? 'holdoutScore' : 'searchScore']: task.score, raw: { passed: task.passed ? 1 : 0, ...task.raw } },\n splitTag: split, scenarioId: `${run.benchmark}:${task.id}`,\n }\n try {\n return validateRunRecord(row)\n } catch (error) {\n if (!(error instanceof RunRecordValidationError) || error.path !== 'model') throw error\n return validateRunRecord({ ...row, model: UNKNOWN_MODEL, terminalOutcome: 'unknown' })\n }\n })\n}\n\n/** The publisher's repository at the pinned commit, installed once per cache. */\nasync function publisherCheckout(benchmark: PublishedBenchmark, cacheDir: string | undefined, env: NodeJS.ProcessEnv): Promise<string> {\n const root = cacheDir ?? path.join(homedir(), '.cache', 'agent-bench', 'published')\n const dir = path.join(root, `${benchmark.name}@${benchmark.ref}`)\n const installed = path.join(dir, '.agent-bench-installed')\n if (existsSync(installed)) return dir\n if (!existsSync(path.join(dir, '.git'))) {\n await mkdir(root, { recursive: true })\n await execute('git', ['clone', '--quiet', '--filter=blob:none', '--no-checkout', benchmark.repository, dir], root, env)\n }\n await execute('git', ['checkout', '--quiet', '--detach', benchmark.ref], dir, env)\n for (const [command, ...args] of benchmark.install) await execute(command!, args, dir, env)\n await writeFile(installed, `${benchmark.ref}\\n`)\n return dir\n}\n\nfunction execute(command: string, args: string[], cwd: string, env: NodeJS.ProcessEnv): Promise<void> {\n return new Promise((resolve, reject) => {\n const child = spawn(command, args, { cwd, env, stdio: 'inherit' })\n child.once('error', (error) => reject(new Error(`${command} could not start in ${cwd}: ${error.message}`)))\n child.once('exit', (code, signal) => code === 0\n ? resolve()\n : reject(new Error(`${command} ${args.slice(0, 3).join(' ')} exited ${signal ?? code} in ${cwd}`)))\n })\n}\n","#!/usr/bin/env node\n/**\n * agent-bench run <benchmark> --target <model:|app:|profile:> [--tasks N] [--task <publisher task id>]... [--out <dir>] [-- <runner args>]\n * agent-bench list\n *\n * Runs a published benchmark with its publisher's own runner and grader (src/published.ts), prints the score with what it\n * measured, and writes the run record to --out (default ./agent-bench-runs/<benchmark>-<time>).\n */\nimport path from 'node:path'\nimport { PUBLISHED_BENCHMARKS, runPublished } from './published'\n\nconst usage = 'usage: agent-bench run <benchmark> --target <model:<router model>|app:<agent app>@<harness/model>|profile:<harness/model>> [--tasks N] [--task <id>]... [--judge bridge/<harness/model>] [--experiment <id>] [--candidate <id>] [--split search|dev|holdout] [--out <dir>] [-- <runner args>]\\n agent-bench list'\n\nasync function main(argv: string[]): Promise<number> {\n const [command, ...rest] = argv\n if (command === 'list') {\n for (const benchmark of Object.values(PUBLISHED_BENCHMARKS)) {\n console.log(`${benchmark.name} ${benchmark.version} ${benchmark.repository}@${benchmark.ref.slice(0, 12)} ${benchmark.measured} judge=${benchmark.judge ?? 'deterministic'} license=${benchmark.license}`)\n }\n return 0\n }\n if (command !== 'run' || !rest[0] || rest[0].startsWith('-')) {\n console.error(usage)\n return 2\n }\n const name = rest[0]\n const separator = rest.indexOf('--')\n const own = separator === -1 ? rest.slice(1) : rest.slice(1, separator)\n const runnerArgs = separator === -1 ? [] : rest.slice(separator + 1)\n let target: string | undefined\n let tasks: number | undefined\n const taskIds: string[] = []\n let out: string | undefined\n let judge: string | undefined\n const record: { experimentId?: string; candidateId?: string; splitTag?: 'search' | 'dev' | 'holdout' } = {}\n for (let i = 0; i < own.length; i++) {\n const flag = own[i]\n const value = own[i + 1]\n if (value === undefined) throw new Error(`${flag} needs a value\\n${usage}`)\n if (flag === '--target') target = value\n else if (flag === '--tasks') tasks = Number.parseInt(value, 10)\n else if (flag === '--task') taskIds.push(value)\n else if (flag === '--out') out = value\n else if (flag === '--judge') judge = value\n else if (flag === '--experiment') record.experimentId = value\n else if (flag === '--candidate') record.candidateId = value\n else if (flag === '--split') record.splitTag = value as 'search' | 'dev' | 'holdout'\n else throw new Error(`unknown option ${flag}\\n${usage}`)\n i++\n }\n if (!target) throw new Error(`--target is required\\n${usage}`)\n if (tasks !== undefined && !(Number.isSafeInteger(tasks) && tasks > 0)) throw new Error('--tasks must be a positive integer')\n const run = await runPublished(name, target, {\n ...(tasks === undefined ? {} : { tasks }),\n ...(taskIds.length ? { taskIds } : {}),\n ...(judge === undefined ? {} : { judge }),\n ...(Object.keys(record).length ? { record } : {}),\n args: runnerArgs,\n out: path.resolve(out ?? path.join('agent-bench-runs', `${name}-${new Date().toISOString().replace(/[:.]/g, '-')}`)),\n })\n console.log(`${run.benchmark} ${run.version} on ${run.target}: ${run.passed} of ${run.tasks} passed, score ${run.score.toFixed(3)}, measured ${run.measured}, judge ${run.judge === null ? 'deterministic' : run.judge} (${run.official ? 'official' : `${[run.judge !== run.publisherJudge ? `substituted for ${run.publisherJudge}` : undefined, run.unofficial].filter(Boolean).join('; ')}, not official`})`)\n if (run.app) {\n console.log(`app: ${run.app.app} profile ${run.app.profileName ?? '?'} ${run.app.profileVersion ?? ''} ${run.app.profileDigest.slice(0, 19)} from ${run.app.profileUrl}; ` +\n `its production model ${JSON.stringify(run.app.productionModel)} replaced by ${run.model}; its MCP servers not mounted: ${run.app.omittedMcp.join(', ') || 'none'}`)\n }\n console.log(`record: ${path.join(path.dirname(run.resultPath), `${run.benchmark}-run.json`)}`)\n console.log(`run records: ${run.runRecords}`)\n return 0\n}\n\nmain(process.argv.slice(2)).then((code) => process.exit(code), (error: unknown) => {\n console.error(error instanceof Error ? error.message : String(error))\n process.exit(1)\n})\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA+DA,MAAa,aAA+D;CAC1E,aAAa,EAAE,YAAY,mEAAmE;CAC9F,eAAe,EAAE,YAAY,qEAAqE;AACpG;AAEA,SAAS,UAAU,KAAgE;CACjF,IAAI,CAAC,IAAI,kBAAkB,OAAO,EAAE,GAAG,WAAW;CAClD,MAAM,QAAQ,KAAK,MAAM,IAAI,gBAAgB;CAC7C,IAAI,CAAC,SAAS,OAAO,UAAU,YAAY,MAAM,QAAQ,KAAK,KAAK,CAAC,OAAO,OAAO,KAAK,CAAC,CAAC,OAAO,QAAQ,OAAO,QAAQ,QAAQ,GAC7H,MAAM,IAAI,MAAM,yFAAyF;CAE3G,OAAO;EAAE,GAAG;EAAY,GAAG,OAAO,YAAY,OAAO,QAAQ,KAA+B,CAAC,CAAC,KAAK,CAAC,MAAM,gBAAgB,CAAC,MAAM,EAAE,WAAW,CAAC,CAAC,CAAC;CAAE;AACrJ;AAoFA,MAAa,uBAAqE;CAChF,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,mBAAmB,KAAA,GAAW,IAAI,UAAU,CAAC,CAAC,OAAO,OAAO,CAAC,CAAC,KAAK,IAAI,EAAE,gBAAgB,EAAE;CAChZ,IAAI,IAAI,KACN,QAAQ,IAAI,QAAQ,IAAI,IAAI,IAAI,WAAW,IAAI,IAAI,eAAe,IAAI,GAAG,IAAI,IAAI,kBAAkB,GAAG,GAAG,IAAI,IAAI,cAAc,MAAM,GAAG,EAAE,EAAE,QAAQ,IAAI,IAAI,WAAW,yBAC7I,KAAK,UAAU,IAAI,IAAI,eAAe,EAAE,eAAe,IAAI,MAAM,iCAAiC,IAAI,IAAI,WAAW,KAAK,IAAI,KAAK,QAAQ;CAEvK,QAAQ,IAAI,WAAW,KAAK,KAAK,KAAK,QAAQ,IAAI,UAAU,GAAG,GAAG,IAAI,UAAU,UAAU,GAAG;CAC7F,QAAQ,IAAI,gBAAgB,IAAI,YAAY;CAC5C,OAAO;AACT;AAEA,KAAK,QAAQ,KAAK,MAAM,CAAC,CAAC,CAAC,CAAC,MAAM,SAAS,QAAQ,KAAK,IAAI,IAAI,UAAmB;CACjF,QAAQ,MAAM,iBAAiB,QAAQ,MAAM,UAAU,OAAO,KAAK,CAAC;CACpE,QAAQ,KAAK,CAAC;AAChB,CAAC"}
|
|
1
|
+
{"version":3,"file":"cli.js","names":[],"sources":["../src/published.ts","../src/cli.ts"],"sourcesContent":["/**\n * Published benchmarks, run by their publishers' own runners, unmodified, at a pinned commit.\n *\n * One registry entry per benchmark: the publisher's repository and commit, its install and run commands, a parser from the\n * publisher's result file to per-task scores (agent-eval's verdict names: `passed`, `score`, `notes`), the license, the data terms, and the judge the publisher names. Nothing here loads\n * tasks, drives an agent loop, or grades: the publisher's runner does all three. A target becomes the OpenAI-compatible\n * endpoint that runner calls:\n *\n * model:<router model> the Tangle Router with `TANGLE_API_KEY`; the target is a model driving the benchmark's tools.\n * profile:<harness/model> a CLI Bridge (`AGENT_BENCH_BRIDGE_URL`, default http://127.0.0.1:3344/v1) running that harness with\n * its own loop and tools; the benchmark's tools reach it as caller-executed MCP tools (cli-bridge#397).\n * app:<agent app>@<harness/model>\n * the AgentProfile the app serves in production (prompt, skills, subagents, resources), run by\n * that subscription harness through the same CLI Bridge at `/profiles/<id>/v1` (cli-bridge#408).\n * The app's production model and its own MCP servers are not part of it; the run record names both.\n *\n * Every run says what it measured: `model-shaped` (the target as a model calling the benchmark's tools, which the\n * benchmark executes) or `own-loop` (the agent with its own loop and tools). The two are never compared as one.\n */\nimport { spawn } from 'node:child_process'\nimport { createHash, randomUUID } from 'node:crypto'\nimport { existsSync } from 'node:fs'\nimport { mkdir, readdir, readFile, writeFile } from 'node:fs/promises'\nimport { homedir } from 'node:os'\nimport path from 'node:path'\nimport { fileURLToPath } from 'node:url'\nimport { canonicalJson, RunRecordValidationError, UNKNOWN_MODEL, validateRunRecord, type RunRecord } from '@tangle-network/agent-eval'\n\nexport type Measured = 'model-shaped' | 'own-loop'\n\n/** The OpenAI-compatible endpoint a publisher's runner calls for one target. */\nexport interface Endpoint {\n target: string\n baseUrl: string\n model: string\n /** The environment variable that holds the endpoint's key; the runner reads it, nothing here prints it. */\n apiKeyVar: string\n /** What a run through this endpoint measures. */\n measured: Measured\n /** For an app target: which served profile ran, and what of the app it leaves out. */\n app?: AppProfile\n}\n\n/** An agent app's served AgentProfile as an app target runs it. */\nexport interface AppProfile {\n app: string\n profileUrl: string\n profileName: string | null\n profileVersion: string | null\n /** sha256 of the profile as run (served profile without `model` and `mcp`). */\n profileDigest: string\n /** The model the app runs in production, replaced by the target's harness model. */\n productionModel: unknown\n /** The app's own MCP servers, which need the app's deployment and are not mounted. */\n omittedMcp: string[]\n}\n\n/**\n * Agent apps a benchmark can target, each by the executable AgentProfile it serves in production: the projection its own\n * sandbox sends a harness (gtm-agent toExecutableAgentProfile, legal-agent slimSandboxProfile). `AGENT_BENCH_APPS`, a JSON\n * object of app name to profile URL or absolute file path, adds an app or points one at another source: a staging deployment,\n * a profile exported from a checkout, or a candidate profile an optimizer is scoring.\n */\nexport const AGENT_APPS: Readonly<Record<string, { profileUrl: string }>> = {\n 'gtm-agent': { profileUrl: 'https://gtm.tangle.tools/api/tools/profile?definition=executable' },\n 'legal-agent': { profileUrl: 'https://legal.tangle.tools/api/tools/profile?definition=executable' },\n}\n\nfunction agentApps(env: NodeJS.ProcessEnv): Record<string, { profileUrl: string }> {\n if (!env.AGENT_BENCH_APPS) return { ...AGENT_APPS }\n const extra = JSON.parse(env.AGENT_BENCH_APPS) as unknown\n if (!extra || typeof extra !== 'object' || Array.isArray(extra) || !Object.values(extra).every((url) => typeof url === 'string')) {\n throw new Error('AGENT_BENCH_APPS must be a JSON object of app name to profile URL or absolute file path')\n }\n return { ...AGENT_APPS, ...Object.fromEntries(Object.entries(extra as Record<string, string>).map(([name, profileUrl]) => [name, { profileUrl }])) }\n}\n\nexport interface PublishedRunOptions {\n /** Run this many tasks in the publisher's order (a sample, never a full official run unless asked). */\n tasks?: number\n /** Run exactly these publisher task ids. */\n taskIds?: string[]\n /** Extra arguments passed to the publisher's runner unchanged, after the ones this registry sets. */\n args?: string[]\n /** Where the publisher's result file and this run's record are written. */\n out: string\n env?: NodeJS.ProcessEnv\n /** Where publisher checkouts are cached; defaults to ~/.cache/agent-bench/published. */\n cacheDir?: string\n /**\n * Replace the publisher's judge with `bridge/<harness/model>`, a model on a subscription seat behind a CLI Bridge\n * (AGENT_BENCH_JUDGE_URL, default the profile Bridge). The run is then not official, and its record says so.\n */\n judge?: string\n /** The agent-eval RunRecord identity each task row carries; defaults: experiment `<benchmark>@<ref>`, candidate the target, split holdout. */\n record?: { experimentId?: string; candidateId?: string; splitTag?: 'search' | 'dev' | 'holdout' }\n}\n\n/** One task's score; `raw` carries the publisher's numeric per-task detail (Harvey LAB: `crit.<id>` 1|0, criteria counts). */\nexport interface PublishedTaskScore {\n id: string\n passed: boolean\n score: number\n notes?: string\n raw?: Record<string, number>\n /** Observed provider counters retained by the publisher. A subtotal keeps tokensKnown false. */\n tokenUsage?: RunRecord['tokenUsage']\n}\n\nfunction nonnegativeCounter(value: unknown): number | undefined {\n return typeof value === 'number' && Number.isSafeInteger(value) && value >= 0\n ? value\n : undefined\n}\n\nfunction nonnegativeMeasurement(value: unknown): number | undefined {\n return typeof value === 'number' && Number.isFinite(value) && value >= 0 ? value : undefined\n}\n\nexport interface PublishedBenchmark {\n name: string\n repository: string\n /** The exact publisher commit; a moved tag cannot change a recorded number. */\n ref: string\n version: string\n license: string\n terms: string\n /** The judge model the publisher names, or null when the publisher's grader is deterministic. */\n judge: string | null\n /** The benchmark's runner accepts a substituted judge (`--judge`). */\n judgeSubstitutable?: boolean\n /** Why no run of this entry is official, when the publisher reports from an implementation it does not release. */\n unofficial?: string\n measured: Measured\n /** The runner writes a folder of results rather than one file. */\n resultIsFolder?: boolean\n install: string[][]\n run(endpoint: Endpoint, options: PublishedRunOptions, resultPath: string): string[]\n /** Read the publisher's result (a file or a folder) into one score per task, as the publisher's grader reported it. */\n parse(resultPath: string): Promise<PublishedTaskScore[]>\n}\n\nexport interface PublishedRun {\n benchmark: string\n version: string\n ref: string\n target: string\n model: string\n measured: Measured\n judge: string | null\n /** The judge the publisher names, kept beside a substituted one. */\n publisherJudge: string | null\n /** True when the score comes from the publisher's own grader and judge; false whenever a judge was substituted. */\n official: boolean\n /** Why the entry is never official (`PublishedBenchmark.unofficial`). */\n unofficial?: string\n app?: AppProfile\n tasks: number\n passed: number\n /** Mean task score, 0..1, as the publisher's grader reports it. */\n score: number\n taskScores: PublishedTaskScore[]\n resultPath: string\n /** One agent-eval RunRecord per task (JSON lines), for the ledgers, dashboards and promotion gates every other run feeds. */\n runRecords: string\n license: string\n terms: string\n startedAt: string\n finishedAt: string\n}\n\nexport const PUBLISHED_BENCHMARKS: Readonly<Record<string, PublishedBenchmark>> = {\n automationbench: {\n name: 'automationbench',\n repository: 'https://github.com/zapier/AutomationBench.git',\n ref: '4a8e1061254004d9dac807054eed33fad7d1ff14',\n version: '1.0.6',\n license: 'MIT (Zapier, Inc.); third-party API schemas excluded',\n terms: 'MIT: tasks and code may be redistributed with attribution',\n judge: null,\n measured: 'model-shaped',\n install: [['uv', 'sync', '--frozen']],\n run: (endpoint, options, resultPath) => [\n 'uv', 'run', 'auto-bench',\n '--model', endpoint.model, '--base-url', endpoint.baseUrl, '--api-key-var', endpoint.apiKeyVar,\n ...(options.taskIds?.length ? ['--tasks', options.taskIds.join(',')] : []),\n ...(options.tasks === undefined ? [] : ['--num-examples', String(options.tasks)]),\n '--max-concurrent', String(Math.max(1, Math.min(options.tasks ?? options.taskIds?.length ?? 4, 4))),\n '--export-json', resultPath,\n ...(options.args ?? []),\n ],\n parse: async (resultPath) => {\n const tasks = (JSON.parse(await readFile(resultPath, 'utf8')) as { tasks?: Array<Record<string, unknown>> }).tasks\n if (!Array.isArray(tasks)) throw new Error('AutomationBench result has no tasks array')\n return tasks.map((task) => {\n if (typeof task.name !== 'string' || typeof task.score !== 'number' || typeof task.passed !== 'boolean') {\n throw new Error(`AutomationBench task result is malformed: ${JSON.stringify(task).slice(0, 200)}`)\n }\n // This export can fall back to counting text characters. Its pricing is also calculated by\n // the publisher. Keep these fields with the score without attesting provider usage or billing.\n const raw: Record<string, number> = {}\n const counters = {\n publisherInputTokens: task.input_tokens,\n publisherOutputTokens: task.output_tokens,\n publisherCachedInputTokens: task.cached_input_tokens,\n publisherReasoningTokens: task.reasoning_tokens,\n publisherModelCalls: task.num_model_calls,\n }\n for (const [key, counter] of Object.entries(counters)) {\n const value = nonnegativeCounter(counter)\n if (value !== undefined) raw[key] = value\n }\n const estimate = nonnegativeMeasurement(task.cost)\n if (estimate !== undefined) raw.publisherEstimatedCostUsd = estimate\n return {\n id: task.name, passed: task.passed, score: task.score,\n ...(Object.keys(raw).length && { raw }),\n }\n })\n },\n },\n 'enterpriseops-gym': {\n name: 'enterpriseops-gym',\n repository: 'https://github.com/ServiceNow/EnterpriseOps-Gym.git',\n ref: '271f2c357f763376997dfd16807fcde2474ae41b',\n version: '271f2c3 (no release tag)',\n license: 'Apache-2.0 (ServiceNow; code and the ServiceNow-AI/EnterpriseOps-Gym dataset)',\n terms: 'Apache-2.0: tasks may be redistributed with attribution',\n judge: null,\n measured: 'model-shaped',\n resultIsFolder: true,\n install: [['uv', 'sync', '--extra', 'openai'], ['python3', '-c', \"import zipfile; zipfile.ZipFile('gym_dbs.zip').extractall('.')\"]],\n // A sample runs `--task` ids or the first --tasks of the domain (default teams, mode oracle; pass `-- --domain d --mode m`).\n run: (endpoint, options, resultPath) => [\n 'sh', fileURLToPath(new URL('../scripts/enterpriseops-gym-run.sh', import.meta.url)),\n resultPath, endpoint.baseUrl, endpoint.model, endpoint.apiKeyVar,\n options.tasks === undefined ? 'all' : String(options.tasks), (options.taskIds ?? []).join(','),\n ...(options.args ?? []),\n ],\n parse: async (resultPath) => {\n const folder = path.join(resultPath, 'run_1')\n const files = (await readdir(folder)).filter((file) => file.startsWith('results_') && file.endsWith('.json')).sort()\n if (!files.length) throw new Error(`EnterpriseOps-Gym wrote no task results under ${folder}`)\n return Promise.all(files.map(async (file) => {\n const result = JSON.parse(await readFile(path.join(folder, file), 'utf8')) as {\n statistics?: { overall_success_rate?: unknown; verifier_level_pass_rate?: unknown }; runs?: Array<{ error?: unknown }>\n }\n const success = result.statistics?.overall_success_rate\n const verifiers = result.statistics?.verifier_level_pass_rate\n if (typeof success !== 'number') throw new Error(`EnterpriseOps-Gym result ${file} has no statistics.overall_success_rate`)\n const error = result.runs?.find((run) => run.error)?.error\n return {\n id: file.slice('results_'.length, -'.json'.length).split('__').pop()!, passed: success === 1, score: success,\n notes: `verifier pass rate ${typeof verifiers === 'number' ? verifiers : 'unknown'}${error ? `; runner error: ${String(error).slice(0, 200)}` : ''}`,\n }\n }))\n },\n },\n 'harvey-lab': {\n name: 'harvey-lab',\n repository: 'https://github.com/harveyai/harvey-labs.git',\n // v1.3.0, the latest tag: v1.0 has no OpenAI-compatible chat adapter; v1.3.0 ships baseten/ (chat completions with tools).\n ref: '81d6a31b22d7c9f661cda4770cffcc12a5735dc2',\n version: 'v1.3.0',\n license: 'MIT (Harvey AI)',\n terms: 'MIT: tasks and their synthetic documents ship in the repository; no training or redistribution restriction stated',\n judge: 'claude-sonnet-4-6 + gpt-5.5 (LAB standard dual judge, all-pass per criterion)',\n judgeSubstitutable: true,\n measured: 'model-shaped',\n resultIsFolder: true,\n install: [\n ['uv', 'sync', '--all-extras'],\n // The publisher's own pinned pandoc, which its grader needs for .docx deliverables, into the checkout.\n ['sh', 'lab_core/sandbox/install_pandoc.sh', '.agent-bench'],\n ['sh', fileURLToPath(new URL('../scripts/harvey-lab-sandbox.sh', import.meta.url))],\n ],\n // A sample runs --task ids or the first --tasks in sorted task-id order (pass `-- --area <practice area>` to stay in one).\n run: (endpoint, options, resultPath) => [\n 'sh', fileURLToPath(new URL('../scripts/harvey-lab-run.sh', import.meta.url)),\n resultPath, endpoint.baseUrl, endpoint.model, endpoint.apiKeyVar,\n options.tasks === undefined ? 'all' : String(options.tasks), (options.taskIds ?? []).join(','), options.judge ?? 'publisher',\n ...(options.args ?? []),\n ],\n parse: async (resultPath) => {\n const runs = (await readFile(path.join(resultPath, 'tasks.tsv'), 'utf8')).trim().split('\\n').map((line) => line.split('\\t') as [string, string])\n return Promise.all(runs.map(async ([run, task]) => {\n const read = (file: string) => readFile(path.join(resultPath, run, file), 'utf8').then((text) => JSON.parse(text) as Record<string, unknown>, () => null)\n const metrics = await read('metrics.json')\n const input = nonnegativeCounter(metrics?.input_tokens)\n const output = nonnegativeCounter(metrics?.output_tokens)\n const agentSeconds = nonnegativeMeasurement(metrics?.wall_clock_seconds)\n const raw = agentSeconds === undefined ? undefined : { publisherAgentWallMs: agentSeconds * 1_000 }\n // The publisher retains supported response counters, without a per-call completeness flag.\n const telemetry: Pick<PublishedTaskScore, 'tokenUsage' | 'raw'> = {\n ...(raw && { raw }),\n ...(input !== undefined && output !== undefined && {\n tokenUsage: { input, output, tokensKnown: false },\n }),\n }\n const dual = await read('scores_dual.json')\n if (dual) return { id: task, passed: dual.all_pass === true, score: Number(dual.dual_all_pass_rate), notes: `dual-judge criterion pass ${String(dual.dual_criterion_pass)}`, ...telemetry }\n const single = await read('scores.json')\n if (single) {\n const criteria = Array.isArray(single.criteria_results) ? single.criteria_results as Array<{ id?: unknown; verdict?: unknown }> : []\n return { id: task, passed: single.all_pass === true, score: single.all_pass === true ? 1 : 0,\n notes: `${String(single.n_passed)} of ${String(single.n_criteria)} criteria passed${single.n_grading_errors ? `; ${String(single.n_grading_errors)} grading errors` : ''}`,\n ...telemetry,\n raw: { ...raw, criteria_passed: Number(single.n_passed) || 0, criteria_total: Number(single.n_criteria) || 0,\n ...Object.fromEntries(criteria.filter((c) => typeof c.id === 'string').map((c) => [`crit.${String(c.id)}`, c.verdict === 'pass' ? 1 : 0])) } }\n }\n return { id: task, passed: false, score: 0, notes: 'no scores: the harness or the grader failed (see the runner log)', ...telemetry }\n }))\n },\n },\n prbench: {\n name: 'prbench',\n repository: 'https://github.com/scaleapi/PRBench.git',\n ref: '7b2df0a28bf99ec51263c41b90dd510a740a7711',\n version: '7b2df0a (no release tag)',\n license: 'MIT (Scale AI); dataset ScaleAI/PRBench CC-BY-4.0',\n terms: 'CC-BY-4.0 dataset, not gated, loaded from Hugging Face at run time; attribution required, no training restriction stated',\n judge: 'openai/o4-mini (reasoning effort high), one call per rubric criterion',\n judgeSubstitutable: true,\n measured: 'model-shaped',\n resultIsFolder: true,\n // The publisher pins no dependency versions (requirements.txt), so a fresh install resolves them anew.\n install: [['uv', 'venv', '--quiet', '--python', '3.12'], ['uv', 'pip', 'install', '--quiet', '-r', 'requirements.txt']],\n // A sample runs --task ids or the first --tasks rows of the split (default legal; pass `-- --split finance`).\n run: (endpoint, options, resultPath) => [\n 'sh', fileURLToPath(new URL('../scripts/prbench-run.sh', import.meta.url)),\n resultPath, endpoint.baseUrl, endpoint.model, endpoint.apiKeyVar,\n options.tasks === undefined ? 'all' : String(options.tasks), (options.taskIds ?? []).join(','), options.judge ?? 'publisher',\n ...(options.args ?? []),\n ],\n // Per task, the publisher's clipped score: rubric points over the positive weights (negative criteria can take it below\n // zero; clamped to 0..1 here). The publisher's aggregate, mean_clipped, is max(0, mean of the unclamped scores).\n parse: async (resultPath) => {\n const folder = path.join(resultPath, 'results')\n const files = (await readdir(folder)).filter((file) => file.endsWith('.json'))\n if (files.length !== 1) throw new Error(`PRBench wrote ${files.length} result files under ${folder}, expected one`)\n const result = JSON.parse(await readFile(path.join(folder, files[0]!), 'utf8')) as { outputs?: Record<string, Record<string, { points?: unknown; weights?: unknown }>> }\n const tasks = Object.values(result.outputs ?? {})[0]\n if (!tasks) throw new Error(`PRBench result ${files[0]} has no outputs`)\n return Object.entries(tasks).map(([id, task]) => {\n const weights = Array.isArray(task.weights) ? task.weights.filter((weight): weight is number => typeof weight === 'number') : []\n const best = weights.filter((weight) => weight > 0).reduce((sum, weight) => sum + weight, 0)\n const points = typeof task.points === 'number' ? task.points : Number.NaN\n if (!best || Number.isNaN(points)) throw new Error(`PRBench task ${id} has no points or weights`)\n return { id, passed: points >= best, score: Math.min(1, Math.max(0, points / best)), notes: `${points} of ${best} rubric points` }\n })\n },\n },\n 'healthbench-professional': {\n name: 'healthbench-professional',\n repository: 'https://github.com/openai/simple-evals.git',\n ref: '652c89d0ca9df547706735883097e9537d40dc47',\n version: '652c89d (no release tag), data openai/healthbench-professional@349962fd',\n license: 'MIT (OpenAI simple-evals); dataset openai/healthbench-professional MIT',\n terms: 'MIT dataset, not gated, fetched from Hugging Face at the pinned revision at run time and never committed: the authors ask that examples not be revealed in plain text or images online. No training restriction stated.',\n judge: 'gpt-5.4-2026-03-05 (reasoning effort low), one call per rubric item; length-adjusted (center 2000 characters, 1.47 points per 500)',\n judgeSubstitutable: true,\n unofficial: 'OpenAI reports HealthBench Professional from an internal implementation it does not release; simple-evals with its Professional settings is the reference implementation',\n measured: 'model-shaped',\n resultIsFolder: true,\n // The publisher pins no dependency versions and ships no requirements file; these are the imports HealthBenchEval needs.\n install: [['uv', 'venv', '--quiet', '--python', '3.12'], ['uv', 'pip', 'install', '--quiet', 'openai', 'blobfile', 'numpy', 'pandas', 'jinja2', 'requests', 'tqdm']],\n // A sample runs the publisher's seeded sample of --tasks examples, or the --task ids.\n run: (endpoint, options, resultPath) => [\n 'sh', fileURLToPath(new URL('../scripts/healthbench-professional-run.sh', import.meta.url)),\n resultPath, endpoint.baseUrl, endpoint.model, endpoint.apiKeyVar,\n options.tasks === undefined ? 'all' : String(options.tasks), (options.taskIds ?? []).join(','), options.judge ?? 'publisher',\n ...(options.args ?? []),\n ],\n // Per task, the publisher's length-adjusted rubric score, clamped to 0..1 (the publisher clips the mean, not each task).\n // Passed: every positive criterion met and no negative one.\n parse: async (resultPath) => {\n const result = JSON.parse(await readFile(path.join(resultPath, 'result.json'), 'utf8')) as {\n examples?: Array<{ prompt_id: string; overall_score: number; length_adjusted: number; response_chars: number; positive_met: number; positive_total: number; negative_met: number }>\n }\n if (!result.examples?.length) throw new Error(`HealthBench Professional wrote no examples under ${resultPath}`)\n return result.examples.map((example) => ({\n id: example.prompt_id,\n passed: example.positive_met === example.positive_total && example.negative_met === 0,\n score: Math.min(1, Math.max(0, example.length_adjusted)),\n notes: `${example.positive_met} of ${example.positive_total} positive criteria met, ${example.negative_met} negative met; rubric score ${example.overall_score.toFixed(3)}, length-adjusted for ${example.response_chars} characters`,\n raw: {\n overall_score: example.overall_score, length_adjusted: example.length_adjusted, response_chars: example.response_chars,\n positive_met: example.positive_met, positive_total: example.positive_total, negative_met: example.negative_met,\n },\n }))\n },\n },\n mlcr: {\n name: 'mlcr',\n repository: 'https://github.com/Wisedocs-AI/medical-long-context-reasoning.git',\n ref: 'ca822de2d274184bb0cd5bf280ff917922f3716f',\n version: 'v1.1 (ca822de, the release commit; no tag), data Wisedocs/mlcr-dataset@1198206e',\n license: 'none: neither the code nor the Wisedocs/mlcr-dataset release carries a license (the dataset card says \"other\")',\n terms: 'No license: run locally for evaluation only, never committed, redistributed, or used for training or prompt optimization. The dataset is not gated and is fetched from Hugging Face at the pinned revision at run time.',\n // A substituted judge sits all three jury seats, each sampling independently, so the publisher's two-of-three rule applies.\n judge: \"jury of gemini-3.1-pro-preview, claude-opus-4-8-gcp and gpt-5.5 (majority vote, medium thinking) on the publisher's Vertex, Anthropic-on-GCP and Azure OpenAI providers, after a conciseness gate\",\n judgeSubstitutable: true,\n measured: 'model-shaped',\n resultIsFolder: true,\n install: [['uv', 'venv', '--quiet', '--python', '3.12'], ['uv', 'pip', 'install', '--quiet', '-e', '.[all]']],\n // A sample is the runner's first --tasks rows of the publisher's smoke experiment; MLCR names rows by matrix cell, not id.\n run: (endpoint, options, resultPath) => [\n 'sh', fileURLToPath(new URL('../scripts/mlcr-run.sh', import.meta.url)),\n resultPath, endpoint.baseUrl, endpoint.model, endpoint.apiKeyVar,\n options.tasks === undefined ? 'all' : String(options.tasks), (options.taskIds ?? []).join(','), options.judge ?? 'publisher',\n ...(options.args ?? []),\n ],\n // Per row, the jury's verdict: correct (complete and accurate by majority) after the conciseness gate.\n parse: async (resultPath) => {\n const result = JSON.parse(await readFile(path.join(resultPath, 'result.json'), 'utf8')) as {\n examples?: Array<{ id: string; concise: string; complete: string; accurate: string; correct: string; judge_error: boolean; response_chars: number }>\n }\n if (!result.examples?.length) throw new Error(`MLCR wrote no scored rows under ${resultPath}`)\n const verdict = (value: string) => (value === '' ? undefined : Number(value))\n return result.examples.map((example) => {\n if (example.correct === '') throw new Error(`MLCR row ${example.id} has no jury verdict${example.judge_error ? ' (the judge failed)' : ''}`)\n const raw = Object.fromEntries(Object.entries({ concise: verdict(example.concise), complete: verdict(example.complete), accurate: verdict(example.accurate), correct: verdict(example.correct) })\n .filter((entry): entry is [string, number] => entry[1] !== undefined))\n return {\n id: example.id, passed: example.correct === '1', score: example.correct === '1' ? 1 : 0,\n notes: `concise ${example.concise || '-'}, complete ${example.complete || '-'}, accurate ${example.accurate || '-'}; ${example.response_chars} characters`,\n raw: { ...raw, response_chars: example.response_chars },\n }\n })\n },\n },\n}\n\n/** Resolve a `model:`, `app:` or `profile:` target to the endpoint a publisher's runner calls. */\nexport async function resolveEndpoint(target: string, benchmark: PublishedBenchmark, env: NodeJS.ProcessEnv = process.env): Promise<Endpoint> {\n const match = /^(model|app|profile):(.+)$/.exec(target)\n if (!match) throw new Error(`target must be model:<router model>, app:<agent app>@<harness/model> or profile:<harness/model>, not '${target}'`)\n const [, kind, id] = match as unknown as [string, 'model' | 'app' | 'profile', string]\n if (kind === 'model') {\n return { target, model: id, baseUrl: env.AGENT_BENCH_ROUTER_URL ?? 'https://router.tangle.tools/v1', apiKeyVar: 'TANGLE_API_KEY', measured: benchmark.measured }\n }\n // A loopback Bridge without a bearer accepts any key; the runner still needs one to send.\n const bridge = env.AGENT_BENCH_BRIDGE_URL ?? 'http://127.0.0.1:3344/v1'\n if (kind === 'profile') return { target, model: id, baseUrl: bridge, apiKeyVar: 'AGENT_BENCH_BRIDGE_KEY', measured: 'own-loop' }\n const at = id.indexOf('@')\n const [name, harness] = at === -1 ? [id, ''] : [id.slice(0, at), id.slice(at + 1)]\n const apps = agentApps(env)\n const app = apps[name]\n if (!app) throw new Error(`no agent app '${name}'; registered: ${Object.keys(apps).join(', ')} (add one with AGENT_BENCH_APPS)`)\n if (!harness) throw new Error(`app:${name} needs @<harness/model>, the subscription harness that runs the app's profile, e.g. app:${name}@opencode/zai-coding-plan/glm-5.3`)\n const catalog = env.AGENT_BENCH_BRIDGE_PROFILES_DIR\n if (!catalog) throw new Error(`AGENT_BENCH_BRIDGE_PROFILES_DIR is not set: point it at the CLI Bridge's SANDBOX_PROFILES_DIR, where app:${name} writes its profile`)\n const { mcp, model, ...profile } = await readAppProfile(name, app.profileUrl)\n const text = JSON.stringify(profile)\n const digest = createHash('sha256').update(text).digest('hex')\n // Content-addressed: the Bridge rereads its catalog only for an id it does not know.\n const profileId = `${name}-${digest.slice(0, 12)}`\n await mkdir(catalog, { recursive: true })\n await writeFile(path.join(catalog, `${profileId}.json`), text)\n return {\n target, model: harness, baseUrl: `${bridge.replace(/\\/v1\\/?$/, '')}/profiles/${profileId}/v1`, apiKeyVar: 'AGENT_BENCH_BRIDGE_KEY', measured: 'own-loop',\n app: {\n app: name, profileUrl: app.profileUrl, profileDigest: `sha256:${digest}`, productionModel: model ?? null,\n profileName: typeof profile.name === 'string' ? profile.name : null, profileVersion: typeof profile.version === 'string' ? profile.version : null,\n omittedMcp: mcp && typeof mcp === 'object' ? Object.keys(mcp) : [],\n },\n }\n}\n\n/** An app's profile from its URL, or from an absolute file path. */\nasync function readAppProfile(name: string, source: string): Promise<Record<string, unknown>> {\n if (path.isAbsolute(source)) return JSON.parse(await readFile(source, 'utf8')) as Record<string, unknown>\n const response = await fetch(source)\n if (!response.ok) throw new Error(`${source} answered ${response.status}; app:${name} needs the profile the app serves`)\n return await response.json() as Record<string, unknown>\n}\n\n/** Run one published benchmark against one target with the publisher's runner and grader, and record the result. */\nexport async function runPublished(name: string, target: string, options: PublishedRunOptions): Promise<PublishedRun> {\n const benchmark = PUBLISHED_BENCHMARKS[name]\n if (!benchmark) throw new Error(`no published benchmark '${name}'; registered: ${Object.keys(PUBLISHED_BENCHMARKS).join(', ')}`)\n const env = { ...process.env, ...options.env }\n if (options.judge !== undefined && !benchmark.judgeSubstitutable) {\n throw new Error(`${benchmark.name} grades ${benchmark.judge === null ? 'deterministically' : `with ${benchmark.judge}`}; this registry cannot substitute its judge`)\n }\n if (options.judge !== undefined && !options.judge.startsWith('bridge/')) throw new Error(`--judge must be bridge/<harness/model>, not '${options.judge}'`)\n env.AGENT_BENCH_JUDGE_URL ??= env.AGENT_BENCH_BRIDGE_URL ?? 'http://127.0.0.1:3344/v1'\n const endpoint = await resolveEndpoint(target, benchmark, env)\n if (!env[endpoint.apiKeyVar]) throw new Error(`${endpoint.apiKeyVar} is not set; the ${target} endpoint needs it`)\n const checkout = await publisherCheckout(benchmark, options.cacheDir, env)\n await mkdir(options.out, { recursive: true })\n const resultPath = path.resolve(options.out, `${benchmark.name}-result${benchmark.resultIsFolder ? '' : '.json'}`)\n const startedAt = new Date().toISOString()\n const [command, ...args] = benchmark.run(endpoint, options, resultPath)\n await execute(command!, args, checkout, env)\n const taskScores = await benchmark.parse(resultPath)\n const run: PublishedRun = {\n benchmark: benchmark.name, version: benchmark.version, ref: benchmark.ref, target, model: endpoint.model,\n measured: endpoint.measured, judge: options.judge ?? benchmark.judge, publisherJudge: benchmark.judge,\n official: options.judge === undefined && benchmark.unofficial === undefined,\n ...(benchmark.unofficial ? { unofficial: benchmark.unofficial } : {}),\n ...(endpoint.app ? { app: endpoint.app } : {}),\n tasks: taskScores.length, passed: taskScores.filter((task) => task.passed).length,\n score: taskScores.length ? taskScores.reduce((sum, task) => sum + task.score, 0) / taskScores.length : 0,\n taskScores, resultPath, runRecords: path.resolve(options.out, `${benchmark.name}-runrecords.jsonl`),\n license: benchmark.license, terms: benchmark.terms, startedAt, finishedAt: new Date().toISOString(),\n }\n await writeFile(run.runRecords, runRecords(run, options).map((record) => JSON.stringify(record)).join('\\n') + '\\n')\n await writeFile(path.resolve(options.out, `${benchmark.name}-run.json`), `${JSON.stringify(run, null, 2)}\\n`)\n return run\n}\n\n/**\n * One agent-eval RunRecord per task, validated by agent-eval's own validator. Preserve an observed publisher subtotal\n * and leave missing provider bills unknown. A RunRecord's model must name a served snapshot; a subscription harness\n * reports none, and a snapshot invented from the date would be false, so such rows record `unknown` with terminal outcome\n * `unknown` and keep the requested model in `candidateId`. A pinned model id (a Router snapshot) is recorded as served.\n */\nfunction runRecords(run: PublishedRun, options: PublishedRunOptions): RunRecord[] {\n const split = options.record?.splitTag ?? 'holdout'\n const sha = (value: string) => `sha256:${createHash('sha256').update(value).digest('hex')}`\n const configHash = sha(canonicalJson({ benchmark: run.benchmark, ref: run.ref, target: run.target, judge: run.judge, args: options.args ?? [] }))\n return run.taskScores.map((task) => {\n const row = {\n runId: randomUUID(), experimentId: options.record?.experimentId ?? `${run.benchmark}@${run.ref}`,\n candidateId: options.record?.candidateId ?? run.target, seed: 0, model: run.model,\n // The publisher owns the prompt; an app run's prompt is its profile.\n promptHash: run.app?.profileDigest ?? sha(run.target), configHash, commitSha: run.ref,\n wallMs: Math.max(0, Date.parse(run.finishedAt) - Date.parse(run.startedAt)),\n costUsd: null, costProvenance: { kind: 'uncaptured', usd: null },\n tokenUsage: task.tokenUsage ?? { input: 0, output: 0, tokensKnown: false },\n terminalOutcome: 'succeeded',\n outcome: { [split === 'holdout' ? 'holdoutScore' : 'searchScore']: task.score, raw: { passed: task.passed ? 1 : 0, ...task.raw } },\n splitTag: split, scenarioId: `${run.benchmark}:${task.id}`,\n }\n try {\n return validateRunRecord(row)\n } catch (error) {\n if (!(error instanceof RunRecordValidationError) || error.path !== 'model') throw error\n return validateRunRecord({ ...row, model: UNKNOWN_MODEL, terminalOutcome: 'unknown' })\n }\n })\n}\n\n/** The publisher's repository at the pinned commit, installed once per cache. */\nasync function publisherCheckout(benchmark: PublishedBenchmark, cacheDir: string | undefined, env: NodeJS.ProcessEnv): Promise<string> {\n const root = cacheDir ?? path.join(homedir(), '.cache', 'agent-bench', 'published')\n const dir = path.join(root, `${benchmark.name}@${benchmark.ref}`)\n const installed = path.join(dir, '.agent-bench-installed')\n if (existsSync(installed)) return dir\n if (!existsSync(path.join(dir, '.git'))) {\n await mkdir(root, { recursive: true })\n await execute('git', ['clone', '--quiet', '--filter=blob:none', '--no-checkout', benchmark.repository, dir], root, env)\n }\n await execute('git', ['checkout', '--quiet', '--detach', benchmark.ref], dir, env)\n for (const [command, ...args] of benchmark.install) await execute(command!, args, dir, env)\n await writeFile(installed, `${benchmark.ref}\\n`)\n return dir\n}\n\nfunction execute(command: string, args: string[], cwd: string, env: NodeJS.ProcessEnv): Promise<void> {\n return new Promise((resolve, reject) => {\n const child = spawn(command, args, { cwd, env, stdio: 'inherit' })\n child.once('error', (error) => reject(new Error(`${command} could not start in ${cwd}: ${error.message}`)))\n child.once('exit', (code, signal) => code === 0\n ? resolve()\n : reject(new Error(`${command} ${args.slice(0, 3).join(' ')} exited ${signal ?? code} in ${cwd}`)))\n })\n}\n","#!/usr/bin/env node\n/**\n * agent-bench run <benchmark> --target <model:|app:|profile:> [--tasks N] [--task <publisher task id>]... [--out <dir>] [-- <runner args>]\n * agent-bench list\n *\n * Runs a published benchmark with its publisher's own runner and grader (src/published.ts), prints the score with what it\n * measured, and writes the run record to --out (default ./agent-bench-runs/<benchmark>-<time>).\n */\nimport path from 'node:path'\nimport { PUBLISHED_BENCHMARKS, runPublished } from './published'\n\nconst usage = 'usage: agent-bench run <benchmark> --target <model:<router model>|app:<agent app>@<harness/model>|profile:<harness/model>> [--tasks N] [--task <id>]... [--judge bridge/<harness/model>] [--experiment <id>] [--candidate <id>] [--split search|dev|holdout] [--out <dir>] [-- <runner args>]\\n agent-bench list'\n\nasync function main(argv: string[]): Promise<number> {\n const [command, ...rest] = argv\n if (command === 'list') {\n for (const benchmark of Object.values(PUBLISHED_BENCHMARKS)) {\n console.log(`${benchmark.name} ${benchmark.version} ${benchmark.repository}@${benchmark.ref.slice(0, 12)} ${benchmark.measured} judge=${benchmark.judge ?? 'deterministic'} license=${benchmark.license}`)\n }\n return 0\n }\n if (command !== 'run' || !rest[0] || rest[0].startsWith('-')) {\n console.error(usage)\n return 2\n }\n const name = rest[0]\n const separator = rest.indexOf('--')\n const own = separator === -1 ? rest.slice(1) : rest.slice(1, separator)\n const runnerArgs = separator === -1 ? [] : rest.slice(separator + 1)\n let target: string | undefined\n let tasks: number | undefined\n const taskIds: string[] = []\n let out: string | undefined\n let judge: string | undefined\n const record: { experimentId?: string; candidateId?: string; splitTag?: 'search' | 'dev' | 'holdout' } = {}\n for (let i = 0; i < own.length; i++) {\n const flag = own[i]\n const value = own[i + 1]\n if (value === undefined) throw new Error(`${flag} needs a value\\n${usage}`)\n if (flag === '--target') target = value\n else if (flag === '--tasks') tasks = Number.parseInt(value, 10)\n else if (flag === '--task') taskIds.push(value)\n else if (flag === '--out') out = value\n else if (flag === '--judge') judge = value\n else if (flag === '--experiment') record.experimentId = value\n else if (flag === '--candidate') record.candidateId = value\n else if (flag === '--split') record.splitTag = value as 'search' | 'dev' | 'holdout'\n else throw new Error(`unknown option ${flag}\\n${usage}`)\n i++\n }\n if (!target) throw new Error(`--target is required\\n${usage}`)\n if (tasks !== undefined && !(Number.isSafeInteger(tasks) && tasks > 0)) throw new Error('--tasks must be a positive integer')\n const run = await runPublished(name, target, {\n ...(tasks === undefined ? {} : { tasks }),\n ...(taskIds.length ? { taskIds } : {}),\n ...(judge === undefined ? {} : { judge }),\n ...(Object.keys(record).length ? { record } : {}),\n args: runnerArgs,\n out: path.resolve(out ?? path.join('agent-bench-runs', `${name}-${new Date().toISOString().replace(/[:.]/g, '-')}`)),\n })\n console.log(`${run.benchmark} ${run.version} on ${run.target}: ${run.passed} of ${run.tasks} passed, score ${run.score.toFixed(3)}, measured ${run.measured}, judge ${run.judge === null ? 'deterministic' : run.judge} (${run.official ? 'official' : `${[run.judge !== run.publisherJudge ? `substituted for ${run.publisherJudge}` : undefined, run.unofficial].filter(Boolean).join('; ')}, not official`})`)\n if (run.app) {\n console.log(`app: ${run.app.app} profile ${run.app.profileName ?? '?'} ${run.app.profileVersion ?? ''} ${run.app.profileDigest.slice(0, 19)} from ${run.app.profileUrl}; ` +\n `its production model ${JSON.stringify(run.app.productionModel)} replaced by ${run.model}; its MCP servers not mounted: ${run.app.omittedMcp.join(', ') || 'none'}`)\n }\n console.log(`record: ${path.join(path.dirname(run.resultPath), `${run.benchmark}-run.json`)}`)\n console.log(`run records: ${run.runRecords}`)\n return 0\n}\n\nmain(process.argv.slice(2)).then((code) => process.exit(code), (error: unknown) => {\n console.error(error instanceof Error ? error.message : String(error))\n process.exit(1)\n})\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA+DA,MAAa,aAA+D;CAC1E,aAAa,EAAE,YAAY,mEAAmE;CAC9F,eAAe,EAAE,YAAY,qEAAqE;AACpG;AAEA,SAAS,UAAU,KAAgE;CACj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entProfile, SandboxClient, SandboxRun, TurnResult, sumSandboxUsage } from "@tangle-network/agent-runtime/kernel";
|
|
12
12
|
import { RunTerminalOutcome, TraceStore } from "@tangle-network/agent-eval";
|
|
13
13
|
import { SandboxEvent } from "@tangle-network/sandbox";
|
|
14
|
-
import { AgentCandidateBenchmarkGraderPort, AgentCandidateExecutionClaimStore, AgentCandidateExecutorPort, AgentCandidateExecutorRequest, AgentCandidateExecutorStopRequest, AgentCandidateOutputArtifactPort, AgentCandidateRunFinalization, PreparedAgentCandidateExecution } from "@tangle-network/agent-runtime/candidate-execution";
|
|
14
|
+
import { AgentCandidateBenchmarkGraderPort, AgentCandidateExecutionClaimStore, AgentCandidateExecutionFormat, AgentCandidateExecutorPort, AgentCandidateExecutorRequest, AgentCandidateExecutorStopRequest, AgentCandidateOutputArtifactPort, AgentCandidateRunFinalization, ExecutePreparedAgentCandidateOptions, PreparedAgentCandidateExecution } from "@tangle-network/agent-runtime/candidate-execution";
|
|
15
15
|
interface ResolveBenchClientOptions {
|
|
16
16
|
/** The selector (the `BACKEND` env value): `router` = off-box; anything else = in-box Sandbox. */
|
|
17
17
|
backend: string;
|
|
@@ -197,8 +197,8 @@ interface RunBenchmarksReport {
|
|
|
197
197
|
export declare function runBenchmarks(opts: RunBenchmarksOptions): Promise<RunBenchmarksReport>;
|
|
198
198
|
/** Render the leaderboard as a fixed-width table for a CLI/log. */
|
|
199
199
|
export declare function printBenchmarksReport(report: RunBenchmarksReport): string;
|
|
200
|
-
interface StagePreparedPierCandidateOptions {
|
|
201
|
-
readonly prepared: PreparedAgentCandidateExecution
|
|
200
|
+
interface StagePreparedPierCandidateOptions<Format extends AgentCandidateExecutionFormat = 'experiment'> {
|
|
201
|
+
readonly prepared: PreparedAgentCandidateExecution<Format>;
|
|
202
202
|
/** Evaluator-owned directory persisted with the Pier trial. */
|
|
203
203
|
readonly directory: string;
|
|
204
204
|
/** Exact Pier package version pinned by the experiment contract. */
|
|
@@ -237,9 +237,9 @@ type PierCandidateTrialIdentity = Readonly<AgentCandidateExecutorStopRequest>;
|
|
|
237
237
|
* Evaluator-owned lifecycle whose stop path works without the process-local
|
|
238
238
|
* handle returned by `start`.
|
|
239
239
|
*/
|
|
240
|
-
interface PierCandidateTrialController {
|
|
240
|
+
interface PierCandidateTrialController<Format extends AgentCandidateExecutionFormat = 'experiment'> {
|
|
241
241
|
start(staged: StagedPierCandidateExecution, context: {
|
|
242
|
-
readonly request: AgentCandidateExecutorRequest
|
|
242
|
+
readonly request: AgentCandidateExecutorRequest<Format>;
|
|
243
243
|
readonly traceStore: TraceStore;
|
|
244
244
|
readonly signal: AbortSignal;
|
|
245
245
|
readonly deadlineAtMs: number;
|
|
@@ -272,7 +272,7 @@ interface PierCandidateGraderPort {
|
|
|
272
272
|
readonly officialResult: PierCandidateOfficialResult;
|
|
273
273
|
}): Promise<RuntimeGraderResult>;
|
|
274
274
|
}
|
|
275
|
-
interface ExecutePreparedPierCandidateOptions extends StagePreparedPierCandidateOptions {
|
|
275
|
+
interface ExecutePreparedPierCandidateOptions<Format extends AgentCandidateExecutionFormat = 'experiment'> extends StagePreparedPierCandidateOptions<Format> {
|
|
276
276
|
readonly traceStore: TraceStore;
|
|
277
277
|
/** Durable one-shot store shared by every process capable of running this benchmark. */
|
|
278
278
|
readonly claimStore: AgentCandidateExecutionClaimStore;
|
|
@@ -282,12 +282,14 @@ interface ExecutePreparedPierCandidateOptions extends StagePreparedPierCandidate
|
|
|
282
282
|
* Starts exactly one Pier trial synchronously and persists its non-secret
|
|
283
283
|
* process/container identity before returning.
|
|
284
284
|
*/
|
|
285
|
-
readonly controller: PierCandidateTrialController
|
|
285
|
+
readonly controller: PierCandidateTrialController<Format>;
|
|
286
286
|
}
|
|
287
287
|
/** Recovery-only runtime executor for an expired attempt owned by another process. */
|
|
288
|
-
export declare function createPierCandidateRecoveryExecutor(controller: PierCandidateTrialController): AgentCandidateExecutorPort
|
|
288
|
+
export declare function createPierCandidateRecoveryExecutor<Format extends AgentCandidateExecutionFormat>(controller: PierCandidateTrialController<Format>): AgentCandidateExecutorPort<Format>;
|
|
289
|
+
/** Bind Pier and its separate verifier to Runtime's prepared experiment cell. */
|
|
290
|
+
export declare function createPierCandidateExecutionOptions<Format extends AgentCandidateExecutionFormat>(options: ExecutePreparedPierCandidateOptions<Format>): ExecutePreparedAgentCandidateOptions<Format>;
|
|
289
291
|
/** Execute and finalize through the runtime's only gradable candidate path. */
|
|
290
|
-
export declare function executePreparedPierCandidate(options: ExecutePreparedPierCandidateOptions): Promise<AgentCandidateRunFinalization>;
|
|
292
|
+
export declare function executePreparedPierCandidate<Format extends AgentCandidateExecutionFormat>(options: ExecutePreparedPierCandidateOptions<Format>): Promise<AgentCandidateRunFinalization>;
|
|
291
293
|
interface PierCandidateProcessSpec {
|
|
292
294
|
/** Returns launch data only. The controller, not this callback, starts the process. */
|
|
293
295
|
readonly command: string;
|
|
@@ -308,11 +310,11 @@ interface PierDockerConnection {
|
|
|
308
310
|
/** Exact variables needed by both Pier and Docker cleanup; values are never persisted. */
|
|
309
311
|
readonly env: Readonly<Record<string, string | undefined>>;
|
|
310
312
|
}
|
|
311
|
-
interface FilePierCandidateTrialControllerOptions {
|
|
313
|
+
interface FilePierCandidateTrialControllerOptions<Format extends AgentCandidateExecutionFormat = 'experiment'> {
|
|
312
314
|
/** Shared evaluator-owned control root, available to crash-recovery workers. */
|
|
313
315
|
readonly directory: string;
|
|
314
316
|
readonly launch?: (staged: StagedPierCandidateExecution, context: {
|
|
315
|
-
readonly request: AgentCandidateExecutorRequest
|
|
317
|
+
readonly request: AgentCandidateExecutorRequest<Format>;
|
|
316
318
|
readonly traceStore: TraceStore;
|
|
317
319
|
readonly signal: AbortSignal;
|
|
318
320
|
readonly deadlineAtMs: number;
|
|
@@ -327,16 +329,34 @@ interface FilePierCandidateTrialControllerOptions {
|
|
|
327
329
|
readonly supervisorPath?: string;
|
|
328
330
|
readonly pollIntervalMs?: number;
|
|
329
331
|
}
|
|
330
|
-
|
|
332
|
+
interface CreatePierTaskTrialControllerOptions {
|
|
333
|
+
readonly directory: string;
|
|
334
|
+
readonly jobsDirectory: string;
|
|
335
|
+
/** Maximum bytes for each retained official result and patch file. */
|
|
336
|
+
readonly maxEvidenceBytes: number;
|
|
337
|
+
/** Evaluator-owned task directories, keyed by the already approved Runtime task digest. */
|
|
338
|
+
readonly tasks: readonly {
|
|
339
|
+
readonly taskDigest: `sha256:${string}`;
|
|
340
|
+
readonly directory: string;
|
|
341
|
+
}[];
|
|
342
|
+
/** The pinned Pier executable, or its interpreter and prefix arguments ending at `pier`. */
|
|
343
|
+
readonly command: Pick<PierCandidateProcessSpec, 'command' | 'cwd' | 'env' | 'dockerCommand'> & {
|
|
344
|
+
readonly prefix?: readonly string[];
|
|
345
|
+
};
|
|
346
|
+
readonly dockerConnection?: PierDockerConnection;
|
|
347
|
+
}
|
|
348
|
+
/** Run one approved Pier task and reopen its official result through the durable controller. */
|
|
349
|
+
export declare function createPierTaskTrialController<Format extends AgentCandidateExecutionFormat = 'experiment'>(options: CreatePierTaskTrialControllerOptions): FilePierCandidateTrialController<Format>;
|
|
350
|
+
export declare class FilePierCandidateTrialController<Format extends AgentCandidateExecutionFormat = 'experiment'> implements PierCandidateTrialController<Format> {
|
|
331
351
|
private readonly directory;
|
|
332
352
|
private readonly launch?;
|
|
333
353
|
private readonly readResult?;
|
|
334
354
|
private readonly dockerConnection;
|
|
335
355
|
private readonly supervisorPath;
|
|
336
356
|
private readonly pollIntervalMs;
|
|
337
|
-
constructor(options: FilePierCandidateTrialControllerOptions);
|
|
357
|
+
constructor(options: FilePierCandidateTrialControllerOptions<Format>);
|
|
338
358
|
start(staged: StagedPierCandidateExecution, context: {
|
|
339
|
-
readonly request: AgentCandidateExecutorRequest
|
|
359
|
+
readonly request: AgentCandidateExecutorRequest<Format>;
|
|
340
360
|
readonly traceStore: TraceStore;
|
|
341
361
|
readonly signal: AbortSignal;
|
|
342
362
|
readonly deadlineAtMs: number;
|
|
@@ -350,5 +370,5 @@ export declare class FilePierCandidateTrialController implements PierCandidateTr
|
|
|
350
370
|
private forceRecovery;
|
|
351
371
|
}
|
|
352
372
|
export declare function createPierResultGrader(descriptor: Pick<PierCandidateGraderPort, 'name' | 'version' | 'artifact'>): PierCandidateGraderPort;
|
|
353
|
-
export { ADAPTERS, type BenchCell, type BenchCellTaskResult, type BenchEvaluation, type BenchExecution, type BenchExecutionContext, type BenchLeaderboardRow, type BenchPayload, type BenchPromptResult, type BenchRuntime, type BenchShot, type BenchShotResult, type BenchTask, type ExecutePreparedPierCandidateOptions, FINAL_ANSWER_SENTINEL, type FilePierCandidateTrialControllerOptions, type JudgeArtifactFileReceipt, type JudgeArtifactReceipt, type LoadOptions, type PierCandidateGraderPort, type PierCandidateOfficialResult, type PierCandidateProcessSpec, type PierCandidateTerminationAcknowledgement, type PierCandidateTrialController, type PierCandidateTrialHandle, type PierCandidateTrialIdentity, type PierCandidateTrialResult, type PierDockerConnection, type RagAnswerScore, type RagContext, type ResearchAnswer, type RunBenchmarksOptions, type RunBenchmarksReport, type RuntimeBenchmark, type RuntimeBenchmarkSpec, StagedJudgeError, type StagedPierCandidateExecution, type StagedRunCaptureSpec, type StagedRunSpec, type SweBenchAdapterOptions, type SweBenchArtifactCaptureContext, type SweBenchCacheLevel, answerScoreToEvaluation, contextBlock, contextsFrom, createCragAdapter, createNoMiraclAdapter, createOpenRagBenchAdapter, createRagBenchAdapter, createSweBenchAdapter, createT2RagBenchAdapter, normalizeAnswer, parseCitations, parseFinalAnswer, ragAnswerOutput, resolveAdapter, runStagedJudge, runtimeBenchmark, scoreAnswerArtifact, scoreSweReport, sweEvaluationArgv, swePatchOutput, tokenF1 };
|
|
373
|
+
export { ADAPTERS, type BenchCell, type BenchCellTaskResult, type BenchEvaluation, type BenchExecution, type BenchExecutionContext, type BenchLeaderboardRow, type BenchPayload, type BenchPromptResult, type BenchRuntime, type BenchShot, type BenchShotResult, type BenchTask, type CreatePierTaskTrialControllerOptions, type ExecutePreparedPierCandidateOptions, FINAL_ANSWER_SENTINEL, type FilePierCandidateTrialControllerOptions, type JudgeArtifactFileReceipt, type JudgeArtifactReceipt, type LoadOptions, type PierCandidateGraderPort, type PierCandidateOfficialResult, type PierCandidateProcessSpec, type PierCandidateTerminationAcknowledgement, type PierCandidateTrialController, type PierCandidateTrialHandle, type PierCandidateTrialIdentity, type PierCandidateTrialResult, type PierDockerConnection, type RagAnswerScore, type RagContext, type ResearchAnswer, type RunBenchmarksOptions, type RunBenchmarksReport, type RuntimeBenchmark, type RuntimeBenchmarkSpec, StagedJudgeError, type StagedPierCandidateExecution, type StagedRunCaptureSpec, type StagedRunSpec, type SweBenchAdapterOptions, type SweBenchArtifactCaptureContext, type SweBenchCacheLevel, answerScoreToEvaluation, contextBlock, contextsFrom, createCragAdapter, createNoMiraclAdapter, createOpenRagBenchAdapter, createRagBenchAdapter, createSweBenchAdapter, createT2RagBenchAdapter, normalizeAnswer, parseCitations, parseFinalAnswer, ragAnswerOutput, resolveAdapter, runStagedJudge, runtimeBenchmark, scoreAnswerArtifact, scoreSweReport, sweEvaluationArgv, swePatchOutput, tokenF1 };
|
|
354
374
|
//# sourceMappingURL=index.d.ts.map
|