hermes-agent/gateway/platforms
Teknium be9198f1e1 fix: guard mautrix imports for gateway-safe fallback + fix test isolation
Follow-up fixes for the matrix-nio → mautrix migration:

1. Module-level mautrix.types import now wrapped in try/except with
   proper stub classes. Without this, importing gateway.platforms.matrix
   crashes the entire gateway when mautrix isn't installed — even for
   users who don't use Matrix. The stubs mirror mautrix's real attribute
   names so tests that exercise adapter methods (send, reactions, etc.)
   work without the real SDK.

2. Removed _ensure_mautrix_mock() from test_matrix_mention.py — it
   permanently installed MagicMock modules in sys.modules via setdefault(),
   polluting later tests in the suite. No longer needed since the module
   imports cleanly without mautrix.

3. Fixed thread persistence tests to use direct class reference in
   monkeypatch.setattr() instead of string-based paths, which broke
   when the module was reimported by other tests.

4. Moved the module-importability test to a subprocess to prevent it
   from polluting sys.modules (reimporting creates a second module object
   with different __dict__, breaking patch.object in subsequent tests).
2026-04-10 21:15:59 -07:00
..
__init__.py Enhance CLI with multi-platform messaging integration and configuration management 2026-02-02 19:01:51 -08:00
ADDING_A_PLATFORM.md docs: finish cron terminology cleanup 2026-03-14 19:20:58 -07:00
api_server.py fix(api): send tool progress as custom SSE event to prevent model corruption (#6972) 2026-04-10 18:55:26 -07:00
base.py fix(security): enforce API_SERVER_KEY for non-loopback binding 2026-04-10 16:51:44 -07:00
bluebubbles.py fix: improve bluebubbles webhook registration resilience 2026-04-10 03:21:45 -07:00
dingtalk.py fix(dingtalk,api): validate session webhook URL origin, cap webhook cache, reject header injection 2026-04-10 03:05:04 -07:00
discord.py feat: multi-agent Discord filtering — skip messages addressed to other bots 2026-04-11 07:46:44 +10:00
email.py fix(gateway): validate Slack image downloads before caching 2026-04-10 03:53:09 -07:00
feishu.py fix(feishu): register group chat member event handlers 2026-04-10 15:46:20 -07:00
homeassistant.py fix(gateway): add request timeouts to HA, Email, Mattermost, SMS adapters (#3258) 2026-03-26 14:36:07 -07:00
matrix.py fix: guard mautrix imports for gateway-safe fallback + fix test isolation 2026-04-10 21:15:59 -07:00
mattermost.py fix(security): consolidated security hardening — SSRF, timing attack, tar traversal, credential leakage (#5944) 2026-04-07 17:28:37 -07:00
signal.py fix: Signal duplicate replies with streaming + per-platform tool_progress (#6348) 2026-04-08 17:39:45 -07:00
slack.py fix: make safe_url_for_log public, add SSRF redirect guards to base.py cache helpers 2026-04-10 05:04:28 -07:00
sms.py fix: store asyncio task references to prevent GC mid-execution (#3267) 2026-03-26 14:36:24 -07:00
telegram.py fix(telegram): use valid reaction emojis for processing completion (#7175) 2026-04-10 05:34:33 -07:00
telegram_network.py fix(gateway): replace assertions with proper error handling in Telegram and Feishu 2026-04-10 03:52:00 -07:00
webhook.py fix: complete Weixin platform parity audit — 16 missing integration points 2026-04-10 05:54:37 -07:00
wecom.py fix(gateway): validate Slack image downloads before caching 2026-04-10 03:53:09 -07:00
weixin.py feat(gateway): add native Weixin/WeChat support via iLink Bot API 2026-04-10 05:54:37 -07:00
whatsapp.py refactor: codebase-wide lint cleanup — unused imports, dead code, and inefficient patterns (#5821) 2026-04-07 10:25:31 -07:00