@wix/evalforge-types 0.59.0 → 0.60.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.
@@ -6,7 +6,7 @@ import { z } from 'zod';
6
6
  * - build_passed: Runs a command and checks exit code (deterministic, system-level)
7
7
  * - time_limit: Checks that scenario completed within a duration threshold (deterministic, system-level)
8
8
  * - cost: Checks that scenario LLM cost stays within a USD threshold (deterministic, system-level)
9
- * - llm_judge: LLM evaluates output with a prompt (LLM-based, user-created)
9
+ * - llm_judge: LLM evaluates output with a prompt (LLM-based, system-level)
10
10
  */
11
11
  export declare const AssertionTypeSchema: z.ZodEnum<{
12
12
  skill_was_called: "skill_was_called";
@@ -103,7 +103,6 @@ export declare const TimeConfigSchema: z.ZodObject<{
103
103
  export type TimeConfig = z.infer<typeof TimeConfigSchema>;
104
104
  /**
105
105
  * Configuration for llm_judge assertion type.
106
- * User-created assertions with customizable parameters.
107
106
  */
108
107
  export declare const LlmJudgeConfigSchema: z.ZodObject<{
109
108
  prompt: z.ZodString;
@@ -263,193 +262,8 @@ export declare const AssertionConfigSchema: z.ZodUnion<readonly [z.ZodObject<{
263
262
  expectedExitCode: z.ZodOptional<z.ZodNumber>;
264
263
  }, z.core.$strict>, z.ZodObject<{}, z.core.$strip>]>;
265
264
  export type AssertionConfig = z.infer<typeof AssertionConfigSchema>;
266
- /**
267
- * Custom Assertion entity - stored in the database.
268
- * Replaces inline assertions in test scenarios.
269
- */
270
- export declare const CustomAssertionSchema: z.ZodObject<{
271
- id: z.ZodString;
272
- name: z.ZodString;
273
- description: z.ZodString;
274
- createdAt: z.ZodString;
275
- updatedAt: z.ZodString;
276
- deleted: z.ZodOptional<z.ZodBoolean>;
277
- projectId: z.ZodString;
278
- type: z.ZodEnum<{
279
- skill_was_called: "skill_was_called";
280
- tool_called_with_param: "tool_called_with_param";
281
- build_passed: "build_passed";
282
- time_limit: "time_limit";
283
- cost: "cost";
284
- llm_judge: "llm_judge";
285
- }>;
286
- config: z.ZodUnion<readonly [z.ZodObject<{
287
- prompt: z.ZodString;
288
- minScore: z.ZodOptional<z.ZodNumber>;
289
- model: z.ZodOptional<z.ZodString>;
290
- maxTokens: z.ZodOptional<z.ZodNumber>;
291
- temperature: z.ZodOptional<z.ZodNumber>;
292
- parameters: z.ZodOptional<z.ZodArray<z.ZodObject<{
293
- name: z.ZodString;
294
- label: z.ZodString;
295
- type: z.ZodEnum<{
296
- string: "string";
297
- number: "number";
298
- boolean: "boolean";
299
- }>;
300
- required: z.ZodBoolean;
301
- defaultValue: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>;
302
- advanced: z.ZodOptional<z.ZodBoolean>;
303
- }, z.core.$strip>>>;
304
- }, z.core.$strip>, z.ZodObject<{
305
- skillNames: z.ZodArray<z.ZodString>;
306
- }, z.core.$strip>, z.ZodObject<{
307
- /** Name of the tool that must have been called */
308
- toolName: z.ZodString;
309
- /** JSON string of key-value pairs for expected parameters (substring match) */
310
- expectedParams: z.ZodString;
311
- /** If true, the matching tool call must also have succeeded (step.success === true) */
312
- requireSuccess: z.ZodOptional<z.ZodBoolean>;
313
- }, z.core.$strict>, z.ZodObject<{
314
- /** Maximum allowed duration in milliseconds */
315
- maxDurationMs: z.ZodNumber;
316
- }, z.core.$strict>, z.ZodObject<{
317
- /** Maximum allowed cost in USD */
318
- maxCostUsd: z.ZodNumber;
319
- }, z.core.$strict>, z.ZodObject<{
320
- /** Command to run (default: "yarn build") */
321
- command: z.ZodOptional<z.ZodString>;
322
- /** Expected exit code (default: 0) */
323
- expectedExitCode: z.ZodOptional<z.ZodNumber>;
324
- }, z.core.$strict>, z.ZodObject<{}, z.core.$strip>]>;
325
- }, z.core.$strip>;
326
- export type CustomAssertion = z.infer<typeof CustomAssertionSchema>;
327
- /**
328
- * Input schema for creating a new CustomAssertion.
329
- */
330
- export declare const CreateCustomAssertionInputSchema: z.ZodObject<{
331
- type: z.ZodEnum<{
332
- skill_was_called: "skill_was_called";
333
- tool_called_with_param: "tool_called_with_param";
334
- build_passed: "build_passed";
335
- time_limit: "time_limit";
336
- cost: "cost";
337
- llm_judge: "llm_judge";
338
- }>;
339
- name: z.ZodString;
340
- description: z.ZodString;
341
- projectId: z.ZodString;
342
- config: z.ZodUnion<readonly [z.ZodObject<{
343
- prompt: z.ZodString;
344
- minScore: z.ZodOptional<z.ZodNumber>;
345
- model: z.ZodOptional<z.ZodString>;
346
- maxTokens: z.ZodOptional<z.ZodNumber>;
347
- temperature: z.ZodOptional<z.ZodNumber>;
348
- parameters: z.ZodOptional<z.ZodArray<z.ZodObject<{
349
- name: z.ZodString;
350
- label: z.ZodString;
351
- type: z.ZodEnum<{
352
- string: "string";
353
- number: "number";
354
- boolean: "boolean";
355
- }>;
356
- required: z.ZodBoolean;
357
- defaultValue: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>;
358
- advanced: z.ZodOptional<z.ZodBoolean>;
359
- }, z.core.$strip>>>;
360
- }, z.core.$strip>, z.ZodObject<{
361
- skillNames: z.ZodArray<z.ZodString>;
362
- }, z.core.$strip>, z.ZodObject<{
363
- /** Name of the tool that must have been called */
364
- toolName: z.ZodString;
365
- /** JSON string of key-value pairs for expected parameters (substring match) */
366
- expectedParams: z.ZodString;
367
- /** If true, the matching tool call must also have succeeded (step.success === true) */
368
- requireSuccess: z.ZodOptional<z.ZodBoolean>;
369
- }, z.core.$strict>, z.ZodObject<{
370
- /** Maximum allowed duration in milliseconds */
371
- maxDurationMs: z.ZodNumber;
372
- }, z.core.$strict>, z.ZodObject<{
373
- /** Maximum allowed cost in USD */
374
- maxCostUsd: z.ZodNumber;
375
- }, z.core.$strict>, z.ZodObject<{
376
- /** Command to run (default: "yarn build") */
377
- command: z.ZodOptional<z.ZodString>;
378
- /** Expected exit code (default: 0) */
379
- expectedExitCode: z.ZodOptional<z.ZodNumber>;
380
- }, z.core.$strict>, z.ZodObject<{}, z.core.$strip>]>;
381
- }, z.core.$strip>;
382
- export type CreateCustomAssertionInput = z.infer<typeof CreateCustomAssertionInputSchema>;
383
- /**
384
- * Input schema for updating a CustomAssertion.
385
- */
386
- export declare const UpdateCustomAssertionInputSchema: z.ZodObject<{
387
- type: z.ZodOptional<z.ZodEnum<{
388
- skill_was_called: "skill_was_called";
389
- tool_called_with_param: "tool_called_with_param";
390
- build_passed: "build_passed";
391
- time_limit: "time_limit";
392
- cost: "cost";
393
- llm_judge: "llm_judge";
394
- }>>;
395
- name: z.ZodOptional<z.ZodString>;
396
- description: z.ZodOptional<z.ZodString>;
397
- projectId: z.ZodOptional<z.ZodString>;
398
- config: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
399
- prompt: z.ZodString;
400
- minScore: z.ZodOptional<z.ZodNumber>;
401
- model: z.ZodOptional<z.ZodString>;
402
- maxTokens: z.ZodOptional<z.ZodNumber>;
403
- temperature: z.ZodOptional<z.ZodNumber>;
404
- parameters: z.ZodOptional<z.ZodArray<z.ZodObject<{
405
- name: z.ZodString;
406
- label: z.ZodString;
407
- type: z.ZodEnum<{
408
- string: "string";
409
- number: "number";
410
- boolean: "boolean";
411
- }>;
412
- required: z.ZodBoolean;
413
- defaultValue: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>;
414
- advanced: z.ZodOptional<z.ZodBoolean>;
415
- }, z.core.$strip>>>;
416
- }, z.core.$strip>, z.ZodObject<{
417
- skillNames: z.ZodArray<z.ZodString>;
418
- }, z.core.$strip>, z.ZodObject<{
419
- /** Name of the tool that must have been called */
420
- toolName: z.ZodString;
421
- /** JSON string of key-value pairs for expected parameters (substring match) */
422
- expectedParams: z.ZodString;
423
- /** If true, the matching tool call must also have succeeded (step.success === true) */
424
- requireSuccess: z.ZodOptional<z.ZodBoolean>;
425
- }, z.core.$strict>, z.ZodObject<{
426
- /** Maximum allowed duration in milliseconds */
427
- maxDurationMs: z.ZodNumber;
428
- }, z.core.$strict>, z.ZodObject<{
429
- /** Maximum allowed cost in USD */
430
- maxCostUsd: z.ZodNumber;
431
- }, z.core.$strict>, z.ZodObject<{
432
- /** Command to run (default: "yarn build") */
433
- command: z.ZodOptional<z.ZodString>;
434
- /** Expected exit code (default: 0) */
435
- expectedExitCode: z.ZodOptional<z.ZodNumber>;
436
- }, z.core.$strict>, z.ZodObject<{}, z.core.$strip>]>>;
437
- }, z.core.$strip>;
438
- export type UpdateCustomAssertionInput = z.infer<typeof UpdateCustomAssertionInputSchema>;
439
265
  /**
440
266
  * Helper function to validate config based on assertion type.
441
267
  * Returns true if config is valid for the given type.
442
268
  */
443
269
  export declare function validateAssertionConfig(type: AssertionType, config: unknown): boolean;
444
- /**
445
- * Get typed config for skill_was_called assertion.
446
- */
447
- export declare function getSkillWasCalledConfig(assertion: CustomAssertion): SkillWasCalledConfig | null;
448
- /**
449
- * Get typed config for build_passed assertion.
450
- */
451
- export declare function getBuildPassedConfig(assertion: CustomAssertion): BuildPassedConfig | null;
452
- /**
453
- * Get typed config for llm_judge assertion.
454
- */
455
- export declare function getLlmJudgeConfig(assertion: CustomAssertion): LlmJudgeConfig | null;
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Assertion types - custom assertions stored in database and system assertions.
2
+ * Assertion types and system assertion definitions.
3
3
  */
4
4
  export * from './assertion.js';
5
5
  export * from './system-assertions.js';
@@ -16,7 +16,7 @@ export interface SystemAssertion {
16
16
  parameters: AssertionParameter[];
17
17
  }
18
18
  /**
19
- * System assertion IDs - prefixed with 'system:' to distinguish from custom assertions.
19
+ * System assertion IDs - prefixed with 'system:'.
20
20
  */
21
21
  export declare const SYSTEM_ASSERTION_IDS: {
22
22
  readonly SKILL_WAS_CALLED: "system:skill_was_called";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wix/evalforge-types",
3
- "version": "0.59.0",
3
+ "version": "0.60.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": "6bd1f3f247040c221f2806da2ecfdfe7d1375a7293d5fd06f5793957"
49
+ "falconPackageHash": "f5906c2fb77b34a5faf6bead27516ae314576b92df11ade8fa2580bd"
50
50
  }