from __future__ import annotations from abc import ABC, abstractmethod from typing import Any class BaseChannel(ABC): """Abstrakte Basisklasse für alle Messaging-Kanäle.""" @abstractmethod async def send_message( self, recipient: str, text: str, reply_to_id: str | None = None, ) -> dict[str, Any]: """Nachricht senden. Returns: {"success": bool, "channel_message_id": str | None, "error": str | None} """ @abstractmethod async def check_connection(self) -> tuple[bool, str]: """Verbindung prüfen. Returns: (connected: bool, detail: str) """ @abstractmethod async def start(self) -> None: """Kanal starten (Webhook registrieren, Polling starten, …).""" @abstractmethod async def stop(self) -> None: """Kanal sauber beenden."""