"""``mgf.logship`` — centralized log shipping for the Magogi federation.

The Layer-B half of the unified-logging program (mgf-common design
`docs/inprogress/UNIFIED_LOGGING_DESIGN.md`, decision D4): ship every running
app's canonical ``LogRecord`` JSON + statistics to a central collector that
**stores now** (analysis + presentation are a later program).

- :class:`LogShipper` — a fail-open, bounded ``logging.Handler`` that batches
  redacted canonical records and ``POST``s them over the wire protocol.
- :mod:`mgf.logship._protocol` — the versioned, language-neutral wire contract
  (``SHIP_PROTOCOL_VERSION`` + NDJSON framing).
- :func:`mgf.logship.collector.create_collector_app` — a store-now stub
  collector (FastAPI + sqlite), behind the ``[collector]`` extra.

The shipper itself is stdlib-only (urllib) so any consumer can ship without a
heavy HTTP dependency.
"""

from __future__ import annotations

from mgf.logship._protocol import (
    HEALTH_PATH,
    INGEST_PATH,
    SHIP_PROTOCOL_VERSION,
    STATS_PATH,
    decode_ndjson,
    encode_ndjson,
)
from mgf.logship._shipper import LogShipper

__all__ = [
    "HEALTH_PATH",
    "INGEST_PATH",
    "SHIP_PROTOCOL_VERSION",
    "STATS_PATH",
    "LogShipper",
    "__version__",
    "decode_ndjson",
    "encode_ndjson",
]

__version__ = "0.1.8"
