agentv 4.3.0 → 4.3.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/{chunk-ASU5L5ZW.js → chunk-BEFW6WZ6.js} +41 -16
- package/dist/chunk-BEFW6WZ6.js.map +1 -0
- package/dist/{chunk-ZDJN5FSI.js → chunk-LTALLYDW.js} +4 -4
- package/dist/{chunk-ZDJN5FSI.js.map → chunk-LTALLYDW.js.map} +1 -1
- package/dist/{chunk-XLM3RNN7.js → chunk-URQXFJEB.js} +57 -58
- package/dist/{chunk-XLM3RNN7.js.map → chunk-URQXFJEB.js.map} +1 -1
- package/dist/cli.js +3 -3
- package/dist/{dist-VVXR6TYM.js → dist-GQ2YNG7B.js} +2 -2
- package/dist/index.js +3 -3
- package/dist/{interactive-BKK53ETJ.js → interactive-UZBC7V4B.js} +3 -3
- package/dist/studio/assets/{index-D8LVkz9x.js → index-CDGReinH.js} +1 -1
- package/dist/studio/assets/{index-Cir5Hc8S.js → index-DofvSOmX.js} +1 -1
- package/dist/studio/index.html +1 -1
- package/package.json +1 -1
- package/dist/chunk-ASU5L5ZW.js.map +0 -1
- /package/dist/{dist-VVXR6TYM.js.map → dist-GQ2YNG7B.js.map} +0 -0
- /package/dist/{interactive-BKK53ETJ.js.map → interactive-UZBC7V4B.js.map} +0 -0
|
@@ -24,7 +24,7 @@ import {
|
|
|
24
24
|
validateFileReferences,
|
|
25
25
|
validateTargetsFile,
|
|
26
26
|
writeArtifactsFromResults
|
|
27
|
-
} from "./chunk-
|
|
27
|
+
} from "./chunk-LTALLYDW.js";
|
|
28
28
|
import {
|
|
29
29
|
DEFAULT_CATEGORY,
|
|
30
30
|
createBuiltinRegistry,
|
|
@@ -43,7 +43,7 @@ import {
|
|
|
43
43
|
toSnakeCaseDeep as toSnakeCaseDeep2,
|
|
44
44
|
transpileEvalYamlFile,
|
|
45
45
|
trimBaselineResult
|
|
46
|
-
} from "./chunk-
|
|
46
|
+
} from "./chunk-URQXFJEB.js";
|
|
47
47
|
import {
|
|
48
48
|
__commonJS,
|
|
49
49
|
__esm,
|
|
@@ -4217,7 +4217,7 @@ var evalRunCommand = command({
|
|
|
4217
4217
|
},
|
|
4218
4218
|
handler: async (args) => {
|
|
4219
4219
|
if (args.evalPaths.length === 0 && process.stdin.isTTY) {
|
|
4220
|
-
const { launchInteractiveWizard } = await import("./interactive-
|
|
4220
|
+
const { launchInteractiveWizard } = await import("./interactive-UZBC7V4B.js");
|
|
4221
4221
|
await launchInteractiveWizard();
|
|
4222
4222
|
return;
|
|
4223
4223
|
}
|
|
@@ -4948,7 +4948,7 @@ async function writeJson(filePath, data) {
|
|
|
4948
4948
|
}
|
|
4949
4949
|
|
|
4950
4950
|
// src/commands/pipeline/run.ts
|
|
4951
|
-
import {
|
|
4951
|
+
import { exec } from "node:child_process";
|
|
4952
4952
|
import { existsSync as existsSync3, readFileSync as readFileSync4, unlinkSync } from "node:fs";
|
|
4953
4953
|
import { mkdir as mkdir4, readFile as readFile4, readdir as readdir3, writeFile as writeFile5 } from "node:fs/promises";
|
|
4954
4954
|
import { tmpdir } from "node:os";
|
|
@@ -4997,7 +4997,7 @@ var evalRunCommand2 = command({
|
|
|
4997
4997
|
workers: option({
|
|
4998
4998
|
type: optional(number),
|
|
4999
4999
|
long: "workers",
|
|
5000
|
-
description: "Parallel workers for target invocation (default:
|
|
5000
|
+
description: "Parallel workers for target invocation (default: targets.yaml workers, then 5)"
|
|
5001
5001
|
}),
|
|
5002
5002
|
experiment: option({
|
|
5003
5003
|
type: optional(string),
|
|
@@ -5025,6 +5025,7 @@ var evalRunCommand2 = command({
|
|
|
5025
5025
|
let targetInfo = null;
|
|
5026
5026
|
let targetName = "agent";
|
|
5027
5027
|
let targetKind = "agent";
|
|
5028
|
+
let targetWorkers;
|
|
5028
5029
|
try {
|
|
5029
5030
|
const selection = await selectTarget({
|
|
5030
5031
|
testFilePath: resolvedEvalPath,
|
|
@@ -5037,6 +5038,7 @@ var evalRunCommand2 = command({
|
|
|
5037
5038
|
env: process.env
|
|
5038
5039
|
});
|
|
5039
5040
|
targetName = selection.targetName;
|
|
5041
|
+
targetWorkers = selection.resolvedTarget.workers;
|
|
5040
5042
|
if (selection.resolvedTarget.kind === "cli") {
|
|
5041
5043
|
targetKind = "cli";
|
|
5042
5044
|
const config = selection.resolvedTarget.config;
|
|
@@ -5104,8 +5106,14 @@ var evalRunCommand2 = command({
|
|
|
5104
5106
|
process.env.AGENTV_RUN_TIMESTAMP = (/* @__PURE__ */ new Date()).toISOString().replace(/:/g, "-").replace(/\./g, "-");
|
|
5105
5107
|
}
|
|
5106
5108
|
const mergedEnv = { ...process.env, ...envVars };
|
|
5107
|
-
const maxWorkers = workers ??
|
|
5108
|
-
|
|
5109
|
+
const maxWorkers = workers ?? targetWorkers ?? 5;
|
|
5110
|
+
let invCompleted = 0;
|
|
5111
|
+
const invTotal = testIds.length;
|
|
5112
|
+
const writeInvProgress = () => {
|
|
5113
|
+
process.stderr.write(`\rInvoking: ${invCompleted}/${invTotal} done`);
|
|
5114
|
+
};
|
|
5115
|
+
console.log(`Invoking ${invTotal} CLI target(s) (${maxWorkers} workers)...`);
|
|
5116
|
+
writeInvProgress();
|
|
5109
5117
|
const invokeTarget = async (testId) => {
|
|
5110
5118
|
const subpath = safeEvalSet ? [safeEvalSet, testId] : [testId];
|
|
5111
5119
|
const testDir = join4(outDir, ...subpath);
|
|
@@ -5125,12 +5133,20 @@ var evalRunCommand2 = command({
|
|
|
5125
5133
|
rendered = rendered.replace("{PROMPT}", inputText);
|
|
5126
5134
|
const start = performance.now();
|
|
5127
5135
|
try {
|
|
5128
|
-
|
|
5129
|
-
|
|
5130
|
-
|
|
5131
|
-
|
|
5132
|
-
|
|
5133
|
-
|
|
5136
|
+
await new Promise((resolveP, rejectP) => {
|
|
5137
|
+
exec(
|
|
5138
|
+
rendered,
|
|
5139
|
+
{
|
|
5140
|
+
cwd,
|
|
5141
|
+
timeout: timeoutMs,
|
|
5142
|
+
env: mergedEnv,
|
|
5143
|
+
maxBuffer: 10 * 1024 * 1024
|
|
5144
|
+
},
|
|
5145
|
+
(error) => {
|
|
5146
|
+
if (error) rejectP(error);
|
|
5147
|
+
else resolveP();
|
|
5148
|
+
}
|
|
5149
|
+
);
|
|
5134
5150
|
});
|
|
5135
5151
|
const durationMs = Math.round(performance.now() - start);
|
|
5136
5152
|
let response;
|
|
@@ -5145,7 +5161,9 @@ var evalRunCommand2 = command({
|
|
|
5145
5161
|
total_duration_seconds: Math.round(durationMs / 10) / 100,
|
|
5146
5162
|
execution_status: "ok"
|
|
5147
5163
|
});
|
|
5148
|
-
|
|
5164
|
+
process.stderr.write(`
|
|
5165
|
+
${testId}: OK (${durationMs}ms, ${response.length} chars)
|
|
5166
|
+
`);
|
|
5149
5167
|
} catch (error) {
|
|
5150
5168
|
const durationMs = Math.round(performance.now() - start);
|
|
5151
5169
|
const message = error instanceof Error ? error.message : String(error);
|
|
@@ -5156,8 +5174,14 @@ var evalRunCommand2 = command({
|
|
|
5156
5174
|
total_duration_seconds: Math.round(durationMs / 10) / 100,
|
|
5157
5175
|
execution_status: "execution_error"
|
|
5158
5176
|
});
|
|
5159
|
-
|
|
5177
|
+
process.stderr.write(
|
|
5178
|
+
`
|
|
5179
|
+
${testId}: FAILED (${durationMs}ms) \u2014 ${message.slice(0, 200)}
|
|
5180
|
+
`
|
|
5181
|
+
);
|
|
5160
5182
|
} finally {
|
|
5183
|
+
invCompleted++;
|
|
5184
|
+
writeInvProgress();
|
|
5161
5185
|
try {
|
|
5162
5186
|
if (existsSync3(promptFile)) unlinkSync(promptFile);
|
|
5163
5187
|
if (existsSync3(outputFile)) unlinkSync(outputFile);
|
|
@@ -5176,6 +5200,7 @@ var evalRunCommand2 = command({
|
|
|
5176
5200
|
}
|
|
5177
5201
|
}
|
|
5178
5202
|
await Promise.all(pending);
|
|
5203
|
+
process.stderr.write("\n");
|
|
5179
5204
|
} else {
|
|
5180
5205
|
console.log("Subagent-as-target mode \u2014 skipping CLI invocation.");
|
|
5181
5206
|
}
|
|
@@ -8318,4 +8343,4 @@ export {
|
|
|
8318
8343
|
preprocessArgv,
|
|
8319
8344
|
runCli
|
|
8320
8345
|
};
|
|
8321
|
-
//# sourceMappingURL=chunk-
|
|
8346
|
+
//# sourceMappingURL=chunk-BEFW6WZ6.js.map
|