@tangle-network/agent-bench 0.3.5 → 0.3.6
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 +6 -0
- package/README.md +13 -1
- package/dist/adapters.d.ts +15 -0
- package/dist/adapters.js +43 -0
- package/dist/adapters.js.map +1 -0
- package/dist/benchmarks/_harness.d.ts +125 -0
- package/dist/benchmarks/_harness.js +33 -0
- package/dist/benchmarks/_harness.js.map +1 -0
- package/dist/benchmarks/aec-bench.d.ts +27 -0
- package/dist/benchmarks/aec-bench.js +8 -0
- package/dist/benchmarks/aec-bench.js.map +1 -0
- package/dist/benchmarks/agentbench.d.ts +16 -0
- package/dist/benchmarks/agentbench.js +10 -0
- package/dist/benchmarks/agentbench.js.map +1 -0
- package/dist/benchmarks/appworld.d.ts +37 -0
- package/dist/benchmarks/appworld.js +14 -0
- package/dist/benchmarks/appworld.js.map +1 -0
- package/dist/benchmarks/bfcl.d.ts +18 -0
- package/dist/benchmarks/bfcl.js +10 -0
- package/dist/benchmarks/bfcl.js.map +1 -0
- package/dist/benchmarks/cad-design.d.ts +45 -0
- package/dist/benchmarks/cad-design.js +7 -0
- package/dist/benchmarks/cad-design.js.map +1 -0
- package/dist/benchmarks/cadbench.d.ts +19 -0
- package/dist/benchmarks/cadbench.js +8 -0
- package/dist/benchmarks/cadbench.js.map +1 -0
- package/dist/benchmarks/cadgenbench.d.ts +22 -0
- package/dist/benchmarks/cadgenbench.js +8 -0
- package/dist/benchmarks/cadgenbench.js.map +1 -0
- package/dist/benchmarks/commit0.d.ts +31 -0
- package/dist/benchmarks/commit0.js +10 -0
- package/dist/benchmarks/commit0.js.map +1 -0
- package/dist/benchmarks/crag.d.ts +14 -0
- package/dist/benchmarks/crag.js +9 -0
- package/dist/benchmarks/crag.js.map +1 -0
- package/dist/benchmarks/dabstep.d.ts +18 -0
- package/dist/benchmarks/dabstep.js +10 -0
- package/dist/benchmarks/dabstep.js.map +1 -0
- package/dist/benchmarks/enterpriseops-gym.d.ts +38 -0
- package/dist/benchmarks/enterpriseops-gym.js +10 -0
- package/dist/benchmarks/enterpriseops-gym.js.map +1 -0
- package/dist/benchmarks/finresearchbench.d.ts +15 -0
- package/dist/benchmarks/finresearchbench.js +8 -0
- package/dist/benchmarks/finresearchbench.js.map +1 -0
- package/dist/benchmarks/finsearchcomp.d.ts +49 -0
- package/dist/benchmarks/finsearchcomp.js +7 -0
- package/dist/benchmarks/finsearchcomp.js.map +1 -0
- package/dist/benchmarks/frames.d.ts +59 -0
- package/dist/benchmarks/frames.js +13 -0
- package/dist/benchmarks/frames.js.map +1 -0
- package/dist/benchmarks/hotpotqa.d.ts +48 -0
- package/dist/benchmarks/hotpotqa.js +15 -0
- package/dist/benchmarks/hotpotqa.js.map +1 -0
- package/dist/benchmarks/humaneval.d.ts +53 -0
- package/dist/benchmarks/humaneval.js +15 -0
- package/dist/benchmarks/humaneval.js.map +1 -0
- package/dist/benchmarks/mind2web.d.ts +41 -0
- package/dist/benchmarks/mind2web.js +9 -0
- package/dist/benchmarks/mind2web.js.map +1 -0
- package/dist/benchmarks/nomiracl.d.ts +15 -0
- package/dist/benchmarks/nomiracl.js +9 -0
- package/dist/benchmarks/nomiracl.js.map +1 -0
- package/dist/benchmarks/open-rag-bench.d.ts +14 -0
- package/dist/benchmarks/open-rag-bench.js +9 -0
- package/dist/benchmarks/open-rag-bench.js.map +1 -0
- package/dist/benchmarks/programbench.d.ts +38 -0
- package/dist/benchmarks/programbench.js +10 -0
- package/dist/benchmarks/programbench.js.map +1 -0
- package/dist/benchmarks/rag-shared.d.ts +42 -0
- package/dist/benchmarks/rag-shared.js +39 -0
- package/dist/benchmarks/rag-shared.js.map +1 -0
- package/dist/benchmarks/ragbench.d.ts +16 -0
- package/dist/benchmarks/ragbench.js +9 -0
- package/dist/benchmarks/ragbench.js.map +1 -0
- package/dist/benchmarks/simpleqa.d.ts +64 -0
- package/dist/benchmarks/simpleqa.js +11 -0
- package/dist/benchmarks/simpleqa.js.map +1 -0
- package/dist/benchmarks/swe-bench.d.ts +56 -0
- package/dist/benchmarks/swe-bench.js +14 -0
- package/dist/benchmarks/swe-bench.js.map +1 -0
- package/dist/benchmarks/t2-ragbench.d.ts +14 -0
- package/dist/benchmarks/t2-ragbench.js +9 -0
- package/dist/benchmarks/t2-ragbench.js.map +1 -0
- package/dist/benchmarks/tau-bench-shared.d.ts +26 -0
- package/dist/benchmarks/tau-bench-shared.js +10 -0
- package/dist/benchmarks/tau-bench-shared.js.map +1 -0
- package/dist/benchmarks/tau2-bench.d.ts +7 -0
- package/dist/benchmarks/tau2-bench.js +11 -0
- package/dist/benchmarks/tau2-bench.js.map +1 -0
- package/dist/benchmarks/tau3-banking.d.ts +15 -0
- package/dist/benchmarks/tau3-banking.js +9 -0
- package/dist/benchmarks/tau3-banking.js.map +1 -0
- package/dist/benchmarks/terminal-bench.d.ts +24 -0
- package/dist/benchmarks/terminal-bench.js +8 -0
- package/dist/benchmarks/terminal-bench.js.map +1 -0
- package/dist/benchmarks/toollm.d.ts +16 -0
- package/dist/benchmarks/toollm.js +10 -0
- package/dist/benchmarks/toollm.js.map +1 -0
- package/dist/benchmarks/trata-hedge.d.ts +32 -0
- package/dist/benchmarks/trata-hedge.js +7 -0
- package/dist/benchmarks/trata-hedge.js.map +1 -0
- package/dist/benchmarks/types.d.ts +107 -0
- package/dist/benchmarks/types.js +1 -0
- package/dist/benchmarks/types.js.map +1 -0
- package/dist/benchmarks/webarena-verified.d.ts +16 -0
- package/dist/benchmarks/webarena-verified.js +10 -0
- package/dist/benchmarks/webarena-verified.js.map +1 -0
- package/dist/chunk-2PVVP7GN.js +197 -0
- package/dist/chunk-2PVVP7GN.js.map +1 -0
- package/dist/chunk-2XU6OGEN.js +170 -0
- package/dist/chunk-2XU6OGEN.js.map +1 -0
- package/dist/chunk-53UPUNBZ.js +325 -0
- package/dist/chunk-53UPUNBZ.js.map +1 -0
- package/dist/chunk-5SBJCB6W.js +144 -0
- package/dist/chunk-5SBJCB6W.js.map +1 -0
- package/dist/chunk-7WSD27QQ.js +118 -0
- package/dist/chunk-7WSD27QQ.js.map +1 -0
- package/dist/chunk-C7T7WEK2.js +103 -0
- package/dist/chunk-C7T7WEK2.js.map +1 -0
- package/dist/chunk-CKUVRZ2T.js +251 -0
- package/dist/chunk-CKUVRZ2T.js.map +1 -0
- package/dist/chunk-HBSWHQNJ.js +30 -0
- package/dist/chunk-HBSWHQNJ.js.map +1 -0
- package/dist/chunk-HHXFIHXC.js +116 -0
- package/dist/chunk-HHXFIHXC.js.map +1 -0
- package/dist/chunk-IFAV6KEM.js +276 -0
- package/dist/chunk-IFAV6KEM.js.map +1 -0
- package/dist/chunk-INNOYXCP.js +387 -0
- package/dist/chunk-INNOYXCP.js.map +1 -0
- package/dist/chunk-J3KDJNX2.js +182 -0
- package/dist/chunk-J3KDJNX2.js.map +1 -0
- package/dist/chunk-JRWWGMK7.js +148 -0
- package/dist/chunk-JRWWGMK7.js.map +1 -0
- package/dist/chunk-JTHWEDEW.js +32 -0
- package/dist/chunk-JTHWEDEW.js.map +1 -0
- package/dist/chunk-KDIKRJGB.js +120 -0
- package/dist/chunk-KDIKRJGB.js.map +1 -0
- package/dist/chunk-LRRD7NAG.js +301 -0
- package/dist/chunk-LRRD7NAG.js.map +1 -0
- package/dist/chunk-ODT47UAY.js +221 -0
- package/dist/chunk-ODT47UAY.js.map +1 -0
- package/dist/chunk-PA2ZKHJC.js +230 -0
- package/dist/chunk-PA2ZKHJC.js.map +1 -0
- package/dist/chunk-PPYSEKFM.js +182 -0
- package/dist/chunk-PPYSEKFM.js.map +1 -0
- package/dist/chunk-PUIRNYI7.js +189 -0
- package/dist/chunk-PUIRNYI7.js.map +1 -0
- package/dist/chunk-R36V2VP7.js +169 -0
- package/dist/chunk-R36V2VP7.js.map +1 -0
- package/dist/chunk-R67DFVLO.js +142 -0
- package/dist/chunk-R67DFVLO.js.map +1 -0
- package/dist/chunk-SEVJPLZC.js +260 -0
- package/dist/chunk-SEVJPLZC.js.map +1 -0
- package/dist/chunk-SYDW647C.js +318 -0
- package/dist/chunk-SYDW647C.js.map +1 -0
- package/dist/chunk-TBKU5XQI.js +228 -0
- package/dist/chunk-TBKU5XQI.js.map +1 -0
- package/dist/chunk-TSWPNOYM.js +147 -0
- package/dist/chunk-TSWPNOYM.js.map +1 -0
- package/dist/chunk-UAIOHCUK.js +27 -0
- package/dist/chunk-UAIOHCUK.js.map +1 -0
- package/dist/chunk-UPAMRDX4.js +233 -0
- package/dist/chunk-UPAMRDX4.js.map +1 -0
- package/dist/chunk-VQRS7VUC.js +342 -0
- package/dist/chunk-VQRS7VUC.js.map +1 -0
- package/dist/chunk-X3BTXCJ4.js +262 -0
- package/dist/chunk-X3BTXCJ4.js.map +1 -0
- package/dist/chunk-X5YKXC6V.js +211 -0
- package/dist/chunk-X5YKXC6V.js.map +1 -0
- package/dist/chunk-Y6O2OCUO.js +130 -0
- package/dist/chunk-Y6O2OCUO.js.map +1 -0
- package/dist/chunk-YCGY7UIZ.js +208 -0
- package/dist/chunk-YCGY7UIZ.js.map +1 -0
- package/dist/chunk-Z7ML6L77.js +162 -0
- package/dist/chunk-Z7ML6L77.js.map +1 -0
- package/dist/chunk-ZEWMTR5M.js +136 -0
- package/dist/chunk-ZEWMTR5M.js.map +1 -0
- package/dist/index.d.ts +355 -0
- package/dist/index.js +1908 -0
- package/dist/index.js.map +1 -0
- package/package.json +22 -6
- package/scripts/verify-packed-consumer.mjs +12 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.3.6
|
|
4
|
+
|
|
5
|
+
- Ship compiled ESM and declarations so Node can import the installed package without a TypeScript runtime.
|
|
6
|
+
- Check root, registry, and benchmark subpath imports with plain Node in addition to TypeScript 5, TypeScript 6, and Python package checks.
|
|
7
|
+
- Build explicitly before verification and publication so disabled lifecycle scripts cannot produce a package without compiled output.
|
|
8
|
+
|
|
3
9
|
## 0.3.5
|
|
4
10
|
|
|
5
11
|
- Build the workspace runtime before source type checks so the published-package verification command works from a clean checkout; the packed consumer still installs `@tangle-network/agent-runtime@0.97.0` from npm.
|
package/README.md
CHANGED
|
@@ -2,7 +2,19 @@
|
|
|
2
2
|
|
|
3
3
|
Published as `@tangle-network/agent-bench`, with independent CI and release checks for its TypeScript and Python surfaces.
|
|
4
4
|
|
|
5
|
-
**Read [`bench/HARNESS.md`](./HARNESS.md) FIRST.** It is the one maintained map: the commands, the `rollout → corpus → selector → CI → gate` data flow, the canonical-suite table, the wired/needs-creds/scaffolded matrix, and the gate one-liners
|
|
5
|
+
**Read [`bench/HARNESS.md`](./HARNESS.md) FIRST.** It is the one maintained map: the commands, the `rollout → corpus → selector → CI → gate` data flow, the canonical-suite table, the wired/needs-creds/scaffolded matrix, and the gate one-liners, kept verified against source.
|
|
6
|
+
|
|
7
|
+
## Use
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
pnpm add -D @tangle-network/agent-bench
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
```ts
|
|
14
|
+
import { resolveAdapter } from '@tangle-network/agent-bench'
|
|
15
|
+
|
|
16
|
+
const crag = resolveAdapter('crag')
|
|
17
|
+
```
|
|
6
18
|
|
|
7
19
|
## SWE-bench judge setup (the one block not in HARNESS.md)
|
|
8
20
|
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { BenchmarkAdapter } from './benchmarks/types.js';
|
|
2
|
+
import '@tangle-network/agent-runtime/loops';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* The benchmark registry — the single source of truth for every wired benchmark.
|
|
6
|
+
* One key per benchmark; the value is its `BenchmarkAdapter` factory. `runBenchmarks`
|
|
7
|
+
* (the unifier) maps over this; `run.ts`, `rsi.ts`, and `corpus-replay.mts` all read it
|
|
8
|
+
* here rather than each keeping their own copy.
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
declare const ADAPTERS: Record<string, () => BenchmarkAdapter>;
|
|
12
|
+
/** Resolve a benchmark key to its adapter, failing loud with the known keys. */
|
|
13
|
+
declare function resolveAdapter(key: string): BenchmarkAdapter;
|
|
14
|
+
|
|
15
|
+
export { ADAPTERS, resolveAdapter };
|
package/dist/adapters.js
ADDED
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import {
|
|
2
|
+
ADAPTERS,
|
|
3
|
+
resolveAdapter
|
|
4
|
+
} from "./chunk-5SBJCB6W.js";
|
|
5
|
+
import "./chunk-2PVVP7GN.js";
|
|
6
|
+
import "./chunk-VQRS7VUC.js";
|
|
7
|
+
import "./chunk-Z7ML6L77.js";
|
|
8
|
+
import "./chunk-R67DFVLO.js";
|
|
9
|
+
import "./chunk-SEVJPLZC.js";
|
|
10
|
+
import "./chunk-CKUVRZ2T.js";
|
|
11
|
+
import "./chunk-Y6O2OCUO.js";
|
|
12
|
+
import "./chunk-HBSWHQNJ.js";
|
|
13
|
+
import "./chunk-UAIOHCUK.js";
|
|
14
|
+
import "./chunk-R36V2VP7.js";
|
|
15
|
+
import "./chunk-JRWWGMK7.js";
|
|
16
|
+
import "./chunk-INNOYXCP.js";
|
|
17
|
+
import "./chunk-PA2ZKHJC.js";
|
|
18
|
+
import "./chunk-PPYSEKFM.js";
|
|
19
|
+
import "./chunk-TBKU5XQI.js";
|
|
20
|
+
import "./chunk-TSWPNOYM.js";
|
|
21
|
+
import "./chunk-KDIKRJGB.js";
|
|
22
|
+
import "./chunk-ZEWMTR5M.js";
|
|
23
|
+
import "./chunk-PUIRNYI7.js";
|
|
24
|
+
import "./chunk-C7T7WEK2.js";
|
|
25
|
+
import "./chunk-JTHWEDEW.js";
|
|
26
|
+
import "./chunk-2XU6OGEN.js";
|
|
27
|
+
import "./chunk-HHXFIHXC.js";
|
|
28
|
+
import "./chunk-X3BTXCJ4.js";
|
|
29
|
+
import "./chunk-J3KDJNX2.js";
|
|
30
|
+
import "./chunk-X5YKXC6V.js";
|
|
31
|
+
import "./chunk-YCGY7UIZ.js";
|
|
32
|
+
import "./chunk-UPAMRDX4.js";
|
|
33
|
+
import "./chunk-ODT47UAY.js";
|
|
34
|
+
import "./chunk-7WSD27QQ.js";
|
|
35
|
+
import "./chunk-SYDW647C.js";
|
|
36
|
+
import "./chunk-IFAV6KEM.js";
|
|
37
|
+
import "./chunk-LRRD7NAG.js";
|
|
38
|
+
import "./chunk-53UPUNBZ.js";
|
|
39
|
+
export {
|
|
40
|
+
ADAPTERS,
|
|
41
|
+
resolveAdapter
|
|
42
|
+
};
|
|
43
|
+
//# sourceMappingURL=adapters.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
import { JudgeArtifactReceipt, BenchScore } from './types.js';
|
|
2
|
+
import '@tangle-network/agent-runtime/loops';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Shared code-bench harness. The "stage the artifact → run the benchmark's own
|
|
6
|
+
* evaluator in an external process (mkdtemp / execFile / .venv python / Docker)
|
|
7
|
+
* → read its JSON report → { resolved, score }" spine that swe-bench,
|
|
8
|
+
* terminal-bench, commit0, programbench and aec-bench all need. Factored out so
|
|
9
|
+
* the Docker/venv/report-reading logic lives in ONE place instead of being
|
|
10
|
+
* copy-pasted per adapter.
|
|
11
|
+
*
|
|
12
|
+
* It owns NO benchmark policy: each adapter passes the argv for its evaluator
|
|
13
|
+
* and a `parseReport` that maps that evaluator's report JSON → a BenchScore. The
|
|
14
|
+
* harness owns process spawning, temp-dir lifecycle, large-buffer/timeout config
|
|
15
|
+
* and fail-loud diagnostics.
|
|
16
|
+
*
|
|
17
|
+
* Fail-loud: an absent .venv / harness / Docker daemon THROWS from `preflight`
|
|
18
|
+
* (the adapter passes the import line + the exact fix). A staged run that exits
|
|
19
|
+
* nonzero throws with the captured stderr — never a fabricated score.
|
|
20
|
+
*/
|
|
21
|
+
|
|
22
|
+
/** Repo root for the bench package (…/bench), so `.venv` and `fixtures` resolve. */
|
|
23
|
+
declare const benchRoot: string;
|
|
24
|
+
/** Resolve the shared interpreter without requiring an installed package to contain a venv. */
|
|
25
|
+
declare function resolveBenchPython(env?: Readonly<{
|
|
26
|
+
AGENT_BENCH_PYTHON?: string;
|
|
27
|
+
}>, root?: string): string;
|
|
28
|
+
/** The shared interpreter every Python-backed evaluator runs through. */
|
|
29
|
+
declare const venvPython: string;
|
|
30
|
+
/** Interpreter for a NAMED isolated venv (e.g. `.venv-commit0`). Benches whose pip
|
|
31
|
+
* deps conflict with the shared `.venv` (commit0 downgrades pydantic/sqlalchemy)
|
|
32
|
+
* get their own venv and pass its python explicitly — keeping the shared one clean. */
|
|
33
|
+
declare const venvPythonAt: (venvDir: string) => string;
|
|
34
|
+
/** Report/transcript reads are large; 256 MiB matches the SWE harness budget. */
|
|
35
|
+
declare const bigBuffer: number;
|
|
36
|
+
/** Path to a named executable inside the bench venv (e.g. `venvBin('tb')`). */
|
|
37
|
+
declare function venvBin(name: string): string;
|
|
38
|
+
/**
|
|
39
|
+
* Run the bench venv python with an inline script (`-c`); return stdout. Throws
|
|
40
|
+
* (with stderr) on a nonzero exit — the loaders rely on this to fail loud rather
|
|
41
|
+
* than parse a partial dump.
|
|
42
|
+
*/
|
|
43
|
+
declare function runVenvPython(script: string, args?: string[], timeoutMs?: number, python?: string): Promise<string>;
|
|
44
|
+
/**
|
|
45
|
+
* Preflight a python-backed harness: import the module(s) and (optionally) ping
|
|
46
|
+
* Docker, all inside the bench venv. On failure THROWS the captured error joined
|
|
47
|
+
* to the adapter's `fix` guidance — the contract every code-bench preflight wants.
|
|
48
|
+
*/
|
|
49
|
+
declare function preflightVenvImports(opts: {
|
|
50
|
+
/** Module names to `import` (e.g. ['swebench']); '' entries are ignored. */
|
|
51
|
+
modules: string[];
|
|
52
|
+
/** Also `docker.from_env().ping()` — true for Docker-backed evaluators. */
|
|
53
|
+
requireDocker?: boolean;
|
|
54
|
+
/** Actionable remediation appended to the thrown message. */
|
|
55
|
+
fix: string;
|
|
56
|
+
/** Override the interpreter (e.g. an isolated `.venv-commit0`). Default: shared `.venv`. */
|
|
57
|
+
python?: string;
|
|
58
|
+
}): Promise<void>;
|
|
59
|
+
/**
|
|
60
|
+
* Run a bench-local python driver script (in the bench venv) while piping
|
|
61
|
+
* `input` to its stdin, returning stdout. The driver's verdict JSON is its LAST
|
|
62
|
+
* stdout line; callers parse that and inspect an `error` field (fail loud).
|
|
63
|
+
*
|
|
64
|
+
* Uses spawn + an explicit `stdin.end(input)` rather than promisify(execFile)'s
|
|
65
|
+
* `input` option, because that option is NOT honored by async execFile — stdin
|
|
66
|
+
* is left open and a driver that does `sys.stdin.read()` blocks forever. The
|
|
67
|
+
* artifact-piping judges (commit0, appworld) MUST go through this.
|
|
68
|
+
*/
|
|
69
|
+
declare function runVenvScriptStdin(scriptPath: string, args: string[], input: string, opts?: {
|
|
70
|
+
cwd?: string;
|
|
71
|
+
timeoutMs?: number;
|
|
72
|
+
python?: string;
|
|
73
|
+
}): Promise<string>;
|
|
74
|
+
interface StagedRunSpec {
|
|
75
|
+
/** mkdtemp prefix, e.g. 'swebench-' / 'commit0-'. */
|
|
76
|
+
tmpPrefix: string;
|
|
77
|
+
/**
|
|
78
|
+
* Write the artifact + any harness inputs into the temp dir. Returns nothing;
|
|
79
|
+
* `argv`/`cwd` consume `dir` to point the evaluator at what was written.
|
|
80
|
+
*/
|
|
81
|
+
stage(dir: string): Promise<void>;
|
|
82
|
+
/** The external evaluator to spawn. `bin` defaults to the bench venv python. */
|
|
83
|
+
bin?: string;
|
|
84
|
+
/** argv for the evaluator, computed from the temp `dir`. */
|
|
85
|
+
argv(dir: string): string[];
|
|
86
|
+
/** Working directory for the evaluator. Defaults to the temp `dir`. */
|
|
87
|
+
cwd?(dir: string): string;
|
|
88
|
+
/** Hard timeout for the evaluator (ms); 0 = none. */
|
|
89
|
+
timeoutMs?: number;
|
|
90
|
+
/**
|
|
91
|
+
* Read the evaluator's report(s) out of `dir` and map to a BenchScore. Throws
|
|
92
|
+
* if the expected report is absent/malformed (fail loud — no default score).
|
|
93
|
+
*/
|
|
94
|
+
parseReport(dir: string): Promise<BenchScore>;
|
|
95
|
+
/**
|
|
96
|
+
* Copy the complete evaluator directory plus raw process stdout/stderr to this
|
|
97
|
+
* caller-owned directory before cleanup. The destination must not exist.
|
|
98
|
+
*/
|
|
99
|
+
capture?: StagedRunCaptureSpec;
|
|
100
|
+
/** Keep the temp dir on disk (debugging). Default false → always cleaned up. */
|
|
101
|
+
keepTmp?: boolean;
|
|
102
|
+
}
|
|
103
|
+
interface StagedRunCaptureSpec {
|
|
104
|
+
/** Destination for `evaluator/`, `process/`, and the hashed `receipt.json`. */
|
|
105
|
+
destination: string;
|
|
106
|
+
}
|
|
107
|
+
/** A staged run failed after any requested evidence was durably retained. */
|
|
108
|
+
declare class StagedJudgeError extends Error {
|
|
109
|
+
readonly judgeArtifacts?: JudgeArtifactReceipt;
|
|
110
|
+
constructor(message: string, judgeArtifacts?: JudgeArtifactReceipt, options?: ErrorOptions);
|
|
111
|
+
}
|
|
112
|
+
/**
|
|
113
|
+
* The shared judge body: mkdtemp → stage → spawn evaluator → parseReport →
|
|
114
|
+
* cleanup. The evaluator's stdout/stderr is surfaced on failure; the temp dir is
|
|
115
|
+
* always removed in `finally` unless `keepTmp`.
|
|
116
|
+
*/
|
|
117
|
+
declare function runStagedJudge(spec: StagedRunSpec): Promise<BenchScore>;
|
|
118
|
+
/** Read + JSON.parse a report file from a staged run; throws with the path on failure. */
|
|
119
|
+
declare function readJsonReport<T>(path: string): Promise<T>;
|
|
120
|
+
/** Write a UTF-8 file into a staged dir (artifact / preds.json / attempt.sh / …). */
|
|
121
|
+
declare function stageFile(path: string, content: string): Promise<void>;
|
|
122
|
+
/** Sanitize an instance id into a filesystem/run-id-safe token. */
|
|
123
|
+
declare function safeRunId(prefix: string, id: string): string;
|
|
124
|
+
|
|
125
|
+
export { StagedJudgeError, type StagedRunCaptureSpec, type StagedRunSpec, benchRoot, bigBuffer, preflightVenvImports, readJsonReport, resolveBenchPython, runStagedJudge, runVenvPython, runVenvScriptStdin, safeRunId, stageFile, venvBin, venvPython, venvPythonAt };
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import {
|
|
2
|
+
StagedJudgeError,
|
|
3
|
+
benchRoot,
|
|
4
|
+
bigBuffer,
|
|
5
|
+
preflightVenvImports,
|
|
6
|
+
readJsonReport,
|
|
7
|
+
resolveBenchPython,
|
|
8
|
+
runStagedJudge,
|
|
9
|
+
runVenvPython,
|
|
10
|
+
runVenvScriptStdin,
|
|
11
|
+
safeRunId,
|
|
12
|
+
stageFile,
|
|
13
|
+
venvBin,
|
|
14
|
+
venvPython,
|
|
15
|
+
venvPythonAt
|
|
16
|
+
} from "../chunk-LRRD7NAG.js";
|
|
17
|
+
export {
|
|
18
|
+
StagedJudgeError,
|
|
19
|
+
benchRoot,
|
|
20
|
+
bigBuffer,
|
|
21
|
+
preflightVenvImports,
|
|
22
|
+
readJsonReport,
|
|
23
|
+
resolveBenchPython,
|
|
24
|
+
runStagedJudge,
|
|
25
|
+
runVenvPython,
|
|
26
|
+
runVenvScriptStdin,
|
|
27
|
+
safeRunId,
|
|
28
|
+
stageFile,
|
|
29
|
+
venvBin,
|
|
30
|
+
venvPython,
|
|
31
|
+
venvPythonAt
|
|
32
|
+
};
|
|
33
|
+
//# sourceMappingURL=_harness.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { BenchmarkAdapter } from './types.js';
|
|
2
|
+
import '@tangle-network/agent-runtime/loops';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* AEC-Bench adapter (TheodoreGalanos/aec-bench, MIT) — closed-form
|
|
6
|
+
* Architecture/Engineering/Construction calculation tasks. Worker artifact = a
|
|
7
|
+
* markdown solution ending in a fenced ```json block with the required numeric
|
|
8
|
+
* fields. Judge = the task's OWN `tests/verify.py`, run with python3: it
|
|
9
|
+
* recomputes ground truth from the embedded engineering formulas, extracts the
|
|
10
|
+
* last JSON block from the artifact, scores each field by math.isclose within a
|
|
11
|
+
* per-field rel_tol, and writes {"reward": mean} + per-field details.json.
|
|
12
|
+
* GRADED / partial-credit, FULLY DETERMINISTIC — no LLM judge.
|
|
13
|
+
*
|
|
14
|
+
* Distinct from the multimodal nomic-ai/aec-bench; this is the deterministic
|
|
15
|
+
* calculation platform. The runnable-instance verify.py only needs python3 (no
|
|
16
|
+
* Docker, no Harbor) for the pure-calc disciplines, so the local gate runs at
|
|
17
|
+
* conc<=2 without a container backend.
|
|
18
|
+
*
|
|
19
|
+
* Requires for a live run: network to raw.githubusercontent.com /
|
|
20
|
+
* api.github.com (the in-repo tasks tree) + a python3 interpreter (the bench
|
|
21
|
+
* venv) to run verify.py. For offline/CI, set AEC_FIXTURES=1 to load the
|
|
22
|
+
* committed fixtures (bench/fixtures/aec-bench.json) — never a silent fallback.
|
|
23
|
+
*/
|
|
24
|
+
|
|
25
|
+
declare function createAecBenchAdapter(): BenchmarkAdapter;
|
|
26
|
+
|
|
27
|
+
export { createAecBenchAdapter };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { OutputAdapter } from '@tangle-network/agent-runtime/loops';
|
|
2
|
+
import { BenchmarkAdapter } from './types.js';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* AgentBench deterministic subset adapter.
|
|
6
|
+
*
|
|
7
|
+
* This targets AgentBench DBBench rows only: question + table + published label.
|
|
8
|
+
* It does not wrap AgentBench's controller protocol or the non-deterministic game
|
|
9
|
+
* environments. Worker artifact = final answer text. Judge = exact match against
|
|
10
|
+
* the official DBBench label list after light whitespace/case normalization.
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
declare const agentbenchAnswerOutput: OutputAdapter<string>;
|
|
14
|
+
declare function createAgentBenchAdapter(): BenchmarkAdapter;
|
|
15
|
+
|
|
16
|
+
export { agentbenchAnswerOutput, createAgentBenchAdapter };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { OutputAdapter } from '@tangle-network/agent-runtime/loops';
|
|
2
|
+
import { BenchmarkAdapter } from './types.js';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* AppWorld adapter (StonyBrookNLP/appworld). Worker artifact = the agent's
|
|
6
|
+
* Python solution that calls the simulated apps' APIs (the same `apis.<app>.<fn>`
|
|
7
|
+
* surface AppWorld exposes inside `world.execute(...)`), ending in
|
|
8
|
+
* `apis.supervisor.complete_task()`. Judge = AppWorld's OWN programmatic
|
|
9
|
+
* evaluator: a driver runs the solution in a fresh `AppWorld(task_id=...)` world,
|
|
10
|
+
* then `world.evaluate().to_dict()` reports `success` (binary TGC), `num_tests`
|
|
11
|
+
* (per-requirement total) and the `passes`/`failures` lists. Score =
|
|
12
|
+
* passes / num_tests — GRADED; resolved = success. Fully deterministic — no LLM judge.
|
|
13
|
+
*
|
|
14
|
+
* loadTasks enumerates the real task suite via `load_task_ids(split)`
|
|
15
|
+
* (train|dev|test_normal|test_challenge); the prompt = `world.task.instruction`.
|
|
16
|
+
* The OutputAdapter is stream-only, so the worker emits its solution as a fenced
|
|
17
|
+
* ```python block which the driver executes.
|
|
18
|
+
*
|
|
19
|
+
* Requires for a live run: the bench `.venv` with `appworld` installed + the
|
|
20
|
+
* unpacked engine + downloaded data (`appworld install` ; `appworld download
|
|
21
|
+
* data`). preflight + loadTasks + judge all fail loud with the exact step when the
|
|
22
|
+
* engine/data is absent — never a fabricated score.
|
|
23
|
+
*/
|
|
24
|
+
|
|
25
|
+
/** Worker solution code = the last fenced ```python block, else the raw text. */
|
|
26
|
+
declare const appworldSolutionOutput: OutputAdapter<string>;
|
|
27
|
+
declare function createAppWorldAdapter(): BenchmarkAdapter;
|
|
28
|
+
/** SandboxClient whose leaf is OUR routerToolLoop driving a persistent world session. */
|
|
29
|
+
declare function appworldToolLoopClient(cfg: {
|
|
30
|
+
model: string;
|
|
31
|
+
routerBaseUrl: string;
|
|
32
|
+
routerKey: string;
|
|
33
|
+
maxTurns?: number;
|
|
34
|
+
}): unknown;
|
|
35
|
+
declare function createAppWorldReactAdapter(): BenchmarkAdapter;
|
|
36
|
+
|
|
37
|
+
export { appworldSolutionOutput, appworldToolLoopClient, createAppWorldAdapter, createAppWorldReactAdapter };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import {
|
|
2
|
+
appworldSolutionOutput,
|
|
3
|
+
appworldToolLoopClient,
|
|
4
|
+
createAppWorldAdapter,
|
|
5
|
+
createAppWorldReactAdapter
|
|
6
|
+
} from "../chunk-SYDW647C.js";
|
|
7
|
+
import "../chunk-LRRD7NAG.js";
|
|
8
|
+
export {
|
|
9
|
+
appworldSolutionOutput,
|
|
10
|
+
appworldToolLoopClient,
|
|
11
|
+
createAppWorldAdapter,
|
|
12
|
+
createAppWorldReactAdapter
|
|
13
|
+
};
|
|
14
|
+
//# sourceMappingURL=appworld.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { OutputAdapter } from '@tangle-network/agent-runtime/loops';
|
|
2
|
+
import { BenchmarkAdapter } from './types.js';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Berkeley Function Calling Leaderboard adapter.
|
|
6
|
+
*
|
|
7
|
+
* Scope: deterministic function-call ground-truth categories from the official
|
|
8
|
+
* BFCL data files. This is NOT the full live BFCL leaderboard evaluator: agentic
|
|
9
|
+
* web-search/memory categories and BFCL's own model-response harness remain
|
|
10
|
+
* upstream responsibilities. The adapter loads official JSONL rows plus their
|
|
11
|
+
* `possible_answer` file and scores structured function-call artifacts against
|
|
12
|
+
* allowed function/argument values.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
declare const bfclOutput: OutputAdapter<string>;
|
|
16
|
+
declare function createBfclAdapter(): BenchmarkAdapter;
|
|
17
|
+
|
|
18
|
+
export { bfclOutput, createBfclAdapter };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { BenchmarkAdapter } from './types.js';
|
|
2
|
+
import '@tangle-network/agent-runtime/loops';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* CAD-Design adapter. Worker artifact = OpenSCAD source (`.scad`). Judge = the
|
|
6
|
+
* REAL OpenSCAD engine: compile + export STL, then measure the produced solid
|
|
7
|
+
* geometry against the task's spec. Fully deterministic — the authoritative CAD
|
|
8
|
+
* kernel is the gate, not an LLM and not the agent's own claim.
|
|
9
|
+
*
|
|
10
|
+
* This is verifiable-reward CAD: an agent is far better at *writing* exact
|
|
11
|
+
* parametric code than at clicking a GUI, and the kernel either produces the
|
|
12
|
+
* specified geometry or it doesn't. Every judged artifact also renders a PNG,
|
|
13
|
+
* so a refine loop's attempts become a watchable "model getting better" reel
|
|
14
|
+
* (run-capsule consumes the renders).
|
|
15
|
+
*
|
|
16
|
+
* Spec checks are geometric and ungameable:
|
|
17
|
+
* - compiles : `openscad -o out.stl` exits 0 (hard gate)
|
|
18
|
+
* - volumes : disconnected-solid count within [min,max]
|
|
19
|
+
* - bbox : overall X/Y/Z extent within bounds (the thing is the right size)
|
|
20
|
+
* - detail : triangle count ≥ floor (not a degenerate single cube)
|
|
21
|
+
* - pitchedRoof : the top band's XY footprint NARROWS vs the base — a flat
|
|
22
|
+
* box can't fake this; a real gabled/hipped roof tapers
|
|
23
|
+
* - hollow : interior cavity present (walls, not a solid block) — the
|
|
24
|
+
* bbox volume materially exceeds the printed solid volume
|
|
25
|
+
*
|
|
26
|
+
* Requires only `openscad` + `xvfb-run` on PATH (no venv, no Docker, no network).
|
|
27
|
+
*/
|
|
28
|
+
|
|
29
|
+
/** Spec assertions a CAD task can require. All are deterministic + geometric. */
|
|
30
|
+
interface CadSpec {
|
|
31
|
+
volumes?: [number, number];
|
|
32
|
+
bbox?: {
|
|
33
|
+
x?: [number, number];
|
|
34
|
+
y?: [number, number];
|
|
35
|
+
z?: [number, number];
|
|
36
|
+
};
|
|
37
|
+
minTriangles?: number;
|
|
38
|
+
/** Top-band XY footprint must be < this fraction of the base footprint. */
|
|
39
|
+
pitchedRoof?: number;
|
|
40
|
+
/** Printed solid volume must be < this fraction of the bbox volume (hollow). */
|
|
41
|
+
hollowBelow?: number;
|
|
42
|
+
}
|
|
43
|
+
declare function createCadDesignAdapter(): BenchmarkAdapter;
|
|
44
|
+
|
|
45
|
+
export { type CadSpec, createCadDesignAdapter };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { BenchmarkAdapter } from './types.js';
|
|
2
|
+
import '@tangle-network/agent-runtime/loops';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* CADBench / BlenderLLM adapter (FreedomIntelligence/CADBench, arXiv:2412.14203).
|
|
6
|
+
* Task = NL instruction → a Blender `bpy` script. Score = the paper's criteria
|
|
7
|
+
* eval: render the produced model to standardized views, then a vision judge
|
|
8
|
+
* (GPT-4o-class) marks each per-task criterion bullet pass/fail against the
|
|
9
|
+
* rendered images + the script text. score = fraction of criteria satisfied.
|
|
10
|
+
*
|
|
11
|
+
* Data: the published dataset's `criteria` flattened to a bullet list (700 tasks,
|
|
12
|
+
* 500 Simulative + 200 Wild). Point CADBENCH_PATH at the cleaned JSONL
|
|
13
|
+
* ({id,name,instruction,type,criteria:string[]} per line). Judge creds from
|
|
14
|
+
* TANGLE_API_KEY / ROUTER_BASE / JUDGE_MODEL (default gpt-4o).
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
declare function createCadBenchAdapter(): BenchmarkAdapter;
|
|
18
|
+
|
|
19
|
+
export { createCadBenchAdapter };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { BenchmarkAdapter } from './types.js';
|
|
2
|
+
import '@tangle-network/agent-runtime/loops';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* CADGenBench adapter (huggingface/cadgenbench, Apache-2.0). Task = a part
|
|
6
|
+
* description → a STEP B-rep solid (output.step). Score = the benchmark's OWN
|
|
7
|
+
* deterministic geometric metric (cad_score): validity gate → PCA/ICP align to
|
|
8
|
+
* the ground truth → point-cloud F1 + volume IoU + edge F1 + topology match.
|
|
9
|
+
* NOT an LLM judge, NOT self-defined checks — the published CAD kernel decides.
|
|
10
|
+
*
|
|
11
|
+
* The official task set (private GT, server-side graded) isn't released yet, so
|
|
12
|
+
* tasks here are seeded from the repo's dimension-named geometry fixtures (real
|
|
13
|
+
* GT STEPs scored by the real scorer). When CADGENBENCH_DATA_DIR is set, swap
|
|
14
|
+
* loadTasks to read the published fixtures' description.yaml + ground_truth.step.
|
|
15
|
+
*
|
|
16
|
+
* Requires the CADGenBench venv (CADGENBENCH_VENV) + clone (CADGENBENCH_DIR) +
|
|
17
|
+
* xvfb (the scorer's alignment renders need a display).
|
|
18
|
+
*/
|
|
19
|
+
|
|
20
|
+
declare function createCadGenBenchAdapter(): BenchmarkAdapter;
|
|
21
|
+
|
|
22
|
+
export { createCadGenBenchAdapter };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { OutputAdapter } from '@tangle-network/agent-runtime/loops';
|
|
2
|
+
import { BenchmarkAdapter } from './types.js';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Commit0 adapter (wentingzhao/commit0_combined) — implement-a-library-from-scratch.
|
|
6
|
+
* Each record is a Python repo stubbed at `base_commit` (public function bodies
|
|
7
|
+
* emptied to `pass`) + the full test suite + a natural-language spec URL. Worker
|
|
8
|
+
* artifact = a unified diff that fills in `src_dir`. Judge = the official
|
|
9
|
+
* `commit0` test harness: it stages the starter repo, applies the worker's diff,
|
|
10
|
+
* builds the library's deps and runs `pytest`, writing a per-repo pytest-json
|
|
11
|
+
* `report.json`. Score = (passed + xfail) / total — GRADED / partial-credit (the
|
|
12
|
+
* macro-averaged unit-test pass-rate the leaderboard reports). Fully
|
|
13
|
+
* deterministic — no LLM judge.
|
|
14
|
+
*
|
|
15
|
+
* The OutputAdapter is stream-only (the SWE wrinkle), so the worker emits its
|
|
16
|
+
* implementation as a fenced ```diff against the stubbed repo — same deliverable
|
|
17
|
+
* shape as swe-bench. The expensive per-repo clone+build+test is delegated to the
|
|
18
|
+
* real `commit0` harness on a local Docker backend (NOT reimplemented here).
|
|
19
|
+
*
|
|
20
|
+
* Requires for a live run: an ISOLATED `.venv-commit0` with `commit0` installed
|
|
21
|
+
* (its deps conflict with the shared bench `.venv`; override with COMMIT0_VENV) +
|
|
22
|
+
* a Docker daemon (`--backend local`). For offline/CI dataset listing set
|
|
23
|
+
* COMMIT0_FIXTURES=1 to load the committed lite rows (bench/fixtures/commit0.json)
|
|
24
|
+
* — judging still needs the harness + Docker and fails loud, never a fabricated score.
|
|
25
|
+
*/
|
|
26
|
+
|
|
27
|
+
/** Reuse the SWE patch extractor shape: last fenced diff/patch, else raw text. */
|
|
28
|
+
declare const commit0DiffOutput: OutputAdapter<string>;
|
|
29
|
+
declare function createCommit0Adapter(): BenchmarkAdapter;
|
|
30
|
+
|
|
31
|
+
export { commit0DiffOutput, createCommit0Adapter };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { BenchmarkAdapter } from './types.js';
|
|
2
|
+
import '@tangle-network/agent-runtime/loops';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* CRAG adapter (Comprehensive RAG Benchmark).
|
|
6
|
+
*
|
|
7
|
+
* Live mode expects an official or compatible CRAG JSON/JSONL export. The
|
|
8
|
+
* adapter preserves CRAG domain/type/dynamism tags in metadata and scores final
|
|
9
|
+
* answers deterministically against the provided gold answer list.
|
|
10
|
+
*/
|
|
11
|
+
|
|
12
|
+
declare function createCragAdapter(): BenchmarkAdapter;
|
|
13
|
+
|
|
14
|
+
export { createCragAdapter };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { OutputAdapter } from '@tangle-network/agent-runtime/loops';
|
|
2
|
+
import { BenchmarkAdapter } from './types.js';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* DABStep adapter (EnvCommons/DABStep) — data-analysis questions over synthetic
|
|
6
|
+
* payment files. Worker artifact = final answer text. Judge = the official
|
|
7
|
+
* DABStep `grade.py` normalization/matching function. No LLM judge.
|
|
8
|
+
*
|
|
9
|
+
* Live tasks require `DABSTEP_DIR` pointing at an official DABStep checkout that
|
|
10
|
+
* includes `dataset.csv`, `splits/*.txt`, `files/*`, and `grade.py`. The adapter
|
|
11
|
+
* exposes `metadata.resourceRoot` so runners can mount the benchmark files into
|
|
12
|
+
* AgentProfile.resources.files; it does not paste the dataset into prompt text.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
declare const dabstepAnswerOutput: OutputAdapter<string>;
|
|
16
|
+
declare function createDabstepAdapter(): BenchmarkAdapter;
|
|
17
|
+
|
|
18
|
+
export { createDabstepAdapter, dabstepAnswerOutput };
|