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.
@@ -33303,36 +33303,36 @@ async function createDraftResultsPr(params) {
33303
33303
  );
33304
33304
  return stdout.trim();
33305
33305
  }
33306
- function getProjectsRegistryPath() {
33306
+ function getBenchmarksRegistryPath() {
33307
33307
  return path50.join(getAgentvHome(), "projects.yaml");
33308
33308
  }
33309
- function loadProjectRegistry() {
33310
- const registryPath = getProjectsRegistryPath();
33309
+ function loadBenchmarkRegistry() {
33310
+ const registryPath = getBenchmarksRegistryPath();
33311
33311
  if (!existsSync8(registryPath)) {
33312
- return { projects: [] };
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.projects)) {
33318
- return { projects: [] };
33317
+ if (!parsed || !Array.isArray(parsed.benchmarks)) {
33318
+ return { benchmarks: [] };
33319
33319
  }
33320
- return { projects: parsed.projects };
33320
+ return { benchmarks: parsed.benchmarks };
33321
33321
  } catch {
33322
- return { projects: [] };
33322
+ return { benchmarks: [] };
33323
33323
  }
33324
33324
  }
33325
- function saveProjectRegistry(registry) {
33326
- const registryPath = getProjectsRegistryPath();
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 deriveProjectId(dirPath, existingIds) {
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 || "project";
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 addProject(projectPath) {
33344
- const absPath = path50.resolve(projectPath);
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 = loadProjectRegistry();
33352
- const existing = registry.projects.find((p) => p.path === absPath);
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: deriveProjectId(
33358
+ id: deriveBenchmarkId(
33359
33359
  absPath,
33360
- registry.projects.map((p) => p.id)
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.projects.push(entry);
33368
- saveProjectRegistry(registry);
33367
+ registry.benchmarks.push(entry);
33368
+ saveBenchmarkRegistry(registry);
33369
33369
  return entry;
33370
33370
  }
33371
- function removeProject(projectId) {
33372
- const registry = loadProjectRegistry();
33373
- const idx = registry.projects.findIndex((p) => p.id === projectId);
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.projects.splice(idx, 1);
33376
- saveProjectRegistry(registry);
33375
+ registry.benchmarks.splice(idx, 1);
33376
+ saveBenchmarkRegistry(registry);
33377
33377
  return true;
33378
33378
  }
33379
- function getProject(projectId) {
33380
- return loadProjectRegistry().projects.find((p) => p.id === projectId);
33379
+ function getBenchmark(benchmarkId) {
33380
+ return loadBenchmarkRegistry().benchmarks.find((p) => p.id === benchmarkId);
33381
33381
  }
33382
- function touchProject(projectId) {
33383
- const registry = loadProjectRegistry();
33384
- const entry = registry.projects.find((p) => p.id === projectId);
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
- saveProjectRegistry(registry);
33387
+ saveBenchmarkRegistry(registry);
33388
33388
  }
33389
33389
  }
33390
- function discoverProjects(rootDir, maxDepth = 2) {
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
- getProjectsRegistryPath,
34667
- loadProjectRegistry,
34668
- saveProjectRegistry,
34669
- deriveProjectId,
34670
- addProject,
34671
- removeProject,
34672
- getProject,
34673
- touchProject,
34674
- discoverProjects,
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-FQGY6QXQ.js.map
34691
+ //# sourceMappingURL=chunk-CXAO4VPP.js.map