session.cloud reports whether the phone currently has a connection to MentraOS
cloud. The phone owns that connection. Your miniapp does not open, configure, or
close it. This module only observes and reports the current state, so you can
render honest UX (an online/offline indicator, a “reconnecting” hint).
src/background/index.ts
Reading status
status returns the latest CloudClientStatus snapshot. connected is true
only when status.status is "connected". isConnected() is a method alias for
connected.
Watching for changes
onStatusChanged delivers the current value to your handler immediately, then
calls it again on every change. You don’t need a separate read to hydrate UI.
CloudClientStatus
status is the connection state:
audioTransport is how audio reaches the cloud when a connection exists:
Some capabilities depend on the cloud connection.
session.transcription,
session.translation, and cloud
text-to-speech on session.speaker
degrade or stop while status.status is not "connected". Use session.cloud to
tell the user why, not to control the connection.
