CI / validate (pull_request) Failing after 1s
Architecture change: DM-First (v2) replaces @mention-in-stream (v1) as primary agent interaction channel. See ADR-001-dm-topology and ADR-002-dm-routing. Key changes: - New DM-first Zulip adapter (adapter_dm.py) deployed on CT 112 - Registers empty narrow to receive ALL events - Demuxes DMs (type: 'private') vs stream events - Replies to DMs back in private thread, stream replies to #agent-hub - Uses blocking long-poll (dont_block=False) to eliminate rate limiting - Rewritten ARCHITECTURE.md, CONTEXT.md, PRD.md for v2 DM-First - New ADRs: ADR-001 (DM Topology), ADR-002 (DM Routing) - Archived old ADRs: 001, 002, 005 (topic-topology, mention-routing, mention-detection) - Updated ADRs: 003 (agent-naming), 004 (per-agent-bots), 006 (all-bots-model) - Updated PI extension (index.ts) with DM-aware patterns - Tanko agent confirmed responding in both DM and @all-bots in #agent-hub
816 B
816 B
ADR 5: @mention Detection via Zulip SDK
Date: 2026-04-28
Decision
Use the Zulip SDK's mentioned_users field in message events for @mention detection, with regex fallback for cleaning @mention artifacts from forwarded message text.
Context
The Zulip event API provides mentioned_users — an array of user IDs that were @mentioned in the message. This is the most reliable detection mechanism (handles all @mention formats) and avoids fragile text parsing. Regex is only needed to strip the @**Display Name** markup from the forwarded message body.
Consequences
- Zero false positives for @mention detection
- Handles @all-bots, @everyone, and individual @mentions uniformly
- Stripped message text is clean for agent consumption
- SDK handles reconnection and backoff for the event stream