Have you thought about NIP 46 Nostr Remote Signing? It uses NIP 44 for encrypting messages between client (programs) and signers (programs).
And, by my simplistic understanding, that is just NIP 4 with a different encryption algo, but otherwise equivalent ECDH and similar metadata profiles.