refactor(plugins): drop unused web-channel send wrapper

This commit is contained in:
Vincent Koc
2026-06-19 17:52:10 +08:00
parent 3091c13713
commit 7fcbfa6971
2 changed files with 0 additions and 34 deletions

View File

@@ -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<void>;
sendMessageWhatsApp: (
to: string,
body: string,
options: {
verbose: boolean;
cfg?: OpenClawConfig;
mediaUrl?: string;
mediaAccess?: {
localRoots?: readonly string[];
readFile?: (filePath: string) => Promise<Buffer>;
};
mediaLocalRoots?: readonly string[];
mediaReadFile?: (filePath: string) => Promise<Buffer>;
gifPlayback?: boolean;
accountId?: string;
},
) => Promise<{ messageId: string; toJid: string }>;
monitorWebChannel: (...args: unknown[]) => Promise<unknown>;
monitorWebInbox: (...args: unknown[]) => Promise<unknown>;
startWebLoginWithQr: (...args: unknown[]) => Promise<unknown>;
@@ -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<WebChannelHeavyRuntimeModule["sendMessageWhatsApp"]>
): ReturnType<WebChannelHeavyRuntimeModule["sendMessageWhatsApp"]> {
return loadWebChannelHeavyModule().then((loaded) => loaded.sendMessageWhatsApp(...args));
}
/** Formats a web-channel runtime error through the light runtime API. */
export function formatError(
...args: Parameters<WebChannelLightRuntimeModule["formatError"]>