Bug 6: install() and activate() now compare the plugin's manifest
version with the stored DB version. If they differ, migrations are
re-run to bring the schema up to date and the DB version field is
updated. This ensures that updating a plugin with a new manifest
version triggers the migration runner automatically.
Bug 4: Plugin config field existed but had no API endpoints. Added
GET /api/v1/plugins/{name}/config to retrieve config as JSON and
PATCH /api/v1/plugins/{name}/config to update it. Uses PluginConfigUpdate
Pydantic model for request validation.
Bug 3: install_plugin() and activate_plugin() now catch dependency-related
ValueErrors and raise HTTPException 400 with the error detail.
Bug 4: Added get_plugin_config() and update_plugin_config() methods to
the service layer for the plugin config API endpoints.
Bug 3: install() and activate() now verify that declared dependencies
are installed/active before proceeding. Raises ValueError which the
service layer converts to HTTPException 400.
Bug 5: activate() now performs a soft permission check — logs warnings
for declared permissions not found in any discovered plugin.
Bug 2: deactivate() removed routes by path-matching, which caused
routes from other plugins sharing the same prefix (e.g. /api/v1/dms)
to be removed when deactivating one plugin. Now tracks actual route
objects by identity in _mounted_routes and removes only those specific
objects during deactivation.
The PluginModel.display_name column is NOT NULL but was not set when
auto-installing builtin plugins during app startup, causing IntegrityError.
Fix mirrors the pattern used in registry.install().
- Plugin routes now registered in create_app (sync context) before SPA catch-all
- Previously plugin routes were added in lifespan (async) AFTER SPA catch-all
- FastAPI matches routes in registration order — catch-all was shadowing plugin routes
- Fixes: Calendar/Mail/DMS/Tags/Permissions returning 404 despite being in OpenAPI
- Lifespan creates PluginModel records for discovered plugins if missing
- Runs plugin migrations automatically
- Activates plugins and registers routes in FastAPI
- Fixes: Calendar/Mail/DMS/Tags/Permissions 404 after restart