@agentv/core 4.30.0-next.1 → 4.31.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-Z2BBOGE4.js → chunk-QY6BS2V4.js} +10 -27
- package/dist/{chunk-Z2BBOGE4.js.map → chunk-QY6BS2V4.js.map} +1 -1
- package/dist/evaluation/validation/index.cjs +32 -44
- package/dist/evaluation/validation/index.cjs.map +1 -1
- package/dist/evaluation/validation/index.js +32 -44
- package/dist/evaluation/validation/index.js.map +1 -1
- package/dist/index.cjs +18 -35
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +12 -14
- package/dist/index.d.ts +12 -14
- package/dist/index.js +11 -11
- package/dist/index.js.map +1 -1
- package/dist/{ts-eval-loader-JL5DGTJL.js → ts-eval-loader-TWWSN6OX.js} +2 -2
- package/package.json +1 -1
- /package/dist/{ts-eval-loader-JL5DGTJL.js.map → ts-eval-loader-TWWSN6OX.js.map} +0 -0
package/dist/index.cjs
CHANGED
|
@@ -1177,48 +1177,31 @@ function parseResultsConfig(raw, configPath) {
|
|
|
1177
1177
|
return void 0;
|
|
1178
1178
|
}
|
|
1179
1179
|
const obj = raw;
|
|
1180
|
-
const exportConfig = parseResultsExportConfig(obj.export, configPath);
|
|
1181
|
-
if (!exportConfig) {
|
|
1182
|
-
return void 0;
|
|
1183
|
-
}
|
|
1184
|
-
return { export: exportConfig };
|
|
1185
|
-
}
|
|
1186
|
-
function parseResultsExportConfig(raw, configPath) {
|
|
1187
|
-
if (raw === void 0 || raw === null) {
|
|
1188
|
-
return void 0;
|
|
1189
|
-
}
|
|
1190
|
-
if (typeof raw !== "object" || Array.isArray(raw)) {
|
|
1191
|
-
logWarning(`Invalid results.export in ${configPath}, expected object`);
|
|
1192
|
-
return void 0;
|
|
1193
|
-
}
|
|
1194
|
-
const obj = raw;
|
|
1195
1180
|
const repo = typeof obj.repo === "string" ? obj.repo.trim() : "";
|
|
1196
|
-
const
|
|
1181
|
+
const resultsPath = typeof obj.path === "string" ? obj.path.trim() : "";
|
|
1197
1182
|
if (!repo) {
|
|
1198
|
-
logWarning(`Invalid results.
|
|
1183
|
+
logWarning(`Invalid results.repo in ${configPath}, expected non-empty string`);
|
|
1199
1184
|
return void 0;
|
|
1200
1185
|
}
|
|
1201
|
-
if (!
|
|
1202
|
-
logWarning(`Invalid results.
|
|
1186
|
+
if (!resultsPath) {
|
|
1187
|
+
logWarning(`Invalid results.path in ${configPath}, expected non-empty string`);
|
|
1203
1188
|
return void 0;
|
|
1204
1189
|
}
|
|
1205
1190
|
if (obj.auto_push !== void 0 && typeof obj.auto_push !== "boolean") {
|
|
1206
|
-
logWarning(`Invalid results.
|
|
1191
|
+
logWarning(`Invalid results.auto_push in ${configPath}, expected boolean`);
|
|
1207
1192
|
return void 0;
|
|
1208
1193
|
}
|
|
1209
1194
|
let branchPrefix;
|
|
1210
1195
|
if (obj.branch_prefix !== void 0) {
|
|
1211
1196
|
if (typeof obj.branch_prefix !== "string" || obj.branch_prefix.trim().length === 0) {
|
|
1212
|
-
logWarning(
|
|
1213
|
-
`Invalid results.export.branch_prefix in ${configPath}, expected non-empty string`
|
|
1214
|
-
);
|
|
1197
|
+
logWarning(`Invalid results.branch_prefix in ${configPath}, expected non-empty string`);
|
|
1215
1198
|
return void 0;
|
|
1216
1199
|
}
|
|
1217
1200
|
branchPrefix = obj.branch_prefix.trim();
|
|
1218
1201
|
}
|
|
1219
1202
|
return {
|
|
1220
1203
|
repo,
|
|
1221
|
-
path:
|
|
1204
|
+
path: resultsPath,
|
|
1222
1205
|
...typeof obj.auto_push === "boolean" && { auto_push: obj.auto_push },
|
|
1223
1206
|
...branchPrefix && { branch_prefix: branchPrefix }
|
|
1224
1207
|
};
|
|
@@ -24865,7 +24848,7 @@ __export(index_exports, {
|
|
|
24865
24848
|
mergeExecutionMetrics: () => mergeExecutionMetrics,
|
|
24866
24849
|
negateScore: () => negateScore,
|
|
24867
24850
|
normalizeLineEndings: () => normalizeLineEndings,
|
|
24868
|
-
|
|
24851
|
+
normalizeResultsConfig: () => normalizeResultsConfig,
|
|
24869
24852
|
parseAgentSkillsEvals: () => parseAgentSkillsEvals,
|
|
24870
24853
|
parseClaudeSession: () => parseClaudeSession,
|
|
24871
24854
|
parseCodexSession: () => parseCodexSession,
|
|
@@ -25554,7 +25537,7 @@ function withFriendlyGitHubAuthError(error) {
|
|
|
25554
25537
|
}
|
|
25555
25538
|
return new Error(message);
|
|
25556
25539
|
}
|
|
25557
|
-
function
|
|
25540
|
+
function normalizeResultsConfig(config) {
|
|
25558
25541
|
return {
|
|
25559
25542
|
repo: config.repo.trim(),
|
|
25560
25543
|
path: config.path.trim().replace(/^\/+|\/+$/g, ""),
|
|
@@ -25648,7 +25631,7 @@ function updateStatusFile(config, patch) {
|
|
|
25648
25631
|
});
|
|
25649
25632
|
}
|
|
25650
25633
|
async function ensureResultsRepoClone(config) {
|
|
25651
|
-
const normalized =
|
|
25634
|
+
const normalized = normalizeResultsConfig(config);
|
|
25652
25635
|
const cachePaths = getResultsRepoCachePaths(normalized.repo);
|
|
25653
25636
|
(0, import_node_fs19.mkdirSync)(cachePaths.rootDir, { recursive: true });
|
|
25654
25637
|
if (!(0, import_node_fs19.existsSync)(cachePaths.repoDir)) {
|
|
@@ -25679,7 +25662,7 @@ function getResultsRepoStatus(config) {
|
|
|
25679
25662
|
cache_dir: ""
|
|
25680
25663
|
};
|
|
25681
25664
|
}
|
|
25682
|
-
const normalized =
|
|
25665
|
+
const normalized = normalizeResultsConfig(config);
|
|
25683
25666
|
const cachePaths = getResultsRepoCachePaths(normalized.repo);
|
|
25684
25667
|
const persisted = readPersistedStatus(cachePaths.statusFile);
|
|
25685
25668
|
return {
|
|
@@ -25695,7 +25678,7 @@ function getResultsRepoStatus(config) {
|
|
|
25695
25678
|
};
|
|
25696
25679
|
}
|
|
25697
25680
|
async function syncResultsRepo(config) {
|
|
25698
|
-
const normalized =
|
|
25681
|
+
const normalized = normalizeResultsConfig(config);
|
|
25699
25682
|
try {
|
|
25700
25683
|
const repoDir = await ensureResultsRepoClone(normalized);
|
|
25701
25684
|
const baseBranch = await resolveDefaultBranch(repoDir);
|
|
@@ -25713,7 +25696,7 @@ async function syncResultsRepo(config) {
|
|
|
25713
25696
|
return getResultsRepoStatus(normalized);
|
|
25714
25697
|
}
|
|
25715
25698
|
async function checkoutResultsRepoBranch(config, branchName) {
|
|
25716
|
-
const normalized =
|
|
25699
|
+
const normalized = normalizeResultsConfig(config);
|
|
25717
25700
|
const repoDir = await ensureResultsRepoClone(normalized);
|
|
25718
25701
|
const baseBranch = await resolveDefaultBranch(repoDir);
|
|
25719
25702
|
await updateCacheRepo(repoDir, baseBranch);
|
|
@@ -25726,7 +25709,7 @@ async function checkoutResultsRepoBranch(config, branchName) {
|
|
|
25726
25709
|
};
|
|
25727
25710
|
}
|
|
25728
25711
|
async function prepareResultsRepoBranch(config, branchName) {
|
|
25729
|
-
const normalized =
|
|
25712
|
+
const normalized = normalizeResultsConfig(config);
|
|
25730
25713
|
const cloneDir = await ensureResultsRepoClone(normalized);
|
|
25731
25714
|
const baseBranch = await resolveDefaultBranch(cloneDir);
|
|
25732
25715
|
await updateCacheRepo(cloneDir, baseBranch);
|
|
@@ -25754,7 +25737,7 @@ async function stageResultsArtifacts(params) {
|
|
|
25754
25737
|
await (0, import_promises39.cp)(params.sourceDir, params.destinationDir, { recursive: true });
|
|
25755
25738
|
}
|
|
25756
25739
|
function resolveResultsRepoRunsDir(config) {
|
|
25757
|
-
const normalized =
|
|
25740
|
+
const normalized = normalizeResultsConfig(config);
|
|
25758
25741
|
return import_node_path54.default.join(
|
|
25759
25742
|
getResultsRepoCachePaths(normalized.repo).repoDir,
|
|
25760
25743
|
...normalized.path.split("/")
|
|
@@ -25785,7 +25768,7 @@ async function commitAndPushResultsBranch(params) {
|
|
|
25785
25768
|
return true;
|
|
25786
25769
|
}
|
|
25787
25770
|
async function pushResultsRepoBranch(config, branchName, cwd) {
|
|
25788
|
-
const normalized =
|
|
25771
|
+
const normalized = normalizeResultsConfig(config);
|
|
25789
25772
|
await runGit(["push", "-u", "origin", branchName], {
|
|
25790
25773
|
cwd: cwd ?? getResultsRepoCachePaths(normalized.repo).repoDir
|
|
25791
25774
|
});
|
|
@@ -25817,7 +25800,7 @@ async function createDraftResultsPr(params) {
|
|
|
25817
25800
|
}
|
|
25818
25801
|
var DIRECT_PUSH_MAX_RETRIES = 3;
|
|
25819
25802
|
async function directPushResults(params) {
|
|
25820
|
-
const normalized =
|
|
25803
|
+
const normalized = normalizeResultsConfig(params.config);
|
|
25821
25804
|
const repoDir = await ensureResultsRepoClone(normalized);
|
|
25822
25805
|
const baseBranch = await resolveDefaultBranch(repoDir);
|
|
25823
25806
|
await updateCacheRepo(repoDir, baseBranch);
|
|
@@ -27528,7 +27511,7 @@ function createAgentKernel() {
|
|
|
27528
27511
|
mergeExecutionMetrics,
|
|
27529
27512
|
negateScore,
|
|
27530
27513
|
normalizeLineEndings,
|
|
27531
|
-
|
|
27514
|
+
normalizeResultsConfig,
|
|
27532
27515
|
parseAgentSkillsEvals,
|
|
27533
27516
|
parseClaudeSession,
|
|
27534
27517
|
parseCodexSession,
|