@mentra/engine 0.1.0-dev.0 → 3.1.0-dev.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +55 -18
- package/build/bluetooth-sdk/debug.d.ts +2 -0
- package/build/bluetooth-sdk/debug.d.ts.map +1 -0
- package/build/bluetooth-sdk/debug.js +2 -0
- package/build/bluetooth-sdk/debug.js.map +1 -0
- package/build/bluetooth-sdk/index.d.ts +3 -0
- package/build/bluetooth-sdk/index.d.ts.map +1 -0
- package/build/bluetooth-sdk/index.js +3 -0
- package/build/bluetooth-sdk/index.js.map +1 -0
- package/build/bluetooth-sdk/photo-receiver.d.ts +3 -0
- package/build/bluetooth-sdk/photo-receiver.d.ts.map +1 -0
- package/build/bluetooth-sdk/photo-receiver.js +3 -0
- package/build/bluetooth-sdk/photo-receiver.js.map +1 -0
- package/build/bluetooth-sdk/react.d.ts +2 -0
- package/build/bluetooth-sdk/react.d.ts.map +1 -0
- package/build/bluetooth-sdk/react.js +2 -0
- package/build/bluetooth-sdk/react.js.map +1 -0
- package/build/bluetooth-sdk/types.d.ts +2 -0
- package/build/bluetooth-sdk/types.d.ts.map +1 -0
- package/build/bluetooth-sdk/types.js +2 -0
- package/build/bluetooth-sdk/types.js.map +1 -0
- package/build/engine.d.ts +24 -16
- package/build/engine.d.ts.map +1 -1
- package/build/engine.js +9 -4
- package/build/engine.js.map +1 -1
- package/build/facades/dev.d.ts +3 -2
- package/build/facades/dev.d.ts.map +1 -1
- package/build/facades/dev.js +18 -12
- package/build/facades/dev.js.map +1 -1
- package/build/facades/display.d.ts +1 -1
- package/build/facades/display.d.ts.map +1 -1
- package/build/facades/display.js +1 -1
- package/build/facades/display.js.map +1 -1
- package/build/facades/gallery.js +1 -1
- package/build/facades/gallery.js.map +1 -1
- package/build/facades/glasses.d.ts +4 -13
- package/build/facades/glasses.d.ts.map +1 -1
- package/build/facades/glasses.js +21 -6
- package/build/facades/glasses.js.map +1 -1
- package/build/facades/glassesSettings.d.ts.map +1 -1
- package/build/facades/glassesSettings.js +1 -0
- package/build/facades/glassesSettings.js.map +1 -1
- package/build/facades/miniapps.d.ts +4 -0
- package/build/facades/miniapps.d.ts.map +1 -1
- package/build/facades/miniapps.js +5 -0
- package/build/facades/miniapps.js.map +1 -1
- package/build/facades/ota.d.ts +14 -16
- package/build/facades/ota.d.ts.map +1 -1
- package/build/facades/ota.js +22 -7
- package/build/facades/ota.js.map +1 -1
- package/build/facades/pairing.d.ts +8 -5
- package/build/facades/pairing.d.ts.map +1 -1
- package/build/facades/pairing.js +12 -10
- package/build/facades/pairing.js.map +1 -1
- package/build/facades/permissions.d.ts +10 -0
- package/build/facades/permissions.d.ts.map +1 -1
- package/build/facades/permissions.js +10 -0
- package/build/facades/permissions.js.map +1 -1
- package/build/facades/phoneNotifications.d.ts +0 -4
- package/build/facades/phoneNotifications.d.ts.map +1 -1
- package/build/facades/phoneNotifications.js +4 -14
- package/build/facades/phoneNotifications.js.map +1 -1
- package/build/facades/speech.d.ts +7 -6
- package/build/facades/speech.d.ts.map +1 -1
- package/build/facades/speech.js +1 -1
- package/build/facades/speech.js.map +1 -1
- package/build/generated/releaseMetadata.d.ts +12 -0
- package/build/generated/releaseMetadata.d.ts.map +1 -0
- package/build/generated/releaseMetadata.js +10 -0
- package/build/generated/releaseMetadata.js.map +1 -0
- package/build/index.d.ts +10 -8
- package/build/index.d.ts.map +1 -1
- package/build/index.js +6 -5
- package/build/index.js.map +1 -1
- package/build/react/MentraLiveOtaFlow.d.ts +38 -0
- package/build/react/MentraLiveOtaFlow.d.ts.map +1 -0
- package/build/react/MentraLiveOtaFlow.js +528 -0
- package/build/react/MentraLiveOtaFlow.js.map +1 -0
- package/build/react/index.d.ts +2 -0
- package/build/react/index.d.ts.map +1 -0
- package/build/react/index.js +2 -0
- package/build/react/index.js.map +1 -0
- package/build/react/useEngineSnapshot.d.ts +2 -0
- package/build/react/useEngineSnapshot.d.ts.map +1 -0
- package/build/react/useEngineSnapshot.js +14 -0
- package/build/react/useEngineSnapshot.js.map +1 -0
- package/build/runtime/bootstrap.d.ts +24 -1
- package/build/runtime/bootstrap.d.ts.map +1 -1
- package/build/runtime/bootstrap.js +17 -0
- package/build/runtime/bootstrap.js.map +1 -1
- package/build/runtime/scanQrSeam.d.ts +7 -0
- package/build/runtime/scanQrSeam.d.ts.map +1 -0
- package/build/runtime/scanQrSeam.js +16 -0
- package/build/runtime/scanQrSeam.js.map +1 -0
- package/build/services/AppRegistry.d.ts +41 -57
- package/build/services/AppRegistry.d.ts.map +1 -1
- package/build/services/AppRegistry.js +208 -144
- package/build/services/AppRegistry.js.map +1 -1
- package/build/services/AudioCloudUplink.d.ts +12 -0
- package/build/services/AudioCloudUplink.d.ts.map +1 -1
- package/build/services/AudioCloudUplink.js +22 -1
- package/build/services/AudioCloudUplink.js.map +1 -1
- package/build/services/AudioPlaybackService.d.ts +41 -2
- package/build/services/AudioPlaybackService.d.ts.map +1 -1
- package/build/services/AudioPlaybackService.js +250 -33
- package/build/services/AudioPlaybackService.js.map +1 -1
- package/build/services/BlobStore.d.ts +2 -1
- package/build/services/BlobStore.d.ts.map +1 -1
- package/build/services/BlobStore.js +17 -9
- package/build/services/BlobStore.js.map +1 -1
- package/build/services/CloudAudioSubscriptionSync.d.ts.map +1 -1
- package/build/services/CloudAudioSubscriptionSync.js +13 -1
- package/build/services/CloudAudioSubscriptionSync.js.map +1 -1
- package/build/services/CloudClientService.d.ts +15 -0
- package/build/services/CloudClientService.d.ts.map +1 -1
- package/build/services/CloudClientService.js +93 -1
- package/build/services/CloudClientService.js.map +1 -1
- package/build/services/DeviceEventRouter.js +5 -5
- package/build/services/DeviceEventRouter.js.map +1 -1
- package/build/services/ForegroundLocationPermission.d.ts +13 -0
- package/build/services/ForegroundLocationPermission.d.ts.map +1 -0
- package/build/services/ForegroundLocationPermission.js +12 -0
- package/build/services/ForegroundLocationPermission.js.map +1 -0
- package/build/services/GlassesSettingsSync.d.ts.map +1 -1
- package/build/services/GlassesSettingsSync.js +9 -3
- package/build/services/GlassesSettingsSync.js.map +1 -1
- package/build/services/GlassesStatusProjection.d.ts +2 -1
- package/build/services/GlassesStatusProjection.d.ts.map +1 -1
- package/build/services/GlassesStatusProjection.js +15 -8
- package/build/services/GlassesStatusProjection.js.map +1 -1
- package/build/services/HotspotOtaTransport.d.ts +29 -0
- package/build/services/HotspotOtaTransport.d.ts.map +1 -0
- package/build/services/HotspotOtaTransport.js +146 -0
- package/build/services/HotspotOtaTransport.js.map +1 -0
- package/build/services/HotspotShutdown.d.ts +17 -0
- package/build/services/HotspotShutdown.d.ts.map +1 -0
- package/build/services/HotspotShutdown.js +29 -0
- package/build/services/HotspotShutdown.js.map +1 -0
- package/build/services/LocalDisplayManager.d.ts +15 -0
- package/build/services/LocalDisplayManager.d.ts.map +1 -1
- package/build/services/LocalDisplayManager.js +106 -20
- package/build/services/LocalDisplayManager.js.map +1 -1
- package/build/services/LocalMiniappRuntime.d.ts +74 -2
- package/build/services/LocalMiniappRuntime.d.ts.map +1 -1
- package/build/services/LocalMiniappRuntime.js +785 -291
- package/build/services/LocalMiniappRuntime.js.map +1 -1
- package/build/services/LocalMiniappStorage.d.ts +32 -0
- package/build/services/LocalMiniappStorage.d.ts.map +1 -0
- package/build/services/LocalMiniappStorage.js +66 -0
- package/build/services/LocalMiniappStorage.js.map +1 -0
- package/build/services/LocalMiniappUserIdentity.d.ts +20 -0
- package/build/services/LocalMiniappUserIdentity.d.ts.map +1 -0
- package/build/services/LocalMiniappUserIdentity.js +43 -0
- package/build/services/LocalMiniappUserIdentity.js.map +1 -0
- package/build/services/LocalSttFallbackCoordinator.d.ts +9 -6
- package/build/services/LocalSttFallbackCoordinator.d.ts.map +1 -1
- package/build/services/LocalSttFallbackCoordinator.js +18 -12
- package/build/services/LocalSttFallbackCoordinator.js.map +1 -1
- package/build/services/MicStateCoordinator.d.ts +42 -1
- package/build/services/MicStateCoordinator.d.ts.map +1 -1
- package/build/services/MicStateCoordinator.js +141 -3
- package/build/services/MicStateCoordinator.js.map +1 -1
- package/build/services/MiniappLauncher.d.ts.map +1 -1
- package/build/services/MiniappLauncher.js +23 -3
- package/build/services/MiniappLauncher.js.map +1 -1
- package/build/services/MiniappLiveness.d.ts +12 -0
- package/build/services/MiniappLiveness.d.ts.map +1 -0
- package/build/services/MiniappLiveness.js +16 -0
- package/build/services/MiniappLiveness.js.map +1 -0
- package/build/services/NativeHttpResponse.d.ts +3 -0
- package/build/services/NativeHttpResponse.d.ts.map +1 -0
- package/build/services/NativeHttpResponse.js +6 -0
- package/build/services/NativeHttpResponse.js.map +1 -0
- package/build/services/OtaArtifactDownloader.d.ts +65 -0
- package/build/services/OtaArtifactDownloader.d.ts.map +1 -0
- package/build/services/OtaArtifactDownloader.js +226 -0
- package/build/services/OtaArtifactDownloader.js.map +1 -0
- package/build/services/OtaAutoChain.d.ts +34 -0
- package/build/services/OtaAutoChain.d.ts.map +1 -0
- package/build/services/OtaAutoChain.js +83 -0
- package/build/services/OtaAutoChain.js.map +1 -0
- package/build/services/OtaErrorMapping.d.ts +18 -0
- package/build/services/OtaErrorMapping.d.ts.map +1 -0
- package/build/services/OtaErrorMapping.js +63 -0
- package/build/services/OtaErrorMapping.js.map +1 -0
- package/build/services/OtaInstallCoordinator.d.ts +95 -15
- package/build/services/OtaInstallCoordinator.d.ts.map +1 -1
- package/build/services/OtaInstallCoordinator.js +577 -130
- package/build/services/OtaInstallCoordinator.js.map +1 -1
- package/build/services/OtaService.d.ts.map +1 -1
- package/build/services/OtaService.js +8 -1
- package/build/services/OtaService.js.map +1 -1
- package/build/services/OtaUpdateCheckService.d.ts +39 -4
- package/build/services/OtaUpdateCheckService.d.ts.map +1 -1
- package/build/services/OtaUpdateCheckService.js +138 -22
- package/build/services/OtaUpdateCheckService.js.map +1 -1
- package/build/services/PhoneCalendarHelpers.d.ts +32 -0
- package/build/services/PhoneCalendarHelpers.d.ts.map +1 -0
- package/build/services/PhoneCalendarHelpers.js +157 -0
- package/build/services/PhoneCalendarHelpers.js.map +1 -0
- package/build/services/PhoneCalendarService.d.ts +5 -0
- package/build/services/PhoneCalendarService.d.ts.map +1 -0
- package/build/services/PhoneCalendarService.js +45 -0
- package/build/services/PhoneCalendarService.js.map +1 -0
- package/build/services/PhoneCameraFovCoordinator.d.ts +30 -0
- package/build/services/PhoneCameraFovCoordinator.d.ts.map +1 -0
- package/build/services/PhoneCameraFovCoordinator.js +194 -0
- package/build/services/PhoneCameraFovCoordinator.js.map +1 -0
- package/build/services/PhoneNotificationsSync.d.ts.map +1 -1
- package/build/services/PhoneNotificationsSync.js +12 -10
- package/build/services/PhoneNotificationsSync.js.map +1 -1
- package/build/services/PhonePhotoCoordinator.d.ts +26 -2
- package/build/services/PhonePhotoCoordinator.d.ts.map +1 -1
- package/build/services/PhonePhotoCoordinator.js +79 -9
- package/build/services/PhonePhotoCoordinator.js.map +1 -1
- package/build/services/PhoneStreamCoordinator.d.ts +8 -1
- package/build/services/PhoneStreamCoordinator.d.ts.map +1 -1
- package/build/services/PhoneStreamCoordinator.js +125 -13
- package/build/services/PhoneStreamCoordinator.js.map +1 -1
- package/build/services/PhoneVideoCoordinator.d.ts +2 -0
- package/build/services/PhoneVideoCoordinator.d.ts.map +1 -1
- package/build/services/PhoneVideoCoordinator.js +10 -0
- package/build/services/PhoneVideoCoordinator.js.map +1 -1
- package/build/services/SceneRenderer.d.ts.map +1 -1
- package/build/services/SceneRenderer.js +15 -0
- package/build/services/SceneRenderer.js.map +1 -1
- package/build/services/SentenceTtsPipeline.d.ts +31 -0
- package/build/services/SentenceTtsPipeline.d.ts.map +1 -0
- package/build/services/SentenceTtsPipeline.js +67 -0
- package/build/services/SentenceTtsPipeline.js.map +1 -0
- package/build/services/SupportProfileSync.d.ts +22 -0
- package/build/services/SupportProfileSync.d.ts.map +1 -0
- package/build/services/SupportProfileSync.js +213 -0
- package/build/services/SupportProfileSync.js.map +1 -0
- package/build/services/TranscriptionRouting.d.ts +12 -0
- package/build/services/TranscriptionRouting.d.ts.map +1 -0
- package/build/services/TranscriptionRouting.js +24 -0
- package/build/services/TranscriptionRouting.js.map +1 -0
- package/build/services/TtsTextSanitizer.d.ts +5 -0
- package/build/services/TtsTextSanitizer.d.ts.map +1 -0
- package/build/services/TtsTextSanitizer.js +61 -0
- package/build/services/TtsTextSanitizer.js.map +1 -0
- package/build/services/WifiAdbRequest.d.ts +17 -0
- package/build/services/WifiAdbRequest.d.ts.map +1 -0
- package/build/services/WifiAdbRequest.js +35 -0
- package/build/services/WifiAdbRequest.js.map +1 -0
- package/build/services/asg/asgCameraApi.d.ts +43 -0
- package/build/services/asg/asgCameraApi.d.ts.map +1 -1
- package/build/services/asg/asgCameraApi.js +509 -26
- package/build/services/asg/asgCameraApi.js.map +1 -1
- package/build/services/asg/cameraRollExportCoordinator.d.ts +60 -0
- package/build/services/asg/cameraRollExportCoordinator.d.ts.map +1 -0
- package/build/services/asg/cameraRollExportCoordinator.js +618 -0
- package/build/services/asg/cameraRollExportCoordinator.js.map +1 -0
- package/build/services/asg/cameraRollExportLedger.d.ts +44 -0
- package/build/services/asg/cameraRollExportLedger.d.ts.map +1 -0
- package/build/services/asg/cameraRollExportLedger.js +78 -0
- package/build/services/asg/cameraRollExportLedger.js.map +1 -0
- package/build/services/asg/galleryNotices.d.ts +1 -1
- package/build/services/asg/galleryNotices.d.ts.map +1 -1
- package/build/services/asg/galleryNotices.js.map +1 -1
- package/build/services/asg/galleryPathMigration.d.ts +3 -0
- package/build/services/asg/galleryPathMigration.d.ts.map +1 -0
- package/build/services/asg/galleryPathMigration.js +26 -0
- package/build/services/asg/galleryPathMigration.js.map +1 -0
- package/build/services/asg/gallerySettingsService.d.ts +1 -0
- package/build/services/asg/gallerySettingsService.d.ts.map +1 -1
- package/build/services/asg/gallerySettingsService.js +2 -0
- package/build/services/asg/gallerySettingsService.js.map +1 -1
- package/build/services/asg/gallerySyncService.d.ts.map +1 -1
- package/build/services/asg/gallerySyncService.js +162 -56
- package/build/services/asg/gallerySyncService.js.map +1 -1
- package/build/services/asg/galleryTransferLedger.d.ts +58 -0
- package/build/services/asg/galleryTransferLedger.d.ts.map +1 -0
- package/build/services/asg/galleryTransferLedger.js +225 -0
- package/build/services/asg/galleryTransferLedger.js.map +1 -0
- package/build/services/asg/localNetworkTransport.d.ts +15 -0
- package/build/services/asg/localNetworkTransport.d.ts.map +1 -0
- package/build/services/asg/localNetworkTransport.js +144 -0
- package/build/services/asg/localNetworkTransport.js.map +1 -0
- package/build/services/asg/localStorageService.d.ts +18 -0
- package/build/services/asg/localStorageService.d.ts.map +1 -1
- package/build/services/asg/localStorageService.js +168 -19
- package/build/services/asg/localStorageService.js.map +1 -1
- package/build/services/asg/mediaProcessingQueue.d.ts +10 -0
- package/build/services/asg/mediaProcessingQueue.d.ts.map +1 -1
- package/build/services/asg/mediaProcessingQueue.js +193 -62
- package/build/services/asg/mediaProcessingQueue.js.map +1 -1
- package/build/services/audioPlaybackAssets.d.ts +8 -0
- package/build/services/audioPlaybackAssets.d.ts.map +1 -0
- package/build/services/audioPlaybackAssets.js +7 -0
- package/build/services/audioPlaybackAssets.js.map +1 -0
- package/build/services/gallerySyncClock.js +1 -1
- package/build/services/gallerySyncClock.js.map +1 -1
- package/build/services/glassesClockSync.d.ts.map +1 -1
- package/build/services/glassesClockSync.js +6 -2
- package/build/services/glassesClockSync.js.map +1 -1
- package/build/services/manifestActions.d.ts +7 -0
- package/build/services/manifestActions.d.ts.map +1 -0
- package/build/services/manifestActions.js +25 -0
- package/build/services/manifestActions.js.map +1 -0
- package/build/services/otaDisplayState.d.ts +23 -12
- package/build/services/otaDisplayState.d.ts.map +1 -1
- package/build/services/otaDisplayState.js +36 -14
- package/build/services/otaDisplayState.js.map +1 -1
- package/build/services/otaInstallPolicy.d.ts +16 -4
- package/build/services/otaInstallPolicy.d.ts.map +1 -1
- package/build/services/otaInstallPolicy.js +24 -3
- package/build/services/otaInstallPolicy.js.map +1 -1
- package/build/services/otaLegacyMapping.d.ts +1 -1
- package/build/services/otaLegacyMapping.d.ts.map +1 -1
- package/build/services/otaLegacyMapping.js.map +1 -1
- package/build/services/otaManifestPolicy.d.ts +14 -0
- package/build/services/otaManifestPolicy.d.ts.map +1 -0
- package/build/services/otaManifestPolicy.js +19 -0
- package/build/services/otaManifestPolicy.js.map +1 -0
- package/build/services/otaManifestUrl.d.ts +3 -0
- package/build/services/otaManifestUrl.d.ts.map +1 -0
- package/build/services/otaManifestUrl.js +38 -0
- package/build/services/otaManifestUrl.js.map +1 -0
- package/build/services/slimStreamStatus.d.ts +11 -0
- package/build/services/slimStreamStatus.d.ts.map +1 -1
- package/build/services/slimStreamStatus.js +14 -4
- package/build/services/slimStreamStatus.js.map +1 -1
- package/build/stores/apps.d.ts.map +1 -1
- package/build/stores/apps.js +11 -0
- package/build/stores/apps.js.map +1 -1
- package/build/stores/bluetoothSettingKeys.d.ts.map +1 -1
- package/build/stores/bluetoothSettingKeys.js +2 -0
- package/build/stores/bluetoothSettingKeys.js.map +1 -1
- package/build/stores/gallerySync.d.ts +2 -0
- package/build/stores/gallerySync.d.ts.map +1 -1
- package/build/stores/gallerySync.js +2 -0
- package/build/stores/gallerySync.js.map +1 -1
- package/build/stores/glasses.d.ts.map +1 -1
- package/build/stores/glasses.js +3 -0
- package/build/stores/glasses.js.map +1 -1
- package/build/stores/settings.d.ts +17 -0
- package/build/stores/settings.d.ts.map +1 -1
- package/build/stores/settings.js +157 -17
- package/build/stores/settings.js.map +1 -1
- package/build/types/applet.d.ts +2 -0
- package/build/types/applet.d.ts.map +1 -1
- package/build/types/applet.js.map +1 -1
- package/build/types/asg.d.ts +7 -0
- package/build/types/asg.d.ts.map +1 -1
- package/build/types/asg.js.map +1 -1
- package/build/types/enums.d.ts +2 -25
- package/build/types/enums.d.ts.map +1 -1
- package/build/types/enums.js +2 -27
- package/build/types/enums.js.map +1 -1
- package/build/types/hardware.d.ts +4 -13
- package/build/types/hardware.d.ts.map +1 -1
- package/build/types/hardware.js +15 -3
- package/build/types/hardware.js.map +1 -1
- package/build/types/index.d.ts +2 -6
- package/build/types/index.d.ts.map +1 -1
- package/build/types/index.js +2 -6
- package/build/types/index.js.map +1 -1
- package/build/utils/configuredDevHost.d.ts +6 -0
- package/build/utils/configuredDevHost.d.ts.map +1 -0
- package/build/utils/configuredDevHost.js +19 -0
- package/build/utils/configuredDevHost.js.map +1 -0
- package/build/utils/devMiniappLaunch.d.ts +19 -8
- package/build/utils/devMiniappLaunch.d.ts.map +1 -1
- package/build/utils/devMiniappLaunch.js +144 -21
- package/build/utils/devMiniappLaunch.js.map +1 -1
- package/build/utils/diagnosticContext.d.ts.map +1 -1
- package/build/utils/diagnosticContext.js +15 -17
- package/build/utils/diagnosticContext.js.map +1 -1
- package/build/utils/hardware/hardware.d.ts.map +1 -1
- package/build/utils/hardware/hardware.js +7 -3
- package/build/utils/hardware/hardware.js.map +1 -1
- package/build/utils/miniappDiagnostics.d.ts +64 -0
- package/build/utils/miniappDiagnostics.d.ts.map +1 -0
- package/build/utils/miniappDiagnostics.js +173 -0
- package/build/utils/miniappDiagnostics.js.map +1 -0
- package/build/utils/permissions/MediaLibraryPermissions.d.ts +11 -0
- package/build/utils/permissions/MediaLibraryPermissions.d.ts.map +1 -1
- package/build/utils/permissions/MediaLibraryPermissions.js +27 -4
- package/build/utils/permissions/MediaLibraryPermissions.js.map +1 -1
- package/build/utils/timers/timers.d.ts.map +1 -1
- package/build/utils/timers/timers.js +55 -18
- package/build/utils/timers/timers.js.map +1 -1
- package/package.json +59 -31
- package/src/assets/silence.wav +0 -0
- package/src/bluetooth-sdk/debug.ts +1 -0
- package/src/bluetooth-sdk/index.ts +2 -0
- package/src/bluetooth-sdk/photo-receiver.ts +2 -0
- package/src/bluetooth-sdk/react.ts +1 -0
- package/src/bluetooth-sdk/types.ts +1 -0
- package/src/engine.ts +9 -4
- package/src/facades/dev.ts +17 -12
- package/src/facades/display.ts +1 -1
- package/src/facades/gallery.ts +1 -1
- package/src/facades/glasses.ts +20 -7
- package/src/facades/glassesSettings.ts +5 -0
- package/src/facades/miniapps.ts +7 -0
- package/src/facades/ota.ts +23 -8
- package/src/facades/pairing.ts +15 -11
- package/src/facades/permissions.ts +14 -0
- package/src/facades/phoneNotifications.ts +4 -13
- package/src/facades/speech.ts +21 -7
- package/src/generated/releaseMetadata.ts +20 -0
- package/src/index.ts +39 -13
- package/src/react/MentraLiveOtaFlow.tsx +856 -0
- package/src/react/index.ts +7 -0
- package/src/react/useEngineSnapshot.ts +16 -0
- package/src/runtime/bootstrap.ts +33 -1
- package/src/runtime/scanQrSeam.ts +20 -0
- package/src/services/AppRegistry.ts +240 -149
- package/src/services/AudioCloudUplink.ts +23 -1
- package/src/services/AudioPlaybackService.ts +287 -38
- package/src/services/BlobStore.ts +22 -9
- package/src/services/CloudAudioSubscriptionSync.ts +13 -1
- package/src/services/CloudClientService.ts +96 -1
- package/src/services/DeviceEventRouter.ts +5 -5
- package/src/services/ForegroundLocationPermission.ts +24 -0
- package/src/services/GlassesSettingsSync.ts +9 -3
- package/src/services/GlassesStatusProjection.ts +16 -8
- package/src/services/HotspotOtaTransport.ts +184 -0
- package/src/services/HotspotShutdown.ts +41 -0
- package/src/services/LocalDisplayManager.ts +112 -21
- package/src/services/LocalMiniappRuntime.ts +967 -346
- package/src/services/LocalMiniappStorage.ts +82 -0
- package/src/services/LocalMiniappUserIdentity.ts +46 -0
- package/src/services/LocalSttFallbackCoordinator.ts +19 -12
- package/src/services/MicStateCoordinator.ts +169 -4
- package/src/services/MiniappLauncher.ts +30 -3
- package/src/services/MiniappLiveness.ts +24 -0
- package/src/services/NativeHttpResponse.ts +6 -0
- package/src/services/OtaArtifactDownloader.ts +312 -0
- package/src/services/OtaAutoChain.ts +106 -0
- package/src/services/OtaErrorMapping.ts +80 -0
- package/src/services/OtaInstallCoordinator.ts +649 -144
- package/src/services/OtaService.ts +11 -5
- package/src/services/OtaUpdateCheckService.ts +181 -21
- package/src/services/PhoneCalendarHelpers.ts +212 -0
- package/src/services/PhoneCalendarService.ts +65 -0
- package/src/services/PhoneCameraFovCoordinator.ts +210 -0
- package/src/services/PhoneNotificationsSync.ts +12 -10
- package/src/services/PhonePhotoCoordinator.ts +116 -18
- package/src/services/PhoneStreamCoordinator.ts +139 -25
- package/src/services/PhoneVideoCoordinator.ts +11 -0
- package/src/services/SceneRenderer.ts +16 -0
- package/src/services/SentenceTtsPipeline.ts +106 -0
- package/src/services/SupportProfileSync.ts +218 -0
- package/src/services/TranscriptionRouting.ts +37 -0
- package/src/services/TtsTextSanitizer.ts +66 -0
- package/src/services/WifiAdbRequest.ts +53 -0
- package/src/services/asg/asgCameraApi.ts +615 -33
- package/src/services/asg/cameraRollExportCoordinator.ts +627 -0
- package/src/services/asg/cameraRollExportLedger.ts +122 -0
- package/src/services/asg/galleryNotices.ts +1 -0
- package/src/services/asg/galleryPathMigration.ts +22 -0
- package/src/services/asg/gallerySettingsService.ts +3 -0
- package/src/services/asg/gallerySyncService.ts +184 -73
- package/src/services/asg/galleryTransferLedger.ts +312 -0
- package/src/services/asg/localNetworkTransport.ts +169 -0
- package/src/services/asg/localStorageService.ts +179 -24
- package/src/services/asg/mediaProcessingQueue.ts +209 -62
- package/src/services/audioPlaybackAssets.ts +8 -0
- package/src/services/gallerySyncClock.ts +1 -1
- package/src/services/glassesClockSync.ts +6 -2
- package/src/services/manifestActions.ts +30 -0
- package/src/services/otaDisplayState.ts +58 -17
- package/src/services/otaInstallPolicy.ts +30 -4
- package/src/services/otaLegacyMapping.ts +1 -1
- package/src/services/otaManifestPolicy.ts +42 -0
- package/src/services/otaManifestUrl.ts +44 -0
- package/src/services/slimStreamStatus.ts +16 -5
- package/src/stores/apps.ts +12 -0
- package/src/stores/bluetoothSettingKeys.ts +2 -0
- package/src/stores/gallerySync.ts +4 -0
- package/src/stores/glasses.ts +3 -0
- package/src/stores/settings.ts +179 -18
- package/src/types/applet.ts +2 -0
- package/src/types/asg.ts +7 -0
- package/src/types/enums.ts +3 -28
- package/src/types/hardware.ts +20 -13
- package/src/types/index.ts +2 -6
- package/src/utils/configuredDevHost.ts +17 -0
- package/src/utils/devMiniappLaunch.ts +151 -23
- package/src/utils/diagnosticContext.ts +17 -17
- package/src/utils/hardware/hardware.ts +7 -9
- package/src/utils/miniappDiagnostics.ts +226 -0
- package/src/utils/permissions/MediaLibraryPermissions.ts +35 -4
- package/src/utils/timers/timers.ts +57 -21
- package/build/devtools.d.ts +0 -11
- package/build/devtools.d.ts.map +0 -1
- package/build/devtools.js +0 -13
- package/build/devtools.js.map +0 -1
- package/build/internal.d.ts +0 -66
- package/build/internal.d.ts.map +0 -1
- package/build/internal.js +0 -89
- package/build/internal.js.map +0 -1
- package/build/services/asgOtaVersionUrl.d.ts +0 -2
- package/build/services/asgOtaVersionUrl.d.ts.map +0 -1
- package/build/services/asgOtaVersionUrl.js +0 -36
- package/build/services/asgOtaVersionUrl.js.map +0 -1
- package/src/devtools.ts +0 -13
- package/src/internal.ts +0 -158
- package/src/services/asgOtaVersionUrl.ts +0 -41
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
const OTA_VERSION_URL_LEGACY_PROD = "https://ota.mentraglass.com/prod_live_version.json"
|
|
2
|
+
|
|
3
|
+
function trimmed(value?: string | null): string | null {
|
|
4
|
+
const result = value?.trim()
|
|
5
|
+
return result || null
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
export function isLegacyAsgOtaStartBuild(glassesBuildNumber?: string | null): boolean {
|
|
9
|
+
const buildNumber = Number.parseInt(glassesBuildNumber ?? "", 10)
|
|
10
|
+
return Number.isFinite(buildNumber) && buildNumber < 39
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export function selectModernOtaManifestPin({
|
|
14
|
+
developerOverride,
|
|
15
|
+
hostReleasePin,
|
|
16
|
+
engineReleasePin,
|
|
17
|
+
}: {
|
|
18
|
+
developerOverride?: string | null
|
|
19
|
+
hostReleasePin?: string | null
|
|
20
|
+
engineReleasePin?: string | null
|
|
21
|
+
}): string | null {
|
|
22
|
+
return trimmed(developerOverride) || trimmed(hostReleasePin) || trimmed(engineReleasePin)
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
export function resolveOtaManifestPolicy({
|
|
26
|
+
glassesUrl,
|
|
27
|
+
glassesBuildNumber,
|
|
28
|
+
developerOverride,
|
|
29
|
+
hostReleasePin,
|
|
30
|
+
engineReleasePin,
|
|
31
|
+
}: {
|
|
32
|
+
glassesUrl?: string | null
|
|
33
|
+
glassesBuildNumber?: string | null
|
|
34
|
+
developerOverride?: string | null
|
|
35
|
+
hostReleasePin?: string | null
|
|
36
|
+
engineReleasePin?: string | null
|
|
37
|
+
}): string | null {
|
|
38
|
+
if (isLegacyAsgOtaStartBuild(glassesBuildNumber)) {
|
|
39
|
+
return trimmed(glassesUrl) || OTA_VERSION_URL_LEGACY_PROD
|
|
40
|
+
}
|
|
41
|
+
return selectModernOtaManifestPin({developerOverride, hostReleasePin, engineReleasePin})
|
|
42
|
+
}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import {ENGINE_RELEASE_METADATA} from "../generated/releaseMetadata"
|
|
2
|
+
import {SETTINGS, useSettingsStore} from "../stores/settings"
|
|
3
|
+
import {resolveOtaManifestPolicy, selectModernOtaManifestPin} from "./otaManifestPolicy"
|
|
4
|
+
|
|
5
|
+
function getOtaVersionUrlDevOverride(): string | null {
|
|
6
|
+
// Super mode only: a wrong OTA manifest can brick glasses, so a saved
|
|
7
|
+
// override is inert unless super mode is currently enabled.
|
|
8
|
+
if (!useSettingsStore.getState().getSetting(SETTINGS.super_mode.key)) {
|
|
9
|
+
return null
|
|
10
|
+
}
|
|
11
|
+
const value = useSettingsStore.getState().getSetting(SETTINGS.ota_version_url.key)
|
|
12
|
+
const trimmed = typeof value === "string" ? value.trim() : ""
|
|
13
|
+
return trimmed || null
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
function getHostReleasePin(): string | null {
|
|
17
|
+
const value = process.env.EXPO_PUBLIC_ASG_OTA_VERSION_URL?.trim()
|
|
18
|
+
return value || null
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
function getEmbeddedEngineReleasePin(): string | null {
|
|
22
|
+
const value = ENGINE_RELEASE_METADATA.otaManifestUrl?.trim()
|
|
23
|
+
return value || null
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export function hasConfiguredModernOtaManifestPin(): boolean {
|
|
27
|
+
return Boolean(
|
|
28
|
+
selectModernOtaManifestPin({
|
|
29
|
+
developerOverride: getOtaVersionUrlDevOverride(),
|
|
30
|
+
hostReleasePin: getHostReleasePin(),
|
|
31
|
+
engineReleasePin: getEmbeddedEngineReleasePin(),
|
|
32
|
+
}),
|
|
33
|
+
)
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
export function resolveOtaManifestUrl(glassesUrl?: string | null, glassesBuildNumber?: string | null): string | null {
|
|
37
|
+
return resolveOtaManifestPolicy({
|
|
38
|
+
glassesUrl,
|
|
39
|
+
glassesBuildNumber,
|
|
40
|
+
developerOverride: getOtaVersionUrlDevOverride(),
|
|
41
|
+
hostReleasePin: getHostReleasePin(),
|
|
42
|
+
engineReleasePin: getEmbeddedEngineReleasePin(),
|
|
43
|
+
})
|
|
44
|
+
}
|
|
@@ -1,10 +1,22 @@
|
|
|
1
1
|
import type {StreamStatusEvent} from "@mentra/bluetooth-sdk/internal"
|
|
2
2
|
|
|
3
|
+
/**
|
|
4
|
+
* 1Hz encoder FPS/bitrate telemetry on `stream_status.stats`.
|
|
5
|
+
* Lifecycle status (started/stopped/error) is unaffected.
|
|
6
|
+
* Keep false in production; flip locally to debug the Mentra Call FPS ladder.
|
|
7
|
+
*
|
|
8
|
+
* Compatibility kill switch: old glasses can still emit stats. Copy onto a new object;
|
|
9
|
+
* never mutate the incoming event. Manual acceptance with every layer false: join
|
|
10
|
+
* waterfall yes; BLE stream_status.stats / STREAM_QUALITY / encoder-stats / watch-stats no.
|
|
11
|
+
*/
|
|
12
|
+
export const ENABLE_PIPELINE_FPS_TELEMETRY = false
|
|
13
|
+
|
|
3
14
|
/** Fields forwarded to cloud / miniapps after the first resolvedConfig ack. */
|
|
4
15
|
export function slimStreamStatusEvent(
|
|
5
16
|
event: StreamStatusEvent,
|
|
6
|
-
options: {includeResolvedConfig?: boolean} = {},
|
|
17
|
+
options: {includeResolvedConfig?: boolean; enableFpsTelemetry?: boolean} = {},
|
|
7
18
|
): Record<string, unknown> {
|
|
19
|
+
const enableFpsTelemetry = options.enableFpsTelemetry ?? ENABLE_PIPELINE_FPS_TELEMETRY
|
|
8
20
|
const slim: Record<string, unknown> = {
|
|
9
21
|
type: "stream_status",
|
|
10
22
|
kind: event.kind,
|
|
@@ -16,10 +28,9 @@ export function slimStreamStatusEvent(
|
|
|
16
28
|
if (options.includeResolvedConfig && event.resolvedConfig) {
|
|
17
29
|
slim.resolvedConfig = event.resolvedConfig
|
|
18
30
|
}
|
|
19
|
-
//
|
|
20
|
-
//
|
|
21
|
-
|
|
22
|
-
if (event.stats) slim.stats = event.stats
|
|
31
|
+
// Compatibility kill switch: old glasses may still emit 1Hz stats. Copy onto a
|
|
32
|
+
// new object; never mutate `event` — other consumers may still need the original.
|
|
33
|
+
if (enableFpsTelemetry && event.stats) slim.stats = event.stats
|
|
23
34
|
return slim
|
|
24
35
|
}
|
|
25
36
|
|
package/src/stores/apps.ts
CHANGED
|
@@ -20,6 +20,7 @@ import {getModelCapabilities} from "../types/hardware"
|
|
|
20
20
|
import {HardwareCompatibility, type CompatibilityResult} from "../utils/hardware/hardware"
|
|
21
21
|
import {storage} from "../utils/storage/storage"
|
|
22
22
|
import appRegistry from "../services/AppRegistry"
|
|
23
|
+
import localDisplayManager from "../services/LocalDisplayManager"
|
|
23
24
|
import {islandNotifications} from "../services/NotificationsEmitter"
|
|
24
25
|
import sttModelManager from "../services/STTModelManager"
|
|
25
26
|
import {miniappLauncher} from "../services/MiniappLauncher"
|
|
@@ -540,6 +541,17 @@ miniappRunningRegistry.subscribe(() => {
|
|
|
540
541
|
}
|
|
541
542
|
})
|
|
542
543
|
|
|
544
|
+
// The display-manager's core (foreground) slot is DERIVED state: always the
|
|
545
|
+
// currently-running standard app, no matter HOW it came to run — user tap
|
|
546
|
+
// (start()), boot restore (autostartLocalMiniapps → registry projection
|
|
547
|
+
// above), crash-respawn, or interop. One reconciler instead of per-path call
|
|
548
|
+
// sites, so no launch/stop path can forget to claim or release the slot.
|
|
549
|
+
// onCoreAppChange is idempotent, so firing on every store write is free.
|
|
550
|
+
useAppStatusStore.subscribe((state) => {
|
|
551
|
+
const core = state.apps.find((a) => a.running && (a.type === "standard" || !a.type))
|
|
552
|
+
localDisplayManager.onCoreAppChange(core?.packageName ?? null)
|
|
553
|
+
})
|
|
554
|
+
|
|
543
555
|
// AppRegistry change events trigger a store refresh.
|
|
544
556
|
appRegistry.subscribe(() => {
|
|
545
557
|
void useAppStatusStore.getState().refresh()
|
|
@@ -53,6 +53,7 @@ export interface SyncQueue {
|
|
|
53
53
|
export interface GallerySyncInfo {
|
|
54
54
|
// State machine
|
|
55
55
|
syncState: SyncState
|
|
56
|
+
syncStarting: boolean
|
|
56
57
|
|
|
57
58
|
// Progress tracking
|
|
58
59
|
currentFile: string | null
|
|
@@ -82,6 +83,7 @@ export interface GallerySyncInfo {
|
|
|
82
83
|
export interface GallerySyncState extends GallerySyncInfo {
|
|
83
84
|
// State transitions
|
|
84
85
|
setSyncState: (state: SyncState) => void
|
|
86
|
+
setSyncStarting: (starting: boolean) => void
|
|
85
87
|
setRequestingHotspot: () => void
|
|
86
88
|
setConnectingWifi: () => void
|
|
87
89
|
setSyncing: (files: PhotoInfo[]) => void
|
|
@@ -122,6 +124,7 @@ export interface GallerySyncState extends GallerySyncInfo {
|
|
|
122
124
|
|
|
123
125
|
const initialState: GallerySyncInfo & {processingFiles: Set<string>; processedFiles: number} = {
|
|
124
126
|
syncState: "idle",
|
|
127
|
+
syncStarting: false,
|
|
125
128
|
currentFile: null,
|
|
126
129
|
currentFileProgress: 0,
|
|
127
130
|
completedFiles: 0,
|
|
@@ -146,6 +149,7 @@ export const useGallerySyncStore = create<GallerySyncState>()(
|
|
|
146
149
|
|
|
147
150
|
// State transitions
|
|
148
151
|
setSyncState: (syncState: SyncState) => set({syncState}),
|
|
152
|
+
setSyncStarting: (syncStarting: boolean) => set({syncStarting}),
|
|
149
153
|
|
|
150
154
|
setRequestingHotspot: () =>
|
|
151
155
|
set({
|
package/src/stores/glasses.ts
CHANGED
|
@@ -118,6 +118,7 @@ const initialState: GlassesStore = {
|
|
|
118
118
|
androidVersion: "",
|
|
119
119
|
firmwareVersion: "",
|
|
120
120
|
bluetoothMacAddress: "",
|
|
121
|
+
wifiMacAddress: "",
|
|
121
122
|
leftMacAddress: "",
|
|
122
123
|
rightMacAddress: "",
|
|
123
124
|
buildNumber: "",
|
|
@@ -130,6 +131,7 @@ const initialState: GlassesStore = {
|
|
|
130
131
|
color: "",
|
|
131
132
|
mtkFirmwareVersion: "",
|
|
132
133
|
besFirmwareVersion: "",
|
|
134
|
+
hotspotOtaVersion: 0,
|
|
133
135
|
// wifi info
|
|
134
136
|
wifi: {state: "disconnected"},
|
|
135
137
|
wifiStatusKnown: false,
|
|
@@ -193,6 +195,7 @@ export const useGlassesStore = create<GlassesState>()(
|
|
|
193
195
|
}
|
|
194
196
|
if (!isGlassesConnected(next.connection)) {
|
|
195
197
|
next.wifiStatusKnown = false
|
|
198
|
+
next.hotspotOtaVersion = 0
|
|
196
199
|
}
|
|
197
200
|
return next
|
|
198
201
|
}),
|
package/src/stores/settings.ts
CHANGED
|
@@ -23,18 +23,44 @@ export interface Setting {
|
|
|
23
23
|
persist: boolean
|
|
24
24
|
// Pairing-identity keys are NATIVE-authoritative: the native layer writes
|
|
25
25
|
// them on pairing success (handleDeviceReady) / forget and echoes them down
|
|
26
|
-
// via save_setting; JS
|
|
26
|
+
// via save_setting; JS鈫抧ative they travel only in the explicit SEEDS
|
|
27
27
|
// (hydration, pre-connect, post-demotion, abandon re-seed) — never the
|
|
28
28
|
// change-push and never the on-connect replay, whose mid-relay snapshot can
|
|
29
29
|
// overwrite a just-promoted identity. PAIRING_IDENTITY_KEYS is derived from
|
|
30
30
|
// this flag so the sync exclusions can't drift from the descriptors.
|
|
31
31
|
nativeAuthoritative?: true
|
|
32
|
+
/**
|
|
33
|
+
* Clear this setting when the build's environment changes.
|
|
34
|
+
*
|
|
35
|
+
* A persisted override normally outranks both the build's env and the
|
|
36
|
+
* compiled default, which is right within one environment: a developer's
|
|
37
|
+
* METRO_AUTO pin should survive a rebuild. It is wrong across environments,
|
|
38
|
+
* where an override pinned under a dev build would silently follow the
|
|
39
|
+
* install onto a store build pointed at production.
|
|
40
|
+
*
|
|
41
|
+
* Note this keys off the build's environment label, so it does NOT fire on a
|
|
42
|
+
* TestFlight to App Store promotion: that ships the same binary with the same
|
|
43
|
+
* label. Promotion is safe because the publishing lane bakes prod URLs, not
|
|
44
|
+
* because this reset runs. See the resolution block in loadSettings.
|
|
45
|
+
*
|
|
46
|
+
* Absent means the value is never invalidated automatically.
|
|
47
|
+
*/
|
|
48
|
+
resetOnBuildEnvChange?: true
|
|
32
49
|
}
|
|
33
50
|
|
|
34
51
|
export const SETTINGS: Record<string, Setting> = {
|
|
35
52
|
// feature flags / mantle settings:
|
|
36
53
|
dev_mode: {key: "dev_mode", defaultValue: () => __DEV__, writable: true, saveOnServer: true, persist: true}, // deprecated
|
|
37
54
|
debug_mode: {key: "debug_mode", defaultValue: () => __DEV__, writable: true, saveOnServer: true, persist: true},
|
|
55
|
+
android_notification_listener_enabled: {
|
|
56
|
+
key: "android_notification_listener_enabled",
|
|
57
|
+
// Operational kill switch. The listener now runs in a guarded lightweight
|
|
58
|
+
// process, so normal installs can safely capture notifications by default.
|
|
59
|
+
defaultValue: () => true,
|
|
60
|
+
writable: true,
|
|
61
|
+
saveOnServer: true,
|
|
62
|
+
persist: true,
|
|
63
|
+
},
|
|
38
64
|
super_mode: {key: "super_mode", defaultValue: () => false, writable: true, saveOnServer: true, persist: true},
|
|
39
65
|
appearance_menu_enabled: {
|
|
40
66
|
key: "appearance_menu_enabled",
|
|
@@ -159,6 +185,7 @@ export const SETTINGS: Record<string, Setting> = {
|
|
|
159
185
|
writable: true,
|
|
160
186
|
saveOnServer: false,
|
|
161
187
|
persist: true,
|
|
188
|
+
resetOnBuildEnvChange: true,
|
|
162
189
|
},
|
|
163
190
|
cloud_runtime_url: {
|
|
164
191
|
key: "cloud_runtime_url",
|
|
@@ -166,6 +193,7 @@ export const SETTINGS: Record<string, Setting> = {
|
|
|
166
193
|
writable: true,
|
|
167
194
|
saveOnServer: false,
|
|
168
195
|
persist: true,
|
|
196
|
+
resetOnBuildEnvChange: true,
|
|
169
197
|
},
|
|
170
198
|
// Bookmarked Cloud V2 endpoint pairs. Each entry is {label, coreUrl,
|
|
171
199
|
// runtimeUrl} — core + runtime are saved together because they are always
|
|
@@ -179,7 +207,7 @@ export const SETTINGS: Record<string, Setting> = {
|
|
|
179
207
|
},
|
|
180
208
|
// Developer override for the ASG OTA manifest URL. null/empty = no override;
|
|
181
209
|
// the normal selection applies (legacy-glasses gate, EXPO_PUBLIC_ASG_OTA_VERSION_URL,
|
|
182
|
-
// glasses-reported URL, then production). See
|
|
210
|
+
// glasses-reported URL, then production). See resolveOtaManifestUrl.
|
|
183
211
|
ota_version_url: {
|
|
184
212
|
key: "ota_version_url",
|
|
185
213
|
defaultValue: () => null,
|
|
@@ -250,6 +278,14 @@ export const SETTINGS: Record<string, Setting> = {
|
|
|
250
278
|
persist: true,
|
|
251
279
|
nativeAuthoritative: true,
|
|
252
280
|
},
|
|
281
|
+
project_name: {
|
|
282
|
+
key: "project_name",
|
|
283
|
+
defaultValue: () => "",
|
|
284
|
+
writable: true,
|
|
285
|
+
saveOnServer: false,
|
|
286
|
+
persist: true,
|
|
287
|
+
nativeAuthoritative: true,
|
|
288
|
+
},
|
|
253
289
|
default_controller: {
|
|
254
290
|
key: "default_controller",
|
|
255
291
|
defaultValue: () => "",
|
|
@@ -364,12 +400,23 @@ export const SETTINGS: Record<string, Setting> = {
|
|
|
364
400
|
saveOnServer: true,
|
|
365
401
|
persist: true,
|
|
366
402
|
},
|
|
403
|
+
// The Mentra App intentionally preserves Mentra Live's historical VAD-on
|
|
404
|
+
// product default. Standalone public Bluetooth SDK hosts default VAD off so
|
|
405
|
+
// their microphone audio remains continuous.
|
|
367
406
|
voice_activity_detection_enabled: {
|
|
368
407
|
key: "voice_activity_detection_enabled",
|
|
369
408
|
defaultValue: () => true,
|
|
370
409
|
writable: true,
|
|
371
|
-
saveOnServer:
|
|
372
|
-
persist:
|
|
410
|
+
saveOnServer: true,
|
|
411
|
+
persist: true,
|
|
412
|
+
},
|
|
413
|
+
// Mentra Live center-mic loudness / "Barrier" gate (cs_swit type 10). Default on.
|
|
414
|
+
loudness_gate_enabled: {
|
|
415
|
+
key: "loudness_gate_enabled",
|
|
416
|
+
defaultValue: () => true,
|
|
417
|
+
writable: true,
|
|
418
|
+
saveOnServer: true,
|
|
419
|
+
persist: true,
|
|
373
420
|
},
|
|
374
421
|
always_on_status_bar: {
|
|
375
422
|
key: "always_on_status_bar",
|
|
@@ -560,7 +607,7 @@ export const SETTINGS: Record<string, Setting> = {
|
|
|
560
607
|
// offline applets
|
|
561
608
|
offline_mode: {key: "offline_mode", defaultValue: () => false, writable: true, saveOnServer: true, persist: true},
|
|
562
609
|
// Runtime flag: coordinator flips this on when cloud STT has failed and fallback is active.
|
|
563
|
-
// Native GlassesStore watches it to gate PCM
|
|
610
|
+
// Native GlassesStore watches it to gate PCM 鈫?Sherpa feeding. Not user-facing.
|
|
564
611
|
local_stt_fallback_active: {
|
|
565
612
|
key: "local_stt_fallback_active",
|
|
566
613
|
defaultValue: () => false,
|
|
@@ -621,13 +668,6 @@ export const SETTINGS: Record<string, Setting> = {
|
|
|
621
668
|
persist: true,
|
|
622
669
|
},
|
|
623
670
|
// notifications
|
|
624
|
-
notifications_enabled: {
|
|
625
|
-
key: "notifications_enabled",
|
|
626
|
-
defaultValue: () => true,
|
|
627
|
-
writable: true,
|
|
628
|
-
saveOnServer: true,
|
|
629
|
-
persist: true,
|
|
630
|
-
},
|
|
631
671
|
notifications_blocklist: {
|
|
632
672
|
key: "notifications_blocklist",
|
|
633
673
|
defaultValue: () => [],
|
|
@@ -670,6 +710,7 @@ export const BLUETOOTH_SETTING_KEYS: string[] = [
|
|
|
670
710
|
SETTINGS.sensing_enabled.key,
|
|
671
711
|
SETTINGS.power_saving_mode.key,
|
|
672
712
|
SETTINGS.voice_activity_detection_enabled.key,
|
|
713
|
+
SETTINGS.loudness_gate_enabled.key,
|
|
673
714
|
SETTINGS.lc3_frame_size.key,
|
|
674
715
|
SETTINGS.preferred_mic.key,
|
|
675
716
|
SETTINGS.screen_disabled.key,
|
|
@@ -698,6 +739,7 @@ export const BLUETOOTH_SETTING_KEYS: string[] = [
|
|
|
698
739
|
SETTINGS.default_wearable.key,
|
|
699
740
|
SETTINGS.device_name.key,
|
|
700
741
|
SETTINGS.device_address.key,
|
|
742
|
+
SETTINGS.project_name.key,
|
|
701
743
|
SETTINGS.default_controller.key,
|
|
702
744
|
SETTINGS.pending_controller.key,
|
|
703
745
|
SETTINGS.controller_device_name.key,
|
|
@@ -705,7 +747,7 @@ export const BLUETOOTH_SETTING_KEYS: string[] = [
|
|
|
705
747
|
// offline applets:
|
|
706
748
|
SETTINGS.offline_mode.key,
|
|
707
749
|
// Runtime flag flipped by LocalSttFallbackCoordinator. Native reads it from
|
|
708
|
-
// GlassesStore to gate PCM
|
|
750
|
+
// GlassesStore to gate PCM 鈫?Sherpa feeding in handlePcm and to keep the
|
|
709
751
|
// mic on while local STT is the active engine.
|
|
710
752
|
SETTINGS.local_stt_fallback_active.key,
|
|
711
753
|
SETTINGS.gallery_mode.key,
|
|
@@ -716,12 +758,12 @@ export const BLUETOOTH_SETTING_KEYS: string[] = [
|
|
|
716
758
|
|
|
717
759
|
// Pairing identity is NATIVE-authoritative: the native layer writes it on
|
|
718
760
|
// pairing success (handleDeviceReady) / forget and echoes it down via
|
|
719
|
-
// save_setting; JS persists those echoes. JS
|
|
761
|
+
// save_setting; JS persists those echoes. JS鈫抧ative, identity travels ONLY in
|
|
720
762
|
// the explicit full seeds (device-store hydration, pre-connect push,
|
|
721
763
|
// post-demotion re-push) — never in the change-push subscription. Relaying an
|
|
722
764
|
// echoed identity change back up would make the sync bidirectional with loop
|
|
723
765
|
// gain 1: two identity values in flight (e.g. a boot demotion crossing a
|
|
724
|
-
// native promotion) then chase each other through push
|
|
766
|
+
// native promotion) then chase each other through push鈫抋pply鈫抏cho鈫抪ush
|
|
725
767
|
// forever, flapping the UI.
|
|
726
768
|
//
|
|
727
769
|
// Derived from the `nativeAuthoritative` descriptor flag (not maintained as a
|
|
@@ -764,6 +806,10 @@ const getDefaultSettings = () =>
|
|
|
764
806
|
// flight. Cleared on failure so a later call can retry.
|
|
765
807
|
let loadAllSettingsInFlight: AsyncResult<void, Error> | null = null
|
|
766
808
|
|
|
809
|
+
function printableSettingValue(key: string, value: unknown): string {
|
|
810
|
+
return key.includes("token") || key.includes("email") ? "<redacted>" : JSON.stringify(value)
|
|
811
|
+
}
|
|
812
|
+
|
|
767
813
|
export const useSettingsStore = create<SettingsState>()(
|
|
768
814
|
subscribeWithSelector((set, get) => ({
|
|
769
815
|
settings: getDefaultSettings(),
|
|
@@ -787,7 +833,7 @@ export const useSettingsStore = create<SettingsState>()(
|
|
|
787
833
|
}
|
|
788
834
|
|
|
789
835
|
// Update store immediately for optimistic UI
|
|
790
|
-
console.log(`SETTINGS: SET: ${key} = ${value}`)
|
|
836
|
+
console.log(`SETTINGS: SET: ${key} = ${printableSettingValue(key, value)}`)
|
|
791
837
|
set((state) => ({
|
|
792
838
|
settings: {...state.settings, [key]: value},
|
|
793
839
|
}))
|
|
@@ -906,7 +952,13 @@ export const useSettingsStore = create<SettingsState>()(
|
|
|
906
952
|
}
|
|
907
953
|
// normal key:value pair:
|
|
908
954
|
let value = res.value
|
|
909
|
-
|
|
955
|
+
// res.value IS the stored value; logging value.value printed
|
|
956
|
+
// "undefined" for every loaded setting and disguised present
|
|
957
|
+
// values as missing. Redact token- and email-bearing keys: console
|
|
958
|
+
// logs are uploaded in bug-report artifacts (same keys
|
|
959
|
+
// diagnosticContext's SENSITIVE_SETTINGS_KEYS strips, minus an
|
|
960
|
+
// import that would cycle stores <-> utils).
|
|
961
|
+
console.log(`SETTINGS: LOAD: ${setting.key} = ${printableSettingValue(setting.key, value)}`)
|
|
910
962
|
loadedSettings[setting.key] = value
|
|
911
963
|
}
|
|
912
964
|
|
|
@@ -919,6 +971,94 @@ export const useSettingsStore = create<SettingsState>()(
|
|
|
919
971
|
settings: {...state.settings, ...loadedSettings},
|
|
920
972
|
}))
|
|
921
973
|
|
|
974
|
+
// This hidden debug switch originally shipped default-off while the
|
|
975
|
+
// notification-listener cold-start ANR was being investigated. Now
|
|
976
|
+
// that the listener runs in its own guarded process, migrate existing
|
|
977
|
+
// installs to the new default once; later explicit debug changes still
|
|
978
|
+
// persist normally.
|
|
979
|
+
// Reset the cloud backend override when the build's environment changes.
|
|
980
|
+
//
|
|
981
|
+
// cloud_core_url / cloud_runtime_url are persist:true and outrank both
|
|
982
|
+
// the build's env and the compiled default (see resolveUrl in
|
|
983
|
+
// cloudClient.ts). That is what we want inside one environment: a
|
|
984
|
+
// developer's METRO_AUTO pin should survive a rebuild. It is wrong
|
|
985
|
+
// across environments.
|
|
986
|
+
//
|
|
987
|
+
// The concrete case is an install that moves BETWEEN environments: an
|
|
988
|
+
// internal tester running a dev build with a pinned override who then
|
|
989
|
+
// installs the store build. The override outranks that build's prod
|
|
990
|
+
// URLs, so without this they keep talking to dev with nothing
|
|
991
|
+
// surfacing it.
|
|
992
|
+
//
|
|
993
|
+
// Note what this deliberately does NOT do, because the distinction is
|
|
994
|
+
// easy to get backwards. TestFlight and the App Store receive the SAME
|
|
995
|
+
// binary, so promotion does not change EXPO_PUBLIC_BUILD_ENV and this
|
|
996
|
+
// reset never fires on it. Promotion is safe for a different reason:
|
|
997
|
+
// the publishing lane bakes the selected release cloud environment, and
|
|
998
|
+
// production promotes the already-tested binary. The same holds for
|
|
999
|
+
// Android beta-track to production.
|
|
1000
|
+
//
|
|
1001
|
+
// The residual gap is therefore an override pinned while already on a
|
|
1002
|
+
// prod-labelled build, which no label comparison can see. That is a
|
|
1003
|
+
// deliberate limit: reaching it means typing a URL into a dev-only
|
|
1004
|
+
// screen, VersionInfo renders the current value, and the same screen
|
|
1005
|
+
// clears it.
|
|
1006
|
+
//
|
|
1007
|
+
// Comparing the baked EXPO_PUBLIC_BUILD_ENV against the last one seen
|
|
1008
|
+
// on this device covers those environment switches and fresh installs
|
|
1009
|
+
// without touching the setting write path. A reinstall needs no
|
|
1010
|
+
// handling: it drops the marker and the override together
|
|
1011
|
+
// (android:allowBackup="false", and iOS deletes the container).
|
|
1012
|
+
const BUILD_ENV_KEY = "settings.lastBuildEnv"
|
|
1013
|
+
const buildEnv = (process.env.EXPO_PUBLIC_BUILD_ENV ?? "dev").trim() || "dev"
|
|
1014
|
+
const lastBuildEnv = storage.load<string>(BUILD_ENV_KEY)
|
|
1015
|
+
const previousBuildEnv = lastBuildEnv.is_error() ? undefined : lastBuildEnv.value
|
|
1016
|
+
if (previousBuildEnv !== buildEnv) {
|
|
1017
|
+
// Clear when there is no marker yet, not just on a recorded change.
|
|
1018
|
+
// The first build carrying this code meets every existing install
|
|
1019
|
+
// with previousBuildEnv === undefined, and those are exactly the
|
|
1020
|
+
// installs that may hold an override set before the pin existed --
|
|
1021
|
+
// the population this is here to repair. Treating "no marker" as a
|
|
1022
|
+
// fresh install would record the marker and never look again. A
|
|
1023
|
+
// genuinely fresh install has nothing persisted, so the clear below
|
|
1024
|
+
// writes each default over itself and costs nothing.
|
|
1025
|
+
//
|
|
1026
|
+
// Driven by the descriptors rather than a hardcoded key list, so a
|
|
1027
|
+
// setting that needs this behaviour declares it in one place and
|
|
1028
|
+
// cannot be missed here.
|
|
1029
|
+
const scoped = Object.values(SETTINGS).filter((setting) => setting.resetOnBuildEnvChange)
|
|
1030
|
+
console.log(
|
|
1031
|
+
`SETTINGS: build env ${previousBuildEnv ?? "(none recorded)"} -> ${buildEnv}, ` +
|
|
1032
|
+
`clearing ${scoped.length} build-scoped setting(s)`,
|
|
1033
|
+
)
|
|
1034
|
+
let allCleared = true
|
|
1035
|
+
for (const setting of scoped) {
|
|
1036
|
+
const cleared = await get().setSetting(setting.key, setting.defaultValue(), false)
|
|
1037
|
+
if (cleared.is_error()) {
|
|
1038
|
+
allCleared = false
|
|
1039
|
+
console.log(`SETTINGS: could not clear ${setting.key}:`, cleared.error)
|
|
1040
|
+
}
|
|
1041
|
+
}
|
|
1042
|
+
// Advance the marker only once the reset actually landed. Recording
|
|
1043
|
+
// it after a failed write would retire the retry and leave the stale
|
|
1044
|
+
// override for the life of the install; leaving it unset costs one
|
|
1045
|
+
// repeated attempt per launch until a write succeeds.
|
|
1046
|
+
if (allCleared) {
|
|
1047
|
+
storage.save(BUILD_ENV_KEY, buildEnv)
|
|
1048
|
+
}
|
|
1049
|
+
}
|
|
1050
|
+
|
|
1051
|
+
const NOTIFICATION_LISTENER_MIGRATION_KEY = "migration:android_notification_listener_default_on_v1"
|
|
1052
|
+
const notificationListenerMigrationDone = storage.load<boolean>(NOTIFICATION_LISTENER_MIGRATION_KEY)
|
|
1053
|
+
if (notificationListenerMigrationDone.is_error() || !notificationListenerMigrationDone.value) {
|
|
1054
|
+
const result = await get().setSetting(SETTINGS.android_notification_listener_enabled.key, true, false)
|
|
1055
|
+
if (result.is_error()) {
|
|
1056
|
+
console.log("SETTINGS: notification listener migration failed:", result.error)
|
|
1057
|
+
} else {
|
|
1058
|
+
storage.save(NOTIFICATION_LISTENER_MIGRATION_KEY, true)
|
|
1059
|
+
}
|
|
1060
|
+
}
|
|
1061
|
+
|
|
922
1062
|
// One-time migration: force android_blur=false for existing users.
|
|
923
1063
|
// The setting's default is already false; this migration covers users
|
|
924
1064
|
// who explicitly opted into Android blur effects before we discovered
|
|
@@ -926,7 +1066,7 @@ export const useSettingsStore = create<SettingsState>()(
|
|
|
926
1066
|
// The dimezisBlurViewSdk31Plus blur each costs ~5-10ms/frame; with
|
|
927
1067
|
// multiple blurs on home (top fade + AppSwitcherButton x2) a low-end
|
|
928
1068
|
// device misses the 16ms budget consistently. Users can turn it back
|
|
929
|
-
// on under Settings
|
|
1069
|
+
// on under Settings 鈫?Appearance once we've optimized further.
|
|
930
1070
|
//
|
|
931
1071
|
// The setSetting call also pushes to the server (saveOnServer: true)
|
|
932
1072
|
// so the server-stored value flips too — otherwise the next sync
|
|
@@ -952,6 +1092,27 @@ export const useSettingsStore = create<SettingsState>()(
|
|
|
952
1092
|
// already correct.
|
|
953
1093
|
storage.save(MIGRATION_KEY, true)
|
|
954
1094
|
}
|
|
1095
|
+
|
|
1096
|
+
// The old camera default cropped the sensor to 102掳. Move existing
|
|
1097
|
+
// default-shaped values to the full 118掳 sensor once; named miniapp
|
|
1098
|
+
// requests for the 102掳 "standard" preset remain available.
|
|
1099
|
+
const CAMERA_FOV_MIGRATION_KEY = "migration:camera_fov_full_sensor_v1"
|
|
1100
|
+
const cameraFovMigrationDone = storage.load<boolean>(CAMERA_FOV_MIGRATION_KEY)
|
|
1101
|
+
if (cameraFovMigrationDone.is_error() || !cameraFovMigrationDone.value) {
|
|
1102
|
+
const current = get().getSetting(SETTINGS.camera_fov.key) as {fov?: number; roi_position?: number} | undefined
|
|
1103
|
+
let migrationSucceeded = true
|
|
1104
|
+
if (current?.fov === 102 && (current.roi_position ?? 0) === 0) {
|
|
1105
|
+
const result = await get().setSetting(SETTINGS.camera_fov.key, {fov: 118, roi_position: 0}, true)
|
|
1106
|
+
if (result.is_error()) {
|
|
1107
|
+
console.log("SETTINGS: camera FOV migration failed:", result.error)
|
|
1108
|
+
migrationSucceeded = false
|
|
1109
|
+
}
|
|
1110
|
+
}
|
|
1111
|
+
// Unlike the blur migration above, a failed camera set may leave the
|
|
1112
|
+
// local value unchanged. Only mark this migration complete once the
|
|
1113
|
+
// desired value was applied so a transient failure retries on boot.
|
|
1114
|
+
if (migrationSucceeded) storage.save(CAMERA_FOV_MIGRATION_KEY, true)
|
|
1115
|
+
}
|
|
955
1116
|
})
|
|
956
1117
|
loadAllSettingsInFlight = inFlight
|
|
957
1118
|
void Promise.resolve(inFlight).then((result) => {
|
package/src/types/applet.ts
CHANGED
|
@@ -87,6 +87,8 @@ export interface DeclaredAction {
|
|
|
87
87
|
description: string
|
|
88
88
|
/** JSON-Schema input descriptor (MCP-compatible subset). */
|
|
89
89
|
parameters?: Record<string, unknown>
|
|
90
|
+
/** JSON-Schema descriptor for the action's structured result. */
|
|
91
|
+
outputSchema?: Record<string, unknown>
|
|
90
92
|
}
|
|
91
93
|
|
|
92
94
|
export interface ClientApp extends AppletInterface {
|
package/src/types/asg.ts
CHANGED
|
@@ -11,6 +11,12 @@ export interface CaptureFile {
|
|
|
11
11
|
name: string // "IMG_xxx/base.jpg" or "IMG_xxx.jpg" (legacy)
|
|
12
12
|
size: number
|
|
13
13
|
role: "primary" | "bracket" | "sidecar"
|
|
14
|
+
modified?: number
|
|
15
|
+
mime_type?: string
|
|
16
|
+
etag?: string
|
|
17
|
+
sha256?: string
|
|
18
|
+
download_url?: string
|
|
19
|
+
hash_url?: string
|
|
14
20
|
}
|
|
15
21
|
|
|
16
22
|
export interface CaptureGroup {
|
|
@@ -21,6 +27,7 @@ export interface CaptureGroup {
|
|
|
21
27
|
total_size: number
|
|
22
28
|
files: CaptureFile[]
|
|
23
29
|
thumbnail_data?: string
|
|
30
|
+
thumbnail_url?: string
|
|
24
31
|
duration?: number // video only
|
|
25
32
|
}
|
|
26
33
|
|
package/src/types/enums.ts
CHANGED
|
@@ -1,34 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
* @mentra/types - Shared enums for MentraOS
|
|
3
|
-
* These are runtime values (not pure types)
|
|
4
|
-
*/
|
|
5
|
-
|
|
6
|
-
/**
|
|
7
|
-
* Hardware component types that apps can require
|
|
8
|
-
*/
|
|
9
|
-
export enum HardwareType {
|
|
10
|
-
CAMERA = "CAMERA",
|
|
11
|
-
DISPLAY = "DISPLAY",
|
|
12
|
-
MICROPHONE = "MICROPHONE",
|
|
13
|
-
SPEAKER = "SPEAKER",
|
|
14
|
-
IMU = "IMU",
|
|
15
|
-
BUTTON = "BUTTON",
|
|
16
|
-
LIGHT = "LIGHT",
|
|
17
|
-
WIFI = "WIFI",
|
|
18
|
-
EXIST = "EXIST",
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
/**
|
|
22
|
-
* Levels of hardware requirements
|
|
23
|
-
*/
|
|
24
|
-
export enum HardwareRequirementLevel {
|
|
25
|
-
REQUIRED = "REQUIRED", // App cannot function without this hardware
|
|
26
|
-
OPTIONAL = "OPTIONAL", // App has enhanced features with this hardware
|
|
27
|
-
}
|
|
1
|
+
export {HardwareType, HardwareRequirementLevel} from "@mentra/miniapp/hardware"
|
|
28
2
|
|
|
29
3
|
export enum DeviceTypes {
|
|
30
4
|
NONE = "None",
|
|
31
5
|
SIMULATED = "Simulated Glasses",
|
|
6
|
+
AR99 = "AR99",
|
|
32
7
|
G1 = "Even Realities G1",
|
|
33
8
|
G2 = "Even Realities G2",
|
|
34
9
|
LIVE = "Mentra Live",
|
|
@@ -40,4 +15,4 @@ export enum DeviceTypes {
|
|
|
40
15
|
|
|
41
16
|
export enum ControllerTypes {
|
|
42
17
|
R1 = "Even Realities R1",
|
|
43
|
-
}
|
|
18
|
+
}
|