You are reading content from Scuttlebutt
@SoapDog %8ycfKNkCm4F38kc0y5gRoeKUchCQf6eQF1fRiOAP1ow=.sha256

Custom plugins support for Scuttle-Shell

I've added support for custom plugins but I haven't added any form of checking for conflicts or safety.

It is on the https://github.com/ssbc/scuttle-shell/tree/enhancement-custom-plugins

It supports custom plugins from two different sources, one is adding a plugins array to scuttleshell.json another is passing a custom configuration object to the scuttleshell.start() call like:

scuttleshell.start({ 
  plugins: ["./examples/service-discovery"] 
})

There is a new sample at examples/launch_sbot_custom_plugin.js
cc @mix @cryptix

@SoapDog %UksL1WyeiDiqpQl/Hz/ItlhuzjCI3DPHLIzdxvzIZAg=.sha256

cc @Matt McKegg @cel @happy0

@cel %NRVtb5aRfFxytbFtEQYo7gqdfkhNu3MsUue8vavCa4A=.sha256

@SoapDog great, I was missing custom plugin support. Why not use the existing scuttlebot/plugins/plugins.js custom plugin thing though?

@mix %ReMzjdLWZDdCuvlQf0hYcztrpspJCYe53VilxihLiSo=.sha256

does scuttlebot/plugins/plugins.js not handle the ~/.ssb/node_modules installed plugins which are all used for the global sbot? I tihnk we might not want to conflate scuttle-shell instances with global sbot installs?

@SoapDog %9xP4qkNJxHrQzOG8pMxx1oIu4XIXChSNoPktj2XXqCI=.sha256

@cel I don't know how that plugin work but the use case here is that you could ship apps with custom plugins that are useful to that app alone by bundling them with the app and instantiating them when needed. So you could load plugins outside .ssb/node_modules/. I don't know if this use case is compatible with the plugin you mention.

@cryptix %VeKsfkGlWkHQXo+G8q1ZqUNRBTUduao2pSQ/ng/281Q=.sha256

I tihnk we might not want to conflate scuttle-shell instances with global sbot installs?

I'm not sure what you mean by instances. So far I only ever had one instance of sbot server running , either started standalone (typing sbot server into cli) or started by large apps like patch(bay|work), tale, tictac. They all use the global sbot using the same $HOME/.ssb in my understanding.

@cryptix %ZoyjpMsiK/1haoJq7IllHxtj081sbXXsTfHWBccekkE=.sha256

Be aware that so far there is no conflict checking or anything like that.

I think this is fine, @SoapDog. We agreed to have the core plugins hardcoded for all clients in milestone v0. IMHO It's just a question whether we want Adoptees to get warnings or errors if they double-require() stuff. Personally I'd prefer an error. It will be much simpler to reason about and not give false impressions about supporting multiple versions of plugins.

Join Scuttlebutt now