@openclaw/mattermost 2026.11.5 → 2026.11.10-beta.1

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 (30) hide show
  1. package/dist/.setup/{callback-host-Bu2cmtfI.mjs → callback-host-CRQTeNn9.mjs} +1 -2
  2. package/dist/.setup/{channel-plugin-api-CuxSSPV8.mjs → channel-plugin-api-ZcL-ciz_.mjs} +25 -36
  3. package/dist/.setup/{channel-plugin-api-ClU67Wyc.mjs → channel-plugin-api-ZioQ5n8R.mjs} +1 -1
  4. package/dist/.setup/{channel.runtime-B3RvYLQi.mjs → channel.runtime-dwusbHyN.mjs} +8 -12
  5. package/dist/.setup/{client-CR-hGmGr.mjs → client-CVipK0N2.mjs} +1 -2
  6. package/dist/.setup/{doctor-contract-CjgZkyPm.mjs → doctor-contract-i788N90j.mjs} +6 -11
  7. package/dist/.setup/{gateway-auth-bypass-Lf99Gilr.mjs → gateway-auth-bypass-DhWaV22L.mjs} +2 -3
  8. package/dist/.setup/{ingress-identity-D6hxfxvo.mjs → ingress-identity-CtHiOUDu.mjs} +0 -1
  9. package/dist/.setup/{interactions-D5hhyPam.mjs → interactions-BWApCMHC.mjs} +12 -19
  10. package/dist/.setup/{monitor-Bw_pTSF8.mjs → monitor-HCtx0DCQ.mjs} +109 -73
  11. package/dist/.setup/{monitor-auth-BxpEUfvc.mjs → monitor-auth-C9TiGGVQ.mjs} +6 -5
  12. package/dist/.setup/{normalize-CNFRtT1O.mjs → normalize-DuLSV4tT.mjs} +3 -5
  13. package/dist/.setup/{rolldown-runtime-BBjsoOtd.mjs → rolldown-runtime-782esTHO.mjs} +1 -2
  14. package/dist/.setup/{runtime-CNB4YGqJ.mjs → runtime-y_L8jPMH.mjs} +1 -2
  15. package/dist/.setup/{secret-contract-fjlTFCmD.mjs → secret-contract-BkDCURCE.mjs} +1 -2
  16. package/dist/.setup/{secret-contract-api-Drz4m5pq.mjs → secret-contract-api-DydsmAPQ.mjs} +1 -1
  17. package/dist/.setup/{send-BSae9PKV.mjs → send-Dq203uXC.mjs} +50 -37
  18. package/dist/.setup/{slash-state-DpZH2wr6.mjs → slash-state-Dyd1mDYq.mjs} +15 -18
  19. package/dist/.source-module-urls/8fb0cb1067b83fd2cf3f3ba0f7a23e627c27e8e3adf1a4ea18753ddb884ff71e.json +1 -1
  20. package/dist/api.js +2 -2
  21. package/dist/channel-plugin-api.js +1 -1
  22. package/dist/doctor-contract-api.js +1 -1
  23. package/dist/gateway-auth-api.js +1 -1
  24. package/dist/index.js +1 -2
  25. package/dist/policy-api.js +1 -1
  26. package/dist/runtime-api.js +1 -1
  27. package/dist/secret-contract-api.js +1 -1
  28. package/dist/setup-entry.js +3 -4
  29. package/dist/slash-route-api.js +1 -1
  30. package/package.json +4 -4
@@ -1,5 +1,5 @@
1
1
  import { asOptionalRecord, normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
2
- //#region extensions/mattermost/src/mattermost/callback-host.ts
2
+ // 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,5 +30,4 @@ 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
34
33
  export { normalizeCallbackPath as n, resolveCallbackHost as r, collectMattermostCallbackPaths as t };
@@ -1,9 +1,9 @@
1
- import { h as normalizeMattermostBaseUrl } from "./client-CR-hGmGr.mjs";
2
- import { t as mattermostIngressIdentity } from "./ingress-identity-D6hxfxvo.mjs";
3
- import { a as resolveMattermostPresentation, c as isMattermostConfigured, d as resolveMattermostAccount, f as resolveMattermostReplyToMode, i as requiresMattermostMediaUpload, l as listMattermostAccountIds, n as normalizeMattermostMessagingTarget, s as inspectMattermostAccount, t as looksLikeMattermostTargetId, u as resolveDefaultMattermostAccountId } from "./normalize-CNFRtT1O.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";
1
+ import { h as normalizeMattermostBaseUrl } from "./client-CVipK0N2.mjs";
2
+ import { t as mattermostIngressIdentity } from "./ingress-identity-CtHiOUDu.mjs";
3
+ import { a as resolveMattermostPresentation, c as isMattermostConfigured, d as resolveMattermostAccount, f as resolveMattermostReplyToMode, i as requiresMattermostMediaUpload, l as listMattermostAccountIds, n as normalizeMattermostMessagingTarget, s as inspectMattermostAccount, t as looksLikeMattermostTargetId, u as resolveDefaultMattermostAccountId } from "./normalize-DuLSV4tT.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-BkDCURCE.mjs";
7
7
  import { asOptionalRecord, normalizeLowercaseStringOrEmpty, normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
8
8
  import { z } from "zod";
9
9
  import { formatNormalizedAllowFromEntries } from "openclaw/plugin-sdk/allow-from";
@@ -21,9 +21,10 @@ import { createChannelDirectoryAdapter } from "openclaw/plugin-sdk/directory-run
21
21
  import { buildPassiveProbedChannelStatusSummary } from "openclaw/plugin-sdk/extension-shared";
22
22
  import { resolveMessagePresentationButtonAction } from "openclaw/plugin-sdk/interactive-runtime";
23
23
  import { createLazyRuntimeModule } from "openclaw/plugin-sdk/lazy-runtime";
24
+ import { chunkMarkdownTextWithMode } from "openclaw/plugin-sdk/reply-chunking";
24
25
  import { resolvePayloadMediaUrls, sendTextMediaPayload } from "openclaw/plugin-sdk/reply-payload";
25
26
  import { createComputedAccountStatusAdapter, createDefaultChannelRuntimeState } from "openclaw/plugin-sdk/status-helpers";
26
- import { chunkTextForOutbound, sanitizeAssistantVisibleText } from "openclaw/plugin-sdk/text-chunking";
27
+ import { sanitizeAssistantVisibleText } from "openclaw/plugin-sdk/text-chunking";
27
28
  import { textResult } from "openclaw/plugin-sdk/tool-results";
28
29
  import { createChannelApprovalAuth } from "openclaw/plugin-sdk/approval-auth-runtime";
29
30
  import { buildSecretInputSchema, hasConfiguredSecretInput } from "openclaw/plugin-sdk/secret-input";
@@ -32,7 +33,7 @@ import { ChannelBotLoopProtectionSchema, ChannelImplicitMentionsSchema, ChannelP
32
33
  import { defineChannelSetupContract } from "openclaw/plugin-sdk/channel-setup";
33
34
  import { applyAccountNameToChannelSection, applySetupAccountConfigPatch, baseUrlTextInput, createSetupTranslator, createStandardChannelSetupStatus, defineTokenCredential, formatDocsLink, prepareScopedSetupConfig, setSetupChannelEnabled } from "openclaw/plugin-sdk/setup";
34
35
  import { createSetupInputPresenceValidator } from "openclaw/plugin-sdk/setup-runtime";
35
- //#region extensions/mattermost/src/approval-auth.ts
36
+ // extensions/mattermost/src/approval-auth.ts
36
37
  const MATTERMOST_USER_ID_RE = /^[a-z0-9]{26}$/;
37
38
  function normalizeMattermostApproverId(value) {
38
39
  const normalized = String(value).trim().replace(/^(mattermost|user):/i, "").replace(/^@/, "");
@@ -49,8 +50,7 @@ const mattermostApprovalAuth = createChannelApprovalAuth({
49
50
  },
50
51
  normalizeApprover: normalizeMattermostApproverId
51
52
  }).approvalAuth;
52
- //#endregion
53
- //#region extensions/mattermost/src/channel-config-shared.ts
53
+ // extensions/mattermost/src/channel-config-shared.ts
54
54
  const mattermostMeta = {
55
55
  id: "mattermost",
56
56
  label: "Mattermost",
@@ -103,8 +103,7 @@ function describeMattermostAccount(account) {
103
103
  }
104
104
  });
105
105
  }
106
- //#endregion
107
- //#region extensions/mattermost/src/channel-send-result.ts
106
+ // extensions/mattermost/src/channel-send-result.ts
108
107
  function toMattermostOutboundResult(result) {
109
108
  const { channelId, ...delivery } = result;
110
109
  return {
@@ -120,8 +119,7 @@ function createMattermostDeliveryProgressReporter(onDeliveryResult) {
120
119
  await onDeliveryResult(attachChannelToResult("mattermost", toMattermostOutboundResult(result)));
121
120
  } : void 0;
122
121
  }
123
- //#endregion
124
- //#region extensions/mattermost/src/config-schema-core.ts
122
+ // extensions/mattermost/src/config-schema-core.ts
125
123
  const MattermostGroupSchema = buildGroupEntrySchema({
126
124
  requireMentionInBotThreads: z.boolean().optional(),
127
125
  allowBots: buildChannelAllowBotsSchema({ allowMentions: true }),
@@ -240,8 +238,7 @@ const MattermostConfigSchema = buildMultiAccountChannelSchema(MattermostAccountS
240
238
  });
241
239
  }
242
240
  });
243
- //#endregion
244
- //#region extensions/mattermost/src/config-surface.ts
241
+ // extensions/mattermost/src/config-surface.ts
245
242
  const mattermostChannelConfigUiHints = {
246
243
  "": {
247
244
  label: "Mattermost",
@@ -303,8 +300,7 @@ const mattermostChannelConfigUiHints = {
303
300
  })
304
301
  };
305
302
  const MattermostChannelConfigSchema = buildChannelConfigSchema(MattermostConfigSchema, { uiHints: mattermostChannelConfigUiHints });
306
- //#endregion
307
- //#region extensions/mattermost/src/setup-core.ts
303
+ // extensions/mattermost/src/setup-core.ts
308
304
  const channel$1 = "mattermost";
309
305
  function applyMattermostSetupConfigPatch(params) {
310
306
  return applySetupAccountConfigPatch({
@@ -400,8 +396,7 @@ const mattermostSetupContract = defineChannelSetupContract({
400
396
  },
401
397
  legacyAdapter: mattermostSetupAdapter
402
398
  });
403
- //#endregion
404
- //#region extensions/mattermost/src/setup-surface.ts
399
+ // extensions/mattermost/src/setup-surface.ts
405
400
  const t = createSetupTranslator();
406
401
  const channel = "mattermost";
407
402
  const mattermostSetupWizard = {
@@ -488,8 +483,7 @@ const mattermostSetupWizard = {
488
483
  })],
489
484
  disable: (cfg) => setSetupChannelEnabled(cfg, channel, false)
490
485
  };
491
- //#endregion
492
- //#region extensions/mattermost/src/channel.setup.ts
486
+ // extensions/mattermost/src/channel.setup.ts
493
487
  const mattermostSetupPlugin = {
494
488
  id: "mattermost",
495
489
  meta: mattermostMeta,
@@ -524,8 +518,7 @@ const mattermostSetupPlugin = {
524
518
  setupContract: mattermostSetupContract,
525
519
  setupWizard: mattermostSetupWizard
526
520
  };
527
- //#endregion
528
- //#region extensions/mattermost/src/doctor.ts
521
+ // extensions/mattermost/src/doctor.ts
529
522
  const isMattermostMutableAllowEntry = buildMutableAllowEntryDetector({ stableIdPattern: /^(?:(?:mattermost|user):)?@?[a-z0-9]{26}$/i });
530
523
  const collectMattermostMutableAllowlistWarnings = createDangerousNameMatchingMutableAllowlistWarningCollector({
531
524
  channel: "mattermost",
@@ -537,8 +530,7 @@ const mattermostDoctor = {
537
530
  normalizeCompatibilityConfig,
538
531
  collectMutableAllowlistWarnings: collectMattermostMutableAllowlistWarnings
539
532
  };
540
- //#endregion
541
- //#region extensions/mattermost/src/group-mentions.ts
533
+ // extensions/mattermost/src/group-mentions.ts
542
534
  function resolveMattermostGroupRequireMention(params) {
543
535
  const account = resolveMattermostAccount({
544
536
  cfg: params.cfg,
@@ -551,8 +543,7 @@ function resolveMattermostGroupRequireMention(params) {
551
543
  overrideOrder: "after-config"
552
544
  });
553
545
  }
554
- //#endregion
555
- //#region extensions/mattermost/src/mattermost/emoji.ts
546
+ // extensions/mattermost/src/mattermost/emoji.ts
556
547
  const MATTERMOST_EMOJI_SHORTNAME_BY_GLYPH = {
557
548
  "✅": "white_check_mark",
558
549
  "❌": "x",
@@ -606,8 +597,7 @@ function normalizeMattermostEmojiName(raw) {
606
597
  if (!toneSuffix || !MATTERMOST_EMOJI_TONE_CAPABLE_NAMES.has(shortname)) return shortname;
607
598
  return `${shortname}_${toneSuffix}`;
608
599
  }
609
- //#endregion
610
- //#region extensions/mattermost/src/session-route.ts
600
+ // extensions/mattermost/src/session-route.ts
611
601
  /**
612
602
  * Reads the peer chat-kind already recorded for `peerId` in an agent session
613
603
  * key. Agent session keys are
@@ -656,9 +646,8 @@ function resolveMattermostOutboundSessionRoute(params) {
656
646
  canRecoverCurrentThread: ({ route }) => route.chatType !== "direct" || (params.cfg.session?.dmScope ?? "main") !== "main"
657
647
  });
658
648
  }
659
- //#endregion
660
- //#region extensions/mattermost/src/channel.ts
661
- const loadMattermostChannelRuntime = createLazyRuntimeModule(() => import("./channel.runtime-B3RvYLQi.mjs"));
649
+ // extensions/mattermost/src/channel.ts
650
+ const loadMattermostChannelRuntime = createLazyRuntimeModule(() => import("./channel.runtime-dwusbHyN.mjs"));
662
651
  const MATTERMOST_PRESENTATION_CAPABILITIES = {
663
652
  supported: true,
664
653
  buttons: true,
@@ -863,6 +852,7 @@ async function sendMattermostContent(ctx, content = ctx) {
863
852
  cfg: ctx.cfg,
864
853
  accountId: ctx.accountId ?? void 0,
865
854
  mediaUrl: content.mediaUrl,
855
+ mediaAccess: ctx.mediaAccess,
866
856
  mediaLocalRoots: ctx.mediaLocalRoots ?? ctx.mediaAccess?.localRoots,
867
857
  mediaReadFile: ctx.mediaReadFile ?? ctx.mediaAccess?.readFile,
868
858
  ...ctx.mediaAccess?.workspaceDir ? { workspaceDir: ctx.mediaAccess.workspaceDir } : {},
@@ -877,7 +867,7 @@ async function sendMattermostContent(ctx, content = ctx) {
877
867
  }
878
868
  const mattermostOutbound = {
879
869
  deliveryMode: "direct",
880
- chunker: chunkTextForOutbound,
870
+ chunker: (text, limit) => chunkMarkdownTextWithMode(text, limit, "length"),
881
871
  chunkerMode: "markdown",
882
872
  textChunkLimit: 4e3,
883
873
  sanitizeText: ({ text }) => sanitizeAssistantVisibleText(text),
@@ -1082,7 +1072,7 @@ const mattermostPlugin = createChatChannelPlugin({
1082
1072
  botTokenSource: account.botTokenSource
1083
1073
  });
1084
1074
  ctx.log?.info(`[${account.accountId}] starting channel`);
1085
- return (await import("./monitor-Bw_pTSF8.mjs")).monitorMattermostProvider({
1075
+ return (await import("./monitor-HCtx0DCQ.mjs")).monitorMattermostProvider({
1086
1076
  botToken: account.botToken,
1087
1077
  baseUrl: account.baseUrl,
1088
1078
  accountId: account.accountId,
@@ -1160,5 +1150,4 @@ const mattermostPlugin = createChatChannelPlugin({
1160
1150
  security: mattermostSecurityAdapter,
1161
1151
  outbound: mattermostOutbound
1162
1152
  });
1163
- //#endregion
1164
1153
  export { mattermostSetupPlugin as n, mattermostPlugin as t };
@@ -1 +1 @@
1
- export { t as mattermostPlugin, n as mattermostSetupPlugin } from "./channel-plugin-api-CuxSSPV8.mjs";
1
+ export { t as mattermostPlugin, n as mattermostSetupPlugin } from "./channel-plugin-api-ZcL-ciz_.mjs";
@@ -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-CR-hGmGr.mjs";
2
- import { s as resolveMattermostTrustedChatKind } from "./monitor-auth-BxpEUfvc.mjs";
3
- import { d as resolveMattermostAccount, l as listMattermostAccountIds, n as normalizeMattermostMessagingTarget, s as inspectMattermostAccount } from "./normalize-CNFRtT1O.mjs";
4
- import { n as resolveMattermostOpaqueTarget, t as sendMessageMattermost } from "./send-BSae9PKV.mjs";
1
+ import { _ as readMattermostError, h as normalizeMattermostBaseUrl, l as fetchMattermostChannelPosts, r as createMattermostClient, s as fetchMattermostChannel, u as fetchMattermostMe } from "./client-CVipK0N2.mjs";
2
+ import { s as resolveMattermostTrustedChatKind } from "./monitor-auth-C9TiGGVQ.mjs";
3
+ import { d as resolveMattermostAccount, l as listMattermostAccountIds, n as normalizeMattermostMessagingTarget, s as inspectMattermostAccount } from "./normalize-DuLSV4tT.mjs";
4
+ import { n as resolveMattermostOpaqueTarget, t as sendMessageMattermost } from "./send-Dq203uXC.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
- //#region extensions/mattermost/src/mattermost/directory.ts
13
+ // 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();
@@ -135,8 +135,7 @@ async function listMattermostDirectoryPeers(params) {
135
135
  return [];
136
136
  }
137
137
  }
138
- //#endregion
139
- //#region extensions/mattermost/src/mattermost/probe.ts
138
+ // extensions/mattermost/src/mattermost/probe.ts
140
139
  async function probeMattermost(baseUrl, botToken, timeoutMs = 2500, allowPrivateNetwork = false) {
141
140
  const normalized = normalizeMattermostBaseUrl(baseUrl);
142
141
  if (!normalized) return {
@@ -181,8 +180,7 @@ async function probeMattermost(baseUrl, botToken, timeoutMs = 2500, allowPrivate
181
180
  error: formatErrorMessage(error)
182
181
  }));
183
182
  }
184
- //#endregion
185
- //#region extensions/mattermost/src/mattermost/reactions.ts
183
+ // extensions/mattermost/src/mattermost/reactions.ts
186
184
  const BOT_USER_CACHE_TTL_MS = 6e5;
187
185
  const botUserIdCache = /* @__PURE__ */ new Map();
188
186
  async function resolveBotUserId(client, cacheKey) {
@@ -290,8 +288,7 @@ async function runMattermostReaction(params, action) {
290
288
  }
291
289
  return { ok: true };
292
290
  }
293
- //#endregion
294
- //#region extensions/mattermost/src/mattermost/read.ts
291
+ // extensions/mattermost/src/mattermost/read.ts
295
292
  function parseMattermostChannelTarget(rawTarget) {
296
293
  const normalized = normalizeMattermostMessagingTarget(rawTarget);
297
294
  if (normalized?.startsWith("channel:")) return normalized.slice(8).trim() || void 0;
@@ -350,5 +347,4 @@ async function readMattermostMessages(params) {
350
347
  after: params.after
351
348
  });
352
349
  }
353
- //#endregion
354
350
  export { addMattermostReaction, listMattermostDirectoryGroups, listMattermostDirectoryPeers, probeMattermost, readMattermostMessages, removeMattermostReaction, resolveMattermostOpaqueTarget, sendMessageMattermost };
@@ -9,7 +9,7 @@ import { readResponseTextPrefix, readResponseWithLimit } from "openclaw/plugin-s
9
9
  import { isTransientNetworkError, retryAsync } from "openclaw/plugin-sdk/retry-runtime";
10
10
  import { fetchWithSsrFGuard, ssrfPolicyFromPrivateNetworkOptIn } from "openclaw/plugin-sdk/ssrf-runtime";
11
11
  import { z } from "zod";
12
- //#region extensions/mattermost/src/mattermost/client.ts
12
+ // extensions/mattermost/src/mattermost/client.ts
13
13
  const MATTERMOST_ERROR_BODY_LIMIT_BYTES = 8192;
14
14
  const MATTERMOST_REQUEST_TIMEOUT_MS = 3e4;
15
15
  const MATTERMOST_TEXT_RESPONSE_LIMIT_BYTES = 65536;
@@ -320,5 +320,4 @@ async function uploadMattermostFile(client, params) {
320
320
  if (!info?.id) throw new Error("Mattermost file upload failed");
321
321
  return info;
322
322
  }
323
- //#endregion
324
323
  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-BBjsoOtd.mjs";
2
- //#region packages/normalization-core/src/record-coerce.ts
1
+ import { n as __reExport, t as __exportAll } from "./rolldown-runtime-782esTHO.mjs";
2
+ // 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,8 +8,7 @@ function isRecord(value) {
8
8
  function asNullableRecord(value) {
9
9
  return isRecord(value) ? value : null;
10
10
  }
11
- //#endregion
12
- //#region src/config/channel-config-normalization.ts
11
+ // src/config/channel-config-normalization.ts
13
12
  /** Applies one channel-specific doctor migration to every object-shaped account. */
14
13
  function normalizeChannelAccounts(params) {
15
14
  const rawAccounts = asNullableRecord(params.entry.accounts);
@@ -85,8 +84,7 @@ function normalizeChannelConfigEntries(params) {
85
84
  changes
86
85
  };
87
86
  }
88
- //#endregion
89
- //#region src/plugin-sdk/legacy-webhook-listener-migration.ts
87
+ // src/plugin-sdk/legacy-webhook-listener-migration.ts
90
88
  /** Preserve explicitly configured webhook listeners while moving ingress onto Gateway routes. */
91
89
  function createLegacyWebhookListenerDoctorContract(params) {
92
90
  const portKey = params.portKey ?? "webhookPort";
@@ -156,17 +154,14 @@ function createLegacyWebhookListenerDoctorContract(params) {
156
154
  }
157
155
  };
158
156
  }
159
- //#endregion
160
- //#region \0openclaw:bundled-sdk:openclaw/plugin-sdk/runtime-doctor-migrations
157
+ // \0openclaw:bundled-sdk:openclaw/plugin-sdk/runtime-doctor-migrations
161
158
  var runtime_doctor_migrations_exports = /* @__PURE__ */ __exportAll({ createLegacyWebhookListenerDoctorContract: () => createLegacyWebhookListenerDoctorContract });
162
159
  import * as import_openclaw_plugin_sdk_runtime_doctor_migrations from "openclaw/plugin-sdk/runtime-doctor-migrations";
163
160
  __reExport(runtime_doctor_migrations_exports, import_openclaw_plugin_sdk_runtime_doctor_migrations);
164
- //#endregion
165
- //#region extensions/mattermost/src/doctor-contract.ts
161
+ // extensions/mattermost/src/doctor-contract.ts
166
162
  const { legacyConfigRules, normalizeChannelConfig: normalizeCompatibilityConfig } = (0, runtime_doctor_migrations_exports.defineChannelAliasMigration)({
167
163
  channelId: "mattermost",
168
164
  streaming: { defaultMode: "partial" },
169
165
  accountStreamingReplacesRoot: true
170
166
  });
171
- //#endregion
172
167
  export { normalizeCompatibilityConfig as n, legacyConfigRules as t };
@@ -1,7 +1,6 @@
1
- import { t as collectMattermostCallbackPaths } from "./callback-host-Bu2cmtfI.mjs";
2
- //#region extensions/mattermost/src/gateway-auth-bypass.ts
1
+ import { t as collectMattermostCallbackPaths } from "./callback-host-CRQTeNn9.mjs";
2
+ // 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
7
6
  export { resolveMattermostGatewayAuthBypassPaths as t };
@@ -22,5 +22,4 @@ function normalizeMattermostAllowEntry(entry) {
22
22
  if (accessGroupName) return `accessGroup:${accessGroupName}`;
23
23
  return normalizeLowercaseStringOrEmpty(trimmed.replace(/^(mattermost|user):/i, "").replace(/^@/, ""));
24
24
  }
25
- //#endregion
26
25
  export { normalizeMattermostAllowEntry as n, mattermostIngressIdentity as t };
@@ -1,15 +1,15 @@
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-CR-hGmGr.mjs";
5
- import { E as resolveClientIp, O as sendHttpRequestRejection, S as readRequestBodyWithLimit, _ as isTrustedProxyAddress, g as isRequestBodyLimitError } from "./monitor-auth-BxpEUfvc.mjs";
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-CVipK0N2.mjs";
5
+ import { E as resolveClientIp, O as sendHttpRequestRejection, S as readRequestBodyWithLimit, _ as isTrustedProxyAddress, g as isRequestBodyLimitError } from "./monitor-auth-C9TiGGVQ.mjs";
6
6
  import { createHmac } from "node:crypto";
7
7
  import { sendJsonWithoutCharset } from "openclaw/plugin-sdk/http-response-runtime";
8
8
  import { safeEqualSecret } from "openclaw/plugin-sdk/security-runtime";
9
9
  import { normalizeOptionalString, normalizeStringifiedOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
10
10
  import { safeParseJson } from "openclaw/plugin-sdk/text-utility-runtime";
11
11
  import { requestBodyErrorToText } from "openclaw/plugin-sdk/webhook-request-guards";
12
- //#region src/gateway/gateway-http-route-contracts.ts
12
+ // src/gateway/gateway-http-route-contracts.ts
13
13
  const GATEWAY_PROBE_ROUTES = /* @__PURE__ */ new Map([
14
14
  ["/health", "live"],
15
15
  ["/healthz", "live"],
@@ -25,8 +25,7 @@ function classifyGatewayProbePath(pathname) {
25
25
  }
26
26
  return "outside";
27
27
  }
28
- //#endregion
29
- //#region packages/normalization-core/src/string-coerce.ts
28
+ // packages/normalization-core/src/string-coerce.ts
30
29
  /** Trims string input and returns null for non-strings or empty strings. */
31
30
  function normalizeNullableString(value) {
32
31
  if (typeof value !== "string") return null;
@@ -45,13 +44,11 @@ function normalizeOptionalLowercaseString(value) {
45
44
  function normalizeLowercaseStringOrEmpty$1(value) {
46
45
  return normalizeOptionalLowercaseString(value) ?? "";
47
46
  }
48
- //#endregion
49
- //#region src/plugins/http-path-prefix.ts
47
+ // src/plugins/http-path-prefix.ts
50
48
  function prefixMatchPath(pathname, prefix) {
51
49
  return pathname === prefix || pathname.startsWith(`${prefix}/`) || pathname.startsWith(`${prefix}%`);
52
50
  }
53
- //#endregion
54
- //#region src/gateway/security-path.ts
51
+ // src/gateway/security-path.ts
55
52
  const MAX_PATH_DECODE_PASSES = 32;
56
53
  function normalizePathSeparators(pathname) {
57
54
  const collapsed = pathname.replace(/\/{2,}/g, "/");
@@ -100,8 +97,7 @@ function canonicalizePathForSecurity(pathname) {
100
97
  };
101
98
  }
102
99
  const PROTECTED_PLUGIN_ROUTE_PREFIXES = ["/api/channels"];
103
- //#endregion
104
- //#region src/gateway/server/plugins-http/path-context.ts
100
+ // src/gateway/server/plugins-http/path-context.ts
105
101
  function normalizeProtectedPrefix(prefix) {
106
102
  const collapsed = normalizeLowercaseStringOrEmpty$1(prefix).replace(/\/{2,}/g, "/");
107
103
  if (collapsed.length <= 1) return collapsed || "/";
@@ -127,8 +123,7 @@ function resolvePluginRoutePathContext(pathname) {
127
123
  rawNormalizedPath: canonical.rawNormalizedPath
128
124
  };
129
125
  }
130
- //#endregion
131
- //#region \0openclaw:bundled-sdk:openclaw/plugin-sdk/gateway-config-runtime
126
+ // \0openclaw:bundled-sdk:openclaw/plugin-sdk/gateway-config-runtime
132
127
  var gateway_config_runtime_exports = /* @__PURE__ */ __exportAll({
133
128
  classifyGatewayProbePath: () => classifyGatewayProbePath,
134
129
  isProtectedPluginRoutePathFromContext: () => isProtectedPluginRoutePathFromContext,
@@ -136,8 +131,7 @@ var gateway_config_runtime_exports = /* @__PURE__ */ __exportAll({
136
131
  });
137
132
  import * as import_openclaw_plugin_sdk_gateway_config_runtime from "openclaw/plugin-sdk/gateway-config-runtime";
138
133
  __reExport(gateway_config_runtime_exports, import_openclaw_plugin_sdk_gateway_config_runtime);
139
- //#endregion
140
- //#region extensions/mattermost/src/mattermost/interactions.ts
134
+ // extensions/mattermost/src/mattermost/interactions.ts
141
135
  const INTERACTION_MAX_BODY_BYTES = 65536;
142
136
  const INTERACTION_BODY_TIMEOUT_MS = 1e4;
143
137
  const SIGNED_CHANNEL_ID_CONTEXT_KEY = "__openclaw_channel_id";
@@ -439,5 +433,4 @@ function createMattermostInteractionHandler(params) {
439
433
  }
440
434
  };
441
435
  }
442
- //#endregion
443
436
  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 };