I've done something similar to this for scuttle-inject (which takes an sbot as a dep, and also checks that sbot has the right plugins):
e.g. https://github.com/blockades/scuttle-dark-crystal/blob/master/index.js#L4 :
const inject = require('scuttle-inject')
const methods = require('./methods')
const PLUGIN_DEPS = ['private', 'query', 'backlinks']
module.exports = function (server, opts) {
return inject(server, methods, PLUGIN_DEPS)
}
for checking plugins are installed I would do that here (basically that file is used to check if an sbot is running, and start shell if there isn't one)
https://github.com/ssbc/patchbay/blob/full-scutle-shell/background-process.js#L16 (this is a branch I made ages ago to test scuttle-shell)
Note I've got the plugins that were installed commented out, but these should be extracted into some commonly named file like shell-plugins.js
in our root which we read and check against.
Is this what you were asking @cryptix ?