@wix/evalforge-types 0.96.0 → 0.98.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 +38 -2
- package/build/index.js.map +2 -2
- package/build/index.mjs +34 -2
- package/build/index.mjs.map +2 -2
- package/build/types/project/project.d.ts +39 -0
- package/build/types/scenario/batch-import.d.ts +2 -0
- package/build/types/scenario/test-scenario.d.ts +3 -0
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -13,7 +13,7 @@ Shared TypeScript types and [Zod](https://zod.dev/) schemas for the EvalForge pl
|
|
|
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 |
|
|
16
|
-
| `project` | Project schemas (multi-tenancy root) |
|
|
16
|
+
| `project` | Project schemas (multi-tenancy root), plus `AppReadinessStatus` (AI-Gateway app readiness: registration + EvalForge permission) |
|
|
17
17
|
| `template` | Project template schemas |
|
|
18
18
|
| `schedule` | Recurring evaluation schedule schemas (`EvalSchedule`, `FrequencyType`) |
|
|
19
19
|
| `assertion` | Custom assertion definitions; `system:build_passed` restricts `params.command` to an allowlisted set (`yarn build`, `npm run build`, `pnpm run build`, `pnpm build`) |
|
package/build/index.js
CHANGED
|
@@ -23,6 +23,7 @@ __export(index_exports, {
|
|
|
23
23
|
AGENT_TYPE_LABELS: () => AGENT_TYPE_LABELS,
|
|
24
24
|
ALLOWED_BUILD_COMMANDS: () => ALLOWED_BUILD_COMMANDS,
|
|
25
25
|
ALL_AVAILABLE_MODEL_IDS: () => ALL_AVAILABLE_MODEL_IDS,
|
|
26
|
+
APP_READINESS_REASONS: () => APP_READINESS_REASONS,
|
|
26
27
|
AVAILABLE_CLAUDE_MODEL_IDS: () => AVAILABLE_CLAUDE_MODEL_IDS,
|
|
27
28
|
AVAILABLE_GEMINI_MODEL_IDS: () => AVAILABLE_GEMINI_MODEL_IDS,
|
|
28
29
|
AVAILABLE_OPENAI_MODEL_IDS: () => AVAILABLE_OPENAI_MODEL_IDS,
|
|
@@ -38,6 +39,9 @@ __export(index_exports, {
|
|
|
38
39
|
ApiCallAssertionSchema: () => ApiCallAssertionSchema,
|
|
39
40
|
ApiCallConfigSchema: () => ApiCallConfigSchema,
|
|
40
41
|
ApiCallSchema: () => ApiCallSchema,
|
|
42
|
+
AppReadinessChecksSchema: () => AppReadinessChecksSchema,
|
|
43
|
+
AppReadinessReasonSchema: () => AppReadinessReasonSchema,
|
|
44
|
+
AppReadinessStatusSchema: () => AppReadinessStatusSchema,
|
|
41
45
|
AssertionConfigSchema: () => AssertionConfigSchema,
|
|
42
46
|
AssertionParameterSchema: () => AssertionParameterSchema,
|
|
43
47
|
AssertionParameterTypeSchema: () => AssertionParameterTypeSchema,
|
|
@@ -1613,7 +1617,15 @@ var TestScenarioSchema = TenantEntitySchema.extend({
|
|
|
1613
1617
|
/** Base64-encoded images attached to the trigger prompt (max 3) */
|
|
1614
1618
|
triggerPromptImages: import_zod26.z.array(TriggerPromptImageSchema).max(3).optional(),
|
|
1615
1619
|
/** Optional per-scenario Wix site provisioning instructions. Absent ≡ no site. */
|
|
1616
|
-
siteSetup: SiteSetupConfigSchema.optional()
|
|
1620
|
+
siteSetup: SiteSetupConfigSchema.optional(),
|
|
1621
|
+
/**
|
|
1622
|
+
* Read-only scenarios are managed outside the UI (seeded/imported) and must
|
|
1623
|
+
* not be edited or deleted from the UI. Plain optional (no `.default(false)`):
|
|
1624
|
+
* `UpdateTestScenarioInputSchema` is the create schema `.partial()`, and a Zod
|
|
1625
|
+
* default would coerce an omitted `readOnly` back to `false` on update,
|
|
1626
|
+
* clobbering it. Defaulted to `false` at the repo/DB layer instead.
|
|
1627
|
+
*/
|
|
1628
|
+
readOnly: import_zod26.z.boolean().optional()
|
|
1617
1629
|
});
|
|
1618
1630
|
var SITE_SETUP_EXCLUSIVE_VARIABLES = ["site-id"];
|
|
1619
1631
|
function extractVariableNamesFromPrompt(prompt) {
|
|
@@ -1725,7 +1737,9 @@ var BatchScenarioEntrySchema = import_zod27.z.object({
|
|
|
1725
1737
|
triggerPrompt: import_zod27.z.string().min(10, "triggerPrompt: Must be at least 10 characters"),
|
|
1726
1738
|
templateId: import_zod27.z.string().nullish(),
|
|
1727
1739
|
tags: import_zod27.z.array(import_zod27.z.string()).optional(),
|
|
1728
|
-
assertionLinks: import_zod27.z.array(BatchAssertionLinkSchema).optional()
|
|
1740
|
+
assertionLinks: import_zod27.z.array(BatchAssertionLinkSchema).optional(),
|
|
1741
|
+
/** Mark the imported scenario as read-only (managed outside the UI). */
|
|
1742
|
+
readOnly: import_zod27.z.boolean().optional()
|
|
1729
1743
|
}).superRefine((data, ctx) => {
|
|
1730
1744
|
if (!data.assertionLinks) return;
|
|
1731
1745
|
const objectLinks = data.assertionLinks.filter(
|
|
@@ -2337,6 +2351,24 @@ var CreateProjectInputSchema = ProjectSchema.omit({
|
|
|
2337
2351
|
)
|
|
2338
2352
|
});
|
|
2339
2353
|
var UpdateProjectInputSchema = CreateProjectInputSchema.partial();
|
|
2354
|
+
var APP_READINESS_REASONS = [
|
|
2355
|
+
"no-app-id",
|
|
2356
|
+
"not-registered",
|
|
2357
|
+
"missing-permission",
|
|
2358
|
+
"check-failed"
|
|
2359
|
+
];
|
|
2360
|
+
var AppReadinessReasonSchema = import_zod35.z.enum(APP_READINESS_REASONS);
|
|
2361
|
+
var AppReadinessChecksSchema = import_zod35.z.object({
|
|
2362
|
+
hasAppId: import_zod35.z.boolean().describe("project.appId is set"),
|
|
2363
|
+
isRegistered: import_zod35.z.boolean().describe("App is registered in the Wix AI Gateway (prompt-hub)"),
|
|
2364
|
+
hasEvalforgePermission: import_zod35.z.boolean().describe("App has the SCOPE.CODEAI.EVALFORGE permission")
|
|
2365
|
+
});
|
|
2366
|
+
var AppReadinessStatusSchema = import_zod35.z.object({
|
|
2367
|
+
appId: import_zod35.z.string().nullable().describe("The configured app id, or null"),
|
|
2368
|
+
isReady: import_zod35.z.boolean().describe("True only when every blocking check passes"),
|
|
2369
|
+
checks: AppReadinessChecksSchema,
|
|
2370
|
+
reasons: import_zod35.z.array(AppReadinessReasonSchema).describe("Active problems; empty when ready")
|
|
2371
|
+
});
|
|
2340
2372
|
|
|
2341
2373
|
// src/template/template.ts
|
|
2342
2374
|
var import_zod36 = require("zod");
|
|
@@ -2528,6 +2560,7 @@ var UpdateEvalScheduleInputSchema = BaseCreateScheduleSchema.partial().superRefi
|
|
|
2528
2560
|
AGENT_TYPE_LABELS,
|
|
2529
2561
|
ALLOWED_BUILD_COMMANDS,
|
|
2530
2562
|
ALL_AVAILABLE_MODEL_IDS,
|
|
2563
|
+
APP_READINESS_REASONS,
|
|
2531
2564
|
AVAILABLE_CLAUDE_MODEL_IDS,
|
|
2532
2565
|
AVAILABLE_GEMINI_MODEL_IDS,
|
|
2533
2566
|
AVAILABLE_OPENAI_MODEL_IDS,
|
|
@@ -2543,6 +2576,9 @@ var UpdateEvalScheduleInputSchema = BaseCreateScheduleSchema.partial().superRefi
|
|
|
2543
2576
|
ApiCallAssertionSchema,
|
|
2544
2577
|
ApiCallConfigSchema,
|
|
2545
2578
|
ApiCallSchema,
|
|
2579
|
+
AppReadinessChecksSchema,
|
|
2580
|
+
AppReadinessReasonSchema,
|
|
2581
|
+
AppReadinessStatusSchema,
|
|
2546
2582
|
AssertionConfigSchema,
|
|
2547
2583
|
AssertionParameterSchema,
|
|
2548
2584
|
AssertionParameterTypeSchema,
|