Mattermost: normalize plugin imports

This commit is contained in:
Gustavo Madeira Santana 2026-03-18 02:18:06 +00:00
parent 09de192b77
commit bb803a42ac
No known key found for this signature in database
9 changed files with 14 additions and 22 deletions

View File

@ -1,3 +1,5 @@
import { z } from "zod";
import { requireChannelOpenAllowFrom } from "../../shared/config-schema-helpers.js";
import {
BlockStreamingCoalesceSchema,
DmPolicySchema,
@ -5,8 +7,6 @@ import {
MarkdownConfigSchema,
requireOpenAllowFrom,
} from "./runtime-api.js";
import { z } from "zod";
import { requireChannelOpenAllowFrom } from "../../shared/config-schema-helpers.js";
import { buildSecretInputSchema } from "./secret-input.js";
const DmChannelRetrySchema = z

View File

@ -1,6 +1,6 @@
import { resolveChannelGroupRequireMention } from "openclaw/plugin-sdk/channel-policy";
import type { ChannelGroupContext } from "./runtime-api.js";
import { resolveMattermostAccount } from "./mattermost/accounts.js";
import type { ChannelGroupContext } from "./runtime-api.js";
export function resolveMattermostGroupRequireMention(
params: ChannelGroupContext & { requireMentionOverride?: boolean },

View File

@ -1,8 +1,4 @@
import type {
ChannelDirectoryEntry,
OpenClawConfig,
RuntimeEnv,
} from "../runtime-api.js";
import type { ChannelDirectoryEntry, OpenClawConfig, RuntimeEnv } from "../runtime-api.js";
import { listMattermostAccountIds, resolveMattermostAccount } from "./accounts.js";
import {
createMattermostClient,

View File

@ -1,10 +1,6 @@
import { createHmac, timingSafeEqual } from "node:crypto";
import type { IncomingMessage, ServerResponse } from "node:http";
import {
isTrustedProxyAddress,
resolveClientIp,
type OpenClawConfig,
} from "../runtime-api.js";
import { isTrustedProxyAddress, resolveClientIp, type OpenClawConfig } from "../runtime-api.js";
import { getMattermostRuntime } from "../runtime.js";
import { updateMattermostPost, type MattermostClient, type MattermostPost } from "./client.js";

View File

@ -1,5 +1,5 @@
import type { ChannelAccountSnapshot, RuntimeEnv } from "../runtime-api.js";
import WebSocket from "ws";
import type { ChannelAccountSnapshot, RuntimeEnv } from "../runtime-api.js";
import type { MattermostPost } from "./client.js";
import { rawDataToString } from "./monitor-helpers.js";

View File

@ -6,6 +6,7 @@
*/
import type { IncomingMessage, ServerResponse } from "node:http";
import type { ResolvedMattermostAccount } from "../mattermost/accounts.js";
import {
buildModelsProviderData,
createReplyPrefixOptions,
@ -17,7 +18,6 @@ import {
type ReplyPayload,
type RuntimeEnv,
} from "../runtime-api.js";
import type { ResolvedMattermostAccount } from "../mattermost/accounts.js";
import { getMattermostRuntime } from "../runtime.js";
import {
createMattermostClient,

View File

@ -1,5 +1,5 @@
import type { PluginRuntime } from "./runtime-api.js";
import { createPluginRuntimeStore } from "openclaw/plugin-sdk/runtime-store";
import type { PluginRuntime } from "./runtime-api.js";
const { setRuntime: setMattermostRuntime, getRuntime: getMattermostRuntime } =
createPluginRuntimeStore<PluginRuntime>("Mattermost runtime not initialized");

View File

@ -1,4 +1,6 @@
import type { ChannelSetupAdapter } from "openclaw/plugin-sdk/channel-runtime";
import { resolveMattermostAccount, type ResolvedMattermostAccount } from "./mattermost/accounts.js";
import { normalizeMattermostBaseUrl } from "./mattermost/client.js";
import {
applyAccountNameToChannelSection,
applySetupAccountConfigPatch,
@ -8,8 +10,6 @@ import {
normalizeAccountId,
type OpenClawConfig,
} from "./runtime-api.js";
import { resolveMattermostAccount, type ResolvedMattermostAccount } from "./mattermost/accounts.js";
import { normalizeMattermostBaseUrl } from "./mattermost/client.js";
const channel = "mattermost" as const;

View File

@ -1,13 +1,13 @@
import { type ChannelSetupWizard } from "openclaw/plugin-sdk/setup";
import { formatDocsLink } from "openclaw/plugin-sdk/setup";
import { listMattermostAccountIds } from "./mattermost/accounts.js";
import { normalizeMattermostBaseUrl } from "./mattermost/client.js";
import {
applySetupAccountConfigPatch,
DEFAULT_ACCOUNT_ID,
hasConfiguredSecretInput,
type OpenClawConfig,
} from "./runtime-api.js";
import { type ChannelSetupWizard } from "openclaw/plugin-sdk/setup";
import { formatDocsLink } from "openclaw/plugin-sdk/setup";
import { listMattermostAccountIds } from "./mattermost/accounts.js";
import { normalizeMattermostBaseUrl } from "./mattermost/client.js";
import {
isMattermostConfigured,
mattermostSetupAdapter,