/** * @fileoverview Helper for the `--open` flag on report-producing commands. * * After a run completes, generate the HTML report and launch it in * the default browser. Hard-skip conditions are strict: we NEVER open * a browser in environments where it would be wrong (CI, non-TTY, * --json output, SSH without a display). * * The underlying cross-platform launcher is the `open` npm package * (wraps macOS `open`, Linux `xdg-open`, Windows `start`). */ export interface OpenReportDecision { readonly shouldOpen: boolean; readonly reason: string; } export interface OpenReportContext { readonly openRequested: boolean; readonly jsonOutput: boolean; readonly stdoutIsTTY: boolean; readonly env: NodeJS.ProcessEnv; } /** * Decide whether to honor a --open request. Kept pure so tests can * exercise every branch without process manipulation. * * Skip conditions (all strict — no override): * - --json set (caller wants machine output) * - stdout is not a TTY (pipeline / log redirect) * - CI env var set (GitHub Actions, GitLab CI, CircleCI, etc.) * - SSH_CONNECTION set AND no DISPLAY/WAYLAND_DISPLAY (remote shell * without a graphical session — don't try) */ export declare function decideReportOpen(ctx: OpenReportContext): OpenReportDecision; /** * Append only a dashboard-owned fragment to a generated local report path. * Invalid caller text is ignored rather than becoming an arbitrary browser target. */ export declare function buildReportLaunchTarget(reportPath: string, fragment?: string): string; /** * Launch the given URL or file path in the default browser. Returns * true on success, false if `open` refused or threw. Never propagates * — a failure to open a browser should NOT fail the fitness run. */ export declare function launchReport(target: string): Promise; //# sourceMappingURL=open-report.d.ts.map