@agentv/core 4.6.1 → 4.8.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-ZK4GG7PR.js → chunk-VCVVKCC4.js} +268 -128
- package/dist/chunk-VCVVKCC4.js.map +1 -0
- package/dist/evaluation/validation/index.cjs +110 -94
- package/dist/evaluation/validation/index.cjs.map +1 -1
- package/dist/evaluation/validation/index.js +30 -71
- package/dist/evaluation/validation/index.js.map +1 -1
- package/dist/index.cjs +1353 -466
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +301 -74
- package/dist/index.d.ts +301 -74
- package/dist/index.js +1053 -311
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/dist/chunk-ZK4GG7PR.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-VCVVKCC4.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,26 @@ 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
|
-
"systemPrompt",
|
|
818
786
|
"workspace_template",
|
|
819
|
-
"
|
|
787
|
+
"byok"
|
|
820
788
|
]);
|
|
821
789
|
var COPILOT_CLI_SETTINGS = /* @__PURE__ */ new Set([
|
|
822
790
|
...COMMON_SETTINGS,
|
|
@@ -828,35 +796,23 @@ var COPILOT_CLI_SETTINGS = /* @__PURE__ */ new Set([
|
|
|
828
796
|
"model",
|
|
829
797
|
"cwd",
|
|
830
798
|
"timeout_seconds",
|
|
831
|
-
"timeoutSeconds",
|
|
832
799
|
"log_dir",
|
|
833
|
-
"logDir",
|
|
834
800
|
"log_format",
|
|
835
|
-
"logFormat",
|
|
836
801
|
"system_prompt",
|
|
837
|
-
"
|
|
838
|
-
"workspace_template",
|
|
839
|
-
"workspaceTemplate"
|
|
802
|
+
"workspace_template"
|
|
840
803
|
]);
|
|
841
804
|
var VSCODE_SETTINGS = /* @__PURE__ */ new Set([
|
|
842
805
|
...COMMON_SETTINGS,
|
|
843
806
|
"executable",
|
|
844
807
|
"workspace_template",
|
|
845
|
-
"workspaceTemplate",
|
|
846
808
|
"wait",
|
|
847
809
|
"dry_run",
|
|
848
|
-
"dryRun",
|
|
849
810
|
"subagent_root",
|
|
850
|
-
"
|
|
851
|
-
"timeout_seconds",
|
|
852
|
-
"timeoutSeconds"
|
|
811
|
+
"timeout_seconds"
|
|
853
812
|
]);
|
|
854
813
|
var MOCK_SETTINGS = /* @__PURE__ */ new Set([
|
|
855
814
|
...COMMON_SETTINGS,
|
|
856
815
|
"response",
|
|
857
|
-
"delayMs",
|
|
858
|
-
"delayMinMs",
|
|
859
|
-
"delayMaxMs",
|
|
860
816
|
"trace"
|
|
861
817
|
// For testing tool-trajectory evaluator
|
|
862
818
|
]);
|
|
@@ -865,23 +821,14 @@ var CLAUDE_SETTINGS = /* @__PURE__ */ new Set([
|
|
|
865
821
|
"model",
|
|
866
822
|
"cwd",
|
|
867
823
|
"timeout_seconds",
|
|
868
|
-
"timeoutSeconds",
|
|
869
824
|
"log_dir",
|
|
870
|
-
"logDir",
|
|
871
825
|
"log_directory",
|
|
872
|
-
"logDirectory",
|
|
873
826
|
"log_format",
|
|
874
|
-
"logFormat",
|
|
875
827
|
"log_output_format",
|
|
876
|
-
"logOutputFormat",
|
|
877
828
|
"system_prompt",
|
|
878
|
-
"systemPrompt",
|
|
879
829
|
"workspace_template",
|
|
880
|
-
"workspaceTemplate",
|
|
881
830
|
"max_turns",
|
|
882
|
-
"
|
|
883
|
-
"max_budget_usd",
|
|
884
|
-
"maxBudgetUsd"
|
|
831
|
+
"max_budget_usd"
|
|
885
832
|
]);
|
|
886
833
|
function getKnownSettings(provider) {
|
|
887
834
|
const normalizedProvider = provider.toLowerCase();
|
|
@@ -1006,15 +953,15 @@ async function validateTargetsFile(filePath) {
|
|
|
1006
953
|
});
|
|
1007
954
|
return;
|
|
1008
955
|
}
|
|
1009
|
-
const timeoutSeconds = healthcheck.timeout_seconds
|
|
956
|
+
const timeoutSeconds = healthcheck.timeout_seconds;
|
|
1010
957
|
if (timeoutSeconds !== void 0) {
|
|
1011
958
|
const numericTimeout = Number(timeoutSeconds);
|
|
1012
959
|
if (!Number.isFinite(numericTimeout) || numericTimeout <= 0) {
|
|
1013
960
|
errors2.push({
|
|
1014
961
|
severity: "error",
|
|
1015
962
|
filePath: absolutePath2,
|
|
1016
|
-
location: `${location}.
|
|
1017
|
-
message: "healthcheck.
|
|
963
|
+
location: `${location}.timeout_seconds`,
|
|
964
|
+
message: "healthcheck.timeout_seconds must be a positive number when provided"
|
|
1018
965
|
});
|
|
1019
966
|
}
|
|
1020
967
|
}
|
|
@@ -1113,6 +1060,18 @@ async function validateTargetsFile(filePath) {
|
|
|
1113
1060
|
});
|
|
1114
1061
|
continue;
|
|
1115
1062
|
}
|
|
1063
|
+
for (const warning of findDeprecatedCamelCaseTargetWarnings(target, location)) {
|
|
1064
|
+
const fieldMatch = warning.message.match(/field '([^']+)'/);
|
|
1065
|
+
const replacementMatch = warning.message.match(/Use '([^']+)' instead/);
|
|
1066
|
+
const field = fieldMatch?.[1] ?? "unknown";
|
|
1067
|
+
const replacement = replacementMatch?.[1] ?? "snake_case";
|
|
1068
|
+
errors.push({
|
|
1069
|
+
severity: "error",
|
|
1070
|
+
filePath: absolutePath,
|
|
1071
|
+
location: warning.location,
|
|
1072
|
+
message: `camelCase field '${field}' is no longer supported in targets.yaml. Use '${replacement}' instead.`
|
|
1073
|
+
});
|
|
1074
|
+
}
|
|
1116
1075
|
const name = target.name;
|
|
1117
1076
|
if (typeof name !== "string" || name.trim().length === 0) {
|
|
1118
1077
|
errors.push({
|