agentv 2.10.0 → 2.11.0
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/README.md +63 -0
- package/dist/{chunk-G3OTPFYX.js → chunk-CVC3VMZ3.js} +149 -14
- package/dist/chunk-CVC3VMZ3.js.map +1 -0
- package/dist/{chunk-RJWTL3VS.js → chunk-EXJWRKKL.js} +741 -176
- package/dist/chunk-EXJWRKKL.js.map +1 -0
- package/dist/{chunk-PC3FAOHT.js → chunk-GO7OTNQ4.js} +109 -9
- package/dist/chunk-GO7OTNQ4.js.map +1 -0
- package/dist/cli.js +3 -3
- package/dist/{dist-BGRU67HI.js → dist-NYXYDALF.js} +18 -2
- package/dist/index.js +3 -3
- package/dist/{interactive-7KFUCBIP.js → interactive-V4A3RRU3.js} +3 -3
- package/package.json +1 -1
- package/dist/chunk-G3OTPFYX.js.map +0 -1
- package/dist/chunk-PC3FAOHT.js.map +0 -1
- package/dist/chunk-RJWTL3VS.js.map +0 -1
- /package/dist/{dist-BGRU67HI.js.map → dist-NYXYDALF.js.map} +0 -0
- /package/dist/{interactive-7KFUCBIP.js.map → interactive-V4A3RRU3.js.map} +0 -0
|
@@ -21,9 +21,10 @@ import {
|
|
|
21
21
|
shouldEnableCache,
|
|
22
22
|
shouldSkipCacheForTemperature,
|
|
23
23
|
subscribeToCodexLogEntries,
|
|
24
|
+
subscribeToCopilotCliLogEntries,
|
|
24
25
|
subscribeToCopilotSdkLogEntries,
|
|
25
26
|
subscribeToPiLogEntries
|
|
26
|
-
} from "./chunk-
|
|
27
|
+
} from "./chunk-EXJWRKKL.js";
|
|
27
28
|
|
|
28
29
|
// src/commands/eval/shared.ts
|
|
29
30
|
import { constants } from "node:fs";
|
|
@@ -1063,7 +1064,20 @@ function inferFileTypeFromPath(filePath) {
|
|
|
1063
1064
|
}
|
|
1064
1065
|
return "eval";
|
|
1065
1066
|
}
|
|
1066
|
-
var
|
|
1067
|
+
var ASSERTION_TYPES_WITH_STRING_VALUE = /* @__PURE__ */ new Set([
|
|
1068
|
+
"contains",
|
|
1069
|
+
"icontains",
|
|
1070
|
+
"starts_with",
|
|
1071
|
+
"ends_with",
|
|
1072
|
+
"equals",
|
|
1073
|
+
"regex"
|
|
1074
|
+
]);
|
|
1075
|
+
var ASSERTION_TYPES_WITH_ARRAY_VALUE = /* @__PURE__ */ new Set([
|
|
1076
|
+
"contains_any",
|
|
1077
|
+
"contains_all",
|
|
1078
|
+
"icontains_any",
|
|
1079
|
+
"icontains_all"
|
|
1080
|
+
]);
|
|
1067
1081
|
var VALID_TEST_FILE_EXTENSIONS = /* @__PURE__ */ new Set([".yaml", ".yml", ".jsonl"]);
|
|
1068
1082
|
var NAME_PATTERN = /^[a-z0-9-]+$/;
|
|
1069
1083
|
function isObject(value) {
|
|
@@ -1246,6 +1260,9 @@ async function validateEvalFile(filePath) {
|
|
|
1246
1260
|
validateAssertArray(assertField, location, absolutePath, errors);
|
|
1247
1261
|
}
|
|
1248
1262
|
}
|
|
1263
|
+
if (isObject(parsed.workspace)) {
|
|
1264
|
+
validateWorkspaceRepoConfig(parsed.workspace, absolutePath, errors);
|
|
1265
|
+
}
|
|
1249
1266
|
return {
|
|
1250
1267
|
valid: errors.filter((e) => e.severity === "error").length === 0,
|
|
1251
1268
|
filePath: absolutePath,
|
|
@@ -1253,6 +1270,48 @@ async function validateEvalFile(filePath) {
|
|
|
1253
1270
|
errors
|
|
1254
1271
|
};
|
|
1255
1272
|
}
|
|
1273
|
+
function validateWorkspaceRepoConfig(workspace, filePath, errors) {
|
|
1274
|
+
const repos = workspace.repos;
|
|
1275
|
+
const reset = workspace.reset;
|
|
1276
|
+
const isolation = workspace.isolation;
|
|
1277
|
+
if (Array.isArray(repos)) {
|
|
1278
|
+
for (const repo of repos) {
|
|
1279
|
+
if (!isObject(repo)) continue;
|
|
1280
|
+
const checkout = repo.checkout;
|
|
1281
|
+
const clone = repo.clone;
|
|
1282
|
+
if (isObject(checkout) && isObject(clone)) {
|
|
1283
|
+
const ancestor = checkout.ancestor;
|
|
1284
|
+
const depth = clone.depth;
|
|
1285
|
+
if (typeof ancestor === "number" && typeof depth === "number" && depth < ancestor + 1) {
|
|
1286
|
+
errors.push({
|
|
1287
|
+
severity: "warning",
|
|
1288
|
+
filePath,
|
|
1289
|
+
location: `workspace.repos[path=${repo.path}]`,
|
|
1290
|
+
message: `clone.depth (${depth}) may be insufficient for checkout.ancestor (${ancestor}). Recommend depth >= ${ancestor + 1}.`
|
|
1291
|
+
});
|
|
1292
|
+
}
|
|
1293
|
+
}
|
|
1294
|
+
}
|
|
1295
|
+
}
|
|
1296
|
+
if (isObject(reset) && reset.strategy && reset.strategy !== "none") {
|
|
1297
|
+
if (!Array.isArray(repos) || repos.length === 0) {
|
|
1298
|
+
errors.push({
|
|
1299
|
+
severity: "warning",
|
|
1300
|
+
filePath,
|
|
1301
|
+
location: "workspace.reset",
|
|
1302
|
+
message: `reset.strategy '${reset.strategy}' has no effect without repos.`
|
|
1303
|
+
});
|
|
1304
|
+
}
|
|
1305
|
+
}
|
|
1306
|
+
if (isObject(reset) && reset.after_each === true && isolation === "per_test") {
|
|
1307
|
+
errors.push({
|
|
1308
|
+
severity: "warning",
|
|
1309
|
+
filePath,
|
|
1310
|
+
location: "workspace.reset",
|
|
1311
|
+
message: "reset.after_each is redundant with isolation: per_test (each test gets a fresh workspace)."
|
|
1312
|
+
});
|
|
1313
|
+
}
|
|
1314
|
+
}
|
|
1256
1315
|
function validateMessages(messages, location, filePath, errors) {
|
|
1257
1316
|
for (let i = 0; i < messages.length; i++) {
|
|
1258
1317
|
const message = messages[i];
|
|
@@ -1402,7 +1461,7 @@ function validateAssertArray(assertField, parentLocation, filePath, errors) {
|
|
|
1402
1461
|
});
|
|
1403
1462
|
continue;
|
|
1404
1463
|
}
|
|
1405
|
-
if (
|
|
1464
|
+
if (ASSERTION_TYPES_WITH_STRING_VALUE.has(typeValue)) {
|
|
1406
1465
|
const value = item.value;
|
|
1407
1466
|
if (value === void 0 || typeof value !== "string") {
|
|
1408
1467
|
errors.push({
|
|
@@ -1426,6 +1485,18 @@ function validateAssertArray(assertField, parentLocation, filePath, errors) {
|
|
|
1426
1485
|
}
|
|
1427
1486
|
}
|
|
1428
1487
|
}
|
|
1488
|
+
if (ASSERTION_TYPES_WITH_ARRAY_VALUE.has(typeValue)) {
|
|
1489
|
+
const value = item.value;
|
|
1490
|
+
if (!Array.isArray(value) || value.length === 0) {
|
|
1491
|
+
errors.push({
|
|
1492
|
+
severity: "warning",
|
|
1493
|
+
filePath,
|
|
1494
|
+
location: `${location}.value`,
|
|
1495
|
+
message: `Assertion type '${typeValue}' requires a 'value' field (non-empty string array).`
|
|
1496
|
+
});
|
|
1497
|
+
continue;
|
|
1498
|
+
}
|
|
1499
|
+
}
|
|
1429
1500
|
const required = item.required;
|
|
1430
1501
|
if (required !== void 0) {
|
|
1431
1502
|
validateRequiredField(required, location, filePath, errors);
|
|
@@ -1571,6 +1642,26 @@ var COPILOT_SDK_SETTINGS = /* @__PURE__ */ new Set([
|
|
|
1571
1642
|
"workspace_template",
|
|
1572
1643
|
"workspaceTemplate"
|
|
1573
1644
|
]);
|
|
1645
|
+
var COPILOT_CLI_SETTINGS = /* @__PURE__ */ new Set([
|
|
1646
|
+
...COMMON_SETTINGS,
|
|
1647
|
+
"executable",
|
|
1648
|
+
"command",
|
|
1649
|
+
"binary",
|
|
1650
|
+
"args",
|
|
1651
|
+
"arguments",
|
|
1652
|
+
"model",
|
|
1653
|
+
"cwd",
|
|
1654
|
+
"timeout_seconds",
|
|
1655
|
+
"timeoutSeconds",
|
|
1656
|
+
"log_dir",
|
|
1657
|
+
"logDir",
|
|
1658
|
+
"log_format",
|
|
1659
|
+
"logFormat",
|
|
1660
|
+
"system_prompt",
|
|
1661
|
+
"systemPrompt",
|
|
1662
|
+
"workspace_template",
|
|
1663
|
+
"workspaceTemplate"
|
|
1664
|
+
]);
|
|
1574
1665
|
var VSCODE_SETTINGS = /* @__PURE__ */ new Set([
|
|
1575
1666
|
...COMMON_SETTINGS,
|
|
1576
1667
|
"executable",
|
|
@@ -1631,11 +1722,12 @@ function getKnownSettings(provider) {
|
|
|
1631
1722
|
case "codex":
|
|
1632
1723
|
case "codex-cli":
|
|
1633
1724
|
return CODEX_SETTINGS;
|
|
1634
|
-
case "copilot":
|
|
1635
1725
|
case "copilot-sdk":
|
|
1636
1726
|
case "copilot_sdk":
|
|
1637
|
-
case "copilot-cli":
|
|
1638
1727
|
return COPILOT_SDK_SETTINGS;
|
|
1728
|
+
case "copilot":
|
|
1729
|
+
case "copilot-cli":
|
|
1730
|
+
return COPILOT_CLI_SETTINGS;
|
|
1639
1731
|
case "claude":
|
|
1640
1732
|
case "claude-code":
|
|
1641
1733
|
case "claude-sdk":
|
|
@@ -2686,7 +2778,7 @@ async function runEvalCommand(input) {
|
|
|
2686
2778
|
const useFileExport = !!(options.otelFile || options.traceFile);
|
|
2687
2779
|
if (options.exportOtel || useFileExport) {
|
|
2688
2780
|
try {
|
|
2689
|
-
const { OtelTraceExporter, OTEL_BACKEND_PRESETS } = await import("./dist-
|
|
2781
|
+
const { OtelTraceExporter, OTEL_BACKEND_PRESETS } = await import("./dist-NYXYDALF.js");
|
|
2690
2782
|
let endpoint = process.env.OTEL_EXPORTER_OTLP_ENDPOINT;
|
|
2691
2783
|
let headers = {};
|
|
2692
2784
|
if (options.otelBackend) {
|
|
@@ -2814,7 +2906,14 @@ async function runEvalCommand(input) {
|
|
|
2814
2906
|
progressReporter.addLogPaths([entry.filePath], "pi");
|
|
2815
2907
|
});
|
|
2816
2908
|
const seenCopilotLogPaths = /* @__PURE__ */ new Set();
|
|
2817
|
-
const
|
|
2909
|
+
const unsubscribeCopilotSdkLogs = subscribeToCopilotSdkLogEntries((entry) => {
|
|
2910
|
+
if (!entry.filePath || seenCopilotLogPaths.has(entry.filePath)) {
|
|
2911
|
+
return;
|
|
2912
|
+
}
|
|
2913
|
+
seenCopilotLogPaths.add(entry.filePath);
|
|
2914
|
+
progressReporter.addLogPaths([entry.filePath], "copilot");
|
|
2915
|
+
});
|
|
2916
|
+
const unsubscribeCopilotCliLogs = subscribeToCopilotCliLogEntries((entry) => {
|
|
2818
2917
|
if (!entry.filePath || seenCopilotLogPaths.has(entry.filePath)) {
|
|
2819
2918
|
return;
|
|
2820
2919
|
}
|
|
@@ -2908,7 +3007,8 @@ Results written to: ${outputPath}`);
|
|
|
2908
3007
|
} finally {
|
|
2909
3008
|
unsubscribeCodexLogs();
|
|
2910
3009
|
unsubscribePiLogs();
|
|
2911
|
-
|
|
3010
|
+
unsubscribeCopilotSdkLogs();
|
|
3011
|
+
unsubscribeCopilotCliLogs();
|
|
2912
3012
|
await outputWriter.close().catch(() => void 0);
|
|
2913
3013
|
if (otelExporter) {
|
|
2914
3014
|
try {
|
|
@@ -2949,4 +3049,4 @@ export {
|
|
|
2949
3049
|
selectTarget,
|
|
2950
3050
|
runEvalCommand
|
|
2951
3051
|
};
|
|
2952
|
-
//# sourceMappingURL=chunk-
|
|
3052
|
+
//# sourceMappingURL=chunk-GO7OTNQ4.js.map
|