@openclaw/msteams 2026.5.16-beta.1 → 2026.5.16-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
1
  import { i as msteamsSetupAdapter, n as openDelegatedOAuthUrl, r as createMSTeamsSetupWizardBase, t as msteamsSetupWizard } from "./setup-surface-CVdYNhQt.js";
2
- import { t as msteamsPlugin } from "./channel-CQpy2Rqt.js";
2
+ import { t as msteamsPlugin } from "./channel-CIHTCPzU.js";
3
3
  export { createMSTeamsSetupWizardBase, msteamsPlugin, msteamsSetupAdapter, msteamsSetupWizard, openDelegatedOAuthUrl };
@@ -313,7 +313,7 @@ const collectMSTeamsSecurityWarnings = createAllowlistProviderGroupPolicyWarning
313
313
  resolveGroupPolicy: ({ cfg }) => cfg.channels?.msteams?.groupPolicy,
314
314
  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."] : []
315
315
  });
316
- const loadMSTeamsChannelRuntime = createLazyRuntimeNamedExport(() => import("./channel.runtime-CkJ9YLb5.js"), "msTeamsChannelRuntime");
316
+ const loadMSTeamsChannelRuntime = createLazyRuntimeNamedExport(() => import("./channel.runtime-BDy3Ic97.js"), "msTeamsChannelRuntime");
317
317
  const resolveMSTeamsChannelConfig = (cfg) => ({
318
318
  allowFrom: cfg.channels?.msteams?.allowFrom,
319
319
  defaultTo: cfg.channels?.msteams?.defaultTo
@@ -1095,7 +1095,7 @@ const msteamsPlugin = createChatChannelPlugin({
1095
1095
  })
1096
1096
  }),
1097
1097
  gateway: { startAccount: async (ctx) => {
1098
- const { monitorMSTeamsProvider } = await import("./src-Budn-V0e.js");
1098
+ const { monitorMSTeamsProvider } = await import("./src-BqTYyUD8.js");
1099
1099
  const port = ctx.cfg.channels?.msteams?.webhook?.port ?? 3978;
1100
1100
  ctx.setStatus({
1101
1101
  accountId: ctx.accountId,
@@ -1,2 +1,2 @@
1
- import { t as msteamsPlugin } from "./channel-CQpy2Rqt.js";
1
+ import { t as msteamsPlugin } from "./channel-CIHTCPzU.js";
2
2
  export { msteamsPlugin };
@@ -1,6 +1,6 @@
1
1
  import { s as chunkTextForOutbound } from "./runtime-api-C3EIaIpt.js";
2
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-ChPPxUzD.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-btgicl3B.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-CHlUM18k.js";
4
4
  import { normalizeLowercaseStringOrEmpty } from "openclaw/plugin-sdk/string-coerce-runtime";
5
5
  import { createAttachedChannelResultAdapter } from "openclaw/plugin-sdk/channel-send-result";
6
6
  import { resolveOutboundSendDep } from "openclaw/plugin-sdk/outbound-send-deps";
@@ -1,6 +1,6 @@
1
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
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-ChPPxUzD.js";
3
- import { i as resolveMSTeamsRouteConfig, r as resolveMSTeamsReplyPolicy } from "./channel-CQpy2Rqt.js";
3
+ import { i as resolveMSTeamsRouteConfig, r as resolveMSTeamsReplyPolicy } from "./channel-CIHTCPzU.js";
4
4
  import { createMessageReceiptFromOutboundResults } from "openclaw/plugin-sdk/channel-message";
5
5
  import { isRecord, normalizeLowercaseStringOrEmpty, normalizeOptionalLowercaseString, normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
6
6
  import { withFileLock } from "openclaw/plugin-sdk/file-lock";
@@ -1,8 +1,8 @@
1
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
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-ChPPxUzD.js";
3
3
  import { d as resolveMSTeamsUserAllowlist, u as resolveMSTeamsChannelAllowlist } from "./setup-surface-CVdYNhQt.js";
4
- import { i as resolveMSTeamsRouteConfig, n as resolveMSTeamsAllowlistMatch, r as resolveMSTeamsReplyPolicy } from "./channel-CQpy2Rqt.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-btgicl3B.js";
4
+ import { i as resolveMSTeamsRouteConfig, n as resolveMSTeamsAllowlistMatch, r as resolveMSTeamsReplyPolicy } from "./channel-CIHTCPzU.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-CHlUM18k.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/string-coerce-runtime";
@@ -869,6 +869,13 @@ function scopeCandidatesForUrl(url) {
869
869
  function isRedirectStatus(status) {
870
870
  return status === 301 || status === 302 || status === 303 || status === 307 || status === 308;
871
871
  }
872
+ async function resolveInlineDataImageMime(inline) {
873
+ const mime = normalizeOptionalLowercaseString(await getMSTeamsRuntime().media.detectMime({
874
+ buffer: inline.data,
875
+ headerMime: inline.contentType
876
+ }) ?? inline.contentType);
877
+ return mime?.startsWith("image/") ? mime : void 0;
878
+ }
872
879
  async function fetchWithAuthFallback(params) {
873
880
  const firstAttempt = await safeFetchWithPolicy({
874
881
  url: params.url,
@@ -939,11 +946,13 @@ async function downloadMSTeamsAttachments(params) {
939
946
  if (inline.kind !== "data") continue;
940
947
  if (inline.data.byteLength > params.maxBytes) continue;
941
948
  try {
942
- const saved = await getMSTeamsRuntime().channel.media.saveMediaBuffer(inline.data, inline.contentType, "inbound", params.maxBytes);
949
+ const contentType = await resolveInlineDataImageMime(inline);
950
+ if (!contentType) continue;
951
+ const saved = await getMSTeamsRuntime().channel.media.saveMediaBuffer(inline.data, contentType, "inbound", params.maxBytes);
943
952
  out.push({
944
953
  path: saved.path,
945
954
  contentType: saved.contentType,
946
- placeholder: inline.placeholder
955
+ placeholder: inferPlaceholder({ contentType: saved.contentType ?? contentType })
947
956
  });
948
957
  } catch (err) {
949
958
  params.logger?.warn?.("msteams inline attachment decode failed", { error: err instanceof Error ? err.message : String(err) });
package/dist/test-api.js CHANGED
@@ -1,2 +1,2 @@
1
- import { t as msteamsPlugin } from "./channel-CQpy2Rqt.js";
1
+ import { t as msteamsPlugin } from "./channel-CIHTCPzU.js";
2
2
  export { msteamsPlugin };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openclaw/msteams",
3
- "version": "2026.5.16-beta.1",
3
+ "version": "2026.5.16-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.16-beta.1"
25
+ "openclaw": ">=2026.5.16-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.16-beta.1"
61
+ "pluginApi": ">=2026.5.16-beta.2"
62
62
  },
63
63
  "build": {
64
- "openclawVersion": "2026.5.16-beta.1"
64
+ "openclawVersion": "2026.5.16-beta.2"
65
65
  },
66
66
  "release": {
67
67
  "publishToClawHub": true,