We intend to extend the Notifications API to allow developers to show notifications that let users type a reply within the notification itself, and deliver this reply back to the service worker in the notificationclick event. See the spec change pull request at https://github.com/whatwg/notifications/pull/132 and explainer here: https://github.com/anitawoodruff/inline-notification-replies Safari could implement this on Mac using the NSUserNotification API by setting the hasReplyButton property to 'true' - see https://developer.apple.com/documentation/foundation/nsusernotification#//apple_ref/occ/instp/NSUserNotification/hasReplyButton
_For iOS_, this depends on the ServiceWorkerRegistration's PushManager interface (https://bugs.webkit.org/show_bug.cgi?id=182566) to be implemented.