@openclaw/msteams 2026.8.2 → 2026.9.1

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.cjs CHANGED
@@ -1,6 +1,6 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_channel = require("./channel-DLn4b6Qi.cjs");
3
- const require_channel_setup = require("./channel.setup-BRbhaigB.cjs");
2
+ const require_channel = require("./channel-CqRcu6kk.cjs");
3
+ const require_channel_setup = require("./channel.setup-D2YO3F4O.cjs");
4
4
  exports.createMSTeamsSetupWizardBase = require_channel_setup.createMSTeamsSetupWizardBase;
5
5
  exports.msteamsPlugin = require_channel.msteamsPlugin;
6
6
  exports.msteamsSetupAdapter = require_channel_setup.msteamsSetupAdapter;
@@ -71,6 +71,16 @@ function buildCardHeading(title, subtitle) {
71
71
  }];
72
72
  }
73
73
  function buildApprovalSubject(view) {
74
+ if (view.approvalKind === "system-agent") return [{
75
+ type: "TextBlock",
76
+ text: "Change",
77
+ weight: "Bolder",
78
+ wrap: true
79
+ }, {
80
+ type: "TextBlock",
81
+ text: view.operationSummary,
82
+ wrap: true
83
+ }];
74
84
  if (view.approvalKind === "exec") return [
75
85
  {
76
86
  type: "TextBlock",
@@ -141,7 +151,7 @@ function formatApprovalDecision(decision) {
141
151
  }
142
152
  function buildMSTeamsPendingApprovalCard(params) {
143
153
  const { view, nowMs } = params;
144
- const kindLabel = view.approvalKind === "plugin" ? "Plugin" : "Exec";
154
+ const kindLabel = view.approvalKind === "plugin" ? "Plugin" : view.approvalKind === "system-agent" ? "OpenClaw Change" : "Exec";
145
155
  const actionTokens = [];
146
156
  const actions = view.actions.map(({ decision, label }) => {
147
157
  const token = createMSTeamsApprovalToken();
@@ -174,17 +184,17 @@ function buildMSTeamsPendingApprovalCard(params) {
174
184
  };
175
185
  }
176
186
  function buildMSTeamsResolvedApprovalCard(view) {
177
- const kindLabel = view.approvalKind === "plugin" ? "Plugin" : "Exec";
187
+ const kindLabel = view.approvalKind === "plugin" ? "Plugin" : view.approvalKind === "system-agent" ? "OpenClaw Change" : "Exec";
178
188
  const resolvedBy = (0, openclaw_plugin_sdk_string_coerce_runtime.normalizeOptionalString)(view.resolvedBy);
179
189
  return buildAdaptiveCard([
180
- ...buildCardHeading(`${kindLabel} Approval: ${formatApprovalDecision(view.decision)}`, resolvedBy ? `Resolved by ${resolvedBy}` : "Resolved"),
190
+ ...buildCardHeading(`${kindLabel} Approval: ${view.approvalKind === "system-agent" && view.terminalStatus === "cancelled" ? "Cancelled" : view.approvalKind === "system-agent" && view.applicationStatus === "applied" ? "Applied" : view.approvalKind === "system-agent" && view.applicationStatus === "not-applied" ? "Not applied" : formatApprovalDecision(view.decision)}`, resolvedBy ? `Resolved by ${resolvedBy}` : "Resolved"),
181
191
  ...buildApprovalSubject(view),
182
192
  buildApprovalMetadata(view.approvalId, view.metadata)
183
193
  ]);
184
194
  }
185
195
  function buildMSTeamsExpiredApprovalCard(view) {
186
196
  return buildAdaptiveCard([
187
- ...buildCardHeading(`${view.approvalKind === "plugin" ? "Plugin" : "Exec"} Approval Expired`, "This approval request expired before it was resolved."),
197
+ ...buildCardHeading(`${view.approvalKind === "plugin" ? "Plugin" : view.approvalKind === "system-agent" ? "OpenClaw Change" : "Exec"} Approval Expired`, "This approval request expired before it was resolved."),
188
198
  ...buildApprovalSubject(view),
189
199
  buildApprovalMetadata(view.approvalId, view.metadata)
190
200
  ]);
@@ -1,14 +1,18 @@
1
- const require_resolve_allowlist = require("./resolve-allowlist-BrdWKHE-.cjs");
2
- const require_channel = require("./channel-DLn4b6Qi.cjs");
3
- const require_approval_card = require("./approval-card-BEblaIto.cjs");
4
- const require_send = require("./send-C4BjzS1F.cjs");
1
+ const require_resolve_allowlist = require("./resolve-allowlist-CoKmLXYe.cjs");
2
+ const require_channel = require("./channel-CqRcu6kk.cjs");
3
+ const require_approval_card = require("./approval-card-ClrTjCsL.cjs");
4
+ const require_send = require("./send-CAKTR80N.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");
8
8
  //#region extensions/msteams/src/approval-handler.runtime.ts
9
9
  const log = (0, require("openclaw/plugin-sdk/runtime-env").createSubsystemLogger)("msteams/approvals");
10
10
  const msTeamsApprovalNativeRuntime = (0, openclaw_plugin_sdk_approval_handler_runtime.createChannelApprovalNativeRuntimeAdapter)({
11
- eventKinds: ["exec", "plugin"],
11
+ eventKinds: [
12
+ "exec",
13
+ "plugin",
14
+ "system-agent"
15
+ ],
12
16
  availability: {
13
17
  isConfigured: ({ cfg, accountId }) => require_channel.isMSTeamsNativeApprovalClientEnabled({
14
18
  cfg,
@@ -1,8 +1,8 @@
1
1
  require("./runtime-api.cjs");
2
- const require_resolve_allowlist = require("./resolve-allowlist-BrdWKHE-.cjs");
2
+ const require_resolve_allowlist = require("./resolve-allowlist-CoKmLXYe.cjs");
3
3
  const require_directory_contract_api = require("./directory-contract-api.cjs");
4
- const require_thread_session = require("./thread-session-DxOri69r.cjs");
5
- const require_channel_setup = require("./channel.setup-BRbhaigB.cjs");
4
+ const require_thread_session = require("./thread-session-p8FNgohv.cjs");
5
+ const require_channel_setup = require("./channel.setup-D2YO3F4O.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");
@@ -314,7 +314,11 @@ const resolveMSTeamsOriginTarget = (0, openclaw_plugin_sdk_approval_native_runti
314
314
  normalizeTarget: msTeamsApprovalTargetResolvers.normalizeTarget
315
315
  });
316
316
  const msTeamsLazyApprovalNativeRuntime = (0, openclaw_plugin_sdk_approval_handler_adapter_runtime.createLazyChannelApprovalNativeRuntimeAdapter)({
317
- eventKinds: ["exec", "plugin"],
317
+ eventKinds: [
318
+ "exec",
319
+ "plugin",
320
+ "system-agent"
321
+ ],
318
322
  isConfigured: ({ cfg, accountId }) => isMSTeamsNativeApprovalClientEnabled({
319
323
  cfg,
320
324
  accountId
@@ -326,7 +330,7 @@ const msTeamsLazyApprovalNativeRuntime = (0, openclaw_plugin_sdk_approval_handle
326
330
  request
327
331
  }),
328
332
  load: async () => {
329
- const { msTeamsApprovalNativeRuntime } = await Promise.resolve().then(() => require("./approval-handler.runtime-C0AWNWXk.cjs"));
333
+ const { msTeamsApprovalNativeRuntime } = await Promise.resolve().then(() => require("./approval-handler.runtime-9rMFhyLp.cjs"));
330
334
  return msTeamsApprovalNativeRuntime;
331
335
  }
332
336
  });
@@ -777,7 +781,7 @@ const collectMSTeamsSecurityFindings = openclaw_plugin_sdk_channel_policy.create
777
781
  severity: "critical",
778
782
  title: "MS Teams security warning"
779
783
  });
780
- const loadMSTeamsChannelRuntime = (0, openclaw_plugin_sdk_lazy_runtime.createLazyRuntimeNamedExport)(() => Promise.resolve().then(() => require("./channel.runtime-1mH99ZAm.cjs")), "msTeamsChannelRuntime");
784
+ const loadMSTeamsChannelRuntime = (0, openclaw_plugin_sdk_lazy_runtime.createLazyRuntimeNamedExport)(() => Promise.resolve().then(() => require("./channel.runtime-BAy59d1L.cjs")), "msTeamsChannelRuntime");
781
785
  function jsonActionResult(data) {
782
786
  return {
783
787
  content: [{
@@ -1520,7 +1524,7 @@ const msteamsPlugin = (0, openclaw_plugin_sdk_channel_core.createChatChannelPlug
1520
1524
  })
1521
1525
  }),
1522
1526
  gateway: { startAccount: async (ctx) => {
1523
- const { monitorMSTeamsProvider } = await Promise.resolve().then(() => require("./src-RSjkJRjI.cjs"));
1527
+ const { monitorMSTeamsProvider } = await Promise.resolve().then(() => require("./src-CyNCea9B.cjs"));
1524
1528
  const port = ctx.cfg.channels?.msteams?.webhook?.port ?? 3978;
1525
1529
  const statusSink = (0, openclaw_plugin_sdk_channel_outbound.createAccountStatusSink)({
1526
1530
  accountId: ctx.accountId,
@@ -1,3 +1,3 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_channel = require("./channel-DLn4b6Qi.cjs");
2
+ const require_channel = require("./channel-CqRcu6kk.cjs");
3
3
  exports.msteamsPlugin = require_channel.msteamsPlugin;
@@ -1,10 +1,10 @@
1
1
  require("./runtime-api.cjs");
2
- const require_resolve_allowlist = require("./resolve-allowlist-BrdWKHE-.cjs");
3
- const require_channel = require("./channel-DLn4b6Qi.cjs");
4
- const require_channel_setup = require("./channel.setup-BRbhaigB.cjs");
2
+ const require_resolve_allowlist = require("./resolve-allowlist-CoKmLXYe.cjs");
3
+ const require_channel = require("./channel-CqRcu6kk.cjs");
4
+ const require_channel_setup = require("./channel.setup-D2YO3F4O.cjs");
5
5
  const require_polls = require("./polls-P86qBpeV.cjs");
6
- const require_send = require("./send-C4BjzS1F.cjs");
7
- const require_reaction_types = require("./reaction-types-CL79V_5D.cjs");
6
+ const require_send = require("./send-CAKTR80N.cjs");
7
+ const require_reaction_types = require("./reaction-types-DcJBoyFP.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");
@@ -376,23 +376,18 @@ async function findMSTeamsConversationMember(params) {
376
376
  const conversationId = await resolveGraphConversationId(params.to);
377
377
  const conversation = resolveConversationPath(conversationId);
378
378
  const collection = conversation.kind === "channel" && params.includeIndirectChannelMembers ? "allMembers" : "members";
379
- let nextPath = `${conversation.basePath}/${collection}`;
380
- let pages = 0;
381
- let member;
382
- while (nextPath && pages < MAX_CONVERSATION_MEMBER_PAGES && !member) {
383
- const response = await require_resolve_allowlist.fetchGraphJson({
384
- token: params.token,
385
- path: nextPath
386
- });
387
- const userId = params.userId.trim().toLowerCase();
388
- member = (response.value ?? []).find((candidate) => candidate.userId?.trim().toLowerCase() === userId || candidate.email?.trim().toLowerCase() === userId);
389
- nextPath = response["@odata.nextLink"]?.replace("https://graph.microsoft.com/v1.0", "");
390
- pages += 1;
391
- }
392
- if (nextPath && !member) throw new Error("MS Teams conversation member pagination limit exceeded");
379
+ const userId = params.userId.trim().toLowerCase();
380
+ const result = await require_resolve_allowlist.fetchAllGraphPages({
381
+ token: params.token,
382
+ path: `${conversation.basePath}/${collection}`,
383
+ maxPages: MAX_CONVERSATION_MEMBER_PAGES,
384
+ collectItems: false,
385
+ findOne: (candidate) => candidate.userId?.trim().toLowerCase() === userId || candidate.email?.trim().toLowerCase() === userId
386
+ });
387
+ if (result.truncated) throw new Error("MS Teams conversation member pagination limit exceeded");
393
388
  return {
394
389
  conversationId,
395
- member
390
+ member: result.found
396
391
  };
397
392
  }
398
393
  //#endregion
@@ -486,19 +481,15 @@ async function findStandardChannelMember(params) {
486
481
  path: `${conversation.basePath}?$select=membershipType`
487
482
  })).membershipType !== "standard") throw new Error("Microsoft Teams member-info requires a standard channel when using the configured permission baseline.");
488
483
  const requestedUserId = normalizeUserId(params.userId);
489
- let nextPath = `/teams/${encodeURIComponent(conversation.teamId)}/members`;
490
- let pages = 0;
491
- while (nextPath && pages < MAX_TEAM_MEMBER_PAGES) {
492
- const response = await require_resolve_allowlist.fetchGraphJson({
493
- token: params.token,
494
- path: nextPath
495
- });
496
- const member = (response.value ?? []).find((candidate) => normalizeUserId(candidate.userId) === requestedUserId || normalizeUserId(candidate.email) === requestedUserId);
497
- if (member) return member;
498
- nextPath = response["@odata.nextLink"]?.replace("https://graph.microsoft.com/v1.0", "");
499
- pages += 1;
500
- }
501
- if (nextPath) throw new Error("Microsoft Teams team member pagination limit exceeded");
484
+ const result = await require_resolve_allowlist.fetchAllGraphPages({
485
+ token: params.token,
486
+ path: `/teams/${encodeURIComponent(conversation.teamId)}/members`,
487
+ maxPages: MAX_TEAM_MEMBER_PAGES,
488
+ collectItems: false,
489
+ findOne: (candidate) => normalizeUserId(candidate.userId) === requestedUserId || normalizeUserId(candidate.email) === requestedUserId
490
+ });
491
+ if (result.truncated) throw new Error("Microsoft Teams team member pagination limit exceeded");
492
+ return result.found;
502
493
  }
503
494
  /**
504
495
  * Fetch a user profile from Microsoft Graph by user ID.
@@ -538,29 +529,19 @@ async function getMemberInfoMSTeams(params) {
538
529
  */
539
530
  async function listChannelsMSTeams(params) {
540
531
  const token = await require_resolve_allowlist.resolveGraphToken(params.cfg);
541
- const firstPath = `/teams/${encodeURIComponent(params.teamId)}/channels?$select=id,displayName,description,membershipType`;
542
- const collected = [];
543
- let nextPath = firstPath;
544
- const MAX_PAGES = 10;
545
- let page = 0;
546
- while (nextPath && page < MAX_PAGES) {
547
- const res = await require_resolve_allowlist.fetchGraphJson({
548
- token,
549
- path: nextPath
550
- });
551
- collected.push(...res.value ?? []);
552
- const nextLink = res["@odata.nextLink"];
553
- nextPath = nextLink ? nextLink.replace("https://graph.microsoft.com/v1.0", "") : void 0;
554
- page++;
555
- }
532
+ const result = await require_resolve_allowlist.fetchAllGraphPages({
533
+ token,
534
+ path: `/teams/${encodeURIComponent(params.teamId)}/channels?$select=id,displayName,description,membershipType`,
535
+ maxPages: 10
536
+ });
556
537
  return {
557
- channels: collected.map((ch) => ({
538
+ channels: result.items.map((ch) => ({
558
539
  id: ch.id,
559
540
  displayName: ch.displayName,
560
541
  description: ch.description,
561
542
  membershipType: ch.membershipType
562
543
  })),
563
- truncated: Boolean(nextPath)
544
+ truncated: result.truncated
564
545
  };
565
546
  }
566
547
  /**
@@ -1,4 +1,4 @@
1
- const require_resolve_allowlist = require("./resolve-allowlist-BrdWKHE-.cjs");
1
+ const require_resolve_allowlist = require("./resolve-allowlist-CoKmLXYe.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");
@@ -483,7 +483,7 @@ const msteamsSetupWizard = {
483
483
  };
484
484
  let oauthModule;
485
485
  try {
486
- oauthModule = await Promise.resolve().then(() => require("./oauth-Bctn-WPI.cjs"));
486
+ oauthModule = await Promise.resolve().then(() => require("./oauth-BeROaYf0.cjs"));
487
487
  } catch (err) {
488
488
  await noteDelegatedAuthFailure(err);
489
489
  return {
@@ -1,5 +1,5 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_resolve_allowlist = require("./resolve-allowlist-BrdWKHE-.cjs");
2
+ const require_resolve_allowlist = require("./resolve-allowlist-CoKmLXYe.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
  const require_rolldown_runtime = require("./rolldown-runtime-VH7oDXx4.cjs");
2
2
  const require_runtime = require("./runtime-gZTAuFux.cjs");
3
3
  require("./runtime-api.cjs");
4
- const require_resolve_allowlist = require("./resolve-allowlist-BrdWKHE-.cjs");
5
- const require_channel_setup = require("./channel.setup-BRbhaigB.cjs");
4
+ const require_resolve_allowlist = require("./resolve-allowlist-CoKmLXYe.cjs");
5
+ const require_channel_setup = require("./channel.setup-D2YO3F4O.cjs");
6
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");
@@ -540,10 +540,10 @@ const MSTEAMS_MARKERS = {
540
540
  }
541
541
  };
542
542
  function createTokenPrefix(text, label) {
543
- const normalized = (0, openclaw_plugin_sdk_text_chunking.markdownToIR)(text, {
543
+ const normalized = /[\u{E000}&]/u.test(text) ? (0, openclaw_plugin_sdk_text_chunking.markdownToIR)(text, {
544
544
  autolink: false,
545
545
  linkify: false
546
- }).text;
546
+ }).text : "";
547
547
  let prefix;
548
548
  do
549
549
  prefix = `\u{E000}${label}-${(0, node_crypto.randomUUID)()}\u{E001}`;
@@ -1,4 +1,4 @@
1
- const require_resolve_allowlist = require("./resolve-allowlist-BrdWKHE-.cjs");
1
+ const require_resolve_allowlist = require("./resolve-allowlist-CoKmLXYe.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");
@@ -1,4 +1,4 @@
1
- const require_resolve_allowlist = require("./resolve-allowlist-BrdWKHE-.cjs");
1
+ const require_resolve_allowlist = require("./resolve-allowlist-CoKmLXYe.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
  /**
@@ -1173,18 +1173,13 @@ async function fetchAllGraphPages(params) {
1173
1173
  headers: params.headers
1174
1174
  });
1175
1175
  const pageItems = res.value ?? [];
1176
- if (params.findOne) {
1177
- const match = pageItems.find(params.findOne);
1178
- if (match) {
1179
- items.push(...pageItems);
1180
- return {
1181
- items,
1182
- truncated: false,
1183
- found: match
1184
- };
1185
- }
1186
- }
1187
- items.push(...pageItems);
1176
+ const match = params.findOne ? pageItems.find(params.findOne) : void 0;
1177
+ if (params.collectItems !== false) items.push(...pageItems);
1178
+ if (match) return {
1179
+ items,
1180
+ truncated: false,
1181
+ found: match
1182
+ };
1188
1183
  const rawNext = res["@odata.nextLink"];
1189
1184
  if (rawNext) nextPath = rawNext.replace("https://graph.microsoft.com/v1.0", "").replace("https://graph.microsoft.com/beta", "");
1190
1185
  else nextPath = void 0;
@@ -1927,6 +1922,12 @@ Object.defineProperty(exports, "extractMSTeamsQuoteInfo", {
1927
1922
  return extractMSTeamsQuoteInfo;
1928
1923
  }
1929
1924
  });
1925
+ Object.defineProperty(exports, "fetchAllGraphPages", {
1926
+ enumerable: true,
1927
+ get: function() {
1928
+ return fetchAllGraphPages;
1929
+ }
1930
+ });
1930
1931
  Object.defineProperty(exports, "fetchGraphAbsoluteUrl", {
1931
1932
  enumerable: true,
1932
1933
  get: function() {
@@ -1,10 +1,10 @@
1
1
  const require_runtime = require("./runtime-gZTAuFux.cjs");
2
2
  require("./runtime-api.cjs");
3
- const require_resolve_allowlist = require("./resolve-allowlist-BrdWKHE-.cjs");
4
- const require_channel = require("./channel-DLn4b6Qi.cjs");
5
- const require_channel_setup = require("./channel.setup-BRbhaigB.cjs");
3
+ const require_resolve_allowlist = require("./resolve-allowlist-CoKmLXYe.cjs");
4
+ const require_channel = require("./channel-CqRcu6kk.cjs");
5
+ const require_channel_setup = require("./channel.setup-D2YO3F4O.cjs");
6
6
  const require_polls = require("./polls-P86qBpeV.cjs");
7
- const require_messenger = require("./messenger-flkiAkkB.cjs");
7
+ const require_messenger = require("./messenger-BvR2flEt.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");
@@ -1,3 +1,3 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_channel_setup = require("./channel.setup-BRbhaigB.cjs");
2
+ const require_channel_setup = require("./channel.setup-D2YO3F4O.cjs");
3
3
  exports.msteamsSetupPlugin = require_channel_setup.msteamsSetupPlugin;
@@ -1,15 +1,15 @@
1
1
  const require_rolldown_runtime = require("./rolldown-runtime-VH7oDXx4.cjs");
2
2
  const require_runtime = require("./runtime-gZTAuFux.cjs");
3
3
  require("./runtime-api.cjs");
4
- const require_resolve_allowlist = require("./resolve-allowlist-BrdWKHE-.cjs");
5
- const require_channel = require("./channel-DLn4b6Qi.cjs");
6
- const require_thread_session = require("./thread-session-DxOri69r.cjs");
7
- const require_channel_setup = require("./channel.setup-BRbhaigB.cjs");
4
+ const require_resolve_allowlist = require("./resolve-allowlist-CoKmLXYe.cjs");
5
+ const require_channel = require("./channel-CqRcu6kk.cjs");
6
+ const require_thread_session = require("./thread-session-p8FNgohv.cjs");
7
+ const require_channel_setup = require("./channel.setup-D2YO3F4O.cjs");
8
8
  const require_polls = require("./polls-P86qBpeV.cjs");
9
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-flkiAkkB.cjs");
12
- const require_reaction_types = require("./reaction-types-CL79V_5D.cjs");
10
+ const require_approval_card = require("./approval-card-ClrTjCsL.cjs");
11
+ const require_messenger = require("./messenger-BvR2flEt.cjs");
12
+ const require_reaction_types = require("./reaction-types-DcJBoyFP.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");
@@ -3067,6 +3067,7 @@ function prepareMSTeamsThreadRouting(params) {
3067
3067
  };
3068
3068
  return {
3069
3069
  route,
3070
+ threadRootId: params.conversationMessageId ?? params.context.activity.replyToId,
3070
3071
  deadline,
3071
3072
  resolveTeamAadGroupId,
3072
3073
  getTeamAadGroupId: () => teamAadGroupId
@@ -3096,8 +3097,8 @@ async function resolveMSTeamsThreadContext(params) {
3096
3097
  params.log.debug?.("failed to fetch full quoted message text", { error: require_channel_setup.formatUnknownError(err) });
3097
3098
  }
3098
3099
  let threadContext;
3099
- const threadParentId = activity.replyToId;
3100
- if (threadParentId && params.isChannel && teamAadGroupId) try {
3100
+ const threadParentId = params.routing.threadRootId;
3101
+ if (threadParentId && threadParentId !== activity.id && params.isChannel && teamAadGroupId) try {
3101
3102
  const graphToken = await require_resolve_allowlist.withMSTeamsRequestDeadline({
3102
3103
  deadline,
3103
3104
  label: "MS Teams thread token",
@@ -1,4 +1,4 @@
1
- const require_resolve_allowlist = require("./resolve-allowlist-BrdWKHE-.cjs");
1
+ const require_resolve_allowlist = require("./resolve-allowlist-CoKmLXYe.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openclaw/msteams",
3
- "version": "2026.8.2",
3
+ "version": "2026.9.1",
4
4
  "description": "OpenClaw Microsoft Teams channel plugin for bot conversations.",
5
5
  "repository": {
6
6
  "type": "git",
@@ -22,7 +22,7 @@
22
22
  "openclaw": "workspace:*"
23
23
  },
24
24
  "peerDependencies": {
25
- "openclaw": ">=2026.8.2"
25
+ "openclaw": ">=2026.9.1"
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.2"
75
+ "pluginApi": ">=2026.9.1"
76
76
  },
77
77
  "build": {
78
- "openclawVersion": "2026.8.2",
78
+ "openclawVersion": "2026.9.1",
79
79
  "runtimeFormat": "cjs"
80
80
  },
81
81
  "release": {