@wix/evalforge-types 0.35.0 → 0.36.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.
@@ -3,12 +3,14 @@ import { z } from 'zod';
3
3
  * Assertion types:
4
4
  * - skill_was_called: Checks if a specific skill was invoked (deterministic, system-level)
5
5
  * - build_passed: Runs a command and checks exit code (deterministic, system-level)
6
+ * - time_limit: Checks that scenario completed within a duration threshold (deterministic, system-level)
6
7
  * - llm_judge: LLM evaluates output with a prompt (LLM-based, user-created)
7
8
  */
8
9
  export declare const AssertionTypeSchema: z.ZodEnum<{
9
10
  skill_was_called: "skill_was_called";
10
11
  build_passed: "build_passed";
11
12
  llm_judge: "llm_judge";
13
+ time_limit: "time_limit";
12
14
  }>;
13
15
  /**
14
16
  * Parameter types supported in assertion parameters.
@@ -66,6 +68,15 @@ export declare const BuildPassedConfigSchema: z.ZodObject<{
66
68
  expectedExitCode: z.ZodOptional<z.ZodNumber>;
67
69
  }, z.core.$strict>;
68
70
  export type BuildPassedConfig = z.infer<typeof BuildPassedConfigSchema>;
71
+ /**
72
+ * Configuration for time assertion type.
73
+ * Uses strictObject to reject objects with unknown keys.
74
+ */
75
+ export declare const TimeConfigSchema: z.ZodObject<{
76
+ /** Maximum allowed duration in milliseconds */
77
+ maxDurationMs: z.ZodNumber;
78
+ }, z.core.$strict>;
79
+ export type TimeConfig = z.infer<typeof TimeConfigSchema>;
69
80
  /**
70
81
  * Configuration for llm_judge assertion type.
71
82
  * User-created assertions with customizable parameters.
@@ -119,6 +130,9 @@ export declare const AssertionConfigSchema: z.ZodUnion<readonly [z.ZodObject<{
119
130
  }, z.core.$strip>, z.ZodObject<{
120
131
  skillNames: z.ZodArray<z.ZodString>;
121
132
  }, z.core.$strip>, z.ZodObject<{
133
+ /** Maximum allowed duration in milliseconds */
134
+ maxDurationMs: z.ZodNumber;
135
+ }, z.core.$strict>, z.ZodObject<{
122
136
  /** Command to run (default: "yarn build") */
123
137
  command: z.ZodOptional<z.ZodString>;
124
138
  /** Expected exit code (default: 0) */
@@ -141,6 +155,7 @@ export declare const CustomAssertionSchema: z.ZodObject<{
141
155
  skill_was_called: "skill_was_called";
142
156
  build_passed: "build_passed";
143
157
  llm_judge: "llm_judge";
158
+ time_limit: "time_limit";
144
159
  }>;
145
160
  config: z.ZodUnion<readonly [z.ZodObject<{
146
161
  prompt: z.ZodString;
@@ -164,6 +179,9 @@ export declare const CustomAssertionSchema: z.ZodObject<{
164
179
  }, z.core.$strip>, z.ZodObject<{
165
180
  skillNames: z.ZodArray<z.ZodString>;
166
181
  }, z.core.$strip>, z.ZodObject<{
182
+ /** Maximum allowed duration in milliseconds */
183
+ maxDurationMs: z.ZodNumber;
184
+ }, z.core.$strict>, z.ZodObject<{
167
185
  /** Command to run (default: "yarn build") */
168
186
  command: z.ZodOptional<z.ZodString>;
169
187
  /** Expected exit code (default: 0) */
@@ -179,6 +197,7 @@ export declare const CreateCustomAssertionInputSchema: z.ZodObject<{
179
197
  skill_was_called: "skill_was_called";
180
198
  build_passed: "build_passed";
181
199
  llm_judge: "llm_judge";
200
+ time_limit: "time_limit";
182
201
  }>;
183
202
  name: z.ZodString;
184
203
  description: z.ZodString;
@@ -205,6 +224,9 @@ export declare const CreateCustomAssertionInputSchema: z.ZodObject<{
205
224
  }, z.core.$strip>, z.ZodObject<{
206
225
  skillNames: z.ZodArray<z.ZodString>;
207
226
  }, z.core.$strip>, z.ZodObject<{
227
+ /** Maximum allowed duration in milliseconds */
228
+ maxDurationMs: z.ZodNumber;
229
+ }, z.core.$strict>, z.ZodObject<{
208
230
  /** Command to run (default: "yarn build") */
209
231
  command: z.ZodOptional<z.ZodString>;
210
232
  /** Expected exit code (default: 0) */
@@ -220,6 +242,7 @@ export declare const UpdateCustomAssertionInputSchema: z.ZodObject<{
220
242
  skill_was_called: "skill_was_called";
221
243
  build_passed: "build_passed";
222
244
  llm_judge: "llm_judge";
245
+ time_limit: "time_limit";
223
246
  }>>;
224
247
  name: z.ZodOptional<z.ZodString>;
225
248
  description: z.ZodOptional<z.ZodString>;
@@ -246,6 +269,9 @@ export declare const UpdateCustomAssertionInputSchema: z.ZodObject<{
246
269
  }, z.core.$strip>, z.ZodObject<{
247
270
  skillNames: z.ZodArray<z.ZodString>;
248
271
  }, z.core.$strip>, z.ZodObject<{
272
+ /** Maximum allowed duration in milliseconds */
273
+ maxDurationMs: z.ZodNumber;
274
+ }, z.core.$strict>, z.ZodObject<{
249
275
  /** Command to run (default: "yarn build") */
250
276
  command: z.ZodOptional<z.ZodString>;
251
277
  /** Expected exit code (default: 0) */
@@ -21,6 +21,7 @@ export interface SystemAssertion {
21
21
  export declare const SYSTEM_ASSERTION_IDS: {
22
22
  readonly SKILL_WAS_CALLED: "system:skill_was_called";
23
23
  readonly BUILD_PASSED: "system:build_passed";
24
+ readonly TIME_LIMIT: "system:time_limit";
24
25
  readonly LLM_JUDGE: "system:llm_judge";
25
26
  };
26
27
  export type SystemAssertionId = (typeof SYSTEM_ASSERTION_IDS)[keyof typeof SYSTEM_ASSERTION_IDS];
@@ -36,6 +36,15 @@ export declare const LlmJudgeAssertionSchema: z.ZodObject<{
36
36
  temperature: z.ZodOptional<z.ZodNumber>;
37
37
  }, z.core.$strip>;
38
38
  export type LlmJudgeAssertion = z.infer<typeof LlmJudgeAssertionSchema>;
39
+ /**
40
+ * Assertion: scenario must complete within a maximum duration.
41
+ * Deterministic check against the scenario execution time.
42
+ */
43
+ export declare const TimeAssertionSchema: z.ZodObject<{
44
+ type: z.ZodLiteral<"time_limit">;
45
+ maxDurationMs: z.ZodNumber;
46
+ }, z.core.$strip>;
47
+ export type TimeAssertion = z.infer<typeof TimeAssertionSchema>;
39
48
  /**
40
49
  * Union of all assertion types (per scenario).
41
50
  * Each assertion has a type and type-specific data.
@@ -48,6 +57,9 @@ export declare const AssertionSchema: z.ZodUnion<readonly [z.ZodObject<{
48
57
  type: z.ZodLiteral<"build_passed">;
49
58
  command: z.ZodOptional<z.ZodString>;
50
59
  expectedExitCode: z.ZodOptional<z.ZodNumber>;
60
+ }, z.core.$strip>, z.ZodObject<{
61
+ type: z.ZodLiteral<"time_limit">;
62
+ maxDurationMs: z.ZodNumber;
51
63
  }, z.core.$strip>, z.ZodObject<{
52
64
  type: z.ZodLiteral<"llm_judge">;
53
65
  prompt: z.ZodString;
@@ -32,6 +32,9 @@ export declare const TestScenarioSchema: z.ZodObject<{
32
32
  type: z.ZodLiteral<"build_passed">;
33
33
  command: z.ZodOptional<z.ZodString>;
34
34
  expectedExitCode: z.ZodOptional<z.ZodNumber>;
35
+ }, z.core.$strip>, z.ZodObject<{
36
+ type: z.ZodLiteral<"time_limit">;
37
+ maxDurationMs: z.ZodNumber;
35
38
  }, z.core.$strip>, z.ZodObject<{
36
39
  type: z.ZodLiteral<"llm_judge">;
37
40
  prompt: z.ZodString;
@@ -64,6 +67,9 @@ export declare const CreateTestScenarioInputSchema: z.ZodObject<{
64
67
  type: z.ZodLiteral<"build_passed">;
65
68
  command: z.ZodOptional<z.ZodString>;
66
69
  expectedExitCode: z.ZodOptional<z.ZodNumber>;
70
+ }, z.core.$strip>, z.ZodObject<{
71
+ type: z.ZodLiteral<"time_limit">;
72
+ maxDurationMs: z.ZodNumber;
67
73
  }, z.core.$strip>, z.ZodObject<{
68
74
  type: z.ZodLiteral<"llm_judge">;
69
75
  prompt: z.ZodString;
@@ -96,6 +102,9 @@ export declare const UpdateTestScenarioInputSchema: z.ZodObject<{
96
102
  type: z.ZodLiteral<"build_passed">;
97
103
  command: z.ZodOptional<z.ZodString>;
98
104
  expectedExitCode: z.ZodOptional<z.ZodNumber>;
105
+ }, z.core.$strip>, z.ZodObject<{
106
+ type: z.ZodLiteral<"time_limit">;
107
+ maxDurationMs: z.ZodNumber;
99
108
  }, z.core.$strip>, z.ZodObject<{
100
109
  type: z.ZodLiteral<"llm_judge">;
101
110
  prompt: z.ZodString;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wix/evalforge-types",
3
- "version": "0.35.0",
3
+ "version": "0.36.0",
4
4
  "description": "Unified types for EvalForge agent evaluation system",
5
5
  "files": [
6
6
  "build"
@@ -47,5 +47,5 @@
47
47
  "artifactId": "evalforge-types"
48
48
  }
49
49
  },
50
- "falconPackageHash": "be942689dd76b6a6a967bb66a1398535e5d2c86f7b405c99b92e7d12"
50
+ "falconPackageHash": "1beee538e2fe877b490209a7f00a37f2524d6cece55e7c57bdd0f20a"
51
51
  }