from __future__ import annotations

from dataclasses import dataclass


@dataclass(frozen=True, slots=True)
class StreamMessage:
    """One MQTT message entering the derived visualization pipeline."""

    sequence: int
    topic: str
    payload: bytes
    received_at_epoch_ns: int
    received_monotonic_ns: int | None = None
    source: str = "replay"
