docs: MCP + cron + plugin lifecycle plus channel env-block cross-links · openclaw/openclaw@91c795c
vincentkoc
·
2026-04-23
·
via Recent Commits to openclaw:main
| Original file line number | Diff line number | Diff line change |
|---|
@@ -90,6 +90,8 @@ This fires ~5–6 times per month instead of 0–1 times per month. OpenClaw use
|
90 | 90 | |
91 | 91 | For isolated jobs, runtime teardown now includes best-effort browser cleanup for that cron session. Cleanup failures are ignored so the actual cron result still wins. |
92 | 92 | |
| 93 | +Isolated cron runs also dispose any bundled MCP runtime instances created for the job through the shared runtime-cleanup path. This matches how main-session and custom-session MCP clients are torn down, so isolated cron jobs do not leak stdio child processes or long-lived MCP connections across runs. |
| 94 | + |
93 | 95 | When isolated cron runs orchestrate subagents, delivery also prefers the final |
94 | 96 | descendant output over stale parent interim text. If descendants are still |
95 | 97 | running, OpenClaw suppresses that partial parent update instead of announcing it. |
|
| Original file line number | Diff line number | Diff line change |
|---|
@@ -237,6 +237,14 @@ Default account supports:
|
237 | 237 | - `IRC_NICKSERV_PASSWORD` |
238 | 238 | - `IRC_NICKSERV_REGISTER_EMAIL` |
239 | 239 | |
| 240 | +<Note> |
| 241 | +`IRC_HOST` is on the endpoint-block list and cannot be set from a workspace |
| 242 | +`.env` file. It must come from shell environment or the gateway process |
| 243 | +environment so that untrusted workspaces cannot redirect IRC traffic to a |
| 244 | +different server. See [Workspace `.env` files](/gateway/security) for the full |
| 245 | +list. |
| 246 | +</Note> |
| 247 | + |
240 | 248 | ## Troubleshooting |
241 | 249 | |
242 | 250 | - If the bot connects but never replies in channels, verify `channels.irc.groups` **and** whether mention-gating is dropping messages (`missing-mention`). If you want it to reply without pings, set `requireMention:false` for the channel. |
|
| Original file line number | Diff line number | Diff line change |
|---|
@@ -179,6 +179,14 @@ For example, `-` becomes `_X2D_`, so `ops-prod` maps to `MATRIX_OPS_X2D_PROD_*`.
|
179 | 179 | |
180 | 180 | The interactive wizard only offers the env-var shortcut when those auth env vars are already present and the selected account does not already have Matrix auth saved in config. |
181 | 181 | |
| 182 | +<Note> |
| 183 | +`MATRIX_HOMESERVER` is on the endpoint-block list and cannot be set from a |
| 184 | +workspace `.env` file. It must come from shell environment or the gateway |
| 185 | +process environment so that untrusted workspaces cannot redirect Matrix |
| 186 | +traffic to a different homeserver. See |
| 187 | +[Workspace `.env` files](/gateway/security) for the full list. |
| 188 | +</Note> |
| 189 | + |
182 | 190 | ## Configuration example |
183 | 191 | |
184 | 192 | This is a practical baseline config with DM pairing, room allowlist, and E2EE enabled: |
|
| Original file line number | Diff line number | Diff line change |
|---|
@@ -109,6 +109,14 @@ Set these on the gateway host if you prefer env vars:
|
109 | 109 | |
110 | 110 | Env vars apply only to the **default** account (`default`). Other accounts must use config values. |
111 | 111 | |
| 112 | +<Note> |
| 113 | +`MATTERMOST_URL` is on the endpoint-block list and cannot be set from a |
| 114 | +workspace `.env` file. It must come from shell environment or the gateway |
| 115 | +process environment so that untrusted workspaces cannot redirect Mattermost |
| 116 | +traffic to a different server. See |
| 117 | +[Workspace `.env` files](/gateway/security) for the full list. |
| 118 | +</Note> |
| 119 | + |
112 | 120 | ## Chat modes |
113 | 121 | |
114 | 122 | Mattermost responds to DMs automatically. Channel behavior is controlled by `chatmode`: |
|
| Original file line number | Diff line number | Diff line change |
|---|
@@ -89,6 +89,14 @@ For the default account, you can use env vars:
|
89 | 89 | |
90 | 90 | Config values override env vars. |
91 | 91 | |
| 92 | +<Note> |
| 93 | +`SYNOLOGY_CHAT_INCOMING_URL` is on the endpoint-block list and cannot be set |
| 94 | +from a workspace `.env` file. It must come from shell environment or the |
| 95 | +gateway process environment so that untrusted workspaces cannot redirect |
| 96 | +Synology Chat traffic to a different webhook. See |
| 97 | +[Workspace `.env` files](/gateway/security) for the full list. |
| 98 | +</Note> |
| 99 | + |
92 | 100 | ## DM policy and access control |
93 | 101 | |
94 | 102 | - `dmPolicy: "allowlist"` is the recommended default. |
|
| Original file line number | Diff line number | Diff line change |
|---|
@@ -63,6 +63,12 @@ Important behavior:
|
63 | 63 | - older transcript history is read with `messages_read` |
64 | 64 | - Claude push notifications only exist while the MCP session is alive |
65 | 65 | - when the client disconnects, the bridge exits and the live queue is gone |
| 66 | +- stdio MCP servers launched by OpenClaw (bundled or user-configured) are torn |
| 67 | + down as a process tree on shutdown, so child subprocesses started by the |
| 68 | + server do not survive after the parent stdio client exits |
| 69 | +- deleting or resetting a session disposes that session's MCP clients through |
| 70 | + the shared runtime cleanup path, so there are no lingering stdio connections |
| 71 | + tied to a removed session |
66 | 72 | |
67 | 73 | ## Choose a client mode |
68 | 74 | |
|
| Original file line number | Diff line number | Diff line change |
|---|
@@ -478,6 +478,10 @@ Important trust note:
|
478 | 478 | - A workspace plugin with the same id as a bundled plugin intentionally shadows |
479 | 479 | the bundled copy when that workspace plugin is enabled/allowlisted. |
480 | 480 | - This is normal and useful for local development, patch testing, and hotfixes. |
| 481 | +- Bundled-plugin trust is resolved from the source snapshot — the manifest and |
| 482 | + code on disk at load time — rather than from install metadata. A corrupted |
| 483 | + or substituted install record cannot silently widen a bundled plugin's trust |
| 484 | + surface beyond what the actual source claims. |
481 | 485 | |
482 | 486 | ## Export boundary |
483 | 487 | |
@@ -507,7 +511,9 @@ At startup, OpenClaw does roughly this:
|
507 | 511 | 4. normalize plugin config (`plugins.enabled`, `allow`, `deny`, `entries`, |
508 | 512 | `slots`, `load.paths`) |
509 | 513 | 5. decide enablement for each candidate |
510 | | -6. load enabled native modules via jiti |
| 514 | +6. load enabled native modules — built `dist/*` bundled modules go through a |
| 515 | + native loader path, while non-built native plugin modules are loaded via |
| 516 | + jiti |
511 | 517 | 7. call native `register(api)` (or `activate(api)` — a legacy alias) hooks and collect registrations into the plugin registry |
512 | 518 | 8. expose the registry to commands/runtime surfaces |
513 | 519 | |
|
| Original file line number | Diff line number | Diff line change |
|---|
@@ -254,6 +254,18 @@ OpenClaw checks for native plugin format first:
|
254 | 254 | If a directory contains both, OpenClaw uses the native path. This prevents |
255 | 255 | dual-format packages from being partially installed as bundles. |
256 | 256 | |
| 257 | +## Runtime dependencies and cleanup |
| 258 | + |
| 259 | +- Bundled plugin runtime dependencies ship inside the OpenClaw package under |
| 260 | +`dist/*`. OpenClaw does **not** run `npm install` at startup for bundled |
| 261 | + plugins; the release pipeline is responsible for shipping a complete bundled |
| 262 | + dependency payload (see the postpublish verification rule in |
| 263 | +[Releasing](/reference/RELEASING)). |
| 264 | +- Sub-agent runs that launch bundled MCP servers dispose those MCP clients |
| 265 | + through the shared runtime-cleanup path when the sub-agent exits, so |
| 266 | + sub-agent lifecycles do not leak stdio child processes or long-lived MCP |
| 267 | + connections across turns. |
| 268 | + |
257 | 269 | ## Security |
258 | 270 | |
259 | 271 | Bundles have a narrower trust boundary than native plugins: |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。