diff --git a/xmpp_agent_core.py b/xmpp_agent_core.py index a88181b..ae0256f 100644 --- a/xmpp_agent_core.py +++ b/xmpp_agent_core.py @@ -168,7 +168,14 @@ class AgentBot(ClientXMPP): self._granted = None if not _can_speak: - return # 代码层拦截,不走 LLM + # 无权发言 → 仍发给 LLM 用于上下文积累,但标记为只读 + _room = sender.split('/')[0] + _readonly_body = ( + "【只读消息】你不需要回复,只需了解内容以便后续上下文连贯。输出 __SILENT__。\n\n" + f"[核心群 {_room}] {nickname} 说: {body}" + ) + await self.call_hermes(_readonly_body, sender, is_group=True) + return # 硬闭嘴闸门:hmo 说闭嘴类的话 → 静默 5 分钟 _silent_until = getattr(self, '_silent_until', 0)