agentv 4.11.2 → 4.12.0
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/{chunk-MIP46NEN.js → chunk-4MEGL2E3.js} +5 -5
- package/dist/{chunk-MIP46NEN.js.map → chunk-4MEGL2E3.js.map} +1 -1
- package/dist/{chunk-FQGY6QXQ.js → chunk-CXAO4VPP.js} +43 -43
- package/dist/chunk-CXAO4VPP.js.map +1 -0
- package/dist/{chunk-7TJ2PON3.js → chunk-VVWPD4CN.js} +104 -89
- package/dist/chunk-VVWPD4CN.js.map +1 -0
- package/dist/cli.js +3 -3
- package/dist/{dist-HNSXNRVK.js → dist-D6EJ3O7Q.js} +20 -20
- package/dist/index.js +3 -3
- package/dist/{interactive-LRW3X5OF.js → interactive-SP2LWOQX.js} +3 -3
- package/dist/studio/assets/index-BdR2qr8G.js +65 -0
- package/dist/studio/assets/{index-VyDFrnoK.js → index-CkXzhDmw.js} +1 -1
- package/dist/studio/assets/index-XVVBVabi.css +1 -0
- package/dist/studio/index.html +2 -2
- package/package.json +1 -1
- package/dist/chunk-7TJ2PON3.js.map +0 -1
- package/dist/chunk-FQGY6QXQ.js.map +0 -1
- package/dist/studio/assets/index-Bi-KHfNm.js +0 -65
- package/dist/studio/assets/index-D_j-w4UO.css +0 -1
- /package/dist/{dist-HNSXNRVK.js.map → dist-D6EJ3O7Q.js.map} +0 -0
- /package/dist/{interactive-LRW3X5OF.js.map → interactive-SP2LWOQX.js.map} +0 -0
|
@@ -33303,36 +33303,36 @@ async function createDraftResultsPr(params) {
|
|
|
33303
33303
|
);
|
|
33304
33304
|
return stdout.trim();
|
|
33305
33305
|
}
|
|
33306
|
-
function
|
|
33306
|
+
function getBenchmarksRegistryPath() {
|
|
33307
33307
|
return path50.join(getAgentvHome(), "projects.yaml");
|
|
33308
33308
|
}
|
|
33309
|
-
function
|
|
33310
|
-
const registryPath =
|
|
33309
|
+
function loadBenchmarkRegistry() {
|
|
33310
|
+
const registryPath = getBenchmarksRegistryPath();
|
|
33311
33311
|
if (!existsSync8(registryPath)) {
|
|
33312
|
-
return {
|
|
33312
|
+
return { benchmarks: [] };
|
|
33313
33313
|
}
|
|
33314
33314
|
try {
|
|
33315
33315
|
const raw = readFileSync4(registryPath, "utf-8");
|
|
33316
33316
|
const parsed = parseYaml3(raw);
|
|
33317
|
-
if (!parsed || !Array.isArray(parsed.
|
|
33318
|
-
return {
|
|
33317
|
+
if (!parsed || !Array.isArray(parsed.benchmarks)) {
|
|
33318
|
+
return { benchmarks: [] };
|
|
33319
33319
|
}
|
|
33320
|
-
return {
|
|
33320
|
+
return { benchmarks: parsed.benchmarks };
|
|
33321
33321
|
} catch {
|
|
33322
|
-
return {
|
|
33322
|
+
return { benchmarks: [] };
|
|
33323
33323
|
}
|
|
33324
33324
|
}
|
|
33325
|
-
function
|
|
33326
|
-
const registryPath =
|
|
33325
|
+
function saveBenchmarkRegistry(registry) {
|
|
33326
|
+
const registryPath = getBenchmarksRegistryPath();
|
|
33327
33327
|
const dir = path50.dirname(registryPath);
|
|
33328
33328
|
if (!existsSync8(dir)) {
|
|
33329
33329
|
mkdirSync3(dir, { recursive: true });
|
|
33330
33330
|
}
|
|
33331
|
-
writeFileSync2(registryPath, stringifyYaml(registry), "utf-8");
|
|
33331
|
+
writeFileSync2(registryPath, stringifyYaml({ benchmarks: registry.benchmarks }), "utf-8");
|
|
33332
33332
|
}
|
|
33333
|
-
function
|
|
33333
|
+
function deriveBenchmarkId(dirPath, existingIds) {
|
|
33334
33334
|
const base = path50.basename(dirPath).toLowerCase().replace(/[^a-z0-9-]/g, "-").replace(/-+/g, "-").replace(/^-|-$/g, "");
|
|
33335
|
-
let candidate = base || "
|
|
33335
|
+
let candidate = base || "benchmark";
|
|
33336
33336
|
let suffix = 2;
|
|
33337
33337
|
while (existingIds.includes(candidate)) {
|
|
33338
33338
|
candidate = `${base}-${suffix}`;
|
|
@@ -33340,54 +33340,54 @@ function deriveProjectId(dirPath, existingIds) {
|
|
|
33340
33340
|
}
|
|
33341
33341
|
return candidate;
|
|
33342
33342
|
}
|
|
33343
|
-
function
|
|
33344
|
-
const absPath = path50.resolve(
|
|
33343
|
+
function addBenchmark(benchmarkPath) {
|
|
33344
|
+
const absPath = path50.resolve(benchmarkPath);
|
|
33345
33345
|
if (!existsSync8(absPath)) {
|
|
33346
33346
|
throw new Error(`Directory not found: ${absPath}`);
|
|
33347
33347
|
}
|
|
33348
33348
|
if (!existsSync8(path50.join(absPath, ".agentv"))) {
|
|
33349
33349
|
throw new Error(`No .agentv/ directory found in ${absPath}. Run an evaluation first.`);
|
|
33350
33350
|
}
|
|
33351
|
-
const registry =
|
|
33352
|
-
const existing = registry.
|
|
33351
|
+
const registry = loadBenchmarkRegistry();
|
|
33352
|
+
const existing = registry.benchmarks.find((p) => p.path === absPath);
|
|
33353
33353
|
if (existing) {
|
|
33354
33354
|
return existing;
|
|
33355
33355
|
}
|
|
33356
33356
|
const now2 = (/* @__PURE__ */ new Date()).toISOString();
|
|
33357
33357
|
const entry = {
|
|
33358
|
-
id:
|
|
33358
|
+
id: deriveBenchmarkId(
|
|
33359
33359
|
absPath,
|
|
33360
|
-
registry.
|
|
33360
|
+
registry.benchmarks.map((p) => p.id)
|
|
33361
33361
|
),
|
|
33362
33362
|
name: path50.basename(absPath),
|
|
33363
33363
|
path: absPath,
|
|
33364
33364
|
addedAt: now2,
|
|
33365
33365
|
lastOpenedAt: now2
|
|
33366
33366
|
};
|
|
33367
|
-
registry.
|
|
33368
|
-
|
|
33367
|
+
registry.benchmarks.push(entry);
|
|
33368
|
+
saveBenchmarkRegistry(registry);
|
|
33369
33369
|
return entry;
|
|
33370
33370
|
}
|
|
33371
|
-
function
|
|
33372
|
-
const registry =
|
|
33373
|
-
const idx = registry.
|
|
33371
|
+
function removeBenchmark(benchmarkId) {
|
|
33372
|
+
const registry = loadBenchmarkRegistry();
|
|
33373
|
+
const idx = registry.benchmarks.findIndex((p) => p.id === benchmarkId);
|
|
33374
33374
|
if (idx < 0) return false;
|
|
33375
|
-
registry.
|
|
33376
|
-
|
|
33375
|
+
registry.benchmarks.splice(idx, 1);
|
|
33376
|
+
saveBenchmarkRegistry(registry);
|
|
33377
33377
|
return true;
|
|
33378
33378
|
}
|
|
33379
|
-
function
|
|
33380
|
-
return
|
|
33379
|
+
function getBenchmark(benchmarkId) {
|
|
33380
|
+
return loadBenchmarkRegistry().benchmarks.find((p) => p.id === benchmarkId);
|
|
33381
33381
|
}
|
|
33382
|
-
function
|
|
33383
|
-
const registry =
|
|
33384
|
-
const entry = registry.
|
|
33382
|
+
function touchBenchmark(benchmarkId) {
|
|
33383
|
+
const registry = loadBenchmarkRegistry();
|
|
33384
|
+
const entry = registry.benchmarks.find((p) => p.id === benchmarkId);
|
|
33385
33385
|
if (entry) {
|
|
33386
33386
|
entry.lastOpenedAt = (/* @__PURE__ */ new Date()).toISOString();
|
|
33387
|
-
|
|
33387
|
+
saveBenchmarkRegistry(registry);
|
|
33388
33388
|
}
|
|
33389
33389
|
}
|
|
33390
|
-
function
|
|
33390
|
+
function discoverBenchmarks(rootDir, maxDepth = 2) {
|
|
33391
33391
|
const absRoot = path50.resolve(rootDir);
|
|
33392
33392
|
if (!existsSync8(absRoot) || !statSync2(absRoot).isDirectory()) {
|
|
33393
33393
|
return [];
|
|
@@ -34663,15 +34663,15 @@ export {
|
|
|
34663
34663
|
commitAndPushResultsBranch,
|
|
34664
34664
|
pushResultsRepoBranch,
|
|
34665
34665
|
createDraftResultsPr,
|
|
34666
|
-
|
|
34667
|
-
|
|
34668
|
-
|
|
34669
|
-
|
|
34670
|
-
|
|
34671
|
-
|
|
34672
|
-
|
|
34673
|
-
|
|
34674
|
-
|
|
34666
|
+
getBenchmarksRegistryPath,
|
|
34667
|
+
loadBenchmarkRegistry,
|
|
34668
|
+
saveBenchmarkRegistry,
|
|
34669
|
+
deriveBenchmarkId,
|
|
34670
|
+
addBenchmark,
|
|
34671
|
+
removeBenchmark,
|
|
34672
|
+
getBenchmark,
|
|
34673
|
+
touchBenchmark,
|
|
34674
|
+
discoverBenchmarks,
|
|
34675
34675
|
trimBaselineResult,
|
|
34676
34676
|
DEFAULT_CATEGORY,
|
|
34677
34677
|
deriveCategory,
|
|
@@ -34688,4 +34688,4 @@ export {
|
|
|
34688
34688
|
TranscriptProvider,
|
|
34689
34689
|
createAgentKernel
|
|
34690
34690
|
};
|
|
34691
|
-
//# sourceMappingURL=chunk-
|
|
34691
|
+
//# sourceMappingURL=chunk-CXAO4VPP.js.map
|