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.
WhisperGate Plugin
Hook strategy
message:receivedcaches a per-session decision from deterministic rules.before_model_resolveappliesproviderOverride + modelOverridewhen decision says no-reply.before_prompt_buildprepends instruction你的这次发言必须以🔚作为结尾。when decision is:bypass_senderend_symbol:*
Rules (in order)
- non-discord -> skip
- bypass sender -> skip
- end symbol matched -> skip
- else -> no-reply override
Config
See docs/CONFIG.example.json.
Required:
noReplyProvidernoReplyModel
Optional:
enabled(default true)discordOnly(default true)listMode(human-list|agent-list, defaulthuman-list)humanList(default [])agentList(default [])channelPoliciesFile(per-channel overrides in a standalone JSON file)enableWhispergatePolicyTool(default true)
Unified optional tool:
whispergateway_tools- Discord actions:
channel-private-create,channel-private-update,member-list - Policy actions:
policy-get,policy-set-channel,policy-delete-channel
- Discord actions:
bypassUserIds(deprecated alias ofhumanList)endSymbols(default ["🔚"])enableDiscordControlTool(default true)discordControlApiBaseUrl(defaulthttp://127.0.0.1:8790)discordControlApiTokendiscordControlCallerIdenableDebugLogs(default false)debugLogChannelIds(default [], empty = all channels when debug enabled)
Per-channel policy file example: docs/channel-policies.example.json.
Policy file behavior:
- loaded once on startup into memory
- runtime decisions read memory state only
- direct file edits do NOT affect memory state
whispergateway_toolspolicy actions update memory first, then persist to file (atomic write)
Optional tool: whispergateway_tools
This plugin registers one unified optional tool: whispergateway_tools.
To use it, add tool allowlist entry for either:
- tool name:
whispergateway_tools - plugin id:
whispergate
Supported actions:
- Discord:
channel-private-create,channel-private-update,member-list - Policy:
policy-get,policy-set-channel,policy-delete-channel
Debug logging:
- set
enableDebugLogs: trueto emit detailed hook diagnostics - optionally set
debugLogChannelIdsto only log selected channel IDs - logs include key ctx fields + decision status at
message_received,before_model_resolve,before_prompt_build