diff --git a/app/plugins/base.py b/app/plugins/base.py index b19c509..8f3cf2a 100644 --- a/app/plugins/base.py +++ b/app/plugins/base.py @@ -97,6 +97,15 @@ class BasePlugin(ABC): """ return [] + async def register_event_handlers(self, event_bus: EventBus) -> None: + """Register event handlers for the background worker (ARCH-038 hook). + + The worker calls this on every active plugin at startup so plugins + can subscribe to events even when the web process is separate. + Default: no-op. Override to subscribe handlers. + """ + return None + # ─── Job Modules ─── def get_job_modules(self) -> list[str]: diff --git a/app/routes/entity_permissions.py b/app/routes/entity_permissions.py index 0b9aa9c..de77957 100644 --- a/app/routes/entity_permissions.py +++ b/app/routes/entity_permissions.py @@ -111,7 +111,7 @@ async def _check_entity_ownership( detail={"detail": f"Unknown entity type: {entity_type}", "code": "not_found"}, ) - model = model_info["model"] + model = model_info # ENTITY_MODELS maps directly to model classes try: eid = uuid.UUID(entity_id) except ValueError: