"""Persistence port; SQL dialect and connection management belong to adapters.""" from typing import Protocol, ContextManager class Transaction(Protocol): def get(self, tenant: str, kind: str, key: str) -> dict | None: ... def listing(self, tenant: str, kind: str) -> list[dict]: ... def create(self, tenant: str, kind: str, key: str, body: dict) -> dict: ... def update(self, tenant: str, kind: str, key: str, body: dict, expected_revision: int) -> dict: ... def audit(self, tenant: str, user: str, action: str, target: str, digest: str): ... class SkillRepository(Protocol): def transaction(self, *, write: bool = False) -> ContextManager[Transaction]: ...