@openclaw/mattermost 2026.10.10 → 2026.11.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.
Files changed (34) hide show
  1. package/dist/.setup/{callback-host-CRQTeNn9.mjs → callback-host-Bu2cmtfI.mjs} +2 -1
  2. package/dist/.setup/channel-plugin-api-DZhra09y.mjs +3 -0
  3. package/dist/.setup/{channel-plugin-runtime-CLBgUA35.mjs → channel-plugin-runtime-C4r_3emu.mjs} +36 -22
  4. package/dist/.setup/{channel.runtime-BBMzxlPB.mjs → channel.runtime-0BtnojxH.mjs} +12 -8
  5. package/dist/.setup/{client-VHp4VYIf.mjs → client-B_4C9q6z.mjs} +2 -1
  6. package/dist/.setup/{doctor-contract-i788N90j.mjs → doctor-contract-CjgZkyPm.mjs} +11 -6
  7. package/dist/.setup/{gateway-auth-bypass-DhWaV22L.mjs → gateway-auth-bypass-Lf99Gilr.mjs} +3 -2
  8. package/dist/.setup/{ingress-identity-CtHiOUDu.mjs → ingress-identity-D6hxfxvo.mjs} +1 -0
  9. package/dist/.setup/{interactions-7eWssSf1.mjs → interactions-LQ_rJSdf.mjs} +19 -12
  10. package/dist/.setup/{monitor-agLGA4lV.mjs → monitor-CmsQnrEk.mjs} +52 -30
  11. package/dist/.setup/{monitor-auth-0gZXtoHv.mjs → monitor-auth-rr4M-8gH.mjs} +4 -3
  12. package/dist/.setup/{normalize-C_DYEHki.mjs → normalize-Dli2PK7k.mjs} +5 -3
  13. package/dist/.setup/{rolldown-runtime-782esTHO.mjs → rolldown-runtime-BBjsoOtd.mjs} +2 -1
  14. package/dist/.setup/{runtime-y_L8jPMH.mjs → runtime-CNB4YGqJ.mjs} +2 -1
  15. package/dist/.setup/secret-contract-api-BGz5_6WD.mjs +3 -0
  16. package/dist/.setup/secret-contract-fjlTFCmD.mjs +20 -0
  17. package/dist/.setup/{send-3ye1gFt3.mjs → send-C_-GT5iF.mjs} +9 -7
  18. package/dist/.setup/{slash-state-V13EaHX9.mjs → slash-state-DJN_cER0.mjs} +17 -11
  19. package/dist/api.js +2 -2
  20. package/dist/channel-plugin-api.js +2 -1
  21. package/dist/channel-plugin-runtime.js +2 -1
  22. package/dist/doctor-contract-api.js +2 -1
  23. package/dist/gateway-auth-api.js +2 -1
  24. package/dist/index.js +2 -1
  25. package/dist/policy-api.js +2 -1
  26. package/dist/runtime-api.js +2 -1
  27. package/dist/secret-contract-api.js +2 -1
  28. package/dist/setup-entry.js +4 -3
  29. package/dist/slash-route-api.js +2 -1
  30. package/package.json +4 -4
  31. package/dist/.setup/channel-plugin-api-Vq9imWd1.mjs +0 -2
  32. package/dist/.setup/secret-contract-H9g0kHHQ.mjs +0 -11
  33. package/dist/.setup/secret-contract-api-CmBND3cW.mjs +0 -2
  34. package/dist/.source-module-urls/9b327bbbce22c2cbef393c115f9a63999afd57e223aad992389710cb3f1e29cc.json +0 -1
@@ -1,5 +1,5 @@
1
1
  import { asOptionalRecord, normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
2
- // extensions/mattermost/src/mattermost/callback-host.ts
2
+ //#region extensions/mattermost/src/mattermost/callback-host.ts
3
3
  const DEFAULT_SLASH_CALLBACK_PATH = "/api/channels/mattermost/command";
4
4
  function normalizeCallbackPath(value) {
5
5
  const path = normalizeOptionalString(value) ?? DEFAULT_SLASH_CALLBACK_PATH;
@@ -30,4 +30,5 @@ function resolveCallbackHost(rawHost, trim = false) {
30
30
  const host = rawHost && !isWildcardBindHost(rawHost) ? trim ? rawHost.trim() : rawHost : "localhost";
31
31
  return host.includes(":") && !(host.startsWith("[") && host.endsWith("]")) ? `[${host}]` : host;
32
32
  }
33
+ //#endregion
33
34
  export { normalizeCallbackPath as n, resolveCallbackHost as r, collectMattermostCallbackPaths as t };
@@ -0,0 +1,3 @@
1
+ import { n as mattermostSetupPlugin, t as mattermostPlugin } from "./channel-plugin-runtime-C4r_3emu.mjs";
2
+ import "../channel-plugin-api.js";
3
+ export { mattermostPlugin, mattermostSetupPlugin };
@@ -1,9 +1,9 @@
1
- import { h as normalizeMattermostBaseUrl } from "./client-VHp4VYIf.mjs";
2
- import { t as mattermostIngressIdentity } from "./ingress-identity-CtHiOUDu.mjs";
3
- import { a as resolveMattermostPresentation, c as listMattermostAccountIds, d as resolveMattermostReplyToMode, i as requiresMattermostMediaUpload, l as resolveDefaultMattermostAccountId, n as normalizeMattermostMessagingTarget, o as inspectMattermostAccount, s as isMattermostConfigured$1, t as looksLikeMattermostTargetId, u as resolveMattermostAccount } from "./normalize-C_DYEHki.mjs";
4
- import { t as resolveMattermostGatewayAuthBypassPaths } from "./gateway-auth-bypass-DhWaV22L.mjs";
5
- import { n as normalizeCompatibilityConfig, t as legacyConfigRules } from "./doctor-contract-i788N90j.mjs";
6
- import { n as collectRuntimeConfigAssignments, r as secretTargetRegistryEntries } from "./secret-contract-H9g0kHHQ.mjs";
1
+ import { h as normalizeMattermostBaseUrl } from "./client-B_4C9q6z.mjs";
2
+ import { t as mattermostIngressIdentity } from "./ingress-identity-D6hxfxvo.mjs";
3
+ import { a as resolveMattermostPresentation, c as listMattermostAccountIds, d as resolveMattermostReplyToMode, i as requiresMattermostMediaUpload, l as resolveDefaultMattermostAccountId, n as normalizeMattermostMessagingTarget, o as inspectMattermostAccount, s as isMattermostConfigured$1, t as looksLikeMattermostTargetId, u as resolveMattermostAccount } from "./normalize-Dli2PK7k.mjs";
4
+ import { t as resolveMattermostGatewayAuthBypassPaths } from "./gateway-auth-bypass-Lf99Gilr.mjs";
5
+ import { n as normalizeCompatibilityConfig, t as legacyConfigRules } from "./doctor-contract-CjgZkyPm.mjs";
6
+ import { n as collectRuntimeConfigAssignments, r as secretTargetRegistryEntries } from "./secret-contract-fjlTFCmD.mjs";
7
7
  import { asOptionalRecord, normalizeLowercaseStringOrEmpty, normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
8
8
  import { buildPassiveProbedChannelStatusSummary } from "openclaw/plugin-sdk/extension-shared";
9
9
  import { z } from "zod";
@@ -32,7 +32,7 @@ import { ChannelImplicitMentionsSchema, ChannelPreviewStreamingConfigSchema, Cha
32
32
  import { defineChannelSetupContract } from "openclaw/plugin-sdk/channel-setup";
33
33
  import { applyAccountNameToChannelSection, applySetupAccountConfigPatch, baseUrlTextInput, createSetupTranslator, createStandardChannelSetupStatus, defineTokenCredential, formatDocsLink, migrateBaseNameToDefaultAccount, setSetupChannelEnabled } from "openclaw/plugin-sdk/setup";
34
34
  import { createSetupInputPresenceValidator } from "openclaw/plugin-sdk/setup-runtime";
35
- // extensions/mattermost/src/approval-auth.ts
35
+ //#region extensions/mattermost/src/approval-auth.ts
36
36
  const MATTERMOST_USER_ID_RE = /^[a-z0-9]{26}$/;
37
37
  function normalizeMattermostApproverId(value) {
38
38
  const normalized = String(value).trim().replace(/^(mattermost|user):/i, "").replace(/^@/, "");
@@ -49,7 +49,8 @@ const mattermostApprovalAuth = createChannelApprovalAuth({
49
49
  },
50
50
  normalizeApprover: normalizeMattermostApproverId
51
51
  }).approvalAuth;
52
- // extensions/mattermost/src/channel-config-shared.ts
52
+ //#endregion
53
+ //#region extensions/mattermost/src/channel-config-shared.ts
53
54
  const mattermostMeta = {
54
55
  id: "mattermost",
55
56
  label: "Mattermost",
@@ -102,7 +103,8 @@ function describeMattermostAccount(account) {
102
103
  }
103
104
  });
104
105
  }
105
- // extensions/mattermost/src/channel-send-result.ts
106
+ //#endregion
107
+ //#region extensions/mattermost/src/channel-send-result.ts
106
108
  function toMattermostOutboundResult(result) {
107
109
  const { channelId, ...delivery } = result;
108
110
  return {
@@ -118,7 +120,8 @@ function createMattermostDeliveryProgressReporter(onDeliveryResult) {
118
120
  await onDeliveryResult(attachChannelToResult("mattermost", toMattermostOutboundResult(result)));
119
121
  } : void 0;
120
122
  }
121
- // extensions/mattermost/src/config-schema-core.ts
123
+ //#endregion
124
+ //#region extensions/mattermost/src/config-schema-core.ts
122
125
  const MattermostGroupSchema = buildGroupEntrySchema({ requireMentionInBotThreads: z.boolean().optional() }).omit({
123
126
  tools: true,
124
127
  toolsBySender: true,
@@ -232,7 +235,8 @@ const MattermostConfigSchema = buildMultiAccountChannelSchema(MattermostAccountS
232
235
  });
233
236
  }
234
237
  });
235
- // extensions/mattermost/src/config-ui-hints.ts
238
+ //#endregion
239
+ //#region extensions/mattermost/src/config-ui-hints.ts
236
240
  const mattermostChannelConfigUiHints = {
237
241
  "": {
238
242
  label: "Mattermost",
@@ -261,9 +265,11 @@ const mattermostChannelConfigUiHints = {
261
265
  progress: {}
262
266
  })
263
267
  };
264
- // extensions/mattermost/src/config-surface.ts
268
+ //#endregion
269
+ //#region extensions/mattermost/src/config-surface.ts
265
270
  const MattermostChannelConfigSchema = buildChannelConfigSchema(MattermostConfigSchema, { uiHints: mattermostChannelConfigUiHints });
266
- // extensions/mattermost/src/setup-core.ts
271
+ //#endregion
272
+ //#region extensions/mattermost/src/setup-core.ts
267
273
  const channel$1 = "mattermost";
268
274
  function isMattermostConfigured(account) {
269
275
  return (Boolean(account.botToken?.trim()) || hasConfiguredSecretInput(account.config.botToken)) && Boolean(account.baseUrl);
@@ -366,7 +372,8 @@ const mattermostSetupContract = defineChannelSetupContract({
366
372
  },
367
373
  legacyAdapter: mattermostSetupAdapter
368
374
  });
369
- // extensions/mattermost/src/setup-surface.ts
375
+ //#endregion
376
+ //#region extensions/mattermost/src/setup-surface.ts
370
377
  const t = createSetupTranslator();
371
378
  const channel = "mattermost";
372
379
  const mattermostSetupWizard = {
@@ -453,7 +460,8 @@ const mattermostSetupWizard = {
453
460
  })],
454
461
  disable: (cfg) => setSetupChannelEnabled(cfg, channel, false)
455
462
  };
456
- // extensions/mattermost/src/channel.setup.ts
463
+ //#endregion
464
+ //#region extensions/mattermost/src/channel.setup.ts
457
465
  const mattermostSetupPlugin = {
458
466
  id: "mattermost",
459
467
  meta: { ...mattermostMeta },
@@ -488,7 +496,8 @@ const mattermostSetupPlugin = {
488
496
  setupContract: mattermostSetupContract,
489
497
  setupWizard: mattermostSetupWizard
490
498
  };
491
- // extensions/mattermost/src/doctor.ts
499
+ //#endregion
500
+ //#region extensions/mattermost/src/doctor.ts
492
501
  const isMattermostMutableAllowEntry = buildMutableAllowEntryDetector({ stableIdPattern: /^(?:(?:mattermost|user):)?@?[a-z0-9]{26}$/i });
493
502
  const collectMattermostMutableAllowlistWarnings = createDangerousNameMatchingMutableAllowlistWarningCollector({
494
503
  channel: "mattermost",
@@ -500,7 +509,8 @@ const mattermostDoctor = {
500
509
  normalizeCompatibilityConfig,
501
510
  collectMutableAllowlistWarnings: collectMattermostMutableAllowlistWarnings
502
511
  };
503
- // extensions/mattermost/src/group-mentions.ts
512
+ //#endregion
513
+ //#region extensions/mattermost/src/group-mentions.ts
504
514
  function resolveMattermostGroupRequireMention(params) {
505
515
  const account = resolveMattermostAccount({
506
516
  cfg: params.cfg,
@@ -513,7 +523,8 @@ function resolveMattermostGroupRequireMention(params) {
513
523
  overrideOrder: "after-config"
514
524
  });
515
525
  }
516
- // extensions/mattermost/src/mattermost/emoji.ts
526
+ //#endregion
527
+ //#region extensions/mattermost/src/mattermost/emoji.ts
517
528
  const MATTERMOST_EMOJI_SHORTNAME_BY_GLYPH = {
518
529
  "✅": "white_check_mark",
519
530
  "❌": "x",
@@ -567,7 +578,8 @@ function normalizeMattermostEmojiName(raw) {
567
578
  if (!toneSuffix || !MATTERMOST_EMOJI_TONE_CAPABLE_NAMES.has(shortname)) return shortname;
568
579
  return `${shortname}_${toneSuffix}`;
569
580
  }
570
- // extensions/mattermost/src/session-route.ts
581
+ //#endregion
582
+ //#region extensions/mattermost/src/session-route.ts
571
583
  /**
572
584
  * Reads the peer chat-kind already recorded for `peerId` in an agent session
573
585
  * key. Agent session keys are
@@ -616,8 +628,9 @@ function resolveMattermostOutboundSessionRoute(params) {
616
628
  canRecoverCurrentThread: ({ route }) => route.chatType !== "direct" || (params.cfg.session?.dmScope ?? "main") !== "main"
617
629
  });
618
630
  }
619
- // extensions/mattermost/src/channel.ts
620
- const loadMattermostChannelRuntime = createLazyRuntimeModule(() => import("./channel.runtime-BBMzxlPB.mjs"));
631
+ //#endregion
632
+ //#region extensions/mattermost/src/channel.ts
633
+ const loadMattermostChannelRuntime = createLazyRuntimeModule(() => import("./channel.runtime-0BtnojxH.mjs"));
621
634
  const MATTERMOST_PRESENTATION_CAPABILITIES = {
622
635
  supported: true,
623
636
  buttons: true,
@@ -1089,7 +1102,7 @@ const mattermostPlugin = createChatChannelPlugin({
1089
1102
  botTokenSource: account.botTokenSource
1090
1103
  });
1091
1104
  ctx.log?.info(`[${account.accountId}] starting channel`);
1092
- return (await import("./monitor-agLGA4lV.mjs")).monitorMattermostProvider({
1105
+ return (await import("./monitor-CmsQnrEk.mjs")).monitorMattermostProvider({
1093
1106
  botToken: account.botToken ?? void 0,
1094
1107
  baseUrl: account.baseUrl ?? void 0,
1095
1108
  accountId: account.accountId,
@@ -1131,4 +1144,5 @@ const mattermostPlugin = createChatChannelPlugin({
1131
1144
  security: mattermostSecurityAdapter,
1132
1145
  outbound: mattermostOutbound
1133
1146
  });
1147
+ //#endregion
1134
1148
  export { mattermostSetupPlugin as n, mattermostPlugin as t };
@@ -1,7 +1,7 @@
1
- import { _ as readMattermostError, h as normalizeMattermostBaseUrl, l as fetchMattermostChannelPosts, r as createMattermostClient, s as fetchMattermostChannel, u as fetchMattermostMe } from "./client-VHp4VYIf.mjs";
2
- import { s as resolveMattermostTrustedChatKind } from "./monitor-auth-0gZXtoHv.mjs";
3
- import { c as listMattermostAccountIds, n as normalizeMattermostMessagingTarget, o as inspectMattermostAccount, u as resolveMattermostAccount } from "./normalize-C_DYEHki.mjs";
4
- import { n as resolveMattermostOpaqueTarget, t as sendMessageMattermost } from "./send-3ye1gFt3.mjs";
1
+ import { _ as readMattermostError, h as normalizeMattermostBaseUrl, l as fetchMattermostChannelPosts, r as createMattermostClient, s as fetchMattermostChannel, u as fetchMattermostMe } from "./client-B_4C9q6z.mjs";
2
+ import { s as resolveMattermostTrustedChatKind } from "./monitor-auth-rr4M-8gH.mjs";
3
+ import { c as listMattermostAccountIds, n as normalizeMattermostMessagingTarget, o as inspectMattermostAccount, u as resolveMattermostAccount } from "./normalize-Dli2PK7k.mjs";
4
+ import { n as resolveMattermostOpaqueTarget, t as sendMessageMattermost } from "./send-C_-GT5iF.mjs";
5
5
  import { normalizeLowercaseStringOrEmpty } from "openclaw/plugin-sdk/string-coerce-runtime";
6
6
  import { runChannelProbe } from "openclaw/plugin-sdk/text-utility-runtime";
7
7
  import { formatErrorMessage } from "openclaw/plugin-sdk/error-runtime";
@@ -10,7 +10,7 @@ import { readProviderJsonResponse } from "openclaw/plugin-sdk/provider-http";
10
10
  import { fetchWithSsrFGuard, ssrfPolicyFromPrivateNetworkOptIn } from "openclaw/plugin-sdk/ssrf-runtime";
11
11
  import { resolveAllowlistProviderRuntimeGroupPolicy } from "openclaw/plugin-sdk/runtime-group-policy";
12
12
  import { normalizeAccountId } from "openclaw/plugin-sdk/account-id";
13
- // extensions/mattermost/src/mattermost/directory.ts
13
+ //#region extensions/mattermost/src/mattermost/directory.ts
14
14
  /** Build the requested account client, or aggregate accounts for an explicitly unscoped lookup. */
15
15
  function buildClients(params) {
16
16
  const requestedAccountId = params.accountId?.trim();
@@ -129,7 +129,8 @@ async function listMattermostDirectoryPeers(params) {
129
129
  return [];
130
130
  }
131
131
  }
132
- // extensions/mattermost/src/mattermost/probe.ts
132
+ //#endregion
133
+ //#region extensions/mattermost/src/mattermost/probe.ts
133
134
  async function probeMattermost(baseUrl, botToken, timeoutMs = 2500, allowPrivateNetwork = false) {
134
135
  const normalized = normalizeMattermostBaseUrl(baseUrl);
135
136
  if (!normalized) return {
@@ -174,7 +175,8 @@ async function probeMattermost(baseUrl, botToken, timeoutMs = 2500, allowPrivate
174
175
  error: formatErrorMessage(error)
175
176
  }));
176
177
  }
177
- // extensions/mattermost/src/mattermost/reactions.ts
178
+ //#endregion
179
+ //#region extensions/mattermost/src/mattermost/reactions.ts
178
180
  const BOT_USER_CACHE_TTL_MS = 6e5;
179
181
  const botUserIdCache = /* @__PURE__ */ new Map();
180
182
  async function resolveBotUserId(client, cacheKey) {
@@ -287,7 +289,8 @@ async function runMattermostReaction(params, action) {
287
289
  }
288
290
  return { ok: true };
289
291
  }
290
- // extensions/mattermost/src/mattermost/read.ts
292
+ //#endregion
293
+ //#region extensions/mattermost/src/mattermost/read.ts
291
294
  function parseMattermostChannelTarget(rawTarget) {
292
295
  const normalized = normalizeMattermostMessagingTarget(rawTarget);
293
296
  if (normalized?.startsWith("channel:")) return normalized.slice(8).trim() || void 0;
@@ -347,4 +350,5 @@ async function readMattermostMessages(params) {
347
350
  after: params.after
348
351
  });
349
352
  }
353
+ //#endregion
350
354
  export { addMattermostReaction, listMattermostDirectoryGroups, listMattermostDirectoryPeers, probeMattermost, readMattermostMessages, removeMattermostReaction, resolveMattermostOpaqueTarget, sendMessageMattermost };
@@ -10,7 +10,7 @@ import { readResponseTextPrefix, readResponseWithLimit } from "openclaw/plugin-s
10
10
  import { retryAsync } from "openclaw/plugin-sdk/retry-runtime";
11
11
  import { fetchWithSsrFGuard, ssrfPolicyFromPrivateNetworkOptIn } from "openclaw/plugin-sdk/ssrf-runtime";
12
12
  import { z } from "zod";
13
- // extensions/mattermost/src/mattermost/client.ts
13
+ //#region extensions/mattermost/src/mattermost/client.ts
14
14
  const MATTERMOST_ERROR_BODY_LIMIT_BYTES = 8192;
15
15
  const MATTERMOST_REQUEST_TIMEOUT_MS = 3e4;
16
16
  const MATTERMOST_TEXT_RESPONSE_LIMIT_BYTES = 65536;
@@ -393,4 +393,5 @@ async function uploadMattermostFile(client, params) {
393
393
  if (!info?.id) throw new Error("Mattermost file upload failed");
394
394
  return info;
395
395
  }
396
+ //#endregion
396
397
  export { readMattermostError as _, createMattermostPost as a, uploadMattermostFile as b, fetchMattermostChannelByName as c, fetchMattermostUser as d, fetchMattermostUserByUsername as f, parseMattermostApiStatus as g, normalizeMattermostBaseUrl as h, createMattermostDirectChannelWithRetry as i, fetchMattermostChannelPosts as l, isRetryableError as m, buildMattermostApiUrl as n, deleteMattermostPost as o, fetchMattermostUserTeams as p, createMattermostClient as r, fetchMattermostChannel as s, MattermostPostSchema as t, fetchMattermostMe as u, sendMattermostTyping as v, updateMattermostPost as y };
@@ -1,5 +1,5 @@
1
- import { n as __reExport, t as __exportAll } from "./rolldown-runtime-782esTHO.mjs";
2
- // packages/normalization-core/src/record-coerce.ts
1
+ import { n as __reExport, t as __exportAll } from "./rolldown-runtime-BBjsoOtd.mjs";
2
+ //#region packages/normalization-core/src/record-coerce.ts
3
3
  /** Type guard for non-array object records at browser-safe boundaries. */
4
4
  function isRecord(value) {
5
5
  return value !== null && typeof value === "object" && !Array.isArray(value);
@@ -8,7 +8,8 @@ function isRecord(value) {
8
8
  function asNullableRecord(value) {
9
9
  return isRecord(value) ? value : null;
10
10
  }
11
- // src/config/channel-config-normalization.ts
11
+ //#endregion
12
+ //#region src/config/channel-config-normalization.ts
12
13
  /** Applies one channel-specific doctor migration to every object-shaped account. */
13
14
  function normalizeChannelAccounts(params) {
14
15
  const rawAccounts = asNullableRecord(params.entry.accounts);
@@ -84,7 +85,8 @@ function normalizeChannelConfigEntries(params) {
84
85
  changes
85
86
  };
86
87
  }
87
- // src/plugin-sdk/legacy-webhook-listener-migration.ts
88
+ //#endregion
89
+ //#region src/plugin-sdk/legacy-webhook-listener-migration.ts
88
90
  /** Preserve explicitly configured webhook listeners while moving ingress onto Gateway routes. */
89
91
  function createLegacyWebhookListenerDoctorContract(params) {
90
92
  const portKey = params.portKey ?? "webhookPort";
@@ -154,14 +156,17 @@ function createLegacyWebhookListenerDoctorContract(params) {
154
156
  }
155
157
  };
156
158
  }
157
- // \0openclaw:bundled-sdk:openclaw/plugin-sdk/runtime-doctor-migrations
159
+ //#endregion
160
+ //#region \0openclaw:bundled-sdk:openclaw/plugin-sdk/runtime-doctor-migrations
158
161
  var runtime_doctor_migrations_exports = /* @__PURE__ */ __exportAll({ createLegacyWebhookListenerDoctorContract: () => createLegacyWebhookListenerDoctorContract });
159
162
  import * as import_openclaw_plugin_sdk_runtime_doctor_migrations from "openclaw/plugin-sdk/runtime-doctor-migrations";
160
163
  __reExport(runtime_doctor_migrations_exports, import_openclaw_plugin_sdk_runtime_doctor_migrations);
161
- // extensions/mattermost/src/doctor-contract.ts
164
+ //#endregion
165
+ //#region extensions/mattermost/src/doctor-contract.ts
162
166
  const { legacyConfigRules, normalizeChannelConfig: normalizeCompatibilityConfig } = (0, runtime_doctor_migrations_exports.defineChannelAliasMigration)({
163
167
  channelId: "mattermost",
164
168
  streaming: { defaultMode: "partial" },
165
169
  accountStreamingReplacesRoot: true
166
170
  });
171
+ //#endregion
167
172
  export { normalizeCompatibilityConfig as n, legacyConfigRules as t };
@@ -1,6 +1,7 @@
1
- import { t as collectMattermostCallbackPaths } from "./callback-host-CRQTeNn9.mjs";
2
- // extensions/mattermost/src/gateway-auth-bypass.ts
1
+ import { t as collectMattermostCallbackPaths } from "./callback-host-Bu2cmtfI.mjs";
2
+ //#region extensions/mattermost/src/gateway-auth-bypass.ts
3
3
  function resolveMattermostGatewayAuthBypassPaths(params) {
4
4
  return collectMattermostCallbackPaths(params.cfg.channels?.mattermost).filter((path) => path.startsWith("/api/channels/mattermost/"));
5
5
  }
6
+ //#endregion
6
7
  export { resolveMattermostGatewayAuthBypassPaths as t };
@@ -22,4 +22,5 @@ function normalizeMattermostAllowEntry(entry) {
22
22
  if (accessGroupName) return `accessGroup:${accessGroupName}`;
23
23
  return normalizeLowercaseStringOrEmpty(trimmed.replace(/^(mattermost|user):/i, "").replace(/^@/, ""));
24
24
  }
25
+ //#endregion
25
26
  export { normalizeMattermostAllowEntry as n, mattermostIngressIdentity as t };
@@ -1,13 +1,13 @@
1
- import { n as __reExport, t as __exportAll } from "./rolldown-runtime-782esTHO.mjs";
2
- import { t as getMattermostRuntime } from "./runtime-y_L8jPMH.mjs";
3
- import { r as resolveCallbackHost } from "./callback-host-CRQTeNn9.mjs";
4
- import { y as updateMattermostPost } from "./client-VHp4VYIf.mjs";
5
- import { E as resolveClientIp, O as sendHttpRequestRejection, S as readRequestBodyWithLimit, _ as isTrustedProxyAddress, g as isRequestBodyLimitError } from "./monitor-auth-0gZXtoHv.mjs";
1
+ import { n as __reExport, t as __exportAll } from "./rolldown-runtime-BBjsoOtd.mjs";
2
+ import { t as getMattermostRuntime } from "./runtime-CNB4YGqJ.mjs";
3
+ import { r as resolveCallbackHost } from "./callback-host-Bu2cmtfI.mjs";
4
+ import { y as updateMattermostPost } from "./client-B_4C9q6z.mjs";
5
+ import { E as resolveClientIp, O as sendHttpRequestRejection, S as readRequestBodyWithLimit, _ as isTrustedProxyAddress, g as isRequestBodyLimitError } from "./monitor-auth-rr4M-8gH.mjs";
6
6
  import { createHmac } from "node:crypto";
7
7
  import { safeEqualSecret } from "openclaw/plugin-sdk/security-runtime";
8
8
  import { normalizeOptionalString, normalizeStringifiedOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
9
9
  import { safeParseJson } from "openclaw/plugin-sdk/text-utility-runtime";
10
- // src/gateway/gateway-http-route-contracts.ts
10
+ //#region src/gateway/gateway-http-route-contracts.ts
11
11
  const GATEWAY_PROBE_ROUTES = /* @__PURE__ */ new Map([
12
12
  ["/health", "live"],
13
13
  ["/healthz", "live"],
@@ -23,7 +23,8 @@ function classifyGatewayProbePath(pathname) {
23
23
  }
24
24
  return "outside";
25
25
  }
26
- // packages/normalization-core/src/string-coerce.ts
26
+ //#endregion
27
+ //#region packages/normalization-core/src/string-coerce.ts
27
28
  /** Trims string input and returns null for non-strings or empty strings. */
28
29
  function normalizeNullableString(value) {
29
30
  if (typeof value !== "string") return null;
@@ -42,11 +43,13 @@ function normalizeOptionalLowercaseString(value) {
42
43
  function normalizeLowercaseStringOrEmpty$1(value) {
43
44
  return normalizeOptionalLowercaseString(value) ?? "";
44
45
  }
45
- // src/plugins/http-path-prefix.ts
46
+ //#endregion
47
+ //#region src/plugins/http-path-prefix.ts
46
48
  function prefixMatchPath(pathname, prefix) {
47
49
  return pathname === prefix || pathname.startsWith(`${prefix}/`) || pathname.startsWith(`${prefix}%`);
48
50
  }
49
- // src/gateway/security-path.ts
51
+ //#endregion
52
+ //#region src/gateway/security-path.ts
50
53
  const MAX_PATH_DECODE_PASSES = 32;
51
54
  function normalizePathSeparators(pathname) {
52
55
  const collapsed = pathname.replace(/\/{2,}/g, "/");
@@ -99,7 +102,8 @@ function canonicalizePathForSecurity(pathname) {
99
102
  };
100
103
  }
101
104
  const PROTECTED_PLUGIN_ROUTE_PREFIXES = ["/api/channels"];
102
- // src/gateway/server/plugins-http/path-context.ts
105
+ //#endregion
106
+ //#region src/gateway/server/plugins-http/path-context.ts
103
107
  function normalizeProtectedPrefix(prefix) {
104
108
  const collapsed = normalizeLowercaseStringOrEmpty$1(prefix).replace(/\/{2,}/g, "/");
105
109
  if (collapsed.length <= 1) return collapsed || "/";
@@ -125,7 +129,8 @@ function resolvePluginRoutePathContext(pathname) {
125
129
  rawNormalizedPath: canonical.rawNormalizedPath
126
130
  };
127
131
  }
128
- // \0openclaw:bundled-sdk:openclaw/plugin-sdk/gateway-config-runtime
132
+ //#endregion
133
+ //#region \0openclaw:bundled-sdk:openclaw/plugin-sdk/gateway-config-runtime
129
134
  var gateway_config_runtime_exports = /* @__PURE__ */ __exportAll({
130
135
  classifyGatewayProbePath: () => classifyGatewayProbePath,
131
136
  isProtectedPluginRoutePathFromContext: () => isProtectedPluginRoutePathFromContext,
@@ -133,7 +138,8 @@ var gateway_config_runtime_exports = /* @__PURE__ */ __exportAll({
133
138
  });
134
139
  import * as import_openclaw_plugin_sdk_gateway_config_runtime from "openclaw/plugin-sdk/gateway-config-runtime";
135
140
  __reExport(gateway_config_runtime_exports, import_openclaw_plugin_sdk_gateway_config_runtime);
136
- // extensions/mattermost/src/mattermost/interactions.ts
141
+ //#endregion
142
+ //#region extensions/mattermost/src/mattermost/interactions.ts
137
143
  const INTERACTION_MAX_BODY_BYTES = 65536;
138
144
  const INTERACTION_BODY_TIMEOUT_MS = 1e4;
139
145
  const SIGNED_CHANNEL_ID_CONTEXT_KEY = "__openclaw_channel_id";
@@ -446,4 +452,5 @@ function createMattermostInteractionHandler(params) {
446
452
  }
447
453
  };
448
454
  }
455
+ //#endregion
449
456
  export { resolveInteractionCallbackPath as a, setInteractionSecret as c, createMattermostInteractionHandler as i, gateway_config_runtime_exports as l, buildButtonProps as n, resolveInteractionCallbackUrl as o, computeInteractionCallbackUrl as r, setInteractionCallbackUrl as s, buildButtonAttachments as t };
@@ -1,11 +1,11 @@
1
- import { a as resolveInteractionCallbackPath, c as setInteractionSecret, i as createMattermostInteractionHandler, l as gateway_config_runtime_exports, n as buildButtonProps, r as computeInteractionCallbackUrl, s as setInteractionCallbackUrl } from "./interactions-7eWssSf1.mjs";
2
- import { n as getOptionalMattermostRuntime, t as getMattermostRuntime } from "./runtime-y_L8jPMH.mjs";
3
- import { a as createMattermostPost, d as fetchMattermostUser, h as normalizeMattermostBaseUrl, l as fetchMattermostChannelPosts, m as isRetryableError, n as buildMattermostApiUrl, o as deleteMattermostPost, p as fetchMattermostUserTeams, r as createMattermostClient, s as fetchMattermostChannel, t as MattermostPostSchema, u as fetchMattermostMe, v as sendMattermostTyping, y as updateMattermostPost } from "./client-VHp4VYIf.mjs";
4
- import { C as registerPluginHttpRoute, D as resolveDefaultGroupPolicy, T as resolveChannelMediaMaxBytes, b as logTypingFailure, c as shouldRetainMattermostSenderHistory, d as createChannelHistoryWindow, f as createChannelMessageReplyPipeline, h as isDangerousNameMatchingEnabled, k as warnMissingProviderGroupPolicyFallbackOnce, l as DEFAULT_GROUP_HISTORY_LIMIT, n as authorizeMattermostCommandInvocation, o as resolveMattermostMonitorInboundAccess, p as createChannelPairingController, r as formatMattermostDirectMessageDropLog, s as resolveMattermostTrustedChatKind, t as MATTERMOST_PAIRING_QUEUE_FULL_TEXT, u as buildPreparedModelsProviderData, w as resolveAllowlistProviderRuntimeGroupPolicy, x as prepareSkillCommandsForAgents, y as logInboundDrop } from "./monitor-auth-0gZXtoHv.mjs";
5
- import { n as normalizeMattermostAllowEntry } from "./ingress-identity-CtHiOUDu.mjs";
6
- import { d as resolveMattermostReplyToMode, r as parseMattermostQuestionContext, u as resolveMattermostAccount } from "./normalize-C_DYEHki.mjs";
7
- import { _ as resolveSlashCommandConfig, a as deliverMattermostReplyPayload, c as parseMattermostModelPickerContext, d as resolveMattermostModelPickerCurrentModel, f as DEFAULT_COMMAND_SPECS, g as resolveCallbackUrl, h as registerSlashCommands, l as renderMattermostModelsPickerView, m as isSlashCommandsEnabled, n as deactivateSlashCommands, o as joinMattermostVisibleContent, p as cleanupSlashCommands, r as getSlashCommandState, s as buildMattermostAllowedModelRefs, t as activateSlashCommands, u as renderMattermostProviderPickerView } from "./slash-state-V13EaHX9.mjs";
8
- import { t as sendMessageMattermost } from "./send-3ye1gFt3.mjs";
1
+ import { a as resolveInteractionCallbackPath, c as setInteractionSecret, i as createMattermostInteractionHandler, l as gateway_config_runtime_exports, n as buildButtonProps, r as computeInteractionCallbackUrl, s as setInteractionCallbackUrl } from "./interactions-LQ_rJSdf.mjs";
2
+ import { n as getOptionalMattermostRuntime, t as getMattermostRuntime } from "./runtime-CNB4YGqJ.mjs";
3
+ import { a as createMattermostPost, d as fetchMattermostUser, h as normalizeMattermostBaseUrl, l as fetchMattermostChannelPosts, m as isRetryableError, n as buildMattermostApiUrl, o as deleteMattermostPost, p as fetchMattermostUserTeams, r as createMattermostClient, s as fetchMattermostChannel, t as MattermostPostSchema, u as fetchMattermostMe, v as sendMattermostTyping, y as updateMattermostPost } from "./client-B_4C9q6z.mjs";
4
+ import { C as registerPluginHttpRoute, D as resolveDefaultGroupPolicy, T as resolveChannelMediaMaxBytes, b as logTypingFailure, c as shouldRetainMattermostSenderHistory, d as createChannelHistoryWindow, f as createChannelMessageReplyPipeline, h as isDangerousNameMatchingEnabled, k as warnMissingProviderGroupPolicyFallbackOnce, l as DEFAULT_GROUP_HISTORY_LIMIT, n as authorizeMattermostCommandInvocation, o as resolveMattermostMonitorInboundAccess, p as createChannelPairingController, r as formatMattermostDirectMessageDropLog, s as resolveMattermostTrustedChatKind, t as MATTERMOST_PAIRING_QUEUE_FULL_TEXT, u as buildPreparedModelsProviderData, w as resolveAllowlistProviderRuntimeGroupPolicy, x as prepareSkillCommandsForAgents, y as logInboundDrop } from "./monitor-auth-rr4M-8gH.mjs";
5
+ import { n as normalizeMattermostAllowEntry } from "./ingress-identity-D6hxfxvo.mjs";
6
+ import { d as resolveMattermostReplyToMode, r as parseMattermostQuestionContext, u as resolveMattermostAccount } from "./normalize-Dli2PK7k.mjs";
7
+ import { _ as resolveSlashCommandConfig, a as deliverMattermostReplyPayload, c as parseMattermostModelPickerContext, d as resolveMattermostModelPickerCurrentModel, f as DEFAULT_COMMAND_SPECS, g as resolveCallbackUrl, h as registerSlashCommands, l as renderMattermostModelsPickerView, m as isSlashCommandsEnabled, n as deactivateSlashCommands, o as joinMattermostVisibleContent, p as cleanupSlashCommands, r as getSlashCommandState, s as buildMattermostAllowedModelRefs, t as activateSlashCommands, u as renderMattermostProviderPickerView } from "./slash-state-DJN_cER0.mjs";
8
+ import { t as sendMessageMattermost } from "./send-C_-GT5iF.mjs";
9
9
  import { randomUUID } from "node:crypto";
10
10
  import { resolvePinnedMainDmOwnerFromAllowlist, sanitizeUntrustedFileName } from "openclaw/plugin-sdk/security-runtime";
11
11
  import { normalizeLowercaseStringOrEmpty, normalizeOptionalString, normalizeStringEntries, normalizeTrimmedStringList, uniqueStrings } from "openclaw/plugin-sdk/string-coerce-runtime";
@@ -39,7 +39,7 @@ import { chunkMarkdownTextWithMode } from "openclaw/plugin-sdk/reply-chunking";
39
39
  import { createPersistentDedupeCache } from "openclaw/plugin-sdk/dedupe-runtime";
40
40
  import { createPluginStateErrorReporter } from "openclaw/plugin-sdk/plugin-state-runtime";
41
41
  import { setTimeout as setTimeout$1 } from "node:timers/promises";
42
- // extensions/mattermost/src/mattermost/monitor-helpers.ts
42
+ //#region extensions/mattermost/src/mattermost/monitor-helpers.ts
43
43
  function buildMattermostBotMentionPattern(username) {
44
44
  return `(?<![a-z0-9_])@${escapeRegExp(username)}(?![a-z0-9_]|[.:-]+[a-z0-9_])`;
45
45
  }
@@ -78,7 +78,8 @@ function shouldDropEmptyMattermostBody(params) {
78
78
  const bareMention = params.rawText.match(/^[ \t]*(@\S+)[ \t]*$/u)?.[1];
79
79
  return !botUsername || normalizeLowercaseStringOrEmpty(bareMention) !== `@${botUsername}`;
80
80
  }
81
- // extensions/mattermost/src/mattermost/monitor-websocket.ts
81
+ //#endregion
82
+ //#region extensions/mattermost/src/mattermost/monitor-websocket.ts
82
83
  const MATTERMOST_WEBSOCKET_MAX_PAYLOAD_BYTES = 16777216;
83
84
  const MATTERMOST_WEBSOCKET_HANDSHAKE_TIMEOUT_MS = 3e4;
84
85
  const MATTERMOST_WEBSOCKET_AUTH_TIMEOUT_MS = 3e4;
@@ -348,7 +349,8 @@ function createMattermostConnectOnce(opts) {
348
349
  }
349
350
  };
350
351
  }
351
- // extensions/mattermost/src/mattermost/monitor-ingress.ts
352
+ //#endregion
353
+ //#region extensions/mattermost/src/mattermost/monitor-ingress.ts
352
354
  const MATTERMOST_INGRESS_PAYLOAD_VERSION = 1;
353
355
  const MATTERMOST_INGRESS_POLL_INTERVAL_MS = 1e3;
354
356
  const MattermostIngressPermanentError = createChannelIngressError("MattermostIngressPermanentError", { withReason: true });
@@ -464,7 +466,8 @@ function createMattermostIngressMonitor(options) {
464
466
  waitForIdle: monitor.waitForIdle
465
467
  };
466
468
  }
467
- // extensions/mattermost/src/mattermost/monitor-context.ts
469
+ //#endregion
470
+ //#region extensions/mattermost/src/mattermost/monitor-context.ts
468
471
  function shouldUpdateMattermostDraftToolProgress(account) {
469
472
  return account.streamingMode !== "off" && resolveChannelStreamingPreviewToolProgress(account.config, account.streamingMode !== "progress", account.streamingMode);
470
473
  }
@@ -527,7 +530,8 @@ function resolveMattermostPendingHistoryKey(params) {
527
530
  function resolveMattermostReactionChannelId(payload) {
528
531
  return normalizeOptionalString(payload.broadcast?.channel_id) ?? normalizeOptionalString(payload.data?.channel_id);
529
532
  }
530
- // extensions/mattermost/src/mattermost/monitor-event-plan.ts
533
+ //#endregion
534
+ //#region extensions/mattermost/src/mattermost/monitor-event-plan.ts
531
535
  async function buildMattermostEventPlan(monitor, params) {
532
536
  const channelInfo = params.channelInfo ?? await monitor.resources.resolveChannelInfo(params.channelId);
533
537
  const channelType = channelInfo?.type?.trim() || params.channelTypeFallback?.trim();
@@ -617,7 +621,8 @@ async function buildMattermostEventPlan(monitor, params) {
617
621
  })
618
622
  };
619
623
  }
620
- // extensions/mattermost/src/mattermost/monitor-interaction-dispatch.ts
624
+ //#endregion
625
+ //#region extensions/mattermost/src/mattermost/monitor-interaction-dispatch.ts
621
626
  async function dispatchMattermostInteractionReply(monitor, eventPlan, params) {
622
627
  const { account, cfg, core, runtime } = monitor;
623
628
  const { channelId, kind, route, thread, to } = eventPlan;
@@ -670,7 +675,8 @@ async function dispatchMattermostInteractionReply(monitor, eventPlan, params) {
670
675
  replyOptions
671
676
  });
672
677
  }
673
- // extensions/mattermost/src/mattermost/monitor-interactions.ts
678
+ //#endregion
679
+ //#region extensions/mattermost/src/mattermost/monitor-interactions.ts
674
680
  /**
675
681
  * Answer an ask_user question from the button its own prompt offered.
676
682
  *
@@ -819,7 +825,8 @@ function registerMattermostInteractions(params) {
819
825
  throwOnFailure: true
820
826
  });
821
827
  }
822
- // extensions/mattermost/src/mattermost/monitor-model-picker.ts
828
+ //#endregion
829
+ //#region extensions/mattermost/src/mattermost/monitor-model-picker.ts
823
830
  function createMattermostModelPickerInteractionHandler(monitor) {
824
831
  const { account, cfg, core, pairing, resources, runtime } = monitor;
825
832
  const { resolveChannelInfo, updateModelPickerPost } = resources;
@@ -983,7 +990,8 @@ function createMattermostModelPickerInteractionHandler(monitor) {
983
990
  return {};
984
991
  };
985
992
  }
986
- // src/channels/mention-gating.ts
993
+ //#endregion
994
+ //#region src/channels/mention-gating.ts
987
995
  function resolveBotThreadMentionPolicy(params) {
988
996
  if (!params.isBotOwnedThread || params.requireMentionInBotThreads === void 0) return {
989
997
  requireMention: params.requireMention,
@@ -994,7 +1002,8 @@ function resolveBotThreadMentionPolicy(params) {
994
1002
  implicitMentionKinds: params.requireMentionInBotThreads ? params.implicitMentionKinds?.filter((kind) => kind === "native") : params.implicitMentionKinds
995
1003
  };
996
1004
  }
997
- // extensions/mattermost/src/mattermost/monitor-activation.ts
1005
+ //#endregion
1006
+ //#region extensions/mattermost/src/mattermost/monitor-activation.ts
998
1007
  function resolveMattermostInboundMentionDecision(params) {
999
1008
  const implicitMentions = resolveChannelImplicitMentions({
1000
1009
  cfg: params.cfg,
@@ -1017,7 +1026,8 @@ function resolveMattermostInboundMentionDecision(params) {
1017
1026
  }
1018
1027
  });
1019
1028
  }
1020
- // extensions/mattermost/src/mattermost/monitor-onchar.ts
1029
+ //#endregion
1030
+ //#region extensions/mattermost/src/mattermost/monitor-onchar.ts
1021
1031
  const DEFAULT_ONCHAR_PREFIXES = [">", "!"];
1022
1032
  function resolveOncharPrefixes(prefixes) {
1023
1033
  const cleaned = prefixes ? normalizeStringEntries(prefixes) : DEFAULT_ONCHAR_PREFIXES;
@@ -1037,7 +1047,8 @@ function stripOncharPrefix(text, prefixes) {
1037
1047
  stripped: text
1038
1048
  };
1039
1049
  }
1040
- // extensions/mattermost/src/mattermost/monitor-resources.ts
1050
+ //#endregion
1051
+ //#region extensions/mattermost/src/mattermost/monitor-resources.ts
1041
1052
  function formatMattermostPendingMediaText(params) {
1042
1053
  return [params.body, formatMediaPlaceholderText(params.media)].filter(Boolean).join("\n").trim();
1043
1054
  }
@@ -1171,7 +1182,8 @@ function createMattermostMonitorResources(params) {
1171
1182
  updateModelPickerPost
1172
1183
  };
1173
1184
  }
1174
- // extensions/mattermost/src/mattermost/monitor-thread-backfill.ts
1185
+ //#endregion
1186
+ //#region extensions/mattermost/src/mattermost/monitor-thread-backfill.ts
1175
1187
  const TIMEOUT_MS = 5e3;
1176
1188
  const COOLDOWN_MS = 6e4;
1177
1189
  const MAX_ATTEMPTS = 3;
@@ -1351,7 +1363,8 @@ function createMattermostThreadBackfill(params) {
1351
1363
  return { history: await owner.completion };
1352
1364
  };
1353
1365
  }
1354
- // extensions/mattermost/src/mattermost/draft-stream.ts
1366
+ //#endregion
1367
+ //#region extensions/mattermost/src/mattermost/draft-stream.ts
1355
1368
  const MATTERMOST_STREAM_MAX_CHARS = 4e3;
1356
1369
  const DEFAULT_THROTTLE_MS = 1e3;
1357
1370
  function normalizeMattermostDraftText(text, maxChars) {
@@ -1629,7 +1642,8 @@ function createMattermostDraftStream(params) {
1629
1642
  findPostAfter
1630
1643
  };
1631
1644
  }
1632
- // extensions/mattermost/src/mattermost/monitor-draft-delivery.ts
1645
+ //#endregion
1646
+ //#region extensions/mattermost/src/mattermost/monitor-draft-delivery.ts
1633
1647
  function combineMattermostVisibleDeliveryResults(results, outcome) {
1634
1648
  const visibleResults = results.filter((result) => result?.visibleReplySent === true);
1635
1649
  if (visibleResults.length === 0) return;
@@ -1741,7 +1755,8 @@ async function deliverMattermostReplyWithDraftPreview(params) {
1741
1755
  }));
1742
1756
  }
1743
1757
  }
1744
- // extensions/mattermost/src/mattermost/thread-participation.ts
1758
+ //#endregion
1759
+ //#region extensions/mattermost/src/mattermost/thread-participation.ts
1745
1760
  const threadParticipation = createPersistentDedupeCache({
1746
1761
  globalKey: Symbol.for("openclaw.mattermostThreadParticipation"),
1747
1762
  ttlMs: 6048e5,
@@ -1768,7 +1783,8 @@ async function hasMattermostThreadParticipationWithPersistence(params) {
1768
1783
  if (!params.accountId || !params.channelId || !params.threadRootId) return false;
1769
1784
  return await threadParticipation.lookup(makeKey(params.accountId, params.channelId, params.threadRootId));
1770
1785
  }
1771
- // extensions/mattermost/src/mattermost/monitor-turn.ts
1786
+ //#endregion
1787
+ //#region extensions/mattermost/src/mattermost/monitor-turn.ts
1772
1788
  async function dispatchMattermostInboundTurn(monitor, params) {
1773
1789
  const { account, cfg, client, core, runtime } = monitor;
1774
1790
  const { channelHistories, ctxPayload, eventPlan, historyKey, historyLimit, pinnedMainDmOwner, post, rawText, turnAdoptionLifecycle } = params;
@@ -2100,7 +2116,8 @@ async function dispatchMattermostInboundTurn(monitor, params) {
2100
2116
  }
2101
2117
  }
2102
2118
  }
2103
- // extensions/mattermost/src/mattermost/monitor-posts.ts
2119
+ //#endregion
2120
+ //#region extensions/mattermost/src/mattermost/monitor-posts.ts
2104
2121
  function createMattermostPostHandler(monitor) {
2105
2122
  const { account, botUserId, botUsername, cfg, core, groupPolicy, pairing, resources } = monitor;
2106
2123
  const groups = resolveChannelGroups(cfg, "mattermost", account.accountId);
@@ -2447,7 +2464,8 @@ function createMattermostPostHandler(monitor) {
2447
2464
  });
2448
2465
  };
2449
2466
  }
2450
- // extensions/mattermost/src/mattermost/monitor-reactions.ts
2467
+ //#endregion
2468
+ //#region extensions/mattermost/src/mattermost/monitor-reactions.ts
2451
2469
  function createMattermostReactionHandler(monitor) {
2452
2470
  const { account, botUserId, cfg, core, groupPolicy, pairing, resources } = monitor;
2453
2471
  const { resolveUserInfo } = resources;
@@ -2510,7 +2528,8 @@ function createMattermostReactionHandler(monitor) {
2510
2528
  monitor.logVerboseMessage(`mattermost reaction: ${action} :${emojiName}: by ${senderName} on ${postId}`);
2511
2529
  };
2512
2530
  }
2513
- // extensions/mattermost/src/mattermost/monitor-slash.ts
2531
+ //#endregion
2532
+ //#region extensions/mattermost/src/mattermost/monitor-slash.ts
2514
2533
  async function buildSlashCommands(params) {
2515
2534
  const commandsToRegister = [...DEFAULT_COMMAND_SPECS];
2516
2535
  if (!params.nativeSkills) return commandsToRegister;
@@ -2612,7 +2631,8 @@ async function registerMattermostMonitorSlashCommands(params) {
2612
2631
  params.runtime.error?.(`mattermost: failed to register slash commands: ${String(err)}`);
2613
2632
  }
2614
2633
  }
2615
- // extensions/mattermost/src/mattermost/reconnect.ts
2634
+ //#endregion
2635
+ //#region extensions/mattermost/src/mattermost/reconnect.ts
2616
2636
  async function runWithReconnect(connectFn, opts = {}) {
2617
2637
  const { initialDelayMs = 2e3, maxDelayMs = 6e4 } = opts;
2618
2638
  const jitterRatio = Math.max(0, opts.jitterRatio ?? 0);
@@ -2646,7 +2666,8 @@ function withJitter(baseMs, jitterRatio, random) {
2646
2666
  const spread = baseMs * jitterRatio;
2647
2667
  return Math.max(1, Math.round(baseMs - spread + normalized * spread * 2));
2648
2668
  }
2649
- // extensions/mattermost/src/mattermost/monitor.ts
2669
+ //#endregion
2670
+ //#region extensions/mattermost/src/mattermost/monitor.ts
2650
2671
  function publishMattermostRecoveringStatus(statusSink, error) {
2651
2672
  statusSink?.({
2652
2673
  lastError: String(error),
@@ -2886,4 +2907,5 @@ async function monitorMattermostProvider(opts = {}) {
2886
2907
  }
2887
2908
  await Promise.resolve(slashShutdownCleanup);
2888
2909
  }
2910
+ //#endregion
2889
2911
  export { monitorMattermostProvider };
@@ -1,5 +1,5 @@
1
- import { t as getMattermostRuntime } from "./runtime-y_L8jPMH.mjs";
2
- import { n as normalizeMattermostAllowEntry, t as mattermostIngressIdentity } from "./ingress-identity-CtHiOUDu.mjs";
1
+ import { t as getMattermostRuntime } from "./runtime-CNB4YGqJ.mjs";
2
+ import { n as normalizeMattermostAllowEntry, t as mattermostIngressIdentity } from "./ingress-identity-D6hxfxvo.mjs";
3
3
  import { uniqueStrings } from "openclaw/plugin-sdk/string-coerce-runtime";
4
4
  import { logInboundDrop } from "openclaw/plugin-sdk/channel-inbound";
5
5
  import { resolveAllowlistMatchSimple } from "openclaw/plugin-sdk/allow-from";
@@ -18,7 +18,7 @@ import { isRequestBodyLimitError } from "openclaw/plugin-sdk/webhook-ingress";
18
18
  import { createWebhookInFlightLimiter, readRequestBodyWithLimit, sendHttpRequestRejection } from "openclaw/plugin-sdk/webhook-request-guards";
19
19
  import { isTrustedProxyAddress, resolveClientIp } from "openclaw/plugin-sdk/core";
20
20
  import { resolveChannelContextVisibilityMode, shouldIncludeSupplementalContext } from "openclaw/plugin-sdk/context-visibility-runtime";
21
- // extensions/mattermost/src/mattermost/monitor-auth.ts
21
+ //#region extensions/mattermost/src/mattermost/monitor-auth.ts
22
22
  const MATTERMOST_PAIRING_QUEUE_FULL_TEXT = "DM pairing is full, so no pairing request was saved. Ask the bot owner to approve or dismiss pending requests in Settings → Channels → DM access requests, then try again.";
23
23
  function normalizeMattermostAllowList(entries) {
24
24
  const normalized = entries.map((entry) => normalizeMattermostAllowEntry(String(entry))).filter(Boolean);
@@ -172,4 +172,5 @@ async function authorizeMattermostCommandInvocation(params) {
172
172
  }
173
173
  };
174
174
  }
175
+ //#endregion
175
176
  export { registerPluginHttpRoute as C, resolveDefaultGroupPolicy as D, resolveClientIp as E, sendHttpRequestRejection as O, readRequestBodyWithLimit as S, resolveChannelMediaMaxBytes$1 as T, isTrustedProxyAddress as _, normalizeMattermostAllowList as a, logTypingFailure as b, shouldRetainMattermostSenderHistory as c, createChannelHistoryWindow as d, createChannelMessageReplyPipeline as f, isRequestBodyLimitError as g, isDangerousNameMatchingEnabled as h, isMattermostSenderAllowed as i, warnMissingProviderGroupPolicyFallbackOnce as k, DEFAULT_GROUP_HISTORY_LIMIT as l, createWebhookInFlightLimiter as m, authorizeMattermostCommandInvocation as n, resolveMattermostMonitorInboundAccess as o, createChannelPairingController as p, formatMattermostDirectMessageDropLog as r, resolveMattermostTrustedChatKind as s, MATTERMOST_PAIRING_QUEUE_FULL_TEXT as t, buildPreparedModelsProviderData as u, loadOutboundMediaFromUrl as v, resolveAllowlistProviderRuntimeGroupPolicy$1 as w, prepareSkillCommandsForAgents as x, logInboundDrop as y };
@@ -1,4 +1,4 @@
1
- import { h as normalizeMattermostBaseUrl } from "./client-VHp4VYIf.mjs";
1
+ import { h as normalizeMattermostBaseUrl } from "./client-B_4C9q6z.mjs";
2
2
  import { normalizeLowercaseStringOrEmpty, normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
3
3
  import { resolveChannelPreviewStreamMode, resolveChannelStreamingBlockCoalesce, resolveChannelStreamingBlockEnabled, resolveChannelStreamingChunkMode } from "openclaw/plugin-sdk/channel-outbound";
4
4
  import { createAccountListHelpers, hasConfiguredAccountValue } from "openclaw/plugin-sdk/account-helpers";
@@ -6,7 +6,7 @@ import { DEFAULT_ACCOUNT_ID, normalizeAccountId } from "openclaw/plugin-sdk/acco
6
6
  import { normalizeMessagePresentation, renderMessagePresentationFallbackText, resolveMessagePresentationControlValue } from "openclaw/plugin-sdk/interactive-runtime";
7
7
  import { resolveAskUserQuestionOptionIndex, resolveAskUserQuestionOptionIndices } from "openclaw/plugin-sdk/reply-payload";
8
8
  import { resolveSecretInputString } from "openclaw/plugin-sdk/secret-input";
9
- // extensions/mattermost/src/mattermost/accounts.ts
9
+ //#region extensions/mattermost/src/mattermost/accounts.ts
10
10
  const { listAccountIds: listMattermostAccountIds, resolveDefaultAccountId: resolveDefaultMattermostAccountId, resolveAccountConfig: mergeMattermostAccountConfig } = createAccountListHelpers("mattermost", {
11
11
  omitKeys: ["defaultAccount"],
12
12
  nestedObjectKeys: ["commands"],
@@ -91,7 +91,8 @@ function resolveMattermostReplyToMode(account, kind) {
91
91
  if (kind === "direct") return "off";
92
92
  return account.config.replyToMode ?? "off";
93
93
  }
94
- // extensions/mattermost/src/normalize.ts
94
+ //#endregion
95
+ //#region extensions/mattermost/src/normalize.ts
95
96
  /** Marks a button context as one this plugin answers through the question Gateway. */
96
97
  const MATTERMOST_QUESTION_CONTEXT_KEY = "oc_question";
97
98
  /**
@@ -184,4 +185,5 @@ function looksLikeMattermostTargetId(raw, _normalized) {
184
185
  if (trimmed.startsWith("@")) return true;
185
186
  return /^[a-z0-9]{26}$/i.test(trimmed) || /^[a-z0-9]{26}__[a-z0-9]{26}$/i.test(trimmed);
186
187
  }
188
+ //#endregion
187
189
  export { resolveMattermostPresentation as a, listMattermostAccountIds as c, resolveMattermostReplyToMode as d, requiresMattermostMediaUpload as i, resolveDefaultMattermostAccountId as l, normalizeMattermostMessagingTarget as n, inspectMattermostAccount as o, parseMattermostQuestionContext as r, isMattermostConfigured as s, looksLikeMattermostTargetId as t, resolveMattermostAccount as u };
@@ -1,4 +1,4 @@
1
- // \0rolldown/runtime.js
1
+ //#region \0rolldown/runtime.js
2
2
  var __defProp = Object.defineProperty;
3
3
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
4
  var __getOwnPropNames = Object.getOwnPropertyNames;
@@ -23,4 +23,5 @@ var __copyProps = (to, from, except, desc) => {
23
23
  return to;
24
24
  };
25
25
  var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
26
+ //#endregion
26
27
  export { __reExport as n, __exportAll as t };
@@ -1,7 +1,8 @@
1
1
  import { createPluginRuntimeStore } from "openclaw/plugin-sdk/runtime-store";
2
- // extensions/mattermost/src/runtime.ts
2
+ //#region extensions/mattermost/src/runtime.ts
3
3
  const { setRuntime: setMattermostRuntime, getRuntime: getMattermostRuntime, tryGetRuntime: getOptionalMattermostRuntime } = createPluginRuntimeStore({
4
4
  pluginId: "mattermost",
5
5
  errorMessage: "Mattermost runtime not initialized"
6
6
  });
7
+ //#endregion
7
8
  export { getOptionalMattermostRuntime as n, setMattermostRuntime as r, getMattermostRuntime as t };
@@ -0,0 +1,3 @@
1
+ import { n as collectRuntimeConfigAssignments, r as secretTargetRegistryEntries, t as channelSecrets } from "./secret-contract-fjlTFCmD.mjs";
2
+ import "../secret-contract-api.js";
3
+ export { channelSecrets, collectRuntimeConfigAssignments, secretTargetRegistryEntries };
@@ -0,0 +1,20 @@
1
+ import { hasConfiguredAccountValue } from "openclaw/plugin-sdk/account-helpers";
2
+ import { collectSimpleChannelFieldAssignments, createChannelSecretContract } from "openclaw/plugin-sdk/channel-secret-basic-runtime";
3
+ //#region extensions/mattermost/src/secret-contract.ts
4
+ const channelSecrets = createChannelSecretContract({
5
+ channelKey: "mattermost",
6
+ account: ["botToken"],
7
+ channel: ["botToken"],
8
+ hasImplicitDefaultAccount: ({ channel, context }) => Boolean(typeof channel.baseUrl === "string" && channel.baseUrl.trim() && (hasConfiguredAccountValue(channel.botToken) || context.env.MATTERMOST_BOT_TOKEN?.trim())),
9
+ collect(params) {
10
+ collectSimpleChannelFieldAssignments({
11
+ ...params,
12
+ field: "botToken",
13
+ topInactiveReason: "no enabled account inherits this top-level Mattermost botToken.",
14
+ accountInactiveReason: "Mattermost account is disabled."
15
+ });
16
+ }
17
+ });
18
+ const { secretTargetRegistryEntries, collectRuntimeConfigAssignments } = channelSecrets;
19
+ //#endregion
20
+ export { collectRuntimeConfigAssignments as n, secretTargetRegistryEntries as r, channelSecrets as t };
@@ -1,8 +1,8 @@
1
- import { c as setInteractionSecret, n as buildButtonProps, o as resolveInteractionCallbackUrl } from "./interactions-7eWssSf1.mjs";
2
- import { n as getOptionalMattermostRuntime, t as getMattermostRuntime } from "./runtime-y_L8jPMH.mjs";
3
- import { a as createMattermostPost, b as uploadMattermostFile, c as fetchMattermostChannelByName, d as fetchMattermostUser, f as fetchMattermostUserByUsername, g as parseMattermostApiStatus, h as normalizeMattermostBaseUrl, i as createMattermostDirectChannelWithRetry, p as fetchMattermostUserTeams, r as createMattermostClient, s as fetchMattermostChannel, u as fetchMattermostMe } from "./client-VHp4VYIf.mjs";
4
- import { s as resolveMattermostTrustedChatKind, v as loadOutboundMediaFromUrl } from "./monitor-auth-0gZXtoHv.mjs";
5
- import { u as resolveMattermostAccount } from "./normalize-C_DYEHki.mjs";
1
+ import { c as setInteractionSecret, n as buildButtonProps, o as resolveInteractionCallbackUrl } from "./interactions-LQ_rJSdf.mjs";
2
+ import { n as getOptionalMattermostRuntime, t as getMattermostRuntime } from "./runtime-CNB4YGqJ.mjs";
3
+ import { a as createMattermostPost, b as uploadMattermostFile, c as fetchMattermostChannelByName, d as fetchMattermostUser, f as fetchMattermostUserByUsername, g as parseMattermostApiStatus, h as normalizeMattermostBaseUrl, i as createMattermostDirectChannelWithRetry, p as fetchMattermostUserTeams, r as createMattermostClient, s as fetchMattermostChannel, u as fetchMattermostMe } from "./client-B_4C9q6z.mjs";
4
+ import { s as resolveMattermostTrustedChatKind, v as loadOutboundMediaFromUrl } from "./monitor-auth-rr4M-8gH.mjs";
5
+ import { u as resolveMattermostAccount } from "./normalize-Dli2PK7k.mjs";
6
6
  import { normalizeLowercaseStringOrEmpty, normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
7
7
  import { createChannelPartialDeliveryError } from "openclaw/plugin-sdk/channel-inbound";
8
8
  import { createMessageReceiptFromOutboundResults, listMessageReceiptPlatformIds } from "openclaw/plugin-sdk/channel-outbound";
@@ -12,7 +12,7 @@ import { pruneMapToMaxSize } from "openclaw/plugin-sdk/collection-runtime";
12
12
  import { resolveMarkdownTableMode } from "openclaw/plugin-sdk/markdown-table-runtime";
13
13
  import { extensionForMime } from "openclaw/plugin-sdk/media-mime";
14
14
  import { requireRuntimeConfig } from "openclaw/plugin-sdk/plugin-config-runtime";
15
- // extensions/mattermost/src/mattermost/target-resolution.ts
15
+ //#region extensions/mattermost/src/mattermost/target-resolution.ts
16
16
  const MATTERMOST_OPAQUE_TARGET_CACHE_MAX_ENTRIES = 1024;
17
17
  const MATTERMOST_OPAQUE_TARGET_CACHE_TTL_MS = 3e5;
18
18
  const mattermostOpaqueTargetCache = /* @__PURE__ */ new Map();
@@ -155,7 +155,8 @@ async function resolveMattermostOpaqueTarget(params) {
155
155
  };
156
156
  }
157
157
  }
158
- // extensions/mattermost/src/mattermost/send.ts
158
+ //#endregion
159
+ //#region extensions/mattermost/src/mattermost/send.ts
159
160
  const MATTERMOST_BOT_USER_CACHE_MAX_ENTRIES = 64;
160
161
  const MATTERMOST_TARGET_CACHE_MAX_ENTRIES = 1024;
161
162
  const botUserCache = /* @__PURE__ */ new Map();
@@ -395,4 +396,5 @@ async function sendMessageMattermost(to, text, opts) {
395
396
  }
396
397
  return result;
397
398
  }
399
+ //#endregion
398
400
  export { resolveMattermostOpaqueTarget as n, sendMessageMattermost as t };
@@ -1,9 +1,9 @@
1
- import { t as getMattermostRuntime } from "./runtime-y_L8jPMH.mjs";
2
- import { n as normalizeCallbackPath, r as resolveCallbackHost, t as collectMattermostCallbackPaths } from "./callback-host-CRQTeNn9.mjs";
3
- import { r as createMattermostClient, s as fetchMattermostChannel, v as sendMattermostTyping } from "./client-VHp4VYIf.mjs";
4
- import { O as sendHttpRequestRejection, S as readRequestBodyWithLimit, a as normalizeMattermostAllowList, b as logTypingFailure, g as isRequestBodyLimitError, m as createWebhookInFlightLimiter, n as authorizeMattermostCommandInvocation, t as MATTERMOST_PAIRING_QUEUE_FULL_TEXT, u as buildPreparedModelsProviderData } from "./monitor-auth-0gZXtoHv.mjs";
5
- import { a as resolveMattermostPresentation, i as requiresMattermostMediaUpload } from "./normalize-C_DYEHki.mjs";
6
- import { t as sendMessageMattermost } from "./send-3ye1gFt3.mjs";
1
+ import { t as getMattermostRuntime } from "./runtime-CNB4YGqJ.mjs";
2
+ import { n as normalizeCallbackPath, r as resolveCallbackHost, t as collectMattermostCallbackPaths } from "./callback-host-Bu2cmtfI.mjs";
3
+ import { r as createMattermostClient, s as fetchMattermostChannel, v as sendMattermostTyping } from "./client-B_4C9q6z.mjs";
4
+ import { O as sendHttpRequestRejection, S as readRequestBodyWithLimit, a as normalizeMattermostAllowList, b as logTypingFailure, g as isRequestBodyLimitError, m as createWebhookInFlightLimiter, n as authorizeMattermostCommandInvocation, t as MATTERMOST_PAIRING_QUEUE_FULL_TEXT, u as buildPreparedModelsProviderData } from "./monitor-auth-rr4M-8gH.mjs";
5
+ import { a as resolveMattermostPresentation, i as requiresMattermostMediaUpload } from "./normalize-Dli2PK7k.mjs";
6
+ import { t as sendMessageMattermost } from "./send-C_-GT5iF.mjs";
7
7
  import { createHash } from "node:crypto";
8
8
  import { safeEqualSecret } from "openclaw/plugin-sdk/security-runtime";
9
9
  import { asFiniteNumber, normalizeOptionalString, normalizeStringifiedOptionalString, readStringField } from "openclaw/plugin-sdk/string-coerce-runtime";
@@ -247,7 +247,8 @@ function resolveCallbackUrl(params) {
247
247
  const path = normalizeCallbackPath(params.config.callbackPath);
248
248
  return `http://${host}:${params.gatewayPort}${path}`;
249
249
  }
250
- // extensions/mattermost/src/mattermost/model-picker.ts
250
+ //#endregion
251
+ //#region extensions/mattermost/src/mattermost/model-picker.ts
251
252
  const MATTERMOST_MODEL_PICKER_CONTEXT_KEY = "oc_model_picker";
252
253
  const MODELS_PAGE_SIZE = 8;
253
254
  const ACTION_IDS = {
@@ -468,7 +469,8 @@ function renderMattermostModelsPickerView(params) {
468
469
  buttons: rows
469
470
  };
470
471
  }
471
- // extensions/mattermost/src/mattermost/reply-delivery.ts
472
+ //#endregion
473
+ //#region extensions/mattermost/src/mattermost/reply-delivery.ts
472
474
  /** Represents distinct provider posts without collapsing their visible boundary. */
473
475
  function joinMattermostVisibleContent(contents) {
474
476
  return contents.filter((content) => Boolean(content)).join("\n");
@@ -518,7 +520,8 @@ async function deliverMattermostReplyPayload(params) {
518
520
  ...accepted.result()
519
521
  };
520
522
  }
521
- // extensions/mattermost/src/mattermost/slash-model-picker.ts
523
+ //#endregion
524
+ //#region extensions/mattermost/src/mattermost/slash-model-picker.ts
522
525
  /** Returns whether the reply contains models, rather than an empty-catalog notice. */
523
526
  async function deliverMattermostSlashModelPicker(params) {
524
527
  const { cfg, route, accountId, channelId, senderId, commandText, messageSid, entry } = params;
@@ -578,7 +581,8 @@ async function deliverMattermostSlashModelPicker(params) {
578
581
  });
579
582
  return true;
580
583
  }
581
- // extensions/mattermost/src/mattermost/slash-http.ts
584
+ //#endregion
585
+ //#region extensions/mattermost/src/mattermost/slash-http.ts
582
586
  const MAX_BODY_BYTES = 65536;
583
587
  const BODY_READ_TIMEOUT_MS = 5e3;
584
588
  const COMMAND_LOOKUP_TIMEOUT_MS = 1e3;
@@ -1069,7 +1073,8 @@ async function handleSlashCommandAsync(params) {
1069
1073
  replyOptions: { disableBlockStreaming: typeof account.blockStreaming === "boolean" ? !account.blockStreaming : void 0 }
1070
1074
  });
1071
1075
  }
1072
- // extensions/mattermost/src/mattermost/slash-state.ts
1076
+ //#endregion
1077
+ //#region extensions/mattermost/src/mattermost/slash-state.ts
1073
1078
  const slashRouteInFlightLimiter = createWebhookInFlightLimiter();
1074
1079
  const SLASH_ROUTE_IN_FLIGHT_KEY = "mattermost:slash";
1075
1080
  const SLASH_AUTHENTICATED_IN_FLIGHT_KEY = `${SLASH_ROUTE_IN_FLIGHT_KEY}:authenticated`;
@@ -1219,4 +1224,5 @@ function registerSlashCommandRoute(api) {
1219
1224
  handler: routeHandler
1220
1225
  });
1221
1226
  }
1227
+ //#endregion
1222
1228
  export { resolveSlashCommandConfig as _, deliverMattermostReplyPayload as a, parseMattermostModelPickerContext as c, resolveMattermostModelPickerCurrentModel as d, DEFAULT_COMMAND_SPECS as f, resolveCallbackUrl as g, registerSlashCommands as h, registerSlashCommandRoute as i, renderMattermostModelsPickerView as l, isSlashCommandsEnabled as m, deactivateSlashCommands as n, joinMattermostVisibleContent as o, cleanupSlashCommands as p, getSlashCommandState as r, buildMattermostAllowedModelRefs as s, activateSlashCommands as t, renderMattermostProviderPickerView as u };
package/dist/api.js CHANGED
@@ -1,3 +1,3 @@
1
- import { t as buildButtonAttachments } from "./.setup/interactions-7eWssSf1.mjs";
2
- import { i as isMattermostSenderAllowed } from "./.setup/monitor-auth-0gZXtoHv.mjs";
1
+ import { t as buildButtonAttachments } from "./.setup/interactions-LQ_rJSdf.mjs";
2
+ import { i as isMattermostSenderAllowed } from "./.setup/monitor-auth-rr4M-8gH.mjs";
3
3
  export { buildButtonAttachments, isMattermostSenderAllowed };
@@ -1 +1,2 @@
1
- export { t as mattermostPlugin, n as mattermostSetupPlugin } from "./.setup/channel-plugin-runtime-CLBgUA35.mjs";
1
+ import { n as mattermostSetupPlugin, t as mattermostPlugin } from "./.setup/channel-plugin-runtime-C4r_3emu.mjs";
2
+ export { mattermostPlugin, mattermostSetupPlugin };
@@ -1 +1,2 @@
1
- export { t as mattermostPlugin } from "./.setup/channel-plugin-runtime-CLBgUA35.mjs";
1
+ import { t as mattermostPlugin } from "./.setup/channel-plugin-runtime-C4r_3emu.mjs";
2
+ export { mattermostPlugin };
@@ -1 +1,2 @@
1
- export { t as legacyConfigRules, n as normalizeCompatibilityConfig } from "./.setup/doctor-contract-i788N90j.mjs";
1
+ import { n as normalizeCompatibilityConfig, t as legacyConfigRules } from "./.setup/doctor-contract-CjgZkyPm.mjs";
2
+ export { legacyConfigRules, normalizeCompatibilityConfig };
@@ -1 +1,2 @@
1
- export { t as resolveGatewayAuthBypassPaths } from "./.setup/gateway-auth-bypass-DhWaV22L.mjs";
1
+ import { t as resolveMattermostGatewayAuthBypassPaths } from "./.setup/gateway-auth-bypass-Lf99Gilr.mjs";
2
+ export { resolveMattermostGatewayAuthBypassPaths as resolveGatewayAuthBypassPaths };
package/dist/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { defineBundledChannelEntry, loadBundledEntryExportSync } from "openclaw/plugin-sdk/channel-entry-contract";
2
- // extensions/mattermost/index.ts
2
+ //#region extensions/mattermost/index.ts
3
3
  function registerSlashCommandRoute(api) {
4
4
  loadBundledEntryExportSync(import.meta.url, {
5
5
  specifier: "./slash-route-api.js",
@@ -27,4 +27,5 @@ var mattermost_default = defineBundledChannelEntry({
27
27
  registerSlashCommandRoute(api);
28
28
  }
29
29
  });
30
+ //#endregion
30
31
  export { mattermost_default as default };
@@ -1 +1,2 @@
1
- export { i as isMattermostSenderAllowed } from "./.setup/monitor-auth-0gZXtoHv.mjs";
1
+ import { i as isMattermostSenderAllowed } from "./.setup/monitor-auth-rr4M-8gH.mjs";
2
+ export { isMattermostSenderAllowed };
@@ -1 +1,2 @@
1
- export { r as setMattermostRuntime } from "./.setup/runtime-y_L8jPMH.mjs";
1
+ import { r as setMattermostRuntime } from "./.setup/runtime-CNB4YGqJ.mjs";
2
+ export { setMattermostRuntime };
@@ -1 +1,2 @@
1
- export { t as channelSecrets, n as collectRuntimeConfigAssignments, r as secretTargetRegistryEntries } from "./.setup/secret-contract-H9g0kHHQ.mjs";
1
+ import { n as collectRuntimeConfigAssignments, r as secretTargetRegistryEntries, t as channelSecrets } from "./.setup/secret-contract-fjlTFCmD.mjs";
2
+ export { channelSecrets, collectRuntimeConfigAssignments, secretTargetRegistryEntries };
@@ -1,15 +1,16 @@
1
1
  import { defineBundledChannelSetupEntry } from "openclaw/plugin-sdk/channel-entry-contract";
2
2
  import { fileURLToPath } from "node:url";
3
- // extensions/mattermost/setup-entry.ts
3
+ //#region extensions/mattermost/setup-entry.ts
4
4
  var setup_entry_default = defineBundledChannelSetupEntry({
5
5
  importMetaUrl: import.meta.url,
6
6
  plugin: {
7
- specifier: fileURLToPath(new URL(".setup/channel-plugin-api-Vq9imWd1.mjs", import.meta.url).href),
7
+ specifier: fileURLToPath(new URL(".setup/channel-plugin-api-DZhra09y.mjs", import.meta.url).href),
8
8
  exportName: "mattermostSetupPlugin"
9
9
  },
10
10
  secrets: {
11
- specifier: fileURLToPath(new URL(".setup/secret-contract-api-CmBND3cW.mjs", import.meta.url).href),
11
+ specifier: fileURLToPath(new URL(".setup/secret-contract-api-BGz5_6WD.mjs", import.meta.url).href),
12
12
  exportName: "channelSecrets"
13
13
  }
14
14
  });
15
+ //#endregion
15
16
  export { setup_entry_default as default };
@@ -1 +1,2 @@
1
- export { i as registerSlashCommandRoute } from "./.setup/slash-state-V13EaHX9.mjs";
1
+ import { i as registerSlashCommandRoute } from "./.setup/slash-state-DJN_cER0.mjs";
2
+ export { registerSlashCommandRoute };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openclaw/mattermost",
3
- "version": "2026.10.10",
3
+ "version": "2026.11.2",
4
4
  "description": "OpenClaw Mattermost channel plugin",
5
5
  "repository": {
6
6
  "type": "git",
@@ -11,7 +11,7 @@
11
11
  "zod": "4.6.5"
12
12
  },
13
13
  "peerDependencies": {
14
- "openclaw": ">=2026.10.10"
14
+ "openclaw": ">=2026.11.2"
15
15
  },
16
16
  "peerDependenciesMeta": {
17
17
  "openclaw": {
@@ -93,10 +93,10 @@
93
93
  "allowInvalidConfigRecovery": true
94
94
  },
95
95
  "compat": {
96
- "pluginApi": ">=2026.10.10"
96
+ "pluginApi": ">=2026.11.2"
97
97
  },
98
98
  "build": {
99
- "openclawVersion": "2026.10.10",
99
+ "openclawVersion": "2026.11.2",
100
100
  "bundledDist": false
101
101
  },
102
102
  "release": {
@@ -1,2 +0,0 @@
1
- export { t as mattermostPlugin, n as mattermostSetupPlugin } from "./channel-plugin-runtime-CLBgUA35.mjs";
2
- import "../channel-plugin-api.js";
@@ -1,11 +0,0 @@
1
- import { createSimpleChannelSecretContract } from "openclaw/plugin-sdk/channel-secret-basic-runtime";
2
- // extensions/mattermost/src/secret-contract.ts
3
- const channelSecrets = createSimpleChannelSecretContract({
4
- channelKey: "mattermost",
5
- label: "Mattermost",
6
- accountFields: ["botToken"],
7
- channelFields: ["botToken"],
8
- mode: "account-inheritance"
9
- });
10
- const { secretTargetRegistryEntries, collectRuntimeConfigAssignments } = channelSecrets;
11
- export { collectRuntimeConfigAssignments as n, secretTargetRegistryEntries as r, channelSecrets as t };
@@ -1,2 +0,0 @@
1
- export { t as channelSecrets, n as collectRuntimeConfigAssignments, r as secretTargetRegistryEntries } from "./secret-contract-H9g0kHHQ.mjs";
2
- import "../secret-contract-api.js";
@@ -1 +0,0 @@
1
- {"version":3,"entries":[{"output":"api.js","source":"extensions/mattermost/api.ts"},{"output":"channel-plugin-api.js","source":"extensions/mattermost/channel-plugin-api.ts"},{"output":"channel-plugin-runtime.js","source":"extensions/mattermost/channel-plugin-runtime.ts"},{"output":"doctor-contract-api.js","source":"extensions/mattermost/doctor-contract-api.ts"},{"output":"gateway-auth-api.js","source":"extensions/mattermost/gateway-auth-api.ts"},{"output":"index.js","source":"extensions/mattermost/index.ts"},{"output":"policy-api.js","source":"extensions/mattermost/policy-api.ts"},{"output":"runtime-api.js","source":"extensions/mattermost/runtime-api.ts"},{"output":"secret-contract-api.js","source":"extensions/mattermost/secret-contract-api.ts"},{"output":"setup-entry.js","source":"extensions/mattermost/setup-entry.ts"},{"output":"slash-route-api.js","source":"extensions/mattermost/slash-route-api.ts"}],"chunks":[{"output":".setup/callback-host-CRQTeNn9.mjs","sha256":"3ece9a206a5435985f81039d322aeaf152623f20d1cb22c84fc2ddb848b38a7a","facadeSource":null,"sources":["extensions/mattermost/src/mattermost/callback-host.ts"]},{"output":".setup/channel-plugin-api-Vq9imWd1.mjs","sha256":"6df25859800c04b60df14c2086b7cea75cedddc8f49d619866f0269168eac943","facadeSource":"extensions/mattermost/channel-plugin-api.ts","sources":[]},{"output":".setup/channel-plugin-runtime-CLBgUA35.mjs","sha256":"2a82b65b7a36942c076a65ca29435a549fc26febe02967fc1968850bc417b08a","facadeSource":null,"sources":["extensions/mattermost/src/approval-auth.ts","extensions/mattermost/src/channel-config-shared.ts","extensions/mattermost/src/channel-send-result.ts","extensions/mattermost/src/channel.setup.ts","extensions/mattermost/src/channel.ts","extensions/mattermost/src/config-schema-core.ts","extensions/mattermost/src/config-surface.ts","extensions/mattermost/src/config-ui-hints.ts","extensions/mattermost/src/doctor.ts","extensions/mattermost/src/group-mentions.ts","extensions/mattermost/src/mattermost/emoji.ts","extensions/mattermost/src/session-route.ts","extensions/mattermost/src/setup-core.ts","extensions/mattermost/src/setup-surface.ts"]},{"output":".setup/channel.runtime-BBMzxlPB.mjs","sha256":"a253b19ce49df4b97f374be3ac4f0af7eb6fc9c5ab5346f0f93df93af4b3cfb1","facadeSource":"extensions/mattermost/src/channel.runtime.ts","sources":["extensions/mattermost/src/mattermost/directory.ts","extensions/mattermost/src/mattermost/probe.ts","extensions/mattermost/src/mattermost/reactions.ts","extensions/mattermost/src/mattermost/read.ts"]},{"output":".setup/client-VHp4VYIf.mjs","sha256":"b6b303c2d42679766eafbb9ba6d8dbbc8a54cd7fb34f36eb44158c757998b2ae","facadeSource":null,"sources":["extensions/mattermost/src/mattermost/client.ts"]},{"output":".setup/doctor-contract-i788N90j.mjs","sha256":"19cd8daa0e168e02f368e6e610fe44d86ed62ad513e45c979820ec174ec42d66","facadeSource":null,"sources":["extensions/mattermost/src/doctor-contract.ts","packages/normalization-core/src/record-coerce.ts","src/config/channel-config-normalization.ts","src/plugin-sdk/legacy-webhook-listener-migration.ts"]},{"output":".setup/gateway-auth-bypass-DhWaV22L.mjs","sha256":"ebe57f4c2a254b643ca60ccad75636d8a4cb1df18a5dbfe97dbc1516b8f5e304","facadeSource":null,"sources":["extensions/mattermost/src/gateway-auth-bypass.ts"]},{"output":".setup/ingress-identity-CtHiOUDu.mjs","sha256":"02e94faf15dae1f0c6d6975b58986de68f34cfa7f521b7671d908bb7888f5190","facadeSource":null,"sources":["extensions/mattermost/src/mattermost/ingress-identity.ts"]},{"output":".setup/interactions-7eWssSf1.mjs","sha256":"3cd6523415d28e5dd6f9e5eb5526f3ccb50de967f849a5860e078ee99cdd6dbc","facadeSource":null,"sources":["extensions/mattermost/src/mattermost/interactions.ts","packages/normalization-core/src/string-coerce.ts","src/gateway/gateway-http-route-contracts.ts","src/gateway/security-path.ts","src/gateway/server/plugins-http/path-context.ts","src/plugins/http-path-prefix.ts"]},{"output":".setup/monitor-agLGA4lV.mjs","sha256":"2bcb263b4fdab5c6e283529c6ce414ccd8ed3a7574ea02c6c571bb8a78b0f396","facadeSource":"extensions/mattermost/src/mattermost/monitor.ts","sources":["extensions/mattermost/src/mattermost/draft-stream.ts","extensions/mattermost/src/mattermost/monitor-activation.ts","extensions/mattermost/src/mattermost/monitor-context.ts","extensions/mattermost/src/mattermost/monitor-draft-delivery.ts","extensions/mattermost/src/mattermost/monitor-event-plan.ts","extensions/mattermost/src/mattermost/monitor-helpers.ts","extensions/mattermost/src/mattermost/monitor-ingress.ts","extensions/mattermost/src/mattermost/monitor-interaction-dispatch.ts","extensions/mattermost/src/mattermost/monitor-interactions.ts","extensions/mattermost/src/mattermost/monitor-model-picker.ts","extensions/mattermost/src/mattermost/monitor-onchar.ts","extensions/mattermost/src/mattermost/monitor-posts.ts","extensions/mattermost/src/mattermost/monitor-reactions.ts","extensions/mattermost/src/mattermost/monitor-resources.ts","extensions/mattermost/src/mattermost/monitor-slash.ts","extensions/mattermost/src/mattermost/monitor-thread-backfill.ts","extensions/mattermost/src/mattermost/monitor-turn.ts","extensions/mattermost/src/mattermost/monitor-websocket.ts","extensions/mattermost/src/mattermost/monitor.ts","extensions/mattermost/src/mattermost/reconnect.ts","extensions/mattermost/src/mattermost/thread-participation.ts","src/channels/mention-gating.ts"]},{"output":".setup/monitor-auth-0gZXtoHv.mjs","sha256":"31ecb8cb2ce511fad4a2b6da8bf15c67a87c1209db6b9ea525bd36134da99086","facadeSource":null,"sources":["extensions/mattermost/src/mattermost/monitor-auth.ts"]},{"output":".setup/normalize-C_DYEHki.mjs","sha256":"faa4ac9026e13bc907442dc6788932853a6367d1ef552afe271aa7f3d186909c","facadeSource":null,"sources":["extensions/mattermost/src/mattermost/accounts.ts","extensions/mattermost/src/normalize.ts"]},{"output":".setup/rolldown-runtime-782esTHO.mjs","sha256":"5ee95aea427a7c3b63d18f4d901f7c824b836077e85aee06ae7d598c1974e2a6","facadeSource":null,"sources":[]},{"output":".setup/runtime-y_L8jPMH.mjs","sha256":"57c233e3dc66946040735eaa3183b5a6c144d5251a6a4a9a1900bb324406a504","facadeSource":null,"sources":["extensions/mattermost/src/runtime.ts"]},{"output":".setup/secret-contract-api-CmBND3cW.mjs","sha256":"7e901149a7fed9295f4f8ef94cb04b1b2fec477ce45929a553632b2f064c4a26","facadeSource":"extensions/mattermost/secret-contract-api.ts","sources":[]},{"output":".setup/secret-contract-H9g0kHHQ.mjs","sha256":"3f477d51469d63ef8c7453d6608bd079205a10a24438249b812cadba5dbf2bfe","facadeSource":null,"sources":["extensions/mattermost/src/secret-contract.ts"]},{"output":".setup/send-3ye1gFt3.mjs","sha256":"e17f8fd9da889fea969607a6bed63cba75ddd5b16172a696f71b8f413df6391b","facadeSource":null,"sources":["extensions/mattermost/src/mattermost/send.ts","extensions/mattermost/src/mattermost/target-resolution.ts"]},{"output":".setup/slash-state-V13EaHX9.mjs","sha256":"01b8e1be89540a08bd948ad5468e24296b9ed20e997b41cce9de7d6708d3c914","facadeSource":null,"sources":["extensions/mattermost/src/mattermost/model-picker.ts","extensions/mattermost/src/mattermost/reply-delivery.ts","extensions/mattermost/src/mattermost/slash-commands.ts","extensions/mattermost/src/mattermost/slash-http.ts","extensions/mattermost/src/mattermost/slash-model-picker.ts","extensions/mattermost/src/mattermost/slash-state.ts"]},{"output":"api.js","sha256":"78e9b99e75d0e402f5823fdb0fc79da5cc63a27f3dcaf855536859142ae0ec27","facadeSource":"extensions/mattermost/api.ts","sources":[]},{"output":"channel-plugin-api.js","sha256":"f41c65538077c8a7848fdd7da8418e16a54543de3228860ce8149bf3730b02ee","facadeSource":"extensions/mattermost/channel-plugin-api.ts","sources":[]},{"output":"channel-plugin-runtime.js","sha256":"339f25224115ead09b1c03d77bbb276204e66730955fc69fde02dca59995aff2","facadeSource":"extensions/mattermost/channel-plugin-runtime.ts","sources":[]},{"output":"doctor-contract-api.js","sha256":"e991f0b249cd5e4dc0b33c1a470fdb11f5670db110064e232afeb875e0f36774","facadeSource":"extensions/mattermost/doctor-contract-api.ts","sources":[]},{"output":"gateway-auth-api.js","sha256":"70ab9f2ff147f0c5e640e800a930ee2a43cc856ea8b4269ec0a17b725a3f293c","facadeSource":"extensions/mattermost/gateway-auth-api.ts","sources":[]},{"output":"index.js","sha256":"6a47a0b97182b9fbf1bc11a30fce13a8f181c829afa5ec0f8f90adbe391b0d32","facadeSource":"extensions/mattermost/index.ts","sources":["extensions/mattermost/index.ts"]},{"output":"policy-api.js","sha256":"cd31d236ca0e365b0c66035a716fed4f0f5821dfd142eaf9c061e8945b4ad08d","facadeSource":"extensions/mattermost/policy-api.ts","sources":[]},{"output":"runtime-api.js","sha256":"550cdb1c39c6ada41b6e052272563d8b17440c1715d0bb6fb346762cdba91345","facadeSource":"extensions/mattermost/runtime-api.ts","sources":[]},{"output":"secret-contract-api.js","sha256":"ff2464ce6ee31187fef10ddfac2736858af8449269251b716720300ae7c31ade","facadeSource":"extensions/mattermost/secret-contract-api.ts","sources":[]},{"output":"setup-entry.js","sha256":"0cc8f74e1a0a1d9349e44c5f4f0cc8ae3dd8df65cc89d7cca39d538e6c858c58","facadeSource":"extensions/mattermost/setup-entry.ts","sources":["extensions/mattermost/setup-entry.ts"]},{"output":"slash-route-api.js","sha256":"94f73cb50c3a09561206b2262b1db2f2a91e84da9c536c24d91711782846dd58","facadeSource":"extensions/mattermost/slash-route-api.ts","sources":[]}],"unrenderedSources":["extensions/mattermost/api.ts","extensions/mattermost/channel-plugin-api.ts","extensions/mattermost/channel-plugin-runtime.ts","extensions/mattermost/config-doctor-api.ts","extensions/mattermost/doctor-contract-api.ts","extensions/mattermost/gateway-auth-api.ts","extensions/mattermost/policy-api.ts","extensions/mattermost/runtime-api.ts","extensions/mattermost/secret-contract-api.ts","extensions/mattermost/slash-route-api.ts","extensions/mattermost/src/channel.runtime.ts","extensions/mattermost/src/mattermost/runtime-api.ts"]}