@openclaw/msteams 2026.5.3-beta.2 → 2026.5.3
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 +1 -1
- package/dist/{channel-D7hdreTh.js → channel-_BNxPm8L.js} +2 -2
- package/dist/channel-config-api.js +1 -1
- package/dist/channel-plugin-api.js +1 -1
- package/dist/config-schema-BB9atA3D.js +35 -0
- package/dist/setup-plugin-api.js +1 -1
- package/dist/{src-CFp1QpFd.js → src-Cp9jIjdt.js} +190 -31
- package/dist/test-api.js +1 -1
- package/openclaw.plugin.json +144 -0
- package/package.json +4 -4
- package/dist/config-schema-B8QezH6t.js +0 -15
package/dist/api.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { t as msteamsPlugin } from "./channel-
|
|
1
|
+
import { t as msteamsPlugin } from "./channel-_BNxPm8L.js";
|
|
2
2
|
import { i as msteamsSetupAdapter, n as openDelegatedOAuthUrl, r as createMSTeamsSetupWizardBase, t as msteamsSetupWizard } from "./setup-surface-BLkFQYIQ.js";
|
|
3
3
|
export { createMSTeamsSetupWizardBase, msteamsPlugin, msteamsSetupAdapter, msteamsSetupWizard, openDelegatedOAuthUrl };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { o as buildProbeChannelStatusSummary, r as PAIRING_APPROVED_MESSAGE, s as chunkTextForOutbound, t as DEFAULT_ACCOUNT_ID, u as createDefaultChannelRuntimeState } from "./runtime-api-DV1iVMn1.js";
|
|
2
2
|
import { h as resolveMSTeamsCredentials } from "./graph-users-9uQJepqr.js";
|
|
3
3
|
import { a as parseMSTeamsTeamChannelInput, c as resolveMSTeamsUserAllowlist, i as parseMSTeamsConversationId, n as normalizeMSTeamsMessagingTarget, r as normalizeMSTeamsUserInput, s as resolveMSTeamsChannelAllowlist, t as looksLikeMSTeamsTargetId } from "./resolve-allowlist-D41JSziq.js";
|
|
4
|
-
import { t as MSTeamsChannelConfigSchema } from "./config-schema-
|
|
4
|
+
import { t as MSTeamsChannelConfigSchema } from "./config-schema-BB9atA3D.js";
|
|
5
5
|
import { r as resolveMSTeamsGroupToolPolicy } from "./policy-DTnU2GR7.js";
|
|
6
6
|
import { i as msteamsSetupAdapter, t as msteamsSetupWizard } from "./setup-surface-BLkFQYIQ.js";
|
|
7
7
|
import { describeAccountSnapshot } from "openclaw/plugin-sdk/account-helpers";
|
|
@@ -928,7 +928,7 @@ const msteamsPlugin = createChatChannelPlugin({
|
|
|
928
928
|
})
|
|
929
929
|
}),
|
|
930
930
|
gateway: { startAccount: async (ctx) => {
|
|
931
|
-
const { monitorMSTeamsProvider } = await import("./src-
|
|
931
|
+
const { monitorMSTeamsProvider } = await import("./src-Cp9jIjdt.js");
|
|
932
932
|
const port = ctx.cfg.channels?.msteams?.webhook?.port ?? 3978;
|
|
933
933
|
ctx.setStatus({
|
|
934
934
|
accountId: ctx.accountId,
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as MSTeamsChannelConfigSchema } from "./config-schema-
|
|
1
|
+
import { t as MSTeamsChannelConfigSchema } from "./config-schema-BB9atA3D.js";
|
|
2
2
|
export { MSTeamsChannelConfigSchema };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as msteamsPlugin } from "./channel-
|
|
1
|
+
import { t as msteamsPlugin } from "./channel-_BNxPm8L.js";
|
|
2
2
|
export { msteamsPlugin };
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { MSTeamsConfigSchema, buildChannelConfigSchema } from "openclaw/plugin-sdk/bundled-channel-config-schema";
|
|
2
|
+
//#endregion
|
|
3
|
+
//#region extensions/msteams/src/config-schema.ts
|
|
4
|
+
const MSTeamsChannelConfigSchema = buildChannelConfigSchema(MSTeamsConfigSchema, { uiHints: {
|
|
5
|
+
"": {
|
|
6
|
+
label: "MS Teams",
|
|
7
|
+
help: "Microsoft Teams channel provider configuration and provider-specific policy toggles. Use this section to isolate Teams behavior from other enterprise chat providers."
|
|
8
|
+
},
|
|
9
|
+
configWrites: {
|
|
10
|
+
label: "MS Teams Config Writes",
|
|
11
|
+
help: "Allow Microsoft Teams to write config in response to channel events/commands (default: true)."
|
|
12
|
+
},
|
|
13
|
+
streaming: {
|
|
14
|
+
label: "MS Teams Streaming",
|
|
15
|
+
help: "Microsoft Teams preview/progress streaming mode: \"off\" | \"partial\" | \"block\" | \"progress\". Personal chats use Teams native streaminfo progress when available."
|
|
16
|
+
},
|
|
17
|
+
"streaming.progress.label": {
|
|
18
|
+
label: "MS Teams Progress Label",
|
|
19
|
+
help: "Initial progress title. Use \"auto\" for built-in single-word labels, a custom string, or false to hide the title."
|
|
20
|
+
},
|
|
21
|
+
"streaming.progress.labels": {
|
|
22
|
+
label: "MS Teams Progress Label Pool",
|
|
23
|
+
help: "Candidate labels for streaming.progress.label=\"auto\". Leave unset to use OpenClaw built-in progress labels."
|
|
24
|
+
},
|
|
25
|
+
"streaming.progress.maxLines": {
|
|
26
|
+
label: "MS Teams Progress Max Lines",
|
|
27
|
+
help: "Maximum number of compact progress lines to keep below the progress title (default: 8)."
|
|
28
|
+
},
|
|
29
|
+
"streaming.progress.toolProgress": {
|
|
30
|
+
label: "MS Teams Progress Tool Lines",
|
|
31
|
+
help: "Show compact tool/progress lines in progress mode (default: true). Set false to keep only the title until final delivery."
|
|
32
|
+
}
|
|
33
|
+
} });
|
|
34
|
+
//#endregion
|
|
35
|
+
export { MSTeamsChannelConfigSchema as t };
|
package/dist/setup-plugin-api.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { h as resolveMSTeamsCredentials } from "./graph-users-9uQJepqr.js";
|
|
2
|
-
import { t as MSTeamsChannelConfigSchema } from "./config-schema-
|
|
2
|
+
import { t as MSTeamsChannelConfigSchema } from "./config-schema-BB9atA3D.js";
|
|
3
3
|
import { i as msteamsSetupAdapter, t as msteamsSetupWizard } from "./setup-surface-BLkFQYIQ.js";
|
|
4
4
|
import { describeAccountSnapshot } from "openclaw/plugin-sdk/account-helpers";
|
|
5
5
|
import { formatAllowFromLowercase } from "openclaw/plugin-sdk/allow-from";
|
|
@@ -18,6 +18,7 @@ import { resolveDualTextControlCommandGate } from "openclaw/plugin-sdk/command-g
|
|
|
18
18
|
import { filterSupplementalContextItems, resolveChannelContextVisibilityMode, shouldIncludeSupplementalContext } from "openclaw/plugin-sdk/context-visibility-runtime";
|
|
19
19
|
import { evaluateSenderGroupAccessForPolicy } from "openclaw/plugin-sdk/group-access";
|
|
20
20
|
import { DEFAULT_GROUP_HISTORY_LIMIT, buildPendingHistoryContextFromMap, recordPendingHistoryEntryIfEnabled } from "openclaw/plugin-sdk/reply-history";
|
|
21
|
+
import { createChannelProgressDraftGate, formatChannelProgressDraftLine, formatChannelProgressDraftText, isChannelProgressDraftWorkToolName, resolveChannelPreviewStreamMode, resolveChannelProgressDraftMaxLines, resolveChannelStreamingBlockEnabled, resolveChannelStreamingPreviewToolProgress } from "openclaw/plugin-sdk/channel-streaming";
|
|
21
22
|
//#region extensions/msteams/src/feedback-reflection-prompt.ts
|
|
22
23
|
/** Max chars of the thumbed-down response to include in the reflection prompt. */
|
|
23
24
|
const MAX_RESPONSE_CHARS = 500;
|
|
@@ -1662,6 +1663,18 @@ var TeamsHttpStream = class {
|
|
|
1662
1663
|
this.loop.update(this.accumulatedText);
|
|
1663
1664
|
}
|
|
1664
1665
|
/**
|
|
1666
|
+
* Replace an informative progress update with final answer text.
|
|
1667
|
+
* Returns false when the stream could not safely carry the final text, so
|
|
1668
|
+
* callers can deliver the answer through the normal Teams message path.
|
|
1669
|
+
*/
|
|
1670
|
+
async replaceInformativeWithFinal(text) {
|
|
1671
|
+
if (this.stopped || this.finalized) return false;
|
|
1672
|
+
this.update(text);
|
|
1673
|
+
await this.loop.flush();
|
|
1674
|
+
await this.finalize();
|
|
1675
|
+
return !this.streamFailed && this.hasContent;
|
|
1676
|
+
}
|
|
1677
|
+
/**
|
|
1665
1678
|
* Finalize the stream — send the final message activity.
|
|
1666
1679
|
*/
|
|
1667
1680
|
async finalize() {
|
|
@@ -1693,6 +1706,7 @@ var TeamsHttpStream = class {
|
|
|
1693
1706
|
};
|
|
1694
1707
|
await this.sendActivity(finalActivity);
|
|
1695
1708
|
} catch (err) {
|
|
1709
|
+
this.streamFailed = true;
|
|
1696
1710
|
this.onError?.(err);
|
|
1697
1711
|
}
|
|
1698
1712
|
}
|
|
@@ -1749,17 +1763,13 @@ var TeamsHttpStream = class {
|
|
|
1749
1763
|
};
|
|
1750
1764
|
//#endregion
|
|
1751
1765
|
//#region extensions/msteams/src/reply-stream-controller.ts
|
|
1752
|
-
const INFORMATIVE_STATUS_TEXTS = [
|
|
1753
|
-
"Thinking...",
|
|
1754
|
-
"Working on that...",
|
|
1755
|
-
"Checking the details...",
|
|
1756
|
-
"Putting an answer together..."
|
|
1757
|
-
];
|
|
1758
|
-
function pickInformativeStatusText(random = Math.random) {
|
|
1759
|
-
return INFORMATIVE_STATUS_TEXTS[Math.floor(random() * INFORMATIVE_STATUS_TEXTS.length)] ?? INFORMATIVE_STATUS_TEXTS[0];
|
|
1760
|
-
}
|
|
1761
1766
|
function createTeamsReplyStreamController(params) {
|
|
1762
|
-
const
|
|
1767
|
+
const isPersonal = normalizeOptionalLowercaseString(params.conversationType) === "personal";
|
|
1768
|
+
const streamMode = resolveChannelPreviewStreamMode(params.msteamsConfig, "partial");
|
|
1769
|
+
const shouldUseNativeStream = isPersonal && (streamMode === "partial" || streamMode === "progress");
|
|
1770
|
+
const shouldSuppressDefaultToolProgressMessages = shouldUseNativeStream && streamMode === "progress";
|
|
1771
|
+
const shouldStreamPreviewToolProgress = shouldSuppressDefaultToolProgressMessages && resolveChannelStreamingPreviewToolProgress(params.msteamsConfig);
|
|
1772
|
+
const stream = shouldUseNativeStream ? new TeamsHttpStream({
|
|
1763
1773
|
sendActivity: (activity) => params.context.sendActivity(activity),
|
|
1764
1774
|
feedbackLoopEnabled: params.feedbackLoopEnabled,
|
|
1765
1775
|
onError: (err) => {
|
|
@@ -1768,35 +1778,91 @@ function createTeamsReplyStreamController(params) {
|
|
|
1768
1778
|
}) : void 0;
|
|
1769
1779
|
let streamReceivedTokens = false;
|
|
1770
1780
|
let informativeUpdateSent = false;
|
|
1781
|
+
let progressLines = [];
|
|
1782
|
+
let lastInformativeText = "";
|
|
1771
1783
|
let pendingFinalize;
|
|
1784
|
+
const renderInformativeUpdate = async () => {
|
|
1785
|
+
if (!stream) return;
|
|
1786
|
+
const informativeText = formatChannelProgressDraftText({
|
|
1787
|
+
entry: params.msteamsConfig,
|
|
1788
|
+
lines: shouldStreamPreviewToolProgress ? progressLines : [],
|
|
1789
|
+
seed: params.progressSeed,
|
|
1790
|
+
bullet: "-"
|
|
1791
|
+
});
|
|
1792
|
+
if (!informativeText || informativeText === lastInformativeText) return;
|
|
1793
|
+
lastInformativeText = informativeText;
|
|
1794
|
+
informativeUpdateSent = true;
|
|
1795
|
+
await stream.sendInformativeUpdate(informativeText);
|
|
1796
|
+
};
|
|
1797
|
+
const progressDraftGate = createChannelProgressDraftGate({ onStart: renderInformativeUpdate });
|
|
1798
|
+
const noteProgressWork = async (options) => {
|
|
1799
|
+
if (!stream || streamMode !== "progress") return;
|
|
1800
|
+
if (options?.toolName !== void 0 && !isChannelProgressDraftWorkToolName(options.toolName)) return;
|
|
1801
|
+
const hadStarted = progressDraftGate.hasStarted;
|
|
1802
|
+
await progressDraftGate.noteWork();
|
|
1803
|
+
if (hadStarted && progressDraftGate.hasStarted) await renderInformativeUpdate();
|
|
1804
|
+
};
|
|
1805
|
+
const pushProgressLine = async (line, options) => {
|
|
1806
|
+
if (!stream || streamMode !== "progress") return;
|
|
1807
|
+
if (options?.toolName !== void 0 && !isChannelProgressDraftWorkToolName(options.toolName)) return;
|
|
1808
|
+
if (shouldStreamPreviewToolProgress) {
|
|
1809
|
+
const normalized = line?.replace(/\s+/g, " ").trim();
|
|
1810
|
+
if (normalized) {
|
|
1811
|
+
if (progressLines.at(-1) !== normalized) progressLines = [...progressLines, normalized].slice(-resolveChannelProgressDraftMaxLines(params.msteamsConfig));
|
|
1812
|
+
}
|
|
1813
|
+
}
|
|
1814
|
+
await noteProgressWork();
|
|
1815
|
+
};
|
|
1816
|
+
const fallbackAfterStreamFailure = (payload, hasMedia) => {
|
|
1817
|
+
if (!payload.text) return payload;
|
|
1818
|
+
const streamedLength = stream?.streamedLength ?? 0;
|
|
1819
|
+
if (streamedLength <= 0) return payload;
|
|
1820
|
+
const remainingText = payload.text.slice(streamedLength);
|
|
1821
|
+
if (!remainingText) return hasMedia ? {
|
|
1822
|
+
...payload,
|
|
1823
|
+
text: void 0
|
|
1824
|
+
} : void 0;
|
|
1825
|
+
return {
|
|
1826
|
+
...payload,
|
|
1827
|
+
text: remainingText
|
|
1828
|
+
};
|
|
1829
|
+
};
|
|
1772
1830
|
return {
|
|
1773
|
-
async onReplyStart() {
|
|
1774
|
-
|
|
1775
|
-
|
|
1776
|
-
await stream.sendInformativeUpdate(pickInformativeStatusText(params.random));
|
|
1831
|
+
async onReplyStart() {},
|
|
1832
|
+
async noteProgressWork(options) {
|
|
1833
|
+
await noteProgressWork(options);
|
|
1777
1834
|
},
|
|
1778
1835
|
onPartialReply(payload) {
|
|
1779
1836
|
if (!stream || !payload.text) return;
|
|
1837
|
+
if (streamMode === "progress") return;
|
|
1780
1838
|
streamReceivedTokens = true;
|
|
1781
1839
|
stream.update(payload.text);
|
|
1782
1840
|
},
|
|
1783
|
-
|
|
1784
|
-
|
|
1841
|
+
async pushProgressLine(line, options) {
|
|
1842
|
+
await pushProgressLine(line, options);
|
|
1843
|
+
},
|
|
1844
|
+
shouldSuppressDefaultToolProgressMessages() {
|
|
1845
|
+
return shouldSuppressDefaultToolProgressMessages;
|
|
1846
|
+
},
|
|
1847
|
+
shouldStreamPreviewToolProgress() {
|
|
1848
|
+
return shouldStreamPreviewToolProgress;
|
|
1849
|
+
},
|
|
1850
|
+
async preparePayload(payload) {
|
|
1785
1851
|
const hasMedia = Boolean(payload.mediaUrl || payload.mediaUrls?.length);
|
|
1786
|
-
if (stream.
|
|
1787
|
-
streamReceivedTokens = false;
|
|
1852
|
+
if (stream && streamMode === "progress" && informativeUpdateSent && !stream.isFinalized) {
|
|
1788
1853
|
if (!payload.text) return payload;
|
|
1789
|
-
const
|
|
1790
|
-
|
|
1791
|
-
|
|
1792
|
-
|
|
1854
|
+
const finalized = await stream.replaceInformativeWithFinal(payload.text);
|
|
1855
|
+
informativeUpdateSent = false;
|
|
1856
|
+
if (!finalized || stream.isFailed) return payload;
|
|
1857
|
+
return hasMedia ? {
|
|
1793
1858
|
...payload,
|
|
1794
1859
|
text: void 0
|
|
1795
1860
|
} : void 0;
|
|
1796
|
-
|
|
1797
|
-
|
|
1798
|
-
|
|
1799
|
-
|
|
1861
|
+
}
|
|
1862
|
+
if (!stream || !streamReceivedTokens) return payload;
|
|
1863
|
+
if (stream.isFailed) {
|
|
1864
|
+
streamReceivedTokens = false;
|
|
1865
|
+
return fallbackAfterStreamFailure(payload, hasMedia);
|
|
1800
1866
|
}
|
|
1801
1867
|
if (!stream.hasContent || stream.isFinalized) return payload;
|
|
1802
1868
|
streamReceivedTokens = false;
|
|
@@ -1808,6 +1874,7 @@ function createTeamsReplyStreamController(params) {
|
|
|
1808
1874
|
};
|
|
1809
1875
|
},
|
|
1810
1876
|
async finalize() {
|
|
1877
|
+
progressDraftGate.cancel();
|
|
1811
1878
|
await pendingFinalize;
|
|
1812
1879
|
await stream?.finalize();
|
|
1813
1880
|
},
|
|
@@ -1918,10 +1985,13 @@ function createMSTeamsReplyDispatcher(params) {
|
|
|
1918
1985
|
conversationType,
|
|
1919
1986
|
context: params.context,
|
|
1920
1987
|
feedbackLoopEnabled,
|
|
1921
|
-
log: params.log
|
|
1988
|
+
log: params.log,
|
|
1989
|
+
msteamsConfig: msteamsCfg,
|
|
1990
|
+
progressSeed: `${params.accountId ?? "default"}:${params.conversationRef.conversation?.id ?? ""}`
|
|
1922
1991
|
});
|
|
1923
1992
|
streamActiveRef.current = () => streamController.isStreamActive();
|
|
1924
|
-
const
|
|
1993
|
+
const resolvedBlockStreamingEnabled = resolveChannelPreviewStreamMode(msteamsCfg, "partial") === "block" ? true : resolveChannelStreamingBlockEnabled(msteamsCfg);
|
|
1994
|
+
const blockStreamingEnabled = resolvedBlockStreamingEnabled ?? false;
|
|
1925
1995
|
const typingIndicatorEnabled = typeof msteamsCfg?.typingIndicator === "boolean" ? msteamsCfg.typingIndicator : true;
|
|
1926
1996
|
const pendingMessages = [];
|
|
1927
1997
|
const sendMessages = async (messages) => {
|
|
@@ -2003,7 +2073,7 @@ function createMSTeamsReplyDispatcher(params) {
|
|
|
2003
2073
|
},
|
|
2004
2074
|
typingCallbacks,
|
|
2005
2075
|
deliver: async (payload) => {
|
|
2006
|
-
const preparedPayload = streamController.preparePayload(payload);
|
|
2076
|
+
const preparedPayload = await streamController.preparePayload(payload);
|
|
2007
2077
|
if (!preparedPayload) return;
|
|
2008
2078
|
const messages = renderReplyPayloadsToMessages([preparedPayload], {
|
|
2009
2079
|
textChunkLimit: params.textLimit,
|
|
@@ -2051,8 +2121,97 @@ function createMSTeamsReplyDispatcher(params) {
|
|
|
2051
2121
|
dispatcher,
|
|
2052
2122
|
replyOptions: {
|
|
2053
2123
|
...replyOptions,
|
|
2054
|
-
...streamController.hasStream() ? {
|
|
2055
|
-
|
|
2124
|
+
...streamController.hasStream() ? {
|
|
2125
|
+
onPartialReply: (payload) => streamController.onPartialReply(payload),
|
|
2126
|
+
onToolStart: async (payload) => {
|
|
2127
|
+
await streamController.noteProgressWork({ toolName: payload.name });
|
|
2128
|
+
},
|
|
2129
|
+
onItemEvent: async () => {
|
|
2130
|
+
await streamController.noteProgressWork();
|
|
2131
|
+
},
|
|
2132
|
+
onPlanUpdate: async (payload) => {
|
|
2133
|
+
if (payload.phase === "update") await streamController.noteProgressWork();
|
|
2134
|
+
},
|
|
2135
|
+
onApprovalEvent: async (payload) => {
|
|
2136
|
+
if (payload.phase === "requested") await streamController.noteProgressWork();
|
|
2137
|
+
},
|
|
2138
|
+
onCommandOutput: async (payload) => {
|
|
2139
|
+
if (payload.phase === "end") await streamController.noteProgressWork();
|
|
2140
|
+
},
|
|
2141
|
+
onPatchSummary: async (payload) => {
|
|
2142
|
+
if (payload.phase === "end") await streamController.noteProgressWork();
|
|
2143
|
+
}
|
|
2144
|
+
} : {},
|
|
2145
|
+
...streamController.shouldSuppressDefaultToolProgressMessages() ? { suppressDefaultToolProgressMessages: true } : {},
|
|
2146
|
+
...streamController.shouldStreamPreviewToolProgress() ? {
|
|
2147
|
+
onToolStart: async (payload) => {
|
|
2148
|
+
await streamController.pushProgressLine(formatChannelProgressDraftLine({
|
|
2149
|
+
event: "tool",
|
|
2150
|
+
name: payload.name,
|
|
2151
|
+
phase: payload.phase,
|
|
2152
|
+
args: payload.args
|
|
2153
|
+
}), { toolName: payload.name });
|
|
2154
|
+
},
|
|
2155
|
+
onItemEvent: async (payload) => {
|
|
2156
|
+
await streamController.pushProgressLine(formatChannelProgressDraftLine({
|
|
2157
|
+
event: "item",
|
|
2158
|
+
itemKind: payload.kind,
|
|
2159
|
+
title: payload.title,
|
|
2160
|
+
name: payload.name,
|
|
2161
|
+
phase: payload.phase,
|
|
2162
|
+
status: payload.status,
|
|
2163
|
+
summary: payload.summary,
|
|
2164
|
+
progressText: payload.progressText,
|
|
2165
|
+
meta: payload.meta
|
|
2166
|
+
}));
|
|
2167
|
+
},
|
|
2168
|
+
onPlanUpdate: async (payload) => {
|
|
2169
|
+
if (payload.phase !== "update") return;
|
|
2170
|
+
await streamController.pushProgressLine(formatChannelProgressDraftLine({
|
|
2171
|
+
event: "plan",
|
|
2172
|
+
phase: payload.phase,
|
|
2173
|
+
title: payload.title,
|
|
2174
|
+
explanation: payload.explanation,
|
|
2175
|
+
steps: payload.steps
|
|
2176
|
+
}));
|
|
2177
|
+
},
|
|
2178
|
+
onApprovalEvent: async (payload) => {
|
|
2179
|
+
if (payload.phase !== "requested") return;
|
|
2180
|
+
await streamController.pushProgressLine(formatChannelProgressDraftLine({
|
|
2181
|
+
event: "approval",
|
|
2182
|
+
phase: payload.phase,
|
|
2183
|
+
title: payload.title,
|
|
2184
|
+
command: payload.command,
|
|
2185
|
+
reason: payload.reason,
|
|
2186
|
+
message: payload.message
|
|
2187
|
+
}));
|
|
2188
|
+
},
|
|
2189
|
+
onCommandOutput: async (payload) => {
|
|
2190
|
+
if (payload.phase !== "end") return;
|
|
2191
|
+
await streamController.pushProgressLine(formatChannelProgressDraftLine({
|
|
2192
|
+
event: "command-output",
|
|
2193
|
+
phase: payload.phase,
|
|
2194
|
+
title: payload.title,
|
|
2195
|
+
name: payload.name,
|
|
2196
|
+
status: payload.status,
|
|
2197
|
+
exitCode: payload.exitCode
|
|
2198
|
+
}));
|
|
2199
|
+
},
|
|
2200
|
+
onPatchSummary: async (payload) => {
|
|
2201
|
+
if (payload.phase !== "end") return;
|
|
2202
|
+
await streamController.pushProgressLine(formatChannelProgressDraftLine({
|
|
2203
|
+
event: "patch",
|
|
2204
|
+
phase: payload.phase,
|
|
2205
|
+
title: payload.title,
|
|
2206
|
+
name: payload.name,
|
|
2207
|
+
added: payload.added,
|
|
2208
|
+
modified: payload.modified,
|
|
2209
|
+
deleted: payload.deleted,
|
|
2210
|
+
summary: payload.summary
|
|
2211
|
+
}));
|
|
2212
|
+
}
|
|
2213
|
+
} : {},
|
|
2214
|
+
disableBlockStreaming: typeof resolvedBlockStreamingEnabled === "boolean" ? !resolvedBlockStreamingEnabled : void 0,
|
|
2056
2215
|
onModelSelected
|
|
2057
2216
|
},
|
|
2058
2217
|
markDispatchIdle
|
package/dist/test-api.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as msteamsPlugin } from "./channel-
|
|
1
|
+
import { t as msteamsPlugin } from "./channel-_BNxPm8L.js";
|
|
2
2
|
export { msteamsPlugin };
|
package/openclaw.plugin.json
CHANGED
|
@@ -225,6 +225,130 @@
|
|
|
225
225
|
"newline"
|
|
226
226
|
]
|
|
227
227
|
},
|
|
228
|
+
"streaming": {
|
|
229
|
+
"type": "object",
|
|
230
|
+
"properties": {
|
|
231
|
+
"mode": {
|
|
232
|
+
"type": "string",
|
|
233
|
+
"enum": [
|
|
234
|
+
"off",
|
|
235
|
+
"partial",
|
|
236
|
+
"block",
|
|
237
|
+
"progress"
|
|
238
|
+
]
|
|
239
|
+
},
|
|
240
|
+
"chunkMode": {
|
|
241
|
+
"type": "string",
|
|
242
|
+
"enum": [
|
|
243
|
+
"length",
|
|
244
|
+
"newline"
|
|
245
|
+
]
|
|
246
|
+
},
|
|
247
|
+
"preview": {
|
|
248
|
+
"type": "object",
|
|
249
|
+
"properties": {
|
|
250
|
+
"chunk": {
|
|
251
|
+
"type": "object",
|
|
252
|
+
"properties": {
|
|
253
|
+
"minChars": {
|
|
254
|
+
"type": "integer",
|
|
255
|
+
"exclusiveMinimum": 0,
|
|
256
|
+
"maximum": 9007199254740991
|
|
257
|
+
},
|
|
258
|
+
"maxChars": {
|
|
259
|
+
"type": "integer",
|
|
260
|
+
"exclusiveMinimum": 0,
|
|
261
|
+
"maximum": 9007199254740991
|
|
262
|
+
},
|
|
263
|
+
"breakPreference": {
|
|
264
|
+
"anyOf": [
|
|
265
|
+
{
|
|
266
|
+
"type": "string",
|
|
267
|
+
"const": "paragraph"
|
|
268
|
+
},
|
|
269
|
+
{
|
|
270
|
+
"type": "string",
|
|
271
|
+
"const": "newline"
|
|
272
|
+
},
|
|
273
|
+
{
|
|
274
|
+
"type": "string",
|
|
275
|
+
"const": "sentence"
|
|
276
|
+
}
|
|
277
|
+
]
|
|
278
|
+
}
|
|
279
|
+
},
|
|
280
|
+
"additionalProperties": false
|
|
281
|
+
},
|
|
282
|
+
"toolProgress": {
|
|
283
|
+
"type": "boolean"
|
|
284
|
+
}
|
|
285
|
+
},
|
|
286
|
+
"additionalProperties": false
|
|
287
|
+
},
|
|
288
|
+
"progress": {
|
|
289
|
+
"type": "object",
|
|
290
|
+
"properties": {
|
|
291
|
+
"label": {
|
|
292
|
+
"anyOf": [
|
|
293
|
+
{
|
|
294
|
+
"type": "string"
|
|
295
|
+
},
|
|
296
|
+
{
|
|
297
|
+
"type": "boolean",
|
|
298
|
+
"const": false
|
|
299
|
+
}
|
|
300
|
+
]
|
|
301
|
+
},
|
|
302
|
+
"labels": {
|
|
303
|
+
"type": "array",
|
|
304
|
+
"items": {
|
|
305
|
+
"type": "string"
|
|
306
|
+
}
|
|
307
|
+
},
|
|
308
|
+
"maxLines": {
|
|
309
|
+
"type": "integer",
|
|
310
|
+
"exclusiveMinimum": 0,
|
|
311
|
+
"maximum": 9007199254740991
|
|
312
|
+
},
|
|
313
|
+
"toolProgress": {
|
|
314
|
+
"type": "boolean"
|
|
315
|
+
}
|
|
316
|
+
},
|
|
317
|
+
"additionalProperties": false
|
|
318
|
+
},
|
|
319
|
+
"block": {
|
|
320
|
+
"type": "object",
|
|
321
|
+
"properties": {
|
|
322
|
+
"enabled": {
|
|
323
|
+
"type": "boolean"
|
|
324
|
+
},
|
|
325
|
+
"coalesce": {
|
|
326
|
+
"type": "object",
|
|
327
|
+
"properties": {
|
|
328
|
+
"minChars": {
|
|
329
|
+
"type": "integer",
|
|
330
|
+
"exclusiveMinimum": 0,
|
|
331
|
+
"maximum": 9007199254740991
|
|
332
|
+
},
|
|
333
|
+
"maxChars": {
|
|
334
|
+
"type": "integer",
|
|
335
|
+
"exclusiveMinimum": 0,
|
|
336
|
+
"maximum": 9007199254740991
|
|
337
|
+
},
|
|
338
|
+
"idleMs": {
|
|
339
|
+
"type": "integer",
|
|
340
|
+
"minimum": 0,
|
|
341
|
+
"maximum": 9007199254740991
|
|
342
|
+
}
|
|
343
|
+
},
|
|
344
|
+
"additionalProperties": false
|
|
345
|
+
}
|
|
346
|
+
},
|
|
347
|
+
"additionalProperties": false
|
|
348
|
+
}
|
|
349
|
+
},
|
|
350
|
+
"additionalProperties": false
|
|
351
|
+
},
|
|
228
352
|
"typingIndicator": {
|
|
229
353
|
"type": "boolean"
|
|
230
354
|
},
|
|
@@ -554,6 +678,26 @@
|
|
|
554
678
|
"configWrites": {
|
|
555
679
|
"label": "MS Teams Config Writes",
|
|
556
680
|
"help": "Allow Microsoft Teams to write config in response to channel events/commands (default: true)."
|
|
681
|
+
},
|
|
682
|
+
"streaming": {
|
|
683
|
+
"label": "MS Teams Streaming",
|
|
684
|
+
"help": "Microsoft Teams preview/progress streaming mode: \"off\" | \"partial\" | \"block\" | \"progress\". Personal chats use Teams native streaminfo progress when available."
|
|
685
|
+
},
|
|
686
|
+
"streaming.progress.label": {
|
|
687
|
+
"label": "MS Teams Progress Label",
|
|
688
|
+
"help": "Initial progress title. Use \"auto\" for built-in single-word labels, a custom string, or false to hide the title."
|
|
689
|
+
},
|
|
690
|
+
"streaming.progress.labels": {
|
|
691
|
+
"label": "MS Teams Progress Label Pool",
|
|
692
|
+
"help": "Candidate labels for streaming.progress.label=\"auto\". Leave unset to use OpenClaw built-in progress labels."
|
|
693
|
+
},
|
|
694
|
+
"streaming.progress.maxLines": {
|
|
695
|
+
"label": "MS Teams Progress Max Lines",
|
|
696
|
+
"help": "Maximum number of compact progress lines to keep below the progress title (default: 8)."
|
|
697
|
+
},
|
|
698
|
+
"streaming.progress.toolProgress": {
|
|
699
|
+
"label": "MS Teams Progress Tool Lines",
|
|
700
|
+
"help": "Show compact tool/progress lines in progress mode (default: true). Set false to keep only the title until final delivery."
|
|
557
701
|
}
|
|
558
702
|
}
|
|
559
703
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openclaw/msteams",
|
|
3
|
-
"version": "2026.5.3
|
|
3
|
+
"version": "2026.5.3",
|
|
4
4
|
"description": "OpenClaw Microsoft Teams channel plugin",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
"openclaw": "workspace:*"
|
|
23
23
|
},
|
|
24
24
|
"peerDependencies": {
|
|
25
|
-
"openclaw": ">=2026.5.3
|
|
25
|
+
"openclaw": ">=2026.5.3"
|
|
26
26
|
},
|
|
27
27
|
"peerDependenciesMeta": {
|
|
28
28
|
"openclaw": {
|
|
@@ -58,10 +58,10 @@
|
|
|
58
58
|
"minHostVersion": ">=2026.4.10"
|
|
59
59
|
},
|
|
60
60
|
"compat": {
|
|
61
|
-
"pluginApi": ">=2026.5.3
|
|
61
|
+
"pluginApi": ">=2026.5.3"
|
|
62
62
|
},
|
|
63
63
|
"build": {
|
|
64
|
-
"openclawVersion": "2026.5.3
|
|
64
|
+
"openclawVersion": "2026.5.3"
|
|
65
65
|
},
|
|
66
66
|
"release": {
|
|
67
67
|
"publishToClawHub": true,
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { MSTeamsConfigSchema, buildChannelConfigSchema } from "openclaw/plugin-sdk/bundled-channel-config-schema";
|
|
2
|
-
//#endregion
|
|
3
|
-
//#region extensions/msteams/src/config-schema.ts
|
|
4
|
-
const MSTeamsChannelConfigSchema = buildChannelConfigSchema(MSTeamsConfigSchema, { uiHints: {
|
|
5
|
-
"": {
|
|
6
|
-
label: "MS Teams",
|
|
7
|
-
help: "Microsoft Teams channel provider configuration and provider-specific policy toggles. Use this section to isolate Teams behavior from other enterprise chat providers."
|
|
8
|
-
},
|
|
9
|
-
configWrites: {
|
|
10
|
-
label: "MS Teams Config Writes",
|
|
11
|
-
help: "Allow Microsoft Teams to write config in response to channel events/commands (default: true)."
|
|
12
|
-
}
|
|
13
|
-
} });
|
|
14
|
-
//#endregion
|
|
15
|
-
export { MSTeamsChannelConfigSchema as t };
|