1c8f48fd77ad57fdef9e5516b9d1b6dbd97a5a2a
Gen 2 improvements from build-zulip-plugin contract run:
1. Background dedup maintenance task
- _dedup_cleanup_forever() runs every 120s, pruning stale entries
- _is_duplicate() is now pure O(1) — no per-call cleanup overhead
- Cleanup is cancelled gracefully on disconnect
2. Self-test diagnostics (selftest())
- 8 checks: connection, queue, HTTP client, bot identity, poll loop,
dedup cleanup, echo prevention, @all-bots configuration
- Returns structured verdict: healthy / degraded / critical_failure
- Verifies every Success Criterion from the contract
3. Health stats tracking (get_health_stats())
- Uptime, poll counts/errors, message routing counts, send stats
- Error rate computation, dedup map size
- Suitable for periodic RA-H OS knowledge graph logging
4. Dynamic @all-bots resolution
- _resolve_all_bots_user_id() queries Zulip /api/v1/users on connect
- Falls back to configured env var or hardcoded default (1)
- Eliminates fragile hardcoded default in multi-bot deployments
5. Connection lifecycle now manages both poll_task and dedup_cleanup_task
- Both cancelled gracefully on disconnect()
- dedup task starts in connect() after queue registration
Description
Multi-platform Zulip agent communication plugins (Hermes, openclaw, Agent Zero)
1.3 MiB
Languages
Python
50.6%
JavaScript
34.6%
TypeScript
11.1%
Shell
3.7%