@mentra/engine 0.1.0-beta.0
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 +79 -0
- package/build/devtools.d.ts +11 -0
- package/build/devtools.d.ts.map +1 -0
- package/build/devtools.js +13 -0
- package/build/devtools.js.map +1 -0
- package/build/engine.d.ts +261 -0
- package/build/engine.d.ts.map +1 -0
- package/build/engine.js +170 -0
- package/build/engine.js.map +1 -0
- package/build/facades/dev.d.ts +58 -0
- package/build/facades/dev.d.ts.map +1 -0
- package/build/facades/dev.js +189 -0
- package/build/facades/dev.js.map +1 -0
- package/build/facades/display.d.ts +21 -0
- package/build/facades/display.d.ts.map +1 -0
- package/build/facades/display.js +17 -0
- package/build/facades/display.js.map +1 -0
- package/build/facades/displayMirror.d.ts +15 -0
- package/build/facades/displayMirror.d.ts.map +1 -0
- package/build/facades/displayMirror.js +29 -0
- package/build/facades/displayMirror.js.map +1 -0
- package/build/facades/gallery.d.ts +62 -0
- package/build/facades/gallery.d.ts.map +1 -0
- package/build/facades/gallery.js +61 -0
- package/build/facades/gallery.js.map +1 -0
- package/build/facades/glasses.d.ts +141 -0
- package/build/facades/glasses.d.ts.map +1 -0
- package/build/facades/glasses.js +199 -0
- package/build/facades/glasses.js.map +1 -0
- package/build/facades/glassesSettings.d.ts +13 -0
- package/build/facades/glassesSettings.d.ts.map +1 -0
- package/build/facades/glassesSettings.js +54 -0
- package/build/facades/glassesSettings.js.map +1 -0
- package/build/facades/glassesWifi.d.ts +25 -0
- package/build/facades/glassesWifi.d.ts.map +1 -0
- package/build/facades/glassesWifi.js +57 -0
- package/build/facades/glassesWifi.js.map +1 -0
- package/build/facades/miniapps.d.ts +43 -0
- package/build/facades/miniapps.d.ts.map +1 -0
- package/build/facades/miniapps.js +49 -0
- package/build/facades/miniapps.js.map +1 -0
- package/build/facades/notifications.d.ts +13 -0
- package/build/facades/notifications.d.ts.map +1 -0
- package/build/facades/notifications.js +12 -0
- package/build/facades/notifications.js.map +1 -0
- package/build/facades/ota.d.ts +103 -0
- package/build/facades/ota.d.ts.map +1 -0
- package/build/facades/ota.js +156 -0
- package/build/facades/ota.js.map +1 -0
- package/build/facades/pairing.d.ts +114 -0
- package/build/facades/pairing.d.ts.map +1 -0
- package/build/facades/pairing.js +275 -0
- package/build/facades/pairing.js.map +1 -0
- package/build/facades/permissions.d.ts +33 -0
- package/build/facades/permissions.d.ts.map +1 -0
- package/build/facades/permissions.js +155 -0
- package/build/facades/permissions.js.map +1 -0
- package/build/facades/phoneNotifications.d.ts +21 -0
- package/build/facades/phoneNotifications.d.ts.map +1 -0
- package/build/facades/phoneNotifications.js +51 -0
- package/build/facades/phoneNotifications.js.map +1 -0
- package/build/facades/reports.d.ts +36 -0
- package/build/facades/reports.d.ts.map +1 -0
- package/build/facades/reports.js +134 -0
- package/build/facades/reports.js.map +1 -0
- package/build/facades/session.d.ts +21 -0
- package/build/facades/session.d.ts.map +1 -0
- package/build/facades/session.js +52 -0
- package/build/facades/session.js.map +1 -0
- package/build/facades/settings.d.ts +37 -0
- package/build/facades/settings.d.ts.map +1 -0
- package/build/facades/settings.js +55 -0
- package/build/facades/settings.js.map +1 -0
- package/build/facades/speech.d.ts +30 -0
- package/build/facades/speech.d.ts.map +1 -0
- package/build/facades/speech.js +37 -0
- package/build/facades/speech.js.map +1 -0
- package/build/index.d.ts +43 -0
- package/build/index.d.ts.map +1 -0
- package/build/index.js +45 -0
- package/build/index.js.map +1 -0
- package/build/internal.d.ts +67 -0
- package/build/internal.d.ts.map +1 -0
- package/build/internal.js +90 -0
- package/build/internal.js.map +1 -0
- package/build/runtime/bootstrap.d.ts +83 -0
- package/build/runtime/bootstrap.d.ts.map +1 -0
- package/build/runtime/bootstrap.js +56 -0
- package/build/runtime/bootstrap.js.map +1 -0
- package/build/runtime/config.d.ts +146 -0
- package/build/runtime/config.d.ts.map +1 -0
- package/build/runtime/config.js +18 -0
- package/build/runtime/config.js.map +1 -0
- package/build/runtime/streamConfig.d.ts +4 -0
- package/build/runtime/streamConfig.d.ts.map +1 -0
- package/build/runtime/streamConfig.js +38 -0
- package/build/runtime/streamConfig.js.map +1 -0
- package/build/services/AppRegistry.d.ts +269 -0
- package/build/services/AppRegistry.d.ts.map +1 -0
- package/build/services/AppRegistry.js +1079 -0
- package/build/services/AppRegistry.js.map +1 -0
- package/build/services/AudioCloudUplink.d.ts +9 -0
- package/build/services/AudioCloudUplink.d.ts.map +1 -0
- package/build/services/AudioCloudUplink.js +48 -0
- package/build/services/AudioCloudUplink.js.map +1 -0
- package/build/services/AudioPlaybackService.d.ts +175 -0
- package/build/services/AudioPlaybackService.d.ts.map +1 -0
- package/build/services/AudioPlaybackService.js +705 -0
- package/build/services/AudioPlaybackService.js.map +1 -0
- package/build/services/AutomaticReportResult.d.ts +20 -0
- package/build/services/AutomaticReportResult.d.ts.map +1 -0
- package/build/services/AutomaticReportResult.js +29 -0
- package/build/services/AutomaticReportResult.js.map +1 -0
- package/build/services/BlobStore.d.ts +91 -0
- package/build/services/BlobStore.d.ts.map +1 -0
- package/build/services/BlobStore.js +668 -0
- package/build/services/BlobStore.js.map +1 -0
- package/build/services/CaptionsTesterReportService.d.ts +4 -0
- package/build/services/CaptionsTesterReportService.d.ts.map +1 -0
- package/build/services/CaptionsTesterReportService.js +80 -0
- package/build/services/CaptionsTesterReportService.js.map +1 -0
- package/build/services/CloudAudioSubscriptionSync.d.ts +24 -0
- package/build/services/CloudAudioSubscriptionSync.d.ts.map +1 -0
- package/build/services/CloudAudioSubscriptionSync.js +39 -0
- package/build/services/CloudAudioSubscriptionSync.js.map +1 -0
- package/build/services/CloudClientService.d.ts +143 -0
- package/build/services/CloudClientService.d.ts.map +1 -0
- package/build/services/CloudClientService.js +644 -0
- package/build/services/CloudClientService.js.map +1 -0
- package/build/services/CloudTranscriptE2EMetrics.d.ts +4 -0
- package/build/services/CloudTranscriptE2EMetrics.d.ts.map +1 -0
- package/build/services/CloudTranscriptE2EMetrics.js +24 -0
- package/build/services/CloudTranscriptE2EMetrics.js.map +1 -0
- package/build/services/ConnectionCoordinator.d.ts +51 -0
- package/build/services/ConnectionCoordinator.d.ts.map +1 -0
- package/build/services/ConnectionCoordinator.js +34 -0
- package/build/services/ConnectionCoordinator.js.map +1 -0
- package/build/services/DevServerBridge.d.ts +63 -0
- package/build/services/DevServerBridge.d.ts.map +1 -0
- package/build/services/DevServerBridge.js +294 -0
- package/build/services/DevServerBridge.js.map +1 -0
- package/build/services/DeviceEventRouter.d.ts +3 -0
- package/build/services/DeviceEventRouter.d.ts.map +1 -0
- package/build/services/DeviceEventRouter.js +190 -0
- package/build/services/DeviceEventRouter.js.map +1 -0
- package/build/services/DeviceStoreHydration.d.ts +38 -0
- package/build/services/DeviceStoreHydration.d.ts.map +1 -0
- package/build/services/DeviceStoreHydration.js +124 -0
- package/build/services/DeviceStoreHydration.js.map +1 -0
- package/build/services/DisplayProcessor.d.ts +223 -0
- package/build/services/DisplayProcessor.d.ts.map +1 -0
- package/build/services/DisplayProcessor.js +552 -0
- package/build/services/DisplayProcessor.js.map +1 -0
- package/build/services/GlassesReadiness.d.ts +41 -0
- package/build/services/GlassesReadiness.d.ts.map +1 -0
- package/build/services/GlassesReadiness.js +82 -0
- package/build/services/GlassesReadiness.js.map +1 -0
- package/build/services/GlassesSettingsSync.d.ts +33 -0
- package/build/services/GlassesSettingsSync.d.ts.map +1 -0
- package/build/services/GlassesSettingsSync.js +121 -0
- package/build/services/GlassesSettingsSync.js.map +1 -0
- package/build/services/GlassesStatusProjection.d.ts +3 -0
- package/build/services/GlassesStatusProjection.d.ts.map +1 -0
- package/build/services/GlassesStatusProjection.js +65 -0
- package/build/services/GlassesStatusProjection.js.map +1 -0
- package/build/services/HeadingService.d.ts +27 -0
- package/build/services/HeadingService.d.ts.map +1 -0
- package/build/services/HeadingService.js +96 -0
- package/build/services/HeadingService.js.map +1 -0
- package/build/services/LocalDisplayManager.d.ts +139 -0
- package/build/services/LocalDisplayManager.d.ts.map +1 -0
- package/build/services/LocalDisplayManager.js +579 -0
- package/build/services/LocalDisplayManager.js.map +1 -0
- package/build/services/LocalMiniappRuntime.d.ts +439 -0
- package/build/services/LocalMiniappRuntime.d.ts.map +1 -0
- package/build/services/LocalMiniappRuntime.js +3695 -0
- package/build/services/LocalMiniappRuntime.js.map +1 -0
- package/build/services/LocalSttFallbackCoordinator.d.ts +57 -0
- package/build/services/LocalSttFallbackCoordinator.d.ts.map +1 -0
- package/build/services/LocalSttFallbackCoordinator.js +137 -0
- package/build/services/LocalSttFallbackCoordinator.js.map +1 -0
- package/build/services/MentraJSCrashController.d.ts +97 -0
- package/build/services/MentraJSCrashController.d.ts.map +1 -0
- package/build/services/MentraJSCrashController.js +138 -0
- package/build/services/MentraJSCrashController.js.map +1 -0
- package/build/services/MentraJSCrashloopReportService.d.ts +9 -0
- package/build/services/MentraJSCrashloopReportService.d.ts.map +1 -0
- package/build/services/MentraJSCrashloopReportService.js +54 -0
- package/build/services/MentraJSCrashloopReportService.js.map +1 -0
- package/build/services/MentraJSLogPipeline.d.ts +87 -0
- package/build/services/MentraJSLogPipeline.d.ts.map +1 -0
- package/build/services/MentraJSLogPipeline.js +137 -0
- package/build/services/MentraJSLogPipeline.js.map +1 -0
- package/build/services/MentraJSRouter.d.ts +203 -0
- package/build/services/MentraJSRouter.d.ts.map +1 -0
- package/build/services/MentraJSRouter.js +480 -0
- package/build/services/MentraJSRouter.js.map +1 -0
- package/build/services/MentraUIRouter.d.ts +137 -0
- package/build/services/MentraUIRouter.d.ts.map +1 -0
- package/build/services/MentraUIRouter.js +210 -0
- package/build/services/MentraUIRouter.js.map +1 -0
- package/build/services/MicStateCoordinator.d.ts +37 -0
- package/build/services/MicStateCoordinator.d.ts.map +1 -0
- package/build/services/MicStateCoordinator.js +81 -0
- package/build/services/MicStateCoordinator.js.map +1 -0
- package/build/services/MiniappEngine.d.ts +31 -0
- package/build/services/MiniappEngine.d.ts.map +1 -0
- package/build/services/MiniappEngine.js +119 -0
- package/build/services/MiniappEngine.js.map +1 -0
- package/build/services/MiniappLauncher.d.ts +129 -0
- package/build/services/MiniappLauncher.d.ts.map +1 -0
- package/build/services/MiniappLauncher.js +291 -0
- package/build/services/MiniappLauncher.js.map +1 -0
- package/build/services/MiniappRunningRegistry.d.ts +24 -0
- package/build/services/MiniappRunningRegistry.d.ts.map +1 -0
- package/build/services/MiniappRunningRegistry.js +52 -0
- package/build/services/MiniappRunningRegistry.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/NavigationHandlers.d.ts +90 -0
- package/build/services/NavigationHandlers.d.ts.map +1 -0
- package/build/services/NavigationHandlers.js +379 -0
- package/build/services/NavigationHandlers.js.map +1 -0
- package/build/services/NavigationService.d.ts +254 -0
- package/build/services/NavigationService.d.ts.map +1 -0
- package/build/services/NavigationService.js +553 -0
- package/build/services/NavigationService.js.map +1 -0
- package/build/services/NotificationsEmitter.d.ts +28 -0
- package/build/services/NotificationsEmitter.d.ts.map +1 -0
- package/build/services/NotificationsEmitter.js +22 -0
- package/build/services/NotificationsEmitter.js.map +1 -0
- package/build/services/OfflineSpeechModelService.d.ts +33 -0
- package/build/services/OfflineSpeechModelService.d.ts.map +1 -0
- package/build/services/OfflineSpeechModelService.js +136 -0
- package/build/services/OfflineSpeechModelService.js.map +1 -0
- package/build/services/OtaInstallCoordinator.d.ts +195 -0
- package/build/services/OtaInstallCoordinator.d.ts.map +1 -0
- package/build/services/OtaInstallCoordinator.js +1047 -0
- package/build/services/OtaInstallCoordinator.js.map +1 -0
- package/build/services/OtaService.d.ts +3 -0
- package/build/services/OtaService.d.ts.map +1 -0
- package/build/services/OtaService.js +65 -0
- package/build/services/OtaService.js.map +1 -0
- package/build/services/OtaUpdateCheckService.d.ts +65 -0
- package/build/services/OtaUpdateCheckService.d.ts.map +1 -0
- package/build/services/OtaUpdateCheckService.js +260 -0
- package/build/services/OtaUpdateCheckService.js.map +1 -0
- package/build/services/PairingIdentity.d.ts +80 -0
- package/build/services/PairingIdentity.d.ts.map +1 -0
- package/build/services/PairingIdentity.js +145 -0
- package/build/services/PairingIdentity.js.map +1 -0
- 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 +24 -0
- package/build/services/PhoneCalendarService.js.map +1 -0
- package/build/services/PhoneCameraFovCoordinator.d.ts +28 -0
- package/build/services/PhoneCameraFovCoordinator.d.ts.map +1 -0
- package/build/services/PhoneCameraFovCoordinator.js +180 -0
- package/build/services/PhoneCameraFovCoordinator.js.map +1 -0
- package/build/services/PhoneLocationService.d.ts +36 -0
- package/build/services/PhoneLocationService.d.ts.map +1 -0
- package/build/services/PhoneLocationService.js +115 -0
- package/build/services/PhoneLocationService.js.map +1 -0
- package/build/services/PhoneNotificationsSync.d.ts +3 -0
- package/build/services/PhoneNotificationsSync.d.ts.map +1 -0
- package/build/services/PhoneNotificationsSync.js +35 -0
- package/build/services/PhoneNotificationsSync.js.map +1 -0
- package/build/services/PhonePhotoCoordinator.d.ts +103 -0
- package/build/services/PhonePhotoCoordinator.d.ts.map +1 -0
- package/build/services/PhonePhotoCoordinator.js +326 -0
- package/build/services/PhonePhotoCoordinator.js.map +1 -0
- package/build/services/PhoneStreamCoordinator.d.ts +168 -0
- package/build/services/PhoneStreamCoordinator.d.ts.map +1 -0
- package/build/services/PhoneStreamCoordinator.js +632 -0
- package/build/services/PhoneStreamCoordinator.js.map +1 -0
- package/build/services/PhoneVideoCoordinator.d.ts +50 -0
- package/build/services/PhoneVideoCoordinator.d.ts.map +1 -0
- package/build/services/PhoneVideoCoordinator.js +147 -0
- package/build/services/PhoneVideoCoordinator.js.map +1 -0
- package/build/services/STTModelManager.d.ts +65 -0
- package/build/services/STTModelManager.d.ts.map +1 -0
- package/build/services/STTModelManager.js +292 -0
- package/build/services/STTModelManager.js.map +1 -0
- package/build/services/SceneRenderer.d.ts +90 -0
- package/build/services/SceneRenderer.d.ts.map +1 -0
- package/build/services/SceneRenderer.js +248 -0
- package/build/services/SceneRenderer.js.map +1 -0
- 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/StreamLifecycleController.d.ts +67 -0
- package/build/services/StreamLifecycleController.d.ts.map +1 -0
- package/build/services/StreamLifecycleController.js +152 -0
- package/build/services/StreamLifecycleController.js.map +1 -0
- package/build/services/TTSModelManager.d.ts +90 -0
- package/build/services/TTSModelManager.d.ts.map +1 -0
- package/build/services/TTSModelManager.js +366 -0
- package/build/services/TTSModelManager.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/WebviewBridge.d.ts +22 -0
- package/build/services/WebviewBridge.d.ts.map +1 -0
- package/build/services/WebviewBridge.js +47 -0
- package/build/services/WebviewBridge.js.map +1 -0
- package/build/services/asg/GalleryMediaIntegrityReportService.d.ts +17 -0
- package/build/services/asg/GalleryMediaIntegrityReportService.d.ts.map +1 -0
- package/build/services/asg/GalleryMediaIntegrityReportService.js +43 -0
- package/build/services/asg/GalleryMediaIntegrityReportService.js.map +1 -0
- package/build/services/asg/asgCameraApi.d.ts +205 -0
- package/build/services/asg/asgCameraApi.d.ts.map +1 -0
- package/build/services/asg/asgCameraApi.js +1410 -0
- package/build/services/asg/asgCameraApi.js.map +1 -0
- 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/galleryMediaValidation.d.ts +29 -0
- package/build/services/asg/galleryMediaValidation.d.ts.map +1 -0
- package/build/services/asg/galleryMediaValidation.js +149 -0
- package/build/services/asg/galleryMediaValidation.js.map +1 -0
- package/build/services/asg/galleryNotices.d.ts +33 -0
- package/build/services/asg/galleryNotices.d.ts.map +1 -0
- package/build/services/asg/galleryNotices.js +29 -0
- package/build/services/asg/galleryNotices.js.map +1 -0
- 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 +20 -0
- package/build/services/asg/gallerySettingsService.d.ts.map +1 -0
- package/build/services/asg/gallerySettingsService.js +53 -0
- package/build/services/asg/gallerySettingsService.js.map +1 -0
- package/build/services/asg/gallerySyncNotifications.d.ts +56 -0
- package/build/services/asg/gallerySyncNotifications.d.ts.map +1 -0
- package/build/services/asg/gallerySyncNotifications.js +198 -0
- package/build/services/asg/gallerySyncNotifications.js.map +1 -0
- package/build/services/asg/gallerySyncService.d.ts +137 -0
- package/build/services/asg/gallerySyncService.d.ts.map +1 -0
- package/build/services/asg/gallerySyncService.js +1933 -0
- package/build/services/asg/gallerySyncService.js.map +1 -0
- 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 +146 -0
- package/build/services/asg/localStorageService.d.ts.map +1 -0
- package/build/services/asg/localStorageService.js +572 -0
- package/build/services/asg/localStorageService.js.map +1 -0
- package/build/services/asg/mediaProcessingQueue.d.ts +70 -0
- package/build/services/asg/mediaProcessingQueue.d.ts.map +1 -0
- package/build/services/asg/mediaProcessingQueue.js +451 -0
- package/build/services/asg/mediaProcessingQueue.js.map +1 -0
- package/build/services/asgOtaVersionUrl.d.ts +2 -0
- package/build/services/asgOtaVersionUrl.d.ts.map +1 -0
- package/build/services/asgOtaVersionUrl.js +36 -0
- package/build/services/asgOtaVersionUrl.js.map +1 -0
- package/build/services/blobPaths.d.ts +31 -0
- package/build/services/blobPaths.d.ts.map +1 -0
- package/build/services/blobPaths.js +86 -0
- package/build/services/blobPaths.js.map +1 -0
- package/build/services/cloudStreamApi.d.ts +59 -0
- package/build/services/cloudStreamApi.d.ts.map +1 -0
- package/build/services/cloudStreamApi.js +81 -0
- package/build/services/cloudStreamApi.js.map +1 -0
- package/build/services/gallerySyncClock.d.ts +17 -0
- package/build/services/gallerySyncClock.d.ts.map +1 -0
- package/build/services/gallerySyncClock.js +21 -0
- package/build/services/gallerySyncClock.js.map +1 -0
- package/build/services/glassesClockSync.d.ts +20 -0
- package/build/services/glassesClockSync.d.ts.map +1 -0
- package/build/services/glassesClockSync.js +97 -0
- package/build/services/glassesClockSync.js.map +1 -0
- package/build/services/manifestVersionGate.d.ts +28 -0
- package/build/services/manifestVersionGate.d.ts.map +1 -0
- package/build/services/manifestVersionGate.js +41 -0
- package/build/services/manifestVersionGate.js.map +1 -0
- package/build/services/mentraUiShim.d.ts +38 -0
- package/build/services/mentraUiShim.d.ts.map +1 -0
- package/build/services/mentraUiShim.js +360 -0
- package/build/services/mentraUiShim.js.map +1 -0
- package/build/services/navigation/roadNameResolver.d.ts +67 -0
- package/build/services/navigation/roadNameResolver.d.ts.map +1 -0
- package/build/services/navigation/roadNameResolver.js +96 -0
- package/build/services/navigation/roadNameResolver.js.map +1 -0
- package/build/services/navigation/routesApiCodec.d.ts +38 -0
- package/build/services/navigation/routesApiCodec.d.ts.map +1 -0
- package/build/services/navigation/routesApiCodec.js +68 -0
- package/build/services/navigation/routesApiCodec.js.map +1 -0
- package/build/services/otaDisplayState.d.ts +42 -0
- package/build/services/otaDisplayState.d.ts.map +1 -0
- package/build/services/otaDisplayState.js +92 -0
- package/build/services/otaDisplayState.js.map +1 -0
- package/build/services/otaInstallPolicy.d.ts +81 -0
- package/build/services/otaInstallPolicy.d.ts.map +1 -0
- package/build/services/otaInstallPolicy.js +96 -0
- package/build/services/otaInstallPolicy.js.map +1 -0
- package/build/services/otaLegacyMapping.d.ts +22 -0
- package/build/services/otaLegacyMapping.d.ts.map +1 -0
- package/build/services/otaLegacyMapping.js +56 -0
- package/build/services/otaLegacyMapping.js.map +1 -0
- package/build/services/slimStreamStatus.d.ts +7 -0
- package/build/services/slimStreamStatus.d.ts.map +1 -0
- package/build/services/slimStreamStatus.js +26 -0
- package/build/services/slimStreamStatus.js.map +1 -0
- package/build/stores/apps.d.ts +104 -0
- package/build/stores/apps.d.ts.map +1 -0
- package/build/stores/apps.js +492 -0
- package/build/stores/apps.js.map +1 -0
- package/build/stores/bluetoothSettingKeys.d.ts +4 -0
- package/build/stores/bluetoothSettingKeys.d.ts.map +1 -0
- package/build/stores/bluetoothSettingKeys.js +31 -0
- package/build/stores/bluetoothSettingKeys.js.map +1 -0
- package/build/stores/cloudClientStatus.d.ts +9 -0
- package/build/stores/cloudClientStatus.d.ts.map +1 -0
- package/build/stores/cloudClientStatus.js +24 -0
- package/build/stores/cloudClientStatus.js.map +1 -0
- package/build/stores/connection.d.ts +22 -0
- package/build/stores/connection.d.ts.map +1 -0
- package/build/stores/connection.js +43 -0
- package/build/stores/connection.js.map +1 -0
- package/build/stores/core.d.ts +15 -0
- package/build/stores/core.d.ts.map +1 -0
- package/build/stores/core.js +21 -0
- package/build/stores/core.js.map +1 -0
- package/build/stores/display.d.ts +24 -0
- package/build/stores/display.d.ts.map +1 -0
- package/build/stores/display.js +96 -0
- package/build/stores/display.js.map +1 -0
- package/build/stores/gallerySync.d.ts +101 -0
- package/build/stores/gallerySync.d.ts.map +1 -0
- package/build/stores/gallerySync.js +217 -0
- package/build/stores/gallerySync.js.map +1 -0
- package/build/stores/glasses.d.ts +62 -0
- package/build/stores/glasses.d.ts.map +1 -0
- package/build/stores/glasses.js +203 -0
- package/build/stores/glasses.js.map +1 -0
- package/build/stores/settings.d.ts +37 -0
- package/build/stores/settings.d.ts.map +1 -0
- package/build/stores/settings.js +922 -0
- package/build/stores/settings.js.map +1 -0
- package/build/types/applet.d.ts +96 -0
- package/build/types/applet.d.ts.map +1 -0
- package/build/types/applet.js +5 -0
- package/build/types/applet.js.map +1 -0
- package/build/types/asg.d.ts +53 -0
- package/build/types/asg.d.ts.map +1 -0
- package/build/types/asg.js +2 -0
- package/build/types/asg.js.map +1 -0
- package/build/types/capabilities/even-realities-g1.d.ts +12 -0
- package/build/types/capabilities/even-realities-g1.d.ts.map +1 -0
- package/build/types/capabilities/even-realities-g1.js +55 -0
- package/build/types/capabilities/even-realities-g1.js.map +1 -0
- package/build/types/capabilities/even-realities-g2.d.ts +12 -0
- package/build/types/capabilities/even-realities-g2.d.ts.map +1 -0
- package/build/types/capabilities/even-realities-g2.js +75 -0
- package/build/types/capabilities/even-realities-g2.js.map +1 -0
- package/build/types/capabilities/mentra-display.d.ts +12 -0
- package/build/types/capabilities/mentra-display.d.ts.map +1 -0
- package/build/types/capabilities/mentra-display.js +63 -0
- package/build/types/capabilities/mentra-display.js.map +1 -0
- package/build/types/capabilities/mentra-live.d.ts +12 -0
- package/build/types/capabilities/mentra-live.d.ts.map +1 -0
- package/build/types/capabilities/mentra-live.js +92 -0
- package/build/types/capabilities/mentra-live.js.map +1 -0
- package/build/types/capabilities/none.d.ts +13 -0
- package/build/types/capabilities/none.d.ts.map +1 -0
- package/build/types/capabilities/none.js +65 -0
- package/build/types/capabilities/none.js.map +1 -0
- package/build/types/capabilities/simulated-glasses.d.ts +13 -0
- package/build/types/capabilities/simulated-glasses.d.ts.map +1 -0
- package/build/types/capabilities/simulated-glasses.js +65 -0
- package/build/types/capabilities/simulated-glasses.js.map +1 -0
- package/build/types/capabilities/vuzix-z100.d.ts +12 -0
- package/build/types/capabilities/vuzix-z100.d.ts.map +1 -0
- package/build/types/capabilities/vuzix-z100.js +52 -0
- package/build/types/capabilities/vuzix-z100.js.map +1 -0
- package/build/types/enums.d.ts +40 -0
- package/build/types/enums.d.ts.map +1 -0
- package/build/types/enums.js +44 -0
- package/build/types/enums.js.map +1 -0
- package/build/types/hardware.d.ts +160 -0
- package/build/types/hardware.d.ts.map +1 -0
- package/build/types/hardware.js +36 -0
- package/build/types/hardware.js.map +1 -0
- package/build/types/index.d.ts +11 -0
- package/build/types/index.d.ts.map +1 -0
- package/build/types/index.js +10 -0
- package/build/types/index.js.map +1 -0
- package/build/utils/GlobalEventEmitter.d.ts +10 -0
- package/build/utils/GlobalEventEmitter.d.ts.map +1 -0
- package/build/utils/GlobalEventEmitter.js +13 -0
- package/build/utils/GlobalEventEmitter.js.map +1 -0
- package/build/utils/cloudClient/RnUdpAdapter.d.ts +3 -0
- package/build/utils/cloudClient/RnUdpAdapter.d.ts.map +1 -0
- package/build/utils/cloudClient/RnUdpAdapter.js +41 -0
- package/build/utils/cloudClient/RnUdpAdapter.js.map +1 -0
- package/build/utils/cloudClient/cloudSecureStore.d.ts +3 -0
- package/build/utils/cloudClient/cloudSecureStore.d.ts.map +1 -0
- package/build/utils/cloudClient/cloudSecureStore.js +26 -0
- package/build/utils/cloudClient/cloudSecureStore.js.map +1 -0
- package/build/utils/debouncedPatch.d.ts +6 -0
- package/build/utils/debouncedPatch.d.ts.map +1 -0
- package/build/utils/debouncedPatch.js +25 -0
- package/build/utils/debouncedPatch.js.map +1 -0
- package/build/utils/devLogging.d.ts +26 -0
- package/build/utils/devLogging.d.ts.map +1 -0
- package/build/utils/devLogging.js +116 -0
- package/build/utils/devLogging.js.map +1 -0
- package/build/utils/devMiniappLaunch.d.ts +44 -0
- package/build/utils/devMiniappLaunch.d.ts.map +1 -0
- package/build/utils/devMiniappLaunch.js +52 -0
- package/build/utils/devMiniappLaunch.js.map +1 -0
- package/build/utils/diagnosticContext.d.ts +3 -0
- package/build/utils/diagnosticContext.d.ts.map +1 -0
- package/build/utils/diagnosticContext.js +119 -0
- package/build/utils/diagnosticContext.js.map +1 -0
- package/build/utils/display/composer/ColumnComposer.d.ts +131 -0
- package/build/utils/display/composer/ColumnComposer.d.ts.map +1 -0
- package/build/utils/display/composer/ColumnComposer.js +204 -0
- package/build/utils/display/composer/ColumnComposer.js.map +1 -0
- package/build/utils/display/composer/index.d.ts +9 -0
- package/build/utils/display/composer/index.d.ts.map +1 -0
- package/build/utils/display/composer/index.js +9 -0
- package/build/utils/display/composer/index.js.map +1 -0
- package/build/utils/display/helpers/DisplayHelpers.d.ts +165 -0
- package/build/utils/display/helpers/DisplayHelpers.d.ts.map +1 -0
- package/build/utils/display/helpers/DisplayHelpers.js +312 -0
- package/build/utils/display/helpers/DisplayHelpers.js.map +1 -0
- package/build/utils/display/helpers/ScrollView.d.ts +183 -0
- package/build/utils/display/helpers/ScrollView.d.ts.map +1 -0
- package/build/utils/display/helpers/ScrollView.js +257 -0
- package/build/utils/display/helpers/ScrollView.js.map +1 -0
- package/build/utils/display/helpers/index.d.ts +11 -0
- package/build/utils/display/helpers/index.d.ts.map +1 -0
- package/build/utils/display/helpers/index.js +10 -0
- package/build/utils/display/helpers/index.js.map +1 -0
- package/build/utils/display/index.d.ts +174 -0
- package/build/utils/display/index.d.ts.map +1 -0
- package/build/utils/display/index.js +185 -0
- package/build/utils/display/index.js.map +1 -0
- package/build/utils/display/measurer/TextMeasurer.d.ts +160 -0
- package/build/utils/display/measurer/TextMeasurer.d.ts.map +1 -0
- package/build/utils/display/measurer/TextMeasurer.js +273 -0
- package/build/utils/display/measurer/TextMeasurer.js.map +1 -0
- package/build/utils/display/measurer/index.d.ts +10 -0
- package/build/utils/display/measurer/index.d.ts.map +1 -0
- package/build/utils/display/measurer/index.js +11 -0
- package/build/utils/display/measurer/index.js.map +1 -0
- package/build/utils/display/measurer/script-detection.d.ts +53 -0
- package/build/utils/display/measurer/script-detection.d.ts.map +1 -0
- package/build/utils/display/measurer/script-detection.js +184 -0
- package/build/utils/display/measurer/script-detection.js.map +1 -0
- package/build/utils/display/profiles/g1.d.ts +33 -0
- package/build/utils/display/profiles/g1.d.ts.map +1 -0
- package/build/utils/display/profiles/g1.js +213 -0
- package/build/utils/display/profiles/g1.js.map +1 -0
- package/build/utils/display/profiles/g2.d.ts +13 -0
- package/build/utils/display/profiles/g2.d.ts.map +1 -0
- package/build/utils/display/profiles/g2.js +34 -0
- package/build/utils/display/profiles/g2.js.map +1 -0
- package/build/utils/display/profiles/index.d.ts +12 -0
- package/build/utils/display/profiles/index.d.ts.map +1 -0
- package/build/utils/display/profiles/index.js +15 -0
- package/build/utils/display/profiles/index.js.map +1 -0
- package/build/utils/display/profiles/nex.d.ts +10 -0
- package/build/utils/display/profiles/nex.d.ts.map +1 -0
- package/build/utils/display/profiles/nex.js +150 -0
- package/build/utils/display/profiles/nex.js.map +1 -0
- package/build/utils/display/profiles/types.d.ts +103 -0
- package/build/utils/display/profiles/types.d.ts.map +1 -0
- package/build/utils/display/profiles/types.js +2 -0
- package/build/utils/display/profiles/types.js.map +1 -0
- package/build/utils/display/profiles/z100.d.ts +33 -0
- package/build/utils/display/profiles/z100.d.ts.map +1 -0
- package/build/utils/display/profiles/z100.js +182 -0
- package/build/utils/display/profiles/z100.js.map +1 -0
- package/build/utils/display/scene/degrade.d.ts +25 -0
- package/build/utils/display/scene/degrade.d.ts.map +1 -0
- package/build/utils/display/scene/degrade.js +64 -0
- package/build/utils/display/scene/degrade.js.map +1 -0
- package/build/utils/display/scene/differ.d.ts +38 -0
- package/build/utils/display/scene/differ.d.ts.map +1 -0
- package/build/utils/display/scene/differ.js +107 -0
- package/build/utils/display/scene/differ.js.map +1 -0
- package/build/utils/display/scene/index.d.ts +10 -0
- package/build/utils/display/scene/index.d.ts.map +1 -0
- package/build/utils/display/scene/index.js +6 -0
- package/build/utils/display/scene/index.js.map +1 -0
- package/build/utils/display/scene/process.d.ts +35 -0
- package/build/utils/display/scene/process.d.ts.map +1 -0
- package/build/utils/display/scene/process.js +187 -0
- package/build/utils/display/scene/process.js.map +1 -0
- package/build/utils/display/scene/store.d.ts +48 -0
- package/build/utils/display/scene/store.d.ts.map +1 -0
- package/build/utils/display/scene/store.js +0 -0
- package/build/utils/display/scene/store.js.map +1 -0
- package/build/utils/display/scene/types.d.ts +120 -0
- package/build/utils/display/scene/types.d.ts.map +1 -0
- package/build/utils/display/scene/types.js +0 -0
- package/build/utils/display/scene/types.js.map +1 -0
- package/build/utils/display/wrapper/TextWrapper.d.ts +102 -0
- package/build/utils/display/wrapper/TextWrapper.d.ts.map +1 -0
- package/build/utils/display/wrapper/TextWrapper.js +471 -0
- package/build/utils/display/wrapper/TextWrapper.js.map +1 -0
- package/build/utils/display/wrapper/index.d.ts +12 -0
- package/build/utils/display/wrapper/index.d.ts.map +1 -0
- package/build/utils/display/wrapper/index.js +12 -0
- package/build/utils/display/wrapper/index.js.map +1 -0
- package/build/utils/display/wrapper/types.d.ts +75 -0
- package/build/utils/display/wrapper/types.d.ts.map +1 -0
- package/build/utils/display/wrapper/types.js +11 -0
- package/build/utils/display/wrapper/types.js.map +1 -0
- package/build/utils/e2eMetrics.d.ts +6 -0
- package/build/utils/e2eMetrics.d.ts.map +1 -0
- package/build/utils/e2eMetrics.js +27 -0
- package/build/utils/e2eMetrics.js.map +1 -0
- package/build/utils/hardware/hardware.d.ts +42 -0
- package/build/utils/hardware/hardware.d.ts.map +1 -0
- package/build/utils/hardware/hardware.js +127 -0
- package/build/utils/hardware/hardware.js.map +1 -0
- package/build/utils/hardware/index.d.ts +2 -0
- package/build/utils/hardware/index.d.ts.map +1 -0
- package/build/utils/hardware/index.js +2 -0
- package/build/utils/hardware/index.js.map +1 -0
- package/build/utils/miniappGlobals.d.ts +60 -0
- package/build/utils/miniappGlobals.d.ts.map +1 -0
- package/build/utils/miniappGlobals.js +224 -0
- package/build/utils/miniappGlobals.js.map +1 -0
- package/build/utils/permissions/MediaLibraryPermissions.d.ts +45 -0
- package/build/utils/permissions/MediaLibraryPermissions.d.ts.map +1 -0
- package/build/utils/permissions/MediaLibraryPermissions.js +145 -0
- package/build/utils/permissions/MediaLibraryPermissions.js.map +1 -0
- package/build/utils/permissions/galleryDisplayName.d.ts +8 -0
- package/build/utils/permissions/galleryDisplayName.d.ts.map +1 -0
- package/build/utils/permissions/galleryDisplayName.js +25 -0
- package/build/utils/permissions/galleryDisplayName.js.map +1 -0
- package/build/utils/storage/index.d.ts +3 -0
- package/build/utils/storage/index.d.ts.map +1 -0
- package/build/utils/storage/index.js +3 -0
- package/build/utils/storage/index.js.map +1 -0
- package/build/utils/storage/storage.d.ts +24 -0
- package/build/utils/storage/storage.d.ts.map +1 -0
- package/build/utils/storage/storage.js +85 -0
- package/build/utils/storage/storage.js.map +1 -0
- package/build/utils/storage/zip.d.ts +3 -0
- package/build/utils/storage/zip.d.ts.map +1 -0
- package/build/utils/storage/zip.js +14 -0
- package/build/utils/storage/zip.js.map +1 -0
- package/build/utils/timers/index.d.ts +3 -0
- package/build/utils/timers/index.d.ts.map +1 -0
- package/build/utils/timers/index.js +3 -0
- package/build/utils/timers/index.js.map +1 -0
- package/build/utils/timers/timers.d.ts +9 -0
- package/build/utils/timers/timers.d.ts.map +1 -0
- package/build/utils/timers/timers.js +105 -0
- package/build/utils/timers/timers.js.map +1 -0
- package/package.json +120 -0
- package/src/devtools.ts +13 -0
- package/src/engine.ts +173 -0
- package/src/facades/dev.ts +198 -0
- package/src/facades/display.ts +17 -0
- package/src/facades/displayMirror.ts +33 -0
- package/src/facades/gallery.ts +69 -0
- package/src/facades/glasses.ts +206 -0
- package/src/facades/glassesSettings.ts +56 -0
- package/src/facades/glassesWifi.ts +68 -0
- package/src/facades/miniapps.ts +55 -0
- package/src/facades/notifications.ts +15 -0
- package/src/facades/ota.ts +174 -0
- package/src/facades/pairing.ts +329 -0
- package/src/facades/permissions.ts +165 -0
- package/src/facades/phoneNotifications.ts +50 -0
- package/src/facades/reports.ts +185 -0
- package/src/facades/session.ts +55 -0
- package/src/facades/settings.ts +57 -0
- package/src/facades/speech.ts +38 -0
- package/src/index.ts +191 -0
- package/src/internal.ts +159 -0
- package/src/runtime/bootstrap.ts +118 -0
- package/src/runtime/config.ts +147 -0
- package/src/runtime/streamConfig.ts +34 -0
- package/src/services/AppRegistry.ts +1190 -0
- package/src/services/AudioCloudUplink.ts +50 -0
- package/src/services/AudioPlaybackService.ts +813 -0
- package/src/services/AutomaticReportResult.ts +48 -0
- package/src/services/BlobStore.ts +746 -0
- package/src/services/CaptionsTesterReportService.ts +107 -0
- package/src/services/CloudAudioSubscriptionSync.ts +41 -0
- package/src/services/CloudClientService.ts +689 -0
- package/src/services/CloudTranscriptE2EMetrics.ts +27 -0
- package/src/services/ConnectionCoordinator.ts +65 -0
- package/src/services/DevServerBridge.ts +332 -0
- package/src/services/DeviceEventRouter.ts +238 -0
- package/src/services/DeviceStoreHydration.ts +130 -0
- package/src/services/DisplayProcessor.ts +775 -0
- package/src/services/GlassesReadiness.ts +103 -0
- package/src/services/GlassesSettingsSync.ts +134 -0
- package/src/services/GlassesStatusProjection.ts +73 -0
- package/src/services/HeadingService.ts +98 -0
- package/src/services/LocalDisplayManager.ts +703 -0
- package/src/services/LocalMiniappRuntime.ts +4213 -0
- package/src/services/LocalSttFallbackCoordinator.ts +147 -0
- package/src/services/MentraJSCrashController.ts +189 -0
- package/src/services/MentraJSCrashloopReportService.ts +66 -0
- package/src/services/MentraJSLogPipeline.ts +166 -0
- package/src/services/MentraJSRouter.ts +557 -0
- package/src/services/MentraUIRouter.ts +244 -0
- package/src/services/MicStateCoordinator.ts +94 -0
- package/src/services/MiniappEngine.ts +143 -0
- package/src/services/MiniappLauncher.ts +340 -0
- package/src/services/MiniappRunningRegistry.ts +57 -0
- package/src/services/NativeHttpResponse.ts +6 -0
- package/src/services/NavigationHandlers.ts +423 -0
- package/src/services/NavigationService.ts +731 -0
- package/src/services/NotificationsEmitter.ts +48 -0
- package/src/services/OfflineSpeechModelService.ts +168 -0
- package/src/services/OtaInstallCoordinator.ts +1205 -0
- package/src/services/OtaService.ts +83 -0
- package/src/services/OtaUpdateCheckService.ts +386 -0
- package/src/services/PairingIdentity.ts +154 -0
- package/src/services/PhoneCalendarHelpers.ts +212 -0
- package/src/services/PhoneCalendarService.ts +42 -0
- package/src/services/PhoneCameraFovCoordinator.ts +195 -0
- package/src/services/PhoneLocationService.ts +122 -0
- package/src/services/PhoneNotificationsSync.ts +44 -0
- package/src/services/PhonePhotoCoordinator.ts +409 -0
- package/src/services/PhoneStreamCoordinator.ts +777 -0
- package/src/services/PhoneVideoCoordinator.ts +189 -0
- package/src/services/STTModelManager.ts +360 -0
- package/src/services/SceneRenderer.ts +292 -0
- package/src/services/SentenceTtsPipeline.ts +106 -0
- package/src/services/StreamLifecycleController.ts +213 -0
- package/src/services/TTSModelManager.ts +466 -0
- package/src/services/TranscriptionRouting.ts +37 -0
- package/src/services/WebviewBridge.ts +50 -0
- package/src/services/asg/GalleryMediaIntegrityReportService.ts +70 -0
- package/src/services/asg/asgCameraApi.ts +1695 -0
- package/src/services/asg/cameraRollExportCoordinator.ts +627 -0
- package/src/services/asg/cameraRollExportLedger.ts +122 -0
- package/src/services/asg/galleryMediaValidation.ts +183 -0
- package/src/services/asg/galleryNotices.ts +61 -0
- package/src/services/asg/galleryPathMigration.ts +22 -0
- package/src/services/asg/gallerySettingsService.ts +68 -0
- package/src/services/asg/gallerySyncNotifications.ts +236 -0
- package/src/services/asg/gallerySyncService.ts +2269 -0
- package/src/services/asg/galleryTransferLedger.ts +312 -0
- package/src/services/asg/localNetworkTransport.ts +173 -0
- package/src/services/asg/localStorageService.ts +652 -0
- package/src/services/asg/mediaProcessingQueue.ts +518 -0
- package/src/services/asgOtaVersionUrl.ts +41 -0
- package/src/services/blobPaths.ts +86 -0
- package/src/services/cloudStreamApi.ts +154 -0
- package/src/services/gallerySyncClock.ts +39 -0
- package/src/services/glassesClockSync.ts +115 -0
- package/src/services/manifestVersionGate.ts +43 -0
- package/src/services/mentraUiShim.ts +366 -0
- package/src/services/navigation/roadNameResolver.ts +112 -0
- package/src/services/navigation/routesApiCodec.ts +69 -0
- package/src/services/otaDisplayState.ts +115 -0
- package/src/services/otaInstallPolicy.ts +106 -0
- package/src/services/otaLegacyMapping.ts +71 -0
- package/src/services/slimStreamStatus.ts +28 -0
- package/src/stores/apps.ts +614 -0
- package/src/stores/bluetoothSettingKeys.ts +36 -0
- package/src/stores/cloudClientStatus.ts +37 -0
- package/src/stores/connection.ts +69 -0
- package/src/stores/core.ts +32 -0
- package/src/stores/display.ts +121 -0
- package/src/stores/gallerySync.ts +380 -0
- package/src/stores/glasses.ts +309 -0
- package/src/stores/settings.ts +1001 -0
- package/src/types/applet.ts +112 -0
- package/src/types/asg.ts +58 -0
- package/src/types/capabilities/even-realities-g1.ts +67 -0
- package/src/types/capabilities/even-realities-g2.ts +88 -0
- package/src/types/capabilities/mentra-display.ts +75 -0
- package/src/types/capabilities/mentra-live.ts +103 -0
- package/src/types/capabilities/none.ts +76 -0
- package/src/types/capabilities/simulated-glasses.ts +76 -0
- package/src/types/capabilities/vuzix-z100.ts +64 -0
- package/src/types/enums.ts +43 -0
- package/src/types/hardware.ts +203 -0
- package/src/types/index.ts +37 -0
- package/src/utils/GlobalEventEmitter.ts +14 -0
- package/src/utils/cloudClient/RnUdpAdapter.ts +47 -0
- package/src/utils/cloudClient/cloudSecureStore.ts +28 -0
- package/src/utils/debouncedPatch.ts +28 -0
- package/src/utils/devLogging.ts +140 -0
- package/src/utils/devMiniappLaunch.ts +68 -0
- package/src/utils/diagnosticContext.ts +155 -0
- package/src/utils/display/composer/ColumnComposer.ts +285 -0
- package/src/utils/display/composer/index.ts +15 -0
- package/src/utils/display/helpers/DisplayHelpers.ts +413 -0
- package/src/utils/display/helpers/ScrollView.ts +337 -0
- package/src/utils/display/helpers/index.ts +14 -0
- package/src/utils/display/index.ts +273 -0
- package/src/utils/display/measurer/TextMeasurer.ts +346 -0
- package/src/utils/display/measurer/index.ts +21 -0
- package/src/utils/display/measurer/script-detection.ts +218 -0
- package/src/utils/display/profiles/g1.ts +236 -0
- package/src/utils/display/profiles/g2.ts +39 -0
- package/src/utils/display/profiles/index.ts +28 -0
- package/src/utils/display/profiles/nex.ts +166 -0
- package/src/utils/display/profiles/types.ts +132 -0
- package/src/utils/display/profiles/z100.ts +198 -0
- package/src/utils/display/scene/degrade.ts +80 -0
- package/src/utils/display/scene/differ.ts +128 -0
- package/src/utils/display/scene/index.ts +21 -0
- package/src/utils/display/scene/process.ts +214 -0
- package/src/utils/display/scene/store.ts +0 -0
- package/src/utils/display/scene/types.ts +0 -0
- package/src/utils/display/wrapper/TextWrapper.ts +546 -0
- package/src/utils/display/wrapper/index.ts +15 -0
- package/src/utils/display/wrapper/types.ts +102 -0
- package/src/utils/e2eMetrics.ts +30 -0
- package/src/utils/hardware/hardware.ts +166 -0
- package/src/utils/hardware/index.ts +1 -0
- package/src/utils/miniappGlobals.ts +260 -0
- package/src/utils/permissions/MediaLibraryPermissions.ts +161 -0
- package/src/utils/permissions/galleryDisplayName.ts +28 -0
- package/src/utils/storage/index.ts +2 -0
- package/src/utils/storage/storage.ts +101 -0
- package/src/utils/storage/zip.ts +13 -0
- package/src/utils/timers/index.ts +2 -0
- package/src/utils/timers/timers.ts +139 -0
package/README.md
ADDED
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
# @mentra/engine
|
|
2
|
+
|
|
3
|
+
Mentra Engine — the on-device miniapp library.
|
|
4
|
+
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
```sh
|
|
8
|
+
npm install @mentra/engine
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
> **Peer packages:** the engine's `@mentra/*` peer dependencies (`crust`,
|
|
12
|
+
> `cloud-client`, `cloud-protocol`, `miniapp`) must be available to your
|
|
13
|
+
> package manager. Until every peer is published to npm, consume the engine
|
|
14
|
+
> from this monorepo's workspace (as the example OEM app does).
|
|
15
|
+
|
|
16
|
+
> **Module format:** the published entry points target **React Native /
|
|
17
|
+
> Metro** consumers (the `react-native` exports condition). Loading
|
|
18
|
+
> `@mentra/engine` from plain Node (`require`/ESM) is not supported at 0.1.x —
|
|
19
|
+
> the `default` condition's build output is ESM with extensionless imports and
|
|
20
|
+
> will not resolve under Node's loader.
|
|
21
|
+
|
|
22
|
+
## Entry points
|
|
23
|
+
|
|
24
|
+
The package exposes three entry points (declared in `package.json` `exports`,
|
|
25
|
+
with the `react-native` condition pointing at `src/` so Metro, tsc and jest
|
|
26
|
+
resolve live TypeScript source):
|
|
27
|
+
|
|
28
|
+
- **`@mentra/engine`** (main, `src/index.ts`) — the OEM-facing surface: the
|
|
29
|
+
`engine` namespace (`configure`/`start`/`stop` + typed domain facades),
|
|
30
|
+
contract/read-model types, and pure helpers host UI renders with
|
|
31
|
+
(`decideReconnect`, `deriveDisplayState`, the `useApps`-style hooks,
|
|
32
|
+
OTA policy constants, hardware capability tables, `BgTimer`). Judgment rule:
|
|
33
|
+
read models, commands, pure functions and types are main; anything that
|
|
34
|
+
mutates runtime state or exposes a store/service is not.
|
|
35
|
+
- **`@mentra/engine/internal`** (`src/internal.ts`) — the migration-era
|
|
36
|
+
runtime surface: raw zustand stores (`useCoreStore`, `useSettingsStore`,
|
|
37
|
+
`useAppStatusStore`, …) and service singletons (`appRegistry`, `restComms`,
|
|
38
|
+
`cloudClientService`, the gallery cluster, the miniapp engine, …). The
|
|
39
|
+
host's `@/stores/*` shims re-export from here. New host code should use
|
|
40
|
+
`engine.*` instead; `scripts/check-mobile-runtime-boundary.sh` counts every
|
|
41
|
+
`/internal` import in `mobile/src` (report-only) as the burn-down metric.
|
|
42
|
+
- **`@mentra/engine/devtools`** (`src/devtools.ts`) — debug-only singletons
|
|
43
|
+
(`miniappRunningRegistry`, `devServerBridge`) for the internal dev screens.
|
|
44
|
+
|
|
45
|
+
See `cloud-v2/docs/issues/020-glasses-status-boundary/integration-review.md`
|
|
46
|
+
§D for the burn-down plan.
|
|
47
|
+
|
|
48
|
+
This module owns the pieces of miniapp logic and handling that aren't tied to
|
|
49
|
+
the rest of the manager app: the WebView message bus, the in-memory running
|
|
50
|
+
registry, and the JS globals that we inject into every miniapp WebView.
|
|
51
|
+
|
|
52
|
+
The goal is for all miniapp logic to live here over time. Today the move is
|
|
53
|
+
incremental — only the self-contained services have moved. Cross-cutting
|
|
54
|
+
services (LocalMiniappRuntime, MantleManager, Composer install pipeline) still
|
|
55
|
+
live under `mobile/src/` because they reach back into the manager's stores and
|
|
56
|
+
sockets.
|
|
57
|
+
|
|
58
|
+
## Public surface
|
|
59
|
+
|
|
60
|
+
```ts
|
|
61
|
+
import {engine, decideDevLaunchRoute} from "@mentra/engine"
|
|
62
|
+
import {webviewBridge, buildMiniappGlobalsScript} from "@mentra/engine/internal"
|
|
63
|
+
import {miniappRunningRegistry} from "@mentra/engine/devtools"
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
- `webviewBridge` — registers per-package WebView message handlers so any
|
|
67
|
+
service can `postMessage` JSON into a specific miniapp.
|
|
68
|
+
- `miniappRunningRegistry` — session-scoped set of currently-mounted local
|
|
69
|
+
miniapp packageNames (foreground + background).
|
|
70
|
+
- `buildMiniappGlobalsScript` — builds the `window.MentraOS` injection script
|
|
71
|
+
(and CSS variables / console-tap shim) used by every miniapp WebView.
|
|
72
|
+
- `decideDevLaunchRoute` — pre-flight a dev URL's `miniapp.json` to decide
|
|
73
|
+
whether to mount live or take the user to the offline screen.
|
|
74
|
+
|
|
75
|
+
## Imports
|
|
76
|
+
|
|
77
|
+
Inside `mobile/modules/engine/src/`, use **relative paths** (`./services/...`,
|
|
78
|
+
`../utils/...`). The mobile app's `@/*` alias is not configured here — there
|
|
79
|
+
is no build-time path rewriter for this module.
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `@mentra/engine/devtools` — the devtools-only surface.
|
|
3
|
+
*
|
|
4
|
+
* Debug/diagnostic singletons consumed by the Mentra app's internal dev
|
|
5
|
+
* screens (stress test, miniapp dev-server tooling). Never import this from
|
|
6
|
+
* product UI or host services; every `/devtools` import in mobile/src is
|
|
7
|
+
* counted (report-only) by scripts/check-mobile-runtime-boundary.sh.
|
|
8
|
+
*/
|
|
9
|
+
export { miniappRunningRegistry } from "./services/MiniappRunningRegistry";
|
|
10
|
+
export { default as devServerBridge } from "./services/DevServerBridge";
|
|
11
|
+
//# sourceMappingURL=devtools.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"devtools.d.ts","sourceRoot":"","sources":["../src/devtools.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAGH,OAAO,EAAC,sBAAsB,EAAC,MAAM,mCAAmC,CAAA;AAExE,OAAO,EAAC,OAAO,IAAI,eAAe,EAAC,MAAM,4BAA4B,CAAA"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `@mentra/engine/devtools` — the devtools-only surface.
|
|
3
|
+
*
|
|
4
|
+
* Debug/diagnostic singletons consumed by the Mentra app's internal dev
|
|
5
|
+
* screens (stress test, miniapp dev-server tooling). Never import this from
|
|
6
|
+
* product UI or host services; every `/devtools` import in mobile/src is
|
|
7
|
+
* counted (report-only) by scripts/check-mobile-runtime-boundary.sh.
|
|
8
|
+
*/
|
|
9
|
+
// Which miniapps the local runtime currently has running (stress-test screen).
|
|
10
|
+
export { miniappRunningRegistry } from "./services/MiniappRunningRegistry";
|
|
11
|
+
// Dev-server connection bridge for live-reloading local miniapps.
|
|
12
|
+
export { default as devServerBridge } from "./services/DevServerBridge";
|
|
13
|
+
//# sourceMappingURL=devtools.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"devtools.js","sourceRoot":"","sources":["../src/devtools.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,+EAA+E;AAC/E,OAAO,EAAC,sBAAsB,EAAC,MAAM,mCAAmC,CAAA;AACxE,kEAAkE;AAClE,OAAO,EAAC,OAAO,IAAI,eAAe,EAAC,MAAM,4BAA4B,CAAA","sourcesContent":["/**\n * `@mentra/engine/devtools` — the devtools-only surface.\n *\n * Debug/diagnostic singletons consumed by the Mentra app's internal dev\n * screens (stress test, miniapp dev-server tooling). Never import this from\n * product UI or host services; every `/devtools` import in mobile/src is\n * counted (report-only) by scripts/check-mobile-runtime-boundary.sh.\n */\n\n// Which miniapps the local runtime currently has running (stress-test screen).\nexport {miniappRunningRegistry} from \"./services/MiniappRunningRegistry\"\n// Dev-server connection bridge for live-reloading local miniapps.\nexport {default as devServerBridge} from \"./services/DevServerBridge\"\n"]}
|
|
@@ -0,0 +1,261 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `engine` — the namespaced OEM-facing engine API (the "(A) host API" from the
|
|
3
|
+
* Phase-1 contract). Host UI calls `engine.<domain>.<method>()`; each domain is a
|
|
4
|
+
* typed facade over the runtime. (Exported from the `@mentra/engine` module, whose
|
|
5
|
+
* name stays `engine` in code; the public API surface is `engine`.)
|
|
6
|
+
*
|
|
7
|
+
* It grows one facade at a time. The migration-era flat store/service exports
|
|
8
|
+
* live on the `@mentra/engine/internal` entry (and the debug singletons on
|
|
9
|
+
* `@mentra/engine/devtools`); they shrink as screens move onto `engine.*`.
|
|
10
|
+
*/
|
|
11
|
+
import { configure } from "./runtime/bootstrap";
|
|
12
|
+
export declare const engine: {
|
|
13
|
+
/** Front door — hand engine auth + config, then start/stop the runtime. */
|
|
14
|
+
configure: typeof configure;
|
|
15
|
+
/** Start the runtime: mark started + construct/connect the cloud client + begin
|
|
16
|
+
* syncing device settings to the glasses. */
|
|
17
|
+
start(): Promise<void>;
|
|
18
|
+
/** Stop the runtime: tear down the settings sync + cloud client + mark stopped.
|
|
19
|
+
* Each step is guarded so one failing teardown can't skip the rest and leak
|
|
20
|
+
* the remaining runtime services. */
|
|
21
|
+
stop(): Promise<void>;
|
|
22
|
+
glasses: {
|
|
23
|
+
connectDefault: () => Promise<void>;
|
|
24
|
+
disconnect: () => Promise<void>;
|
|
25
|
+
forget: () => Promise<void>;
|
|
26
|
+
connect: (device: import("@mentra/bluetooth-sdk").Device, options?: import("@mentra/bluetooth-sdk").ConnectOptions | undefined) => Promise<void>;
|
|
27
|
+
connectSimulated: () => Promise<void>;
|
|
28
|
+
setDefault: (device: import("@mentra/bluetooth-sdk").Device | null) => Promise<void>;
|
|
29
|
+
reconnect: () => Promise<boolean>;
|
|
30
|
+
isFirstPairing: () => boolean;
|
|
31
|
+
hasDefaultDevice: () => Promise<boolean>;
|
|
32
|
+
status: () => import("./facades/glasses").GlassesStatusSnapshot;
|
|
33
|
+
onStatus: (cb: (status: import("./facades/glasses").GlassesStatusSnapshot) => void) => (() => void);
|
|
34
|
+
info: () => import("./facades/glasses").GlassesInfoSnapshot;
|
|
35
|
+
onInfo: (cb: (info: import("./facades/glasses").GlassesInfoSnapshot) => void) => (() => void);
|
|
36
|
+
capabilities: () => import("./types").Capabilities;
|
|
37
|
+
requestVersionInfo: () => Promise<import("@mentra/bluetooth-sdk").VersionInfoResult>;
|
|
38
|
+
onButtonPress: (cb: (event: import("@mentra/bluetooth-sdk").ButtonPressEvent) => void) => (() => void);
|
|
39
|
+
onTouchGesture: (cb: (event: import("@mentra/bluetooth-sdk").TouchEvent) => void) => (() => void);
|
|
40
|
+
controller: {
|
|
41
|
+
connectDefault: () => Promise<void>;
|
|
42
|
+
disconnect: () => Promise<void>;
|
|
43
|
+
forget: () => Promise<void>;
|
|
44
|
+
status: () => import("./facades/glasses").ControllerStatusSnapshot;
|
|
45
|
+
onStatus: (cb: (status: import("./facades/glasses").ControllerStatusSnapshot) => void) => (() => void);
|
|
46
|
+
};
|
|
47
|
+
audio: {
|
|
48
|
+
getMediaVolume: () => Promise<import("@mentra/bluetooth-sdk").GlassesMediaVolumeGetResult>;
|
|
49
|
+
setMediaVolume: (level: number) => Promise<import("@mentra/bluetooth-sdk").GlassesMediaVolumeSetResult>;
|
|
50
|
+
setOwnAppPlaying: (playing: boolean) => Promise<void>;
|
|
51
|
+
};
|
|
52
|
+
wifi: {
|
|
53
|
+
scan(): Promise<import("@mentra/bluetooth-sdk").WifiSearchResult[]>;
|
|
54
|
+
onScanResult(cb: (networks: import("@mentra/bluetooth-sdk").WifiSearchResult[]) => void): () => void;
|
|
55
|
+
connect(ssid: string, password: string): Promise<void>;
|
|
56
|
+
forget(ssid: string): Promise<void>;
|
|
57
|
+
status(): import("@mentra/bluetooth-sdk").WifiStatus;
|
|
58
|
+
onStatus(cb: (status: import("@mentra/bluetooth-sdk").WifiStatus, previous: import("@mentra/bluetooth-sdk").WifiStatus) => void): () => void;
|
|
59
|
+
};
|
|
60
|
+
settings: {
|
|
61
|
+
get: <T = unknown>(key: string) => T | undefined;
|
|
62
|
+
set: <T = unknown>(key: string, value: T) => import("typesafe-ts").AsyncResult<void, Error>;
|
|
63
|
+
onChanged: <T = unknown>(key: string, cb: (value: T | undefined) => void) => (() => void);
|
|
64
|
+
descriptor: (key: string) => import("./stores/settings").Setting;
|
|
65
|
+
available: () => string[];
|
|
66
|
+
};
|
|
67
|
+
};
|
|
68
|
+
speech: {
|
|
69
|
+
restartTranscriber: () => Promise<void>;
|
|
70
|
+
stt: {
|
|
71
|
+
currentLanguage: () => string;
|
|
72
|
+
languages: () => import("./internal").SttLanguageConfig[];
|
|
73
|
+
languageInfo: () => Promise<import("./internal").SttLanguageInfo[]>;
|
|
74
|
+
download: (code?: string | undefined, onProgress?: ((progress: import("./internal").SttDownloadProgress) => void) | undefined, onExtractionProgress?: ((progress: import("./internal").SttExtractionProgress) => void) | undefined) => Promise<void>;
|
|
75
|
+
activate: (code: string) => void;
|
|
76
|
+
cancelDownload: () => Promise<void>;
|
|
77
|
+
deleteModel: (code?: string | undefined) => Promise<void>;
|
|
78
|
+
status: () => import("./internal").OfflineModelDownloadStatus | null;
|
|
79
|
+
onStatusChanged: (listener: (status: import("./internal").OfflineModelDownloadStatus | null) => void) => () => void;
|
|
80
|
+
};
|
|
81
|
+
tts: {
|
|
82
|
+
currentLanguage: () => string;
|
|
83
|
+
languages: () => import("./services/TTSModelManager").TTSLanguageConfig[];
|
|
84
|
+
languageInfo: () => Promise<import("./services/TTSModelManager").TTSLanguageInfo[]>;
|
|
85
|
+
download: (code?: string | undefined, onProgress?: ((progress: import("./services/TTSModelManager").TTSDownloadProgress) => void) | undefined, onExtractionProgress?: ((progress: import("./services/TTSModelManager").TTSExtractionProgress) => void) | undefined) => Promise<void>;
|
|
86
|
+
activate: (code: string) => void;
|
|
87
|
+
cancelDownload: () => Promise<void>;
|
|
88
|
+
deleteModel: (_code?: string | undefined) => Promise<void>;
|
|
89
|
+
};
|
|
90
|
+
};
|
|
91
|
+
/** Cloud (cloud-v2) live-session status + account ops — engine owns the client. */
|
|
92
|
+
session: {
|
|
93
|
+
status: () => import(".").CloudClientStatusSnapshot;
|
|
94
|
+
onStatus: (cb: (status: import(".").CloudClientStatusSnapshot) => void) => (() => void);
|
|
95
|
+
isConnected: () => boolean;
|
|
96
|
+
legacyWebsocketStatus: () => import(".").WebSocketStatus;
|
|
97
|
+
onLegacyWebsocketStatus: (cb: (status: import(".").WebSocketStatus) => void) => (() => void);
|
|
98
|
+
};
|
|
99
|
+
/** Typed keyed user settings over the engine-owned settings store. */
|
|
100
|
+
settings: {
|
|
101
|
+
get: <T = unknown>(key: string) => T | undefined;
|
|
102
|
+
set: <T = unknown>(key: string, value: T, syncToServer?: boolean) => import("typesafe-ts").AsyncResult<void, Error>;
|
|
103
|
+
onChanged: <T = unknown>(key: string, cb: (value: T | undefined) => void) => (() => void);
|
|
104
|
+
descriptor: (key: string) => import("./stores/settings").Setting;
|
|
105
|
+
keys: () => string[];
|
|
106
|
+
resetAllLocal: () => void;
|
|
107
|
+
loadAll: () => import("typesafe-ts").AsyncResult<void, Error>;
|
|
108
|
+
getAll: () => Record<string, unknown>;
|
|
109
|
+
setManyLocal: (values: Record<string, unknown>) => import("typesafe-ts").AsyncResult<void, Error>;
|
|
110
|
+
};
|
|
111
|
+
/** Developer/debug surface (backend+cloud URL overrides, reconnect, min version). */
|
|
112
|
+
dev: {
|
|
113
|
+
cloudUrls: () => {
|
|
114
|
+
core?: string;
|
|
115
|
+
runtime?: string;
|
|
116
|
+
};
|
|
117
|
+
setCloudUrls: (urls: {
|
|
118
|
+
core?: string;
|
|
119
|
+
runtime?: string;
|
|
120
|
+
}) => void;
|
|
121
|
+
reconnectCloud: () => void;
|
|
122
|
+
getMemoryMB: () => number;
|
|
123
|
+
bluetoothStatus: () => Record<string, unknown>;
|
|
124
|
+
loadDevMiniapp: (url: string, name?: string) => Promise<{
|
|
125
|
+
ok: true;
|
|
126
|
+
packageName: string;
|
|
127
|
+
name: string;
|
|
128
|
+
} | {
|
|
129
|
+
ok: false;
|
|
130
|
+
error: string;
|
|
131
|
+
}>;
|
|
132
|
+
runtimeStatus: () => import("./facades/dev").DevRuntimeStatusSnapshot;
|
|
133
|
+
onRuntimeStatus: (cb: (status: import("./facades/dev").DevRuntimeStatusSnapshot) => void) => (() => void);
|
|
134
|
+
};
|
|
135
|
+
/** Bug-report, automatic runtime report, and feedback submission. */
|
|
136
|
+
reports: {
|
|
137
|
+
submit(input: import(".").EngineSubmitReportInput): Promise<import(".").ReportSubmitResult>;
|
|
138
|
+
};
|
|
139
|
+
/** Firmware OTA read/observe surface (updateAvailable/status + on* subscriptions). */
|
|
140
|
+
ota: {
|
|
141
|
+
install: (otaVersionUrl?: string | null | undefined) => Promise<import("@mentra/bluetooth-sdk").OtaStartAckEvent>;
|
|
142
|
+
ping: () => Promise<void>;
|
|
143
|
+
checkForUpdates: (options?: import(".").OtaCheckCurrentGlassesOptions) => Promise<import(".").OtaCheckCurrentGlassesResult>;
|
|
144
|
+
clearUpdateAvailable: () => void;
|
|
145
|
+
clearProgress: () => void;
|
|
146
|
+
replacePendingUpdateSequence: (updates: import("@mentra/bluetooth-sdk/internal").OtaUpdateInfo["updates"]) => import("@mentra/bluetooth-sdk/internal").OtaUpdateInfo | null;
|
|
147
|
+
clearBuildNumberForNextCheck: () => void;
|
|
148
|
+
markMtkUpdatedThisSession: (updated: boolean) => void;
|
|
149
|
+
installSession: {
|
|
150
|
+
attach: () => void;
|
|
151
|
+
detach: () => void;
|
|
152
|
+
retry: () => void;
|
|
153
|
+
finish: () => void;
|
|
154
|
+
discard: () => void;
|
|
155
|
+
snapshot: () => import(".").OtaInstallSnapshot;
|
|
156
|
+
onSnapshot: (cb: (snapshot: import(".").OtaInstallSnapshot) => void) => (() => void);
|
|
157
|
+
};
|
|
158
|
+
updateAvailable: () => import("@mentra/bluetooth-sdk/internal").OtaUpdateInfo | null;
|
|
159
|
+
status: () => import("@mentra/bluetooth-sdk").OtaStatus | null;
|
|
160
|
+
snapshot: () => import(".").OtaSnapshot;
|
|
161
|
+
onUpdateAvailable: (cb: (info: import("@mentra/bluetooth-sdk/internal").OtaUpdateInfo | null) => void) => (() => void);
|
|
162
|
+
onStatus: (cb: (status: import("@mentra/bluetooth-sdk").OtaStatus | null) => void) => (() => void);
|
|
163
|
+
onSnapshot: (cb: (snapshot: import(".").OtaSnapshot) => void) => (() => void);
|
|
164
|
+
};
|
|
165
|
+
/** Gallery sync: status/onStatus · onNotice (host renders) · sync/cancel. */
|
|
166
|
+
gallery: {
|
|
167
|
+
status: () => import("./facades/gallery").GallerySyncStatus;
|
|
168
|
+
onStatus: (cb: (status: import("./facades/gallery").GallerySyncStatus) => void) => (() => void);
|
|
169
|
+
onNotice: (cb: (notice: import(".").GalleryNotice) => void) => (() => void);
|
|
170
|
+
sync: () => Promise<void>;
|
|
171
|
+
cancel: () => Promise<void>;
|
|
172
|
+
refreshStatus: () => Promise<void>;
|
|
173
|
+
removeFilesFromQueue: (fileNames: string[]) => void;
|
|
174
|
+
clearQueue: () => void;
|
|
175
|
+
clearGlassesGalleryStatus: () => void;
|
|
176
|
+
};
|
|
177
|
+
/** Miniapp lifecycle (the WebView bridge primitives are exported separately). */
|
|
178
|
+
miniapps: {
|
|
179
|
+
list: () => import("./types").ClientApp[];
|
|
180
|
+
onChanged: (cb: (apps: import("./types").ClientApp[]) => void) => (() => void);
|
|
181
|
+
refresh: () => Promise<void>;
|
|
182
|
+
start: (app: import("./types").ClientApp, opts?: import(".").StartOptions | undefined) => Promise<boolean>;
|
|
183
|
+
stop: (packageName: string) => Promise<void>;
|
|
184
|
+
setForeground: (packageName: string) => Promise<void>;
|
|
185
|
+
clearForeground: () => void;
|
|
186
|
+
stopAll: () => import("typesafe-ts").AsyncResult<void, Error>;
|
|
187
|
+
install: (url: string, opts?: {
|
|
188
|
+
versionOverride?: string;
|
|
189
|
+
} | undefined) => import("typesafe-ts").AsyncResult<void, Error>;
|
|
190
|
+
uninstall: (packageName: string, version?: string | undefined) => import("typesafe-ts").AsyncResult<void, Error>;
|
|
191
|
+
saveScreenshot: (packageName: string, screenshot: string) => Promise<void>;
|
|
192
|
+
setHiddenStatus: (packageName: string, status: boolean) => void;
|
|
193
|
+
};
|
|
194
|
+
/** First-time glasses discovery + pairing. */
|
|
195
|
+
pairing: {
|
|
196
|
+
readiness: () => import("./facades/pairing").PairingReadinessSnapshot;
|
|
197
|
+
onReadiness: (cb: (readiness: import("./facades/pairing").PairingReadinessSnapshot) => void) => (() => void);
|
|
198
|
+
identity: () => import(".").IdentitySnapshot;
|
|
199
|
+
onIdentity: (cb: (identity: import(".").IdentitySnapshot) => void) => (() => void);
|
|
200
|
+
markPendingSelection: (model: string) => import("typesafe-ts").AsyncResult<void, Error>;
|
|
201
|
+
scan: (model: import("@mentra/bluetooth-sdk").DeviceModel) => Promise<void>;
|
|
202
|
+
scanning: () => boolean;
|
|
203
|
+
onScanning: (cb: (scanning: boolean) => void) => (() => void);
|
|
204
|
+
scanningController: () => boolean;
|
|
205
|
+
onScanningController: (cb: (scanning: boolean) => void) => (() => void);
|
|
206
|
+
otherBtConnected: () => boolean;
|
|
207
|
+
onOtherBtConnected: (cb: (connected: boolean) => void) => (() => void);
|
|
208
|
+
searchResults: () => {
|
|
209
|
+
id: string;
|
|
210
|
+
model: import("@mentra/bluetooth-sdk").DeviceModel;
|
|
211
|
+
name: string;
|
|
212
|
+
address?: string;
|
|
213
|
+
rssi?: number;
|
|
214
|
+
}[];
|
|
215
|
+
onFound: (cb: (results: ReturnType<() => import("./stores/core").CoreState>["searchResults"]) => void) => (() => void);
|
|
216
|
+
pair: (device: import("@mentra/bluetooth-sdk").Device, options?: import("@mentra/bluetooth-sdk").ConnectOptions) => Promise<void>;
|
|
217
|
+
setDefault: (device: import("@mentra/bluetooth-sdk").Device | null) => Promise<void>;
|
|
218
|
+
setBluetoothClassicTarget: (device: import("@mentra/bluetooth-sdk").Device) => Promise<void>;
|
|
219
|
+
abandonAttempt: () => Promise<void>;
|
|
220
|
+
onPairFailure: (cb: (event: import("@mentra/bluetooth-sdk").PairFailureEvent) => void) => (() => void);
|
|
221
|
+
onGlassesNotReady: (cb: (event: import("@mentra/bluetooth-sdk").GlassesNotReadyEvent) => void) => (() => void);
|
|
222
|
+
waitForReady: (options?: import("./facades/pairing").PairingReadyWaitOptions) => Promise<boolean>;
|
|
223
|
+
waitForBluetoothClassic: (options?: Pick<import("./facades/pairing").PairingReadyWaitOptions, "timeoutMs" | "signal">) => Promise<boolean>;
|
|
224
|
+
};
|
|
225
|
+
/** Phone→glasses notification forwarding (Android). */
|
|
226
|
+
phoneNotifications: {
|
|
227
|
+
enabled: () => boolean;
|
|
228
|
+
setEnabled: (enabled: boolean) => import("typesafe-ts").AsyncResult<void, Error> | undefined;
|
|
229
|
+
installedApps: () => Promise<Array<{
|
|
230
|
+
packageName: string;
|
|
231
|
+
appName: string;
|
|
232
|
+
icon: string | null;
|
|
233
|
+
}>>;
|
|
234
|
+
blocklist: () => string[];
|
|
235
|
+
setBlocklist: (packageNames: string[]) => import("typesafe-ts").AsyncResult<void, Error>;
|
|
236
|
+
hasListenerPermission: () => Promise<boolean>;
|
|
237
|
+
requestListenerPermission: () => Promise<boolean> | undefined;
|
|
238
|
+
};
|
|
239
|
+
/** OS permissions (check/request/openSettings + per-miniapp requirements). */
|
|
240
|
+
permissions: {
|
|
241
|
+
check(feature: string): Promise<boolean>;
|
|
242
|
+
request(feature: string): Promise<boolean>;
|
|
243
|
+
openSettings: () => Promise<void>;
|
|
244
|
+
requirementsForMiniapp(packageName: string): Promise<import("./types").AppletPermission[]>;
|
|
245
|
+
};
|
|
246
|
+
/** Inbound alerts engine→host (crashloop, version-incompatible, connection loss). */
|
|
247
|
+
notifications: {
|
|
248
|
+
onNotification: (cb: (notification: import(".").IslandNotification) => void) => (() => void);
|
|
249
|
+
};
|
|
250
|
+
display: {
|
|
251
|
+
mirror: {
|
|
252
|
+
current(): import(".").DisplayMirrorEvent;
|
|
253
|
+
onMirror(cb: (event: import(".").DisplayMirrorEvent) => void): () => void;
|
|
254
|
+
view(): string;
|
|
255
|
+
setView(view: "main" | "dashboard"): void;
|
|
256
|
+
};
|
|
257
|
+
text: (text: string, x?: number | undefined, y?: number | undefined, size?: number | undefined) => Promise<void>;
|
|
258
|
+
clear: () => Promise<void>;
|
|
259
|
+
};
|
|
260
|
+
};
|
|
261
|
+
//# sourceMappingURL=engine.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"engine.d.ts","sourceRoot":"","sources":["../src/engine.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AACH,OAAO,EAAC,SAAS,EAAiD,MAAM,qBAAqB,CAAA;AAkC7F,eAAO,MAAM,MAAM;IACjB,2EAA2E;;IAE3E;iDAC6C;;IAyE7C;;yCAEqC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IA0BrC,mFAAmF;;;;;;;;IAEnF,sEAAsE;;;;;;;;;;;;IAEtE,qFAAqF;;;gBAxFtE,CAAC;mBACd,CAAH;;;gBAIe,CAAC;mBAAiB,CAAC;;;;;;;;;;;;;;;;IAqFjC,qEAAqE;;;;IAErE,sFAAsF;;;;;;;;;;;;;;;;;;;;;;;;;;IAEtF,6EAA6E;;;;;;;;;;;;IAE7E,iFAAiF;;;;;;;;;;;;;;;;;IAEjF,8CAA8C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAE9C,uDAAuD;;;;;;;;;;;;;;IAEvD,8EAA8E;;;;;;;IAE9E,qFAAqF;;;;;;;;;;;;;;CAGtF,CAAA"}
|
package/build/engine.js
ADDED
|
@@ -0,0 +1,170 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `engine` — the namespaced OEM-facing engine API (the "(A) host API" from the
|
|
3
|
+
* Phase-1 contract). Host UI calls `engine.<domain>.<method>()`; each domain is a
|
|
4
|
+
* typed facade over the runtime. (Exported from the `@mentra/engine` module, whose
|
|
5
|
+
* name stays `engine` in code; the public API surface is `engine`.)
|
|
6
|
+
*
|
|
7
|
+
* It grows one facade at a time. The migration-era flat store/service exports
|
|
8
|
+
* live on the `@mentra/engine/internal` entry (and the debug singletons on
|
|
9
|
+
* `@mentra/engine/devtools`); they shrink as screens move onto `engine.*`.
|
|
10
|
+
*/
|
|
11
|
+
import { configure, start as bootstrapStart, stop as bootstrapStop } from "./runtime/bootstrap";
|
|
12
|
+
import { cloudClientService } from "./services/CloudClientService";
|
|
13
|
+
import { hydrateDeviceStore, demoteOrphanedDefaultWearable } from "./services/DeviceStoreHydration";
|
|
14
|
+
import { startGlassesSettingsSync, stopGlassesSettingsSync } from "./services/GlassesSettingsSync";
|
|
15
|
+
import { startGlassesStatusProjection, stopGlassesStatusProjection } from "./services/GlassesStatusProjection";
|
|
16
|
+
import { startOtaService, stopOtaService } from "./services/OtaService";
|
|
17
|
+
import { startAudioCloudUplink, stopAudioCloudUplink } from "./services/AudioCloudUplink";
|
|
18
|
+
import { startDeviceEventRouter, stopDeviceEventRouter } from "./services/DeviceEventRouter";
|
|
19
|
+
import { startPhoneNotificationsSync, stopPhoneNotificationsSync } from "./services/PhoneNotificationsSync";
|
|
20
|
+
import { startCaptionsTesterReportService, stopCaptionsTesterReportService } from "./services/CaptionsTesterReportService";
|
|
21
|
+
import { startMentraJSCrashloopReportService, stopMentraJSCrashloopReportService, } from "./services/MentraJSCrashloopReportService";
|
|
22
|
+
import { ensureMiniappEngine, stopMiniappEngine } from "./services/MiniappEngine";
|
|
23
|
+
import localMiniappRuntime from "./services/LocalMiniappRuntime";
|
|
24
|
+
import displayProcessor from "./services/DisplayProcessor";
|
|
25
|
+
import { gallerySyncService } from "./services/asg/gallerySyncService";
|
|
26
|
+
import { glasses } from "./facades/glasses";
|
|
27
|
+
import { display } from "./facades/display";
|
|
28
|
+
import { speech } from "./facades/speech";
|
|
29
|
+
import { session } from "./facades/session";
|
|
30
|
+
import { settings } from "./facades/settings";
|
|
31
|
+
import { dev } from "./facades/dev";
|
|
32
|
+
import { reports } from "./facades/reports";
|
|
33
|
+
import { ota } from "./facades/ota";
|
|
34
|
+
import { gallery } from "./facades/gallery";
|
|
35
|
+
import { miniapps } from "./facades/miniapps";
|
|
36
|
+
import { pairing } from "./facades/pairing";
|
|
37
|
+
import { phoneNotifications } from "./facades/phoneNotifications";
|
|
38
|
+
import { permissions } from "./facades/permissions";
|
|
39
|
+
import { notifications } from "./facades/notifications";
|
|
40
|
+
import { logBuffer } from "./utils/devLogging";
|
|
41
|
+
export const engine = {
|
|
42
|
+
/** Front door — hand engine auth + config, then start/stop the runtime. */
|
|
43
|
+
configure,
|
|
44
|
+
/** Start the runtime: mark started + construct/connect the cloud client + begin
|
|
45
|
+
* syncing device settings to the glasses. */
|
|
46
|
+
async start() {
|
|
47
|
+
// Reports attach recent phone logs, so engine owns console interception for
|
|
48
|
+
// OEM hosts too. Idempotent; the Mentra host may start it earlier.
|
|
49
|
+
logBuffer.startConsoleInterception();
|
|
50
|
+
await bootstrapStart();
|
|
51
|
+
// Construct + connect the cloud client so the documented configure()+start()
|
|
52
|
+
// lifecycle yields a live engine.session for OEMs. Idempotent for repeated
|
|
53
|
+
// start() calls.
|
|
54
|
+
cloudClientService.init();
|
|
55
|
+
// Project native device status -> the engine stores (the inbound feed the rest
|
|
56
|
+
// of the runtime reads). Established first so the stores are live before the
|
|
57
|
+
// syncs below react to them.
|
|
58
|
+
startGlassesStatusProjection();
|
|
59
|
+
// Route the rest of the inbound device events (wifi/hotspot/gallery -> stores+bus,
|
|
60
|
+
// photo/stream -> coordinators, button/touch/accel/head -> miniapps, save_setting ->
|
|
61
|
+
// store, miniapp_selected -> launcher) so a bare OEM gets device data, not just the
|
|
62
|
+
// Mentra app's MantleManager.
|
|
63
|
+
startDeviceEventRouter();
|
|
64
|
+
// Hydration contract: the native DeviceStore is in-memory and starts empty
|
|
65
|
+
// every launch; seed it from the persisted settings BEFORE start() resolves
|
|
66
|
+
// so every post-start getDefaultDevice() read is a trustworthy two-state
|
|
67
|
+
// answer (no false "absent" for genuinely-paired users at cold start).
|
|
68
|
+
// Ordered before startGlassesSettingsSync so the settings load can't
|
|
69
|
+
// double-push through the change subscription. A failed hydration must not
|
|
70
|
+
// brick the runtime: start() continues, and the guards that consume
|
|
71
|
+
// hasDefaultDevice() see the rejection and fail open.
|
|
72
|
+
try {
|
|
73
|
+
await hydrateDeviceStore();
|
|
74
|
+
// Boot repair: a persisted default_wearable without a native default
|
|
75
|
+
// device (identity abandoned mid-pairing, or resurrected from the server
|
|
76
|
+
// before identity stopped syncing) demotes to pending_wearable so hosts
|
|
77
|
+
// render finish-pairing instead of a connect that would throw.
|
|
78
|
+
await demoteOrphanedDefaultWearable();
|
|
79
|
+
}
|
|
80
|
+
catch (error) {
|
|
81
|
+
console.warn("engine.start: device-store hydration failed:", error instanceof Error ? error.message : error);
|
|
82
|
+
}
|
|
83
|
+
// Project the glasses' OTA events into the store for the engine.ota read surface.
|
|
84
|
+
startOtaService();
|
|
85
|
+
// Forward glasses mic_lc3 frames to the v2 cloud session so cloud transcription
|
|
86
|
+
// works for any host (not just the Mentra app's host-side MantleManager fork).
|
|
87
|
+
startAudioCloudUplink();
|
|
88
|
+
try {
|
|
89
|
+
await cloudClientService.syncCoreTokenToBluetooth();
|
|
90
|
+
}
|
|
91
|
+
catch (error) {
|
|
92
|
+
console.warn("engine.start: initial Cloud V2 core token sync failed:", error instanceof Error ? error.message : error);
|
|
93
|
+
}
|
|
94
|
+
// Push device-setting changes to the glasses for ANY host, so
|
|
95
|
+
// engine.glasses.settings.set() reaches the device (not just the Mentra app).
|
|
96
|
+
startGlassesSettingsSync();
|
|
97
|
+
// Same for phone-notification config -> the native listener (Android).
|
|
98
|
+
startPhoneNotificationsSync();
|
|
99
|
+
// Android internal/e2e: laptop captions tester can broadcast a failure intent;
|
|
100
|
+
// engine owns turning that into a Cloud V2 report.
|
|
101
|
+
startCaptionsTesterReportService();
|
|
102
|
+
// MentraJS crashloop-disabled is runtime state; engine owns filing the
|
|
103
|
+
// automatic report while hosts only render alert/telemetry side effects.
|
|
104
|
+
startMentraJSCrashloopReportService();
|
|
105
|
+
// Bring up the local-miniapp engine so a bare OEM can run MentraJS miniapps:
|
|
106
|
+
// the LocalMiniappRuntime (registry + WebView bridge), the MentraJS router
|
|
107
|
+
// (crust-bound spawn/dispatch pump + launcher wiring), the DisplayProcessor
|
|
108
|
+
// (layout arbitration over the engine stores), and the gallery-sync service.
|
|
109
|
+
// All idempotent — when the Mentra app's host bootstrap also calls these, the
|
|
110
|
+
// second call is a no-op. Host-only crashloop telemetry is attached
|
|
111
|
+
// separately by the Mentra app.
|
|
112
|
+
localMiniappRuntime.initialize();
|
|
113
|
+
ensureMiniappEngine();
|
|
114
|
+
displayProcessor.attachToRuntime();
|
|
115
|
+
gallerySyncService.initialize();
|
|
116
|
+
},
|
|
117
|
+
/** Stop the runtime: tear down the settings sync + cloud client + mark stopped.
|
|
118
|
+
* Each step is guarded so one failing teardown can't skip the rest and leak
|
|
119
|
+
* the remaining runtime services. */
|
|
120
|
+
async stop() {
|
|
121
|
+
const safely = async (label, step) => {
|
|
122
|
+
try {
|
|
123
|
+
await step();
|
|
124
|
+
}
|
|
125
|
+
catch (error) {
|
|
126
|
+
console.warn(`engine.stop: ${label} failed:`, error);
|
|
127
|
+
}
|
|
128
|
+
};
|
|
129
|
+
await safely("glasses settings sync", stopGlassesSettingsSync);
|
|
130
|
+
await safely("glasses status projection", stopGlassesStatusProjection);
|
|
131
|
+
await safely("device event router", stopDeviceEventRouter);
|
|
132
|
+
await safely("ota service", stopOtaService);
|
|
133
|
+
await safely("audio cloud uplink", stopAudioCloudUplink);
|
|
134
|
+
await safely("phone notifications sync", stopPhoneNotificationsSync);
|
|
135
|
+
await safely("captions tester report service", stopCaptionsTesterReportService);
|
|
136
|
+
await safely("mentrajs crashloop report service", stopMentraJSCrashloopReportService);
|
|
137
|
+
await safely("miniapp engine", stopMiniappEngine);
|
|
138
|
+
await safely("local miniapp runtime", () => localMiniappRuntime.cleanup());
|
|
139
|
+
await safely("display processor", () => displayProcessor.detachFromRuntime());
|
|
140
|
+
await safely("gallery sync service", () => gallerySyncService.cleanup());
|
|
141
|
+
await safely("cloud client", () => cloudClientService.stop());
|
|
142
|
+
await safely("bootstrap", bootstrapStop);
|
|
143
|
+
},
|
|
144
|
+
glasses,
|
|
145
|
+
speech,
|
|
146
|
+
/** Cloud (cloud-v2) live-session status + account ops — engine owns the client. */
|
|
147
|
+
session,
|
|
148
|
+
/** Typed keyed user settings over the engine-owned settings store. */
|
|
149
|
+
settings,
|
|
150
|
+
/** Developer/debug surface (backend+cloud URL overrides, reconnect, min version). */
|
|
151
|
+
dev,
|
|
152
|
+
/** Bug-report, automatic runtime report, and feedback submission. */
|
|
153
|
+
reports,
|
|
154
|
+
/** Firmware OTA read/observe surface (updateAvailable/status + on* subscriptions). */
|
|
155
|
+
ota,
|
|
156
|
+
/** Gallery sync: status/onStatus · onNotice (host renders) · sync/cancel. */
|
|
157
|
+
gallery,
|
|
158
|
+
/** Miniapp lifecycle (the WebView bridge primitives are exported separately). */
|
|
159
|
+
miniapps,
|
|
160
|
+
/** First-time glasses discovery + pairing. */
|
|
161
|
+
pairing,
|
|
162
|
+
/** Phone→glasses notification forwarding (Android). */
|
|
163
|
+
phoneNotifications,
|
|
164
|
+
/** OS permissions (check/request/openSettings + per-miniapp requirements). */
|
|
165
|
+
permissions,
|
|
166
|
+
/** Inbound alerts engine→host (crashloop, version-incompatible, connection loss). */
|
|
167
|
+
notifications,
|
|
168
|
+
display,
|
|
169
|
+
};
|
|
170
|
+
//# sourceMappingURL=engine.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"engine.js","sourceRoot":"","sources":["../src/engine.ts"],"names":[],"mappings":"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","sourcesContent":["/**\n * `engine` — the namespaced OEM-facing engine API (the \"(A) host API\" from the\n * Phase-1 contract). Host UI calls `engine.<domain>.<method>()`; each domain is a\n * typed facade over the runtime. (Exported from the `@mentra/engine` module, whose\n * name stays `engine` in code; the public API surface is `engine`.)\n *\n * It grows one facade at a time. The migration-era flat store/service exports\n * live on the `@mentra/engine/internal` entry (and the debug singletons on\n * `@mentra/engine/devtools`); they shrink as screens move onto `engine.*`.\n */\nimport {configure, start as bootstrapStart, stop as bootstrapStop} from \"./runtime/bootstrap\"\nimport {cloudClientService} from \"./services/CloudClientService\"\nimport {hydrateDeviceStore, demoteOrphanedDefaultWearable} from \"./services/DeviceStoreHydration\"\nimport {startGlassesSettingsSync, stopGlassesSettingsSync} from \"./services/GlassesSettingsSync\"\nimport {startGlassesStatusProjection, stopGlassesStatusProjection} from \"./services/GlassesStatusProjection\"\nimport {startOtaService, stopOtaService} from \"./services/OtaService\"\nimport {startAudioCloudUplink, stopAudioCloudUplink} from \"./services/AudioCloudUplink\"\nimport {startDeviceEventRouter, stopDeviceEventRouter} from \"./services/DeviceEventRouter\"\nimport {startPhoneNotificationsSync, stopPhoneNotificationsSync} from \"./services/PhoneNotificationsSync\"\nimport {startCaptionsTesterReportService, stopCaptionsTesterReportService} from \"./services/CaptionsTesterReportService\"\nimport {\n startMentraJSCrashloopReportService,\n stopMentraJSCrashloopReportService,\n} from \"./services/MentraJSCrashloopReportService\"\nimport {ensureMiniappEngine, stopMiniappEngine} from \"./services/MiniappEngine\"\nimport localMiniappRuntime from \"./services/LocalMiniappRuntime\"\nimport displayProcessor from \"./services/DisplayProcessor\"\nimport {gallerySyncService} from \"./services/asg/gallerySyncService\"\nimport {glasses} from \"./facades/glasses\"\nimport {display} from \"./facades/display\"\nimport {speech} from \"./facades/speech\"\nimport {session} from \"./facades/session\"\nimport {settings} from \"./facades/settings\"\nimport {dev} from \"./facades/dev\"\nimport {reports} from \"./facades/reports\"\nimport {ota} from \"./facades/ota\"\nimport {gallery} from \"./facades/gallery\"\nimport {miniapps} from \"./facades/miniapps\"\nimport {pairing} from \"./facades/pairing\"\nimport {phoneNotifications} from \"./facades/phoneNotifications\"\nimport {permissions} from \"./facades/permissions\"\nimport {notifications} from \"./facades/notifications\"\nimport {logBuffer} from \"./utils/devLogging\"\n\nexport const engine = {\n /** Front door — hand engine auth + config, then start/stop the runtime. */\n configure,\n /** Start the runtime: mark started + construct/connect the cloud client + begin\n * syncing device settings to the glasses. */\n async start() {\n // Reports attach recent phone logs, so engine owns console interception for\n // OEM hosts too. Idempotent; the Mentra host may start it earlier.\n logBuffer.startConsoleInterception()\n await bootstrapStart()\n // Construct + connect the cloud client so the documented configure()+start()\n // lifecycle yields a live engine.session for OEMs. Idempotent for repeated\n // start() calls.\n cloudClientService.init()\n // Project native device status -> the engine stores (the inbound feed the rest\n // of the runtime reads). Established first so the stores are live before the\n // syncs below react to them.\n startGlassesStatusProjection()\n // Route the rest of the inbound device events (wifi/hotspot/gallery -> stores+bus,\n // photo/stream -> coordinators, button/touch/accel/head -> miniapps, save_setting ->\n // store, miniapp_selected -> launcher) so a bare OEM gets device data, not just the\n // Mentra app's MantleManager.\n startDeviceEventRouter()\n // Hydration contract: the native DeviceStore is in-memory and starts empty\n // every launch; seed it from the persisted settings BEFORE start() resolves\n // so every post-start getDefaultDevice() read is a trustworthy two-state\n // answer (no false \"absent\" for genuinely-paired users at cold start).\n // Ordered before startGlassesSettingsSync so the settings load can't\n // double-push through the change subscription. A failed hydration must not\n // brick the runtime: start() continues, and the guards that consume\n // hasDefaultDevice() see the rejection and fail open.\n try {\n await hydrateDeviceStore()\n // Boot repair: a persisted default_wearable without a native default\n // device (identity abandoned mid-pairing, or resurrected from the server\n // before identity stopped syncing) demotes to pending_wearable so hosts\n // render finish-pairing instead of a connect that would throw.\n await demoteOrphanedDefaultWearable()\n } catch (error) {\n console.warn(\"engine.start: device-store hydration failed:\", error instanceof Error ? error.message : error)\n }\n // Project the glasses' OTA events into the store for the engine.ota read surface.\n startOtaService()\n // Forward glasses mic_lc3 frames to the v2 cloud session so cloud transcription\n // works for any host (not just the Mentra app's host-side MantleManager fork).\n startAudioCloudUplink()\n try {\n await cloudClientService.syncCoreTokenToBluetooth()\n } catch (error) {\n console.warn(\n \"engine.start: initial Cloud V2 core token sync failed:\",\n error instanceof Error ? error.message : error,\n )\n }\n // Push device-setting changes to the glasses for ANY host, so\n // engine.glasses.settings.set() reaches the device (not just the Mentra app).\n startGlassesSettingsSync()\n // Same for phone-notification config -> the native listener (Android).\n startPhoneNotificationsSync()\n // Android internal/e2e: laptop captions tester can broadcast a failure intent;\n // engine owns turning that into a Cloud V2 report.\n startCaptionsTesterReportService()\n // MentraJS crashloop-disabled is runtime state; engine owns filing the\n // automatic report while hosts only render alert/telemetry side effects.\n startMentraJSCrashloopReportService()\n // Bring up the local-miniapp engine so a bare OEM can run MentraJS miniapps:\n // the LocalMiniappRuntime (registry + WebView bridge), the MentraJS router\n // (crust-bound spawn/dispatch pump + launcher wiring), the DisplayProcessor\n // (layout arbitration over the engine stores), and the gallery-sync service.\n // All idempotent — when the Mentra app's host bootstrap also calls these, the\n // second call is a no-op. Host-only crashloop telemetry is attached\n // separately by the Mentra app.\n localMiniappRuntime.initialize()\n ensureMiniappEngine()\n displayProcessor.attachToRuntime()\n gallerySyncService.initialize()\n },\n /** Stop the runtime: tear down the settings sync + cloud client + mark stopped.\n * Each step is guarded so one failing teardown can't skip the rest and leak\n * the remaining runtime services. */\n async stop() {\n const safely = async (label: string, step: () => unknown): Promise<void> => {\n try {\n await step()\n } catch (error) {\n console.warn(`engine.stop: ${label} failed:`, error)\n }\n }\n await safely(\"glasses settings sync\", stopGlassesSettingsSync)\n await safely(\"glasses status projection\", stopGlassesStatusProjection)\n await safely(\"device event router\", stopDeviceEventRouter)\n await safely(\"ota service\", stopOtaService)\n await safely(\"audio cloud uplink\", stopAudioCloudUplink)\n await safely(\"phone notifications sync\", stopPhoneNotificationsSync)\n await safely(\"captions tester report service\", stopCaptionsTesterReportService)\n await safely(\"mentrajs crashloop report service\", stopMentraJSCrashloopReportService)\n await safely(\"miniapp engine\", stopMiniappEngine)\n await safely(\"local miniapp runtime\", () => localMiniappRuntime.cleanup())\n await safely(\"display processor\", () => displayProcessor.detachFromRuntime())\n await safely(\"gallery sync service\", () => gallerySyncService.cleanup())\n await safely(\"cloud client\", () => cloudClientService.stop())\n await safely(\"bootstrap\", bootstrapStop)\n },\n glasses,\n speech,\n /** Cloud (cloud-v2) live-session status + account ops — engine owns the client. */\n session,\n /** Typed keyed user settings over the engine-owned settings store. */\n settings,\n /** Developer/debug surface (backend+cloud URL overrides, reconnect, min version). */\n dev,\n /** Bug-report, automatic runtime report, and feedback submission. */\n reports,\n /** Firmware OTA read/observe surface (updateAvailable/status + on* subscriptions). */\n ota,\n /** Gallery sync: status/onStatus · onNotice (host renders) · sync/cancel. */\n gallery,\n /** Miniapp lifecycle (the WebView bridge primitives are exported separately). */\n miniapps,\n /** First-time glasses discovery + pairing. */\n pairing,\n /** Phone→glasses notification forwarding (Android). */\n phoneNotifications,\n /** OS permissions (check/request/openSettings + per-miniapp requirements). */\n permissions,\n /** Inbound alerts engine→host (crashloop, version-incompatible, connection loss). */\n notifications,\n display,\n}\n"]}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
declare function projectRuntimeStatus(): {
|
|
2
|
+
searching: boolean;
|
|
3
|
+
micRanking: import("@mentra/bluetooth-sdk").MicMode[];
|
|
4
|
+
currentMic: "" | import("@mentra/bluetooth-sdk").MicMode | null;
|
|
5
|
+
systemMicUnavailable: boolean;
|
|
6
|
+
glassesConnected: boolean;
|
|
7
|
+
glassesFullyBooted: boolean;
|
|
8
|
+
bluetoothClassicConnected: boolean;
|
|
9
|
+
coreStatus: import("..").WebSocketStatus;
|
|
10
|
+
cloudClientStatus: import("@mentra/cloud-client").RuntimeStatus;
|
|
11
|
+
cloudClientAudioTransport: import("@mentra/cloud-client").RuntimeAudioTransport;
|
|
12
|
+
};
|
|
13
|
+
export type DevRuntimeStatusSnapshot = ReturnType<typeof projectRuntimeStatus>;
|
|
14
|
+
export declare const dev: {
|
|
15
|
+
/** The cloud-v2 core/runtime URL overrides. */
|
|
16
|
+
cloudUrls: () => {
|
|
17
|
+
core?: string;
|
|
18
|
+
runtime?: string;
|
|
19
|
+
};
|
|
20
|
+
/** Override the cloud-v2 URLs and reconnect the live client onto them. */
|
|
21
|
+
setCloudUrls: (urls: {
|
|
22
|
+
core?: string;
|
|
23
|
+
runtime?: string;
|
|
24
|
+
}) => void;
|
|
25
|
+
/** Tear down + rebuild the live cloud client (the dev "reconnect" button). */
|
|
26
|
+
reconnectCloud: () => void;
|
|
27
|
+
/** Current native (BLE-process) memory usage in MB — a dev/diagnostics gauge. */
|
|
28
|
+
getMemoryMB: () => number;
|
|
29
|
+
/**
|
|
30
|
+
* Phone-side bluetooth runtime snapshot (the core store read-model: scan/mic/
|
|
31
|
+
* search state) — the diagnostics/data-export surface. Shallow copy.
|
|
32
|
+
*/
|
|
33
|
+
bluetoothStatus: () => Record<string, unknown>;
|
|
34
|
+
/**
|
|
35
|
+
* Side-load a miniapp being served from a dev machine (the `mentra dev` / CLI
|
|
36
|
+
* flow) by its URL: probes `<url>/miniapp.json`, and on a reachable manifest
|
|
37
|
+
* registers it under its manifest package so it appears in `engine.miniapps`
|
|
38
|
+
* and can coexist with other dev miniapps. This is the OEM-host equivalent
|
|
39
|
+
* of the first-party
|
|
40
|
+
* developer-URL screen — the registration itself is engine-internal, so a
|
|
41
|
+
* host reaches it here rather than the internal registry. Rendering still
|
|
42
|
+
* flows through the normal display path once the miniapp is started.
|
|
43
|
+
*/
|
|
44
|
+
loadDevMiniapp: (url: string, name?: string) => Promise<{
|
|
45
|
+
ok: true;
|
|
46
|
+
packageName: string;
|
|
47
|
+
name: string;
|
|
48
|
+
} | {
|
|
49
|
+
ok: false;
|
|
50
|
+
error: string;
|
|
51
|
+
}>;
|
|
52
|
+
/** Current engine runtime status for engine-owned debug surfaces. */
|
|
53
|
+
runtimeStatus: () => DevRuntimeStatusSnapshot;
|
|
54
|
+
/** Subscribe to the projected engine runtime status; returns an unsubscribe. */
|
|
55
|
+
onRuntimeStatus: (cb: (status: DevRuntimeStatusSnapshot) => void) => (() => void);
|
|
56
|
+
};
|
|
57
|
+
export {};
|
|
58
|
+
//# sourceMappingURL=dev.d.ts.map
|