@fkn/lib 0.3.6 → 0.3.8

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,8 @@ type AddressLookupResult = {
241
267
  };
242
268
 
243
269
  declare const resolvers: {
270
+ readonly showInstallPrompt: (reason?: string) => Promise<void>;
271
+ readonly hideInstallPrompt: () => Promise<void>;
244
272
  readonly dnsLookup: <T extends boolean = false>(hostname: string, options?: {
245
273
  all?: T;
246
274
  family: 0 | 4 | 6;
@@ -310,6 +338,41 @@ type ProxyFetch = Resolvers['proxyFetch'];
310
338
  type FetchParameters = Parameters<ProxyFetch>;
311
339
  declare const serverProxyFetch: (input: FetchParameters[0], init?: FetchParameters[1]) => Promise<Response>;
312
340
 
341
+ declare const relayWorker: (worker: Worker, options?: {
342
+ unregisterSignal?: AbortSignal;
343
+ originA?: string;
344
+ originB?: string;
345
+ }) => void;
346
+
347
+ declare const promptInstall: (reason?: string) => Promise<boolean>;
348
+
349
+ declare const changeIframeStyle: (style: Record<string, string>) => void;
350
+ declare const resetIframeStyle: () => void;
351
+
352
+ type StorageListItem = {
353
+ key: string;
354
+ updatedAt: string;
355
+ };
356
+ type StorageListResult = {
357
+ items: StorageListItem[];
358
+ nextCursor: string | null;
359
+ };
360
+ type StorageListOptions = {
361
+ limit?: number;
362
+ cursor?: string;
363
+ };
364
+ declare const storage: {
365
+ set: (namespace: string, key: string, value: Uint8Array) => Promise<void>;
366
+ get: (namespace: string, key: string) => Promise<Uint8Array | null>;
367
+ list: (namespace: string, opts?: StorageListOptions) => Promise<StorageListResult>;
368
+ remove: (namespace: string, key: string) => Promise<void>;
369
+ };
370
+
371
+ declare const refillPremiumTokens: () => Promise<void>;
372
+
373
+ declare const countTokens: () => Promise<number>;
374
+ declare const clearTokens: () => Promise<void>;
375
+
313
376
  declare const isIPv4: (input: string) => boolean;
314
377
  declare const isIPv6: (input: string) => boolean;
315
378
  declare const isIP: (input: string) => 0 | 4 | 6;
@@ -399,7 +462,7 @@ interface EventEmitterOptions$1 {
399
462
  */
400
463
  captureRejections?: boolean | undefined;
401
464
  }
402
- declare class Server extends EventEmitter implements Server$1 {
465
+ declare class Server$1 extends EventEmitter implements Server$2 {
403
466
  _localAddress?: {
404
467
  address: string;
405
468
  family: string;
@@ -437,37 +500,33 @@ declare class Server extends EventEmitter implements Server$1 {
437
500
  }
438
501
  declare const connect: (options: SocketConnectOpts, connectionListener?: () => void) => Socket$1;
439
502
  declare const createConnection: (options: SocketConnectOpts, connectionListener?: () => void) => Socket$1;
440
- declare const createServer: (options: ServerOpts, connectionListener?: (socket: Socket$1) => void) => Server;
503
+ declare const createServer$1: (options?: ServerOpts | ((socket: Socket$1) => void), connectionListener?: (socket: Socket$1) => void) => Server$1;
441
504
 
442
- declare const _default: {
505
+ declare const _default$1: {
443
506
  Socket: typeof Socket$1;
444
- Server: typeof Server;
507
+ Server: typeof Server$1;
445
508
  connect: (options: SocketConnectOpts, connectionListener?: () => void) => Socket$1;
446
509
  createConnection: (options: SocketConnectOpts, connectionListener?: () => void) => Socket$1;
447
- createServer: (options: ServerOpts, connectionListener?: (socket: Socket$1) => void) => Server;
510
+ createServer: (options?: ServerOpts | ((socket: Socket$1) => void), connectionListener?: (socket: Socket$1) => void) => Server$1;
448
511
  isIP: (input: string) => 0 | 4 | 6;
449
512
  isIPv4: (input: string) => boolean;
450
513
  isIPv6: (input: string) => boolean;
451
514
  };
452
515
 
453
- type net_Server = Server;
454
- declare const net_Server: typeof Server;
455
- declare const net__default: typeof _default;
456
516
  declare const net_connect: typeof connect;
457
517
  declare const net_createConnection: typeof createConnection;
458
- declare const net_createServer: typeof createServer;
459
518
  declare const net_isIP: typeof isIP;
460
519
  declare const net_isIPv4: typeof isIPv4;
461
520
  declare const net_isIPv6: typeof isIPv6;
462
521
  declare namespace net {
463
522
  export {
464
- net_Server as Server,
523
+ Server$1 as Server,
465
524
  Socket$1 as Socket,
466
- net__default as _default,
525
+ _default$1 as _default,
467
526
  net_connect as connect,
468
527
  net_createConnection as createConnection,
469
- net_createServer as createServer,
470
- _default as default,
528
+ createServer$1 as createServer,
529
+ _default$1 as default,
471
530
  net_isIP as isIP,
472
531
  net_isIPv4 as isIPv4,
473
532
  net_isIPv6 as isIPv6,
@@ -550,6 +609,283 @@ declare namespace dgram {
550
609
  };
551
610
  }
552
611
 
612
+ declare const METHODS: string[];
613
+ declare const STATUS_CODES: Record<number, string>;
614
+ interface ParsedHead {
615
+ /** request only */
616
+ method?: string;
617
+ /** request only */
618
+ url?: string;
619
+ /** response only */
620
+ statusCode?: number;
621
+ /** response only */
622
+ statusMessage?: string;
623
+ httpVersionMajor: number;
624
+ httpVersionMinor: number;
625
+ httpVersion: string;
626
+ headers: IncomingHttpHeaders;
627
+ rawHeaders: string[];
628
+ }
629
+ interface ParserHandlers {
630
+ onHeaders: (head: ParsedHead) => void;
631
+ onBody: (chunk: Uint8Array) => void;
632
+ onComplete: () => void;
633
+ }
634
+ declare class HTTPParser {
635
+ private readonly mode;
636
+ private readonly handlers;
637
+ private buf;
638
+ private state;
639
+ private framing;
640
+ private bodyRemaining;
641
+ private chunkState;
642
+ skipBody: boolean;
643
+ constructor(mode: 'request' | 'response', handlers: ParserHandlers);
644
+ execute(chunk: Uint8Array): void;
645
+ finish(): void;
646
+ private reset;
647
+ private parseHead;
648
+ private applyVersion;
649
+ private addHeader;
650
+ private setupBody;
651
+ private consumeBody;
652
+ private consumeChunked;
653
+ }
654
+ declare class IncomingMessage extends Stream.Readable {
655
+ httpVersion: string;
656
+ httpVersionMajor: number;
657
+ httpVersionMinor: number;
658
+ headers: IncomingHttpHeaders;
659
+ rawHeaders: string[];
660
+ trailers: Record<string, string>;
661
+ rawTrailers: string[];
662
+ /** request only */
663
+ method?: string;
664
+ /** request only */
665
+ url?: string;
666
+ /** response only */
667
+ statusCode?: number;
668
+ /** response only */
669
+ statusMessage?: string;
670
+ complete: boolean;
671
+ socket: Socket$1;
672
+ constructor(socket: Socket$1);
673
+ get connection(): Socket$1;
674
+ _applyHead(head: ParsedHead): void;
675
+ _read(): void;
676
+ setTimeout(msecs: number, callback?: () => void): this;
677
+ }
678
+ declare abstract class OutgoingMessage extends Stream.Writable {
679
+ private _headerStore;
680
+ headersSent: boolean;
681
+ chunkedEncoding: boolean;
682
+ finished: boolean;
683
+ protected _bodyWritten: boolean;
684
+ abstract socket: Socket$1 | null;
685
+ setHeader(name: string, value: number | string | readonly string[]): this;
686
+ getHeader(name: string): number | string | string[] | undefined;
687
+ getHeaderNames(): string[];
688
+ getHeaders(): OutgoingHttpHeaders;
689
+ hasHeader(name: string): boolean;
690
+ removeHeader(name: string): void;
691
+ protected _storeHeader(startLine: string): string;
692
+ protected abstract _shouldSendBody(): boolean;
693
+ protected abstract _implicitHeader(): void;
694
+ protected _writeToSocket(data: Buffer, callback: (error?: Error | null) => void): void;
695
+ write(chunk: unknown, encoding?: BufferEncoding | ((error: Error | null | undefined) => void), callback?: (error: Error | null | undefined) => void): boolean;
696
+ _write(chunk: Buffer, _encoding: BufferEncoding, callback: (error?: Error | null) => void): void;
697
+ _final(callback: (error?: Error | null) => void): void;
698
+ end(chunk?: unknown, encoding?: BufferEncoding | (() => void), callback?: () => void): this;
699
+ protected _headBlock?: string;
700
+ }
701
+ interface ServerResponseOptions {
702
+ req: IncomingMessage;
703
+ }
704
+ declare class ServerResponse extends OutgoingMessage {
705
+ statusCode: number;
706
+ statusMessage?: string;
707
+ private _writeHeadCalled;
708
+ sendDate: boolean;
709
+ req: IncomingMessage;
710
+ socket: Socket$1 | null;
711
+ _keepAlive: boolean;
712
+ constructor(req: IncomingMessage);
713
+ protected _shouldSendBody(): boolean;
714
+ writeHead(statusCode: number, statusMessage?: string | OutgoingHttpHeaders | OutgoingHttpHeaders[keyof OutgoingHttpHeaders][], headers?: OutgoingHttpHeaders): this;
715
+ private _appendHeader;
716
+ protected _implicitHeader(): void;
717
+ writeContinue(): void;
718
+ setTimeout(msecs: number, callback?: () => void): this;
719
+ }
720
+ interface ClientRequestArgs extends RequestOptions {
721
+ host?: string;
722
+ hostname?: string;
723
+ port?: number | string;
724
+ path?: string;
725
+ }
726
+ declare class ClientRequest extends OutgoingMessage {
727
+ method: string;
728
+ path: string;
729
+ host: string;
730
+ protocol: string;
731
+ socket: Socket$1;
732
+ /** alias retained for Node compatibility */
733
+ get connection(): Socket$1;
734
+ res: IncomingMessage | null;
735
+ aborted: boolean;
736
+ private _aborted;
737
+ constructor(options: ClientRequestArgs, callback?: (res: IncomingMessage) => void);
738
+ protected _shouldSendBody(): boolean;
739
+ protected _implicitHeader(): void;
740
+ private _attachResponseParser;
741
+ abort(): void;
742
+ destroy(error?: Error): this;
743
+ end(chunk?: unknown, encoding?: unknown, callback?: unknown): this;
744
+ protected _writeToSocket(data: Buffer, callback: (error?: Error | null) => void): void;
745
+ setTimeout(timeout: number, callback?: () => void): this;
746
+ setNoDelay(noDelay?: boolean): void;
747
+ setSocketKeepAlive(enable?: boolean, initialDelay?: number): void;
748
+ }
749
+ type RequestListener = (req: IncomingMessage, res: ServerResponse) => void;
750
+ declare class ServerImpl extends Server$1 {
751
+ constructor(options?: object | RequestListener, requestListener?: RequestListener);
752
+ private _handleConnection;
753
+ }
754
+ declare const Server: typeof ServerImpl;
755
+ type Server = ServerImpl;
756
+ declare class Agent {
757
+ maxSockets: number;
758
+ maxFreeSockets: number;
759
+ keepAlive: boolean;
760
+ options: Record<string, unknown>;
761
+ constructor(options?: Record<string, unknown>);
762
+ getName(options?: {
763
+ host?: string;
764
+ port?: number;
765
+ localAddress?: string;
766
+ }): string;
767
+ destroy(): void;
768
+ }
769
+ declare const globalAgent: Agent;
770
+ declare const request: (...args: [options: string | URL | ClientRequestArgs, callback?: (res: IncomingMessage) => void] | [url: string | URL, options: ClientRequestArgs, callback?: (res: IncomingMessage) => void]) => ClientRequest;
771
+ declare const get: (...args: [options: string | URL | ClientRequestArgs, callback?: (res: IncomingMessage) => void] | [url: string | URL, options: ClientRequestArgs, callback?: (res: IncomingMessage) => void]) => ClientRequest;
772
+ declare const createServer: (options?: object | RequestListener, requestListener?: RequestListener) => Server;
773
+ declare const _default: {
774
+ METHODS: string[];
775
+ STATUS_CODES: Record<number, string>;
776
+ Agent: typeof Agent;
777
+ globalAgent: Agent;
778
+ Server: typeof ServerImpl;
779
+ ServerResponse: typeof ServerResponse;
780
+ IncomingMessage: typeof IncomingMessage;
781
+ ClientRequest: typeof ClientRequest;
782
+ OutgoingMessage: typeof OutgoingMessage;
783
+ createServer: (options?: object | RequestListener, requestListener?: RequestListener) => Server;
784
+ request: (...args: [options: string | URL | ClientRequestArgs, callback?: (res: IncomingMessage) => void] | [url: string | URL, options: ClientRequestArgs, callback?: (res: IncomingMessage) => void]) => ClientRequest;
785
+ get: (...args: [options: string | URL | ClientRequestArgs, callback?: (res: IncomingMessage) => void] | [url: string | URL, options: ClientRequestArgs, callback?: (res: IncomingMessage) => void]) => ClientRequest;
786
+ };
787
+
788
+ type http_Agent = Agent;
789
+ declare const http_Agent: typeof Agent;
790
+ type http_ClientRequest = ClientRequest;
791
+ declare const http_ClientRequest: typeof ClientRequest;
792
+ type http_ClientRequestArgs = ClientRequestArgs;
793
+ type http_HTTPParser = HTTPParser;
794
+ declare const http_HTTPParser: typeof HTTPParser;
795
+ type http_IncomingMessage = IncomingMessage;
796
+ declare const http_IncomingMessage: typeof IncomingMessage;
797
+ declare const http_METHODS: typeof METHODS;
798
+ type http_ParsedHead = ParsedHead;
799
+ type http_RequestListener = RequestListener;
800
+ declare const http_STATUS_CODES: typeof STATUS_CODES;
801
+ type http_Server = Server;
802
+ type http_ServerResponse = ServerResponse;
803
+ declare const http_ServerResponse: typeof ServerResponse;
804
+ type http_ServerResponseOptions = ServerResponseOptions;
805
+ declare const http__default: typeof _default;
806
+ declare const http_createServer: typeof createServer;
807
+ declare const http_get: typeof get;
808
+ declare const http_globalAgent: typeof globalAgent;
809
+ declare const http_request: typeof request;
810
+ declare namespace http {
811
+ 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 };
812
+ export type { http_ClientRequestArgs as ClientRequestArgs, http_ParsedHead as ParsedHead, http_RequestListener as RequestListener, http_Server as Server, http_ServerResponseOptions as ServerResponseOptions };
813
+ }
814
+
815
+ declare const fetchPermission: {
816
+ readonly scope: "network.fetch";
817
+ readonly category: "network";
818
+ readonly severity: 0;
819
+ readonly title: "Fetch data from other sites";
820
+ readonly description: "Lets the app download public data from other websites directly, past the usual cross-origin limits.";
821
+ };
822
+ declare const fetchCredentialedPermission: {
823
+ readonly scope: "network.fetchCredentialed";
824
+ readonly category: "network";
825
+ readonly severity: 3;
826
+ readonly unsafe: true;
827
+ readonly title: "Fetch from other sites — signed in as you";
828
+ readonly description: "Lets the app fetch other sites using your logged-in session cookies, so it can read data only you should see.";
829
+ };
830
+ type ProxyFetchRequest = {
831
+ url: string;
832
+ method: string;
833
+ headers: [string, string][];
834
+ body: ArrayBuffer | null;
835
+ credentials: 'include' | 'omit';
836
+ redirect: RequestRedirect;
837
+ unsafeHeaders?: [string, string][];
838
+ reason?: string;
839
+ signal?: AbortSignal;
840
+ };
841
+ type FetchInit = RequestInit & {
842
+ reason?: string;
843
+ };
844
+ declare const fetch: (input: URL | RequestInfo, init?: FetchInit | undefined) => Promise<Response>;
845
+
846
+ declare const readCookiePermission: {
847
+ readonly scope: "network.readCookie";
848
+ readonly category: "network";
849
+ readonly severity: 3;
850
+ readonly unsafe: true;
851
+ readonly title: "Read a site’s cookie";
852
+ readonly description: "Lets the app read a named cookie from another site, which can include the login token only that site should see.";
853
+ };
854
+ type CookieDetails = {
855
+ url: string;
856
+ name: string;
857
+ };
858
+ type SiteCookie = {
859
+ name: string;
860
+ value: string;
861
+ };
862
+ declare const cookies: {
863
+ get: (details: CookieDetails) => Promise<SiteCookie | null>;
864
+ };
865
+
866
+ declare const modifyRequestHeadersPermission: {
867
+ readonly scope: "network.modifyRequestHeaders";
868
+ readonly category: "network";
869
+ readonly severity: 2;
870
+ readonly unsafe: true;
871
+ readonly title: "Rewrite request headers to other sites";
872
+ readonly description: "Lets the app set or remove headers (like Origin and Referer) on this page’s own requests to the listed sites.";
873
+ };
874
+ type HeaderOperation = {
875
+ header: string;
876
+ operation: 'set' | 'remove';
877
+ value?: string;
878
+ };
879
+ type RequestHeaderRule = {
880
+ domains: string[];
881
+ requestHeaders: HeaderOperation[];
882
+ reason?: string;
883
+ };
884
+ declare const setRequestHeaderRule: (rule: RequestHeaderRule) => Promise<{
885
+ ruleId: number;
886
+ }>;
887
+ declare const removeRequestHeaderRule: (ruleId: number) => Promise<void>;
888
+
553
889
  type ExtractType<M> = M extends {
554
890
  type: infer T extends string;
555
891
  } ? T : never;
@@ -563,7 +899,7 @@ type ExtractResolverReturn<M> = M extends {
563
899
  resolve: (context: any, ...args: any[]) => infer R;
564
900
  } ? R : never;
565
901
 
566
- declare const type$i: 'locator';
902
+ declare const type$i: "locator";
567
903
  declare const resolve$h: (context: LocatorContext, selector: string) => Element[];
568
904
  declare const render$7: SelectorRenderer;
569
905
 
@@ -575,7 +911,7 @@ declare namespace locatorSel {
575
911
  };
576
912
  }
577
913
 
578
- declare const type$h: 'getByRole';
914
+ declare const type$h: "getByRole";
579
915
  declare const resolve$g: (context: LocatorContext, role: string) => Element[];
580
916
  declare const render$6: SelectorRenderer;
581
917
 
@@ -587,7 +923,7 @@ declare namespace getByRole {
587
923
  };
588
924
  }
589
925
 
590
- declare const type$g: 'getByText';
926
+ declare const type$g: "getByText";
591
927
  declare const resolve$f: (context: LocatorContext, text: string) => Element[];
592
928
  declare const render$5: SelectorRenderer;
593
929
 
@@ -599,7 +935,7 @@ declare namespace getByText {
599
935
  };
600
936
  }
601
937
 
602
- declare const type$f: 'getByTestId';
938
+ declare const type$f: "getByTestId";
603
939
  declare const resolve$e: (context: LocatorContext, testId: string) => Element[];
604
940
  declare const render$4: SelectorRenderer;
605
941
 
@@ -611,7 +947,7 @@ declare namespace getByTestId {
611
947
  };
612
948
  }
613
949
 
614
- declare const type$e: 'first';
950
+ declare const type$e: "first";
615
951
  declare const resolve$d: (context: LocatorContext) => Element[];
616
952
  declare const render$3: SelectorRenderer;
617
953
 
@@ -623,7 +959,7 @@ declare namespace first {
623
959
  };
624
960
  }
625
961
 
626
- declare const type$d: 'nth';
962
+ declare const type$d: "nth";
627
963
  declare const resolve$c: (context: LocatorContext, index: number) => Element[];
628
964
  declare const render$2: SelectorRenderer;
629
965
 
@@ -635,125 +971,168 @@ declare namespace nth {
635
971
  };
636
972
  }
637
973
 
638
- declare const type$c: 'click';
974
+ declare const type$c: "click";
975
+ declare const permission$9: {
976
+ readonly scope: "act.click";
977
+ readonly category: "act";
978
+ readonly severity: 3;
979
+ readonly title: "Click on the page";
980
+ readonly description: "Lets the app press buttons or links for you.";
981
+ };
639
982
  declare const resolve$b: (context: LocatorContext, options?: OperationTimeoutOptions & {
640
983
  position?: {
641
- x?: number;
642
- y?: number;
643
- };
984
+ x?: number | undefined;
985
+ y?: number | undefined;
986
+ } | undefined;
644
987
  }) => void;
645
988
 
646
989
  declare namespace click {
647
990
  export {
991
+ permission$9 as permission,
648
992
  resolve$b as resolve,
649
993
  type$c as type,
650
994
  };
651
995
  }
652
996
 
653
- declare const type$b: 'fill';
997
+ declare const type$b: "fill";
998
+ declare const permission$8: {
999
+ readonly scope: "act.type";
1000
+ readonly category: "act";
1001
+ readonly severity: 1;
1002
+ readonly title: "Type into a text field";
1003
+ readonly description: "Lets the app fill in form fields on your behalf.";
1004
+ };
654
1005
  declare const resolve$a: (context: LocatorContext, value: string, _options?: OperationTimeoutOptions) => void;
655
1006
 
656
1007
  declare namespace fill {
657
1008
  export {
1009
+ permission$8 as permission,
658
1010
  resolve$a as resolve,
659
1011
  type$b as type,
660
1012
  };
661
1013
  }
662
1014
 
663
- declare const type$a: 'hover';
1015
+ declare const type$a: "hover";
1016
+ declare const permission$7: {
1017
+ readonly scope: "act.hover";
1018
+ readonly category: "act";
1019
+ readonly severity: 1;
1020
+ readonly title: "Hover over the page";
1021
+ readonly description: "Lets the app point at things to reveal menus or tooltips.";
1022
+ };
664
1023
  declare const resolve$9: (context: LocatorContext, _options?: OperationTimeoutOptions) => void;
665
1024
 
666
1025
  declare namespace hover {
667
1026
  export {
1027
+ permission$7 as permission,
668
1028
  resolve$9 as resolve,
669
1029
  type$a as type,
670
1030
  };
671
1031
  }
672
1032
 
673
- declare const type$9: 'textContent';
1033
+ declare const type$9: "textContent";
1034
+ declare const permission$6: {
1035
+ readonly scope: "read.text";
1036
+ readonly category: "read";
1037
+ readonly severity: 1;
1038
+ readonly title: "Read text from the page";
1039
+ readonly description: "Lets the app see the text shown on this page.";
1040
+ };
674
1041
  declare const resolve$8: (context: LocatorContext, _options?: OperationTimeoutOptions) => string;
675
1042
 
676
1043
  declare namespace textContent {
677
1044
  export {
1045
+ permission$6 as permission,
678
1046
  resolve$8 as resolve,
679
1047
  type$9 as type,
680
1048
  };
681
1049
  }
682
1050
 
683
- declare const type$8: 'isVisible';
1051
+ declare const type$8: "isVisible";
1052
+ declare const permission$5: {
1053
+ readonly scope: "read.visible";
1054
+ readonly category: "read";
1055
+ readonly severity: 0;
1056
+ readonly title: "See what’s visible on the page";
1057
+ readonly description: "Lets the app check which elements are currently on screen.";
1058
+ };
684
1059
  declare const resolve$7: (context: LocatorContext, _options?: OperationTimeoutOptions) => boolean;
685
1060
 
686
1061
  declare namespace isVisible {
687
1062
  export {
1063
+ permission$5 as permission,
688
1064
  resolve$7 as resolve,
689
1065
  type$8 as type,
690
1066
  };
691
1067
  }
692
1068
 
693
- declare const type$7: 'count';
1069
+ declare const type$7: "count";
1070
+ declare const permission$4: {
1071
+ readonly scope: "read.count";
1072
+ readonly category: "read";
1073
+ readonly severity: 0;
1074
+ readonly title: "Count items on the page";
1075
+ readonly description: "Lets the app count how many matching elements are present.";
1076
+ };
694
1077
  declare const resolve$6: (context: LocatorContext, _options?: OperationTimeoutOptions) => number;
695
1078
 
696
1079
  declare namespace count {
697
1080
  export {
1081
+ permission$4 as permission,
698
1082
  resolve$6 as resolve,
699
1083
  type$7 as type,
700
1084
  };
701
1085
  }
702
1086
 
703
- declare const type$6: 'exists';
1087
+ declare const type$6: "exists";
1088
+ declare const permission$3: {
1089
+ readonly scope: "read.check";
1090
+ readonly category: "read";
1091
+ readonly severity: 0;
1092
+ readonly title: "Check if something is on the page";
1093
+ readonly description: "Lets the app test whether a specific element exists.";
1094
+ };
704
1095
  declare const resolve$5: (context: LocatorContext, _options?: OperationTimeoutOptions) => boolean;
705
1096
 
706
1097
  declare namespace exists {
707
1098
  export {
1099
+ permission$3 as permission,
708
1100
  resolve$5 as resolve,
709
1101
  type$6 as type,
710
1102
  };
711
1103
  }
712
1104
 
713
- declare const type$5: 'getAttribute';
1105
+ declare const type$5: "getAttribute";
1106
+ declare const permission$2: {
1107
+ readonly scope: "read.info";
1108
+ readonly category: "read";
1109
+ readonly severity: 1;
1110
+ readonly title: "Read info from the page";
1111
+ readonly description: "Lets the app read the href value from a part of the page.";
1112
+ };
714
1113
  declare const resolve$4: (context: LocatorContext, name: string, _options?: OperationTimeoutOptions) => string | null;
715
1114
 
716
1115
  declare namespace getAttribute {
717
1116
  export {
1117
+ permission$2 as permission,
718
1118
  resolve$4 as resolve,
719
1119
  type$5 as type,
720
1120
  };
721
1121
  }
722
1122
 
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;
1123
+ declare const type$4: "videoElement";
1124
+ declare const permission$1: {
1125
+ readonly scope: "media.video";
1126
+ readonly category: "media";
1127
+ readonly severity: 0;
1128
+ readonly title: "Control video playback";
1129
+ readonly description: "Lets the app play, pause, seek, and read the video on the page.";
750
1130
  };
1131
+ declare const resolve$3: (context: LocatorContext, _options?: OperationTimeoutOptions) => RemoteVideoElement;
751
1132
 
752
- declare const type$4: 'videoElement';
753
- declare const resolve$3: (context: LocatorContext, _options?: OperationTimeoutOptions) => RemoteVideoElement$1;
754
-
755
- declare namespace videoElement {
1133
+ declare namespace videoElement$1 {
756
1134
  export {
1135
+ permission$1 as permission,
757
1136
  resolve$3 as resolve,
758
1137
  type$4 as type,
759
1138
  };
@@ -762,19 +1141,19 @@ declare namespace videoElement {
762
1141
  declare const locatorModule: {
763
1142
  readonly type: "locator";
764
1143
  readonly selectorModules: readonly [typeof locatorSel, {
765
- readonly type: 'frameLocator';
1144
+ readonly type: "frameLocator";
766
1145
  readonly resolve: (context: LocatorContext, selector: string) => HTMLIFrameElement[];
767
1146
  readonly resolvePeer: BarrierResolver;
768
1147
  readonly render: SelectorRenderer;
769
- readonly nextLocatorType: 'frameLocator';
1148
+ readonly nextLocatorType: "frameLocator";
770
1149
  }, 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];
1150
+ readonly operationModules: readonly [typeof click, typeof fill, typeof hover, typeof textContent, typeof isVisible, typeof count, typeof exists, typeof getAttribute, typeof videoElement$1];
772
1151
  };
773
1152
  type LocatorModule = typeof locatorModule;
774
1153
  interface Locator extends LocatorChain<LocatorModule, Locator> {
775
1154
  }
776
1155
 
777
- declare const type$3: 'frameLocator';
1156
+ declare const type$3: "frameLocator";
778
1157
  declare const resolve$2: (context: LocatorContext, selector: string) => HTMLIFrameElement[];
779
1158
  declare const resolvePeer$1: BarrierResolver;
780
1159
  declare const render$1: SelectorRenderer;
@@ -788,7 +1167,7 @@ declare namespace frameLocatorSel {
788
1167
  };
789
1168
  }
790
1169
 
791
- declare const type$2: 'owner';
1170
+ declare const type$2: "owner";
792
1171
  declare const resolve$1: (_: LocatorContext) => never;
793
1172
  declare const resolvePeer: BarrierResolver;
794
1173
  declare const render: SelectorRenderer;
@@ -804,27 +1183,61 @@ declare namespace owner {
804
1183
  };
805
1184
  }
806
1185
 
807
- declare const type$1: 'addStyleTag';
1186
+ declare const type$1: "addStyleTag";
808
1187
  type AddStyleTagOptions = OperationTimeoutOptions & {
809
1188
  content: string;
810
1189
  noSanitize?: boolean;
811
1190
  };
1191
+ declare const appearPermission: {
1192
+ readonly scope: "media.appear";
1193
+ readonly category: "media";
1194
+ readonly severity: 0;
1195
+ readonly title: "Change page appearance";
1196
+ readonly description: "Lets the app restyle parts of the page — safely filtered.";
1197
+ };
1198
+ declare const appearUnsafePermission: {
1199
+ readonly scope: "media.appearU";
1200
+ readonly category: "media";
1201
+ readonly severity: 2;
1202
+ readonly unsafe: true;
1203
+ readonly title: "Change page appearance (unsafe)";
1204
+ readonly description: "Lets the app restyle the page WITHOUT safety filtering — could be used to leak data over the network.";
1205
+ };
1206
+ declare const permission: (options?: AddStyleTagOptions | undefined) => {
1207
+ readonly scope: "media.appear";
1208
+ readonly category: "media";
1209
+ readonly severity: 0;
1210
+ readonly title: "Change page appearance";
1211
+ readonly description: "Lets the app restyle parts of the page — safely filtered.";
1212
+ } | {
1213
+ readonly scope: "media.appearU";
1214
+ readonly category: "media";
1215
+ readonly severity: 2;
1216
+ readonly unsafe: true;
1217
+ readonly title: "Change page appearance (unsafe)";
1218
+ readonly description: "Lets the app restyle the page WITHOUT safety filtering — could be used to leak data over the network.";
1219
+ };
1220
+ declare const setInjectedStylesDisabled: (disabled: boolean) => void;
812
1221
  declare const resolve: (_context: LocatorContext, options: AddStyleTagOptions) => Promise<void>;
813
1222
 
814
1223
  type addStyleTag_AddStyleTagOptions = AddStyleTagOptions;
1224
+ declare const addStyleTag_appearPermission: typeof appearPermission;
1225
+ declare const addStyleTag_appearUnsafePermission: typeof appearUnsafePermission;
1226
+ declare const addStyleTag_permission: typeof permission;
815
1227
  declare const addStyleTag_resolve: typeof resolve;
1228
+ declare const addStyleTag_setInjectedStylesDisabled: typeof setInjectedStylesDisabled;
816
1229
  declare namespace addStyleTag {
817
- export { addStyleTag_resolve as resolve, type$1 as type };
1230
+ 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
1231
  export type { addStyleTag_AddStyleTagOptions as AddStyleTagOptions };
819
1232
  }
820
1233
 
821
1234
  declare const frameLocatorModule: {
822
1235
  readonly type: "frameLocator";
823
1236
  readonly selectorModules: readonly [{
824
- readonly type: 'locator';
1237
+ readonly type: "locator";
825
1238
  readonly resolve: (context: LocatorContext, selector: string) => Element[];
826
1239
  readonly render: SelectorRenderer;
827
- readonly nextLocatorType: 'locator';
1240
+ readonly nextLocatorType: "locator";
828
1241
  }, typeof frameLocatorSel, typeof owner];
829
1242
  readonly operationModules: readonly [typeof addStyleTag];
830
1243
  };
@@ -834,11 +1247,23 @@ interface FrameLocator extends LocatorChain<FrameLocatorModule, FrameLocator> {
834
1247
 
835
1248
  type FrameId = `${number}-${number}`;
836
1249
 
1250
+ type PermissionCategory = 'read' | 'act' | 'media' | 'embed' | 'network';
1251
+ type PermissionSeverity = 0 | 1 | 2 | 3 | 4;
1252
+ type Permission = {
1253
+ scope: string;
1254
+ category: PermissionCategory;
1255
+ severity: PermissionSeverity;
1256
+ title: string;
1257
+ description: string;
1258
+ unsafe?: boolean;
1259
+ };
1260
+
837
1261
  type LocatorContext = {
838
1262
  elements: Element[];
839
1263
  };
840
1264
  type OperationTimeoutOptions = {
841
1265
  timeout?: number;
1266
+ reason?: string;
842
1267
  };
843
1268
  type BarrierContext = {
844
1269
  parts: SelectorPart[];
@@ -858,9 +1283,11 @@ type SelectorModule = {
858
1283
  resolvePeer?: BarrierResolver;
859
1284
  render?: SelectorRenderer;
860
1285
  };
1286
+ type OperationPermission = Permission | ((...args: any[]) => Permission);
861
1287
  type OperationModule = {
862
1288
  type: string;
863
1289
  resolve: (context: LocatorContext, ...args: any[]) => unknown;
1290
+ permission: OperationPermission;
864
1291
  };
865
1292
  type LocatorKindModule = {
866
1293
  readonly type: string;
@@ -888,6 +1315,20 @@ type LocatorChain<L extends LocatorKindModule, Self> = {
888
1315
  };
889
1316
 
890
1317
  declare const ATTACH_FRAME_EVENT_KEY = "FKN_WEB_EXTENSION_ATTACH_FRAME_EVENT_KEY";
1318
+ declare const attachFramePermission: {
1319
+ readonly scope: "embed.iframe";
1320
+ readonly category: "embed";
1321
+ readonly severity: 0;
1322
+ readonly title: "Load another website inside this app";
1323
+ readonly description: "Lets the app embed external pages directly inside its own view.";
1324
+ };
1325
+ declare const gotoPermission: {
1326
+ readonly scope: "embed.open";
1327
+ readonly category: "embed";
1328
+ readonly severity: 0;
1329
+ readonly title: "Open a website inside this app";
1330
+ readonly description: "Lets the app navigate to another site without leaving its window.";
1331
+ };
891
1332
  type GotoOptions = {
892
1333
  waitUntil?: 'documentstart' | 'load';
893
1334
  domains?: string[];
@@ -902,7 +1343,130 @@ type AttachFrameOptions = {
902
1343
  };
903
1344
  declare const attachFrame: ({ iframe, domains }: AttachFrameOptions) => Promise<Frame>;
904
1345
 
905
- declare const type: 'videoElement';
1346
+ declare const PERMISSIONS: readonly [{
1347
+ readonly scope: "read.text";
1348
+ readonly category: "read";
1349
+ readonly severity: 1;
1350
+ readonly title: "Read text from the page";
1351
+ readonly description: "Lets the app see the text shown on this page.";
1352
+ }, {
1353
+ readonly scope: "read.info";
1354
+ readonly category: "read";
1355
+ readonly severity: 1;
1356
+ readonly title: "Read info from the page";
1357
+ readonly description: "Lets the app read the href value from a part of the page.";
1358
+ }, {
1359
+ readonly scope: "read.visible";
1360
+ readonly category: "read";
1361
+ readonly severity: 0;
1362
+ readonly title: "See what’s visible on the page";
1363
+ readonly description: "Lets the app check which elements are currently on screen.";
1364
+ }, {
1365
+ readonly scope: "read.check";
1366
+ readonly category: "read";
1367
+ readonly severity: 0;
1368
+ readonly title: "Check if something is on the page";
1369
+ readonly description: "Lets the app test whether a specific element exists.";
1370
+ }, {
1371
+ readonly scope: "read.count";
1372
+ readonly category: "read";
1373
+ readonly severity: 0;
1374
+ readonly title: "Count items on the page";
1375
+ readonly description: "Lets the app count how many matching elements are present.";
1376
+ }, {
1377
+ readonly scope: "act.click";
1378
+ readonly category: "act";
1379
+ readonly severity: 3;
1380
+ readonly title: "Click on the page";
1381
+ readonly description: "Lets the app press buttons or links for you.";
1382
+ }, {
1383
+ readonly scope: "act.type";
1384
+ readonly category: "act";
1385
+ readonly severity: 1;
1386
+ readonly title: "Type into a text field";
1387
+ readonly description: "Lets the app fill in form fields on your behalf.";
1388
+ }, {
1389
+ readonly scope: "act.hover";
1390
+ readonly category: "act";
1391
+ readonly severity: 1;
1392
+ readonly title: "Hover over the page";
1393
+ readonly description: "Lets the app point at things to reveal menus or tooltips.";
1394
+ }, {
1395
+ readonly scope: "media.video";
1396
+ readonly category: "media";
1397
+ readonly severity: 0;
1398
+ readonly title: "Control video playback";
1399
+ readonly description: "Lets the app play, pause, seek, and read the video on the page.";
1400
+ }, {
1401
+ readonly scope: "media.appear";
1402
+ readonly category: "media";
1403
+ readonly severity: 0;
1404
+ readonly title: "Change page appearance";
1405
+ readonly description: "Lets the app restyle parts of the page — safely filtered.";
1406
+ }, {
1407
+ readonly scope: "media.appearU";
1408
+ readonly category: "media";
1409
+ readonly severity: 2;
1410
+ readonly unsafe: true;
1411
+ readonly title: "Change page appearance (unsafe)";
1412
+ readonly description: "Lets the app restyle the page WITHOUT safety filtering — could be used to leak data over the network.";
1413
+ }, {
1414
+ readonly scope: "embed.iframe";
1415
+ readonly category: "embed";
1416
+ readonly severity: 0;
1417
+ readonly title: "Load another website inside this app";
1418
+ readonly description: "Lets the app embed external pages directly inside its own view.";
1419
+ }, {
1420
+ readonly scope: "embed.open";
1421
+ readonly category: "embed";
1422
+ readonly severity: 0;
1423
+ readonly title: "Open a website inside this app";
1424
+ readonly description: "Lets the app navigate to another site without leaving its window.";
1425
+ }, {
1426
+ readonly scope: "network.fetch";
1427
+ readonly category: "network";
1428
+ readonly severity: 0;
1429
+ readonly title: "Fetch data from other sites";
1430
+ readonly description: "Lets the app download public data from other websites directly, past the usual cross-origin limits.";
1431
+ }, {
1432
+ readonly scope: "network.fetchCredentialed";
1433
+ readonly category: "network";
1434
+ readonly severity: 3;
1435
+ readonly unsafe: true;
1436
+ readonly title: "Fetch from other sites — signed in as you";
1437
+ readonly description: "Lets the app fetch other sites using your logged-in session cookies, so it can read data only you should see.";
1438
+ }, {
1439
+ readonly scope: "network.readCookie";
1440
+ readonly category: "network";
1441
+ readonly severity: 3;
1442
+ readonly unsafe: true;
1443
+ readonly title: "Read a site’s cookie";
1444
+ readonly description: "Lets the app read a named cookie from another site, which can include the login token only that site should see.";
1445
+ }, {
1446
+ readonly scope: "network.modifyRequestHeaders";
1447
+ readonly category: "network";
1448
+ readonly severity: 2;
1449
+ readonly unsafe: true;
1450
+ readonly title: "Rewrite request headers to other sites";
1451
+ readonly description: "Lets the app set or remove headers (like Origin and Referer) on this page’s own requests to the listed sites.";
1452
+ }];
1453
+ type PermissionScope = (typeof PERMISSIONS)[number]['scope'];
1454
+
1455
+ type PermissionRequest = {
1456
+ key: PermissionScope;
1457
+ scope?: string;
1458
+ reason?: string;
1459
+ };
1460
+ type PermissionGrant = {
1461
+ key: PermissionScope;
1462
+ scope: string;
1463
+ allow: boolean;
1464
+ };
1465
+ declare const permissions: {
1466
+ request: (requests: PermissionRequest[]) => Promise<PermissionGrant[]>;
1467
+ };
1468
+
1469
+ declare const type: "videoElement";
906
1470
  type TimeRangesTuple = [number, number][];
907
1471
  type VideoElementState = {
908
1472
  currentTime: number;
@@ -965,9 +1529,67 @@ type BoxedVideoElement = BoxBase<typeof type> & {
965
1529
  declare const createVideoElementHandle: (element: HTMLVideoElement) => RemoteVideoElement;
966
1530
  declare const isType: (value: unknown) => value is RemoteVideoElement;
967
1531
  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];
1532
+ declare const revive: <T extends BoxedVideoElement, T2 extends RevivableContext>(value: T, context: T2) => T[typeof UnderlyingType];
969
1533
 
970
- declare const handleRevivableModules: any;
1534
+ type videoElement_BoxedVideoElement = BoxedVideoElement;
1535
+ type videoElement_RemoteVideoElement = RemoteVideoElement;
1536
+ type videoElement_VideoElementState = VideoElementState;
1537
+ declare const videoElement_box: typeof box;
1538
+ declare const videoElement_createVideoElementHandle: typeof createVideoElementHandle;
1539
+ declare const videoElement_isType: typeof isType;
1540
+ declare const videoElement_revive: typeof revive;
1541
+ declare const videoElement_type: typeof type;
1542
+ declare namespace videoElement {
1543
+ export { videoElement_box as box, videoElement_createVideoElementHandle as createVideoElementHandle, videoElement_isType as isType, videoElement_revive as revive, videoElement_type as type };
1544
+ export type { videoElement_BoxedVideoElement as BoxedVideoElement, videoElement_RemoteVideoElement as RemoteVideoElement, videoElement_VideoElementState as VideoElementState };
1545
+ }
1546
+
1547
+ 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, {
1548
+ readonly type: "clonable";
1549
+ readonly capableOnly: true;
1550
+ readonly isType: (value: unknown) => value is osra_build_revivables_fallbacks.Clonable;
1551
+ readonly box: (value: osra_build_revivables_fallbacks.Clonable, _context: osra.RevivableContext<any>) => osra_build_revivables_fallbacks.Clonable;
1552
+ readonly revive: (value: osra_build_revivables_fallbacks.BoxedClonable, _context: osra.RevivableContext<any>) => osra_build_revivables_fallbacks.Clonable;
1553
+ }, {
1554
+ readonly type: "transferable";
1555
+ readonly capableOnly: true;
1556
+ readonly isType: (value: unknown) => value is osra_build_revivables_fallbacks.Transferable;
1557
+ readonly box: (value: osra_build_revivables_fallbacks.Transferable, _context: osra.RevivableContext<any>) => osra_build_revivables_fallbacks.Transferable;
1558
+ readonly revive: (value: osra_build_revivables_fallbacks.BoxedTransferable, _context: osra.RevivableContext<any>) => osra_build_revivables_fallbacks.Transferable;
1559
+ }, typeof osra_build_revivables_event_target, {
1560
+ readonly type: "unclonable";
1561
+ readonly isType: (value: unknown) => value is never;
1562
+ readonly box: (_value: never, _context: osra.RevivableContext<any>) => osra_build_revivables_fallbacks.BoxedUnclonable;
1563
+ readonly revive: (_value: osra_build_revivables_fallbacks.BoxedUnclonable, _context: osra.RevivableContext<any>) => Record<string, never>;
1564
+ }]) => 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, {
1565
+ readonly type: "clonable";
1566
+ readonly capableOnly: true;
1567
+ readonly isType: (value: unknown) => value is osra_build_revivables_fallbacks.Clonable;
1568
+ readonly box: (value: osra_build_revivables_fallbacks.Clonable, _context: osra.RevivableContext<any>) => osra_build_revivables_fallbacks.Clonable;
1569
+ readonly revive: (value: osra_build_revivables_fallbacks.BoxedClonable, _context: osra.RevivableContext<any>) => osra_build_revivables_fallbacks.Clonable;
1570
+ }, {
1571
+ readonly type: "transferable";
1572
+ readonly capableOnly: true;
1573
+ readonly isType: (value: unknown) => value is osra_build_revivables_fallbacks.Transferable;
1574
+ readonly box: (value: osra_build_revivables_fallbacks.Transferable, _context: osra.RevivableContext<any>) => osra_build_revivables_fallbacks.Transferable;
1575
+ readonly revive: (value: osra_build_revivables_fallbacks.BoxedTransferable, _context: osra.RevivableContext<any>) => osra_build_revivables_fallbacks.Transferable;
1576
+ }, typeof osra_build_revivables_event_target, {
1577
+ readonly type: "unclonable";
1578
+ readonly isType: (value: unknown) => value is never;
1579
+ readonly box: (_value: never, _context: osra.RevivableContext<any>) => osra_build_revivables_fallbacks.BoxedUnclonable;
1580
+ readonly revive: (_value: osra_build_revivables_fallbacks.BoxedUnclonable, _context: osra.RevivableContext<any>) => Record<string, never>;
1581
+ }];
1582
+
1583
+ type ExtensionEventMap = {
1584
+ statuschange: CustomEvent<{
1585
+ enabled: boolean;
1586
+ }>;
1587
+ };
1588
+ declare const extension: osra.TypedEventTarget<ExtensionEventMap>;
1589
+ declare const isExtensionExposed: () => boolean;
1590
+ type MissingExtensionHandler = () => Promise<void>;
1591
+ declare const setMissingExtensionHandler: (handler: MissingExtensionHandler | null) => void;
1592
+ declare const waitForExtensionExposure: (timeout?: number) => Promise<void>;
971
1593
 
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 };
1594
+ export { ATTACH_FRAME_EVENT_KEY, attachFrame, attachFramePermission, box, changeIframeStyle, clearTokens as clearPremiumTokens, cookies, countTokens as countPremiumTokens, createVideoElementHandle, dgram, extension, fetch, fetchCredentialedPermission, fetchPermission, gotoPermission, handleRevivableModules, http, isExtensionExposed, isType, modifyRequestHeadersPermission, net, permissions, promptInstall, readCookiePermission, refillPremiumTokens, relayWorker, removeRequestHeaderRule, resetIframeStyle, revive, serverProxyFetch, setMissingExtensionHandler, setRequestHeaderRule, storage, type, waitForExtensionExposure };
1595
+ export type { AttachFrameOptions, BoxedVideoElement, CookieDetails, FetchInit, Frame, GotoOptions, HeaderOperation, PermissionGrant, PermissionRequest, ProxyFetchRequest, RemoteVideoElement, RequestHeaderRule, SiteCookie, VideoElementState };