@openclaw/mattermost 2026.7.2-beta.2 → 2026.7.2-beta.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,4 @@
1
- import { f as normalizeMattermostBaseUrl } from "./client-BzLj4dyf.js";
1
+ import { p as normalizeMattermostBaseUrl } from "./client-w0lkxuKh.js";
2
2
  import { 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";
package/dist/api.js CHANGED
@@ -1,3 +1,3 @@
1
- import { r as isMattermostSenderAllowed } from "./monitor-auth-dEHa1_On.js";
2
- import { t as buildButtonAttachments } from "./interactions-DO7J-ND1.js";
1
+ import { r as isMattermostSenderAllowed } from "./monitor-auth-4zjr5tXP.js";
2
+ import { t as buildButtonAttachments } from "./interactions-DODXaHdE.js";
3
3
  export { buildButtonAttachments, isMattermostSenderAllowed };
@@ -1,4 +1,4 @@
1
- import { a as MattermostChannelConfigSchema, c as mattermostConfigAdapter, l as mattermostMeta, n as mattermostSetupWizard, o as describeMattermostAccount, r as mattermostSetupAdapter, s as isMattermostConfigured, t as mattermostPlugin } from "./channel-plugin-runtime-BXmjNn6B.js";
1
+ import { c as isMattermostConfigured, i as mattermostSetupContract, l as mattermostConfigAdapter, n as mattermostSetupWizard, o as MattermostChannelConfigSchema, r as mattermostSetupAdapter, s as describeMattermostAccount, t as mattermostPlugin, u as mattermostMeta } from "./channel-plugin-runtime-CgRXlOvV.js";
2
2
  import { t as resolveMattermostGatewayAuthBypassPaths } from "./gateway-auth-bypass-CL1PxV3z.js";
3
3
  //#region extensions/mattermost/src/channel.setup.ts
4
4
  const mattermostSetupPlugin = {
@@ -16,7 +16,14 @@ const mattermostSetupPlugin = {
16
16
  media: true,
17
17
  nativeCommands: true
18
18
  },
19
- reload: { configPrefixes: ["channels.mattermost"] },
19
+ reload: {
20
+ configPrefixes: ["channels.mattermost"],
21
+ /**
22
+ * accounts.default is promoted; named resolution merges only channel-wide fields
23
+ * plus the selected account. Runtime monitor, debounce, and ingress use accountId.
24
+ */
25
+ accountScopedRestart: true
26
+ },
20
27
  configSchema: MattermostChannelConfigSchema,
21
28
  config: {
22
29
  ...mattermostConfigAdapter,
@@ -25,6 +32,7 @@ const mattermostSetupPlugin = {
25
32
  },
26
33
  gateway: { resolveGatewayAuthBypassPaths: resolveMattermostGatewayAuthBypassPaths },
27
34
  setup: mattermostSetupAdapter,
35
+ setupContract: mattermostSetupContract,
28
36
  setupWizard: mattermostSetupWizard
29
37
  };
30
38
  //#endregion
@@ -1,5 +1,5 @@
1
- import { f as normalizeMattermostBaseUrl } from "./client-BzLj4dyf.js";
2
- import { a as buildSecretInputSchema, i as resolveMattermostReplyToMode, n as resolveDefaultMattermostAccountId, o as hasConfiguredSecretInput, r as resolveMattermostAccount, t as listMattermostAccountIds } from "./accounts-C4Azn6rA.js";
1
+ import { p as normalizeMattermostBaseUrl } from "./client-w0lkxuKh.js";
2
+ import { a as buildSecretInputSchema, i as resolveMattermostReplyToMode, n as resolveDefaultMattermostAccountId, o as hasConfiguredSecretInput, r as resolveMattermostAccount, t as listMattermostAccountIds } from "./accounts-B-GrNVwP.js";
3
3
  import { t as resolveMattermostGatewayAuthBypassPaths } from "./gateway-auth-bypass-CL1PxV3z.js";
4
4
  import { n as normalizeCompatibilityConfig, t as legacyConfigRules } from "./doctor-contract-BaUvVh8e.js";
5
5
  import { n as collectRuntimeConfigAssignments, r as secretTargetRegistryEntries } from "./secret-contract-B4R5Bmhv.js";
@@ -24,7 +24,8 @@ import { createChannelApprovalAuth } from "openclaw/plugin-sdk/approval-auth-run
24
24
  import { describeAccountSnapshot } from "openclaw/plugin-sdk/account-helpers";
25
25
  import { DEFAULT_ACCOUNT_ID, normalizeAccountId } from "openclaw/plugin-sdk/account-id";
26
26
  import { adaptScopedAccountAccessor, createScopedChannelConfigAdapter } from "openclaw/plugin-sdk/channel-config-helpers";
27
- import { BlockStreamingCoalesceSchema, DmPolicySchema, GroupPolicySchema, MarkdownConfigSchema, buildChannelConfigSchema, buildGroupEntrySchema, buildMultiAccountChannelSchema, requireOpenAllowFrom } from "openclaw/plugin-sdk/channel-config-schema";
27
+ import { BlockStreamingCoalesceSchema, ChannelImplicitMentionsSchema, DmPolicySchema, GroupPolicySchema, MarkdownConfigSchema, buildChannelConfigSchema, buildGroupEntrySchema, buildMultiAccountChannelSchema, requireOpenAllowFrom } from "openclaw/plugin-sdk/channel-config-schema";
28
+ import { defineChannelSetupContract } from "openclaw/plugin-sdk/channel-setup";
28
29
  import { applyAccountNameToChannelSection, applySetupAccountConfigPatch, baseUrlTextInput, createSetupTranslator, createStandardChannelSetupStatus, defineTokenCredential, formatDocsLink, migrateBaseNameToDefaultAccount, setSetupChannelEnabled } from "openclaw/plugin-sdk/setup";
29
30
  import { createSetupInputPresenceValidator } from "openclaw/plugin-sdk/setup-runtime";
30
31
  //#region extensions/mattermost/src/approval-auth.ts
@@ -204,6 +205,7 @@ const MattermostChannelConfigSchema = buildChannelConfigSchema(buildMultiAccount
204
205
  ]).optional(),
205
206
  oncharPrefixes: z.array(z.string()).optional(),
206
207
  requireMention: z.boolean().optional(),
208
+ implicitMentions: ChannelImplicitMentionsSchema.optional(),
207
209
  dmPolicy: DmPolicySchema.optional().default("pairing"),
208
210
  allowFrom: z.array(z.union([z.string(), z.number()])).optional(),
209
211
  groupAllowFrom: z.array(z.union([z.string(), z.number()])).optional(),
@@ -241,7 +243,8 @@ const MattermostChannelConfigSchema = buildChannelConfigSchema(buildMultiAccount
241
243
  },
242
244
  ...createChannelConfigUiHints({
243
245
  channelLabel: "Mattermost",
244
- dmPolicy: { channelKey: "mattermost" }
246
+ dmPolicy: { channelKey: "mattermost" },
247
+ implicitMentions: true
245
248
  }),
246
249
  streaming: {
247
250
  label: "Mattermost Streaming Mode",
@@ -412,27 +415,64 @@ const mattermostSetupAdapter = {
412
415
  message: "Mattermost requires --bot-token and --http-url (or --use-env)."
413
416
  }],
414
417
  validate: ({ input }) => {
415
- const token = input.botToken ?? input.token;
416
- const baseUrl = normalizeMattermostBaseUrl(input.httpUrl);
417
- if (!input.useEnv && (!token || !baseUrl)) return "Mattermost requires --bot-token and --http-url (or --use-env).";
418
- if (input.httpUrl && !baseUrl) return "Mattermost --http-url must include a valid base URL.";
418
+ const setupInput = input;
419
+ const token = setupInput.botToken ?? setupInput.token;
420
+ const baseUrl = normalizeMattermostBaseUrl(setupInput.httpUrl);
421
+ if (!setupInput.useEnv && (!token || !baseUrl)) return "Mattermost requires --bot-token and --http-url (or --use-env).";
422
+ if (setupInput.httpUrl && !baseUrl) return "Mattermost --http-url must include a valid base URL.";
419
423
  return null;
420
424
  }
421
425
  }),
422
426
  applyAccountConfig: ({ cfg, accountId, input }) => {
423
- const token = input.botToken ?? input.token;
424
- const baseUrl = normalizeMattermostBaseUrl(input.httpUrl);
427
+ const setupInput = input;
428
+ const token = setupInput.botToken ?? setupInput.token;
429
+ const baseUrl = normalizeMattermostBaseUrl(setupInput.httpUrl);
425
430
  return applyMattermostSetupConfigPatch({
426
431
  cfg,
427
432
  accountId,
428
- name: input.name,
429
- patch: input.useEnv ? {} : {
433
+ name: setupInput.name,
434
+ patch: setupInput.useEnv ? {} : {
430
435
  ...token ? { botToken: token } : {},
431
436
  ...baseUrl ? { baseUrl } : {}
432
437
  }
433
438
  });
434
439
  }
435
440
  };
441
+ const mattermostSetupContract = defineChannelSetupContract({
442
+ fields: {
443
+ token: {
444
+ kind: "string",
445
+ sensitive: true,
446
+ cli: {
447
+ flags: "--token <token>",
448
+ description: "Mattermost bot token"
449
+ }
450
+ },
451
+ botToken: {
452
+ kind: "string",
453
+ sensitive: true,
454
+ cli: {
455
+ flags: "--bot-token <token>",
456
+ description: "Mattermost bot token"
457
+ }
458
+ },
459
+ httpUrl: {
460
+ kind: "string",
461
+ cli: {
462
+ flags: "--http-url <url>",
463
+ description: "Mattermost server URL"
464
+ }
465
+ },
466
+ useEnv: {
467
+ kind: "boolean",
468
+ cli: {
469
+ flags: "--use-env",
470
+ description: "Use Mattermost environment credentials"
471
+ }
472
+ }
473
+ },
474
+ legacyAdapter: mattermostSetupAdapter
475
+ });
436
476
  //#endregion
437
477
  //#region extensions/mattermost/src/setup-surface.ts
438
478
  const t = createSetupTranslator();
@@ -519,7 +559,7 @@ const mattermostSetupWizard = {
519
559
  };
520
560
  //#endregion
521
561
  //#region extensions/mattermost/src/channel.ts
522
- const loadMattermostChannelRuntime = createLazyRuntimeModule(() => import("./channel.runtime-CKb2-z0p.js"));
562
+ const loadMattermostChannelRuntime = createLazyRuntimeModule(() => import("./channel.runtime-VRis1MN2.js"));
523
563
  function buildMattermostPresentationButtons(presentation) {
524
564
  return presentation.blocks.filter((block) => block.type === "buttons").map((block) => block.buttons.flatMap((button) => {
525
565
  if (button.action) return [];
@@ -955,6 +995,7 @@ const mattermostPlugin = createChatChannelPlugin({
955
995
  id: "mattermost",
956
996
  meta: { ...mattermostMeta },
957
997
  setup: mattermostSetupAdapter,
998
+ setupContract: mattermostSetupContract,
958
999
  setupWizard: mattermostSetupWizard,
959
1000
  capabilities: {
960
1001
  chatTypes: [
@@ -972,7 +1013,14 @@ const mattermostPlugin = createChatChannelPlugin({
972
1013
  minChars: 1500,
973
1014
  idleMs: 1e3
974
1015
  } },
975
- reload: { configPrefixes: ["channels.mattermost"] },
1016
+ reload: {
1017
+ configPrefixes: ["channels.mattermost"],
1018
+ /**
1019
+ * accounts.default is promoted; named resolution merges only channel-wide fields
1020
+ * plus the selected account. Monitor debounce and durable ingress use accountId.
1021
+ */
1022
+ accountScopedRestart: true
1023
+ },
976
1024
  configSchema: MattermostChannelConfigSchema,
977
1025
  config: {
978
1026
  ...mattermostConfigAdapter,
@@ -1125,4 +1173,4 @@ const mattermostPlugin = createChatChannelPlugin({
1125
1173
  outbound: mattermostOutbound
1126
1174
  });
1127
1175
  //#endregion
1128
- export { MattermostChannelConfigSchema as a, mattermostConfigAdapter as c, normalizeMattermostMessagingTarget as i, mattermostMeta as l, mattermostSetupWizard as n, describeMattermostAccount as o, mattermostSetupAdapter as r, isMattermostConfigured$1 as s, mattermostPlugin as t };
1176
+ export { normalizeMattermostMessagingTarget as a, isMattermostConfigured$1 as c, mattermostSetupContract as i, mattermostConfigAdapter as l, mattermostSetupWizard as n, MattermostChannelConfigSchema as o, mattermostSetupAdapter as r, describeMattermostAccount as s, mattermostPlugin as t, mattermostMeta as u };
@@ -1,2 +1,2 @@
1
- import { t as mattermostPlugin } from "./channel-plugin-runtime-BXmjNn6B.js";
1
+ import { t as mattermostPlugin } from "./channel-plugin-runtime-CgRXlOvV.js";
2
2
  export { mattermostPlugin };