@onkernel/sdk 0.93.0 → 0.95.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.
Files changed (88) hide show
  1. package/CHANGELOG.md +16 -0
  2. package/client.d.mts +6 -0
  3. package/client.d.mts.map +1 -1
  4. package/client.d.ts +6 -0
  5. package/client.d.ts.map +1 -1
  6. package/client.js +6 -0
  7. package/client.js.map +1 -1
  8. package/client.mjs +6 -0
  9. package/client.mjs.map +1 -1
  10. package/lib/browser-routing.d.mts +1 -0
  11. package/lib/browser-routing.d.mts.map +1 -1
  12. package/lib/browser-routing.d.ts +1 -0
  13. package/lib/browser-routing.d.ts.map +1 -1
  14. package/lib/browser-routing.js +23 -2
  15. package/lib/browser-routing.js.map +1 -1
  16. package/lib/browser-routing.mjs +23 -2
  17. package/lib/browser-routing.mjs.map +1 -1
  18. package/package.json +1 -1
  19. package/resources/auth/connections.d.mts +62 -50
  20. package/resources/auth/connections.d.mts.map +1 -1
  21. package/resources/auth/connections.d.ts +62 -50
  22. package/resources/auth/connections.d.ts.map +1 -1
  23. package/resources/browser-pools.d.mts +22 -22
  24. package/resources/browser-pools.d.mts.map +1 -1
  25. package/resources/browser-pools.d.ts +22 -22
  26. package/resources/browser-pools.d.ts.map +1 -1
  27. package/resources/browsers/browsers.d.mts +23 -23
  28. package/resources/browsers/browsers.d.mts.map +1 -1
  29. package/resources/browsers/browsers.d.ts +23 -23
  30. package/resources/browsers/browsers.d.ts.map +1 -1
  31. package/resources/browsers/browsers.js +2 -2
  32. package/resources/browsers/browsers.js.map +1 -1
  33. package/resources/browsers/browsers.mjs +2 -2
  34. package/resources/browsers/browsers.mjs.map +1 -1
  35. package/resources/browsers/index.d.mts +1 -1
  36. package/resources/browsers/index.d.mts.map +1 -1
  37. package/resources/browsers/index.d.ts +1 -1
  38. package/resources/browsers/index.d.ts.map +1 -1
  39. package/resources/browsers/index.js.map +1 -1
  40. package/resources/browsers/index.mjs.map +1 -1
  41. package/resources/browsers/telemetry.d.mts +2019 -73
  42. package/resources/browsers/telemetry.d.mts.map +1 -1
  43. package/resources/browsers/telemetry.d.ts +2019 -73
  44. package/resources/browsers/telemetry.d.ts.map +1 -1
  45. package/resources/index.d.mts +1 -0
  46. package/resources/index.d.mts.map +1 -1
  47. package/resources/index.d.ts +1 -0
  48. package/resources/index.d.ts.map +1 -1
  49. package/resources/index.js +3 -1
  50. package/resources/index.js.map +1 -1
  51. package/resources/index.mjs +1 -0
  52. package/resources/index.mjs.map +1 -1
  53. package/resources/invocations.d.mts +1 -1
  54. package/resources/invocations.d.mts.map +1 -1
  55. package/resources/invocations.d.ts +1 -1
  56. package/resources/invocations.d.ts.map +1 -1
  57. package/resources/proxies.d.mts +4 -1
  58. package/resources/proxies.d.mts.map +1 -1
  59. package/resources/proxies.d.ts +4 -1
  60. package/resources/proxies.d.ts.map +1 -1
  61. package/resources/proxies.js +4 -1
  62. package/resources/proxies.js.map +1 -1
  63. package/resources/proxies.mjs +4 -1
  64. package/resources/proxies.mjs.map +1 -1
  65. package/resources/site-configs.d.mts +445 -0
  66. package/resources/site-configs.d.mts.map +1 -0
  67. package/resources/site-configs.d.ts +445 -0
  68. package/resources/site-configs.d.ts.map +1 -0
  69. package/resources/site-configs.js +88 -0
  70. package/resources/site-configs.js.map +1 -0
  71. package/resources/site-configs.mjs +84 -0
  72. package/resources/site-configs.mjs.map +1 -0
  73. package/src/client.ts +52 -0
  74. package/src/lib/browser-routing.ts +24 -2
  75. package/src/resources/auth/connections.ts +62 -50
  76. package/src/resources/browser-pools.ts +22 -22
  77. package/src/resources/browsers/browsers.ts +33 -21
  78. package/src/resources/browsers/index.ts +6 -0
  79. package/src/resources/browsers/telemetry.ts +2503 -74
  80. package/src/resources/index.ts +23 -0
  81. package/src/resources/invocations.ts +1 -1
  82. package/src/resources/proxies.ts +4 -1
  83. package/src/resources/site-configs.ts +578 -0
  84. package/src/version.ts +1 -1
  85. package/version.d.mts +1 -1
  86. package/version.d.ts +1 -1
  87. package/version.js +1 -1
  88. package/version.mjs +1 -1
@@ -83,7 +83,8 @@ export class Telemetry extends APIResource {
83
83
  export type TelemetryEventsResponsesOffsetPagination = OffsetPagination<TelemetryEventsResponse>;
84
84
 
85
85
  /**
86
- * An agent-driven HTTP call handled by the in-VM API server.
86
+ * An agent-driven HTTP call that drives the browser, handled by the in-VM API
87
+ * server. Calls that manage the VM instead emit platform_api_call.
87
88
  */
88
89
  export interface BrowserAPICallEvent {
89
90
  category: 'control';
@@ -116,7 +117,8 @@ export namespace BrowserAPICallEvent {
116
117
  duration_ms: number;
117
118
 
118
119
  /**
119
- * OpenAPI operationId of the matched route (e.g. processExec, takeScreenshot).
120
+ * Matched route's operation, named as the in-VM API names its handler (e.g.
121
+ * ProcessExec, TakeScreenshot).
120
122
  */
121
123
  operation_id: string;
122
124
 
@@ -129,130 +131,2363 @@ export namespace BrowserAPICallEvent {
129
131
  * HTTP response status code.
130
132
  */
131
133
  status: number;
134
+
135
+ /**
136
+ * Source submitted to the Playwright code-execution endpoint, capped at 8192 bytes
137
+ * like every other captured string. A capped value is cut on a character boundary
138
+ * and ends in `...[truncated]`. Absent for every other operation.
139
+ */
140
+ code?: string;
141
+ }
142
+ }
143
+
144
+ /**
145
+ * CDP Runtime.StackTrace representing the JavaScript call stack at the time of an
146
+ * event. Fields use CDP naming conventions rather than snake_case to match the
147
+ * Chrome DevTools Protocol wire format.
148
+ */
149
+ export interface BrowserCallStack {
150
+ /**
151
+ * Ordered list of call frames, outermost first.
152
+ */
153
+ callFrames: Array<BrowserCallStack.CallFrame>;
154
+
155
+ /**
156
+ * Optional label for the stack trace (e.g. async cause).
157
+ */
158
+ description?: string;
159
+
160
+ /**
161
+ * Parent stack trace for async stacks.
162
+ */
163
+ parent?: BrowserCallStack;
164
+ }
165
+
166
+ export namespace BrowserCallStack {
167
+ export interface CallFrame {
168
+ /**
169
+ * Zero-based column number within the line.
170
+ */
171
+ columnNumber: number;
172
+
173
+ /**
174
+ * JavaScript function name, or empty string for anonymous functions.
175
+ */
176
+ functionName: string;
177
+
178
+ /**
179
+ * Zero-based line number within the script.
180
+ */
181
+ lineNumber: number;
182
+
183
+ /**
184
+ * CDP script identifier.
185
+ */
186
+ scriptId: string;
187
+
188
+ /**
189
+ * URL or name of the script file.
190
+ */
191
+ url: string;
192
+ }
193
+ }
194
+
195
+ /**
196
+ * A captcha solve attempt reached a terminal outcome.
197
+ */
198
+ export interface BrowserCaptchaSolveResultEvent {
199
+ category: 'captcha';
200
+
201
+ /**
202
+ * Provenance metadata identifying which producer emitted the event.
203
+ */
204
+ source: BrowserEventSource;
205
+
206
+ /**
207
+ * Event timestamp in Unix microseconds.
208
+ */
209
+ ts: number;
210
+
211
+ type: 'captcha_solve_result';
212
+
213
+ data?: BrowserCaptchaSolveResultEvent.Data;
214
+
215
+ /**
216
+ * True if the data field was truncated due to size limits.
217
+ */
218
+ truncated?: boolean;
219
+ }
220
+
221
+ export namespace BrowserCaptchaSolveResultEvent {
222
+ export interface Data {
223
+ /**
224
+ * Captcha vendor family. Provider-specific task names are normalized into this
225
+ * set; anything not covered is reported as other.
226
+ */
227
+ captcha_type: 'hcaptcha' | 'recaptcha_v2' | 'recaptcha_v3' | 'turnstile' | 'geetest' | 'other';
228
+
229
+ /**
230
+ * Wall-clock duration from solve start to terminal outcome.
231
+ */
232
+ duration_ms: number;
233
+
234
+ /**
235
+ * Terminal outcome. success: solver returned a usable solution. failure: solver
236
+ * returned an error (see error_code). timeout: solver did not return within the
237
+ * caller's wait budget. abandoned: caller cancelled or the page navigated away
238
+ * mid-solve.
239
+ */
240
+ status: 'success' | 'failure' | 'timeout' | 'abandoned';
241
+
242
+ /**
243
+ * Solver-specific error code on failure (e.g. ERROR_CAPTCHA_UNSOLVABLE). Absent on
244
+ * success.
245
+ */
246
+ error_code?: string;
247
+
248
+ /**
249
+ * Solver-assigned identifier. Opaque, useful for support cross-references.
250
+ */
251
+ task_id?: string;
252
+
253
+ /**
254
+ * Host of the page where the captcha was solved.
255
+ */
256
+ website_host?: string;
257
+
258
+ /**
259
+ * Path of the page where the captcha was solved. Query string excluded.
260
+ */
261
+ website_path?: string;
262
+ }
263
+ }
264
+
265
+ /**
266
+ * A browser-control command a client sent over the CDP WebSocket proxy: input
267
+ * gestures, navigation, dialog handling, file selection and screenshots.
268
+ * Configuration commands and the DOM/Runtime traffic a client library issues on
269
+ * the caller's behalf are not reported. One event per browser-control command that
270
+ * reached the browser. The command stream is not sampled, coalesced or reordered.
271
+ * An event is lost only when the method is excluded by telemetry configuration,
272
+ * when the command's arguments do not decode, or when classification cannot keep
273
+ * up. Exclusions are counted in `cdp_disconnect.telemetry_excluded`; the rest in
274
+ * `cdp_disconnect.telemetry_dropped`.
275
+ */
276
+ export interface BrowserCdpCommandEvent {
277
+ category: 'control';
278
+
279
+ /**
280
+ * Per-command payload for `cdp_command` events, discriminated by `method`. Each
281
+ * variant carries only the arguments approved for that command: values that could
282
+ * hold a secret — typed and composition text, URLs, referrers, scripts, templates,
283
+ * file paths, drag contents and autofill values — are replaced by a length, a
284
+ * count, a presence flag, an enum or a URL scheme and host.
285
+ */
286
+ data:
287
+ | BrowserCdpCommandEvent.BrowserCdpInputDispatchMouseEventCommandData
288
+ | BrowserCdpCommandEvent.BrowserCdpInputDispatchKeyEventCommandData
289
+ | BrowserCdpCommandEvent.BrowserCdpInputInsertTextCommandData
290
+ | BrowserCdpCommandEvent.BrowserCdpInputImeSetCompositionCommandData
291
+ | BrowserCdpCommandEvent.BrowserCdpInputDispatchTouchEventCommandData
292
+ | BrowserCdpCommandEvent.BrowserCdpInputDispatchDragEventCommandData
293
+ | BrowserCdpCommandEvent.BrowserCdpInputCancelDraggingCommandData
294
+ | BrowserCdpCommandEvent.BrowserCdpInputEmulateTouchFromMouseEventCommandData
295
+ | BrowserCdpCommandEvent.BrowserCdpInputSynthesizePinchGestureCommandData
296
+ | BrowserCdpCommandEvent.BrowserCdpInputSynthesizeScrollGestureCommandData
297
+ | BrowserCdpCommandEvent.BrowserCdpInputSynthesizeTapGestureCommandData
298
+ | BrowserCdpCommandEvent.BrowserCdpDomSetFileInputFilesCommandData
299
+ | BrowserCdpCommandEvent.BrowserCdpDomFocusCommandData
300
+ | BrowserCdpCommandEvent.BrowserCdpDomScrollIntoViewIfNeededCommandData
301
+ | BrowserCdpCommandEvent.BrowserCdpPageBringToFrontCommandData
302
+ | BrowserCdpCommandEvent.BrowserCdpPageCaptureScreenshotCommandData
303
+ | BrowserCdpCommandEvent.BrowserCdpPageCaptureSnapshotCommandData
304
+ | BrowserCdpCommandEvent.BrowserCdpPageHandleJavaScriptDialogCommandData
305
+ | BrowserCdpCommandEvent.BrowserCdpPageNavigateCommandData
306
+ | BrowserCdpCommandEvent.BrowserCdpPageNavigateToHistoryEntryCommandData
307
+ | BrowserCdpCommandEvent.BrowserCdpPageReloadCommandData
308
+ | BrowserCdpCommandEvent.BrowserCdpPagePrintToPdfCommandData
309
+ | BrowserCdpCommandEvent.BrowserCdpPageStartScreencastCommandData
310
+ | BrowserCdpCommandEvent.BrowserCdpPageStopScreencastCommandData
311
+ | BrowserCdpCommandEvent.BrowserCdpPageStopLoadingCommandData
312
+ | BrowserCdpCommandEvent.BrowserCdpPageCloseCommandData
313
+ | BrowserCdpCommandEvent.BrowserCdpPageSetWebLifecycleStateCommandData
314
+ | BrowserCdpCommandEvent.BrowserCdpTargetActivateTargetCommandData
315
+ | BrowserCdpCommandEvent.BrowserCdpTargetCloseTargetCommandData
316
+ | BrowserCdpCommandEvent.BrowserCdpTargetCreateTargetCommandData
317
+ | BrowserCdpCommandEvent.BrowserCdpTargetCreateBrowserContextCommandData
318
+ | BrowserCdpCommandEvent.BrowserCdpTargetDisposeBrowserContextCommandData
319
+ | BrowserCdpCommandEvent.BrowserCdpTargetOpenDevToolsCommandData
320
+ | BrowserCdpCommandEvent.BrowserCdpBrowserCancelDownloadCommandData
321
+ | BrowserCdpCommandEvent.BrowserCdpBrowserCloseCommandData
322
+ | BrowserCdpCommandEvent.BrowserCdpBrowserSetWindowBoundsCommandData
323
+ | BrowserCdpCommandEvent.BrowserCdpBrowserSetContentsSizeCommandData
324
+ | BrowserCdpCommandEvent.BrowserCdpAutofillTriggerCommandData;
325
+
326
+ /**
327
+ * Provenance metadata identifying which producer emitted the event.
328
+ */
329
+ source: BrowserEventSource;
330
+
331
+ /**
332
+ * Event timestamp in Unix microseconds.
333
+ */
334
+ ts: number;
335
+
336
+ type: 'cdp_command';
337
+
338
+ /**
339
+ * True if the data field was truncated due to size limits.
340
+ */
341
+ truncated?: boolean;
342
+ }
343
+
344
+ export namespace BrowserCdpCommandEvent {
345
+ /**
346
+ * Sanitized `Input.dispatchMouseEvent` arguments. Canonical input:
347
+ * `Input.dispatchMouseEvent` in devtools-protocol@2d019e73, pinned at
348
+ * https://github.com/ChromeDevTools/devtools-protocol/blob/2d019e73eb371d1d6985d26d395d78bd8f8a22ba/json/browser_protocol.json.
349
+ * Every argument of this command has a retained or redacted decision in
350
+ * lib/devtoolsproxy/testdata/cdp_arguments.yaml.
351
+ */
352
+ export interface BrowserCdpInputDispatchMouseEventCommandData {
353
+ /**
354
+ * Mouse event phase: `mousePressed`, `mouseReleased`, `mouseMoved` or
355
+ * `mouseWheel`. A value the protocol does not define is reported as `other`.
356
+ */
357
+ event_type: 'mousePressed' | 'mouseReleased' | 'mouseMoved' | 'mouseWheel' | 'other';
358
+
359
+ method: 'Input.dispatchMouseEvent';
360
+
361
+ /**
362
+ * Button named by the command (`none`, `left`, `middle`, `right`, `back`,
363
+ * `forward`). A value the protocol does not define is reported as `other`.
364
+ */
365
+ button?: 'none' | 'left' | 'middle' | 'right' | 'back' | 'forward' | 'other';
366
+
367
+ /**
368
+ * Bit field of buttons held down. Non-zero on a `mouseMoved` means the move is a
369
+ * drag path.
370
+ */
371
+ buttons?: number;
372
+
373
+ /**
374
+ * Number of times the button was clicked (2 is a double click).
375
+ */
376
+ click_count?: number;
377
+
378
+ /**
379
+ * The command's JSON-RPC id, so the command can be joined to the result the
380
+ * browser returned for it. Absent when the client sent none.
381
+ */
382
+ command_id?: number;
383
+
384
+ /**
385
+ * Identifies the CDP proxy connection the command arrived on, matching
386
+ * `cdp_connect` and `cdp_disconnect`. Two clients driving the same browser are
387
+ * told apart by this.
388
+ */
389
+ connection_id?: string;
390
+
391
+ /**
392
+ * Horizontal scroll delta, for `mouseWheel`.
393
+ */
394
+ delta_x?: number;
395
+
396
+ /**
397
+ * Vertical scroll delta, for `mouseWheel`.
398
+ */
399
+ delta_y?: number;
400
+
401
+ /**
402
+ * Normalized pressure, 0 to 1.
403
+ */
404
+ force?: number;
405
+
406
+ /**
407
+ * Bit field of held modifier keys (1=Alt, 2=Ctrl, 4=Meta, 8=Shift).
408
+ */
409
+ modifiers?: number;
410
+
411
+ /**
412
+ * Pointer that generated the event (`mouse` or `pen`). A value the protocol does
413
+ * not define is reported as `other`.
414
+ */
415
+ pointer_type?: 'mouse' | 'pen' | 'other';
416
+
417
+ /**
418
+ * CDP session identifier the command was addressed to. Absent for browser-level
419
+ * commands. Clipped to 128 characters.
420
+ */
421
+ session_id?: string;
422
+
423
+ /**
424
+ * Normalized tangential pressure, -1 to 1.
425
+ */
426
+ tangential_pressure?: number;
427
+
428
+ /**
429
+ * Pen tilt from the Y-Z plane, in degrees.
430
+ */
431
+ tilt_x?: number;
432
+
433
+ /**
434
+ * Pen tilt from the X-Z plane, in degrees.
435
+ */
436
+ tilt_y?: number;
437
+
438
+ /**
439
+ * Pen clockwise rotation, in degrees.
440
+ */
441
+ twist?: number;
442
+
443
+ /**
444
+ * Viewport x coordinate in CSS pixels.
445
+ */
446
+ x?: number;
447
+
448
+ /**
449
+ * Viewport y coordinate in CSS pixels.
450
+ */
451
+ y?: number;
452
+ }
453
+
454
+ /**
455
+ * Sanitized `Input.dispatchKeyEvent` arguments. Canonical input:
456
+ * `Input.dispatchKeyEvent` in devtools-protocol@2d019e73, pinned at
457
+ * https://github.com/ChromeDevTools/devtools-protocol/blob/2d019e73eb371d1d6985d26d395d78bd8f8a22ba/json/browser_protocol.json.
458
+ * Every argument of this command has a retained or redacted decision in
459
+ * lib/devtoolsproxy/testdata/cdp_arguments.yaml.
460
+ */
461
+ export interface BrowserCdpInputDispatchKeyEventCommandData {
462
+ /**
463
+ * Key event phase: `keyDown`, `keyUp`, `rawKeyDown` or `char`. A value the
464
+ * protocol does not define is reported as `other`.
465
+ */
466
+ event_type: 'keyDown' | 'keyUp' | 'rawKeyDown' | 'char' | 'other';
467
+
468
+ method: 'Input.dispatchKeyEvent';
469
+
470
+ /**
471
+ * Whether the event was generated by key repeat.
472
+ */
473
+ auto_repeat?: boolean;
474
+
475
+ /**
476
+ * Number of editing commands (e.g. `selectAll`) carried by the event.
477
+ */
478
+ command_count?: number;
479
+
480
+ /**
481
+ * The command's JSON-RPC id, so the command can be joined to the result the
482
+ * browser returned for it. Absent when the client sent none.
483
+ */
484
+ command_id?: number;
485
+
486
+ /**
487
+ * Identifies the CDP proxy connection the command arrived on, matching
488
+ * `cdp_connect` and `cdp_disconnect`. Two clients driving the same browser are
489
+ * told apart by this.
490
+ */
491
+ connection_id?: string;
492
+
493
+ /**
494
+ * Whether the key is on the numeric keypad.
495
+ */
496
+ is_keypad?: boolean;
497
+
498
+ /**
499
+ * Whether the event is a system key event.
500
+ */
501
+ is_system_key?: boolean;
502
+
503
+ /**
504
+ * Keyboard location (1=left, 2=right, 3=numpad).
505
+ */
506
+ location?: number;
507
+
508
+ /**
509
+ * Bit field of held modifier keys (1=Alt, 2=Ctrl, 4=Meta, 8=Shift).
510
+ */
511
+ modifiers?: number;
512
+
513
+ /**
514
+ * Key that commands the page rather than typing into it (e.g. `Enter`, `Tab`,
515
+ * `ArrowDown`, `F5`). Keys that produce a character are never captured; those are
516
+ * counted by `text_length`.
517
+ */
518
+ named_key?: string;
519
+
520
+ /**
521
+ * CDP session identifier the command was addressed to. Absent for browser-level
522
+ * commands. Clipped to 128 characters.
523
+ */
524
+ session_id?: string;
525
+
526
+ /**
527
+ * Number of characters the command submitted. The text itself is never captured.
528
+ */
529
+ text_length?: number;
530
+ }
531
+
532
+ /**
533
+ * Sanitized `Input.insertText` arguments. Canonical input: `Input.insertText` in
534
+ * devtools-protocol@2d019e73, pinned at
535
+ * https://github.com/ChromeDevTools/devtools-protocol/blob/2d019e73eb371d1d6985d26d395d78bd8f8a22ba/json/browser_protocol.json.
536
+ * Every argument of this command has a retained or redacted decision in
537
+ * lib/devtoolsproxy/testdata/cdp_arguments.yaml.
538
+ */
539
+ export interface BrowserCdpInputInsertTextCommandData {
540
+ method: 'Input.insertText';
541
+
542
+ /**
543
+ * Number of characters inserted. The text itself is never captured.
544
+ */
545
+ text_length: number;
546
+
547
+ /**
548
+ * The command's JSON-RPC id, so the command can be joined to the result the
549
+ * browser returned for it. Absent when the client sent none.
550
+ */
551
+ command_id?: number;
552
+
553
+ /**
554
+ * Identifies the CDP proxy connection the command arrived on, matching
555
+ * `cdp_connect` and `cdp_disconnect`. Two clients driving the same browser are
556
+ * told apart by this.
557
+ */
558
+ connection_id?: string;
559
+
560
+ /**
561
+ * CDP session identifier the command was addressed to. Absent for browser-level
562
+ * commands. Clipped to 128 characters.
563
+ */
564
+ session_id?: string;
565
+ }
566
+
567
+ /**
568
+ * Sanitized `Input.imeSetComposition` arguments. Canonical input:
569
+ * `Input.imeSetComposition` in devtools-protocol@2d019e73, pinned at
570
+ * https://github.com/ChromeDevTools/devtools-protocol/blob/2d019e73eb371d1d6985d26d395d78bd8f8a22ba/json/browser_protocol.json.
571
+ * Every argument of this command has a retained or redacted decision in
572
+ * lib/devtoolsproxy/testdata/cdp_arguments.yaml.
573
+ */
574
+ export interface BrowserCdpInputImeSetCompositionCommandData {
575
+ method: 'Input.imeSetComposition';
576
+
577
+ /**
578
+ * Number of characters in the composition. The text itself is never captured.
579
+ */
580
+ text_length: number;
581
+
582
+ /**
583
+ * The command's JSON-RPC id, so the command can be joined to the result the
584
+ * browser returned for it. Absent when the client sent none.
585
+ */
586
+ command_id?: number;
587
+
588
+ /**
589
+ * Identifies the CDP proxy connection the command arrived on, matching
590
+ * `cdp_connect` and `cdp_disconnect`. Two clients driving the same browser are
591
+ * told apart by this.
592
+ */
593
+ connection_id?: string;
594
+
595
+ /**
596
+ * Replacement range end offset.
597
+ */
598
+ replacement_end?: number;
599
+
600
+ /**
601
+ * Replacement range start offset.
602
+ */
603
+ replacement_start?: number;
604
+
605
+ /**
606
+ * Selection end offset within the composition.
607
+ */
608
+ selection_end?: number;
609
+
610
+ /**
611
+ * Selection start offset within the composition.
612
+ */
613
+ selection_start?: number;
614
+
615
+ /**
616
+ * CDP session identifier the command was addressed to. Absent for browser-level
617
+ * commands. Clipped to 128 characters.
618
+ */
619
+ session_id?: string;
620
+ }
621
+
622
+ /**
623
+ * Sanitized `Input.dispatchTouchEvent` arguments. Canonical input:
624
+ * `Input.dispatchTouchEvent` in devtools-protocol@2d019e73, pinned at
625
+ * https://github.com/ChromeDevTools/devtools-protocol/blob/2d019e73eb371d1d6985d26d395d78bd8f8a22ba/json/browser_protocol.json.
626
+ * Every argument of this command has a retained or redacted decision in
627
+ * lib/devtoolsproxy/testdata/cdp_arguments.yaml.
628
+ */
629
+ export interface BrowserCdpInputDispatchTouchEventCommandData {
630
+ /**
631
+ * Touch event phase: `touchStart`, `touchEnd`, `touchMove` or `touchCancel`. A
632
+ * value the protocol does not define is reported as `other`.
633
+ */
634
+ event_type: 'touchStart' | 'touchEnd' | 'touchMove' | 'touchCancel' | 'other';
635
+
636
+ method: 'Input.dispatchTouchEvent';
637
+
638
+ /**
639
+ * Number of active touch points the command carried.
640
+ */
641
+ touch_point_count: number;
642
+
643
+ /**
644
+ * The command's JSON-RPC id, so the command can be joined to the result the
645
+ * browser returned for it. Absent when the client sent none.
646
+ */
647
+ command_id?: number;
648
+
649
+ /**
650
+ * Identifies the CDP proxy connection the command arrived on, matching
651
+ * `cdp_connect` and `cdp_disconnect`. Two clients driving the same browser are
652
+ * told apart by this.
653
+ */
654
+ connection_id?: string;
655
+
656
+ /**
657
+ * Normalized pressure of the first touch point, 0 to 1.
658
+ */
659
+ force?: number;
660
+
661
+ /**
662
+ * Bit field of held modifier keys (1=Alt, 2=Ctrl, 4=Meta, 8=Shift).
663
+ */
664
+ modifiers?: number;
665
+
666
+ /**
667
+ * Horizontal radius of the first touch point.
668
+ */
669
+ radius_x?: number;
670
+
671
+ /**
672
+ * Vertical radius of the first touch point.
673
+ */
674
+ radius_y?: number;
675
+
676
+ /**
677
+ * Rotation of the first touch point, in degrees.
678
+ */
679
+ rotation_angle?: number;
680
+
681
+ /**
682
+ * CDP session identifier the command was addressed to. Absent for browser-level
683
+ * commands. Clipped to 128 characters.
684
+ */
685
+ session_id?: string;
686
+
687
+ /**
688
+ * Normalized tangential pressure of the first touch point, -1 to 1.
689
+ */
690
+ tangential_pressure?: number;
691
+
692
+ /**
693
+ * Tilt of the first touch point from the Y-Z plane, in degrees.
694
+ */
695
+ tilt_x?: number;
696
+
697
+ /**
698
+ * Tilt of the first touch point from the X-Z plane, in degrees.
699
+ */
700
+ tilt_y?: number;
701
+
702
+ /**
703
+ * Clockwise rotation of the first touch point, in degrees.
704
+ */
705
+ twist?: number;
706
+
707
+ /**
708
+ * Viewport x coordinate of the first touch point. Touch coordinates live inside
709
+ * `touchPoints`, so this is the primary point rather than a command-level
710
+ * argument.
711
+ */
712
+ x?: number;
713
+
714
+ /**
715
+ * Viewport y coordinate of the first touch point.
716
+ */
717
+ y?: number;
718
+ }
719
+
720
+ /**
721
+ * Sanitized `Input.dispatchDragEvent` arguments. Canonical input:
722
+ * `Input.dispatchDragEvent` in devtools-protocol@2d019e73, pinned at
723
+ * https://github.com/ChromeDevTools/devtools-protocol/blob/2d019e73eb371d1d6985d26d395d78bd8f8a22ba/json/browser_protocol.json.
724
+ * Every argument of this command has a retained or redacted decision in
725
+ * lib/devtoolsproxy/testdata/cdp_arguments.yaml.
726
+ */
727
+ export interface BrowserCdpInputDispatchDragEventCommandData {
728
+ /**
729
+ * Drag event phase: `dragEnter`, `dragOver`, `drop` or `dragCancel`. A value the
730
+ * protocol does not define is reported as `other`.
731
+ */
732
+ event_type: 'dragEnter' | 'dragOver' | 'drop' | 'dragCancel' | 'other';
733
+
734
+ method: 'Input.dispatchDragEvent';
735
+
736
+ /**
737
+ * The command's JSON-RPC id, so the command can be joined to the result the
738
+ * browser returned for it. Absent when the client sent none.
739
+ */
740
+ command_id?: number;
741
+
742
+ /**
743
+ * Identifies the CDP proxy connection the command arrived on, matching
744
+ * `cdp_connect` and `cdp_disconnect`. Two clients driving the same browser are
745
+ * told apart by this.
746
+ */
747
+ connection_id?: string;
748
+
749
+ /**
750
+ * Number of files in the drag payload. File paths are never captured.
751
+ */
752
+ drag_file_count?: number;
753
+
754
+ /**
755
+ * Number of items in the drag payload. Item contents are never captured.
756
+ */
757
+ drag_item_count?: number;
758
+
759
+ /**
760
+ * Distinct top-level MIME categories of the drag items (e.g. `text`, `image`,
761
+ * `application`). Subtypes and contents are never captured. A value the protocol
762
+ * does not define is reported as `other`.
763
+ */
764
+ drag_mime_categories?: Array<
765
+ | 'text'
766
+ | 'image'
767
+ | 'audio'
768
+ | 'video'
769
+ | 'application'
770
+ | 'font'
771
+ | 'model'
772
+ | 'multipart'
773
+ | 'message'
774
+ | 'other'
775
+ >;
776
+
777
+ /**
778
+ * Bit field of allowed drag operations (1=copy, 2=link, 16=move).
779
+ */
780
+ drag_operations_mask?: number;
781
+
782
+ /**
783
+ * Bit field of held modifier keys (1=Alt, 2=Ctrl, 4=Meta, 8=Shift).
784
+ */
785
+ modifiers?: number;
786
+
787
+ /**
788
+ * CDP session identifier the command was addressed to. Absent for browser-level
789
+ * commands. Clipped to 128 characters.
790
+ */
791
+ session_id?: string;
792
+
793
+ /**
794
+ * Viewport x coordinate in CSS pixels.
795
+ */
796
+ x?: number;
797
+
798
+ /**
799
+ * Viewport y coordinate in CSS pixels.
800
+ */
801
+ y?: number;
802
+ }
803
+
804
+ /**
805
+ * Sanitized `Input.cancelDragging` arguments. Canonical input:
806
+ * `Input.cancelDragging` in devtools-protocol@2d019e73, pinned at
807
+ * https://github.com/ChromeDevTools/devtools-protocol/blob/2d019e73eb371d1d6985d26d395d78bd8f8a22ba/json/browser_protocol.json.
808
+ * Every argument of this command has a retained or redacted decision in
809
+ * lib/devtoolsproxy/testdata/cdp_arguments.yaml.
810
+ */
811
+ export interface BrowserCdpInputCancelDraggingCommandData {
812
+ method: 'Input.cancelDragging';
813
+
814
+ /**
815
+ * The command's JSON-RPC id, so the command can be joined to the result the
816
+ * browser returned for it. Absent when the client sent none.
817
+ */
818
+ command_id?: number;
819
+
820
+ /**
821
+ * Identifies the CDP proxy connection the command arrived on, matching
822
+ * `cdp_connect` and `cdp_disconnect`. Two clients driving the same browser are
823
+ * told apart by this.
824
+ */
825
+ connection_id?: string;
826
+
827
+ /**
828
+ * CDP session identifier the command was addressed to. Absent for browser-level
829
+ * commands. Clipped to 128 characters.
830
+ */
831
+ session_id?: string;
832
+ }
833
+
834
+ /**
835
+ * Sanitized `Input.emulateTouchFromMouseEvent` arguments. Canonical input:
836
+ * `Input.emulateTouchFromMouseEvent` in devtools-protocol@2d019e73, pinned at
837
+ * https://github.com/ChromeDevTools/devtools-protocol/blob/2d019e73eb371d1d6985d26d395d78bd8f8a22ba/json/browser_protocol.json.
838
+ * Every argument of this command has a retained or redacted decision in
839
+ * lib/devtoolsproxy/testdata/cdp_arguments.yaml.
840
+ */
841
+ export interface BrowserCdpInputEmulateTouchFromMouseEventCommandData {
842
+ /**
843
+ * Mouse event phase being emulated as touch. A value the protocol does not define
844
+ * is reported as `other`.
845
+ */
846
+ event_type: 'mousePressed' | 'mouseReleased' | 'mouseMoved' | 'mouseWheel' | 'other';
847
+
848
+ method: 'Input.emulateTouchFromMouseEvent';
849
+
850
+ /**
851
+ * Button named by the command. A value the protocol does not define is reported as
852
+ * `other`.
853
+ */
854
+ button?: 'none' | 'left' | 'middle' | 'right' | 'back' | 'forward' | 'other';
855
+
856
+ /**
857
+ * Number of times the button was clicked.
858
+ */
859
+ click_count?: number;
860
+
861
+ /**
862
+ * The command's JSON-RPC id, so the command can be joined to the result the
863
+ * browser returned for it. Absent when the client sent none.
864
+ */
865
+ command_id?: number;
866
+
867
+ /**
868
+ * Identifies the CDP proxy connection the command arrived on, matching
869
+ * `cdp_connect` and `cdp_disconnect`. Two clients driving the same browser are
870
+ * told apart by this.
871
+ */
872
+ connection_id?: string;
873
+
874
+ /**
875
+ * Horizontal scroll delta.
876
+ */
877
+ delta_x?: number;
878
+
879
+ /**
880
+ * Vertical scroll delta.
881
+ */
882
+ delta_y?: number;
883
+
884
+ /**
885
+ * Bit field of held modifier keys (1=Alt, 2=Ctrl, 4=Meta, 8=Shift).
886
+ */
887
+ modifiers?: number;
888
+
889
+ /**
890
+ * CDP session identifier the command was addressed to. Absent for browser-level
891
+ * commands. Clipped to 128 characters.
892
+ */
893
+ session_id?: string;
894
+
895
+ /**
896
+ * Viewport x coordinate in CSS pixels.
897
+ */
898
+ x?: number;
899
+
900
+ /**
901
+ * Viewport y coordinate in CSS pixels.
902
+ */
903
+ y?: number;
904
+ }
905
+
906
+ /**
907
+ * Sanitized `Input.synthesizePinchGesture` arguments. Canonical input:
908
+ * `Input.synthesizePinchGesture` in devtools-protocol@2d019e73, pinned at
909
+ * https://github.com/ChromeDevTools/devtools-protocol/blob/2d019e73eb371d1d6985d26d395d78bd8f8a22ba/json/browser_protocol.json.
910
+ * Every argument of this command has a retained or redacted decision in
911
+ * lib/devtoolsproxy/testdata/cdp_arguments.yaml.
912
+ */
913
+ export interface BrowserCdpInputSynthesizePinchGestureCommandData {
914
+ method: 'Input.synthesizePinchGesture';
915
+
916
+ /**
917
+ * The command's JSON-RPC id, so the command can be joined to the result the
918
+ * browser returned for it. Absent when the client sent none.
919
+ */
920
+ command_id?: number;
921
+
922
+ /**
923
+ * Identifies the CDP proxy connection the command arrived on, matching
924
+ * `cdp_connect` and `cdp_disconnect`. Two clients driving the same browser are
925
+ * told apart by this.
926
+ */
927
+ connection_id?: string;
928
+
929
+ /**
930
+ * Input source the synthesized gesture emulates. A value the protocol does not
931
+ * define is reported as `other`.
932
+ */
933
+ gesture_source_type?: 'default' | 'touch' | 'mouse' | 'other';
934
+
935
+ /**
936
+ * Relative pointer speed, in pixels per second.
937
+ */
938
+ relative_speed?: number;
939
+
940
+ /**
941
+ * Relative scale of the pinch (>1 zooms in).
942
+ */
943
+ scale_factor?: number;
944
+
945
+ /**
946
+ * CDP session identifier the command was addressed to. Absent for browser-level
947
+ * commands. Clipped to 128 characters.
948
+ */
949
+ session_id?: string;
950
+
951
+ /**
952
+ * Viewport x coordinate in CSS pixels.
953
+ */
954
+ x?: number;
955
+
956
+ /**
957
+ * Viewport y coordinate in CSS pixels.
958
+ */
959
+ y?: number;
960
+ }
961
+
962
+ /**
963
+ * Sanitized `Input.synthesizeScrollGesture` arguments. Canonical input:
964
+ * `Input.synthesizeScrollGesture` in devtools-protocol@2d019e73, pinned at
965
+ * https://github.com/ChromeDevTools/devtools-protocol/blob/2d019e73eb371d1d6985d26d395d78bd8f8a22ba/json/browser_protocol.json.
966
+ * Every argument of this command has a retained or redacted decision in
967
+ * lib/devtoolsproxy/testdata/cdp_arguments.yaml.
968
+ */
969
+ export interface BrowserCdpInputSynthesizeScrollGestureCommandData {
970
+ method: 'Input.synthesizeScrollGesture';
971
+
972
+ /**
973
+ * The command's JSON-RPC id, so the command can be joined to the result the
974
+ * browser returned for it. Absent when the client sent none.
975
+ */
976
+ command_id?: number;
977
+
978
+ /**
979
+ * Identifies the CDP proxy connection the command arrived on, matching
980
+ * `cdp_connect` and `cdp_disconnect`. Two clients driving the same browser are
981
+ * told apart by this.
982
+ */
983
+ connection_id?: string;
984
+
985
+ /**
986
+ * Input source the synthesized gesture emulates. A value the protocol does not
987
+ * define is reported as `other`.
988
+ */
989
+ gesture_source_type?: 'default' | 'touch' | 'mouse' | 'other';
990
+
991
+ /**
992
+ * Whether fling was suppressed.
993
+ */
994
+ prevent_fling?: boolean;
995
+
996
+ /**
997
+ * Number of additional repeats of the scroll.
998
+ */
999
+ repeat_count?: number;
1000
+
1001
+ /**
1002
+ * Delay between repeats, in milliseconds.
1003
+ */
1004
+ repeat_delay_ms?: number;
1005
+
1006
+ /**
1007
+ * CDP session identifier the command was addressed to. Absent for browser-level
1008
+ * commands. Clipped to 128 characters.
1009
+ */
1010
+ session_id?: string;
1011
+
1012
+ /**
1013
+ * Swipe speed in pixels per second.
1014
+ */
1015
+ speed?: number;
1016
+
1017
+ /**
1018
+ * Viewport x coordinate in CSS pixels.
1019
+ */
1020
+ x?: number;
1021
+
1022
+ /**
1023
+ * Horizontal scroll distance in CSS pixels; positive scrolls left.
1024
+ */
1025
+ x_distance?: number;
1026
+
1027
+ /**
1028
+ * Additional horizontal distance scrolled past the end.
1029
+ */
1030
+ x_overscroll?: number;
1031
+
1032
+ /**
1033
+ * Viewport y coordinate in CSS pixels.
1034
+ */
1035
+ y?: number;
1036
+
1037
+ /**
1038
+ * Vertical scroll distance in CSS pixels; positive scrolls up.
1039
+ */
1040
+ y_distance?: number;
1041
+
1042
+ /**
1043
+ * Additional vertical distance scrolled past the end.
1044
+ */
1045
+ y_overscroll?: number;
1046
+ }
1047
+
1048
+ /**
1049
+ * Sanitized `Input.synthesizeTapGesture` arguments. Canonical input:
1050
+ * `Input.synthesizeTapGesture` in devtools-protocol@2d019e73, pinned at
1051
+ * https://github.com/ChromeDevTools/devtools-protocol/blob/2d019e73eb371d1d6985d26d395d78bd8f8a22ba/json/browser_protocol.json.
1052
+ * Every argument of this command has a retained or redacted decision in
1053
+ * lib/devtoolsproxy/testdata/cdp_arguments.yaml.
1054
+ */
1055
+ export interface BrowserCdpInputSynthesizeTapGestureCommandData {
1056
+ method: 'Input.synthesizeTapGesture';
1057
+
1058
+ /**
1059
+ * The command's JSON-RPC id, so the command can be joined to the result the
1060
+ * browser returned for it. Absent when the client sent none.
1061
+ */
1062
+ command_id?: number;
1063
+
1064
+ /**
1065
+ * Identifies the CDP proxy connection the command arrived on, matching
1066
+ * `cdp_connect` and `cdp_disconnect`. Two clients driving the same browser are
1067
+ * told apart by this.
1068
+ */
1069
+ connection_id?: string;
1070
+
1071
+ /**
1072
+ * Duration between touchdown and touchup, in milliseconds.
1073
+ */
1074
+ duration?: number;
1075
+
1076
+ /**
1077
+ * Input source the synthesized gesture emulates. A value the protocol does not
1078
+ * define is reported as `other`.
1079
+ */
1080
+ gesture_source_type?: 'default' | 'touch' | 'mouse' | 'other';
1081
+
1082
+ /**
1083
+ * CDP session identifier the command was addressed to. Absent for browser-level
1084
+ * commands. Clipped to 128 characters.
1085
+ */
1086
+ session_id?: string;
1087
+
1088
+ /**
1089
+ * Number of times to tap (2 is a double tap).
1090
+ */
1091
+ tap_count?: number;
1092
+
1093
+ /**
1094
+ * Viewport x coordinate in CSS pixels.
1095
+ */
1096
+ x?: number;
1097
+
1098
+ /**
1099
+ * Viewport y coordinate in CSS pixels.
1100
+ */
1101
+ y?: number;
1102
+ }
1103
+
1104
+ /**
1105
+ * Sanitized `DOM.setFileInputFiles` arguments. Canonical input:
1106
+ * `DOM.setFileInputFiles` in devtools-protocol@2d019e73, pinned at
1107
+ * https://github.com/ChromeDevTools/devtools-protocol/blob/2d019e73eb371d1d6985d26d395d78bd8f8a22ba/json/browser_protocol.json.
1108
+ * Every argument of this command has a retained or redacted decision in
1109
+ * lib/devtoolsproxy/testdata/cdp_arguments.yaml.
1110
+ */
1111
+ export interface BrowserCdpDomSetFileInputFilesCommandData {
1112
+ /**
1113
+ * Number of files handed to the input. File paths are never captured.
1114
+ */
1115
+ file_count: number;
1116
+
1117
+ method: 'DOM.setFileInputFiles';
1118
+
1119
+ /**
1120
+ * Opaque backend DOM node identifier the command targeted.
1121
+ */
1122
+ backend_node_id?: number;
1123
+
1124
+ /**
1125
+ * The command's JSON-RPC id, so the command can be joined to the result the
1126
+ * browser returned for it. Absent when the client sent none.
1127
+ */
1128
+ command_id?: number;
1129
+
1130
+ /**
1131
+ * Identifies the CDP proxy connection the command arrived on, matching
1132
+ * `cdp_connect` and `cdp_disconnect`. Two clients driving the same browser are
1133
+ * told apart by this.
1134
+ */
1135
+ connection_id?: string;
1136
+
1137
+ /**
1138
+ * Opaque DOM node identifier the command targeted.
1139
+ */
1140
+ node_id?: number;
1141
+
1142
+ /**
1143
+ * Opaque Runtime remote object identifier the command targeted. Clipped to 128
1144
+ * characters; a longer value is not a real identifier.
1145
+ */
1146
+ object_id?: string;
1147
+
1148
+ /**
1149
+ * CDP session identifier the command was addressed to. Absent for browser-level
1150
+ * commands. Clipped to 128 characters.
1151
+ */
1152
+ session_id?: string;
1153
+ }
1154
+
1155
+ /**
1156
+ * Sanitized `DOM.focus` arguments. Canonical input: `DOM.focus` in
1157
+ * devtools-protocol@2d019e73, pinned at
1158
+ * https://github.com/ChromeDevTools/devtools-protocol/blob/2d019e73eb371d1d6985d26d395d78bd8f8a22ba/json/browser_protocol.json.
1159
+ * Every argument of this command has a retained or redacted decision in
1160
+ * lib/devtoolsproxy/testdata/cdp_arguments.yaml.
1161
+ */
1162
+ export interface BrowserCdpDomFocusCommandData {
1163
+ method: 'DOM.focus';
1164
+
1165
+ /**
1166
+ * Opaque backend DOM node identifier the command targeted.
1167
+ */
1168
+ backend_node_id?: number;
1169
+
1170
+ /**
1171
+ * The command's JSON-RPC id, so the command can be joined to the result the
1172
+ * browser returned for it. Absent when the client sent none.
1173
+ */
1174
+ command_id?: number;
1175
+
1176
+ /**
1177
+ * Identifies the CDP proxy connection the command arrived on, matching
1178
+ * `cdp_connect` and `cdp_disconnect`. Two clients driving the same browser are
1179
+ * told apart by this.
1180
+ */
1181
+ connection_id?: string;
1182
+
1183
+ /**
1184
+ * Opaque DOM node identifier the command targeted.
1185
+ */
1186
+ node_id?: number;
1187
+
1188
+ /**
1189
+ * Opaque Runtime remote object identifier the command targeted. Clipped to 128
1190
+ * characters; a longer value is not a real identifier.
1191
+ */
1192
+ object_id?: string;
1193
+
1194
+ /**
1195
+ * CDP session identifier the command was addressed to. Absent for browser-level
1196
+ * commands. Clipped to 128 characters.
1197
+ */
1198
+ session_id?: string;
1199
+ }
1200
+
1201
+ /**
1202
+ * Sanitized `DOM.scrollIntoViewIfNeeded` arguments. Canonical input:
1203
+ * `DOM.scrollIntoViewIfNeeded` in devtools-protocol@2d019e73, pinned at
1204
+ * https://github.com/ChromeDevTools/devtools-protocol/blob/2d019e73eb371d1d6985d26d395d78bd8f8a22ba/json/browser_protocol.json.
1205
+ * Every argument of this command has a retained or redacted decision in
1206
+ * lib/devtoolsproxy/testdata/cdp_arguments.yaml.
1207
+ */
1208
+ export interface BrowserCdpDomScrollIntoViewIfNeededCommandData {
1209
+ method: 'DOM.scrollIntoViewIfNeeded';
1210
+
1211
+ /**
1212
+ * Opaque backend DOM node identifier the command targeted.
1213
+ */
1214
+ backend_node_id?: number;
1215
+
1216
+ /**
1217
+ * The command's JSON-RPC id, so the command can be joined to the result the
1218
+ * browser returned for it. Absent when the client sent none.
1219
+ */
1220
+ command_id?: number;
1221
+
1222
+ /**
1223
+ * Identifies the CDP proxy connection the command arrived on, matching
1224
+ * `cdp_connect` and `cdp_disconnect`. Two clients driving the same browser are
1225
+ * told apart by this.
1226
+ */
1227
+ connection_id?: string;
1228
+
1229
+ /**
1230
+ * Opaque DOM node identifier the command targeted.
1231
+ */
1232
+ node_id?: number;
1233
+
1234
+ /**
1235
+ * Opaque Runtime remote object identifier the command targeted. Clipped to 128
1236
+ * characters; a longer value is not a real identifier.
1237
+ */
1238
+ object_id?: string;
1239
+
1240
+ /**
1241
+ * Height of the rect the command scrolled to.
1242
+ */
1243
+ rect_height?: number;
1244
+
1245
+ /**
1246
+ * Width of the rect the command scrolled to.
1247
+ */
1248
+ rect_width?: number;
1249
+
1250
+ /**
1251
+ * X offset of the rect the command scrolled to, relative to the node.
1252
+ */
1253
+ rect_x?: number;
1254
+
1255
+ /**
1256
+ * Y offset of the rect the command scrolled to, relative to the node.
1257
+ */
1258
+ rect_y?: number;
1259
+
1260
+ /**
1261
+ * CDP session identifier the command was addressed to. Absent for browser-level
1262
+ * commands. Clipped to 128 characters.
1263
+ */
1264
+ session_id?: string;
1265
+ }
1266
+
1267
+ /**
1268
+ * Sanitized `Page.bringToFront` arguments. Canonical input: `Page.bringToFront` in
1269
+ * devtools-protocol@2d019e73, pinned at
1270
+ * https://github.com/ChromeDevTools/devtools-protocol/blob/2d019e73eb371d1d6985d26d395d78bd8f8a22ba/json/browser_protocol.json.
1271
+ * Every argument of this command has a retained or redacted decision in
1272
+ * lib/devtoolsproxy/testdata/cdp_arguments.yaml.
1273
+ */
1274
+ export interface BrowserCdpPageBringToFrontCommandData {
1275
+ method: 'Page.bringToFront';
1276
+
1277
+ /**
1278
+ * The command's JSON-RPC id, so the command can be joined to the result the
1279
+ * browser returned for it. Absent when the client sent none.
1280
+ */
1281
+ command_id?: number;
1282
+
1283
+ /**
1284
+ * Identifies the CDP proxy connection the command arrived on, matching
1285
+ * `cdp_connect` and `cdp_disconnect`. Two clients driving the same browser are
1286
+ * told apart by this.
1287
+ */
1288
+ connection_id?: string;
1289
+
1290
+ /**
1291
+ * CDP session identifier the command was addressed to. Absent for browser-level
1292
+ * commands. Clipped to 128 characters.
1293
+ */
1294
+ session_id?: string;
1295
+ }
1296
+
1297
+ /**
1298
+ * Sanitized `Page.captureScreenshot` arguments. Canonical input:
1299
+ * `Page.captureScreenshot` in devtools-protocol@2d019e73, pinned at
1300
+ * https://github.com/ChromeDevTools/devtools-protocol/blob/2d019e73eb371d1d6985d26d395d78bd8f8a22ba/json/browser_protocol.json.
1301
+ * Every argument of this command has a retained or redacted decision in
1302
+ * lib/devtoolsproxy/testdata/cdp_arguments.yaml.
1303
+ */
1304
+ export interface BrowserCdpPageCaptureScreenshotCommandData {
1305
+ method: 'Page.captureScreenshot';
1306
+
1307
+ /**
1308
+ * Whether the capture extended past the viewport.
1309
+ */
1310
+ capture_beyond_viewport?: boolean;
1311
+
1312
+ /**
1313
+ * Clip region height in CSS pixels.
1314
+ */
1315
+ clip_height?: number;
1316
+
1317
+ /**
1318
+ * Clip region page scale factor.
1319
+ */
1320
+ clip_scale?: number;
1321
+
1322
+ /**
1323
+ * Clip region width in CSS pixels.
1324
+ */
1325
+ clip_width?: number;
1326
+
1327
+ /**
1328
+ * Clip region x offset in CSS pixels.
1329
+ */
1330
+ clip_x?: number;
1331
+
1332
+ /**
1333
+ * Clip region y offset in CSS pixels.
1334
+ */
1335
+ clip_y?: number;
1336
+
1337
+ /**
1338
+ * The command's JSON-RPC id, so the command can be joined to the result the
1339
+ * browser returned for it. Absent when the client sent none.
1340
+ */
1341
+ command_id?: number;
1342
+
1343
+ /**
1344
+ * Identifies the CDP proxy connection the command arrived on, matching
1345
+ * `cdp_connect` and `cdp_disconnect`. Two clients driving the same browser are
1346
+ * told apart by this.
1347
+ */
1348
+ connection_id?: string;
1349
+
1350
+ /**
1351
+ * Image format requested (`jpeg`, `png` or `webp`). A value the protocol does not
1352
+ * define is reported as `other`.
1353
+ */
1354
+ format?: 'jpeg' | 'png' | 'webp' | 'other';
1355
+
1356
+ /**
1357
+ * Whether the capture was taken from the surface rather than the view.
1358
+ */
1359
+ from_surface?: boolean;
1360
+
1361
+ /**
1362
+ * Whether encoding favored speed over size.
1363
+ */
1364
+ optimize_for_speed?: boolean;
1365
+
1366
+ /**
1367
+ * Compression quality, 0 to 100, for lossy formats.
1368
+ */
1369
+ quality?: number;
1370
+
1371
+ /**
1372
+ * CDP session identifier the command was addressed to. Absent for browser-level
1373
+ * commands. Clipped to 128 characters.
1374
+ */
1375
+ session_id?: string;
1376
+ }
1377
+
1378
+ /**
1379
+ * Sanitized `Page.captureSnapshot` arguments. Canonical input:
1380
+ * `Page.captureSnapshot` in devtools-protocol@2d019e73, pinned at
1381
+ * https://github.com/ChromeDevTools/devtools-protocol/blob/2d019e73eb371d1d6985d26d395d78bd8f8a22ba/json/browser_protocol.json.
1382
+ * Every argument of this command has a retained or redacted decision in
1383
+ * lib/devtoolsproxy/testdata/cdp_arguments.yaml.
1384
+ */
1385
+ export interface BrowserCdpPageCaptureSnapshotCommandData {
1386
+ method: 'Page.captureSnapshot';
1387
+
1388
+ /**
1389
+ * The command's JSON-RPC id, so the command can be joined to the result the
1390
+ * browser returned for it. Absent when the client sent none.
1391
+ */
1392
+ command_id?: number;
1393
+
1394
+ /**
1395
+ * Identifies the CDP proxy connection the command arrived on, matching
1396
+ * `cdp_connect` and `cdp_disconnect`. Two clients driving the same browser are
1397
+ * told apart by this.
1398
+ */
1399
+ connection_id?: string;
1400
+
1401
+ /**
1402
+ * Snapshot format requested (`mhtml`). A value the protocol does not define is
1403
+ * reported as `other`.
1404
+ */
1405
+ format?: 'mhtml' | 'other';
1406
+
1407
+ /**
1408
+ * CDP session identifier the command was addressed to. Absent for browser-level
1409
+ * commands. Clipped to 128 characters.
1410
+ */
1411
+ session_id?: string;
1412
+ }
1413
+
1414
+ /**
1415
+ * Sanitized `Page.handleJavaScriptDialog` arguments. Canonical input:
1416
+ * `Page.handleJavaScriptDialog` in devtools-protocol@2d019e73, pinned at
1417
+ * https://github.com/ChromeDevTools/devtools-protocol/blob/2d019e73eb371d1d6985d26d395d78bd8f8a22ba/json/browser_protocol.json.
1418
+ * Every argument of this command has a retained or redacted decision in
1419
+ * lib/devtoolsproxy/testdata/cdp_arguments.yaml.
1420
+ */
1421
+ export interface BrowserCdpPageHandleJavaScriptDialogCommandData {
1422
+ /**
1423
+ * Whether the dialog was accepted or dismissed.
1424
+ */
1425
+ accept: boolean;
1426
+
1427
+ method: 'Page.handleJavaScriptDialog';
1428
+
1429
+ /**
1430
+ * The command's JSON-RPC id, so the command can be joined to the result the
1431
+ * browser returned for it. Absent when the client sent none.
1432
+ */
1433
+ command_id?: number;
1434
+
1435
+ /**
1436
+ * Identifies the CDP proxy connection the command arrived on, matching
1437
+ * `cdp_connect` and `cdp_disconnect`. Two clients driving the same browser are
1438
+ * told apart by this.
1439
+ */
1440
+ connection_id?: string;
1441
+
1442
+ /**
1443
+ * Number of characters entered into a prompt dialog. The text itself is never
1444
+ * captured.
1445
+ */
1446
+ prompt_text_length?: number;
1447
+
1448
+ /**
1449
+ * CDP session identifier the command was addressed to. Absent for browser-level
1450
+ * commands. Clipped to 128 characters.
1451
+ */
1452
+ session_id?: string;
1453
+ }
1454
+
1455
+ /**
1456
+ * Sanitized `Page.navigate` arguments. Canonical input: `Page.navigate` in
1457
+ * devtools-protocol@2d019e73, pinned at
1458
+ * https://github.com/ChromeDevTools/devtools-protocol/blob/2d019e73eb371d1d6985d26d395d78bd8f8a22ba/json/browser_protocol.json.
1459
+ * Every argument of this command has a retained or redacted decision in
1460
+ * lib/devtoolsproxy/testdata/cdp_arguments.yaml.
1461
+ */
1462
+ export interface BrowserCdpPageNavigateCommandData {
1463
+ method: 'Page.navigate';
1464
+
1465
+ /**
1466
+ * The command's JSON-RPC id, so the command can be joined to the result the
1467
+ * browser returned for it. Absent when the client sent none.
1468
+ */
1469
+ command_id?: number;
1470
+
1471
+ /**
1472
+ * Identifies the CDP proxy connection the command arrived on, matching
1473
+ * `cdp_connect` and `cdp_disconnect`. Two clients driving the same browser are
1474
+ * told apart by this.
1475
+ */
1476
+ connection_id?: string;
1477
+
1478
+ /**
1479
+ * Opaque frame identifier. Clipped to 128 characters; a longer value is not a real
1480
+ * identifier.
1481
+ */
1482
+ frame_id?: string;
1483
+
1484
+ /**
1485
+ * Referrer policy named by the command. A value the protocol does not define is
1486
+ * reported as `other`.
1487
+ */
1488
+ referrer_policy?:
1489
+ | 'noReferrer'
1490
+ | 'noReferrerWhenDowngrade'
1491
+ | 'origin'
1492
+ | 'originWhenCrossOrigin'
1493
+ | 'sameOrigin'
1494
+ | 'strictOrigin'
1495
+ | 'strictOriginWhenCrossOrigin'
1496
+ | 'unsafeUrl'
1497
+ | 'other';
1498
+
1499
+ /**
1500
+ * Whether the command carried a referrer. The referrer itself is never captured.
1501
+ */
1502
+ referrer_present?: boolean;
1503
+
1504
+ /**
1505
+ * CDP session identifier the command was addressed to. Absent for browser-level
1506
+ * commands. Clipped to 128 characters.
1507
+ */
1508
+ session_id?: string;
1509
+
1510
+ /**
1511
+ * Navigation reason reported by the caller (e.g. `link`, `typed`, `reload`). A
1512
+ * value the protocol does not define is reported as `other`.
1513
+ */
1514
+ transition_type?:
1515
+ | 'link'
1516
+ | 'typed'
1517
+ | 'address_bar'
1518
+ | 'auto_bookmark'
1519
+ | 'auto_subframe'
1520
+ | 'manual_subframe'
1521
+ | 'generated'
1522
+ | 'auto_toplevel'
1523
+ | 'form_submit'
1524
+ | 'reload'
1525
+ | 'keyword'
1526
+ | 'keyword_generated'
1527
+ | 'other';
1528
+
1529
+ /**
1530
+ * Scheme of the destination URL (e.g. `https`, `about`, `data`). The rest of the
1531
+ * URL is never captured.
1532
+ */
1533
+ url_scheme?: string;
1534
+ }
1535
+
1536
+ /**
1537
+ * Sanitized `Page.navigateToHistoryEntry` arguments. Canonical input:
1538
+ * `Page.navigateToHistoryEntry` in devtools-protocol@2d019e73, pinned at
1539
+ * https://github.com/ChromeDevTools/devtools-protocol/blob/2d019e73eb371d1d6985d26d395d78bd8f8a22ba/json/browser_protocol.json.
1540
+ * Every argument of this command has a retained or redacted decision in
1541
+ * lib/devtoolsproxy/testdata/cdp_arguments.yaml.
1542
+ */
1543
+ export interface BrowserCdpPageNavigateToHistoryEntryCommandData {
1544
+ /**
1545
+ * History entry the command navigated to.
1546
+ */
1547
+ entry_id: number;
1548
+
1549
+ method: 'Page.navigateToHistoryEntry';
1550
+
1551
+ /**
1552
+ * The command's JSON-RPC id, so the command can be joined to the result the
1553
+ * browser returned for it. Absent when the client sent none.
1554
+ */
1555
+ command_id?: number;
1556
+
1557
+ /**
1558
+ * Identifies the CDP proxy connection the command arrived on, matching
1559
+ * `cdp_connect` and `cdp_disconnect`. Two clients driving the same browser are
1560
+ * told apart by this.
1561
+ */
1562
+ connection_id?: string;
1563
+
1564
+ /**
1565
+ * CDP session identifier the command was addressed to. Absent for browser-level
1566
+ * commands. Clipped to 128 characters.
1567
+ */
1568
+ session_id?: string;
1569
+ }
1570
+
1571
+ /**
1572
+ * Sanitized `Page.reload` arguments. Canonical input: `Page.reload` in
1573
+ * devtools-protocol@2d019e73, pinned at
1574
+ * https://github.com/ChromeDevTools/devtools-protocol/blob/2d019e73eb371d1d6985d26d395d78bd8f8a22ba/json/browser_protocol.json.
1575
+ * Every argument of this command has a retained or redacted decision in
1576
+ * lib/devtoolsproxy/testdata/cdp_arguments.yaml.
1577
+ */
1578
+ export interface BrowserCdpPageReloadCommandData {
1579
+ method: 'Page.reload';
1580
+
1581
+ /**
1582
+ * The command's JSON-RPC id, so the command can be joined to the result the
1583
+ * browser returned for it. Absent when the client sent none.
1584
+ */
1585
+ command_id?: number;
1586
+
1587
+ /**
1588
+ * Identifies the CDP proxy connection the command arrived on, matching
1589
+ * `cdp_connect` and `cdp_disconnect`. Two clients driving the same browser are
1590
+ * told apart by this.
1591
+ */
1592
+ connection_id?: string;
1593
+
1594
+ /**
1595
+ * Whether the reload bypassed the cache.
1596
+ */
1597
+ ignore_cache?: boolean;
1598
+
1599
+ /**
1600
+ * Opaque document loader identifier. Clipped to 128 characters; a longer value is
1601
+ * not a real identifier.
1602
+ */
1603
+ loader_id?: string;
1604
+
1605
+ /**
1606
+ * Number of characters in the injected script.
1607
+ */
1608
+ script_length?: number;
1609
+
1610
+ /**
1611
+ * CDP session identifier the command was addressed to. Absent for browser-level
1612
+ * commands. Clipped to 128 characters.
1613
+ */
1614
+ session_id?: string;
1615
+ }
1616
+
1617
+ /**
1618
+ * Sanitized `Page.printToPDF` arguments. Canonical input: `Page.printToPDF` in
1619
+ * devtools-protocol@2d019e73, pinned at
1620
+ * https://github.com/ChromeDevTools/devtools-protocol/blob/2d019e73eb371d1d6985d26d395d78bd8f8a22ba/json/browser_protocol.json.
1621
+ * Every argument of this command has a retained or redacted decision in
1622
+ * lib/devtoolsproxy/testdata/cdp_arguments.yaml.
1623
+ */
1624
+ export interface BrowserCdpPagePrintToPdfCommandData {
1625
+ method: 'Page.printToPDF';
1626
+
1627
+ /**
1628
+ * The command's JSON-RPC id, so the command can be joined to the result the
1629
+ * browser returned for it. Absent when the client sent none.
1630
+ */
1631
+ command_id?: number;
1632
+
1633
+ /**
1634
+ * Identifies the CDP proxy connection the command arrived on, matching
1635
+ * `cdp_connect` and `cdp_disconnect`. Two clients driving the same browser are
1636
+ * told apart by this.
1637
+ */
1638
+ connection_id?: string;
1639
+
1640
+ /**
1641
+ * Whether a header and footer were rendered.
1642
+ */
1643
+ display_header_footer?: boolean;
1644
+
1645
+ /**
1646
+ * Whether a footer template was supplied. The template itself is never captured.
1647
+ */
1648
+ footer_template_present?: boolean;
1649
+
1650
+ /**
1651
+ * Whether a document outline was embedded.
1652
+ */
1653
+ generate_document_outline?: boolean;
1654
+
1655
+ /**
1656
+ * Whether a tagged (accessible) PDF was requested.
1657
+ */
1658
+ generate_tagged_pdf?: boolean;
1659
+
1660
+ /**
1661
+ * Whether a header template was supplied. The template itself is never captured.
1662
+ */
1663
+ header_template_present?: boolean;
1664
+
1665
+ /**
1666
+ * Whether the page was laid out in landscape.
1667
+ */
1668
+ landscape?: boolean;
1669
+
1670
+ /**
1671
+ * Bottom margin in inches.
1672
+ */
1673
+ margin_bottom?: number;
1674
+
1675
+ /**
1676
+ * Left margin in inches.
1677
+ */
1678
+ margin_left?: number;
1679
+
1680
+ /**
1681
+ * Right margin in inches.
1682
+ */
1683
+ margin_right?: number;
1684
+
1685
+ /**
1686
+ * Top margin in inches.
1687
+ */
1688
+ margin_top?: number;
1689
+
1690
+ /**
1691
+ * Whether a page range was supplied.
1692
+ */
1693
+ page_ranges_present?: boolean;
1694
+
1695
+ /**
1696
+ * Paper height in inches.
1697
+ */
1698
+ paper_height?: number;
1699
+
1700
+ /**
1701
+ * Paper width in inches.
1702
+ */
1703
+ paper_width?: number;
1704
+
1705
+ /**
1706
+ * Whether the CSS page size was preferred over the paper size.
1707
+ */
1708
+ prefer_css_page_size?: boolean;
1709
+
1710
+ /**
1711
+ * Whether background graphics were printed.
1712
+ */
1713
+ print_background?: boolean;
1714
+
1715
+ /**
1716
+ * Page render scale.
1717
+ */
1718
+ scale?: number;
1719
+
1720
+ /**
1721
+ * CDP session identifier the command was addressed to. Absent for browser-level
1722
+ * commands. Clipped to 128 characters.
1723
+ */
1724
+ session_id?: string;
1725
+
1726
+ /**
1727
+ * How the PDF was returned (`ReturnAsBase64` or `ReturnAsStream`). A value the
1728
+ * protocol does not define is reported as `other`.
1729
+ */
1730
+ transfer_mode?: 'ReturnAsBase64' | 'ReturnAsStream' | 'other';
1731
+ }
1732
+
1733
+ /**
1734
+ * Sanitized `Page.startScreencast` arguments. Canonical input:
1735
+ * `Page.startScreencast` in devtools-protocol@2d019e73, pinned at
1736
+ * https://github.com/ChromeDevTools/devtools-protocol/blob/2d019e73eb371d1d6985d26d395d78bd8f8a22ba/json/browser_protocol.json.
1737
+ * Every argument of this command has a retained or redacted decision in
1738
+ * lib/devtoolsproxy/testdata/cdp_arguments.yaml.
1739
+ */
1740
+ export interface BrowserCdpPageStartScreencastCommandData {
1741
+ method: 'Page.startScreencast';
1742
+
1743
+ /**
1744
+ * The command's JSON-RPC id, so the command can be joined to the result the
1745
+ * browser returned for it. Absent when the client sent none.
1746
+ */
1747
+ command_id?: number;
1748
+
1749
+ /**
1750
+ * Identifies the CDP proxy connection the command arrived on, matching
1751
+ * `cdp_connect` and `cdp_disconnect`. Two clients driving the same browser are
1752
+ * told apart by this.
1753
+ */
1754
+ connection_id?: string;
1755
+
1756
+ /**
1757
+ * Frame sampling interval.
1758
+ */
1759
+ every_nth_frame?: number;
1760
+
1761
+ /**
1762
+ * Frame format requested (`jpeg` or `png`). A value the protocol does not define
1763
+ * is reported as `other`.
1764
+ */
1765
+ format?: 'jpeg' | 'png' | 'other';
1766
+
1767
+ /**
1768
+ * Maximum frame height in pixels.
1769
+ */
1770
+ max_height?: number;
1771
+
1772
+ /**
1773
+ * Maximum frame width in pixels.
1774
+ */
1775
+ max_width?: number;
1776
+
1777
+ /**
1778
+ * Compression quality, 0 to 100.
1779
+ */
1780
+ quality?: number;
1781
+
1782
+ /**
1783
+ * CDP session identifier the command was addressed to. Absent for browser-level
1784
+ * commands. Clipped to 128 characters.
1785
+ */
1786
+ session_id?: string;
1787
+ }
1788
+
1789
+ /**
1790
+ * Sanitized `Page.stopScreencast` arguments. Canonical input:
1791
+ * `Page.stopScreencast` in devtools-protocol@2d019e73, pinned at
1792
+ * https://github.com/ChromeDevTools/devtools-protocol/blob/2d019e73eb371d1d6985d26d395d78bd8f8a22ba/json/browser_protocol.json.
1793
+ * Every argument of this command has a retained or redacted decision in
1794
+ * lib/devtoolsproxy/testdata/cdp_arguments.yaml.
1795
+ */
1796
+ export interface BrowserCdpPageStopScreencastCommandData {
1797
+ method: 'Page.stopScreencast';
1798
+
1799
+ /**
1800
+ * The command's JSON-RPC id, so the command can be joined to the result the
1801
+ * browser returned for it. Absent when the client sent none.
1802
+ */
1803
+ command_id?: number;
1804
+
1805
+ /**
1806
+ * Identifies the CDP proxy connection the command arrived on, matching
1807
+ * `cdp_connect` and `cdp_disconnect`. Two clients driving the same browser are
1808
+ * told apart by this.
1809
+ */
1810
+ connection_id?: string;
1811
+
1812
+ /**
1813
+ * CDP session identifier the command was addressed to. Absent for browser-level
1814
+ * commands. Clipped to 128 characters.
1815
+ */
1816
+ session_id?: string;
1817
+ }
1818
+
1819
+ /**
1820
+ * Sanitized `Page.stopLoading` arguments. Canonical input: `Page.stopLoading` in
1821
+ * devtools-protocol@2d019e73, pinned at
1822
+ * https://github.com/ChromeDevTools/devtools-protocol/blob/2d019e73eb371d1d6985d26d395d78bd8f8a22ba/json/browser_protocol.json.
1823
+ * Every argument of this command has a retained or redacted decision in
1824
+ * lib/devtoolsproxy/testdata/cdp_arguments.yaml.
1825
+ */
1826
+ export interface BrowserCdpPageStopLoadingCommandData {
1827
+ method: 'Page.stopLoading';
1828
+
1829
+ /**
1830
+ * The command's JSON-RPC id, so the command can be joined to the result the
1831
+ * browser returned for it. Absent when the client sent none.
1832
+ */
1833
+ command_id?: number;
1834
+
1835
+ /**
1836
+ * Identifies the CDP proxy connection the command arrived on, matching
1837
+ * `cdp_connect` and `cdp_disconnect`. Two clients driving the same browser are
1838
+ * told apart by this.
1839
+ */
1840
+ connection_id?: string;
1841
+
1842
+ /**
1843
+ * CDP session identifier the command was addressed to. Absent for browser-level
1844
+ * commands. Clipped to 128 characters.
1845
+ */
1846
+ session_id?: string;
1847
+ }
1848
+
1849
+ /**
1850
+ * Sanitized `Page.close` arguments. Canonical input: `Page.close` in
1851
+ * devtools-protocol@2d019e73, pinned at
1852
+ * https://github.com/ChromeDevTools/devtools-protocol/blob/2d019e73eb371d1d6985d26d395d78bd8f8a22ba/json/browser_protocol.json.
1853
+ * Every argument of this command has a retained or redacted decision in
1854
+ * lib/devtoolsproxy/testdata/cdp_arguments.yaml.
1855
+ */
1856
+ export interface BrowserCdpPageCloseCommandData {
1857
+ method: 'Page.close';
1858
+
1859
+ /**
1860
+ * The command's JSON-RPC id, so the command can be joined to the result the
1861
+ * browser returned for it. Absent when the client sent none.
1862
+ */
1863
+ command_id?: number;
1864
+
1865
+ /**
1866
+ * Identifies the CDP proxy connection the command arrived on, matching
1867
+ * `cdp_connect` and `cdp_disconnect`. Two clients driving the same browser are
1868
+ * told apart by this.
1869
+ */
1870
+ connection_id?: string;
1871
+
1872
+ /**
1873
+ * CDP session identifier the command was addressed to. Absent for browser-level
1874
+ * commands. Clipped to 128 characters.
1875
+ */
1876
+ session_id?: string;
1877
+ }
1878
+
1879
+ /**
1880
+ * Sanitized `Page.setWebLifecycleState` arguments. Canonical input:
1881
+ * `Page.setWebLifecycleState` in devtools-protocol@2d019e73, pinned at
1882
+ * https://github.com/ChromeDevTools/devtools-protocol/blob/2d019e73eb371d1d6985d26d395d78bd8f8a22ba/json/browser_protocol.json.
1883
+ * Every argument of this command has a retained or redacted decision in
1884
+ * lib/devtoolsproxy/testdata/cdp_arguments.yaml.
1885
+ */
1886
+ export interface BrowserCdpPageSetWebLifecycleStateCommandData {
1887
+ method: 'Page.setWebLifecycleState';
1888
+
1889
+ /**
1890
+ * Lifecycle state applied (`frozen` or `active`). A value the protocol does not
1891
+ * define is reported as `other`.
1892
+ */
1893
+ state: 'frozen' | 'active' | 'other';
1894
+
1895
+ /**
1896
+ * The command's JSON-RPC id, so the command can be joined to the result the
1897
+ * browser returned for it. Absent when the client sent none.
1898
+ */
1899
+ command_id?: number;
1900
+
1901
+ /**
1902
+ * Identifies the CDP proxy connection the command arrived on, matching
1903
+ * `cdp_connect` and `cdp_disconnect`. Two clients driving the same browser are
1904
+ * told apart by this.
1905
+ */
1906
+ connection_id?: string;
1907
+
1908
+ /**
1909
+ * CDP session identifier the command was addressed to. Absent for browser-level
1910
+ * commands. Clipped to 128 characters.
1911
+ */
1912
+ session_id?: string;
1913
+ }
1914
+
1915
+ /**
1916
+ * Sanitized `Target.activateTarget` arguments. Canonical input:
1917
+ * `Target.activateTarget` in devtools-protocol@2d019e73, pinned at
1918
+ * https://github.com/ChromeDevTools/devtools-protocol/blob/2d019e73eb371d1d6985d26d395d78bd8f8a22ba/json/browser_protocol.json.
1919
+ * Every argument of this command has a retained or redacted decision in
1920
+ * lib/devtoolsproxy/testdata/cdp_arguments.yaml.
1921
+ */
1922
+ export interface BrowserCdpTargetActivateTargetCommandData {
1923
+ method: 'Target.activateTarget';
1924
+
1925
+ /**
1926
+ * Opaque target identifier. Clipped to 128 characters; a longer value is not a
1927
+ * real identifier.
1928
+ */
1929
+ target_id: string;
1930
+
1931
+ /**
1932
+ * The command's JSON-RPC id, so the command can be joined to the result the
1933
+ * browser returned for it. Absent when the client sent none.
1934
+ */
1935
+ command_id?: number;
1936
+
1937
+ /**
1938
+ * Identifies the CDP proxy connection the command arrived on, matching
1939
+ * `cdp_connect` and `cdp_disconnect`. Two clients driving the same browser are
1940
+ * told apart by this.
1941
+ */
1942
+ connection_id?: string;
1943
+
1944
+ /**
1945
+ * CDP session identifier the command was addressed to. Absent for browser-level
1946
+ * commands. Clipped to 128 characters.
1947
+ */
1948
+ session_id?: string;
1949
+ }
1950
+
1951
+ /**
1952
+ * Sanitized `Target.closeTarget` arguments. Canonical input: `Target.closeTarget`
1953
+ * in devtools-protocol@2d019e73, pinned at
1954
+ * https://github.com/ChromeDevTools/devtools-protocol/blob/2d019e73eb371d1d6985d26d395d78bd8f8a22ba/json/browser_protocol.json.
1955
+ * Every argument of this command has a retained or redacted decision in
1956
+ * lib/devtoolsproxy/testdata/cdp_arguments.yaml.
1957
+ */
1958
+ export interface BrowserCdpTargetCloseTargetCommandData {
1959
+ method: 'Target.closeTarget';
1960
+
1961
+ /**
1962
+ * Opaque target identifier. Clipped to 128 characters; a longer value is not a
1963
+ * real identifier.
1964
+ */
1965
+ target_id: string;
1966
+
1967
+ /**
1968
+ * The command's JSON-RPC id, so the command can be joined to the result the
1969
+ * browser returned for it. Absent when the client sent none.
1970
+ */
1971
+ command_id?: number;
1972
+
1973
+ /**
1974
+ * Identifies the CDP proxy connection the command arrived on, matching
1975
+ * `cdp_connect` and `cdp_disconnect`. Two clients driving the same browser are
1976
+ * told apart by this.
1977
+ */
1978
+ connection_id?: string;
1979
+
1980
+ /**
1981
+ * CDP session identifier the command was addressed to. Absent for browser-level
1982
+ * commands. Clipped to 128 characters.
1983
+ */
1984
+ session_id?: string;
1985
+ }
1986
+
1987
+ /**
1988
+ * Sanitized `Target.createTarget` arguments. Canonical input:
1989
+ * `Target.createTarget` in devtools-protocol@2d019e73, pinned at
1990
+ * https://github.com/ChromeDevTools/devtools-protocol/blob/2d019e73eb371d1d6985d26d395d78bd8f8a22ba/json/browser_protocol.json.
1991
+ * Every argument of this command has a retained or redacted decision in
1992
+ * lib/devtoolsproxy/testdata/cdp_arguments.yaml.
1993
+ */
1994
+ export interface BrowserCdpTargetCreateTargetCommandData {
1995
+ method: 'Target.createTarget';
1996
+
1997
+ /**
1998
+ * Whether the target was created in the background.
1999
+ */
2000
+ background?: boolean;
2001
+
2002
+ /**
2003
+ * Opaque browser context identifier. Clipped to 128 characters; a longer value is
2004
+ * not a real identifier.
2005
+ */
2006
+ browser_context_id?: string;
2007
+
2008
+ /**
2009
+ * The command's JSON-RPC id, so the command can be joined to the result the
2010
+ * browser returned for it. Absent when the client sent none.
2011
+ */
2012
+ command_id?: number;
2013
+
2014
+ /**
2015
+ * Identifies the CDP proxy connection the command arrived on, matching
2016
+ * `cdp_connect` and `cdp_disconnect`. Two clients driving the same browser are
2017
+ * told apart by this.
2018
+ */
2019
+ connection_id?: string;
2020
+
2021
+ /**
2022
+ * Whether BeginFrame control was enabled (headless only).
2023
+ */
2024
+ enable_begin_frame_control?: boolean;
2025
+
2026
+ /**
2027
+ * Whether the new target was focused.
2028
+ */
2029
+ focus?: boolean;
2030
+
2031
+ /**
2032
+ * Whether a tab target rather than a page target was created.
2033
+ */
2034
+ for_tab?: boolean;
2035
+
2036
+ /**
2037
+ * Window height in DIP.
2038
+ */
2039
+ height?: number;
2040
+
2041
+ /**
2042
+ * Whether the target was created hidden.
2043
+ */
2044
+ hidden?: boolean;
2045
+
2046
+ /**
2047
+ * Window x position in screen coordinates.
2048
+ */
2049
+ left?: number;
2050
+
2051
+ /**
2052
+ * Whether a new window was requested.
2053
+ */
2054
+ new_window?: boolean;
2055
+
2056
+ /**
2057
+ * CDP session identifier the command was addressed to. Absent for browser-level
2058
+ * commands. Clipped to 128 characters.
2059
+ */
2060
+ session_id?: string;
2061
+
2062
+ /**
2063
+ * Window y position in screen coordinates.
2064
+ */
2065
+ top?: number;
2066
+
2067
+ /**
2068
+ * Scheme of the destination URL (e.g. `https`, `about`, `data`). The rest of the
2069
+ * URL is never captured.
2070
+ */
2071
+ url_scheme?: string;
2072
+
2073
+ /**
2074
+ * Window width in DIP.
2075
+ */
2076
+ width?: number;
2077
+
2078
+ /**
2079
+ * Window state requested (`normal`, `minimized`, `maximized`, `fullscreen`). A
2080
+ * value the protocol does not define is reported as `other`.
2081
+ */
2082
+ window_state?: 'normal' | 'minimized' | 'maximized' | 'fullscreen' | 'other';
2083
+ }
2084
+
2085
+ /**
2086
+ * Sanitized `Target.createBrowserContext` arguments. Canonical input:
2087
+ * `Target.createBrowserContext` in devtools-protocol@2d019e73, pinned at
2088
+ * https://github.com/ChromeDevTools/devtools-protocol/blob/2d019e73eb371d1d6985d26d395d78bd8f8a22ba/json/browser_protocol.json.
2089
+ * Every argument of this command has a retained or redacted decision in
2090
+ * lib/devtoolsproxy/testdata/cdp_arguments.yaml.
2091
+ */
2092
+ export interface BrowserCdpTargetCreateBrowserContextCommandData {
2093
+ method: 'Target.createBrowserContext';
2094
+
2095
+ /**
2096
+ * The command's JSON-RPC id, so the command can be joined to the result the
2097
+ * browser returned for it. Absent when the client sent none.
2098
+ */
2099
+ command_id?: number;
2100
+
2101
+ /**
2102
+ * Identifies the CDP proxy connection the command arrived on, matching
2103
+ * `cdp_connect` and `cdp_disconnect`. Two clients driving the same browser are
2104
+ * told apart by this.
2105
+ */
2106
+ connection_id?: string;
2107
+
2108
+ /**
2109
+ * Whether the context is disposed when the debugging session detaches.
2110
+ */
2111
+ dispose_on_detach?: boolean;
2112
+
2113
+ /**
2114
+ * Whether a proxy bypass list was configured.
2115
+ */
2116
+ proxy_bypass_list_present?: boolean;
2117
+
2118
+ /**
2119
+ * Whether a proxy was configured. The proxy address is never captured.
2120
+ */
2121
+ proxy_server_present?: boolean;
2122
+
2123
+ /**
2124
+ * CDP session identifier the command was addressed to. Absent for browser-level
2125
+ * commands. Clipped to 128 characters.
2126
+ */
2127
+ session_id?: string;
2128
+
2129
+ /**
2130
+ * Number of origins granted universal network access. The origins themselves are
2131
+ * never captured.
2132
+ */
2133
+ universal_network_access_origin_count?: number;
2134
+ }
2135
+
2136
+ /**
2137
+ * Sanitized `Target.disposeBrowserContext` arguments. Canonical input:
2138
+ * `Target.disposeBrowserContext` in devtools-protocol@2d019e73, pinned at
2139
+ * https://github.com/ChromeDevTools/devtools-protocol/blob/2d019e73eb371d1d6985d26d395d78bd8f8a22ba/json/browser_protocol.json.
2140
+ * Every argument of this command has a retained or redacted decision in
2141
+ * lib/devtoolsproxy/testdata/cdp_arguments.yaml.
2142
+ */
2143
+ export interface BrowserCdpTargetDisposeBrowserContextCommandData {
2144
+ /**
2145
+ * Opaque browser context identifier. Clipped to 128 characters; a longer value is
2146
+ * not a real identifier.
2147
+ */
2148
+ browser_context_id: string;
2149
+
2150
+ method: 'Target.disposeBrowserContext';
2151
+
2152
+ /**
2153
+ * The command's JSON-RPC id, so the command can be joined to the result the
2154
+ * browser returned for it. Absent when the client sent none.
2155
+ */
2156
+ command_id?: number;
2157
+
2158
+ /**
2159
+ * Identifies the CDP proxy connection the command arrived on, matching
2160
+ * `cdp_connect` and `cdp_disconnect`. Two clients driving the same browser are
2161
+ * told apart by this.
2162
+ */
2163
+ connection_id?: string;
2164
+
2165
+ /**
2166
+ * CDP session identifier the command was addressed to. Absent for browser-level
2167
+ * commands. Clipped to 128 characters.
2168
+ */
2169
+ session_id?: string;
2170
+ }
2171
+
2172
+ /**
2173
+ * Sanitized `Target.openDevTools` arguments. Canonical input:
2174
+ * `Target.openDevTools` in devtools-protocol@2d019e73, pinned at
2175
+ * https://github.com/ChromeDevTools/devtools-protocol/blob/2d019e73eb371d1d6985d26d395d78bd8f8a22ba/json/browser_protocol.json.
2176
+ * Every argument of this command has a retained or redacted decision in
2177
+ * lib/devtoolsproxy/testdata/cdp_arguments.yaml.
2178
+ */
2179
+ export interface BrowserCdpTargetOpenDevToolsCommandData {
2180
+ method: 'Target.openDevTools';
2181
+
2182
+ /**
2183
+ * Opaque target identifier. Clipped to 128 characters; a longer value is not a
2184
+ * real identifier.
2185
+ */
2186
+ target_id: string;
2187
+
2188
+ /**
2189
+ * The command's JSON-RPC id, so the command can be joined to the result the
2190
+ * browser returned for it. Absent when the client sent none.
2191
+ */
2192
+ command_id?: number;
2193
+
2194
+ /**
2195
+ * Identifies the CDP proxy connection the command arrived on, matching
2196
+ * `cdp_connect` and `cdp_disconnect`. Two clients driving the same browser are
2197
+ * told apart by this.
2198
+ */
2199
+ connection_id?: string;
2200
+
2201
+ /**
2202
+ * DevTools panel opened. Clipped to 128 characters; a longer value is not a real
2203
+ * identifier.
2204
+ */
2205
+ panel_id?: string;
2206
+
2207
+ /**
2208
+ * CDP session identifier the command was addressed to. Absent for browser-level
2209
+ * commands. Clipped to 128 characters.
2210
+ */
2211
+ session_id?: string;
132
2212
  }
133
- }
134
2213
 
135
- /**
136
- * CDP Runtime.StackTrace representing the JavaScript call stack at the time of an
137
- * event. Fields use CDP naming conventions rather than snake_case to match the
138
- * Chrome DevTools Protocol wire format.
139
- */
140
- export interface BrowserCallStack {
141
2214
  /**
142
- * Ordered list of call frames, outermost first.
2215
+ * Sanitized `Browser.cancelDownload` arguments. Canonical input:
2216
+ * `Browser.cancelDownload` in devtools-protocol@2d019e73, pinned at
2217
+ * https://github.com/ChromeDevTools/devtools-protocol/blob/2d019e73eb371d1d6985d26d395d78bd8f8a22ba/json/browser_protocol.json.
2218
+ * Every argument of this command has a retained or redacted decision in
2219
+ * lib/devtoolsproxy/testdata/cdp_arguments.yaml.
143
2220
  */
144
- callFrames: Array<BrowserCallStack.CallFrame>;
2221
+ export interface BrowserCdpBrowserCancelDownloadCommandData {
2222
+ /**
2223
+ * Opaque identifier of the download that was cancelled. Clipped to 128 characters;
2224
+ * a longer value is not a real identifier.
2225
+ */
2226
+ download_guid: string;
2227
+
2228
+ method: 'Browser.cancelDownload';
2229
+
2230
+ /**
2231
+ * Opaque browser context identifier. Clipped to 128 characters; a longer value is
2232
+ * not a real identifier.
2233
+ */
2234
+ browser_context_id?: string;
2235
+
2236
+ /**
2237
+ * The command's JSON-RPC id, so the command can be joined to the result the
2238
+ * browser returned for it. Absent when the client sent none.
2239
+ */
2240
+ command_id?: number;
2241
+
2242
+ /**
2243
+ * Identifies the CDP proxy connection the command arrived on, matching
2244
+ * `cdp_connect` and `cdp_disconnect`. Two clients driving the same browser are
2245
+ * told apart by this.
2246
+ */
2247
+ connection_id?: string;
2248
+
2249
+ /**
2250
+ * CDP session identifier the command was addressed to. Absent for browser-level
2251
+ * commands. Clipped to 128 characters.
2252
+ */
2253
+ session_id?: string;
2254
+ }
145
2255
 
146
2256
  /**
147
- * Optional label for the stack trace (e.g. async cause).
2257
+ * Sanitized `Browser.close` arguments. Canonical input: `Browser.close` in
2258
+ * devtools-protocol@2d019e73, pinned at
2259
+ * https://github.com/ChromeDevTools/devtools-protocol/blob/2d019e73eb371d1d6985d26d395d78bd8f8a22ba/json/browser_protocol.json.
2260
+ * Every argument of this command has a retained or redacted decision in
2261
+ * lib/devtoolsproxy/testdata/cdp_arguments.yaml.
148
2262
  */
149
- description?: string;
2263
+ export interface BrowserCdpBrowserCloseCommandData {
2264
+ method: 'Browser.close';
2265
+
2266
+ /**
2267
+ * The command's JSON-RPC id, so the command can be joined to the result the
2268
+ * browser returned for it. Absent when the client sent none.
2269
+ */
2270
+ command_id?: number;
2271
+
2272
+ /**
2273
+ * Identifies the CDP proxy connection the command arrived on, matching
2274
+ * `cdp_connect` and `cdp_disconnect`. Two clients driving the same browser are
2275
+ * told apart by this.
2276
+ */
2277
+ connection_id?: string;
2278
+
2279
+ /**
2280
+ * CDP session identifier the command was addressed to. Absent for browser-level
2281
+ * commands. Clipped to 128 characters.
2282
+ */
2283
+ session_id?: string;
2284
+ }
150
2285
 
151
2286
  /**
152
- * Parent stack trace for async stacks.
2287
+ * Sanitized `Browser.setWindowBounds` arguments. Canonical input:
2288
+ * `Browser.setWindowBounds` in devtools-protocol@2d019e73, pinned at
2289
+ * https://github.com/ChromeDevTools/devtools-protocol/blob/2d019e73eb371d1d6985d26d395d78bd8f8a22ba/json/browser_protocol.json.
2290
+ * Every argument of this command has a retained or redacted decision in
2291
+ * lib/devtoolsproxy/testdata/cdp_arguments.yaml.
153
2292
  */
154
- parent?: BrowserCallStack;
155
- }
2293
+ export interface BrowserCdpBrowserSetWindowBoundsCommandData {
2294
+ method: 'Browser.setWindowBounds';
156
2295
 
157
- export namespace BrowserCallStack {
158
- export interface CallFrame {
159
2296
  /**
160
- * Zero-based column number within the line.
2297
+ * Browser window identifier.
161
2298
  */
162
- columnNumber: number;
2299
+ window_id: number;
163
2300
 
164
2301
  /**
165
- * JavaScript function name, or empty string for anonymous functions.
2302
+ * The command's JSON-RPC id, so the command can be joined to the result the
2303
+ * browser returned for it. Absent when the client sent none.
166
2304
  */
167
- functionName: string;
2305
+ command_id?: number;
168
2306
 
169
2307
  /**
170
- * Zero-based line number within the script.
2308
+ * Identifies the CDP proxy connection the command arrived on, matching
2309
+ * `cdp_connect` and `cdp_disconnect`. Two clients driving the same browser are
2310
+ * told apart by this.
171
2311
  */
172
- lineNumber: number;
2312
+ connection_id?: string;
173
2313
 
174
2314
  /**
175
- * CDP script identifier.
2315
+ * Window height in DIP.
176
2316
  */
177
- scriptId: string;
2317
+ height?: number;
178
2318
 
179
2319
  /**
180
- * URL or name of the script file.
2320
+ * Window x position in screen coordinates.
181
2321
  */
182
- url: string;
183
- }
184
- }
2322
+ left?: number;
185
2323
 
186
- /**
187
- * A captcha solve attempt reached a terminal outcome.
188
- */
189
- export interface BrowserCaptchaSolveResultEvent {
190
- category: 'captcha';
2324
+ /**
2325
+ * CDP session identifier the command was addressed to. Absent for browser-level
2326
+ * commands. Clipped to 128 characters.
2327
+ */
2328
+ session_id?: string;
191
2329
 
192
- /**
193
- * Provenance metadata identifying which producer emitted the event.
194
- */
195
- source: BrowserEventSource;
2330
+ /**
2331
+ * Window y position in screen coordinates.
2332
+ */
2333
+ top?: number;
2334
+
2335
+ /**
2336
+ * Window width in DIP.
2337
+ */
2338
+ width?: number;
2339
+
2340
+ /**
2341
+ * Window state requested (`normal`, `minimized`, `maximized`, `fullscreen`). A
2342
+ * value the protocol does not define is reported as `other`.
2343
+ */
2344
+ window_state?: 'normal' | 'minimized' | 'maximized' | 'fullscreen' | 'other';
2345
+ }
196
2346
 
197
2347
  /**
198
- * Event timestamp in Unix microseconds.
2348
+ * Sanitized `Browser.setContentsSize` arguments. Canonical input:
2349
+ * `Browser.setContentsSize` in devtools-protocol@2d019e73, pinned at
2350
+ * https://github.com/ChromeDevTools/devtools-protocol/blob/2d019e73eb371d1d6985d26d395d78bd8f8a22ba/json/browser_protocol.json.
2351
+ * Every argument of this command has a retained or redacted decision in
2352
+ * lib/devtoolsproxy/testdata/cdp_arguments.yaml.
199
2353
  */
200
- ts: number;
2354
+ export interface BrowserCdpBrowserSetContentsSizeCommandData {
2355
+ method: 'Browser.setContentsSize';
201
2356
 
202
- type: 'captcha_solve_result';
2357
+ /**
2358
+ * Browser window identifier.
2359
+ */
2360
+ window_id: number;
203
2361
 
204
- data?: BrowserCaptchaSolveResultEvent.Data;
2362
+ /**
2363
+ * The command's JSON-RPC id, so the command can be joined to the result the
2364
+ * browser returned for it. Absent when the client sent none.
2365
+ */
2366
+ command_id?: number;
2367
+
2368
+ /**
2369
+ * Identifies the CDP proxy connection the command arrived on, matching
2370
+ * `cdp_connect` and `cdp_disconnect`. Two clients driving the same browser are
2371
+ * told apart by this.
2372
+ */
2373
+ connection_id?: string;
2374
+
2375
+ /**
2376
+ * Contents height in DIP.
2377
+ */
2378
+ height?: number;
2379
+
2380
+ /**
2381
+ * CDP session identifier the command was addressed to. Absent for browser-level
2382
+ * commands. Clipped to 128 characters.
2383
+ */
2384
+ session_id?: string;
2385
+
2386
+ /**
2387
+ * Contents width in DIP.
2388
+ */
2389
+ width?: number;
2390
+ }
205
2391
 
206
2392
  /**
207
- * True if the data field was truncated due to size limits.
2393
+ * Sanitized `Autofill.trigger` arguments. Canonical input: `Autofill.trigger` in
2394
+ * devtools-protocol@2d019e73, pinned at
2395
+ * https://github.com/ChromeDevTools/devtools-protocol/blob/2d019e73eb371d1d6985d26d395d78bd8f8a22ba/json/browser_protocol.json.
2396
+ * Every argument of this command has a retained or redacted decision in
2397
+ * lib/devtoolsproxy/testdata/cdp_arguments.yaml.
208
2398
  */
209
- truncated?: boolean;
210
- }
211
-
212
- export namespace BrowserCaptchaSolveResultEvent {
213
- export interface Data {
2399
+ export interface BrowserCdpAutofillTriggerCommandData {
214
2400
  /**
215
- * Captcha vendor family. Provider-specific task names are normalized into this
216
- * set; anything not covered is reported as other.
2401
+ * Opaque backend node identifier of the field that was autofilled.
217
2402
  */
218
- captcha_type: 'hcaptcha' | 'recaptcha_v2' | 'recaptcha_v3' | 'turnstile' | 'geetest' | 'other';
2403
+ field_id: number;
2404
+
2405
+ method: 'Autofill.trigger';
219
2406
 
220
2407
  /**
221
- * Wall-clock duration from solve start to terminal outcome.
2408
+ * Number of address fields the command filled. Their names and values are never
2409
+ * captured.
222
2410
  */
223
- duration_ms: number;
2411
+ address_field_count?: number;
224
2412
 
225
2413
  /**
226
- * Terminal outcome. success: solver returned a usable solution. failure: solver
227
- * returned an error (see error_code). timeout: solver did not return within the
228
- * caller's wait budget. abandoned: caller cancelled or the page navigated away
229
- * mid-solve.
2414
+ * The command's JSON-RPC id, so the command can be joined to the result the
2415
+ * browser returned for it. Absent when the client sent none.
230
2416
  */
231
- status: 'success' | 'failure' | 'timeout' | 'abandoned';
2417
+ command_id?: number;
232
2418
 
233
2419
  /**
234
- * Solver-specific error code on failure (e.g. ERROR_CAPTCHA_UNSOLVABLE). Absent on
235
- * success.
2420
+ * Identifies the CDP proxy connection the command arrived on, matching
2421
+ * `cdp_connect` and `cdp_disconnect`. Two clients driving the same browser are
2422
+ * told apart by this.
236
2423
  */
237
- error_code?: string;
2424
+ connection_id?: string;
238
2425
 
239
2426
  /**
240
- * Solver-assigned identifier. Opaque, useful for support cross-references.
2427
+ * Opaque frame identifier. Clipped to 128 characters; a longer value is not a real
2428
+ * identifier.
241
2429
  */
242
- task_id?: string;
2430
+ frame_id?: string;
243
2431
 
244
2432
  /**
245
- * Host of the page where the captcha was solved.
2433
+ * What was filled: `card` or `address`. The values themselves are never captured.
246
2434
  */
247
- website_host?: string;
2435
+ mode?: 'card' | 'address';
248
2436
 
249
2437
  /**
250
- * Path of the page where the captcha was solved. Query string excluded.
2438
+ * CDP session identifier the command was addressed to. Absent for browser-level
2439
+ * commands. Clipped to 128 characters.
251
2440
  */
252
- website_path?: string;
2441
+ session_id?: string;
253
2442
  }
254
2443
  }
255
2444
 
2445
+ /**
2446
+ * A browser-control CDP method the proxy reports. The set covers the commands an
2447
+ * agent drives the browser with; configuration, DOM and Runtime bookkeeping, and
2448
+ * Chrome-specific UI commands are outside it. Canonical definitions:
2449
+ * devtools-protocol@2d019e73.
2450
+ */
2451
+ export type BrowserCdpCommandMethod =
2452
+ | 'Input.dispatchMouseEvent'
2453
+ | 'Input.dispatchKeyEvent'
2454
+ | 'Input.insertText'
2455
+ | 'Input.imeSetComposition'
2456
+ | 'Input.dispatchTouchEvent'
2457
+ | 'Input.dispatchDragEvent'
2458
+ | 'Input.cancelDragging'
2459
+ | 'Input.emulateTouchFromMouseEvent'
2460
+ | 'Input.synthesizePinchGesture'
2461
+ | 'Input.synthesizeScrollGesture'
2462
+ | 'Input.synthesizeTapGesture'
2463
+ | 'DOM.setFileInputFiles'
2464
+ | 'DOM.focus'
2465
+ | 'DOM.scrollIntoViewIfNeeded'
2466
+ | 'Page.bringToFront'
2467
+ | 'Page.captureScreenshot'
2468
+ | 'Page.captureSnapshot'
2469
+ | 'Page.handleJavaScriptDialog'
2470
+ | 'Page.navigate'
2471
+ | 'Page.navigateToHistoryEntry'
2472
+ | 'Page.reload'
2473
+ | 'Page.printToPDF'
2474
+ | 'Page.startScreencast'
2475
+ | 'Page.stopScreencast'
2476
+ | 'Page.stopLoading'
2477
+ | 'Page.close'
2478
+ | 'Page.setWebLifecycleState'
2479
+ | 'Target.activateTarget'
2480
+ | 'Target.closeTarget'
2481
+ | 'Target.createTarget'
2482
+ | 'Target.createBrowserContext'
2483
+ | 'Target.disposeBrowserContext'
2484
+ | 'Target.openDevTools'
2485
+ | 'Browser.cancelDownload'
2486
+ | 'Browser.close'
2487
+ | 'Browser.setWindowBounds'
2488
+ | 'Browser.setContentsSize'
2489
+ | 'Autofill.trigger';
2490
+
256
2491
  /**
257
2492
  * An external client (e.g. customer SDK, Playwright, Puppeteer) connected to the
258
2493
  * CDP WebSocket proxy on this VM.
@@ -272,12 +2507,25 @@ export interface BrowserCdpConnectEvent {
272
2507
 
273
2508
  type: 'cdp_connect';
274
2509
 
2510
+ data?: BrowserCdpConnectEvent.Data;
2511
+
275
2512
  /**
276
2513
  * True if the data field was truncated due to size limits.
277
2514
  */
278
2515
  truncated?: boolean;
279
2516
  }
280
2517
 
2518
+ export namespace BrowserCdpConnectEvent {
2519
+ export interface Data {
2520
+ /**
2521
+ * Identifies this CDP proxy connection, matching the connection_id on the
2522
+ * cdp_command events that arrived on it. Two clients driving the same browser are
2523
+ * told apart by this.
2524
+ */
2525
+ connection_id?: string;
2526
+ }
2527
+ }
2528
+
281
2529
  /**
282
2530
  * An external client disconnected from the CDP WebSocket proxy on this VM. Pair
283
2531
  * with the immediately preceding cdp_connect on the same stream.
@@ -325,6 +2573,30 @@ export namespace BrowserCdpDisconnectEvent {
325
2573
  * (typically server shutdown).
326
2574
  */
327
2575
  reason: 'client_close' | 'upstream_changed' | 'upstream_error' | 'context_cancelled';
2576
+
2577
+ /**
2578
+ * Identifies this CDP proxy connection, matching the connection_id on the
2579
+ * cdp_command events that arrived on it. Two clients driving the same browser are
2580
+ * told apart by this.
2581
+ */
2582
+ connection_id?: string;
2583
+
2584
+ /**
2585
+ * Number of forwarded client frames the classifier never saw, because it could not
2586
+ * keep up or because classification failed. An upper bound on lost commands rather
2587
+ * than a count: a saturated queue turns away whatever arrives next, which may be
2588
+ * library traffic that would have produced no event. Telemetry loss only; every
2589
+ * command was still relayed to the browser. Absent on events from a browser image
2590
+ * predating the field, which is not the same as zero.
2591
+ */
2592
+ telemetry_dropped?: number;
2593
+
2594
+ /**
2595
+ * Number of forwarded client commands that produced no cdp_command event because
2596
+ * their method is listed in control.cdp.excluded_methods. Configuration rather
2597
+ * than loss, so it is counted apart from telemetry_dropped.
2598
+ */
2599
+ telemetry_excluded?: number;
328
2600
  }
329
2601
  }
330
2602
 
@@ -1267,6 +3539,54 @@ export namespace BrowserNetworkResponseEvent {
1267
3539
  }
1268
3540
  }
1269
3541
 
3542
+ /**
3543
+ * A page's renderer process crashed (an "Aw, Snap!" failure) while the browser
3544
+ * process itself stayed alive. Reported on the crashed page's session, with the
3545
+ * session and target ids on `source.metadata`. Captured only while the `page`
3546
+ * category is enabled.
3547
+ */
3548
+ export interface BrowserPageCrashedEvent {
3549
+ category: 'page';
3550
+
3551
+ /**
3552
+ * Provenance metadata identifying which producer emitted the event.
3553
+ */
3554
+ source: BrowserEventSource;
3555
+
3556
+ /**
3557
+ * Event timestamp in Unix microseconds.
3558
+ */
3559
+ ts: number;
3560
+
3561
+ type: 'page_crashed';
3562
+
3563
+ data?: BrowserPageCrashedEvent.Data;
3564
+
3565
+ /**
3566
+ * True if the data field was truncated due to size limits.
3567
+ */
3568
+ truncated?: boolean;
3569
+ }
3570
+
3571
+ export namespace BrowserPageCrashedEvent {
3572
+ export interface Data {
3573
+ /**
3574
+ * CDP target identifier of the crashed page.
3575
+ */
3576
+ target_id: string;
3577
+
3578
+ /**
3579
+ * CDP target type of the page that produced the event.
3580
+ */
3581
+ target_type: 'page' | 'background_page' | 'service_worker' | 'shared_worker' | 'other';
3582
+
3583
+ /**
3584
+ * URL the page was on when its renderer process crashed.
3585
+ */
3586
+ url: string;
3587
+ }
3588
+ }
3589
+
1270
3590
  /**
1271
3591
  * A browser DOMContentLoaded event (CDP Page.domContentEventFired).
1272
3592
  */
@@ -1725,6 +4045,60 @@ export namespace BrowserPageTabOpenedEvent {
1725
4045
  }
1726
4046
  }
1727
4047
 
4048
+ /**
4049
+ * An HTTP call that manages the browser VM rather than driving the browser,
4050
+ * handled by the in-VM API server — recording lifecycle, filesystem and process
4051
+ * management, telemetry and browser configuration. Mostly platform-induced (e.g.
4052
+ * profile save, replay capture) rather than agent actions.
4053
+ */
4054
+ export interface BrowserPlatformAPICallEvent {
4055
+ category: 'platform';
4056
+
4057
+ /**
4058
+ * Provenance metadata identifying which producer emitted the event.
4059
+ */
4060
+ source: BrowserEventSource;
4061
+
4062
+ /**
4063
+ * Event timestamp in Unix microseconds.
4064
+ */
4065
+ ts: number;
4066
+
4067
+ type: 'platform_api_call';
4068
+
4069
+ data?: BrowserPlatformAPICallEvent.Data;
4070
+
4071
+ /**
4072
+ * True if the data field was truncated due to size limits.
4073
+ */
4074
+ truncated?: boolean;
4075
+ }
4076
+
4077
+ export namespace BrowserPlatformAPICallEvent {
4078
+ export interface Data {
4079
+ /**
4080
+ * Wall-clock duration of the handler in milliseconds.
4081
+ */
4082
+ duration_ms: number;
4083
+
4084
+ /**
4085
+ * Matched route's operation, named as the in-VM API names its handler (e.g.
4086
+ * ProcessExec, StartRecording).
4087
+ */
4088
+ operation_id: string;
4089
+
4090
+ /**
4091
+ * Per-request identifier from the in-VM API request middleware.
4092
+ */
4093
+ request_id: string;
4094
+
4095
+ /**
4096
+ * HTTP response status code.
4097
+ */
4098
+ status: number;
4099
+ }
4100
+ }
4101
+
1728
4102
  /**
1729
4103
  * A branded proxy-layer failure observed by the browser. Emitted when the metro
1730
4104
  * egress host-proxy serves a branded 5xx error page whose response carries the
@@ -1967,8 +4341,8 @@ export namespace BrowserSystemOomKillEvent {
1967
4341
  * Per-category telemetry capture settings layered onto the default set. The
1968
4342
  * operational signals (control, connection, system, captcha) are on by default and
1969
4343
  * are opt-out: set one to enabled=false to stop capturing it. The CDP categories
1970
- * (console, network, page, interaction) and screenshot are off by default and are
1971
- * opt-in: set enabled=true to capture them.
4344
+ * (console, network, page, interaction), screenshot and platform are off by
4345
+ * default and are opt-in: set enabled=true to capture them.
1972
4346
  */
1973
4347
  export interface BrowserTelemetryCategoriesConfig {
1974
4348
  /**
@@ -1988,10 +4362,11 @@ export interface BrowserTelemetryCategoriesConfig {
1988
4362
  console?: BrowserTelemetryCategoryConfig;
1989
4363
 
1990
4364
  /**
1991
- * Agent-driven actions against the browser, such as inbound calls to the in-VM
1992
- * API. On by default.
4365
+ * Agent-driven actions against the browser computer-control calls, Playwright
4366
+ * code execution, screenshots, clipboard access, and browser-control commands sent
4367
+ * over the CDP proxy. On by default.
1993
4368
  */
1994
- control?: BrowserTelemetryCategoryConfig;
4369
+ control?: BrowserTelemetryControlConfig;
1995
4370
 
1996
4371
  /**
1997
4372
  * User interaction events including clicks, keydowns, and scroll-settled events.
@@ -2014,6 +4389,13 @@ export interface BrowserTelemetryCategoriesConfig {
2014
4389
  */
2015
4390
  page?: BrowserTelemetryCategoryConfig;
2016
4391
 
4392
+ /**
4393
+ * In-VM API calls that manage the browser VM rather than drive the browser
4394
+ * (recording, filesystem, process, telemetry and browser configuration). Mostly
4395
+ * platform-induced; off by default and must be opted into.
4396
+ */
4397
+ platform?: BrowserTelemetryCategoryConfig;
4398
+
2017
4399
  /**
2018
4400
  * Periodic base64-encoded viewport screenshots. High volume; off by default and
2019
4401
  * must be opted into.
@@ -2034,11 +4416,29 @@ export interface BrowserTelemetryCategoryConfig {
2034
4416
  /**
2035
4417
  * Whether this category is captured. Operational categories (control, connection,
2036
4418
  * system, captcha) default to true; set false to opt out. CDP categories (console,
2037
- * network, page, interaction) and screenshot default to false; set true to opt in.
4419
+ * network, page, interaction), screenshot and platform default to false; set true
4420
+ * to opt in.
2038
4421
  */
2039
4422
  enabled?: boolean;
2040
4423
  }
2041
4424
 
4425
+ /**
4426
+ * Settings for the cdp_command events the CDP proxy reports.
4427
+ */
4428
+ export interface BrowserTelemetryCdpControlConfig {
4429
+ /**
4430
+ * Methods to leave out of the cdp_command stream. Omit the list to keep the
4431
+ * current one; send an empty list to report every supported method again.
4432
+ * Exclusion is a telemetry setting only: an excluded command is still relayed to
4433
+ * the browser unchanged, it simply produces no event. Use it to drop the
4434
+ * highest-volume methods — Input.dispatchMouseEvent during a humanized cursor
4435
+ * path, or Page.captureScreenshot under a screencast — without turning the whole
4436
+ * category off. Excluded commands are counted in
4437
+ * cdp_disconnect.telemetry_excluded.
4438
+ */
4439
+ excluded_methods?: Array<BrowserCdpCommandMethod>;
4440
+ }
4441
+
2042
4442
  /**
2043
4443
  * Active telemetry configuration for a browser session.
2044
4444
  */
@@ -2055,6 +4455,25 @@ export interface BrowserTelemetryConfig {
2055
4455
  export?: BrowserTelemetryExportConfig;
2056
4456
  }
2057
4457
 
4458
+ /**
4459
+ * Configuration for the control category. Same enabled semantics as any other
4460
+ * category, plus settings for the browser-control commands the CDP proxy reports.
4461
+ */
4462
+ export interface BrowserTelemetryControlConfig {
4463
+ /**
4464
+ * Settings for the cdp_command events the CDP proxy reports. Merged independently
4465
+ * of enabled, so a later update that only sets enabled keeps the current exclusion
4466
+ * list.
4467
+ */
4468
+ cdp?: BrowserTelemetryCdpControlConfig;
4469
+
4470
+ /**
4471
+ * Whether this category is captured. Control is on by default; set false to opt
4472
+ * out.
4473
+ */
4474
+ enabled?: boolean;
4475
+ }
4476
+
2058
4477
  /**
2059
4478
  * Union type representing any browser telemetry event. Discriminated on `type`.
2060
4479
  * Each event's `category` determines when it is captured. The CDP collector-health
@@ -2077,6 +4496,7 @@ export type BrowserTelemetryEvent =
2077
4496
  | BrowserPageDomContentLoadedEvent
2078
4497
  | BrowserPageLoadEvent
2079
4498
  | BrowserPageTabOpenedEvent
4499
+ | BrowserPageCrashedEvent
2080
4500
  | BrowserPageLayoutShiftEvent
2081
4501
  | BrowserPageLcpEvent
2082
4502
  | BrowserPageLayoutSettledEvent
@@ -2090,6 +4510,8 @@ export type BrowserTelemetryEvent =
2090
4510
  | BrowserMonitorReconnectFailedEvent
2091
4511
  | BrowserMonitorInitFailedEvent
2092
4512
  | BrowserAPICallEvent
4513
+ | BrowserPlatformAPICallEvent
4514
+ | BrowserCdpCommandEvent
2093
4515
  | BrowserCdpConnectEvent
2094
4516
  | BrowserCdpDisconnectEvent
2095
4517
  | BrowserLiveViewConnectEvent
@@ -2187,6 +4609,7 @@ export interface TelemetryEventsParams extends OffsetPaginationParams {
2187
4609
  | 'page'
2188
4610
  | 'interaction'
2189
4611
  | 'control'
4612
+ | 'platform'
2190
4613
  | 'connection'
2191
4614
  | 'system'
2192
4615
  | 'screenshot'
@@ -2238,6 +4661,8 @@ export declare namespace Telemetry {
2238
4661
  type BrowserAPICallEvent as BrowserAPICallEvent,
2239
4662
  type BrowserCallStack as BrowserCallStack,
2240
4663
  type BrowserCaptchaSolveResultEvent as BrowserCaptchaSolveResultEvent,
4664
+ type BrowserCdpCommandEvent as BrowserCdpCommandEvent,
4665
+ type BrowserCdpCommandMethod as BrowserCdpCommandMethod,
2241
4666
  type BrowserCdpConnectEvent as BrowserCdpConnectEvent,
2242
4667
  type BrowserCdpDisconnectEvent as BrowserCdpDisconnectEvent,
2243
4668
  type BrowserConsoleErrorEvent as BrowserConsoleErrorEvent,
@@ -2259,6 +4684,7 @@ export declare namespace Telemetry {
2259
4684
  type BrowserNetworkLoadingFailedEvent as BrowserNetworkLoadingFailedEvent,
2260
4685
  type BrowserNetworkRequestEvent as BrowserNetworkRequestEvent,
2261
4686
  type BrowserNetworkResponseEvent as BrowserNetworkResponseEvent,
4687
+ type BrowserPageCrashedEvent as BrowserPageCrashedEvent,
2262
4688
  type BrowserPageDomContentLoadedEvent as BrowserPageDomContentLoadedEvent,
2263
4689
  type BrowserPageLayoutSettledEvent as BrowserPageLayoutSettledEvent,
2264
4690
  type BrowserPageLayoutShiftEvent as BrowserPageLayoutShiftEvent,
@@ -2267,12 +4693,15 @@ export declare namespace Telemetry {
2267
4693
  type BrowserPageNavigationEvent as BrowserPageNavigationEvent,
2268
4694
  type BrowserPageNavigationSettledEvent as BrowserPageNavigationSettledEvent,
2269
4695
  type BrowserPageTabOpenedEvent as BrowserPageTabOpenedEvent,
4696
+ type BrowserPlatformAPICallEvent as BrowserPlatformAPICallEvent,
2270
4697
  type BrowserProxyErrorEvent as BrowserProxyErrorEvent,
2271
4698
  type BrowserServiceCrashedEvent as BrowserServiceCrashedEvent,
2272
4699
  type BrowserSystemOomKillEvent as BrowserSystemOomKillEvent,
2273
4700
  type BrowserTelemetryCategoriesConfig as BrowserTelemetryCategoriesConfig,
2274
4701
  type BrowserTelemetryCategoryConfig as BrowserTelemetryCategoryConfig,
4702
+ type BrowserTelemetryCdpControlConfig as BrowserTelemetryCdpControlConfig,
2275
4703
  type BrowserTelemetryConfig as BrowserTelemetryConfig,
4704
+ type BrowserTelemetryControlConfig as BrowserTelemetryControlConfig,
2276
4705
  type BrowserTelemetryEvent as BrowserTelemetryEvent,
2277
4706
  type BrowserTelemetryExportConfig as BrowserTelemetryExportConfig,
2278
4707
  type BrowserTelemetryOtlpExportConfig as BrowserTelemetryOtlpExportConfig,