Implementing an extension system can be a daunting task, depending on how much you care about your users security
For the frontend it can be enough to just run eval on the text response you get. You said it's text not actual js, but that's wrong, it's actual js, running js is just a matter of passing text to the eval function, there's no magic involved with making a custom uri scheme for that beyond that then it'd be fed to eval via a script tag
You also have to consider whether your app is gonna run as a web app as well. If so then a service worker might be appropriate to add, because then you can use the remote URL's to the scripts even in the Tauri end, and use the service worker to intercept the requests and instead resolve them from a local source