WhatsApp delivers a history sync at login, not on reconnect, so an in-memory store left the connector blind after every process restart (23 in two weeks). The store is now mirrored to store/, next to auth/ and bind-mounted the same way. Not SQLite: node:sqlite needs Node 22 (unflagged only from 24) and the runtime image ships Debian trixie's nodejs = 20.19.2; better-sqlite3 is native and the slim image has no toolchain. So an append-only JSONL log for messages plus a debounced JSON snapshot for chats/contacts, both written tmp+rename so a crash cannot truncate them. Compaction on load and every 500 appends keeps the log from creeping upward. Also fixes a pre-existing duplication bug: pushMessage appended unconditionally, re-adding every message a history re-sync redelivered. It now returns false on a known id and the message is skipped in both the transcript and the log. MAX_MSGS_PER_CHAT 200 -> 500. logout deletes store/ with auth/, so re-linking a different phone cannot inherit the previous account's history. Data at rest: message text is now written to the user's bind-mounted home. Nothing but session keys was persisted before. Verified on skald-runtime:v4 with a seeded store: 751 lines with 50 duplicates, a 700-message chat and a torn trailing line -> 701 loaded, compacted to 501, cap applied, second run 501 -> 501 unchanged.
53 lines
1.6 KiB
JSON
53 lines
1.6 KiB
JSON
{
|
|
"id": "whatsapp",
|
|
"name": "WhatsApp",
|
|
"type": "mcp_local",
|
|
"scope": "user",
|
|
"launch_command": "node index.js",
|
|
"transport": "stdio",
|
|
"requires": [
|
|
"NODE"
|
|
],
|
|
"tags": [
|
|
"messaging",
|
|
"mcp",
|
|
"local",
|
|
"whatsapp",
|
|
"qr"
|
|
],
|
|
"dependencies": [
|
|
"@whiskeysockets/baileys@7.0.0-rc14",
|
|
"qrcode@1.5.4"
|
|
],
|
|
"setup_instructions": [
|
|
"Skald installs dependencies automatically (npm install).",
|
|
"Open the connector in Skald and scan the QR code with your WhatsApp phone.",
|
|
"The session is persisted and survives restarts.",
|
|
"The phone lists this device as \"Mac OS Chrome\": that browser identity is what makes WhatsApp deliver the full history sync.",
|
|
"Chats and messages are mirrored to ./store/ so they survive a restart; `logout` deletes them along with the session."
|
|
],
|
|
"docs": [
|
|
{
|
|
"lang": "en",
|
|
"description": "Send and read WhatsApp messages from your own linked account. Uses Baileys multi-device protocol — no browser, no Chromium needed. Link via QR code.",
|
|
"llm_short_description": "WhatsApp — read and send messages, manage chats, search contacts and messages, and download media from the user's linked WhatsApp session. QR-based authentication."
|
|
}
|
|
],
|
|
"auth": {
|
|
"type": "qr"
|
|
},
|
|
"mcp_config": {
|
|
"command": "node",
|
|
"args": [
|
|
"index.js"
|
|
],
|
|
"transport": "stdio"
|
|
},
|
|
"homepage": "https://github.com/WhiskeySockets/Baileys",
|
|
"icon_small": "icon_sm.png",
|
|
"icon_large": "icon_lg.png",
|
|
"version": 8,
|
|
"version_string": "2.2.0",
|
|
"version_release_date": "2026-08-23"
|
|
}
|