agentv 4.42.1-next.1 → 4.42.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/dist/{artifact-writer-7ZQBLD6J.js → artifact-writer-UA6Z6BMG.js} +4 -4
- package/dist/{chunk-PN3QFUFF.js → chunk-FB6GTT4Z.js} +6 -2
- package/dist/chunk-FB6GTT4Z.js.map +1 -0
- package/dist/{chunk-RP5425KQ.js → chunk-NEV235RP.js} +8 -8
- package/dist/chunk-NEV235RP.js.map +1 -0
- package/dist/{chunk-CVQXNBO7.js → chunk-PNI5WEAV.js} +2 -2
- package/dist/{chunk-CVQXNBO7.js.map → chunk-PNI5WEAV.js.map} +1 -1
- package/dist/{chunk-IX5KWMMM.js → chunk-SJTHFOPH.js} +837 -150
- package/dist/chunk-SJTHFOPH.js.map +1 -0
- package/dist/{chunk-2H3D2AFZ.js → chunk-SY3JIGRD.js} +74 -45
- package/dist/chunk-SY3JIGRD.js.map +1 -0
- package/dist/cli.js +5 -5
- package/dist/dashboard/assets/index-BwBJwHp4.js +118 -0
- package/dist/dashboard/assets/index-C5v6_zhR.css +1 -0
- package/dist/dashboard/assets/{index-DFcMa-UW.js → index-uXJsSG83.js} +1 -1
- package/dist/dashboard/index.html +2 -2
- package/dist/{dist-XANKSXGP.js → dist-YGHRSREL.js} +33 -3
- package/dist/index.js +5 -5
- package/dist/{interactive-MGFKEFXD.js → interactive-CEXT3GVA.js} +5 -5
- package/dist/skills/agentv-bench/references/environment-adaptation.md +28 -10
- package/dist/skills/agentv-bench/references/eval-yaml-spec.md +1 -1
- package/dist/skills/agentv-eval-writer/SKILL.md +43 -3
- package/dist/skills/agentv-eval-writer/references/custom-evaluators.md +54 -3
- package/dist/skills/agentv-eval-writer/references/python-helpers.md +31 -1
- package/dist/{ts-eval-loader-DXSXFWYI-WV7NYVUG.js → ts-eval-loader-YR5XK44N-V3P76ZCR.js} +2 -2
- package/package.json +1 -1
- package/dist/chunk-2H3D2AFZ.js.map +0 -1
- package/dist/chunk-IX5KWMMM.js.map +0 -1
- package/dist/chunk-PN3QFUFF.js.map +0 -1
- package/dist/chunk-RP5425KQ.js.map +0 -1
- package/dist/dashboard/assets/index-BEZOKdZO.css +0 -1
- package/dist/dashboard/assets/index-CxvIJei9.js +0 -118
- /package/dist/{artifact-writer-7ZQBLD6J.js.map → artifact-writer-UA6Z6BMG.js.map} +0 -0
- /package/dist/{dist-XANKSXGP.js.map → dist-YGHRSREL.js.map} +0 -0
- /package/dist/{interactive-MGFKEFXD.js.map → interactive-CEXT3GVA.js.map} +0 -0
- /package/dist/{ts-eval-loader-DXSXFWYI-WV7NYVUG.js.map → ts-eval-loader-YR5XK44N-V3P76ZCR.js.map} +0 -0
|
@@ -56,12 +56,12 @@ import {
|
|
|
56
56
|
validateTargetsFile,
|
|
57
57
|
validateWorkspacePaths,
|
|
58
58
|
writeRunTags
|
|
59
|
-
} from "./chunk-
|
|
59
|
+
} from "./chunk-NEV235RP.js";
|
|
60
60
|
import {
|
|
61
61
|
materializeEvalBundle,
|
|
62
62
|
toSnakeCaseDeep as toSnakeCaseDeep2,
|
|
63
63
|
writeArtifactsFromResults as writeArtifactsFromResults2
|
|
64
|
-
} from "./chunk-
|
|
64
|
+
} from "./chunk-FB6GTT4Z.js";
|
|
65
65
|
import {
|
|
66
66
|
DEFAULT_CATEGORY,
|
|
67
67
|
deriveCategory,
|
|
@@ -76,7 +76,7 @@ import {
|
|
|
76
76
|
syncProjects,
|
|
77
77
|
transpileEvalYamlFile,
|
|
78
78
|
trimBaselineResult
|
|
79
|
-
} from "./chunk-
|
|
79
|
+
} from "./chunk-PNI5WEAV.js";
|
|
80
80
|
import {
|
|
81
81
|
DEFAULT_THRESHOLD,
|
|
82
82
|
EXECUTION_TRACE_SCHEMA_VERSION,
|
|
@@ -127,7 +127,7 @@ import {
|
|
|
127
127
|
traceEnvelopeToTranscriptMessages,
|
|
128
128
|
traceFromTranscriptJsonLines,
|
|
129
129
|
writeArtifactsFromResults
|
|
130
|
-
} from "./chunk-
|
|
130
|
+
} from "./chunk-SJTHFOPH.js";
|
|
131
131
|
import {
|
|
132
132
|
__commonJS,
|
|
133
133
|
__require,
|
|
@@ -4806,7 +4806,7 @@ var evalRunCommand = command({
|
|
|
4806
4806
|
},
|
|
4807
4807
|
handler: async (args) => {
|
|
4808
4808
|
if (args.evalPaths.length === 0 && process.stdin.isTTY) {
|
|
4809
|
-
const { launchInteractiveWizard } = await import("./interactive-
|
|
4809
|
+
const { launchInteractiveWizard } = await import("./interactive-CEXT3GVA.js");
|
|
4810
4810
|
await launchInteractiveWizard();
|
|
4811
4811
|
return;
|
|
4812
4812
|
}
|
|
@@ -10152,6 +10152,12 @@ function deriveOutputDir(cwd, sourceFile) {
|
|
|
10152
10152
|
}
|
|
10153
10153
|
return path21.join(cwd, ".agentv", "results", "export", parentDir);
|
|
10154
10154
|
}
|
|
10155
|
+
function deriveExportRunId(sourceFile) {
|
|
10156
|
+
if (path21.basename(sourceFile) === RESULT_INDEX_FILENAME) {
|
|
10157
|
+
return path21.basename(path21.dirname(sourceFile));
|
|
10158
|
+
}
|
|
10159
|
+
return path21.basename(sourceFile, path21.extname(sourceFile));
|
|
10160
|
+
}
|
|
10155
10161
|
async function loadExportSource(source, cwd) {
|
|
10156
10162
|
const { sourceFile } = await resolveSourceFile(source, cwd);
|
|
10157
10163
|
const { results } = await loadResults(source, cwd);
|
|
@@ -10177,15 +10183,23 @@ var resultsExportCommand = command({
|
|
|
10177
10183
|
long: "dir",
|
|
10178
10184
|
short: "d",
|
|
10179
10185
|
description: "Working directory (default: current directory)"
|
|
10186
|
+
}),
|
|
10187
|
+
duplicatePolicy: option({
|
|
10188
|
+
type: optional(oneOf(["skip", "update", "error"])),
|
|
10189
|
+
long: "duplicate-policy",
|
|
10190
|
+
description: "How to handle duplicate projection identities in the output: update (default), skip, or error"
|
|
10180
10191
|
})
|
|
10181
10192
|
},
|
|
10182
|
-
handler: async ({ source, out, dir }) => {
|
|
10193
|
+
handler: async ({ source, out, dir, duplicatePolicy }) => {
|
|
10183
10194
|
const cwd = dir ?? process.cwd();
|
|
10195
|
+
const policy = duplicatePolicy ?? "update";
|
|
10184
10196
|
try {
|
|
10185
10197
|
const { sourceFile, results } = await loadExportSource(source, cwd);
|
|
10186
10198
|
const outputDir = out ? path21.isAbsolute(out) ? out : path21.resolve(cwd, out) : deriveOutputDir(cwd, sourceFile);
|
|
10187
10199
|
await writeArtifactsFromResults2(results, outputDir, {
|
|
10188
|
-
evalFile: sourceFile
|
|
10200
|
+
evalFile: sourceFile,
|
|
10201
|
+
runId: deriveExportRunId(sourceFile),
|
|
10202
|
+
duplicatePolicy: policy
|
|
10189
10203
|
});
|
|
10190
10204
|
console.log(`Exported ${results.length} test(s) to ${outputDir}`);
|
|
10191
10205
|
for (const result of results) {
|
|
@@ -13804,8 +13818,49 @@ function handleConfig(c4, { agentvDir, searchDir }, options) {
|
|
|
13804
13818
|
});
|
|
13805
13819
|
}
|
|
13806
13820
|
function handleFeedbackRead(c4, { searchDir }) {
|
|
13821
|
+
return c4.json(readFeedback(feedbackStoreDir(searchDir)));
|
|
13822
|
+
}
|
|
13823
|
+
function feedbackStoreDir(searchDir) {
|
|
13807
13824
|
const resultsDir = path26.join(searchDir, ".agentv", "results");
|
|
13808
|
-
return
|
|
13825
|
+
return existsSync16(resultsDir) ? resultsDir : searchDir;
|
|
13826
|
+
}
|
|
13827
|
+
async function handleFeedbackWrite(c4, resultDir) {
|
|
13828
|
+
let body;
|
|
13829
|
+
try {
|
|
13830
|
+
body = await c4.req.json();
|
|
13831
|
+
} catch {
|
|
13832
|
+
return c4.json({ error: "Invalid JSON" }, 400);
|
|
13833
|
+
}
|
|
13834
|
+
if (!body || typeof body !== "object") {
|
|
13835
|
+
return c4.json({ error: "Invalid payload" }, 400);
|
|
13836
|
+
}
|
|
13837
|
+
const payload = body;
|
|
13838
|
+
if (!Array.isArray(payload.reviews)) {
|
|
13839
|
+
return c4.json({ error: "Missing reviews array" }, 400);
|
|
13840
|
+
}
|
|
13841
|
+
const incoming = payload.reviews;
|
|
13842
|
+
for (const review of incoming) {
|
|
13843
|
+
if (typeof review.test_id !== "string" || typeof review.comment !== "string") {
|
|
13844
|
+
return c4.json({ error: "Each review must have test_id and comment strings" }, 400);
|
|
13845
|
+
}
|
|
13846
|
+
}
|
|
13847
|
+
const existing = readFeedback(resultDir);
|
|
13848
|
+
const now = (/* @__PURE__ */ new Date()).toISOString();
|
|
13849
|
+
for (const review of incoming) {
|
|
13850
|
+
const newReview = {
|
|
13851
|
+
test_id: review.test_id,
|
|
13852
|
+
comment: review.comment,
|
|
13853
|
+
updated_at: now
|
|
13854
|
+
};
|
|
13855
|
+
const idx = existing.reviews.findIndex((r) => r.test_id === newReview.test_id);
|
|
13856
|
+
if (idx >= 0) {
|
|
13857
|
+
existing.reviews[idx] = newReview;
|
|
13858
|
+
} else {
|
|
13859
|
+
existing.reviews.push(newReview);
|
|
13860
|
+
}
|
|
13861
|
+
}
|
|
13862
|
+
writeFeedback(resultDir, existing);
|
|
13863
|
+
return c4.json(existing);
|
|
13809
13864
|
}
|
|
13810
13865
|
function expandHomePath(inputPath) {
|
|
13811
13866
|
if (inputPath === "~") return homedir();
|
|
@@ -14308,42 +14363,7 @@ function createApp(results, resultDir, cwd, sourceFile, options) {
|
|
|
14308
14363
|
if (readOnly) {
|
|
14309
14364
|
return c4.json({ error: "Dashboard is running in read-only mode" }, 403);
|
|
14310
14365
|
}
|
|
14311
|
-
|
|
14312
|
-
try {
|
|
14313
|
-
body = await c4.req.json();
|
|
14314
|
-
} catch {
|
|
14315
|
-
return c4.json({ error: "Invalid JSON" }, 400);
|
|
14316
|
-
}
|
|
14317
|
-
if (!body || typeof body !== "object") {
|
|
14318
|
-
return c4.json({ error: "Invalid payload" }, 400);
|
|
14319
|
-
}
|
|
14320
|
-
const payload = body;
|
|
14321
|
-
if (!Array.isArray(payload.reviews)) {
|
|
14322
|
-
return c4.json({ error: "Missing reviews array" }, 400);
|
|
14323
|
-
}
|
|
14324
|
-
const incoming = payload.reviews;
|
|
14325
|
-
for (const review of incoming) {
|
|
14326
|
-
if (typeof review.test_id !== "string" || typeof review.comment !== "string") {
|
|
14327
|
-
return c4.json({ error: "Each review must have test_id and comment strings" }, 400);
|
|
14328
|
-
}
|
|
14329
|
-
}
|
|
14330
|
-
const existing = readFeedback(resultDir);
|
|
14331
|
-
const now = (/* @__PURE__ */ new Date()).toISOString();
|
|
14332
|
-
for (const review of incoming) {
|
|
14333
|
-
const newReview = {
|
|
14334
|
-
test_id: review.test_id,
|
|
14335
|
-
comment: review.comment,
|
|
14336
|
-
updated_at: now
|
|
14337
|
-
};
|
|
14338
|
-
const idx = existing.reviews.findIndex((r) => r.test_id === newReview.test_id);
|
|
14339
|
-
if (idx >= 0) {
|
|
14340
|
-
existing.reviews[idx] = newReview;
|
|
14341
|
-
} else {
|
|
14342
|
-
existing.reviews.push(newReview);
|
|
14343
|
-
}
|
|
14344
|
-
}
|
|
14345
|
-
writeFeedback(resultDir, existing);
|
|
14346
|
-
return c4.json(existing);
|
|
14366
|
+
return handleFeedbackWrite(c4, resultDir);
|
|
14347
14367
|
});
|
|
14348
14368
|
app2.get("/api/index", async (c4) => {
|
|
14349
14369
|
const { runs: metas } = await listMergedResultFiles(searchDir, void 0, defaultCtx.projectId);
|
|
@@ -14459,6 +14479,15 @@ function createApp(results, resultDir, cwd, sourceFile, options) {
|
|
|
14459
14479
|
app2.get("/api/projects/:projectId/compare", (c4) => withProject(c4, handleCompare));
|
|
14460
14480
|
app2.get("/api/projects/:projectId/targets", (c4) => withProject(c4, handleTargets));
|
|
14461
14481
|
app2.get("/api/projects/:projectId/feedback", (c4) => withProject(c4, handleFeedbackRead));
|
|
14482
|
+
app2.post("/api/projects/:projectId/feedback", (c4) => {
|
|
14483
|
+
if (readOnly) {
|
|
14484
|
+
return c4.json({ error: "Dashboard is running in read-only mode" }, 403);
|
|
14485
|
+
}
|
|
14486
|
+
return withProject(
|
|
14487
|
+
c4,
|
|
14488
|
+
(projectContext, ctx) => handleFeedbackWrite(projectContext, feedbackStoreDir(ctx.searchDir))
|
|
14489
|
+
);
|
|
14490
|
+
});
|
|
14462
14491
|
registerEvalRoutes(
|
|
14463
14492
|
app2,
|
|
14464
14493
|
(c4) => {
|
|
@@ -16697,4 +16726,4 @@ export {
|
|
|
16697
16726
|
preprocessArgv,
|
|
16698
16727
|
runCli
|
|
16699
16728
|
};
|
|
16700
|
-
//# sourceMappingURL=chunk-
|
|
16729
|
+
//# sourceMappingURL=chunk-SY3JIGRD.js.map
|