refactor: share warning collector projections

This commit is contained in:
Peter Steinberger
2026-03-22 23:31:16 +00:00
parent 2cfc7bca10
commit 39faf4725d
8 changed files with 123 additions and 27 deletions

View File

@@ -10,7 +10,7 @@ import {
} from "openclaw/plugin-sdk/channel-pairing";
import {
createAllowlistProviderOpenWarningCollector,
projectWarningCollector,
projectAccountConfigWarningCollector,
} from "openclaw/plugin-sdk/channel-policy";
import { createScopedAccountReplyToModeResolver } from "openclaw/plugin-sdk/conversation-runtime";
import { createChatChannelPlugin } from "openclaw/plugin-sdk/core";
@@ -411,11 +411,8 @@ export const matrixPlugin: ChannelPlugin<ResolvedMatrixAccount, MatrixProbe> =
},
security: {
resolveDmPolicy: resolveMatrixDmPolicy,
collectWarnings: projectWarningCollector(
({ account, cfg }: { account: ResolvedMatrixAccount; cfg: unknown }) => ({
account,
cfg: cfg as CoreConfig,
}),
collectWarnings: projectAccountConfigWarningCollector(
(cfg) => cfg as CoreConfig,
collectMatrixSecurityWarningsForAccount,
),
},