mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-04-28 01:21:43 +00:00
Bridge extracts senderId (participant JID) + senderName (pushName) on
every inbound message and posts them in the HTTP event dict, but the
gateway was dropping both: `text = body` carried only the plain message
content. That meant all group members' messages arrived at the LLM
indistinguishable from the session owner's, so (a) the LLM couldn't
attribute a question to the actual asker, (b) memory-write tool calls
triggered by a guest were stored under the owner's profile, and (c)
the trust-tier policy in AGENTS.md was effectively unenforceable.
Prepend `[<pushName>] ` to body for `isGroup` events only, after
@bot-mention stripping + doc-content injection so the prefix stays at
the very start of the text the LLM reads. Fallback order:
pushName → short JID → "unknown". DMs untouched (no ambiguity).
Completes the design intent already documented in
gateway/session.py:245-256 ("individual sender names are prefixed on
each user message") — that comment promised behavior that was never
implemented in code.
|
||
|---|---|---|
| .. | ||
| builtin_hooks | ||
| platforms | ||
| __init__.py | ||
| channel_directory.py | ||
| config.py | ||
| delivery.py | ||
| display_config.py | ||
| hooks.py | ||
| mirror.py | ||
| pairing.py | ||
| restart.py | ||
| run.py | ||
| session.py | ||
| session_context.py | ||
| status.py | ||
| sticker_cache.py | ||
| stream_consumer.py | ||
| whatsapp_identity.py | ||