import { LockdownClient } from "../lockdown"; import { WebInspectorClient } from "../webinspector"; import { type CdpServerBaseOptions } from "./http"; type Source = { kind: "device" | "simulator"; id: string; label: string; wi: WebInspectorClient; lockdown?: LockdownClient; }; type CdpTargetEntry = { targetId: string; source: Source; appId: string; appName: string; bundleId?: string; pageId: number; title: string; url: string; type: string; /** * True when WIR reports a debugger connection on this page from a sender * we don't own. Safari greys out such entries in its Develop menu — only * one inspector may attach to a WebKit page at a time. */ inUseByOtherInspector: boolean; }; export type CdpServerOptions = CdpServerBaseOptions; export type CdpServer = { stop(): void; /** Snapshot of current debuggable targets. */ getTargets(): CdpTargetEntry[]; /** * Flash an inspectable target on the device — the way Safari does when you * hover an entry under Develop → device menu. Pass `on=true` to overlay * the page, `on=false` to clear. Safe to call repeatedly. */ highlightTarget(targetId: string, on: boolean): Promise; /** * Drop the cached hover-highlight session for a target (or all of them * when `targetId` is omitted). Hosts should call this when their picker * closes so we don't keep a WIR connection alive that would block other * debuggers from attaching. */ releaseHighlight(targetId?: string): void; }; export declare function startCdpServer(opts?: CdpServerOptions): Promise; export {};