@garuda-agent/garuda 0.18.1 → 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.
- package/CHANGELOG.md +50 -0
- package/README.md +1 -1
- package/dist/{acpCommand-JAYNMIMP.js → acpCommand-PUJHFWYU.js} +11 -12
- package/dist/advise-C777SZ5M.js +433 -0
- package/dist/buildInfo-Z4P7QAQL.js +8 -0
- package/dist/{chunk-QLBCM2YQ.js → chunk-2FIV2VZP.js} +2 -2
- package/dist/{chunk-TLA2PDGM.js → chunk-4BELTWP4.js} +5 -5
- package/dist/{chunk-JMH5W5DG.js → chunk-65NUEOI7.js} +44 -1
- package/dist/chunk-6JQTPW3P.js +88 -0
- package/dist/chunk-A5DLAXB4.js +1780 -0
- package/dist/{chunk-DQSCCE77.js → chunk-AX3A5KPH.js} +5 -5
- package/dist/chunk-CFDRP6XW.js +9 -0
- package/dist/chunk-E6YRCDSF.js +9 -0
- package/dist/{chunk-34WBDQBL.js → chunk-HP6EGFHV.js} +18 -18
- package/dist/{chunk-GKU62MHQ.js → chunk-LWNMEGDF.js} +2 -2
- package/dist/{chunk-5UDYQ5MK.js → chunk-STVFWSIL.js} +5 -7
- package/dist/{chunk-IKPGHM54.js → chunk-YEH2OONM.js} +3 -3
- package/dist/cli/index.js +39 -40
- package/dist/{evalCommand-BLJJ4G76.js → evalCommand-MRO6ENCA.js} +70 -42
- package/dist/{evalTune-W53KAD4V.js → evalTune-VL5RHYOG.js} +17 -18
- package/dist/{export-E677HIQS.js → export-ZPF3AMO6.js} +5 -5
- package/dist/{exportHtml-BMV73YRO.js → exportHtml-ISISG5HG.js} +4 -4
- package/dist/{inkChat-EVLYDC3K.js → inkChat-UDFX6GH6.js} +11 -12
- package/dist/{manager-L25IUXHW.js → manager-YH7722C2.js} +2 -2
- package/dist/runner-EBF6EOYM.js +97 -0
- package/dist/{setupCommand-OSOMFHDQ.js → setupCommand-YMF6I3MD.js} +8 -9
- package/dist/{tune-VX2WQTHS.js → tune-KSNKBPNJ.js} +8 -9
- package/package.json +1 -1
- package/dist/advise-HDKJGNBL.js +0 -195
- package/dist/buildInfo-K73FFI5S.js +0 -8
- package/dist/chunk-CWVXOSAA.js +0 -894
- package/dist/chunk-DUYLVGPY.js +0 -821
- package/dist/chunk-H7LIBGZT.js +0 -9
- package/dist/chunk-IYGJWX65.js +0 -9
- package/dist/chunk-NH72AELP.js +0 -48
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import {
|
|
3
|
+
garudaCommit
|
|
4
|
+
} from "./chunk-YAQ6QLKB.js";
|
|
5
|
+
import {
|
|
6
|
+
BUILD_COMMIT
|
|
7
|
+
} from "./chunk-E6YRCDSF.js";
|
|
8
|
+
import {
|
|
9
|
+
byTask,
|
|
10
|
+
consistency,
|
|
11
|
+
costPerPass,
|
|
12
|
+
failureSummary,
|
|
13
|
+
passInterval,
|
|
14
|
+
spread,
|
|
15
|
+
stepsSd,
|
|
16
|
+
unexpectedChanges
|
|
17
|
+
} from "./chunk-A5DLAXB4.js";
|
|
18
|
+
import {
|
|
19
|
+
VERSION
|
|
20
|
+
} from "./chunk-CFDRP6XW.js";
|
|
21
|
+
|
|
22
|
+
// src/evals/report.ts
|
|
23
|
+
import { createHash } from "crypto";
|
|
24
|
+
import { arch, platform, release } from "os";
|
|
25
|
+
var REPORT_SCHEMA = 2;
|
|
26
|
+
function taskHash(task) {
|
|
27
|
+
const sorted = (record) => Object.fromEntries(Object.entries(record).sort(([a], [b]) => a < b ? -1 : a > b ? 1 : 0));
|
|
28
|
+
const data = {
|
|
29
|
+
prompt: task.prompt,
|
|
30
|
+
files: sorted(task.files),
|
|
31
|
+
check: task.check,
|
|
32
|
+
protect: task.protect ?? null,
|
|
33
|
+
solution: sorted(task.solution),
|
|
34
|
+
allowChanges: task.allowChanges ?? null,
|
|
35
|
+
repo: task.repo === void 0 ? null : { base: task.repo.base, sha: task.repo.sha ?? null, tests: task.repo.tests }
|
|
36
|
+
};
|
|
37
|
+
return createHash("sha256").update(JSON.stringify(data)).digest("hex");
|
|
38
|
+
}
|
|
39
|
+
function buildFields(build, checkout) {
|
|
40
|
+
const commit = build ?? checkout;
|
|
41
|
+
return {
|
|
42
|
+
version: VERSION,
|
|
43
|
+
...commit === void 0 ? {} : { commit },
|
|
44
|
+
...build !== void 0 && checkout !== void 0 && checkout !== build ? { checkout } : {}
|
|
45
|
+
};
|
|
46
|
+
}
|
|
47
|
+
async function reportV2(meta, tasks, results) {
|
|
48
|
+
return {
|
|
49
|
+
schema: REPORT_SCHEMA,
|
|
50
|
+
garuda: buildFields(BUILD_COMMIT, await garudaCommit()),
|
|
51
|
+
spec: meta.model,
|
|
52
|
+
agent: meta.agent ?? { name: "garuda" },
|
|
53
|
+
provider: meta.provider,
|
|
54
|
+
// Evals set no effort: each model's default applies.
|
|
55
|
+
effort: "model default",
|
|
56
|
+
isolation: meta.isolation,
|
|
57
|
+
os: { platform: platform(), release: release(), arch: arch(), node: process.versions.node },
|
|
58
|
+
seed: meta.seed,
|
|
59
|
+
shuffle: meta.shuffle,
|
|
60
|
+
split: meta.split ?? "dev",
|
|
61
|
+
addendum: meta.addendum === void 0 ? null : {
|
|
62
|
+
file: meta.addendum.file,
|
|
63
|
+
chars: meta.addendum.text.length,
|
|
64
|
+
sha256: createHash("sha256").update(meta.addendum.text).digest("hex")
|
|
65
|
+
},
|
|
66
|
+
mcp: meta.mcp === void 0 ? null : {
|
|
67
|
+
server: meta.mcp.server,
|
|
68
|
+
...meta.mcp.prepare === void 0 ? {} : { prepare: meta.mcp.prepare }
|
|
69
|
+
},
|
|
70
|
+
order: results.map((r) => ({ id: r.id, attempt: r.attempt ?? 1 })),
|
|
71
|
+
tasks: Object.fromEntries(tasks.map((t) => [t.id, taskHash(t)])),
|
|
72
|
+
evidence: {
|
|
73
|
+
interval: passInterval(results, { seed: meta.seed }) ?? null,
|
|
74
|
+
consistency: consistency(results),
|
|
75
|
+
spread: spread(results) ?? null,
|
|
76
|
+
stepsSd: Object.fromEntries(byTask(results).map((t) => [t.id, stepsSd(t.results) ?? null])),
|
|
77
|
+
costPerAcceptedChange: costPerPass(results),
|
|
78
|
+
unexpected: unexpectedChanges(results),
|
|
79
|
+
failures: failureSummary(results)
|
|
80
|
+
}
|
|
81
|
+
};
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
export {
|
|
85
|
+
taskHash,
|
|
86
|
+
reportV2
|
|
87
|
+
};
|
|
88
|
+
//# sourceMappingURL=chunk-6JQTPW3P.js.map
|