@fkn/lib 0.3.7 → 0.3.9

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/index.d.ts CHANGED
@@ -1,11 +1,36 @@
1
1
  import * as ip_address from 'ip-address';
2
2
  import { Address4, Address6 } from 'ip-address';
3
- import { Server as Server$1, ServerOpts, Socket as Socket$2, SocketConstructorOpts, SocketConnectOpts, AddressInfo, ListenOptions } from 'net';
3
+ import { Socket as Socket$2, SocketConstructorOpts, SocketConnectOpts, AddressInfo, Server as Server$2, ServerOpts, ListenOptions } from 'net';
4
4
  import { Stream, DuplexOptions } from 'stream';
5
5
  import { EventEmitter } from 'events';
6
6
  import { Socket as Socket$3, SocketOptions, BindOptions, SocketType, RemoteInfo } from 'dgram';
7
7
  import { Buffer } from 'buffer';
8
+ import { OutgoingHttpHeaders, IncomingHttpHeaders, RequestOptions } from 'http';
9
+ import * as osra from 'osra';
8
10
  import { BoxBase, Capable, UnderlyingType, RevivableContext } from 'osra';
11
+ import * as osra_build_revivables_event_target from 'osra/build/revivables/event-target';
12
+ import * as osra_build_revivables_fallbacks from 'osra/build/revivables/fallbacks';
13
+ import * as osra_build_revivables_event from 'osra/build/revivables/event';
14
+ import * as osra_build_revivables_symbol from 'osra/build/revivables/symbol';
15
+ import * as osra_build_revivables_bigint from 'osra/build/revivables/bigint';
16
+ import * as osra_build_revivables_set from 'osra/build/revivables/set';
17
+ import * as osra_build_revivables_map from 'osra/build/revivables/map';
18
+ import * as osra_build_revivables_request from 'osra/build/revivables/request';
19
+ import * as osra_build_revivables_response from 'osra/build/revivables/response';
20
+ import * as osra_build_revivables_abort_signal from 'osra/build/revivables/abort-signal';
21
+ import * as osra_build_revivables_writable_stream from 'osra/build/revivables/writable-stream';
22
+ import * as osra_build_revivables_readable_stream from 'osra/build/revivables/readable-stream';
23
+ import * as osra_build_revivables_message_port from 'osra/build/revivables/message-port';
24
+ import * as osra_build_revivables_function from 'osra/build/revivables/function';
25
+ import * as osra_build_revivables_promise from 'osra/build/revivables/promise';
26
+ import * as osra_build_revivables_blob from 'osra/build/revivables/blob';
27
+ import * as osra_build_revivables_typed_array from 'osra/build/revivables/typed-array';
28
+ import * as osra_build_revivables_error from 'osra/build/revivables/error';
29
+ import * as osra_build_revivables_headers from 'osra/build/revivables/headers';
30
+ import * as osra_build_revivables_date from 'osra/build/revivables/date';
31
+ import * as osra_build_revivables_array_buffer from 'osra/build/revivables/array-buffer';
32
+ import * as osra_build_revivables_identity from 'osra/build/revivables/identity';
33
+ import * as osra_build_revivables_transfer from 'osra/build/revivables/transfer';
9
34
 
10
35
  declare const parseServerMetadataUdpSocketBoundPacket: (offset: number, buffer: ArrayBuffer, view: DataView) => {
11
36
  readonly _type: "ServerMetadataUdpSocketBoundPacket";
@@ -205,6 +230,7 @@ declare const makeWebVPNWebTransport: () => Promise<{
205
230
  getPacketForId: (packetId: number) => Promise<ServerMetadataPacket>;
206
231
  getMetadataReadableStreamForSocketId: (socketId: number) => ReadableStream<ServerMetadataPacket>;
207
232
  getMetadataReadableStreamForLocalAddress: (address: Address4 | Address6) => ReadableStream<ServerMetadataPacket>;
233
+ getMetadataReadableStreamForLocalPort: (port: number) => ReadableStream<ServerMetadataPacket>;
208
234
  getMetadataWritableStream: () => WritableStream<Uint8Array<ArrayBufferLike>>;
209
235
  getDatagramWritableStream: () => WritableStream<Uint8Array<ArrayBufferLike>>;
210
236
  }>;
@@ -241,6 +267,17 @@ type AddressLookupResult = {
241
267
  };
242
268
 
243
269
  declare const resolvers: {
270
+ readonly setOverlayHost: (push: (state: {
271
+ modal: boolean;
272
+ rects: {
273
+ x: number;
274
+ y: number;
275
+ width: number;
276
+ height: number;
277
+ }[];
278
+ }) => unknown) => void;
279
+ readonly showInstallPrompt: (reason?: string) => Promise<void>;
280
+ readonly hideInstallPrompt: () => void;
244
281
  readonly dnsLookup: <T extends boolean = false>(hostname: string, options?: {
245
282
  all?: T;
246
283
  family: 0 | 4 | 6;
@@ -310,6 +347,14 @@ type ProxyFetch = Resolvers['proxyFetch'];
310
347
  type FetchParameters = Parameters<ProxyFetch>;
311
348
  declare const serverProxyFetch: (input: FetchParameters[0], init?: FetchParameters[1]) => Promise<Response>;
312
349
 
350
+ declare const relayWorker: (worker: Worker, options?: {
351
+ unregisterSignal?: AbortSignal;
352
+ originA?: string;
353
+ originB?: string;
354
+ }) => void;
355
+
356
+ declare const promptInstall: (reason?: string) => Promise<boolean>;
357
+
313
358
  declare const isIPv4: (input: string) => boolean;
314
359
  declare const isIPv6: (input: string) => boolean;
315
360
  declare const isIP: (input: string) => 0 | 4 | 6;
@@ -372,6 +417,9 @@ declare class Socket$1 extends Stream.Duplex implements Socket$2 {
372
417
  setKeepAlive(enable?: boolean | undefined, initialDelay?: number | undefined): this;
373
418
  setSendBufferSize(size: number): this;
374
419
  setRecvBufferSize(size: number): this;
420
+ _typeOfService?: number;
421
+ getTypeOfService(): number;
422
+ setTypeOfService(tos: number): this;
375
423
  _setTcpOption(option: TcpSocketOption): void;
376
424
  write(buffer: Uint8Array | string, cb?: (err?: Error) => void): boolean;
377
425
  write(str: Uint8Array | string, encoding?: BufferEncoding, cb?: (err?: Error) => void): boolean;
@@ -399,7 +447,7 @@ interface EventEmitterOptions$1 {
399
447
  */
400
448
  captureRejections?: boolean | undefined;
401
449
  }
402
- declare class Server extends EventEmitter implements Server$1 {
450
+ declare class Server$1 extends EventEmitter implements Server$2 {
403
451
  _localAddress?: {
404
452
  address: string;
405
453
  family: string;
@@ -437,37 +485,33 @@ declare class Server extends EventEmitter implements Server$1 {
437
485
  }
438
486
  declare const connect: (options: SocketConnectOpts, connectionListener?: () => void) => Socket$1;
439
487
  declare const createConnection: (options: SocketConnectOpts, connectionListener?: () => void) => Socket$1;
440
- declare const createServer: (options: ServerOpts, connectionListener?: (socket: Socket$1) => void) => Server;
488
+ declare const createServer$1: (options?: ServerOpts | ((socket: Socket$1) => void), connectionListener?: (socket: Socket$1) => void) => Server$1;
441
489
 
442
- declare const _default: {
490
+ declare const _default$1: {
443
491
  Socket: typeof Socket$1;
444
- Server: typeof Server;
492
+ Server: typeof Server$1;
445
493
  connect: (options: SocketConnectOpts, connectionListener?: () => void) => Socket$1;
446
494
  createConnection: (options: SocketConnectOpts, connectionListener?: () => void) => Socket$1;
447
- createServer: (options: ServerOpts, connectionListener?: (socket: Socket$1) => void) => Server;
495
+ createServer: (options?: ServerOpts | ((socket: Socket$1) => void), connectionListener?: (socket: Socket$1) => void) => Server$1;
448
496
  isIP: (input: string) => 0 | 4 | 6;
449
497
  isIPv4: (input: string) => boolean;
450
498
  isIPv6: (input: string) => boolean;
451
499
  };
452
500
 
453
- type net_Server = Server;
454
- declare const net_Server: typeof Server;
455
- declare const net__default: typeof _default;
456
501
  declare const net_connect: typeof connect;
457
502
  declare const net_createConnection: typeof createConnection;
458
- declare const net_createServer: typeof createServer;
459
503
  declare const net_isIP: typeof isIP;
460
504
  declare const net_isIPv4: typeof isIPv4;
461
505
  declare const net_isIPv6: typeof isIPv6;
462
506
  declare namespace net {
463
507
  export {
464
- net_Server as Server,
508
+ Server$1 as Server,
465
509
  Socket$1 as Socket,
466
- net__default as _default,
510
+ _default$1 as _default,
467
511
  net_connect as connect,
468
512
  net_createConnection as createConnection,
469
- net_createServer as createServer,
470
- _default as default,
513
+ createServer$1 as createServer,
514
+ _default$1 as default,
471
515
  net_isIP as isIP,
472
516
  net_isIPv4 as isIPv4,
473
517
  net_isIPv6 as isIPv6,
@@ -550,6 +594,283 @@ declare namespace dgram {
550
594
  };
551
595
  }
552
596
 
597
+ declare const METHODS: string[];
598
+ declare const STATUS_CODES: Record<number, string>;
599
+ interface ParsedHead {
600
+ /** request only */
601
+ method?: string;
602
+ /** request only */
603
+ url?: string;
604
+ /** response only */
605
+ statusCode?: number;
606
+ /** response only */
607
+ statusMessage?: string;
608
+ httpVersionMajor: number;
609
+ httpVersionMinor: number;
610
+ httpVersion: string;
611
+ headers: IncomingHttpHeaders;
612
+ rawHeaders: string[];
613
+ }
614
+ interface ParserHandlers {
615
+ onHeaders: (head: ParsedHead) => void;
616
+ onBody: (chunk: Uint8Array) => void;
617
+ onComplete: () => void;
618
+ }
619
+ declare class HTTPParser {
620
+ private readonly mode;
621
+ private readonly handlers;
622
+ private buf;
623
+ private state;
624
+ private framing;
625
+ private bodyRemaining;
626
+ private chunkState;
627
+ skipBody: boolean;
628
+ constructor(mode: 'request' | 'response', handlers: ParserHandlers);
629
+ execute(chunk: Uint8Array): void;
630
+ finish(): void;
631
+ private reset;
632
+ private parseHead;
633
+ private applyVersion;
634
+ private addHeader;
635
+ private setupBody;
636
+ private consumeBody;
637
+ private consumeChunked;
638
+ }
639
+ declare class IncomingMessage extends Stream.Readable {
640
+ httpVersion: string;
641
+ httpVersionMajor: number;
642
+ httpVersionMinor: number;
643
+ headers: IncomingHttpHeaders;
644
+ rawHeaders: string[];
645
+ trailers: Record<string, string>;
646
+ rawTrailers: string[];
647
+ /** request only */
648
+ method?: string;
649
+ /** request only */
650
+ url?: string;
651
+ /** response only */
652
+ statusCode?: number;
653
+ /** response only */
654
+ statusMessage?: string;
655
+ complete: boolean;
656
+ socket: Socket$1;
657
+ constructor(socket: Socket$1);
658
+ get connection(): Socket$1;
659
+ _applyHead(head: ParsedHead): void;
660
+ _read(): void;
661
+ setTimeout(msecs: number, callback?: () => void): this;
662
+ }
663
+ declare abstract class OutgoingMessage extends Stream.Writable {
664
+ private _headerStore;
665
+ headersSent: boolean;
666
+ chunkedEncoding: boolean;
667
+ finished: boolean;
668
+ protected _bodyWritten: boolean;
669
+ abstract socket: Socket$1 | null;
670
+ setHeader(name: string, value: number | string | readonly string[]): this;
671
+ getHeader(name: string): number | string | string[] | undefined;
672
+ getHeaderNames(): string[];
673
+ getHeaders(): OutgoingHttpHeaders;
674
+ hasHeader(name: string): boolean;
675
+ removeHeader(name: string): void;
676
+ protected _storeHeader(startLine: string): string;
677
+ protected abstract _shouldSendBody(): boolean;
678
+ protected abstract _implicitHeader(): void;
679
+ protected _writeToSocket(data: Buffer, callback: (error?: Error | null) => void): void;
680
+ write(chunk: unknown, encoding?: BufferEncoding | ((error: Error | null | undefined) => void), callback?: (error: Error | null | undefined) => void): boolean;
681
+ _write(chunk: Buffer, _encoding: BufferEncoding, callback: (error?: Error | null) => void): void;
682
+ _final(callback: (error?: Error | null) => void): void;
683
+ end(chunk?: unknown, encoding?: BufferEncoding | (() => void), callback?: () => void): this;
684
+ protected _headBlock?: string;
685
+ }
686
+ interface ServerResponseOptions {
687
+ req: IncomingMessage;
688
+ }
689
+ declare class ServerResponse extends OutgoingMessage {
690
+ statusCode: number;
691
+ statusMessage?: string;
692
+ private _writeHeadCalled;
693
+ sendDate: boolean;
694
+ req: IncomingMessage;
695
+ socket: Socket$1 | null;
696
+ _keepAlive: boolean;
697
+ constructor(req: IncomingMessage);
698
+ protected _shouldSendBody(): boolean;
699
+ writeHead(statusCode: number, statusMessage?: string | OutgoingHttpHeaders | OutgoingHttpHeaders[keyof OutgoingHttpHeaders][], headers?: OutgoingHttpHeaders): this;
700
+ private _appendHeader;
701
+ protected _implicitHeader(): void;
702
+ writeContinue(): void;
703
+ setTimeout(msecs: number, callback?: () => void): this;
704
+ }
705
+ interface ClientRequestArgs extends RequestOptions {
706
+ host?: string;
707
+ hostname?: string;
708
+ port?: number | string;
709
+ path?: string;
710
+ }
711
+ declare class ClientRequest extends OutgoingMessage {
712
+ method: string;
713
+ path: string;
714
+ host: string;
715
+ protocol: string;
716
+ socket: Socket$1;
717
+ /** alias retained for Node compatibility */
718
+ get connection(): Socket$1;
719
+ res: IncomingMessage | null;
720
+ aborted: boolean;
721
+ private _aborted;
722
+ constructor(options: ClientRequestArgs, callback?: (res: IncomingMessage) => void);
723
+ protected _shouldSendBody(): boolean;
724
+ protected _implicitHeader(): void;
725
+ private _attachResponseParser;
726
+ abort(): void;
727
+ destroy(error?: Error): this;
728
+ end(chunk?: unknown, encoding?: unknown, callback?: unknown): this;
729
+ protected _writeToSocket(data: Buffer, callback: (error?: Error | null) => void): void;
730
+ setTimeout(timeout: number, callback?: () => void): this;
731
+ setNoDelay(noDelay?: boolean): void;
732
+ setSocketKeepAlive(enable?: boolean, initialDelay?: number): void;
733
+ }
734
+ type RequestListener = (req: IncomingMessage, res: ServerResponse) => void;
735
+ declare class ServerImpl extends Server$1 {
736
+ constructor(options?: object | RequestListener, requestListener?: RequestListener);
737
+ private _handleConnection;
738
+ }
739
+ declare const Server: typeof ServerImpl;
740
+ type Server = ServerImpl;
741
+ declare class Agent {
742
+ maxSockets: number;
743
+ maxFreeSockets: number;
744
+ keepAlive: boolean;
745
+ options: Record<string, unknown>;
746
+ constructor(options?: Record<string, unknown>);
747
+ getName(options?: {
748
+ host?: string;
749
+ port?: number;
750
+ localAddress?: string;
751
+ }): string;
752
+ destroy(): void;
753
+ }
754
+ declare const globalAgent: Agent;
755
+ declare const request: (...args: [options: string | URL | ClientRequestArgs, callback?: (res: IncomingMessage) => void] | [url: string | URL, options: ClientRequestArgs, callback?: (res: IncomingMessage) => void]) => ClientRequest;
756
+ declare const get: (...args: [options: string | URL | ClientRequestArgs, callback?: (res: IncomingMessage) => void] | [url: string | URL, options: ClientRequestArgs, callback?: (res: IncomingMessage) => void]) => ClientRequest;
757
+ declare const createServer: (options?: object | RequestListener, requestListener?: RequestListener) => Server;
758
+ declare const _default: {
759
+ METHODS: string[];
760
+ STATUS_CODES: Record<number, string>;
761
+ Agent: typeof Agent;
762
+ globalAgent: Agent;
763
+ Server: typeof ServerImpl;
764
+ ServerResponse: typeof ServerResponse;
765
+ IncomingMessage: typeof IncomingMessage;
766
+ ClientRequest: typeof ClientRequest;
767
+ OutgoingMessage: typeof OutgoingMessage;
768
+ createServer: (options?: object | RequestListener, requestListener?: RequestListener) => Server;
769
+ request: (...args: [options: string | URL | ClientRequestArgs, callback?: (res: IncomingMessage) => void] | [url: string | URL, options: ClientRequestArgs, callback?: (res: IncomingMessage) => void]) => ClientRequest;
770
+ get: (...args: [options: string | URL | ClientRequestArgs, callback?: (res: IncomingMessage) => void] | [url: string | URL, options: ClientRequestArgs, callback?: (res: IncomingMessage) => void]) => ClientRequest;
771
+ };
772
+
773
+ type http_Agent = Agent;
774
+ declare const http_Agent: typeof Agent;
775
+ type http_ClientRequest = ClientRequest;
776
+ declare const http_ClientRequest: typeof ClientRequest;
777
+ type http_ClientRequestArgs = ClientRequestArgs;
778
+ type http_HTTPParser = HTTPParser;
779
+ declare const http_HTTPParser: typeof HTTPParser;
780
+ type http_IncomingMessage = IncomingMessage;
781
+ declare const http_IncomingMessage: typeof IncomingMessage;
782
+ declare const http_METHODS: typeof METHODS;
783
+ type http_ParsedHead = ParsedHead;
784
+ type http_RequestListener = RequestListener;
785
+ declare const http_STATUS_CODES: typeof STATUS_CODES;
786
+ type http_Server = Server;
787
+ type http_ServerResponse = ServerResponse;
788
+ declare const http_ServerResponse: typeof ServerResponse;
789
+ type http_ServerResponseOptions = ServerResponseOptions;
790
+ declare const http__default: typeof _default;
791
+ declare const http_createServer: typeof createServer;
792
+ declare const http_get: typeof get;
793
+ declare const http_globalAgent: typeof globalAgent;
794
+ declare const http_request: typeof request;
795
+ declare namespace http {
796
+ export { http_Agent as Agent, http_ClientRequest as ClientRequest, http_HTTPParser as HTTPParser, http_IncomingMessage as IncomingMessage, http_METHODS as METHODS, http_STATUS_CODES as STATUS_CODES, http_ServerResponse as ServerResponse, http__default as _default, http_createServer as createServer, _default as default, http_get as get, http_globalAgent as globalAgent, http_request as request };
797
+ export type { http_ClientRequestArgs as ClientRequestArgs, http_ParsedHead as ParsedHead, http_RequestListener as RequestListener, http_Server as Server, http_ServerResponseOptions as ServerResponseOptions };
798
+ }
799
+
800
+ declare const fetchPermission: {
801
+ readonly scope: "network.fetch";
802
+ readonly category: "network";
803
+ readonly severity: 0;
804
+ readonly title: "Fetch data from other sites";
805
+ readonly description: "Lets the app download public data from other websites directly, past the usual cross-origin limits.";
806
+ };
807
+ declare const fetchCredentialedPermission: {
808
+ readonly scope: "network.fetchCredentialed";
809
+ readonly category: "network";
810
+ readonly severity: 3;
811
+ readonly unsafe: true;
812
+ readonly title: "Fetch from other sites — signed in as you";
813
+ readonly description: "Lets the app fetch other sites using your logged-in session cookies, so it can read data only you should see.";
814
+ };
815
+ type ProxyFetchRequest = {
816
+ url: string;
817
+ method: string;
818
+ headers: [string, string][];
819
+ body: ArrayBuffer | null;
820
+ credentials: 'include' | 'omit';
821
+ redirect: RequestRedirect;
822
+ unsafeHeaders?: [string, string][];
823
+ reason?: string;
824
+ signal?: AbortSignal;
825
+ };
826
+ type FetchInit = RequestInit & {
827
+ reason?: string;
828
+ };
829
+ declare const fetch: (input: URL | RequestInfo, init?: FetchInit | undefined) => Promise<Response>;
830
+
831
+ declare const readCookiePermission: {
832
+ readonly scope: "network.readCookie";
833
+ readonly category: "network";
834
+ readonly severity: 3;
835
+ readonly unsafe: true;
836
+ readonly title: "Read a site’s cookie";
837
+ readonly description: "Lets the app read a named cookie from another site, which can include the login token only that site should see.";
838
+ };
839
+ type CookieDetails = {
840
+ url: string;
841
+ name: string;
842
+ };
843
+ type SiteCookie = {
844
+ name: string;
845
+ value: string;
846
+ };
847
+ declare const cookies: {
848
+ get: (details: CookieDetails) => Promise<SiteCookie | null>;
849
+ };
850
+
851
+ declare const modifyRequestHeadersPermission: {
852
+ readonly scope: "network.modifyRequestHeaders";
853
+ readonly category: "network";
854
+ readonly severity: 2;
855
+ readonly unsafe: true;
856
+ readonly title: "Rewrite request headers to other sites";
857
+ readonly description: "Lets the app set or remove headers (like Origin and Referer) on this page’s own requests to the listed sites.";
858
+ };
859
+ type HeaderOperation = {
860
+ header: string;
861
+ operation: 'set' | 'remove';
862
+ value?: string;
863
+ };
864
+ type RequestHeaderRule = {
865
+ domains: string[];
866
+ requestHeaders: HeaderOperation[];
867
+ reason?: string;
868
+ };
869
+ declare const setRequestHeaderRule: (rule: RequestHeaderRule) => Promise<{
870
+ ruleId: number;
871
+ }>;
872
+ declare const removeRequestHeaderRule: (ruleId: number) => Promise<void>;
873
+
553
874
  type ExtractType<M> = M extends {
554
875
  type: infer T extends string;
555
876
  } ? T : never;
@@ -563,7 +884,7 @@ type ExtractResolverReturn<M> = M extends {
563
884
  resolve: (context: any, ...args: any[]) => infer R;
564
885
  } ? R : never;
565
886
 
566
- declare const type$i: 'locator';
887
+ declare const type$i: "locator";
567
888
  declare const resolve$h: (context: LocatorContext, selector: string) => Element[];
568
889
  declare const render$7: SelectorRenderer;
569
890
 
@@ -575,7 +896,7 @@ declare namespace locatorSel {
575
896
  };
576
897
  }
577
898
 
578
- declare const type$h: 'getByRole';
899
+ declare const type$h: "getByRole";
579
900
  declare const resolve$g: (context: LocatorContext, role: string) => Element[];
580
901
  declare const render$6: SelectorRenderer;
581
902
 
@@ -587,7 +908,7 @@ declare namespace getByRole {
587
908
  };
588
909
  }
589
910
 
590
- declare const type$g: 'getByText';
911
+ declare const type$g: "getByText";
591
912
  declare const resolve$f: (context: LocatorContext, text: string) => Element[];
592
913
  declare const render$5: SelectorRenderer;
593
914
 
@@ -599,7 +920,7 @@ declare namespace getByText {
599
920
  };
600
921
  }
601
922
 
602
- declare const type$f: 'getByTestId';
923
+ declare const type$f: "getByTestId";
603
924
  declare const resolve$e: (context: LocatorContext, testId: string) => Element[];
604
925
  declare const render$4: SelectorRenderer;
605
926
 
@@ -611,7 +932,7 @@ declare namespace getByTestId {
611
932
  };
612
933
  }
613
934
 
614
- declare const type$e: 'first';
935
+ declare const type$e: "first";
615
936
  declare const resolve$d: (context: LocatorContext) => Element[];
616
937
  declare const render$3: SelectorRenderer;
617
938
 
@@ -623,7 +944,7 @@ declare namespace first {
623
944
  };
624
945
  }
625
946
 
626
- declare const type$d: 'nth';
947
+ declare const type$d: "nth";
627
948
  declare const resolve$c: (context: LocatorContext, index: number) => Element[];
628
949
  declare const render$2: SelectorRenderer;
629
950
 
@@ -635,125 +956,173 @@ declare namespace nth {
635
956
  };
636
957
  }
637
958
 
638
- declare const type$c: 'click';
959
+ declare const type$c: "click";
960
+ declare const permission$9: {
961
+ readonly scope: "act.click";
962
+ readonly category: "act";
963
+ readonly severity: 3;
964
+ readonly title: "Click on the page";
965
+ readonly description: "Lets the app press buttons or links for you.";
966
+ };
639
967
  declare const resolve$b: (context: LocatorContext, options?: OperationTimeoutOptions & {
640
968
  position?: {
641
- x?: number;
642
- y?: number;
643
- };
969
+ x?: number | undefined;
970
+ y?: number | undefined;
971
+ } | undefined;
644
972
  }) => void;
645
973
 
646
974
  declare namespace click {
647
975
  export {
976
+ permission$9 as permission,
648
977
  resolve$b as resolve,
649
978
  type$c as type,
650
979
  };
651
980
  }
652
981
 
653
- declare const type$b: 'fill';
982
+ declare const type$b: "fill";
983
+ declare const permission$8: {
984
+ readonly scope: "act.type";
985
+ readonly category: "act";
986
+ readonly severity: 1;
987
+ readonly title: "Type into a text field";
988
+ readonly description: "Lets the app fill in form fields on your behalf.";
989
+ };
654
990
  declare const resolve$a: (context: LocatorContext, value: string, _options?: OperationTimeoutOptions) => void;
655
991
 
656
992
  declare namespace fill {
657
993
  export {
994
+ permission$8 as permission,
658
995
  resolve$a as resolve,
659
996
  type$b as type,
660
997
  };
661
998
  }
662
999
 
663
- declare const type$a: 'hover';
664
- declare const resolve$9: (context: LocatorContext, _options?: OperationTimeoutOptions) => void;
1000
+ declare const type$a: "hover";
1001
+ declare const permission$7: {
1002
+ readonly scope: "act.hover";
1003
+ readonly category: "act";
1004
+ readonly severity: 1;
1005
+ readonly title: "Hover over the page";
1006
+ readonly description: "Lets the app point at things to reveal menus or tooltips.";
1007
+ };
1008
+ declare const resolve$9: (context: LocatorContext, options?: OperationTimeoutOptions & {
1009
+ position?: {
1010
+ x?: number | undefined;
1011
+ y?: number | undefined;
1012
+ } | undefined;
1013
+ }) => void;
665
1014
 
666
1015
  declare namespace hover {
667
1016
  export {
1017
+ permission$7 as permission,
668
1018
  resolve$9 as resolve,
669
1019
  type$a as type,
670
1020
  };
671
1021
  }
672
1022
 
673
- declare const type$9: 'textContent';
1023
+ declare const type$9: "textContent";
1024
+ declare const permission$6: {
1025
+ readonly scope: "read.text";
1026
+ readonly category: "read";
1027
+ readonly severity: 1;
1028
+ readonly title: "Read text from the page";
1029
+ readonly description: "Lets the app see the text shown on this page.";
1030
+ };
674
1031
  declare const resolve$8: (context: LocatorContext, _options?: OperationTimeoutOptions) => string;
675
1032
 
676
1033
  declare namespace textContent {
677
1034
  export {
1035
+ permission$6 as permission,
678
1036
  resolve$8 as resolve,
679
1037
  type$9 as type,
680
1038
  };
681
1039
  }
682
1040
 
683
- declare const type$8: 'isVisible';
1041
+ declare const type$8: "isVisible";
1042
+ declare const permission$5: {
1043
+ readonly scope: "read.visible";
1044
+ readonly category: "read";
1045
+ readonly severity: 0;
1046
+ readonly title: "See what’s visible on the page";
1047
+ readonly description: "Lets the app check which elements are currently on screen.";
1048
+ };
684
1049
  declare const resolve$7: (context: LocatorContext, _options?: OperationTimeoutOptions) => boolean;
685
1050
 
686
1051
  declare namespace isVisible {
687
1052
  export {
1053
+ permission$5 as permission,
688
1054
  resolve$7 as resolve,
689
1055
  type$8 as type,
690
1056
  };
691
1057
  }
692
1058
 
693
- declare const type$7: 'count';
1059
+ declare const type$7: "count";
1060
+ declare const permission$4: {
1061
+ readonly scope: "read.count";
1062
+ readonly category: "read";
1063
+ readonly severity: 0;
1064
+ readonly title: "Count items on the page";
1065
+ readonly description: "Lets the app count how many matching elements are present.";
1066
+ };
694
1067
  declare const resolve$6: (context: LocatorContext, _options?: OperationTimeoutOptions) => number;
695
1068
 
696
1069
  declare namespace count {
697
1070
  export {
1071
+ permission$4 as permission,
698
1072
  resolve$6 as resolve,
699
1073
  type$7 as type,
700
1074
  };
701
1075
  }
702
1076
 
703
- declare const type$6: 'exists';
1077
+ declare const type$6: "exists";
1078
+ declare const permission$3: {
1079
+ readonly scope: "read.check";
1080
+ readonly category: "read";
1081
+ readonly severity: 0;
1082
+ readonly title: "Check if something is on the page";
1083
+ readonly description: "Lets the app test whether a specific element exists.";
1084
+ };
704
1085
  declare const resolve$5: (context: LocatorContext, _options?: OperationTimeoutOptions) => boolean;
705
1086
 
706
1087
  declare namespace exists {
707
1088
  export {
1089
+ permission$3 as permission,
708
1090
  resolve$5 as resolve,
709
1091
  type$6 as type,
710
1092
  };
711
1093
  }
712
1094
 
713
- declare const type$5: 'getAttribute';
1095
+ declare const type$5: "getAttribute";
1096
+ declare const permission$2: {
1097
+ readonly scope: "read.info";
1098
+ readonly category: "read";
1099
+ readonly severity: 1;
1100
+ readonly title: "Read info from the page";
1101
+ readonly description: "Lets the app read the href value from a part of the page.";
1102
+ };
714
1103
  declare const resolve$4: (context: LocatorContext, name: string, _options?: OperationTimeoutOptions) => string | null;
715
1104
 
716
1105
  declare namespace getAttribute {
717
1106
  export {
1107
+ permission$2 as permission,
718
1108
  resolve$4 as resolve,
719
1109
  type$5 as type,
720
1110
  };
721
1111
  }
722
1112
 
723
- type RemoteVideoElement$1 = EventTarget & {
724
- currentTime: number;
725
- volume: number;
726
- muted: boolean;
727
- playbackRate: number;
728
- src: string;
729
- loop: boolean;
730
- autoplay: boolean;
731
- preload: string;
732
- poster: string;
733
- disableRemotePlayback: boolean;
734
- readonly duration: number;
735
- readonly paused: boolean;
736
- readonly ended: boolean;
737
- readonly seeking: boolean;
738
- readonly readyState: number;
739
- readonly currentSrc: string;
740
- readonly error: MediaError | null;
741
- readonly buffered: TimeRanges;
742
- readonly seekable: TimeRanges;
743
- play(): Promise<void>;
744
- pause(): void;
745
- load(): void;
746
- requestPictureInPicture(): Promise<void>;
747
- exitPictureInPicture(): Promise<void>;
748
- readonly HAVE_FUTURE_DATA: 3;
749
- readonly HAVE_ENOUGH_DATA: 4;
1113
+ declare const type$4: "videoElement";
1114
+ declare const permission$1: {
1115
+ readonly scope: "media.video";
1116
+ readonly category: "media";
1117
+ readonly severity: 0;
1118
+ readonly title: "Control video playback";
1119
+ readonly description: "Lets the app play, pause, seek, and read the video on the page.";
750
1120
  };
1121
+ declare const resolve$3: (context: LocatorContext, _options?: OperationTimeoutOptions) => RemoteVideoElement;
751
1122
 
752
- declare const type$4: 'videoElement';
753
- declare const resolve$3: (context: LocatorContext, _options?: OperationTimeoutOptions) => RemoteVideoElement$1;
754
-
755
- declare namespace videoElement {
1123
+ declare namespace videoElement$1 {
756
1124
  export {
1125
+ permission$1 as permission,
757
1126
  resolve$3 as resolve,
758
1127
  type$4 as type,
759
1128
  };
@@ -762,19 +1131,19 @@ declare namespace videoElement {
762
1131
  declare const locatorModule: {
763
1132
  readonly type: "locator";
764
1133
  readonly selectorModules: readonly [typeof locatorSel, {
765
- readonly type: 'frameLocator';
1134
+ readonly type: "frameLocator";
766
1135
  readonly resolve: (context: LocatorContext, selector: string) => HTMLIFrameElement[];
767
1136
  readonly resolvePeer: BarrierResolver;
768
1137
  readonly render: SelectorRenderer;
769
- readonly nextLocatorType: 'frameLocator';
1138
+ readonly nextLocatorType: "frameLocator";
770
1139
  }, typeof getByRole, typeof getByText, typeof getByTestId, typeof first, typeof nth];
771
- readonly operationModules: readonly [typeof click, typeof fill, typeof hover, typeof textContent, typeof isVisible, typeof count, typeof exists, typeof getAttribute, typeof videoElement];
1140
+ readonly operationModules: readonly [typeof click, typeof fill, typeof hover, typeof textContent, typeof isVisible, typeof count, typeof exists, typeof getAttribute, typeof videoElement$1];
772
1141
  };
773
1142
  type LocatorModule = typeof locatorModule;
774
1143
  interface Locator extends LocatorChain<LocatorModule, Locator> {
775
1144
  }
776
1145
 
777
- declare const type$3: 'frameLocator';
1146
+ declare const type$3: "frameLocator";
778
1147
  declare const resolve$2: (context: LocatorContext, selector: string) => HTMLIFrameElement[];
779
1148
  declare const resolvePeer$1: BarrierResolver;
780
1149
  declare const render$1: SelectorRenderer;
@@ -788,7 +1157,7 @@ declare namespace frameLocatorSel {
788
1157
  };
789
1158
  }
790
1159
 
791
- declare const type$2: 'owner';
1160
+ declare const type$2: "owner";
792
1161
  declare const resolve$1: (_: LocatorContext) => never;
793
1162
  declare const resolvePeer: BarrierResolver;
794
1163
  declare const render: SelectorRenderer;
@@ -804,27 +1173,61 @@ declare namespace owner {
804
1173
  };
805
1174
  }
806
1175
 
807
- declare const type$1: 'addStyleTag';
1176
+ declare const type$1: "addStyleTag";
808
1177
  type AddStyleTagOptions = OperationTimeoutOptions & {
809
1178
  content: string;
810
1179
  noSanitize?: boolean;
811
1180
  };
1181
+ declare const appearPermission: {
1182
+ readonly scope: "media.appear";
1183
+ readonly category: "media";
1184
+ readonly severity: 0;
1185
+ readonly title: "Change page appearance";
1186
+ readonly description: "Lets the app restyle parts of the page — safely filtered.";
1187
+ };
1188
+ declare const appearUnsafePermission: {
1189
+ readonly scope: "media.appearU";
1190
+ readonly category: "media";
1191
+ readonly severity: 2;
1192
+ readonly unsafe: true;
1193
+ readonly title: "Change page appearance (unsafe)";
1194
+ readonly description: "Lets the app restyle the page WITHOUT safety filtering — could be used to leak data over the network.";
1195
+ };
1196
+ declare const permission: (options?: AddStyleTagOptions | undefined) => {
1197
+ readonly scope: "media.appear";
1198
+ readonly category: "media";
1199
+ readonly severity: 0;
1200
+ readonly title: "Change page appearance";
1201
+ readonly description: "Lets the app restyle parts of the page — safely filtered.";
1202
+ } | {
1203
+ readonly scope: "media.appearU";
1204
+ readonly category: "media";
1205
+ readonly severity: 2;
1206
+ readonly unsafe: true;
1207
+ readonly title: "Change page appearance (unsafe)";
1208
+ readonly description: "Lets the app restyle the page WITHOUT safety filtering — could be used to leak data over the network.";
1209
+ };
1210
+ declare const setInjectedStylesDisabled: (disabled: boolean) => void;
812
1211
  declare const resolve: (_context: LocatorContext, options: AddStyleTagOptions) => Promise<void>;
813
1212
 
814
1213
  type addStyleTag_AddStyleTagOptions = AddStyleTagOptions;
1214
+ declare const addStyleTag_appearPermission: typeof appearPermission;
1215
+ declare const addStyleTag_appearUnsafePermission: typeof appearUnsafePermission;
1216
+ declare const addStyleTag_permission: typeof permission;
815
1217
  declare const addStyleTag_resolve: typeof resolve;
1218
+ declare const addStyleTag_setInjectedStylesDisabled: typeof setInjectedStylesDisabled;
816
1219
  declare namespace addStyleTag {
817
- export { addStyleTag_resolve as resolve, type$1 as type };
1220
+ export { addStyleTag_appearPermission as appearPermission, addStyleTag_appearUnsafePermission as appearUnsafePermission, addStyleTag_permission as permission, addStyleTag_resolve as resolve, addStyleTag_setInjectedStylesDisabled as setInjectedStylesDisabled, type$1 as type };
818
1221
  export type { addStyleTag_AddStyleTagOptions as AddStyleTagOptions };
819
1222
  }
820
1223
 
821
1224
  declare const frameLocatorModule: {
822
1225
  readonly type: "frameLocator";
823
1226
  readonly selectorModules: readonly [{
824
- readonly type: 'locator';
1227
+ readonly type: "locator";
825
1228
  readonly resolve: (context: LocatorContext, selector: string) => Element[];
826
1229
  readonly render: SelectorRenderer;
827
- readonly nextLocatorType: 'locator';
1230
+ readonly nextLocatorType: "locator";
828
1231
  }, typeof frameLocatorSel, typeof owner];
829
1232
  readonly operationModules: readonly [typeof addStyleTag];
830
1233
  };
@@ -834,11 +1237,23 @@ interface FrameLocator extends LocatorChain<FrameLocatorModule, FrameLocator> {
834
1237
 
835
1238
  type FrameId = `${number}-${number}`;
836
1239
 
1240
+ type PermissionCategory = 'read' | 'act' | 'media' | 'embed' | 'network';
1241
+ type PermissionSeverity = 0 | 1 | 2 | 3 | 4;
1242
+ type Permission = {
1243
+ scope: string;
1244
+ category: PermissionCategory;
1245
+ severity: PermissionSeverity;
1246
+ title: string;
1247
+ description: string;
1248
+ unsafe?: boolean;
1249
+ };
1250
+
837
1251
  type LocatorContext = {
838
1252
  elements: Element[];
839
1253
  };
840
1254
  type OperationTimeoutOptions = {
841
1255
  timeout?: number;
1256
+ reason?: string;
842
1257
  };
843
1258
  type BarrierContext = {
844
1259
  parts: SelectorPart[];
@@ -858,9 +1273,11 @@ type SelectorModule = {
858
1273
  resolvePeer?: BarrierResolver;
859
1274
  render?: SelectorRenderer;
860
1275
  };
1276
+ type OperationPermission = Permission | ((...args: any[]) => Permission);
861
1277
  type OperationModule = {
862
1278
  type: string;
863
1279
  resolve: (context: LocatorContext, ...args: any[]) => unknown;
1280
+ permission: OperationPermission;
864
1281
  };
865
1282
  type LocatorKindModule = {
866
1283
  readonly type: string;
@@ -885,9 +1302,30 @@ type LocatorChain<L extends LocatorKindModule, Self> = {
885
1302
  ] extends [never] ? (...args: ExtractResolverArgs<M>) => Self : (...args: ExtractResolverArgs<M>) => NextLocator<M>;
886
1303
  } & {
887
1304
  [M in L['operationModules'][number] as ExtractType<M>]: (...args: ExtractOperationArgs<M>) => Promise<Awaited<ExtractResolverReturn<M>>>;
1305
+ } & {
1306
+ ensure: (operation: ExtractType<L['operationModules'][number]>, options?: {
1307
+ reason?: string;
1308
+ timeout?: number;
1309
+ } & Record<string, unknown>) => Promise<void>;
888
1310
  };
889
1311
 
890
1312
  declare const ATTACH_FRAME_EVENT_KEY = "FKN_WEB_EXTENSION_ATTACH_FRAME_EVENT_KEY";
1313
+ declare const isBlockedFrameUrl: (raw: string) => boolean;
1314
+ declare const assertAttachableFrameUrl: (raw: string) => void;
1315
+ declare const attachFramePermission: {
1316
+ readonly scope: "embed.iframe";
1317
+ readonly category: "embed";
1318
+ readonly severity: 0;
1319
+ readonly title: "Load another website inside this app";
1320
+ readonly description: "Lets the app embed external pages directly inside its own view.";
1321
+ };
1322
+ declare const gotoPermission: {
1323
+ readonly scope: "embed.open";
1324
+ readonly category: "embed";
1325
+ readonly severity: 0;
1326
+ readonly title: "Open a website inside this app";
1327
+ readonly description: "Lets the app navigate to another site without leaving its window.";
1328
+ };
891
1329
  type GotoOptions = {
892
1330
  waitUntil?: 'documentstart' | 'load';
893
1331
  domains?: string[];
@@ -902,7 +1340,130 @@ type AttachFrameOptions = {
902
1340
  };
903
1341
  declare const attachFrame: ({ iframe, domains }: AttachFrameOptions) => Promise<Frame>;
904
1342
 
905
- declare const type: 'videoElement';
1343
+ declare const PERMISSIONS: readonly [{
1344
+ readonly scope: "read.text";
1345
+ readonly category: "read";
1346
+ readonly severity: 1;
1347
+ readonly title: "Read text from the page";
1348
+ readonly description: "Lets the app see the text shown on this page.";
1349
+ }, {
1350
+ readonly scope: "read.info";
1351
+ readonly category: "read";
1352
+ readonly severity: 1;
1353
+ readonly title: "Read info from the page";
1354
+ readonly description: "Lets the app read the href value from a part of the page.";
1355
+ }, {
1356
+ readonly scope: "read.visible";
1357
+ readonly category: "read";
1358
+ readonly severity: 0;
1359
+ readonly title: "See what’s visible on the page";
1360
+ readonly description: "Lets the app check which elements are currently on screen.";
1361
+ }, {
1362
+ readonly scope: "read.check";
1363
+ readonly category: "read";
1364
+ readonly severity: 0;
1365
+ readonly title: "Check if something is on the page";
1366
+ readonly description: "Lets the app test whether a specific element exists.";
1367
+ }, {
1368
+ readonly scope: "read.count";
1369
+ readonly category: "read";
1370
+ readonly severity: 0;
1371
+ readonly title: "Count items on the page";
1372
+ readonly description: "Lets the app count how many matching elements are present.";
1373
+ }, {
1374
+ readonly scope: "act.click";
1375
+ readonly category: "act";
1376
+ readonly severity: 3;
1377
+ readonly title: "Click on the page";
1378
+ readonly description: "Lets the app press buttons or links for you.";
1379
+ }, {
1380
+ readonly scope: "act.type";
1381
+ readonly category: "act";
1382
+ readonly severity: 1;
1383
+ readonly title: "Type into a text field";
1384
+ readonly description: "Lets the app fill in form fields on your behalf.";
1385
+ }, {
1386
+ readonly scope: "act.hover";
1387
+ readonly category: "act";
1388
+ readonly severity: 1;
1389
+ readonly title: "Hover over the page";
1390
+ readonly description: "Lets the app point at things to reveal menus or tooltips.";
1391
+ }, {
1392
+ readonly scope: "media.video";
1393
+ readonly category: "media";
1394
+ readonly severity: 0;
1395
+ readonly title: "Control video playback";
1396
+ readonly description: "Lets the app play, pause, seek, and read the video on the page.";
1397
+ }, {
1398
+ readonly scope: "media.appear";
1399
+ readonly category: "media";
1400
+ readonly severity: 0;
1401
+ readonly title: "Change page appearance";
1402
+ readonly description: "Lets the app restyle parts of the page — safely filtered.";
1403
+ }, {
1404
+ readonly scope: "media.appearU";
1405
+ readonly category: "media";
1406
+ readonly severity: 2;
1407
+ readonly unsafe: true;
1408
+ readonly title: "Change page appearance (unsafe)";
1409
+ readonly description: "Lets the app restyle the page WITHOUT safety filtering — could be used to leak data over the network.";
1410
+ }, {
1411
+ readonly scope: "embed.iframe";
1412
+ readonly category: "embed";
1413
+ readonly severity: 0;
1414
+ readonly title: "Load another website inside this app";
1415
+ readonly description: "Lets the app embed external pages directly inside its own view.";
1416
+ }, {
1417
+ readonly scope: "embed.open";
1418
+ readonly category: "embed";
1419
+ readonly severity: 0;
1420
+ readonly title: "Open a website inside this app";
1421
+ readonly description: "Lets the app navigate to another site without leaving its window.";
1422
+ }, {
1423
+ readonly scope: "network.fetch";
1424
+ readonly category: "network";
1425
+ readonly severity: 0;
1426
+ readonly title: "Fetch data from other sites";
1427
+ readonly description: "Lets the app download public data from other websites directly, past the usual cross-origin limits.";
1428
+ }, {
1429
+ readonly scope: "network.fetchCredentialed";
1430
+ readonly category: "network";
1431
+ readonly severity: 3;
1432
+ readonly unsafe: true;
1433
+ readonly title: "Fetch from other sites — signed in as you";
1434
+ readonly description: "Lets the app fetch other sites using your logged-in session cookies, so it can read data only you should see.";
1435
+ }, {
1436
+ readonly scope: "network.readCookie";
1437
+ readonly category: "network";
1438
+ readonly severity: 3;
1439
+ readonly unsafe: true;
1440
+ readonly title: "Read a site’s cookie";
1441
+ readonly description: "Lets the app read a named cookie from another site, which can include the login token only that site should see.";
1442
+ }, {
1443
+ readonly scope: "network.modifyRequestHeaders";
1444
+ readonly category: "network";
1445
+ readonly severity: 2;
1446
+ readonly unsafe: true;
1447
+ readonly title: "Rewrite request headers to other sites";
1448
+ readonly description: "Lets the app set or remove headers (like Origin and Referer) on this page’s own requests to the listed sites.";
1449
+ }];
1450
+ type PermissionScope = (typeof PERMISSIONS)[number]['scope'];
1451
+
1452
+ type PermissionRequest = {
1453
+ key: PermissionScope;
1454
+ scope?: string;
1455
+ reason?: string;
1456
+ };
1457
+ type PermissionGrant = {
1458
+ key: PermissionScope;
1459
+ scope: string;
1460
+ allow: boolean;
1461
+ };
1462
+ declare const permissions: {
1463
+ request: (requests: PermissionRequest[]) => Promise<PermissionGrant[]>;
1464
+ };
1465
+
1466
+ declare const type: "videoElement";
906
1467
  type TimeRangesTuple = [number, number][];
907
1468
  type VideoElementState = {
908
1469
  currentTime: number;
@@ -965,9 +1526,67 @@ type BoxedVideoElement = BoxBase<typeof type> & {
965
1526
  declare const createVideoElementHandle: (element: HTMLVideoElement) => RemoteVideoElement;
966
1527
  declare const isType: (value: unknown) => value is RemoteVideoElement;
967
1528
  declare const box: <T extends RemoteVideoElement, T2 extends RevivableContext>(value: T, context: T2) => BoxedVideoElement;
968
- declare const revive: <T extends BoxedVideoElement, T2 extends RevivableContext>(value: T, context: T2) => T[UnderlyingType];
1529
+ declare const revive: <T extends BoxedVideoElement, T2 extends RevivableContext>(value: T, context: T2) => T[typeof UnderlyingType];
969
1530
 
970
- declare const handleRevivableModules: any;
1531
+ type videoElement_BoxedVideoElement = BoxedVideoElement;
1532
+ type videoElement_RemoteVideoElement = RemoteVideoElement;
1533
+ type videoElement_VideoElementState = VideoElementState;
1534
+ declare const videoElement_box: typeof box;
1535
+ declare const videoElement_createVideoElementHandle: typeof createVideoElementHandle;
1536
+ declare const videoElement_isType: typeof isType;
1537
+ declare const videoElement_revive: typeof revive;
1538
+ declare const videoElement_type: typeof type;
1539
+ declare namespace videoElement {
1540
+ export { videoElement_box as box, videoElement_createVideoElementHandle as createVideoElementHandle, videoElement_isType as isType, videoElement_revive as revive, videoElement_type as type };
1541
+ export type { videoElement_BoxedVideoElement as BoxedVideoElement, videoElement_RemoteVideoElement as RemoteVideoElement, videoElement_VideoElementState as VideoElementState };
1542
+ }
1543
+
1544
+ declare const handleRevivableModules: (defaults: readonly [typeof osra_build_revivables_transfer, typeof osra_build_revivables_identity, typeof osra_build_revivables_array_buffer, typeof osra_build_revivables_date, typeof osra_build_revivables_headers, typeof osra_build_revivables_error, typeof osra_build_revivables_typed_array, typeof osra_build_revivables_blob, typeof osra_build_revivables_promise, typeof osra_build_revivables_function, typeof osra_build_revivables_message_port, typeof osra_build_revivables_readable_stream, typeof osra_build_revivables_writable_stream, typeof osra_build_revivables_abort_signal, typeof osra_build_revivables_response, typeof osra_build_revivables_request, typeof osra_build_revivables_map, typeof osra_build_revivables_set, typeof osra_build_revivables_bigint, typeof osra_build_revivables_symbol, typeof osra_build_revivables_event, {
1545
+ readonly type: "clonable";
1546
+ readonly capableOnly: true;
1547
+ readonly isType: (value: unknown) => value is osra_build_revivables_fallbacks.Clonable;
1548
+ readonly box: (value: osra_build_revivables_fallbacks.Clonable, _context: osra.RevivableContext<any>) => osra_build_revivables_fallbacks.Clonable;
1549
+ readonly revive: (value: osra_build_revivables_fallbacks.BoxedClonable, _context: osra.RevivableContext<any>) => osra_build_revivables_fallbacks.Clonable;
1550
+ }, {
1551
+ readonly type: "transferable";
1552
+ readonly capableOnly: true;
1553
+ readonly isType: (value: unknown) => value is osra_build_revivables_fallbacks.Transferable;
1554
+ readonly box: (value: osra_build_revivables_fallbacks.Transferable, _context: osra.RevivableContext<any>) => osra_build_revivables_fallbacks.Transferable;
1555
+ readonly revive: (value: osra_build_revivables_fallbacks.BoxedTransferable, _context: osra.RevivableContext<any>) => osra_build_revivables_fallbacks.Transferable;
1556
+ }, typeof osra_build_revivables_event_target, {
1557
+ readonly type: "unclonable";
1558
+ readonly isType: (value: unknown) => value is never;
1559
+ readonly box: (_value: never, _context: osra.RevivableContext<any>) => osra_build_revivables_fallbacks.BoxedUnclonable;
1560
+ readonly revive: (_value: osra_build_revivables_fallbacks.BoxedUnclonable, _context: osra.RevivableContext<any>) => Record<string, never>;
1561
+ }]) => readonly [typeof videoElement, typeof osra_build_revivables_transfer, typeof osra_build_revivables_identity, typeof osra_build_revivables_array_buffer, typeof osra_build_revivables_date, typeof osra_build_revivables_headers, typeof osra_build_revivables_error, typeof osra_build_revivables_typed_array, typeof osra_build_revivables_blob, typeof osra_build_revivables_promise, typeof osra_build_revivables_function, typeof osra_build_revivables_message_port, typeof osra_build_revivables_readable_stream, typeof osra_build_revivables_writable_stream, typeof osra_build_revivables_abort_signal, typeof osra_build_revivables_response, typeof osra_build_revivables_request, typeof osra_build_revivables_map, typeof osra_build_revivables_set, typeof osra_build_revivables_bigint, typeof osra_build_revivables_symbol, typeof osra_build_revivables_event, {
1562
+ readonly type: "clonable";
1563
+ readonly capableOnly: true;
1564
+ readonly isType: (value: unknown) => value is osra_build_revivables_fallbacks.Clonable;
1565
+ readonly box: (value: osra_build_revivables_fallbacks.Clonable, _context: osra.RevivableContext<any>) => osra_build_revivables_fallbacks.Clonable;
1566
+ readonly revive: (value: osra_build_revivables_fallbacks.BoxedClonable, _context: osra.RevivableContext<any>) => osra_build_revivables_fallbacks.Clonable;
1567
+ }, {
1568
+ readonly type: "transferable";
1569
+ readonly capableOnly: true;
1570
+ readonly isType: (value: unknown) => value is osra_build_revivables_fallbacks.Transferable;
1571
+ readonly box: (value: osra_build_revivables_fallbacks.Transferable, _context: osra.RevivableContext<any>) => osra_build_revivables_fallbacks.Transferable;
1572
+ readonly revive: (value: osra_build_revivables_fallbacks.BoxedTransferable, _context: osra.RevivableContext<any>) => osra_build_revivables_fallbacks.Transferable;
1573
+ }, typeof osra_build_revivables_event_target, {
1574
+ readonly type: "unclonable";
1575
+ readonly isType: (value: unknown) => value is never;
1576
+ readonly box: (_value: never, _context: osra.RevivableContext<any>) => osra_build_revivables_fallbacks.BoxedUnclonable;
1577
+ readonly revive: (_value: osra_build_revivables_fallbacks.BoxedUnclonable, _context: osra.RevivableContext<any>) => Record<string, never>;
1578
+ }];
1579
+
1580
+ type ExtensionEventMap = {
1581
+ statuschange: CustomEvent<{
1582
+ enabled: boolean;
1583
+ }>;
1584
+ };
1585
+ declare const extension: osra.TypedEventTarget<ExtensionEventMap>;
1586
+ declare const isExtensionExposed: () => boolean;
1587
+ type MissingExtensionHandler = () => Promise<void>;
1588
+ declare const setMissingExtensionHandler: (handler: MissingExtensionHandler | null) => void;
1589
+ declare const waitForExtensionExposure: (timeout?: number) => Promise<void>;
971
1590
 
972
- export { ATTACH_FRAME_EVENT_KEY, attachFrame, box, createVideoElementHandle, dgram, handleRevivableModules, isType, net, revive, serverProxyFetch, type };
973
- export type { AttachFrameOptions, BoxedVideoElement, Frame, GotoOptions, RemoteVideoElement, VideoElementState };
1591
+ export { ATTACH_FRAME_EVENT_KEY, assertAttachableFrameUrl, attachFrame, attachFramePermission, box, cookies, createVideoElementHandle, dgram, extension, fetch, fetchCredentialedPermission, fetchPermission, gotoPermission, handleRevivableModules, http, isBlockedFrameUrl, isExtensionExposed, isType, modifyRequestHeadersPermission, net, permissions, promptInstall, readCookiePermission, relayWorker, removeRequestHeaderRule, revive, serverProxyFetch, setMissingExtensionHandler, setRequestHeaderRule, type, waitForExtensionExposure };
1592
+ export type { AttachFrameOptions, BoxedVideoElement, CookieDetails, FetchInit, Frame, GotoOptions, HeaderOperation, PermissionGrant, PermissionRequest, ProxyFetchRequest, RemoteVideoElement, RequestHeaderRule, SiteCookie, VideoElementState };