Gateway: propagate message target and thread headers into tools invoke context

This commit is contained in:
Sahil Satralkar
2026-02-23 21:51:59 +05:30
committed by Peter Steinberger
parent f9ffd41cfa
commit 8796c78b3d

View File

@@ -213,6 +213,8 @@ export async function handleToolsInvokeHttpRequest(
getHeader(req, "x-openclaw-message-channel") ?? "",
);
const accountId = getHeader(req, "x-openclaw-account-id")?.trim() || undefined;
const agentTo = getHeader(req, "x-openclaw-message-to")?.trim() || undefined;
const agentThreadId = getHeader(req, "x-openclaw-thread-id")?.trim() || undefined;
const {
agentId,
@@ -248,6 +250,8 @@ export async function handleToolsInvokeHttpRequest(
agentSessionKey: sessionKey,
agentChannel: messageChannel ?? undefined,
agentAccountId: accountId,
agentTo,
agentThreadId,
config: cfg,
pluginToolAllowlist: collectExplicitAllowlist([
profilePolicy,