Have you though of some more modern language agnostic solution like wasm plugins users could write in anything, with the help of typed languages if they like? Or is that not feasible for a scripting project like this?
That means the core of Hammerspoon goes from being incredibly complicated, to really just a protocol conformance.