@@ -312,6 +312,121 @@ export interface MobileConfigServiceWithConnection {
312312 remoteXPC : RemoteXpcConnection ;
313313}
314314
315+ /**
316+ * Represents the WebInspectorService
317+ */
318+ export interface WebInspectorService extends BaseService {
319+ /**
320+ * Send a message to the WebInspector service
321+ * @param selector The RPC selector (e.g., '_rpc_reportIdentifier:')
322+ * @param args The arguments dictionary for the message
323+ * @returns Promise that resolves when the message is sent
324+ */
325+ sendMessage ( selector : string , args ?: PlistDictionary ) : Promise < void > ;
326+
327+ /**
328+ * Listen to messages from the WebInspector service using async generator
329+ * @yields PlistMessage - Messages received from the WebInspector service
330+ */
331+ listenMessage ( ) : AsyncGenerator < PlistMessage , void , unknown > ;
332+
333+ /**
334+ * Stop listening to messages
335+ */
336+ stopListening ( ) : void ;
337+
338+ /**
339+ * Close the connection and clean up resources
340+ */
341+ close ( ) : Promise < void > ;
342+
343+ /**
344+ * Get the connection ID being used for this service
345+ * @returns The connection identifier
346+ */
347+ getConnectionId ( ) : string ;
348+
349+ /**
350+ * Request application launch
351+ * @param bundleId The bundle identifier of the application to launch
352+ */
353+ requestApplicationLaunch ( bundleId : string ) : Promise < void > ;
354+
355+ /**
356+ * Get connected applications
357+ */
358+ getConnectedApplications ( ) : Promise < void > ;
359+
360+ /**
361+ * Forward get listing for an application
362+ * @param appId The application identifier
363+ */
364+ forwardGetListing ( appId : string ) : Promise < void > ;
365+
366+ /**
367+ * Forward automation session request
368+ * @param sessionId The session identifier
369+ * @param appId The application identifier
370+ * @param capabilities Optional session capabilities
371+ */
372+ forwardAutomationSessionRequest (
373+ sessionId : string ,
374+ appId : string ,
375+ capabilities ?: PlistDictionary ,
376+ ) : Promise < void > ;
377+
378+ /**
379+ * Forward socket setup for inspector connection
380+ * @param sessionId The session identifier
381+ * @param appId The application identifier
382+ * @param pageId The page identifier
383+ * @param automaticallyPause Whether to automatically pause (defaults to true)
384+ */
385+ forwardSocketSetup (
386+ sessionId : string ,
387+ appId : string ,
388+ pageId : number ,
389+ automaticallyPause ?: boolean ,
390+ ) : Promise < void > ;
391+
392+ /**
393+ * Forward socket data to a page
394+ * @param sessionId The session identifier
395+ * @param appId The application identifier
396+ * @param pageId The page identifier
397+ * @param data The data to send (will be JSON stringified)
398+ */
399+ forwardSocketData (
400+ sessionId : string ,
401+ appId : string ,
402+ pageId : number ,
403+ data : any ,
404+ ) : Promise < void > ;
405+
406+ /**
407+ * Forward indicate web view
408+ * @param appId The application identifier
409+ * @param pageId The page identifier
410+ * @param enable Whether to enable indication
411+ */
412+ forwardIndicateWebView (
413+ appId : string ,
414+ pageId : number ,
415+ enable : boolean ,
416+ ) : Promise < void > ;
417+ }
418+
419+ /**
420+ * Represents a WebInspectorService instance with its associated RemoteXPC connection
421+ * This allows callers to properly manage the connection lifecycle
422+ */
423+ export interface WebInspectorServiceWithConnection {
424+ /** The WebInspectorService instance */
425+ webInspectorService : WebInspectorService ;
426+ /** The RemoteXPC connection that can be used to close the connection */
427+ remoteXPC : RemoteXpcConnection ;
428+ }
429+
315430/**
316431 * Options for configuring syslog capture
317432 */
0 commit comments