@openclaw/mattermost 2026.10.10-beta.4 → 2026.10.10
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/.setup/{callback-host-Bu2cmtfI.mjs → callback-host-CRQTeNn9.mjs} +1 -2
- package/dist/.setup/{channel-plugin-api-wZzJEr0h.mjs → channel-plugin-api-Vq9imWd1.mjs} +1 -1
- package/dist/.setup/{channel-plugin-runtime-DQaQ8YVa.mjs → channel-plugin-runtime-CLBgUA35.mjs} +22 -36
- package/dist/.setup/{channel.runtime-Bl2oL5mO.mjs → channel.runtime-BBMzxlPB.mjs} +8 -12
- package/dist/.setup/{client-CW26CnSc.mjs → client-VHp4VYIf.mjs} +2 -2
- package/dist/.setup/{doctor-contract-CjgZkyPm.mjs → doctor-contract-i788N90j.mjs} +6 -11
- package/dist/.setup/{gateway-auth-bypass-Lf99Gilr.mjs → gateway-auth-bypass-DhWaV22L.mjs} +2 -3
- package/dist/.setup/{ingress-identity-D6hxfxvo.mjs → ingress-identity-CtHiOUDu.mjs} +0 -1
- package/dist/.setup/{interactions-D2MJ2Tnp.mjs → interactions-7eWssSf1.mjs} +12 -19
- package/dist/.setup/{monitor-pdTb1bbs.mjs → monitor-agLGA4lV.mjs} +54 -56
- package/dist/.setup/{monitor-auth-C5XBx6E0.mjs → monitor-auth-0gZXtoHv.mjs} +8 -6
- package/dist/.setup/{normalize-ttaISanW.mjs → normalize-C_DYEHki.mjs} +3 -5
- package/dist/.setup/{rolldown-runtime-BBjsoOtd.mjs → rolldown-runtime-782esTHO.mjs} +1 -2
- package/dist/.setup/{runtime-CNB4YGqJ.mjs → runtime-y_L8jPMH.mjs} +1 -2
- package/dist/.setup/{secret-contract-qg3NXRlS.mjs → secret-contract-H9g0kHHQ.mjs} +1 -2
- package/dist/.setup/{secret-contract-api-ChqAE2v-.mjs → secret-contract-api-CmBND3cW.mjs} +1 -1
- package/dist/.setup/{send-BLBZqBzq.mjs → send-3ye1gFt3.mjs} +7 -9
- package/dist/.setup/{slash-state-D55i54L4.mjs → slash-state-V13EaHX9.mjs} +13 -19
- package/dist/.source-module-urls/9b327bbbce22c2cbef393c115f9a63999afd57e223aad992389710cb3f1e29cc.json +1 -1
- package/dist/api.js +2 -2
- package/dist/channel-plugin-api.js +1 -1
- 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/index.js +1 -2
- package/dist/policy-api.js +1 -1
- package/dist/runtime-api.js +1 -1
- package/dist/secret-contract-api.js +1 -1
- package/dist/setup-entry.js +3 -4
- package/dist/slash-route-api.js +1 -1
- package/package.json +4 -4
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { asOptionalRecord, normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
2
|
-
|
|
2
|
+
// extensions/mattermost/src/mattermost/callback-host.ts
|
|
3
3
|
const DEFAULT_SLASH_CALLBACK_PATH = "/api/channels/mattermost/command";
|
|
4
4
|
function normalizeCallbackPath(value) {
|
|
5
5
|
const path = normalizeOptionalString(value) ?? DEFAULT_SLASH_CALLBACK_PATH;
|
|
@@ -30,5 +30,4 @@ function resolveCallbackHost(rawHost, trim = false) {
|
|
|
30
30
|
const host = rawHost && !isWildcardBindHost(rawHost) ? trim ? rawHost.trim() : rawHost : "localhost";
|
|
31
31
|
return host.includes(":") && !(host.startsWith("[") && host.endsWith("]")) ? `[${host}]` : host;
|
|
32
32
|
}
|
|
33
|
-
//#endregion
|
|
34
33
|
export { normalizeCallbackPath as n, resolveCallbackHost as r, collectMattermostCallbackPaths as t };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { t as mattermostPlugin, n as mattermostSetupPlugin } from "./channel-plugin-runtime-
|
|
1
|
+
export { t as mattermostPlugin, n as mattermostSetupPlugin } from "./channel-plugin-runtime-CLBgUA35.mjs";
|
|
2
2
|
import "../channel-plugin-api.js";
|
package/dist/.setup/{channel-plugin-runtime-DQaQ8YVa.mjs → channel-plugin-runtime-CLBgUA35.mjs}
RENAMED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { h as normalizeMattermostBaseUrl } from "./client-
|
|
2
|
-
import { t as mattermostIngressIdentity } from "./ingress-identity-
|
|
3
|
-
import { a as resolveMattermostPresentation, c as listMattermostAccountIds, d as resolveMattermostReplyToMode, i as requiresMattermostMediaUpload, l as resolveDefaultMattermostAccountId, n as normalizeMattermostMessagingTarget, o as inspectMattermostAccount, s as isMattermostConfigured$1, t as looksLikeMattermostTargetId, u as resolveMattermostAccount } from "./normalize-
|
|
4
|
-
import { t as resolveMattermostGatewayAuthBypassPaths } from "./gateway-auth-bypass-
|
|
5
|
-
import { n as normalizeCompatibilityConfig, t as legacyConfigRules } from "./doctor-contract-
|
|
6
|
-
import { n as collectRuntimeConfigAssignments, r as secretTargetRegistryEntries } from "./secret-contract-
|
|
1
|
+
import { h as normalizeMattermostBaseUrl } from "./client-VHp4VYIf.mjs";
|
|
2
|
+
import { t as mattermostIngressIdentity } from "./ingress-identity-CtHiOUDu.mjs";
|
|
3
|
+
import { a as resolveMattermostPresentation, c as listMattermostAccountIds, d as resolveMattermostReplyToMode, i as requiresMattermostMediaUpload, l as resolveDefaultMattermostAccountId, n as normalizeMattermostMessagingTarget, o as inspectMattermostAccount, s as isMattermostConfigured$1, t as looksLikeMattermostTargetId, u as resolveMattermostAccount } from "./normalize-C_DYEHki.mjs";
|
|
4
|
+
import { t as resolveMattermostGatewayAuthBypassPaths } from "./gateway-auth-bypass-DhWaV22L.mjs";
|
|
5
|
+
import { n as normalizeCompatibilityConfig, t as legacyConfigRules } from "./doctor-contract-i788N90j.mjs";
|
|
6
|
+
import { n as collectRuntimeConfigAssignments, r as secretTargetRegistryEntries } from "./secret-contract-H9g0kHHQ.mjs";
|
|
7
7
|
import { asOptionalRecord, normalizeLowercaseStringOrEmpty, normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
8
8
|
import { buildPassiveProbedChannelStatusSummary } from "openclaw/plugin-sdk/extension-shared";
|
|
9
9
|
import { z } from "zod";
|
|
@@ -32,7 +32,7 @@ import { ChannelImplicitMentionsSchema, ChannelPreviewStreamingConfigSchema, Cha
|
|
|
32
32
|
import { defineChannelSetupContract } from "openclaw/plugin-sdk/channel-setup";
|
|
33
33
|
import { applyAccountNameToChannelSection, applySetupAccountConfigPatch, baseUrlTextInput, createSetupTranslator, createStandardChannelSetupStatus, defineTokenCredential, formatDocsLink, migrateBaseNameToDefaultAccount, setSetupChannelEnabled } from "openclaw/plugin-sdk/setup";
|
|
34
34
|
import { createSetupInputPresenceValidator } from "openclaw/plugin-sdk/setup-runtime";
|
|
35
|
-
|
|
35
|
+
// extensions/mattermost/src/approval-auth.ts
|
|
36
36
|
const MATTERMOST_USER_ID_RE = /^[a-z0-9]{26}$/;
|
|
37
37
|
function normalizeMattermostApproverId(value) {
|
|
38
38
|
const normalized = String(value).trim().replace(/^(mattermost|user):/i, "").replace(/^@/, "");
|
|
@@ -49,8 +49,7 @@ const mattermostApprovalAuth = createChannelApprovalAuth({
|
|
|
49
49
|
},
|
|
50
50
|
normalizeApprover: normalizeMattermostApproverId
|
|
51
51
|
}).approvalAuth;
|
|
52
|
-
|
|
53
|
-
//#region extensions/mattermost/src/channel-config-shared.ts
|
|
52
|
+
// extensions/mattermost/src/channel-config-shared.ts
|
|
54
53
|
const mattermostMeta = {
|
|
55
54
|
id: "mattermost",
|
|
56
55
|
label: "Mattermost",
|
|
@@ -103,8 +102,7 @@ function describeMattermostAccount(account) {
|
|
|
103
102
|
}
|
|
104
103
|
});
|
|
105
104
|
}
|
|
106
|
-
|
|
107
|
-
//#region extensions/mattermost/src/channel-send-result.ts
|
|
105
|
+
// extensions/mattermost/src/channel-send-result.ts
|
|
108
106
|
function toMattermostOutboundResult(result) {
|
|
109
107
|
const { channelId, ...delivery } = result;
|
|
110
108
|
return {
|
|
@@ -120,8 +118,7 @@ function createMattermostDeliveryProgressReporter(onDeliveryResult) {
|
|
|
120
118
|
await onDeliveryResult(attachChannelToResult("mattermost", toMattermostOutboundResult(result)));
|
|
121
119
|
} : void 0;
|
|
122
120
|
}
|
|
123
|
-
|
|
124
|
-
//#region extensions/mattermost/src/config-schema-core.ts
|
|
121
|
+
// extensions/mattermost/src/config-schema-core.ts
|
|
125
122
|
const MattermostGroupSchema = buildGroupEntrySchema({ requireMentionInBotThreads: z.boolean().optional() }).omit({
|
|
126
123
|
tools: true,
|
|
127
124
|
toolsBySender: true,
|
|
@@ -235,8 +232,7 @@ const MattermostConfigSchema = buildMultiAccountChannelSchema(MattermostAccountS
|
|
|
235
232
|
});
|
|
236
233
|
}
|
|
237
234
|
});
|
|
238
|
-
|
|
239
|
-
//#region extensions/mattermost/src/config-ui-hints.ts
|
|
235
|
+
// extensions/mattermost/src/config-ui-hints.ts
|
|
240
236
|
const mattermostChannelConfigUiHints = {
|
|
241
237
|
"": {
|
|
242
238
|
label: "Mattermost",
|
|
@@ -265,11 +261,9 @@ const mattermostChannelConfigUiHints = {
|
|
|
265
261
|
progress: {}
|
|
266
262
|
})
|
|
267
263
|
};
|
|
268
|
-
|
|
269
|
-
//#region extensions/mattermost/src/config-surface.ts
|
|
264
|
+
// extensions/mattermost/src/config-surface.ts
|
|
270
265
|
const MattermostChannelConfigSchema = buildChannelConfigSchema(MattermostConfigSchema, { uiHints: mattermostChannelConfigUiHints });
|
|
271
|
-
|
|
272
|
-
//#region extensions/mattermost/src/setup-core.ts
|
|
266
|
+
// extensions/mattermost/src/setup-core.ts
|
|
273
267
|
const channel$1 = "mattermost";
|
|
274
268
|
function isMattermostConfigured(account) {
|
|
275
269
|
return (Boolean(account.botToken?.trim()) || hasConfiguredSecretInput(account.config.botToken)) && Boolean(account.baseUrl);
|
|
@@ -372,8 +366,7 @@ const mattermostSetupContract = defineChannelSetupContract({
|
|
|
372
366
|
},
|
|
373
367
|
legacyAdapter: mattermostSetupAdapter
|
|
374
368
|
});
|
|
375
|
-
|
|
376
|
-
//#region extensions/mattermost/src/setup-surface.ts
|
|
369
|
+
// extensions/mattermost/src/setup-surface.ts
|
|
377
370
|
const t = createSetupTranslator();
|
|
378
371
|
const channel = "mattermost";
|
|
379
372
|
const mattermostSetupWizard = {
|
|
@@ -460,8 +453,7 @@ const mattermostSetupWizard = {
|
|
|
460
453
|
})],
|
|
461
454
|
disable: (cfg) => setSetupChannelEnabled(cfg, channel, false)
|
|
462
455
|
};
|
|
463
|
-
|
|
464
|
-
//#region extensions/mattermost/src/channel.setup.ts
|
|
456
|
+
// extensions/mattermost/src/channel.setup.ts
|
|
465
457
|
const mattermostSetupPlugin = {
|
|
466
458
|
id: "mattermost",
|
|
467
459
|
meta: { ...mattermostMeta },
|
|
@@ -496,8 +488,7 @@ const mattermostSetupPlugin = {
|
|
|
496
488
|
setupContract: mattermostSetupContract,
|
|
497
489
|
setupWizard: mattermostSetupWizard
|
|
498
490
|
};
|
|
499
|
-
|
|
500
|
-
//#region extensions/mattermost/src/doctor.ts
|
|
491
|
+
// extensions/mattermost/src/doctor.ts
|
|
501
492
|
const isMattermostMutableAllowEntry = buildMutableAllowEntryDetector({ stableIdPattern: /^(?:(?:mattermost|user):)?@?[a-z0-9]{26}$/i });
|
|
502
493
|
const collectMattermostMutableAllowlistWarnings = createDangerousNameMatchingMutableAllowlistWarningCollector({
|
|
503
494
|
channel: "mattermost",
|
|
@@ -509,8 +500,7 @@ const mattermostDoctor = {
|
|
|
509
500
|
normalizeCompatibilityConfig,
|
|
510
501
|
collectMutableAllowlistWarnings: collectMattermostMutableAllowlistWarnings
|
|
511
502
|
};
|
|
512
|
-
|
|
513
|
-
//#region extensions/mattermost/src/group-mentions.ts
|
|
503
|
+
// extensions/mattermost/src/group-mentions.ts
|
|
514
504
|
function resolveMattermostGroupRequireMention(params) {
|
|
515
505
|
const account = resolveMattermostAccount({
|
|
516
506
|
cfg: params.cfg,
|
|
@@ -523,8 +513,7 @@ function resolveMattermostGroupRequireMention(params) {
|
|
|
523
513
|
overrideOrder: "after-config"
|
|
524
514
|
});
|
|
525
515
|
}
|
|
526
|
-
|
|
527
|
-
//#region extensions/mattermost/src/mattermost/emoji.ts
|
|
516
|
+
// extensions/mattermost/src/mattermost/emoji.ts
|
|
528
517
|
const MATTERMOST_EMOJI_SHORTNAME_BY_GLYPH = {
|
|
529
518
|
"✅": "white_check_mark",
|
|
530
519
|
"❌": "x",
|
|
@@ -578,8 +567,7 @@ function normalizeMattermostEmojiName(raw) {
|
|
|
578
567
|
if (!toneSuffix || !MATTERMOST_EMOJI_TONE_CAPABLE_NAMES.has(shortname)) return shortname;
|
|
579
568
|
return `${shortname}_${toneSuffix}`;
|
|
580
569
|
}
|
|
581
|
-
|
|
582
|
-
//#region extensions/mattermost/src/session-route.ts
|
|
570
|
+
// extensions/mattermost/src/session-route.ts
|
|
583
571
|
/**
|
|
584
572
|
* Reads the peer chat-kind already recorded for `peerId` in an agent session
|
|
585
573
|
* key. Agent session keys are
|
|
@@ -628,9 +616,8 @@ function resolveMattermostOutboundSessionRoute(params) {
|
|
|
628
616
|
canRecoverCurrentThread: ({ route }) => route.chatType !== "direct" || (params.cfg.session?.dmScope ?? "main") !== "main"
|
|
629
617
|
});
|
|
630
618
|
}
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
const loadMattermostChannelRuntime = createLazyRuntimeModule(() => import("./channel.runtime-Bl2oL5mO.mjs"));
|
|
619
|
+
// extensions/mattermost/src/channel.ts
|
|
620
|
+
const loadMattermostChannelRuntime = createLazyRuntimeModule(() => import("./channel.runtime-BBMzxlPB.mjs"));
|
|
634
621
|
const MATTERMOST_PRESENTATION_CAPABILITIES = {
|
|
635
622
|
supported: true,
|
|
636
623
|
buttons: true,
|
|
@@ -1102,7 +1089,7 @@ const mattermostPlugin = createChatChannelPlugin({
|
|
|
1102
1089
|
botTokenSource: account.botTokenSource
|
|
1103
1090
|
});
|
|
1104
1091
|
ctx.log?.info(`[${account.accountId}] starting channel`);
|
|
1105
|
-
return (await import("./monitor-
|
|
1092
|
+
return (await import("./monitor-agLGA4lV.mjs")).monitorMattermostProvider({
|
|
1106
1093
|
botToken: account.botToken ?? void 0,
|
|
1107
1094
|
baseUrl: account.baseUrl ?? void 0,
|
|
1108
1095
|
accountId: account.accountId,
|
|
@@ -1144,5 +1131,4 @@ const mattermostPlugin = createChatChannelPlugin({
|
|
|
1144
1131
|
security: mattermostSecurityAdapter,
|
|
1145
1132
|
outbound: mattermostOutbound
|
|
1146
1133
|
});
|
|
1147
|
-
//#endregion
|
|
1148
1134
|
export { mattermostSetupPlugin as n, mattermostPlugin as t };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { _ as readMattermostError, h as normalizeMattermostBaseUrl, l as fetchMattermostChannelPosts, r as createMattermostClient, s as fetchMattermostChannel, u as fetchMattermostMe } from "./client-
|
|
2
|
-
import {
|
|
3
|
-
import { c as listMattermostAccountIds, n as normalizeMattermostMessagingTarget, o as inspectMattermostAccount, u as resolveMattermostAccount } from "./normalize-
|
|
4
|
-
import { n as resolveMattermostOpaqueTarget, t as sendMessageMattermost } from "./send-
|
|
1
|
+
import { _ as readMattermostError, h as normalizeMattermostBaseUrl, l as fetchMattermostChannelPosts, r as createMattermostClient, s as fetchMattermostChannel, u as fetchMattermostMe } from "./client-VHp4VYIf.mjs";
|
|
2
|
+
import { s as resolveMattermostTrustedChatKind } from "./monitor-auth-0gZXtoHv.mjs";
|
|
3
|
+
import { c as listMattermostAccountIds, n as normalizeMattermostMessagingTarget, o as inspectMattermostAccount, u as resolveMattermostAccount } from "./normalize-C_DYEHki.mjs";
|
|
4
|
+
import { n as resolveMattermostOpaqueTarget, t as sendMessageMattermost } from "./send-3ye1gFt3.mjs";
|
|
5
5
|
import { normalizeLowercaseStringOrEmpty } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
6
6
|
import { runChannelProbe } from "openclaw/plugin-sdk/text-utility-runtime";
|
|
7
7
|
import { formatErrorMessage } from "openclaw/plugin-sdk/error-runtime";
|
|
@@ -10,7 +10,7 @@ import { readProviderJsonResponse } from "openclaw/plugin-sdk/provider-http";
|
|
|
10
10
|
import { fetchWithSsrFGuard, ssrfPolicyFromPrivateNetworkOptIn } from "openclaw/plugin-sdk/ssrf-runtime";
|
|
11
11
|
import { resolveAllowlistProviderRuntimeGroupPolicy } from "openclaw/plugin-sdk/runtime-group-policy";
|
|
12
12
|
import { normalizeAccountId } from "openclaw/plugin-sdk/account-id";
|
|
13
|
-
|
|
13
|
+
// extensions/mattermost/src/mattermost/directory.ts
|
|
14
14
|
/** Build the requested account client, or aggregate accounts for an explicitly unscoped lookup. */
|
|
15
15
|
function buildClients(params) {
|
|
16
16
|
const requestedAccountId = params.accountId?.trim();
|
|
@@ -129,8 +129,7 @@ async function listMattermostDirectoryPeers(params) {
|
|
|
129
129
|
return [];
|
|
130
130
|
}
|
|
131
131
|
}
|
|
132
|
-
|
|
133
|
-
//#region extensions/mattermost/src/mattermost/probe.ts
|
|
132
|
+
// extensions/mattermost/src/mattermost/probe.ts
|
|
134
133
|
async function probeMattermost(baseUrl, botToken, timeoutMs = 2500, allowPrivateNetwork = false) {
|
|
135
134
|
const normalized = normalizeMattermostBaseUrl(baseUrl);
|
|
136
135
|
if (!normalized) return {
|
|
@@ -175,8 +174,7 @@ async function probeMattermost(baseUrl, botToken, timeoutMs = 2500, allowPrivate
|
|
|
175
174
|
error: formatErrorMessage(error)
|
|
176
175
|
}));
|
|
177
176
|
}
|
|
178
|
-
|
|
179
|
-
//#region extensions/mattermost/src/mattermost/reactions.ts
|
|
177
|
+
// extensions/mattermost/src/mattermost/reactions.ts
|
|
180
178
|
const BOT_USER_CACHE_TTL_MS = 6e5;
|
|
181
179
|
const botUserIdCache = /* @__PURE__ */ new Map();
|
|
182
180
|
async function resolveBotUserId(client, cacheKey) {
|
|
@@ -289,8 +287,7 @@ async function runMattermostReaction(params, action) {
|
|
|
289
287
|
}
|
|
290
288
|
return { ok: true };
|
|
291
289
|
}
|
|
292
|
-
|
|
293
|
-
//#region extensions/mattermost/src/mattermost/read.ts
|
|
290
|
+
// extensions/mattermost/src/mattermost/read.ts
|
|
294
291
|
function parseMattermostChannelTarget(rawTarget) {
|
|
295
292
|
const normalized = normalizeMattermostMessagingTarget(rawTarget);
|
|
296
293
|
if (normalized?.startsWith("channel:")) return normalized.slice(8).trim() || void 0;
|
|
@@ -350,5 +347,4 @@ async function readMattermostMessages(params) {
|
|
|
350
347
|
after: params.after
|
|
351
348
|
});
|
|
352
349
|
}
|
|
353
|
-
//#endregion
|
|
354
350
|
export { addMattermostReaction, listMattermostDirectoryGroups, listMattermostDirectoryPeers, probeMattermost, readMattermostMessages, removeMattermostReaction, resolveMattermostOpaqueTarget, sendMessageMattermost };
|
|
@@ -10,7 +10,7 @@ import { readResponseTextPrefix, readResponseWithLimit } from "openclaw/plugin-s
|
|
|
10
10
|
import { retryAsync } from "openclaw/plugin-sdk/retry-runtime";
|
|
11
11
|
import { fetchWithSsrFGuard, ssrfPolicyFromPrivateNetworkOptIn } from "openclaw/plugin-sdk/ssrf-runtime";
|
|
12
12
|
import { z } from "zod";
|
|
13
|
-
|
|
13
|
+
// extensions/mattermost/src/mattermost/client.ts
|
|
14
14
|
const MATTERMOST_ERROR_BODY_LIMIT_BYTES = 8192;
|
|
15
15
|
const MATTERMOST_REQUEST_TIMEOUT_MS = 3e4;
|
|
16
16
|
const MATTERMOST_TEXT_RESPONSE_LIMIT_BYTES = 65536;
|
|
@@ -216,6 +216,7 @@ async function fetchMattermostChannelPosts(client, channelId, options = {}) {
|
|
|
216
216
|
const query = new URLSearchParams({ per_page: String(perPage) });
|
|
217
217
|
if (before) query.set("before", before);
|
|
218
218
|
if (after) query.set("after", after);
|
|
219
|
+
if (options.skipFetchThreads) query.set("skipFetchThreads", "true");
|
|
219
220
|
const response = await client.request(`/channels/${encodeURIComponent(channelId)}/posts?${query.toString()}`);
|
|
220
221
|
const parsed = MattermostPostListSchema.safeParse(response);
|
|
221
222
|
if (!parsed.success || parsed.data.order.some((postId) => !parsed.data.posts[postId])) throw new Error("Unexpected Mattermost channel posts response.");
|
|
@@ -392,5 +393,4 @@ async function uploadMattermostFile(client, params) {
|
|
|
392
393
|
if (!info?.id) throw new Error("Mattermost file upload failed");
|
|
393
394
|
return info;
|
|
394
395
|
}
|
|
395
|
-
//#endregion
|
|
396
396
|
export { readMattermostError as _, createMattermostPost as a, uploadMattermostFile as b, fetchMattermostChannelByName as c, fetchMattermostUser as d, fetchMattermostUserByUsername as f, parseMattermostApiStatus as g, normalizeMattermostBaseUrl as h, createMattermostDirectChannelWithRetry as i, fetchMattermostChannelPosts as l, isRetryableError 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,5 +1,5 @@
|
|
|
1
|
-
import { n as __reExport, t as __exportAll } from "./rolldown-runtime-
|
|
2
|
-
|
|
1
|
+
import { n as __reExport, t as __exportAll } from "./rolldown-runtime-782esTHO.mjs";
|
|
2
|
+
// packages/normalization-core/src/record-coerce.ts
|
|
3
3
|
/** Type guard for non-array object records at browser-safe boundaries. */
|
|
4
4
|
function isRecord(value) {
|
|
5
5
|
return value !== null && typeof value === "object" && !Array.isArray(value);
|
|
@@ -8,8 +8,7 @@ function isRecord(value) {
|
|
|
8
8
|
function asNullableRecord(value) {
|
|
9
9
|
return isRecord(value) ? value : null;
|
|
10
10
|
}
|
|
11
|
-
|
|
12
|
-
//#region src/config/channel-config-normalization.ts
|
|
11
|
+
// src/config/channel-config-normalization.ts
|
|
13
12
|
/** Applies one channel-specific doctor migration to every object-shaped account. */
|
|
14
13
|
function normalizeChannelAccounts(params) {
|
|
15
14
|
const rawAccounts = asNullableRecord(params.entry.accounts);
|
|
@@ -85,8 +84,7 @@ function normalizeChannelConfigEntries(params) {
|
|
|
85
84
|
changes
|
|
86
85
|
};
|
|
87
86
|
}
|
|
88
|
-
|
|
89
|
-
//#region src/plugin-sdk/legacy-webhook-listener-migration.ts
|
|
87
|
+
// src/plugin-sdk/legacy-webhook-listener-migration.ts
|
|
90
88
|
/** Preserve explicitly configured webhook listeners while moving ingress onto Gateway routes. */
|
|
91
89
|
function createLegacyWebhookListenerDoctorContract(params) {
|
|
92
90
|
const portKey = params.portKey ?? "webhookPort";
|
|
@@ -156,17 +154,14 @@ function createLegacyWebhookListenerDoctorContract(params) {
|
|
|
156
154
|
}
|
|
157
155
|
};
|
|
158
156
|
}
|
|
159
|
-
|
|
160
|
-
//#region \0openclaw:bundled-sdk:openclaw/plugin-sdk/runtime-doctor-migrations
|
|
157
|
+
// \0openclaw:bundled-sdk:openclaw/plugin-sdk/runtime-doctor-migrations
|
|
161
158
|
var runtime_doctor_migrations_exports = /* @__PURE__ */ __exportAll({ createLegacyWebhookListenerDoctorContract: () => createLegacyWebhookListenerDoctorContract });
|
|
162
159
|
import * as import_openclaw_plugin_sdk_runtime_doctor_migrations from "openclaw/plugin-sdk/runtime-doctor-migrations";
|
|
163
160
|
__reExport(runtime_doctor_migrations_exports, import_openclaw_plugin_sdk_runtime_doctor_migrations);
|
|
164
|
-
|
|
165
|
-
//#region extensions/mattermost/src/doctor-contract.ts
|
|
161
|
+
// extensions/mattermost/src/doctor-contract.ts
|
|
166
162
|
const { legacyConfigRules, normalizeChannelConfig: normalizeCompatibilityConfig } = (0, runtime_doctor_migrations_exports.defineChannelAliasMigration)({
|
|
167
163
|
channelId: "mattermost",
|
|
168
164
|
streaming: { defaultMode: "partial" },
|
|
169
165
|
accountStreamingReplacesRoot: true
|
|
170
166
|
});
|
|
171
|
-
//#endregion
|
|
172
167
|
export { normalizeCompatibilityConfig as n, legacyConfigRules as t };
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import { t as collectMattermostCallbackPaths } from "./callback-host-
|
|
2
|
-
|
|
1
|
+
import { t as collectMattermostCallbackPaths } from "./callback-host-CRQTeNn9.mjs";
|
|
2
|
+
// extensions/mattermost/src/gateway-auth-bypass.ts
|
|
3
3
|
function resolveMattermostGatewayAuthBypassPaths(params) {
|
|
4
4
|
return collectMattermostCallbackPaths(params.cfg.channels?.mattermost).filter((path) => path.startsWith("/api/channels/mattermost/"));
|
|
5
5
|
}
|
|
6
|
-
//#endregion
|
|
7
6
|
export { resolveMattermostGatewayAuthBypassPaths as t };
|
|
@@ -22,5 +22,4 @@ function normalizeMattermostAllowEntry(entry) {
|
|
|
22
22
|
if (accessGroupName) return `accessGroup:${accessGroupName}`;
|
|
23
23
|
return normalizeLowercaseStringOrEmpty(trimmed.replace(/^(mattermost|user):/i, "").replace(/^@/, ""));
|
|
24
24
|
}
|
|
25
|
-
//#endregion
|
|
26
25
|
export { normalizeMattermostAllowEntry as n, mattermostIngressIdentity as t };
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { n as __reExport, t as __exportAll } from "./rolldown-runtime-
|
|
2
|
-
import { t as getMattermostRuntime } from "./runtime-
|
|
3
|
-
import { r as resolveCallbackHost } from "./callback-host-
|
|
4
|
-
import { y as updateMattermostPost } from "./client-
|
|
5
|
-
import {
|
|
1
|
+
import { n as __reExport, t as __exportAll } from "./rolldown-runtime-782esTHO.mjs";
|
|
2
|
+
import { t as getMattermostRuntime } from "./runtime-y_L8jPMH.mjs";
|
|
3
|
+
import { r as resolveCallbackHost } from "./callback-host-CRQTeNn9.mjs";
|
|
4
|
+
import { y as updateMattermostPost } from "./client-VHp4VYIf.mjs";
|
|
5
|
+
import { E as resolveClientIp, O as sendHttpRequestRejection, S as readRequestBodyWithLimit, _ as isTrustedProxyAddress, g as isRequestBodyLimitError } from "./monitor-auth-0gZXtoHv.mjs";
|
|
6
6
|
import { createHmac } from "node:crypto";
|
|
7
7
|
import { safeEqualSecret } from "openclaw/plugin-sdk/security-runtime";
|
|
8
8
|
import { normalizeOptionalString, normalizeStringifiedOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
9
9
|
import { safeParseJson } from "openclaw/plugin-sdk/text-utility-runtime";
|
|
10
|
-
|
|
10
|
+
// src/gateway/gateway-http-route-contracts.ts
|
|
11
11
|
const GATEWAY_PROBE_ROUTES = /* @__PURE__ */ new Map([
|
|
12
12
|
["/health", "live"],
|
|
13
13
|
["/healthz", "live"],
|
|
@@ -23,8 +23,7 @@ function classifyGatewayProbePath(pathname) {
|
|
|
23
23
|
}
|
|
24
24
|
return "outside";
|
|
25
25
|
}
|
|
26
|
-
|
|
27
|
-
//#region packages/normalization-core/src/string-coerce.ts
|
|
26
|
+
// packages/normalization-core/src/string-coerce.ts
|
|
28
27
|
/** Trims string input and returns null for non-strings or empty strings. */
|
|
29
28
|
function normalizeNullableString(value) {
|
|
30
29
|
if (typeof value !== "string") return null;
|
|
@@ -43,13 +42,11 @@ function normalizeOptionalLowercaseString(value) {
|
|
|
43
42
|
function normalizeLowercaseStringOrEmpty$1(value) {
|
|
44
43
|
return normalizeOptionalLowercaseString(value) ?? "";
|
|
45
44
|
}
|
|
46
|
-
|
|
47
|
-
//#region src/plugins/http-path-prefix.ts
|
|
45
|
+
// src/plugins/http-path-prefix.ts
|
|
48
46
|
function prefixMatchPath(pathname, prefix) {
|
|
49
47
|
return pathname === prefix || pathname.startsWith(`${prefix}/`) || pathname.startsWith(`${prefix}%`);
|
|
50
48
|
}
|
|
51
|
-
|
|
52
|
-
//#region src/gateway/security-path.ts
|
|
49
|
+
// src/gateway/security-path.ts
|
|
53
50
|
const MAX_PATH_DECODE_PASSES = 32;
|
|
54
51
|
function normalizePathSeparators(pathname) {
|
|
55
52
|
const collapsed = pathname.replace(/\/{2,}/g, "/");
|
|
@@ -102,8 +99,7 @@ function canonicalizePathForSecurity(pathname) {
|
|
|
102
99
|
};
|
|
103
100
|
}
|
|
104
101
|
const PROTECTED_PLUGIN_ROUTE_PREFIXES = ["/api/channels"];
|
|
105
|
-
|
|
106
|
-
//#region src/gateway/server/plugins-http/path-context.ts
|
|
102
|
+
// src/gateway/server/plugins-http/path-context.ts
|
|
107
103
|
function normalizeProtectedPrefix(prefix) {
|
|
108
104
|
const collapsed = normalizeLowercaseStringOrEmpty$1(prefix).replace(/\/{2,}/g, "/");
|
|
109
105
|
if (collapsed.length <= 1) return collapsed || "/";
|
|
@@ -129,8 +125,7 @@ function resolvePluginRoutePathContext(pathname) {
|
|
|
129
125
|
rawNormalizedPath: canonical.rawNormalizedPath
|
|
130
126
|
};
|
|
131
127
|
}
|
|
132
|
-
|
|
133
|
-
//#region \0openclaw:bundled-sdk:openclaw/plugin-sdk/gateway-config-runtime
|
|
128
|
+
// \0openclaw:bundled-sdk:openclaw/plugin-sdk/gateway-config-runtime
|
|
134
129
|
var gateway_config_runtime_exports = /* @__PURE__ */ __exportAll({
|
|
135
130
|
classifyGatewayProbePath: () => classifyGatewayProbePath,
|
|
136
131
|
isProtectedPluginRoutePathFromContext: () => isProtectedPluginRoutePathFromContext,
|
|
@@ -138,8 +133,7 @@ var gateway_config_runtime_exports = /* @__PURE__ */ __exportAll({
|
|
|
138
133
|
});
|
|
139
134
|
import * as import_openclaw_plugin_sdk_gateway_config_runtime from "openclaw/plugin-sdk/gateway-config-runtime";
|
|
140
135
|
__reExport(gateway_config_runtime_exports, import_openclaw_plugin_sdk_gateway_config_runtime);
|
|
141
|
-
|
|
142
|
-
//#region extensions/mattermost/src/mattermost/interactions.ts
|
|
136
|
+
// extensions/mattermost/src/mattermost/interactions.ts
|
|
143
137
|
const INTERACTION_MAX_BODY_BYTES = 65536;
|
|
144
138
|
const INTERACTION_BODY_TIMEOUT_MS = 1e4;
|
|
145
139
|
const SIGNED_CHANNEL_ID_CONTEXT_KEY = "__openclaw_channel_id";
|
|
@@ -452,5 +446,4 @@ function createMattermostInteractionHandler(params) {
|
|
|
452
446
|
}
|
|
453
447
|
};
|
|
454
448
|
}
|
|
455
|
-
//#endregion
|
|
456
449
|
export { resolveInteractionCallbackPath as a, setInteractionSecret as c, createMattermostInteractionHandler as i, gateway_config_runtime_exports as l, buildButtonProps as n, resolveInteractionCallbackUrl as o, computeInteractionCallbackUrl as r, setInteractionCallbackUrl as s, buildButtonAttachments as t };
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { a as resolveInteractionCallbackPath, c as setInteractionSecret, i as createMattermostInteractionHandler, l as gateway_config_runtime_exports, n as buildButtonProps, r as computeInteractionCallbackUrl, s as setInteractionCallbackUrl } from "./interactions-
|
|
2
|
-
import { n as getOptionalMattermostRuntime, t as getMattermostRuntime } from "./runtime-
|
|
3
|
-
import { a as createMattermostPost, d as fetchMattermostUser, h as normalizeMattermostBaseUrl, m as isRetryableError, n as buildMattermostApiUrl, o as deleteMattermostPost, p as fetchMattermostUserTeams, r as createMattermostClient, s as fetchMattermostChannel, t as MattermostPostSchema, u as fetchMattermostMe, v as sendMattermostTyping, y as updateMattermostPost } from "./client-
|
|
4
|
-
import { C as
|
|
5
|
-
import { n as normalizeMattermostAllowEntry } from "./ingress-identity-
|
|
6
|
-
import { d as resolveMattermostReplyToMode, r as parseMattermostQuestionContext, u as resolveMattermostAccount } from "./normalize-
|
|
7
|
-
import { _ as resolveSlashCommandConfig, a as deliverMattermostReplyPayload, c as parseMattermostModelPickerContext, d as resolveMattermostModelPickerCurrentModel, f as DEFAULT_COMMAND_SPECS, g as resolveCallbackUrl, h as registerSlashCommands, l as renderMattermostModelsPickerView, m as isSlashCommandsEnabled, n as deactivateSlashCommands, o as joinMattermostVisibleContent, p as cleanupSlashCommands, r as getSlashCommandState, s as buildMattermostAllowedModelRefs, t as activateSlashCommands, u as renderMattermostProviderPickerView } from "./slash-state-
|
|
8
|
-
import { t as sendMessageMattermost } from "./send-
|
|
1
|
+
import { a as resolveInteractionCallbackPath, c as setInteractionSecret, i as createMattermostInteractionHandler, l as gateway_config_runtime_exports, n as buildButtonProps, r as computeInteractionCallbackUrl, s as setInteractionCallbackUrl } from "./interactions-7eWssSf1.mjs";
|
|
2
|
+
import { n as getOptionalMattermostRuntime, t as getMattermostRuntime } from "./runtime-y_L8jPMH.mjs";
|
|
3
|
+
import { a as createMattermostPost, d as fetchMattermostUser, h as normalizeMattermostBaseUrl, l as fetchMattermostChannelPosts, m as isRetryableError, n as buildMattermostApiUrl, o as deleteMattermostPost, p as fetchMattermostUserTeams, r as createMattermostClient, s as fetchMattermostChannel, t as MattermostPostSchema, u as fetchMattermostMe, v as sendMattermostTyping, y as updateMattermostPost } from "./client-VHp4VYIf.mjs";
|
|
4
|
+
import { C as registerPluginHttpRoute, D as resolveDefaultGroupPolicy, T as resolveChannelMediaMaxBytes, b as logTypingFailure, c as shouldRetainMattermostSenderHistory, d as createChannelHistoryWindow, f as createChannelMessageReplyPipeline, h as isDangerousNameMatchingEnabled, k as warnMissingProviderGroupPolicyFallbackOnce, l as DEFAULT_GROUP_HISTORY_LIMIT, n as authorizeMattermostCommandInvocation, o as resolveMattermostMonitorInboundAccess, p as createChannelPairingController, r as formatMattermostDirectMessageDropLog, s as resolveMattermostTrustedChatKind, t as MATTERMOST_PAIRING_QUEUE_FULL_TEXT, u as buildPreparedModelsProviderData, w as resolveAllowlistProviderRuntimeGroupPolicy, x as prepareSkillCommandsForAgents, y as logInboundDrop } from "./monitor-auth-0gZXtoHv.mjs";
|
|
5
|
+
import { n as normalizeMattermostAllowEntry } from "./ingress-identity-CtHiOUDu.mjs";
|
|
6
|
+
import { d as resolveMattermostReplyToMode, r as parseMattermostQuestionContext, u as resolveMattermostAccount } from "./normalize-C_DYEHki.mjs";
|
|
7
|
+
import { _ as resolveSlashCommandConfig, a as deliverMattermostReplyPayload, c as parseMattermostModelPickerContext, d as resolveMattermostModelPickerCurrentModel, f as DEFAULT_COMMAND_SPECS, g as resolveCallbackUrl, h as registerSlashCommands, l as renderMattermostModelsPickerView, m as isSlashCommandsEnabled, n as deactivateSlashCommands, o as joinMattermostVisibleContent, p as cleanupSlashCommands, r as getSlashCommandState, s as buildMattermostAllowedModelRefs, t as activateSlashCommands, u as renderMattermostProviderPickerView } from "./slash-state-V13EaHX9.mjs";
|
|
8
|
+
import { t as sendMessageMattermost } from "./send-3ye1gFt3.mjs";
|
|
9
9
|
import { randomUUID } from "node:crypto";
|
|
10
10
|
import { resolvePinnedMainDmOwnerFromAllowlist, sanitizeUntrustedFileName } from "openclaw/plugin-sdk/security-runtime";
|
|
11
11
|
import { normalizeLowercaseStringOrEmpty, normalizeOptionalString, normalizeStringEntries, normalizeTrimmedStringList, uniqueStrings } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
@@ -39,7 +39,7 @@ import { chunkMarkdownTextWithMode } from "openclaw/plugin-sdk/reply-chunking";
|
|
|
39
39
|
import { createPersistentDedupeCache } from "openclaw/plugin-sdk/dedupe-runtime";
|
|
40
40
|
import { createPluginStateErrorReporter } from "openclaw/plugin-sdk/plugin-state-runtime";
|
|
41
41
|
import { setTimeout as setTimeout$1 } from "node:timers/promises";
|
|
42
|
-
|
|
42
|
+
// extensions/mattermost/src/mattermost/monitor-helpers.ts
|
|
43
43
|
function buildMattermostBotMentionPattern(username) {
|
|
44
44
|
return `(?<![a-z0-9_])@${escapeRegExp(username)}(?![a-z0-9_]|[.:-]+[a-z0-9_])`;
|
|
45
45
|
}
|
|
@@ -78,8 +78,7 @@ function shouldDropEmptyMattermostBody(params) {
|
|
|
78
78
|
const bareMention = params.rawText.match(/^[ \t]*(@\S+)[ \t]*$/u)?.[1];
|
|
79
79
|
return !botUsername || normalizeLowercaseStringOrEmpty(bareMention) !== `@${botUsername}`;
|
|
80
80
|
}
|
|
81
|
-
|
|
82
|
-
//#region extensions/mattermost/src/mattermost/monitor-websocket.ts
|
|
81
|
+
// extensions/mattermost/src/mattermost/monitor-websocket.ts
|
|
83
82
|
const MATTERMOST_WEBSOCKET_MAX_PAYLOAD_BYTES = 16777216;
|
|
84
83
|
const MATTERMOST_WEBSOCKET_HANDSHAKE_TIMEOUT_MS = 3e4;
|
|
85
84
|
const MATTERMOST_WEBSOCKET_AUTH_TIMEOUT_MS = 3e4;
|
|
@@ -349,8 +348,7 @@ function createMattermostConnectOnce(opts) {
|
|
|
349
348
|
}
|
|
350
349
|
};
|
|
351
350
|
}
|
|
352
|
-
|
|
353
|
-
//#region extensions/mattermost/src/mattermost/monitor-ingress.ts
|
|
351
|
+
// extensions/mattermost/src/mattermost/monitor-ingress.ts
|
|
354
352
|
const MATTERMOST_INGRESS_PAYLOAD_VERSION = 1;
|
|
355
353
|
const MATTERMOST_INGRESS_POLL_INTERVAL_MS = 1e3;
|
|
356
354
|
const MattermostIngressPermanentError = createChannelIngressError("MattermostIngressPermanentError", { withReason: true });
|
|
@@ -466,8 +464,7 @@ function createMattermostIngressMonitor(options) {
|
|
|
466
464
|
waitForIdle: monitor.waitForIdle
|
|
467
465
|
};
|
|
468
466
|
}
|
|
469
|
-
|
|
470
|
-
//#region extensions/mattermost/src/mattermost/monitor-context.ts
|
|
467
|
+
// extensions/mattermost/src/mattermost/monitor-context.ts
|
|
471
468
|
function shouldUpdateMattermostDraftToolProgress(account) {
|
|
472
469
|
return account.streamingMode !== "off" && resolveChannelStreamingPreviewToolProgress(account.config, account.streamingMode !== "progress", account.streamingMode);
|
|
473
470
|
}
|
|
@@ -530,8 +527,7 @@ function resolveMattermostPendingHistoryKey(params) {
|
|
|
530
527
|
function resolveMattermostReactionChannelId(payload) {
|
|
531
528
|
return normalizeOptionalString(payload.broadcast?.channel_id) ?? normalizeOptionalString(payload.data?.channel_id);
|
|
532
529
|
}
|
|
533
|
-
|
|
534
|
-
//#region extensions/mattermost/src/mattermost/monitor-event-plan.ts
|
|
530
|
+
// extensions/mattermost/src/mattermost/monitor-event-plan.ts
|
|
535
531
|
async function buildMattermostEventPlan(monitor, params) {
|
|
536
532
|
const channelInfo = params.channelInfo ?? await monitor.resources.resolveChannelInfo(params.channelId);
|
|
537
533
|
const channelType = channelInfo?.type?.trim() || params.channelTypeFallback?.trim();
|
|
@@ -562,6 +558,7 @@ async function buildMattermostEventPlan(monitor, params) {
|
|
|
562
558
|
threadRootId: params.threadRootId
|
|
563
559
|
});
|
|
564
560
|
const to = kind === "direct" ? `user:${params.senderId}` : `channel:${params.channelId}`;
|
|
561
|
+
const from = kind === "direct" ? `mattermost:${params.senderId}` : kind === "group" ? `mattermost:group:${params.channelId}` : `mattermost:channel:${params.channelId}`;
|
|
565
562
|
return {
|
|
566
563
|
channelId: params.channelId,
|
|
567
564
|
senderId: params.senderId,
|
|
@@ -574,9 +571,10 @@ async function buildMattermostEventPlan(monitor, params) {
|
|
|
574
571
|
route,
|
|
575
572
|
thread,
|
|
576
573
|
to,
|
|
574
|
+
from,
|
|
577
575
|
finalizeContext: (context) => finalizeInboundContext({
|
|
578
576
|
...context,
|
|
579
|
-
From:
|
|
577
|
+
From: from,
|
|
580
578
|
To: to,
|
|
581
579
|
SessionKey: thread.sessionKey,
|
|
582
580
|
DmScope: route.dmScope,
|
|
@@ -619,8 +617,7 @@ async function buildMattermostEventPlan(monitor, params) {
|
|
|
619
617
|
})
|
|
620
618
|
};
|
|
621
619
|
}
|
|
622
|
-
|
|
623
|
-
//#region extensions/mattermost/src/mattermost/monitor-interaction-dispatch.ts
|
|
620
|
+
// extensions/mattermost/src/mattermost/monitor-interaction-dispatch.ts
|
|
624
621
|
async function dispatchMattermostInteractionReply(monitor, eventPlan, params) {
|
|
625
622
|
const { account, cfg, core, runtime } = monitor;
|
|
626
623
|
const { channelId, kind, route, thread, to } = eventPlan;
|
|
@@ -673,8 +670,7 @@ async function dispatchMattermostInteractionReply(monitor, eventPlan, params) {
|
|
|
673
670
|
replyOptions
|
|
674
671
|
});
|
|
675
672
|
}
|
|
676
|
-
|
|
677
|
-
//#region extensions/mattermost/src/mattermost/monitor-interactions.ts
|
|
673
|
+
// extensions/mattermost/src/mattermost/monitor-interactions.ts
|
|
678
674
|
/**
|
|
679
675
|
* Answer an ask_user question from the button its own prompt offered.
|
|
680
676
|
*
|
|
@@ -823,8 +819,7 @@ function registerMattermostInteractions(params) {
|
|
|
823
819
|
throwOnFailure: true
|
|
824
820
|
});
|
|
825
821
|
}
|
|
826
|
-
|
|
827
|
-
//#region extensions/mattermost/src/mattermost/monitor-model-picker.ts
|
|
822
|
+
// extensions/mattermost/src/mattermost/monitor-model-picker.ts
|
|
828
823
|
function createMattermostModelPickerInteractionHandler(monitor) {
|
|
829
824
|
const { account, cfg, core, pairing, resources, runtime } = monitor;
|
|
830
825
|
const { resolveChannelInfo, updateModelPickerPost } = resources;
|
|
@@ -855,11 +850,11 @@ function createMattermostModelPickerInteractionHandler(monitor) {
|
|
|
855
850
|
id: params.payload.user_id,
|
|
856
851
|
meta: { name: params.userName }
|
|
857
852
|
});
|
|
858
|
-
return { ephemeral_text: core.channel.pairing.buildPairingReply({
|
|
853
|
+
return { ephemeral_text: code ? core.channel.pairing.buildPairingReply({
|
|
859
854
|
channel: "mattermost",
|
|
860
855
|
idLine: `Your Mattermost user id: ${params.payload.user_id}`,
|
|
861
856
|
code
|
|
862
|
-
}) };
|
|
857
|
+
}) : MATTERMOST_PAIRING_QUEUE_FULL_TEXT };
|
|
863
858
|
}
|
|
864
859
|
return { ephemeral_text: auth.denyReason === "unknown-channel" ? "Temporary error: unable to determine channel type. Please try again." : auth.denyReason === "dm-disabled" ? "This bot is not accepting direct messages." : auth.denyReason === "channels-disabled" ? "Model picker actions are disabled in channels." : auth.denyReason === "channel-no-allowlist" ? "Model picker actions are not configured for this channel." : "Unauthorized." };
|
|
865
860
|
}
|
|
@@ -988,8 +983,7 @@ function createMattermostModelPickerInteractionHandler(monitor) {
|
|
|
988
983
|
return {};
|
|
989
984
|
};
|
|
990
985
|
}
|
|
991
|
-
|
|
992
|
-
//#region src/channels/mention-gating.ts
|
|
986
|
+
// src/channels/mention-gating.ts
|
|
993
987
|
function resolveBotThreadMentionPolicy(params) {
|
|
994
988
|
if (!params.isBotOwnedThread || params.requireMentionInBotThreads === void 0) return {
|
|
995
989
|
requireMention: params.requireMention,
|
|
@@ -1000,8 +994,7 @@ function resolveBotThreadMentionPolicy(params) {
|
|
|
1000
994
|
implicitMentionKinds: params.requireMentionInBotThreads ? params.implicitMentionKinds?.filter((kind) => kind === "native") : params.implicitMentionKinds
|
|
1001
995
|
};
|
|
1002
996
|
}
|
|
1003
|
-
|
|
1004
|
-
//#region extensions/mattermost/src/mattermost/monitor-activation.ts
|
|
997
|
+
// extensions/mattermost/src/mattermost/monitor-activation.ts
|
|
1005
998
|
function resolveMattermostInboundMentionDecision(params) {
|
|
1006
999
|
const implicitMentions = resolveChannelImplicitMentions({
|
|
1007
1000
|
cfg: params.cfg,
|
|
@@ -1024,8 +1017,7 @@ function resolveMattermostInboundMentionDecision(params) {
|
|
|
1024
1017
|
}
|
|
1025
1018
|
});
|
|
1026
1019
|
}
|
|
1027
|
-
|
|
1028
|
-
//#region extensions/mattermost/src/mattermost/monitor-onchar.ts
|
|
1020
|
+
// extensions/mattermost/src/mattermost/monitor-onchar.ts
|
|
1029
1021
|
const DEFAULT_ONCHAR_PREFIXES = [">", "!"];
|
|
1030
1022
|
function resolveOncharPrefixes(prefixes) {
|
|
1031
1023
|
const cleaned = prefixes ? normalizeStringEntries(prefixes) : DEFAULT_ONCHAR_PREFIXES;
|
|
@@ -1045,8 +1037,7 @@ function stripOncharPrefix(text, prefixes) {
|
|
|
1045
1037
|
stripped: text
|
|
1046
1038
|
};
|
|
1047
1039
|
}
|
|
1048
|
-
|
|
1049
|
-
//#region extensions/mattermost/src/mattermost/monitor-resources.ts
|
|
1040
|
+
// extensions/mattermost/src/mattermost/monitor-resources.ts
|
|
1050
1041
|
function formatMattermostPendingMediaText(params) {
|
|
1051
1042
|
return [params.body, formatMediaPlaceholderText(params.media)].filter(Boolean).join("\n").trim();
|
|
1052
1043
|
}
|
|
@@ -1180,8 +1171,7 @@ function createMattermostMonitorResources(params) {
|
|
|
1180
1171
|
updateModelPickerPost
|
|
1181
1172
|
};
|
|
1182
1173
|
}
|
|
1183
|
-
|
|
1184
|
-
//#region extensions/mattermost/src/mattermost/monitor-thread-backfill.ts
|
|
1174
|
+
// extensions/mattermost/src/mattermost/monitor-thread-backfill.ts
|
|
1185
1175
|
const TIMEOUT_MS = 5e3;
|
|
1186
1176
|
const COOLDOWN_MS = 6e4;
|
|
1187
1177
|
const MAX_ATTEMPTS = 3;
|
|
@@ -1361,8 +1351,7 @@ function createMattermostThreadBackfill(params) {
|
|
|
1361
1351
|
return { history: await owner.completion };
|
|
1362
1352
|
};
|
|
1363
1353
|
}
|
|
1364
|
-
|
|
1365
|
-
//#region extensions/mattermost/src/mattermost/draft-stream.ts
|
|
1354
|
+
// extensions/mattermost/src/mattermost/draft-stream.ts
|
|
1366
1355
|
const MATTERMOST_STREAM_MAX_CHARS = 4e3;
|
|
1367
1356
|
const DEFAULT_THROTTLE_MS = 1e3;
|
|
1368
1357
|
function normalizeMattermostDraftText(text, maxChars) {
|
|
@@ -1434,6 +1423,7 @@ function createMattermostDraftStream(params) {
|
|
|
1434
1423
|
};
|
|
1435
1424
|
const { loop, update: updateLifecycle, stop: stopLifecycle, stopForClear, clearWithStop, seal: sealLifecycle } = createFinalizableDraftLifecycle({
|
|
1436
1425
|
throttleMs,
|
|
1426
|
+
coalesceInFlight: true,
|
|
1437
1427
|
state: streamState,
|
|
1438
1428
|
sendOrEditStreamMessage,
|
|
1439
1429
|
readMessageId: () => currentGeneration.postId,
|
|
@@ -1614,6 +1604,14 @@ function createMattermostDraftStream(params) {
|
|
|
1614
1604
|
publishedParts
|
|
1615
1605
|
};
|
|
1616
1606
|
};
|
|
1607
|
+
const findPostAfter = async (postId) => {
|
|
1608
|
+
const { messages } = await fetchMattermostChannelPosts(params.client, params.channelId, {
|
|
1609
|
+
after: postId,
|
|
1610
|
+
limit: 200,
|
|
1611
|
+
skipFetchThreads: true
|
|
1612
|
+
});
|
|
1613
|
+
return messages.find((post) => !post.type?.startsWith("system_") && (!params.rootId || post.root_id === params.rootId))?.id;
|
|
1614
|
+
};
|
|
1617
1615
|
params.log?.(`mattermost stream preview ready (maxChars=${maxChars}, throttleMs=${throttleMs})`);
|
|
1618
1616
|
return {
|
|
1619
1617
|
update,
|
|
@@ -1627,11 +1625,11 @@ function createMattermostDraftStream(params) {
|
|
|
1627
1625
|
stop: settleOperation(stopLifecycle),
|
|
1628
1626
|
forceNewMessage,
|
|
1629
1627
|
settleBoundaries,
|
|
1630
|
-
resolveFinalText
|
|
1628
|
+
resolveFinalText,
|
|
1629
|
+
findPostAfter
|
|
1631
1630
|
};
|
|
1632
1631
|
}
|
|
1633
|
-
|
|
1634
|
-
//#region extensions/mattermost/src/mattermost/monitor-draft-delivery.ts
|
|
1632
|
+
// extensions/mattermost/src/mattermost/monitor-draft-delivery.ts
|
|
1635
1633
|
function combineMattermostVisibleDeliveryResults(results, outcome) {
|
|
1636
1634
|
const visibleResults = results.filter((result) => result?.visibleReplySent === true);
|
|
1637
1635
|
if (visibleResults.length === 0) return;
|
|
@@ -1683,6 +1681,13 @@ async function deliverMattermostReplyWithDraftPreview(params) {
|
|
|
1683
1681
|
return { message: previewFinalText };
|
|
1684
1682
|
},
|
|
1685
1683
|
editFinal: async (previewPostId, edit) => {
|
|
1684
|
+
const newerPostId = await params.findPostAfterPreview?.(previewPostId).catch((err) => {
|
|
1685
|
+
params.logVerboseMessage(`mattermost preview order check failed; finalizing in place (${String(err)})`);
|
|
1686
|
+
});
|
|
1687
|
+
if (newerPostId) {
|
|
1688
|
+
params.logVerboseMessage(`mattermost preview ${previewPostId} is above newer post ${newerPostId}; sending the final as a new post`);
|
|
1689
|
+
return { visibleReplySent: false };
|
|
1690
|
+
}
|
|
1686
1691
|
const post = await updateMattermostPost(params.client, previewPostId, edit);
|
|
1687
1692
|
const receipt = createPreviewMessageReceipt({ id: post.id ?? previewPostId });
|
|
1688
1693
|
return {
|
|
@@ -1736,8 +1741,7 @@ async function deliverMattermostReplyWithDraftPreview(params) {
|
|
|
1736
1741
|
}));
|
|
1737
1742
|
}
|
|
1738
1743
|
}
|
|
1739
|
-
|
|
1740
|
-
//#region extensions/mattermost/src/mattermost/thread-participation.ts
|
|
1744
|
+
// extensions/mattermost/src/mattermost/thread-participation.ts
|
|
1741
1745
|
const threadParticipation = createPersistentDedupeCache({
|
|
1742
1746
|
globalKey: Symbol.for("openclaw.mattermostThreadParticipation"),
|
|
1743
1747
|
ttlMs: 6048e5,
|
|
@@ -1764,8 +1768,7 @@ async function hasMattermostThreadParticipationWithPersistence(params) {
|
|
|
1764
1768
|
if (!params.accountId || !params.channelId || !params.threadRootId) return false;
|
|
1765
1769
|
return await threadParticipation.lookup(makeKey(params.accountId, params.channelId, params.threadRootId));
|
|
1766
1770
|
}
|
|
1767
|
-
|
|
1768
|
-
//#region extensions/mattermost/src/mattermost/monitor-turn.ts
|
|
1771
|
+
// extensions/mattermost/src/mattermost/monitor-turn.ts
|
|
1769
1772
|
async function dispatchMattermostInboundTurn(monitor, params) {
|
|
1770
1773
|
const { account, cfg, client, core, runtime } = monitor;
|
|
1771
1774
|
const { channelHistories, ctxPayload, eventPlan, historyKey, historyLimit, pinnedMainDmOwner, post, rawText, turnAdoptionLifecycle } = params;
|
|
@@ -1933,6 +1936,7 @@ async function dispatchMattermostInboundTurn(monitor, params) {
|
|
|
1933
1936
|
resolvePreviewFinalText,
|
|
1934
1937
|
logVerboseMessage: monitor.logVerboseMessage,
|
|
1935
1938
|
recordThreadParticipation: markThreadParticipation,
|
|
1939
|
+
findPostAfterPreview: draftStream?.findPostAfter,
|
|
1936
1940
|
deliverPayload: async (payloadToDeliver) => {
|
|
1937
1941
|
const finalTextResolution = info.kind === "final" && !payloadToDeliver.isError && typeof payloadToDeliver.text === "string" ? draftStream?.resolveFinalText(payloadToDeliver.text) : void 0;
|
|
1938
1942
|
const resolvedPayload = finalTextResolution ? {
|
|
@@ -2096,8 +2100,7 @@ async function dispatchMattermostInboundTurn(monitor, params) {
|
|
|
2096
2100
|
}
|
|
2097
2101
|
}
|
|
2098
2102
|
}
|
|
2099
|
-
|
|
2100
|
-
//#region extensions/mattermost/src/mattermost/monitor-posts.ts
|
|
2103
|
+
// extensions/mattermost/src/mattermost/monitor-posts.ts
|
|
2101
2104
|
function createMattermostPostHandler(monitor) {
|
|
2102
2105
|
const { account, botUserId, botUsername, cfg, core, groupPolicy, pairing, resources } = monitor;
|
|
2103
2106
|
const groups = resolveChannelGroups(cfg, "mattermost", account.accountId);
|
|
@@ -2444,8 +2447,7 @@ function createMattermostPostHandler(monitor) {
|
|
|
2444
2447
|
});
|
|
2445
2448
|
};
|
|
2446
2449
|
}
|
|
2447
|
-
|
|
2448
|
-
//#region extensions/mattermost/src/mattermost/monitor-reactions.ts
|
|
2450
|
+
// extensions/mattermost/src/mattermost/monitor-reactions.ts
|
|
2449
2451
|
function createMattermostReactionHandler(monitor) {
|
|
2450
2452
|
const { account, botUserId, cfg, core, groupPolicy, pairing, resources } = monitor;
|
|
2451
2453
|
const { resolveUserInfo } = resources;
|
|
@@ -2508,8 +2510,7 @@ function createMattermostReactionHandler(monitor) {
|
|
|
2508
2510
|
monitor.logVerboseMessage(`mattermost reaction: ${action} :${emojiName}: by ${senderName} on ${postId}`);
|
|
2509
2511
|
};
|
|
2510
2512
|
}
|
|
2511
|
-
|
|
2512
|
-
//#region extensions/mattermost/src/mattermost/monitor-slash.ts
|
|
2513
|
+
// extensions/mattermost/src/mattermost/monitor-slash.ts
|
|
2513
2514
|
async function buildSlashCommands(params) {
|
|
2514
2515
|
const commandsToRegister = [...DEFAULT_COMMAND_SPECS];
|
|
2515
2516
|
if (!params.nativeSkills) return commandsToRegister;
|
|
@@ -2611,8 +2612,7 @@ async function registerMattermostMonitorSlashCommands(params) {
|
|
|
2611
2612
|
params.runtime.error?.(`mattermost: failed to register slash commands: ${String(err)}`);
|
|
2612
2613
|
}
|
|
2613
2614
|
}
|
|
2614
|
-
|
|
2615
|
-
//#region extensions/mattermost/src/mattermost/reconnect.ts
|
|
2615
|
+
// extensions/mattermost/src/mattermost/reconnect.ts
|
|
2616
2616
|
async function runWithReconnect(connectFn, opts = {}) {
|
|
2617
2617
|
const { initialDelayMs = 2e3, maxDelayMs = 6e4 } = opts;
|
|
2618
2618
|
const jitterRatio = Math.max(0, opts.jitterRatio ?? 0);
|
|
@@ -2646,8 +2646,7 @@ function withJitter(baseMs, jitterRatio, random) {
|
|
|
2646
2646
|
const spread = baseMs * jitterRatio;
|
|
2647
2647
|
return Math.max(1, Math.round(baseMs - spread + normalized * spread * 2));
|
|
2648
2648
|
}
|
|
2649
|
-
|
|
2650
|
-
//#region extensions/mattermost/src/mattermost/monitor.ts
|
|
2649
|
+
// extensions/mattermost/src/mattermost/monitor.ts
|
|
2651
2650
|
function publishMattermostRecoveringStatus(statusSink, error) {
|
|
2652
2651
|
statusSink?.({
|
|
2653
2652
|
lastError: String(error),
|
|
@@ -2887,5 +2886,4 @@ async function monitorMattermostProvider(opts = {}) {
|
|
|
2887
2886
|
}
|
|
2888
2887
|
await Promise.resolve(slashShutdownCleanup);
|
|
2889
2888
|
}
|
|
2890
|
-
//#endregion
|
|
2891
2889
|
export { monitorMattermostProvider };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { t as getMattermostRuntime } from "./runtime-
|
|
2
|
-
import { n as normalizeMattermostAllowEntry, t as mattermostIngressIdentity } from "./ingress-identity-
|
|
1
|
+
import { t as getMattermostRuntime } from "./runtime-y_L8jPMH.mjs";
|
|
2
|
+
import { n as normalizeMattermostAllowEntry, t as mattermostIngressIdentity } from "./ingress-identity-CtHiOUDu.mjs";
|
|
3
3
|
import { uniqueStrings } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
4
4
|
import { logInboundDrop } from "openclaw/plugin-sdk/channel-inbound";
|
|
5
5
|
import { resolveAllowlistMatchSimple } from "openclaw/plugin-sdk/allow-from";
|
|
@@ -18,7 +18,8 @@ import { isRequestBodyLimitError } from "openclaw/plugin-sdk/webhook-ingress";
|
|
|
18
18
|
import { createWebhookInFlightLimiter, readRequestBodyWithLimit, sendHttpRequestRejection } from "openclaw/plugin-sdk/webhook-request-guards";
|
|
19
19
|
import { isTrustedProxyAddress, resolveClientIp } from "openclaw/plugin-sdk/core";
|
|
20
20
|
import { resolveChannelContextVisibilityMode, shouldIncludeSupplementalContext } from "openclaw/plugin-sdk/context-visibility-runtime";
|
|
21
|
-
|
|
21
|
+
// extensions/mattermost/src/mattermost/monitor-auth.ts
|
|
22
|
+
const MATTERMOST_PAIRING_QUEUE_FULL_TEXT = "DM pairing is full, so no pairing request was saved. Ask the bot owner to approve or dismiss pending requests in Settings → Channels → DM access requests, then try again.";
|
|
22
23
|
function normalizeMattermostAllowList(entries) {
|
|
23
24
|
const normalized = entries.map((entry) => normalizeMattermostAllowEntry(String(entry))).filter(Boolean);
|
|
24
25
|
return uniqueStrings(normalized);
|
|
@@ -58,6 +59,7 @@ async function resolveMattermostMonitorInboundAccess(params) {
|
|
|
58
59
|
return await getMattermostRuntime().channel.inbound.ingress.resolveStable({
|
|
59
60
|
channelId: "mattermost",
|
|
60
61
|
accountId: account.accountId,
|
|
62
|
+
contextBinding: params.contextBinding,
|
|
61
63
|
identity: mattermostIngressIdentity,
|
|
62
64
|
cfg,
|
|
63
65
|
...readStoreAllowFrom ? { readStoreAllowFrom } : {},
|
|
@@ -68,7 +70,8 @@ async function resolveMattermostMonitorInboundAccess(params) {
|
|
|
68
70
|
},
|
|
69
71
|
conversation: {
|
|
70
72
|
kind,
|
|
71
|
-
id: channelId
|
|
73
|
+
id: channelId,
|
|
74
|
+
threadId: params.threadId
|
|
72
75
|
},
|
|
73
76
|
event: {
|
|
74
77
|
kind: params.eventKind ?? "message",
|
|
@@ -169,5 +172,4 @@ async function authorizeMattermostCommandInvocation(params) {
|
|
|
169
172
|
}
|
|
170
173
|
};
|
|
171
174
|
}
|
|
172
|
-
|
|
173
|
-
export { resolveAllowlistProviderRuntimeGroupPolicy$1 as C, sendHttpRequestRejection as D, resolveDefaultGroupPolicy as E, warnMissingProviderGroupPolicyFallbackOnce as O, registerPluginHttpRoute as S, resolveClientIp as T, loadOutboundMediaFromUrl as _, resolveMattermostMonitorInboundAccess as a, prepareSkillCommandsForAgents as b, DEFAULT_GROUP_HISTORY_LIMIT as c, createChannelMessageReplyPipeline as d, createChannelPairingController as f, isTrustedProxyAddress as g, isRequestBodyLimitError as h, normalizeMattermostAllowList as i, buildPreparedModelsProviderData as l, isDangerousNameMatchingEnabled as m, formatMattermostDirectMessageDropLog as n, resolveMattermostTrustedChatKind as o, createWebhookInFlightLimiter as p, isMattermostSenderAllowed as r, shouldRetainMattermostSenderHistory as s, authorizeMattermostCommandInvocation as t, createChannelHistoryWindow as u, logInboundDrop as v, resolveChannelMediaMaxBytes$1 as w, readRequestBodyWithLimit as x, logTypingFailure as y };
|
|
175
|
+
export { registerPluginHttpRoute as C, resolveDefaultGroupPolicy as D, resolveClientIp as E, sendHttpRequestRejection as O, readRequestBodyWithLimit as S, resolveChannelMediaMaxBytes$1 as T, isTrustedProxyAddress as _, normalizeMattermostAllowList as a, logTypingFailure as b, shouldRetainMattermostSenderHistory as c, createChannelHistoryWindow as d, createChannelMessageReplyPipeline as f, isRequestBodyLimitError as g, isDangerousNameMatchingEnabled as h, isMattermostSenderAllowed as i, warnMissingProviderGroupPolicyFallbackOnce as k, DEFAULT_GROUP_HISTORY_LIMIT as l, createWebhookInFlightLimiter as m, authorizeMattermostCommandInvocation as n, resolveMattermostMonitorInboundAccess as o, createChannelPairingController as p, formatMattermostDirectMessageDropLog as r, resolveMattermostTrustedChatKind as s, MATTERMOST_PAIRING_QUEUE_FULL_TEXT as t, buildPreparedModelsProviderData as u, loadOutboundMediaFromUrl as v, resolveAllowlistProviderRuntimeGroupPolicy$1 as w, prepareSkillCommandsForAgents as x, logInboundDrop as y };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { h as normalizeMattermostBaseUrl } from "./client-
|
|
1
|
+
import { h as normalizeMattermostBaseUrl } from "./client-VHp4VYIf.mjs";
|
|
2
2
|
import { normalizeLowercaseStringOrEmpty, 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";
|
|
@@ -6,7 +6,7 @@ import { DEFAULT_ACCOUNT_ID, normalizeAccountId } from "openclaw/plugin-sdk/acco
|
|
|
6
6
|
import { normalizeMessagePresentation, renderMessagePresentationFallbackText, resolveMessagePresentationControlValue } from "openclaw/plugin-sdk/interactive-runtime";
|
|
7
7
|
import { resolveAskUserQuestionOptionIndex, resolveAskUserQuestionOptionIndices } from "openclaw/plugin-sdk/reply-payload";
|
|
8
8
|
import { resolveSecretInputString } from "openclaw/plugin-sdk/secret-input";
|
|
9
|
-
|
|
9
|
+
// extensions/mattermost/src/mattermost/accounts.ts
|
|
10
10
|
const { listAccountIds: listMattermostAccountIds, resolveDefaultAccountId: resolveDefaultMattermostAccountId, resolveAccountConfig: mergeMattermostAccountConfig } = createAccountListHelpers("mattermost", {
|
|
11
11
|
omitKeys: ["defaultAccount"],
|
|
12
12
|
nestedObjectKeys: ["commands"],
|
|
@@ -91,8 +91,7 @@ function resolveMattermostReplyToMode(account, kind) {
|
|
|
91
91
|
if (kind === "direct") return "off";
|
|
92
92
|
return account.config.replyToMode ?? "off";
|
|
93
93
|
}
|
|
94
|
-
|
|
95
|
-
//#region extensions/mattermost/src/normalize.ts
|
|
94
|
+
// extensions/mattermost/src/normalize.ts
|
|
96
95
|
/** Marks a button context as one this plugin answers through the question Gateway. */
|
|
97
96
|
const MATTERMOST_QUESTION_CONTEXT_KEY = "oc_question";
|
|
98
97
|
/**
|
|
@@ -185,5 +184,4 @@ function looksLikeMattermostTargetId(raw, _normalized) {
|
|
|
185
184
|
if (trimmed.startsWith("@")) return true;
|
|
186
185
|
return /^[a-z0-9]{26}$/i.test(trimmed) || /^[a-z0-9]{26}__[a-z0-9]{26}$/i.test(trimmed);
|
|
187
186
|
}
|
|
188
|
-
//#endregion
|
|
189
187
|
export { resolveMattermostPresentation as a, listMattermostAccountIds as c, resolveMattermostReplyToMode as d, requiresMattermostMediaUpload as i, resolveDefaultMattermostAccountId as l, normalizeMattermostMessagingTarget as n, inspectMattermostAccount as o, parseMattermostQuestionContext as r, isMattermostConfigured as s, looksLikeMattermostTargetId as t, resolveMattermostAccount as u };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// \0rolldown/runtime.js
|
|
2
2
|
var __defProp = Object.defineProperty;
|
|
3
3
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
4
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
@@ -23,5 +23,4 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
23
23
|
return to;
|
|
24
24
|
};
|
|
25
25
|
var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
|
|
26
|
-
//#endregion
|
|
27
26
|
export { __reExport as n, __exportAll as t };
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { createPluginRuntimeStore } from "openclaw/plugin-sdk/runtime-store";
|
|
2
|
-
|
|
2
|
+
// extensions/mattermost/src/runtime.ts
|
|
3
3
|
const { setRuntime: setMattermostRuntime, getRuntime: getMattermostRuntime, tryGetRuntime: getOptionalMattermostRuntime } = createPluginRuntimeStore({
|
|
4
4
|
pluginId: "mattermost",
|
|
5
5
|
errorMessage: "Mattermost runtime not initialized"
|
|
6
6
|
});
|
|
7
|
-
//#endregion
|
|
8
7
|
export { getOptionalMattermostRuntime as n, setMattermostRuntime as r, getMattermostRuntime as t };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { createSimpleChannelSecretContract } from "openclaw/plugin-sdk/channel-secret-basic-runtime";
|
|
2
|
-
|
|
2
|
+
// extensions/mattermost/src/secret-contract.ts
|
|
3
3
|
const channelSecrets = createSimpleChannelSecretContract({
|
|
4
4
|
channelKey: "mattermost",
|
|
5
5
|
label: "Mattermost",
|
|
@@ -8,5 +8,4 @@ const channelSecrets = createSimpleChannelSecretContract({
|
|
|
8
8
|
mode: "account-inheritance"
|
|
9
9
|
});
|
|
10
10
|
const { secretTargetRegistryEntries, collectRuntimeConfigAssignments } = channelSecrets;
|
|
11
|
-
//#endregion
|
|
12
11
|
export { collectRuntimeConfigAssignments as n, secretTargetRegistryEntries as r, channelSecrets as t };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { t as channelSecrets, n as collectRuntimeConfigAssignments, r as secretTargetRegistryEntries } from "./secret-contract-
|
|
1
|
+
export { t as channelSecrets, n as collectRuntimeConfigAssignments, r as secretTargetRegistryEntries } from "./secret-contract-H9g0kHHQ.mjs";
|
|
2
2
|
import "../secret-contract-api.js";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { c as setInteractionSecret, n as buildButtonProps, o as resolveInteractionCallbackUrl } from "./interactions-
|
|
2
|
-
import { n as getOptionalMattermostRuntime, t as getMattermostRuntime } from "./runtime-
|
|
3
|
-
import { a as createMattermostPost, b as uploadMattermostFile, c as fetchMattermostChannelByName, d as fetchMattermostUser, f as fetchMattermostUserByUsername, g as parseMattermostApiStatus, h as normalizeMattermostBaseUrl, i as createMattermostDirectChannelWithRetry, p as fetchMattermostUserTeams, r as createMattermostClient, s as fetchMattermostChannel, u as fetchMattermostMe } from "./client-
|
|
4
|
-
import {
|
|
5
|
-
import { u as resolveMattermostAccount } from "./normalize-
|
|
1
|
+
import { c as setInteractionSecret, n as buildButtonProps, o as resolveInteractionCallbackUrl } from "./interactions-7eWssSf1.mjs";
|
|
2
|
+
import { n as getOptionalMattermostRuntime, t as getMattermostRuntime } from "./runtime-y_L8jPMH.mjs";
|
|
3
|
+
import { a as createMattermostPost, b as uploadMattermostFile, c as fetchMattermostChannelByName, d as fetchMattermostUser, f as fetchMattermostUserByUsername, g as parseMattermostApiStatus, h as normalizeMattermostBaseUrl, i as createMattermostDirectChannelWithRetry, p as fetchMattermostUserTeams, r as createMattermostClient, s as fetchMattermostChannel, u as fetchMattermostMe } from "./client-VHp4VYIf.mjs";
|
|
4
|
+
import { s as resolveMattermostTrustedChatKind, v as loadOutboundMediaFromUrl } from "./monitor-auth-0gZXtoHv.mjs";
|
|
5
|
+
import { u as resolveMattermostAccount } from "./normalize-C_DYEHki.mjs";
|
|
6
6
|
import { normalizeLowercaseStringOrEmpty, normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
7
7
|
import { createChannelPartialDeliveryError } from "openclaw/plugin-sdk/channel-inbound";
|
|
8
8
|
import { createMessageReceiptFromOutboundResults, listMessageReceiptPlatformIds } from "openclaw/plugin-sdk/channel-outbound";
|
|
@@ -12,7 +12,7 @@ import { pruneMapToMaxSize } from "openclaw/plugin-sdk/collection-runtime";
|
|
|
12
12
|
import { resolveMarkdownTableMode } from "openclaw/plugin-sdk/markdown-table-runtime";
|
|
13
13
|
import { extensionForMime } from "openclaw/plugin-sdk/media-mime";
|
|
14
14
|
import { requireRuntimeConfig } from "openclaw/plugin-sdk/plugin-config-runtime";
|
|
15
|
-
|
|
15
|
+
// extensions/mattermost/src/mattermost/target-resolution.ts
|
|
16
16
|
const MATTERMOST_OPAQUE_TARGET_CACHE_MAX_ENTRIES = 1024;
|
|
17
17
|
const MATTERMOST_OPAQUE_TARGET_CACHE_TTL_MS = 3e5;
|
|
18
18
|
const mattermostOpaqueTargetCache = /* @__PURE__ */ new Map();
|
|
@@ -155,8 +155,7 @@ async function resolveMattermostOpaqueTarget(params) {
|
|
|
155
155
|
};
|
|
156
156
|
}
|
|
157
157
|
}
|
|
158
|
-
|
|
159
|
-
//#region extensions/mattermost/src/mattermost/send.ts
|
|
158
|
+
// extensions/mattermost/src/mattermost/send.ts
|
|
160
159
|
const MATTERMOST_BOT_USER_CACHE_MAX_ENTRIES = 64;
|
|
161
160
|
const MATTERMOST_TARGET_CACHE_MAX_ENTRIES = 1024;
|
|
162
161
|
const botUserCache = /* @__PURE__ */ new Map();
|
|
@@ -396,5 +395,4 @@ async function sendMessageMattermost(to, text, opts) {
|
|
|
396
395
|
}
|
|
397
396
|
return result;
|
|
398
397
|
}
|
|
399
|
-
//#endregion
|
|
400
398
|
export { resolveMattermostOpaqueTarget as n, sendMessageMattermost as t };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { t as getMattermostRuntime } from "./runtime-
|
|
2
|
-
import { n as normalizeCallbackPath, r as resolveCallbackHost, t as collectMattermostCallbackPaths } from "./callback-host-
|
|
3
|
-
import { r as createMattermostClient, s as fetchMattermostChannel, v as sendMattermostTyping } from "./client-
|
|
4
|
-
import {
|
|
5
|
-
import { a as resolveMattermostPresentation, i as requiresMattermostMediaUpload } from "./normalize-
|
|
6
|
-
import { t as sendMessageMattermost } from "./send-
|
|
1
|
+
import { t as getMattermostRuntime } from "./runtime-y_L8jPMH.mjs";
|
|
2
|
+
import { n as normalizeCallbackPath, r as resolveCallbackHost, t as collectMattermostCallbackPaths } from "./callback-host-CRQTeNn9.mjs";
|
|
3
|
+
import { r as createMattermostClient, s as fetchMattermostChannel, v as sendMattermostTyping } from "./client-VHp4VYIf.mjs";
|
|
4
|
+
import { O as sendHttpRequestRejection, S as readRequestBodyWithLimit, a as normalizeMattermostAllowList, b as logTypingFailure, g as isRequestBodyLimitError, m as createWebhookInFlightLimiter, n as authorizeMattermostCommandInvocation, t as MATTERMOST_PAIRING_QUEUE_FULL_TEXT, u as buildPreparedModelsProviderData } from "./monitor-auth-0gZXtoHv.mjs";
|
|
5
|
+
import { a as resolveMattermostPresentation, i as requiresMattermostMediaUpload } from "./normalize-C_DYEHki.mjs";
|
|
6
|
+
import { t as sendMessageMattermost } from "./send-3ye1gFt3.mjs";
|
|
7
7
|
import { createHash } from "node:crypto";
|
|
8
8
|
import { safeEqualSecret } from "openclaw/plugin-sdk/security-runtime";
|
|
9
9
|
import { asFiniteNumber, normalizeOptionalString, normalizeStringifiedOptionalString, readStringField } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
@@ -247,8 +247,7 @@ function resolveCallbackUrl(params) {
|
|
|
247
247
|
const path = normalizeCallbackPath(params.config.callbackPath);
|
|
248
248
|
return `http://${host}:${params.gatewayPort}${path}`;
|
|
249
249
|
}
|
|
250
|
-
|
|
251
|
-
//#region extensions/mattermost/src/mattermost/model-picker.ts
|
|
250
|
+
// extensions/mattermost/src/mattermost/model-picker.ts
|
|
252
251
|
const MATTERMOST_MODEL_PICKER_CONTEXT_KEY = "oc_model_picker";
|
|
253
252
|
const MODELS_PAGE_SIZE = 8;
|
|
254
253
|
const ACTION_IDS = {
|
|
@@ -469,8 +468,7 @@ function renderMattermostModelsPickerView(params) {
|
|
|
469
468
|
buttons: rows
|
|
470
469
|
};
|
|
471
470
|
}
|
|
472
|
-
|
|
473
|
-
//#region extensions/mattermost/src/mattermost/reply-delivery.ts
|
|
471
|
+
// extensions/mattermost/src/mattermost/reply-delivery.ts
|
|
474
472
|
/** Represents distinct provider posts without collapsing their visible boundary. */
|
|
475
473
|
function joinMattermostVisibleContent(contents) {
|
|
476
474
|
return contents.filter((content) => Boolean(content)).join("\n");
|
|
@@ -520,8 +518,7 @@ async function deliverMattermostReplyPayload(params) {
|
|
|
520
518
|
...accepted.result()
|
|
521
519
|
};
|
|
522
520
|
}
|
|
523
|
-
|
|
524
|
-
//#region extensions/mattermost/src/mattermost/slash-model-picker.ts
|
|
521
|
+
// extensions/mattermost/src/mattermost/slash-model-picker.ts
|
|
525
522
|
/** Returns whether the reply contains models, rather than an empty-catalog notice. */
|
|
526
523
|
async function deliverMattermostSlashModelPicker(params) {
|
|
527
524
|
const { cfg, route, accountId, channelId, senderId, commandText, messageSid, entry } = params;
|
|
@@ -581,8 +578,7 @@ async function deliverMattermostSlashModelPicker(params) {
|
|
|
581
578
|
});
|
|
582
579
|
return true;
|
|
583
580
|
}
|
|
584
|
-
|
|
585
|
-
//#region extensions/mattermost/src/mattermost/slash-http.ts
|
|
581
|
+
// extensions/mattermost/src/mattermost/slash-http.ts
|
|
586
582
|
const MAX_BODY_BYTES = 65536;
|
|
587
583
|
const BODY_READ_TIMEOUT_MS = 5e3;
|
|
588
584
|
const COMMAND_LOOKUP_TIMEOUT_MS = 1e3;
|
|
@@ -857,11 +853,11 @@ async function authorizeSlashInvocation(params) {
|
|
|
857
853
|
});
|
|
858
854
|
return {
|
|
859
855
|
ok: false,
|
|
860
|
-
denyText: core.channel.pairing.buildPairingReply({
|
|
856
|
+
denyText: code ? core.channel.pairing.buildPairingReply({
|
|
861
857
|
channel: "mattermost",
|
|
862
858
|
idLine: `Your Mattermost user id: ${senderId}`,
|
|
863
859
|
code
|
|
864
|
-
})
|
|
860
|
+
}) : MATTERMOST_PAIRING_QUEUE_FULL_TEXT
|
|
865
861
|
};
|
|
866
862
|
}
|
|
867
863
|
return {
|
|
@@ -1073,8 +1069,7 @@ async function handleSlashCommandAsync(params) {
|
|
|
1073
1069
|
replyOptions: { disableBlockStreaming: typeof account.blockStreaming === "boolean" ? !account.blockStreaming : void 0 }
|
|
1074
1070
|
});
|
|
1075
1071
|
}
|
|
1076
|
-
|
|
1077
|
-
//#region extensions/mattermost/src/mattermost/slash-state.ts
|
|
1072
|
+
// extensions/mattermost/src/mattermost/slash-state.ts
|
|
1078
1073
|
const slashRouteInFlightLimiter = createWebhookInFlightLimiter();
|
|
1079
1074
|
const SLASH_ROUTE_IN_FLIGHT_KEY = "mattermost:slash";
|
|
1080
1075
|
const SLASH_AUTHENTICATED_IN_FLIGHT_KEY = `${SLASH_ROUTE_IN_FLIGHT_KEY}:authenticated`;
|
|
@@ -1224,5 +1219,4 @@ function registerSlashCommandRoute(api) {
|
|
|
1224
1219
|
handler: routeHandler
|
|
1225
1220
|
});
|
|
1226
1221
|
}
|
|
1227
|
-
//#endregion
|
|
1228
1222
|
export { resolveSlashCommandConfig as _, deliverMattermostReplyPayload as a, parseMattermostModelPickerContext as c, resolveMattermostModelPickerCurrentModel as d, DEFAULT_COMMAND_SPECS as f, resolveCallbackUrl as g, registerSlashCommands as h, registerSlashCommandRoute as i, renderMattermostModelsPickerView as l, isSlashCommandsEnabled as m, deactivateSlashCommands as n, joinMattermostVisibleContent as o, cleanupSlashCommands as p, getSlashCommandState as r, buildMattermostAllowedModelRefs as s, activateSlashCommands as t, renderMattermostProviderPickerView as u };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"entries":[{"output":"api.js","source":"extensions/mattermost/api.ts"},{"output":"channel-plugin-api.js","source":"extensions/mattermost/channel-plugin-api.ts"},{"output":"channel-plugin-runtime.js","source":"extensions/mattermost/channel-plugin-runtime.ts"},{"output":"doctor-contract-api.js","source":"extensions/mattermost/doctor-contract-api.ts"},{"output":"gateway-auth-api.js","source":"extensions/mattermost/gateway-auth-api.ts"},{"output":"index.js","source":"extensions/mattermost/index.ts"},{"output":"policy-api.js","source":"extensions/mattermost/policy-api.ts"},{"output":"runtime-api.js","source":"extensions/mattermost/runtime-api.ts"},{"output":"secret-contract-api.js","source":"extensions/mattermost/secret-contract-api.ts"},{"output":"setup-entry.js","source":"extensions/mattermost/setup-entry.ts"},{"output":"slash-route-api.js","source":"extensions/mattermost/slash-route-api.ts"}],"chunks":[{"output":".setup/callback-host-
|
|
1
|
+
{"version":3,"entries":[{"output":"api.js","source":"extensions/mattermost/api.ts"},{"output":"channel-plugin-api.js","source":"extensions/mattermost/channel-plugin-api.ts"},{"output":"channel-plugin-runtime.js","source":"extensions/mattermost/channel-plugin-runtime.ts"},{"output":"doctor-contract-api.js","source":"extensions/mattermost/doctor-contract-api.ts"},{"output":"gateway-auth-api.js","source":"extensions/mattermost/gateway-auth-api.ts"},{"output":"index.js","source":"extensions/mattermost/index.ts"},{"output":"policy-api.js","source":"extensions/mattermost/policy-api.ts"},{"output":"runtime-api.js","source":"extensions/mattermost/runtime-api.ts"},{"output":"secret-contract-api.js","source":"extensions/mattermost/secret-contract-api.ts"},{"output":"setup-entry.js","source":"extensions/mattermost/setup-entry.ts"},{"output":"slash-route-api.js","source":"extensions/mattermost/slash-route-api.ts"}],"chunks":[{"output":".setup/callback-host-CRQTeNn9.mjs","sha256":"3ece9a206a5435985f81039d322aeaf152623f20d1cb22c84fc2ddb848b38a7a","facadeSource":null,"sources":["extensions/mattermost/src/mattermost/callback-host.ts"]},{"output":".setup/channel-plugin-api-Vq9imWd1.mjs","sha256":"6df25859800c04b60df14c2086b7cea75cedddc8f49d619866f0269168eac943","facadeSource":"extensions/mattermost/channel-plugin-api.ts","sources":[]},{"output":".setup/channel-plugin-runtime-CLBgUA35.mjs","sha256":"2a82b65b7a36942c076a65ca29435a549fc26febe02967fc1968850bc417b08a","facadeSource":null,"sources":["extensions/mattermost/src/approval-auth.ts","extensions/mattermost/src/channel-config-shared.ts","extensions/mattermost/src/channel-send-result.ts","extensions/mattermost/src/channel.setup.ts","extensions/mattermost/src/channel.ts","extensions/mattermost/src/config-schema-core.ts","extensions/mattermost/src/config-surface.ts","extensions/mattermost/src/config-ui-hints.ts","extensions/mattermost/src/doctor.ts","extensions/mattermost/src/group-mentions.ts","extensions/mattermost/src/mattermost/emoji.ts","extensions/mattermost/src/session-route.ts","extensions/mattermost/src/setup-core.ts","extensions/mattermost/src/setup-surface.ts"]},{"output":".setup/channel.runtime-BBMzxlPB.mjs","sha256":"a253b19ce49df4b97f374be3ac4f0af7eb6fc9c5ab5346f0f93df93af4b3cfb1","facadeSource":"extensions/mattermost/src/channel.runtime.ts","sources":["extensions/mattermost/src/mattermost/directory.ts","extensions/mattermost/src/mattermost/probe.ts","extensions/mattermost/src/mattermost/reactions.ts","extensions/mattermost/src/mattermost/read.ts"]},{"output":".setup/client-VHp4VYIf.mjs","sha256":"b6b303c2d42679766eafbb9ba6d8dbbc8a54cd7fb34f36eb44158c757998b2ae","facadeSource":null,"sources":["extensions/mattermost/src/mattermost/client.ts"]},{"output":".setup/doctor-contract-i788N90j.mjs","sha256":"19cd8daa0e168e02f368e6e610fe44d86ed62ad513e45c979820ec174ec42d66","facadeSource":null,"sources":["extensions/mattermost/src/doctor-contract.ts","packages/normalization-core/src/record-coerce.ts","src/config/channel-config-normalization.ts","src/plugin-sdk/legacy-webhook-listener-migration.ts"]},{"output":".setup/gateway-auth-bypass-DhWaV22L.mjs","sha256":"ebe57f4c2a254b643ca60ccad75636d8a4cb1df18a5dbfe97dbc1516b8f5e304","facadeSource":null,"sources":["extensions/mattermost/src/gateway-auth-bypass.ts"]},{"output":".setup/ingress-identity-CtHiOUDu.mjs","sha256":"02e94faf15dae1f0c6d6975b58986de68f34cfa7f521b7671d908bb7888f5190","facadeSource":null,"sources":["extensions/mattermost/src/mattermost/ingress-identity.ts"]},{"output":".setup/interactions-7eWssSf1.mjs","sha256":"3cd6523415d28e5dd6f9e5eb5526f3ccb50de967f849a5860e078ee99cdd6dbc","facadeSource":null,"sources":["extensions/mattermost/src/mattermost/interactions.ts","packages/normalization-core/src/string-coerce.ts","src/gateway/gateway-http-route-contracts.ts","src/gateway/security-path.ts","src/gateway/server/plugins-http/path-context.ts","src/plugins/http-path-prefix.ts"]},{"output":".setup/monitor-agLGA4lV.mjs","sha256":"2bcb263b4fdab5c6e283529c6ce414ccd8ed3a7574ea02c6c571bb8a78b0f396","facadeSource":"extensions/mattermost/src/mattermost/monitor.ts","sources":["extensions/mattermost/src/mattermost/draft-stream.ts","extensions/mattermost/src/mattermost/monitor-activation.ts","extensions/mattermost/src/mattermost/monitor-context.ts","extensions/mattermost/src/mattermost/monitor-draft-delivery.ts","extensions/mattermost/src/mattermost/monitor-event-plan.ts","extensions/mattermost/src/mattermost/monitor-helpers.ts","extensions/mattermost/src/mattermost/monitor-ingress.ts","extensions/mattermost/src/mattermost/monitor-interaction-dispatch.ts","extensions/mattermost/src/mattermost/monitor-interactions.ts","extensions/mattermost/src/mattermost/monitor-model-picker.ts","extensions/mattermost/src/mattermost/monitor-onchar.ts","extensions/mattermost/src/mattermost/monitor-posts.ts","extensions/mattermost/src/mattermost/monitor-reactions.ts","extensions/mattermost/src/mattermost/monitor-resources.ts","extensions/mattermost/src/mattermost/monitor-slash.ts","extensions/mattermost/src/mattermost/monitor-thread-backfill.ts","extensions/mattermost/src/mattermost/monitor-turn.ts","extensions/mattermost/src/mattermost/monitor-websocket.ts","extensions/mattermost/src/mattermost/monitor.ts","extensions/mattermost/src/mattermost/reconnect.ts","extensions/mattermost/src/mattermost/thread-participation.ts","src/channels/mention-gating.ts"]},{"output":".setup/monitor-auth-0gZXtoHv.mjs","sha256":"31ecb8cb2ce511fad4a2b6da8bf15c67a87c1209db6b9ea525bd36134da99086","facadeSource":null,"sources":["extensions/mattermost/src/mattermost/monitor-auth.ts"]},{"output":".setup/normalize-C_DYEHki.mjs","sha256":"faa4ac9026e13bc907442dc6788932853a6367d1ef552afe271aa7f3d186909c","facadeSource":null,"sources":["extensions/mattermost/src/mattermost/accounts.ts","extensions/mattermost/src/normalize.ts"]},{"output":".setup/rolldown-runtime-782esTHO.mjs","sha256":"5ee95aea427a7c3b63d18f4d901f7c824b836077e85aee06ae7d598c1974e2a6","facadeSource":null,"sources":[]},{"output":".setup/runtime-y_L8jPMH.mjs","sha256":"57c233e3dc66946040735eaa3183b5a6c144d5251a6a4a9a1900bb324406a504","facadeSource":null,"sources":["extensions/mattermost/src/runtime.ts"]},{"output":".setup/secret-contract-api-CmBND3cW.mjs","sha256":"7e901149a7fed9295f4f8ef94cb04b1b2fec477ce45929a553632b2f064c4a26","facadeSource":"extensions/mattermost/secret-contract-api.ts","sources":[]},{"output":".setup/secret-contract-H9g0kHHQ.mjs","sha256":"3f477d51469d63ef8c7453d6608bd079205a10a24438249b812cadba5dbf2bfe","facadeSource":null,"sources":["extensions/mattermost/src/secret-contract.ts"]},{"output":".setup/send-3ye1gFt3.mjs","sha256":"e17f8fd9da889fea969607a6bed63cba75ddd5b16172a696f71b8f413df6391b","facadeSource":null,"sources":["extensions/mattermost/src/mattermost/send.ts","extensions/mattermost/src/mattermost/target-resolution.ts"]},{"output":".setup/slash-state-V13EaHX9.mjs","sha256":"01b8e1be89540a08bd948ad5468e24296b9ed20e997b41cce9de7d6708d3c914","facadeSource":null,"sources":["extensions/mattermost/src/mattermost/model-picker.ts","extensions/mattermost/src/mattermost/reply-delivery.ts","extensions/mattermost/src/mattermost/slash-commands.ts","extensions/mattermost/src/mattermost/slash-http.ts","extensions/mattermost/src/mattermost/slash-model-picker.ts","extensions/mattermost/src/mattermost/slash-state.ts"]},{"output":"api.js","sha256":"78e9b99e75d0e402f5823fdb0fc79da5cc63a27f3dcaf855536859142ae0ec27","facadeSource":"extensions/mattermost/api.ts","sources":[]},{"output":"channel-plugin-api.js","sha256":"f41c65538077c8a7848fdd7da8418e16a54543de3228860ce8149bf3730b02ee","facadeSource":"extensions/mattermost/channel-plugin-api.ts","sources":[]},{"output":"channel-plugin-runtime.js","sha256":"339f25224115ead09b1c03d77bbb276204e66730955fc69fde02dca59995aff2","facadeSource":"extensions/mattermost/channel-plugin-runtime.ts","sources":[]},{"output":"doctor-contract-api.js","sha256":"e991f0b249cd5e4dc0b33c1a470fdb11f5670db110064e232afeb875e0f36774","facadeSource":"extensions/mattermost/doctor-contract-api.ts","sources":[]},{"output":"gateway-auth-api.js","sha256":"70ab9f2ff147f0c5e640e800a930ee2a43cc856ea8b4269ec0a17b725a3f293c","facadeSource":"extensions/mattermost/gateway-auth-api.ts","sources":[]},{"output":"index.js","sha256":"6a47a0b97182b9fbf1bc11a30fce13a8f181c829afa5ec0f8f90adbe391b0d32","facadeSource":"extensions/mattermost/index.ts","sources":["extensions/mattermost/index.ts"]},{"output":"policy-api.js","sha256":"cd31d236ca0e365b0c66035a716fed4f0f5821dfd142eaf9c061e8945b4ad08d","facadeSource":"extensions/mattermost/policy-api.ts","sources":[]},{"output":"runtime-api.js","sha256":"550cdb1c39c6ada41b6e052272563d8b17440c1715d0bb6fb346762cdba91345","facadeSource":"extensions/mattermost/runtime-api.ts","sources":[]},{"output":"secret-contract-api.js","sha256":"ff2464ce6ee31187fef10ddfac2736858af8449269251b716720300ae7c31ade","facadeSource":"extensions/mattermost/secret-contract-api.ts","sources":[]},{"output":"setup-entry.js","sha256":"0cc8f74e1a0a1d9349e44c5f4f0cc8ae3dd8df65cc89d7cca39d538e6c858c58","facadeSource":"extensions/mattermost/setup-entry.ts","sources":["extensions/mattermost/setup-entry.ts"]},{"output":"slash-route-api.js","sha256":"94f73cb50c3a09561206b2262b1db2f2a91e84da9c536c24d91711782846dd58","facadeSource":"extensions/mattermost/slash-route-api.ts","sources":[]}],"unrenderedSources":["extensions/mattermost/api.ts","extensions/mattermost/channel-plugin-api.ts","extensions/mattermost/channel-plugin-runtime.ts","extensions/mattermost/config-doctor-api.ts","extensions/mattermost/doctor-contract-api.ts","extensions/mattermost/gateway-auth-api.ts","extensions/mattermost/policy-api.ts","extensions/mattermost/runtime-api.ts","extensions/mattermost/secret-contract-api.ts","extensions/mattermost/slash-route-api.ts","extensions/mattermost/src/channel.runtime.ts","extensions/mattermost/src/mattermost/runtime-api.ts"]}
|
package/dist/api.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { t as buildButtonAttachments } from "./.setup/interactions-
|
|
2
|
-
import {
|
|
1
|
+
import { t as buildButtonAttachments } from "./.setup/interactions-7eWssSf1.mjs";
|
|
2
|
+
import { i as isMattermostSenderAllowed } from "./.setup/monitor-auth-0gZXtoHv.mjs";
|
|
3
3
|
export { buildButtonAttachments, isMattermostSenderAllowed };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { t as mattermostPlugin, n as mattermostSetupPlugin } from "./.setup/channel-plugin-runtime-
|
|
1
|
+
export { t as mattermostPlugin, n as mattermostSetupPlugin } from "./.setup/channel-plugin-runtime-CLBgUA35.mjs";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { t as mattermostPlugin } from "./.setup/channel-plugin-runtime-
|
|
1
|
+
export { t as mattermostPlugin } from "./.setup/channel-plugin-runtime-CLBgUA35.mjs";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { t as legacyConfigRules, n as normalizeCompatibilityConfig } from "./.setup/doctor-contract-
|
|
1
|
+
export { t as legacyConfigRules, n as normalizeCompatibilityConfig } from "./.setup/doctor-contract-i788N90j.mjs";
|
package/dist/gateway-auth-api.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { t as resolveGatewayAuthBypassPaths } from "./.setup/gateway-auth-bypass-
|
|
1
|
+
export { t as resolveGatewayAuthBypassPaths } from "./.setup/gateway-auth-bypass-DhWaV22L.mjs";
|
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defineBundledChannelEntry, loadBundledEntryExportSync } from "openclaw/plugin-sdk/channel-entry-contract";
|
|
2
|
-
|
|
2
|
+
// extensions/mattermost/index.ts
|
|
3
3
|
function registerSlashCommandRoute(api) {
|
|
4
4
|
loadBundledEntryExportSync(import.meta.url, {
|
|
5
5
|
specifier: "./slash-route-api.js",
|
|
@@ -27,5 +27,4 @@ var mattermost_default = defineBundledChannelEntry({
|
|
|
27
27
|
registerSlashCommandRoute(api);
|
|
28
28
|
}
|
|
29
29
|
});
|
|
30
|
-
//#endregion
|
|
31
30
|
export { mattermost_default as default };
|
package/dist/policy-api.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export { i as isMattermostSenderAllowed } from "./.setup/monitor-auth-0gZXtoHv.mjs";
|
package/dist/runtime-api.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { r as setMattermostRuntime } from "./.setup/runtime-
|
|
1
|
+
export { r as setMattermostRuntime } from "./.setup/runtime-y_L8jPMH.mjs";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { t as channelSecrets, n as collectRuntimeConfigAssignments, r as secretTargetRegistryEntries } from "./.setup/secret-contract-
|
|
1
|
+
export { t as channelSecrets, n as collectRuntimeConfigAssignments, r as secretTargetRegistryEntries } from "./.setup/secret-contract-H9g0kHHQ.mjs";
|
package/dist/setup-entry.js
CHANGED
|
@@ -1,16 +1,15 @@
|
|
|
1
1
|
import { defineBundledChannelSetupEntry } from "openclaw/plugin-sdk/channel-entry-contract";
|
|
2
2
|
import { fileURLToPath } from "node:url";
|
|
3
|
-
|
|
3
|
+
// extensions/mattermost/setup-entry.ts
|
|
4
4
|
var setup_entry_default = defineBundledChannelSetupEntry({
|
|
5
5
|
importMetaUrl: import.meta.url,
|
|
6
6
|
plugin: {
|
|
7
|
-
specifier: fileURLToPath(new URL(".setup/channel-plugin-api-
|
|
7
|
+
specifier: fileURLToPath(new URL(".setup/channel-plugin-api-Vq9imWd1.mjs", import.meta.url).href),
|
|
8
8
|
exportName: "mattermostSetupPlugin"
|
|
9
9
|
},
|
|
10
10
|
secrets: {
|
|
11
|
-
specifier: fileURLToPath(new URL(".setup/secret-contract-api-
|
|
11
|
+
specifier: fileURLToPath(new URL(".setup/secret-contract-api-CmBND3cW.mjs", import.meta.url).href),
|
|
12
12
|
exportName: "channelSecrets"
|
|
13
13
|
}
|
|
14
14
|
});
|
|
15
|
-
//#endregion
|
|
16
15
|
export { setup_entry_default as default };
|
package/dist/slash-route-api.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { i as registerSlashCommandRoute } from "./.setup/slash-state-
|
|
1
|
+
export { i as registerSlashCommandRoute } from "./.setup/slash-state-V13EaHX9.mjs";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openclaw/mattermost",
|
|
3
|
-
"version": "2026.10.10
|
|
3
|
+
"version": "2026.10.10",
|
|
4
4
|
"description": "OpenClaw Mattermost channel plugin",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
"zod": "4.6.5"
|
|
12
12
|
},
|
|
13
13
|
"peerDependencies": {
|
|
14
|
-
"openclaw": ">=2026.10.10
|
|
14
|
+
"openclaw": ">=2026.10.10"
|
|
15
15
|
},
|
|
16
16
|
"peerDependenciesMeta": {
|
|
17
17
|
"openclaw": {
|
|
@@ -93,10 +93,10 @@
|
|
|
93
93
|
"allowInvalidConfigRecovery": true
|
|
94
94
|
},
|
|
95
95
|
"compat": {
|
|
96
|
-
"pluginApi": ">=2026.10.10
|
|
96
|
+
"pluginApi": ">=2026.10.10"
|
|
97
97
|
},
|
|
98
98
|
"build": {
|
|
99
|
-
"openclawVersion": "2026.10.10
|
|
99
|
+
"openclawVersion": "2026.10.10",
|
|
100
100
|
"bundledDist": false
|
|
101
101
|
},
|
|
102
102
|
"release": {
|