hermes-agent/scripts
Test a5beb6d8f0 fix(whatsapp): image downloading, bridge reuse, LID allowlist, Baileys 7.x compat
Salvaged from PR #2162 by @Zindar. Reply prefix changes excluded (already
on main via #1756 configurable prefix).

Bridge improvements (bridge.js):
- Download incoming images to ~/.hermes/image_cache/ via downloadMediaMessage
  so the agent can actually see user-sent photos
- Add getMessage callback required for Baileys 7.x E2EE session
  re-establishment (without it, some messages arrive as null)
- Build LID→phone reverse map for allowlist resolution (WhatsApp LID format)
- Add placeholder body for media without caption: [image received]
- Bind express to 127.0.0.1 instead of 0.0.0.0 for security
- Use 127.0.0.1 consistently throughout (more reliable than localhost)

Adapter improvements (whatsapp.py):
- Detect and reuse already-running bridge (only if status=connected)
- Handle local file paths from bridge-cached images in _build_message_event
- Don't kill external bridges on disconnect
- Use 127.0.0.1 throughout for consistency with bridge binding

Fix vs original PR: bridge reuse now checks status=connected, not just
HTTP 200. A disconnected bridge gets restarted instead of reused.

Co-authored-by: Zindar <zindar@users.noreply.github.com>
2026-03-20 09:37:48 -07:00
..
whatsapp-bridge fix(whatsapp): image downloading, bridge reuse, LID allowlist, Baileys 7.x compat 2026-03-20 09:37:48 -07:00
discord-voice-doctor.py feat(voice): add discord-voice-doctor diagnostic script 2026-03-15 05:20:17 -07:00
hermes-gateway Enhance CLI with multi-platform messaging integration and configuration management 2026-02-02 19:01:51 -08:00
install.cmd feat: Windows native support via Git Bash 2026-03-02 22:03:29 -08:00
install.ps1 fix: fall back to ZIP download when git clone fails on Windows 2026-03-02 22:53:28 -08:00
install.sh installer: clarify why sudo is needed at every prompt (#1602) 2026-03-16 17:43:48 -07:00
kill_modal.sh Add kill_modal script to manage Modal applications and better handling of file and terminal tools 2026-02-12 05:37:14 +00:00
release.py feat: add versioning infrastructure and release script 2026-03-12 01:35:47 -07:00
sample_and_compress.py Cleanup time! 2026-02-20 23:23:32 -08:00