@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.
Files changed (262) hide show
  1. package/CHANGELOG.md +13 -0
  2. package/README.md +13 -1
  3. package/dist/adapters.d.ts +15 -0
  4. package/dist/adapters.js +43 -0
  5. package/dist/adapters.js.map +1 -0
  6. package/dist/benchmarks/_harness.d.ts +125 -0
  7. package/dist/benchmarks/_harness.js +33 -0
  8. package/dist/benchmarks/_harness.js.map +1 -0
  9. package/dist/benchmarks/aec-bench.d.ts +27 -0
  10. package/dist/benchmarks/aec-bench.js +8 -0
  11. package/dist/benchmarks/aec-bench.js.map +1 -0
  12. package/dist/benchmarks/agentbench.d.ts +16 -0
  13. package/dist/benchmarks/agentbench.js +10 -0
  14. package/dist/benchmarks/agentbench.js.map +1 -0
  15. package/dist/benchmarks/appworld.d.ts +37 -0
  16. package/dist/benchmarks/appworld.js +14 -0
  17. package/dist/benchmarks/appworld.js.map +1 -0
  18. package/dist/benchmarks/bfcl.d.ts +18 -0
  19. package/dist/benchmarks/bfcl.js +10 -0
  20. package/dist/benchmarks/bfcl.js.map +1 -0
  21. package/dist/benchmarks/cad-design.d.ts +45 -0
  22. package/dist/benchmarks/cad-design.js +7 -0
  23. package/dist/benchmarks/cad-design.js.map +1 -0
  24. package/dist/benchmarks/cadbench.d.ts +19 -0
  25. package/dist/benchmarks/cadbench.js +8 -0
  26. package/dist/benchmarks/cadbench.js.map +1 -0
  27. package/dist/benchmarks/cadgenbench.d.ts +22 -0
  28. package/dist/benchmarks/cadgenbench.js +8 -0
  29. package/dist/benchmarks/cadgenbench.js.map +1 -0
  30. package/dist/benchmarks/commit0.d.ts +31 -0
  31. package/dist/benchmarks/commit0.js +10 -0
  32. package/dist/benchmarks/commit0.js.map +1 -0
  33. package/dist/benchmarks/crag.d.ts +14 -0
  34. package/dist/benchmarks/crag.js +9 -0
  35. package/dist/benchmarks/crag.js.map +1 -0
  36. package/dist/benchmarks/dabstep.d.ts +18 -0
  37. package/dist/benchmarks/dabstep.js +10 -0
  38. package/dist/benchmarks/dabstep.js.map +1 -0
  39. package/dist/benchmarks/enterpriseops-gym.d.ts +38 -0
  40. package/dist/benchmarks/enterpriseops-gym.js +10 -0
  41. package/dist/benchmarks/enterpriseops-gym.js.map +1 -0
  42. package/dist/benchmarks/finresearchbench.d.ts +15 -0
  43. package/dist/benchmarks/finresearchbench.js +8 -0
  44. package/dist/benchmarks/finresearchbench.js.map +1 -0
  45. package/dist/benchmarks/finsearchcomp.d.ts +49 -0
  46. package/dist/benchmarks/finsearchcomp.js +7 -0
  47. package/dist/benchmarks/finsearchcomp.js.map +1 -0
  48. package/dist/benchmarks/frames.d.ts +59 -0
  49. package/dist/benchmarks/frames.js +13 -0
  50. package/dist/benchmarks/frames.js.map +1 -0
  51. package/dist/benchmarks/hotpotqa.d.ts +48 -0
  52. package/dist/benchmarks/hotpotqa.js +15 -0
  53. package/dist/benchmarks/hotpotqa.js.map +1 -0
  54. package/dist/benchmarks/humaneval.d.ts +62 -0
  55. package/dist/benchmarks/humaneval.js +17 -0
  56. package/dist/benchmarks/humaneval.js.map +1 -0
  57. package/dist/benchmarks/mind2web.d.ts +41 -0
  58. package/dist/benchmarks/mind2web.js +9 -0
  59. package/dist/benchmarks/mind2web.js.map +1 -0
  60. package/dist/benchmarks/nomiracl.d.ts +15 -0
  61. package/dist/benchmarks/nomiracl.js +9 -0
  62. package/dist/benchmarks/nomiracl.js.map +1 -0
  63. package/dist/benchmarks/open-rag-bench.d.ts +14 -0
  64. package/dist/benchmarks/open-rag-bench.js +9 -0
  65. package/dist/benchmarks/open-rag-bench.js.map +1 -0
  66. package/dist/benchmarks/programbench.d.ts +38 -0
  67. package/dist/benchmarks/programbench.js +10 -0
  68. package/dist/benchmarks/programbench.js.map +1 -0
  69. package/dist/benchmarks/rag-shared.d.ts +42 -0
  70. package/dist/benchmarks/rag-shared.js +39 -0
  71. package/dist/benchmarks/rag-shared.js.map +1 -0
  72. package/dist/benchmarks/ragbench.d.ts +16 -0
  73. package/dist/benchmarks/ragbench.js +9 -0
  74. package/dist/benchmarks/ragbench.js.map +1 -0
  75. package/dist/benchmarks/simpleqa.d.ts +64 -0
  76. package/dist/benchmarks/simpleqa.js +11 -0
  77. package/dist/benchmarks/simpleqa.js.map +1 -0
  78. package/dist/benchmarks/swe-bench.d.ts +56 -0
  79. package/dist/benchmarks/swe-bench.js +14 -0
  80. package/dist/benchmarks/swe-bench.js.map +1 -0
  81. package/dist/benchmarks/t2-ragbench.d.ts +14 -0
  82. package/dist/benchmarks/t2-ragbench.js +9 -0
  83. package/dist/benchmarks/t2-ragbench.js.map +1 -0
  84. package/dist/benchmarks/tau-bench-shared.d.ts +26 -0
  85. package/dist/benchmarks/tau-bench-shared.js +10 -0
  86. package/dist/benchmarks/tau-bench-shared.js.map +1 -0
  87. package/dist/benchmarks/tau2-bench.d.ts +7 -0
  88. package/dist/benchmarks/tau2-bench.js +11 -0
  89. package/dist/benchmarks/tau2-bench.js.map +1 -0
  90. package/dist/benchmarks/tau3-banking.d.ts +15 -0
  91. package/dist/benchmarks/tau3-banking.js +9 -0
  92. package/dist/benchmarks/tau3-banking.js.map +1 -0
  93. package/dist/benchmarks/terminal-bench.d.ts +24 -0
  94. package/dist/benchmarks/terminal-bench.js +8 -0
  95. package/dist/benchmarks/terminal-bench.js.map +1 -0
  96. package/dist/benchmarks/toollm.d.ts +16 -0
  97. package/dist/benchmarks/toollm.js +10 -0
  98. package/dist/benchmarks/toollm.js.map +1 -0
  99. package/dist/benchmarks/trata-hedge.d.ts +32 -0
  100. package/dist/benchmarks/trata-hedge.js +7 -0
  101. package/dist/benchmarks/trata-hedge.js.map +1 -0
  102. package/dist/benchmarks/types.d.ts +107 -0
  103. package/dist/benchmarks/types.js +1 -0
  104. package/dist/benchmarks/types.js.map +1 -0
  105. package/dist/benchmarks/webarena-verified.d.ts +16 -0
  106. package/dist/benchmarks/webarena-verified.js +10 -0
  107. package/dist/benchmarks/webarena-verified.js.map +1 -0
  108. package/dist/chunk-2PVVP7GN.js +197 -0
  109. package/dist/chunk-2PVVP7GN.js.map +1 -0
  110. package/dist/chunk-2XU6OGEN.js +170 -0
  111. package/dist/chunk-2XU6OGEN.js.map +1 -0
  112. package/dist/chunk-53UPUNBZ.js +325 -0
  113. package/dist/chunk-53UPUNBZ.js.map +1 -0
  114. package/dist/chunk-5H5XV76F.js +240 -0
  115. package/dist/chunk-5H5XV76F.js.map +1 -0
  116. package/dist/chunk-7WSD27QQ.js +118 -0
  117. package/dist/chunk-7WSD27QQ.js.map +1 -0
  118. package/dist/chunk-C7T7WEK2.js +103 -0
  119. package/dist/chunk-C7T7WEK2.js.map +1 -0
  120. package/dist/chunk-CKUVRZ2T.js +251 -0
  121. package/dist/chunk-CKUVRZ2T.js.map +1 -0
  122. package/dist/chunk-HBSWHQNJ.js +30 -0
  123. package/dist/chunk-HBSWHQNJ.js.map +1 -0
  124. package/dist/chunk-HHXFIHXC.js +116 -0
  125. package/dist/chunk-HHXFIHXC.js.map +1 -0
  126. package/dist/chunk-IFAV6KEM.js +276 -0
  127. package/dist/chunk-IFAV6KEM.js.map +1 -0
  128. package/dist/chunk-INNOYXCP.js +387 -0
  129. package/dist/chunk-INNOYXCP.js.map +1 -0
  130. package/dist/chunk-J3KDJNX2.js +182 -0
  131. package/dist/chunk-J3KDJNX2.js.map +1 -0
  132. package/dist/chunk-JRWWGMK7.js +148 -0
  133. package/dist/chunk-JRWWGMK7.js.map +1 -0
  134. package/dist/chunk-JTHWEDEW.js +32 -0
  135. package/dist/chunk-JTHWEDEW.js.map +1 -0
  136. package/dist/chunk-KDIKRJGB.js +120 -0
  137. package/dist/chunk-KDIKRJGB.js.map +1 -0
  138. package/dist/chunk-LRRD7NAG.js +301 -0
  139. package/dist/chunk-LRRD7NAG.js.map +1 -0
  140. package/dist/chunk-ODT47UAY.js +221 -0
  141. package/dist/chunk-ODT47UAY.js.map +1 -0
  142. package/dist/chunk-PA2ZKHJC.js +230 -0
  143. package/dist/chunk-PA2ZKHJC.js.map +1 -0
  144. package/dist/chunk-PUIRNYI7.js +189 -0
  145. package/dist/chunk-PUIRNYI7.js.map +1 -0
  146. package/dist/chunk-PWQVGAJB.js +144 -0
  147. package/dist/chunk-PWQVGAJB.js.map +1 -0
  148. package/dist/chunk-R36V2VP7.js +169 -0
  149. package/dist/chunk-R36V2VP7.js.map +1 -0
  150. package/dist/chunk-R67DFVLO.js +142 -0
  151. package/dist/chunk-R67DFVLO.js.map +1 -0
  152. package/dist/chunk-SEVJPLZC.js +260 -0
  153. package/dist/chunk-SEVJPLZC.js.map +1 -0
  154. package/dist/chunk-SYDW647C.js +318 -0
  155. package/dist/chunk-SYDW647C.js.map +1 -0
  156. package/dist/chunk-TBKU5XQI.js +228 -0
  157. package/dist/chunk-TBKU5XQI.js.map +1 -0
  158. package/dist/chunk-TSWPNOYM.js +147 -0
  159. package/dist/chunk-TSWPNOYM.js.map +1 -0
  160. package/dist/chunk-UAIOHCUK.js +27 -0
  161. package/dist/chunk-UAIOHCUK.js.map +1 -0
  162. package/dist/chunk-UPAMRDX4.js +233 -0
  163. package/dist/chunk-UPAMRDX4.js.map +1 -0
  164. package/dist/chunk-VQRS7VUC.js +342 -0
  165. package/dist/chunk-VQRS7VUC.js.map +1 -0
  166. package/dist/chunk-X3BTXCJ4.js +262 -0
  167. package/dist/chunk-X3BTXCJ4.js.map +1 -0
  168. package/dist/chunk-X5YKXC6V.js +211 -0
  169. package/dist/chunk-X5YKXC6V.js.map +1 -0
  170. package/dist/chunk-Y6O2OCUO.js +130 -0
  171. package/dist/chunk-Y6O2OCUO.js.map +1 -0
  172. package/dist/chunk-YCGY7UIZ.js +208 -0
  173. package/dist/chunk-YCGY7UIZ.js.map +1 -0
  174. package/dist/chunk-Z7ML6L77.js +162 -0
  175. package/dist/chunk-Z7ML6L77.js.map +1 -0
  176. package/dist/chunk-ZEWMTR5M.js +136 -0
  177. package/dist/chunk-ZEWMTR5M.js.map +1 -0
  178. package/dist/index.d.ts +355 -0
  179. package/dist/index.js +1908 -0
  180. package/dist/index.js.map +1 -0
  181. package/package.json +26 -9
  182. package/scripts/run-package-tests.mjs +30 -8
  183. package/scripts/verify-packed-consumer.mjs +12 -1
  184. package/scripts/verify-pier-agent.mts +1 -0
  185. package/src/benchmarks/humaneval.test.mts +122 -0
  186. package/src/benchmarks/humaneval.ts +100 -27
  187. package/src/david-attribution.mts +78 -0
  188. package/src/david-goliath.mts +149 -0
  189. package/src/hev-improve.mts +25 -6
  190. package/src/humaneval-object-ablation.mts +201 -0
  191. package/src/live-improve-campaign-mbpp.mts +641 -0
  192. package/src/live-improve-campaign.mts +500 -0
  193. package/src/mbpp-structural.mts +12 -7
  194. package/src/stream-observe.py +45 -0
  195. package/src/stream-observe.tpl.html +247 -0
  196. package/src/supervisor-arena.mts +816 -0
  197. package/src/swe-arena/analyze.ts +211 -0
  198. package/src/swe-arena/arms.ts +788 -0
  199. package/src/swe-arena/bootstrap-meta.mts +188 -0
  200. package/src/swe-arena/bootstrap-meta.test.mts +51 -0
  201. package/src/swe-arena/calibrate.ts +116 -0
  202. package/src/swe-arena/capabilities.mts +76 -0
  203. package/src/swe-arena/capabilities.test.mts +57 -0
  204. package/src/swe-arena/capacity.ts +194 -0
  205. package/src/swe-arena/cell-evidence.mts +405 -0
  206. package/src/swe-arena/cell-evidence.test.mts +248 -0
  207. package/src/swe-arena/diagnosis-ensemble.test.mts +210 -0
  208. package/src/swe-arena/diagnosis-ensemble.ts +520 -0
  209. package/src/swe-arena/execution.test.mts +1170 -0
  210. package/src/swe-arena/fixtures/analyze.py +80 -0
  211. package/src/swe-arena/fixtures/excludes.txt +8 -0
  212. package/src/swe-arena/fixtures/gen1-salvage/README.md +45 -0
  213. package/src/swe-arena/fixtures/gen1-salvage/cand0-e6d7361.diff +116 -0
  214. package/src/swe-arena/fixtures/gen1-salvage/cand1-76a8590.diff +293 -0
  215. package/src/swe-arena/fixtures/holdout-preregister.log +12 -0
  216. package/src/swe-arena/fixtures/holdout.json +44 -0
  217. package/src/swe-arena/fixtures/instances.json +146 -0
  218. package/src/swe-arena/fixtures/ledger.jsonl +12 -0
  219. package/src/swe-arena/fixtures/patches/pallets__flask-5014.solo.patch +36 -0
  220. package/src/swe-arena/fixtures/patches/pydata__xarray-4687.sup.patch +33 -0
  221. package/src/swe-arena/fixtures/rejudge.jsonl +15 -0
  222. package/src/swe-arena/fixtures/rematch.jsonl +3 -0
  223. package/src/swe-arena/fixtures/rematch2.jsonl +3 -0
  224. package/src/swe-arena/fixtures/rematch3.jsonl +3 -0
  225. package/src/swe-arena/fixtures/sup-journal-true.json +19 -0
  226. package/src/swe-arena/fixtures/verify/astropy__astropy-13033.sh +48 -0
  227. package/src/swe-arena/fixtures/verify/django__django-11532.sh +50 -0
  228. package/src/swe-arena/fixtures/verify/matplotlib__matplotlib-20826.sh +76 -0
  229. package/src/swe-arena/fixtures/verify/pydata__xarray-4687.sh +44 -0
  230. package/src/swe-arena/fixtures/verify/pytest-dev__pytest-6197.sh +32 -0
  231. package/src/swe-arena/fixtures/verify/sphinx-doc__sphinx-9658.sh +51 -0
  232. package/src/swe-arena/fixtures/worker-tokens.json +42 -0
  233. package/src/swe-arena/fixtures.ts +104 -0
  234. package/src/swe-arena/holdout-certify.mts +408 -0
  235. package/src/swe-arena/holdout-certify.test.mts +160 -0
  236. package/src/swe-arena/judge-child.mts +37 -0
  237. package/src/swe-arena/manifest.mts +293 -0
  238. package/src/swe-arena/manifest.test.mts +169 -0
  239. package/src/swe-arena/materialize.ts +142 -0
  240. package/src/swe-arena/outer-loop.mts +2145 -0
  241. package/src/swe-arena/outer-loop.test.mts +696 -0
  242. package/src/swe-arena/parity.test.mts +87 -0
  243. package/src/swe-arena/proc.test.mts +174 -0
  244. package/src/swe-arena/proc.ts +260 -0
  245. package/src/swe-arena/profiles/default-author.profile.json +4 -0
  246. package/src/swe-arena/proposer-fanout.mts +489 -0
  247. package/src/swe-arena/proposer-fanout.test.mts +372 -0
  248. package/src/swe-arena/reconcile.ts +0 -0
  249. package/src/swe-arena/replay.mts +183 -0
  250. package/src/swe-arena/replay.test.mts +300 -0
  251. package/src/swe-arena/run-experiment.mts +361 -0
  252. package/src/swe-arena/run-supervisor.mjs +297 -0
  253. package/src/swe-arena/run-supervisor.test.mts +498 -0
  254. package/src/swe-arena/serialized-judge.ts +414 -0
  255. package/src/swe-arena/types.ts +166 -0
  256. package/src/swe-code-improve.mts +328 -0
  257. package/src/swe-emit-patch.mts +104 -0
  258. package/src/swe-improve.mts +232 -0
  259. package/src/swe-jail.ts +2 -2
  260. package/src/swe-local-proof.mts +169 -0
  261. package/src/swe-repro-calibrate.mts +446 -0
  262. 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,9 @@
1
+ import {
2
+ createRagBenchAdapter
3
+ } from "../chunk-R67DFVLO.js";
4
+ import "../chunk-X3BTXCJ4.js";
5
+ import "../chunk-LRRD7NAG.js";
6
+ export {
7
+ createRagBenchAdapter
8
+ };
9
+ //# sourceMappingURL=ragbench.js.map
@@ -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,11 @@
1
+ import {
2
+ createSimpleQaAdapter,
3
+ parseCitations,
4
+ parseFinalAnswer
5
+ } from "../chunk-SEVJPLZC.js";
6
+ export {
7
+ createSimpleQaAdapter,
8
+ parseCitations,
9
+ parseFinalAnswer
10
+ };
11
+ //# sourceMappingURL=simpleqa.js.map
@@ -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,9 @@
1
+ import {
2
+ createT2RagBenchAdapter
3
+ } from "../chunk-Y6O2OCUO.js";
4
+ import "../chunk-X3BTXCJ4.js";
5
+ import "../chunk-LRRD7NAG.js";
6
+ export {
7
+ createT2RagBenchAdapter
8
+ };
9
+ //# sourceMappingURL=t2-ragbench.js.map
@@ -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,10 @@
1
+ import {
2
+ createTauBenchAdapter,
3
+ tauResultsOutput
4
+ } from "../chunk-R36V2VP7.js";
5
+ import "../chunk-LRRD7NAG.js";
6
+ export {
7
+ createTauBenchAdapter,
8
+ tauResultsOutput
9
+ };
10
+ //# sourceMappingURL=tau-bench-shared.js.map
@@ -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,11 @@
1
+ import {
2
+ createTau2BenchAdapter,
3
+ tau2ResultsOutput
4
+ } from "../chunk-HBSWHQNJ.js";
5
+ import "../chunk-R36V2VP7.js";
6
+ import "../chunk-LRRD7NAG.js";
7
+ export {
8
+ createTau2BenchAdapter,
9
+ tau2ResultsOutput
10
+ };
11
+ //# sourceMappingURL=tau2-bench.js.map
@@ -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,9 @@
1
+ import {
2
+ createTau3BankingAdapter
3
+ } from "../chunk-UAIOHCUK.js";
4
+ import "../chunk-R36V2VP7.js";
5
+ import "../chunk-LRRD7NAG.js";
6
+ export {
7
+ createTau3BankingAdapter
8
+ };
9
+ //# sourceMappingURL=tau3-banking.js.map
@@ -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,8 @@
1
+ import {
2
+ createTerminalBenchAdapter
3
+ } from "../chunk-JRWWGMK7.js";
4
+ import "../chunk-LRRD7NAG.js";
5
+ export {
6
+ createTerminalBenchAdapter
7
+ };
8
+ //# sourceMappingURL=terminal-bench.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
+ * 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,10 @@
1
+ import {
2
+ createToolLlmAdapter,
3
+ toollmOutput
4
+ } from "../chunk-2PVVP7GN.js";
5
+ import "../chunk-LRRD7NAG.js";
6
+ export {
7
+ createToolLlmAdapter,
8
+ toollmOutput
9
+ };
10
+ //# sourceMappingURL=toollm.js.map
@@ -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,7 @@
1
+ import {
2
+ createTrataHedgeAdapter
3
+ } from "../chunk-VQRS7VUC.js";
4
+ export {
5
+ createTrataHedgeAdapter
6
+ };
7
+ //# sourceMappingURL=trata-hedge.js.map
@@ -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,10 @@
1
+ import {
2
+ createWebArenaVerifiedAdapter,
3
+ webarenaOutputDirOutput
4
+ } from "../chunk-Z7ML6L77.js";
5
+ import "../chunk-LRRD7NAG.js";
6
+ export {
7
+ createWebArenaVerifiedAdapter,
8
+ webarenaOutputDirOutput
9
+ };
10
+ //# sourceMappingURL=webarena-verified.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}