quite happy with the mess I came up with!
I made a fork (git-ssb) of ssb-plugins2 which now exports a load(pluginPath)
method that can be used to create a ssb-plugin
ified out-of-process plugin and hacked it into the @cryptix/plugins2
branch on scuttlebot (gh/ssbc and git-ssb).
I chose to reuse the existing plugins code to get the name and collision
handling. Now, if you specifify a plugin as an object instead of a bool in your config,
it will use my ssb-plugins2/load to spawn it.
{
"plugins": {
"normal": true,
"ooplug": { "location": "/abs/path/to/plug" }
}
}
working:
- plugins spawn
- its manifest is part of sbots
bugs/todos:
- calls dont execute. i guess the name prefix has to be stripped for calls to register correctly
- load: passing sbot into the muxrpc/api results in a circular definition and stack explosion