@openclaw/mattermost 2026.7.2-beta.5 → 2026.7.33
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-w0lkxuKh.js → .setup/accounts-CkvUBI7I.mjs} +100 -31
- 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-DLBTUlbh.js → .setup/channel-plugin-runtime-BLOKRsgT.mjs} +212 -215
- 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-BOh6zLW9.js → .setup/monitor-auth-CeakcTAO.mjs} +12 -13
- package/dist/.setup/secret-contract-Cx0LUNXy.mjs +44 -0
- package/dist/.setup/secret-contract-api-BLTnjVCZ.mjs +3 -0
- package/dist/{slash-state-VCRdqj5F.js → .setup/slash-state-D1e1_KaK.mjs} +534 -189
- 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 +215 -255
- package/package.json +6 -52
- package/dist/accounts-BR6Nl5Qf.js +0 -71
- package/dist/channel.runtime-CR1V5M8l.js +0 -2873
- package/dist/doctor-contract-BaUvVh8e.js +0 -19
- package/dist/interactions-B4gg-KRm.js +0 -375
- package/dist/secret-contract-B4R5Bmhv.js +0 -28
- /package/dist/{runtime-CNB4YGqJ.js → .setup/runtime-CNB4YGqJ.mjs} +0 -0
|
@@ -1,71 +0,0 @@
|
|
|
1
|
-
import { p as normalizeMattermostBaseUrl } from "./client-w0lkxuKh.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, normalizeResolvedSecretInputString, normalizeSecretInputString } 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 resolveMattermostAccount(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 = params.allowUnresolvedSecretRef ? normalizeSecretInputString(merged.botToken) : normalizeResolvedSecretInputString({
|
|
32
|
-
value: merged.botToken,
|
|
33
|
-
path: `channels.mattermost.accounts.${accountId}.botToken`
|
|
34
|
-
});
|
|
35
|
-
const configUrl = merged.baseUrl?.trim();
|
|
36
|
-
const botToken = configToken || envToken;
|
|
37
|
-
const baseUrl = normalizeMattermostBaseUrl(configUrl || envUrl);
|
|
38
|
-
const requireMention = resolveMattermostRequireMention(merged);
|
|
39
|
-
const botTokenSource = configToken ? "config" : envToken ? "env" : "none";
|
|
40
|
-
const baseUrlSource = configUrl ? "config" : envUrl ? "env" : "none";
|
|
41
|
-
return {
|
|
42
|
-
accountId,
|
|
43
|
-
enabled,
|
|
44
|
-
name: normalizeOptionalString(merged.name),
|
|
45
|
-
botToken,
|
|
46
|
-
baseUrl,
|
|
47
|
-
botTokenSource,
|
|
48
|
-
baseUrlSource,
|
|
49
|
-
config: merged,
|
|
50
|
-
chatmode: merged.chatmode,
|
|
51
|
-
oncharPrefixes: merged.oncharPrefixes,
|
|
52
|
-
requireMention,
|
|
53
|
-
textChunkLimit: merged.textChunkLimit,
|
|
54
|
-
chunkMode: resolveChannelStreamingChunkMode(merged),
|
|
55
|
-
streamingMode: resolveChannelPreviewStreamMode(merged, "partial"),
|
|
56
|
-
blockStreaming: resolveChannelStreamingBlockEnabled(merged),
|
|
57
|
-
blockStreamingCoalesce: resolveChannelStreamingBlockCoalesce(merged)
|
|
58
|
-
};
|
|
59
|
-
}
|
|
60
|
-
/**
|
|
61
|
-
* Resolve the effective replyToMode for a given chat type.
|
|
62
|
-
* Direct messages stay flat unless explicitly opted into a per-chat-type mode.
|
|
63
|
-
*/
|
|
64
|
-
function resolveMattermostReplyToMode(account, kind) {
|
|
65
|
-
const scopedMode = account.config.replyToModeByChatType?.[kind];
|
|
66
|
-
if (scopedMode !== void 0) return scopedMode;
|
|
67
|
-
if (kind === "direct") return "off";
|
|
68
|
-
return account.config.replyToMode ?? "off";
|
|
69
|
-
}
|
|
70
|
-
//#endregion
|
|
71
|
-
export { buildSecretInputSchema as a, resolveMattermostReplyToMode as i, resolveDefaultMattermostAccountId as n, hasConfiguredSecretInput as o, resolveMattermostAccount as r, listMattermostAccountIds as t };
|