feat(listen): deliver cloud-generated proactive messages to desktop over listen websocket
Merged
AR
2mo ago+680+680+012345678901234567890123456789-0-0-0123456789
What changed and why
Delivers cloud-generated proactive messages (mentor prompts, realtime third-party app interjections) directly to the desktop macOS app in real time over the active /v4/listen WebSocket stream. Previously, mid-session proactive interjections from utils/app_integrations.py only reached mobile FCM notifications/webhooks, leaving the desktop ambient listener disconnected from realtime suggestions.
Product invariants affected
none
How it was verified
- Ran backend unit tests covering
ProactiveMessageEventserialization, Redis pub/sub dispatching, and process-local session registry:
python3 -m pytest tests/unit/test_proactive_listen_delivery.py -v-> 10 passed - Ran integration regression suite:
python3 -m pytest tests/unit/test_async_app_integrations.py -v-> 18 passed - Built and executed desktop Swift unit tests covering event decoding, empty body gating, type recognition, and TTS delivery policy:
swift test --filter ProactiveListenEventTests-> 9 passed - Formatted modified Python files with
blackand verified zero regressions.
Tests
- Backend:
backend/tests/unit/test_proactive_listen_delivery.py(10 unit tests) - Integration:
backend/tests/unit/test_async_app_integrations.py(18 integration tests) - Desktop:
desktop/macos/Desktop/Tests/ProactiveListenEventTests.swift(9 Swift unit tests)
Failure class (fixes)
Failure-Class: none