diff --git a/src/agents/cli-runner/prepare.test.ts b/src/agents/cli-runner/prepare.test.ts index ae44b9cd297..650629a1c67 100644 --- a/src/agents/cli-runner/prepare.test.ts +++ b/src/agents/cli-runner/prepare.test.ts @@ -95,6 +95,7 @@ function createTestMcpLoopbackServerConfig(port: number) { "x-openclaw-account-id": "${OPENCLAW_MCP_ACCOUNT_ID}", "x-openclaw-message-channel": "${OPENCLAW_MCP_MESSAGE_CHANNEL}", "x-openclaw-inbound-event-kind": "${OPENCLAW_MCP_INBOUND_EVENT_KIND}", + "x-openclaw-source-reply-delivery-mode": "${OPENCLAW_MCP_SOURCE_REPLY_DELIVERY_MODE}", }, }, }, diff --git a/src/auto-reply/reply/prompt-prelude.ts b/src/auto-reply/reply/prompt-prelude.ts index 5600e062409..7f8499e6e4d 100644 --- a/src/auto-reply/reply/prompt-prelude.ts +++ b/src/auto-reply/reply/prompt-prelude.ts @@ -10,7 +10,7 @@ import { appendUntrustedContext } from "./untrusted-context.js"; const REPLY_MEDIA_HINT = "To send an image back, prefer the message tool (media/path/filePath). If you must inline, use MEDIA:https://example.com/image.jpg (spaces ok, quote if needed) or a safe relative path like MEDIA:./image.jpg. Absolute and ~ paths only work when they stay inside your allowed file-read boundary; host file:// URLs are blocked. Keep caption in the text body."; const ROOM_EVENT_PROMPT = "[OpenClaw room event]"; -const ROOM_EVENT_VISIBLE_REPLY_CONTRACT = "message_tool_only"; +const ROOM_EVENT_SOURCE_REPLY_DELIVERY_MODE = "message_tool_only"; export function buildReplyPromptBodies(params: { ctx: MsgContext; @@ -134,7 +134,7 @@ function buildRoomEventContext(params: ReplyPromptEnvelopeBaseParams): string { return [ "[OpenClaw room event]", "inbound_event_kind: room_event", - `visible_reply_contract: ${ROOM_EVENT_VISIBLE_REPLY_CONTRACT}`, + `visible_reply_contract: ${ROOM_EVENT_SOURCE_REPLY_DELIVERY_MODE}`, params.inboundUserContext.trim() ? `Room context:\n${params.inboundUserContext.trim()}` : "", `Current event:\n${formatRoomEventLine(params.sessionCtx, roomEventBody)}`, "Treat this as observed room activity. Decide whether to act.",