Skip to content

Commit edecdbd

Browse files
authored
refactor(config): config-surface reduction tranche 3 — product consolidations (review request) (#111527)
* refactor(config): consolidate media model lists * refactor(config): unify memory configuration * refactor(config): consolidate TTS ownership * refactor(config): move typing policy to agents * refactor(config): retire product-level config surfaces * refactor(config): share scoped tool policy type * chore(config): refresh generated baselines * fix(config): honor agent typing overrides * fix(config): migrate sibling config consumers * refactor(infra): keep base64url decoder private * fix(config): strip invalid legacy TTS values * chore(config): refresh rebased baseline hash * fix(doctor): route legacy messages.tts.realtime voice to talk during tts move * refactor(config): polish final layout names * refactor(config): freeze retired tuning defaults * feat(config): add fast mode default symmetry * refactor(config): key agent entries by id * docs(config): update final layout reference * test(config): cover final layout migrations * chore(config): refresh final layout baselines * fix(config): align final layout runtime readers * fix(config): align remaining readers * fix(config): stabilize final layout migrations * fix(config): finalize config projection proof * fix(config): address final layout review * docs(release): preserve historical config names * fix(config): complete keyed agent migration * fix(config): close final migration gaps * fix(config): finish full-branch review * fix(config): complete runtime secret detection * fix(config): close final review findings * fix(config): finish canonical docs and heartbeat migration * fix(config): integrate latest main after rebase * refactor(env): isolate test-only controls * refactor(env): isolate build and development controls * refactor(env): collapse process identity indirection * refactor(env): remove duplicate config and temp aliases * docs(env): define the operator-facing allowlist * ci(env): ratchet production variable count * fix(env): remove stale provider helper import * fix(env): make ratchet sorting explicit * test(env): keep test seam in dead-code audit * test(env): cover ratchet growth and boundary; document surface budgets * docs(config): document tier-eval consolidations * docs(config): clarify speech preference ownership * test(memory): align retired tuning fixtures * refactor(memory): freeze engine heuristics * refactor(config): apply tier-eval tranche * refactor(tts): move persona shaping to providers * refactor(compaction): move prompt policy to providers * test(config): align hookified prompt fixtures * chore(deadcode): classify test-only exports * chore(github): remove unused spawn helper * chore(deadcode): classify queue diagnostics * chore(deadcode): remove unused lane snapshot export * chore(plugin-sdk): ratchet consolidated surface * fix(config): integrate latest main after rebase
1 parent 8ecb609 commit edecdbd

1,097 files changed

Lines changed: 13708 additions & 14555 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.

‎.agents/skills/openclaw-secret-scanning-maintainer/scripts/secret-scanning.mjs‎

Lines changed: 18 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import fs from "node:fs";
99
import os from "node:os";
1010
import path from "node:path";
1111
import { pathToFileURL } from "node:url";
12-
import { spawnPlainGh } from "../../../../scripts/lib/plain-gh.mjs";
12+
import { execPlainGh } from "../../../../scripts/lib/plain-gh.mjs";
1313

1414
const REPO = "openclaw/openclaw";
1515
const REPO_URL = `https://github.com/${REPO}`;
@@ -29,25 +29,30 @@ function tmpFile(purpose) {
2929
}
3030

3131
function gh(args, { json = true, allowFailure = false } = {}) {
32-
const proc = spawnPlainGh(args, { encoding: "utf8", maxBuffer: 10 * 1024 * 1024 });
33-
if (proc.status !== 0 && !allowFailure) {
34-
fail(`gh ${args.slice(0, 3).join(" ")} failed:\n${(proc.stderr || proc.stdout || "").trim()}`);
35-
}
36-
if (proc.status !== 0) {
37-
return {
32+
let stdout;
33+
try {
34+
stdout = execPlainGh(args, { encoding: "utf8", maxBuffer: 10 * 1024 * 1024 });
35+
} catch (error) {
36+
const failure = {
3837
gh_failed: true,
39-
status: proc.status,
40-
stdout: proc.stdout,
41-
stderr: proc.stderr,
38+
status: error?.status ?? 1,
39+
stdout: String(error?.stdout ?? ""),
40+
stderr: String(error?.stderr ?? ""),
4241
};
42+
if (!allowFailure) {
43+
fail(
44+
`gh ${args.slice(0, 3).join(" ")} failed:\n${(failure.stderr || failure.stdout).trim()}`,
45+
);
46+
}
47+
return failure;
4348
}
4449
if (!json) {
45-
return proc.stdout;
50+
return stdout;
4651
}
4752
try {
48-
return JSON.parse(proc.stdout);
53+
return JSON.parse(stdout);
4954
} catch {
50-
return proc.stdout;
55+
return stdout;
5156
}
5257
}
5358

‎config/env-var-count-budget.txt‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Distinct OPENCLAW_* names in production source under src, packages, and extensions.
2+
# Ratchet: lower this number when cleanup removes names; never raise it.
3+
530

‎config/knip.config.ts‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -357,13 +357,20 @@ const config = {
357357
"src/boards/board-layout.ts": ["types"],
358358
"src/boards/board-notices.ts": ["exports"],
359359
"src/boards/board-store.ts": ["exports"],
360+
// Test and E2E callers reach these hooks through runtime.test-support.ts;
361+
// the full-tree companion config still audits their actual consumers.
362+
"src/commitments/runtime.ts": ["exports"],
360363
"src/gateway/board-view-ticket.ts": ["exports"],
361364
// GatewayBoardProvider and boardExists are constructed/asserted by the
362365
// focused Control UI provider tests, not by a separate production module.
363366
"ui/src/lib/board/provider.ts": ["exports"],
364367
// Greeting cache/fact contracts (hash, alert text, store shapes) are
365368
// asserted by the focused greeting unit tests, not by another prod module.
366369
"src/system-agent/greeting.ts": ["exports", "types"],
370+
// Focused tests consume these diagnostic/test seams; production code uses
371+
// the surrounding runtime helpers rather than importing the exports.
372+
"extensions/signal/src/setup-core.ts": ["exports"],
373+
"src/infra/heartbeat-wake.ts": ["exports"],
367374
},
368375
workspaces: {
369376
".": {
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"core": 2851,
3-
"channel": 3680,
4-
"plugin": 3537
2+
"core": 2351,
3+
"channel": 3627,
4+
"plugin": 3556
55
}
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
a8e315e49d62b95c54c752041cc27628260686f0a99de646c24505edc977a3c3 config-baseline.json
2-
d3da432d372bc652d432be978495a9f28b3478da1034cbe888550c8bf6cb9dd4 config-baseline.core.json
3-
dbf05e8852c873d48288336dbbb05d7a7b3a1bcbee8cb8ece5e40f204d2ab9db config-baseline.channel.json
4-
0e0592b95e4958477e539abd5ccb336c63735c7d69133199953c48ff3c0845a8 config-baseline.plugin.json
1+
efd6e8ac56ba46833230deef3552065b6e5588d4ac28efe856332e0e56eb2668 config-baseline.json
2+
dbf9485e8f4bb6ac112ef1a9cd71941abd00cd9593c8094dfa1c16517456017e config-baseline.core.json
3+
0ab331946d642d2e1ebf69033f0a79ffad53472ecccf4b7cc96211bea79f3788 config-baseline.channel.json
4+
fab3420186223207228066225cf4577702fdcbaf40ba0c35f8315d24019acbc4 config-baseline.plugin.json

‎docs/.generated/plugin-sdk-api-baseline.sha256‎

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ c97dd36cdf8f83c2893c33e9430a93cd131a03d855725783ca5b545de0cf84f8 module/channel
3636
e2b4d1923a19b927e912622576d43d20a6e188c124a7bc588fe567cd3c1c924e module/channel-outbound
3737
50c61de5d522abadcae79841335aeac25e3791e6dbb0cfc3d64b2720a8c514ce module/channel-pairing
3838
ee4292b069d4d48cce4fc2dc26df5b5c87eb1fa4769f1f6be9a10c3e1221e1a9 module/channel-plugin-common
39-
bb82ca1819308189c4ba7b1e83e0c39fb0fb8b5a7081ee874480d64426778454 module/channel-policy
39+
01b95b0b8aca5005594969f0df221111a76be454b70102e4b452051c87b6c179 module/channel-policy
4040
cc0a77137b304b27a313791aa30e43efb4acc254da7590bd47493d81e7104fba module/channel-reply-pipeline
4141
bba5540be7cf9613a163663decdb2affe2af9bbd3ad7914989ab186f9c2abec1 module/channel-runtime-context
4242
17cec26bc71fc43a066049ef63f95bf29737113c26ab13689ceff602b9aa11d6 module/channel-secret-basic-runtime
@@ -51,16 +51,16 @@ c89ec1b194b76f67a6f4dd108dccf460da6065646cba31374c8aa748f23a39e4 module/collect
5151
fa2df02bede6ed8843e5c2bd605c6ea5cd20313c305593fbd371dba6f1b931c3 module/command-detection
5252
28a0cae8dee664aef14b1a64c86a46d0fb5637cf9f671790d4fc9ba205e42820 module/command-primitives-runtime
5353
eb4c757fe0086c1dbfa4c3f3caf3dcff0d3cab3924c608237f08f740a6ee5f59 module/command-status
54-
235a9e4d983042c3db156efcab0e333984cbbf13ebdfcc44a3a5ab40cf3edb4f module/config-contracts
54+
0ef109bca0630cab8578b6d1ad1eb0f92e76dc3995f4a180e34f03212d42f1e0 module/config-contracts
5555
20f3f8042de53e4eee61b64de9102c8c202b9299e6a29235647a4729f70145f2 module/config-mutation
56-
6f23fd2d777f7189c38b34a51c6899abdad4ee4e6d74458eb3183c8ce03b8677 module/config-runtime
56+
189fa5a240cad0404cd281ad0a14a105a8f3231278d87b71cfbc4f96fb8e48ef module/config-runtime
5757
c1ea9510dfda047609a99d5d2cd1f1560f5d469a36e6b695766213d695c25b0f module/conversation-runtime
5858
d9267aacc65aeebf0046d4eef691e5a510764063e6c7942b1d6bc7a282ca67a1 module/core
5959
4af19d59c2f18674e7d7f7dc1b358b644dc707e6bd601dc47168bd9e4a669940 module/dedupe-runtime
6060
f70c93d28053ca2e8353e45e6515ce7acef188097c6117d1545965d0699c8004 module/device-bootstrap
6161
6215d3af5923bf5a616d73062534968b69f448e3e30adc64ae9caebdd1a46d71 module/diagnostic-runtime
6262
ea81ef06956c1bc0853fa00afbbc2b5a4019116aaf8a436e1b27d06f7a2c9e88 module/directory-runtime
63-
c7c9119cd43e2ed2eed4fe8bd57a6b75d2ee9a1f7926c432634c49b54ff7f9a6 module/discord
63+
2cf82472e3e7645fabc581b4531c91732374f6844969e763683401728f284c88 module/discord
6464
46c05a90b66032d1d7ad08445840a4bf81aa2bd325348f87710ad4538daf38f6 module/error-runtime
6565
b013053a61e7d9be3d0c683c02baf57fa7e4393ec54e0df6a46ab0f2fe2348fd module/extension-shared
6666
ceacad83db01c66e7be6aa21a291597020f13f737b697690eae7d47098e6499a module/gateway-method-runtime
@@ -70,7 +70,7 @@ ceacad83db01c66e7be6aa21a291597020f13f737b697690eae7d47098e6499a module/gateway
7070
182dc685f2103ff66c1a4839a48f4f40d2eeb0070cd74e449b47aacc4e6f1c22 module/hook-runtime
7171
f6e3c44e7d1090a97aca554a3c247219b8de78b3cb4399cac5efde8a0a6c1156 module/inbound-envelope
7272
67142e8e63ea860a03b0cbb5660f63405a83ec575f2ef7a96f9b87f1be362808 module/inbound-reply-dispatch
73-
841de925321fbc69c8dcc1beed2468dfcd5f28cc38a8aad6fcde20d85158a985 module/infra-runtime
73+
e6abca6089332c08bdbb049a41d258bd0aedb0dacb5757b5833d67af67aa3117 module/infra-runtime
7474
2e717cccb3db127aed0287d4ea14c41a8e64e46d60c728638153e31e2fb0d296 module/ingress-effect-once
7575
74fee62a94618d830a5282a7816a73b85570b2e4ce17b90078078734510511d7 module/interactive-runtime
7676
9dd66baf2def46386ad4706380e57f9068fa9bb3878be2d9ba961ec2f46d3d87 module/json-store
@@ -83,7 +83,7 @@ a5f59c9acbcaa3f82247bf806eb5ba08032373fb853719f0ec9457690f16fc70 module/media-m
8383
c5e3eb1a584f4b8126d9d6c177a840ec9103671e8d1242634ee67db9b5b9e573 module/media-understanding
8484
c0ffaed532578cf33493992e1ff806b2268b8e3774a92edbaede5cf5bda162a6 module/media-understanding-runtime
8585
075b7a2783cf22c3210cfce630b815c2e3b7e85c1f5606f0dde4730d47242365 module/meeting-runtime
86-
4205ab767b79e740c7c7137079b19b315c85f7f8c748592840f00bbf70a71709 module/memory-core-host-engine-foundation
86+
d09ddb38c9d20a41fcf4cedaf6a2c28eb5333a9fba2287e34b458fa5caba751c module/memory-core-host-engine-foundation
8787
646773d8282a2ac6a89101685c406200935ddb3459a2830e820da132fa433b3c module/memory-host-core
8888
87b7a3206346c0d4b294fb3a2395cbaabc3e73ff8b1b9ea925bc3aade3e52687 module/messaging-targets
8989
09f842a2787b87117d88ba6545aa0441ff8afdb85e2e66ae4d1838ebecb16148 module/model-session-runtime

‎docs/automation/index.md‎

Lines changed: 3 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,13 @@ doc-schema-version: 1
33
summary: "Overview of automation mechanisms: tasks, cron, hooks, standing orders, and Task Flow"
44
read_when:
55
- Deciding how to automate work with OpenClaw
6-
- Choosing between heartbeat, cron, commitments, hooks, and standing orders
6+
- Choosing between heartbeat, cron, hooks, and standing orders
77
- Looking for the right automation entry point
88
title: "Automation"
99
---
1010

11-
OpenClaw runs work in the background through tasks, scheduled jobs, inferred
12-
commitments, event hooks, and standing instructions. Use this page to pick the
13-
right mechanism.
11+
OpenClaw runs work in the background through tasks, scheduled jobs, event hooks,
12+
and standing instructions. Use this page to pick the right mechanism.
1413

1514
## Quick decision guide
1615

@@ -21,7 +20,6 @@ flowchart TD
2120
START --> Q3{Orchestrate multi-step flows?}
2221
START --> Q4{React to lifecycle events?}
2322
START --> Q5{Give the agent persistent instructions?}
24-
START --> Q6{Remember a natural follow-up?}
2523
2624
Q1 -->|Yes| Q1a{Exact timing or flexible?}
2725
Q1a -->|Exact| CRON["Scheduled Tasks (Cron)"]
@@ -31,7 +29,6 @@ flowchart TD
3129
Q3 -->|Yes| FLOW[Task Flow]
3230
Q4 -->|Yes| HOOKS[Hooks]
3331
Q5 -->|Yes| SO[Standing Orders]
34-
Q6 -->|Yes| COMMITMENTS[Inferred Commitments]
3532
```
3633

3734
| Use case | Recommended | Why |
@@ -41,8 +38,6 @@ flowchart TD
4138
| Run weekly deep analysis | Scheduled Tasks (Cron) | Standalone task, can use different model |
4239
| Check inbox every 30 min | Heartbeat | Batches with other checks, context-aware |
4340
| Monitor calendar for upcoming events | Heartbeat | Natural fit for periodic awareness |
44-
| Check in after a mentioned interview | Inferred Commitments | Memory-like follow-up, no exact reminder request |
45-
| Gentle care check-in after user context | Inferred Commitments | Scoped to the same agent and channel |
4641
| Inspect status of a subagent or ACP run | Background Tasks | Tasks ledger tracks all detached work |
4742
| Audit what ran and when | Background Tasks | `openclaw tasks list` and `openclaw tasks audit` |
4843
| Multi-step research then summarize | Task Flow | Durable orchestration with revision tracking |
@@ -76,15 +71,6 @@ The background task ledger tracks all detached work: ACP runs, subagent spawns,
7671

7772
See [Background Tasks](/automation/tasks).
7873

79-
### Inferred commitments
80-
81-
Commitments are opt-in, short-lived follow-up memories. OpenClaw infers them
82-
from normal conversations, scopes them to the same agent and channel, and
83-
delivers due check-ins through heartbeat. Exact user-requested reminders still
84-
belong to cron.
85-
86-
See [Inferred Commitments](/concepts/commitments).
87-
8874
### Task Flow
8975

9076
Task Flow is the flow orchestration substrate above background tasks. It manages durable multi-step flows with managed and mirrored sync modes, revision tracking, and `openclaw tasks flow list|show|cancel` for inspection.
@@ -125,7 +111,6 @@ See [Heartbeat](/gateway/heartbeat).
125111
## Related
126112

127113
- [Scheduled Tasks](/automation/cron-jobs) — precise scheduling and one-shot reminders
128-
- [Inferred Commitments](/concepts/commitments) — memory-like follow-up check-ins
129114
- [Background Tasks](/automation/tasks) — task ledger for all detached work
130115
- [Task Flow](/automation/taskflow) — durable multi-step flow orchestration
131116
- [Hooks](/automation/hooks) — event-driven lifecycle scripts

‎docs/channels/ambient-room-events.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ Use an agent override when several agents share the same room but only one shoul
173173
}
174174
```
175175

176-
The agent-specific `agents.list[].groupChat.unmentionedInbound` value overrides `messages.groupChat.unmentionedInbound` for that agent.
176+
The agent-specific `agents.entries.*.groupChat.unmentionedInbound` value overrides `messages.groupChat.unmentionedInbound` for that agent.
177177

178178
## Visible reply modes
179179

‎docs/channels/broadcast-groups.md‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ Add a top-level `broadcast` section (next to `bindings`). Keys are WhatsApp peer
3939

4040
**Result:** when OpenClaw would reply in this chat, it runs all three agents.
4141

42-
Every listed agent id must exist in `agents.list`: config validation reports unknown ids, and the runtime skips them with a `Broadcast agent <id> not found in agents.list; skipping` warning.
42+
Every listed agent id must exist in `agents.entries`: config validation reports unknown ids, and the runtime skips them with a `Broadcast agent <id> not found in agents.entries; skipping` warning.
4343

4444
### Processing strategy
4545

@@ -247,7 +247,7 @@ Broadcast groups work alongside existing routing:
247247
<Accordion title="Agents not responding">
248248
**Check:**
249249

250-
1. Agent IDs exist in `agents.list` (config validation rejects unknown ids).
250+
1. Agent IDs exist in `agents.entries` (config validation rejects unknown ids).
251251
2. Peer ID format is correct (group JID like `[email protected]`, or E.164 like `+15551234567` for DMs).
252252
3. The message passed normal gating (mention/activation rules still apply).
253253

‎docs/channels/channel-routing.md‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ Routing picks **one agent** for each inbound message:
9090
6. **Team match** (Slack) via `teamId`.
9191
7. **Account match** (`accountId` on the channel).
9292
8. **Channel match** (any account on that channel, `accountId: "*"`).
93-
9. **Default agent** (`agents.list[].default`, else first list entry, fallback to `main`).
93+
9. **Default agent** (`agents.entries.*.default`, else first list entry, fallback to `main`).
9494

9595
When a binding includes multiple match fields (`peer`, `guildId`, `teamId`, `roles`), **all provided fields must match** for that binding to apply.
9696

@@ -116,7 +116,7 @@ See: [Broadcast Groups](/channels/broadcast-groups).
116116

117117
## Config overview
118118

119-
- `agents.list`: named agent definitions (workspace, model, etc.).
119+
- `agents.entries`: named agent definitions (workspace, model, etc.).
120120
- `bindings`: map inbound channels/accounts/peers to agents.
121121

122122
Example:

0 commit comments

Comments
 (0)