diff --git a/.openclaw-sync/source.json b/.openclaw-sync/source.json index 0aeade146..0ca5ccf74 100644 --- a/.openclaw-sync/source.json +++ b/.openclaw-sync/source.json @@ -1,5 +1,5 @@ { "repository": "openclaw/openclaw", - "sha": "b85147ff76158c62ad746afd6bb296c94c145653", - "syncedAt": "2026-04-30T15:06:45.629Z" + "sha": "32d429e647a61ae0ddfb1362ec0bd7b1f197cd4d", + "syncedAt": "2026-04-30T15:08:02.469Z" } diff --git a/docs/concepts/messages.md b/docs/concepts/messages.md index adbf5d243..c6ee474b7 100644 --- a/docs/concepts/messages.md +++ b/docs/concepts/messages.md @@ -93,8 +93,11 @@ OpenClaw keeps that boundary explicit: OpenClaw separates the **prompt body** from the **command body**: -- `Body`: prompt text sent to the agent. This may include channel envelopes and - optional history wrappers. +- `BodyForAgent`: primary model-facing text for the current message. Channel + plugins should keep this focused on the sender's current prompt-bearing text. +- `Body`: legacy prompt fallback. This may include channel envelopes and + optional history wrappers, but current channels should not rely on it as the + primary model input when `BodyForAgent` is available. - `CommandBody`: raw user text for directive/command parsing. - `RawBody`: legacy alias for `CommandBody` (kept for compatibility). @@ -114,6 +117,8 @@ already in the session transcript. Directive stripping only applies to the **current message** section so history remains intact. Channels that wrap history should set `CommandBody` (or `RawBody`) to the original message text and keep `Body` as the combined prompt. +Structured history, reply, forwarded, and channel metadata are rendered as +user-role untrusted context blocks during prompt assembly. History buffers are configurable via `messages.groupChat.historyLimit` (global default) and per-channel overrides like `channels.slack.historyLimit` or `channels.telegram.accounts..historyLimit` (set `0` to disable).