feat(acp): add conversation binds for message channels

This commit is contained in:
Peter Steinberger
2026-03-28 01:53:53 +00:00
parent 067f8db4c9
commit c42ec81e37
30 changed files with 1922 additions and 80 deletions

View File

@@ -27,6 +27,7 @@ import {
} from "openclaw/plugin-sdk/security-runtime";
import { sanitizeTerminalText } from "openclaw/plugin-sdk/text-runtime";
import { truncateUtf16Safe } from "openclaw/plugin-sdk/text-runtime";
import { resolveIMessageConversationRoute } from "../conversation-route.js";
import {
formatIMessageChatTarget,
isAllowedIMessageSender,
@@ -212,14 +213,13 @@ export function resolveIMessageInboundDecision(params: {
return { kind: "drop", reason: "group id not in allowlist" };
}
const route = resolveAgentRoute({
const route = resolveIMessageConversationRoute({
cfg: params.cfg,
channel: "imessage",
accountId: params.accountId,
peer: {
kind: isGroup ? "group" : "direct",
id: isGroup ? String(chatId ?? "unknown") : senderNormalized,
},
isGroup,
peerId: isGroup ? String(chatId ?? "unknown") : senderNormalized,
sender,
chatId,
});
const mentionRegexes = buildMentionRegexes(params.cfg, route.agentId);
const messageText = params.messageText.trim();