import { EventEmitter } from "node:events"; export interface UxpBridgeOptions { token: string; port?: number; path?: string; requestTimeoutMs?: number; handshakeTimeoutMs?: number; } export interface UxpCapability { supported: boolean; [key: string]: unknown; } export interface UxpRequestOptions { /** Do not let the bridge timeout before a bounded host-side wait can settle. */ minimumTimeoutMs?: number; } export interface UxpHello { backend: "uxp"; protocolVersion: number; commands: Record; [key: string]: unknown; } export type UxpConnectionState = { status: "stopped" | "listening"; connected: false; } | { status: "connected"; connected: true; protocolVersion: number; capabilities: UxpHello; connectedAt: string; }; export declare class UxpBridgeError extends Error { readonly code: string; constructor(code: string, message: string); } /** * Authenticated loopback WebSocket server used only by the local Premiere UXP * panel. It never binds a LAN/WAN interface and does not silently fall back to * CEP after a UXP command has been sent. */ export declare class UxpWebSocketBridge extends EventEmitter { private readonly options; private httpServer; private wsServer; private socket; private hello; private connectedAt; private handshakeTimer; private readonly pending; constructor(options: UxpBridgeOptions); start(): Promise; address(): { host: string; port: number; path: string; }; getState(): UxpConnectionState; request(command: string, args?: Record, requestOptions?: UxpRequestOptions): Promise; stop(): Promise; private acceptConnection; private handleMessage; private clearConnection; } //# sourceMappingURL=uxp-websocket-bridge.d.ts.map