agentv 4.31.3 → 4.31.4-next.1
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-FZ5RUHWC.js → artifact-writer-OYJ7VYQD.js} +4 -4
- package/dist/{chunk-IJPWTVDU.js → chunk-3Y24WATS.js} +3 -3
- package/dist/{chunk-LOYPSIE7.js → chunk-6Y3W7HJP.js} +19 -9
- package/dist/chunk-6Y3W7HJP.js.map +1 -0
- package/dist/{chunk-377GONL7.js → chunk-MIEYJ3YP.js} +5 -5
- package/dist/chunk-MIEYJ3YP.js.map +1 -0
- package/dist/{chunk-CO23UZAA.js → chunk-PDGEPSPO.js} +13 -9
- package/dist/chunk-PDGEPSPO.js.map +1 -0
- package/dist/{chunk-4POCDPC2.js → chunk-Y35UPYKH.js} +67 -44
- package/dist/chunk-Y35UPYKH.js.map +1 -0
- package/dist/cli.js +5 -5
- package/dist/cli.js.map +1 -1
- package/dist/{dist-CRYAFKLS.js → dist-KBYJJAXA.js} +3 -3
- package/dist/index.js +9 -7
- package/dist/{interactive-QBLQNYDH.js → interactive-RCBFUZUL.js} +5 -5
- package/dist/studio/assets/{index-sazn_aO8.js → index-B_Ga8SID.js} +1 -1
- package/dist/studio/assets/{index-DBSSri9Q.js → index-Bw-5reb7.js} +24 -24
- package/dist/studio/index.html +2 -2
- package/dist/{ts-eval-loader-XR6DNOZ3-GA7B5N26.js → ts-eval-loader-FRQF6KHR-PQPW5XQK.js} +2 -2
- package/package.json +1 -1
- package/dist/chunk-377GONL7.js.map +0 -1
- package/dist/chunk-4POCDPC2.js.map +0 -1
- package/dist/chunk-CO23UZAA.js.map +0 -1
- package/dist/chunk-LOYPSIE7.js.map +0 -1
- /package/dist/{artifact-writer-FZ5RUHWC.js.map → artifact-writer-OYJ7VYQD.js.map} +0 -0
- /package/dist/{chunk-IJPWTVDU.js.map → chunk-3Y24WATS.js.map} +0 -0
- /package/dist/{dist-CRYAFKLS.js.map → dist-KBYJJAXA.js.map} +0 -0
- /package/dist/{interactive-QBLQNYDH.js.map → interactive-RCBFUZUL.js.map} +0 -0
- /package/dist/{ts-eval-loader-XR6DNOZ3-GA7B5N26.js.map → ts-eval-loader-FRQF6KHR-PQPW5XQK.js.map} +0 -0
|
@@ -46,7 +46,7 @@ import {
|
|
|
46
46
|
validateFileReferences,
|
|
47
47
|
validateTargetsFile,
|
|
48
48
|
validateWorkspacePaths
|
|
49
|
-
} from "./chunk-
|
|
49
|
+
} from "./chunk-PDGEPSPO.js";
|
|
50
50
|
import {
|
|
51
51
|
RESULT_INDEX_FILENAME,
|
|
52
52
|
aggregateRunDir,
|
|
@@ -54,7 +54,7 @@ import {
|
|
|
54
54
|
resolveRunManifestPath,
|
|
55
55
|
toSnakeCaseDeep as toSnakeCaseDeep2,
|
|
56
56
|
writeArtifactsFromResults
|
|
57
|
-
} from "./chunk-
|
|
57
|
+
} from "./chunk-3Y24WATS.js";
|
|
58
58
|
import {
|
|
59
59
|
DEFAULT_CATEGORY,
|
|
60
60
|
addProject,
|
|
@@ -75,7 +75,7 @@ import {
|
|
|
75
75
|
touchProject,
|
|
76
76
|
transpileEvalYamlFile,
|
|
77
77
|
trimBaselineResult
|
|
78
|
-
} from "./chunk-
|
|
78
|
+
} from "./chunk-6Y3W7HJP.js";
|
|
79
79
|
import {
|
|
80
80
|
DEFAULT_THRESHOLD,
|
|
81
81
|
createBuiltinRegistry,
|
|
@@ -105,7 +105,7 @@ import {
|
|
|
105
105
|
runStartsWithAssertion,
|
|
106
106
|
toCamelCaseDeep,
|
|
107
107
|
toSnakeCaseDeep
|
|
108
|
-
} from "./chunk-
|
|
108
|
+
} from "./chunk-MIEYJ3YP.js";
|
|
109
109
|
import {
|
|
110
110
|
__commonJS,
|
|
111
111
|
__require,
|
|
@@ -4055,7 +4055,7 @@ var evalRunCommand = command({
|
|
|
4055
4055
|
},
|
|
4056
4056
|
handler: async (args) => {
|
|
4057
4057
|
if (args.evalPaths.length === 0 && process.stdin.isTTY) {
|
|
4058
|
-
const { launchInteractiveWizard } = await import("./interactive-
|
|
4058
|
+
const { launchInteractiveWizard } = await import("./interactive-RCBFUZUL.js");
|
|
4059
4059
|
await launchInteractiveWizard();
|
|
4060
4060
|
return;
|
|
4061
4061
|
}
|
|
@@ -8995,7 +8995,7 @@ var RESULTS_REPORT_TEMPLATE = `<!DOCTYPE html>
|
|
|
8995
8995
|
<div class="header-title-wrap">
|
|
8996
8996
|
<div class="eyebrow">AgentV static export</div>
|
|
8997
8997
|
<h1 class="header-title">Evaluation Report</h1>
|
|
8998
|
-
<p class="header-subtitle">
|
|
8998
|
+
<p class="header-subtitle">Dashboard-themed HTML generated from an existing AgentV results workspace.</p>
|
|
8999
8999
|
</div>
|
|
9000
9000
|
<div class="header-meta" id="header-meta"></div>
|
|
9001
9001
|
</header>
|
|
@@ -10344,7 +10344,7 @@ function generateRunId() {
|
|
|
10344
10344
|
const pad = (n, w = 2) => String(n).padStart(w, "0");
|
|
10345
10345
|
const ts = `${now.getFullYear()}${pad(now.getMonth() + 1)}${pad(now.getDate())}-${pad(now.getHours())}${pad(now.getMinutes())}${pad(now.getSeconds())}`;
|
|
10346
10346
|
const rand = Math.random().toString(36).slice(2, 6);
|
|
10347
|
-
return `
|
|
10347
|
+
return `dashboard-${ts}-${rand}`;
|
|
10348
10348
|
}
|
|
10349
10349
|
function pruneFinishedRuns() {
|
|
10350
10350
|
const finished = [...activeRuns.entries()].filter(([, r]) => r.status === "finished" || r.status === "failed").sort((a, b) => (b[1].finishedAt ?? "").localeCompare(a[1].finishedAt ?? ""));
|
|
@@ -10521,7 +10521,7 @@ function registerEvalRoutes(app2, getCwd, options) {
|
|
|
10521
10521
|
});
|
|
10522
10522
|
app2.post("/api/eval/run", async (c4) => {
|
|
10523
10523
|
if (readOnly) {
|
|
10524
|
-
return c4.json({ error: "
|
|
10524
|
+
return c4.json({ error: "Dashboard is running in read-only mode" }, 403);
|
|
10525
10525
|
}
|
|
10526
10526
|
const cwd = getCwd(c4);
|
|
10527
10527
|
let body;
|
|
@@ -10620,7 +10620,7 @@ Process error: ${err2.message}
|
|
|
10620
10620
|
});
|
|
10621
10621
|
app2.post("/api/eval/run/:id/stop", (c4) => {
|
|
10622
10622
|
if (readOnly) {
|
|
10623
|
-
return c4.json({ error: "
|
|
10623
|
+
return c4.json({ error: "Dashboard is running in read-only mode" }, 403);
|
|
10624
10624
|
}
|
|
10625
10625
|
const id = c4.req.param("id");
|
|
10626
10626
|
const run2 = activeRuns.get(id ?? "");
|
|
@@ -10699,7 +10699,7 @@ Process error: ${err2.message}
|
|
|
10699
10699
|
});
|
|
10700
10700
|
app2.post("/api/projects/:projectId/eval/run", async (c4) => {
|
|
10701
10701
|
if (readOnly) {
|
|
10702
|
-
return c4.json({ error: "
|
|
10702
|
+
return c4.json({ error: "Dashboard is running in read-only mode" }, 403);
|
|
10703
10703
|
}
|
|
10704
10704
|
const cwd = getCwd(c4);
|
|
10705
10705
|
let body;
|
|
@@ -10786,7 +10786,7 @@ Process error: ${err2.message}
|
|
|
10786
10786
|
});
|
|
10787
10787
|
app2.post("/api/projects/:projectId/eval/run/:id/stop", (c4) => {
|
|
10788
10788
|
if (readOnly) {
|
|
10789
|
-
return c4.json({ error: "
|
|
10789
|
+
return c4.json({ error: "Dashboard is running in read-only mode" }, 403);
|
|
10790
10790
|
}
|
|
10791
10791
|
const id = c4.req.param("id");
|
|
10792
10792
|
const run2 = activeRuns.get(id ?? "");
|
|
@@ -10935,22 +10935,24 @@ function loadStudioConfig(agentvDir) {
|
|
|
10935
10935
|
if (!parsed || typeof parsed !== "object") {
|
|
10936
10936
|
return { ...DEFAULTS };
|
|
10937
10937
|
}
|
|
10938
|
-
const
|
|
10939
|
-
|
|
10940
|
-
|
|
10941
|
-
|
|
10942
|
-
|
|
10943
|
-
|
|
10944
|
-
|
|
10945
|
-
threshold = studioObj.pass_threshold;
|
|
10946
|
-
}
|
|
10947
|
-
} else if (typeof parsed.pass_threshold === "number") {
|
|
10948
|
-
threshold = parsed.pass_threshold;
|
|
10949
|
-
}
|
|
10938
|
+
const config = parsed;
|
|
10939
|
+
const threshold = [
|
|
10940
|
+
readThreshold(config.dashboard),
|
|
10941
|
+
readThreshold(config.studio),
|
|
10942
|
+
typeof config.pass_threshold === "number" ? config.pass_threshold : void 0,
|
|
10943
|
+
DEFAULTS.threshold
|
|
10944
|
+
].find((value) => value !== void 0);
|
|
10950
10945
|
return {
|
|
10951
10946
|
threshold: Math.min(1, Math.max(0, threshold))
|
|
10952
10947
|
};
|
|
10953
10948
|
}
|
|
10949
|
+
function readThreshold(section) {
|
|
10950
|
+
if (!section || typeof section !== "object" || Array.isArray(section)) return void 0;
|
|
10951
|
+
const values = section;
|
|
10952
|
+
if (typeof values.threshold === "number") return values.threshold;
|
|
10953
|
+
if (typeof values.pass_threshold === "number") return values.pass_threshold;
|
|
10954
|
+
return void 0;
|
|
10955
|
+
}
|
|
10954
10956
|
function saveStudioConfig(agentvDir, config) {
|
|
10955
10957
|
if (!existsSync14(agentvDir)) {
|
|
10956
10958
|
mkdirSync4(agentvDir, { recursive: true });
|
|
@@ -10966,13 +10968,17 @@ function saveStudioConfig(agentvDir, config) {
|
|
|
10966
10968
|
}
|
|
10967
10969
|
const { pass_threshold: _, ...rest } = existing;
|
|
10968
10970
|
existing = rest;
|
|
10971
|
+
const existingDashboard = existing.dashboard;
|
|
10969
10972
|
const existingStudio = existing.studio;
|
|
10970
|
-
|
|
10971
|
-
|
|
10972
|
-
|
|
10973
|
-
|
|
10974
|
-
|
|
10975
|
-
|
|
10973
|
+
const dashboardRest = existingDashboard && typeof existingDashboard === "object" && !Array.isArray(existingDashboard) ? (({ pass_threshold: _2, ...rest2 }) => rest2)(existingDashboard) : {};
|
|
10974
|
+
const studioRest = existingStudio && typeof existingStudio === "object" && !Array.isArray(existingStudio) ? (({ threshold: _2, pass_threshold: __, ...rest2 }) => rest2)(
|
|
10975
|
+
existingStudio
|
|
10976
|
+
) : {};
|
|
10977
|
+
const { studio: _legacyStudio, ...withoutStudio } = existing;
|
|
10978
|
+
existing = {
|
|
10979
|
+
...withoutStudio,
|
|
10980
|
+
dashboard: { ...studioRest, ...dashboardRest, ...config }
|
|
10981
|
+
};
|
|
10976
10982
|
const yamlStr = stringifyYaml3(existing);
|
|
10977
10983
|
writeFileSync5(configPath, yamlStr, "utf-8");
|
|
10978
10984
|
}
|
|
@@ -11174,12 +11180,14 @@ async function handleRuns(c4, { searchDir, agentvDir }) {
|
|
|
11174
11180
|
let target;
|
|
11175
11181
|
let experiment = inferExperimentFromRunId(m.raw_filename);
|
|
11176
11182
|
let passRate = m.passRate;
|
|
11183
|
+
let avgScore = m.avgScore;
|
|
11177
11184
|
try {
|
|
11178
11185
|
const records = await loadLightweightResultsForMeta(searchDir, m);
|
|
11179
11186
|
if (records.length > 0) {
|
|
11180
11187
|
target = records[0].target;
|
|
11181
11188
|
experiment = records[0].experiment ?? experiment;
|
|
11182
11189
|
passRate = records.filter((r) => r.score >= passThreshold).length / records.length;
|
|
11190
|
+
avgScore = records.reduce((sum, r) => sum + r.score, 0) / records.length;
|
|
11183
11191
|
} else {
|
|
11184
11192
|
target = getActiveRunTarget(m.path);
|
|
11185
11193
|
}
|
|
@@ -11194,7 +11202,7 @@ async function handleRuns(c4, { searchDir, agentvDir }) {
|
|
|
11194
11202
|
timestamp: m.timestamp,
|
|
11195
11203
|
test_count: m.testCount,
|
|
11196
11204
|
pass_rate: passRate,
|
|
11197
|
-
avg_score:
|
|
11205
|
+
avg_score: avgScore,
|
|
11198
11206
|
size_bytes: m.sizeBytes,
|
|
11199
11207
|
source: m.source,
|
|
11200
11208
|
...target && { target },
|
|
@@ -11710,7 +11718,7 @@ function createApp(results, resultDir, cwd, sourceFile, options) {
|
|
|
11710
11718
|
}
|
|
11711
11719
|
app2.post("/api/config", async (c4) => {
|
|
11712
11720
|
if (readOnly) {
|
|
11713
|
-
return c4.json({ error: "
|
|
11721
|
+
return c4.json({ error: "Dashboard is running in read-only mode" }, 403);
|
|
11714
11722
|
}
|
|
11715
11723
|
try {
|
|
11716
11724
|
const body = await c4.req.json();
|
|
@@ -11763,7 +11771,7 @@ function createApp(results, resultDir, cwd, sourceFile, options) {
|
|
|
11763
11771
|
});
|
|
11764
11772
|
app2.post("/api/projects", async (c4) => {
|
|
11765
11773
|
if (readOnly) {
|
|
11766
|
-
return c4.json({ error: "
|
|
11774
|
+
return c4.json({ error: "Dashboard is running in read-only mode" }, 403);
|
|
11767
11775
|
}
|
|
11768
11776
|
try {
|
|
11769
11777
|
const body = await c4.req.json();
|
|
@@ -11835,7 +11843,7 @@ function createApp(results, resultDir, cwd, sourceFile, options) {
|
|
|
11835
11843
|
});
|
|
11836
11844
|
app2.delete("/api/projects/:projectId", (c4) => {
|
|
11837
11845
|
if (readOnly) {
|
|
11838
|
-
return c4.json({ error: "
|
|
11846
|
+
return c4.json({ error: "Dashboard is running in read-only mode" }, 403);
|
|
11839
11847
|
}
|
|
11840
11848
|
const removed = removeProject(c4.req.param("projectId") ?? "");
|
|
11841
11849
|
if (!removed) return c4.json({ error: "Project not found" }, 404);
|
|
@@ -11854,13 +11862,13 @@ function createApp(results, resultDir, cwd, sourceFile, options) {
|
|
|
11854
11862
|
app2.get("/api/runs", (c4) => handleRuns(c4, defaultCtx));
|
|
11855
11863
|
app2.put("/api/runs/:filename/tags", (c4) => {
|
|
11856
11864
|
if (readOnly) {
|
|
11857
|
-
return c4.json({ error: "
|
|
11865
|
+
return c4.json({ error: "Dashboard is running in read-only mode" }, 403);
|
|
11858
11866
|
}
|
|
11859
11867
|
return handleRunTagsPut(c4, defaultCtx);
|
|
11860
11868
|
});
|
|
11861
11869
|
app2.delete("/api/runs/:filename/tags", (c4) => {
|
|
11862
11870
|
if (readOnly) {
|
|
11863
|
-
return c4.json({ error: "
|
|
11871
|
+
return c4.json({ error: "Dashboard is running in read-only mode" }, 403);
|
|
11864
11872
|
}
|
|
11865
11873
|
return handleRunTagsDelete(c4, defaultCtx);
|
|
11866
11874
|
});
|
|
@@ -11884,7 +11892,7 @@ function createApp(results, resultDir, cwd, sourceFile, options) {
|
|
|
11884
11892
|
});
|
|
11885
11893
|
app2.post("/api/feedback", async (c4) => {
|
|
11886
11894
|
if (readOnly) {
|
|
11887
|
-
return c4.json({ error: "
|
|
11895
|
+
return c4.json({ error: "Dashboard is running in read-only mode" }, 403);
|
|
11888
11896
|
}
|
|
11889
11897
|
let body;
|
|
11890
11898
|
try {
|
|
@@ -11970,13 +11978,13 @@ function createApp(results, resultDir, cwd, sourceFile, options) {
|
|
|
11970
11978
|
app2.get("/api/projects/:projectId/runs", (c4) => withProject(c4, handleRuns));
|
|
11971
11979
|
app2.put("/api/projects/:projectId/runs/:filename/tags", (c4) => {
|
|
11972
11980
|
if (readOnly) {
|
|
11973
|
-
return c4.json({ error: "
|
|
11981
|
+
return c4.json({ error: "Dashboard is running in read-only mode" }, 403);
|
|
11974
11982
|
}
|
|
11975
11983
|
return withProject(c4, handleRunTagsPut);
|
|
11976
11984
|
});
|
|
11977
11985
|
app2.delete("/api/projects/:projectId/runs/:filename/tags", (c4) => {
|
|
11978
11986
|
if (readOnly) {
|
|
11979
|
-
return c4.json({ error: "
|
|
11987
|
+
return c4.json({ error: "Dashboard is running in read-only mode" }, 403);
|
|
11980
11988
|
}
|
|
11981
11989
|
return withProject(c4, handleRunTagsDelete);
|
|
11982
11990
|
});
|
|
@@ -12021,7 +12029,9 @@ function createApp(results, resultDir, cwd, sourceFile, options) {
|
|
|
12021
12029
|
);
|
|
12022
12030
|
const studioDistPath = options?.studioDir ?? resolveStudioDistDir();
|
|
12023
12031
|
if (!studioDistPath || !existsSync15(path21.join(studioDistPath, "index.html"))) {
|
|
12024
|
-
throw new Error(
|
|
12032
|
+
throw new Error(
|
|
12033
|
+
'Dashboard dist not found. Run "bun run build" in apps/studio/ to build the SPA.'
|
|
12034
|
+
);
|
|
12025
12035
|
}
|
|
12026
12036
|
app2.get("/", (c4) => {
|
|
12027
12037
|
const indexPath = path21.join(studioDistPath, "index.html");
|
|
@@ -12080,8 +12090,8 @@ function resolveStudioDistDir() {
|
|
|
12080
12090
|
return void 0;
|
|
12081
12091
|
}
|
|
12082
12092
|
var resultsServeCommand = command({
|
|
12083
|
-
name: "
|
|
12084
|
-
description: "Start AgentV
|
|
12093
|
+
name: "dashboard",
|
|
12094
|
+
description: "Start AgentV Dashboard \u2014 a local dashboard for reviewing evaluation results",
|
|
12085
12095
|
args: {
|
|
12086
12096
|
source: positional({
|
|
12087
12097
|
type: optional(string),
|
|
@@ -12116,7 +12126,7 @@ var resultsServeCommand = command({
|
|
|
12116
12126
|
}),
|
|
12117
12127
|
readOnly: flag({
|
|
12118
12128
|
long: "read-only",
|
|
12119
|
-
description: "Disable write operations and launch
|
|
12129
|
+
description: "Disable write operations and launch Dashboard in read-only leaderboard mode"
|
|
12120
12130
|
})
|
|
12121
12131
|
},
|
|
12122
12132
|
handler: async ({ source, port, dir, single, add, remove, readOnly }) => {
|
|
@@ -13572,6 +13582,7 @@ var app = subcommands({
|
|
|
13572
13582
|
description: "AgentV CLI",
|
|
13573
13583
|
version: package_default.version,
|
|
13574
13584
|
cmds: {
|
|
13585
|
+
dashboard: resultsServeCommand,
|
|
13575
13586
|
eval: evalCommand,
|
|
13576
13587
|
import: importCommand,
|
|
13577
13588
|
compare: compareCommand,
|
|
@@ -13584,7 +13595,6 @@ var app = subcommands({
|
|
|
13584
13595
|
self: selfCommand,
|
|
13585
13596
|
skills: skillsCommand,
|
|
13586
13597
|
serve: resultsServeCommand,
|
|
13587
|
-
studio: resultsServeCommand,
|
|
13588
13598
|
inspect: inspectCommand,
|
|
13589
13599
|
trend: trendCommand,
|
|
13590
13600
|
transpile: transpileCommand,
|
|
@@ -13600,6 +13610,7 @@ var TOP_LEVEL_COMMANDS = /* @__PURE__ */ new Set([
|
|
|
13600
13610
|
"compare",
|
|
13601
13611
|
"convert",
|
|
13602
13612
|
"create",
|
|
13613
|
+
"dashboard",
|
|
13603
13614
|
"doctor",
|
|
13604
13615
|
"init",
|
|
13605
13616
|
"pipeline",
|
|
@@ -13614,8 +13625,14 @@ var TOP_LEVEL_COMMANDS = /* @__PURE__ */ new Set([
|
|
|
13614
13625
|
"validate",
|
|
13615
13626
|
"workspace"
|
|
13616
13627
|
]);
|
|
13628
|
+
function usesDeprecatedStudioAlias(argv) {
|
|
13629
|
+
return argv[2] === "studio";
|
|
13630
|
+
}
|
|
13617
13631
|
function preprocessArgv(argv) {
|
|
13618
13632
|
const result = [...argv];
|
|
13633
|
+
if (result[2] === "studio") {
|
|
13634
|
+
result[2] = "dashboard";
|
|
13635
|
+
}
|
|
13619
13636
|
for (let i = 0; i < result.length; i++) {
|
|
13620
13637
|
if (result[i] === "--eval-id") {
|
|
13621
13638
|
result[i] = "--test-id";
|
|
@@ -13648,6 +13665,11 @@ ${updateNotice}
|
|
|
13648
13665
|
updateNotice = n;
|
|
13649
13666
|
});
|
|
13650
13667
|
const processedArgv = preprocessArgv(argv);
|
|
13668
|
+
if (usesDeprecatedStudioAlias(argv)) {
|
|
13669
|
+
process.stderr.write(
|
|
13670
|
+
"Warning: `agentv studio` is deprecated and will be removed in a future release. Use `agentv dashboard` instead.\n"
|
|
13671
|
+
);
|
|
13672
|
+
}
|
|
13651
13673
|
const cwd = process.cwd();
|
|
13652
13674
|
const repoRoot = await findRepoRoot(cwd);
|
|
13653
13675
|
const sessionConfig = await loadConfig(path29.join(cwd, "_"), repoRoot);
|
|
@@ -13660,7 +13682,8 @@ ${updateNotice}
|
|
|
13660
13682
|
|
|
13661
13683
|
export {
|
|
13662
13684
|
app,
|
|
13685
|
+
usesDeprecatedStudioAlias,
|
|
13663
13686
|
preprocessArgv,
|
|
13664
13687
|
runCli
|
|
13665
13688
|
};
|
|
13666
|
-
//# sourceMappingURL=chunk-
|
|
13689
|
+
//# sourceMappingURL=chunk-Y35UPYKH.js.map
|