"""Abstract storage for position-roundtable role configuration.""" from __future__ import annotations from abc import ABC, abstractmethod from typing import Any class PositionRoleStore(ABC): """Global configuration shared by every position-roundtable session.""" @abstractmethod async def list_roles(self) -> list[dict[str, Any]]: """Return roles in presentation order.""" raise NotImplementedError @abstractmethod async def replace_all( self, rows: list[dict[str, Any]], *, updated_by: str | None = None, ) -> list[dict[str, Any]]: """Atomically replace the editable role directory.""" raise NotImplementedError @abstractmethod async def ensure_seed(self, rows: list[dict[str, Any]]) -> list[dict[str, Any]]: """Insert only missing built-in roles, without overwriting edits.""" raise NotImplementedError