agentv 2.14.3 → 2.16.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.
@@ -25,12 +25,12 @@ import {
25
25
  subscribeToCopilotCliLogEntries,
26
26
  subscribeToCopilotSdkLogEntries,
27
27
  subscribeToPiLogEntries
28
- } from "./chunk-TK4PB62M.js";
28
+ } from "./chunk-LZ5MPQFM.js";
29
29
 
30
30
  // package.json
31
31
  var package_default = {
32
32
  name: "agentv",
33
- version: "2.14.3",
33
+ version: "2.16.0",
34
34
  description: "CLI entry point for AgentV",
35
35
  type: "module",
36
36
  repository: {
@@ -1471,7 +1471,8 @@ async function validateEvalFile(filePath) {
1471
1471
  }
1472
1472
  function validateWorkspaceRepoConfig(workspace, filePath, errors) {
1473
1473
  const repos = workspace.repos;
1474
- const reset = workspace.reset;
1474
+ const hooks = workspace.hooks;
1475
+ const afterEachHook = isObject(hooks) ? hooks.after_each_test : void 0;
1475
1476
  const isolation = workspace.isolation;
1476
1477
  if (Array.isArray(repos)) {
1477
1478
  for (const repo of repos) {
@@ -1492,22 +1493,22 @@ function validateWorkspaceRepoConfig(workspace, filePath, errors) {
1492
1493
  }
1493
1494
  }
1494
1495
  }
1495
- if (isObject(reset) && reset.strategy && reset.strategy !== "none") {
1496
+ if (isObject(afterEachHook) && afterEachHook.reset && afterEachHook.reset !== "none") {
1496
1497
  if (!Array.isArray(repos) || repos.length === 0) {
1497
1498
  errors.push({
1498
1499
  severity: "warning",
1499
1500
  filePath,
1500
- location: "workspace.reset",
1501
- message: `reset.strategy '${reset.strategy}' has no effect without repos.`
1501
+ location: "workspace.hooks.after_each_test",
1502
+ message: `hooks.after_each_test.reset '${afterEachHook.reset}' has no effect without repos.`
1502
1503
  });
1503
1504
  }
1504
1505
  }
1505
- if (isObject(reset) && reset.after_each === true && isolation === "per_test") {
1506
+ if (isObject(afterEachHook) && afterEachHook.reset && isolation === "per_test") {
1506
1507
  errors.push({
1507
1508
  severity: "warning",
1508
1509
  filePath,
1509
- location: "workspace.reset",
1510
- message: "reset.after_each is redundant with isolation: per_test (each test gets a fresh workspace)."
1510
+ location: "workspace.hooks.after_each_test",
1511
+ message: "hooks.after_each_test.reset is redundant with isolation: per_test (each test gets a fresh workspace)."
1511
1512
  });
1512
1513
  }
1513
1514
  }
@@ -2630,6 +2631,15 @@ function normalizeOptionalNumber(value) {
2630
2631
  }
2631
2632
  return void 0;
2632
2633
  }
2634
+ function normalizeWorkspaceMode(value) {
2635
+ return value === "pooled" || value === "ephemeral" || value === "static" ? value : void 0;
2636
+ }
2637
+ function normalizeWorkspaceClean(value) {
2638
+ return value === "standard" || value === "full" ? value : void 0;
2639
+ }
2640
+ function normalizeRetention(value) {
2641
+ return value === "keep" || value === "cleanup" ? value : void 0;
2642
+ }
2633
2643
  function normalizeOptions(rawOptions, config, yamlExecution) {
2634
2644
  const cliFormat = normalizeString(rawOptions.outputFormat);
2635
2645
  const configFormat = config?.output?.format;
@@ -2694,7 +2704,16 @@ function normalizeOptions(rawOptions, config, yamlExecution) {
2694
2704
  otelBackend: normalizeString(rawOptions.otelBackend),
2695
2705
  otelCaptureContent: normalizeBoolean(rawOptions.otelCaptureContent),
2696
2706
  otelGroupTurns: normalizeBoolean(rawOptions.otelGroupTurns),
2697
- retryErrors: normalizeString(rawOptions.retryErrors)
2707
+ retryErrors: normalizeString(rawOptions.retryErrors),
2708
+ // Pool: --no-pool explicitly disables; --pool-workspaces explicitly enables; YAML config; default undefined (orchestrator defaults to true)
2709
+ poolWorkspaces: normalizeBoolean(rawOptions.noPool) ? false : normalizeBoolean(rawOptions.poolWorkspaces) ? true : yamlExecution?.pool_workspaces,
2710
+ poolMaxSlots: yamlExecution?.pool_slots,
2711
+ workspace: normalizeString(rawOptions.workspace),
2712
+ workspaceMode: normalizeWorkspaceMode(rawOptions.workspaceMode),
2713
+ workspacePath: normalizeString(rawOptions.workspacePath),
2714
+ workspaceClean: normalizeWorkspaceClean(rawOptions.workspaceClean),
2715
+ retainOnSuccess: normalizeRetention(rawOptions.retainOnSuccess) ?? (normalizeBoolean(rawOptions.keepWorkspaces) ? "keep" : void 0),
2716
+ retainOnFailure: normalizeRetention(rawOptions.retainOnFailure) ?? (normalizeBoolean(rawOptions.cleanupWorkspaces) ? "cleanup" : void 0)
2698
2717
  };
2699
2718
  }
2700
2719
  async function ensureFileExists(filePath, description) {
@@ -2924,6 +2943,14 @@ async function runSingleEvalFile(params) {
2924
2943
  maxConcurrency: resolvedWorkers,
2925
2944
  keepWorkspaces: options.keepWorkspaces,
2926
2945
  cleanupWorkspaces: options.cleanupWorkspaces,
2946
+ poolWorkspaces: options.poolWorkspaces,
2947
+ poolMaxSlots: options.poolMaxSlots,
2948
+ workspace: options.workspace,
2949
+ workspaceMode: options.workspaceMode,
2950
+ workspacePath: options.workspacePath,
2951
+ workspaceClean: options.workspaceClean,
2952
+ retainOnSuccess: options.retainOnSuccess,
2953
+ retainOnFailure: options.retainOnFailure,
2927
2954
  trials: trialsConfig,
2928
2955
  totalBudgetUsd,
2929
2956
  failOnError,
@@ -3005,6 +3032,23 @@ async function runEvalCommand(input) {
3005
3032
  "Warning: Both --keep-workspaces and --cleanup-workspaces specified. --cleanup-workspaces takes precedence."
3006
3033
  );
3007
3034
  }
3035
+ const explicitWorkspacePath = options.workspacePath ?? options.workspace;
3036
+ if (explicitWorkspacePath) {
3037
+ const resolvedWorkspace = path10.resolve(explicitWorkspacePath);
3038
+ try {
3039
+ const { stat: stat2 } = await import("node:fs/promises");
3040
+ const stats = await stat2(resolvedWorkspace);
3041
+ if (!stats.isDirectory()) {
3042
+ throw new Error(`--workspace path is not a directory: ${resolvedWorkspace}`);
3043
+ }
3044
+ } catch (err) {
3045
+ if (err.code === "ENOENT") {
3046
+ throw new Error(`--workspace path does not exist: ${resolvedWorkspace}`);
3047
+ }
3048
+ throw err;
3049
+ }
3050
+ options = { ...options, workspace: resolvedWorkspace, workspacePath: resolvedWorkspace };
3051
+ }
3008
3052
  if (options.verbose) {
3009
3053
  console.log(`Repository root: ${repoRoot}`);
3010
3054
  }
@@ -3012,7 +3056,7 @@ async function runEvalCommand(input) {
3012
3056
  const useFileExport = !!(options.otelFile || options.traceFile);
3013
3057
  if (options.exportOtel || useFileExport) {
3014
3058
  try {
3015
- const { OtelTraceExporter, OTEL_BACKEND_PRESETS } = await import("./dist-F62E44UQ.js");
3059
+ const { OtelTraceExporter, OTEL_BACKEND_PRESETS } = await import("./dist-BMNEH377.js");
3016
3060
  let endpoint = process.env.OTEL_EXPORTER_OTLP_ENDPOINT;
3017
3061
  let headers = {};
3018
3062
  if (options.otelBackend) {
@@ -3299,4 +3343,4 @@ export {
3299
3343
  selectTarget,
3300
3344
  runEvalCommand
3301
3345
  };
3302
- //# sourceMappingURL=chunk-MDAFSKDI.js.map
3346
+ //# sourceMappingURL=chunk-QLCVA3ZS.js.map