Commit Graph
9 Commits
Author SHA1 Message Date
Daniele a2bbedad40 whatsapp: fix history sync + session corruption, Baileys 7.0.0-rc14 (v7 / 2.1.0)
Diagnosed from the live server (two users, two accounts, one shared log).

- history sync was gated off entirely on Baileys 6.7.x: the library derives
  shouldSyncHistoryMessage from syncFullHistory when unset, and the connector
  shipped syncFullHistory: false. Now both are passed explicitly, so behaviour
  no longer depends on the resolved Baileys version. browser -> ['Mac OS', ...]
  because PLATFORM_MAP only grants a desktop-grade sync to Mac OS / Windows.
- reconnects leaked their socket, leaving two writers over auth/: no end(), no
  removeAllListeners(). ~15 reconnects/day produced 1422 Bad MAC lines, all on
  the account's own LID device 0. Added teardownSock(), per-socket generation
  guards, and a single-slot reconnect timer with exponential backoff.
- undecryptable messages (stubType CIPHERTEXT) were stored with empty text and
  rendered as blank transcript lines; now labelled and counted. Text-less
  protocol frames are dropped.
- fetchLatestBaileysVersion() ran on every reconnect; now cached for 6h.
- libsignal's direct console.error spam collapsed into one counted line, log
  lines tagged with the linked account, console.log redirected off stdout.

Baileys pinned ^6.7.9 -> 7.0.0-rc14 (the range resolved to 6.7.24 for one user
and 6.17.16 for the other). RC is ESM-only, so index.js is now ESM.

Verified on skald-runtime:v4 (Node 20.19.2): initialize, tools/list, status,
list_chats, version fetch, QR, and logout -> teardown -> single reconnect.

Remaining gap: the store is still in-memory only, so synced history is lost on
the next process restart.
2026-08-23 18:15:56 +01:00
dguiducci ccab72c586 Nuovo sistema: index.json + fragment.json + compile.py (SHA-256 automatici) 2026-07-22 22:52:01 +01:00
dguiducci 9236f668ec Fix llm_short_description: descrivere cosa fa l'MCP, non elencare i tool 2026-07-22 22:24:10 +01:00
dguiducci 3440890d11 Migliorate llm_short_description per tutti i connector — tool names espliciti
Ogni connector.json ora ha una llm_short_description che elenca i tool
specifici che espone, così l'LLM sa esattamente cosa attivare (lazy load).

SKALD.md: documentata criticità del campo llm_short_description
nel system prompt dell'LLM.
2026-07-22 22:21:52 +01:00
dguiducci 955b1ba069 feat: friendly tool names per MCP title field or manifest
- Aggiunto campo 'title' a tools/list in tutti gli script MCP locali
  (Gmail, Gcal, Drive, Email, SSH, Weather, Wikipedia, WhatsApp)
- Aggiunto tools[]/display_name nel manifest per connector remoti/package
  esterni (Firecrawl, HTTP Fetch, Exa, Tavily, SerpAPI Flights)
- Documentata convenzione e resolution order in SKALD.md
- Aggiornata manifest_guide.md per tools[] in connectors.json
- Bumped version e sha256 per tutti i 13 connector
2026-07-21 23:43:24 +01:00
dguiducci b83b2feb0f whatsapp: bump version 1→2 for update detection test (2.0.1→2.0.2) 2026-07-19 10:27:57 +01:00
dguiducci 7039816b73 Add versioning schema: version (int), version_string, version_release_date to all 10 connectors
- version: intero per-connector (parte da 1)
- version_string: semver ereditato (display only)
- version_release_date: ISO 8601 (display only)
- Campi identici in index (connectors.json) e manifest (connector.json)
- Aggiunto connector.json alle files[] di gmail, gcal, email, ssh, tavily
- Aggiornata documentazione in SKALD.md
2026-07-19 10:23:22 +01:00
dguiducci dd88363d98 whatsapp: fix crypto.subtle polyfill for Node 18, bump to v2.0.1 2026-07-19 10:16:37 +01:00
dguiducci 4e428073df Add WhatsApp connector v2 (Baileys, QR auth) 2026-07-19 10:08:12 +01:00