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
45 lines
2.1 KiB
Markdown
45 lines
2.1 KiB
Markdown
# ADR 6: @all-bots via Content-Based Detection
|
|
|
|
**Date**: 2026-06-21 (supersedes 2026-04-28 dedicated bot user approach)
|
|
|
|
### Decision
|
|
|
|
`@all-bots` is detected via **content-based mention matching** on messages in the `#agent-hub` stream. Each bot subscribes to `#agent-hub` and uses regex to detect `@**all-bots**` or `@**All Bots**` in message content. A dedicated "All Bots" Zulip bot user is **not required**.
|
|
|
|
### Context
|
|
|
|
The original design required a 7th Zulip bot user (`all-bots@chat.sysloggh.net`) with display name `All Bots`. This user was never created during initial bot provisioning. Additionally:
|
|
|
|
- Bot users cannot reliably detect @mentions of other bot users in Zulip 12.0 (ADR-005 archived)
|
|
- Content-based regex matching (`@**all-bots**`) works on any Zulip message regardless of SDK version
|
|
- Under the DM-first architecture (ADR-001), bot-event stream subscription to `#agent-hub` is the **only** stream-level listener needed — all other communication uses DMs
|
|
|
|
### Behavior
|
|
|
|
```
|
|
User posts in #agent-hub > topic:
|
|
"@**all-bots** status report please"
|
|
|
|
→ Each bot receives event via #agent-hub subscription
|
|
→ Each bot checks: /@\*\*(?:all-bots|All Bots)\*\*/i.test(content)
|
|
→ If match: bot forwards message to its agent
|
|
→ 6 independent responses appear in the topic
|
|
```
|
|
|
|
### Active Stream Subscription
|
|
|
|
Under DM-first architecture, each agent's plugin maintains **one** stream subscription:
|
|
- **Stream:** `#agent-hub`
|
|
- **Purpose:** Only for detecting `@all-bots` broadcasts
|
|
- **Filter:** Ignore all non-`@all-bots` messages in the stream
|
|
- **Primary channel:** DMs for all agent-owner communication
|
|
|
|
### Consequences
|
|
|
|
- **Positive:** No need to create/manage a 7th dedicated bot user
|
|
- **Positive:** Content-based detection works reliably across Zulip versions (no SDK dependency)
|
|
- **Positive:** Same regex works for case-insensitive matching (`all-bots` / `All Bots`)
|
|
- **Negative:** Slightly more processing per message (regex check)
|
|
- **Negative:** If `@all-bots` syntax changes in Zulip, regex must update
|
|
- **Neutral:** All 6 bots still independently detect and respond — same multi-response pattern
|