from __future__ import annotations

from typing import Iterable, Protocol


class ReplayStore(Protocol):
    def append(
        self,
        request_id: str,
        *,
        event_id: int,
        data: str,
        prompt_tokens: int,
        completion_tokens: int,
        ts: int,
    ) -> None: ...

    def replay_from(self, request_id: str, *, after: int) -> Iterable[dict[str, object]]: ...
