hermes-agent/gateway
colin-chang ea49b38625 fix(gateway): tighten MEDIA extraction regex + silent skip on file-not-found
Three related fixes for the MEDIA:<path> extraction pipeline that
caused 'file not found' noise in platform channels:

1. run.py — tighten tool-result MEDIA regex from \S+ (any non-
   whitespace) to require a path pattern with known extensions.
   Prevents LLM-generated placeholder paths like
   'MEDIA:/path/to/example.mp4' from being captured as real media.

2. base.py — remove the |\S+ fallback in extract_media() that
   catches anything non-whitespace as a potential MEDIA path.
   This was the primary cause of false positives — strings like
   '' in tool output were captured as MEDIA: paths.

3. mattermost.py — replace the file-not-found error message sent
   to the channel with a silent logger.warning() skip. When a
   path extracted by MEDIA doesn't exist on disk, the channel
   no longer gets a noisy '(file not found: ...)' message.

Impact: eliminates the persistent 'file not found' spam in
Mattermost channels caused by over-broad MEDIA regex patterns
matching non-path text in tool output.
2026-05-18 20:07:43 -07:00
..
assets
…
builtin_hooks
…
platforms fix(gateway): tighten MEDIA extraction regex + silent skip on file-not-found 2026-05-18 20:07:43 -07:00
__init__.py docs(gateway): mention Weixin in gateway help and docstrings 2026-05-12 17:08:51 -07:00
channel_directory.py
…
config.py fix(gateway): bridge gateway_restart_notification from YAML platform sections 2026-05-18 20:04:08 -07:00
delivery.py
…
display_config.py
…
hooks.py
…
memory_monitor.py Port from cline/cline#10343: periodic gateway memory logging (#27102) 2026-05-16 12:55:23 -07:00
mirror.py
…
pairing.py
…
platform_registry.py refactor(plugins): add apply_yaml_config_fn registry hook 2026-05-13 22:20:30 -07:00
restart.py
…
run.py fix(gateway): tighten MEDIA extraction regex + silent skip on file-not-found 2026-05-18 20:07:43 -07:00
runtime_footer.py
…
session.py fix(session): persist auto-reset state across gateway restarts 2026-05-15 01:25:42 -07:00
session_context.py
…
shutdown_forensics.py
…
slash_access.py
…
status.py fix: gateway PID detection fails on Windows (two issues) 2026-05-13 23:10:57 -07:00
sticker_cache.py
…
stream_consumer.py fix(gateway): prevent duplicate final send when only cosmetic edit failed 2026-05-14 14:51:07 -07:00
whatsapp_identity.py
…