feat(FN-3714): add WhatsApp chat plugin with plugin discovery and install U
Adds a WhatsApp chat plugin (`plugins/fusion-plugin-whatsapp-chat/`) as the first bundled plugin, including the plugin package with UI rendering, dashboard plugin manager integration, CLI bundling support, and plugin route runtime context. Also updates documentation to cover plugin management and ap Fusion-Task-Id: FN-3714
This commit is contained in:
@@ -26,6 +26,8 @@ const llamaCppSrc = join(__dirname, "..", "pi-llama-cpp");
|
||||
const llamaCppDest = join(__dirname, "dist", "pi-llama-cpp");
|
||||
const dependencyGraphPluginSrc = join(__dirname, "..", "..", "plugins", "fusion-plugin-dependency-graph");
|
||||
const dependencyGraphPluginDest = join(__dirname, "dist", "plugins", "fusion-plugin-dependency-graph");
|
||||
const whatsappChatPluginSrc = join(__dirname, "..", "..", "plugins", "fusion-plugin-whatsapp-chat");
|
||||
const whatsappChatPluginDest = join(__dirname, "dist", "plugins", "fusion-plugin-whatsapp-chat");
|
||||
const dashboardClientStub = `<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
@@ -140,6 +142,21 @@ export default defineConfig({
|
||||
);
|
||||
}
|
||||
|
||||
if (existsSync(whatsappChatPluginDest)) {
|
||||
rmSync(whatsappChatPluginDest, { recursive: true, force: true });
|
||||
}
|
||||
if (existsSync(whatsappChatPluginSrc)) {
|
||||
mkdirSync(whatsappChatPluginDest, { recursive: true });
|
||||
cpSync(join(whatsappChatPluginSrc, "manifest.json"), join(whatsappChatPluginDest, "manifest.json"));
|
||||
cpSync(join(whatsappChatPluginSrc, "package.json"), join(whatsappChatPluginDest, "package.json"));
|
||||
cpSync(join(whatsappChatPluginSrc, "src"), join(whatsappChatPluginDest, "src"), { recursive: true });
|
||||
console.log("Copied WhatsApp chat plugin to dist/plugins/fusion-plugin-whatsapp-chat/");
|
||||
} else {
|
||||
console.warn(
|
||||
`WARNING: WhatsApp chat plugin source not found at ${whatsappChatPluginSrc}; bundled auto-install will be unavailable.`,
|
||||
);
|
||||
}
|
||||
|
||||
// Bundle each runtime plugin into a self-contained ESM file so npm/npx
|
||||
// installs can load them without the workspace `@fusion/plugin-sdk`.
|
||||
for (const pluginId of RUNTIME_PLUGIN_IDS) {
|
||||
|
||||
Reference in New Issue
Block a user