agentv 4.25.5-next.1 → 4.25.6-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.
@@ -176,7 +176,7 @@ async function findRepoRoot(start) {
176
176
  // package.json
177
177
  var package_default = {
178
178
  name: "agentv",
179
- version: "4.25.5-next.1",
179
+ version: "4.25.6-next.1",
180
180
  description: "CLI entry point for AgentV",
181
181
  type: "module",
182
182
  repository: {
@@ -284,7 +284,7 @@ async function discoverTargetsFile(options) {
284
284
  }
285
285
 
286
286
  // src/commands/eval/run-eval.ts
287
- import { constants as constants4, existsSync as existsSync3, mkdirSync } from "node:fs";
287
+ import { constants as constants4, existsSync as existsSync4, mkdirSync } from "node:fs";
288
288
  import { access as access5, readFile as readFile8 } from "node:fs/promises";
289
289
  import path15 from "node:path";
290
290
  import { pathToFileURL } from "node:url";
@@ -2473,6 +2473,7 @@ async function loadNonErrorResults(jsonlPath) {
2473
2473
  }
2474
2474
 
2475
2475
  // src/commands/eval/run-cache.ts
2476
+ import { existsSync as existsSync3 } from "node:fs";
2476
2477
  import { mkdir as mkdir6, readFile, writeFile as writeFile5 } from "node:fs/promises";
2477
2478
  import path13 from "node:path";
2478
2479
  var CACHE_FILENAME = "cache.json";
@@ -2493,6 +2494,12 @@ async function loadRunCache(cwd) {
2493
2494
  return void 0;
2494
2495
  }
2495
2496
  }
2497
+ async function resolveCachedRunDir(cwd) {
2498
+ const cache = await loadRunCache(cwd);
2499
+ if (!cache?.lastRunDir) return void 0;
2500
+ if (!existsSync3(cache.lastRunDir)) return void 0;
2501
+ return cache.lastRunDir;
2502
+ }
2496
2503
  async function saveRunCache(cwd, resultPath) {
2497
2504
  if (path13.basename(resultPath) !== RESULT_INDEX_FILENAME) {
2498
2505
  return;
@@ -5365,13 +5372,22 @@ async function runEvalCommand(input) {
5365
5372
  console.log(`Skipping ${completedIds.length} already-completed test(s).`);
5366
5373
  }
5367
5374
  }
5375
+ if (options.resume && !options.retryErrors && !options.outputDir && !options.artifacts) {
5376
+ const cachedDir = await resolveCachedRunDir(cwd);
5377
+ if (cachedDir) {
5378
+ options = { ...options, outputDir: cachedDir };
5379
+ const flagLabel = options.rerunFailed ? "rerun-failed" : "resume";
5380
+ const displayDir = path15.relative(cwd, cachedDir) || cachedDir;
5381
+ console.log(`Auto-detected last run dir for --${flagLabel}: ${displayDir}`);
5382
+ }
5383
+ }
5368
5384
  let resumeSkipKeys;
5369
5385
  let isResumeAppend = false;
5370
5386
  if (options.resume && !options.retryErrors) {
5371
5387
  const explicitResumeDir = options.outputDir ?? options.artifacts;
5372
5388
  if (explicitResumeDir) {
5373
5389
  const resumeIndexPath = path15.join(path15.resolve(explicitResumeDir), "index.jsonl");
5374
- if (existsSync3(resumeIndexPath)) {
5390
+ if (existsSync4(resumeIndexPath)) {
5375
5391
  const content = await readFile8(resumeIndexPath, "utf8");
5376
5392
  const existingResults = parseJsonlResults(content);
5377
5393
  resumeSkipKeys = /* @__PURE__ */ new Set();
@@ -5390,7 +5406,7 @@ async function runEvalCommand(input) {
5390
5406
  }
5391
5407
  } else {
5392
5408
  console.warn(
5393
- "Warning: --resume requires --output <dir> to identify the run directory. Ignoring --resume."
5409
+ "Warning: --resume requires --output <dir> (or a cached last run) to identify the run directory. Ignoring --resume."
5394
5410
  );
5395
5411
  }
5396
5412
  }
@@ -6046,4 +6062,4 @@ export {
6046
6062
  getCategories,
6047
6063
  filterByCategory
6048
6064
  };
6049
- //# sourceMappingURL=chunk-WQTBGQ3M.js.map
6065
+ //# sourceMappingURL=chunk-5RGZVQIE.js.map