@tangle-network/agent-bench 0.3.5 → 0.3.7
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 +13 -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 +62 -0
- package/dist/benchmarks/humaneval.js +17 -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-5H5XV76F.js +240 -0
- package/dist/chunk-5H5XV76F.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-PUIRNYI7.js +189 -0
- package/dist/chunk-PUIRNYI7.js.map +1 -0
- package/dist/chunk-PWQVGAJB.js +144 -0
- package/dist/chunk-PWQVGAJB.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 +26 -9
- package/scripts/run-package-tests.mjs +30 -8
- package/scripts/verify-packed-consumer.mjs +12 -1
- package/scripts/verify-pier-agent.mts +1 -0
- package/src/benchmarks/humaneval.test.mts +122 -0
- package/src/benchmarks/humaneval.ts +100 -27
- package/src/david-attribution.mts +78 -0
- package/src/david-goliath.mts +149 -0
- package/src/hev-improve.mts +25 -6
- package/src/humaneval-object-ablation.mts +201 -0
- package/src/live-improve-campaign-mbpp.mts +641 -0
- package/src/live-improve-campaign.mts +500 -0
- package/src/mbpp-structural.mts +12 -7
- package/src/stream-observe.py +45 -0
- package/src/stream-observe.tpl.html +247 -0
- package/src/supervisor-arena.mts +816 -0
- package/src/swe-arena/analyze.ts +211 -0
- package/src/swe-arena/arms.ts +788 -0
- package/src/swe-arena/bootstrap-meta.mts +188 -0
- package/src/swe-arena/bootstrap-meta.test.mts +51 -0
- package/src/swe-arena/calibrate.ts +116 -0
- package/src/swe-arena/capabilities.mts +76 -0
- package/src/swe-arena/capabilities.test.mts +57 -0
- package/src/swe-arena/capacity.ts +194 -0
- package/src/swe-arena/cell-evidence.mts +405 -0
- package/src/swe-arena/cell-evidence.test.mts +248 -0
- package/src/swe-arena/diagnosis-ensemble.test.mts +210 -0
- package/src/swe-arena/diagnosis-ensemble.ts +520 -0
- package/src/swe-arena/execution.test.mts +1170 -0
- package/src/swe-arena/fixtures/analyze.py +80 -0
- package/src/swe-arena/fixtures/excludes.txt +8 -0
- package/src/swe-arena/fixtures/gen1-salvage/README.md +45 -0
- package/src/swe-arena/fixtures/gen1-salvage/cand0-e6d7361.diff +116 -0
- package/src/swe-arena/fixtures/gen1-salvage/cand1-76a8590.diff +293 -0
- package/src/swe-arena/fixtures/holdout-preregister.log +12 -0
- package/src/swe-arena/fixtures/holdout.json +44 -0
- package/src/swe-arena/fixtures/instances.json +146 -0
- package/src/swe-arena/fixtures/ledger.jsonl +12 -0
- package/src/swe-arena/fixtures/patches/pallets__flask-5014.solo.patch +36 -0
- package/src/swe-arena/fixtures/patches/pydata__xarray-4687.sup.patch +33 -0
- package/src/swe-arena/fixtures/rejudge.jsonl +15 -0
- package/src/swe-arena/fixtures/rematch.jsonl +3 -0
- package/src/swe-arena/fixtures/rematch2.jsonl +3 -0
- package/src/swe-arena/fixtures/rematch3.jsonl +3 -0
- package/src/swe-arena/fixtures/sup-journal-true.json +19 -0
- package/src/swe-arena/fixtures/verify/astropy__astropy-13033.sh +48 -0
- package/src/swe-arena/fixtures/verify/django__django-11532.sh +50 -0
- package/src/swe-arena/fixtures/verify/matplotlib__matplotlib-20826.sh +76 -0
- package/src/swe-arena/fixtures/verify/pydata__xarray-4687.sh +44 -0
- package/src/swe-arena/fixtures/verify/pytest-dev__pytest-6197.sh +32 -0
- package/src/swe-arena/fixtures/verify/sphinx-doc__sphinx-9658.sh +51 -0
- package/src/swe-arena/fixtures/worker-tokens.json +42 -0
- package/src/swe-arena/fixtures.ts +104 -0
- package/src/swe-arena/holdout-certify.mts +408 -0
- package/src/swe-arena/holdout-certify.test.mts +160 -0
- package/src/swe-arena/judge-child.mts +37 -0
- package/src/swe-arena/manifest.mts +293 -0
- package/src/swe-arena/manifest.test.mts +169 -0
- package/src/swe-arena/materialize.ts +142 -0
- package/src/swe-arena/outer-loop.mts +2145 -0
- package/src/swe-arena/outer-loop.test.mts +696 -0
- package/src/swe-arena/parity.test.mts +87 -0
- package/src/swe-arena/proc.test.mts +174 -0
- package/src/swe-arena/proc.ts +260 -0
- package/src/swe-arena/profiles/default-author.profile.json +4 -0
- package/src/swe-arena/proposer-fanout.mts +489 -0
- package/src/swe-arena/proposer-fanout.test.mts +372 -0
- package/src/swe-arena/reconcile.ts +0 -0
- package/src/swe-arena/replay.mts +183 -0
- package/src/swe-arena/replay.test.mts +300 -0
- package/src/swe-arena/run-experiment.mts +361 -0
- package/src/swe-arena/run-supervisor.mjs +297 -0
- package/src/swe-arena/run-supervisor.test.mts +498 -0
- package/src/swe-arena/serialized-judge.ts +414 -0
- package/src/swe-arena/types.ts +166 -0
- package/src/swe-code-improve.mts +328 -0
- package/src/swe-emit-patch.mts +104 -0
- package/src/swe-improve.mts +232 -0
- package/src/swe-jail.ts +2 -2
- package/src/swe-local-proof.mts +169 -0
- package/src/swe-repro-calibrate.mts +446 -0
- package/src/swe-stream.mts +1497 -0
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import {
|
|
2
|
+
FINAL_ANSWER_SENTINEL,
|
|
3
|
+
allStrings,
|
|
4
|
+
answerScoreToBenchScore,
|
|
5
|
+
contextBlock,
|
|
6
|
+
contextsFrom,
|
|
7
|
+
firstString,
|
|
8
|
+
isObject,
|
|
9
|
+
normalizeAnswer,
|
|
10
|
+
parseCitations,
|
|
11
|
+
parseFinalAnswer,
|
|
12
|
+
ragAnswerOutput,
|
|
13
|
+
readJsonRows,
|
|
14
|
+
scoreAnswerArtifact,
|
|
15
|
+
selectTasks,
|
|
16
|
+
stringArrayFrom,
|
|
17
|
+
stringFrom,
|
|
18
|
+
tokenF1
|
|
19
|
+
} from "../chunk-X3BTXCJ4.js";
|
|
20
|
+
export {
|
|
21
|
+
FINAL_ANSWER_SENTINEL,
|
|
22
|
+
allStrings,
|
|
23
|
+
answerScoreToBenchScore,
|
|
24
|
+
contextBlock,
|
|
25
|
+
contextsFrom,
|
|
26
|
+
firstString,
|
|
27
|
+
isObject,
|
|
28
|
+
normalizeAnswer,
|
|
29
|
+
parseCitations,
|
|
30
|
+
parseFinalAnswer,
|
|
31
|
+
ragAnswerOutput,
|
|
32
|
+
readJsonRows,
|
|
33
|
+
scoreAnswerArtifact,
|
|
34
|
+
selectTasks,
|
|
35
|
+
stringArrayFrom,
|
|
36
|
+
stringFrom,
|
|
37
|
+
tokenF1
|
|
38
|
+
};
|
|
39
|
+
//# sourceMappingURL=rag-shared.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { BenchmarkAdapter } from './types.js';
|
|
2
|
+
import '@tangle-network/agent-runtime/loops';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* RAGBench-compatible adapter.
|
|
6
|
+
*
|
|
7
|
+
* Live mode expects a local JSON/JSONL export from rungalileo/ragbench or a
|
|
8
|
+
* compatible table. Rows must carry a query and at least one reference answer.
|
|
9
|
+
* Contexts, TRACe labels, and source metadata are preserved in task metadata
|
|
10
|
+
* for diagnostics; the deterministic judge scores the worker's final answer
|
|
11
|
+
* against the reference answer(s).
|
|
12
|
+
*/
|
|
13
|
+
|
|
14
|
+
declare function createRagBenchAdapter(): BenchmarkAdapter;
|
|
15
|
+
|
|
16
|
+
export { createRagBenchAdapter };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { BenchmarkAdapter } from './types.js';
|
|
2
|
+
import '@tangle-network/agent-runtime/loops';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* SimpleQA adapter (OpenAI simple-evals; short-form factual QA). Worker artifact
|
|
6
|
+
* = a single free-text final answer string (optionally preceded by a CITATIONS:
|
|
7
|
+
* block). Each item ships a short gold `answer` plus metadata (topic,
|
|
8
|
+
* answer_type, source urls).
|
|
9
|
+
*
|
|
10
|
+
* Judge is the official SimpleQA grader — an LLM classifier that maps
|
|
11
|
+
* (question, gold target, predicted answer) to exactly one of:
|
|
12
|
+
* A = CORRECT — fully contains the gold, no contradiction
|
|
13
|
+
* B = INCORRECT — contradicts / contains a different factual value
|
|
14
|
+
* C = NOT_ATTEMPTED — hedged, non-committal, or no value given
|
|
15
|
+
* resolved = (grade == CORRECT). score = 1 for CORRECT else 0. The grade letter
|
|
16
|
+
* (with its label) rides in `detail`; NOT_ATTEMPTED is surfaced distinctly from
|
|
17
|
+
* INCORRECT so the scorecard can separate abstention from error.
|
|
18
|
+
*
|
|
19
|
+
* There is no deterministic tier: SimpleQA's rubric (containment + abstention)
|
|
20
|
+
* is the grader's job by design, so judge() always calls the pinned grader model
|
|
21
|
+
* (temperature 0) and fails loud on unparseable grader output. The final-answer
|
|
22
|
+
* extraction IS deterministic (FINAL ANSWER: sentinel, fail-closed to '').
|
|
23
|
+
*
|
|
24
|
+
* Requires for a live run: the bench `.venv` with `datasets`/`requests` not
|
|
25
|
+
* needed — the test set is a single public CSV fetched over HTTP — plus a
|
|
26
|
+
* grader key (TANGLE_API_KEY). For offline/CI verification set
|
|
27
|
+
* SIMPLEQA_FIXTURES=1 to load the committed fixtures
|
|
28
|
+
* (bench/fixtures/simpleqa.json) — no network.
|
|
29
|
+
*/
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* Typed seam for the research worker. The benchmark adapter scores a plain
|
|
33
|
+
* `string` artifact (the BenchmarkAdapter contract); the loop worker decodes its
|
|
34
|
+
* agent runs into a {@link ResearchAnswer} and serializes `finalAnswer` (+ an
|
|
35
|
+
* optional `CITATIONS:` block) into that string before judging.
|
|
36
|
+
*/
|
|
37
|
+
interface ResearchTask {
|
|
38
|
+
id: string;
|
|
39
|
+
question: string;
|
|
40
|
+
/** Gold short answer — the grader's target. */
|
|
41
|
+
gold: string;
|
|
42
|
+
/** Source URLs cited by the dataset for this item — SOFT provenance signal, never a hard gate. */
|
|
43
|
+
goldSources: string[];
|
|
44
|
+
/** SimpleQA topic, e.g. 'Politics' — slices the scorecard by domain. */
|
|
45
|
+
topic: string;
|
|
46
|
+
/** SimpleQA answer_type, e.g. 'Person' | 'Date' | 'Number' | 'Place'. */
|
|
47
|
+
answerType: string;
|
|
48
|
+
}
|
|
49
|
+
interface ResearchAnswer {
|
|
50
|
+
finalAnswer: string;
|
|
51
|
+
citations: string[];
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* Parse the worker artifact into the final answer string.
|
|
55
|
+
* Order: the `FINAL ANSWER:` sentinel first (deterministic-extraction discipline);
|
|
56
|
+
* fall back to the last non-empty line. Returns '' when nothing is parseable
|
|
57
|
+
* (fail-closed — never guess); judge() grades '' as NOT_ATTEMPTED.
|
|
58
|
+
*/
|
|
59
|
+
declare function parseFinalAnswer(artifact: string): string;
|
|
60
|
+
/** Extract every bare URL in the artifact (CITATIONS: block + inline). SOFT provenance signal. */
|
|
61
|
+
declare function parseCitations(artifact: string): string[];
|
|
62
|
+
declare function createSimpleQaAdapter(): BenchmarkAdapter;
|
|
63
|
+
|
|
64
|
+
export { type ResearchAnswer, type ResearchTask, createSimpleQaAdapter, parseCitations, parseFinalAnswer };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { OutputAdapter } from '@tangle-network/agent-runtime/loops';
|
|
2
|
+
import { StagedRunCaptureSpec } from './_harness.js';
|
|
3
|
+
import { BenchmarkAdapter, BenchScore } from './types.js';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* SWE-bench Verified adapter. Worker artifact = a unified-diff patch. Judge =
|
|
7
|
+
* the official `swebench` harness: apply the patch in the instance's Docker
|
|
8
|
+
* image, run FAIL_TO_PASS + PASS_TO_PASS, report `resolved`. Fully deterministic
|
|
9
|
+
* — no LLM judge.
|
|
10
|
+
*
|
|
11
|
+
* Requires: the bench `.venv` with `swebench` installed + a running Docker
|
|
12
|
+
* daemon (per-instance images are pulled/built on first run).
|
|
13
|
+
*
|
|
14
|
+
* Process/Docker/report plumbing is shared via ./_harness; this file owns the
|
|
15
|
+
* SWE-specific pieces: the patch OutputAdapter, the dataset dump, and the
|
|
16
|
+
* predictions-file → run_evaluation argv → report-shape mapping.
|
|
17
|
+
*/
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* The SWE deliverable's FALLBACK parser, from the agent's event STREAM.
|
|
21
|
+
*
|
|
22
|
+
* The PRIMARY deliverable is `boxExtract` below: a `git diff` of the agent's
|
|
23
|
+
* actual edits, read from the cloned repo's STATE inside the box (standard
|
|
24
|
+
* SWE-bench practice). This event-stream parse only runs when that diff is empty
|
|
25
|
+
* — a model that edited the source correctly but never printed a fenced diff (the
|
|
26
|
+
* exact failure this replaces) still scores off its real changes, not its prose.
|
|
27
|
+
*/
|
|
28
|
+
declare const swePatchOutput: OutputAdapter<string>;
|
|
29
|
+
type SweBenchCacheLevel = 'none' | 'base' | 'env' | 'instance';
|
|
30
|
+
interface SweBenchArtifactCaptureContext {
|
|
31
|
+
readonly taskId: string;
|
|
32
|
+
readonly runId: string;
|
|
33
|
+
/** One-based sequence unique within this adapter instance. */
|
|
34
|
+
readonly attemptSequence: number;
|
|
35
|
+
}
|
|
36
|
+
interface SweBenchAdapterOptions {
|
|
37
|
+
readonly timeoutMs?: number;
|
|
38
|
+
readonly cacheLevel?: SweBenchCacheLevel;
|
|
39
|
+
/**
|
|
40
|
+
* Return a unique destination for any attempt whose complete official
|
|
41
|
+
* evaluator directory and process logs should be retained.
|
|
42
|
+
*/
|
|
43
|
+
readonly captureEvaluatorArtifacts?: (context: SweBenchArtifactCaptureContext) => StagedRunCaptureSpec | undefined;
|
|
44
|
+
}
|
|
45
|
+
/** Convert one official report into a score without turning evaluator failures into agent failures. */
|
|
46
|
+
declare function scoreSweReport(taskId: string, value: unknown): BenchScore;
|
|
47
|
+
declare function sweEvaluationArgv(args: {
|
|
48
|
+
readonly predictionsPath: string;
|
|
49
|
+
readonly runId: string;
|
|
50
|
+
readonly instanceId: string;
|
|
51
|
+
readonly cacheLevel: SweBenchCacheLevel;
|
|
52
|
+
readonly namespace?: 'swebench' | 'none';
|
|
53
|
+
}): string[];
|
|
54
|
+
declare function createSweBenchAdapter(options?: SweBenchAdapterOptions): BenchmarkAdapter;
|
|
55
|
+
|
|
56
|
+
export { type SweBenchAdapterOptions, type SweBenchArtifactCaptureContext, type SweBenchCacheLevel, createSweBenchAdapter, scoreSweReport, sweEvaluationArgv, swePatchOutput };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import {
|
|
2
|
+
createSweBenchAdapter,
|
|
3
|
+
scoreSweReport,
|
|
4
|
+
sweEvaluationArgv,
|
|
5
|
+
swePatchOutput
|
|
6
|
+
} from "../chunk-CKUVRZ2T.js";
|
|
7
|
+
import "../chunk-LRRD7NAG.js";
|
|
8
|
+
export {
|
|
9
|
+
createSweBenchAdapter,
|
|
10
|
+
scoreSweReport,
|
|
11
|
+
sweEvaluationArgv,
|
|
12
|
+
swePatchOutput
|
|
13
|
+
};
|
|
14
|
+
//# sourceMappingURL=swe-bench.js.map
|
|
@@ -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
|
+
* T2-RAGBench adapter.
|
|
6
|
+
*
|
|
7
|
+
* T2-RAGBench stresses text+table retrieval and numerical reasoning over
|
|
8
|
+
* financial documents. The judge uses the shared deterministic answer scorer
|
|
9
|
+
* with numeric tolerance enabled by default.
|
|
10
|
+
*/
|
|
11
|
+
|
|
12
|
+
declare function createT2RagBenchAdapter(): BenchmarkAdapter;
|
|
13
|
+
|
|
14
|
+
export { createT2RagBenchAdapter };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { OutputAdapter } from '@tangle-network/agent-runtime/loops';
|
|
2
|
+
import { BenchmarkAdapter } from './types.js';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Shared tau-bench adapter spine.
|
|
6
|
+
*
|
|
7
|
+
* tau2 and tau3 live in the same upstream repository/package namespace today:
|
|
8
|
+
* `sierra-research/tau2-bench`, Python package `tau2`. Keep one implementation
|
|
9
|
+
* for task loading and reward recomputation so the domain/version adapters only
|
|
10
|
+
* choose env names, default domain, and fixture file.
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
interface TauBenchConfig {
|
|
14
|
+
name: string;
|
|
15
|
+
fixturePath: string;
|
|
16
|
+
fixturesEnv: string;
|
|
17
|
+
dirEnv: string;
|
|
18
|
+
domainEnv: string;
|
|
19
|
+
defaultDomain: string;
|
|
20
|
+
installHint: string;
|
|
21
|
+
taskIntro: string;
|
|
22
|
+
}
|
|
23
|
+
declare const tauResultsOutput: OutputAdapter<string>;
|
|
24
|
+
declare function createTauBenchAdapter(config: TauBenchConfig): BenchmarkAdapter;
|
|
25
|
+
|
|
26
|
+
export { type TauBenchConfig, createTauBenchAdapter, tauResultsOutput };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import * as _tangle_network_agent_runtime_loops from '@tangle-network/agent-runtime/loops';
|
|
2
|
+
import { BenchmarkAdapter } from './types.js';
|
|
3
|
+
|
|
4
|
+
declare const tau2ResultsOutput: _tangle_network_agent_runtime_loops.OutputAdapter<string>;
|
|
5
|
+
declare function createTau2BenchAdapter(): BenchmarkAdapter;
|
|
6
|
+
|
|
7
|
+
export { createTau2BenchAdapter, tau2ResultsOutput };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { BenchmarkAdapter } from './types.js';
|
|
2
|
+
import '@tangle-network/agent-runtime/loops';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* tau3-banking adapter.
|
|
6
|
+
*
|
|
7
|
+
* The current upstream tau3 release is the `sierra-research/tau2-bench` repo with
|
|
8
|
+
* package namespace `tau2` and a new `banking_knowledge` domain. This adapter
|
|
9
|
+
* reuses the shared tau reward recomputation path and only changes the default
|
|
10
|
+
* domain/env names.
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
declare function createTau3BankingAdapter(): BenchmarkAdapter;
|
|
14
|
+
|
|
15
|
+
export { createTau3BankingAdapter };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { BenchmarkAdapter } from './types.js';
|
|
2
|
+
import '@tangle-network/agent-runtime/loops';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Terminal-Bench adapter. Each task = a Docker environment + an English
|
|
6
|
+
* instruction + a per-task verifier (run-tests.sh + pytest). The worker artifact
|
|
7
|
+
* is the shell script the agent ran to attempt the task; the judge REPLAYS that
|
|
8
|
+
* script in a fresh task container via the Terminal-Bench harness (`tb run` with
|
|
9
|
+
* our ScriptAgent), then the task's own verifier scores the resulting state.
|
|
10
|
+
* Fully deterministic — no LLM judge, no self-authored score.
|
|
11
|
+
*
|
|
12
|
+
* Requires: an isolated bench `.venv-terminal-bench` with `terminal-bench`
|
|
13
|
+
* installed + a running Docker daemon (per-task images are built on first run).
|
|
14
|
+
* Override with TERMINAL_BENCH_VENV. loadTasks caches the dataset from the
|
|
15
|
+
* Terminal-Bench registry on first run.
|
|
16
|
+
*
|
|
17
|
+
* Process/Docker/report plumbing is shared via ./_harness; this file owns the
|
|
18
|
+
* Terminal-Bench-specific pieces: the Dataset enumeration, the ScriptAgent replay
|
|
19
|
+
* argv, and the results.json shape.
|
|
20
|
+
*/
|
|
21
|
+
|
|
22
|
+
declare function createTerminalBenchAdapter(): BenchmarkAdapter;
|
|
23
|
+
|
|
24
|
+
export { createTerminalBenchAdapter };
|
|
@@ -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
|
+
* ToolLLM/ToolBench adapter.
|
|
6
|
+
*
|
|
7
|
+
* ToolBench task loading is useful for breadth, but the official ToolEval pass
|
|
8
|
+
* rate evaluator is LLM-based and stochastic. This adapter therefore scores
|
|
9
|
+
* only ToolBench's deterministic API-selection labels (`relevant APIs`). It
|
|
10
|
+
* never records a full ToolEval pass-rate score.
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
declare const toollmOutput: OutputAdapter<string>;
|
|
14
|
+
declare function createToolLlmAdapter(): BenchmarkAdapter;
|
|
15
|
+
|
|
16
|
+
export { createToolLlmAdapter, toollmOutput };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { BenchmarkAdapter } from './types.js';
|
|
2
|
+
import '@tangle-network/agent-runtime/loops';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Trata Hedge-Bench adapter (Trata-Inc/trata-hedge-bench). 102 financial
|
|
6
|
+
* analysis tasks across 6 domains (private equity, managed care, industrials,
|
|
7
|
+
* vertical SaaS, REITs, insurance). Each task bundles real earnings-call
|
|
8
|
+
* transcripts, financial statements, press releases, and SEC filings under
|
|
9
|
+
* `environment/data/`; the agent must produce a grounded analysis citing those
|
|
10
|
+
* files.
|
|
11
|
+
*
|
|
12
|
+
* Harbor architecture: the original benchmark runs each task in a Docker
|
|
13
|
+
* container with file-read tools. This adapter skips Harbor and embeds the data
|
|
14
|
+
* files directly in the worker prompt so any router backend can score it. Large
|
|
15
|
+
* files (> 30 KB) are truncated to fit within model context limits. The judge
|
|
16
|
+
* reads the actual files from disk for citation verification.
|
|
17
|
+
*
|
|
18
|
+
* Judge: a 3-stage LLM cascade faithful to grade.py —
|
|
19
|
+
* Task 1: hallucination check (cited-file context + agent answer)
|
|
20
|
+
* Task 2: per-move coverage check (ground truth + agent answer + flagged claims)
|
|
21
|
+
* Task 3: synthesis check (ground truth + agent answer)
|
|
22
|
+
* Score 0–4: themes_covered == num_themes && synthesis → 4, all themes → 3,
|
|
23
|
+
* ≥2 themes → 2, ≥1 theme → 1, else → 0. Normalized to 0..1 for BenchScore;
|
|
24
|
+
* resolved = score 4 (sparse reward).
|
|
25
|
+
*
|
|
26
|
+
* Requires TANGLE_API_KEY and TRATA_BENCH_ROOT=/tmp/trata-hedge-bench.
|
|
27
|
+
* Clone: git clone --depth 1 https://github.com/Trata-Inc/trata-hedge-bench /tmp/trata-hedge-bench
|
|
28
|
+
*/
|
|
29
|
+
|
|
30
|
+
declare function createTrataHedgeAdapter(): BenchmarkAdapter;
|
|
31
|
+
|
|
32
|
+
export { createTrataHedgeAdapter };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
import { OutputAdapter } from '@tangle-network/agent-runtime/loops';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* BenchmarkAdapter — the seam every external benchmark implements so the
|
|
5
|
+
* agent-runtime loop can be A/B'd (blind vs steering vs steering+memory) against
|
|
6
|
+
* a REAL, DETERMINISTIC judge. The worker produces an `artifact` (a patch, a
|
|
7
|
+
* command transcript, a final state); the benchmark's own harness scores it.
|
|
8
|
+
*
|
|
9
|
+
* The point: no self-authored judge, no invented score noise. The number comes
|
|
10
|
+
* from the benchmark's published evaluation harness.
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
interface BenchTask {
|
|
14
|
+
/** Stable benchmark instance id. */
|
|
15
|
+
id: string;
|
|
16
|
+
/** The task statement handed to the worker agent. */
|
|
17
|
+
prompt: string;
|
|
18
|
+
split?: string;
|
|
19
|
+
/** Benchmark-specific fields the worker/judge need (repo, base_commit, gold, …). */
|
|
20
|
+
metadata?: Record<string, unknown>;
|
|
21
|
+
}
|
|
22
|
+
interface JudgeArtifactFileReceipt {
|
|
23
|
+
/** POSIX path relative to the capture directory. */
|
|
24
|
+
path: string;
|
|
25
|
+
/** Exact byte length of the retained file or symbolic-link target. */
|
|
26
|
+
byteLength: number;
|
|
27
|
+
/** SHA-256 over the retained file bytes or UTF-8 symbolic-link target. */
|
|
28
|
+
sha256: `sha256:${string}`;
|
|
29
|
+
kind: 'file' | 'symlink';
|
|
30
|
+
}
|
|
31
|
+
/** Durable evidence written before a staged evaluator's temporary directory is removed. */
|
|
32
|
+
interface JudgeArtifactReceipt {
|
|
33
|
+
schema: 'agent-bench/judge-artifacts/v1';
|
|
34
|
+
/** Absolute directory containing `evaluator/`, `process/`, and `receipt.json`. */
|
|
35
|
+
directory: string;
|
|
36
|
+
/** Exact copy of the evaluator working directory. */
|
|
37
|
+
evaluatorDirectory: string;
|
|
38
|
+
manifestPath: string;
|
|
39
|
+
evaluatorSucceeded: boolean;
|
|
40
|
+
files: JudgeArtifactFileReceipt[];
|
|
41
|
+
fileCount: number;
|
|
42
|
+
byteLength: number;
|
|
43
|
+
/** SHA-256 over every sorted path, kind, byte length, and content hash. */
|
|
44
|
+
treeSha256: `sha256:${string}`;
|
|
45
|
+
}
|
|
46
|
+
interface BenchScore {
|
|
47
|
+
/** Did the deterministic judge pass (tests resolved / state correct)? */
|
|
48
|
+
resolved: boolean;
|
|
49
|
+
/** 0..1 — 1 = fully resolved; partial credit where the harness supports it. */
|
|
50
|
+
score: number;
|
|
51
|
+
detail?: string;
|
|
52
|
+
/** Present only when the caller explicitly requested durable judge evidence. */
|
|
53
|
+
judgeArtifacts?: JudgeArtifactReceipt;
|
|
54
|
+
}
|
|
55
|
+
interface LoadOptions {
|
|
56
|
+
limit?: number;
|
|
57
|
+
split?: string;
|
|
58
|
+
ids?: string[];
|
|
59
|
+
}
|
|
60
|
+
interface BenchmarkAdapter {
|
|
61
|
+
readonly name: string;
|
|
62
|
+
/** Throw with actionable guidance when the harness/judge isn't installed/runnable. */
|
|
63
|
+
preflight(): Promise<void>;
|
|
64
|
+
loadTasks(opts?: LoadOptions): Promise<BenchTask[]>;
|
|
65
|
+
/** DETERMINISTIC judge: score the worker's produced artifact for a task. */
|
|
66
|
+
judge(task: BenchTask, artifact: string): Promise<BenchScore>;
|
|
67
|
+
/** Gold/oracle artifact — lets us self-verify the judge before spending model tokens. */
|
|
68
|
+
goldArtifact(task: BenchTask): Promise<string | undefined>;
|
|
69
|
+
/** How to extract the judged artifact from a run's event stream. Optional —
|
|
70
|
+
* defaults to the agent's final answer text (the research/QA case). SWE sets
|
|
71
|
+
* it to a patch parser. This is `benchmark = adapter` owning its deliverable,
|
|
72
|
+
* so the gate runner (`runGate` / `runBenchmark`) needs no
|
|
73
|
+
* per-benchmark branching. */
|
|
74
|
+
output?: OutputAdapter<string>;
|
|
75
|
+
/** Post-shot deliverable extraction from the box FILESYSTEM, not the event stream.
|
|
76
|
+
* When set, the shot runner execs `command` in the STILL-ALIVE box after the agent
|
|
77
|
+
* turn drains and uses its stdout as the judged artifact — the durable way to capture
|
|
78
|
+
* a git diff of the agent's in-box edits (standard SWE-bench practice: SWE-agent /
|
|
79
|
+
* OpenHands read the diff from repo STATE), instead of hoping the model printed a
|
|
80
|
+
* fenced diff in its reply. Empty stdout ⇒ the runner falls back to `output` (the
|
|
81
|
+
* event-stream parse). `cwd` defaults to the box root. */
|
|
82
|
+
boxExtract?(task: BenchTask): {
|
|
83
|
+
command: string;
|
|
84
|
+
cwd?: string;
|
|
85
|
+
};
|
|
86
|
+
/** Optional workspace pre-stage run in the box BEFORE the agent shot (same
|
|
87
|
+
* session as `boxExtract`). For repo-state benchmarks (SWE-bench) this clones
|
|
88
|
+
* the instance repo at `base_commit` into a fixed path so the agent only edits
|
|
89
|
+
* — the harness owns the checkout, not the (stochastic) model. A non-zero exit
|
|
90
|
+
* fails the shot loud rather than letting the agent run against an empty box. */
|
|
91
|
+
boxSetup?(task: BenchTask): {
|
|
92
|
+
command: string;
|
|
93
|
+
cwd?: string;
|
|
94
|
+
};
|
|
95
|
+
/** Benchmark-owned worker leaf. Set when the benchmark's native protocol IS the
|
|
96
|
+
* worker (e.g. AppWorld's interactive ReAct episode runs inside the engine,
|
|
97
|
+
* not as a chat completion) — the experiment uses this instead of the
|
|
98
|
+
* BACKEND-selected client; the steer still flows through the per-round prompt.
|
|
99
|
+
* Typed loosely to avoid a runtime import cycle; the harness casts it. */
|
|
100
|
+
leafClient?: (cfg: {
|
|
101
|
+
model: string;
|
|
102
|
+
routerBaseUrl: string;
|
|
103
|
+
routerKey: string;
|
|
104
|
+
}) => unknown;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
export type { BenchScore, BenchTask, BenchmarkAdapter, JudgeArtifactFileReceipt, JudgeArtifactReceipt, LoadOptions };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
//# sourceMappingURL=types.js.map
|
|
@@ -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
|
+
* WebArena-Verified adapter (ServiceNow/webarena-verified).
|
|
6
|
+
*
|
|
7
|
+
* Worker artifact = a WebArena-Verified run output directory, not final chat text.
|
|
8
|
+
* Judge = the official `webarena_verified eval-tasks` evaluator over that output
|
|
9
|
+
* directory. The adapter refuses to score a plain answer so we do not turn a DOM
|
|
10
|
+
* benchmark into a fake text benchmark.
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
declare const webarenaOutputDirOutput: OutputAdapter<string>;
|
|
14
|
+
declare function createWebArenaVerifiedAdapter(): BenchmarkAdapter;
|
|
15
|
+
|
|
16
|
+
export { createWebArenaVerifiedAdapter, webarenaOutputDirOutput };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|