@wix/evalforge-types 0.65.0 → 0.67.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/build/index.js +381 -303
- package/build/index.js.map +4 -4
- package/build/index.mjs +372 -303
- package/build/index.mjs.map +4 -4
- package/build/types/evaluation/eval-result.d.ts +1 -0
- package/build/types/evaluation/eval-run.d.ts +3 -0
- package/build/types/scenario/batch-import.d.ts +106 -0
- package/build/types/scenario/index.d.ts +1 -0
- package/package.json +2 -2
|
@@ -223,6 +223,7 @@ export declare const EvalRunResultSchema: z.ZodObject<{
|
|
|
223
223
|
}, z.core.$strip>], "type">>;
|
|
224
224
|
timestamp: z.ZodString;
|
|
225
225
|
}, z.core.$strip>>>;
|
|
226
|
+
iterationIndex: z.ZodOptional<z.ZodNumber>;
|
|
226
227
|
}, z.core.$strip>;
|
|
227
228
|
export type EvalRunResult = z.infer<typeof EvalRunResultSchema>;
|
|
228
229
|
/**
|
|
@@ -417,6 +417,7 @@ export declare const EvalRunSchema: z.ZodObject<{
|
|
|
417
417
|
}, z.core.$strip>], "type">>;
|
|
418
418
|
timestamp: z.ZodString;
|
|
419
419
|
}, z.core.$strip>>>;
|
|
420
|
+
iterationIndex: z.ZodOptional<z.ZodNumber>;
|
|
420
421
|
}, z.core.$strip>>>;
|
|
421
422
|
aggregateMetrics: z.ZodObject<{
|
|
422
423
|
totalAssertions: z.ZodNumber;
|
|
@@ -538,6 +539,7 @@ export declare const EvalRunSchema: z.ZodObject<{
|
|
|
538
539
|
subAgentIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
539
540
|
ruleIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
540
541
|
tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
542
|
+
runsPerScenario: z.ZodOptional<z.ZodNumber>;
|
|
541
543
|
}, z.core.$strip>;
|
|
542
544
|
export type EvalRun = z.infer<typeof EvalRunSchema>;
|
|
543
545
|
/**
|
|
@@ -664,6 +666,7 @@ export declare const CreateEvalRunInputSchema: z.ZodObject<{
|
|
|
664
666
|
jobStatus: z.ZodOptional<z.ZodString>;
|
|
665
667
|
jobError: z.ZodOptional<z.ZodString>;
|
|
666
668
|
jobStatusCheckedAt: z.ZodOptional<z.ZodString>;
|
|
669
|
+
runsPerScenario: z.ZodOptional<z.ZodNumber>;
|
|
667
670
|
scenarioIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
668
671
|
}, z.core.$strip>;
|
|
669
672
|
export type CreateEvalRunInput = z.infer<typeof CreateEvalRunInputSchema>;
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { ScenarioAssertionLinkSchema } from '../assertion/assertion.js';
|
|
3
|
+
/**
|
|
4
|
+
* Assertion link in batch import JSON — accepts two forms:
|
|
5
|
+
* - String: bare assertion reference ("system:build_passed" or "Check widget count")
|
|
6
|
+
* - Object: { assertionId, params? } for assertions needing parameters
|
|
7
|
+
*/
|
|
8
|
+
export declare const BatchAssertionLinkSchema: z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
9
|
+
assertionId: z.ZodString;
|
|
10
|
+
params: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>>>;
|
|
11
|
+
}, z.core.$strip>]>;
|
|
12
|
+
export type BatchAssertionLink = z.infer<typeof BatchAssertionLinkSchema>;
|
|
13
|
+
/**
|
|
14
|
+
* Single scenario entry in the batch import payload.
|
|
15
|
+
* name and triggerPrompt are required; everything else is optional.
|
|
16
|
+
*/
|
|
17
|
+
export declare const BatchScenarioEntrySchema: z.ZodObject<{
|
|
18
|
+
name: z.ZodString;
|
|
19
|
+
description: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
20
|
+
triggerPrompt: z.ZodString;
|
|
21
|
+
templateId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
22
|
+
tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
23
|
+
assertionLinks: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
24
|
+
assertionId: z.ZodString;
|
|
25
|
+
params: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>>>;
|
|
26
|
+
}, z.core.$strip>]>>>;
|
|
27
|
+
}, z.core.$strip>;
|
|
28
|
+
export type BatchScenarioEntry = z.infer<typeof BatchScenarioEntrySchema>;
|
|
29
|
+
/**
|
|
30
|
+
* Top-level wrapper for the batch import JSON payload.
|
|
31
|
+
* Contains a `scenarios` array (1–100 entries).
|
|
32
|
+
*/
|
|
33
|
+
export declare const BatchImportPayloadSchema: z.ZodObject<{
|
|
34
|
+
scenarios: z.ZodArray<z.ZodObject<{
|
|
35
|
+
name: z.ZodString;
|
|
36
|
+
description: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
37
|
+
triggerPrompt: z.ZodString;
|
|
38
|
+
templateId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
39
|
+
tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
40
|
+
assertionLinks: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
41
|
+
assertionId: z.ZodString;
|
|
42
|
+
params: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>>>;
|
|
43
|
+
}, z.core.$strip>]>>>;
|
|
44
|
+
}, z.core.$strip>>;
|
|
45
|
+
}, z.core.$strip>;
|
|
46
|
+
export type BatchImportPayload = z.infer<typeof BatchImportPayloadSchema>;
|
|
47
|
+
export declare const BATCH_IMPORT_LIMITS: {
|
|
48
|
+
readonly MAX_SCENARIOS: 100;
|
|
49
|
+
readonly MAX_PAYLOAD_BYTES: 1048576;
|
|
50
|
+
};
|
|
51
|
+
/**
|
|
52
|
+
* Classify a string assertion reference:
|
|
53
|
+
* - "system:*" → system assertion ID
|
|
54
|
+
* - UUID format → custom assertion ID
|
|
55
|
+
* - otherwise → assertion name (needs resolution)
|
|
56
|
+
*/
|
|
57
|
+
export declare function classifyAssertionRef(ref: string): {
|
|
58
|
+
type: 'system' | 'uuid' | 'name';
|
|
59
|
+
value: string;
|
|
60
|
+
};
|
|
61
|
+
/**
|
|
62
|
+
* Normalize a batch assertion link (string or object) into a standard
|
|
63
|
+
* ScenarioAssertionLink. String refs are classified and returned as
|
|
64
|
+
* { assertionId } — actual resolution (name→UUID) is done by the backend.
|
|
65
|
+
*/
|
|
66
|
+
export declare function normalizeBatchAssertionLink(link: BatchAssertionLink): z.infer<typeof ScenarioAssertionLinkSchema>;
|
|
67
|
+
/** Per-scenario result returned by the batch endpoint. */
|
|
68
|
+
export declare const BatchResultItemSchema: z.ZodObject<{
|
|
69
|
+
index: z.ZodNumber;
|
|
70
|
+
name: z.ZodString;
|
|
71
|
+
status: z.ZodEnum<{
|
|
72
|
+
valid: "valid";
|
|
73
|
+
invalid: "invalid";
|
|
74
|
+
}>;
|
|
75
|
+
id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
76
|
+
errors: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
77
|
+
}, z.core.$strip>;
|
|
78
|
+
export type BatchResultItem = z.infer<typeof BatchResultItemSchema>;
|
|
79
|
+
/** Summary section of the batch response. */
|
|
80
|
+
export declare const BatchSummarySchema: z.ZodObject<{
|
|
81
|
+
total: z.ZodNumber;
|
|
82
|
+
valid: z.ZodNumber;
|
|
83
|
+
invalid: z.ZodNumber;
|
|
84
|
+
created: z.ZodNumber;
|
|
85
|
+
}, z.core.$strip>;
|
|
86
|
+
export type BatchSummary = z.infer<typeof BatchSummarySchema>;
|
|
87
|
+
/** Full response from the batch import endpoint. */
|
|
88
|
+
export declare const BatchImportResponseSchema: z.ZodObject<{
|
|
89
|
+
summary: z.ZodObject<{
|
|
90
|
+
total: z.ZodNumber;
|
|
91
|
+
valid: z.ZodNumber;
|
|
92
|
+
invalid: z.ZodNumber;
|
|
93
|
+
created: z.ZodNumber;
|
|
94
|
+
}, z.core.$strip>;
|
|
95
|
+
results: z.ZodArray<z.ZodObject<{
|
|
96
|
+
index: z.ZodNumber;
|
|
97
|
+
name: z.ZodString;
|
|
98
|
+
status: z.ZodEnum<{
|
|
99
|
+
valid: "valid";
|
|
100
|
+
invalid: "invalid";
|
|
101
|
+
}>;
|
|
102
|
+
id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
103
|
+
errors: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
104
|
+
}, z.core.$strip>>;
|
|
105
|
+
}, z.core.$strip>;
|
|
106
|
+
export type BatchImportResponse = z.infer<typeof BatchImportResponseSchema>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wix/evalforge-types",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.67.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": "
|
|
49
|
+
"falconPackageHash": "36b8ec04f884997739f7f76481afce888ab4a7b9669947ab57b63836"
|
|
50
50
|
}
|