@agentv/core 2.18.2 → 2.18.4

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.cjs CHANGED
@@ -2409,6 +2409,11 @@ async function parseEvaluatorList(candidateEvaluators, searchRoots, evalId) {
2409
2409
  }
2410
2410
  if (typeValue === "code-judge") {
2411
2411
  let command;
2412
+ if (rawEvaluator.script !== void 0 && rawEvaluator.command === void 0) {
2413
+ console.warn(
2414
+ `${ANSI_YELLOW4}Warning: 'script' is deprecated in evaluator '${name}' in '${evalId}'. Use 'command' instead.${ANSI_RESET4}`
2415
+ );
2416
+ }
2412
2417
  const rawCommand = rawEvaluator.command ?? rawEvaluator.script;
2413
2418
  if (typeof rawCommand === "string") {
2414
2419
  const trimmed = rawCommand.trim();
@@ -3167,6 +3172,11 @@ async function parseEvaluatorList(candidateEvaluators, searchRoots, evalId) {
3167
3172
  let resolvedPromptScript;
3168
3173
  let promptScriptConfig;
3169
3174
  if (isJsonObject2(rawPrompt)) {
3175
+ if (rawPrompt.script !== void 0 && rawPrompt.command === void 0) {
3176
+ console.warn(
3177
+ `${ANSI_YELLOW4}Warning: 'prompt.script' is deprecated in evaluator '${name}' in '${evalId}'. Use 'prompt.command' instead.${ANSI_RESET4}`
3178
+ );
3179
+ }
3170
3180
  const commandArray = asStringArray(
3171
3181
  rawPrompt.command ?? rawPrompt.script,
3172
3182
  `prompt.command for evaluator '${name}' in '${evalId}'`
@@ -4697,6 +4707,9 @@ var loadEvalCaseById = loadTestById;
4697
4707
  function parseWorkspaceScriptConfig(raw, evalFileDir) {
4698
4708
  if (!isJsonObject(raw)) return void 0;
4699
4709
  const obj = raw;
4710
+ if (obj.script !== void 0 && obj.command === void 0) {
4711
+ logWarning6("'script' is deprecated. Use 'command' instead.");
4712
+ }
4700
4713
  const commandSource = obj.command ?? obj.script;
4701
4714
  if (!Array.isArray(commandSource) || commandSource.length === 0) return void 0;
4702
4715
  const commandArr = commandSource.filter((s) => typeof s === "string");
@@ -10177,7 +10190,7 @@ var import_node_path23 = __toESM(require("path"), 1);
10177
10190
  var logged = false;
10178
10191
  function getAgentvHome() {
10179
10192
  const envHome = process.env.AGENTV_HOME;
10180
- if (envHome) {
10193
+ if (envHome && envHome !== "undefined") {
10181
10194
  if (!logged) {
10182
10195
  logged = true;
10183
10196
  console.warn(`Using AGENTV_HOME: ${envHome}`);
@@ -16267,6 +16280,11 @@ async function executeWorkspaceScript(config, context2, failureMode = "fatal") {
16267
16280
  });
16268
16281
  const timeoutMs = config.timeout_ms ?? (failureMode === "fatal" ? 6e4 : 3e4);
16269
16282
  const cwd = config.cwd ?? context2.evalDir;
16283
+ if (config.script !== void 0 && config.command === void 0) {
16284
+ console.warn(
16285
+ "\x1B[33mWarning: 'script' is deprecated in workspace config. Use 'command' instead.\x1B[0m"
16286
+ );
16287
+ }
16270
16288
  const rawCommand = config.command ?? config.script ?? [];
16271
16289
  const commandArray = interpolateArgs(rawCommand, context2);
16272
16290
  const result = await execFileWithStdin(commandArray, stdin, {