RPC Bridge: How to call Lua backend methods from JavaScript
mainWhen using the Millennium loader, the Lua backend exposes several global functions that act as an RPC bridge to the LuaTools desktop application (running at http://127.0.0.1:6767).
To call these methods from the injected luatools.js page context, use the Millennium bridge API:
window.Millennium.callServerMethod("luatools", "<MethodName>", args)
Important: Millennium looks up these methods as GLOBAL Lua functions, not as members of the table returned by the plugin entrypoint. Any new RPC method added to the JavaScript side must have a corresponding global function defined in the Lua backend.