@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 +19 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +19 -1
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -783,6 +783,11 @@ async function parseEvaluatorList(candidateEvaluators, searchRoots, evalId) {
|
|
|
783
783
|
}
|
|
784
784
|
if (typeValue === "code-judge") {
|
|
785
785
|
let command;
|
|
786
|
+
if (rawEvaluator.script !== void 0 && rawEvaluator.command === void 0) {
|
|
787
|
+
console.warn(
|
|
788
|
+
`${ANSI_YELLOW4}Warning: 'script' is deprecated in evaluator '${name}' in '${evalId}'. Use 'command' instead.${ANSI_RESET4}`
|
|
789
|
+
);
|
|
790
|
+
}
|
|
786
791
|
const rawCommand = rawEvaluator.command ?? rawEvaluator.script;
|
|
787
792
|
if (typeof rawCommand === "string") {
|
|
788
793
|
const trimmed = rawCommand.trim();
|
|
@@ -1541,6 +1546,11 @@ async function parseEvaluatorList(candidateEvaluators, searchRoots, evalId) {
|
|
|
1541
1546
|
let resolvedPromptScript;
|
|
1542
1547
|
let promptScriptConfig;
|
|
1543
1548
|
if (isJsonObject2(rawPrompt)) {
|
|
1549
|
+
if (rawPrompt.script !== void 0 && rawPrompt.command === void 0) {
|
|
1550
|
+
console.warn(
|
|
1551
|
+
`${ANSI_YELLOW4}Warning: 'prompt.script' is deprecated in evaluator '${name}' in '${evalId}'. Use 'prompt.command' instead.${ANSI_RESET4}`
|
|
1552
|
+
);
|
|
1553
|
+
}
|
|
1544
1554
|
const commandArray = asStringArray(
|
|
1545
1555
|
rawPrompt.command ?? rawPrompt.script,
|
|
1546
1556
|
`prompt.command for evaluator '${name}' in '${evalId}'`
|
|
@@ -3071,6 +3081,9 @@ var loadEvalCaseById = loadTestById;
|
|
|
3071
3081
|
function parseWorkspaceScriptConfig(raw, evalFileDir) {
|
|
3072
3082
|
if (!isJsonObject(raw)) return void 0;
|
|
3073
3083
|
const obj = raw;
|
|
3084
|
+
if (obj.script !== void 0 && obj.command === void 0) {
|
|
3085
|
+
logWarning6("'script' is deprecated. Use 'command' instead.");
|
|
3086
|
+
}
|
|
3074
3087
|
const commandSource = obj.command ?? obj.script;
|
|
3075
3088
|
if (!Array.isArray(commandSource) || commandSource.length === 0) return void 0;
|
|
3076
3089
|
const commandArr = commandSource.filter((s) => typeof s === "string");
|
|
@@ -7334,7 +7347,7 @@ import path21 from "node:path";
|
|
|
7334
7347
|
var logged = false;
|
|
7335
7348
|
function getAgentvHome() {
|
|
7336
7349
|
const envHome = process.env.AGENTV_HOME;
|
|
7337
|
-
if (envHome) {
|
|
7350
|
+
if (envHome && envHome !== "undefined") {
|
|
7338
7351
|
if (!logged) {
|
|
7339
7352
|
logged = true;
|
|
7340
7353
|
console.warn(`Using AGENTV_HOME: ${envHome}`);
|
|
@@ -13395,6 +13408,11 @@ async function executeWorkspaceScript(config, context, failureMode = "fatal") {
|
|
|
13395
13408
|
});
|
|
13396
13409
|
const timeoutMs = config.timeout_ms ?? (failureMode === "fatal" ? 6e4 : 3e4);
|
|
13397
13410
|
const cwd = config.cwd ?? context.evalDir;
|
|
13411
|
+
if (config.script !== void 0 && config.command === void 0) {
|
|
13412
|
+
console.warn(
|
|
13413
|
+
"\x1B[33mWarning: 'script' is deprecated in workspace config. Use 'command' instead.\x1B[0m"
|
|
13414
|
+
);
|
|
13415
|
+
}
|
|
13398
13416
|
const rawCommand = config.command ?? config.script ?? [];
|
|
13399
13417
|
const commandArray = interpolateArgs(rawCommand, context);
|
|
13400
13418
|
const result = await execFileWithStdin(commandArray, stdin, {
|