From b3ca855283990ba7725b92cabc426e7548a8cef7 Mon Sep 17 00:00:00 2001 From: Vincent Koc Date: Wed, 18 Mar 2026 09:37:42 -0700 Subject: [PATCH] Plugin SDK: use public whatsapp subpath --- src/channel-web.ts | 14 +++++++++----- src/cli/deps.ts | 2 +- src/cli/send-runtime/whatsapp.ts | 4 ++-- src/config/plugin-auto-enable.ts | 2 +- src/cron/isolated-agent/delivery-target.ts | 2 +- 5 files changed, 14 insertions(+), 10 deletions(-) diff --git a/src/channel-web.ts b/src/channel-web.ts index 38d5a3c02cb..3566cee4790 100644 --- a/src/channel-web.ts +++ b/src/channel-web.ts @@ -7,11 +7,15 @@ export { monitorWebChannel, resolveHeartbeatRecipients, runWebHeartbeatOnce, -} from "./plugin-sdk/whatsapp.js"; -export { extractMediaPlaceholder, extractText, monitorWebInbox } from "./plugin-sdk/whatsapp.js"; -export { loginWeb } from "./plugin-sdk/whatsapp.js"; +} from "openclaw/plugin-sdk/whatsapp"; +export { + extractMediaPlaceholder, + extractText, + monitorWebInbox, +} from "openclaw/plugin-sdk/whatsapp"; +export { loginWeb } from "openclaw/plugin-sdk/whatsapp"; export { loadWebMedia, optimizeImageToJpeg } from "./media/web-media.js"; -export { sendMessageWhatsApp } from "./plugin-sdk/whatsapp.js"; +export { sendMessageWhatsApp } from "openclaw/plugin-sdk/whatsapp"; export { createWaSocket, formatError, @@ -22,4 +26,4 @@ export { WA_WEB_AUTH_DIR, waitForWaConnection, webAuthExists, -} from "./plugin-sdk/whatsapp.js"; +} from "openclaw/plugin-sdk/whatsapp"; diff --git a/src/cli/deps.ts b/src/cli/deps.ts index 1d9d6885fe2..23d2d9af399 100644 --- a/src/cli/deps.ts +++ b/src/cli/deps.ts @@ -70,4 +70,4 @@ export function createOutboundSendDeps(deps: CliDeps): OutboundSendDeps { return createOutboundSendDepsFromCliSource(deps); } -export { logWebSelfId } from "../plugin-sdk/whatsapp.js"; +export { logWebSelfId } from "openclaw/plugin-sdk/whatsapp"; diff --git a/src/cli/send-runtime/whatsapp.ts b/src/cli/send-runtime/whatsapp.ts index 49f0e50baa6..b1e731e7c44 100644 --- a/src/cli/send-runtime/whatsapp.ts +++ b/src/cli/send-runtime/whatsapp.ts @@ -1,7 +1,7 @@ -import { sendMessageWhatsApp as sendMessageWhatsAppImpl } from "../../plugin-sdk/whatsapp.js"; +import { sendMessageWhatsApp as sendMessageWhatsAppImpl } from "openclaw/plugin-sdk/whatsapp"; type RuntimeSend = { - sendMessage: typeof import("../../plugin-sdk/whatsapp.js").sendMessageWhatsApp; + sendMessage: typeof import("openclaw/plugin-sdk/whatsapp").sendMessageWhatsApp; }; export const runtimeSend = { diff --git a/src/config/plugin-auto-enable.ts b/src/config/plugin-auto-enable.ts index 1deaad96d6f..54fd24b5880 100644 --- a/src/config/plugin-auto-enable.ts +++ b/src/config/plugin-auto-enable.ts @@ -1,3 +1,4 @@ +import { hasAnyWhatsAppAuth } from "openclaw/plugin-sdk/whatsapp"; import { normalizeProviderId } from "../agents/model-selection.js"; import { hasMeaningfulChannelConfig } from "../channels/config-presence.js"; import { @@ -9,7 +10,6 @@ import { listChatChannels, normalizeChatChannelId, } from "../channels/registry.js"; -import { hasAnyWhatsAppAuth } from "../plugin-sdk/whatsapp.js"; import { loadPluginManifestRegistry, type PluginManifestRegistry, diff --git a/src/cron/isolated-agent/delivery-target.ts b/src/cron/isolated-agent/delivery-target.ts index e903cd15cab..85966c3e07c 100644 --- a/src/cron/isolated-agent/delivery-target.ts +++ b/src/cron/isolated-agent/delivery-target.ts @@ -1,3 +1,4 @@ +import { resolveWhatsAppAccount } from "openclaw/plugin-sdk/whatsapp"; import type { ChannelId } from "../../channels/plugins/types.js"; import type { OpenClawConfig } from "../../config/config.js"; import { @@ -13,7 +14,6 @@ import { resolveSessionDeliveryTarget, } from "../../infra/outbound/targets.js"; import { readChannelAllowFromStoreSync } from "../../pairing/pairing-store.js"; -import { resolveWhatsAppAccount } from "../../plugin-sdk/whatsapp.js"; import { buildChannelAccountBindings } from "../../routing/bindings.js"; import { normalizeAccountId, normalizeAgentId } from "../../routing/session-key.js"; import { normalizeWhatsAppTarget } from "../../whatsapp/normalize.js";