bifroest/app/data_sources/connectors/__init__.py
2026-10-27 08:34:17 +01:00

23 lines
603 B
Python

"""Einheitliches Connector-Modell (→ Konzept 7.4).
UI und Orchestrator wissen nicht, ob eine Quelle über MCP oder nativ angebunden ist.
In Phase 1 ist nur der Verbindungstest umgesetzt; Discovery und Ausführung folgen
mit den Tools in Phase 2.
"""
from dataclasses import dataclass
from typing import Any, Protocol
@dataclass(frozen=True)
class TestResult:
__test__ = False # kein pytest-Testfall, trotz des Namens
ok: bool
message: str
class Connector(Protocol):
def test_connection(self) -> TestResult: ...
def discover_capabilities(self) -> list[dict[str, Any]]: ...