1. Turn order now activates via moderator on first creation (discovery-based),
ensuring no agent consumes messages before the turn list is ready.
All agents are blocked (dormant) until moderator sends handoff to first speaker.
2. channel-private-create: pre-populates turn order from allowedUserIds,
filtering to only bot accounts (excluding humans and moderator).
Immediately activates first speaker via moderator handoff.
3. channel-private-update: updates turn order when members are added/removed.
If current speaker is removed, activates next available speaker.
4. Any member (human or bot) can now trigger turn activation when dormant,
not just humans. Human messages still reset the cycle.
5. Added resolveAccountIdByUserId helper to map Discord user IDs back to
account names from bot tokens.
6. turn-manager: added initTurnOrderPrePopulated, updateTurnMembers,
activateFirstSpeaker, hasTurnState exports.
Turn system redesign:
- Turn order auto-populated from config bindings (all bot accounts)
- No manual turnOrder config needed
- Humans (humanList) excluded from turn order automatically
- Dormant state: when all agents NO_REPLY in a cycle, currentSpeaker=null
- Reactivation: any new message wakes the system
- Human message → start from first in order
- Bot not in order → start from first
- Bot in order → next after sender
- Skip already-NO_REPLY'd agents when advancing
Identity injection:
- Group chat prompts now include agent identity
- Format: '你是 {name}(Discord 账号: {accountId})'
Other:
- Remove turnOrder from ChannelPolicy (no longer configurable)
- Add TURN-WAKEUP-PROBLEM.md documenting the NO_REPLY wake-up challenge
- Update message_received to call onNewMessage with proper human detection
- Update message_sent to call onSpeakerDone with NO_REPLY tracking