Skip to content

Commit 58452de

Browse files
authored
refactor(config): config-surface reduction tranche 1 — retire dead keys, dedupe channel schemas, add growth ratchet (#111142)
* refactor(config): retire dead and aliased config keys via doctor migrations * refactor(config): dedupe bundled channel config schemas into shared builders * feat(config): add config-surface count ratchet to doc-baseline check * test(config): drop stale fixtures for retired config keys * fix(doctor): migrate only positive finite MCP timeout aliases * fix(migrate-hermes): emit canonical MCP timeouts only * fix(config): satisfy lint and contract gates
1 parent 33b5008 commit 58452de

212 files changed

Lines changed: 2780 additions & 3164 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎.gitignore‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -266,8 +266,9 @@ ui/src/ui/__screenshots__
266266
ui/src/ui/views/__screenshots__
267267
ui/.vitest-attachments
268268

269-
# Generated docs baseline artifacts (locally generated, only hashes tracked)
269+
# Generated docs baseline artifacts (locally generated, only drift detectors tracked)
270270
docs/.generated/*.json
271+
!docs/.generated/config-baseline.counts.json
271272
docs/.generated/*.jsonl
272273

273274
# Deprecated changelog fragment workflow

‎docs/.generated/README.md‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ remain local inspection artifacts.
66
**Tracked (committed to git):**
77

88
- `config-baseline.sha256` — hashes of config baseline JSON artifacts.
9+
- `config-baseline.counts.json` — maximum entry counts for each config baseline kind.
910
- `plugin-sdk-api-baseline.sha256` — one hash per Plugin SDK entrypoint.
1011
- `sqlite-session-transcript-schema-baseline.sha256` — hash of the sessions/transcripts SQLite schema baseline.
1112

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"core": 3007,
3+
"channel": 3732,
4+
"plugin": 3537
5+
}
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
53e7eea9a0193d94f5afe8e774456ae71cd3eddf99e5224602fcf13bb845051b config-baseline.json
2-
97c9ec219366ad2fab4d83d5b05eb3ae3df71db68747e7b31cc697a76676c620 config-baseline.core.json
3-
f75efa4f3fa4ac7c2e7dc6580a1dd1efaa8e2e13ec7df9c21838c8ebc44a3dca config-baseline.channel.json
4-
e4f096d6d3c39fefdd1649cab8336b8dfba1f2194eb804fa6126eb25fe2d2b93 config-baseline.plugin.json
1+
2f4ba51e354995c0d28052d7c61210ace881145af0db7f5409f8eb7dff167a4f config-baseline.json
2+
0e9d04a669b853f8b58397d2dfc8913b5a3dd70af20ebd43e25b08be4cd3d292 config-baseline.core.json
3+
c624c55cb46a67db4c836dcc04d295db966579885a00778d1a32241632de3475 config-baseline.channel.json
4+
0e0592b95e4958477e539abd5ccb336c63735c7d69133199953c48ff3c0845a8 config-baseline.plugin.json

‎docs/channels/googlechat.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,7 @@ Notes:
199199
- Group keys must be stable space ids (`spaces/<spaceId>`). Display-name keys are deprecated and logged as such.
200200
- `dangerouslyAllowNameMatching` re-enables mutable email principal matching for allowlists (break-glass compatibility mode); doctor warns about email entries.
201201
- Google Chat reaction actions are not exposed. The plugin uses service-account authentication, while Google Chat reaction endpoints require user authentication. Existing `actions.reactions` config is accepted for compatibility but has no effect.
202-
- Native approval cards use Google Chat `cardsV2` button clicks, not reaction events. Approvers come from `dm.allowFrom` or `defaultTo` and must be stable numeric `users/<id>` values.
202+
- Native approval cards use Google Chat `cardsV2` button clicks, not reaction events. Approvers come from `allowFrom` or `defaultTo` and must be stable numeric `users/<id>` values.
203203
- Message actions expose text `send` only. Google Chat attachment upload requires user authentication, while this plugin uses service-account authentication, so outbound file upload is not exposed.
204204
- `typingIndicator`: `message` (default) posts a `_<Bot> is typing..._` placeholder and edits it into the first reply; `none` disables it; `reaction` requires user OAuth and currently falls back to `message` with a logged error under service-account auth.
205205
- Inbound attachments (first attachment per message) are downloaded through the Chat API into the media pipeline, capped by `mediaMaxMb` (default 20).

‎docs/cli/cron.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,7 @@ Retention behavior:
218218
## Migrating older jobs
219219

220220
<Note>
221-
If you have cron jobs from before the current delivery and store format, run `openclaw doctor --fix`. Doctor normalizes legacy cron fields (`jobId`, `schedule.cron`, top-level delivery fields including legacy `threadId`, payload `provider` delivery aliases) and migrates `notify: true` webhook fallback jobs from `cron.webhook` to explicit webhook delivery. Jobs that already announce to a chat keep that delivery and get a completion webhook destination. When `cron.webhook` is unset, the inert top-level `notify` marker is removed for jobs with no migration target (the existing delivery is preserved unchanged), so `doctor --fix` no longer keeps re-warning about them.
221+
If you have cron jobs from before the current delivery and store format, run `openclaw doctor --fix`. Doctor normalizes legacy cron fields (`jobId`, `schedule.cron`, top-level delivery fields including legacy `threadId`, payload `provider` delivery aliases) and migrates `notify: true` webhook fallback jobs from the retired raw `cron.webhook` value to explicit webhook delivery before removing that config key. Jobs that already announce to a chat keep that delivery and get a completion webhook destination. Without a legacy webhook, the inert top-level `notify` marker is removed for jobs with no migration target (the existing delivery is preserved unchanged), so `doctor --fix` no longer keeps re-warning about them.
222222
</Note>
223223

224224
## Common edits

‎docs/cli/mcp.md‎

Lines changed: 27 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -368,7 +368,7 @@ Those saved definitions are for runtimes that OpenClaw launches or configures la
368368
- `add` builds a definition from flags and probes before saving unless `--no-probe` is set or OAuth authorization is needed first
369369
- runtime adapters decide which transport shapes they actually support at execution time
370370
- `enabled: false` keeps a server saved but excludes it from embedded runtime discovery
371-
- `timeout` and `connectTimeout` set per-server request and connection timeouts in seconds
371+
- `requestTimeoutMs` and `connectionTimeoutMs` set per-server request and connection timeouts in milliseconds
372372
- `supportsParallelToolCalls: true` marks servers that adapters can call concurrently
373373
- HTTP servers can use static headers, OAuth login, TLS verification control, and mTLS certificate/key paths
374374
- embedded OpenClaw exposes configured MCP tools in normal `coding` and `messaging` tool profiles; `minimal` still hides them, and `tools.deny: ["bundle-mcp"]` disables them explicitly
@@ -620,8 +620,8 @@ Example config shape:
620620
"docs": {
621621
"url": "https://mcp.example.com",
622622
"transport": "streamable-http",
623-
"timeout": 20,
624-
"connectTimeout": 5,
623+
"requestTimeoutMs": 20000,
624+
"connectionTimeoutMs": 5000,
625625
"supportsParallelToolCalls": true,
626626
"auth": "oauth",
627627
"oauth": {
@@ -663,17 +663,16 @@ If your MCP server genuinely needs one of the blocked variables, set it on the g
663663

664664
Connects to a remote MCP server over HTTP Server-Sent Events.
665665

666-
| Field | Description |
667-
| ------------------------------ | ---------------------------------------------------------------- |
668-
| `url` | HTTP or HTTPS URL of the remote server (required) |
669-
| `headers` | Optional key-value map of HTTP headers (for example auth tokens) |
670-
| `connectionTimeoutMs` | Per-server connection timeout in ms (optional) |
671-
| `connectTimeout` | Per-server connection timeout in seconds (optional) |
672-
| `timeout` / `requestTimeoutMs` | Per-server MCP request timeout in seconds or ms |
673-
| `auth: "oauth"` | Use MCP OAuth credentials saved by `openclaw mcp login` |
674-
| `sslVerify` | Set false only for explicitly trusted private HTTPS endpoints |
675-
| `clientCert` / `clientKey` | mTLS client certificate and key paths |
676-
| `supportsParallelToolCalls` | Hint that concurrent calls are safe for this server |
666+
| Field | Description |
667+
| --------------------------- | ---------------------------------------------------------------- |
668+
| `url` | HTTP or HTTPS URL of the remote server (required) |
669+
| `headers` | Optional key-value map of HTTP headers (for example auth tokens) |
670+
| `connectionTimeoutMs` | Per-server connection timeout in ms (optional) |
671+
| `requestTimeoutMs` | Per-server MCP request timeout in milliseconds |
672+
| `auth: "oauth"` | Use MCP OAuth credentials saved by `openclaw mcp login` |
673+
| `sslVerify` | Set false only for explicitly trusted private HTTPS endpoints |
674+
| `clientCert` / `clientKey` | mTLS client certificate and key paths |
675+
| `supportsParallelToolCalls` | Hint that concurrent calls are safe for this server |
677676

678677
Example:
679678

@@ -684,7 +683,7 @@ Example:
684683
"remote-tools": {
685684
"url": "https://mcp.example.com",
686685
"auth": "oauth",
687-
"timeout": 20,
686+
"requestTimeoutMs": 20000,
688687
"headers": {
689688
"Authorization": "Bearer <token>"
690689
}
@@ -768,18 +767,17 @@ If the provider rotates tokens or the authorization state gets stuck, run `openc
768767

769768
`streamable-http` is an additional transport option alongside `sse` and `stdio`. It uses HTTP streaming for bidirectional communication with remote MCP servers.
770769

771-
| Field | Description |
772-
| ------------------------------ | -------------------------------------------------------------------------------------- |
773-
| `url` | HTTP or HTTPS URL of the remote server (required) |
774-
| `transport` | Set to `"streamable-http"` to select this transport; when omitted, OpenClaw uses `sse` |
775-
| `headers` | Optional key-value map of HTTP headers (for example auth tokens) |
776-
| `connectionTimeoutMs` | Per-server connection timeout in ms (optional) |
777-
| `connectTimeout` | Per-server connection timeout in seconds (optional) |
778-
| `timeout` / `requestTimeoutMs` | Per-server MCP request timeout in seconds or ms |
779-
| `auth: "oauth"` | Use MCP OAuth credentials saved by `openclaw mcp login` |
780-
| `sslVerify` | Set false only for explicitly trusted private HTTPS endpoints |
781-
| `clientCert` / `clientKey` | mTLS client certificate and key paths |
782-
| `supportsParallelToolCalls` | Hint that concurrent calls are safe for this server |
770+
| Field | Description |
771+
| --------------------------- | -------------------------------------------------------------------------------------- |
772+
| `url` | HTTP or HTTPS URL of the remote server (required) |
773+
| `transport` | Set to `"streamable-http"` to select this transport; when omitted, OpenClaw uses `sse` |
774+
| `headers` | Optional key-value map of HTTP headers (for example auth tokens) |
775+
| `connectionTimeoutMs` | Per-server connection timeout in ms (optional) |
776+
| `requestTimeoutMs` | Per-server MCP request timeout in milliseconds |
777+
| `auth: "oauth"` | Use MCP OAuth credentials saved by `openclaw mcp login` |
778+
| `sslVerify` | Set false only for explicitly trusted private HTTPS endpoints |
779+
| `clientCert` / `clientKey` | mTLS client certificate and key paths |
780+
| `supportsParallelToolCalls` | Hint that concurrent calls are safe for this server |
783781

784782
OpenClaw config uses `transport: "streamable-http"` as the canonical spelling. CLI-native MCP `type: "http"` values are accepted when saved through `openclaw mcp set` and repaired by `openclaw doctor --fix` in existing config, but `transport` is what embedded OpenClaw consumes directly.
785783

@@ -792,8 +790,8 @@ Example:
792790
"streaming-tools": {
793791
"url": "https://mcp.example.com/stream",
794792
"transport": "streamable-http",
795-
"connectTimeout": 10,
796-
"timeout": 30,
793+
"connectionTimeoutMs": 10000,
794+
"requestTimeoutMs": 30000,
797795
"headers": {
798796
"Authorization": "Bearer <token>"
799797
}

‎docs/cli/tui.md‎

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,9 +45,6 @@ Aliases: `openclaw chat` and `openclaw terminal` invoke this command with
4545
- Launched from inside a configured agent workspace directory, TUI auto-selects
4646
that agent for the session key default (unless `--session` is explicitly
4747
`agent:<id>:...`).
48-
- To show the Gateway hostname in the footer for non-local URL-backed
49-
connections, run `openclaw config set tui.footer.showRemoteHost true`. Off by
50-
default; never shown for loopback or embedded local connections.
5148
- Local mode uses the embedded agent runtime directly. Most local tools work,
5249
but Gateway-only features are unavailable.
5350
- Local mode adds `/auth [provider]` to the TUI command surface.

‎docs/gateway/config-agents.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1433,7 +1433,7 @@ Batches rapid text-only messages from the same sender into a single agent turn.
14331433

14341434
### Other message keys
14351435

1436-
- `messages.messagePrefix`: prefix text prepended to inbound user messages before they reach the agent runtime. Use sparingly for channel context markers.
1436+
- `channels.whatsapp.messagePrefix`: WhatsApp-only prefix prepended to inbound user messages before they reach the agent runtime.
14371437
- `messages.visibleReplies`: controls visible source replies across direct, group, and channel conversations (`"message_tool"` requires `message(action=send)` for visible output; `"automatic"` posts normal replies as before).
14381438
- `messages.usageTemplate` / `messages.responseUsage`: custom `/usage` footer template and default per-reply usage mode (`off | tokens | full`, plus legacy `on` alias for `tokens`).
14391439
- `messages.groupChat.mentionPatterns` / `historyLimit`: group-message mention triggers and history window sizing.

‎docs/gateway/config-tools.md‎

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -318,9 +318,6 @@ Configures inbound media understanding (image/audio/video):
318318
tools: {
319319
media: {
320320
concurrency: 2,
321-
asyncCompletion: {
322-
directSend: false, // deprecated: completions stay agent-mediated
323-
},
324321
audio: {
325322
enabled: true,
326323
maxBytes: 20971520,
@@ -372,10 +369,6 @@ Configures inbound media understanding (image/audio/video):
372369

373370
Provider auth follows standard order: `auth-profiles.json` → env vars → `models.providers.*.apiKey`.
374371

375-
**Async completion fields:**
376-
377-
- `asyncCompletion.directSend`: deprecated compatibility flag. Completed async media tasks stay requester-session mediated so the agent receives the result, decides how to tell the user, and uses the message tool when source delivery requires it.
378-
379372
</Accordion>
380373
</AccordionGroup>
381374

0 commit comments

Comments
 (0)