E2eGate takes an optional recover callback. When the key stays locked
for want of a passphrase (needsPassphrase or wrongKey), the gate asks
it once, saves what it returns into the keystore and opens again. A
bad header never asks; a wrong answer leaves the lock button.
fetchWrapperPassphrase reads <app>/sync-passphrase from the desktop
app's PC wrapper (null on 404, a malformed body, or no wrapper).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WzxdWY91NZkk1AH6ugi6ya
Moves the tutor app's generic relay client (RTDB REST/SSE, e2e
sealing per an app layout, request hub, rev watcher, passphrase gate,
Google->Firebase session, desktop credential adoption) into
rtdb_relay/dart. The tutor vectors and a differential test against
the tutor's frozen pre-extraction sealer pin the wire format.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WzxdWYeKVg9WihaikbfDSe