@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,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 };
@@ -0,0 +1,10 @@
1
+ import {
2
+ createDabstepAdapter,
3
+ dabstepAnswerOutput
4
+ } from "../chunk-J3KDJNX2.js";
5
+ import "../chunk-LRRD7NAG.js";
6
+ export {
7
+ createDabstepAdapter,
8
+ dabstepAnswerOutput
9
+ };
10
+ //# sourceMappingURL=dabstep.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
@@ -0,0 +1,38 @@
1
+ import { OutputAdapter } from '@tangle-network/agent-runtime/loops';
2
+ import { BenchmarkAdapter } from './types.js';
3
+
4
+ /**
5
+ * EnterpriseOps-Gym adapter (ServiceNow-AI/EnterpriseOps-Gym, Apache-2.0) —
6
+ * stateful agentic planning + tool use in enterprise settings. Each record is an
7
+ * enterprise-ops task (Customer Service, HR, ITSM, Calendar, Email, Drive, Teams,
8
+ * Hybrid) handed to the agent with a domain `system_prompt`, a `selected_tools`
9
+ * allow-list, and one or more containerized gym MCP servers (`gym_servers_config`).
10
+ * Worker artifact = the ordered tool-call transcript the agent would issue against
11
+ * those servers, emitted as a single fenced ```json block of
12
+ * `{ "calls": [ { "tool": ..., "arguments": {...}, "gym_name"?: ... } ] }`.
13
+ *
14
+ * Judge = the benchmark's OWN deterministic state-checker. The driver replays the
15
+ * transcript against a freshly-seeded gym server (mutating its database), then runs
16
+ * each task's `database_state` verifier — an SQL SELECT executed via the gym
17
+ * server's /api/sql-runner endpoint, compared to `expected_value` under
18
+ * `comparison_type` (equals/greater_than/less_than/contains). GRADED: score =
19
+ * (verifiers passing) / (total verifiers) = the bench's verifier_level_pass_rate;
20
+ * binary `resolved` = ALL verifiers pass = the bench's overall_success_rate. Fully
21
+ * deterministic — no LLM judge.
22
+ *
23
+ * loadTasks enumerates the real suite from the HF rows server (config = tool-set
24
+ * MODE oracle|plus_5_tools|plus_10_tools|plus_15_tools; split = DOMAIN); a committed
25
+ * sample (bench/fixtures/enterpriseops-gym.json) loads offline.
26
+ *
27
+ * Requires for a LIVE judge run: a Docker daemon with the domain gym images
28
+ * (`docker pull shivakrishnareddyma225/enterpriseops-gym-mcp-<domain>:latest`) up
29
+ * on the ports in `gym_servers_config`, seeded from gym_dbs.zip. preflight + judge
30
+ * fail loud with the exact pull/run/unzip step when a server is unreachable — never
31
+ * a fabricated score. No portable gold artifact ships, so goldArtifact is undefined.
32
+ */
33
+
34
+ /** Worker transcript = the last fenced ```json block, else the raw text. */
35
+ declare const enterpriseOpsTranscriptOutput: OutputAdapter<string>;
36
+ declare function createEnterpriseOpsGymAdapter(): BenchmarkAdapter;
37
+
38
+ export { createEnterpriseOpsGymAdapter, enterpriseOpsTranscriptOutput };
@@ -0,0 +1,10 @@
1
+ import {
2
+ createEnterpriseOpsGymAdapter,
3
+ enterpriseOpsTranscriptOutput
4
+ } from "../chunk-X5YKXC6V.js";
5
+ import "../chunk-LRRD7NAG.js";
6
+ export {
7
+ createEnterpriseOpsGymAdapter,
8
+ enterpriseOpsTranscriptOutput
9
+ };
10
+ //# sourceMappingURL=enterpriseops-gym.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
+ * FinResearchBench-compatible adapter.
6
+ *
7
+ * The paper defines a logic-tree Agent-as-a-Judge benchmark for financial
8
+ * research reports, but there is no stable public scorer package wired here.
9
+ * Live mode therefore requires a local data export whose rows carry the official
10
+ * judge prompt/template/logic tree. The adapter refuses to invent a judge.
11
+ */
12
+
13
+ declare function createFinResearchBenchAdapter(): BenchmarkAdapter;
14
+
15
+ export { createFinResearchBenchAdapter };
@@ -0,0 +1,8 @@
1
+ import {
2
+ createFinResearchBenchAdapter
3
+ } from "../chunk-YCGY7UIZ.js";
4
+ import "../chunk-LRRD7NAG.js";
5
+ export {
6
+ createFinResearchBenchAdapter
7
+ };
8
+ //# sourceMappingURL=finresearchbench.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
@@ -0,0 +1,49 @@
1
+ import { BenchmarkAdapter } from './types.js';
2
+ import '@tangle-network/agent-runtime/loops';
3
+
4
+ /**
5
+ * FinSearchComp adapter (randomtutu/FinSearchComp). Agentic financial search +
6
+ * reasoning. Worker artifact = the agent's free-form final answer text (zh/en).
7
+ *
8
+ * Each record is SELF-CONTAINED and carries its OWN judge: a per-record
9
+ * `judge_system_prompt` + a `judge_prompt_template` with {prompt},
10
+ * {response_reference} (gold answer WITH embedded tolerance/scoring-criteria),
11
+ * and {response} (the student answer) placeholders. We faithfully REPLICATE the
12
+ * benchmark's judge — fill the template, run it under the record's system prompt
13
+ * via the pinned router (temperature 0), and parse the JSON the judge emits. The
14
+ * judge returns an `answer_score` field; 1/positive = resolved, else not.
15
+ * This matches the FinSearchComp leaderboard (Grok-4-web 68.9%).
16
+ *
17
+ * There is NO deterministic Tier-1 path here: the gold answer is prose with
18
+ * region-specific units, embedded tolerances ("允许1%的误差"), and multi-point
19
+ * scoring criteria. The benchmark intends its own LLM judge to be the arbiter,
20
+ * so the judge IS the score — fail loud on unparseable judge output (never
21
+ * default to resolved).
22
+ *
23
+ * SCOPE: T2 (Simple_Historical_Lookup) + T3 (Complex_Historical_Investigation)
24
+ * are fully self-contained and supported. T1 (Time_Sensitive_Data_Fetching)
25
+ * needs a live market snapshot / akshare ground truth to fill the judge's
26
+ * {ground_truth} slot — it is SKIPPED in loadTasks and flagged in preflight.
27
+ * See {@link T1Seam}.
28
+ *
29
+ * Requires for a live run: network access to the GitHub-hosted dataset JSON and
30
+ * a TANGLE_API_KEY for the judge. For offline/CI verification, loadTasks falls back
31
+ * to the committed fixtures (bench/fixtures/finsearchcomp.json) with an explicit
32
+ * console.warn — never a silent fallback.
33
+ */
34
+
35
+ /**
36
+ * Typed seam for T1 (Time_Sensitive_Data_Fetching). T1 records score against a
37
+ * live market snapshot the judge consumes via a {ground_truth} template slot;
38
+ * the adapter does NOT fabricate that snapshot. Wiring T1 means supplying a
39
+ * resolver that fetches the akshare/market value for the record at judge time
40
+ * and filling {ground_truth}. Until then T1 is excluded from loadTasks.
41
+ */
42
+ interface T1Seam {
43
+ promptId: string;
44
+ /** Resolver that returns the real-time ground-truth block for the {ground_truth} slot. */
45
+ resolveGroundTruth(promptId: string): Promise<string>;
46
+ }
47
+ declare function createFinsearchcompAdapter(): BenchmarkAdapter;
48
+
49
+ export { type T1Seam, createFinsearchcompAdapter };
@@ -0,0 +1,7 @@
1
+ import {
2
+ createFinsearchcompAdapter
3
+ } from "../chunk-UPAMRDX4.js";
4
+ export {
5
+ createFinsearchcompAdapter
6
+ };
7
+ //# sourceMappingURL=finsearchcomp.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
@@ -0,0 +1,59 @@
1
+ import { BenchmarkAdapter } from './types.js';
2
+ import '@tangle-network/agent-runtime/loops';
3
+
4
+ /**
5
+ * FRAMES adapter (google/frames-benchmark). Worker artifact = a single free-text
6
+ * final answer string (optionally preceded by a citations block). FRAMES ships,
7
+ * per item, a short gold `Answer` PLUS gold `wiki_links` (the Wikipedia URLs
8
+ * needed to answer) — the gold-citation column is what lets the loop's critic
9
+ * check citation coverage deterministically.
10
+ *
11
+ * Judge is two-tier, deterministic-first:
12
+ * Tier 1 — normalized exact / token-boundary containment match (no model tokens).
13
+ * Tier 2 — a constrained binary equivalence gate via a pinned LLM (JUDGE_MODEL,
14
+ * temperature 0), fired ONLY when Tier 1 misses, to absorb the
15
+ * paraphrase/alias equivalence FRAMES intends to allow.
16
+ *
17
+ * score is binary (resolved ? 1 : 0) — FRAMES has no partial credit. The judge
18
+ * resolves strictly on the Answer value; wiki_links are a SOFT signal surfaced
19
+ * in `detail` for the critic, never a hard pass criterion.
20
+ *
21
+ * Requires for a live run: the bench `.venv` with `datasets` installed and a
22
+ * JUDGE_MODEL router key. For offline/CI verification set FRAMES_FIXTURES=1 to
23
+ * load the committed fixtures (bench/fixtures/frames.json) — no HF download.
24
+ */
25
+
26
+ /**
27
+ * Typed seam for the future dynamic-topology research worker. The benchmark
28
+ * adapter scores a plain `string` artifact (the BenchmarkAdapter contract); the
29
+ * loop worker decodes its agent runs into a {@link ResearchAnswer} and serializes
30
+ * `finalAnswer` (+ optional `CITATIONS:` block) into that string before judging.
31
+ */
32
+ interface ResearchTask {
33
+ id: string;
34
+ question: string;
35
+ /** Gold short answer — judge resolves strictly against this. */
36
+ gold: string;
37
+ /** Gold Wikipedia URLs — SOFT citation-coverage signal for the critic, never a hard gate. */
38
+ goldSources: string[];
39
+ /** FRAMES reasoning_types, e.g. 'numerical | temporal' — slices the scorecard by hop-type. */
40
+ reasoningTypes: string;
41
+ }
42
+ interface ResearchAnswer {
43
+ finalAnswer: string;
44
+ citations: string[];
45
+ }
46
+ /** Port of the SQuAD/GAIA normalize_answer routine, plus number/date canonicalization. */
47
+ declare function normalizeAnswer(input: string): string;
48
+ /**
49
+ * Parse the worker artifact into the final answer string.
50
+ * Order: the `FINAL ANSWER:` sentinel first (deterministic-extraction discipline);
51
+ * fall back to the last non-empty line. Returns '' when nothing is parseable
52
+ * (fail-closed — never guess), which judge() counts as resolved=false.
53
+ */
54
+ declare function parseFinalAnswer(artifact: string): string;
55
+ /** Extract cited URLs from a `CITATIONS:` block and any bare URLs in the artifact. */
56
+ declare function parseCitations(artifact: string): string[];
57
+ declare function createFramesAdapter(): BenchmarkAdapter;
58
+
59
+ export { type ResearchAnswer, type ResearchTask, createFramesAdapter, normalizeAnswer, parseCitations, parseFinalAnswer };
@@ -0,0 +1,13 @@
1
+ import {
2
+ createFramesAdapter,
3
+ normalizeAnswer,
4
+ parseCitations,
5
+ parseFinalAnswer
6
+ } from "../chunk-INNOYXCP.js";
7
+ export {
8
+ createFramesAdapter,
9
+ normalizeAnswer,
10
+ parseCitations,
11
+ parseFinalAnswer
12
+ };
13
+ //# sourceMappingURL=frames.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
@@ -0,0 +1,48 @@
1
+ import { BenchmarkAdapter } from './types.js';
2
+ import '@tangle-network/agent-runtime/loops';
3
+
4
+ /**
5
+ * HotpotQA adapter (hotpotqa/hotpot_qa, config 'distractor', split 'validation').
6
+ * Multi-hop factoid QA. Worker artifact = a single free-text final answer string.
7
+ *
8
+ * Judge is the official HotpotQA / SQuAD-style metric, FULLY DETERMINISTIC — no
9
+ * LLM. Both the predicted final answer and the gold are normalized (lowercase,
10
+ * strip articles a/an/the, strip punctuation, collapse whitespace), then scored
11
+ * by exact-match (EM) and token-level F1. resolved = EM OR F1 >= HOTPOTQA_F1_PASS
12
+ * (default 0.6); score = the F1 (0..1). detail carries em + f1. This gives the
13
+ * suite a judge that needs no model tokens at all.
14
+ *
15
+ * metadata carries the gold answer + supporting_facts (the title/sent_id pairs of
16
+ * the gold supporting sentences) — a SOFT retrieval signal for the loop's critic,
17
+ * never part of the score.
18
+ *
19
+ * Requires for a live run: the bench `.venv` with `datasets` installed + network
20
+ * to Hugging Face. For offline/CI verification set HOTPOTQA_FIXTURES=1 to load the
21
+ * committed fixtures (bench/fixtures/hotpotqa.json) — no HF download.
22
+ */
23
+
24
+ /**
25
+ * The official HotpotQA / SQuAD `normalize_answer`: lowercase, strip punctuation,
26
+ * drop articles (a/an/the), collapse whitespace. Token comparisons run on the
27
+ * output of this exactly as the published evaluator does.
28
+ */
29
+ declare function normalizeAnswer(input: string): string;
30
+ /** Exact match on the normalized strings. */
31
+ declare function exactMatch(prediction: string, gold: string): boolean;
32
+ /**
33
+ * Token-level F1, the SQuAD/HotpotQA definition. Multiset (bag) intersection of
34
+ * normalized tokens. Mirrors the published evaluator's special-case handling of
35
+ * yes/no/noanswer and empty bags: if either side is empty, F1 is 1 only when both
36
+ * are empty, else 0.
37
+ */
38
+ declare function tokenF1(prediction: string, gold: string): number;
39
+ /**
40
+ * Parse the worker artifact into the final answer string.
41
+ * Order: the `FINAL ANSWER:` sentinel first (deterministic-extraction discipline);
42
+ * fall back to the trimmed last non-empty line. Returns '' when nothing is
43
+ * parseable (fail-closed — never guess), which judge() counts as resolved=false.
44
+ */
45
+ declare function parseFinalAnswer(artifact: string): string;
46
+ declare function createHotpotqaAdapter(): BenchmarkAdapter;
47
+
48
+ export { createHotpotqaAdapter, exactMatch, normalizeAnswer, parseFinalAnswer, tokenF1 };
@@ -0,0 +1,15 @@
1
+ import {
2
+ createHotpotqaAdapter,
3
+ exactMatch,
4
+ normalizeAnswer,
5
+ parseFinalAnswer,
6
+ tokenF1
7
+ } from "../chunk-PA2ZKHJC.js";
8
+ export {
9
+ createHotpotqaAdapter,
10
+ exactMatch,
11
+ normalizeAnswer,
12
+ parseFinalAnswer,
13
+ tokenF1
14
+ };
15
+ //# sourceMappingURL=hotpotqa.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
@@ -0,0 +1,62 @@
1
+ import { BenchmarkAdapter } from './types.js';
2
+ import '@tangle-network/agent-runtime/loops';
3
+
4
+ /**
5
+ * HumanEval adapter — the deployable-checker domain as a `BenchmarkAdapter`, so the
6
+ * gate runner (`runGate`) can A/B the STEERING regime on it: a real rollout
7
+ * through the `Supervisor` that self-corrects across rounds, vs blind
8
+ * random@k. This is the experiment `humaneval-gate.mts` names as "the next one" —
9
+ * the gate measures SELECTION over stateless single completions; this measures
10
+ * whether observe→steer (self-correction) beats blind compute at equal k.
11
+ *
12
+ * Worker artifact = the model's reply (a Python function, fenced or raw). The
13
+ * DETERMINISTIC judge runs the candidate against the task's own `test` in an
14
+ * isolated `--network=none` python container — exit 0 = pass. No gold
15
+ * `canonical_solution` is ever shown to the model; `goldArtifact` returns it only
16
+ * to self-verify the judge before spending tokens.
17
+ *
18
+ * The primitives (loader / extractor / Docker checker) live here and are reused by
19
+ * `humaneval-gate.mts` — one home, no duplication.
20
+ */
21
+
22
+ interface HumanEvalTask {
23
+ taskId: string;
24
+ prompt: string;
25
+ test: string;
26
+ entryPoint: string;
27
+ /** Reference solution body — used ONLY to self-verify the judge, never shown to the worker. */
28
+ canonicalSolution?: string;
29
+ }
30
+ /** Pull the 164-task HumanEval JSONL.gz and parse it. Fail loud on a non-OK fetch
31
+ * or a malformed line — a silently-short task set would poison the gate. `offset`
32
+ * selects a deeper slice (the later tasks are harder) so the worker has a
33
+ * correctable middle band rather than a saturated easy prefix. */
34
+ declare function loadHumanEval(limit: number, offset?: number): Promise<HumanEvalTask[]>;
35
+ declare function basePrompt(task: HumanEvalTask): string;
36
+ /** Extract the function source from a model reply: prefer a fenced ```python (or
37
+ * bare ```) block, else fall back to the raw text. The deployable program adds the
38
+ * prompt header (imports + signature context), so a candidate that returns only a
39
+ * body still runs; a candidate that re-defines the function shadows the header. */
40
+ declare function extractCode(reply: string): string;
41
+ interface CheckResult {
42
+ /** {0,1} pass-count for this candidate (1 = the check() suite passed). */
43
+ pass: number;
44
+ /** On failure: the interpreter stderr tail (traceback / failing assertion). The
45
+ * execution-grounded feedback a self-repair loop steers on; ignored by selection. */
46
+ detail?: string;
47
+ }
48
+ interface PythonProgramResult {
49
+ exitCode: number;
50
+ stdout: string;
51
+ stderr: string;
52
+ }
53
+ /** Run arbitrary Python in the same isolated container used by the HumanEval
54
+ * checker. This is also the execution-tool primitive for experiments that let
55
+ * a model test its own snippets; model-written code must never run on the host. */
56
+ declare function runPythonProgram(program: string, timeoutMs?: number): Promise<PythonProgramResult>;
57
+ declare function runChecker(task: HumanEvalTask, candidate: string): Promise<CheckResult>;
58
+ /** The HumanEval `BenchmarkAdapter`. OFFSET (env) selects the correctable middle
59
+ * band; loadTasks honors `limit`/`ids`. The judge is the Docker deployable checker. */
60
+ declare function createHumanEvalAdapter(): BenchmarkAdapter;
61
+
62
+ export { type CheckResult, type HumanEvalTask, type PythonProgramResult, basePrompt, createHumanEvalAdapter, extractCode, loadHumanEval, runChecker, runPythonProgram };
@@ -0,0 +1,17 @@
1
+ import {
2
+ basePrompt,
3
+ createHumanEvalAdapter,
4
+ extractCode,
5
+ loadHumanEval,
6
+ runChecker,
7
+ runPythonProgram
8
+ } from "../chunk-5H5XV76F.js";
9
+ export {
10
+ basePrompt,
11
+ createHumanEvalAdapter,
12
+ extractCode,
13
+ loadHumanEval,
14
+ runChecker,
15
+ runPythonProgram
16
+ };
17
+ //# sourceMappingURL=humaneval.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
@@ -0,0 +1,41 @@
1
+ import { BenchmarkAdapter } from './types.js';
2
+ import '@tangle-network/agent-runtime/loops';
3
+
4
+ /**
5
+ * Mind2Web adapter (osunlp/Multimodal-Mind2Web, split 'test_domain' by default).
6
+ * Web-agent ACTION PREDICTION: each task is one step of a real web task — given
7
+ * the natural-language goal and the page's candidate elements, the worker picks
8
+ * the SINGLE element to act on and the action (CLICK / TYPE / SELECT [+ value]).
9
+ *
10
+ * Judge is the published Mind2Web step metric, FULLY DETERMINISTIC — no LLM:
11
+ * element correct ⇔ predicted backend_node_id ∈ pos_candidates ids
12
+ * operation correct ⇔ op-type matches AND (TYPE/SELECT) the value matches
13
+ * resolved (Step-SR) ⇔ element correct AND operation correct
14
+ * score = 0.6·element + 0.4·operation (a gradient for the optimizer; the right
15
+ * element is most of the credit, mirroring Element-Acc ≫ Op as the lever)
16
+ * This is the low-noise reward a certifiable directive-lift needs: the number is a
17
+ * programmatic match against human-verified ground truth, not a judge's opinion.
18
+ *
19
+ * The worker artifact is three sentinel lines (ELEMENT / ACTION / VALUE) so the
20
+ * judge extracts deterministically; the prompt presents the candidate set as a
21
+ * choice over backend_node_id ordered by id (position uncorrelated with the answer).
22
+ *
23
+ * Each step carries the dataset's OWN page screenshot (written to a temp file by
24
+ * the loader); the worker drops it into a browser.<op> span so run-capsule's screen
25
+ * capsule turns the run into a film — the real page, not a re-rendered DOM.
26
+ *
27
+ * Requires for a live run: a python with `datasets` + `pillow` and network to
28
+ * Hugging Face. Point M2W_PYTHON at it (defaults to bench/.venv/bin/python).
29
+ */
30
+
31
+ interface ParsedAction {
32
+ elementId: string;
33
+ op: string;
34
+ value: string;
35
+ }
36
+ /** Parse the worker artifact's ELEMENT / ACTION / VALUE sentinel lines.
37
+ * Fail-closed: a missing ELEMENT or ACTION returns null (judge → resolved=false). */
38
+ declare function parseAction(artifact: string): ParsedAction | null;
39
+ declare function createMind2WebAdapter(): BenchmarkAdapter;
40
+
41
+ export { createMind2WebAdapter, parseAction };
@@ -0,0 +1,9 @@
1
+ import {
2
+ createMind2WebAdapter,
3
+ parseAction
4
+ } from "../chunk-TBKU5XQI.js";
5
+ export {
6
+ createMind2WebAdapter,
7
+ parseAction
8
+ };
9
+ //# sourceMappingURL=mind2web.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
+ * NoMIRACL adapter.
6
+ *
7
+ * NoMIRACL tests robustness to irrelevant retrieved passages. The worker does
8
+ * not generate an answer here; it classifies whether the supplied passages
9
+ * contain enough evidence to answer the query. This directly measures false
10
+ * positive / false negative behavior for RAG abstention.
11
+ */
12
+
13
+ declare function createNoMiraclAdapter(): BenchmarkAdapter;
14
+
15
+ export { createNoMiraclAdapter };
@@ -0,0 +1,9 @@
1
+ import {
2
+ createNoMiraclAdapter
3
+ } from "../chunk-TSWPNOYM.js";
4
+ import "../chunk-X3BTXCJ4.js";
5
+ import "../chunk-LRRD7NAG.js";
6
+ export {
7
+ createNoMiraclAdapter
8
+ };
9
+ //# sourceMappingURL=nomiracl.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
+ * Open RAG Bench adapter.
6
+ *
7
+ * This targets Vectara-style Open RAG Bench exports over PDF-derived text,
8
+ * table, and image contexts. The deterministic judge scores final-answer
9
+ * agreement and surfaces modality/document metadata for diagnostics.
10
+ */
11
+
12
+ declare function createOpenRagBenchAdapter(): BenchmarkAdapter;
13
+
14
+ export { createOpenRagBenchAdapter };
@@ -0,0 +1,9 @@
1
+ import {
2
+ createOpenRagBenchAdapter
3
+ } from "../chunk-KDIKRJGB.js";
4
+ import "../chunk-X3BTXCJ4.js";
5
+ import "../chunk-LRRD7NAG.js";
6
+ export {
7
+ createOpenRagBenchAdapter
8
+ };
9
+ //# sourceMappingURL=open-rag-bench.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
@@ -0,0 +1,38 @@
1
+ import { OutputAdapter } from '@tangle-network/agent-runtime/loops';
2
+ import { BenchmarkAdapter } from './types.js';
3
+
4
+ /**
5
+ * ProgramBench adapter (facebookresearch/ProgramBench) — cleanroom
6
+ * reverse-engineering: rebuild a black-box executable's behavior from scratch.
7
+ * The agent is given only the gold `./executable` (run-only) + stripped docs and
8
+ * must produce a `submission.tar.gz` whose `./compile.sh` builds an `./executable`
9
+ * with identical observable behavior. Judge = the official `programbench`
10
+ * harness: it extracts the submission, runs compile.sh in the per-task cleanroom
11
+ * Docker image, then runs the HIDDEN behavioral pytest suites (pulled via
12
+ * `programbench blob sync`). Score = fraction of non-ignored tests passed
13
+ * (GRADED, applying the tests.json ignore mask); resolved = all non-ignored tests
14
+ * pass. Fully deterministic — no LLM judge.
15
+ *
16
+ * OutputAdapter is stream-only, so the worker emits its codebase as fenced
17
+ * `path:`-prefixed file blocks (including compile.sh); the adapter materializes
18
+ * those into submission.tar.gz. Test execution is delegated to the real
19
+ * `programbench eval`/`info` harness — pytest scoring + the ignore mask are NOT
20
+ * reimplemented here.
21
+ *
22
+ * Requires for a live run: the bench `.venv` with `programbench` installed +
23
+ * Docker on linux/amd64 (per-task `<image>:task_cleanroom` images) + HF access for
24
+ * the hidden test blobs. For offline/CI listing set PROGRAMBENCH_FIXTURES=1 to load
25
+ * the committed instance ids (bench/fixtures/programbench.json); judging still
26
+ * needs the harness + Docker and fails loud without them — never a fabricated score.
27
+ */
28
+
29
+ /**
30
+ * Parse the worker stream into the submission text the driver materializes: the
31
+ * concatenation of every ```path:<p>``` fenced block. Passed through verbatim to
32
+ * the python driver, which tars it. Empty when the worker emitted no file block
33
+ * (fail-closed → the harness scores a missing compile.sh as 0).
34
+ */
35
+ declare const programbenchSubmissionOutput: OutputAdapter<string>;
36
+ declare function createProgrambenchAdapter(): BenchmarkAdapter;
37
+
38
+ export { createProgrambenchAdapter, programbenchSubmissionOutput };
@@ -0,0 +1,10 @@
1
+ import {
2
+ createProgrambenchAdapter,
3
+ programbenchSubmissionOutput
4
+ } from "../chunk-ZEWMTR5M.js";
5
+ import "../chunk-LRRD7NAG.js";
6
+ export {
7
+ createProgrambenchAdapter,
8
+ programbenchSubmissionOutput
9
+ };
10
+ //# sourceMappingURL=programbench.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
@@ -0,0 +1,42 @@
1
+ import { OutputAdapter } from '@tangle-network/agent-runtime/loops';
2
+ import { BenchScore, BenchTask, LoadOptions } from './types.js';
3
+
4
+ declare const FINAL_ANSWER_SENTINEL = "FINAL ANSWER:";
5
+ interface RagContext {
6
+ id: string;
7
+ text: string;
8
+ title?: string;
9
+ source?: string;
10
+ relevant?: boolean;
11
+ }
12
+ interface RagAnswerScore {
13
+ resolved: boolean;
14
+ score: number;
15
+ finalAnswer: string;
16
+ bestGold: string | null;
17
+ exact: boolean;
18
+ numeric: boolean;
19
+ f1: number;
20
+ threshold: number;
21
+ }
22
+ declare const ragAnswerOutput: OutputAdapter<string>;
23
+ declare function parseFinalAnswer(artifact: string): string;
24
+ declare function parseCitations(artifact: string): string[];
25
+ declare function normalizeAnswer(input: string): string;
26
+ declare function tokenF1(candidate: string, gold: string): number;
27
+ declare function scoreAnswerArtifact(artifact: string, golds: readonly string[], options?: {
28
+ threshold?: number;
29
+ numericTolerance?: number;
30
+ }): RagAnswerScore;
31
+ declare function answerScoreToBenchScore(score: RagAnswerScore, detail: Record<string, unknown>): BenchScore;
32
+ declare function readJsonRows(path: string): Promise<unknown[]>;
33
+ declare function selectTasks(tasks: BenchTask[], opts: LoadOptions, label: string): BenchTask[];
34
+ declare function stringFrom(value: unknown): string | undefined;
35
+ declare function stringArrayFrom(value: unknown): string[];
36
+ declare function firstString(row: Record<string, unknown>, keys: readonly string[]): string;
37
+ declare function allStrings(row: Record<string, unknown>, keys: readonly string[]): string[];
38
+ declare function contextsFrom(value: unknown): RagContext[];
39
+ declare function contextBlock(contexts: readonly RagContext[]): string;
40
+ declare function isObject(value: unknown): value is Record<string, unknown>;
41
+
42
+ export { FINAL_ANSWER_SENTINEL, type RagAnswerScore, type RagContext, allStrings, answerScoreToBenchScore, contextBlock, contextsFrom, firstString, isObject, normalizeAnswer, parseCitations, parseFinalAnswer, ragAnswerOutput, readJsonRows, scoreAnswerArtifact, selectTasks, stringArrayFrom, stringFrom, tokenF1 };