


















@@ -2,8 +2,8 @@ import { createChannelPairingController } from "openclaw/plugin-sdk/channel-pair
22import {
33ensureConfiguredBindingRouteReady,
44resolveConfiguredBindingRoute,
5+resolveRuntimeConversationBindingRoute,
56} from "openclaw/plugin-sdk/conversation-runtime";
6-import { getSessionBindingService } from "openclaw/plugin-sdk/conversation-runtime";
77import { resolveAgentOutboundIdentity } from "openclaw/plugin-sdk/outbound-runtime";
88import {
99buildPendingHistoryContextFromMap,
@@ -12,8 +12,6 @@ import {
1212recordPendingHistoryEntryIfEnabled,
1313type HistoryEntry,
1414} from "openclaw/plugin-sdk/reply-history";
15-import { deriveLastRoutePolicy } from "openclaw/plugin-sdk/routing";
16-import { resolveAgentIdFromSessionKey } from "openclaw/plugin-sdk/routing";
1715import {
1816resolveDefaultGroupPolicy,
1917resolveOpenProviderRuntimeGroupPolicy,
@@ -651,28 +649,22 @@ export async function handleFeishuMessage(params: {
651649// Bound Feishu conversations intentionally require an exact live conversation-id match.
652650// Sender-scoped topic sessions therefore bind on `chat:topic:root:sender:user`, while
653651// configured ACP bindings may still inherit the shared `chat:topic:root` topic session.
654-const threadBinding = getSessionBindingService().resolveByConversation({
655-channel: "feishu",
656-accountId: account.accountId,
657-conversationId: currentConversationId,
658- ...(parentConversationId ? { parentConversationId } : {}),
652+const runtimeRoute = resolveRuntimeConversationBindingRoute({
653+ route,
654+conversation: {
655+channel: "feishu",
656+accountId: account.accountId,
657+conversationId: currentConversationId,
658+ ...(parentConversationId ? { parentConversationId } : {}),
659+},
659660});
660-const boundSessionKey = threadBinding?.targetSessionKey?.trim();
661-if (threadBinding && boundSessionKey) {
662-route = {
663- ...route,
664-sessionKey: boundSessionKey,
665-agentId: resolveAgentIdFromSessionKey(boundSessionKey) || route.agentId,
666-lastRoutePolicy: deriveLastRoutePolicy({
667-sessionKey: boundSessionKey,
668-mainSessionKey: route.mainSessionKey,
669-}),
670-matchedBy: "binding.channel",
671-};
661+route = runtimeRoute.route;
662+if (runtimeRoute.bindingRecord) {
672663configuredBinding = null;
673-getSessionBindingService().touch(threadBinding.bindingId);
674664log(
675-`feishu[${account.accountId}]: routed via bound conversation ${currentConversationId} -> ${boundSessionKey}`,
665+runtimeRoute.boundSessionKey
666+ ? `feishu[${account.accountId}]: routed via bound conversation ${currentConversationId} -> ${runtimeRoute.boundSessionKey}`
667+ : `feishu[${account.accountId}]: plugin-bound conversation ${currentConversationId}`,
676668);
677669}
678670}
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。