community-plugins icon indicating copy to clipboard operation
community-plugins copied to clipboard

How should cross plugin dependencies be handled?

Open renato-osec opened this issue 9 months ago • 4 comments

Hi, I maintain bn-ebpf-solana and having recently integrated an MCP client into the plugin, it now relies on this MCP server plugin being installed.

Is there a builtin way to specify this constraint?

renato-osec avatar May 14 '25 20:05 renato-osec

Unfortunately no -- we're actively working on plugin dependencies now for some forthcoming plugin changes (cc: @ElykDeer), but no specific dates on that yet. For now, the recommended approach is a try/except with an alert to the user. You can even trigger the installation directly using the repositorymanager APIs if you want optionally (you may have noticed sidekick does this for pending version updates)

psifertex avatar May 14 '25 20:05 psifertex

Ty, I did read up on the repo manager API, we will use that for now. Do I keep this issue open in the meantime?

renato-osec avatar May 15 '25 03:05 renato-osec

Yes, I plan to close it once we have updated the process and have examples and documentation. Thanks for asking!

psifertex avatar May 23 '25 17:05 psifertex

In lieu of real docs, here's a quick example for anyone interested in this, here's an example of installing a plugin from the API directly (IE, could be done from another plugin)

repo_mgr = RepositoryManager()
community = repo_mgr['official']
for pl in community.plugins:
  if pl.name == "Snippets":
    break
if not pl.installed:
  # prompt user here via interaction APIs
  pl.install()

psifertex avatar Jun 13 '25 21:06 psifertex