zhi 476308d0df refactor: auto-managed turn order + dormant state + identity injection
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
2026-02-28 12:10:52 +00:00

WhisperGate

Rule-based no-reply gate for OpenClaw.

What it does

WhisperGate adds a deterministic gate before model selection:

  1. If message is not from Discord → skip gate
  2. If sender is in bypass user list → skip gate
  3. If message ends with configured end-symbol → skip gate
  4. Otherwise switch this turn to a no-reply model/provider

The no-reply provider returns NO_REPLY for any input.


Repo layout

  • plugin/ — OpenClaw plugin (before_model_resolve hook)
  • no-reply-api/ — OpenAI-compatible minimal API that always returns NO_REPLY
  • discord-control-api/ — Discord 管理扩展 API私密频道 + 成员列表)
  • docs/ — rollout, integration, run-mode notes
  • scripts/ — smoke/dev/helper checks
  • Makefile — common dev commands (make check, make check-rules, make test-api, make smoke-discord-control, make up)
  • CHANGELOG.md — milestone summary

Quick start (no Docker)

cd no-reply-api
node server.mjs

Then render config snippet:

node scripts/render-openclaw-config.mjs

See docs/RUN_MODES.md for Docker mode.

Discord 扩展能力见:docs/DISCORD_CONTROL.md


Development plan (incremental commits)

  • Task 1: project docs + structure
  • Task 2: no-reply API MVP
  • Task 3: plugin MVP with rule chain
  • Task 4: sample config + quick verification scripts
  • Task 5: plugin rule extraction + hardening
  • Task 6: containerization + compose
  • Task 7: plugin usage notes
  • Task 8: sender normalization + TTL + one-shot decision
  • Task 9: auth-aware no-reply API
  • Task 10: smoke test helpers
  • Task 11: plugin structure checker
  • Task 12: rollout checklist
Description
Rule-based no-reply gate for OpenClaw
Readme 1.6 MiB
Languages
TypeScript 75.7%
JavaScript 23.8%
Shell 0.4%
Makefile 0.1%