@openclaw/msteams 2026.10.10 → 2026.11.5-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 (32) hide show
  1. package/dist/.setup/{adapter.runtime-BMvpm7sS.cjs → adapter.runtime-UOD_H_ph.cjs} +20 -23
  2. package/dist/.setup/{approval-card-Bo8kHYbj.cjs → approval-card-CD5q0Nla.cjs} +5 -9
  3. package/dist/.setup/{approval-handler.runtime-BS3avHFu.cjs → approval-handler.runtime-DbPxvynk.cjs} +4 -4
  4. package/dist/.setup/{channel-CdCSk3Rg.cjs → channel-DQrXOfhf.cjs} +24 -224
  5. package/dist/.setup/{channel.runtime--ZjTYgkY.cjs → channel.runtime-Du4GPMES.cjs} +65 -106
  6. package/dist/.setup/{channel.setup-nSTtK77J.cjs → channel.setup--7ko_Kxv.cjs} +161 -262
  7. package/dist/.setup/{config-schema-Bm15lF-j.cjs → config-schema-BEXDIOC-.cjs} +120 -123
  8. package/dist/.setup/{conversation-store-state-NJU9osd-.cjs → conversation-store-state-AVgRyNE9.cjs} +411 -598
  9. package/dist/.setup/{delegated-state-CbMd3rIh.cjs → delegated-state-DhIHahf1.cjs} +68 -6
  10. package/dist/.setup/{monitor-BxLDs5fk.cjs → monitor-CXjIKz7o.cjs} +1883 -2284
  11. package/dist/.setup/{oauth-B-Y5pNM4.cjs → oauth-BWG6qWCd.cjs} +10 -20
  12. package/dist/.setup/presentation-CaLawc5j.cjs +211 -0
  13. package/dist/.setup/{reaction-types-BaL1EVBS.cjs → reaction-types-DOzN5oTl.cjs} +1 -1
  14. package/dist/.setup/{resolve-allowlist-CqNzS9bZ.cjs → resolve-allowlist-Drj1jaq0.cjs} +213 -90
  15. package/dist/.setup/{secret-contract-api-BOzdWSn9.cjs → secret-contract-api-DFqDvc_a.cjs} +4 -6
  16. package/dist/.setup/{secret-contract-api-5aH1Fl_c.cjs → secret-contract-api-YGHrfAT0.cjs} +1 -1
  17. package/dist/.setup/{send-BXjI3ufq.cjs → send-BRUztzVJ.cjs} +86 -182
  18. package/dist/.setup/{setup-plugin-api-lPpin6Gg.cjs → setup-plugin-api-BHEfter5.cjs} +1 -1
  19. package/dist/.setup/{thread-session-DZMoCsSR.cjs → thread-session-BUUV1zk_.cjs} +4 -6
  20. package/dist/.setup/{token-config-DTZ00Ibq.cjs → token-config-7K6UbNCo.cjs} +0 -2
  21. package/dist/.source-module-urls/7e43ee3ae4faab430a47269c8217f8d99ec60ecd85233f40e81d03efeb543068.json +1 -1
  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 +6 -13
  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-CgVuKiIR.cjs");
2
- const require_token_config = require("./token-config-DTZ00Ibq.cjs");
2
+ const require_token_config = require("./token-config-7K6UbNCo.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
- // extensions/msteams/src/config-schema-refinement.ts
9
+ let zod = require("zod");
10
+ // 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,124 +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
- // extensions/msteams/src/config-ui-hints.ts
165
47
  const msTeamsChannelConfigUiHints = {
166
48
  "": {
167
49
  label: "MS Teams",
@@ -207,7 +89,6 @@ const msTeamsChannelConfigUiHints = {
207
89
  }
208
90
  })
209
91
  };
210
- // extensions/msteams/src/config-schema.ts
211
92
  const SecretInputSchema = (0, openclaw_plugin_sdk_secret_input.buildSecretInputSchema)();
212
93
  const ToolPolicyBySenderSchema = zod.z.record(zod.z.string(), openclaw_plugin_sdk_channel_config_schema.ToolPolicySchema).optional();
213
94
  const MSTeamsChannelSchema = zod.z.object({
@@ -280,7 +161,123 @@ const MSTeamsConfigSchema = MSTeamsAccountConfigBaseSchema.extend({
280
161
  ...rootPolicyShape,
281
162
  accounts: zod.z.record(zod.z.string(), MSTeamsAccountConfigBaseSchema.extend({ name: zod.z.string().optional() }).optional()).optional(),
282
163
  defaultAccount: zod.z.string().optional()
283
- }).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
+ });
284
281
  const MSTeamsChannelConfigSchema = (0, openclaw_plugin_sdk_channel_config_schema.buildChannelConfigSchema)(MSTeamsConfigSchema, { uiHints: msTeamsChannelConfigUiHints });
285
282
  Object.defineProperty(exports, "MSTeamsChannelConfigSchema", {
286
283
  enumerable: true,