@openclaw/msteams 2026.8.1-beta.3 → 2026.8.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/{adapter.runtime-8g-MOPfb.cjs → adapter.runtime-DDuc7sKJ.cjs} +1 -1
- package/dist/api.cjs +2 -2
- package/dist/approval-card-BEblaIto.cjs +303 -0
- package/dist/approval-handler.runtime-C0AWNWXk.cjs +107 -0
- package/dist/{channel-KpWENcgK.cjs → channel-DLn4b6Qi.cjs} +168 -53
- package/dist/channel-config-api.cjs +1 -1
- package/dist/channel-plugin-api.cjs +1 -1
- package/dist/{channel.runtime-Bkzj8jZ0.cjs → channel.runtime-1mH99ZAm.cjs} +49 -608
- package/dist/{channel.setup-mOFtsfYz.cjs → channel.setup-BRbhaigB.cjs} +29 -18
- package/dist/{config-schema-C4CszdDi.cjs → config-schema-MyN2lamA.cjs} +12 -11
- package/dist/configured-state.cjs +20 -0
- package/dist/directory-contract-api.cjs +1 -1
- package/dist/doctor-contract-api.cjs +79 -42
- package/dist/{messenger-IISPSOvj.cjs → messenger-flkiAkkB.cjs} +29 -171
- package/dist/{oauth-C9So7uld.cjs → oauth-Bctn-WPI.cjs} +4 -3
- package/dist/{polls-DvuJvaDG.cjs → polls-P86qBpeV.cjs} +5 -4
- package/dist/qa-runner-api.cjs +1 -1
- package/dist/reaction-types-CL79V_5D.cjs +150 -0
- package/dist/{resolve-allowlist-CIfWUwuc.cjs → resolve-allowlist-BrdWKHE-.cjs} +26 -51
- package/dist/{rolldown-runtime-D6vf50IK.cjs → rolldown-runtime-VH7oDXx4.cjs} +1 -1
- package/dist/runtime-api.cjs +2 -1
- package/dist/secret-input-C65t6kjM.cjs +1 -0
- package/dist/send-C4BjzS1F.cjs +631 -0
- package/dist/setup-plugin-api.cjs +1 -1
- package/dist/{src-C127-DcQ.cjs → src-RSjkJRjI.cjs} +237 -99
- package/dist/{sso-token-store-ChhO1f4i.cjs → sso-token-store-CNbRhz-A.cjs} +1 -1
- package/dist/thread-session-DxOri69r.cjs +63 -0
- package/package.json +13 -11
|
@@ -1,28 +1,31 @@
|
|
|
1
1
|
require("./runtime-api.cjs");
|
|
2
|
-
const require_resolve_allowlist = require("./resolve-allowlist-
|
|
2
|
+
const require_resolve_allowlist = require("./resolve-allowlist-BrdWKHE-.cjs");
|
|
3
3
|
const require_directory_contract_api = require("./directory-contract-api.cjs");
|
|
4
|
-
const
|
|
4
|
+
const require_thread_session = require("./thread-session-DxOri69r.cjs");
|
|
5
|
+
const require_channel_setup = require("./channel.setup-BRbhaigB.cjs");
|
|
6
|
+
let openclaw_plugin_sdk_approval_handler_adapter_runtime = require("openclaw/plugin-sdk/approval-handler-adapter-runtime");
|
|
5
7
|
let openclaw_plugin_sdk_channel_core = require("openclaw/plugin-sdk/channel-core");
|
|
6
8
|
let openclaw_plugin_sdk_channel_outbound = require("openclaw/plugin-sdk/channel-outbound");
|
|
7
9
|
let openclaw_plugin_sdk_channel_pairing = require("openclaw/plugin-sdk/channel-pairing");
|
|
8
10
|
let openclaw_plugin_sdk_channel_policy = require("openclaw/plugin-sdk/channel-policy");
|
|
11
|
+
let openclaw_plugin_sdk_channel_runtime_context = require("openclaw/plugin-sdk/channel-runtime-context");
|
|
9
12
|
let openclaw_plugin_sdk_directory_runtime = require("openclaw/plugin-sdk/directory-runtime");
|
|
10
13
|
let openclaw_plugin_sdk_interactive_runtime = require("openclaw/plugin-sdk/interactive-runtime");
|
|
11
14
|
let openclaw_plugin_sdk_lazy_runtime = require("openclaw/plugin-sdk/lazy-runtime");
|
|
12
15
|
let openclaw_plugin_sdk_status_helpers = require("openclaw/plugin-sdk/status-helpers");
|
|
13
16
|
let openclaw_plugin_sdk_string_coerce_runtime = require("openclaw/plugin-sdk/string-coerce-runtime");
|
|
14
17
|
let typebox = require("typebox");
|
|
18
|
+
let openclaw_plugin_sdk_account_id = require("openclaw/plugin-sdk/account-id");
|
|
15
19
|
let openclaw_plugin_sdk_reply_reference = require("openclaw/plugin-sdk/reply-reference");
|
|
16
|
-
let
|
|
20
|
+
let openclaw_plugin_sdk_approval_delivery_runtime = require("openclaw/plugin-sdk/approval-delivery-runtime");
|
|
21
|
+
let openclaw_plugin_sdk_approval_native_runtime = require("openclaw/plugin-sdk/approval-native-runtime");
|
|
17
22
|
let openclaw_plugin_sdk_channel_actions = require("openclaw/plugin-sdk/channel-actions");
|
|
18
|
-
let openclaw_plugin_sdk_routing = require("openclaw/plugin-sdk/routing");
|
|
19
23
|
let openclaw_plugin_sdk_channel_targets = require("openclaw/plugin-sdk/channel-targets");
|
|
20
24
|
let openclaw_plugin_sdk_allow_from = require("openclaw/plugin-sdk/allow-from");
|
|
21
25
|
let openclaw_plugin_sdk_dangerous_name_runtime = require("openclaw/plugin-sdk/dangerous-name-runtime");
|
|
22
26
|
let openclaw_plugin_sdk_runtime_group_policy = require("openclaw/plugin-sdk/runtime-group-policy");
|
|
23
27
|
let openclaw_plugin_sdk_text_chunking = require("openclaw/plugin-sdk/text-chunking");
|
|
24
28
|
let openclaw_plugin_sdk_channel_status = require("openclaw/plugin-sdk/channel-status");
|
|
25
|
-
let openclaw_plugin_sdk_account_id = require("openclaw/plugin-sdk/account-id");
|
|
26
29
|
//#region extensions/msteams/src/policy.ts
|
|
27
30
|
const teamScopeKey = (teamKey) => (0, openclaw_plugin_sdk_channel_policy.scopeKey)(["team", teamKey]);
|
|
28
31
|
const channelScopeKey = (teamKey, channelKey) => (0, openclaw_plugin_sdk_channel_policy.scopeKey)(["team", teamKey], ["channel", channelKey]);
|
|
@@ -102,18 +105,20 @@ function resolveMSTeamsRouteConfig(params) {
|
|
|
102
105
|
const channelName = params.channelName?.trim();
|
|
103
106
|
const teams = params.cfg?.teams ?? {};
|
|
104
107
|
const allowlistConfigured = Object.keys(teams).length > 0;
|
|
108
|
+
const teamCandidates = (0, openclaw_plugin_sdk_channel_targets.buildChannelKeyCandidates)(teamId, params.allowNameMatching ? teamName : void 0, params.allowNameMatching && teamName ? (0, openclaw_plugin_sdk_channel_targets.normalizeChannelSlug)(teamName) : void 0);
|
|
105
109
|
const teamMatch = (0, openclaw_plugin_sdk_channel_targets.resolveChannelEntryMatchWithFallback)({
|
|
106
110
|
entries: teams,
|
|
107
|
-
keys:
|
|
111
|
+
keys: teamCandidates,
|
|
108
112
|
wildcardKey: "*",
|
|
109
113
|
normalizeKey: openclaw_plugin_sdk_channel_targets.normalizeChannelSlug
|
|
110
114
|
});
|
|
111
115
|
const teamConfig = teamMatch.entry;
|
|
112
116
|
const channels = teamConfig?.channels ?? {};
|
|
113
117
|
const channelAllowlistConfigured = Object.keys(channels).length > 0;
|
|
118
|
+
const channelCandidates = (0, openclaw_plugin_sdk_channel_targets.buildChannelKeyCandidates)(conversationId, params.allowNameMatching ? channelName : void 0, params.allowNameMatching && channelName ? (0, openclaw_plugin_sdk_channel_targets.normalizeChannelSlug)(channelName) : void 0);
|
|
114
119
|
const channelMatch = (0, openclaw_plugin_sdk_channel_targets.resolveChannelEntryMatchWithFallback)({
|
|
115
120
|
entries: channels,
|
|
116
|
-
keys:
|
|
121
|
+
keys: channelCandidates,
|
|
117
122
|
wildcardKey: "*",
|
|
118
123
|
normalizeKey: openclaw_plugin_sdk_channel_targets.normalizeChannelSlug
|
|
119
124
|
});
|
|
@@ -155,11 +160,12 @@ function resolveMSTeamsGroupToolPolicy(params) {
|
|
|
155
160
|
});
|
|
156
161
|
if (resolved !== void 0) return resolved;
|
|
157
162
|
if (scope.path.length > 1) return;
|
|
163
|
+
const scanScope = resolveMSTeamsCrossTeamScanScope({
|
|
164
|
+
cfg,
|
|
165
|
+
groupId: params.groupId
|
|
166
|
+
});
|
|
158
167
|
return (0, openclaw_plugin_sdk_channel_policy.resolveScopeToolsPolicy)({
|
|
159
|
-
...
|
|
160
|
-
cfg,
|
|
161
|
-
groupId: params.groupId
|
|
162
|
-
}),
|
|
168
|
+
...scanScope,
|
|
163
169
|
...senderScope
|
|
164
170
|
});
|
|
165
171
|
}
|
|
@@ -249,32 +255,123 @@ function resolveMSTeamsAutoThreadId(params) {
|
|
|
249
255
|
return context.currentThreadTs;
|
|
250
256
|
}
|
|
251
257
|
//#endregion
|
|
252
|
-
//#region extensions/msteams/src/approval-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
const
|
|
256
|
-
|
|
257
|
-
return id && MSTEAMS_ID_RE.test(id) ? id : void 0;
|
|
258
|
-
}
|
|
259
|
-
function resolveMSTeamsChannelConfig(cfg) {
|
|
260
|
-
return cfg.channels?.msteams;
|
|
258
|
+
//#region extensions/msteams/src/approval-native.ts
|
|
259
|
+
function isMSTeamsApprovalTransportEnabled(params) {
|
|
260
|
+
if (params.accountId && (0, openclaw_plugin_sdk_account_id.normalizeAccountId)(params.accountId) !== openclaw_plugin_sdk_account_id.DEFAULT_ACCOUNT_ID) return false;
|
|
261
|
+
const account = require_channel_setup.resolveMSTeamsAccount(params.cfg);
|
|
262
|
+
return account.enabled && account.configured && account.tokenStatus === "available";
|
|
261
263
|
}
|
|
262
|
-
const
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
264
|
+
const msTeamsMessagingTargetResolvers = (0, openclaw_plugin_sdk_approval_native_runtime.createNativeApprovalMessagingTargetResolvers)({
|
|
265
|
+
channel: "msteams",
|
|
266
|
+
normalizeTo: require_resolve_allowlist.normalizeMSTeamsMessagingTarget
|
|
267
|
+
});
|
|
268
|
+
const msTeamsApprovalTargetResolvers = {
|
|
269
|
+
...msTeamsMessagingTargetResolvers,
|
|
270
|
+
resolveTurnSourceTarget: (request) => {
|
|
271
|
+
const target = msTeamsMessagingTargetResolvers.resolveTurnSourceTarget(request);
|
|
272
|
+
return target ? {
|
|
273
|
+
...target,
|
|
274
|
+
threadId: request.request.turnSourceThreadId ?? null
|
|
275
|
+
} : null;
|
|
270
276
|
},
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
277
|
+
resolveSessionTarget: (sessionTarget) => {
|
|
278
|
+
const target = msTeamsMessagingTargetResolvers.resolveSessionTarget(sessionTarget);
|
|
279
|
+
return target ? {
|
|
280
|
+
...target,
|
|
281
|
+
threadId: sessionTarget.threadId ?? null
|
|
282
|
+
} : null;
|
|
283
|
+
}
|
|
284
|
+
};
|
|
285
|
+
const msTeamsApprovalRouteGates = (0, openclaw_plugin_sdk_approval_native_runtime.createNativeApprovalChannelRouteGates)({
|
|
286
|
+
channel: "msteams",
|
|
287
|
+
defaultForwardingMode: "session",
|
|
288
|
+
isTransportEnabled: isMSTeamsApprovalTransportEnabled,
|
|
289
|
+
listAccountIds: require_channel_setup.msteamsConfigAdapter.listAccountIds,
|
|
290
|
+
resolveDefaultAccountId: () => openclaw_plugin_sdk_account_id.DEFAULT_ACCOUNT_ID,
|
|
291
|
+
normalizeForwardTarget: msTeamsApprovalTargetResolvers.normalizeForwardTarget,
|
|
292
|
+
resolveTurnSourceTarget: msTeamsApprovalTargetResolvers.resolveTurnSourceTarget
|
|
293
|
+
});
|
|
294
|
+
function isMSTeamsNativeApprovalClientEnabled(params) {
|
|
295
|
+
return msTeamsApprovalRouteGates.canAnyApprovalPotentiallyRouteToChannel({
|
|
296
|
+
...params,
|
|
297
|
+
nativeSessionOnly: true
|
|
298
|
+
}) && require_thread_session.getMSTeamsApprovalApprovers(params).length > 0;
|
|
299
|
+
}
|
|
300
|
+
function shouldHandleMSTeamsNativeApprovalRequest(params) {
|
|
301
|
+
return msTeamsApprovalRouteGates.shouldHandleApprovalRequest(params) && require_thread_session.getMSTeamsApprovalApprovers(params).length > 0 && Boolean(msTeamsApprovalTargetResolvers.resolveTurnSourceTarget(params.request));
|
|
302
|
+
}
|
|
303
|
+
function shouldSuppressLocalMSTeamsExecApprovalPrompt(params) {
|
|
304
|
+
return (0, openclaw_plugin_sdk_approval_native_runtime.shouldSuppressLocalNativeExecApprovalPrompt)({
|
|
305
|
+
...params,
|
|
306
|
+
isNativeDeliveryEnabled: isMSTeamsNativeApprovalClientEnabled
|
|
307
|
+
});
|
|
308
|
+
}
|
|
309
|
+
const resolveMSTeamsOriginTarget = (0, openclaw_plugin_sdk_approval_native_runtime.createChannelNativeOriginTargetResolver)({
|
|
310
|
+
channel: "msteams",
|
|
311
|
+
shouldHandleRequest: shouldHandleMSTeamsNativeApprovalRequest,
|
|
312
|
+
resolveTurnSourceTarget: msTeamsApprovalTargetResolvers.resolveTurnSourceTarget,
|
|
313
|
+
resolveSessionTarget: msTeamsApprovalTargetResolvers.resolveSessionTarget,
|
|
314
|
+
normalizeTarget: msTeamsApprovalTargetResolvers.normalizeTarget
|
|
315
|
+
});
|
|
316
|
+
const msTeamsLazyApprovalNativeRuntime = (0, openclaw_plugin_sdk_approval_handler_adapter_runtime.createLazyChannelApprovalNativeRuntimeAdapter)({
|
|
317
|
+
eventKinds: ["exec", "plugin"],
|
|
318
|
+
isConfigured: ({ cfg, accountId }) => isMSTeamsNativeApprovalClientEnabled({
|
|
319
|
+
cfg,
|
|
320
|
+
accountId
|
|
321
|
+
}),
|
|
322
|
+
shouldHandle: ({ cfg, accountId, approvalKind, request }) => shouldHandleMSTeamsNativeApprovalRequest({
|
|
323
|
+
cfg,
|
|
324
|
+
accountId,
|
|
325
|
+
approvalKind,
|
|
326
|
+
request
|
|
327
|
+
}),
|
|
328
|
+
load: async () => {
|
|
329
|
+
const { msTeamsApprovalNativeRuntime } = await Promise.resolve().then(() => require("./approval-handler.runtime-C0AWNWXk.cjs"));
|
|
330
|
+
return msTeamsApprovalNativeRuntime;
|
|
276
331
|
}
|
|
277
|
-
})
|
|
332
|
+
});
|
|
333
|
+
const resolveMSTeamsApproverDmTargets = (0, openclaw_plugin_sdk_approval_native_runtime.createChannelApproverDmTargetResolver)({
|
|
334
|
+
shouldHandleRequest: shouldHandleMSTeamsNativeApprovalRequest,
|
|
335
|
+
resolveApprovers: require_thread_session.getMSTeamsApprovalApprovers,
|
|
336
|
+
mapApprover: (approver, params) => ({
|
|
337
|
+
to: `user:${approver}`,
|
|
338
|
+
accountId: (0, openclaw_plugin_sdk_string_coerce_runtime.normalizeOptionalString)(params.accountId)
|
|
339
|
+
})
|
|
340
|
+
});
|
|
341
|
+
const msTeamsApprovalCapability = {
|
|
342
|
+
...(0, openclaw_plugin_sdk_approval_delivery_runtime.createApproverRestrictedNativeApprovalCapability)({
|
|
343
|
+
channel: "msteams",
|
|
344
|
+
channelLabel: "Microsoft Teams",
|
|
345
|
+
describeExecApprovalSetup: () => "Approve it from the Web UI or terminal UI for now. Microsoft Teams supports native approvals when the bot is configured. Configure `channels.msteams.allowFrom` or `channels.msteams.defaultTo` with Microsoft Entra object ID approvers.",
|
|
346
|
+
listAccountIds: require_channel_setup.msteamsConfigAdapter.listAccountIds,
|
|
347
|
+
hasApprovers: ({ cfg, accountId }) => require_thread_session.getMSTeamsApprovalApprovers({
|
|
348
|
+
cfg,
|
|
349
|
+
accountId
|
|
350
|
+
}).length > 0,
|
|
351
|
+
isExecAuthorizedSender: ({ cfg, accountId, senderId }) => require_thread_session.msTeamsApprovalAuth.authorizeActorAction?.({
|
|
352
|
+
cfg,
|
|
353
|
+
accountId,
|
|
354
|
+
senderId,
|
|
355
|
+
action: "approve",
|
|
356
|
+
approvalKind: "exec"
|
|
357
|
+
})?.authorized ?? false,
|
|
358
|
+
isPluginAuthorizedSender: ({ cfg, accountId, senderId }) => require_thread_session.msTeamsApprovalAuth.authorizeActorAction?.({
|
|
359
|
+
cfg,
|
|
360
|
+
accountId,
|
|
361
|
+
senderId,
|
|
362
|
+
action: "approve",
|
|
363
|
+
approvalKind: "plugin"
|
|
364
|
+
})?.authorized ?? false,
|
|
365
|
+
isNativeDeliveryEnabled: isMSTeamsNativeApprovalClientEnabled,
|
|
366
|
+
resolveNativeDeliveryMode: () => "channel",
|
|
367
|
+
requireMatchingTurnSourceChannel: true,
|
|
368
|
+
resolveSuppressionAccountId: ({ target, request }) => (0, openclaw_plugin_sdk_string_coerce_runtime.normalizeOptionalString)(target.accountId) ?? (0, openclaw_plugin_sdk_string_coerce_runtime.normalizeOptionalString)(request.request.turnSourceAccountId),
|
|
369
|
+
resolveOriginTarget: resolveMSTeamsOriginTarget,
|
|
370
|
+
resolveApproverDmTargets: resolveMSTeamsApproverDmTargets,
|
|
371
|
+
nativeRuntime: msTeamsLazyApprovalNativeRuntime
|
|
372
|
+
}),
|
|
373
|
+
authorizeActorAction: (params) => require_thread_session.msTeamsApprovalAuth.authorizeActorAction?.(params)
|
|
374
|
+
};
|
|
278
375
|
//#endregion
|
|
279
376
|
//#region extensions/msteams/src/doctor.ts
|
|
280
377
|
const isMSTeamsMutableAllowEntry = (0, openclaw_plugin_sdk_channel_policy.buildMutableAllowEntryDetector)({
|
|
@@ -469,7 +566,8 @@ async function resolveConfiguredBotFrameworkTeamKey(cfg, graphTeamId) {
|
|
|
469
566
|
if (!configuredTeams) return;
|
|
470
567
|
const stableConfiguredKeys = Object.keys(configuredTeams).filter((teamKey) => teamKey !== "*" && /^19:.+@thread\./i.test(teamKey));
|
|
471
568
|
if (stableConfiguredKeys.length === 0) return;
|
|
472
|
-
const
|
|
569
|
+
const token = await require_resolve_allowlist.resolveGraphToken(cfg);
|
|
570
|
+
const channelResult = await require_resolve_allowlist.listChannelsForTeamWithPageInfo(token, graphTeamId);
|
|
473
571
|
if (channelResult.truncated) return;
|
|
474
572
|
const channelIds = new Set(channelResult.items.map((channel) => channel.id?.trim()).filter((channelId) => Boolean(channelId)));
|
|
475
573
|
const matches = stableConfiguredKeys.filter((teamKey) => channelIds.has(teamKey));
|
|
@@ -601,18 +699,6 @@ async function assertMSTeamsTeamEnumerationAllowed(params) {
|
|
|
601
699
|
return stableTeamId;
|
|
602
700
|
}
|
|
603
701
|
//#endregion
|
|
604
|
-
//#region extensions/msteams/src/monitor-handler/thread-session.ts
|
|
605
|
-
const TRAILING_THREAD_SUFFIX = /(?::thread:[^:]+)+$/;
|
|
606
|
-
function resolveMSTeamsRouteSessionKey(params) {
|
|
607
|
-
const channelThreadId = params.isChannel ? params.conversationMessageId ?? params.replyToId ?? void 0 : void 0;
|
|
608
|
-
const cleanBase = params.baseSessionKey.replace(TRAILING_THREAD_SUFFIX, "");
|
|
609
|
-
return (0, openclaw_plugin_sdk_routing.resolveThreadSessionKeys)({
|
|
610
|
-
baseSessionKey: cleanBase,
|
|
611
|
-
threadId: channelThreadId,
|
|
612
|
-
parentSessionKey: channelThreadId ? cleanBase : void 0
|
|
613
|
-
}).sessionKey;
|
|
614
|
-
}
|
|
615
|
-
//#endregion
|
|
616
702
|
//#region extensions/msteams/src/session-route.ts
|
|
617
703
|
function inferMSTeamsTargetChatType(raw) {
|
|
618
704
|
const target = (0, openclaw_plugin_sdk_channel_core.stripChannelTargetPrefix)(raw, "msteams", "teams");
|
|
@@ -656,7 +742,7 @@ function resolveMSTeamsOutboundSessionRoute(params) {
|
|
|
656
742
|
});
|
|
657
743
|
return isChannel ? {
|
|
658
744
|
...route,
|
|
659
|
-
sessionKey: resolveMSTeamsRouteSessionKey({
|
|
745
|
+
sessionKey: require_thread_session.resolveMSTeamsRouteSessionKey({
|
|
660
746
|
baseSessionKey: route.baseSessionKey,
|
|
661
747
|
isChannel: true,
|
|
662
748
|
conversationMessageId: channelThreadId
|
|
@@ -691,7 +777,7 @@ const collectMSTeamsSecurityFindings = openclaw_plugin_sdk_channel_policy.create
|
|
|
691
777
|
severity: "critical",
|
|
692
778
|
title: "MS Teams security warning"
|
|
693
779
|
});
|
|
694
|
-
const loadMSTeamsChannelRuntime = (0, openclaw_plugin_sdk_lazy_runtime.createLazyRuntimeNamedExport)(() => Promise.resolve().then(() => require("./channel.runtime-
|
|
780
|
+
const loadMSTeamsChannelRuntime = (0, openclaw_plugin_sdk_lazy_runtime.createLazyRuntimeNamedExport)(() => Promise.resolve().then(() => require("./channel.runtime-1mH99ZAm.cjs")), "msTeamsChannelRuntime");
|
|
695
781
|
function jsonActionResult(data) {
|
|
696
782
|
return {
|
|
697
783
|
content: [{
|
|
@@ -862,6 +948,12 @@ const msteamsChannelOutbound = {
|
|
|
862
948
|
textChunkLimit: 4e3,
|
|
863
949
|
resolveEffectiveTextChunkLimit: ({ fallbackLimit }) => typeof fallbackLimit === "number" && fallbackLimit > 0 ? Math.min(fallbackLimit, 4e3) : 4e3,
|
|
864
950
|
pollMaxOptions: 12,
|
|
951
|
+
shouldSuppressLocalPayloadPrompt: ({ cfg, accountId, payload, hint }) => shouldSuppressLocalMSTeamsExecApprovalPrompt({
|
|
952
|
+
cfg,
|
|
953
|
+
accountId,
|
|
954
|
+
payload,
|
|
955
|
+
hint
|
|
956
|
+
}),
|
|
865
957
|
deliveryCapabilities: { durableFinal: {
|
|
866
958
|
text: true,
|
|
867
959
|
media: true,
|
|
@@ -904,7 +996,7 @@ const msteamsPlugin = (0, openclaw_plugin_sdk_channel_core.createChatChannelPlug
|
|
|
904
996
|
} },
|
|
905
997
|
agentPrompt: { messageToolHints: () => ["- Adaptive Cards supported. Use `action=send` with `card={type,version,body}` to send rich cards.", "- MSTeams targeting: omit `target` to reply to the current conversation (auto-inferred). Explicit targets: `user:ID` or `user:Display Name` (requires Graph API) for DMs, `conversation:19:...@thread.tacv2` for groups/channels. Prefer IDs over display names for speed."] },
|
|
906
998
|
groups: { resolveToolPolicy: resolveMSTeamsGroupToolPolicy },
|
|
907
|
-
approvalCapability:
|
|
999
|
+
approvalCapability: msTeamsApprovalCapability,
|
|
908
1000
|
doctor: {
|
|
909
1001
|
dmAllowFromMode: "topOnly",
|
|
910
1002
|
groupModel: "hybrid",
|
|
@@ -1428,7 +1520,7 @@ const msteamsPlugin = (0, openclaw_plugin_sdk_channel_core.createChatChannelPlug
|
|
|
1428
1520
|
})
|
|
1429
1521
|
}),
|
|
1430
1522
|
gateway: { startAccount: async (ctx) => {
|
|
1431
|
-
const { monitorMSTeamsProvider } = await Promise.resolve().then(() => require("./src-
|
|
1523
|
+
const { monitorMSTeamsProvider } = await Promise.resolve().then(() => require("./src-RSjkJRjI.cjs"));
|
|
1432
1524
|
const port = ctx.cfg.channels?.msteams?.webhook?.port ?? 3978;
|
|
1433
1525
|
const statusSink = (0, openclaw_plugin_sdk_channel_outbound.createAccountStatusSink)({
|
|
1434
1526
|
accountId: ctx.accountId,
|
|
@@ -1436,6 +1528,17 @@ const msteamsPlugin = (0, openclaw_plugin_sdk_channel_core.createChatChannelPlug
|
|
|
1436
1528
|
});
|
|
1437
1529
|
statusSink({ port });
|
|
1438
1530
|
ctx.log?.info(`starting provider (port ${port})`);
|
|
1531
|
+
if (isMSTeamsNativeApprovalClientEnabled({
|
|
1532
|
+
cfg: ctx.cfg,
|
|
1533
|
+
accountId: ctx.accountId
|
|
1534
|
+
})) (0, openclaw_plugin_sdk_channel_runtime_context.registerChannelRuntimeContext)({
|
|
1535
|
+
channelRuntime: ctx.channelRuntime,
|
|
1536
|
+
channelId: "msteams",
|
|
1537
|
+
accountId: ctx.accountId,
|
|
1538
|
+
capability: openclaw_plugin_sdk_approval_handler_adapter_runtime.CHANNEL_APPROVAL_NATIVE_RUNTIME_CONTEXT_CAPABILITY,
|
|
1539
|
+
context: {},
|
|
1540
|
+
abortSignal: ctx.abortSignal
|
|
1541
|
+
});
|
|
1439
1542
|
return monitorMSTeamsProvider({
|
|
1440
1543
|
cfg: ctx.cfg,
|
|
1441
1544
|
runtime: ctx.runtime,
|
|
@@ -1496,6 +1599,18 @@ Object.defineProperty(exports, "buildMSTeamsPresentationCard", {
|
|
|
1496
1599
|
return buildMSTeamsPresentationCard;
|
|
1497
1600
|
}
|
|
1498
1601
|
});
|
|
1602
|
+
Object.defineProperty(exports, "inferMSTeamsTargetChatType", {
|
|
1603
|
+
enumerable: true,
|
|
1604
|
+
get: function() {
|
|
1605
|
+
return inferMSTeamsTargetChatType;
|
|
1606
|
+
}
|
|
1607
|
+
});
|
|
1608
|
+
Object.defineProperty(exports, "isMSTeamsNativeApprovalClientEnabled", {
|
|
1609
|
+
enumerable: true,
|
|
1610
|
+
get: function() {
|
|
1611
|
+
return isMSTeamsNativeApprovalClientEnabled;
|
|
1612
|
+
}
|
|
1613
|
+
});
|
|
1499
1614
|
Object.defineProperty(exports, "msteamsPlugin", {
|
|
1500
1615
|
enumerable: true,
|
|
1501
1616
|
get: function() {
|
|
@@ -1520,9 +1635,9 @@ Object.defineProperty(exports, "resolveMSTeamsRouteConfig", {
|
|
|
1520
1635
|
return resolveMSTeamsRouteConfig;
|
|
1521
1636
|
}
|
|
1522
1637
|
});
|
|
1523
|
-
Object.defineProperty(exports, "
|
|
1638
|
+
Object.defineProperty(exports, "shouldHandleMSTeamsNativeApprovalRequest", {
|
|
1524
1639
|
enumerable: true,
|
|
1525
1640
|
get: function() {
|
|
1526
|
-
return
|
|
1641
|
+
return shouldHandleMSTeamsNativeApprovalRequest;
|
|
1527
1642
|
}
|
|
1528
1643
|
});
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_config_schema = require("./config-schema-
|
|
2
|
+
const require_config_schema = require("./config-schema-MyN2lamA.cjs");
|
|
3
3
|
exports.MSTeamsChannelConfigSchema = require_config_schema.MSTeamsChannelConfigSchema;
|