browser-pilot 0.0.13 → 0.0.14

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.
@@ -0,0 +1,10 @@
1
+ import {
2
+ CDPError,
3
+ createCDPClient,
4
+ createCDPClientFromTransport
5
+ } from "./chunk-SPSZZH22.mjs";
6
+ export {
7
+ CDPError,
8
+ createCDPClient,
9
+ createCDPClientFromTransport
10
+ };
@@ -18,11 +18,6 @@ interface TransportOptions {
18
18
  */
19
19
  declare function createTransport(wsUrl: string, options?: TransportOptions): Promise<Transport>;
20
20
 
21
- /**
22
- * CDP Client implementation
23
- * Handles command/response correlation and event subscription
24
- */
25
-
26
21
  interface CDPClientOptions extends TransportOptions {
27
22
  /** Enable debug logging */
28
23
  debug?: boolean;
@@ -36,6 +31,8 @@ interface CDPClient {
36
31
  off(event: string, handler: (params: Record<string, unknown>) => void): void;
37
32
  /** Subscribe to all events (for debugging/logging) */
38
33
  onAny(handler: (method: string, params: Record<string, unknown>) => void): void;
34
+ /** Unsubscribe from all-event handler */
35
+ offAny(handler: (method: string, params: Record<string, unknown>) => void): void;
39
36
  /** Close the CDP connection */
40
37
  close(): Promise<void>;
41
38
  /** Attach to a target and return session ID */
@@ -45,9 +42,14 @@ interface CDPClient {
45
42
  /** Check if connection is open */
46
43
  readonly isConnected: boolean;
47
44
  }
45
+ /**
46
+ * Create a CDP client from an already-connected transport.
47
+ * Used by the daemon fast-path (Unix socket transport).
48
+ */
49
+ declare function createCDPClientFromTransport(transport: Transport, options?: CDPClientOptions): CDPClient;
48
50
  /**
49
51
  * Create a new CDP client connected to the given WebSocket URL
50
52
  */
51
53
  declare function createCDPClient(wsUrl: string, options?: CDPClientOptions): Promise<CDPClient>;
52
54
 
53
- export { type CDPClient as C, type Transport as T, type CDPClientOptions as a, createTransport as b, createCDPClient as c, type TransportOptions as d };
55
+ export { type CDPClient as C, type Transport as T, type CDPClientOptions as a, createCDPClientFromTransport as b, createCDPClient as c, createTransport as d, type TransportOptions as e };
@@ -18,11 +18,6 @@ interface TransportOptions {
18
18
  */
19
19
  declare function createTransport(wsUrl: string, options?: TransportOptions): Promise<Transport>;
20
20
 
21
- /**
22
- * CDP Client implementation
23
- * Handles command/response correlation and event subscription
24
- */
25
-
26
21
  interface CDPClientOptions extends TransportOptions {
27
22
  /** Enable debug logging */
28
23
  debug?: boolean;
@@ -36,6 +31,8 @@ interface CDPClient {
36
31
  off(event: string, handler: (params: Record<string, unknown>) => void): void;
37
32
  /** Subscribe to all events (for debugging/logging) */
38
33
  onAny(handler: (method: string, params: Record<string, unknown>) => void): void;
34
+ /** Unsubscribe from all-event handler */
35
+ offAny(handler: (method: string, params: Record<string, unknown>) => void): void;
39
36
  /** Close the CDP connection */
40
37
  close(): Promise<void>;
41
38
  /** Attach to a target and return session ID */
@@ -45,9 +42,14 @@ interface CDPClient {
45
42
  /** Check if connection is open */
46
43
  readonly isConnected: boolean;
47
44
  }
45
+ /**
46
+ * Create a CDP client from an already-connected transport.
47
+ * Used by the daemon fast-path (Unix socket transport).
48
+ */
49
+ declare function createCDPClientFromTransport(transport: Transport, options?: CDPClientOptions): CDPClient;
48
50
  /**
49
51
  * Create a new CDP client connected to the given WebSocket URL
50
52
  */
51
53
  declare function createCDPClient(wsUrl: string, options?: CDPClientOptions): Promise<CDPClient>;
52
54
 
53
- export { type CDPClient as C, type Transport as T, type CDPClientOptions as a, createTransport as b, createCDPClient as c, type TransportOptions as d };
55
+ export { type CDPClient as C, type Transport as T, type CDPClientOptions as a, createCDPClientFromTransport as b, createCDPClient as c, createTransport as d, type TransportOptions as e };