import { type PlistValue } from "./plist"; import { ByteStream } from "./stream"; import { type AnySocket } from "./socket"; export type WIPage = { pageId: number; title: string; url: string; type: string; }; export type WIApplication = { appId: string; bundleId?: string; name?: string; isProxy: boolean; isActive: boolean; hostAppId?: string; }; type WISocket = AnySocket; export type WIMessage = Record; type Subscriber = (m: WIMessage) => void; export declare class WebInspectorClient { private socket; private stream; private connectionId; private subscribers; private reading; constructor(socket: WISocket, stream: ByteStream); /** Subscribe to every message the inspector emits. Returns unsubscribe. */ subscribe(fn: Subscriber): () => void; /** Resolve with the first message whose `__selector` matches. */ private waitFor; send(selector: string, argument: Record): void; reportIdentifier(): Promise; listApplications(): Promise; getListing(appId: string): Promise; get connection(): string; /** Set up a forward socket to a specific page; raw frames flow as * WIRSocketDataKey blobs in either direction. */ forwardSocketSetup(appId: string, pageId: number, senderKey: string): void; forwardSocketData(appId: string, pageId: number, senderKey: string, data: Uint8Array): void; /** Tell the inspector this sender is going away so the page can be * inspected by a new sender. Without this, Safari treats the prior * sender as still attached and ignores subsequent forwardSocketSetup * for the same page. */ forwardDidClose(appId: string, pageId: number, senderKey: string): void; /** Backwards-compatible alias for `subscribe`. */ onMessage(handler: (m: WIMessage) => void): () => void; close(): void; } export {};