@wix/evalforge-types 0.59.0 → 0.60.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/build/index.js +1 -41
- package/build/index.js.map +2 -2
- package/build/index.mjs +1 -35
- package/build/index.mjs.map +3 -3
- package/build/types/assertion/assertion.d.ts +1 -187
- package/build/types/assertion/index.d.ts +1 -1
- package/build/types/assertion/system-assertions.d.ts +1 -1
- package/package.json +2 -2
package/build/index.js
CHANGED
|
@@ -59,7 +59,6 @@ __export(index_exports, {
|
|
|
59
59
|
CostAssertionSchema: () => CostAssertionSchema,
|
|
60
60
|
CostConfigSchema: () => CostConfigSchema,
|
|
61
61
|
CreateAgentInputSchema: () => CreateAgentInputSchema,
|
|
62
|
-
CreateCustomAssertionInputSchema: () => CreateCustomAssertionInputSchema,
|
|
63
62
|
CreateEvalRunFolderInputSchema: () => CreateEvalRunFolderInputSchema,
|
|
64
63
|
CreateEvalRunInputSchema: () => CreateEvalRunInputSchema,
|
|
65
64
|
CreateEvalScheduleInputSchema: () => CreateEvalScheduleInputSchema,
|
|
@@ -73,7 +72,6 @@ __export(index_exports, {
|
|
|
73
72
|
CreateTemplateInputSchema: () => CreateTemplateInputSchema,
|
|
74
73
|
CreateTestScenarioInputSchema: () => CreateTestScenarioInputSchema,
|
|
75
74
|
CreateTestSuiteInputSchema: () => CreateTestSuiteInputSchema,
|
|
76
|
-
CustomAssertionSchema: () => CustomAssertionSchema,
|
|
77
75
|
DEFAULT_EVALUATOR_SYSTEM_PROMPT: () => DEFAULT_EVALUATOR_SYSTEM_PROMPT,
|
|
78
76
|
DEFAULT_JUDGE_MODEL: () => DEFAULT_JUDGE_MODEL,
|
|
79
77
|
DiffContentSchema: () => DiffContentSchema,
|
|
@@ -175,7 +173,6 @@ __export(index_exports, {
|
|
|
175
173
|
TriggerSchema: () => TriggerSchema,
|
|
176
174
|
TriggerType: () => TriggerType,
|
|
177
175
|
UpdateAgentInputSchema: () => UpdateAgentInputSchema,
|
|
178
|
-
UpdateCustomAssertionInputSchema: () => UpdateCustomAssertionInputSchema,
|
|
179
176
|
UpdateEvalRunFolderInputSchema: () => UpdateEvalRunFolderInputSchema,
|
|
180
177
|
UpdateEvalScheduleInputSchema: () => UpdateEvalScheduleInputSchema,
|
|
181
178
|
UpdateMcpInputSchema: () => UpdateMcpInputSchema,
|
|
@@ -189,9 +186,6 @@ __export(index_exports, {
|
|
|
189
186
|
UpdateTestSuiteInputSchema: () => UpdateTestSuiteInputSchema,
|
|
190
187
|
VitestTestSchema: () => VitestTestSchema,
|
|
191
188
|
formatTraceEventLine: () => formatTraceEventLine,
|
|
192
|
-
getBuildPassedConfig: () => getBuildPassedConfig,
|
|
193
|
-
getLlmJudgeConfig: () => getLlmJudgeConfig,
|
|
194
|
-
getSkillWasCalledConfig: () => getSkillWasCalledConfig,
|
|
195
189
|
getSystemAssertion: () => getSystemAssertion,
|
|
196
190
|
getSystemAssertions: () => getSystemAssertions,
|
|
197
191
|
isSystemAssertionId: () => isSystemAssertionId,
|
|
@@ -818,7 +812,7 @@ var AssertionParameterSchema = import_zod22.z.object({
|
|
|
818
812
|
advanced: import_zod22.z.boolean().optional()
|
|
819
813
|
});
|
|
820
814
|
var ScenarioAssertionLinkSchema = import_zod22.z.object({
|
|
821
|
-
/** ID of the
|
|
815
|
+
/** ID of the system assertion (e.g., 'system:skill_was_called') */
|
|
822
816
|
assertionId: import_zod22.z.string(),
|
|
823
817
|
/** Parameter values for this assertion in this scenario */
|
|
824
818
|
params: import_zod22.z.record(
|
|
@@ -917,19 +911,6 @@ var AssertionConfigSchema = import_zod22.z.union([
|
|
|
917
911
|
import_zod22.z.object({})
|
|
918
912
|
// fallback empty config
|
|
919
913
|
]);
|
|
920
|
-
var CustomAssertionSchema = TenantEntitySchema.extend({
|
|
921
|
-
/** The assertion type */
|
|
922
|
-
type: AssertionTypeSchema,
|
|
923
|
-
/** Type-specific configuration */
|
|
924
|
-
config: AssertionConfigSchema
|
|
925
|
-
});
|
|
926
|
-
var CreateCustomAssertionInputSchema = CustomAssertionSchema.omit({
|
|
927
|
-
id: true,
|
|
928
|
-
createdAt: true,
|
|
929
|
-
updatedAt: true,
|
|
930
|
-
deleted: true
|
|
931
|
-
});
|
|
932
|
-
var UpdateCustomAssertionInputSchema = CreateCustomAssertionInputSchema.partial();
|
|
933
914
|
function validateAssertionConfig(type, config) {
|
|
934
915
|
switch (type) {
|
|
935
916
|
case "skill_was_called":
|
|
@@ -948,21 +929,6 @@ function validateAssertionConfig(type, config) {
|
|
|
948
929
|
return false;
|
|
949
930
|
}
|
|
950
931
|
}
|
|
951
|
-
function getSkillWasCalledConfig(assertion) {
|
|
952
|
-
if (assertion.type !== "skill_was_called") return null;
|
|
953
|
-
const result = SkillWasCalledConfigSchema.safeParse(assertion.config);
|
|
954
|
-
return result.success ? result.data : null;
|
|
955
|
-
}
|
|
956
|
-
function getBuildPassedConfig(assertion) {
|
|
957
|
-
if (assertion.type !== "build_passed") return null;
|
|
958
|
-
const result = BuildPassedConfigSchema.safeParse(assertion.config);
|
|
959
|
-
return result.success ? result.data : null;
|
|
960
|
-
}
|
|
961
|
-
function getLlmJudgeConfig(assertion) {
|
|
962
|
-
if (assertion.type !== "llm_judge") return null;
|
|
963
|
-
const result = LlmJudgeConfigSchema.safeParse(assertion.config);
|
|
964
|
-
return result.success ? result.data : null;
|
|
965
|
-
}
|
|
966
932
|
|
|
967
933
|
// src/scenario/test-scenario.ts
|
|
968
934
|
var ExpectedFileSchema = import_zod23.z.object({
|
|
@@ -1820,7 +1786,6 @@ function getSystemAssertion(id) {
|
|
|
1820
1786
|
CostAssertionSchema,
|
|
1821
1787
|
CostConfigSchema,
|
|
1822
1788
|
CreateAgentInputSchema,
|
|
1823
|
-
CreateCustomAssertionInputSchema,
|
|
1824
1789
|
CreateEvalRunFolderInputSchema,
|
|
1825
1790
|
CreateEvalRunInputSchema,
|
|
1826
1791
|
CreateEvalScheduleInputSchema,
|
|
@@ -1834,7 +1799,6 @@ function getSystemAssertion(id) {
|
|
|
1834
1799
|
CreateTemplateInputSchema,
|
|
1835
1800
|
CreateTestScenarioInputSchema,
|
|
1836
1801
|
CreateTestSuiteInputSchema,
|
|
1837
|
-
CustomAssertionSchema,
|
|
1838
1802
|
DEFAULT_EVALUATOR_SYSTEM_PROMPT,
|
|
1839
1803
|
DEFAULT_JUDGE_MODEL,
|
|
1840
1804
|
DiffContentSchema,
|
|
@@ -1936,7 +1900,6 @@ function getSystemAssertion(id) {
|
|
|
1936
1900
|
TriggerSchema,
|
|
1937
1901
|
TriggerType,
|
|
1938
1902
|
UpdateAgentInputSchema,
|
|
1939
|
-
UpdateCustomAssertionInputSchema,
|
|
1940
1903
|
UpdateEvalRunFolderInputSchema,
|
|
1941
1904
|
UpdateEvalScheduleInputSchema,
|
|
1942
1905
|
UpdateMcpInputSchema,
|
|
@@ -1950,9 +1913,6 @@ function getSystemAssertion(id) {
|
|
|
1950
1913
|
UpdateTestSuiteInputSchema,
|
|
1951
1914
|
VitestTestSchema,
|
|
1952
1915
|
formatTraceEventLine,
|
|
1953
|
-
getBuildPassedConfig,
|
|
1954
|
-
getLlmJudgeConfig,
|
|
1955
|
-
getSkillWasCalledConfig,
|
|
1956
1916
|
getSystemAssertion,
|
|
1957
1917
|
getSystemAssertions,
|
|
1958
1918
|
isSystemAssertionId,
|