@vostride/agent-qa-core 0.1.21 → 0.2.2
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/dist/index.cjs +1637 -8773
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +672 -2230
- package/dist/index.d.ts +672 -2230
- package/dist/index.js +1524 -8525
- package/dist/index.js.map +1 -1
- package/package.json +8 -16
package/dist/index.d.ts
CHANGED
|
@@ -1,512 +1,9 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import
|
|
3
|
-
|
|
4
|
-
import
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
type StepStatus = 'passed' | 'failed' | 'healed' | 'skipped' | 'cancelled';
|
|
8
|
-
type TestStatus = 'passed' | 'failed' | 'skipped' | 'cancelled';
|
|
9
|
-
interface StepAnnotation {
|
|
10
|
-
clickPoint?: {
|
|
11
|
-
x: number;
|
|
12
|
-
y: number;
|
|
13
|
-
};
|
|
14
|
-
boundingBox?: {
|
|
15
|
-
x: number;
|
|
16
|
-
y: number;
|
|
17
|
-
width: number;
|
|
18
|
-
height: number;
|
|
19
|
-
};
|
|
20
|
-
failureHighlight?: {
|
|
21
|
-
x: number;
|
|
22
|
-
y: number;
|
|
23
|
-
width: number;
|
|
24
|
-
height: number;
|
|
25
|
-
};
|
|
26
|
-
type: 'click' | 'fill' | 'tap' | 'hover' | 'scroll' | 'swipe' | 'pinch' | 'navigate' | 'other';
|
|
27
|
-
viewport?: {
|
|
28
|
-
width: number;
|
|
29
|
-
height: number;
|
|
30
|
-
};
|
|
31
|
-
startPoint?: {
|
|
32
|
-
x: number;
|
|
33
|
-
y: number;
|
|
34
|
-
};
|
|
35
|
-
endPoint?: {
|
|
36
|
-
x: number;
|
|
37
|
-
y: number;
|
|
38
|
-
};
|
|
39
|
-
direction?: 'up' | 'down' | 'left' | 'right';
|
|
40
|
-
pinchScale?: 'in' | 'out';
|
|
41
|
-
}
|
|
42
|
-
interface HealingAttempt {
|
|
43
|
-
action: Action;
|
|
44
|
-
observationBefore: string;
|
|
45
|
-
observationAfter?: string;
|
|
46
|
-
success: boolean;
|
|
47
|
-
attemptNumber?: number;
|
|
48
|
-
strategy?: string;
|
|
49
|
-
reasoning?: string;
|
|
50
|
-
confidence?: number;
|
|
51
|
-
}
|
|
52
|
-
interface TokenUsage {
|
|
53
|
-
promptTokens: number;
|
|
54
|
-
completionTokens: number;
|
|
55
|
-
totalTokens: number;
|
|
56
|
-
}
|
|
57
|
-
interface SubActionTrace {
|
|
58
|
-
index: number;
|
|
59
|
-
observation: string;
|
|
60
|
-
reasoning: string;
|
|
61
|
-
plannedAction: Action;
|
|
62
|
-
result: 'success' | 'failure';
|
|
63
|
-
error?: string;
|
|
64
|
-
screenStateBefore: string;
|
|
65
|
-
screenStateAfter?: string;
|
|
66
|
-
screenContextBefore?: string;
|
|
67
|
-
screenContextAfter?: string;
|
|
68
|
-
confidence?: number;
|
|
69
|
-
verifierReasoning?: string;
|
|
70
|
-
cached: boolean;
|
|
71
|
-
tokenUsage?: TokenUsage;
|
|
72
|
-
phaseDurations?: {
|
|
73
|
-
observe?: number;
|
|
74
|
-
plan?: number;
|
|
75
|
-
execute?: number;
|
|
76
|
-
verify?: number;
|
|
77
|
-
};
|
|
78
|
-
screenshotBefore?: Buffer;
|
|
79
|
-
screenshotAfter?: Buffer;
|
|
80
|
-
annotation?: StepAnnotation;
|
|
81
|
-
data?: unknown;
|
|
82
|
-
}
|
|
83
|
-
interface StepTrace {
|
|
84
|
-
observation: string;
|
|
85
|
-
reasoning: string;
|
|
86
|
-
plannedAction: Action;
|
|
87
|
-
result: 'success' | 'failure';
|
|
88
|
-
error?: string;
|
|
89
|
-
screenStateBefore: string;
|
|
90
|
-
screenStateAfter?: string;
|
|
91
|
-
screenContextBefore?: string;
|
|
92
|
-
screenContextAfter?: string;
|
|
93
|
-
confidence?: number;
|
|
94
|
-
verifierReasoning?: string;
|
|
95
|
-
tokenUsage?: TokenUsage;
|
|
96
|
-
phaseDurations?: {
|
|
97
|
-
observe?: number;
|
|
98
|
-
plan?: number;
|
|
99
|
-
execute?: number;
|
|
100
|
-
verify?: number;
|
|
101
|
-
heal?: number;
|
|
102
|
-
};
|
|
103
|
-
subActions?: SubActionTrace[];
|
|
104
|
-
}
|
|
105
|
-
interface StepPhaseEvent {
|
|
106
|
-
phase: 'observe' | 'plan' | 'execute' | 'verify' | 'heal';
|
|
107
|
-
subActionIndex?: number;
|
|
108
|
-
phaseOrdinal?: number;
|
|
109
|
-
text?: string;
|
|
110
|
-
confidence?: number;
|
|
111
|
-
action?: unknown;
|
|
112
|
-
success?: boolean;
|
|
113
|
-
duration?: number;
|
|
114
|
-
}
|
|
115
|
-
interface AccessibilityViolation {
|
|
116
|
-
ruleId: string;
|
|
117
|
-
impact: 'minor' | 'moderate' | 'serious' | 'critical';
|
|
118
|
-
description: string;
|
|
119
|
-
help: string;
|
|
120
|
-
helpUrl: string;
|
|
121
|
-
nodes: Array<{
|
|
122
|
-
html: string;
|
|
123
|
-
target: string[];
|
|
124
|
-
}>;
|
|
125
|
-
}
|
|
126
|
-
interface ConsoleLogEntry {
|
|
127
|
-
level: string;
|
|
128
|
-
text: string;
|
|
129
|
-
location?: {
|
|
130
|
-
url: string;
|
|
131
|
-
lineNumber: number;
|
|
132
|
-
columnNumber: number;
|
|
133
|
-
};
|
|
134
|
-
timestamp: number;
|
|
135
|
-
}
|
|
136
|
-
interface NetworkLogEntry {
|
|
137
|
-
url: string;
|
|
138
|
-
method: string;
|
|
139
|
-
status: number;
|
|
140
|
-
requestHeaders: Record<string, string>;
|
|
141
|
-
responseHeaders: Record<string, string>;
|
|
142
|
-
body?: string;
|
|
143
|
-
requestBody?: string;
|
|
144
|
-
startTime: number;
|
|
145
|
-
endTime: number;
|
|
146
|
-
timing?: Record<string, number>;
|
|
147
|
-
}
|
|
148
|
-
interface StepResult {
|
|
149
|
-
id?: string;
|
|
150
|
-
name: string;
|
|
151
|
-
status: StepStatus;
|
|
152
|
-
duration: number;
|
|
153
|
-
action?: Action;
|
|
154
|
-
observation?: string;
|
|
155
|
-
error?: string;
|
|
156
|
-
screenshot?: Buffer;
|
|
157
|
-
screenshotBefore?: Buffer;
|
|
158
|
-
healingAttempts?: HealingAttempt[];
|
|
159
|
-
trace?: StepTrace;
|
|
160
|
-
retryCount?: number;
|
|
161
|
-
capturedVariables?: Record<string, string>;
|
|
162
|
-
annotation?: StepAnnotation;
|
|
163
|
-
healingScreenshots?: Buffer[];
|
|
164
|
-
accessibilityViolations?: AccessibilityViolation[];
|
|
165
|
-
consoleLogs?: ConsoleLogEntry[];
|
|
166
|
-
networkLogs?: NetworkLogEntry[];
|
|
167
|
-
variableSnapshot?: Record<string, {
|
|
168
|
-
value: string;
|
|
169
|
-
source: string;
|
|
170
|
-
}>;
|
|
171
|
-
originalStepName?: string;
|
|
172
|
-
}
|
|
173
|
-
interface TestResult {
|
|
174
|
-
runId?: string;
|
|
175
|
-
name: string;
|
|
176
|
-
filePath: string;
|
|
177
|
-
status: TestStatus;
|
|
178
|
-
steps: StepResult[];
|
|
179
|
-
duration: number;
|
|
180
|
-
metadata?: Record<string, unknown>;
|
|
181
|
-
retryCount?: number;
|
|
182
|
-
videoPath?: string;
|
|
183
|
-
failureSummary?: string;
|
|
184
|
-
}
|
|
185
|
-
|
|
186
|
-
interface ObserveOptions {
|
|
187
|
-
extractDom?: boolean;
|
|
188
|
-
}
|
|
189
|
-
interface PlatformAdapter {
|
|
190
|
-
readonly platform: 'web' | 'android' | 'ios';
|
|
191
|
-
setup(config: PlatformConfig): Promise<void>;
|
|
192
|
-
cleanup(): Promise<void>;
|
|
193
|
-
observe(options?: ObserveOptions): Promise<ScreenState>;
|
|
194
|
-
execute(action: Action): Promise<ActionResult>;
|
|
195
|
-
screenshot?(): Promise<Buffer | undefined>;
|
|
196
|
-
drainConsoleLogs?(level?: string): ConsoleLogEntry[];
|
|
197
|
-
drainNetworkLogs?(urlPattern?: string): NetworkLogEntry[];
|
|
198
|
-
}
|
|
199
|
-
interface ScreenStateMetadata {
|
|
200
|
-
coordSpace: 'viewport';
|
|
201
|
-
viewportWidth: number;
|
|
202
|
-
viewportHeight: number;
|
|
203
|
-
refMap?: Record<string, unknown>;
|
|
204
|
-
imageWidth?: number;
|
|
205
|
-
imageHeight?: number;
|
|
206
|
-
domContext?: string;
|
|
207
|
-
}
|
|
208
|
-
interface ScreenState {
|
|
209
|
-
tree: string;
|
|
210
|
-
elements: ElementInfo[];
|
|
211
|
-
url?: string;
|
|
212
|
-
timestamp: number;
|
|
213
|
-
metadata: ScreenStateMetadata;
|
|
214
|
-
}
|
|
215
|
-
interface ElementInfo {
|
|
216
|
-
ref: string;
|
|
217
|
-
role: string;
|
|
218
|
-
name: string;
|
|
219
|
-
value?: string;
|
|
220
|
-
attributes: Record<string, string>;
|
|
221
|
-
}
|
|
222
|
-
type Action = {
|
|
223
|
-
type: 'click';
|
|
224
|
-
ref: string;
|
|
225
|
-
clickDelay?: number;
|
|
226
|
-
} | {
|
|
227
|
-
type: 'fill';
|
|
228
|
-
ref: string;
|
|
229
|
-
value: string;
|
|
230
|
-
} | {
|
|
231
|
-
type: 'select';
|
|
232
|
-
ref: string;
|
|
233
|
-
value: string;
|
|
234
|
-
} | {
|
|
235
|
-
type: 'nativeSelect';
|
|
236
|
-
ref: string;
|
|
237
|
-
value: string;
|
|
238
|
-
} | {
|
|
239
|
-
type: 'navigate';
|
|
240
|
-
url: string;
|
|
241
|
-
} | {
|
|
242
|
-
type: 'scroll';
|
|
243
|
-
scrollType: 'vertical' | 'horizontal';
|
|
244
|
-
value: number;
|
|
245
|
-
ref?: string;
|
|
246
|
-
duration?: number;
|
|
247
|
-
} | {
|
|
248
|
-
type: 'waitFor';
|
|
249
|
-
condition: string;
|
|
250
|
-
timeout?: number;
|
|
251
|
-
} | {
|
|
252
|
-
type: 'delay';
|
|
253
|
-
ms: number;
|
|
254
|
-
} | {
|
|
255
|
-
type: 'assert';
|
|
256
|
-
condition: string;
|
|
257
|
-
expected?: string;
|
|
258
|
-
visual?: boolean;
|
|
259
|
-
} | {
|
|
260
|
-
type: 'keypress';
|
|
261
|
-
keys: string[];
|
|
262
|
-
convertPlatformKeys?: boolean;
|
|
263
|
-
} | {
|
|
264
|
-
type: 'hover';
|
|
265
|
-
ref: string;
|
|
266
|
-
} | {
|
|
267
|
-
type: 'paste';
|
|
268
|
-
ref: string;
|
|
269
|
-
value: string;
|
|
270
|
-
} | {
|
|
271
|
-
type: 'keyDown';
|
|
272
|
-
key: string;
|
|
273
|
-
} | {
|
|
274
|
-
type: 'keyUp';
|
|
275
|
-
key: string;
|
|
276
|
-
} | {
|
|
277
|
-
type: 'refresh';
|
|
278
|
-
} | {
|
|
279
|
-
type: 'navigateHistory';
|
|
280
|
-
direction: 'back' | 'forward';
|
|
281
|
-
} | {
|
|
282
|
-
type: 'readConsoleLogs';
|
|
283
|
-
level?: 'log' | 'info' | 'warn' | 'error';
|
|
284
|
-
tab?: {
|
|
285
|
-
index?: number;
|
|
286
|
-
title?: string;
|
|
287
|
-
url?: string;
|
|
288
|
-
};
|
|
289
|
-
} | {
|
|
290
|
-
type: 'readNetworkLogs';
|
|
291
|
-
urlPattern?: string;
|
|
292
|
-
tab?: {
|
|
293
|
-
index?: number;
|
|
294
|
-
title?: string;
|
|
295
|
-
url?: string;
|
|
296
|
-
};
|
|
297
|
-
} | {
|
|
298
|
-
type: 'readCookies';
|
|
299
|
-
name?: string;
|
|
300
|
-
} | {
|
|
301
|
-
type: 'setCookies';
|
|
302
|
-
cookies: Array<{
|
|
303
|
-
name: string;
|
|
304
|
-
value: string;
|
|
305
|
-
domain?: string;
|
|
306
|
-
path?: string;
|
|
307
|
-
httpOnly?: boolean;
|
|
308
|
-
secure?: boolean;
|
|
309
|
-
sameSite?: 'Strict' | 'Lax' | 'None';
|
|
310
|
-
expires?: number;
|
|
311
|
-
}>;
|
|
312
|
-
} | {
|
|
313
|
-
type: 'readLocalStorage';
|
|
314
|
-
key?: string;
|
|
315
|
-
} | {
|
|
316
|
-
type: 'setLocalStorage';
|
|
317
|
-
entries: Array<{
|
|
318
|
-
key: string;
|
|
319
|
-
value: string;
|
|
320
|
-
}>;
|
|
321
|
-
} | {
|
|
322
|
-
type: 'newTab';
|
|
323
|
-
url: string;
|
|
324
|
-
} | {
|
|
325
|
-
type: 'switchTab';
|
|
326
|
-
index?: number;
|
|
327
|
-
title?: string;
|
|
328
|
-
url?: string;
|
|
329
|
-
} | {
|
|
330
|
-
type: 'doubleClick';
|
|
331
|
-
ref: string;
|
|
332
|
-
relativePosition?: {
|
|
333
|
-
x: number;
|
|
334
|
-
y: number;
|
|
335
|
-
};
|
|
336
|
-
clickDelay?: number;
|
|
337
|
-
} | {
|
|
338
|
-
type: 'rightClick';
|
|
339
|
-
ref: string;
|
|
340
|
-
relativePosition?: {
|
|
341
|
-
x: number;
|
|
342
|
-
y: number;
|
|
343
|
-
};
|
|
344
|
-
clickDelay?: number;
|
|
345
|
-
} | {
|
|
346
|
-
type: 'waitForUrl';
|
|
347
|
-
pattern: string;
|
|
348
|
-
} | {
|
|
349
|
-
type: 'fileUpload';
|
|
350
|
-
ref: string;
|
|
351
|
-
files: string[];
|
|
352
|
-
} | {
|
|
353
|
-
type: 'copy';
|
|
354
|
-
ref: string;
|
|
355
|
-
} | {
|
|
356
|
-
type: 'tap';
|
|
357
|
-
ref: string;
|
|
358
|
-
} | {
|
|
359
|
-
type: 'swipe';
|
|
360
|
-
direction: 'up' | 'down' | 'left' | 'right';
|
|
361
|
-
ref?: string;
|
|
362
|
-
startX?: number;
|
|
363
|
-
startY?: number;
|
|
364
|
-
endX?: number;
|
|
365
|
-
endY?: number;
|
|
366
|
-
duration?: number;
|
|
367
|
-
} | {
|
|
368
|
-
type: 'longpress';
|
|
369
|
-
ref: string;
|
|
370
|
-
duration?: number;
|
|
371
|
-
} | {
|
|
372
|
-
type: 'hideKeyboard';
|
|
373
|
-
} | {
|
|
374
|
-
type: 'clearText';
|
|
375
|
-
ref: string;
|
|
376
|
-
} | {
|
|
377
|
-
type: 'openLink';
|
|
378
|
-
url: string;
|
|
379
|
-
appId?: string;
|
|
380
|
-
bundleId?: string;
|
|
381
|
-
appPackage?: string;
|
|
382
|
-
waitForLaunch?: boolean;
|
|
383
|
-
} | {
|
|
384
|
-
type: 'drag';
|
|
385
|
-
fromRef: string;
|
|
386
|
-
toRef: string;
|
|
387
|
-
} | {
|
|
388
|
-
type: 'doubleTap';
|
|
389
|
-
ref: string;
|
|
390
|
-
} | {
|
|
391
|
-
type: 'launchApp';
|
|
392
|
-
bundleId: string;
|
|
393
|
-
} | {
|
|
394
|
-
type: 'stopApp';
|
|
395
|
-
bundleId: string;
|
|
396
|
-
} | {
|
|
397
|
-
type: 'setOrientation';
|
|
398
|
-
orientation: 'portrait' | 'landscape';
|
|
399
|
-
} | {
|
|
400
|
-
type: 'pinch';
|
|
401
|
-
scale: number;
|
|
402
|
-
x?: number;
|
|
403
|
-
y?: number;
|
|
404
|
-
ref?: string;
|
|
405
|
-
} | {
|
|
406
|
-
type: 'multiTap';
|
|
407
|
-
fingers: number;
|
|
408
|
-
x?: number;
|
|
409
|
-
y?: number;
|
|
410
|
-
ref?: string;
|
|
411
|
-
} | {
|
|
412
|
-
type: 'tapCoordinate';
|
|
413
|
-
x: number;
|
|
414
|
-
y: number;
|
|
415
|
-
} | {
|
|
416
|
-
type: 'executeScript';
|
|
417
|
-
command: string;
|
|
418
|
-
args?: unknown;
|
|
419
|
-
} | {
|
|
420
|
-
type: 'setVariable';
|
|
421
|
-
name: string;
|
|
422
|
-
value: string;
|
|
423
|
-
};
|
|
424
|
-
interface ActionResult {
|
|
425
|
-
success: boolean;
|
|
426
|
-
error?: string;
|
|
427
|
-
screenshot?: Buffer;
|
|
428
|
-
metadata?: Record<string, unknown>;
|
|
429
|
-
coordinates?: {
|
|
430
|
-
x: number;
|
|
431
|
-
y: number;
|
|
432
|
-
};
|
|
433
|
-
boundingBox?: {
|
|
434
|
-
x: number;
|
|
435
|
-
y: number;
|
|
436
|
-
width: number;
|
|
437
|
-
height: number;
|
|
438
|
-
};
|
|
439
|
-
startCoordinates?: {
|
|
440
|
-
x: number;
|
|
441
|
-
y: number;
|
|
442
|
-
};
|
|
443
|
-
endCoordinates?: {
|
|
444
|
-
x: number;
|
|
445
|
-
y: number;
|
|
446
|
-
};
|
|
447
|
-
data?: unknown;
|
|
448
|
-
}
|
|
449
|
-
interface RuntimeAuthStateConfig {
|
|
450
|
-
version: number;
|
|
451
|
-
kind: 'web';
|
|
452
|
-
targetName: string;
|
|
453
|
-
stateName: string;
|
|
454
|
-
capturedAt: string;
|
|
455
|
-
storageStatePath: string;
|
|
456
|
-
}
|
|
457
|
-
interface PlatformConfig {
|
|
458
|
-
platform: 'web' | 'android' | 'ios';
|
|
459
|
-
browser?: BrowserConfig;
|
|
460
|
-
device?: DeviceConfig;
|
|
461
|
-
bundleId?: string;
|
|
462
|
-
appPackage?: string;
|
|
463
|
-
appActivity?: string;
|
|
464
|
-
deepLinkAppId?: string;
|
|
465
|
-
appState?: 'preserve' | 'reset';
|
|
466
|
-
appPath?: string;
|
|
467
|
-
browserstackApp?: string;
|
|
468
|
-
appiumUrl?: string;
|
|
469
|
-
timeouts?: TimeoutConfig;
|
|
470
|
-
recording?: {
|
|
471
|
-
enabled: boolean;
|
|
472
|
-
videoDir: string;
|
|
473
|
-
videoSize?: {
|
|
474
|
-
width: number;
|
|
475
|
-
height: number;
|
|
476
|
-
};
|
|
477
|
-
};
|
|
478
|
-
verbose?: boolean;
|
|
479
|
-
farmSession?: {
|
|
480
|
-
hostname: string;
|
|
481
|
-
port: number;
|
|
482
|
-
path: string;
|
|
483
|
-
capabilities: Record<string, unknown>;
|
|
484
|
-
};
|
|
485
|
-
logCapture?: {
|
|
486
|
-
console?: boolean;
|
|
487
|
-
network?: boolean;
|
|
488
|
-
};
|
|
489
|
-
authState?: RuntimeAuthStateConfig;
|
|
490
|
-
}
|
|
491
|
-
interface BrowserConfig {
|
|
492
|
-
name: 'chromium' | 'firefox' | 'webkit';
|
|
493
|
-
headless?: boolean;
|
|
494
|
-
viewport?: {
|
|
495
|
-
width: number;
|
|
496
|
-
height: number;
|
|
497
|
-
};
|
|
498
|
-
}
|
|
499
|
-
interface DeviceConfig {
|
|
500
|
-
name: string;
|
|
501
|
-
platform: 'android' | 'ios';
|
|
502
|
-
transport: 'local' | 'browserstack';
|
|
503
|
-
match: Record<string, unknown>;
|
|
504
|
-
}
|
|
505
|
-
interface TimeoutConfig {
|
|
506
|
-
step?: number;
|
|
507
|
-
test?: number;
|
|
508
|
-
navigation?: number;
|
|
509
|
-
}
|
|
2
|
+
import { TestResult, TokenUsage, Action, InterimNode, RefBinding, DocumentScrollOffsets, Direction, SwipeSignal, SecretRedactor, BrowserConfig, PlatformAdapter, PlatformConfig, Planner as Planner$1, Verifier as Verifier$1, ActionPlanCache, WorkingMemoryPort, StorageStatePort, ScreenshotCompressor, HookDefinition, SandboxRunnerOptions, AccessibilityViolation, RuntimeAuthStateConfig, SecretStore } from '@vostride/agent-qa-runner';
|
|
3
|
+
export { AUTH_STATE_HOOK_CONTAINER_STORAGE_STATE_PATH, AUTH_STATE_HOOK_JSON_ENV, AUTH_STATE_HOOK_STORAGE_STATE_FILENAME, AUTH_STATE_HOOK_STORAGE_STATE_PATH_ENV, AUTH_STATE_HOOK_WORKSPACE_DIR, HookDefinition, HookResult, HookRuntime, RUNTIME_IMAGE_MAP, buildAuthStateHookEnv, isReservedAuthStateHookEnvKey, parseEnvFile, serializeEnvFile, stripReservedAuthStateHookEnv } from '@vostride/agent-qa-runner';
|
|
4
|
+
import { CST, Document } from 'yaml';
|
|
5
|
+
import { TestEditPatchSet, ScreenState } from '@vostride/agent-qa-schema';
|
|
6
|
+
import { LanguageModel } from 'ai';
|
|
510
7
|
|
|
511
8
|
declare const CaptureConfigSchema: z.ZodObject<{
|
|
512
9
|
variable: z.ZodString;
|
|
@@ -535,7 +32,6 @@ declare const TestStepSchema: z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
|
535
32
|
selector: z.ZodOptional<z.ZodString>;
|
|
536
33
|
description: z.ZodOptional<z.ZodString>;
|
|
537
34
|
}, z.core.$strict>>;
|
|
538
|
-
maxAttempts: z.ZodOptional<z.ZodNumber>;
|
|
539
35
|
}, z.core.$strict>]>;
|
|
540
36
|
declare const TestMetaSchema: z.ZodObject<{
|
|
541
37
|
timeout: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<number, string>>>;
|
|
@@ -547,7 +43,7 @@ declare const TestDefinitionSchema: z.ZodObject<{
|
|
|
547
43
|
name: z.ZodString;
|
|
548
44
|
target: z.ZodString;
|
|
549
45
|
context: z.ZodOptional<z.ZodString>;
|
|
550
|
-
use: z.ZodOptional<z.ZodObject<{
|
|
46
|
+
use: z.ZodOptional<z.ZodPipe<z.ZodAny, z.ZodObject<{
|
|
551
47
|
browser: z.ZodOptional<z.ZodObject<{
|
|
552
48
|
name: z.ZodOptional<z.ZodEnum<{
|
|
553
49
|
chromium: "chromium";
|
|
@@ -565,11 +61,9 @@ declare const TestDefinitionSchema: z.ZodObject<{
|
|
|
565
61
|
test: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<number, string>>>;
|
|
566
62
|
navigation: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<number, string>>>;
|
|
567
63
|
}, z.core.$strict>>;
|
|
568
|
-
healing: z.ZodOptional<z.ZodObject<{
|
|
569
|
-
maxAttempts: z.ZodOptional<z.ZodNumber>;
|
|
570
|
-
}, z.core.$strict>>;
|
|
571
64
|
planner: z.ZodOptional<z.ZodObject<{
|
|
572
|
-
|
|
65
|
+
maxActions: z.ZodOptional<z.ZodNumber>;
|
|
66
|
+
maxPlanningTurns: z.ZodOptional<z.ZodNumber>;
|
|
573
67
|
previousStepCount: z.ZodOptional<z.ZodNumber>;
|
|
574
68
|
}, z.core.$strict>>;
|
|
575
69
|
logCapture: z.ZodOptional<z.ZodObject<{
|
|
@@ -590,8 +84,9 @@ declare const TestDefinitionSchema: z.ZodObject<{
|
|
|
590
84
|
}, z.core.$strict>>;
|
|
591
85
|
llm: z.ZodOptional<z.ZodString>;
|
|
592
86
|
parallel: z.ZodOptional<z.ZodBoolean>;
|
|
87
|
+
workers: z.ZodOptional<z.ZodNumber>;
|
|
593
88
|
device: z.ZodOptional<z.ZodString>;
|
|
594
|
-
}, z.core.$strict
|
|
89
|
+
}, z.core.$strict>>>;
|
|
595
90
|
meta: z.ZodOptional<z.ZodObject<{
|
|
596
91
|
timeout: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<number, string>>>;
|
|
597
92
|
retries: z.ZodOptional<z.ZodNumber>;
|
|
@@ -615,7 +110,6 @@ declare const TestDefinitionSchema: z.ZodObject<{
|
|
|
615
110
|
selector: z.ZodOptional<z.ZodString>;
|
|
616
111
|
description: z.ZodOptional<z.ZodString>;
|
|
617
112
|
}, z.core.$strict>>;
|
|
618
|
-
maxAttempts: z.ZodOptional<z.ZodNumber>;
|
|
619
113
|
}, z.core.$strict>]>>;
|
|
620
114
|
}, z.core.$strict>;
|
|
621
115
|
|
|
@@ -672,11 +166,9 @@ declare const UseSchema: z.ZodObject<{
|
|
|
672
166
|
test: z.ZodPipe<z.ZodString, z.ZodTransform<number, string>>;
|
|
673
167
|
navigation: z.ZodPipe<z.ZodString, z.ZodTransform<number, string>>;
|
|
674
168
|
}, z.core.$strict>>;
|
|
675
|
-
healing: z.ZodOptional<z.ZodObject<{
|
|
676
|
-
maxAttempts: z.ZodNumber;
|
|
677
|
-
}, z.core.$strict>>;
|
|
678
169
|
planner: z.ZodOptional<z.ZodObject<{
|
|
679
|
-
|
|
170
|
+
maxActions: z.ZodOptional<z.ZodNumber>;
|
|
171
|
+
maxPlanningTurns: z.ZodOptional<z.ZodNumber>;
|
|
680
172
|
previousStepCount: z.ZodNumber;
|
|
681
173
|
}, z.core.$strict>>;
|
|
682
174
|
logCapture: z.ZodOptional<z.ZodObject<{
|
|
@@ -685,7 +177,9 @@ declare const UseSchema: z.ZodObject<{
|
|
|
685
177
|
}, z.core.$strict>>;
|
|
686
178
|
cache: z.ZodOptional<z.ZodBoolean>;
|
|
687
179
|
llm: z.ZodOptional<z.ZodString>;
|
|
180
|
+
buildTag: z.ZodOptional<z.ZodString>;
|
|
688
181
|
parallel: z.ZodOptional<z.ZodBoolean>;
|
|
182
|
+
workers: z.ZodOptional<z.ZodNumber>;
|
|
689
183
|
}, z.core.$strict>;
|
|
690
184
|
declare const UseOverrideSchema: z.ZodObject<{
|
|
691
185
|
browser: z.ZodOptional<z.ZodObject<{
|
|
@@ -705,11 +199,9 @@ declare const UseOverrideSchema: z.ZodObject<{
|
|
|
705
199
|
test: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<number, string>>>;
|
|
706
200
|
navigation: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<number, string>>>;
|
|
707
201
|
}, z.core.$strict>>;
|
|
708
|
-
healing: z.ZodOptional<z.ZodObject<{
|
|
709
|
-
maxAttempts: z.ZodOptional<z.ZodNumber>;
|
|
710
|
-
}, z.core.$strict>>;
|
|
711
202
|
planner: z.ZodOptional<z.ZodObject<{
|
|
712
|
-
|
|
203
|
+
maxActions: z.ZodOptional<z.ZodNumber>;
|
|
204
|
+
maxPlanningTurns: z.ZodOptional<z.ZodNumber>;
|
|
713
205
|
previousStepCount: z.ZodOptional<z.ZodNumber>;
|
|
714
206
|
}, z.core.$strict>>;
|
|
715
207
|
logCapture: z.ZodOptional<z.ZodObject<{
|
|
@@ -730,6 +222,7 @@ declare const UseOverrideSchema: z.ZodObject<{
|
|
|
730
222
|
}, z.core.$strict>>;
|
|
731
223
|
llm: z.ZodOptional<z.ZodString>;
|
|
732
224
|
parallel: z.ZodOptional<z.ZodBoolean>;
|
|
225
|
+
workers: z.ZodOptional<z.ZodNumber>;
|
|
733
226
|
device: z.ZodOptional<z.ZodString>;
|
|
734
227
|
}, z.core.$strict>;
|
|
735
228
|
|
|
@@ -744,7 +237,6 @@ declare const WorkspaceSchema: z.ZodObject<{
|
|
|
744
237
|
suiteMatch: z.ZodArray<z.ZodString>;
|
|
745
238
|
testPathIgnore: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
746
239
|
hooksFile: z.ZodString;
|
|
747
|
-
agentRules: z.ZodString;
|
|
748
240
|
envFile: z.ZodString;
|
|
749
241
|
secretsFile: z.ZodString;
|
|
750
242
|
}, z.core.$strict>;
|
|
@@ -753,14 +245,29 @@ declare const DashboardConfigSchema: z.ZodObject<{
|
|
|
753
245
|
port: z.ZodOptional<z.ZodNumber>;
|
|
754
246
|
dbPath: z.ZodOptional<z.ZodString>;
|
|
755
247
|
artifactsDir: z.ZodOptional<z.ZodString>;
|
|
248
|
+
baseUrl: z.ZodOptional<z.ZodString>;
|
|
249
|
+
workspace: z.ZodOptional<z.ZodString>;
|
|
250
|
+
host: z.ZodOptional<z.ZodString>;
|
|
756
251
|
}, z.core.$strict>;
|
|
252
|
+
/**
|
|
253
|
+
* THE ONE MEMBER SET FOR "this host is loopback" (402-05 D-07 — T-402-18).
|
|
254
|
+
*
|
|
255
|
+
* Exported because two mechanisms now decide loopback membership and they must not be two
|
|
256
|
+
* spellings: `LoopbackHostSchema` below refuses a non-loopback MCP host at PARSE time, and
|
|
257
|
+
* `startServer`'s pre-listen bind guard refuses a non-loopback DASHBOARD host at RUNTIME, with no
|
|
258
|
+
* exemption. A second literal list would let the two drift, and the direction it would drift in is
|
|
259
|
+
* a host one mechanism calls loopback and the other does not.
|
|
260
|
+
*/
|
|
261
|
+
declare const LOOPBACK_HOSTS: readonly string[];
|
|
262
|
+
/** Whether a configured host names a loopback interface. The one predicate over the one set. */
|
|
263
|
+
declare function isLoopbackHost(host: string): boolean;
|
|
757
264
|
declare const McpConfigSchema: z.ZodObject<{
|
|
758
265
|
enabled: z.ZodOptional<z.ZodBoolean>;
|
|
759
266
|
transport: z.ZodOptional<z.ZodEnum<{
|
|
760
267
|
http: "http";
|
|
761
268
|
stdio: "stdio";
|
|
762
269
|
}>>;
|
|
763
|
-
host: z.ZodOptional<z.ZodString
|
|
270
|
+
host: z.ZodOptional<z.ZodString>;
|
|
764
271
|
port: z.ZodOptional<z.ZodNumber>;
|
|
765
272
|
path: z.ZodOptional<z.ZodString>;
|
|
766
273
|
}, z.core.$strict>;
|
|
@@ -773,15 +280,16 @@ declare const AuthStateConfigSchema: z.ZodObject<{
|
|
|
773
280
|
}, z.core.$strict>;
|
|
774
281
|
declare const LoggingConfigSchema: z.ZodObject<{
|
|
775
282
|
level: z.ZodEnum<{
|
|
776
|
-
info: "info";
|
|
777
|
-
warn: "warn";
|
|
778
283
|
error: "error";
|
|
779
284
|
silent: "silent";
|
|
285
|
+
warn: "warn";
|
|
286
|
+
info: "info";
|
|
780
287
|
debug: "debug";
|
|
781
288
|
}>;
|
|
782
289
|
}, z.core.$strict>;
|
|
783
290
|
declare const RecordingConfigSchema: z.ZodObject<{
|
|
784
|
-
enabled: z.
|
|
291
|
+
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
292
|
+
keepFailuresOnly: z.ZodOptional<z.ZodBoolean>;
|
|
785
293
|
}, z.core.$strict>;
|
|
786
294
|
declare const AccessibilityConfigSchema: z.ZodObject<{
|
|
787
295
|
enabled: z.ZodBoolean;
|
|
@@ -804,6 +312,9 @@ declare const ServicesSchema: z.ZodObject<{
|
|
|
804
312
|
port: z.ZodOptional<z.ZodNumber>;
|
|
805
313
|
dbPath: z.ZodOptional<z.ZodString>;
|
|
806
314
|
artifactsDir: z.ZodOptional<z.ZodString>;
|
|
315
|
+
baseUrl: z.ZodOptional<z.ZodString>;
|
|
316
|
+
workspace: z.ZodOptional<z.ZodString>;
|
|
317
|
+
host: z.ZodOptional<z.ZodString>;
|
|
807
318
|
}, z.core.$strict>>;
|
|
808
319
|
mcp: z.ZodOptional<z.ZodObject<{
|
|
809
320
|
enabled: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -811,7 +322,7 @@ declare const ServicesSchema: z.ZodObject<{
|
|
|
811
322
|
http: "http";
|
|
812
323
|
stdio: "stdio";
|
|
813
324
|
}>>;
|
|
814
|
-
host: z.ZodOptional<z.ZodString
|
|
325
|
+
host: z.ZodOptional<z.ZodString>;
|
|
815
326
|
port: z.ZodOptional<z.ZodNumber>;
|
|
816
327
|
path: z.ZodOptional<z.ZodString>;
|
|
817
328
|
}, z.core.$strict>>;
|
|
@@ -824,16 +335,17 @@ declare const ServicesSchema: z.ZodObject<{
|
|
|
824
335
|
}, z.core.$strict>>;
|
|
825
336
|
logging: z.ZodOptional<z.ZodObject<{
|
|
826
337
|
level: z.ZodEnum<{
|
|
827
|
-
info: "info";
|
|
828
|
-
warn: "warn";
|
|
829
338
|
error: "error";
|
|
830
339
|
silent: "silent";
|
|
340
|
+
warn: "warn";
|
|
341
|
+
info: "info";
|
|
831
342
|
debug: "debug";
|
|
832
343
|
}>;
|
|
833
344
|
}, z.core.$strict>>;
|
|
834
|
-
recording: z.ZodOptional<z.ZodObject<{
|
|
835
|
-
enabled: z.
|
|
836
|
-
|
|
345
|
+
recording: z.ZodOptional<z.ZodPrefault<z.ZodObject<{
|
|
346
|
+
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
347
|
+
keepFailuresOnly: z.ZodOptional<z.ZodBoolean>;
|
|
348
|
+
}, z.core.$strict>>>;
|
|
837
349
|
accessibility: z.ZodOptional<z.ZodObject<{
|
|
838
350
|
enabled: z.ZodBoolean;
|
|
839
351
|
standard: z.ZodOptional<z.ZodEnum<{
|
|
@@ -850,26 +362,21 @@ declare const ServicesSchema: z.ZodObject<{
|
|
|
850
362
|
disableRules: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
851
363
|
exclude: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
852
364
|
}, z.core.$strict>>;
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
local: "local";
|
|
857
|
-
}>>>;
|
|
858
|
-
dir: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
859
|
-
minTrust: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
860
|
-
maxInjections: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
861
|
-
curatorEnabled: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
862
|
-
curatorLockTimeout: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
863
|
-
trustConfirmDelta: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
864
|
-
trustContradictDelta: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
865
|
-
ablationEnabled: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
866
|
-
circuitBreakerEnabled: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
867
|
-
circuitBreakerWindowSize: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
868
|
-
circuitBreakerBaselineSize: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
869
|
-
circuitBreakerThreshold: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
365
|
+
vision: z.ZodOptional<z.ZodObject<{
|
|
366
|
+
screenshotSize: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<number, string>>>;
|
|
367
|
+
effectiveResolution: z.ZodOptional<z.ZodNumber>;
|
|
870
368
|
}, z.core.$strict>>;
|
|
871
369
|
}, z.core.$strict>;
|
|
872
370
|
|
|
371
|
+
declare const KnowledgeConfigSchema: z.ZodObject<{
|
|
372
|
+
dir: z.ZodDefault<z.ZodString>;
|
|
373
|
+
commitArtifacts: z.ZodDefault<z.ZodEnum<{
|
|
374
|
+
none: "none";
|
|
375
|
+
thumbnails: "thumbnails";
|
|
376
|
+
}>>;
|
|
377
|
+
contextBudgetTokens: z.ZodOptional<z.ZodNumber>;
|
|
378
|
+
}, z.core.$strict>;
|
|
379
|
+
|
|
873
380
|
declare const TargetSchema: z.ZodObject<{
|
|
874
381
|
product: z.ZodOptional<z.ZodString>;
|
|
875
382
|
platform: z.ZodEnum<{
|
|
@@ -885,6 +392,11 @@ declare const TargetSchema: z.ZodObject<{
|
|
|
885
392
|
browserstack: z.ZodOptional<z.ZodString>;
|
|
886
393
|
}, z.core.$strict>>;
|
|
887
394
|
url: z.ZodOptional<z.ZodString>;
|
|
395
|
+
environment: z.ZodOptional<z.ZodEnum<{
|
|
396
|
+
local: "local";
|
|
397
|
+
shared: "shared";
|
|
398
|
+
production: "production";
|
|
399
|
+
}>>;
|
|
888
400
|
}, z.core.$strict>;
|
|
889
401
|
declare const DeviceProfileSchema: z.ZodObject<{
|
|
890
402
|
platform: z.ZodEnum<{
|
|
@@ -904,8 +416,7 @@ declare const RegistrySchema: z.ZodObject<{
|
|
|
904
416
|
model: z.ZodString;
|
|
905
417
|
baseURL: z.ZodOptional<z.ZodString>;
|
|
906
418
|
providerHeaders: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
907
|
-
|
|
908
|
-
effectiveResolution: z.ZodOptional<z.ZodNumber>;
|
|
419
|
+
vision: z.ZodDefault<z.ZodBoolean>;
|
|
909
420
|
name: z.ZodString;
|
|
910
421
|
contextWindow: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<number, string>>>;
|
|
911
422
|
}, z.core.$strict>>>>;
|
|
@@ -924,6 +435,11 @@ declare const RegistrySchema: z.ZodObject<{
|
|
|
924
435
|
browserstack: z.ZodOptional<z.ZodString>;
|
|
925
436
|
}, z.core.$strict>>;
|
|
926
437
|
url: z.ZodOptional<z.ZodString>;
|
|
438
|
+
environment: z.ZodOptional<z.ZodEnum<{
|
|
439
|
+
local: "local";
|
|
440
|
+
shared: "shared";
|
|
441
|
+
production: "production";
|
|
442
|
+
}>>;
|
|
927
443
|
}, z.core.$strict>>>;
|
|
928
444
|
devices: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
929
445
|
platform: z.ZodEnum<{
|
|
@@ -955,22 +471,18 @@ declare const ModelConfigSchema: z.ZodObject<{
|
|
|
955
471
|
model: z.ZodString;
|
|
956
472
|
baseURL: z.ZodOptional<z.ZodString>;
|
|
957
473
|
providerHeaders: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
958
|
-
|
|
959
|
-
effectiveResolution: z.ZodOptional<z.ZodNumber>;
|
|
474
|
+
vision: z.ZodDefault<z.ZodBoolean>;
|
|
960
475
|
}, z.core.$strict>;
|
|
476
|
+
declare const NameSlugSchema: z.ZodString;
|
|
961
477
|
declare const NamedLLMConfigSchema: z.ZodObject<{
|
|
962
478
|
provider: z.ZodString;
|
|
963
479
|
model: z.ZodString;
|
|
964
480
|
baseURL: z.ZodOptional<z.ZodString>;
|
|
965
481
|
providerHeaders: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
966
|
-
|
|
967
|
-
effectiveResolution: z.ZodOptional<z.ZodNumber>;
|
|
482
|
+
vision: z.ZodDefault<z.ZodBoolean>;
|
|
968
483
|
name: z.ZodString;
|
|
969
484
|
contextWindow: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<number, string>>>;
|
|
970
485
|
}, z.core.$strict>;
|
|
971
|
-
declare const HealingConfigSchema: z.ZodObject<{
|
|
972
|
-
maxAttempts: z.ZodNumber;
|
|
973
|
-
}, z.core.$strict>;
|
|
974
486
|
declare const TimeoutConfigSchema: z.ZodObject<{
|
|
975
487
|
step: z.ZodPipe<z.ZodString, z.ZodTransform<number, string>>;
|
|
976
488
|
test: z.ZodPipe<z.ZodString, z.ZodTransform<number, string>>;
|
|
@@ -993,7 +505,8 @@ declare const TransportSchema: z.ZodEnum<{
|
|
|
993
505
|
browserstack: "browserstack";
|
|
994
506
|
}>;
|
|
995
507
|
declare const PlannerConfigSchema: z.ZodObject<{
|
|
996
|
-
|
|
508
|
+
maxActions: z.ZodOptional<z.ZodNumber>;
|
|
509
|
+
maxPlanningTurns: z.ZodOptional<z.ZodNumber>;
|
|
997
510
|
previousStepCount: z.ZodNumber;
|
|
998
511
|
}, z.core.$strict>;
|
|
999
512
|
declare const LogCaptureConfigSchema: z.ZodObject<{
|
|
@@ -1006,28 +519,40 @@ declare const AuthPluginDeclarationSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
|
1006
519
|
}, z.core.$strict>, z.ZodObject<{
|
|
1007
520
|
path: z.ZodString;
|
|
1008
521
|
}, z.core.$strict>]>;
|
|
522
|
+
declare const ProviderPluginDeclarationSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
523
|
+
package: z.ZodString;
|
|
524
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
525
|
+
path: z.ZodString;
|
|
526
|
+
}, z.core.$strict>]>;
|
|
1009
527
|
declare const PluginsSchema: z.ZodObject<{
|
|
1010
528
|
auth: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
|
|
1011
529
|
package: z.ZodString;
|
|
1012
530
|
}, z.core.$strict>, z.ZodObject<{
|
|
1013
531
|
path: z.ZodString;
|
|
1014
532
|
}, z.core.$strict>]>>>>;
|
|
533
|
+
providers: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
|
|
534
|
+
package: z.ZodString;
|
|
535
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
536
|
+
path: z.ZodString;
|
|
537
|
+
}, z.core.$strict>]>>>>;
|
|
1015
538
|
}, z.core.$strict>;
|
|
1016
|
-
declare const AgentQaConfigSchema: z.ZodObject<{
|
|
539
|
+
declare const AgentQaConfigSchema: z.ZodPipe<z.ZodAny, z.ZodObject<{
|
|
1017
540
|
workspace: z.ZodObject<{
|
|
1018
541
|
testMatch: z.ZodArray<z.ZodString>;
|
|
1019
542
|
suiteMatch: z.ZodArray<z.ZodString>;
|
|
1020
543
|
testPathIgnore: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
1021
544
|
hooksFile: z.ZodString;
|
|
1022
|
-
agentRules: z.ZodString;
|
|
1023
545
|
envFile: z.ZodString;
|
|
1024
546
|
secretsFile: z.ZodString;
|
|
1025
547
|
}, z.core.$strict>;
|
|
1026
|
-
services: z.ZodOptional<z.ZodObject<{
|
|
548
|
+
services: z.ZodOptional<z.ZodPrefault<z.ZodObject<{
|
|
1027
549
|
dashboard: z.ZodOptional<z.ZodObject<{
|
|
1028
550
|
port: z.ZodOptional<z.ZodNumber>;
|
|
1029
551
|
dbPath: z.ZodOptional<z.ZodString>;
|
|
1030
552
|
artifactsDir: z.ZodOptional<z.ZodString>;
|
|
553
|
+
baseUrl: z.ZodOptional<z.ZodString>;
|
|
554
|
+
workspace: z.ZodOptional<z.ZodString>;
|
|
555
|
+
host: z.ZodOptional<z.ZodString>;
|
|
1031
556
|
}, z.core.$strict>>;
|
|
1032
557
|
mcp: z.ZodOptional<z.ZodObject<{
|
|
1033
558
|
enabled: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -1035,7 +560,7 @@ declare const AgentQaConfigSchema: z.ZodObject<{
|
|
|
1035
560
|
http: "http";
|
|
1036
561
|
stdio: "stdio";
|
|
1037
562
|
}>>;
|
|
1038
|
-
host: z.ZodOptional<z.ZodString
|
|
563
|
+
host: z.ZodOptional<z.ZodString>;
|
|
1039
564
|
port: z.ZodOptional<z.ZodNumber>;
|
|
1040
565
|
path: z.ZodOptional<z.ZodString>;
|
|
1041
566
|
}, z.core.$strict>>;
|
|
@@ -1048,16 +573,17 @@ declare const AgentQaConfigSchema: z.ZodObject<{
|
|
|
1048
573
|
}, z.core.$strict>>;
|
|
1049
574
|
logging: z.ZodOptional<z.ZodObject<{
|
|
1050
575
|
level: z.ZodEnum<{
|
|
1051
|
-
info: "info";
|
|
1052
|
-
warn: "warn";
|
|
1053
576
|
error: "error";
|
|
1054
577
|
silent: "silent";
|
|
578
|
+
warn: "warn";
|
|
579
|
+
info: "info";
|
|
1055
580
|
debug: "debug";
|
|
1056
581
|
}>;
|
|
1057
582
|
}, z.core.$strict>>;
|
|
1058
|
-
recording: z.ZodOptional<z.ZodObject<{
|
|
1059
|
-
enabled: z.
|
|
1060
|
-
|
|
583
|
+
recording: z.ZodOptional<z.ZodPrefault<z.ZodObject<{
|
|
584
|
+
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
585
|
+
keepFailuresOnly: z.ZodOptional<z.ZodBoolean>;
|
|
586
|
+
}, z.core.$strict>>>;
|
|
1061
587
|
accessibility: z.ZodOptional<z.ZodObject<{
|
|
1062
588
|
enabled: z.ZodBoolean;
|
|
1063
589
|
standard: z.ZodOptional<z.ZodEnum<{
|
|
@@ -1074,24 +600,18 @@ declare const AgentQaConfigSchema: z.ZodObject<{
|
|
|
1074
600
|
disableRules: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
1075
601
|
exclude: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
1076
602
|
}, z.core.$strict>>;
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
local: "local";
|
|
1081
|
-
}>>>;
|
|
1082
|
-
dir: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
1083
|
-
minTrust: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
1084
|
-
maxInjections: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
1085
|
-
curatorEnabled: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
1086
|
-
curatorLockTimeout: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
1087
|
-
trustConfirmDelta: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
1088
|
-
trustContradictDelta: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
1089
|
-
ablationEnabled: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
1090
|
-
circuitBreakerEnabled: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
1091
|
-
circuitBreakerWindowSize: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
1092
|
-
circuitBreakerBaselineSize: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
1093
|
-
circuitBreakerThreshold: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
603
|
+
vision: z.ZodOptional<z.ZodObject<{
|
|
604
|
+
screenshotSize: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<number, string>>>;
|
|
605
|
+
effectiveResolution: z.ZodOptional<z.ZodNumber>;
|
|
1094
606
|
}, z.core.$strict>>;
|
|
607
|
+
}, z.core.$strict>>>;
|
|
608
|
+
knowledge: z.ZodPrefault<z.ZodObject<{
|
|
609
|
+
dir: z.ZodDefault<z.ZodString>;
|
|
610
|
+
commitArtifacts: z.ZodDefault<z.ZodEnum<{
|
|
611
|
+
none: "none";
|
|
612
|
+
thumbnails: "thumbnails";
|
|
613
|
+
}>>;
|
|
614
|
+
contextBudgetTokens: z.ZodOptional<z.ZodNumber>;
|
|
1095
615
|
}, z.core.$strict>>;
|
|
1096
616
|
registry: z.ZodOptional<z.ZodObject<{
|
|
1097
617
|
llms: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
@@ -1099,8 +619,7 @@ declare const AgentQaConfigSchema: z.ZodObject<{
|
|
|
1099
619
|
model: z.ZodString;
|
|
1100
620
|
baseURL: z.ZodOptional<z.ZodString>;
|
|
1101
621
|
providerHeaders: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
1102
|
-
|
|
1103
|
-
effectiveResolution: z.ZodOptional<z.ZodNumber>;
|
|
622
|
+
vision: z.ZodDefault<z.ZodBoolean>;
|
|
1104
623
|
name: z.ZodString;
|
|
1105
624
|
contextWindow: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<number, string>>>;
|
|
1106
625
|
}, z.core.$strict>>>>;
|
|
@@ -1119,6 +638,11 @@ declare const AgentQaConfigSchema: z.ZodObject<{
|
|
|
1119
638
|
browserstack: z.ZodOptional<z.ZodString>;
|
|
1120
639
|
}, z.core.$strict>>;
|
|
1121
640
|
url: z.ZodOptional<z.ZodString>;
|
|
641
|
+
environment: z.ZodOptional<z.ZodEnum<{
|
|
642
|
+
local: "local";
|
|
643
|
+
shared: "shared";
|
|
644
|
+
production: "production";
|
|
645
|
+
}>>;
|
|
1122
646
|
}, z.core.$strict>>>;
|
|
1123
647
|
devices: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
1124
648
|
platform: z.ZodEnum<{
|
|
@@ -1157,11 +681,9 @@ declare const AgentQaConfigSchema: z.ZodObject<{
|
|
|
1157
681
|
test: z.ZodPipe<z.ZodString, z.ZodTransform<number, string>>;
|
|
1158
682
|
navigation: z.ZodPipe<z.ZodString, z.ZodTransform<number, string>>;
|
|
1159
683
|
}, z.core.$strict>>;
|
|
1160
|
-
healing: z.ZodOptional<z.ZodObject<{
|
|
1161
|
-
maxAttempts: z.ZodNumber;
|
|
1162
|
-
}, z.core.$strict>>;
|
|
1163
684
|
planner: z.ZodOptional<z.ZodObject<{
|
|
1164
|
-
|
|
685
|
+
maxActions: z.ZodOptional<z.ZodNumber>;
|
|
686
|
+
maxPlanningTurns: z.ZodOptional<z.ZodNumber>;
|
|
1165
687
|
previousStepCount: z.ZodNumber;
|
|
1166
688
|
}, z.core.$strict>>;
|
|
1167
689
|
logCapture: z.ZodOptional<z.ZodObject<{
|
|
@@ -1170,7 +692,9 @@ declare const AgentQaConfigSchema: z.ZodObject<{
|
|
|
1170
692
|
}, z.core.$strict>>;
|
|
1171
693
|
cache: z.ZodOptional<z.ZodBoolean>;
|
|
1172
694
|
llm: z.ZodOptional<z.ZodString>;
|
|
695
|
+
buildTag: z.ZodOptional<z.ZodString>;
|
|
1173
696
|
parallel: z.ZodOptional<z.ZodBoolean>;
|
|
697
|
+
workers: z.ZodOptional<z.ZodNumber>;
|
|
1174
698
|
}, z.core.$strict>>;
|
|
1175
699
|
plugins: z.ZodOptional<z.ZodObject<{
|
|
1176
700
|
auth: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
|
|
@@ -1178,6 +702,11 @@ declare const AgentQaConfigSchema: z.ZodObject<{
|
|
|
1178
702
|
}, z.core.$strict>, z.ZodObject<{
|
|
1179
703
|
path: z.ZodString;
|
|
1180
704
|
}, z.core.$strict>]>>>>;
|
|
705
|
+
providers: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
|
|
706
|
+
package: z.ZodString;
|
|
707
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
708
|
+
path: z.ZodString;
|
|
709
|
+
}, z.core.$strict>]>>>>;
|
|
1181
710
|
}, z.core.$strict>>;
|
|
1182
711
|
analytics: z.ZodOptional<z.ZodObject<{
|
|
1183
712
|
privacy: z.ZodOptional<z.ZodLiteral<true>>;
|
|
@@ -1187,7 +716,31 @@ declare const AgentQaConfigSchema: z.ZodObject<{
|
|
|
1187
716
|
}, z.core.$strict>]>>>;
|
|
1188
717
|
}, z.core.$strict>>;
|
|
1189
718
|
}, z.core.$strict>>;
|
|
1190
|
-
|
|
719
|
+
allowProduction: z.ZodOptional<z.ZodBoolean>;
|
|
720
|
+
eval: z.ZodOptional<z.ZodObject<{
|
|
721
|
+
judge: z.ZodOptional<z.ZodString>;
|
|
722
|
+
judges: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
723
|
+
judgeAllowSameFamily: z.ZodOptional<z.ZodBoolean>;
|
|
724
|
+
k: z.ZodOptional<z.ZodNumber>;
|
|
725
|
+
seed: z.ZodOptional<z.ZodNumber>;
|
|
726
|
+
gate1: z.ZodOptional<z.ZodObject<{
|
|
727
|
+
maxScreens: z.ZodOptional<z.ZodNumber>;
|
|
728
|
+
maxPerJob: z.ZodOptional<z.ZodNumber>;
|
|
729
|
+
}, z.core.$strict>>;
|
|
730
|
+
gate2: z.ZodOptional<z.ZodObject<{
|
|
731
|
+
maxAblations: z.ZodOptional<z.ZodNumber>;
|
|
732
|
+
canaryHorizonBuilds: z.ZodOptional<z.ZodNumber>;
|
|
733
|
+
maxLowerTrustPerScope: z.ZodOptional<z.ZodNumber>;
|
|
734
|
+
}, z.core.$strict>>;
|
|
735
|
+
adversarial: z.ZodOptional<z.ZodObject<{
|
|
736
|
+
maxSeedsPerRefresh: z.ZodOptional<z.ZodNumber>;
|
|
737
|
+
maxProbeCalls: z.ZodOptional<z.ZodNumber>;
|
|
738
|
+
}, z.core.$strict>>;
|
|
739
|
+
seeding: z.ZodOptional<z.ZodObject<{
|
|
740
|
+
silverPerTestCap: z.ZodOptional<z.ZodNumber>;
|
|
741
|
+
}, z.core.$strict>>;
|
|
742
|
+
}, z.core.$strict>>;
|
|
743
|
+
}, z.core.$strict>>;
|
|
1191
744
|
|
|
1192
745
|
type AgentQaConfig = z.infer<typeof AgentQaConfigSchema>;
|
|
1193
746
|
type WorkspaceConfig = z.infer<typeof WorkspaceSchema>;
|
|
@@ -1206,6 +759,16 @@ declare const ActionPlanSchema: z.ZodObject<{
|
|
|
1206
759
|
}, z.core.$strip>;
|
|
1207
760
|
type ActionPlan = z.infer<typeof ActionPlanSchema>;
|
|
1208
761
|
|
|
762
|
+
/**
|
|
763
|
+
* Resolve the repo-relative directory validated by KnowledgeConfigSchema. `configDir` is the
|
|
764
|
+
* directory containing agent-qa.config.yaml (the repository root by the committed-root
|
|
765
|
+
* convention). Composition roots call this helper; Phase 374 has no live producer, so the first
|
|
766
|
+
* runtime caller is Phase 378's Curator binding (D-01/D-14).
|
|
767
|
+
*/
|
|
768
|
+
declare function resolveKnowledgeRoot(knowledge: {
|
|
769
|
+
dir: string;
|
|
770
|
+
}, configDir: string): string;
|
|
771
|
+
|
|
1209
772
|
declare const SuiteTestEntrySchema: z.ZodObject<{
|
|
1210
773
|
test: z.ZodString;
|
|
1211
774
|
id: z.ZodString;
|
|
@@ -1221,7 +784,7 @@ declare const SuiteDefinitionSchema: z.ZodObject<{
|
|
|
1221
784
|
test: z.ZodString;
|
|
1222
785
|
id: z.ZodString;
|
|
1223
786
|
}, z.core.$strict>>;
|
|
1224
|
-
use: z.ZodOptional<z.ZodObject<{
|
|
787
|
+
use: z.ZodOptional<z.ZodPipe<z.ZodAny, z.ZodObject<{
|
|
1225
788
|
browser: z.ZodOptional<z.ZodObject<{
|
|
1226
789
|
name: z.ZodOptional<z.ZodEnum<{
|
|
1227
790
|
chromium: "chromium";
|
|
@@ -1239,11 +802,9 @@ declare const SuiteDefinitionSchema: z.ZodObject<{
|
|
|
1239
802
|
test: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<number, string>>>;
|
|
1240
803
|
navigation: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<number, string>>>;
|
|
1241
804
|
}, z.core.$strict>>;
|
|
1242
|
-
healing: z.ZodOptional<z.ZodObject<{
|
|
1243
|
-
maxAttempts: z.ZodOptional<z.ZodNumber>;
|
|
1244
|
-
}, z.core.$strict>>;
|
|
1245
805
|
planner: z.ZodOptional<z.ZodObject<{
|
|
1246
|
-
|
|
806
|
+
maxActions: z.ZodOptional<z.ZodNumber>;
|
|
807
|
+
maxPlanningTurns: z.ZodOptional<z.ZodNumber>;
|
|
1247
808
|
previousStepCount: z.ZodOptional<z.ZodNumber>;
|
|
1248
809
|
}, z.core.$strict>>;
|
|
1249
810
|
logCapture: z.ZodOptional<z.ZodObject<{
|
|
@@ -1264,8 +825,9 @@ declare const SuiteDefinitionSchema: z.ZodObject<{
|
|
|
1264
825
|
}, z.core.$strict>>;
|
|
1265
826
|
llm: z.ZodOptional<z.ZodString>;
|
|
1266
827
|
parallel: z.ZodOptional<z.ZodBoolean>;
|
|
828
|
+
workers: z.ZodOptional<z.ZodNumber>;
|
|
1267
829
|
device: z.ZodOptional<z.ZodString>;
|
|
1268
|
-
}, z.core.$strict
|
|
830
|
+
}, z.core.$strict>>>;
|
|
1269
831
|
}, z.core.$strict>;
|
|
1270
832
|
|
|
1271
833
|
declare const HookDefinitionSchema: z.ZodObject<{
|
|
@@ -1320,11 +882,26 @@ interface ParseResult {
|
|
|
1320
882
|
tests: TestDefinition[];
|
|
1321
883
|
errors: ParseError[];
|
|
1322
884
|
}
|
|
1323
|
-
|
|
1324
|
-
|
|
1325
|
-
|
|
1326
|
-
|
|
1327
|
-
|
|
885
|
+
/**
|
|
886
|
+
* One parsed test paired with the exact source that produced it. ABRF-02 stable identity is
|
|
887
|
+
* `filePath + test.name`; the legacy flattened parse result cannot retain that association and
|
|
888
|
+
* caused multi-file direct runs to stamp every member with the first discovered file (CR-02).
|
|
889
|
+
*/
|
|
890
|
+
interface ParsedTestBinding {
|
|
891
|
+
test: TestDefinition;
|
|
892
|
+
filePath: string;
|
|
893
|
+
fileContent: string;
|
|
894
|
+
}
|
|
895
|
+
interface ParseAllTestBindingsResult {
|
|
896
|
+
bindings: ParsedTestBinding[];
|
|
897
|
+
errors: ParseError[];
|
|
898
|
+
}
|
|
899
|
+
declare function parseTestFile(content: string, filePath: string): ParseResult;
|
|
900
|
+
declare function parseAllTestBindings(filePaths: string[]): Promise<ParseAllTestBindingsResult>;
|
|
901
|
+
declare function parseAllTests(filePaths: string[]): Promise<ParseResult>;
|
|
902
|
+
|
|
903
|
+
interface FileAttachment {
|
|
904
|
+
name: string;
|
|
1328
905
|
path: string;
|
|
1329
906
|
content: Buffer;
|
|
1330
907
|
mimeType: string;
|
|
@@ -1346,167 +923,92 @@ interface SuiteResult {
|
|
|
1346
923
|
|
|
1347
924
|
declare function parseSuiteFile(filePath: string): Promise<SuiteDefinition>;
|
|
1348
925
|
|
|
1349
|
-
|
|
1350
|
-
|
|
1351
|
-
|
|
1352
|
-
|
|
1353
|
-
|
|
1354
|
-
|
|
1355
|
-
|
|
1356
|
-
|
|
1357
|
-
|
|
1358
|
-
|
|
1359
|
-
|
|
1360
|
-
|
|
1361
|
-
|
|
1362
|
-
|
|
1363
|
-
|
|
1364
|
-
|
|
1365
|
-
|
|
1366
|
-
|
|
1367
|
-
|
|
1368
|
-
|
|
1369
|
-
|
|
1370
|
-
|
|
1371
|
-
|
|
1372
|
-
|
|
1373
|
-
interface ScopedLogger {
|
|
1374
|
-
debug(msg: string, data?: Record<string, unknown>): void;
|
|
1375
|
-
info(msg: string, data?: Record<string, unknown>): void;
|
|
1376
|
-
warn(msg: string, data?: Record<string, unknown>): void;
|
|
1377
|
-
error(msg: string, data?: Record<string, unknown>): void;
|
|
1378
|
-
}
|
|
1379
|
-
declare const AgentLogDataSchema: z.ZodObject<{
|
|
1380
|
-
extractDom: z.ZodOptional<z.ZodBoolean>;
|
|
1381
|
-
hasScreenshot: z.ZodOptional<z.ZodBoolean>;
|
|
1382
|
-
duration: z.ZodOptional<z.ZodNumber>;
|
|
1383
|
-
elementCount: z.ZodOptional<z.ZodNumber>;
|
|
1384
|
-
}, z.core.$strip>;
|
|
1385
|
-
declare const AdapterLogDataSchema: z.ZodObject<{
|
|
1386
|
-
actionType: z.ZodOptional<z.ZodString>;
|
|
1387
|
-
selector: z.ZodOptional<z.ZodString>;
|
|
1388
|
-
coordinates: z.ZodOptional<z.ZodObject<{
|
|
1389
|
-
x: z.ZodNumber;
|
|
1390
|
-
y: z.ZodNumber;
|
|
1391
|
-
}, z.core.$strip>>;
|
|
1392
|
-
elementProperties: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
1393
|
-
duration: z.ZodOptional<z.ZodNumber>;
|
|
1394
|
-
}, z.core.$strip>;
|
|
1395
|
-
declare const CacheLogDataSchema: z.ZodObject<{
|
|
1396
|
-
operation: z.ZodEnum<{
|
|
1397
|
-
set: "set";
|
|
1398
|
-
get: "get";
|
|
1399
|
-
invalidate: "invalidate";
|
|
1400
|
-
bypass: "bypass";
|
|
1401
|
-
"batch-purge": "batch-purge";
|
|
1402
|
-
}>;
|
|
1403
|
-
stepHash: z.ZodOptional<z.ZodString>;
|
|
1404
|
-
screenHash: z.ZodOptional<z.ZodString>;
|
|
1405
|
-
hit: z.ZodOptional<z.ZodBoolean>;
|
|
1406
|
-
age: z.ZodOptional<z.ZodNumber>;
|
|
1407
|
-
entriesDeleted: z.ZodOptional<z.ZodNumber>;
|
|
1408
|
-
}, z.core.$strip>;
|
|
1409
|
-
declare const PlannerLogDataSchema: z.ZodObject<{
|
|
1410
|
-
model: z.ZodOptional<z.ZodString>;
|
|
1411
|
-
promptTokens: z.ZodOptional<z.ZodNumber>;
|
|
1412
|
-
completionTokens: z.ZodOptional<z.ZodNumber>;
|
|
1413
|
-
latencyMs: z.ZodOptional<z.ZodNumber>;
|
|
1414
|
-
confidence: z.ZodOptional<z.ZodNumber>;
|
|
1415
|
-
actionType: z.ZodOptional<z.ZodString>;
|
|
1416
|
-
}, z.core.$strip>;
|
|
1417
|
-
declare const HealerLogDataSchema: z.ZodObject<{
|
|
1418
|
-
strategy: z.ZodOptional<z.ZodString>;
|
|
1419
|
-
attempt: z.ZodOptional<z.ZodNumber>;
|
|
1420
|
-
maxAttempts: z.ZodOptional<z.ZodNumber>;
|
|
1421
|
-
stateDiffDetected: z.ZodOptional<z.ZodBoolean>;
|
|
1422
|
-
success: z.ZodOptional<z.ZodBoolean>;
|
|
1423
|
-
}, z.core.$strip>;
|
|
1424
|
-
declare const HookLogDataSchema: z.ZodObject<{
|
|
1425
|
-
hookName: z.ZodOptional<z.ZodString>;
|
|
1426
|
-
phase: z.ZodOptional<z.ZodEnum<{
|
|
1427
|
-
setup: "setup";
|
|
1428
|
-
teardown: "teardown";
|
|
1429
|
-
}>>;
|
|
1430
|
-
duration: z.ZodOptional<z.ZodNumber>;
|
|
1431
|
-
success: z.ZodOptional<z.ZodBoolean>;
|
|
1432
|
-
}, z.core.$strip>;
|
|
1433
|
-
declare const RunnerLogDataSchema: z.ZodObject<{
|
|
1434
|
-
stepIndex: z.ZodOptional<z.ZodNumber>;
|
|
1435
|
-
totalSteps: z.ZodOptional<z.ZodNumber>;
|
|
1436
|
-
testName: z.ZodOptional<z.ZodString>;
|
|
1437
|
-
variablesCaptured: z.ZodOptional<z.ZodNumber>;
|
|
1438
|
-
}, z.core.$strip>;
|
|
1439
|
-
declare const LogSourceDataSchemas: Record<LogSource, z.ZodType>;
|
|
1440
|
-
|
|
1441
|
-
interface SecretTemplate {
|
|
1442
|
-
pattern: string;
|
|
1443
|
-
name: string;
|
|
926
|
+
/**
|
|
927
|
+
* A test document parsed so that BOTH halves survive: the composed model a pointer resolves
|
|
928
|
+
* against, and the token array the render concatenates.
|
|
929
|
+
*
|
|
930
|
+
* The two are not redundant. Pointer resolution needs the model (`getIn`-shaped navigation over
|
|
931
|
+
* maps and sequences); byte preservation needs the tokens. Handing a caller only one of them would
|
|
932
|
+
* force it to re-parse to get the other, and a second parse is a second opinion about the source.
|
|
933
|
+
*/
|
|
934
|
+
interface ParsedTestDocument {
|
|
935
|
+
readonly source: string;
|
|
936
|
+
readonly filePath: string;
|
|
937
|
+
readonly tokens: CST.Token[];
|
|
938
|
+
readonly doc: Document;
|
|
939
|
+
}
|
|
940
|
+
/** A pointer addressed a document root outside `EDITABLE_POINTER_ROOTS` (T-394-10). */
|
|
941
|
+
declare class PatchPointerOutsideEditableRegionError extends Error {
|
|
942
|
+
readonly pointer: string;
|
|
943
|
+
constructor(pointer: string);
|
|
944
|
+
}
|
|
945
|
+
/** A pointer named a node the document does not have. */
|
|
946
|
+
declare class PatchPointerUnresolvableError extends Error {
|
|
947
|
+
readonly pointer: string;
|
|
948
|
+
readonly detail: string;
|
|
949
|
+
constructor(pointer: string, detail: string);
|
|
1444
950
|
}
|
|
1445
|
-
|
|
1446
|
-
|
|
1447
|
-
|
|
1448
|
-
|
|
1449
|
-
|
|
1450
|
-
|
|
1451
|
-
|
|
1452
|
-
|
|
1453
|
-
|
|
1454
|
-
|
|
1455
|
-
|
|
1456
|
-
constructor(
|
|
1457
|
-
static empty(): SecretStore;
|
|
1458
|
-
static fromEnvContent(content: string): SecretStore;
|
|
1459
|
-
private set;
|
|
1460
|
-
get(name: string): string | undefined;
|
|
1461
|
-
require(name: string): string;
|
|
1462
|
-
has(name: string): boolean;
|
|
1463
|
-
count(): number;
|
|
1464
|
-
metadata(): SecretFileMetadata;
|
|
1465
|
-
forEachSecret(callback: (name: string, value: string) => void): void;
|
|
1466
|
-
}
|
|
1467
|
-
declare function findSecretTemplates(text: string): SecretTemplate[];
|
|
1468
|
-
declare function interpolateSecretTemplates(template: string, store: SecretStore): string;
|
|
1469
|
-
declare function resolveSecretTemplatesInValue<T>(value: T, store?: SecretStore): T;
|
|
1470
|
-
declare function redactSecretValue<T>(value: T, redactor?: SecretRedactor): T;
|
|
1471
|
-
declare class SecretRedactor {
|
|
1472
|
-
private readonly store;
|
|
1473
|
-
private readonly genericMarker;
|
|
1474
|
-
private valuePatterns;
|
|
1475
|
-
constructor(store: SecretStore, genericMarker?: string);
|
|
1476
|
-
redactString(value: string): string;
|
|
1477
|
-
redactValue(value: unknown): unknown;
|
|
951
|
+
/**
|
|
952
|
+
* The op cannot be applied to the node its pointer reached.
|
|
953
|
+
*
|
|
954
|
+
* `add` and `remove` operate on block-sequence items only. Adding or removing a top-level KEY
|
|
955
|
+
* changes the document's shape rather than its content, and D-02 already routes a shape change
|
|
956
|
+
* through whole-document emission with a full schema validation — so admitting it here would
|
|
957
|
+
* publish a second, weaker path to the same outcome.
|
|
958
|
+
*/
|
|
959
|
+
declare class PatchOpUnsupportedTargetError extends Error {
|
|
960
|
+
readonly pointer: string;
|
|
961
|
+
readonly detail: string;
|
|
962
|
+
constructor(pointer: string, detail: string);
|
|
1478
963
|
}
|
|
1479
|
-
|
|
1480
|
-
|
|
1481
|
-
|
|
1482
|
-
|
|
1483
|
-
|
|
1484
|
-
|
|
1485
|
-
|
|
1486
|
-
|
|
1487
|
-
|
|
1488
|
-
|
|
1489
|
-
|
|
1490
|
-
|
|
1491
|
-
displayLevel: LogLevel;
|
|
1492
|
-
storage?: LogStorage;
|
|
1493
|
-
ndjson?: boolean;
|
|
1494
|
-
redactor?: SecretRedactor;
|
|
1495
|
-
});
|
|
1496
|
-
setRedactor(redactor: SecretRedactor | undefined): void;
|
|
1497
|
-
log(level: Exclude<LogLevel, 'silent'>, source: LogSource, message: string, data?: Record<string, unknown>): void;
|
|
1498
|
-
private shouldDisplay;
|
|
1499
|
-
private emitNdjson;
|
|
1500
|
-
setCurrentStep(stepId: string): void;
|
|
1501
|
-
clearCurrentStep(): void;
|
|
1502
|
-
setRunId(runId: string): void;
|
|
1503
|
-
flush(): void;
|
|
1504
|
-
getBuffer(): LogEntry[];
|
|
1505
|
-
createScopedLogger(source: LogSource): ScopedLogger;
|
|
964
|
+
/**
|
|
965
|
+
* A document this project cannot run — checked on the SOURCE before anything is applied and on the
|
|
966
|
+
* RENDERED bytes before anything may be written.
|
|
967
|
+
*
|
|
968
|
+
* Both directions matter. Validating only the render would let a pre-existing invalidity be
|
|
969
|
+
* blamed on the patch; validating only the source would let a CST mutation that produced
|
|
970
|
+
* structurally broken YAML reach a file. Same predicate, same evidence, two call sites.
|
|
971
|
+
*/
|
|
972
|
+
declare class PatchedDocumentInvalidError extends Error {
|
|
973
|
+
readonly phase: 'source' | 'rendered';
|
|
974
|
+
readonly detail: string;
|
|
975
|
+
constructor(phase: 'source' | 'rendered', detail: string);
|
|
1506
976
|
}
|
|
977
|
+
/**
|
|
978
|
+
* Parse a test file retaining the CST token array beside the composed document.
|
|
979
|
+
*
|
|
980
|
+
* The composer is given `keepSourceTokens` so every node carries a `srcToken` back-reference; that
|
|
981
|
+
* back-reference is the entire bridge between a pointer (which addresses the model) and a mutation
|
|
982
|
+
* (which must land on the syntax).
|
|
983
|
+
*/
|
|
984
|
+
declare function parseTestFileWithTokens(source: string, filePath: string): ParsedTestDocument;
|
|
985
|
+
/**
|
|
986
|
+
* Apply a patch set in document order, mutating `parsed.doc` and its tokens in place.
|
|
987
|
+
*
|
|
988
|
+
* TWO PROPERTIES THE ORDER BUYS. First, the fence runs over the WHOLE set before any mutation, so
|
|
989
|
+
* a set mixing a legitimate op with an out-of-region one leaves nothing behind — a per-op check
|
|
990
|
+
* would have already rewritten the legitimate target by the time it refused. Second, each pointer
|
|
991
|
+
* resolves against the document as PRIOR ops left it, which is what RFC-6902 means by a sequence
|
|
992
|
+
* of operations: an `add` earlier in an array shifts every later index, and resolving every
|
|
993
|
+
* pointer against the original document would edit a plausible, schema-valid, wrong step.
|
|
994
|
+
*/
|
|
995
|
+
declare function applyPatchSetToTestDoc(parsed: ParsedTestDocument, patchSet: TestEditPatchSet): void;
|
|
996
|
+
/**
|
|
997
|
+
* Concatenate the whole token array back to bytes, then refuse anything unrunnable.
|
|
998
|
+
*
|
|
999
|
+
* THE RENDER IS OVER `parsed.tokens`, NEVER OVER THE DOCUMENT TOKEN ALONE. `CST.stringify`'s own
|
|
1000
|
+
* doc comment states it "applies no validation whatsoever, and simply concatenates the sources in
|
|
1001
|
+
* their logical order" — that concatenation IS the byte-preservation guarantee. A file's leading
|
|
1002
|
+
* comment is a separate token in the parser's output stream, positioned BEFORE the document token,
|
|
1003
|
+
* so `CST.stringify(documentToken)` drops it. That is the one genuinely non-obvious line here, it
|
|
1004
|
+
* was measured rather than reasoned about, and the frozen corpus's untouched-round-trip row is
|
|
1005
|
+
* the cell that catches a regression to it.
|
|
1006
|
+
*/
|
|
1007
|
+
declare function renderPatchedTestDoc(parsed: ParsedTestDocument, filePath?: string): string;
|
|
1507
1008
|
|
|
1508
1009
|
interface PlannerConfig {
|
|
1509
|
-
|
|
1010
|
+
maxActions: number;
|
|
1011
|
+
maxPlanningTurns: number;
|
|
1510
1012
|
previousStepCount: number;
|
|
1511
1013
|
}
|
|
1512
1014
|
interface PlanResult {
|
|
@@ -1517,36 +1019,11 @@ interface VerifyResult {
|
|
|
1517
1019
|
verification: VerificationResult;
|
|
1518
1020
|
tokenUsage?: TokenUsage;
|
|
1519
1021
|
}
|
|
1520
|
-
type AgentPhase = {
|
|
1521
|
-
type: 'observe';
|
|
1522
|
-
} | {
|
|
1523
|
-
type: 'plan';
|
|
1524
|
-
screenState: ScreenState;
|
|
1525
|
-
} | {
|
|
1526
|
-
type: 'execute';
|
|
1527
|
-
action: Action;
|
|
1528
|
-
screenStateBefore: ScreenState;
|
|
1529
|
-
} | {
|
|
1530
|
-
type: 'verify';
|
|
1531
|
-
action: Action;
|
|
1532
|
-
screenStateBefore: ScreenState;
|
|
1533
|
-
result: ActionResult;
|
|
1534
|
-
} | {
|
|
1535
|
-
type: 'heal';
|
|
1536
|
-
error: string;
|
|
1537
|
-
attempts: HealingAttempt[];
|
|
1538
|
-
screenStateBefore: ScreenState;
|
|
1539
|
-
failedAction: Action;
|
|
1540
|
-
} | {
|
|
1541
|
-
type: 'done';
|
|
1542
|
-
result: StepResult;
|
|
1543
|
-
};
|
|
1544
1022
|
interface StepContext {
|
|
1545
1023
|
stepInstruction: string;
|
|
1546
1024
|
testName: string;
|
|
1547
1025
|
testContext?: string;
|
|
1548
1026
|
suiteContext?: string;
|
|
1549
|
-
agentRules?: string;
|
|
1550
1027
|
previousSteps: {
|
|
1551
1028
|
instruction: string;
|
|
1552
1029
|
outcome: string;
|
|
@@ -1557,7 +1034,6 @@ interface StepContext {
|
|
|
1557
1034
|
contextWindow?: number;
|
|
1558
1035
|
plannerModel: LanguageModel;
|
|
1559
1036
|
verifierModel: LanguageModel;
|
|
1560
|
-
healingConfig: HealingConfig;
|
|
1561
1037
|
modelId?: string;
|
|
1562
1038
|
variables?: Record<string, string>;
|
|
1563
1039
|
memoryContext?: string;
|
|
@@ -1574,79 +1050,24 @@ interface StepContext {
|
|
|
1574
1050
|
}[];
|
|
1575
1051
|
plannerConfig?: PlannerConfig;
|
|
1576
1052
|
screenshot?: Buffer;
|
|
1577
|
-
|
|
1578
|
-
|
|
1579
|
-
|
|
1580
|
-
|
|
1581
|
-
|
|
1582
|
-
|
|
1583
|
-
planner: Planner;
|
|
1584
|
-
verifier?: Verifier;
|
|
1585
|
-
cache?: ActionCache;
|
|
1586
|
-
healingConfig: HealingConfig;
|
|
1587
|
-
plannerConfig?: PlannerConfig;
|
|
1588
|
-
/** Wall-clock timeout for a single step (ms). 0 or undefined = no timeout. */
|
|
1589
|
-
stepTimeout?: number;
|
|
1590
|
-
/** Override the consecutive failure limit for this step. */
|
|
1591
|
-
maxAttempts?: number;
|
|
1592
|
-
logger?: LogManager;
|
|
1593
|
-
configContent?: string;
|
|
1594
|
-
testFileContent?: string;
|
|
1595
|
-
testFilePath?: string;
|
|
1596
|
-
stepIndex?: number;
|
|
1597
|
-
suiteFileContent?: string;
|
|
1598
|
-
suiteTestIndex?: number;
|
|
1599
|
-
cacheState?: {
|
|
1600
|
-
invalidated: boolean;
|
|
1601
|
-
};
|
|
1602
|
-
logCapture?: {
|
|
1603
|
-
console?: boolean;
|
|
1604
|
-
network?: boolean;
|
|
1605
|
-
};
|
|
1606
|
-
screenshotSize?: number;
|
|
1607
|
-
/** Max image edge (pixels) to resize screenshots to before sending to LLM. From ModelConfig. */
|
|
1608
|
-
effectiveResolution?: number;
|
|
1609
|
-
onSetVariable?: (name: string, value: string) => void;
|
|
1610
|
-
onPhase?: (event: StepPhaseEvent) => void | Promise<void>;
|
|
1611
|
-
abortSignal?: AbortSignal;
|
|
1612
|
-
secretStore?: SecretStore;
|
|
1613
|
-
secretRedactor?: SecretRedactor;
|
|
1053
|
+
/**
|
|
1054
|
+
* Vision-gate prompt note for this run (D-11). Non-empty only for text-only
|
|
1055
|
+
* models; injected into the planner prompt when present. Threaded from the
|
|
1056
|
+
* loop's `visionGate.promptNote` — a structural value, not a model import.
|
|
1057
|
+
*/
|
|
1058
|
+
promptNote?: string;
|
|
1614
1059
|
}
|
|
1615
1060
|
interface Planner {
|
|
1616
1061
|
plan(step: string, screenState: ScreenState, context: StepContext, abortSignal?: AbortSignal): Promise<PlanResult>;
|
|
1617
1062
|
}
|
|
1618
1063
|
interface Verifier {
|
|
1619
|
-
verify(step: string, before: ScreenState, after: ScreenState, action: Action, screenshot?: Buffer, abortSignal?: AbortSignal): Promise<VerifyResult>;
|
|
1064
|
+
verify(step: string, before: ScreenState, after: ScreenState, action: Action, screenshot?: Buffer, abortSignal?: AbortSignal, promptNote?: string): Promise<VerifyResult>;
|
|
1620
1065
|
}
|
|
1621
1066
|
interface VerificationResult {
|
|
1622
1067
|
success: boolean;
|
|
1623
1068
|
reasoning: string;
|
|
1624
1069
|
isAppError: boolean;
|
|
1625
1070
|
}
|
|
1626
|
-
interface ActionCache {
|
|
1627
|
-
get(stepHash: string, screenHash: string): Promise<ActionPlan | null>;
|
|
1628
|
-
set(stepHash: string, screenHash: string, plan: ActionPlan): Promise<void>;
|
|
1629
|
-
invalidate(stepHash: string, screenHash: string): Promise<void>;
|
|
1630
|
-
getSubAction(stepHash: string, index: number): Promise<ActionPlan | null>;
|
|
1631
|
-
setSubAction(stepHash: string, index: number, plan: ActionPlan): Promise<void>;
|
|
1632
|
-
invalidateSubActionsFrom(stepHash: string, fromIndex: number): Promise<void>;
|
|
1633
|
-
}
|
|
1634
|
-
type AssertionType = 'text-presence' | 'element-visibility' | 'url-match' | 'element-count' | 'ai';
|
|
1635
|
-
interface AssertionResult {
|
|
1636
|
-
passed: boolean;
|
|
1637
|
-
assertionType: AssertionType;
|
|
1638
|
-
expected: string;
|
|
1639
|
-
actual: string;
|
|
1640
|
-
reasoning: string;
|
|
1641
|
-
}
|
|
1642
|
-
interface Asserter {
|
|
1643
|
-
evaluate(assertion: AssertionInput, screenState: ScreenState): Promise<AssertionResult>;
|
|
1644
|
-
}
|
|
1645
|
-
interface AssertionInput {
|
|
1646
|
-
type: AssertionType;
|
|
1647
|
-
value: string;
|
|
1648
|
-
expected?: string;
|
|
1649
|
-
}
|
|
1650
1071
|
type ExtractionMethod = 'regex' | 'selector' | 'ai';
|
|
1651
1072
|
interface ExtractorInput {
|
|
1652
1073
|
method: ExtractionMethod;
|
|
@@ -1665,844 +1086,8 @@ interface VariableExtractor {
|
|
|
1665
1086
|
extract(input: ExtractorInput, screenState: ScreenState): Promise<CaptureResult>;
|
|
1666
1087
|
}
|
|
1667
1088
|
|
|
1668
|
-
declare function truncateScreenState(state: ScreenState): string;
|
|
1669
|
-
declare function hashScreenState(state: ScreenState): string;
|
|
1670
|
-
interface StepHashInputs {
|
|
1671
|
-
step: string;
|
|
1672
|
-
platform?: string;
|
|
1673
|
-
configContent?: string;
|
|
1674
|
-
testFileContent?: string;
|
|
1675
|
-
stepIndex?: number;
|
|
1676
|
-
suiteFileContent?: string;
|
|
1677
|
-
suiteTestIndex?: number;
|
|
1678
|
-
}
|
|
1679
|
-
declare function hashStepInstruction(inputs: StepHashInputs): string;
|
|
1680
|
-
declare function hashStepInstruction(step: string, platform?: string, configContent?: string, testFileContent?: string, stepIndex?: number): string;
|
|
1681
|
-
|
|
1682
1089
|
declare function estimateTokens(text: string): number;
|
|
1683
1090
|
|
|
1684
|
-
declare const SUPPORTED_PROVIDERS: readonly ["openai-compatible", "anthropic-compatible", "openai-subscription", "anthropic-subscription", "gemini"];
|
|
1685
|
-
type BuiltInProviderMode = typeof SUPPORTED_PROVIDERS[number];
|
|
1686
|
-
type ProviderMode = BuiltInProviderMode | (string & {});
|
|
1687
|
-
type LLMModelAdapter$1 = 'openai-responses' | 'anthropic-messages';
|
|
1688
|
-
interface ModelConfig {
|
|
1689
|
-
provider: ProviderMode;
|
|
1690
|
-
model: string;
|
|
1691
|
-
modelAdapter?: LLMModelAdapter$1;
|
|
1692
|
-
apiKey?: string;
|
|
1693
|
-
authToken?: string;
|
|
1694
|
-
baseURL?: string;
|
|
1695
|
-
providerHeaders?: Record<string, string>;
|
|
1696
|
-
fetch?: typeof globalThis.fetch;
|
|
1697
|
-
}
|
|
1698
|
-
type JSONValue = string | number | boolean | null | JSONValue[] | {
|
|
1699
|
-
[key: string]: JSONValue | undefined;
|
|
1700
|
-
};
|
|
1701
|
-
type ProviderOptions = Record<string, Record<string, JSONValue | undefined>> | undefined;
|
|
1702
|
-
declare function getProviderOptions(config: ModelConfig): ProviderOptions;
|
|
1703
|
-
declare function createModel(config: ModelConfig): Promise<LanguageModel>;
|
|
1704
|
-
|
|
1705
|
-
declare class LLMPlanner implements Planner {
|
|
1706
|
-
private model;
|
|
1707
|
-
private platform;
|
|
1708
|
-
private providerOptions;
|
|
1709
|
-
private logger?;
|
|
1710
|
-
private agentRules?;
|
|
1711
|
-
constructor(model: LanguageModel, platform?: 'web' | 'android' | 'ios', providerOptions?: ProviderOptions, logger?: ScopedLogger, agentRules?: string);
|
|
1712
|
-
plan(step: string, screenState: ScreenState, context: StepContext, abortSignal?: AbortSignal): Promise<PlanResult>;
|
|
1713
|
-
}
|
|
1714
|
-
|
|
1715
|
-
declare const VerificationResultSchema: z.ZodObject<{
|
|
1716
|
-
success: z.ZodBoolean;
|
|
1717
|
-
reasoning: z.ZodString;
|
|
1718
|
-
isAppError: z.ZodBoolean;
|
|
1719
|
-
}, z.core.$strip>;
|
|
1720
|
-
declare class LLMVerifier implements Verifier {
|
|
1721
|
-
private model;
|
|
1722
|
-
private providerOptions;
|
|
1723
|
-
constructor(model: LanguageModel, providerOptions?: ProviderOptions);
|
|
1724
|
-
verify(step: string, before: ScreenState, after: ScreenState, action: Action, screenshot?: Buffer, abortSignal?: AbortSignal): Promise<VerifyResult>;
|
|
1725
|
-
}
|
|
1726
|
-
|
|
1727
|
-
declare function buildSystemPrompt(platform?: 'web' | 'android' | 'ios', agentRules?: string): string;
|
|
1728
|
-
declare function buildStepPrompt(step: string, screenState: ScreenState, context: StepContext, logger?: ScopedLogger, systemPromptContext?: {
|
|
1729
|
-
platform?: 'web' | 'android' | 'ios';
|
|
1730
|
-
agentRules?: string;
|
|
1731
|
-
}): string;
|
|
1732
|
-
declare function buildVerificationPrompt(step: string, beforeState: ScreenState, afterState: ScreenState, action: Action, hasScreenshot?: boolean): string;
|
|
1733
|
-
declare function buildAssertionPrompt(assertion: AssertionInput, screenState: ScreenState): string;
|
|
1734
|
-
declare function buildExtractionPrompt(input: ExtractorInput, screenState: ScreenState): string;
|
|
1735
|
-
|
|
1736
|
-
type ToolCategory = 'action' | 'file' | 'network';
|
|
1737
|
-
interface ToolDefinition<T extends z.ZodType = z.ZodType> {
|
|
1738
|
-
name: string;
|
|
1739
|
-
description: string;
|
|
1740
|
-
category: ToolCategory;
|
|
1741
|
-
platform?: ('web' | 'android' | 'ios')[];
|
|
1742
|
-
schema: T;
|
|
1743
|
-
}
|
|
1744
|
-
|
|
1745
|
-
declare class ToolRegistry {
|
|
1746
|
-
private tools;
|
|
1747
|
-
register<T extends z.ZodType>(def: ToolDefinition<T>): this;
|
|
1748
|
-
get(name: string): ToolDefinition | undefined;
|
|
1749
|
-
getAll(): ToolDefinition[];
|
|
1750
|
-
getFiltered(options: {
|
|
1751
|
-
platform?: string;
|
|
1752
|
-
categories?: ToolCategory[];
|
|
1753
|
-
}): ToolDefinition[];
|
|
1754
|
-
getSchema(name: string): z.ZodType;
|
|
1755
|
-
generateDocs(platform?: string): string;
|
|
1756
|
-
}
|
|
1757
|
-
declare const defaultRegistry: ToolRegistry;
|
|
1758
|
-
|
|
1759
|
-
declare const MOBILE_ONLY_ACTIONS: Set<string>;
|
|
1760
|
-
declare const WEB_ONLY_ACTIONS: Set<string>;
|
|
1761
|
-
|
|
1762
|
-
declare function buildTools(registry: ToolRegistry, options: {
|
|
1763
|
-
platform: 'web' | 'android' | 'ios';
|
|
1764
|
-
categories?: ToolCategory[];
|
|
1765
|
-
}): Record<string, ai.Tool<any, any>>;
|
|
1766
|
-
declare function toolCallToActionPlan(toolName: string, args: Record<string, unknown>, registry: ToolRegistry): {
|
|
1767
|
-
reasoning: string;
|
|
1768
|
-
confidence: number;
|
|
1769
|
-
stepComplete: boolean;
|
|
1770
|
-
stepFailed: boolean;
|
|
1771
|
-
action: {
|
|
1772
|
-
type: string;
|
|
1773
|
-
};
|
|
1774
|
-
};
|
|
1775
|
-
|
|
1776
|
-
declare const toolSchemaMiddleware: LanguageModelMiddleware;
|
|
1777
|
-
declare function createWrappedModel(baseModel: Parameters<typeof wrapLanguageModel>[0]['model']): LanguageModel;
|
|
1778
|
-
|
|
1779
|
-
declare const AssertionResultSchema: z.ZodObject<{
|
|
1780
|
-
passed: z.ZodBoolean;
|
|
1781
|
-
reasoning: z.ZodString;
|
|
1782
|
-
evidence: z.ZodString;
|
|
1783
|
-
}, z.core.$strip>;
|
|
1784
|
-
declare class AssertionEvaluator implements Asserter {
|
|
1785
|
-
evaluate(assertion: AssertionInput, screenState: ScreenState): Promise<AssertionResult>;
|
|
1786
|
-
private evaluateTextPresence;
|
|
1787
|
-
private evaluateElementVisibility;
|
|
1788
|
-
private evaluateUrlMatch;
|
|
1789
|
-
private evaluateElementCount;
|
|
1790
|
-
}
|
|
1791
|
-
declare class LLMAssertionEvaluator implements Asserter {
|
|
1792
|
-
private model;
|
|
1793
|
-
constructor(model: LanguageModel);
|
|
1794
|
-
evaluate(assertion: AssertionInput, screenState: ScreenState): Promise<AssertionResult>;
|
|
1795
|
-
}
|
|
1796
|
-
declare function createAsserter(model?: LanguageModel): Asserter;
|
|
1797
|
-
|
|
1798
|
-
declare function executeStep(stepInstruction: string, config: AgentLoopConfig, context: StepContext): Promise<StepResult>;
|
|
1799
|
-
|
|
1800
|
-
interface RebuildCommand {
|
|
1801
|
-
command: string;
|
|
1802
|
-
args: string[];
|
|
1803
|
-
}
|
|
1804
|
-
declare function isBetterSqlite3AbiMismatch(error: unknown): boolean;
|
|
1805
|
-
declare function isBetterSqlite3NativeModuleError(error: unknown): boolean;
|
|
1806
|
-
declare function isBetterSqlite3NodeGypSymlinkConflict(error: unknown): boolean;
|
|
1807
|
-
declare function resolveBetterSqliteRebuildCommand(): RebuildCommand;
|
|
1808
|
-
type BetterSqlite3Database = better_sqlite3.Database;
|
|
1809
|
-
declare function createBetterSqlite3Database(path: string): BetterSqlite3Database;
|
|
1810
|
-
|
|
1811
|
-
interface MemoryIndexParams {
|
|
1812
|
-
product: string;
|
|
1813
|
-
suiteId?: string;
|
|
1814
|
-
testId: string;
|
|
1815
|
-
memoryRoot: string;
|
|
1816
|
-
currentSuiteTests?: Array<{
|
|
1817
|
-
test: string;
|
|
1818
|
-
id: string;
|
|
1819
|
-
}>;
|
|
1820
|
-
currentPosition?: number;
|
|
1821
|
-
}
|
|
1822
|
-
declare function buildMemoryIndex(params: MemoryIndexParams): Promise<BetterSqlite3Database | null>;
|
|
1823
|
-
|
|
1824
|
-
declare const BaseObservationSchema: z.ZodObject<{
|
|
1825
|
-
id: z.ZodString;
|
|
1826
|
-
title: z.ZodString;
|
|
1827
|
-
content: z.ZodString;
|
|
1828
|
-
trust: z.ZodNumber;
|
|
1829
|
-
created: z.ZodString;
|
|
1830
|
-
last_confirmed: z.ZodString;
|
|
1831
|
-
confirmed_count: z.ZodNumber;
|
|
1832
|
-
contradicted_count: z.ZodNumber;
|
|
1833
|
-
source_test: z.ZodString;
|
|
1834
|
-
}, z.core.$strip>;
|
|
1835
|
-
declare const SuiteObservationSchema: z.ZodObject<{
|
|
1836
|
-
id: z.ZodString;
|
|
1837
|
-
title: z.ZodString;
|
|
1838
|
-
content: z.ZodString;
|
|
1839
|
-
trust: z.ZodNumber;
|
|
1840
|
-
created: z.ZodString;
|
|
1841
|
-
last_confirmed: z.ZodString;
|
|
1842
|
-
confirmed_count: z.ZodNumber;
|
|
1843
|
-
contradicted_count: z.ZodNumber;
|
|
1844
|
-
source_test: z.ZodString;
|
|
1845
|
-
position: z.ZodNumber;
|
|
1846
|
-
suite_snapshot: z.ZodArray<z.ZodObject<{
|
|
1847
|
-
test: z.ZodString;
|
|
1848
|
-
id: z.ZodString;
|
|
1849
|
-
}, z.core.$strict>>;
|
|
1850
|
-
}, z.core.$strip>;
|
|
1851
|
-
type BaseObservation = z.infer<typeof BaseObservationSchema>;
|
|
1852
|
-
type SuiteObservation = z.infer<typeof SuiteObservationSchema>;
|
|
1853
|
-
|
|
1854
|
-
interface MemoryObservationSnippet {
|
|
1855
|
-
id: string;
|
|
1856
|
-
title: string;
|
|
1857
|
-
content: string;
|
|
1858
|
-
trust: number;
|
|
1859
|
-
}
|
|
1860
|
-
interface MemoryQueryResult {
|
|
1861
|
-
observations: MemoryObservationSnippet[];
|
|
1862
|
-
formatted: string;
|
|
1863
|
-
}
|
|
1864
|
-
interface MemoryProvider {
|
|
1865
|
-
init(params: MemoryIndexParams): Promise<void>;
|
|
1866
|
-
queryForStep(stepText: string, stepIndex: number): MemoryQueryResult | null;
|
|
1867
|
-
destroy(): void;
|
|
1868
|
-
acquireLock(): Promise<void>;
|
|
1869
|
-
releaseLock(): Promise<void>;
|
|
1870
|
-
writeObservation(tier: 'products' | 'suites' | 'tests', scope: string, data: BaseObservation | SuiteObservation): Promise<string>;
|
|
1871
|
-
deleteObservation(tier: 'products' | 'suites' | 'tests', scope: string, id: string): Promise<void>;
|
|
1872
|
-
searchForDuplicates(content: string): MemoryObservationSnippet[];
|
|
1873
|
-
getAllObservations(): MemoryObservationSnippet[];
|
|
1874
|
-
getInjectedObservations(stepIndex: number): string[];
|
|
1875
|
-
getRunAnalytics(): unknown;
|
|
1876
|
-
}
|
|
1877
|
-
|
|
1878
|
-
interface CircuitBreakerConfig {
|
|
1879
|
-
windowSize: number;
|
|
1880
|
-
baselineSize: number;
|
|
1881
|
-
threshold: number;
|
|
1882
|
-
}
|
|
1883
|
-
declare class CircuitBreaker {
|
|
1884
|
-
private config;
|
|
1885
|
-
private window;
|
|
1886
|
-
private _tripped;
|
|
1887
|
-
constructor(config?: Partial<CircuitBreakerConfig>);
|
|
1888
|
-
record(outcome: {
|
|
1889
|
-
withMemory: boolean;
|
|
1890
|
-
passed: boolean;
|
|
1891
|
-
}): void;
|
|
1892
|
-
isTripped(): boolean;
|
|
1893
|
-
private evaluate;
|
|
1894
|
-
}
|
|
1895
|
-
|
|
1896
|
-
type RunAttributes = Record<string, string>;
|
|
1897
|
-
declare const INTERNAL_ATTRIBUTE_PREFIX = "agent-qa.";
|
|
1898
|
-
declare const ATTR_TRIGGER = "agent-qa.trigger";
|
|
1899
|
-
declare const ATTR_RUNNER = "agent-qa.runner";
|
|
1900
|
-
type RunAttributeTrigger = 'cli' | 'dashboard' | 'api' | 'mcp';
|
|
1901
|
-
type RunAttributeRunner = 'local' | 'browserstack';
|
|
1902
|
-
declare const RUN_ATTRIBUTE_KEY_MAX_LENGTH = 256;
|
|
1903
|
-
declare const RUN_ATTRIBUTE_VALUE_MAX_LENGTH = 4096;
|
|
1904
|
-
interface ParsedRunAttrFlags {
|
|
1905
|
-
attributes: RunAttributes;
|
|
1906
|
-
duplicateKeys: string[];
|
|
1907
|
-
}
|
|
1908
|
-
declare function validateUserRunAttributes(input: unknown, sourceLabel?: string): RunAttributes;
|
|
1909
|
-
declare function validateTrustedRunAttributes(input: unknown, sourceLabel?: string): RunAttributes;
|
|
1910
|
-
declare function parseRunAttrFlags(flags: string[] | undefined): ParsedRunAttrFlags;
|
|
1911
|
-
declare function buildInternalRunAttributes(input: {
|
|
1912
|
-
trigger: RunAttributeTrigger;
|
|
1913
|
-
runner: RunAttributeRunner;
|
|
1914
|
-
}): RunAttributes;
|
|
1915
|
-
declare function mergeRunAttributes(internal: RunAttributes, user: RunAttributes): RunAttributes;
|
|
1916
|
-
declare function sortRunAttributesForDisplay(attributes: RunAttributes, activeKeys?: string[]): Array<[string, string]>;
|
|
1917
|
-
declare function formatRunAttributesBlock(attributes: RunAttributes): string;
|
|
1918
|
-
|
|
1919
|
-
declare const RUN_ARTIFACT_SCHEMA_VERSION: 1;
|
|
1920
|
-
type RunArtifactKind = 'test' | 'suite-parent' | 'suite-child' | 'unknown';
|
|
1921
|
-
type JsonPrimitive = string | number | boolean | null;
|
|
1922
|
-
type JsonValue = JsonPrimitive | JsonObject | JsonArray;
|
|
1923
|
-
interface JsonObject {
|
|
1924
|
-
[key: string]: JsonValue;
|
|
1925
|
-
}
|
|
1926
|
-
type JsonArray = JsonValue[];
|
|
1927
|
-
type ArtifactRecord = Record<string, unknown>;
|
|
1928
|
-
interface RunArtifactMetadata extends ArtifactRecord {
|
|
1929
|
-
attributes?: RunAttributes;
|
|
1930
|
-
}
|
|
1931
|
-
interface RunArtifactTerminalError {
|
|
1932
|
-
code: string;
|
|
1933
|
-
message: string;
|
|
1934
|
-
phase: string;
|
|
1935
|
-
details?: unknown;
|
|
1936
|
-
}
|
|
1937
|
-
interface RunArtifactConfigSnapshot {
|
|
1938
|
-
rawConfigContent?: string | null;
|
|
1939
|
-
parsedConfig?: unknown;
|
|
1940
|
-
effectiveConfig?: unknown;
|
|
1941
|
-
envFile?: {
|
|
1942
|
-
path: string | null;
|
|
1943
|
-
content: string | null;
|
|
1944
|
-
variables: Record<string, string>;
|
|
1945
|
-
};
|
|
1946
|
-
secretsFile?: {
|
|
1947
|
-
path: string | null;
|
|
1948
|
-
status: 'loaded' | 'missing' | 'unreadable' | 'invalid';
|
|
1949
|
-
count?: number;
|
|
1950
|
-
} | null;
|
|
1951
|
-
cliVars?: Record<string, string>;
|
|
1952
|
-
inlineVars?: Record<string, string>;
|
|
1953
|
-
hooks?: Array<{
|
|
1954
|
-
id: string;
|
|
1955
|
-
name: string;
|
|
1956
|
-
runtime?: string;
|
|
1957
|
-
sourcePath?: string;
|
|
1958
|
-
}>;
|
|
1959
|
-
model?: {
|
|
1960
|
-
planner?: {
|
|
1961
|
-
provider?: string;
|
|
1962
|
-
model?: string;
|
|
1963
|
-
};
|
|
1964
|
-
verifier?: {
|
|
1965
|
-
provider?: string;
|
|
1966
|
-
model?: string;
|
|
1967
|
-
};
|
|
1968
|
-
};
|
|
1969
|
-
runtime?: ArtifactRecord;
|
|
1970
|
-
timeouts?: ArtifactRecord;
|
|
1971
|
-
cache?: ArtifactRecord;
|
|
1972
|
-
memory?: ArtifactRecord;
|
|
1973
|
-
}
|
|
1974
|
-
interface RunArtifactTestSourceSnapshot {
|
|
1975
|
-
kind: 'test';
|
|
1976
|
-
testId?: string | null;
|
|
1977
|
-
name?: string | null;
|
|
1978
|
-
filePath?: string | null;
|
|
1979
|
-
rawYaml?: string | null;
|
|
1980
|
-
resolvedDefinition?: unknown;
|
|
1981
|
-
loadStatus?: 'queued' | 'loaded' | 'parse-error' | 'setup-error' | 'runtime-error' | 'missing' | 'validation-error' | 'skipped';
|
|
1982
|
-
error?: RunArtifactTerminalError;
|
|
1983
|
-
}
|
|
1984
|
-
interface RunArtifactSuiteMemberSnapshot {
|
|
1985
|
-
index: number;
|
|
1986
|
-
ref: {
|
|
1987
|
-
test: string;
|
|
1988
|
-
id?: string;
|
|
1989
|
-
};
|
|
1990
|
-
filePath?: string | null;
|
|
1991
|
-
testId?: string | null;
|
|
1992
|
-
name?: string | null;
|
|
1993
|
-
target?: string | null;
|
|
1994
|
-
rawYaml?: string | null;
|
|
1995
|
-
resolvedDefinition?: unknown | null;
|
|
1996
|
-
loadStatus: 'loaded' | 'missing' | 'parse-error' | 'validation-error' | 'skipped';
|
|
1997
|
-
error?: RunArtifactTerminalError;
|
|
1998
|
-
childRunId?: string;
|
|
1999
|
-
skipReason?: string;
|
|
2000
|
-
}
|
|
2001
|
-
interface RunArtifactSuiteSourceSnapshot {
|
|
2002
|
-
kind: 'suite';
|
|
2003
|
-
suiteId?: string | null;
|
|
2004
|
-
name?: string | null;
|
|
2005
|
-
filePath?: string | null;
|
|
2006
|
-
rawYaml?: string | null;
|
|
2007
|
-
resolvedDefinition?: unknown;
|
|
2008
|
-
loadStatus?: 'queued' | 'loaded' | 'parse-error' | 'setup-error' | 'runtime-error' | 'missing' | 'validation-error' | 'skipped';
|
|
2009
|
-
members?: RunArtifactSuiteMemberSnapshot[];
|
|
2010
|
-
error?: RunArtifactTerminalError;
|
|
2011
|
-
}
|
|
2012
|
-
interface RunArtifactRuntimeSnapshot extends ArtifactRecord {
|
|
2013
|
-
status?: string;
|
|
2014
|
-
duration?: number;
|
|
2015
|
-
startedAt?: string;
|
|
2016
|
-
endedAt?: string;
|
|
2017
|
-
videoPath?: string | null;
|
|
2018
|
-
failureSummary?: string | null;
|
|
2019
|
-
}
|
|
2020
|
-
type RunArtifactMemoryDeltaAction = 'add' | 'confirm' | 'deprecate' | 'delete';
|
|
2021
|
-
interface RunArtifactMemoryObservationSnapshot {
|
|
2022
|
-
id: string;
|
|
2023
|
-
title: string;
|
|
2024
|
-
content: string;
|
|
2025
|
-
trust: number;
|
|
2026
|
-
created: string;
|
|
2027
|
-
last_confirmed: string;
|
|
2028
|
-
confirmed_count: number;
|
|
2029
|
-
contradicted_count: number;
|
|
2030
|
-
source_test: string;
|
|
2031
|
-
position?: number;
|
|
2032
|
-
suite_snapshot?: Array<{
|
|
2033
|
-
test: string;
|
|
2034
|
-
id: string;
|
|
2035
|
-
}>;
|
|
2036
|
-
}
|
|
2037
|
-
interface RunArtifactMemoryDelta {
|
|
2038
|
-
action: RunArtifactMemoryDeltaAction;
|
|
2039
|
-
tier: 'products' | 'suites' | 'tests';
|
|
2040
|
-
scope: string;
|
|
2041
|
-
observationId: string;
|
|
2042
|
-
reasoning: string;
|
|
2043
|
-
before: RunArtifactMemoryObservationSnapshot | null;
|
|
2044
|
-
after: RunArtifactMemoryObservationSnapshot | null;
|
|
2045
|
-
error?: string;
|
|
2046
|
-
}
|
|
2047
|
-
interface RunArtifactMemorySnapshot {
|
|
2048
|
-
log?: {
|
|
2049
|
-
added: number;
|
|
2050
|
-
confirmed: number;
|
|
2051
|
-
deprecated: number;
|
|
2052
|
-
deleted?: number;
|
|
2053
|
-
deltas?: RunArtifactMemoryDelta[];
|
|
2054
|
-
errors: string[];
|
|
2055
|
-
curatorDuration: number;
|
|
2056
|
-
tokenUsage?: {
|
|
2057
|
-
promptTokens: number;
|
|
2058
|
-
completionTokens: number;
|
|
2059
|
-
totalTokens: number;
|
|
2060
|
-
};
|
|
2061
|
-
};
|
|
2062
|
-
aggregate?: ArtifactRecord;
|
|
2063
|
-
}
|
|
2064
|
-
interface RunArtifactPayload {
|
|
2065
|
-
schemaVersion: typeof RUN_ARTIFACT_SCHEMA_VERSION;
|
|
2066
|
-
config?: RunArtifactConfigSnapshot | ArtifactRecord;
|
|
2067
|
-
source?: RunArtifactTestSourceSnapshot | RunArtifactSuiteSourceSnapshot | ArtifactRecord;
|
|
2068
|
-
runtime?: RunArtifactRuntimeSnapshot;
|
|
2069
|
-
memory?: RunArtifactMemorySnapshot | ArtifactRecord;
|
|
2070
|
-
errors?: RunArtifactTerminalError[];
|
|
2071
|
-
metadata?: RunArtifactMetadata;
|
|
2072
|
-
}
|
|
2073
|
-
interface RunArtifactStageInput extends Partial<Omit<RunArtifactPayload, 'schemaVersion'>> {
|
|
2074
|
-
schemaVersion?: typeof RUN_ARTIFACT_SCHEMA_VERSION;
|
|
2075
|
-
}
|
|
2076
|
-
interface RunArtifactFinalizeInput extends RunArtifactStageInput {
|
|
2077
|
-
finalizedAt?: string;
|
|
2078
|
-
}
|
|
2079
|
-
interface RunArtifactReporterContext {
|
|
2080
|
-
runId?: string;
|
|
2081
|
-
parentRunId?: string | null;
|
|
2082
|
-
artifact?: RunArtifactStageInput & {
|
|
2083
|
-
kind?: RunArtifactKind;
|
|
2084
|
-
suiteIndex?: number;
|
|
2085
|
-
parentRunId?: string | null;
|
|
2086
|
-
};
|
|
2087
|
-
}
|
|
2088
|
-
|
|
2089
|
-
interface RunSummary {
|
|
2090
|
-
results: TestResult[];
|
|
2091
|
-
duration: number;
|
|
2092
|
-
passed: number;
|
|
2093
|
-
failed: number;
|
|
2094
|
-
skipped: number;
|
|
2095
|
-
}
|
|
2096
|
-
interface SuiteSummary {
|
|
2097
|
-
runId?: string;
|
|
2098
|
-
name: string;
|
|
2099
|
-
status: 'passed' | 'failed' | 'cancelled';
|
|
2100
|
-
tests: TestResult[];
|
|
2101
|
-
duration: number;
|
|
2102
|
-
passed: number;
|
|
2103
|
-
failed: number;
|
|
2104
|
-
skipped: number;
|
|
2105
|
-
}
|
|
2106
|
-
interface HookEvent {
|
|
2107
|
-
hookId?: string;
|
|
2108
|
-
hookName: string;
|
|
2109
|
-
phase: 'setup' | 'teardown' | 'inline';
|
|
2110
|
-
hookExecutionId: string;
|
|
2111
|
-
runId?: string;
|
|
2112
|
-
stepId?: string;
|
|
2113
|
-
}
|
|
2114
|
-
interface StepEventContext {
|
|
2115
|
-
runId?: string;
|
|
2116
|
-
parentRunId?: string | null;
|
|
2117
|
-
suiteIndex?: number;
|
|
2118
|
-
suiteTotal?: number;
|
|
2119
|
-
testIndex?: number;
|
|
2120
|
-
stepIndex?: number;
|
|
2121
|
-
stepId?: string;
|
|
2122
|
-
}
|
|
2123
|
-
interface HookResultEvent extends HookEvent {
|
|
2124
|
-
status: 'passed' | 'failed';
|
|
2125
|
-
duration: number;
|
|
2126
|
-
stdout: string;
|
|
2127
|
-
stderr: string;
|
|
2128
|
-
variables: Record<string, string>;
|
|
2129
|
-
error?: string;
|
|
2130
|
-
type?: 'hook' | 'appium-script' | 'runjs';
|
|
2131
|
-
}
|
|
2132
|
-
interface Reporter {
|
|
2133
|
-
onSuiteStart?(suite: SuiteDefinition, context?: RunArtifactReporterContext): void | Promise<void>;
|
|
2134
|
-
onSuiteEnd?(summary: SuiteSummary): void | Promise<void>;
|
|
2135
|
-
onRunStart?(tests: TestDefinition[]): void | Promise<void>;
|
|
2136
|
-
onTestStart?(test: TestDefinition, filePath: string, context?: RunArtifactReporterContext): void | Promise<void>;
|
|
2137
|
-
onStepStart?(step: string, testName: string, context?: StepEventContext): void | Promise<void>;
|
|
2138
|
-
onStepEnd?(result: StepResult, testName: string, context?: StepEventContext): void | Promise<void>;
|
|
2139
|
-
onTestEnd?(result: TestResult): void | Promise<void>;
|
|
2140
|
-
onRunEnd?(summary: RunSummary): void | Promise<void>;
|
|
2141
|
-
onStepPhase?(phase: StepPhaseEvent, stepName: string, testName: string, context?: StepEventContext): void | Promise<void>;
|
|
2142
|
-
onHookStart?(event: HookEvent): void | Promise<void>;
|
|
2143
|
-
onHookEnd?(event: HookResultEvent): void | Promise<void>;
|
|
2144
|
-
}
|
|
2145
|
-
type ReporterEvent = {
|
|
2146
|
-
type: 'suite-start';
|
|
2147
|
-
suite: SuiteDefinition;
|
|
2148
|
-
context?: RunArtifactReporterContext;
|
|
2149
|
-
} | {
|
|
2150
|
-
type: 'suite-end';
|
|
2151
|
-
summary: SuiteSummary;
|
|
2152
|
-
} | {
|
|
2153
|
-
type: 'run-start';
|
|
2154
|
-
tests: TestDefinition[];
|
|
2155
|
-
} | {
|
|
2156
|
-
type: 'test-start';
|
|
2157
|
-
test: TestDefinition;
|
|
2158
|
-
filePath: string;
|
|
2159
|
-
context?: RunArtifactReporterContext;
|
|
2160
|
-
} | {
|
|
2161
|
-
type: 'step-start';
|
|
2162
|
-
step: string;
|
|
2163
|
-
testName: string;
|
|
2164
|
-
context?: StepEventContext;
|
|
2165
|
-
} | {
|
|
2166
|
-
type: 'step-end';
|
|
2167
|
-
result: StepResult;
|
|
2168
|
-
testName: string;
|
|
2169
|
-
context?: StepEventContext;
|
|
2170
|
-
} | {
|
|
2171
|
-
type: 'test-end';
|
|
2172
|
-
result: TestResult;
|
|
2173
|
-
} | {
|
|
2174
|
-
type: 'run-end';
|
|
2175
|
-
summary: RunSummary;
|
|
2176
|
-
} | {
|
|
2177
|
-
type: 'step-phase';
|
|
2178
|
-
phase: StepPhaseEvent;
|
|
2179
|
-
stepName: string;
|
|
2180
|
-
testName: string;
|
|
2181
|
-
context?: StepEventContext;
|
|
2182
|
-
} | {
|
|
2183
|
-
type: 'hook-start';
|
|
2184
|
-
event: HookEvent;
|
|
2185
|
-
} | {
|
|
2186
|
-
type: 'hook-end';
|
|
2187
|
-
event: HookResultEvent;
|
|
2188
|
-
};
|
|
2189
|
-
declare class FatalReporterError extends Error {
|
|
2190
|
-
readonly fatal = true;
|
|
2191
|
-
constructor(message: string, options?: ErrorOptions);
|
|
2192
|
-
}
|
|
2193
|
-
declare class MultiReporter implements Reporter {
|
|
2194
|
-
private reporters;
|
|
2195
|
-
constructor(reporters: Reporter[]);
|
|
2196
|
-
private handleReporterError;
|
|
2197
|
-
onSuiteStart(suite: SuiteDefinition, context?: RunArtifactReporterContext): Promise<void>;
|
|
2198
|
-
onSuiteEnd(summary: SuiteSummary): Promise<void>;
|
|
2199
|
-
onRunStart(tests: TestDefinition[]): Promise<void>;
|
|
2200
|
-
onTestStart(test: TestDefinition, filePath: string, context?: RunArtifactReporterContext): Promise<void>;
|
|
2201
|
-
onStepStart(step: string, testName: string, context?: StepEventContext): Promise<void>;
|
|
2202
|
-
onStepEnd(result: StepResult, testName: string, context?: StepEventContext): Promise<void>;
|
|
2203
|
-
onTestEnd(result: TestResult): Promise<void>;
|
|
2204
|
-
onRunEnd(summary: RunSummary): Promise<void>;
|
|
2205
|
-
onStepPhase(phase: StepPhaseEvent, stepName: string, testName: string, context?: StepEventContext): Promise<void>;
|
|
2206
|
-
onHookStart(event: HookEvent): Promise<void>;
|
|
2207
|
-
onHookEnd(event: HookResultEvent): Promise<void>;
|
|
2208
|
-
}
|
|
2209
|
-
|
|
2210
|
-
type HookRuntime = 'node' | 'bun' | 'python' | 'bash';
|
|
2211
|
-
interface HookDefinition {
|
|
2212
|
-
id: string;
|
|
2213
|
-
name: string;
|
|
2214
|
-
runtime: HookRuntime;
|
|
2215
|
-
file: string;
|
|
2216
|
-
deps: string[];
|
|
2217
|
-
packageFile?: string;
|
|
2218
|
-
timeout: number;
|
|
2219
|
-
network: boolean;
|
|
2220
|
-
}
|
|
2221
|
-
interface HookResult {
|
|
2222
|
-
success: boolean;
|
|
2223
|
-
variables: Record<string, string>;
|
|
2224
|
-
output: string;
|
|
2225
|
-
stdout: string;
|
|
2226
|
-
stderr: string;
|
|
2227
|
-
duration: number;
|
|
2228
|
-
error?: string;
|
|
2229
|
-
}
|
|
2230
|
-
declare const RUNTIME_IMAGE_MAP: Record<HookRuntime, string>;
|
|
2231
|
-
|
|
2232
|
-
interface SandboxRunnerOptions {
|
|
2233
|
-
dockerBin?: string;
|
|
2234
|
-
pullPolicy?: 'always' | 'if-not-present' | 'never';
|
|
2235
|
-
envVars?: Record<string, string>;
|
|
2236
|
-
secretStore?: SecretStore;
|
|
2237
|
-
secretRedactor?: SecretRedactor;
|
|
2238
|
-
authState?: RuntimeAuthStateConfig;
|
|
2239
|
-
}
|
|
2240
|
-
declare function checkDockerAvailable(dockerBin?: string): Promise<boolean>;
|
|
2241
|
-
declare function runHookInSandbox(hook: HookDefinition, options?: SandboxRunnerOptions): Promise<HookResult>;
|
|
2242
|
-
|
|
2243
|
-
interface AccessibilityCheckOptions {
|
|
2244
|
-
standard?: 'wcag2a' | 'wcag2aa' | 'wcag2aaa';
|
|
2245
|
-
disableRules?: string[];
|
|
2246
|
-
exclude?: string[];
|
|
2247
|
-
}
|
|
2248
|
-
type AccessibilityCheck = (page: unknown, options: AccessibilityCheckOptions) => Promise<AccessibilityViolation[]>;
|
|
2249
|
-
interface RunTestConfig {
|
|
2250
|
-
runId?: string;
|
|
2251
|
-
parentRunId?: string | null;
|
|
2252
|
-
adapter: PlatformAdapter;
|
|
2253
|
-
planner: Planner;
|
|
2254
|
-
verifier?: Verifier;
|
|
2255
|
-
cache?: ActionCache;
|
|
2256
|
-
healingConfig: HealingConfig;
|
|
2257
|
-
plannerModel: LanguageModel;
|
|
2258
|
-
verifierModel: LanguageModel;
|
|
2259
|
-
reporters?: Reporter[];
|
|
2260
|
-
captureScreenshots?: boolean;
|
|
2261
|
-
screenshotMode?: 'failure' | 'every-step';
|
|
2262
|
-
timeouts?: {
|
|
2263
|
-
step?: number;
|
|
2264
|
-
test?: number;
|
|
2265
|
-
navigation?: number;
|
|
2266
|
-
};
|
|
2267
|
-
recording?: {
|
|
2268
|
-
enabled: boolean;
|
|
2269
|
-
videoDir: string;
|
|
2270
|
-
videoSize?: {
|
|
2271
|
-
width: number;
|
|
2272
|
-
height: number;
|
|
2273
|
-
};
|
|
2274
|
-
};
|
|
2275
|
-
accessibility?: {
|
|
2276
|
-
enabled: boolean;
|
|
2277
|
-
standard?: 'wcag2a' | 'wcag2aa' | 'wcag2aaa';
|
|
2278
|
-
runAfter?: 'every-step' | 'navigation' | 'test-end';
|
|
2279
|
-
failOnViolation?: boolean;
|
|
2280
|
-
disableRules?: string[];
|
|
2281
|
-
exclude?: string[];
|
|
2282
|
-
};
|
|
2283
|
-
accessibilityCheck?: AccessibilityCheck;
|
|
2284
|
-
plannerConfig?: PlannerConfig;
|
|
2285
|
-
logger?: LogManager;
|
|
2286
|
-
configContent?: string;
|
|
2287
|
-
testFileContent?: string;
|
|
2288
|
-
envFileVars?: Record<string, string>;
|
|
2289
|
-
inlineVars?: Record<string, string>;
|
|
2290
|
-
suiteVars?: Record<string, string>;
|
|
2291
|
-
cliVars?: Record<string, string>;
|
|
2292
|
-
hookSetupVars?: Record<string, string>;
|
|
2293
|
-
inlineHookDefs?: Map<string, HookDefinition>;
|
|
2294
|
-
inlineHookSandboxOptions?: SandboxRunnerOptions;
|
|
2295
|
-
suiteFileContent?: string;
|
|
2296
|
-
suiteTestIndex?: number;
|
|
2297
|
-
suiteContext?: string;
|
|
2298
|
-
logCapture?: {
|
|
2299
|
-
console?: boolean;
|
|
2300
|
-
network?: boolean;
|
|
2301
|
-
};
|
|
2302
|
-
screenshotSize?: number;
|
|
2303
|
-
effectiveResolution?: number;
|
|
2304
|
-
contextWindow?: number;
|
|
2305
|
-
memoryProvider?: MemoryProvider;
|
|
2306
|
-
memoryInitParams?: MemoryIndexParams;
|
|
2307
|
-
circuitBreaker?: CircuitBreaker;
|
|
2308
|
-
skipReporterOnTestStart?: boolean;
|
|
2309
|
-
skipReporterOnTestEnd?: boolean;
|
|
2310
|
-
secretStore?: SecretStore;
|
|
2311
|
-
secretRedactor?: SecretRedactor;
|
|
2312
|
-
secretsFileMetadata?: {
|
|
2313
|
-
path: string | null;
|
|
2314
|
-
status: string;
|
|
2315
|
-
count?: number;
|
|
2316
|
-
} | null;
|
|
2317
|
-
}
|
|
2318
|
-
declare function runTest(test: TestDefinition, config: RunTestConfig, filePath: string, failureContext?: string): Promise<TestResult>;
|
|
2319
|
-
declare function runTestWithRetry(test: TestDefinition, config: RunTestConfig, filePath: string): Promise<TestResult>;
|
|
2320
|
-
|
|
2321
|
-
interface InlineHookCall {
|
|
2322
|
-
hookId: string;
|
|
2323
|
-
fullMatch: string;
|
|
2324
|
-
}
|
|
2325
|
-
declare function parseHookInline(text: string): InlineHookCall[];
|
|
2326
|
-
declare function stripHookInline(text: string): string;
|
|
2327
|
-
|
|
2328
|
-
declare function generateFailureSummary(steps: StepResult[]): string;
|
|
2329
|
-
|
|
2330
|
-
declare const ExtractionResultSchema: z.ZodObject<{
|
|
2331
|
-
value: z.ZodString;
|
|
2332
|
-
reasoning: z.ZodString;
|
|
2333
|
-
}, z.core.$strip>;
|
|
2334
|
-
type VariableSource = 'env' | 'inline' | 'suite' | 'cli' | 'capture' | 'hook' | 'step';
|
|
2335
|
-
declare class VariableStore {
|
|
2336
|
-
private storage;
|
|
2337
|
-
set(name: string, value: string, source?: VariableSource): void;
|
|
2338
|
-
get(name: string): string | undefined;
|
|
2339
|
-
has(name: string): boolean;
|
|
2340
|
-
getSource(name: string): VariableSource | undefined;
|
|
2341
|
-
getAll(): Map<string, string>;
|
|
2342
|
-
setAll(vars: Record<string, string>, source?: VariableSource): void;
|
|
2343
|
-
snapshot(): Record<string, {
|
|
2344
|
-
value: string;
|
|
2345
|
-
source: VariableSource;
|
|
2346
|
-
}>;
|
|
2347
|
-
}
|
|
2348
|
-
declare function parseEnvFile(content: string): Record<string, string>;
|
|
2349
|
-
declare function serializeEnvFile(vars: Record<string, string>): string;
|
|
2350
|
-
declare function interpolateVariables(template: string, store: VariableStore): string;
|
|
2351
|
-
interface UnresolvedTemplate {
|
|
2352
|
-
pattern: string;
|
|
2353
|
-
message: string;
|
|
2354
|
-
}
|
|
2355
|
-
declare function findUnresolvedTemplates(text: string): UnresolvedTemplate[];
|
|
2356
|
-
declare function findBareVariables(text: string): string[];
|
|
2357
|
-
declare class ExplicitExtractor implements VariableExtractor {
|
|
2358
|
-
extract(input: ExtractorInput, screenState: ScreenState): Promise<CaptureResult>;
|
|
2359
|
-
private extractByRegex;
|
|
2360
|
-
private extractBySelector;
|
|
2361
|
-
}
|
|
2362
|
-
declare class LLMVariableExtractor implements VariableExtractor {
|
|
2363
|
-
private model;
|
|
2364
|
-
constructor(model: LanguageModel);
|
|
2365
|
-
extract(input: ExtractorInput, screenState: ScreenState): Promise<CaptureResult>;
|
|
2366
|
-
}
|
|
2367
|
-
declare function createExtractor(model?: LanguageModel, method?: string): VariableExtractor;
|
|
2368
|
-
|
|
2369
|
-
declare class FileActionCache implements ActionCache {
|
|
2370
|
-
private dir;
|
|
2371
|
-
private ttlMs;
|
|
2372
|
-
private logger?;
|
|
2373
|
-
constructor(config: {
|
|
2374
|
-
dir: string;
|
|
2375
|
-
ttl: number | string;
|
|
2376
|
-
logger?: ScopedLogger;
|
|
2377
|
-
});
|
|
2378
|
-
get(stepHash: string, screenHash: string): Promise<ActionPlan | null>;
|
|
2379
|
-
set(stepHash: string, screenHash: string, plan: ActionPlan, metadata?: {
|
|
2380
|
-
model: string;
|
|
2381
|
-
provider: string;
|
|
2382
|
-
stepInstruction: string;
|
|
2383
|
-
}): Promise<void>;
|
|
2384
|
-
invalidate(stepHash: string, screenHash: string): Promise<void>;
|
|
2385
|
-
getSubAction(stepHash: string, index: number): Promise<ActionPlan | null>;
|
|
2386
|
-
setSubAction(stepHash: string, index: number, plan: ActionPlan): Promise<void>;
|
|
2387
|
-
invalidateSubActionsFrom(stepHash: string, fromIndex: number): Promise<void>;
|
|
2388
|
-
private buildPath;
|
|
2389
|
-
}
|
|
2390
|
-
declare function parseTTL(ttl: string): number;
|
|
2391
|
-
|
|
2392
|
-
declare class NullActionCache implements ActionCache {
|
|
2393
|
-
get(_stepHash: string, _screenHash: string): Promise<ActionPlan | null>;
|
|
2394
|
-
set(_stepHash: string, _screenHash: string, _plan: ActionPlan): Promise<void>;
|
|
2395
|
-
invalidate(_stepHash: string, _screenHash: string): Promise<void>;
|
|
2396
|
-
getSubAction(_stepHash: string, _index: number): Promise<ActionPlan | null>;
|
|
2397
|
-
setSubAction(_stepHash: string, _index: number, _plan: ActionPlan): Promise<void>;
|
|
2398
|
-
invalidateSubActionsFrom(_stepHash: string, _fromIndex: number): Promise<void>;
|
|
2399
|
-
}
|
|
2400
|
-
|
|
2401
|
-
declare const CACHE_SCHEMA_VERSION = 9;
|
|
2402
|
-
interface CacheEntry {
|
|
2403
|
-
schemaVersion?: number;
|
|
2404
|
-
stepInstruction: string;
|
|
2405
|
-
stepHash: string;
|
|
2406
|
-
screenHash: string;
|
|
2407
|
-
plan: ActionPlan;
|
|
2408
|
-
createdAt: string;
|
|
2409
|
-
model: string;
|
|
2410
|
-
provider: string;
|
|
2411
|
-
}
|
|
2412
|
-
|
|
2413
|
-
interface ConsoleReporterOptions {
|
|
2414
|
-
verbose?: boolean;
|
|
2415
|
-
colorize?: boolean;
|
|
2416
|
-
logLevel?: string;
|
|
2417
|
-
plain?: boolean;
|
|
2418
|
-
}
|
|
2419
|
-
declare class ConsoleReporter implements Reporter {
|
|
2420
|
-
private verbose;
|
|
2421
|
-
private colorize;
|
|
2422
|
-
private plain;
|
|
2423
|
-
private inSuite;
|
|
2424
|
-
private hookPhaseStarted;
|
|
2425
|
-
private lastHookPhase;
|
|
2426
|
-
private canOverwrite;
|
|
2427
|
-
private stepsPassed;
|
|
2428
|
-
private stepsFailed;
|
|
2429
|
-
private stepsSkipped;
|
|
2430
|
-
private cacheHits;
|
|
2431
|
-
private cacheMisses;
|
|
2432
|
-
private lastWriteLen;
|
|
2433
|
-
constructor(options?: ConsoleReporterOptions);
|
|
2434
|
-
private c;
|
|
2435
|
-
private stripAnsi;
|
|
2436
|
-
private clearWrappedLines;
|
|
2437
|
-
private writeLine;
|
|
2438
|
-
private printLine;
|
|
2439
|
-
private testBadge;
|
|
2440
|
-
private resetCounters;
|
|
2441
|
-
private formatStepsLine;
|
|
2442
|
-
private formatCacheLine;
|
|
2443
|
-
onSuiteStart(suite: SuiteDefinition): void;
|
|
2444
|
-
onRunStart(tests: TestDefinition[]): void;
|
|
2445
|
-
onTestStart(test: TestDefinition, filePath: string): void;
|
|
2446
|
-
onStepStart(step: string, _testName: string): void;
|
|
2447
|
-
onStepEnd(result: StepResult, _testName: string): void;
|
|
2448
|
-
onHookStart(event: HookEvent): void;
|
|
2449
|
-
onHookEnd(event: HookResultEvent): void;
|
|
2450
|
-
onTestEnd(result: TestResult): void;
|
|
2451
|
-
onRunEnd(summary: RunSummary): void;
|
|
2452
|
-
onSuiteEnd(summary: SuiteSummary): void;
|
|
2453
|
-
private printStandaloneSummary;
|
|
2454
|
-
private printFailedTests;
|
|
2455
|
-
private statusIcon;
|
|
2456
|
-
}
|
|
2457
|
-
|
|
2458
|
-
interface JUnitReporterOptions {
|
|
2459
|
-
outputPath: string;
|
|
2460
|
-
}
|
|
2461
|
-
declare class JUnitReporter implements Reporter {
|
|
2462
|
-
private outputPath;
|
|
2463
|
-
private results;
|
|
2464
|
-
private inSuiteRun;
|
|
2465
|
-
constructor(options: JUnitReporterOptions);
|
|
2466
|
-
onSuiteStart(_suite: SuiteDefinition): void;
|
|
2467
|
-
onTestEnd(result: TestResult): void;
|
|
2468
|
-
onRunEnd(summary: RunSummary): Promise<void>;
|
|
2469
|
-
onSuiteEnd(summary: SuiteSummary): Promise<void>;
|
|
2470
|
-
private writeXml;
|
|
2471
|
-
private buildXml;
|
|
2472
|
-
private buildSuiteXml;
|
|
2473
|
-
private buildTestCase;
|
|
2474
|
-
private getFailureMessage;
|
|
2475
|
-
private buildFailureDetails;
|
|
2476
|
-
private buildStepSummary;
|
|
2477
|
-
}
|
|
2478
|
-
|
|
2479
|
-
declare function captureFailureScreenshot(adapter: PlatformAdapter): Promise<Buffer | undefined>;
|
|
2480
|
-
|
|
2481
|
-
interface StdoutLiveReporterOptions {
|
|
2482
|
-
active?: boolean;
|
|
2483
|
-
redactor?: SecretRedactor;
|
|
2484
|
-
}
|
|
2485
|
-
declare class StdoutLiveReporter implements Reporter {
|
|
2486
|
-
private active;
|
|
2487
|
-
private heartbeatInterval;
|
|
2488
|
-
private activeRunId;
|
|
2489
|
-
private activeParentRunId;
|
|
2490
|
-
private activeSuiteIndex;
|
|
2491
|
-
private activeSuiteTotal;
|
|
2492
|
-
private redactor?;
|
|
2493
|
-
constructor(options?: StdoutLiveReporterOptions);
|
|
2494
|
-
private emit;
|
|
2495
|
-
private withRunId;
|
|
2496
|
-
private withRunContext;
|
|
2497
|
-
onTestStart(test: TestDefinition, filePath: string, context?: RunArtifactReporterContext): void;
|
|
2498
|
-
onStepStart(step: string, testName: string, context?: StepEventContext): void;
|
|
2499
|
-
onStepEnd(result: StepResult, testName: string, context?: StepEventContext): void;
|
|
2500
|
-
onStepPhase(phase: StepPhaseEvent, stepName: string, testName: string, context?: StepEventContext): void;
|
|
2501
|
-
onHookStart(event: HookEvent): void;
|
|
2502
|
-
onHookEnd(event: HookResultEvent): void;
|
|
2503
|
-
onTestEnd(result: TestResult): void;
|
|
2504
|
-
}
|
|
2505
|
-
|
|
2506
1091
|
interface MobileNode {
|
|
2507
1092
|
index: number;
|
|
2508
1093
|
type: string;
|
|
@@ -2517,10 +1102,16 @@ interface MobileNode {
|
|
|
2517
1102
|
enabled?: boolean;
|
|
2518
1103
|
children: MobileNode[];
|
|
2519
1104
|
}
|
|
2520
|
-
|
|
1105
|
+
/**
|
|
1106
|
+
* Execute-time resolution record for a single builder-minted ref. Reconstructed by
|
|
1107
|
+
* `buildRefEntries` from the interim nodes + the builder's ref->node binding, this is
|
|
1108
|
+
* how the mobile adapters keep the v1 `lastRefs` locator pattern alive after the
|
|
1109
|
+
* shared builder took over ref minting (D-01/D-03). Every field here is one that
|
|
1110
|
+
* `element-resolver.ts`/`gestures.ts` actually read at execute time.
|
|
1111
|
+
*/
|
|
1112
|
+
interface RefEntry {
|
|
2521
1113
|
role: string;
|
|
2522
1114
|
name?: string;
|
|
2523
|
-
nth?: number;
|
|
2524
1115
|
bounds?: {
|
|
2525
1116
|
x: number;
|
|
2526
1117
|
y: number;
|
|
@@ -2529,20 +1120,50 @@ type MobileRefMap = Record<string, {
|
|
|
2529
1120
|
};
|
|
2530
1121
|
nativeType?: string;
|
|
2531
1122
|
value?: string;
|
|
2532
|
-
|
|
2533
|
-
|
|
2534
|
-
|
|
2535
|
-
|
|
2536
|
-
|
|
1123
|
+
editable?: boolean;
|
|
1124
|
+
/** Android's raw `input-type` bitmask from the observed node (437 D-15). */
|
|
1125
|
+
inputType?: number;
|
|
1126
|
+
}
|
|
1127
|
+
/** Execute-time ref -> resolution record map (adapter-private `lastRefs`). */
|
|
1128
|
+
type MobileRefMap = Record<string, RefEntry>;
|
|
1129
|
+
/** parseMobileSource result — a plain interim-node list; ref minting, tree rendering,
|
|
1130
|
+
* and the viewport-summary header all moved into the shared builder (Plan 352-01). */
|
|
1131
|
+
interface ParsedMobileSource {
|
|
1132
|
+
nodes: InterimNode[];
|
|
2537
1133
|
}
|
|
2538
1134
|
|
|
2539
1135
|
declare function parseMobileSource(xml: string, platform: 'android' | 'ios', viewport?: {
|
|
2540
1136
|
width: number;
|
|
2541
1137
|
height: number;
|
|
2542
|
-
}):
|
|
1138
|
+
}): ParsedMobileSource;
|
|
1139
|
+
/**
|
|
1140
|
+
* Reconstruct the execute-time `lastRefs` record from the interim nodes plus the shared
|
|
1141
|
+
* builder's ref->node binding (D-01/D-03). The mobile adapters store this privately so
|
|
1142
|
+
* planner-ref -> live-node resolution survives the builder taking over ref minting. No
|
|
1143
|
+
* position lives anywhere: not here, not on the binding, not on ElementInfo (438 D-13).
|
|
1144
|
+
*/
|
|
1145
|
+
declare function buildRefEntries(nodes: InterimNode[], binding: Record<string, RefBinding>): Record<string, RefEntry>;
|
|
1146
|
+
/**
|
|
1147
|
+
* Best-effort mobile scroll metadata (D-10). Unlike web — which reads the exact window
|
|
1148
|
+
* scroll offset and document content size — mobile page source exposes no true scroll
|
|
1149
|
+
* position, so this is a documented approximation, explicit and never silently precise:
|
|
1150
|
+
* contentWidth/contentHeight are the maximum element extent across all node bounds
|
|
1151
|
+
* (falling back to the viewport dimensions when no node carries bounds), and
|
|
1152
|
+
* offsetX/offsetY stay 0 (no reliable scroll-offset signal in the source).
|
|
1153
|
+
*/
|
|
1154
|
+
declare function deriveMobileScroll(nodes: InterimNode[], viewport: {
|
|
1155
|
+
width: number;
|
|
1156
|
+
height: number;
|
|
1157
|
+
}): {
|
|
1158
|
+
offsetX: number;
|
|
1159
|
+
offsetY: number;
|
|
1160
|
+
contentWidth: number;
|
|
1161
|
+
contentHeight: number;
|
|
1162
|
+
};
|
|
2543
1163
|
|
|
2544
1164
|
declare const ANDROID_ROLE_MAP: Record<string, string>;
|
|
2545
1165
|
declare const IOS_ROLE_MAP: Record<string, string>;
|
|
1166
|
+
declare const IOS_EDITABLE_TYPES: ReadonlySet<string>;
|
|
2546
1167
|
declare function normalizeRole(type: string, platform: 'android' | 'ios'): string;
|
|
2547
1168
|
|
|
2548
1169
|
declare class MobileElementResolver {
|
|
@@ -2699,12 +1320,33 @@ declare function localAppiumBinaryNames(platform?: NodeJS.Platform): string[];
|
|
|
2699
1320
|
declare function resolveAppiumExecutable(opts?: ResolveAppiumExecutableOptions): ResolvedAppiumExecutable;
|
|
2700
1321
|
declare function formatAppiumInstallGuidance(): string;
|
|
2701
1322
|
|
|
2702
|
-
|
|
1323
|
+
/** One WebView scroller with a structural identity: `document`, or a flat-tree path plus tag, id and class. */
|
|
1324
|
+
interface IdentifiedScrollOffsets extends DocumentScrollOffsets {
|
|
1325
|
+
id: string;
|
|
1326
|
+
}
|
|
1327
|
+
/**
|
|
1328
|
+
* A WebDriver `execute` function body. It answers `null` when a frame (`iframe`, `frame`, `embed`,
|
|
1329
|
+
* `object`, `fencedframe`) with positive area intersects the viewport, because a swipe over it
|
|
1330
|
+
* moves content the page cannot measure. Otherwise it answers the document scroller first (id
|
|
1331
|
+
* `document`), then every on-screen element scroller in the document and its open shadow roots,
|
|
1332
|
+
* in tree order. A body whose overflow propagates to the viewport is not a member. Nothing is
|
|
1333
|
+
* written to the page: ids derive from structure alone. Closed shadow roots are unreachable.
|
|
1334
|
+
*/
|
|
1335
|
+
declare const WEBVIEW_SCROLLERS_SCRIPT: string;
|
|
1336
|
+
/** A non-empty array of members with string ids, finite offsets and no duplicate id; else undefined. */
|
|
1337
|
+
declare function parseWebViewScrollers(raw: unknown): IdentifiedScrollOffsets[] | undefined;
|
|
1338
|
+
/**
|
|
1339
|
+
* Before and after are paired by id. The same membership is judged by the scroller-set rule; a
|
|
1340
|
+
* changed membership is `moved` only when a member present in both reads moved, else `unknown`.
|
|
1341
|
+
*/
|
|
1342
|
+
declare function webViewSwipeSignal(direction: Direction, before: readonly IdentifiedScrollOffsets[] | undefined, after: readonly IdentifiedScrollOffsets[] | undefined): SwipeSignal;
|
|
1343
|
+
|
|
1344
|
+
declare const AUTH_STATE_SCHEMA_VERSION = 2;
|
|
2703
1345
|
declare const AUTH_STATE_SLUG_PATTERN: RegExp;
|
|
2704
1346
|
declare const AuthStateNameSchema: z.ZodString;
|
|
2705
1347
|
declare const TargetNameSchema: z.ZodString;
|
|
2706
1348
|
declare const AuthStateMetadataSchema: z.ZodObject<{
|
|
2707
|
-
version: z.ZodLiteral<
|
|
1349
|
+
version: z.ZodLiteral<2>;
|
|
2708
1350
|
kind: z.ZodLiteral<"web">;
|
|
2709
1351
|
target: z.ZodString;
|
|
2710
1352
|
name: z.ZodString;
|
|
@@ -2788,27 +1430,6 @@ interface ResolvedAuthStateForRun {
|
|
|
2788
1430
|
}
|
|
2789
1431
|
declare function resolveAuthStateForRun(input: ResolveAuthStateForRunInput): Promise<ResolvedAuthStateForRun>;
|
|
2790
1432
|
|
|
2791
|
-
declare const AUTH_STATE_HOOK_JSON_ENV = "AGENT_QA_AUTH_STATE_JSON";
|
|
2792
|
-
declare const AUTH_STATE_HOOK_STORAGE_STATE_PATH_ENV = "AGENT_QA_AUTH_STATE_STORAGE_STATE_PATH";
|
|
2793
|
-
declare const AUTH_STATE_HOOK_WORKSPACE_DIR = ".agent-qa-auth-state";
|
|
2794
|
-
declare const AUTH_STATE_HOOK_STORAGE_STATE_FILENAME = "storage-state.json";
|
|
2795
|
-
declare const AUTH_STATE_HOOK_CONTAINER_STORAGE_STATE_PATH = "/workspace/.agent-qa-auth-state/storage-state.json";
|
|
2796
|
-
declare function isReservedAuthStateHookEnvKey(key: string): boolean;
|
|
2797
|
-
declare function stripReservedAuthStateHookEnv(variables: Record<string, string>): Record<string, string>;
|
|
2798
|
-
declare function buildAuthStateHookEnv(authState: RuntimeAuthStateConfig | undefined, storageStatePath?: string): Record<string, string>;
|
|
2799
|
-
|
|
2800
|
-
declare const AUTH_STATE_REDACTION_MARKER = "[auth state redacted]";
|
|
2801
|
-
interface AuthStateRedactionContext {
|
|
2802
|
-
secretRedactor?: SecretRedactor;
|
|
2803
|
-
authState?: RuntimeAuthStateConfig;
|
|
2804
|
-
storageStatePath?: string;
|
|
2805
|
-
hookStorageStatePath?: string;
|
|
2806
|
-
hookJsonEnv?: string;
|
|
2807
|
-
redactAuthLikeKeys?: boolean;
|
|
2808
|
-
}
|
|
2809
|
-
declare function redactAuthStateString(value: string, context?: AuthStateRedactionContext): string;
|
|
2810
|
-
declare function redactAuthStateValue<T>(value: T, context?: AuthStateRedactionContext): T;
|
|
2811
|
-
|
|
2812
1433
|
type AuthProvider = string;
|
|
2813
1434
|
type LLMModelAdapter = 'openai-responses' | 'anthropic-messages';
|
|
2814
1435
|
type BuiltInLLMProviderMode = 'openai-compatible' | 'anthropic-compatible' | 'openai-subscription' | 'anthropic-subscription' | 'gemini';
|
|
@@ -2877,6 +1498,7 @@ interface LLMAuthConfig {
|
|
|
2877
1498
|
baseURL?: string;
|
|
2878
1499
|
providerHeaders?: Record<string, string>;
|
|
2879
1500
|
}
|
|
1501
|
+
declare const PUBLIC_PROVIDER_API_HOSTS: readonly string[];
|
|
2880
1502
|
declare function resolveLLMAuth(configName: string, llmConfig: LLMAuthConfig, authPath?: string): Promise<ResolvedLLMAuth>;
|
|
2881
1503
|
|
|
2882
1504
|
type DashboardAuthMode = 'browser-poll' | 'manual-code';
|
|
@@ -2950,6 +1572,195 @@ interface CreateAuthFetchOptions {
|
|
|
2950
1572
|
}
|
|
2951
1573
|
declare function createAuthFetch(options: CreateAuthFetchOptions): typeof globalThis.fetch;
|
|
2952
1574
|
|
|
1575
|
+
type ProviderPluginDeclaration = {
|
|
1576
|
+
package: string;
|
|
1577
|
+
path?: never;
|
|
1578
|
+
} | {
|
|
1579
|
+
path: string;
|
|
1580
|
+
package?: never;
|
|
1581
|
+
};
|
|
1582
|
+
interface ProviderPluginDescriptor {
|
|
1583
|
+
id: string;
|
|
1584
|
+
label: string;
|
|
1585
|
+
adapter: (transport: unknown, modelId: string) => unknown;
|
|
1586
|
+
authModes: string[];
|
|
1587
|
+
needsBaseURL?: boolean;
|
|
1588
|
+
subscription?: boolean;
|
|
1589
|
+
credentialOptional?: boolean;
|
|
1590
|
+
modelAdapter?: string;
|
|
1591
|
+
baseURLPlaceholder?: string;
|
|
1592
|
+
defaultModel?: string;
|
|
1593
|
+
}
|
|
1594
|
+
interface LoadProviderPluginsOptions {
|
|
1595
|
+
baseDir?: string;
|
|
1596
|
+
}
|
|
1597
|
+
declare function loadProviderPlugins(declarations: ProviderPluginDeclaration[] | undefined, options?: LoadProviderPluginsOptions): Promise<ProviderPluginDescriptor[]>;
|
|
1598
|
+
declare function clearLoadedProviderPluginModules(): void;
|
|
1599
|
+
|
|
1600
|
+
type LogLevel = 'silent' | 'error' | 'warn' | 'info' | 'debug';
|
|
1601
|
+
declare const LOG_LEVEL_PRIORITY: Record<LogLevel, number>;
|
|
1602
|
+
type LogSource = 'agent' | 'adapter' | 'cache' | 'planner' | 'hook' | 'runner';
|
|
1603
|
+
interface LogEntry {
|
|
1604
|
+
id: string;
|
|
1605
|
+
stepId: string | null;
|
|
1606
|
+
runId: string;
|
|
1607
|
+
level: Exclude<LogLevel, 'silent'>;
|
|
1608
|
+
source: LogSource;
|
|
1609
|
+
message: string;
|
|
1610
|
+
data: Record<string, unknown>;
|
|
1611
|
+
timestamp: string;
|
|
1612
|
+
}
|
|
1613
|
+
interface LogStorage {
|
|
1614
|
+
insertLogs(entries: LogEntry[]): void;
|
|
1615
|
+
getLogs(opts: {
|
|
1616
|
+
runId?: string;
|
|
1617
|
+
stepId?: string;
|
|
1618
|
+
level?: string;
|
|
1619
|
+
source?: string;
|
|
1620
|
+
limit?: number;
|
|
1621
|
+
offset?: number;
|
|
1622
|
+
}): LogEntry[];
|
|
1623
|
+
}
|
|
1624
|
+
interface ScopedLogger {
|
|
1625
|
+
debug(msg: string, data?: Record<string, unknown>): void;
|
|
1626
|
+
info(msg: string, data?: Record<string, unknown>): void;
|
|
1627
|
+
warn(msg: string, data?: Record<string, unknown>): void;
|
|
1628
|
+
error(msg: string, data?: Record<string, unknown>): void;
|
|
1629
|
+
}
|
|
1630
|
+
declare const AgentLogDataSchema: z.ZodObject<{
|
|
1631
|
+
extractDom: z.ZodOptional<z.ZodBoolean>;
|
|
1632
|
+
hasScreenshot: z.ZodOptional<z.ZodBoolean>;
|
|
1633
|
+
duration: z.ZodOptional<z.ZodNumber>;
|
|
1634
|
+
elementCount: z.ZodOptional<z.ZodNumber>;
|
|
1635
|
+
}, z.core.$strip>;
|
|
1636
|
+
declare const AdapterLogDataSchema: z.ZodObject<{
|
|
1637
|
+
actionType: z.ZodOptional<z.ZodString>;
|
|
1638
|
+
selector: z.ZodOptional<z.ZodString>;
|
|
1639
|
+
coordinates: z.ZodOptional<z.ZodObject<{
|
|
1640
|
+
x: z.ZodNumber;
|
|
1641
|
+
y: z.ZodNumber;
|
|
1642
|
+
}, z.core.$strip>>;
|
|
1643
|
+
elementProperties: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
1644
|
+
duration: z.ZodOptional<z.ZodNumber>;
|
|
1645
|
+
}, z.core.$strip>;
|
|
1646
|
+
declare const CacheLogDataSchema: z.ZodObject<{
|
|
1647
|
+
operation: z.ZodEnum<{
|
|
1648
|
+
set: "set";
|
|
1649
|
+
get: "get";
|
|
1650
|
+
invalidate: "invalidate";
|
|
1651
|
+
bypass: "bypass";
|
|
1652
|
+
"batch-purge": "batch-purge";
|
|
1653
|
+
}>;
|
|
1654
|
+
stepHash: z.ZodOptional<z.ZodString>;
|
|
1655
|
+
screenHash: z.ZodOptional<z.ZodString>;
|
|
1656
|
+
hit: z.ZodOptional<z.ZodBoolean>;
|
|
1657
|
+
age: z.ZodOptional<z.ZodNumber>;
|
|
1658
|
+
entriesDeleted: z.ZodOptional<z.ZodNumber>;
|
|
1659
|
+
}, z.core.$strip>;
|
|
1660
|
+
declare const PlannerLogDataSchema: z.ZodObject<{
|
|
1661
|
+
model: z.ZodOptional<z.ZodString>;
|
|
1662
|
+
promptTokens: z.ZodOptional<z.ZodNumber>;
|
|
1663
|
+
completionTokens: z.ZodOptional<z.ZodNumber>;
|
|
1664
|
+
latencyMs: z.ZodOptional<z.ZodNumber>;
|
|
1665
|
+
confidence: z.ZodOptional<z.ZodNumber>;
|
|
1666
|
+
actionType: z.ZodOptional<z.ZodString>;
|
|
1667
|
+
}, z.core.$strip>;
|
|
1668
|
+
declare const HookLogDataSchema: z.ZodObject<{
|
|
1669
|
+
hookName: z.ZodOptional<z.ZodString>;
|
|
1670
|
+
phase: z.ZodOptional<z.ZodEnum<{
|
|
1671
|
+
setup: "setup";
|
|
1672
|
+
teardown: "teardown";
|
|
1673
|
+
}>>;
|
|
1674
|
+
duration: z.ZodOptional<z.ZodNumber>;
|
|
1675
|
+
success: z.ZodOptional<z.ZodBoolean>;
|
|
1676
|
+
}, z.core.$strip>;
|
|
1677
|
+
declare const RunnerLogDataSchema: z.ZodObject<{
|
|
1678
|
+
stepIndex: z.ZodOptional<z.ZodNumber>;
|
|
1679
|
+
totalSteps: z.ZodOptional<z.ZodNumber>;
|
|
1680
|
+
testName: z.ZodOptional<z.ZodString>;
|
|
1681
|
+
variablesCaptured: z.ZodOptional<z.ZodNumber>;
|
|
1682
|
+
}, z.core.$strip>;
|
|
1683
|
+
declare const LogSourceDataSchemas: Record<LogSource, z.ZodType>;
|
|
1684
|
+
|
|
1685
|
+
/**
|
|
1686
|
+
* One member's run-id binding, held in async context rather than on the manager (WINDOWS #233).
|
|
1687
|
+
*
|
|
1688
|
+
* `pending` is that member's own not-yet-attributed entries — the lines it wrote before it minted
|
|
1689
|
+
* its run id. Only these are backfilled by its `setRunId`, so a sibling can never adopt them.
|
|
1690
|
+
*/
|
|
1691
|
+
interface MemberLogScope {
|
|
1692
|
+
runId: string;
|
|
1693
|
+
readonly pending: LogEntry[];
|
|
1694
|
+
}
|
|
1695
|
+
/**
|
|
1696
|
+
* The host's async-context primitive, named STRUCTURALLY so this package never imports
|
|
1697
|
+
* `node:async_hooks`.
|
|
1698
|
+
*
|
|
1699
|
+
* `packages/core`'s host baseline is a regenerable DEBT record with a per-area clearance map — a
|
|
1700
|
+
* list that is meant to shrink — so a new host import here would be new debt, not a permission.
|
|
1701
|
+
* The composition root already owns every other reach into the world, so it owns this one too and
|
|
1702
|
+
* injects it. `node:async_hooks`'s `AsyncLocalStorage<MemberLogScope>` satisfies this exactly, with
|
|
1703
|
+
* no adapter.
|
|
1704
|
+
*/
|
|
1705
|
+
interface AsyncScopeStore<T> {
|
|
1706
|
+
getStore(): T | undefined;
|
|
1707
|
+
run<R>(store: T, fn: () => R): R;
|
|
1708
|
+
}
|
|
1709
|
+
/** Thrown when a caller asks for member isolation the composition root never wired up. */
|
|
1710
|
+
declare class MemberLogScopeUnavailableError extends Error {
|
|
1711
|
+
constructor();
|
|
1712
|
+
}
|
|
1713
|
+
declare class LogManager {
|
|
1714
|
+
private buffer;
|
|
1715
|
+
private currentStepId;
|
|
1716
|
+
private runId;
|
|
1717
|
+
private runIdSet;
|
|
1718
|
+
private readonly displayLevel;
|
|
1719
|
+
private readonly storage?;
|
|
1720
|
+
private readonly ndjson;
|
|
1721
|
+
private redactor?;
|
|
1722
|
+
private readonly memberScope?;
|
|
1723
|
+
constructor(opts: {
|
|
1724
|
+
runId?: string;
|
|
1725
|
+
displayLevel: LogLevel;
|
|
1726
|
+
storage?: LogStorage;
|
|
1727
|
+
ndjson?: boolean;
|
|
1728
|
+
redactor?: SecretRedactor;
|
|
1729
|
+
memberScope?: AsyncScopeStore<MemberLogScope>;
|
|
1730
|
+
});
|
|
1731
|
+
setRedactor(redactor: SecretRedactor | undefined): void;
|
|
1732
|
+
/**
|
|
1733
|
+
* Run `fn` with its own run-id binding, so concurrent members cannot overwrite each other.
|
|
1734
|
+
*
|
|
1735
|
+
* ONE `LogManager` SERVES EVERY MEMBER of a run — `commands/run.ts` builds it once, outside the
|
|
1736
|
+
* per-member closure — and since 402-02/402-03 the direct path runs members concurrently. Without
|
|
1737
|
+
* a scope, `setRunId` is a single mutable field plus a whole-buffer backfill, so the LAST member
|
|
1738
|
+
* to mint an id claims every line in the buffer, its siblings' included (measured, not inferred).
|
|
1739
|
+
*
|
|
1740
|
+
* Outside a scope nothing changes: `setRunId` keeps its original whole-buffer behaviour, which is
|
|
1741
|
+
* what the sequential path and the run-level `onRunCreated` stamp rely on.
|
|
1742
|
+
*/
|
|
1743
|
+
runInMemberScope<T>(fn: () => T): T;
|
|
1744
|
+
log(level: Exclude<LogLevel, 'silent'>, source: LogSource, message: string, data?: Record<string, unknown>): void;
|
|
1745
|
+
private shouldDisplay;
|
|
1746
|
+
/**
|
|
1747
|
+
* The SECOND writer on the `AGENT_QA_EVENT:` stdout channel — the first is the CLI's
|
|
1748
|
+
* `reporters/wire-reporter.ts`, which prints run-event envelopes on the same prefix. Both are
|
|
1749
|
+
* armed by `AGENT_QA_LIVE_EVENTS=true` (this one indirectly: `commands/run.ts` passes
|
|
1750
|
+
* `ndjson: process.env.AGENT_QA_LIVE_EVENTS === 'true'`), both are off by default, and nothing in
|
|
1751
|
+
* the product sets that variable. Entries are already redacted above, and are printed verbatim.
|
|
1752
|
+
* A supported opt-in; the user-facing contract for both writers is the CLI README's
|
|
1753
|
+
* "Live events on stdout (opt-in)". Do not change this line shape without mirroring it there.
|
|
1754
|
+
*/
|
|
1755
|
+
private emitNdjson;
|
|
1756
|
+
setCurrentStep(stepId: string): void;
|
|
1757
|
+
clearCurrentStep(): void;
|
|
1758
|
+
setRunId(runId: string): void;
|
|
1759
|
+
flush(): void;
|
|
1760
|
+
getBuffer(): LogEntry[];
|
|
1761
|
+
createScopedLogger(source: LogSource): ScopedLogger;
|
|
1762
|
+
}
|
|
1763
|
+
|
|
2953
1764
|
declare function formatLogEntry(entry: LogEntry): string;
|
|
2954
1765
|
|
|
2955
1766
|
interface FarmProvider {
|
|
@@ -3031,106 +1842,41 @@ declare function mapMobileCapabilities(match: Record<string, unknown>, platform:
|
|
|
3031
1842
|
|
|
3032
1843
|
declare const browserstackProvider: FarmProvider;
|
|
3033
1844
|
|
|
3034
|
-
|
|
3035
|
-
|
|
3036
|
-
|
|
3037
|
-
|
|
3038
|
-
|
|
3039
|
-
|
|
3040
|
-
|
|
3041
|
-
|
|
3042
|
-
tokenUsage?: {
|
|
3043
|
-
promptTokens: number;
|
|
3044
|
-
completionTokens: number;
|
|
3045
|
-
totalTokens: number;
|
|
3046
|
-
};
|
|
3047
|
-
}
|
|
3048
|
-
type MemoryDeltaAction = 'add' | 'confirm' | 'deprecate' | 'delete';
|
|
3049
|
-
interface MemoryObservationSnapshot {
|
|
3050
|
-
id: string;
|
|
3051
|
-
title: string;
|
|
3052
|
-
content: string;
|
|
3053
|
-
trust: number;
|
|
3054
|
-
created: string;
|
|
3055
|
-
last_confirmed: string;
|
|
3056
|
-
confirmed_count: number;
|
|
3057
|
-
contradicted_count: number;
|
|
3058
|
-
source_test: string;
|
|
3059
|
-
position?: number;
|
|
3060
|
-
suite_snapshot?: Array<{
|
|
3061
|
-
test: string;
|
|
3062
|
-
id: string;
|
|
3063
|
-
}>;
|
|
3064
|
-
}
|
|
3065
|
-
interface MemoryDelta {
|
|
3066
|
-
action: MemoryDeltaAction;
|
|
3067
|
-
tier: 'products' | 'suites' | 'tests';
|
|
3068
|
-
scope: string;
|
|
3069
|
-
observationId: string;
|
|
3070
|
-
reasoning: string;
|
|
3071
|
-
before: MemoryObservationSnapshot | null;
|
|
3072
|
-
after: MemoryObservationSnapshot | null;
|
|
3073
|
-
error?: string;
|
|
3074
|
-
}
|
|
3075
|
-
interface CuratorContext {
|
|
3076
|
-
testResult: TestResult;
|
|
3077
|
-
provider: MemoryProvider;
|
|
3078
|
-
model: LanguageModel;
|
|
3079
|
-
providerOptions?: ProviderOptions;
|
|
3080
|
-
memoryRoot: string;
|
|
3081
|
-
product: string;
|
|
3082
|
-
testId: string;
|
|
3083
|
-
suiteId?: string;
|
|
3084
|
-
suiteContext?: {
|
|
3085
|
-
tests: Array<{
|
|
3086
|
-
test: string;
|
|
3087
|
-
id: string;
|
|
3088
|
-
}>;
|
|
3089
|
-
position: number;
|
|
3090
|
-
};
|
|
3091
|
-
injectedObservationIds: Map<number, string[]>;
|
|
3092
|
-
trustConfirmDelta?: number;
|
|
3093
|
-
trustContradictDelta?: number;
|
|
3094
|
-
}
|
|
3095
|
-
declare const CuratorResponseSchema: z.ZodObject<{
|
|
3096
|
-
decisions: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
3097
|
-
action: z.ZodLiteral<"add">;
|
|
3098
|
-
title: z.ZodString;
|
|
3099
|
-
content: z.ZodString;
|
|
3100
|
-
scope: z.ZodEnum<{
|
|
3101
|
-
test: "test";
|
|
3102
|
-
product: "product";
|
|
3103
|
-
suite: "suite";
|
|
3104
|
-
}>;
|
|
3105
|
-
reasoning: z.ZodString;
|
|
3106
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
3107
|
-
action: z.ZodLiteral<"update">;
|
|
3108
|
-
observationId: z.ZodString;
|
|
3109
|
-
reasoning: z.ZodString;
|
|
3110
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
3111
|
-
action: z.ZodLiteral<"deprecate">;
|
|
3112
|
-
observationId: z.ZodString;
|
|
3113
|
-
reasoning: z.ZodString;
|
|
3114
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
3115
|
-
action: z.ZodLiteral<"noop">;
|
|
3116
|
-
reasoning: z.ZodString;
|
|
3117
|
-
}, z.core.$strip>], "action">>;
|
|
3118
|
-
}, z.core.$strip>;
|
|
3119
|
-
declare function runCurator(ctx: CuratorContext): Promise<MemoryLog>;
|
|
3120
|
-
declare function deprecateOnFailure(ctx: Pick<CuratorContext, 'testResult' | 'provider' | 'memoryRoot' | 'injectedObservationIds' | 'trustContradictDelta'>): Promise<MemoryLog>;
|
|
3121
|
-
|
|
1845
|
+
/**
|
|
1846
|
+
* Suite run configuration — a types-only contract consumed by the CLI composition root.
|
|
1847
|
+
* The former `runSuite`/`executeSuiteMember` orchestration moved onto runner soil
|
|
1848
|
+
* (`runMemberTest`) in Phase 363; the CLI now composes per-member execution directly and
|
|
1849
|
+
* this interface only describes the shape it passes through. Field types that used to be
|
|
1850
|
+
* borrowed from the (deleted) `RunTestConfig` are inlined here so the module carries no
|
|
1851
|
+
* value dependency on the retired core run path.
|
|
1852
|
+
*/
|
|
3122
1853
|
interface RunSuiteConfig {
|
|
3123
1854
|
runId?: string;
|
|
3124
1855
|
adapter: PlatformAdapter;
|
|
3125
1856
|
platformConfig: PlatformConfig;
|
|
3126
|
-
planner: Planner;
|
|
3127
|
-
verifier
|
|
3128
|
-
cache?:
|
|
3129
|
-
|
|
1857
|
+
planner: Planner$1;
|
|
1858
|
+
verifier: Verifier$1;
|
|
1859
|
+
cache?: ActionPlanCache;
|
|
1860
|
+
/**
|
|
1861
|
+
* WM-01 run-scoped working-memory store (Phase 358). ONE store spans all suite member tests
|
|
1862
|
+
* (run-scoped, not test-scoped) and is threaded into each test's runner loop; the CLI flushes
|
|
1863
|
+
* it once at suite end.
|
|
1864
|
+
*/
|
|
1865
|
+
workingMemory?: WorkingMemoryPort;
|
|
1866
|
+
/**
|
|
1867
|
+
* D-14 storage-state store (Phase 360). ONE run-scoped store spans all suite member tests and is
|
|
1868
|
+
* threaded into each test's runner loop; the CLI constructs it at the composition root.
|
|
1869
|
+
*/
|
|
1870
|
+
storageState?: StorageStatePort;
|
|
1871
|
+
/**
|
|
1872
|
+
* D-08/Q10 screenshot compressor (Phase 363). ONE runner-local `SharpScreenshotCompressor`
|
|
1873
|
+
* constructed at the CLI composition root, threaded into each member's runner loop (sharp left
|
|
1874
|
+
* core). Absent ⇒ compressor-less loop.
|
|
1875
|
+
*/
|
|
1876
|
+
compressor?: ScreenshotCompressor;
|
|
3130
1877
|
plannerModel: LanguageModel;
|
|
3131
1878
|
verifierModel: LanguageModel;
|
|
3132
|
-
|
|
3133
|
-
reporters?: Reporter[];
|
|
1879
|
+
reporters?: never[];
|
|
3134
1880
|
captureScreenshots?: boolean;
|
|
3135
1881
|
screenshotMode?: 'failure' | 'every-step';
|
|
3136
1882
|
timeouts?: {
|
|
@@ -3150,24 +1896,32 @@ interface RunSuiteConfig {
|
|
|
3150
1896
|
console?: boolean;
|
|
3151
1897
|
network?: boolean;
|
|
3152
1898
|
};
|
|
3153
|
-
accessibility?:
|
|
3154
|
-
|
|
3155
|
-
|
|
3156
|
-
|
|
3157
|
-
|
|
3158
|
-
|
|
3159
|
-
|
|
3160
|
-
|
|
3161
|
-
|
|
3162
|
-
|
|
3163
|
-
|
|
3164
|
-
|
|
1899
|
+
accessibility?: {
|
|
1900
|
+
enabled: boolean;
|
|
1901
|
+
standard?: 'wcag2a' | 'wcag2aa' | 'wcag2aaa';
|
|
1902
|
+
runAfter?: 'every-step' | 'navigation' | 'test-end';
|
|
1903
|
+
failOnViolation?: boolean;
|
|
1904
|
+
disableRules?: string[];
|
|
1905
|
+
exclude?: string[];
|
|
1906
|
+
};
|
|
1907
|
+
accessibilityCheck?: (page: unknown, options: {
|
|
1908
|
+
standard?: 'wcag2a' | 'wcag2aa' | 'wcag2aaa';
|
|
1909
|
+
disableRules?: string[];
|
|
1910
|
+
exclude?: string[];
|
|
1911
|
+
}) => Promise<AccessibilityViolation[]>;
|
|
1912
|
+
vision?: {
|
|
1913
|
+
screenshotSize?: number;
|
|
1914
|
+
effectiveResolution?: number;
|
|
1915
|
+
};
|
|
1916
|
+
/** Vision gate resolved once per run at the composition root (D-11); passed through to each test. */
|
|
1917
|
+
visionGate?: {
|
|
1918
|
+
attachImage: boolean;
|
|
1919
|
+
captureMode: 'full' | 'textOnly';
|
|
1920
|
+
promptNote: string;
|
|
3165
1921
|
};
|
|
3166
|
-
circuitBreaker?: CircuitBreaker;
|
|
3167
1922
|
product?: string;
|
|
3168
1923
|
createAdapter?: () => Promise<PlatformAdapter>;
|
|
3169
1924
|
resolveUrl?: (targetName: string) => string | undefined;
|
|
3170
|
-
onCuratorComplete?: (testName: string, memoryLog: MemoryLog) => void;
|
|
3171
1925
|
artifactContext?: Record<string, unknown>;
|
|
3172
1926
|
authStateCapture?: {
|
|
3173
1927
|
capture: () => Promise<RuntimeAuthStateConfig>;
|
|
@@ -3176,7 +1930,14 @@ interface RunSuiteConfig {
|
|
|
3176
1930
|
secretStore?: SecretStore;
|
|
3177
1931
|
secretRedactor?: SecretRedactor;
|
|
3178
1932
|
}
|
|
3179
|
-
|
|
1933
|
+
|
|
1934
|
+
/**
|
|
1935
|
+
* Merge the suite's target/use into a member test and strip its own `url` (the suite owns
|
|
1936
|
+
* startup navigation). The per-member execution body (formerly `executeSuiteMember`) moved onto
|
|
1937
|
+
* runner soil (`runMemberTest`) in Phase 363; the CLI composition root patches each member with
|
|
1938
|
+
* this helper before running it.
|
|
1939
|
+
*/
|
|
1940
|
+
declare function patchTestForSuite(test: TestDefinition, suite: SuiteDefinition, _index: number): TestDefinition;
|
|
3180
1941
|
|
|
3181
1942
|
type WorkspaceFileKind = 'test' | 'suite';
|
|
3182
1943
|
interface ResolvedWorkspaceFile {
|
|
@@ -3196,7 +1957,6 @@ interface ResolvedWorkspacePaths {
|
|
|
3196
1957
|
suiteMatch: string[];
|
|
3197
1958
|
testPathIgnore: string[];
|
|
3198
1959
|
hooksFile: ResolvedWorkspaceFile;
|
|
3199
|
-
agentRules: ResolvedWorkspaceFile;
|
|
3200
1960
|
envFile: ResolvedWorkspaceFile;
|
|
3201
1961
|
secretsFile: ResolvedWorkspaceFile;
|
|
3202
1962
|
}
|
|
@@ -3205,6 +1965,26 @@ interface ResolveWorkspacePathsInput {
|
|
|
3205
1965
|
configPath: string;
|
|
3206
1966
|
requireExistingFiles?: boolean;
|
|
3207
1967
|
}
|
|
1968
|
+
/**
|
|
1969
|
+
* The ONE spelling of the durable workspace-relative IDENTITY recipe (390-08 / CR-02, D-01).
|
|
1970
|
+
*
|
|
1971
|
+
* `configDir`-rooted, forward-slashed, `./`-trimmed, and escape-refusing — literally
|
|
1972
|
+
* {@link assertInsideWorkspace} with {@link resolveWorkspaceFileTarget}'s resolution step in front,
|
|
1973
|
+
* exported rather than re-derived so no second spelling of the rule can drift from this one.
|
|
1974
|
+
*
|
|
1975
|
+
* WHY IT EXISTS: the committed `quarantine.jsonl` keys entries on this string and compares it with
|
|
1976
|
+
* `===`. An absolute path is bytes only the machine that wrote them can produce, so a ledger
|
|
1977
|
+
* carrying absolute identities could never match on a fresh CI checkout — it would be committed for
|
|
1978
|
+
* an inheritance it structurally cannot deliver. These bytes are IDENTITY ONLY and are never used
|
|
1979
|
+
* for file access; readers keep the absolute path they already resolved.
|
|
1980
|
+
*
|
|
1981
|
+
* Accepting an already-relative input (resolved against `configDir`, as
|
|
1982
|
+
* {@link resolveWorkspaceFileTarget} does) makes the mint idempotent: handing an identity through a
|
|
1983
|
+
* second layer cannot silently re-anchor it on `process.cwd()`.
|
|
1984
|
+
*
|
|
1985
|
+
* @throws when the path resolves outside `configDir` — an escaping file cannot mint an identity.
|
|
1986
|
+
*/
|
|
1987
|
+
declare function workspaceRelativeIdentityPath(configDir: string, filePath: string): string;
|
|
3208
1988
|
declare function resolveWorkspacePaths(input: ResolveWorkspacePathsInput): ResolvedWorkspacePaths;
|
|
3209
1989
|
declare function discoverWorkspaceFiles(input: {
|
|
3210
1990
|
workspace: ResolvedWorkspacePaths;
|
|
@@ -3254,6 +2034,34 @@ declare function validateProject(options?: {
|
|
|
3254
2034
|
workspace?: ResolvedWorkspacePaths;
|
|
3255
2035
|
}): Promise<ValidationResult>;
|
|
3256
2036
|
|
|
2037
|
+
/**
|
|
2038
|
+
* A yaml parse failure as a POSITION, and as nothing else (395-10 · GAP 1 / CR-01 · 395-14 · F-01).
|
|
2039
|
+
*
|
|
2040
|
+
* THE ERROR IS NOT A MESSAGE SOURCE HERE. `yaml`'s `YAMLParseError` carries `linePos` — where the
|
|
2041
|
+
* parser gave up — beside a `message` that is pretty-printed with a verbatim excerpt of the
|
|
2042
|
+
* offending source line and a caret beneath the column. Every other property (`message`, `code`,
|
|
2043
|
+
* the object's own stringification) is derived from the person's file content and is therefore not
|
|
2044
|
+
* this product's to publish: the strings built from this one are persisted in blocked records,
|
|
2045
|
+
* printed by `proposals show`, thrown out of every config op, printed by `agent-qa validate`, and —
|
|
2046
|
+
* through `refusalMessage` — carried into a chat turn's answer and its session jsonl. So this
|
|
2047
|
+
* function reads two NUMBERS and composes a sentence of its own.
|
|
2048
|
+
*
|
|
2049
|
+
* THE FALLBACK IS VALUE-FREE TOO, and that is the point of having one. A throw with no `linePos` is
|
|
2050
|
+
* not a yaml parse error this product recognises, and the tempting repair — fall back to the error's
|
|
2051
|
+
* message when the position is missing — would reopen the whole channel for exactly the inputs
|
|
2052
|
+
* nobody anticipated.
|
|
2053
|
+
*
|
|
2054
|
+
* IT LIVES IN CORE AND HAS THREE CALLERS (395-14). It was a private copy in the cli composition
|
|
2055
|
+
* root; the loader guard and core's own `validateConfig` arm need the SAME sentence, and two
|
|
2056
|
+
* spellings of one sentence are two things that can drift apart. One primitive, three callers:
|
|
2057
|
+
* `cli/src/config.ts`, `core/src/validation/validate.ts`, and the cli validate port.
|
|
2058
|
+
*
|
|
2059
|
+
* THE ARGUMENT IS GUARDED BEFORE IT IS READ (395-14 · WR-08 / F-09). A `throw null` or a
|
|
2060
|
+
* `throw 'boom'` is a legal throw; the 395-10 copy reached for `.linePos` unguarded and answered a
|
|
2061
|
+
* TypeError for `null` — a crash inside the code whose whole job is to turn a fault into a sentence.
|
|
2062
|
+
*/
|
|
2063
|
+
declare function yamlParseFailureMessage(error: unknown): string;
|
|
2064
|
+
|
|
3257
2065
|
declare function formatDiagnostics(result: ValidationResult): string;
|
|
3258
2066
|
declare function formatDiagnosticsPlain(result: ValidationResult): string;
|
|
3259
2067
|
|
|
@@ -3270,364 +2078,42 @@ declare function parseHooksFile(filePath: string): Promise<{
|
|
|
3270
2078
|
errors: string[];
|
|
3271
2079
|
}>;
|
|
3272
2080
|
|
|
3273
|
-
declare
|
|
3274
|
-
type CleanupTarget = (typeof DEFAULT_CLEANUP_TARGETS)[number];
|
|
3275
|
-
interface HookReferenceRewriteFile {
|
|
3276
|
-
path: string;
|
|
3277
|
-
content: string;
|
|
3278
|
-
}
|
|
3279
|
-
interface HookReferenceMigrationSuccess {
|
|
3280
|
-
ok: true;
|
|
3281
|
-
hookNameToId: Record<string, string>;
|
|
3282
|
-
rewriteFiles: HookReferenceRewriteFile[];
|
|
3283
|
-
cleanupTargets: CleanupTarget[];
|
|
3284
|
-
}
|
|
3285
|
-
interface HookReferenceMigrationFailure {
|
|
3286
|
-
ok: false;
|
|
3287
|
-
errors: string[];
|
|
3288
|
-
rewriteFiles: [];
|
|
3289
|
-
cleanupTargets: [];
|
|
3290
|
-
}
|
|
3291
|
-
type HookReferenceMigrationAudit = HookReferenceMigrationSuccess | HookReferenceMigrationFailure;
|
|
3292
|
-
interface HookReferenceMigrationOptions {
|
|
3293
|
-
workspaceDir: string;
|
|
3294
|
-
configPath?: string;
|
|
3295
|
-
generateId?: () => string;
|
|
3296
|
-
}
|
|
3297
|
-
declare class HookReferenceMigrationError extends Error {
|
|
3298
|
-
readonly errors: string[];
|
|
3299
|
-
constructor(errors: string[]);
|
|
3300
|
-
}
|
|
3301
|
-
declare function auditWorkspaceHookReferenceMigration(options: HookReferenceMigrationOptions): Promise<HookReferenceMigrationAudit>;
|
|
3302
|
-
declare function applyWorkspaceHookReferenceMigration(options: HookReferenceMigrationOptions): Promise<HookReferenceMigrationSuccess>;
|
|
3303
|
-
|
|
3304
|
-
interface HookOrchestrationResult {
|
|
3305
|
-
results: Map<string, HookResult>;
|
|
3306
|
-
variables: Record<string, string>;
|
|
3307
|
-
allPassed: boolean;
|
|
3308
|
-
duration: number;
|
|
3309
|
-
}
|
|
3310
|
-
declare function runHooks(hooks: HookDefinition[], options?: SandboxRunnerOptions): Promise<HookOrchestrationResult>;
|
|
3311
|
-
|
|
3312
|
-
interface ObservationFrontmatter {
|
|
3313
|
-
id: string;
|
|
3314
|
-
title: string;
|
|
3315
|
-
trust: number;
|
|
3316
|
-
created: string;
|
|
3317
|
-
last_confirmed: string;
|
|
3318
|
-
confirmed_count: number;
|
|
3319
|
-
contradicted_count: number;
|
|
3320
|
-
source_test: string;
|
|
3321
|
-
}
|
|
3322
|
-
interface SuiteObservationFrontmatter extends ObservationFrontmatter {
|
|
3323
|
-
position: number;
|
|
3324
|
-
suite_snapshot: Array<{
|
|
3325
|
-
test: string;
|
|
3326
|
-
id: string;
|
|
3327
|
-
}>;
|
|
3328
|
-
}
|
|
3329
|
-
|
|
3330
|
-
declare function ensureMemoryDirs(root: string): Promise<void>;
|
|
3331
|
-
declare function writeObservation(root: string, tier: 'products' | 'suites' | 'tests', scope: string, data: BaseObservation | SuiteObservation): Promise<string>;
|
|
3332
|
-
declare function parseObservation(content: string, filename: string): {
|
|
3333
|
-
data: BaseObservation | SuiteObservation | null;
|
|
3334
|
-
error: string | null;
|
|
3335
|
-
};
|
|
3336
|
-
declare function listObservations(dir: string): Promise<string[]>;
|
|
3337
|
-
|
|
3338
|
-
declare function scanContent(text: string): {
|
|
3339
|
-
safe: boolean;
|
|
3340
|
-
matchedPattern?: string;
|
|
3341
|
-
};
|
|
3342
|
-
|
|
3343
|
-
declare function escapeXml(str: string): string;
|
|
3344
|
-
|
|
3345
|
-
declare function createMemoryProvider(config: {
|
|
3346
|
-
provider: string;
|
|
3347
|
-
memoryRoot?: string;
|
|
3348
|
-
curatorLockTimeout?: number;
|
|
3349
|
-
}): Promise<MemoryProvider>;
|
|
3350
|
-
|
|
3351
|
-
declare class LocalMemoryProvider implements MemoryProvider {
|
|
3352
|
-
private db;
|
|
3353
|
-
private minTrust;
|
|
3354
|
-
private maxInjections;
|
|
3355
|
-
private injectedMap;
|
|
3356
|
-
private memoryRoot;
|
|
3357
|
-
private lockManager;
|
|
3358
|
-
constructor(opts?: {
|
|
3359
|
-
memoryRoot?: string;
|
|
3360
|
-
minTrust?: number;
|
|
3361
|
-
maxInjections?: number;
|
|
3362
|
-
curatorLockTimeout?: number;
|
|
3363
|
-
});
|
|
3364
|
-
init(params: MemoryIndexParams): Promise<void>;
|
|
3365
|
-
queryForStep(stepText: string, stepIndex: number): MemoryQueryResult | null;
|
|
3366
|
-
private formatMemoryContext;
|
|
3367
|
-
destroy(): void;
|
|
3368
|
-
getInjectedObservations(stepIndex: number): string[];
|
|
3369
|
-
acquireLock(): Promise<void>;
|
|
3370
|
-
releaseLock(): Promise<void>;
|
|
3371
|
-
writeObservation(tier: 'products' | 'suites' | 'tests', scope: string, data: BaseObservation | SuiteObservation): Promise<string>;
|
|
3372
|
-
deleteObservation(tier: 'products' | 'suites' | 'tests', scope: string, id: string): Promise<void>;
|
|
3373
|
-
getAllObservations(): MemoryObservationSnippet[];
|
|
3374
|
-
searchForDuplicates(content: string): MemoryObservationSnippet[];
|
|
3375
|
-
getRunAnalytics(): unknown;
|
|
3376
|
-
}
|
|
3377
|
-
|
|
3378
|
-
declare const DEFAULT_MEMORY_DIR = "agent-qa-memory";
|
|
3379
|
-
interface MemoryRootConfig {
|
|
3380
|
-
services?: {
|
|
3381
|
-
memory?: {
|
|
3382
|
-
dir?: string;
|
|
3383
|
-
};
|
|
3384
|
-
};
|
|
3385
|
-
}
|
|
3386
|
-
declare function resolveMemoryRoot(config: MemoryRootConfig | undefined, configDir: string): string;
|
|
3387
|
-
|
|
3388
|
-
declare class LockManager {
|
|
3389
|
-
private lockPath;
|
|
3390
|
-
private timeout;
|
|
3391
|
-
constructor(lockPath: string, timeout?: number);
|
|
3392
|
-
acquire(): Promise<void>;
|
|
3393
|
-
release(): Promise<void>;
|
|
3394
|
-
private isStale;
|
|
3395
|
-
}
|
|
3396
|
-
|
|
3397
|
-
declare function shouldAblate(result: {
|
|
3398
|
-
status: string;
|
|
3399
|
-
steps: Array<unknown>;
|
|
3400
|
-
}, provider: MemoryProvider): boolean;
|
|
3401
|
-
declare function collectAllInjectedIds(result: {
|
|
3402
|
-
steps: Array<unknown>;
|
|
3403
|
-
}, provider: MemoryProvider): Map<number, string[]>;
|
|
2081
|
+
declare function generateHookId(): string;
|
|
3404
2082
|
|
|
3405
2083
|
declare function generateRunId(): string;
|
|
2084
|
+
/**
|
|
2085
|
+
* Is this an id the run mint above would have produced? (2026-08-23, 401-20 · CR-04)
|
|
2086
|
+
*
|
|
2087
|
+
* THE MINT'S OWN INVERSE, re-exported one line under it and from the same package, so the two can
|
|
2088
|
+
* never answer about different id shapes. The invocation core takes this as a REQUIRED option
|
|
2089
|
+
* beside `mintRunId` for the reason the mint is one: `agent-local` may not name the ids package,
|
|
2090
|
+
* and a shape check invented there would be a second spelling of a run's identity.
|
|
2091
|
+
*/
|
|
2092
|
+
declare function isCanonicalRunId(value: string): boolean;
|
|
3406
2093
|
|
|
3407
|
-
type
|
|
3408
|
-
|
|
3409
|
-
|
|
3410
|
-
|
|
3411
|
-
|
|
3412
|
-
|
|
3413
|
-
|
|
3414
|
-
|
|
3415
|
-
|
|
3416
|
-
|
|
3417
|
-
|
|
3418
|
-
|
|
3419
|
-
interface ResolveAnalyticsIdentityOptions {
|
|
3420
|
-
env?: Record<string, string | undefined>;
|
|
3421
|
-
identityPath?: string;
|
|
3422
|
-
homeDir?: string;
|
|
3423
|
-
}
|
|
3424
|
-
declare function getAnalyticsIdentityPath(env?: Record<string, string | undefined>, homeDir?: string): string;
|
|
3425
|
-
declare function generateAnalyticsUserId(): string;
|
|
3426
|
-
declare function readAnalyticsIdentity(path?: string): Promise<AnalyticsIdentityStore | null>;
|
|
3427
|
-
declare function writeAnalyticsIdentity(distinctId: string, path?: string, isInternal?: boolean): Promise<void>;
|
|
3428
|
-
declare function resolveAnalyticsAgentProduct(env?: Record<string, string | undefined>): AnalyticsAgentProduct | undefined;
|
|
3429
|
-
declare function resolveAnalyticsIdentity(options?: ResolveAnalyticsIdentityOptions): Promise<AnalyticsIdentity>;
|
|
3430
|
-
|
|
3431
|
-
type AnalyticsEventName = 'agent-qa.analytics.initialized' | 'agent-qa.analytics.test_event' | 'agent-qa.test_run.completed' | 'agent-qa.suite_run.completed' | 'agent-qa.dashboard.opened' | 'agent-qa.dashboard.live_mode.started' | 'agent-qa.dashboard.entity.created' | 'agent-qa.mcp.server.lifecycle' | 'agent-qa.mcp.tool.invoked';
|
|
3432
|
-
type AnalyticsSurface = 'core' | 'cli' | 'dashboard-server' | 'dashboard-ui' | 'mcp';
|
|
3433
|
-
type AnalyticsTransportKind = 'posthog' | 'noop' | 'mock';
|
|
3434
|
-
interface AnalyticsEventProperties {
|
|
3435
|
-
agent_qa_version?: string;
|
|
3436
|
-
surface?: AnalyticsSurface;
|
|
3437
|
-
runtime_context?: AnalyticsRuntimeContext;
|
|
3438
|
-
agent_product?: AnalyticsAgentProduct;
|
|
3439
|
-
transport?: AnalyticsTransportKind;
|
|
3440
|
-
privacy_enabled?: boolean;
|
|
3441
|
-
posthog_key_present?: boolean;
|
|
3442
|
-
trigger_source?: 'cli' | 'dashboard' | 'api' | 'mcp' | 'unknown';
|
|
3443
|
-
runner?: 'local' | 'browserstack' | 'unknown';
|
|
3444
|
-
platform?: 'web' | 'android' | 'ios' | 'unknown';
|
|
3445
|
-
entity_type?: 'test' | 'suite' | 'hook' | 'unknown';
|
|
3446
|
-
outcome?: 'created';
|
|
3447
|
-
status?: 'passed' | 'failed' | 'skipped' | 'cancelled' | 'timeout' | 'unknown';
|
|
3448
|
-
duration_ms?: number;
|
|
3449
|
-
run_id?: string;
|
|
3450
|
-
parent_run_id?: string;
|
|
3451
|
-
test_id?: string;
|
|
3452
|
-
suite_id?: string;
|
|
3453
|
-
model_name?: string;
|
|
3454
|
-
provider?: string;
|
|
3455
|
-
provider_mode?: string;
|
|
3456
|
-
planner_model?: string;
|
|
3457
|
-
verifier_model?: string;
|
|
3458
|
-
input_tokens?: number;
|
|
3459
|
-
output_tokens?: number;
|
|
3460
|
-
total_tokens?: number;
|
|
3461
|
-
planner_call_count?: number;
|
|
3462
|
-
verifier_call_count?: number;
|
|
3463
|
-
step_count?: number;
|
|
3464
|
-
passed_step_count?: number;
|
|
3465
|
-
failed_step_count?: number;
|
|
3466
|
-
skipped_step_count?: number;
|
|
3467
|
-
subaction_count?: number;
|
|
3468
|
-
cached_subaction_count?: number;
|
|
3469
|
-
failed_subaction_count?: number;
|
|
3470
|
-
healing_attempt_count?: number;
|
|
3471
|
-
hook_count?: number;
|
|
3472
|
-
failed_hook_count?: number;
|
|
3473
|
-
retry_count?: number;
|
|
3474
|
-
is_flaky?: boolean;
|
|
3475
|
-
cancelled?: boolean;
|
|
3476
|
-
timed_out?: boolean;
|
|
3477
|
-
failure_category?: 'assertion' | 'timeout' | 'cancelled' | 'setup' | 'hook' | 'appium' | 'browser_install' | 'llm_context' | 'llm_provider' | 'memory' | 'framework' | 'unknown';
|
|
3478
|
-
browser_name?: string;
|
|
3479
|
-
mobile_transport?: string;
|
|
3480
|
-
mobile_provider?: string;
|
|
3481
|
-
app_state?: string;
|
|
3482
|
-
execution_destination?: string;
|
|
3483
|
-
memory_enabled?: boolean;
|
|
3484
|
-
memory_injected_observation_count?: number;
|
|
3485
|
-
memory_curator_input_tokens?: number;
|
|
3486
|
-
memory_curator_output_tokens?: number;
|
|
3487
|
-
memory_curator_total_tokens?: number;
|
|
3488
|
-
memory_added_count?: number;
|
|
3489
|
-
memory_confirmed_count?: number;
|
|
3490
|
-
memory_deprecated_count?: number;
|
|
3491
|
-
memory_deleted_count?: number;
|
|
3492
|
-
memory_error_count?: number;
|
|
3493
|
-
suite_child_count?: number;
|
|
3494
|
-
suite_passed_count?: number;
|
|
3495
|
-
suite_failed_count?: number;
|
|
3496
|
-
suite_skipped_count?: number;
|
|
3497
|
-
suite_execution_mode?: 'sequential' | 'parallel' | 'unknown';
|
|
3498
|
-
mcp_tool_count?: number;
|
|
3499
|
-
mcp_server_state?: 'started' | 'disabled';
|
|
3500
|
-
mcp_transport?: 'stdio' | 'http';
|
|
3501
|
-
mcp_host_kind?: 'loopback' | 'other';
|
|
3502
|
-
mcp_port_kind?: 'default' | 'custom';
|
|
3503
|
-
mcp_path_kind?: 'default' | 'custom';
|
|
3504
|
-
tool_name?: string;
|
|
3505
|
-
mcp_tool_category?: 'discovery' | 'schema' | 'id' | 'authoring' | 'hook' | 'run' | 'triage' | 'unknown';
|
|
3506
|
-
mcp_tool_status?: 'success' | 'error';
|
|
3507
|
-
mcp_error_category?: 'validation' | 'dashboard_unavailable' | 'dashboard_error' | 'config' | 'tool_error' | 'unknown';
|
|
3508
|
-
'$process_person_profile'?: false;
|
|
3509
|
-
}
|
|
3510
|
-
type BuiltAnalyticsEventProperties = Record<string, string | number | boolean | undefined>;
|
|
3511
|
-
interface AnalyticsEventInput {
|
|
3512
|
-
name: AnalyticsEventName | string;
|
|
3513
|
-
properties?: Record<string, unknown>;
|
|
3514
|
-
}
|
|
3515
|
-
interface BuiltAnalyticsEvent {
|
|
3516
|
-
name: AnalyticsEventName;
|
|
3517
|
-
properties: BuiltAnalyticsEventProperties;
|
|
3518
|
-
}
|
|
3519
|
-
|
|
3520
|
-
declare const ANALYTICS_EVENT_NAMES: readonly ["agent-qa.analytics.initialized", "agent-qa.analytics.test_event", "agent-qa.test_run.completed", "agent-qa.suite_run.completed", "agent-qa.dashboard.opened", "agent-qa.dashboard.live_mode.started", "agent-qa.dashboard.entity.created", "agent-qa.mcp.server.lifecycle", "agent-qa.mcp.tool.invoked"];
|
|
3521
|
-
declare const ANALYTICS_SURFACES: readonly ["core", "cli", "dashboard-server", "dashboard-ui", "mcp"];
|
|
3522
|
-
declare const ANALYTICS_RUNTIME_CONTEXTS: readonly ["user", "ci", "agent"];
|
|
3523
|
-
declare const ANALYTICS_AGENT_PRODUCTS: readonly ["claude_code", "cursor", "gemini_cli", "augment", "goose", "opencode", "codex", "cline", "amp"];
|
|
3524
|
-
declare const ANALYTICS_TRANSPORT_KINDS: readonly ["posthog", "noop", "mock"];
|
|
3525
|
-
declare const ANALYTICS_TRIGGER_SOURCES: readonly ["cli", "dashboard", "api", "mcp", "unknown"];
|
|
3526
|
-
declare const ANALYTICS_RUNNERS: readonly ["local", "browserstack", "unknown"];
|
|
3527
|
-
declare const ANALYTICS_PLATFORMS: readonly ["web", "android", "ios", "unknown"];
|
|
3528
|
-
declare const ANALYTICS_DASHBOARD_ENTITY_TYPES: readonly ["test", "suite", "hook", "unknown"];
|
|
3529
|
-
declare const ANALYTICS_DASHBOARD_OUTCOMES: readonly ["created"];
|
|
3530
|
-
declare const ANALYTICS_RUN_STATUSES: readonly ["passed", "failed", "skipped", "cancelled", "timeout", "unknown"];
|
|
3531
|
-
declare const ANALYTICS_MCP_SERVER_STATES: readonly ["started", "disabled"];
|
|
3532
|
-
declare const ANALYTICS_MCP_TRANSPORTS: readonly ["stdio", "http"];
|
|
3533
|
-
declare const ANALYTICS_MCP_HOST_KINDS: readonly ["loopback", "other"];
|
|
3534
|
-
declare const ANALYTICS_MCP_PORT_KINDS: readonly ["default", "custom"];
|
|
3535
|
-
declare const ANALYTICS_MCP_PATH_KINDS: readonly ["default", "custom"];
|
|
3536
|
-
declare const ANALYTICS_MCP_TOOL_CATEGORIES: readonly ["discovery", "schema", "id", "authoring", "hook", "run", "triage", "unknown"];
|
|
3537
|
-
declare const ANALYTICS_MCP_TOOL_STATUSES: readonly ["success", "error"];
|
|
3538
|
-
declare const ANALYTICS_MCP_ERROR_CATEGORIES: readonly ["validation", "dashboard_unavailable", "dashboard_error", "config", "tool_error", "unknown"];
|
|
3539
|
-
declare const ANALYTICS_FAILURE_CATEGORIES: readonly ["assertion", "timeout", "cancelled", "setup", "hook", "appium", "browser_install", "llm_context", "llm_provider", "memory", "framework", "unknown"];
|
|
3540
|
-
declare const ANALYTICS_SUITE_EXECUTION_MODES: readonly ["sequential", "parallel", "unknown"];
|
|
3541
|
-
declare function buildAnalyticsEvent(input: AnalyticsEventInput): BuiltAnalyticsEvent;
|
|
3542
|
-
|
|
3543
|
-
interface AnalyticsCapturePayload {
|
|
3544
|
-
distinctId: string;
|
|
3545
|
-
isInternal?: boolean;
|
|
3546
|
-
event: BuiltAnalyticsEvent;
|
|
3547
|
-
}
|
|
3548
|
-
interface AnalyticsTransport {
|
|
3549
|
-
capture(payload: AnalyticsCapturePayload): void | Promise<void>;
|
|
3550
|
-
flush(): void | Promise<void>;
|
|
3551
|
-
}
|
|
3552
|
-
declare class NoopAnalyticsTransport implements AnalyticsTransport {
|
|
3553
|
-
capture(): void;
|
|
3554
|
-
flush(): void;
|
|
3555
|
-
}
|
|
3556
|
-
declare class MockAnalyticsTransport implements AnalyticsTransport {
|
|
3557
|
-
readonly events: AnalyticsCapturePayload[];
|
|
3558
|
-
flushCount: number;
|
|
3559
|
-
capture(payload: AnalyticsCapturePayload): void;
|
|
3560
|
-
flush(): void;
|
|
3561
|
-
}
|
|
3562
|
-
|
|
3563
|
-
declare const EMPTY_POSTHOG_KEY_WARNING = "PostHog analytics initialization failed because AGENT_QA_POSTHOG_KEY is empty. Analytics telemetry is disabled.";
|
|
3564
|
-
interface AnalyticsServiceConfig {
|
|
3565
|
-
analytics?: {
|
|
3566
|
-
privacy?: true;
|
|
3567
|
-
};
|
|
2094
|
+
type RunAttributes = Record<string, string>;
|
|
2095
|
+
declare const INTERNAL_ATTRIBUTE_PREFIX = "agent-qa.";
|
|
2096
|
+
declare const ATTR_TRIGGER = "agent-qa.trigger";
|
|
2097
|
+
declare const ATTR_RUNNER = "agent-qa.runner";
|
|
2098
|
+
declare const ATTR_GATE_RUN = "agent-qa.gate-run";
|
|
2099
|
+
type RunAttributeTrigger = 'cli' | 'dashboard' | 'api' | 'mcp';
|
|
2100
|
+
type RunAttributeRunner = 'local' | 'browserstack';
|
|
2101
|
+
declare const RUN_ATTRIBUTE_KEY_MAX_LENGTH = 256;
|
|
2102
|
+
declare const RUN_ATTRIBUTE_VALUE_MAX_LENGTH = 4096;
|
|
2103
|
+
interface ParsedRunAttrFlags {
|
|
2104
|
+
attributes: RunAttributes;
|
|
2105
|
+
duplicateKeys: string[];
|
|
3568
2106
|
}
|
|
3569
|
-
|
|
3570
|
-
|
|
3571
|
-
|
|
3572
|
-
|
|
3573
|
-
|
|
3574
|
-
|
|
3575
|
-
|
|
3576
|
-
|
|
3577
|
-
|
|
3578
|
-
|
|
3579
|
-
projectKey?: string;
|
|
3580
|
-
projectHost?: string;
|
|
3581
|
-
identityPath?: string;
|
|
3582
|
-
env?: Record<string, string | undefined>;
|
|
3583
|
-
posthogTransportFactory?: (options: AnalyticsPostHogTransportFactoryOptions) => AnalyticsTransport;
|
|
3584
|
-
}
|
|
3585
|
-
interface AnalyticsService {
|
|
3586
|
-
capture(event: BuiltAnalyticsEvent): Promise<void>;
|
|
3587
|
-
flush(): Promise<void>;
|
|
3588
|
-
}
|
|
3589
|
-
interface AnalyticsStandardPropertiesOptions {
|
|
3590
|
-
surface?: AnalyticsSurface;
|
|
3591
|
-
identityPath?: string;
|
|
3592
|
-
env?: Record<string, string | undefined>;
|
|
3593
|
-
agentQaVersion?: string;
|
|
3594
|
-
}
|
|
3595
|
-
declare function resolveAnalyticsStandardProperties(options?: AnalyticsStandardPropertiesOptions): Promise<AnalyticsEventProperties>;
|
|
3596
|
-
declare function createAnalyticsService(options?: AnalyticsServiceOptions): AnalyticsService;
|
|
3597
|
-
declare function getAnalyticsService(options?: AnalyticsServiceOptions): AnalyticsService;
|
|
3598
|
-
declare function resetAnalyticsServiceForTests(): void;
|
|
3599
|
-
declare function captureAnalytics(event: BuiltAnalyticsEvent, options?: AnalyticsServiceOptions): Promise<void>;
|
|
3600
|
-
declare function flushAnalytics(options?: AnalyticsServiceOptions): Promise<void>;
|
|
3601
|
-
|
|
3602
|
-
declare const AGENT_QA_POSTHOG_KEY = "phc_siDVZ3DEoSCiBSocn2GZMRhx5UcRwekJDVtap5Zteii3";
|
|
3603
|
-
declare const AGENT_QA_POSTHOG_HOST = "https://us.i.posthog.com";
|
|
3604
|
-
|
|
3605
|
-
interface AnalyticsRunReporterOptions extends Omit<AnalyticsServiceOptions, 'transport'> {
|
|
3606
|
-
surface?: AnalyticsSurface;
|
|
3607
|
-
service?: AnalyticsService;
|
|
3608
|
-
transport?: AnalyticsTransport;
|
|
3609
|
-
}
|
|
3610
|
-
declare class AnalyticsRunReporter implements Reporter {
|
|
3611
|
-
private readonly service;
|
|
3612
|
-
private readonly surface;
|
|
3613
|
-
private readonly identityPath?;
|
|
3614
|
-
private readonly env?;
|
|
3615
|
-
private readonly disabled;
|
|
3616
|
-
private readonly runStates;
|
|
3617
|
-
private readonly suiteStates;
|
|
3618
|
-
constructor(options?: AnalyticsRunReporterOptions);
|
|
3619
|
-
onSuiteStart(suite: SuiteDefinition, context?: RunArtifactReporterContext): Promise<void>;
|
|
3620
|
-
onTestStart(test: TestDefinition, _filePath: string, context?: RunArtifactReporterContext): Promise<void>;
|
|
3621
|
-
onHookEnd(event: HookResultEvent): Promise<void>;
|
|
3622
|
-
onTestEnd(): Promise<void>;
|
|
3623
|
-
onRunEnd(summary: RunSummary): Promise<void>;
|
|
3624
|
-
onSuiteEnd(summary: SuiteSummary): Promise<void>;
|
|
3625
|
-
flush(): Promise<void>;
|
|
3626
|
-
private findStateForResult;
|
|
3627
|
-
private captureTestResult;
|
|
3628
|
-
private captureSuiteResult;
|
|
3629
|
-
}
|
|
3630
|
-
declare function createAnalyticsRunReporter(options?: AnalyticsRunReporterOptions): AnalyticsRunReporter;
|
|
2107
|
+
declare function validateUserRunAttributes(input: unknown, sourceLabel?: string): RunAttributes;
|
|
2108
|
+
declare function validateTrustedRunAttributes(input: unknown, sourceLabel?: string): RunAttributes;
|
|
2109
|
+
declare function parseRunAttrFlags(flags: string[] | undefined): ParsedRunAttrFlags;
|
|
2110
|
+
declare function buildInternalRunAttributes(input: {
|
|
2111
|
+
trigger: RunAttributeTrigger;
|
|
2112
|
+
runner: RunAttributeRunner;
|
|
2113
|
+
}): RunAttributes;
|
|
2114
|
+
declare function mergeRunAttributes(internal: RunAttributes, user: RunAttributes): RunAttributes;
|
|
2115
|
+
declare function sortRunAttributesForDisplay(attributes: RunAttributes, activeKeys?: string[]): Array<[string, string]>;
|
|
2116
|
+
declare function formatRunAttributesBlock(attributes: RunAttributes): string;
|
|
3631
2117
|
|
|
3632
2118
|
declare const AGENT_QA_VERSION: string;
|
|
3633
2119
|
declare function getAgentQaVersion(): string;
|
|
@@ -3660,57 +2146,13 @@ declare const DEFAULT_AGENT_QA_SCREENSHOTS_DIR = ".agent-qa/artifacts/screenshot
|
|
|
3660
2146
|
declare const DEFAULT_AGENT_QA_VIDEOS_DIR = ".agent-qa/artifacts/videos";
|
|
3661
2147
|
declare const DEFAULT_AGENT_QA_RUNS_DB_PATH = ".agent-qa/runs.db";
|
|
3662
2148
|
declare const LEGACY_AGENT_QA_DASHBOARD_DB_PATH = ".agent-qa/dashboard.db";
|
|
3663
|
-
|
|
3664
|
-
interface CompressOptions {
|
|
3665
|
-
effectiveResolution: number;
|
|
3666
|
-
maxBytes?: number;
|
|
3667
|
-
actionSpaceWidth: number;
|
|
3668
|
-
}
|
|
3669
|
-
interface CompressResult {
|
|
3670
|
-
buffer: Buffer;
|
|
3671
|
-
imageWidth: number;
|
|
3672
|
-
imageHeight: number;
|
|
3673
|
-
}
|
|
3674
|
-
declare function compressScreenshot(buffer: Buffer, opts: CompressOptions, logger?: ScopedLogger): Promise<CompressResult>;
|
|
3675
|
-
|
|
3676
|
-
interface AlignOptions {
|
|
3677
|
-
width: number;
|
|
3678
|
-
height: number;
|
|
3679
|
-
}
|
|
3680
|
-
/** Resize buffer to exact window dimensions. Used by mobile adapters for
|
|
3681
|
-
* action-space alignment (e.g., iOS physical pixels → logical points). */
|
|
3682
|
-
declare function alignToWindow(buffer: Buffer, opts: AlignOptions): Promise<Buffer>;
|
|
3683
|
-
|
|
3684
|
-
interface ImageDimensions {
|
|
3685
|
-
width: number;
|
|
3686
|
-
height: number;
|
|
3687
|
-
}
|
|
3688
|
-
/** Read image buffer width/height without decoding pixels.
|
|
3689
|
-
* Used by mobile adapters for action-space drift assertions (D-06/D-07). */
|
|
3690
|
-
declare function getImageDimensions(buffer: Buffer): Promise<ImageDimensions | undefined>;
|
|
3691
|
-
|
|
3692
|
-
/**
|
|
3693
|
-
* Converts "Meta" tokens in keyboard combo strings to "Control" on non-Mac platforms.
|
|
3694
|
-
*
|
|
3695
|
-
* Users write combos like "Meta+k" and we route them to Cmd+K on Mac, Ctrl+K on
|
|
3696
|
-
* Windows/Linux. Uses split/join (not regex) to avoid edge-case bugs with adjacent
|
|
3697
|
-
* tokens like "Shift+Meta+Meta+T".
|
|
3698
|
-
*
|
|
3699
|
-
* @param keys - Array of key/combo strings (e.g., ["Meta+k", "Enter"])
|
|
3700
|
-
* @param options.enabled - When false, keys are returned unchanged
|
|
3701
|
-
* @param options.isMac - When true, keys are returned unchanged (Meta is native)
|
|
3702
|
-
* @returns New array with Meta tokens replaced by Control (when applicable)
|
|
3703
|
-
*/
|
|
3704
|
-
declare function convertKeysForPlatform(keys: string[], options: {
|
|
3705
|
-
enabled: boolean;
|
|
3706
|
-
isMac: boolean;
|
|
3707
|
-
}): string[];
|
|
3708
2149
|
/**
|
|
3709
|
-
*
|
|
3710
|
-
*
|
|
2150
|
+
* The runs database a config names, without migrating anything: the configured path, else the
|
|
2151
|
+
* default, else a legacy dashboard.db nothing has renamed yet. The writer's resolver renames that
|
|
2152
|
+
* legacy file on top of this; the CLI reader binds only the configured or default path.
|
|
3711
2153
|
*/
|
|
3712
|
-
declare function
|
|
2154
|
+
declare function locateRunsDbPath(configDir: string, configuredDbPath?: string): string;
|
|
3713
2155
|
|
|
3714
2156
|
declare function isPathInsideDir(childPath: string, parentDir: string): boolean;
|
|
3715
2157
|
|
|
3716
|
-
export { AGENT_QA_POSTHOG_HOST, AGENT_QA_POSTHOG_KEY, AGENT_QA_VERSION, ANALYTICS_AGENT_PRODUCTS, ANALYTICS_DASHBOARD_ENTITY_TYPES, ANALYTICS_DASHBOARD_OUTCOMES, ANALYTICS_EVENT_NAMES, ANALYTICS_FAILURE_CATEGORIES, ANALYTICS_MCP_ERROR_CATEGORIES, ANALYTICS_MCP_HOST_KINDS, ANALYTICS_MCP_PATH_KINDS, ANALYTICS_MCP_PORT_KINDS, ANALYTICS_MCP_SERVER_STATES, ANALYTICS_MCP_TOOL_CATEGORIES, ANALYTICS_MCP_TOOL_STATUSES, ANALYTICS_MCP_TRANSPORTS, ANALYTICS_PLATFORMS, ANALYTICS_RUNNERS, ANALYTICS_RUNTIME_CONTEXTS, ANALYTICS_RUN_STATUSES, ANALYTICS_SUITE_EXECUTION_MODES, ANALYTICS_SURFACES, ANALYTICS_TRANSPORT_KINDS, ANALYTICS_TRIGGER_SOURCES, ANDROID_ROLE_MAP, ATTR_RUNNER, ATTR_TRIGGER, AUTH_STATE_HOOK_CONTAINER_STORAGE_STATE_PATH, AUTH_STATE_HOOK_JSON_ENV, AUTH_STATE_HOOK_STORAGE_STATE_FILENAME, AUTH_STATE_HOOK_STORAGE_STATE_PATH_ENV, AUTH_STATE_HOOK_WORKSPACE_DIR, AUTH_STATE_REDACTION_MARKER, AUTH_STATE_SCHEMA_VERSION, AUTH_STATE_SLUG_PATTERN, type AccessibilityCheck, type AccessibilityCheckOptions, AccessibilityConfigSchema, type AccessibilityViolation, type Action, type ActionCache, type ActionPlan, ActionPlanSchema, type ActionResult, AdapterLogDataSchema, AgentLogDataSchema, type AgentLoopConfig, type AgentPhase, type AgentQaConfig, AgentQaConfigSchema, type AgentQaUpdateStatus, type AlignOptions, type AnalyticsAgentProduct, type AnalyticsCapturePayload, type AnalyticsEventInput, type AnalyticsEventName, type AnalyticsEventProperties, type AnalyticsIdentity, type AnalyticsIdentityStore, type AnalyticsPostHogTransportFactoryOptions, AnalyticsRunReporter, type AnalyticsRunReporterOptions, type AnalyticsRuntimeContext, AnalyticsSchema, type AnalyticsService, type AnalyticsServiceConfig, type AnalyticsServiceOptions, type AnalyticsStandardPropertiesOptions, type AnalyticsSurface, type AnalyticsTransport, type AnalyticsTransportKind, type AppiumExecutableSource, type ArtifactRecord, type Asserter, AssertionEvaluator, type AssertionInput, type AssertionResult, AssertionResultSchema, type AssertionType, type AuthCredential, type AuthPluginBundle, type AuthPluginDeclaration, AuthPluginDeclarationSchema, type AuthProvider, AuthStateConfigSchema, type AuthStateMetadata, AuthStateMetadataSchema, AuthStateNameSchema, type AuthStateRedactionContext, type AuthStateTargetPlatform, AuthStateUseSchema, type AuthStore, type BaseObservation, BaseObservationSchema, type BetterSqlite3Database, type BrowserConfig, BrowserConfigSchema, type BuiltAnalyticsEvent, type BuiltAnalyticsEventProperties, CACHE_SCHEMA_VERSION, CacheConfigSchema, type CacheEntry, CacheLogDataSchema, type CaptureConfig, CaptureConfigSchema, type CaptureResult, CircuitBreaker, type CircuitBreakerConfig, type CompressOptions, type CompressResult, type ConsoleLogEntry, ConsoleReporter, type ConsoleReporterOptions, type CreateAuthFetchContext, type CreateAuthFetchOptions, type CuratorContext, CuratorResponseSchema, DEFAULT_AGENT_QA_ARTIFACTS_DIR, DEFAULT_AGENT_QA_AUTH_STATES_DIR, DEFAULT_AGENT_QA_CACHE_DIR, DEFAULT_AGENT_QA_RUNS_DB_PATH, DEFAULT_AGENT_QA_RUNTIME_DIR, DEFAULT_AGENT_QA_SCREENSHOTS_DIR, DEFAULT_AGENT_QA_VIDEOS_DIR, DEFAULT_MEMORY_DIR, type DashboardAuthMetadata, type DashboardAuthMode, DashboardConfigSchema, type DeviceConfig, DeviceProfileSchema, DurationString, EMPTY_POSTHOG_KEY_WARNING, type ElementInfo, type ExchangeCodeContext, ExplicitExtractor, type ExtractionMethod, ExtractionResultSchema, type ExtractorInput, type FarmMobileConfig, type FarmProvider, type FarmProviderConfig, type FarmWebConfig, FatalReporterError, FileActionCache, type FileAttachment, HealerLogDataSchema, type HealingAttempt, type HealingConfig, HealingConfigSchema, type HookDefinition, HookDefinitionSchema, type HookEvent, HookLogDataSchema, type HookOrchestrationResult, HookReferenceMigrationError, type HookResult, type HookResultEvent, type HookRuntime, type HooksFileConfig, HooksFileSchema, INTERNAL_ATTRIBUTE_PREFIX, IOS_ROLE_MAP, type ImageDimensions, JUnitReporter, type JUnitReporterOptions, type JsonArray, type JsonObject, type JsonPrimitive, type JsonValue, KEY_MAP, LEGACY_AGENT_QA_DASHBOARD_DB_PATH, LLMAssertionEvaluator, type LLMAuthProviderPlugin, type LLMModelAdapter, LLMPlanner, type LLMProviderMode, LLMVariableExtractor, LLMVerifier, LOG_LEVEL_PRIORITY, type ListAuthStateMetadataInput, type LoadLLMAuthPluginsOptions, LocalMemoryProvider, LockManager, LogCaptureConfigSchema, type LogEntry, type LogLevel, LogManager, type LogSource, LogSourceDataSchemas, type LogStorage, LoggingConfigSchema, MOBILE_ONLY_ACTIONS, McpConfigSchema, type MemoryDelta, type MemoryDeltaAction, type MemoryIndexParams, type MemoryLog, type MemoryObservationSnapshot, type MemoryProvider, type MemoryQueryResult, MissingSecretError, type MobileAppState, MobileAppStateSchema, MobileElementResolver, type MobileNode, type MobilePlatform, type MobileRefMap, MobileSetupError, type MobileSetupErrorCategory, type MobileSetupErrorOptions, type MobileTransport, MobileUseOverrideSchema, MobileUseSchema, MockAnalyticsTransport, type ModelConfig, ModelConfigSchema, MultiReporter, NamedLLMConfigSchema, type NetworkLogEntry, NoopAnalyticsTransport, type NormalizedAuthStateUse, NullActionCache, type OAuthTokens, type ObservationFrontmatter, type ObserveOptions, type ParseError, type ParseResult, type ParsedMobileTree, type ParsedRunAttrFlags, type PlanResult, type Planner, type PlannerConfig, PlannerConfigSchema, PlannerLogDataSchema, type PlatformAdapter, type PlatformConfig, PluginsSchema, ProviderConfigSchema, type ProviderOptions, RUNTIME_IMAGE_MAP, RUN_ARTIFACT_SCHEMA_VERSION, RUN_ATTRIBUTE_KEY_MAX_LENGTH, RUN_ATTRIBUTE_VALUE_MAX_LENGTH, RecordingConfigSchema, type RegistryConfig, RegistrySchema, type RemoveAuthStateFilesInput, type RemoveAuthStateTargetInput, type Reporter, type ReporterEvent, type ResolveAnalyticsIdentityOptions, type ResolveAppiumExecutableOptions, type ResolveAuthStateForRunInput, type ResolveAuthStatePathsInput, type ResolveAuthStateRootInput, type ResolveMobileRunConfigInput, type ResolvedAppiumExecutable, type ResolvedAuthStateForRun, type ResolvedAuthStatePaths, type ResolvedLLMAuth, type ResolvedMobileApp, type ResolvedMobileAppInstall, type ResolvedMobileDevice, type ResolvedMobileRunConfig, type ResolvedWorkspaceFile, type ResolvedWorkspacePaths, type RunArtifactConfigSnapshot, type RunArtifactFinalizeInput, type RunArtifactKind, type RunArtifactMemoryDelta, type RunArtifactMemoryDeltaAction, type RunArtifactMemoryObservationSnapshot, type RunArtifactMemorySnapshot, type RunArtifactMetadata, type RunArtifactPayload, type RunArtifactReporterContext, type RunArtifactRuntimeSnapshot, type RunArtifactStageInput, type RunArtifactSuiteMemberSnapshot, type RunArtifactSuiteSourceSnapshot, type RunArtifactTerminalError, type RunArtifactTestSourceSnapshot, type RunAttributeRunner, type RunAttributeTrigger, type RunAttributes, type RunSuiteConfig, type RunSummary, type RunTestConfig, RunnerLogDataSchema, type SandboxRunnerOptions, type ScopedLogger, type ScreenState, type ScreenStateMetadata, SecretConfigError, type SecretFileMetadata, SecretRedactor, SecretStore, type SecretTemplate, type ServicesConfig, ServicesSchema, SizeString, type StartAuthContext, type StartAuthResult, StdoutLiveReporter, type StepAnnotation, type StepContext, type StepHashInputs, type StepPhaseEvent, type StepResult, type StepStatus, type StepTrace, type SuiteDefinition, SuiteDefinitionSchema, type SuiteObservation, type SuiteObservationFrontmatter, SuiteObservationSchema, type SuiteResult, type SuiteSummary, SuiteTestEntrySchema, TargetNameSchema, TargetSchema, type TestConfig, type TestDefinition, TestDefinitionSchema, type TestMeta, TestMetaSchema, type TestResult, type TestStatus, type TestStep, TestStepSchema, type TimeoutConfig, TimeoutConfigSchema, type TokenRefreshFn, type TokenUsage, type ToolCategory, type ToolDefinition, ToolRegistry, TransportSchema, type UseConfig, UseSchema, VALID_FILENAME_RE, VERSION_CHECK_CACHE_TTL_MS, VERSION_CHECK_TIMEOUT_MS, type ValidationDiagnostic, type ValidationResult, type VariableExtractor, type VariableSource, VariableStore, type VerificationResult, VerificationResultSchema, type Verifier, type VerifyResult, type VersionCheckOptions, WEB_ONLY_ACTIONS, type WorkspaceConfig, type WorkspaceFileKind, type WorkspaceFileRecord, WorkspaceSchema, type WriteAuthStateFilesInput, alignToWindow, applyWorkspaceHookReferenceMigration, auditWorkspaceHookReferenceMigration, browserstackProvider, buildAnalyticsEvent, buildAssertionPrompt, buildAuthStateHookEnv, buildExtractionPrompt, buildInternalRunAttributes, buildMemoryIndex, buildStepPrompt, buildSystemPrompt, buildTools, buildVerificationPrompt, captureAnalytics, captureFailureScreenshot, checkDockerAvailable, clearLLMAuthProviderPlugins, clearLoadedLLMAuthPluginModules, collectAllInjectedIds, compressScreenshot, computeFingerPositions, computePinch, computeSwipe, convertKeysForPlatform, createAnalyticsRunReporter, createAnalyticsService, createAsserter, createAuthFetch, createBetterSqlite3Database, createExtractor, createMemoryProvider, createModel, createWrappedModel, defaultRegistry, deprecateOnFailure, detectGlobOverlap, detectPlaywrightVersion, discoverWorkspaceFiles, ensureMemoryDirs, escapeXml, estimateTokens, executeStep, findBareVariables, findSecretTemplates, findUnresolvedTemplates, flushAnalytics, formatAppiumInstallGuidance, formatDiagnostics, formatDiagnosticsPlain, formatLogEntry, formatParseError, formatRunAttributesBlock, generateAnalyticsUserId, generateFailureSummary, generatePKCE, generateRunId, generateState, getAgentQaUpdateStatus, getAgentQaVersion, getAgentQaVersionCheckCachePath, getAnalyticsIdentityPath, getAnalyticsService, getAuthPath, getCredential, getImageDimensions, getLLMAuthProviderPlugin, getProvider, getProviderOptions, hashScreenState, hashStepInstruction, interpolateSecretTemplates, interpolateVariables, isBetterSqlite3AbiMismatch, isBetterSqlite3NativeModuleError, isBetterSqlite3NodeGypSymlinkConflict, isMacPlatform, isPathInsideDir, isReservedAuthStateHookEnvKey, isWorkspacePathMatch, listAuthStateMetadata, listLLMAuthProviderPlugins, listObservations, listProviders, loadLLMAuthPlugins, localAppiumBinaryNames, mapMobileCapabilities, mapWebCapabilities, mergeRunAttributes, normalizeAuthStateUse, normalizeRole, parseAllTests, parseEnvFile, parseHookInline, parseHooksFile, parseMobileSource, parseObservation, parseRunAttrFlags, parseSuiteFile, parseTTL, parseTestFile, readAnalyticsIdentity, readAuth, readAuthStateMetadata, redactAuthStateString, redactAuthStateValue, redactSecretValue, registerAllProviders, registerLLMAuthProviderPlugin, registerLLMAuthProviderPlugins, registerProvider, removeAuth, removeAuthStateFiles, removeAuthStateTarget, resetAnalyticsServiceForTests, resolveAnalyticsAgentProduct, resolveAnalyticsIdentity, resolveAnalyticsStandardProperties, resolveAppiumExecutable, resolveAuthStateForRun, resolveAuthStatePaths, resolveAuthStateRoot, resolveBetterSqliteRebuildCommand, resolveFarmCredentials, resolveFileReferences, resolveLLMAuth, resolveMemoryRoot, resolveMobileRunConfig, resolveSecretTemplatesInValue, resolveWorkspaceFileTarget, resolveWorkspacePaths, runCurator, runHookInSandbox, runHooks, runSuite, runTest, runTestWithRetry, scanContent, serializeEnvFile, shouldAblate, sortRunAttributesForDisplay, stripHookInline, stripReservedAuthStateHookEnv, toolCallToActionPlan, toolSchemaMiddleware, truncateScreenState, validateConfig, validateFilename, validateFiles, validateProject, validateSuiteFile, validateTestFile, validateTrustedRunAttributes, validateUserRunAttributes, warnIfOutOfBounds, writeAnalyticsIdentity, writeAuth, writeAuthStateFiles, writeObservation };
|
|
2158
|
+
export { AGENT_QA_VERSION, ANDROID_ROLE_MAP, ATTR_GATE_RUN, ATTR_RUNNER, ATTR_TRIGGER, AUTH_STATE_SCHEMA_VERSION, AUTH_STATE_SLUG_PATTERN, AccessibilityConfigSchema, type ActionPlan, ActionPlanSchema, AdapterLogDataSchema, AgentLogDataSchema, type AgentQaConfig, AgentQaConfigSchema, type AgentQaUpdateStatus, AnalyticsSchema, type AppiumExecutableSource, type AsyncScopeStore, type AuthCredential, type AuthPluginBundle, type AuthPluginDeclaration, AuthPluginDeclarationSchema, type AuthProvider, AuthStateConfigSchema, type AuthStateMetadata, AuthStateMetadataSchema, AuthStateNameSchema, type AuthStateTargetPlatform, AuthStateUseSchema, type AuthStore, BrowserConfigSchema, CacheConfigSchema, CacheLogDataSchema, type CaptureConfig, CaptureConfigSchema, type CaptureResult, type CreateAuthFetchContext, type CreateAuthFetchOptions, DEFAULT_AGENT_QA_ARTIFACTS_DIR, DEFAULT_AGENT_QA_AUTH_STATES_DIR, DEFAULT_AGENT_QA_CACHE_DIR, DEFAULT_AGENT_QA_RUNS_DB_PATH, DEFAULT_AGENT_QA_RUNTIME_DIR, DEFAULT_AGENT_QA_SCREENSHOTS_DIR, DEFAULT_AGENT_QA_VIDEOS_DIR, type DashboardAuthMetadata, type DashboardAuthMode, DashboardConfigSchema, DeviceProfileSchema, DurationString, type ExchangeCodeContext, type ExtractionMethod, type ExtractorInput, type FarmMobileConfig, type FarmProvider, type FarmProviderConfig, type FarmWebConfig, type FileAttachment, HookDefinitionSchema, HookLogDataSchema, type HooksFileConfig, HooksFileSchema, INTERNAL_ATTRIBUTE_PREFIX, IOS_EDITABLE_TYPES, IOS_ROLE_MAP, type IdentifiedScrollOffsets, KEY_MAP, KnowledgeConfigSchema, LEGACY_AGENT_QA_DASHBOARD_DB_PATH, type LLMAuthProviderPlugin, type LLMModelAdapter, type LLMProviderMode, LOG_LEVEL_PRIORITY, LOOPBACK_HOSTS, type ListAuthStateMetadataInput, type LoadLLMAuthPluginsOptions, LogCaptureConfigSchema, type LogEntry, type LogLevel, LogManager, type LogSource, LogSourceDataSchemas, type LogStorage, LoggingConfigSchema, McpConfigSchema, type MemberLogScope, MemberLogScopeUnavailableError, type MobileAppState, MobileAppStateSchema, MobileElementResolver, type MobileNode, type MobilePlatform, type MobileRefMap, MobileSetupError, type MobileSetupErrorCategory, type MobileSetupErrorOptions, type MobileTransport, MobileUseOverrideSchema, MobileUseSchema, ModelConfigSchema, NameSlugSchema, NamedLLMConfigSchema, type NormalizedAuthStateUse, type OAuthTokens, PUBLIC_PROVIDER_API_HOSTS, type ParseAllTestBindingsResult, type ParseError, type ParseResult, type ParsedMobileSource, type ParsedRunAttrFlags, type ParsedTestBinding, type ParsedTestDocument, PatchOpUnsupportedTargetError, PatchPointerOutsideEditableRegionError, PatchPointerUnresolvableError, PatchedDocumentInvalidError, type PlanResult, type Planner, type PlannerConfig, PlannerConfigSchema, PlannerLogDataSchema, PluginsSchema, ProviderConfigSchema, type ProviderPluginDeclaration, ProviderPluginDeclarationSchema, type ProviderPluginDescriptor, RUN_ATTRIBUTE_KEY_MAX_LENGTH, RUN_ATTRIBUTE_VALUE_MAX_LENGTH, RecordingConfigSchema, type RefEntry, type RegistryConfig, RegistrySchema, type RemoveAuthStateFilesInput, type RemoveAuthStateTargetInput, type ResolveAppiumExecutableOptions, type ResolveAuthStateForRunInput, type ResolveAuthStatePathsInput, type ResolveAuthStateRootInput, type ResolveMobileRunConfigInput, type ResolvedAppiumExecutable, type ResolvedAuthStateForRun, type ResolvedAuthStatePaths, type ResolvedLLMAuth, type ResolvedMobileApp, type ResolvedMobileAppInstall, type ResolvedMobileDevice, type ResolvedMobileRunConfig, type ResolvedWorkspaceFile, type ResolvedWorkspacePaths, type RunAttributeRunner, type RunAttributeTrigger, type RunAttributes, type RunSuiteConfig, RunnerLogDataSchema, type ScopedLogger, type ServicesConfig, ServicesSchema, SizeString, type StartAuthContext, type StartAuthResult, type StepContext, type SuiteDefinition, SuiteDefinitionSchema, type SuiteResult, SuiteTestEntrySchema, TargetNameSchema, TargetSchema, type TestConfig, type TestDefinition, TestDefinitionSchema, type TestMeta, TestMetaSchema, type TestStep, TestStepSchema, TimeoutConfigSchema, type TokenRefreshFn, TransportSchema, type UseConfig, UseSchema, VALID_FILENAME_RE, VERSION_CHECK_CACHE_TTL_MS, VERSION_CHECK_TIMEOUT_MS, type ValidationDiagnostic, type ValidationResult, type VariableExtractor, type VerificationResult, type Verifier, type VerifyResult, type VersionCheckOptions, WEBVIEW_SCROLLERS_SCRIPT, type WorkspaceConfig, type WorkspaceFileKind, type WorkspaceFileRecord, WorkspaceSchema, type WriteAuthStateFilesInput, applyPatchSetToTestDoc, browserstackProvider, buildInternalRunAttributes, buildRefEntries, clearLLMAuthProviderPlugins, clearLoadedLLMAuthPluginModules, clearLoadedProviderPluginModules, computeFingerPositions, computePinch, computeSwipe, createAuthFetch, deriveMobileScroll, detectGlobOverlap, detectPlaywrightVersion, discoverWorkspaceFiles, estimateTokens, formatAppiumInstallGuidance, formatDiagnostics, formatDiagnosticsPlain, formatLogEntry, formatParseError, formatRunAttributesBlock, generateHookId, generatePKCE, generateRunId, generateState, getAgentQaUpdateStatus, getAgentQaVersion, getAgentQaVersionCheckCachePath, getAuthPath, getCredential, getLLMAuthProviderPlugin, getProvider, isCanonicalRunId, isLoopbackHost, isPathInsideDir, isWorkspacePathMatch, listAuthStateMetadata, listLLMAuthProviderPlugins, listProviders, loadLLMAuthPlugins, loadProviderPlugins, localAppiumBinaryNames, locateRunsDbPath, mapMobileCapabilities, mapWebCapabilities, mergeRunAttributes, normalizeAuthStateUse, normalizeRole, parseAllTestBindings, parseAllTests, parseHooksFile, parseMobileSource, parseRunAttrFlags, parseSuiteFile, parseTestFile, parseTestFileWithTokens, parseWebViewScrollers, patchTestForSuite, readAuth, readAuthStateMetadata, registerAllProviders, registerLLMAuthProviderPlugin, registerLLMAuthProviderPlugins, registerProvider, removeAuth, removeAuthStateFiles, removeAuthStateTarget, renderPatchedTestDoc, resolveAppiumExecutable, resolveAuthStateForRun, resolveAuthStatePaths, resolveAuthStateRoot, resolveFarmCredentials, resolveFileReferences, resolveKnowledgeRoot, resolveLLMAuth, resolveMobileRunConfig, resolveWorkspaceFileTarget, resolveWorkspacePaths, sortRunAttributesForDisplay, validateConfig, validateFilename, validateFiles, validateProject, validateSuiteFile, validateTestFile, validateTrustedRunAttributes, validateUserRunAttributes, warnIfOutOfBounds, webViewSwipeSignal, workspaceRelativeIdentityPath, writeAuth, writeAuthStateFiles, yamlParseFailureMessage };
|