Commit Graph

18 Commits

Author SHA1 Message Date
Peter Steinberger
84d9501e85 Tests: cover agents and fix web defaults
Co-authored-by: RealSid08 <RealSid08@users.noreply.github.com>
2025-12-02 11:08:00 +00:00
Peter Steinberger
94a404d769 feat(web): batch inbound messages 2025-12-02 07:54:13 +00:00
Peter Steinberger
f2d2d3dce6 web: isolate session fixtures and skip heartbeat when busy 2025-12-02 06:17:16 +00:00
Peter Steinberger
7ea879ac46 Fix test corrupting production sessions.json
The test 'falls back to most recent session when no to is provided' was
using resolveStorePath() which returns the real ~/.warelay/sessions.json.
This overwrote production session data with test values, causing session
fragmentation issues.

Changed to use a temp directory like other tests.
2025-12-02 05:54:31 +00:00
Peter Steinberger
a7b6914a64 feat: same-phone mode with echo detection and configurable marker
Adds full support for self-messaging setups where you chat with yourself
and an AI assistant replies in the same WhatsApp bubble.

Changes:
- Same-phone mode (from === to) always allowed, bypasses allowFrom check
- Echo detection via bounded Set (max 100) prevents infinite loops
- Configurable samePhoneMarker in config (default: "[same-phone]")
- Messages prefixed with marker so assistants know the context
- fromMe filter removed from inbound.ts (echo detection in auto-reply)
- Verbose logging for same-phone detection and echo skips

Tests:
- Same-phone allowed without/despite allowFrom configuration
- Body prefixed only when from === to
- Non-same-phone rejected when not in allowFrom
2025-11-29 04:52:21 +00:00
Peter Steinberger
8315896d20 feat(heartbeat): allow manual message and dry-run for web/twilio 2025-11-28 08:14:07 +01:00
Peter Steinberger
a633e6dc8c Heartbeat: honor session override 2025-11-26 18:32:25 +01:00
Peter Steinberger
53399da89f Heartbeat: allow session-id override (with test) 2025-11-26 18:28:02 +01:00
Peter Steinberger
ba543640d3 Heartbeat: harden targeting and support lid mapping 2025-11-26 18:15:57 +01:00
Peter Steinberger
1c64f83b31 Heartbeat: add relay helper and fix CLI tests 2025-11-26 17:49:34 +01:00
Peter Steinberger
4c58baa14b docs: document heartbeat idle override and tests 2025-11-26 17:31:56 +01:00
Peter Steinberger
0b25836a1b test: cover heartbeat skip preserving session timestamp 2025-11-26 17:29:12 +01:00
Peter Steinberger
bf714164d3 fix: heartbeat falls back to last session contact 2025-11-26 17:08:43 +01:00
Peter Steinberger
3dd2baba9d feat: add heartbeat cli and relay trigger 2025-11-26 17:04:43 +01:00
Peter Steinberger
dd5774906e web: extract reconnect helpers and add tests 2025-11-26 02:39:31 +01:00
Peter Steinberger
00cd24e7e5 web: add heartbeat and bounded reconnect tuning 2025-11-26 02:34:43 +01:00
Peter Steinberger
2cb244ec35 chore(tests): organize web test imports 2025-11-26 01:24:34 +01:00
Peter Steinberger
786a6d4952 test(web): split provider web suite 2025-11-26 01:23:34 +01:00