Skip to content

feat: on-demand plugin installation system#4559

Open
robertsLando wants to merge 1 commit intomasterfrom
feat/plugin-on-demand-install
Open

feat: on-demand plugin installation system#4559
robertsLando wants to merge 1 commit intomasterfrom
feat/plugin-on-demand-install

Conversation

@robertsLando
Copy link
Member

Summary

  • Add a PluginManager singleton that installs npm plugins on-demand into storeDir/.plugins/ when settings are saved, keeping plugins separate from the app's own node_modules
  • Add a PluginRegistry as a single source of truth for known plugins, shared between backend and frontend
  • Replace the hardcoded plugin dropdown in Settings with a registry-based list and add an "Update Plugins" button
  • Update Dockerfiles to install build-arg plugins into store/.plugins instead of app node_modules
  • Remove @kvaster/zwavejs-prom from bundled dependencies (now auto-installed on demand)
  • Add @ongit/zwavejsui-prom-exporter to the plugin registry

Test plan

  • Open Settings, verify plugin registry items appear in the Plugins dropdown with human-readable labels
  • Select @kvaster/zwavejs-prom, save settings — verify .plugins directory is created under store with package.json and node_modules
  • Verify plugin loads successfully (check server logs)
  • Click "Update Plugins" button, verify snackbar shows success message
  • Test absolute path plugin still works (backward compatibility)
  • Docker build with --build-arg plugins="@kvaster/zwavejs-prom" installs into store/.plugins

🤖 Generated with Claude Code

Move plugins out of the app's node_modules into a dedicated .plugins
directory under storeDir. npm plugins are auto-installed when settings
are saved and resolved from the .plugins directory at load time.

- Add PluginManager singleton for install/update/uninstall/resolve
- Add PluginRegistry as single source of truth for known plugins
- Add API endpoints for plugin update and uninstall
- Replace hardcoded plugin list in Settings UI with registry-based dropdown
- Add "Update Plugins" button in Settings
- Update Dockerfiles to install plugins into store/.plugins
- Remove @kvaster/zwavejs-prom from bundled dependencies
- Add @ongit/zwavejsui-prom-exporter to plugin registry

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@coveralls
Copy link

Pull Request Test Coverage Report for Build 22303969780

Details

  • 0 of 246 (0.0%) changed or added relevant lines in 5 files are covered.
  • 1 unchanged line in 1 file lost coverage.
  • Overall coverage decreased (-0.2%) to 19.038%

Changes Missing Coverage Covered Lines Changed/Added Lines %
src/stores/base.js 0 2 0.0%
src/apis/ConfigApis.js 0 9 0.0%
api/lib/PluginRegistry.ts 0 18 0.0%
api/app.ts 0 58 0.0%
api/lib/PluginManager.ts 0 159 0.0%
Files with Coverage Reduction New Missed Lines %
src/apis/ConfigApis.js 1 0.0%
Totals Coverage Status
Change from base Build 22300148887: -0.2%
Covered Lines: 4052
Relevant Lines: 22592

💛 - Coveralls

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants