WhatsApp: move action runtime into extension

This commit is contained in:
Gustavo Madeira Santana
2026-03-18 02:07:39 +00:00
parent b3ae50c71c
commit 8165db758b
6 changed files with 32 additions and 25 deletions

View File

@@ -68,7 +68,7 @@ let webLoginQrPromise: Promise<
> | null = null;
let webChannelPromise: Promise<typeof import("../../channels/web/index.js")> | null = null;
let whatsappActionsPromise: Promise<
typeof import("../../agents/tools/whatsapp-actions.js")
typeof import("../../../extensions/whatsapp/runtime-api.js")
> | null = null;
function loadWebLoginQr() {
@@ -82,7 +82,7 @@ function loadWebChannel() {
}
function loadWhatsAppActions() {
whatsappActionsPromise ??= import("../../agents/tools/whatsapp-actions.js");
whatsappActionsPromise ??= import("../../../extensions/whatsapp/runtime-api.js");
return whatsappActionsPromise;
}

View File

@@ -217,7 +217,7 @@ export type PluginRuntimeChannel = {
startWebLoginWithQr: typeof import("../../../extensions/whatsapp/login-qr-api.js").startWebLoginWithQr;
waitForWebLogin: typeof import("../../../extensions/whatsapp/login-qr-api.js").waitForWebLogin;
monitorWebChannel: typeof import("../../channels/web/index.js").monitorWebChannel;
handleWhatsAppAction: typeof import("../../agents/tools/whatsapp-actions.js").handleWhatsAppAction;
handleWhatsAppAction: typeof import("../../../extensions/whatsapp/runtime-api.js").handleWhatsAppAction;
createLoginTool: typeof import("./runtime-whatsapp-login-tool.js").createRuntimeWhatsAppLoginTool;
};
line: {