@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.
- package/dist/{accounts-C4Azn6rA.js → accounts-B-GrNVwP.js} +1 -1
- package/dist/api.js +2 -2
- package/dist/channel-plugin-api.js +10 -2
- package/dist/{channel-plugin-runtime-BXmjNn6B.js → channel-plugin-runtime-CgRXlOvV.js} +63 -15
- package/dist/channel-plugin-runtime.js +1 -1
- package/dist/{channel.runtime-CKb2-z0p.js → channel.runtime-VRis1MN2.js} +1364 -1259
- package/dist/{client-BzLj4dyf.js → client-w0lkxuKh.js} +11 -1
- package/dist/{interactions-DO7J-ND1.js → interactions-DODXaHdE.js} +2 -2
- package/dist/{monitor-auth-dEHa1_On.js → monitor-auth-4zjr5tXP.js} +9 -7
- package/dist/policy-api.js +1 -1
- package/dist/runtime-api.js +1 -1
- package/dist/slash-route-api.js +1 -1
- package/dist/{slash-state-C9bpBN40.js → slash-state-CFEaCLnp.js} +69 -46
- package/node_modules/ws/lib/receiver.js +15 -32
- package/node_modules/ws/lib/websocket-server.js +4 -4
- package/node_modules/ws/lib/websocket.js +4 -4
- package/node_modules/ws/package.json +5 -1
- package/npm-shrinkwrap.json +7 -7
- package/openclaw.plugin.json +46 -6
- package/package.json +52 -6
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
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-
|
|
2
|
-
import { t as buildButtonAttachments } from "./interactions-
|
|
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 {
|
|
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: {
|
|
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 {
|
|
2
|
-
import { a as buildSecretInputSchema, i as resolveMattermostReplyToMode, n as resolveDefaultMattermostAccountId, o as hasConfiguredSecretInput, r as resolveMattermostAccount, t as listMattermostAccountIds } from "./accounts-
|
|
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
|
|
416
|
-
const
|
|
417
|
-
|
|
418
|
-
if (
|
|
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
|
|
424
|
-
const
|
|
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:
|
|
429
|
-
patch:
|
|
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-
|
|
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: {
|
|
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 {
|
|
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-
|
|
1
|
+
import { t as mattermostPlugin } from "./channel-plugin-runtime-CgRXlOvV.js";
|
|
2
2
|
export { mattermostPlugin };
|