Add generic adapter capability model

This commit is contained in:
Lyncoln
2026-09-19 15:49:42 -04:00
parent 9d571ada24
commit e32260fc50
5 changed files with 275 additions and 10 deletions
+20
View File
@@ -1,8 +1,28 @@
from typing import Protocol
from .adapters import (
Capability,
DiscoveredObject,
Endpoint,
NormalizedObject,
PlanAction,
)
from .models import DesiredRecord, ProviderCapabilities, ProviderRecord
class AdapterPlugin(Protocol):
name: str
endpoint: Endpoint
capabilities: frozenset[Capability]
def connect(self) -> None: ...
def discover(self, object_type: str) -> list[DiscoveredObject]: ...
def apply(self, action: PlanAction) -> str | None: ...
def verify(self, object: NormalizedObject) -> bool: ...
# Compatibility protocols for the existing DNS-only execution path. They remain
# in place until the current plugins and CLI are migrated to AdapterPlugin.
class SourcePlugin(Protocol):
name: str