@wix/evalforge-types 0.48.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/README.md +1 -1
- package/build/index.js +42 -23
- package/build/index.js.map +3 -3
- package/build/index.mjs +39 -20
- package/build/index.mjs.map +3 -3
- 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/package.json +2 -2
- package/build/types/target/skills-group.d.ts +0 -37
package/README.md
CHANGED
|
@@ -9,7 +9,7 @@ Shared TypeScript types and [Zod](https://zod.dev/) schemas for the EvalForge pl
|
|
|
9
9
|
| Module | Description |
|
|
10
10
|
|--------|-------------|
|
|
11
11
|
| `common` | Base entity schemas (`BaseEntity`, `TenantEntity`), `Rule`, shared utilities |
|
|
12
|
-
| `target` | Testable entities — `Agent`, `Skill`, `SkillVersion`, `
|
|
12
|
+
| `target` | Testable entities — `Agent`, `Skill`, `SkillVersion`, `Preset`, `Mcp`, `SubAgent` |
|
|
13
13
|
| `scenario` | Test scenario definitions and environment configuration |
|
|
14
14
|
| `suite` | Test suite organization |
|
|
15
15
|
| `evaluation` | Eval run schemas, configs, results, and statuses |
|
package/build/index.js
CHANGED
|
@@ -59,11 +59,11 @@ __export(index_exports, {
|
|
|
59
59
|
CreateCustomAssertionInputSchema: () => CreateCustomAssertionInputSchema,
|
|
60
60
|
CreateEvalRunInputSchema: () => CreateEvalRunInputSchema,
|
|
61
61
|
CreateMcpInputSchema: () => CreateMcpInputSchema,
|
|
62
|
+
CreatePresetInputSchema: () => CreatePresetInputSchema,
|
|
62
63
|
CreateProjectInputSchema: () => CreateProjectInputSchema,
|
|
63
64
|
CreateRuleInputSchema: () => CreateRuleInputSchema,
|
|
64
65
|
CreateSkillInputSchema: () => CreateSkillInputSchema,
|
|
65
66
|
CreateSkillVersionInputSchema: () => CreateSkillVersionInputSchema,
|
|
66
|
-
CreateSkillsGroupInputSchema: () => CreateSkillsGroupInputSchema,
|
|
67
67
|
CreateSubAgentInputSchema: () => CreateSubAgentInputSchema,
|
|
68
68
|
CreateTemplateInputSchema: () => CreateTemplateInputSchema,
|
|
69
69
|
CreateTestScenarioInputSchema: () => CreateTestScenarioInputSchema,
|
|
@@ -115,6 +115,7 @@ __export(index_exports, {
|
|
|
115
115
|
OpenAIModel: () => Model,
|
|
116
116
|
OpenAIModelSchema: () => OpenAIModelSchema,
|
|
117
117
|
PlaywrightNLTestSchema: () => PlaywrightNLTestSchema,
|
|
118
|
+
PresetSchema: () => PresetSchema,
|
|
118
119
|
ProjectSchema: () => ProjectSchema,
|
|
119
120
|
PromptResultSchema: () => PromptResultSchema,
|
|
120
121
|
RUN_COMMAND_LABELS: () => RUN_COMMAND_LABELS,
|
|
@@ -135,7 +136,6 @@ __export(index_exports, {
|
|
|
135
136
|
SkillWasCalledAssertionSchema: () => SkillWasCalledAssertionSchema,
|
|
136
137
|
SkillWasCalledConfigSchema: () => SkillWasCalledConfigSchema,
|
|
137
138
|
SkillWithLatestVersionSchema: () => SkillWithLatestVersionSchema,
|
|
138
|
-
SkillsGroupSchema: () => SkillsGroupSchema,
|
|
139
139
|
SubAgentSchema: () => SubAgentSchema,
|
|
140
140
|
TRACE_EVENT_PREFIX: () => TRACE_EVENT_PREFIX,
|
|
141
141
|
TargetSchema: () => TargetSchema,
|
|
@@ -166,10 +166,10 @@ __export(index_exports, {
|
|
|
166
166
|
UpdateAgentInputSchema: () => UpdateAgentInputSchema,
|
|
167
167
|
UpdateCustomAssertionInputSchema: () => UpdateCustomAssertionInputSchema,
|
|
168
168
|
UpdateMcpInputSchema: () => UpdateMcpInputSchema,
|
|
169
|
+
UpdatePresetInputSchema: () => UpdatePresetInputSchema,
|
|
169
170
|
UpdateProjectInputSchema: () => UpdateProjectInputSchema,
|
|
170
171
|
UpdateRuleInputSchema: () => UpdateRuleInputSchema,
|
|
171
172
|
UpdateSkillInputSchema: () => UpdateSkillInputSchema,
|
|
172
|
-
UpdateSkillsGroupInputSchema: () => UpdateSkillsGroupInputSchema,
|
|
173
173
|
UpdateSubAgentInputSchema: () => UpdateSubAgentInputSchema,
|
|
174
174
|
UpdateTemplateInputSchema: () => UpdateTemplateInputSchema,
|
|
175
175
|
UpdateTestScenarioInputSchema: () => UpdateTestScenarioInputSchema,
|
|
@@ -1326,34 +1326,51 @@ var SkillWithLatestVersionSchema = SkillSchema.extend({
|
|
|
1326
1326
|
latestVersion: SkillVersionSchema.optional()
|
|
1327
1327
|
});
|
|
1328
1328
|
|
|
1329
|
-
// src/target/
|
|
1329
|
+
// src/target/sub-agent.ts
|
|
1330
1330
|
var import_zod8 = require("zod");
|
|
1331
|
-
var
|
|
1332
|
-
/**
|
|
1333
|
-
|
|
1331
|
+
var SubAgentSchema = TargetSchema.extend({
|
|
1332
|
+
/** The full sub-agent markdown content (YAML frontmatter + body) */
|
|
1333
|
+
subAgentMd: import_zod8.z.string()
|
|
1334
1334
|
});
|
|
1335
|
-
var
|
|
1335
|
+
var SubAgentInputBaseSchema = SubAgentSchema.omit({
|
|
1336
1336
|
id: true,
|
|
1337
1337
|
createdAt: true,
|
|
1338
1338
|
updatedAt: true,
|
|
1339
1339
|
deleted: true
|
|
1340
1340
|
});
|
|
1341
|
-
var
|
|
1341
|
+
var CreateSubAgentInputSchema = SubAgentInputBaseSchema;
|
|
1342
|
+
var UpdateSubAgentInputSchema = SubAgentInputBaseSchema.partial();
|
|
1342
1343
|
|
|
1343
|
-
// src/target/
|
|
1344
|
+
// src/target/preset.ts
|
|
1344
1345
|
var import_zod9 = require("zod");
|
|
1345
|
-
var
|
|
1346
|
-
/**
|
|
1347
|
-
|
|
1348
|
-
|
|
1349
|
-
|
|
1346
|
+
var PresetSchema = TenantEntitySchema.extend({
|
|
1347
|
+
/** Agent ID for this preset */
|
|
1348
|
+
agentId: import_zod9.z.string(),
|
|
1349
|
+
/** Skill IDs included in this preset */
|
|
1350
|
+
skillIds: import_zod9.z.array(import_zod9.z.string()).default([]),
|
|
1351
|
+
/** Optional map of skillId → skillVersionId for version pinning */
|
|
1352
|
+
skillVersions: import_zod9.z.record(import_zod9.z.string(), import_zod9.z.string()).optional(),
|
|
1353
|
+
/** MCP server IDs included in this preset */
|
|
1354
|
+
mcpIds: import_zod9.z.array(import_zod9.z.string()).default([]),
|
|
1355
|
+
/** Sub-agent IDs included in this preset */
|
|
1356
|
+
subAgentIds: import_zod9.z.array(import_zod9.z.string()).default([]),
|
|
1357
|
+
/** Rule IDs included in this preset */
|
|
1358
|
+
ruleIds: import_zod9.z.array(import_zod9.z.string()).default([])
|
|
1359
|
+
});
|
|
1360
|
+
var atLeastOneEntity = (data) => (data.skillIds?.length ?? 0) > 0 || (data.mcpIds?.length ?? 0) > 0 || (data.subAgentIds?.length ?? 0) > 0 || (data.ruleIds?.length ?? 0) > 0;
|
|
1361
|
+
var AT_LEAST_ONE_ENTITY_MESSAGE = "At least one of skillIds, mcpIds, subAgentIds, or ruleIds must be non-empty";
|
|
1362
|
+
var CreatePresetInputSchema = PresetSchema.omit({
|
|
1350
1363
|
id: true,
|
|
1351
1364
|
createdAt: true,
|
|
1352
1365
|
updatedAt: true,
|
|
1353
1366
|
deleted: true
|
|
1354
|
-
});
|
|
1355
|
-
var
|
|
1356
|
-
|
|
1367
|
+
}).refine(atLeastOneEntity, { message: AT_LEAST_ONE_ENTITY_MESSAGE });
|
|
1368
|
+
var UpdatePresetInputSchema = PresetSchema.omit({
|
|
1369
|
+
id: true,
|
|
1370
|
+
createdAt: true,
|
|
1371
|
+
updatedAt: true,
|
|
1372
|
+
deleted: true
|
|
1373
|
+
}).partial();
|
|
1357
1374
|
|
|
1358
1375
|
// src/test/index.ts
|
|
1359
1376
|
var import_zod20 = require("zod");
|
|
@@ -2058,8 +2075,10 @@ var FailureAnalysisSchema = import_zod28.z.object({
|
|
|
2058
2075
|
var EvalRunSchema = TenantEntitySchema.extend({
|
|
2059
2076
|
/** Agent ID for this run */
|
|
2060
2077
|
agentId: import_zod28.z.string().optional(),
|
|
2061
|
-
/**
|
|
2062
|
-
|
|
2078
|
+
/** Preset ID that originated this run (optional) */
|
|
2079
|
+
presetId: import_zod28.z.string().optional(),
|
|
2080
|
+
/** Skill IDs for this run */
|
|
2081
|
+
skillIds: import_zod28.z.array(import_zod28.z.string()).optional(),
|
|
2063
2082
|
/** Map of skillId to skillVersionId for this run */
|
|
2064
2083
|
skillVersions: import_zod28.z.record(import_zod28.z.string(), import_zod28.z.string()).optional(),
|
|
2065
2084
|
/** Scenario IDs to run (always present — resolved server-side from tags when needed) */
|
|
@@ -2505,11 +2524,11 @@ function getSystemAssertion(id) {
|
|
|
2505
2524
|
CreateCustomAssertionInputSchema,
|
|
2506
2525
|
CreateEvalRunInputSchema,
|
|
2507
2526
|
CreateMcpInputSchema,
|
|
2527
|
+
CreatePresetInputSchema,
|
|
2508
2528
|
CreateProjectInputSchema,
|
|
2509
2529
|
CreateRuleInputSchema,
|
|
2510
2530
|
CreateSkillInputSchema,
|
|
2511
2531
|
CreateSkillVersionInputSchema,
|
|
2512
|
-
CreateSkillsGroupInputSchema,
|
|
2513
2532
|
CreateSubAgentInputSchema,
|
|
2514
2533
|
CreateTemplateInputSchema,
|
|
2515
2534
|
CreateTestScenarioInputSchema,
|
|
@@ -2561,6 +2580,7 @@ function getSystemAssertion(id) {
|
|
|
2561
2580
|
OpenAIModel,
|
|
2562
2581
|
OpenAIModelSchema,
|
|
2563
2582
|
PlaywrightNLTestSchema,
|
|
2583
|
+
PresetSchema,
|
|
2564
2584
|
ProjectSchema,
|
|
2565
2585
|
PromptResultSchema,
|
|
2566
2586
|
RUN_COMMAND_LABELS,
|
|
@@ -2581,7 +2601,6 @@ function getSystemAssertion(id) {
|
|
|
2581
2601
|
SkillWasCalledAssertionSchema,
|
|
2582
2602
|
SkillWasCalledConfigSchema,
|
|
2583
2603
|
SkillWithLatestVersionSchema,
|
|
2584
|
-
SkillsGroupSchema,
|
|
2585
2604
|
SubAgentSchema,
|
|
2586
2605
|
TRACE_EVENT_PREFIX,
|
|
2587
2606
|
TargetSchema,
|
|
@@ -2612,10 +2631,10 @@ function getSystemAssertion(id) {
|
|
|
2612
2631
|
UpdateAgentInputSchema,
|
|
2613
2632
|
UpdateCustomAssertionInputSchema,
|
|
2614
2633
|
UpdateMcpInputSchema,
|
|
2634
|
+
UpdatePresetInputSchema,
|
|
2615
2635
|
UpdateProjectInputSchema,
|
|
2616
2636
|
UpdateRuleInputSchema,
|
|
2617
2637
|
UpdateSkillInputSchema,
|
|
2618
|
-
UpdateSkillsGroupInputSchema,
|
|
2619
2638
|
UpdateSubAgentInputSchema,
|
|
2620
2639
|
UpdateTemplateInputSchema,
|
|
2621
2640
|
UpdateTestScenarioInputSchema,
|