T03: plugin system framework + lifecycle + migrations + event bus + DI

- Plugin registry with discover/install/activate/deactivate/uninstall lifecycle
- PluginManifest Pydantic v2 schema (name, version, dependencies, routes, events, migrations)
- BasePlugin abstract class with lifecycle hooks (on_install/activate/deactivate/uninstall)
- Migration runner with tenant_id validator (rejects tables without tenant_id)
- Event bus integration: register/unregister listeners on activate/deactivate
- Service container DI: plugins receive db, cache, event_bus, storage, notifications
- Idempotent operations (activate active=200, deactivate inactive=200)
- UI registry for frontend component registration
- 47 new tests (14 ACs + 33 unit tests), 103 total tests pass
- Migration 0003: plugins + plugin_migrations tables
- Coverage: 85.92% for plugin modules
This commit is contained in:
leocrm-bot
2026-06-29 01:18:46 +02:00
parent dd16940bb2
commit 9678344f0e
21 changed files with 2414 additions and 3 deletions
+5
View File
@@ -0,0 +1,5 @@
"""Built-in plugins directory.
Each module in this package that exports a BasePlugin subclass will be
discovered automatically by the plugin registry on application startup.
"""