hermes-agent/gateway/platforms
kshitijk4poor c37c6eaf29 refactor(gateway): migrate Home Assistant adapter to bundled plugin
Move gateway/platforms/homeassistant.py into plugins/platforms/homeassistant/
following the same shape as the Mattermost and Discord migrations.

  - Adapter file is renamed via git mv (history is preserved).
  - register() exposes the platform via the plugin system instead of the
    hardcoded Platform.HOMEASSISTANT elif in gateway/run.py::build_adapter().
  - _standalone_send() replaces the legacy _send_homeassistant() helper in
    tools/send_message_tool.py.  Out-of-process cron delivery
    (deliver=homeassistant from a cron process not co-located with the
    gateway) now flows through the registry's standalone_sender_fn path
    instead of the hardcoded elif.
  - _is_connected() probes HASS_TOKEN via hermes_cli.gateway.get_env_value
    so existing connected-platform checks behave identically.

The HASS_TOKEN / HASS_URL env-to-PlatformConfig seeding in
gateway/config.py stays in core — same pattern bluebubbles, mattermost,
and discord migrations followed.  No setup_fn or apply_yaml_config_fn is
registered because Home Assistant has no _setup_homeassistant wizard in
hermes_cli/setup.py and no homeassistant: YAML block in config.yaml today;
setup runs through the existing hermes_cli/tools_config.py toolset wizard.

Test imports were rewritten across tests/gateway/test_homeassistant.py,
tests/integration/test_ha_integration.py, and
tests/tools/test_send_message_missing_platforms.py; the legacy
(token, extra, chat_id, message)-shaped _send_homeassistant call site is
preserved via a small SimpleNamespace shim in
test_send_message_missing_platforms.py (same approach used when
mattermost moved).

  - Focused HA suites (64 tests across the three rewritten files) pass.
  - Broader gateway/cron sweep produces 10 failures identical to main
    baseline (telegram approval/model-picker xdist isolation flakes,
    wecom_callback defusedxml issue, cron script_timeout fixture issue).
    Zero net new failures.
2026-06-06 11:46:24 -07:00
..
qqbot fix(gateway): trust adapter-owned access policy over env default-deny (#34515) 2026-05-29 04:22:41 -07:00
ADDING_A_PLATFORM.md
…
__init__.py
…
_http_client_limits.py
…
api_server.py fix(api-server): guard json.loads against corrupted SQLite data in response cache 2026-06-04 06:15:29 -07:00
base.py fix(gateway): plain text while busy interrupts by default again (#40590) 2026-06-06 09:00:10 -07:00
bluebubbles.py refactor(bluebubbles): simplify mention-gating helpers 2026-06-01 18:52:05 -07:00
dingtalk.py
…
email.py
…
feishu.py feat(gateway): handle Feishu meeting invitations 2026-06-04 06:15:23 -07:00
feishu_comment.py
…
feishu_comment_rules.py
…
feishu_meeting_invite.py refactor(feishu): slim meeting-invite parser; add AUTHOR_MAP entry 2026-06-04 06:15:23 -07:00
helpers.py
…
matrix.py fix(deps): promote markdown to a core dependency so rich delivery works out of the box (#32486) (#38649) 2026-06-04 16:46:36 -07:00
msgraph_webhook.py
…
signal.py Add Hermes desktop app (#20059) 2026-05-31 17:46:56 -05:00
signal_rate_limit.py
…
slack.py Add Hermes desktop app (#20059) 2026-05-31 17:46:56 -05:00
sms.py
…
telegram.py fix(gateway): log silent file-delivery drops (#39767) 2026-06-05 04:50:04 -07:00
telegram_network.py
…
webhook.py feat(dashboard): complete admin panel — MCP catalog, enable/disable toggles, hook creation, system stats (#36736) 2026-06-02 00:16:11 -04:00
wecom.py fix(gateway): honor WECOM_ALLOWED_USERS in env-only WeCom DM allowlist 2026-06-01 19:20:36 -07:00
wecom_callback.py
…
wecom_crypto.py
…
weixin.py fix(weixin): replace aiohttp ClientTimeout with asyncio.wait_for in _api_post/_api_get 2026-06-01 17:31:40 -07:00
whatsapp.py fix(whatsapp): honor dm_policy and group_policy open at the gateway 2026-06-01 19:51:21 -07:00
yuanbao.py fix(gateway): trust adapter-owned access policy over env default-deny (#34515) 2026-05-29 04:22:41 -07:00
yuanbao_media.py
…
yuanbao_proto.py
…
yuanbao_sticker.py
…