diff --git a/extensions/mattermost/index.ts b/extensions/mattermost/index.ts index 75b28cc1559..1dbf616c061 100644 --- a/extensions/mattermost/index.ts +++ b/extensions/mattermost/index.ts @@ -1,5 +1,5 @@ -import type { OpenClawPluginApi } from "openclaw/plugin-sdk/core"; -import { emptyPluginConfigSchema } from "openclaw/plugin-sdk/core"; +import type { OpenClawPluginApi } from "openclaw/plugin-sdk/mattermost"; +import { emptyPluginConfigSchema } from "openclaw/plugin-sdk/mattermost"; import { mattermostPlugin } from "./src/channel.js"; import { getSlashCommandState, registerSlashCommandRoute } from "./src/mattermost/slash-state.js"; import { setMattermostRuntime } from "./src/runtime.js"; diff --git a/extensions/mattermost/src/channel.test.ts b/extensions/mattermost/src/channel.test.ts index b0a24137c4d..e8f1480565c 100644 --- a/extensions/mattermost/src/channel.test.ts +++ b/extensions/mattermost/src/channel.test.ts @@ -1,5 +1,5 @@ -import type { OpenClawConfig } from "openclaw/plugin-sdk/compat"; -import { createReplyPrefixOptions } from "openclaw/plugin-sdk/compat"; +import type { OpenClawConfig } from "openclaw/plugin-sdk/mattermost"; +import { createReplyPrefixOptions } from "openclaw/plugin-sdk/mattermost"; import { beforeEach, describe, expect, it, vi } from "vitest"; const { sendMessageMattermostMock } = vi.hoisted(() => ({ sendMessageMattermostMock: vi.fn(), diff --git a/extensions/mattermost/src/channel.ts b/extensions/mattermost/src/channel.ts index a45e7b57e5b..9134af26704 100644 --- a/extensions/mattermost/src/channel.ts +++ b/extensions/mattermost/src/channel.ts @@ -12,7 +12,7 @@ import { type ChannelMessageActionAdapter, type ChannelMessageActionName, type ChannelPlugin, -} from "openclaw/plugin-sdk/compat"; +} from "openclaw/plugin-sdk/mattermost"; import { MattermostConfigSchema } from "./config-schema.js"; import { resolveMattermostGroupRequireMention } from "./group-mentions.js"; import { diff --git a/extensions/mattermost/src/config-schema.ts b/extensions/mattermost/src/config-schema.ts index a3dd07900e2..0bc43f22164 100644 --- a/extensions/mattermost/src/config-schema.ts +++ b/extensions/mattermost/src/config-schema.ts @@ -4,7 +4,7 @@ import { GroupPolicySchema, MarkdownConfigSchema, requireOpenAllowFrom, -} from "openclaw/plugin-sdk/compat"; +} from "openclaw/plugin-sdk/mattermost"; import { z } from "zod"; import { buildSecretInputSchema } from "./secret-input.js"; diff --git a/extensions/mattermost/src/group-mentions.ts b/extensions/mattermost/src/group-mentions.ts index 6f57c8f7970..22e5d53dc78 100644 --- a/extensions/mattermost/src/group-mentions.ts +++ b/extensions/mattermost/src/group-mentions.ts @@ -1,4 +1,4 @@ -import type { ChannelGroupContext } from "openclaw/plugin-sdk/compat"; +import type { ChannelGroupContext } from "openclaw/plugin-sdk/mattermost"; import { resolveMattermostAccount } from "./mattermost/accounts.js"; export function resolveMattermostGroupRequireMention( diff --git a/extensions/mattermost/src/mattermost/accounts.test.ts b/extensions/mattermost/src/mattermost/accounts.test.ts index 29011495398..b3ad8d49e04 100644 --- a/extensions/mattermost/src/mattermost/accounts.test.ts +++ b/extensions/mattermost/src/mattermost/accounts.test.ts @@ -1,4 +1,4 @@ -import type { OpenClawConfig } from "openclaw/plugin-sdk/compat"; +import type { OpenClawConfig } from "openclaw/plugin-sdk/mattermost"; import { describe, expect, it } from "vitest"; import { resolveDefaultMattermostAccountId } from "./accounts.js"; diff --git a/extensions/mattermost/src/mattermost/accounts.ts b/extensions/mattermost/src/mattermost/accounts.ts index 521bab481df..e8a3f5d9572 100644 --- a/extensions/mattermost/src/mattermost/accounts.ts +++ b/extensions/mattermost/src/mattermost/accounts.ts @@ -3,7 +3,7 @@ import { normalizeAccountId, normalizeOptionalAccountId, } from "openclaw/plugin-sdk/account-id"; -import type { OpenClawConfig } from "openclaw/plugin-sdk/compat"; +import type { OpenClawConfig } from "openclaw/plugin-sdk/mattermost"; import { normalizeResolvedSecretInputString, normalizeSecretInputString } from "../secret-input.js"; import type { MattermostAccountConfig, MattermostChatMode } from "../types.js"; import { normalizeMattermostBaseUrl } from "./client.js"; diff --git a/extensions/mattermost/src/mattermost/monitor-auth.ts b/extensions/mattermost/src/mattermost/monitor-auth.ts index edf945dbd16..1685d4b560a 100644 --- a/extensions/mattermost/src/mattermost/monitor-auth.ts +++ b/extensions/mattermost/src/mattermost/monitor-auth.ts @@ -1,7 +1,7 @@ import { resolveAllowlistMatchSimple, resolveEffectiveAllowFromLists, -} from "openclaw/plugin-sdk/compat"; +} from "openclaw/plugin-sdk/mattermost"; export function normalizeMattermostAllowEntry(entry: string): string { const trimmed = entry.trim(); diff --git a/extensions/mattermost/src/mattermost/monitor-helpers.ts b/extensions/mattermost/src/mattermost/monitor-helpers.ts index 74d6f7689df..1724f577485 100644 --- a/extensions/mattermost/src/mattermost/monitor-helpers.ts +++ b/extensions/mattermost/src/mattermost/monitor-helpers.ts @@ -2,8 +2,8 @@ import { formatInboundFromLabel as formatInboundFromLabelShared, resolveThreadSessionKeys as resolveThreadSessionKeysShared, type OpenClawConfig, -} from "openclaw/plugin-sdk/compat"; -export { createDedupeCache, rawDataToString } from "openclaw/plugin-sdk/compat"; +} from "openclaw/plugin-sdk/mattermost"; +export { createDedupeCache, rawDataToString } from "openclaw/plugin-sdk/mattermost"; export type ResponsePrefixContext = { model?: string; diff --git a/extensions/mattermost/src/mattermost/monitor-websocket.test.ts b/extensions/mattermost/src/mattermost/monitor-websocket.test.ts index 02b9f6a2742..171052637ce 100644 --- a/extensions/mattermost/src/mattermost/monitor-websocket.test.ts +++ b/extensions/mattermost/src/mattermost/monitor-websocket.test.ts @@ -1,4 +1,4 @@ -import type { RuntimeEnv } from "openclaw/plugin-sdk/compat"; +import type { RuntimeEnv } from "openclaw/plugin-sdk/mattermost"; import { describe, expect, it, vi } from "vitest"; import { createMattermostConnectOnce, diff --git a/extensions/mattermost/src/mattermost/monitor-websocket.ts b/extensions/mattermost/src/mattermost/monitor-websocket.ts index cfe5ab96fdc..7f04a18f09b 100644 --- a/extensions/mattermost/src/mattermost/monitor-websocket.ts +++ b/extensions/mattermost/src/mattermost/monitor-websocket.ts @@ -1,4 +1,4 @@ -import type { ChannelAccountSnapshot, RuntimeEnv } from "openclaw/plugin-sdk/compat"; +import type { ChannelAccountSnapshot, RuntimeEnv } from "openclaw/plugin-sdk/mattermost"; import WebSocket from "ws"; import type { MattermostPost } from "./client.js"; import { rawDataToString } from "./monitor-helpers.js"; diff --git a/extensions/mattermost/src/mattermost/monitor.authz.test.ts b/extensions/mattermost/src/mattermost/monitor.authz.test.ts index 9ee7071dac5..065904f373c 100644 --- a/extensions/mattermost/src/mattermost/monitor.authz.test.ts +++ b/extensions/mattermost/src/mattermost/monitor.authz.test.ts @@ -1,4 +1,4 @@ -import { resolveControlCommandGate } from "openclaw/plugin-sdk/compat"; +import { resolveControlCommandGate } from "openclaw/plugin-sdk/mattermost"; import { describe, expect, it } from "vitest"; import { resolveMattermostEffectiveAllowFromLists } from "./monitor-auth.js"; diff --git a/extensions/mattermost/src/mattermost/monitor.ts b/extensions/mattermost/src/mattermost/monitor.ts index d62ddd80896..0b7111fb941 100644 --- a/extensions/mattermost/src/mattermost/monitor.ts +++ b/extensions/mattermost/src/mattermost/monitor.ts @@ -4,7 +4,7 @@ import type { OpenClawConfig, ReplyPayload, RuntimeEnv, -} from "openclaw/plugin-sdk/compat"; +} from "openclaw/plugin-sdk/mattermost"; import { buildAgentMediaPayload, DM_GROUP_ACCESS_REASON, @@ -27,7 +27,7 @@ import { warnMissingProviderGroupPolicyFallbackOnce, listSkillCommandsForAgents, type HistoryEntry, -} from "openclaw/plugin-sdk/compat"; +} from "openclaw/plugin-sdk/mattermost"; import { getMattermostRuntime } from "../runtime.js"; import { resolveMattermostAccount } from "./accounts.js"; import { diff --git a/extensions/mattermost/src/mattermost/probe.ts b/extensions/mattermost/src/mattermost/probe.ts index f9ec2005af6..2966e20f209 100644 --- a/extensions/mattermost/src/mattermost/probe.ts +++ b/extensions/mattermost/src/mattermost/probe.ts @@ -1,4 +1,4 @@ -import type { BaseProbeResult } from "openclaw/plugin-sdk/compat"; +import type { BaseProbeResult } from "openclaw/plugin-sdk/mattermost"; import { normalizeMattermostBaseUrl, readMattermostError, type MattermostUser } from "./client.js"; export type MattermostProbe = BaseProbeResult & { diff --git a/extensions/mattermost/src/mattermost/reactions.test-helpers.ts b/extensions/mattermost/src/mattermost/reactions.test-helpers.ts index a19f9b00222..248b9355918 100644 --- a/extensions/mattermost/src/mattermost/reactions.test-helpers.ts +++ b/extensions/mattermost/src/mattermost/reactions.test-helpers.ts @@ -1,4 +1,4 @@ -import type { OpenClawConfig } from "openclaw/plugin-sdk/compat"; +import type { OpenClawConfig } from "openclaw/plugin-sdk/mattermost"; import { expect, vi } from "vitest"; export function createMattermostTestConfig(): OpenClawConfig { diff --git a/extensions/mattermost/src/mattermost/reactions.ts b/extensions/mattermost/src/mattermost/reactions.ts index 7bb3d5eca08..3515153edd2 100644 --- a/extensions/mattermost/src/mattermost/reactions.ts +++ b/extensions/mattermost/src/mattermost/reactions.ts @@ -1,4 +1,4 @@ -import type { OpenClawConfig } from "openclaw/plugin-sdk/compat"; +import type { OpenClawConfig } from "openclaw/plugin-sdk/mattermost"; import { resolveMattermostAccount } from "./accounts.js"; import { createMattermostClient, fetchMattermostMe, type MattermostClient } from "./client.js"; diff --git a/extensions/mattermost/src/mattermost/send.test.ts b/extensions/mattermost/src/mattermost/send.test.ts index d924529517c..a4a710a41b4 100644 --- a/extensions/mattermost/src/mattermost/send.test.ts +++ b/extensions/mattermost/src/mattermost/send.test.ts @@ -18,7 +18,7 @@ const mockState = vi.hoisted(() => ({ uploadMattermostFile: vi.fn(), })); -vi.mock("openclaw/plugin-sdk", () => ({ +vi.mock("openclaw/plugin-sdk/mattermost", () => ({ loadOutboundMediaFromUrl: mockState.loadOutboundMediaFromUrl, })); diff --git a/extensions/mattermost/src/mattermost/send.ts b/extensions/mattermost/src/mattermost/send.ts index e7805f39308..6beb18539bd 100644 --- a/extensions/mattermost/src/mattermost/send.ts +++ b/extensions/mattermost/src/mattermost/send.ts @@ -1,4 +1,4 @@ -import { loadOutboundMediaFromUrl, type OpenClawConfig } from "openclaw/plugin-sdk/compat"; +import { loadOutboundMediaFromUrl, type OpenClawConfig } from "openclaw/plugin-sdk/mattermost"; import { getMattermostRuntime } from "../runtime.js"; import { resolveMattermostAccount } from "./accounts.js"; import { diff --git a/extensions/mattermost/src/mattermost/slash-http.test.ts b/extensions/mattermost/src/mattermost/slash-http.test.ts index 7592de3c4dd..92a6babe35c 100644 --- a/extensions/mattermost/src/mattermost/slash-http.test.ts +++ b/extensions/mattermost/src/mattermost/slash-http.test.ts @@ -1,6 +1,6 @@ import type { IncomingMessage, ServerResponse } from "node:http"; import { PassThrough } from "node:stream"; -import type { OpenClawConfig, RuntimeEnv } from "openclaw/plugin-sdk/compat"; +import type { OpenClawConfig, RuntimeEnv } from "openclaw/plugin-sdk/mattermost"; import { describe, expect, it } from "vitest"; import type { ResolvedMattermostAccount } from "./accounts.js"; import { createSlashCommandHttpHandler } from "./slash-http.js"; diff --git a/extensions/mattermost/src/mattermost/slash-http.ts b/extensions/mattermost/src/mattermost/slash-http.ts index 49f0e89c1ea..004d8af80d7 100644 --- a/extensions/mattermost/src/mattermost/slash-http.ts +++ b/extensions/mattermost/src/mattermost/slash-http.ts @@ -6,14 +6,14 @@ */ import type { IncomingMessage, ServerResponse } from "node:http"; -import type { OpenClawConfig, ReplyPayload, RuntimeEnv } from "openclaw/plugin-sdk/compat"; +import type { OpenClawConfig, ReplyPayload, RuntimeEnv } from "openclaw/plugin-sdk/mattermost"; import { createReplyPrefixOptions, createTypingCallbacks, isDangerousNameMatchingEnabled, logTypingFailure, resolveControlCommandGate, -} from "openclaw/plugin-sdk/compat"; +} from "openclaw/plugin-sdk/mattermost"; import type { ResolvedMattermostAccount } from "../mattermost/accounts.js"; import { getMattermostRuntime } from "../runtime.js"; import { diff --git a/extensions/mattermost/src/mattermost/slash-state.ts b/extensions/mattermost/src/mattermost/slash-state.ts index 2ecf9eba2bf..f79f670df8d 100644 --- a/extensions/mattermost/src/mattermost/slash-state.ts +++ b/extensions/mattermost/src/mattermost/slash-state.ts @@ -10,7 +10,7 @@ */ import type { IncomingMessage, ServerResponse } from "node:http"; -import type { OpenClawPluginApi } from "openclaw/plugin-sdk/compat"; +import type { OpenClawPluginApi } from "openclaw/plugin-sdk/mattermost"; import type { ResolvedMattermostAccount } from "./accounts.js"; import { resolveSlashCommandConfig, type MattermostRegisteredCommand } from "./slash-commands.js"; import { createSlashCommandHttpHandler } from "./slash-http.js"; @@ -86,8 +86,8 @@ export function activateSlashCommands(params: { registeredCommands: MattermostRegisteredCommand[]; triggerMap?: Map; api: { - cfg: import("openclaw/plugin-sdk/compat").OpenClawConfig; - runtime: import("openclaw/plugin-sdk/compat").RuntimeEnv; + cfg: import("openclaw/plugin-sdk/mattermost").OpenClawConfig; + runtime: import("openclaw/plugin-sdk/mattermost").RuntimeEnv; }; log?: (msg: string) => void; }) { diff --git a/extensions/mattermost/src/onboarding-helpers.ts b/extensions/mattermost/src/onboarding-helpers.ts index f3797c608ad..b125b0371e5 100644 --- a/extensions/mattermost/src/onboarding-helpers.ts +++ b/extensions/mattermost/src/onboarding-helpers.ts @@ -1 +1 @@ -export { promptAccountId } from "openclaw/plugin-sdk/compat"; +export { promptAccountId } from "openclaw/plugin-sdk/mattermost"; diff --git a/extensions/mattermost/src/onboarding.status.test.ts b/extensions/mattermost/src/onboarding.status.test.ts index fa1cc13c382..af0e9be5b00 100644 --- a/extensions/mattermost/src/onboarding.status.test.ts +++ b/extensions/mattermost/src/onboarding.status.test.ts @@ -1,4 +1,4 @@ -import type { OpenClawConfig } from "openclaw/plugin-sdk/compat"; +import type { OpenClawConfig } from "openclaw/plugin-sdk/mattermost"; import { describe, expect, it } from "vitest"; import { mattermostOnboardingAdapter } from "./onboarding.js"; diff --git a/extensions/mattermost/src/onboarding.ts b/extensions/mattermost/src/onboarding.ts index c1f01b4622c..5204f512d23 100644 --- a/extensions/mattermost/src/onboarding.ts +++ b/extensions/mattermost/src/onboarding.ts @@ -6,7 +6,7 @@ import { type OpenClawConfig, type SecretInput, type WizardPrompter, -} from "openclaw/plugin-sdk/compat"; +} from "openclaw/plugin-sdk/mattermost"; import { listMattermostAccountIds, resolveDefaultMattermostAccountId, diff --git a/extensions/mattermost/src/runtime.ts b/extensions/mattermost/src/runtime.ts index e2cb807f30f..f6e5e83f270 100644 --- a/extensions/mattermost/src/runtime.ts +++ b/extensions/mattermost/src/runtime.ts @@ -1,4 +1,4 @@ -import type { PluginRuntime } from "openclaw/plugin-sdk/compat"; +import type { PluginRuntime } from "openclaw/plugin-sdk/mattermost"; let runtime: PluginRuntime | null = null; diff --git a/extensions/mattermost/src/secret-input.ts b/extensions/mattermost/src/secret-input.ts index 3fc82b3ac91..017109424bc 100644 --- a/extensions/mattermost/src/secret-input.ts +++ b/extensions/mattermost/src/secret-input.ts @@ -2,7 +2,7 @@ import { hasConfiguredSecretInput, normalizeResolvedSecretInputString, normalizeSecretInputString, -} from "openclaw/plugin-sdk/compat"; +} from "openclaw/plugin-sdk/mattermost"; import { z } from "zod"; export { hasConfiguredSecretInput, normalizeResolvedSecretInputString, normalizeSecretInputString }; diff --git a/extensions/mattermost/src/types.ts b/extensions/mattermost/src/types.ts index d2b50e3a510..5de38e7833c 100644 --- a/extensions/mattermost/src/types.ts +++ b/extensions/mattermost/src/types.ts @@ -3,7 +3,7 @@ import type { DmPolicy, GroupPolicy, SecretInput, -} from "openclaw/plugin-sdk/compat"; +} from "openclaw/plugin-sdk/mattermost"; export type MattermostChatMode = "oncall" | "onmessage" | "onchar";