refactor: centralize inbound mention policy

This commit is contained in:
Peter Steinberger
2026-04-07 07:50:09 +01:00
parent c8b7058058
commit 625fd5b3e3
31 changed files with 857 additions and 225 deletions

View File

@@ -1,3 +1,7 @@
import {
implicitMentionKindWhen,
resolveInboundMentionDecision,
} from "openclaw/plugin-sdk/channel-inbound";
import { vi } from "vitest";
import type { PluginRuntime } from "./runtime-api.js";
import { setMatrixRuntime } from "./runtime.js";
@@ -56,6 +60,8 @@ export function installMatrixMonitorTestRuntime(
options.matchesMentionPatterns ??
((text: string, patterns: RegExp[]) => patterns.some((pattern) => pattern.test(text))),
matchesMentionWithExplicit: () => false,
implicitMentionKindWhen,
resolveInboundMentionDecision,
},
media: {
fetchRemoteMedia: vi.fn(),