ADR-007: Plugin Architecture Implementation Status¶
- Status: Accepted
- Date: 2026-07-14 (revised 2026-07-18: encoder labels + UMLS MRCONSO + namespace wiring + BiomedCLIP open_clip + PluginAudit multi-sink)
- Context: Record deploy/runtime choices that complement the live plugin architecture docs.
Decision¶
- Docker packages
plugins/in API/worker/MCP images and mounts./pluginsin compose override so domain plugins are importable without image rebuild in dev. - Deployment profiles via
EAGLE_RAG_PROFILE=core|biomed|lakehouse-bimergesettings.yamlprofiles:(P2-4). - Medical encoders never fall back to Qwen3-VL. Modes:
deterministic(CI),require_native(prod fail-fast),auto(native with optionalEAGLE_BIOMED_ALLOW_DETERMINISTIC=1). - Biomed encoder labels use public HF checkpoints as real defaults:
pubmedbert→ microsoft/BiomedNLP-PubMedBERT-...,molformer→ seyonec/ChemBERTa-zinc-base-v1,medimageinsight→ microsoft/BiomedCLIP-PubMedBERT_256-... (open_clip),uni2→ MahmoodLab/UNI2-h. Override viaEAGLE_BIOMED_*_MODEL. Radiology (BiomedCLIP) prefersopen_clip(hf-hub:+create_model_from_pretrained/get_tokenizer) so image and text towers share one space for text→image ANN oneagle_medical_radiology; HFtransformersremains fallback. Pathology (uni2) stays ontransformers. Optional extra:uv sync --extra biomedinstallsopen-clip-torch. Coreeagle_visual/ Qwen is unchanged. Text+chemical encoders run without the extra. - Biomed UMLS ships as an expandable curated subset (~70 entities in
plugins/biomed/routing_rules.yaml+umls.py); pointEAGLE_BIOMED_UMLS_MRCONSO_PATHat a real UMLS MRCONSO RRF file (NLM license required) to merge additional English aliases/CUIs. Compound MCP uses thechemicalencoder ANN oneagle_chemical. - Lakehouse-bi is under development and remains retrieval-only;
FileExportLakehouseConnectoris the reference user-extension for metadata export -> ingest. Not production-ready. plugin_namespacewiring closed end-to-end: Celery ingest tasks (knowhere_parse/pixelrag_build/knowhere_visual_chunks), core retrievers (KnowhereGraphRetriever/PixelRAGVisualRetriever), the visual store read path (search_visual/count/delete/fetch/distinct_years), theRetrieverOrchestratorcore text/visual dispatch, and MCP retrieval tool call sites all threadplugin_namespaceso a non-core instance binds to its own Milvus Database (G17).- PluginAudit is multi-sink decision telemetry (
eagle_rag/plugins/audit.py): every classification/routing/hook decision fans out to (1) AI JSONL viaget_ai_logger(event=plugin_audit_decision, durable), (2) Redis LIST recent window (LPUSH+LTRIM, cross-process), (3) in-memory ring fallback, (4) Prometheus counters (plugin_audit_decisions_total,plugin_audit_rrf_dedupe_total).GET /health/pluginsexposesrecent_decisions+audit_stats. Sinks are best-effort and never fail the hot path. Categories:scope_routingtag-resolution failures →scope_routing_error; HookBusinvoke_alldegradations →hook_failure.
Consequences¶
- Default compose profile remains
core(safe for existing deployments). plugins/biomedis experimental; enabling it requiresEAGLE_RAG_PROFILE=biomedand restart; first native encoder load may pull HF weights. APIs/collections may change.plugins/lakehouse_biis under development — reference skeleton only; do not treat as production-stable.- Architecture docs describe the implemented microkernel (not a planning blueprint).
Follow-up¶
See ADR-008 for hot-path hook wiring, plugins.options, RAG-only MCP naming, and frontend = Core only.