hermes-agent/gateway
teknium1 fa3b06b035 refactor(telegram): generalize observed-media caching into a reusable primitive
Collapse the per-type observed-media dispatch into one platform-agnostic
cache_media_bytes() helper in gateway/platforms/base.py. Any adapter can now
hand it raw attachment bytes + a filename/MIME hint; it classifies against the
shared MIME registries, routes to the right cache_*_from_bytes helper,
sandbox-translates the path, and returns a CachedMedia with a ready
context_note(). Telegram's observed-group path shrinks to: size-gate, download,
call the helper, annotate. Also dedupes the addressed-media type ladder into
_media_message_type().

Net: contributor's Telegram-only +595 LOC becomes a +210/-32 production change,
with the reusable primitive available to Discord/Slack/Signal/etc.

Co-authored-by: Glucksberg <markuscontasul@gmail.com>
2026-06-01 20:18:41 -07:00
..
assets
…
builtin_hooks
…
platforms refactor(telegram): generalize observed-media caching into a reusable primitive 2026-06-01 20:18:41 -07:00
__init__.py
…
channel_directory.py
…
config.py feat(bluebubbles): support group mention gating 2026-06-01 18:52:05 -07:00
delivery.py fix(gateway): drop outbound silence-narration messages pre-send 2026-05-29 19:06:05 -07:00
display_config.py fix(gateway): keep Telegram heartbeat + interim commentary on; edit heartbeat in place (#33187) 2026-05-27 05:21:53 -07:00
hooks.py
…
memory_monitor.py
…
mirror.py
…
pairing.py
…
platform_registry.py
…
restart.py
…
run.py fix(whatsapp): honor dm_policy and group_policy open at the gateway 2026-06-01 19:51:21 -07:00
runtime_footer.py chore: prune unused imports and duplicate import redefinitions 2026-05-28 22:26:25 -07:00
session.py feat(gateway): bring /undo [N] to messaging platforms (parity with CLI/TUI) (#36699) 2026-06-01 02:04:14 -07:00
session_context.py fix(cli): synchronize HERMES_SESSION_ID across environment and contextvar during session switches 2026-05-23 17:46:55 -07:00
shutdown_forensics.py
…
slash_access.py
…
status.py fix(gateway): only fire planned-stop watcher for self-targeting markers + fix Windows consume (#34749) 2026-05-29 17:36:58 +00:00
sticker_cache.py
…
stream_consumer.py fix(gateway): scope final-delivery flags to turn-final segment (#29346) 2026-06-01 17:31:32 -07:00
whatsapp_identity.py
…