@openclaw/msteams 2026.8.1 → 2026.8.33

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.
Files changed (35) hide show
  1. package/dist/{adapter.runtime-8g-MOPfb.cjs → .setup/adapter.runtime-C_ZhLOUo.cjs} +2 -2
  2. package/dist/{approval-card-B6ZIMO83.cjs → .setup/approval-card-BEblaIto.cjs} +1 -1
  3. package/dist/{approval-handler.runtime-B-ZA6Vjp.cjs → .setup/approval-handler.runtime-DfLMWSuU.cjs} +4 -4
  4. package/dist/{channel-ChmCvkuA.cjs → .setup/channel-CmMERcLc.cjs} +19 -15
  5. package/dist/{channel.runtime-D3qqruU3.cjs → .setup/channel.runtime-BeV2JXyi.cjs} +39 -25
  6. package/dist/{channel.setup-CKb8aKCV.cjs → .setup/channel.setup-CFpwpvxP.cjs} +20 -16
  7. package/dist/{messenger-Ctb9_CO7.cjs → .setup/messenger-DGDM-_EM.cjs} +22 -16
  8. package/dist/{oauth-BV7HWGe0.cjs → .setup/oauth-g_brBwq-.cjs} +4 -3
  9. package/dist/{polls-DvuJvaDG.cjs → .setup/polls-P86qBpeV.cjs} +5 -4
  10. package/dist/{reaction-types-DtWOWuDN.cjs → .setup/reaction-types-5XmyLq9G.cjs} +3 -2
  11. package/dist/{resolve-allowlist-CWbvAW4v.cjs → .setup/resolve-allowlist-DmDXkQwc.cjs} +6 -5
  12. package/dist/{rolldown-runtime-D6vf50IK.cjs → .setup/rolldown-runtime-VH7oDXx4.cjs} +1 -1
  13. package/dist/.setup/secret-contract-api-ChQdBeU1.cjs +4 -0
  14. package/dist/.setup/secret-contract-api-ipiUsANg.cjs +28 -0
  15. package/dist/{send-Bym7IH-v.cjs → .setup/send-BJIzpG1l.cjs} +17 -13
  16. package/dist/.setup/setup-plugin-api-kkSuo801.cjs +3 -0
  17. package/dist/{src-BGhvpEOP.cjs → .setup/src-syvsoIGp.cjs} +99 -89
  18. package/dist/{sso-token-store-ChhO1f4i.cjs → .setup/sso-token-store-CNbRhz-A.cjs} +1 -1
  19. package/dist/{thread-session-Br3R0ovy.cjs → .setup/thread-session-CPVeQiGj.cjs} +1 -1
  20. package/dist/api.cjs +2 -2
  21. package/dist/channel-config-api.cjs +1 -1
  22. package/dist/channel-plugin-api.cjs +1 -1
  23. package/dist/configured-state.cjs +1 -1
  24. package/dist/directory-contract-api.cjs +1 -1
  25. package/dist/doctor-contract-api.cjs +4 -4
  26. package/dist/qa-runner-api.cjs +1 -1
  27. package/dist/runtime-api.cjs +1 -1
  28. package/dist/secret-contract-api.cjs +4 -13
  29. package/dist/setup-entry.cjs +5 -3
  30. package/dist/setup-plugin-api.cjs +1 -1
  31. package/package.json +5 -5
  32. /package/dist/{config-schema-MyN2lamA.cjs → .setup/config-schema-MyN2lamA.cjs} +0 -0
  33. /package/dist/{delegated-state-DiEz9JIa.cjs → .setup/delegated-state-DiEz9JIa.cjs} +0 -0
  34. /package/dist/{runtime-gZTAuFux.cjs → .setup/runtime-gZTAuFux.cjs} +0 -0
  35. /package/dist/{secret-input-C65t6kjM.cjs → .setup/secret-input-C65t6kjM.cjs} +0 -0
@@ -1,4 +1,5 @@
1
- const require_rolldown_runtime = require("./rolldown-runtime-D6vf50IK.cjs");
1
+ const require_rolldown_runtime = require("./rolldown-runtime-VH7oDXx4.cjs");
2
+ let node_url = require("node:url");
2
3
  let openclaw_plugin_sdk_ssrf_runtime = require("openclaw/plugin-sdk/ssrf-runtime");
3
4
  let node_crypto = require("node:crypto");
4
5
  let node_fs_promises = require("node:fs/promises");
@@ -7,7 +8,6 @@ let node_path = require("node:path");
7
8
  node_path = require_rolldown_runtime.__toESM(node_path, 1);
8
9
  let openclaw_plugin_sdk_error_runtime = require("openclaw/plugin-sdk/error-runtime");
9
10
  let node_timers_promises = require("node:timers/promises");
10
- let node_url = require("node:url");
11
11
  let node_events = require("node:events");
12
12
  let node_http = require("node:http");
13
13
  //#region extensions/msteams/src/qa/bot-framework-server.ts
@@ -1,4 +1,4 @@
1
- const require_rolldown_runtime = require("./rolldown-runtime-D6vf50IK.cjs");
1
+ const require_rolldown_runtime = require("./rolldown-runtime-VH7oDXx4.cjs");
2
2
  let openclaw_plugin_sdk_string_coerce_runtime = require("openclaw/plugin-sdk/string-coerce-runtime");
3
3
  let node_crypto = require("node:crypto");
4
4
  node_crypto = require_rolldown_runtime.__toESM(node_crypto, 1);
@@ -1,7 +1,7 @@
1
- const require_resolve_allowlist = require("./resolve-allowlist-CWbvAW4v.cjs");
2
- const require_channel = require("./channel-ChmCvkuA.cjs");
3
- const require_approval_card = require("./approval-card-B6ZIMO83.cjs");
4
- const require_send = require("./send-Bym7IH-v.cjs");
1
+ const require_resolve_allowlist = require("./resolve-allowlist-DmDXkQwc.cjs");
2
+ const require_channel = require("./channel-CmMERcLc.cjs");
3
+ const require_approval_card = require("./approval-card-BEblaIto.cjs");
4
+ const require_send = require("./send-BJIzpG1l.cjs");
5
5
  let openclaw_plugin_sdk_account_id = require("openclaw/plugin-sdk/account-id");
6
6
  let openclaw_plugin_sdk_approval_native_runtime = require("openclaw/plugin-sdk/approval-native-runtime");
7
7
  let openclaw_plugin_sdk_approval_handler_runtime = require("openclaw/plugin-sdk/approval-handler-runtime");
@@ -1,8 +1,8 @@
1
- require("./runtime-api.cjs");
2
- const require_resolve_allowlist = require("./resolve-allowlist-CWbvAW4v.cjs");
3
- const require_directory_contract_api = require("./directory-contract-api.cjs");
4
- const require_thread_session = require("./thread-session-Br3R0ovy.cjs");
5
- const require_channel_setup = require("./channel.setup-CKb8aKCV.cjs");
1
+ require("../runtime-api.cjs");
2
+ const require_resolve_allowlist = require("./resolve-allowlist-DmDXkQwc.cjs");
3
+ const require_directory_contract_api = require("../directory-contract-api.cjs");
4
+ const require_thread_session = require("./thread-session-CPVeQiGj.cjs");
5
+ const require_channel_setup = require("./channel.setup-CFpwpvxP.cjs");
6
6
  let openclaw_plugin_sdk_approval_handler_adapter_runtime = require("openclaw/plugin-sdk/approval-handler-adapter-runtime");
7
7
  let openclaw_plugin_sdk_channel_core = require("openclaw/plugin-sdk/channel-core");
8
8
  let openclaw_plugin_sdk_channel_outbound = require("openclaw/plugin-sdk/channel-outbound");
@@ -105,18 +105,20 @@ function resolveMSTeamsRouteConfig(params) {
105
105
  const channelName = params.channelName?.trim();
106
106
  const teams = params.cfg?.teams ?? {};
107
107
  const allowlistConfigured = Object.keys(teams).length > 0;
108
+ const teamCandidates = (0, openclaw_plugin_sdk_channel_targets.buildChannelKeyCandidates)(teamId, params.allowNameMatching ? teamName : void 0, params.allowNameMatching && teamName ? (0, openclaw_plugin_sdk_channel_targets.normalizeChannelSlug)(teamName) : void 0);
108
109
  const teamMatch = (0, openclaw_plugin_sdk_channel_targets.resolveChannelEntryMatchWithFallback)({
109
110
  entries: teams,
110
- keys: (0, openclaw_plugin_sdk_channel_targets.buildChannelKeyCandidates)(teamId, params.allowNameMatching ? teamName : void 0, params.allowNameMatching && teamName ? (0, openclaw_plugin_sdk_channel_targets.normalizeChannelSlug)(teamName) : void 0),
111
+ keys: teamCandidates,
111
112
  wildcardKey: "*",
112
113
  normalizeKey: openclaw_plugin_sdk_channel_targets.normalizeChannelSlug
113
114
  });
114
115
  const teamConfig = teamMatch.entry;
115
116
  const channels = teamConfig?.channels ?? {};
116
117
  const channelAllowlistConfigured = Object.keys(channels).length > 0;
118
+ const channelCandidates = (0, openclaw_plugin_sdk_channel_targets.buildChannelKeyCandidates)(conversationId, params.allowNameMatching ? channelName : void 0, params.allowNameMatching && channelName ? (0, openclaw_plugin_sdk_channel_targets.normalizeChannelSlug)(channelName) : void 0);
117
119
  const channelMatch = (0, openclaw_plugin_sdk_channel_targets.resolveChannelEntryMatchWithFallback)({
118
120
  entries: channels,
119
- keys: (0, openclaw_plugin_sdk_channel_targets.buildChannelKeyCandidates)(conversationId, params.allowNameMatching ? channelName : void 0, params.allowNameMatching && channelName ? (0, openclaw_plugin_sdk_channel_targets.normalizeChannelSlug)(channelName) : void 0),
121
+ keys: channelCandidates,
120
122
  wildcardKey: "*",
121
123
  normalizeKey: openclaw_plugin_sdk_channel_targets.normalizeChannelSlug
122
124
  });
@@ -158,11 +160,12 @@ function resolveMSTeamsGroupToolPolicy(params) {
158
160
  });
159
161
  if (resolved !== void 0) return resolved;
160
162
  if (scope.path.length > 1) return;
163
+ const scanScope = resolveMSTeamsCrossTeamScanScope({
164
+ cfg,
165
+ groupId: params.groupId
166
+ });
161
167
  return (0, openclaw_plugin_sdk_channel_policy.resolveScopeToolsPolicy)({
162
- ...resolveMSTeamsCrossTeamScanScope({
163
- cfg,
164
- groupId: params.groupId
165
- }),
168
+ ...scanScope,
166
169
  ...senderScope
167
170
  });
168
171
  }
@@ -323,7 +326,7 @@ const msTeamsLazyApprovalNativeRuntime = (0, openclaw_plugin_sdk_approval_handle
323
326
  request
324
327
  }),
325
328
  load: async () => {
326
- const { msTeamsApprovalNativeRuntime } = await Promise.resolve().then(() => require("./approval-handler.runtime-B-ZA6Vjp.cjs"));
329
+ const { msTeamsApprovalNativeRuntime } = await Promise.resolve().then(() => require("./approval-handler.runtime-DfLMWSuU.cjs"));
327
330
  return msTeamsApprovalNativeRuntime;
328
331
  }
329
332
  });
@@ -563,7 +566,8 @@ async function resolveConfiguredBotFrameworkTeamKey(cfg, graphTeamId) {
563
566
  if (!configuredTeams) return;
564
567
  const stableConfiguredKeys = Object.keys(configuredTeams).filter((teamKey) => teamKey !== "*" && /^19:.+@thread\./i.test(teamKey));
565
568
  if (stableConfiguredKeys.length === 0) return;
566
- const channelResult = await require_resolve_allowlist.listChannelsForTeamWithPageInfo(await require_resolve_allowlist.resolveGraphToken(cfg), graphTeamId);
569
+ const token = await require_resolve_allowlist.resolveGraphToken(cfg);
570
+ const channelResult = await require_resolve_allowlist.listChannelsForTeamWithPageInfo(token, graphTeamId);
567
571
  if (channelResult.truncated) return;
568
572
  const channelIds = new Set(channelResult.items.map((channel) => channel.id?.trim()).filter((channelId) => Boolean(channelId)));
569
573
  const matches = stableConfiguredKeys.filter((teamKey) => channelIds.has(teamKey));
@@ -773,7 +777,7 @@ const collectMSTeamsSecurityFindings = openclaw_plugin_sdk_channel_policy.create
773
777
  severity: "critical",
774
778
  title: "MS Teams security warning"
775
779
  });
776
- const loadMSTeamsChannelRuntime = (0, openclaw_plugin_sdk_lazy_runtime.createLazyRuntimeNamedExport)(() => Promise.resolve().then(() => require("./channel.runtime-D3qqruU3.cjs")), "msTeamsChannelRuntime");
780
+ const loadMSTeamsChannelRuntime = (0, openclaw_plugin_sdk_lazy_runtime.createLazyRuntimeNamedExport)(() => Promise.resolve().then(() => require("./channel.runtime-BeV2JXyi.cjs")), "msTeamsChannelRuntime");
777
781
  function jsonActionResult(data) {
778
782
  return {
779
783
  content: [{
@@ -1516,7 +1520,7 @@ const msteamsPlugin = (0, openclaw_plugin_sdk_channel_core.createChatChannelPlug
1516
1520
  })
1517
1521
  }),
1518
1522
  gateway: { startAccount: async (ctx) => {
1519
- const { monitorMSTeamsProvider } = await Promise.resolve().then(() => require("./src-BGhvpEOP.cjs"));
1523
+ const { monitorMSTeamsProvider } = await Promise.resolve().then(() => require("./src-syvsoIGp.cjs"));
1520
1524
  const port = ctx.cfg.channels?.msteams?.webhook?.port ?? 3978;
1521
1525
  const statusSink = (0, openclaw_plugin_sdk_channel_outbound.createAccountStatusSink)({
1522
1526
  accountId: ctx.accountId,
@@ -1,10 +1,10 @@
1
- require("./runtime-api.cjs");
2
- const require_resolve_allowlist = require("./resolve-allowlist-CWbvAW4v.cjs");
3
- const require_channel = require("./channel-ChmCvkuA.cjs");
4
- const require_channel_setup = require("./channel.setup-CKb8aKCV.cjs");
5
- const require_polls = require("./polls-DvuJvaDG.cjs");
6
- const require_send = require("./send-Bym7IH-v.cjs");
7
- const require_reaction_types = require("./reaction-types-DtWOWuDN.cjs");
1
+ require("../runtime-api.cjs");
2
+ const require_resolve_allowlist = require("./resolve-allowlist-DmDXkQwc.cjs");
3
+ const require_channel = require("./channel-CmMERcLc.cjs");
4
+ const require_channel_setup = require("./channel.setup-CFpwpvxP.cjs");
5
+ const require_polls = require("./polls-P86qBpeV.cjs");
6
+ const require_send = require("./send-BJIzpG1l.cjs");
7
+ const require_reaction_types = require("./reaction-types-5XmyLq9G.cjs");
8
8
  let openclaw_plugin_sdk_channel_outbound = require("openclaw/plugin-sdk/channel-outbound");
9
9
  let openclaw_plugin_sdk_string_coerce_runtime = require("openclaw/plugin-sdk/string-coerce-runtime");
10
10
  let openclaw_plugin_sdk_reply_payload = require("openclaw/plugin-sdk/reply-payload");
@@ -16,10 +16,12 @@ let openclaw_plugin_sdk_string_normalization_runtime = require("openclaw/plugin-
16
16
  async function listMSTeamsDirectoryPeersLive(params) {
17
17
  const query = require_resolve_allowlist.normalizeQuery(params.query);
18
18
  if (!query) return [];
19
+ const token = await require_resolve_allowlist.resolveGraphToken(params.cfg);
20
+ const limit = typeof params.limit === "number" && params.limit > 0 ? params.limit : 20;
19
21
  return (await require_resolve_allowlist.searchGraphUsers({
20
- token: await require_resolve_allowlist.resolveGraphToken(params.cfg),
22
+ token,
21
23
  query,
22
- top: typeof params.limit === "number" && params.limit > 0 ? params.limit : 20
24
+ top: limit
23
25
  })).map((user) => {
24
26
  const id = user.id?.trim();
25
27
  if (!id) return null;
@@ -132,9 +134,10 @@ function resolveConversationPath(to) {
132
134
  async function getMessageMSTeams(params) {
133
135
  const token = await require_resolve_allowlist.resolveGraphToken(params.cfg);
134
136
  const { basePath } = resolveConversationPath(await resolveGraphConversationId(params.to));
137
+ const path = `${basePath}/messages/${encodeURIComponent(params.messageId)}`;
135
138
  const msg = await require_resolve_allowlist.fetchGraphJson({
136
139
  token,
137
- path: `${basePath}/messages/${encodeURIComponent(params.messageId)}`
140
+ path
138
141
  });
139
142
  return {
140
143
  id: msg.id ?? params.messageId,
@@ -182,9 +185,10 @@ async function unpinMessageMSTeams(params) {
182
185
  const token = await require_resolve_allowlist.resolveGraphToken(params.cfg);
183
186
  const conv = resolveConversationPath(await resolveGraphConversationId(params.to));
184
187
  if (conv.kind === "channel") throw new Error("Pin/unpin is not supported for channel messages on Graph v1.0. Only chat conversations support pinned messages.");
188
+ const path = `${conv.basePath}/pinnedMessages/${encodeURIComponent(params.pinnedMessageId)}`;
185
189
  await require_resolve_allowlist.deleteGraphRequest({
186
190
  token,
187
- path: `${conv.basePath}/pinnedMessages/${encodeURIComponent(params.pinnedMessageId)}`
191
+ path
188
192
  });
189
193
  return { ok: true };
190
194
  }
@@ -237,9 +241,10 @@ async function reactMessageMSTeams(params) {
237
241
  const reactionType = require_reaction_types.resolveMSTeamsReactionEmoji(params.reactionType);
238
242
  const token = await require_resolve_allowlist.resolveGraphToken(params.cfg, { preferDelegated: true });
239
243
  const { basePath } = resolveConversationPath(await resolveGraphConversationId(params.to));
244
+ const path = `${basePath}/messages/${encodeURIComponent(params.messageId)}/setReaction`;
240
245
  await require_resolve_allowlist.mutateGraphJson({
241
246
  token,
242
- path: `${basePath}/messages/${encodeURIComponent(params.messageId)}/setReaction`,
247
+ path,
243
248
  method: "POST",
244
249
  body: { reactionType },
245
250
  beta: true
@@ -256,9 +261,10 @@ async function unreactMessageMSTeams(params) {
256
261
  const reactionType = require_reaction_types.resolveMSTeamsReactionEmoji(params.reactionType);
257
262
  const token = await require_resolve_allowlist.resolveGraphToken(params.cfg, { preferDelegated: true });
258
263
  const { basePath } = resolveConversationPath(await resolveGraphConversationId(params.to));
264
+ const path = `${basePath}/messages/${encodeURIComponent(params.messageId)}/unsetReaction`;
259
265
  await require_resolve_allowlist.mutateGraphJson({
260
266
  token,
261
- path: `${basePath}/messages/${encodeURIComponent(params.messageId)}/unsetReaction`,
267
+ path,
262
268
  method: "POST",
263
269
  body: { reactionType },
264
270
  beta: true
@@ -272,9 +278,10 @@ async function unreactMessageMSTeams(params) {
272
278
  async function listReactionsMSTeams(params) {
273
279
  const token = await require_resolve_allowlist.resolveGraphToken(params.cfg);
274
280
  const { basePath } = resolveConversationPath(await resolveGraphConversationId(params.to));
281
+ const path = `${basePath}/messages/${encodeURIComponent(params.messageId)}`;
275
282
  const msg = await require_resolve_allowlist.fetchGraphJson({
276
283
  token,
277
- path: `${basePath}/messages/${encodeURIComponent(params.messageId)}`
284
+ path
278
285
  });
279
286
  const grouped = /* @__PURE__ */ new Map();
280
287
  for (const reaction of msg.reactions ?? []) {
@@ -355,7 +362,7 @@ async function searchMessagesMSTeams(params) {
355
362
  messages,
356
363
  truncated: false
357
364
  };
358
- truncated = page === SEARCH_MAX_PAGES - 1;
365
+ truncated = page === 9;
359
366
  }
360
367
  return {
361
368
  messages,
@@ -436,9 +443,10 @@ async function removeParticipantMSTeams(params) {
436
443
  userId: params.userId
437
444
  });
438
445
  if (!member?.id) throw new Error(`User ${params.userId} is not a member of this conversation`);
446
+ const conv = resolveConversationPath(conversationId);
439
447
  await require_resolve_allowlist.deleteGraphRequest({
440
448
  token,
441
- path: `${resolveConversationPath(conversationId).basePath}/members/${encodeURIComponent(member.id)}`
449
+ path: `${conv.basePath}/members/${encodeURIComponent(member.id)}`
442
450
  });
443
451
  return { removed: {
444
452
  userId: params.userId,
@@ -560,9 +568,11 @@ async function listChannelsMSTeams(params) {
560
568
  * Returns id, displayName, description, membershipType, webUrl, and createdDateTime.
561
569
  */
562
570
  async function getChannelInfoMSTeams(params) {
571
+ const token = await require_resolve_allowlist.resolveGraphToken(params.cfg);
572
+ const path = `/teams/${encodeURIComponent(params.teamId)}/channels/${encodeURIComponent(params.channelId)}?$select=id,displayName,description,membershipType,webUrl,createdDateTime`;
563
573
  const ch = await require_resolve_allowlist.fetchGraphJson({
564
- token: await require_resolve_allowlist.resolveGraphToken(params.cfg),
565
- path: `/teams/${encodeURIComponent(params.teamId)}/channels/${encodeURIComponent(params.channelId)}?$select=id,displayName,description,membershipType,webUrl,createdDateTime`
574
+ token,
575
+ path
566
576
  });
567
577
  return { channel: {
568
578
  id: ch.id,
@@ -646,11 +656,14 @@ const msteamsOutbound = {
646
656
  sendPayload: async ({ cfg, to, text, mediaUrl, mediaAccess, mediaLocalRoots, mediaReadFile, payload, deps, onDeliveryResult, threadId }) => {
647
657
  const deliveryTarget = resolveMSTeamsThreadTarget(to, threadId);
648
658
  const presentationCard = (0, openclaw_plugin_sdk_string_coerce_runtime.asOptionalRecord)(payload.channelData?.msteams)?.presentationCard;
649
- if (presentationCard && typeof presentationCard === "object" && !Array.isArray(presentationCard)) return (0, openclaw_plugin_sdk_channel_send_result.attachChannelToResult)("msteams", toMSTeamsOutboundResult(await require_send.sendAdaptiveCardMSTeams({
650
- cfg,
651
- to: deliveryTarget,
652
- card: presentationCard
653
- })));
659
+ if (presentationCard && typeof presentationCard === "object" && !Array.isArray(presentationCard)) {
660
+ const result = await require_send.sendAdaptiveCardMSTeams({
661
+ cfg,
662
+ to: deliveryTarget,
663
+ card: presentationCard
664
+ });
665
+ return (0, openclaw_plugin_sdk_channel_send_result.attachChannelToResult)("msteams", toMSTeamsOutboundResult(result));
666
+ }
654
667
  const mediaUrls = (0, openclaw_plugin_sdk_string_normalization_runtime.normalizeStringEntries)((0, openclaw_plugin_sdk_reply_payload.resolvePayloadMediaUrls)({
655
668
  ...payload,
656
669
  mediaUrl: payload.mediaUrl ?? mediaUrl
@@ -772,10 +785,11 @@ async function probeMSTeams(cfg) {
772
785
  })) throw new Error("Failed to acquire bot token");
773
786
  let graph;
774
787
  try {
775
- const accessToken = require_resolve_allowlist.readAccessToken(await require_resolve_allowlist.withMSTeamsRequestDeadline({
788
+ const graphTokenValue = await require_resolve_allowlist.withMSTeamsRequestDeadline({
776
789
  label: "MS Teams Graph probe token",
777
790
  work: () => tokenProvider.getAccessToken("https://graph.microsoft.com")
778
- }));
791
+ });
792
+ const accessToken = require_resolve_allowlist.readAccessToken(graphTokenValue);
779
793
  const payload = accessToken ? decodeJwtPayload(accessToken) : null;
780
794
  graph = {
781
795
  ok: true,
@@ -1,4 +1,4 @@
1
- const require_resolve_allowlist = require("./resolve-allowlist-CWbvAW4v.cjs");
1
+ const require_resolve_allowlist = require("./resolve-allowlist-DmDXkQwc.cjs");
2
2
  require("./secret-input-C65t6kjM.cjs");
3
3
  const require_config_schema = require("./config-schema-MyN2lamA.cjs");
4
4
  let openclaw_plugin_sdk_string_coerce_runtime = require("openclaw/plugin-sdk/string-coerce-runtime");
@@ -107,16 +107,17 @@ function createMSTeamsSetupWizardBase() {
107
107
  let appPassword = null;
108
108
  let tenantId = null;
109
109
  if (!resolved && !hasConfigCreds) await noteMSTeamsCredentialHelp(prompter);
110
- if (canUseEnv || hasConfigCreds) if (await prompter.confirm({
111
- message: t$1(canUseEnv ? "wizard.msteams.envPrompt" : "wizard.msteams.credentialsKeep"),
112
- initialValue: true
113
- })) next = msteamsSetupAdapter.applyAccountConfig({
114
- cfg: next,
115
- accountId: openclaw_plugin_sdk_setup.DEFAULT_ACCOUNT_ID,
116
- input: {}
117
- });
118
- else ({appId, appPassword, tenantId} = await promptMSTeamsCredentials(prompter));
119
- else ({appId, appPassword, tenantId} = await promptMSTeamsCredentials(prompter));
110
+ if (canUseEnv || hasConfigCreds) {
111
+ if (await prompter.confirm({
112
+ message: t$1(canUseEnv ? "wizard.msteams.envPrompt" : "wizard.msteams.credentialsKeep"),
113
+ initialValue: true
114
+ })) next = msteamsSetupAdapter.applyAccountConfig({
115
+ cfg: next,
116
+ accountId: openclaw_plugin_sdk_setup.DEFAULT_ACCOUNT_ID,
117
+ input: {}
118
+ });
119
+ else ({appId, appPassword, tenantId} = await promptMSTeamsCredentials(prompter));
120
+ } else ({appId, appPassword, tenantId} = await promptMSTeamsCredentials(prompter));
120
121
  if (appId && appPassword && tenantId) next = {
121
122
  ...next,
122
123
  channels: {
@@ -190,7 +191,8 @@ function extractErrorCode(err) {
190
191
  }
191
192
  function extractRetryAfterMs(err) {
192
193
  if (!(0, openclaw_plugin_sdk_string_coerce_runtime.isRecord)(err)) return null;
193
- const directMs = (0, openclaw_plugin_sdk_number_runtime.asFiniteNumberInRange)(err.retryAfterMs ?? err.retry_after_ms, {
194
+ const direct = err.retryAfterMs ?? err.retry_after_ms;
195
+ const directMs = (0, openclaw_plugin_sdk_number_runtime.asFiniteNumberInRange)(direct, {
194
196
  min: 0,
195
197
  max: Number.MAX_SAFE_INTEGER
196
198
  });
@@ -337,12 +339,13 @@ async function promptMSTeamsAllowFrom(params) {
337
339
  "- 00000000-0000-0000-0000-000000000000"
338
340
  ].join("\n"), t("wizard.msteams.allowlistTitle"));
339
341
  while (true) {
340
- const parts = (0, openclaw_plugin_sdk_setup.splitSetupEntries)(await params.prompter.text({
342
+ const entry = await params.prompter.text({
341
343
  message: t("wizard.msteams.allowFromPrompt"),
342
344
  placeholder: "alex@example.com, Alex Johnson",
343
345
  initialValue: existing[0] ? existing[0] : void 0,
344
346
  validate: (value) => value.trim() ? void 0 : t("common.required")
345
- }));
347
+ });
348
+ const parts = (0, openclaw_plugin_sdk_setup.splitSetupEntries)(entry);
346
349
  if (parts.length === 0) {
347
350
  await params.prompter.note(t("wizard.msteams.enterAtLeastOneUser"), t("wizard.msteams.allowlistTitle"));
348
351
  continue;
@@ -365,7 +368,8 @@ async function promptMSTeamsAllowFrom(params) {
365
368
  await params.prompter.note(t("wizard.msteams.couldNotResolve", { entries: unresolved.map((item) => item.input).join(", ") }), t("wizard.msteams.allowlistTitle"));
366
369
  continue;
367
370
  }
368
- const unique = (0, openclaw_plugin_sdk_setup.mergeAllowFromEntries)(existing, resolved.map((item) => item.id));
371
+ const ids = resolved.map((item) => item.id);
372
+ const unique = (0, openclaw_plugin_sdk_setup.mergeAllowFromEntries)(existing, ids);
369
373
  return setMSTeamsAllowFrom(params.cfg, unique);
370
374
  }
371
375
  }
@@ -479,7 +483,7 @@ const msteamsSetupWizard = {
479
483
  };
480
484
  let oauthModule;
481
485
  try {
482
- oauthModule = await Promise.resolve().then(() => require("./oauth-BV7HWGe0.cjs"));
486
+ oauthModule = await Promise.resolve().then(() => require("./oauth-g_brBwq-.cjs"));
483
487
  } catch (err) {
484
488
  await noteDelegatedAuthFailure(err);
485
489
  return {
@@ -1,9 +1,9 @@
1
- const require_rolldown_runtime = require("./rolldown-runtime-D6vf50IK.cjs");
1
+ const require_rolldown_runtime = require("./rolldown-runtime-VH7oDXx4.cjs");
2
2
  const require_runtime = require("./runtime-gZTAuFux.cjs");
3
- require("./runtime-api.cjs");
4
- const require_resolve_allowlist = require("./resolve-allowlist-CWbvAW4v.cjs");
5
- const require_channel_setup = require("./channel.setup-CKb8aKCV.cjs");
6
- const require_polls = require("./polls-DvuJvaDG.cjs");
3
+ require("../runtime-api.cjs");
4
+ const require_resolve_allowlist = require("./resolve-allowlist-DmDXkQwc.cjs");
5
+ const require_channel_setup = require("./channel.setup-CFpwpvxP.cjs");
6
+ const require_polls = require("./polls-P86qBpeV.cjs");
7
7
  let openclaw_plugin_sdk_lazy_runtime = require("openclaw/plugin-sdk/lazy-runtime");
8
8
  let openclaw_plugin_sdk_string_coerce_runtime = require("openclaw/plugin-sdk/string-coerce-runtime");
9
9
  let openclaw_plugin_sdk_provider_http = require("openclaw/plugin-sdk/provider-http");
@@ -161,12 +161,12 @@ async function uploadToConsentUrl(params) {
161
161
  //#endregion
162
162
  //#region extensions/msteams/src/pending-uploads-fs.ts
163
163
  /** TTL for persisted pending uploads (matches in-memory store). */
164
- const PENDING_UPLOAD_TTL_MS$1 = 300 * 1e3;
164
+ const PENDING_UPLOAD_TTL_MS$1 = 3e5;
165
165
  /** Cap to avoid unbounded growth if a process crashes mid-flow. */
166
166
  const MAX_PENDING_UPLOADS = 100;
167
167
  const MAX_CHUNKS_PER_UPLOAD = 3072;
168
168
  const MAX_PENDING_UPLOAD_CHUNK_ROWS = 45e3;
169
- const RAW_CHUNK_BYTES = 36 * 1024;
169
+ const RAW_CHUNK_BYTES = 36864;
170
170
  const PENDING_UPLOAD_META_MAX_ENTRIES = 200;
171
171
  const PENDING_UPLOAD_META_NAMESPACE = "pending-uploads";
172
172
  const PENDING_UPLOAD_CHUNKS_NAMESPACE = "pending-upload-chunks";
@@ -357,7 +357,7 @@ const { pendingUploads, pendingUploadTimers } = (0, openclaw_plugin_sdk_global_s
357
357
  state.pendingUploads.clear();
358
358
  });
359
359
  /** TTL for pending uploads: 5 minutes */
360
- const PENDING_UPLOAD_TTL_MS = 300 * 1e3;
360
+ const PENDING_UPLOAD_TTL_MS = 3e5;
361
361
  /**
362
362
  * Store a file pending user consent.
363
363
  * Returns the upload ID to include in the FileConsentCard context.
@@ -887,14 +887,16 @@ function formatMSTeamsMarkdown(markdown, tableMode) {
887
887
  const mentions = [];
888
888
  const entities = [];
889
889
  const tokenPrefix = createTokenPrefix(markdown, "msteamsformat");
890
- const tableInput = (0, openclaw_plugin_sdk_text_chunking.convertMarkdownTables)(protectMSTeamsMentions(protectMarkdownImages(markdown.replace(MARKDOWN_ENTITY_RE, (entity) => {
890
+ const mentionsProtected = protectMSTeamsMentions(protectMarkdownImages(markdown.replace(MARKDOWN_ENTITY_RE, (entity) => {
891
891
  const index = entities.push(entity) - 1;
892
892
  return `${tokenPrefix}h${index}${TOKEN_END}`;
893
- }), tokenPrefix, images), tokenPrefix, mentions), tableMode);
894
- let restored = restoreTokens((0, openclaw_plugin_sdk_text_chunking.renderMarkdownWithMarkers)(prefixMSTeamsBlockquotes(protectMSTeamsCode((0, openclaw_plugin_sdk_text_chunking.markdownToIR)((tableMode === "off" ? protectRawTablesOutsideFences(tableInput, tokenPrefix, rawTables) : tableInput).replace(ESCAPED_MARKDOWN_RE, (escaped) => {
893
+ }), tokenPrefix, images), tokenPrefix, mentions);
894
+ const tableInput = (0, openclaw_plugin_sdk_text_chunking.convertMarkdownTables)(mentionsProtected, tableMode);
895
+ const protectedMarkdown = (tableMode === "off" ? protectRawTablesOutsideFences(tableInput, tokenPrefix, rawTables) : tableInput).replace(ESCAPED_MARKDOWN_RE, (escaped) => {
895
896
  const index = escapedMarkdown.push(escaped) - 1;
896
897
  return `${tokenPrefix}e${index}${TOKEN_END}`;
897
- }), {
898
+ });
899
+ const ir = prefixMSTeamsBlockquotes(protectMSTeamsCode((0, openclaw_plugin_sdk_text_chunking.markdownToIR)(protectedMarkdown, {
898
900
  autolink: false,
899
901
  enableSpoilers: true,
900
902
  enableTaskLists: true,
@@ -922,7 +924,8 @@ function formatMSTeamsMarkdown(markdown, tableMode) {
922
924
  prefix: `${tokenPrefix}h`,
923
925
  values: entities
924
926
  }
925
- ])), {
927
+ ]));
928
+ let restored = restoreTokens((0, openclaw_plugin_sdk_text_chunking.renderMarkdownWithMarkers)(ir, {
926
929
  styleMarkers: MSTEAMS_MARKERS,
927
930
  escapeText: (text) => text,
928
931
  buildLink: (link) => ({
@@ -1068,7 +1071,10 @@ async function getChatMembers(params) {
1068
1071
  },
1069
1072
  signal
1070
1073
  });
1071
- if (!res.ok) throw await require_resolve_allowlist.createMSTeamsHttpError(res, res.status === 403 ? "Get chat members failed; verify Graph chat-member permissions and tenant access policies" : "Get chat members failed");
1074
+ if (!res.ok) {
1075
+ const message = res.status === 403 ? "Get chat members failed; verify Graph chat-member permissions and tenant access policies" : "Get chat members failed";
1076
+ throw await require_resolve_allowlist.createMSTeamsHttpError(res, message);
1077
+ }
1072
1078
  return ((await (0, openclaw_plugin_sdk_provider_http.readProviderJsonResponse)(res, "msteams.graph-upload.getChatMembers")).value ?? []).map((member) => ({ aadObjectId: member.userId ?? "" })).filter((member) => member.aadObjectId);
1073
1079
  }
1074
1080
  });
@@ -1423,12 +1429,12 @@ async function deleteMSTeamsActivityWithReference(app, source, activityId, optio
1423
1429
  * MSTeams-specific media size limit (100MB).
1424
1430
  * Higher than the default to support Teams file-consent and SharePoint uploads.
1425
1431
  */
1426
- const MSTEAMS_MAX_MEDIA_BYTES = 100 * 1024 * 1024;
1432
+ const MSTEAMS_MAX_MEDIA_BYTES = 104857600;
1427
1433
  /**
1428
1434
  * Threshold for large files that require FileConsentCard flow in personal chats.
1429
1435
  * Files >= 4MB use consent flow; smaller images can use inline base64.
1430
1436
  */
1431
- const FILE_CONSENT_THRESHOLD_BYTES = 4 * 1024 * 1024;
1437
+ const FILE_CONSENT_THRESHOLD_BYTES = 4194304;
1432
1438
  function normalizeConversationId(rawId) {
1433
1439
  return rawId.split(";")[0] ?? rawId;
1434
1440
  }
@@ -1,4 +1,4 @@
1
- const require_resolve_allowlist = require("./resolve-allowlist-CWbvAW4v.cjs");
1
+ const require_resolve_allowlist = require("./resolve-allowlist-DmDXkQwc.cjs");
2
2
  let openclaw_plugin_sdk_runtime_env = require("openclaw/plugin-sdk/runtime-env");
3
3
  let openclaw_plugin_sdk_provider_auth = require("openclaw/plugin-sdk/provider-auth");
4
4
  let openclaw_plugin_sdk_provider_auth_runtime = require("openclaw/plugin-sdk/provider-auth-runtime");
@@ -52,7 +52,7 @@ async function loginMSTeamsDelegated(ctx, params) {
52
52
  try {
53
53
  const { code } = await (0, openclaw_plugin_sdk_provider_auth_runtime.waitForLocalOAuthCallback)({
54
54
  expectedState: state,
55
- timeoutMs: 300 * 1e3,
55
+ timeoutMs: 3e5,
56
56
  port: require_resolve_allowlist.MSTEAMS_OAUTH_CALLBACK_PORT,
57
57
  callbackPath: require_resolve_allowlist.MSTEAMS_OAUTH_CALLBACK_PATH,
58
58
  redirectUri: require_resolve_allowlist.MSTEAMS_OAUTH_REDIRECT_URI,
@@ -81,7 +81,8 @@ async function manualFlow(ctx, authUrl, state, verifier, params, cause) {
81
81
  ctx.progress.update("OAuth URL ready");
82
82
  ctx.log(`\nOpen this URL in your LOCAL browser:\n\n${authUrl}\n`);
83
83
  ctx.progress.update("Waiting for you to paste the callback URL...");
84
- const parsed = (0, openclaw_plugin_sdk_provider_auth_runtime.parseOAuthCallbackInput)(await ctx.prompt("Paste the redirect URL here: "), {
84
+ const callbackInput = await ctx.prompt("Paste the redirect URL here: ");
85
+ const parsed = (0, openclaw_plugin_sdk_provider_auth_runtime.parseOAuthCallbackInput)(callbackInput, {
85
86
  missingState: "Missing 'state' parameter in URL. Paste the full redirect URL.",
86
87
  invalidInput: "Paste the full redirect URL (including code and state parameters), not just the authorization code."
87
88
  });
@@ -1,4 +1,4 @@
1
- const require_rolldown_runtime = require("./rolldown-runtime-D6vf50IK.cjs");
1
+ const require_rolldown_runtime = require("./rolldown-runtime-VH7oDXx4.cjs");
2
2
  const require_runtime = require("./runtime-gZTAuFux.cjs");
3
3
  let openclaw_plugin_sdk_string_coerce_runtime = require("openclaw/plugin-sdk/string-coerce-runtime");
4
4
  let openclaw_plugin_sdk_file_lock = require("openclaw/plugin-sdk/file-lock");
@@ -96,7 +96,7 @@ const MSTEAMS_CONVERSATIONS_LEGACY_FILENAME = "msteams-conversations.json";
96
96
  const MSTEAMS_CONVERSATIONS_NAMESPACE = "conversations";
97
97
  const MSTEAMS_MAX_CONVERSATIONS = 1e3;
98
98
  const MSTEAMS_SQLITE_MAX_CONVERSATION_ROWS = 2e3;
99
- const MSTEAMS_CONVERSATION_TTL_MS = 365 * 24 * 60 * 60 * 1e3;
99
+ const MSTEAMS_CONVERSATION_TTL_MS = 31536e6;
100
100
  const CONVERSATION_MUTATION_KEY = "conversations";
101
101
  function createConversationStateStore(params) {
102
102
  return require_runtime.getMSTeamsRuntime().state.openKeyedStore({
@@ -226,7 +226,7 @@ const MSTEAMS_MAX_POLLS = 1e3;
226
226
  const MSTEAMS_SQLITE_MAX_POLL_ROWS = 2e3;
227
227
  const MSTEAMS_POLL_VOTE_BUCKET_COUNT = 32;
228
228
  const MSTEAMS_MAX_POLL_VOTE_BUCKET_ROWS = 1001 * MSTEAMS_POLL_VOTE_BUCKET_COUNT;
229
- const MSTEAMS_POLL_TTL_MS = 720 * 60 * 60 * 1e3;
229
+ const MSTEAMS_POLL_TTL_MS = 2592e6;
230
230
  const POLL_MUTATION_KEY = "polls";
231
231
  function normalizeChoiceValue(value) {
232
232
  if (typeof value === "string") {
@@ -379,7 +379,8 @@ function selectRetainedMSTeamsPolls(polls) {
379
379
  }
380
380
  function normalizeMSTeamsPollSelections(poll, selections) {
381
381
  const maxSelections = Math.max(1, poll.maxSelections);
382
- return (0, openclaw_plugin_sdk_string_coerce_runtime.uniqueStrings)(selections.map((entry) => (0, openclaw_plugin_sdk_number_runtime.parseStrictNonNegativeInteger)(entry)).filter((value) => value !== void 0).filter((value) => value >= 0 && value < poll.options.length).map((value) => String(value))).slice(0, maxSelections);
382
+ const mapped = selections.map((entry) => (0, openclaw_plugin_sdk_number_runtime.parseStrictNonNegativeInteger)(entry)).filter((value) => value !== void 0).filter((value) => value >= 0 && value < poll.options.length).map((value) => String(value));
383
+ return (0, openclaw_plugin_sdk_string_coerce_runtime.uniqueStrings)(mapped).slice(0, maxSelections);
383
384
  }
384
385
  function splitMSTeamsPoll(poll) {
385
386
  const { votes, ...metadata } = poll;
@@ -1,4 +1,4 @@
1
- const require_resolve_allowlist = require("./resolve-allowlist-CWbvAW4v.cjs");
1
+ const require_resolve_allowlist = require("./resolve-allowlist-DmDXkQwc.cjs");
2
2
  let openclaw_plugin_sdk_html_entity_runtime = require("openclaw/plugin-sdk/html-entity-runtime");
3
3
  //#region extensions/msteams/src/graph-thread.ts
4
4
  /**
@@ -62,9 +62,10 @@ async function fetchChatMessageText(token, chatId, messageId, deadline) {
62
62
  * replies but still in ascending order only.
63
63
  */
64
64
  async function fetchThreadReplies(token, groupId, channelId, messageId, limit = 50, deadline) {
65
+ const path = `/teams/${encodeURIComponent(groupId)}/channels/${encodeURIComponent(channelId)}/messages/${encodeURIComponent(messageId)}/replies?$top=${Math.min(Math.max(limit, 1), 50)}`;
65
66
  return (await require_resolve_allowlist.fetchGraphJson({
66
67
  token,
67
- path: `/teams/${encodeURIComponent(groupId)}/channels/${encodeURIComponent(channelId)}/messages/${encodeURIComponent(messageId)}/replies?$top=${Math.min(Math.max(limit, 1), 50)}`,
68
+ path,
68
69
  ...deadline ? { deadline } : {}
69
70
  })).value ?? [];
70
71
  }
@@ -1,5 +1,5 @@
1
1
  const require_runtime = require("./runtime-gZTAuFux.cjs");
2
- require("./runtime-api.cjs");
2
+ require("../runtime-api.cjs");
3
3
  const require_delegated_state = require("./delegated-state-DiEz9JIa.cjs");
4
4
  require("./secret-input-C65t6kjM.cjs");
5
5
  let openclaw_plugin_sdk_lazy_runtime = require("openclaw/plugin-sdk/lazy-runtime");
@@ -19,8 +19,8 @@ let openclaw_plugin_sdk_html_entity_runtime = require("openclaw/plugin-sdk/html-
19
19
  let openclaw_plugin_sdk_secret_input = require("openclaw/plugin-sdk/secret-input");
20
20
  //#region extensions/msteams/src/request-timeout.ts
21
21
  const MSTEAMS_REQUEST_TIMEOUT_MS = 3e4;
22
- const MSTEAMS_SHAREPOINT_UPLOAD_BASE_TIMEOUT_MS = 5 * 6e4;
23
- const MSTEAMS_SHAREPOINT_UPLOAD_MIN_BYTES_PER_SECOND = 256 * 1024;
22
+ const MSTEAMS_SHAREPOINT_UPLOAD_BASE_TIMEOUT_MS = 3e5;
23
+ const MSTEAMS_SHAREPOINT_UPLOAD_MIN_BYTES_PER_SECOND = 262144;
24
24
  const MSTEAMS_INBOUND_PREPROCESS_TIMEOUT_MS = 1e4;
25
25
  function createMSTeamsInboundDeadline() {
26
26
  return (0, openclaw_plugin_sdk_provider_http.createProviderOperationDeadline)({
@@ -893,7 +893,7 @@ function buildMSTeamsTokenEndpoint(tenantId) {
893
893
  //#endregion
894
894
  //#region extensions/msteams/src/oauth.token.ts
895
895
  /** Five-minute buffer subtracted from token expiry to avoid edge-case clock drift. */
896
- const EXPIRY_BUFFER_MS = 300 * 1e3;
896
+ const EXPIRY_BUFFER_MS = 3e5;
897
897
  function createMSTeamsTokenBody(params) {
898
898
  const body = new URLSearchParams({
899
899
  client_id: params.clientId,
@@ -1088,8 +1088,9 @@ function escapeOData(value) {
1088
1088
  }
1089
1089
  async function requestGraph(params) {
1090
1090
  const hasBody = params.body !== void 0;
1091
+ const url = `${params.root ?? "https://graph.microsoft.com/v1.0"}${params.path}`;
1091
1092
  const { response, release } = await (0, openclaw_plugin_sdk_ssrf_runtime.fetchWithSsrFGuard)({
1092
- url: `${params.root ?? "https://graph.microsoft.com/v1.0"}${params.path}`,
1093
+ url,
1093
1094
  init: {
1094
1095
  method: params.method,
1095
1096
  headers: {
@@ -15,7 +15,7 @@ var __copyProps = (to, from, except, desc) => {
15
15
  }
16
16
  return to;
17
17
  };
18
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
18
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule || !__hasOwnProp.call(mod, "default") ? __defProp(target, "default", {
19
19
  value: mod,
20
20
  enumerable: true
21
21
  }) : target, mod));
@@ -0,0 +1,4 @@
1
+ const require_secret_contract_api = require("./secret-contract-api-ipiUsANg.cjs");
2
+ exports.channelSecrets = require_secret_contract_api.channelSecrets;
3
+ exports.collectRuntimeConfigAssignments = require_secret_contract_api.collectRuntimeConfigAssignments;
4
+ exports.secretTargetRegistryEntries = require_secret_contract_api.secretTargetRegistryEntries;
@@ -0,0 +1,28 @@
1
+ //#region extensions/msteams/src/secret-contract.ts
2
+ const channelSecrets = (0, require("openclaw/plugin-sdk/channel-secret-basic-runtime").createSimpleChannelSecretContract)({
3
+ channelKey: "msteams",
4
+ label: "Microsoft Teams",
5
+ accountFields: [],
6
+ channelFields: ["appPassword"],
7
+ mode: "channel-only"
8
+ });
9
+ const { secretTargetRegistryEntries, collectRuntimeConfigAssignments } = channelSecrets;
10
+ //#endregion
11
+ Object.defineProperty(exports, "channelSecrets", {
12
+ enumerable: true,
13
+ get: function() {
14
+ return channelSecrets;
15
+ }
16
+ });
17
+ Object.defineProperty(exports, "collectRuntimeConfigAssignments", {
18
+ enumerable: true,
19
+ get: function() {
20
+ return collectRuntimeConfigAssignments;
21
+ }
22
+ });
23
+ Object.defineProperty(exports, "secretTargetRegistryEntries", {
24
+ enumerable: true,
25
+ get: function() {
26
+ return secretTargetRegistryEntries;
27
+ }
28
+ });
@@ -1,10 +1,10 @@
1
1
  const require_runtime = require("./runtime-gZTAuFux.cjs");
2
- require("./runtime-api.cjs");
3
- const require_resolve_allowlist = require("./resolve-allowlist-CWbvAW4v.cjs");
4
- const require_channel = require("./channel-ChmCvkuA.cjs");
5
- const require_channel_setup = require("./channel.setup-CKb8aKCV.cjs");
6
- const require_polls = require("./polls-DvuJvaDG.cjs");
7
- const require_messenger = require("./messenger-Ctb9_CO7.cjs");
2
+ require("../runtime-api.cjs");
3
+ const require_resolve_allowlist = require("./resolve-allowlist-DmDXkQwc.cjs");
4
+ const require_channel = require("./channel-CmMERcLc.cjs");
5
+ const require_channel_setup = require("./channel.setup-CFpwpvxP.cjs");
6
+ const require_polls = require("./polls-P86qBpeV.cjs");
7
+ const require_messenger = require("./messenger-DGDM-_EM.cjs");
8
8
  let openclaw_plugin_sdk_channel_outbound = require("openclaw/plugin-sdk/channel-outbound");
9
9
  let openclaw_plugin_sdk_string_coerce_runtime = require("openclaw/plugin-sdk/string-coerce-runtime");
10
10
  let openclaw_plugin_sdk_markdown_table_runtime = require("openclaw/plugin-sdk/markdown-table-runtime");
@@ -169,12 +169,12 @@ async function resolveMSTeamsSendContext(params) {
169
169
  //#endregion
170
170
  //#region extensions/msteams/src/send.ts
171
171
  /** Threshold for large files that require FileConsentCard flow in personal chats */
172
- const FILE_CONSENT_THRESHOLD_BYTES = 4 * 1024 * 1024;
172
+ const FILE_CONSENT_THRESHOLD_BYTES = 4194304;
173
173
  /**
174
174
  * MSTeams-specific media size limit (100MB).
175
175
  * Higher than the default to support Teams file-consent and SharePoint uploads.
176
176
  */
177
- const MSTEAMS_MAX_MEDIA_BYTES = 100 * 1024 * 1024;
177
+ const MSTEAMS_MAX_MEDIA_BYTES = 104857600;
178
178
  function createMSTeamsSendError(errorPrefix, error) {
179
179
  const classification = require_channel_setup.classifyMSTeamsSendError(error);
180
180
  const hint = require_channel_setup.formatMSTeamsSendErrorHint(classification);
@@ -250,8 +250,9 @@ async function sendMessageMSTeams(params) {
250
250
  hasMedia: Boolean(mediaUrl)
251
251
  });
252
252
  if (mediaUrl) {
253
+ const mediaMaxBytes = ctx.mediaMaxBytes ?? MSTEAMS_MAX_MEDIA_BYTES;
253
254
  const media = await (0, openclaw_plugin_sdk_outbound_media.loadOutboundMediaFromUrl)(mediaUrl, {
254
- maxBytes: ctx.mediaMaxBytes ?? MSTEAMS_MAX_MEDIA_BYTES,
255
+ maxBytes: mediaMaxBytes,
255
256
  mediaAccess,
256
257
  mediaLocalRoots,
257
258
  mediaReadFile
@@ -419,10 +420,11 @@ async function sendTextWithMedia(ctx, text, mediaUrl) {
419
420
  }
420
421
  async function sendProactiveActivityRaw({ ctx, activity }) {
421
422
  const baseRef = require_messenger.buildConversationReference(ctx.ref);
422
- return require_messenger.extractMessageId(await require_messenger.sendMSTeamsActivityWithReference(ctx.app, baseRef, activity, {
423
+ const response = await require_messenger.sendMSTeamsActivityWithReference(ctx.app, baseRef, activity, {
423
424
  ...ctx.threadActivityId ? { threadActivityId: ctx.threadActivityId } : {},
424
425
  serviceUrlBoundary: ctx.sdkCloudOptions
425
- })) ?? "unknown";
426
+ });
427
+ return require_messenger.extractMessageId(response) ?? "unknown";
426
428
  }
427
429
  async function sendProactiveActivity({ ctx, activity, errorPrefix }) {
428
430
  try {
@@ -551,7 +553,8 @@ async function updateMSTeamsMessageActivity(params) {
551
553
  activityId
552
554
  });
553
555
  try {
554
- await require_messenger.updateMSTeamsActivityWithReference(app, require_messenger.buildConversationReference(ref), activityId, activity, { serviceUrlBoundary: sdkCloudOptions });
556
+ const baseRef = require_messenger.buildConversationReference(ref);
557
+ await require_messenger.updateMSTeamsActivityWithReference(app, baseRef, activityId, activity, { serviceUrlBoundary: sdkCloudOptions });
555
558
  } catch (err) {
556
559
  throw createMSTeamsSendError("msteams edit", err);
557
560
  }
@@ -578,7 +581,8 @@ async function deleteMessageMSTeams(params) {
578
581
  activityId
579
582
  });
580
583
  try {
581
- await require_messenger.deleteMSTeamsActivityWithReference(app, require_messenger.buildConversationReference(ref), activityId, { serviceUrlBoundary: sdkCloudOptions });
584
+ const baseRef = require_messenger.buildConversationReference(ref);
585
+ await require_messenger.deleteMSTeamsActivityWithReference(app, baseRef, activityId, { serviceUrlBoundary: sdkCloudOptions });
582
586
  } catch (err) {
583
587
  throw createMSTeamsSendError("msteams delete", err);
584
588
  }
@@ -0,0 +1,3 @@
1
+ const require_channel_setup = require("./channel.setup-CFpwpvxP.cjs");
2
+ require("../setup-plugin-api.cjs");
3
+ exports.msteamsSetupPlugin = require_channel_setup.msteamsSetupPlugin;
@@ -1,15 +1,15 @@
1
- const require_rolldown_runtime = require("./rolldown-runtime-D6vf50IK.cjs");
1
+ const require_rolldown_runtime = require("./rolldown-runtime-VH7oDXx4.cjs");
2
2
  const require_runtime = require("./runtime-gZTAuFux.cjs");
3
- require("./runtime-api.cjs");
4
- const require_resolve_allowlist = require("./resolve-allowlist-CWbvAW4v.cjs");
5
- const require_channel = require("./channel-ChmCvkuA.cjs");
6
- const require_thread_session = require("./thread-session-Br3R0ovy.cjs");
7
- const require_channel_setup = require("./channel.setup-CKb8aKCV.cjs");
8
- const require_polls = require("./polls-DvuJvaDG.cjs");
9
- const require_sso_token_store = require("./sso-token-store-ChhO1f4i.cjs");
10
- const require_approval_card = require("./approval-card-B6ZIMO83.cjs");
11
- const require_messenger = require("./messenger-Ctb9_CO7.cjs");
12
- const require_reaction_types = require("./reaction-types-DtWOWuDN.cjs");
3
+ require("../runtime-api.cjs");
4
+ const require_resolve_allowlist = require("./resolve-allowlist-DmDXkQwc.cjs");
5
+ const require_channel = require("./channel-CmMERcLc.cjs");
6
+ const require_thread_session = require("./thread-session-CPVeQiGj.cjs");
7
+ const require_channel_setup = require("./channel.setup-CFpwpvxP.cjs");
8
+ const require_polls = require("./polls-P86qBpeV.cjs");
9
+ const require_sso_token_store = require("./sso-token-store-CNbRhz-A.cjs");
10
+ const require_approval_card = require("./approval-card-BEblaIto.cjs");
11
+ const require_messenger = require("./messenger-DGDM-_EM.cjs");
12
+ const require_reaction_types = require("./reaction-types-5XmyLq9G.cjs");
13
13
  let openclaw_plugin_sdk_channel_outbound = require("openclaw/plugin-sdk/channel-outbound");
14
14
  let openclaw_plugin_sdk_string_coerce_runtime = require("openclaw/plugin-sdk/string-coerce-runtime");
15
15
  let openclaw_plugin_sdk_allow_from = require("openclaw/plugin-sdk/allow-from");
@@ -321,8 +321,9 @@ async function resolveMSTeamsSenderAccess(params) {
321
321
  const isDirectMessage = convType === "personal" || !convType && !activity.conversation?.isGroup;
322
322
  const senderId = activity.from?.aadObjectId ?? activity.from?.id ?? "unknown";
323
323
  const senderName = activity.from?.name ?? activity.from?.id ?? senderId;
324
+ const core = require_runtime.getMSTeamsRuntime();
324
325
  const pairing = (0, openclaw_plugin_sdk_channel_pairing.createChannelPairingController)({
325
- core: require_runtime.getMSTeamsRuntime(),
326
+ core,
326
327
  channel: "msteams",
327
328
  accountId: openclaw_plugin_sdk_account_id.DEFAULT_ACCOUNT_ID
328
329
  });
@@ -677,7 +678,8 @@ async function downloadMSTeamsBotFrameworkAttachment(params) {
677
678
  allowHosts: params.allowHosts,
678
679
  authAllowHosts: params.authAllowHosts
679
680
  });
680
- if (!require_resolve_allowlist.isUrlAllowed(`${normalizeServiceUrl(params.serviceUrl)}/v3/attachments/${encodeURIComponent(params.attachmentId)}`, policy.allowHosts)) return;
681
+ const baseUrl = `${normalizeServiceUrl(params.serviceUrl)}/v3/attachments/${encodeURIComponent(params.attachmentId)}`;
682
+ if (!require_resolve_allowlist.isUrlAllowed(baseUrl, policy.allowHosts)) return;
681
683
  let accessToken;
682
684
  try {
683
685
  accessToken = await require_resolve_allowlist.withMSTeamsRequestDeadline({
@@ -839,9 +841,11 @@ function summarizeMSTeamsHtmlAttachments(attachments) {
839
841
  while (match) {
840
842
  imgTags += 1;
841
843
  const src = match[1]?.trim();
842
- if (src) if (src.startsWith("data:")) dataImages += 1;
843
- else if (src.startsWith("cid:")) cidImages += 1;
844
- else srcHosts.add(require_resolve_allowlist.safeHostForUrl(src));
844
+ if (src) {
845
+ if (src.startsWith("data:")) dataImages += 1;
846
+ else if (src.startsWith("cid:")) cidImages += 1;
847
+ else srcHosts.add(require_resolve_allowlist.safeHostForUrl(src));
848
+ }
845
849
  match = require_resolve_allowlist.IMG_SRC_RE.exec(html);
846
850
  }
847
851
  require_resolve_allowlist.ATTACHMENT_TAG_RE.lastIndex = 0;
@@ -1001,10 +1005,11 @@ function scopeCandidatesForUrl(url) {
1001
1005
  }
1002
1006
  }
1003
1007
  async function resolveInlineDataImageMime(inline) {
1004
- const mime = (0, openclaw_plugin_sdk_string_coerce_runtime.normalizeOptionalLowercaseString)(await require_runtime.getMSTeamsRuntime().media.detectMime({
1008
+ const detectedMime = await require_runtime.getMSTeamsRuntime().media.detectMime({
1005
1009
  buffer: inline.data,
1006
1010
  headerMime: inline.contentType
1007
- }) ?? inline.contentType);
1011
+ });
1012
+ const mime = (0, openclaw_plugin_sdk_string_coerce_runtime.normalizeOptionalLowercaseString)(detectedMime ?? inline.contentType);
1008
1013
  return mime?.startsWith("image/") ? mime : void 0;
1009
1014
  }
1010
1015
  async function fetchWithAuthFallback(params) {
@@ -1595,26 +1600,28 @@ async function resolveMSTeamsInboundMedia(params) {
1595
1600
  });
1596
1601
  const shouldFetchGraphMessage = hasHtmlFileAttachment || hasChannelOrGroupHtml;
1597
1602
  const isBotFrameworkPersonalChat = isBotFrameworkPersonalChatId(conversationId);
1598
- if (hasHtmlFileAttachment && isBotFrameworkPersonalChat) if (!serviceUrl) log.debug?.("bot framework attachment skipped (missing serviceUrl)", {
1599
- conversationType,
1600
- conversationId
1601
- });
1602
- else {
1603
- const bfMedia = await downloadMSTeamsBotFrameworkAttachments({
1604
- serviceUrl,
1605
- attachmentIds,
1606
- tokenProvider,
1607
- maxBytes,
1608
- allowHosts,
1609
- authAllowHosts: params.authAllowHosts,
1610
- preserveFilenames,
1611
- deadline: params.deadline
1612
- });
1613
- if (bfMedia.media.length > 0) mediaList = mergeMSTeamsMediaFacts(mediaList, bfMedia.media, { positionallyAligned: false });
1614
- if (!hasMaterializedMedia(bfMedia.media)) log.debug?.("bot framework attachments fetch empty", {
1603
+ if (hasHtmlFileAttachment && isBotFrameworkPersonalChat) {
1604
+ if (!serviceUrl) log.debug?.("bot framework attachment skipped (missing serviceUrl)", {
1615
1605
  conversationType,
1616
- attachmentCount: bfMedia.attachmentCount ?? attachmentIds.length
1606
+ conversationId
1617
1607
  });
1608
+ else {
1609
+ const bfMedia = await downloadMSTeamsBotFrameworkAttachments({
1610
+ serviceUrl,
1611
+ attachmentIds,
1612
+ tokenProvider,
1613
+ maxBytes,
1614
+ allowHosts,
1615
+ authAllowHosts: params.authAllowHosts,
1616
+ preserveFilenames,
1617
+ deadline: params.deadline
1618
+ });
1619
+ if (bfMedia.media.length > 0) mediaList = mergeMSTeamsMediaFacts(mediaList, bfMedia.media, { positionallyAligned: false });
1620
+ if (!hasMaterializedMedia(bfMedia.media)) log.debug?.("bot framework attachments fetch empty", {
1621
+ conversationType,
1622
+ attachmentCount: bfMedia.attachmentCount ?? attachmentIds.length
1623
+ });
1624
+ }
1618
1625
  }
1619
1626
  if (shouldFetchGraphMessage && !hasMaterializedMedia(mediaList) && !isBotFrameworkPersonalChat) {
1620
1627
  const graphTeamAadGroupId = conversationType.trim().toLowerCase() === "channel" && !teamAadGroupId ? await params.resolveTeamAadGroupId?.() : teamAadGroupId;
@@ -2159,7 +2166,7 @@ function createMSTeamsReplyDispatcher(params) {
2159
2166
  * chains described in #59731 (60s+ total runs are common). Give tool
2160
2167
  * chains up to 10 minutes before auto-stopping the keepalive.
2161
2168
  */
2162
- const TYPING_KEEPALIVE_MAX_DURATION_MS = 10 * 6e4;
2169
+ const TYPING_KEEPALIVE_MAX_DURATION_MS = 6e5;
2163
2170
  const streamActiveRef = { current: () => false };
2164
2171
  const streamCanceledRef = { current: () => false };
2165
2172
  const rawSendTypingIndicator = async () => {
@@ -2553,7 +2560,7 @@ function createMSTeamsReplyDispatcher(params) {
2553
2560
  //#region extensions/msteams/src/sent-message-cache.ts
2554
2561
  const sentMessages = (0, openclaw_plugin_sdk_dedupe_runtime.createPersistentDedupeCache)({
2555
2562
  globalKey: Symbol.for("openclaw.msteamsSentMessages"),
2556
- ttlMs: 1440 * 60 * 1e3,
2563
+ ttlMs: 864e5,
2557
2564
  maxSize: 2e4,
2558
2565
  persistent: {
2559
2566
  namespace: "msteams.sent-messages",
@@ -2932,7 +2939,7 @@ async function resolveTeamGroupId(params) {
2932
2939
  }
2933
2940
  //#endregion
2934
2941
  //#region extensions/msteams/src/thread-parent-context.ts
2935
- const PARENT_CACHE_TTL_MS = 300 * 1e3;
2942
+ const PARENT_CACHE_TTL_MS = 3e5;
2936
2943
  const PARENT_CACHE_MAX = 100;
2937
2944
  const parentCache = /* @__PURE__ */ new Map();
2938
2945
  const INJECTED_MAX = 200;
@@ -2992,7 +2999,7 @@ function summarizeParentMessage(message) {
2992
2999
  if (!text) return;
2993
3000
  return {
2994
3001
  sender,
2995
- text: text.length > PARENT_TEXT_MAX_CHARS ? `${(0, openclaw_plugin_sdk_text_utility_runtime.truncateUtf16Safe)(text, PARENT_TEXT_MAX_CHARS - 1)}…` : text
3002
+ text: text.length > PARENT_TEXT_MAX_CHARS ? `${(0, openclaw_plugin_sdk_text_utility_runtime.truncateUtf16Safe)(text, 399)}…` : text
2996
3003
  };
2997
3004
  }
2998
3005
  /**
@@ -3432,7 +3439,8 @@ function createMSTeamsReactionHandler(deps) {
3432
3439
  log.debug?.("reaction activity missing from.id; skipping");
3433
3440
  return;
3434
3441
  }
3435
- const conversationId = require_resolve_allowlist.normalizeMSTeamsConversationId(activity.conversation?.id ?? "");
3442
+ const rawConversationId = activity.conversation?.id ?? "";
3443
+ const conversationId = require_resolve_allowlist.normalizeMSTeamsConversationId(rawConversationId);
3436
3444
  const conversationType = activity.conversation?.conversationType ?? "personal";
3437
3445
  const isGroupChat = conversationType === "groupChat" || activity.conversation?.isGroup === true;
3438
3446
  const isChannel = conversationType === "channel";
@@ -3849,60 +3857,61 @@ async function handleMSTeamsFileConsentInvoke(context, log) {
3849
3857
  return true;
3850
3858
  }
3851
3859
  }
3852
- if (consentResponse.action === "accept" && consentResponse.uploadInfo) if (pendingFile) {
3853
- log.debug?.("user accepted file consent, uploading", {
3854
- uploadId,
3855
- filename: pendingFile.filename,
3856
- size: pendingFile.buffer.length
3857
- });
3858
- try {
3859
- await require_messenger.uploadToConsentUrl({
3860
- url: consentResponse.uploadInfo.uploadUrl,
3861
- buffer: pendingFile.buffer,
3862
- contentType: pendingFile.contentType
3863
- });
3864
- const fileInfoCard = require_messenger.buildFileInfoCard({
3865
- filename: consentResponse.uploadInfo.name,
3866
- contentUrl: consentResponse.uploadInfo.contentUrl,
3867
- uniqueId: consentResponse.uploadInfo.uniqueId,
3868
- fileType: consentResponse.uploadInfo.fileType
3869
- });
3870
- if (!pendingFile.consentCardActivityId) await context.sendActivity({
3871
- type: "message",
3872
- attachments: [fileInfoCard]
3860
+ if (consentResponse.action === "accept" && consentResponse.uploadInfo) {
3861
+ if (pendingFile) {
3862
+ log.debug?.("user accepted file consent, uploading", {
3863
+ uploadId,
3864
+ filename: pendingFile.filename,
3865
+ size: pendingFile.buffer.length
3873
3866
  });
3874
- if (pendingFile.consentCardActivityId) try {
3875
- await context.updateActivity({
3876
- id: pendingFile.consentCardActivityId,
3877
- type: "message",
3878
- attachments: [fileInfoCard]
3867
+ try {
3868
+ await require_messenger.uploadToConsentUrl({
3869
+ url: consentResponse.uploadInfo.uploadUrl,
3870
+ buffer: pendingFile.buffer,
3871
+ contentType: pendingFile.contentType
3872
+ });
3873
+ const fileInfoCard = require_messenger.buildFileInfoCard({
3874
+ filename: consentResponse.uploadInfo.name,
3875
+ contentUrl: consentResponse.uploadInfo.contentUrl,
3876
+ uniqueId: consentResponse.uploadInfo.uniqueId,
3877
+ fileType: consentResponse.uploadInfo.fileType
3879
3878
  });
3880
- } catch {
3881
- await context.sendActivity({
3879
+ if (!pendingFile.consentCardActivityId) await context.sendActivity({
3882
3880
  type: "message",
3883
3881
  attachments: [fileInfoCard]
3884
3882
  });
3883
+ if (pendingFile.consentCardActivityId) try {
3884
+ await context.updateActivity({
3885
+ id: pendingFile.consentCardActivityId,
3886
+ type: "message",
3887
+ attachments: [fileInfoCard]
3888
+ });
3889
+ } catch {
3890
+ await context.sendActivity({
3891
+ type: "message",
3892
+ attachments: [fileInfoCard]
3893
+ });
3894
+ }
3895
+ log.info("file upload complete", {
3896
+ uploadId,
3897
+ filename: consentResponse.uploadInfo.name,
3898
+ uniqueId: consentResponse.uploadInfo.uniqueId
3899
+ });
3900
+ } catch (err) {
3901
+ log.error("file upload failed", {
3902
+ uploadId,
3903
+ error: require_channel_setup.formatUnknownError(err)
3904
+ });
3905
+ await context.sendActivity("File upload failed. Please try again.");
3906
+ } finally {
3907
+ require_messenger.removePendingUpload(uploadId);
3908
+ await require_messenger.removePendingUploadFs(uploadId);
3885
3909
  }
3886
- log.info("file upload complete", {
3887
- uploadId,
3888
- filename: consentResponse.uploadInfo.name,
3889
- uniqueId: consentResponse.uploadInfo.uniqueId
3890
- });
3891
- } catch (err) {
3892
- log.error("file upload failed", {
3893
- uploadId,
3894
- error: require_channel_setup.formatUnknownError(err)
3895
- });
3896
- await context.sendActivity("File upload failed. Please try again.");
3897
- } finally {
3898
- require_messenger.removePendingUpload(uploadId);
3899
- await require_messenger.removePendingUploadFs(uploadId);
3910
+ } else {
3911
+ log.debug?.("pending file not found for consent", { uploadId });
3912
+ await context.sendActivity(expiredUploadMessage);
3900
3913
  }
3901
3914
  } else {
3902
- log.debug?.("pending file not found for consent", { uploadId });
3903
- await context.sendActivity(expiredUploadMessage);
3904
- }
3905
- else {
3906
3915
  log.debug?.("user declined file consent", { uploadId });
3907
3916
  require_messenger.removePendingUpload(uploadId);
3908
3917
  await require_messenger.removePendingUploadFs(uploadId);
@@ -4197,7 +4206,8 @@ async function monitorMSTeamsProvider(opts) {
4197
4206
  const unresolved = [];
4198
4207
  for (const entry of resolved) if (entry.resolved && entry.id) additions.push(entry.id);
4199
4208
  else unresolved.push(entry.input);
4200
- (0, openclaw_plugin_sdk_allow_from.summarizeMapping)(label, resolved.filter((entry) => entry.resolved && entry.id).map((entry) => `${entry.input}→${entry.id}`), unresolved, runtime);
4209
+ const mapping = resolved.filter((entry) => entry.resolved && entry.id).map((entry) => `${entry.input}→${entry.id}`);
4210
+ (0, openclaw_plugin_sdk_allow_from.summarizeMapping)(label, mapping, unresolved, runtime);
4201
4211
  return {
4202
4212
  additions,
4203
4213
  unresolved
@@ -4258,7 +4268,7 @@ async function monitorMSTeamsProvider(opts) {
4258
4268
  const mediaMaxBytes = (0, openclaw_plugin_sdk_account_helpers.resolveChannelMediaMaxBytes)({
4259
4269
  cfg,
4260
4270
  resolveChannelLimitMb: ({ cfg: channelCfg }) => channelCfg.channels?.msteams?.mediaMaxMb
4261
- }) ?? 8 * 1024 * 1024;
4271
+ }) ?? 8388608;
4262
4272
  const conversationStore = opts.conversationStore ?? require_polls.createMSTeamsConversationStoreState();
4263
4273
  const pollStore = opts.pollStore ?? require_polls.createMSTeamsPollStoreState();
4264
4274
  log.info(`starting provider (port ${port})`);
@@ -1,5 +1,5 @@
1
1
  const require_runtime = require("./runtime-gZTAuFux.cjs");
2
- const require_polls = require("./polls-DvuJvaDG.cjs");
2
+ const require_polls = require("./polls-P86qBpeV.cjs");
3
3
  let node_crypto = require("node:crypto");
4
4
  //#region extensions/msteams/src/sso-token-store.ts
5
5
  /**
@@ -1,4 +1,4 @@
1
- const require_resolve_allowlist = require("./resolve-allowlist-CWbvAW4v.cjs");
1
+ const require_resolve_allowlist = require("./resolve-allowlist-DmDXkQwc.cjs");
2
2
  let openclaw_plugin_sdk_string_coerce_runtime = require("openclaw/plugin-sdk/string-coerce-runtime");
3
3
  let openclaw_plugin_sdk_approval_auth_runtime = require("openclaw/plugin-sdk/approval-auth-runtime");
4
4
  let openclaw_plugin_sdk_routing = require("openclaw/plugin-sdk/routing");
package/dist/api.cjs CHANGED
@@ -1,6 +1,6 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_channel = require("./channel-ChmCvkuA.cjs");
3
- const require_channel_setup = require("./channel.setup-CKb8aKCV.cjs");
2
+ const require_channel = require("./.setup/channel-CmMERcLc.cjs");
3
+ const require_channel_setup = require("./.setup/channel.setup-CFpwpvxP.cjs");
4
4
  exports.createMSTeamsSetupWizardBase = require_channel_setup.createMSTeamsSetupWizardBase;
5
5
  exports.msteamsPlugin = require_channel.msteamsPlugin;
6
6
  exports.msteamsSetupAdapter = require_channel_setup.msteamsSetupAdapter;
@@ -1,3 +1,3 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_config_schema = require("./config-schema-MyN2lamA.cjs");
2
+ const require_config_schema = require("./.setup/config-schema-MyN2lamA.cjs");
3
3
  exports.MSTeamsChannelConfigSchema = require_config_schema.MSTeamsChannelConfigSchema;
@@ -1,3 +1,3 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_channel = require("./channel-ChmCvkuA.cjs");
2
+ const require_channel = require("./.setup/channel-CmMERcLc.cjs");
3
3
  exports.msteamsPlugin = require_channel.msteamsPlugin;
@@ -1,5 +1,5 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- require("./secret-input-C65t6kjM.cjs");
2
+ require("./.setup/secret-input-C65t6kjM.cjs");
3
3
  let openclaw_plugin_sdk_secret_input = require("openclaw/plugin-sdk/secret-input");
4
4
  //#region extensions/msteams/configured-state.ts
5
5
  /** Mirror Teams auth-mode requirements without loading the Azure SDK or full channel. */
@@ -1,5 +1,5 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_resolve_allowlist = require("./resolve-allowlist-CWbvAW4v.cjs");
2
+ const require_resolve_allowlist = require("./.setup/resolve-allowlist-DmDXkQwc.cjs");
3
3
  let openclaw_plugin_sdk_directory_runtime = require("openclaw/plugin-sdk/directory-runtime");
4
4
  const msteamsDirectoryContractPlugin = {
5
5
  id: "msteams",
@@ -1,8 +1,8 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_rolldown_runtime = require("./rolldown-runtime-D6vf50IK.cjs");
3
- const require_delegated_state = require("./delegated-state-DiEz9JIa.cjs");
4
- const require_polls = require("./polls-DvuJvaDG.cjs");
5
- const require_sso_token_store = require("./sso-token-store-ChhO1f4i.cjs");
2
+ const require_rolldown_runtime = require("./.setup/rolldown-runtime-VH7oDXx4.cjs");
3
+ const require_delegated_state = require("./.setup/delegated-state-DiEz9JIa.cjs");
4
+ const require_polls = require("./.setup/polls-P86qBpeV.cjs");
5
+ const require_sso_token_store = require("./.setup/sso-token-store-CNbRhz-A.cjs");
6
6
  let openclaw_plugin_sdk_string_coerce_runtime = require("openclaw/plugin-sdk/string-coerce-runtime");
7
7
  let node_crypto = require("node:crypto");
8
8
  node_crypto = require_rolldown_runtime.__toESM(node_crypto, 1);
@@ -2,7 +2,7 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
2
  let openclaw_plugin_sdk_qa_runner_runtime = require("openclaw/plugin-sdk/qa-runner-runtime");
3
3
  //#region extensions/msteams/src/qa/cli.ts
4
4
  const DEFAULT_MSTEAMS_QA_SCENARIOS = ["channel-canary"];
5
- const loadMSTeamsQaAdapterRuntime = (0, openclaw_plugin_sdk_qa_runner_runtime.createLazyCliRuntimeLoader)(() => Promise.resolve().then(() => require("./adapter.runtime-8g-MOPfb.cjs")));
5
+ const loadMSTeamsQaAdapterRuntime = (0, openclaw_plugin_sdk_qa_runner_runtime.createLazyCliRuntimeLoader)(() => Promise.resolve().then(() => require("./.setup/adapter.runtime-C_ZhLOUo.cjs")));
6
6
  async function runQaMSTeams(options) {
7
7
  await (0, openclaw_plugin_sdk_qa_runner_runtime.runLiveTransportQaSuiteCommand)({
8
8
  channelId: "msteams",
@@ -1,5 +1,5 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_runtime = require("./runtime-gZTAuFux.cjs");
2
+ const require_runtime = require("./.setup/runtime-gZTAuFux.cjs");
3
3
  let openclaw_plugin_sdk_channel_outbound = require("openclaw/plugin-sdk/channel-outbound");
4
4
  let openclaw_plugin_sdk_channel_pairing = require("openclaw/plugin-sdk/channel-pairing");
5
5
  let openclaw_plugin_sdk_channel_policy = require("openclaw/plugin-sdk/channel-policy");
@@ -1,14 +1,5 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- //#region extensions/msteams/src/secret-contract.ts
3
- const channelSecrets = (0, require("openclaw/plugin-sdk/channel-secret-basic-runtime").createSimpleChannelSecretContract)({
4
- channelKey: "msteams",
5
- label: "Microsoft Teams",
6
- accountFields: [],
7
- channelFields: ["appPassword"],
8
- mode: "channel-only"
9
- });
10
- const { secretTargetRegistryEntries, collectRuntimeConfigAssignments } = channelSecrets;
11
- //#endregion
12
- exports.channelSecrets = channelSecrets;
13
- exports.collectRuntimeConfigAssignments = collectRuntimeConfigAssignments;
14
- exports.secretTargetRegistryEntries = secretTargetRegistryEntries;
2
+ const require_secret_contract_api = require("./.setup/secret-contract-api-ipiUsANg.cjs");
3
+ exports.channelSecrets = require_secret_contract_api.channelSecrets;
4
+ exports.collectRuntimeConfigAssignments = require_secret_contract_api.collectRuntimeConfigAssignments;
5
+ exports.secretTargetRegistryEntries = require_secret_contract_api.secretTargetRegistryEntries;
@@ -1,12 +1,14 @@
1
+ let openclaw_plugin_sdk_channel_entry_contract = require("openclaw/plugin-sdk/channel-entry-contract");
2
+ let node_url = require("node:url");
1
3
  //#region extensions/msteams/setup-entry.ts
2
- var setup_entry_default = (0, require("openclaw/plugin-sdk/channel-entry-contract").defineBundledChannelSetupEntry)({
4
+ var setup_entry_default = (0, openclaw_plugin_sdk_channel_entry_contract.defineBundledChannelSetupEntry)({
3
5
  importMetaUrl: require("url").pathToFileURL(__filename).href,
4
6
  plugin: {
5
- specifier: "./setup-plugin-api.cjs",
7
+ specifier: (0, node_url.fileURLToPath)(new URL(".setup/setup-plugin-api-kkSuo801.cjs", require("url").pathToFileURL(__filename).href).href),
6
8
  exportName: "msteamsSetupPlugin"
7
9
  },
8
10
  secrets: {
9
- specifier: "./secret-contract-api.cjs",
11
+ specifier: (0, node_url.fileURLToPath)(new URL(".setup/secret-contract-api-ChQdBeU1.cjs", require("url").pathToFileURL(__filename).href).href),
10
12
  exportName: "channelSecrets"
11
13
  }
12
14
  });
@@ -1,3 +1,3 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_channel_setup = require("./channel.setup-CKb8aKCV.cjs");
2
+ const require_channel_setup = require("./.setup/channel.setup-CFpwpvxP.cjs");
3
3
  exports.msteamsSetupPlugin = require_channel_setup.msteamsSetupPlugin;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openclaw/msteams",
3
- "version": "2026.8.1",
3
+ "version": "2026.8.33",
4
4
  "description": "OpenClaw Microsoft Teams channel plugin for bot conversations.",
5
5
  "repository": {
6
6
  "type": "git",
@@ -12,7 +12,7 @@
12
12
  "@microsoft/teams.api": "2.0.15",
13
13
  "@microsoft/teams.apps": "2.0.15",
14
14
  "express": "5.2.1",
15
- "typebox": "1.3.16",
15
+ "typebox": "1.3.17",
16
16
  "zod": "4.4.3"
17
17
  },
18
18
  "devDependencies": {
@@ -22,7 +22,7 @@
22
22
  "openclaw": "workspace:*"
23
23
  },
24
24
  "peerDependencies": {
25
- "openclaw": ">=2026.8.1"
25
+ "openclaw": ">=2026.8.33"
26
26
  },
27
27
  "peerDependenciesMeta": {
28
28
  "openclaw": {
@@ -72,10 +72,10 @@
72
72
  "minHostVersion": ">=2026.4.10"
73
73
  },
74
74
  "compat": {
75
- "pluginApi": ">=2026.8.1"
75
+ "pluginApi": ">=2026.8.33"
76
76
  },
77
77
  "build": {
78
- "openclawVersion": "2026.8.1",
78
+ "openclawVersion": "2026.8.33",
79
79
  "runtimeFormat": "cjs"
80
80
  },
81
81
  "release": {