test: align loopback prompt metadata · openclaw/openclaw@f7a39f4
steipete
·
2026-05-27
·
via Recent Commits to openclaw:main
| Original file line number | Diff line number | Diff line change |
|---|
@@ -95,6 +95,7 @@ function createTestMcpLoopbackServerConfig(port: number) {
|
95 | 95 | "x-openclaw-account-id": "${OPENCLAW_MCP_ACCOUNT_ID}", |
96 | 96 | "x-openclaw-message-channel": "${OPENCLAW_MCP_MESSAGE_CHANNEL}", |
97 | 97 | "x-openclaw-inbound-event-kind": "${OPENCLAW_MCP_INBOUND_EVENT_KIND}", |
| 98 | +"x-openclaw-source-reply-delivery-mode": "${OPENCLAW_MCP_SOURCE_REPLY_DELIVERY_MODE}", |
98 | 99 | }, |
99 | 100 | }, |
100 | 101 | }, |
|
| Original file line number | Diff line number | Diff line change |
|---|
@@ -10,7 +10,7 @@ import { appendUntrustedContext } from "./untrusted-context.js";
|
10 | 10 | const REPLY_MEDIA_HINT = |
11 | 11 | "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."; |
12 | 12 | const ROOM_EVENT_PROMPT = "[OpenClaw room event]"; |
13 | | -const ROOM_EVENT_VISIBLE_REPLY_CONTRACT = "message_tool_only"; |
| 13 | +const ROOM_EVENT_SOURCE_REPLY_DELIVERY_MODE = "message_tool_only"; |
14 | 14 | |
15 | 15 | export function buildReplyPromptBodies(params: { |
16 | 16 | ctx: MsgContext; |
@@ -134,7 +134,7 @@ function buildRoomEventContext(params: ReplyPromptEnvelopeBaseParams): string {
|
134 | 134 | return [ |
135 | 135 | "[OpenClaw room event]", |
136 | 136 | "inbound_event_kind: room_event", |
137 | | -`visible_reply_contract: ${ROOM_EVENT_VISIBLE_REPLY_CONTRACT}`, |
| 137 | +`visible_reply_contract: ${ROOM_EVENT_SOURCE_REPLY_DELIVERY_MODE}`, |
138 | 138 | params.inboundUserContext.trim() ? `Room context:\n${params.inboundUserContext.trim()}` : "", |
139 | 139 | `Current event:\n${formatRoomEventLine(params.sessionCtx, roomEventBody)}`, |
140 | 140 | "Treat this as observed room activity. Decide whether to act.", |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。