@openclaw/msteams 2026.6.11 → 2026.7.1-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.
- package/dist/api.js +2 -2
- package/dist/{channel-D6Se2irO.js → channel-CaJsQid7.js} +4 -4
- package/dist/channel-plugin-api.js +1 -1
- package/dist/{channel.runtime-DIplgUVW.js → channel.runtime-BqPrjasT.js} +3 -3
- package/dist/directory-contract-api.js +1 -1
- package/dist/doctor-contract-api.js +1 -3
- package/dist/{oauth-CKGUl-St.js → oauth-DGK31Upm.js} +1 -1
- package/dist/{probe-Cl6_-FSx.js → probe-D97ydJ9C.js} +5 -8
- package/dist/{resolve-allowlist-DlH_aNya.js → resolve-allowlist-F3veKywm.js} +7 -14
- package/dist/setup-plugin-api.js +2 -2
- package/dist/{setup-surface-CuIeEFrR.js → setup-surface-CYmE3fZc.js} +2 -2
- package/dist/{src-DgSUjtxR.js → src-MN-oRGVo.js} +45 -41
- package/node_modules/@types/node/README.md +1 -1
- package/node_modules/@types/node/http2.d.ts +0 -3
- package/node_modules/@types/node/package.json +2 -2
- package/npm-shrinkwrap.json +6 -6
- package/package.json +4 -4
package/dist/api.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { t as msteamsPlugin } from "./channel-
|
|
2
|
-
import { c as msteamsSetupAdapter, n as openDelegatedOAuthUrl, s as createMSTeamsSetupWizardBase, t as msteamsSetupWizard } from "./setup-surface-
|
|
1
|
+
import { t as msteamsPlugin } from "./channel-CaJsQid7.js";
|
|
2
|
+
import { c as msteamsSetupAdapter, n as openDelegatedOAuthUrl, s as createMSTeamsSetupWizardBase, t as msteamsSetupWizard } from "./setup-surface-CYmE3fZc.js";
|
|
3
3
|
export { createMSTeamsSetupWizardBase, msteamsPlugin, msteamsSetupAdapter, msteamsSetupWizard, openDelegatedOAuthUrl };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { DEFAULT_ACCOUNT_ID, PAIRING_APPROVED_MESSAGE, buildChannelKeyCandidates, buildProbeChannelStatusSummary, chunkTextForOutbound, createDefaultChannelRuntimeState, isDangerousNameMatchingEnabled, normalizeChannelSlug, resolveAllowlistMatchSimple, resolveChannelEntryMatchWithFallback, resolveNestedAllowlistDecision, resolveToolsBySender } from "./runtime-api.js";
|
|
2
|
-
import { C as resolveMSTeamsCredentials, a as parseMSTeamsTeamChannelInput, c as resolveMSTeamsUserAllowlist, i as parseMSTeamsConversationId, n as normalizeMSTeamsMessagingTarget, r as normalizeMSTeamsUserInput, s as resolveMSTeamsChannelAllowlist, t as looksLikeMSTeamsTargetId } from "./resolve-allowlist-
|
|
2
|
+
import { C as resolveMSTeamsCredentials, a as parseMSTeamsTeamChannelInput, c as resolveMSTeamsUserAllowlist, i as parseMSTeamsConversationId, n as normalizeMSTeamsMessagingTarget, r as normalizeMSTeamsUserInput, s as resolveMSTeamsChannelAllowlist, t as looksLikeMSTeamsTargetId } from "./resolve-allowlist-F3veKywm.js";
|
|
3
3
|
import { t as MSTeamsChannelConfigSchema } from "./config-schema-BL4qQZiA.js";
|
|
4
|
-
import { c as msteamsSetupAdapter, t as msteamsSetupWizard } from "./setup-surface-
|
|
4
|
+
import { c as msteamsSetupAdapter, t as msteamsSetupWizard } from "./setup-surface-CYmE3fZc.js";
|
|
5
5
|
import { describeAccountSnapshot } from "openclaw/plugin-sdk/account-helpers";
|
|
6
6
|
import { formatAllowFromLowercase } from "openclaw/plugin-sdk/allow-from";
|
|
7
7
|
import { createTopLevelChannelConfigAdapter } from "openclaw/plugin-sdk/channel-config-helpers";
|
|
@@ -336,7 +336,7 @@ const collectMSTeamsSecurityWarnings = createAllowlistProviderGroupPolicyWarning
|
|
|
336
336
|
resolveGroupPolicy: ({ cfg }) => cfg.channels?.msteams?.groupPolicy,
|
|
337
337
|
collect: ({ groupPolicy }) => groupPolicy === "open" ? ["- MS Teams groups: groupPolicy=\"open\" allows any member to trigger (mention-gated). Set channels.msteams.groupPolicy=\"allowlist\" + channels.msteams.groupAllowFrom to restrict senders."] : []
|
|
338
338
|
});
|
|
339
|
-
const loadMSTeamsChannelRuntime = createLazyRuntimeNamedExport(() => import("./channel.runtime-
|
|
339
|
+
const loadMSTeamsChannelRuntime = createLazyRuntimeNamedExport(() => import("./channel.runtime-BqPrjasT.js"), "msTeamsChannelRuntime");
|
|
340
340
|
const resolveMSTeamsChannelConfig = (cfg) => ({
|
|
341
341
|
allowFrom: cfg.channels?.msteams?.allowFrom,
|
|
342
342
|
defaultTo: cfg.channels?.msteams?.defaultTo
|
|
@@ -1131,7 +1131,7 @@ const msteamsPlugin = createChatChannelPlugin({
|
|
|
1131
1131
|
})
|
|
1132
1132
|
}),
|
|
1133
1133
|
gateway: { startAccount: async (ctx) => {
|
|
1134
|
-
const { monitorMSTeamsProvider } = await import("./src-
|
|
1134
|
+
const { monitorMSTeamsProvider } = await import("./src-MN-oRGVo.js");
|
|
1135
1135
|
const port = ctx.cfg.channels?.msteams?.webhook?.port ?? 3978;
|
|
1136
1136
|
ctx.setStatus({
|
|
1137
1137
|
accountId: ctx.accountId,
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as msteamsPlugin } from "./channel-
|
|
1
|
+
import { t as msteamsPlugin } from "./channel-CaJsQid7.js";
|
|
2
2
|
export { msteamsPlugin };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { chunkTextForOutbound, normalizeStringEntries as normalizeStringEntries$1 } from "./runtime-api.js";
|
|
2
|
-
import { _ as patchGraphJson, b as resolveGraphToken, d as escapeOData, f as fetchGraphAbsoluteUrl, g as normalizeQuery, h as listTeamsByName, l as searchGraphUsers, m as listChannelsForTeam, p as fetchGraphJson, u as deleteGraphRequest, v as postGraphBetaJson, y as postGraphJson } from "./resolve-allowlist-
|
|
3
|
-
import { n as MSTEAMS_PRESENTATION_CAPABILITIES, r as buildMSTeamsPresentationCard } from "./channel-
|
|
2
|
+
import { _ as patchGraphJson, b as resolveGraphToken, d as escapeOData, f as fetchGraphAbsoluteUrl, g as normalizeQuery, h as listTeamsByName, l as searchGraphUsers, m as listChannelsForTeam, p as fetchGraphJson, u as deleteGraphRequest, v as postGraphBetaJson, y as postGraphJson } from "./resolve-allowlist-F3veKywm.js";
|
|
3
|
+
import { n as MSTEAMS_PRESENTATION_CAPABILITIES, r as buildMSTeamsPresentationCard } from "./channel-CaJsQid7.js";
|
|
4
4
|
import { l as createMSTeamsPollStoreState, v as createMSTeamsConversationStoreState } from "./polls-C1VgSvKE.js";
|
|
5
|
-
import { a as sendMessageMSTeams, i as sendAdaptiveCardMSTeams, n as deleteMessageMSTeams, o as sendPollMSTeams, r as editMessageMSTeams, t as probeMSTeams } from "./probe-
|
|
5
|
+
import { a as sendMessageMSTeams, i as sendAdaptiveCardMSTeams, n as deleteMessageMSTeams, o as sendPollMSTeams, r as editMessageMSTeams, t as probeMSTeams } from "./probe-D97ydJ9C.js";
|
|
6
6
|
import { resolveOutboundSendDep } from "openclaw/plugin-sdk/channel-outbound";
|
|
7
7
|
import { normalizeLowercaseStringOrEmpty, normalizeStringEntries } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
8
8
|
import { resolvePayloadMediaUrls, resolveTextChunksWithFallback, sendPayloadMediaSequence } from "openclaw/plugin-sdk/reply-payload";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { C as resolveMSTeamsCredentials, n as normalizeMSTeamsMessagingTarget } from "./resolve-allowlist-
|
|
1
|
+
import { C as resolveMSTeamsCredentials, n as normalizeMSTeamsMessagingTarget } from "./resolve-allowlist-F3veKywm.js";
|
|
2
2
|
import { listDirectoryEntriesFromSources } from "openclaw/plugin-sdk/directory-runtime";
|
|
3
3
|
const msteamsDirectoryContractPlugin = {
|
|
4
4
|
id: "msteams",
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { T as normalizeStoredConversationId, _ as buildMSTeamsConversationStateKey, a as MSTEAMS_SQLITE_MAX_POLL_ROWS, b as prepareMSTeamsConversationReferenceForStorage, c as buildMSTeamsPollVoteBucketKey, d as selectMSTeamsPollVoteBucket, f as selectRetainedMSTeamsPolls, g as MSTEAMS_SQLITE_MAX_CONVERSATION_ROWS, h as MSTEAMS_CONVERSATIONS_NAMESPACE, i as MSTEAMS_POLL_VOTE_BUCKETS_NAMESPACE, m as MSTEAMS_CONVERSATIONS_LEGACY_FILENAME, n as MSTEAMS_POLLS_LEGACY_FILENAME, p as splitMSTeamsPoll, r as MSTEAMS_POLLS_NAMESPACE, s as buildMSTeamsPollStateKey, t as MSTEAMS_MAX_POLL_VOTE_BUCKET_ROWS, x as selectRetainedMSTeamsConversations, y as normalizeMSTeamsLegacyConversationStore } from "./polls-C1VgSvKE.js";
|
|
2
2
|
import { a as isMSTeamsSsoStoreData, n as MSTEAMS_SSO_TOKENS_LEGACY_FILENAME, o as makeMSTeamsSsoTokenStoreKey, r as MSTEAMS_SSO_TOKENS_NAMESPACE, s as normalizeMSTeamsSsoStoredToken, t as MSTEAMS_MAX_SSO_TOKENS } from "./sso-token-store-BYZaKr82.js";
|
|
3
|
+
import { isRecord } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
3
4
|
import path from "node:path";
|
|
4
5
|
import crypto from "node:crypto";
|
|
5
6
|
import fs from "node:fs/promises";
|
|
@@ -73,9 +74,6 @@ async function readLegacyJsonFile(filePath, parse) {
|
|
|
73
74
|
return null;
|
|
74
75
|
}
|
|
75
76
|
}
|
|
76
|
-
function isRecord(value) {
|
|
77
|
-
return Boolean(value) && typeof value === "object" && !Array.isArray(value);
|
|
78
|
-
}
|
|
79
77
|
function isStringArray(value) {
|
|
80
78
|
return Array.isArray(value) && value.every((entry) => typeof entry === "string");
|
|
81
79
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { A as MSTEAMS_OAUTH_REDIRECT_URI, D as MSTEAMS_DEFAULT_DELEGATED_SCOPES, E as exchangeMSTeamsCodeForTokens, O as MSTEAMS_OAUTH_CALLBACK_PATH, j as buildMSTeamsAuthEndpoint, k as MSTEAMS_OAUTH_CALLBACK_PORT } from "./resolve-allowlist-
|
|
1
|
+
import { A as MSTEAMS_OAUTH_REDIRECT_URI, D as MSTEAMS_DEFAULT_DELEGATED_SCOPES, E as exchangeMSTeamsCodeForTokens, O as MSTEAMS_OAUTH_CALLBACK_PATH, j as buildMSTeamsAuthEndpoint, k as MSTEAMS_OAUTH_CALLBACK_PORT } from "./resolve-allowlist-F3veKywm.js";
|
|
2
2
|
import { generateHexPkceVerifierChallenge } from "openclaw/plugin-sdk/provider-auth";
|
|
3
3
|
import { generateOAuthState, parseOAuthCallbackInput, waitForLocalOAuthCallback } from "openclaw/plugin-sdk/provider-auth-runtime";
|
|
4
4
|
import { isWSL2Sync } from "openclaw/plugin-sdk/runtime-env";
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { t as getMSTeamsRuntime } from "./runtime-BS5AZrKK.js";
|
|
2
2
|
import { detectMime, extensionForMime, extractOriginalFilename, getFileExtension, loadOutboundMediaFromUrl, normalizeStringEntries as normalizeStringEntries$1, resolveChannelMediaMaxBytes } from "./runtime-api.js";
|
|
3
|
-
import { B as normalizeBotFrameworkServiceUrl, C as resolveMSTeamsCredentials, F as loadMSTeamsSdkWithAuth, H as createMSTeamsHttpError, I as buildUserAgent, M as readAccessToken, P as createMSTeamsTokenProvider, R as describeBotFrameworkServiceUrlHost, S as loadDelegatedTokens, U as resolveMSTeamsSdkCloudOptions, W as validateMSTeamsProactiveServiceUrlBoundary, z as isAllowedBotFrameworkServiceUrl } from "./resolve-allowlist-
|
|
4
|
-
import { a as resolveMSTeamsReplyPolicy, o as resolveMSTeamsRouteConfig } from "./channel-
|
|
5
|
-
import { a as formatUnknownError, i as formatMSTeamsSendErrorHint, o as isRevokedProxyError, r as classifyMSTeamsSendError } from "./setup-surface-
|
|
3
|
+
import { B as normalizeBotFrameworkServiceUrl, C as resolveMSTeamsCredentials, F as loadMSTeamsSdkWithAuth, H as createMSTeamsHttpError, I as buildUserAgent, M as readAccessToken, P as createMSTeamsTokenProvider, R as describeBotFrameworkServiceUrlHost, S as loadDelegatedTokens, U as resolveMSTeamsSdkCloudOptions, W as validateMSTeamsProactiveServiceUrlBoundary, z as isAllowedBotFrameworkServiceUrl } from "./resolve-allowlist-F3veKywm.js";
|
|
4
|
+
import { a as resolveMSTeamsReplyPolicy, o as resolveMSTeamsRouteConfig } from "./channel-CaJsQid7.js";
|
|
5
|
+
import { a as formatUnknownError, i as formatMSTeamsSendErrorHint, o as isRevokedProxyError, r as classifyMSTeamsSendError } from "./setup-surface-CYmE3fZc.js";
|
|
6
6
|
import { C as toPluginJsonValue, S as resolveMSTeamsSqliteStateEnv, o as buildMSTeamsPollCard, v as createMSTeamsConversationStoreState, w as withMSTeamsSqliteMutationLock } from "./polls-C1VgSvKE.js";
|
|
7
7
|
import { createMessageReceiptFromOutboundResults } from "openclaw/plugin-sdk/channel-outbound";
|
|
8
|
+
import { createLazyRuntimeModule } from "openclaw/plugin-sdk/lazy-runtime";
|
|
8
9
|
import { normalizeLowercaseStringOrEmpty, normalizeOptionalLowercaseString } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
9
10
|
import { resolveSendableOutboundReplyParts } from "openclaw/plugin-sdk/reply-payload";
|
|
10
11
|
import { convertMarkdownTables } from "openclaw/plugin-sdk/text-chunking";
|
|
@@ -877,11 +878,7 @@ async function withRevokedProxyFallback(params) {
|
|
|
877
878
|
}
|
|
878
879
|
//#endregion
|
|
879
880
|
//#region extensions/msteams/src/sdk-proactive.ts
|
|
880
|
-
|
|
881
|
-
async function loadMSTeamsApiModule() {
|
|
882
|
-
apiModulePromise ??= import("@microsoft/teams.api");
|
|
883
|
-
return apiModulePromise;
|
|
884
|
-
}
|
|
881
|
+
const loadMSTeamsApiModule = createLazyRuntimeModule(() => import("@microsoft/teams.api"));
|
|
885
882
|
function resolveThreadedConversationId(conversationId, threadActivityId) {
|
|
886
883
|
if (!threadActivityId) return conversationId.split(";")[0] ?? conversationId;
|
|
887
884
|
return `${conversationId.split(";")[0] ?? conversationId};messageid=${threadActivityId}`;
|
|
@@ -2,6 +2,7 @@ import { t as getMSTeamsRuntime } from "./runtime-BS5AZrKK.js";
|
|
|
2
2
|
import { fetchWithSsrFGuard as fetchWithSsrFGuard$1 } from "./runtime-api.js";
|
|
3
3
|
import { createRequire } from "node:module";
|
|
4
4
|
import { mapAllowlistResolutionInputs } from "openclaw/plugin-sdk/allow-from";
|
|
5
|
+
import { createLazyRuntimeModule } from "openclaw/plugin-sdk/lazy-runtime";
|
|
5
6
|
import { isRecord as isRecord$1, normalizeLowercaseStringOrEmpty, normalizeOptionalLowercaseString, normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
6
7
|
import { fetchWithSsrFGuard } from "openclaw/plugin-sdk/ssrf-runtime";
|
|
7
8
|
import { createProviderHttpError, readProviderJsonResponse } from "openclaw/plugin-sdk/provider-http";
|
|
@@ -616,20 +617,12 @@ function ensureUserAgentHeader(headers) {
|
|
|
616
617
|
//#endregion
|
|
617
618
|
//#region extensions/msteams/src/sdk.ts
|
|
618
619
|
const AZURE_IDENTITY_MODULE = "@azure/identity";
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
async function loadSdkModules() {
|
|
626
|
-
sdkAppPromise ??= Promise.all([import("@microsoft/teams.apps"), import("@microsoft/teams.api")]).then(([apps, api]) => ({
|
|
627
|
-
App: apps.App,
|
|
628
|
-
ExpressAdapter: apps.ExpressAdapter,
|
|
629
|
-
cloudFromName: api.cloudFromName
|
|
630
|
-
}));
|
|
631
|
-
return sdkAppPromise;
|
|
632
|
-
}
|
|
620
|
+
const loadAzureIdentity = createLazyRuntimeModule(() => import(AZURE_IDENTITY_MODULE));
|
|
621
|
+
const loadSdkModules = createLazyRuntimeModule(() => Promise.all([import("@microsoft/teams.apps"), import("@microsoft/teams.api")]).then(([apps, api]) => ({
|
|
622
|
+
App: apps.App,
|
|
623
|
+
ExpressAdapter: apps.ExpressAdapter,
|
|
624
|
+
cloudFromName: api.cloudFromName
|
|
625
|
+
})));
|
|
633
626
|
/**
|
|
634
627
|
* Lazily construct an ExpressAdapter that the Teams SDK App can register its
|
|
635
628
|
* routes on. The dynamic import keeps the SDK bundle off the hot startup path
|
package/dist/setup-plugin-api.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { C as resolveMSTeamsCredentials } from "./resolve-allowlist-
|
|
1
|
+
import { C as resolveMSTeamsCredentials } from "./resolve-allowlist-F3veKywm.js";
|
|
2
2
|
import { t as MSTeamsChannelConfigSchema } from "./config-schema-BL4qQZiA.js";
|
|
3
|
-
import { c as msteamsSetupAdapter, t as msteamsSetupWizard } from "./setup-surface-
|
|
3
|
+
import { c as msteamsSetupAdapter, t as msteamsSetupWizard } from "./setup-surface-CYmE3fZc.js";
|
|
4
4
|
import { describeAccountSnapshot } from "openclaw/plugin-sdk/account-helpers";
|
|
5
5
|
import { formatAllowFromLowercase } from "openclaw/plugin-sdk/allow-from";
|
|
6
6
|
import { createTopLevelChannelConfigAdapter } from "openclaw/plugin-sdk/channel-config-helpers";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { C as resolveMSTeamsCredentials, T as normalizeSecretInputString, c as resolveMSTeamsUserAllowlist, o as parseMSTeamsTeamEntry, s as resolveMSTeamsChannelAllowlist, w as saveDelegatedTokens, x as hasConfiguredMSTeamsCredentials } from "./resolve-allowlist-
|
|
1
|
+
import { C as resolveMSTeamsCredentials, T as normalizeSecretInputString, c as resolveMSTeamsUserAllowlist, o as parseMSTeamsTeamEntry, s as resolveMSTeamsChannelAllowlist, w as saveDelegatedTokens, x as hasConfiguredMSTeamsCredentials } from "./resolve-allowlist-F3veKywm.js";
|
|
2
2
|
import { isRecord } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
3
3
|
import { asFiniteNumberInRange, parseStrictFiniteNumber } from "openclaw/plugin-sdk/number-runtime";
|
|
4
4
|
import { DEFAULT_ACCOUNT_ID, createSetupTranslator, createStandardChannelSetupStatus, createTopLevelChannelAllowFromSetter, createTopLevelChannelDmPolicy, createTopLevelChannelGroupPolicySetter, mergeAllowFromEntries, splitSetupEntries } from "openclaw/plugin-sdk/setup";
|
|
@@ -449,7 +449,7 @@ const msteamsSetupWizard = {
|
|
|
449
449
|
}
|
|
450
450
|
};
|
|
451
451
|
try {
|
|
452
|
-
const { loginMSTeamsDelegated } = await import("./oauth-
|
|
452
|
+
const { loginMSTeamsDelegated } = await import("./oauth-DGK31Upm.js");
|
|
453
453
|
const progress = params.prompter.progress(t("wizard.msteams.delegatedOAuthProgress"));
|
|
454
454
|
saveDelegatedTokens(await loginMSTeamsDelegated({
|
|
455
455
|
isRemote: true,
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { n as getOptionalMSTeamsRuntime, t as getMSTeamsRuntime } from "./runtime-BS5AZrKK.js";
|
|
2
2
|
import { DEFAULT_ACCOUNT_ID, DEFAULT_WEBHOOK_MAX_BODY_BYTES, buildMediaPayload, createChannelMessageReplyPipeline, createChannelPairingController, dispatchReplyFromConfigWithSettledDispatcher as dispatchReplyFromConfigWithSettledDispatcher$1, isDangerousNameMatchingEnabled, keepHttpServerTaskAlive, logTypingFailure, mergeAllowlist, resolveChannelMediaMaxBytes, resolveDefaultGroupPolicy, summarizeMapping } from "./runtime-api.js";
|
|
3
|
-
import { $ as inferPlaceholder, C as resolveMSTeamsCredentials, F as loadMSTeamsSdkWithAuth, G as ATTACHMENT_TAG_RE, J as applyAuthorizationHeaderForUrl, K as GRAPH_ROOT, L as ensureUserAgentHeader, N as createMSTeamsExpressAdapter, P as createMSTeamsTokenProvider, Q as extractInlineImageCandidates, U as resolveMSTeamsSdkCloudOptions, V as tryNormalizeBotFrameworkServiceUrl, X as estimateBase64DecodedBytes, Y as encodeGraphShareId, Z as extractHtmlFromAttachment, at as readNestedString, c as resolveMSTeamsUserAllowlist, ct as resolveRequestUrl, dt as tryBuildGraphSharesUrlForSharedLink, et as isDownloadableAttachment, it as normalizeContentType, lt as safeFetchWithPolicy, nt as isRecord$1, ot as resolveAttachmentFetchPolicy, p as fetchGraphJson, q as IMG_SRC_RE, rt as isUrlAllowed, s as resolveMSTeamsChannelAllowlist, st as resolveMediaSsrfPolicy, tt as isLikelyImageAttachment, ut as safeHostForUrl } from "./resolve-allowlist-
|
|
4
|
-
import { a as resolveMSTeamsReplyPolicy, i as resolveMSTeamsAllowlistMatch, o as resolveMSTeamsRouteConfig } from "./channel-
|
|
5
|
-
import { a as formatUnknownError, i as formatMSTeamsSendErrorHint, r as classifyMSTeamsSendError } from "./setup-surface-
|
|
3
|
+
import { $ as inferPlaceholder, C as resolveMSTeamsCredentials, F as loadMSTeamsSdkWithAuth, G as ATTACHMENT_TAG_RE, J as applyAuthorizationHeaderForUrl, K as GRAPH_ROOT, L as ensureUserAgentHeader, N as createMSTeamsExpressAdapter, P as createMSTeamsTokenProvider, Q as extractInlineImageCandidates, U as resolveMSTeamsSdkCloudOptions, V as tryNormalizeBotFrameworkServiceUrl, X as estimateBase64DecodedBytes, Y as encodeGraphShareId, Z as extractHtmlFromAttachment, at as readNestedString, c as resolveMSTeamsUserAllowlist, ct as resolveRequestUrl, dt as tryBuildGraphSharesUrlForSharedLink, et as isDownloadableAttachment, it as normalizeContentType, lt as safeFetchWithPolicy, nt as isRecord$1, ot as resolveAttachmentFetchPolicy, p as fetchGraphJson, q as IMG_SRC_RE, rt as isUrlAllowed, s as resolveMSTeamsChannelAllowlist, st as resolveMediaSsrfPolicy, tt as isLikelyImageAttachment, ut as safeHostForUrl } from "./resolve-allowlist-F3veKywm.js";
|
|
4
|
+
import { a as resolveMSTeamsReplyPolicy, i as resolveMSTeamsAllowlistMatch, o as resolveMSTeamsRouteConfig } from "./channel-CaJsQid7.js";
|
|
5
|
+
import { a as formatUnknownError, i as formatMSTeamsSendErrorHint, r as classifyMSTeamsSendError } from "./setup-surface-CYmE3fZc.js";
|
|
6
6
|
import { l as createMSTeamsPollStoreState, u as extractMSTeamsPollVote, v as createMSTeamsConversationStoreState } from "./polls-C1VgSvKE.js";
|
|
7
7
|
import { i as createMSTeamsSsoTokenStoreFs } from "./sso-token-store-BYZaKr82.js";
|
|
8
|
-
import { _ as buildFileInfoCard, c as renderReplyPayloadsToMessages, d as withRevokedProxyFallback, f as resolveGraphChatId, g as removePendingUploadFs, h as getPendingUploadFs, l as sendMSTeamsMessages, m as removePendingUpload, p as getPendingUpload, s as buildConversationReference, u as sendMSTeamsActivityWithReference, v as parseFileConsentInvoke, y as uploadToConsentUrl } from "./probe-
|
|
8
|
+
import { _ as buildFileInfoCard, c as renderReplyPayloadsToMessages, d as withRevokedProxyFallback, f as resolveGraphChatId, g as removePendingUploadFs, h as getPendingUploadFs, l as sendMSTeamsMessages, m as removePendingUpload, p as getPendingUpload, s as buildConversationReference, u as sendMSTeamsActivityWithReference, v as parseFileConsentInvoke, y as uploadToConsentUrl } from "./probe-D97ydJ9C.js";
|
|
9
9
|
import { formatAllowlistMatchMeta } from "openclaw/plugin-sdk/allow-from";
|
|
10
10
|
import { buildChannelProgressDraftLine, buildChannelProgressDraftLineForEntry, createChannelProgressDraftGate, formatChannelProgressDraftText, isChannelProgressDraftWorkToolName, mergeChannelProgressDraftLine, normalizeChannelProgressDraftLineIdentity, resolveChannelPreviewStreamMode, resolveChannelProgressDraftMaxLines, resolveChannelStreamingBlockEnabled, resolveChannelStreamingPreviewToolProgress, resolveChannelStreamingSuppressDefaultToolProgressMessages } from "openclaw/plugin-sdk/channel-outbound";
|
|
11
11
|
import { isRecord, normalizeLowercaseStringOrEmpty, normalizeOptionalLowercaseString, normalizeOptionalString, uniqueStrings } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
@@ -16,6 +16,7 @@ import path from "node:path";
|
|
|
16
16
|
import { asDateTimestampMs, resolveExpiresAtMsFromDurationMs } from "openclaw/plugin-sdk/number-runtime";
|
|
17
17
|
import { appendRegularFile } from "openclaw/plugin-sdk/security-runtime";
|
|
18
18
|
import crypto from "node:crypto";
|
|
19
|
+
import { sliceUtf16Safe, truncateUtf16Safe } from "openclaw/plugin-sdk/text-utility-runtime";
|
|
19
20
|
import { resolveThreadSessionKeys } from "openclaw/plugin-sdk/routing";
|
|
20
21
|
import { channelIngressRoutes, resolveStableChannelMessageIngress } from "openclaw/plugin-sdk/channel-ingress-runtime";
|
|
21
22
|
import { filterSupplementalContextItems, resolveChannelContextVisibilityMode } from "openclaw/plugin-sdk/context-visibility-runtime";
|
|
@@ -26,7 +27,7 @@ const MAX_RESPONSE_CHARS = 500;
|
|
|
26
27
|
function buildReflectionPrompt(params) {
|
|
27
28
|
const parts = ["A user indicated your previous response wasn't helpful."];
|
|
28
29
|
if (params.thumbedDownResponse) {
|
|
29
|
-
const truncated = params.thumbedDownResponse.length > MAX_RESPONSE_CHARS ? `${params.thumbedDownResponse
|
|
30
|
+
const truncated = params.thumbedDownResponse.length > MAX_RESPONSE_CHARS ? `${truncateUtf16Safe(params.thumbedDownResponse, MAX_RESPONSE_CHARS)}...` : params.thumbedDownResponse;
|
|
30
31
|
parts.push(`\nYour response was:\n> ${truncated}`);
|
|
31
32
|
}
|
|
32
33
|
if (params.userComment) parts.push(`\nUser's comment: "${params.userComment}"`);
|
|
@@ -350,6 +351,35 @@ function wasMSTeamsBotMentioned(activity) {
|
|
|
350
351
|
return (activity.entities ?? []).some((e) => e.type === "mention" && e.mentioned?.id === botId);
|
|
351
352
|
}
|
|
352
353
|
//#endregion
|
|
354
|
+
//#region extensions/msteams/src/adaptive-card-submit.ts
|
|
355
|
+
function extractAdaptiveCardSubmittedData(value) {
|
|
356
|
+
if (!isRecord(value)) return value;
|
|
357
|
+
const action = isRecord(value.action) ? value.action : void 0;
|
|
358
|
+
if (action && normalizeOptionalLowercaseString(action.type) === "action.submit" && "data" in action) return action.data;
|
|
359
|
+
return value;
|
|
360
|
+
}
|
|
361
|
+
function readMSTeamsImBackValue(value) {
|
|
362
|
+
if (!isRecord(value)) return null;
|
|
363
|
+
const msteams = isRecord(value.msteams) ? value.msteams : void 0;
|
|
364
|
+
if (!msteams || normalizeOptionalLowercaseString(msteams.type) !== "imback") return null;
|
|
365
|
+
return normalizeOptionalString(msteams.value) ?? null;
|
|
366
|
+
}
|
|
367
|
+
function serializeMSTeamsAdaptiveCardActionValue(value) {
|
|
368
|
+
const submittedValue = extractAdaptiveCardSubmittedData(value);
|
|
369
|
+
if (typeof submittedValue === "string") {
|
|
370
|
+
const trimmed = submittedValue.trim();
|
|
371
|
+
return trimmed ? trimmed : null;
|
|
372
|
+
}
|
|
373
|
+
const imBackValue = readMSTeamsImBackValue(submittedValue);
|
|
374
|
+
if (imBackValue) return imBackValue;
|
|
375
|
+
if (submittedValue == null) return null;
|
|
376
|
+
try {
|
|
377
|
+
return JSON.stringify(submittedValue);
|
|
378
|
+
} catch {
|
|
379
|
+
return null;
|
|
380
|
+
}
|
|
381
|
+
}
|
|
382
|
+
//#endregion
|
|
353
383
|
//#region extensions/msteams/src/monitor-handler/access.ts
|
|
354
384
|
const msteamsIngressIdentity = {
|
|
355
385
|
key: "sender-id",
|
|
@@ -1326,7 +1356,7 @@ function resolveTeamGroupIdCacheExpiresAt(nowRaw = Date.now()) {
|
|
|
1326
1356
|
function stripHtmlFromTeamsMessage(html) {
|
|
1327
1357
|
let text = html.replace(/<at[^>]*>(.*?)<\/at>/gi, "@$1");
|
|
1328
1358
|
text = text.replace(/<[^>]*>/g, " ");
|
|
1329
|
-
text = text.replace(/&
|
|
1359
|
+
text = text.replace(/</g, "<").replace(/>/g, ">").replace(/"/g, "\"").replace(/'/g, "'").replace(/ /g, " ").replace(/&/g, "&");
|
|
1330
1360
|
return text.replace(/\s+/g, " ").trim();
|
|
1331
1361
|
}
|
|
1332
1362
|
/**
|
|
@@ -1466,7 +1496,7 @@ function summarizeParentMessage(message) {
|
|
|
1466
1496
|
if (!text) return;
|
|
1467
1497
|
return {
|
|
1468
1498
|
sender,
|
|
1469
|
-
text: text.length > PARENT_TEXT_MAX_CHARS ? `${text
|
|
1499
|
+
text: text.length > PARENT_TEXT_MAX_CHARS ? `${truncateUtf16Safe(text, PARENT_TEXT_MAX_CHARS - 1)}…` : text
|
|
1470
1500
|
};
|
|
1471
1501
|
}
|
|
1472
1502
|
/**
|
|
@@ -2327,8 +2357,8 @@ function createMSTeamsMessageHandler(deps) {
|
|
|
2327
2357
|
const attachmentTypes = attachments.map((att) => typeof att.contentType === "string" ? att.contentType : void 0).filter(Boolean).slice(0, 3);
|
|
2328
2358
|
const htmlSummary = summarizeMSTeamsHtmlAttachments(attachments);
|
|
2329
2359
|
log.info("received message", {
|
|
2330
|
-
rawText: rawText
|
|
2331
|
-
text: text
|
|
2360
|
+
rawText: truncateUtf16Safe(rawText, 50),
|
|
2361
|
+
text: truncateUtf16Safe(text, 50),
|
|
2332
2362
|
attachments: attachments.length,
|
|
2333
2363
|
attachmentTypes,
|
|
2334
2364
|
from: from?.id,
|
|
@@ -2512,7 +2542,7 @@ function createMSTeamsMessageHandler(deps) {
|
|
|
2512
2542
|
conversationMessageId,
|
|
2513
2543
|
replyToId: activity.replyToId
|
|
2514
2544
|
});
|
|
2515
|
-
const preview = rawBody.replace(/\s+/g, " ")
|
|
2545
|
+
const preview = sliceUtf16Safe(rawBody.replace(/\s+/g, " "), 0, 160);
|
|
2516
2546
|
const inboundLabel = isDirectMessage ? `Teams DM from ${senderName}` : `Teams message in ${conversationType} from ${senderName}`;
|
|
2517
2547
|
const enqueuePrimaryMessageSystemEvent = () => core.system.enqueueSystemEvent(inboundLabel, {
|
|
2518
2548
|
sessionKey: route.sessionKey,
|
|
@@ -2884,7 +2914,8 @@ function createMSTeamsMessageHandler(deps) {
|
|
|
2884
2914
|
const attachments = Array.isArray(activity.attachments) ? activity.attachments : [];
|
|
2885
2915
|
const rawText = activity.text?.trim() ?? "";
|
|
2886
2916
|
const htmlText = extractTextFromHtmlAttachments(attachments);
|
|
2887
|
-
const
|
|
2917
|
+
const valueText = rawText || htmlText ? "" : serializeMSTeamsAdaptiveCardActionValue(activity.value);
|
|
2918
|
+
const text = stripMSTeamsMentionTags(rawText || htmlText || valueText || "");
|
|
2888
2919
|
const wasMentioned = wasMSTeamsBotMentioned(activity);
|
|
2889
2920
|
const conversationId = normalizeMSTeamsConversationId(activity.conversation?.id ?? "");
|
|
2890
2921
|
const replyToId = activity.replyToId ?? void 0;
|
|
@@ -3011,8 +3042,8 @@ function buildWelcomeCard(options) {
|
|
|
3011
3042
|
body: [{
|
|
3012
3043
|
type: "TextBlock",
|
|
3013
3044
|
text: `Hi! I'm ${botName}.`,
|
|
3014
|
-
weight: "
|
|
3015
|
-
size: "
|
|
3045
|
+
weight: "Bolder",
|
|
3046
|
+
size: "Medium"
|
|
3016
3047
|
}, {
|
|
3017
3048
|
type: "TextBlock",
|
|
3018
3049
|
text: "I can help you with questions, tasks, and more. Here are some things to try:",
|
|
@@ -3037,33 +3068,6 @@ function buildGroupWelcomeText(botName) {
|
|
|
3037
3068
|
}
|
|
3038
3069
|
//#endregion
|
|
3039
3070
|
//#region extensions/msteams/src/monitor-handler.ts
|
|
3040
|
-
function extractAdaptiveCardSubmittedData(value) {
|
|
3041
|
-
if (!isRecord(value)) return value;
|
|
3042
|
-
const action = isRecord(value.action) ? value.action : void 0;
|
|
3043
|
-
if (action && normalizeOptionalLowercaseString(action.type) === "action.submit" && "data" in action) return action.data;
|
|
3044
|
-
return value;
|
|
3045
|
-
}
|
|
3046
|
-
function readMSTeamsImBackValue(value) {
|
|
3047
|
-
if (!isRecord(value)) return null;
|
|
3048
|
-
const msteams = isRecord(value.msteams) ? value.msteams : void 0;
|
|
3049
|
-
if (!msteams || normalizeOptionalLowercaseString(msteams.type) !== "imback") return null;
|
|
3050
|
-
return normalizeOptionalString(msteams.value) ?? null;
|
|
3051
|
-
}
|
|
3052
|
-
function serializeAdaptiveCardActionValue(value) {
|
|
3053
|
-
const submittedValue = extractAdaptiveCardSubmittedData(value);
|
|
3054
|
-
if (typeof submittedValue === "string") {
|
|
3055
|
-
const trimmed = submittedValue.trim();
|
|
3056
|
-
return trimmed ? trimmed : null;
|
|
3057
|
-
}
|
|
3058
|
-
const imBackValue = readMSTeamsImBackValue(submittedValue);
|
|
3059
|
-
if (imBackValue) return imBackValue;
|
|
3060
|
-
if (submittedValue == null) return null;
|
|
3061
|
-
try {
|
|
3062
|
-
return JSON.stringify(submittedValue);
|
|
3063
|
-
} catch {
|
|
3064
|
-
return null;
|
|
3065
|
-
}
|
|
3066
|
-
}
|
|
3067
3071
|
async function isInvokeAuthorized(params) {
|
|
3068
3072
|
const { context, deps, deniedLogs, includeInvokeName = false } = params;
|
|
3069
3073
|
const resolved = await resolveMSTeamsSenderAccess({
|
|
@@ -3142,7 +3146,7 @@ function registerMSTeamsHandlers(handler, deps) {
|
|
|
3142
3146
|
if (originalRun) handler.run = async (context) => {
|
|
3143
3147
|
const ctx = context;
|
|
3144
3148
|
if (ctx.activity?.type === "invoke" && ctx.activity?.name === "adaptiveCard/action") {
|
|
3145
|
-
const text =
|
|
3149
|
+
const text = serializeMSTeamsAdaptiveCardActionValue(ctx.activity?.value);
|
|
3146
3150
|
if (text) await handleTeamsMessage({
|
|
3147
3151
|
...ctx,
|
|
3148
3152
|
activity: {
|
|
@@ -8,7 +8,7 @@ This package contains type definitions for node (https://nodejs.org/).
|
|
|
8
8
|
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node.
|
|
9
9
|
|
|
10
10
|
### Additional Details
|
|
11
|
-
* Last updated:
|
|
11
|
+
* Last updated: Tue, 19 May 2026 17:48:56 GMT
|
|
12
12
|
* Dependencies: [undici-types](https://npmjs.com/package/undici-types)
|
|
13
13
|
|
|
14
14
|
# Credits
|
|
@@ -582,7 +582,6 @@ declare module "node:http2" {
|
|
|
582
582
|
maxConcurrentStreams?: number | undefined;
|
|
583
583
|
maxHeaderListSize?: number | undefined;
|
|
584
584
|
enableConnectProtocol?: boolean | undefined;
|
|
585
|
-
customSettings?: { [key: number]: number };
|
|
586
585
|
}
|
|
587
586
|
interface ClientSessionRequestOptions {
|
|
588
587
|
endStream?: boolean | undefined;
|
|
@@ -1241,8 +1240,6 @@ declare module "node:http2" {
|
|
|
1241
1240
|
Http2Request extends typeof Http2ServerRequest = typeof Http2ServerRequest,
|
|
1242
1241
|
Http2Response extends typeof Http2ServerResponse<InstanceType<Http2Request>> = typeof Http2ServerResponse,
|
|
1243
1242
|
> extends SessionOptions {
|
|
1244
|
-
maxSessionRejectedStreams?: number | undefined;
|
|
1245
|
-
maxSessionInvalidFrames?: number | undefined;
|
|
1246
1243
|
streamResetBurst?: number | undefined;
|
|
1247
1244
|
streamResetRate?: number | undefined;
|
|
1248
1245
|
/** @deprecated Use `http1Options.IncomingMessage` instead. */
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@types/node",
|
|
3
|
-
"version": "25.9.
|
|
3
|
+
"version": "25.9.1",
|
|
4
4
|
"description": "TypeScript definitions for node",
|
|
5
5
|
"homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node",
|
|
6
6
|
"license": "MIT",
|
|
@@ -150,6 +150,6 @@
|
|
|
150
150
|
"undici-types": ">=7.24.0 <7.24.7"
|
|
151
151
|
},
|
|
152
152
|
"peerDependencies": {},
|
|
153
|
-
"typesPublisherContentHash": "
|
|
153
|
+
"typesPublisherContentHash": "2546f5f588e15fc9aa202a3005dab2859d006fd48a8448107741e5ce184e9098",
|
|
154
154
|
"typeScriptVersion": "5.3"
|
|
155
155
|
}
|
package/npm-shrinkwrap.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openclaw/msteams",
|
|
3
|
-
"version": "2026.
|
|
3
|
+
"version": "2026.7.1-beta.2",
|
|
4
4
|
"lockfileVersion": 3,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "@openclaw/msteams",
|
|
9
|
-
"version": "2026.
|
|
9
|
+
"version": "2026.7.1-beta.2",
|
|
10
10
|
"dependencies": {
|
|
11
11
|
"@azure/identity": "4.13.1",
|
|
12
12
|
"@microsoft/teams.api": "2.0.12",
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
"typebox": "1.1.39"
|
|
16
16
|
},
|
|
17
17
|
"peerDependencies": {
|
|
18
|
-
"openclaw": ">=2026.
|
|
18
|
+
"openclaw": ">=2026.7.1-beta.2"
|
|
19
19
|
},
|
|
20
20
|
"peerDependenciesMeta": {
|
|
21
21
|
"openclaw": {
|
|
@@ -290,9 +290,9 @@
|
|
|
290
290
|
"license": "MIT"
|
|
291
291
|
},
|
|
292
292
|
"node_modules/@types/node": {
|
|
293
|
-
"version": "25.9.
|
|
294
|
-
"resolved": "https://registry.npmjs.org/@types/node/-/node-25.9.
|
|
295
|
-
"integrity": "sha512-
|
|
293
|
+
"version": "25.9.1",
|
|
294
|
+
"resolved": "https://registry.npmjs.org/@types/node/-/node-25.9.1.tgz",
|
|
295
|
+
"integrity": "sha512-xfrlY7UD5rMJk3ZVJP8BNzS28J36YJg+xp+LPXV1TdWxr8uMH5A860QNxYDGQe/ylDSgjxE52Q9VnO7p75tJxg==",
|
|
296
296
|
"license": "MIT",
|
|
297
297
|
"dependencies": {
|
|
298
298
|
"undici-types": ">=7.24.0 <7.24.7"
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openclaw/msteams",
|
|
3
|
-
"version": "2026.
|
|
3
|
+
"version": "2026.7.1-beta.2",
|
|
4
4
|
"description": "OpenClaw Microsoft Teams channel plugin for bot conversations.",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
"typebox": "1.1.39"
|
|
16
16
|
},
|
|
17
17
|
"peerDependencies": {
|
|
18
|
-
"openclaw": ">=2026.
|
|
18
|
+
"openclaw": ">=2026.7.1-beta.2"
|
|
19
19
|
},
|
|
20
20
|
"peerDependenciesMeta": {
|
|
21
21
|
"openclaw": {
|
|
@@ -51,10 +51,10 @@
|
|
|
51
51
|
"minHostVersion": ">=2026.4.10"
|
|
52
52
|
},
|
|
53
53
|
"compat": {
|
|
54
|
-
"pluginApi": ">=2026.
|
|
54
|
+
"pluginApi": ">=2026.7.1-beta.2"
|
|
55
55
|
},
|
|
56
56
|
"build": {
|
|
57
|
-
"openclawVersion": "2026.
|
|
57
|
+
"openclawVersion": "2026.7.1-beta.2"
|
|
58
58
|
},
|
|
59
59
|
"release": {
|
|
60
60
|
"publishToClawHub": true,
|