@openclaw/mattermost 2026.7.2-beta.7 → 2026.7.34
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/{client-CqqzTcno.js → .setup/accounts-CkvUBI7I.mjs} +101 -55
- package/dist/.setup/channel-plugin-api-DQ6gNcH0.mjs +31 -0
- package/dist/.setup/channel-plugin-api-jFFWYXht.mjs +3 -0
- package/dist/{channel-plugin-runtime-DlrMaSIu.js → .setup/channel-plugin-runtime-BLOKRsgT.mjs} +260 -344
- package/dist/.setup/channel.runtime-CK6s04r7.mjs +2653 -0
- package/dist/.setup/doctor-contract-ttH0DCuq.mjs +7 -0
- package/dist/{gateway-auth-bypass-CL1PxV3z.js → .setup/gateway-auth-bypass-BIXLORHU.mjs} +2 -3
- package/dist/{monitor-auth-rctDliGZ.js → .setup/monitor-auth-CeakcTAO.mjs} +13 -14
- package/dist/.setup/secret-contract-Cx0LUNXy.mjs +44 -0
- package/dist/.setup/secret-contract-api-BLTnjVCZ.mjs +3 -0
- package/dist/{slash-state-DM8qmFJR.js → .setup/slash-state-D1e1_KaK.mjs} +572 -311
- package/dist/api.js +2 -3
- package/dist/channel-plugin-api.js +2 -38
- package/dist/channel-plugin-runtime.js +1 -1
- package/dist/doctor-contract-api.js +1 -1
- package/dist/gateway-auth-api.js +1 -1
- package/dist/policy-api.js +1 -1
- package/dist/runtime-api.js +3 -2
- package/dist/secret-contract-api.js +1 -1
- package/dist/setup-entry.js +3 -2
- package/dist/slash-route-api.js +1 -1
- package/node_modules/ws/lib/permessage-deflate.js +3 -1
- package/node_modules/ws/package.json +1 -1
- package/openclaw.plugin.json +231 -277
- package/package.json +6 -52
- package/dist/accounts-NaMdx9yF.js +0 -86
- package/dist/channel.runtime-DndW9G7T.js +0 -3207
- package/dist/doctor-contract-BaUvVh8e.js +0 -19
- package/dist/interactions-BQXY_48h.js +0 -375
- package/dist/secret-contract-B4R5Bmhv.js +0 -28
- /package/dist/{runtime-CNB4YGqJ.js → .setup/runtime-CNB4YGqJ.mjs} +0 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openclaw/mattermost",
|
|
3
|
-
"version": "2026.7.
|
|
3
|
+
"version": "2026.7.34",
|
|
4
4
|
"description": "OpenClaw Mattermost channel plugin",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -8,11 +8,11 @@
|
|
|
8
8
|
},
|
|
9
9
|
"type": "module",
|
|
10
10
|
"dependencies": {
|
|
11
|
-
"ws": "8.21.
|
|
11
|
+
"ws": "8.21.3",
|
|
12
12
|
"zod": "4.4.3"
|
|
13
13
|
},
|
|
14
14
|
"peerDependencies": {
|
|
15
|
-
"openclaw": ">=2026.7.
|
|
15
|
+
"openclaw": ">=2026.7.34"
|
|
16
16
|
},
|
|
17
17
|
"peerDependenciesMeta": {
|
|
18
18
|
"openclaw": {
|
|
@@ -26,58 +26,12 @@
|
|
|
26
26
|
"setupEntry": "./dist/setup-entry.js",
|
|
27
27
|
"channel": {
|
|
28
28
|
"id": "mattermost",
|
|
29
|
-
"configuredState": {
|
|
30
|
-
"env": {
|
|
31
|
-
"allOf": [
|
|
32
|
-
"MATTERMOST_BOT_TOKEN",
|
|
33
|
-
"MATTERMOST_URL"
|
|
34
|
-
]
|
|
35
|
-
}
|
|
36
|
-
},
|
|
37
29
|
"label": "Mattermost",
|
|
38
30
|
"selectionLabel": "Mattermost (plugin)",
|
|
39
31
|
"docsPath": "/channels/mattermost",
|
|
40
32
|
"docsLabel": "mattermost",
|
|
41
33
|
"blurb": "self-hosted Slack-style chat; install the plugin to enable.",
|
|
42
|
-
"order": 65
|
|
43
|
-
"setup": {
|
|
44
|
-
"fields": [
|
|
45
|
-
{
|
|
46
|
-
"key": "token",
|
|
47
|
-
"kind": "string",
|
|
48
|
-
"sensitive": true,
|
|
49
|
-
"cli": {
|
|
50
|
-
"flags": "--token <token>",
|
|
51
|
-
"description": "Mattermost bot token"
|
|
52
|
-
}
|
|
53
|
-
},
|
|
54
|
-
{
|
|
55
|
-
"key": "botToken",
|
|
56
|
-
"kind": "string",
|
|
57
|
-
"sensitive": true,
|
|
58
|
-
"cli": {
|
|
59
|
-
"flags": "--bot-token <token>",
|
|
60
|
-
"description": "Mattermost bot token"
|
|
61
|
-
}
|
|
62
|
-
},
|
|
63
|
-
{
|
|
64
|
-
"key": "httpUrl",
|
|
65
|
-
"kind": "string",
|
|
66
|
-
"cli": {
|
|
67
|
-
"flags": "--http-url <url>",
|
|
68
|
-
"description": "Mattermost server URL"
|
|
69
|
-
}
|
|
70
|
-
},
|
|
71
|
-
{
|
|
72
|
-
"key": "useEnv",
|
|
73
|
-
"kind": "boolean",
|
|
74
|
-
"cli": {
|
|
75
|
-
"flags": "--use-env",
|
|
76
|
-
"description": "Use Mattermost environment credentials"
|
|
77
|
-
}
|
|
78
|
-
}
|
|
79
|
-
]
|
|
80
|
-
}
|
|
34
|
+
"order": 65
|
|
81
35
|
},
|
|
82
36
|
"install": {
|
|
83
37
|
"clawhubSpec": "clawhub:@openclaw/mattermost",
|
|
@@ -87,10 +41,10 @@
|
|
|
87
41
|
"allowInvalidConfigRecovery": true
|
|
88
42
|
},
|
|
89
43
|
"compat": {
|
|
90
|
-
"pluginApi": ">=2026.7.
|
|
44
|
+
"pluginApi": ">=2026.7.34"
|
|
91
45
|
},
|
|
92
46
|
"build": {
|
|
93
|
-
"openclawVersion": "2026.7.
|
|
47
|
+
"openclawVersion": "2026.7.34",
|
|
94
48
|
"bundledDist": false
|
|
95
49
|
},
|
|
96
50
|
"release": {
|
|
@@ -1,86 +0,0 @@
|
|
|
1
|
-
import { m as normalizeMattermostBaseUrl } from "./client-CqqzTcno.js";
|
|
2
|
-
import { normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
3
|
-
import { resolveChannelPreviewStreamMode, resolveChannelStreamingBlockCoalesce, resolveChannelStreamingBlockEnabled, resolveChannelStreamingChunkMode } from "openclaw/plugin-sdk/channel-outbound";
|
|
4
|
-
import { createAccountListHelpers, hasConfiguredAccountValue } from "openclaw/plugin-sdk/account-helpers";
|
|
5
|
-
import { DEFAULT_ACCOUNT_ID, normalizeAccountId } from "openclaw/plugin-sdk/account-id";
|
|
6
|
-
import { buildSecretInputSchema, hasConfiguredSecretInput, resolveSecretInputString } from "openclaw/plugin-sdk/secret-input";
|
|
7
|
-
//#region extensions/mattermost/src/mattermost/accounts.ts
|
|
8
|
-
const { listAccountIds: listMattermostAccountIds, resolveDefaultAccountId: resolveDefaultMattermostAccountId, resolveAccountConfig: mergeMattermostAccountConfig } = createAccountListHelpers("mattermost", {
|
|
9
|
-
omitKeys: ["defaultAccount"],
|
|
10
|
-
nestedObjectKeys: ["commands"],
|
|
11
|
-
hasImplicitDefaultAccount: (cfg) => {
|
|
12
|
-
const mattermost = cfg.channels?.mattermost;
|
|
13
|
-
return Boolean(mattermost?.baseUrl?.trim() && (hasConfiguredAccountValue(mattermost.botToken) || process.env.MATTERMOST_BOT_TOKEN?.trim()));
|
|
14
|
-
}
|
|
15
|
-
});
|
|
16
|
-
function resolveMattermostRequireMention(config) {
|
|
17
|
-
if (config.chatmode === "oncall") return true;
|
|
18
|
-
if (config.chatmode === "onmessage") return false;
|
|
19
|
-
if (config.chatmode === "onchar") return true;
|
|
20
|
-
return config.requireMention;
|
|
21
|
-
}
|
|
22
|
-
function resolveMattermostAccountWithMode(params) {
|
|
23
|
-
const accountId = normalizeAccountId(params.accountId ?? resolveDefaultMattermostAccountId(params.cfg));
|
|
24
|
-
const baseEnabled = params.cfg.channels?.mattermost?.enabled !== false;
|
|
25
|
-
const merged = mergeMattermostAccountConfig(params.cfg, accountId);
|
|
26
|
-
const accountEnabled = merged.enabled !== false;
|
|
27
|
-
const enabled = baseEnabled && accountEnabled;
|
|
28
|
-
const allowEnv = accountId === DEFAULT_ACCOUNT_ID;
|
|
29
|
-
const envToken = allowEnv ? process.env.MATTERMOST_BOT_TOKEN?.trim() : void 0;
|
|
30
|
-
const envUrl = allowEnv ? process.env.MATTERMOST_URL?.trim() : void 0;
|
|
31
|
-
const configToken = resolveSecretInputString({
|
|
32
|
-
value: merged.botToken,
|
|
33
|
-
path: `channels.mattermost.accounts.${accountId}.botToken`,
|
|
34
|
-
mode: params.mode
|
|
35
|
-
});
|
|
36
|
-
const configUrl = merged.baseUrl?.trim();
|
|
37
|
-
const botToken = configToken.status === "available" ? configToken.value : configToken.status === "missing" ? envToken : void 0;
|
|
38
|
-
const baseUrl = normalizeMattermostBaseUrl(configUrl || envUrl);
|
|
39
|
-
const requireMention = resolveMattermostRequireMention(merged);
|
|
40
|
-
const botTokenSource = configToken.status !== "missing" ? "config" : envToken ? "env" : "none";
|
|
41
|
-
const botTokenStatus = configToken.status !== "missing" ? configToken.status : envToken ? "available" : "missing";
|
|
42
|
-
const baseUrlSource = configUrl ? "config" : envUrl ? "env" : "none";
|
|
43
|
-
return {
|
|
44
|
-
accountId,
|
|
45
|
-
enabled,
|
|
46
|
-
name: normalizeOptionalString(merged.name),
|
|
47
|
-
botToken,
|
|
48
|
-
baseUrl,
|
|
49
|
-
botTokenSource,
|
|
50
|
-
botTokenStatus,
|
|
51
|
-
baseUrlSource,
|
|
52
|
-
config: merged,
|
|
53
|
-
chatmode: merged.chatmode,
|
|
54
|
-
oncharPrefixes: merged.oncharPrefixes,
|
|
55
|
-
requireMention,
|
|
56
|
-
textChunkLimit: merged.textChunkLimit,
|
|
57
|
-
chunkMode: resolveChannelStreamingChunkMode(merged),
|
|
58
|
-
streamingMode: resolveChannelPreviewStreamMode(merged, "partial"),
|
|
59
|
-
blockStreaming: resolveChannelStreamingBlockEnabled(merged),
|
|
60
|
-
blockStreamingCoalesce: resolveChannelStreamingBlockCoalesce(merged)
|
|
61
|
-
};
|
|
62
|
-
}
|
|
63
|
-
function resolveMattermostAccount(params) {
|
|
64
|
-
return resolveMattermostAccountWithMode({
|
|
65
|
-
...params,
|
|
66
|
-
mode: "strict"
|
|
67
|
-
});
|
|
68
|
-
}
|
|
69
|
-
function inspectMattermostAccount(params) {
|
|
70
|
-
return resolveMattermostAccountWithMode({
|
|
71
|
-
...params,
|
|
72
|
-
mode: "inspect"
|
|
73
|
-
});
|
|
74
|
-
}
|
|
75
|
-
/**
|
|
76
|
-
* Resolve the effective replyToMode for a given chat type.
|
|
77
|
-
* Direct messages stay flat unless explicitly opted into a per-chat-type mode.
|
|
78
|
-
*/
|
|
79
|
-
function resolveMattermostReplyToMode(account, kind) {
|
|
80
|
-
const scopedMode = account.config.replyToModeByChatType?.[kind];
|
|
81
|
-
if (scopedMode !== void 0) return scopedMode;
|
|
82
|
-
if (kind === "direct") return "off";
|
|
83
|
-
return account.config.replyToMode ?? "off";
|
|
84
|
-
}
|
|
85
|
-
//#endregion
|
|
86
|
-
export { resolveMattermostReplyToMode as a, resolveMattermostAccount as i, listMattermostAccountIds as n, buildSecretInputSchema as o, resolveDefaultMattermostAccountId as r, hasConfiguredSecretInput as s, inspectMattermostAccount as t };
|