feat(FN-3713): migrate WhatsApp plugin to Baileys pairing flow

- Add Baileys-based connection/auth modules and pairing route support for QR, pair code, status, and logout
- Refactor plugin entrypoint and split reply/auth/connection logic into focused modules
- Update plugin metadata/docs/settings schema to pairing-era configuration and remove legacy webhook key usage
- Add targeted tests for auth state, connection handling, reply flow, and updated schema expectations

Fusion-Task-Id: FN-3713
This commit is contained in:
Fusion
2026-05-07 18:26:08 -07:00
committed by gsxdsm
parent 2e3be32f1b
commit ef7efd0c96
18 changed files with 1438 additions and 408 deletions

View File

@@ -125,7 +125,7 @@ const BUILTIN_PLUGINS: BuiltinPlugin[] = [
{
id: "fusion-plugin-whatsapp-chat",
name: "WhatsApp Chat",
description: "Connects WhatsApp Cloud webhooks to a Fusion agent conversation; requires Meta webhook and API credentials.",
description: "Pairs to WhatsApp Web (multi-device) with QR or pairing code, then bridges direct chats to a Fusion agent.",
category: "integration",
path: "./plugins/fusion-plugin-whatsapp-chat",
},

View File

@@ -268,6 +268,7 @@ describe("PluginManager", () => {
expect(screen.getByText("Droid Runtime")).toBeTruthy();
expect(screen.getByText("Dependency Graph")).toBeTruthy();
expect(screen.getByText("WhatsApp Chat")).toBeTruthy();
expect(screen.getByText(/Pairs to WhatsApp Web \(multi-device\) with QR or pairing code/i)).toBeTruthy();
});
it("renders built-in agent browser metadata-only entry when uninstalled", async () => {