SIGN IN SIGN UP

fix(wake): finish the node port — per-session cursor, honest faults, no private paths

Follow-up to #115 (@lichtpfad). The port was written against main before the
per-session cursor landed in #111, so the two drains would have disagreed about
who gets woken. Four things:

- Session key, same contract as the shell version: the cursor and the lock default
  to per-session names, so one message wakes every live session instead of only the
  first one to reach the hook.
- The cursor now advances to the last row actually reported, not to MAX(rowid). A
  message inserted between the SELECT and the tip query was stepped over and never
  woke anyone.
- Faults are reported. `main().catch(() => exit(0))` swallowed everything: a corrupt
  store, a missing table and a Node without `node:sqlite` all looked exactly like
  "no new messages" — the same silent-hook failure this port was written to remove.
  One line on stderr, exit code still 0 so no false wake.
- `MURMUR_DB` defaults to `.data/murmur.db` (what the core store uses) instead of a
  path inside one machine's home. Same for the shell drain, the cold-idle watcher and
  the ACP producer wrapper, which execed an absolute path that exists nowhere else.

Adds tests/wake-drain-claude-node.test.mjs — the port had none: seed, emit, dedup,
cursor bound, per-session split, and both fault paths.
A
Alexander Vasiliev committed
ef3a5b8a0fa1cd1cd10209f0d6c3050fe87b8706
Parent: e436956