feat(gateway): add iMessage platform adapter#3687
Conversation
9de3fea to
e913637
Compare
|
Hi team! Just wanted to flag this PR for review when you get a chance. It adds iMessage as a new gateway platform (local macOS + remote via Photon proxy), with 48 tests and full docs. Happy to address any feedback. Thanks! |
Adds iMessage as a first-class messaging platform with two modes: - Local (macOS): polls ~/Library/Messages/chat.db for inbound messages, sends via AppleScript. Handles images, audio, and file attachments. - Remote (any OS): talks to Photon advanced-imessage-http-proxy over HTTP. Supports text, replies, effects, file/image/audio sending, tapbacks, typing indicators, mark read/unread, message search, chat history, attachment download, and iMessage availability checks. Integration touches: Platform enum, gateway runner, session PII, prompt hints, toolsets, cron delivery, send_message tool, channel directory, CLI setup wizard, CLI status, and documentation.
e913637 to
f8f1945
Compare
|
Hey @rewbs — would you mind taking a look when you get a chance? This adds iMessage as a new gateway platform. Happy to address any feedback! |
|
Closing in favor of #6437 which landed BlueBubbles as the first iMessage backend. Your dual-mode approach (local SQLite + Photon remote) covered interesting ground — if Photon remote mode is desired as a second backend, we'd consider it separately. Thank you @KumarVandit! |
|
Status update: PR/issue #3687 is currently closed (closedAt: 2026-04-09) and was explicitly closed in favor of #6437, where BlueBubbles became the primary iMessage backend. Net: this change is not merged as proposed; next step is to track any Photon-remote iMessage follow-up separately if that functionality is still needed. |
Summary
What
Adds iMessage as a first-class messaging platform in the Hermes gateway, supporting both local macOS mode (SQLite polling + AppleScript) and remote mode via the Photon
advanced-imessage-http-proxy.~/Library/Messages/chat.dbfor inbound messages, sends via AppleScript. macOS only, no external dependencies.Why
Hermes supports Telegram, Discord, Slack, WhatsApp, Signal, and SMS — but not iMessage, despite it being the default messaging platform for hundreds of millions of Apple users. This gap means macOS users can't interact with their Hermes agent through the app they use most. Adding iMessage brings Hermes to the platform where many users already spend their time, and the remote mode via Photon makes it accessible without requiring the user to run Hermes on a Mac.
Changes across 23 files
gateway/platforms/imessage.pyIMessageAdapterimplementation (~1000 lines)gateway/config.pyPlatform.IMESSAGEenum, env var overrides, connectivity gatinggateway/run.py,gateway/session.py,gateway/channel_directory.pyagent/prompt_builder.py,agent/redact.pytools/send_message_tool.py,tools/cronjob_tools.py,toolsets.pyhermes-imessagetoolsethermes_cli/gateway.py,hermes_cli/status.py,hermes_cli/main.py,hermes_cli/tools_config.py,hermes_cli/skills_config.pytests/gateway/test_imessage.pywebsite/docs/user-guide/messaging/imessage.md,website/docs/user-guide/messaging/index.md,website/docs/reference/environment-variables.md,README.md,AGENTS.md,CONTRIBUTING.mdHow to test
Remote mode (any OS)
Local mode (macOS only)
Unit tests
Platforms tested