import type { ChildProcess, SpawnOptions } from "node:child_process"; /** Injection seam for `child_process.spawn`. Used by tests. */ export type SpawnFn = (command: string, args: readonly string[], options: SpawnOptions) => ChildProcess; /** Options for `openBrowser`. */ export interface OpenBrowserOptions { /** Override for `process.platform`. Used by tests. */ platform?: NodeJS.Platform; /** Override for `child_process.spawn`. Used by tests. */ spawnFn?: SpawnFn; /** * Override for `process.env.BROWSER`. The de-facto convention shared * with `xdg-open` and Python's `webbrowser`: when set, it names the * command to invoke instead of the platform default. Parsed shlex-style * (POSIX shell tokenization) so values like `firefox --new-window` or * `/path/with\ spaces/firefox` work as expected. An empty or missing * value falls back to the platform default. */ browserEnv?: string; } /** * Launches the system browser at `url` in a detached child process. * Honors `$BROWSER` when set, falling back to the platform default * (`open` / `xdg-open` / `cmd start`). Returns synchronously once the * child is spawned — completion of the browser load is intentionally * not awaited. * * @param url Absolute URL to open. * @param options Platform/spawn/env overrides; only exposed for tests. */ export declare function openBrowser(url: string, options?: OpenBrowserOptions): void;