@wix/evalforge-types 0.48.0 → 0.50.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/README.md +1 -1
- package/build/index.js +45 -24
- package/build/index.js.map +3 -3
- package/build/index.mjs +42 -21
- package/build/index.mjs.map +3 -3
- package/build/types/common/github-source.d.ts +3 -2
- package/build/types/evaluation/eval-run.d.ts +8 -6
- package/build/types/target/index.d.ts +1 -1
- package/build/types/target/preset.d.ts +54 -0
- package/build/types/target/sub-agent.d.ts +21 -0
- package/package.json +2 -2
- package/build/types/target/skills-group.d.ts +0 -37
package/build/index.mjs
CHANGED
|
@@ -19,7 +19,7 @@ var GitHubSourceSchema = z2.object({
|
|
|
19
19
|
owner: z2.string().min(1),
|
|
20
20
|
/** Repository name, e.g. "skills" */
|
|
21
21
|
repo: z2.string().min(1),
|
|
22
|
-
/**
|
|
22
|
+
/** Path within the repo (file or directory), e.g. "skills/my-skill" or "agents/reviewer.md" */
|
|
23
23
|
path: z2.string().min(1),
|
|
24
24
|
/** Git ref (branch, tag, or SHA), e.g. "master" or "v1.2.0" */
|
|
25
25
|
ref: z2.string().min(1)
|
|
@@ -1136,34 +1136,53 @@ var SkillWithLatestVersionSchema = SkillSchema.extend({
|
|
|
1136
1136
|
latestVersion: SkillVersionSchema.optional()
|
|
1137
1137
|
});
|
|
1138
1138
|
|
|
1139
|
-
// src/target/
|
|
1139
|
+
// src/target/sub-agent.ts
|
|
1140
1140
|
import { z as z8 } from "zod";
|
|
1141
|
-
var
|
|
1142
|
-
/**
|
|
1143
|
-
|
|
1141
|
+
var SubAgentSchema = TargetSchema.extend({
|
|
1142
|
+
/** The full sub-agent markdown content (YAML frontmatter + body) */
|
|
1143
|
+
subAgentMd: z8.string(),
|
|
1144
|
+
/** GitHub source reference for live content fetching (single .md file) */
|
|
1145
|
+
source: GitHubSourceSchema.optional()
|
|
1144
1146
|
});
|
|
1145
|
-
var
|
|
1147
|
+
var SubAgentInputBaseSchema = SubAgentSchema.omit({
|
|
1146
1148
|
id: true,
|
|
1147
1149
|
createdAt: true,
|
|
1148
1150
|
updatedAt: true,
|
|
1149
1151
|
deleted: true
|
|
1150
1152
|
});
|
|
1151
|
-
var
|
|
1153
|
+
var CreateSubAgentInputSchema = SubAgentInputBaseSchema;
|
|
1154
|
+
var UpdateSubAgentInputSchema = SubAgentInputBaseSchema.partial();
|
|
1152
1155
|
|
|
1153
|
-
// src/target/
|
|
1156
|
+
// src/target/preset.ts
|
|
1154
1157
|
import { z as z9 } from "zod";
|
|
1155
|
-
var
|
|
1156
|
-
/**
|
|
1157
|
-
|
|
1158
|
-
|
|
1159
|
-
|
|
1158
|
+
var PresetSchema = TenantEntitySchema.extend({
|
|
1159
|
+
/** Agent ID for this preset */
|
|
1160
|
+
agentId: z9.string(),
|
|
1161
|
+
/** Skill IDs included in this preset */
|
|
1162
|
+
skillIds: z9.array(z9.string()).default([]),
|
|
1163
|
+
/** Optional map of skillId → skillVersionId for version pinning */
|
|
1164
|
+
skillVersions: z9.record(z9.string(), z9.string()).optional(),
|
|
1165
|
+
/** MCP server IDs included in this preset */
|
|
1166
|
+
mcpIds: z9.array(z9.string()).default([]),
|
|
1167
|
+
/** Sub-agent IDs included in this preset */
|
|
1168
|
+
subAgentIds: z9.array(z9.string()).default([]),
|
|
1169
|
+
/** Rule IDs included in this preset */
|
|
1170
|
+
ruleIds: z9.array(z9.string()).default([])
|
|
1171
|
+
});
|
|
1172
|
+
var atLeastOneEntity = (data) => (data.skillIds?.length ?? 0) > 0 || (data.mcpIds?.length ?? 0) > 0 || (data.subAgentIds?.length ?? 0) > 0 || (data.ruleIds?.length ?? 0) > 0;
|
|
1173
|
+
var AT_LEAST_ONE_ENTITY_MESSAGE = "At least one of skillIds, mcpIds, subAgentIds, or ruleIds must be non-empty";
|
|
1174
|
+
var CreatePresetInputSchema = PresetSchema.omit({
|
|
1160
1175
|
id: true,
|
|
1161
1176
|
createdAt: true,
|
|
1162
1177
|
updatedAt: true,
|
|
1163
1178
|
deleted: true
|
|
1164
|
-
});
|
|
1165
|
-
var
|
|
1166
|
-
|
|
1179
|
+
}).refine(atLeastOneEntity, { message: AT_LEAST_ONE_ENTITY_MESSAGE });
|
|
1180
|
+
var UpdatePresetInputSchema = PresetSchema.omit({
|
|
1181
|
+
id: true,
|
|
1182
|
+
createdAt: true,
|
|
1183
|
+
updatedAt: true,
|
|
1184
|
+
deleted: true
|
|
1185
|
+
}).partial();
|
|
1167
1186
|
|
|
1168
1187
|
// src/test/index.ts
|
|
1169
1188
|
import { z as z20 } from "zod";
|
|
@@ -1868,8 +1887,10 @@ var FailureAnalysisSchema = z28.object({
|
|
|
1868
1887
|
var EvalRunSchema = TenantEntitySchema.extend({
|
|
1869
1888
|
/** Agent ID for this run */
|
|
1870
1889
|
agentId: z28.string().optional(),
|
|
1871
|
-
/**
|
|
1872
|
-
|
|
1890
|
+
/** Preset ID that originated this run (optional) */
|
|
1891
|
+
presetId: z28.string().optional(),
|
|
1892
|
+
/** Skill IDs for this run */
|
|
1893
|
+
skillIds: z28.array(z28.string()).optional(),
|
|
1873
1894
|
/** Map of skillId to skillVersionId for this run */
|
|
1874
1895
|
skillVersions: z28.record(z28.string(), z28.string()).optional(),
|
|
1875
1896
|
/** Scenario IDs to run (always present — resolved server-side from tags when needed) */
|
|
@@ -2314,11 +2335,11 @@ export {
|
|
|
2314
2335
|
CreateCustomAssertionInputSchema,
|
|
2315
2336
|
CreateEvalRunInputSchema,
|
|
2316
2337
|
CreateMcpInputSchema,
|
|
2338
|
+
CreatePresetInputSchema,
|
|
2317
2339
|
CreateProjectInputSchema,
|
|
2318
2340
|
CreateRuleInputSchema,
|
|
2319
2341
|
CreateSkillInputSchema,
|
|
2320
2342
|
CreateSkillVersionInputSchema,
|
|
2321
|
-
CreateSkillsGroupInputSchema,
|
|
2322
2343
|
CreateSubAgentInputSchema,
|
|
2323
2344
|
CreateTemplateInputSchema,
|
|
2324
2345
|
CreateTestScenarioInputSchema,
|
|
@@ -2370,6 +2391,7 @@ export {
|
|
|
2370
2391
|
Model as OpenAIModel,
|
|
2371
2392
|
OpenAIModelSchema,
|
|
2372
2393
|
PlaywrightNLTestSchema,
|
|
2394
|
+
PresetSchema,
|
|
2373
2395
|
ProjectSchema,
|
|
2374
2396
|
PromptResultSchema,
|
|
2375
2397
|
RUN_COMMAND_LABELS,
|
|
@@ -2390,7 +2412,6 @@ export {
|
|
|
2390
2412
|
SkillWasCalledAssertionSchema,
|
|
2391
2413
|
SkillWasCalledConfigSchema,
|
|
2392
2414
|
SkillWithLatestVersionSchema,
|
|
2393
|
-
SkillsGroupSchema,
|
|
2394
2415
|
SubAgentSchema,
|
|
2395
2416
|
TRACE_EVENT_PREFIX,
|
|
2396
2417
|
TargetSchema,
|
|
@@ -2421,10 +2442,10 @@ export {
|
|
|
2421
2442
|
UpdateAgentInputSchema,
|
|
2422
2443
|
UpdateCustomAssertionInputSchema,
|
|
2423
2444
|
UpdateMcpInputSchema,
|
|
2445
|
+
UpdatePresetInputSchema,
|
|
2424
2446
|
UpdateProjectInputSchema,
|
|
2425
2447
|
UpdateRuleInputSchema,
|
|
2426
2448
|
UpdateSkillInputSchema,
|
|
2427
|
-
UpdateSkillsGroupInputSchema,
|
|
2428
2449
|
UpdateSubAgentInputSchema,
|
|
2429
2450
|
UpdateTemplateInputSchema,
|
|
2430
2451
|
UpdateTestScenarioInputSchema,
|