generate main.js procedurally with plugins on the basis of this
Permissions:
if they want message.upsert even they need to ask for it and then we'll place them in there
ask the plugin entry point for each event they wanna subscribe to
this opens up the scope for creating a package manager for plugins and create mirrors for that (see how revanced manages plugins for refrence)
yk how npm generates a lock file? yeah, we'll need that with the id of the latest commit or something from the plugin repo but somehow individual for each plugin