"""Formatter protocol for valn8n output."""

from pathlib import Path
from typing import IO, Protocol, runtime_checkable

from valn8n_lib.types import Diagnostic


@runtime_checkable
class Formatter(Protocol):
    """Protocol for output formatters."""

    def render(
        self,
        results: dict[Path, list[Diagnostic]],
        *,
        quiet: bool = False,
        stream: IO[str] | None = None,
    ) -> None:
        """Render diagnostics to the output stream."""
        ...
