Skip to content

feat: add two-tier plugin system (bookmarks + local plugins)#10

Merged
dyoburon merged 2 commits intodyoburon:mainfrom
packetloss404:main
Mar 1, 2026
Merged

feat: add two-tier plugin system (bookmarks + local plugins)#10
dyoburon merged 2 commits intodyoburon:mainfrom
packetloss404:main

Conversation

@packetloss404
Copy link
Collaborator

Summary

  • Two-tier plugin system for extending Jarvis with custom web panels:
    • Tier 1 (Bookmarks): TOML config entries ([[plugins.bookmarks]]) that appear in the command palette and open any URL as a webview pane
    • Tier 2 (Local Plugins): HTML/JS/CSS folders in ~/.config/jarvis/plugins/ with a plugin.toml manifest, served via jarvis:// protocol with full IPC bridge access
  • Plugin discovery scans the filesystem at startup and on ReloadConfig, with hot-reload support via Arc<RwLock> shared plugin directory map
  • ContentProvider extended with plugin asset resolution and directory traversal protection (canonicalize + containment check)
  • PaletteItem gains a category field; plugin items are injected dynamically into the command palette
  • Comprehensive documentation at docs/plugins.md — quick starts, IPC reference, theming guide, two complete example plugins, vibe-coding instructions, and troubleshooting

Test plan

  • Add a [[plugins.bookmarks]] entry to config.toml → open palette → bookmark appears under its category → selecting it opens the URL in a pane
  • Create ~/.config/jarvis/plugins/test-plugin/ with plugin.toml + index.html → restart → palette shows the plugin → selecting it loads jarvis://localhost/plugins/test-plugin/index.html → IPC bridge works
  • ReloadConfig: add/remove bookmarks or plugin folders → trigger ReloadConfig → palette reflects changes
  • cargo test -p jarvis-config -p jarvis-renderer -p jarvis-webview — all 314 tests pass
  • Security: jarvis://localhost/plugins/test-plugin/../../etc/passwd returns 404

🤖 Generated with Claude Code

packetloss404 and others added 2 commits March 1, 2026 14:07
Introduce a plugin system with two tiers:
- Tier 1 (Bookmarks): TOML config entries that appear in the command
  palette and open as webview panes via Action::OpenURL
- Tier 2 (Local Plugins): HTML/JS/CSS folders in ~/.config/jarvis/plugins/
  with a plugin.toml manifest, served via jarvis:// protocol with full
  IPC bridge access

New config schema (PluginsConfig) with BookmarkPlugin and LocalPlugin
types. Plugin discovery scans the filesystem at startup and on
ReloadConfig. ContentProvider extended with plugin_dirs (Arc<RwLock>)
for hot-reloadable plugin asset resolution with directory traversal
protection. PaletteItem gains a category field, and plugin items are
injected into the command palette dynamically.

Includes comprehensive developer documentation (docs/plugins.md) with
quick starts, IPC reference, theming guide, example plugins, and
vibe-coding instructions.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@dyoburon dyoburon merged commit d616c8a into dyoburon:main Mar 1, 2026
4 of 6 checks passed
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.

2 participants