@mearl/client 2.22.0 → 3.0.0-beta.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +201 -0
- package/README.md +40 -40
- package/dist/actionTimeouts.js +1 -1
- package/dist/artifacts.d.ts +1 -1
- package/dist/autoUpdate.js +1 -2
- package/dist/browserRegistry.d.ts +1 -1
- package/dist/check.d.ts +1 -1
- package/dist/check.js +4 -3
- package/dist/commands.d.ts +12 -12
- package/dist/commands.js +15 -14
- package/dist/index.d.ts +4 -7
- package/dist/index.js +1 -1
- package/dist/local.d.ts +3 -1
- package/dist/local.js +2 -1
- package/dist/pageEvalArguments.d.ts +1 -1
- package/dist/pageEvalArguments.js +1 -1
- package/dist/plugin.d.ts +1 -0
- package/dist/plugin.js +1 -0
- package/dist/pluginModelSessionWorker.d.ts +2 -2
- package/dist/plugins/clients/pluginHostConnection.d.ts +1 -1
- package/dist/plugins/clients/pluginHostConnection.js +1 -1
- package/dist/plugins/clients/pluginModels.d.ts +3 -3
- package/dist/plugins/clients/pluginPages.d.ts +2 -2
- package/dist/plugins/clients/pluginState.d.ts +2 -2
- package/dist/plugins/clients/pluginTasks.d.ts +3 -3
- package/dist/plugins/clients/pluginTasks.js +1 -1
- package/dist/plugins/officialPluginCatalog.d.ts +18 -21
- package/dist/plugins/officialPluginCatalog.js +120 -24
- package/dist/plugins/officialPluginInstaller.js +6 -1
- package/dist/plugins/pluginRegistry.d.ts +1 -1
- package/dist/plugins/pluginRegistry.js +2 -2
- package/dist/plugins/pluginTaskProtocol.d.ts +1 -1
- package/dist/plugins/runtime/pluginDiagnostics.d.ts +3 -3
- package/dist/plugins/runtime/pluginDiagnostics.js +2 -2
- package/dist/plugins/runtime/pluginExecution.d.ts +2 -2
- package/dist/plugins/runtime/pluginExecutor.d.ts +1 -1
- package/dist/plugins/runtime/pluginExecutorProtocol.d.ts +2 -2
- package/dist/plugins/runtime/pluginHost.d.ts +2 -2
- package/dist/plugins/runtime/pluginHostServer.js +1 -1
- package/dist/plugins/runtime/pluginModelCatalog.d.ts +1 -1
- package/dist/plugins/runtime/pluginPageManager.d.ts +3 -3
- package/dist/plugins/runtime/pluginPageManager.js +2 -2
- package/dist/plugins/runtime/pluginRevision.js +2 -1
- package/dist/plugins/runtime/pluginStateManager.d.ts +1 -1
- package/dist/plugins/runtime/pluginStateStore.d.ts +1 -1
- package/dist/plugins/runtime/pluginTaskManager.d.ts +10 -10
- package/dist/plugins/runtime/pluginTaskManager.js +1 -1
- package/dist/plugins/runtime/pluginTaskStore.d.ts +3 -3
- package/dist/plugins/runtime/pluginTaskStore.js +1 -1
- package/dist/plugins/runtime/pythonPlugin.d.ts +1 -1
- package/dist/plugins/sdk/plugin.d.ts +9 -12
- package/dist/plugins/sdk/plugin.js +4 -7
- package/dist/plugins/sdk/pluginAppProfiles.d.ts +1 -1
- package/dist/plugins/sdk/pluginAppProfiles.js +1 -1
- package/dist/plugins/sdk/pluginModelDefinition.d.ts +1 -1
- package/dist/plugins/sdk/pluginPageDefinition.d.ts +1 -1
- package/dist/plugins/sdk/pluginPageDefinition.js +1 -1
- package/dist/plugins/sdk/pluginRecoveryDefinition.d.ts +1 -1
- package/dist/plugins/sdk/pluginStateDefinition.d.ts +2 -2
- package/dist/plugins/skillManifest.d.ts +10 -0
- package/dist/plugins/skillManifest.js +56 -0
- package/dist/socket.d.ts +2 -0
- package/dist/socket.js +13 -3
- package/dist/unified.d.ts +1 -1
- package/dist/unified.js +1 -1
- package/package.json +9 -8
- package/dist/generated/app-profile-definition.d.ts +0 -130
- package/dist/generated/app-profile-definition.js +0 -458
- package/dist/generated/app-profile-runtime-types.d.ts +0 -213
- package/dist/generated/app-profile-runtime-types.js +0 -1
- package/dist/generated/browser-action-protocol.d.ts +0 -1147
- package/dist/generated/browser-action-protocol.js +0 -283
- package/dist/generated/plugin-diagnostics.d.ts +0 -110
- package/dist/generated/plugin-diagnostics.js +0 -1
- package/dist/generated/plugin-execution.d.ts +0 -27
- package/dist/generated/plugin-execution.js +0 -1
- package/dist/generated/plugin-models.d.ts +0 -64
- package/dist/generated/plugin-models.js +0 -1
- package/dist/generated/plugin-pages.d.ts +0 -76
- package/dist/generated/plugin-pages.js +0 -59
- package/dist/generated/plugin-recovery.d.ts +0 -32
- package/dist/generated/plugin-recovery.js +0 -1
- package/dist/generated/plugin-state.d.ts +0 -50
- package/dist/generated/plugin-state.js +0 -1
- package/dist/generated/plugin-tasks.d.ts +0 -74
- package/dist/generated/plugin-tasks.js +0 -7
- package/dist/generated/toolbox-icon.d.ts +0 -10
- package/dist/generated/toolbox-icon.js +0 -37
|
@@ -1,1147 +0,0 @@
|
|
|
1
|
-
export interface GetRequestsParams {
|
|
2
|
-
tabId: number;
|
|
3
|
-
count?: number;
|
|
4
|
-
filter?: string;
|
|
5
|
-
/** Relative time window in seconds. */
|
|
6
|
-
since?: number;
|
|
7
|
-
/** Opaque cursor returned by tab_checkpoint or a previous query. */
|
|
8
|
-
after?: string;
|
|
9
|
-
/** Defaults to false when fields are selected, otherwise true. */
|
|
10
|
-
includeBody?: boolean;
|
|
11
|
-
includeHeaders?: boolean;
|
|
12
|
-
maxBodySize?: number;
|
|
13
|
-
fields?: string[];
|
|
14
|
-
keysOnly?: boolean;
|
|
15
|
-
applyHiddenFilter?: boolean;
|
|
16
|
-
source?: 'mtop' | 'requests' | 'all';
|
|
17
|
-
}
|
|
18
|
-
export interface GetLogsParams {
|
|
19
|
-
tabId: number;
|
|
20
|
-
level?: 'log' | 'warn' | 'error' | 'info' | 'all';
|
|
21
|
-
/** Relative time window in seconds. */
|
|
22
|
-
since?: number;
|
|
23
|
-
/** Opaque cursor returned by tab_checkpoint or a previous query. */
|
|
24
|
-
after?: string;
|
|
25
|
-
limit?: number;
|
|
26
|
-
filter?: string;
|
|
27
|
-
}
|
|
28
|
-
export interface CaptureCheckpointParams {
|
|
29
|
-
tabId: number;
|
|
30
|
-
}
|
|
31
|
-
export interface CaptureCheckpointResult {
|
|
32
|
-
tabId: number;
|
|
33
|
-
cursor: string;
|
|
34
|
-
timestampMs: number;
|
|
35
|
-
captureStatus: 'armed' | 'active';
|
|
36
|
-
}
|
|
37
|
-
export interface GetEventsParams {
|
|
38
|
-
tabId: number;
|
|
39
|
-
source?: 'rum' | 'aplus' | 'arms' | 'all';
|
|
40
|
-
event_type?: string;
|
|
41
|
-
filter?: string;
|
|
42
|
-
since?: number;
|
|
43
|
-
/** Opaque cursor returned by tab_checkpoint or a previous event query. */
|
|
44
|
-
after?: string;
|
|
45
|
-
limit?: number;
|
|
46
|
-
includeRaw?: boolean;
|
|
47
|
-
}
|
|
48
|
-
export interface SetMockParams {
|
|
49
|
-
tabId: number;
|
|
50
|
-
apiName: string;
|
|
51
|
-
mockData?: unknown;
|
|
52
|
-
fields?: Array<{
|
|
53
|
-
path: string;
|
|
54
|
-
value: unknown;
|
|
55
|
-
}>;
|
|
56
|
-
enabled?: boolean;
|
|
57
|
-
duration?: number;
|
|
58
|
-
conditions?: Record<string, unknown>;
|
|
59
|
-
}
|
|
60
|
-
export interface GetMocksParams {
|
|
61
|
-
tabId: number;
|
|
62
|
-
apiName?: string;
|
|
63
|
-
}
|
|
64
|
-
export declare const SEND_REQUEST_MAX_FILES = 20;
|
|
65
|
-
export declare const SEND_REQUEST_MAX_TOTAL_FILE_BYTES: number;
|
|
66
|
-
export declare const SEND_REQUEST_MAX_TOTAL_BASE64_FILE_BYTES: number;
|
|
67
|
-
export type SendRequestFormValue = string | number | boolean;
|
|
68
|
-
interface SendRequestFileMetadata {
|
|
69
|
-
/** multipart/form-data field name. */
|
|
70
|
-
fieldName: string;
|
|
71
|
-
/** Defaults to a MIME type inferred from filename, then application/octet-stream. */
|
|
72
|
-
contentType?: string;
|
|
73
|
-
}
|
|
74
|
-
export type SendRequestFile = SendRequestFileMetadata & ({
|
|
75
|
-
/** Absolute path on the machine running Mearl native-host. */
|
|
76
|
-
filePath: string;
|
|
77
|
-
base64?: never;
|
|
78
|
-
/** Defaults to the basename of filePath. */
|
|
79
|
-
filename?: string;
|
|
80
|
-
} | {
|
|
81
|
-
filePath?: never;
|
|
82
|
-
/** Base64 payload; decoded Base64-backed files are limited to 7 MiB total. */
|
|
83
|
-
base64: string;
|
|
84
|
-
/** Multipart filename for the Base64 payload. */
|
|
85
|
-
filename: string;
|
|
86
|
-
});
|
|
87
|
-
export type SendRequestBinaryBody = {
|
|
88
|
-
contentType?: string;
|
|
89
|
-
} & ({
|
|
90
|
-
filePath: string;
|
|
91
|
-
base64?: never;
|
|
92
|
-
} | {
|
|
93
|
-
filePath?: never;
|
|
94
|
-
base64: string;
|
|
95
|
-
});
|
|
96
|
-
export interface SendRequestParams {
|
|
97
|
-
url: string;
|
|
98
|
-
method?: string;
|
|
99
|
-
headers?: Record<string, string>;
|
|
100
|
-
params?: Record<string, string>;
|
|
101
|
-
body?: unknown;
|
|
102
|
-
/** Raw bytes, mutually exclusive with body, formData and files. */
|
|
103
|
-
bodyFile?: SendRequestBinaryBody;
|
|
104
|
-
formData?: Record<string, SendRequestFormValue>;
|
|
105
|
-
files?: SendRequestFile[];
|
|
106
|
-
withCookies?: boolean;
|
|
107
|
-
responseType?: 'json' | 'text' | 'auto';
|
|
108
|
-
timeout?: number;
|
|
109
|
-
}
|
|
110
|
-
export type MtopEnvironmentTarget = 'prod' | 'pre';
|
|
111
|
-
export type MtopEnvironment = 'default' | MtopEnvironmentTarget;
|
|
112
|
-
export interface SendMtopRequestParams {
|
|
113
|
-
api: string;
|
|
114
|
-
data?: unknown;
|
|
115
|
-
version?: string;
|
|
116
|
-
method?: string;
|
|
117
|
-
appKey?: string;
|
|
118
|
-
env?: MtopEnvironmentTarget;
|
|
119
|
-
timeout?: number;
|
|
120
|
-
headers?: Record<string, string>;
|
|
121
|
-
ttid?: string;
|
|
122
|
-
}
|
|
123
|
-
export type BrowserStatus = 'connected' | 'pairing' | 'running_disconnected' | 'stopped';
|
|
124
|
-
export type BrowserTransport = 'extension' | 'cdp' | 'provider';
|
|
125
|
-
export interface BrowserPairingInfo {
|
|
126
|
-
kind: 'qr';
|
|
127
|
-
url: string;
|
|
128
|
-
/** Optional human-readable or provider-specific pairing code. */
|
|
129
|
-
code?: string;
|
|
130
|
-
label?: string;
|
|
131
|
-
}
|
|
132
|
-
export interface BrowserSource {
|
|
133
|
-
kind: 'local' | 'remote';
|
|
134
|
-
connectorId?: string;
|
|
135
|
-
connectorName?: string;
|
|
136
|
-
}
|
|
137
|
-
export type BrowserJsonPrimitive = string | number | boolean | null;
|
|
138
|
-
export type BrowserJsonValue = BrowserJsonPrimitive | BrowserJsonValue[] | {
|
|
139
|
-
[key: string]: BrowserJsonValue;
|
|
140
|
-
};
|
|
141
|
-
export type BrowserProviderOperation = 'start' | 'close' | 'detach' | 'deleteData' | 'access' | 'syncCookies';
|
|
142
|
-
export interface BrowserProviderIdentity {
|
|
143
|
-
id: string;
|
|
144
|
-
name: string;
|
|
145
|
-
builtin: boolean;
|
|
146
|
-
version?: string;
|
|
147
|
-
protocolVersion?: number;
|
|
148
|
-
}
|
|
149
|
-
/** Common safe metadata; additional Provider-specific keys must also be non-secret JSON. */
|
|
150
|
-
export type BrowserDetails = Record<string, BrowserJsonValue> & {
|
|
151
|
-
headless?: boolean;
|
|
152
|
-
createdAt?: string;
|
|
153
|
-
cdpPort?: number;
|
|
154
|
-
copiedCookies?: {
|
|
155
|
-
domains: string[];
|
|
156
|
-
count: number;
|
|
157
|
-
};
|
|
158
|
-
};
|
|
159
|
-
export interface BrowserReference {
|
|
160
|
-
kind: string;
|
|
161
|
-
id: string;
|
|
162
|
-
label?: string;
|
|
163
|
-
}
|
|
164
|
-
export interface BrowserInfoBase {
|
|
165
|
-
browserId: string;
|
|
166
|
-
name: string;
|
|
167
|
-
status: BrowserStatus;
|
|
168
|
-
/** Source-local values retained when the unified client returns a global browser id and label. */
|
|
169
|
-
originalBrowserId?: string;
|
|
170
|
-
originalName?: string;
|
|
171
|
-
source?: BrowserSource;
|
|
172
|
-
extensionVersion?: string;
|
|
173
|
-
nativeHostVersion?: string;
|
|
174
|
-
transport?: BrowserTransport;
|
|
175
|
-
/** Provider identity, independent from the browser control transport. */
|
|
176
|
-
provider?: BrowserProviderIdentity;
|
|
177
|
-
ownership?: 'owned' | 'attached';
|
|
178
|
-
persistence?: 'ephemeral' | 'persistent';
|
|
179
|
-
operations?: BrowserProviderOperation[];
|
|
180
|
-
references?: BrowserReference[];
|
|
181
|
-
/** Safe, non-secret metadata suitable for display and remote connectors. */
|
|
182
|
-
details?: BrowserDetails;
|
|
183
|
-
/** Setup information exposed by a provider while it waits for an external device. */
|
|
184
|
-
pairing?: BrowserPairingInfo;
|
|
185
|
-
}
|
|
186
|
-
export type BrowserScreenshotKind = 'native' | 'reconstructed' | 'none';
|
|
187
|
-
/** Browser-targeted actions that an external provider may implement. */
|
|
188
|
-
export type BrowserCapabilityAction = ExtensionBrowserAction | 'page_download';
|
|
189
|
-
/** Capabilities advertised by an external browser-control provider. */
|
|
190
|
-
export interface BrowserCapabilities {
|
|
191
|
-
actions: BrowserCapabilityAction[];
|
|
192
|
-
/** Pixel fidelity of page_screenshot, or none when that action is unavailable. */
|
|
193
|
-
screenshot: BrowserScreenshotKind;
|
|
194
|
-
}
|
|
195
|
-
export interface RegularBrowserInfo extends BrowserInfoBase {
|
|
196
|
-
type: 'regular';
|
|
197
|
-
status: 'connected' | 'pairing';
|
|
198
|
-
}
|
|
199
|
-
export interface ManagedBrowserInfo extends BrowserInfoBase {
|
|
200
|
-
type: 'managed';
|
|
201
|
-
status: 'connected' | 'pairing' | 'running_disconnected' | 'stopped';
|
|
202
|
-
provider: BrowserProviderIdentity;
|
|
203
|
-
persistence: 'ephemeral' | 'persistent';
|
|
204
|
-
operations: BrowserProviderOperation[];
|
|
205
|
-
}
|
|
206
|
-
export type BrowserInfo = RegularBrowserInfo | ManagedBrowserInfo;
|
|
207
|
-
export interface BrowserListResult {
|
|
208
|
-
count: number;
|
|
209
|
-
connectedCount: number;
|
|
210
|
-
defaultBrowserId: string | null;
|
|
211
|
-
browsers: BrowserInfo[];
|
|
212
|
-
/** Partial discovery failures; successfully inspected browser sources remain in the result. */
|
|
213
|
-
warnings?: string[];
|
|
214
|
-
}
|
|
215
|
-
export interface SelectBrowserParams {
|
|
216
|
-
browser?: string;
|
|
217
|
-
}
|
|
218
|
-
export interface SelectBrowserResult {
|
|
219
|
-
selected: {
|
|
220
|
-
browserId: string;
|
|
221
|
-
name: string;
|
|
222
|
-
} | null;
|
|
223
|
-
note?: string;
|
|
224
|
-
}
|
|
225
|
-
export interface BrowserReleaseFailure {
|
|
226
|
-
tabId: number;
|
|
227
|
-
stage: string;
|
|
228
|
-
error: string;
|
|
229
|
-
}
|
|
230
|
-
export interface BrowserReleaseResult {
|
|
231
|
-
released: boolean;
|
|
232
|
-
hadActiveControl: boolean;
|
|
233
|
-
transports: BrowserTransport[];
|
|
234
|
-
affectedTabIds: number[];
|
|
235
|
-
failures?: BrowserReleaseFailure[];
|
|
236
|
-
}
|
|
237
|
-
export interface ControlSessionInfo {
|
|
238
|
-
sessionId: string;
|
|
239
|
-
browserId: string;
|
|
240
|
-
transport: BrowserTransport;
|
|
241
|
-
status: 'active' | 'user' | 'releasing' | 'released';
|
|
242
|
-
generation: number;
|
|
243
|
-
tabs: Array<{
|
|
244
|
-
tabId: number;
|
|
245
|
-
source: 'created' | 'attached';
|
|
246
|
-
title?: string;
|
|
247
|
-
url?: string;
|
|
248
|
-
}>;
|
|
249
|
-
reason?: string;
|
|
250
|
-
}
|
|
251
|
-
export interface BrowserReleaseParams {
|
|
252
|
-
/** Close only session-created pages; attached user pages are protected. */
|
|
253
|
-
closeCreatedTabs?: boolean;
|
|
254
|
-
keepTabIds?: number[];
|
|
255
|
-
/** Preserve the browser environment by default for a scoped release. */
|
|
256
|
-
preserveEnvironment?: boolean;
|
|
257
|
-
keepArtifactIds?: string[];
|
|
258
|
-
}
|
|
259
|
-
export interface BrowserControlParams {
|
|
260
|
-
operation: 'handoff' | 'resume';
|
|
261
|
-
tabId?: number;
|
|
262
|
-
reason?: string;
|
|
263
|
-
}
|
|
264
|
-
export interface BrowserArtifact {
|
|
265
|
-
artifactId: string;
|
|
266
|
-
filename: string;
|
|
267
|
-
bytes: number;
|
|
268
|
-
location: 'browser';
|
|
269
|
-
/** Global browser route is attached by the unified client. */
|
|
270
|
-
browserId?: string;
|
|
271
|
-
}
|
|
272
|
-
export interface PageDownloadParams {
|
|
273
|
-
tabId: number;
|
|
274
|
-
trigger: Omit<PageClickParams, 'tabId'>;
|
|
275
|
-
/** Restrict the expected download URL; useful when the browser cannot identify its source. */
|
|
276
|
-
url?: string;
|
|
277
|
-
timeout?: number;
|
|
278
|
-
}
|
|
279
|
-
export interface PageDownloadResult {
|
|
280
|
-
download: BrowserArtifact;
|
|
281
|
-
action: unknown;
|
|
282
|
-
}
|
|
283
|
-
export interface CookieCopyScope {
|
|
284
|
-
/** Maintained authentication-domain presets to include. */
|
|
285
|
-
presets?: Array<'mearl-services'>;
|
|
286
|
-
/** Additional domains or URLs to copy alongside the selected presets. */
|
|
287
|
-
domains?: string[];
|
|
288
|
-
}
|
|
289
|
-
export interface BrowserLaunchParams {
|
|
290
|
-
/** Required by the built-in local Provider. */
|
|
291
|
-
name?: string;
|
|
292
|
-
/** Built-in runtime or the id of a registered external Provider. */
|
|
293
|
-
provider?: string;
|
|
294
|
-
/** Structured launch parameters declared by the selected Provider. Cannot be mixed with flat options. */
|
|
295
|
-
providerOptions?: Record<string, BrowserJsonValue>;
|
|
296
|
-
/** Whether the built-in local Chrome uses headless mode. Defaults to true. */
|
|
297
|
-
headless?: boolean;
|
|
298
|
-
/** Desktop mode uses a user agent matching the local Chrome version. */
|
|
299
|
-
userAgentMode?: 'default' | 'desktop';
|
|
300
|
-
persistent?: boolean;
|
|
301
|
-
executablePath?: string;
|
|
302
|
-
url?: string;
|
|
303
|
-
/** Copy explicit domains, the Mearl-service preset, or a combination of both. */
|
|
304
|
-
copyCookieDomains?: string[] | 'mearl-services' | CookieCopyScope;
|
|
305
|
-
}
|
|
306
|
-
export interface BrowserCloseParams {
|
|
307
|
-
browser: string;
|
|
308
|
-
deleteProfile?: boolean;
|
|
309
|
-
}
|
|
310
|
-
interface BrowserProviderSchemaBase {
|
|
311
|
-
title?: string;
|
|
312
|
-
description?: string;
|
|
313
|
-
default?: BrowserJsonValue;
|
|
314
|
-
/** Optional Mearl form component used to edit this schema value. */
|
|
315
|
-
component?: 'cookie-sync' | 'switch';
|
|
316
|
-
/** Presentation-only default used by Mearl forms without changing runtime semantics. */
|
|
317
|
-
formDefault?: BrowserJsonValue;
|
|
318
|
-
/** Excludes an advanced runtime option from generated Mearl forms. */
|
|
319
|
-
formHidden?: boolean;
|
|
320
|
-
/** Places compact fields side by side in generated Mearl forms. */
|
|
321
|
-
formWidth?: 'half' | 'full';
|
|
322
|
-
/** Hides the optional badge without changing schema validation. */
|
|
323
|
-
formHideOptional?: boolean;
|
|
324
|
-
/** Conditionally displays and submits this field based on another form value. */
|
|
325
|
-
formVisibleWhen?: {
|
|
326
|
-
field: string;
|
|
327
|
-
empty: boolean;
|
|
328
|
-
};
|
|
329
|
-
}
|
|
330
|
-
export type BrowserProviderInputSchema = (BrowserProviderSchemaBase & {
|
|
331
|
-
type: 'string';
|
|
332
|
-
secret?: boolean;
|
|
333
|
-
enum?: readonly string[];
|
|
334
|
-
minLength?: number;
|
|
335
|
-
maxLength?: number;
|
|
336
|
-
pattern?: string;
|
|
337
|
-
placeholder?: string;
|
|
338
|
-
options?: readonly {
|
|
339
|
-
value: string;
|
|
340
|
-
label: string;
|
|
341
|
-
description?: string;
|
|
342
|
-
disabled?: boolean;
|
|
343
|
-
}[];
|
|
344
|
-
}) | (BrowserProviderSchemaBase & {
|
|
345
|
-
type: 'number';
|
|
346
|
-
integer?: boolean;
|
|
347
|
-
minimum?: number;
|
|
348
|
-
maximum?: number;
|
|
349
|
-
}) | (BrowserProviderSchemaBase & {
|
|
350
|
-
type: 'boolean';
|
|
351
|
-
}) | (BrowserProviderSchemaBase & {
|
|
352
|
-
type: 'array';
|
|
353
|
-
items: BrowserProviderInputSchema;
|
|
354
|
-
minItems?: number;
|
|
355
|
-
maxItems?: number;
|
|
356
|
-
}) | BrowserProviderObjectSchema;
|
|
357
|
-
export interface BrowserProviderObjectSchema extends BrowserProviderSchemaBase {
|
|
358
|
-
type: 'object';
|
|
359
|
-
properties: Record<string, BrowserProviderInputSchema>;
|
|
360
|
-
required?: readonly string[];
|
|
361
|
-
oneOf?: readonly BrowserProviderObjectSchema[];
|
|
362
|
-
not?: BrowserProviderObjectSchema;
|
|
363
|
-
additionalProperties?: boolean;
|
|
364
|
-
}
|
|
365
|
-
export interface BrowserProviderDefinition {
|
|
366
|
-
provider: BrowserProviderIdentity;
|
|
367
|
-
browserType: {
|
|
368
|
-
name: string;
|
|
369
|
-
documentationUrl?: string;
|
|
370
|
-
inputSchema: BrowserProviderObjectSchema;
|
|
371
|
-
configuration?: {
|
|
372
|
-
inputSchema: BrowserProviderObjectSchema;
|
|
373
|
-
};
|
|
374
|
-
dynamicLaunchForm?: boolean;
|
|
375
|
-
launchForm?: BrowserProviderLaunchForm;
|
|
376
|
-
};
|
|
377
|
-
}
|
|
378
|
-
export interface BrowserProviderLaunchFormVariant {
|
|
379
|
-
id: string;
|
|
380
|
-
title: string;
|
|
381
|
-
description?: string;
|
|
382
|
-
inputSchema?: BrowserProviderObjectSchema;
|
|
383
|
-
values?: Record<string, BrowserJsonValue>;
|
|
384
|
-
refreshOn?: readonly string[];
|
|
385
|
-
dynamicFields?: readonly string[];
|
|
386
|
-
}
|
|
387
|
-
export interface BrowserProviderLaunchForm {
|
|
388
|
-
inputSchema: BrowserProviderObjectSchema;
|
|
389
|
-
variants?: readonly BrowserProviderLaunchFormVariant[];
|
|
390
|
-
variant?: string;
|
|
391
|
-
values?: Record<string, BrowserJsonValue>;
|
|
392
|
-
refreshOn?: readonly string[];
|
|
393
|
-
dynamicFields?: readonly string[];
|
|
394
|
-
message?: string;
|
|
395
|
-
blocked?: boolean;
|
|
396
|
-
}
|
|
397
|
-
export interface BrowserProviderListResult {
|
|
398
|
-
providers: BrowserProviderDefinition[];
|
|
399
|
-
}
|
|
400
|
-
export interface BrowserAccessResult {
|
|
401
|
-
browserAccess: {
|
|
402
|
-
kind: string;
|
|
403
|
-
url: string;
|
|
404
|
-
sensitive: true;
|
|
405
|
-
};
|
|
406
|
-
}
|
|
407
|
-
export interface AddRuleParams {
|
|
408
|
-
enabled?: true;
|
|
409
|
-
actionType: 'redirect' | 'block' | 'allow' | 'upgradeScheme' | 'modifyHeaders';
|
|
410
|
-
filter: string;
|
|
411
|
-
redirectUrl?: string;
|
|
412
|
-
requestHeaders?: Array<{
|
|
413
|
-
header: string;
|
|
414
|
-
operation: 'set' | 'append' | 'remove';
|
|
415
|
-
value?: string;
|
|
416
|
-
}>;
|
|
417
|
-
responseHeaders?: Array<{
|
|
418
|
-
header: string;
|
|
419
|
-
operation: 'set' | 'append' | 'remove';
|
|
420
|
-
value?: string;
|
|
421
|
-
}>;
|
|
422
|
-
initiatorDomains?: string;
|
|
423
|
-
resourceTypes?: string[];
|
|
424
|
-
priority?: number;
|
|
425
|
-
description?: string;
|
|
426
|
-
}
|
|
427
|
-
export interface DeleteRuleParams {
|
|
428
|
-
enabled: false;
|
|
429
|
-
ruleId: number;
|
|
430
|
-
}
|
|
431
|
-
export type SetRuleParams = AddRuleParams | DeleteRuleParams;
|
|
432
|
-
export interface RulesResult {
|
|
433
|
-
enabled: boolean;
|
|
434
|
-
rules: Array<Record<string, unknown>>;
|
|
435
|
-
}
|
|
436
|
-
export interface PageScreenshotParams {
|
|
437
|
-
tabId: number;
|
|
438
|
-
selector?: string;
|
|
439
|
-
format?: 'png' | 'jpeg';
|
|
440
|
-
quality?: number;
|
|
441
|
-
captureMode?: 'cdp' | 'visible';
|
|
442
|
-
}
|
|
443
|
-
export declare const BROWSER_DEVICE_PRESET_NAMES: readonly ["iphone-duo-folded", "iphone-duo-unfolded", "iphone-17-pro", "iphone-17e", "pixel-11", "ipad-mini-a17-pro", "galaxy-s26", "pura-x-max", "iphone-15-pro", "iphone-se", "pixel-8", "ipad-mini", "galaxy-s23"];
|
|
444
|
-
export type BrowserDevicePresetName = (typeof BROWSER_DEVICE_PRESET_NAMES)[number];
|
|
445
|
-
export interface BrowserEmulationOptions {
|
|
446
|
-
preset?: BrowserDevicePresetName;
|
|
447
|
-
width?: number;
|
|
448
|
-
height?: number;
|
|
449
|
-
deviceScaleFactor?: number;
|
|
450
|
-
scale?: number;
|
|
451
|
-
mobile?: boolean;
|
|
452
|
-
userAgent?: string;
|
|
453
|
-
orientation?: 'portrait' | 'landscape';
|
|
454
|
-
touch?: boolean;
|
|
455
|
-
/** 在 iframe WebView 外渲染设备系统栏;默认 false,保持纯 CDP 设备模拟。 */
|
|
456
|
-
deviceShell?: boolean;
|
|
457
|
-
/** App 容器横屏时将根页面与业务页面分置左右 WebView;仅与 deviceShell、App 档案同时生效。 */
|
|
458
|
-
splitScreen?: boolean;
|
|
459
|
-
}
|
|
460
|
-
export type AppBridgeConfigBehavior = 'navigate' | 'closeAll' | 'closeBackData' | 'postMessage' | 'notifySubscribe' | 'notifyUnsubscribe' | 'notifyPost' | 'sharedFileRead' | 'sharedFileWrite' | 'sharedDataGet' | 'sharedDataSet' | 'legacyBroadcastCreate' | 'legacyBroadcastPost' | 'legacyBroadcastClose' | 'memoryGet' | 'memorySet' | 'memoryDelete' | 'availabilityMap' | 'userInfo' | 'authCode' | 'networkInfo' | 'geolocation' | 'permission' | 'imagePicker' | 'prefetch' | 'fptTrack' | 'mtopStream' | 'previewFile' | 'toast' | 'unsupportedNativeInput' | 'payment' | 'userTrack' | 'calendar' | 'networkQualityMonitor' | 'beaconRequest' | 'voiceRecognition';
|
|
461
|
-
/** 单个桥方法的声明式覆盖;行为、固定回包、成功空实现三选一。 */
|
|
462
|
-
export interface AppBridgeMethodConfig {
|
|
463
|
-
behavior?: AppBridgeConfigBehavior;
|
|
464
|
-
response?: unknown;
|
|
465
|
-
noop?: boolean;
|
|
466
|
-
silent?: boolean;
|
|
467
|
-
}
|
|
468
|
-
/** 追加或覆盖 App 档案中的桥方法。配置保持 JSON 可序列化,不执行配置提供的代码。 */
|
|
469
|
-
export interface AppBridgeConfig {
|
|
470
|
-
methods: Record<string, AppBridgeMethodConfig>;
|
|
471
|
-
}
|
|
472
|
-
export interface TabOpenParams {
|
|
473
|
-
url: string;
|
|
474
|
-
active?: boolean;
|
|
475
|
-
/** Source tab whose Agent conversation should own the opened or reused tab. */
|
|
476
|
-
openerTabId?: number;
|
|
477
|
-
closeExisting?: boolean;
|
|
478
|
-
reuse?: 'never' | 'prefer' | 'require';
|
|
479
|
-
match?: {
|
|
480
|
-
urlPattern?: string;
|
|
481
|
-
ignoreSearch?: boolean;
|
|
482
|
-
ignoreHash?: boolean;
|
|
483
|
-
onMultiple?: 'error' | 'first';
|
|
484
|
-
};
|
|
485
|
-
restoreFocusOnClose?: boolean;
|
|
486
|
-
emulation?: BrowserEmulationOptions;
|
|
487
|
-
group?: string;
|
|
488
|
-
/**
|
|
489
|
-
* 客户端容器模拟档案名(如 'fliggy')。只注入容器 UA、环境变量、JSBridge 与桥协议;
|
|
490
|
-
* 设备视口和 iframe 系统外壳由 emulation.deviceShell 独立控制。可用档案见 APP_PROFILE_NAMES。
|
|
491
|
-
*/
|
|
492
|
-
appProfile?: AppProfileName;
|
|
493
|
-
/** 与 appProfile 配合使用;容器系统,默认 ios */
|
|
494
|
-
os?: 'ios' | 'android';
|
|
495
|
-
/** 与 appProfile 配合使用;按方法覆盖档案内置桥配置 */
|
|
496
|
-
bridgeConfig?: AppBridgeConfig;
|
|
497
|
-
}
|
|
498
|
-
export type TabGroupParams = {
|
|
499
|
-
tabIds: number[];
|
|
500
|
-
title: string;
|
|
501
|
-
ungroup?: false;
|
|
502
|
-
} | {
|
|
503
|
-
tabIds: number[];
|
|
504
|
-
ungroup: true;
|
|
505
|
-
title?: never;
|
|
506
|
-
};
|
|
507
|
-
/**
|
|
508
|
-
* 客户端容器模拟可用档案名。
|
|
509
|
-
*
|
|
510
|
-
* 档案数据(UA / 桥对象 / 方法映射)在 @mearl/app-profiles 维护,但名单属于协议:
|
|
511
|
-
* 它是 set_app_profile.profile 与 tab_open.appProfile 的取值域,CLI 帮助与 MCP 工具
|
|
512
|
-
* schema 的 enum 也由它生成。app-profiles 反向引用本清单约束自己的档案表,
|
|
513
|
-
* 因此新增档案时只需改两处(名单 + 档案数据),且漏改会在类型检查时暴露。
|
|
514
|
-
*/
|
|
515
|
-
export declare const APP_PROFILE_NAMES: readonly ["fliggy", "taobao", "wechat", "tmall", "alipay", "koubei", "taobao-tj", "taobao-live", "xianyu", "etao", "eleme", "damai", "btrip", "amap", "qianwen", "lingyou", "didi", "easybike"];
|
|
516
|
-
export type BuiltinAppProfileName = (typeof APP_PROFILE_NAMES)[number];
|
|
517
|
-
export type AppProfileName = BuiltinAppProfileName | `${string}/${string}`;
|
|
518
|
-
export interface SetAppProfileParams {
|
|
519
|
-
tabId: number;
|
|
520
|
-
/** false 时清除该 tab 的容器模拟并刷新 */
|
|
521
|
-
enabled: boolean;
|
|
522
|
-
/** 容器档案名(enabled=true 时必填) */
|
|
523
|
-
profile?: AppProfileName;
|
|
524
|
-
/** Immediately use the latest installed definition while preserving explicit options. */
|
|
525
|
-
refreshDefinition?: boolean;
|
|
526
|
-
/** 固定当前档案定义;默认在下次文档导航时自动采用可用更新。 */
|
|
527
|
-
lockDefinition?: boolean;
|
|
528
|
-
os?: 'ios' | 'android';
|
|
529
|
-
appVersion?: string;
|
|
530
|
-
/** 端定义支持的语言选项。 */
|
|
531
|
-
language?: string;
|
|
532
|
-
deviceModel?: string;
|
|
533
|
-
/** 按方法覆盖档案内置桥配置,仅支持受控行为、固定 JSON 回包和成功空实现 */
|
|
534
|
-
bridgeConfig?: AppBridgeConfig;
|
|
535
|
-
/**
|
|
536
|
-
* 可选 MTop 接口环境。default 关闭环境改写;省略时保持当前设置。
|
|
537
|
-
* 扩展模式与插件设置页共享并全局生效;CDP 模式仅作用于目标 tab。
|
|
538
|
-
*/
|
|
539
|
-
mtopEnv?: MtopEnvironment;
|
|
540
|
-
/**
|
|
541
|
-
* 可选设备联动参数。传入时显式字段覆盖档案推荐设备,空对象使用推荐设备且默认开启
|
|
542
|
-
* deviceShell;省略时不设置或清除该 tab 的设备状态。
|
|
543
|
-
*/
|
|
544
|
-
emulation?: BrowserEmulationOptions;
|
|
545
|
-
/** 默认 true:应用/清除后刷新页面使注入生效 */
|
|
546
|
-
reload?: boolean;
|
|
547
|
-
}
|
|
548
|
-
export interface TabCloseParams {
|
|
549
|
-
tabId: number;
|
|
550
|
-
}
|
|
551
|
-
export interface PageObservationWaitOptions {
|
|
552
|
-
quietMs?: number;
|
|
553
|
-
firstChangeTimeoutMs?: number;
|
|
554
|
-
timeoutMs?: number;
|
|
555
|
-
navigationGraceMs?: number;
|
|
556
|
-
navigationTimeoutMs?: number;
|
|
557
|
-
networkIdleMs?: number;
|
|
558
|
-
contentReadyAfterMs?: number;
|
|
559
|
-
}
|
|
560
|
-
export interface PageDiagnosticsOptions {
|
|
561
|
-
logs?: boolean | Pick<GetLogsParams, 'level' | 'limit' | 'filter'>;
|
|
562
|
-
requests?: boolean | Pick<GetRequestsParams, 'count' | 'filter' | 'includeBody' | 'includeHeaders' | 'maxBodySize' | 'fields' | 'keysOnly' | 'source'>;
|
|
563
|
-
events?: boolean | Pick<GetEventsParams, 'source' | 'event_type' | 'filter' | 'limit' | 'includeRaw'>;
|
|
564
|
-
}
|
|
565
|
-
export type PageDiagnosticsSetting = PageDiagnosticsOptions | boolean;
|
|
566
|
-
export interface PageClickParams {
|
|
567
|
-
tabId: number;
|
|
568
|
-
selector?: string;
|
|
569
|
-
text?: string;
|
|
570
|
-
point?: {
|
|
571
|
-
x: number;
|
|
572
|
-
y: number;
|
|
573
|
-
};
|
|
574
|
-
/** CSS/text 查询的目标 frame;省略时容器模式自动使用当前业务 frame。 */
|
|
575
|
-
frameId?: string;
|
|
576
|
-
/** point 的坐标空间;默认 outer-viewport 以保持兼容。 */
|
|
577
|
-
coordinateSpace?: 'outer-viewport' | 'active-frame';
|
|
578
|
-
role?: string;
|
|
579
|
-
exact?: boolean;
|
|
580
|
-
scope?: string;
|
|
581
|
-
clickMode?: 'auto' | 'dom' | 'mouse' | 'touch';
|
|
582
|
-
observe?: PageObservationWaitOptions | false;
|
|
583
|
-
diagnostics?: PageDiagnosticsSetting;
|
|
584
|
-
}
|
|
585
|
-
export interface PageDragPoint {
|
|
586
|
-
x: number;
|
|
587
|
-
y: number;
|
|
588
|
-
}
|
|
589
|
-
export type PageDragEndpoint = string | PageDragPoint;
|
|
590
|
-
export interface PageDragParams {
|
|
591
|
-
tabId: number;
|
|
592
|
-
from: PageDragEndpoint;
|
|
593
|
-
to: PageDragEndpoint;
|
|
594
|
-
dragMode?: 'auto' | 'dom' | 'mouse' | 'touch';
|
|
595
|
-
durationMs?: number;
|
|
596
|
-
observe?: PageObservationWaitOptions | false;
|
|
597
|
-
diagnostics?: PageDiagnosticsSetting;
|
|
598
|
-
}
|
|
599
|
-
export interface PageTypeParams {
|
|
600
|
-
tabId: number;
|
|
601
|
-
selector: string;
|
|
602
|
-
text: string;
|
|
603
|
-
clearFirst?: boolean;
|
|
604
|
-
observe?: PageObservationWaitOptions | false;
|
|
605
|
-
diagnostics?: PageDiagnosticsSetting;
|
|
606
|
-
}
|
|
607
|
-
export interface PageScrollParams {
|
|
608
|
-
tabId: number;
|
|
609
|
-
direction: 'up' | 'down' | 'top' | 'bottom';
|
|
610
|
-
distance?: number;
|
|
611
|
-
selector?: string;
|
|
612
|
-
containerPolicy?: 'self' | 'nearest';
|
|
613
|
-
observe?: PageObservationWaitOptions | false;
|
|
614
|
-
diagnostics?: PageDiagnosticsSetting;
|
|
615
|
-
}
|
|
616
|
-
export interface PageHoverParams {
|
|
617
|
-
tabId: number;
|
|
618
|
-
selector: string;
|
|
619
|
-
observe?: PageObservationWaitOptions | false;
|
|
620
|
-
diagnostics?: PageDiagnosticsSetting;
|
|
621
|
-
}
|
|
622
|
-
export interface PageEvalParams {
|
|
623
|
-
tabId: number;
|
|
624
|
-
expression: string;
|
|
625
|
-
/** When provided, expression must evaluate to a function called with these JSON arguments. */
|
|
626
|
-
args?: unknown[];
|
|
627
|
-
frameId?: string;
|
|
628
|
-
awaitPromise?: boolean;
|
|
629
|
-
observe?: PageObservationWaitOptions | false;
|
|
630
|
-
diagnostics?: PageDiagnosticsSetting;
|
|
631
|
-
executionWorld?: 'main' | 'isolated';
|
|
632
|
-
worldId?: string;
|
|
633
|
-
}
|
|
634
|
-
export declare function resolvePageEvalExpression(params: Pick<PageEvalParams, 'expression' | 'args'>): string;
|
|
635
|
-
export interface PageUserScriptParams {
|
|
636
|
-
tabId: number;
|
|
637
|
-
worldId: string;
|
|
638
|
-
code: string;
|
|
639
|
-
}
|
|
640
|
-
export declare function validatePageUserScriptParams(params: PageUserScriptParams): void;
|
|
641
|
-
export interface PageSnapshotQuery {
|
|
642
|
-
text?: string;
|
|
643
|
-
role?: string;
|
|
644
|
-
exact?: boolean;
|
|
645
|
-
}
|
|
646
|
-
export interface PageSnapshotParams {
|
|
647
|
-
tabId: number;
|
|
648
|
-
depth?: number;
|
|
649
|
-
maxChars?: number;
|
|
650
|
-
maxNodes?: number;
|
|
651
|
-
rootSelector?: string;
|
|
652
|
-
rootRef?: string;
|
|
653
|
-
ancestorDepth?: number;
|
|
654
|
-
query?: PageSnapshotQuery;
|
|
655
|
-
mode?: 'full' | 'interactive' | 'viewport' | 'dom';
|
|
656
|
-
}
|
|
657
|
-
export type PageInspectFilter = 'all' | 'overflowing' | 'horizontal-overflow' | 'vertical-overflow' | 'scrollable';
|
|
658
|
-
export interface PageInspectParams {
|
|
659
|
-
tabId: number;
|
|
660
|
-
/** Native CSS selector, a page_snapshot @ref, or DevTools' current selection ($0). */
|
|
661
|
-
selector?: string;
|
|
662
|
-
/** Limit results after filtering. Defaults to 20, maximum 100. */
|
|
663
|
-
maxResults?: number;
|
|
664
|
-
/** Computed-style properties to return. Defaults to common layout properties. */
|
|
665
|
-
styles?: string[];
|
|
666
|
-
/** Page-wide or selector-scoped layout filter. Defaults to all. */
|
|
667
|
-
filter?: PageInspectFilter;
|
|
668
|
-
/** Include a trimmed outerHTML string for returned matches. Defaults to true for $0. */
|
|
669
|
-
includeOuterHTML?: boolean;
|
|
670
|
-
}
|
|
671
|
-
export interface PagePressParams {
|
|
672
|
-
tabId: number;
|
|
673
|
-
key: string;
|
|
674
|
-
modifiers?: string[];
|
|
675
|
-
/** Dispatch strategy. Auto uses DOM events when the page is hidden. */
|
|
676
|
-
pressMode?: 'auto' | 'dom' | 'keyboard';
|
|
677
|
-
observe?: PageObservationWaitOptions | false;
|
|
678
|
-
diagnostics?: PageDiagnosticsSetting;
|
|
679
|
-
}
|
|
680
|
-
export interface PageWaitParams {
|
|
681
|
-
tabId: number;
|
|
682
|
-
time?: number;
|
|
683
|
-
selector?: string;
|
|
684
|
-
state?: 'attached' | 'detached' | 'visible' | 'hidden';
|
|
685
|
-
text?: string;
|
|
686
|
-
exact?: boolean;
|
|
687
|
-
condition?: string;
|
|
688
|
-
timeout?: number;
|
|
689
|
-
interval?: number;
|
|
690
|
-
}
|
|
691
|
-
export interface PageNavigateParams {
|
|
692
|
-
tabId: number;
|
|
693
|
-
url?: string;
|
|
694
|
-
refresh?: boolean;
|
|
695
|
-
history?: 'back' | 'forward';
|
|
696
|
-
}
|
|
697
|
-
export interface PageUploadParams {
|
|
698
|
-
tabId: number;
|
|
699
|
-
selector: string;
|
|
700
|
-
/** Absolute paths available to the browser host. */
|
|
701
|
-
filePaths?: string[];
|
|
702
|
-
/** SDK/CLI stages caller-local files before dispatch. Mutually exclusive with filePaths. */
|
|
703
|
-
files?: Array<{
|
|
704
|
-
filePath: string;
|
|
705
|
-
} | {
|
|
706
|
-
artifactId: string;
|
|
707
|
-
}>;
|
|
708
|
-
observe?: PageObservationWaitOptions | false;
|
|
709
|
-
diagnostics?: PageDiagnosticsSetting;
|
|
710
|
-
}
|
|
711
|
-
export interface PageFramesParams {
|
|
712
|
-
tabId: number;
|
|
713
|
-
}
|
|
714
|
-
export interface SetDeviceEmulationParams extends BrowserEmulationOptions {
|
|
715
|
-
tabId: number;
|
|
716
|
-
enabled: boolean;
|
|
717
|
-
reload?: boolean;
|
|
718
|
-
}
|
|
719
|
-
export interface SetTimezoneParams {
|
|
720
|
-
tabId: number;
|
|
721
|
-
timezone: string;
|
|
722
|
-
}
|
|
723
|
-
export interface SetTimezoneResult {
|
|
724
|
-
enabled: boolean;
|
|
725
|
-
timezone: string | null;
|
|
726
|
-
}
|
|
727
|
-
export interface GetCookieParams {
|
|
728
|
-
/** Select the tab's cookie store; omitted for the browser's default store. */
|
|
729
|
-
tabId?: number;
|
|
730
|
-
name: string;
|
|
731
|
-
/** Cookie lookup URL; required without tabId, otherwise defaults to the tab URL. */
|
|
732
|
-
url?: string;
|
|
733
|
-
domain?: string;
|
|
734
|
-
path?: string;
|
|
735
|
-
}
|
|
736
|
-
export interface GetCookieResult {
|
|
737
|
-
tabId?: number;
|
|
738
|
-
url: string;
|
|
739
|
-
name: string;
|
|
740
|
-
found: boolean;
|
|
741
|
-
value?: string;
|
|
742
|
-
domain?: string;
|
|
743
|
-
path?: string;
|
|
744
|
-
}
|
|
745
|
-
export interface SetCookieParams {
|
|
746
|
-
/** Select the tab's cookie store; required when reload is true. */
|
|
747
|
-
tabId?: number;
|
|
748
|
-
name: string;
|
|
749
|
-
value: string;
|
|
750
|
-
/** Cookie target URL; required when tabId is omitted. */
|
|
751
|
-
url?: string;
|
|
752
|
-
domain?: string;
|
|
753
|
-
path?: string;
|
|
754
|
-
reload?: boolean;
|
|
755
|
-
}
|
|
756
|
-
export interface SetCookieResult {
|
|
757
|
-
tabId?: number;
|
|
758
|
-
url: string;
|
|
759
|
-
name: string;
|
|
760
|
-
domain: string;
|
|
761
|
-
path: string;
|
|
762
|
-
reloaded: boolean;
|
|
763
|
-
}
|
|
764
|
-
export interface RequestDomainPermissionParams {
|
|
765
|
-
domain: string;
|
|
766
|
-
}
|
|
767
|
-
export type RunActionName = Exclude<ExtensionBrowserAction, 'run_actions' | 'browser_release'>;
|
|
768
|
-
export interface ActionStep {
|
|
769
|
-
action: RunActionName;
|
|
770
|
-
data?: Record<string, unknown>;
|
|
771
|
-
}
|
|
772
|
-
export interface RunActionsParams {
|
|
773
|
-
actions: ActionStep[];
|
|
774
|
-
tabId: number;
|
|
775
|
-
}
|
|
776
|
-
export interface BrowserActionMap {
|
|
777
|
-
tab_checkpoint: {
|
|
778
|
-
request: CaptureCheckpointParams;
|
|
779
|
-
response: CaptureCheckpointResult;
|
|
780
|
-
};
|
|
781
|
-
/** Compatibility alias for tab_checkpoint. */
|
|
782
|
-
capture_checkpoint: {
|
|
783
|
-
request: CaptureCheckpointParams;
|
|
784
|
-
response: CaptureCheckpointResult;
|
|
785
|
-
};
|
|
786
|
-
get_requests: {
|
|
787
|
-
request: GetRequestsParams;
|
|
788
|
-
response: unknown;
|
|
789
|
-
};
|
|
790
|
-
get_logs: {
|
|
791
|
-
request: GetLogsParams;
|
|
792
|
-
response: unknown;
|
|
793
|
-
};
|
|
794
|
-
get_events: {
|
|
795
|
-
request: GetEventsParams;
|
|
796
|
-
response: unknown;
|
|
797
|
-
};
|
|
798
|
-
set_mock: {
|
|
799
|
-
request: SetMockParams;
|
|
800
|
-
response: unknown;
|
|
801
|
-
};
|
|
802
|
-
get_mocks: {
|
|
803
|
-
request: GetMocksParams;
|
|
804
|
-
response: unknown;
|
|
805
|
-
};
|
|
806
|
-
set_rule: {
|
|
807
|
-
request: SetRuleParams;
|
|
808
|
-
response: unknown;
|
|
809
|
-
};
|
|
810
|
-
get_rules: {
|
|
811
|
-
request: undefined;
|
|
812
|
-
response: RulesResult;
|
|
813
|
-
};
|
|
814
|
-
send_request: {
|
|
815
|
-
request: SendRequestParams;
|
|
816
|
-
response: unknown;
|
|
817
|
-
};
|
|
818
|
-
send_mtop_request: {
|
|
819
|
-
request: SendMtopRequestParams;
|
|
820
|
-
response: unknown;
|
|
821
|
-
};
|
|
822
|
-
browser_list: {
|
|
823
|
-
request: undefined;
|
|
824
|
-
response: BrowserListResult;
|
|
825
|
-
};
|
|
826
|
-
browser_select_browser: {
|
|
827
|
-
request: SelectBrowserParams;
|
|
828
|
-
response: SelectBrowserResult;
|
|
829
|
-
};
|
|
830
|
-
browser_release: {
|
|
831
|
-
request: BrowserReleaseParams;
|
|
832
|
-
response: BrowserReleaseResult;
|
|
833
|
-
};
|
|
834
|
-
browser_control: {
|
|
835
|
-
request: BrowserControlParams;
|
|
836
|
-
response: {
|
|
837
|
-
session: ControlSessionInfo;
|
|
838
|
-
};
|
|
839
|
-
};
|
|
840
|
-
page_download: {
|
|
841
|
-
request: PageDownloadParams;
|
|
842
|
-
response: PageDownloadResult;
|
|
843
|
-
};
|
|
844
|
-
browser_launch: {
|
|
845
|
-
request: BrowserLaunchParams;
|
|
846
|
-
response: ManagedBrowserInfo;
|
|
847
|
-
};
|
|
848
|
-
browser_close: {
|
|
849
|
-
request: BrowserCloseParams;
|
|
850
|
-
response: unknown;
|
|
851
|
-
};
|
|
852
|
-
page_screenshot: {
|
|
853
|
-
request: PageScreenshotParams;
|
|
854
|
-
response: unknown;
|
|
855
|
-
};
|
|
856
|
-
tab_open: {
|
|
857
|
-
request: TabOpenParams;
|
|
858
|
-
response: unknown;
|
|
859
|
-
};
|
|
860
|
-
tab_close: {
|
|
861
|
-
request: TabCloseParams;
|
|
862
|
-
response: unknown;
|
|
863
|
-
};
|
|
864
|
-
tab_list: {
|
|
865
|
-
request: undefined;
|
|
866
|
-
response: unknown;
|
|
867
|
-
};
|
|
868
|
-
tab_group: {
|
|
869
|
-
request: TabGroupParams;
|
|
870
|
-
response: unknown;
|
|
871
|
-
};
|
|
872
|
-
page_click: {
|
|
873
|
-
request: PageClickParams;
|
|
874
|
-
response: unknown;
|
|
875
|
-
};
|
|
876
|
-
page_drag: {
|
|
877
|
-
request: PageDragParams;
|
|
878
|
-
response: unknown;
|
|
879
|
-
};
|
|
880
|
-
page_type: {
|
|
881
|
-
request: PageTypeParams;
|
|
882
|
-
response: unknown;
|
|
883
|
-
};
|
|
884
|
-
page_scroll: {
|
|
885
|
-
request: PageScrollParams;
|
|
886
|
-
response: unknown;
|
|
887
|
-
};
|
|
888
|
-
page_hover: {
|
|
889
|
-
request: PageHoverParams;
|
|
890
|
-
response: unknown;
|
|
891
|
-
};
|
|
892
|
-
page_eval: {
|
|
893
|
-
request: PageEvalParams;
|
|
894
|
-
response: unknown;
|
|
895
|
-
};
|
|
896
|
-
page_runtime: {
|
|
897
|
-
request: Record<string, unknown>;
|
|
898
|
-
response: unknown;
|
|
899
|
-
};
|
|
900
|
-
page_inspect: {
|
|
901
|
-
request: PageInspectParams;
|
|
902
|
-
response: unknown;
|
|
903
|
-
};
|
|
904
|
-
page_snapshot: {
|
|
905
|
-
request: PageSnapshotParams;
|
|
906
|
-
response: unknown;
|
|
907
|
-
};
|
|
908
|
-
page_press: {
|
|
909
|
-
request: PagePressParams;
|
|
910
|
-
response: unknown;
|
|
911
|
-
};
|
|
912
|
-
page_wait: {
|
|
913
|
-
request: PageWaitParams;
|
|
914
|
-
response: unknown;
|
|
915
|
-
};
|
|
916
|
-
page_navigate: {
|
|
917
|
-
request: PageNavigateParams;
|
|
918
|
-
response: unknown;
|
|
919
|
-
};
|
|
920
|
-
page_upload: {
|
|
921
|
-
request: PageUploadParams;
|
|
922
|
-
response: unknown;
|
|
923
|
-
};
|
|
924
|
-
page_frames: {
|
|
925
|
-
request: PageFramesParams;
|
|
926
|
-
response: unknown;
|
|
927
|
-
};
|
|
928
|
-
set_device_emulation: {
|
|
929
|
-
request: SetDeviceEmulationParams;
|
|
930
|
-
response: unknown;
|
|
931
|
-
};
|
|
932
|
-
set_app_profile: {
|
|
933
|
-
request: SetAppProfileParams;
|
|
934
|
-
response: unknown;
|
|
935
|
-
};
|
|
936
|
-
set_timezone: {
|
|
937
|
-
request: SetTimezoneParams;
|
|
938
|
-
response: SetTimezoneResult;
|
|
939
|
-
};
|
|
940
|
-
get_cookie: {
|
|
941
|
-
request: GetCookieParams;
|
|
942
|
-
response: GetCookieResult;
|
|
943
|
-
};
|
|
944
|
-
set_cookie: {
|
|
945
|
-
request: SetCookieParams;
|
|
946
|
-
response: SetCookieResult;
|
|
947
|
-
};
|
|
948
|
-
request_domain_permission: {
|
|
949
|
-
request: RequestDomainPermissionParams;
|
|
950
|
-
response: unknown;
|
|
951
|
-
};
|
|
952
|
-
run_actions: {
|
|
953
|
-
request: RunActionsParams;
|
|
954
|
-
response: unknown;
|
|
955
|
-
};
|
|
956
|
-
}
|
|
957
|
-
export type BrowserAction = keyof BrowserActionMap;
|
|
958
|
-
export type BrowserActionRequest<A extends BrowserAction> = BrowserActionMap[A]['request'];
|
|
959
|
-
export type BrowserActionResponse<A extends BrowserAction> = BrowserActionMap[A]['response'] & {
|
|
960
|
-
/** Routing and execution state; browser_control returns the full tab inventory. */
|
|
961
|
-
session?: Omit<ControlSessionInfo, 'tabs'>;
|
|
962
|
-
};
|
|
963
|
-
export type BrowserCommandAction = Exclude<BrowserAction, 'browser_select_browser'>;
|
|
964
|
-
export type ExtensionBrowserAction = Exclude<BrowserCommandAction, 'browser_list' | 'browser_launch' | 'browser_close' | 'browser_control' | 'page_download'>;
|
|
965
|
-
export declare const TAB_ID_REQUIRED_ACTIONS: readonly ["tab_checkpoint", "capture_checkpoint", "get_requests", "get_logs", "get_events", "set_mock", "get_mocks", "page_screenshot", "tab_close", "page_click", "page_drag", "page_type", "page_scroll", "page_hover", "page_eval", "page_inspect", "page_snapshot", "page_press", "page_wait", "page_navigate", "page_upload", "page_download", "page_frames", "set_device_emulation", "set_app_profile", "set_timezone", "run_actions"];
|
|
966
|
-
export type TabIdRequiredAction = (typeof TAB_ID_REQUIRED_ACTIONS)[number];
|
|
967
|
-
export declare function actionRequiresTabId(action: unknown): action is TabIdRequiredAction;
|
|
968
|
-
export declare function validateRequiredActionTabId(action: string, data: unknown): void;
|
|
969
|
-
export declare const PAGE_ACT_ACTIONS: readonly ["page_click", "page_drag", "page_type", "page_hover", "page_scroll", "page_press", "page_upload", "page_eval"];
|
|
970
|
-
export type PageActAction = (typeof PAGE_ACT_ACTIONS)[number];
|
|
971
|
-
export declare const BROWSER_ACTIONS: {
|
|
972
|
-
readonly tab_checkpoint: true;
|
|
973
|
-
readonly capture_checkpoint: true;
|
|
974
|
-
readonly get_requests: true;
|
|
975
|
-
readonly get_logs: true;
|
|
976
|
-
readonly get_events: true;
|
|
977
|
-
readonly set_mock: true;
|
|
978
|
-
readonly get_mocks: true;
|
|
979
|
-
readonly set_rule: true;
|
|
980
|
-
readonly get_rules: true;
|
|
981
|
-
readonly send_request: true;
|
|
982
|
-
readonly send_mtop_request: true;
|
|
983
|
-
readonly browser_list: true;
|
|
984
|
-
readonly browser_select_browser: true;
|
|
985
|
-
readonly browser_release: true;
|
|
986
|
-
readonly browser_control: true;
|
|
987
|
-
readonly page_download: true;
|
|
988
|
-
readonly browser_launch: true;
|
|
989
|
-
readonly browser_close: true;
|
|
990
|
-
readonly page_screenshot: true;
|
|
991
|
-
readonly tab_open: true;
|
|
992
|
-
readonly tab_close: true;
|
|
993
|
-
readonly tab_list: true;
|
|
994
|
-
readonly tab_group: true;
|
|
995
|
-
readonly page_click: true;
|
|
996
|
-
readonly page_drag: true;
|
|
997
|
-
readonly page_type: true;
|
|
998
|
-
readonly page_scroll: true;
|
|
999
|
-
readonly page_hover: true;
|
|
1000
|
-
readonly page_eval: true;
|
|
1001
|
-
readonly page_runtime: true;
|
|
1002
|
-
readonly page_inspect: true;
|
|
1003
|
-
readonly page_snapshot: true;
|
|
1004
|
-
readonly page_press: true;
|
|
1005
|
-
readonly page_wait: true;
|
|
1006
|
-
readonly page_navigate: true;
|
|
1007
|
-
readonly page_upload: true;
|
|
1008
|
-
readonly page_frames: true;
|
|
1009
|
-
readonly set_device_emulation: true;
|
|
1010
|
-
readonly set_app_profile: true;
|
|
1011
|
-
readonly set_timezone: true;
|
|
1012
|
-
readonly get_cookie: true;
|
|
1013
|
-
readonly set_cookie: true;
|
|
1014
|
-
readonly request_domain_permission: true;
|
|
1015
|
-
readonly run_actions: true;
|
|
1016
|
-
};
|
|
1017
|
-
export declare const BROWSER_COMMAND_ACTIONS: {
|
|
1018
|
-
readonly tab_checkpoint: true;
|
|
1019
|
-
readonly capture_checkpoint: true;
|
|
1020
|
-
readonly get_requests: true;
|
|
1021
|
-
readonly get_logs: true;
|
|
1022
|
-
readonly get_events: true;
|
|
1023
|
-
readonly set_mock: true;
|
|
1024
|
-
readonly get_mocks: true;
|
|
1025
|
-
readonly set_rule: true;
|
|
1026
|
-
readonly get_rules: true;
|
|
1027
|
-
readonly send_request: true;
|
|
1028
|
-
readonly send_mtop_request: true;
|
|
1029
|
-
readonly browser_list: true;
|
|
1030
|
-
readonly browser_release: true;
|
|
1031
|
-
readonly browser_control: true;
|
|
1032
|
-
readonly page_download: true;
|
|
1033
|
-
readonly browser_launch: true;
|
|
1034
|
-
readonly browser_close: true;
|
|
1035
|
-
readonly page_screenshot: true;
|
|
1036
|
-
readonly tab_open: true;
|
|
1037
|
-
readonly tab_close: true;
|
|
1038
|
-
readonly tab_list: true;
|
|
1039
|
-
readonly tab_group: true;
|
|
1040
|
-
readonly page_click: true;
|
|
1041
|
-
readonly page_drag: true;
|
|
1042
|
-
readonly page_type: true;
|
|
1043
|
-
readonly page_scroll: true;
|
|
1044
|
-
readonly page_hover: true;
|
|
1045
|
-
readonly page_eval: true;
|
|
1046
|
-
readonly page_runtime: true;
|
|
1047
|
-
readonly page_inspect: true;
|
|
1048
|
-
readonly page_snapshot: true;
|
|
1049
|
-
readonly page_press: true;
|
|
1050
|
-
readonly page_wait: true;
|
|
1051
|
-
readonly page_navigate: true;
|
|
1052
|
-
readonly page_upload: true;
|
|
1053
|
-
readonly page_frames: true;
|
|
1054
|
-
readonly set_device_emulation: true;
|
|
1055
|
-
readonly set_app_profile: true;
|
|
1056
|
-
readonly set_timezone: true;
|
|
1057
|
-
readonly get_cookie: true;
|
|
1058
|
-
readonly set_cookie: true;
|
|
1059
|
-
readonly request_domain_permission: true;
|
|
1060
|
-
readonly run_actions: true;
|
|
1061
|
-
};
|
|
1062
|
-
export declare const EXTENSION_BROWSER_ACTIONS: {
|
|
1063
|
-
readonly tab_checkpoint: true;
|
|
1064
|
-
readonly capture_checkpoint: true;
|
|
1065
|
-
readonly get_requests: true;
|
|
1066
|
-
readonly get_logs: true;
|
|
1067
|
-
readonly get_events: true;
|
|
1068
|
-
readonly set_mock: true;
|
|
1069
|
-
readonly get_mocks: true;
|
|
1070
|
-
readonly set_rule: true;
|
|
1071
|
-
readonly get_rules: true;
|
|
1072
|
-
readonly send_request: true;
|
|
1073
|
-
readonly send_mtop_request: true;
|
|
1074
|
-
readonly browser_release: true;
|
|
1075
|
-
readonly page_screenshot: true;
|
|
1076
|
-
readonly tab_open: true;
|
|
1077
|
-
readonly tab_close: true;
|
|
1078
|
-
readonly tab_list: true;
|
|
1079
|
-
readonly tab_group: true;
|
|
1080
|
-
readonly page_click: true;
|
|
1081
|
-
readonly page_drag: true;
|
|
1082
|
-
readonly page_type: true;
|
|
1083
|
-
readonly page_scroll: true;
|
|
1084
|
-
readonly page_hover: true;
|
|
1085
|
-
readonly page_eval: true;
|
|
1086
|
-
readonly page_runtime: true;
|
|
1087
|
-
readonly page_inspect: true;
|
|
1088
|
-
readonly page_snapshot: true;
|
|
1089
|
-
readonly page_press: true;
|
|
1090
|
-
readonly page_wait: true;
|
|
1091
|
-
readonly page_navigate: true;
|
|
1092
|
-
readonly page_upload: true;
|
|
1093
|
-
readonly page_frames: true;
|
|
1094
|
-
readonly set_device_emulation: true;
|
|
1095
|
-
readonly set_app_profile: true;
|
|
1096
|
-
readonly set_timezone: true;
|
|
1097
|
-
readonly get_cookie: true;
|
|
1098
|
-
readonly set_cookie: true;
|
|
1099
|
-
readonly request_domain_permission: true;
|
|
1100
|
-
readonly run_actions: true;
|
|
1101
|
-
};
|
|
1102
|
-
export declare const BROWSER_CAPABILITY_ACTIONS: {
|
|
1103
|
-
readonly page_download: true;
|
|
1104
|
-
readonly tab_checkpoint: true;
|
|
1105
|
-
readonly capture_checkpoint: true;
|
|
1106
|
-
readonly get_requests: true;
|
|
1107
|
-
readonly get_logs: true;
|
|
1108
|
-
readonly get_events: true;
|
|
1109
|
-
readonly set_mock: true;
|
|
1110
|
-
readonly get_mocks: true;
|
|
1111
|
-
readonly set_rule: true;
|
|
1112
|
-
readonly get_rules: true;
|
|
1113
|
-
readonly send_request: true;
|
|
1114
|
-
readonly send_mtop_request: true;
|
|
1115
|
-
readonly browser_release: true;
|
|
1116
|
-
readonly page_screenshot: true;
|
|
1117
|
-
readonly tab_open: true;
|
|
1118
|
-
readonly tab_close: true;
|
|
1119
|
-
readonly tab_list: true;
|
|
1120
|
-
readonly tab_group: true;
|
|
1121
|
-
readonly page_click: true;
|
|
1122
|
-
readonly page_drag: true;
|
|
1123
|
-
readonly page_type: true;
|
|
1124
|
-
readonly page_scroll: true;
|
|
1125
|
-
readonly page_hover: true;
|
|
1126
|
-
readonly page_eval: true;
|
|
1127
|
-
readonly page_runtime: true;
|
|
1128
|
-
readonly page_inspect: true;
|
|
1129
|
-
readonly page_snapshot: true;
|
|
1130
|
-
readonly page_press: true;
|
|
1131
|
-
readonly page_wait: true;
|
|
1132
|
-
readonly page_navigate: true;
|
|
1133
|
-
readonly page_upload: true;
|
|
1134
|
-
readonly page_frames: true;
|
|
1135
|
-
readonly set_device_emulation: true;
|
|
1136
|
-
readonly set_app_profile: true;
|
|
1137
|
-
readonly set_timezone: true;
|
|
1138
|
-
readonly get_cookie: true;
|
|
1139
|
-
readonly set_cookie: true;
|
|
1140
|
-
readonly request_domain_permission: true;
|
|
1141
|
-
readonly run_actions: true;
|
|
1142
|
-
};
|
|
1143
|
-
export declare function isBrowserAction(value: unknown): value is BrowserAction;
|
|
1144
|
-
export declare function isBrowserCommandAction(value: unknown): value is BrowserCommandAction;
|
|
1145
|
-
export declare function isBrowserCapabilityAction(value: unknown): value is BrowserCapabilityAction;
|
|
1146
|
-
export declare function isExtensionBrowserAction(value: unknown): value is ExtensionBrowserAction;
|
|
1147
|
-
export {};
|