@garuda-agent/garuda 0.18.0 → 0.18.2

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 (58) hide show
  1. package/CHANGELOG.md +156 -0
  2. package/README.md +3 -2
  3. package/dist/{acpCommand-IUZPLPLI.js → acpCommand-PUJHFWYU.js} +10 -8
  4. package/dist/advise-C777SZ5M.js +433 -0
  5. package/dist/brief-RWKESOPT.js +91 -0
  6. package/dist/buildCheck-HB46NWLX.js +19 -0
  7. package/dist/buildInfo-Z4P7QAQL.js +8 -0
  8. package/dist/chunk-2OYTNNUJ.js +216 -0
  9. package/dist/chunk-4BELTWP4.js +156 -0
  10. package/dist/chunk-4QRTTRVK.js +88 -0
  11. package/dist/chunk-6JQTPW3P.js +88 -0
  12. package/dist/chunk-A5DLAXB4.js +1780 -0
  13. package/dist/{chunk-FARS4R67.js → chunk-AX3A5KPH.js} +18 -1
  14. package/dist/chunk-CFDRP6XW.js +9 -0
  15. package/dist/chunk-E6YRCDSF.js +9 -0
  16. package/dist/{chunk-OQ26W5L4.js → chunk-HP6EGFHV.js} +132 -75
  17. package/dist/chunk-L55VUSX3.js +54 -0
  18. package/dist/{chunk-B4SJY7KT.js → chunk-LMKGSYJC.js} +77 -8
  19. package/dist/{chunk-Q4P3W657.js → chunk-LWNMEGDF.js} +10 -1124
  20. package/dist/{chunk-23FXBNBB.js → chunk-MNE7HHX2.js} +2 -1
  21. package/dist/{chunk-UKIE4AAM.js → chunk-NLS7GMF7.js} +11 -105
  22. package/dist/{chunk-6XHON3Q6.js → chunk-QXTHEFKP.js} +3 -3
  23. package/dist/{chunk-4BVCYCQT.js → chunk-R7RCW4BQ.js} +9 -7
  24. package/dist/{chunk-NHWHG3SW.js → chunk-STVFWSIL.js} +350 -57
  25. package/dist/{chunk-5B5HDTUR.js → chunk-TWQ7V2L6.js} +2 -2
  26. package/dist/chunk-ULAJPMY7.js +107 -0
  27. package/dist/chunk-VISKX36R.js +306 -0
  28. package/dist/{chunk-55CFEEIN.js → chunk-WK5NE6RY.js} +2 -2
  29. package/dist/chunk-Y62J7PTD.js +90 -0
  30. package/dist/chunk-YAQ6QLKB.js +40 -0
  31. package/dist/{chunk-FOPBOB7W.js → chunk-YEH2OONM.js} +6 -4
  32. package/dist/{chunk-7TH3NHCQ.js → chunk-ZKT4P2PC.js} +2 -2
  33. package/dist/cli/index.js +242 -52
  34. package/dist/{create-W6BV75QX.js → create-OACSGJ37.js} +5 -5
  35. package/dist/{evalCommand-SKJQ6CW2.js → evalCommand-MRO6ENCA.js} +77 -39
  36. package/dist/{evalTune-CZRCPSZ3.js → evalTune-VL5RHYOG.js} +24 -18
  37. package/dist/{export-SJ3DUP6W.js → export-ZPF3AMO6.js} +27 -4
  38. package/dist/exportHtml-ISISG5HG.js +21 -0
  39. package/dist/{inkChat-WYYAFZXD.js → inkChat-UDFX6GH6.js} +256 -41
  40. package/dist/{install-TKWN5AYH.js → install-4ST5BNRG.js} +3 -3
  41. package/dist/{jobCommand-2ODQLHB3.js → jobCommand-ILOTYOX3.js} +8 -7
  42. package/dist/{launchd-3A3ONEW5.js → launchd-QG6R5RAK.js} +4 -4
  43. package/dist/{lspCommand-ZZ6R4PA2.js → lspCommand-X4FTTONR.js} +3 -3
  44. package/dist/{manager-TCYTA5XU.js → manager-YH7722C2.js} +3 -3
  45. package/dist/{nightCommand-WJU6VZA6.js → nightCommand-XPWT6CQZ.js} +8 -7
  46. package/dist/receiptView-YFDHV253.js +19 -0
  47. package/dist/{remove-42WQNVPX.js → remove-STX5UO7X.js} +3 -3
  48. package/dist/{run-PTMRQCIU.js → run-W4TK52WT.js} +5 -5
  49. package/dist/runner-EBF6EOYM.js +97 -0
  50. package/dist/{server-VEYIJHEU.js → server-ASM73QVY.js} +3 -3
  51. package/dist/tour-CEVMAC5S.js +18 -0
  52. package/dist/tune-KSNKBPNJ.js +51 -0
  53. package/dist/uiState-YFJQ43D7.js +16 -0
  54. package/package.json +1 -1
  55. package/dist/chunk-4JSUUDFQ.js +0 -118
  56. package/dist/chunk-C57GHLKP.js +0 -9
  57. package/dist/chunk-DOCDCQVM.js +0 -484
  58. package/dist/tune-YVI2KWQF.js +0 -31
@@ -1,484 +0,0 @@
1
- #!/usr/bin/env node
2
- import {
3
- VERSION
4
- } from "./chunk-C57GHLKP.js";
5
- import {
6
- git
7
- } from "./chunk-6XHON3Q6.js";
8
- import {
9
- HostExecutor
10
- } from "./chunk-B4SJY7KT.js";
11
-
12
- // src/buildInfo.ts
13
- var BUILD_COMMIT = true ? "d30d3d872ea1fd3a455eb8d6461d78efda70ba5b" : void 0;
14
-
15
- // src/evals/stats.ts
16
- var BOOTSTRAP_DRAWS = 1e4;
17
- var DEFAULT_SEED = 1;
18
- function seeded(seed) {
19
- let a = seed >>> 0;
20
- return () => {
21
- a = a + 1831565813 >>> 0;
22
- let t = a;
23
- t = Math.imul(t ^ t >>> 15, t | 1);
24
- t ^= t + Math.imul(t ^ t >>> 7, t | 61);
25
- return ((t ^ t >>> 14) >>> 0) / 4294967296;
26
- };
27
- }
28
- function shuffled(items, seed) {
29
- const out = [...items];
30
- const random = seeded(seed);
31
- for (let i = out.length - 1; i > 0; i--) {
32
- const j = Math.floor(random() * (i + 1));
33
- [out[i], out[j]] = [out[j], out[i]];
34
- }
35
- return out;
36
- }
37
- function byTask(results) {
38
- const map = /* @__PURE__ */ new Map();
39
- for (const r of results) {
40
- let t = map.get(r.id);
41
- if (t === void 0) {
42
- t = { id: r.id, runs: 0, passes: 0, errors: 0, results: [] };
43
- map.set(r.id, t);
44
- }
45
- t.runs++;
46
- if (r.passed) t.passes++;
47
- if (r.stopReason === "error") t.errors++;
48
- t.results.push(r);
49
- }
50
- return [...map.values()];
51
- }
52
- function passInterval(results, options = {}) {
53
- const tasks = byTask(results);
54
- const runs = tasks.reduce((s, t) => s + t.runs, 0);
55
- if (tasks.length === 0 || runs === 0) return void 0;
56
- const seed = options.seed ?? DEFAULT_SEED;
57
- const draws = options.draws ?? BOOTSTRAP_DRAWS;
58
- const level = options.level ?? 0.95;
59
- const random = seeded(seed);
60
- const rates = new Float64Array(draws);
61
- for (let d = 0; d < draws; d++) {
62
- let passes = 0;
63
- let n = 0;
64
- for (let i = 0; i < tasks.length; i++) {
65
- const t = tasks[Math.floor(random() * tasks.length)];
66
- passes += t.passes;
67
- n += t.runs;
68
- }
69
- rates[d] = passes / n;
70
- }
71
- rates.sort();
72
- const tail = (1 - level) / 2;
73
- return {
74
- rate: tasks.reduce((s, t) => s + t.passes, 0) / runs,
75
- low: quantile(rates, tail),
76
- high: quantile(rates, 1 - tail),
77
- level,
78
- draws,
79
- seed,
80
- tasks: tasks.length
81
- };
82
- }
83
- function consistency(results) {
84
- const repeated = byTask(results).filter((t) => t.runs >= 2);
85
- return {
86
- repeated: repeated.length,
87
- allPassed: repeated.filter((t) => t.passes === t.runs).map((t) => t.id),
88
- nonePassed: repeated.filter((t) => t.passes === 0 && t.errors < t.runs).map((t) => t.id),
89
- onlyErrors: repeated.filter((t) => t.errors === t.runs).map((t) => t.id)
90
- };
91
- }
92
- function spread(results) {
93
- const scored = results.filter((r) => r.stopReason !== "error");
94
- if (scored.length === 0) return void 0;
95
- const of = (f) => {
96
- const sorted = Float64Array.from(scored.map(f)).sort();
97
- return { median: quantile(sorted, 0.5), p95: quantile(sorted, 0.95) };
98
- };
99
- return {
100
- runs: scored.length,
101
- steps: of((r) => r.steps),
102
- tokens: of((r) => r.tokens),
103
- durationMs: of((r) => r.durationMs)
104
- };
105
- }
106
- function stepsSd(runs) {
107
- const steps = runs.filter((r) => r.stopReason !== "error").map((r) => r.steps);
108
- if (steps.length < 2) return void 0;
109
- const mean = steps.reduce((s, x) => s + x, 0) / steps.length;
110
- return Math.sqrt(steps.reduce((s, x) => s + (x - mean) ** 2, 0) / (steps.length - 1));
111
- }
112
- function costPerPass(results) {
113
- if (results.some((r) => r.costUsd === void 0)) return { kind: "unknown" };
114
- const totalUsd = results.reduce((s, r) => s + (r.costUsd ?? 0), 0);
115
- const passes = results.filter((r) => r.passed).length;
116
- if (passes === 0) return { kind: "none", totalUsd };
117
- return {
118
- kind: "value",
119
- usd: totalUsd / passes,
120
- minimum: results.some((r) => r.costIncomplete === true),
121
- totalUsd,
122
- passes
123
- };
124
- }
125
- function unexpectedChanges(results) {
126
- const measured = results.filter((r) => r.unexpected !== void 0);
127
- return {
128
- runs: measured.filter((r) => (r.unexpected?.length ?? 0) > 0).length,
129
- files: measured.reduce((s, r) => s + (r.unexpected?.length ?? 0), 0),
130
- measured: measured.length
131
- };
132
- }
133
- function quantile(sorted, q) {
134
- if (sorted.length === 0) return Number.NaN;
135
- const pos = (sorted.length - 1) * q;
136
- const lo = Math.floor(pos);
137
- const hi = Math.ceil(pos);
138
- const a = sorted[lo];
139
- const b = sorted[hi];
140
- return a + (b - a) * (pos - lo);
141
- }
142
- function mcpUse(results) {
143
- const measured = results.filter((r) => r.mcpCalls !== void 0);
144
- if (measured.length === 0) return void 0;
145
- return {
146
- calls: measured.reduce((sum, r) => sum + (r.mcpCalls ?? 0), 0),
147
- runs: measured.filter((r) => (r.mcpCalls ?? 0) > 0).length,
148
- measured: measured.length
149
- };
150
- }
151
- function mcpUseText(use) {
152
- return `${use.calls} in ${use.runs} of ${use.measured} runs${use.runs === 0 ? " (the agent never used the server)" : ""}`;
153
- }
154
-
155
- // src/evals/compare.ts
156
- import { readFile, stat } from "fs/promises";
157
- import { join } from "path";
158
- async function loadReport(path) {
159
- const file = (await stat(path)).isDirectory() ? join(path, "report.json") : path;
160
- const data = JSON.parse(await readFile(file, "utf8"));
161
- return parseReport(data, file);
162
- }
163
- function parseReport(data, path) {
164
- if (!Array.isArray(data.results)) throw new Error(`${path} is not an eval report (no results).`);
165
- const schema = typeof data.schema === "number" ? data.schema : 1;
166
- const tasks = schema >= 2 && data.tasks !== null && typeof data.tasks === "object" ? data.tasks : void 0;
167
- return {
168
- path,
169
- schema,
170
- model: typeof data.spec === "string" ? data.spec : typeof data.model === "string" ? data.model : void 0,
171
- seed: typeof data.seed === "number" ? data.seed : void 0,
172
- tasks,
173
- results: data.results,
174
- mcp: mcpServerOf(data.mcp)
175
- };
176
- }
177
- function mcpServerOf(value) {
178
- if (value === null || typeof value !== "object") return void 0;
179
- const server = value.server;
180
- return typeof server === "string" ? server : void 0;
181
- }
182
- function compareReports(a, b, options = {}) {
183
- const problems = [];
184
- const notes = [];
185
- const idsA = [...new Set(a.results.map((r) => r.id))].sort();
186
- const idsB = [...new Set(b.results.map((r) => r.id))].sort();
187
- if (idsA.join("\n") !== idsB.join("\n")) {
188
- const onlyA = idsA.filter((id) => !idsB.includes(id));
189
- const onlyB = idsB.filter((id) => !idsA.includes(id));
190
- problems.push(
191
- `The reports ran different tasks${onlyA.length > 0 ? `; only in A: ${onlyA.join(", ")}` : ""}${onlyB.length > 0 ? `; only in B: ${onlyB.join(", ")}` : ""}.`
192
- );
193
- }
194
- if (a.tasks !== void 0 && b.tasks !== void 0) {
195
- const changed = idsA.filter((id) => idsB.includes(id) && a.tasks?.[id] !== b.tasks?.[id]);
196
- if (changed.length > 0) {
197
- problems.push(
198
- `These tasks changed between the runs (their hashes differ): ${changed.join(", ")}. Run both arms on the same tasks.`
199
- );
200
- }
201
- } else {
202
- const old = [a, b].filter((r) => r.tasks === void 0).map((r) => r.path);
203
- notes.push(
204
- `${old.join(" and ")} ${old.length === 1 ? "has" : "have"} no task hashes (a report before 0.17): Garuda cannot check that the tasks were the same.`
205
- );
206
- }
207
- if (problems.length > 0) return { problems };
208
- if (idsA.length === 0) return { problems: ["The reports have no runs."] };
209
- const tasksA = new Map(byTask(a.results).map((t) => [t.id, t]));
210
- const tasksB = new Map(byTask(b.results).map((t) => [t.id, t]));
211
- const rows = idsA.map((id) => {
212
- const ta = tasksA.get(id);
213
- const tb = tasksB.get(id);
214
- const arm = (t) => {
215
- const results = t?.results ?? [];
216
- return {
217
- passes: t?.passes ?? 0,
218
- runs: t?.runs ?? 0,
219
- costUsd: results.some((r) => r.costUsd === void 0) ? void 0 : results.reduce((s, r) => s + (r.costUsd ?? 0), 0),
220
- minimum: results.some((r) => r.costIncomplete === true)
221
- };
222
- };
223
- return { id, a: arm(ta), b: arm(tb) };
224
- });
225
- const rate = (side, list) => list.reduce((s, r) => s + r[side].passes, 0) / list.reduce((s, r) => s + r[side].runs, 0);
226
- const rateA = rate("a", rows);
227
- const rateB = rate("b", rows);
228
- const seed = options.seed ?? DEFAULT_SEED;
229
- const draws = options.draws ?? BOOTSTRAP_DRAWS;
230
- const level = options.level ?? 0.95;
231
- const random = seeded(seed);
232
- const diffs = new Float64Array(draws);
233
- for (let d = 0; d < draws; d++) {
234
- let pa = 0;
235
- let na = 0;
236
- let pb = 0;
237
- let nb = 0;
238
- for (let i = 0; i < rows.length; i++) {
239
- const r = rows[Math.floor(random() * rows.length)];
240
- pa += r.a.passes;
241
- na += r.a.runs;
242
- pb += r.b.passes;
243
- nb += r.b.runs;
244
- }
245
- diffs[d] = pb / nb - pa / na;
246
- }
247
- diffs.sort();
248
- const tail = (1 - level) / 2;
249
- const low = quantile(diffs, tail);
250
- const high = quantile(diffs, 1 - tail);
251
- const verdict = low > 0 ? "B passes more" : high < 0 ? "B passes less" : "no clear difference";
252
- if (low === high) {
253
- notes.push(
254
- "Every draw gave the same pass-rate difference, so the interval shows no uncertainty: more tasks, or tasks that sometimes fail, are needed to measure it."
255
- );
256
- }
257
- if (rows.length < 10) notes.push(roughNote(rows.length));
258
- if (a.seed !== void 0 && b.seed !== void 0 && a.seed !== b.seed) {
259
- notes.push(
260
- `The arms ran with different seeds (${a.seed} and ${b.seed}): their run orders differ.`
261
- );
262
- }
263
- if (a.mcp !== b.mcp) {
264
- notes.push(
265
- `The arms differ in the MCP server: A ${a.mcp ?? "none"}, B ${b.mcp ?? "none"}. For an MCP A/B, keep every other option the same.`
266
- );
267
- }
268
- const cost = costRatio(rows, seed, draws, level);
269
- if (typeof cost === "string") notes.push(cost);
270
- else if (cost.skipped > draws * 0.05) {
271
- notes.push(
272
- `The cost interval skipped ${cost.skipped} of ${draws} draws (an arm had no pass in them).`
273
- );
274
- }
275
- if (rows.some((r) => r.a.minimum || r.b.minimum)) {
276
- notes.push("A run's cost is a minimum (no reported usage): the cost ratio is approximate.");
277
- }
278
- const runsA = rows.map((r) => r.a.runs);
279
- const runsB = rows.map((r) => r.b.runs);
280
- if (Math.min(...runsA, ...runsB) < 3) {
281
- notes.push(
282
- "Some tasks have fewer than 3 runs in an arm: repeat each task 3 times or more (--repeat 3)."
283
- );
284
- }
285
- return {
286
- comparison: {
287
- rows,
288
- rateA,
289
- rateB,
290
- difference: { value: rateB - rateA, low, high, level, draws, seed },
291
- verdict,
292
- ...typeof cost === "string" ? {} : { costRatio: cost },
293
- notes
294
- }
295
- };
296
- }
297
- function costRatio(rows, seed, draws, level) {
298
- if (rows.some((r) => r.a.costUsd === void 0 || r.b.costUsd === void 0)) {
299
- return "A run's cost is unknown: no cost comparison.";
300
- }
301
- const per = (list, side) => {
302
- const passes = list.reduce((s, r) => s + r[side].passes, 0);
303
- const cost = list.reduce((s, r) => s + (r[side].costUsd ?? 0), 0);
304
- return passes === 0 ? void 0 : cost / passes;
305
- };
306
- const a = per(rows, "a");
307
- const b = per(rows, "b");
308
- if (a === void 0 || b === void 0 || a === 0) {
309
- return "An arm has no pass (or no cost): no cost ratio.";
310
- }
311
- const random = seeded(seed);
312
- const ratios = [];
313
- const drawn = new Array(rows.length);
314
- for (let d = 0; d < draws; d++) {
315
- for (let i = 0; i < rows.length; i++) {
316
- drawn[i] = rows[Math.floor(random() * rows.length)];
317
- }
318
- const ca = per(drawn, "a");
319
- const cb = per(drawn, "b");
320
- if (ca !== void 0 && cb !== void 0 && ca > 0) ratios.push(cb / ca);
321
- }
322
- const sorted = Float64Array.from(ratios).sort();
323
- const tail = (1 - level) / 2;
324
- const low = quantile(sorted, tail);
325
- const high = quantile(sorted, 1 - tail);
326
- return {
327
- value: b / a,
328
- low,
329
- high,
330
- draws,
331
- skipped: draws - ratios.length,
332
- verdict: low > 1 ? "B costs more per accepted change" : high < 1 ? "B costs less per accepted change" : "no clear difference"
333
- };
334
- }
335
- function roughNote(tasks) {
336
- return `Only ${tasks} task${tasks === 1 ? "" : "s"}: with fewer than 10 tasks the interval is a rough guide.`;
337
- }
338
- var pct = (x) => `${Math.round(x * 100)}%`;
339
- var signed = (x) => {
340
- const points = Math.round(Math.abs(x) * 100);
341
- return points === 0 ? "0 pts" : `${x > 0 ? "+" : "\u2212"}${points} pts`;
342
- };
343
- function formatComparison(a, b, c) {
344
- const width = Math.max(4, ...c.rows.map((r) => r.id.length));
345
- const lines = [
346
- `A: ${a.path}${a.model === void 0 ? "" : ` (${a.model})`}`,
347
- `B: ${b.path}${b.model === void 0 ? "" : ` (${b.model})`}`,
348
- "",
349
- `${"Task".padEnd(width)} A B`,
350
- ...c.rows.map(
351
- (r) => `${r.id.padEnd(width)} ${`${r.a.passes}/${r.a.runs}`.padEnd(7)} ${r.b.passes}/${r.b.runs}`
352
- ),
353
- "",
354
- `Pass rate over all attempts: A ${pct(c.rateA)}, B ${pct(c.rateB)}; B \u2212 A ${signed(c.difference.value)} (95% paired interval ${signed(c.difference.low)} to ${signed(c.difference.high)}; ${c.difference.draws} draws, seed ${c.difference.seed})`,
355
- `Verdict: ${c.verdict}${c.verdict === "no clear difference" ? " (the interval contains 0)" : ""}.`
356
- ];
357
- for (const [name, report] of [
358
- ["A", a],
359
- ["B", b]
360
- ]) {
361
- const cost = costPerPass(report.results);
362
- const u = unexpectedChanges(report.results);
363
- const s = spread(report.results);
364
- const mcp = mcpUse(report.results);
365
- lines.push(
366
- `${name}: cost per accepted change ${cost.kind === "unknown" ? "unknown" : cost.kind === "none" ? "no passes" : `${cost.minimum ? "\u2265 " : ""}$${cost.usd.toFixed(4)}`} \xB7 unexpected changes ${u.measured === 0 ? "not measured" : `${u.runs} of ${u.measured} runs`} \xB7 median time ${s === void 0 ? "\u2013" : `${Math.round(s.durationMs.median / 1e3)} s`}${mcp === void 0 ? "" : ` \xB7 MCP tool calls ${mcpUseText(mcp)}`}`
367
- );
368
- }
369
- if (c.costRatio !== void 0) {
370
- const x = (v) => `\xD7${v.toFixed(2)}`;
371
- lines.push(
372
- `Cost per accepted change: B/A ${x(c.costRatio.value)} (95% paired interval ${x(c.costRatio.low)} to ${x(c.costRatio.high)}). Verdict: ${c.costRatio.verdict}${c.costRatio.verdict === "no clear difference" ? " (the interval contains \xD71.00)" : ""}.`
373
- );
374
- }
375
- for (const note of c.notes) lines.push(`Note: ${note}`);
376
- return lines.join("\n");
377
- }
378
-
379
- // src/evals/report.ts
380
- import { createHash } from "crypto";
381
- import { existsSync } from "fs";
382
- import { arch, platform, release } from "os";
383
- import { dirname, join as join2 } from "path";
384
- import { fileURLToPath } from "url";
385
- var REPORT_SCHEMA = 2;
386
- function taskHash(task) {
387
- const sorted = (record) => Object.fromEntries(Object.entries(record).sort(([a], [b]) => a < b ? -1 : a > b ? 1 : 0));
388
- const data = {
389
- prompt: task.prompt,
390
- files: sorted(task.files),
391
- check: task.check,
392
- protect: task.protect ?? null,
393
- solution: sorted(task.solution),
394
- allowChanges: task.allowChanges ?? null,
395
- repo: task.repo === void 0 ? null : { base: task.repo.base, sha: task.repo.sha ?? null, tests: task.repo.tests }
396
- };
397
- return createHash("sha256").update(JSON.stringify(data)).digest("hex");
398
- }
399
- async function garudaCommit() {
400
- let dir;
401
- try {
402
- dir = dirname(fileURLToPath(import.meta.url));
403
- } catch {
404
- return void 0;
405
- }
406
- for (let i = 0; i < 4; i++) {
407
- if (existsSync(join2(dir, ".git"))) {
408
- const r = await git(new HostExecutor(), dir, ["rev-parse", "HEAD"], { check: false });
409
- return r.exitCode === 0 ? r.stdout.trim() : void 0;
410
- }
411
- dir = dirname(dir);
412
- }
413
- return void 0;
414
- }
415
- function buildFields(build, checkout) {
416
- const commit = build ?? checkout;
417
- return {
418
- version: VERSION,
419
- ...commit === void 0 ? {} : { commit },
420
- ...build !== void 0 && checkout !== void 0 && checkout !== build ? { checkout } : {}
421
- };
422
- }
423
- function staleBuildNote(build, checkout) {
424
- if (build === void 0 || checkout === void 0 || build === checkout) return void 0;
425
- return `This build is from commit ${build.slice(0, 7)}, but the checkout is at ${checkout.slice(0, 7)}. The tasks and the code that run are the older ones: run pnpm build first.`;
426
- }
427
- async function reportV2(meta, tasks, results) {
428
- return {
429
- schema: REPORT_SCHEMA,
430
- garuda: buildFields(BUILD_COMMIT, await garudaCommit()),
431
- spec: meta.model,
432
- agent: meta.agent ?? { name: "garuda" },
433
- provider: meta.provider,
434
- // Evals set no effort: each model's default applies.
435
- effort: "model default",
436
- isolation: meta.isolation,
437
- os: { platform: platform(), release: release(), arch: arch(), node: process.versions.node },
438
- seed: meta.seed,
439
- shuffle: meta.shuffle,
440
- split: meta.split ?? "dev",
441
- addendum: meta.addendum === void 0 ? null : {
442
- file: meta.addendum.file,
443
- chars: meta.addendum.text.length,
444
- sha256: createHash("sha256").update(meta.addendum.text).digest("hex")
445
- },
446
- mcp: meta.mcp === void 0 ? null : {
447
- server: meta.mcp.server,
448
- ...meta.mcp.prepare === void 0 ? {} : { prepare: meta.mcp.prepare }
449
- },
450
- order: results.map((r) => ({ id: r.id, attempt: r.attempt ?? 1 })),
451
- tasks: Object.fromEntries(tasks.map((t) => [t.id, taskHash(t)])),
452
- evidence: {
453
- interval: passInterval(results, { seed: meta.seed }) ?? null,
454
- consistency: consistency(results),
455
- spread: spread(results) ?? null,
456
- stepsSd: Object.fromEntries(byTask(results).map((t) => [t.id, stepsSd(t.results) ?? null])),
457
- costPerAcceptedChange: costPerPass(results),
458
- unexpected: unexpectedChanges(results)
459
- }
460
- };
461
- }
462
-
463
- export {
464
- BUILD_COMMIT,
465
- DEFAULT_SEED,
466
- shuffled,
467
- passInterval,
468
- consistency,
469
- spread,
470
- stepsSd,
471
- costPerPass,
472
- unexpectedChanges,
473
- mcpUse,
474
- mcpUseText,
475
- loadReport,
476
- compareReports,
477
- roughNote,
478
- formatComparison,
479
- taskHash,
480
- garudaCommit,
481
- staleBuildNote,
482
- reportV2
483
- };
484
- //# sourceMappingURL=chunk-DOCDCQVM.js.map
@@ -1,31 +0,0 @@
1
- #!/usr/bin/env node
2
- import {
3
- ADDENDUM_MAX_CHARS,
4
- PROPOSER_SYSTEM,
5
- decide,
6
- parseProposal,
7
- proposerInput,
8
- readAddendum,
9
- rejectReason,
10
- tune
11
- } from "./chunk-FOPBOB7W.js";
12
- import "./chunk-DOCDCQVM.js";
13
- import "./chunk-C57GHLKP.js";
14
- import "./chunk-6XHON3Q6.js";
15
- import "./chunk-B4SJY7KT.js";
16
- import "./chunk-BHZ6G65V.js";
17
- import "./chunk-P6XWWIEK.js";
18
- import "./chunk-UIRJOQQS.js";
19
- import "./chunk-4LFJFDCF.js";
20
- import "./chunk-3NJNVZTK.js";
21
- export {
22
- ADDENDUM_MAX_CHARS,
23
- PROPOSER_SYSTEM,
24
- decide,
25
- parseProposal,
26
- proposerInput,
27
- readAddendum,
28
- rejectReason,
29
- tune
30
- };
31
- //# sourceMappingURL=tune-YVI2KWQF.js.map