message-received.ts:
- message_received ctx has channelId/accountId/conversationId (not
sessionKey). Add extraction from ctx.channelId and metadata.to
("channel:ID" format) before the conversation_info fallback.
agent-end.ts:
- When tail-match is interrupted, only call wakeFromDormant() if the
channel is actually dormant. For non-dormant interrupts (e.g. the
moderator bot's own trigger messages firing message_received on
other agents), fall through to normal advanceSpeaker() so the turn
cycle continues correctly instead of re-triggering the same speaker.
- Import isDormant from turn-manager.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
9.0 KiB
9.0 KiB