@wix/evalforge-types 0.47.0 → 0.49.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
@@ -1136,34 +1136,51 @@ var SkillWithLatestVersionSchema = SkillSchema.extend({
1136
1136
  latestVersion: SkillVersionSchema.optional()
1137
1137
  });
1138
1138
 
1139
- // src/target/skills-group.ts
1139
+ // src/target/sub-agent.ts
1140
1140
  import { z as z8 } from "zod";
1141
- var SkillsGroupSchema = TenantEntitySchema.extend({
1142
- /** IDs of skills in this group */
1143
- skillIds: z8.array(z8.string())
1141
+ var SubAgentSchema = TargetSchema.extend({
1142
+ /** The full sub-agent markdown content (YAML frontmatter + body) */
1143
+ subAgentMd: z8.string()
1144
1144
  });
1145
- var CreateSkillsGroupInputSchema = SkillsGroupSchema.omit({
1145
+ var SubAgentInputBaseSchema = SubAgentSchema.omit({
1146
1146
  id: true,
1147
1147
  createdAt: true,
1148
1148
  updatedAt: true,
1149
1149
  deleted: true
1150
1150
  });
1151
- var UpdateSkillsGroupInputSchema = CreateSkillsGroupInputSchema.partial();
1151
+ var CreateSubAgentInputSchema = SubAgentInputBaseSchema;
1152
+ var UpdateSubAgentInputSchema = SubAgentInputBaseSchema.partial();
1152
1153
 
1153
- // src/target/sub-agent.ts
1154
+ // src/target/preset.ts
1154
1155
  import { z as z9 } from "zod";
1155
- var SubAgentSchema = TargetSchema.extend({
1156
- /** The full sub-agent markdown content (YAML frontmatter + body) */
1157
- subAgentMd: z9.string()
1158
- });
1159
- var SubAgentInputBaseSchema = SubAgentSchema.omit({
1156
+ var PresetSchema = TenantEntitySchema.extend({
1157
+ /** Agent ID for this preset */
1158
+ agentId: z9.string(),
1159
+ /** Skill IDs included in this preset */
1160
+ skillIds: z9.array(z9.string()).default([]),
1161
+ /** Optional map of skillId → skillVersionId for version pinning */
1162
+ skillVersions: z9.record(z9.string(), z9.string()).optional(),
1163
+ /** MCP server IDs included in this preset */
1164
+ mcpIds: z9.array(z9.string()).default([]),
1165
+ /** Sub-agent IDs included in this preset */
1166
+ subAgentIds: z9.array(z9.string()).default([]),
1167
+ /** Rule IDs included in this preset */
1168
+ ruleIds: z9.array(z9.string()).default([])
1169
+ });
1170
+ var atLeastOneEntity = (data) => (data.skillIds?.length ?? 0) > 0 || (data.mcpIds?.length ?? 0) > 0 || (data.subAgentIds?.length ?? 0) > 0 || (data.ruleIds?.length ?? 0) > 0;
1171
+ var AT_LEAST_ONE_ENTITY_MESSAGE = "At least one of skillIds, mcpIds, subAgentIds, or ruleIds must be non-empty";
1172
+ var CreatePresetInputSchema = PresetSchema.omit({
1160
1173
  id: true,
1161
1174
  createdAt: true,
1162
1175
  updatedAt: true,
1163
1176
  deleted: true
1164
- });
1165
- var CreateSubAgentInputSchema = SubAgentInputBaseSchema;
1166
- var UpdateSubAgentInputSchema = SubAgentInputBaseSchema.partial();
1177
+ }).refine(atLeastOneEntity, { message: AT_LEAST_ONE_ENTITY_MESSAGE });
1178
+ var UpdatePresetInputSchema = PresetSchema.omit({
1179
+ id: true,
1180
+ createdAt: true,
1181
+ updatedAt: true,
1182
+ deleted: true
1183
+ }).partial();
1167
1184
 
1168
1185
  // src/test/index.ts
1169
1186
  import { z as z20 } from "zod";
@@ -1601,7 +1618,9 @@ var TestScenarioSchema = TenantEntitySchema.extend({
1601
1618
  /** IDs of saved assertions to evaluate (from assertions table) - legacy, use assertionLinks */
1602
1619
  assertionIds: z24.array(z24.string()).optional(),
1603
1620
  /** Linked assertions with per-scenario parameter values */
1604
- assertionLinks: z24.array(ScenarioAssertionLinkSchema).optional()
1621
+ assertionLinks: z24.array(ScenarioAssertionLinkSchema).optional(),
1622
+ /** Tags for categorisation and filtering */
1623
+ tags: z24.array(z24.string()).optional()
1605
1624
  });
1606
1625
  var CreateTestScenarioInputSchema = TestScenarioSchema.omit({
1607
1626
  id: true,
@@ -1866,11 +1885,13 @@ var FailureAnalysisSchema = z28.object({
1866
1885
  var EvalRunSchema = TenantEntitySchema.extend({
1867
1886
  /** Agent ID for this run */
1868
1887
  agentId: z28.string().optional(),
1869
- /** Skills group ID for this run */
1870
- skillsGroupId: z28.string().optional(),
1888
+ /** Preset ID that originated this run (optional) */
1889
+ presetId: z28.string().optional(),
1890
+ /** Skill IDs for this run */
1891
+ skillIds: z28.array(z28.string()).optional(),
1871
1892
  /** Map of skillId to skillVersionId for this run */
1872
1893
  skillVersions: z28.record(z28.string(), z28.string()).optional(),
1873
- /** Scenario IDs to run */
1894
+ /** Scenario IDs to run (always present — resolved server-side from tags when needed) */
1874
1895
  scenarioIds: z28.array(z28.string()),
1875
1896
  /** Current status */
1876
1897
  status: EvalStatusSchema,
@@ -1905,7 +1926,9 @@ var EvalRunSchema = TenantEntitySchema.extend({
1905
1926
  /** Sub-agent IDs to enable for this run (optional) */
1906
1927
  subAgentIds: z28.array(z28.string()).optional(),
1907
1928
  /** Rule IDs to enable for this run (optional) */
1908
- ruleIds: z28.array(z28.string()).optional()
1929
+ ruleIds: z28.array(z28.string()).optional(),
1930
+ /** Tags used to select scenarios for this run (for traceability) */
1931
+ tags: z28.array(z28.string()).optional()
1909
1932
  });
1910
1933
  var CreateEvalRunInputSchema = EvalRunSchema.omit({
1911
1934
  id: true,
@@ -1916,8 +1939,15 @@ var CreateEvalRunInputSchema = EvalRunSchema.omit({
1916
1939
  results: true,
1917
1940
  aggregateMetrics: true,
1918
1941
  startedAt: true,
1919
- completedAt: true
1920
- });
1942
+ completedAt: true,
1943
+ scenarioIds: true
1944
+ }).extend({
1945
+ /** Optional on input — backend resolves from tags when not provided */
1946
+ scenarioIds: z28.array(z28.string()).optional()
1947
+ }).refine(
1948
+ (data) => data.scenarioIds && data.scenarioIds.length > 0 || data.tags && data.tags.length > 0,
1949
+ { message: "Either scenarioIds or tags must be provided" }
1950
+ );
1921
1951
  var EvaluationProgressSchema = z28.object({
1922
1952
  runId: z28.string(),
1923
1953
  targetId: z28.string(),
@@ -2091,7 +2121,8 @@ var ProjectSchema = BaseEntitySchema.extend({
2091
2121
  appId: z31.string().optional().describe("The ID of the app in Dev Center"),
2092
2122
  appSecret: z31.string().optional().describe("The secret of the app in Dev Center"),
2093
2123
  useWixAuth: z31.boolean().optional().describe("Enable Wix CLI/MCP auth for evaluations"),
2094
- useBase44Auth: z31.boolean().optional().describe("Enable Base44 auth for evaluations")
2124
+ useBase44Auth: z31.boolean().optional().describe("Enable Base44 auth for evaluations"),
2125
+ scenarioTags: z31.array(z31.string()).optional().describe("Project-level tag vocabulary for scenarios")
2095
2126
  });
2096
2127
  var CreateProjectInputSchema = ProjectSchema.omit({
2097
2128
  id: true,
@@ -2302,11 +2333,11 @@ export {
2302
2333
  CreateCustomAssertionInputSchema,
2303
2334
  CreateEvalRunInputSchema,
2304
2335
  CreateMcpInputSchema,
2336
+ CreatePresetInputSchema,
2305
2337
  CreateProjectInputSchema,
2306
2338
  CreateRuleInputSchema,
2307
2339
  CreateSkillInputSchema,
2308
2340
  CreateSkillVersionInputSchema,
2309
- CreateSkillsGroupInputSchema,
2310
2341
  CreateSubAgentInputSchema,
2311
2342
  CreateTemplateInputSchema,
2312
2343
  CreateTestScenarioInputSchema,
@@ -2358,6 +2389,7 @@ export {
2358
2389
  Model as OpenAIModel,
2359
2390
  OpenAIModelSchema,
2360
2391
  PlaywrightNLTestSchema,
2392
+ PresetSchema,
2361
2393
  ProjectSchema,
2362
2394
  PromptResultSchema,
2363
2395
  RUN_COMMAND_LABELS,
@@ -2378,7 +2410,6 @@ export {
2378
2410
  SkillWasCalledAssertionSchema,
2379
2411
  SkillWasCalledConfigSchema,
2380
2412
  SkillWithLatestVersionSchema,
2381
- SkillsGroupSchema,
2382
2413
  SubAgentSchema,
2383
2414
  TRACE_EVENT_PREFIX,
2384
2415
  TargetSchema,
@@ -2409,10 +2440,10 @@ export {
2409
2440
  UpdateAgentInputSchema,
2410
2441
  UpdateCustomAssertionInputSchema,
2411
2442
  UpdateMcpInputSchema,
2443
+ UpdatePresetInputSchema,
2412
2444
  UpdateProjectInputSchema,
2413
2445
  UpdateRuleInputSchema,
2414
2446
  UpdateSkillInputSchema,
2415
- UpdateSkillsGroupInputSchema,
2416
2447
  UpdateSubAgentInputSchema,
2417
2448
  UpdateTemplateInputSchema,
2418
2449
  UpdateTestScenarioInputSchema,