Problem or Use Case
LINE is the dominant messaging platform in Taiwan, Japan, and Thailand. There is currently no way to run Hermes as a LINE bot — users in these markets have no gateway option for their primary messaging app.
Proposed Solution
Add a gateway/platforms/line.py adapter (same pattern as telegram.py) that connects Hermes to the LINE Messaging API via webhook.
Implementation is complete in leepoweii/hermes-agent@feat/line-adapter:
- Webhook server — aiohttp endpoint at
/line/webhook with HMAC-SHA256 signature validation
- Allowlist —
LINE_ALLOWED_USERS / LINE_ALLOW_ALL_USERS env vars (user/group/room sources)
- Typing indicator —
showLoadingAnimation fired immediately on webhook receipt (200 returned before LLM dispatch)
- PENDING/READY/DELIVERED cache — postback Quick Reply button for slow LLM responses (>3s); necessary because LINE's reply token expires in 60 seconds
- Platform registry —
hermes-line toolset, Platform.LINE in config + run factory, setup wizard section
- 66 tests across 12 files covering signature validation, cache state machine (PENDING→READY→DELIVERED→ERROR + TTL prune), allowlist, reply client, HTTP endpoint, config parsing, and runner wiring
LINE_CHANNEL_ACCESS_TOKEN=...
LINE_CHANNEL_SECRET=...
LINE_ALLOWED_USERS=U<userId> # or LINE_ALLOW_ALL_USERS=true
Alternatives Considered
Skill: Not viable. LINE requires a persistent webhook listener for real-time events, HMAC-SHA256 signature validation on every incoming request, and a 60-second reply token state machine. These cannot be done "best effort" via terminal or web_extract — they need Python-level integration in the gateway harness.
Feature Type
Gateway / messaging improvement
Scope
Large (new module or significant refactor)
Contribution
Problem or Use Case
LINE is the dominant messaging platform in Taiwan, Japan, and Thailand. There is currently no way to run Hermes as a LINE bot — users in these markets have no gateway option for their primary messaging app.
Proposed Solution
Add a
gateway/platforms/line.pyadapter (same pattern astelegram.py) that connects Hermes to the LINE Messaging API via webhook.Implementation is complete in
leepoweii/hermes-agent@feat/line-adapter:/line/webhookwith HMAC-SHA256 signature validationLINE_ALLOWED_USERS/LINE_ALLOW_ALL_USERSenv vars (user/group/room sources)showLoadingAnimationfired immediately on webhook receipt (200 returned before LLM dispatch)hermes-linetoolset,Platform.LINEin config + run factory, setup wizard sectionAlternatives Considered
Skill: Not viable. LINE requires a persistent webhook listener for real-time events, HMAC-SHA256 signature validation on every incoming request, and a 60-second reply token state machine. These cannot be done "best effort" via
terminalorweb_extract— they need Python-level integration in the gateway harness.Feature Type
Gateway / messaging improvement
Scope
Large (new module or significant refactor)
Contribution