Feature request: transitive plugin dependency resolution
Hi! First of all, thank you for ECA - I use it daily as my main coding assistant (via eca-emacs) and it's been a great experience. Really appreciate the work you all put into this project.
Context
At work, we have a "meta-plugin" - a plugin whose only purpose is to bundle a curated set of other plugins behind a single install. It declares a dependencies array in its manifest so that installing it automatically pulls in all the plugins it depends on.
This pattern works well in Claude Code (≥ 2.1.143), which resolves the dependencies field transitively: one install brings the entire plugin set along. I initially expected ECA would also handle these dependencies, but after investigating the source code I found that ECA has its own independent plugin cache (~/.cache/eca/plugins) and its own resolution logic - there is no shared state between the two clients.
The problem
After investigating, I found that ECA's plugin system has no concept of dependencies:
resolve-all!processes only the flat"install"array fromconfig.json- it never reads adependenciesfield from marketplace entries.- The marketplace entry schema (
.eca-plugin/marketplace.json) does not include adependenciesfield. - Installing a meta-plugin via
/plugin-installadds only the meta-plugin itself to the install list. None of its declared dependencies are resolved or installed.
As a workaround, each dependency must be installed individually, which defeats the purpose of the meta-plugin pattern.
How Claude Code handles this
Since the Claude Code source is not public, I pieced this together from the CHANGELOG and by inspecting ~/.claude/plugins/installed_plugins.json on disk:
autoflag - Each plugin entry ininstalled_plugins.jsoncan have"auto": true, which marks it as a dependency-installed plugin (as opposed to a direct user install).- Transitive resolution - On install, Claude Code reads the
dependenciesarray fromplugin.json(or the marketplace entry), recursively resolves each dependency across configured marketplaces, and installs them withauto: true. - Orphan pruning -
claude plugin pruneremoves auto-installed plugins that are no longer depended on by any directly-installed plugin.claude plugin uninstall --prunecascades. - Disable protection -
claude plugin disablerefuses when another enabled plugin depends on the target, and shows a disable-chain hint. - Conflict detection - Reports
range-conflictwhen a dependency version clashes with an already-installed plugin.
Possible approaches for ECA
I see a few ways this could work, each with different trade-offs:
A. Runtime-only expansion (minimal change)
In resolve-all!, after reading all marketplaces, expand the install list with transitive dependencies before loading plugins. Dependencies are resolved at startup but not persisted to config.json.
- Pro: Simple, no config format changes, clean uninstall (remove parent, deps stop loading).
- Con: Dependencies don't show up in
/pluginslist; no explicit tracking.
B. Persist with auto tracking (Claude Code model)
Track which plugins were auto-installed as dependencies vs. directly installed by the user. This could be a separate "auto-installed" key in the config, or an object format with an auto flag.
- Pro: Full lifecycle - install, uninstall with prune, orphan cleanup, list with distinction.
- Con: More complex; requires config format evolution and migration.
C. Expand at install time only
When a plugin is installed, read its dependencies and add them all to the flat "install" array.
- Pro: Simple persistence, all deps visible.
- Con: No way to distinguish direct vs. dependency installs; uninstall leaves orphans; shared deps are ambiguous.
Questions for maintainers
- Is this a feature you'd be interested in supporting?
- If so, do you have a preference on the approach? I'd lean toward A as an MVP (minimal, no config changes, immediate value) with B as a follow-up for full lifecycle support, but I'm happy to go with whatever fits the project's direction.
- Any concerns about the marketplace entry format adding an optional
dependenciesfield?
I'm happy to contribute a PR for this if there's interest. I've already explored the plugin system code in detail and have a working plan for the implementation.
Thanks for considering this!