@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/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,
|
|
@@ -209,7 +209,7 @@ var GitHubSourceSchema = import_zod2.z.object({
|
|
|
209
209
|
owner: import_zod2.z.string().min(1),
|
|
210
210
|
/** Repository name, e.g. "skills" */
|
|
211
211
|
repo: import_zod2.z.string().min(1),
|
|
212
|
-
/**
|
|
212
|
+
/** Path within the repo (file or directory), e.g. "skills/my-skill" or "agents/reviewer.md" */
|
|
213
213
|
path: import_zod2.z.string().min(1),
|
|
214
214
|
/** Git ref (branch, tag, or SHA), e.g. "master" or "v1.2.0" */
|
|
215
215
|
ref: import_zod2.z.string().min(1)
|
|
@@ -1326,34 +1326,53 @@ 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
|
+
/** GitHub source reference for live content fetching (single .md file) */
|
|
1335
|
+
source: GitHubSourceSchema.optional()
|
|
1334
1336
|
});
|
|
1335
|
-
var
|
|
1337
|
+
var SubAgentInputBaseSchema = SubAgentSchema.omit({
|
|
1336
1338
|
id: true,
|
|
1337
1339
|
createdAt: true,
|
|
1338
1340
|
updatedAt: true,
|
|
1339
1341
|
deleted: true
|
|
1340
1342
|
});
|
|
1341
|
-
var
|
|
1343
|
+
var CreateSubAgentInputSchema = SubAgentInputBaseSchema;
|
|
1344
|
+
var UpdateSubAgentInputSchema = SubAgentInputBaseSchema.partial();
|
|
1342
1345
|
|
|
1343
|
-
// src/target/
|
|
1346
|
+
// src/target/preset.ts
|
|
1344
1347
|
var import_zod9 = require("zod");
|
|
1345
|
-
var
|
|
1346
|
-
/**
|
|
1347
|
-
|
|
1348
|
-
|
|
1349
|
-
|
|
1348
|
+
var PresetSchema = TenantEntitySchema.extend({
|
|
1349
|
+
/** Agent ID for this preset */
|
|
1350
|
+
agentId: import_zod9.z.string(),
|
|
1351
|
+
/** Skill IDs included in this preset */
|
|
1352
|
+
skillIds: import_zod9.z.array(import_zod9.z.string()).default([]),
|
|
1353
|
+
/** Optional map of skillId → skillVersionId for version pinning */
|
|
1354
|
+
skillVersions: import_zod9.z.record(import_zod9.z.string(), import_zod9.z.string()).optional(),
|
|
1355
|
+
/** MCP server IDs included in this preset */
|
|
1356
|
+
mcpIds: import_zod9.z.array(import_zod9.z.string()).default([]),
|
|
1357
|
+
/** Sub-agent IDs included in this preset */
|
|
1358
|
+
subAgentIds: import_zod9.z.array(import_zod9.z.string()).default([]),
|
|
1359
|
+
/** Rule IDs included in this preset */
|
|
1360
|
+
ruleIds: import_zod9.z.array(import_zod9.z.string()).default([])
|
|
1361
|
+
});
|
|
1362
|
+
var atLeastOneEntity = (data) => (data.skillIds?.length ?? 0) > 0 || (data.mcpIds?.length ?? 0) > 0 || (data.subAgentIds?.length ?? 0) > 0 || (data.ruleIds?.length ?? 0) > 0;
|
|
1363
|
+
var AT_LEAST_ONE_ENTITY_MESSAGE = "At least one of skillIds, mcpIds, subAgentIds, or ruleIds must be non-empty";
|
|
1364
|
+
var CreatePresetInputSchema = PresetSchema.omit({
|
|
1350
1365
|
id: true,
|
|
1351
1366
|
createdAt: true,
|
|
1352
1367
|
updatedAt: true,
|
|
1353
1368
|
deleted: true
|
|
1354
|
-
});
|
|
1355
|
-
var
|
|
1356
|
-
|
|
1369
|
+
}).refine(atLeastOneEntity, { message: AT_LEAST_ONE_ENTITY_MESSAGE });
|
|
1370
|
+
var UpdatePresetInputSchema = PresetSchema.omit({
|
|
1371
|
+
id: true,
|
|
1372
|
+
createdAt: true,
|
|
1373
|
+
updatedAt: true,
|
|
1374
|
+
deleted: true
|
|
1375
|
+
}).partial();
|
|
1357
1376
|
|
|
1358
1377
|
// src/test/index.ts
|
|
1359
1378
|
var import_zod20 = require("zod");
|
|
@@ -2058,8 +2077,10 @@ var FailureAnalysisSchema = import_zod28.z.object({
|
|
|
2058
2077
|
var EvalRunSchema = TenantEntitySchema.extend({
|
|
2059
2078
|
/** Agent ID for this run */
|
|
2060
2079
|
agentId: import_zod28.z.string().optional(),
|
|
2061
|
-
/**
|
|
2062
|
-
|
|
2080
|
+
/** Preset ID that originated this run (optional) */
|
|
2081
|
+
presetId: import_zod28.z.string().optional(),
|
|
2082
|
+
/** Skill IDs for this run */
|
|
2083
|
+
skillIds: import_zod28.z.array(import_zod28.z.string()).optional(),
|
|
2063
2084
|
/** Map of skillId to skillVersionId for this run */
|
|
2064
2085
|
skillVersions: import_zod28.z.record(import_zod28.z.string(), import_zod28.z.string()).optional(),
|
|
2065
2086
|
/** Scenario IDs to run (always present — resolved server-side from tags when needed) */
|
|
@@ -2505,11 +2526,11 @@ function getSystemAssertion(id) {
|
|
|
2505
2526
|
CreateCustomAssertionInputSchema,
|
|
2506
2527
|
CreateEvalRunInputSchema,
|
|
2507
2528
|
CreateMcpInputSchema,
|
|
2529
|
+
CreatePresetInputSchema,
|
|
2508
2530
|
CreateProjectInputSchema,
|
|
2509
2531
|
CreateRuleInputSchema,
|
|
2510
2532
|
CreateSkillInputSchema,
|
|
2511
2533
|
CreateSkillVersionInputSchema,
|
|
2512
|
-
CreateSkillsGroupInputSchema,
|
|
2513
2534
|
CreateSubAgentInputSchema,
|
|
2514
2535
|
CreateTemplateInputSchema,
|
|
2515
2536
|
CreateTestScenarioInputSchema,
|
|
@@ -2561,6 +2582,7 @@ function getSystemAssertion(id) {
|
|
|
2561
2582
|
OpenAIModel,
|
|
2562
2583
|
OpenAIModelSchema,
|
|
2563
2584
|
PlaywrightNLTestSchema,
|
|
2585
|
+
PresetSchema,
|
|
2564
2586
|
ProjectSchema,
|
|
2565
2587
|
PromptResultSchema,
|
|
2566
2588
|
RUN_COMMAND_LABELS,
|
|
@@ -2581,7 +2603,6 @@ function getSystemAssertion(id) {
|
|
|
2581
2603
|
SkillWasCalledAssertionSchema,
|
|
2582
2604
|
SkillWasCalledConfigSchema,
|
|
2583
2605
|
SkillWithLatestVersionSchema,
|
|
2584
|
-
SkillsGroupSchema,
|
|
2585
2606
|
SubAgentSchema,
|
|
2586
2607
|
TRACE_EVENT_PREFIX,
|
|
2587
2608
|
TargetSchema,
|
|
@@ -2612,10 +2633,10 @@ function getSystemAssertion(id) {
|
|
|
2612
2633
|
UpdateAgentInputSchema,
|
|
2613
2634
|
UpdateCustomAssertionInputSchema,
|
|
2614
2635
|
UpdateMcpInputSchema,
|
|
2636
|
+
UpdatePresetInputSchema,
|
|
2615
2637
|
UpdateProjectInputSchema,
|
|
2616
2638
|
UpdateRuleInputSchema,
|
|
2617
2639
|
UpdateSkillInputSchema,
|
|
2618
|
-
UpdateSkillsGroupInputSchema,
|
|
2619
2640
|
UpdateSubAgentInputSchema,
|
|
2620
2641
|
UpdateTemplateInputSchema,
|
|
2621
2642
|
UpdateTestScenarioInputSchema,
|