ADR-0001..0006 capture the scope decisions: no monetization, memory through a contract backed by local mem0 (knowledge graph deferred), team mode postponed, cost tracking open and self-learning out, whatsapp-web.js for WhatsApp, opt-in analytics. baseline.md records build, typecheck, lint and unit test results on macOS before scope work starts.
35 lines
1.5 KiB
Markdown
35 lines
1.5 KiB
Markdown
# ADR-0005: The WhatsApp channel uses whatsapp-web.js
|
|
|
|
- Status: Accepted, one open item (browser source)
|
|
- Date: 2026-10-14
|
|
|
|
## Context
|
|
|
|
The WhatsApp channel (`packages/server/src/local/channels/whatsapp-adapter.ts`) uses Baileys.
|
|
Baileys itself is MIT, but it depends on `libsignal`, which is GPL-3.0. The sidecar build
|
|
bundles both, which would put GPL code into the shipped community edition.
|
|
|
|
## Decision
|
|
|
|
Replace Baileys with `whatsapp-web.js` (Apache-2.0) and remove Baileys from the dependencies
|
|
of `server` and `launcher`.
|
|
|
|
## Consequences
|
|
|
|
- `whatsapp-web.js` drives a Chrome browser through Puppeteer. The installer does not bundle a
|
|
browser, and installing dependencies does not download one.
|
|
- Open item, proposed and awaiting the owner: use an installed Edge or Chrome, and download a
|
|
browser (about 170 MB) only if none is found when the user enables WhatsApp.
|
|
- Voice and video messages go through ffmpeg, which is not bundled because ffmpeg builds carry
|
|
their own LGPL or GPL terms. Use an installed ffmpeg or download it on demand.
|
|
- The client is unofficial. The UI warns that WhatsApp may block the account.
|
|
|
|
## Alternatives considered
|
|
|
|
- whatsmeow (Go, MPL-2.0): no browser, but needs a separate Go binary per platform.
|
|
- WPPConnect (LGPL-3.0): also browser-based, stricter license.
|
|
- venom-bot: no npm release since November 2024.
|
|
- open-wa: Hippocratic license, not an open-source license in the OSI sense.
|
|
- WhatsApp Business Cloud API: needs a business account and a public webhook, so it does not
|
|
fit a local app.
|