@mappies/miniwat-eval 1.1.0 → 1.3.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 +89 -11
- package/dist/index.cjs +743 -178
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +65 -48
- package/dist/index.d.ts +66 -48
- package/dist/index.js +743 -178
- package/dist/index.js.map +1 -1
- package/dist/main.js +699 -134
- package/dist/main.js.map +1 -1
- package/package.json +1 -1
- package/schemas/conversation.schema.json +43 -4
- package/schemas/eval-config.schema.json +10 -0
- package/schemas/report.schema.json +12 -1
package/package.json
CHANGED
|
@@ -8,6 +8,45 @@
|
|
|
8
8
|
"version": { "const": 1 },
|
|
9
9
|
"name": { "$ref": "#/definitions/text" },
|
|
10
10
|
"description": { "type": "string" },
|
|
11
|
+
"variables": {
|
|
12
|
+
"type": "object",
|
|
13
|
+
"propertyNames": { "pattern": "^[A-Za-z_][A-Za-z0-9_-]*$" },
|
|
14
|
+
"additionalProperties": {
|
|
15
|
+
"anyOf": [
|
|
16
|
+
{ "type": "string" },
|
|
17
|
+
{ "type": "array", "items": { "type": "string" } }
|
|
18
|
+
]
|
|
19
|
+
}
|
|
20
|
+
},
|
|
21
|
+
"runWith": {
|
|
22
|
+
"description": "Runs the scenario once per entry. Either rows, each with a name and variables, or { variable, from }, where from is a list of variable or parameter names or a list variable such as ${tokens}.",
|
|
23
|
+
"anyOf": [
|
|
24
|
+
{
|
|
25
|
+
"type": "array",
|
|
26
|
+
"minItems": 1,
|
|
27
|
+
"items": {
|
|
28
|
+
"type": "object",
|
|
29
|
+
"required": ["name"],
|
|
30
|
+
"properties": { "name": { "type": "string", "pattern": "^[A-Za-z0-9][A-Za-z0-9_.-]*$" } },
|
|
31
|
+
"additionalProperties": { "type": "string" }
|
|
32
|
+
}
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
"type": "object",
|
|
36
|
+
"additionalProperties": false,
|
|
37
|
+
"required": ["variable", "from"],
|
|
38
|
+
"properties": {
|
|
39
|
+
"variable": { "type": "string", "pattern": "^[A-Za-z_][A-Za-z0-9_-]*$" },
|
|
40
|
+
"from": {
|
|
41
|
+
"anyOf": [
|
|
42
|
+
{ "type": "array", "minItems": 1, "items": { "type": "string" } },
|
|
43
|
+
{ "type": "string", "pattern": "^\\$\\{[A-Za-z_][A-Za-z0-9_-]*\\}$" }
|
|
44
|
+
]
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
]
|
|
49
|
+
},
|
|
11
50
|
"turns": {
|
|
12
51
|
"type": "array",
|
|
13
52
|
"minItems": 1,
|
|
@@ -21,9 +60,9 @@
|
|
|
21
60
|
"conversation": {
|
|
22
61
|
"type": "object",
|
|
23
62
|
"additionalProperties": false,
|
|
24
|
-
"required": ["
|
|
63
|
+
"required": ["should"],
|
|
25
64
|
"properties": {
|
|
26
|
-
"
|
|
65
|
+
"should": { "$ref": "#/definitions/text" }
|
|
27
66
|
}
|
|
28
67
|
}
|
|
29
68
|
}
|
|
@@ -65,12 +104,12 @@
|
|
|
65
104
|
}
|
|
66
105
|
},
|
|
67
106
|
"response": {
|
|
68
|
-
"description": "A string is shorthand for
|
|
107
|
+
"description": "A string is shorthand for should.",
|
|
69
108
|
"type": ["string", "object"],
|
|
70
109
|
"pattern": "\\S",
|
|
71
110
|
"additionalProperties": false,
|
|
72
111
|
"properties": {
|
|
73
|
-
"
|
|
112
|
+
"should": { "$ref": "#/definitions/text" },
|
|
74
113
|
"contains": { "$ref": "#/definitions/textList" },
|
|
75
114
|
"notContains": { "$ref": "#/definitions/textList" }
|
|
76
115
|
}
|
|
@@ -6,6 +6,16 @@
|
|
|
6
6
|
"required": ["version", "websocket", "evaluator"],
|
|
7
7
|
"properties": {
|
|
8
8
|
"version": { "const": 1 },
|
|
9
|
+
"variables": {
|
|
10
|
+
"type": "object",
|
|
11
|
+
"propertyNames": { "pattern": "^[A-Za-z_][A-Za-z0-9_-]*$" },
|
|
12
|
+
"additionalProperties": {
|
|
13
|
+
"anyOf": [
|
|
14
|
+
{ "type": "string" },
|
|
15
|
+
{ "type": "array", "items": { "type": "string" } }
|
|
16
|
+
]
|
|
17
|
+
}
|
|
18
|
+
},
|
|
9
19
|
"websocket": {
|
|
10
20
|
"type": "object",
|
|
11
21
|
"additionalProperties": false,
|
|
@@ -191,11 +191,22 @@
|
|
|
191
191
|
"description": "A scenario that never started has no attempts and no tests.",
|
|
192
192
|
"type": "object",
|
|
193
193
|
"additionalProperties": false,
|
|
194
|
-
"required": ["name", "file", "status", "passed", "failed", "errors", "required", "agentUsage", "evaluatorUsage", "tests", "attempts"],
|
|
194
|
+
"required": ["name", "file", "status", "connection", "passed", "failed", "errors", "required", "agentUsage", "evaluatorUsage", "tests", "attempts"],
|
|
195
195
|
"properties": {
|
|
196
196
|
"name": { "type": "string" },
|
|
197
|
+
"runWith": { "description": "The runWith entry this scenario is one run of. Absent when the scenario has no runWith.", "type": "string" },
|
|
197
198
|
"file": { "type": "string" },
|
|
198
199
|
"status": { "$ref": "#/definitions/status" },
|
|
200
|
+
"connection": {
|
|
201
|
+
"description": "The websocket section as resolved for this scenario. subprotocols is a count, so a scenario that connected without a token shows 0.",
|
|
202
|
+
"type": "object",
|
|
203
|
+
"additionalProperties": false,
|
|
204
|
+
"required": ["endpoint", "subprotocols"],
|
|
205
|
+
"properties": {
|
|
206
|
+
"endpoint": { "type": "string" },
|
|
207
|
+
"subprotocols": { "$ref": "#/definitions/count" }
|
|
208
|
+
}
|
|
209
|
+
},
|
|
199
210
|
"passed": { "$ref": "#/definitions/count" },
|
|
200
211
|
"failed": { "$ref": "#/definitions/count" },
|
|
201
212
|
"errors": { "$ref": "#/definitions/count" },
|