fix(wrap): resolve DM participants for correct routing
Merged
KH
8mo ago+179+179+012345678901234567890123456789-61-61-01234567890123456789
Summary
- DMs with
conv_/dm_conversation-ID targets were being delivered to all wrapped agents instead of only the intended recipient - Now resolves DM participants via Relaycast API with 30s cache (same pattern as
main.rs) and only delivers if the wrapped agent is a participant - Fixes case-insensitive matching for self-echo filtering and direct target checks ā previously used exact
HashSet::containswhich missed differently-cased names
Root cause
PR #641 added a DM routing filter but whitelisted conv_/dm_ prefixed targets as pass-through. Since Relaycast delivers most DMs with conversation_id as the target (not the agent name), every wrapped agent received every DM.
Test plan
- Send a DM to a specific agent in Superset ā only that agent should receive it
- Send a channel message ā all subscribed agents should receive it
-
cargo test --allpasses (516 tests green)
š¤ Generated with Claude Code