If you're not opposed to using JS in your prompt (it runs fast, promise!) check out impromptu [0]. I've been using it for a few months now and it's amazing.
You're probably not the maintainer, but Impromptu's README really should do a better job of explaining what it does and why I'd want to use it.
It sounds interesting, or at least I can imagine something interesting based on that description, but the only concrete information readily available seems to be that Impromptu requires Node.js and Redis. Those are fairly onerous requirements for a shell prompt, so some description of the actual features is probably warranted.
[0]: https://github.com/impromptu/impromptu