@xbrowser/cli 0.16.0 → 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{browser-R7B255ML.js → browser-53KUFEEM.js} +5 -1
- package/dist/{browser-I2HJZ7IP.js → browser-DSVV4GHS.js} +2 -2
- package/dist/{browser-GWBH6OJK.js → browser-GURRY444.js} +3 -1
- package/dist/cdp-driver-MNPR3HZH.js +2537 -0
- package/dist/cdp-driver-SSXUGXP6.js +47 -0
- package/dist/{chunk-2ONMTDLK.js → chunk-2BQZIT3S.js} +2535 -50
- package/dist/{chunk-KDYXFLAC.js → chunk-2MFXKN32.js} +2 -2
- package/dist/chunk-42RPMJ76.js +2530 -0
- package/dist/{chunk-F3ZWFCJJ.js → chunk-E4O5ZU3H.js} +2535 -50
- package/dist/{chunk-ATFTAKMN.js → chunk-IDVD44ED.js} +20 -0
- package/dist/chunk-T4J4C2NZ.js +250 -0
- package/dist/{chunk-RS6YYWTK.js → chunk-YKOHDEFV.js} +73 -38
- package/dist/cli.js +1054 -140
- package/dist/{convert-4DUWZIKH.js → convert-EGFYNICZ.js} +2 -0
- package/dist/{daemon-client-GX2UYIW4.js → daemon-client-3VM7VU7O.js} +22 -0
- package/dist/{daemon-client-3IJD6X4B.js → daemon-client-YAVQ343A.js} +7 -1
- package/dist/daemon-main.js +984 -114
- package/dist/{extract-EGRXZSSK.js → extract-L2IW3IUB.js} +2 -0
- package/dist/{filter-OLAE26HN.js → filter-HC4RA7JY.js} +2 -0
- package/dist/index.d.ts +581 -41
- package/dist/index.js +1100 -182
- package/dist/launcher-KA7J32K5.js +19 -0
- package/dist/{network-store-YAF5OIBH.js → network-store-66A2RATI.js} +1 -0
- package/dist/{session-recorder-XET3DNML.js → session-recorder-MA75PKTQ.js} +1 -1
- package/package.json +2 -3
- package/dist/daemon-client-XWSSQBEA.js +0 -58
- package/dist/network-store-2S5HATEV.js +0 -194
- package/dist/parse-action-dsl-DRSPBALP.js +0 -72
- package/dist/screenshot-MB6R7RSS.js +0 -26
- package/dist/session-recorder-ILSSV2UC.js +0 -6
package/dist/index.d.ts
CHANGED
|
@@ -1,13 +1,414 @@
|
|
|
1
1
|
import { EventEmitter } from 'events';
|
|
2
2
|
import { Server } from 'http';
|
|
3
|
-
import { Page, Browser, BrowserContext } from 'playwright';
|
|
4
3
|
import { CommandContext, CommandScope, XCLIAPI, Core, PluginInstance, PluginStatus } from '@dyyz1993/xcli-core';
|
|
5
4
|
export { PluginStatus } from '@dyyz1993/xcli-core';
|
|
6
5
|
import { ZodType, ZodTypeDef, z } from 'zod';
|
|
7
|
-
import * as playwright_core from 'playwright-core';
|
|
8
6
|
|
|
9
7
|
declare const version: any;
|
|
10
8
|
|
|
9
|
+
/**
|
|
10
|
+
* XBrowser CDP Driver — Abstract Interface Types
|
|
11
|
+
*
|
|
12
|
+
* Playwright-compatible interfaces backed by raw Chrome DevTools Protocol.
|
|
13
|
+
* All commands and plugins depend on these interfaces, NOT on Playwright.
|
|
14
|
+
*
|
|
15
|
+
* Naming convention: XB prefix (XBrowser) to avoid confusion with Playwright types.
|
|
16
|
+
*/
|
|
17
|
+
interface XBBrowser {
|
|
18
|
+
readonly disconnected: boolean;
|
|
19
|
+
close(): Promise<void>;
|
|
20
|
+
newContext(opts?: XBContextOptions): Promise<XBContext>;
|
|
21
|
+
contexts(): XBContext[];
|
|
22
|
+
on(event: string, handler: Function): void;
|
|
23
|
+
off(event: string, handler: Function): void;
|
|
24
|
+
}
|
|
25
|
+
interface XBContextOptions {
|
|
26
|
+
viewport?: {
|
|
27
|
+
width: number;
|
|
28
|
+
height: number;
|
|
29
|
+
};
|
|
30
|
+
userAgent?: string;
|
|
31
|
+
extraHTTPHeaders?: Record<string, string>;
|
|
32
|
+
ignoreHTTPSErrors?: boolean;
|
|
33
|
+
}
|
|
34
|
+
interface XBContext {
|
|
35
|
+
newPage(): Promise<XBPage>;
|
|
36
|
+
pages(): XBPage[];
|
|
37
|
+
close(): Promise<void>;
|
|
38
|
+
browser(): XBBrowser;
|
|
39
|
+
newCDPSession(page?: XBPage): Promise<XBCDPSession>;
|
|
40
|
+
addInitScript(script: string): Promise<void>;
|
|
41
|
+
cookies(urls?: string | string[]): Promise<XBCookie[]>;
|
|
42
|
+
addCookies(cookies: XBCookie[]): Promise<void>;
|
|
43
|
+
clearCookies(): Promise<void>;
|
|
44
|
+
on(event: string, handler: Function): void;
|
|
45
|
+
off(event: string, handler: Function): void;
|
|
46
|
+
}
|
|
47
|
+
interface XBCookie {
|
|
48
|
+
name: string;
|
|
49
|
+
value: string;
|
|
50
|
+
domain?: string;
|
|
51
|
+
path?: string;
|
|
52
|
+
expires?: number;
|
|
53
|
+
httpOnly?: boolean;
|
|
54
|
+
secure?: boolean;
|
|
55
|
+
sameSite?: 'Strict' | 'Lax' | 'None';
|
|
56
|
+
}
|
|
57
|
+
type WaitUntilState = 'load' | 'domcontentloaded' | 'networkidle' | 'commit';
|
|
58
|
+
interface XBPage {
|
|
59
|
+
goto(url: string, opts?: {
|
|
60
|
+
waitUntil?: WaitUntilState;
|
|
61
|
+
timeout?: number;
|
|
62
|
+
referer?: string;
|
|
63
|
+
}): Promise<XBNavigationResponse | null>;
|
|
64
|
+
goBack(opts?: {
|
|
65
|
+
timeout?: number;
|
|
66
|
+
waitUntil?: WaitUntilState;
|
|
67
|
+
}): Promise<void>;
|
|
68
|
+
goForward(opts?: {
|
|
69
|
+
timeout?: number;
|
|
70
|
+
waitUntil?: WaitUntilState;
|
|
71
|
+
}): Promise<void>;
|
|
72
|
+
reload(opts?: {
|
|
73
|
+
timeout?: number;
|
|
74
|
+
waitUntil?: WaitUntilState;
|
|
75
|
+
}): Promise<void>;
|
|
76
|
+
waitForLoadState(state?: WaitUntilState, timeout?: number): Promise<void>;
|
|
77
|
+
waitForTimeout(ms: number): Promise<void>;
|
|
78
|
+
waitForSelector(selector: string, opts?: {
|
|
79
|
+
state?: 'visible' | 'hidden' | 'attached' | 'detached';
|
|
80
|
+
timeout?: number;
|
|
81
|
+
}): Promise<void>;
|
|
82
|
+
waitForFunction<R>(fn: string | Function, opts?: {
|
|
83
|
+
timeout?: number;
|
|
84
|
+
polling?: number | 'raf';
|
|
85
|
+
}, ...args: unknown[]): Promise<R>;
|
|
86
|
+
waitForURL(url: string | RegExp | ((url: string) => boolean), opts?: {
|
|
87
|
+
timeout?: number;
|
|
88
|
+
waitUntil?: WaitUntilState;
|
|
89
|
+
}): Promise<void>;
|
|
90
|
+
waitForResponse(urlOrPredicate: string | RegExp | ((response: XBResponse) => boolean), opts?: {
|
|
91
|
+
timeout?: number;
|
|
92
|
+
}): Promise<XBResponse>;
|
|
93
|
+
waitForRequest(urlOrPredicate: string | RegExp | ((request: XBRequest) => boolean), opts?: {
|
|
94
|
+
timeout?: number;
|
|
95
|
+
}): Promise<XBRequest>;
|
|
96
|
+
url(): string;
|
|
97
|
+
title(): Promise<string>;
|
|
98
|
+
content(): Promise<string>;
|
|
99
|
+
evaluate<R = unknown>(fn: string | Function, ...args: unknown[]): Promise<R>;
|
|
100
|
+
$eval<R = unknown>(selector: string, fn: string | Function, ...args: unknown[]): Promise<R>;
|
|
101
|
+
$$eval<R = unknown>(selector: string, fn: string | Function, ...args: unknown[]): Promise<R>;
|
|
102
|
+
locator(selector: string): XBLocator;
|
|
103
|
+
getByText(text: string, opts?: {
|
|
104
|
+
exact?: boolean;
|
|
105
|
+
}): XBLocator;
|
|
106
|
+
getByRole(role: string, opts?: {
|
|
107
|
+
name?: string;
|
|
108
|
+
exact?: boolean;
|
|
109
|
+
}): XBLocator;
|
|
110
|
+
getByLabel(label: string, opts?: {
|
|
111
|
+
exact?: boolean;
|
|
112
|
+
}): XBLocator;
|
|
113
|
+
getByPlaceholder(text: string, opts?: {
|
|
114
|
+
exact?: boolean;
|
|
115
|
+
}): XBLocator;
|
|
116
|
+
getByTestId(id: string): XBLocator;
|
|
117
|
+
getByAltText(text: string, opts?: {
|
|
118
|
+
exact?: boolean;
|
|
119
|
+
}): XBLocator;
|
|
120
|
+
getByTitle(title: string, opts?: {
|
|
121
|
+
exact?: boolean;
|
|
122
|
+
}): XBLocator;
|
|
123
|
+
click(selector: string, opts?: XBClickOptions): Promise<void>;
|
|
124
|
+
dblclick(selector: string, opts?: XBClickOptions): Promise<void>;
|
|
125
|
+
fill(selector: string, value: string, opts?: XBFillOptions): Promise<void>;
|
|
126
|
+
press(selector: string, key: string, opts?: {
|
|
127
|
+
timeout?: number;
|
|
128
|
+
}): Promise<void>;
|
|
129
|
+
hover(selector: string, opts?: {
|
|
130
|
+
timeout?: number;
|
|
131
|
+
force?: boolean;
|
|
132
|
+
}): Promise<void>;
|
|
133
|
+
type(selector: string, text: string, opts?: {
|
|
134
|
+
delay?: number;
|
|
135
|
+
timeout?: number;
|
|
136
|
+
}): Promise<void>;
|
|
137
|
+
check(selector: string, opts?: {
|
|
138
|
+
timeout?: number;
|
|
139
|
+
}): Promise<void>;
|
|
140
|
+
uncheck(selector: string, opts?: {
|
|
141
|
+
timeout?: number;
|
|
142
|
+
}): Promise<void>;
|
|
143
|
+
selectOption(selector: string, value: string | string[] | {
|
|
144
|
+
label?: string;
|
|
145
|
+
value?: string;
|
|
146
|
+
index?: number;
|
|
147
|
+
}): Promise<string[]>;
|
|
148
|
+
textContent(selector: string): Promise<string | null>;
|
|
149
|
+
innerText(selector: string): Promise<string>;
|
|
150
|
+
innerHTML(selector: string): Promise<string>;
|
|
151
|
+
getAttribute(selector: string, name: string): Promise<string | null>;
|
|
152
|
+
readonly mouse: XBMouse;
|
|
153
|
+
readonly keyboard: XBKeyboard;
|
|
154
|
+
$(selector: string): Promise<XBElementHandle | null>;
|
|
155
|
+
$$(selector: string): Promise<XBElementHandle[]>;
|
|
156
|
+
screenshot(opts?: XBScreenshotOptions): Promise<Buffer>;
|
|
157
|
+
pdf(opts?: XBPdfOptions): Promise<Buffer>;
|
|
158
|
+
viewportSize(): {
|
|
159
|
+
width: number;
|
|
160
|
+
height: number;
|
|
161
|
+
} | null;
|
|
162
|
+
setViewportSize(size: {
|
|
163
|
+
width: number;
|
|
164
|
+
height: number;
|
|
165
|
+
}): Promise<void>;
|
|
166
|
+
addInitScript(script: string): Promise<void>;
|
|
167
|
+
bringToFront(): Promise<void>;
|
|
168
|
+
setExtraHTTPHeaders(headers: Record<string, string>): Promise<void>;
|
|
169
|
+
setOfflineMode(offline: boolean): Promise<void>;
|
|
170
|
+
route(url: string | RegExp, handler: (route: XBRoute) => Promise<void> | void): Promise<void>;
|
|
171
|
+
unroute(url: string | RegExp, handler?: (route: XBRoute) => Promise<void> | void): Promise<void>;
|
|
172
|
+
setInputFiles(selector: string, files: XBFilePayload | XBFilePayload[]): Promise<void>;
|
|
173
|
+
dragAndDrop(source: string, target: string): Promise<void>;
|
|
174
|
+
on(event: string, handler: Function): void;
|
|
175
|
+
off(event: string, handler: Function): void;
|
|
176
|
+
_cdpSend<T = unknown>(method: string, params?: Record<string, unknown>): Promise<T>;
|
|
177
|
+
_subscribe(event: string, handler: (params: unknown) => void): () => void;
|
|
178
|
+
close(): Promise<void>;
|
|
179
|
+
isClosed(): boolean;
|
|
180
|
+
context(): XBContext;
|
|
181
|
+
browser(): XBBrowser;
|
|
182
|
+
mainFrame(): XBFrame;
|
|
183
|
+
frames(): XBFrame[];
|
|
184
|
+
}
|
|
185
|
+
/** Response from navigation (goto). Playwright-compatible subset. */
|
|
186
|
+
interface XBNavigationResponse {
|
|
187
|
+
status(): number;
|
|
188
|
+
ok(): boolean;
|
|
189
|
+
url(): string;
|
|
190
|
+
headers(): Record<string, string>;
|
|
191
|
+
}
|
|
192
|
+
interface XBLocator {
|
|
193
|
+
click(opts?: XBClickOptions): Promise<void>;
|
|
194
|
+
fill(value: string, opts?: XBFillOptions): Promise<void>;
|
|
195
|
+
press(key: string, opts?: {
|
|
196
|
+
timeout?: number;
|
|
197
|
+
}): Promise<void>;
|
|
198
|
+
pressSequentially(text: string, opts?: {
|
|
199
|
+
delay?: number;
|
|
200
|
+
timeout?: number;
|
|
201
|
+
}): Promise<void>;
|
|
202
|
+
hover(opts?: {
|
|
203
|
+
timeout?: number;
|
|
204
|
+
force?: boolean;
|
|
205
|
+
}): Promise<void>;
|
|
206
|
+
type(text: string, opts?: {
|
|
207
|
+
delay?: number;
|
|
208
|
+
timeout?: number;
|
|
209
|
+
}): Promise<void>;
|
|
210
|
+
check(opts?: {
|
|
211
|
+
timeout?: number;
|
|
212
|
+
}): Promise<void>;
|
|
213
|
+
uncheck(opts?: {
|
|
214
|
+
timeout?: number;
|
|
215
|
+
}): Promise<void>;
|
|
216
|
+
selectOption(value: string | string[] | {
|
|
217
|
+
label?: string;
|
|
218
|
+
value?: string;
|
|
219
|
+
index?: number;
|
|
220
|
+
}): Promise<string[]>;
|
|
221
|
+
screenshot(opts?: XBScreenshotOptions): Promise<Buffer>;
|
|
222
|
+
focus(): Promise<void>;
|
|
223
|
+
waitFor(opts?: {
|
|
224
|
+
state?: 'visible' | 'hidden' | 'attached' | 'detached';
|
|
225
|
+
timeout?: number;
|
|
226
|
+
}): Promise<void>;
|
|
227
|
+
count(): Promise<number>;
|
|
228
|
+
isVisible(): Promise<boolean>;
|
|
229
|
+
isHidden(): Promise<boolean>;
|
|
230
|
+
isEnabled(): Promise<boolean>;
|
|
231
|
+
isDisabled(): Promise<boolean>;
|
|
232
|
+
boundingBox(): Promise<{
|
|
233
|
+
x: number;
|
|
234
|
+
y: number;
|
|
235
|
+
width: number;
|
|
236
|
+
height: number;
|
|
237
|
+
} | null>;
|
|
238
|
+
textContent(): Promise<string | null>;
|
|
239
|
+
innerText(): Promise<string>;
|
|
240
|
+
innerHTML(): Promise<string>;
|
|
241
|
+
getAttribute(name: string): Promise<string | null>;
|
|
242
|
+
evaluate<R = unknown>(fn: string | Function, ...args: unknown[]): Promise<R>;
|
|
243
|
+
ariaSnapshot(): Promise<string>;
|
|
244
|
+
first(): XBLocator;
|
|
245
|
+
last(): XBLocator;
|
|
246
|
+
nth(index: number): XBLocator;
|
|
247
|
+
filter(opts: {
|
|
248
|
+
visible?: boolean;
|
|
249
|
+
}): XBLocator;
|
|
250
|
+
all(): Promise<XBLocator[]>;
|
|
251
|
+
}
|
|
252
|
+
interface XBElementHandle {
|
|
253
|
+
click(opts?: XBClickOptions): Promise<void>;
|
|
254
|
+
fill(value: string, opts?: XBFillOptions): Promise<void>;
|
|
255
|
+
hover(): Promise<void>;
|
|
256
|
+
press(key: string): Promise<void>;
|
|
257
|
+
screenshot(opts?: XBScreenshotOptions): Promise<Buffer>;
|
|
258
|
+
boundingBox(): Promise<{
|
|
259
|
+
x: number;
|
|
260
|
+
y: number;
|
|
261
|
+
width: number;
|
|
262
|
+
height: number;
|
|
263
|
+
} | null>;
|
|
264
|
+
isVisible(): Promise<boolean>;
|
|
265
|
+
isEnabled(): Promise<boolean>;
|
|
266
|
+
textContent(): Promise<string | null>;
|
|
267
|
+
innerText(): Promise<string>;
|
|
268
|
+
innerHTML(): Promise<string>;
|
|
269
|
+
getAttribute(name: string): Promise<string | null>;
|
|
270
|
+
scrollIntoViewIfNeeded(): Promise<void>;
|
|
271
|
+
dispose(): void;
|
|
272
|
+
}
|
|
273
|
+
interface XBMouse {
|
|
274
|
+
click(x: number, y: number, opts?: {
|
|
275
|
+
button?: 'left' | 'right' | 'middle';
|
|
276
|
+
clickCount?: number;
|
|
277
|
+
delay?: number;
|
|
278
|
+
}): Promise<void>;
|
|
279
|
+
dblclick(x: number, y: number, opts?: {
|
|
280
|
+
button?: 'left' | 'right' | 'middle';
|
|
281
|
+
}): Promise<void>;
|
|
282
|
+
down(opts?: {
|
|
283
|
+
button?: 'left' | 'right' | 'middle';
|
|
284
|
+
}): Promise<void>;
|
|
285
|
+
up(opts?: {
|
|
286
|
+
button?: 'left' | 'right' | 'middle';
|
|
287
|
+
}): Promise<void>;
|
|
288
|
+
move(x: number, y: number, opts?: {
|
|
289
|
+
steps?: number;
|
|
290
|
+
}): Promise<void>;
|
|
291
|
+
wheel(deltaX: number, deltaY: number): Promise<void>;
|
|
292
|
+
}
|
|
293
|
+
interface XBKeyboard {
|
|
294
|
+
press(key: string, opts?: {
|
|
295
|
+
delay?: number;
|
|
296
|
+
}): Promise<void>;
|
|
297
|
+
down(key: string): Promise<void>;
|
|
298
|
+
up(key: string): Promise<void>;
|
|
299
|
+
type(text: string, opts?: {
|
|
300
|
+
delay?: number;
|
|
301
|
+
}): Promise<void>;
|
|
302
|
+
insertText(text: string): Promise<void>;
|
|
303
|
+
}
|
|
304
|
+
interface XBFrame {
|
|
305
|
+
url(): string;
|
|
306
|
+
name(): string;
|
|
307
|
+
isDetached(): boolean;
|
|
308
|
+
page(): XBPage;
|
|
309
|
+
evaluate<R = unknown>(fn: string | Function, ...args: unknown[]): Promise<R>;
|
|
310
|
+
$(selector: string): Promise<XBElementHandle | null>;
|
|
311
|
+
$$(selector: string): Promise<XBElementHandle[]>;
|
|
312
|
+
}
|
|
313
|
+
interface XBCDPSession {
|
|
314
|
+
send<T = unknown>(method: string, params?: Record<string, unknown>): Promise<T>;
|
|
315
|
+
on(event: string, handler: Function): void;
|
|
316
|
+
off(event: string, handler: Function): void;
|
|
317
|
+
detach(): Promise<void>;
|
|
318
|
+
}
|
|
319
|
+
interface XBClickOptions {
|
|
320
|
+
button?: 'left' | 'right' | 'middle';
|
|
321
|
+
clickCount?: number;
|
|
322
|
+
delay?: number;
|
|
323
|
+
timeout?: number;
|
|
324
|
+
force?: boolean;
|
|
325
|
+
noWaitAfter?: boolean;
|
|
326
|
+
position?: {
|
|
327
|
+
x: number;
|
|
328
|
+
y: number;
|
|
329
|
+
};
|
|
330
|
+
trial?: boolean;
|
|
331
|
+
}
|
|
332
|
+
interface XBFillOptions {
|
|
333
|
+
timeout?: number;
|
|
334
|
+
force?: boolean;
|
|
335
|
+
noWaitAfter?: boolean;
|
|
336
|
+
}
|
|
337
|
+
interface XBScreenshotOptions {
|
|
338
|
+
type?: 'png' | 'jpeg';
|
|
339
|
+
quality?: number;
|
|
340
|
+
fullPage?: boolean;
|
|
341
|
+
clip?: {
|
|
342
|
+
x: number;
|
|
343
|
+
y: number;
|
|
344
|
+
width: number;
|
|
345
|
+
height: number;
|
|
346
|
+
};
|
|
347
|
+
omitBackground?: boolean;
|
|
348
|
+
timeout?: number;
|
|
349
|
+
}
|
|
350
|
+
interface XBPdfOptions {
|
|
351
|
+
format?: string;
|
|
352
|
+
landscape?: boolean;
|
|
353
|
+
printBackground?: boolean;
|
|
354
|
+
scale?: number;
|
|
355
|
+
margin?: {
|
|
356
|
+
top?: string;
|
|
357
|
+
bottom?: string;
|
|
358
|
+
left?: string;
|
|
359
|
+
right?: string;
|
|
360
|
+
};
|
|
361
|
+
preferCSSPageSize?: boolean;
|
|
362
|
+
}
|
|
363
|
+
interface XBResponse {
|
|
364
|
+
status(): number;
|
|
365
|
+
statusText(): string;
|
|
366
|
+
url(): string;
|
|
367
|
+
headers(): Record<string, string>;
|
|
368
|
+
ok(): boolean;
|
|
369
|
+
body(): Promise<Buffer>;
|
|
370
|
+
text(): Promise<string>;
|
|
371
|
+
json(): Promise<unknown>;
|
|
372
|
+
request(): XBRequest;
|
|
373
|
+
}
|
|
374
|
+
interface XBRoute {
|
|
375
|
+
request(): XBRequest;
|
|
376
|
+
abort(errorCode?: string): Promise<void>;
|
|
377
|
+
continue(opts?: {
|
|
378
|
+
url?: string;
|
|
379
|
+
method?: string;
|
|
380
|
+
headers?: Record<string, string>;
|
|
381
|
+
postData?: string;
|
|
382
|
+
}): Promise<void>;
|
|
383
|
+
fulfill(opts: {
|
|
384
|
+
status?: number;
|
|
385
|
+
headers?: Record<string, string>;
|
|
386
|
+
body?: string | Buffer;
|
|
387
|
+
contentType?: string;
|
|
388
|
+
}): Promise<void>;
|
|
389
|
+
}
|
|
390
|
+
interface XBFilePayload {
|
|
391
|
+
name: string;
|
|
392
|
+
mimeType: string;
|
|
393
|
+
buffer: Buffer;
|
|
394
|
+
}
|
|
395
|
+
interface XBRequest {
|
|
396
|
+
url(): string;
|
|
397
|
+
method(): string;
|
|
398
|
+
headers(): Record<string, string>;
|
|
399
|
+
postData(): string | null;
|
|
400
|
+
resourceType(): string;
|
|
401
|
+
response(): Promise<XBResponse | null>;
|
|
402
|
+
}
|
|
403
|
+
interface XBRequest {
|
|
404
|
+
url(): string;
|
|
405
|
+
method(): string;
|
|
406
|
+
headers(): Record<string, string>;
|
|
407
|
+
postData(): string | null;
|
|
408
|
+
resourceType(): string;
|
|
409
|
+
response(): Promise<XBResponse | null>;
|
|
410
|
+
}
|
|
411
|
+
|
|
11
412
|
/**
|
|
12
413
|
* Configuration for the WebSocket server.
|
|
13
414
|
*/
|
|
@@ -208,7 +609,7 @@ declare class WSServer extends EventEmitter {
|
|
|
208
609
|
* Call this when a session is created. The capturer will only start
|
|
209
610
|
* when a WS client binds to this session.
|
|
210
611
|
*/
|
|
211
|
-
registerSession(sessionId: string, page:
|
|
612
|
+
registerSession(sessionId: string, page: XBPage, options?: {
|
|
212
613
|
interval?: number;
|
|
213
614
|
quality?: number;
|
|
214
615
|
type?: 'jpeg' | 'png';
|
|
@@ -530,7 +931,7 @@ declare class HumanInteractionManager {
|
|
|
530
931
|
private capturer;
|
|
531
932
|
private webhook;
|
|
532
933
|
private autoOpen;
|
|
533
|
-
constructor(wsServer: WSServer, page:
|
|
934
|
+
constructor(wsServer: WSServer, page: XBPage);
|
|
534
935
|
private sendWebhook;
|
|
535
936
|
private tryAutoOpen;
|
|
536
937
|
/**
|
|
@@ -552,9 +953,9 @@ declare class HumanInteractionManager {
|
|
|
552
953
|
* along with an optional `waitForHuman` function for CAPTCHA handling.
|
|
553
954
|
*/
|
|
554
955
|
interface BrowserCommandContext extends CommandContext {
|
|
555
|
-
page:
|
|
556
|
-
browser:
|
|
557
|
-
browserContext:
|
|
956
|
+
page: XBPage;
|
|
957
|
+
browser: XBBrowser;
|
|
958
|
+
browserContext: XBContext;
|
|
558
959
|
sessionId?: string;
|
|
559
960
|
cdpEndpoint?: string;
|
|
560
961
|
waitForHuman?: (options?: WaitForHumanOptions) => Promise<WaitForHumanResult>;
|
|
@@ -574,7 +975,7 @@ declare function checkBrowserScope(scope: CommandScope, ctx: BrowserCommandConte
|
|
|
574
975
|
* @throws If no active page is available in the context.
|
|
575
976
|
*/
|
|
576
977
|
declare function assertPageScope(ctx: BrowserCommandContext): asserts ctx is BrowserCommandContext & {
|
|
577
|
-
page:
|
|
978
|
+
page: XBPage;
|
|
578
979
|
};
|
|
579
980
|
/**
|
|
580
981
|
* Attach a `waitForHuman` function to the browser command context.
|
|
@@ -585,21 +986,21 @@ declare function assertPageScope(ctx: BrowserCommandContext): asserts ctx is Bro
|
|
|
585
986
|
* @param ctx - The browser command context to augment.
|
|
586
987
|
* @param getOrCreateWSServer - Factory that returns a WSServer for the given BrowserContext.
|
|
587
988
|
*/
|
|
588
|
-
declare function attachWaitForHuman(ctx: BrowserCommandContext, getOrCreateWSServer: (browserContext:
|
|
989
|
+
declare function attachWaitForHuman(ctx: BrowserCommandContext, getOrCreateWSServer: (browserContext: XBContext) => Promise<WSServer>): void;
|
|
589
990
|
/**
|
|
590
991
|
* Retrieve a cached WSServer instance for the given BrowserContext.
|
|
591
992
|
*
|
|
592
993
|
* @param browserContext - The Playwright BrowserContext.
|
|
593
994
|
* @returns The cached WSServer, or `undefined` if none is cached.
|
|
594
995
|
*/
|
|
595
|
-
declare function getWSServerFromCache(browserContext:
|
|
996
|
+
declare function getWSServerFromCache(browserContext: XBContext): WSServer | undefined;
|
|
596
997
|
/**
|
|
597
998
|
* Cache a WSServer instance for the given BrowserContext.
|
|
598
999
|
*
|
|
599
1000
|
* @param browserContext - The Playwright BrowserContext.
|
|
600
1001
|
* @param server - The WSServer to associate with this context.
|
|
601
1002
|
*/
|
|
602
|
-
declare function setWSServerCache(browserContext:
|
|
1003
|
+
declare function setWSServerCache(browserContext: XBContext, server: WSServer): void;
|
|
603
1004
|
|
|
604
1005
|
/**
|
|
605
1006
|
* Represents a managed browser session with its Playwright context, page,
|
|
@@ -608,9 +1009,9 @@ declare function setWSServerCache(browserContext: BrowserContext, server: WSServ
|
|
|
608
1009
|
interface ManagedSession {
|
|
609
1010
|
id: string;
|
|
610
1011
|
name: string;
|
|
611
|
-
context:
|
|
612
|
-
page:
|
|
613
|
-
browser:
|
|
1012
|
+
context: XBContext;
|
|
1013
|
+
page: XBPage;
|
|
1014
|
+
browser: XBBrowser;
|
|
614
1015
|
createdAt: string;
|
|
615
1016
|
lastActivityAt: number;
|
|
616
1017
|
isCDP?: boolean;
|
|
@@ -640,7 +1041,7 @@ interface BrowserLaunchOptions {
|
|
|
640
1041
|
* const browser = await getBrowser({ headless: true });
|
|
641
1042
|
* ```
|
|
642
1043
|
*/
|
|
643
|
-
declare function getBrowser(options?: BrowserLaunchOptions): Promise<
|
|
1044
|
+
declare function getBrowser(options?: BrowserLaunchOptions): Promise<XBBrowser>;
|
|
644
1045
|
/**
|
|
645
1046
|
* Find a managed session by its name.
|
|
646
1047
|
*
|
|
@@ -915,7 +1316,7 @@ declare function listSessions(): Promise<Array<{
|
|
|
915
1316
|
* @param name - The session name. Defaults to "default".
|
|
916
1317
|
* @returns The page instance, or `null` if the session does not exist.
|
|
917
1318
|
*/
|
|
918
|
-
declare function getSessionPage(name?: string, cdpEndpoint?: string): Promise<
|
|
1319
|
+
declare function getSessionPage(name?: string, cdpEndpoint?: string): Promise<XBPage | null>;
|
|
919
1320
|
|
|
920
1321
|
/**
|
|
921
1322
|
* A built-in CLI command with help text and an execute function.
|
|
@@ -957,6 +1358,80 @@ declare const allBuiltins: BuiltinCommand[];
|
|
|
957
1358
|
*/
|
|
958
1359
|
declare function getBuiltin(name: string): BuiltinCommand | undefined;
|
|
959
1360
|
|
|
1361
|
+
interface XBrowserPluginMetadata {
|
|
1362
|
+
id: string;
|
|
1363
|
+
name: string;
|
|
1364
|
+
description: string;
|
|
1365
|
+
version: string;
|
|
1366
|
+
author: string;
|
|
1367
|
+
homepage?: string;
|
|
1368
|
+
commands?: string[];
|
|
1369
|
+
sites?: string[];
|
|
1370
|
+
tags?: string[];
|
|
1371
|
+
screenshot?: string;
|
|
1372
|
+
license?: string;
|
|
1373
|
+
}
|
|
1374
|
+
type PluginFormWidget = 'text' | 'textarea' | 'number' | 'checkbox' | 'select' | 'multi-select' | 'json' | 'file' | 'url' | 'password';
|
|
1375
|
+
type PluginCapability = 'browser.page' | 'browser.context' | 'browser.cdp' | 'network' | 'storage' | 'filesystem' | 'external-api' | 'auth.login' | (string & {});
|
|
1376
|
+
interface PluginFormField {
|
|
1377
|
+
name: string;
|
|
1378
|
+
label: string;
|
|
1379
|
+
type: string;
|
|
1380
|
+
widget: PluginFormWidget;
|
|
1381
|
+
required: boolean;
|
|
1382
|
+
description?: string;
|
|
1383
|
+
default?: unknown;
|
|
1384
|
+
enum?: string[];
|
|
1385
|
+
positional?: boolean;
|
|
1386
|
+
placeholder?: string;
|
|
1387
|
+
secret?: boolean;
|
|
1388
|
+
multiple?: boolean;
|
|
1389
|
+
}
|
|
1390
|
+
interface PluginCommandContractExtension {
|
|
1391
|
+
category?: string;
|
|
1392
|
+
capabilities?: PluginCapability[];
|
|
1393
|
+
positional?: string[];
|
|
1394
|
+
form?: {
|
|
1395
|
+
title?: string;
|
|
1396
|
+
description?: string;
|
|
1397
|
+
submitLabel?: string;
|
|
1398
|
+
fields?: Partial<PluginFormField>[];
|
|
1399
|
+
};
|
|
1400
|
+
output?: {
|
|
1401
|
+
schema?: unknown;
|
|
1402
|
+
examples?: unknown[];
|
|
1403
|
+
};
|
|
1404
|
+
}
|
|
1405
|
+
interface PluginCommandContract {
|
|
1406
|
+
name: string;
|
|
1407
|
+
description: string;
|
|
1408
|
+
scope: string;
|
|
1409
|
+
requiresLogin: boolean;
|
|
1410
|
+
category?: string;
|
|
1411
|
+
capabilities: PluginCapability[];
|
|
1412
|
+
positional: string[];
|
|
1413
|
+
form: {
|
|
1414
|
+
title: string;
|
|
1415
|
+
description?: string;
|
|
1416
|
+
submitLabel: string;
|
|
1417
|
+
fields: PluginFormField[];
|
|
1418
|
+
};
|
|
1419
|
+
output?: PluginCommandContractExtension['output'];
|
|
1420
|
+
}
|
|
1421
|
+
interface PluginContract {
|
|
1422
|
+
version: 2;
|
|
1423
|
+
plugin: {
|
|
1424
|
+
name: string;
|
|
1425
|
+
url?: string;
|
|
1426
|
+
description?: string;
|
|
1427
|
+
requiresLogin?: boolean;
|
|
1428
|
+
};
|
|
1429
|
+
commands: PluginCommandContract[];
|
|
1430
|
+
}
|
|
1431
|
+
interface PluginListOptions {
|
|
1432
|
+
json?: boolean;
|
|
1433
|
+
}
|
|
1434
|
+
|
|
960
1435
|
/**
|
|
961
1436
|
* Options for configuring the plugin loader's search directories.
|
|
962
1437
|
*/
|
|
@@ -985,6 +1460,7 @@ declare class XBrowserPluginLoader {
|
|
|
985
1460
|
getPlugin(id: string): PluginInstance | undefined;
|
|
986
1461
|
getPluginStatus(id: string): PluginStatus;
|
|
987
1462
|
getLoadedPlugins(): PluginInstance[];
|
|
1463
|
+
getPluginContract(siteName: string, commandName?: string): PluginContract | PluginCommandContract | undefined;
|
|
988
1464
|
loadPlugin(pluginPath: string, id?: string): Promise<PluginInstance>;
|
|
989
1465
|
unloadPlugin(id: string): Promise<void>;
|
|
990
1466
|
reloadPlugin(id: string): Promise<PluginInstance>;
|
|
@@ -993,23 +1469,6 @@ declare class XBrowserPluginLoader {
|
|
|
993
1469
|
unload(): Promise<void>;
|
|
994
1470
|
}
|
|
995
1471
|
|
|
996
|
-
interface XBrowserPluginMetadata {
|
|
997
|
-
id: string;
|
|
998
|
-
name: string;
|
|
999
|
-
description: string;
|
|
1000
|
-
version: string;
|
|
1001
|
-
author: string;
|
|
1002
|
-
homepage?: string;
|
|
1003
|
-
commands?: string[];
|
|
1004
|
-
sites?: string[];
|
|
1005
|
-
tags?: string[];
|
|
1006
|
-
screenshot?: string;
|
|
1007
|
-
license?: string;
|
|
1008
|
-
}
|
|
1009
|
-
interface PluginListOptions {
|
|
1010
|
-
json?: boolean;
|
|
1011
|
-
}
|
|
1012
|
-
|
|
1013
1472
|
interface InstalledPlugin {
|
|
1014
1473
|
id: string;
|
|
1015
1474
|
name: string;
|
|
@@ -1104,7 +1563,7 @@ declare class RecorderController {
|
|
|
1104
1563
|
private startTime;
|
|
1105
1564
|
private startUrl;
|
|
1106
1565
|
private name;
|
|
1107
|
-
constructor(page:
|
|
1566
|
+
constructor(page: XBPage);
|
|
1108
1567
|
/**
|
|
1109
1568
|
* Start recording browser interactions.
|
|
1110
1569
|
*
|
|
@@ -1300,7 +1759,7 @@ declare class SessionRecorder {
|
|
|
1300
1759
|
private lastActionTs;
|
|
1301
1760
|
private activePages;
|
|
1302
1761
|
private _isRecording;
|
|
1303
|
-
constructor(context:
|
|
1762
|
+
constructor(context: XBContext, page: XBPage, sessionName: string);
|
|
1304
1763
|
get isRecording(): boolean;
|
|
1305
1764
|
get actionCount(): number;
|
|
1306
1765
|
get networkCount(): number;
|
|
@@ -1386,7 +1845,7 @@ declare class PlaybackEngine {
|
|
|
1386
1845
|
private page;
|
|
1387
1846
|
private recording;
|
|
1388
1847
|
private checkpoints;
|
|
1389
|
-
constructor(page:
|
|
1848
|
+
constructor(page: XBPage, recording: RecordingSession);
|
|
1390
1849
|
/**
|
|
1391
1850
|
* Create a PlaybackEngine from a YAML recording file.
|
|
1392
1851
|
*
|
|
@@ -1394,7 +1853,7 @@ declare class PlaybackEngine {
|
|
|
1394
1853
|
* @param filePath - Path to the YAML recording file.
|
|
1395
1854
|
* @returns A new PlaybackEngine instance.
|
|
1396
1855
|
*/
|
|
1397
|
-
static fromFile(page:
|
|
1856
|
+
static fromFile(page: XBPage, filePath: string): PlaybackEngine;
|
|
1398
1857
|
withCheckpoints(checkpoints: CheckpointEntry[]): PlaybackEngine;
|
|
1399
1858
|
play(options?: PlaybackOptions): Promise<PlaybackResult>;
|
|
1400
1859
|
private executeEvent;
|
|
@@ -1452,7 +1911,7 @@ declare class CaptchaDetector {
|
|
|
1452
1911
|
* @param page - The Playwright page to scan.
|
|
1453
1912
|
* @returns Detection result with type, selector, and confidence level.
|
|
1454
1913
|
*/
|
|
1455
|
-
static detect(page:
|
|
1914
|
+
static detect(page: XBPage): Promise<CaptchaDetectionResult>;
|
|
1456
1915
|
/**
|
|
1457
1916
|
* Check whether a previously detected CAPTCHA has been solved.
|
|
1458
1917
|
*
|
|
@@ -1460,7 +1919,7 @@ declare class CaptchaDetector {
|
|
|
1460
1919
|
* @param previousSelector - The selector from a previous detection result.
|
|
1461
1920
|
* @returns `true` if the CAPTCHA is no longer visible.
|
|
1462
1921
|
*/
|
|
1463
|
-
static isSolved(page:
|
|
1922
|
+
static isSolved(page: XBPage, previousSelector?: string): Promise<boolean>;
|
|
1464
1923
|
}
|
|
1465
1924
|
|
|
1466
1925
|
/**
|
|
@@ -1520,7 +1979,7 @@ declare class ScreencastCapturer {
|
|
|
1520
1979
|
* If CDP session creation fails (non-Chromium, restricted access),
|
|
1521
1980
|
* automatically falls back to `page.screenshot()` polling.
|
|
1522
1981
|
*/
|
|
1523
|
-
startCapture(page:
|
|
1982
|
+
startCapture(page: XBPage, sessionId: string, onFrame: (frame: ScreencastFrame) => void): Promise<void>;
|
|
1524
1983
|
/**
|
|
1525
1984
|
* Fallback: periodic page.screenshot() polling when CDP Cast is unavailable.
|
|
1526
1985
|
*/
|
|
@@ -1817,6 +2276,87 @@ declare function registerCommandDefinition(name: string, positional: string[]):
|
|
|
1817
2276
|
|
|
1818
2277
|
declare function normalizeSelector(input: string): string;
|
|
1819
2278
|
|
|
2279
|
+
type AgentTargetAction = 'click' | 'fill' | 'type' | 'press' | 'select' | 'check' | 'hover';
|
|
2280
|
+
interface AgentTarget {
|
|
2281
|
+
ref: string;
|
|
2282
|
+
selector: string;
|
|
2283
|
+
role: string;
|
|
2284
|
+
name: string;
|
|
2285
|
+
tag: string;
|
|
2286
|
+
visible: boolean;
|
|
2287
|
+
enabled: boolean;
|
|
2288
|
+
editable: boolean;
|
|
2289
|
+
checked?: boolean;
|
|
2290
|
+
value?: string;
|
|
2291
|
+
box?: {
|
|
2292
|
+
x: number;
|
|
2293
|
+
y: number;
|
|
2294
|
+
width: number;
|
|
2295
|
+
height: number;
|
|
2296
|
+
};
|
|
2297
|
+
actions: AgentTargetAction[];
|
|
2298
|
+
}
|
|
2299
|
+
interface AgentObservation {
|
|
2300
|
+
url: string;
|
|
2301
|
+
title: string;
|
|
2302
|
+
screenHash: string;
|
|
2303
|
+
timestamp: string;
|
|
2304
|
+
targets: AgentTarget[];
|
|
2305
|
+
compact?: string;
|
|
2306
|
+
selectors?: Record<string, string>;
|
|
2307
|
+
}
|
|
2308
|
+
type AgentActionType = 'click' | 'fill' | 'type' | 'press' | 'select' | 'check' | 'hover';
|
|
2309
|
+
interface AgentActionInput {
|
|
2310
|
+
action: AgentActionType;
|
|
2311
|
+
ref?: string;
|
|
2312
|
+
selector?: string;
|
|
2313
|
+
value?: string;
|
|
2314
|
+
key?: string;
|
|
2315
|
+
force?: boolean;
|
|
2316
|
+
timeout?: number;
|
|
2317
|
+
}
|
|
2318
|
+
interface AgentActionResult {
|
|
2319
|
+
action: AgentActionType;
|
|
2320
|
+
selector: string;
|
|
2321
|
+
ref?: string;
|
|
2322
|
+
success: boolean;
|
|
2323
|
+
reason?: string;
|
|
2324
|
+
message?: string;
|
|
2325
|
+
stale?: boolean;
|
|
2326
|
+
screenHash?: string;
|
|
2327
|
+
target?: AgentTarget;
|
|
2328
|
+
}
|
|
2329
|
+
type AgentWaitState = 'attached' | 'detached' | 'visible' | 'hidden';
|
|
2330
|
+
type AgentLoadState = 'load' | 'domcontentloaded' | 'networkidle';
|
|
2331
|
+
interface AgentWaitInput {
|
|
2332
|
+
selector?: string;
|
|
2333
|
+
state?: AgentWaitState;
|
|
2334
|
+
text?: string;
|
|
2335
|
+
url?: string;
|
|
2336
|
+
load?: AgentLoadState;
|
|
2337
|
+
fn?: string;
|
|
2338
|
+
screenHashChanged?: string;
|
|
2339
|
+
timeout?: number;
|
|
2340
|
+
pollInterval?: number;
|
|
2341
|
+
}
|
|
2342
|
+
interface AgentWaitResult {
|
|
2343
|
+
success: boolean;
|
|
2344
|
+
matched: 'selector' | 'text' | 'url' | 'load' | 'fn' | 'screenHashChanged';
|
|
2345
|
+
timeout: number;
|
|
2346
|
+
elapsed: number;
|
|
2347
|
+
screenHash?: string;
|
|
2348
|
+
message?: string;
|
|
2349
|
+
}
|
|
2350
|
+
|
|
2351
|
+
interface ObserveOptions {
|
|
2352
|
+
includeHidden?: boolean;
|
|
2353
|
+
limit?: number;
|
|
2354
|
+
}
|
|
2355
|
+
declare function observePage(page: XBPage, sessionId: string | undefined, options?: ObserveOptions): Promise<AgentObservation>;
|
|
2356
|
+
declare function getPageScreenHash(page: XBPage): Promise<string>;
|
|
2357
|
+
declare function actOnPage(page: XBPage, sessionId: string | undefined, input: AgentActionInput): Promise<AgentActionResult>;
|
|
2358
|
+
declare function waitForPage(page: XBPage, input: AgentWaitInput): Promise<AgentWaitResult>;
|
|
2359
|
+
|
|
1820
2360
|
/**
|
|
1821
2361
|
* A single event in a browser recording.
|
|
1822
2362
|
*/
|
|
@@ -2249,4 +2789,4 @@ declare function advise(decision: DecisionResult, originalMethod: string): Advis
|
|
|
2249
2789
|
/** Convenience factory: create and start a CDP interceptor proxy with defaults. */
|
|
2250
2790
|
declare function createCDPInterceptor(config: CDPInterceptorConfig): Promise<CDPInterceptorProxy>;
|
|
2251
2791
|
|
|
2252
|
-
export { type APIRequest, type APIResponse, type AdvisoryResult, type AnalysisResult, BROWSER_SCOPE, type BatchCollectResult, type BrowserCommandContext, type BrowserCommandDefinition, type BrowserLaunchOptions, type BuiltinCommand, type BuiltinContext, type CDPError, type CDPInterceptorConfig, CDPInterceptorProxy, type CDPInterceptorRule, type CDPInterceptorStats, type CDPLogEntry, type CDPMessage, type CDPRequest, type CDPResponse, type CaptchaDetectionResult, CaptchaDetector, type ChainExecutionResult, type ChainRequest, type ChainStepResult, type CollectResult, type CollectorConfig, type CommandMessage, type CompanyInfo, type ContextChange, type DaemonInfo, DataCollector, DataStorage, type DecisionAction, type DecisionResult, type DomainStat, type ElementRef, type ExecRequest, type ExecutionResult, HTTPServer, type HTTPServerConfig, type HTTPServerError, HumanInteractionManager, type InstallOptions, type InstalledPlugin, type ManagedSession, type MessageDirection, type NetworkEntry, type ParsedPipeline, PlaybackEngine, type PlaybackOptions, type PlaybackResult, PluginInstaller, type PluginLoaderOptions, type RecordedEvent, RecorderController, type RecorderStatus, type Recording, type RecordingControlFile, type RecordingData, type RecordingEvent, type RecordingSession, type RecordingStep, type RecordingSummary, type RegisteredCommand, ResultAnalyzer, type RuleContext, type RuleEngine, type ScopeDefinition, type ScopeLevel, ScreencastCapturer, type ScreencastFrame, type ScreencastMessage, type ScreencastOptions, type SearchResult, type ManagedSession as SessionInfo, SessionRecorder, type StatusMessage, type StorageConfig, type UserAction, type ViolationSeverity, type WSInboundMessage, type WSMessage, WSServer, type WSServerConfig, type WaitForHumanOptions, type WaitForHumanResult, WebhookNotifier, type WebhookPayload, XBrowserPluginLoader, advise, allBuiltins, assertPageScope, attachWaitForHuman, automationSignalsRule, checkBrowserScope, routeCommand as cliRoute, closeAllSessions as closeAllBrowserSessions, closeAllSessions, closeSession, closeSessionByName, createCDPInterceptor, createRuleEngine, createSession, destroyBrowser, destroyBrowser as destroySessionManager, domMutationRule, emulationOverrideRule, eventSimulationRule, executeChain, executeCommand, extractAndSave, extractRecording, filterRecording, findSession, findSession as findSessionInfo, fingerprintingRule, generateBashScript, generateJSScript, generatePythonScript, getAllSessions as getAllBrowserSessions, getAllCommands, getBrowser, getBuiltin, getCaptchaConfig, getCommand, getCommandNames, getCompanyType, getDaemonProcessStatus, getPlatformName, getSessionPage, getWSServerFromCache, inputKeystrokeRule, isChainInput, getAllSessions as listAllBrowserSessions, listSessions, mouseTrajectoryRule, networkAnomalyRule, normalizeSelector, openSession, pageLifecycleRule, parseCommandArgs, parseCommandChain, parseExcludeTypes, printExtractSummary, readCommandFile, readStdin, registerCommand, registerCommandDefinition, resetForTesting, setWSServer, setWSServerCache, splitCommand, startDaemonProcess, stopDaemonProcess, version };
|
|
2792
|
+
export { type APIRequest, type APIResponse, type AdvisoryResult, type AgentActionInput, type AgentActionResult, type AgentObservation, type AgentTarget, type AgentWaitInput, type AgentWaitResult, type AnalysisResult, BROWSER_SCOPE, type BatchCollectResult, type BrowserCommandContext, type BrowserCommandDefinition, type BrowserLaunchOptions, type BuiltinCommand, type BuiltinContext, type CDPError, type CDPInterceptorConfig, CDPInterceptorProxy, type CDPInterceptorRule, type CDPInterceptorStats, type CDPLogEntry, type CDPMessage, type CDPRequest, type CDPResponse, type CaptchaDetectionResult, CaptchaDetector, type ChainExecutionResult, type ChainRequest, type ChainStepResult, type CollectResult, type CollectorConfig, type CommandMessage, type CompanyInfo, type ContextChange, type DaemonInfo, DataCollector, DataStorage, type DecisionAction, type DecisionResult, type DomainStat, type ElementRef, type ExecRequest, type ExecutionResult, HTTPServer, type HTTPServerConfig, type HTTPServerError, HumanInteractionManager, type InstallOptions, type InstalledPlugin, type ManagedSession, type MessageDirection, type NetworkEntry, type ParsedPipeline, PlaybackEngine, type PlaybackOptions, type PlaybackResult, PluginInstaller, type PluginLoaderOptions, type RecordedEvent, RecorderController, type RecorderStatus, type Recording, type RecordingControlFile, type RecordingData, type RecordingEvent, type RecordingSession, type RecordingStep, type RecordingSummary, type RegisteredCommand, ResultAnalyzer, type RuleContext, type RuleEngine, type ScopeDefinition, type ScopeLevel, ScreencastCapturer, type ScreencastFrame, type ScreencastMessage, type ScreencastOptions, type SearchResult, type ManagedSession as SessionInfo, SessionRecorder, type StatusMessage, type StorageConfig, type UserAction, type ViolationSeverity, type WSInboundMessage, type WSMessage, WSServer, type WSServerConfig, type WaitForHumanOptions, type WaitForHumanResult, WebhookNotifier, type WebhookPayload, XBrowserPluginLoader, actOnPage, advise, allBuiltins, assertPageScope, attachWaitForHuman, automationSignalsRule, checkBrowserScope, routeCommand as cliRoute, closeAllSessions as closeAllBrowserSessions, closeAllSessions, closeSession, closeSessionByName, createCDPInterceptor, createRuleEngine, createSession, destroyBrowser, destroyBrowser as destroySessionManager, domMutationRule, emulationOverrideRule, eventSimulationRule, executeChain, executeCommand, extractAndSave, extractRecording, filterRecording, findSession, findSession as findSessionInfo, fingerprintingRule, generateBashScript, generateJSScript, generatePythonScript, getAllSessions as getAllBrowserSessions, getAllCommands, getBrowser, getBuiltin, getCaptchaConfig, getCommand, getCommandNames, getCompanyType, getDaemonProcessStatus, getPageScreenHash, getPlatformName, getSessionPage, getWSServerFromCache, inputKeystrokeRule, isChainInput, getAllSessions as listAllBrowserSessions, listSessions, mouseTrajectoryRule, networkAnomalyRule, normalizeSelector, observePage, openSession, pageLifecycleRule, parseCommandArgs, parseCommandChain, parseExcludeTypes, printExtractSummary, readCommandFile, readStdin, registerCommand, registerCommandDefinition, resetForTesting, setWSServer, setWSServerCache, splitCommand, startDaemonProcess, stopDaemonProcess, version, waitForPage };
|