hermes-agent/hermes_cli
teknium1 24f549a692 feat: add Signal messenger gateway platform (#405)
Complete Signal adapter using signal-cli daemon HTTP API.
Based on PR #268 by ibhagwan, rebuilt on current main with bug fixes.

Architecture:
- SSE streaming for inbound messages with exponential backoff (2s→60s)
- JSON-RPC 2.0 for outbound (send, typing, attachments, contacts)
- Health monitor detects stale SSE connections (120s threshold)
- Phone number redaction in all logs and global redact.py

Features:
- DM and group message support with separate access policies
- DM policies: pairing (default), allowlist, open
- Group policies: disabled (default), allowlist, open
- Attachment download with magic-byte type detection
- Typing indicators (8s refresh interval)
- 100MB attachment size limit, 8000 char message limit
- E.164 phone + UUID allowlist support

Integration:
- Platform.SIGNAL enum in gateway/config.py
- Signal in _is_user_authorized() allowlist maps (gateway/run.py)
- Adapter factory in _create_adapter() (gateway/run.py)
- user_id_alt/chat_id_alt fields in SessionSource for UUIDs
- send_message tool support via httpx JSON-RPC (not aiohttp)
- Interactive setup wizard in 'hermes gateway setup'
- Connectivity testing during setup (pings /api/v1/check)
- signal-cli detection and install guidance

Bug fixes from PR #268:
- Timestamp reads from envelope_data (not outer wrapper)
- Uses httpx consistently (not aiohttp in send_message tool)
- SIGNAL_DEBUG scoped to signal logger (not root)
- extract_images regex NOT modified (preserves group numbering)
- pairing.py NOT modified (no cross-platform side effects)
- No dual authorization (adapter defers to run.py for user auth)
- Wildcard uses set membership ('*' in set, not list equality)
- .zip default for PK magic bytes (not .docx)

No new Python dependencies — uses httpx (already core).
External requirement: signal-cli daemon (user-installed).

Tests: 30 new tests covering config, init, helpers, session source,
phone redaction, authorization, and send_message integration.

Co-authored-by: ibhagwan <ibhagwan@users.noreply.github.com>
2026-03-08 20:20:35 -07:00
..
__init__.py Hermes Agent UX Improvements 2026-02-22 02:16:11 -08:00
auth.py fix: add Kimi Code API support (api.kimi.com/coding/v1) 2026-03-07 21:00:12 -05:00
banner.py feat: show update-available notice in CLI banner 2026-03-07 07:35:36 -08:00
callbacks.py refactor: reorganize agent and CLI structure for improved clarity 2026-02-21 23:17:18 -08:00
clipboard.py fix: clipboard BMP conversion file loss and broken test 2026-03-08 17:22:27 -07:00
codex_models.py fix: trust user-selected models with OpenAI Codex provider 2026-03-08 18:29:09 -07:00
colors.py Cleanup time! 2026-02-20 23:23:32 -08:00
commands.py feat: session naming with unique titles, auto-lineage, rich listing, resume by name 2026-03-08 15:20:29 -07:00
config.py Merge pull request #732 from NousResearch/hermes/hermes-2cb83eed 2026-03-08 20:10:32 -07:00
cron.py refactor: streamline cron job handling and update CLI commands 2026-02-21 16:21:19 -08:00
doctor.py fix: add Kimi Code API support (api.kimi.com/coding/v1) 2026-03-07 21:00:12 -05:00
gateway.py feat: add Signal messenger gateway platform (#405) 2026-03-08 20:20:35 -07:00
main.py feat: interactive session browser with search filtering (#718) 2026-03-08 17:42:50 -07:00
models.py feat: /provider command + fix gateway bugs + harden parse_model_input 2026-03-08 06:09:36 -07:00
pairing.py Cleanup time! 2026-02-20 23:23:32 -08:00
runtime_provider.py feat: add z.ai/GLM, Kimi/Moonshot, MiniMax as first-class providers 2026-03-06 18:55:18 -08:00
setup.py fix(setup): correct import of get_codex_model_ids in setup wizard 2026-03-08 13:07:19 -07:00
skills_hub.py fix: Initialize Skills Hub on list 2026-03-09 01:43:59 +08:00
status.py fix: update setup/config UI for local browser mode 2026-03-07 01:23:27 -08:00
tools_config.py Fix empty tool selection persistence 2026-03-08 06:11:18 -07:00
uninstall.py Cleanup time! 2026-02-20 23:23:32 -08:00