@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
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LocalDisplayManager.js","sourceRoot":"","sources":["../../src/services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EAAE,IAAI,CAAC,cAAc,EAAE,WAAW,IAAI,IAAI;YACnD,SAAS,EAAE,IAAI,CAAC,UAAU,KAAK,IAAI;SACpC,CAAA;IACH,CAAC;;AAGH,MAAM,mBAAmB,GAAG,mBAAmB,CAAC,WAAW,EAAE,CAAA;AAC7D,eAAe,mBAAmB,CAAA;AAClC,OAAO,EAAC,mBAAmB,EAAC,CAAA","sourcesContent":["/**\n * LocalDisplayManager\n *\n * Phone-side arbiter for display requests originating from LOCAL miniapps\n * (the @mentra/miniapp SDK). Mirrors the user-facing behavior of the cloud\n * DisplayManager (cloud/packages/cloud/src/services/layout/DisplayManager6.1.ts)\n * for the features that matter on the phone:\n *\n * - boot message (\"Starting <AppName>…\") with a bounded window\n * - durationMs auto-clear\n * - core-app vs background-app arbitration with a background lock\n *\n * Scope is deliberately local-only. Cloud-originated displays are untouched\n * and may race with local displays during dev; that's acceptable per plan\n * (agents/local-display-manager-plan.md).\n *\n * Display pacing is NOT done here. A JS-side ~300ms throttle used to live in\n * this class, but JS timers (and therefore the throttle's trailing flush) do\n * not fire on schedule while the iOS app is suspended in the background — so\n * under streaming captions, updates accumulated and then flushed in a burst on\n * the next wake. Pacing + last-wins coalescing now live in the native per-device\n * queue (e.g. G2's event-driven EvenHub queue), which drains off the same BLE\n * events that wake the process. This class forwards every request straight\n * through; the native layer collapses redundant frames per display target.\n *\n * The remaining BgTimer use (boot window, durationMs expiry) is timing that\n * does not need sub-second background fidelity.\n */\n\nimport BluetoothSdk from \"@mentra/bluetooth-sdk/internal\"\nimport displayProcessor from \"./DisplayProcessor\"\nimport {useDisplayStore} from \"../stores/display\"\nimport sceneRenderer from \"./SceneRenderer\"\nimport {isGlassesConnected} from \"./GlassesReadiness\"\nimport {useGlassesStore} from \"../stores/glasses\"\nimport type {SceneElementInput} from \"../utils/display/scene\"\nimport {BgTimer} from \"../utils/timers\"\n\n// =============================================================================\n// Types\n// =============================================================================\n\nexport interface DisplayPayload {\n view?: \"main\" | \"dashboard\" | string\n /** Legacy layout (sugar / old bundles / cloud shapes). Either this or `scene`. */\n layout?: {layoutType: string; [key: string]: unknown}\n /** Scene elements from display.render(). Either this or `layout`. */\n scene?: SceneElementInput[]\n durationMs?: number\n}\n\n/** Outcome delivered to an awaiting render() call (REQUEST_RESULT payload). */\nexport interface DisplayRequestResult {\n status: \"displayed\" | \"blocked\"\n degraded?: boolean\n dropped?: string[]\n reason?: string\n}\n\nexport type DisplayRequestResolver = (result: DisplayRequestResult) => void\n\ninterface ActiveDisplay {\n packageName: string\n processedEvent: Record<string, unknown>\n /** Set when this display is a scene — restore goes through SceneRenderer replay. */\n scene?: SceneElementInput[]\n expiresAt: number | null\n}\n\ninterface BootingApp {\n packageName: string\n displayName: string\n startedAt: number\n timerId: number\n /** Whatever was on the glasses when this boot started, so a boot that times\n * out without the app rendering can restore it instead of blanking a frame\n * another (e.g. foreground) app owns. Null if the glasses were empty. */\n preBoot: ActiveDisplay | null\n}\n\ninterface BackgroundLock {\n packageName: string\n acquiredAt: number\n expiresAt: number\n lastActiveTime: number\n}\n\n// =============================================================================\n// Constants\n// =============================================================================\n\nconst LOG_TAG = \"LOCAL_DISPLAY\"\nconst BOOT_DURATION_MS = 1500\n// Mirrors cloud lease for a bg app holding the display. The bg app has to\n// keep driving the display to hold the lock; if it goes quiet and the core\n// app wants the screen, we release.\nconst BACKGROUND_LOCK_TIMEOUT_MS = 10_000\n// Sentinel package name used as the \"source\" of the system boot message.\nconst SYSTEM_BOOT_PKG = \"system.boot\"\n\n// =============================================================================\n// LocalDisplayManager\n// =============================================================================\n\nclass LocalDisplayManager {\n private static instance: LocalDisplayManager | null = null\n\n private coreApp: string | null = null\n private coreAppDisplay: ActiveDisplay | null = null\n private currentDisplay: ActiveDisplay | null = null\n private backgroundLock: BackgroundLock | null = null\n\n private bootingApp: BootingApp | null = null\n private bootQueue: Map<string, {payload: DisplayPayload; resolve?: DisplayRequestResolver}> = new Map()\n\n private expiryTimerId: number | null = null\n\n /** Reconnect-replay subscription state (attachToRuntime). */\n private runtimeAttached = false\n private glassesWasConnected = false\n private unsubscribeGlassesStatus: (() => void) | null = null\n\n /** Injectable for tests. */\n private now: () => number = () => Date.now()\n\n private constructor() {}\n\n public static getInstance(): LocalDisplayManager {\n if (!LocalDisplayManager.instance) {\n LocalDisplayManager.instance = new LocalDisplayManager()\n }\n return LocalDisplayManager.instance\n }\n\n // ===========================================================================\n // Lifecycle API (called from MiniappHost)\n // ===========================================================================\n\n /**\n * A new local miniapp just mounted. Start the boot window.\n * Calling this for a different pkg while another is booting cancels the\n * previous boot.\n */\n public onMount(packageName: string, displayName: string): void {\n console.log(`${LOG_TAG}: onMount(${packageName}, \"${displayName}\")`)\n\n // Cancel any in-flight boot for a prior app.\n this.cancelBoot()\n\n // Snapshot whatever's on the glasses BEFORE the boot text overwrites it.\n // registerApp fires onMount for every spawn — including a background app or\n // a crash-respawn while another app is foreground — so a boot that times out\n // without rendering must put the prior frame back rather than blank it.\n const preBoot = this.currentDisplay\n\n // Send the boot message directly (bypass arbitration — this is a system\n // display). Goes through sendNow so scene devices render it as a scene:\n // otherwise every app start would be a legacy→scene transition on the\n // glasses (which costs a blanking clear).\n this.sendNow(SYSTEM_BOOT_PKG, {\n view: \"main\",\n layout: {layoutType: \"text_wall\", text: `Starting ${displayName}…`},\n })\n\n const timerId = BgTimer.setTimeout(() => {\n this.endBoot(/* triggeredByFirstDisplay */ false)\n }, BOOT_DURATION_MS)\n\n this.bootingApp = {\n packageName,\n displayName,\n startedAt: this.now(),\n timerId,\n preBoot,\n }\n this.bootQueue.clear()\n }\n\n /**\n * Mark which miniapp is the \"core\" (foreground) app. Pass null when no local\n * miniapp is foreground.\n */\n public onCoreAppChange(packageName: string | null): void {\n if (this.coreApp === packageName) return\n console.log(`${LOG_TAG}: onCoreAppChange(${packageName ?? \"null\"})`)\n\n this.coreApp = packageName\n\n // No core app means no saved frame to restore on the next unmount.\n // Without this, the previous core's last frame can flicker back onto\n // the glasses when the user-initiated clear is followed by an\n // onUnmount that still finds a populated coreAppDisplay.\n if (packageName === null) {\n this.coreAppDisplay = null\n }\n }\n\n /**\n * A local miniapp is going away. Clean up all state associated with it.\n */\n public onUnmount(packageName: string): void {\n console.log(`${LOG_TAG}: onUnmount(${packageName})`)\n\n // If this was the booting app, cancel boot.\n if (this.bootingApp?.packageName === packageName) {\n this.cancelBoot()\n }\n this.bootQueue.get(packageName)?.resolve?.({status: \"blocked\", reason: \"app stopped\"})\n this.bootQueue.delete(packageName)\n\n // Forget the app's retained scenes — nothing left to replay for it.\n sceneRenderer.clearApp(packageName)\n\n // Release bg lock if this app held it.\n if (this.backgroundLock?.packageName === packageName) {\n this.backgroundLock = null\n }\n\n // Clear saved core app display if the core is going away.\n if (this.coreApp === packageName) {\n this.coreAppDisplay = null\n this.coreApp = null\n }\n\n // If this app owned the current on-glasses display, clear it (and maybe\n // restore the core app's display if it still has time left).\n if (this.currentDisplay?.packageName === packageName) {\n this.clearExpiryTimer()\n this.currentDisplay = null\n this.tryRestoreCoreDisplay()\n if (!this.currentDisplay) {\n // Nothing to restore → clear the glasses.\n this.sendClear()\n }\n }\n }\n\n // ===========================================================================\n // Display request API (called from LocalMiniappRuntime.handleDisplay)\n // ===========================================================================\n\n /**\n * A miniapp requested a display. Routes through boot queue, arbitration,\n * and throttle. This is the only public entry point for miniapp display\n * traffic on the local path.\n *\n * `resolve`, when provided (render() requests), is guaranteed to be called\n * exactly once with the request's outcome — including for requests parked in\n * the boot queue (resolved when drained or superseded).\n */\n public request(packageName: string, payload: DisplayPayload, resolve?: DisplayRequestResolver): void {\n // Dashboard view: pass straight through (no throttle/arbitration). Local\n // dashboard rendering is currently a stub on the phone anyway.\n if (payload.view === \"dashboard\") {\n this.sendNow(packageName, payload, resolve)\n return\n }\n\n // During boot, any app's requests go into the queue. If the booting app\n // itself makes its first display call, end boot early and drain.\n if (this.bootingApp) {\n const superseded = this.bootQueue.get(packageName)\n superseded?.resolve?.({status: \"blocked\", reason: \"superseded by a newer frame\"})\n this.bootQueue.set(packageName, {payload, resolve})\n if (this.bootingApp.packageName === packageName) {\n this.endBoot(/* triggeredByFirstDisplay */ true)\n }\n return\n }\n\n this.arbitrateAndSend(packageName, payload, resolve)\n }\n\n // ===========================================================================\n // Internals — arbitration\n // ===========================================================================\n\n private arbitrateAndSend(packageName: string, payload: DisplayPayload, resolve?: DisplayRequestResolver): void {\n const now = this.now()\n\n // Expire a stale bg lock before arbitrating.\n if (this.backgroundLock && now > this.backgroundLock.expiresAt) {\n this.backgroundLock = null\n }\n\n const isCore = packageName === this.coreApp\n\n if (isCore) {\n // Save so we can restore later.\n this.coreAppDisplay = {\n packageName,\n processedEvent: {}, // filled by sendNow\n scene: payload.scene,\n expiresAt: payload.durationMs ? now + payload.durationMs : null,\n }\n\n // If a bg app holds the lock AND is currently on the glasses, core is\n // blocked. The saved coreAppDisplay surfaces when the bg app expires\n // or unmounts.\n const bgHoldsAndDisplays =\n this.backgroundLock &&\n this.currentDisplay &&\n this.currentDisplay.packageName === this.backgroundLock.packageName\n if (bgHoldsAndDisplays) {\n resolve?.({status: \"blocked\", reason: \"a background app holds the display\"})\n return\n }\n\n // Core can display. If a bg lock exists but holder isn't actively on\n // the glasses, release it.\n if (this.backgroundLock && !bgHoldsAndDisplays) {\n this.backgroundLock = null\n }\n\n this.sendNow(packageName, payload, resolve)\n return\n }\n\n // Non-core: this is a background app.\n if (this.backgroundLock && this.backgroundLock.packageName !== packageName) {\n // Another bg app already holds the lock — drop.\n resolve?.({status: \"blocked\", reason: \"another background app holds the display\"})\n return\n }\n\n // Acquire or bump the lock.\n if (!this.backgroundLock) {\n this.backgroundLock = {\n packageName,\n acquiredAt: now,\n expiresAt: now + BACKGROUND_LOCK_TIMEOUT_MS,\n lastActiveTime: now,\n }\n } else {\n this.backgroundLock.lastActiveTime = now\n this.backgroundLock.expiresAt = now + BACKGROUND_LOCK_TIMEOUT_MS\n }\n\n this.sendNow(packageName, payload, resolve)\n }\n\n // ===========================================================================\n // Internals — send\n // ===========================================================================\n\n private sendNow(packageName: string, payload: DisplayPayload, resolve?: DisplayRequestResolver): void {\n const expiresAt = payload.durationMs ? this.now() + payload.durationMs : null\n const view = (payload.view === \"dashboard\" ? \"dashboard\" : \"main\") as \"main\" | \"dashboard\"\n\n // Scene requests — and legacy layouts a positioning device can render as a\n // scene (sugar, old bundles) — go through the scene pipeline. Everything\n // else stays on the legacy path.\n let sceneElements = payload.scene ?? null\n if (!sceneElements && payload.layout) {\n const caps = sceneRenderer.currentCapabilities()\n if (caps?.canPosition) {\n sceneElements = sceneRenderer.convertLegacyLayout(payload.layout, caps)\n }\n }\n\n if (sceneElements) {\n this.sendScene(packageName, view, sceneElements, expiresAt, resolve)\n } else if (payload.layout) {\n // This layout bypasses the scene pipeline (clear_view, dashboard_card,\n // unknown types, or a non-positioning device). If this (app, view) had a\n // retained scene, the glasses no longer match it — reset the diff\n // baseline so the next render() repaints from empty instead of skipping\n // \"unchanged\" elements.\n sceneRenderer.resetBaseline(packageName, view)\n const rawEvent: Record<string, unknown> = {\n view: payload.view ?? \"main\",\n layout: payload.layout,\n }\n if (payload.durationMs !== undefined) {\n rawEvent.durationMs = payload.durationMs\n }\n this.sendToNative(packageName, rawEvent, expiresAt)\n resolve?.({status: \"displayed\"})\n } else {\n // A scene payload on a device with no display block at all.\n resolve?.({status: \"blocked\", reason: \"no display connected\"})\n return\n }\n\n // If core app fired, refresh the saved snapshot with the actual processed\n // event so restore uses the wrapped text (legacy) / the retained scene.\n if (packageName === this.coreApp && this.currentDisplay) {\n this.coreAppDisplay = {\n packageName,\n processedEvent: this.currentDisplay.processedEvent,\n scene: this.currentDisplay.scene,\n expiresAt: this.currentDisplay.expiresAt,\n }\n }\n }\n\n /**\n * Send a scene through SceneRenderer. On positioning devices this emits a\n * SceneFrame; on degrade devices SceneRenderer hands back a legacy layout\n * that rides the existing (unchanged) DisplayProcessor path.\n */\n private sendScene(\n packageName: string,\n view: \"main\" | \"dashboard\",\n elements: SceneElementInput[],\n expiresAt: number | null,\n resolve?: DisplayRequestResolver,\n ): void {\n const result = sceneRenderer.emitScene(packageName, view, elements)\n\n if (result.kind === \"no-display\") {\n resolve?.({status: \"blocked\", reason: \"no display connected\"})\n return\n }\n\n if (result.kind === \"legacy\") {\n if (result.layout) {\n this.sendToNative(packageName, {view, layout: result.layout}, expiresAt)\n } else {\n // Scene degraded to nothing (e.g. all-image scene on a text-only\n // device). render() replaces the frame, so nothing means clear.\n this.sendClear()\n }\n resolve?.({status: \"displayed\", degraded: result.degraded, dropped: result.dropped})\n return\n }\n\n this.currentDisplay = {packageName, processedEvent: {}, scene: elements, expiresAt}\n this.clearExpiryTimer()\n if (expiresAt !== null) {\n const delay = Math.max(0, expiresAt - this.now())\n this.expiryTimerId = BgTimer.setTimeout(() => {\n this.expiryTimerId = null\n this.handleExpiry(packageName)\n }, delay)\n }\n resolve?.({status: \"displayed\", degraded: result.degraded, dropped: result.dropped})\n }\n\n private sendToNative(packageName: string, rawEvent: Record<string, unknown>, expiresAt: number | null): void {\n let processedEvent: Record<string, unknown>\n try {\n processedEvent = displayProcessor.processDisplayEvent(rawEvent as any)\n } catch (err) {\n console.error(`${LOG_TAG}: DisplayProcessor error, using raw event:`, err)\n processedEvent = rawEvent\n }\n\n try {\n // The display output path is a direct btsdk call now (was a host sendDisplayEvent\n // hook) so a bare OEM renders to the glasses without wiring it.\n void Promise.resolve(BluetoothSdk.displayEvent(processedEvent)).catch((err) => {\n console.error(`${LOG_TAG}: native display failed:`, err)\n })\n // The mirror store also lives in engine, so display requests update the\n // phone-side preview without any host hook.\n useDisplayStore.getState().setDisplayEvent(JSON.stringify(processedEvent))\n } catch (err) {\n console.error(`${LOG_TAG}: native display failed:`, err)\n }\n\n this.currentDisplay = {packageName, processedEvent, expiresAt}\n\n this.clearExpiryTimer()\n if (expiresAt !== null) {\n const delay = Math.max(0, expiresAt - this.now())\n this.expiryTimerId = BgTimer.setTimeout(() => {\n this.expiryTimerId = null\n this.handleExpiry(packageName)\n }, delay)\n }\n }\n\n private handleExpiry(packageName: string): void {\n // Someone else is on the glasses now — ignore.\n if (!this.currentDisplay || this.currentDisplay.packageName !== packageName) {\n return\n }\n\n // Release the lock if it belonged to this (bg) app.\n if (this.backgroundLock?.packageName === packageName) {\n this.backgroundLock = null\n }\n\n this.currentDisplay = null\n this.tryRestoreCoreDisplay()\n if (!this.currentDisplay) {\n this.sendClear()\n }\n }\n\n private tryRestoreCoreDisplay(): void {\n if (!this.coreAppDisplay) return\n // If the core snapshot has a duration and it's already elapsed, skip.\n if (this.coreAppDisplay.expiresAt !== null && this.now() >= this.coreAppDisplay.expiresAt) {\n this.coreAppDisplay = null\n return\n }\n // Re-send the core's saved display.\n this.restoreDisplay(this.coreAppDisplay)\n }\n\n private sendClear(): void {\n const clearEvent: Record<string, unknown> = {\n view: \"main\",\n layout: {layoutType: \"clear_view\"},\n }\n this.sendToNative(\"system.clear\", clearEvent, null)\n this.currentDisplay = null\n // The glasses main view is now blank: every app's retained scene is\n // replay-only until it re-renders — diffing against it would skip\n // \"unchanged\" elements onto the blank screen.\n sceneRenderer.markViewStale(\"main\")\n }\n\n // ===========================================================================\n // Internals — boot\n // ===========================================================================\n\n private cancelBoot(): void {\n if (!this.bootingApp) return\n BgTimer.clearTimeout(this.bootingApp.timerId)\n this.bootingApp = null\n }\n\n private endBoot(triggeredByFirstDisplay: boolean): void {\n if (!this.bootingApp) return\n const preBoot = this.bootingApp.preBoot\n BgTimer.clearTimeout(this.bootingApp.timerId)\n this.bootingApp = null\n\n // Drain the queue: core first, then everyone else. Per-app last wins\n // because the map holds one payload per packageName.\n const queued = Array.from(this.bootQueue.entries())\n this.bootQueue.clear()\n\n const corePayload = this.coreApp ? queued.find(([pkg]) => pkg === this.coreApp) : undefined\n if (corePayload) {\n this.arbitrateAndSend(corePayload[0], corePayload[1].payload, corePayload[1].resolve)\n }\n for (const [pkg, entry] of queued) {\n if (pkg === this.coreApp) continue\n this.arbitrateAndSend(pkg, entry.payload, entry.resolve)\n }\n\n // Boot ended on the timeout with nothing queued and no first display — the\n // app just never rendered. Restore whatever was on the glasses before the\n // boot text so a background app or crash-respawn can't blank a foreground\n // app's frame (registerApp fires onMount for every spawn, and the core app\n // isn't wired on the local path yet). If the glasses were empty before,\n // clear the lingering \"Starting …\" instead — otherwise a miniapp that never\n // renders (e.g. audio-only) would strand it.\n if (!triggeredByFirstDisplay && queued.length === 0) {\n // Only restore a frame that's still valid — one whose duration elapsed\n // during the boot window should clear, not come back.\n if (preBoot && (preBoot.expiresAt === null || preBoot.expiresAt > this.now())) {\n this.restoreDisplay(preBoot)\n } else {\n this.sendClear()\n }\n }\n }\n\n /**\n * Re-push a previously-captured on-glasses frame (e.g. the display a boot\n * window overwrote). Mirrors tryRestoreCoreDisplay: the saved event is already\n * processed, and any remaining duration is recomputed from its expiry.\n */\n private restoreDisplay(saved: ActiveDisplay): void {\n const remaining = saved.expiresAt !== null ? Math.max(0, saved.expiresAt - this.now()) : undefined\n\n // Scene restores must REPLAY (create-based, epoch-bumped): re-emitting the\n // scene through the normal diff would come back all-\"unchanged\" and the\n // device would skip every element (spec §4 — replay is always create-based).\n if (saved.scene) {\n const expiresAt = remaining !== undefined ? this.now() + remaining : null\n if (sceneRenderer.replayApp(saved.packageName, \"main\")) {\n this.currentDisplay = {packageName: saved.packageName, processedEvent: {}, scene: saved.scene, expiresAt}\n this.clearExpiryTimer()\n if (expiresAt !== null) {\n const delay = Math.max(0, expiresAt - this.now())\n this.expiryTimerId = BgTimer.setTimeout(() => {\n this.expiryTimerId = null\n this.handleExpiry(saved.packageName)\n }, delay)\n }\n } else {\n // Retained state gone (app stopped since) — re-render the saved\n // elements as a fresh scene instead.\n this.sendNow(saved.packageName, {view: \"main\", scene: saved.scene, durationMs: remaining})\n }\n return\n }\n\n this.sendNow(saved.packageName, {\n view: \"main\",\n layout: saved.processedEvent.layout as DisplayPayload[\"layout\"],\n durationMs: remaining,\n })\n }\n\n // ===========================================================================\n // Reconnect replay (design doc §3.4.7 — recovery = replay, host-driven)\n // ===========================================================================\n\n /**\n * Subscribe to glasses connection state so the current owner's frame is\n * replayed after a reconnect. Safe to call repeatedly; attaches once. Wired\n * from MantleManager next to displayProcessor.attachToRuntime().\n */\n public attachToRuntime(): void {\n if (this.runtimeAttached) return\n // dev wired this through the (since-removed) glassesStatus runtime hooks;\n // engine reads its own glasses store directly.\n this.glassesWasConnected = isGlassesConnected(useGlassesStore.getState().connection)\n this.unsubscribeGlassesStatus = useGlassesStore.subscribe(() => {\n const connected = isGlassesConnected(useGlassesStore.getState().connection)\n if (connected === this.glassesWasConnected) return\n this.glassesWasConnected = connected\n if (connected) {\n this.replayCurrent()\n }\n })\n this.runtimeAttached = true\n }\n\n /**\n * Re-push the current on-glasses frame after a device recovery. Scenes replay\n * from SceneRenderer's retained state (create-based, epoch-bumped); legacy\n * frames re-send their processed event. Expired frames don't come back.\n */\n public replayCurrent(): void {\n const current = this.currentDisplay\n if (!current) return\n if (current.expiresAt !== null && this.now() >= current.expiresAt) return\n\n console.log(`${LOG_TAG}: replayCurrent(${current.packageName})`)\n if (current.scene) {\n if (!sceneRenderer.replayApp(current.packageName, \"main\")) {\n // Retained state gone (app stopped between disconnect and reconnect).\n this.sendClear()\n }\n } else if (current.processedEvent.layout) {\n this.sendToNative(current.packageName, current.processedEvent, current.expiresAt)\n }\n }\n\n // ===========================================================================\n // Internals — timer helpers\n // ===========================================================================\n\n private clearExpiryTimer(): void {\n if (this.expiryTimerId !== null) {\n BgTimer.clearTimeout(this.expiryTimerId)\n this.expiryTimerId = null\n }\n }\n\n // ===========================================================================\n // Test hooks\n // ===========================================================================\n\n /** Injected clock — tests only. */\n public _setNowForTest(fn: () => number): void {\n this.now = fn\n }\n\n /** Wipe state — tests only. */\n public _resetForTest(): void {\n this.cancelBoot()\n this.clearExpiryTimer()\n this.coreApp = null\n this.coreAppDisplay = null\n this.currentDisplay = null\n this.backgroundLock = null\n this.bootQueue.clear()\n this.now = () => Date.now()\n this.unsubscribeGlassesStatus?.()\n this.unsubscribeGlassesStatus = null\n this.runtimeAttached = false\n this.glassesWasConnected = false\n sceneRenderer._resetForTest()\n }\n\n /** Read-only state snapshot — tests only. */\n public _peekForTest(): {\n coreApp: string | null\n currentDisplayPkg: string | null\n bgLockPkg: string | null\n isBooting: boolean\n } {\n return {\n coreApp: this.coreApp,\n currentDisplayPkg: this.currentDisplay?.packageName ?? null,\n bgLockPkg: this.backgroundLock?.packageName ?? null,\n isBooting: this.bootingApp !== null,\n }\n }\n}\n\nconst localDisplayManager = LocalDisplayManager.getInstance()\nexport default localDisplayManager\nexport {LocalDisplayManager}\n"]}
|
|
@@ -0,0 +1,439 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* LocalMiniappRuntime
|
|
3
|
+
*
|
|
4
|
+
* Singleton service that bridges local miniapps (running in WebViews) with
|
|
5
|
+
* phone capabilities: display, audio, storage, sensors, LED, etc.
|
|
6
|
+
*
|
|
7
|
+
* Each miniapp communicates via the @mentra/miniapp envelope protocol.
|
|
8
|
+
* This runtime handles request dispatch, stream fan-out, and lifecycle
|
|
9
|
+
* management (connect/disconnect/ping).
|
|
10
|
+
*/
|
|
11
|
+
export interface InstalledMiniappManifest {
|
|
12
|
+
/** Human-facing app name (from miniapp.json `name`). Shown in the "Starting
|
|
13
|
+
* <name>…" boot message; falls back to the package name when absent. */
|
|
14
|
+
name?: string;
|
|
15
|
+
permissions?: Array<{
|
|
16
|
+
type: string;
|
|
17
|
+
required?: boolean;
|
|
18
|
+
description?: string;
|
|
19
|
+
}>;
|
|
20
|
+
hardwareRequirements?: Array<{
|
|
21
|
+
type: string;
|
|
22
|
+
level: string;
|
|
23
|
+
description?: string;
|
|
24
|
+
}>;
|
|
25
|
+
}
|
|
26
|
+
type TranscriptionEventSource = "cloud" | "local";
|
|
27
|
+
declare class LocalMiniappRuntime {
|
|
28
|
+
private static instance;
|
|
29
|
+
/** Connected miniapps keyed by packageName. */
|
|
30
|
+
private connectedApps;
|
|
31
|
+
/**
|
|
32
|
+
* Packages that have completed their CONNECT handshake (sent
|
|
33
|
+
* `miniapp_connect`, got `CONNECT_ACK`). Distinct from `connectedApps`,
|
|
34
|
+
* which is populated at spawn/registration time — handshake is later.
|
|
35
|
+
* Drives {@link waitForConnect}.
|
|
36
|
+
*/
|
|
37
|
+
private handshookApps;
|
|
38
|
+
/** Pending {@link waitForConnect} resolvers, keyed by packageName. */
|
|
39
|
+
private connectWaiters;
|
|
40
|
+
/** Ref-counted stream subscriptions: stream → set of packageNames. */
|
|
41
|
+
private streamSubscribers;
|
|
42
|
+
/** Guards one-time wiring of the cloud transcript/translation fan-out. */
|
|
43
|
+
private cloudResultsWired;
|
|
44
|
+
private cloudStatusWired;
|
|
45
|
+
private cloudAudioSubscriptionSync;
|
|
46
|
+
/** Ping interval handle. */
|
|
47
|
+
private pingIntervalId;
|
|
48
|
+
private foregroundProbeTimers;
|
|
49
|
+
/**
|
|
50
|
+
* Notified when a miniapp is unregistered for missing liveness pings.
|
|
51
|
+
* MentraJSRouter wires this into its crash-respawn machinery so a
|
|
52
|
+
* silently-stalled background script is restarted (with crash-loop
|
|
53
|
+
* protection) instead of staying dead — a dead background drops its
|
|
54
|
+
* subscriptions, which releases the mic while the webview still looks
|
|
55
|
+
* alive.
|
|
56
|
+
*/
|
|
57
|
+
onLivenessTimeout: ((packageName: string) => void) | null;
|
|
58
|
+
/** Pending cloud requests: requestId → packageName that originated the request. */
|
|
59
|
+
private pendingCloudRequests;
|
|
60
|
+
private speechRuns;
|
|
61
|
+
private localSecret;
|
|
62
|
+
private usedTokens;
|
|
63
|
+
private constructor();
|
|
64
|
+
/**
|
|
65
|
+
* Generate an HMAC-signed local session token for browser fallback auth.
|
|
66
|
+
* Token format: base64(JSON({userId, packageName, exp})).base64(HMAC-SHA256(payload, secret))
|
|
67
|
+
* Single-use, 5-minute TTL.
|
|
68
|
+
*/
|
|
69
|
+
generateLocalToken(userId: string, packageName: string): string;
|
|
70
|
+
/**
|
|
71
|
+
* Validate and consume a local session token. Single-use.
|
|
72
|
+
*/
|
|
73
|
+
validateLocalToken(token: string): {
|
|
74
|
+
userId: string;
|
|
75
|
+
packageName: string;
|
|
76
|
+
} | null;
|
|
77
|
+
/**
|
|
78
|
+
* Simple HMAC-SHA256 using Web Crypto API (available in React Native).
|
|
79
|
+
* Returns base64url-encoded signature.
|
|
80
|
+
* Falls back to a simpler hash if crypto.subtle is not available.
|
|
81
|
+
*/
|
|
82
|
+
private hmacSign;
|
|
83
|
+
static getInstance(): LocalMiniappRuntime;
|
|
84
|
+
private initialized;
|
|
85
|
+
/**
|
|
86
|
+
* Initialize the runtime. Called from MantleManager.init().
|
|
87
|
+
* Idempotent — safe to call multiple times.
|
|
88
|
+
*/
|
|
89
|
+
initialize(): void;
|
|
90
|
+
/**
|
|
91
|
+
* Handle an incoming cloud message forwarded by SocketComms
|
|
92
|
+
* (phone_stream_status, phone_managed_stream_status).
|
|
93
|
+
*
|
|
94
|
+
* Routes the response back to the originating miniapp via the requestId
|
|
95
|
+
* that was stored when the miniapp first made the request.
|
|
96
|
+
*/
|
|
97
|
+
handleCloudMessage(msg: any): void;
|
|
98
|
+
/**
|
|
99
|
+
* Register a pending cloud request so we can route the response back.
|
|
100
|
+
*/
|
|
101
|
+
registerPendingCloudRequest(requestId: string, packageName: string, envelopeRequestId?: string): void;
|
|
102
|
+
registerApp(packageName: string, sendFn: (raw: string) => void, installedManifest?: InstalledMiniappManifest): void;
|
|
103
|
+
/**
|
|
104
|
+
* Resolve once `packageName` has completed its CONNECT handshake. If it has
|
|
105
|
+
* already connected, resolves immediately. Rejects if the timeout elapses
|
|
106
|
+
* first, or if the app is unregistered while waiting.
|
|
107
|
+
*
|
|
108
|
+
* Used by the launcher's `ensureConnected` (and thus the action broker) so a
|
|
109
|
+
* just-spawned target is known to be live before anything is delivered to it.
|
|
110
|
+
*/
|
|
111
|
+
waitForConnect(packageName: string, timeoutMs: number): Promise<void>;
|
|
112
|
+
/** Resolve/reject all pending {@link waitForConnect} waiters for a package. */
|
|
113
|
+
private flushConnectWaiters;
|
|
114
|
+
/**
|
|
115
|
+
* Invalidate the CONNECT handshake for a package whose native context is
|
|
116
|
+
* being replaced WITHOUT going through register/unregister — i.e. a crash
|
|
117
|
+
* respawn. Without this, {@link waitForConnect} would treat the dead/
|
|
118
|
+
* not-yet-initialized context as connected and deliver to it. Pending waiters
|
|
119
|
+
* are failed so a wake mid-respawn retries rather than hanging.
|
|
120
|
+
*/
|
|
121
|
+
resetHandshake(packageName: string): void;
|
|
122
|
+
/**
|
|
123
|
+
* Attach (or update) the installedManifest for an already-registered app.
|
|
124
|
+
* Used when the manifest is fetched asynchronously (dev miniapps) after the
|
|
125
|
+
* miniapp has already CONNECTed — preserves existing subscriptions.
|
|
126
|
+
*/
|
|
127
|
+
setInstalledManifest(packageName: string, installedManifest: InstalledMiniappManifest): void;
|
|
128
|
+
/**
|
|
129
|
+
* Graceful version of {@link unregisterApp}: notify the miniapp via
|
|
130
|
+
* `WILL_DISCONNECT`, wait ~50ms so its `beforeDisconnect` handlers can
|
|
131
|
+
* fire one last `sendOneShot` (e.g. `display.clear()`), then run the
|
|
132
|
+
* normal teardown. Use this for any disconnect path where the socket
|
|
133
|
+
* is still open. For ungraceful paths (transport already closed),
|
|
134
|
+
* call {@link unregisterApp} directly — the heads-up would be
|
|
135
|
+
* undeliverable anyway.
|
|
136
|
+
*/
|
|
137
|
+
gracefullyUnregisterApp(packageName: string, reason?: string): Promise<void>;
|
|
138
|
+
unregisterApp(packageName: string): void;
|
|
139
|
+
handleRawMessage(packageName: string, raw: string): void;
|
|
140
|
+
private handleConnect;
|
|
141
|
+
private requestMiniappAuth;
|
|
142
|
+
private handleAuthRefresh;
|
|
143
|
+
private refreshMiniappAuth;
|
|
144
|
+
private authRefreshOptions;
|
|
145
|
+
private scheduleMiniappAuthRefresh;
|
|
146
|
+
private clearMiniappAuthRefresh;
|
|
147
|
+
/**
|
|
148
|
+
* Deliver the miniapp's FIRST auth token, retrying until it lands. Called from
|
|
149
|
+
* {@link handleConnect} when the initial mint didn't resolve in the CONNECT_ACK
|
|
150
|
+
* window. `inFlight` lets attempt 0 reuse the mint the handshake already
|
|
151
|
+
* started (avoids a redundant duplicate request); later attempts mint fresh.
|
|
152
|
+
*
|
|
153
|
+
* A `null` result means auth is fundamentally unavailable (no miniappAuth hook)
|
|
154
|
+
* — permanent, so we do NOT retry. A REJECTION means a transient failure
|
|
155
|
+
* (typically the cloud client isn't connection-ready yet) — retry with backoff.
|
|
156
|
+
* Either way we bail if the app has since disconnected or already got a token
|
|
157
|
+
* (e.g. via {@link redriveMiniappAuthDelivery} on cloud-connect).
|
|
158
|
+
*/
|
|
159
|
+
private deliverInitialMiniappAuth;
|
|
160
|
+
private scheduleInitialMiniappAuthRetry;
|
|
161
|
+
private clearMiniappAuthDeliveryRetry;
|
|
162
|
+
/**
|
|
163
|
+
* When the cloud client (re)connects, immediately re-attempt the initial mint
|
|
164
|
+
* for any handshook app still missing its token, instead of waiting out the
|
|
165
|
+
* backoff. This is what turns "scan a dev app before the cloud is ready" from
|
|
166
|
+
* "dead until you manually reconnect Cloud V2" into "authenticates on its own
|
|
167
|
+
* the instant the connection comes up".
|
|
168
|
+
*/
|
|
169
|
+
private redriveMiniappAuthDelivery;
|
|
170
|
+
private handleSubscribe;
|
|
171
|
+
private handleCalendarListEvents;
|
|
172
|
+
/**
|
|
173
|
+
* For state-bearing streams (battery, connection), deliver the current value
|
|
174
|
+
* immediately on subscribe. Other streams (button press, transcription, etc.)
|
|
175
|
+
* are pure event streams with no "current value" to snapshot.
|
|
176
|
+
*/
|
|
177
|
+
private emitInitialSnapshots;
|
|
178
|
+
/**
|
|
179
|
+
* Read the phone's battery state right now and emit it as the given stream.
|
|
180
|
+
* Used for both phone_battery snapshot on subscribe, and as a stand-in for
|
|
181
|
+
* glasses_battery when connected to Simulated Glasses.
|
|
182
|
+
*/
|
|
183
|
+
private emitPhoneBatteryAs;
|
|
184
|
+
private handleDisplay;
|
|
185
|
+
/**
|
|
186
|
+
* Scene render (session.display.render()). Same arbitration as DISPLAY, but
|
|
187
|
+
* the payload is a whole frame of positioned elements and the caller may be
|
|
188
|
+
* awaiting the outcome: LocalDisplayManager guarantees the resolver fires
|
|
189
|
+
* exactly once (displayed/blocked, with degraded/dropped reporting), and that
|
|
190
|
+
* becomes the REQUEST_RESULT data.
|
|
191
|
+
*/
|
|
192
|
+
private handleRender;
|
|
193
|
+
private handlePlayAudio;
|
|
194
|
+
private handleStopAudio;
|
|
195
|
+
/** Valid PCM sample rates for speaker streams. Mirrors the SDK contract. */
|
|
196
|
+
private static readonly SPEAKER_STREAM_SAMPLE_RATES;
|
|
197
|
+
private static readonly SPEAKER_STREAM_MAX_BASE64_CHARS;
|
|
198
|
+
private speakerStreamCounter;
|
|
199
|
+
private handleSpeakerStreamOpen;
|
|
200
|
+
/** Resolve + validate a stream id from a payload against the app's active stream. */
|
|
201
|
+
private activeSpeakerStream;
|
|
202
|
+
private handleSpeakerStreamWrite;
|
|
203
|
+
private handleSpeakerStreamClose;
|
|
204
|
+
private handleSpeakerStreamAbort;
|
|
205
|
+
private handleSpeak;
|
|
206
|
+
private cancelSpeech;
|
|
207
|
+
private handleRgbLed;
|
|
208
|
+
private handleLocationPoll;
|
|
209
|
+
/**
|
|
210
|
+
* All navigation handlers + their state live in NavigationHandlers. The
|
|
211
|
+
* dispatcher's NAVIGATION_* cases delegate here; the rest of the runtime
|
|
212
|
+
* cross-cuts navigation through {@link NavigationHandlers.onDisconnect}
|
|
213
|
+
* (mini-app disconnect) and {@link NavigationHandlers.isTripActive}
|
|
214
|
+
* (location-stream gating during a trip).
|
|
215
|
+
*/
|
|
216
|
+
private readonly navigationHandlers;
|
|
217
|
+
/**
|
|
218
|
+
* `session.blob` — persistent, per-app binary storage. Like NavigationHandlers,
|
|
219
|
+
* the BLOB_* dispatcher cases delegate here. It's a generic byte store; audio
|
|
220
|
+
* recording lives entirely in the miniapp (mic.onAudioChunk → chunked
|
|
221
|
+
* BLOB_WRITE), so nothing audio-specific runs in the host.
|
|
222
|
+
*/
|
|
223
|
+
private readonly blobStore;
|
|
224
|
+
/**
|
|
225
|
+
* Heading is a sensor stream — start the native compass when any mini
|
|
226
|
+
* app is subscribed to "heading_update", stop it when none are.
|
|
227
|
+
*/
|
|
228
|
+
private headingUnsub;
|
|
229
|
+
private recomputeHeadingSubscription;
|
|
230
|
+
/**
|
|
231
|
+
* Accelerometer is a sensor stream — enable the glasses IMU when any mini
|
|
232
|
+
* app is subscribed to "accel_data", disable it when none are. Mirrors the
|
|
233
|
+
* heading pattern. Only G2 streams IMU today; on other devices the native
|
|
234
|
+
* call is a no-op so this is harmless.
|
|
235
|
+
*/
|
|
236
|
+
private imuEnabled;
|
|
237
|
+
private recomputeImuSubscription;
|
|
238
|
+
/**
|
|
239
|
+
* Last rate we asked the host for. Lets us skip the cross-process call
|
|
240
|
+
* when nothing actually changed (most SUBSCRIBE / unregister churn
|
|
241
|
+
* leaves the aggregate unchanged) and tracks state for the no-active-
|
|
242
|
+
* subscribers → tell host to back off case.
|
|
243
|
+
*/
|
|
244
|
+
private lastAppliedLocationRate;
|
|
245
|
+
/**
|
|
246
|
+
* Recompute the aggregate location tier across every connected
|
|
247
|
+
* miniapp and push the result to the host. The aggregate is the
|
|
248
|
+
* STRICTEST rate any single app has requested — see
|
|
249
|
+
* {@link LOCATION_RATE_PRIORITY} — because the GPS sample rate is a
|
|
250
|
+
* shared OS-level setting that we can't bias per-app.
|
|
251
|
+
*
|
|
252
|
+
* Called after every SUBSCRIBE and every unregister so that when a
|
|
253
|
+
* realtime-requesting app goes away the tier falls back down. If no
|
|
254
|
+
* connected app is asking for a location rate, we tell the host
|
|
255
|
+
* "off" so it can drop GPS power.
|
|
256
|
+
*/
|
|
257
|
+
private recomputeLocationTier;
|
|
258
|
+
private getStorageKeyPrefix;
|
|
259
|
+
private handleStorageGet;
|
|
260
|
+
private handleStorageSet;
|
|
261
|
+
private handleStorageDelete;
|
|
262
|
+
private handleStorageList;
|
|
263
|
+
private handleStorageClear;
|
|
264
|
+
private handleStorageHas;
|
|
265
|
+
private handleStorageGetAll;
|
|
266
|
+
private handleStorageSetMultiple;
|
|
267
|
+
private handleCameraFov;
|
|
268
|
+
/**
|
|
269
|
+
* Explicit IMU enable/disable from a miniapp (session.imu.setEnabled).
|
|
270
|
+
*
|
|
271
|
+
* The accel stream already auto-toggles the native IMU on subscribe (see
|
|
272
|
+
* {@link recomputeImuSubscription}); this is a direct override. We sync
|
|
273
|
+
* `this.imuEnabled` to the requested state so a subsequent subscription
|
|
274
|
+
* recompute with the same aggregate doesn't issue a redundant native call.
|
|
275
|
+
* Note that a later subscribe/unsubscribe that changes the aggregate will
|
|
276
|
+
* still re-derive the sensor state from subscriptions.
|
|
277
|
+
*/
|
|
278
|
+
private handleImuSetEnabled;
|
|
279
|
+
private handleShare;
|
|
280
|
+
private handleOpenUrl;
|
|
281
|
+
private handleCopyClipboard;
|
|
282
|
+
private handleDownload;
|
|
283
|
+
private handlePhoto;
|
|
284
|
+
private handleCameraWarmUp;
|
|
285
|
+
private handleVideoRecordingStart;
|
|
286
|
+
private handleVideoRecordingStop;
|
|
287
|
+
/**
|
|
288
|
+
* Stream handlers — dispatched to the engine PhoneStreamCoordinator. For managed
|
|
289
|
+
* streams the coordinator additionally calls the v2 client REST route to
|
|
290
|
+
* provision Cloudflare. Cloud-SDK apps (third-party developers) use a
|
|
291
|
+
* separate cloud-side path that does not pass through here.
|
|
292
|
+
*/
|
|
293
|
+
private handleStreamStart;
|
|
294
|
+
private handleStreamStop;
|
|
295
|
+
private handleManagedStreamStart;
|
|
296
|
+
private handleManagedStreamStop;
|
|
297
|
+
/**
|
|
298
|
+
* session.glasses.requestWifiSetup — open the phone's glasses Wi-Fi setup
|
|
299
|
+
* flow. The host owns the actual UI via the `engine.configure({ui})` seam;
|
|
300
|
+
* this just forwards the request and reports success/failure.
|
|
301
|
+
*/
|
|
302
|
+
private handleRequestWifiSetup;
|
|
303
|
+
/**
|
|
304
|
+
* Wire the PhoneStreamCoordinator's status callback so coordinator-emitted
|
|
305
|
+
* updates become `EVENT { streamType: "stream_status" }` envelopes on the
|
|
306
|
+
* subscribing miniapp(s).
|
|
307
|
+
*/
|
|
308
|
+
wireStreamingStatusFanout(): void;
|
|
309
|
+
/**
|
|
310
|
+
* Standalone subscribe — lets external code subscribe a registered miniapp to
|
|
311
|
+
* streams without going through the envelope protocol.
|
|
312
|
+
*
|
|
313
|
+
* Returns `{ok: true}` on success, or `{ok: false, error}` on failure.
|
|
314
|
+
*/
|
|
315
|
+
subscribe(packageName: string, streams: string[]): {
|
|
316
|
+
ok: boolean;
|
|
317
|
+
error?: string;
|
|
318
|
+
};
|
|
319
|
+
private recomputeMicRequirements;
|
|
320
|
+
/**
|
|
321
|
+
* Recompute the aggregated v2 cloud subscription list across all local miniapps.
|
|
322
|
+
*
|
|
323
|
+
* Cloud-dependent streams (transcription:*, translation:*) only flow if the
|
|
324
|
+
* v2 runtime knows the phone wants them. Local-only streams (button_press, etc.)
|
|
325
|
+
* are NOT sent — they come from the Bluetooth SDK, not from cloud.
|
|
326
|
+
*/
|
|
327
|
+
private updateCloudSubscriptions;
|
|
328
|
+
/**
|
|
329
|
+
* Build the cloud `AudioSubscription[]` from the miniapp cloud-stream key set.
|
|
330
|
+
*
|
|
331
|
+
* Stream keys: `transcription:<lang>` (lang may be `auto`, `en-US`, …) and
|
|
332
|
+
* `translation:<source>:<target>` (3 colon-parts; source/target may be `*`
|
|
333
|
+
* or `auto` wildcards, target may also be `*`). The cloud protocol requires a
|
|
334
|
+
* concrete `target: string` for translation, so wildcard-target translation
|
|
335
|
+
* keys (`translation:<source>:*`, `translation:*:*`, `translation:auto`) have
|
|
336
|
+
* no cloud equivalent and are skipped. Wildcard/`auto` SOURCE maps to
|
|
337
|
+
* `{mode: "auto"}`.
|
|
338
|
+
*/
|
|
339
|
+
private buildCloudAudioSubscriptions;
|
|
340
|
+
private audioSubscriptionKey;
|
|
341
|
+
/**
|
|
342
|
+
* Wire the cloud's transcription/translation results into the existing
|
|
343
|
+
* miniapp fan-out exactly once. Maps each cloud result back to the
|
|
344
|
+
* cloud-to-app data shape `forwardEvent` already forwards, keyed on the
|
|
345
|
+
* `transcription:<lang>` / `translation:<source>:<target>` stream strings, so
|
|
346
|
+
* subscribed miniapps receive identical envelopes.
|
|
347
|
+
*/
|
|
348
|
+
private ensureCloudResultsWired;
|
|
349
|
+
private ensureCloudStatusWired;
|
|
350
|
+
private currentCloudStatus;
|
|
351
|
+
private broadcastCloudStatus;
|
|
352
|
+
private sendCloudStatusToMiniapp;
|
|
353
|
+
/**
|
|
354
|
+
* Forward a streamed event to all miniapps subscribed to the given stream.
|
|
355
|
+
*
|
|
356
|
+
* Event name translation:
|
|
357
|
+
* - Cloud sends "head_up" → miniapp protocol uses "head_position" (HEAD_POSITION)
|
|
358
|
+
* - Cloud sends "VAD" (uppercase) → miniapp protocol uses "vad" (lowercase)
|
|
359
|
+
*/
|
|
360
|
+
forwardEvent(streamType: string, data: unknown, transcriptionSource?: TranscriptionEventSource): void;
|
|
361
|
+
private appTranscriptionRoutesForSubscription;
|
|
362
|
+
private appTranscriptionRoutesForEvent;
|
|
363
|
+
/**
|
|
364
|
+
* Translate cloud event names to miniapp stream type values.
|
|
365
|
+
*/
|
|
366
|
+
private normalizeStreamType;
|
|
367
|
+
/**
|
|
368
|
+
* Send a payload to a connected miniapp, wrapped in an envelope.
|
|
369
|
+
*/
|
|
370
|
+
/**
|
|
371
|
+
* Push a speaker-state transition to the owning miniapp. Idempotent: if
|
|
372
|
+
* the new state matches the cached one (and isn't an error), no envelope
|
|
373
|
+
* is sent. Error events are always sent — they're transient and the SDK
|
|
374
|
+
* settles back to a non-error state immediately after.
|
|
375
|
+
*/
|
|
376
|
+
private setSpeakerState;
|
|
377
|
+
private sendToMiniapp;
|
|
378
|
+
/**
|
|
379
|
+
* Send a REQUEST_RESULT response.
|
|
380
|
+
*/
|
|
381
|
+
/** Max serialized size of an action call's params / result (256 KB). */
|
|
382
|
+
private static readonly ACTION_PAYLOAD_CAP;
|
|
383
|
+
/** Outstanding action invocations, keyed by host-generated callId. */
|
|
384
|
+
private actionCalls;
|
|
385
|
+
private actionCallSeq;
|
|
386
|
+
private interopApps;
|
|
387
|
+
private isSystemPackage;
|
|
388
|
+
private startInteropApp;
|
|
389
|
+
private stopInteropApp;
|
|
390
|
+
private wakeInteropApp;
|
|
391
|
+
/** Emit an interop audit event (best-effort — never let telemetry break a call). */
|
|
392
|
+
private auditInterop;
|
|
393
|
+
/** Reject the request with NOT_PERMITTED unless the caller is a system app. */
|
|
394
|
+
private requireSystemCaller;
|
|
395
|
+
/** Project a host ClientApp into the SDK's MiniappInfo shape (JSON over the wire). */
|
|
396
|
+
private buildMiniappInfo;
|
|
397
|
+
private handleMiniappsList;
|
|
398
|
+
private handleMiniappsStart;
|
|
399
|
+
private handleMiniappsStop;
|
|
400
|
+
/** True iff `value` serializes larger than the action payload cap. */
|
|
401
|
+
private actionPayloadTooLarge;
|
|
402
|
+
/**
|
|
403
|
+
* session.actions.invoke → wake the target headlessly, deliver an ACTION_CALL,
|
|
404
|
+
* and correlate its ACTION_RESULT back to the caller's pending request.
|
|
405
|
+
*/
|
|
406
|
+
private handleActionInvoke;
|
|
407
|
+
/** Target → host: forward an ACTION_RESULT back to the caller's pending invoke. */
|
|
408
|
+
private handleActionResult;
|
|
409
|
+
private sendResult;
|
|
410
|
+
/**
|
|
411
|
+
* Send a VISIBILITY_CHANGE push to a miniapp.
|
|
412
|
+
*/
|
|
413
|
+
sendVisibilityChange(packageName: string, visibility: "foreground" | "background"): void;
|
|
414
|
+
/**
|
|
415
|
+
* Fast foreground liveness check used when a local miniapp UI is opened or
|
|
416
|
+
* resumed. The normal watchdog intentionally waits ~30s to avoid killing a
|
|
417
|
+
* healthy-but-busy background script. When the user is actively looking at a
|
|
418
|
+
* WebView, a stale JSContext reads as "cloud offline" / no captions, so probe
|
|
419
|
+
* immediately and reuse the crash-respawn path if no message comes back.
|
|
420
|
+
*/
|
|
421
|
+
probeForegroundLiveness(packageName: string, reason?: string, timeoutMs?: number): void;
|
|
422
|
+
private ensurePingLoop;
|
|
423
|
+
private stopPingLoop;
|
|
424
|
+
private doPingRound;
|
|
425
|
+
/**
|
|
426
|
+
* Called when a PONG is received from a miniapp (or any message, really).
|
|
427
|
+
* Updates lastPongAt to keep the app alive.
|
|
428
|
+
*/
|
|
429
|
+
handlePong(packageName: string): void;
|
|
430
|
+
private clearForegroundProbe;
|
|
431
|
+
cleanup(): void;
|
|
432
|
+
/**
|
|
433
|
+
* Number of currently connected miniapps (for diagnostics).
|
|
434
|
+
*/
|
|
435
|
+
get connectedAppCount(): number;
|
|
436
|
+
}
|
|
437
|
+
declare const localMiniappRuntime: LocalMiniappRuntime;
|
|
438
|
+
export default localMiniappRuntime;
|
|
439
|
+
//# sourceMappingURL=LocalMiniappRuntime.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LocalMiniappRuntime.d.ts","sourceRoot":"","sources":["../../src/services/LocalMiniappRuntime.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAsEH,MAAM,WAAW,wBAAwB;IACvC;4EACwE;IACxE,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,WAAW,CAAC,EAAE,KAAK,CAAC;QAAC,IAAI,EAAE,MAAM,CAAC;QAAC,QAAQ,CAAC,EAAE,OAAO,CAAC;QAAC,WAAW,CAAC,EAAE,MAAM,CAAA;KAAC,CAAC,CAAA;IAC7E,oBAAoB,CAAC,EAAE,KAAK,CAAC;QAAC,IAAI,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAC;QAAC,WAAW,CAAC,EAAE,MAAM,CAAA;KAAC,CAAC,CAAA;CAClF;AA+CD,KAAK,wBAAwB,GAAG,OAAO,GAAG,OAAO,CAAA;AAwMjD,cAAM,mBAAmB;IACvB,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAmC;IAE1D,+CAA+C;IAC/C,OAAO,CAAC,aAAa,CAA2C;IA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