@agentv/core 4.31.4-next.1 → 4.32.0-next.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-575K7WRM.js → chunk-N5EU446L.js} +70 -66
- package/dist/chunk-N5EU446L.js.map +1 -0
- package/dist/index.cjs +146 -140
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +21 -9
- package/dist/index.d.ts +21 -9
- package/dist/index.js +5 -3
- package/dist/index.js.map +1 -1
- package/dist/{ts-eval-loader-FRQF6KHR.js → ts-eval-loader-Z6IUSDNA.js} +2 -2
- package/package.json +1 -1
- package/dist/chunk-575K7WRM.js.map +0 -1
- /package/dist/{ts-eval-loader-FRQF6KHR.js.map → ts-eval-loader-Z6IUSDNA.js.map} +0 -0
|
@@ -280,32 +280,31 @@ function validateConcurrency(concurrency) {
|
|
|
280
280
|
// src/paths.ts
|
|
281
281
|
import os from "node:os";
|
|
282
282
|
import path from "node:path";
|
|
283
|
-
|
|
283
|
+
function readEnvPath(name) {
|
|
284
|
+
const value = process.env[name];
|
|
285
|
+
if (!value || value === "undefined") return void 0;
|
|
286
|
+
return value;
|
|
287
|
+
}
|
|
284
288
|
function getAgentvConfigDir() {
|
|
285
|
-
return path.join(os.homedir(), ".agentv");
|
|
289
|
+
return readEnvPath("AGENTV_HOME") ?? path.join(os.homedir(), ".agentv");
|
|
286
290
|
}
|
|
287
291
|
function getAgentvHome() {
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
console.log(`Using AGENTV_HOME: ${envHome}`);
|
|
293
|
-
}
|
|
294
|
-
return envHome;
|
|
295
|
-
}
|
|
296
|
-
return path.join(os.homedir(), ".agentv");
|
|
292
|
+
return getAgentvConfigDir();
|
|
293
|
+
}
|
|
294
|
+
function getAgentvDataDir() {
|
|
295
|
+
return readEnvPath("AGENTV_DATA_DIR") ?? getAgentvConfigDir();
|
|
297
296
|
}
|
|
298
297
|
function getWorkspacesRoot() {
|
|
299
|
-
return path.join(
|
|
298
|
+
return path.join(getAgentvDataDir(), "workspaces");
|
|
300
299
|
}
|
|
301
300
|
function getSubagentsRoot() {
|
|
302
|
-
return path.join(
|
|
301
|
+
return path.join(getAgentvDataDir(), "subagents");
|
|
303
302
|
}
|
|
304
303
|
function getTraceStateRoot() {
|
|
305
|
-
return path.join(
|
|
304
|
+
return path.join(getAgentvDataDir(), "trace-state");
|
|
306
305
|
}
|
|
307
306
|
function getWorkspacePoolRoot() {
|
|
308
|
-
return path.join(
|
|
307
|
+
return path.join(getAgentvDataDir(), "workspace-pool");
|
|
309
308
|
}
|
|
310
309
|
|
|
311
310
|
// src/evaluation/graders/code-grader.ts
|
|
@@ -8943,7 +8942,7 @@ async function promptInstall() {
|
|
|
8943
8942
|
}
|
|
8944
8943
|
}
|
|
8945
8944
|
function findManagedSdkInstallRoot() {
|
|
8946
|
-
return path16.join(
|
|
8945
|
+
return path16.join(getAgentvDataDir(), "deps", "pi-sdk");
|
|
8947
8946
|
}
|
|
8948
8947
|
function resolveGlobalNpmRoot() {
|
|
8949
8948
|
try {
|
|
@@ -12685,48 +12684,52 @@ async function loadConfig(evalFilePath, repoRoot) {
|
|
|
12685
12684
|
if (!await fileExists3(configPath)) {
|
|
12686
12685
|
continue;
|
|
12687
12686
|
}
|
|
12688
|
-
|
|
12689
|
-
|
|
12690
|
-
|
|
12691
|
-
|
|
12692
|
-
|
|
12693
|
-
|
|
12694
|
-
|
|
12695
|
-
|
|
12696
|
-
|
|
12697
|
-
|
|
12698
|
-
|
|
12699
|
-
|
|
12700
|
-
|
|
12701
|
-
|
|
12702
|
-
|
|
12703
|
-
|
|
12704
|
-
|
|
12705
|
-
}
|
|
12706
|
-
|
|
12707
|
-
|
|
12708
|
-
|
|
12709
|
-
|
|
12710
|
-
|
|
12711
|
-
|
|
12712
|
-
|
|
12713
|
-
|
|
12714
|
-
|
|
12715
|
-
|
|
12716
|
-
|
|
12717
|
-
|
|
12718
|
-
|
|
12719
|
-
|
|
12720
|
-
|
|
12721
|
-
|
|
12722
|
-
|
|
12723
|
-
|
|
12724
|
-
|
|
12725
|
-
|
|
12726
|
-
|
|
12727
|
-
|
|
12687
|
+
const config = await readConfigFile(configPath);
|
|
12688
|
+
if (config) return config;
|
|
12689
|
+
}
|
|
12690
|
+
const globalConfigPath = path39.join(getAgentvConfigDir(), "config.yaml");
|
|
12691
|
+
return await fileExists3(globalConfigPath) ? readConfigFile(globalConfigPath) : null;
|
|
12692
|
+
}
|
|
12693
|
+
async function readConfigFile(configPath) {
|
|
12694
|
+
try {
|
|
12695
|
+
const rawConfig = await readFile10(configPath, "utf8");
|
|
12696
|
+
const parsed = interpolateEnv(parseYamlValue(rawConfig), process.env);
|
|
12697
|
+
if (!isJsonObject(parsed)) {
|
|
12698
|
+
logWarning(`Invalid config.yaml format at ${configPath}`);
|
|
12699
|
+
return null;
|
|
12700
|
+
}
|
|
12701
|
+
const config = parsed;
|
|
12702
|
+
const requiredVersion = parsed.required_version;
|
|
12703
|
+
if (requiredVersion !== void 0 && typeof requiredVersion !== "string") {
|
|
12704
|
+
logWarning(`Invalid required_version in ${configPath}, expected string`);
|
|
12705
|
+
return null;
|
|
12706
|
+
}
|
|
12707
|
+
const evalPatterns = config.eval_patterns;
|
|
12708
|
+
if (evalPatterns !== void 0 && !Array.isArray(evalPatterns)) {
|
|
12709
|
+
logWarning(`Invalid eval_patterns in ${configPath}, expected array`);
|
|
12710
|
+
return null;
|
|
12711
|
+
}
|
|
12712
|
+
if (Array.isArray(evalPatterns) && !evalPatterns.every((p) => typeof p === "string")) {
|
|
12713
|
+
logWarning(`Invalid eval_patterns in ${configPath}, all entries must be strings`);
|
|
12714
|
+
return null;
|
|
12715
|
+
}
|
|
12716
|
+
const executionDefaults = parseExecutionDefaults(
|
|
12717
|
+
parsed.execution,
|
|
12718
|
+
configPath
|
|
12719
|
+
);
|
|
12720
|
+
const results = parseResultsConfig(parsed.results, configPath);
|
|
12721
|
+
const hooks = parseHooksConfig(parsed.hooks, configPath);
|
|
12722
|
+
return {
|
|
12723
|
+
required_version: requiredVersion,
|
|
12724
|
+
eval_patterns: evalPatterns,
|
|
12725
|
+
execution: executionDefaults,
|
|
12726
|
+
results,
|
|
12727
|
+
...hooks && { hooks }
|
|
12728
|
+
};
|
|
12729
|
+
} catch (error) {
|
|
12730
|
+
logWarning(`Could not read config.yaml at ${configPath}: ${error.message}`);
|
|
12731
|
+
return null;
|
|
12728
12732
|
}
|
|
12729
|
-
return null;
|
|
12730
12733
|
}
|
|
12731
12734
|
function extractTargetFromSuite(suite) {
|
|
12732
12735
|
const execution = suite.execution;
|
|
@@ -15759,7 +15762,7 @@ async function loadTestSuite(evalFilePath, repoRoot, options) {
|
|
|
15759
15762
|
return { tests: await loadTestsFromAgentSkills(evalFilePath) };
|
|
15760
15763
|
}
|
|
15761
15764
|
if (format === "typescript") {
|
|
15762
|
-
const { loadTsEvalSuite: loadTsEvalSuite2 } = await import("./ts-eval-loader-
|
|
15765
|
+
const { loadTsEvalSuite: loadTsEvalSuite2 } = await import("./ts-eval-loader-Z6IUSDNA.js");
|
|
15763
15766
|
return loadTsEvalSuite2(evalFilePath, resolveToAbsolutePath(repoRoot), options);
|
|
15764
15767
|
}
|
|
15765
15768
|
const { tests, parsed, suiteWorkspacePath } = await loadTestsFromYaml(
|
|
@@ -15794,7 +15797,7 @@ async function loadTests(evalFilePath, repoRoot, options) {
|
|
|
15794
15797
|
return loadTestsFromAgentSkills(evalFilePath);
|
|
15795
15798
|
}
|
|
15796
15799
|
if (format === "typescript") {
|
|
15797
|
-
const { loadTsEvalSuite: loadTsEvalSuite2 } = await import("./ts-eval-loader-
|
|
15800
|
+
const { loadTsEvalSuite: loadTsEvalSuite2 } = await import("./ts-eval-loader-Z6IUSDNA.js");
|
|
15798
15801
|
const suite = await loadTsEvalSuite2(evalFilePath, resolveToAbsolutePath(repoRoot), options);
|
|
15799
15802
|
return suite.tests;
|
|
15800
15803
|
}
|
|
@@ -19548,6 +19551,13 @@ export {
|
|
|
19548
19551
|
mergeExecutionMetrics,
|
|
19549
19552
|
isAgentSkillsFormat,
|
|
19550
19553
|
parseAgentSkillsEvals,
|
|
19554
|
+
getAgentvConfigDir,
|
|
19555
|
+
getAgentvHome,
|
|
19556
|
+
getAgentvDataDir,
|
|
19557
|
+
getWorkspacesRoot,
|
|
19558
|
+
getSubagentsRoot,
|
|
19559
|
+
getTraceStateRoot,
|
|
19560
|
+
getWorkspacePoolRoot,
|
|
19551
19561
|
DEFAULT_EVAL_PATTERNS,
|
|
19552
19562
|
loadConfig,
|
|
19553
19563
|
extractTargetFromSuite,
|
|
@@ -19574,12 +19584,6 @@ export {
|
|
|
19574
19584
|
parseJsonSafe,
|
|
19575
19585
|
deepEqual,
|
|
19576
19586
|
negateScore,
|
|
19577
|
-
getAgentvConfigDir,
|
|
19578
|
-
getAgentvHome,
|
|
19579
|
-
getWorkspacesRoot,
|
|
19580
|
-
getSubagentsRoot,
|
|
19581
|
-
getTraceStateRoot,
|
|
19582
|
-
getWorkspacePoolRoot,
|
|
19583
19587
|
toSnakeCaseDeep,
|
|
19584
19588
|
toCamelCaseDeep,
|
|
19585
19589
|
CodeGrader,
|
|
@@ -19672,4 +19676,4 @@ export {
|
|
|
19672
19676
|
loadTestById,
|
|
19673
19677
|
loadEvalCaseById
|
|
19674
19678
|
};
|
|
19675
|
-
//# sourceMappingURL=chunk-
|
|
19679
|
+
//# sourceMappingURL=chunk-N5EU446L.js.map
|