@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/build/index.mjs
CHANGED
|
@@ -1348,7 +1348,15 @@ var TestScenarioSchema = TenantEntitySchema.extend({
|
|
|
1348
1348
|
/** Base64-encoded images attached to the trigger prompt (max 3) */
|
|
1349
1349
|
triggerPromptImages: z26.array(TriggerPromptImageSchema).max(3).optional(),
|
|
1350
1350
|
/** Optional per-scenario Wix site provisioning instructions. Absent ≡ no site. */
|
|
1351
|
-
siteSetup: SiteSetupConfigSchema.optional()
|
|
1351
|
+
siteSetup: SiteSetupConfigSchema.optional(),
|
|
1352
|
+
/**
|
|
1353
|
+
* Read-only scenarios are managed outside the UI (seeded/imported) and must
|
|
1354
|
+
* not be edited or deleted from the UI. Plain optional (no `.default(false)`):
|
|
1355
|
+
* `UpdateTestScenarioInputSchema` is the create schema `.partial()`, and a Zod
|
|
1356
|
+
* default would coerce an omitted `readOnly` back to `false` on update,
|
|
1357
|
+
* clobbering it. Defaulted to `false` at the repo/DB layer instead.
|
|
1358
|
+
*/
|
|
1359
|
+
readOnly: z26.boolean().optional()
|
|
1352
1360
|
});
|
|
1353
1361
|
var SITE_SETUP_EXCLUSIVE_VARIABLES = ["site-id"];
|
|
1354
1362
|
function extractVariableNamesFromPrompt(prompt) {
|
|
@@ -1460,7 +1468,9 @@ var BatchScenarioEntrySchema = z27.object({
|
|
|
1460
1468
|
triggerPrompt: z27.string().min(10, "triggerPrompt: Must be at least 10 characters"),
|
|
1461
1469
|
templateId: z27.string().nullish(),
|
|
1462
1470
|
tags: z27.array(z27.string()).optional(),
|
|
1463
|
-
assertionLinks: z27.array(BatchAssertionLinkSchema).optional()
|
|
1471
|
+
assertionLinks: z27.array(BatchAssertionLinkSchema).optional(),
|
|
1472
|
+
/** Mark the imported scenario as read-only (managed outside the UI). */
|
|
1473
|
+
readOnly: z27.boolean().optional()
|
|
1464
1474
|
}).superRefine((data, ctx) => {
|
|
1465
1475
|
if (!data.assertionLinks) return;
|
|
1466
1476
|
const objectLinks = data.assertionLinks.filter(
|
|
@@ -2072,6 +2082,24 @@ var CreateProjectInputSchema = ProjectSchema.omit({
|
|
|
2072
2082
|
)
|
|
2073
2083
|
});
|
|
2074
2084
|
var UpdateProjectInputSchema = CreateProjectInputSchema.partial();
|
|
2085
|
+
var APP_READINESS_REASONS = [
|
|
2086
|
+
"no-app-id",
|
|
2087
|
+
"not-registered",
|
|
2088
|
+
"missing-permission",
|
|
2089
|
+
"check-failed"
|
|
2090
|
+
];
|
|
2091
|
+
var AppReadinessReasonSchema = z35.enum(APP_READINESS_REASONS);
|
|
2092
|
+
var AppReadinessChecksSchema = z35.object({
|
|
2093
|
+
hasAppId: z35.boolean().describe("project.appId is set"),
|
|
2094
|
+
isRegistered: z35.boolean().describe("App is registered in the Wix AI Gateway (prompt-hub)"),
|
|
2095
|
+
hasEvalforgePermission: z35.boolean().describe("App has the SCOPE.CODEAI.EVALFORGE permission")
|
|
2096
|
+
});
|
|
2097
|
+
var AppReadinessStatusSchema = z35.object({
|
|
2098
|
+
appId: z35.string().nullable().describe("The configured app id, or null"),
|
|
2099
|
+
isReady: z35.boolean().describe("True only when every blocking check passes"),
|
|
2100
|
+
checks: AppReadinessChecksSchema,
|
|
2101
|
+
reasons: z35.array(AppReadinessReasonSchema).describe("Active problems; empty when ready")
|
|
2102
|
+
});
|
|
2075
2103
|
|
|
2076
2104
|
// src/template/template.ts
|
|
2077
2105
|
import { z as z36 } from "zod";
|
|
@@ -2262,6 +2290,7 @@ export {
|
|
|
2262
2290
|
AGENT_TYPE_LABELS,
|
|
2263
2291
|
ALLOWED_BUILD_COMMANDS,
|
|
2264
2292
|
ALL_AVAILABLE_MODEL_IDS,
|
|
2293
|
+
APP_READINESS_REASONS,
|
|
2265
2294
|
AVAILABLE_CLAUDE_MODEL_IDS,
|
|
2266
2295
|
AVAILABLE_GEMINI_MODEL_IDS,
|
|
2267
2296
|
AVAILABLE_OPENAI_MODEL_IDS,
|
|
@@ -2277,6 +2306,9 @@ export {
|
|
|
2277
2306
|
ApiCallAssertionSchema,
|
|
2278
2307
|
ApiCallConfigSchema,
|
|
2279
2308
|
ApiCallSchema,
|
|
2309
|
+
AppReadinessChecksSchema,
|
|
2310
|
+
AppReadinessReasonSchema,
|
|
2311
|
+
AppReadinessStatusSchema,
|
|
2280
2312
|
AssertionConfigSchema,
|
|
2281
2313
|
AssertionParameterSchema,
|
|
2282
2314
|
AssertionParameterTypeSchema,
|