@openclaw/msteams 2026.5.9-beta.1 → 2026.5.10-beta.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/api.js CHANGED
@@ -1,3 +1,3 @@
1
- import { t as msteamsPlugin } from "./channel-VjDbklu8.js";
2
- import { i as msteamsSetupAdapter, n as openDelegatedOAuthUrl, r as createMSTeamsSetupWizardBase, t as msteamsSetupWizard } from "./setup-surface-BeztPcxk.js";
1
+ import { t as msteamsPlugin } from "./channel-kz4Rzh2w.js";
2
+ import { i as msteamsSetupAdapter, n as openDelegatedOAuthUrl, r as createMSTeamsSetupWizardBase, t as msteamsSetupWizard } from "./setup-surface-C7d0jGM5.js";
3
3
  export { createMSTeamsSetupWizardBase, msteamsPlugin, msteamsSetupAdapter, msteamsSetupWizard, openDelegatedOAuthUrl };
@@ -1,9 +1,9 @@
1
- import { o as buildProbeChannelStatusSummary, r as PAIRING_APPROVED_MESSAGE, s as chunkTextForOutbound, t as DEFAULT_ACCOUNT_ID, u as createDefaultChannelRuntimeState } from "./runtime-api-D92XOrVf.js";
2
- import { h as resolveMSTeamsCredentials } from "./graph-users-C9HaPg1v.js";
3
- import { a as parseMSTeamsTeamChannelInput, c as resolveMSTeamsUserAllowlist, i as parseMSTeamsConversationId, n as normalizeMSTeamsMessagingTarget, r as normalizeMSTeamsUserInput, s as resolveMSTeamsChannelAllowlist, t as looksLikeMSTeamsTargetId } from "./resolve-allowlist-C23ohQKQ.js";
1
+ import { o as buildProbeChannelStatusSummary, r as PAIRING_APPROVED_MESSAGE, s as chunkTextForOutbound, t as DEFAULT_ACCOUNT_ID, u as createDefaultChannelRuntimeState } from "./runtime-api-C3EIaIpt.js";
2
+ import { h as resolveMSTeamsCredentials } from "./graph-users-CCU0WVMZ.js";
3
+ import { a as parseMSTeamsTeamChannelInput, c as resolveMSTeamsUserAllowlist, i as parseMSTeamsConversationId, n as normalizeMSTeamsMessagingTarget, r as normalizeMSTeamsUserInput, s as resolveMSTeamsChannelAllowlist, t as looksLikeMSTeamsTargetId } from "./resolve-allowlist-7CHP2hEA.js";
4
4
  import { t as MSTeamsChannelConfigSchema } from "./config-schema-DwOEthCC.js";
5
- import { r as resolveMSTeamsGroupToolPolicy } from "./policy-D32Kf1ED.js";
6
- import { i as msteamsSetupAdapter, t as msteamsSetupWizard } from "./setup-surface-BeztPcxk.js";
5
+ import { n as resolveMSTeamsGroupToolPolicy } from "./policy-bM71GXRd.js";
6
+ import { i as msteamsSetupAdapter, t as msteamsSetupWizard } from "./setup-surface-C7d0jGM5.js";
7
7
  import { describeAccountSnapshot } from "openclaw/plugin-sdk/account-helpers";
8
8
  import { formatAllowFromLowercase } from "openclaw/plugin-sdk/allow-from";
9
9
  import { createTopLevelChannelConfigAdapter } from "openclaw/plugin-sdk/channel-config-helpers";
@@ -183,7 +183,7 @@ const collectMSTeamsSecurityWarnings = createAllowlistProviderGroupPolicyWarning
183
183
  resolveGroupPolicy: ({ cfg }) => cfg.channels?.msteams?.groupPolicy,
184
184
  collect: ({ groupPolicy }) => groupPolicy === "open" ? ["- MS Teams groups: groupPolicy=\"open\" allows any member to trigger (mention-gated). Set channels.msteams.groupPolicy=\"allowlist\" + channels.msteams.groupAllowFrom to restrict senders."] : []
185
185
  });
186
- const loadMSTeamsChannelRuntime = createLazyRuntimeNamedExport(() => import("./channel.runtime-VrE9r2nS.js"), "msTeamsChannelRuntime");
186
+ const loadMSTeamsChannelRuntime = createLazyRuntimeNamedExport(() => import("./channel.runtime-C1IGCVBT.js"), "msTeamsChannelRuntime");
187
187
  const resolveMSTeamsChannelConfig = (cfg) => ({
188
188
  allowFrom: cfg.channels?.msteams?.allowFrom,
189
189
  defaultTo: cfg.channels?.msteams?.defaultTo
@@ -965,7 +965,7 @@ const msteamsPlugin = createChatChannelPlugin({
965
965
  })
966
966
  }),
967
967
  gateway: { startAccount: async (ctx) => {
968
- const { monitorMSTeamsProvider } = await import("./src-CiKTGSje.js");
968
+ const { monitorMSTeamsProvider } = await import("./src-DQ7ARgDd.js");
969
969
  const port = ctx.cfg.channels?.msteams?.webhook?.port ?? 3978;
970
970
  ctx.setStatus({
971
971
  accountId: ctx.accountId,
@@ -1,2 +1,2 @@
1
- import { t as msteamsPlugin } from "./channel-VjDbklu8.js";
1
+ import { t as msteamsPlugin } from "./channel-kz4Rzh2w.js";
2
2
  export { msteamsPlugin };
@@ -1,6 +1,6 @@
1
- import { s as chunkTextForOutbound } from "./runtime-api-D92XOrVf.js";
2
- import { a as fetchGraphJson, c as normalizeQuery, d as postGraphJson, f as resolveGraphToken, i as fetchGraphAbsoluteUrl, l as patchGraphJson, n as deleteGraphRequest, o as listChannelsForTeam, r as escapeOData, s as listTeamsByName, t as searchGraphUsers, u as postGraphBetaJson } from "./graph-users-C9HaPg1v.js";
3
- import { S as createMSTeamsConversationStoreFs, a as sendMessageMSTeams, b as createMSTeamsPollStoreFs, i as sendAdaptiveCardMSTeams, n as deleteMessageMSTeams, o as sendPollMSTeams, r as editMessageMSTeams, t as probeMSTeams } from "./probe-Bs955MJZ.js";
1
+ import { s as chunkTextForOutbound } from "./runtime-api-C3EIaIpt.js";
2
+ import { a as fetchGraphJson, c as normalizeQuery, d as postGraphJson, f as resolveGraphToken, i as fetchGraphAbsoluteUrl, l as patchGraphJson, n as deleteGraphRequest, o as listChannelsForTeam, r as escapeOData, s as listTeamsByName, t as searchGraphUsers, u as postGraphBetaJson } from "./graph-users-CCU0WVMZ.js";
3
+ import { S as createMSTeamsConversationStoreFs, a as sendMessageMSTeams, b as createMSTeamsPollStoreFs, i as sendAdaptiveCardMSTeams, n as deleteMessageMSTeams, o as sendPollMSTeams, r as editMessageMSTeams, t as probeMSTeams } from "./probe-CQKmxtlj.js";
4
4
  import { normalizeLowercaseStringOrEmpty } from "openclaw/plugin-sdk/text-runtime";
5
5
  import { createAttachedChannelResultAdapter } from "openclaw/plugin-sdk/channel-send-result";
6
6
  import { resolveOutboundSendDep } from "openclaw/plugin-sdk/outbound-send-deps";
@@ -1,4 +1,4 @@
1
- import { L as getMSTeamsRuntime, g as fetchWithSsrFGuard$1 } from "./runtime-api-D92XOrVf.js";
1
+ import { M as getMSTeamsRuntime, h as fetchWithSsrFGuard$1 } from "./runtime-api-C3EIaIpt.js";
2
2
  import { n as refreshMSTeamsDelegatedTokens } from "./oauth.token-xxpoLWy5.js";
3
3
  import { createRequire } from "node:module";
4
4
  import { isRecord as isRecord$2, normalizeLowercaseStringOrEmpty, normalizeOptionalString } from "openclaw/plugin-sdk/text-runtime";
@@ -1,4 +1,4 @@
1
- import { C as normalizeChannelSlug, D as resolveChannelEntryMatchWithFallback, E as resolveAllowlistMatchSimple, M as resolveNestedAllowlistDecision, P as resolveToolsBySender, i as buildChannelKeyCandidates, p as evaluateSenderGroupAccessForPolicy, v as isDangerousNameMatchingEnabled } from "./runtime-api-D92XOrVf.js";
1
+ import { O as resolveNestedAllowlistDecision, S as normalizeChannelSlug, T as resolveChannelEntryMatchWithFallback, _ as isDangerousNameMatchingEnabled, i as buildChannelKeyCandidates, k as resolveToolsBySender, w as resolveAllowlistMatchSimple } from "./runtime-api-C3EIaIpt.js";
2
2
  //#region extensions/msteams/src/policy.ts
3
3
  function resolveMSTeamsRouteConfig(params) {
4
4
  const teamId = params.teamId?.trim();
@@ -130,13 +130,5 @@ function resolveMSTeamsReplyPolicy(params) {
130
130
  replyStyle: params.channelConfig?.replyStyle ?? params.teamConfig?.replyStyle ?? params.globalConfig?.replyStyle ?? (requireMention ? "thread" : "top-level")
131
131
  };
132
132
  }
133
- function isMSTeamsGroupAllowed(params) {
134
- return evaluateSenderGroupAccessForPolicy({
135
- groupPolicy: params.groupPolicy,
136
- groupAllowFrom: params.allowFrom.map((entry) => String(entry)),
137
- senderId: params.senderId,
138
- isSenderAllowed: () => resolveMSTeamsAllowlistMatch(params).allowed
139
- }).allowed;
140
- }
141
133
  //#endregion
142
- export { resolveMSTeamsRouteConfig as a, resolveMSTeamsReplyPolicy as i, resolveMSTeamsAllowlistMatch as n, resolveMSTeamsGroupToolPolicy as r, isMSTeamsGroupAllowed as t };
134
+ export { resolveMSTeamsRouteConfig as i, resolveMSTeamsGroupToolPolicy as n, resolveMSTeamsReplyPolicy as r, resolveMSTeamsAllowlistMatch as t };
@@ -1,6 +1,6 @@
1
- import { L as getMSTeamsRuntime, O as resolveChannelMediaMaxBytes, _ as getFileExtension, b as loadOutboundMediaFromUrl, d as detectMime, h as extractOriginalFilename, m as extensionForMime, w as normalizeStringEntries } from "./runtime-api-D92XOrVf.js";
2
- import { C as loadMSTeamsSdkWithAuth, D as formatMSTeamsSendErrorHint, E as classifyMSTeamsSendError, O as formatUnknownError, S as createMSTeamsTokenProvider, _ as resolveMSTeamsStorePath, h as resolveMSTeamsCredentials, k as isRevokedProxyError, m as loadDelegatedTokens, w as buildUserAgent, x as createMSTeamsAdapter, y as readAccessToken } from "./graph-users-C9HaPg1v.js";
3
- import { a as resolveMSTeamsRouteConfig, i as resolveMSTeamsReplyPolicy } from "./policy-D32Kf1ED.js";
1
+ import { C as normalizeStringEntries, E as resolveChannelMediaMaxBytes, M as getMSTeamsRuntime, d as detectMime, g as getFileExtension, m as extractOriginalFilename, p as extensionForMime, y as loadOutboundMediaFromUrl } from "./runtime-api-C3EIaIpt.js";
2
+ import { C as loadMSTeamsSdkWithAuth, D as formatMSTeamsSendErrorHint, E as classifyMSTeamsSendError, O as formatUnknownError, S as createMSTeamsTokenProvider, _ as resolveMSTeamsStorePath, h as resolveMSTeamsCredentials, k as isRevokedProxyError, m as loadDelegatedTokens, w as buildUserAgent, x as createMSTeamsAdapter, y as readAccessToken } from "./graph-users-CCU0WVMZ.js";
3
+ import { i as resolveMSTeamsRouteConfig, r as resolveMSTeamsReplyPolicy } from "./policy-bM71GXRd.js";
4
4
  import { createMessageReceiptFromOutboundResults } from "openclaw/plugin-sdk/channel-message";
5
5
  import { convertMarkdownTables, isRecord, normalizeLowercaseStringOrEmpty, normalizeOptionalLowercaseString, normalizeOptionalString, sleep } from "openclaw/plugin-sdk/text-runtime";
6
6
  import { withFileLock } from "openclaw/plugin-sdk/file-lock";
@@ -1,4 +1,4 @@
1
- import { c as normalizeQuery, f as resolveGraphToken, o as listChannelsForTeam, s as listTeamsByName, t as searchGraphUsers } from "./graph-users-C9HaPg1v.js";
1
+ import { c as normalizeQuery, f as resolveGraphToken, o as listChannelsForTeam, s as listTeamsByName, t as searchGraphUsers } from "./graph-users-CCU0WVMZ.js";
2
2
  import { mapAllowlistResolutionInputs } from "openclaw/plugin-sdk/allow-from";
3
3
  import { normalizeLowercaseStringOrEmpty, normalizeOptionalLowercaseString } from "openclaw/plugin-sdk/text-runtime";
4
4
  //#region extensions/msteams/src/resolve-allowlist.ts
@@ -1,7 +1,7 @@
1
1
  import { mergeAllowlist, resolveAllowlistMatchSimple, summarizeMapping } from "openclaw/plugin-sdk/allow-from";
2
2
  import { createChannelMessageReplyPipeline } from "openclaw/plugin-sdk/channel-message";
3
3
  import { createChannelPairingController } from "openclaw/plugin-sdk/channel-pairing";
4
- import { evaluateSenderGroupAccessForPolicy, readStoreAllowFromForDmPolicy, resolveDmGroupAccessWithLists, resolveEffectiveAllowFromLists, resolveSenderScopedGroupPolicy, resolveToolsBySender } from "openclaw/plugin-sdk/channel-policy";
4
+ import { resolveToolsBySender } from "openclaw/plugin-sdk/channel-policy";
5
5
  import { DEFAULT_ACCOUNT_ID } from "openclaw/plugin-sdk/account-id";
6
6
  import { logTypingFailure } from "openclaw/plugin-sdk/channel-logging";
7
7
  import { PAIRING_APPROVED_MESSAGE, buildProbeChannelStatusSummary, createDefaultChannelRuntimeState } from "openclaw/plugin-sdk/channel-status";
@@ -25,4 +25,4 @@ const { setRuntime: setMSTeamsRuntime, getRuntime: getMSTeamsRuntime, tryGetRunt
25
25
  errorMessage: "MSTeams runtime not initialized"
26
26
  });
27
27
  //#endregion
28
- export { resolveDmGroupAccessWithLists as A, normalizeChannelSlug as C, resolveChannelEntryMatchWithFallback as D, resolveAllowlistMatchSimple as E, summarizeMapping as F, withFileLock$1 as I, getMSTeamsRuntime as L, resolveNestedAllowlistDecision as M, resolveSenderScopedGroupPolicy as N, resolveChannelMediaMaxBytes as O, resolveToolsBySender as P, getOptionalMSTeamsRuntime as R, mergeAllowlist as S, readStoreAllowFromForDmPolicy as T, getFileExtension as _, buildMediaPayload as a, loadOutboundMediaFromUrl as b, createChannelMessageReplyPipeline as c, detectMime as d, dispatchReplyFromConfigWithSettledDispatcher$1 as f, fetchWithSsrFGuard$1 as g, extractOriginalFilename as h, buildChannelKeyCandidates as i, resolveEffectiveAllowFromLists as j, resolveDefaultGroupPolicy as k, createChannelPairingController as l, extensionForMime as m, DEFAULT_WEBHOOK_MAX_BODY_BYTES as n, buildProbeChannelStatusSummary as o, evaluateSenderGroupAccessForPolicy as p, PAIRING_APPROVED_MESSAGE as r, chunkTextForOutbound as s, DEFAULT_ACCOUNT_ID as t, createDefaultChannelRuntimeState as u, isDangerousNameMatchingEnabled as v, normalizeStringEntries as w, logTypingFailure as x, keepHttpServerTaskAlive as y, setMSTeamsRuntime as z };
28
+ export { summarizeMapping as A, normalizeStringEntries as C, resolveDefaultGroupPolicy as D, resolveChannelMediaMaxBytes as E, getMSTeamsRuntime as M, getOptionalMSTeamsRuntime as N, resolveNestedAllowlistDecision as O, setMSTeamsRuntime as P, normalizeChannelSlug as S, resolveChannelEntryMatchWithFallback as T, isDangerousNameMatchingEnabled as _, buildMediaPayload as a, logTypingFailure as b, createChannelMessageReplyPipeline as c, detectMime as d, dispatchReplyFromConfigWithSettledDispatcher$1 as f, getFileExtension as g, fetchWithSsrFGuard$1 as h, buildChannelKeyCandidates as i, withFileLock$1 as j, resolveToolsBySender as k, createChannelPairingController as l, extractOriginalFilename as m, DEFAULT_WEBHOOK_MAX_BODY_BYTES as n, buildProbeChannelStatusSummary as o, extensionForMime as p, PAIRING_APPROVED_MESSAGE as r, chunkTextForOutbound as s, DEFAULT_ACCOUNT_ID as t, createDefaultChannelRuntimeState as u, keepHttpServerTaskAlive as v, resolveAllowlistMatchSimple as w, mergeAllowlist as x, loadOutboundMediaFromUrl as y };
@@ -1,2 +1,2 @@
1
- import { A as resolveDmGroupAccessWithLists, C as normalizeChannelSlug, D as resolveChannelEntryMatchWithFallback, E as resolveAllowlistMatchSimple, F as summarizeMapping, I as withFileLock, M as resolveNestedAllowlistDecision, N as resolveSenderScopedGroupPolicy, O as resolveChannelMediaMaxBytes, P as resolveToolsBySender, S as mergeAllowlist, T as readStoreAllowFromForDmPolicy, _ as getFileExtension, a as buildMediaPayload, b as loadOutboundMediaFromUrl, c as createChannelMessageReplyPipeline, d as detectMime, f as dispatchReplyFromConfigWithSettledDispatcher, g as fetchWithSsrFGuard, h as extractOriginalFilename, i as buildChannelKeyCandidates, j as resolveEffectiveAllowFromLists, k as resolveDefaultGroupPolicy, l as createChannelPairingController, m as extensionForMime, n as DEFAULT_WEBHOOK_MAX_BODY_BYTES, o as buildProbeChannelStatusSummary, p as evaluateSenderGroupAccessForPolicy, r as PAIRING_APPROVED_MESSAGE, s as chunkTextForOutbound, t as DEFAULT_ACCOUNT_ID, u as createDefaultChannelRuntimeState, v as isDangerousNameMatchingEnabled, w as normalizeStringEntries, x as logTypingFailure, y as keepHttpServerTaskAlive, z as setMSTeamsRuntime } from "./runtime-api-D92XOrVf.js";
2
- export { DEFAULT_ACCOUNT_ID, DEFAULT_WEBHOOK_MAX_BODY_BYTES, PAIRING_APPROVED_MESSAGE, buildChannelKeyCandidates, buildMediaPayload, buildProbeChannelStatusSummary, chunkTextForOutbound, createChannelMessageReplyPipeline, createChannelPairingController, createDefaultChannelRuntimeState, detectMime, dispatchReplyFromConfigWithSettledDispatcher, evaluateSenderGroupAccessForPolicy, extensionForMime, extractOriginalFilename, fetchWithSsrFGuard, getFileExtension, isDangerousNameMatchingEnabled, keepHttpServerTaskAlive, loadOutboundMediaFromUrl, logTypingFailure, mergeAllowlist, normalizeChannelSlug, normalizeStringEntries, readStoreAllowFromForDmPolicy, resolveAllowlistMatchSimple, resolveChannelEntryMatchWithFallback, resolveChannelMediaMaxBytes, resolveDefaultGroupPolicy, resolveDmGroupAccessWithLists, resolveEffectiveAllowFromLists, resolveNestedAllowlistDecision, resolveSenderScopedGroupPolicy, resolveToolsBySender, setMSTeamsRuntime, summarizeMapping, withFileLock };
1
+ import { A as summarizeMapping, C as normalizeStringEntries, D as resolveDefaultGroupPolicy, E as resolveChannelMediaMaxBytes, O as resolveNestedAllowlistDecision, P as setMSTeamsRuntime, S as normalizeChannelSlug, T as resolveChannelEntryMatchWithFallback, _ as isDangerousNameMatchingEnabled, a as buildMediaPayload, b as logTypingFailure, c as createChannelMessageReplyPipeline, d as detectMime, f as dispatchReplyFromConfigWithSettledDispatcher, g as getFileExtension, h as fetchWithSsrFGuard, i as buildChannelKeyCandidates, j as withFileLock, k as resolveToolsBySender, l as createChannelPairingController, m as extractOriginalFilename, n as DEFAULT_WEBHOOK_MAX_BODY_BYTES, o as buildProbeChannelStatusSummary, p as extensionForMime, r as PAIRING_APPROVED_MESSAGE, s as chunkTextForOutbound, t as DEFAULT_ACCOUNT_ID, u as createDefaultChannelRuntimeState, v as keepHttpServerTaskAlive, w as resolveAllowlistMatchSimple, x as mergeAllowlist, y as loadOutboundMediaFromUrl } from "./runtime-api-C3EIaIpt.js";
2
+ export { DEFAULT_ACCOUNT_ID, DEFAULT_WEBHOOK_MAX_BODY_BYTES, PAIRING_APPROVED_MESSAGE, buildChannelKeyCandidates, buildMediaPayload, buildProbeChannelStatusSummary, chunkTextForOutbound, createChannelMessageReplyPipeline, createChannelPairingController, createDefaultChannelRuntimeState, detectMime, dispatchReplyFromConfigWithSettledDispatcher, extensionForMime, extractOriginalFilename, fetchWithSsrFGuard, getFileExtension, isDangerousNameMatchingEnabled, keepHttpServerTaskAlive, loadOutboundMediaFromUrl, logTypingFailure, mergeAllowlist, normalizeChannelSlug, normalizeStringEntries, resolveAllowlistMatchSimple, resolveChannelEntryMatchWithFallback, resolveChannelMediaMaxBytes, resolveDefaultGroupPolicy, resolveNestedAllowlistDecision, resolveToolsBySender, setMSTeamsRuntime, summarizeMapping, withFileLock };
@@ -1,6 +1,6 @@
1
- import { h as resolveMSTeamsCredentials } from "./graph-users-C9HaPg1v.js";
1
+ import { h as resolveMSTeamsCredentials } from "./graph-users-CCU0WVMZ.js";
2
2
  import { t as MSTeamsChannelConfigSchema } from "./config-schema-DwOEthCC.js";
3
- import { i as msteamsSetupAdapter, t as msteamsSetupWizard } from "./setup-surface-BeztPcxk.js";
3
+ import { i as msteamsSetupAdapter, t as msteamsSetupWizard } from "./setup-surface-C7d0jGM5.js";
4
4
  import { describeAccountSnapshot } from "openclaw/plugin-sdk/account-helpers";
5
5
  import { formatAllowFromLowercase } from "openclaw/plugin-sdk/allow-from";
6
6
  import { createTopLevelChannelConfigAdapter } from "openclaw/plugin-sdk/channel-config-helpers";
@@ -1,5 +1,5 @@
1
- import { O as formatUnknownError, g as saveDelegatedTokens, h as resolveMSTeamsCredentials, p as hasConfiguredMSTeamsCredentials, v as normalizeSecretInputString } from "./graph-users-C9HaPg1v.js";
2
- import { c as resolveMSTeamsUserAllowlist, o as parseMSTeamsTeamEntry, s as resolveMSTeamsChannelAllowlist } from "./resolve-allowlist-C23ohQKQ.js";
1
+ import { O as formatUnknownError, g as saveDelegatedTokens, h as resolveMSTeamsCredentials, p as hasConfiguredMSTeamsCredentials, v as normalizeSecretInputString } from "./graph-users-CCU0WVMZ.js";
2
+ import { c as resolveMSTeamsUserAllowlist, o as parseMSTeamsTeamEntry, s as resolveMSTeamsChannelAllowlist } from "./resolve-allowlist-7CHP2hEA.js";
3
3
  import { DEFAULT_ACCOUNT_ID, createStandardChannelSetupStatus, createTopLevelChannelAllowFromSetter, createTopLevelChannelDmPolicy, createTopLevelChannelGroupPolicySetter, mergeAllowFromEntries, splitSetupEntries } from "openclaw/plugin-sdk/setup";
4
4
  import { formatDocsLink } from "openclaw/plugin-sdk/setup-tools";
5
5
  //#region extensions/msteams/src/setup-core.ts
@@ -1,8 +1,8 @@
1
- import { A as resolveDmGroupAccessWithLists, F as summarizeMapping, L as getMSTeamsRuntime, N as resolveSenderScopedGroupPolicy, O as resolveChannelMediaMaxBytes, R as getOptionalMSTeamsRuntime, S as mergeAllowlist, T as readStoreAllowFromForDmPolicy, a as buildMediaPayload, c as createChannelMessageReplyPipeline, f as dispatchReplyFromConfigWithSettledDispatcher$1, j as resolveEffectiveAllowFromLists, k as resolveDefaultGroupPolicy, l as createChannelPairingController, n as DEFAULT_WEBHOOK_MAX_BODY_BYTES, p as evaluateSenderGroupAccessForPolicy$1, t as DEFAULT_ACCOUNT_ID, v as isDangerousNameMatchingEnabled, x as logTypingFailure, y as keepHttpServerTaskAlive } from "./runtime-api-D92XOrVf.js";
2
- import { A as ATTACHMENT_TAG_RE, B as isLikelyImageAttachment, C as loadMSTeamsSdkWithAuth, D as formatMSTeamsSendErrorHint, E as classifyMSTeamsSendError, F as estimateBase64DecodedBytes, G as resolveAttachmentFetchPolicy, H as isUrlAllowed, I as extractHtmlFromAttachment, J as safeFetchWithPolicy, K as resolveMediaSsrfPolicy, L as extractInlineImageCandidates, M as IMG_SRC_RE, N as applyAuthorizationHeaderForUrl, O as formatUnknownError, P as encodeGraphShareId, R as inferPlaceholder, S as createMSTeamsTokenProvider, T as ensureUserAgentHeader, U as normalizeContentType, V as isRecord$1, W as readNestedString, X as tryBuildGraphSharesUrlForSharedLink, Y as safeHostForUrl, _ as resolveMSTeamsStorePath, a as fetchGraphJson, b as createBotFrameworkJwtValidator, h as resolveMSTeamsCredentials, j as GRAPH_ROOT, q as resolveRequestUrl, w as buildUserAgent, x as createMSTeamsAdapter, z as isDownloadableAttachment } from "./graph-users-C9HaPg1v.js";
3
- import { c as resolveMSTeamsUserAllowlist, s as resolveMSTeamsChannelAllowlist } from "./resolve-allowlist-C23ohQKQ.js";
4
- import { a as resolveMSTeamsRouteConfig, i as resolveMSTeamsReplyPolicy, n as resolveMSTeamsAllowlistMatch, t as isMSTeamsGroupAllowed } from "./policy-D32Kf1ED.js";
5
- import { C as readJsonFile, S as createMSTeamsConversationStoreFs, T as writeJsonFile, _ as buildFileInfoCard, b as createMSTeamsPollStoreFs, c as renderReplyPayloadsToMessages, d as withRevokedProxyFallback, f as resolveGraphChatId, g as removePendingUploadFs, h as getPendingUploadFs, l as sendMSTeamsMessages, m as removePendingUpload, p as getPendingUpload, s as buildConversationReference, u as AI_GENERATED_ENTITY, v as parseFileConsentInvoke, w as withFileLock, x as extractMSTeamsPollVote, y as uploadToConsentUrl } from "./probe-Bs955MJZ.js";
1
+ import { A as summarizeMapping, D as resolveDefaultGroupPolicy, E as resolveChannelMediaMaxBytes, M as getMSTeamsRuntime, N as getOptionalMSTeamsRuntime, _ as isDangerousNameMatchingEnabled, a as buildMediaPayload, b as logTypingFailure, c as createChannelMessageReplyPipeline, f as dispatchReplyFromConfigWithSettledDispatcher$1, l as createChannelPairingController, n as DEFAULT_WEBHOOK_MAX_BODY_BYTES, t as DEFAULT_ACCOUNT_ID, v as keepHttpServerTaskAlive, x as mergeAllowlist } from "./runtime-api-C3EIaIpt.js";
2
+ import { A as ATTACHMENT_TAG_RE, B as isLikelyImageAttachment, C as loadMSTeamsSdkWithAuth, D as formatMSTeamsSendErrorHint, E as classifyMSTeamsSendError, F as estimateBase64DecodedBytes, G as resolveAttachmentFetchPolicy, H as isUrlAllowed, I as extractHtmlFromAttachment, J as safeFetchWithPolicy, K as resolveMediaSsrfPolicy, L as extractInlineImageCandidates, M as IMG_SRC_RE, N as applyAuthorizationHeaderForUrl, O as formatUnknownError, P as encodeGraphShareId, R as inferPlaceholder, S as createMSTeamsTokenProvider, T as ensureUserAgentHeader, U as normalizeContentType, V as isRecord$1, W as readNestedString, X as tryBuildGraphSharesUrlForSharedLink, Y as safeHostForUrl, _ as resolveMSTeamsStorePath, a as fetchGraphJson, b as createBotFrameworkJwtValidator, h as resolveMSTeamsCredentials, j as GRAPH_ROOT, q as resolveRequestUrl, w as buildUserAgent, x as createMSTeamsAdapter, z as isDownloadableAttachment } from "./graph-users-CCU0WVMZ.js";
3
+ import { c as resolveMSTeamsUserAllowlist, s as resolveMSTeamsChannelAllowlist } from "./resolve-allowlist-7CHP2hEA.js";
4
+ import { i as resolveMSTeamsRouteConfig, r as resolveMSTeamsReplyPolicy, t as resolveMSTeamsAllowlistMatch } from "./policy-bM71GXRd.js";
5
+ import { C as readJsonFile, S as createMSTeamsConversationStoreFs, T as writeJsonFile, _ as buildFileInfoCard, b as createMSTeamsPollStoreFs, c as renderReplyPayloadsToMessages, d as withRevokedProxyFallback, f as resolveGraphChatId, g as removePendingUploadFs, h as getPendingUploadFs, l as sendMSTeamsMessages, m as removePendingUpload, p as getPendingUpload, s as buildConversationReference, u as AI_GENERATED_ENTITY, v as parseFileConsentInvoke, w as withFileLock, x as extractMSTeamsPollVote, y as uploadToConsentUrl } from "./probe-CQKmxtlj.js";
6
6
  import { formatAllowlistMatchMeta } from "openclaw/plugin-sdk/allow-from";
7
7
  import { createLiveMessageState, createPreviewMessageReceipt, defineFinalizableLivePreviewAdapter, deliverWithFinalizableLivePreviewAdapter, markLiveMessageFinalized } from "openclaw/plugin-sdk/channel-message";
8
8
  import { normalizeLowercaseStringOrEmpty, normalizeOptionalLowercaseString, normalizeOptionalString, readStringValue } from "openclaw/plugin-sdk/text-runtime";
@@ -16,10 +16,9 @@ import { appendRegularFile } from "openclaw/plugin-sdk/security-runtime";
16
16
  import { writeJsonFileAtomically } from "openclaw/plugin-sdk/json-store";
17
17
  import { resolveThreadSessionKeys } from "openclaw/plugin-sdk/routing";
18
18
  import fs from "node:fs/promises";
19
+ import { channelIngressRoutes, resolveStableChannelMessageIngress } from "openclaw/plugin-sdk/channel-ingress-runtime";
19
20
  import { logInboundDrop, resolveInboundMentionDecision, resolveInboundSessionEnvelopeContext } from "openclaw/plugin-sdk/channel-inbound";
20
- import { resolveDualTextControlCommandGate } from "openclaw/plugin-sdk/command-gating";
21
21
  import { filterSupplementalContextItems, resolveChannelContextVisibilityMode, shouldIncludeSupplementalContext } from "openclaw/plugin-sdk/context-visibility-runtime";
22
- import { evaluateSenderGroupAccessForPolicy } from "openclaw/plugin-sdk/group-access";
23
22
  import { DEFAULT_GROUP_HISTORY_LIMIT, buildPendingHistoryContextFromMap, recordPendingHistoryEntryIfEnabled } from "openclaw/plugin-sdk/reply-history";
24
23
  import { buildChannelProgressDraftLine, buildChannelProgressDraftLineForEntry, createChannelProgressDraftGate, formatChannelProgressDraftText, isChannelProgressDraftWorkToolName, resolveChannelPreviewStreamMode, resolveChannelProgressDraftMaxLines, resolveChannelStreamingBlockEnabled, resolveChannelStreamingPreviewToolProgress } from "openclaw/plugin-sdk/channel-streaming";
25
24
  //#region extensions/msteams/src/feedback-reflection-prompt.ts
@@ -492,6 +491,22 @@ async function respondToMSTeamsFileConsentInvoke(context, log) {
492
491
  }
493
492
  //#endregion
494
493
  //#region extensions/msteams/src/monitor-handler/access.ts
494
+ const msteamsIngressIdentity = {
495
+ key: "sender-id",
496
+ normalize: normalizeIngressValue,
497
+ aliases: [{
498
+ key: "sender-name",
499
+ kind: "plugin:msteams-sender-name",
500
+ normalizeEntry: normalizeIngressValue,
501
+ normalizeSubject: normalizeIngressValue,
502
+ dangerous: true
503
+ }],
504
+ isWildcardEntry: (entry) => normalizeIngressValue(entry) === "*",
505
+ resolveEntryId: ({ entryIndex, fieldKey }) => `msteams-entry-${entryIndex + 1}:${fieldKey === "sender-name" ? "name" : "id"}`
506
+ };
507
+ function normalizeIngressValue(value) {
508
+ return normalizeOptionalLowercaseString(value) ?? null;
509
+ }
495
510
  async function resolveMSTeamsSenderAccess(params) {
496
511
  const activity = params.activity;
497
512
  const msteamsCfg = params.cfg.channels?.msteams;
@@ -506,23 +521,10 @@ async function resolveMSTeamsSenderAccess(params) {
506
521
  accountId: DEFAULT_ACCOUNT_ID
507
522
  });
508
523
  const dmPolicy = msteamsCfg?.dmPolicy ?? "pairing";
509
- const storedAllowFrom = await readStoreAllowFromForDmPolicy({
510
- provider: "msteams",
511
- accountId: pairing.accountId,
512
- dmPolicy,
513
- readStore: pairing.readStoreForDmPolicy
514
- });
515
524
  const configuredDmAllowFrom = msteamsCfg?.allowFrom ?? [];
516
525
  const groupAllowFrom = msteamsCfg?.groupAllowFrom;
517
- const resolvedAllowFromLists = resolveEffectiveAllowFromLists({
518
- allowFrom: configuredDmAllowFrom,
519
- groupAllowFrom,
520
- storeAllowFrom: storedAllowFrom,
521
- dmPolicy
522
- });
523
526
  const defaultGroupPolicy = resolveDefaultGroupPolicy(params.cfg);
524
527
  const groupPolicy = !isDirectMessage && msteamsCfg ? msteamsCfg.groupPolicy ?? defaultGroupPolicy ?? "allowlist" : "disabled";
525
- const effectiveGroupAllowFrom = resolvedAllowFromLists.effectiveGroupAllowFrom;
526
528
  const allowNameMatching = isDangerousNameMatchingEnabled(msteamsCfg);
527
529
  const channelGate = resolveMSTeamsRouteConfig({
528
530
  cfg: msteamsCfg,
@@ -532,49 +534,55 @@ async function resolveMSTeamsSenderAccess(params) {
532
534
  channelName: activity.channelData?.channel?.name,
533
535
  allowNameMatching
534
536
  });
535
- const senderGroupPolicy = channelGate.allowlistConfigured && effectiveGroupAllowFrom.length === 0 ? groupPolicy : resolveSenderScopedGroupPolicy({
536
- groupPolicy,
537
- groupAllowFrom: effectiveGroupAllowFrom
538
- });
539
- const access = resolveDmGroupAccessWithLists({
540
- isGroup: !isDirectMessage,
541
- dmPolicy,
542
- groupPolicy: senderGroupPolicy,
543
- allowFrom: configuredDmAllowFrom,
544
- groupAllowFrom,
545
- storeAllowFrom: storedAllowFrom,
546
- groupAllowFromFallbackToAllowFrom: false,
547
- isSenderAllowed: (allowFrom) => resolveMSTeamsAllowlistMatch({
548
- allowFrom,
549
- senderId,
550
- senderName,
551
- allowNameMatching
552
- }).allowed
553
- });
554
537
  return {
555
- msteamsCfg,
538
+ ...await resolveStableChannelMessageIngress({
539
+ channelId: "msteams",
540
+ accountId: pairing.accountId,
541
+ identity: msteamsIngressIdentity,
542
+ cfg: params.cfg,
543
+ readStoreAllowFrom: pairing.readAllowFromStore,
544
+ subject: {
545
+ stableId: senderId,
546
+ aliases: { "sender-name": senderName }
547
+ },
548
+ conversation: {
549
+ kind: isDirectMessage ? "direct" : convType === "channel" ? "channel" : "group",
550
+ id: conversationId,
551
+ parentId: activity.channelData?.team?.id
552
+ },
553
+ route: channelIngressRoutes(!isDirectMessage && channelGate.allowlistConfigured && {
554
+ id: "msteams:team-channel",
555
+ kind: "nestedAllowlist",
556
+ allowed: channelGate.allowed,
557
+ precedence: 0,
558
+ matchId: "msteams-route",
559
+ ...channelGate.allowed && groupPolicy === "allowlist" ? {
560
+ senderPolicy: "deny-when-empty",
561
+ senderAllowFromSource: "effective-group"
562
+ } : {}
563
+ }),
564
+ dmPolicy,
565
+ groupPolicy,
566
+ policy: {
567
+ groupAllowFromFallbackToAllowFrom: true,
568
+ mutableIdentifierMatching: allowNameMatching ? "enabled" : "disabled"
569
+ },
570
+ allowFrom: configuredDmAllowFrom,
571
+ groupAllowFrom,
572
+ command: {
573
+ allowTextCommands: true,
574
+ hasControlCommand: params.hasControlCommand === true,
575
+ directGroupAllowFrom: isDirectMessage ? "effective" : "none"
576
+ }
577
+ }),
556
578
  pairing,
557
579
  isDirectMessage,
558
580
  conversationId,
559
581
  senderId,
560
582
  senderName,
583
+ msteamsCfg,
561
584
  dmPolicy,
562
585
  channelGate,
563
- access,
564
- senderGroupAccess: evaluateSenderGroupAccessForPolicy$1({
565
- groupPolicy,
566
- groupAllowFrom: effectiveGroupAllowFrom,
567
- senderId,
568
- isSenderAllowed: (_senderId, allowFrom) => resolveMSTeamsAllowlistMatch({
569
- allowFrom,
570
- senderId,
571
- senderName,
572
- allowNameMatching
573
- }).allowed
574
- }),
575
- configuredDmAllowFrom,
576
- effectiveDmAllowFrom: access.effectiveAllowFrom,
577
- effectiveGroupAllowFrom,
578
586
  allowNameMatching,
579
587
  groupPolicy
580
588
  };
@@ -2499,6 +2507,22 @@ function extractTextFromHtmlAttachments(attachments) {
2499
2507
  }
2500
2508
  return "";
2501
2509
  }
2510
+ function formatMSTeamsSenderReason(params) {
2511
+ switch (params.reasonCode) {
2512
+ case "dm_policy_open": return "dmPolicy=open";
2513
+ case "dm_policy_disabled": return "dmPolicy=disabled";
2514
+ case "dm_policy_pairing_required": return "dmPolicy=pairing (not allowlisted)";
2515
+ case "dm_policy_allowlisted": return `dmPolicy=${params.dmPolicy ?? "allowlist"} (allowlisted)`;
2516
+ case "dm_policy_not_allowlisted": return `dmPolicy=${params.dmPolicy ?? "allowlist"} (not allowlisted)`;
2517
+ case "group_policy_disabled": return "groupPolicy=disabled";
2518
+ case "group_policy_empty_allowlist":
2519
+ case "route_sender_empty": return "groupPolicy=allowlist (empty allowlist)";
2520
+ case "group_policy_not_allowlisted": return "groupPolicy=allowlist (not allowlisted)";
2521
+ case "group_policy_open": return "groupPolicy=open";
2522
+ case "group_policy_allowed": return `groupPolicy=${params.groupPolicy ?? "allowlist"}`;
2523
+ default: return params.reasonCode;
2524
+ }
2525
+ }
2502
2526
  function buildStoredConversationReference(params) {
2503
2527
  const { activity, conversationId, conversationType, teamId, threadId } = params;
2504
2528
  const from = activity.from;
@@ -2594,14 +2618,17 @@ function createMSTeamsMessageHandler(deps) {
2594
2618
  teamId,
2595
2619
  threadId: conversationType === "channel" ? conversationMessageId ?? activity.replyToId ?? void 0 : void 0
2596
2620
  });
2597
- const { dmPolicy, senderId, senderName, pairing, isDirectMessage, channelGate, access, configuredDmAllowFrom, effectiveDmAllowFrom, effectiveGroupAllowFrom, allowNameMatching, groupPolicy } = await resolveMSTeamsSenderAccess({
2621
+ const { dmPolicy, senderId, senderName, pairing, isDirectMessage, channelGate, senderAccess, commandAccess, allowNameMatching, groupPolicy } = await resolveMSTeamsSenderAccess({
2598
2622
  cfg,
2599
- activity
2623
+ activity,
2624
+ hasControlCommand: core.channel.text.hasControlCommand(text, cfg)
2600
2625
  });
2601
- const useAccessGroups = cfg.commands?.useAccessGroups !== false;
2626
+ const commandAuthorized = commandAccess.requested ? commandAccess.authorized : void 0;
2627
+ const effectiveDmAllowFrom = senderAccess.effectiveAllowFrom;
2628
+ const effectiveGroupAllowFrom = senderAccess.effectiveGroupAllowFrom;
2602
2629
  const isChannel = conversationType === "channel";
2603
- if (isDirectMessage && msteamsCfg && access.decision !== "allow") {
2604
- if (access.reason === "dmPolicy=disabled") {
2630
+ if (isDirectMessage && msteamsCfg && senderAccess.decision !== "allow") {
2631
+ if (senderAccess.reasonCode === "dm_policy_disabled") {
2605
2632
  log.info("dropping dm (dms disabled)", {
2606
2633
  sender: senderId,
2607
2634
  label: senderName
@@ -2615,7 +2642,7 @@ function createMSTeamsMessageHandler(deps) {
2615
2642
  senderName,
2616
2643
  allowNameMatching
2617
2644
  });
2618
- if (access.decision === "pairing") {
2645
+ if (senderAccess.decision === "pairing") {
2619
2646
  conversationStore.upsert(conversationId, conversationRef).catch((err) => {
2620
2647
  log.debug?.("failed to save conversation reference", { error: formatUnknownError(err) });
2621
2648
  });
@@ -2636,7 +2663,11 @@ function createMSTeamsMessageHandler(deps) {
2636
2663
  sender: senderId,
2637
2664
  label: senderName,
2638
2665
  dmPolicy,
2639
- reason: access.reason,
2666
+ reason: formatMSTeamsSenderReason({
2667
+ reasonCode: senderAccess.reasonCode,
2668
+ dmPolicy,
2669
+ groupPolicy
2670
+ }),
2640
2671
  allowlistMatch: formatAllowlistMatchMeta(allowMatch)
2641
2672
  });
2642
2673
  return;
@@ -2659,28 +2690,17 @@ function createMSTeamsMessageHandler(deps) {
2659
2690
  });
2660
2691
  return;
2661
2692
  }
2662
- const senderGroupAccess = evaluateSenderGroupAccessForPolicy({
2663
- groupPolicy,
2664
- groupAllowFrom: effectiveGroupAllowFrom,
2665
- senderId,
2666
- isSenderAllowed: (_senderId, allowFrom) => resolveMSTeamsAllowlistMatch({
2667
- allowFrom,
2668
- senderId,
2669
- senderName,
2670
- allowNameMatching
2671
- }).allowed
2672
- });
2673
- if (!senderGroupAccess.allowed && senderGroupAccess.reason === "disabled") {
2693
+ if (!senderAccess.allowed && senderAccess.reasonCode === "group_policy_disabled") {
2674
2694
  log.info("dropping group message (groupPolicy: disabled)", { conversationId });
2675
2695
  log.debug?.("dropping group message (groupPolicy: disabled)", { conversationId });
2676
2696
  return;
2677
2697
  }
2678
- if (!senderGroupAccess.allowed && senderGroupAccess.reason === "empty_allowlist") {
2698
+ if (!senderAccess.allowed && (senderAccess.reasonCode === "group_policy_empty_allowlist" || senderAccess.reasonCode === "route_sender_empty")) {
2679
2699
  log.info("dropping group message (groupPolicy: allowlist, no allowlist)", { conversationId });
2680
2700
  log.debug?.("dropping group message (groupPolicy: allowlist, no allowlist)", { conversationId });
2681
2701
  return;
2682
2702
  }
2683
- if (!senderGroupAccess.allowed && senderGroupAccess.reason === "sender_not_allowlisted") {
2703
+ if (!senderAccess.allowed && senderAccess.reasonCode === "group_policy_not_allowlisted") {
2684
2704
  const allowMatch = resolveMSTeamsAllowlistMatch({
2685
2705
  allowFrom: effectiveGroupAllowFrom,
2686
2706
  senderId,
@@ -2700,30 +2720,7 @@ function createMSTeamsMessageHandler(deps) {
2700
2720
  return;
2701
2721
  }
2702
2722
  }
2703
- const commandDmAllowFrom = isDirectMessage ? effectiveDmAllowFrom : configuredDmAllowFrom;
2704
- const ownerAllowedForCommands = isMSTeamsGroupAllowed({
2705
- groupPolicy: "allowlist",
2706
- allowFrom: commandDmAllowFrom,
2707
- senderId,
2708
- senderName,
2709
- allowNameMatching
2710
- });
2711
- const groupAllowedForCommands = isMSTeamsGroupAllowed({
2712
- groupPolicy: "allowlist",
2713
- allowFrom: effectiveGroupAllowFrom,
2714
- senderId,
2715
- senderName,
2716
- allowNameMatching
2717
- });
2718
- const { commandAuthorized, shouldBlock } = resolveDualTextControlCommandGate({
2719
- useAccessGroups,
2720
- primaryConfigured: commandDmAllowFrom.length > 0,
2721
- primaryAllowed: ownerAllowedForCommands,
2722
- secondaryConfigured: effectiveGroupAllowFrom.length > 0,
2723
- secondaryAllowed: groupAllowedForCommands,
2724
- hasControlCommand: core.channel.text.hasControlCommand(text, cfg)
2725
- });
2726
- if (shouldBlock) {
2723
+ if (commandAccess.shouldBlockControlCommand) {
2727
2724
  logInboundDrop({
2728
2725
  log: logVerboseMessage,
2729
2726
  channel: "msteams",
@@ -3176,11 +3173,6 @@ function createMSTeamsReactionHandler(deps) {
3176
3173
  const { cfg, log } = deps;
3177
3174
  const core = getMSTeamsRuntime();
3178
3175
  const msteamsCfg = cfg.channels?.msteams;
3179
- const pairing = createChannelPairingController({
3180
- core,
3181
- channel: "msteams",
3182
- accountId: DEFAULT_ACCOUNT_ID
3183
- });
3184
3176
  return async function handleReaction(context, direction) {
3185
3177
  const activity = context.activity;
3186
3178
  const reactions = direction === "added" ? activity.reactionsAdded ?? [] : activity.reactionsRemoved ?? [];
@@ -3200,74 +3192,19 @@ function createMSTeamsReactionHandler(deps) {
3200
3192
  const isDirectMessage = !isGroupChat && !isChannel;
3201
3193
  const senderId = from.aadObjectId ?? from.id;
3202
3194
  const senderName = from.name ?? from.id;
3203
- const dmPolicy = msteamsCfg?.dmPolicy ?? "pairing";
3204
- const storedAllowFrom = await readStoreAllowFromForDmPolicy({
3205
- provider: "msteams",
3206
- accountId: pairing.accountId,
3207
- dmPolicy,
3208
- readStore: pairing.readStoreForDmPolicy
3209
- });
3210
- const dmAllowFrom = msteamsCfg?.allowFrom ?? [];
3211
- const groupAllowFrom = msteamsCfg?.groupAllowFrom;
3212
- const resolvedAllowFromLists = resolveEffectiveAllowFromLists({
3213
- allowFrom: dmAllowFrom,
3214
- groupAllowFrom,
3215
- storeAllowFrom: storedAllowFrom,
3216
- dmPolicy
3217
- });
3218
- const defaultGroupPolicy = resolveDefaultGroupPolicy(cfg);
3219
- if (isDirectMessage && msteamsCfg) {
3220
- const access = resolveDmGroupAccessWithLists({
3221
- isGroup: false,
3222
- dmPolicy,
3223
- groupPolicy: msteamsCfg.groupPolicy ?? defaultGroupPolicy ?? "allowlist",
3224
- allowFrom: dmAllowFrom,
3225
- groupAllowFrom,
3226
- storeAllowFrom: storedAllowFrom,
3227
- groupAllowFromFallbackToAllowFrom: false,
3228
- isSenderAllowed: (allowFrom) => resolveMSTeamsAllowlistMatch({
3229
- allowFrom,
3230
- senderId,
3231
- senderName,
3232
- allowNameMatching: isDangerousNameMatchingEnabled(msteamsCfg)
3233
- }).allowed
3195
+ if (msteamsCfg) {
3196
+ const senderAccess = await resolveMSTeamsSenderAccess({
3197
+ cfg,
3198
+ activity
3234
3199
  });
3235
- if (access.decision !== "allow") {
3236
- log.debug?.("dropping reaction (dm access denied)", {
3200
+ if (senderAccess.senderAccess.decision !== "allow") {
3201
+ log.debug?.("dropping reaction (access denied)", {
3237
3202
  sender: senderId,
3238
- reason: access.reason
3203
+ reason: senderAccess.senderAccess.reasonCode
3239
3204
  });
3240
3205
  return;
3241
3206
  }
3242
3207
  }
3243
- if (!isDirectMessage && msteamsCfg) {
3244
- const teamId = activity.channelData?.team?.id;
3245
- const teamName = activity.channelData?.team?.name;
3246
- const channelName = activity.channelData?.channel?.name;
3247
- const channelGate = resolveMSTeamsRouteConfig({
3248
- cfg: msteamsCfg,
3249
- teamId,
3250
- teamName,
3251
- conversationId,
3252
- channelName,
3253
- allowNameMatching: isDangerousNameMatchingEnabled(msteamsCfg)
3254
- });
3255
- if (channelGate.allowlistConfigured && !channelGate.allowed) {
3256
- log.debug?.("dropping reaction (not in team/channel allowlist)", { conversationId });
3257
- return;
3258
- }
3259
- const effectiveGroupAllowFrom = resolvedAllowFromLists.effectiveGroupAllowFrom;
3260
- if (!isMSTeamsGroupAllowed({
3261
- groupPolicy: msteamsCfg.groupPolicy ?? defaultGroupPolicy ?? "allowlist",
3262
- allowFrom: effectiveGroupAllowFrom,
3263
- senderId,
3264
- senderName,
3265
- allowNameMatching: isDangerousNameMatchingEnabled(msteamsCfg)
3266
- })) {
3267
- log.debug?.("dropping reaction (sender not in group allowlist)", { sender: senderId });
3268
- return;
3269
- }
3270
- }
3271
3208
  const teamId = isDirectMessage ? void 0 : activity.channelData?.team?.id;
3272
3209
  const route = core.channel.routing.resolveAgentRoute({
3273
3210
  cfg,
@@ -3551,7 +3488,7 @@ async function isInvokeAuthorized(params) {
3551
3488
  const { msteamsCfg, isDirectMessage, conversationId, senderId } = resolved;
3552
3489
  if (!msteamsCfg) return true;
3553
3490
  const maybeInvokeName = includeInvokeName ? { name: context.activity.name } : void 0;
3554
- if (isDirectMessage && resolved.access.decision !== "allow") {
3491
+ if (isDirectMessage && resolved.senderAccess.decision !== "allow") {
3555
3492
  deps.log.debug?.(deniedLogs.dm, {
3556
3493
  sender: senderId,
3557
3494
  conversationId,
@@ -3568,7 +3505,7 @@ async function isInvokeAuthorized(params) {
3568
3505
  });
3569
3506
  return false;
3570
3507
  }
3571
- if (!isDirectMessage && !resolved.senderGroupAccess.allowed) {
3508
+ if (!isDirectMessage && !resolved.senderAccess.allowed) {
3572
3509
  deps.log.debug?.(deniedLogs.group, {
3573
3510
  sender: senderId,
3574
3511
  conversationId,
package/dist/test-api.js CHANGED
@@ -1,2 +1,2 @@
1
- import { t as msteamsPlugin } from "./channel-VjDbklu8.js";
1
+ import { t as msteamsPlugin } from "./channel-kz4Rzh2w.js";
2
2
  export { msteamsPlugin };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openclaw/msteams",
3
- "version": "2026.5.9-beta.1",
3
+ "version": "2026.5.10-beta.2",
4
4
  "description": "OpenClaw Microsoft Teams channel plugin",
5
5
  "repository": {
6
6
  "type": "git",
@@ -22,7 +22,7 @@
22
22
  "openclaw": "workspace:*"
23
23
  },
24
24
  "peerDependencies": {
25
- "openclaw": ">=2026.5.9-beta.1"
25
+ "openclaw": ">=2026.5.10-beta.2"
26
26
  },
27
27
  "peerDependenciesMeta": {
28
28
  "openclaw": {
@@ -58,10 +58,10 @@
58
58
  "minHostVersion": ">=2026.4.10"
59
59
  },
60
60
  "compat": {
61
- "pluginApi": ">=2026.5.9-beta.1"
61
+ "pluginApi": ">=2026.5.10-beta.2"
62
62
  },
63
63
  "build": {
64
- "openclawVersion": "2026.5.9-beta.1"
64
+ "openclawVersion": "2026.5.10-beta.2"
65
65
  },
66
66
  "release": {
67
67
  "publishToClawHub": true,