@openclaw/mattermost 2026.7.2-beta.3 → 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.
@@ -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 { E as resolveClientIp, S as readRequestBodyWithLimit, g as isTrustedProxyAddress } from "./monitor-auth-ynw9EnGC.js";
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";
@@ -1,6 +1,5 @@
1
1
  import { normalizeLowercaseStringOrEmpty, uniqueStrings } from "openclaw/plugin-sdk/string-coerce-runtime";
2
2
  import { parseTcpPort } from "openclaw/plugin-sdk/number-runtime";
3
- import { buildAgentMediaPayload } from "openclaw/plugin-sdk/agent-media-payload";
4
3
  import { resolveAllowlistMatchSimple } from "openclaw/plugin-sdk/allow-from";
5
4
  import { logInboundDrop } from "openclaw/plugin-sdk/channel-inbound";
6
5
  import { createChannelPairingController } from "openclaw/plugin-sdk/channel-pairing";
@@ -183,4 +182,4 @@ async function authorizeMattermostCommandInvocation(params) {
183
182
  };
184
183
  }
185
184
  //#endregion
186
- export { registerPluginHttpRoute as C, resolveDefaultGroupPolicy as D, resolveClientIp as E, warnMissingProviderGroupPolicyFallbackOnce as O, readRequestBodyWithLimit as S, resolveChannelMediaMaxBytes as T, listSkillCommandsForAgents as _, normalizeMattermostAllowEntry as a, logTypingFailure as b, resolveMattermostTrustedChatKind as c, buildModelsProviderData as d, createChannelHistoryWindow as f, isTrustedProxyAddress as g, isRequestBodyLimitError as h, mapMattermostChannelTypeToChatType as i, DEFAULT_GROUP_HISTORY_LIMIT as l, createChannelPairingController as m, formatMattermostDirectMessageDropLog as n, normalizeMattermostAllowList as o, createChannelMessageReplyPipeline as p, isMattermostSenderAllowed as r, resolveMattermostMonitorInboundAccess as s, authorizeMattermostCommandInvocation as t, buildAgentMediaPayload as u, loadOutboundMediaFromUrl as v, resolveAllowlistProviderRuntimeGroupPolicy as w, parseTcpPort as x, logInboundDrop as y };
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 };
@@ -1,2 +1,2 @@
1
- import { r as isMattermostSenderAllowed } from "./monitor-auth-ynw9EnGC.js";
1
+ import { r as isMattermostSenderAllowed } from "./monitor-auth-BOh6zLW9.js";
2
2
  export { isMattermostSenderAllowed };
@@ -1,5 +1,4 @@
1
1
  import { r as setMattermostRuntime } from "./runtime-CNB4YGqJ.js";
2
- import { buildAgentMediaPayload } from "openclaw/plugin-sdk/agent-media-payload";
3
2
  import { resolveAllowlistMatchSimple } from "openclaw/plugin-sdk/allow-from";
4
3
  import { formatInboundFromLabel, logInboundDrop } from "openclaw/plugin-sdk/channel-inbound";
5
4
  import { createChannelPairingController } from "openclaw/plugin-sdk/channel-pairing";
@@ -21,4 +20,4 @@ import { buildComputedAccountStatusSnapshot } from "openclaw/plugin-sdk/channel-
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, buildAgentMediaPayload, 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 };
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 };
@@ -1,2 +1,2 @@
1
- import { i as registerSlashCommandRoute } from "./slash-state-N-zfDDSz.js";
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 { S as readRequestBodyWithLimit, b as logTypingFailure, d as buildModelsProviderData, h as isRequestBodyLimitError, o as normalizeMattermostAllowList, p as createChannelMessageReplyPipeline, t as authorizeMattermostCommandInvocation, v as loadOutboundMediaFromUrl } from "./monitor-auth-ynw9EnGC.js";
4
- import { c as setInteractionSecret, n as buildButtonProps, o as resolveInteractionCallbackUrl } from "./interactions-BIb5iJjA.js";
5
- import { r as resolveMattermostAccount } from "./accounts-B-GrNVwP.js";
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,6 +833,16 @@ 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;
836
+ const MATTERMOST_FORMAT_PROFILE = FormatCapabilityProfile.define({
837
+ mechanism: "markdown",
838
+ chunk: {
839
+ limit: 16383,
840
+ unit: "chars"
841
+ }
842
+ });
843
+ function renderMattermostMarkdown(markdown, tableMode) {
844
+ return tableMode === "off" && MATTERMOST_FORMAT_PROFILE.constructs.table === "native" ? markdown : convertMarkdownTables(markdown, tableMode);
845
+ }
830
846
  const botUserCache = /* @__PURE__ */ new Map();
831
847
  const userByNameCache = /* @__PURE__ */ new Map();
832
848
  const channelByNameCache = /* @__PURE__ */ new Map();
@@ -1069,7 +1085,7 @@ async function sendMessageMattermost(to, text, opts) {
1069
1085
  channel: "mattermost",
1070
1086
  accountId
1071
1087
  });
1072
- message = convertMarkdownTables(message, tableMode);
1088
+ message = renderMattermostMarkdown(message, tableMode);
1073
1089
  }
1074
1090
  if (!message && (!fileIds || fileIds.length === 0)) {
1075
1091
  if (uploadError) throw new Error(`Mattermost media upload failed: ${uploadError.message}`, { cause: uploadError });
@@ -1619,38 +1635,24 @@ async function handleSlashCommandAsync(params) {
1619
1635
  channel: "mattermost",
1620
1636
  accountId: account.accountId
1621
1637
  });
1622
- const { onModelSelected, typingCallbacks, ...replyPipeline } = createChannelMessageReplyPipeline({
1623
- cfg,
1624
- agentId: route.agentId,
1625
- channel: "mattermost",
1626
- accountId: account.accountId,
1627
- typing: {
1628
- start: () => sendMattermostTyping(client, { channelId }),
1629
- onStartError: (err) => {
1630
- logTypingFailure({
1631
- log: (message) => log?.(message),
1632
- channel: "mattermost",
1633
- target: channelId,
1634
- error: err
1635
- });
1636
- }
1637
- }
1638
- });
1639
1638
  const humanDelay = resolveHumanDelayConfig(cfg, route.agentId);
1640
1639
  const deliveryBarrier = createMattermostReplyDeliveryBarrier({
1641
1640
  isDirect: kind === "direct",
1642
1641
  dmRetryOptions: account.config.dmChannelRetry
1643
1642
  });
1644
- await core.channel.reply.dispatchReplyWithBufferedBlockDispatcher({
1645
- ctx: ctxPayload,
1643
+ await core.channel.inbound.dispatch({
1646
1644
  cfg,
1647
- dispatcherOptions: {
1648
- ...replyPipeline,
1649
- resolveFollowupAdmissionBarrierTimeoutPolicy: deliveryBarrier.resolveTimeoutPolicy,
1650
- onDeliverySettled: deliveryBarrier.markDeliverySettled,
1651
- humanDelay,
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: {
1652
1654
  deliver: async (payload) => {
1653
- await deliverMattermostReplyPayload({
1655
+ const result = toMattermostChannelDeliveryResult(await deliverMattermostReplyPayload({
1654
1656
  core,
1655
1657
  cfg,
1656
1658
  payload,
@@ -1661,18 +1663,31 @@ async function handleSlashCommandAsync(params) {
1661
1663
  tableMode,
1662
1664
  sendMessage: sendMessageMattermost,
1663
1665
  onDmChannelResolution: deliveryBarrier.trackDmChannelResolution
1664
- });
1665
- runtime.log?.(`delivered slash reply to ${to}`);
1666
+ }));
1667
+ if (result.visibleReplySent) runtime.log?.(`delivered slash reply to ${to}`);
1668
+ return result;
1666
1669
  },
1667
1670
  onError: (err, info) => {
1668
1671
  runtime.error?.(`mattermost slash ${info.kind} reply failed: ${sanitizeCommandLookupError(err)}`);
1669
- },
1670
- typingCallbacks
1672
+ }
1671
1673
  },
1672
- replyOptions: {
1673
- disableBlockStreaming: typeof account.blockStreaming === "boolean" ? !account.blockStreaming : void 0,
1674
- onModelSelected
1675
- }
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 }
1676
1691
  });
1677
1692
  }
1678
1693
  //#endregion
@@ -1918,4 +1933,4 @@ function registerSlashCommandRoute(api) {
1918
1933
  });
1919
1934
  }
1920
1935
  //#endregion
1921
- export { registerSlashCommands as _, sendMessageMattermost as a, deliverMattermostReplyPayload as c, renderMattermostModelsPickerView as d, renderMattermostProviderPickerView as f, isSlashCommandsEnabled as g, cleanupSlashCommands as h, registerSlashCommandRoute as i, buildMattermostAllowedModelRefs as l, DEFAULT_COMMAND_SPECS as m, deactivateSlashCommands as n, resolveMattermostOpaqueTarget as o, resolveMattermostModelPickerCurrentModel as p, getSlashCommandState as r, createMattermostReplyDeliveryBarrier as s, activateSlashCommands as t, parseMattermostModelPickerContext as u, resolveCallbackUrl as v, resolveSlashCommandConfig as y };
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 };
@@ -77,6 +77,7 @@ class Receiver extends Writable {
77
77
 
78
78
  this._totalPayloadLength = 0;
79
79
  this._messageLength = 0;
80
+ this._numFragments = 0;
80
81
  this._fragments = [];
81
82
 
82
83
  this._errored = false;
@@ -500,6 +501,19 @@ class Receiver extends Writable {
500
501
  return;
501
502
  }
502
503
 
504
+ if (this._maxFragments > 0 && ++this._numFragments > this._maxFragments) {
505
+ const error = this.createError(
506
+ RangeError,
507
+ 'Too many message fragments',
508
+ false,
509
+ 1008,
510
+ 'WS_ERR_TOO_MANY_BUFFERED_PARTS'
511
+ );
512
+
513
+ cb(error);
514
+ return;
515
+ }
516
+
503
517
  if (this._compressed) {
504
518
  this._state = INFLATING;
505
519
  this.decompress(data, cb);
@@ -507,22 +521,6 @@ class Receiver extends Writable {
507
521
  }
508
522
 
509
523
  if (data.length) {
510
- if (
511
- this._maxFragments > 0 &&
512
- this._fragments.length >= this._maxFragments
513
- ) {
514
- const error = this.createError(
515
- RangeError,
516
- 'Too many message fragments',
517
- false,
518
- 1008,
519
- 'WS_ERR_TOO_MANY_BUFFERED_PARTS'
520
- );
521
-
522
- cb(error);
523
- return;
524
- }
525
-
526
524
  //
527
525
  // This message is not compressed so its length is the sum of the payload
528
526
  // length of all fragments.
@@ -562,22 +560,6 @@ class Receiver extends Writable {
562
560
  return;
563
561
  }
564
562
 
565
- if (
566
- this._maxFragments > 0 &&
567
- this._fragments.length >= this._maxFragments
568
- ) {
569
- const error = this.createError(
570
- RangeError,
571
- 'Too many message fragments',
572
- false,
573
- 1008,
574
- 'WS_ERR_TOO_MANY_BUFFERED_PARTS'
575
- );
576
-
577
- cb(error);
578
- return;
579
- }
580
-
581
563
  this._fragments.push(buf);
582
564
  }
583
565
 
@@ -604,6 +586,7 @@ class Receiver extends Writable {
604
586
  this._totalPayloadLength = 0;
605
587
  this._messageLength = 0;
606
588
  this._fragmented = 0;
589
+ this._numFragments = 0;
607
590
  this._fragments = [];
608
591
 
609
592
  if (this._opcode === 2) {
@@ -43,9 +43,9 @@ class WebSocketServer extends EventEmitter {
43
43
  * called
44
44
  * @param {Function} [options.handleProtocols] A hook to handle protocols
45
45
  * @param {String} [options.host] The hostname where to bind the server
46
- * @param {Number} [options.maxBufferedChunks=1048576] The maximum number of
46
+ * @param {Number} [options.maxBufferedChunks=262144] The maximum number of
47
47
  * buffered data chunks
48
- * @param {Number} [options.maxFragments=131072] The maximum number of message
48
+ * @param {Number} [options.maxFragments=16384] The maximum number of message
49
49
  * fragments
50
50
  * @param {Number} [options.maxPayload=104857600] The maximum allowed message
51
51
  * size
@@ -69,8 +69,8 @@ class WebSocketServer extends EventEmitter {
69
69
  options = {
70
70
  allowSynchronousEvents: true,
71
71
  autoPong: true,
72
- maxBufferedChunks: 1024 * 1024,
73
- maxFragments: 128 * 1024,
72
+ maxBufferedChunks: 256 * 1024,
73
+ maxFragments: 16 * 1024,
74
74
  maxPayload: 100 * 1024 * 1024,
75
75
  skipUTF8Validation: false,
76
76
  perMessageDeflate: false,
@@ -646,9 +646,9 @@ module.exports = WebSocket;
646
646
  * masking key
647
647
  * @param {Number} [options.handshakeTimeout] Timeout in milliseconds for the
648
648
  * handshake request
649
- * @param {Number} [options.maxBufferedChunks=1048576] The maximum number of
649
+ * @param {Number} [options.maxBufferedChunks=262144] The maximum number of
650
650
  * buffered data chunks
651
- * @param {Number} [options.maxFragments=131072] The maximum number of message
651
+ * @param {Number} [options.maxFragments=16384] The maximum number of message
652
652
  * fragments
653
653
  * @param {Number} [options.maxPayload=104857600] The maximum allowed message
654
654
  * size
@@ -670,8 +670,8 @@ function initAsClient(websocket, address, protocols, options) {
670
670
  autoPong: true,
671
671
  closeTimeout: CLOSE_TIMEOUT,
672
672
  protocolVersion: protocolVersions[1],
673
- maxBufferedChunks: 1024 * 1024,
674
- maxFragments: 128 * 1024,
673
+ maxBufferedChunks: 256 * 1024,
674
+ maxFragments: 16 * 1024,
675
675
  maxPayload: 100 * 1024 * 1024,
676
676
  skipUTF8Validation: false,
677
677
  perMessageDeflate: true,
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ws",
3
- "version": "8.21.0",
3
+ "version": "8.21.1",
4
4
  "description": "Simple to use, blazing fast and thoroughly tested websocket client and server for Node.js",
5
5
  "keywords": [
6
6
  "HyBi",
@@ -66,5 +66,9 @@
66
66
  "nyc": "^15.0.0",
67
67
  "prettier": "^3.0.0",
68
68
  "utf-8-validate": "^6.0.0"
69
+ },
70
+ "allowScripts": {
71
+ "bufferutil": true,
72
+ "utf-8-validate": true
69
73
  }
70
74
  }
@@ -7,12 +7,6 @@
7
7
  "channels": [
8
8
  "mattermost"
9
9
  ],
10
- "channelEnvVars": {
11
- "mattermost": [
12
- "MATTERMOST_BOT_TOKEN",
13
- "MATTERMOST_URL"
14
- ]
15
- },
16
10
  "configSchema": {
17
11
  "type": "object",
18
12
  "additionalProperties": false,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openclaw/mattermost",
3
- "version": "2026.7.2-beta.3",
3
+ "version": "2026.7.2-beta.5",
4
4
  "description": "OpenClaw Mattermost channel plugin",
5
5
  "repository": {
6
6
  "type": "git",
@@ -8,11 +8,11 @@
8
8
  },
9
9
  "type": "module",
10
10
  "dependencies": {
11
- "ws": "8.21.0",
11
+ "ws": "8.21.1",
12
12
  "zod": "4.4.3"
13
13
  },
14
14
  "peerDependencies": {
15
- "openclaw": ">=2026.7.2-beta.3"
15
+ "openclaw": ">=2026.7.2-beta.5"
16
16
  },
17
17
  "peerDependenciesMeta": {
18
18
  "openclaw": {
@@ -26,12 +26,58 @@
26
26
  "setupEntry": "./dist/setup-entry.js",
27
27
  "channel": {
28
28
  "id": "mattermost",
29
+ "configuredState": {
30
+ "env": {
31
+ "allOf": [
32
+ "MATTERMOST_BOT_TOKEN",
33
+ "MATTERMOST_URL"
34
+ ]
35
+ }
36
+ },
29
37
  "label": "Mattermost",
30
38
  "selectionLabel": "Mattermost (plugin)",
31
39
  "docsPath": "/channels/mattermost",
32
40
  "docsLabel": "mattermost",
33
41
  "blurb": "self-hosted Slack-style chat; install the plugin to enable.",
34
- "order": 65
42
+ "order": 65,
43
+ "setup": {
44
+ "fields": [
45
+ {
46
+ "key": "token",
47
+ "kind": "string",
48
+ "sensitive": true,
49
+ "cli": {
50
+ "flags": "--token <token>",
51
+ "description": "Mattermost bot token"
52
+ }
53
+ },
54
+ {
55
+ "key": "botToken",
56
+ "kind": "string",
57
+ "sensitive": true,
58
+ "cli": {
59
+ "flags": "--bot-token <token>",
60
+ "description": "Mattermost bot token"
61
+ }
62
+ },
63
+ {
64
+ "key": "httpUrl",
65
+ "kind": "string",
66
+ "cli": {
67
+ "flags": "--http-url <url>",
68
+ "description": "Mattermost server URL"
69
+ }
70
+ },
71
+ {
72
+ "key": "useEnv",
73
+ "kind": "boolean",
74
+ "cli": {
75
+ "flags": "--use-env",
76
+ "description": "Use Mattermost environment credentials"
77
+ }
78
+ }
79
+ ]
80
+ }
35
81
  },
36
82
  "install": {
37
83
  "clawhubSpec": "clawhub:@openclaw/mattermost",
@@ -41,10 +87,10 @@
41
87
  "allowInvalidConfigRecovery": true
42
88
  },
43
89
  "compat": {
44
- "pluginApi": ">=2026.7.2-beta.3"
90
+ "pluginApi": ">=2026.7.2-beta.5"
45
91
  },
46
92
  "build": {
47
- "openclawVersion": "2026.7.2-beta.3",
93
+ "openclawVersion": "2026.7.2-beta.5",
48
94
  "bundledDist": false
49
95
  },
50
96
  "release": {
@@ -59,7 +105,6 @@
59
105
  "files": [
60
106
  "dist/**",
61
107
  "openclaw.plugin.json",
62
- "npm-shrinkwrap.json",
63
108
  "README.md"
64
109
  ],
65
110
  "bundledDependencies": [
@@ -1,54 +0,0 @@
1
- {
2
- "name": "@openclaw/mattermost",
3
- "version": "2026.7.2-beta.3",
4
- "lockfileVersion": 3,
5
- "requires": true,
6
- "packages": {
7
- "": {
8
- "name": "@openclaw/mattermost",
9
- "version": "2026.7.2-beta.3",
10
- "dependencies": {
11
- "ws": "8.21.0",
12
- "zod": "4.4.3"
13
- },
14
- "peerDependencies": {
15
- "openclaw": ">=2026.7.2-beta.3"
16
- },
17
- "peerDependenciesMeta": {
18
- "openclaw": {
19
- "optional": true
20
- }
21
- }
22
- },
23
- "node_modules/ws": {
24
- "version": "8.21.0",
25
- "resolved": "https://registry.npmjs.org/ws/-/ws-8.21.0.tgz",
26
- "integrity": "sha512-Vsp28b7DRcimFQvrqu2Wek3z1iYxDCWqHYB8Qsnk/S4RfaCQzPGPyBNuVjJV3cd6UiKtUtp6sNM77gWvzcCH+g==",
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
- }