@openclaw/msteams 2026.7.1 → 2026.7.2-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 (35) hide show
  1. package/dist/api.cjs +8 -0
  2. package/dist/{channel-Cf5LJ4aO.js → channel-BSyPdpGN.cjs} +641 -227
  3. package/dist/channel-config-api.cjs +3 -0
  4. package/dist/channel-plugin-api.cjs +3 -0
  5. package/dist/channel.runtime-DQTOzzet.cjs +1372 -0
  6. package/dist/{config-schema-BL4qQZiA.js → config-schema-BSNLJUta.cjs} +13 -3
  7. package/dist/{directory-contract-api.js → directory-contract-api.cjs} +8 -7
  8. package/dist/{doctor-contract-api.js → doctor-contract-api.cjs} +73 -57
  9. package/dist/index.cjs +21 -0
  10. package/dist/{probe-BnyZRZsD.js → messenger-DtS9gqkV.cjs} +369 -861
  11. package/dist/{oauth-BifWxWzq.js → oauth-C5E5powI.cjs} +21 -21
  12. package/dist/{polls-B_hs4aKm.js → polls-BhoI4VaN.cjs} +188 -38
  13. package/dist/{resolve-allowlist-Dnw4aNOu.js → resolve-allowlist-CyQ57MfH.cjs} +817 -140
  14. package/dist/rolldown-runtime-D6vf50IK.cjs +28 -0
  15. package/dist/runtime-api.cjs +207 -0
  16. package/dist/runtime-gZTAuFux.cjs +24 -0
  17. package/dist/secret-contract-api.cjs +31 -0
  18. package/dist/setup-entry.cjs +14 -0
  19. package/dist/setup-plugin-api.cjs +65 -0
  20. package/dist/{setup-surface-qW-ECHL-.js → setup-surface-BDTPN3dX.cjs} +123 -49
  21. package/dist/{src-DZFs5XtZ.js → src-CUMz2B6f.cjs} +672 -740
  22. package/dist/{sso-token-store-DrVbnCUF.js → sso-token-store-CktCz88k.cjs} +51 -10
  23. package/npm-shrinkwrap.json +3 -3
  24. package/openclaw.plugin.json +10 -31
  25. package/package.json +8 -7
  26. package/dist/api.js +0 -3
  27. package/dist/channel-config-api.js +0 -2
  28. package/dist/channel-plugin-api.js +0 -2
  29. package/dist/channel.runtime-Bwu6Tjhf.js +0 -664
  30. package/dist/index.js +0 -22
  31. package/dist/runtime-BS5AZrKK.js +0 -8
  32. package/dist/runtime-api.js +0 -20
  33. package/dist/secret-contract-api.js +0 -35
  34. package/dist/setup-entry.js +0 -15
  35. package/dist/setup-plugin-api.js +0 -64
@@ -1,20 +1,50 @@
1
- import { t as getMSTeamsRuntime } from "./runtime-BS5AZrKK.js";
2
- import { fetchWithSsrFGuard as fetchWithSsrFGuard$1 } from "./runtime-api.js";
3
- import { createRequire } from "node:module";
4
- import { mapAllowlistResolutionInputs } from "openclaw/plugin-sdk/allow-from";
5
- import { createLazyRuntimeModule } from "openclaw/plugin-sdk/lazy-runtime";
6
- import { isRecord as isRecord$1, normalizeLowercaseStringOrEmpty, normalizeOptionalLowercaseString, normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
7
- import { fetchWithSsrFGuard } from "openclaw/plugin-sdk/ssrf-runtime";
8
- import { createProviderHttpError, readProviderJsonResponse } from "openclaw/plugin-sdk/provider-http";
9
- import { Buffer } from "node:buffer";
10
- import { lookup } from "node:dns/promises";
11
- import { buildHostnameAllowlistPolicyFromSuffixAllowlist, isHttpsUrlAllowedByHostnameSuffixAllowlist, isPrivateIpAddress, normalizeHostnameSuffixAllowlist } from "openclaw/plugin-sdk/ssrf-policy";
12
- import * as fs from "node:fs";
13
- import { readFileSync } from "node:fs";
14
- import path, { basename, dirname } from "node:path";
15
- import { isFutureDateTimestampMs, resolveExpiresAtMsFromDurationSeconds } from "openclaw/plugin-sdk/number-runtime";
16
- import { privateFileStoreSync } from "openclaw/plugin-sdk/security-runtime";
17
- import { hasConfiguredSecretInput, normalizeResolvedSecretInputString, normalizeSecretInputString } from "openclaw/plugin-sdk/secret-input";
1
+ const require_rolldown_runtime = require("./rolldown-runtime-D6vf50IK.cjs");
2
+ const require_runtime = require("./runtime-gZTAuFux.cjs");
3
+ require("./runtime-api.cjs");
4
+ let openclaw_plugin_sdk_allow_from = require("openclaw/plugin-sdk/allow-from");
5
+ let openclaw_plugin_sdk_lazy_runtime = require("openclaw/plugin-sdk/lazy-runtime");
6
+ let openclaw_plugin_sdk_string_coerce_runtime = require("openclaw/plugin-sdk/string-coerce-runtime");
7
+ let openclaw_plugin_sdk_ssrf_runtime = require("openclaw/plugin-sdk/ssrf-runtime");
8
+ let openclaw_plugin_sdk_provider_http = require("openclaw/plugin-sdk/provider-http");
9
+ let node_buffer = require("node:buffer");
10
+ let node_dns_promises = require("node:dns/promises");
11
+ let openclaw_plugin_sdk_ssrf_policy = require("openclaw/plugin-sdk/ssrf-policy");
12
+ let openclaw_plugin_sdk_number_runtime = require("openclaw/plugin-sdk/number-runtime");
13
+ let openclaw_plugin_sdk_text_utility_runtime = require("openclaw/plugin-sdk/text-utility-runtime");
14
+ let node_fs = require("node:fs");
15
+ node_fs = require_rolldown_runtime.__toESM(node_fs, 1);
16
+ let node_module = require("node:module");
17
+ let node_path = require("node:path");
18
+ node_path = require_rolldown_runtime.__toESM(node_path, 1);
19
+ let openclaw_plugin_sdk_security_runtime = require("openclaw/plugin-sdk/security-runtime");
20
+ let openclaw_plugin_sdk_secret_input = require("openclaw/plugin-sdk/secret-input");
21
+ //#region extensions/msteams/src/request-timeout.ts
22
+ const MSTEAMS_REQUEST_TIMEOUT_MS = 3e4;
23
+ const MSTEAMS_SHAREPOINT_UPLOAD_BASE_TIMEOUT_MS = 5 * 6e4;
24
+ const MSTEAMS_SHAREPOINT_UPLOAD_MIN_BYTES_PER_SECOND = 256 * 1024;
25
+ const MSTEAMS_INBOUND_PREPROCESS_TIMEOUT_MS = 1e4;
26
+ function createMSTeamsInboundDeadline() {
27
+ return (0, openclaw_plugin_sdk_provider_http.createProviderOperationDeadline)({
28
+ label: "MS Teams inbound preprocessing",
29
+ timeoutMs: MSTEAMS_INBOUND_PREPROCESS_TIMEOUT_MS
30
+ });
31
+ }
32
+ function resolveMSTeamsRequestTimeoutMs(deadline) {
33
+ return deadline ? (0, openclaw_plugin_sdk_provider_http.resolveProviderOperationTimeoutMs)({
34
+ deadline,
35
+ defaultTimeoutMs: MSTEAMS_REQUEST_TIMEOUT_MS
36
+ }) : MSTEAMS_REQUEST_TIMEOUT_MS;
37
+ }
38
+ /** Bound non-abortable SDK and credential work to the same operation deadline as fetches. */
39
+ async function withMSTeamsRequestDeadline(params) {
40
+ const timeoutMs = resolveMSTeamsRequestTimeoutMs(params.deadline);
41
+ return await (0, openclaw_plugin_sdk_text_utility_runtime.withTimeout)(params.work(), timeoutMs, params.label);
42
+ }
43
+ function resolveMSTeamsSharePointUploadTimeoutMs(sizeInBytes) {
44
+ const transferBudgetMs = Math.ceil((Number.isFinite(sizeInBytes) && sizeInBytes > 0 ? Math.ceil(sizeInBytes) : 0) / MSTEAMS_SHAREPOINT_UPLOAD_MIN_BYTES_PER_SECOND * 1e3);
45
+ return (0, openclaw_plugin_sdk_number_runtime.resolveTimerTimeoutMs)(MSTEAMS_SHAREPOINT_UPLOAD_BASE_TIMEOUT_MS + transferBudgetMs, MSTEAMS_SHAREPOINT_UPLOAD_BASE_TIMEOUT_MS, 1);
46
+ }
47
+ //#endregion
18
48
  //#region extensions/msteams/src/response-with-release.ts
19
49
  const NULL_BODY_STATUSES = /* @__PURE__ */ new Set([
20
50
  101,
@@ -147,7 +177,7 @@ const GRAPH_SHARED_LINK_HOST_SUFFIXES = [
147
177
  function isGraphSharedLinkUrl(url) {
148
178
  let host;
149
179
  try {
150
- host = normalizeLowercaseStringOrEmpty(new URL(url).hostname);
180
+ host = (0, openclaw_plugin_sdk_string_coerce_runtime.normalizeLowercaseStringOrEmpty)(new URL(url).hostname);
151
181
  } catch {
152
182
  return false;
153
183
  }
@@ -160,7 +190,7 @@ function isGraphSharedLinkUrl(url) {
160
190
  * https://learn.microsoft.com/en-us/graph/api/shares-get#encoding-sharing-urls
161
191
  */
162
192
  function encodeGraphShareId(url) {
163
- return `u!${Buffer.from(url, "utf8").toString("base64url")}`;
193
+ return `u!${node_buffer.Buffer.from(url, "utf8").toString("base64url")}`;
164
194
  }
165
195
  /**
166
196
  * When `url` is a SharePoint/OneDrive shared link, return the matching
@@ -172,14 +202,6 @@ function tryBuildGraphSharesUrlForSharedLink(url) {
172
202
  if (!isGraphSharedLinkUrl(url)) return;
173
203
  return `${GRAPH_ROOT}/shares/${encodeGraphShareId(url)}/driveItem/content`;
174
204
  }
175
- function readNestedString(value, keys) {
176
- let current = value;
177
- for (const key of keys) {
178
- if (!isRecord$1(current)) return;
179
- current = current[key];
180
- }
181
- return normalizeOptionalString(current);
182
- }
183
205
  function resolveRequestUrl(input) {
184
206
  if (typeof input === "string") return input;
185
207
  if (input instanceof URL) return input.toString();
@@ -191,14 +213,16 @@ function resolveRequestUrl(input) {
191
213
  }
192
214
  }
193
215
  function normalizeContentType(value) {
194
- if (typeof value !== "string") return;
195
- const trimmed = value.trim();
196
- return trimmed ? trimmed : void 0;
216
+ const trimmed = (0, openclaw_plugin_sdk_string_coerce_runtime.normalizeOptionalString)(value);
217
+ if (!trimmed) return;
218
+ const parameterIndex = trimmed.indexOf(";");
219
+ if (parameterIndex === -1) return trimmed.toLowerCase();
220
+ return `${trimmed.slice(0, parameterIndex).trim().toLowerCase()}${trimmed.slice(parameterIndex)}`;
197
221
  }
198
222
  function inferPlaceholder(params) {
199
- const mime = normalizeLowercaseStringOrEmpty(params.contentType ?? "");
200
- const name = normalizeLowercaseStringOrEmpty(params.fileName ?? "");
201
- const fileType = normalizeLowercaseStringOrEmpty(params.fileType ?? "");
223
+ const mime = (0, openclaw_plugin_sdk_string_coerce_runtime.normalizeLowercaseStringOrEmpty)(params.contentType ?? "");
224
+ const name = (0, openclaw_plugin_sdk_string_coerce_runtime.normalizeLowercaseStringOrEmpty)(params.fileName ?? "");
225
+ const fileType = (0, openclaw_plugin_sdk_string_coerce_runtime.normalizeLowercaseStringOrEmpty)(params.fileType ?? "");
202
226
  return mime.startsWith("image/") || IMAGE_EXT_RE.test(name) || IMAGE_EXT_RE.test(`x.${fileType}`) ? "<media:image>" : "<media:document>";
203
227
  }
204
228
  function isLikelyImageAttachment(att) {
@@ -206,7 +230,7 @@ function isLikelyImageAttachment(att) {
206
230
  const name = typeof att.name === "string" ? att.name : "";
207
231
  if (contentType.startsWith("image/")) return true;
208
232
  if (IMAGE_EXT_RE.test(name)) return true;
209
- if (contentType === "application/vnd.microsoft.teams.file.download.info" && isRecord$1(att.content)) {
233
+ if (contentType === "application/vnd.microsoft.teams.file.download.info" && (0, openclaw_plugin_sdk_string_coerce_runtime.isRecord)(att.content)) {
210
234
  const fileType = typeof att.content.fileType === "string" ? att.content.fileType : "";
211
235
  if (fileType && IMAGE_EXT_RE.test(`x.${fileType}`)) return true;
212
236
  const fileName = typeof att.content.fileName === "string" ? att.content.fileName : "";
@@ -219,7 +243,7 @@ function isLikelyImageAttachment(att) {
219
243
  * Used when downloading all files, not just images.
220
244
  */
221
245
  function isDownloadableAttachment(att) {
222
- if ((normalizeContentType(att.contentType) ?? "") === "application/vnd.microsoft.teams.file.download.info" && isRecord$1(att.content) && typeof att.content.downloadUrl === "string") return true;
246
+ if ((normalizeContentType(att.contentType) ?? "") === "application/vnd.microsoft.teams.file.download.info" && (0, openclaw_plugin_sdk_string_coerce_runtime.isRecord)(att.content) && typeof att.content.downloadUrl === "string") return true;
223
247
  if (typeof att.contentUrl === "string" && att.contentUrl.trim()) return true;
224
248
  return false;
225
249
  }
@@ -229,7 +253,7 @@ function isHtmlAttachment(att) {
229
253
  function extractHtmlFromAttachment(att) {
230
254
  if (!isHtmlAttachment(att)) return;
231
255
  if (typeof att.content === "string") return att.content;
232
- if (!isRecord$1(att.content)) return;
256
+ if (!(0, openclaw_plugin_sdk_string_coerce_runtime.isRecord)(att.content)) return;
233
257
  return typeof att.content.text === "string" ? att.content.text : typeof att.content.body === "string" ? att.content.body : typeof att.content.content === "string" ? att.content.content : void 0;
234
258
  }
235
259
  function canonicalizeInlineBase64Payload(value) {
@@ -257,7 +281,7 @@ function decodeDataImageWithLimits(src, opts) {
257
281
  candidate: null,
258
282
  estimatedBytes: 0
259
283
  };
260
- const contentType = normalizeLowercaseStringOrEmpty(match[1] ?? "");
284
+ const contentType = (0, openclaw_plugin_sdk_string_coerce_runtime.normalizeLowercaseStringOrEmpty)(match[1] ?? "");
261
285
  if (!Boolean(match[2])) return {
262
286
  candidate: null,
263
287
  estimatedBytes: 0
@@ -280,7 +304,7 @@ function decodeDataImageWithLimits(src, opts) {
280
304
  return {
281
305
  candidate: {
282
306
  kind: "data",
283
- data: Buffer.from(canonicalPayload, "base64"),
307
+ data: node_buffer.Buffer.from(canonicalPayload, "base64"),
284
308
  contentType,
285
309
  placeholder: "<media:image>"
286
310
  },
@@ -331,16 +355,16 @@ function extractInlineImageCandidates(attachments, limits) {
331
355
  }
332
356
  function safeHostForUrl(url) {
333
357
  try {
334
- return normalizeLowercaseStringOrEmpty(new URL(url).hostname);
358
+ return (0, openclaw_plugin_sdk_string_coerce_runtime.normalizeLowercaseStringOrEmpty)(new URL(url).hostname);
335
359
  } catch {
336
360
  return "invalid-url";
337
361
  }
338
362
  }
339
363
  function resolveAllowedHosts(input) {
340
- return normalizeHostnameSuffixAllowlist(input, DEFAULT_MEDIA_HOST_ALLOWLIST);
364
+ return (0, openclaw_plugin_sdk_ssrf_policy.normalizeHostnameSuffixAllowlist)(input, DEFAULT_MEDIA_HOST_ALLOWLIST);
341
365
  }
342
366
  function resolveAuthAllowedHosts(input) {
343
- return normalizeHostnameSuffixAllowlist(input, DEFAULT_MEDIA_AUTH_HOST_ALLOWLIST);
367
+ return (0, openclaw_plugin_sdk_ssrf_policy.normalizeHostnameSuffixAllowlist)(input, DEFAULT_MEDIA_AUTH_HOST_ALLOWLIST);
344
368
  }
345
369
  function isMockFetchFn(fetchFn) {
346
370
  const candidate = fetchFn;
@@ -363,7 +387,7 @@ function resolveAttachmentFetchPolicy(params) {
363
387
  };
364
388
  }
365
389
  function isUrlAllowed(url, allowlist) {
366
- return isHttpsUrlAllowedByHostnameSuffixAllowlist(url, allowlist);
390
+ return (0, openclaw_plugin_sdk_ssrf_policy.isHttpsUrlAllowedByHostnameSuffixAllowlist)(url, allowlist);
367
391
  }
368
392
  function applyAuthorizationHeaderForUrl(params) {
369
393
  if (!params.bearerToken) {
@@ -377,7 +401,7 @@ function applyAuthorizationHeaderForUrl(params) {
377
401
  params.headers.delete("Authorization");
378
402
  }
379
403
  function resolveMediaSsrfPolicy(allowHosts) {
380
- return buildHostnameAllowlistPolicyFromSuffixAllowlist(allowHosts);
404
+ return (0, openclaw_plugin_sdk_ssrf_policy.buildHostnameAllowlistPolicyFromSuffixAllowlist)(allowHosts);
381
405
  }
382
406
  /**
383
407
  * Returns true if the given IPv4 or IPv6 address is in a private, loopback,
@@ -387,13 +411,13 @@ function resolveMediaSsrfPolicy(allowHosts) {
387
411
  * expanded notation, NAT64, 6to4, Teredo, octal IPv4, and fails closed on
388
412
  * parse errors.
389
413
  */
390
- const isPrivateOrReservedIP = isPrivateIpAddress;
414
+ const isPrivateOrReservedIP = openclaw_plugin_sdk_ssrf_policy.isPrivateIpAddress;
391
415
  /**
392
416
  * Resolve a hostname via DNS and reject private/reserved IPs.
393
417
  * Throws if the resolved IP is private or resolution fails.
394
418
  */
395
419
  async function resolveAndValidateIP(hostname, resolveFn) {
396
- const resolve = resolveFn ?? lookup;
420
+ const resolve = resolveFn ?? node_dns_promises.lookup;
397
421
  let resolved;
398
422
  try {
399
423
  resolved = await resolve(hostname);
@@ -414,14 +438,14 @@ const MAX_SAFE_REDIRECTS = 5;
414
438
  * - DNS rebinding attacks when a lookup function is provided
415
439
  */
416
440
  async function safeFetch(params) {
417
- const resolveFn = params.resolveFn ?? lookup;
441
+ const resolveFn = params.resolveFn ?? node_dns_promises.lookup;
418
442
  const hasDispatcher = Boolean(params.requestInit && typeof params.requestInit === "object" && "dispatcher" in params.requestInit);
419
443
  const currentHeaders = new Headers(params.requestInit?.headers);
420
444
  let currentUrl = params.url;
421
445
  if (!isUrlAllowed(currentUrl, params.allowHosts)) throw new Error(`Initial download URL blocked: ${currentUrl}`);
422
446
  if (currentHeaders.has("authorization") && params.authorizationAllowHosts && !isUrlAllowed(currentUrl, params.authorizationAllowHosts)) currentHeaders.delete("authorization");
423
447
  if (!hasDispatcher) {
424
- const guarded = await fetchWithSsrFGuard({
448
+ const guarded = await (0, openclaw_plugin_sdk_ssrf_runtime.fetchWithSsrFGuard)({
425
449
  url: currentUrl,
426
450
  fetchImpl: resolveGuardedFetchImpl({
427
451
  fetchFn: params.fetchFn,
@@ -436,7 +460,8 @@ async function safeFetch(params) {
436
460
  policy: resolveMediaSsrfPolicy(params.allowHosts),
437
461
  lookupFn: resolveFn,
438
462
  retainAuthorizationRedirectHostnameAllowlist: resolveRetainedAuthorizationRedirectHostnameAllowlist(params.authorizationAllowHosts),
439
- auditContext: "msteams.attachment"
463
+ auditContext: "msteams.attachment",
464
+ timeoutMs: params.timeoutMs ?? 3e4
440
465
  });
441
466
  return responseWithRelease(guarded.response, guarded.release);
442
467
  }
@@ -486,7 +511,8 @@ async function safeFetchWithPolicy(params) {
486
511
  fetchFn: params.fetchFn,
487
512
  fetchFnSupportsDispatcher: params.fetchFnSupportsDispatcher,
488
513
  requestInit: params.requestInit,
489
- resolveFn: params.resolveFn
514
+ resolveFn: params.resolveFn,
515
+ timeoutMs: params.timeoutMs
490
516
  });
491
517
  }
492
518
  //#endregion
@@ -549,11 +575,11 @@ function validateMSTeamsProactiveServiceUrlBoundary(params) {
549
575
  //#endregion
550
576
  //#region extensions/msteams/src/http-error.ts
551
577
  async function createMSTeamsHttpError(response, label, options) {
552
- return await createProviderHttpError(response, label, options);
578
+ return await (0, openclaw_plugin_sdk_provider_http.createProviderHttpError)(response, label, options);
553
579
  }
554
580
  //#endregion
555
581
  //#region extensions/msteams/src/bot-framework-service-url.ts
556
- const BOT_FRAMEWORK_SERVICE_URL_HOST_ALLOWLIST = normalizeHostnameSuffixAllowlist([
582
+ const BOT_FRAMEWORK_SERVICE_URL_HOST_ALLOWLIST = (0, openclaw_plugin_sdk_ssrf_policy.normalizeHostnameSuffixAllowlist)([
557
583
  "smba.trafficmanager.net",
558
584
  "smba.infra.gcc.teams.microsoft.com",
559
585
  "smba.infra.gov.teams.microsoft.us",
@@ -570,7 +596,7 @@ function describeBotFrameworkServiceUrlHost(serviceUrl) {
570
596
  function isAllowedBotFrameworkServiceUrl(serviceUrl) {
571
597
  if (typeof serviceUrl !== "string") return false;
572
598
  const trimmed = serviceUrl.trim();
573
- return Boolean(trimmed && isHttpsUrlAllowedByHostnameSuffixAllowlist(trimmed, BOT_FRAMEWORK_SERVICE_URL_HOST_ALLOWLIST));
599
+ return Boolean(trimmed && (0, openclaw_plugin_sdk_ssrf_policy.isHttpsUrlAllowedByHostnameSuffixAllowlist)(trimmed, BOT_FRAMEWORK_SERVICE_URL_HOST_ALLOWLIST));
574
600
  }
575
601
  function tryNormalizeBotFrameworkServiceUrl(serviceUrl) {
576
602
  if (!isAllowedBotFrameworkServiceUrl(serviceUrl)) return;
@@ -586,14 +612,14 @@ function normalizeBotFrameworkServiceUrl(serviceUrl) {
586
612
  let cachedUserAgent;
587
613
  function resolveTeamsSdkVersion() {
588
614
  try {
589
- return createRequire(import.meta.url)("@microsoft/teams.apps/package.json").version ?? "unknown";
615
+ return (0, node_module.createRequire)(require("url").pathToFileURL(__filename).href)("@microsoft/teams.apps/package.json").version ?? "unknown";
590
616
  } catch {
591
617
  return "unknown";
592
618
  }
593
619
  }
594
620
  function resolveOpenClawVersion() {
595
621
  try {
596
- return getMSTeamsRuntime().version;
622
+ return require_runtime.getMSTeamsRuntime().version;
597
623
  } catch {
598
624
  return "unknown";
599
625
  }
@@ -622,8 +648,8 @@ function ensureUserAgentHeader(headers) {
622
648
  //#endregion
623
649
  //#region extensions/msteams/src/sdk.ts
624
650
  const AZURE_IDENTITY_MODULE = "@azure/identity";
625
- const loadAzureIdentity = createLazyRuntimeModule(() => import(AZURE_IDENTITY_MODULE));
626
- const loadSdkModules = createLazyRuntimeModule(() => Promise.all([import("@microsoft/teams.apps"), import("@microsoft/teams.api")]).then(([apps, api]) => ({
651
+ const loadAzureIdentity = (0, openclaw_plugin_sdk_lazy_runtime.createLazyRuntimeModule)(() => import(AZURE_IDENTITY_MODULE));
652
+ const loadSdkModules = (0, openclaw_plugin_sdk_lazy_runtime.createLazyRuntimeModule)(() => Promise.all([import("@microsoft/teams.apps"), import("@microsoft/teams.api")]).then(([apps, api]) => ({
627
653
  App: apps.App,
628
654
  ExpressAdapter: apps.ExpressAdapter,
629
655
  cloudFromName: api.cloudFromName
@@ -652,7 +678,10 @@ async function createMSTeamsApp(creds, options) {
652
678
  const cloud = options?.cloud ?? "Public";
653
679
  const serviceUrl = options?.serviceUrl ? normalizeBotFrameworkServiceUrl(options.serviceUrl) : void 0;
654
680
  const appOptions = {
655
- client: options?.httpClient ?? { headers: { "User-Agent": buildOpenClawUserAgentFragment() } },
681
+ client: options?.httpClient ?? {
682
+ headers: { "User-Agent": buildOpenClawUserAgentFragment() },
683
+ timeout: 3e4
684
+ },
656
685
  ...options?.httpServerAdapter ? { httpServerAdapter: options.httpServerAdapter } : {},
657
686
  ...options?.messagingEndpoint ? { messagingEndpoint: options.messagingEndpoint } : {},
658
687
  cloud: cloudFromName(cloud),
@@ -677,7 +706,7 @@ function createFederatedApp(creds, App, appOptions) {
677
706
  if (!creds.certificatePath) throw new Error("Federated credentials require either a certificate path or managed identity.");
678
707
  let privateKey;
679
708
  try {
680
- privateKey = fs.readFileSync(creds.certificatePath, "utf-8");
709
+ privateKey = node_fs.readFileSync(creds.certificatePath, "utf-8");
681
710
  } catch (err) {
682
711
  const msg = err instanceof Error ? err.message : String(err);
683
712
  throw new Error(`Failed to read certificate file at '${creds.certificatePath}': ${msg}`, { cause: err });
@@ -765,7 +794,7 @@ function createMSTeamsTokenBody(params) {
765
794
  return body;
766
795
  }
767
796
  function resolveMSTeamsTokenExpiresAt(value) {
768
- return resolveExpiresAtMsFromDurationSeconds(value, { bufferMs: EXPIRY_BUFFER_MS });
797
+ return (0, openclaw_plugin_sdk_number_runtime.resolveExpiresAtMsFromDurationSeconds)(value, { bufferMs: EXPIRY_BUFFER_MS });
769
798
  }
770
799
  function parseMSTeamsTokenResponse(data, failureLabel) {
771
800
  const expiresAt = resolveMSTeamsTokenExpiresAt(data.expires_in);
@@ -778,10 +807,8 @@ function parseMSTeamsTokenResponse(data, failureLabel) {
778
807
  };
779
808
  }
780
809
  async function fetchMSTeamsTokens(params) {
781
- const currentFetch = globalThis.fetch;
782
- const { response, release } = await fetchWithSsrFGuard({
810
+ const { response, release } = await (0, openclaw_plugin_sdk_ssrf_runtime.fetchWithSsrFGuard)({
783
811
  url: params.tokenUrl,
784
- fetchImpl: async (input, guardedInit) => await currentFetch(input, guardedInit),
785
812
  init: {
786
813
  method: "POST",
787
814
  headers: {
@@ -795,7 +822,7 @@ async function fetchMSTeamsTokens(params) {
795
822
  });
796
823
  try {
797
824
  if (!response.ok) throw await createMSTeamsHttpError(response, `MSTeams ${params.failureLabel} failed`);
798
- return parseMSTeamsTokenResponse(await readProviderJsonResponse(response, `MSTeams ${params.failureLabel} failed`), params.failureLabel);
825
+ return parseMSTeamsTokenResponse(await (0, openclaw_plugin_sdk_provider_http.readProviderJsonResponse)(response, `MSTeams ${params.failureLabel} failed`), params.failureLabel);
799
826
  } finally {
800
827
  await release();
801
828
  }
@@ -859,10 +886,10 @@ async function refreshMSTeamsDelegatedTokens(params) {
859
886
  //#region extensions/msteams/src/storage.ts
860
887
  function resolveMSTeamsStorePath(params) {
861
888
  if (params.storePath) return params.storePath;
862
- if (params.stateDir) return path.join(params.stateDir, params.filename);
889
+ if (params.stateDir) return node_path.default.join(params.stateDir, params.filename);
863
890
  const env = params.env ?? process.env;
864
- const stateDir = params.homedir ? getMSTeamsRuntime().state.resolveStateDir(env, params.homedir) : getMSTeamsRuntime().state.resolveStateDir(env);
865
- return path.join(stateDir, params.filename);
891
+ const stateDir = params.homedir ? require_runtime.getMSTeamsRuntime().state.resolveStateDir(env, params.homedir) : require_runtime.getMSTeamsRuntime().state.resolveStateDir(env);
892
+ return node_path.default.join(stateDir, params.filename);
866
893
  }
867
894
  //#endregion
868
895
  //#region extensions/msteams/src/token.ts
@@ -874,19 +901,19 @@ function resolveAuthType(cfg) {
874
901
  }
875
902
  function hasConfiguredMSTeamsCredentials(cfg) {
876
903
  const authType = resolveAuthType(cfg);
877
- const hasAppId = Boolean(normalizeSecretInputString(cfg?.appId) || normalizeSecretInputString(process.env.MSTEAMS_APP_ID));
878
- const hasTenantId = Boolean(normalizeSecretInputString(cfg?.tenantId) || normalizeSecretInputString(process.env.MSTEAMS_TENANT_ID));
904
+ const hasAppId = Boolean((0, openclaw_plugin_sdk_secret_input.normalizeSecretInputString)(cfg?.appId) || (0, openclaw_plugin_sdk_secret_input.normalizeSecretInputString)(process.env.MSTEAMS_APP_ID));
905
+ const hasTenantId = Boolean((0, openclaw_plugin_sdk_secret_input.normalizeSecretInputString)(cfg?.tenantId) || (0, openclaw_plugin_sdk_secret_input.normalizeSecretInputString)(process.env.MSTEAMS_TENANT_ID));
879
906
  if (authType === "federated") {
880
907
  const hasCert = Boolean(cfg?.certificatePath || process.env.MSTEAMS_CERTIFICATE_PATH);
881
908
  const hasManagedIdentity = cfg?.useManagedIdentity ?? process.env.MSTEAMS_USE_MANAGED_IDENTITY === "true";
882
909
  return hasAppId && hasTenantId && (hasCert || hasManagedIdentity);
883
910
  }
884
- return Boolean(normalizeSecretInputString(cfg?.appId) && hasConfiguredSecretInput(cfg?.appPassword) && normalizeSecretInputString(cfg?.tenantId));
911
+ return Boolean((0, openclaw_plugin_sdk_secret_input.normalizeSecretInputString)(cfg?.appId) && (0, openclaw_plugin_sdk_secret_input.hasConfiguredSecretInput)(cfg?.appPassword) && (0, openclaw_plugin_sdk_secret_input.normalizeSecretInputString)(cfg?.tenantId));
885
912
  }
886
913
  function resolveMSTeamsCredentials(cfg) {
887
914
  const authType = resolveAuthType(cfg);
888
- const appId = normalizeSecretInputString(cfg?.appId) || normalizeSecretInputString(process.env.MSTEAMS_APP_ID);
889
- const tenantId = normalizeSecretInputString(cfg?.tenantId) || normalizeSecretInputString(process.env.MSTEAMS_TENANT_ID);
915
+ const appId = (0, openclaw_plugin_sdk_secret_input.normalizeSecretInputString)(cfg?.appId) || (0, openclaw_plugin_sdk_secret_input.normalizeSecretInputString)(process.env.MSTEAMS_APP_ID);
916
+ const tenantId = (0, openclaw_plugin_sdk_secret_input.normalizeSecretInputString)(cfg?.tenantId) || (0, openclaw_plugin_sdk_secret_input.normalizeSecretInputString)(process.env.MSTEAMS_TENANT_ID);
890
917
  if (!appId || !tenantId) return;
891
918
  if (authType === "federated") {
892
919
  const certificatePath = cfg?.certificatePath || process.env.MSTEAMS_CERTIFICATE_PATH || void 0;
@@ -904,10 +931,10 @@ function resolveMSTeamsCredentials(cfg) {
904
931
  managedIdentityClientId
905
932
  };
906
933
  }
907
- const appPassword = normalizeResolvedSecretInputString({
934
+ const appPassword = (0, openclaw_plugin_sdk_secret_input.normalizeResolvedSecretInputString)({
908
935
  value: cfg?.appPassword,
909
936
  path: "channels.msteams.appPassword"
910
- }) || normalizeSecretInputString(process.env.MSTEAMS_APP_PASSWORD);
937
+ }) || (0, openclaw_plugin_sdk_secret_input.normalizeSecretInputString)(process.env.MSTEAMS_APP_PASSWORD);
911
938
  if (!appPassword) return;
912
939
  return {
913
940
  type: "secret",
@@ -922,7 +949,7 @@ function resolveDelegatedTokenPath() {
922
949
  }
923
950
  function loadDelegatedTokens() {
924
951
  try {
925
- const content = readFileSync(resolveDelegatedTokenPath(), "utf8");
952
+ const content = (0, node_fs.readFileSync)(resolveDelegatedTokenPath(), "utf8");
926
953
  return JSON.parse(content);
927
954
  } catch {
928
955
  return;
@@ -930,12 +957,12 @@ function loadDelegatedTokens() {
930
957
  }
931
958
  function saveDelegatedTokens(tokens) {
932
959
  const tokenPath = resolveDelegatedTokenPath();
933
- privateFileStoreSync(dirname(tokenPath)).writeJson(basename(tokenPath), tokens);
960
+ (0, openclaw_plugin_sdk_security_runtime.privateFileStoreSync)((0, node_path.dirname)(tokenPath)).writeJson((0, node_path.basename)(tokenPath), tokens);
934
961
  }
935
962
  async function resolveDelegatedAccessToken(params) {
936
963
  const tokens = loadDelegatedTokens();
937
964
  if (!tokens) return;
938
- if (isFutureDateTimestampMs(tokens.expiresAt)) return tokens.accessToken;
965
+ if ((0, openclaw_plugin_sdk_number_runtime.isFutureDateTimestampMs)(tokens.expiresAt)) return tokens.accessToken;
939
966
  try {
940
967
  const refreshed = await refreshMSTeamsDelegatedTokens({
941
968
  tenantId: params.tenantId,
@@ -961,11 +988,8 @@ function escapeOData(value) {
961
988
  }
962
989
  async function requestGraph(params) {
963
990
  const hasBody = params.body !== void 0;
964
- const url = `${params.root ?? "https://graph.microsoft.com/v1.0"}${params.path}`;
965
- const currentFetch = globalThis.fetch;
966
- const { response, release } = await fetchWithSsrFGuard$1({
967
- url,
968
- fetchImpl: async (input, guardedInit) => await currentFetch(input, guardedInit),
991
+ const { response, release } = await (0, openclaw_plugin_sdk_ssrf_runtime.fetchWithSsrFGuard)({
992
+ url: `${params.root ?? "https://graph.microsoft.com/v1.0"}${params.path}`,
969
993
  init: {
970
994
  method: params.method,
971
995
  headers: {
@@ -976,7 +1000,8 @@ async function requestGraph(params) {
976
1000
  },
977
1001
  body: hasBody ? JSON.stringify(params.body) : void 0
978
1002
  },
979
- auditContext: "msteams.graph"
1003
+ auditContext: "msteams.graph",
1004
+ timeoutMs: resolveMSTeamsRequestTimeoutMs(params.deadline)
980
1005
  });
981
1006
  let releaseInFinally = true;
982
1007
  try {
@@ -989,7 +1014,7 @@ async function requestGraph(params) {
989
1014
  }
990
1015
  async function readOptionalGraphJson(res, label) {
991
1016
  if (res.status === 204 || res.headers?.get?.("content-length") === "0") return;
992
- return await readProviderJsonResponse(res, label);
1017
+ return await (0, openclaw_plugin_sdk_provider_http.readProviderJsonResponse)(res, label);
993
1018
  }
994
1019
  async function fetchGraphJson(params) {
995
1020
  return await readOptionalGraphJson(await requestGraph({
@@ -997,7 +1022,8 @@ async function fetchGraphJson(params) {
997
1022
  path: params.path,
998
1023
  method: params.method,
999
1024
  body: params.body,
1000
- headers: params.headers
1025
+ headers: params.headers,
1026
+ deadline: params.deadline
1001
1027
  }), `Graph ${params.path} failed`);
1002
1028
  }
1003
1029
  /**
@@ -1005,18 +1031,19 @@ async function fetchGraphJson(params) {
1005
1031
  * pagination URLs) without prepending GRAPH_ROOT.
1006
1032
  */
1007
1033
  async function fetchGraphAbsoluteUrl(params) {
1008
- const { response, release } = await fetchWithSsrFGuard$1({
1034
+ const { response, release } = await (0, openclaw_plugin_sdk_ssrf_runtime.fetchWithSsrFGuard)({
1009
1035
  url: params.url,
1010
1036
  init: { headers: {
1011
1037
  "User-Agent": buildUserAgent(),
1012
1038
  Authorization: `Bearer ${params.token}`,
1013
1039
  ...params.headers
1014
1040
  } },
1015
- auditContext: "msteams.graph.absolute"
1041
+ auditContext: "msteams.graph.absolute",
1042
+ timeoutMs: MSTEAMS_REQUEST_TIMEOUT_MS
1016
1043
  });
1017
1044
  try {
1018
1045
  if (!response.ok) throw await createMSTeamsHttpError(response, `Graph ${params.url} failed`);
1019
- return await readProviderJsonResponse(response, `Graph ${params.url} failed`);
1046
+ return await (0, openclaw_plugin_sdk_provider_http.readProviderJsonResponse)(response, `Graph ${params.url} failed`);
1020
1047
  } finally {
1021
1048
  await release();
1022
1049
  }
@@ -1076,13 +1103,14 @@ async function resolveGraphToken(cfg, options) {
1076
1103
  return accessToken;
1077
1104
  }
1078
1105
  async function listTeamsByName(token, query) {
1106
+ return (await listTeamsByNameWithPageInfo(token, query)).items;
1107
+ }
1108
+ async function listTeamsByNameWithPageInfo(token, query) {
1079
1109
  const filter = `resourceProvisioningOptions/Any(x:x eq 'Team') and startsWith(displayName,'${escapeOData(query)}')`;
1080
- const { items } = await fetchAllGraphPages({
1110
+ return await fetchAllGraphPages({
1081
1111
  token,
1082
- path: `/groups?$filter=${encodeURIComponent(filter)}&$select=id,displayName`,
1083
- maxPages: 5
1112
+ path: `/groups?$filter=${encodeURIComponent(filter)}&$select=id,displayName`
1084
1113
  });
1085
- return items;
1086
1114
  }
1087
1115
  async function postGraphJson(params) {
1088
1116
  return readOptionalGraphJson(await requestGraph({
@@ -1121,12 +1149,13 @@ async function patchGraphJson(params) {
1121
1149
  }), `Graph PATCH ${params.path} failed`);
1122
1150
  }
1123
1151
  async function listChannelsForTeam(token, teamId) {
1124
- const { items } = await fetchAllGraphPages({
1152
+ return (await listChannelsForTeamWithPageInfo(token, teamId)).items;
1153
+ }
1154
+ async function listChannelsForTeamWithPageInfo(token, teamId) {
1155
+ return await fetchAllGraphPages({
1125
1156
  token,
1126
- path: `/teams/${encodeURIComponent(teamId)}/channels?$select=id,displayName`,
1127
- maxPages: 10
1157
+ path: `/teams/${encodeURIComponent(teamId)}/channels?$select=id,displayName`
1128
1158
  });
1129
- return items;
1130
1159
  }
1131
1160
  //#endregion
1132
1161
  //#region extensions/msteams/src/graph-users.ts
@@ -1150,8 +1179,64 @@ async function searchGraphUsers(params) {
1150
1179
  headers: { ConsistencyLevel: "eventual" }
1151
1180
  })).value ?? [];
1152
1181
  }
1182
+ async function findGraphUsersByExactIdentity(params) {
1183
+ const query = params.query.trim();
1184
+ if (!query) return {
1185
+ items: [],
1186
+ truncated: false
1187
+ };
1188
+ const escaped = escapeOData(query);
1189
+ const filter = `(displayName eq '${escaped}' or mail eq '${escaped}' or userPrincipalName eq '${escaped}')`;
1190
+ const path = `/users?$filter=${encodeURIComponent(filter)}&\$select=id,displayName,mail,userPrincipalName`;
1191
+ return await fetchAllGraphPages({
1192
+ token: params.token,
1193
+ path
1194
+ });
1195
+ }
1153
1196
  //#endregion
1154
1197
  //#region extensions/msteams/src/resolve-allowlist.ts
1198
+ function normalizeExactMatch(value) {
1199
+ return (0, openclaw_plugin_sdk_string_coerce_runtime.normalizeLowercaseStringOrEmpty)(value ?? "");
1200
+ }
1201
+ function uniqueItemsById(items) {
1202
+ const byId = /* @__PURE__ */ new Map();
1203
+ for (const item of items) {
1204
+ const id = item.id?.trim();
1205
+ if (id && !byId.has(id)) byId.set(id, item);
1206
+ }
1207
+ return [...byId.values()];
1208
+ }
1209
+ function findExactTeams(items, query) {
1210
+ const normalized = normalizeExactMatch(query);
1211
+ return uniqueItemsById(items.filter((item) => normalizeExactMatch(item.displayName) === normalized));
1212
+ }
1213
+ function findExactChannels(items, query) {
1214
+ const normalized = normalizeExactMatch(query);
1215
+ return uniqueItemsById(items.filter((item) => normalizeExactMatch(item.displayName) === normalized));
1216
+ }
1217
+ function findExactUsers(items, query) {
1218
+ const normalized = normalizeExactMatch(query);
1219
+ return uniqueItemsById(items.filter((item) => [
1220
+ item.displayName,
1221
+ item.mail,
1222
+ item.userPrincipalName
1223
+ ].some((value) => normalizeExactMatch(value) === normalized)));
1224
+ }
1225
+ function isStableMSTeamsUserId(raw) {
1226
+ return /^[0-9a-fA-F-]{16,}$/.test(normalizeMSTeamsUserInput(raw));
1227
+ }
1228
+ function normalizeStaticMSTeamsAllowEntry(raw) {
1229
+ const trimmed = raw.trim();
1230
+ if (!trimmed) return;
1231
+ if (trimmed === "*" || /^accessGroup:/i.test(trimmed)) return trimmed;
1232
+ const id = normalizeMSTeamsUserInput(trimmed);
1233
+ return isStableMSTeamsUserId(id) ? id : void 0;
1234
+ }
1235
+ function projectStableMSTeamsUserAllowlist(entries) {
1236
+ if (!entries) return;
1237
+ const projected = entries.map((entry) => normalizeStaticMSTeamsAllowEntry(entry)).filter((entry) => Boolean(entry));
1238
+ return [...new Map(projected.map((entry) => [normalizeExactMatch(entry), entry])).values()];
1239
+ }
1155
1240
  function stripProviderPrefix(raw) {
1156
1241
  return raw.replace(/^(msteams|teams):/i, "");
1157
1242
  }
@@ -1178,37 +1263,39 @@ function parseMSTeamsConversationId(raw) {
1178
1263
  return trimmed.slice(13).trim();
1179
1264
  }
1180
1265
  /**
1181
- * Detect whether a raw target string looks like a Microsoft Teams conversation
1182
- * or user id that cron announce delivery and other explicit-target paths can
1183
- * forward verbatim to the channel adapter.
1266
+ * Detect whether a raw target string is a supported Microsoft Teams
1267
+ * conversation id.
1184
1268
  *
1185
1269
  * Accepts both prefixed and bare formats:
1186
1270
  * - `conversation:<id>` — explicit conversation prefix
1187
- * - `user:<aad-guid>` — user id (16+ hex chars, UUID-like)
1188
1271
  * - `19:abc@thread.tacv2` / `19:abc@thread.skype` — channel / legacy group
1189
1272
  * - `19:{userId}_{appId}@unq.gbl.spaces` — Graph 1:1 chat thread format
1190
1273
  * - `a:1xxx` — Bot Framework personal (1:1) chat id
1191
1274
  * - `8:orgid:xxx` — Bot Framework org-scoped personal chat id
1192
- * - `29:xxx` — Bot Framework user id
1193
- *
1194
- * Display-name user targets such as `user:John Smith` intentionally return
1195
- * false so that the Graph API directory lookup still runs for them.
1196
1275
  */
1197
- function looksLikeMSTeamsTargetId(raw) {
1276
+ function looksLikeMSTeamsConversationId(raw) {
1198
1277
  const trimmed = raw.trim();
1199
1278
  if (!trimmed) return false;
1200
1279
  if (/^conversation:/i.test(trimmed)) return true;
1201
- if (/^user:/i.test(trimmed)) {
1202
- const id = trimmed.slice(5).trim();
1203
- return /^[0-9a-fA-F-]{16,}$/.test(id);
1204
- }
1205
1280
  if (/^19:.+@thread\.(tacv2|skype)$/i.test(trimmed)) return true;
1206
1281
  if (/^19:.+@unq\.gbl\.spaces$/i.test(trimmed)) return true;
1207
1282
  if (/^a:1[A-Za-z0-9_-]+$/i.test(trimmed)) return true;
1208
1283
  if (/^8:orgid:[A-Za-z0-9-]+$/i.test(trimmed)) return true;
1209
- if (/^29:[A-Za-z0-9_-]+$/i.test(trimmed)) return true;
1210
1284
  return /@thread\b/i.test(trimmed);
1211
1285
  }
1286
+ /**
1287
+ * Detect conversation ids plus stable user ids that explicit-target delivery
1288
+ * can forward verbatim to the channel adapter.
1289
+ */
1290
+ function looksLikeMSTeamsTargetId(raw) {
1291
+ const trimmed = raw.trim();
1292
+ if (looksLikeMSTeamsConversationId(trimmed)) return true;
1293
+ if (/^user:/i.test(trimmed)) {
1294
+ const id = trimmed.slice(5).trim();
1295
+ return /^[0-9a-fA-F-]{16,}$/.test(id);
1296
+ }
1297
+ return /^29:[A-Za-z0-9_-]+$/i.test(trimmed);
1298
+ }
1212
1299
  function normalizeMSTeamsTeamKey(raw) {
1213
1300
  return stripProviderPrefix(raw).replace(/^team:/i, "").trim() || void 0;
1214
1301
  }
@@ -1223,6 +1310,33 @@ function looksLikeMSTeamsThreadConversationId(raw) {
1223
1310
  const normalized = normalizeMSTeamsConversationTargetId(raw);
1224
1311
  return /^19:.+@thread\./i.test(normalized);
1225
1312
  }
1313
+ function isStableMSTeamsTeamKey(raw) {
1314
+ return /^[0-9a-fA-F-]{16,}$/.test(raw.trim()) || looksLikeMSTeamsThreadConversationId(raw);
1315
+ }
1316
+ function projectStableMSTeamsChannels(channels) {
1317
+ const projected = {};
1318
+ for (const [channelKey, channelConfig] of Object.entries(channels ?? {})) {
1319
+ if (channelKey === "*") {
1320
+ projected[channelKey] = channelConfig;
1321
+ continue;
1322
+ }
1323
+ if (looksLikeMSTeamsThreadConversationId(channelKey)) projected[normalizeMSTeamsConversationTargetId(channelKey)] = channelConfig;
1324
+ }
1325
+ return projected;
1326
+ }
1327
+ function projectStableMSTeamsTeamsConfig(teams) {
1328
+ if (!teams) return;
1329
+ const projected = {};
1330
+ for (const [teamKey, teamConfig] of Object.entries(teams)) {
1331
+ if (teamKey !== "*" && !isStableMSTeamsTeamKey(teamKey)) continue;
1332
+ const stableKey = teamKey === "*" ? teamKey : normalizeMSTeamsConversationTargetId(teamKey);
1333
+ projected[stableKey] = {
1334
+ ...teamConfig,
1335
+ channels: projectStableMSTeamsChannels(teamConfig.channels)
1336
+ };
1337
+ }
1338
+ return projected;
1339
+ }
1226
1340
  function parseMSTeamsTeamChannelInput(raw) {
1227
1341
  const trimmed = stripProviderPrefix(raw).trim();
1228
1342
  if (!trimmed) return {};
@@ -1248,7 +1362,7 @@ async function resolveMSTeamsChannelAllowlist(params) {
1248
1362
  tokenPromise ??= resolveGraphToken(params.cfg);
1249
1363
  return tokenPromise;
1250
1364
  };
1251
- return await mapAllowlistResolutionInputs({
1365
+ return await (0, openclaw_plugin_sdk_allow_from.mapAllowlistResolutionInputs)({
1252
1366
  inputs: params.entries,
1253
1367
  mapInput: async (input) => {
1254
1368
  const { team, channel } = parseMSTeamsTeamChannelInput(input);
@@ -1282,16 +1396,32 @@ async function resolveMSTeamsChannelAllowlist(params) {
1282
1396
  };
1283
1397
  }
1284
1398
  const token = await getToken();
1285
- const teams = /^[0-9a-fA-F-]{16,}$/.test(team) ? [{
1399
+ let teamMatch;
1400
+ if (/^[0-9a-fA-F-]{16,}$/.test(team)) teamMatch = {
1286
1401
  id: team,
1287
1402
  displayName: team
1288
- }] : await listTeamsByName(token, team);
1289
- if (teams.length === 0) return {
1290
- input,
1291
- resolved: false,
1292
- note: "team not found"
1293
1403
  };
1294
- const teamMatch = teams[0];
1404
+ else {
1405
+ const result = await listTeamsByNameWithPageInfo(token, team);
1406
+ if (result.truncated) return {
1407
+ input,
1408
+ resolved: false,
1409
+ note: "team lookup incomplete"
1410
+ };
1411
+ const exactTeams = findExactTeams(result.items, team);
1412
+ const [exactTeam] = exactTeams;
1413
+ if (!exactTeam) return {
1414
+ input,
1415
+ resolved: false,
1416
+ note: "team not found"
1417
+ };
1418
+ if (exactTeams.length > 1) return {
1419
+ input,
1420
+ resolved: false,
1421
+ note: "team name is ambiguous"
1422
+ };
1423
+ teamMatch = exactTeam;
1424
+ }
1295
1425
  const graphTeamId = teamMatch.id?.trim();
1296
1426
  const teamName = teamMatch.displayName?.trim() || team;
1297
1427
  if (!graphTeamId) return {
@@ -1299,40 +1429,158 @@ async function resolveMSTeamsChannelAllowlist(params) {
1299
1429
  resolved: false,
1300
1430
  note: "team id missing"
1301
1431
  };
1302
- let teamChannels = [];
1432
+ if (!(params.teamIdMode !== "graph" || Boolean(channel))) return {
1433
+ input,
1434
+ resolved: true,
1435
+ teamId: graphTeamId,
1436
+ graphTeamId,
1437
+ teamName
1438
+ };
1439
+ let teamChannels;
1303
1440
  try {
1304
- teamChannels = await listChannelsForTeam(token, graphTeamId);
1305
- } catch {}
1306
- const teamId = teamChannels.find((ch) => normalizeOptionalLowercaseString(ch.displayName) === "general")?.id?.trim() || graphTeamId;
1441
+ const result = await listChannelsForTeamWithPageInfo(token, graphTeamId);
1442
+ if (result.truncated) return {
1443
+ input,
1444
+ resolved: false,
1445
+ note: "channel lookup incomplete"
1446
+ };
1447
+ teamChannels = result.items;
1448
+ } catch {
1449
+ return {
1450
+ input,
1451
+ resolved: false,
1452
+ note: "channel lookup failed"
1453
+ };
1454
+ }
1455
+ const generalChannels = findExactChannels(teamChannels, "general");
1456
+ if (params.teamIdMode !== "graph" && generalChannels.length !== 1) return {
1457
+ input,
1458
+ resolved: false,
1459
+ graphTeamId,
1460
+ teamName,
1461
+ note: generalChannels.length > 1 ? "General channel is ambiguous" : "General channel not found"
1462
+ };
1463
+ const teamId = generalChannels[0]?.id?.trim() || graphTeamId;
1307
1464
  if (!channel) return {
1308
1465
  input,
1309
1466
  resolved: true,
1310
1467
  teamId,
1311
- teamName,
1312
- note: teams.length > 1 ? "multiple teams; chose first" : void 0
1468
+ graphTeamId,
1469
+ teamName
1313
1470
  };
1314
- const normalizedChannel = normalizeOptionalLowercaseString(channel);
1315
- const channelMatch = teamChannels.find((item) => item.id === channel) ?? teamChannels.find((item) => normalizeOptionalLowercaseString(item.displayName) === normalizedChannel) ?? teamChannels.find((item) => normalizeLowercaseStringOrEmpty(item.displayName ?? "").includes(normalizedChannel ?? ""));
1316
- if (!channelMatch?.id) return {
1471
+ const channelById = teamChannels.find((item) => item.id === channel);
1472
+ const exactChannels = channelById ? [channelById] : findExactChannels(teamChannels, channel);
1473
+ if (exactChannels.length === 0) return {
1317
1474
  input,
1318
1475
  resolved: false,
1319
1476
  note: "channel not found"
1320
1477
  };
1478
+ if (exactChannels.length > 1) return {
1479
+ input,
1480
+ resolved: false,
1481
+ note: "channel name is ambiguous"
1482
+ };
1483
+ const channelMatch = exactChannels[0];
1484
+ if (!channelMatch?.id) return {
1485
+ input,
1486
+ resolved: false,
1487
+ note: "channel id missing"
1488
+ };
1321
1489
  return {
1322
1490
  input,
1323
1491
  resolved: true,
1324
1492
  teamId,
1493
+ graphTeamId,
1325
1494
  teamName,
1326
1495
  channelId: channelMatch.id,
1327
- channelName: channelMatch.displayName ?? channel,
1328
- note: teamChannels.length > 1 ? "multiple channels; chose first" : void 0
1496
+ channelName: channelMatch.displayName ?? channel
1329
1497
  };
1330
1498
  }
1331
1499
  });
1332
1500
  }
1501
+ async function resolveMSTeamsTeamsConfig(params) {
1502
+ const entries = [];
1503
+ const unresolved = [];
1504
+ for (const [teamKey, teamCfg] of Object.entries(params.teams)) {
1505
+ if (teamKey === "*") {
1506
+ for (const channelKey of Object.keys(teamCfg?.channels ?? {})) if (channelKey !== "*" && !looksLikeMSTeamsThreadConversationId(channelKey)) unresolved.push(`${teamKey}/${channelKey}`);
1507
+ continue;
1508
+ }
1509
+ const channelKeys = Object.keys(teamCfg?.channels ?? {}).filter((key) => key !== "*");
1510
+ if (channelKeys.length === 0) {
1511
+ entries.push({
1512
+ input: teamKey,
1513
+ teamKey
1514
+ });
1515
+ continue;
1516
+ }
1517
+ for (const channelKey of channelKeys) entries.push({
1518
+ input: `${teamKey}/${channelKey}`,
1519
+ teamKey,
1520
+ channelKey
1521
+ });
1522
+ }
1523
+ if (entries.length === 0) return {
1524
+ teams: projectStableMSTeamsTeamsConfig(params.teams) ?? {},
1525
+ mapping: [],
1526
+ unresolved
1527
+ };
1528
+ const resolved = await resolveMSTeamsChannelAllowlist({
1529
+ cfg: params.cfg,
1530
+ entries: entries.map((entry) => entry.input),
1531
+ teamIdMode: params.teamIdMode
1532
+ });
1533
+ const mapping = [];
1534
+ const teams = projectStableMSTeamsTeamsConfig(params.teams) ?? {};
1535
+ resolved.forEach((entry, index) => {
1536
+ const source = entries[index];
1537
+ if (!source) return;
1538
+ const sourceTeam = params.teams[source.teamKey] ?? {};
1539
+ const resolvedTeamId = params.teamIdMode === "graph" ? entry.graphTeamId : entry.teamId;
1540
+ if (!entry.resolved || !resolvedTeamId) {
1541
+ unresolved.push(entry.input);
1542
+ return;
1543
+ }
1544
+ mapping.push(entry.channelId ? `${entry.input}→${resolvedTeamId}/${entry.channelId}` : `${entry.input}→${resolvedTeamId}`);
1545
+ const existing = teams[resolvedTeamId] ?? {};
1546
+ const { channels: _sourceChannels, ...sourceTeamPolicy } = sourceTeam;
1547
+ const mergedChannels = {
1548
+ ...projectStableMSTeamsChannels(sourceTeam.channels),
1549
+ ...existing.channels
1550
+ };
1551
+ const mergedTeam = {
1552
+ ...sourceTeamPolicy,
1553
+ ...existing,
1554
+ channels: mergedChannels
1555
+ };
1556
+ teams[resolvedTeamId] = mergedTeam;
1557
+ if (source.channelKey && entry.channelId) {
1558
+ const sourceChannel = sourceTeam.channels?.[source.channelKey];
1559
+ if (sourceChannel) teams[resolvedTeamId] = {
1560
+ ...mergedTeam,
1561
+ channels: {
1562
+ ...mergedChannels,
1563
+ [entry.channelId]: {
1564
+ ...sourceChannel,
1565
+ ...mergedChannels?.[entry.channelId]
1566
+ }
1567
+ }
1568
+ };
1569
+ }
1570
+ });
1571
+ return {
1572
+ teams,
1573
+ mapping,
1574
+ unresolved
1575
+ };
1576
+ }
1333
1577
  async function resolveMSTeamsUserAllowlist(params) {
1334
- const token = await resolveGraphToken(params.cfg);
1335
- return await mapAllowlistResolutionInputs({
1578
+ let tokenPromise;
1579
+ const getToken = () => {
1580
+ tokenPromise ??= resolveGraphToken(params.cfg);
1581
+ return tokenPromise;
1582
+ };
1583
+ return await (0, openclaw_plugin_sdk_allow_from.mapAllowlistResolutionInputs)({
1336
1584
  inputs: params.entries,
1337
1585
  mapInput: async (input) => {
1338
1586
  const query = normalizeQuery(normalizeMSTeamsUserInput(input));
@@ -1345,25 +1593,454 @@ async function resolveMSTeamsUserAllowlist(params) {
1345
1593
  resolved: true,
1346
1594
  id: query
1347
1595
  };
1348
- const users = await searchGraphUsers({
1349
- token,
1350
- query,
1351
- top: 10
1596
+ const result = await findGraphUsersByExactIdentity({
1597
+ token: await getToken(),
1598
+ query
1352
1599
  });
1353
- const match = users[0];
1354
- if (!match?.id) return {
1600
+ if (result.truncated) return {
1355
1601
  input,
1356
- resolved: false
1602
+ resolved: false,
1603
+ note: "user lookup incomplete"
1604
+ };
1605
+ const users = findExactUsers(result.items, query);
1606
+ const [match] = users;
1607
+ if (!match) return {
1608
+ input,
1609
+ resolved: false,
1610
+ note: "user not found"
1611
+ };
1612
+ if (users.length > 1) return {
1613
+ input,
1614
+ resolved: false,
1615
+ note: "user identity is ambiguous"
1357
1616
  };
1358
1617
  return {
1359
1618
  input,
1360
1619
  resolved: true,
1361
1620
  id: match.id,
1362
- name: match.displayName ?? void 0,
1363
- note: users.length > 1 ? "multiple matches; chose first" : void 0
1621
+ name: match.displayName ?? void 0
1364
1622
  };
1365
1623
  }
1366
1624
  });
1367
1625
  }
1368
1626
  //#endregion
1369
- export { isDownloadableAttachment as $, MSTEAMS_OAUTH_REDIRECT_URI as A, normalizeBotFrameworkServiceUrl as B, resolveMSTeamsCredentials as C, MSTEAMS_DEFAULT_DELEGATED_SCOPES as D, exchangeMSTeamsCodeForTokens as E, loadMSTeamsSdkWithAuth as F, ATTACHMENT_TAG_RE as G, createMSTeamsHttpError as H, buildUserAgent as I, applyAuthorizationHeaderForUrl as J, GRAPH_ROOT as K, ensureUserAgentHeader as L, readAccessToken as M, createMSTeamsExpressAdapter as N, MSTEAMS_OAUTH_CALLBACK_PATH as O, createMSTeamsTokenProvider as P, inferPlaceholder as Q, describeBotFrameworkServiceUrlHost as R, loadDelegatedTokens as S, normalizeSecretInputString as T, resolveMSTeamsSdkCloudOptions as U, tryNormalizeBotFrameworkServiceUrl as V, validateMSTeamsProactiveServiceUrlBoundary as W, extractHtmlFromAttachment as X, encodeGraphShareId as Y, extractInlineImageCandidates as Z, patchGraphJson as _, parseMSTeamsTeamChannelInput as a, resolveAttachmentFetchPolicy as at, resolveGraphToken as b, resolveMSTeamsUserAllowlist as c, safeFetchWithPolicy as ct, escapeOData as d, isLikelyImageAttachment as et, fetchGraphAbsoluteUrl as f, normalizeQuery as g, listTeamsByName as h, parseMSTeamsConversationId as i, readNestedString as it, buildMSTeamsAuthEndpoint as j, MSTEAMS_OAUTH_CALLBACK_PORT as k, searchGraphUsers as l, safeHostForUrl as lt, listChannelsForTeam as m, normalizeMSTeamsMessagingTarget as n, isUrlAllowed as nt, parseMSTeamsTeamEntry as o, resolveMediaSsrfPolicy as ot, fetchGraphJson as p, IMG_SRC_RE as q, normalizeMSTeamsUserInput as r, normalizeContentType as rt, resolveMSTeamsChannelAllowlist as s, resolveRequestUrl as st, looksLikeMSTeamsTargetId as t, isRecord$1 as tt, deleteGraphRequest as u, tryBuildGraphSharesUrlForSharedLink as ut, postGraphBetaJson as v, saveDelegatedTokens as w, hasConfiguredMSTeamsCredentials as x, postGraphJson as y, isAllowedBotFrameworkServiceUrl as z };
1627
+ Object.defineProperty(exports, "ATTACHMENT_TAG_RE", {
1628
+ enumerable: true,
1629
+ get: function() {
1630
+ return ATTACHMENT_TAG_RE;
1631
+ }
1632
+ });
1633
+ Object.defineProperty(exports, "GRAPH_ROOT", {
1634
+ enumerable: true,
1635
+ get: function() {
1636
+ return GRAPH_ROOT;
1637
+ }
1638
+ });
1639
+ Object.defineProperty(exports, "IMG_SRC_RE", {
1640
+ enumerable: true,
1641
+ get: function() {
1642
+ return IMG_SRC_RE;
1643
+ }
1644
+ });
1645
+ Object.defineProperty(exports, "MSTEAMS_DEFAULT_DELEGATED_SCOPES", {
1646
+ enumerable: true,
1647
+ get: function() {
1648
+ return MSTEAMS_DEFAULT_DELEGATED_SCOPES;
1649
+ }
1650
+ });
1651
+ Object.defineProperty(exports, "MSTEAMS_OAUTH_CALLBACK_PATH", {
1652
+ enumerable: true,
1653
+ get: function() {
1654
+ return MSTEAMS_OAUTH_CALLBACK_PATH;
1655
+ }
1656
+ });
1657
+ Object.defineProperty(exports, "MSTEAMS_OAUTH_CALLBACK_PORT", {
1658
+ enumerable: true,
1659
+ get: function() {
1660
+ return MSTEAMS_OAUTH_CALLBACK_PORT;
1661
+ }
1662
+ });
1663
+ Object.defineProperty(exports, "MSTEAMS_OAUTH_REDIRECT_URI", {
1664
+ enumerable: true,
1665
+ get: function() {
1666
+ return MSTEAMS_OAUTH_REDIRECT_URI;
1667
+ }
1668
+ });
1669
+ Object.defineProperty(exports, "applyAuthorizationHeaderForUrl", {
1670
+ enumerable: true,
1671
+ get: function() {
1672
+ return applyAuthorizationHeaderForUrl;
1673
+ }
1674
+ });
1675
+ Object.defineProperty(exports, "buildMSTeamsAuthEndpoint", {
1676
+ enumerable: true,
1677
+ get: function() {
1678
+ return buildMSTeamsAuthEndpoint;
1679
+ }
1680
+ });
1681
+ Object.defineProperty(exports, "buildUserAgent", {
1682
+ enumerable: true,
1683
+ get: function() {
1684
+ return buildUserAgent;
1685
+ }
1686
+ });
1687
+ Object.defineProperty(exports, "createMSTeamsExpressAdapter", {
1688
+ enumerable: true,
1689
+ get: function() {
1690
+ return createMSTeamsExpressAdapter;
1691
+ }
1692
+ });
1693
+ Object.defineProperty(exports, "createMSTeamsHttpError", {
1694
+ enumerable: true,
1695
+ get: function() {
1696
+ return createMSTeamsHttpError;
1697
+ }
1698
+ });
1699
+ Object.defineProperty(exports, "createMSTeamsInboundDeadline", {
1700
+ enumerable: true,
1701
+ get: function() {
1702
+ return createMSTeamsInboundDeadline;
1703
+ }
1704
+ });
1705
+ Object.defineProperty(exports, "createMSTeamsTokenProvider", {
1706
+ enumerable: true,
1707
+ get: function() {
1708
+ return createMSTeamsTokenProvider;
1709
+ }
1710
+ });
1711
+ Object.defineProperty(exports, "deleteGraphRequest", {
1712
+ enumerable: true,
1713
+ get: function() {
1714
+ return deleteGraphRequest;
1715
+ }
1716
+ });
1717
+ Object.defineProperty(exports, "describeBotFrameworkServiceUrlHost", {
1718
+ enumerable: true,
1719
+ get: function() {
1720
+ return describeBotFrameworkServiceUrlHost;
1721
+ }
1722
+ });
1723
+ Object.defineProperty(exports, "encodeGraphShareId", {
1724
+ enumerable: true,
1725
+ get: function() {
1726
+ return encodeGraphShareId;
1727
+ }
1728
+ });
1729
+ Object.defineProperty(exports, "ensureUserAgentHeader", {
1730
+ enumerable: true,
1731
+ get: function() {
1732
+ return ensureUserAgentHeader;
1733
+ }
1734
+ });
1735
+ Object.defineProperty(exports, "escapeOData", {
1736
+ enumerable: true,
1737
+ get: function() {
1738
+ return escapeOData;
1739
+ }
1740
+ });
1741
+ Object.defineProperty(exports, "exchangeMSTeamsCodeForTokens", {
1742
+ enumerable: true,
1743
+ get: function() {
1744
+ return exchangeMSTeamsCodeForTokens;
1745
+ }
1746
+ });
1747
+ Object.defineProperty(exports, "extractHtmlFromAttachment", {
1748
+ enumerable: true,
1749
+ get: function() {
1750
+ return extractHtmlFromAttachment;
1751
+ }
1752
+ });
1753
+ Object.defineProperty(exports, "extractInlineImageCandidates", {
1754
+ enumerable: true,
1755
+ get: function() {
1756
+ return extractInlineImageCandidates;
1757
+ }
1758
+ });
1759
+ Object.defineProperty(exports, "fetchGraphAbsoluteUrl", {
1760
+ enumerable: true,
1761
+ get: function() {
1762
+ return fetchGraphAbsoluteUrl;
1763
+ }
1764
+ });
1765
+ Object.defineProperty(exports, "fetchGraphJson", {
1766
+ enumerable: true,
1767
+ get: function() {
1768
+ return fetchGraphJson;
1769
+ }
1770
+ });
1771
+ Object.defineProperty(exports, "hasConfiguredMSTeamsCredentials", {
1772
+ enumerable: true,
1773
+ get: function() {
1774
+ return hasConfiguredMSTeamsCredentials;
1775
+ }
1776
+ });
1777
+ Object.defineProperty(exports, "inferPlaceholder", {
1778
+ enumerable: true,
1779
+ get: function() {
1780
+ return inferPlaceholder;
1781
+ }
1782
+ });
1783
+ Object.defineProperty(exports, "isAllowedBotFrameworkServiceUrl", {
1784
+ enumerable: true,
1785
+ get: function() {
1786
+ return isAllowedBotFrameworkServiceUrl;
1787
+ }
1788
+ });
1789
+ Object.defineProperty(exports, "isDownloadableAttachment", {
1790
+ enumerable: true,
1791
+ get: function() {
1792
+ return isDownloadableAttachment;
1793
+ }
1794
+ });
1795
+ Object.defineProperty(exports, "isLikelyImageAttachment", {
1796
+ enumerable: true,
1797
+ get: function() {
1798
+ return isLikelyImageAttachment;
1799
+ }
1800
+ });
1801
+ Object.defineProperty(exports, "isUrlAllowed", {
1802
+ enumerable: true,
1803
+ get: function() {
1804
+ return isUrlAllowed;
1805
+ }
1806
+ });
1807
+ Object.defineProperty(exports, "listChannelsForTeam", {
1808
+ enumerable: true,
1809
+ get: function() {
1810
+ return listChannelsForTeam;
1811
+ }
1812
+ });
1813
+ Object.defineProperty(exports, "listChannelsForTeamWithPageInfo", {
1814
+ enumerable: true,
1815
+ get: function() {
1816
+ return listChannelsForTeamWithPageInfo;
1817
+ }
1818
+ });
1819
+ Object.defineProperty(exports, "listTeamsByName", {
1820
+ enumerable: true,
1821
+ get: function() {
1822
+ return listTeamsByName;
1823
+ }
1824
+ });
1825
+ Object.defineProperty(exports, "loadDelegatedTokens", {
1826
+ enumerable: true,
1827
+ get: function() {
1828
+ return loadDelegatedTokens;
1829
+ }
1830
+ });
1831
+ Object.defineProperty(exports, "loadMSTeamsSdkWithAuth", {
1832
+ enumerable: true,
1833
+ get: function() {
1834
+ return loadMSTeamsSdkWithAuth;
1835
+ }
1836
+ });
1837
+ Object.defineProperty(exports, "looksLikeMSTeamsConversationId", {
1838
+ enumerable: true,
1839
+ get: function() {
1840
+ return looksLikeMSTeamsConversationId;
1841
+ }
1842
+ });
1843
+ Object.defineProperty(exports, "looksLikeMSTeamsTargetId", {
1844
+ enumerable: true,
1845
+ get: function() {
1846
+ return looksLikeMSTeamsTargetId;
1847
+ }
1848
+ });
1849
+ Object.defineProperty(exports, "normalizeBotFrameworkServiceUrl", {
1850
+ enumerable: true,
1851
+ get: function() {
1852
+ return normalizeBotFrameworkServiceUrl;
1853
+ }
1854
+ });
1855
+ Object.defineProperty(exports, "normalizeContentType", {
1856
+ enumerable: true,
1857
+ get: function() {
1858
+ return normalizeContentType;
1859
+ }
1860
+ });
1861
+ Object.defineProperty(exports, "normalizeMSTeamsMessagingTarget", {
1862
+ enumerable: true,
1863
+ get: function() {
1864
+ return normalizeMSTeamsMessagingTarget;
1865
+ }
1866
+ });
1867
+ Object.defineProperty(exports, "normalizeMSTeamsUserInput", {
1868
+ enumerable: true,
1869
+ get: function() {
1870
+ return normalizeMSTeamsUserInput;
1871
+ }
1872
+ });
1873
+ Object.defineProperty(exports, "normalizeQuery", {
1874
+ enumerable: true,
1875
+ get: function() {
1876
+ return normalizeQuery;
1877
+ }
1878
+ });
1879
+ Object.defineProperty(exports, "parseMSTeamsConversationId", {
1880
+ enumerable: true,
1881
+ get: function() {
1882
+ return parseMSTeamsConversationId;
1883
+ }
1884
+ });
1885
+ Object.defineProperty(exports, "parseMSTeamsTeamChannelInput", {
1886
+ enumerable: true,
1887
+ get: function() {
1888
+ return parseMSTeamsTeamChannelInput;
1889
+ }
1890
+ });
1891
+ Object.defineProperty(exports, "parseMSTeamsTeamEntry", {
1892
+ enumerable: true,
1893
+ get: function() {
1894
+ return parseMSTeamsTeamEntry;
1895
+ }
1896
+ });
1897
+ Object.defineProperty(exports, "patchGraphJson", {
1898
+ enumerable: true,
1899
+ get: function() {
1900
+ return patchGraphJson;
1901
+ }
1902
+ });
1903
+ Object.defineProperty(exports, "postGraphBetaJson", {
1904
+ enumerable: true,
1905
+ get: function() {
1906
+ return postGraphBetaJson;
1907
+ }
1908
+ });
1909
+ Object.defineProperty(exports, "postGraphJson", {
1910
+ enumerable: true,
1911
+ get: function() {
1912
+ return postGraphJson;
1913
+ }
1914
+ });
1915
+ Object.defineProperty(exports, "projectStableMSTeamsTeamsConfig", {
1916
+ enumerable: true,
1917
+ get: function() {
1918
+ return projectStableMSTeamsTeamsConfig;
1919
+ }
1920
+ });
1921
+ Object.defineProperty(exports, "projectStableMSTeamsUserAllowlist", {
1922
+ enumerable: true,
1923
+ get: function() {
1924
+ return projectStableMSTeamsUserAllowlist;
1925
+ }
1926
+ });
1927
+ Object.defineProperty(exports, "readAccessToken", {
1928
+ enumerable: true,
1929
+ get: function() {
1930
+ return readAccessToken;
1931
+ }
1932
+ });
1933
+ Object.defineProperty(exports, "resolveAttachmentFetchPolicy", {
1934
+ enumerable: true,
1935
+ get: function() {
1936
+ return resolveAttachmentFetchPolicy;
1937
+ }
1938
+ });
1939
+ Object.defineProperty(exports, "resolveGraphToken", {
1940
+ enumerable: true,
1941
+ get: function() {
1942
+ return resolveGraphToken;
1943
+ }
1944
+ });
1945
+ Object.defineProperty(exports, "resolveMSTeamsChannelAllowlist", {
1946
+ enumerable: true,
1947
+ get: function() {
1948
+ return resolveMSTeamsChannelAllowlist;
1949
+ }
1950
+ });
1951
+ Object.defineProperty(exports, "resolveMSTeamsCredentials", {
1952
+ enumerable: true,
1953
+ get: function() {
1954
+ return resolveMSTeamsCredentials;
1955
+ }
1956
+ });
1957
+ Object.defineProperty(exports, "resolveMSTeamsRequestTimeoutMs", {
1958
+ enumerable: true,
1959
+ get: function() {
1960
+ return resolveMSTeamsRequestTimeoutMs;
1961
+ }
1962
+ });
1963
+ Object.defineProperty(exports, "resolveMSTeamsSdkCloudOptions", {
1964
+ enumerable: true,
1965
+ get: function() {
1966
+ return resolveMSTeamsSdkCloudOptions;
1967
+ }
1968
+ });
1969
+ Object.defineProperty(exports, "resolveMSTeamsSharePointUploadTimeoutMs", {
1970
+ enumerable: true,
1971
+ get: function() {
1972
+ return resolveMSTeamsSharePointUploadTimeoutMs;
1973
+ }
1974
+ });
1975
+ Object.defineProperty(exports, "resolveMSTeamsTeamsConfig", {
1976
+ enumerable: true,
1977
+ get: function() {
1978
+ return resolveMSTeamsTeamsConfig;
1979
+ }
1980
+ });
1981
+ Object.defineProperty(exports, "resolveMSTeamsUserAllowlist", {
1982
+ enumerable: true,
1983
+ get: function() {
1984
+ return resolveMSTeamsUserAllowlist;
1985
+ }
1986
+ });
1987
+ Object.defineProperty(exports, "resolveMediaSsrfPolicy", {
1988
+ enumerable: true,
1989
+ get: function() {
1990
+ return resolveMediaSsrfPolicy;
1991
+ }
1992
+ });
1993
+ Object.defineProperty(exports, "resolveRequestUrl", {
1994
+ enumerable: true,
1995
+ get: function() {
1996
+ return resolveRequestUrl;
1997
+ }
1998
+ });
1999
+ Object.defineProperty(exports, "safeFetchWithPolicy", {
2000
+ enumerable: true,
2001
+ get: function() {
2002
+ return safeFetchWithPolicy;
2003
+ }
2004
+ });
2005
+ Object.defineProperty(exports, "safeHostForUrl", {
2006
+ enumerable: true,
2007
+ get: function() {
2008
+ return safeHostForUrl;
2009
+ }
2010
+ });
2011
+ Object.defineProperty(exports, "saveDelegatedTokens", {
2012
+ enumerable: true,
2013
+ get: function() {
2014
+ return saveDelegatedTokens;
2015
+ }
2016
+ });
2017
+ Object.defineProperty(exports, "searchGraphUsers", {
2018
+ enumerable: true,
2019
+ get: function() {
2020
+ return searchGraphUsers;
2021
+ }
2022
+ });
2023
+ Object.defineProperty(exports, "tryBuildGraphSharesUrlForSharedLink", {
2024
+ enumerable: true,
2025
+ get: function() {
2026
+ return tryBuildGraphSharesUrlForSharedLink;
2027
+ }
2028
+ });
2029
+ Object.defineProperty(exports, "tryNormalizeBotFrameworkServiceUrl", {
2030
+ enumerable: true,
2031
+ get: function() {
2032
+ return tryNormalizeBotFrameworkServiceUrl;
2033
+ }
2034
+ });
2035
+ Object.defineProperty(exports, "validateMSTeamsProactiveServiceUrlBoundary", {
2036
+ enumerable: true,
2037
+ get: function() {
2038
+ return validateMSTeamsProactiveServiceUrlBoundary;
2039
+ }
2040
+ });
2041
+ Object.defineProperty(exports, "withMSTeamsRequestDeadline", {
2042
+ enumerable: true,
2043
+ get: function() {
2044
+ return withMSTeamsRequestDeadline;
2045
+ }
2046
+ });