0eb6d7621e
Check Cross-Plugin Imports / check (push) Has been cancelled
P18: require_permission zu forgejo_error_reporter und ai_ui_control routes hinzugefügt P19: Cross-Tenant Permission-Cache-Invalidierung bei Rollenänderungen P20: Session/Permission-Cache-Invalidierung bei Gruppen-Änderungen P21: ENTITY_MODELS Registry um fehlende Plugin-Modelle erweitert P22: Entity-Links prüfen verknüpfte Entity-Permissions P23: authStore persist Middleware entfernt (kein localStorage mehr) P24: 5xx Retry nur noch für GET-Requests P25: KI-Kommentar in address.py (bekannte Inkonsistenz) P26: DeletionLog in EntityHistory gemerged (action=delete) P27: KI-Kommentar in entity_policy.py (ABAC nicht aktiv genutzt) P28: db.commit() aus bulk_permission_service entfernt P29: CSV-Export in export_service.py ausgelagert P30: plugins.py Business-Logik in plugin_install_service.py ausgelagert P31: KI-Kommentar in session.py (Dual-System dokumentiert) P32: Migration 0115: crm_platform_admin Role droppen P33: Cross-Plugin Imports über contracts.py behoben (10 Violations → 0)
34 lines
882 B
Python
34 lines
882 B
Python
"""GraphRAG plugin contract — public interface for cross-plugin access."""
|
|
|
|
from __future__ import annotations
|
|
|
|
from app.plugins.builtins.contracts import get_contract_registry
|
|
from app.plugins.builtins.graph_rag.provider import GraphRAGSearchProvider
|
|
|
|
|
|
class GraphRagContract:
|
|
"""Public contract for the graph_rag plugin."""
|
|
|
|
contract_name = "graph_rag"
|
|
|
|
GraphRAGSearchProvider = GraphRAGSearchProvider
|
|
|
|
|
|
# ─── self-registration ───
|
|
|
|
_contract = GraphRagContract()
|
|
get_contract_registry().register("graph_rag", _contract)
|
|
|
|
# Backward-compatible local accessor
|
|
_contract_instance: GraphRagContract | None = None
|
|
|
|
|
|
def get_contract() -> GraphRagContract:
|
|
global _contract_instance
|
|
if _contract_instance is None:
|
|
_contract_instance = GraphRagContract()
|
|
return _contract_instance
|
|
|
|
|
|
__all__ = ["GraphRagContract", "GraphRAGSearchProvider"]
|