@openclaw/mattermost 2026.7.2-beta.5 → 2026.8.1-beta.2

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,14 +1,15 @@
1
1
  import { t as getMattermostRuntime } from "./runtime-CNB4YGqJ.js";
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 { 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";
2
+ import { _ as resolveMattermostReplyDeliveryBarrierTimeoutMs, a as createMattermostPost, b as uploadMattermostFile, c as fetchMattermostChannelByName, d as fetchMattermostUser, f as fetchMattermostUserByUsername, h as parseMattermostApiStatus, i as createMattermostDirectChannelWithRetry, m as normalizeMattermostBaseUrl, p as fetchMattermostUserTeams, r as createMattermostClient, s as fetchMattermostChannel, u as fetchMattermostMe, v as sendMattermostTyping } from "./client-B_hd-kwM.js";
3
+ import { a as normalizeMattermostAllowList, g as loadOutboundMediaFromUrl, l as buildModelsProviderData, p as isRequestBodyLimitError, s as resolveMattermostTrustedChatKind, t as authorizeMattermostCommandInvocation, v as logTypingFailure, y as readRequestBodyWithLimit } from "./monitor-auth-CVd_4FPD.js";
4
+ import { c as setInteractionSecret, n as buildButtonProps, o as resolveInteractionCallbackUrl } from "./interactions-Du_EJMeN.js";
5
+ import { i as resolveMattermostAccount } from "./accounts-DspH-NMT.js";
6
6
  import { createHash } from "node:crypto";
7
7
  import { safeEqualSecret } from "openclaw/plugin-sdk/security-runtime";
8
- import { normalizeLowercaseStringOrEmpty, normalizeOptionalString, normalizeStringifiedOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
8
+ import { asFiniteNumber, normalizeLowercaseStringOrEmpty, normalizeOptionalString, normalizeStringifiedOptionalString, readStringField } from "openclaw/plugin-sdk/string-coerce-runtime";
9
+ import { createChannelPartialDeliveryError, isChannelPartialDeliveryError } from "openclaw/plugin-sdk/channel-inbound";
9
10
  import { asDateTimestampMs, parseStrictInteger, resolveExpiresAtMsFromDurationMs } from "openclaw/plugin-sdk/number-runtime";
10
11
  import { isPrivateNetworkOptInEnabled } from "openclaw/plugin-sdk/ssrf-runtime";
11
- import { createMessageReceiptFromOutboundResults } from "openclaw/plugin-sdk/channel-outbound";
12
+ import { createMessageReceiptFromOutboundResults, listMessageReceiptPlatformIds } from "openclaw/plugin-sdk/channel-outbound";
12
13
  import { resolveStoredModelOverride } from "openclaw/plugin-sdk/command-auth-native";
13
14
  import { getAgentScopedMediaLocalRoots } from "openclaw/plugin-sdk/media-runtime";
14
15
  import { deliverTextOrMediaReply, isReasoningReplyPayload, resolveSendableOutboundReplyParts } from "openclaw/plugin-sdk/reply-payload";
@@ -21,6 +22,7 @@ import { finalizeInboundContext } from "openclaw/plugin-sdk/reply-runtime";
21
22
  import { truncateUtf16Safe } from "openclaw/plugin-sdk/text-utility-runtime";
22
23
  import { pruneMapToMaxSize } from "openclaw/plugin-sdk/collection-runtime";
23
24
  import { resolveMarkdownTableMode } from "openclaw/plugin-sdk/markdown-table-runtime";
25
+ import { extensionForMime } from "openclaw/plugin-sdk/media-mime";
24
26
  import { requireRuntimeConfig } from "openclaw/plugin-sdk/plugin-config-runtime";
25
27
  const MATTERMOST_COMMAND_DESCRIPTION_MAX_BYTES = 128;
26
28
  function truncateMattermostCommandDescription(description) {
@@ -386,13 +388,11 @@ function splitModelRef(modelRef) {
386
388
  };
387
389
  }
388
390
  function readContextString(context, key, fallback = "") {
389
- const value = context[key];
390
- return typeof value === "string" ? value : fallback;
391
+ return readStringField(context, key) ?? fallback;
391
392
  }
392
393
  function readContextNumber(context, key) {
393
394
  const value = context[key];
394
- if (typeof value === "number" && Number.isFinite(value)) return value;
395
- if (typeof value === "string") return parseStrictInteger(value);
395
+ return asFiniteNumber(value) ?? parseStrictInteger(value);
396
396
  }
397
397
  function normalizePage(value) {
398
398
  if (!Number.isFinite(value)) return 1;
@@ -661,49 +661,104 @@ function createMattermostReplyDeliveryBarrier(params) {
661
661
  resolveTimeoutPolicy
662
662
  };
663
663
  }
664
- function toMattermostChannelDeliveryResult(outcome) {
665
- return outcome === "text" || outcome === "media" ? { visibleReplySent: true } : {
664
+ /** Represents distinct provider posts without collapsing their visible boundary. */
665
+ function joinMattermostVisibleContent(contents) {
666
+ return contents.filter((content) => Boolean(content)).join("\n");
667
+ }
668
+ async function deliverMattermostReplyPayload(params) {
669
+ if (isReasoningReplyPayload(params.payload)) return {
670
+ outcome: "reasoning_skipped",
666
671
  visibleReplySent: false,
667
672
  suppression: { reason: "no_visible_result" }
668
673
  };
669
- }
670
- async function deliverMattermostReplyPayload(params) {
671
- if (isReasoningReplyPayload(params.payload)) return "reasoning_skipped";
672
674
  const reply = resolveSendableOutboundReplyParts(params.payload, { text: params.core.channel.text.convertMarkdownTables(params.payload.text ?? "", params.tableMode) });
673
675
  const mediaLocalRoots = getAgentScopedMediaLocalRoots(params.cfg, params.agentId);
674
676
  const chunkMode = params.core.channel.text.resolveChunkMode(params.cfg, "mattermost", params.accountId);
675
- return await deliverTextOrMediaReply({
676
- payload: params.payload,
677
- text: reply.text,
678
- chunkText: (value) => params.core.channel.text.chunkMarkdownTextWithMode(value, params.textLimit, chunkMode),
679
- sendText: async (chunk) => {
680
- await params.sendMessage(params.to, chunk, {
681
- cfg: params.cfg,
682
- accountId: params.accountId,
683
- replyToId: params.replyToId,
684
- ...params.onDmChannelResolution ? { onDmChannelResolution: params.onDmChannelResolution } : {}
685
- });
686
- },
687
- sendMedia: async ({ mediaUrl, caption }) => {
688
- await params.sendMessage(params.to, caption ?? "", {
689
- cfg: params.cfg,
690
- accountId: params.accountId,
691
- mediaUrl,
692
- mediaLocalRoots,
693
- replyToId: params.replyToId,
694
- ...params.onDmChannelResolution ? { onDmChannelResolution: params.onDmChannelResolution } : {}
695
- });
696
- }
677
+ const results = [];
678
+ const acceptedContents = [];
679
+ let outcome;
680
+ try {
681
+ outcome = await deliverTextOrMediaReply({
682
+ payload: params.payload,
683
+ text: reply.text,
684
+ chunkText: (value) => params.core.channel.text.chunkMarkdownTextWithMode(value, params.textLimit, chunkMode),
685
+ sendText: async (chunk) => {
686
+ const result = await params.sendMessage(params.to, chunk, {
687
+ cfg: params.cfg,
688
+ accountId: params.accountId,
689
+ replyToId: params.replyToId,
690
+ ...params.onDmChannelResolution ? { onDmChannelResolution: params.onDmChannelResolution } : {}
691
+ });
692
+ results.push(result);
693
+ acceptedContents.push(result.content);
694
+ },
695
+ sendMedia: async ({ mediaUrl, caption }) => {
696
+ const result = await params.sendMessage(params.to, caption ?? "", {
697
+ cfg: params.cfg,
698
+ accountId: params.accountId,
699
+ mediaUrl,
700
+ mediaLocalRoots,
701
+ replyToId: params.replyToId,
702
+ ...params.onDmChannelResolution ? { onDmChannelResolution: params.onDmChannelResolution } : {}
703
+ });
704
+ results.push(result);
705
+ acceptedContents.push(result.content);
706
+ }
707
+ });
708
+ } catch (error) {
709
+ const failedPartial = isChannelPartialDeliveryError(error) ? error.deliveryResult : void 0;
710
+ if (results.length === 0 && failedPartial?.visibleReplySent !== true) throw error;
711
+ const receipt = createMessageReceiptFromOutboundResults({
712
+ results: [...results.map((result) => ({ receipt: result.receipt })), ...failedPartial?.receipt ? [{ receipt: failedPartial.receipt }] : (failedPartial?.messageIds ?? []).map((messageId) => ({ messageId }))],
713
+ kind: reply.mediaUrls.length > 0 ? "media" : "text",
714
+ ...params.replyToId ? { replyToId: params.replyToId } : {}
715
+ });
716
+ throw createChannelPartialDeliveryError(error, {
717
+ messageIds: listMessageReceiptPlatformIds(receipt),
718
+ receipt,
719
+ visibleReplySent: true,
720
+ content: joinMattermostVisibleContent([...acceptedContents, failedPartial?.content])
721
+ });
722
+ }
723
+ if (outcome === "empty") return {
724
+ outcome,
725
+ visibleReplySent: false,
726
+ suppression: { reason: "no_visible_result" }
727
+ };
728
+ const receipt = createMessageReceiptFromOutboundResults({
729
+ results: results.map((result) => ({ receipt: result.receipt })),
730
+ kind: outcome,
731
+ ...params.replyToId ? { replyToId: params.replyToId } : {}
697
732
  });
733
+ return {
734
+ outcome,
735
+ messageIds: listMessageReceiptPlatformIds(receipt),
736
+ receipt,
737
+ visibleReplySent: true,
738
+ content: joinMattermostVisibleContent(acceptedContents)
739
+ };
698
740
  }
699
741
  //#endregion
700
742
  //#region extensions/mattermost/src/mattermost/target-resolution.ts
701
743
  const MATTERMOST_OPAQUE_TARGET_CACHE_MAX_ENTRIES = 1024;
744
+ const MATTERMOST_OPAQUE_TARGET_CACHE_TTL_MS = 300 * 1e3;
702
745
  const mattermostOpaqueTargetCache = /* @__PURE__ */ new Map();
703
746
  function cacheMattermostOpaqueTarget(key, kind) {
704
- mattermostOpaqueTargetCache.set(key, kind);
747
+ mattermostOpaqueTargetCache.set(key, {
748
+ kind,
749
+ expiresAt: Date.now() + MATTERMOST_OPAQUE_TARGET_CACHE_TTL_MS
750
+ });
705
751
  pruneMapToMaxSize(mattermostOpaqueTargetCache, MATTERMOST_OPAQUE_TARGET_CACHE_MAX_ENTRIES);
706
752
  }
753
+ function getCachedMattermostOpaqueTargetKind(key) {
754
+ const cached = mattermostOpaqueTargetCache.get(key);
755
+ if (!cached) return;
756
+ if (cached.expiresAt <= Date.now()) {
757
+ mattermostOpaqueTargetCache.delete(key);
758
+ return;
759
+ }
760
+ return cached.kind;
761
+ }
707
762
  function cacheKey$1(baseUrl, token, id) {
708
763
  return `${baseUrl}::${token}::${id}`;
709
764
  }
@@ -781,14 +836,6 @@ function isExplicitMattermostTarget(raw) {
781
836
  if (!trimmed) return false;
782
837
  return /^(channel|user|mattermost):/i.test(trimmed) || trimmed.startsWith("@") || trimmed.startsWith("#");
783
838
  }
784
- function parseMattermostApiStatus(err) {
785
- if (!err || typeof err !== "object") return;
786
- const msg = "message" in err && typeof err.message === "string" ? err.message : "";
787
- const match = /Mattermost API (\d{3})\b/.exec(msg);
788
- if (!match) return;
789
- const code = Number(match[1]);
790
- return Number.isFinite(code) ? code : void 0;
791
- }
792
839
  async function resolveMattermostOpaqueTarget(params) {
793
840
  const input = params.input.trim();
794
841
  if (!input || isExplicitMattermostTarget(input) || !isMattermostId(input)) return null;
@@ -801,11 +848,11 @@ async function resolveMattermostOpaqueTarget(params) {
801
848
  const baseUrl = normalizeMattermostBaseUrl(params.baseUrl ?? account?.baseUrl);
802
849
  if (!token || !baseUrl) return null;
803
850
  const key = cacheKey$1(baseUrl, token, input);
804
- const cachedKind = mattermostOpaqueTargetCache.get(key);
851
+ const cachedKind = getCachedMattermostOpaqueTargetKind(key);
805
852
  if (cachedKind) return {
806
853
  kind: cachedKind,
807
854
  id: input,
808
- to: `${cachedKind}:${input}`
855
+ to: cachedKind === "user" ? `user:${input}` : `channel:${input}`
809
856
  };
810
857
  const client = createMattermostClient({
811
858
  baseUrl,
@@ -821,7 +868,21 @@ async function resolveMattermostOpaqueTarget(params) {
821
868
  to: `user:${input}`
822
869
  };
823
870
  } catch (err) {
824
- if (parseMattermostApiStatus(err) === 404) cacheMattermostOpaqueTarget(key, "channel");
871
+ if (parseMattermostApiStatus(err) !== 404) return {
872
+ kind: "channel",
873
+ id: input,
874
+ to: `channel:${input}`
875
+ };
876
+ }
877
+ try {
878
+ const channelKind = resolveMattermostTrustedChatKind({ channelType: (await fetchMattermostChannel(client, input)).type }) === "group" ? "group" : "channel";
879
+ cacheMattermostOpaqueTarget(key, channelKind);
880
+ return {
881
+ kind: channelKind,
882
+ id: input,
883
+ to: `channel:${input}`
884
+ };
885
+ } catch {
825
886
  return {
826
887
  kind: "channel",
827
888
  id: input,
@@ -854,15 +915,14 @@ function cacheOutboundEntry(cache, key, value, maxEntries) {
854
915
  }
855
916
  const getCore = () => getMattermostRuntime();
856
917
  function createMattermostSendReceipt(params) {
857
- const messageIds = params.messageId.trim() && params.messageId !== "unknown" ? [params.messageId] : [];
858
918
  return createMessageReceiptFromOutboundResults({
859
919
  kind: params.kind,
860
920
  ...params.replyToId ? { replyToId: params.replyToId } : {},
861
- results: messageIds.map((messageId) => ({
921
+ results: [{
862
922
  channel: "mattermost",
863
- messageId,
923
+ messageId: params.messageId,
864
924
  channelId: params.channelId
865
- }))
925
+ }]
866
926
  });
867
927
  }
868
928
  function resolveMattermostReceiptKind(params) {
@@ -932,7 +992,9 @@ async function resolveChannelIdByName(params) {
932
992
  cacheOutboundEntry(channelByNameCache, key, channel.id, MATTERMOST_TARGET_CACHE_MAX_ENTRIES);
933
993
  return channel.id;
934
994
  }
935
- } catch {}
995
+ } catch (error) {
996
+ if (parseMattermostApiStatus(error) !== 404) throw error;
997
+ }
936
998
  throw new Error(`Mattermost channel "#${name}" not found in any team the bot belongs to`);
937
999
  }
938
1000
  function mergeDmRetryOptions(base, override) {
@@ -1070,7 +1132,7 @@ async function sendMessageMattermost(to, text, opts) {
1070
1132
  fileIds = [(await uploadMattermostFile(client, {
1071
1133
  channelId,
1072
1134
  buffer: media.buffer,
1073
- fileName: media.fileName ?? "upload",
1135
+ fileName: media.fileName ?? `upload${extensionForMime(media.contentType) ?? ""}`,
1074
1136
  contentType: media.contentType ?? void 0
1075
1137
  })).id];
1076
1138
  } catch (err) {
@@ -1098,22 +1160,35 @@ async function sendMessageMattermost(to, text, opts) {
1098
1160
  fileIds,
1099
1161
  props
1100
1162
  });
1101
- recordMattermostOutboundActivity(accountId);
1102
- const messageId = post.id ?? "unknown";
1103
- return {
1163
+ const messageId = post.id;
1164
+ const receipt = createMattermostSendReceipt({
1104
1165
  messageId,
1105
1166
  channelId,
1106
- receipt: createMattermostSendReceipt({
1107
- messageId,
1108
- channelId,
1109
- kind: resolveMattermostReceiptKind({
1110
- fileIds,
1111
- buttons: opts.buttons,
1112
- props
1113
- }),
1114
- replyToId: opts.replyToId
1115
- })
1167
+ kind: resolveMattermostReceiptKind({
1168
+ fileIds,
1169
+ buttons: opts.buttons,
1170
+ props
1171
+ }),
1172
+ replyToId: opts.replyToId
1173
+ });
1174
+ const result = {
1175
+ messageId,
1176
+ channelId,
1177
+ receipt,
1178
+ content: post.message ?? message
1116
1179
  };
1180
+ try {
1181
+ await opts.onDeliveryResult?.(result);
1182
+ recordMattermostOutboundActivity(accountId);
1183
+ } catch (error) {
1184
+ throw createChannelPartialDeliveryError(error, {
1185
+ messageIds: listMessageReceiptPlatformIds(receipt),
1186
+ receipt,
1187
+ visibleReplySent: true,
1188
+ content: result.content
1189
+ });
1190
+ }
1191
+ return result;
1117
1192
  }
1118
1193
  //#endregion
1119
1194
  //#region extensions/mattermost/src/mattermost/slash-http.ts
@@ -1651,8 +1726,9 @@ async function handleSlashCommandAsync(params) {
1651
1726
  },
1652
1727
  ctxPayload,
1653
1728
  delivery: {
1729
+ observeMessageSent: true,
1654
1730
  deliver: async (payload) => {
1655
- const result = toMattermostChannelDeliveryResult(await deliverMattermostReplyPayload({
1731
+ const result = await deliverMattermostReplyPayload({
1656
1732
  core,
1657
1733
  cfg,
1658
1734
  payload,
@@ -1663,7 +1739,7 @@ async function handleSlashCommandAsync(params) {
1663
1739
  tableMode,
1664
1740
  sendMessage: sendMessageMattermost,
1665
1741
  onDmChannelResolution: deliveryBarrier.trackDmChannelResolution
1666
- }));
1742
+ });
1667
1743
  if (result.visibleReplySent) runtime.log?.(`delivered slash reply to ${to}`);
1668
1744
  return result;
1669
1745
  },
@@ -1933,4 +2009,4 @@ function registerSlashCommandRoute(api) {
1933
2009
  });
1934
2010
  }
1935
2011
  //#endregion
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 };
2012
+ 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, joinMattermostVisibleContent 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 };
@@ -1,5 +1,8 @@
1
1
  {
2
2
  "id": "mattermost",
3
+ "doctorContract": {
4
+ "configRepair": true
5
+ },
3
6
  "icon": "https://cdn.simpleicons.org/mattermost",
4
7
  "activation": {
5
8
  "onStartup": false
@@ -81,6 +84,29 @@
81
84
  ],
82
85
  "additionalProperties": false
83
86
  },
87
+ {
88
+ "type": "object",
89
+ "properties": {
90
+ "source": {
91
+ "type": "string",
92
+ "const": "store"
93
+ },
94
+ "provider": {
95
+ "type": "string",
96
+ "pattern": "^[a-z][a-z0-9_-]{0,63}$"
97
+ },
98
+ "id": {
99
+ "type": "string",
100
+ "pattern": "^[A-Z][A-Z0-9_]{0,127}$"
101
+ }
102
+ },
103
+ "required": [
104
+ "source",
105
+ "provider",
106
+ "id"
107
+ ],
108
+ "additionalProperties": false
109
+ },
84
110
  {
85
111
  "type": "object",
86
112
  "properties": {
@@ -373,6 +399,9 @@
373
399
  "actions": {
374
400
  "type": "object",
375
401
  "properties": {
402
+ "messages": {
403
+ "type": "boolean"
404
+ },
376
405
  "reactions": {
377
406
  "type": "boolean"
378
407
  }
@@ -549,6 +578,29 @@
549
578
  ],
550
579
  "additionalProperties": false
551
580
  },
581
+ {
582
+ "type": "object",
583
+ "properties": {
584
+ "source": {
585
+ "type": "string",
586
+ "const": "store"
587
+ },
588
+ "provider": {
589
+ "type": "string",
590
+ "pattern": "^[a-z][a-z0-9_-]{0,63}$"
591
+ },
592
+ "id": {
593
+ "type": "string",
594
+ "pattern": "^[A-Z][A-Z0-9_]{0,127}$"
595
+ }
596
+ },
597
+ "required": [
598
+ "source",
599
+ "provider",
600
+ "id"
601
+ ],
602
+ "additionalProperties": false
603
+ },
552
604
  {
553
605
  "type": "object",
554
606
  "properties": {
@@ -841,6 +893,9 @@
841
893
  "actions": {
842
894
  "type": "object",
843
895
  "properties": {
896
+ "messages": {
897
+ "type": "boolean"
898
+ },
844
899
  "reactions": {
845
900
  "type": "boolean"
846
901
  }
@@ -999,6 +1054,22 @@
999
1054
  "label": "Mattermost Streaming Mode",
1000
1055
  "help": "Canonical Mattermost preview mode: \"off\" | \"partial\" | \"block\" | \"progress\"."
1001
1056
  },
1057
+ "streaming.block.enabled": {
1058
+ "label": "Mattermost Block Streaming Enabled",
1059
+ "help": "Enable chunked block-style Mattermost preview delivery when channels.mattermost.streaming.mode=\"block\"."
1060
+ },
1061
+ "streaming.block.coalesce": {
1062
+ "label": "Mattermost Block Streaming Coalesce",
1063
+ "help": "Merge streamed Mattermost block replies before final delivery."
1064
+ },
1065
+ "streaming.preview.toolProgress": {
1066
+ "label": "Mattermost Draft Tool Progress",
1067
+ "help": "Show tool/progress activity in the live draft preview post (default: true). Set false to hide interim tool updates while the draft preview stays active."
1068
+ },
1069
+ "streaming.preview.commandText": {
1070
+ "label": "Mattermost Draft Command Text",
1071
+ "help": "Command/exec detail in preview tool-progress lines: \"status\" is the safe default; \"raw\" opts into command text."
1072
+ },
1002
1073
  "streaming.progress.label": {
1003
1074
  "label": "Mattermost Progress Label",
1004
1075
  "help": "Initial progress draft title. Use \"auto\" for built-in single-word labels, a custom string, or false to hide the title."
@@ -1021,23 +1092,7 @@
1021
1092
  },
1022
1093
  "streaming.progress.commandText": {
1023
1094
  "label": "Mattermost Progress Command Text",
1024
- "help": "Command/exec detail in progress draft lines: \"raw\" preserves released behavior; \"status\" shows only the tool label."
1025
- },
1026
- "streaming.preview.toolProgress": {
1027
- "label": "Mattermost Draft Tool Progress",
1028
- "help": "Show tool/progress activity in the live draft preview post (default: true). Set false to hide interim tool updates while the draft preview stays active."
1029
- },
1030
- "streaming.preview.commandText": {
1031
- "label": "Mattermost Draft Command Text",
1032
- "help": "Command/exec detail in preview tool-progress lines: \"raw\" preserves released behavior; \"status\" shows only the tool label."
1033
- },
1034
- "streaming.block.enabled": {
1035
- "label": "Mattermost Block Streaming Enabled",
1036
- "help": "Enable chunked block-style Mattermost preview delivery when channels.mattermost.streaming.mode=\"block\"."
1037
- },
1038
- "streaming.block.coalesce": {
1039
- "label": "Mattermost Block Streaming Coalesce",
1040
- "help": "Merge streamed Mattermost block replies before final delivery."
1095
+ "help": "Command/exec detail in progress draft lines: \"status\" is the safe default; \"raw\" opts into command text."
1041
1096
  }
1042
1097
  }
1043
1098
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openclaw/mattermost",
3
- "version": "2026.7.2-beta.5",
3
+ "version": "2026.8.1-beta.2",
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.5"
15
+ "openclaw": ">=2026.8.1-beta.2"
16
16
  },
17
17
  "peerDependenciesMeta": {
18
18
  "openclaw": {
@@ -74,7 +74,11 @@
74
74
  "cli": {
75
75
  "flags": "--use-env",
76
76
  "description": "Use Mattermost environment credentials"
77
- }
77
+ },
78
+ "envVars": [
79
+ "MATTERMOST_BOT_TOKEN",
80
+ "MATTERMOST_URL"
81
+ ]
78
82
  }
79
83
  ]
80
84
  }
@@ -87,10 +91,10 @@
87
91
  "allowInvalidConfigRecovery": true
88
92
  },
89
93
  "compat": {
90
- "pluginApi": ">=2026.7.2-beta.5"
94
+ "pluginApi": ">=2026.8.1-beta.2"
91
95
  },
92
96
  "build": {
93
- "openclawVersion": "2026.7.2-beta.5",
97
+ "openclawVersion": "2026.8.1-beta.2",
94
98
  "bundledDist": false
95
99
  },
96
100
  "release": {
@@ -1,28 +0,0 @@
1
- import { collectSimpleChannelFieldAssignments, createChannelSecretTargetRegistryEntries, getChannelSurface } from "openclaw/plugin-sdk/channel-secret-basic-runtime";
2
- //#region extensions/mattermost/src/secret-contract.ts
3
- const secretTargetRegistryEntries = createChannelSecretTargetRegistryEntries({
4
- channelKey: "mattermost",
5
- account: ["botToken"],
6
- channel: ["botToken"]
7
- });
8
- function collectRuntimeConfigAssignments(params) {
9
- const resolved = getChannelSurface(params.config, "mattermost");
10
- if (!resolved) return;
11
- const { channel: mattermost, surface } = resolved;
12
- collectSimpleChannelFieldAssignments({
13
- channelKey: "mattermost",
14
- field: "botToken",
15
- channel: mattermost,
16
- surface,
17
- defaults: params.defaults,
18
- context: params.context,
19
- topInactiveReason: "no enabled account inherits this top-level Mattermost botToken.",
20
- accountInactiveReason: "Mattermost account is disabled."
21
- });
22
- }
23
- const channelSecrets = {
24
- secretTargetRegistryEntries,
25
- collectRuntimeConfigAssignments
26
- };
27
- //#endregion
28
- export { collectRuntimeConfigAssignments as n, secretTargetRegistryEntries as r, channelSecrets as t };