/**
 * CDP proxy lifecycle manager (parent-side).
 *
 * Owns everything the CLI needs to start, locate, replace and kill the
 * standalone `cdp-proxy.ts` child process — including its on-disk
 * metadata files (PROXY_ENDPOINT_FILE / PROXY_PID_FILE /
 * PROXY_UPSTREAM_FILE). Also handles auto-resolving page-level CDP URLs
 * to browser-level endpoints via `/json/version`, since puppeteer-core
 * cannot connect to page-level URLs directly.
 *
 * Other modules (notably `agent-tools-cdp.ts`) use this through the
 * `getProxyEndpoint()` entry point and never touch the metadata files
 * themselves. The cross-command targetId is a separate concern owned by
 * `cdp-target-store.ts`.
 */
/**
 * True if the previously spawned proxy process is still running.
 */
export declare function isProxyAlive(): boolean;
/**
 * The local WebSocket URL the running proxy is serving, or null.
 */
export declare function readProxyEndpoint(): string | null;
/**
 * The Chrome endpoint the running proxy is connected to, or null.
 */
export declare function readProxyUpstream(): string | null;
/**
 * Stop the running proxy and discard the cross-command targetId.
 *
 * Sends SIGTERM and waits for the proxy's own SIGTERM handler to remove
 * its PROXY_*_FILE metadata via `cleanupIfOwned()`. When the PID file
 * disappears we know the next `spawnProxy()` can safely take over
 * without tripping the duplicate-proxy guard. Falls back to SIGKILL +
 * manual sweep if the proxy is unresponsive within `PROXY_TERM_GRACE_MS`.
 *
 * The targetId file is cleared regardless of the proxy's state because
 * it points into the outgoing Chrome's tab list.
 */
export declare function killProxy(): Promise<void>;
/**
 * Resolve the proxy endpoint to use for the given Chrome endpoint.
 *
 * - Page-level URLs are auto-resolved to browser-level via /json/version.
 * - If a proxy is already running and connected to the same upstream,
 *   reuse it.
 * - If a proxy is running but pointed at a different upstream, kill it
 *   and start a fresh one.
 * - If spawning the proxy fails, fall back to the raw Chrome endpoint
 *   (the caller will hit Chrome's permission popup directly but at
 *   least the command does not fail outright).
 */
export declare function getProxyEndpoint(chromeEndpoint: string): Promise<string>;
