fix(#356): DSAR-Sammlung auf Contract-Zugriff umgestellt — 4 Core→Plugin-Imports (mail/tasks/calendar/kommunikation) nutzen jetzt get_contract(); MailContract exponiert MailAccount; ImportError-Fallback-Semantik unverändert; Checker 4→0 Verstöße; DSAR-Suite 4/4 passed
Check Cross-Plugin Imports / check (push) Has been cancelled

fixes #356
This commit is contained in:
Agent Zero
2026-08-27 17:38:06 +02:00
parent 385521eddc
commit 092c2d20fb
3 changed files with 44 additions and 21 deletions
+4 -3
View File
@@ -17,20 +17,21 @@ instead of importing from internal modules directly.
from __future__ import annotations
from app.plugins.builtins.contracts import get_contract_registry
from app.plugins.builtins.mail.models import Mail
from app.plugins.builtins.mail.models import Mail, MailAccount
class MailContract:
"""Public API surface for the mail plugin.
Exposes the ``Mail`` ORM model so that other plugins can query the
mails table without importing from ``mail.models`` directly.
Exposes ORM models so that other plugins can query the mail tables
without importing from ``mail.models`` directly.
"""
contract_name = "mail"
# ─── models ───
Mail = Mail
MailAccount = MailAccount
@classmethod
def get_function(cls, name: str):