@openclaw/msteams 2026.5.2-beta.2 → 2026.5.3-beta.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.
Files changed (197) hide show
  1. package/dist/api.js +3 -0
  2. package/dist/channel-D7hdreTh.js +984 -0
  3. package/dist/channel-config-api.js +2 -0
  4. package/dist/channel-plugin-api.js +2 -0
  5. package/dist/channel.runtime-BC1ruIfN.js +573 -0
  6. package/dist/config-schema-B8QezH6t.js +15 -0
  7. package/dist/contract-api.js +2 -0
  8. package/dist/graph-users-9uQJepqr.js +1354 -0
  9. package/dist/index.js +22 -0
  10. package/dist/oauth-BWJyilR1.js +114 -0
  11. package/dist/oauth.token-xxpoLWy5.js +115 -0
  12. package/dist/policy-DTnU2GR7.js +142 -0
  13. package/dist/probe-D_H8yFps.js +2194 -0
  14. package/dist/resolve-allowlist-D41JSziq.js +219 -0
  15. package/dist/runtime-api-DV1iVMn1.js +28 -0
  16. package/dist/runtime-api.js +2 -0
  17. package/dist/secret-contract-BuoEXmPS.js +35 -0
  18. package/dist/secret-contract-api.js +2 -0
  19. package/dist/setup-entry.js +15 -0
  20. package/dist/setup-plugin-api.js +64 -0
  21. package/dist/setup-surface-BLkFQYIQ.js +313 -0
  22. package/dist/src-CFp1QpFd.js +4064 -0
  23. package/dist/test-api.js +2 -0
  24. package/package.json +14 -6
  25. package/api.ts +0 -3
  26. package/channel-config-api.ts +0 -1
  27. package/channel-plugin-api.ts +0 -2
  28. package/config-api.ts +0 -4
  29. package/contract-api.ts +0 -4
  30. package/index.ts +0 -20
  31. package/runtime-api.ts +0 -73
  32. package/secret-contract-api.ts +0 -5
  33. package/setup-entry.ts +0 -13
  34. package/setup-plugin-api.ts +0 -3
  35. package/src/ai-entity.ts +0 -7
  36. package/src/approval-auth.ts +0 -44
  37. package/src/attachments/bot-framework.test.ts +0 -461
  38. package/src/attachments/bot-framework.ts +0 -362
  39. package/src/attachments/download.ts +0 -311
  40. package/src/attachments/graph.test.ts +0 -416
  41. package/src/attachments/graph.ts +0 -484
  42. package/src/attachments/html.ts +0 -122
  43. package/src/attachments/payload.ts +0 -14
  44. package/src/attachments/remote-media.test.ts +0 -137
  45. package/src/attachments/remote-media.ts +0 -112
  46. package/src/attachments/shared.test.ts +0 -530
  47. package/src/attachments/shared.ts +0 -626
  48. package/src/attachments/types.ts +0 -47
  49. package/src/attachments.graph.test.ts +0 -342
  50. package/src/attachments.helpers.test.ts +0 -246
  51. package/src/attachments.test-helpers.ts +0 -17
  52. package/src/attachments.test.ts +0 -687
  53. package/src/attachments.ts +0 -18
  54. package/src/block-streaming-config.test.ts +0 -61
  55. package/src/channel-api.ts +0 -1
  56. package/src/channel.actions.test.ts +0 -742
  57. package/src/channel.directory.test.ts +0 -200
  58. package/src/channel.runtime.ts +0 -56
  59. package/src/channel.setup.ts +0 -77
  60. package/src/channel.test.ts +0 -128
  61. package/src/channel.ts +0 -1136
  62. package/src/config-schema.ts +0 -6
  63. package/src/config-ui-hints.ts +0 -12
  64. package/src/conversation-store-fs.test.ts +0 -74
  65. package/src/conversation-store-fs.ts +0 -149
  66. package/src/conversation-store-helpers.test.ts +0 -202
  67. package/src/conversation-store-helpers.ts +0 -105
  68. package/src/conversation-store-memory.ts +0 -51
  69. package/src/conversation-store.shared.test.ts +0 -225
  70. package/src/conversation-store.ts +0 -71
  71. package/src/directory-live.test.ts +0 -156
  72. package/src/directory-live.ts +0 -111
  73. package/src/doctor.ts +0 -27
  74. package/src/errors.test.ts +0 -133
  75. package/src/errors.ts +0 -246
  76. package/src/feedback-reflection-prompt.ts +0 -117
  77. package/src/feedback-reflection-store.ts +0 -114
  78. package/src/feedback-reflection.test.ts +0 -237
  79. package/src/feedback-reflection.ts +0 -283
  80. package/src/file-consent-helpers.test.ts +0 -326
  81. package/src/file-consent-helpers.ts +0 -126
  82. package/src/file-consent-invoke.ts +0 -150
  83. package/src/file-consent.test.ts +0 -363
  84. package/src/file-consent.ts +0 -287
  85. package/src/graph-chat.ts +0 -55
  86. package/src/graph-group-management.test.ts +0 -318
  87. package/src/graph-group-management.ts +0 -168
  88. package/src/graph-members.test.ts +0 -89
  89. package/src/graph-members.ts +0 -48
  90. package/src/graph-messages.actions.test.ts +0 -243
  91. package/src/graph-messages.read.test.ts +0 -391
  92. package/src/graph-messages.search.test.ts +0 -213
  93. package/src/graph-messages.test-helpers.ts +0 -50
  94. package/src/graph-messages.ts +0 -534
  95. package/src/graph-teams.test.ts +0 -215
  96. package/src/graph-teams.ts +0 -114
  97. package/src/graph-thread.test.ts +0 -246
  98. package/src/graph-thread.ts +0 -146
  99. package/src/graph-upload.test.ts +0 -258
  100. package/src/graph-upload.ts +0 -531
  101. package/src/graph-users.ts +0 -29
  102. package/src/graph.test.ts +0 -516
  103. package/src/graph.ts +0 -293
  104. package/src/inbound.test.ts +0 -221
  105. package/src/inbound.ts +0 -148
  106. package/src/index.ts +0 -4
  107. package/src/media-helpers.test.ts +0 -202
  108. package/src/media-helpers.ts +0 -105
  109. package/src/mentions.test.ts +0 -244
  110. package/src/mentions.ts +0 -114
  111. package/src/messenger.test.ts +0 -865
  112. package/src/messenger.ts +0 -605
  113. package/src/monitor-handler/access.ts +0 -125
  114. package/src/monitor-handler/inbound-media.test.ts +0 -289
  115. package/src/monitor-handler/inbound-media.ts +0 -180
  116. package/src/monitor-handler/message-handler-mock-support.test-support.ts +0 -28
  117. package/src/monitor-handler/message-handler.authz.test.ts +0 -669
  118. package/src/monitor-handler/message-handler.dm-media.test.ts +0 -54
  119. package/src/monitor-handler/message-handler.test-support.ts +0 -100
  120. package/src/monitor-handler/message-handler.thread-parent.test.ts +0 -223
  121. package/src/monitor-handler/message-handler.thread-session.test.ts +0 -77
  122. package/src/monitor-handler/message-handler.ts +0 -1000
  123. package/src/monitor-handler/reaction-handler.test.ts +0 -267
  124. package/src/monitor-handler/reaction-handler.ts +0 -210
  125. package/src/monitor-handler/thread-session.ts +0 -17
  126. package/src/monitor-handler.adaptive-card.test.ts +0 -162
  127. package/src/monitor-handler.feedback-authz.test.ts +0 -314
  128. package/src/monitor-handler.file-consent.test.ts +0 -423
  129. package/src/monitor-handler.sso.test.ts +0 -563
  130. package/src/monitor-handler.test-helpers.ts +0 -180
  131. package/src/monitor-handler.ts +0 -534
  132. package/src/monitor-handler.types.ts +0 -27
  133. package/src/monitor-types.ts +0 -6
  134. package/src/monitor.lifecycle.test.ts +0 -278
  135. package/src/monitor.test.ts +0 -119
  136. package/src/monitor.ts +0 -442
  137. package/src/oauth.flow.ts +0 -77
  138. package/src/oauth.shared.ts +0 -37
  139. package/src/oauth.test.ts +0 -305
  140. package/src/oauth.token.ts +0 -158
  141. package/src/oauth.ts +0 -130
  142. package/src/outbound.test.ts +0 -130
  143. package/src/outbound.ts +0 -71
  144. package/src/pending-uploads-fs.test.ts +0 -246
  145. package/src/pending-uploads-fs.ts +0 -235
  146. package/src/pending-uploads.test.ts +0 -173
  147. package/src/pending-uploads.ts +0 -121
  148. package/src/policy.test.ts +0 -240
  149. package/src/policy.ts +0 -262
  150. package/src/polls-store-memory.ts +0 -32
  151. package/src/polls.test.ts +0 -160
  152. package/src/polls.ts +0 -323
  153. package/src/presentation.ts +0 -68
  154. package/src/probe.test.ts +0 -77
  155. package/src/probe.ts +0 -132
  156. package/src/reply-dispatcher.test.ts +0 -437
  157. package/src/reply-dispatcher.ts +0 -346
  158. package/src/reply-stream-controller.test.ts +0 -235
  159. package/src/reply-stream-controller.ts +0 -147
  160. package/src/resolve-allowlist.test.ts +0 -250
  161. package/src/resolve-allowlist.ts +0 -309
  162. package/src/revoked-context.ts +0 -17
  163. package/src/runtime.ts +0 -9
  164. package/src/sdk-types.ts +0 -59
  165. package/src/sdk.test.ts +0 -666
  166. package/src/sdk.ts +0 -884
  167. package/src/secret-contract.ts +0 -49
  168. package/src/secret-input.ts +0 -7
  169. package/src/send-context.ts +0 -231
  170. package/src/send.test.ts +0 -493
  171. package/src/send.ts +0 -637
  172. package/src/sent-message-cache.test.ts +0 -15
  173. package/src/sent-message-cache.ts +0 -56
  174. package/src/session-route.ts +0 -40
  175. package/src/setup-core.ts +0 -160
  176. package/src/setup-surface.test.ts +0 -202
  177. package/src/setup-surface.ts +0 -320
  178. package/src/sso-token-store.test.ts +0 -72
  179. package/src/sso-token-store.ts +0 -166
  180. package/src/sso.ts +0 -300
  181. package/src/storage.ts +0 -25
  182. package/src/store-fs.ts +0 -44
  183. package/src/streaming-message.test.ts +0 -262
  184. package/src/streaming-message.ts +0 -297
  185. package/src/test-runtime.ts +0 -16
  186. package/src/thread-parent-context.test.ts +0 -224
  187. package/src/thread-parent-context.ts +0 -159
  188. package/src/token-response.ts +0 -11
  189. package/src/token.test.ts +0 -259
  190. package/src/token.ts +0 -195
  191. package/src/user-agent.test.ts +0 -86
  192. package/src/user-agent.ts +0 -53
  193. package/src/webhook-timeouts.ts +0 -27
  194. package/src/welcome-card.test.ts +0 -81
  195. package/src/welcome-card.ts +0 -57
  196. package/test-api.ts +0 -1
  197. package/tsconfig.json +0 -16
@@ -0,0 +1,219 @@
1
+ import { c as normalizeQuery, f as resolveGraphToken, o as listChannelsForTeam, s as listTeamsByName, t as searchGraphUsers } from "./graph-users-9uQJepqr.js";
2
+ import { mapAllowlistResolutionInputs } from "openclaw/plugin-sdk/allow-from";
3
+ import { normalizeLowercaseStringOrEmpty, normalizeOptionalLowercaseString } from "openclaw/plugin-sdk/text-runtime";
4
+ //#region extensions/msteams/src/resolve-allowlist.ts
5
+ function stripProviderPrefix(raw) {
6
+ return raw.replace(/^(msteams|teams):/i, "");
7
+ }
8
+ function normalizeMSTeamsMessagingTarget(raw) {
9
+ let trimmed = raw.trim();
10
+ if (!trimmed) return;
11
+ trimmed = stripProviderPrefix(trimmed).trim();
12
+ if (/^conversation:/i.test(trimmed)) {
13
+ const id = trimmed.slice(13).trim();
14
+ return id ? `conversation:${id}` : void 0;
15
+ }
16
+ if (/^user:/i.test(trimmed)) {
17
+ const id = trimmed.slice(5).trim();
18
+ return id ? `user:${id}` : void 0;
19
+ }
20
+ return trimmed || void 0;
21
+ }
22
+ function normalizeMSTeamsUserInput(raw) {
23
+ return stripProviderPrefix(raw).replace(/^(user|conversation):/i, "").trim();
24
+ }
25
+ function parseMSTeamsConversationId(raw) {
26
+ const trimmed = stripProviderPrefix(raw).trim();
27
+ if (!/^conversation:/i.test(trimmed)) return null;
28
+ return trimmed.slice(13).trim();
29
+ }
30
+ /**
31
+ * Detect whether a raw target string looks like a Microsoft Teams conversation
32
+ * or user id that cron announce delivery and other explicit-target paths can
33
+ * forward verbatim to the channel adapter.
34
+ *
35
+ * Accepts both prefixed and bare formats:
36
+ * - `conversation:<id>` — explicit conversation prefix
37
+ * - `user:<aad-guid>` — user id (16+ hex chars, UUID-like)
38
+ * - `19:abc@thread.tacv2` / `19:abc@thread.skype` — channel / legacy group
39
+ * - `19:{userId}_{appId}@unq.gbl.spaces` — Graph 1:1 chat thread format
40
+ * - `a:1xxx` — Bot Framework personal (1:1) chat id
41
+ * - `8:orgid:xxx` — Bot Framework org-scoped personal chat id
42
+ * - `29:xxx` — Bot Framework user id
43
+ *
44
+ * Display-name user targets such as `user:John Smith` intentionally return
45
+ * false so that the Graph API directory lookup still runs for them.
46
+ */
47
+ function looksLikeMSTeamsTargetId(raw) {
48
+ const trimmed = raw.trim();
49
+ if (!trimmed) return false;
50
+ if (/^conversation:/i.test(trimmed)) return true;
51
+ if (/^user:/i.test(trimmed)) {
52
+ const id = trimmed.slice(5).trim();
53
+ return /^[0-9a-fA-F-]{16,}$/.test(id);
54
+ }
55
+ if (/^19:.+@thread\.(tacv2|skype)$/i.test(trimmed)) return true;
56
+ if (/^19:.+@unq\.gbl\.spaces$/i.test(trimmed)) return true;
57
+ if (/^a:1[A-Za-z0-9_-]+$/i.test(trimmed)) return true;
58
+ if (/^8:orgid:[A-Za-z0-9-]+$/i.test(trimmed)) return true;
59
+ if (/^29:[A-Za-z0-9_-]+$/i.test(trimmed)) return true;
60
+ return /@thread\b/i.test(trimmed);
61
+ }
62
+ function normalizeMSTeamsTeamKey(raw) {
63
+ return stripProviderPrefix(raw).replace(/^team:/i, "").trim() || void 0;
64
+ }
65
+ function normalizeMSTeamsChannelKey(raw) {
66
+ return (raw?.trim().replace(/^#/, "").trim() ?? "") || void 0;
67
+ }
68
+ function normalizeMSTeamsConversationTargetId(raw) {
69
+ const trimmed = stripProviderPrefix(raw).trim();
70
+ return parseMSTeamsConversationId(trimmed) ?? trimmed;
71
+ }
72
+ function looksLikeMSTeamsThreadConversationId(raw) {
73
+ const normalized = normalizeMSTeamsConversationTargetId(raw);
74
+ return /^19:.+@thread\./i.test(normalized);
75
+ }
76
+ function parseMSTeamsTeamChannelInput(raw) {
77
+ const trimmed = stripProviderPrefix(raw).trim();
78
+ if (!trimmed) return {};
79
+ const parts = trimmed.split("/");
80
+ const team = normalizeMSTeamsTeamKey(parts[0] ?? "");
81
+ const channel = parts.length > 1 ? normalizeMSTeamsChannelKey(parts.slice(1).join("/")) : void 0;
82
+ return {
83
+ ...team ? { team } : {},
84
+ ...channel ? { channel } : {}
85
+ };
86
+ }
87
+ function parseMSTeamsTeamEntry(raw) {
88
+ const { team, channel } = parseMSTeamsTeamChannelInput(raw);
89
+ if (!team) return null;
90
+ return {
91
+ teamKey: team,
92
+ ...channel ? { channelKey: channel } : {}
93
+ };
94
+ }
95
+ async function resolveMSTeamsChannelAllowlist(params) {
96
+ let tokenPromise;
97
+ const getToken = () => {
98
+ tokenPromise ??= resolveGraphToken(params.cfg);
99
+ return tokenPromise;
100
+ };
101
+ return await mapAllowlistResolutionInputs({
102
+ inputs: params.entries,
103
+ mapInput: async (input) => {
104
+ const { team, channel } = parseMSTeamsTeamChannelInput(input);
105
+ if (!team) return {
106
+ input,
107
+ resolved: false
108
+ };
109
+ if (looksLikeMSTeamsThreadConversationId(team)) {
110
+ const teamId = normalizeMSTeamsConversationTargetId(team);
111
+ if (!channel) return {
112
+ input,
113
+ resolved: true,
114
+ teamId,
115
+ teamName: teamId
116
+ };
117
+ if (!looksLikeMSTeamsThreadConversationId(channel)) return {
118
+ input,
119
+ resolved: false,
120
+ teamId,
121
+ teamName: teamId,
122
+ note: "channel id required for conversation-id team"
123
+ };
124
+ const channelId = normalizeMSTeamsConversationTargetId(channel);
125
+ return {
126
+ input,
127
+ resolved: true,
128
+ teamId,
129
+ teamName: teamId,
130
+ channelId,
131
+ channelName: channelId
132
+ };
133
+ }
134
+ const token = await getToken();
135
+ const teams = /^[0-9a-fA-F-]{16,}$/.test(team) ? [{
136
+ id: team,
137
+ displayName: team
138
+ }] : await listTeamsByName(token, team);
139
+ if (teams.length === 0) return {
140
+ input,
141
+ resolved: false,
142
+ note: "team not found"
143
+ };
144
+ const teamMatch = teams[0];
145
+ const graphTeamId = teamMatch.id?.trim();
146
+ const teamName = teamMatch.displayName?.trim() || team;
147
+ if (!graphTeamId) return {
148
+ input,
149
+ resolved: false,
150
+ note: "team id missing"
151
+ };
152
+ let teamChannels = [];
153
+ try {
154
+ teamChannels = await listChannelsForTeam(token, graphTeamId);
155
+ } catch {}
156
+ const teamId = teamChannels.find((ch) => normalizeOptionalLowercaseString(ch.displayName) === "general")?.id?.trim() || graphTeamId;
157
+ if (!channel) return {
158
+ input,
159
+ resolved: true,
160
+ teamId,
161
+ teamName,
162
+ note: teams.length > 1 ? "multiple teams; chose first" : void 0
163
+ };
164
+ const normalizedChannel = normalizeOptionalLowercaseString(channel);
165
+ const channelMatch = teamChannels.find((item) => item.id === channel) ?? teamChannels.find((item) => normalizeOptionalLowercaseString(item.displayName) === normalizedChannel) ?? teamChannels.find((item) => normalizeLowercaseStringOrEmpty(item.displayName ?? "").includes(normalizedChannel ?? ""));
166
+ if (!channelMatch?.id) return {
167
+ input,
168
+ resolved: false,
169
+ note: "channel not found"
170
+ };
171
+ return {
172
+ input,
173
+ resolved: true,
174
+ teamId,
175
+ teamName,
176
+ channelId: channelMatch.id,
177
+ channelName: channelMatch.displayName ?? channel,
178
+ note: teamChannels.length > 1 ? "multiple channels; chose first" : void 0
179
+ };
180
+ }
181
+ });
182
+ }
183
+ async function resolveMSTeamsUserAllowlist(params) {
184
+ const token = await resolveGraphToken(params.cfg);
185
+ return await mapAllowlistResolutionInputs({
186
+ inputs: params.entries,
187
+ mapInput: async (input) => {
188
+ const query = normalizeQuery(normalizeMSTeamsUserInput(input));
189
+ if (!query) return {
190
+ input,
191
+ resolved: false
192
+ };
193
+ if (/^[0-9a-fA-F-]{16,}$/.test(query)) return {
194
+ input,
195
+ resolved: true,
196
+ id: query
197
+ };
198
+ const users = await searchGraphUsers({
199
+ token,
200
+ query,
201
+ top: 10
202
+ });
203
+ const match = users[0];
204
+ if (!match?.id) return {
205
+ input,
206
+ resolved: false
207
+ };
208
+ return {
209
+ input,
210
+ resolved: true,
211
+ id: match.id,
212
+ name: match.displayName ?? void 0,
213
+ note: users.length > 1 ? "multiple matches; chose first" : void 0
214
+ };
215
+ }
216
+ });
217
+ }
218
+ //#endregion
219
+ export { parseMSTeamsTeamChannelInput as a, resolveMSTeamsUserAllowlist as c, parseMSTeamsConversationId as i, normalizeMSTeamsMessagingTarget as n, parseMSTeamsTeamEntry as o, normalizeMSTeamsUserInput as r, resolveMSTeamsChannelAllowlist as s, looksLikeMSTeamsTargetId as t };
@@ -0,0 +1,28 @@
1
+ import { mergeAllowlist, resolveAllowlistMatchSimple, summarizeMapping } from "openclaw/plugin-sdk/allow-from";
2
+ import { createChannelPairingController } from "openclaw/plugin-sdk/channel-pairing";
3
+ import { evaluateSenderGroupAccessForPolicy, readStoreAllowFromForDmPolicy, resolveDmGroupAccessWithLists, resolveEffectiveAllowFromLists, resolveSenderScopedGroupPolicy, resolveToolsBySender } from "openclaw/plugin-sdk/channel-policy";
4
+ import { DEFAULT_ACCOUNT_ID } from "openclaw/plugin-sdk/account-id";
5
+ import { logTypingFailure } from "openclaw/plugin-sdk/channel-logging";
6
+ import { createChannelReplyPipeline } from "openclaw/plugin-sdk/channel-reply-pipeline";
7
+ import { PAIRING_APPROVED_MESSAGE, buildProbeChannelStatusSummary, createDefaultChannelRuntimeState } from "openclaw/plugin-sdk/channel-status";
8
+ import { buildChannelKeyCandidates, normalizeChannelSlug, resolveChannelEntryMatchWithFallback, resolveNestedAllowlistDecision } from "openclaw/plugin-sdk/channel-targets";
9
+ import { isDangerousNameMatchingEnabled } from "openclaw/plugin-sdk/dangerous-name-runtime";
10
+ import { resolveDefaultGroupPolicy } from "openclaw/plugin-sdk/runtime-group-policy";
11
+ import { withFileLock as withFileLock$1 } from "openclaw/plugin-sdk/file-lock";
12
+ import { keepHttpServerTaskAlive } from "openclaw/plugin-sdk/channel-lifecycle";
13
+ import { detectMime, extensionForMime, extractOriginalFilename, getFileExtension, resolveChannelMediaMaxBytes } from "openclaw/plugin-sdk/media-runtime";
14
+ import { dispatchReplyFromConfigWithSettledDispatcher as dispatchReplyFromConfigWithSettledDispatcher$1 } from "openclaw/plugin-sdk/inbound-reply-dispatch";
15
+ import { loadOutboundMediaFromUrl } from "openclaw/plugin-sdk/outbound-media";
16
+ import { buildMediaPayload } from "openclaw/plugin-sdk/reply-payload";
17
+ import { fetchWithSsrFGuard as fetchWithSsrFGuard$1 } from "openclaw/plugin-sdk/ssrf-runtime";
18
+ import { normalizeStringEntries } from "openclaw/plugin-sdk/string-normalization-runtime";
19
+ import { chunkTextForOutbound } from "openclaw/plugin-sdk/text-chunking";
20
+ import { DEFAULT_WEBHOOK_MAX_BODY_BYTES } from "openclaw/plugin-sdk/webhook-ingress";
21
+ import { createPluginRuntimeStore } from "openclaw/plugin-sdk/runtime-store";
22
+ //#region extensions/msteams/src/runtime.ts
23
+ const { setRuntime: setMSTeamsRuntime, getRuntime: getMSTeamsRuntime, tryGetRuntime: getOptionalMSTeamsRuntime } = createPluginRuntimeStore({
24
+ pluginId: "msteams",
25
+ errorMessage: "MSTeams runtime not initialized"
26
+ });
27
+ //#endregion
28
+ export { resolveDmGroupAccessWithLists as A, normalizeChannelSlug as C, resolveChannelEntryMatchWithFallback as D, resolveAllowlistMatchSimple as E, summarizeMapping as F, withFileLock$1 as I, getMSTeamsRuntime as L, resolveNestedAllowlistDecision as M, resolveSenderScopedGroupPolicy as N, resolveChannelMediaMaxBytes as O, resolveToolsBySender as P, getOptionalMSTeamsRuntime as R, mergeAllowlist as S, readStoreAllowFromForDmPolicy as T, getFileExtension as _, buildMediaPayload as a, loadOutboundMediaFromUrl as b, createChannelPairingController as c, detectMime as d, dispatchReplyFromConfigWithSettledDispatcher$1 as f, fetchWithSsrFGuard$1 as g, extractOriginalFilename as h, buildChannelKeyCandidates as i, resolveEffectiveAllowFromLists as j, resolveDefaultGroupPolicy as k, createChannelReplyPipeline as l, extensionForMime as m, DEFAULT_WEBHOOK_MAX_BODY_BYTES as n, buildProbeChannelStatusSummary as o, evaluateSenderGroupAccessForPolicy as p, PAIRING_APPROVED_MESSAGE as r, chunkTextForOutbound as s, DEFAULT_ACCOUNT_ID as t, createDefaultChannelRuntimeState as u, isDangerousNameMatchingEnabled as v, normalizeStringEntries as w, logTypingFailure as x, keepHttpServerTaskAlive as y, setMSTeamsRuntime as z };
@@ -0,0 +1,2 @@
1
+ import { A as resolveDmGroupAccessWithLists, C as normalizeChannelSlug, D as resolveChannelEntryMatchWithFallback, E as resolveAllowlistMatchSimple, F as summarizeMapping, I as withFileLock, M as resolveNestedAllowlistDecision, N as resolveSenderScopedGroupPolicy, O as resolveChannelMediaMaxBytes, P as resolveToolsBySender, S as mergeAllowlist, T as readStoreAllowFromForDmPolicy, _ as getFileExtension, a as buildMediaPayload, b as loadOutboundMediaFromUrl, c as createChannelPairingController, d as detectMime, f as dispatchReplyFromConfigWithSettledDispatcher, g as fetchWithSsrFGuard, h as extractOriginalFilename, i as buildChannelKeyCandidates, j as resolveEffectiveAllowFromLists, k as resolveDefaultGroupPolicy, l as createChannelReplyPipeline, m as extensionForMime, n as DEFAULT_WEBHOOK_MAX_BODY_BYTES, o as buildProbeChannelStatusSummary, p as evaluateSenderGroupAccessForPolicy, r as PAIRING_APPROVED_MESSAGE, s as chunkTextForOutbound, t as DEFAULT_ACCOUNT_ID, u as createDefaultChannelRuntimeState, v as isDangerousNameMatchingEnabled, w as normalizeStringEntries, x as logTypingFailure, y as keepHttpServerTaskAlive, z as setMSTeamsRuntime } from "./runtime-api-DV1iVMn1.js";
2
+ export { DEFAULT_ACCOUNT_ID, DEFAULT_WEBHOOK_MAX_BODY_BYTES, PAIRING_APPROVED_MESSAGE, buildChannelKeyCandidates, buildMediaPayload, buildProbeChannelStatusSummary, chunkTextForOutbound, createChannelPairingController, createChannelReplyPipeline, createDefaultChannelRuntimeState, detectMime, dispatchReplyFromConfigWithSettledDispatcher, evaluateSenderGroupAccessForPolicy, extensionForMime, extractOriginalFilename, fetchWithSsrFGuard, getFileExtension, isDangerousNameMatchingEnabled, keepHttpServerTaskAlive, loadOutboundMediaFromUrl, logTypingFailure, mergeAllowlist, normalizeChannelSlug, normalizeStringEntries, readStoreAllowFromForDmPolicy, resolveAllowlistMatchSimple, resolveChannelEntryMatchWithFallback, resolveChannelMediaMaxBytes, resolveDefaultGroupPolicy, resolveDmGroupAccessWithLists, resolveEffectiveAllowFromLists, resolveNestedAllowlistDecision, resolveSenderScopedGroupPolicy, resolveToolsBySender, setMSTeamsRuntime, summarizeMapping, withFileLock };
@@ -0,0 +1,35 @@
1
+ import { collectSecretInputAssignment, getChannelRecord } from "openclaw/plugin-sdk/channel-secret-basic-runtime";
2
+ //#region extensions/msteams/src/secret-contract.ts
3
+ const secretTargetRegistryEntries = [{
4
+ id: "channels.msteams.appPassword",
5
+ targetType: "channels.msteams.appPassword",
6
+ configFile: "openclaw.json",
7
+ pathPattern: "channels.msteams.appPassword",
8
+ secretShape: "secret_input",
9
+ expectedResolvedValue: "string",
10
+ includeInPlan: true,
11
+ includeInConfigure: true,
12
+ includeInAudit: true
13
+ }];
14
+ function collectRuntimeConfigAssignments(params) {
15
+ const msteams = getChannelRecord(params.config, "msteams");
16
+ if (!msteams) return;
17
+ collectSecretInputAssignment({
18
+ value: msteams.appPassword,
19
+ path: "channels.msteams.appPassword",
20
+ expected: "string",
21
+ defaults: params.defaults,
22
+ context: params.context,
23
+ active: msteams.enabled !== false,
24
+ inactiveReason: "Microsoft Teams channel is disabled.",
25
+ apply: (value) => {
26
+ msteams.appPassword = value;
27
+ }
28
+ });
29
+ }
30
+ const channelSecrets = {
31
+ secretTargetRegistryEntries,
32
+ collectRuntimeConfigAssignments
33
+ };
34
+ //#endregion
35
+ export { collectRuntimeConfigAssignments as n, secretTargetRegistryEntries as r, channelSecrets as t };
@@ -0,0 +1,2 @@
1
+ import { n as collectRuntimeConfigAssignments, r as secretTargetRegistryEntries, t as channelSecrets } from "./secret-contract-BuoEXmPS.js";
2
+ export { channelSecrets, collectRuntimeConfigAssignments, secretTargetRegistryEntries };
@@ -0,0 +1,15 @@
1
+ import { defineBundledChannelSetupEntry } from "openclaw/plugin-sdk/channel-entry-contract";
2
+ //#region extensions/msteams/setup-entry.ts
3
+ var setup_entry_default = defineBundledChannelSetupEntry({
4
+ importMetaUrl: import.meta.url,
5
+ plugin: {
6
+ specifier: "./setup-plugin-api.js",
7
+ exportName: "msteamsSetupPlugin"
8
+ },
9
+ secrets: {
10
+ specifier: "./secret-contract-api.js",
11
+ exportName: "channelSecrets"
12
+ }
13
+ });
14
+ //#endregion
15
+ export { setup_entry_default as default };
@@ -0,0 +1,64 @@
1
+ import { h as resolveMSTeamsCredentials } from "./graph-users-9uQJepqr.js";
2
+ import { t as MSTeamsChannelConfigSchema } from "./config-schema-B8QezH6t.js";
3
+ import { i as msteamsSetupAdapter, t as msteamsSetupWizard } from "./setup-surface-BLkFQYIQ.js";
4
+ import { describeAccountSnapshot } from "openclaw/plugin-sdk/account-helpers";
5
+ import { formatAllowFromLowercase } from "openclaw/plugin-sdk/allow-from";
6
+ import { createTopLevelChannelConfigAdapter } from "openclaw/plugin-sdk/channel-config-helpers";
7
+ //#region extensions/msteams/src/channel.setup.ts
8
+ const meta = {
9
+ id: "msteams",
10
+ label: "Microsoft Teams",
11
+ selectionLabel: "Microsoft Teams (Bot Framework)",
12
+ docsPath: "/channels/msteams",
13
+ docsLabel: "msteams",
14
+ blurb: "Teams SDK; enterprise support.",
15
+ aliases: ["teams"],
16
+ order: 60
17
+ };
18
+ const resolveMSTeamsChannelConfig = (cfg) => ({
19
+ allowFrom: cfg.channels?.msteams?.allowFrom,
20
+ defaultTo: cfg.channels?.msteams?.defaultTo
21
+ });
22
+ const msteamsConfigAdapter = createTopLevelChannelConfigAdapter({
23
+ sectionKey: "msteams",
24
+ resolveAccount: (cfg) => ({
25
+ accountId: "default",
26
+ enabled: cfg.channels?.msteams?.enabled !== false,
27
+ configured: Boolean(resolveMSTeamsCredentials(cfg.channels?.msteams))
28
+ }),
29
+ resolveAccessorAccount: ({ cfg }) => resolveMSTeamsChannelConfig(cfg),
30
+ resolveAllowFrom: (account) => account.allowFrom,
31
+ formatAllowFrom: (allowFrom) => formatAllowFromLowercase({ allowFrom }),
32
+ resolveDefaultTo: (account) => account.defaultTo
33
+ });
34
+ const msteamsSetupPlugin = {
35
+ id: "msteams",
36
+ meta: {
37
+ ...meta,
38
+ aliases: [...meta.aliases]
39
+ },
40
+ capabilities: {
41
+ chatTypes: [
42
+ "direct",
43
+ "channel",
44
+ "thread"
45
+ ],
46
+ polls: true,
47
+ threads: true,
48
+ media: true
49
+ },
50
+ reload: { configPrefixes: ["channels.msteams"] },
51
+ configSchema: MSTeamsChannelConfigSchema,
52
+ config: {
53
+ ...msteamsConfigAdapter,
54
+ isConfigured: (_account, cfg) => Boolean(resolveMSTeamsCredentials(cfg.channels?.msteams)),
55
+ describeAccount: (account) => describeAccountSnapshot({
56
+ account,
57
+ configured: account.configured
58
+ })
59
+ },
60
+ setupWizard: msteamsSetupWizard,
61
+ setup: msteamsSetupAdapter
62
+ };
63
+ //#endregion
64
+ export { msteamsSetupPlugin };