惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

H
Help Net Security
腾讯CDC
爱范儿
爱范儿
Google DeepMind News
Google DeepMind News
V
V2EX
Blog — PlanetScale
Blog — PlanetScale
Engineering at Meta
Engineering at Meta
GbyAI
GbyAI
量子位
F
Fortinet All Blogs
G
Google Developers Blog
T
The Blog of Author Tim Ferriss
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
Hugging Face - Blog
Hugging Face - Blog
Last Week in AI
Last Week in AI
T
Tailwind CSS Blog
J
Java Code Geeks
S
SegmentFault 最新的问题
D
Docker
博客园 - 司徒正美
The GitHub Blog
The GitHub Blog
Jina AI
Jina AI
M
MIT News - Artificial intelligence
博客园 - 【当耐特】

Recent Commits to openclaw:main

test: merge chat side-result checks · openclaw/openclaw@ddd2c2a test: merge cron history checks · openclaw/openclaw@f7eb746 test: merge responsive navigation shell checks · openclaw/openclaw@c2e4b47 docs(changelog): add codex oauth fixes · openclaw/openclaw@628e6cd test: merge navigation routing cases · openclaw/openclaw@5d8cecb Tests: mock channel registry bundled fallback · openclaw/openclaw@2b08233 Secrets: avoid broad web search discovery for single plugin config · openclaw/openclaw@a464f59 test: merge config view browser checks · openclaw/openclaw@20cf511 fix(status): align oauth health with runtime · openclaw/openclaw@eed7116 feat: add macOS screen snapshots for monitor preview (#67954) thanks … · openclaw/openclaw@f377db1 fix: report shared auth scopes in hello-ok (#67810) thanks @BunsDev · openclaw/openclaw@0b6c39b Auto-reply: avoid eager bundled route fallback · openclaw/openclaw@3ea1bf4 Tests: narrow session binding contract setup · openclaw/openclaw@54e4e16 fix(macOS): enable undo/redo in webchat composer text input (#34962) · openclaw/openclaw@00951dc Tests: speed up channel setup promotion · openclaw/openclaw@82b529a Docs: refresh agent instructions · openclaw/openclaw@5775fe2 fix(auth): serialize OAuth refresh across agents to fix #26322 (#67876) · openclaw/openclaw@8e79080 test: allow ollama public surface boundary test · openclaw/openclaw@7d4f1a6 Docs: add test performance guardrails · openclaw/openclaw@89706d3 Tests: restore context-engine usage proof · openclaw/openclaw@e4c4f95 Tests: slim context engine runtime coverage · openclaw/openclaw@74c198f ci: retry failed custom checkouts · openclaw/openclaw@0ee5baf test: trim duplicate provider auth onboarding cases · openclaw/openclaw@1ffc02e matrix: fix sessions_spawn --thread subagent session spawning (#67643) · openclaw/openclaw@1ce2596 test: reduce auth choice fixture churn · openclaw/openclaw@857b9cd test: mock health status config boundaries · openclaw/openclaw@9d5ab4a test: mock onboard config io boundary · openclaw/openclaw@299694d test: mock legacy state plugin boundaries · openclaw/openclaw@2713089 test: mock channel install boundaries · openclaw/openclaw@b945248 test: mock doctor preview channel boundaries · openclaw/openclaw@b1a3ad4
docs: document scoped mention patterns · openclaw/opencla...
steipete · 2026-05-31 · via Recent Commits to openclaw:main

@@ -2,6 +2,7 @@

22

summary: "Group chat behavior across surfaces (Discord/iMessage/Matrix/Microsoft Teams/Signal/Slack/Telegram/WhatsApp/Zalo)"

33

read_when:

44

- Changing group chat behavior or mention gating

5+

- Scoping mentionPatterns to specific group conversations

56

title: "Groups"

67

sidebarTitle: "Groups"

78

---

@@ -360,10 +361,89 @@ Replying to a bot message counts as an implicit mention when the channel support

360361

}

361362

```

362363364+

## Scope configured mention patterns

365+366+

Configured `mentionPatterns` are regex fallback triggers. Use them when the

367+

platform does not expose a native bot mention, or when you want plain text such

368+

as `openclaw:` to count as a mention. Native platform mentions are separate:

369+

when Discord, Slack, Telegram, Matrix, or another channel can prove the message

370+

explicitly mentioned the bot, that native mention still triggers even if

371+

configured regex patterns are denied.

372+373+

By default, configured mention patterns apply everywhere that channel passes

374+

provider and conversation facts into mention detection. To keep broad patterns

375+

from waking the agent in every group, scope them per channel with

376+

`channels.<channel>.mentionPatterns`.

377+378+

Use `mode: "deny"` when regex mention patterns should be off by default for a

379+

channel, then opt in specific rooms with `allowIn`:

380+381+

```json5

382+

{

383+

messages: {

384+

groupChat: {

385+

mentionPatterns: ["\\bopenclaw\\b", "\\bops bot\\b"],

386+

},

387+

},

388+

channels: {

389+

slack: {

390+

mentionPatterns: {

391+

mode: "deny",

392+

allowIn: ["C0123OPS"],

393+

},

394+

},

395+

},

396+

}

397+

```

398+399+

Use the default `mode: "allow"` (or omit `mode`) when regex mention patterns

400+

should apply broadly, then turn them off in noisy rooms with `denyIn`:

401+402+

```json5

403+

{

404+

messages: {

405+

groupChat: {

406+

mentionPatterns: ["\\bopenclaw\\b"],

407+

},

408+

},

409+

channels: {

410+

telegram: {

411+

mentionPatterns: {

412+

denyIn: ["-1001234567890", "-1001234567890:topic:42"],

413+

},

414+

},

415+

},

416+

}

417+

```

418+419+

Policy resolution:

420+421+

| Field | Effect |

422+

| --------------- | --------------------------------------------------------------------------------------------------------------------- |

423+

| `mode: "allow"` | Regex mention patterns are enabled unless the conversation ID is in `denyIn`. This is the default. |

424+

| `mode: "deny"` | Regex mention patterns are disabled unless the conversation ID is in `allowIn`. |

425+

| `allowIn` | Conversation IDs where regex mention patterns are enabled in deny mode. |

426+

| `denyIn` | Conversation IDs where regex mention patterns are disabled. `denyIn` wins over `allowIn` if both include the same ID. |

427+428+

Supported scoped regex policy today:

429+430+

| Channel | IDs used in `allowIn` / `denyIn` |

431+

| -------- | ------------------------------------------------------------ |

432+

| Discord | Discord channel IDs. |

433+

| Matrix | Matrix room IDs. |

434+

| Slack | Slack channel IDs. |

435+

| Telegram | Group chat IDs, or `chatId:topic:threadId` for forum topics. |

436+

| WhatsApp | WhatsApp conversation IDs such as `123@g.us`. |

437+438+

Account-level channel configs can set the same policy under

439+

`channels.<channel>.accounts.<accountId>.mentionPatterns` when that channel

440+

supports multiple accounts. Account policy takes precedence over the top-level

441+

channel policy for that account.

442+363443

<AccordionGroup>

364444

<Accordion title="Mention gating notes">

365445

- `mentionPatterns` are case-insensitive safe regex patterns; invalid patterns and unsafe nested-repetition forms are ignored.

366-

- Surfaces that provide explicit mentions still pass; patterns are a fallback.

446+

- Surfaces that provide explicit mentions still pass; configured regex patterns are a fallback.

367447

- `channels.<channel>.mentionPatterns.mode: "deny"` disables configured mention patterns by default for that channel; opt selected conversations back in with `allowIn`.

368448

- `channels.<channel>.mentionPatterns.denyIn` disables configured mention patterns for specific conversation IDs while native platform @mentions still pass.

369449

- Per-agent override: `agents.list[].groupChat.mentionPatterns` (useful when multiple agents share a group).