@openclaw/mattermost 2026.7.2-beta.5 → 2026.8.1-beta.2
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-BR6Nl5Qf.js → accounts-DspH-NMT.js} +23 -8
- package/dist/api.js +2 -2
- package/dist/channel-plugin-api.js +2 -3
- package/dist/{channel-plugin-runtime-DLBTUlbh.js → channel-plugin-runtime-Dxt8Zv1j.js} +194 -109
- package/dist/channel-plugin-runtime.js +1 -1
- package/dist/{channel.runtime-CR1V5M8l.js → channel.runtime-FKnzxYBR.js} +635 -260
- package/dist/{client-w0lkxuKh.js → client-B_hd-kwM.js} +61 -72
- package/dist/doctor-contract-api.js +1 -1
- package/dist/{doctor-contract-BaUvVh8e.js → doctor-contract-mvORF4f6.js} +1 -2
- package/dist/gateway-auth-api.js +1 -1
- package/dist/{gateway-auth-bypass-CL1PxV3z.js → gateway-auth-bypass-B93t91oq.js} +4 -6
- package/dist/{interactions-B4gg-KRm.js → interactions-Du_EJMeN.js} +4 -3
- package/dist/{monitor-auth-BOh6zLW9.js → monitor-auth-CVd_4FPD.js} +4 -5
- package/dist/policy-api.js +1 -1
- package/dist/runtime-api.js +2 -2
- package/dist/secret-contract-api.js +1 -1
- package/dist/secret-contract-qg3NXRlS.js +12 -0
- package/dist/slash-route-api.js +1 -1
- package/dist/{slash-state-VCRdqj5F.js → slash-state-DUowGLl4.js} +147 -71
- package/openclaw.plugin.json +72 -17
- package/package.json +9 -5
- package/dist/secret-contract-B4R5Bmhv.js +0 -28
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import { normalizeLowercaseStringOrEmpty, normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
2
|
+
import { createChannelPartialDeliveryError } from "openclaw/plugin-sdk/channel-inbound";
|
|
3
|
+
import { collectErrorGraphCandidates } from "openclaw/plugin-sdk/error-runtime";
|
|
2
4
|
import { buildTimeoutAbortSignal } from "openclaw/plugin-sdk/extension-shared";
|
|
5
|
+
import { responseWithRelease } from "openclaw/plugin-sdk/fetch-runtime";
|
|
3
6
|
import { resolveTimerTimeoutMs } from "openclaw/plugin-sdk/number-runtime";
|
|
4
7
|
import { readProviderJsonResponse, readResponseTextLimited } from "openclaw/plugin-sdk/provider-http";
|
|
5
8
|
import { readResponseWithLimit } from "openclaw/plugin-sdk/response-limit-runtime";
|
|
@@ -10,12 +13,6 @@ import { z } from "zod";
|
|
|
10
13
|
const MATTERMOST_ERROR_BODY_LIMIT_BYTES = 8 * 1024;
|
|
11
14
|
const MATTERMOST_REQUEST_TIMEOUT_MS = 3e4;
|
|
12
15
|
const MATTERMOST_TEXT_RESPONSE_LIMIT_BYTES = 64 * 1024;
|
|
13
|
-
const NULL_BODY_STATUSES = /* @__PURE__ */ new Set([
|
|
14
|
-
101,
|
|
15
|
-
204,
|
|
16
|
-
205,
|
|
17
|
-
304
|
|
18
|
-
]);
|
|
19
16
|
const MattermostPostSchema = z.object({
|
|
20
17
|
id: z.string(),
|
|
21
18
|
user_id: z.string().nullable().optional(),
|
|
@@ -27,6 +24,20 @@ const MattermostPostSchema = z.object({
|
|
|
27
24
|
create_at: z.number().nullable().optional(),
|
|
28
25
|
props: z.record(z.string(), z.unknown()).nullable().optional()
|
|
29
26
|
}).passthrough();
|
|
27
|
+
const MattermostPostListSchema = z.object({
|
|
28
|
+
order: z.array(z.string()),
|
|
29
|
+
posts: z.record(z.string(), MattermostPostSchema),
|
|
30
|
+
next_post_id: z.string().nullable().optional(),
|
|
31
|
+
prev_post_id: z.string().nullable().optional()
|
|
32
|
+
}).passthrough();
|
|
33
|
+
function parseMattermostApiStatus(error) {
|
|
34
|
+
if (!error || typeof error !== "object") return;
|
|
35
|
+
const message = "message" in error && typeof error.message === "string" ? error.message : "";
|
|
36
|
+
const match = /Mattermost API (\d{3})\b/.exec(message);
|
|
37
|
+
if (!match) return;
|
|
38
|
+
const status = Number(match[1]);
|
|
39
|
+
return Number.isFinite(status) ? status : void 0;
|
|
40
|
+
}
|
|
30
41
|
function normalizeMattermostBaseUrl(raw) {
|
|
31
42
|
const trimmed = raw?.trim();
|
|
32
43
|
if (!trimmed) return;
|
|
@@ -63,48 +74,6 @@ async function readMattermostError(res) {
|
|
|
63
74
|
}
|
|
64
75
|
return text;
|
|
65
76
|
}
|
|
66
|
-
function responseWithRelease(response, release) {
|
|
67
|
-
let released = false;
|
|
68
|
-
const releaseOnce = async () => {
|
|
69
|
-
if (released) return;
|
|
70
|
-
released = true;
|
|
71
|
-
await release();
|
|
72
|
-
};
|
|
73
|
-
if (!response.body || NULL_BODY_STATUSES.has(response.status)) {
|
|
74
|
-
releaseOnce();
|
|
75
|
-
return new Response(null, {
|
|
76
|
-
status: response.status,
|
|
77
|
-
statusText: response.statusText,
|
|
78
|
-
headers: response.headers
|
|
79
|
-
});
|
|
80
|
-
}
|
|
81
|
-
const reader = response.body.getReader();
|
|
82
|
-
const body = new ReadableStream({
|
|
83
|
-
async pull(controller) {
|
|
84
|
-
try {
|
|
85
|
-
const { done, value } = await reader.read();
|
|
86
|
-
if (done) {
|
|
87
|
-
await releaseOnce();
|
|
88
|
-
controller.close();
|
|
89
|
-
return;
|
|
90
|
-
}
|
|
91
|
-
if (value) controller.enqueue(value);
|
|
92
|
-
} catch (error) {
|
|
93
|
-
await releaseOnce();
|
|
94
|
-
throw error;
|
|
95
|
-
}
|
|
96
|
-
},
|
|
97
|
-
async cancel(reason) {
|
|
98
|
-
await reader.cancel(reason).catch(() => void 0);
|
|
99
|
-
await releaseOnce();
|
|
100
|
-
}
|
|
101
|
-
});
|
|
102
|
-
return new Response(body, {
|
|
103
|
-
status: response.status,
|
|
104
|
-
statusText: response.statusText,
|
|
105
|
-
headers: response.headers
|
|
106
|
-
});
|
|
107
|
-
}
|
|
108
77
|
function createMattermostClient(params) {
|
|
109
78
|
const baseUrl = normalizeMattermostBaseUrl(params.baseUrl);
|
|
110
79
|
if (!baseUrl) throw new Error("Mattermost baseUrl is required");
|
|
@@ -160,8 +129,16 @@ function createMattermostClient(params) {
|
|
|
160
129
|
throw new Error(`Mattermost API ${res.status} ${res.statusText}: ${detail || "unknown error"}`);
|
|
161
130
|
}
|
|
162
131
|
if (res.status === 204) return;
|
|
163
|
-
|
|
164
|
-
|
|
132
|
+
try {
|
|
133
|
+
if ((res.headers.get("content-type") ?? "").includes("application/json")) return await readProviderJsonResponse(res, `Mattermost API ${path}`);
|
|
134
|
+
return await readMattermostSuccessText(res, path);
|
|
135
|
+
} catch (error) {
|
|
136
|
+
if (path === "/posts" && init?.method?.toUpperCase() === "POST") throw createChannelPartialDeliveryError(error, {
|
|
137
|
+
messageIds: [],
|
|
138
|
+
visibleReplySent: true
|
|
139
|
+
});
|
|
140
|
+
throw error;
|
|
141
|
+
}
|
|
165
142
|
};
|
|
166
143
|
return {
|
|
167
144
|
baseUrl,
|
|
@@ -181,7 +158,24 @@ async function fetchMattermostUserByUsername(client, username) {
|
|
|
181
158
|
return await client.request(`/users/username/${encodeURIComponent(username)}`);
|
|
182
159
|
}
|
|
183
160
|
async function fetchMattermostChannel(client, channelId) {
|
|
184
|
-
return await client.request(`/channels/${channelId}`);
|
|
161
|
+
return await client.request(`/channels/${encodeURIComponent(channelId)}`);
|
|
162
|
+
}
|
|
163
|
+
async function fetchMattermostChannelPosts(client, channelId, options = {}) {
|
|
164
|
+
const before = normalizeOptionalString(options.before);
|
|
165
|
+
const after = normalizeOptionalString(options.after);
|
|
166
|
+
if (before && after) throw new Error("Mattermost read accepts either before or after, not both.");
|
|
167
|
+
if (options.limit !== void 0 && (!Number.isSafeInteger(options.limit) || options.limit <= 0)) throw new Error("Mattermost read limit must be a positive integer.");
|
|
168
|
+
const perPage = Math.min(options.limit ?? 60, 200);
|
|
169
|
+
const query = new URLSearchParams({ per_page: String(perPage) });
|
|
170
|
+
if (before) query.set("before", before);
|
|
171
|
+
if (after) query.set("after", after);
|
|
172
|
+
const response = await client.request(`/channels/${encodeURIComponent(channelId)}/posts?${query.toString()}`);
|
|
173
|
+
const parsed = MattermostPostListSchema.safeParse(response);
|
|
174
|
+
if (!parsed.success || parsed.data.order.some((postId) => !parsed.data.posts[postId])) throw new Error("Unexpected Mattermost channel posts response.");
|
|
175
|
+
return {
|
|
176
|
+
messages: parsed.data.order.map((postId) => parsed.data.posts[postId]),
|
|
177
|
+
hasMore: Boolean(after ? parsed.data.next_post_id : parsed.data.prev_post_id)
|
|
178
|
+
};
|
|
185
179
|
}
|
|
186
180
|
async function fetchMattermostChannelByName(client, teamId, channelName) {
|
|
187
181
|
return await client.request(`/teams/${teamId}/channels/name/${encodeURIComponent(channelName)}`);
|
|
@@ -282,7 +276,11 @@ async function createMattermostDirectChannelWithRetry(client, userIds, options =
|
|
|
282
276
|
});
|
|
283
277
|
}
|
|
284
278
|
function isRetryableError(error) {
|
|
285
|
-
const candidates =
|
|
279
|
+
const candidates = collectErrorGraphCandidates(error, (current) => [
|
|
280
|
+
current.cause,
|
|
281
|
+
current.reason,
|
|
282
|
+
...Array.isArray(current.errors) ? current.errors : []
|
|
283
|
+
]);
|
|
286
284
|
const messages = candidates.map((candidate) => normalizeLowercaseStringOrEmpty(readErrorMessage(candidate))).filter((message) => Boolean(message));
|
|
287
285
|
if (messages.some((message) => /mattermost api 5\d{2}\b/.test(message))) return true;
|
|
288
286
|
if (messages.some((message) => /mattermost api 429\b/.test(message) || message.includes("too many requests"))) return true;
|
|
@@ -309,24 +307,6 @@ function isRetryableError(error) {
|
|
|
309
307
|
if (names.some((name) => RETRYABLE_NETWORK_ERROR_NAMES.has(name))) return true;
|
|
310
308
|
return messages.some((message) => RETRYABLE_NETWORK_MESSAGE_SNIPPETS.some((pattern) => message.includes(pattern)));
|
|
311
309
|
}
|
|
312
|
-
function collectErrorCandidates(error) {
|
|
313
|
-
const queue = [error];
|
|
314
|
-
let queueIndex = 0;
|
|
315
|
-
const seen = /* @__PURE__ */ new Set();
|
|
316
|
-
const candidates = [];
|
|
317
|
-
while (queueIndex < queue.length) {
|
|
318
|
-
const current = queue[queueIndex];
|
|
319
|
-
queueIndex += 1;
|
|
320
|
-
if (!current || seen.has(current)) continue;
|
|
321
|
-
seen.add(current);
|
|
322
|
-
candidates.push(current);
|
|
323
|
-
if (typeof current !== "object") continue;
|
|
324
|
-
const nested = current;
|
|
325
|
-
queue.push(nested.cause, nested.reason);
|
|
326
|
-
if (Array.isArray(nested.errors)) queue.push(...nested.errors);
|
|
327
|
-
}
|
|
328
|
-
return candidates;
|
|
329
|
-
}
|
|
330
310
|
function readErrorMessage(error) {
|
|
331
311
|
if (!error || typeof error !== "object") return;
|
|
332
312
|
const message = error.message;
|
|
@@ -352,10 +332,19 @@ async function createMattermostPost(client, params) {
|
|
|
352
332
|
if (params.rootId) payload.root_id = params.rootId;
|
|
353
333
|
if (params.fileIds?.length) payload.file_ids = params.fileIds;
|
|
354
334
|
if (params.props) payload.props = params.props;
|
|
355
|
-
|
|
335
|
+
const post = await client.request("/posts", {
|
|
356
336
|
method: "POST",
|
|
357
337
|
body: JSON.stringify(payload)
|
|
358
338
|
});
|
|
339
|
+
const postId = post && typeof post === "object" ? normalizeOptionalString(post.id) : void 0;
|
|
340
|
+
if (!postId) throw createChannelPartialDeliveryError(/* @__PURE__ */ new Error("Mattermost post creation response did not include a post id"), {
|
|
341
|
+
messageIds: [],
|
|
342
|
+
visibleReplySent: true
|
|
343
|
+
});
|
|
344
|
+
return postId === post.id ? post : {
|
|
345
|
+
...post,
|
|
346
|
+
id: postId
|
|
347
|
+
};
|
|
359
348
|
}
|
|
360
349
|
async function fetchMattermostUserTeams(client, userId) {
|
|
361
350
|
return await client.request(`/users/${userId}/teams`);
|
|
@@ -393,4 +382,4 @@ async function uploadMattermostFile(client, params) {
|
|
|
393
382
|
return info;
|
|
394
383
|
}
|
|
395
384
|
//#endregion
|
|
396
|
-
export {
|
|
385
|
+
export { resolveMattermostReplyDeliveryBarrierTimeoutMs as _, createMattermostPost as a, uploadMattermostFile as b, fetchMattermostChannelByName as c, fetchMattermostUser as d, fetchMattermostUserByUsername as f, readMattermostError as g, parseMattermostApiStatus as h, createMattermostDirectChannelWithRetry as i, fetchMattermostChannelPosts as l, normalizeMattermostBaseUrl 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,2 +1,2 @@
|
|
|
1
|
-
import { n as normalizeCompatibilityConfig, t as legacyConfigRules } from "./doctor-contract-
|
|
1
|
+
import { n as normalizeCompatibilityConfig, t as legacyConfigRules } from "./doctor-contract-mvORF4f6.js";
|
|
2
2
|
export { legacyConfigRules, normalizeCompatibilityConfig };
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { createLegacyPrivateNetworkDoctorContract } from "openclaw/plugin-sdk/
|
|
2
|
-
import { defineChannelAliasMigration } from "openclaw/plugin-sdk/runtime-doctor";
|
|
1
|
+
import { createLegacyPrivateNetworkDoctorContract, defineChannelAliasMigration } from "openclaw/plugin-sdk/runtime-doctor-migrations";
|
|
3
2
|
//#region extensions/mattermost/src/doctor-contract.ts
|
|
4
3
|
const networkContract = createLegacyPrivateNetworkDoctorContract({ channelKey: "mattermost" });
|
|
5
4
|
const streamingAliasMigration = defineChannelAliasMigration({
|
package/dist/gateway-auth-api.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as resolveMattermostGatewayAuthBypassPaths } from "./gateway-auth-bypass-
|
|
1
|
+
import { t as resolveMattermostGatewayAuthBypassPaths } from "./gateway-auth-bypass-B93t91oq.js";
|
|
2
2
|
export { resolveMattermostGatewayAuthBypassPaths as resolveGatewayAuthBypassPaths };
|
|
@@ -1,22 +1,20 @@
|
|
|
1
|
+
import { asOptionalRecord, normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
1
2
|
//#region extensions/mattermost/src/gateway-auth-bypass.ts
|
|
2
3
|
const DEFAULT_SLASH_CALLBACK_PATH = "/api/channels/mattermost/command";
|
|
3
|
-
function readTrimmedString(value) {
|
|
4
|
-
return typeof value === "string" && value.trim() ? value.trim() : void 0;
|
|
5
|
-
}
|
|
6
4
|
function normalizeCallbackPath(value) {
|
|
7
|
-
const trimmed =
|
|
5
|
+
const trimmed = normalizeOptionalString(value);
|
|
8
6
|
if (!trimmed) return DEFAULT_SLASH_CALLBACK_PATH;
|
|
9
7
|
return trimmed.startsWith("/") ? trimmed : `/${trimmed}`;
|
|
10
8
|
}
|
|
11
9
|
function readMattermostCommands(value) {
|
|
12
|
-
return
|
|
10
|
+
return asOptionalRecord(value);
|
|
13
11
|
}
|
|
14
12
|
function isMattermostBypassPath(path) {
|
|
15
13
|
return path === DEFAULT_SLASH_CALLBACK_PATH || path.startsWith("/api/channels/mattermost/");
|
|
16
14
|
}
|
|
17
15
|
function collectMattermostSlashCallbackPaths(raw) {
|
|
18
16
|
const paths = /* @__PURE__ */ new Set([normalizeCallbackPath(raw?.callbackPath)]);
|
|
19
|
-
const callbackUrl =
|
|
17
|
+
const callbackUrl = normalizeOptionalString(raw?.callbackUrl);
|
|
20
18
|
if (callbackUrl) try {
|
|
21
19
|
const pathname = new URL(callbackUrl).pathname;
|
|
22
20
|
if (pathname) paths.add(pathname);
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { t as getMattermostRuntime } from "./runtime-CNB4YGqJ.js";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
2
|
+
import { y as updateMattermostPost } from "./client-B_hd-kwM.js";
|
|
3
|
+
import { C as resolveClientIp, m as isTrustedProxyAddress, y as readRequestBodyWithLimit } from "./monitor-auth-CVd_4FPD.js";
|
|
4
4
|
import { createHmac } from "node:crypto";
|
|
5
|
+
import { resolveGatewayPort } from "openclaw/plugin-sdk/core";
|
|
5
6
|
import { safeEqualSecret } from "openclaw/plugin-sdk/security-runtime";
|
|
6
7
|
import { normalizeOptionalString, normalizeStringifiedOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
7
8
|
//#region extensions/mattermost/src/mattermost/interactions.ts
|
|
@@ -47,7 +48,7 @@ function computeInteractionCallbackUrl(accountId, cfg) {
|
|
|
47
48
|
const path = resolveInteractionCallbackPath(accountId);
|
|
48
49
|
const callbackBaseUrl = normalizeOptionalString(cfg?.interactions?.callbackBaseUrl) ?? normalizeOptionalString(cfg?.channels?.mattermost?.interactions?.callbackBaseUrl);
|
|
49
50
|
if (callbackBaseUrl) return `${normalizeCallbackBaseUrl(callbackBaseUrl)}${path}`;
|
|
50
|
-
const port =
|
|
51
|
+
const port = resolveGatewayPort(cfg);
|
|
51
52
|
let host = cfg?.gateway?.customBindHost && !isWildcardBindHost(cfg.gateway.customBindHost) ? cfg.gateway.customBindHost.trim() : "localhost";
|
|
52
53
|
if (host.includes(":") && !(host.startsWith("[") && host.endsWith("]"))) host = `[${host}]`;
|
|
53
54
|
return `http://${host}:${port}${path}`;
|
|
@@ -1,20 +1,19 @@
|
|
|
1
|
+
import { isTrustedProxyAddress, resolveClientIp } from "openclaw/plugin-sdk/core";
|
|
1
2
|
import { normalizeLowercaseStringOrEmpty, uniqueStrings } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
2
|
-
import { parseTcpPort } from "openclaw/plugin-sdk/number-runtime";
|
|
3
|
-
import { resolveAllowlistMatchSimple } from "openclaw/plugin-sdk/allow-from";
|
|
4
3
|
import { logInboundDrop } from "openclaw/plugin-sdk/channel-inbound";
|
|
4
|
+
import { resolveAllowlistMatchSimple } from "openclaw/plugin-sdk/allow-from";
|
|
5
5
|
import { createChannelPairingController } from "openclaw/plugin-sdk/channel-pairing";
|
|
6
6
|
import { createChannelMessageReplyPipeline } from "openclaw/plugin-sdk/channel-outbound";
|
|
7
7
|
import { logTypingFailure } from "openclaw/plugin-sdk/channel-feedback";
|
|
8
8
|
import { listSkillCommandsForAgents } from "openclaw/plugin-sdk/command-auth-native";
|
|
9
9
|
import { buildModelsProviderData } from "openclaw/plugin-sdk/models-provider-runtime";
|
|
10
10
|
import { isDangerousNameMatchingEnabled } from "openclaw/plugin-sdk/dangerous-name-runtime";
|
|
11
|
-
import { resolveAllowlistProviderRuntimeGroupPolicy, resolveDefaultGroupPolicy, warnMissingProviderGroupPolicyFallbackOnce } from "openclaw/plugin-sdk/runtime-group-policy";
|
|
11
|
+
import { resolveAllowlistProviderRuntimeGroupPolicy as resolveAllowlistProviderRuntimeGroupPolicy$1, resolveDefaultGroupPolicy, warnMissingProviderGroupPolicyFallbackOnce } from "openclaw/plugin-sdk/runtime-group-policy";
|
|
12
12
|
import { resolveChannelMediaMaxBytes } from "openclaw/plugin-sdk/media-runtime";
|
|
13
13
|
import { loadOutboundMediaFromUrl } from "openclaw/plugin-sdk/outbound-media";
|
|
14
14
|
import { DEFAULT_GROUP_HISTORY_LIMIT, createChannelHistoryWindow } from "openclaw/plugin-sdk/reply-history";
|
|
15
15
|
import { registerPluginHttpRoute } from "openclaw/plugin-sdk/webhook-targets";
|
|
16
16
|
import { isRequestBodyLimitError, readRequestBodyWithLimit } from "openclaw/plugin-sdk/webhook-ingress";
|
|
17
|
-
import { isTrustedProxyAddress, resolveClientIp } from "openclaw/plugin-sdk/core";
|
|
18
17
|
import { parseAccessGroupAllowFromEntry } from "openclaw/plugin-sdk/access-groups";
|
|
19
18
|
import { resolveStableChannelMessageIngress } from "openclaw/plugin-sdk/channel-ingress-runtime";
|
|
20
19
|
//#region extensions/mattermost/src/mattermost/monitor-auth.ts
|
|
@@ -182,4 +181,4 @@ async function authorizeMattermostCommandInvocation(params) {
|
|
|
182
181
|
};
|
|
183
182
|
}
|
|
184
183
|
//#endregion
|
|
185
|
-
export {
|
|
184
|
+
export { resolveClientIp as C, resolveChannelMediaMaxBytes as S, warnMissingProviderGroupPolicyFallbackOnce as T, logInboundDrop as _, normalizeMattermostAllowList as a, registerPluginHttpRoute as b, DEFAULT_GROUP_HISTORY_LIMIT as c, createChannelMessageReplyPipeline as d, createChannelPairingController as f, loadOutboundMediaFromUrl as g, listSkillCommandsForAgents as h, normalizeMattermostAllowEntry as i, buildModelsProviderData as l, isTrustedProxyAddress as m, formatMattermostDirectMessageDropLog as n, resolveMattermostMonitorInboundAccess as o, isRequestBodyLimitError as p, isMattermostSenderAllowed as r, resolveMattermostTrustedChatKind as s, authorizeMattermostCommandInvocation as t, createChannelHistoryWindow as u, logTypingFailure as v, resolveDefaultGroupPolicy as w, resolveAllowlistProviderRuntimeGroupPolicy$1 as x, readRequestBodyWithLimit as y };
|
package/dist/policy-api.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { r as isMattermostSenderAllowed } from "./monitor-auth-
|
|
1
|
+
import { r as isMattermostSenderAllowed } from "./monitor-auth-CVd_4FPD.js";
|
|
2
2
|
export { isMattermostSenderAllowed };
|
package/dist/runtime-api.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { r as setMattermostRuntime } from "./runtime-CNB4YGqJ.js";
|
|
2
|
-
import {
|
|
2
|
+
import { DEFAULT_ACCOUNT_ID, buildChannelConfigSchema, createDedupeCache, isTrustedProxyAddress, parseStrictPositiveInteger, resolveClientIp } from "openclaw/plugin-sdk/core";
|
|
3
3
|
import { formatInboundFromLabel, logInboundDrop } from "openclaw/plugin-sdk/channel-inbound";
|
|
4
|
+
import { resolveAllowlistMatchSimple } from "openclaw/plugin-sdk/allow-from";
|
|
4
5
|
import { createChannelPairingController } from "openclaw/plugin-sdk/channel-pairing";
|
|
5
6
|
import { createAccountStatusSink, createChannelMessageReplyPipeline } from "openclaw/plugin-sdk/channel-outbound";
|
|
6
7
|
import { logTypingFailure } from "openclaw/plugin-sdk/channel-feedback";
|
|
@@ -13,7 +14,6 @@ import { loadOutboundMediaFromUrl } from "openclaw/plugin-sdk/outbound-media";
|
|
|
13
14
|
import { DEFAULT_GROUP_HISTORY_LIMIT, buildPendingHistoryContextFromMap, clearHistoryEntriesIfEnabled, createChannelHistoryWindow, recordPendingHistoryEntryIfEnabled } from "openclaw/plugin-sdk/reply-history";
|
|
14
15
|
import { registerPluginHttpRoute } from "openclaw/plugin-sdk/webhook-targets";
|
|
15
16
|
import { isRequestBodyLimitError, rawDataToString, readRequestBodyWithLimit } from "openclaw/plugin-sdk/webhook-ingress";
|
|
16
|
-
import { DEFAULT_ACCOUNT_ID, buildChannelConfigSchema, createDedupeCache, isTrustedProxyAddress, parseStrictPositiveInteger, resolveClientIp } from "openclaw/plugin-sdk/core";
|
|
17
17
|
import { chunkTextForOutbound } from "openclaw/plugin-sdk/text-chunking";
|
|
18
18
|
import { applyAccountNameToChannelSection, applySetupAccountConfigPatch, migrateBaseNameToDefaultAccount } from "openclaw/plugin-sdk/setup";
|
|
19
19
|
import { buildComputedAccountStatusSnapshot } from "openclaw/plugin-sdk/channel-status";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as collectRuntimeConfigAssignments, r as secretTargetRegistryEntries, t as channelSecrets } from "./secret-contract-
|
|
1
|
+
import { n as collectRuntimeConfigAssignments, r as secretTargetRegistryEntries, t as channelSecrets } from "./secret-contract-qg3NXRlS.js";
|
|
2
2
|
export { channelSecrets, collectRuntimeConfigAssignments, secretTargetRegistryEntries };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { createSimpleChannelSecretContract } from "openclaw/plugin-sdk/channel-secret-basic-runtime";
|
|
2
|
+
//#region extensions/mattermost/src/secret-contract.ts
|
|
3
|
+
const channelSecrets = createSimpleChannelSecretContract({
|
|
4
|
+
channelKey: "mattermost",
|
|
5
|
+
label: "Mattermost",
|
|
6
|
+
accountFields: ["botToken"],
|
|
7
|
+
channelFields: ["botToken"],
|
|
8
|
+
mode: "account-inheritance"
|
|
9
|
+
});
|
|
10
|
+
const { secretTargetRegistryEntries, collectRuntimeConfigAssignments } = channelSecrets;
|
|
11
|
+
//#endregion
|
|
12
|
+
export { collectRuntimeConfigAssignments as n, secretTargetRegistryEntries as r, channelSecrets as t };
|
package/dist/slash-route-api.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { i as registerSlashCommandRoute } from "./slash-state-
|
|
1
|
+
import { i as registerSlashCommandRoute } from "./slash-state-DUowGLl4.js";
|
|
2
2
|
export { registerSlashCommandRoute };
|