@wix/evalforge-types 0.24.0 → 0.26.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
@@ -16,9 +16,9 @@ var TenantEntitySchema = BaseEntitySchema.extend({
16
16
  import { z as z2 } from "zod";
17
17
  var MCP_SERVERS_JSON_KEY = "mcpServers";
18
18
  var MCPEntitySchema = TenantEntitySchema.extend({
19
- /** Display name and key in mcp.json mcpServers object */
19
+ /** Display name for the MCP entity (independent of the server key in config) */
20
20
  name: z2.string().min(1),
21
- /** MCP server config (command/args, url/headers, etc.) - stored as-is for mcp.json */
21
+ /** Keyed MCP server config top-level key is the server name, value is its config */
22
22
  config: z2.record(z2.string(), z2.unknown())
23
23
  });
24
24
  var CreateMcpInputSchema = MCPEntitySchema.omit({
@@ -154,6 +154,8 @@ var UpdateAgentInputSchema = CreateAgentInputSchema.partial().extend({
154
154
  // src/target/skill.ts
155
155
  import { z as z5 } from "zod";
156
156
  var SKILL_FOLDER_NAME_REGEX = /^[a-z0-9]+(-[a-z0-9]+)*$/;
157
+ var SEMVER_REGEX = /^\d+\.\d+\.\d+$/;
158
+ var SkillVersionOriginSchema = z5.enum(["manual", "pr", "master"]);
157
159
  function isValidSkillFolderName(name) {
158
160
  return typeof name === "string" && name.length > 0 && SKILL_FOLDER_NAME_REGEX.test(name.trim());
159
161
  }
@@ -163,36 +165,87 @@ var SkillMetadataSchema = z5.object({
163
165
  allowedTools: z5.array(z5.string()).optional(),
164
166
  skills: z5.array(z5.string()).optional()
165
167
  });
168
+ var GitHubSourceSchema = z5.object({
169
+ /** GitHub org or user, e.g. "wix" */
170
+ owner: z5.string().min(1),
171
+ /** Repository name, e.g. "skills" */
172
+ repo: z5.string().min(1),
173
+ /** Folder path to the skill directory, e.g. "wix-cli/skills/wix-cli-dashboard-page" */
174
+ path: z5.string().min(1),
175
+ /** Git ref (branch, tag, or SHA), e.g. "master" or "v1.2.0" */
176
+ ref: z5.string().min(1)
177
+ });
178
+ var SkillFileSchema = z5.object({
179
+ /** Relative path within the skill directory, e.g. "SKILL.md" or "references/API_SPEC.md" */
180
+ path: z5.string().min(1),
181
+ /** File content (UTF-8 text) */
182
+ content: z5.string()
183
+ });
166
184
  var SkillVersionSchema = z5.object({
167
185
  id: z5.string(),
186
+ projectId: z5.string(),
168
187
  skillId: z5.string(),
169
- skillMd: z5.string(),
170
- metadata: SkillMetadataSchema,
171
- model: ModelConfigSchema.optional(),
172
- systemPrompt: z5.string().optional(),
173
- version: z5.number(),
174
- createdAt: z5.string(),
175
- notes: z5.string().optional()
188
+ /** Semver string (e.g. "1.2.0") or Falcon fingerprint */
189
+ version: z5.string(),
190
+ /** How this version was created */
191
+ origin: SkillVersionOriginSchema,
192
+ /** Where this snapshot was taken from */
193
+ source: GitHubSourceSchema.optional(),
194
+ /** Frozen snapshot of all files in the skill directory */
195
+ files: z5.array(SkillFileSchema).optional(),
196
+ /** Optional notes about this version (changelog, reason for change) */
197
+ notes: z5.string().optional(),
198
+ createdAt: z5.string()
199
+ });
200
+ var CreateSkillVersionInputSchema = z5.object({
201
+ /** GitHub source to snapshot from. If not provided, uses the Skill's source. */
202
+ source: GitHubSourceSchema.optional(),
203
+ /** Version string for this snapshot (e.g. "1.0.0", "1.0.3"). */
204
+ version: z5.string().min(1),
205
+ notes: z5.string().optional(),
206
+ /** Origin of this version. Defaults to 'manual' in backend. */
207
+ origin: SkillVersionOriginSchema.optional(),
208
+ /** Pre-edited files to store directly (bypasses GitHub fetch when provided) */
209
+ files: z5.array(SkillFileSchema).optional()
176
210
  });
177
211
  var SkillSchema = TargetSchema.extend({
178
- /** The current SKILL.md content */
179
- skillMd: z5.string()
212
+ /** GitHub source reference for live content fetching */
213
+ source: GitHubSourceSchema.optional()
180
214
  });
181
215
  var KEBAB_CASE_MESSAGE = "Name must be in kebab-case (lowercase letters, numbers, hyphens only, e.g. my-skill)";
182
216
  var SkillInputBaseSchema = SkillSchema.omit({
183
217
  id: true,
184
218
  createdAt: true,
185
219
  updatedAt: true,
186
- deleted: true
220
+ deleted: true,
221
+ description: true,
222
+ source: true
223
+ }).extend({
224
+ /** Optional - not stored on Skill; content description lives in SkillVersion */
225
+ description: z5.string().optional(),
226
+ /** GitHub source reference for live content fetching */
227
+ source: GitHubSourceSchema.optional()
228
+ });
229
+ var InitialVersionInputSchema = z5.object({
230
+ files: z5.array(SkillFileSchema).optional(),
231
+ notes: z5.string().optional(),
232
+ source: GitHubSourceSchema.optional(),
233
+ version: z5.string().optional(),
234
+ origin: SkillVersionOriginSchema.optional()
235
+ });
236
+ var CreateSkillInputSchema = SkillInputBaseSchema.extend({
237
+ initialVersion: InitialVersionInputSchema.optional()
238
+ }).refine((data) => isValidSkillFolderName(data.name), {
239
+ message: KEBAB_CASE_MESSAGE,
240
+ path: ["name"]
187
241
  });
188
- var CreateSkillInputSchema = SkillInputBaseSchema.refine(
189
- (data) => isValidSkillFolderName(data.name),
190
- { message: KEBAB_CASE_MESSAGE, path: ["name"] }
191
- );
192
242
  var UpdateSkillInputSchema = SkillInputBaseSchema.partial().refine(
193
243
  (data) => data.name === void 0 || isValidSkillFolderName(data.name),
194
244
  { message: KEBAB_CASE_MESSAGE, path: ["name"] }
195
245
  );
246
+ var SkillWithLatestVersionSchema = SkillSchema.extend({
247
+ latestVersion: SkillVersionSchema.optional()
248
+ });
196
249
 
197
250
  // src/target/skills-group.ts
198
251
  import { z as z6 } from "zod";
@@ -411,7 +464,7 @@ import { z as z19 } from "zod";
411
464
  var SkillWasCalledAssertionSchema = z19.object({
412
465
  type: z19.literal("skill_was_called"),
413
466
  /** Names of the skills that must have been called (matched against trace Skill tool args) */
414
- skillNames: z19.array(z19.string()).min(1)
467
+ skillNames: z19.array(z19.string().min(1)).min(1)
415
468
  });
416
469
  var BuildPassedAssertionSchema = z19.object({
417
470
  type: z19.literal("build_passed"),
@@ -881,6 +934,8 @@ var EvalRunSchema = TenantEntitySchema.extend({
881
934
  agentId: z26.string().optional(),
882
935
  /** Skills group ID for this run */
883
936
  skillsGroupId: z26.string().optional(),
937
+ /** Map of skillId to skillVersionId for this run */
938
+ skillVersions: z26.record(z26.string(), z26.string()).optional(),
884
939
  /** Scenario IDs to run */
885
940
  scenarioIds: z26.array(z26.string()),
886
941
  /** Current status */
@@ -978,6 +1033,10 @@ var EvalRunResultSchema = z27.object({
978
1033
  id: z27.string(),
979
1034
  targetId: z27.string(),
980
1035
  targetName: z27.string().optional(),
1036
+ /** SkillVersion ID used for this evaluation (for version tracking) */
1037
+ skillVersionId: z27.string().optional(),
1038
+ /** SkillVersion semver string (e.g., "1.0.0", "1.2.3") for display */
1039
+ skillVersion: z27.string().optional(),
981
1040
  scenarioId: z27.string(),
982
1041
  scenarioName: z27.string(),
983
1042
  modelConfig: ModelConfigSchema.optional(),
@@ -1197,6 +1256,7 @@ export {
1197
1256
  CreateMcpInputSchema,
1198
1257
  CreateProjectInputSchema,
1199
1258
  CreateSkillInputSchema,
1259
+ CreateSkillVersionInputSchema,
1200
1260
  CreateSkillsGroupInputSchema,
1201
1261
  CreateSubAgentInputSchema,
1202
1262
  CreateTemplateInputSchema,
@@ -1224,6 +1284,8 @@ export {
1224
1284
  FileContentTestSchema,
1225
1285
  FileModificationSchema,
1226
1286
  FilePresenceTestSchema,
1287
+ GitHubSourceSchema,
1288
+ InitialVersionInputSchema,
1227
1289
  LLMBreakdownStatsSchema,
1228
1290
  LLMStepType,
1229
1291
  LLMTestSchema,
@@ -1249,16 +1311,20 @@ export {
1249
1311
  PlaywrightNLTestSchema,
1250
1312
  ProjectSchema,
1251
1313
  PromptResultSchema,
1314
+ SEMVER_REGEX,
1252
1315
  SKILL_FOLDER_NAME_REGEX,
1253
1316
  SYSTEM_ASSERTIONS,
1254
1317
  SYSTEM_ASSERTION_IDS,
1255
1318
  ScenarioAssertionLinkSchema,
1256
1319
  SiteConfigTestSchema,
1320
+ SkillFileSchema,
1257
1321
  SkillMetadataSchema,
1258
1322
  SkillSchema,
1323
+ SkillVersionOriginSchema,
1259
1324
  SkillVersionSchema,
1260
1325
  SkillWasCalledAssertionSchema,
1261
1326
  SkillWasCalledConfigSchema,
1327
+ SkillWithLatestVersionSchema,
1262
1328
  SkillsGroupSchema,
1263
1329
  SubAgentSchema,
1264
1330
  TRACE_EVENT_PREFIX,