@openclaw/mattermost 2026.7.2-beta.7 → 2026.7.34

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.
Files changed (31) hide show
  1. package/dist/{client-CqqzTcno.js → .setup/accounts-CkvUBI7I.mjs} +101 -55
  2. package/dist/.setup/channel-plugin-api-DQ6gNcH0.mjs +31 -0
  3. package/dist/.setup/channel-plugin-api-jFFWYXht.mjs +3 -0
  4. package/dist/{channel-plugin-runtime-DlrMaSIu.js → .setup/channel-plugin-runtime-BLOKRsgT.mjs} +260 -344
  5. package/dist/.setup/channel.runtime-CK6s04r7.mjs +2653 -0
  6. package/dist/.setup/doctor-contract-ttH0DCuq.mjs +7 -0
  7. package/dist/{gateway-auth-bypass-CL1PxV3z.js → .setup/gateway-auth-bypass-BIXLORHU.mjs} +2 -3
  8. package/dist/{monitor-auth-rctDliGZ.js → .setup/monitor-auth-CeakcTAO.mjs} +13 -14
  9. package/dist/.setup/secret-contract-Cx0LUNXy.mjs +44 -0
  10. package/dist/.setup/secret-contract-api-BLTnjVCZ.mjs +3 -0
  11. package/dist/{slash-state-DM8qmFJR.js → .setup/slash-state-D1e1_KaK.mjs} +572 -311
  12. package/dist/api.js +2 -3
  13. package/dist/channel-plugin-api.js +2 -38
  14. package/dist/channel-plugin-runtime.js +1 -1
  15. package/dist/doctor-contract-api.js +1 -1
  16. package/dist/gateway-auth-api.js +1 -1
  17. package/dist/policy-api.js +1 -1
  18. package/dist/runtime-api.js +3 -2
  19. package/dist/secret-contract-api.js +1 -1
  20. package/dist/setup-entry.js +3 -2
  21. package/dist/slash-route-api.js +1 -1
  22. package/node_modules/ws/lib/permessage-deflate.js +3 -1
  23. package/node_modules/ws/package.json +1 -1
  24. package/openclaw.plugin.json +231 -277
  25. package/package.json +6 -52
  26. package/dist/accounts-NaMdx9yF.js +0 -86
  27. package/dist/channel.runtime-DndW9G7T.js +0 -3207
  28. package/dist/doctor-contract-BaUvVh8e.js +0 -19
  29. package/dist/interactions-BQXY_48h.js +0 -375
  30. package/dist/secret-contract-B4R5Bmhv.js +0 -28
  31. /package/dist/{runtime-CNB4YGqJ.js → .setup/runtime-CNB4YGqJ.mjs} +0 -0
@@ -0,0 +1,7 @@
1
+ import { createLegacyPrivateNetworkDoctorContract } from "openclaw/plugin-sdk/ssrf-runtime";
2
+ //#region extensions/mattermost/src/doctor-contract.ts
3
+ const contract = createLegacyPrivateNetworkDoctorContract({ channelKey: "mattermost" });
4
+ const legacyConfigRules = contract.legacyConfigRules;
5
+ const normalizeCompatibilityConfig = contract.normalizeCompatibilityConfig;
6
+ //#endregion
7
+ export { normalizeCompatibilityConfig as n, legacyConfigRules as t };
@@ -23,9 +23,8 @@ function collectMattermostSlashCallbackPaths(raw) {
23
23
  } catch {}
24
24
  return [...paths];
25
25
  }
26
- function resolveMattermostGatewayAuthBypassPaths(params) {
27
- const channels = params.cfg.channels;
28
- const base = channels?.mattermost && typeof channels.mattermost === "object" ? channels.mattermost : void 0;
26
+ function resolveMattermostGatewayAuthBypassPaths(cfg) {
27
+ const base = cfg.channels?.mattermost && typeof cfg.channels.mattermost === "object" ? cfg.channels.mattermost : void 0;
29
28
  const callbackPaths = new Set(collectMattermostSlashCallbackPaths(readMattermostCommands(base?.commands)).filter(isMattermostBypassPath));
30
29
  const accounts = base?.accounts ?? {};
31
30
  for (const account of Object.values(accounts)) {
@@ -1,5 +1,7 @@
1
+ import { parseAccessGroupAllowFromEntry } from "openclaw/plugin-sdk/access-groups";
2
+ import { resolveStableChannelMessageIngress } from "openclaw/plugin-sdk/channel-ingress-runtime";
1
3
  import { normalizeLowercaseStringOrEmpty, uniqueStrings } from "openclaw/plugin-sdk/string-coerce-runtime";
2
- import { parseTcpPort } from "openclaw/plugin-sdk/number-runtime";
4
+ import { buildAgentMediaPayload } from "openclaw/plugin-sdk/agent-media-payload";
3
5
  import { resolveAllowlistMatchSimple } from "openclaw/plugin-sdk/allow-from";
4
6
  import { logInboundDrop } from "openclaw/plugin-sdk/channel-inbound";
5
7
  import { createChannelPairingController } from "openclaw/plugin-sdk/channel-pairing";
@@ -8,15 +10,14 @@ import { logTypingFailure } from "openclaw/plugin-sdk/channel-feedback";
8
10
  import { listSkillCommandsForAgents } from "openclaw/plugin-sdk/command-auth-native";
9
11
  import { buildModelsProviderData } from "openclaw/plugin-sdk/models-provider-runtime";
10
12
  import { isDangerousNameMatchingEnabled } from "openclaw/plugin-sdk/dangerous-name-runtime";
11
- import { resolveAllowlistProviderRuntimeGroupPolicy as resolveAllowlistProviderRuntimeGroupPolicy$1, resolveDefaultGroupPolicy, warnMissingProviderGroupPolicyFallbackOnce } from "openclaw/plugin-sdk/runtime-group-policy";
13
+ import { resolveAllowlistProviderRuntimeGroupPolicy, resolveDefaultGroupPolicy, warnMissingProviderGroupPolicyFallbackOnce } from "openclaw/plugin-sdk/runtime-group-policy";
12
14
  import { resolveChannelMediaMaxBytes } from "openclaw/plugin-sdk/media-runtime";
13
15
  import { loadOutboundMediaFromUrl } from "openclaw/plugin-sdk/outbound-media";
14
16
  import { DEFAULT_GROUP_HISTORY_LIMIT, createChannelHistoryWindow } from "openclaw/plugin-sdk/reply-history";
15
17
  import { registerPluginHttpRoute } from "openclaw/plugin-sdk/webhook-targets";
16
18
  import { isRequestBodyLimitError, readRequestBodyWithLimit } from "openclaw/plugin-sdk/webhook-ingress";
17
19
  import { isTrustedProxyAddress, resolveClientIp } from "openclaw/plugin-sdk/core";
18
- import { parseAccessGroupAllowFromEntry } from "openclaw/plugin-sdk/access-groups";
19
- import { resolveStableChannelMessageIngress } from "openclaw/plugin-sdk/channel-ingress-runtime";
20
+ import { parseTcpPort } from "openclaw/plugin-sdk/number-runtime";
20
21
  //#region extensions/mattermost/src/mattermost/monitor-auth.ts
21
22
  const mattermostIngressIdentity = {
22
23
  key: "sender-id",
@@ -41,7 +42,8 @@ function normalizeMattermostAllowEntry(entry) {
41
42
  return normalized ? normalizeLowercaseStringOrEmpty(normalized) : "";
42
43
  }
43
44
  function normalizeMattermostAllowList(entries) {
44
- return uniqueStrings(entries.map((entry) => normalizeMattermostAllowEntry(String(entry))).filter(Boolean));
45
+ const normalized = entries.map((entry) => normalizeMattermostAllowEntry(String(entry))).filter(Boolean);
46
+ return uniqueStrings(normalized);
45
47
  }
46
48
  function formatMattermostDirectMessageDropLog(params) {
47
49
  const reason = params.reasonCode ? ` reason=${params.reasonCode}` : "";
@@ -49,24 +51,21 @@ function formatMattermostDirectMessageDropLog(params) {
49
51
  return `mattermost: drop dm sender=${params.senderId} (dmPolicy=${params.dmPolicy}${reason}${hint})`;
50
52
  }
51
53
  function isMattermostSenderAllowed(params) {
54
+ const allowFrom = normalizeMattermostAllowList(params.allowFrom);
55
+ if (allowFrom.length === 0) return false;
52
56
  return resolveAllowlistMatchSimple({
53
- allowFrom: normalizeMattermostAllowList(params.allowFrom),
57
+ allowFrom,
54
58
  senderId: normalizeMattermostAllowEntry(params.senderId),
55
59
  senderName: params.senderName ? normalizeMattermostAllowEntry(params.senderName) : void 0,
56
60
  allowNameMatching: params.allowNameMatching
57
61
  }).allowed;
58
62
  }
59
- function mapMattermostChannelTypeToChatType(channelType) {
63
+ function mapMattermostChannelKind(channelType) {
60
64
  const normalized = channelType?.trim().toUpperCase();
61
- if (!normalized) return "direct";
62
65
  if (normalized === "D") return "direct";
63
66
  if (normalized === "G" || normalized === "P") return "group";
64
67
  return "channel";
65
68
  }
66
- function resolveMattermostTrustedChatKind(params) {
67
- const channelType = params.channelType?.trim();
68
- return channelType ? mapMattermostChannelTypeToChatType(channelType) : params.fallback ?? "direct";
69
- }
70
69
  async function resolveMattermostMonitorInboundAccess(params) {
71
70
  const { account, cfg, senderId, senderName, channelId, kind, groupPolicy, storeAllowFrom, allowTextCommands, hasControlCommand } = params;
72
71
  const dmPolicy = account.config.dmPolicy ?? "pairing";
@@ -133,7 +132,7 @@ async function authorizeMattermostCommandInvocation(params) {
133
132
  channelDisplay: "",
134
133
  roomLabel: `#${channelId}`
135
134
  };
136
- const kind = mapMattermostChannelTypeToChatType(channelInfo.type);
135
+ const kind = mapMattermostChannelKind(channelInfo.type);
137
136
  const chatType = kind;
138
137
  const channelName = channelInfo.name ?? "";
139
138
  const channelDisplay = channelInfo.display_name ?? channelName;
@@ -182,4 +181,4 @@ async function authorizeMattermostCommandInvocation(params) {
182
181
  };
183
182
  }
184
183
  //#endregion
185
- export { resolveChannelMediaMaxBytes as C, warnMissingProviderGroupPolicyFallbackOnce as E, resolveAllowlistProviderRuntimeGroupPolicy$1 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 };
184
+ export { resolveChannelMediaMaxBytes as C, warnMissingProviderGroupPolicyFallbackOnce as E, resolveAllowlistProviderRuntimeGroupPolicy as S, resolveDefaultGroupPolicy as T, logInboundDrop as _, normalizeMattermostAllowList as a, readRequestBodyWithLimit as b, buildAgentMediaPayload 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, DEFAULT_GROUP_HISTORY_LIMIT as s, authorizeMattermostCommandInvocation as t, createChannelHistoryWindow as u, logTypingFailure as v, resolveClientIp as w, registerPluginHttpRoute as x, parseTcpPort as y };
@@ -0,0 +1,44 @@
1
+ import { collectSimpleChannelFieldAssignments, getChannelSurface } from "openclaw/plugin-sdk/channel-secret-basic-runtime";
2
+ //#region extensions/mattermost/src/secret-contract.ts
3
+ const secretTargetRegistryEntries = [{
4
+ id: "channels.mattermost.accounts.*.botToken",
5
+ targetType: "channels.mattermost.accounts.*.botToken",
6
+ configFile: "openclaw.json",
7
+ pathPattern: "channels.mattermost.accounts.*.botToken",
8
+ secretShape: "secret_input",
9
+ expectedResolvedValue: "string",
10
+ includeInPlan: true,
11
+ includeInConfigure: true,
12
+ includeInAudit: true
13
+ }, {
14
+ id: "channels.mattermost.botToken",
15
+ targetType: "channels.mattermost.botToken",
16
+ configFile: "openclaw.json",
17
+ pathPattern: "channels.mattermost.botToken",
18
+ secretShape: "secret_input",
19
+ expectedResolvedValue: "string",
20
+ includeInPlan: true,
21
+ includeInConfigure: true,
22
+ includeInAudit: true
23
+ }];
24
+ function collectRuntimeConfigAssignments(params) {
25
+ const resolved = getChannelSurface(params.config, "mattermost");
26
+ if (!resolved) return;
27
+ const { channel: mattermost, surface } = resolved;
28
+ collectSimpleChannelFieldAssignments({
29
+ channelKey: "mattermost",
30
+ field: "botToken",
31
+ channel: mattermost,
32
+ surface,
33
+ defaults: params.defaults,
34
+ context: params.context,
35
+ topInactiveReason: "no enabled account inherits this top-level Mattermost botToken.",
36
+ accountInactiveReason: "Mattermost account is disabled."
37
+ });
38
+ }
39
+ const channelSecrets = {
40
+ secretTargetRegistryEntries,
41
+ collectRuntimeConfigAssignments
42
+ };
43
+ //#endregion
44
+ export { collectRuntimeConfigAssignments as n, secretTargetRegistryEntries as r, channelSecrets as t };
@@ -0,0 +1,3 @@
1
+ import { n as collectRuntimeConfigAssignments, r as secretTargetRegistryEntries, t as channelSecrets } from "./secret-contract-Cx0LUNXy.mjs";
2
+ import "../secret-contract-api.js";
3
+ export { channelSecrets, collectRuntimeConfigAssignments, secretTargetRegistryEntries };