@sedum-dev/core 0.1.0-alpha.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/LICENSE +21 -0
- package/README.md +43 -0
- package/dist/index.d.ts +2396 -0
- package/dist/index.js +6277 -0
- package/dist/page-script/index.global.js +611 -0
- package/dist/run-result.schema.json +1702 -0
- package/package.json +32 -0
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,2396 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { inspect } from 'node:util';
|
|
3
|
+
|
|
4
|
+
declare const ResultSourceSchema: z.ZodObject<{
|
|
5
|
+
file: z.ZodString;
|
|
6
|
+
line: z.ZodNumber;
|
|
7
|
+
col: z.ZodNumber;
|
|
8
|
+
}, z.core.$strict>;
|
|
9
|
+
declare const ResultErrorSchema: z.ZodObject<{
|
|
10
|
+
code: z.ZodString;
|
|
11
|
+
message: z.ZodString;
|
|
12
|
+
callLog: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
13
|
+
}, z.core.$strict>;
|
|
14
|
+
declare const ResultPageSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
15
|
+
status: z.ZodLiteral<"available">;
|
|
16
|
+
observationId: z.ZodString;
|
|
17
|
+
url: z.ZodString;
|
|
18
|
+
title: z.ZodString;
|
|
19
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
20
|
+
status: z.ZodLiteral<"omitted">;
|
|
21
|
+
reason: z.ZodString;
|
|
22
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
23
|
+
status: z.ZodLiteral<"unavailable">;
|
|
24
|
+
reason: z.ZodString;
|
|
25
|
+
}, z.core.$strict>], "status">;
|
|
26
|
+
declare const ResultFrameSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
27
|
+
status: z.ZodLiteral<"captured">;
|
|
28
|
+
path: z.ZodString;
|
|
29
|
+
mediaType: z.ZodLiteral<"image/jpeg">;
|
|
30
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
31
|
+
status: z.ZodLiteral<"omitted">;
|
|
32
|
+
reason: z.ZodString;
|
|
33
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
34
|
+
status: z.ZodLiteral<"unavailable">;
|
|
35
|
+
reason: z.ZodString;
|
|
36
|
+
}, z.core.$strict>], "status">;
|
|
37
|
+
declare const ResultCallSchema: z.ZodObject<{
|
|
38
|
+
purpose: z.ZodEnum<{
|
|
39
|
+
classification: "classification";
|
|
40
|
+
locator: "locator";
|
|
41
|
+
judge: "judge";
|
|
42
|
+
}>;
|
|
43
|
+
requestedModel: z.ZodString;
|
|
44
|
+
model: z.ZodString;
|
|
45
|
+
attempts: z.ZodNumber;
|
|
46
|
+
inputTokens: z.ZodNumber;
|
|
47
|
+
outputTokens: z.ZodNumber;
|
|
48
|
+
apiMs: z.ZodNullable<z.ZodNumber>;
|
|
49
|
+
inputUsdPerMillion: z.ZodNullable<z.ZodNumber>;
|
|
50
|
+
outputUsdPerMillion: z.ZodNullable<z.ZodNumber>;
|
|
51
|
+
rateSource: z.ZodNullable<z.ZodString>;
|
|
52
|
+
rateCheckedAt: z.ZodNullable<z.ZodString>;
|
|
53
|
+
costUsd: z.ZodNullable<z.ZodNumber>;
|
|
54
|
+
rateLimited: z.ZodOptional<z.ZodBoolean>;
|
|
55
|
+
rateLimitWaitMs: z.ZodOptional<z.ZodNumber>;
|
|
56
|
+
queueWaitMs: z.ZodOptional<z.ZodNumber>;
|
|
57
|
+
}, z.core.$strict>;
|
|
58
|
+
declare const ResultObservationSchema: z.ZodObject<{
|
|
59
|
+
id: z.ZodString;
|
|
60
|
+
ordinal: z.ZodNumber;
|
|
61
|
+
elapsedMs: z.ZodNumber;
|
|
62
|
+
outcome: z.ZodEnum<{
|
|
63
|
+
failed: "failed";
|
|
64
|
+
accepted: "accepted";
|
|
65
|
+
retried: "retried";
|
|
66
|
+
}>;
|
|
67
|
+
reason: z.ZodNullable<z.ZodString>;
|
|
68
|
+
timeoutReason: z.ZodNullable<z.ZodString>;
|
|
69
|
+
}, z.core.$strict>;
|
|
70
|
+
declare const ResultLocatorSchema: z.ZodObject<{
|
|
71
|
+
confidence: z.ZodNullable<z.ZodNumber>;
|
|
72
|
+
source: z.ZodEnum<{
|
|
73
|
+
model: "model";
|
|
74
|
+
cache: "cache";
|
|
75
|
+
none: "none";
|
|
76
|
+
}>;
|
|
77
|
+
options: z.ZodArray<z.ZodObject<{
|
|
78
|
+
label: z.ZodString;
|
|
79
|
+
role: z.ZodString;
|
|
80
|
+
probability: z.ZodNumber;
|
|
81
|
+
}, z.core.$strict>>;
|
|
82
|
+
cache: z.ZodNullable<z.ZodObject<{
|
|
83
|
+
outcome: z.ZodEnum<{
|
|
84
|
+
hit: "hit";
|
|
85
|
+
miss: "miss";
|
|
86
|
+
bypassed: "bypassed";
|
|
87
|
+
}>;
|
|
88
|
+
reason: z.ZodNullable<z.ZodString>;
|
|
89
|
+
fallbackCalledModel: z.ZodBoolean;
|
|
90
|
+
targetChanged: z.ZodBoolean;
|
|
91
|
+
}, z.core.$strict>>;
|
|
92
|
+
}, z.core.$strict>;
|
|
93
|
+
declare const ResultJudgementSchema: z.ZodObject<{
|
|
94
|
+
holds: z.ZodNumber;
|
|
95
|
+
contradicted: z.ZodNumber;
|
|
96
|
+
threshold: z.ZodNullable<z.ZodNumber>;
|
|
97
|
+
band: z.ZodNullable<z.ZodNumber>;
|
|
98
|
+
contradictionCutoff: z.ZodNullable<z.ZodNumber>;
|
|
99
|
+
judgedExcerpt: z.ZodNullable<z.ZodString>;
|
|
100
|
+
}, z.core.$strict>;
|
|
101
|
+
declare const ResultStepSchema: z.ZodObject<{
|
|
102
|
+
id: z.ZodString;
|
|
103
|
+
index: z.ZodNumber;
|
|
104
|
+
kind: z.ZodEnum<{
|
|
105
|
+
action: "action";
|
|
106
|
+
verify: "verify";
|
|
107
|
+
measure: "measure";
|
|
108
|
+
}>;
|
|
109
|
+
operation: z.ZodString;
|
|
110
|
+
phase: z.ZodEnum<{
|
|
111
|
+
before: "before";
|
|
112
|
+
steps: "steps";
|
|
113
|
+
after: "after";
|
|
114
|
+
}>;
|
|
115
|
+
sentence: z.ZodString;
|
|
116
|
+
detail: z.ZodString;
|
|
117
|
+
sourceStack: z.ZodArray<z.ZodObject<{
|
|
118
|
+
file: z.ZodString;
|
|
119
|
+
line: z.ZodNumber;
|
|
120
|
+
col: z.ZodNumber;
|
|
121
|
+
}, z.core.$strict>>;
|
|
122
|
+
state: z.ZodEnum<{
|
|
123
|
+
error: "error";
|
|
124
|
+
running: "running";
|
|
125
|
+
completed: "completed";
|
|
126
|
+
interrupted: "interrupted";
|
|
127
|
+
}>;
|
|
128
|
+
verdict: z.ZodNullable<z.ZodEnum<{
|
|
129
|
+
passed: "passed";
|
|
130
|
+
failed: "failed";
|
|
131
|
+
}>>;
|
|
132
|
+
flags: z.ZodArray<z.ZodEnum<{
|
|
133
|
+
low_confidence: "low_confidence";
|
|
134
|
+
contradiction: "contradiction";
|
|
135
|
+
}>>;
|
|
136
|
+
elapsedMs: z.ZodNumber;
|
|
137
|
+
page: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
138
|
+
status: z.ZodLiteral<"available">;
|
|
139
|
+
observationId: z.ZodString;
|
|
140
|
+
url: z.ZodString;
|
|
141
|
+
title: z.ZodString;
|
|
142
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
143
|
+
status: z.ZodLiteral<"omitted">;
|
|
144
|
+
reason: z.ZodString;
|
|
145
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
146
|
+
status: z.ZodLiteral<"unavailable">;
|
|
147
|
+
reason: z.ZodString;
|
|
148
|
+
}, z.core.$strict>], "status">;
|
|
149
|
+
locator: z.ZodNullable<z.ZodObject<{
|
|
150
|
+
confidence: z.ZodNullable<z.ZodNumber>;
|
|
151
|
+
source: z.ZodEnum<{
|
|
152
|
+
model: "model";
|
|
153
|
+
cache: "cache";
|
|
154
|
+
none: "none";
|
|
155
|
+
}>;
|
|
156
|
+
options: z.ZodArray<z.ZodObject<{
|
|
157
|
+
label: z.ZodString;
|
|
158
|
+
role: z.ZodString;
|
|
159
|
+
probability: z.ZodNumber;
|
|
160
|
+
}, z.core.$strict>>;
|
|
161
|
+
cache: z.ZodNullable<z.ZodObject<{
|
|
162
|
+
outcome: z.ZodEnum<{
|
|
163
|
+
hit: "hit";
|
|
164
|
+
miss: "miss";
|
|
165
|
+
bypassed: "bypassed";
|
|
166
|
+
}>;
|
|
167
|
+
reason: z.ZodNullable<z.ZodString>;
|
|
168
|
+
fallbackCalledModel: z.ZodBoolean;
|
|
169
|
+
targetChanged: z.ZodBoolean;
|
|
170
|
+
}, z.core.$strict>>;
|
|
171
|
+
}, z.core.$strict>>;
|
|
172
|
+
judgement: z.ZodNullable<z.ZodObject<{
|
|
173
|
+
holds: z.ZodNumber;
|
|
174
|
+
contradicted: z.ZodNumber;
|
|
175
|
+
threshold: z.ZodNullable<z.ZodNumber>;
|
|
176
|
+
band: z.ZodNullable<z.ZodNumber>;
|
|
177
|
+
contradictionCutoff: z.ZodNullable<z.ZodNumber>;
|
|
178
|
+
judgedExcerpt: z.ZodNullable<z.ZodString>;
|
|
179
|
+
}, z.core.$strict>>;
|
|
180
|
+
observations: z.ZodArray<z.ZodObject<{
|
|
181
|
+
id: z.ZodString;
|
|
182
|
+
ordinal: z.ZodNumber;
|
|
183
|
+
elapsedMs: z.ZodNumber;
|
|
184
|
+
outcome: z.ZodEnum<{
|
|
185
|
+
failed: "failed";
|
|
186
|
+
accepted: "accepted";
|
|
187
|
+
retried: "retried";
|
|
188
|
+
}>;
|
|
189
|
+
reason: z.ZodNullable<z.ZodString>;
|
|
190
|
+
timeoutReason: z.ZodNullable<z.ZodString>;
|
|
191
|
+
}, z.core.$strict>>;
|
|
192
|
+
calls: z.ZodArray<z.ZodObject<{
|
|
193
|
+
purpose: z.ZodEnum<{
|
|
194
|
+
classification: "classification";
|
|
195
|
+
locator: "locator";
|
|
196
|
+
judge: "judge";
|
|
197
|
+
}>;
|
|
198
|
+
requestedModel: z.ZodString;
|
|
199
|
+
model: z.ZodString;
|
|
200
|
+
attempts: z.ZodNumber;
|
|
201
|
+
inputTokens: z.ZodNumber;
|
|
202
|
+
outputTokens: z.ZodNumber;
|
|
203
|
+
apiMs: z.ZodNullable<z.ZodNumber>;
|
|
204
|
+
inputUsdPerMillion: z.ZodNullable<z.ZodNumber>;
|
|
205
|
+
outputUsdPerMillion: z.ZodNullable<z.ZodNumber>;
|
|
206
|
+
rateSource: z.ZodNullable<z.ZodString>;
|
|
207
|
+
rateCheckedAt: z.ZodNullable<z.ZodString>;
|
|
208
|
+
costUsd: z.ZodNullable<z.ZodNumber>;
|
|
209
|
+
rateLimited: z.ZodOptional<z.ZodBoolean>;
|
|
210
|
+
rateLimitWaitMs: z.ZodOptional<z.ZodNumber>;
|
|
211
|
+
queueWaitMs: z.ZodOptional<z.ZodNumber>;
|
|
212
|
+
}, z.core.$strict>>;
|
|
213
|
+
error: z.ZodNullable<z.ZodObject<{
|
|
214
|
+
code: z.ZodString;
|
|
215
|
+
message: z.ZodString;
|
|
216
|
+
callLog: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
217
|
+
}, z.core.$strict>>;
|
|
218
|
+
evidence: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
219
|
+
status: z.ZodLiteral<"captured">;
|
|
220
|
+
path: z.ZodString;
|
|
221
|
+
mediaType: z.ZodLiteral<"image/jpeg">;
|
|
222
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
223
|
+
status: z.ZodLiteral<"omitted">;
|
|
224
|
+
reason: z.ZodString;
|
|
225
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
226
|
+
status: z.ZodLiteral<"unavailable">;
|
|
227
|
+
reason: z.ZodString;
|
|
228
|
+
}, z.core.$strict>], "status">;
|
|
229
|
+
replayFrame: z.ZodNullable<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
230
|
+
status: z.ZodLiteral<"captured">;
|
|
231
|
+
path: z.ZodString;
|
|
232
|
+
mediaType: z.ZodLiteral<"image/jpeg">;
|
|
233
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
234
|
+
status: z.ZodLiteral<"omitted">;
|
|
235
|
+
reason: z.ZodString;
|
|
236
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
237
|
+
status: z.ZodLiteral<"unavailable">;
|
|
238
|
+
reason: z.ZodString;
|
|
239
|
+
}, z.core.$strict>], "status">>;
|
|
240
|
+
targetBox: z.ZodNullable<z.ZodObject<{
|
|
241
|
+
x: z.ZodNumber;
|
|
242
|
+
y: z.ZodNumber;
|
|
243
|
+
width: z.ZodNumber;
|
|
244
|
+
height: z.ZodNumber;
|
|
245
|
+
}, z.core.$strict>>;
|
|
246
|
+
}, z.core.$strict>;
|
|
247
|
+
declare const ResultProblemSchema: z.ZodObject<{
|
|
248
|
+
id: z.ZodString;
|
|
249
|
+
ordinal: z.ZodNumber;
|
|
250
|
+
origin: z.ZodEnum<{
|
|
251
|
+
step: "step";
|
|
252
|
+
module_binding: "module_binding";
|
|
253
|
+
}>;
|
|
254
|
+
outcome: z.ZodEnum<{
|
|
255
|
+
error: "error";
|
|
256
|
+
failed: "failed";
|
|
257
|
+
}>;
|
|
258
|
+
phase: z.ZodEnum<{
|
|
259
|
+
before: "before";
|
|
260
|
+
steps: "steps";
|
|
261
|
+
after: "after";
|
|
262
|
+
}>;
|
|
263
|
+
sourceStack: z.ZodArray<z.ZodObject<{
|
|
264
|
+
file: z.ZodString;
|
|
265
|
+
line: z.ZodNumber;
|
|
266
|
+
col: z.ZodNumber;
|
|
267
|
+
}, z.core.$strict>>;
|
|
268
|
+
stepId: z.ZodNullable<z.ZodString>;
|
|
269
|
+
error: z.ZodObject<{
|
|
270
|
+
code: z.ZodString;
|
|
271
|
+
message: z.ZodString;
|
|
272
|
+
callLog: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
273
|
+
}, z.core.$strict>;
|
|
274
|
+
}, z.core.$strict>;
|
|
275
|
+
declare const ResultAttemptSchema: z.ZodObject<{
|
|
276
|
+
id: z.ZodString;
|
|
277
|
+
ordinal: z.ZodNumber;
|
|
278
|
+
state: z.ZodEnum<{
|
|
279
|
+
error: "error";
|
|
280
|
+
running: "running";
|
|
281
|
+
completed: "completed";
|
|
282
|
+
interrupted: "interrupted";
|
|
283
|
+
}>;
|
|
284
|
+
verdict: z.ZodNullable<z.ZodEnum<{
|
|
285
|
+
passed: "passed";
|
|
286
|
+
failed: "failed";
|
|
287
|
+
}>>;
|
|
288
|
+
flags: z.ZodArray<z.ZodEnum<{
|
|
289
|
+
low_confidence: "low_confidence";
|
|
290
|
+
contradiction: "contradiction";
|
|
291
|
+
}>>;
|
|
292
|
+
startedAt: z.ZodString;
|
|
293
|
+
finishedAt: z.ZodNullable<z.ZodString>;
|
|
294
|
+
elapsedMs: z.ZodNumber;
|
|
295
|
+
lane: z.ZodOptional<z.ZodNumber>;
|
|
296
|
+
timeoutReason: z.ZodNullable<z.ZodString>;
|
|
297
|
+
error: z.ZodNullable<z.ZodObject<{
|
|
298
|
+
code: z.ZodString;
|
|
299
|
+
message: z.ZodString;
|
|
300
|
+
callLog: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
301
|
+
}, z.core.$strict>>;
|
|
302
|
+
steps: z.ZodArray<z.ZodObject<{
|
|
303
|
+
id: z.ZodString;
|
|
304
|
+
index: z.ZodNumber;
|
|
305
|
+
kind: z.ZodEnum<{
|
|
306
|
+
action: "action";
|
|
307
|
+
verify: "verify";
|
|
308
|
+
measure: "measure";
|
|
309
|
+
}>;
|
|
310
|
+
operation: z.ZodString;
|
|
311
|
+
phase: z.ZodEnum<{
|
|
312
|
+
before: "before";
|
|
313
|
+
steps: "steps";
|
|
314
|
+
after: "after";
|
|
315
|
+
}>;
|
|
316
|
+
sentence: z.ZodString;
|
|
317
|
+
detail: z.ZodString;
|
|
318
|
+
sourceStack: z.ZodArray<z.ZodObject<{
|
|
319
|
+
file: z.ZodString;
|
|
320
|
+
line: z.ZodNumber;
|
|
321
|
+
col: z.ZodNumber;
|
|
322
|
+
}, z.core.$strict>>;
|
|
323
|
+
state: z.ZodEnum<{
|
|
324
|
+
error: "error";
|
|
325
|
+
running: "running";
|
|
326
|
+
completed: "completed";
|
|
327
|
+
interrupted: "interrupted";
|
|
328
|
+
}>;
|
|
329
|
+
verdict: z.ZodNullable<z.ZodEnum<{
|
|
330
|
+
passed: "passed";
|
|
331
|
+
failed: "failed";
|
|
332
|
+
}>>;
|
|
333
|
+
flags: z.ZodArray<z.ZodEnum<{
|
|
334
|
+
low_confidence: "low_confidence";
|
|
335
|
+
contradiction: "contradiction";
|
|
336
|
+
}>>;
|
|
337
|
+
elapsedMs: z.ZodNumber;
|
|
338
|
+
page: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
339
|
+
status: z.ZodLiteral<"available">;
|
|
340
|
+
observationId: z.ZodString;
|
|
341
|
+
url: z.ZodString;
|
|
342
|
+
title: z.ZodString;
|
|
343
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
344
|
+
status: z.ZodLiteral<"omitted">;
|
|
345
|
+
reason: z.ZodString;
|
|
346
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
347
|
+
status: z.ZodLiteral<"unavailable">;
|
|
348
|
+
reason: z.ZodString;
|
|
349
|
+
}, z.core.$strict>], "status">;
|
|
350
|
+
locator: z.ZodNullable<z.ZodObject<{
|
|
351
|
+
confidence: z.ZodNullable<z.ZodNumber>;
|
|
352
|
+
source: z.ZodEnum<{
|
|
353
|
+
model: "model";
|
|
354
|
+
cache: "cache";
|
|
355
|
+
none: "none";
|
|
356
|
+
}>;
|
|
357
|
+
options: z.ZodArray<z.ZodObject<{
|
|
358
|
+
label: z.ZodString;
|
|
359
|
+
role: z.ZodString;
|
|
360
|
+
probability: z.ZodNumber;
|
|
361
|
+
}, z.core.$strict>>;
|
|
362
|
+
cache: z.ZodNullable<z.ZodObject<{
|
|
363
|
+
outcome: z.ZodEnum<{
|
|
364
|
+
hit: "hit";
|
|
365
|
+
miss: "miss";
|
|
366
|
+
bypassed: "bypassed";
|
|
367
|
+
}>;
|
|
368
|
+
reason: z.ZodNullable<z.ZodString>;
|
|
369
|
+
fallbackCalledModel: z.ZodBoolean;
|
|
370
|
+
targetChanged: z.ZodBoolean;
|
|
371
|
+
}, z.core.$strict>>;
|
|
372
|
+
}, z.core.$strict>>;
|
|
373
|
+
judgement: z.ZodNullable<z.ZodObject<{
|
|
374
|
+
holds: z.ZodNumber;
|
|
375
|
+
contradicted: z.ZodNumber;
|
|
376
|
+
threshold: z.ZodNullable<z.ZodNumber>;
|
|
377
|
+
band: z.ZodNullable<z.ZodNumber>;
|
|
378
|
+
contradictionCutoff: z.ZodNullable<z.ZodNumber>;
|
|
379
|
+
judgedExcerpt: z.ZodNullable<z.ZodString>;
|
|
380
|
+
}, z.core.$strict>>;
|
|
381
|
+
observations: z.ZodArray<z.ZodObject<{
|
|
382
|
+
id: z.ZodString;
|
|
383
|
+
ordinal: z.ZodNumber;
|
|
384
|
+
elapsedMs: z.ZodNumber;
|
|
385
|
+
outcome: z.ZodEnum<{
|
|
386
|
+
failed: "failed";
|
|
387
|
+
accepted: "accepted";
|
|
388
|
+
retried: "retried";
|
|
389
|
+
}>;
|
|
390
|
+
reason: z.ZodNullable<z.ZodString>;
|
|
391
|
+
timeoutReason: z.ZodNullable<z.ZodString>;
|
|
392
|
+
}, z.core.$strict>>;
|
|
393
|
+
calls: z.ZodArray<z.ZodObject<{
|
|
394
|
+
purpose: z.ZodEnum<{
|
|
395
|
+
classification: "classification";
|
|
396
|
+
locator: "locator";
|
|
397
|
+
judge: "judge";
|
|
398
|
+
}>;
|
|
399
|
+
requestedModel: z.ZodString;
|
|
400
|
+
model: z.ZodString;
|
|
401
|
+
attempts: z.ZodNumber;
|
|
402
|
+
inputTokens: z.ZodNumber;
|
|
403
|
+
outputTokens: z.ZodNumber;
|
|
404
|
+
apiMs: z.ZodNullable<z.ZodNumber>;
|
|
405
|
+
inputUsdPerMillion: z.ZodNullable<z.ZodNumber>;
|
|
406
|
+
outputUsdPerMillion: z.ZodNullable<z.ZodNumber>;
|
|
407
|
+
rateSource: z.ZodNullable<z.ZodString>;
|
|
408
|
+
rateCheckedAt: z.ZodNullable<z.ZodString>;
|
|
409
|
+
costUsd: z.ZodNullable<z.ZodNumber>;
|
|
410
|
+
rateLimited: z.ZodOptional<z.ZodBoolean>;
|
|
411
|
+
rateLimitWaitMs: z.ZodOptional<z.ZodNumber>;
|
|
412
|
+
queueWaitMs: z.ZodOptional<z.ZodNumber>;
|
|
413
|
+
}, z.core.$strict>>;
|
|
414
|
+
error: z.ZodNullable<z.ZodObject<{
|
|
415
|
+
code: z.ZodString;
|
|
416
|
+
message: z.ZodString;
|
|
417
|
+
callLog: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
418
|
+
}, z.core.$strict>>;
|
|
419
|
+
evidence: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
420
|
+
status: z.ZodLiteral<"captured">;
|
|
421
|
+
path: z.ZodString;
|
|
422
|
+
mediaType: z.ZodLiteral<"image/jpeg">;
|
|
423
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
424
|
+
status: z.ZodLiteral<"omitted">;
|
|
425
|
+
reason: z.ZodString;
|
|
426
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
427
|
+
status: z.ZodLiteral<"unavailable">;
|
|
428
|
+
reason: z.ZodString;
|
|
429
|
+
}, z.core.$strict>], "status">;
|
|
430
|
+
replayFrame: z.ZodNullable<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
431
|
+
status: z.ZodLiteral<"captured">;
|
|
432
|
+
path: z.ZodString;
|
|
433
|
+
mediaType: z.ZodLiteral<"image/jpeg">;
|
|
434
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
435
|
+
status: z.ZodLiteral<"omitted">;
|
|
436
|
+
reason: z.ZodString;
|
|
437
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
438
|
+
status: z.ZodLiteral<"unavailable">;
|
|
439
|
+
reason: z.ZodString;
|
|
440
|
+
}, z.core.$strict>], "status">>;
|
|
441
|
+
targetBox: z.ZodNullable<z.ZodObject<{
|
|
442
|
+
x: z.ZodNumber;
|
|
443
|
+
y: z.ZodNumber;
|
|
444
|
+
width: z.ZodNumber;
|
|
445
|
+
height: z.ZodNumber;
|
|
446
|
+
}, z.core.$strict>>;
|
|
447
|
+
}, z.core.$strict>>;
|
|
448
|
+
calls: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
449
|
+
purpose: z.ZodEnum<{
|
|
450
|
+
classification: "classification";
|
|
451
|
+
locator: "locator";
|
|
452
|
+
judge: "judge";
|
|
453
|
+
}>;
|
|
454
|
+
requestedModel: z.ZodString;
|
|
455
|
+
model: z.ZodString;
|
|
456
|
+
attempts: z.ZodNumber;
|
|
457
|
+
inputTokens: z.ZodNumber;
|
|
458
|
+
outputTokens: z.ZodNumber;
|
|
459
|
+
apiMs: z.ZodNullable<z.ZodNumber>;
|
|
460
|
+
inputUsdPerMillion: z.ZodNullable<z.ZodNumber>;
|
|
461
|
+
outputUsdPerMillion: z.ZodNullable<z.ZodNumber>;
|
|
462
|
+
rateSource: z.ZodNullable<z.ZodString>;
|
|
463
|
+
rateCheckedAt: z.ZodNullable<z.ZodString>;
|
|
464
|
+
costUsd: z.ZodNullable<z.ZodNumber>;
|
|
465
|
+
rateLimited: z.ZodOptional<z.ZodBoolean>;
|
|
466
|
+
rateLimitWaitMs: z.ZodOptional<z.ZodNumber>;
|
|
467
|
+
queueWaitMs: z.ZodOptional<z.ZodNumber>;
|
|
468
|
+
}, z.core.$strict>>>;
|
|
469
|
+
problems: z.ZodArray<z.ZodObject<{
|
|
470
|
+
id: z.ZodString;
|
|
471
|
+
ordinal: z.ZodNumber;
|
|
472
|
+
origin: z.ZodEnum<{
|
|
473
|
+
step: "step";
|
|
474
|
+
module_binding: "module_binding";
|
|
475
|
+
}>;
|
|
476
|
+
outcome: z.ZodEnum<{
|
|
477
|
+
error: "error";
|
|
478
|
+
failed: "failed";
|
|
479
|
+
}>;
|
|
480
|
+
phase: z.ZodEnum<{
|
|
481
|
+
before: "before";
|
|
482
|
+
steps: "steps";
|
|
483
|
+
after: "after";
|
|
484
|
+
}>;
|
|
485
|
+
sourceStack: z.ZodArray<z.ZodObject<{
|
|
486
|
+
file: z.ZodString;
|
|
487
|
+
line: z.ZodNumber;
|
|
488
|
+
col: z.ZodNumber;
|
|
489
|
+
}, z.core.$strict>>;
|
|
490
|
+
stepId: z.ZodNullable<z.ZodString>;
|
|
491
|
+
error: z.ZodObject<{
|
|
492
|
+
code: z.ZodString;
|
|
493
|
+
message: z.ZodString;
|
|
494
|
+
callLog: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
495
|
+
}, z.core.$strict>;
|
|
496
|
+
}, z.core.$strict>>;
|
|
497
|
+
primaryProblemId: z.ZodNullable<z.ZodString>;
|
|
498
|
+
}, z.core.$strict>;
|
|
499
|
+
declare const ResultTestSchema: z.ZodObject<{
|
|
500
|
+
id: z.ZodString;
|
|
501
|
+
file: z.ZodString;
|
|
502
|
+
description: z.ZodString;
|
|
503
|
+
tags: z.ZodArray<z.ZodString>;
|
|
504
|
+
state: z.ZodEnum<{
|
|
505
|
+
error: "error";
|
|
506
|
+
running: "running";
|
|
507
|
+
completed: "completed";
|
|
508
|
+
interrupted: "interrupted";
|
|
509
|
+
}>;
|
|
510
|
+
verdict: z.ZodNullable<z.ZodEnum<{
|
|
511
|
+
passed: "passed";
|
|
512
|
+
failed: "failed";
|
|
513
|
+
}>>;
|
|
514
|
+
flags: z.ZodArray<z.ZodEnum<{
|
|
515
|
+
low_confidence: "low_confidence";
|
|
516
|
+
contradiction: "contradiction";
|
|
517
|
+
}>>;
|
|
518
|
+
selectedAttemptId: z.ZodNullable<z.ZodString>;
|
|
519
|
+
attempts: z.ZodArray<z.ZodObject<{
|
|
520
|
+
id: z.ZodString;
|
|
521
|
+
ordinal: z.ZodNumber;
|
|
522
|
+
state: z.ZodEnum<{
|
|
523
|
+
error: "error";
|
|
524
|
+
running: "running";
|
|
525
|
+
completed: "completed";
|
|
526
|
+
interrupted: "interrupted";
|
|
527
|
+
}>;
|
|
528
|
+
verdict: z.ZodNullable<z.ZodEnum<{
|
|
529
|
+
passed: "passed";
|
|
530
|
+
failed: "failed";
|
|
531
|
+
}>>;
|
|
532
|
+
flags: z.ZodArray<z.ZodEnum<{
|
|
533
|
+
low_confidence: "low_confidence";
|
|
534
|
+
contradiction: "contradiction";
|
|
535
|
+
}>>;
|
|
536
|
+
startedAt: z.ZodString;
|
|
537
|
+
finishedAt: z.ZodNullable<z.ZodString>;
|
|
538
|
+
elapsedMs: z.ZodNumber;
|
|
539
|
+
lane: z.ZodOptional<z.ZodNumber>;
|
|
540
|
+
timeoutReason: z.ZodNullable<z.ZodString>;
|
|
541
|
+
error: z.ZodNullable<z.ZodObject<{
|
|
542
|
+
code: z.ZodString;
|
|
543
|
+
message: z.ZodString;
|
|
544
|
+
callLog: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
545
|
+
}, z.core.$strict>>;
|
|
546
|
+
steps: z.ZodArray<z.ZodObject<{
|
|
547
|
+
id: z.ZodString;
|
|
548
|
+
index: z.ZodNumber;
|
|
549
|
+
kind: z.ZodEnum<{
|
|
550
|
+
action: "action";
|
|
551
|
+
verify: "verify";
|
|
552
|
+
measure: "measure";
|
|
553
|
+
}>;
|
|
554
|
+
operation: z.ZodString;
|
|
555
|
+
phase: z.ZodEnum<{
|
|
556
|
+
before: "before";
|
|
557
|
+
steps: "steps";
|
|
558
|
+
after: "after";
|
|
559
|
+
}>;
|
|
560
|
+
sentence: z.ZodString;
|
|
561
|
+
detail: z.ZodString;
|
|
562
|
+
sourceStack: z.ZodArray<z.ZodObject<{
|
|
563
|
+
file: z.ZodString;
|
|
564
|
+
line: z.ZodNumber;
|
|
565
|
+
col: z.ZodNumber;
|
|
566
|
+
}, z.core.$strict>>;
|
|
567
|
+
state: z.ZodEnum<{
|
|
568
|
+
error: "error";
|
|
569
|
+
running: "running";
|
|
570
|
+
completed: "completed";
|
|
571
|
+
interrupted: "interrupted";
|
|
572
|
+
}>;
|
|
573
|
+
verdict: z.ZodNullable<z.ZodEnum<{
|
|
574
|
+
passed: "passed";
|
|
575
|
+
failed: "failed";
|
|
576
|
+
}>>;
|
|
577
|
+
flags: z.ZodArray<z.ZodEnum<{
|
|
578
|
+
low_confidence: "low_confidence";
|
|
579
|
+
contradiction: "contradiction";
|
|
580
|
+
}>>;
|
|
581
|
+
elapsedMs: z.ZodNumber;
|
|
582
|
+
page: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
583
|
+
status: z.ZodLiteral<"available">;
|
|
584
|
+
observationId: z.ZodString;
|
|
585
|
+
url: z.ZodString;
|
|
586
|
+
title: z.ZodString;
|
|
587
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
588
|
+
status: z.ZodLiteral<"omitted">;
|
|
589
|
+
reason: z.ZodString;
|
|
590
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
591
|
+
status: z.ZodLiteral<"unavailable">;
|
|
592
|
+
reason: z.ZodString;
|
|
593
|
+
}, z.core.$strict>], "status">;
|
|
594
|
+
locator: z.ZodNullable<z.ZodObject<{
|
|
595
|
+
confidence: z.ZodNullable<z.ZodNumber>;
|
|
596
|
+
source: z.ZodEnum<{
|
|
597
|
+
model: "model";
|
|
598
|
+
cache: "cache";
|
|
599
|
+
none: "none";
|
|
600
|
+
}>;
|
|
601
|
+
options: z.ZodArray<z.ZodObject<{
|
|
602
|
+
label: z.ZodString;
|
|
603
|
+
role: z.ZodString;
|
|
604
|
+
probability: z.ZodNumber;
|
|
605
|
+
}, z.core.$strict>>;
|
|
606
|
+
cache: z.ZodNullable<z.ZodObject<{
|
|
607
|
+
outcome: z.ZodEnum<{
|
|
608
|
+
hit: "hit";
|
|
609
|
+
miss: "miss";
|
|
610
|
+
bypassed: "bypassed";
|
|
611
|
+
}>;
|
|
612
|
+
reason: z.ZodNullable<z.ZodString>;
|
|
613
|
+
fallbackCalledModel: z.ZodBoolean;
|
|
614
|
+
targetChanged: z.ZodBoolean;
|
|
615
|
+
}, z.core.$strict>>;
|
|
616
|
+
}, z.core.$strict>>;
|
|
617
|
+
judgement: z.ZodNullable<z.ZodObject<{
|
|
618
|
+
holds: z.ZodNumber;
|
|
619
|
+
contradicted: z.ZodNumber;
|
|
620
|
+
threshold: z.ZodNullable<z.ZodNumber>;
|
|
621
|
+
band: z.ZodNullable<z.ZodNumber>;
|
|
622
|
+
contradictionCutoff: z.ZodNullable<z.ZodNumber>;
|
|
623
|
+
judgedExcerpt: z.ZodNullable<z.ZodString>;
|
|
624
|
+
}, z.core.$strict>>;
|
|
625
|
+
observations: z.ZodArray<z.ZodObject<{
|
|
626
|
+
id: z.ZodString;
|
|
627
|
+
ordinal: z.ZodNumber;
|
|
628
|
+
elapsedMs: z.ZodNumber;
|
|
629
|
+
outcome: z.ZodEnum<{
|
|
630
|
+
failed: "failed";
|
|
631
|
+
accepted: "accepted";
|
|
632
|
+
retried: "retried";
|
|
633
|
+
}>;
|
|
634
|
+
reason: z.ZodNullable<z.ZodString>;
|
|
635
|
+
timeoutReason: z.ZodNullable<z.ZodString>;
|
|
636
|
+
}, z.core.$strict>>;
|
|
637
|
+
calls: z.ZodArray<z.ZodObject<{
|
|
638
|
+
purpose: z.ZodEnum<{
|
|
639
|
+
classification: "classification";
|
|
640
|
+
locator: "locator";
|
|
641
|
+
judge: "judge";
|
|
642
|
+
}>;
|
|
643
|
+
requestedModel: z.ZodString;
|
|
644
|
+
model: z.ZodString;
|
|
645
|
+
attempts: z.ZodNumber;
|
|
646
|
+
inputTokens: z.ZodNumber;
|
|
647
|
+
outputTokens: z.ZodNumber;
|
|
648
|
+
apiMs: z.ZodNullable<z.ZodNumber>;
|
|
649
|
+
inputUsdPerMillion: z.ZodNullable<z.ZodNumber>;
|
|
650
|
+
outputUsdPerMillion: z.ZodNullable<z.ZodNumber>;
|
|
651
|
+
rateSource: z.ZodNullable<z.ZodString>;
|
|
652
|
+
rateCheckedAt: z.ZodNullable<z.ZodString>;
|
|
653
|
+
costUsd: z.ZodNullable<z.ZodNumber>;
|
|
654
|
+
rateLimited: z.ZodOptional<z.ZodBoolean>;
|
|
655
|
+
rateLimitWaitMs: z.ZodOptional<z.ZodNumber>;
|
|
656
|
+
queueWaitMs: z.ZodOptional<z.ZodNumber>;
|
|
657
|
+
}, z.core.$strict>>;
|
|
658
|
+
error: z.ZodNullable<z.ZodObject<{
|
|
659
|
+
code: z.ZodString;
|
|
660
|
+
message: z.ZodString;
|
|
661
|
+
callLog: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
662
|
+
}, z.core.$strict>>;
|
|
663
|
+
evidence: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
664
|
+
status: z.ZodLiteral<"captured">;
|
|
665
|
+
path: z.ZodString;
|
|
666
|
+
mediaType: z.ZodLiteral<"image/jpeg">;
|
|
667
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
668
|
+
status: z.ZodLiteral<"omitted">;
|
|
669
|
+
reason: z.ZodString;
|
|
670
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
671
|
+
status: z.ZodLiteral<"unavailable">;
|
|
672
|
+
reason: z.ZodString;
|
|
673
|
+
}, z.core.$strict>], "status">;
|
|
674
|
+
replayFrame: z.ZodNullable<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
675
|
+
status: z.ZodLiteral<"captured">;
|
|
676
|
+
path: z.ZodString;
|
|
677
|
+
mediaType: z.ZodLiteral<"image/jpeg">;
|
|
678
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
679
|
+
status: z.ZodLiteral<"omitted">;
|
|
680
|
+
reason: z.ZodString;
|
|
681
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
682
|
+
status: z.ZodLiteral<"unavailable">;
|
|
683
|
+
reason: z.ZodString;
|
|
684
|
+
}, z.core.$strict>], "status">>;
|
|
685
|
+
targetBox: z.ZodNullable<z.ZodObject<{
|
|
686
|
+
x: z.ZodNumber;
|
|
687
|
+
y: z.ZodNumber;
|
|
688
|
+
width: z.ZodNumber;
|
|
689
|
+
height: z.ZodNumber;
|
|
690
|
+
}, z.core.$strict>>;
|
|
691
|
+
}, z.core.$strict>>;
|
|
692
|
+
calls: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
693
|
+
purpose: z.ZodEnum<{
|
|
694
|
+
classification: "classification";
|
|
695
|
+
locator: "locator";
|
|
696
|
+
judge: "judge";
|
|
697
|
+
}>;
|
|
698
|
+
requestedModel: z.ZodString;
|
|
699
|
+
model: z.ZodString;
|
|
700
|
+
attempts: z.ZodNumber;
|
|
701
|
+
inputTokens: z.ZodNumber;
|
|
702
|
+
outputTokens: z.ZodNumber;
|
|
703
|
+
apiMs: z.ZodNullable<z.ZodNumber>;
|
|
704
|
+
inputUsdPerMillion: z.ZodNullable<z.ZodNumber>;
|
|
705
|
+
outputUsdPerMillion: z.ZodNullable<z.ZodNumber>;
|
|
706
|
+
rateSource: z.ZodNullable<z.ZodString>;
|
|
707
|
+
rateCheckedAt: z.ZodNullable<z.ZodString>;
|
|
708
|
+
costUsd: z.ZodNullable<z.ZodNumber>;
|
|
709
|
+
rateLimited: z.ZodOptional<z.ZodBoolean>;
|
|
710
|
+
rateLimitWaitMs: z.ZodOptional<z.ZodNumber>;
|
|
711
|
+
queueWaitMs: z.ZodOptional<z.ZodNumber>;
|
|
712
|
+
}, z.core.$strict>>>;
|
|
713
|
+
problems: z.ZodArray<z.ZodObject<{
|
|
714
|
+
id: z.ZodString;
|
|
715
|
+
ordinal: z.ZodNumber;
|
|
716
|
+
origin: z.ZodEnum<{
|
|
717
|
+
step: "step";
|
|
718
|
+
module_binding: "module_binding";
|
|
719
|
+
}>;
|
|
720
|
+
outcome: z.ZodEnum<{
|
|
721
|
+
error: "error";
|
|
722
|
+
failed: "failed";
|
|
723
|
+
}>;
|
|
724
|
+
phase: z.ZodEnum<{
|
|
725
|
+
before: "before";
|
|
726
|
+
steps: "steps";
|
|
727
|
+
after: "after";
|
|
728
|
+
}>;
|
|
729
|
+
sourceStack: z.ZodArray<z.ZodObject<{
|
|
730
|
+
file: z.ZodString;
|
|
731
|
+
line: z.ZodNumber;
|
|
732
|
+
col: z.ZodNumber;
|
|
733
|
+
}, z.core.$strict>>;
|
|
734
|
+
stepId: z.ZodNullable<z.ZodString>;
|
|
735
|
+
error: z.ZodObject<{
|
|
736
|
+
code: z.ZodString;
|
|
737
|
+
message: z.ZodString;
|
|
738
|
+
callLog: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
739
|
+
}, z.core.$strict>;
|
|
740
|
+
}, z.core.$strict>>;
|
|
741
|
+
primaryProblemId: z.ZodNullable<z.ZodString>;
|
|
742
|
+
}, z.core.$strict>>;
|
|
743
|
+
}, z.core.$strict>;
|
|
744
|
+
declare const ResultTotalsSchema: z.ZodObject<{
|
|
745
|
+
selectedTests: z.ZodNumber;
|
|
746
|
+
executedTests: z.ZodNumber;
|
|
747
|
+
passedTests: z.ZodNumber;
|
|
748
|
+
failedTests: z.ZodNumber;
|
|
749
|
+
passedSteps: z.ZodNumber;
|
|
750
|
+
failedSteps: z.ZodNumber;
|
|
751
|
+
historicalAttempts: z.ZodNumber;
|
|
752
|
+
flaggedSteps: z.ZodNumber;
|
|
753
|
+
modelCalls: z.ZodNumber;
|
|
754
|
+
inputTokens: z.ZodNumber;
|
|
755
|
+
outputTokens: z.ZodNumber;
|
|
756
|
+
costUsd: z.ZodNullable<z.ZodNumber>;
|
|
757
|
+
costComplete: z.ZodBoolean;
|
|
758
|
+
}, z.core.$strict>;
|
|
759
|
+
declare const ResultExecutionSchema: z.ZodObject<{
|
|
760
|
+
parallel: z.ZodObject<{
|
|
761
|
+
requested: z.ZodUnion<readonly [z.ZodNumber, z.ZodLiteral<"auto">]>;
|
|
762
|
+
lanes: z.ZodNumber;
|
|
763
|
+
}, z.core.$strict>;
|
|
764
|
+
shard: z.ZodNullable<z.ZodObject<{
|
|
765
|
+
index: z.ZodNumber;
|
|
766
|
+
count: z.ZodNumber;
|
|
767
|
+
globalSelectedTests: z.ZodNumber;
|
|
768
|
+
}, z.core.$strict>>;
|
|
769
|
+
providerConcurrency: z.ZodNumber;
|
|
770
|
+
}, z.core.$strict>;
|
|
771
|
+
declare const RunResultSchema: z.ZodObject<{
|
|
772
|
+
schemaVersion: z.ZodLiteral<1>;
|
|
773
|
+
runId: z.ZodString;
|
|
774
|
+
state: z.ZodEnum<{
|
|
775
|
+
error: "error";
|
|
776
|
+
running: "running";
|
|
777
|
+
completed: "completed";
|
|
778
|
+
interrupted: "interrupted";
|
|
779
|
+
}>;
|
|
780
|
+
verdict: z.ZodNullable<z.ZodEnum<{
|
|
781
|
+
passed: "passed";
|
|
782
|
+
failed: "failed";
|
|
783
|
+
}>>;
|
|
784
|
+
flags: z.ZodArray<z.ZodEnum<{
|
|
785
|
+
low_confidence: "low_confidence";
|
|
786
|
+
contradiction: "contradiction";
|
|
787
|
+
}>>;
|
|
788
|
+
startedAt: z.ZodString;
|
|
789
|
+
updatedAt: z.ZodString;
|
|
790
|
+
finishedAt: z.ZodNullable<z.ZodString>;
|
|
791
|
+
elapsedMs: z.ZodNumber;
|
|
792
|
+
selectedTestCount: z.ZodOptional<z.ZodNumber>;
|
|
793
|
+
execution: z.ZodOptional<z.ZodObject<{
|
|
794
|
+
parallel: z.ZodObject<{
|
|
795
|
+
requested: z.ZodUnion<readonly [z.ZodNumber, z.ZodLiteral<"auto">]>;
|
|
796
|
+
lanes: z.ZodNumber;
|
|
797
|
+
}, z.core.$strict>;
|
|
798
|
+
shard: z.ZodNullable<z.ZodObject<{
|
|
799
|
+
index: z.ZodNumber;
|
|
800
|
+
count: z.ZodNumber;
|
|
801
|
+
globalSelectedTests: z.ZodNumber;
|
|
802
|
+
}, z.core.$strict>>;
|
|
803
|
+
providerConcurrency: z.ZodNumber;
|
|
804
|
+
}, z.core.$strict>>;
|
|
805
|
+
totals: z.ZodObject<{
|
|
806
|
+
selectedTests: z.ZodNumber;
|
|
807
|
+
executedTests: z.ZodNumber;
|
|
808
|
+
passedTests: z.ZodNumber;
|
|
809
|
+
failedTests: z.ZodNumber;
|
|
810
|
+
passedSteps: z.ZodNumber;
|
|
811
|
+
failedSteps: z.ZodNumber;
|
|
812
|
+
historicalAttempts: z.ZodNumber;
|
|
813
|
+
flaggedSteps: z.ZodNumber;
|
|
814
|
+
modelCalls: z.ZodNumber;
|
|
815
|
+
inputTokens: z.ZodNumber;
|
|
816
|
+
outputTokens: z.ZodNumber;
|
|
817
|
+
costUsd: z.ZodNullable<z.ZodNumber>;
|
|
818
|
+
costComplete: z.ZodBoolean;
|
|
819
|
+
}, z.core.$strict>;
|
|
820
|
+
setupCalls: z.ZodArray<z.ZodObject<{
|
|
821
|
+
purpose: z.ZodEnum<{
|
|
822
|
+
classification: "classification";
|
|
823
|
+
locator: "locator";
|
|
824
|
+
judge: "judge";
|
|
825
|
+
}>;
|
|
826
|
+
requestedModel: z.ZodString;
|
|
827
|
+
model: z.ZodString;
|
|
828
|
+
attempts: z.ZodNumber;
|
|
829
|
+
inputTokens: z.ZodNumber;
|
|
830
|
+
outputTokens: z.ZodNumber;
|
|
831
|
+
apiMs: z.ZodNullable<z.ZodNumber>;
|
|
832
|
+
inputUsdPerMillion: z.ZodNullable<z.ZodNumber>;
|
|
833
|
+
outputUsdPerMillion: z.ZodNullable<z.ZodNumber>;
|
|
834
|
+
rateSource: z.ZodNullable<z.ZodString>;
|
|
835
|
+
rateCheckedAt: z.ZodNullable<z.ZodString>;
|
|
836
|
+
costUsd: z.ZodNullable<z.ZodNumber>;
|
|
837
|
+
rateLimited: z.ZodOptional<z.ZodBoolean>;
|
|
838
|
+
rateLimitWaitMs: z.ZodOptional<z.ZodNumber>;
|
|
839
|
+
queueWaitMs: z.ZodOptional<z.ZodNumber>;
|
|
840
|
+
}, z.core.$strict>>;
|
|
841
|
+
tests: z.ZodArray<z.ZodObject<{
|
|
842
|
+
id: z.ZodString;
|
|
843
|
+
file: z.ZodString;
|
|
844
|
+
description: z.ZodString;
|
|
845
|
+
tags: z.ZodArray<z.ZodString>;
|
|
846
|
+
state: z.ZodEnum<{
|
|
847
|
+
error: "error";
|
|
848
|
+
running: "running";
|
|
849
|
+
completed: "completed";
|
|
850
|
+
interrupted: "interrupted";
|
|
851
|
+
}>;
|
|
852
|
+
verdict: z.ZodNullable<z.ZodEnum<{
|
|
853
|
+
passed: "passed";
|
|
854
|
+
failed: "failed";
|
|
855
|
+
}>>;
|
|
856
|
+
flags: z.ZodArray<z.ZodEnum<{
|
|
857
|
+
low_confidence: "low_confidence";
|
|
858
|
+
contradiction: "contradiction";
|
|
859
|
+
}>>;
|
|
860
|
+
selectedAttemptId: z.ZodNullable<z.ZodString>;
|
|
861
|
+
attempts: z.ZodArray<z.ZodObject<{
|
|
862
|
+
id: z.ZodString;
|
|
863
|
+
ordinal: z.ZodNumber;
|
|
864
|
+
state: z.ZodEnum<{
|
|
865
|
+
error: "error";
|
|
866
|
+
running: "running";
|
|
867
|
+
completed: "completed";
|
|
868
|
+
interrupted: "interrupted";
|
|
869
|
+
}>;
|
|
870
|
+
verdict: z.ZodNullable<z.ZodEnum<{
|
|
871
|
+
passed: "passed";
|
|
872
|
+
failed: "failed";
|
|
873
|
+
}>>;
|
|
874
|
+
flags: z.ZodArray<z.ZodEnum<{
|
|
875
|
+
low_confidence: "low_confidence";
|
|
876
|
+
contradiction: "contradiction";
|
|
877
|
+
}>>;
|
|
878
|
+
startedAt: z.ZodString;
|
|
879
|
+
finishedAt: z.ZodNullable<z.ZodString>;
|
|
880
|
+
elapsedMs: z.ZodNumber;
|
|
881
|
+
lane: z.ZodOptional<z.ZodNumber>;
|
|
882
|
+
timeoutReason: z.ZodNullable<z.ZodString>;
|
|
883
|
+
error: z.ZodNullable<z.ZodObject<{
|
|
884
|
+
code: z.ZodString;
|
|
885
|
+
message: z.ZodString;
|
|
886
|
+
callLog: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
887
|
+
}, z.core.$strict>>;
|
|
888
|
+
steps: z.ZodArray<z.ZodObject<{
|
|
889
|
+
id: z.ZodString;
|
|
890
|
+
index: z.ZodNumber;
|
|
891
|
+
kind: z.ZodEnum<{
|
|
892
|
+
action: "action";
|
|
893
|
+
verify: "verify";
|
|
894
|
+
measure: "measure";
|
|
895
|
+
}>;
|
|
896
|
+
operation: z.ZodString;
|
|
897
|
+
phase: z.ZodEnum<{
|
|
898
|
+
before: "before";
|
|
899
|
+
steps: "steps";
|
|
900
|
+
after: "after";
|
|
901
|
+
}>;
|
|
902
|
+
sentence: z.ZodString;
|
|
903
|
+
detail: z.ZodString;
|
|
904
|
+
sourceStack: z.ZodArray<z.ZodObject<{
|
|
905
|
+
file: z.ZodString;
|
|
906
|
+
line: z.ZodNumber;
|
|
907
|
+
col: z.ZodNumber;
|
|
908
|
+
}, z.core.$strict>>;
|
|
909
|
+
state: z.ZodEnum<{
|
|
910
|
+
error: "error";
|
|
911
|
+
running: "running";
|
|
912
|
+
completed: "completed";
|
|
913
|
+
interrupted: "interrupted";
|
|
914
|
+
}>;
|
|
915
|
+
verdict: z.ZodNullable<z.ZodEnum<{
|
|
916
|
+
passed: "passed";
|
|
917
|
+
failed: "failed";
|
|
918
|
+
}>>;
|
|
919
|
+
flags: z.ZodArray<z.ZodEnum<{
|
|
920
|
+
low_confidence: "low_confidence";
|
|
921
|
+
contradiction: "contradiction";
|
|
922
|
+
}>>;
|
|
923
|
+
elapsedMs: z.ZodNumber;
|
|
924
|
+
page: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
925
|
+
status: z.ZodLiteral<"available">;
|
|
926
|
+
observationId: z.ZodString;
|
|
927
|
+
url: z.ZodString;
|
|
928
|
+
title: z.ZodString;
|
|
929
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
930
|
+
status: z.ZodLiteral<"omitted">;
|
|
931
|
+
reason: z.ZodString;
|
|
932
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
933
|
+
status: z.ZodLiteral<"unavailable">;
|
|
934
|
+
reason: z.ZodString;
|
|
935
|
+
}, z.core.$strict>], "status">;
|
|
936
|
+
locator: z.ZodNullable<z.ZodObject<{
|
|
937
|
+
confidence: z.ZodNullable<z.ZodNumber>;
|
|
938
|
+
source: z.ZodEnum<{
|
|
939
|
+
model: "model";
|
|
940
|
+
cache: "cache";
|
|
941
|
+
none: "none";
|
|
942
|
+
}>;
|
|
943
|
+
options: z.ZodArray<z.ZodObject<{
|
|
944
|
+
label: z.ZodString;
|
|
945
|
+
role: z.ZodString;
|
|
946
|
+
probability: z.ZodNumber;
|
|
947
|
+
}, z.core.$strict>>;
|
|
948
|
+
cache: z.ZodNullable<z.ZodObject<{
|
|
949
|
+
outcome: z.ZodEnum<{
|
|
950
|
+
hit: "hit";
|
|
951
|
+
miss: "miss";
|
|
952
|
+
bypassed: "bypassed";
|
|
953
|
+
}>;
|
|
954
|
+
reason: z.ZodNullable<z.ZodString>;
|
|
955
|
+
fallbackCalledModel: z.ZodBoolean;
|
|
956
|
+
targetChanged: z.ZodBoolean;
|
|
957
|
+
}, z.core.$strict>>;
|
|
958
|
+
}, z.core.$strict>>;
|
|
959
|
+
judgement: z.ZodNullable<z.ZodObject<{
|
|
960
|
+
holds: z.ZodNumber;
|
|
961
|
+
contradicted: z.ZodNumber;
|
|
962
|
+
threshold: z.ZodNullable<z.ZodNumber>;
|
|
963
|
+
band: z.ZodNullable<z.ZodNumber>;
|
|
964
|
+
contradictionCutoff: z.ZodNullable<z.ZodNumber>;
|
|
965
|
+
judgedExcerpt: z.ZodNullable<z.ZodString>;
|
|
966
|
+
}, z.core.$strict>>;
|
|
967
|
+
observations: z.ZodArray<z.ZodObject<{
|
|
968
|
+
id: z.ZodString;
|
|
969
|
+
ordinal: z.ZodNumber;
|
|
970
|
+
elapsedMs: z.ZodNumber;
|
|
971
|
+
outcome: z.ZodEnum<{
|
|
972
|
+
failed: "failed";
|
|
973
|
+
accepted: "accepted";
|
|
974
|
+
retried: "retried";
|
|
975
|
+
}>;
|
|
976
|
+
reason: z.ZodNullable<z.ZodString>;
|
|
977
|
+
timeoutReason: z.ZodNullable<z.ZodString>;
|
|
978
|
+
}, z.core.$strict>>;
|
|
979
|
+
calls: z.ZodArray<z.ZodObject<{
|
|
980
|
+
purpose: z.ZodEnum<{
|
|
981
|
+
classification: "classification";
|
|
982
|
+
locator: "locator";
|
|
983
|
+
judge: "judge";
|
|
984
|
+
}>;
|
|
985
|
+
requestedModel: z.ZodString;
|
|
986
|
+
model: z.ZodString;
|
|
987
|
+
attempts: z.ZodNumber;
|
|
988
|
+
inputTokens: z.ZodNumber;
|
|
989
|
+
outputTokens: z.ZodNumber;
|
|
990
|
+
apiMs: z.ZodNullable<z.ZodNumber>;
|
|
991
|
+
inputUsdPerMillion: z.ZodNullable<z.ZodNumber>;
|
|
992
|
+
outputUsdPerMillion: z.ZodNullable<z.ZodNumber>;
|
|
993
|
+
rateSource: z.ZodNullable<z.ZodString>;
|
|
994
|
+
rateCheckedAt: z.ZodNullable<z.ZodString>;
|
|
995
|
+
costUsd: z.ZodNullable<z.ZodNumber>;
|
|
996
|
+
rateLimited: z.ZodOptional<z.ZodBoolean>;
|
|
997
|
+
rateLimitWaitMs: z.ZodOptional<z.ZodNumber>;
|
|
998
|
+
queueWaitMs: z.ZodOptional<z.ZodNumber>;
|
|
999
|
+
}, z.core.$strict>>;
|
|
1000
|
+
error: z.ZodNullable<z.ZodObject<{
|
|
1001
|
+
code: z.ZodString;
|
|
1002
|
+
message: z.ZodString;
|
|
1003
|
+
callLog: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
1004
|
+
}, z.core.$strict>>;
|
|
1005
|
+
evidence: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
1006
|
+
status: z.ZodLiteral<"captured">;
|
|
1007
|
+
path: z.ZodString;
|
|
1008
|
+
mediaType: z.ZodLiteral<"image/jpeg">;
|
|
1009
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
1010
|
+
status: z.ZodLiteral<"omitted">;
|
|
1011
|
+
reason: z.ZodString;
|
|
1012
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
1013
|
+
status: z.ZodLiteral<"unavailable">;
|
|
1014
|
+
reason: z.ZodString;
|
|
1015
|
+
}, z.core.$strict>], "status">;
|
|
1016
|
+
replayFrame: z.ZodNullable<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
1017
|
+
status: z.ZodLiteral<"captured">;
|
|
1018
|
+
path: z.ZodString;
|
|
1019
|
+
mediaType: z.ZodLiteral<"image/jpeg">;
|
|
1020
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
1021
|
+
status: z.ZodLiteral<"omitted">;
|
|
1022
|
+
reason: z.ZodString;
|
|
1023
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
1024
|
+
status: z.ZodLiteral<"unavailable">;
|
|
1025
|
+
reason: z.ZodString;
|
|
1026
|
+
}, z.core.$strict>], "status">>;
|
|
1027
|
+
targetBox: z.ZodNullable<z.ZodObject<{
|
|
1028
|
+
x: z.ZodNumber;
|
|
1029
|
+
y: z.ZodNumber;
|
|
1030
|
+
width: z.ZodNumber;
|
|
1031
|
+
height: z.ZodNumber;
|
|
1032
|
+
}, z.core.$strict>>;
|
|
1033
|
+
}, z.core.$strict>>;
|
|
1034
|
+
calls: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
1035
|
+
purpose: z.ZodEnum<{
|
|
1036
|
+
classification: "classification";
|
|
1037
|
+
locator: "locator";
|
|
1038
|
+
judge: "judge";
|
|
1039
|
+
}>;
|
|
1040
|
+
requestedModel: z.ZodString;
|
|
1041
|
+
model: z.ZodString;
|
|
1042
|
+
attempts: z.ZodNumber;
|
|
1043
|
+
inputTokens: z.ZodNumber;
|
|
1044
|
+
outputTokens: z.ZodNumber;
|
|
1045
|
+
apiMs: z.ZodNullable<z.ZodNumber>;
|
|
1046
|
+
inputUsdPerMillion: z.ZodNullable<z.ZodNumber>;
|
|
1047
|
+
outputUsdPerMillion: z.ZodNullable<z.ZodNumber>;
|
|
1048
|
+
rateSource: z.ZodNullable<z.ZodString>;
|
|
1049
|
+
rateCheckedAt: z.ZodNullable<z.ZodString>;
|
|
1050
|
+
costUsd: z.ZodNullable<z.ZodNumber>;
|
|
1051
|
+
rateLimited: z.ZodOptional<z.ZodBoolean>;
|
|
1052
|
+
rateLimitWaitMs: z.ZodOptional<z.ZodNumber>;
|
|
1053
|
+
queueWaitMs: z.ZodOptional<z.ZodNumber>;
|
|
1054
|
+
}, z.core.$strict>>>;
|
|
1055
|
+
problems: z.ZodArray<z.ZodObject<{
|
|
1056
|
+
id: z.ZodString;
|
|
1057
|
+
ordinal: z.ZodNumber;
|
|
1058
|
+
origin: z.ZodEnum<{
|
|
1059
|
+
step: "step";
|
|
1060
|
+
module_binding: "module_binding";
|
|
1061
|
+
}>;
|
|
1062
|
+
outcome: z.ZodEnum<{
|
|
1063
|
+
error: "error";
|
|
1064
|
+
failed: "failed";
|
|
1065
|
+
}>;
|
|
1066
|
+
phase: z.ZodEnum<{
|
|
1067
|
+
before: "before";
|
|
1068
|
+
steps: "steps";
|
|
1069
|
+
after: "after";
|
|
1070
|
+
}>;
|
|
1071
|
+
sourceStack: z.ZodArray<z.ZodObject<{
|
|
1072
|
+
file: z.ZodString;
|
|
1073
|
+
line: z.ZodNumber;
|
|
1074
|
+
col: z.ZodNumber;
|
|
1075
|
+
}, z.core.$strict>>;
|
|
1076
|
+
stepId: z.ZodNullable<z.ZodString>;
|
|
1077
|
+
error: z.ZodObject<{
|
|
1078
|
+
code: z.ZodString;
|
|
1079
|
+
message: z.ZodString;
|
|
1080
|
+
callLog: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
1081
|
+
}, z.core.$strict>;
|
|
1082
|
+
}, z.core.$strict>>;
|
|
1083
|
+
primaryProblemId: z.ZodNullable<z.ZodString>;
|
|
1084
|
+
}, z.core.$strict>>;
|
|
1085
|
+
}, z.core.$strict>>;
|
|
1086
|
+
discoveryProblems: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
1087
|
+
file: z.ZodString;
|
|
1088
|
+
line: z.ZodOptional<z.ZodNumber>;
|
|
1089
|
+
col: z.ZodOptional<z.ZodNumber>;
|
|
1090
|
+
code: z.ZodString;
|
|
1091
|
+
message: z.ZodString;
|
|
1092
|
+
fix: z.ZodString;
|
|
1093
|
+
}, z.core.$strict>>>;
|
|
1094
|
+
error: z.ZodNullable<z.ZodObject<{
|
|
1095
|
+
code: z.ZodString;
|
|
1096
|
+
message: z.ZodString;
|
|
1097
|
+
callLog: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
1098
|
+
}, z.core.$strict>>;
|
|
1099
|
+
}, z.core.$strict>;
|
|
1100
|
+
type RunResult = z.infer<typeof RunResultSchema>;
|
|
1101
|
+
type ResultStep = z.infer<typeof ResultStepSchema>;
|
|
1102
|
+
type ResultTest = z.infer<typeof ResultTestSchema>;
|
|
1103
|
+
type ResultAttempt = z.infer<typeof ResultAttemptSchema>;
|
|
1104
|
+
type ResultProblem = z.infer<typeof ResultProblemSchema>;
|
|
1105
|
+
type ResultCall = z.infer<typeof ResultCallSchema>;
|
|
1106
|
+
type ResultPage = z.infer<typeof ResultPageSchema>;
|
|
1107
|
+
type ResultFrame = z.infer<typeof ResultFrameSchema>;
|
|
1108
|
+
type ResultExecution = z.infer<typeof ResultExecutionSchema>;
|
|
1109
|
+
declare function resultTotals(tests: readonly ResultTest[], setupCalls?: readonly ResultCall[], selectedTestCount?: number): RunResult["totals"];
|
|
1110
|
+
declare function validateRunResult(value: unknown): RunResult;
|
|
1111
|
+
declare function runResultJsonSchema(): object;
|
|
1112
|
+
|
|
1113
|
+
type ResultSink = (snapshot: RunResult) => Promise<void>;
|
|
1114
|
+
interface TestStartInput {
|
|
1115
|
+
readonly id: string;
|
|
1116
|
+
readonly file: string;
|
|
1117
|
+
readonly description?: string;
|
|
1118
|
+
readonly tags?: readonly string[];
|
|
1119
|
+
/** Selection position; `tests[]` stays in this order whatever finishes first. */
|
|
1120
|
+
readonly ordinal?: number;
|
|
1121
|
+
/** Zero-based parallel lane running the first attempt. */
|
|
1122
|
+
readonly lane?: number;
|
|
1123
|
+
}
|
|
1124
|
+
type ProblemInput = Pick<ResultProblem, "origin" | "outcome" | "phase" | "sourceStack" | "stepId" | "error">;
|
|
1125
|
+
/**
|
|
1126
|
+
* One test's view of the run journal. Every mutation is bound to this test's
|
|
1127
|
+
* id, so concurrently running tests never write into each other.
|
|
1128
|
+
*/
|
|
1129
|
+
declare class TestRecording {
|
|
1130
|
+
private readonly recorder;
|
|
1131
|
+
readonly testId: string;
|
|
1132
|
+
readonly ordinal: number;
|
|
1133
|
+
constructor(recorder: RunRecorder, testId: string, ordinal: number);
|
|
1134
|
+
/** The test as last recorded. */
|
|
1135
|
+
get test(): ResultTest;
|
|
1136
|
+
get file(): string;
|
|
1137
|
+
/** The newest attempt, or null before any attempt exists. */
|
|
1138
|
+
get currentAttempt(): {
|
|
1139
|
+
readonly id: string;
|
|
1140
|
+
readonly ordinal: number;
|
|
1141
|
+
readonly running: boolean;
|
|
1142
|
+
readonly stepCount: number;
|
|
1143
|
+
} | null;
|
|
1144
|
+
startAttempt(lane?: number): Promise<void>;
|
|
1145
|
+
addStep(step: ResultStep): Promise<void>;
|
|
1146
|
+
addProblem(input: ProblemInput): Promise<void>;
|
|
1147
|
+
addAttemptCalls(calls: readonly ResultCall[]): Promise<void>;
|
|
1148
|
+
finishTest(verdict: "passed" | "failed"): Promise<void>;
|
|
1149
|
+
}
|
|
1150
|
+
/** One run owns the mutable journal; each published value is a validated copy. */
|
|
1151
|
+
declare class RunRecorder {
|
|
1152
|
+
private readonly sink;
|
|
1153
|
+
private readonly started;
|
|
1154
|
+
private value;
|
|
1155
|
+
private readonly ordinals;
|
|
1156
|
+
private lastTestId;
|
|
1157
|
+
constructor(sink: ResultSink, runId?: string);
|
|
1158
|
+
get runId(): string;
|
|
1159
|
+
get snapshot(): RunResult;
|
|
1160
|
+
private publish;
|
|
1161
|
+
/** @internal Handles read their test through here. */
|
|
1162
|
+
testById(testId: string): ResultTest;
|
|
1163
|
+
private replaceTest;
|
|
1164
|
+
private replaceRunningAttempt;
|
|
1165
|
+
private get lastTest();
|
|
1166
|
+
start(): Promise<void>;
|
|
1167
|
+
addSetupCalls(calls: readonly ResultCall[]): Promise<void>;
|
|
1168
|
+
addDiscoveryProblems(problems: NonNullable<RunResult["discoveryProblems"]>): Promise<void>;
|
|
1169
|
+
/** Record the selection size and, for parallel or sharded runs, how it runs. */
|
|
1170
|
+
selectTests(count: number, execution?: ResultExecution): Promise<void>;
|
|
1171
|
+
/** The recording for a selection ordinal, if that test has started. */
|
|
1172
|
+
testAt(ordinal: number): TestRecording | undefined;
|
|
1173
|
+
/** The most recently started test, for sequential single-test callers. */
|
|
1174
|
+
latestTest(): TestRecording | undefined;
|
|
1175
|
+
/** Start one logical test and its first attempt; inserted in selection order. */
|
|
1176
|
+
beginTest(input: TestStartInput): Promise<TestRecording>;
|
|
1177
|
+
startTest(input: TestStartInput): Promise<void>;
|
|
1178
|
+
/** @internal Use `TestRecording.addAttemptCalls`. */
|
|
1179
|
+
addAttemptCallsFor(testId: string, calls: readonly ResultCall[]): Promise<void>;
|
|
1180
|
+
addAttemptCalls(calls: readonly ResultCall[]): Promise<void>;
|
|
1181
|
+
/** @internal Use `TestRecording.addStep`. */
|
|
1182
|
+
addStepFor(testId: string, step: ResultStep): Promise<void>;
|
|
1183
|
+
addStep(step: ResultStep): Promise<void>;
|
|
1184
|
+
/** @internal Use `TestRecording.addProblem`. */
|
|
1185
|
+
addProblemFor(testId: string, input: ProblemInput): Promise<void>;
|
|
1186
|
+
addProblem(input: ProblemInput): Promise<void>;
|
|
1187
|
+
/**
|
|
1188
|
+
* @internal Use `TestRecording.startAttempt`. Retry orchestration calls this
|
|
1189
|
+
* only after a terminal whole-test attempt.
|
|
1190
|
+
*/
|
|
1191
|
+
startAttemptFor(testId: string, lane?: number): Promise<void>;
|
|
1192
|
+
startAttempt(): Promise<void>;
|
|
1193
|
+
/** @internal Use `TestRecording.finishTest`. */
|
|
1194
|
+
finishTestFor(testId: string, verdict: "passed" | "failed"): Promise<void>;
|
|
1195
|
+
finishTest(verdict: "passed" | "failed"): Promise<void>;
|
|
1196
|
+
finish(error?: RunResult["error"], terminalState?: "error" | "interrupted"): Promise<void>;
|
|
1197
|
+
}
|
|
1198
|
+
|
|
1199
|
+
declare const PAGE_PROTOCOL = 1;
|
|
1200
|
+
declare const CANDIDATE_LIMIT = 128;
|
|
1201
|
+
declare const NAME_LIMIT = 120;
|
|
1202
|
+
declare const PEER_LIMIT = 80;
|
|
1203
|
+
declare const DIGEST_LIMIT = 4096;
|
|
1204
|
+
declare function isSafeRole(value: string): boolean;
|
|
1205
|
+
declare function isWeakPeer(value: string): boolean;
|
|
1206
|
+
type Operation = "click" | "fill" | "read";
|
|
1207
|
+
interface PageVersion {
|
|
1208
|
+
readonly document: string;
|
|
1209
|
+
readonly revision: number;
|
|
1210
|
+
readonly route: string;
|
|
1211
|
+
}
|
|
1212
|
+
interface Candidate {
|
|
1213
|
+
readonly ref: string;
|
|
1214
|
+
readonly tag: string;
|
|
1215
|
+
readonly role: string;
|
|
1216
|
+
readonly name: string;
|
|
1217
|
+
readonly peers: readonly string[];
|
|
1218
|
+
readonly editable: boolean;
|
|
1219
|
+
readonly disabled: boolean;
|
|
1220
|
+
readonly inputType: string;
|
|
1221
|
+
readonly signals: {
|
|
1222
|
+
readonly hook?: string;
|
|
1223
|
+
readonly id?: string;
|
|
1224
|
+
readonly name?: string;
|
|
1225
|
+
readonly href?: string;
|
|
1226
|
+
/** Local disambiguation hint. Never part of the provider projection. */
|
|
1227
|
+
readonly region?: "article-body";
|
|
1228
|
+
readonly path: string;
|
|
1229
|
+
/** True only when the first peer contains the entire non-interactive item context. */
|
|
1230
|
+
readonly contextComplete?: boolean;
|
|
1231
|
+
};
|
|
1232
|
+
}
|
|
1233
|
+
interface CandidatePage {
|
|
1234
|
+
readonly protocol: number;
|
|
1235
|
+
readonly version: PageVersion;
|
|
1236
|
+
readonly total: number;
|
|
1237
|
+
readonly offset: number;
|
|
1238
|
+
readonly next: number | null;
|
|
1239
|
+
readonly complete: boolean;
|
|
1240
|
+
readonly candidates: readonly Candidate[];
|
|
1241
|
+
}
|
|
1242
|
+
interface DigestResult {
|
|
1243
|
+
readonly protocol: number;
|
|
1244
|
+
readonly version: PageVersion;
|
|
1245
|
+
readonly text: string;
|
|
1246
|
+
readonly complete: boolean;
|
|
1247
|
+
readonly error?: "digest_too_large" | "resource_ceiling" | "scope_ambiguous";
|
|
1248
|
+
}
|
|
1249
|
+
interface Aim {
|
|
1250
|
+
readonly ref: string;
|
|
1251
|
+
readonly document: string;
|
|
1252
|
+
readonly route: string;
|
|
1253
|
+
readonly revision: number;
|
|
1254
|
+
readonly tag: string;
|
|
1255
|
+
readonly name: string;
|
|
1256
|
+
readonly point: {
|
|
1257
|
+
readonly x: number;
|
|
1258
|
+
readonly y: number;
|
|
1259
|
+
};
|
|
1260
|
+
readonly box?: {
|
|
1261
|
+
readonly x: number;
|
|
1262
|
+
readonly y: number;
|
|
1263
|
+
readonly width: number;
|
|
1264
|
+
readonly height: number;
|
|
1265
|
+
};
|
|
1266
|
+
}
|
|
1267
|
+
/** A fill target is tied to the exact element in a collected fill snapshot. */
|
|
1268
|
+
interface FillTarget {
|
|
1269
|
+
readonly ref: string;
|
|
1270
|
+
readonly version: PageVersion;
|
|
1271
|
+
readonly tag: string;
|
|
1272
|
+
readonly name: string;
|
|
1273
|
+
}
|
|
1274
|
+
type ReadTargetResult = {
|
|
1275
|
+
readonly status: "ok";
|
|
1276
|
+
readonly text: string;
|
|
1277
|
+
} | {
|
|
1278
|
+
readonly status: "stale" | "empty" | "too_long";
|
|
1279
|
+
};
|
|
1280
|
+
type AimResult = {
|
|
1281
|
+
readonly actionable: true;
|
|
1282
|
+
readonly aim: Aim;
|
|
1283
|
+
} | {
|
|
1284
|
+
readonly actionable: false;
|
|
1285
|
+
readonly reason: "action_started";
|
|
1286
|
+
readonly retryable: false;
|
|
1287
|
+
readonly callLog?: readonly string[];
|
|
1288
|
+
} | {
|
|
1289
|
+
readonly actionable: false;
|
|
1290
|
+
readonly reason: "stale" | "target_missing" | "not_actionable";
|
|
1291
|
+
};
|
|
1292
|
+
interface PageBridge {
|
|
1293
|
+
readonly protocol: number;
|
|
1294
|
+
collect(input: {
|
|
1295
|
+
operation: Operation;
|
|
1296
|
+
offset?: number;
|
|
1297
|
+
version?: PageVersion;
|
|
1298
|
+
}): CandidatePage;
|
|
1299
|
+
digest(): DigestResult;
|
|
1300
|
+
pageVersion(): PageVersion;
|
|
1301
|
+
quiet(input: {
|
|
1302
|
+
ms: number;
|
|
1303
|
+
timeoutMs: number;
|
|
1304
|
+
}): Promise<{
|
|
1305
|
+
version: PageVersion;
|
|
1306
|
+
quiet: boolean;
|
|
1307
|
+
}>;
|
|
1308
|
+
findBySignals(input: {
|
|
1309
|
+
operation: Operation;
|
|
1310
|
+
}): CandidatePage;
|
|
1311
|
+
clickTarget(ref: string): AimResult;
|
|
1312
|
+
checkAim(aim: Aim): AimResult;
|
|
1313
|
+
fillElement(target: FillTarget): Element | null;
|
|
1314
|
+
readTarget(target: FillTarget): ReadTargetResult;
|
|
1315
|
+
clearRefs(): void;
|
|
1316
|
+
}
|
|
1317
|
+
declare global {
|
|
1318
|
+
interface Window {
|
|
1319
|
+
__sedum?: PageBridge;
|
|
1320
|
+
}
|
|
1321
|
+
}
|
|
1322
|
+
declare function codePoints(text: string): number;
|
|
1323
|
+
declare function projectCandidates(page: CandidatePage): readonly {
|
|
1324
|
+
id: string;
|
|
1325
|
+
tag: string;
|
|
1326
|
+
role: string;
|
|
1327
|
+
name: string;
|
|
1328
|
+
peers: readonly string[];
|
|
1329
|
+
editable: boolean;
|
|
1330
|
+
disabled: boolean;
|
|
1331
|
+
}[];
|
|
1332
|
+
declare function projectDigest(result: DigestResult): string;
|
|
1333
|
+
|
|
1334
|
+
type BrowserKind = "chrome" | "chromium";
|
|
1335
|
+
/** Match the driver's Chrome-first behavior without starting a browser. */
|
|
1336
|
+
declare function findBrowserExecutable(kind: BrowserKind): string | null;
|
|
1337
|
+
interface BrowserLaunchOptions {
|
|
1338
|
+
readonly browser?: BrowserKind;
|
|
1339
|
+
readonly headless?: boolean;
|
|
1340
|
+
readonly slowMoMs?: number;
|
|
1341
|
+
readonly overlay?: boolean;
|
|
1342
|
+
}
|
|
1343
|
+
interface BrowserContextOptions {
|
|
1344
|
+
readonly viewport?: {
|
|
1345
|
+
readonly width: number;
|
|
1346
|
+
readonly height: number;
|
|
1347
|
+
};
|
|
1348
|
+
readonly locale?: string;
|
|
1349
|
+
}
|
|
1350
|
+
interface NavigationOptions {
|
|
1351
|
+
readonly timeoutMs?: number;
|
|
1352
|
+
readonly waitUntil?: "commit" | "domcontentloaded" | "load";
|
|
1353
|
+
/** Exclude the requested URL and raw Playwright cause from public errors. */
|
|
1354
|
+
readonly safeDiagnostics?: boolean;
|
|
1355
|
+
}
|
|
1356
|
+
interface SettleOptions {
|
|
1357
|
+
readonly timeoutMs?: number;
|
|
1358
|
+
readonly state?: "domcontentloaded" | "load";
|
|
1359
|
+
}
|
|
1360
|
+
interface NavigationResult {
|
|
1361
|
+
readonly url: string;
|
|
1362
|
+
}
|
|
1363
|
+
interface SettleResult {
|
|
1364
|
+
readonly settled: boolean;
|
|
1365
|
+
readonly elapsedMs: number;
|
|
1366
|
+
}
|
|
1367
|
+
type FillResult = {
|
|
1368
|
+
readonly acted: true;
|
|
1369
|
+
} | {
|
|
1370
|
+
readonly acted: false;
|
|
1371
|
+
readonly reason: "stale" | "not_actionable" | "action_started";
|
|
1372
|
+
readonly retryable: boolean;
|
|
1373
|
+
readonly callLog?: readonly string[];
|
|
1374
|
+
};
|
|
1375
|
+
type BrowserDriverErrorCode = "browser-missing" | "browser-launch-failed" | "browser-disconnected" | "context-closed" | "page-closed" | "page-crashed" | "operation-failed" | "script-missing";
|
|
1376
|
+
declare class BrowserDriverError extends Error {
|
|
1377
|
+
readonly code: BrowserDriverErrorCode;
|
|
1378
|
+
constructor(code: BrowserDriverErrorCode, message: string, cause?: unknown);
|
|
1379
|
+
}
|
|
1380
|
+
interface BrowserPage {
|
|
1381
|
+
readonly url: string;
|
|
1382
|
+
readonly closed: boolean;
|
|
1383
|
+
/** Optional diagnostic effects; fake pages may leave them unavailable. */
|
|
1384
|
+
title?(): Promise<string>;
|
|
1385
|
+
captureFrame?(): Promise<Uint8Array>;
|
|
1386
|
+
goto(url: string, options?: NavigationOptions): Promise<NavigationResult>;
|
|
1387
|
+
settle(options?: SettleOptions): Promise<SettleResult>;
|
|
1388
|
+
text(): Promise<string>;
|
|
1389
|
+
evaluate<T>(expression: string, argument?: unknown): Promise<T>;
|
|
1390
|
+
clickRef(aim: Aim, options?: {
|
|
1391
|
+
readonly timeoutMs?: number;
|
|
1392
|
+
}): Promise<AimResult>;
|
|
1393
|
+
fillRef(target: FillTarget, value: string, options?: {
|
|
1394
|
+
readonly timeoutMs?: number;
|
|
1395
|
+
}): Promise<FillResult>;
|
|
1396
|
+
press(key: string, options?: {
|
|
1397
|
+
readonly timeoutMs?: number;
|
|
1398
|
+
}): Promise<void>;
|
|
1399
|
+
scroll(deltaY: number, options?: {
|
|
1400
|
+
readonly timeoutMs?: number;
|
|
1401
|
+
}): Promise<void>;
|
|
1402
|
+
close(): Promise<void>;
|
|
1403
|
+
}
|
|
1404
|
+
interface BrowserContextSession {
|
|
1405
|
+
newPage(): Promise<BrowserPage>;
|
|
1406
|
+
close(): Promise<void>;
|
|
1407
|
+
}
|
|
1408
|
+
interface BrowserSession {
|
|
1409
|
+
newContext(options?: BrowserContextOptions): Promise<BrowserContextSession>;
|
|
1410
|
+
close(): Promise<void>;
|
|
1411
|
+
}
|
|
1412
|
+
interface BrowserDriver {
|
|
1413
|
+
launch(options?: BrowserLaunchOptions): Promise<BrowserSession>;
|
|
1414
|
+
}
|
|
1415
|
+
interface BrowserInstallResult {
|
|
1416
|
+
readonly exitCode: number;
|
|
1417
|
+
readonly stdout: string;
|
|
1418
|
+
readonly stderr: string;
|
|
1419
|
+
}
|
|
1420
|
+
declare class PlaywrightBrowserDriver implements BrowserDriver {
|
|
1421
|
+
launch(options?: BrowserLaunchOptions): Promise<BrowserSession>;
|
|
1422
|
+
}
|
|
1423
|
+
declare function installChromium(withDeps?: boolean): BrowserInstallResult;
|
|
1424
|
+
|
|
1425
|
+
/** Source positions come from YAML nodes, never from searching the source text. */
|
|
1426
|
+
interface FlowSource {
|
|
1427
|
+
readonly file: string;
|
|
1428
|
+
readonly line: number;
|
|
1429
|
+
readonly col: number;
|
|
1430
|
+
}
|
|
1431
|
+
interface FlowDiagnostic {
|
|
1432
|
+
readonly severity: "error" | "warning";
|
|
1433
|
+
readonly code: string;
|
|
1434
|
+
readonly source: FlowSource;
|
|
1435
|
+
readonly message: string;
|
|
1436
|
+
readonly fix: string;
|
|
1437
|
+
}
|
|
1438
|
+
type FlowScalar = string | number | boolean | null;
|
|
1439
|
+
interface DeclaredDataValue {
|
|
1440
|
+
readonly value: FlowScalar;
|
|
1441
|
+
readonly source: FlowSource;
|
|
1442
|
+
}
|
|
1443
|
+
interface FlowToken {
|
|
1444
|
+
readonly kind: "placeholder" | "quoted";
|
|
1445
|
+
readonly start: number;
|
|
1446
|
+
readonly end: number;
|
|
1447
|
+
readonly text: string;
|
|
1448
|
+
readonly key?: string;
|
|
1449
|
+
}
|
|
1450
|
+
interface SentenceStep {
|
|
1451
|
+
readonly kind: "sentence";
|
|
1452
|
+
readonly phase: "before" | "steps" | "after";
|
|
1453
|
+
readonly text: string;
|
|
1454
|
+
readonly tokens: readonly FlowToken[];
|
|
1455
|
+
readonly source: FlowSource;
|
|
1456
|
+
/** SED-29 adds module call sites before the sentence source. */
|
|
1457
|
+
readonly sourceStack?: readonly FlowSource[];
|
|
1458
|
+
}
|
|
1459
|
+
interface ModuleBinding {
|
|
1460
|
+
readonly value: FlowScalar;
|
|
1461
|
+
readonly source: FlowSource;
|
|
1462
|
+
}
|
|
1463
|
+
interface ModuleStep {
|
|
1464
|
+
readonly kind: "module";
|
|
1465
|
+
readonly phase: "before" | "steps" | "after";
|
|
1466
|
+
readonly use: string;
|
|
1467
|
+
readonly with: Readonly<Record<string, FlowScalar>>;
|
|
1468
|
+
readonly withSources: Readonly<Record<string, FlowSource>>;
|
|
1469
|
+
readonly source: FlowSource;
|
|
1470
|
+
/** SED-29 adds each resolved module source after this call site. */
|
|
1471
|
+
readonly sourceStack: readonly FlowSource[];
|
|
1472
|
+
/** Present only after the complete module graph has been resolved. */
|
|
1473
|
+
readonly resolved?: ResolvedModuleCall;
|
|
1474
|
+
}
|
|
1475
|
+
interface ResolvedModuleCall {
|
|
1476
|
+
readonly id: string;
|
|
1477
|
+
readonly file: string;
|
|
1478
|
+
readonly parameters: readonly string[];
|
|
1479
|
+
readonly bindings: Readonly<Record<string, ModuleBinding>>;
|
|
1480
|
+
readonly steps: readonly FlowStep[];
|
|
1481
|
+
}
|
|
1482
|
+
type FlowStep = SentenceStep | ModuleStep;
|
|
1483
|
+
interface FlowDefinition {
|
|
1484
|
+
readonly version: 1;
|
|
1485
|
+
readonly file: string;
|
|
1486
|
+
readonly identity: string;
|
|
1487
|
+
readonly explicitId?: string;
|
|
1488
|
+
readonly idSource?: FlowSource;
|
|
1489
|
+
readonly description?: string;
|
|
1490
|
+
readonly url?: string;
|
|
1491
|
+
/** Position of the `url` value, for entry-URL diagnostics. */
|
|
1492
|
+
readonly urlSource?: FlowSource;
|
|
1493
|
+
readonly tags: readonly string[];
|
|
1494
|
+
readonly meta: Readonly<Record<string, unknown>>;
|
|
1495
|
+
readonly data: Readonly<Record<string, DeclaredDataValue>>;
|
|
1496
|
+
readonly before: readonly FlowStep[];
|
|
1497
|
+
readonly steps: readonly FlowStep[];
|
|
1498
|
+
readonly after: readonly FlowStep[];
|
|
1499
|
+
}
|
|
1500
|
+
interface ModuleDefinition {
|
|
1501
|
+
readonly file: string;
|
|
1502
|
+
readonly source: FlowSource;
|
|
1503
|
+
readonly parameters: readonly string[];
|
|
1504
|
+
readonly steps: readonly FlowStep[];
|
|
1505
|
+
}
|
|
1506
|
+
interface ParsedModuleResult {
|
|
1507
|
+
readonly value?: ModuleDefinition;
|
|
1508
|
+
readonly diagnostics: readonly FlowDiagnostic[];
|
|
1509
|
+
}
|
|
1510
|
+
/** A format-only result cannot be mistaken for full validation. */
|
|
1511
|
+
interface FormatCoverage {
|
|
1512
|
+
readonly format: "passed" | "failed";
|
|
1513
|
+
readonly steps: "not_checked";
|
|
1514
|
+
readonly modules: "not_needed" | "not_checked";
|
|
1515
|
+
}
|
|
1516
|
+
interface ParsedFlowResult {
|
|
1517
|
+
readonly value?: FlowDefinition;
|
|
1518
|
+
/** Parsed steps retained only for collecting later errors; never executable. */
|
|
1519
|
+
readonly candidate?: FlowDefinition;
|
|
1520
|
+
readonly diagnostics: readonly FlowDiagnostic[];
|
|
1521
|
+
readonly coverage: FullValidationCoverage;
|
|
1522
|
+
}
|
|
1523
|
+
interface ValidationInput {
|
|
1524
|
+
readonly source: string;
|
|
1525
|
+
readonly path: string;
|
|
1526
|
+
}
|
|
1527
|
+
interface FlowValidationResult {
|
|
1528
|
+
readonly files: readonly ParsedFlowResult[];
|
|
1529
|
+
readonly diagnostics: readonly FlowDiagnostic[];
|
|
1530
|
+
readonly coverage: FormatCoverage;
|
|
1531
|
+
}
|
|
1532
|
+
/** SED-28/29/37 may only mark checks complete after actually performing them. */
|
|
1533
|
+
interface FullValidationCoverage {
|
|
1534
|
+
readonly format: "passed" | "failed";
|
|
1535
|
+
readonly steps: "not_checked" | "checked" | "incomplete";
|
|
1536
|
+
readonly modules: "not_needed" | "not_checked" | "checked" | "incomplete";
|
|
1537
|
+
}
|
|
1538
|
+
declare function isFullyValidated(coverage: FullValidationCoverage, diagnostics: readonly FlowDiagnostic[]): boolean;
|
|
1539
|
+
declare function formatFlowDiagnostic(diagnostic: FlowDiagnostic): string;
|
|
1540
|
+
|
|
1541
|
+
interface ReportPrivacy {
|
|
1542
|
+
readonly secretValues: string[];
|
|
1543
|
+
readonly sensitiveOrigins?: readonly string[];
|
|
1544
|
+
readonly sensitivePaths?: readonly string[];
|
|
1545
|
+
}
|
|
1546
|
+
declare function safeText(value: string, privacy: ReportPrivacy, limit: number): string;
|
|
1547
|
+
declare function safeUrl(raw: string, privacy: ReportPrivacy): {
|
|
1548
|
+
url: string;
|
|
1549
|
+
sensitive: boolean;
|
|
1550
|
+
};
|
|
1551
|
+
declare function safeSource(source: FlowSource, repoRoot: string, privacy: ReportPrivacy): FlowSource;
|
|
1552
|
+
/** Read metadata only while it still describes the accepted page version. */
|
|
1553
|
+
declare function reportPage(page: BrowserPage, observationId: string, privacy: ReportPrivacy, expectedVersion?: PageVersion): Promise<ResultPage>;
|
|
1554
|
+
|
|
1555
|
+
/**
|
|
1556
|
+
* One parallel lane's browser, following Playwright Test's worker model: the
|
|
1557
|
+
* lane launches a browser once and every attempt gets a fresh context. The
|
|
1558
|
+
* sessions handed out ignore `close()`, so an attempt closes only its own
|
|
1559
|
+
* context. `recycle()` closes the real browser; the next `launch()` starts a
|
|
1560
|
+
* new one, as Playwright replaces a worker after a crash.
|
|
1561
|
+
*/
|
|
1562
|
+
declare class ReusableBrowserDriver implements BrowserDriver {
|
|
1563
|
+
private readonly driver;
|
|
1564
|
+
private session;
|
|
1565
|
+
constructor(driver: BrowserDriver);
|
|
1566
|
+
launch(options?: BrowserLaunchOptions): Promise<BrowserSession>;
|
|
1567
|
+
/** Close the lane's browser; a later launch starts a fresh one. */
|
|
1568
|
+
recycle(): Promise<void>;
|
|
1569
|
+
}
|
|
1570
|
+
|
|
1571
|
+
declare const CACHE_FORMAT = 1;
|
|
1572
|
+
declare const MATCHER_VERSION = 1;
|
|
1573
|
+
type CacheMissReason = "absent" | "disabled" | "ci_default" | "outside_git" | "runtime_dependent" | "format_mismatch" | "matcher_mismatch" | "corrupt" | "storage_error" | "conflict" | "target_missing" | "strong_signal_conflict" | "low_score" | "near_tie" | "candidate_set_incomplete" | "not_actionable";
|
|
1574
|
+
interface CacheEntry {
|
|
1575
|
+
readonly format: number;
|
|
1576
|
+
readonly matcher: number;
|
|
1577
|
+
readonly pageKey: string;
|
|
1578
|
+
readonly tag: string;
|
|
1579
|
+
readonly role: string;
|
|
1580
|
+
readonly inputType: string;
|
|
1581
|
+
readonly editable: boolean;
|
|
1582
|
+
readonly disabled: boolean;
|
|
1583
|
+
readonly path: string;
|
|
1584
|
+
readonly digests: {
|
|
1585
|
+
readonly hook?: string;
|
|
1586
|
+
readonly id?: string;
|
|
1587
|
+
readonly name?: string;
|
|
1588
|
+
readonly label?: string;
|
|
1589
|
+
readonly href?: string;
|
|
1590
|
+
readonly peers: readonly string[];
|
|
1591
|
+
};
|
|
1592
|
+
}
|
|
1593
|
+
type MatchResult = {
|
|
1594
|
+
readonly hit: true;
|
|
1595
|
+
readonly candidate: Candidate;
|
|
1596
|
+
} | {
|
|
1597
|
+
readonly hit: false;
|
|
1598
|
+
readonly reason: CacheMissReason;
|
|
1599
|
+
};
|
|
1600
|
+
declare function normalizeSignal(value: string): string;
|
|
1601
|
+
declare function keyedDigest(key: Uint8Array, value: string): string;
|
|
1602
|
+
declare function pageKey(key: Uint8Array, route: string, operation: Operation, sentence: string): string;
|
|
1603
|
+
declare function stageEntry(key: Uint8Array, route: string, operation: Operation, sentence: string, candidate: Candidate, eligible: CandidatePage): CacheEntry;
|
|
1604
|
+
declare function matchEntry(entry: CacheEntry | undefined, key: Uint8Array, route: string, operation: Operation, sentence: string, candidates: readonly Candidate[], complete: boolean, runtimeDependent?: boolean): MatchResult;
|
|
1605
|
+
|
|
1606
|
+
declare class PageScriptError extends Error {
|
|
1607
|
+
readonly code: "missing" | "incompatible" | "invalid-result";
|
|
1608
|
+
constructor(code: "missing" | "incompatible" | "invalid-result", message: string);
|
|
1609
|
+
}
|
|
1610
|
+
declare function collectCandidates(page: BrowserPage, operation: Operation, offset?: number, version?: PageVersion): Promise<CandidatePage>;
|
|
1611
|
+
declare function pageDigest(page: BrowserPage): Promise<DigestResult>;
|
|
1612
|
+
declare function pageVersion(page: BrowserPage): Promise<PageVersion>;
|
|
1613
|
+
declare function quietPage(page: BrowserPage, ms: number, timeoutMs: number): Promise<{
|
|
1614
|
+
version: PageVersion;
|
|
1615
|
+
quiet: boolean;
|
|
1616
|
+
}>;
|
|
1617
|
+
declare function liveCandidates(page: BrowserPage, operation: Operation): Promise<CandidatePage>;
|
|
1618
|
+
declare function clickTarget(page: BrowserPage, ref: string): Promise<AimResult>;
|
|
1619
|
+
declare function readTarget(page: BrowserPage, target: FillTarget): Promise<ReadTargetResult>;
|
|
1620
|
+
declare function clearPageRefs(page: BrowserPage): Promise<void>;
|
|
1621
|
+
/** Match a store entry against every current candidate; the HMAC key never crosses the page bridge. */
|
|
1622
|
+
declare function matchLiveEntry(page: BrowserPage, entry: CacheEntry | undefined, key: Uint8Array, operation: Operation, sentence: string, runtimeDependent?: boolean): Promise<MatchResult>;
|
|
1623
|
+
|
|
1624
|
+
type LocatorCacheLookup = {
|
|
1625
|
+
readonly entry: CacheEntry;
|
|
1626
|
+
readonly reason?: never;
|
|
1627
|
+
} | {
|
|
1628
|
+
readonly entry?: never;
|
|
1629
|
+
readonly reason: CacheMissReason;
|
|
1630
|
+
};
|
|
1631
|
+
/**
|
|
1632
|
+
* A write lost a race with another writer holding the same entry's lock. The
|
|
1633
|
+
* step keeps its model result; the report records the cache reason `conflict`.
|
|
1634
|
+
*/
|
|
1635
|
+
declare class LocatorCacheConflict extends Error {
|
|
1636
|
+
constructor();
|
|
1637
|
+
}
|
|
1638
|
+
/** Storage returns a recipe; only the locator can decide whether the live page is a hit. */
|
|
1639
|
+
interface CacheStore {
|
|
1640
|
+
/** The checkout-local HMAC key. It never crosses the browser or provider seam. */
|
|
1641
|
+
readonly key: Uint8Array | null;
|
|
1642
|
+
lookup(key: string): Promise<LocatorCacheLookup>;
|
|
1643
|
+
put(key: string, entry: CacheEntry): Promise<void>;
|
|
1644
|
+
invalidate(key: string, observed?: CacheEntry): Promise<void>;
|
|
1645
|
+
clear(): Promise<void>;
|
|
1646
|
+
}
|
|
1647
|
+
declare class NoopCacheStore implements CacheStore {
|
|
1648
|
+
readonly reason: "disabled" | "ci_default" | "outside_git" | "corrupt" | "storage_error";
|
|
1649
|
+
readonly key: null;
|
|
1650
|
+
constructor(reason?: "disabled" | "ci_default" | "outside_git" | "corrupt" | "storage_error");
|
|
1651
|
+
lookup(): Promise<LocatorCacheLookup>;
|
|
1652
|
+
put(): Promise<void>;
|
|
1653
|
+
invalidate(): Promise<void>;
|
|
1654
|
+
clear(): Promise<void>;
|
|
1655
|
+
}
|
|
1656
|
+
|
|
1657
|
+
/** A runtime substitution is never printed or serialized by the executor. */
|
|
1658
|
+
declare class RuntimeValue {
|
|
1659
|
+
#private;
|
|
1660
|
+
readonly display: string;
|
|
1661
|
+
constructor(value: string, display?: string);
|
|
1662
|
+
reveal(): string;
|
|
1663
|
+
toString(): string;
|
|
1664
|
+
toJSON(): string;
|
|
1665
|
+
[inspect.custom](): string;
|
|
1666
|
+
}
|
|
1667
|
+
/** Literal URL pieces and opaque substitutions keep the display URL safe. */
|
|
1668
|
+
declare class RuntimeUrl {
|
|
1669
|
+
#private;
|
|
1670
|
+
constructor(literals: readonly string[], values?: readonly RuntimeValue[]);
|
|
1671
|
+
reveal(): string;
|
|
1672
|
+
toString(): string;
|
|
1673
|
+
toJSON(): string;
|
|
1674
|
+
[inspect.custom](): string;
|
|
1675
|
+
}
|
|
1676
|
+
/** The route-bearing snapshot target is not part of public diagnostics. */
|
|
1677
|
+
declare class ResolvedStepTarget {
|
|
1678
|
+
#private;
|
|
1679
|
+
constructor(target: FillTarget);
|
|
1680
|
+
/** Only the executor/driver path should use the route-bearing snapshot. */
|
|
1681
|
+
driverTarget(): FillTarget;
|
|
1682
|
+
toJSON(): object;
|
|
1683
|
+
[inspect.custom](): string;
|
|
1684
|
+
}
|
|
1685
|
+
type StepCommand = {
|
|
1686
|
+
readonly op: "click";
|
|
1687
|
+
readonly target: ResolvedStepTarget;
|
|
1688
|
+
} | {
|
|
1689
|
+
readonly op: "type";
|
|
1690
|
+
readonly target: ResolvedStepTarget;
|
|
1691
|
+
readonly value: RuntimeValue;
|
|
1692
|
+
} | {
|
|
1693
|
+
readonly op: "press";
|
|
1694
|
+
readonly key: string;
|
|
1695
|
+
} | {
|
|
1696
|
+
readonly op: "goto";
|
|
1697
|
+
readonly url: RuntimeUrl;
|
|
1698
|
+
} | {
|
|
1699
|
+
readonly op: "scroll";
|
|
1700
|
+
readonly deltaY: number;
|
|
1701
|
+
} | {
|
|
1702
|
+
readonly op: "wait";
|
|
1703
|
+
readonly durationMs: number;
|
|
1704
|
+
};
|
|
1705
|
+
type StepOperation = StepCommand["op"];
|
|
1706
|
+
type StepOutcome = "acted" | "route_changed" | "no_route_change";
|
|
1707
|
+
interface StepExecutionResult {
|
|
1708
|
+
readonly op: StepOperation;
|
|
1709
|
+
readonly outcome: StepOutcome;
|
|
1710
|
+
readonly elapsedMs: number;
|
|
1711
|
+
readonly displayUrl?: string;
|
|
1712
|
+
}
|
|
1713
|
+
type StepFailureCode = "invalid_input" | "canceled" | "timeout" | "stale" | "not_actionable" | "action_uncertain" | "operation_failed";
|
|
1714
|
+
type StepFailurePhase = "pre_dispatch" | "post_dispatch";
|
|
1715
|
+
declare class StepExecutionError extends Error {
|
|
1716
|
+
readonly op: StepOperation;
|
|
1717
|
+
readonly code: StepFailureCode;
|
|
1718
|
+
readonly phase: StepFailurePhase;
|
|
1719
|
+
readonly retryable: boolean;
|
|
1720
|
+
readonly callLog: readonly string[];
|
|
1721
|
+
constructor(op: StepOperation, code: StepFailureCode, phase: StepFailurePhase, callLog?: readonly string[]);
|
|
1722
|
+
toJSON(): object;
|
|
1723
|
+
}
|
|
1724
|
+
interface StepExecutionOptions {
|
|
1725
|
+
/** A caller-supplied whole-step budget, including post-action observation. */
|
|
1726
|
+
readonly timeoutMs?: number;
|
|
1727
|
+
readonly signal?: AbortSignal;
|
|
1728
|
+
/** Diagnostic capture after final aim/scroll and before event dispatch. */
|
|
1729
|
+
readonly beforeAction?: (box: Aim["box"] | null, version: PageVersion) => Promise<void>;
|
|
1730
|
+
}
|
|
1731
|
+
declare function executeStep(page: BrowserPage, command: StepCommand, options?: StepExecutionOptions): Promise<StepExecutionResult>;
|
|
1732
|
+
|
|
1733
|
+
/** The SED-12 projection of one live page candidate. No DOM identity signals leave this boundary. */
|
|
1734
|
+
interface ResolverCandidate {
|
|
1735
|
+
readonly id: string;
|
|
1736
|
+
readonly tag: string;
|
|
1737
|
+
readonly role: string;
|
|
1738
|
+
readonly name: string;
|
|
1739
|
+
readonly peers: readonly string[];
|
|
1740
|
+
readonly editable: boolean;
|
|
1741
|
+
readonly disabled: boolean;
|
|
1742
|
+
}
|
|
1743
|
+
type ResolverOption = {
|
|
1744
|
+
readonly kind: "candidate";
|
|
1745
|
+
readonly candidate: ResolverCandidate;
|
|
1746
|
+
} | {
|
|
1747
|
+
readonly kind: "none";
|
|
1748
|
+
readonly id: "none";
|
|
1749
|
+
};
|
|
1750
|
+
/** `complete` must come from the page extraction result, not a partial batch. */
|
|
1751
|
+
interface ResolverCandidates {
|
|
1752
|
+
readonly complete: boolean;
|
|
1753
|
+
readonly options: readonly ResolverOption[];
|
|
1754
|
+
}
|
|
1755
|
+
interface JudgePageDigest {
|
|
1756
|
+
readonly complete: boolean;
|
|
1757
|
+
readonly text: string;
|
|
1758
|
+
readonly error?: string;
|
|
1759
|
+
}
|
|
1760
|
+
interface ProviderCallOptions {
|
|
1761
|
+
readonly signal?: AbortSignal;
|
|
1762
|
+
}
|
|
1763
|
+
interface ProviderTokenUsage {
|
|
1764
|
+
readonly inputTokens: number;
|
|
1765
|
+
readonly outputTokens: number;
|
|
1766
|
+
}
|
|
1767
|
+
interface ProviderRate {
|
|
1768
|
+
readonly inputUsdPerMillion: number;
|
|
1769
|
+
readonly outputUsdPerMillion: number;
|
|
1770
|
+
readonly source: string;
|
|
1771
|
+
readonly checkedAt: string;
|
|
1772
|
+
}
|
|
1773
|
+
interface ProviderCall {
|
|
1774
|
+
readonly requestedModel: string;
|
|
1775
|
+
readonly model: string;
|
|
1776
|
+
readonly attempts: number;
|
|
1777
|
+
readonly usage: ProviderTokenUsage;
|
|
1778
|
+
readonly rate: ProviderRate | null;
|
|
1779
|
+
readonly successfulResponseCostUsd: number | null;
|
|
1780
|
+
/** Null when failed attempts may have consumed unreported tokens. */
|
|
1781
|
+
readonly totalCostUsd: number | null;
|
|
1782
|
+
/** True when a 429 made this call wait for a shared provider cooldown. */
|
|
1783
|
+
readonly rateLimited?: boolean;
|
|
1784
|
+
/** Milliseconds spent in shared rate-limit cooldowns. */
|
|
1785
|
+
readonly rateLimitWaitMs?: number;
|
|
1786
|
+
/** Milliseconds spent waiting for a provider concurrency slot. */
|
|
1787
|
+
readonly queueWaitMs?: number;
|
|
1788
|
+
}
|
|
1789
|
+
interface ResolverDecision {
|
|
1790
|
+
readonly selection: {
|
|
1791
|
+
readonly kind: "candidate";
|
|
1792
|
+
readonly id: string;
|
|
1793
|
+
} | {
|
|
1794
|
+
readonly kind: "none";
|
|
1795
|
+
};
|
|
1796
|
+
readonly probabilities: Readonly<Record<string, number>>;
|
|
1797
|
+
readonly confidence: number | null;
|
|
1798
|
+
readonly call: ProviderCall;
|
|
1799
|
+
}
|
|
1800
|
+
interface JudgeDecision {
|
|
1801
|
+
readonly holds: number;
|
|
1802
|
+
readonly contradicted: number;
|
|
1803
|
+
readonly call: ProviderCall;
|
|
1804
|
+
}
|
|
1805
|
+
interface Resolver {
|
|
1806
|
+
choose(sentence: string, candidates: ResolverCandidates, options?: ProviderCallOptions): Promise<ResolverDecision>;
|
|
1807
|
+
}
|
|
1808
|
+
interface Judge {
|
|
1809
|
+
holds(claim: string, pageDigest: JudgePageDigest, options?: ProviderCallOptions): Promise<JudgeDecision>;
|
|
1810
|
+
}
|
|
1811
|
+
type ProviderErrorCode = "configuration" | "authentication" | "unsupported-input" | "invalid-input" | "invalid-response" | "timeout" | "connection" | "retry-exhausted" | "rate-limited";
|
|
1812
|
+
declare class ProviderError extends Error {
|
|
1813
|
+
readonly code: ProviderErrorCode;
|
|
1814
|
+
readonly attempts: number;
|
|
1815
|
+
readonly failedCall?: ProviderCall;
|
|
1816
|
+
constructor(code: ProviderErrorCode, message: string, attempts?: number, failedCall?: ProviderCall);
|
|
1817
|
+
toJSON(): {
|
|
1818
|
+
code: ProviderErrorCode;
|
|
1819
|
+
message: string;
|
|
1820
|
+
attempts: number;
|
|
1821
|
+
};
|
|
1822
|
+
}
|
|
1823
|
+
/** A failed request may have been billed even when usage was not returned. */
|
|
1824
|
+
declare function unknownCostCall(error: unknown): ProviderCall;
|
|
1825
|
+
|
|
1826
|
+
type LocatorFailure = "none" | "ambiguous" | "stale" | "no_candidates" | "incomplete" | "resource_limit" | "not_fillable" | "provider_error" | "request_too_large" | "invalid_input" | "timeout";
|
|
1827
|
+
interface LocatorOptionDiagnostic {
|
|
1828
|
+
readonly name: string;
|
|
1829
|
+
readonly role: string;
|
|
1830
|
+
readonly probability: number;
|
|
1831
|
+
}
|
|
1832
|
+
interface LocatorDiagnostic {
|
|
1833
|
+
readonly candidateCount: number;
|
|
1834
|
+
readonly rounds: number;
|
|
1835
|
+
readonly confidence?: number | null;
|
|
1836
|
+
/** Internal accepted candidate-set provenance; never projected into JSON. */
|
|
1837
|
+
readonly observationVersion?: PageVersion;
|
|
1838
|
+
/** Probabilities come only from the final comparable Choice. */
|
|
1839
|
+
readonly topOptions: readonly LocatorOptionDiagnostic[];
|
|
1840
|
+
readonly gate?: string;
|
|
1841
|
+
}
|
|
1842
|
+
interface LocatorCacheDiagnostic {
|
|
1843
|
+
readonly outcome: "hit" | "miss" | "bypassed";
|
|
1844
|
+
readonly reason: CacheMissReason | null;
|
|
1845
|
+
readonly fallbackCalledModel: boolean;
|
|
1846
|
+
readonly targetChanged: boolean;
|
|
1847
|
+
}
|
|
1848
|
+
interface LocatorCacheSeed {
|
|
1849
|
+
readonly candidate: Candidate;
|
|
1850
|
+
readonly eligible: CandidatePage;
|
|
1851
|
+
readonly key: string;
|
|
1852
|
+
}
|
|
1853
|
+
type LocatorResult = {
|
|
1854
|
+
readonly kind: "resolved";
|
|
1855
|
+
readonly target: ResolvedStepTarget;
|
|
1856
|
+
readonly diagnostic: LocatorDiagnostic;
|
|
1857
|
+
readonly calls: readonly ProviderCall[];
|
|
1858
|
+
readonly cache?: LocatorCacheDiagnostic;
|
|
1859
|
+
/** Internal pre-action snapshot; only the runner may stage it after success. */
|
|
1860
|
+
readonly cacheSeed?: LocatorCacheSeed;
|
|
1861
|
+
} | {
|
|
1862
|
+
readonly kind: "unresolved";
|
|
1863
|
+
readonly reason: LocatorFailure;
|
|
1864
|
+
readonly diagnostic: LocatorDiagnostic;
|
|
1865
|
+
readonly calls: readonly ProviderCall[];
|
|
1866
|
+
readonly cache?: LocatorCacheDiagnostic;
|
|
1867
|
+
};
|
|
1868
|
+
interface LocatorOptions {
|
|
1869
|
+
readonly operation: Operation;
|
|
1870
|
+
readonly sentence: string;
|
|
1871
|
+
/** Target-only sentence for cache keys; Resolver still receives sentence. */
|
|
1872
|
+
readonly cacheSentence?: string;
|
|
1873
|
+
readonly signal?: AbortSignal;
|
|
1874
|
+
readonly timeoutMs?: number;
|
|
1875
|
+
readonly cache?: CacheStore;
|
|
1876
|
+
readonly runtimeDependent?: boolean;
|
|
1877
|
+
/** Redact sensitive page-derived text only at the Resolver boundary. */
|
|
1878
|
+
readonly projectText?: (text: string) => string;
|
|
1879
|
+
}
|
|
1880
|
+
/** Resolve a sentence to one fresh page target. No browser action occurs here. */
|
|
1881
|
+
declare function resolveTarget(page: BrowserPage, resolver: Resolver, options: LocatorOptions): Promise<LocatorResult>;
|
|
1882
|
+
|
|
1883
|
+
interface TemplatePart {
|
|
1884
|
+
readonly literal?: string;
|
|
1885
|
+
readonly variable?: string;
|
|
1886
|
+
}
|
|
1887
|
+
interface ResolvedDataEntry {
|
|
1888
|
+
readonly value: RuntimeValue;
|
|
1889
|
+
readonly sensitive: boolean;
|
|
1890
|
+
/** A page-observed value may be used in Judge claims; environment values may not. */
|
|
1891
|
+
readonly modelVisible?: boolean;
|
|
1892
|
+
/** Opaque environment components used only for attempt-local taint checks. */
|
|
1893
|
+
readonly opaqueValues?: readonly RuntimeValue[];
|
|
1894
|
+
}
|
|
1895
|
+
/** A page echo of an environment value is still environment-derived. */
|
|
1896
|
+
declare function opaqueMatches(text: string, entries: readonly ResolvedDataEntry[]): readonly RuntimeValue[];
|
|
1897
|
+
/** Project text to a model without sending attempt-known environment components. */
|
|
1898
|
+
declare function redactOpaqueText(text: string, entries: readonly ResolvedDataEntry[]): string;
|
|
1899
|
+
declare class DataResolutionError extends Error {
|
|
1900
|
+
readonly code = "missing_environment_variable";
|
|
1901
|
+
constructor(dataKey: string, variable: string, declared: DeclaredDataValue);
|
|
1902
|
+
}
|
|
1903
|
+
declare class ModuleBindingResolutionError extends Error {
|
|
1904
|
+
readonly code: "missing_module_binding" | "missing_environment_variable";
|
|
1905
|
+
readonly outcome: "failed" | "error";
|
|
1906
|
+
readonly source: ModuleBinding["source"];
|
|
1907
|
+
constructor(code: "missing_module_binding" | "missing_environment_variable", outcome: "failed" | "error", source: ModuleBinding["source"], message: string);
|
|
1908
|
+
}
|
|
1909
|
+
/** The template language is deliberately limited to $VAR, ${VAR}, and $$. */
|
|
1910
|
+
declare function parseDataTemplate(value: string): {
|
|
1911
|
+
readonly parts: readonly TemplatePart[];
|
|
1912
|
+
} | {
|
|
1913
|
+
readonly error: string;
|
|
1914
|
+
};
|
|
1915
|
+
declare function resolveData(declared: Readonly<Record<string, DeclaredDataValue>>, env: Readonly<Record<string, string | undefined>>): Readonly<Record<string, ResolvedDataEntry>>;
|
|
1916
|
+
/** Resolve one reached module occurrence against its live caller scope. */
|
|
1917
|
+
declare function resolveModuleBindings(parameters: readonly string[], bindings: Readonly<Record<string, ModuleBinding>>, caller: Readonly<Record<string, ResolvedDataEntry>>, env: Readonly<Record<string, string | undefined>>): Readonly<Record<string, ResolvedDataEntry>>;
|
|
1918
|
+
interface StepTokenization {
|
|
1919
|
+
readonly tokens: readonly FlowToken[];
|
|
1920
|
+
readonly problems: readonly {
|
|
1921
|
+
readonly code: string;
|
|
1922
|
+
readonly message: string;
|
|
1923
|
+
readonly fix: string;
|
|
1924
|
+
}[];
|
|
1925
|
+
}
|
|
1926
|
+
/** Record lexical spans while leaving the original model sentence untouched. */
|
|
1927
|
+
declare function tokenizeStep(text: string): StepTokenization;
|
|
1928
|
+
/** SED-28 calls this only after classifying a sentence as `type`. */
|
|
1929
|
+
declare function validateTypeOperand(step: SentenceStep): {
|
|
1930
|
+
readonly operand: FlowToken;
|
|
1931
|
+
} | {
|
|
1932
|
+
readonly diagnostic: FlowDiagnostic;
|
|
1933
|
+
};
|
|
1934
|
+
/** The executor may reveal this opaque value; reports and models see its label. */
|
|
1935
|
+
declare function resolveTypeOperand(operand: FlowToken, data: Readonly<Record<string, ResolvedDataEntry>>): RuntimeValue;
|
|
1936
|
+
declare function isFlowScalar(value: unknown): value is FlowScalar;
|
|
1937
|
+
|
|
1938
|
+
interface ParseFlowOptions {
|
|
1939
|
+
/** Needed for stable, repo-relative identity when `id` is absent. */
|
|
1940
|
+
readonly repoRoot: string;
|
|
1941
|
+
/** Validation may warn about URL resolution without opening a network connection. */
|
|
1942
|
+
readonly baseUrl?: string;
|
|
1943
|
+
/** Run selection forbids an explicit file symlink at the point of opening. */
|
|
1944
|
+
readonly rejectSymlinks?: boolean;
|
|
1945
|
+
}
|
|
1946
|
+
declare function parseFlow(source: string, file: string, options: ParseFlowOptions): ParsedFlowResult;
|
|
1947
|
+
declare function validateFlows(inputs: readonly ValidationInput[], options: ParseFlowOptions): FlowValidationResult;
|
|
1948
|
+
/**
|
|
1949
|
+
* Report tests that share an identity: two explicit ids, or an explicit id
|
|
1950
|
+
* equal to another test's path identity. The later file (by path) is reported.
|
|
1951
|
+
*/
|
|
1952
|
+
declare function findIdentityCollisions(flows: readonly FlowDefinition[]): readonly FlowDiagnostic[];
|
|
1953
|
+
/** Parse a strict reusable module without granting it test-level fields. */
|
|
1954
|
+
declare function parseModule(source: string, file: string): ParsedModuleResult;
|
|
1955
|
+
/** Sorted `*.test.yaml` files, skipping `node_modules` and dot-directories. */
|
|
1956
|
+
declare function discoverFlowFiles(directory: string): Promise<readonly string[]>;
|
|
1957
|
+
declare function loadFlowFile(file: string, options: ParseFlowOptions): Promise<ParsedFlowResult>;
|
|
1958
|
+
|
|
1959
|
+
interface ResolveFlowModulesOptions {
|
|
1960
|
+
readonly repoRoot: string;
|
|
1961
|
+
readonly maxDepth?: number;
|
|
1962
|
+
/**
|
|
1963
|
+
* Validation only: also resolve a format-failed candidate, and keep a
|
|
1964
|
+
* never-executable candidate graph when module resolution fails.
|
|
1965
|
+
*/
|
|
1966
|
+
readonly partial?: boolean;
|
|
1967
|
+
}
|
|
1968
|
+
interface ResolvedFlowResult extends ParsedFlowResult {
|
|
1969
|
+
/** Real path of every module file the resolver read, including failed ones. */
|
|
1970
|
+
readonly moduleFiles: readonly string[];
|
|
1971
|
+
}
|
|
1972
|
+
/** Resolve a complete immutable module graph before classification or launch. */
|
|
1973
|
+
declare function resolveFlowModules(parsed: ParsedFlowResult, options: ResolveFlowModulesOptions): Promise<ResolvedFlowResult>;
|
|
1974
|
+
|
|
1975
|
+
declare const OPERATIONS: readonly ["click", "type", "press", "goto", "verify", "measure", "scroll", "wait", "remember"];
|
|
1976
|
+
type StepOperationKind = (typeof OPERATIONS)[number];
|
|
1977
|
+
declare const MODEL_CHOICES: readonly ["click", "type", "press", "goto", "verify", "measure", "scroll", "wait", "remember", "unsupported_or_unclear", "multiple_actions"];
|
|
1978
|
+
type ModelChoice = (typeof MODEL_CHOICES)[number];
|
|
1979
|
+
declare const OPERATION_SET_VERSION = 2;
|
|
1980
|
+
declare const ACCEPTANCE_POLICY_VERSION = 1;
|
|
1981
|
+
declare const MIN_MODEL_PROBABILITY = 0.8;
|
|
1982
|
+
declare const MIN_MODEL_MARGIN = 0.15;
|
|
1983
|
+
interface StepSource {
|
|
1984
|
+
readonly file: string;
|
|
1985
|
+
readonly line: number;
|
|
1986
|
+
readonly col: number;
|
|
1987
|
+
readonly moduleStack?: readonly string[];
|
|
1988
|
+
}
|
|
1989
|
+
interface ClassificationInput {
|
|
1990
|
+
readonly sentence: string;
|
|
1991
|
+
readonly source: StepSource;
|
|
1992
|
+
}
|
|
1993
|
+
interface ModelClassification {
|
|
1994
|
+
readonly op: ModelChoice;
|
|
1995
|
+
readonly probabilities: Readonly<Record<ModelChoice, number>>;
|
|
1996
|
+
readonly model: string;
|
|
1997
|
+
readonly requestedModel: string;
|
|
1998
|
+
}
|
|
1999
|
+
interface ClassificationProvider {
|
|
2000
|
+
classifyBatch(sentences: readonly string[], options?: ProviderCallOptions): Promise<{
|
|
2001
|
+
readonly answers: readonly ModelClassification[];
|
|
2002
|
+
readonly calls: readonly ProviderCall[];
|
|
2003
|
+
}>;
|
|
2004
|
+
}
|
|
2005
|
+
/** A failed file batch retains receipts for earlier billed chunks. */
|
|
2006
|
+
declare class ClassificationBatchError extends Error {
|
|
2007
|
+
readonly calls: readonly ProviderCall[];
|
|
2008
|
+
readonly failedAttempts: number;
|
|
2009
|
+
readonly code: ProviderErrorCode | null;
|
|
2010
|
+
constructor(calls: readonly ProviderCall[], failedAttempts: number, code?: ProviderErrorCode | null);
|
|
2011
|
+
}
|
|
2012
|
+
interface CachedClassification {
|
|
2013
|
+
readonly op: StepOperationKind;
|
|
2014
|
+
readonly probabilities: Readonly<Record<ModelChoice, number>>;
|
|
2015
|
+
readonly model: string;
|
|
2016
|
+
readonly requestedModel: string;
|
|
2017
|
+
}
|
|
2018
|
+
interface CacheLookup {
|
|
2019
|
+
readonly answer: CachedClassification | null;
|
|
2020
|
+
readonly reason: string;
|
|
2021
|
+
}
|
|
2022
|
+
interface ClassificationCache {
|
|
2023
|
+
get(sentence: string): CacheLookup;
|
|
2024
|
+
put(sentence: string, answer: CachedClassification): void;
|
|
2025
|
+
save(): Promise<void>;
|
|
2026
|
+
}
|
|
2027
|
+
interface ClassifiedStep extends ClassificationInput {
|
|
2028
|
+
readonly op: StepOperationKind;
|
|
2029
|
+
readonly classificationSource: "pattern" | "cache" | "model";
|
|
2030
|
+
/** Null for deterministic rules; model probabilities are not empirical calibration. */
|
|
2031
|
+
readonly probability: number | null;
|
|
2032
|
+
}
|
|
2033
|
+
type ClassificationDiagnosticCode = "empty" | "unsupported" | "multiple_actions" | "invalid_operand" | "unavailable" | "ambiguous" | "provider_error" | "cache_error";
|
|
2034
|
+
interface ClassificationDiagnostic extends ClassificationInput {
|
|
2035
|
+
readonly code: ClassificationDiagnosticCode;
|
|
2036
|
+
readonly message: string;
|
|
2037
|
+
readonly fix: string;
|
|
2038
|
+
}
|
|
2039
|
+
interface ClassificationMetrics {
|
|
2040
|
+
readonly pattern: number;
|
|
2041
|
+
readonly cache: number;
|
|
2042
|
+
readonly model: number;
|
|
2043
|
+
readonly cacheMisses: Readonly<Record<string, number>>;
|
|
2044
|
+
readonly requests: number;
|
|
2045
|
+
readonly attempts: number;
|
|
2046
|
+
readonly inputTokens: number;
|
|
2047
|
+
readonly outputTokens: number;
|
|
2048
|
+
readonly costUsd: number | null;
|
|
2049
|
+
readonly durationMs: number;
|
|
2050
|
+
}
|
|
2051
|
+
interface ClassificationResult {
|
|
2052
|
+
readonly steps: readonly (ClassifiedStep | null)[];
|
|
2053
|
+
readonly diagnostics: readonly ClassificationDiagnostic[];
|
|
2054
|
+
readonly calls: readonly ProviderCall[];
|
|
2055
|
+
readonly metrics: ClassificationMetrics;
|
|
2056
|
+
}
|
|
2057
|
+
declare function canonicalSentence(sentence: string): string;
|
|
2058
|
+
declare function preflightSentence(sentence: string): ClassificationDiagnosticCode | null;
|
|
2059
|
+
declare function patternOperation(sentence: string): StepOperationKind | null;
|
|
2060
|
+
/** Validate the lexical operands that cannot safely be guessed by execution. */
|
|
2061
|
+
declare function validateOperand(sentence: string, op: StepOperationKind): string | null;
|
|
2062
|
+
declare function evaluateModelAnswer(answer: ModelClassification | CachedClassification): {
|
|
2063
|
+
readonly accepted: true;
|
|
2064
|
+
readonly probability: number;
|
|
2065
|
+
} | {
|
|
2066
|
+
readonly accepted: false;
|
|
2067
|
+
readonly reason: "invalid" | "ambiguous" | "unsupported" | "multiple_actions";
|
|
2068
|
+
};
|
|
2069
|
+
declare function classifySteps(input: readonly ClassificationInput[], options: {
|
|
2070
|
+
readonly mode: "offline" | "allow-model";
|
|
2071
|
+
readonly cache: ClassificationCache;
|
|
2072
|
+
readonly provider?: ClassificationProvider;
|
|
2073
|
+
readonly signal?: AbortSignal;
|
|
2074
|
+
}): Promise<ClassificationResult>;
|
|
2075
|
+
|
|
2076
|
+
declare const CLASSIFICATION_PROMPT_VERSION = 1;
|
|
2077
|
+
declare function classificationKey(sentence: string): string;
|
|
2078
|
+
/** A committable, sentence-only cache. It contains no raw sentence or runtime value. */
|
|
2079
|
+
declare class FileClassificationCache implements ClassificationCache {
|
|
2080
|
+
readonly path: string;
|
|
2081
|
+
readonly requestedModel: string;
|
|
2082
|
+
readonly loadReason: "ok" | "absent" | "corrupt" | "format_mismatch";
|
|
2083
|
+
private readonly invalidKeys;
|
|
2084
|
+
private readonly entries;
|
|
2085
|
+
private dirty;
|
|
2086
|
+
private constructor();
|
|
2087
|
+
static load(path: string, requestedModel: string): Promise<FileClassificationCache>;
|
|
2088
|
+
get(sentence: string): CacheLookup;
|
|
2089
|
+
put(sentence: string, answer: CachedClassification): void;
|
|
2090
|
+
save(): Promise<void>;
|
|
2091
|
+
}
|
|
2092
|
+
declare class NoopClassificationCache implements ClassificationCache {
|
|
2093
|
+
get(): CacheLookup;
|
|
2094
|
+
put(): void;
|
|
2095
|
+
save(): Promise<void>;
|
|
2096
|
+
}
|
|
2097
|
+
|
|
2098
|
+
interface ClassifiedFlowSentence extends SentenceStep {
|
|
2099
|
+
readonly op: ClassifiedStep["op"];
|
|
2100
|
+
readonly classificationSource: ClassifiedStep["classificationSource"];
|
|
2101
|
+
readonly probability: number | null;
|
|
2102
|
+
}
|
|
2103
|
+
interface ClassifiedModuleStep extends Omit<ModuleStep, "resolved"> {
|
|
2104
|
+
readonly resolved?: Omit<ResolvedModuleCall, "steps"> & {
|
|
2105
|
+
readonly steps: readonly ClassifiedFlowStep[];
|
|
2106
|
+
};
|
|
2107
|
+
}
|
|
2108
|
+
type ClassifiedFlowStep = ClassifiedFlowSentence | ClassifiedModuleStep;
|
|
2109
|
+
interface ClassifiedFlowDefinition extends Omit<FlowDefinition, "before" | "steps" | "after"> {
|
|
2110
|
+
readonly before: readonly ClassifiedFlowStep[];
|
|
2111
|
+
readonly steps: readonly ClassifiedFlowStep[];
|
|
2112
|
+
readonly after: readonly ClassifiedFlowStep[];
|
|
2113
|
+
}
|
|
2114
|
+
interface FlowClassificationDiagnostic extends FlowDiagnostic {
|
|
2115
|
+
readonly sentence: string;
|
|
2116
|
+
}
|
|
2117
|
+
interface FlowClassificationResult {
|
|
2118
|
+
readonly value?: ClassifiedFlowDefinition;
|
|
2119
|
+
readonly diagnostics: readonly (FlowDiagnostic | FlowClassificationDiagnostic)[];
|
|
2120
|
+
readonly coverage: FullValidationCoverage;
|
|
2121
|
+
readonly classification?: ClassificationResult;
|
|
2122
|
+
readonly metrics?: ClassificationMetrics;
|
|
2123
|
+
readonly calls: readonly ProviderCall[];
|
|
2124
|
+
}
|
|
2125
|
+
interface ClassifyFlowOptions {
|
|
2126
|
+
readonly mode: "offline" | "allow-model";
|
|
2127
|
+
readonly cache: ClassificationCache;
|
|
2128
|
+
readonly provider?: ClassificationProvider;
|
|
2129
|
+
readonly signal?: AbortSignal;
|
|
2130
|
+
}
|
|
2131
|
+
interface SentenceClassification {
|
|
2132
|
+
readonly classification: ClassificationResult;
|
|
2133
|
+
/** Classification and `type` operand errors, in input order. */
|
|
2134
|
+
readonly diagnostics: readonly FlowClassificationDiagnostic[];
|
|
2135
|
+
}
|
|
2136
|
+
/** Classify sentence steps and apply the post-classification `type` operand check. */
|
|
2137
|
+
declare function classifySentenceSteps(sentences: readonly SentenceStep[], options: ClassifyFlowOptions): Promise<SentenceClassification>;
|
|
2138
|
+
/** Compose SED-27 format parsing and SED-28 classification without executing a step. */
|
|
2139
|
+
declare function classifyParsedFlow(parsed: ParsedFlowResult, options: ClassifyFlowOptions): Promise<FlowClassificationResult>;
|
|
2140
|
+
|
|
2141
|
+
type DiscoveryProblemCode = "missing_path" | "outside_root" | "unsupported_file" | "unreadable_directory";
|
|
2142
|
+
/** A usage problem with a requested path; never a finding about test content. */
|
|
2143
|
+
interface DiscoveryProblem {
|
|
2144
|
+
readonly code: DiscoveryProblemCode;
|
|
2145
|
+
readonly path: string;
|
|
2146
|
+
readonly message: string;
|
|
2147
|
+
readonly fix: string;
|
|
2148
|
+
}
|
|
2149
|
+
interface ProjectFiles {
|
|
2150
|
+
/** The real path of the project root; every returned file lies under it. */
|
|
2151
|
+
readonly root: string;
|
|
2152
|
+
readonly tests: readonly string[];
|
|
2153
|
+
readonly modules: readonly string[];
|
|
2154
|
+
readonly problems: readonly DiscoveryProblem[];
|
|
2155
|
+
}
|
|
2156
|
+
/**
|
|
2157
|
+
* Recursively list files with one of the suffixes, sorted by path. Symlinked
|
|
2158
|
+
* entries are not followed. Unreadable subdirectories are reported, not thrown.
|
|
2159
|
+
*/
|
|
2160
|
+
declare function walkSuiteFiles(directory: string, suffixes: readonly string[], onUnreadable?: (folder: string) => void): Promise<readonly string[]>;
|
|
2161
|
+
/**
|
|
2162
|
+
* Resolve CLI paths into test and module files under the project root.
|
|
2163
|
+
* Containment uses real paths so symlinked checkouts and `/var` vs
|
|
2164
|
+
* `/private/var` spellings never make an inside path look outside.
|
|
2165
|
+
*/
|
|
2166
|
+
declare function discoverProjectFiles(paths: readonly string[], options: {
|
|
2167
|
+
readonly repoRoot: string;
|
|
2168
|
+
}): Promise<ProjectFiles>;
|
|
2169
|
+
|
|
2170
|
+
interface ProjectValidationOptions extends ClassifyFlowOptions {
|
|
2171
|
+
/** The real project root returned by `discoverProjectFiles`. */
|
|
2172
|
+
readonly repoRoot: string;
|
|
2173
|
+
/**
|
|
2174
|
+
* The configured base URL. When present (including `null` for "none"),
|
|
2175
|
+
* each test's entry URL is resolved exactly as `sedum run` resolves it.
|
|
2176
|
+
*/
|
|
2177
|
+
readonly baseUrl?: string | null;
|
|
2178
|
+
}
|
|
2179
|
+
interface ProjectFileValidation {
|
|
2180
|
+
readonly file: string;
|
|
2181
|
+
readonly kind: "test" | "module";
|
|
2182
|
+
/** Tests only. */
|
|
2183
|
+
readonly identity?: string;
|
|
2184
|
+
/** Tests only; unreferenced modules have no module or coverage context. */
|
|
2185
|
+
readonly coverage?: FullValidationCoverage;
|
|
2186
|
+
/** Modules only: whether any discovered test's module graph read it. */
|
|
2187
|
+
readonly reached?: boolean;
|
|
2188
|
+
}
|
|
2189
|
+
interface ProjectValidationCounts {
|
|
2190
|
+
readonly tests: number;
|
|
2191
|
+
readonly modules: number;
|
|
2192
|
+
readonly unreferencedModules: number;
|
|
2193
|
+
/** Error diagnostics other than sentences not classifiable offline. */
|
|
2194
|
+
readonly errors: number;
|
|
2195
|
+
readonly warnings: number;
|
|
2196
|
+
readonly notCheckedOffline: number;
|
|
2197
|
+
/** Provider, cache, or file-read failures: the check itself could not run. */
|
|
2198
|
+
readonly operational: number;
|
|
2199
|
+
}
|
|
2200
|
+
interface ProjectValidationResult {
|
|
2201
|
+
readonly files: readonly ProjectFileValidation[];
|
|
2202
|
+
/** Deduplicated and sorted by file, line, column, then code. */
|
|
2203
|
+
readonly diagnostics: readonly FlowDiagnostic[];
|
|
2204
|
+
readonly counts: ProjectValidationCounts;
|
|
2205
|
+
readonly calls: readonly ProviderCall[];
|
|
2206
|
+
/** True only when every check ran completely and found no error. */
|
|
2207
|
+
readonly fullyValidated: boolean;
|
|
2208
|
+
}
|
|
2209
|
+
/** Classification code for a sentence the offline path could not classify. */
|
|
2210
|
+
declare const NOT_CHECKED_OFFLINE_CODE = "unavailable";
|
|
2211
|
+
/** Deterministic diagnostic order: file, line, column, code, message. */
|
|
2212
|
+
declare function compareDiagnostics(a: FlowDiagnostic, b: FlowDiagnostic): number;
|
|
2213
|
+
/** A module reached from several tests reports each problem once. */
|
|
2214
|
+
declare function dedupeDiagnostics(diagnostics: readonly FlowDiagnostic[]): readonly FlowDiagnostic[];
|
|
2215
|
+
/**
|
|
2216
|
+
* Validate discovered tests and modules without a browser: format, module
|
|
2217
|
+
* graphs, and sentence classification in the caller's mode. Each file is
|
|
2218
|
+
* checked even when another fails. Modules no test reaches are checked for
|
|
2219
|
+
* format and their own sentences; their nested calls are checked from tests.
|
|
2220
|
+
*/
|
|
2221
|
+
declare function validateProject(input: {
|
|
2222
|
+
readonly tests: readonly string[];
|
|
2223
|
+
readonly modules: readonly string[];
|
|
2224
|
+
}, options: ProjectValidationOptions): Promise<ProjectValidationResult>;
|
|
2225
|
+
|
|
2226
|
+
interface ListedTest {
|
|
2227
|
+
readonly id: string;
|
|
2228
|
+
readonly idSource: "explicit" | "path";
|
|
2229
|
+
/** Repository-relative with `/` separators. */
|
|
2230
|
+
readonly file: string;
|
|
2231
|
+
readonly description: string | null;
|
|
2232
|
+
readonly tags: readonly string[];
|
|
2233
|
+
}
|
|
2234
|
+
interface ListedDiagnostic {
|
|
2235
|
+
readonly severity: FlowDiagnostic["severity"];
|
|
2236
|
+
readonly code: string;
|
|
2237
|
+
readonly line: number;
|
|
2238
|
+
readonly col: number;
|
|
2239
|
+
readonly message: string;
|
|
2240
|
+
readonly fix: string;
|
|
2241
|
+
}
|
|
2242
|
+
interface InvalidListEntry {
|
|
2243
|
+
readonly file: string;
|
|
2244
|
+
readonly diagnostics: readonly ListedDiagnostic[];
|
|
2245
|
+
}
|
|
2246
|
+
interface TestListing {
|
|
2247
|
+
readonly tests: readonly ListedTest[];
|
|
2248
|
+
readonly invalid: readonly InvalidListEntry[];
|
|
2249
|
+
}
|
|
2250
|
+
/** Repository-relative path with `/` separators on every OS. */
|
|
2251
|
+
declare function displayPath(root: string, file: string): string;
|
|
2252
|
+
/**
|
|
2253
|
+
* Shape parsed tests for `sedum list`. A file that failed format, or whose id
|
|
2254
|
+
* collides with an earlier test, is listed as invalid instead of as a test.
|
|
2255
|
+
*/
|
|
2256
|
+
declare function listTests(parsed: readonly {
|
|
2257
|
+
readonly file: string;
|
|
2258
|
+
readonly result: ParsedFlowResult;
|
|
2259
|
+
}[], options: {
|
|
2260
|
+
readonly repoRoot: string;
|
|
2261
|
+
}): TestListing;
|
|
2262
|
+
|
|
2263
|
+
declare const DEFAULT_MIN_P = 0.75;
|
|
2264
|
+
declare const DEFAULT_BAND = 0.15;
|
|
2265
|
+
declare const DEFAULT_CONTRADICTION_CUTOFF = 0.5;
|
|
2266
|
+
type VerifyFlag = "low_confidence" | "contradiction";
|
|
2267
|
+
type AssertionEngineErrorCode = "missing_digest" | "ambiguous_digest" | "incomplete_digest" | "oversize_digest" | "stale_observation" | "observation_timeout" | "browser_failure" | "canceled" | "provider_failure";
|
|
2268
|
+
/** Public diagnostics contain only a stable code and a bounded message. */
|
|
2269
|
+
declare class AssertionEngineError extends Error {
|
|
2270
|
+
readonly code: AssertionEngineErrorCode;
|
|
2271
|
+
readonly failedCall?: ProviderCall;
|
|
2272
|
+
constructor(code: AssertionEngineErrorCode, failedCall?: ProviderCall);
|
|
2273
|
+
toJSON(): {
|
|
2274
|
+
code: AssertionEngineErrorCode;
|
|
2275
|
+
message: string;
|
|
2276
|
+
};
|
|
2277
|
+
}
|
|
2278
|
+
interface AssertionOptions {
|
|
2279
|
+
readonly signal?: AbortSignal;
|
|
2280
|
+
/** Redact sensitive page-derived text only at the Judge boundary. */
|
|
2281
|
+
readonly projectText?: (text: string) => string;
|
|
2282
|
+
/** Maximum time for the settled page read, before the provider call. */
|
|
2283
|
+
readonly observationTimeoutMs?: number;
|
|
2284
|
+
}
|
|
2285
|
+
interface VerifyOptions extends AssertionOptions {
|
|
2286
|
+
readonly minP?: number;
|
|
2287
|
+
readonly band?: number;
|
|
2288
|
+
readonly contradictionCutoff?: number;
|
|
2289
|
+
}
|
|
2290
|
+
interface AssertionScores {
|
|
2291
|
+
readonly holds: number;
|
|
2292
|
+
readonly contradicted: number;
|
|
2293
|
+
readonly call: ProviderCall;
|
|
2294
|
+
readonly elapsedMs: number;
|
|
2295
|
+
/** Internal provenance for report metadata; never serialize the raw route. */
|
|
2296
|
+
readonly observationVersion: PageVersion;
|
|
2297
|
+
}
|
|
2298
|
+
type VerifyResult = AssertionScores & {
|
|
2299
|
+
readonly kind: "verify";
|
|
2300
|
+
readonly verdict: "passed" | "failed";
|
|
2301
|
+
readonly flags: readonly VerifyFlag[];
|
|
2302
|
+
readonly minP: number;
|
|
2303
|
+
readonly band: number;
|
|
2304
|
+
readonly contradictionCutoff: number;
|
|
2305
|
+
/** Present for flagged or failed checks; always drawn from the judged digest. */
|
|
2306
|
+
readonly judgedExcerpt?: string;
|
|
2307
|
+
};
|
|
2308
|
+
type MeasureResult = AssertionScores & {
|
|
2309
|
+
readonly kind: "measure";
|
|
2310
|
+
readonly judgedExcerpt: string;
|
|
2311
|
+
};
|
|
2312
|
+
interface VerifyPolicy {
|
|
2313
|
+
readonly minP?: number;
|
|
2314
|
+
readonly band?: number;
|
|
2315
|
+
readonly contradictionCutoff?: number;
|
|
2316
|
+
}
|
|
2317
|
+
interface VerifyDecision {
|
|
2318
|
+
readonly verdict: "passed" | "failed";
|
|
2319
|
+
readonly flags: readonly VerifyFlag[];
|
|
2320
|
+
readonly minP: number;
|
|
2321
|
+
readonly band: number;
|
|
2322
|
+
readonly contradictionCutoff: number;
|
|
2323
|
+
}
|
|
2324
|
+
/** The mutually exclusive SED-13 table. No scores are rounded before comparison. */
|
|
2325
|
+
declare function evaluateVerifyScores(holds: number, contradicted: number, policy?: VerifyPolicy): VerifyDecision;
|
|
2326
|
+
declare function verify(page: BrowserPage, judge: Judge, claim: string, options?: VerifyOptions): Promise<VerifyResult>;
|
|
2327
|
+
declare function measure(page: BrowserPage, judge: Judge, claim: string, options?: AssertionOptions): Promise<MeasureResult>;
|
|
2328
|
+
|
|
2329
|
+
type FlowRunResult = {
|
|
2330
|
+
readonly status: "passed";
|
|
2331
|
+
readonly file: string;
|
|
2332
|
+
} | {
|
|
2333
|
+
readonly status: "failed";
|
|
2334
|
+
readonly file: string;
|
|
2335
|
+
readonly source: FlowSource;
|
|
2336
|
+
} | {
|
|
2337
|
+
readonly status: "could_not_run";
|
|
2338
|
+
readonly file: string;
|
|
2339
|
+
readonly code: string;
|
|
2340
|
+
readonly message: string;
|
|
2341
|
+
readonly source?: FlowSource;
|
|
2342
|
+
readonly fix?: string;
|
|
2343
|
+
};
|
|
2344
|
+
/** Dependencies are injected so the engine never owns process state or SDK types. */
|
|
2345
|
+
interface FlowRunnerDependencies {
|
|
2346
|
+
readonly repoRoot: string;
|
|
2347
|
+
/** Parallel lanes pass a `ReusableBrowserDriver` so attempts share one browser. */
|
|
2348
|
+
readonly browser: BrowserDriver;
|
|
2349
|
+
readonly provider: ClassificationProvider & Resolver & Judge;
|
|
2350
|
+
readonly classificationCache: ClassificationCache;
|
|
2351
|
+
readonly locatorCache?: CacheStore;
|
|
2352
|
+
readonly env: Readonly<Record<string, string | undefined>>;
|
|
2353
|
+
/** Temporary debug switch; the final CLI/config surface owns launch policy. */
|
|
2354
|
+
readonly headless?: boolean;
|
|
2355
|
+
readonly browserKind?: BrowserKind;
|
|
2356
|
+
readonly viewport?: {
|
|
2357
|
+
readonly width: number;
|
|
2358
|
+
readonly height: number;
|
|
2359
|
+
};
|
|
2360
|
+
readonly verifyPolicy?: VerifyPolicy;
|
|
2361
|
+
readonly baseUrl?: string;
|
|
2362
|
+
readonly urlOverride?: string;
|
|
2363
|
+
readonly slowMoMs?: number;
|
|
2364
|
+
readonly headedOverlay?: boolean;
|
|
2365
|
+
readonly signal?: AbortSignal;
|
|
2366
|
+
readonly report?: {
|
|
2367
|
+
readonly recorder: RunRecorder;
|
|
2368
|
+
/**
|
|
2369
|
+
* Selection position and lane for parallel runs. Without it the runner
|
|
2370
|
+
* treats the most recently started test as the one being retried.
|
|
2371
|
+
*/
|
|
2372
|
+
readonly slot?: {
|
|
2373
|
+
readonly ordinal: number;
|
|
2374
|
+
readonly lane?: number;
|
|
2375
|
+
};
|
|
2376
|
+
readonly privacy: ReportPrivacy;
|
|
2377
|
+
readonly evidenceEnabled: boolean;
|
|
2378
|
+
readonly replay: boolean;
|
|
2379
|
+
/** Stores one frame under its attempt; `frameId` is unique within the run. */
|
|
2380
|
+
readonly saveFrame: (attempt: {
|
|
2381
|
+
readonly id: string;
|
|
2382
|
+
readonly ordinal: number;
|
|
2383
|
+
}, frameId: string, bytes: Uint8Array) => Promise<ResultFrame>;
|
|
2384
|
+
};
|
|
2385
|
+
}
|
|
2386
|
+
/** SED-10 entry URL semantics; SED-33 adds origin-preserving --url-override. */
|
|
2387
|
+
declare function resolveEntryUrl(testUrl?: string, baseUrl?: string, urlOverride?: string): string;
|
|
2388
|
+
/** Run one validated attempt with setup, body, and exhaustive teardown. */
|
|
2389
|
+
declare function runFlow(file: string, runDependencies: FlowRunnerDependencies): Promise<FlowRunResult>;
|
|
2390
|
+
|
|
2391
|
+
/** A browser action requested by a Sedum flow. */
|
|
2392
|
+
interface ActionRequest {
|
|
2393
|
+
readonly description: string;
|
|
2394
|
+
}
|
|
2395
|
+
|
|
2396
|
+
export { ACCEPTANCE_POLICY_VERSION, type ActionRequest, type Aim, type AimResult, AssertionEngineError, type AssertionEngineErrorCode, type AssertionOptions, type BrowserContextOptions, type BrowserContextSession, type BrowserDriver, BrowserDriverError, type BrowserDriverErrorCode, type BrowserInstallResult, type BrowserKind, type BrowserLaunchOptions, type BrowserPage, type BrowserSession, CACHE_FORMAT, CANDIDATE_LIMIT, CLASSIFICATION_PROMPT_VERSION, type CacheEntry, type CacheLookup, type CacheMissReason, type CacheStore, type CachedClassification, type Candidate, type CandidatePage, ClassificationBatchError, type ClassificationCache, type ClassificationDiagnostic, type ClassificationDiagnosticCode, type ClassificationInput, type ClassificationMetrics, type ClassificationProvider, type ClassificationResult, type ClassifiedFlowDefinition, type ClassifiedFlowSentence, type ClassifiedFlowStep, type ClassifiedModuleStep, type ClassifiedStep, type ClassifyFlowOptions, DEFAULT_BAND, DEFAULT_CONTRADICTION_CUTOFF, DEFAULT_MIN_P, DIGEST_LIMIT, DataResolutionError, type DeclaredDataValue, type DigestResult, type DiscoveryProblem, type DiscoveryProblemCode, FileClassificationCache, type FillResult, type FillTarget, type FlowClassificationDiagnostic, type FlowClassificationResult, type FlowDefinition, type FlowDiagnostic, type FlowRunResult, type FlowRunnerDependencies, type FlowScalar, type FlowSource, type FlowStep, type FlowToken, type FlowValidationResult, type FormatCoverage, type FullValidationCoverage, type InvalidListEntry, type Judge, type JudgeDecision, type JudgePageDigest, type ListedDiagnostic, type ListedTest, LocatorCacheConflict, type LocatorCacheDiagnostic, type LocatorCacheLookup, type LocatorCacheSeed, type LocatorDiagnostic, type LocatorFailure, type LocatorOptionDiagnostic, type LocatorOptions, type LocatorResult, MATCHER_VERSION, MIN_MODEL_MARGIN, MIN_MODEL_PROBABILITY, MODEL_CHOICES, type MatchResult, type MeasureResult, type ModelChoice, type ModelClassification, type ModuleBinding, ModuleBindingResolutionError, type ModuleDefinition, type ModuleStep, NAME_LIMIT, NOT_CHECKED_OFFLINE_CODE, type NavigationOptions, type NavigationResult, NoopCacheStore, NoopClassificationCache, OPERATIONS, OPERATION_SET_VERSION, type Operation, PAGE_PROTOCOL, PEER_LIMIT, type PageBridge, PageScriptError, type PageVersion, type ParseFlowOptions, type ParsedFlowResult, type ParsedModuleResult, PlaywrightBrowserDriver, type ProjectFileValidation, type ProjectFiles, type ProjectValidationCounts, type ProjectValidationOptions, type ProjectValidationResult, type ProviderCall, type ProviderCallOptions, ProviderError, type ProviderErrorCode, type ProviderRate, type ProviderTokenUsage, type ReadTargetResult, type ReportPrivacy, type ResolveFlowModulesOptions, type ResolvedDataEntry, type ResolvedFlowResult, type ResolvedModuleCall, ResolvedStepTarget, type Resolver, type ResolverCandidate, type ResolverCandidates, type ResolverDecision, type ResolverOption, type ResultAttempt, ResultAttemptSchema, type ResultCall, ResultCallSchema, ResultErrorSchema, type ResultExecution, ResultExecutionSchema, type ResultFrame, ResultFrameSchema, ResultJudgementSchema, ResultLocatorSchema, ResultObservationSchema, type ResultPage, ResultPageSchema, type ResultProblem, ResultProblemSchema, type ResultSink, ResultSourceSchema, type ResultStep, ResultStepSchema, type ResultTest, ResultTestSchema, ResultTotalsSchema, ReusableBrowserDriver, RunRecorder, type RunResult, RunResultSchema, RuntimeUrl, RuntimeValue, type SentenceClassification, type SentenceStep, type SettleOptions, type SettleResult, type StepCommand, StepExecutionError, type StepExecutionOptions, type StepExecutionResult, type StepFailureCode, type StepFailurePhase, type StepOperation, type StepOperationKind, type StepOutcome, type StepSource, type StepTokenization, type TestListing, TestRecording, type TestStartInput, type ValidationInput, type VerifyDecision, type VerifyFlag, type VerifyOptions, type VerifyPolicy, type VerifyResult, canonicalSentence, classificationKey, classifyParsedFlow, classifySentenceSteps, classifySteps, clearPageRefs, clickTarget, codePoints, collectCandidates, compareDiagnostics, dedupeDiagnostics, discoverFlowFiles, discoverProjectFiles, displayPath, evaluateModelAnswer, evaluateVerifyScores, executeStep, findBrowserExecutable, findIdentityCollisions, formatFlowDiagnostic, installChromium, isFlowScalar, isFullyValidated, isSafeRole, isWeakPeer, keyedDigest, listTests, liveCandidates, loadFlowFile, matchEntry, matchLiveEntry, measure, normalizeSignal, opaqueMatches, pageDigest, pageKey, pageVersion, parseDataTemplate, parseFlow, parseModule, patternOperation, preflightSentence, projectCandidates, projectDigest, quietPage, readTarget, redactOpaqueText, reportPage, resolveData, resolveEntryUrl, resolveFlowModules, resolveModuleBindings, resolveTarget, resolveTypeOperand, resultTotals, runFlow, runResultJsonSchema, safeSource, safeText, safeUrl, stageEntry, tokenizeStep, unknownCostCall, validateFlows, validateOperand, validateProject, validateRunResult, validateTypeOperand, verify, walkSuiteFiles };
|