@tangle-network/agent-bench 0.4.0 → 0.4.3
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 +15 -0
- package/dist/adapters.d.ts +4 -11
- package/dist/adapters.js +78 -41
- package/dist/adapters.js.map +1 -1
- package/dist/benchmarks/_harness.d.ts +51 -66
- package/dist/benchmarks/_harness.js +329 -31
- package/dist/benchmarks/_harness.js.map +1 -1
- package/dist/benchmarks/aec-bench.d.ts +4 -25
- package/dist/benchmarks/aec-bench.js +242 -7
- package/dist/benchmarks/aec-bench.js.map +1 -1
- package/dist/benchmarks/agentbench.d.ts +5 -13
- package/dist/benchmarks/agentbench.js +114 -9
- package/dist/benchmarks/agentbench.js.map +1 -1
- package/dist/benchmarks/appworld.d.ts +9 -29
- package/dist/benchmarks/appworld.js +317 -12
- package/dist/benchmarks/appworld.js.map +1 -1
- package/dist/benchmarks/bfcl.d.ts +5 -15
- package/dist/benchmarks/bfcl.js +264 -9
- package/dist/benchmarks/bfcl.js.map +1 -1
- package/dist/benchmarks/cad-design.d.ts +16 -41
- package/dist/benchmarks/cad-design.js +512 -6
- package/dist/benchmarks/cad-design.js.map +1 -1
- package/dist/benchmarks/cadbench.d.ts +4 -17
- package/dist/benchmarks/cadbench.js +2 -8
- package/dist/benchmarks/cadgenbench.d.ts +4 -20
- package/dist/benchmarks/cadgenbench.js +2 -8
- package/dist/benchmarks/commit0.d.ts +5 -27
- package/dist/benchmarks/commit0.js +187 -9
- package/dist/benchmarks/commit0.js.map +1 -1
- package/dist/benchmarks/crag.d.ts +4 -12
- package/dist/benchmarks/crag.js +110 -8
- package/dist/benchmarks/crag.js.map +1 -1
- package/dist/benchmarks/dabstep.d.ts +5 -15
- package/dist/benchmarks/dabstep.js +177 -9
- package/dist/benchmarks/dabstep.js.map +1 -1
- package/dist/benchmarks/enterpriseops-gym.d.ts +5 -34
- package/dist/benchmarks/enterpriseops-gym.js +236 -9
- package/dist/benchmarks/enterpriseops-gym.js.map +1 -1
- package/dist/benchmarks/finresearchbench.d.ts +4 -13
- package/dist/benchmarks/finresearchbench.js +218 -7
- package/dist/benchmarks/finresearchbench.js.map +1 -1
- package/dist/benchmarks/finsearchcomp.d.ts +8 -39
- package/dist/benchmarks/finsearchcomp.js +267 -6
- package/dist/benchmarks/finsearchcomp.js.map +1 -1
- package/dist/benchmarks/frames.d.ts +15 -37
- package/dist/benchmarks/frames.js +408 -11
- package/dist/benchmarks/frames.js.map +1 -1
- package/dist/benchmarks/hotpotqa.d.ts +4 -24
- package/dist/benchmarks/hotpotqa.js +250 -14
- package/dist/benchmarks/hotpotqa.js.map +1 -1
- package/dist/benchmarks/humaneval.d.ts +19 -37
- package/dist/benchmarks/humaneval.js +279 -16
- package/dist/benchmarks/humaneval.js.map +1 -1
- package/dist/benchmarks/mind2web.d.ts +7 -34
- package/dist/benchmarks/mind2web.js +257 -8
- package/dist/benchmarks/mind2web.js.map +1 -1
- package/dist/benchmarks/nomiracl.d.ts +4 -13
- package/dist/benchmarks/nomiracl.js +146 -8
- package/dist/benchmarks/nomiracl.js.map +1 -1
- package/dist/benchmarks/open-rag-bench.d.ts +4 -12
- package/dist/benchmarks/open-rag-bench.js +110 -8
- package/dist/benchmarks/open-rag-bench.js.map +1 -1
- package/dist/benchmarks/programbench.d.ts +5 -29
- package/dist/benchmarks/programbench.js +161 -9
- package/dist/benchmarks/programbench.js.map +1 -1
- package/dist/benchmarks/rag-shared.d.ts +21 -20
- package/dist/benchmarks/rag-shared.js +245 -38
- package/dist/benchmarks/rag-shared.js.map +1 -1
- package/dist/benchmarks/ragbench.d.ts +4 -14
- package/dist/benchmarks/ragbench.js +127 -8
- package/dist/benchmarks/ragbench.js.map +1 -1
- package/dist/benchmarks/simpleqa.d.ts +17 -44
- package/dist/benchmarks/simpleqa.js +293 -10
- package/dist/benchmarks/simpleqa.js.map +1 -1
- package/dist/benchmarks/swe-bench.d.ts +23 -36
- package/dist/benchmarks/swe-bench.js +234 -13
- package/dist/benchmarks/swe-bench.js.map +1 -1
- package/dist/benchmarks/t2-ragbench.d.ts +4 -12
- package/dist/benchmarks/t2-ragbench.js +118 -8
- package/dist/benchmarks/t2-ragbench.js.map +1 -1
- package/dist/benchmarks/tau-bench-shared.d.ts +14 -22
- package/dist/benchmarks/tau-bench-shared.js +169 -9
- package/dist/benchmarks/tau-bench-shared.js.map +1 -1
- package/dist/benchmarks/tau2-bench.d.ts +5 -5
- package/dist/benchmarks/tau2-bench.js +28 -10
- package/dist/benchmarks/tau2-bench.js.map +1 -1
- package/dist/benchmarks/tau3-banking.d.ts +4 -13
- package/dist/benchmarks/tau3-banking.js +28 -8
- package/dist/benchmarks/tau3-banking.js.map +1 -1
- package/dist/benchmarks/terminal-bench.d.ts +4 -22
- package/dist/benchmarks/terminal-bench.js +140 -7
- package/dist/benchmarks/terminal-bench.js.map +1 -1
- package/dist/benchmarks/toollm.d.ts +5 -13
- package/dist/benchmarks/toollm.js +184 -9
- package/dist/benchmarks/toollm.js.map +1 -1
- package/dist/benchmarks/trata-hedge.d.ts +4 -30
- package/dist/benchmarks/trata-hedge.js +336 -6
- package/dist/benchmarks/trata-hedge.js.map +1 -1
- package/dist/benchmarks/types.d.ts +85 -94
- package/dist/benchmarks/types.js +1 -1
- package/dist/benchmarks/webarena-verified.d.ts +5 -13
- package/dist/benchmarks/webarena-verified.js +152 -9
- package/dist/benchmarks/webarena-verified.js.map +1 -1
- package/dist/cadbench-DpQWZHp4.js +285 -0
- package/dist/cadbench-DpQWZHp4.js.map +1 -0
- package/dist/cadgenbench-DRhczfsG.js +151 -0
- package/dist/cadgenbench-DRhczfsG.js.map +1 -0
- package/dist/index.d.ts +245 -293
- package/dist/index.js +1669 -1791
- package/dist/index.js.map +1 -1
- package/package.json +17 -14
- package/pier_agents/candidate_contract.py +238 -24
- package/pier_agents/tangle_candidate.py +75 -5
- package/scripts/verify-packed-consumer.mjs +84 -17
- package/scripts/verify-pier-agent.mts +6 -4
- package/src/benchmarks/_harness.test.mts +16 -1
- package/src/benchmarks/_harness.ts +9 -2
- package/src/benchmarks/terminal-bench.ts +2 -1
- package/src/corpus.test.mts +13 -0
- package/src/corpus.ts +4 -0
- package/src/profile-coordinates.ts +2 -2
- package/src/rollout-ledger/backfill-swe-arena.mts +5 -1
- package/src/rollout-ledger/settle-capture.mts +7 -1
- package/src/search-bench/profiles.ts +1 -1
- package/src/skill-sandbox-smoke.mts +2 -1
- package/src/swe-arena/gepa-seat.mts +1 -1
- package/src/swe-arena/ledger-orphans.test.mts +36 -34
- package/dist/benchmarks/cadbench.js.map +0 -1
- package/dist/benchmarks/cadgenbench.js.map +0 -1
- package/dist/benchmarks/types.js.map +0 -1
- package/dist/chunk-3U5TXJZS.js +0 -251
- package/dist/chunk-3U5TXJZS.js.map +0 -1
- package/dist/chunk-53UPUNBZ.js +0 -325
- package/dist/chunk-53UPUNBZ.js.map +0 -1
- package/dist/chunk-5H5XV76F.js +0 -240
- package/dist/chunk-5H5XV76F.js.map +0 -1
- package/dist/chunk-7GRVHU22.js +0 -208
- package/dist/chunk-7GRVHU22.js.map +0 -1
- package/dist/chunk-C7T7WEK2.js +0 -103
- package/dist/chunk-C7T7WEK2.js.map +0 -1
- package/dist/chunk-HWST3SED.js +0 -162
- package/dist/chunk-HWST3SED.js.map +0 -1
- package/dist/chunk-IA2FBTWC.js +0 -318
- package/dist/chunk-IA2FBTWC.js.map +0 -1
- package/dist/chunk-IFVINJ4B.js +0 -142
- package/dist/chunk-IFVINJ4B.js.map +0 -1
- package/dist/chunk-INNOYXCP.js +0 -387
- package/dist/chunk-INNOYXCP.js.map +0 -1
- package/dist/chunk-IZ5M6OAC.js +0 -169
- package/dist/chunk-IZ5M6OAC.js.map +0 -1
- package/dist/chunk-JTHWEDEW.js +0 -32
- package/dist/chunk-JTHWEDEW.js.map +0 -1
- package/dist/chunk-K3BQGZCT.js +0 -221
- package/dist/chunk-K3BQGZCT.js.map +0 -1
- package/dist/chunk-KP5KD6EN.js +0 -276
- package/dist/chunk-KP5KD6EN.js.map +0 -1
- package/dist/chunk-MQMRLGOG.js +0 -136
- package/dist/chunk-MQMRLGOG.js.map +0 -1
- package/dist/chunk-NQG5XDSB.js +0 -147
- package/dist/chunk-NQG5XDSB.js.map +0 -1
- package/dist/chunk-PA2ZKHJC.js +0 -230
- package/dist/chunk-PA2ZKHJC.js.map +0 -1
- package/dist/chunk-PB64GYIG.js +0 -118
- package/dist/chunk-PB64GYIG.js.map +0 -1
- package/dist/chunk-PUIRNYI7.js +0 -189
- package/dist/chunk-PUIRNYI7.js.map +0 -1
- package/dist/chunk-RCYQEFNX.js +0 -30
- package/dist/chunk-RCYQEFNX.js.map +0 -1
- package/dist/chunk-RH5F53JT.js +0 -182
- package/dist/chunk-RH5F53JT.js.map +0 -1
- package/dist/chunk-SEVJPLZC.js +0 -260
- package/dist/chunk-SEVJPLZC.js.map +0 -1
- package/dist/chunk-SFLA7OH3.js +0 -27
- package/dist/chunk-SFLA7OH3.js.map +0 -1
- package/dist/chunk-SHM6MRRF.js +0 -130
- package/dist/chunk-SHM6MRRF.js.map +0 -1
- package/dist/chunk-SHYIRB7I.js +0 -120
- package/dist/chunk-SHYIRB7I.js.map +0 -1
- package/dist/chunk-SVR2LKYI.js +0 -116
- package/dist/chunk-SVR2LKYI.js.map +0 -1
- package/dist/chunk-TBKU5XQI.js +0 -228
- package/dist/chunk-TBKU5XQI.js.map +0 -1
- package/dist/chunk-UPAMRDX4.js +0 -233
- package/dist/chunk-UPAMRDX4.js.map +0 -1
- package/dist/chunk-V7AEBY6U.js +0 -144
- package/dist/chunk-V7AEBY6U.js.map +0 -1
- package/dist/chunk-VQRS7VUC.js +0 -342
- package/dist/chunk-VQRS7VUC.js.map +0 -1
- package/dist/chunk-WSKWVEQB.js +0 -317
- package/dist/chunk-WSKWVEQB.js.map +0 -1
- package/dist/chunk-X3BTXCJ4.js +0 -262
- package/dist/chunk-X3BTXCJ4.js.map +0 -1
- package/dist/chunk-XKEFIFIC.js +0 -197
- package/dist/chunk-XKEFIFIC.js.map +0 -1
- package/dist/chunk-XYA4XSNU.js +0 -148
- package/dist/chunk-XYA4XSNU.js.map +0 -1
- package/dist/chunk-YSMEKBTD.js +0 -211
- package/dist/chunk-YSMEKBTD.js.map +0 -1
- package/dist/chunk-Z4TZ76N7.js +0 -170
- package/dist/chunk-Z4TZ76N7.js.map +0 -1
|
@@ -1,10 +1,170 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
1
|
+
import { runVenvPython } from "./_harness.js";
|
|
2
|
+
import { readFile, stat } from "node:fs/promises";
|
|
3
|
+
import { resolve } from "node:path";
|
|
4
|
+
//#region src/benchmarks/tau-bench-shared.ts
|
|
5
|
+
/**
|
|
6
|
+
* Shared tau-bench adapter spine.
|
|
7
|
+
*
|
|
8
|
+
* tau2 and tau3 live in the same upstream repository/package namespace today:
|
|
9
|
+
* `sierra-research/tau2-bench`, Python package `tau2`. Keep one implementation
|
|
10
|
+
* for task loading and reward recomputation so the domain/version adapters only
|
|
11
|
+
* choose env names, default domain, and fixture file.
|
|
12
|
+
*/
|
|
13
|
+
const tauResultsOutput = { parse(events) {
|
|
14
|
+
let text = "";
|
|
15
|
+
for (const ev of events) {
|
|
16
|
+
const d = ev?.data;
|
|
17
|
+
const t = d?.finalText ?? d?.text ?? d?.result;
|
|
18
|
+
if (typeof t === "string" && t.length > 0) text = t;
|
|
19
|
+
}
|
|
20
|
+
return ([...text.matchAll(/```(?:text|path|json)?\s*\n([\s\S]*?)```/g)].at(-1)?.[1] ?? text).trim();
|
|
21
|
+
} };
|
|
22
|
+
async function assertPath(path, label, benchName) {
|
|
23
|
+
try {
|
|
24
|
+
await stat(path);
|
|
25
|
+
} catch (err) {
|
|
26
|
+
throw new Error(`${benchName}: missing ${label} at ${path} (${err instanceof Error ? err.message : err})`);
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
function benchDir(config) {
|
|
30
|
+
return process.env[config.dirEnv];
|
|
31
|
+
}
|
|
32
|
+
function benchDomain(config) {
|
|
33
|
+
return process.env[config.domainEnv] ?? config.defaultDomain;
|
|
34
|
+
}
|
|
35
|
+
function rowToTask(row, config, split) {
|
|
36
|
+
const meta = {
|
|
37
|
+
taskId: row.id,
|
|
38
|
+
domain: row.domain,
|
|
39
|
+
split,
|
|
40
|
+
userScenario: row.user_scenario,
|
|
41
|
+
description: row.description,
|
|
42
|
+
evaluationCriteria: row.evaluation_criteria
|
|
43
|
+
};
|
|
44
|
+
return {
|
|
45
|
+
id: row.id,
|
|
46
|
+
split,
|
|
47
|
+
prompt: [
|
|
48
|
+
config.taskIntro,
|
|
49
|
+
`Run this task in the official ${row.domain} domain.`,
|
|
50
|
+
"The benchmark is a simulated multi-turn user/tool conversation.",
|
|
51
|
+
"",
|
|
52
|
+
typeof row.user_scenario === "string" ? row.user_scenario : JSON.stringify(row.user_scenario ?? {}, null, 2),
|
|
53
|
+
"",
|
|
54
|
+
"Return the path to the official tau results.json or trajectory file containing this task run."
|
|
55
|
+
].join("\n"),
|
|
56
|
+
metadata: meta
|
|
57
|
+
};
|
|
58
|
+
}
|
|
59
|
+
function readMeta(task, benchName) {
|
|
60
|
+
const md = task.metadata;
|
|
61
|
+
if (!md || typeof md.taskId !== "string" || typeof md.domain !== "string") throw new Error(`${benchName} task ${task.id} missing metadata — loadTasks did not populate it`);
|
|
62
|
+
return md;
|
|
63
|
+
}
|
|
64
|
+
function selectRows(rows, opts, config, split) {
|
|
65
|
+
let tasks = rows.map((row) => rowToTask(row, config, split));
|
|
66
|
+
if (opts.ids) {
|
|
67
|
+
const want = new Set(opts.ids);
|
|
68
|
+
tasks = tasks.filter((task) => want.has(task.id));
|
|
69
|
+
} else if (opts.limit !== void 0) tasks = tasks.slice(0, opts.limit);
|
|
70
|
+
if (tasks.length === 0) throw new Error(`${config.name}: no tasks matched ${JSON.stringify(opts)}`);
|
|
71
|
+
return tasks;
|
|
72
|
+
}
|
|
73
|
+
async function loadFixtures(config, opts) {
|
|
74
|
+
const rows = JSON.parse(await readFile(config.fixturePath, "utf8"));
|
|
75
|
+
console.warn(`[${config.name}] ${config.fixturesEnv}=1 — loading ${rows.length} adapter fixtures`);
|
|
76
|
+
return selectRows(rows, opts, config, opts.split);
|
|
77
|
+
}
|
|
78
|
+
async function loadOfficialTasks(config, root, opts) {
|
|
79
|
+
const stdout = await runVenvPython(`
|
|
80
|
+
import json, sys
|
|
81
|
+
from pathlib import Path
|
|
82
|
+
root = Path(sys.argv[1])
|
|
83
|
+
domain = sys.argv[2]
|
|
84
|
+
split = sys.argv[3] or None
|
|
85
|
+
sys.path.insert(0, str(root / "src"))
|
|
86
|
+
from tau2.registry import registry
|
|
87
|
+
loader = registry.get_tasks_loader(domain)
|
|
88
|
+
tasks = loader(split)
|
|
89
|
+
rows = []
|
|
90
|
+
for task in tasks:
|
|
91
|
+
row = task.model_dump(mode="json")
|
|
92
|
+
row["domain"] = domain
|
|
93
|
+
rows.append(row)
|
|
94
|
+
print(json.dumps(rows))
|
|
95
|
+
`, [
|
|
96
|
+
root,
|
|
97
|
+
benchDomain(config),
|
|
98
|
+
opts.split ?? ""
|
|
99
|
+
]);
|
|
100
|
+
return selectRows(JSON.parse(stdout), opts, config, opts.split);
|
|
101
|
+
}
|
|
102
|
+
async function scoreOfficialTrajectory(root, meta, artifactPath) {
|
|
103
|
+
const stdout = await runVenvPython(`
|
|
104
|
+
import json, sys
|
|
105
|
+
from pathlib import Path
|
|
106
|
+
root = Path(sys.argv[1])
|
|
107
|
+
task_id = sys.argv[2]
|
|
108
|
+
artifact = Path(sys.argv[3])
|
|
109
|
+
sys.path.insert(0, str(root / "src"))
|
|
110
|
+
from tau2.data_model.simulation import Results
|
|
111
|
+
from tau2.scripts.evaluate_trajectories import compute_simulation_rewards
|
|
112
|
+
results = Results.load(artifact)
|
|
113
|
+
updated = compute_simulation_rewards(results)
|
|
114
|
+
scores = []
|
|
115
|
+
for sim in updated.simulations:
|
|
116
|
+
if sim.task_id == task_id and sim.reward_info is not None:
|
|
117
|
+
scores.append(float(sim.reward_info.reward))
|
|
118
|
+
if not scores:
|
|
119
|
+
raise SystemExit(f"no scored simulations for task_id={task_id} in {artifact}")
|
|
120
|
+
print(json.dumps({"count": len(scores), "score": sum(scores) / len(scores), "scores": scores}))
|
|
121
|
+
`, [
|
|
122
|
+
root,
|
|
123
|
+
meta.taskId,
|
|
124
|
+
artifactPath
|
|
125
|
+
], 0);
|
|
126
|
+
return JSON.parse(stdout.trim().split("\n").at(-1) ?? "{}");
|
|
127
|
+
}
|
|
128
|
+
function createTauBenchAdapter(config) {
|
|
129
|
+
const fixturesMode = process.env[config.fixturesEnv] === "1";
|
|
130
|
+
return {
|
|
131
|
+
name: config.name,
|
|
132
|
+
output: tauResultsOutput,
|
|
133
|
+
async preflight() {
|
|
134
|
+
if (fixturesMode) return;
|
|
135
|
+
const dir = benchDir(config);
|
|
136
|
+
if (!dir) throw new Error(`${config.dirEnv} is required. Fix: ${config.installHint}`);
|
|
137
|
+
await assertPath(`${dir}/src/tau2/registry.py`, "tau registry", config.name);
|
|
138
|
+
await loadOfficialTasks(config, dir, { limit: 1 });
|
|
139
|
+
},
|
|
140
|
+
async loadTasks(opts = {}) {
|
|
141
|
+
if (fixturesMode) return loadFixtures(config, opts);
|
|
142
|
+
const dir = benchDir(config);
|
|
143
|
+
if (!dir) throw new Error(`${config.dirEnv} is required to load official ${config.name} tasks`);
|
|
144
|
+
return loadOfficialTasks(config, dir, opts);
|
|
145
|
+
},
|
|
146
|
+
async goldArtifact() {},
|
|
147
|
+
async judge(task, artifact) {
|
|
148
|
+
const dir = benchDir(config);
|
|
149
|
+
if (!dir) throw new Error(`${config.dirEnv} is required to judge ${config.name} trajectory artifacts`);
|
|
150
|
+
const meta = readMeta(task, config.name);
|
|
151
|
+
const artifactPath = resolve(artifact.trim());
|
|
152
|
+
await assertPath(artifactPath, "tau results/trajectory artifact", config.name);
|
|
153
|
+
const report = await scoreOfficialTrajectory(dir, meta, artifactPath);
|
|
154
|
+
const score = typeof report.score === "number" ? report.score : 0;
|
|
155
|
+
return {
|
|
156
|
+
resolved: score === 1,
|
|
157
|
+
score,
|
|
158
|
+
detail: JSON.stringify({
|
|
159
|
+
taskId: meta.taskId,
|
|
160
|
+
domain: meta.domain,
|
|
161
|
+
count: report.count
|
|
162
|
+
})
|
|
163
|
+
};
|
|
164
|
+
}
|
|
165
|
+
};
|
|
166
|
+
}
|
|
167
|
+
//#endregion
|
|
168
|
+
export { createTauBenchAdapter, tauResultsOutput };
|
|
169
|
+
|
|
10
170
|
//# sourceMappingURL=tau-bench-shared.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
|
1
|
+
{"version":3,"file":"tau-bench-shared.js","names":[],"sources":["../../src/benchmarks/tau-bench-shared.ts"],"sourcesContent":["/**\n * Shared tau-bench adapter spine.\n *\n * tau2 and tau3 live in the same upstream repository/package namespace today:\n * `sierra-research/tau2-bench`, Python package `tau2`. Keep one implementation\n * for task loading and reward recomputation so the domain/version adapters only\n * choose env names, default domain, and fixture file.\n */\n\nimport { readFile, stat } from 'node:fs/promises'\nimport { resolve } from 'node:path'\nimport type { OutputAdapter } from '@tangle-network/agent-runtime/loops'\nimport { runVenvPython } from './_harness'\nimport type { BenchmarkAdapter, BenchScore, BenchTask, LoadOptions } from './types'\n\nexport interface TauBenchConfig {\n name: string\n fixturePath: string\n fixturesEnv: string\n dirEnv: string\n domainEnv: string\n defaultDomain: string\n installHint: string\n taskIntro: string\n}\n\ninterface TauRow {\n id: string\n domain: string\n user_scenario?: unknown\n description?: unknown\n evaluation_criteria?: unknown\n}\n\ninterface TauMeta {\n taskId: string\n domain: string\n split?: string\n userScenario?: unknown\n description?: unknown\n evaluationCriteria?: unknown\n}\n\nexport const tauResultsOutput: OutputAdapter<string> = {\n parse(events) {\n let text = ''\n for (const ev of events) {\n const d = (ev as { data?: Record<string, unknown> })?.data\n const t = d?.finalText ?? d?.text ?? d?.result\n if (typeof t === 'string' && t.length > 0) text = t\n }\n const fences = [...text.matchAll(/```(?:text|path|json)?\\s*\\n([\\s\\S]*?)```/g)]\n return (fences.at(-1)?.[1] ?? text).trim()\n },\n}\n\nasync function assertPath(path: string, label: string, benchName: string): Promise<void> {\n try {\n await stat(path)\n } catch (err) {\n throw new Error(`${benchName}: missing ${label} at ${path} (${err instanceof Error ? err.message : err})`)\n }\n}\n\nfunction benchDir(config: TauBenchConfig): string | undefined {\n return process.env[config.dirEnv]\n}\n\nfunction benchDomain(config: TauBenchConfig): string {\n return process.env[config.domainEnv] ?? config.defaultDomain\n}\n\nfunction rowToTask(row: TauRow, config: TauBenchConfig, split?: string): BenchTask {\n const meta: TauMeta = {\n taskId: row.id,\n domain: row.domain,\n split,\n userScenario: row.user_scenario,\n description: row.description,\n evaluationCriteria: row.evaluation_criteria,\n }\n return {\n id: row.id,\n split,\n prompt: [\n config.taskIntro,\n `Run this task in the official ${row.domain} domain.`,\n 'The benchmark is a simulated multi-turn user/tool conversation.',\n '',\n typeof row.user_scenario === 'string' ? row.user_scenario : JSON.stringify(row.user_scenario ?? {}, null, 2),\n '',\n 'Return the path to the official tau results.json or trajectory file containing this task run.',\n ].join('\\n'),\n metadata: meta as unknown as Record<string, unknown>,\n }\n}\n\nfunction readMeta(task: BenchTask, benchName: string): TauMeta {\n const md = task.metadata\n if (!md || typeof md.taskId !== 'string' || typeof md.domain !== 'string') {\n throw new Error(`${benchName} task ${task.id} missing metadata — loadTasks did not populate it`)\n }\n return md as unknown as TauMeta\n}\n\nfunction selectRows(rows: TauRow[], opts: LoadOptions, config: TauBenchConfig, split?: string): BenchTask[] {\n let tasks = rows.map((row) => rowToTask(row, config, split))\n if (opts.ids) {\n const want = new Set(opts.ids)\n tasks = tasks.filter((task) => want.has(task.id))\n } else if (opts.limit !== undefined) {\n tasks = tasks.slice(0, opts.limit)\n }\n if (tasks.length === 0) throw new Error(`${config.name}: no tasks matched ${JSON.stringify(opts)}`)\n return tasks\n}\n\nasync function loadFixtures(config: TauBenchConfig, opts: LoadOptions): Promise<BenchTask[]> {\n const rows = JSON.parse(await readFile(config.fixturePath, 'utf8')) as TauRow[]\n console.warn(`[${config.name}] ${config.fixturesEnv}=1 — loading ${rows.length} adapter fixtures`)\n return selectRows(rows, opts, config, opts.split)\n}\n\nasync function loadOfficialTasks(config: TauBenchConfig, root: string, opts: LoadOptions): Promise<BenchTask[]> {\n const domain = benchDomain(config)\n const script = `\nimport json, sys\nfrom pathlib import Path\nroot = Path(sys.argv[1])\ndomain = sys.argv[2]\nsplit = sys.argv[3] or None\nsys.path.insert(0, str(root / \"src\"))\nfrom tau2.registry import registry\nloader = registry.get_tasks_loader(domain)\ntasks = loader(split)\nrows = []\nfor task in tasks:\n row = task.model_dump(mode=\"json\")\n row[\"domain\"] = domain\n rows.append(row)\nprint(json.dumps(rows))\n`\n const stdout = await runVenvPython(script, [root, domain, opts.split ?? ''])\n return selectRows(JSON.parse(stdout) as TauRow[], opts, config, opts.split)\n}\n\nasync function scoreOfficialTrajectory(root: string, meta: TauMeta, artifactPath: string): Promise<Record<string, unknown>> {\n const script = `\nimport json, sys\nfrom pathlib import Path\nroot = Path(sys.argv[1])\ntask_id = sys.argv[2]\nartifact = Path(sys.argv[3])\nsys.path.insert(0, str(root / \"src\"))\nfrom tau2.data_model.simulation import Results\nfrom tau2.scripts.evaluate_trajectories import compute_simulation_rewards\nresults = Results.load(artifact)\nupdated = compute_simulation_rewards(results)\nscores = []\nfor sim in updated.simulations:\n if sim.task_id == task_id and sim.reward_info is not None:\n scores.append(float(sim.reward_info.reward))\nif not scores:\n raise SystemExit(f\"no scored simulations for task_id={task_id} in {artifact}\")\nprint(json.dumps({\"count\": len(scores), \"score\": sum(scores) / len(scores), \"scores\": scores}))\n`\n const stdout = await runVenvPython(script, [root, meta.taskId, artifactPath], 0)\n return JSON.parse(stdout.trim().split('\\n').at(-1) ?? '{}') as Record<string, unknown>\n}\n\nexport function createTauBenchAdapter(config: TauBenchConfig): BenchmarkAdapter {\n const fixturesMode = process.env[config.fixturesEnv] === '1'\n\n return {\n name: config.name,\n output: tauResultsOutput,\n\n async preflight() {\n if (fixturesMode) return\n const dir = benchDir(config)\n if (!dir) {\n throw new Error(`${config.dirEnv} is required. Fix: ${config.installHint}`)\n }\n await assertPath(`${dir}/src/tau2/registry.py`, 'tau registry', config.name)\n await loadOfficialTasks(config, dir, { limit: 1 })\n },\n\n async loadTasks(opts: LoadOptions = {}) {\n if (fixturesMode) return loadFixtures(config, opts)\n const dir = benchDir(config)\n if (!dir) throw new Error(`${config.dirEnv} is required to load official ${config.name} tasks`)\n return loadOfficialTasks(config, dir, opts)\n },\n\n async goldArtifact() {\n return undefined\n },\n\n async judge(task: BenchTask, artifact: string): Promise<BenchScore> {\n const dir = benchDir(config)\n if (!dir) throw new Error(`${config.dirEnv} is required to judge ${config.name} trajectory artifacts`)\n const meta = readMeta(task, config.name)\n const artifactPath = resolve(artifact.trim())\n await assertPath(artifactPath, 'tau results/trajectory artifact', config.name)\n const report = await scoreOfficialTrajectory(dir, meta, artifactPath)\n const score = typeof report.score === 'number' ? report.score : 0\n return {\n resolved: score === 1,\n score,\n detail: JSON.stringify({ taskId: meta.taskId, domain: meta.domain, count: report.count }),\n }\n },\n }\n}\n"],"mappings":";;;;;;;;;;;;AA2CA,MAAa,mBAA0C,EACrD,MAAM,QAAQ;CACZ,IAAI,OAAO;CACX,KAAK,MAAM,MAAM,QAAQ;EACvB,MAAM,IAAK,IAA2C;EACtD,MAAM,IAAI,GAAG,aAAa,GAAG,QAAQ,GAAG;EACxC,IAAI,OAAO,MAAM,YAAY,EAAE,SAAS,GAAG,OAAO;CACpD;CAEA,QAAQ,CADQ,GAAG,KAAK,SAAS,2CAA2C,CAC/D,CAAC,CAAC,GAAG,EAAE,CAAC,GAAG,MAAM,KAAA,CAAM,KAAK;AAC3C,EACF;AAEA,eAAe,WAAW,MAAc,OAAe,WAAkC;CACvF,IAAI;EACF,MAAM,KAAK,IAAI;CACjB,SAAS,KAAK;EACZ,MAAM,IAAI,MAAM,GAAG,UAAU,YAAY,MAAM,MAAM,KAAK,IAAI,eAAe,QAAQ,IAAI,UAAU,IAAI,EAAE;CAC3G;AACF;AAEA,SAAS,SAAS,QAA4C;CAC5D,OAAO,QAAQ,IAAI,OAAO;AAC5B;AAEA,SAAS,YAAY,QAAgC;CACnD,OAAO,QAAQ,IAAI,OAAO,cAAc,OAAO;AACjD;AAEA,SAAS,UAAU,KAAa,QAAwB,OAA2B;CACjF,MAAM,OAAgB;EACpB,QAAQ,IAAI;EACZ,QAAQ,IAAI;EACZ;EACA,cAAc,IAAI;EAClB,aAAa,IAAI;EACjB,oBAAoB,IAAI;CAC1B;CACA,OAAO;EACL,IAAI,IAAI;EACR;EACA,QAAQ;GACN,OAAO;GACP,iCAAiC,IAAI,OAAO;GAC5C;GACA;GACA,OAAO,IAAI,kBAAkB,WAAW,IAAI,gBAAgB,KAAK,UAAU,IAAI,iBAAiB,CAAC,GAAG,MAAM,CAAC;GAC3G;GACA;EACF,CAAC,CAAC,KAAK,IAAI;EACX,UAAU;CACZ;AACF;AAEA,SAAS,SAAS,MAAiB,WAA4B;CAC7D,MAAM,KAAK,KAAK;CAChB,IAAI,CAAC,MAAM,OAAO,GAAG,WAAW,YAAY,OAAO,GAAG,WAAW,UAC/D,MAAM,IAAI,MAAM,GAAG,UAAU,QAAQ,KAAK,GAAG,kDAAkD;CAEjG,OAAO;AACT;AAEA,SAAS,WAAW,MAAgB,MAAmB,QAAwB,OAA6B;CAC1G,IAAI,QAAQ,KAAK,KAAK,QAAQ,UAAU,KAAK,QAAQ,KAAK,CAAC;CAC3D,IAAI,KAAK,KAAK;EACZ,MAAM,OAAO,IAAI,IAAI,KAAK,GAAG;EAC7B,QAAQ,MAAM,QAAQ,SAAS,KAAK,IAAI,KAAK,EAAE,CAAC;CAClD,OAAO,IAAI,KAAK,UAAU,KAAA,GACxB,QAAQ,MAAM,MAAM,GAAG,KAAK,KAAK;CAEnC,IAAI,MAAM,WAAW,GAAG,MAAM,IAAI,MAAM,GAAG,OAAO,KAAK,qBAAqB,KAAK,UAAU,IAAI,GAAG;CAClG,OAAO;AACT;AAEA,eAAe,aAAa,QAAwB,MAAyC;CAC3F,MAAM,OAAO,KAAK,MAAM,MAAM,SAAS,OAAO,aAAa,MAAM,CAAC;CAClE,QAAQ,KAAK,IAAI,OAAO,KAAK,IAAI,OAAO,YAAY,eAAe,KAAK,OAAO,kBAAkB;CACjG,OAAO,WAAW,MAAM,MAAM,QAAQ,KAAK,KAAK;AAClD;AAEA,eAAe,kBAAkB,QAAwB,MAAc,MAAyC;CAmB9G,MAAM,SAAS,MAAM,cAAc;;;;;;;;;;;;;;;;GAAQ;EAAC;EAlB7B,YAAY,MAkB4B;EAAG,KAAK,SAAS;CAAE,CAAC;CAC3E,OAAO,WAAW,KAAK,MAAM,MAAM,GAAe,MAAM,QAAQ,KAAK,KAAK;AAC5E;AAEA,eAAe,wBAAwB,MAAc,MAAe,cAAwD;CAoB1H,MAAM,SAAS,MAAM,cAAc;;;;;;;;;;;;;;;;;;GAAQ;EAAC;EAAM,KAAK;EAAQ;CAAY,GAAG,CAAC;CAC/E,OAAO,KAAK,MAAM,OAAO,KAAK,CAAC,CAAC,MAAM,IAAI,CAAC,CAAC,GAAG,EAAE,KAAK,IAAI;AAC5D;AAEA,SAAgB,sBAAsB,QAA0C;CAC9E,MAAM,eAAe,QAAQ,IAAI,OAAO,iBAAiB;CAEzD,OAAO;EACL,MAAM,OAAO;EACb,QAAQ;EAER,MAAM,YAAY;GAChB,IAAI,cAAc;GAClB,MAAM,MAAM,SAAS,MAAM;GAC3B,IAAI,CAAC,KACH,MAAM,IAAI,MAAM,GAAG,OAAO,OAAO,qBAAqB,OAAO,aAAa;GAE5E,MAAM,WAAW,GAAG,IAAI,wBAAwB,gBAAgB,OAAO,IAAI;GAC3E,MAAM,kBAAkB,QAAQ,KAAK,EAAE,OAAO,EAAE,CAAC;EACnD;EAEA,MAAM,UAAU,OAAoB,CAAC,GAAG;GACtC,IAAI,cAAc,OAAO,aAAa,QAAQ,IAAI;GAClD,MAAM,MAAM,SAAS,MAAM;GAC3B,IAAI,CAAC,KAAK,MAAM,IAAI,MAAM,GAAG,OAAO,OAAO,gCAAgC,OAAO,KAAK,OAAO;GAC9F,OAAO,kBAAkB,QAAQ,KAAK,IAAI;EAC5C;EAEA,MAAM,eAAe,CAErB;EAEA,MAAM,MAAM,MAAiB,UAAuC;GAClE,MAAM,MAAM,SAAS,MAAM;GAC3B,IAAI,CAAC,KAAK,MAAM,IAAI,MAAM,GAAG,OAAO,OAAO,wBAAwB,OAAO,KAAK,sBAAsB;GACrG,MAAM,OAAO,SAAS,MAAM,OAAO,IAAI;GACvC,MAAM,eAAe,QAAQ,SAAS,KAAK,CAAC;GAC5C,MAAM,WAAW,cAAc,mCAAmC,OAAO,IAAI;GAC7E,MAAM,SAAS,MAAM,wBAAwB,KAAK,MAAM,YAAY;GACpE,MAAM,QAAQ,OAAO,OAAO,UAAU,WAAW,OAAO,QAAQ;GAChE,OAAO;IACL,UAAU,UAAU;IACpB;IACA,QAAQ,KAAK,UAAU;KAAE,QAAQ,KAAK;KAAQ,QAAQ,KAAK;KAAQ,OAAO,OAAO;IAAM,CAAC;GAC1F;EACF;CACF;AACF"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
declare const tau2ResultsOutput: _tangle_network_agent_runtime_loops.OutputAdapter<string>;
|
|
1
|
+
import { BenchmarkAdapter } from "./types.js";
|
|
2
|
+
//#region src/benchmarks/tau2-bench.d.ts
|
|
3
|
+
declare const tau2ResultsOutput: import("@tangle-network/agent-runtime/loops").OutputAdapter<string>;
|
|
5
4
|
declare function createTau2BenchAdapter(): BenchmarkAdapter;
|
|
6
|
-
|
|
5
|
+
//#endregion
|
|
7
6
|
export { createTau2BenchAdapter, tau2ResultsOutput };
|
|
7
|
+
//# sourceMappingURL=tau2-bench.d.ts.map
|
|
@@ -1,11 +1,29 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
1
|
+
import { benchRoot } from "./_harness.js";
|
|
2
|
+
import { createTauBenchAdapter, tauResultsOutput } from "./tau-bench-shared.js";
|
|
3
|
+
import { join } from "node:path";
|
|
4
|
+
//#region src/benchmarks/tau2-bench.ts
|
|
5
|
+
/**
|
|
6
|
+
* tau2-bench adapter (Sierra tau2/tau-bench successor).
|
|
7
|
+
*
|
|
8
|
+
* Worker artifact = a tau2 `results.json`/trajectory file. Judge = tau2's own
|
|
9
|
+
* reward recomputation over that trajectory. A normal final-answer transcript is
|
|
10
|
+
* not a valid artifact for this benchmark.
|
|
11
|
+
*/
|
|
12
|
+
const FIXTURES = join(benchRoot, "fixtures", "tau2-bench.json");
|
|
13
|
+
const tau2ResultsOutput = tauResultsOutput;
|
|
14
|
+
function createTau2BenchAdapter() {
|
|
15
|
+
return createTauBenchAdapter({
|
|
16
|
+
name: "tau2-bench",
|
|
17
|
+
fixturePath: FIXTURES,
|
|
18
|
+
fixturesEnv: "TAU2_FIXTURES",
|
|
19
|
+
dirEnv: "TAU2_BENCH_DIR",
|
|
20
|
+
domainEnv: "TAU2_DOMAIN",
|
|
21
|
+
defaultDomain: "retail",
|
|
22
|
+
taskIntro: "Run this tau2 task in the official tau2 text benchmark.",
|
|
23
|
+
installHint: "clone https://github.com/sierra-research/tau2-bench, install its deps in bench/.venv, and set TAU2_BENCH_DIR=/path/to/tau2-bench."
|
|
24
|
+
});
|
|
25
|
+
}
|
|
26
|
+
//#endregion
|
|
27
|
+
export { createTau2BenchAdapter, tau2ResultsOutput };
|
|
28
|
+
|
|
11
29
|
//# sourceMappingURL=tau2-bench.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":[],"sourcesContent":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"tau2-bench.js","names":[],"sources":["../../src/benchmarks/tau2-bench.ts"],"sourcesContent":["/**\n * tau2-bench adapter (Sierra tau2/tau-bench successor).\n *\n * Worker artifact = a tau2 `results.json`/trajectory file. Judge = tau2's own\n * reward recomputation over that trajectory. A normal final-answer transcript is\n * not a valid artifact for this benchmark.\n */\n\nimport { join } from 'node:path'\nimport { benchRoot } from './_harness'\nimport { createTauBenchAdapter, tauResultsOutput } from './tau-bench-shared'\nimport type { BenchmarkAdapter } from './types'\n\nconst FIXTURES = join(benchRoot, 'fixtures', 'tau2-bench.json')\n\nexport const tau2ResultsOutput = tauResultsOutput\n\nexport function createTau2BenchAdapter(): BenchmarkAdapter {\n return createTauBenchAdapter({\n name: 'tau2-bench',\n fixturePath: FIXTURES,\n fixturesEnv: 'TAU2_FIXTURES',\n dirEnv: 'TAU2_BENCH_DIR',\n domainEnv: 'TAU2_DOMAIN',\n defaultDomain: 'retail',\n taskIntro: 'Run this tau2 task in the official tau2 text benchmark.',\n installHint:\n 'clone https://github.com/sierra-research/tau2-bench, install its deps in bench/.venv, and set TAU2_BENCH_DIR=/path/to/tau2-bench.',\n })\n}\n"],"mappings":";;;;;;;;;;;AAaA,MAAM,WAAW,KAAK,WAAW,YAAY,iBAAiB;AAE9D,MAAa,oBAAoB;AAEjC,SAAgB,yBAA2C;CACzD,OAAO,sBAAsB;EAC3B,MAAM;EACN,aAAa;EACb,aAAa;EACb,QAAQ;EACR,WAAW;EACX,eAAe;EACf,WAAW;EACX,aACE;CACJ,CAAC;AACH"}
|
|
@@ -1,15 +1,6 @@
|
|
|
1
|
-
import { BenchmarkAdapter } from
|
|
2
|
-
|
|
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
|
-
|
|
1
|
+
import { BenchmarkAdapter } from "./types.js";
|
|
2
|
+
//#region src/benchmarks/tau3-banking.d.ts
|
|
13
3
|
declare function createTau3BankingAdapter(): BenchmarkAdapter;
|
|
14
|
-
|
|
4
|
+
//#endregion
|
|
15
5
|
export { createTau3BankingAdapter };
|
|
6
|
+
//# sourceMappingURL=tau3-banking.d.ts.map
|
|
@@ -1,9 +1,29 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
} from "
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
1
|
+
import { benchRoot } from "./_harness.js";
|
|
2
|
+
import { createTauBenchAdapter } from "./tau-bench-shared.js";
|
|
3
|
+
import { join } from "node:path";
|
|
4
|
+
//#region src/benchmarks/tau3-banking.ts
|
|
5
|
+
/**
|
|
6
|
+
* tau3-banking adapter.
|
|
7
|
+
*
|
|
8
|
+
* The current upstream tau3 release is the `sierra-research/tau2-bench` repo with
|
|
9
|
+
* package namespace `tau2` and a new `banking_knowledge` domain. This adapter
|
|
10
|
+
* reuses the shared tau reward recomputation path and only changes the default
|
|
11
|
+
* domain/env names.
|
|
12
|
+
*/
|
|
13
|
+
const FIXTURES = join(benchRoot, "fixtures", "tau3-banking.json");
|
|
14
|
+
function createTau3BankingAdapter() {
|
|
15
|
+
return createTauBenchAdapter({
|
|
16
|
+
name: "tau3-banking",
|
|
17
|
+
fixturePath: FIXTURES,
|
|
18
|
+
fixturesEnv: "TAU3_FIXTURES",
|
|
19
|
+
dirEnv: "TAU3_BENCH_DIR",
|
|
20
|
+
domainEnv: "TAU3_DOMAIN",
|
|
21
|
+
defaultDomain: "banking_knowledge",
|
|
22
|
+
taskIntro: "Run this tau3 banking task in the official tau3 knowledge benchmark.",
|
|
23
|
+
installHint: "clone https://github.com/sierra-research/tau2-bench, run `uv sync --extra knowledge`, install/import it from bench/.venv, and set TAU3_BENCH_DIR=/path/to/tau2-bench."
|
|
24
|
+
});
|
|
25
|
+
}
|
|
26
|
+
//#endregion
|
|
27
|
+
export { createTau3BankingAdapter };
|
|
28
|
+
|
|
9
29
|
//# sourceMappingURL=tau3-banking.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":[],"sourcesContent":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"tau3-banking.js","names":[],"sources":["../../src/benchmarks/tau3-banking.ts"],"sourcesContent":["/**\n * tau3-banking adapter.\n *\n * The current upstream tau3 release is the `sierra-research/tau2-bench` repo with\n * package namespace `tau2` and a new `banking_knowledge` domain. This adapter\n * reuses the shared tau reward recomputation path and only changes the default\n * domain/env names.\n */\n\nimport { join } from 'node:path'\nimport { benchRoot } from './_harness'\nimport { createTauBenchAdapter } from './tau-bench-shared'\nimport type { BenchmarkAdapter } from './types'\n\nconst FIXTURES = join(benchRoot, 'fixtures', 'tau3-banking.json')\n\nexport function createTau3BankingAdapter(): BenchmarkAdapter {\n return createTauBenchAdapter({\n name: 'tau3-banking',\n fixturePath: FIXTURES,\n fixturesEnv: 'TAU3_FIXTURES',\n dirEnv: 'TAU3_BENCH_DIR',\n domainEnv: 'TAU3_DOMAIN',\n defaultDomain: 'banking_knowledge',\n taskIntro: 'Run this tau3 banking task in the official tau3 knowledge benchmark.',\n installHint:\n 'clone https://github.com/sierra-research/tau2-bench, run `uv sync --extra knowledge`, install/import it from bench/.venv, and set TAU3_BENCH_DIR=/path/to/tau2-bench.',\n })\n}\n"],"mappings":";;;;;;;;;;;;AAcA,MAAM,WAAW,KAAK,WAAW,YAAY,mBAAmB;AAEhE,SAAgB,2BAA6C;CAC3D,OAAO,sBAAsB;EAC3B,MAAM;EACN,aAAa;EACb,aAAa;EACb,QAAQ;EACR,WAAW;EACX,eAAe;EACf,WAAW;EACX,aACE;CACJ,CAAC;AACH"}
|
|
@@ -1,24 +1,6 @@
|
|
|
1
|
-
import { BenchmarkAdapter } from
|
|
2
|
-
|
|
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
|
-
|
|
1
|
+
import { BenchmarkAdapter } from "./types.js";
|
|
2
|
+
//#region src/benchmarks/terminal-bench.d.ts
|
|
22
3
|
declare function createTerminalBenchAdapter(): BenchmarkAdapter;
|
|
23
|
-
|
|
4
|
+
//#endregion
|
|
24
5
|
export { createTerminalBenchAdapter };
|
|
6
|
+
//# sourceMappingURL=terminal-bench.d.ts.map
|
|
@@ -1,8 +1,141 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
1
|
+
import { benchRoot, preflightVenvImports, readJsonReport, runStagedJudge, runVenvPython, safeRunId, stageFile, venvBinAt, venvPythonAt } from "./_harness.js";
|
|
2
|
+
import { join } from "node:path";
|
|
3
|
+
//#region src/benchmarks/terminal-bench.ts
|
|
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
|
+
const terminalBenchVenvDir = () => process.env.TERMINAL_BENCH_VENV ?? ".venv-terminal-bench";
|
|
22
|
+
const terminalBenchPython = () => venvPythonAt(terminalBenchVenvDir());
|
|
23
|
+
const terminalBenchBin = () => venvBinAt(terminalBenchVenvDir(), "tb");
|
|
24
|
+
const DATASET = "terminal-bench-core";
|
|
25
|
+
const DATASET_VERSION = "0.1.1";
|
|
26
|
+
const DATASET_REF = `${DATASET}==${DATASET_VERSION}`;
|
|
27
|
+
const FIXTURE_IDS = ["hello-world"];
|
|
28
|
+
const SCRIPT_AGENT = "tb_agents.script_agent:ScriptAgent";
|
|
29
|
+
/** Enumerate dataset tasks via tb's Dataset loader (caches from the registry on
|
|
30
|
+
* first run). Reads instruction from each task.yaml and the gold solution. */
|
|
31
|
+
async function loadRows(opts) {
|
|
32
|
+
const ids = opts.ids ?? (opts.limit ? null : FIXTURE_IDS);
|
|
33
|
+
const limit = opts.limit ?? null;
|
|
34
|
+
const stdout = await runVenvPython(`
|
|
35
|
+
import json, sys
|
|
36
|
+
from pathlib import Path
|
|
37
|
+
from terminal_bench.dataset.dataset import Dataset
|
|
38
|
+
from terminal_bench.handlers.trial_handler import TaskPaths
|
|
39
|
+
|
|
40
|
+
req_ids = json.loads(sys.argv[1]) if sys.argv[1] else None
|
|
41
|
+
limit = json.loads(sys.argv[2]) if sys.argv[2] else None
|
|
42
|
+
|
|
43
|
+
ds = Dataset(name=${JSON.stringify(DATASET)}, version=${JSON.stringify(DATASET_VERSION)}, task_ids=req_ids, n_tasks=limit)
|
|
44
|
+
|
|
45
|
+
import yaml
|
|
46
|
+
out = []
|
|
47
|
+
for task_dir in ds:
|
|
48
|
+
tp = TaskPaths(task_dir)
|
|
49
|
+
cfg = yaml.safe_load(tp.task_config_path.read_text())
|
|
50
|
+
try:
|
|
51
|
+
sol = tp.solution_path.read_text()
|
|
52
|
+
except FileNotFoundError:
|
|
53
|
+
sol = None
|
|
54
|
+
out.append({
|
|
55
|
+
"id": task_dir.name,
|
|
56
|
+
"instruction": cfg["instruction"],
|
|
57
|
+
"task_dir": str(task_dir),
|
|
58
|
+
"solution": sol if (tp.solution_path.suffix == ".sh" if sol is not None else False) else None,
|
|
59
|
+
})
|
|
60
|
+
print(json.dumps(out))
|
|
61
|
+
`, [ids ? JSON.stringify(ids) : "", limit !== null ? String(limit) : ""], 0, terminalBenchPython());
|
|
62
|
+
return JSON.parse(stdout);
|
|
63
|
+
}
|
|
64
|
+
function createTerminalBenchAdapter() {
|
|
65
|
+
return {
|
|
66
|
+
name: "terminal-bench",
|
|
67
|
+
async preflight() {
|
|
68
|
+
await preflightVenvImports({
|
|
69
|
+
modules: ["terminal_bench"],
|
|
70
|
+
requireDocker: true,
|
|
71
|
+
python: terminalBenchPython(),
|
|
72
|
+
fix: `Fix: (1) python3 -m venv bench/${terminalBenchVenvDir()} && bench/${terminalBenchVenvDir()}/bin/pip install terminal-bench (an ISOLATED venv — Terminal-Bench/LiteLLM require Pydantic 2 while AppWorld pins Pydantic 1; override the dir with TERMINAL_BENCH_VENV) ; (2) ensure the Docker daemon is running (the judge builds per-task images on first run). The ${DATASET_REF} dataset is cached from the Terminal-Bench registry on first loadTasks.`
|
|
73
|
+
});
|
|
74
|
+
},
|
|
75
|
+
async loadTasks(opts = {}) {
|
|
76
|
+
const rows = await loadRows(opts);
|
|
77
|
+
if (rows.length === 0) throw new Error(`terminal-bench loadTasks returned no tasks for ${JSON.stringify(opts)} (dataset ${DATASET_REF}). Check the requested ids exist in the dataset.`);
|
|
78
|
+
return rows.map((r) => ({
|
|
79
|
+
id: r.id,
|
|
80
|
+
split: DATASET_VERSION,
|
|
81
|
+
prompt: r.instruction,
|
|
82
|
+
metadata: {
|
|
83
|
+
dataset: DATASET,
|
|
84
|
+
datasetVersion: DATASET_VERSION,
|
|
85
|
+
datasetRef: DATASET_REF,
|
|
86
|
+
taskDir: r.task_dir,
|
|
87
|
+
solution: r.solution,
|
|
88
|
+
instruction: r.instruction
|
|
89
|
+
}
|
|
90
|
+
}));
|
|
91
|
+
},
|
|
92
|
+
async goldArtifact(task) {
|
|
93
|
+
const sol = task.metadata?.solution;
|
|
94
|
+
return typeof sol === "string" ? sol : void 0;
|
|
95
|
+
},
|
|
96
|
+
async judge(task, artifact) {
|
|
97
|
+
const runId = safeRunId("bench", `${task.id}-${Date.now()}`);
|
|
98
|
+
return runStagedJudge({
|
|
99
|
+
tmpPrefix: "tbench-",
|
|
100
|
+
bin: terminalBenchBin(),
|
|
101
|
+
cwd: () => benchRoot,
|
|
102
|
+
async stage(dir) {
|
|
103
|
+
await stageFile(join(dir, "attempt.sh"), artifact);
|
|
104
|
+
},
|
|
105
|
+
argv: (dir) => [
|
|
106
|
+
"run",
|
|
107
|
+
"-d",
|
|
108
|
+
DATASET_REF,
|
|
109
|
+
"-t",
|
|
110
|
+
task.id,
|
|
111
|
+
"--agent-import-path",
|
|
112
|
+
SCRIPT_AGENT,
|
|
113
|
+
"--agent-kwarg",
|
|
114
|
+
`script_path=${join(dir, "attempt.sh")}`,
|
|
115
|
+
"--output-path",
|
|
116
|
+
join(dir, "runs"),
|
|
117
|
+
"--run-id",
|
|
118
|
+
runId,
|
|
119
|
+
"--n-concurrent",
|
|
120
|
+
"1",
|
|
121
|
+
"--no-livestream",
|
|
122
|
+
"--cleanup"
|
|
123
|
+
],
|
|
124
|
+
async parseReport(dir) {
|
|
125
|
+
const report = await readJsonReport(join(dir, "runs", runId, "results.json"));
|
|
126
|
+
const resolved = (report.resolved_ids ?? []).includes(task.id);
|
|
127
|
+
const trial = report.results?.find((r) => r.task_id === task.id);
|
|
128
|
+
return {
|
|
129
|
+
resolved,
|
|
130
|
+
score: resolved ? 1 : 0,
|
|
131
|
+
detail: JSON.stringify(trial?.parser_results ?? report.resolved_ids ?? {})
|
|
132
|
+
};
|
|
133
|
+
}
|
|
134
|
+
});
|
|
135
|
+
}
|
|
136
|
+
};
|
|
137
|
+
}
|
|
138
|
+
//#endregion
|
|
139
|
+
export { createTerminalBenchAdapter };
|
|
140
|
+
|
|
8
141
|
//# sourceMappingURL=terminal-bench.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":[],"sourcesContent":[],"
|
|
1
|
+
{"version":3,"file":"terminal-bench.js","names":[],"sources":["../../src/benchmarks/terminal-bench.ts"],"sourcesContent":["/**\n * Terminal-Bench adapter. Each task = a Docker environment + an English\n * instruction + a per-task verifier (run-tests.sh + pytest). The worker artifact\n * is the shell script the agent ran to attempt the task; the judge REPLAYS that\n * script in a fresh task container via the Terminal-Bench harness (`tb run` with\n * our ScriptAgent), then the task's own verifier scores the resulting state.\n * Fully deterministic — no LLM judge, no self-authored score.\n *\n * Requires: an isolated bench `.venv-terminal-bench` with `terminal-bench`\n * installed + a running Docker daemon (per-task images are built on first run).\n * Override with TERMINAL_BENCH_VENV. loadTasks caches the dataset from the\n * Terminal-Bench registry on first run.\n *\n * Process/Docker/report plumbing is shared via ./_harness; this file owns the\n * Terminal-Bench-specific pieces: the Dataset enumeration, the ScriptAgent replay\n * argv, and the results.json shape.\n */\n\nimport { join } from 'node:path'\nimport {\n benchRoot,\n preflightVenvImports,\n readJsonReport,\n runStagedJudge,\n runVenvPython,\n safeRunId,\n stageFile,\n venvBinAt,\n venvPythonAt,\n} from './_harness'\nimport type { BenchmarkAdapter, BenchScore, BenchTask, LoadOptions } from './types'\n\n// Terminal-Bench imports LiteLLM/Pydantic-2 APIs, while AppWorld pins Pydantic 1.\n// Keep it out of the shared bench .venv. Resolved at call-time so tests/runs can\n// override the env without reloading this module.\nconst terminalBenchVenvDir = (): string => process.env.TERMINAL_BENCH_VENV ?? '.venv-terminal-bench'\nconst terminalBenchPython = (): string => venvPythonAt(terminalBenchVenvDir())\nconst terminalBenchBin = (): string => venvBinAt(terminalBenchVenvDir(), 'tb')\n\n// Pinned dataset: the 0.1.1 core set is patched for terminal-bench >=0.2.4 (the\n// installed CLI) and is the published launch task set. name==version is what `tb\n// run -d` and `tb datasets download -d` both accept.\nconst DATASET = 'terminal-bench-core'\nconst DATASET_VERSION = '0.1.1'\nconst DATASET_REF = `${DATASET}==${DATASET_VERSION}`\n\n// Bundled fixture: when no ids/limit are given, load these. hello-world is the\n// fastest deterministic task (prebuilt python image, file-write verifier) so the\n// adapter is runnable without a large pull.\nconst FIXTURE_IDS = ['hello-world']\n\n// Import path the harness uses to load our replay agent (cwd = benchRoot).\nconst SCRIPT_AGENT = 'tb_agents.script_agent:ScriptAgent'\n\ninterface TbTaskRow {\n id: string\n instruction: string\n task_dir: string\n solution: string | null\n}\n\ninterface TbReport {\n resolved_ids?: string[]\n results?: Array<{ task_id: string; is_resolved: boolean | null; parser_results?: unknown }>\n}\n\n/** Enumerate dataset tasks via tb's Dataset loader (caches from the registry on\n * first run). Reads instruction from each task.yaml and the gold solution. */\nasync function loadRows(opts: LoadOptions): Promise<TbTaskRow[]> {\n const ids = opts.ids ?? (opts.limit ? null : FIXTURE_IDS)\n const limit = opts.limit ?? null\n const script = `\nimport json, sys\nfrom pathlib import Path\nfrom terminal_bench.dataset.dataset import Dataset\nfrom terminal_bench.handlers.trial_handler import TaskPaths\n\nreq_ids = json.loads(sys.argv[1]) if sys.argv[1] else None\nlimit = json.loads(sys.argv[2]) if sys.argv[2] else None\n\nds = Dataset(name=${JSON.stringify(DATASET)}, version=${JSON.stringify(DATASET_VERSION)}, task_ids=req_ids, n_tasks=limit)\n\nimport yaml\nout = []\nfor task_dir in ds:\n tp = TaskPaths(task_dir)\n cfg = yaml.safe_load(tp.task_config_path.read_text())\n try:\n sol = tp.solution_path.read_text()\n except FileNotFoundError:\n sol = None\n out.append({\n \"id\": task_dir.name,\n \"instruction\": cfg[\"instruction\"],\n \"task_dir\": str(task_dir),\n \"solution\": sol if (tp.solution_path.suffix == \".sh\" if sol is not None else False) else None,\n })\nprint(json.dumps(out))\n`\n const stdout = await runVenvPython(\n script,\n [ids ? JSON.stringify(ids) : '', limit !== null ? String(limit) : ''],\n 0,\n terminalBenchPython(),\n )\n return JSON.parse(stdout) as TbTaskRow[]\n}\n\nexport function createTerminalBenchAdapter(): BenchmarkAdapter {\n return {\n name: 'terminal-bench',\n\n async preflight() {\n await preflightVenvImports({\n modules: ['terminal_bench'],\n requireDocker: true,\n python: terminalBenchPython(),\n fix:\n `Fix: (1) python3 -m venv bench/${terminalBenchVenvDir()} && ` +\n `bench/${terminalBenchVenvDir()}/bin/pip install terminal-bench ` +\n `(an ISOLATED venv — Terminal-Bench/LiteLLM require Pydantic 2 while AppWorld pins Pydantic 1; ` +\n `override the dir with TERMINAL_BENCH_VENV) ; ` +\n `(2) ensure the Docker daemon is running (the judge builds per-task images on first run). ` +\n `The ${DATASET_REF} dataset is cached from the Terminal-Bench registry on first loadTasks.`,\n })\n },\n\n async loadTasks(opts: LoadOptions = {}) {\n const rows = await loadRows(opts)\n if (rows.length === 0) {\n throw new Error(\n `terminal-bench loadTasks returned no tasks for ${JSON.stringify(opts)} ` +\n `(dataset ${DATASET_REF}). Check the requested ids exist in the dataset.`,\n )\n }\n return rows.map(\n (r): BenchTask => ({\n id: r.id,\n split: DATASET_VERSION,\n prompt: r.instruction,\n metadata: {\n dataset: DATASET,\n datasetVersion: DATASET_VERSION,\n datasetRef: DATASET_REF,\n taskDir: r.task_dir,\n solution: r.solution,\n instruction: r.instruction,\n },\n }),\n )\n },\n\n async goldArtifact(task: BenchTask) {\n // Gold = the task's solution.sh (the oracle script). solution.yaml tasks have\n // no shell-script artifact form here, so they return undefined (cannot be\n // verify-judged via the script-replay seam — use a .sh-solution task).\n const sol = task.metadata?.solution\n return typeof sol === 'string' ? sol : undefined\n },\n\n async judge(task: BenchTask, artifact: string): Promise<BenchScore> {\n const runId = safeRunId('bench', `${task.id}-${Date.now()}`)\n return runStagedJudge({\n tmpPrefix: 'tbench-',\n bin: terminalBenchBin(),\n cwd: () => benchRoot,\n async stage(dir) {\n await stageFile(join(dir, 'attempt.sh'), artifact)\n },\n // The harness builds a fresh task container, runs ScriptAgent (which replays\n // the artifact script), then runs the task's verifier. --no-livestream keeps\n // stdout sane; --cleanup removes the per-run images.\n argv: (dir) => [\n 'run',\n '-d', DATASET_REF,\n '-t', task.id,\n '--agent-import-path', SCRIPT_AGENT,\n '--agent-kwarg', `script_path=${join(dir, 'attempt.sh')}`,\n '--output-path', join(dir, 'runs'),\n '--run-id', runId,\n '--n-concurrent', '1',\n '--no-livestream',\n '--cleanup',\n ],\n async parseReport(dir) {\n const report = await readJsonReport<TbReport>(join(dir, 'runs', runId, 'results.json'))\n const resolved = (report.resolved_ids ?? []).includes(task.id)\n const trial = report.results?.find((r) => r.task_id === task.id)\n return {\n resolved,\n score: resolved ? 1 : 0,\n detail: JSON.stringify(trial?.parser_results ?? report.resolved_ids ?? {}),\n }\n },\n })\n },\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAmCA,MAAM,6BAAqC,QAAQ,IAAI,uBAAuB;AAC9E,MAAM,4BAAoC,aAAa,qBAAqB,CAAC;AAC7E,MAAM,yBAAiC,UAAU,qBAAqB,GAAG,IAAI;AAK7E,MAAM,UAAU;AAChB,MAAM,kBAAkB;AACxB,MAAM,cAAc,GAAG,QAAQ,IAAI;AAKnC,MAAM,cAAc,CAAC,aAAa;AAGlC,MAAM,eAAe;;;AAgBrB,eAAe,SAAS,MAAyC;CAC/D,MAAM,MAAM,KAAK,QAAQ,KAAK,QAAQ,OAAO;CAC7C,MAAM,QAAQ,KAAK,SAAS;CA6B5B,MAAM,SAAS,MAAM,cACnB;;;;;;;;;oBApBgB,KAAK,UAAU,OAAO,EAAE,YAAY,KAAK,UAAU,eAAe,EAAE;;;;;;;;;;;;;;;;;;GAqBpF,CAAC,MAAM,KAAK,UAAU,GAAG,IAAI,IAAI,UAAU,OAAO,OAAO,KAAK,IAAI,EAAE,GACpE,GACA,oBAAoB,CACtB;CACA,OAAO,KAAK,MAAM,MAAM;AAC1B;AAEA,SAAgB,6BAA+C;CAC7D,OAAO;EACL,MAAM;EAEN,MAAM,YAAY;GAChB,MAAM,qBAAqB;IACzB,SAAS,CAAC,gBAAgB;IAC1B,eAAe;IACf,QAAQ,oBAAoB;IAC5B,KACE,kCAAkC,qBAAqB,EAAE,YAChD,qBAAqB,EAAE,0QAIzB,YAAY;GACvB,CAAC;EACH;EAEA,MAAM,UAAU,OAAoB,CAAC,GAAG;GACtC,MAAM,OAAO,MAAM,SAAS,IAAI;GAChC,IAAI,KAAK,WAAW,GAClB,MAAM,IAAI,MACR,kDAAkD,KAAK,UAAU,IAAI,EAAE,YACzD,YAAY,iDAC5B;GAEF,OAAO,KAAK,KACT,OAAkB;IACjB,IAAI,EAAE;IACN,OAAO;IACP,QAAQ,EAAE;IACV,UAAU;KACR,SAAS;KACT,gBAAgB;KAChB,YAAY;KACZ,SAAS,EAAE;KACX,UAAU,EAAE;KACZ,aAAa,EAAE;IACjB;GACF,EACF;EACF;EAEA,MAAM,aAAa,MAAiB;GAIlC,MAAM,MAAM,KAAK,UAAU;GAC3B,OAAO,OAAO,QAAQ,WAAW,MAAM,KAAA;EACzC;EAEA,MAAM,MAAM,MAAiB,UAAuC;GAClE,MAAM,QAAQ,UAAU,SAAS,GAAG,KAAK,GAAG,GAAG,KAAK,IAAI,GAAG;GAC3D,OAAO,eAAe;IACpB,WAAW;IACX,KAAK,iBAAiB;IACtB,WAAW;IACX,MAAM,MAAM,KAAK;KACf,MAAM,UAAU,KAAK,KAAK,YAAY,GAAG,QAAQ;IACnD;IAIA,OAAO,QAAQ;KACb;KACA;KAAM;KACN;KAAM,KAAK;KACX;KAAuB;KACvB;KAAiB,eAAe,KAAK,KAAK,YAAY;KACtD;KAAiB,KAAK,KAAK,MAAM;KACjC;KAAY;KACZ;KAAkB;KAClB;KACA;IACF;IACA,MAAM,YAAY,KAAK;KACrB,MAAM,SAAS,MAAM,eAAyB,KAAK,KAAK,QAAQ,OAAO,cAAc,CAAC;KACtF,MAAM,YAAY,OAAO,gBAAgB,CAAC,EAAA,CAAG,SAAS,KAAK,EAAE;KAC7D,MAAM,QAAQ,OAAO,SAAS,MAAM,MAAM,EAAE,YAAY,KAAK,EAAE;KAC/D,OAAO;MACL;MACA,OAAO,WAAW,IAAI;MACtB,QAAQ,KAAK,UAAU,OAAO,kBAAkB,OAAO,gBAAgB,CAAC,CAAC;KAC3E;IACF;GACF,CAAC;EACH;CACF;AACF"}
|
|
@@ -1,16 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
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
|
-
|
|
1
|
+
import { BenchmarkAdapter } from "./types.js";
|
|
2
|
+
import { OutputAdapter } from "@tangle-network/agent-runtime/loops";
|
|
3
|
+
//#region src/benchmarks/toollm.d.ts
|
|
13
4
|
declare const toollmOutput: OutputAdapter<string>;
|
|
14
5
|
declare function createToolLlmAdapter(): BenchmarkAdapter;
|
|
15
|
-
|
|
6
|
+
//#endregion
|
|
16
7
|
export { createToolLlmAdapter, toollmOutput };
|
|
8
|
+
//# sourceMappingURL=toollm.d.ts.map
|