Files
hermes-agent/scripts
Teknium ac8d524a45 fix(whatsapp): pairing and the bridge agree on the pin, its validity and its source
Review findings on #162647:

- Pairing read the pin through a second merge implementation that missed the
  managed overlay's precedence, case-blind platform names and gateway.json.
  It now reads the saved WhatsApp block through `platform_blocks()`, the
  side-effect-free reader the cron and left-core paths already use, and
  takes `PlatformConfig.from_dict(block).extra` from it; the parallel
  `yaml_platform_extra` is removed.
- Python accepted pins bridge.js refuses (non-ASCII digits, a float list),
  so `hermes whatsapp` could clear the linked session and then fail on the
  pin. Both sides now accept only three ASCII parts within uint32 (the
  login encoder writes each part as uint32: larger values wrap on the
  wire), lists only of integers.
- The dashboard checked the pin before moving the session aside but the
  queued worker re-read config.yaml. The start route now validates once and
  hands that value to the worker.
- Pair-only treated 502/504 as permanent and stopped; they now reconnect
  like 503.
- A cold start with no version source answering logged "default" and
  /health reported null: the bridge now names Baileys' bundled build, and
  says when a build is the last lookup answer because the sources are
  down.
2026-12-01 16:49:15 -08:00
..
…