@agentv/core 4.6.0 → 4.7.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/dist/{chunk-AIQ5FO4G.js → chunk-75RFVESM.js} +273 -125
- package/dist/chunk-75RFVESM.js.map +1 -0
- package/dist/evaluation/validation/index.cjs +110 -95
- package/dist/evaluation/validation/index.cjs.map +1 -1
- package/dist/evaluation/validation/index.js +30 -72
- package/dist/evaluation/validation/index.js.map +1 -1
- package/dist/index.cjs +1488 -517
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +291 -74
- package/dist/index.d.ts +291 -74
- package/dist/index.js +1187 -369
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/dist/chunk-AIQ5FO4G.js.map +0 -1
|
@@ -4,12 +4,13 @@ import {
|
|
|
4
4
|
KNOWN_PROVIDERS,
|
|
5
5
|
PROVIDER_ALIASES,
|
|
6
6
|
buildSearchRoots,
|
|
7
|
+
findDeprecatedCamelCaseTargetWarnings,
|
|
7
8
|
findGitRoot,
|
|
8
9
|
interpolateEnv,
|
|
9
10
|
isEvaluatorKind,
|
|
10
11
|
loadCasesFromFile,
|
|
11
12
|
resolveFileReference
|
|
12
|
-
} from "../../chunk-
|
|
13
|
+
} from "../../chunk-75RFVESM.js";
|
|
13
14
|
|
|
14
15
|
// src/evaluation/validation/file-type.ts
|
|
15
16
|
import { readFile } from "node:fs/promises";
|
|
@@ -123,7 +124,7 @@ var KNOWN_TEST_FIELDS = /* @__PURE__ */ new Set([
|
|
|
123
124
|
"workspace",
|
|
124
125
|
"metadata",
|
|
125
126
|
"conversation_id",
|
|
126
|
-
"
|
|
127
|
+
"suite",
|
|
127
128
|
"note"
|
|
128
129
|
]);
|
|
129
130
|
var NAME_PATTERN = /^[a-z0-9-]+$/;
|
|
@@ -691,87 +692,68 @@ function isObject2(value) {
|
|
|
691
692
|
var COMMON_SETTINGS = new Set(COMMON_TARGET_SETTINGS);
|
|
692
693
|
var RETRY_SETTINGS = /* @__PURE__ */ new Set([
|
|
693
694
|
"max_retries",
|
|
694
|
-
"maxRetries",
|
|
695
695
|
"retry_initial_delay_ms",
|
|
696
|
-
"retryInitialDelayMs",
|
|
697
696
|
"retry_max_delay_ms",
|
|
698
|
-
"retryMaxDelayMs",
|
|
699
697
|
"retry_backoff_factor",
|
|
700
|
-
"
|
|
701
|
-
"retry_status_codes",
|
|
702
|
-
"retryStatusCodes"
|
|
698
|
+
"retry_status_codes"
|
|
703
699
|
]);
|
|
704
700
|
var AZURE_SETTINGS = /* @__PURE__ */ new Set([
|
|
705
701
|
...COMMON_SETTINGS,
|
|
706
702
|
...RETRY_SETTINGS,
|
|
707
703
|
"endpoint",
|
|
708
704
|
"resource",
|
|
709
|
-
"resourceName",
|
|
710
705
|
"api_key",
|
|
711
|
-
"apiKey",
|
|
712
706
|
"deployment",
|
|
713
|
-
"deploymentName",
|
|
714
707
|
"model",
|
|
715
708
|
"version",
|
|
716
709
|
"api_version",
|
|
710
|
+
"api_format",
|
|
717
711
|
"temperature",
|
|
718
|
-
"max_output_tokens"
|
|
719
|
-
"maxTokens"
|
|
712
|
+
"max_output_tokens"
|
|
720
713
|
]);
|
|
721
714
|
var OPENAI_SETTINGS = /* @__PURE__ */ new Set([
|
|
722
715
|
...COMMON_SETTINGS,
|
|
723
716
|
...RETRY_SETTINGS,
|
|
724
717
|
"endpoint",
|
|
725
718
|
"base_url",
|
|
726
|
-
"baseUrl",
|
|
727
719
|
"api_key",
|
|
728
|
-
"apiKey",
|
|
729
720
|
"model",
|
|
730
721
|
"deployment",
|
|
731
722
|
"variant",
|
|
732
723
|
"api_format",
|
|
733
|
-
"apiFormat",
|
|
734
724
|
"temperature",
|
|
735
|
-
"max_output_tokens"
|
|
736
|
-
"maxTokens"
|
|
725
|
+
"max_output_tokens"
|
|
737
726
|
]);
|
|
738
727
|
var OPENROUTER_SETTINGS = /* @__PURE__ */ new Set([
|
|
739
728
|
...COMMON_SETTINGS,
|
|
740
729
|
...RETRY_SETTINGS,
|
|
741
730
|
"api_key",
|
|
742
|
-
"apiKey",
|
|
743
731
|
"model",
|
|
744
732
|
"deployment",
|
|
745
733
|
"variant",
|
|
746
734
|
"temperature",
|
|
747
|
-
"max_output_tokens"
|
|
748
|
-
"maxTokens"
|
|
735
|
+
"max_output_tokens"
|
|
749
736
|
]);
|
|
750
737
|
var ANTHROPIC_SETTINGS = /* @__PURE__ */ new Set([
|
|
751
738
|
...COMMON_SETTINGS,
|
|
752
739
|
...RETRY_SETTINGS,
|
|
753
740
|
"api_key",
|
|
754
|
-
"apiKey",
|
|
755
741
|
"model",
|
|
756
742
|
"deployment",
|
|
757
743
|
"variant",
|
|
758
744
|
"temperature",
|
|
759
745
|
"max_output_tokens",
|
|
760
|
-
"
|
|
761
|
-
"thinking_budget",
|
|
762
|
-
"thinkingBudget"
|
|
746
|
+
"thinking_budget"
|
|
763
747
|
]);
|
|
764
748
|
var GEMINI_SETTINGS = /* @__PURE__ */ new Set([
|
|
765
749
|
...COMMON_SETTINGS,
|
|
766
750
|
...RETRY_SETTINGS,
|
|
767
751
|
"api_key",
|
|
768
|
-
"apiKey",
|
|
769
752
|
"model",
|
|
770
753
|
"deployment",
|
|
771
754
|
"variant",
|
|
772
755
|
"temperature",
|
|
773
|
-
"max_output_tokens"
|
|
774
|
-
"maxTokens"
|
|
756
|
+
"max_output_tokens"
|
|
775
757
|
]);
|
|
776
758
|
var CODEX_SETTINGS = /* @__PURE__ */ new Set([
|
|
777
759
|
...COMMON_SETTINGS,
|
|
@@ -783,40 +765,25 @@ var CODEX_SETTINGS = /* @__PURE__ */ new Set([
|
|
|
783
765
|
"arguments",
|
|
784
766
|
"cwd",
|
|
785
767
|
"timeout_seconds",
|
|
786
|
-
"timeoutSeconds",
|
|
787
768
|
"log_dir",
|
|
788
|
-
"logDir",
|
|
789
769
|
"log_directory",
|
|
790
|
-
"logDirectory",
|
|
791
770
|
"log_format",
|
|
792
|
-
"logFormat",
|
|
793
771
|
"log_output_format",
|
|
794
|
-
"logOutputFormat",
|
|
795
772
|
"system_prompt",
|
|
796
|
-
"
|
|
797
|
-
"workspace_template",
|
|
798
|
-
"workspaceTemplate"
|
|
773
|
+
"workspace_template"
|
|
799
774
|
]);
|
|
800
775
|
var COPILOT_SDK_SETTINGS = /* @__PURE__ */ new Set([
|
|
801
776
|
...COMMON_SETTINGS,
|
|
802
777
|
"cli_url",
|
|
803
|
-
"cliUrl",
|
|
804
778
|
"cli_path",
|
|
805
|
-
"cliPath",
|
|
806
779
|
"github_token",
|
|
807
|
-
"githubToken",
|
|
808
780
|
"model",
|
|
809
781
|
"cwd",
|
|
810
782
|
"timeout_seconds",
|
|
811
|
-
"timeoutSeconds",
|
|
812
783
|
"log_dir",
|
|
813
|
-
"logDir",
|
|
814
784
|
"log_format",
|
|
815
|
-
"logFormat",
|
|
816
785
|
"system_prompt",
|
|
817
|
-
"
|
|
818
|
-
"workspace_template",
|
|
819
|
-
"workspaceTemplate"
|
|
786
|
+
"workspace_template"
|
|
820
787
|
]);
|
|
821
788
|
var COPILOT_CLI_SETTINGS = /* @__PURE__ */ new Set([
|
|
822
789
|
...COMMON_SETTINGS,
|
|
@@ -828,35 +795,23 @@ var COPILOT_CLI_SETTINGS = /* @__PURE__ */ new Set([
|
|
|
828
795
|
"model",
|
|
829
796
|
"cwd",
|
|
830
797
|
"timeout_seconds",
|
|
831
|
-
"timeoutSeconds",
|
|
832
798
|
"log_dir",
|
|
833
|
-
"logDir",
|
|
834
799
|
"log_format",
|
|
835
|
-
"logFormat",
|
|
836
800
|
"system_prompt",
|
|
837
|
-
"
|
|
838
|
-
"workspace_template",
|
|
839
|
-
"workspaceTemplate"
|
|
801
|
+
"workspace_template"
|
|
840
802
|
]);
|
|
841
803
|
var VSCODE_SETTINGS = /* @__PURE__ */ new Set([
|
|
842
804
|
...COMMON_SETTINGS,
|
|
843
805
|
"executable",
|
|
844
806
|
"workspace_template",
|
|
845
|
-
"workspaceTemplate",
|
|
846
807
|
"wait",
|
|
847
808
|
"dry_run",
|
|
848
|
-
"dryRun",
|
|
849
809
|
"subagent_root",
|
|
850
|
-
"
|
|
851
|
-
"timeout_seconds",
|
|
852
|
-
"timeoutSeconds"
|
|
810
|
+
"timeout_seconds"
|
|
853
811
|
]);
|
|
854
812
|
var MOCK_SETTINGS = /* @__PURE__ */ new Set([
|
|
855
813
|
...COMMON_SETTINGS,
|
|
856
814
|
"response",
|
|
857
|
-
"delayMs",
|
|
858
|
-
"delayMinMs",
|
|
859
|
-
"delayMaxMs",
|
|
860
815
|
"trace"
|
|
861
816
|
// For testing tool-trajectory evaluator
|
|
862
817
|
]);
|
|
@@ -865,23 +820,14 @@ var CLAUDE_SETTINGS = /* @__PURE__ */ new Set([
|
|
|
865
820
|
"model",
|
|
866
821
|
"cwd",
|
|
867
822
|
"timeout_seconds",
|
|
868
|
-
"timeoutSeconds",
|
|
869
823
|
"log_dir",
|
|
870
|
-
"logDir",
|
|
871
824
|
"log_directory",
|
|
872
|
-
"logDirectory",
|
|
873
825
|
"log_format",
|
|
874
|
-
"logFormat",
|
|
875
826
|
"log_output_format",
|
|
876
|
-
"logOutputFormat",
|
|
877
827
|
"system_prompt",
|
|
878
|
-
"systemPrompt",
|
|
879
828
|
"workspace_template",
|
|
880
|
-
"workspaceTemplate",
|
|
881
829
|
"max_turns",
|
|
882
|
-
"
|
|
883
|
-
"max_budget_usd",
|
|
884
|
-
"maxBudgetUsd"
|
|
830
|
+
"max_budget_usd"
|
|
885
831
|
]);
|
|
886
832
|
function getKnownSettings(provider) {
|
|
887
833
|
const normalizedProvider = provider.toLowerCase();
|
|
@@ -1006,15 +952,15 @@ async function validateTargetsFile(filePath) {
|
|
|
1006
952
|
});
|
|
1007
953
|
return;
|
|
1008
954
|
}
|
|
1009
|
-
const timeoutSeconds = healthcheck.timeout_seconds
|
|
955
|
+
const timeoutSeconds = healthcheck.timeout_seconds;
|
|
1010
956
|
if (timeoutSeconds !== void 0) {
|
|
1011
957
|
const numericTimeout = Number(timeoutSeconds);
|
|
1012
958
|
if (!Number.isFinite(numericTimeout) || numericTimeout <= 0) {
|
|
1013
959
|
errors2.push({
|
|
1014
960
|
severity: "error",
|
|
1015
961
|
filePath: absolutePath2,
|
|
1016
|
-
location: `${location}.
|
|
1017
|
-
message: "healthcheck.
|
|
962
|
+
location: `${location}.timeout_seconds`,
|
|
963
|
+
message: "healthcheck.timeout_seconds must be a positive number when provided"
|
|
1018
964
|
});
|
|
1019
965
|
}
|
|
1020
966
|
}
|
|
@@ -1113,6 +1059,18 @@ async function validateTargetsFile(filePath) {
|
|
|
1113
1059
|
});
|
|
1114
1060
|
continue;
|
|
1115
1061
|
}
|
|
1062
|
+
for (const warning of findDeprecatedCamelCaseTargetWarnings(target, location)) {
|
|
1063
|
+
const fieldMatch = warning.message.match(/field '([^']+)'/);
|
|
1064
|
+
const replacementMatch = warning.message.match(/Use '([^']+)' instead/);
|
|
1065
|
+
const field = fieldMatch?.[1] ?? "unknown";
|
|
1066
|
+
const replacement = replacementMatch?.[1] ?? "snake_case";
|
|
1067
|
+
errors.push({
|
|
1068
|
+
severity: "error",
|
|
1069
|
+
filePath: absolutePath,
|
|
1070
|
+
location: warning.location,
|
|
1071
|
+
message: `camelCase field '${field}' is no longer supported in targets.yaml. Use '${replacement}' instead.`
|
|
1072
|
+
});
|
|
1073
|
+
}
|
|
1116
1074
|
const name = target.name;
|
|
1117
1075
|
if (typeof name !== "string" || name.trim().length === 0) {
|
|
1118
1076
|
errors.push({
|