@wix/evalforge-types 0.72.0 → 0.74.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.
@@ -91,8 +91,13 @@ export declare const ToolCalledWithParamConfigSchema: z.ZodObject<{
91
91
  * Uses strictObject to reject objects with unknown keys (prevents matching LlmJudge configs).
92
92
  */
93
93
  export declare const BuildPassedConfigSchema: z.ZodObject<{
94
- /** Command to run (default: "yarn build") */
95
- command: z.ZodOptional<z.ZodString>;
94
+ /** Allowlisted command only (default at runtime: "yarn build") */
95
+ command: z.ZodOptional<z.ZodEnum<{
96
+ "npm run build": "npm run build";
97
+ "yarn build": "yarn build";
98
+ "pnpm run build": "pnpm run build";
99
+ "pnpm build": "pnpm build";
100
+ }>>;
96
101
  /** Expected exit code (default: 0) */
97
102
  expectedExitCode: z.ZodOptional<z.ZodNumber>;
98
103
  }, z.core.$strict>;
@@ -168,7 +173,12 @@ export declare const ToolCalledWithParamAssertionSchema: z.ZodObject<{
168
173
  }, z.core.$strict>;
169
174
  export type ToolCalledWithParamAssertion = z.infer<typeof ToolCalledWithParamAssertionSchema>;
170
175
  export declare const BuildPassedAssertionSchema: z.ZodObject<{
171
- command: z.ZodOptional<z.ZodString>;
176
+ command: z.ZodOptional<z.ZodEnum<{
177
+ "npm run build": "npm run build";
178
+ "yarn build": "yarn build";
179
+ "pnpm run build": "pnpm run build";
180
+ "pnpm build": "pnpm build";
181
+ }>>;
172
182
  expectedExitCode: z.ZodOptional<z.ZodNumber>;
173
183
  negate: z.ZodOptional<z.ZodBoolean>;
174
184
  type: z.ZodLiteral<"build_passed">;
@@ -237,7 +247,12 @@ export declare const AssertionSchema: z.ZodUnion<readonly [z.ZodObject<{
237
247
  negate: z.ZodOptional<z.ZodBoolean>;
238
248
  type: z.ZodLiteral<"tool_called_with_param">;
239
249
  }, z.core.$strict>, z.ZodObject<{
240
- command: z.ZodOptional<z.ZodString>;
250
+ command: z.ZodOptional<z.ZodEnum<{
251
+ "npm run build": "npm run build";
252
+ "yarn build": "yarn build";
253
+ "pnpm run build": "pnpm run build";
254
+ "pnpm build": "pnpm build";
255
+ }>>;
241
256
  expectedExitCode: z.ZodOptional<z.ZodNumber>;
242
257
  negate: z.ZodOptional<z.ZodBoolean>;
243
258
  type: z.ZodLiteral<"build_passed">;
@@ -339,8 +354,13 @@ export declare const AssertionConfigSchema: z.ZodUnion<readonly [z.ZodObject<{
339
354
  /** Maximum allowed cost in USD */
340
355
  maxCostUsd: z.ZodNumber;
341
356
  }, z.core.$strict>, z.ZodObject<{
342
- /** Command to run (default: "yarn build") */
343
- command: z.ZodOptional<z.ZodString>;
357
+ /** Allowlisted command only (default at runtime: "yarn build") */
358
+ command: z.ZodOptional<z.ZodEnum<{
359
+ "npm run build": "npm run build";
360
+ "yarn build": "yarn build";
361
+ "pnpm run build": "pnpm run build";
362
+ "pnpm build": "pnpm build";
363
+ }>>;
344
364
  /** Expected exit code (default: 0) */
345
365
  expectedExitCode: z.ZodOptional<z.ZodNumber>;
346
366
  }, z.core.$strict>, z.ZodObject<{}, z.core.$strip>]>;
@@ -0,0 +1,25 @@
1
+ import { z } from 'zod';
2
+ /**
3
+ * Allowlisted shell-free build commands for `build_passed` assertions (VELO-9590).
4
+ * Each entry maps to a fixed argv array for execFile — no user-controlled shell.
5
+ */
6
+ export declare const ALLOWED_BUILD_COMMANDS: readonly ["yarn build", "npm run build", "pnpm run build", "pnpm build"];
7
+ export type AllowedBuildCommandString = (typeof ALLOWED_BUILD_COMMANDS)[number];
8
+ /** Default when `command` is omitted (matches historical behavior). */
9
+ export declare const DEFAULT_BUILD_PASSED_COMMAND: AllowedBuildCommandString;
10
+ /**
11
+ * True if the string (after trim) is an allowlisted build command.
12
+ */
13
+ export declare function isAllowedBuildCommandString(command: string): boolean;
14
+ /**
15
+ * Resolve an allowlisted command string to argv for `execFile` / `execFileSync`.
16
+ * Returns null if the command is not allowlisted.
17
+ */
18
+ export declare function parseBuildCommandToArgv(command: string): readonly [string, ...string[]] | null;
19
+ /** Zod schema for an optional/required allowlisted build command string. */
20
+ export declare const BuildPassedCommandStringSchema: z.ZodEnum<{
21
+ "npm run build": "npm run build";
22
+ "yarn build": "yarn build";
23
+ "pnpm run build": "pnpm run build";
24
+ "pnpm build": "pnpm build";
25
+ }>;
@@ -2,4 +2,5 @@
2
2
  * Assertion types and system assertion definitions.
3
3
  */
4
4
  export * from './assertion.js';
5
+ export * from './build-passed-command.js';
5
6
  export * from './system-assertions.js';
@@ -26,25 +26,28 @@ export type Project = z.infer<typeof ProjectSchema>;
26
26
  /**
27
27
  * Input schema for creating a new Project.
28
28
  * Omits read-only / runtime-resolved fields.
29
+ * Requires appId for proper app-credential scoping and tenancy isolation.
29
30
  */
30
31
  export declare const CreateProjectInputSchema: z.ZodObject<{
31
32
  name: z.ZodString;
32
33
  description: z.ZodString;
33
- appId: z.ZodOptional<z.ZodString>;
34
34
  scenarioTags: z.ZodOptional<z.ZodArray<z.ZodString>>;
35
35
  wixAuthToken: z.ZodOptional<z.ZodNullable<z.ZodString>>;
36
36
  base44AuthFile: z.ZodOptional<z.ZodNullable<z.ZodString>>;
37
+ appId: z.ZodString;
37
38
  }, z.core.$strip>;
38
39
  export type CreateProjectInput = z.infer<typeof CreateProjectInputSchema>;
39
40
  /**
40
41
  * Input schema for updating a Project.
42
+ * AppId is mutable — allows project reassignment to different apps if needed.
43
+ * Requires current app credentials to change (enforced by appAuthProjectGuard).
41
44
  */
42
45
  export declare const UpdateProjectInputSchema: z.ZodObject<{
43
46
  name: z.ZodOptional<z.ZodString>;
44
47
  description: z.ZodOptional<z.ZodString>;
45
- appId: z.ZodOptional<z.ZodOptional<z.ZodString>>;
46
48
  scenarioTags: z.ZodOptional<z.ZodOptional<z.ZodArray<z.ZodString>>>;
47
49
  wixAuthToken: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
48
50
  base44AuthFile: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
51
+ appId: z.ZodOptional<z.ZodString>;
49
52
  }, z.core.$strip>;
50
53
  export type UpdateProjectInput = z.infer<typeof UpdateProjectInputSchema>;
@@ -48,7 +48,12 @@ export declare const TestScenarioSchema: z.ZodObject<{
48
48
  negate: z.ZodOptional<z.ZodBoolean>;
49
49
  type: z.ZodLiteral<"tool_called_with_param">;
50
50
  }, z.core.$strict>, z.ZodObject<{
51
- command: z.ZodOptional<z.ZodString>;
51
+ command: z.ZodOptional<z.ZodEnum<{
52
+ "npm run build": "npm run build";
53
+ "yarn build": "yarn build";
54
+ "pnpm run build": "pnpm run build";
55
+ "pnpm build": "pnpm build";
56
+ }>>;
52
57
  expectedExitCode: z.ZodOptional<z.ZodNumber>;
53
58
  negate: z.ZodOptional<z.ZodBoolean>;
54
59
  type: z.ZodLiteral<"build_passed">;
@@ -111,6 +116,10 @@ export declare const TestScenarioSchema: z.ZodObject<{
111
116
  }, z.core.$strip>>>;
112
117
  }, z.core.$strip>;
113
118
  export type TestScenario = z.infer<typeof TestScenarioSchema>;
119
+ export declare function validateBuildPassedParamsInAssertionLinks(links: {
120
+ assertionId: string;
121
+ params?: Record<string, unknown>;
122
+ }[] | undefined, ctx: z.RefinementCtx): void;
114
123
  /**
115
124
  * Input schema for creating a new TestScenario.
116
125
  */
@@ -131,7 +140,12 @@ export declare const CreateTestScenarioInputSchema: z.ZodObject<{
131
140
  negate: z.ZodOptional<z.ZodBoolean>;
132
141
  type: z.ZodLiteral<"tool_called_with_param">;
133
142
  }, z.core.$strict>, z.ZodObject<{
134
- command: z.ZodOptional<z.ZodString>;
143
+ command: z.ZodOptional<z.ZodEnum<{
144
+ "npm run build": "npm run build";
145
+ "yarn build": "yarn build";
146
+ "pnpm run build": "pnpm run build";
147
+ "pnpm build": "pnpm build";
148
+ }>>;
135
149
  expectedExitCode: z.ZodOptional<z.ZodNumber>;
136
150
  negate: z.ZodOptional<z.ZodBoolean>;
137
151
  type: z.ZodLiteral<"build_passed">;
@@ -214,7 +228,12 @@ export declare const UpdateTestScenarioInputSchema: z.ZodObject<{
214
228
  negate: z.ZodOptional<z.ZodBoolean>;
215
229
  type: z.ZodLiteral<"tool_called_with_param">;
216
230
  }, z.core.$strict>, z.ZodObject<{
217
- command: z.ZodOptional<z.ZodString>;
231
+ command: z.ZodOptional<z.ZodEnum<{
232
+ "npm run build": "npm run build";
233
+ "yarn build": "yarn build";
234
+ "pnpm run build": "pnpm run build";
235
+ "pnpm build": "pnpm build";
236
+ }>>;
218
237
  expectedExitCode: z.ZodOptional<z.ZodNumber>;
219
238
  negate: z.ZodOptional<z.ZodBoolean>;
220
239
  type: z.ZodLiteral<"build_passed">;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wix/evalforge-types",
3
- "version": "0.72.0",
3
+ "version": "0.74.0",
4
4
  "description": "Unified types for EvalForge agent evaluation system",
5
5
  "files": [
6
6
  "build"
@@ -46,5 +46,5 @@
46
46
  "artifactId": "evalforge-types"
47
47
  }
48
48
  },
49
- "falconPackageHash": "b6e85b3584dc3e5bb7ba967eb144e0054537240f1b95a0a468f3e662"
49
+ "falconPackageHash": "2d95416da22b2c81af5afb54bb6d3b5cbc1fac31d48f866a49a53523"
50
50
  }