feat: add SMS (Telnyx) platform adapter#1676
Merged
Merged
Conversation
Implement SMS as a first-class messaging platform following ADDING_A_PLATFORM.md checklist. All 16 integration points covered: - gateway/platforms/sms.py: Core adapter with aiohttp webhook server, Telnyx REST API send, markdown stripping, 1600-char chunking, echo loop prevention, multi-number reply-from tracking - gateway/config.py: Platform.SMS enum + env override block - gateway/run.py: Adapter factory + auth maps (SMS_ALLOWED_USERS, SMS_ALLOW_ALL_USERS) - toolsets.py: hermes-sms toolset + included in hermes-gateway - cron/scheduler.py: SMS in platform_map for cron delivery - tools/send_message_tool.py: SMS routing + _send_sms() standalone sender - tools/cronjob_tools.py: 'sms' in deliver description - gateway/channel_directory.py: SMS in session-based discovery - agent/prompt_builder.py: SMS platform hint (plain text, concise) - hermes_cli/status.py: SMS in platforms status display - hermes_cli/gateway.py: SMS in setup wizard with Telnyx instructions - pyproject.toml: sms optional dependency group (aiohttp>=3.9.0) - tests/gateway/test_sms.py: Unit tests for config, format, truncate, echo prevention, requirements, toolset integration Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This was referenced Mar 17, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Cherry-picked from PR #1575 by @sunsakis onto current main. Resolved one conflict in
send_message_tool.py(the chunking refactor from PR #1646 changed the dispatch loop).Adds SMS as a first-class messaging platform via the Telnyx API, following all integration points from
ADDING_A_PLATFORM.md.Integration points (13 files)
gateway/platforms/sms.py— Core adapter: aiohttp webhook server for inbound, Telnyx REST API for outbound, markdown stripping, 1600-char chunking, echo loop prevention, multi-number reply-from trackinggateway/config.py—Platform.SMSenum + env overridesgateway/run.py— Adapter creation + auth maps (SMS_ALLOWED_USERS,SMS_ALLOW_ALL_USERS)gateway/channel_directory.py— Session-based channel discoveryagent/prompt_builder.py— SMS platform hint (concise, plain text)cron/scheduler.py— Cron delivery targettools/send_message_tool.py— Direct SMS sending via_send_sms()tools/cronjob_tools.py— Cron tool descriptiontoolsets.py—hermes-smstoolset + added tohermes-gatewayhermes_cli/gateway.py— Gateway setup wizard with Telnyx confighermes_cli/status.py— Status displaypyproject.toml—smsoptional dependency (aiohttp)tests/gateway/test_sms.py— 20 tests covering config, format, echo prevention, auth, toolsetsEnvironment variables
TELNYX_API_KEYTELNYX_FROM_NUMBERSSMS_WEBHOOK_PORTSMS_ALLOWED_USERS/SMS_ALLOW_ALL_USERSSMS_HOME_CHANNEL/SMS_HOME_CHANNEL_NAME