@agentv/core 3.13.1 → 3.13.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/index.cjs +21 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +9 -1
- package/dist/index.d.ts +9 -1
- package/dist/index.js +20 -1
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -1455,6 +1455,7 @@ __export(index_exports, {
|
|
|
1455
1455
|
extractTargetFromSuite: () => extractTargetFromSuite,
|
|
1456
1456
|
extractTargetsFromSuite: () => extractTargetsFromSuite,
|
|
1457
1457
|
extractTargetsFromTestCase: () => extractTargetsFromTestCase,
|
|
1458
|
+
extractThreshold: () => extractThreshold,
|
|
1458
1459
|
extractTrialsConfig: () => extractTrialsConfig,
|
|
1459
1460
|
extractWorkersFromSuite: () => extractWorkersFromSuite,
|
|
1460
1461
|
fileExists: () => fileExists2,
|
|
@@ -2320,6 +2321,22 @@ function extractFailOnError(suite) {
|
|
|
2320
2321
|
logWarning(`Invalid execution.fail_on_error: ${raw}. Must be true or false. Ignoring.`);
|
|
2321
2322
|
return void 0;
|
|
2322
2323
|
}
|
|
2324
|
+
function extractThreshold(suite) {
|
|
2325
|
+
const execution = suite.execution;
|
|
2326
|
+
if (!execution || typeof execution !== "object" || Array.isArray(execution)) {
|
|
2327
|
+
return void 0;
|
|
2328
|
+
}
|
|
2329
|
+
const executionObj = execution;
|
|
2330
|
+
const raw = executionObj.threshold;
|
|
2331
|
+
if (raw === void 0 || raw === null) {
|
|
2332
|
+
return void 0;
|
|
2333
|
+
}
|
|
2334
|
+
if (typeof raw === "number" && raw >= 0 && raw <= 1) {
|
|
2335
|
+
return raw;
|
|
2336
|
+
}
|
|
2337
|
+
logWarning(`Invalid execution.threshold: ${raw}. Must be a number between 0 and 1. Ignoring.`);
|
|
2338
|
+
return void 0;
|
|
2339
|
+
}
|
|
2323
2340
|
function parseExecutionDefaults(raw, configPath) {
|
|
2324
2341
|
if (!raw || typeof raw !== "object" || Array.isArray(raw)) {
|
|
2325
2342
|
return void 0;
|
|
@@ -4469,6 +4486,7 @@ async function loadTestSuite(evalFilePath, repoRoot, options) {
|
|
|
4469
4486
|
const { tests, parsed } = await loadTestsFromYaml(evalFilePath, repoRoot, options);
|
|
4470
4487
|
const metadata = parseMetadata(parsed);
|
|
4471
4488
|
const failOnError = extractFailOnError(parsed);
|
|
4489
|
+
const threshold = extractThreshold(parsed);
|
|
4472
4490
|
return {
|
|
4473
4491
|
tests,
|
|
4474
4492
|
trials: extractTrialsConfig(parsed),
|
|
@@ -4477,7 +4495,8 @@ async function loadTestSuite(evalFilePath, repoRoot, options) {
|
|
|
4477
4495
|
cacheConfig: extractCacheConfig(parsed),
|
|
4478
4496
|
totalBudgetUsd: extractTotalBudgetUsd(parsed),
|
|
4479
4497
|
...metadata !== void 0 && { metadata },
|
|
4480
|
-
...failOnError !== void 0 && { failOnError }
|
|
4498
|
+
...failOnError !== void 0 && { failOnError },
|
|
4499
|
+
...threshold !== void 0 && { threshold }
|
|
4481
4500
|
};
|
|
4482
4501
|
}
|
|
4483
4502
|
var loadEvalSuite = loadTestSuite;
|
|
@@ -20762,6 +20781,7 @@ function createAgentKernel() {
|
|
|
20762
20781
|
extractTargetFromSuite,
|
|
20763
20782
|
extractTargetsFromSuite,
|
|
20764
20783
|
extractTargetsFromTestCase,
|
|
20784
|
+
extractThreshold,
|
|
20765
20785
|
extractTrialsConfig,
|
|
20766
20786
|
extractWorkersFromSuite,
|
|
20767
20787
|
fileExists,
|