feat(channels): add neverReply config for group message suppression#42400
feat(channels): add neverReply config for group message suppression#42400cayde-6 wants to merge 5 commits intoopenclaw:mainfrom
Conversation
Greptile SummaryThis PR adds a All issues flagged in previous review rounds (history not recorded in 6 channels, Line and IRC missing implementations, MSTeams/WhatsApp Confidence Score: 5/5
Last reviewed commit: fe0af6d |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 1f77feb06a
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
All review findings from Greptile and Codex have been addressed in commit 54a04e1: 1. History recording added to 6 extension channels (BlueBubbles, Mattermost, GoogleChat, Matrix, Zalo, ZaloUser)
2. Line monitor implementation added
3.
All 14 channels now consistently: pass Full test suite passes: 873 files, 7113 tests, 0 failures. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 54a04e1365
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
@greptile review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 54a04e1365
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: ed8b90a551
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: f150a378c9
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
@greptile-apps review All review comments have been addressed:
|
|
@chatgpt-codex-connector review All review comments have been addressed — see replies on each thread. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: f150a378c9
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
0bf595b to
67a9bd7
Compare
5e92ba0 to
a11d39d
Compare
84e61ac to
8e09c54
Compare
436e391 to
a2e7ca3
Compare
a2e7ca3 to
e17f91f
Compare
Add a `neverReply` config option to all 15 group-capable channels (bluebubbles, discord, googlechat, imessage, irc, line, matrix, mattermost, msteams, signal, slack, telegram, whatsapp, zalo, zalouser). When enabled, group messages pass access control and are recorded as pending history context where infrastructure exists, but no LLM call or reply is made. DMs continue to flow normally. Resolution follows the standard account → channel → defaults precedence via `resolveNeverReply` in `src/config/group-policy.ts`, exported from the `openclaw/plugin-sdk/channel-policy` SDK seam. Channels with group history infrastructure (telegram, signal, slack, discord, irc, line, matrix, mattermost, msteams, whatsapp, imessage, bluebubbles, zalouser) record the silenced message via `recordPendingHistoryEntryIfEnabled` so it remains available as context for future replies. Channels without history infrastructure (zalo, googlechat) drop the message silently with a clear log message. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Verifies for each group-capable channel that: - the channel's integration source imports `resolveNeverReply` from `openclaw/plugin-sdk/channel-policy`, - the call site passes the matching channel name string, - the call is reachable only on a group code path (DMs unaffected), - accountId is threaded into the resolver call. Also covers the four-step precedence of `resolveNeverReply` (account override > channel value > channels.defaults > false fallback) so schema/wiring drift surfaces as a single localized failure instead of silently breaking observation across one channel. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
The opengrep precise scan flags enqueueSystemEvent calls with interpolated text without explicit trust. The default is trusted: true; mark it explicitly to self-document intent and pass the changed-files scan.
Discord, LINE, and Mattermost neverReply branches were returning before the existing pending-history record paths ran, so suppressed group messages were dropped instead of preserved as context. Record the pending entry alongside the existing skip paths before returning.
- matrix: move neverReply check after access-state evaluation and pending-history text computation; record pending entry before returning so silent rooms still preserve context. - irc: accept channels.irc.neverReply in the strict account/channel schema (runtime already reads it). - slack: include file placeholder fallback in neverReply pending history so file-only messages survive silent mode. - telegram: drop inert neverReply from group/topic schemas (resolver only handles account/channel/defaults). - regen config-baseline and plugin-sdk-api-baseline.
|
Closing this — the use case is already covered by the existing listen-only plugin without any core changes:
Maintainer direction in #71988: Thanks to everyone who reviewed — @greptile-apps, @chatgpt-codex-connector, @clawsweeper, @flowolforg, @Michiel-claw. Closing in favor of the plugin path. |
|
To use Codex here, create an environment for this repo. |
Summary
Adds
neverReply: booleanconfig option to all 15 group-capable channels. When enabled, group messages pass access control and are recorded as pending history context, but no LLM call is made and no reply is sent. DMs continue to work normally.Use case: monitoring many group chats (work, school, client) for context accumulation with zero outbound risk.
Difference from
groupPolicy: "disabled":disableddrops messages before history;neverReply: truelets them through access control and records them — the bot just never replies.Quick start
```yaml
channels:
telegram:
groupPolicy: open
neverReply: true # observe all Telegram groups silently
defaults:
neverReply: true # or silence all channels at once
```
Config resolution: account-level → channel-level →
channels.defaults.neverReply.Changes
resolveNeverReply()insrc/config/group-policy.ts, re-exported viasrc/plugin-sdk/channel-policyneverReply: z.boolean().optional()added to all 15 channel schemas (core providers schema + extension schemas for line, matrix, mattermost, bluebubbles, zalo, zalouser)src/config/schema.base.generated.tsregeneratedchannels.defaults.neverReplyinschema.help.tsandschema.labels.ts## Silent observation (neverReply)section indocs/channels/groups.md, updated quick-flow diagram and use-case tableCompatibility
neverReplydefaults toundefined/false, no existing behavior changesLinked