You can call `osascript` from inside your app, or you can export an AppleScript script as an app. So yes, it works on unsigned apps. It has the same Gatekeeper caveats as any other unsigned app, but there’s nothing about notifications that’s especially locked.