Skip to content

Layer 5: Replace plugin registry with filesystem scanner (FEAT-009)#3970

Merged
Hmbown merged 2 commits into
Hmbown:mainfrom
aboimpinto:feat/FEAT-009-layer-5
Jul 3, 2026
Merged

Layer 5: Replace plugin registry with filesystem scanner (FEAT-009)#3970
Hmbown merged 2 commits into
Hmbown:mainfrom
aboimpinto:feat/FEAT-009-layer-5

Conversation

@aboimpinto

Copy link
Copy Markdown
Contributor

Summary

Replace the registry-based plugin architecture with a lightweight filesystem scanner approach. Plugins are discovered from a configured plugin directory (default: ~/.codewhale/tools) rather than managed through an in-memory registry with enable/disable state.

Changes

  • plugins/mod.rs: Rewrote /plugins command to use scanner-based discovery instead of the registry. The command now lists discovered plugin scripts and shows per-plugin metadata (name, description, input schema, approval level).
  • Deleted the registry-based plugin infrastructure: registry.rs, discovery.rs, manifest.rs, and associated tests under crates/tui/src/plugins/.
  • Added unit tests for: listing discovered tools, empty directory handling, detail metadata display, and not-found error cases.

Motivation

The scanner-based approach is simpler and more transparent — users drop plugin scripts in a directory and they're immediately available. No enable/disable state management, no registry persistence layer.

Testing

  • test_plugins_lists_discovered_tools — verifies listing multiple plugins with metadata
  • test_plugins_empty_directory — verifies graceful handling of empty plugin dir
  • test_plugins_detail_shows_metadata — verifies detail view including schema and approval
  • test_plugins_detail_not_found — verifies error for missing plugin

Refs

FEAT-009 — Layer 5

cargo fmt --all fixes:
- plugins/mod.rs import ordering
- memory/memory.rs, memory/note.rs fn signature wrapping
- project/init.rs, project/share.rs formatting
- skills/restore.rs, skills/review.rs, skills/skills.rs formatting
- utility/attachment.rs, utility/network.rs formatting
- plugin_e2e_acceptance.rs formatting
@aboimpinto aboimpinto requested a review from Hmbown as a code owner July 3, 2026 14:12
The scanner-based /plugins command (FEAT-009 Layer 5) replaces the
upstream registry architecture. The existing crates/tui/src/plugins/
module is retained for merge compatibility but is unused by our code.
@Hmbown Hmbown merged commit ea91e48 into Hmbown:main Jul 3, 2026
13 checks passed
@Hmbown

Hmbown commented Jul 3, 2026

Copy link
Copy Markdown
Owner

Merged into main for the 0.8.67 finalization train as #3970 (ea91e48bca93bb0201757810b1d228c2443aee99). Thanks @aboimpinto. I gave this one an extra local plugin-command pass on the scratch train before merging: cargo test -p codewhale-tui --bin codewhale-tui --locked plugins -- --nocapture passed with 15 plugin-related tests.

Hmbown added a commit that referenced this pull request Jul 3, 2026
Preserve the scanner-backed /plugin behavior from #3970 while keeping the canonical command name introduced by #3959. The plural /plugins spelling remains an alias, so typed compatibility still works without exposing the alias in discovery tiers.
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