A Matrix homeserver chatroom with messages delivered as JSON would give you most of this (E2EE rooms, identity, offline delivery)
Or rsync?
:)
The idea behind Pantalk is to provide a local daemon and cli that agents can use to communicate with any messaging platform. The local protocol between the cli and the server is simple json which also makes it scriptable without the client.
The GitHub Repo: https://github.com/pantalk/pantalk
I love how these tools can compose into bigger systems without complicating things too much.
You wake up. It's the first day of summer holidays in 1995. What a crazy fever dream!
[1]: https://xmtp.org/