vault_prompt_scope installs the vault callbacks only for local-viewer
(Desktop/TUI) turns, so on Discord `browser_vault action=enter_code`
returns prompt_unavailable and a sign-in whose code arrives by SMS or
email cannot finish from chat (#141844).
A messaging turn whose adapter implements send_vault_code_prompt now
gets the code prompt (gateway/session_vault_code_card.py). Discord
implements it in a new sibling, adapter_vault_code.py: an "Enter code"
card whose button opens a modal for the turn's author only (base
allowlist admission still applies), so the code goes from the modal
submit to the waiting agent thread and is never posted, echoed or
logged. The wait runs in 1 s slices that honor /stop and feed the
inactivity watchdog. A failed send, a timeout or an interrupt returns ""
(code_declined), and the scope's exit releases a tool thread that is
still parked on a card.
can_prompt_here() keyed only off the unlock callback, so a surface that
installed the code prompt alone was reported as unable to ask. It now
takes the callback the caller is about to use. Only enter_code passes
one; unlock and save_login keep their answer on every surface.
Other messaging adapters, cron, webhooks and the API server are
unchanged: no send_vault_code_prompt means no callback and still
prompt_unavailable. Unlock and save_login are not offered on chat
platforms.
Closes#141844