agentv 2.17.2 → 2.18.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.
@@ -25,12 +25,12 @@ import {
25
25
  subscribeToCopilotCliLogEntries,
26
26
  subscribeToCopilotSdkLogEntries,
27
27
  subscribeToPiLogEntries
28
- } from "./chunk-SO4O4O2B.js";
28
+ } from "./chunk-NWQTM4ZK.js";
29
29
 
30
30
  // package.json
31
31
  var package_default = {
32
32
  name: "agentv",
33
- version: "2.17.2",
33
+ version: "2.18.1",
34
34
  description: "CLI entry point for AgentV",
35
35
  type: "module",
36
36
  repository: {
@@ -1945,12 +1945,22 @@ function getKnownSettings(provider) {
1945
1945
  }
1946
1946
  }
1947
1947
  function validateUnknownSettings(target, provider, absolutePath, location, errors) {
1948
+ const removedTargetFields = /* @__PURE__ */ new Set(["workspace_template", "workspaceTemplate"]);
1948
1949
  const knownSettings = getKnownSettings(provider);
1949
1950
  if (!knownSettings) {
1950
1951
  return;
1951
1952
  }
1952
1953
  const baseFields = /* @__PURE__ */ new Set(["name", "provider", "judge_target", "workers", "$schema", "targets"]);
1953
1954
  for (const key of Object.keys(target)) {
1955
+ if (removedTargetFields.has(key)) {
1956
+ errors.push({
1957
+ severity: "error",
1958
+ filePath: absolutePath,
1959
+ location: `${location}.${key}`,
1960
+ message: "target-level workspace_template has been removed. Use eval-level workspace.template."
1961
+ });
1962
+ continue;
1963
+ }
1954
1964
  if (!baseFields.has(key) && !knownSettings.has(key)) {
1955
1965
  errors.push({
1956
1966
  severity: "warning",
@@ -2632,13 +2642,7 @@ function normalizeOptionalNumber(value) {
2632
2642
  return void 0;
2633
2643
  }
2634
2644
  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;
2645
+ return value === "pooled" || value === "temp" || value === "static" ? value : void 0;
2642
2646
  }
2643
2647
  function normalizeOptions(rawOptions, config, yamlExecution) {
2644
2648
  const cliFormat = normalizeString(rawOptions.outputFormat);
@@ -2674,6 +2678,17 @@ function normalizeOptions(rawOptions, config, yamlExecution) {
2674
2678
  const resolvedNoCache = cliNoCache;
2675
2679
  const cliOut = normalizeString(rawOptions.out);
2676
2680
  const configOut = config?.output?.dir;
2681
+ const cliWorkspacePath = normalizeString(rawOptions.workspacePath);
2682
+ const cliWorkspaceModeRaw = normalizeString(rawOptions.workspaceMode);
2683
+ const cliWorkspaceMode = normalizeWorkspaceMode(rawOptions.workspaceMode);
2684
+ if (cliWorkspacePath && cliWorkspaceModeRaw && cliWorkspaceMode !== "static") {
2685
+ throw new Error("--workspace-path requires --workspace-mode=static (or omit --workspace-mode)");
2686
+ }
2687
+ const yamlExecutionRecord = yamlExecution;
2688
+ const yamlWorkspaceMode = normalizeWorkspaceMode(yamlExecutionRecord?.workspace_mode);
2689
+ const yamlWorkspacePath = normalizeString(yamlExecutionRecord?.workspace_path);
2690
+ const workspacePath = cliWorkspacePath ?? yamlWorkspacePath;
2691
+ const workspaceMode = cliWorkspacePath ? "static" : cliWorkspaceMode ?? yamlWorkspaceMode;
2677
2692
  return {
2678
2693
  target: singleTarget,
2679
2694
  cliTargets,
@@ -2695,8 +2710,6 @@ function normalizeOptions(rawOptions, config, yamlExecution) {
2695
2710
  // Intentional — there are no --no-verbose / --no-keep-workspaces flags.
2696
2711
  // Precedence: CLI > YAML config > TS config
2697
2712
  verbose: normalizeBoolean(rawOptions.verbose) || yamlExecution?.verbose === true || config?.execution?.verbose === true,
2698
- keepWorkspaces: normalizeBoolean(rawOptions.keepWorkspaces) || yamlExecution?.keep_workspaces === true || config?.execution?.keepWorkspaces === true,
2699
- cleanupWorkspaces: normalizeBoolean(rawOptions.cleanupWorkspaces),
2700
2713
  // Precedence: CLI > YAML config > TS config
2701
2714
  otelFile: normalizeString(rawOptions.otelFile) ?? (yamlExecution?.otel_file ? resolveTimestampPlaceholder(yamlExecution.otel_file) : void 0) ?? (config?.execution?.otelFile ? resolveTimestampPlaceholder(config.execution.otelFile) : void 0),
2702
2715
  traceFile: normalizeString(rawOptions.traceFile) ?? (yamlExecution?.trace_file ? resolveTimestampPlaceholder(yamlExecution.trace_file) : void 0) ?? (config?.execution?.traceFile ? resolveTimestampPlaceholder(config.execution.traceFile) : void 0),
@@ -2705,15 +2718,8 @@ function normalizeOptions(rawOptions, config, yamlExecution) {
2705
2718
  otelCaptureContent: normalizeBoolean(rawOptions.otelCaptureContent),
2706
2719
  otelGroupTurns: normalizeBoolean(rawOptions.otelGroupTurns),
2707
2720
  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)
2721
+ workspaceMode,
2722
+ workspacePath
2717
2723
  };
2718
2724
  }
2719
2725
  async function ensureFileExists(filePath, description) {
@@ -2941,16 +2947,8 @@ async function runSingleEvalFile(params) {
2941
2947
  evalCases,
2942
2948
  verbose: options.verbose,
2943
2949
  maxConcurrency: resolvedWorkers,
2944
- keepWorkspaces: options.keepWorkspaces,
2945
- cleanupWorkspaces: options.cleanupWorkspaces,
2946
- poolWorkspaces: options.poolWorkspaces,
2947
- poolMaxSlots: options.poolMaxSlots,
2948
- workspace: options.workspace,
2949
2950
  workspaceMode: options.workspaceMode,
2950
2951
  workspacePath: options.workspacePath,
2951
- workspaceClean: options.workspaceClean,
2952
- retainOnSuccess: options.retainOnSuccess,
2953
- retainOnFailure: options.retainOnFailure,
2954
2952
  trials: trialsConfig,
2955
2953
  totalBudgetUsd,
2956
2954
  failOnError,
@@ -3027,27 +3025,21 @@ async function runEvalCommand(input) {
3027
3025
  options = { ...options, filter: filterPattern };
3028
3026
  retryNonErrorResults = await loadNonErrorResults(retryPath);
3029
3027
  }
3030
- if (options.keepWorkspaces && options.cleanupWorkspaces) {
3031
- console.warn(
3032
- "Warning: Both --keep-workspaces and --cleanup-workspaces specified. --cleanup-workspaces takes precedence."
3033
- );
3034
- }
3035
- const explicitWorkspacePath = options.workspacePath ?? options.workspace;
3036
- if (explicitWorkspacePath) {
3037
- const resolvedWorkspace = path10.resolve(explicitWorkspacePath);
3028
+ if (options.workspacePath) {
3029
+ const resolvedWorkspace = path10.resolve(options.workspacePath);
3038
3030
  try {
3039
3031
  const { stat: stat2 } = await import("node:fs/promises");
3040
3032
  const stats = await stat2(resolvedWorkspace);
3041
3033
  if (!stats.isDirectory()) {
3042
- throw new Error(`--workspace path is not a directory: ${resolvedWorkspace}`);
3034
+ throw new Error(`--workspace-path is not a directory: ${resolvedWorkspace}`);
3043
3035
  }
3044
3036
  } catch (err) {
3045
3037
  if (err.code === "ENOENT") {
3046
- throw new Error(`--workspace path does not exist: ${resolvedWorkspace}`);
3038
+ throw new Error(`--workspace-path does not exist: ${resolvedWorkspace}`);
3047
3039
  }
3048
3040
  throw err;
3049
3041
  }
3050
- options = { ...options, workspace: resolvedWorkspace, workspacePath: resolvedWorkspace };
3042
+ options = { ...options, workspacePath: resolvedWorkspace };
3051
3043
  }
3052
3044
  if (options.verbose) {
3053
3045
  console.log(`Repository root: ${repoRoot}`);
@@ -3056,7 +3048,7 @@ async function runEvalCommand(input) {
3056
3048
  const useFileExport = !!(options.otelFile || options.traceFile);
3057
3049
  if (options.exportOtel || useFileExport) {
3058
3050
  try {
3059
- const { OtelTraceExporter, OTEL_BACKEND_PRESETS } = await import("./dist-AQVAKXMK.js");
3051
+ const { OtelTraceExporter, OTEL_BACKEND_PRESETS } = await import("./dist-QE7SFCGD.js");
3060
3052
  let endpoint = process.env.OTEL_EXPORTER_OTLP_ENDPOINT;
3061
3053
  let headers = {};
3062
3054
  if (options.otelBackend) {
@@ -3343,4 +3335,4 @@ export {
3343
3335
  selectTarget,
3344
3336
  runEvalCommand
3345
3337
  };
3346
- //# sourceMappingURL=chunk-QAZU7YAH.js.map
3338
+ //# sourceMappingURL=chunk-YSLP2HLP.js.map