prompt + bios: drop SW module cache the moment a new deploy is detected
The piece-runs telemetry from the iPhone showed a familiar pattern:
prompt.mjs's version poll surfaces "๐ฆ New deployment detected: <hash>"
within ~1s of cap loading, but the page is still running last-deploy's
cached bios.mjs / disk.mjs (so the new bios's camera:debug events
never get sent โ and any rotation/UX fixes don't take effect).
Now when prompt sees the version flip:
- prompt.mjs send()s a new "sw:clear-cache" message to the main thread
(it can't talk to the SW directly because it runs in a Web Worker).
- bios.mjs catches it in receivedChange and calls
navigator.serviceWorker.controller.postMessage("clearCache"), which
the SW already knows how to handle (caches.delete(CACHE_NAME)).
We don't auto-reload โ that'd interrupt mid-task โ but the cache
eviction means the user's next manual reload pulls genuinely fresh
modules instead of stale-while-revalidating for up to an hour.
Should noticeably tighten the fix-deploy-test loop, especially on the
iOS app where WKWebView's HTTP cache compounds with the SW's.