fix: BUG-006/015 (cross-plugin imports — contract-based access), BUG-013 (data-testid already present), BUG-070 (npm audit fix)
Check Cross-Plugin Imports / check (push) Has been cancelled
Check Cross-Plugin Imports / check (push) Has been cancelled
This commit is contained in:
@@ -25,11 +25,14 @@ class WikiPlugin(BasePlugin):
|
||||
async def on_activate(self, db, service_container, event_bus) -> None:
|
||||
await super().on_activate(db, service_container, event_bus)
|
||||
try:
|
||||
from app.plugins.builtins.unified_search.provider_registry import get_search_registry
|
||||
from app.plugins.builtins.unified_search.providers.wiki_provider import WikiSearchProvider
|
||||
registry = get_search_registry()
|
||||
registry.register(WikiSearchProvider())
|
||||
logger.info("Registered WikiSearchProvider")
|
||||
from app.plugins.builtins.contracts import get_contract
|
||||
search_contract = get_contract("unified_search")
|
||||
if search_contract and hasattr(search_contract, "register_provider"):
|
||||
from app.plugins.builtins.unified_search.providers.wiki_provider import WikiSearchProvider
|
||||
search_contract.register_provider(WikiSearchProvider())
|
||||
logger.info("Registered WikiSearchProvider via contract")
|
||||
else:
|
||||
logger.warning("unified_search contract not available, skipping WikiSearchProvider registration")
|
||||
except Exception:
|
||||
logger.exception("Failed to register WikiSearchProvider")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user