Skip to content

constansino/openclaw-chat-only-trigger

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

chat-only-trigger

An OpenClaw plugin that forces selected turns into chat-only mode.

The plugin is disabled by default after installation. Nothing happens until you explicitly set enabled: true.

It now supports three activation styles:

  • Keyword trigger: if the prompt contains a configured trigger word, this turn switches to chat-only mode.
  • Non-whitelist trigger: if the sender is not on your allowlist, this turn switches to chat-only mode.
  • Combined trigger: either condition can activate chat-only mode.

When active, the plugin:

  • forces a fixed provider/model if configured
  • appends a system instruction that forbids tools and actions
  • blocks tool calls
  • blocks subagent / ACP spawning

Why this exists

OpenClaw is agent-first. That is powerful, but public-facing surfaces often need a safer mode:

  • Bilibili mentions where strangers can @ the bot
  • Telegram groups where only the owner/admins should be able to invoke agent actions
  • Community channels where everyone should get replies, but only trusted users should get full agent capability

This plugin keeps the chat UX while temporarily shutting off agent execution.

Install

Clone or install this plugin into your OpenClaw extensions directory, for example:

git clone https://github.com/constansino/openclaw-chat-only-trigger.git ~/.openclaw/extensions/chat-only-trigger

Then enable it in OpenClaw config:

{
  "plugins": {
    "allow": ["chat-only-trigger"],
    "entries": {
      "chat-only-trigger": {
        "enabled": true,
        "config": {}
      }
    }
  }
}

Web UI

This plugin does not have a standalone page.

Its config is exposed through the built-in OpenClaw Control UI config form under:

plugins.entries.chat-only-trigger.config

Open Config, then search for chat-only-trigger or open the plugins section.

The Enabled toggle defaults to off so you can install the plugin first and only opt in later.

Example: keyword-only

{
  "channels": ["bilibili"],
  "triggerWords": ["只聊天模式"],
  "policyMode": "trigger_only",
  "modelOverride": "gpt-5.4",
  "providerOverride": "wuju.de5.net"
}

You still need:

{
  "plugins": {
    "entries": {
      "chat-only-trigger": {
        "enabled": true
      }
    }
  }
}

Example: public Bilibili default to chat-only, whitelist some UIDs

{
  "channels": ["bilibili"],
  "policyMode": "non_whitelist",
  "chatTypes": ["group"],
  "whitelistSenderIds": ["3706942188948391", "39489993", "37253965", "527178615"],
  "inheritBilibiliWhitelist": true,
  "modelOverride": "gpt-5.4",
  "providerOverride": "wuju.de5.net"
}

Example: Telegram groups, only owner/admin IDs can use agent mode

{
  "channels": ["telegram"],
  "policyMode": "non_whitelist",
  "chatTypes": ["group"],
  "whitelistSenderIds": ["123456789", "987654321"],
  "modelOverride": "gpt-5.4",
  "providerOverride": "wuju.de5.net"
}

Notes

  • Default state is off. Installing the plugin alone does not affect agent behavior.
  • whitelistSenderUsernames ignores a leading @.
  • inheritBilibiliWhitelist automatically includes channels.bilibili.whitelistUids and selfUid.
  • channelFallbackWindowSeconds is mainly for channels whose session naming does not map cleanly back to a conversation id.
  • Restart the gateway after changing plugin code or config.

About

Chat-only and whitelist safety plugin for OpenClaw public channels and group chats

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors