/** * Cross-platform desktop notification dispatch. * * - macOS: terminal-notifier with click-to-focus * - Linux: notify-send with compositor-specific click-to-focus */ interface NotifyOptions { title: string; body: string; /** cwd for macOS click-to-focus (defaults to process.cwd()) */ cwd?: string; /** Skip notification if terminal is focused (default: true) */ skipIfFocused?: boolean; /** Always notify even when terminal is focused (default: false). Overrides skipIfFocused. */ skipIfForeground?: boolean; } declare function sendNotification(opts: NotifyOptions): Promise; /** * Terminal focus tracking via DECSET 1004. * * Enables focus reporting so the terminal sends \x1b[I (focus in) and * \x1b[O (focus out). These are intercepted on process.stdin before * the host application's input handler sees them. * * Works with any terminal supporting DECSET 1004: * Zed, kitty, wezterm, foot, alacritty, iTerm2, etc. * Also works through abduco/tmux (they relay escape sequences). */ /** * Start tracking terminal focus. Idempotent — safe to call multiple times. */ declare function startFocusTracking(): void; /** * Stop tracking and disable focus reporting. */ declare function stopFocusTracking(): void; /** * Returns true if the terminal is currently focused. * Defaults to true before tracking starts. */ declare function isTerminalFocused(): boolean; /** * Compositor window capture and click-to-focus. * * Captures the currently focused window ID at initialization time, then * provides focusWindow() to bring it back to front on notification click. * * Supports: macOS, niri, sway, hyprland. */ /** * Capture the currently focused window's ID from the compositor. * Call when the terminal is guaranteed to be focused (e.g. session start). * Idempotent — subsequent calls update the captured window. */ declare function captureWindowId(): Promise; /** Focus the previously captured window. */ declare function focusWindow(): void; export { type NotifyOptions, captureWindowId, focusWindow, isTerminalFocused, sendNotification, startFocusTracking, stopFocusTracking };