@agentv/core 4.21.0 → 4.22.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-WCW3V6QJ.js → chunk-B3BLJRYI.js} +26 -4
- package/dist/chunk-B3BLJRYI.js.map +1 -0
- package/dist/index.cjs +96 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +107 -1
- package/dist/index.d.ts +107 -1
- package/dist/index.js +72 -1
- package/dist/index.js.map +1 -1
- package/dist/{ts-eval-loader-HPIPE72C.js → ts-eval-loader-PA4YFM5D.js} +2 -2
- package/package.json +1 -1
- package/dist/chunk-WCW3V6QJ.js.map +0 -1
- /package/dist/{ts-eval-loader-HPIPE72C.js.map → ts-eval-loader-PA4YFM5D.js.map} +0 -0
|
@@ -13097,11 +13097,13 @@ async function loadConfig(evalFilePath, repoRoot) {
|
|
|
13097
13097
|
configPath
|
|
13098
13098
|
);
|
|
13099
13099
|
const results = parseResultsConfig(parsed.results, configPath);
|
|
13100
|
+
const hooks = parseHooksConfig(parsed.hooks, configPath);
|
|
13100
13101
|
return {
|
|
13101
13102
|
required_version: requiredVersion,
|
|
13102
13103
|
eval_patterns: evalPatterns,
|
|
13103
13104
|
execution: executionDefaults,
|
|
13104
|
-
results
|
|
13105
|
+
results,
|
|
13106
|
+
...hooks && { hooks }
|
|
13105
13107
|
};
|
|
13106
13108
|
} catch (error) {
|
|
13107
13109
|
logWarning(
|
|
@@ -13453,6 +13455,25 @@ function parseResultsExportConfig(raw, configPath) {
|
|
|
13453
13455
|
...branchPrefix && { branch_prefix: branchPrefix }
|
|
13454
13456
|
};
|
|
13455
13457
|
}
|
|
13458
|
+
function parseHooksConfig(raw, configPath) {
|
|
13459
|
+
if (raw === void 0 || raw === null) {
|
|
13460
|
+
return void 0;
|
|
13461
|
+
}
|
|
13462
|
+
if (typeof raw !== "object" || Array.isArray(raw)) {
|
|
13463
|
+
logWarning(`Invalid hooks in ${configPath}, expected object`);
|
|
13464
|
+
return void 0;
|
|
13465
|
+
}
|
|
13466
|
+
const obj = raw;
|
|
13467
|
+
const beforeSession = obj.before_session;
|
|
13468
|
+
if (beforeSession !== void 0) {
|
|
13469
|
+
if (typeof beforeSession !== "string" || beforeSession.trim().length === 0) {
|
|
13470
|
+
logWarning(`Invalid hooks.before_session in ${configPath}, expected non-empty string`);
|
|
13471
|
+
return void 0;
|
|
13472
|
+
}
|
|
13473
|
+
return { before_session: beforeSession.trim() };
|
|
13474
|
+
}
|
|
13475
|
+
return void 0;
|
|
13476
|
+
}
|
|
13456
13477
|
function logWarning(message) {
|
|
13457
13478
|
console.warn(`${ANSI_YELLOW2}Warning: ${message}${ANSI_RESET3}`);
|
|
13458
13479
|
}
|
|
@@ -16091,7 +16112,7 @@ async function loadTestSuite(evalFilePath, repoRoot, options) {
|
|
|
16091
16112
|
return { tests: await loadTestsFromAgentSkills(evalFilePath) };
|
|
16092
16113
|
}
|
|
16093
16114
|
if (format === "typescript") {
|
|
16094
|
-
const { loadTsEvalSuite: loadTsEvalSuite2 } = await import("./ts-eval-loader-
|
|
16115
|
+
const { loadTsEvalSuite: loadTsEvalSuite2 } = await import("./ts-eval-loader-PA4YFM5D.js");
|
|
16095
16116
|
return loadTsEvalSuite2(evalFilePath, resolveToAbsolutePath(repoRoot), options);
|
|
16096
16117
|
}
|
|
16097
16118
|
const { tests, parsed, suiteWorkspacePath } = await loadTestsFromYaml(
|
|
@@ -16126,7 +16147,7 @@ async function loadTests(evalFilePath, repoRoot, options) {
|
|
|
16126
16147
|
return loadTestsFromAgentSkills(evalFilePath);
|
|
16127
16148
|
}
|
|
16128
16149
|
if (format === "typescript") {
|
|
16129
|
-
const { loadTsEvalSuite: loadTsEvalSuite2 } = await import("./ts-eval-loader-
|
|
16150
|
+
const { loadTsEvalSuite: loadTsEvalSuite2 } = await import("./ts-eval-loader-PA4YFM5D.js");
|
|
16130
16151
|
const suite = await loadTsEvalSuite2(evalFilePath, resolveToAbsolutePath(repoRoot), options);
|
|
16131
16152
|
return suite.tests;
|
|
16132
16153
|
}
|
|
@@ -19806,6 +19827,7 @@ export {
|
|
|
19806
19827
|
DEFAULT_GRADER_TEMPLATE,
|
|
19807
19828
|
freeformEvaluationSchema,
|
|
19808
19829
|
rubricEvaluationSchema,
|
|
19830
|
+
scoreRangeEvaluationSchema,
|
|
19809
19831
|
LlmGrader,
|
|
19810
19832
|
buildOutputSchema,
|
|
19811
19833
|
buildRubricOutputSchema,
|
|
@@ -19887,4 +19909,4 @@ export {
|
|
|
19887
19909
|
loadTestById,
|
|
19888
19910
|
loadEvalCaseById
|
|
19889
19911
|
};
|
|
19890
|
-
//# sourceMappingURL=chunk-
|
|
19912
|
+
//# sourceMappingURL=chunk-B3BLJRYI.js.map
|