MAESTRO: Implement SSE observation feed consumer with channel routing and exponential backoff

Replaces stub start/stop methods with working SSE consumer that connects to
claude-mem worker's /stream endpoint, parses new_observation events, and
forwards formatted messages to configured OpenClaw channels (Telegram, Discord,
Signal, Slack, WhatsApp, Line). Includes reconnection with exponential backoff
(1s-30s), connection state tracking, and on/off command toggle. Added 17 tests
covering unit and SSE integration scenarios.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Alex Newman
2026-02-07 18:44:35 -05:00
parent baa37eba07
commit f8d8de53e8
4 changed files with 587 additions and 13 deletions
+3 -1
View File
@@ -5,9 +5,11 @@
"type": "module",
"main": "dist/index.js",
"scripts": {
"build": "tsc"
"build": "tsc",
"test": "tsc && node --test dist/index.test.js"
},
"devDependencies": {
"@types/node": "^25.2.1",
"typescript": "^5.3.0"
}
}