Prevent self-directed agent messages
This commit is contained in:
1 parent
1a7eb8f1b3
commit
a4af4a866a
6 files changed
+169
No files matched your search
@@ -155,6 +155,12 @@ function handleAgentNotification<K extends "notify_agent" | "send_message">({
|
||||
);
|
||||
return;
|
||||
}
|
||||
if (channel === "direct" && toAgentId === fromAgentId) {
|
||||
logger.info(
|
||||
`[automation] Skipping rule "${rule.name}" - direct messages require two distinct participants`,
|
||||
);
|
||||
return;
|
||||
}
|
||||
|
||||
const dispatchResult = dispatchAgentMessage(
|
||||
{ db, emitEvent, publishDomainChanged, wakeAgentIfPossible },
|
||||
|
||||
Reference in new issue
Block a user