agentv 3.9.0 → 3.9.2
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-Q2YWV4QM.js → chunk-6ZAFWUBT.js} +29 -18
- package/dist/chunk-6ZAFWUBT.js.map +1 -0
- package/dist/{chunk-GC5P5HHZ.js → chunk-JGMJL2LV.js} +76 -42
- package/dist/chunk-JGMJL2LV.js.map +1 -0
- package/dist/{chunk-TXDPYXHY.js → chunk-OIVGGWJ3.js} +102 -43
- package/dist/chunk-OIVGGWJ3.js.map +1 -0
- package/dist/cli.js +3 -3
- package/dist/{dist-PIOSPBKX.js → dist-PUPHGVKL.js} +4 -2
- package/dist/index.js +3 -3
- package/dist/{interactive-3VTDK5NX.js → interactive-BD56NB23.js} +3 -3
- package/dist/templates/.agentv/config.yaml +4 -13
- package/dist/templates/.agentv/targets.yaml +0 -16
- package/dist/templates/{.agentv/.env.example → .env.example} +11 -9
- package/package.json +1 -1
- package/dist/chunk-GC5P5HHZ.js.map +0 -1
- package/dist/chunk-Q2YWV4QM.js.map +0 -1
- package/dist/chunk-TXDPYXHY.js.map +0 -1
- /package/dist/{dist-PIOSPBKX.js.map → dist-PUPHGVKL.js.map} +0 -0
- /package/dist/{interactive-3VTDK5NX.js.map → interactive-BD56NB23.js.map} +0 -0
|
@@ -6,6 +6,7 @@ import {
|
|
|
6
6
|
buildTimingArtifact,
|
|
7
7
|
detectFileType,
|
|
8
8
|
findRepoRoot,
|
|
9
|
+
loadRunCache,
|
|
9
10
|
package_default,
|
|
10
11
|
parseJsonlResults,
|
|
11
12
|
resolveEvalPaths,
|
|
@@ -16,7 +17,7 @@ import {
|
|
|
16
17
|
validateEvalFile,
|
|
17
18
|
validateFileReferences,
|
|
18
19
|
validateTargetsFile
|
|
19
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-JGMJL2LV.js";
|
|
20
21
|
import {
|
|
21
22
|
createBuiltinRegistry,
|
|
22
23
|
createProvider,
|
|
@@ -34,7 +35,7 @@ import {
|
|
|
34
35
|
toSnakeCaseDeep as toSnakeCaseDeep2,
|
|
35
36
|
transpileEvalYamlFile,
|
|
36
37
|
trimBaselineResult
|
|
37
|
-
} from "./chunk-
|
|
38
|
+
} from "./chunk-OIVGGWJ3.js";
|
|
38
39
|
import {
|
|
39
40
|
__commonJS,
|
|
40
41
|
__esm,
|
|
@@ -4186,7 +4187,7 @@ var evalRunCommand = command({
|
|
|
4186
4187
|
},
|
|
4187
4188
|
handler: async (args) => {
|
|
4188
4189
|
if (args.evalPaths.length === 0 && process.stdin.isTTY) {
|
|
4189
|
-
const { launchInteractiveWizard } = await import("./interactive-
|
|
4190
|
+
const { launchInteractiveWizard } = await import("./interactive-BD56NB23.js");
|
|
4190
4191
|
await launchInteractiveWizard();
|
|
4191
4192
|
return;
|
|
4192
4193
|
}
|
|
@@ -4433,6 +4434,12 @@ import { fileURLToPath } from "node:url";
|
|
|
4433
4434
|
function getAgentvTemplates() {
|
|
4434
4435
|
return getTemplatesFromDir(".agentv");
|
|
4435
4436
|
}
|
|
4437
|
+
function getEnvExampleTemplate() {
|
|
4438
|
+
const currentDir = path5.dirname(fileURLToPath(import.meta.url));
|
|
4439
|
+
const templatesBase = currentDir.includes(`${path5.sep}dist`) ? path5.join(currentDir, "templates") : currentDir;
|
|
4440
|
+
const content = readFileSync4(path5.join(templatesBase, ".env.example"), "utf-8");
|
|
4441
|
+
return { path: ".env.example", content };
|
|
4442
|
+
}
|
|
4436
4443
|
function getTemplatesFromDir(subdir) {
|
|
4437
4444
|
const currentDir = path5.dirname(fileURLToPath(import.meta.url));
|
|
4438
4445
|
let templatesDir;
|
|
@@ -4486,9 +4493,8 @@ async function promptYesNo(message) {
|
|
|
4486
4493
|
async function initCommand(options = {}) {
|
|
4487
4494
|
const targetPath = path6.resolve(options.targetPath ?? ".");
|
|
4488
4495
|
const agentvDir = path6.join(targetPath, ".agentv");
|
|
4489
|
-
const
|
|
4490
|
-
const envTemplate =
|
|
4491
|
-
const otherAgentvTemplates = agentvTemplates.filter((t) => t.path !== ".env.example");
|
|
4496
|
+
const otherAgentvTemplates = getAgentvTemplates();
|
|
4497
|
+
const envTemplate = getEnvExampleTemplate();
|
|
4492
4498
|
const existingFiles = [];
|
|
4493
4499
|
if (envTemplate) {
|
|
4494
4500
|
const envFilePath = path6.join(targetPath, ".env.example");
|
|
@@ -4572,7 +4578,7 @@ var initCmdTsCommand = command({
|
|
|
4572
4578
|
});
|
|
4573
4579
|
|
|
4574
4580
|
// src/commands/results/export.ts
|
|
4575
|
-
import { mkdirSync as mkdirSync2, readFileSync as readFileSync6, writeFileSync as writeFileSync3 } from "node:fs";
|
|
4581
|
+
import { existsSync as existsSync2, mkdirSync as mkdirSync2, readFileSync as readFileSync6, writeFileSync as writeFileSync3 } from "node:fs";
|
|
4576
4582
|
import path8 from "node:path";
|
|
4577
4583
|
|
|
4578
4584
|
// src/commands/trace/utils.ts
|
|
@@ -4753,13 +4759,18 @@ var resultsExportCommand = command({
|
|
|
4753
4759
|
if (source) {
|
|
4754
4760
|
sourceFile = path8.isAbsolute(source) ? source : path8.resolve(cwd, source);
|
|
4755
4761
|
} else {
|
|
4756
|
-
const
|
|
4757
|
-
if (
|
|
4758
|
-
|
|
4759
|
-
|
|
4760
|
-
|
|
4762
|
+
const cache = await loadRunCache(cwd);
|
|
4763
|
+
if (cache && existsSync2(cache.lastResultFile)) {
|
|
4764
|
+
sourceFile = cache.lastResultFile;
|
|
4765
|
+
} else {
|
|
4766
|
+
const metas = listResultFiles(cwd, 1);
|
|
4767
|
+
if (metas.length === 0) {
|
|
4768
|
+
console.error("Error: No result files found in .agentv/results/");
|
|
4769
|
+
console.error("Run an evaluation first: agentv eval <eval-file>");
|
|
4770
|
+
process.exit(1);
|
|
4771
|
+
}
|
|
4772
|
+
sourceFile = metas[0].path;
|
|
4761
4773
|
}
|
|
4762
|
-
sourceFile = metas[0].path;
|
|
4763
4774
|
}
|
|
4764
4775
|
const content = readFileSync6(sourceFile, "utf8");
|
|
4765
4776
|
const outputDir = out ? path8.isAbsolute(out) ? out : path8.resolve(cwd, out) : deriveOutputDir(cwd, sourceFile);
|
|
@@ -5939,7 +5950,7 @@ var validateCommand = command({
|
|
|
5939
5950
|
});
|
|
5940
5951
|
|
|
5941
5952
|
// src/commands/workspace/clean.ts
|
|
5942
|
-
import { existsSync as
|
|
5953
|
+
import { existsSync as existsSync3 } from "node:fs";
|
|
5943
5954
|
import { readFile as readFile2, readdir as readdir2, rm } from "node:fs/promises";
|
|
5944
5955
|
import path11 from "node:path";
|
|
5945
5956
|
async function confirm(message) {
|
|
@@ -5968,7 +5979,7 @@ var cleanCommand = command({
|
|
|
5968
5979
|
},
|
|
5969
5980
|
handler: async ({ repo, force }) => {
|
|
5970
5981
|
const poolRoot = getWorkspacePoolRoot();
|
|
5971
|
-
if (!
|
|
5982
|
+
if (!existsSync3(poolRoot)) {
|
|
5972
5983
|
console.log("No workspace pool entries found.");
|
|
5973
5984
|
return;
|
|
5974
5985
|
}
|
|
@@ -6027,7 +6038,7 @@ var cleanCommand = command({
|
|
|
6027
6038
|
});
|
|
6028
6039
|
|
|
6029
6040
|
// src/commands/workspace/list.ts
|
|
6030
|
-
import { existsSync as
|
|
6041
|
+
import { existsSync as existsSync4 } from "node:fs";
|
|
6031
6042
|
import { readFile as readFile3, readdir as readdir3, stat as stat2 } from "node:fs/promises";
|
|
6032
6043
|
import path12 from "node:path";
|
|
6033
6044
|
async function getDirectorySize(dirPath) {
|
|
@@ -6059,7 +6070,7 @@ var listCommand = command({
|
|
|
6059
6070
|
args: {},
|
|
6060
6071
|
handler: async () => {
|
|
6061
6072
|
const poolRoot = getWorkspacePoolRoot();
|
|
6062
|
-
if (!
|
|
6073
|
+
if (!existsSync4(poolRoot)) {
|
|
6063
6074
|
console.log("No workspace pool entries found.");
|
|
6064
6075
|
return;
|
|
6065
6076
|
}
|
|
@@ -6276,4 +6287,4 @@ export {
|
|
|
6276
6287
|
preprocessArgv,
|
|
6277
6288
|
runCli
|
|
6278
6289
|
};
|
|
6279
|
-
//# sourceMappingURL=chunk-
|
|
6290
|
+
//# sourceMappingURL=chunk-6ZAFWUBT.js.map
|