Enter Pengines (Pengines). Pengines (AFAIU) provide on-demand, possibly remote, sandboxed prolog sessions (you get to choose what to expose), retaining backtracking & unification across process boundaries, and they deal with normal prolog terms.
Either Prolog API or WOQL AST would work as interface. This approach would, IMO, give the best client possible.
PS: With Prolog in the browser (ie. Tau Prolog, SWI Prolog WASM and Ciao Prolog WASM), Prolog/Terminus/Pengines could be very interesting combo.
Definitely this would be awesome and worth exploring. We haven’t really done it, not not because it isn’t a good idea, but because there are very few prolog users, so it seems like it would be a fair bit of work, unless one had a specific application in mind that could leverage it.
If you’re interested in forging ahead with it, we’re happy to give advice!
TLDR: “Would someone write it for me, pretty please, with a Prolog on the top ?”
I’m “probably” not the one to make it happen (without a lot of mentoring - I’m, let’s say, beginner+ in Prolog, with zero knowledge of Pengines internals).
I’m willing to help to test it, iron out bugs, extend it, but for whatever’s sake, don’t let me design it
But I’ve cross-posted (Prolog/Terminus/Pengines - Discussion - SWI-Prolog) to SWI-Prolog forums to try to get some attention, and perhaps someone will get interested.