Right, this seems obvious. Any idea why they opted not to go that way?
I guess the reason is that the original use-case was VS Code & TypeScript (?) and developing a lowest common denominator API for all clients would mean C, so they would have had to program to a C API even though both the client (VS Code?) and the server (Node?) are running JavaScript.
But then maybe the answer should be to provide better C invoke wrappers for high-level languages, not to use HTTP instead of C.