@agentv/core 2.17.3 → 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.
package/dist/index.d.cts CHANGED
@@ -548,11 +548,9 @@ type WorkspaceConfig = {
548
548
  /** Workspace lifecycle hooks */
549
549
  readonly hooks?: WorkspaceHooksConfig;
550
550
  /** Workspace materialization mode */
551
- readonly mode?: 'pooled' | 'ephemeral' | 'static';
551
+ readonly mode?: 'pooled' | 'temp' | 'static';
552
552
  /** Required when mode=static: use this existing directory directly */
553
- readonly static_path?: string;
554
- /** @deprecated Use mode=pooled|ephemeral|static */
555
- readonly pool?: boolean;
553
+ readonly path?: string;
556
554
  };
557
555
  type CodeEvaluatorConfig = {
558
556
  readonly name: string;
@@ -2479,7 +2477,7 @@ interface RunEvaluationOptions {
2479
2477
  /** Pre-existing workspace directory to use directly (skips clone/copy/pool) */
2480
2478
  readonly workspace?: string;
2481
2479
  /** Workspace materialization mode override */
2482
- readonly workspaceMode?: 'pooled' | 'ephemeral' | 'static';
2480
+ readonly workspaceMode?: 'pooled' | 'temp' | 'static';
2483
2481
  /** Static workspace path override (used when workspaceMode=static) */
2484
2482
  readonly workspacePath?: string;
2485
2483
  /** Workspace clean policy override for pooled reset */
package/dist/index.d.ts CHANGED
@@ -548,11 +548,9 @@ type WorkspaceConfig = {
548
548
  /** Workspace lifecycle hooks */
549
549
  readonly hooks?: WorkspaceHooksConfig;
550
550
  /** Workspace materialization mode */
551
- readonly mode?: 'pooled' | 'ephemeral' | 'static';
551
+ readonly mode?: 'pooled' | 'temp' | 'static';
552
552
  /** Required when mode=static: use this existing directory directly */
553
- readonly static_path?: string;
554
- /** @deprecated Use mode=pooled|ephemeral|static */
555
- readonly pool?: boolean;
553
+ readonly path?: string;
556
554
  };
557
555
  type CodeEvaluatorConfig = {
558
556
  readonly name: string;
@@ -2479,7 +2477,7 @@ interface RunEvaluationOptions {
2479
2477
  /** Pre-existing workspace directory to use directly (skips clone/copy/pool) */
2480
2478
  readonly workspace?: string;
2481
2479
  /** Workspace materialization mode override */
2482
- readonly workspaceMode?: 'pooled' | 'ephemeral' | 'static';
2480
+ readonly workspaceMode?: 'pooled' | 'temp' | 'static';
2483
2481
  /** Static workspace path override (used when workspaceMode=static) */
2484
2482
  readonly workspacePath?: string;
2485
2483
  /** Workspace clean policy override for pooled reset */
package/dist/index.js CHANGED
@@ -17,7 +17,7 @@ import {
17
17
  readTextFile,
18
18
  resolveFileReference,
19
19
  resolveTargetDefinition
20
- } from "./chunk-PSYFRPNT.js";
20
+ } from "./chunk-I4VQY3XJ.js";
21
21
  import {
22
22
  OtlpJsonFileExporter
23
23
  } from "./chunk-HFSYZHGF.js";
@@ -3187,6 +3187,17 @@ async function resolveWorkspaceConfig(raw, evalFileDir) {
3187
3187
  function parseWorkspaceConfig(raw, evalFileDir) {
3188
3188
  if (!isJsonObject(raw)) return void 0;
3189
3189
  const obj = raw;
3190
+ if ("static_path" in obj) {
3191
+ throw new Error(
3192
+ "workspace.static_path has been removed. Use workspace.path with workspace.mode=static."
3193
+ );
3194
+ }
3195
+ if ("pool" in obj) {
3196
+ throw new Error("workspace.pool has been removed. Use workspace.mode='pooled' or 'temp'.");
3197
+ }
3198
+ if ("static" in obj) {
3199
+ throw new Error("workspace.static has been removed. Use workspace.mode='static'.");
3200
+ }
3190
3201
  let template = typeof obj.template === "string" ? obj.template : void 0;
3191
3202
  if (template && !path8.isAbsolute(template)) {
3192
3203
  template = path8.resolve(evalFileDir, template);
@@ -3194,19 +3205,17 @@ function parseWorkspaceConfig(raw, evalFileDir) {
3194
3205
  const isolation = obj.isolation === "shared" || obj.isolation === "per_test" ? obj.isolation : void 0;
3195
3206
  const repos = Array.isArray(obj.repos) ? obj.repos.map(parseRepoConfig).filter(Boolean) : void 0;
3196
3207
  const hooks = parseWorkspaceHooksConfig(obj.hooks, evalFileDir);
3197
- const mode = obj.mode === "pooled" || obj.mode === "ephemeral" || obj.mode === "static" ? obj.mode : void 0;
3198
- const staticPath = typeof obj.static_path === "string" ? obj.static_path : void 0;
3199
- const pool = typeof obj.pool === "boolean" ? obj.pool : void 0;
3200
- if (!template && !isolation && !repos && !hooks && !mode && !staticPath && pool === void 0)
3201
- return void 0;
3208
+ const explicitMode = obj.mode === "pooled" || obj.mode === "temp" || obj.mode === "static" ? obj.mode : void 0;
3209
+ const workspacePath = typeof obj.path === "string" ? obj.path : void 0;
3210
+ const mode = explicitMode ?? (workspacePath ? "static" : void 0);
3211
+ if (!template && !isolation && !repos && !hooks && !mode && !workspacePath) return void 0;
3202
3212
  return {
3203
3213
  ...template !== void 0 && { template },
3204
3214
  ...isolation !== void 0 && { isolation },
3205
3215
  ...repos !== void 0 && { repos },
3206
3216
  ...hooks !== void 0 && { hooks },
3207
3217
  ...mode !== void 0 && { mode },
3208
- ...staticPath !== void 0 && { static_path: staticPath },
3209
- ...pool !== void 0 && { pool }
3218
+ ...workspacePath !== void 0 && { path: workspacePath }
3210
3219
  };
3211
3220
  }
3212
3221
  function mergeWorkspaceConfigs(suiteLevel, caseLevel) {
@@ -3233,8 +3242,7 @@ function mergeWorkspaceConfigs(suiteLevel, caseLevel) {
3233
3242
  repos: caseLevel.repos ?? suiteLevel.repos,
3234
3243
  ...hasHooks && { hooks: mergedHooks },
3235
3244
  mode: caseLevel.mode ?? suiteLevel.mode,
3236
- static_path: caseLevel.static_path ?? suiteLevel.static_path,
3237
- pool: caseLevel.pool ?? suiteLevel.pool
3245
+ path: caseLevel.path ?? suiteLevel.path
3238
3246
  };
3239
3247
  }
3240
3248
  function asString6(value) {
@@ -13594,19 +13602,27 @@ async function runEvaluation(options) {
13594
13602
  }
13595
13603
  };
13596
13604
  const isPerTestIsolation = suiteWorkspace?.isolation === "per_test";
13597
- const configuredMode = suiteWorkspace?.mode ?? workspaceMode;
13598
- const configuredStaticPath = suiteWorkspace?.static_path ?? workspacePath ?? legacyWorkspacePath;
13599
- const useStaticWorkspace = configuredMode === "static" || !!configuredStaticPath && !configuredMode;
13605
+ const cliWorkspacePath = workspacePath ?? legacyWorkspacePath;
13606
+ const yamlWorkspacePath = suiteWorkspace?.path;
13607
+ if (cliWorkspacePath && workspaceMode && workspaceMode !== "static") {
13608
+ throw new Error("--workspace-path requires --workspace-mode static when both are provided");
13609
+ }
13610
+ const configuredMode = cliWorkspacePath ? "static" : workspaceMode ?? suiteWorkspace?.mode ?? (yamlWorkspacePath ? "static" : "pooled");
13611
+ const configuredStaticPath = cliWorkspacePath ?? yamlWorkspacePath;
13612
+ const useStaticWorkspace = configuredMode === "static";
13600
13613
  if (useStaticWorkspace && isPerTestIsolation) {
13601
13614
  throw new Error(
13602
13615
  "static workspace mode is incompatible with isolation: per_test. Use isolation: shared (default)."
13603
13616
  );
13604
13617
  }
13605
13618
  if (configuredMode === "static" && !configuredStaticPath) {
13606
- throw new Error("workspace.mode=static requires workspace.static_path or --workspace-path");
13619
+ throw new Error("workspace.mode=static requires workspace.path or --workspace-path");
13620
+ }
13621
+ if (configuredMode !== "static" && configuredStaticPath) {
13622
+ throw new Error("workspace.path requires workspace.mode=static");
13607
13623
  }
13608
13624
  const hasSharedWorkspace = !!(useStaticWorkspace || workspaceTemplate || suiteWorkspace?.hooks || suiteWorkspace?.repos?.length && !isPerTestIsolation);
13609
- const poolEnabled = configuredMode === "pooled" ? true : configuredMode === "ephemeral" || useStaticWorkspace ? false : suiteWorkspace?.pool ?? poolWorkspaces ?? true;
13625
+ const poolEnabled = configuredMode === "pooled";
13610
13626
  const usePool = poolEnabled !== false && !!suiteWorkspace?.repos?.length && !isPerTestIsolation && !useStaticWorkspace;
13611
13627
  const resolvedRetainOnSuccess = retainOnSuccess ?? (keepWorkspaces ? "keep" : "cleanup");
13612
13628
  const resolvedRetainOnFailure = retainOnFailure ?? (cleanupWorkspaces ? "cleanup" : "keep");