import type { Express } from 'express'; export interface CdpTargetInfo { id?: string; targetId?: string; type: string; url: string; attached: boolean; } export interface CdpLike { send(method: string, params?: unknown, sessionId?: string): Promise; } export declare function findSliccPageTarget(targets: CdpTargetInfo[], pageUrlPrefix: string): CdpTargetInfo | null; export type RestartResult = { ok: true; } | { ok: false; code: 'NO_LEADER_TAB' | 'CDP_NOT_READY' | 'CDP_ERROR' | 'INTERNAL'; message: string; }; export declare function restartLeader(cdp: CdpLike, pageUrlPrefix: string): Promise; /** * HTTP-backed CdpLike. Implements Target.getTargets via the CDP HTTP /json * endpoint. Target.attachToTarget + Page.reload are sent over WebSocket. */ export declare function createHttpCdp(cdpPort: number): CdpLike; export declare function registerLeaderRestartEndpoint(app: Express, options: { cdp: CdpLike; pageUrlPrefix: string; }): void;