export interface DesktopNotifyOptions { title: string; message: string; /** URL or absolute file path to open when the notification is clicked (click-capable transports only). */ open?: string; } /** Resolved, non-empty payload handed to a transport. */ export interface ResolvedPayload { title: string; message: string; open?: string; } /** Minimal slice of node-notifier we depend on (also a test seam). */ export interface Notifier { notify(opts: Record, cb?: (err: Error | null) => void): void; } /** Low-level command runner (test seam). Never throws; returns the structured result. */ export type ExecFn = (file: string, args: string[], timeoutMs: number) => Promise; /** A delivery transport (test seam — bypasses platform selection entirely). */ export type Transport = (payload: ResolvedPayload, timeoutMs: number) => Promise; export interface DesktopNotifyDeps { /** Override env (tests). Defaults to process.env. */ env?: NodeJS.ProcessEnv; /** Override platform (tests). Defaults to process.platform. */ platform?: NodeJS.Platform; /** Max wait for delivery before giving up. Default 15s. */ timeoutMs?: number; /** Inject the full transport (tests) — bypasses platform selection. */ transport?: Transport; /** Inject the command runner (tests) for the macOS transports. */ exec?: ExecFn; /** Inject system-terminal-notifier availability (tests). Defaults to a PATH lookup. */ hasSystemTerminalNotifier?: boolean; /** Inject node-notifier (tests) for the non-macOS transport. */ notifier?: Notifier; } export type DesktopNotifyResult = { ok: true; skipped?: boolean; } | { ok: false; reason: string; }; /** * Build the argv for `osascript`. The message/title are passed as `argv` items * (via `on run argv`), never interpolated into the AppleScript source, so an * arbitrary run summary cannot inject AppleScript. */ export declare function buildOsascriptArgs(title: string, message: string): string[]; /** * Fire a desktop notification. Library entry point — never throws. * Skips silently (ok:true, skipped) when disabled or on a headless host. */ export declare function notifyDesktop(opts: DesktopNotifyOptions, deps?: DesktopNotifyDeps): Promise; /** True only when neither the PATH entry nor its real (symlink-resolved) target is under node_modules. */ export declare function isSystemNotifierPath(resolved: string, real: string): boolean;