@vostride/agent-qa-core 0.0.1 → 0.1.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/LICENSE.md +105 -0
- package/NOTICE.md +11 -0
- package/dist/index.cjs +11394 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +3508 -0
- package/dist/index.d.ts +3508 -0
- package/dist/index.js +11091 -0
- package/dist/index.js.map +1 -0
- package/package.json +78 -3
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,3508 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import * as ai from 'ai';
|
|
3
|
+
import { LanguageModel, wrapLanguageModel, LanguageModelMiddleware } from 'ai';
|
|
4
|
+
import * as better_sqlite3 from 'better-sqlite3';
|
|
5
|
+
export { generateObservationId } from '@vostride/agent-qa-ids';
|
|
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 PlatformConfig {
|
|
450
|
+
platform: 'web' | 'android' | 'ios';
|
|
451
|
+
browser?: BrowserConfig;
|
|
452
|
+
device?: DeviceConfig;
|
|
453
|
+
bundleId?: string;
|
|
454
|
+
appPackage?: string;
|
|
455
|
+
appActivity?: string;
|
|
456
|
+
deepLinkAppId?: string;
|
|
457
|
+
appState?: 'preserve' | 'reset';
|
|
458
|
+
appPath?: string;
|
|
459
|
+
browserstackApp?: string;
|
|
460
|
+
appiumUrl?: string;
|
|
461
|
+
timeouts?: TimeoutConfig;
|
|
462
|
+
recording?: {
|
|
463
|
+
enabled: boolean;
|
|
464
|
+
videoDir: string;
|
|
465
|
+
videoSize?: {
|
|
466
|
+
width: number;
|
|
467
|
+
height: number;
|
|
468
|
+
};
|
|
469
|
+
};
|
|
470
|
+
verbose?: boolean;
|
|
471
|
+
farmSession?: {
|
|
472
|
+
hostname: string;
|
|
473
|
+
port: number;
|
|
474
|
+
path: string;
|
|
475
|
+
capabilities: Record<string, unknown>;
|
|
476
|
+
};
|
|
477
|
+
logCapture?: {
|
|
478
|
+
console?: boolean;
|
|
479
|
+
network?: boolean;
|
|
480
|
+
};
|
|
481
|
+
}
|
|
482
|
+
interface BrowserConfig {
|
|
483
|
+
name: 'chromium' | 'firefox' | 'webkit';
|
|
484
|
+
headless?: boolean;
|
|
485
|
+
viewport?: {
|
|
486
|
+
width: number;
|
|
487
|
+
height: number;
|
|
488
|
+
};
|
|
489
|
+
}
|
|
490
|
+
interface DeviceConfig {
|
|
491
|
+
name: string;
|
|
492
|
+
platform: 'android' | 'ios';
|
|
493
|
+
transport: 'local' | 'browserstack';
|
|
494
|
+
match: Record<string, unknown>;
|
|
495
|
+
}
|
|
496
|
+
interface TimeoutConfig {
|
|
497
|
+
step?: number;
|
|
498
|
+
test?: number;
|
|
499
|
+
navigation?: number;
|
|
500
|
+
}
|
|
501
|
+
|
|
502
|
+
declare const CaptureConfigSchema: z.ZodObject<{
|
|
503
|
+
variable: z.ZodString;
|
|
504
|
+
method: z.ZodEnum<{
|
|
505
|
+
regex: "regex";
|
|
506
|
+
selector: "selector";
|
|
507
|
+
ai: "ai";
|
|
508
|
+
}>;
|
|
509
|
+
pattern: z.ZodOptional<z.ZodString>;
|
|
510
|
+
selector: z.ZodOptional<z.ZodString>;
|
|
511
|
+
description: z.ZodOptional<z.ZodString>;
|
|
512
|
+
}, z.core.$strict>;
|
|
513
|
+
declare const TestStepSchema: z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
514
|
+
step: z.ZodString;
|
|
515
|
+
timeout: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<number, string>>>;
|
|
516
|
+
retries: z.ZodOptional<z.ZodNumber>;
|
|
517
|
+
screenshot: z.ZodOptional<z.ZodBoolean>;
|
|
518
|
+
capture: z.ZodOptional<z.ZodObject<{
|
|
519
|
+
variable: z.ZodString;
|
|
520
|
+
method: z.ZodEnum<{
|
|
521
|
+
regex: "regex";
|
|
522
|
+
selector: "selector";
|
|
523
|
+
ai: "ai";
|
|
524
|
+
}>;
|
|
525
|
+
pattern: z.ZodOptional<z.ZodString>;
|
|
526
|
+
selector: z.ZodOptional<z.ZodString>;
|
|
527
|
+
description: z.ZodOptional<z.ZodString>;
|
|
528
|
+
}, z.core.$strict>>;
|
|
529
|
+
maxAttempts: z.ZodOptional<z.ZodNumber>;
|
|
530
|
+
}, z.core.$strict>]>;
|
|
531
|
+
declare const TestMetaSchema: z.ZodObject<{
|
|
532
|
+
timeout: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<number, string>>>;
|
|
533
|
+
retries: z.ZodOptional<z.ZodNumber>;
|
|
534
|
+
record: z.ZodOptional<z.ZodBoolean>;
|
|
535
|
+
}, z.core.$strict>;
|
|
536
|
+
declare const TestDefinitionSchema: z.ZodObject<{
|
|
537
|
+
'test-id': z.ZodString;
|
|
538
|
+
name: z.ZodString;
|
|
539
|
+
target: z.ZodString;
|
|
540
|
+
context: z.ZodOptional<z.ZodString>;
|
|
541
|
+
use: z.ZodOptional<z.ZodObject<{
|
|
542
|
+
browser: z.ZodOptional<z.ZodObject<{
|
|
543
|
+
name: z.ZodOptional<z.ZodEnum<{
|
|
544
|
+
chromium: "chromium";
|
|
545
|
+
firefox: "firefox";
|
|
546
|
+
webkit: "webkit";
|
|
547
|
+
}>>;
|
|
548
|
+
headless: z.ZodOptional<z.ZodBoolean>;
|
|
549
|
+
viewport: z.ZodOptional<z.ZodObject<{
|
|
550
|
+
width: z.ZodOptional<z.ZodNumber>;
|
|
551
|
+
height: z.ZodOptional<z.ZodNumber>;
|
|
552
|
+
}, z.core.$strict>>;
|
|
553
|
+
}, z.core.$strict>>;
|
|
554
|
+
timeout: z.ZodOptional<z.ZodObject<{
|
|
555
|
+
step: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<number, string>>>;
|
|
556
|
+
test: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<number, string>>>;
|
|
557
|
+
navigation: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<number, string>>>;
|
|
558
|
+
}, z.core.$strict>>;
|
|
559
|
+
healing: z.ZodOptional<z.ZodObject<{
|
|
560
|
+
maxAttempts: z.ZodOptional<z.ZodNumber>;
|
|
561
|
+
}, z.core.$strict>>;
|
|
562
|
+
planner: z.ZodOptional<z.ZodObject<{
|
|
563
|
+
maxSubActions: z.ZodOptional<z.ZodNumber>;
|
|
564
|
+
previousStepCount: z.ZodOptional<z.ZodNumber>;
|
|
565
|
+
}, z.core.$strict>>;
|
|
566
|
+
logCapture: z.ZodOptional<z.ZodObject<{
|
|
567
|
+
console: z.ZodOptional<z.ZodBoolean>;
|
|
568
|
+
network: z.ZodOptional<z.ZodBoolean>;
|
|
569
|
+
}, z.core.$strict>>;
|
|
570
|
+
cache: z.ZodOptional<z.ZodBoolean>;
|
|
571
|
+
mobile: z.ZodOptional<z.ZodObject<{
|
|
572
|
+
appState: z.ZodOptional<z.ZodEnum<{
|
|
573
|
+
preserve: "preserve";
|
|
574
|
+
reset: "reset";
|
|
575
|
+
}>>;
|
|
576
|
+
}, z.core.$strict>>;
|
|
577
|
+
llm: z.ZodOptional<z.ZodString>;
|
|
578
|
+
parallel: z.ZodOptional<z.ZodBoolean>;
|
|
579
|
+
device: z.ZodOptional<z.ZodString>;
|
|
580
|
+
}, z.core.$strict>>;
|
|
581
|
+
meta: z.ZodOptional<z.ZodObject<{
|
|
582
|
+
timeout: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<number, string>>>;
|
|
583
|
+
retries: z.ZodOptional<z.ZodNumber>;
|
|
584
|
+
record: z.ZodOptional<z.ZodBoolean>;
|
|
585
|
+
}, z.core.$strict>>;
|
|
586
|
+
setup: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
587
|
+
teardown: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
588
|
+
steps: z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
589
|
+
step: z.ZodString;
|
|
590
|
+
timeout: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<number, string>>>;
|
|
591
|
+
retries: z.ZodOptional<z.ZodNumber>;
|
|
592
|
+
screenshot: z.ZodOptional<z.ZodBoolean>;
|
|
593
|
+
capture: z.ZodOptional<z.ZodObject<{
|
|
594
|
+
variable: z.ZodString;
|
|
595
|
+
method: z.ZodEnum<{
|
|
596
|
+
regex: "regex";
|
|
597
|
+
selector: "selector";
|
|
598
|
+
ai: "ai";
|
|
599
|
+
}>;
|
|
600
|
+
pattern: z.ZodOptional<z.ZodString>;
|
|
601
|
+
selector: z.ZodOptional<z.ZodString>;
|
|
602
|
+
description: z.ZodOptional<z.ZodString>;
|
|
603
|
+
}, z.core.$strict>>;
|
|
604
|
+
maxAttempts: z.ZodOptional<z.ZodNumber>;
|
|
605
|
+
}, z.core.$strict>]>>;
|
|
606
|
+
}, z.core.$strict>;
|
|
607
|
+
|
|
608
|
+
declare const MobileAppStateSchema: z.ZodEnum<{
|
|
609
|
+
preserve: "preserve";
|
|
610
|
+
reset: "reset";
|
|
611
|
+
}>;
|
|
612
|
+
declare const MobileUseSchema: z.ZodObject<{
|
|
613
|
+
appState: z.ZodEnum<{
|
|
614
|
+
preserve: "preserve";
|
|
615
|
+
reset: "reset";
|
|
616
|
+
}>;
|
|
617
|
+
}, z.core.$strict>;
|
|
618
|
+
declare const MobileUseOverrideSchema: z.ZodObject<{
|
|
619
|
+
appState: z.ZodOptional<z.ZodEnum<{
|
|
620
|
+
preserve: "preserve";
|
|
621
|
+
reset: "reset";
|
|
622
|
+
}>>;
|
|
623
|
+
}, z.core.$strict>;
|
|
624
|
+
declare const UseSchema: z.ZodObject<{
|
|
625
|
+
browser: z.ZodOptional<z.ZodObject<{
|
|
626
|
+
name: z.ZodEnum<{
|
|
627
|
+
chromium: "chromium";
|
|
628
|
+
firefox: "firefox";
|
|
629
|
+
webkit: "webkit";
|
|
630
|
+
}>;
|
|
631
|
+
headless: z.ZodBoolean;
|
|
632
|
+
viewport: z.ZodOptional<z.ZodObject<{
|
|
633
|
+
width: z.ZodNumber;
|
|
634
|
+
height: z.ZodNumber;
|
|
635
|
+
}, z.core.$strict>>;
|
|
636
|
+
}, z.core.$strict>>;
|
|
637
|
+
mobile: z.ZodOptional<z.ZodObject<{
|
|
638
|
+
appState: z.ZodEnum<{
|
|
639
|
+
preserve: "preserve";
|
|
640
|
+
reset: "reset";
|
|
641
|
+
}>;
|
|
642
|
+
}, z.core.$strict>>;
|
|
643
|
+
timeout: z.ZodOptional<z.ZodObject<{
|
|
644
|
+
step: z.ZodPipe<z.ZodString, z.ZodTransform<number, string>>;
|
|
645
|
+
test: z.ZodPipe<z.ZodString, z.ZodTransform<number, string>>;
|
|
646
|
+
navigation: z.ZodPipe<z.ZodString, z.ZodTransform<number, string>>;
|
|
647
|
+
}, z.core.$strict>>;
|
|
648
|
+
healing: z.ZodOptional<z.ZodObject<{
|
|
649
|
+
maxAttempts: z.ZodNumber;
|
|
650
|
+
}, z.core.$strict>>;
|
|
651
|
+
planner: z.ZodOptional<z.ZodObject<{
|
|
652
|
+
maxSubActions: z.ZodNumber;
|
|
653
|
+
previousStepCount: z.ZodNumber;
|
|
654
|
+
}, z.core.$strict>>;
|
|
655
|
+
logCapture: z.ZodOptional<z.ZodObject<{
|
|
656
|
+
console: z.ZodBoolean;
|
|
657
|
+
network: z.ZodBoolean;
|
|
658
|
+
}, z.core.$strict>>;
|
|
659
|
+
cache: z.ZodOptional<z.ZodBoolean>;
|
|
660
|
+
llm: z.ZodOptional<z.ZodString>;
|
|
661
|
+
parallel: z.ZodOptional<z.ZodBoolean>;
|
|
662
|
+
}, z.core.$strict>;
|
|
663
|
+
declare const UseOverrideSchema: z.ZodObject<{
|
|
664
|
+
browser: z.ZodOptional<z.ZodObject<{
|
|
665
|
+
name: z.ZodOptional<z.ZodEnum<{
|
|
666
|
+
chromium: "chromium";
|
|
667
|
+
firefox: "firefox";
|
|
668
|
+
webkit: "webkit";
|
|
669
|
+
}>>;
|
|
670
|
+
headless: z.ZodOptional<z.ZodBoolean>;
|
|
671
|
+
viewport: z.ZodOptional<z.ZodObject<{
|
|
672
|
+
width: z.ZodOptional<z.ZodNumber>;
|
|
673
|
+
height: z.ZodOptional<z.ZodNumber>;
|
|
674
|
+
}, z.core.$strict>>;
|
|
675
|
+
}, z.core.$strict>>;
|
|
676
|
+
timeout: z.ZodOptional<z.ZodObject<{
|
|
677
|
+
step: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<number, string>>>;
|
|
678
|
+
test: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<number, string>>>;
|
|
679
|
+
navigation: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<number, string>>>;
|
|
680
|
+
}, z.core.$strict>>;
|
|
681
|
+
healing: z.ZodOptional<z.ZodObject<{
|
|
682
|
+
maxAttempts: z.ZodOptional<z.ZodNumber>;
|
|
683
|
+
}, z.core.$strict>>;
|
|
684
|
+
planner: z.ZodOptional<z.ZodObject<{
|
|
685
|
+
maxSubActions: z.ZodOptional<z.ZodNumber>;
|
|
686
|
+
previousStepCount: z.ZodOptional<z.ZodNumber>;
|
|
687
|
+
}, z.core.$strict>>;
|
|
688
|
+
logCapture: z.ZodOptional<z.ZodObject<{
|
|
689
|
+
console: z.ZodOptional<z.ZodBoolean>;
|
|
690
|
+
network: z.ZodOptional<z.ZodBoolean>;
|
|
691
|
+
}, z.core.$strict>>;
|
|
692
|
+
cache: z.ZodOptional<z.ZodBoolean>;
|
|
693
|
+
mobile: z.ZodOptional<z.ZodObject<{
|
|
694
|
+
appState: z.ZodOptional<z.ZodEnum<{
|
|
695
|
+
preserve: "preserve";
|
|
696
|
+
reset: "reset";
|
|
697
|
+
}>>;
|
|
698
|
+
}, z.core.$strict>>;
|
|
699
|
+
llm: z.ZodOptional<z.ZodString>;
|
|
700
|
+
parallel: z.ZodOptional<z.ZodBoolean>;
|
|
701
|
+
device: z.ZodOptional<z.ZodString>;
|
|
702
|
+
}, z.core.$strict>;
|
|
703
|
+
|
|
704
|
+
type TestStep = z.infer<typeof TestStepSchema>;
|
|
705
|
+
type TestMeta = z.infer<typeof TestMetaSchema>;
|
|
706
|
+
type TestConfig = z.infer<typeof UseOverrideSchema>;
|
|
707
|
+
type TestDefinition = z.infer<typeof TestDefinitionSchema>;
|
|
708
|
+
type CaptureConfig = z.infer<typeof CaptureConfigSchema>;
|
|
709
|
+
|
|
710
|
+
declare const WorkspaceSchema: z.ZodObject<{
|
|
711
|
+
testMatch: z.ZodArray<z.ZodString>;
|
|
712
|
+
suiteMatch: z.ZodArray<z.ZodString>;
|
|
713
|
+
testPathIgnore: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
714
|
+
hooksFile: z.ZodString;
|
|
715
|
+
agentRules: z.ZodString;
|
|
716
|
+
envFile: z.ZodString;
|
|
717
|
+
secretsFile: z.ZodString;
|
|
718
|
+
}, z.core.$strict>;
|
|
719
|
+
|
|
720
|
+
declare const DashboardConfigSchema: z.ZodObject<{
|
|
721
|
+
port: z.ZodOptional<z.ZodNumber>;
|
|
722
|
+
dbPath: z.ZodOptional<z.ZodString>;
|
|
723
|
+
artifactsDir: z.ZodOptional<z.ZodString>;
|
|
724
|
+
}, z.core.$strict>;
|
|
725
|
+
declare const McpConfigSchema: z.ZodObject<{
|
|
726
|
+
enabled: z.ZodOptional<z.ZodBoolean>;
|
|
727
|
+
transport: z.ZodOptional<z.ZodEnum<{
|
|
728
|
+
http: "http";
|
|
729
|
+
stdio: "stdio";
|
|
730
|
+
}>>;
|
|
731
|
+
host: z.ZodOptional<z.ZodString & z.ZodType<"localhost" | "127.0.0.1" | "::1", string, z.core.$ZodTypeInternals<"localhost" | "127.0.0.1" | "::1", string>>>;
|
|
732
|
+
port: z.ZodOptional<z.ZodNumber>;
|
|
733
|
+
path: z.ZodOptional<z.ZodString>;
|
|
734
|
+
}, z.core.$strict>;
|
|
735
|
+
declare const CacheConfigSchema: z.ZodObject<{
|
|
736
|
+
dir: z.ZodString;
|
|
737
|
+
ttl: z.ZodPipe<z.ZodString, z.ZodTransform<number, string>>;
|
|
738
|
+
}, z.core.$strict>;
|
|
739
|
+
declare const LoggingConfigSchema: z.ZodObject<{
|
|
740
|
+
level: z.ZodEnum<{
|
|
741
|
+
info: "info";
|
|
742
|
+
warn: "warn";
|
|
743
|
+
error: "error";
|
|
744
|
+
silent: "silent";
|
|
745
|
+
debug: "debug";
|
|
746
|
+
}>;
|
|
747
|
+
}, z.core.$strict>;
|
|
748
|
+
declare const RecordingConfigSchema: z.ZodObject<{
|
|
749
|
+
enabled: z.ZodOptional<z.ZodBoolean>;
|
|
750
|
+
}, z.core.$strict>;
|
|
751
|
+
declare const AccessibilityConfigSchema: z.ZodObject<{
|
|
752
|
+
enabled: z.ZodBoolean;
|
|
753
|
+
standard: z.ZodOptional<z.ZodEnum<{
|
|
754
|
+
wcag2a: "wcag2a";
|
|
755
|
+
wcag2aa: "wcag2aa";
|
|
756
|
+
wcag2aaa: "wcag2aaa";
|
|
757
|
+
}>>;
|
|
758
|
+
runAfter: z.ZodOptional<z.ZodEnum<{
|
|
759
|
+
navigation: "navigation";
|
|
760
|
+
"every-step": "every-step";
|
|
761
|
+
"test-end": "test-end";
|
|
762
|
+
}>>;
|
|
763
|
+
failOnViolation: z.ZodOptional<z.ZodBoolean>;
|
|
764
|
+
disableRules: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
765
|
+
exclude: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
766
|
+
}, z.core.$strict>;
|
|
767
|
+
declare const ServicesSchema: z.ZodObject<{
|
|
768
|
+
dashboard: z.ZodOptional<z.ZodObject<{
|
|
769
|
+
port: z.ZodOptional<z.ZodNumber>;
|
|
770
|
+
dbPath: z.ZodOptional<z.ZodString>;
|
|
771
|
+
artifactsDir: z.ZodOptional<z.ZodString>;
|
|
772
|
+
}, z.core.$strict>>;
|
|
773
|
+
mcp: z.ZodOptional<z.ZodObject<{
|
|
774
|
+
enabled: z.ZodOptional<z.ZodBoolean>;
|
|
775
|
+
transport: z.ZodOptional<z.ZodEnum<{
|
|
776
|
+
http: "http";
|
|
777
|
+
stdio: "stdio";
|
|
778
|
+
}>>;
|
|
779
|
+
host: z.ZodOptional<z.ZodString & z.ZodType<"localhost" | "127.0.0.1" | "::1", string, z.core.$ZodTypeInternals<"localhost" | "127.0.0.1" | "::1", string>>>;
|
|
780
|
+
port: z.ZodOptional<z.ZodNumber>;
|
|
781
|
+
path: z.ZodOptional<z.ZodString>;
|
|
782
|
+
}, z.core.$strict>>;
|
|
783
|
+
cache: z.ZodOptional<z.ZodObject<{
|
|
784
|
+
dir: z.ZodString;
|
|
785
|
+
ttl: z.ZodPipe<z.ZodString, z.ZodTransform<number, string>>;
|
|
786
|
+
}, z.core.$strict>>;
|
|
787
|
+
logging: z.ZodOptional<z.ZodObject<{
|
|
788
|
+
level: z.ZodEnum<{
|
|
789
|
+
info: "info";
|
|
790
|
+
warn: "warn";
|
|
791
|
+
error: "error";
|
|
792
|
+
silent: "silent";
|
|
793
|
+
debug: "debug";
|
|
794
|
+
}>;
|
|
795
|
+
}, z.core.$strict>>;
|
|
796
|
+
recording: z.ZodOptional<z.ZodObject<{
|
|
797
|
+
enabled: z.ZodOptional<z.ZodBoolean>;
|
|
798
|
+
}, z.core.$strict>>;
|
|
799
|
+
accessibility: z.ZodOptional<z.ZodObject<{
|
|
800
|
+
enabled: z.ZodBoolean;
|
|
801
|
+
standard: z.ZodOptional<z.ZodEnum<{
|
|
802
|
+
wcag2a: "wcag2a";
|
|
803
|
+
wcag2aa: "wcag2aa";
|
|
804
|
+
wcag2aaa: "wcag2aaa";
|
|
805
|
+
}>>;
|
|
806
|
+
runAfter: z.ZodOptional<z.ZodEnum<{
|
|
807
|
+
navigation: "navigation";
|
|
808
|
+
"every-step": "every-step";
|
|
809
|
+
"test-end": "test-end";
|
|
810
|
+
}>>;
|
|
811
|
+
failOnViolation: z.ZodOptional<z.ZodBoolean>;
|
|
812
|
+
disableRules: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
813
|
+
exclude: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
814
|
+
}, z.core.$strict>>;
|
|
815
|
+
memory: z.ZodOptional<z.ZodObject<{
|
|
816
|
+
enabled: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
817
|
+
provider: z.ZodDefault<z.ZodOptional<z.ZodEnum<{
|
|
818
|
+
local: "local";
|
|
819
|
+
}>>>;
|
|
820
|
+
dir: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
821
|
+
minTrust: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
822
|
+
maxInjections: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
823
|
+
curatorEnabled: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
824
|
+
curatorLockTimeout: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
825
|
+
trustConfirmDelta: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
826
|
+
trustContradictDelta: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
827
|
+
ablationEnabled: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
828
|
+
circuitBreakerEnabled: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
829
|
+
circuitBreakerWindowSize: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
830
|
+
circuitBreakerBaselineSize: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
831
|
+
circuitBreakerThreshold: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
832
|
+
}, z.core.$strict>>;
|
|
833
|
+
}, z.core.$strict>;
|
|
834
|
+
|
|
835
|
+
declare const TargetSchema: z.ZodObject<{
|
|
836
|
+
product: z.ZodOptional<z.ZodString>;
|
|
837
|
+
platform: z.ZodEnum<{
|
|
838
|
+
web: "web";
|
|
839
|
+
android: "android";
|
|
840
|
+
ios: "ios";
|
|
841
|
+
}>;
|
|
842
|
+
bundleId: z.ZodOptional<z.ZodString>;
|
|
843
|
+
appPackage: z.ZodOptional<z.ZodString>;
|
|
844
|
+
appActivity: z.ZodOptional<z.ZodString>;
|
|
845
|
+
app: z.ZodOptional<z.ZodObject<{
|
|
846
|
+
path: z.ZodOptional<z.ZodString>;
|
|
847
|
+
browserstack: z.ZodOptional<z.ZodString>;
|
|
848
|
+
}, z.core.$strict>>;
|
|
849
|
+
url: z.ZodOptional<z.ZodString>;
|
|
850
|
+
}, z.core.$strict>;
|
|
851
|
+
declare const DeviceProfileSchema: z.ZodObject<{
|
|
852
|
+
platform: z.ZodEnum<{
|
|
853
|
+
android: "android";
|
|
854
|
+
ios: "ios";
|
|
855
|
+
}>;
|
|
856
|
+
transport: z.ZodEnum<{
|
|
857
|
+
local: "local";
|
|
858
|
+
browserstack: "browserstack";
|
|
859
|
+
}>;
|
|
860
|
+
match: z.ZodDefault<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
|
|
861
|
+
}, z.core.$strict>;
|
|
862
|
+
declare const ProviderConfigSchema: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
863
|
+
declare const RegistrySchema: z.ZodObject<{
|
|
864
|
+
llms: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
865
|
+
provider: z.ZodString;
|
|
866
|
+
model: z.ZodString;
|
|
867
|
+
baseURL: z.ZodOptional<z.ZodString>;
|
|
868
|
+
providerHeaders: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
869
|
+
screenshotSize: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<number, string>>>;
|
|
870
|
+
effectiveResolution: z.ZodOptional<z.ZodNumber>;
|
|
871
|
+
name: z.ZodString;
|
|
872
|
+
contextWindow: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<number, string>>>;
|
|
873
|
+
}, z.core.$strict>>>>;
|
|
874
|
+
targets: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
875
|
+
product: z.ZodOptional<z.ZodString>;
|
|
876
|
+
platform: z.ZodEnum<{
|
|
877
|
+
web: "web";
|
|
878
|
+
android: "android";
|
|
879
|
+
ios: "ios";
|
|
880
|
+
}>;
|
|
881
|
+
bundleId: z.ZodOptional<z.ZodString>;
|
|
882
|
+
appPackage: z.ZodOptional<z.ZodString>;
|
|
883
|
+
appActivity: z.ZodOptional<z.ZodString>;
|
|
884
|
+
app: z.ZodOptional<z.ZodObject<{
|
|
885
|
+
path: z.ZodOptional<z.ZodString>;
|
|
886
|
+
browserstack: z.ZodOptional<z.ZodString>;
|
|
887
|
+
}, z.core.$strict>>;
|
|
888
|
+
url: z.ZodOptional<z.ZodString>;
|
|
889
|
+
}, z.core.$strict>>>;
|
|
890
|
+
devices: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
891
|
+
platform: z.ZodEnum<{
|
|
892
|
+
android: "android";
|
|
893
|
+
ios: "ios";
|
|
894
|
+
}>;
|
|
895
|
+
transport: z.ZodEnum<{
|
|
896
|
+
local: "local";
|
|
897
|
+
browserstack: "browserstack";
|
|
898
|
+
}>;
|
|
899
|
+
match: z.ZodDefault<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
|
|
900
|
+
}, z.core.$strict>>>;
|
|
901
|
+
providers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
|
|
902
|
+
}, z.core.$strict>;
|
|
903
|
+
|
|
904
|
+
declare const AnalyticsSchema: z.ZodObject<{
|
|
905
|
+
privacy: z.ZodOptional<z.ZodLiteral<true>>;
|
|
906
|
+
passRateScope: z.ZodOptional<z.ZodObject<{
|
|
907
|
+
attributes: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
908
|
+
regex: z.ZodString;
|
|
909
|
+
}, z.core.$strict>]>>>;
|
|
910
|
+
}, z.core.$strict>>;
|
|
911
|
+
}, z.core.$strict>;
|
|
912
|
+
|
|
913
|
+
declare const DurationString: z.ZodPipe<z.ZodString, z.ZodTransform<number, string>>;
|
|
914
|
+
declare const SizeString: z.ZodPipe<z.ZodString, z.ZodTransform<number, string>>;
|
|
915
|
+
declare const ModelConfigSchema: z.ZodObject<{
|
|
916
|
+
provider: z.ZodString;
|
|
917
|
+
model: z.ZodString;
|
|
918
|
+
baseURL: z.ZodOptional<z.ZodString>;
|
|
919
|
+
providerHeaders: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
920
|
+
screenshotSize: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<number, string>>>;
|
|
921
|
+
effectiveResolution: z.ZodOptional<z.ZodNumber>;
|
|
922
|
+
}, z.core.$strict>;
|
|
923
|
+
declare const NamedLLMConfigSchema: z.ZodObject<{
|
|
924
|
+
provider: z.ZodString;
|
|
925
|
+
model: z.ZodString;
|
|
926
|
+
baseURL: z.ZodOptional<z.ZodString>;
|
|
927
|
+
providerHeaders: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
928
|
+
screenshotSize: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<number, string>>>;
|
|
929
|
+
effectiveResolution: z.ZodOptional<z.ZodNumber>;
|
|
930
|
+
name: z.ZodString;
|
|
931
|
+
contextWindow: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<number, string>>>;
|
|
932
|
+
}, z.core.$strict>;
|
|
933
|
+
declare const HealingConfigSchema: z.ZodObject<{
|
|
934
|
+
maxAttempts: z.ZodNumber;
|
|
935
|
+
}, z.core.$strict>;
|
|
936
|
+
declare const TimeoutConfigSchema: z.ZodObject<{
|
|
937
|
+
step: z.ZodPipe<z.ZodString, z.ZodTransform<number, string>>;
|
|
938
|
+
test: z.ZodPipe<z.ZodString, z.ZodTransform<number, string>>;
|
|
939
|
+
navigation: z.ZodPipe<z.ZodString, z.ZodTransform<number, string>>;
|
|
940
|
+
}, z.core.$strict>;
|
|
941
|
+
declare const BrowserConfigSchema: z.ZodObject<{
|
|
942
|
+
name: z.ZodEnum<{
|
|
943
|
+
chromium: "chromium";
|
|
944
|
+
firefox: "firefox";
|
|
945
|
+
webkit: "webkit";
|
|
946
|
+
}>;
|
|
947
|
+
headless: z.ZodBoolean;
|
|
948
|
+
viewport: z.ZodOptional<z.ZodObject<{
|
|
949
|
+
width: z.ZodNumber;
|
|
950
|
+
height: z.ZodNumber;
|
|
951
|
+
}, z.core.$strict>>;
|
|
952
|
+
}, z.core.$strict>;
|
|
953
|
+
declare const TransportSchema: z.ZodEnum<{
|
|
954
|
+
local: "local";
|
|
955
|
+
browserstack: "browserstack";
|
|
956
|
+
}>;
|
|
957
|
+
declare const PlannerConfigSchema: z.ZodObject<{
|
|
958
|
+
maxSubActions: z.ZodNumber;
|
|
959
|
+
previousStepCount: z.ZodNumber;
|
|
960
|
+
}, z.core.$strict>;
|
|
961
|
+
declare const LogCaptureConfigSchema: z.ZodObject<{
|
|
962
|
+
console: z.ZodBoolean;
|
|
963
|
+
network: z.ZodBoolean;
|
|
964
|
+
}, z.core.$strict>;
|
|
965
|
+
|
|
966
|
+
declare const AuthPluginDeclarationSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
967
|
+
package: z.ZodString;
|
|
968
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
969
|
+
path: z.ZodString;
|
|
970
|
+
}, z.core.$strict>]>;
|
|
971
|
+
declare const PluginsSchema: z.ZodObject<{
|
|
972
|
+
auth: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
|
|
973
|
+
package: z.ZodString;
|
|
974
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
975
|
+
path: z.ZodString;
|
|
976
|
+
}, z.core.$strict>]>>>>;
|
|
977
|
+
}, z.core.$strict>;
|
|
978
|
+
declare const AgentQaConfigSchema: z.ZodObject<{
|
|
979
|
+
workspace: z.ZodObject<{
|
|
980
|
+
testMatch: z.ZodArray<z.ZodString>;
|
|
981
|
+
suiteMatch: z.ZodArray<z.ZodString>;
|
|
982
|
+
testPathIgnore: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
983
|
+
hooksFile: z.ZodString;
|
|
984
|
+
agentRules: z.ZodString;
|
|
985
|
+
envFile: z.ZodString;
|
|
986
|
+
secretsFile: z.ZodString;
|
|
987
|
+
}, z.core.$strict>;
|
|
988
|
+
services: z.ZodOptional<z.ZodObject<{
|
|
989
|
+
dashboard: z.ZodOptional<z.ZodObject<{
|
|
990
|
+
port: z.ZodOptional<z.ZodNumber>;
|
|
991
|
+
dbPath: z.ZodOptional<z.ZodString>;
|
|
992
|
+
artifactsDir: z.ZodOptional<z.ZodString>;
|
|
993
|
+
}, z.core.$strict>>;
|
|
994
|
+
mcp: z.ZodOptional<z.ZodObject<{
|
|
995
|
+
enabled: z.ZodOptional<z.ZodBoolean>;
|
|
996
|
+
transport: z.ZodOptional<z.ZodEnum<{
|
|
997
|
+
http: "http";
|
|
998
|
+
stdio: "stdio";
|
|
999
|
+
}>>;
|
|
1000
|
+
host: z.ZodOptional<z.ZodString & z.ZodType<"localhost" | "127.0.0.1" | "::1", string, z.core.$ZodTypeInternals<"localhost" | "127.0.0.1" | "::1", string>>>;
|
|
1001
|
+
port: z.ZodOptional<z.ZodNumber>;
|
|
1002
|
+
path: z.ZodOptional<z.ZodString>;
|
|
1003
|
+
}, z.core.$strict>>;
|
|
1004
|
+
cache: z.ZodOptional<z.ZodObject<{
|
|
1005
|
+
dir: z.ZodString;
|
|
1006
|
+
ttl: z.ZodPipe<z.ZodString, z.ZodTransform<number, string>>;
|
|
1007
|
+
}, z.core.$strict>>;
|
|
1008
|
+
logging: z.ZodOptional<z.ZodObject<{
|
|
1009
|
+
level: z.ZodEnum<{
|
|
1010
|
+
info: "info";
|
|
1011
|
+
warn: "warn";
|
|
1012
|
+
error: "error";
|
|
1013
|
+
silent: "silent";
|
|
1014
|
+
debug: "debug";
|
|
1015
|
+
}>;
|
|
1016
|
+
}, z.core.$strict>>;
|
|
1017
|
+
recording: z.ZodOptional<z.ZodObject<{
|
|
1018
|
+
enabled: z.ZodOptional<z.ZodBoolean>;
|
|
1019
|
+
}, z.core.$strict>>;
|
|
1020
|
+
accessibility: z.ZodOptional<z.ZodObject<{
|
|
1021
|
+
enabled: z.ZodBoolean;
|
|
1022
|
+
standard: z.ZodOptional<z.ZodEnum<{
|
|
1023
|
+
wcag2a: "wcag2a";
|
|
1024
|
+
wcag2aa: "wcag2aa";
|
|
1025
|
+
wcag2aaa: "wcag2aaa";
|
|
1026
|
+
}>>;
|
|
1027
|
+
runAfter: z.ZodOptional<z.ZodEnum<{
|
|
1028
|
+
navigation: "navigation";
|
|
1029
|
+
"every-step": "every-step";
|
|
1030
|
+
"test-end": "test-end";
|
|
1031
|
+
}>>;
|
|
1032
|
+
failOnViolation: z.ZodOptional<z.ZodBoolean>;
|
|
1033
|
+
disableRules: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
1034
|
+
exclude: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
1035
|
+
}, z.core.$strict>>;
|
|
1036
|
+
memory: z.ZodOptional<z.ZodObject<{
|
|
1037
|
+
enabled: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
1038
|
+
provider: z.ZodDefault<z.ZodOptional<z.ZodEnum<{
|
|
1039
|
+
local: "local";
|
|
1040
|
+
}>>>;
|
|
1041
|
+
dir: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
1042
|
+
minTrust: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
1043
|
+
maxInjections: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
1044
|
+
curatorEnabled: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
1045
|
+
curatorLockTimeout: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
1046
|
+
trustConfirmDelta: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
1047
|
+
trustContradictDelta: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
1048
|
+
ablationEnabled: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
1049
|
+
circuitBreakerEnabled: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
1050
|
+
circuitBreakerWindowSize: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
1051
|
+
circuitBreakerBaselineSize: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
1052
|
+
circuitBreakerThreshold: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
1053
|
+
}, z.core.$strict>>;
|
|
1054
|
+
}, z.core.$strict>>;
|
|
1055
|
+
registry: z.ZodOptional<z.ZodObject<{
|
|
1056
|
+
llms: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
1057
|
+
provider: z.ZodString;
|
|
1058
|
+
model: z.ZodString;
|
|
1059
|
+
baseURL: z.ZodOptional<z.ZodString>;
|
|
1060
|
+
providerHeaders: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
1061
|
+
screenshotSize: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<number, string>>>;
|
|
1062
|
+
effectiveResolution: z.ZodOptional<z.ZodNumber>;
|
|
1063
|
+
name: z.ZodString;
|
|
1064
|
+
contextWindow: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<number, string>>>;
|
|
1065
|
+
}, z.core.$strict>>>>;
|
|
1066
|
+
targets: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
1067
|
+
product: z.ZodOptional<z.ZodString>;
|
|
1068
|
+
platform: z.ZodEnum<{
|
|
1069
|
+
web: "web";
|
|
1070
|
+
android: "android";
|
|
1071
|
+
ios: "ios";
|
|
1072
|
+
}>;
|
|
1073
|
+
bundleId: z.ZodOptional<z.ZodString>;
|
|
1074
|
+
appPackage: z.ZodOptional<z.ZodString>;
|
|
1075
|
+
appActivity: z.ZodOptional<z.ZodString>;
|
|
1076
|
+
app: z.ZodOptional<z.ZodObject<{
|
|
1077
|
+
path: z.ZodOptional<z.ZodString>;
|
|
1078
|
+
browserstack: z.ZodOptional<z.ZodString>;
|
|
1079
|
+
}, z.core.$strict>>;
|
|
1080
|
+
url: z.ZodOptional<z.ZodString>;
|
|
1081
|
+
}, z.core.$strict>>>;
|
|
1082
|
+
devices: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
1083
|
+
platform: z.ZodEnum<{
|
|
1084
|
+
android: "android";
|
|
1085
|
+
ios: "ios";
|
|
1086
|
+
}>;
|
|
1087
|
+
transport: z.ZodEnum<{
|
|
1088
|
+
local: "local";
|
|
1089
|
+
browserstack: "browserstack";
|
|
1090
|
+
}>;
|
|
1091
|
+
match: z.ZodDefault<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
|
|
1092
|
+
}, z.core.$strict>>>;
|
|
1093
|
+
providers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
|
|
1094
|
+
}, z.core.$strict>>;
|
|
1095
|
+
use: z.ZodOptional<z.ZodObject<{
|
|
1096
|
+
browser: z.ZodOptional<z.ZodObject<{
|
|
1097
|
+
name: z.ZodEnum<{
|
|
1098
|
+
chromium: "chromium";
|
|
1099
|
+
firefox: "firefox";
|
|
1100
|
+
webkit: "webkit";
|
|
1101
|
+
}>;
|
|
1102
|
+
headless: z.ZodBoolean;
|
|
1103
|
+
viewport: z.ZodOptional<z.ZodObject<{
|
|
1104
|
+
width: z.ZodNumber;
|
|
1105
|
+
height: z.ZodNumber;
|
|
1106
|
+
}, z.core.$strict>>;
|
|
1107
|
+
}, z.core.$strict>>;
|
|
1108
|
+
mobile: z.ZodOptional<z.ZodObject<{
|
|
1109
|
+
appState: z.ZodEnum<{
|
|
1110
|
+
preserve: "preserve";
|
|
1111
|
+
reset: "reset";
|
|
1112
|
+
}>;
|
|
1113
|
+
}, z.core.$strict>>;
|
|
1114
|
+
timeout: z.ZodOptional<z.ZodObject<{
|
|
1115
|
+
step: z.ZodPipe<z.ZodString, z.ZodTransform<number, string>>;
|
|
1116
|
+
test: z.ZodPipe<z.ZodString, z.ZodTransform<number, string>>;
|
|
1117
|
+
navigation: z.ZodPipe<z.ZodString, z.ZodTransform<number, string>>;
|
|
1118
|
+
}, z.core.$strict>>;
|
|
1119
|
+
healing: z.ZodOptional<z.ZodObject<{
|
|
1120
|
+
maxAttempts: z.ZodNumber;
|
|
1121
|
+
}, z.core.$strict>>;
|
|
1122
|
+
planner: z.ZodOptional<z.ZodObject<{
|
|
1123
|
+
maxSubActions: z.ZodNumber;
|
|
1124
|
+
previousStepCount: z.ZodNumber;
|
|
1125
|
+
}, z.core.$strict>>;
|
|
1126
|
+
logCapture: z.ZodOptional<z.ZodObject<{
|
|
1127
|
+
console: z.ZodBoolean;
|
|
1128
|
+
network: z.ZodBoolean;
|
|
1129
|
+
}, z.core.$strict>>;
|
|
1130
|
+
cache: z.ZodOptional<z.ZodBoolean>;
|
|
1131
|
+
llm: z.ZodOptional<z.ZodString>;
|
|
1132
|
+
parallel: z.ZodOptional<z.ZodBoolean>;
|
|
1133
|
+
}, z.core.$strict>>;
|
|
1134
|
+
plugins: z.ZodOptional<z.ZodObject<{
|
|
1135
|
+
auth: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
|
|
1136
|
+
package: z.ZodString;
|
|
1137
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
1138
|
+
path: z.ZodString;
|
|
1139
|
+
}, z.core.$strict>]>>>>;
|
|
1140
|
+
}, z.core.$strict>>;
|
|
1141
|
+
analytics: z.ZodOptional<z.ZodObject<{
|
|
1142
|
+
privacy: z.ZodOptional<z.ZodLiteral<true>>;
|
|
1143
|
+
passRateScope: z.ZodOptional<z.ZodObject<{
|
|
1144
|
+
attributes: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
1145
|
+
regex: z.ZodString;
|
|
1146
|
+
}, z.core.$strict>]>>>;
|
|
1147
|
+
}, z.core.$strict>>;
|
|
1148
|
+
}, z.core.$strict>>;
|
|
1149
|
+
}, z.core.$strict>;
|
|
1150
|
+
|
|
1151
|
+
type AgentQaConfig = z.infer<typeof AgentQaConfigSchema>;
|
|
1152
|
+
type WorkspaceConfig = z.infer<typeof WorkspaceSchema>;
|
|
1153
|
+
type ServicesConfig = z.infer<typeof ServicesSchema>;
|
|
1154
|
+
type RegistryConfig = z.infer<typeof RegistrySchema>;
|
|
1155
|
+
type UseConfig = z.infer<typeof UseSchema>;
|
|
1156
|
+
|
|
1157
|
+
declare const ActionPlanSchema: z.ZodObject<{
|
|
1158
|
+
reasoning: z.ZodString;
|
|
1159
|
+
action: z.ZodObject<{
|
|
1160
|
+
type: z.ZodString;
|
|
1161
|
+
}, z.core.$loose>;
|
|
1162
|
+
confidence: z.ZodNumber;
|
|
1163
|
+
stepComplete: z.ZodDefault<z.ZodBoolean>;
|
|
1164
|
+
stepFailed: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
1165
|
+
}, z.core.$strip>;
|
|
1166
|
+
type ActionPlan = z.infer<typeof ActionPlanSchema>;
|
|
1167
|
+
|
|
1168
|
+
declare const SuiteTestEntrySchema: z.ZodObject<{
|
|
1169
|
+
test: z.ZodString;
|
|
1170
|
+
id: z.ZodString;
|
|
1171
|
+
}, z.core.$strict>;
|
|
1172
|
+
declare const SuiteDefinitionSchema: z.ZodObject<{
|
|
1173
|
+
'suite-id': z.ZodOptional<z.ZodString>;
|
|
1174
|
+
name: z.ZodString;
|
|
1175
|
+
target: z.ZodString;
|
|
1176
|
+
context: z.ZodOptional<z.ZodString>;
|
|
1177
|
+
setup: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
1178
|
+
teardown: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
1179
|
+
tests: z.ZodArray<z.ZodObject<{
|
|
1180
|
+
test: z.ZodString;
|
|
1181
|
+
id: z.ZodString;
|
|
1182
|
+
}, z.core.$strict>>;
|
|
1183
|
+
use: z.ZodOptional<z.ZodObject<{
|
|
1184
|
+
browser: z.ZodOptional<z.ZodObject<{
|
|
1185
|
+
name: z.ZodOptional<z.ZodEnum<{
|
|
1186
|
+
chromium: "chromium";
|
|
1187
|
+
firefox: "firefox";
|
|
1188
|
+
webkit: "webkit";
|
|
1189
|
+
}>>;
|
|
1190
|
+
headless: z.ZodOptional<z.ZodBoolean>;
|
|
1191
|
+
viewport: z.ZodOptional<z.ZodObject<{
|
|
1192
|
+
width: z.ZodOptional<z.ZodNumber>;
|
|
1193
|
+
height: z.ZodOptional<z.ZodNumber>;
|
|
1194
|
+
}, z.core.$strict>>;
|
|
1195
|
+
}, z.core.$strict>>;
|
|
1196
|
+
timeout: z.ZodOptional<z.ZodObject<{
|
|
1197
|
+
step: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<number, string>>>;
|
|
1198
|
+
test: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<number, string>>>;
|
|
1199
|
+
navigation: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<number, string>>>;
|
|
1200
|
+
}, z.core.$strict>>;
|
|
1201
|
+
healing: z.ZodOptional<z.ZodObject<{
|
|
1202
|
+
maxAttempts: z.ZodOptional<z.ZodNumber>;
|
|
1203
|
+
}, z.core.$strict>>;
|
|
1204
|
+
planner: z.ZodOptional<z.ZodObject<{
|
|
1205
|
+
maxSubActions: z.ZodOptional<z.ZodNumber>;
|
|
1206
|
+
previousStepCount: z.ZodOptional<z.ZodNumber>;
|
|
1207
|
+
}, z.core.$strict>>;
|
|
1208
|
+
logCapture: z.ZodOptional<z.ZodObject<{
|
|
1209
|
+
console: z.ZodOptional<z.ZodBoolean>;
|
|
1210
|
+
network: z.ZodOptional<z.ZodBoolean>;
|
|
1211
|
+
}, z.core.$strict>>;
|
|
1212
|
+
cache: z.ZodOptional<z.ZodBoolean>;
|
|
1213
|
+
mobile: z.ZodOptional<z.ZodObject<{
|
|
1214
|
+
appState: z.ZodOptional<z.ZodEnum<{
|
|
1215
|
+
preserve: "preserve";
|
|
1216
|
+
reset: "reset";
|
|
1217
|
+
}>>;
|
|
1218
|
+
}, z.core.$strict>>;
|
|
1219
|
+
llm: z.ZodOptional<z.ZodString>;
|
|
1220
|
+
parallel: z.ZodOptional<z.ZodBoolean>;
|
|
1221
|
+
device: z.ZodOptional<z.ZodString>;
|
|
1222
|
+
}, z.core.$strict>>;
|
|
1223
|
+
}, z.core.$strict>;
|
|
1224
|
+
|
|
1225
|
+
declare const HookDefinitionSchema: z.ZodObject<{
|
|
1226
|
+
id: z.ZodString;
|
|
1227
|
+
name: z.ZodString;
|
|
1228
|
+
runtime: z.ZodEnum<{
|
|
1229
|
+
node: "node";
|
|
1230
|
+
bun: "bun";
|
|
1231
|
+
python: "python";
|
|
1232
|
+
bash: "bash";
|
|
1233
|
+
}>;
|
|
1234
|
+
file: z.ZodString;
|
|
1235
|
+
deps: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString>>>;
|
|
1236
|
+
packageFile: z.ZodOptional<z.ZodString>;
|
|
1237
|
+
timeout: z.ZodPipe<z.ZodString, z.ZodTransform<number, string>>;
|
|
1238
|
+
network: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
1239
|
+
}, z.core.$strip>;
|
|
1240
|
+
declare const HooksFileSchema: z.ZodObject<{
|
|
1241
|
+
hooks: z.ZodArray<z.ZodObject<{
|
|
1242
|
+
id: z.ZodString;
|
|
1243
|
+
name: z.ZodString;
|
|
1244
|
+
runtime: z.ZodEnum<{
|
|
1245
|
+
node: "node";
|
|
1246
|
+
bun: "bun";
|
|
1247
|
+
python: "python";
|
|
1248
|
+
bash: "bash";
|
|
1249
|
+
}>;
|
|
1250
|
+
file: z.ZodString;
|
|
1251
|
+
deps: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString>>>;
|
|
1252
|
+
packageFile: z.ZodOptional<z.ZodString>;
|
|
1253
|
+
timeout: z.ZodPipe<z.ZodString, z.ZodTransform<number, string>>;
|
|
1254
|
+
network: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
1255
|
+
}, z.core.$strip>>;
|
|
1256
|
+
}, z.core.$strip>;
|
|
1257
|
+
type HooksFileConfig = z.infer<typeof HooksFileSchema>;
|
|
1258
|
+
|
|
1259
|
+
interface ParseError {
|
|
1260
|
+
file: string;
|
|
1261
|
+
line: number;
|
|
1262
|
+
column: number;
|
|
1263
|
+
message: string;
|
|
1264
|
+
severity: 'error' | 'warning';
|
|
1265
|
+
source: string;
|
|
1266
|
+
suggestion?: string;
|
|
1267
|
+
}
|
|
1268
|
+
interface FormatOptions {
|
|
1269
|
+
noColor?: boolean;
|
|
1270
|
+
}
|
|
1271
|
+
declare function formatParseError(error: ParseError, opts?: FormatOptions): string;
|
|
1272
|
+
|
|
1273
|
+
interface ParseResult {
|
|
1274
|
+
tests: TestDefinition[];
|
|
1275
|
+
errors: ParseError[];
|
|
1276
|
+
}
|
|
1277
|
+
declare function parseTestFile(content: string, filePath: string): ParseResult;
|
|
1278
|
+
declare function parseAllTests(filePaths: string[]): Promise<ParseResult>;
|
|
1279
|
+
|
|
1280
|
+
interface FileAttachment {
|
|
1281
|
+
name: string;
|
|
1282
|
+
path: string;
|
|
1283
|
+
content: Buffer;
|
|
1284
|
+
mimeType: string;
|
|
1285
|
+
}
|
|
1286
|
+
declare function resolveFileReferences(stepText: string, testFilePath: string): Promise<{
|
|
1287
|
+
resolvedText: string;
|
|
1288
|
+
attachments: FileAttachment[];
|
|
1289
|
+
}>;
|
|
1290
|
+
|
|
1291
|
+
type SuiteDefinition = z.infer<typeof SuiteDefinitionSchema>;
|
|
1292
|
+
interface SuiteResult {
|
|
1293
|
+
runId?: string;
|
|
1294
|
+
name: string;
|
|
1295
|
+
status: 'passed' | 'failed' | 'cancelled';
|
|
1296
|
+
tests: TestResult[];
|
|
1297
|
+
duration: number;
|
|
1298
|
+
failedAt?: number;
|
|
1299
|
+
}
|
|
1300
|
+
|
|
1301
|
+
declare function parseSuiteFile(filePath: string): Promise<SuiteDefinition>;
|
|
1302
|
+
|
|
1303
|
+
type LogLevel = 'silent' | 'error' | 'warn' | 'info' | 'debug';
|
|
1304
|
+
declare const LOG_LEVEL_PRIORITY: Record<LogLevel, number>;
|
|
1305
|
+
type LogSource = 'agent' | 'adapter' | 'cache' | 'planner' | 'healer' | 'hook' | 'runner';
|
|
1306
|
+
interface LogEntry {
|
|
1307
|
+
id: string;
|
|
1308
|
+
stepId: string | null;
|
|
1309
|
+
runId: string;
|
|
1310
|
+
level: Exclude<LogLevel, 'silent'>;
|
|
1311
|
+
source: LogSource;
|
|
1312
|
+
message: string;
|
|
1313
|
+
data: Record<string, unknown>;
|
|
1314
|
+
timestamp: string;
|
|
1315
|
+
}
|
|
1316
|
+
interface LogStorage {
|
|
1317
|
+
insertLogs(entries: LogEntry[]): void;
|
|
1318
|
+
getLogs(opts: {
|
|
1319
|
+
runId?: string;
|
|
1320
|
+
stepId?: string;
|
|
1321
|
+
level?: string;
|
|
1322
|
+
source?: string;
|
|
1323
|
+
limit?: number;
|
|
1324
|
+
offset?: number;
|
|
1325
|
+
}): LogEntry[];
|
|
1326
|
+
}
|
|
1327
|
+
interface ScopedLogger {
|
|
1328
|
+
debug(msg: string, data?: Record<string, unknown>): void;
|
|
1329
|
+
info(msg: string, data?: Record<string, unknown>): void;
|
|
1330
|
+
warn(msg: string, data?: Record<string, unknown>): void;
|
|
1331
|
+
error(msg: string, data?: Record<string, unknown>): void;
|
|
1332
|
+
}
|
|
1333
|
+
declare const AgentLogDataSchema: z.ZodObject<{
|
|
1334
|
+
extractDom: z.ZodOptional<z.ZodBoolean>;
|
|
1335
|
+
hasScreenshot: z.ZodOptional<z.ZodBoolean>;
|
|
1336
|
+
duration: z.ZodOptional<z.ZodNumber>;
|
|
1337
|
+
elementCount: z.ZodOptional<z.ZodNumber>;
|
|
1338
|
+
}, z.core.$strip>;
|
|
1339
|
+
declare const AdapterLogDataSchema: z.ZodObject<{
|
|
1340
|
+
actionType: z.ZodOptional<z.ZodString>;
|
|
1341
|
+
selector: z.ZodOptional<z.ZodString>;
|
|
1342
|
+
coordinates: z.ZodOptional<z.ZodObject<{
|
|
1343
|
+
x: z.ZodNumber;
|
|
1344
|
+
y: z.ZodNumber;
|
|
1345
|
+
}, z.core.$strip>>;
|
|
1346
|
+
elementProperties: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
1347
|
+
duration: z.ZodOptional<z.ZodNumber>;
|
|
1348
|
+
}, z.core.$strip>;
|
|
1349
|
+
declare const CacheLogDataSchema: z.ZodObject<{
|
|
1350
|
+
operation: z.ZodEnum<{
|
|
1351
|
+
set: "set";
|
|
1352
|
+
get: "get";
|
|
1353
|
+
invalidate: "invalidate";
|
|
1354
|
+
bypass: "bypass";
|
|
1355
|
+
"batch-purge": "batch-purge";
|
|
1356
|
+
}>;
|
|
1357
|
+
stepHash: z.ZodOptional<z.ZodString>;
|
|
1358
|
+
screenHash: z.ZodOptional<z.ZodString>;
|
|
1359
|
+
hit: z.ZodOptional<z.ZodBoolean>;
|
|
1360
|
+
age: z.ZodOptional<z.ZodNumber>;
|
|
1361
|
+
entriesDeleted: z.ZodOptional<z.ZodNumber>;
|
|
1362
|
+
}, z.core.$strip>;
|
|
1363
|
+
declare const PlannerLogDataSchema: z.ZodObject<{
|
|
1364
|
+
model: z.ZodOptional<z.ZodString>;
|
|
1365
|
+
promptTokens: z.ZodOptional<z.ZodNumber>;
|
|
1366
|
+
completionTokens: z.ZodOptional<z.ZodNumber>;
|
|
1367
|
+
latencyMs: z.ZodOptional<z.ZodNumber>;
|
|
1368
|
+
confidence: z.ZodOptional<z.ZodNumber>;
|
|
1369
|
+
actionType: z.ZodOptional<z.ZodString>;
|
|
1370
|
+
}, z.core.$strip>;
|
|
1371
|
+
declare const HealerLogDataSchema: z.ZodObject<{
|
|
1372
|
+
strategy: z.ZodOptional<z.ZodString>;
|
|
1373
|
+
attempt: z.ZodOptional<z.ZodNumber>;
|
|
1374
|
+
maxAttempts: z.ZodOptional<z.ZodNumber>;
|
|
1375
|
+
stateDiffDetected: z.ZodOptional<z.ZodBoolean>;
|
|
1376
|
+
success: z.ZodOptional<z.ZodBoolean>;
|
|
1377
|
+
}, z.core.$strip>;
|
|
1378
|
+
declare const HookLogDataSchema: z.ZodObject<{
|
|
1379
|
+
hookName: z.ZodOptional<z.ZodString>;
|
|
1380
|
+
phase: z.ZodOptional<z.ZodEnum<{
|
|
1381
|
+
setup: "setup";
|
|
1382
|
+
teardown: "teardown";
|
|
1383
|
+
}>>;
|
|
1384
|
+
duration: z.ZodOptional<z.ZodNumber>;
|
|
1385
|
+
success: z.ZodOptional<z.ZodBoolean>;
|
|
1386
|
+
}, z.core.$strip>;
|
|
1387
|
+
declare const RunnerLogDataSchema: z.ZodObject<{
|
|
1388
|
+
stepIndex: z.ZodOptional<z.ZodNumber>;
|
|
1389
|
+
totalSteps: z.ZodOptional<z.ZodNumber>;
|
|
1390
|
+
testName: z.ZodOptional<z.ZodString>;
|
|
1391
|
+
variablesCaptured: z.ZodOptional<z.ZodNumber>;
|
|
1392
|
+
}, z.core.$strip>;
|
|
1393
|
+
declare const LogSourceDataSchemas: Record<LogSource, z.ZodType>;
|
|
1394
|
+
|
|
1395
|
+
interface SecretTemplate {
|
|
1396
|
+
pattern: string;
|
|
1397
|
+
name: string;
|
|
1398
|
+
}
|
|
1399
|
+
interface SecretFileMetadata {
|
|
1400
|
+
count: number;
|
|
1401
|
+
}
|
|
1402
|
+
declare class SecretConfigError extends Error {
|
|
1403
|
+
constructor(message: string);
|
|
1404
|
+
}
|
|
1405
|
+
declare class MissingSecretError extends Error {
|
|
1406
|
+
constructor(name: string);
|
|
1407
|
+
}
|
|
1408
|
+
declare class SecretStore {
|
|
1409
|
+
private storage;
|
|
1410
|
+
constructor(secrets?: Record<string, string>);
|
|
1411
|
+
static empty(): SecretStore;
|
|
1412
|
+
static fromEnvContent(content: string): SecretStore;
|
|
1413
|
+
private set;
|
|
1414
|
+
get(name: string): string | undefined;
|
|
1415
|
+
require(name: string): string;
|
|
1416
|
+
has(name: string): boolean;
|
|
1417
|
+
count(): number;
|
|
1418
|
+
metadata(): SecretFileMetadata;
|
|
1419
|
+
forEachSecret(callback: (name: string, value: string) => void): void;
|
|
1420
|
+
}
|
|
1421
|
+
declare function findSecretTemplates(text: string): SecretTemplate[];
|
|
1422
|
+
declare function interpolateSecretTemplates(template: string, store: SecretStore): string;
|
|
1423
|
+
declare function resolveSecretTemplatesInValue<T>(value: T, store?: SecretStore): T;
|
|
1424
|
+
declare function redactSecretValue<T>(value: T, redactor?: SecretRedactor): T;
|
|
1425
|
+
declare class SecretRedactor {
|
|
1426
|
+
private readonly store;
|
|
1427
|
+
private readonly genericMarker;
|
|
1428
|
+
private valuePatterns;
|
|
1429
|
+
constructor(store: SecretStore, genericMarker?: string);
|
|
1430
|
+
redactString(value: string): string;
|
|
1431
|
+
redactValue(value: unknown): unknown;
|
|
1432
|
+
}
|
|
1433
|
+
|
|
1434
|
+
declare class LogManager {
|
|
1435
|
+
private buffer;
|
|
1436
|
+
private currentStepId;
|
|
1437
|
+
private runId;
|
|
1438
|
+
private runIdSet;
|
|
1439
|
+
private readonly displayLevel;
|
|
1440
|
+
private readonly storage?;
|
|
1441
|
+
private readonly ndjson;
|
|
1442
|
+
private redactor?;
|
|
1443
|
+
constructor(opts: {
|
|
1444
|
+
runId?: string;
|
|
1445
|
+
displayLevel: LogLevel;
|
|
1446
|
+
storage?: LogStorage;
|
|
1447
|
+
ndjson?: boolean;
|
|
1448
|
+
redactor?: SecretRedactor;
|
|
1449
|
+
});
|
|
1450
|
+
setRedactor(redactor: SecretRedactor | undefined): void;
|
|
1451
|
+
log(level: Exclude<LogLevel, 'silent'>, source: LogSource, message: string, data?: Record<string, unknown>): void;
|
|
1452
|
+
private shouldDisplay;
|
|
1453
|
+
private emitNdjson;
|
|
1454
|
+
setCurrentStep(stepId: string): void;
|
|
1455
|
+
clearCurrentStep(): void;
|
|
1456
|
+
setRunId(runId: string): void;
|
|
1457
|
+
flush(): void;
|
|
1458
|
+
getBuffer(): LogEntry[];
|
|
1459
|
+
createScopedLogger(source: LogSource): ScopedLogger;
|
|
1460
|
+
}
|
|
1461
|
+
|
|
1462
|
+
interface PlannerConfig {
|
|
1463
|
+
maxSubActions: number;
|
|
1464
|
+
previousStepCount: number;
|
|
1465
|
+
}
|
|
1466
|
+
interface PlanResult {
|
|
1467
|
+
plan: ActionPlan;
|
|
1468
|
+
tokenUsage?: TokenUsage;
|
|
1469
|
+
}
|
|
1470
|
+
interface VerifyResult {
|
|
1471
|
+
verification: VerificationResult;
|
|
1472
|
+
tokenUsage?: TokenUsage;
|
|
1473
|
+
}
|
|
1474
|
+
type AgentPhase = {
|
|
1475
|
+
type: 'observe';
|
|
1476
|
+
} | {
|
|
1477
|
+
type: 'plan';
|
|
1478
|
+
screenState: ScreenState;
|
|
1479
|
+
} | {
|
|
1480
|
+
type: 'execute';
|
|
1481
|
+
action: Action;
|
|
1482
|
+
screenStateBefore: ScreenState;
|
|
1483
|
+
} | {
|
|
1484
|
+
type: 'verify';
|
|
1485
|
+
action: Action;
|
|
1486
|
+
screenStateBefore: ScreenState;
|
|
1487
|
+
result: ActionResult;
|
|
1488
|
+
} | {
|
|
1489
|
+
type: 'heal';
|
|
1490
|
+
error: string;
|
|
1491
|
+
attempts: HealingAttempt[];
|
|
1492
|
+
screenStateBefore: ScreenState;
|
|
1493
|
+
failedAction: Action;
|
|
1494
|
+
} | {
|
|
1495
|
+
type: 'done';
|
|
1496
|
+
result: StepResult;
|
|
1497
|
+
};
|
|
1498
|
+
interface StepContext {
|
|
1499
|
+
stepInstruction: string;
|
|
1500
|
+
testName: string;
|
|
1501
|
+
testContext?: string;
|
|
1502
|
+
suiteContext?: string;
|
|
1503
|
+
agentRules?: string;
|
|
1504
|
+
previousSteps: {
|
|
1505
|
+
instruction: string;
|
|
1506
|
+
outcome: string;
|
|
1507
|
+
reasoning?: string;
|
|
1508
|
+
plannedAction?: string;
|
|
1509
|
+
verifierResponse?: string;
|
|
1510
|
+
}[];
|
|
1511
|
+
contextWindow?: number;
|
|
1512
|
+
plannerModel: LanguageModel;
|
|
1513
|
+
verifierModel: LanguageModel;
|
|
1514
|
+
healingConfig: HealingConfig;
|
|
1515
|
+
modelId?: string;
|
|
1516
|
+
variables?: Record<string, string>;
|
|
1517
|
+
memoryContext?: string;
|
|
1518
|
+
failureContext?: string;
|
|
1519
|
+
/** Sub-actions already attempted in this step (multi-action mode). */
|
|
1520
|
+
subActionHistory?: {
|
|
1521
|
+
action: string;
|
|
1522
|
+
reasoning?: string;
|
|
1523
|
+
result: 'success' | 'failure';
|
|
1524
|
+
error?: string;
|
|
1525
|
+
verifierRejection?: string;
|
|
1526
|
+
screenChanged?: boolean;
|
|
1527
|
+
data?: string;
|
|
1528
|
+
}[];
|
|
1529
|
+
plannerConfig?: PlannerConfig;
|
|
1530
|
+
screenshot?: Buffer;
|
|
1531
|
+
}
|
|
1532
|
+
interface HealingConfig {
|
|
1533
|
+
maxAttempts: number;
|
|
1534
|
+
}
|
|
1535
|
+
interface AgentLoopConfig {
|
|
1536
|
+
adapter: PlatformAdapter;
|
|
1537
|
+
planner: Planner;
|
|
1538
|
+
verifier?: Verifier;
|
|
1539
|
+
cache?: ActionCache;
|
|
1540
|
+
healingConfig: HealingConfig;
|
|
1541
|
+
plannerConfig?: PlannerConfig;
|
|
1542
|
+
/** Wall-clock timeout for a single step (ms). 0 or undefined = no timeout. */
|
|
1543
|
+
stepTimeout?: number;
|
|
1544
|
+
/** Override the consecutive failure limit for this step. */
|
|
1545
|
+
maxAttempts?: number;
|
|
1546
|
+
logger?: LogManager;
|
|
1547
|
+
configContent?: string;
|
|
1548
|
+
testFileContent?: string;
|
|
1549
|
+
testFilePath?: string;
|
|
1550
|
+
stepIndex?: number;
|
|
1551
|
+
suiteFileContent?: string;
|
|
1552
|
+
suiteTestIndex?: number;
|
|
1553
|
+
cacheState?: {
|
|
1554
|
+
invalidated: boolean;
|
|
1555
|
+
};
|
|
1556
|
+
logCapture?: {
|
|
1557
|
+
console?: boolean;
|
|
1558
|
+
network?: boolean;
|
|
1559
|
+
};
|
|
1560
|
+
screenshotSize?: number;
|
|
1561
|
+
/** Max image edge (pixels) to resize screenshots to before sending to LLM. From ModelConfig. */
|
|
1562
|
+
effectiveResolution?: number;
|
|
1563
|
+
onSetVariable?: (name: string, value: string) => void;
|
|
1564
|
+
onPhase?: (event: StepPhaseEvent) => void | Promise<void>;
|
|
1565
|
+
abortSignal?: AbortSignal;
|
|
1566
|
+
secretStore?: SecretStore;
|
|
1567
|
+
secretRedactor?: SecretRedactor;
|
|
1568
|
+
}
|
|
1569
|
+
interface Planner {
|
|
1570
|
+
plan(step: string, screenState: ScreenState, context: StepContext, abortSignal?: AbortSignal): Promise<PlanResult>;
|
|
1571
|
+
}
|
|
1572
|
+
interface Verifier {
|
|
1573
|
+
verify(step: string, before: ScreenState, after: ScreenState, action: Action, screenshot?: Buffer, abortSignal?: AbortSignal): Promise<VerifyResult>;
|
|
1574
|
+
}
|
|
1575
|
+
interface VerificationResult {
|
|
1576
|
+
success: boolean;
|
|
1577
|
+
reasoning: string;
|
|
1578
|
+
isAppError: boolean;
|
|
1579
|
+
}
|
|
1580
|
+
interface ActionCache {
|
|
1581
|
+
get(stepHash: string, screenHash: string): Promise<ActionPlan | null>;
|
|
1582
|
+
set(stepHash: string, screenHash: string, plan: ActionPlan): Promise<void>;
|
|
1583
|
+
invalidate(stepHash: string, screenHash: string): Promise<void>;
|
|
1584
|
+
getSubAction(stepHash: string, index: number): Promise<ActionPlan | null>;
|
|
1585
|
+
setSubAction(stepHash: string, index: number, plan: ActionPlan): Promise<void>;
|
|
1586
|
+
invalidateSubActionsFrom(stepHash: string, fromIndex: number): Promise<void>;
|
|
1587
|
+
}
|
|
1588
|
+
type AssertionType = 'text-presence' | 'element-visibility' | 'url-match' | 'element-count' | 'ai';
|
|
1589
|
+
interface AssertionResult {
|
|
1590
|
+
passed: boolean;
|
|
1591
|
+
assertionType: AssertionType;
|
|
1592
|
+
expected: string;
|
|
1593
|
+
actual: string;
|
|
1594
|
+
reasoning: string;
|
|
1595
|
+
}
|
|
1596
|
+
interface Asserter {
|
|
1597
|
+
evaluate(assertion: AssertionInput, screenState: ScreenState): Promise<AssertionResult>;
|
|
1598
|
+
}
|
|
1599
|
+
interface AssertionInput {
|
|
1600
|
+
type: AssertionType;
|
|
1601
|
+
value: string;
|
|
1602
|
+
expected?: string;
|
|
1603
|
+
}
|
|
1604
|
+
type ExtractionMethod = 'regex' | 'selector' | 'ai';
|
|
1605
|
+
interface ExtractorInput {
|
|
1606
|
+
method: ExtractionMethod;
|
|
1607
|
+
variableName: string;
|
|
1608
|
+
pattern?: string;
|
|
1609
|
+
selector?: string;
|
|
1610
|
+
description?: string;
|
|
1611
|
+
}
|
|
1612
|
+
interface CaptureResult {
|
|
1613
|
+
success: boolean;
|
|
1614
|
+
variableName: string;
|
|
1615
|
+
value?: string;
|
|
1616
|
+
reasoning: string;
|
|
1617
|
+
}
|
|
1618
|
+
interface VariableExtractor {
|
|
1619
|
+
extract(input: ExtractorInput, screenState: ScreenState): Promise<CaptureResult>;
|
|
1620
|
+
}
|
|
1621
|
+
|
|
1622
|
+
declare function truncateScreenState(state: ScreenState): string;
|
|
1623
|
+
declare function hashScreenState(state: ScreenState): string;
|
|
1624
|
+
interface StepHashInputs {
|
|
1625
|
+
step: string;
|
|
1626
|
+
platform?: string;
|
|
1627
|
+
configContent?: string;
|
|
1628
|
+
testFileContent?: string;
|
|
1629
|
+
stepIndex?: number;
|
|
1630
|
+
suiteFileContent?: string;
|
|
1631
|
+
suiteTestIndex?: number;
|
|
1632
|
+
}
|
|
1633
|
+
declare function hashStepInstruction(inputs: StepHashInputs): string;
|
|
1634
|
+
declare function hashStepInstruction(step: string, platform?: string, configContent?: string, testFileContent?: string, stepIndex?: number): string;
|
|
1635
|
+
|
|
1636
|
+
declare function estimateTokens(text: string): number;
|
|
1637
|
+
|
|
1638
|
+
declare const SUPPORTED_PROVIDERS: readonly ["openai-compatible", "anthropic-compatible", "openai-subscription", "anthropic-subscription", "gemini"];
|
|
1639
|
+
type BuiltInProviderMode = typeof SUPPORTED_PROVIDERS[number];
|
|
1640
|
+
type ProviderMode = BuiltInProviderMode | (string & {});
|
|
1641
|
+
type LLMModelAdapter$1 = 'openai-responses' | 'anthropic-messages';
|
|
1642
|
+
interface ModelConfig {
|
|
1643
|
+
provider: ProviderMode;
|
|
1644
|
+
model: string;
|
|
1645
|
+
modelAdapter?: LLMModelAdapter$1;
|
|
1646
|
+
apiKey?: string;
|
|
1647
|
+
authToken?: string;
|
|
1648
|
+
baseURL?: string;
|
|
1649
|
+
providerHeaders?: Record<string, string>;
|
|
1650
|
+
fetch?: typeof globalThis.fetch;
|
|
1651
|
+
}
|
|
1652
|
+
type JSONValue = string | number | boolean | null | JSONValue[] | {
|
|
1653
|
+
[key: string]: JSONValue | undefined;
|
|
1654
|
+
};
|
|
1655
|
+
type ProviderOptions = Record<string, Record<string, JSONValue | undefined>> | undefined;
|
|
1656
|
+
declare function getProviderOptions(config: ModelConfig): ProviderOptions;
|
|
1657
|
+
declare function createModel(config: ModelConfig): Promise<LanguageModel>;
|
|
1658
|
+
|
|
1659
|
+
declare class LLMPlanner implements Planner {
|
|
1660
|
+
private model;
|
|
1661
|
+
private platform;
|
|
1662
|
+
private providerOptions;
|
|
1663
|
+
private logger?;
|
|
1664
|
+
private agentRules?;
|
|
1665
|
+
constructor(model: LanguageModel, platform?: 'web' | 'android' | 'ios', providerOptions?: ProviderOptions, logger?: ScopedLogger, agentRules?: string);
|
|
1666
|
+
plan(step: string, screenState: ScreenState, context: StepContext, abortSignal?: AbortSignal): Promise<PlanResult>;
|
|
1667
|
+
}
|
|
1668
|
+
|
|
1669
|
+
declare const VerificationResultSchema: z.ZodObject<{
|
|
1670
|
+
success: z.ZodBoolean;
|
|
1671
|
+
reasoning: z.ZodString;
|
|
1672
|
+
isAppError: z.ZodBoolean;
|
|
1673
|
+
}, z.core.$strip>;
|
|
1674
|
+
declare class LLMVerifier implements Verifier {
|
|
1675
|
+
private model;
|
|
1676
|
+
private providerOptions;
|
|
1677
|
+
constructor(model: LanguageModel, providerOptions?: ProviderOptions);
|
|
1678
|
+
verify(step: string, before: ScreenState, after: ScreenState, action: Action, screenshot?: Buffer, abortSignal?: AbortSignal): Promise<VerifyResult>;
|
|
1679
|
+
}
|
|
1680
|
+
|
|
1681
|
+
declare function buildSystemPrompt(platform?: 'web' | 'android' | 'ios', agentRules?: string): string;
|
|
1682
|
+
declare function buildStepPrompt(step: string, screenState: ScreenState, context: StepContext, logger?: ScopedLogger, systemPromptContext?: {
|
|
1683
|
+
platform?: 'web' | 'android' | 'ios';
|
|
1684
|
+
agentRules?: string;
|
|
1685
|
+
}): string;
|
|
1686
|
+
declare function buildVerificationPrompt(step: string, beforeState: ScreenState, afterState: ScreenState, action: Action, hasScreenshot?: boolean): string;
|
|
1687
|
+
declare function buildAssertionPrompt(assertion: AssertionInput, screenState: ScreenState): string;
|
|
1688
|
+
declare function buildExtractionPrompt(input: ExtractorInput, screenState: ScreenState): string;
|
|
1689
|
+
|
|
1690
|
+
type ToolCategory = 'action' | 'file' | 'network';
|
|
1691
|
+
interface ToolDefinition<T extends z.ZodType = z.ZodType> {
|
|
1692
|
+
name: string;
|
|
1693
|
+
description: string;
|
|
1694
|
+
category: ToolCategory;
|
|
1695
|
+
platform?: ('web' | 'android' | 'ios')[];
|
|
1696
|
+
schema: T;
|
|
1697
|
+
}
|
|
1698
|
+
|
|
1699
|
+
declare class ToolRegistry {
|
|
1700
|
+
private tools;
|
|
1701
|
+
register<T extends z.ZodType>(def: ToolDefinition<T>): this;
|
|
1702
|
+
get(name: string): ToolDefinition | undefined;
|
|
1703
|
+
getAll(): ToolDefinition[];
|
|
1704
|
+
getFiltered(options: {
|
|
1705
|
+
platform?: string;
|
|
1706
|
+
categories?: ToolCategory[];
|
|
1707
|
+
}): ToolDefinition[];
|
|
1708
|
+
getSchema(name: string): z.ZodType;
|
|
1709
|
+
generateDocs(platform?: string): string;
|
|
1710
|
+
}
|
|
1711
|
+
declare const defaultRegistry: ToolRegistry;
|
|
1712
|
+
|
|
1713
|
+
declare const MOBILE_ONLY_ACTIONS: Set<string>;
|
|
1714
|
+
declare const WEB_ONLY_ACTIONS: Set<string>;
|
|
1715
|
+
|
|
1716
|
+
declare function buildTools(registry: ToolRegistry, options: {
|
|
1717
|
+
platform: 'web' | 'android' | 'ios';
|
|
1718
|
+
categories?: ToolCategory[];
|
|
1719
|
+
}): Record<string, ai.Tool<any, any>>;
|
|
1720
|
+
declare function toolCallToActionPlan(toolName: string, args: Record<string, unknown>, registry: ToolRegistry): {
|
|
1721
|
+
reasoning: string;
|
|
1722
|
+
confidence: number;
|
|
1723
|
+
stepComplete: boolean;
|
|
1724
|
+
stepFailed: boolean;
|
|
1725
|
+
action: {
|
|
1726
|
+
type: string;
|
|
1727
|
+
};
|
|
1728
|
+
};
|
|
1729
|
+
|
|
1730
|
+
declare const toolSchemaMiddleware: LanguageModelMiddleware;
|
|
1731
|
+
declare function createWrappedModel(baseModel: Parameters<typeof wrapLanguageModel>[0]['model']): LanguageModel;
|
|
1732
|
+
|
|
1733
|
+
declare const AssertionResultSchema: z.ZodObject<{
|
|
1734
|
+
passed: z.ZodBoolean;
|
|
1735
|
+
reasoning: z.ZodString;
|
|
1736
|
+
evidence: z.ZodString;
|
|
1737
|
+
}, z.core.$strip>;
|
|
1738
|
+
declare class AssertionEvaluator implements Asserter {
|
|
1739
|
+
evaluate(assertion: AssertionInput, screenState: ScreenState): Promise<AssertionResult>;
|
|
1740
|
+
private evaluateTextPresence;
|
|
1741
|
+
private evaluateElementVisibility;
|
|
1742
|
+
private evaluateUrlMatch;
|
|
1743
|
+
private evaluateElementCount;
|
|
1744
|
+
}
|
|
1745
|
+
declare class LLMAssertionEvaluator implements Asserter {
|
|
1746
|
+
private model;
|
|
1747
|
+
constructor(model: LanguageModel);
|
|
1748
|
+
evaluate(assertion: AssertionInput, screenState: ScreenState): Promise<AssertionResult>;
|
|
1749
|
+
}
|
|
1750
|
+
declare function createAsserter(model?: LanguageModel): Asserter;
|
|
1751
|
+
|
|
1752
|
+
declare function executeStep(stepInstruction: string, config: AgentLoopConfig, context: StepContext): Promise<StepResult>;
|
|
1753
|
+
|
|
1754
|
+
interface RebuildCommand {
|
|
1755
|
+
command: string;
|
|
1756
|
+
args: string[];
|
|
1757
|
+
}
|
|
1758
|
+
declare function isBetterSqlite3AbiMismatch(error: unknown): boolean;
|
|
1759
|
+
declare function isBetterSqlite3NativeModuleError(error: unknown): boolean;
|
|
1760
|
+
declare function isBetterSqlite3NodeGypSymlinkConflict(error: unknown): boolean;
|
|
1761
|
+
declare function resolveBetterSqliteRebuildCommand(): RebuildCommand;
|
|
1762
|
+
type BetterSqlite3Database = better_sqlite3.Database;
|
|
1763
|
+
declare function createBetterSqlite3Database(path: string): BetterSqlite3Database;
|
|
1764
|
+
|
|
1765
|
+
interface MemoryIndexParams {
|
|
1766
|
+
product: string;
|
|
1767
|
+
suiteId?: string;
|
|
1768
|
+
testId: string;
|
|
1769
|
+
memoryRoot: string;
|
|
1770
|
+
currentSuiteTests?: Array<{
|
|
1771
|
+
test: string;
|
|
1772
|
+
id: string;
|
|
1773
|
+
}>;
|
|
1774
|
+
currentPosition?: number;
|
|
1775
|
+
}
|
|
1776
|
+
declare function buildMemoryIndex(params: MemoryIndexParams): Promise<BetterSqlite3Database | null>;
|
|
1777
|
+
|
|
1778
|
+
declare const BaseObservationSchema: z.ZodObject<{
|
|
1779
|
+
id: z.ZodString;
|
|
1780
|
+
title: z.ZodString;
|
|
1781
|
+
content: z.ZodString;
|
|
1782
|
+
trust: z.ZodNumber;
|
|
1783
|
+
created: z.ZodString;
|
|
1784
|
+
last_confirmed: z.ZodString;
|
|
1785
|
+
confirmed_count: z.ZodNumber;
|
|
1786
|
+
contradicted_count: z.ZodNumber;
|
|
1787
|
+
source_test: z.ZodString;
|
|
1788
|
+
}, z.core.$strip>;
|
|
1789
|
+
declare const SuiteObservationSchema: z.ZodObject<{
|
|
1790
|
+
id: z.ZodString;
|
|
1791
|
+
title: z.ZodString;
|
|
1792
|
+
content: z.ZodString;
|
|
1793
|
+
trust: z.ZodNumber;
|
|
1794
|
+
created: z.ZodString;
|
|
1795
|
+
last_confirmed: z.ZodString;
|
|
1796
|
+
confirmed_count: z.ZodNumber;
|
|
1797
|
+
contradicted_count: z.ZodNumber;
|
|
1798
|
+
source_test: z.ZodString;
|
|
1799
|
+
position: z.ZodNumber;
|
|
1800
|
+
suite_snapshot: z.ZodArray<z.ZodObject<{
|
|
1801
|
+
test: z.ZodString;
|
|
1802
|
+
id: z.ZodString;
|
|
1803
|
+
}, z.core.$strict>>;
|
|
1804
|
+
}, z.core.$strip>;
|
|
1805
|
+
type BaseObservation = z.infer<typeof BaseObservationSchema>;
|
|
1806
|
+
type SuiteObservation = z.infer<typeof SuiteObservationSchema>;
|
|
1807
|
+
|
|
1808
|
+
interface MemoryObservationSnippet {
|
|
1809
|
+
id: string;
|
|
1810
|
+
title: string;
|
|
1811
|
+
content: string;
|
|
1812
|
+
trust: number;
|
|
1813
|
+
}
|
|
1814
|
+
interface MemoryQueryResult {
|
|
1815
|
+
observations: MemoryObservationSnippet[];
|
|
1816
|
+
formatted: string;
|
|
1817
|
+
}
|
|
1818
|
+
interface MemoryProvider {
|
|
1819
|
+
init(params: MemoryIndexParams): Promise<void>;
|
|
1820
|
+
queryForStep(stepText: string, stepIndex: number): MemoryQueryResult | null;
|
|
1821
|
+
destroy(): void;
|
|
1822
|
+
acquireLock(): Promise<void>;
|
|
1823
|
+
releaseLock(): Promise<void>;
|
|
1824
|
+
writeObservation(tier: 'products' | 'suites' | 'tests', scope: string, data: BaseObservation | SuiteObservation): Promise<string>;
|
|
1825
|
+
deleteObservation(tier: 'products' | 'suites' | 'tests', scope: string, id: string): Promise<void>;
|
|
1826
|
+
searchForDuplicates(content: string): MemoryObservationSnippet[];
|
|
1827
|
+
getAllObservations(): MemoryObservationSnippet[];
|
|
1828
|
+
getInjectedObservations(stepIndex: number): string[];
|
|
1829
|
+
getRunAnalytics(): unknown;
|
|
1830
|
+
}
|
|
1831
|
+
|
|
1832
|
+
interface CircuitBreakerConfig {
|
|
1833
|
+
windowSize: number;
|
|
1834
|
+
baselineSize: number;
|
|
1835
|
+
threshold: number;
|
|
1836
|
+
}
|
|
1837
|
+
declare class CircuitBreaker {
|
|
1838
|
+
private config;
|
|
1839
|
+
private window;
|
|
1840
|
+
private _tripped;
|
|
1841
|
+
constructor(config?: Partial<CircuitBreakerConfig>);
|
|
1842
|
+
record(outcome: {
|
|
1843
|
+
withMemory: boolean;
|
|
1844
|
+
passed: boolean;
|
|
1845
|
+
}): void;
|
|
1846
|
+
isTripped(): boolean;
|
|
1847
|
+
private evaluate;
|
|
1848
|
+
}
|
|
1849
|
+
|
|
1850
|
+
type RunAttributes = Record<string, string>;
|
|
1851
|
+
declare const INTERNAL_ATTRIBUTE_PREFIX = "agent-qa.";
|
|
1852
|
+
declare const ATTR_TRIGGER = "agent-qa.trigger";
|
|
1853
|
+
declare const ATTR_RUNNER = "agent-qa.runner";
|
|
1854
|
+
type RunAttributeTrigger = 'cli' | 'dashboard' | 'api' | 'mcp';
|
|
1855
|
+
type RunAttributeRunner = 'local' | 'browserstack';
|
|
1856
|
+
declare const RUN_ATTRIBUTE_KEY_MAX_LENGTH = 256;
|
|
1857
|
+
declare const RUN_ATTRIBUTE_VALUE_MAX_LENGTH = 4096;
|
|
1858
|
+
interface ParsedRunAttrFlags {
|
|
1859
|
+
attributes: RunAttributes;
|
|
1860
|
+
duplicateKeys: string[];
|
|
1861
|
+
}
|
|
1862
|
+
declare function validateUserRunAttributes(input: unknown, sourceLabel?: string): RunAttributes;
|
|
1863
|
+
declare function validateTrustedRunAttributes(input: unknown, sourceLabel?: string): RunAttributes;
|
|
1864
|
+
declare function parseRunAttrFlags(flags: string[] | undefined): ParsedRunAttrFlags;
|
|
1865
|
+
declare function buildInternalRunAttributes(input: {
|
|
1866
|
+
trigger: RunAttributeTrigger;
|
|
1867
|
+
runner: RunAttributeRunner;
|
|
1868
|
+
}): RunAttributes;
|
|
1869
|
+
declare function mergeRunAttributes(internal: RunAttributes, user: RunAttributes): RunAttributes;
|
|
1870
|
+
declare function sortRunAttributesForDisplay(attributes: RunAttributes, activeKeys?: string[]): Array<[string, string]>;
|
|
1871
|
+
declare function formatRunAttributesBlock(attributes: RunAttributes): string;
|
|
1872
|
+
|
|
1873
|
+
declare const RUN_ARTIFACT_SCHEMA_VERSION: 1;
|
|
1874
|
+
type RunArtifactKind = 'test' | 'suite-parent' | 'suite-child' | 'unknown';
|
|
1875
|
+
type JsonPrimitive = string | number | boolean | null;
|
|
1876
|
+
type JsonValue = JsonPrimitive | JsonObject | JsonArray;
|
|
1877
|
+
interface JsonObject {
|
|
1878
|
+
[key: string]: JsonValue;
|
|
1879
|
+
}
|
|
1880
|
+
type JsonArray = JsonValue[];
|
|
1881
|
+
type ArtifactRecord = Record<string, unknown>;
|
|
1882
|
+
interface RunArtifactMetadata extends ArtifactRecord {
|
|
1883
|
+
attributes?: RunAttributes;
|
|
1884
|
+
}
|
|
1885
|
+
interface RunArtifactTerminalError {
|
|
1886
|
+
code: string;
|
|
1887
|
+
message: string;
|
|
1888
|
+
phase: string;
|
|
1889
|
+
details?: unknown;
|
|
1890
|
+
}
|
|
1891
|
+
interface RunArtifactConfigSnapshot {
|
|
1892
|
+
rawConfigContent?: string | null;
|
|
1893
|
+
parsedConfig?: unknown;
|
|
1894
|
+
effectiveConfig?: unknown;
|
|
1895
|
+
envFile?: {
|
|
1896
|
+
path: string | null;
|
|
1897
|
+
content: string | null;
|
|
1898
|
+
variables: Record<string, string>;
|
|
1899
|
+
};
|
|
1900
|
+
secretsFile?: {
|
|
1901
|
+
path: string | null;
|
|
1902
|
+
status: 'loaded' | 'missing' | 'unreadable' | 'invalid';
|
|
1903
|
+
count?: number;
|
|
1904
|
+
} | null;
|
|
1905
|
+
cliVars?: Record<string, string>;
|
|
1906
|
+
inlineVars?: Record<string, string>;
|
|
1907
|
+
hooks?: Array<{
|
|
1908
|
+
id: string;
|
|
1909
|
+
name: string;
|
|
1910
|
+
runtime?: string;
|
|
1911
|
+
sourcePath?: string;
|
|
1912
|
+
}>;
|
|
1913
|
+
model?: {
|
|
1914
|
+
planner?: {
|
|
1915
|
+
provider?: string;
|
|
1916
|
+
model?: string;
|
|
1917
|
+
};
|
|
1918
|
+
verifier?: {
|
|
1919
|
+
provider?: string;
|
|
1920
|
+
model?: string;
|
|
1921
|
+
};
|
|
1922
|
+
};
|
|
1923
|
+
runtime?: ArtifactRecord;
|
|
1924
|
+
timeouts?: ArtifactRecord;
|
|
1925
|
+
cache?: ArtifactRecord;
|
|
1926
|
+
memory?: ArtifactRecord;
|
|
1927
|
+
}
|
|
1928
|
+
interface RunArtifactTestSourceSnapshot {
|
|
1929
|
+
kind: 'test';
|
|
1930
|
+
testId?: string | null;
|
|
1931
|
+
name?: string | null;
|
|
1932
|
+
filePath?: string | null;
|
|
1933
|
+
rawYaml?: string | null;
|
|
1934
|
+
resolvedDefinition?: unknown;
|
|
1935
|
+
loadStatus?: 'queued' | 'loaded' | 'parse-error' | 'setup-error' | 'runtime-error' | 'missing' | 'validation-error' | 'skipped';
|
|
1936
|
+
error?: RunArtifactTerminalError;
|
|
1937
|
+
}
|
|
1938
|
+
interface RunArtifactSuiteMemberSnapshot {
|
|
1939
|
+
index: number;
|
|
1940
|
+
ref: {
|
|
1941
|
+
test: string;
|
|
1942
|
+
id?: string;
|
|
1943
|
+
};
|
|
1944
|
+
filePath?: string | null;
|
|
1945
|
+
testId?: string | null;
|
|
1946
|
+
name?: string | null;
|
|
1947
|
+
target?: string | null;
|
|
1948
|
+
rawYaml?: string | null;
|
|
1949
|
+
resolvedDefinition?: unknown | null;
|
|
1950
|
+
loadStatus: 'loaded' | 'missing' | 'parse-error' | 'validation-error' | 'skipped';
|
|
1951
|
+
error?: RunArtifactTerminalError;
|
|
1952
|
+
childRunId?: string;
|
|
1953
|
+
skipReason?: string;
|
|
1954
|
+
}
|
|
1955
|
+
interface RunArtifactSuiteSourceSnapshot {
|
|
1956
|
+
kind: 'suite';
|
|
1957
|
+
suiteId?: string | null;
|
|
1958
|
+
name?: string | null;
|
|
1959
|
+
filePath?: string | null;
|
|
1960
|
+
rawYaml?: string | null;
|
|
1961
|
+
resolvedDefinition?: unknown;
|
|
1962
|
+
loadStatus?: 'queued' | 'loaded' | 'parse-error' | 'setup-error' | 'runtime-error' | 'missing' | 'validation-error' | 'skipped';
|
|
1963
|
+
members?: RunArtifactSuiteMemberSnapshot[];
|
|
1964
|
+
error?: RunArtifactTerminalError;
|
|
1965
|
+
}
|
|
1966
|
+
interface RunArtifactRuntimeSnapshot extends ArtifactRecord {
|
|
1967
|
+
status?: string;
|
|
1968
|
+
duration?: number;
|
|
1969
|
+
startedAt?: string;
|
|
1970
|
+
endedAt?: string;
|
|
1971
|
+
videoPath?: string | null;
|
|
1972
|
+
failureSummary?: string | null;
|
|
1973
|
+
}
|
|
1974
|
+
type RunArtifactMemoryDeltaAction = 'add' | 'confirm' | 'deprecate' | 'delete';
|
|
1975
|
+
interface RunArtifactMemoryObservationSnapshot {
|
|
1976
|
+
id: string;
|
|
1977
|
+
title: string;
|
|
1978
|
+
content: string;
|
|
1979
|
+
trust: number;
|
|
1980
|
+
created: string;
|
|
1981
|
+
last_confirmed: string;
|
|
1982
|
+
confirmed_count: number;
|
|
1983
|
+
contradicted_count: number;
|
|
1984
|
+
source_test: string;
|
|
1985
|
+
position?: number;
|
|
1986
|
+
suite_snapshot?: Array<{
|
|
1987
|
+
test: string;
|
|
1988
|
+
id: string;
|
|
1989
|
+
}>;
|
|
1990
|
+
}
|
|
1991
|
+
interface RunArtifactMemoryDelta {
|
|
1992
|
+
action: RunArtifactMemoryDeltaAction;
|
|
1993
|
+
tier: 'products' | 'suites' | 'tests';
|
|
1994
|
+
scope: string;
|
|
1995
|
+
observationId: string;
|
|
1996
|
+
reasoning: string;
|
|
1997
|
+
before: RunArtifactMemoryObservationSnapshot | null;
|
|
1998
|
+
after: RunArtifactMemoryObservationSnapshot | null;
|
|
1999
|
+
error?: string;
|
|
2000
|
+
}
|
|
2001
|
+
interface RunArtifactMemorySnapshot {
|
|
2002
|
+
log?: {
|
|
2003
|
+
added: number;
|
|
2004
|
+
confirmed: number;
|
|
2005
|
+
deprecated: number;
|
|
2006
|
+
deleted?: number;
|
|
2007
|
+
deltas?: RunArtifactMemoryDelta[];
|
|
2008
|
+
errors: string[];
|
|
2009
|
+
curatorDuration: number;
|
|
2010
|
+
tokenUsage?: {
|
|
2011
|
+
promptTokens: number;
|
|
2012
|
+
completionTokens: number;
|
|
2013
|
+
totalTokens: number;
|
|
2014
|
+
};
|
|
2015
|
+
};
|
|
2016
|
+
aggregate?: ArtifactRecord;
|
|
2017
|
+
}
|
|
2018
|
+
interface RunArtifactPayload {
|
|
2019
|
+
schemaVersion: typeof RUN_ARTIFACT_SCHEMA_VERSION;
|
|
2020
|
+
config?: RunArtifactConfigSnapshot | ArtifactRecord;
|
|
2021
|
+
source?: RunArtifactTestSourceSnapshot | RunArtifactSuiteSourceSnapshot | ArtifactRecord;
|
|
2022
|
+
runtime?: RunArtifactRuntimeSnapshot;
|
|
2023
|
+
memory?: RunArtifactMemorySnapshot | ArtifactRecord;
|
|
2024
|
+
errors?: RunArtifactTerminalError[];
|
|
2025
|
+
metadata?: RunArtifactMetadata;
|
|
2026
|
+
}
|
|
2027
|
+
interface RunArtifactStageInput extends Partial<Omit<RunArtifactPayload, 'schemaVersion'>> {
|
|
2028
|
+
schemaVersion?: typeof RUN_ARTIFACT_SCHEMA_VERSION;
|
|
2029
|
+
}
|
|
2030
|
+
interface RunArtifactFinalizeInput extends RunArtifactStageInput {
|
|
2031
|
+
finalizedAt?: string;
|
|
2032
|
+
}
|
|
2033
|
+
interface RunArtifactReporterContext {
|
|
2034
|
+
runId?: string;
|
|
2035
|
+
parentRunId?: string | null;
|
|
2036
|
+
artifact?: RunArtifactStageInput & {
|
|
2037
|
+
kind?: RunArtifactKind;
|
|
2038
|
+
suiteIndex?: number;
|
|
2039
|
+
parentRunId?: string | null;
|
|
2040
|
+
};
|
|
2041
|
+
}
|
|
2042
|
+
|
|
2043
|
+
interface RunSummary {
|
|
2044
|
+
results: TestResult[];
|
|
2045
|
+
duration: number;
|
|
2046
|
+
passed: number;
|
|
2047
|
+
failed: number;
|
|
2048
|
+
skipped: number;
|
|
2049
|
+
}
|
|
2050
|
+
interface SuiteSummary {
|
|
2051
|
+
runId?: string;
|
|
2052
|
+
name: string;
|
|
2053
|
+
status: 'passed' | 'failed' | 'cancelled';
|
|
2054
|
+
tests: TestResult[];
|
|
2055
|
+
duration: number;
|
|
2056
|
+
passed: number;
|
|
2057
|
+
failed: number;
|
|
2058
|
+
skipped: number;
|
|
2059
|
+
}
|
|
2060
|
+
interface HookEvent {
|
|
2061
|
+
hookId?: string;
|
|
2062
|
+
hookName: string;
|
|
2063
|
+
phase: 'setup' | 'teardown' | 'inline';
|
|
2064
|
+
hookExecutionId: string;
|
|
2065
|
+
runId?: string;
|
|
2066
|
+
stepId?: string;
|
|
2067
|
+
}
|
|
2068
|
+
interface StepEventContext {
|
|
2069
|
+
runId?: string;
|
|
2070
|
+
parentRunId?: string | null;
|
|
2071
|
+
suiteIndex?: number;
|
|
2072
|
+
testIndex?: number;
|
|
2073
|
+
stepIndex?: number;
|
|
2074
|
+
stepId?: string;
|
|
2075
|
+
}
|
|
2076
|
+
interface HookResultEvent extends HookEvent {
|
|
2077
|
+
status: 'passed' | 'failed';
|
|
2078
|
+
duration: number;
|
|
2079
|
+
stdout: string;
|
|
2080
|
+
stderr: string;
|
|
2081
|
+
variables: Record<string, string>;
|
|
2082
|
+
error?: string;
|
|
2083
|
+
type?: 'hook' | 'appium-script' | 'runjs';
|
|
2084
|
+
}
|
|
2085
|
+
interface Reporter {
|
|
2086
|
+
onSuiteStart?(suite: SuiteDefinition, context?: RunArtifactReporterContext): void | Promise<void>;
|
|
2087
|
+
onSuiteEnd?(summary: SuiteSummary): void | Promise<void>;
|
|
2088
|
+
onRunStart?(tests: TestDefinition[]): void | Promise<void>;
|
|
2089
|
+
onTestStart?(test: TestDefinition, filePath: string, context?: RunArtifactReporterContext): void | Promise<void>;
|
|
2090
|
+
onStepStart?(step: string, testName: string, context?: StepEventContext): void | Promise<void>;
|
|
2091
|
+
onStepEnd?(result: StepResult, testName: string, context?: StepEventContext): void | Promise<void>;
|
|
2092
|
+
onTestEnd?(result: TestResult): void | Promise<void>;
|
|
2093
|
+
onRunEnd?(summary: RunSummary): void | Promise<void>;
|
|
2094
|
+
onStepPhase?(phase: StepPhaseEvent, stepName: string, testName: string, context?: StepEventContext): void | Promise<void>;
|
|
2095
|
+
onHookStart?(event: HookEvent): void | Promise<void>;
|
|
2096
|
+
onHookEnd?(event: HookResultEvent): void | Promise<void>;
|
|
2097
|
+
}
|
|
2098
|
+
type ReporterEvent = {
|
|
2099
|
+
type: 'suite-start';
|
|
2100
|
+
suite: SuiteDefinition;
|
|
2101
|
+
context?: RunArtifactReporterContext;
|
|
2102
|
+
} | {
|
|
2103
|
+
type: 'suite-end';
|
|
2104
|
+
summary: SuiteSummary;
|
|
2105
|
+
} | {
|
|
2106
|
+
type: 'run-start';
|
|
2107
|
+
tests: TestDefinition[];
|
|
2108
|
+
} | {
|
|
2109
|
+
type: 'test-start';
|
|
2110
|
+
test: TestDefinition;
|
|
2111
|
+
filePath: string;
|
|
2112
|
+
context?: RunArtifactReporterContext;
|
|
2113
|
+
} | {
|
|
2114
|
+
type: 'step-start';
|
|
2115
|
+
step: string;
|
|
2116
|
+
testName: string;
|
|
2117
|
+
context?: StepEventContext;
|
|
2118
|
+
} | {
|
|
2119
|
+
type: 'step-end';
|
|
2120
|
+
result: StepResult;
|
|
2121
|
+
testName: string;
|
|
2122
|
+
context?: StepEventContext;
|
|
2123
|
+
} | {
|
|
2124
|
+
type: 'test-end';
|
|
2125
|
+
result: TestResult;
|
|
2126
|
+
} | {
|
|
2127
|
+
type: 'run-end';
|
|
2128
|
+
summary: RunSummary;
|
|
2129
|
+
} | {
|
|
2130
|
+
type: 'step-phase';
|
|
2131
|
+
phase: StepPhaseEvent;
|
|
2132
|
+
stepName: string;
|
|
2133
|
+
testName: string;
|
|
2134
|
+
context?: StepEventContext;
|
|
2135
|
+
} | {
|
|
2136
|
+
type: 'hook-start';
|
|
2137
|
+
event: HookEvent;
|
|
2138
|
+
} | {
|
|
2139
|
+
type: 'hook-end';
|
|
2140
|
+
event: HookResultEvent;
|
|
2141
|
+
};
|
|
2142
|
+
declare class FatalReporterError extends Error {
|
|
2143
|
+
readonly fatal = true;
|
|
2144
|
+
constructor(message: string, options?: ErrorOptions);
|
|
2145
|
+
}
|
|
2146
|
+
declare class MultiReporter implements Reporter {
|
|
2147
|
+
private reporters;
|
|
2148
|
+
constructor(reporters: Reporter[]);
|
|
2149
|
+
private handleReporterError;
|
|
2150
|
+
onSuiteStart(suite: SuiteDefinition, context?: RunArtifactReporterContext): Promise<void>;
|
|
2151
|
+
onSuiteEnd(summary: SuiteSummary): Promise<void>;
|
|
2152
|
+
onRunStart(tests: TestDefinition[]): Promise<void>;
|
|
2153
|
+
onTestStart(test: TestDefinition, filePath: string, context?: RunArtifactReporterContext): Promise<void>;
|
|
2154
|
+
onStepStart(step: string, testName: string, context?: StepEventContext): Promise<void>;
|
|
2155
|
+
onStepEnd(result: StepResult, testName: string, context?: StepEventContext): Promise<void>;
|
|
2156
|
+
onTestEnd(result: TestResult): Promise<void>;
|
|
2157
|
+
onRunEnd(summary: RunSummary): Promise<void>;
|
|
2158
|
+
onStepPhase(phase: StepPhaseEvent, stepName: string, testName: string, context?: StepEventContext): Promise<void>;
|
|
2159
|
+
onHookStart(event: HookEvent): Promise<void>;
|
|
2160
|
+
onHookEnd(event: HookResultEvent): Promise<void>;
|
|
2161
|
+
}
|
|
2162
|
+
|
|
2163
|
+
type HookRuntime = 'node' | 'bun' | 'python' | 'bash';
|
|
2164
|
+
interface HookDefinition {
|
|
2165
|
+
id: string;
|
|
2166
|
+
name: string;
|
|
2167
|
+
runtime: HookRuntime;
|
|
2168
|
+
file: string;
|
|
2169
|
+
deps: string[];
|
|
2170
|
+
packageFile?: string;
|
|
2171
|
+
timeout: number;
|
|
2172
|
+
network: boolean;
|
|
2173
|
+
}
|
|
2174
|
+
interface HookResult {
|
|
2175
|
+
success: boolean;
|
|
2176
|
+
variables: Record<string, string>;
|
|
2177
|
+
output: string;
|
|
2178
|
+
stdout: string;
|
|
2179
|
+
stderr: string;
|
|
2180
|
+
duration: number;
|
|
2181
|
+
error?: string;
|
|
2182
|
+
}
|
|
2183
|
+
declare const RUNTIME_IMAGE_MAP: Record<HookRuntime, string>;
|
|
2184
|
+
|
|
2185
|
+
interface SandboxRunnerOptions {
|
|
2186
|
+
dockerBin?: string;
|
|
2187
|
+
pullPolicy?: 'always' | 'if-not-present' | 'never';
|
|
2188
|
+
envVars?: Record<string, string>;
|
|
2189
|
+
secretStore?: SecretStore;
|
|
2190
|
+
secretRedactor?: SecretRedactor;
|
|
2191
|
+
}
|
|
2192
|
+
declare function checkDockerAvailable(dockerBin?: string): Promise<boolean>;
|
|
2193
|
+
declare function runHookInSandbox(hook: HookDefinition, options?: SandboxRunnerOptions): Promise<HookResult>;
|
|
2194
|
+
|
|
2195
|
+
interface RunTestConfig {
|
|
2196
|
+
runId?: string;
|
|
2197
|
+
parentRunId?: string | null;
|
|
2198
|
+
adapter: PlatformAdapter;
|
|
2199
|
+
planner: Planner;
|
|
2200
|
+
verifier?: Verifier;
|
|
2201
|
+
cache?: ActionCache;
|
|
2202
|
+
healingConfig: HealingConfig;
|
|
2203
|
+
plannerModel: LanguageModel;
|
|
2204
|
+
verifierModel: LanguageModel;
|
|
2205
|
+
reporters?: Reporter[];
|
|
2206
|
+
captureScreenshots?: boolean;
|
|
2207
|
+
screenshotMode?: 'failure' | 'every-step';
|
|
2208
|
+
timeouts?: {
|
|
2209
|
+
step?: number;
|
|
2210
|
+
test?: number;
|
|
2211
|
+
navigation?: number;
|
|
2212
|
+
};
|
|
2213
|
+
recording?: {
|
|
2214
|
+
enabled: boolean;
|
|
2215
|
+
videoDir: string;
|
|
2216
|
+
videoSize?: {
|
|
2217
|
+
width: number;
|
|
2218
|
+
height: number;
|
|
2219
|
+
};
|
|
2220
|
+
};
|
|
2221
|
+
accessibility?: {
|
|
2222
|
+
enabled: boolean;
|
|
2223
|
+
standard?: 'wcag2a' | 'wcag2aa' | 'wcag2aaa';
|
|
2224
|
+
runAfter?: 'every-step' | 'navigation' | 'test-end';
|
|
2225
|
+
failOnViolation?: boolean;
|
|
2226
|
+
disableRules?: string[];
|
|
2227
|
+
exclude?: string[];
|
|
2228
|
+
};
|
|
2229
|
+
plannerConfig?: PlannerConfig;
|
|
2230
|
+
logger?: LogManager;
|
|
2231
|
+
configContent?: string;
|
|
2232
|
+
testFileContent?: string;
|
|
2233
|
+
envFileVars?: Record<string, string>;
|
|
2234
|
+
inlineVars?: Record<string, string>;
|
|
2235
|
+
suiteVars?: Record<string, string>;
|
|
2236
|
+
cliVars?: Record<string, string>;
|
|
2237
|
+
hookSetupVars?: Record<string, string>;
|
|
2238
|
+
inlineHookDefs?: Map<string, HookDefinition>;
|
|
2239
|
+
inlineHookSandboxOptions?: SandboxRunnerOptions;
|
|
2240
|
+
suiteFileContent?: string;
|
|
2241
|
+
suiteTestIndex?: number;
|
|
2242
|
+
suiteContext?: string;
|
|
2243
|
+
logCapture?: {
|
|
2244
|
+
console?: boolean;
|
|
2245
|
+
network?: boolean;
|
|
2246
|
+
};
|
|
2247
|
+
screenshotSize?: number;
|
|
2248
|
+
effectiveResolution?: number;
|
|
2249
|
+
contextWindow?: number;
|
|
2250
|
+
memoryProvider?: MemoryProvider;
|
|
2251
|
+
memoryInitParams?: MemoryIndexParams;
|
|
2252
|
+
circuitBreaker?: CircuitBreaker;
|
|
2253
|
+
skipReporterOnTestStart?: boolean;
|
|
2254
|
+
secretStore?: SecretStore;
|
|
2255
|
+
secretRedactor?: SecretRedactor;
|
|
2256
|
+
secretsFileMetadata?: {
|
|
2257
|
+
path: string | null;
|
|
2258
|
+
status: string;
|
|
2259
|
+
count?: number;
|
|
2260
|
+
} | null;
|
|
2261
|
+
}
|
|
2262
|
+
declare function runTest(test: TestDefinition, config: RunTestConfig, filePath: string, failureContext?: string): Promise<TestResult>;
|
|
2263
|
+
declare function runTestWithRetry(test: TestDefinition, config: RunTestConfig, filePath: string): Promise<TestResult>;
|
|
2264
|
+
|
|
2265
|
+
interface InlineHookCall {
|
|
2266
|
+
hookId: string;
|
|
2267
|
+
fullMatch: string;
|
|
2268
|
+
}
|
|
2269
|
+
declare function parseHookInline(text: string): InlineHookCall[];
|
|
2270
|
+
declare function stripHookInline(text: string): string;
|
|
2271
|
+
|
|
2272
|
+
declare function generateFailureSummary(steps: StepResult[]): string;
|
|
2273
|
+
|
|
2274
|
+
declare const ExtractionResultSchema: z.ZodObject<{
|
|
2275
|
+
value: z.ZodString;
|
|
2276
|
+
reasoning: z.ZodString;
|
|
2277
|
+
}, z.core.$strip>;
|
|
2278
|
+
type VariableSource = 'env' | 'inline' | 'suite' | 'cli' | 'capture' | 'hook' | 'step';
|
|
2279
|
+
declare class VariableStore {
|
|
2280
|
+
private storage;
|
|
2281
|
+
set(name: string, value: string, source?: VariableSource): void;
|
|
2282
|
+
get(name: string): string | undefined;
|
|
2283
|
+
has(name: string): boolean;
|
|
2284
|
+
getSource(name: string): VariableSource | undefined;
|
|
2285
|
+
getAll(): Map<string, string>;
|
|
2286
|
+
setAll(vars: Record<string, string>, source?: VariableSource): void;
|
|
2287
|
+
snapshot(): Record<string, {
|
|
2288
|
+
value: string;
|
|
2289
|
+
source: VariableSource;
|
|
2290
|
+
}>;
|
|
2291
|
+
}
|
|
2292
|
+
declare function parseEnvFile(content: string): Record<string, string>;
|
|
2293
|
+
declare function serializeEnvFile(vars: Record<string, string>): string;
|
|
2294
|
+
declare function interpolateVariables(template: string, store: VariableStore): string;
|
|
2295
|
+
interface UnresolvedTemplate {
|
|
2296
|
+
pattern: string;
|
|
2297
|
+
message: string;
|
|
2298
|
+
}
|
|
2299
|
+
declare function findUnresolvedTemplates(text: string): UnresolvedTemplate[];
|
|
2300
|
+
declare function findBareVariables(text: string): string[];
|
|
2301
|
+
declare class ExplicitExtractor implements VariableExtractor {
|
|
2302
|
+
extract(input: ExtractorInput, screenState: ScreenState): Promise<CaptureResult>;
|
|
2303
|
+
private extractByRegex;
|
|
2304
|
+
private extractBySelector;
|
|
2305
|
+
}
|
|
2306
|
+
declare class LLMVariableExtractor implements VariableExtractor {
|
|
2307
|
+
private model;
|
|
2308
|
+
constructor(model: LanguageModel);
|
|
2309
|
+
extract(input: ExtractorInput, screenState: ScreenState): Promise<CaptureResult>;
|
|
2310
|
+
}
|
|
2311
|
+
declare function createExtractor(model?: LanguageModel, method?: string): VariableExtractor;
|
|
2312
|
+
|
|
2313
|
+
declare class FileActionCache implements ActionCache {
|
|
2314
|
+
private dir;
|
|
2315
|
+
private ttlMs;
|
|
2316
|
+
private logger?;
|
|
2317
|
+
constructor(config: {
|
|
2318
|
+
dir: string;
|
|
2319
|
+
ttl: number | string;
|
|
2320
|
+
logger?: ScopedLogger;
|
|
2321
|
+
});
|
|
2322
|
+
get(stepHash: string, screenHash: string): Promise<ActionPlan | null>;
|
|
2323
|
+
set(stepHash: string, screenHash: string, plan: ActionPlan, metadata?: {
|
|
2324
|
+
model: string;
|
|
2325
|
+
provider: string;
|
|
2326
|
+
stepInstruction: string;
|
|
2327
|
+
}): Promise<void>;
|
|
2328
|
+
invalidate(stepHash: string, screenHash: string): Promise<void>;
|
|
2329
|
+
getSubAction(stepHash: string, index: number): Promise<ActionPlan | null>;
|
|
2330
|
+
setSubAction(stepHash: string, index: number, plan: ActionPlan): Promise<void>;
|
|
2331
|
+
invalidateSubActionsFrom(stepHash: string, fromIndex: number): Promise<void>;
|
|
2332
|
+
private buildPath;
|
|
2333
|
+
}
|
|
2334
|
+
declare function parseTTL(ttl: string): number;
|
|
2335
|
+
|
|
2336
|
+
declare class NullActionCache implements ActionCache {
|
|
2337
|
+
get(_stepHash: string, _screenHash: string): Promise<ActionPlan | null>;
|
|
2338
|
+
set(_stepHash: string, _screenHash: string, _plan: ActionPlan): Promise<void>;
|
|
2339
|
+
invalidate(_stepHash: string, _screenHash: string): Promise<void>;
|
|
2340
|
+
getSubAction(_stepHash: string, _index: number): Promise<ActionPlan | null>;
|
|
2341
|
+
setSubAction(_stepHash: string, _index: number, _plan: ActionPlan): Promise<void>;
|
|
2342
|
+
invalidateSubActionsFrom(_stepHash: string, _fromIndex: number): Promise<void>;
|
|
2343
|
+
}
|
|
2344
|
+
|
|
2345
|
+
declare const CACHE_SCHEMA_VERSION = 9;
|
|
2346
|
+
interface CacheEntry {
|
|
2347
|
+
schemaVersion?: number;
|
|
2348
|
+
stepInstruction: string;
|
|
2349
|
+
stepHash: string;
|
|
2350
|
+
screenHash: string;
|
|
2351
|
+
plan: ActionPlan;
|
|
2352
|
+
createdAt: string;
|
|
2353
|
+
model: string;
|
|
2354
|
+
provider: string;
|
|
2355
|
+
}
|
|
2356
|
+
|
|
2357
|
+
interface ConsoleReporterOptions {
|
|
2358
|
+
verbose?: boolean;
|
|
2359
|
+
colorize?: boolean;
|
|
2360
|
+
logLevel?: string;
|
|
2361
|
+
plain?: boolean;
|
|
2362
|
+
}
|
|
2363
|
+
declare class ConsoleReporter implements Reporter {
|
|
2364
|
+
private verbose;
|
|
2365
|
+
private colorize;
|
|
2366
|
+
private plain;
|
|
2367
|
+
private inSuite;
|
|
2368
|
+
private hookPhaseStarted;
|
|
2369
|
+
private lastHookPhase;
|
|
2370
|
+
private canOverwrite;
|
|
2371
|
+
private stepsPassed;
|
|
2372
|
+
private stepsFailed;
|
|
2373
|
+
private stepsSkipped;
|
|
2374
|
+
private cacheHits;
|
|
2375
|
+
private cacheMisses;
|
|
2376
|
+
private lastWriteLen;
|
|
2377
|
+
constructor(options?: ConsoleReporterOptions);
|
|
2378
|
+
private c;
|
|
2379
|
+
private stripAnsi;
|
|
2380
|
+
private clearWrappedLines;
|
|
2381
|
+
private writeLine;
|
|
2382
|
+
private printLine;
|
|
2383
|
+
private testBadge;
|
|
2384
|
+
private resetCounters;
|
|
2385
|
+
private formatStepsLine;
|
|
2386
|
+
private formatCacheLine;
|
|
2387
|
+
onSuiteStart(suite: SuiteDefinition): void;
|
|
2388
|
+
onRunStart(tests: TestDefinition[]): void;
|
|
2389
|
+
onTestStart(test: TestDefinition, filePath: string): void;
|
|
2390
|
+
onStepStart(step: string, _testName: string): void;
|
|
2391
|
+
onStepEnd(result: StepResult, _testName: string): void;
|
|
2392
|
+
onHookStart(event: HookEvent): void;
|
|
2393
|
+
onHookEnd(event: HookResultEvent): void;
|
|
2394
|
+
onTestEnd(result: TestResult): void;
|
|
2395
|
+
onRunEnd(summary: RunSummary): void;
|
|
2396
|
+
onSuiteEnd(summary: SuiteSummary): void;
|
|
2397
|
+
private printStandaloneSummary;
|
|
2398
|
+
private printFailedTests;
|
|
2399
|
+
private statusIcon;
|
|
2400
|
+
}
|
|
2401
|
+
|
|
2402
|
+
interface JUnitReporterOptions {
|
|
2403
|
+
outputPath: string;
|
|
2404
|
+
}
|
|
2405
|
+
declare class JUnitReporter implements Reporter {
|
|
2406
|
+
private outputPath;
|
|
2407
|
+
private results;
|
|
2408
|
+
private inSuiteRun;
|
|
2409
|
+
constructor(options: JUnitReporterOptions);
|
|
2410
|
+
onSuiteStart(_suite: SuiteDefinition): void;
|
|
2411
|
+
onTestEnd(result: TestResult): void;
|
|
2412
|
+
onRunEnd(summary: RunSummary): Promise<void>;
|
|
2413
|
+
onSuiteEnd(summary: SuiteSummary): Promise<void>;
|
|
2414
|
+
private writeXml;
|
|
2415
|
+
private buildXml;
|
|
2416
|
+
private buildSuiteXml;
|
|
2417
|
+
private buildTestCase;
|
|
2418
|
+
private getFailureMessage;
|
|
2419
|
+
private buildFailureDetails;
|
|
2420
|
+
private buildStepSummary;
|
|
2421
|
+
}
|
|
2422
|
+
|
|
2423
|
+
declare function captureFailureScreenshot(adapter: PlatformAdapter): Promise<Buffer | undefined>;
|
|
2424
|
+
|
|
2425
|
+
interface StdoutLiveReporterOptions {
|
|
2426
|
+
active?: boolean;
|
|
2427
|
+
redactor?: SecretRedactor;
|
|
2428
|
+
}
|
|
2429
|
+
declare class StdoutLiveReporter implements Reporter {
|
|
2430
|
+
private active;
|
|
2431
|
+
private heartbeatInterval;
|
|
2432
|
+
private activeRunId;
|
|
2433
|
+
private activeParentRunId;
|
|
2434
|
+
private activeSuiteIndex;
|
|
2435
|
+
private redactor?;
|
|
2436
|
+
constructor(options?: StdoutLiveReporterOptions);
|
|
2437
|
+
private emit;
|
|
2438
|
+
private withRunId;
|
|
2439
|
+
private withRunContext;
|
|
2440
|
+
onTestStart(test: TestDefinition, filePath: string, context?: RunArtifactReporterContext): void;
|
|
2441
|
+
onStepStart(step: string, testName: string, context?: StepEventContext): void;
|
|
2442
|
+
onStepEnd(result: StepResult, testName: string, context?: StepEventContext): void;
|
|
2443
|
+
onStepPhase(phase: StepPhaseEvent, stepName: string, testName: string, context?: StepEventContext): void;
|
|
2444
|
+
onHookStart(event: HookEvent): void;
|
|
2445
|
+
onHookEnd(event: HookResultEvent): void;
|
|
2446
|
+
onTestEnd(result: TestResult): void;
|
|
2447
|
+
}
|
|
2448
|
+
|
|
2449
|
+
interface MobileNode {
|
|
2450
|
+
index: number;
|
|
2451
|
+
type: string;
|
|
2452
|
+
label?: string;
|
|
2453
|
+
value?: string;
|
|
2454
|
+
bounds?: {
|
|
2455
|
+
x: number;
|
|
2456
|
+
y: number;
|
|
2457
|
+
width: number;
|
|
2458
|
+
height: number;
|
|
2459
|
+
};
|
|
2460
|
+
enabled?: boolean;
|
|
2461
|
+
children: MobileNode[];
|
|
2462
|
+
}
|
|
2463
|
+
type MobileRefMap = Record<string, {
|
|
2464
|
+
role: string;
|
|
2465
|
+
name?: string;
|
|
2466
|
+
nth?: number;
|
|
2467
|
+
bounds?: {
|
|
2468
|
+
x: number;
|
|
2469
|
+
y: number;
|
|
2470
|
+
width: number;
|
|
2471
|
+
height: number;
|
|
2472
|
+
};
|
|
2473
|
+
nativeType?: string;
|
|
2474
|
+
value?: string;
|
|
2475
|
+
}>;
|
|
2476
|
+
interface ParsedMobileTree {
|
|
2477
|
+
tree: string;
|
|
2478
|
+
elements: ElementInfo[];
|
|
2479
|
+
refs: MobileRefMap;
|
|
2480
|
+
}
|
|
2481
|
+
|
|
2482
|
+
declare function parseMobileSource(xml: string, platform: 'android' | 'ios', viewport?: {
|
|
2483
|
+
width: number;
|
|
2484
|
+
height: number;
|
|
2485
|
+
}): ParsedMobileTree;
|
|
2486
|
+
|
|
2487
|
+
declare const ANDROID_ROLE_MAP: Record<string, string>;
|
|
2488
|
+
declare const IOS_ROLE_MAP: Record<string, string>;
|
|
2489
|
+
declare function normalizeRole(type: string, platform: 'android' | 'ios'): string;
|
|
2490
|
+
|
|
2491
|
+
declare class MobileElementResolver {
|
|
2492
|
+
private refs;
|
|
2493
|
+
constructor(refs: MobileRefMap);
|
|
2494
|
+
resolve(ref: string): {
|
|
2495
|
+
role: string;
|
|
2496
|
+
name?: string;
|
|
2497
|
+
bounds: {
|
|
2498
|
+
x: number;
|
|
2499
|
+
y: number;
|
|
2500
|
+
width: number;
|
|
2501
|
+
height: number;
|
|
2502
|
+
};
|
|
2503
|
+
center: {
|
|
2504
|
+
x: number;
|
|
2505
|
+
y: number;
|
|
2506
|
+
};
|
|
2507
|
+
};
|
|
2508
|
+
resolveAction(action: Action): {
|
|
2509
|
+
bounds: {
|
|
2510
|
+
x: number;
|
|
2511
|
+
y: number;
|
|
2512
|
+
width: number;
|
|
2513
|
+
height: number;
|
|
2514
|
+
};
|
|
2515
|
+
center: {
|
|
2516
|
+
x: number;
|
|
2517
|
+
y: number;
|
|
2518
|
+
};
|
|
2519
|
+
} | null;
|
|
2520
|
+
}
|
|
2521
|
+
|
|
2522
|
+
declare const KEY_MAP: Record<string, string>;
|
|
2523
|
+
declare function computePinch(centerX: number, centerY: number, scale: number, startDistance?: number): {
|
|
2524
|
+
finger1Start: {
|
|
2525
|
+
x: number;
|
|
2526
|
+
y: number;
|
|
2527
|
+
};
|
|
2528
|
+
finger1End: {
|
|
2529
|
+
x: number;
|
|
2530
|
+
y: number;
|
|
2531
|
+
};
|
|
2532
|
+
finger2Start: {
|
|
2533
|
+
x: number;
|
|
2534
|
+
y: number;
|
|
2535
|
+
};
|
|
2536
|
+
finger2End: {
|
|
2537
|
+
x: number;
|
|
2538
|
+
y: number;
|
|
2539
|
+
};
|
|
2540
|
+
};
|
|
2541
|
+
declare function computeFingerPositions(centerX: number, centerY: number, fingers: number, spacing?: number): {
|
|
2542
|
+
x: number;
|
|
2543
|
+
y: number;
|
|
2544
|
+
}[];
|
|
2545
|
+
declare function computeSwipe(centerX: number, centerY: number, direction: 'up' | 'down' | 'left' | 'right', distance: number): {
|
|
2546
|
+
startX: number;
|
|
2547
|
+
startY: number;
|
|
2548
|
+
endX: number;
|
|
2549
|
+
endY: number;
|
|
2550
|
+
};
|
|
2551
|
+
|
|
2552
|
+
type MobilePlatform = 'android' | 'ios';
|
|
2553
|
+
type MobileTransport = 'local' | 'browserstack';
|
|
2554
|
+
type MobileAppState = 'preserve' | 'reset';
|
|
2555
|
+
type MobileSetupErrorCategory = 'device-resolution' | 'appium-startup' | 'device-readiness' | 'adapter-load' | 'app-install' | 'app-launch';
|
|
2556
|
+
interface MobileSetupErrorOptions {
|
|
2557
|
+
category: MobileSetupErrorCategory;
|
|
2558
|
+
message: string;
|
|
2559
|
+
platform?: MobilePlatform;
|
|
2560
|
+
targetName?: string;
|
|
2561
|
+
deviceName?: string;
|
|
2562
|
+
appId?: string;
|
|
2563
|
+
cause?: unknown;
|
|
2564
|
+
sourceTrace?: string[];
|
|
2565
|
+
}
|
|
2566
|
+
declare class MobileSetupError extends Error {
|
|
2567
|
+
readonly category: MobileSetupErrorCategory;
|
|
2568
|
+
readonly platform?: MobilePlatform;
|
|
2569
|
+
readonly targetName?: string;
|
|
2570
|
+
readonly deviceName?: string;
|
|
2571
|
+
readonly appId?: string;
|
|
2572
|
+
readonly sourceTrace?: string[];
|
|
2573
|
+
readonly cause?: unknown;
|
|
2574
|
+
constructor(options: MobileSetupErrorOptions);
|
|
2575
|
+
}
|
|
2576
|
+
interface ResolvedMobileDevice {
|
|
2577
|
+
name: string;
|
|
2578
|
+
platform: MobilePlatform;
|
|
2579
|
+
transport: MobileTransport;
|
|
2580
|
+
match: Record<string, unknown>;
|
|
2581
|
+
}
|
|
2582
|
+
interface ResolvedMobileAppInstall {
|
|
2583
|
+
path?: string;
|
|
2584
|
+
browserstack?: string;
|
|
2585
|
+
browserstackBaseDir?: string;
|
|
2586
|
+
sourceTrace: Record<string, string>;
|
|
2587
|
+
}
|
|
2588
|
+
interface ResolvedMobileApp {
|
|
2589
|
+
bundleId?: string;
|
|
2590
|
+
appPackage?: string;
|
|
2591
|
+
appActivity?: string;
|
|
2592
|
+
deepLinkAppId?: string;
|
|
2593
|
+
install?: ResolvedMobileAppInstall;
|
|
2594
|
+
sourceTrace: Record<string, string>;
|
|
2595
|
+
}
|
|
2596
|
+
interface ResolvedMobileRunConfig {
|
|
2597
|
+
platform: MobilePlatform;
|
|
2598
|
+
targetName: string;
|
|
2599
|
+
deviceName: string;
|
|
2600
|
+
transport: MobileTransport;
|
|
2601
|
+
device: ResolvedMobileDevice;
|
|
2602
|
+
app: ResolvedMobileApp;
|
|
2603
|
+
appState: MobileAppState;
|
|
2604
|
+
appium: {
|
|
2605
|
+
url?: string;
|
|
2606
|
+
managed?: boolean;
|
|
2607
|
+
};
|
|
2608
|
+
sourceTrace: string[];
|
|
2609
|
+
}
|
|
2610
|
+
interface ResolveMobileRunConfigInput {
|
|
2611
|
+
config: Record<string, any>;
|
|
2612
|
+
targetName: string;
|
|
2613
|
+
platform?: MobilePlatform;
|
|
2614
|
+
explicitDeviceName?: string;
|
|
2615
|
+
useDeviceName?: string;
|
|
2616
|
+
appState?: MobileAppState;
|
|
2617
|
+
localBindings?: {
|
|
2618
|
+
devices?: Record<string, Record<string, unknown>>;
|
|
2619
|
+
apps?: Record<string, {
|
|
2620
|
+
path?: string;
|
|
2621
|
+
browserstack?: string;
|
|
2622
|
+
}>;
|
|
2623
|
+
filePath?: string;
|
|
2624
|
+
} | null;
|
|
2625
|
+
configFilePath?: string;
|
|
2626
|
+
localConfigFilePath?: string;
|
|
2627
|
+
appiumUrl?: string;
|
|
2628
|
+
}
|
|
2629
|
+
declare function resolveMobileRunConfig(input: ResolveMobileRunConfigInput): ResolvedMobileRunConfig;
|
|
2630
|
+
|
|
2631
|
+
type AuthProvider = string;
|
|
2632
|
+
type LLMModelAdapter = 'openai-responses' | 'anthropic-messages';
|
|
2633
|
+
type BuiltInLLMProviderMode = 'openai-compatible' | 'anthropic-compatible' | 'openai-subscription' | 'anthropic-subscription' | 'gemini';
|
|
2634
|
+
type LLMProviderMode = BuiltInLLMProviderMode | (string & {});
|
|
2635
|
+
interface OAuthTokens {
|
|
2636
|
+
access: string;
|
|
2637
|
+
refresh: string;
|
|
2638
|
+
expires: number;
|
|
2639
|
+
accountId?: string;
|
|
2640
|
+
}
|
|
2641
|
+
type AuthCredential = {
|
|
2642
|
+
type: 'oauth';
|
|
2643
|
+
provider: AuthProvider;
|
|
2644
|
+
tokens: OAuthTokens;
|
|
2645
|
+
} | {
|
|
2646
|
+
type: 'api';
|
|
2647
|
+
provider: string;
|
|
2648
|
+
key: string;
|
|
2649
|
+
} | {
|
|
2650
|
+
type: 'bearer';
|
|
2651
|
+
provider: string;
|
|
2652
|
+
token: string;
|
|
2653
|
+
};
|
|
2654
|
+
type AuthStore = Record<string, AuthCredential>;
|
|
2655
|
+
type ResolvedLLMAuth = {
|
|
2656
|
+
kind: 'api-key';
|
|
2657
|
+
credentialKey: string;
|
|
2658
|
+
provider: BuiltInLLMProviderMode;
|
|
2659
|
+
apiKey: string;
|
|
2660
|
+
} | {
|
|
2661
|
+
kind: 'bearer-token';
|
|
2662
|
+
credentialKey: string;
|
|
2663
|
+
provider: 'anthropic-compatible';
|
|
2664
|
+
token: string;
|
|
2665
|
+
} | {
|
|
2666
|
+
kind: 'auth-fetch';
|
|
2667
|
+
credentialKey: string;
|
|
2668
|
+
provider: string;
|
|
2669
|
+
modelAdapter: LLMModelAdapter;
|
|
2670
|
+
fetch: typeof globalThis.fetch;
|
|
2671
|
+
expires?: number;
|
|
2672
|
+
} | {
|
|
2673
|
+
kind: 'unauthenticated';
|
|
2674
|
+
credentialKey: string;
|
|
2675
|
+
provider: 'openai-compatible' | 'anthropic-compatible';
|
|
2676
|
+
optional: true;
|
|
2677
|
+
message: string;
|
|
2678
|
+
} | {
|
|
2679
|
+
kind: 'missing';
|
|
2680
|
+
credentialKey: string;
|
|
2681
|
+
provider: string;
|
|
2682
|
+
required: true;
|
|
2683
|
+
message: string;
|
|
2684
|
+
};
|
|
2685
|
+
type TokenRefreshFn = (provider: AuthProvider, refreshToken: string) => Promise<OAuthTokens>;
|
|
2686
|
+
|
|
2687
|
+
declare function getAuthPath(): string;
|
|
2688
|
+
declare function readAuth(path?: string): Promise<AuthStore>;
|
|
2689
|
+
declare function writeAuth(provider: string, credential: AuthCredential, path?: string): Promise<void>;
|
|
2690
|
+
declare function removeAuth(provider: string, path?: string): Promise<void>;
|
|
2691
|
+
declare function getCredential(provider: string, path?: string): Promise<AuthCredential | null>;
|
|
2692
|
+
|
|
2693
|
+
interface LLMAuthConfig {
|
|
2694
|
+
provider: LLMProviderMode | string;
|
|
2695
|
+
model: string;
|
|
2696
|
+
baseURL?: string;
|
|
2697
|
+
providerHeaders?: Record<string, string>;
|
|
2698
|
+
}
|
|
2699
|
+
declare function resolveLLMAuth(configName: string, llmConfig: LLMAuthConfig, authPath?: string): Promise<ResolvedLLMAuth>;
|
|
2700
|
+
|
|
2701
|
+
type DashboardAuthMode = 'browser-poll' | 'manual-code';
|
|
2702
|
+
interface DashboardAuthMetadata {
|
|
2703
|
+
mode: DashboardAuthMode;
|
|
2704
|
+
buttonLabel?: string;
|
|
2705
|
+
}
|
|
2706
|
+
interface StartAuthContext {
|
|
2707
|
+
configName: string;
|
|
2708
|
+
callbackUrl?: string;
|
|
2709
|
+
}
|
|
2710
|
+
interface StartAuthResult {
|
|
2711
|
+
authorizeUrl: string;
|
|
2712
|
+
sessionState?: unknown;
|
|
2713
|
+
waitForTokens?: Promise<OAuthTokens>;
|
|
2714
|
+
cleanup?: () => void;
|
|
2715
|
+
}
|
|
2716
|
+
interface ExchangeCodeContext {
|
|
2717
|
+
code: string;
|
|
2718
|
+
sessionState: unknown;
|
|
2719
|
+
}
|
|
2720
|
+
interface CreateAuthFetchContext {
|
|
2721
|
+
getTokens: () => Promise<OAuthTokens>;
|
|
2722
|
+
onRefreshed: (tokens: OAuthTokens) => Promise<void>;
|
|
2723
|
+
}
|
|
2724
|
+
interface LLMAuthProviderPlugin {
|
|
2725
|
+
providerId: string;
|
|
2726
|
+
credentialProviderId: string;
|
|
2727
|
+
label: string;
|
|
2728
|
+
modelAdapter: LLMModelAdapter;
|
|
2729
|
+
dashboardAuth: DashboardAuthMetadata;
|
|
2730
|
+
startAuth?: (ctx: StartAuthContext) => Promise<StartAuthResult>;
|
|
2731
|
+
exchangeCode?: (ctx: ExchangeCodeContext) => Promise<OAuthTokens>;
|
|
2732
|
+
createAuthFetch: (ctx: CreateAuthFetchContext) => typeof globalThis.fetch;
|
|
2733
|
+
}
|
|
2734
|
+
declare function registerLLMAuthProviderPlugin(plugin: LLMAuthProviderPlugin): void;
|
|
2735
|
+
declare function registerLLMAuthProviderPlugins(providerPlugins: LLMAuthProviderPlugin[]): void;
|
|
2736
|
+
declare function getLLMAuthProviderPlugin(providerId: string): LLMAuthProviderPlugin | undefined;
|
|
2737
|
+
declare function listLLMAuthProviderPlugins(): LLMAuthProviderPlugin[];
|
|
2738
|
+
declare function clearLLMAuthProviderPlugins(): void;
|
|
2739
|
+
|
|
2740
|
+
type AuthPluginDeclaration = {
|
|
2741
|
+
package: string;
|
|
2742
|
+
path?: never;
|
|
2743
|
+
} | {
|
|
2744
|
+
path: string;
|
|
2745
|
+
package?: never;
|
|
2746
|
+
};
|
|
2747
|
+
interface AuthPluginBundle {
|
|
2748
|
+
providers: LLMAuthProviderPlugin[];
|
|
2749
|
+
}
|
|
2750
|
+
interface LoadLLMAuthPluginsOptions {
|
|
2751
|
+
baseDir?: string;
|
|
2752
|
+
}
|
|
2753
|
+
declare function loadLLMAuthPlugins(declarations: AuthPluginDeclaration[] | undefined, options?: LoadLLMAuthPluginsOptions): Promise<LLMAuthProviderPlugin[]>;
|
|
2754
|
+
declare function clearLoadedLLMAuthPluginModules(): void;
|
|
2755
|
+
|
|
2756
|
+
declare function generatePKCE(): {
|
|
2757
|
+
verifier: string;
|
|
2758
|
+
challenge: string;
|
|
2759
|
+
};
|
|
2760
|
+
declare function generateState(): string;
|
|
2761
|
+
|
|
2762
|
+
interface CreateAuthFetchOptions {
|
|
2763
|
+
provider: AuthProvider;
|
|
2764
|
+
getTokens: () => Promise<OAuthTokens>;
|
|
2765
|
+
refreshTokens: TokenRefreshFn;
|
|
2766
|
+
onTokensRefreshed: (tokens: OAuthTokens) => Promise<void>;
|
|
2767
|
+
headerTransform?: (headers: Headers, tokens: OAuthTokens) => void;
|
|
2768
|
+
urlTransform?: (url: string) => string;
|
|
2769
|
+
}
|
|
2770
|
+
declare function createAuthFetch(options: CreateAuthFetchOptions): typeof globalThis.fetch;
|
|
2771
|
+
|
|
2772
|
+
declare function formatLogEntry(entry: LogEntry): string;
|
|
2773
|
+
|
|
2774
|
+
interface FarmProvider {
|
|
2775
|
+
readonly name: string;
|
|
2776
|
+
readonly slug: string;
|
|
2777
|
+
resolveWebEndpoint(config: FarmWebConfig): Promise<{
|
|
2778
|
+
wsEndpoint: string;
|
|
2779
|
+
capabilities: Record<string, unknown>;
|
|
2780
|
+
}>;
|
|
2781
|
+
resolveMobileCapabilities(config: FarmMobileConfig): Promise<{
|
|
2782
|
+
hostname: string;
|
|
2783
|
+
port: number;
|
|
2784
|
+
path: string;
|
|
2785
|
+
capabilities: Record<string, unknown>;
|
|
2786
|
+
}>;
|
|
2787
|
+
resolveCredentials(providerConfig?: FarmProviderConfig): {
|
|
2788
|
+
username: string;
|
|
2789
|
+
accessKey: string;
|
|
2790
|
+
};
|
|
2791
|
+
validateDevice(deviceName: string, platform: 'android' | 'ios'): Promise<{
|
|
2792
|
+
valid: boolean;
|
|
2793
|
+
suggestions?: string[];
|
|
2794
|
+
}>;
|
|
2795
|
+
getSessionUrl(sessionId: string, type: 'web' | 'mobile'): string;
|
|
2796
|
+
}
|
|
2797
|
+
interface FarmWebConfig {
|
|
2798
|
+
browser: BrowserConfig;
|
|
2799
|
+
credentials: {
|
|
2800
|
+
username: string;
|
|
2801
|
+
accessKey: string;
|
|
2802
|
+
};
|
|
2803
|
+
testName?: string;
|
|
2804
|
+
playwrightVersion?: string;
|
|
2805
|
+
}
|
|
2806
|
+
interface FarmMobileConfig {
|
|
2807
|
+
match: Record<string, unknown>;
|
|
2808
|
+
platform: 'android' | 'ios';
|
|
2809
|
+
credentials: {
|
|
2810
|
+
username: string;
|
|
2811
|
+
accessKey: string;
|
|
2812
|
+
};
|
|
2813
|
+
testName?: string;
|
|
2814
|
+
testTimeout?: number;
|
|
2815
|
+
app?: string;
|
|
2816
|
+
appState?: 'preserve' | 'reset';
|
|
2817
|
+
appBaseDir?: string;
|
|
2818
|
+
appSourceTrace?: string[];
|
|
2819
|
+
}
|
|
2820
|
+
interface FarmProviderConfig {
|
|
2821
|
+
username?: string;
|
|
2822
|
+
accessKey?: string;
|
|
2823
|
+
}
|
|
2824
|
+
|
|
2825
|
+
declare function registerProvider(provider: FarmProvider): void;
|
|
2826
|
+
declare function getProvider(slug: string): FarmProvider | undefined;
|
|
2827
|
+
declare function listProviders(): FarmProvider[];
|
|
2828
|
+
declare function registerAllProviders(): void;
|
|
2829
|
+
|
|
2830
|
+
declare function resolveFarmCredentials(provider: string, providerConfig?: FarmProviderConfig): {
|
|
2831
|
+
username: string;
|
|
2832
|
+
accessKey: string;
|
|
2833
|
+
};
|
|
2834
|
+
|
|
2835
|
+
declare function detectPlaywrightVersion(): string;
|
|
2836
|
+
declare function mapWebCapabilities(browser: BrowserConfig, credentials: {
|
|
2837
|
+
username: string;
|
|
2838
|
+
accessKey: string;
|
|
2839
|
+
}, opts?: {
|
|
2840
|
+
testName?: string;
|
|
2841
|
+
playwrightVersion?: string;
|
|
2842
|
+
}): Record<string, unknown>;
|
|
2843
|
+
declare function mapMobileCapabilities(match: Record<string, unknown>, platform: 'android' | 'ios', credentials: {
|
|
2844
|
+
username: string;
|
|
2845
|
+
accessKey: string;
|
|
2846
|
+
}, opts?: {
|
|
2847
|
+
testName?: string;
|
|
2848
|
+
testTimeout?: number;
|
|
2849
|
+
}): Record<string, unknown>;
|
|
2850
|
+
|
|
2851
|
+
declare const browserstackProvider: FarmProvider;
|
|
2852
|
+
|
|
2853
|
+
interface MemoryLog {
|
|
2854
|
+
added: number;
|
|
2855
|
+
confirmed: number;
|
|
2856
|
+
deprecated: number;
|
|
2857
|
+
deleted: number;
|
|
2858
|
+
deltas: MemoryDelta[];
|
|
2859
|
+
errors: string[];
|
|
2860
|
+
curatorDuration: number;
|
|
2861
|
+
tokenUsage?: {
|
|
2862
|
+
promptTokens: number;
|
|
2863
|
+
completionTokens: number;
|
|
2864
|
+
totalTokens: number;
|
|
2865
|
+
};
|
|
2866
|
+
}
|
|
2867
|
+
type MemoryDeltaAction = 'add' | 'confirm' | 'deprecate' | 'delete';
|
|
2868
|
+
interface MemoryObservationSnapshot {
|
|
2869
|
+
id: string;
|
|
2870
|
+
title: string;
|
|
2871
|
+
content: string;
|
|
2872
|
+
trust: number;
|
|
2873
|
+
created: string;
|
|
2874
|
+
last_confirmed: string;
|
|
2875
|
+
confirmed_count: number;
|
|
2876
|
+
contradicted_count: number;
|
|
2877
|
+
source_test: string;
|
|
2878
|
+
position?: number;
|
|
2879
|
+
suite_snapshot?: Array<{
|
|
2880
|
+
test: string;
|
|
2881
|
+
id: string;
|
|
2882
|
+
}>;
|
|
2883
|
+
}
|
|
2884
|
+
interface MemoryDelta {
|
|
2885
|
+
action: MemoryDeltaAction;
|
|
2886
|
+
tier: 'products' | 'suites' | 'tests';
|
|
2887
|
+
scope: string;
|
|
2888
|
+
observationId: string;
|
|
2889
|
+
reasoning: string;
|
|
2890
|
+
before: MemoryObservationSnapshot | null;
|
|
2891
|
+
after: MemoryObservationSnapshot | null;
|
|
2892
|
+
error?: string;
|
|
2893
|
+
}
|
|
2894
|
+
interface CuratorContext {
|
|
2895
|
+
testResult: TestResult;
|
|
2896
|
+
provider: MemoryProvider;
|
|
2897
|
+
model: LanguageModel;
|
|
2898
|
+
providerOptions?: ProviderOptions;
|
|
2899
|
+
memoryRoot: string;
|
|
2900
|
+
product: string;
|
|
2901
|
+
testId: string;
|
|
2902
|
+
suiteId?: string;
|
|
2903
|
+
suiteContext?: {
|
|
2904
|
+
tests: Array<{
|
|
2905
|
+
test: string;
|
|
2906
|
+
id: string;
|
|
2907
|
+
}>;
|
|
2908
|
+
position: number;
|
|
2909
|
+
};
|
|
2910
|
+
injectedObservationIds: Map<number, string[]>;
|
|
2911
|
+
trustConfirmDelta?: number;
|
|
2912
|
+
trustContradictDelta?: number;
|
|
2913
|
+
}
|
|
2914
|
+
declare const CuratorResponseSchema: z.ZodObject<{
|
|
2915
|
+
decisions: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
2916
|
+
action: z.ZodLiteral<"add">;
|
|
2917
|
+
title: z.ZodString;
|
|
2918
|
+
content: z.ZodString;
|
|
2919
|
+
scope: z.ZodEnum<{
|
|
2920
|
+
test: "test";
|
|
2921
|
+
product: "product";
|
|
2922
|
+
suite: "suite";
|
|
2923
|
+
}>;
|
|
2924
|
+
reasoning: z.ZodString;
|
|
2925
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
2926
|
+
action: z.ZodLiteral<"update">;
|
|
2927
|
+
observationId: z.ZodString;
|
|
2928
|
+
reasoning: z.ZodString;
|
|
2929
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
2930
|
+
action: z.ZodLiteral<"deprecate">;
|
|
2931
|
+
observationId: z.ZodString;
|
|
2932
|
+
reasoning: z.ZodString;
|
|
2933
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
2934
|
+
action: z.ZodLiteral<"noop">;
|
|
2935
|
+
reasoning: z.ZodString;
|
|
2936
|
+
}, z.core.$strip>], "action">>;
|
|
2937
|
+
}, z.core.$strip>;
|
|
2938
|
+
declare function runCurator(ctx: CuratorContext): Promise<MemoryLog>;
|
|
2939
|
+
declare function deprecateOnFailure(ctx: Pick<CuratorContext, 'testResult' | 'provider' | 'memoryRoot' | 'injectedObservationIds' | 'trustContradictDelta'>): Promise<MemoryLog>;
|
|
2940
|
+
|
|
2941
|
+
interface RunSuiteConfig {
|
|
2942
|
+
runId?: string;
|
|
2943
|
+
adapter: PlatformAdapter;
|
|
2944
|
+
platformConfig: PlatformConfig;
|
|
2945
|
+
planner: Planner;
|
|
2946
|
+
verifier?: Verifier;
|
|
2947
|
+
cache?: ActionCache;
|
|
2948
|
+
healingConfig: HealingConfig;
|
|
2949
|
+
plannerModel: LanguageModel;
|
|
2950
|
+
verifierModel: LanguageModel;
|
|
2951
|
+
providerOptions?: ProviderOptions;
|
|
2952
|
+
reporters?: Reporter[];
|
|
2953
|
+
captureScreenshots?: boolean;
|
|
2954
|
+
screenshotMode?: 'failure' | 'every-step';
|
|
2955
|
+
timeouts?: {
|
|
2956
|
+
step?: number;
|
|
2957
|
+
test?: number;
|
|
2958
|
+
navigation?: number;
|
|
2959
|
+
};
|
|
2960
|
+
logger?: LogManager;
|
|
2961
|
+
configContent?: string;
|
|
2962
|
+
suiteFileContent?: string;
|
|
2963
|
+
envFileVars?: Record<string, string>;
|
|
2964
|
+
inlineVars?: Record<string, string>;
|
|
2965
|
+
cliVars?: Record<string, string>;
|
|
2966
|
+
resolvedHooks?: Map<string, HookDefinition>;
|
|
2967
|
+
sandboxOptions?: SandboxRunnerOptions;
|
|
2968
|
+
logCapture?: {
|
|
2969
|
+
console?: boolean;
|
|
2970
|
+
network?: boolean;
|
|
2971
|
+
};
|
|
2972
|
+
screenshotSize?: number;
|
|
2973
|
+
effectiveResolution?: number;
|
|
2974
|
+
memoryProvider?: MemoryProvider;
|
|
2975
|
+
memoryRoot?: string;
|
|
2976
|
+
memoryConfig?: {
|
|
2977
|
+
enabled?: boolean;
|
|
2978
|
+
curatorEnabled?: boolean;
|
|
2979
|
+
ablationEnabled?: boolean;
|
|
2980
|
+
trustConfirmDelta?: number;
|
|
2981
|
+
trustContradictDelta?: number;
|
|
2982
|
+
};
|
|
2983
|
+
circuitBreaker?: CircuitBreaker;
|
|
2984
|
+
product?: string;
|
|
2985
|
+
createAdapter?: () => Promise<PlatformAdapter>;
|
|
2986
|
+
resolveUrl?: (targetName: string) => string | undefined;
|
|
2987
|
+
onCuratorComplete?: (testName: string, memoryLog: MemoryLog) => void;
|
|
2988
|
+
artifactContext?: Record<string, unknown>;
|
|
2989
|
+
secretStore?: SecretStore;
|
|
2990
|
+
secretRedactor?: SecretRedactor;
|
|
2991
|
+
}
|
|
2992
|
+
declare function runSuite(suite: SuiteDefinition, testEntries: [TestDefinition, string][], config: RunSuiteConfig): Promise<SuiteResult>;
|
|
2993
|
+
|
|
2994
|
+
type WorkspaceFileKind = 'test' | 'suite';
|
|
2995
|
+
interface ResolvedWorkspaceFile {
|
|
2996
|
+
configuredPath: string;
|
|
2997
|
+
absolutePath: string;
|
|
2998
|
+
workspaceRelativePath: string;
|
|
2999
|
+
}
|
|
3000
|
+
interface WorkspaceFileRecord {
|
|
3001
|
+
kind: WorkspaceFileKind;
|
|
3002
|
+
absolutePath: string;
|
|
3003
|
+
workspaceRelativePath: string;
|
|
3004
|
+
}
|
|
3005
|
+
interface ResolvedWorkspacePaths {
|
|
3006
|
+
configPath: string;
|
|
3007
|
+
configDir: string;
|
|
3008
|
+
testMatch: string[];
|
|
3009
|
+
suiteMatch: string[];
|
|
3010
|
+
testPathIgnore: string[];
|
|
3011
|
+
hooksFile: ResolvedWorkspaceFile;
|
|
3012
|
+
agentRules: ResolvedWorkspaceFile;
|
|
3013
|
+
envFile: ResolvedWorkspaceFile;
|
|
3014
|
+
secretsFile: ResolvedWorkspaceFile;
|
|
3015
|
+
}
|
|
3016
|
+
interface ResolveWorkspacePathsInput {
|
|
3017
|
+
config: AgentQaConfig;
|
|
3018
|
+
configPath: string;
|
|
3019
|
+
requireExistingFiles?: boolean;
|
|
3020
|
+
}
|
|
3021
|
+
declare function resolveWorkspacePaths(input: ResolveWorkspacePathsInput): ResolvedWorkspacePaths;
|
|
3022
|
+
declare function discoverWorkspaceFiles(input: {
|
|
3023
|
+
workspace: ResolvedWorkspacePaths;
|
|
3024
|
+
kind: WorkspaceFileKind;
|
|
3025
|
+
}): Promise<WorkspaceFileRecord[]>;
|
|
3026
|
+
declare function resolveWorkspaceFileTarget(input: {
|
|
3027
|
+
workspace: ResolvedWorkspacePaths;
|
|
3028
|
+
kind: WorkspaceFileKind;
|
|
3029
|
+
filePath: string;
|
|
3030
|
+
requireExisting?: boolean;
|
|
3031
|
+
}): Promise<WorkspaceFileRecord>;
|
|
3032
|
+
declare function isWorkspacePathMatch(input: {
|
|
3033
|
+
workspace: ResolvedWorkspacePaths;
|
|
3034
|
+
kind: WorkspaceFileKind;
|
|
3035
|
+
workspaceRelativePath: string;
|
|
3036
|
+
}): boolean;
|
|
3037
|
+
|
|
3038
|
+
interface ValidationDiagnostic {
|
|
3039
|
+
file: string;
|
|
3040
|
+
line: number;
|
|
3041
|
+
column: number;
|
|
3042
|
+
message: string;
|
|
3043
|
+
severity: 'error' | 'warning';
|
|
3044
|
+
}
|
|
3045
|
+
interface ValidationResult {
|
|
3046
|
+
diagnostics: ValidationDiagnostic[];
|
|
3047
|
+
fileCount: number;
|
|
3048
|
+
errorCount: number;
|
|
3049
|
+
warningCount: number;
|
|
3050
|
+
}
|
|
3051
|
+
declare const VALID_FILENAME_RE: RegExp;
|
|
3052
|
+
declare function validateConfig(configPath: string): Promise<ValidationDiagnostic[]>;
|
|
3053
|
+
declare function validateTestFile(filePath: string, content: string): ValidationDiagnostic[];
|
|
3054
|
+
declare function validateSuiteFile(filePath: string, content: string, basedir: string): ValidationDiagnostic[];
|
|
3055
|
+
declare function validateFilename(filePath: string): ValidationDiagnostic[];
|
|
3056
|
+
declare function detectGlobOverlap(testMatch: string[], suiteMatch: string[], ignore: string[], cwd?: string): Promise<string[]>;
|
|
3057
|
+
declare function validateFiles(filePaths: string[], configPath?: string, options?: {
|
|
3058
|
+
basedir?: string;
|
|
3059
|
+
}): Promise<ValidationResult>;
|
|
3060
|
+
declare function validateProject(options?: {
|
|
3061
|
+
configPath?: string;
|
|
3062
|
+
files?: string[];
|
|
3063
|
+
testMatch?: string[];
|
|
3064
|
+
testPathIgnore?: string[];
|
|
3065
|
+
suiteMatch?: string[];
|
|
3066
|
+
hooksFile?: string;
|
|
3067
|
+
workspace?: ResolvedWorkspacePaths;
|
|
3068
|
+
}): Promise<ValidationResult>;
|
|
3069
|
+
|
|
3070
|
+
declare function formatDiagnostics(result: ValidationResult): string;
|
|
3071
|
+
declare function formatDiagnosticsPlain(result: ValidationResult): string;
|
|
3072
|
+
|
|
3073
|
+
declare function warnIfOutOfBounds(coords: {
|
|
3074
|
+
x?: number;
|
|
3075
|
+
y?: number;
|
|
3076
|
+
}, viewport: {
|
|
3077
|
+
width: number;
|
|
3078
|
+
height: number;
|
|
3079
|
+
}, actionType: string): void;
|
|
3080
|
+
|
|
3081
|
+
declare function parseHooksFile(filePath: string): Promise<{
|
|
3082
|
+
hooks: HookDefinition[];
|
|
3083
|
+
errors: string[];
|
|
3084
|
+
}>;
|
|
3085
|
+
|
|
3086
|
+
declare const DEFAULT_CLEANUP_TARGETS: readonly [".agent-qa"];
|
|
3087
|
+
type CleanupTarget = (typeof DEFAULT_CLEANUP_TARGETS)[number];
|
|
3088
|
+
interface HookReferenceRewriteFile {
|
|
3089
|
+
path: string;
|
|
3090
|
+
content: string;
|
|
3091
|
+
}
|
|
3092
|
+
interface HookReferenceMigrationSuccess {
|
|
3093
|
+
ok: true;
|
|
3094
|
+
hookNameToId: Record<string, string>;
|
|
3095
|
+
rewriteFiles: HookReferenceRewriteFile[];
|
|
3096
|
+
cleanupTargets: CleanupTarget[];
|
|
3097
|
+
}
|
|
3098
|
+
interface HookReferenceMigrationFailure {
|
|
3099
|
+
ok: false;
|
|
3100
|
+
errors: string[];
|
|
3101
|
+
rewriteFiles: [];
|
|
3102
|
+
cleanupTargets: [];
|
|
3103
|
+
}
|
|
3104
|
+
type HookReferenceMigrationAudit = HookReferenceMigrationSuccess | HookReferenceMigrationFailure;
|
|
3105
|
+
interface HookReferenceMigrationOptions {
|
|
3106
|
+
workspaceDir: string;
|
|
3107
|
+
configPath?: string;
|
|
3108
|
+
generateId?: () => string;
|
|
3109
|
+
}
|
|
3110
|
+
declare class HookReferenceMigrationError extends Error {
|
|
3111
|
+
readonly errors: string[];
|
|
3112
|
+
constructor(errors: string[]);
|
|
3113
|
+
}
|
|
3114
|
+
declare function auditWorkspaceHookReferenceMigration(options: HookReferenceMigrationOptions): Promise<HookReferenceMigrationAudit>;
|
|
3115
|
+
declare function applyWorkspaceHookReferenceMigration(options: HookReferenceMigrationOptions): Promise<HookReferenceMigrationSuccess>;
|
|
3116
|
+
|
|
3117
|
+
interface HookOrchestrationResult {
|
|
3118
|
+
results: Map<string, HookResult>;
|
|
3119
|
+
variables: Record<string, string>;
|
|
3120
|
+
allPassed: boolean;
|
|
3121
|
+
duration: number;
|
|
3122
|
+
}
|
|
3123
|
+
declare function runHooks(hooks: HookDefinition[], options?: SandboxRunnerOptions): Promise<HookOrchestrationResult>;
|
|
3124
|
+
|
|
3125
|
+
interface ObservationFrontmatter {
|
|
3126
|
+
id: string;
|
|
3127
|
+
title: string;
|
|
3128
|
+
trust: number;
|
|
3129
|
+
created: string;
|
|
3130
|
+
last_confirmed: string;
|
|
3131
|
+
confirmed_count: number;
|
|
3132
|
+
contradicted_count: number;
|
|
3133
|
+
source_test: string;
|
|
3134
|
+
}
|
|
3135
|
+
interface SuiteObservationFrontmatter extends ObservationFrontmatter {
|
|
3136
|
+
position: number;
|
|
3137
|
+
suite_snapshot: Array<{
|
|
3138
|
+
test: string;
|
|
3139
|
+
id: string;
|
|
3140
|
+
}>;
|
|
3141
|
+
}
|
|
3142
|
+
|
|
3143
|
+
declare function ensureMemoryDirs(root: string): Promise<void>;
|
|
3144
|
+
declare function writeObservation(root: string, tier: 'products' | 'suites' | 'tests', scope: string, data: BaseObservation | SuiteObservation): Promise<string>;
|
|
3145
|
+
declare function parseObservation(content: string, filename: string): {
|
|
3146
|
+
data: BaseObservation | SuiteObservation | null;
|
|
3147
|
+
error: string | null;
|
|
3148
|
+
};
|
|
3149
|
+
declare function listObservations(dir: string): Promise<string[]>;
|
|
3150
|
+
|
|
3151
|
+
declare function scanContent(text: string): {
|
|
3152
|
+
safe: boolean;
|
|
3153
|
+
matchedPattern?: string;
|
|
3154
|
+
};
|
|
3155
|
+
|
|
3156
|
+
declare function escapeXml(str: string): string;
|
|
3157
|
+
|
|
3158
|
+
declare function createMemoryProvider(config: {
|
|
3159
|
+
provider: string;
|
|
3160
|
+
memoryRoot?: string;
|
|
3161
|
+
curatorLockTimeout?: number;
|
|
3162
|
+
}): Promise<MemoryProvider>;
|
|
3163
|
+
|
|
3164
|
+
declare class LocalMemoryProvider implements MemoryProvider {
|
|
3165
|
+
private db;
|
|
3166
|
+
private minTrust;
|
|
3167
|
+
private maxInjections;
|
|
3168
|
+
private injectedMap;
|
|
3169
|
+
private memoryRoot;
|
|
3170
|
+
private lockManager;
|
|
3171
|
+
constructor(opts?: {
|
|
3172
|
+
memoryRoot?: string;
|
|
3173
|
+
minTrust?: number;
|
|
3174
|
+
maxInjections?: number;
|
|
3175
|
+
curatorLockTimeout?: number;
|
|
3176
|
+
});
|
|
3177
|
+
init(params: MemoryIndexParams): Promise<void>;
|
|
3178
|
+
queryForStep(stepText: string, stepIndex: number): MemoryQueryResult | null;
|
|
3179
|
+
private formatMemoryContext;
|
|
3180
|
+
destroy(): void;
|
|
3181
|
+
getInjectedObservations(stepIndex: number): string[];
|
|
3182
|
+
acquireLock(): Promise<void>;
|
|
3183
|
+
releaseLock(): Promise<void>;
|
|
3184
|
+
writeObservation(tier: 'products' | 'suites' | 'tests', scope: string, data: BaseObservation | SuiteObservation): Promise<string>;
|
|
3185
|
+
deleteObservation(tier: 'products' | 'suites' | 'tests', scope: string, id: string): Promise<void>;
|
|
3186
|
+
getAllObservations(): MemoryObservationSnippet[];
|
|
3187
|
+
searchForDuplicates(content: string): MemoryObservationSnippet[];
|
|
3188
|
+
getRunAnalytics(): unknown;
|
|
3189
|
+
}
|
|
3190
|
+
|
|
3191
|
+
declare const DEFAULT_MEMORY_DIR = "agent-qa-memory";
|
|
3192
|
+
interface MemoryRootConfig {
|
|
3193
|
+
services?: {
|
|
3194
|
+
memory?: {
|
|
3195
|
+
dir?: string;
|
|
3196
|
+
};
|
|
3197
|
+
};
|
|
3198
|
+
}
|
|
3199
|
+
declare function resolveMemoryRoot(config: MemoryRootConfig | undefined, configDir: string): string;
|
|
3200
|
+
|
|
3201
|
+
declare class LockManager {
|
|
3202
|
+
private lockPath;
|
|
3203
|
+
private timeout;
|
|
3204
|
+
constructor(lockPath: string, timeout?: number);
|
|
3205
|
+
acquire(): Promise<void>;
|
|
3206
|
+
release(): Promise<void>;
|
|
3207
|
+
private isStale;
|
|
3208
|
+
}
|
|
3209
|
+
|
|
3210
|
+
declare function shouldAblate(result: {
|
|
3211
|
+
status: string;
|
|
3212
|
+
steps: Array<unknown>;
|
|
3213
|
+
}, provider: MemoryProvider): boolean;
|
|
3214
|
+
declare function collectAllInjectedIds(result: {
|
|
3215
|
+
steps: Array<unknown>;
|
|
3216
|
+
}, provider: MemoryProvider): Map<number, string[]>;
|
|
3217
|
+
|
|
3218
|
+
declare function generateRunId(): string;
|
|
3219
|
+
|
|
3220
|
+
type AnalyticsRuntimeContext = 'user' | 'ci' | 'agent';
|
|
3221
|
+
type AnalyticsAgentProduct = 'claude_code' | 'cursor' | 'gemini_cli' | 'augment' | 'goose' | 'opencode' | 'codex' | 'cline' | 'amp';
|
|
3222
|
+
interface AnalyticsIdentity {
|
|
3223
|
+
distinctId: string;
|
|
3224
|
+
runtimeContext: AnalyticsRuntimeContext;
|
|
3225
|
+
agentProduct?: AnalyticsAgentProduct;
|
|
3226
|
+
isInternal?: boolean;
|
|
3227
|
+
}
|
|
3228
|
+
interface AnalyticsIdentityStore {
|
|
3229
|
+
distinctId: string;
|
|
3230
|
+
is_internal: boolean;
|
|
3231
|
+
}
|
|
3232
|
+
interface ResolveAnalyticsIdentityOptions {
|
|
3233
|
+
env?: Record<string, string | undefined>;
|
|
3234
|
+
identityPath?: string;
|
|
3235
|
+
homeDir?: string;
|
|
3236
|
+
}
|
|
3237
|
+
declare function getAnalyticsIdentityPath(env?: Record<string, string | undefined>, homeDir?: string): string;
|
|
3238
|
+
declare function generateAnalyticsUserId(): string;
|
|
3239
|
+
declare function readAnalyticsIdentity(path?: string): Promise<AnalyticsIdentityStore | null>;
|
|
3240
|
+
declare function writeAnalyticsIdentity(distinctId: string, path?: string, isInternal?: boolean): Promise<void>;
|
|
3241
|
+
declare function resolveAnalyticsAgentProduct(env?: Record<string, string | undefined>): AnalyticsAgentProduct | undefined;
|
|
3242
|
+
declare function resolveAnalyticsIdentity(options?: ResolveAnalyticsIdentityOptions): Promise<AnalyticsIdentity>;
|
|
3243
|
+
|
|
3244
|
+
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';
|
|
3245
|
+
type AnalyticsSurface = 'core' | 'cli' | 'dashboard-server' | 'dashboard-ui' | 'mcp';
|
|
3246
|
+
type AnalyticsTransportKind = 'posthog' | 'noop' | 'mock';
|
|
3247
|
+
interface AnalyticsEventProperties {
|
|
3248
|
+
agent_qa_version?: string;
|
|
3249
|
+
surface?: AnalyticsSurface;
|
|
3250
|
+
runtime_context?: AnalyticsRuntimeContext;
|
|
3251
|
+
agent_product?: AnalyticsAgentProduct;
|
|
3252
|
+
transport?: AnalyticsTransportKind;
|
|
3253
|
+
privacy_enabled?: boolean;
|
|
3254
|
+
posthog_key_present?: boolean;
|
|
3255
|
+
trigger_source?: 'cli' | 'dashboard' | 'api' | 'mcp' | 'unknown';
|
|
3256
|
+
runner?: 'local' | 'browserstack' | 'unknown';
|
|
3257
|
+
platform?: 'web' | 'android' | 'ios' | 'unknown';
|
|
3258
|
+
entity_type?: 'test' | 'suite' | 'hook' | 'unknown';
|
|
3259
|
+
outcome?: 'created';
|
|
3260
|
+
status?: 'passed' | 'failed' | 'skipped' | 'cancelled' | 'timeout' | 'unknown';
|
|
3261
|
+
duration_ms?: number;
|
|
3262
|
+
run_id?: string;
|
|
3263
|
+
parent_run_id?: string;
|
|
3264
|
+
test_id?: string;
|
|
3265
|
+
suite_id?: string;
|
|
3266
|
+
model_name?: string;
|
|
3267
|
+
provider?: string;
|
|
3268
|
+
provider_mode?: string;
|
|
3269
|
+
planner_model?: string;
|
|
3270
|
+
verifier_model?: string;
|
|
3271
|
+
input_tokens?: number;
|
|
3272
|
+
output_tokens?: number;
|
|
3273
|
+
total_tokens?: number;
|
|
3274
|
+
planner_call_count?: number;
|
|
3275
|
+
verifier_call_count?: number;
|
|
3276
|
+
step_count?: number;
|
|
3277
|
+
passed_step_count?: number;
|
|
3278
|
+
failed_step_count?: number;
|
|
3279
|
+
skipped_step_count?: number;
|
|
3280
|
+
subaction_count?: number;
|
|
3281
|
+
cached_subaction_count?: number;
|
|
3282
|
+
failed_subaction_count?: number;
|
|
3283
|
+
healing_attempt_count?: number;
|
|
3284
|
+
hook_count?: number;
|
|
3285
|
+
failed_hook_count?: number;
|
|
3286
|
+
retry_count?: number;
|
|
3287
|
+
is_flaky?: boolean;
|
|
3288
|
+
cancelled?: boolean;
|
|
3289
|
+
timed_out?: boolean;
|
|
3290
|
+
failure_category?: 'assertion' | 'timeout' | 'cancelled' | 'setup' | 'hook' | 'appium' | 'browser_install' | 'llm_context' | 'llm_provider' | 'memory' | 'framework' | 'unknown';
|
|
3291
|
+
browser_name?: string;
|
|
3292
|
+
mobile_transport?: string;
|
|
3293
|
+
mobile_provider?: string;
|
|
3294
|
+
app_state?: string;
|
|
3295
|
+
execution_destination?: string;
|
|
3296
|
+
memory_enabled?: boolean;
|
|
3297
|
+
memory_injected_observation_count?: number;
|
|
3298
|
+
memory_curator_input_tokens?: number;
|
|
3299
|
+
memory_curator_output_tokens?: number;
|
|
3300
|
+
memory_curator_total_tokens?: number;
|
|
3301
|
+
memory_added_count?: number;
|
|
3302
|
+
memory_confirmed_count?: number;
|
|
3303
|
+
memory_deprecated_count?: number;
|
|
3304
|
+
memory_deleted_count?: number;
|
|
3305
|
+
memory_error_count?: number;
|
|
3306
|
+
suite_child_count?: number;
|
|
3307
|
+
suite_passed_count?: number;
|
|
3308
|
+
suite_failed_count?: number;
|
|
3309
|
+
suite_skipped_count?: number;
|
|
3310
|
+
suite_execution_mode?: 'sequential' | 'parallel' | 'unknown';
|
|
3311
|
+
mcp_tool_count?: number;
|
|
3312
|
+
mcp_server_state?: 'started' | 'disabled';
|
|
3313
|
+
mcp_transport?: 'stdio' | 'http';
|
|
3314
|
+
mcp_host_kind?: 'loopback' | 'other';
|
|
3315
|
+
mcp_port_kind?: 'default' | 'custom';
|
|
3316
|
+
mcp_path_kind?: 'default' | 'custom';
|
|
3317
|
+
tool_name?: string;
|
|
3318
|
+
mcp_tool_category?: 'discovery' | 'schema' | 'id' | 'authoring' | 'hook' | 'run' | 'triage' | 'unknown';
|
|
3319
|
+
mcp_tool_status?: 'success' | 'error';
|
|
3320
|
+
mcp_error_category?: 'validation' | 'dashboard_unavailable' | 'dashboard_error' | 'config' | 'tool_error' | 'unknown';
|
|
3321
|
+
'$process_person_profile'?: false;
|
|
3322
|
+
}
|
|
3323
|
+
type BuiltAnalyticsEventProperties = Record<string, string | number | boolean | undefined>;
|
|
3324
|
+
interface AnalyticsEventInput {
|
|
3325
|
+
name: AnalyticsEventName | string;
|
|
3326
|
+
properties?: Record<string, unknown>;
|
|
3327
|
+
}
|
|
3328
|
+
interface BuiltAnalyticsEvent {
|
|
3329
|
+
name: AnalyticsEventName;
|
|
3330
|
+
properties: BuiltAnalyticsEventProperties;
|
|
3331
|
+
}
|
|
3332
|
+
|
|
3333
|
+
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"];
|
|
3334
|
+
declare const ANALYTICS_SURFACES: readonly ["core", "cli", "dashboard-server", "dashboard-ui", "mcp"];
|
|
3335
|
+
declare const ANALYTICS_RUNTIME_CONTEXTS: readonly ["user", "ci", "agent"];
|
|
3336
|
+
declare const ANALYTICS_AGENT_PRODUCTS: readonly ["claude_code", "cursor", "gemini_cli", "augment", "goose", "opencode", "codex", "cline", "amp"];
|
|
3337
|
+
declare const ANALYTICS_TRANSPORT_KINDS: readonly ["posthog", "noop", "mock"];
|
|
3338
|
+
declare const ANALYTICS_TRIGGER_SOURCES: readonly ["cli", "dashboard", "api", "mcp", "unknown"];
|
|
3339
|
+
declare const ANALYTICS_RUNNERS: readonly ["local", "browserstack", "unknown"];
|
|
3340
|
+
declare const ANALYTICS_PLATFORMS: readonly ["web", "android", "ios", "unknown"];
|
|
3341
|
+
declare const ANALYTICS_DASHBOARD_ENTITY_TYPES: readonly ["test", "suite", "hook", "unknown"];
|
|
3342
|
+
declare const ANALYTICS_DASHBOARD_OUTCOMES: readonly ["created"];
|
|
3343
|
+
declare const ANALYTICS_RUN_STATUSES: readonly ["passed", "failed", "skipped", "cancelled", "timeout", "unknown"];
|
|
3344
|
+
declare const ANALYTICS_MCP_SERVER_STATES: readonly ["started", "disabled"];
|
|
3345
|
+
declare const ANALYTICS_MCP_TRANSPORTS: readonly ["stdio", "http"];
|
|
3346
|
+
declare const ANALYTICS_MCP_HOST_KINDS: readonly ["loopback", "other"];
|
|
3347
|
+
declare const ANALYTICS_MCP_PORT_KINDS: readonly ["default", "custom"];
|
|
3348
|
+
declare const ANALYTICS_MCP_PATH_KINDS: readonly ["default", "custom"];
|
|
3349
|
+
declare const ANALYTICS_MCP_TOOL_CATEGORIES: readonly ["discovery", "schema", "id", "authoring", "hook", "run", "triage", "unknown"];
|
|
3350
|
+
declare const ANALYTICS_MCP_TOOL_STATUSES: readonly ["success", "error"];
|
|
3351
|
+
declare const ANALYTICS_MCP_ERROR_CATEGORIES: readonly ["validation", "dashboard_unavailable", "dashboard_error", "config", "tool_error", "unknown"];
|
|
3352
|
+
declare const ANALYTICS_FAILURE_CATEGORIES: readonly ["assertion", "timeout", "cancelled", "setup", "hook", "appium", "browser_install", "llm_context", "llm_provider", "memory", "framework", "unknown"];
|
|
3353
|
+
declare const ANALYTICS_SUITE_EXECUTION_MODES: readonly ["sequential", "parallel", "unknown"];
|
|
3354
|
+
declare function buildAnalyticsEvent(input: AnalyticsEventInput): BuiltAnalyticsEvent;
|
|
3355
|
+
|
|
3356
|
+
interface AnalyticsCapturePayload {
|
|
3357
|
+
distinctId: string;
|
|
3358
|
+
isInternal?: boolean;
|
|
3359
|
+
event: BuiltAnalyticsEvent;
|
|
3360
|
+
}
|
|
3361
|
+
interface AnalyticsTransport {
|
|
3362
|
+
capture(payload: AnalyticsCapturePayload): void | Promise<void>;
|
|
3363
|
+
flush(): void | Promise<void>;
|
|
3364
|
+
}
|
|
3365
|
+
declare class NoopAnalyticsTransport implements AnalyticsTransport {
|
|
3366
|
+
capture(): void;
|
|
3367
|
+
flush(): void;
|
|
3368
|
+
}
|
|
3369
|
+
declare class MockAnalyticsTransport implements AnalyticsTransport {
|
|
3370
|
+
readonly events: AnalyticsCapturePayload[];
|
|
3371
|
+
flushCount: number;
|
|
3372
|
+
capture(payload: AnalyticsCapturePayload): void;
|
|
3373
|
+
flush(): void;
|
|
3374
|
+
}
|
|
3375
|
+
|
|
3376
|
+
declare const EMPTY_POSTHOG_KEY_WARNING = "PostHog analytics initialization failed because AGENT_QA_POSTHOG_KEY is empty. Analytics telemetry is disabled.";
|
|
3377
|
+
interface AnalyticsServiceConfig {
|
|
3378
|
+
analytics?: {
|
|
3379
|
+
privacy?: true;
|
|
3380
|
+
};
|
|
3381
|
+
}
|
|
3382
|
+
interface AnalyticsPostHogTransportFactoryOptions {
|
|
3383
|
+
projectKey: string;
|
|
3384
|
+
host: string;
|
|
3385
|
+
disableGeoip: false;
|
|
3386
|
+
}
|
|
3387
|
+
interface AnalyticsServiceOptions {
|
|
3388
|
+
config?: AnalyticsServiceConfig;
|
|
3389
|
+
surface?: AnalyticsSurface;
|
|
3390
|
+
transport?: AnalyticsTransport;
|
|
3391
|
+
warningSink?: (message: string) => void;
|
|
3392
|
+
projectKey?: string;
|
|
3393
|
+
projectHost?: string;
|
|
3394
|
+
identityPath?: string;
|
|
3395
|
+
env?: Record<string, string | undefined>;
|
|
3396
|
+
posthogTransportFactory?: (options: AnalyticsPostHogTransportFactoryOptions) => AnalyticsTransport;
|
|
3397
|
+
}
|
|
3398
|
+
interface AnalyticsService {
|
|
3399
|
+
capture(event: BuiltAnalyticsEvent): Promise<void>;
|
|
3400
|
+
flush(): Promise<void>;
|
|
3401
|
+
}
|
|
3402
|
+
interface AnalyticsStandardPropertiesOptions {
|
|
3403
|
+
surface?: AnalyticsSurface;
|
|
3404
|
+
identityPath?: string;
|
|
3405
|
+
env?: Record<string, string | undefined>;
|
|
3406
|
+
agentQaVersion?: string;
|
|
3407
|
+
}
|
|
3408
|
+
declare function resolveAnalyticsStandardProperties(options?: AnalyticsStandardPropertiesOptions): Promise<AnalyticsEventProperties>;
|
|
3409
|
+
declare function createAnalyticsService(options?: AnalyticsServiceOptions): AnalyticsService;
|
|
3410
|
+
declare function getAnalyticsService(options?: AnalyticsServiceOptions): AnalyticsService;
|
|
3411
|
+
declare function resetAnalyticsServiceForTests(): void;
|
|
3412
|
+
declare function captureAnalytics(event: BuiltAnalyticsEvent, options?: AnalyticsServiceOptions): Promise<void>;
|
|
3413
|
+
declare function flushAnalytics(options?: AnalyticsServiceOptions): Promise<void>;
|
|
3414
|
+
|
|
3415
|
+
declare const AGENT_QA_POSTHOG_KEY = "phc_siDVZ3DEoSCiBSocn2GZMRhx5UcRwekJDVtap5Zteii3";
|
|
3416
|
+
declare const AGENT_QA_POSTHOG_HOST = "https://us.i.posthog.com";
|
|
3417
|
+
|
|
3418
|
+
interface AnalyticsRunReporterOptions extends Omit<AnalyticsServiceOptions, 'transport'> {
|
|
3419
|
+
surface?: AnalyticsSurface;
|
|
3420
|
+
service?: AnalyticsService;
|
|
3421
|
+
transport?: AnalyticsTransport;
|
|
3422
|
+
}
|
|
3423
|
+
declare class AnalyticsRunReporter implements Reporter {
|
|
3424
|
+
private readonly service;
|
|
3425
|
+
private readonly surface;
|
|
3426
|
+
private readonly identityPath?;
|
|
3427
|
+
private readonly env?;
|
|
3428
|
+
private readonly disabled;
|
|
3429
|
+
private readonly runStates;
|
|
3430
|
+
private readonly suiteStates;
|
|
3431
|
+
constructor(options?: AnalyticsRunReporterOptions);
|
|
3432
|
+
onSuiteStart(suite: SuiteDefinition, context?: RunArtifactReporterContext): Promise<void>;
|
|
3433
|
+
onTestStart(test: TestDefinition, _filePath: string, context?: RunArtifactReporterContext): Promise<void>;
|
|
3434
|
+
onHookEnd(event: HookResultEvent): Promise<void>;
|
|
3435
|
+
onTestEnd(): Promise<void>;
|
|
3436
|
+
onRunEnd(summary: RunSummary): Promise<void>;
|
|
3437
|
+
onSuiteEnd(summary: SuiteSummary): Promise<void>;
|
|
3438
|
+
flush(): Promise<void>;
|
|
3439
|
+
private findStateForResult;
|
|
3440
|
+
private captureTestResult;
|
|
3441
|
+
private captureSuiteResult;
|
|
3442
|
+
}
|
|
3443
|
+
declare function createAnalyticsRunReporter(options?: AnalyticsRunReporterOptions): AnalyticsRunReporter;
|
|
3444
|
+
|
|
3445
|
+
declare const AGENT_QA_VERSION = "0.1.0";
|
|
3446
|
+
declare function getAgentQaVersion(): string;
|
|
3447
|
+
|
|
3448
|
+
declare const DEFAULT_AGENT_QA_RUNTIME_DIR = ".agent-qa";
|
|
3449
|
+
declare const DEFAULT_AGENT_QA_ARTIFACTS_DIR = ".agent-qa/artifacts";
|
|
3450
|
+
declare const DEFAULT_AGENT_QA_CACHE_DIR = ".agent-qa/cache";
|
|
3451
|
+
declare const DEFAULT_AGENT_QA_SCREENSHOTS_DIR = ".agent-qa/artifacts/screenshots";
|
|
3452
|
+
declare const DEFAULT_AGENT_QA_VIDEOS_DIR = ".agent-qa/artifacts/videos";
|
|
3453
|
+
declare const DEFAULT_AGENT_QA_RUNS_DB_PATH = ".agent-qa/runs.db";
|
|
3454
|
+
declare const LEGACY_AGENT_QA_DASHBOARD_DB_PATH = ".agent-qa/dashboard.db";
|
|
3455
|
+
|
|
3456
|
+
interface CompressOptions {
|
|
3457
|
+
effectiveResolution: number;
|
|
3458
|
+
maxBytes?: number;
|
|
3459
|
+
actionSpaceWidth: number;
|
|
3460
|
+
}
|
|
3461
|
+
interface CompressResult {
|
|
3462
|
+
buffer: Buffer;
|
|
3463
|
+
imageWidth: number;
|
|
3464
|
+
imageHeight: number;
|
|
3465
|
+
}
|
|
3466
|
+
declare function compressScreenshot(buffer: Buffer, opts: CompressOptions, logger?: ScopedLogger): Promise<CompressResult>;
|
|
3467
|
+
|
|
3468
|
+
interface AlignOptions {
|
|
3469
|
+
width: number;
|
|
3470
|
+
height: number;
|
|
3471
|
+
}
|
|
3472
|
+
/** Resize buffer to exact window dimensions. Used by mobile adapters for
|
|
3473
|
+
* action-space alignment (e.g., iOS physical pixels → logical points). */
|
|
3474
|
+
declare function alignToWindow(buffer: Buffer, opts: AlignOptions): Promise<Buffer>;
|
|
3475
|
+
|
|
3476
|
+
interface ImageDimensions {
|
|
3477
|
+
width: number;
|
|
3478
|
+
height: number;
|
|
3479
|
+
}
|
|
3480
|
+
/** Read image buffer width/height without decoding pixels.
|
|
3481
|
+
* Used by mobile adapters for action-space drift assertions (D-06/D-07). */
|
|
3482
|
+
declare function getImageDimensions(buffer: Buffer): Promise<ImageDimensions | undefined>;
|
|
3483
|
+
|
|
3484
|
+
/**
|
|
3485
|
+
* Converts "Meta" tokens in keyboard combo strings to "Control" on non-Mac platforms.
|
|
3486
|
+
*
|
|
3487
|
+
* Users write combos like "Meta+k" and we route them to Cmd+K on Mac, Ctrl+K on
|
|
3488
|
+
* Windows/Linux. Uses split/join (not regex) to avoid edge-case bugs with adjacent
|
|
3489
|
+
* tokens like "Shift+Meta+Meta+T".
|
|
3490
|
+
*
|
|
3491
|
+
* @param keys - Array of key/combo strings (e.g., ["Meta+k", "Enter"])
|
|
3492
|
+
* @param options.enabled - When false, keys are returned unchanged
|
|
3493
|
+
* @param options.isMac - When true, keys are returned unchanged (Meta is native)
|
|
3494
|
+
* @returns New array with Meta tokens replaced by Control (when applicable)
|
|
3495
|
+
*/
|
|
3496
|
+
declare function convertKeysForPlatform(keys: string[], options: {
|
|
3497
|
+
enabled: boolean;
|
|
3498
|
+
isMac: boolean;
|
|
3499
|
+
}): string[];
|
|
3500
|
+
/**
|
|
3501
|
+
* Returns true when running on macOS. Reads process.platform at call time so
|
|
3502
|
+
* tests can override it via Object.defineProperty(process, 'platform', ...).
|
|
3503
|
+
*/
|
|
3504
|
+
declare function isMacPlatform(): boolean;
|
|
3505
|
+
|
|
3506
|
+
declare function isPathInsideDir(childPath: string, parentDir: string): boolean;
|
|
3507
|
+
|
|
3508
|
+
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, AccessibilityConfigSchema, type AccessibilityViolation, type Action, type ActionCache, type ActionPlan, ActionPlanSchema, type ActionResult, AdapterLogDataSchema, AgentLogDataSchema, type AgentLoopConfig, type AgentPhase, type AgentQaConfig, AgentQaConfigSchema, 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 ArtifactRecord, type Asserter, AssertionEvaluator, type AssertionInput, type AssertionResult, AssertionResultSchema, type AssertionType, type AuthCredential, type AuthPluginBundle, type AuthPluginDeclaration, AuthPluginDeclarationSchema, type AuthProvider, 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_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 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, 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 Reporter, type ReporterEvent, type ResolveAnalyticsIdentityOptions, type ResolveMobileRunConfigInput, 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, 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, type ValidationDiagnostic, type ValidationResult, type VariableExtractor, type VariableSource, VariableStore, type VerificationResult, VerificationResultSchema, type Verifier, type VerifyResult, WEB_ONLY_ACTIONS, type WorkspaceConfig, type WorkspaceFileKind, type WorkspaceFileRecord, WorkspaceSchema, alignToWindow, applyWorkspaceHookReferenceMigration, auditWorkspaceHookReferenceMigration, browserstackProvider, buildAnalyticsEvent, buildAssertionPrompt, 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, formatDiagnostics, formatDiagnosticsPlain, formatLogEntry, formatParseError, formatRunAttributesBlock, generateAnalyticsUserId, generateFailureSummary, generatePKCE, generateRunId, generateState, getAgentQaVersion, getAnalyticsIdentityPath, getAnalyticsService, getAuthPath, getCredential, getImageDimensions, getLLMAuthProviderPlugin, getProvider, getProviderOptions, hashScreenState, hashStepInstruction, interpolateSecretTemplates, interpolateVariables, isBetterSqlite3AbiMismatch, isBetterSqlite3NativeModuleError, isBetterSqlite3NodeGypSymlinkConflict, isMacPlatform, isPathInsideDir, isWorkspacePathMatch, listLLMAuthProviderPlugins, listObservations, listProviders, loadLLMAuthPlugins, mapMobileCapabilities, mapWebCapabilities, mergeRunAttributes, normalizeRole, parseAllTests, parseEnvFile, parseHookInline, parseHooksFile, parseMobileSource, parseObservation, parseRunAttrFlags, parseSuiteFile, parseTTL, parseTestFile, readAnalyticsIdentity, readAuth, redactSecretValue, registerAllProviders, registerLLMAuthProviderPlugin, registerLLMAuthProviderPlugins, registerProvider, removeAuth, resetAnalyticsServiceForTests, resolveAnalyticsAgentProduct, resolveAnalyticsIdentity, resolveAnalyticsStandardProperties, resolveBetterSqliteRebuildCommand, resolveFarmCredentials, resolveFileReferences, resolveLLMAuth, resolveMemoryRoot, resolveMobileRunConfig, resolveSecretTemplatesInValue, resolveWorkspaceFileTarget, resolveWorkspacePaths, runCurator, runHookInSandbox, runHooks, runSuite, runTest, runTestWithRetry, scanContent, serializeEnvFile, shouldAblate, sortRunAttributesForDisplay, stripHookInline, toolCallToActionPlan, toolSchemaMiddleware, truncateScreenState, validateConfig, validateFilename, validateFiles, validateProject, validateSuiteFile, validateTestFile, validateTrustedRunAttributes, validateUserRunAttributes, warnIfOutOfBounds, writeAnalyticsIdentity, writeAuth, writeObservation };
|