@openclaw/msteams 2026.9.5 → 2026.9.6
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/.setup/{adapter.runtime-ChuVK6k_.cjs → adapter.runtime-CQWZeqB5.cjs} +3 -1
- package/dist/.setup/{approval-handler.runtime-DDxGPJDz.cjs → approval-handler.runtime-CUnanUdR.cjs} +2 -2
- package/dist/.setup/{channel-Dzpbbht8.cjs → channel-BDp16XRR.cjs} +69 -57
- package/dist/.setup/{channel.runtime-TE49QvFv.cjs → channel.runtime-Cv5F8JCa.cjs} +6 -4
- package/dist/.setup/{messenger-BR1l4zw-.cjs → messenger-8RA1FUJa.cjs} +4 -10
- package/dist/.setup/{send-D8ATH4QI.cjs → send-CYN_N7O1.cjs} +6 -3
- package/dist/.setup/{src-CpKfpP1m.cjs → src-BfOCwlHp.cjs} +20 -73
- package/dist/api.cjs +1 -1
- package/dist/channel-plugin-api.cjs +1 -1
- package/dist/qa-runner-api.cjs +1 -1
- package/package.json +5 -5
|
@@ -189,6 +189,7 @@ async function createMSTeamsQaTransportAdapter(context) {
|
|
|
189
189
|
await connector.close().catch(() => void 0);
|
|
190
190
|
throw error;
|
|
191
191
|
}
|
|
192
|
+
const bootstrapUrl = (0, node_url.pathToFileURL)(bootstrapPath).href;
|
|
192
193
|
return {
|
|
193
194
|
id: "msteams",
|
|
194
195
|
label: "Microsoft Teams live",
|
|
@@ -285,8 +286,9 @@ async function createMSTeamsQaTransportAdapter(context) {
|
|
|
285
286
|
} } }),
|
|
286
287
|
createRuntimeEnvPatch: () => ({
|
|
287
288
|
OPENCLAW_BUILD_PRIVATE_QA: "1",
|
|
288
|
-
NODE_OPTIONS: [process.env.NODE_OPTIONS?.trim(), `--import=${
|
|
289
|
+
NODE_OPTIONS: [process.env.NODE_OPTIONS?.trim(), `--import=${bootstrapUrl}`].filter(Boolean).join(" ")
|
|
289
290
|
}),
|
|
291
|
+
createRuntimePreloads: () => [bootstrapUrl],
|
|
290
292
|
waitReady: async ({ gateway, timeoutMs, pollIntervalMs }) => await waitForMSTeamsChannelReady(gateway, timeoutMs, pollIntervalMs),
|
|
291
293
|
buildAgentDelivery: ({ target }) => ({
|
|
292
294
|
channel: "msteams",
|
package/dist/.setup/{approval-handler.runtime-DDxGPJDz.cjs → approval-handler.runtime-CUnanUdR.cjs}
RENAMED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
const require_resolve_allowlist = require("./resolve-allowlist-CHzaaWiC.cjs");
|
|
2
|
-
const require_channel = require("./channel-
|
|
2
|
+
const require_channel = require("./channel-BDp16XRR.cjs");
|
|
3
3
|
const require_approval_card = require("./approval-card-CPNH_q3P.cjs");
|
|
4
|
-
const require_send = require("./send-
|
|
4
|
+
const require_send = require("./send-CYN_N7O1.cjs");
|
|
5
5
|
let openclaw_plugin_sdk_account_id = require("openclaw/plugin-sdk/account-id");
|
|
6
6
|
let openclaw_plugin_sdk_approval_native_runtime = require("openclaw/plugin-sdk/approval-native-runtime");
|
|
7
7
|
let openclaw_plugin_sdk_approval_handler_runtime = require("openclaw/plugin-sdk/approval-handler-runtime");
|
|
@@ -42,6 +42,61 @@ function resolveActionUploadFilePath(params) {
|
|
|
42
42
|
}
|
|
43
43
|
}
|
|
44
44
|
//#endregion
|
|
45
|
+
//#region extensions/msteams/src/action-results.ts
|
|
46
|
+
function jsonActionResult(data) {
|
|
47
|
+
return {
|
|
48
|
+
content: [{
|
|
49
|
+
type: "text",
|
|
50
|
+
text: JSON.stringify(data)
|
|
51
|
+
}],
|
|
52
|
+
details: data
|
|
53
|
+
};
|
|
54
|
+
}
|
|
55
|
+
function jsonMSTeamsActionResult(action, data = {}) {
|
|
56
|
+
return jsonActionResult({
|
|
57
|
+
channel: "msteams",
|
|
58
|
+
action,
|
|
59
|
+
...data
|
|
60
|
+
});
|
|
61
|
+
}
|
|
62
|
+
function jsonMSTeamsOkActionResult(action, data = {}) {
|
|
63
|
+
return jsonActionResult({
|
|
64
|
+
ok: true,
|
|
65
|
+
channel: "msteams",
|
|
66
|
+
action,
|
|
67
|
+
...data
|
|
68
|
+
});
|
|
69
|
+
}
|
|
70
|
+
function jsonMSTeamsConversationResult(conversationId) {
|
|
71
|
+
return jsonActionResultWithDetails({
|
|
72
|
+
ok: true,
|
|
73
|
+
channel: "msteams",
|
|
74
|
+
conversationId
|
|
75
|
+
}, {
|
|
76
|
+
ok: true,
|
|
77
|
+
channel: "msteams"
|
|
78
|
+
});
|
|
79
|
+
}
|
|
80
|
+
function jsonActionResultWithDetails(contentData, details) {
|
|
81
|
+
return {
|
|
82
|
+
content: [{
|
|
83
|
+
type: "text",
|
|
84
|
+
text: JSON.stringify(contentData)
|
|
85
|
+
}],
|
|
86
|
+
details
|
|
87
|
+
};
|
|
88
|
+
}
|
|
89
|
+
function actionError(message) {
|
|
90
|
+
return {
|
|
91
|
+
isError: true,
|
|
92
|
+
content: [{
|
|
93
|
+
type: "text",
|
|
94
|
+
text: message
|
|
95
|
+
}],
|
|
96
|
+
details: { error: message }
|
|
97
|
+
};
|
|
98
|
+
}
|
|
99
|
+
//#endregion
|
|
45
100
|
//#region extensions/msteams/src/policy.ts
|
|
46
101
|
const teamScopeKey = (teamKey) => (0, openclaw_plugin_sdk_channel_policy.scopeKey)(["team", teamKey]);
|
|
47
102
|
const channelScopeKey = (teamKey, channelKey) => (0, openclaw_plugin_sdk_channel_policy.scopeKey)(["team", teamKey], ["channel", channelKey]);
|
|
@@ -347,7 +402,7 @@ const msTeamsLazyApprovalNativeRuntime = (0, openclaw_plugin_sdk_approval_handle
|
|
|
347
402
|
request
|
|
348
403
|
}),
|
|
349
404
|
load: async () => {
|
|
350
|
-
const { msTeamsApprovalNativeRuntime } = await Promise.resolve().then(() => require("./approval-handler.runtime-
|
|
405
|
+
const { msTeamsApprovalNativeRuntime } = await Promise.resolve().then(() => require("./approval-handler.runtime-CUnanUdR.cjs"));
|
|
351
406
|
return msTeamsApprovalNativeRuntime;
|
|
352
407
|
}
|
|
353
408
|
});
|
|
@@ -806,50 +861,7 @@ const collectMSTeamsSecurityFindings = openclaw_plugin_sdk_channel_policy.create
|
|
|
806
861
|
severity: "warn",
|
|
807
862
|
title: "MS Teams security warning"
|
|
808
863
|
});
|
|
809
|
-
const loadMSTeamsChannelRuntime = (0, openclaw_plugin_sdk_lazy_runtime.createLazyRuntimeNamedExport)(() => Promise.resolve().then(() => require("./channel.runtime-
|
|
810
|
-
function jsonActionResult(data) {
|
|
811
|
-
return {
|
|
812
|
-
content: [{
|
|
813
|
-
type: "text",
|
|
814
|
-
text: JSON.stringify(data)
|
|
815
|
-
}],
|
|
816
|
-
details: data
|
|
817
|
-
};
|
|
818
|
-
}
|
|
819
|
-
function jsonMSTeamsActionResult(action, data = {}) {
|
|
820
|
-
return jsonActionResult({
|
|
821
|
-
channel: "msteams",
|
|
822
|
-
action,
|
|
823
|
-
...data
|
|
824
|
-
});
|
|
825
|
-
}
|
|
826
|
-
function jsonMSTeamsOkActionResult(action, data = {}) {
|
|
827
|
-
return jsonActionResult({
|
|
828
|
-
ok: true,
|
|
829
|
-
channel: "msteams",
|
|
830
|
-
action,
|
|
831
|
-
...data
|
|
832
|
-
});
|
|
833
|
-
}
|
|
834
|
-
function jsonMSTeamsConversationResult(conversationId) {
|
|
835
|
-
return jsonActionResultWithDetails({
|
|
836
|
-
ok: true,
|
|
837
|
-
channel: "msteams",
|
|
838
|
-
conversationId
|
|
839
|
-
}, {
|
|
840
|
-
ok: true,
|
|
841
|
-
channel: "msteams"
|
|
842
|
-
});
|
|
843
|
-
}
|
|
844
|
-
function jsonActionResultWithDetails(contentData, details) {
|
|
845
|
-
return {
|
|
846
|
-
content: [{
|
|
847
|
-
type: "text",
|
|
848
|
-
text: JSON.stringify(contentData)
|
|
849
|
-
}],
|
|
850
|
-
details
|
|
851
|
-
};
|
|
852
|
-
}
|
|
864
|
+
const loadMSTeamsChannelRuntime = (0, openclaw_plugin_sdk_lazy_runtime.createLazyRuntimeNamedExport)(() => Promise.resolve().then(() => require("./channel.runtime-Cv5F8JCa.cjs")), "msTeamsChannelRuntime");
|
|
853
865
|
const MSTEAMS_REACTION_TYPES = [
|
|
854
866
|
"like",
|
|
855
867
|
"heart",
|
|
@@ -858,16 +870,6 @@ const MSTEAMS_REACTION_TYPES = [
|
|
|
858
870
|
"sad",
|
|
859
871
|
"angry"
|
|
860
872
|
];
|
|
861
|
-
function actionError(message) {
|
|
862
|
-
return {
|
|
863
|
-
isError: true,
|
|
864
|
-
content: [{
|
|
865
|
-
type: "text",
|
|
866
|
-
text: message
|
|
867
|
-
}],
|
|
868
|
-
details: { error: message }
|
|
869
|
-
};
|
|
870
|
-
}
|
|
871
873
|
function requireMSTeamsGroupManagementAuthorization(ctx) {
|
|
872
874
|
if (ctx.senderIsOwner === true || ctx.gatewayClientScopes?.includes("operator.admin")) return null;
|
|
873
875
|
return actionError("Microsoft Teams group management requires an owner or operator.admin requester.");
|
|
@@ -911,7 +913,14 @@ async function runWithRequiredActionTarget(params) {
|
|
|
911
913
|
}
|
|
912
914
|
async function runWithRequiredActionMessageTarget(params) {
|
|
913
915
|
const to = resolveMSTeamsActionTarget(params);
|
|
914
|
-
const
|
|
916
|
+
const messageIdRaw = params.allowCurrentMessageIdFallback === true && msteamsContextTargetsMatch(to, {
|
|
917
|
+
currentChannelId: params.currentChannelId ?? void 0,
|
|
918
|
+
currentMessagingTarget: params.currentGraphChannelId ?? void 0
|
|
919
|
+
}) ? (0, openclaw_plugin_sdk_channel_actions.resolveReactionMessageId)({
|
|
920
|
+
args: params.toolParams,
|
|
921
|
+
toolContext: { currentMessageId: params.currentMessageId ?? void 0 }
|
|
922
|
+
}) : resolveActionMessageId(params.toolParams);
|
|
923
|
+
const messageId = messageIdRaw == null ? "" : String(messageIdRaw).trim();
|
|
915
924
|
if (!to || !messageId) return actionError(`${params.actionLabel} requires a target (to) and messageId.`);
|
|
916
925
|
return await params.run({
|
|
917
926
|
to,
|
|
@@ -1280,6 +1289,7 @@ const msteamsPlugin = (0, openclaw_plugin_sdk_channel_core.createChatChannelPlug
|
|
|
1280
1289
|
currentChannelId: ctx.toolContext?.currentChannelId,
|
|
1281
1290
|
currentGraphChannelId: resolveCurrentGraphActionTarget(ctx.toolContext),
|
|
1282
1291
|
currentChatType: ctx.toolContext?.currentChatType,
|
|
1292
|
+
currentMessageId: ctx.toolContext?.currentMessageId,
|
|
1283
1293
|
graphOnly: true
|
|
1284
1294
|
};
|
|
1285
1295
|
if (ctx.action === "read") return await runWithRequiredActionMessageTarget({
|
|
@@ -1336,6 +1346,7 @@ const msteamsPlugin = (0, openclaw_plugin_sdk_channel_core.createChatChannelPlug
|
|
|
1336
1346
|
if (ctx.action === "react") return await runWithRequiredActionMessageTarget({
|
|
1337
1347
|
actionLabel: "React",
|
|
1338
1348
|
...graphActionTarget,
|
|
1349
|
+
allowCurrentMessageIdFallback: true,
|
|
1339
1350
|
run: async (target) => {
|
|
1340
1351
|
const emoji = typeof ctx.params.emoji === "string" ? ctx.params.emoji.trim() : "";
|
|
1341
1352
|
const remove = typeof ctx.params.remove === "boolean" ? ctx.params.remove : false;
|
|
@@ -1379,6 +1390,7 @@ const msteamsPlugin = (0, openclaw_plugin_sdk_channel_core.createChatChannelPlug
|
|
|
1379
1390
|
if (ctx.action === "reactions") return await runWithRequiredActionMessageTarget({
|
|
1380
1391
|
actionLabel: "Reactions",
|
|
1381
1392
|
...graphActionTarget,
|
|
1393
|
+
allowCurrentMessageIdFallback: true,
|
|
1382
1394
|
run: async (target) => {
|
|
1383
1395
|
const to = await authorizeActionTarget(target.to);
|
|
1384
1396
|
const { listReactionsMSTeams } = await loadMSTeamsChannelRuntime();
|
|
@@ -1552,7 +1564,7 @@ const msteamsPlugin = (0, openclaw_plugin_sdk_channel_core.createChatChannelPlug
|
|
|
1552
1564
|
})
|
|
1553
1565
|
}),
|
|
1554
1566
|
gateway: { startAccount: async (ctx) => {
|
|
1555
|
-
const { monitorMSTeamsProvider } = await Promise.resolve().then(() => require("./src-
|
|
1567
|
+
const { monitorMSTeamsProvider } = await Promise.resolve().then(() => require("./src-BfOCwlHp.cjs"));
|
|
1556
1568
|
const port = ctx.cfg.channels?.msteams?.webhook?.port ?? 3978;
|
|
1557
1569
|
const statusSink = (0, openclaw_plugin_sdk_channel_outbound.createAccountStatusSink)({
|
|
1558
1570
|
accountId: ctx.accountId,
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
require("../runtime-api.cjs");
|
|
2
2
|
const require_resolve_allowlist = require("./resolve-allowlist-CHzaaWiC.cjs");
|
|
3
|
-
const require_channel = require("./channel-
|
|
3
|
+
const require_channel = require("./channel-BDp16XRR.cjs");
|
|
4
4
|
const require_channel_setup = require("./channel.setup-BVDfgdCc.cjs");
|
|
5
5
|
const require_polls = require("./polls-BJ4-4uZm.cjs");
|
|
6
|
-
const require_send = require("./send-
|
|
6
|
+
const require_send = require("./send-CYN_N7O1.cjs");
|
|
7
7
|
const require_reaction_types = require("./reaction-types-C7RA7Wxt.cjs");
|
|
8
8
|
let openclaw_plugin_sdk_channel_outbound = require("openclaw/plugin-sdk/channel-outbound");
|
|
9
9
|
let openclaw_plugin_sdk_string_coerce_runtime = require("openclaw/plugin-sdk/string-coerce-runtime");
|
|
@@ -728,14 +728,16 @@ const msteamsOutbound = {
|
|
|
728
728
|
onDeliveryResult: report
|
|
729
729
|
}), onDeliveryResult));
|
|
730
730
|
},
|
|
731
|
-
sendPoll: async ({ cfg, to, poll, threadId }) => {
|
|
731
|
+
sendPoll: async ({ cfg, to, poll, threadId, assertDirectAdapterHandoff, onPlatformSendDispatch }) => {
|
|
732
732
|
const maxSelections = poll.maxSelections ?? 1;
|
|
733
733
|
const result = await require_send.sendPollMSTeams({
|
|
734
734
|
cfg,
|
|
735
735
|
to: resolveMSTeamsThreadTarget(to, threadId),
|
|
736
736
|
question: poll.question,
|
|
737
737
|
options: poll.options,
|
|
738
|
-
maxSelections
|
|
738
|
+
maxSelections,
|
|
739
|
+
assertDirectAdapterHandoff,
|
|
740
|
+
onPlatformSendDispatch
|
|
739
741
|
});
|
|
740
742
|
await require_polls.createMSTeamsPollStoreState().createPoll({
|
|
741
743
|
id: result.pollId,
|
|
@@ -479,18 +479,16 @@ function prepareFileConsentActivity(params) {
|
|
|
479
479
|
*/
|
|
480
480
|
async function prepareFileConsentActivityFs(params) {
|
|
481
481
|
const { media, conversationId, description } = params;
|
|
482
|
-
const
|
|
482
|
+
const upload = {
|
|
483
483
|
buffer: media.buffer,
|
|
484
484
|
filename: media.filename,
|
|
485
485
|
contentType: media.contentType,
|
|
486
486
|
conversationId
|
|
487
|
-
}
|
|
487
|
+
};
|
|
488
|
+
const uploadId = storePendingUpload(upload);
|
|
488
489
|
await storePendingUploadFs({
|
|
489
490
|
id: uploadId,
|
|
490
|
-
|
|
491
|
-
filename: media.filename,
|
|
492
|
-
contentType: media.contentType,
|
|
493
|
-
conversationId
|
|
491
|
+
...upload
|
|
494
492
|
});
|
|
495
493
|
return {
|
|
496
494
|
activity: buildConsentActivity({
|
|
@@ -501,10 +499,6 @@ async function prepareFileConsentActivityFs(params) {
|
|
|
501
499
|
uploadId
|
|
502
500
|
};
|
|
503
501
|
}
|
|
504
|
-
/**
|
|
505
|
-
* Check if a file requires FileConsentCard flow.
|
|
506
|
-
* True for: personal chat AND (large file OR non-image)
|
|
507
|
-
*/
|
|
508
502
|
function requiresFileConsent(params) {
|
|
509
503
|
const isPersonal = (0, openclaw_plugin_sdk_string_coerce_runtime.normalizeOptionalLowercaseString)(params.conversationType) === "personal";
|
|
510
504
|
const isImage = params.contentType?.startsWith("image/") ?? false;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
const require_runtime = require("./runtime-gZTAuFux.cjs");
|
|
2
2
|
require("../runtime-api.cjs");
|
|
3
3
|
const require_resolve_allowlist = require("./resolve-allowlist-CHzaaWiC.cjs");
|
|
4
|
-
const require_channel = require("./channel-
|
|
4
|
+
const require_channel = require("./channel-BDp16XRR.cjs");
|
|
5
5
|
const require_channel_setup = require("./channel.setup-BVDfgdCc.cjs");
|
|
6
6
|
const require_polls = require("./polls-BJ4-4uZm.cjs");
|
|
7
|
-
const require_messenger = require("./messenger-
|
|
7
|
+
const require_messenger = require("./messenger-8RA1FUJa.cjs");
|
|
8
8
|
let openclaw_plugin_sdk_channel_outbound = require("openclaw/plugin-sdk/channel-outbound");
|
|
9
9
|
let openclaw_plugin_sdk_string_coerce_runtime = require("openclaw/plugin-sdk/string-coerce-runtime");
|
|
10
10
|
let openclaw_plugin_sdk_error_runtime = require("openclaw/plugin-sdk/error-runtime");
|
|
@@ -494,6 +494,7 @@ async function sendProactiveActivity(params) {
|
|
|
494
494
|
* Send a poll (Adaptive Card) to a Teams conversation or user.
|
|
495
495
|
*/
|
|
496
496
|
async function sendPollMSTeams(params) {
|
|
497
|
+
require_resolve_allowlist.assertMSTeamsSendHandoff(params);
|
|
497
498
|
const { cfg, to, question, options, maxSelections } = params;
|
|
498
499
|
const ctx = await resolveMSTeamsSendContext({
|
|
499
500
|
cfg,
|
|
@@ -519,7 +520,9 @@ async function sendPollMSTeams(params) {
|
|
|
519
520
|
content: pollCard.card
|
|
520
521
|
}]
|
|
521
522
|
},
|
|
522
|
-
errorPrefix: "msteams poll send"
|
|
523
|
+
errorPrefix: "msteams poll send",
|
|
524
|
+
assertDirectAdapterHandoff: params.assertDirectAdapterHandoff,
|
|
525
|
+
onPlatformSendDispatch: params.onPlatformSendDispatch
|
|
523
526
|
});
|
|
524
527
|
log.info("sent poll", {
|
|
525
528
|
conversationId,
|
|
@@ -2,13 +2,13 @@ const require_rolldown_runtime = require("./rolldown-runtime-VH7oDXx4.cjs");
|
|
|
2
2
|
const require_runtime = require("./runtime-gZTAuFux.cjs");
|
|
3
3
|
require("../runtime-api.cjs");
|
|
4
4
|
const require_resolve_allowlist = require("./resolve-allowlist-CHzaaWiC.cjs");
|
|
5
|
-
const require_channel = require("./channel-
|
|
5
|
+
const require_channel = require("./channel-BDp16XRR.cjs");
|
|
6
6
|
const require_thread_session = require("./thread-session-CXgHK-yi.cjs");
|
|
7
7
|
const require_channel_setup = require("./channel.setup-BVDfgdCc.cjs");
|
|
8
8
|
const require_polls = require("./polls-BJ4-4uZm.cjs");
|
|
9
9
|
const require_sso_token_store = require("./sso-token-store-YYLHXgFH.cjs");
|
|
10
10
|
const require_approval_card = require("./approval-card-CPNH_q3P.cjs");
|
|
11
|
-
const require_messenger = require("./messenger-
|
|
11
|
+
const require_messenger = require("./messenger-8RA1FUJa.cjs");
|
|
12
12
|
const require_reaction_types = require("./reaction-types-C7RA7Wxt.cjs");
|
|
13
13
|
let openclaw_plugin_sdk_channel_outbound = require("openclaw/plugin-sdk/channel-outbound");
|
|
14
14
|
let openclaw_plugin_sdk_string_coerce_runtime = require("openclaw/plugin-sdk/string-coerce-runtime");
|
|
@@ -350,7 +350,7 @@ async function resolveMSTeamsSenderAccess(params) {
|
|
|
350
350
|
channelName: activity.channelData?.channel?.name,
|
|
351
351
|
allowNameMatching
|
|
352
352
|
});
|
|
353
|
-
const resolved = await
|
|
353
|
+
const resolved = await core.channel.inbound.ingress.resolveStable({
|
|
354
354
|
channelId: "msteams",
|
|
355
355
|
accountId: pairing.accountId,
|
|
356
356
|
identity: {
|
|
@@ -1896,6 +1896,7 @@ function createTeamsReplyStreamController(params) {
|
|
|
1896
1896
|
return payloads;
|
|
1897
1897
|
};
|
|
1898
1898
|
const progressDraft = (0, openclaw_plugin_sdk_channel_outbound.createChannelProgressDraftCompositor)({
|
|
1899
|
+
preparedItems: true,
|
|
1899
1900
|
formatPlainText: (text) => text,
|
|
1900
1901
|
entry: params.msteamsConfig,
|
|
1901
1902
|
mode: streamMode,
|
|
@@ -1954,13 +1955,8 @@ function createTeamsReplyStreamController(params) {
|
|
|
1954
1955
|
params.log?.warn?.(`msteams stream emit failed, falling back to block delivery: ${(0, openclaw_plugin_sdk_error_runtime.coerceErrorMessage)(err)}`);
|
|
1955
1956
|
}
|
|
1956
1957
|
},
|
|
1957
|
-
|
|
1958
|
-
|
|
1959
|
-
await progressDraft.noteActivity();
|
|
1960
|
-
},
|
|
1961
|
-
async pushProgressLine(line, options) {
|
|
1962
|
-
await progressDraft.pushToolProgress(line, options);
|
|
1963
|
-
},
|
|
1958
|
+
pushItemEvent: progressDraft.pushItemEvent.bind(progressDraft),
|
|
1959
|
+
pushToolEvent: progressDraft.pushToolEvent,
|
|
1964
1960
|
async pushReasoningProgress(text, options) {
|
|
1965
1961
|
await progressDraft.pushReasoningProgress(text, options);
|
|
1966
1962
|
},
|
|
@@ -2492,35 +2488,8 @@ function createMSTeamsReplyDispatcher(params) {
|
|
|
2492
2488
|
streamController.resetReasoningProgress();
|
|
2493
2489
|
return false;
|
|
2494
2490
|
},
|
|
2495
|
-
onToolStart:
|
|
2496
|
-
|
|
2497
|
-
const detailMode = typeof payload?.detailMode === "string" ? payload.detailMode : void 0;
|
|
2498
|
-
await streamController.pushProgressLine((0, openclaw_plugin_sdk_channel_outbound.buildChannelProgressDraftLineForEntry)(msteamsCfg, {
|
|
2499
|
-
event: "tool",
|
|
2500
|
-
...typeof payload?.itemId === "string" ? { itemId: payload.itemId } : {},
|
|
2501
|
-
...typeof payload?.toolCallId === "string" ? { toolCallId: payload.toolCallId } : {},
|
|
2502
|
-
...name ? { name } : {},
|
|
2503
|
-
...typeof payload?.phase === "string" ? { phase: payload.phase } : {},
|
|
2504
|
-
...payload?.args && typeof payload.args === "object" ? { args: payload.args } : {}
|
|
2505
|
-
}, detailMode === "explain" || detailMode === "raw" ? { detailMode } : void 0), name ? { toolName: name } : void 0);
|
|
2506
|
-
return false;
|
|
2507
|
-
},
|
|
2508
|
-
onItemEvent: async (payload) => {
|
|
2509
|
-
await streamController.pushProgressLine((0, openclaw_plugin_sdk_channel_outbound.buildChannelProgressDraftLineForEntry)(msteamsCfg, {
|
|
2510
|
-
event: "item",
|
|
2511
|
-
...typeof payload?.itemId === "string" ? { itemId: payload.itemId } : {},
|
|
2512
|
-
...typeof payload?.toolCallId === "string" ? { toolCallId: payload.toolCallId } : {},
|
|
2513
|
-
...typeof payload?.kind === "string" ? { itemKind: payload.kind } : {},
|
|
2514
|
-
...typeof payload?.title === "string" ? { title: payload.title } : {},
|
|
2515
|
-
...typeof payload?.name === "string" ? { name: payload.name } : {},
|
|
2516
|
-
...typeof payload?.phase === "string" ? { phase: payload.phase } : {},
|
|
2517
|
-
...typeof payload?.status === "string" ? { status: payload.status } : {},
|
|
2518
|
-
...typeof payload?.summary === "string" ? { summary: payload.summary } : {},
|
|
2519
|
-
...typeof payload?.progressText === "string" ? { progressText: payload.progressText } : {},
|
|
2520
|
-
...typeof payload?.meta === "string" ? { meta: payload.meta } : {}
|
|
2521
|
-
}));
|
|
2522
|
-
return false;
|
|
2523
|
-
},
|
|
2491
|
+
onToolStart: streamController.pushToolEvent,
|
|
2492
|
+
onItemEvent: streamController.pushItemEvent,
|
|
2524
2493
|
onPlanUpdate: async (payload) => {
|
|
2525
2494
|
if (payload?.phase !== "update") return false;
|
|
2526
2495
|
await streamController.pushPlanProgress((0, openclaw_plugin_sdk_channel_outbound.normalizeAgentPlanSteps)(payload.steps), {
|
|
@@ -2539,36 +2508,6 @@ function createMSTeamsReplyDispatcher(params) {
|
|
|
2539
2508
|
...typeof payload?.message === "string" ? { message: payload.message } : {}
|
|
2540
2509
|
});
|
|
2541
2510
|
return false;
|
|
2542
|
-
},
|
|
2543
|
-
onCommandOutput: async (payload) => {
|
|
2544
|
-
if (payload?.phase !== "end") return false;
|
|
2545
|
-
await streamController.pushProgressLine((0, openclaw_plugin_sdk_channel_outbound.buildChannelProgressDraftLineForEntry)(msteamsCfg, {
|
|
2546
|
-
event: "command-output",
|
|
2547
|
-
...typeof payload?.itemId === "string" ? { itemId: payload.itemId } : {},
|
|
2548
|
-
...typeof payload?.toolCallId === "string" ? { toolCallId: payload.toolCallId } : {},
|
|
2549
|
-
phase: payload.phase,
|
|
2550
|
-
...typeof payload?.title === "string" ? { title: payload.title } : {},
|
|
2551
|
-
...typeof payload?.name === "string" ? { name: payload.name } : {},
|
|
2552
|
-
...typeof payload?.status === "string" ? { status: payload.status } : {},
|
|
2553
|
-
...typeof payload?.exitCode === "number" ? { exitCode: payload.exitCode } : {}
|
|
2554
|
-
}));
|
|
2555
|
-
return false;
|
|
2556
|
-
},
|
|
2557
|
-
onPatchSummary: async (payload) => {
|
|
2558
|
-
if (payload?.phase !== "end") return false;
|
|
2559
|
-
await streamController.pushProgressLine((0, openclaw_plugin_sdk_channel_outbound.buildChannelProgressDraftLine)({
|
|
2560
|
-
event: "patch",
|
|
2561
|
-
...typeof payload?.itemId === "string" ? { itemId: payload.itemId } : {},
|
|
2562
|
-
...typeof payload?.toolCallId === "string" ? { toolCallId: payload.toolCallId } : {},
|
|
2563
|
-
phase: payload.phase,
|
|
2564
|
-
...typeof payload?.title === "string" ? { title: payload.title } : {},
|
|
2565
|
-
...typeof payload?.name === "string" ? { name: payload.name } : {},
|
|
2566
|
-
...Array.isArray(payload?.added) && payload.added.every((s) => typeof s === "string") ? { added: payload.added } : {},
|
|
2567
|
-
...Array.isArray(payload?.modified) && payload.modified.every((s) => typeof s === "string") ? { modified: payload.modified } : {},
|
|
2568
|
-
...Array.isArray(payload?.deleted) && payload.deleted.every((s) => typeof s === "string") ? { deleted: payload.deleted } : {},
|
|
2569
|
-
...typeof payload?.summary === "string" ? { summary: payload.summary } : {}
|
|
2570
|
-
}));
|
|
2571
|
-
return false;
|
|
2572
2511
|
}
|
|
2573
2512
|
} : {};
|
|
2574
2513
|
return {
|
|
@@ -2578,6 +2517,8 @@ function createMSTeamsReplyDispatcher(params) {
|
|
|
2578
2517
|
},
|
|
2579
2518
|
delivery,
|
|
2580
2519
|
replyOptions: {
|
|
2520
|
+
progressPreambleEnabled: shouldSuppressDefaultToolProgressMessages,
|
|
2521
|
+
commentaryProgressEnabled: shouldSuppressDefaultToolProgressMessages,
|
|
2581
2522
|
...streamController.hasStream() ? { onPartialReply: (payload) => {
|
|
2582
2523
|
streamController.onPartialReply(payload);
|
|
2583
2524
|
return false;
|
|
@@ -2640,7 +2581,7 @@ async function dispatchMSTeamsInboundTurn(params) {
|
|
|
2640
2581
|
body: agentBody
|
|
2641
2582
|
});
|
|
2642
2583
|
const isRoomish = !isDirectMessage;
|
|
2643
|
-
const historyKey = isRoomish ?
|
|
2584
|
+
const historyKey = isRoomish ? facts.historyKey : void 0;
|
|
2644
2585
|
if (isRoomish && historyKey) combinedBody = (0, openclaw_plugin_sdk_reply_history.createChannelHistoryWindow)({ historyMap: conversationHistories }).buildPendingContext({
|
|
2645
2586
|
historyKey,
|
|
2646
2587
|
limit: historyLimit,
|
|
@@ -2938,6 +2879,7 @@ function assembleMSTeamsInboundFacts(entry) {
|
|
|
2938
2879
|
teamId,
|
|
2939
2880
|
graphChannelId: activity.channelData?.channel?.id?.trim() || conversationId,
|
|
2940
2881
|
threadId,
|
|
2882
|
+
historyKey: threadId ? `${conversationId}:thread:${threadId}` : conversationId,
|
|
2941
2883
|
conversationRef: buildStoredConversationReference({
|
|
2942
2884
|
activity,
|
|
2943
2885
|
conversationId,
|
|
@@ -3211,7 +3153,7 @@ function createMSTeamsMessageHandler(deps) {
|
|
|
3211
3153
|
cfg,
|
|
3212
3154
|
channel: "msteams"
|
|
3213
3155
|
});
|
|
3214
|
-
const historyLimit =
|
|
3156
|
+
const historyLimit = (0, openclaw_plugin_sdk_number_runtime.resolvePromptHistoryLimit)(msteamsCfg?.historyLimit ?? cfg.messages?.groupChat?.historyLimit);
|
|
3215
3157
|
const conversationHistories = /* @__PURE__ */ new Map();
|
|
3216
3158
|
const readConfig = (0, openclaw_plugin_sdk_runtime_config_snapshot.createRuntimeConfigReader)(cfg);
|
|
3217
3159
|
const resolveDebounceMs = () => core.channel.debounce.resolveInboundDebounceMs({
|
|
@@ -3321,7 +3263,7 @@ function createMSTeamsMessageHandler(deps) {
|
|
|
3321
3263
|
if (historyBody) {
|
|
3322
3264
|
enqueuePrimaryMessageSystemEvent();
|
|
3323
3265
|
(0, openclaw_plugin_sdk_reply_history.createChannelHistoryWindow)({ historyMap: conversationHistories }).record({
|
|
3324
|
-
historyKey:
|
|
3266
|
+
historyKey: facts.historyKey,
|
|
3325
3267
|
limit: historyLimit,
|
|
3326
3268
|
entry: {
|
|
3327
3269
|
sender: senderName,
|
|
@@ -3520,6 +3462,11 @@ function createMSTeamsReactionHandler(deps) {
|
|
|
3520
3462
|
},
|
|
3521
3463
|
...teamId ? { teamId } : {}
|
|
3522
3464
|
});
|
|
3465
|
+
const sessionKey = require_thread_session.resolveMSTeamsRouteSessionKey({
|
|
3466
|
+
baseSessionKey: route.sessionKey,
|
|
3467
|
+
isChannel,
|
|
3468
|
+
conversationMessageId: require_resolve_allowlist.extractMSTeamsConversationMessageId(rawConversationId)
|
|
3469
|
+
});
|
|
3523
3470
|
const targetMessageId = activity.replyToId ?? "unknown";
|
|
3524
3471
|
for (const reaction of reactions) {
|
|
3525
3472
|
const reactionType = reaction.type ?? "unknown";
|
|
@@ -3533,7 +3480,7 @@ function createMSTeamsReactionHandler(deps) {
|
|
|
3533
3480
|
conversationId
|
|
3534
3481
|
});
|
|
3535
3482
|
core.system.enqueueSystemEvent(label, {
|
|
3536
|
-
sessionKey
|
|
3483
|
+
sessionKey,
|
|
3537
3484
|
contextKey: `msteams:reaction:${conversationId}:${targetMessageId}:${senderId}:${reactionType}:${direction}`
|
|
3538
3485
|
});
|
|
3539
3486
|
}
|
package/dist/api.cjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_channel = require("./.setup/channel-
|
|
2
|
+
const require_channel = require("./.setup/channel-BDp16XRR.cjs");
|
|
3
3
|
const require_channel_setup = require("./.setup/channel.setup-BVDfgdCc.cjs");
|
|
4
4
|
exports.createMSTeamsSetupWizardBase = require_channel_setup.createMSTeamsSetupWizardBase;
|
|
5
5
|
exports.msteamsPlugin = require_channel.msteamsPlugin;
|
package/dist/qa-runner-api.cjs
CHANGED
|
@@ -2,7 +2,7 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
|
2
2
|
let openclaw_plugin_sdk_qa_runner_runtime = require("openclaw/plugin-sdk/qa-runner-runtime");
|
|
3
3
|
//#region extensions/msteams/src/qa/cli.ts
|
|
4
4
|
const DEFAULT_MSTEAMS_QA_SCENARIOS = ["channel-canary"];
|
|
5
|
-
const loadMSTeamsQaAdapterRuntime = (0, openclaw_plugin_sdk_qa_runner_runtime.createLazyCliRuntimeLoader)(() => Promise.resolve().then(() => require("./.setup/adapter.runtime-
|
|
5
|
+
const loadMSTeamsQaAdapterRuntime = (0, openclaw_plugin_sdk_qa_runner_runtime.createLazyCliRuntimeLoader)(() => Promise.resolve().then(() => require("./.setup/adapter.runtime-CQWZeqB5.cjs")));
|
|
6
6
|
async function runQaMSTeams(options) {
|
|
7
7
|
await (0, openclaw_plugin_sdk_qa_runner_runtime.runLiveTransportQaSuiteCommand)({
|
|
8
8
|
channelId: "msteams",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openclaw/msteams",
|
|
3
|
-
"version": "2026.9.
|
|
3
|
+
"version": "2026.9.6",
|
|
4
4
|
"description": "OpenClaw Microsoft Teams channel plugin for bot conversations.",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
"@microsoft/teams.apps": "2.0.16",
|
|
14
14
|
"express": "5.2.1",
|
|
15
15
|
"typebox": "1.3.30",
|
|
16
|
-
"zod": "4.5
|
|
16
|
+
"zod": "4.6.5"
|
|
17
17
|
},
|
|
18
18
|
"devDependencies": {
|
|
19
19
|
"@microsoft/teams.common": "2.0.16",
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
"openclaw": "workspace:*"
|
|
23
23
|
},
|
|
24
24
|
"peerDependencies": {
|
|
25
|
-
"openclaw": ">=2026.9.
|
|
25
|
+
"openclaw": ">=2026.9.6"
|
|
26
26
|
},
|
|
27
27
|
"peerDependenciesMeta": {
|
|
28
28
|
"openclaw": {
|
|
@@ -73,10 +73,10 @@
|
|
|
73
73
|
"minHostVersion": ">=2026.4.10"
|
|
74
74
|
},
|
|
75
75
|
"compat": {
|
|
76
|
-
"pluginApi": ">=2026.9.
|
|
76
|
+
"pluginApi": ">=2026.9.6"
|
|
77
77
|
},
|
|
78
78
|
"build": {
|
|
79
|
-
"openclawVersion": "2026.9.
|
|
79
|
+
"openclawVersion": "2026.9.6",
|
|
80
80
|
"runtimeFormat": "cjs"
|
|
81
81
|
},
|
|
82
82
|
"release": {
|