Skip to content

Commit a0ad38e

Browse files
authored
feat(docs-ci): validate docs config examples against the schema (#121336)
* feat(docs-ci): validate config examples against schema * docs: teach canonical agent roster configuration * docs: nest inline environment variables under vars * docs: update canonical media model keys * docs: remove retired config keys from examples * fix(docs-ci): keep audit internals private * feat(docs-ci): validate plugin-owned config examples * fix(docs-ci): validate indented config fences * fix(ci): route manifest changes through docs audit * chore(docs): refresh generated config baselines
1 parent 4849106 commit a0ad38e

71 files changed

Lines changed: 786 additions & 295 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
22
"core": 2292,
33
"channel": 3716,
4-
"plugin": 4030
4+
"plugin": 4040
55
}
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
05150969476529ddc78ae3836efb00419571bf706696e91f23af226571fd2562 config-baseline.json
1+
f47ba9b32b6d42dff5e0f2cef4d7b16a629ff35b659b3f66beb6748c13944566 config-baseline.json
22
52a8577126e605f70ef6c34cafaaebd83ec7a658b70da20ebb24b6eb37a0e513 config-baseline.core.json
33
3a8d0cbdbf9d7d603204fba5b93493050cb76fd9141fcbbec56159ff00158d6f config-baseline.channel.json
4-
4498ac72bb6b9cd5205f7bb8741110a4c53c4e2ec504a1dbb7e7e59c3495f492 config-baseline.plugin.json
4+
d93639a3d59b9b7ecaa27ff38b844a9ec90ac074c9e53f02930146ed21665c66 config-baseline.plugin.json

‎docs/AGENTS.md‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ This directory owns docs authoring, Mintlify link rules, and docs i18n policy.
1515

1616
- For docs, UI copy, and picker lists, order services/providers alphabetically unless the section is explicitly describing runtime order or auto-detection order.
1717
- Keep bundled plugin naming consistent with the repo-wide plugin terminology rules in the root `AGENTS.md`.
18+
- JSON5/JSON config fences that look like whole `openclaw.json` documents are schema-validated in CI with `pnpm docs:check-config-examples`; deliberately partial or legacy snippets opt out with `validate=false` in the fence info string.
1819
- Generated docs, never hand-edit: `docs/plugins/reference/**`, `docs/plugins/reference.md`, and `docs/plugins/plugin-inventory.md` come from `pnpm plugins:inventory:gen`; `docs/maturity/**` from `pnpm maturity:render`.
1920
- The public and packaged docs map is generated from `pnpm docs:list --headings` during publishing and packaging. Keep only the small source stub at `docs/docs_map.md`; never commit the expanded heading mirror.
2021

‎docs/channels/discord.md‎

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1100,18 +1100,13 @@ See [Slash commands](/tools/slash-commands) for the command catalog and behavior
11001100
enabled: true,
11011101
intervalMs: 30000,
11021102
minUpdateIntervalMs: 15000,
1103-
exhaustedText: "token exhausted",
11041103
},
11051104
},
11061105
},
11071106
}
11081107
```
11091108

1110-
Auto presence maps runtime availability to Discord status: healthy => online, degraded or unknown => idle, exhausted or unavailable => dnd. Defaults: `intervalMs` 30000, `minUpdateIntervalMs` 15000 (must be less than or equal to `intervalMs`). Optional text overrides:
1111-
1112-
- `autoPresence.healthyText`
1113-
- `autoPresence.degradedText`
1114-
- `autoPresence.exhaustedText` (supports `{reason}` placeholder)
1109+
Auto presence maps runtime availability to Discord status: healthy => online, degraded or unknown => idle, exhausted or unavailable => dnd. Defaults: `intervalMs` 30000, `minUpdateIntervalMs` 15000 (must be less than or equal to `intervalMs`).
11151110

11161111
</Accordion>
11171112

‎docs/channels/slack.md‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -848,7 +848,7 @@ Socket Mode configuration:
848848
{
849849
channels: {
850850
slack: {
851-
identity: "user",
851+
postAs: "user",
852852
userToken: "<xoxp>",
853853
appToken: "<xapp>",
854854
},
@@ -862,7 +862,7 @@ HTTP Request URL configuration:
862862
{
863863
channels: {
864864
slack: {
865-
identity: "user",
865+
postAs: "user",
866866
mode: "http",
867867
userToken: "<xoxp>",
868868
signingSecret: "<signing-secret>",
@@ -1242,7 +1242,7 @@ Status snapshot behavior:
12421242
`userTokenStatus` + `appTokenStatus` for user identity.
12431243

12441244
<Tip>
1245-
For bot identity, actions and directory reads can prefer an optional user token; writes continue to use the bot token unless `userTokenReadOnly: false` allows fallback. For `identity: "user"`, reads and writes always use `userToken`.
1245+
For bot identity, actions and directory reads can prefer an optional user token; writes continue to use the bot token unless `userTokenReadOnly: false` allows fallback. For `postAs: "user"`, reads and writes always use `userToken`.
12461246
</Tip>
12471247

12481248
## Actions and gates

‎docs/channels/twitch.md‎

Lines changed: 25 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,10 @@ For automatic refresh, create your own app at the [Twitch Developer Console](htt
108108
{
109109
channels: {
110110
twitch: {
111+
username: "openclaw",
112+
accessToken: "oauth:abc123...",
113+
clientId: "xyz789...",
114+
channel: "yourchannel",
111115
clientSecret: "your_client_secret",
112116
refreshToken: "your_refresh_token",
113117
},
@@ -164,6 +168,9 @@ Every account entry needs its own `accessToken` (the env var covers only the def
164168
twitch: {
165169
accounts: {
166170
default: {
171+
username: "openclaw",
172+
accessToken: "oauth:abc123...",
173+
channel: "yourchannel",
167174
allowFrom: ["123456789", "987654321"],
168175
},
169176
},
@@ -179,6 +186,9 @@ Every account entry needs its own `accessToken` (the env var covers only the def
179186
twitch: {
180187
accounts: {
181188
default: {
189+
username: "openclaw",
190+
accessToken: "oauth:abc123...",
191+
channel: "yourchannel",
182192
allowedRoles: ["moderator", "vip"],
183193
},
184194
},
@@ -196,6 +206,9 @@ Every account entry needs its own `accessToken` (the env var covers only the def
196206
twitch: {
197207
accounts: {
198208
default: {
209+
username: "openclaw",
210+
accessToken: "oauth:abc123...",
211+
channel: "yourchannel",
199212
requireMention: false,
200213
},
201214
},
@@ -300,8 +313,8 @@ openclaw channels status --probe
300313
### Provider options
301314

302315
- `channels.twitch.enabled` - Enable/disable channel startup
303-
- `channels.twitch.username` / `accessToken` / `clientId` / `channel` - Simplified single-account config (implicit `default` account; takes precedence over `accounts.default`)
304-
- `channels.twitch.accounts.<accountName>` - Multi-account config (all account fields above)
316+
- `channels.twitch.username` / `accessToken` / `clientId` / `channel` - Simplified single-account config with an implicit `default` account
317+
- `channels.twitch.accounts.<accountName>` - Multi-account config (all account fields above); do not combine it with top-level account credentials
305318
- `channels.twitch.defaultAccount` - Which account name is the default
306319
- `channels.twitch.markdown.tables` - Markdown table rendering mode (`off` | `bullets` | `code` | `block`)
307320

@@ -312,14 +325,17 @@ Full example:
312325
channels: {
313326
twitch: {
314327
enabled: true,
315-
username: "openclaw",
316-
accessToken: "oauth:abc123...",
317-
clientId: "xyz789...",
318-
channel: "yourchannel",
319-
clientSecret: "secret123...",
320-
refreshToken: "refresh456...",
321-
allowFrom: ["123456789"],
328+
defaultAccount: "default",
322329
accounts: {
330+
default: {
331+
username: "openclaw",
332+
accessToken: "oauth:abc123...",
333+
clientId: "xyz789...",
334+
channel: "yourchannel",
335+
clientSecret: "secret123...",
336+
refreshToken: "refresh456...",
337+
allowFrom: ["123456789"],
338+
},
323339
second: {
324340
username: "mybot",
325341
accessToken: "oauth:def456...",

‎docs/channels/whatsapp.md‎

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -459,23 +459,18 @@ Per-account override: `channels.whatsapp.accounts.<id>.reactionLevel`.
459459

460460
## Acknowledgment reactions
461461

462-
`channels.whatsapp.ackReaction` sends an immediate reaction on inbound receipt, gated by `reactionLevel` (suppressed when `"off"`):
462+
`messages.ackReaction` sends an immediate reaction on inbound receipt, gated by the active WhatsApp account's `reactionLevel` (suppressed when `"off"`). `messages.ackReactionScope` selects direct messages, groups, or both:
463463

464464
```json5
465465
{
466-
channels: {
467-
whatsapp: {
468-
ackReaction: {
469-
emoji: "👀",
470-
direct: true,
471-
group: "mentions", // always | mentions | never
472-
},
473-
},
466+
messages: {
467+
ackReaction: "👀",
468+
ackReactionScope: "group-mentions", // all | direct | group-all | group-mentions | off
474469
},
475470
}
476471
```
477472

478-
Notes: sent immediately after inbound is accepted (pre-reply); if `ackReaction` is present without `emoji`, WhatsApp uses the routed agent's identity emoji falling back to "👀" (omit `ackReaction` or set `emoji: ""` for no ack); failures are logged but do not block reply delivery; group mode `mentions` reacts only on mention-triggered turns, while group activation `always` bypasses that check; WhatsApp uses `channels.whatsapp.ackReaction` only (legacy `messages.ackReaction` does not apply here).
473+
Notes: the reaction is sent immediately after inbound is accepted (pre-reply); omit `messages.ackReaction` or set it to `""` for no acknowledgment. Failures are logged but do not block reply delivery. The default scope is `"group-mentions"`; use `"all"` for direct messages and all eligible groups.
479474

480475
## Lifecycle status reactions
481476

@@ -491,7 +486,7 @@ Set `messages.statusReactions.enabled: true` to let WhatsApp replace the ack rea
491486
}
492487
```
493488

494-
Notes: `channels.whatsapp.ackReaction` still controls eligibility for direct messages and groups; the queued state uses the same effective emoji as plain ack reactions; WhatsApp has one bot reaction slot per message, so lifecycle updates replace the current reaction in place and restore the ack after the final done/error state.
489+
Notes: `messages.ackReactionScope` still controls eligibility for direct messages and groups; the queued state uses the same effective emoji as plain acknowledgment reactions. WhatsApp has one bot reaction slot per message, so lifecycle updates replace the current reaction in place and restore the acknowledgment after the final done/error state.
495490

496491
## Active-turn typing
497492

@@ -681,10 +676,11 @@ Primary reference: [Configuration reference - WhatsApp](/gateway/config-channels
681676
| Area | Fields |
682677
| ---------------- | -------------------------------------------------------------------------------------------------------------- |
683678
| Access | `dmPolicy`, `allowFrom`, `groupPolicy`, `groupAllowFrom`, `groups` |
684-
| Delivery | `textChunkLimit`, `streaming.chunkMode`, `mediaMaxMb`, `sendReadReceipts`, `ackReaction`, `reactionLevel` |
679+
| Delivery | `textChunkLimit`, `streaming.chunkMode`, `mediaMaxMb`, `sendReadReceipts`, `reactionLevel` |
685680
| Multi-account | `accounts.<id>.enabled`, `accounts.<id>.authDir`, and other per-account overrides |
686681
| Operations | `configWrites`, `enabled` |
687682
| Inbound batching | `messages.inbound.debounceMs`, `messages.inbound.byChannel.whatsapp` |
683+
| Acknowledgments | `messages.ackReaction`, `messages.ackReactionScope` |
688684
| Session behavior | `session.dmScope`, `historyLimit`, `dmHistoryLimit`, `dms.<id>.historyLimit` |
689685
| Prompts | `groups.<id>.systemPrompt`, `groups["*"].systemPrompt`, `direct.<id>.systemPrompt`, `direct["*"].systemPrompt` |
690686

‎docs/channels/zalouser.md‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -159,9 +159,10 @@ Accounts map to `zalouser` profiles in OpenClaw state. Example:
159159
channels: {
160160
zalouser: {
161161
enabled: true,
162-
defaultAccount: "default",
162+
groupPolicy: "allowlist",
163+
defaultAccount: "work",
163164
accounts: {
164-
work: { enabled: true, profile: "work" },
165+
work: { enabled: true, profile: "work", groupPolicy: "allowlist" },
165166
},
166167
},
167168
},

‎docs/cli/acp.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,7 @@ acpx openclaw -s codex-bridge --cwd /path/to/repo \
196196

197197
If you want `acpx openclaw` to target a specific Gateway and session key every time, override the `openclaw` agent command in `~/.acpx/config.json`:
198198

199-
```json
199+
```json validate=false
200200
{
201201
"agents": {
202202
"openclaw": {

‎docs/cli/policy.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ is present under it (unsupported sections or keys fail as
4545
`policy/policy-jsonc-invalid` instead of being silently ignored). Minimal
4646
example covering every supported section:
4747

48-
```jsonc
48+
```jsonc validate=false
4949
{
5050
"channels": {
5151
"denyRules": [

0 commit comments

Comments
 (0)