@wix/evalforge-types 0.60.0 → 0.61.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 +34 -10
- package/build/index.js.map +2 -2
- package/build/index.mjs +34 -10
- package/build/index.mjs.map +2 -2
- package/build/types/assertion/assertion.d.ts +21 -6
- package/build/types/scenario/test-scenario.d.ts +21 -3
- package/package.json +2 -2
package/build/index.mjs
CHANGED
|
@@ -633,8 +633,8 @@ var CostConfigSchema = z22.strictObject({
|
|
|
633
633
|
var ToolCalledWithParamConfigSchema = z22.strictObject({
|
|
634
634
|
/** Name of the tool that must have been called */
|
|
635
635
|
toolName: z22.string().min(1),
|
|
636
|
-
/** JSON string of key-value pairs for expected parameters (substring match) */
|
|
637
|
-
expectedParams: z22.string().min(1),
|
|
636
|
+
/** JSON string of key-value pairs for expected parameters (substring match). Optional — when omitted, only checks tool presence. */
|
|
637
|
+
expectedParams: z22.string().min(1).optional(),
|
|
638
638
|
/** If true, the matching tool call must also have succeeded (step.success === true) */
|
|
639
639
|
requireSuccess: z22.boolean().optional()
|
|
640
640
|
});
|
|
@@ -671,23 +671,33 @@ var LlmJudgeConfigSchema = z22.object({
|
|
|
671
671
|
/** User-defined parameters for this assertion */
|
|
672
672
|
parameters: z22.array(AssertionParameterSchema).optional()
|
|
673
673
|
});
|
|
674
|
+
var AssertionBaseFields = {
|
|
675
|
+
/** When true, the assertion's pass/fail logic is inverted (NOT operator). */
|
|
676
|
+
negate: z22.boolean().optional()
|
|
677
|
+
};
|
|
674
678
|
var SkillWasCalledAssertionSchema = SkillWasCalledConfigSchema.extend({
|
|
675
|
-
type: z22.literal("skill_was_called")
|
|
679
|
+
type: z22.literal("skill_was_called"),
|
|
680
|
+
...AssertionBaseFields
|
|
676
681
|
});
|
|
677
682
|
var ToolCalledWithParamAssertionSchema = ToolCalledWithParamConfigSchema.extend({
|
|
678
|
-
type: z22.literal("tool_called_with_param")
|
|
683
|
+
type: z22.literal("tool_called_with_param"),
|
|
684
|
+
...AssertionBaseFields
|
|
679
685
|
});
|
|
680
686
|
var BuildPassedAssertionSchema = BuildPassedConfigSchema.extend({
|
|
681
|
-
type: z22.literal("build_passed")
|
|
687
|
+
type: z22.literal("build_passed"),
|
|
688
|
+
...AssertionBaseFields
|
|
682
689
|
});
|
|
683
690
|
var CostAssertionSchema = CostConfigSchema.extend({
|
|
684
|
-
type: z22.literal("cost")
|
|
691
|
+
type: z22.literal("cost"),
|
|
692
|
+
...AssertionBaseFields
|
|
685
693
|
});
|
|
686
694
|
var LlmJudgeAssertionSchema = LlmJudgeConfigSchema.extend({
|
|
687
|
-
type: z22.literal("llm_judge")
|
|
695
|
+
type: z22.literal("llm_judge"),
|
|
696
|
+
...AssertionBaseFields
|
|
688
697
|
});
|
|
689
698
|
var TimeAssertionSchema = TimeConfigSchema.extend({
|
|
690
|
-
type: z22.literal("time_limit")
|
|
699
|
+
type: z22.literal("time_limit"),
|
|
700
|
+
...AssertionBaseFields
|
|
691
701
|
});
|
|
692
702
|
var AssertionSchema = z22.union([
|
|
693
703
|
SkillWasCalledAssertionSchema,
|
|
@@ -703,7 +713,7 @@ var AssertionConfigSchema = z22.union([
|
|
|
703
713
|
SkillWasCalledConfigSchema,
|
|
704
714
|
// requires skillNames
|
|
705
715
|
ToolCalledWithParamConfigSchema,
|
|
706
|
-
// requires toolName
|
|
716
|
+
// requires toolName, uses strictObject
|
|
707
717
|
TimeConfigSchema,
|
|
708
718
|
// requires maxDurationMs, uses strictObject
|
|
709
719
|
CostConfigSchema,
|
|
@@ -1415,6 +1425,13 @@ var SYSTEM_ASSERTIONS = {
|
|
|
1415
1425
|
label: "Skills",
|
|
1416
1426
|
type: "string",
|
|
1417
1427
|
required: true
|
|
1428
|
+
},
|
|
1429
|
+
{
|
|
1430
|
+
name: "negate",
|
|
1431
|
+
label: "Negate (NOT operator)",
|
|
1432
|
+
type: "boolean",
|
|
1433
|
+
required: false,
|
|
1434
|
+
defaultValue: false
|
|
1418
1435
|
}
|
|
1419
1436
|
]
|
|
1420
1437
|
},
|
|
@@ -1434,7 +1451,7 @@ var SYSTEM_ASSERTIONS = {
|
|
|
1434
1451
|
name: "expectedParams",
|
|
1435
1452
|
label: "Expected Parameters (JSON, substring match)",
|
|
1436
1453
|
type: "string",
|
|
1437
|
-
required:
|
|
1454
|
+
required: false
|
|
1438
1455
|
},
|
|
1439
1456
|
{
|
|
1440
1457
|
name: "requireSuccess",
|
|
@@ -1443,6 +1460,13 @@ var SYSTEM_ASSERTIONS = {
|
|
|
1443
1460
|
required: false,
|
|
1444
1461
|
defaultValue: false,
|
|
1445
1462
|
advanced: true
|
|
1463
|
+
},
|
|
1464
|
+
{
|
|
1465
|
+
name: "negate",
|
|
1466
|
+
label: "Negate (NOT operator)",
|
|
1467
|
+
type: "boolean",
|
|
1468
|
+
required: false,
|
|
1469
|
+
defaultValue: false
|
|
1446
1470
|
}
|
|
1447
1471
|
]
|
|
1448
1472
|
},
|