@openclaw/mattermost 2026.7.2-beta.4 → 2026.7.2-beta.5
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/{accounts-B-GrNVwP.js → accounts-BR6Nl5Qf.js} +8 -20
- package/dist/api.js +2 -2
- package/dist/channel-plugin-api.js +1 -1
- package/dist/{channel-plugin-runtime-CgRXlOvV.js → channel-plugin-runtime-DLBTUlbh.js} +2 -2
- package/dist/channel-plugin-runtime.js +1 -1
- package/dist/{channel.runtime-VRis1MN2.js → channel.runtime-CR1V5M8l.js} +1659 -1806
- package/dist/{interactions-DODXaHdE.js → interactions-B4gg-KRm.js} +1 -1
- package/dist/{monitor-auth-4zjr5tXP.js → monitor-auth-BOh6zLW9.js} +1 -1
- package/dist/policy-api.js +1 -1
- package/dist/runtime-api.js +1 -2
- package/dist/slash-route-api.js +1 -1
- package/dist/{slash-state-CFEaCLnp.js → slash-state-VCRdqj5F.js} +45 -59
- package/package.json +4 -5
- package/npm-shrinkwrap.json +0 -54
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { t as getMattermostRuntime } from "./runtime-CNB4YGqJ.js";
|
|
2
2
|
import { _ as updateMattermostPost } from "./client-w0lkxuKh.js";
|
|
3
|
-
import {
|
|
3
|
+
import { b as readRequestBodyWithLimit, m as isTrustedProxyAddress, w as resolveClientIp } from "./monitor-auth-BOh6zLW9.js";
|
|
4
4
|
import { createHmac } from "node:crypto";
|
|
5
5
|
import { safeEqualSecret } from "openclaw/plugin-sdk/security-runtime";
|
|
6
6
|
import { normalizeOptionalString, normalizeStringifiedOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
@@ -182,4 +182,4 @@ async function authorizeMattermostCommandInvocation(params) {
|
|
|
182
182
|
};
|
|
183
183
|
}
|
|
184
184
|
//#endregion
|
|
185
|
-
export {
|
|
185
|
+
export { resolveChannelMediaMaxBytes as C, warnMissingProviderGroupPolicyFallbackOnce as E, resolveAllowlistProviderRuntimeGroupPolicy as S, resolveDefaultGroupPolicy as T, logInboundDrop as _, normalizeMattermostAllowList as a, readRequestBodyWithLimit as b, DEFAULT_GROUP_HISTORY_LIMIT as c, createChannelMessageReplyPipeline as d, createChannelPairingController as f, loadOutboundMediaFromUrl as g, listSkillCommandsForAgents as h, normalizeMattermostAllowEntry as i, buildModelsProviderData as l, isTrustedProxyAddress as m, formatMattermostDirectMessageDropLog as n, resolveMattermostMonitorInboundAccess as o, isRequestBodyLimitError as p, isMattermostSenderAllowed as r, resolveMattermostTrustedChatKind as s, authorizeMattermostCommandInvocation as t, createChannelHistoryWindow as u, logTypingFailure as v, resolveClientIp as w, registerPluginHttpRoute as x, parseTcpPort as y };
|
package/dist/policy-api.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { r as isMattermostSenderAllowed } from "./monitor-auth-
|
|
1
|
+
import { r as isMattermostSenderAllowed } from "./monitor-auth-BOh6zLW9.js";
|
|
2
2
|
export { isMattermostSenderAllowed };
|
package/dist/runtime-api.js
CHANGED
|
@@ -17,8 +17,7 @@ import { DEFAULT_ACCOUNT_ID, buildChannelConfigSchema, createDedupeCache, isTrus
|
|
|
17
17
|
import { chunkTextForOutbound } from "openclaw/plugin-sdk/text-chunking";
|
|
18
18
|
import { applyAccountNameToChannelSection, applySetupAccountConfigPatch, migrateBaseNameToDefaultAccount } from "openclaw/plugin-sdk/setup";
|
|
19
19
|
import { buildComputedAccountStatusSnapshot } from "openclaw/plugin-sdk/channel-status";
|
|
20
|
-
import { buildAgentMediaPayload } from "openclaw/plugin-sdk/agent-media-payload";
|
|
21
20
|
import { resolveStorePath } from "openclaw/plugin-sdk/session-store-runtime";
|
|
22
21
|
import { normalizeAccountId, resolveThreadSessionKeys } from "openclaw/plugin-sdk/routing";
|
|
23
22
|
import { normalizeProviderId } from "openclaw/plugin-sdk/provider-model-shared";
|
|
24
|
-
export { DEFAULT_ACCOUNT_ID, DEFAULT_GROUP_HISTORY_LIMIT, GROUP_POLICY_BLOCKED_LABEL, applyAccountNameToChannelSection, applySetupAccountConfigPatch,
|
|
23
|
+
export { DEFAULT_ACCOUNT_ID, DEFAULT_GROUP_HISTORY_LIMIT, GROUP_POLICY_BLOCKED_LABEL, applyAccountNameToChannelSection, applySetupAccountConfigPatch, buildChannelConfigSchema, buildComputedAccountStatusSnapshot, buildModelsProviderData, buildPendingHistoryContextFromMap, chunkTextForOutbound, clearHistoryEntriesIfEnabled, createAccountStatusSink, createChannelHistoryWindow, createChannelMessageReplyPipeline, createChannelPairingController, createDedupeCache, formatInboundFromLabel, getAgentScopedMediaLocalRoots, isDangerousNameMatchingEnabled, isRequestBodyLimitError, isTrustedProxyAddress, listSkillCommandsForAgents, loadOutboundMediaFromUrl, logInboundDrop, logTypingFailure, migrateBaseNameToDefaultAccount, normalizeAccountId, normalizeProviderId, parseStrictPositiveInteger, rawDataToString, readRequestBodyWithLimit, recordPendingHistoryEntryIfEnabled, registerPluginHttpRoute, resolveAllowlistMatchSimple, resolveAllowlistProviderRuntimeGroupPolicy, resolveChannelMediaMaxBytes, resolveClientIp, resolveControlCommandGate, resolveDefaultGroupPolicy, resolveStorePath, resolveStoredModelOverride, resolveThreadSessionKeys, setMattermostRuntime, warnMissingProviderGroupPolicyFallbackOnce };
|
package/dist/slash-route-api.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { i as registerSlashCommandRoute } from "./slash-state-
|
|
1
|
+
import { i as registerSlashCommandRoute } from "./slash-state-VCRdqj5F.js";
|
|
2
2
|
export { registerSlashCommandRoute };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { t as getMattermostRuntime } from "./runtime-CNB4YGqJ.js";
|
|
2
2
|
import { a as createMattermostPost, c as fetchMattermostChannelByName, d as fetchMattermostUserByUsername, f as fetchMattermostUserTeams, g as sendMattermostTyping, h as resolveMattermostReplyDeliveryBarrierTimeoutMs, i as createMattermostDirectChannelWithRetry, l as fetchMattermostMe, p as normalizeMattermostBaseUrl, r as createMattermostClient, s as fetchMattermostChannel, u as fetchMattermostUser, v as uploadMattermostFile } from "./client-w0lkxuKh.js";
|
|
3
|
-
import {
|
|
4
|
-
import { c as setInteractionSecret, n as buildButtonProps, o as resolveInteractionCallbackUrl } from "./interactions-
|
|
5
|
-
import { r as resolveMattermostAccount } from "./accounts-
|
|
3
|
+
import { a as normalizeMattermostAllowList, b as readRequestBodyWithLimit, g as loadOutboundMediaFromUrl, l as buildModelsProviderData, p as isRequestBodyLimitError, t as authorizeMattermostCommandInvocation, v as logTypingFailure } from "./monitor-auth-BOh6zLW9.js";
|
|
4
|
+
import { c as setInteractionSecret, n as buildButtonProps, o as resolveInteractionCallbackUrl } from "./interactions-B4gg-KRm.js";
|
|
5
|
+
import { r as resolveMattermostAccount } from "./accounts-BR6Nl5Qf.js";
|
|
6
6
|
import { createHash } from "node:crypto";
|
|
7
7
|
import { safeEqualSecret } from "openclaw/plugin-sdk/security-runtime";
|
|
8
8
|
import { normalizeLowercaseStringOrEmpty, normalizeOptionalString, normalizeStringifiedOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
@@ -12,7 +12,7 @@ import { createMessageReceiptFromOutboundResults } from "openclaw/plugin-sdk/cha
|
|
|
12
12
|
import { resolveStoredModelOverride } from "openclaw/plugin-sdk/command-auth-native";
|
|
13
13
|
import { getAgentScopedMediaLocalRoots } from "openclaw/plugin-sdk/media-runtime";
|
|
14
14
|
import { deliverTextOrMediaReply, isReasoningReplyPayload, resolveSendableOutboundReplyParts } from "openclaw/plugin-sdk/reply-payload";
|
|
15
|
-
import { convertMarkdownTables } from "openclaw/plugin-sdk/text-chunking";
|
|
15
|
+
import { FormatCapabilityProfile, convertMarkdownTables } from "openclaw/plugin-sdk/text-chunking";
|
|
16
16
|
import { getSessionEntry, resolveStorePath } from "openclaw/plugin-sdk/session-store-runtime";
|
|
17
17
|
import { normalizeProviderId } from "openclaw/plugin-sdk/provider-model-shared";
|
|
18
18
|
import { Readable } from "node:stream";
|
|
@@ -661,6 +661,12 @@ function createMattermostReplyDeliveryBarrier(params) {
|
|
|
661
661
|
resolveTimeoutPolicy
|
|
662
662
|
};
|
|
663
663
|
}
|
|
664
|
+
function toMattermostChannelDeliveryResult(outcome) {
|
|
665
|
+
return outcome === "text" || outcome === "media" ? { visibleReplySent: true } : {
|
|
666
|
+
visibleReplySent: false,
|
|
667
|
+
suppression: { reason: "no_visible_result" }
|
|
668
|
+
};
|
|
669
|
+
}
|
|
664
670
|
async function deliverMattermostReplyPayload(params) {
|
|
665
671
|
if (isReasoningReplyPayload(params.payload)) return "reasoning_skipped";
|
|
666
672
|
const reply = resolveSendableOutboundReplyParts(params.payload, { text: params.core.channel.text.convertMarkdownTables(params.payload.text ?? "", params.tableMode) });
|
|
@@ -827,32 +833,13 @@ async function resolveMattermostOpaqueTarget(params) {
|
|
|
827
833
|
//#region extensions/mattermost/src/mattermost/send.ts
|
|
828
834
|
const MATTERMOST_BOT_USER_CACHE_MAX_ENTRIES = 64;
|
|
829
835
|
const MATTERMOST_TARGET_CACHE_MAX_ENTRIES = 1024;
|
|
830
|
-
const MATTERMOST_FORMAT_PROFILE = {
|
|
836
|
+
const MATTERMOST_FORMAT_PROFILE = FormatCapabilityProfile.define({
|
|
831
837
|
mechanism: "markdown",
|
|
832
|
-
constructs: {
|
|
833
|
-
bold: "native",
|
|
834
|
-
italic: "native",
|
|
835
|
-
underline: "native",
|
|
836
|
-
strikethrough: "native",
|
|
837
|
-
spoiler: "native",
|
|
838
|
-
codeInline: "native",
|
|
839
|
-
codeBlock: "native",
|
|
840
|
-
codeLanguage: "native",
|
|
841
|
-
linkLabel: "native",
|
|
842
|
-
heading: "native",
|
|
843
|
-
bulletList: "native",
|
|
844
|
-
orderedList: "native",
|
|
845
|
-
taskList: "native",
|
|
846
|
-
table: "native",
|
|
847
|
-
blockquote: "native",
|
|
848
|
-
image: "native",
|
|
849
|
-
mention: "native"
|
|
850
|
-
},
|
|
851
838
|
chunk: {
|
|
852
839
|
limit: 16383,
|
|
853
840
|
unit: "chars"
|
|
854
841
|
}
|
|
855
|
-
};
|
|
842
|
+
});
|
|
856
843
|
function renderMattermostMarkdown(markdown, tableMode) {
|
|
857
844
|
return tableMode === "off" && MATTERMOST_FORMAT_PROFILE.constructs.table === "native" ? markdown : convertMarkdownTables(markdown, tableMode);
|
|
858
845
|
}
|
|
@@ -1648,38 +1635,24 @@ async function handleSlashCommandAsync(params) {
|
|
|
1648
1635
|
channel: "mattermost",
|
|
1649
1636
|
accountId: account.accountId
|
|
1650
1637
|
});
|
|
1651
|
-
const { onModelSelected, typingCallbacks, ...replyPipeline } = createChannelMessageReplyPipeline({
|
|
1652
|
-
cfg,
|
|
1653
|
-
agentId: route.agentId,
|
|
1654
|
-
channel: "mattermost",
|
|
1655
|
-
accountId: account.accountId,
|
|
1656
|
-
typing: {
|
|
1657
|
-
start: () => sendMattermostTyping(client, { channelId }),
|
|
1658
|
-
onStartError: (err) => {
|
|
1659
|
-
logTypingFailure({
|
|
1660
|
-
log: (message) => log?.(message),
|
|
1661
|
-
channel: "mattermost",
|
|
1662
|
-
target: channelId,
|
|
1663
|
-
error: err
|
|
1664
|
-
});
|
|
1665
|
-
}
|
|
1666
|
-
}
|
|
1667
|
-
});
|
|
1668
1638
|
const humanDelay = resolveHumanDelayConfig(cfg, route.agentId);
|
|
1669
1639
|
const deliveryBarrier = createMattermostReplyDeliveryBarrier({
|
|
1670
1640
|
isDirect: kind === "direct",
|
|
1671
1641
|
dmRetryOptions: account.config.dmChannelRetry
|
|
1672
1642
|
});
|
|
1673
|
-
await core.channel.
|
|
1674
|
-
ctx: ctxPayload,
|
|
1643
|
+
await core.channel.inbound.dispatch({
|
|
1675
1644
|
cfg,
|
|
1676
|
-
|
|
1677
|
-
|
|
1678
|
-
|
|
1679
|
-
|
|
1680
|
-
|
|
1645
|
+
channel: "mattermost",
|
|
1646
|
+
accountId: account.accountId,
|
|
1647
|
+
route: {
|
|
1648
|
+
agentId: route.agentId,
|
|
1649
|
+
dmScope: route.dmScope,
|
|
1650
|
+
sessionKey: route.sessionKey
|
|
1651
|
+
},
|
|
1652
|
+
ctxPayload,
|
|
1653
|
+
delivery: {
|
|
1681
1654
|
deliver: async (payload) => {
|
|
1682
|
-
await deliverMattermostReplyPayload({
|
|
1655
|
+
const result = toMattermostChannelDeliveryResult(await deliverMattermostReplyPayload({
|
|
1683
1656
|
core,
|
|
1684
1657
|
cfg,
|
|
1685
1658
|
payload,
|
|
@@ -1690,18 +1663,31 @@ async function handleSlashCommandAsync(params) {
|
|
|
1690
1663
|
tableMode,
|
|
1691
1664
|
sendMessage: sendMessageMattermost,
|
|
1692
1665
|
onDmChannelResolution: deliveryBarrier.trackDmChannelResolution
|
|
1693
|
-
});
|
|
1694
|
-
runtime.log?.(`delivered slash reply to ${to}`);
|
|
1666
|
+
}));
|
|
1667
|
+
if (result.visibleReplySent) runtime.log?.(`delivered slash reply to ${to}`);
|
|
1668
|
+
return result;
|
|
1695
1669
|
},
|
|
1696
1670
|
onError: (err, info) => {
|
|
1697
1671
|
runtime.error?.(`mattermost slash ${info.kind} reply failed: ${sanitizeCommandLookupError(err)}`);
|
|
1698
|
-
}
|
|
1699
|
-
typingCallbacks
|
|
1672
|
+
}
|
|
1700
1673
|
},
|
|
1701
|
-
|
|
1702
|
-
|
|
1703
|
-
|
|
1704
|
-
|
|
1674
|
+
replyPipeline: { typing: {
|
|
1675
|
+
start: () => sendMattermostTyping(client, { channelId }),
|
|
1676
|
+
onStartError: (err) => {
|
|
1677
|
+
logTypingFailure({
|
|
1678
|
+
log: (message) => log?.(message),
|
|
1679
|
+
channel: "mattermost",
|
|
1680
|
+
target: channelId,
|
|
1681
|
+
error: err
|
|
1682
|
+
});
|
|
1683
|
+
}
|
|
1684
|
+
} },
|
|
1685
|
+
dispatcherOptions: {
|
|
1686
|
+
resolveFollowupAdmissionBarrierTimeoutPolicy: deliveryBarrier.resolveTimeoutPolicy,
|
|
1687
|
+
onDeliverySettled: deliveryBarrier.markDeliverySettled,
|
|
1688
|
+
humanDelay
|
|
1689
|
+
},
|
|
1690
|
+
replyOptions: { disableBlockStreaming: typeof account.blockStreaming === "boolean" ? !account.blockStreaming : void 0 }
|
|
1705
1691
|
});
|
|
1706
1692
|
}
|
|
1707
1693
|
//#endregion
|
|
@@ -1947,4 +1933,4 @@ function registerSlashCommandRoute(api) {
|
|
|
1947
1933
|
});
|
|
1948
1934
|
}
|
|
1949
1935
|
//#endregion
|
|
1950
|
-
export {
|
|
1936
|
+
export { isSlashCommandsEnabled as _, sendMessageMattermost as a, resolveSlashCommandConfig as b, deliverMattermostReplyPayload as c, parseMattermostModelPickerContext as d, renderMattermostModelsPickerView as f, cleanupSlashCommands as g, DEFAULT_COMMAND_SPECS as h, registerSlashCommandRoute as i, toMattermostChannelDeliveryResult as l, resolveMattermostModelPickerCurrentModel as m, deactivateSlashCommands as n, resolveMattermostOpaqueTarget as o, renderMattermostProviderPickerView as p, getSlashCommandState as r, createMattermostReplyDeliveryBarrier as s, activateSlashCommands as t, buildMattermostAllowedModelRefs as u, registerSlashCommands as v, resolveCallbackUrl as y };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openclaw/mattermost",
|
|
3
|
-
"version": "2026.7.2-beta.
|
|
3
|
+
"version": "2026.7.2-beta.5",
|
|
4
4
|
"description": "OpenClaw Mattermost channel plugin",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
"zod": "4.4.3"
|
|
13
13
|
},
|
|
14
14
|
"peerDependencies": {
|
|
15
|
-
"openclaw": ">=2026.7.2-beta.
|
|
15
|
+
"openclaw": ">=2026.7.2-beta.5"
|
|
16
16
|
},
|
|
17
17
|
"peerDependenciesMeta": {
|
|
18
18
|
"openclaw": {
|
|
@@ -87,10 +87,10 @@
|
|
|
87
87
|
"allowInvalidConfigRecovery": true
|
|
88
88
|
},
|
|
89
89
|
"compat": {
|
|
90
|
-
"pluginApi": ">=2026.7.2-beta.
|
|
90
|
+
"pluginApi": ">=2026.7.2-beta.5"
|
|
91
91
|
},
|
|
92
92
|
"build": {
|
|
93
|
-
"openclawVersion": "2026.7.2-beta.
|
|
93
|
+
"openclawVersion": "2026.7.2-beta.5",
|
|
94
94
|
"bundledDist": false
|
|
95
95
|
},
|
|
96
96
|
"release": {
|
|
@@ -105,7 +105,6 @@
|
|
|
105
105
|
"files": [
|
|
106
106
|
"dist/**",
|
|
107
107
|
"openclaw.plugin.json",
|
|
108
|
-
"npm-shrinkwrap.json",
|
|
109
108
|
"README.md"
|
|
110
109
|
],
|
|
111
110
|
"bundledDependencies": [
|
package/npm-shrinkwrap.json
DELETED
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@openclaw/mattermost",
|
|
3
|
-
"version": "2026.7.2-beta.4",
|
|
4
|
-
"lockfileVersion": 3,
|
|
5
|
-
"requires": true,
|
|
6
|
-
"packages": {
|
|
7
|
-
"": {
|
|
8
|
-
"name": "@openclaw/mattermost",
|
|
9
|
-
"version": "2026.7.2-beta.4",
|
|
10
|
-
"dependencies": {
|
|
11
|
-
"ws": "8.21.1",
|
|
12
|
-
"zod": "4.4.3"
|
|
13
|
-
},
|
|
14
|
-
"peerDependencies": {
|
|
15
|
-
"openclaw": ">=2026.7.2-beta.4"
|
|
16
|
-
},
|
|
17
|
-
"peerDependenciesMeta": {
|
|
18
|
-
"openclaw": {
|
|
19
|
-
"optional": true
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
},
|
|
23
|
-
"node_modules/ws": {
|
|
24
|
-
"version": "8.21.1",
|
|
25
|
-
"resolved": "https://registry.npmjs.org/ws/-/ws-8.21.1.tgz",
|
|
26
|
-
"integrity": "sha512-+0NTnW77fFN/DjQi6k/Sq/Yvk4Sgajw7urW8V+asjXnRgDs9gyGkdb7EzgfhA4goXsRIZKE28fzIXBHEzhuiWw==",
|
|
27
|
-
"license": "MIT",
|
|
28
|
-
"engines": {
|
|
29
|
-
"node": ">=10.0.0"
|
|
30
|
-
},
|
|
31
|
-
"peerDependencies": {
|
|
32
|
-
"bufferutil": "^4.0.1",
|
|
33
|
-
"utf-8-validate": ">=5.0.2"
|
|
34
|
-
},
|
|
35
|
-
"peerDependenciesMeta": {
|
|
36
|
-
"bufferutil": {
|
|
37
|
-
"optional": true
|
|
38
|
-
},
|
|
39
|
-
"utf-8-validate": {
|
|
40
|
-
"optional": true
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
},
|
|
44
|
-
"node_modules/zod": {
|
|
45
|
-
"version": "4.4.3",
|
|
46
|
-
"resolved": "https://registry.npmjs.org/zod/-/zod-4.4.3.tgz",
|
|
47
|
-
"integrity": "sha512-ytENFjIJFl2UwYglde2jchW2Hwm4GJFLDiSXWdTrJQBIN9Fcyp7n4DhxJEiWNAJMV1/BqWfW/kkg71UDcHJyTQ==",
|
|
48
|
-
"license": "MIT",
|
|
49
|
-
"funding": {
|
|
50
|
-
"url": "https://github.com/sponsors/colinhacks"
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
}
|