agent-browser 0.3.1 → 0.3.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/src/types.ts DELETED
@@ -1,913 +0,0 @@
1
- import type { Page, Browser, BrowserContext } from 'playwright-core';
2
-
3
- // Base command structure
4
- export interface BaseCommand {
5
- id: string;
6
- action: string;
7
- }
8
-
9
- // Action-specific command types
10
- export interface LaunchCommand extends BaseCommand {
11
- action: 'launch';
12
- headless?: boolean;
13
- viewport?: { width: number; height: number };
14
- browser?: 'chromium' | 'firefox' | 'webkit';
15
- }
16
-
17
- export interface NavigateCommand extends BaseCommand {
18
- action: 'navigate';
19
- url: string;
20
- waitUntil?: 'load' | 'domcontentloaded' | 'networkidle';
21
- }
22
-
23
- export interface ClickCommand extends BaseCommand {
24
- action: 'click';
25
- selector: string;
26
- button?: 'left' | 'right' | 'middle';
27
- clickCount?: number;
28
- delay?: number;
29
- }
30
-
31
- export interface TypeCommand extends BaseCommand {
32
- action: 'type';
33
- selector: string;
34
- text: string;
35
- delay?: number;
36
- clear?: boolean;
37
- }
38
-
39
- export interface FillCommand extends BaseCommand {
40
- action: 'fill';
41
- selector: string;
42
- value: string;
43
- }
44
-
45
- export interface CheckCommand extends BaseCommand {
46
- action: 'check';
47
- selector: string;
48
- }
49
-
50
- export interface UncheckCommand extends BaseCommand {
51
- action: 'uncheck';
52
- selector: string;
53
- }
54
-
55
- export interface UploadCommand extends BaseCommand {
56
- action: 'upload';
57
- selector: string;
58
- files: string | string[];
59
- }
60
-
61
- export interface DoubleClickCommand extends BaseCommand {
62
- action: 'dblclick';
63
- selector: string;
64
- }
65
-
66
- export interface FocusCommand extends BaseCommand {
67
- action: 'focus';
68
- selector: string;
69
- }
70
-
71
- export interface DragCommand extends BaseCommand {
72
- action: 'drag';
73
- source: string;
74
- target: string;
75
- }
76
-
77
- export interface FrameCommand extends BaseCommand {
78
- action: 'frame';
79
- selector?: string;
80
- name?: string;
81
- url?: string;
82
- }
83
-
84
- export interface MainFrameCommand extends BaseCommand {
85
- action: 'mainframe';
86
- }
87
-
88
- export interface GetByRoleCommand extends BaseCommand {
89
- action: 'getbyrole';
90
- role: string;
91
- name?: string;
92
- subaction: 'click' | 'fill' | 'check' | 'hover';
93
- value?: string;
94
- }
95
-
96
- export interface GetByTextCommand extends BaseCommand {
97
- action: 'getbytext';
98
- text: string;
99
- exact?: boolean;
100
- subaction: 'click' | 'hover';
101
- }
102
-
103
- export interface GetByLabelCommand extends BaseCommand {
104
- action: 'getbylabel';
105
- label: string;
106
- subaction: 'click' | 'fill' | 'check';
107
- value?: string;
108
- }
109
-
110
- export interface GetByPlaceholderCommand extends BaseCommand {
111
- action: 'getbyplaceholder';
112
- placeholder: string;
113
- subaction: 'click' | 'fill';
114
- value?: string;
115
- }
116
-
117
- export interface CookiesGetCommand extends BaseCommand {
118
- action: 'cookies_get';
119
- urls?: string[];
120
- }
121
-
122
- export interface CookiesSetCommand extends BaseCommand {
123
- action: 'cookies_set';
124
- cookies: Array<{
125
- name: string;
126
- value: string;
127
- url?: string;
128
- domain?: string;
129
- path?: string;
130
- expires?: number;
131
- httpOnly?: boolean;
132
- secure?: boolean;
133
- sameSite?: 'Strict' | 'Lax' | 'None';
134
- }>;
135
- }
136
-
137
- export interface CookiesClearCommand extends BaseCommand {
138
- action: 'cookies_clear';
139
- }
140
-
141
- export interface StorageGetCommand extends BaseCommand {
142
- action: 'storage_get';
143
- key?: string;
144
- type: 'local' | 'session';
145
- }
146
-
147
- export interface StorageSetCommand extends BaseCommand {
148
- action: 'storage_set';
149
- key: string;
150
- value: string;
151
- type: 'local' | 'session';
152
- }
153
-
154
- export interface StorageClearCommand extends BaseCommand {
155
- action: 'storage_clear';
156
- type: 'local' | 'session';
157
- }
158
-
159
- export interface DialogCommand extends BaseCommand {
160
- action: 'dialog';
161
- response: 'accept' | 'dismiss';
162
- promptText?: string;
163
- }
164
-
165
- export interface PdfCommand extends BaseCommand {
166
- action: 'pdf';
167
- path: string;
168
- format?:
169
- | 'Letter'
170
- | 'Legal'
171
- | 'Tabloid'
172
- | 'Ledger'
173
- | 'A0'
174
- | 'A1'
175
- | 'A2'
176
- | 'A3'
177
- | 'A4'
178
- | 'A5'
179
- | 'A6';
180
- }
181
-
182
- // Network interception
183
- export interface RouteCommand extends BaseCommand {
184
- action: 'route';
185
- url: string;
186
- response?: {
187
- status?: number;
188
- body?: string;
189
- contentType?: string;
190
- headers?: Record<string, string>;
191
- };
192
- abort?: boolean;
193
- }
194
-
195
- export interface UnrouteCommand extends BaseCommand {
196
- action: 'unroute';
197
- url?: string; // If not provided, remove all routes
198
- }
199
-
200
- // Request inspection
201
- export interface RequestsCommand extends BaseCommand {
202
- action: 'requests';
203
- filter?: string; // URL pattern to filter
204
- clear?: boolean;
205
- }
206
-
207
- // Download handling
208
- export interface DownloadCommand extends BaseCommand {
209
- action: 'download';
210
- selector: string;
211
- path: string;
212
- }
213
-
214
- // Geolocation
215
- export interface GeolocationCommand extends BaseCommand {
216
- action: 'geolocation';
217
- latitude: number;
218
- longitude: number;
219
- accuracy?: number;
220
- }
221
-
222
- // Permissions
223
- export interface PermissionsCommand extends BaseCommand {
224
- action: 'permissions';
225
- permissions: string[];
226
- grant: boolean;
227
- }
228
-
229
- // Viewport
230
- export interface ViewportCommand extends BaseCommand {
231
- action: 'viewport';
232
- width: number;
233
- height: number;
234
- }
235
-
236
- // User agent
237
- export interface UserAgentCommand extends BaseCommand {
238
- action: 'useragent';
239
- userAgent: string;
240
- }
241
-
242
- // Emulate device
243
- export interface DeviceCommand extends BaseCommand {
244
- action: 'device';
245
- device: string;
246
- }
247
-
248
- // Go back/forward
249
- export interface BackCommand extends BaseCommand {
250
- action: 'back';
251
- }
252
-
253
- export interface ForwardCommand extends BaseCommand {
254
- action: 'forward';
255
- }
256
-
257
- export interface ReloadCommand extends BaseCommand {
258
- action: 'reload';
259
- }
260
-
261
- // Get URL/Title
262
- export interface UrlCommand extends BaseCommand {
263
- action: 'url';
264
- }
265
-
266
- export interface TitleCommand extends BaseCommand {
267
- action: 'title';
268
- }
269
-
270
- // Attribute/Property/Text
271
- export interface GetAttributeCommand extends BaseCommand {
272
- action: 'getattribute';
273
- selector: string;
274
- attribute: string;
275
- }
276
-
277
- export interface GetTextCommand extends BaseCommand {
278
- action: 'gettext';
279
- selector: string;
280
- }
281
-
282
- export interface IsVisibleCommand extends BaseCommand {
283
- action: 'isvisible';
284
- selector: string;
285
- }
286
-
287
- export interface IsEnabledCommand extends BaseCommand {
288
- action: 'isenabled';
289
- selector: string;
290
- }
291
-
292
- export interface IsCheckedCommand extends BaseCommand {
293
- action: 'ischecked';
294
- selector: string;
295
- }
296
-
297
- export interface CountCommand extends BaseCommand {
298
- action: 'count';
299
- selector: string;
300
- }
301
-
302
- // Bounding box
303
- export interface BoundingBoxCommand extends BaseCommand {
304
- action: 'boundingbox';
305
- selector: string;
306
- }
307
-
308
- // More semantic locators
309
- export interface GetByAltTextCommand extends BaseCommand {
310
- action: 'getbyalttext';
311
- text: string;
312
- exact?: boolean;
313
- subaction: 'click' | 'hover';
314
- }
315
-
316
- export interface GetByTitleCommand extends BaseCommand {
317
- action: 'getbytitle';
318
- text: string;
319
- exact?: boolean;
320
- subaction: 'click' | 'hover';
321
- }
322
-
323
- export interface GetByTestIdCommand extends BaseCommand {
324
- action: 'getbytestid';
325
- testId: string;
326
- subaction: 'click' | 'fill' | 'check' | 'hover';
327
- value?: string;
328
- }
329
-
330
- // Nth element selection
331
- export interface NthCommand extends BaseCommand {
332
- action: 'nth';
333
- selector: string;
334
- index: number; // 0-based, or -1 for last
335
- subaction: 'click' | 'fill' | 'check' | 'hover' | 'text';
336
- value?: string;
337
- }
338
-
339
- // Wait for URL
340
- export interface WaitForUrlCommand extends BaseCommand {
341
- action: 'waitforurl';
342
- url: string;
343
- timeout?: number;
344
- }
345
-
346
- // Wait for load state
347
- export interface WaitForLoadStateCommand extends BaseCommand {
348
- action: 'waitforloadstate';
349
- state: 'load' | 'domcontentloaded' | 'networkidle';
350
- timeout?: number;
351
- }
352
-
353
- // Set HTML content
354
- export interface SetContentCommand extends BaseCommand {
355
- action: 'setcontent';
356
- html: string;
357
- }
358
-
359
- // Timezone emulation
360
- export interface TimezoneCommand extends BaseCommand {
361
- action: 'timezone';
362
- timezone: string;
363
- }
364
-
365
- // Locale emulation
366
- export interface LocaleCommand extends BaseCommand {
367
- action: 'locale';
368
- locale: string;
369
- }
370
-
371
- // HTTP basic auth
372
- export interface HttpCredentialsCommand extends BaseCommand {
373
- action: 'credentials';
374
- username: string;
375
- password: string;
376
- }
377
-
378
- // Fine-grained mouse control
379
- export interface MouseMoveCommand extends BaseCommand {
380
- action: 'mousemove';
381
- x: number;
382
- y: number;
383
- }
384
-
385
- export interface MouseDownCommand extends BaseCommand {
386
- action: 'mousedown';
387
- button?: 'left' | 'right' | 'middle';
388
- }
389
-
390
- export interface MouseUpCommand extends BaseCommand {
391
- action: 'mouseup';
392
- button?: 'left' | 'right' | 'middle';
393
- }
394
-
395
- // Bring to front
396
- export interface BringToFrontCommand extends BaseCommand {
397
- action: 'bringtofront';
398
- }
399
-
400
- // Wait for JS function to return truthy
401
- export interface WaitForFunctionCommand extends BaseCommand {
402
- action: 'waitforfunction';
403
- expression: string;
404
- timeout?: number;
405
- }
406
-
407
- // Scroll element into view
408
- export interface ScrollIntoViewCommand extends BaseCommand {
409
- action: 'scrollintoview';
410
- selector: string;
411
- }
412
-
413
- // Add init script (runs on every navigation)
414
- export interface AddInitScriptCommand extends BaseCommand {
415
- action: 'addinitscript';
416
- script: string;
417
- }
418
-
419
- // Keyboard down/up (hold keys)
420
- export interface KeyDownCommand extends BaseCommand {
421
- action: 'keydown';
422
- key: string;
423
- }
424
-
425
- export interface KeyUpCommand extends BaseCommand {
426
- action: 'keyup';
427
- key: string;
428
- }
429
-
430
- // Insert text (without key events)
431
- export interface InsertTextCommand extends BaseCommand {
432
- action: 'inserttext';
433
- text: string;
434
- }
435
-
436
- // Multi-select dropdown
437
- export interface MultiSelectCommand extends BaseCommand {
438
- action: 'multiselect';
439
- selector: string;
440
- values: string[];
441
- }
442
-
443
- // Wait for download
444
- export interface WaitForDownloadCommand extends BaseCommand {
445
- action: 'waitfordownload';
446
- path?: string;
447
- timeout?: number;
448
- }
449
-
450
- // Get response body from intercepted request
451
- export interface ResponseBodyCommand extends BaseCommand {
452
- action: 'responsebody';
453
- url: string;
454
- timeout?: number;
455
- }
456
-
457
- // Video recording
458
- export interface VideoStartCommand extends BaseCommand {
459
- action: 'video_start';
460
- path: string;
461
- }
462
-
463
- export interface VideoStopCommand extends BaseCommand {
464
- action: 'video_stop';
465
- }
466
-
467
- // Tracing
468
- export interface TraceStartCommand extends BaseCommand {
469
- action: 'trace_start';
470
- screenshots?: boolean;
471
- snapshots?: boolean;
472
- }
473
-
474
- export interface TraceStopCommand extends BaseCommand {
475
- action: 'trace_stop';
476
- path: string;
477
- }
478
-
479
- // HAR recording
480
- export interface HarStartCommand extends BaseCommand {
481
- action: 'har_start';
482
- }
483
-
484
- export interface HarStopCommand extends BaseCommand {
485
- action: 'har_stop';
486
- path: string;
487
- }
488
-
489
- // Storage state (auth persistence)
490
- export interface StorageStateSaveCommand extends BaseCommand {
491
- action: 'state_save';
492
- path: string;
493
- }
494
-
495
- export interface StorageStateLoadCommand extends BaseCommand {
496
- action: 'state_load';
497
- path: string;
498
- }
499
-
500
- // Console logs
501
- export interface ConsoleCommand extends BaseCommand {
502
- action: 'console';
503
- clear?: boolean;
504
- }
505
-
506
- // Page errors
507
- export interface ErrorsCommand extends BaseCommand {
508
- action: 'errors';
509
- clear?: boolean;
510
- }
511
-
512
- // Keyboard shortcuts
513
- export interface KeyboardCommand extends BaseCommand {
514
- action: 'keyboard';
515
- keys: string; // e.g., "Control+a", "Shift+Tab"
516
- }
517
-
518
- // Mouse wheel
519
- export interface WheelCommand extends BaseCommand {
520
- action: 'wheel';
521
- deltaX?: number;
522
- deltaY?: number;
523
- selector?: string;
524
- }
525
-
526
- // Touch events
527
- export interface TapCommand extends BaseCommand {
528
- action: 'tap';
529
- selector: string;
530
- }
531
-
532
- // Clipboard
533
- export interface ClipboardCommand extends BaseCommand {
534
- action: 'clipboard';
535
- operation: 'copy' | 'paste' | 'read';
536
- text?: string;
537
- }
538
-
539
- // Highlight element (for debugging)
540
- export interface HighlightCommand extends BaseCommand {
541
- action: 'highlight';
542
- selector: string;
543
- }
544
-
545
- // Clear input
546
- export interface ClearCommand extends BaseCommand {
547
- action: 'clear';
548
- selector: string;
549
- }
550
-
551
- // Select all text
552
- export interface SelectAllCommand extends BaseCommand {
553
- action: 'selectall';
554
- selector: string;
555
- }
556
-
557
- // Inner text vs text content
558
- export interface InnerTextCommand extends BaseCommand {
559
- action: 'innertext';
560
- selector: string;
561
- }
562
-
563
- export interface InnerHtmlCommand extends BaseCommand {
564
- action: 'innerhtml';
565
- selector: string;
566
- }
567
-
568
- // Input value
569
- export interface InputValueCommand extends BaseCommand {
570
- action: 'inputvalue';
571
- selector: string;
572
- }
573
-
574
- // Set input value directly (without events)
575
- export interface SetValueCommand extends BaseCommand {
576
- action: 'setvalue';
577
- selector: string;
578
- value: string;
579
- }
580
-
581
- // Dispatch event
582
- export interface DispatchEventCommand extends BaseCommand {
583
- action: 'dispatch';
584
- selector: string;
585
- event: string;
586
- eventInit?: Record<string, unknown>;
587
- }
588
-
589
- // Evaluate handle (for complex JS)
590
- export interface EvaluateHandleCommand extends BaseCommand {
591
- action: 'evalhandle';
592
- script: string;
593
- }
594
-
595
- // Expose function
596
- export interface ExposeFunctionCommand extends BaseCommand {
597
- action: 'expose';
598
- name: string;
599
- }
600
-
601
- // Add script/style tag
602
- export interface AddScriptCommand extends BaseCommand {
603
- action: 'addscript';
604
- content?: string;
605
- url?: string;
606
- }
607
-
608
- export interface AddStyleCommand extends BaseCommand {
609
- action: 'addstyle';
610
- content?: string;
611
- url?: string;
612
- }
613
-
614
- // Emulate media
615
- export interface EmulateMediaCommand extends BaseCommand {
616
- action: 'emulatemedia';
617
- media?: 'screen' | 'print' | null;
618
- colorScheme?: 'light' | 'dark' | 'no-preference' | null;
619
- reducedMotion?: 'reduce' | 'no-preference' | null;
620
- forcedColors?: 'active' | 'none' | null;
621
- }
622
-
623
- // Set offline mode
624
- export interface OfflineCommand extends BaseCommand {
625
- action: 'offline';
626
- offline: boolean;
627
- }
628
-
629
- // Set extra HTTP headers
630
- export interface HeadersCommand extends BaseCommand {
631
- action: 'headers';
632
- headers: Record<string, string>;
633
- }
634
-
635
- // Pause execution (for debugging)
636
- export interface PauseCommand extends BaseCommand {
637
- action: 'pause';
638
- }
639
-
640
- export interface PressCommand extends BaseCommand {
641
- action: 'press';
642
- key: string;
643
- selector?: string;
644
- }
645
-
646
- export interface ScreenshotCommand extends BaseCommand {
647
- action: 'screenshot';
648
- path?: string;
649
- fullPage?: boolean;
650
- selector?: string;
651
- format?: 'png' | 'jpeg';
652
- quality?: number;
653
- }
654
-
655
- export interface SnapshotCommand extends BaseCommand {
656
- action: 'snapshot';
657
- }
658
-
659
- export interface EvaluateCommand extends BaseCommand {
660
- action: 'evaluate';
661
- script: string;
662
- args?: unknown[];
663
- }
664
-
665
- export interface WaitCommand extends BaseCommand {
666
- action: 'wait';
667
- selector?: string;
668
- timeout?: number;
669
- state?: 'attached' | 'detached' | 'visible' | 'hidden';
670
- }
671
-
672
- export interface ScrollCommand extends BaseCommand {
673
- action: 'scroll';
674
- selector?: string;
675
- x?: number;
676
- y?: number;
677
- direction?: 'up' | 'down' | 'left' | 'right';
678
- amount?: number;
679
- }
680
-
681
- export interface SelectCommand extends BaseCommand {
682
- action: 'select';
683
- selector: string;
684
- values: string | string[];
685
- }
686
-
687
- export interface HoverCommand extends BaseCommand {
688
- action: 'hover';
689
- selector: string;
690
- }
691
-
692
- export interface ContentCommand extends BaseCommand {
693
- action: 'content';
694
- selector?: string;
695
- }
696
-
697
- export interface CloseCommand extends BaseCommand {
698
- action: 'close';
699
- }
700
-
701
- // Tab/Window commands
702
- export interface TabNewCommand extends BaseCommand {
703
- action: 'tab_new';
704
- }
705
-
706
- export interface TabListCommand extends BaseCommand {
707
- action: 'tab_list';
708
- }
709
-
710
- export interface TabSwitchCommand extends BaseCommand {
711
- action: 'tab_switch';
712
- index: number;
713
- }
714
-
715
- export interface TabCloseCommand extends BaseCommand {
716
- action: 'tab_close';
717
- index?: number;
718
- }
719
-
720
- export interface WindowNewCommand extends BaseCommand {
721
- action: 'window_new';
722
- viewport?: { width: number; height: number };
723
- }
724
-
725
- // Union of all command types
726
- export type Command =
727
- | LaunchCommand
728
- | NavigateCommand
729
- | ClickCommand
730
- | TypeCommand
731
- | FillCommand
732
- | CheckCommand
733
- | UncheckCommand
734
- | UploadCommand
735
- | DoubleClickCommand
736
- | FocusCommand
737
- | DragCommand
738
- | FrameCommand
739
- | MainFrameCommand
740
- | GetByRoleCommand
741
- | GetByTextCommand
742
- | GetByLabelCommand
743
- | GetByPlaceholderCommand
744
- | PressCommand
745
- | ScreenshotCommand
746
- | SnapshotCommand
747
- | EvaluateCommand
748
- | WaitCommand
749
- | ScrollCommand
750
- | SelectCommand
751
- | HoverCommand
752
- | ContentCommand
753
- | CloseCommand
754
- | TabNewCommand
755
- | TabListCommand
756
- | TabSwitchCommand
757
- | TabCloseCommand
758
- | WindowNewCommand
759
- | CookiesGetCommand
760
- | CookiesSetCommand
761
- | CookiesClearCommand
762
- | StorageGetCommand
763
- | StorageSetCommand
764
- | StorageClearCommand
765
- | DialogCommand
766
- | PdfCommand
767
- | RouteCommand
768
- | UnrouteCommand
769
- | RequestsCommand
770
- | DownloadCommand
771
- | GeolocationCommand
772
- | PermissionsCommand
773
- | ViewportCommand
774
- | UserAgentCommand
775
- | DeviceCommand
776
- | BackCommand
777
- | ForwardCommand
778
- | ReloadCommand
779
- | UrlCommand
780
- | TitleCommand
781
- | GetAttributeCommand
782
- | GetTextCommand
783
- | IsVisibleCommand
784
- | IsEnabledCommand
785
- | IsCheckedCommand
786
- | CountCommand
787
- | BoundingBoxCommand
788
- | VideoStartCommand
789
- | VideoStopCommand
790
- | TraceStartCommand
791
- | TraceStopCommand
792
- | HarStartCommand
793
- | HarStopCommand
794
- | StorageStateSaveCommand
795
- | StorageStateLoadCommand
796
- | ConsoleCommand
797
- | ErrorsCommand
798
- | KeyboardCommand
799
- | WheelCommand
800
- | TapCommand
801
- | ClipboardCommand
802
- | HighlightCommand
803
- | ClearCommand
804
- | SelectAllCommand
805
- | InnerTextCommand
806
- | InnerHtmlCommand
807
- | InputValueCommand
808
- | SetValueCommand
809
- | DispatchEventCommand
810
- | EvaluateHandleCommand
811
- | ExposeFunctionCommand
812
- | AddScriptCommand
813
- | AddStyleCommand
814
- | EmulateMediaCommand
815
- | OfflineCommand
816
- | HeadersCommand
817
- | PauseCommand
818
- | GetByAltTextCommand
819
- | GetByTitleCommand
820
- | GetByTestIdCommand
821
- | NthCommand
822
- | WaitForUrlCommand
823
- | WaitForLoadStateCommand
824
- | SetContentCommand
825
- | TimezoneCommand
826
- | LocaleCommand
827
- | HttpCredentialsCommand
828
- | MouseMoveCommand
829
- | MouseDownCommand
830
- | MouseUpCommand
831
- | BringToFrontCommand
832
- | WaitForFunctionCommand
833
- | ScrollIntoViewCommand
834
- | AddInitScriptCommand
835
- | KeyDownCommand
836
- | KeyUpCommand
837
- | InsertTextCommand
838
- | MultiSelectCommand
839
- | WaitForDownloadCommand
840
- | ResponseBodyCommand;
841
-
842
- // Response types
843
- export interface SuccessResponse<T = unknown> {
844
- id: string;
845
- success: true;
846
- data: T;
847
- }
848
-
849
- export interface ErrorResponse {
850
- id: string;
851
- success: false;
852
- error: string;
853
- }
854
-
855
- export type Response<T = unknown> = SuccessResponse<T> | ErrorResponse;
856
-
857
- // Data types for specific responses
858
- export interface NavigateData {
859
- url: string;
860
- title: string;
861
- }
862
-
863
- export interface ScreenshotData {
864
- path?: string;
865
- base64?: string;
866
- }
867
-
868
- export interface SnapshotData {
869
- snapshot: string;
870
- }
871
-
872
- export interface EvaluateData {
873
- result: unknown;
874
- }
875
-
876
- export interface ContentData {
877
- html: string;
878
- }
879
-
880
- export interface TabInfo {
881
- index: number;
882
- url: string;
883
- title: string;
884
- active: boolean;
885
- }
886
-
887
- export interface TabListData {
888
- tabs: TabInfo[];
889
- active: number;
890
- }
891
-
892
- export interface TabNewData {
893
- index: number;
894
- total: number;
895
- }
896
-
897
- export interface TabSwitchData {
898
- index: number;
899
- url: string;
900
- title: string;
901
- }
902
-
903
- export interface TabCloseData {
904
- closed: number;
905
- remaining: number;
906
- }
907
-
908
- // Browser state
909
- export interface BrowserState {
910
- browser: Browser | null;
911
- context: BrowserContext | null;
912
- page: Page | null;
913
- }