/** * Open the cockpit in the user's browser once the server is listening. * * Done by the SERVER rather than the supervisor, because the server is the only * one that knows the port it actually landed on — `START_PORT` is where the walk * begins, not where it ends, so a busy 3789 becomes 3790 and the supervisor * would hand the browser a dead URL. * * The supervisor respawns the server on every auto-update, so it sets * `SHADOK_OPEN=1` on the FIRST spawn only. Without that, the browser would pop * open several times a day on every instance — a good idea turned into a * nuisance. */ /** Pure: should this process open a browser at all? */ export declare function shouldOpenBrowser(ctx: { env: NodeJS.ProcessEnv; platform: NodeJS.Platform; inContainer: boolean; }): boolean; /** Pure: the command that opens a URL, or null on a platform we don't know. */ export declare function openCommand(platform: NodeJS.Platform, url: string): { cmd: string; args: string[]; } | null; /** * Best effort, always. A browser that refuses to open must never keep the * server from serving — which is the whole reason it is fire-and-forget and * every error is swallowed. */ export declare function openBrowser(url: string): void;