@wix/evalforge-types 0.58.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 CHANGED
@@ -59,7 +59,7 @@ __export(index_exports, {
59
59
  CostAssertionSchema: () => CostAssertionSchema,
60
60
  CostConfigSchema: () => CostConfigSchema,
61
61
  CreateAgentInputSchema: () => CreateAgentInputSchema,
62
- CreateCustomAssertionInputSchema: () => CreateCustomAssertionInputSchema,
62
+ CreateEvalRunFolderInputSchema: () => CreateEvalRunFolderInputSchema,
63
63
  CreateEvalRunInputSchema: () => CreateEvalRunInputSchema,
64
64
  CreateEvalScheduleInputSchema: () => CreateEvalScheduleInputSchema,
65
65
  CreateMcpInputSchema: () => CreateMcpInputSchema,
@@ -72,7 +72,6 @@ __export(index_exports, {
72
72
  CreateTemplateInputSchema: () => CreateTemplateInputSchema,
73
73
  CreateTestScenarioInputSchema: () => CreateTestScenarioInputSchema,
74
74
  CreateTestSuiteInputSchema: () => CreateTestSuiteInputSchema,
75
- CustomAssertionSchema: () => CustomAssertionSchema,
76
75
  DEFAULT_EVALUATOR_SYSTEM_PROMPT: () => DEFAULT_EVALUATOR_SYSTEM_PROMPT,
77
76
  DEFAULT_JUDGE_MODEL: () => DEFAULT_JUDGE_MODEL,
78
77
  DiffContentSchema: () => DiffContentSchema,
@@ -80,6 +79,8 @@ __export(index_exports, {
80
79
  DiffLineTypeSchema: () => DiffLineTypeSchema,
81
80
  EnvironmentSchema: () => EnvironmentSchema,
82
81
  EvalMetricsSchema: () => EvalMetricsSchema,
82
+ EvalRunFolderMembershipSchema: () => EvalRunFolderMembershipSchema,
83
+ EvalRunFolderSchema: () => EvalRunFolderSchema,
83
84
  EvalRunResultSchema: () => EvalRunResultSchema,
84
85
  EvalRunSchema: () => EvalRunSchema,
85
86
  EvalScheduleSchema: () => EvalScheduleSchema,
@@ -172,7 +173,7 @@ __export(index_exports, {
172
173
  TriggerSchema: () => TriggerSchema,
173
174
  TriggerType: () => TriggerType,
174
175
  UpdateAgentInputSchema: () => UpdateAgentInputSchema,
175
- UpdateCustomAssertionInputSchema: () => UpdateCustomAssertionInputSchema,
176
+ UpdateEvalRunFolderInputSchema: () => UpdateEvalRunFolderInputSchema,
176
177
  UpdateEvalScheduleInputSchema: () => UpdateEvalScheduleInputSchema,
177
178
  UpdateMcpInputSchema: () => UpdateMcpInputSchema,
178
179
  UpdatePresetInputSchema: () => UpdatePresetInputSchema,
@@ -185,9 +186,6 @@ __export(index_exports, {
185
186
  UpdateTestSuiteInputSchema: () => UpdateTestSuiteInputSchema,
186
187
  VitestTestSchema: () => VitestTestSchema,
187
188
  formatTraceEventLine: () => formatTraceEventLine,
188
- getBuildPassedConfig: () => getBuildPassedConfig,
189
- getLlmJudgeConfig: () => getLlmJudgeConfig,
190
- getSkillWasCalledConfig: () => getSkillWasCalledConfig,
191
189
  getSystemAssertion: () => getSystemAssertion,
192
190
  getSystemAssertions: () => getSystemAssertions,
193
191
  isSystemAssertionId: () => isSystemAssertionId,
@@ -814,7 +812,7 @@ var AssertionParameterSchema = import_zod22.z.object({
814
812
  advanced: import_zod22.z.boolean().optional()
815
813
  });
816
814
  var ScenarioAssertionLinkSchema = import_zod22.z.object({
817
- /** ID of the assertion (can be system assertion like 'system:skill_was_called' or custom assertion UUID) */
815
+ /** ID of the system assertion (e.g., 'system:skill_was_called') */
818
816
  assertionId: import_zod22.z.string(),
819
817
  /** Parameter values for this assertion in this scenario */
820
818
  params: import_zod22.z.record(
@@ -913,19 +911,6 @@ var AssertionConfigSchema = import_zod22.z.union([
913
911
  import_zod22.z.object({})
914
912
  // fallback empty config
915
913
  ]);
916
- var CustomAssertionSchema = TenantEntitySchema.extend({
917
- /** The assertion type */
918
- type: AssertionTypeSchema,
919
- /** Type-specific configuration */
920
- config: AssertionConfigSchema
921
- });
922
- var CreateCustomAssertionInputSchema = CustomAssertionSchema.omit({
923
- id: true,
924
- createdAt: true,
925
- updatedAt: true,
926
- deleted: true
927
- });
928
- var UpdateCustomAssertionInputSchema = CreateCustomAssertionInputSchema.partial();
929
914
  function validateAssertionConfig(type, config) {
930
915
  switch (type) {
931
916
  case "skill_was_called":
@@ -944,21 +929,6 @@ function validateAssertionConfig(type, config) {
944
929
  return false;
945
930
  }
946
931
  }
947
- function getSkillWasCalledConfig(assertion) {
948
- if (assertion.type !== "skill_was_called") return null;
949
- const result = SkillWasCalledConfigSchema.safeParse(assertion.config);
950
- return result.success ? result.data : null;
951
- }
952
- function getBuildPassedConfig(assertion) {
953
- if (assertion.type !== "build_passed") return null;
954
- const result = BuildPassedConfigSchema.safeParse(assertion.config);
955
- return result.success ? result.data : null;
956
- }
957
- function getLlmJudgeConfig(assertion) {
958
- if (assertion.type !== "llm_judge") return null;
959
- const result = LlmJudgeConfigSchema.safeParse(assertion.config);
960
- return result.success ? result.data : null;
961
- }
962
932
 
963
933
  // src/scenario/test-scenario.ts
964
934
  var ExpectedFileSchema = import_zod23.z.object({
@@ -1482,14 +1452,36 @@ var LeanEvaluationResultSchema = import_zod29.z.object({
1482
1452
  microcentsSpent: import_zod29.z.number().optional()
1483
1453
  });
1484
1454
 
1485
- // src/project/project.ts
1455
+ // src/evaluation/eval-run-folder.ts
1486
1456
  var import_zod30 = require("zod");
1457
+ var EvalRunFolderSchema = TenantEntitySchema.extend({});
1458
+ var CreateEvalRunFolderInputSchema = EvalRunFolderSchema.omit({
1459
+ id: true,
1460
+ createdAt: true,
1461
+ updatedAt: true,
1462
+ deleted: true
1463
+ });
1464
+ var UpdateEvalRunFolderInputSchema = EvalRunFolderSchema.omit({
1465
+ id: true,
1466
+ createdAt: true,
1467
+ updatedAt: true,
1468
+ deleted: true
1469
+ }).partial();
1470
+ var EvalRunFolderMembershipSchema = import_zod30.z.object({
1471
+ folderId: import_zod30.z.string(),
1472
+ evalRunId: import_zod30.z.string(),
1473
+ projectId: import_zod30.z.string(),
1474
+ createdAt: import_zod30.z.string()
1475
+ });
1476
+
1477
+ // src/project/project.ts
1478
+ var import_zod31 = require("zod");
1487
1479
  var ProjectSchema = BaseEntitySchema.extend({
1488
- appId: import_zod30.z.string().optional().describe("The ID of the app in Dev Center"),
1489
- appSecret: import_zod30.z.string().optional().describe("The secret of the app in Dev Center"),
1490
- useWixAuth: import_zod30.z.boolean().optional().describe("Enable Wix CLI/MCP auth for evaluations"),
1491
- useBase44Auth: import_zod30.z.boolean().optional().describe("Enable Base44 auth for evaluations"),
1492
- scenarioTags: import_zod30.z.array(import_zod30.z.string()).optional().describe("Project-level tag vocabulary for scenarios")
1480
+ appId: import_zod31.z.string().optional().describe("The ID of the app in Dev Center"),
1481
+ appSecret: import_zod31.z.string().optional().describe("The secret of the app in Dev Center"),
1482
+ useWixAuth: import_zod31.z.boolean().optional().describe("Enable Wix CLI/MCP auth for evaluations"),
1483
+ useBase44Auth: import_zod31.z.boolean().optional().describe("Enable Base44 auth for evaluations"),
1484
+ scenarioTags: import_zod31.z.array(import_zod31.z.string()).optional().describe("Project-level tag vocabulary for scenarios")
1493
1485
  });
1494
1486
  var CreateProjectInputSchema = ProjectSchema.omit({
1495
1487
  id: true,
@@ -1513,7 +1505,7 @@ var CreateTemplateInputSchema = TemplateSchema.omit({
1513
1505
  var UpdateTemplateInputSchema = CreateTemplateInputSchema.partial();
1514
1506
 
1515
1507
  // src/schedule/eval-schedule.ts
1516
- var import_zod31 = require("zod");
1508
+ var import_zod32 = require("zod");
1517
1509
  var FrequencyType = /* @__PURE__ */ ((FrequencyType2) => {
1518
1510
  FrequencyType2["DAILY"] = "daily";
1519
1511
  FrequencyType2["WEEKDAY"] = "weekday";
@@ -1523,29 +1515,29 @@ var FrequencyType = /* @__PURE__ */ ((FrequencyType2) => {
1523
1515
  })(FrequencyType || {});
1524
1516
  var EvalScheduleSchema = TenantEntitySchema.extend({
1525
1517
  /** Whether the schedule is active */
1526
- enabled: import_zod31.z.boolean(),
1518
+ enabled: import_zod32.z.boolean(),
1527
1519
  /** Test suite to run */
1528
- suiteId: import_zod31.z.string(),
1520
+ suiteId: import_zod32.z.string(),
1529
1521
  /** Preset that provides agent + entities for this schedule */
1530
- presetId: import_zod31.z.string(),
1522
+ presetId: import_zod32.z.string(),
1531
1523
  /** How often to run */
1532
- frequencyType: import_zod31.z.nativeEnum(FrequencyType),
1524
+ frequencyType: import_zod32.z.nativeEnum(FrequencyType),
1533
1525
  /** Time of day in 24h format (HH:MM), hours 00-23, minutes 00-59 */
1534
- timeOfDay: import_zod31.z.string().regex(/^([01]\d|2[0-3]):[0-5]\d$/),
1526
+ timeOfDay: import_zod32.z.string().regex(/^([01]\d|2[0-3]):[0-5]\d$/),
1535
1527
  /** Day of week (0=Sun, 6=Sat) for weekly schedules */
1536
- dayOfWeek: import_zod31.z.number().min(0).max(6).optional(),
1528
+ dayOfWeek: import_zod32.z.number().min(0).max(6).optional(),
1537
1529
  /** Day of month (1-31) for monthly schedules */
1538
- dayOfMonth: import_zod31.z.number().min(1).max(31).optional(),
1530
+ dayOfMonth: import_zod32.z.number().min(1).max(31).optional(),
1539
1531
  /** IANA timezone (e.g., 'America/New_York') */
1540
- timezone: import_zod31.z.string(),
1532
+ timezone: import_zod32.z.string(),
1541
1533
  /** ID of the last eval run created by this schedule */
1542
- lastRunId: import_zod31.z.string().optional(),
1534
+ lastRunId: import_zod32.z.string().optional(),
1543
1535
  /** Denormalized status of the last run */
1544
- lastRunStatus: import_zod31.z.string().optional(),
1536
+ lastRunStatus: import_zod32.z.string().optional(),
1545
1537
  /** ISO timestamp of the last run */
1546
- lastRunAt: import_zod31.z.string().optional(),
1538
+ lastRunAt: import_zod32.z.string().optional(),
1547
1539
  /** Next scheduled run time in UTC (pre-computed for efficient querying, set by backend) */
1548
- nextRunAt: import_zod31.z.string().optional()
1540
+ nextRunAt: import_zod32.z.string().optional()
1549
1541
  });
1550
1542
  function isValidTimezone(tz) {
1551
1543
  try {
@@ -1558,14 +1550,14 @@ function isValidTimezone(tz) {
1558
1550
  function validateScheduleFields(data, ctx, options) {
1559
1551
  if (data.frequencyType === "weekly" /* WEEKLY */ && data.dayOfWeek == null) {
1560
1552
  ctx.addIssue({
1561
- code: import_zod31.z.ZodIssueCode.custom,
1553
+ code: import_zod32.z.ZodIssueCode.custom,
1562
1554
  message: "dayOfWeek is required for weekly schedules",
1563
1555
  path: ["dayOfWeek"]
1564
1556
  });
1565
1557
  }
1566
1558
  if (data.frequencyType === "monthly" /* MONTHLY */ && data.dayOfMonth == null) {
1567
1559
  ctx.addIssue({
1568
- code: import_zod31.z.ZodIssueCode.custom,
1560
+ code: import_zod32.z.ZodIssueCode.custom,
1569
1561
  message: "dayOfMonth is required for monthly schedules",
1570
1562
  path: ["dayOfMonth"]
1571
1563
  });
@@ -1573,7 +1565,7 @@ function validateScheduleFields(data, ctx, options) {
1573
1565
  const shouldValidateTz = options.partial ? data.timezone !== void 0 : true;
1574
1566
  if (shouldValidateTz && !isValidTimezone(data.timezone)) {
1575
1567
  ctx.addIssue({
1576
- code: import_zod31.z.ZodIssueCode.custom,
1568
+ code: import_zod32.z.ZodIssueCode.custom,
1577
1569
  message: "Invalid IANA timezone",
1578
1570
  path: ["timezone"]
1579
1571
  });
@@ -1794,7 +1786,7 @@ function getSystemAssertion(id) {
1794
1786
  CostAssertionSchema,
1795
1787
  CostConfigSchema,
1796
1788
  CreateAgentInputSchema,
1797
- CreateCustomAssertionInputSchema,
1789
+ CreateEvalRunFolderInputSchema,
1798
1790
  CreateEvalRunInputSchema,
1799
1791
  CreateEvalScheduleInputSchema,
1800
1792
  CreateMcpInputSchema,
@@ -1807,7 +1799,6 @@ function getSystemAssertion(id) {
1807
1799
  CreateTemplateInputSchema,
1808
1800
  CreateTestScenarioInputSchema,
1809
1801
  CreateTestSuiteInputSchema,
1810
- CustomAssertionSchema,
1811
1802
  DEFAULT_EVALUATOR_SYSTEM_PROMPT,
1812
1803
  DEFAULT_JUDGE_MODEL,
1813
1804
  DiffContentSchema,
@@ -1815,6 +1806,8 @@ function getSystemAssertion(id) {
1815
1806
  DiffLineTypeSchema,
1816
1807
  EnvironmentSchema,
1817
1808
  EvalMetricsSchema,
1809
+ EvalRunFolderMembershipSchema,
1810
+ EvalRunFolderSchema,
1818
1811
  EvalRunResultSchema,
1819
1812
  EvalRunSchema,
1820
1813
  EvalScheduleSchema,
@@ -1907,7 +1900,7 @@ function getSystemAssertion(id) {
1907
1900
  TriggerSchema,
1908
1901
  TriggerType,
1909
1902
  UpdateAgentInputSchema,
1910
- UpdateCustomAssertionInputSchema,
1903
+ UpdateEvalRunFolderInputSchema,
1911
1904
  UpdateEvalScheduleInputSchema,
1912
1905
  UpdateMcpInputSchema,
1913
1906
  UpdatePresetInputSchema,
@@ -1920,9 +1913,6 @@ function getSystemAssertion(id) {
1920
1913
  UpdateTestSuiteInputSchema,
1921
1914
  VitestTestSchema,
1922
1915
  formatTraceEventLine,
1923
- getBuildPassedConfig,
1924
- getLlmJudgeConfig,
1925
- getSkillWasCalledConfig,
1926
1916
  getSystemAssertion,
1927
1917
  getSystemAssertions,
1928
1918
  isSystemAssertionId,