Add SmartSpectra capture with a live camera preview
Commit
The main process now owns the measurement session: it loads the key from .env, opens the camera through the SmartSpectra SDK, stores pulse samples in the session, and publishes validation hints and SDK errors to the page.
Measured on this machine: feeding the SDK frames from the page (custom input) produced zero metrics events at both 16:9 and square crops, while its own camera produced a series. The preview is therefore a tap on the SDK's videoOutput, downscaled to 320 px, so the page never opens a second stream.
Shutdown has one owner. Capture stops before the session header closes, the stop promise is shared by the page, consent withdrawal, window close and quit, and teardown is bounded at every stage because destroy waits on the same in-flight stop. In-flight sample writes drain before finalization, so the tail of a session is not lost.
Main-process logging can no longer take the process down: a closed stdout was an uncaught EPIPE during a measurement.
Co-authored-by: Copilot 223556219+Copilot@users.noreply.github.com