diff --git a/src/gateway/test-helpers.mocks.ts b/src/gateway/test-helpers.mocks.ts index 9674cab0c09..72883798c85 100644 --- a/src/gateway/test-helpers.mocks.ts +++ b/src/gateway/test-helpers.mocks.ts @@ -327,14 +327,5 @@ vi.mock("../plugins/loader.js", async () => { loadOpenClawPlugins: () => getTestPluginRegistry(), }; }); -vi.mock("../plugins/runtime/runtime-web-channel-plugin.js", () => ({ - sendWebChannelMessage: (...args: unknown[]) => - (gatewayTestHoisted.sendWhatsAppMock as (...args: unknown[]) => unknown)(...args), -})); -vi.mock("/src/plugins/runtime/runtime-web-channel-plugin.js", () => ({ - sendWebChannelMessage: (...args: unknown[]) => - (gatewayTestHoisted.sendWhatsAppMock as (...args: unknown[]) => unknown)(...args), -})); - process.env.OPENCLAW_SKIP_CHANNELS = "1"; process.env.OPENCLAW_SKIP_CRON = "1"; diff --git a/src/plugins/runtime/runtime-web-channel-plugin.ts b/src/plugins/runtime/runtime-web-channel-plugin.ts index fc916a2b299..cf5026ffc0a 100644 --- a/src/plugins/runtime/runtime-web-channel-plugin.ts +++ b/src/plugins/runtime/runtime-web-channel-plugin.ts @@ -1,5 +1,4 @@ // Runtime web-channel plugin helpers expose web-channel tools through activated plugin runtimes. -import type { OpenClawConfig } from "../../config/types.openclaw.js"; import { getDefaultLocalRoots as getDefaultLocalRootsImpl, loadWebMedia as loadWebMediaImpl, @@ -60,23 +59,6 @@ type WebChannelHeavyRuntimeModule = { runtime?: unknown, accountId?: string, ) => Promise; - sendMessageWhatsApp: ( - to: string, - body: string, - options: { - verbose: boolean; - cfg?: OpenClawConfig; - mediaUrl?: string; - mediaAccess?: { - localRoots?: readonly string[]; - readFile?: (filePath: string) => Promise; - }; - mediaLocalRoots?: readonly string[]; - mediaReadFile?: (filePath: string) => Promise; - gifPlayback?: boolean; - accountId?: string; - }, - ) => Promise<{ messageId: string; toJid: string }>; monitorWebChannel: (...args: unknown[]) => Promise; monitorWebInbox: (...args: unknown[]) => Promise; startWebLoginWithQr: (...args: unknown[]) => Promise; @@ -234,13 +216,6 @@ export function webAuthExists( return getLightExport("webAuthExists")(...args); } -/** Sends a web-channel message through the heavy runtime API. */ -export function sendWebChannelMessage( - ...args: Parameters -): ReturnType { - return loadWebChannelHeavyModule().then((loaded) => loaded.sendMessageWhatsApp(...args)); -} - /** Formats a web-channel runtime error through the light runtime API. */ export function formatError( ...args: Parameters