@openclaw/msteams 2026.11.3 → 2026.11.5-beta.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (32) hide show
  1. package/dist/.setup/{adapter.runtime-B-6Q3nMI.cjs → adapter.runtime-BB38Rdj_.cjs} +20 -23
  2. package/dist/.setup/{approval-card-DWPDItvq.cjs → approval-card-BHAKsdAM.cjs} +5 -9
  3. package/dist/.setup/{approval-handler.runtime-D0jbDypb.cjs → approval-handler.runtime-C16UvawQ.cjs} +4 -4
  4. package/dist/.setup/{channel-Ci6K9Njb.cjs → channel-BaTw0JW3.cjs} +35 -254
  5. package/dist/.setup/{channel.runtime-DeHVAVxL.cjs → channel.runtime-Ch2M_-jN.cjs} +65 -107
  6. package/dist/.setup/{channel.setup-BN3uhq3r.cjs → channel.setup-B9yKGEse.cjs} +161 -262
  7. package/dist/.setup/{config-schema-CkKdphSp.cjs → config-schema-3lVZ45cB.cjs} +120 -125
  8. package/dist/.setup/{conversation-store-state-B-4g4uq5.cjs → conversation-store-state-CVhMM0QY.cjs} +411 -601
  9. package/dist/.setup/{delegated-state-Bv5cWuec.cjs → delegated-state-ilYzKwD8.cjs} +68 -6
  10. package/dist/.setup/{monitor-cuifGELM.cjs → monitor-b0zPpnmW.cjs} +1883 -2310
  11. package/dist/.setup/{oauth-BBUQCwmq.cjs → oauth-CUtfkgKE.cjs} +10 -21
  12. package/dist/.setup/presentation-Duoi9Ijn.cjs +213 -0
  13. package/dist/.setup/{reaction-types-CwP5RVQB.cjs → reaction-types-C6F6g2nk.cjs} +1 -1
  14. package/dist/.setup/{resolve-allowlist-gI34MnpE.cjs → resolve-allowlist-7mIEepXB.cjs} +214 -90
  15. package/dist/.setup/{secret-contract-api-wAyY5UHv.cjs → secret-contract-api-D554HIrH.cjs} +4 -6
  16. package/dist/.setup/{secret-contract-api-YY3v6MP8.cjs → secret-contract-api-r3hRtbBW.cjs} +1 -1
  17. package/dist/.setup/{send-C9JY42T6.cjs → send-D1w7a_ip.cjs} +86 -182
  18. package/dist/.setup/{setup-plugin-api-B-NYBLkF.cjs → setup-plugin-api-ChovZJU6.cjs} +1 -1
  19. package/dist/.setup/{thread-session-BWVCoYza.cjs → thread-session-CeWYiol_.cjs} +4 -6
  20. package/dist/.setup/{token-config-bEpua_Q7.cjs → token-config-DICiuJWr.cjs} +0 -2
  21. package/dist/.source-module-urls/7e43ee3ae4faab430a47269c8217f8d99ec60ecd85233f40e81d03efeb543068.json +1 -0
  22. package/dist/api.cjs +2 -2
  23. package/dist/channel-config-api.cjs +1 -1
  24. package/dist/channel-plugin-api.cjs +1 -1
  25. package/dist/directory-contract-api.cjs +1 -1
  26. package/dist/doctor-contract-api.cjs +3 -11
  27. package/dist/qa-runner-api.cjs +1 -1
  28. package/dist/secret-contract-api.cjs +1 -1
  29. package/dist/setup-entry.cjs +2 -2
  30. package/dist/setup-plugin-api.cjs +1 -1
  31. package/openclaw.plugin.json +0 -30
  32. package/package.json +11 -11
@@ -1,13 +1,13 @@
1
1
  const require_bot_framework_service_url = require("./bot-framework-service-url-B3FWn2SV.cjs");
2
- const require_token_config = require("./token-config-bEpua_Q7.cjs");
2
+ const require_token_config = require("./token-config-DICiuJWr.cjs");
3
3
  let openclaw_plugin_sdk_channel_core = require("openclaw/plugin-sdk/channel-core");
4
4
  let openclaw_plugin_sdk_account_id = require("openclaw/plugin-sdk/account-id");
5
5
  let openclaw_plugin_sdk_secret_input = require("openclaw/plugin-sdk/secret-input");
6
6
  let openclaw_plugin_sdk_ssrf_policy = require("openclaw/plugin-sdk/ssrf-policy");
7
7
  let openclaw_plugin_sdk_channel_config_schema = require("openclaw/plugin-sdk/channel-config-schema");
8
- let zod = require("zod");
9
8
  let openclaw_plugin_sdk_webhook_targets = require("openclaw/plugin-sdk/webhook-targets");
10
- //#region extensions/msteams/src/config-schema-refinement.ts
9
+ let zod = require("zod");
10
+ //#region extensions/msteams/src/config-schema.ts
11
11
  function hasConfiguredValue(value) {
12
12
  return typeof value === "string" ? value.trim().length > 0 : value !== void 0 && value !== null;
13
13
  }
@@ -44,125 +44,6 @@ function refineEffectiveAccount(account, path, isDefault, ctx) {
44
44
  if (cloud === "China" && serviceUrl && !isAzureChinaBotFrameworkServiceUrl(serviceUrl)) issue("serviceUrl", `${field("cloud=China")} requires serviceUrl to use an Azure China Bot Framework channel host`);
45
45
  if (cloud !== "China" && serviceUrl && isAzureChinaBotFrameworkServiceUrl(serviceUrl)) issue("cloud", `Azure China Bot Framework serviceUrl hosts require ${isDefault ? "the effective default Microsoft Teams account cloud=China" : "channels.msteams.accounts.*.cloud=China"}`);
46
46
  }
47
- function refineMSTeamsConfig(value, ctx) {
48
- const webhookPaths = /* @__PURE__ */ new Map();
49
- const appIds = /* @__PURE__ */ new Map();
50
- const recordWebhookPath = (webhookPath, path) => {
51
- const canonical = (0, openclaw_plugin_sdk_webhook_targets.canonicalizeWebhookRouteKey)(webhookPath);
52
- const existing = webhookPaths.get(canonical);
53
- if (existing) ctx.addIssue({
54
- code: zod.z.ZodIssueCode.custom,
55
- path,
56
- message: `Microsoft Teams webhook path ${webhookPath} is already used by ${existing}`
57
- });
58
- else webhookPaths.set(canonical, path.join("."));
59
- };
60
- const recordAppId = (appId, path) => {
61
- const normalized = appId?.trim().toLowerCase();
62
- if (!normalized) return;
63
- const existing = appIds.get(normalized);
64
- if (existing) {
65
- ctx.addIssue({
66
- code: zod.z.ZodIssueCode.custom,
67
- path,
68
- message: `Microsoft Teams appId is already used by ${existing}`
69
- });
70
- return;
71
- }
72
- appIds.set(normalized, path.join("."));
73
- };
74
- const accountKeys = /* @__PURE__ */ new Map();
75
- for (const accountId of Object.keys(value.accounts ?? {})) {
76
- const canonicalAccountId = (0, openclaw_plugin_sdk_account_id.normalizeAccountId)(accountId);
77
- const existing = accountKeys.get(canonicalAccountId);
78
- if (existing) {
79
- ctx.addIssue({
80
- code: zod.z.ZodIssueCode.custom,
81
- path: ["accounts", accountId],
82
- message: `channels.msteams.accounts contains duplicate canonical account id "${canonicalAccountId}" from "${existing}" and "${accountId}"`
83
- });
84
- continue;
85
- }
86
- accountKeys.set(canonicalAccountId, accountId);
87
- }
88
- const rootDefaultIdentityFields = [value.appId, value.appPassword].some((field) => field !== void 0 && field !== null && field !== "");
89
- const defaultAccountKey = accountKeys.get(openclaw_plugin_sdk_account_id.DEFAULT_ACCOUNT_ID);
90
- const accountsDefault = defaultAccountKey ? value.accounts?.[defaultAccountKey] : void 0;
91
- const accountsDefaultPath = ["accounts", defaultAccountKey ?? openclaw_plugin_sdk_account_id.DEFAULT_ACCOUNT_ID];
92
- const accountsDefaultIdentityFields = [accountsDefault?.appId, accountsDefault?.appPassword].some((field) => field !== void 0 && field !== null && field !== "");
93
- const effectiveDefault = {
94
- ...value,
95
- ...accountsDefault,
96
- sso: {
97
- ...value.sso,
98
- ...accountsDefault?.sso
99
- }
100
- };
101
- const hasEnvironmentDefaultCredentials = require_token_config.hasConfiguredMSTeamsCredentials(effectiveDefault);
102
- if (rootDefaultIdentityFields && accountsDefaultIdentityFields) ctx.addIssue({
103
- code: zod.z.ZodIssueCode.custom,
104
- path: accountsDefaultPath,
105
- message: "channels.msteams can define the default Teams identity either at the root or in accounts.default, not both"
106
- });
107
- const rootDefaultAccountEnabled = value.enabled !== false && accountsDefault?.enabled !== false;
108
- const defaultAccountConfigured = rootDefaultIdentityFields || accountsDefaultIdentityFields || hasEnvironmentDefaultCredentials || accountKeys.size === 0;
109
- const effectiveDefaultAppId = hasConfiguredValue(accountsDefault?.appId) ? accountsDefault?.appId : hasConfiguredValue(value.appId) ? value.appId : process.env.MSTEAMS_APP_ID;
110
- if (rootDefaultAccountEnabled && defaultAccountConfigured) {
111
- refineEffectiveAccount(effectiveDefault, accountsDefault ? accountsDefaultPath : [], true, ctx);
112
- recordAppId(effectiveDefaultAppId, ["appId"]);
113
- recordWebhookPath(require_bot_framework_service_url.resolveMSTeamsWebhookPath(value, openclaw_plugin_sdk_account_id.DEFAULT_ACCOUNT_ID, accountsDefault), [
114
- ...accountsDefault ? accountsDefaultPath : [],
115
- "webhook",
116
- "path"
117
- ]);
118
- }
119
- for (const [accountId, account] of Object.entries(value.accounts ?? {})) {
120
- if (!account) continue;
121
- const canonicalAccountId = (0, openclaw_plugin_sdk_account_id.normalizeAccountId)(accountId);
122
- const path = ["accounts", accountId];
123
- if (canonicalAccountId === openclaw_plugin_sdk_account_id.DEFAULT_ACCOUNT_ID) continue;
124
- if (!(value.enabled !== false && account.enabled !== false)) continue;
125
- refineEffectiveAccount({
126
- dmPolicy: account.dmPolicy ?? value.dmPolicy,
127
- allowFrom: account.allowFrom ?? value.allowFrom,
128
- sso: {
129
- ...value.sso,
130
- ...account.sso
131
- },
132
- cloud: account.cloud ?? value.cloud,
133
- serviceUrl: account.serviceUrl ?? value.serviceUrl
134
- }, path, false, ctx);
135
- if (!account.appId?.trim()) ctx.addIssue({
136
- code: zod.z.ZodIssueCode.custom,
137
- path: [...path, "appId"],
138
- message: "channels.msteams.accounts.*.appId is required for named Microsoft Teams bot accounts"
139
- });
140
- if (!(account.tenantId ?? value.tenantId)?.trim()) ctx.addIssue({
141
- code: zod.z.ZodIssueCode.custom,
142
- path: [...path, "tenantId"],
143
- message: "channels.msteams.accounts.*.tenantId or channels.msteams.tenantId is required for named Microsoft Teams bot accounts"
144
- });
145
- const effectiveAuthType = account.authType ?? value.authType ?? "secret";
146
- if (effectiveAuthType === "secret" && !hasConfiguredValue(account.appPassword)) ctx.addIssue({
147
- code: zod.z.ZodIssueCode.custom,
148
- path: [...path, "appPassword"],
149
- message: "channels.msteams.accounts.*.appPassword is required for named Microsoft Teams bot accounts using secret auth"
150
- });
151
- if (effectiveAuthType === "federated" && !(account.certificatePath ?? value.certificatePath)?.trim() && (account.useManagedIdentity ?? value.useManagedIdentity) !== true) ctx.addIssue({
152
- code: zod.z.ZodIssueCode.custom,
153
- path: [...path, "authType"],
154
- message: "channels.msteams.accounts.* using federated auth must configure certificatePath or useManagedIdentity"
155
- });
156
- recordAppId(account.appId, [...path, "appId"]);
157
- recordWebhookPath(require_bot_framework_service_url.resolveMSTeamsWebhookPath(value, canonicalAccountId, account), [
158
- ...path,
159
- "webhook",
160
- "path"
161
- ]);
162
- }
163
- }
164
- //#endregion
165
- //#region extensions/msteams/src/config-ui-hints.ts
166
47
  const msTeamsChannelConfigUiHints = {
167
48
  "": {
168
49
  label: "MS Teams",
@@ -208,8 +89,6 @@ const msTeamsChannelConfigUiHints = {
208
89
  }
209
90
  })
210
91
  };
211
- //#endregion
212
- //#region extensions/msteams/src/config-schema.ts
213
92
  const SecretInputSchema = (0, openclaw_plugin_sdk_secret_input.buildSecretInputSchema)();
214
93
  const ToolPolicyBySenderSchema = zod.z.record(zod.z.string(), openclaw_plugin_sdk_channel_config_schema.ToolPolicySchema).optional();
215
94
  const MSTeamsChannelSchema = zod.z.object({
@@ -282,7 +161,123 @@ const MSTeamsConfigSchema = MSTeamsAccountConfigBaseSchema.extend({
282
161
  ...rootPolicyShape,
283
162
  accounts: zod.z.record(zod.z.string(), MSTeamsAccountConfigBaseSchema.extend({ name: zod.z.string().optional() }).optional()).optional(),
284
163
  defaultAccount: zod.z.string().optional()
285
- }).strict().superRefine(refineMSTeamsConfig);
164
+ }).strict().superRefine((value, ctx) => {
165
+ const webhookPaths = /* @__PURE__ */ new Map();
166
+ const appIds = /* @__PURE__ */ new Map();
167
+ const recordWebhookPath = (webhookPath, path) => {
168
+ const canonical = (0, openclaw_plugin_sdk_webhook_targets.canonicalizeWebhookRouteKey)(webhookPath);
169
+ const existing = webhookPaths.get(canonical);
170
+ if (existing) ctx.addIssue({
171
+ code: zod.z.ZodIssueCode.custom,
172
+ path,
173
+ message: `Microsoft Teams webhook path ${webhookPath} is already used by ${existing}`
174
+ });
175
+ else webhookPaths.set(canonical, path.join("."));
176
+ };
177
+ const recordAppId = (appId, path) => {
178
+ const normalized = appId?.trim().toLowerCase();
179
+ if (!normalized) return;
180
+ const existing = appIds.get(normalized);
181
+ if (existing) {
182
+ ctx.addIssue({
183
+ code: zod.z.ZodIssueCode.custom,
184
+ path,
185
+ message: `Microsoft Teams appId is already used by ${existing}`
186
+ });
187
+ return;
188
+ }
189
+ appIds.set(normalized, path.join("."));
190
+ };
191
+ const accountKeys = /* @__PURE__ */ new Map();
192
+ for (const accountId of Object.keys(value.accounts ?? {})) {
193
+ const canonicalAccountId = (0, openclaw_plugin_sdk_account_id.normalizeAccountId)(accountId);
194
+ const existing = accountKeys.get(canonicalAccountId);
195
+ if (existing) {
196
+ ctx.addIssue({
197
+ code: zod.z.ZodIssueCode.custom,
198
+ path: ["accounts", accountId],
199
+ message: `channels.msteams.accounts contains duplicate canonical account id "${canonicalAccountId}" from "${existing}" and "${accountId}"`
200
+ });
201
+ continue;
202
+ }
203
+ accountKeys.set(canonicalAccountId, accountId);
204
+ }
205
+ const rootDefaultIdentityFields = [value.appId, value.appPassword].some((field) => field !== void 0 && field !== null && field !== "");
206
+ const defaultAccountKey = accountKeys.get(openclaw_plugin_sdk_account_id.DEFAULT_ACCOUNT_ID);
207
+ const accountsDefault = defaultAccountKey ? value.accounts?.[defaultAccountKey] : void 0;
208
+ const accountsDefaultPath = ["accounts", defaultAccountKey ?? openclaw_plugin_sdk_account_id.DEFAULT_ACCOUNT_ID];
209
+ const accountsDefaultIdentityFields = [accountsDefault?.appId, accountsDefault?.appPassword].some((field) => field !== void 0 && field !== null && field !== "");
210
+ const effectiveDefault = {
211
+ ...value,
212
+ ...accountsDefault,
213
+ sso: {
214
+ ...value.sso,
215
+ ...accountsDefault?.sso
216
+ }
217
+ };
218
+ const hasEnvironmentDefaultCredentials = require_token_config.hasConfiguredMSTeamsCredentials(effectiveDefault);
219
+ if (rootDefaultIdentityFields && accountsDefaultIdentityFields) ctx.addIssue({
220
+ code: zod.z.ZodIssueCode.custom,
221
+ path: accountsDefaultPath,
222
+ message: "channels.msteams can define the default Teams identity either at the root or in accounts.default, not both"
223
+ });
224
+ const rootDefaultAccountEnabled = value.enabled !== false && accountsDefault?.enabled !== false;
225
+ const defaultAccountConfigured = rootDefaultIdentityFields || accountsDefaultIdentityFields || hasEnvironmentDefaultCredentials || accountKeys.size === 0;
226
+ const effectiveDefaultAppId = hasConfiguredValue(accountsDefault?.appId) ? accountsDefault?.appId : hasConfiguredValue(value.appId) ? value.appId : process.env.MSTEAMS_APP_ID;
227
+ if (rootDefaultAccountEnabled && defaultAccountConfigured) {
228
+ refineEffectiveAccount(effectiveDefault, accountsDefault ? accountsDefaultPath : [], true, ctx);
229
+ recordAppId(effectiveDefaultAppId, ["appId"]);
230
+ recordWebhookPath(require_bot_framework_service_url.resolveMSTeamsWebhookPath(value, openclaw_plugin_sdk_account_id.DEFAULT_ACCOUNT_ID, accountsDefault), [
231
+ ...accountsDefault ? accountsDefaultPath : [],
232
+ "webhook",
233
+ "path"
234
+ ]);
235
+ }
236
+ for (const [accountId, account] of Object.entries(value.accounts ?? {})) {
237
+ if (!account) continue;
238
+ const canonicalAccountId = (0, openclaw_plugin_sdk_account_id.normalizeAccountId)(accountId);
239
+ const path = ["accounts", accountId];
240
+ if (canonicalAccountId === openclaw_plugin_sdk_account_id.DEFAULT_ACCOUNT_ID) continue;
241
+ if (!(value.enabled !== false && account.enabled !== false)) continue;
242
+ refineEffectiveAccount({
243
+ dmPolicy: account.dmPolicy ?? value.dmPolicy,
244
+ allowFrom: account.allowFrom ?? value.allowFrom,
245
+ sso: {
246
+ ...value.sso,
247
+ ...account.sso
248
+ },
249
+ cloud: account.cloud ?? value.cloud,
250
+ serviceUrl: account.serviceUrl ?? value.serviceUrl
251
+ }, path, false, ctx);
252
+ if (!account.appId?.trim()) ctx.addIssue({
253
+ code: zod.z.ZodIssueCode.custom,
254
+ path: [...path, "appId"],
255
+ message: "channels.msteams.accounts.*.appId is required for named Microsoft Teams bot accounts"
256
+ });
257
+ if (!(account.tenantId ?? value.tenantId)?.trim()) ctx.addIssue({
258
+ code: zod.z.ZodIssueCode.custom,
259
+ path: [...path, "tenantId"],
260
+ message: "channels.msteams.accounts.*.tenantId or channels.msteams.tenantId is required for named Microsoft Teams bot accounts"
261
+ });
262
+ const effectiveAuthType = account.authType ?? value.authType ?? "secret";
263
+ if (effectiveAuthType === "secret" && !hasConfiguredValue(account.appPassword)) ctx.addIssue({
264
+ code: zod.z.ZodIssueCode.custom,
265
+ path: [...path, "appPassword"],
266
+ message: "channels.msteams.accounts.*.appPassword is required for named Microsoft Teams bot accounts using secret auth"
267
+ });
268
+ if (effectiveAuthType === "federated" && !(account.certificatePath ?? value.certificatePath)?.trim() && (account.useManagedIdentity ?? value.useManagedIdentity) !== true) ctx.addIssue({
269
+ code: zod.z.ZodIssueCode.custom,
270
+ path: [...path, "authType"],
271
+ message: "channels.msteams.accounts.* using federated auth must configure certificatePath or useManagedIdentity"
272
+ });
273
+ recordAppId(account.appId, [...path, "appId"]);
274
+ recordWebhookPath(require_bot_framework_service_url.resolveMSTeamsWebhookPath(value, canonicalAccountId, account), [
275
+ ...path,
276
+ "webhook",
277
+ "path"
278
+ ]);
279
+ }
280
+ });
286
281
  const MSTeamsChannelConfigSchema = (0, openclaw_plugin_sdk_channel_config_schema.buildChannelConfigSchema)(MSTeamsConfigSchema, { uiHints: msTeamsChannelConfigUiHints });
287
282
  //#endregion
288
283
  Object.defineProperty(exports, "MSTeamsChannelConfigSchema", {