"""Inbound media cache + outbound chunked streaming. Inbound: ``media.upload`` (chunked binary frames) -> ``cache_*_from_bytes`` -> a ``media_ref`` the adapter attaches to the ``MessageEvent``. Enforces size limit + sha256 + MIME re-sniff. Outbound: ``send_*`` -> stage the file in the media cache, mint a ``media_id``, emit ``media.offer {media_id, mime, size, filename, kind}``; serve bytes on ``media.pull`` as chunked binary frames. Delivery-path security via ``validate_media_delivery_path``. Reuses hermes ``cache_image/audio/video/document_from_bytes`` where possible. All paths under ``get_hermes_home()/"android"/media``. Milestone M4. """