@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.mjs CHANGED
@@ -614,7 +614,7 @@ var AssertionParameterSchema = z22.object({
614
614
  advanced: z22.boolean().optional()
615
615
  });
616
616
  var ScenarioAssertionLinkSchema = z22.object({
617
- /** ID of the assertion (can be system assertion like 'system:skill_was_called' or custom assertion UUID) */
617
+ /** ID of the system assertion (e.g., 'system:skill_was_called') */
618
618
  assertionId: z22.string(),
619
619
  /** Parameter values for this assertion in this scenario */
620
620
  params: z22.record(
@@ -713,19 +713,6 @@ var AssertionConfigSchema = z22.union([
713
713
  z22.object({})
714
714
  // fallback empty config
715
715
  ]);
716
- var CustomAssertionSchema = TenantEntitySchema.extend({
717
- /** The assertion type */
718
- type: AssertionTypeSchema,
719
- /** Type-specific configuration */
720
- config: AssertionConfigSchema
721
- });
722
- var CreateCustomAssertionInputSchema = CustomAssertionSchema.omit({
723
- id: true,
724
- createdAt: true,
725
- updatedAt: true,
726
- deleted: true
727
- });
728
- var UpdateCustomAssertionInputSchema = CreateCustomAssertionInputSchema.partial();
729
716
  function validateAssertionConfig(type, config) {
730
717
  switch (type) {
731
718
  case "skill_was_called":
@@ -744,21 +731,6 @@ function validateAssertionConfig(type, config) {
744
731
  return false;
745
732
  }
746
733
  }
747
- function getSkillWasCalledConfig(assertion) {
748
- if (assertion.type !== "skill_was_called") return null;
749
- const result = SkillWasCalledConfigSchema.safeParse(assertion.config);
750
- return result.success ? result.data : null;
751
- }
752
- function getBuildPassedConfig(assertion) {
753
- if (assertion.type !== "build_passed") return null;
754
- const result = BuildPassedConfigSchema.safeParse(assertion.config);
755
- return result.success ? result.data : null;
756
- }
757
- function getLlmJudgeConfig(assertion) {
758
- if (assertion.type !== "llm_judge") return null;
759
- const result = LlmJudgeConfigSchema.safeParse(assertion.config);
760
- return result.success ? result.data : null;
761
- }
762
734
 
763
735
  // src/scenario/test-scenario.ts
764
736
  var ExpectedFileSchema = z23.object({
@@ -1282,14 +1254,36 @@ var LeanEvaluationResultSchema = z29.object({
1282
1254
  microcentsSpent: z29.number().optional()
1283
1255
  });
1284
1256
 
1285
- // src/project/project.ts
1257
+ // src/evaluation/eval-run-folder.ts
1286
1258
  import { z as z30 } from "zod";
1259
+ var EvalRunFolderSchema = TenantEntitySchema.extend({});
1260
+ var CreateEvalRunFolderInputSchema = EvalRunFolderSchema.omit({
1261
+ id: true,
1262
+ createdAt: true,
1263
+ updatedAt: true,
1264
+ deleted: true
1265
+ });
1266
+ var UpdateEvalRunFolderInputSchema = EvalRunFolderSchema.omit({
1267
+ id: true,
1268
+ createdAt: true,
1269
+ updatedAt: true,
1270
+ deleted: true
1271
+ }).partial();
1272
+ var EvalRunFolderMembershipSchema = z30.object({
1273
+ folderId: z30.string(),
1274
+ evalRunId: z30.string(),
1275
+ projectId: z30.string(),
1276
+ createdAt: z30.string()
1277
+ });
1278
+
1279
+ // src/project/project.ts
1280
+ import { z as z31 } from "zod";
1287
1281
  var ProjectSchema = BaseEntitySchema.extend({
1288
- appId: z30.string().optional().describe("The ID of the app in Dev Center"),
1289
- appSecret: z30.string().optional().describe("The secret of the app in Dev Center"),
1290
- useWixAuth: z30.boolean().optional().describe("Enable Wix CLI/MCP auth for evaluations"),
1291
- useBase44Auth: z30.boolean().optional().describe("Enable Base44 auth for evaluations"),
1292
- scenarioTags: z30.array(z30.string()).optional().describe("Project-level tag vocabulary for scenarios")
1282
+ appId: z31.string().optional().describe("The ID of the app in Dev Center"),
1283
+ appSecret: z31.string().optional().describe("The secret of the app in Dev Center"),
1284
+ useWixAuth: z31.boolean().optional().describe("Enable Wix CLI/MCP auth for evaluations"),
1285
+ useBase44Auth: z31.boolean().optional().describe("Enable Base44 auth for evaluations"),
1286
+ scenarioTags: z31.array(z31.string()).optional().describe("Project-level tag vocabulary for scenarios")
1293
1287
  });
1294
1288
  var CreateProjectInputSchema = ProjectSchema.omit({
1295
1289
  id: true,
@@ -1313,7 +1307,7 @@ var CreateTemplateInputSchema = TemplateSchema.omit({
1313
1307
  var UpdateTemplateInputSchema = CreateTemplateInputSchema.partial();
1314
1308
 
1315
1309
  // src/schedule/eval-schedule.ts
1316
- import { z as z31 } from "zod";
1310
+ import { z as z32 } from "zod";
1317
1311
  var FrequencyType = /* @__PURE__ */ ((FrequencyType2) => {
1318
1312
  FrequencyType2["DAILY"] = "daily";
1319
1313
  FrequencyType2["WEEKDAY"] = "weekday";
@@ -1323,29 +1317,29 @@ var FrequencyType = /* @__PURE__ */ ((FrequencyType2) => {
1323
1317
  })(FrequencyType || {});
1324
1318
  var EvalScheduleSchema = TenantEntitySchema.extend({
1325
1319
  /** Whether the schedule is active */
1326
- enabled: z31.boolean(),
1320
+ enabled: z32.boolean(),
1327
1321
  /** Test suite to run */
1328
- suiteId: z31.string(),
1322
+ suiteId: z32.string(),
1329
1323
  /** Preset that provides agent + entities for this schedule */
1330
- presetId: z31.string(),
1324
+ presetId: z32.string(),
1331
1325
  /** How often to run */
1332
- frequencyType: z31.nativeEnum(FrequencyType),
1326
+ frequencyType: z32.nativeEnum(FrequencyType),
1333
1327
  /** Time of day in 24h format (HH:MM), hours 00-23, minutes 00-59 */
1334
- timeOfDay: z31.string().regex(/^([01]\d|2[0-3]):[0-5]\d$/),
1328
+ timeOfDay: z32.string().regex(/^([01]\d|2[0-3]):[0-5]\d$/),
1335
1329
  /** Day of week (0=Sun, 6=Sat) for weekly schedules */
1336
- dayOfWeek: z31.number().min(0).max(6).optional(),
1330
+ dayOfWeek: z32.number().min(0).max(6).optional(),
1337
1331
  /** Day of month (1-31) for monthly schedules */
1338
- dayOfMonth: z31.number().min(1).max(31).optional(),
1332
+ dayOfMonth: z32.number().min(1).max(31).optional(),
1339
1333
  /** IANA timezone (e.g., 'America/New_York') */
1340
- timezone: z31.string(),
1334
+ timezone: z32.string(),
1341
1335
  /** ID of the last eval run created by this schedule */
1342
- lastRunId: z31.string().optional(),
1336
+ lastRunId: z32.string().optional(),
1343
1337
  /** Denormalized status of the last run */
1344
- lastRunStatus: z31.string().optional(),
1338
+ lastRunStatus: z32.string().optional(),
1345
1339
  /** ISO timestamp of the last run */
1346
- lastRunAt: z31.string().optional(),
1340
+ lastRunAt: z32.string().optional(),
1347
1341
  /** Next scheduled run time in UTC (pre-computed for efficient querying, set by backend) */
1348
- nextRunAt: z31.string().optional()
1342
+ nextRunAt: z32.string().optional()
1349
1343
  });
1350
1344
  function isValidTimezone(tz) {
1351
1345
  try {
@@ -1358,14 +1352,14 @@ function isValidTimezone(tz) {
1358
1352
  function validateScheduleFields(data, ctx, options) {
1359
1353
  if (data.frequencyType === "weekly" /* WEEKLY */ && data.dayOfWeek == null) {
1360
1354
  ctx.addIssue({
1361
- code: z31.ZodIssueCode.custom,
1355
+ code: z32.ZodIssueCode.custom,
1362
1356
  message: "dayOfWeek is required for weekly schedules",
1363
1357
  path: ["dayOfWeek"]
1364
1358
  });
1365
1359
  }
1366
1360
  if (data.frequencyType === "monthly" /* MONTHLY */ && data.dayOfMonth == null) {
1367
1361
  ctx.addIssue({
1368
- code: z31.ZodIssueCode.custom,
1362
+ code: z32.ZodIssueCode.custom,
1369
1363
  message: "dayOfMonth is required for monthly schedules",
1370
1364
  path: ["dayOfMonth"]
1371
1365
  });
@@ -1373,7 +1367,7 @@ function validateScheduleFields(data, ctx, options) {
1373
1367
  const shouldValidateTz = options.partial ? data.timezone !== void 0 : true;
1374
1368
  if (shouldValidateTz && !isValidTimezone(data.timezone)) {
1375
1369
  ctx.addIssue({
1376
- code: z31.ZodIssueCode.custom,
1370
+ code: z32.ZodIssueCode.custom,
1377
1371
  message: "Invalid IANA timezone",
1378
1372
  path: ["timezone"]
1379
1373
  });
@@ -1593,7 +1587,7 @@ export {
1593
1587
  CostAssertionSchema,
1594
1588
  CostConfigSchema,
1595
1589
  CreateAgentInputSchema,
1596
- CreateCustomAssertionInputSchema,
1590
+ CreateEvalRunFolderInputSchema,
1597
1591
  CreateEvalRunInputSchema,
1598
1592
  CreateEvalScheduleInputSchema,
1599
1593
  CreateMcpInputSchema,
@@ -1606,7 +1600,6 @@ export {
1606
1600
  CreateTemplateInputSchema,
1607
1601
  CreateTestScenarioInputSchema,
1608
1602
  CreateTestSuiteInputSchema,
1609
- CustomAssertionSchema,
1610
1603
  DEFAULT_EVALUATOR_SYSTEM_PROMPT,
1611
1604
  DEFAULT_JUDGE_MODEL,
1612
1605
  DiffContentSchema,
@@ -1614,6 +1607,8 @@ export {
1614
1607
  DiffLineTypeSchema,
1615
1608
  EnvironmentSchema,
1616
1609
  EvalMetricsSchema,
1610
+ EvalRunFolderMembershipSchema,
1611
+ EvalRunFolderSchema,
1617
1612
  EvalRunResultSchema,
1618
1613
  EvalRunSchema,
1619
1614
  EvalScheduleSchema,
@@ -1706,7 +1701,7 @@ export {
1706
1701
  TriggerSchema,
1707
1702
  TriggerType,
1708
1703
  UpdateAgentInputSchema,
1709
- UpdateCustomAssertionInputSchema,
1704
+ UpdateEvalRunFolderInputSchema,
1710
1705
  UpdateEvalScheduleInputSchema,
1711
1706
  UpdateMcpInputSchema,
1712
1707
  UpdatePresetInputSchema,
@@ -1719,9 +1714,6 @@ export {
1719
1714
  UpdateTestSuiteInputSchema,
1720
1715
  VitestTestSchema,
1721
1716
  formatTraceEventLine,
1722
- getBuildPassedConfig,
1723
- getLlmJudgeConfig,
1724
- getSkillWasCalledConfig,
1725
1717
  getSystemAssertion,
1726
1718
  getSystemAssertions,
1727
1719
  isSystemAssertionId,