@mentra/engine 0.1.0-dev.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 +57 -0
- package/build/facades/dev.d.ts.map +1 -0
- package/build/facades/dev.js +187 -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 +23 -0
- package/build/facades/permissions.d.ts.map +1 -0
- package/build/facades/permissions.js +145 -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 +66 -0
- package/build/internal.d.ts.map +1 -0
- package/build/internal.js +89 -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 +303 -0
- package/build/services/AppRegistry.d.ts.map +1 -0
- package/build/services/AppRegistry.js +1029 -0
- package/build/services/AppRegistry.js.map +1 -0
- package/build/services/AudioCloudUplink.d.ts +3 -0
- package/build/services/AudioCloudUplink.d.ts.map +1 -0
- package/build/services/AudioCloudUplink.js +33 -0
- package/build/services/AudioCloudUplink.js.map +1 -0
- package/build/services/AudioPlaybackService.d.ts +144 -0
- package/build/services/AudioPlaybackService.d.ts.map +1 -0
- package/build/services/AudioPlaybackService.js +533 -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 +627 -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 +433 -0
- package/build/services/LocalMiniappRuntime.d.ts.map +1 -0
- package/build/services/LocalMiniappRuntime.js +3561 -0
- package/build/services/LocalMiniappRuntime.js.map +1 -0
- package/build/services/LocalSttFallbackCoordinator.d.ts +54 -0
- package/build/services/LocalSttFallbackCoordinator.d.ts.map +1 -0
- package/build/services/LocalSttFallbackCoordinator.js +131 -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/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/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 +86 -0
- package/build/services/PhonePhotoCoordinator.d.ts.map +1 -0
- package/build/services/PhonePhotoCoordinator.js +274 -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/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/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 +165 -0
- package/build/services/asg/asgCameraApi.d.ts.map +1 -0
- package/build/services/asg/asgCameraApi.js +997 -0
- package/build/services/asg/asgCameraApi.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/gallerySettingsService.d.ts +19 -0
- package/build/services/asg/gallerySettingsService.d.ts.map +1 -0
- package/build/services/asg/gallerySettingsService.js +51 -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 +1839 -0
- package/build/services/asg/gallerySyncService.js.map +1 -0
- package/build/services/asg/localStorageService.d.ts +128 -0
- package/build/services/asg/localStorageService.d.ts.map +1 -0
- package/build/services/asg/localStorageService.js +423 -0
- package/build/services/asg/localStorageService.js.map +1 -0
- package/build/services/asg/mediaProcessingQueue.d.ts +60 -0
- package/build/services/asg/mediaProcessingQueue.d.ts.map +1 -0
- package/build/services/asg/mediaProcessingQueue.js +320 -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 +915 -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 +46 -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 +34 -0
- package/build/utils/permissions/MediaLibraryPermissions.d.ts.map +1 -0
- package/build/utils/permissions/MediaLibraryPermissions.js +122 -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 +119 -0
- package/src/devtools.ts +13 -0
- package/src/engine.ts +173 -0
- package/src/facades/dev.ts +197 -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 +151 -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 +158 -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 +1139 -0
- package/src/services/AudioCloudUplink.ts +34 -0
- package/src/services/AudioPlaybackService.ts +624 -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 +668 -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 +4038 -0
- package/src/services/LocalSttFallbackCoordinator.ts +140 -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/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/PhoneLocationService.ts +122 -0
- package/src/services/PhoneNotificationsSync.ts +44 -0
- package/src/services/PhonePhotoCoordinator.ts +337 -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/StreamLifecycleController.ts +213 -0
- package/src/services/TTSModelManager.ts +466 -0
- package/src/services/WebviewBridge.ts +50 -0
- package/src/services/asg/GalleryMediaIntegrityReportService.ts +70 -0
- package/src/services/asg/asgCameraApi.ts +1204 -0
- package/src/services/asg/galleryMediaValidation.ts +183 -0
- package/src/services/asg/galleryNotices.ts +60 -0
- package/src/services/asg/gallerySettingsService.ts +65 -0
- package/src/services/asg/gallerySyncNotifications.ts +236 -0
- package/src/services/asg/gallerySyncService.ts +2167 -0
- package/src/services/asg/localStorageService.ts +497 -0
- package/src/services/asg/mediaProcessingQueue.ts +371 -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 +993 -0
- package/src/types/applet.ts +112 -0
- package/src/types/asg.ts +51 -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 +130 -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,64 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview Vuzix Z100 Hardware Capabilities
|
|
3
|
+
*
|
|
4
|
+
* Capability profile for the Vuzix Z100 smart glasses model.
|
|
5
|
+
* Defines the hardware and software features available on this device.
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
import type { Capabilities } from "../hardware";
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* Vuzix Z100 capability profile
|
|
12
|
+
*/
|
|
13
|
+
export const vuzixZ100: Capabilities = {
|
|
14
|
+
modelName: "Vuzix Z100",
|
|
15
|
+
|
|
16
|
+
// Camera capabilities - does not have a camera
|
|
17
|
+
hasCamera: false,
|
|
18
|
+
camera: null,
|
|
19
|
+
|
|
20
|
+
// Display capabilities - has a green monochrome display
|
|
21
|
+
hasDisplay: true,
|
|
22
|
+
display: {
|
|
23
|
+
count: 1,
|
|
24
|
+
isColor: false,
|
|
25
|
+
color: "green",
|
|
26
|
+
canDisplayBitmap: false,
|
|
27
|
+
resolution: { width: 640, height: 480 },
|
|
28
|
+
fieldOfView: { horizontal: 30 },
|
|
29
|
+
maxTextLines: 7,
|
|
30
|
+
adjustBrightness: true,
|
|
31
|
+
|
|
32
|
+
// Scene display API — no positioned elements; scenes degrade to text walls.
|
|
33
|
+
canPosition: false,
|
|
34
|
+
maxImageElements: 0,
|
|
35
|
+
},
|
|
36
|
+
|
|
37
|
+
// Microphone capabilities - does not have a microphone
|
|
38
|
+
hasMicrophone: false,
|
|
39
|
+
microphone: null,
|
|
40
|
+
|
|
41
|
+
// Speaker capabilities - does not have a speaker
|
|
42
|
+
hasSpeaker: false,
|
|
43
|
+
speaker: null,
|
|
44
|
+
|
|
45
|
+
// IMU capabilities - does not have an IMU
|
|
46
|
+
hasIMU: false,
|
|
47
|
+
imu: null,
|
|
48
|
+
|
|
49
|
+
// Button capabilities - does not have buttons
|
|
50
|
+
hasButton: false,
|
|
51
|
+
button: null,
|
|
52
|
+
|
|
53
|
+
// Light capabilities - does not have lights
|
|
54
|
+
hasLight: false,
|
|
55
|
+
light: null,
|
|
56
|
+
|
|
57
|
+
// Power capabilities - does not have external battery
|
|
58
|
+
power: {
|
|
59
|
+
hasExternalBattery: false,
|
|
60
|
+
},
|
|
61
|
+
|
|
62
|
+
// WiFi capabilities - does not support WiFi
|
|
63
|
+
hasWifi: false,
|
|
64
|
+
};
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @mentra/types - Shared enums for MentraOS
|
|
3
|
+
* These are runtime values (not pure types)
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Hardware component types that apps can require
|
|
8
|
+
*/
|
|
9
|
+
export enum HardwareType {
|
|
10
|
+
CAMERA = "CAMERA",
|
|
11
|
+
DISPLAY = "DISPLAY",
|
|
12
|
+
MICROPHONE = "MICROPHONE",
|
|
13
|
+
SPEAKER = "SPEAKER",
|
|
14
|
+
IMU = "IMU",
|
|
15
|
+
BUTTON = "BUTTON",
|
|
16
|
+
LIGHT = "LIGHT",
|
|
17
|
+
WIFI = "WIFI",
|
|
18
|
+
EXIST = "EXIST",
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* Levels of hardware requirements
|
|
23
|
+
*/
|
|
24
|
+
export enum HardwareRequirementLevel {
|
|
25
|
+
REQUIRED = "REQUIRED", // App cannot function without this hardware
|
|
26
|
+
OPTIONAL = "OPTIONAL", // App has enhanced features with this hardware
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
export enum DeviceTypes {
|
|
30
|
+
NONE = "None",
|
|
31
|
+
SIMULATED = "Simulated Glasses",
|
|
32
|
+
G1 = "Even Realities G1",
|
|
33
|
+
G2 = "Even Realities G2",
|
|
34
|
+
LIVE = "Mentra Live",
|
|
35
|
+
MACH1 = "Mentra Mach1",
|
|
36
|
+
Z100 = "Vuzix Z100",
|
|
37
|
+
NEX = "Mentra Display",
|
|
38
|
+
FRAME = "Brilliant Frame",
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
export enum ControllerTypes {
|
|
42
|
+
R1 = "Even Realities R1",
|
|
43
|
+
}
|
|
@@ -0,0 +1,203 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @mentra/types - Hardware capability types
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import { evenRealitiesG1 } from "./capabilities/even-realities-g1";
|
|
6
|
+
import { evenRealitiesG2 } from "./capabilities/even-realities-g2";
|
|
7
|
+
import { mentraDisplay } from "./capabilities/mentra-display";
|
|
8
|
+
import { mentraLive } from "./capabilities/mentra-live";
|
|
9
|
+
import { simulatedGlasses } from "./capabilities/simulated-glasses";
|
|
10
|
+
import { vuzixZ100 } from "./capabilities/vuzix-z100";
|
|
11
|
+
import { none } from "./capabilities/none";
|
|
12
|
+
import { DeviceTypes, HardwareRequirementLevel, HardwareType } from "./enums";
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* Hardware requirement for an app
|
|
16
|
+
* Specifies what hardware components an app needs
|
|
17
|
+
*/
|
|
18
|
+
export interface HardwareRequirement {
|
|
19
|
+
type: HardwareType;
|
|
20
|
+
level: HardwareRequirementLevel;
|
|
21
|
+
description?: string; // Why this hardware is needed
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* Camera capabilities
|
|
26
|
+
*/
|
|
27
|
+
export interface CameraCapabilities {
|
|
28
|
+
resolution?: { width: number; height: number };
|
|
29
|
+
hasHDR?: boolean;
|
|
30
|
+
hasFocus?: boolean;
|
|
31
|
+
video: {
|
|
32
|
+
canRecord: boolean;
|
|
33
|
+
canStream: boolean;
|
|
34
|
+
supportedStreamTypes?: string[];
|
|
35
|
+
supportedResolutions?: { width: number; height: number }[];
|
|
36
|
+
};
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* Display capabilities
|
|
41
|
+
*/
|
|
42
|
+
export interface DisplayCapabilities {
|
|
43
|
+
count?: number;
|
|
44
|
+
isColor?: boolean;
|
|
45
|
+
color?: string; // e.g., "green", "full_color", "pallet"
|
|
46
|
+
canDisplayBitmap?: boolean;
|
|
47
|
+
resolution?: { width: number; height: number };
|
|
48
|
+
fieldOfView?: { horizontal?: number; vertical?: number };
|
|
49
|
+
maxTextLines?: number;
|
|
50
|
+
adjustBrightness?: boolean;
|
|
51
|
+
|
|
52
|
+
// --- Scene display API (display.render()) — typed capabilities ---
|
|
53
|
+
// Pure DATA the host scene pipeline acts on generically; a device without
|
|
54
|
+
// canPosition renders scenes via the host degrade path instead.
|
|
55
|
+
/** Public drawable canvas in px — the raw coordinate space for render() boxes. */
|
|
56
|
+
width?: number;
|
|
57
|
+
height?: number;
|
|
58
|
+
/** True ⇒ the device renders positioned elements (containers / canvas components). */
|
|
59
|
+
canPosition?: boolean;
|
|
60
|
+
/** Element budgets. Rects share the text pool on container-based devices. */
|
|
61
|
+
maxTextElements?: number;
|
|
62
|
+
maxImageElements?: number;
|
|
63
|
+
/** Per-image dimension cap (box-level), when the firmware has one. */
|
|
64
|
+
maxImagePx?: { width: number; height: number };
|
|
65
|
+
shapes?: "rect"[];
|
|
66
|
+
intensityLevels?: number;
|
|
67
|
+
partialUpdate?: boolean;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
/**
|
|
71
|
+
* Microphone capabilities
|
|
72
|
+
*/
|
|
73
|
+
export interface MicrophoneCapabilities {
|
|
74
|
+
count?: number;
|
|
75
|
+
hasVAD?: boolean; // Voice Activity Detection
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
/**
|
|
79
|
+
* Speaker capabilities
|
|
80
|
+
*/
|
|
81
|
+
export interface SpeakerCapabilities {
|
|
82
|
+
count?: number;
|
|
83
|
+
isPrivate?: boolean; // e.g., bone conduction
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
/**
|
|
87
|
+
* IMU (Inertial Measurement Unit) capabilities
|
|
88
|
+
*/
|
|
89
|
+
export interface IMUCapabilities {
|
|
90
|
+
axisCount?: number;
|
|
91
|
+
hasAccelerometer?: boolean;
|
|
92
|
+
hasCompass?: boolean;
|
|
93
|
+
hasGyroscope?: boolean;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
/**
|
|
97
|
+
* Button capabilities
|
|
98
|
+
*/
|
|
99
|
+
export interface ButtonCapabilities {
|
|
100
|
+
count?: number;
|
|
101
|
+
buttons?: {
|
|
102
|
+
type: "press" | "swipe1d" | "swipe2d";
|
|
103
|
+
events: string[]; // e.g., "press", "double_press", "long_press", "swipe_up", "swipe_down"
|
|
104
|
+
isCapacitive?: boolean;
|
|
105
|
+
}[];
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
/**
|
|
109
|
+
* Light capabilities
|
|
110
|
+
*/
|
|
111
|
+
export interface LightCapabilities {
|
|
112
|
+
count?: number;
|
|
113
|
+
lights?: {
|
|
114
|
+
id: string; // Unique identifier for the LED (e.g., "privacy", "user_feedback")
|
|
115
|
+
purpose: "privacy" | "user_feedback" | "general"; // LED purpose/function
|
|
116
|
+
isFullColor: boolean;
|
|
117
|
+
color?: string; // e.g., "white", "rgb"
|
|
118
|
+
position?: "front_facing" | "user_facing" | "side" | "unknown"; // LED physical position
|
|
119
|
+
}[];
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
/**
|
|
123
|
+
* Power capabilities
|
|
124
|
+
*/
|
|
125
|
+
export interface PowerCapabilities {
|
|
126
|
+
hasExternalBattery: boolean; // e.g., a case or puck
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
/**
|
|
130
|
+
* Device hardware capabilities
|
|
131
|
+
* Complete information about what hardware a device has
|
|
132
|
+
*/
|
|
133
|
+
export interface Capabilities {
|
|
134
|
+
modelName: string;
|
|
135
|
+
|
|
136
|
+
// Camera capabilities
|
|
137
|
+
hasCamera: boolean;
|
|
138
|
+
camera: CameraCapabilities | null;
|
|
139
|
+
|
|
140
|
+
// Display capabilities
|
|
141
|
+
hasDisplay: boolean;
|
|
142
|
+
display: DisplayCapabilities | null;
|
|
143
|
+
|
|
144
|
+
// Microphone capabilities
|
|
145
|
+
hasMicrophone: boolean;
|
|
146
|
+
microphone: MicrophoneCapabilities | null;
|
|
147
|
+
|
|
148
|
+
// Speaker capabilities
|
|
149
|
+
hasSpeaker: boolean;
|
|
150
|
+
speaker: SpeakerCapabilities | null;
|
|
151
|
+
|
|
152
|
+
// IMU capabilities
|
|
153
|
+
hasIMU: boolean;
|
|
154
|
+
imu: IMUCapabilities | null;
|
|
155
|
+
|
|
156
|
+
// Button capabilities
|
|
157
|
+
hasButton: boolean;
|
|
158
|
+
button: ButtonCapabilities | null;
|
|
159
|
+
|
|
160
|
+
// Light capabilities
|
|
161
|
+
hasLight: boolean;
|
|
162
|
+
light: LightCapabilities | null;
|
|
163
|
+
|
|
164
|
+
// Power capabilities
|
|
165
|
+
power: PowerCapabilities;
|
|
166
|
+
|
|
167
|
+
// WiFi capability
|
|
168
|
+
hasWifi: boolean;
|
|
169
|
+
|
|
170
|
+
// Native dashboard capability
|
|
171
|
+
// True when the device renders its own dashboard in firmware (e.g. Even
|
|
172
|
+
// Realities' built-in dashboard on G2). MentraOS does not manage or expose
|
|
173
|
+
// dashboard settings for these devices. Absent/false means MentraOS owns the
|
|
174
|
+
// dashboard.
|
|
175
|
+
hasNativeDashboard?: boolean;
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
/**
|
|
179
|
+
* Hardware capability profiles for supported glasses models
|
|
180
|
+
* Key: model_name string (e.g., "Even Realities G1", "Mentra Live")
|
|
181
|
+
* Value: Capabilities object defining device features
|
|
182
|
+
*/
|
|
183
|
+
export const HARDWARE_CAPABILITIES: Record<string, Capabilities> = {
|
|
184
|
+
[evenRealitiesG1.modelName]: evenRealitiesG1,
|
|
185
|
+
[evenRealitiesG2.modelName]: evenRealitiesG2,
|
|
186
|
+
[mentraDisplay.modelName]: mentraDisplay,
|
|
187
|
+
[mentraLive.modelName]: mentraLive,
|
|
188
|
+
[simulatedGlasses.modelName]: simulatedGlasses,
|
|
189
|
+
[vuzixZ100.modelName]: vuzixZ100,
|
|
190
|
+
[DeviceTypes.MACH1]: vuzixZ100, // Mach1 uses same Vuzix Ultralite hardware as Z100
|
|
191
|
+
[none.modelName]: none,
|
|
192
|
+
};
|
|
193
|
+
|
|
194
|
+
export const getModelCapabilities = (deviceType: DeviceTypes): Capabilities => {
|
|
195
|
+
const modelName = deviceType as string;
|
|
196
|
+
if (!HARDWARE_CAPABILITIES[modelName]) {
|
|
197
|
+
return HARDWARE_CAPABILITIES[DeviceTypes.NONE];
|
|
198
|
+
}
|
|
199
|
+
return HARDWARE_CAPABILITIES[modelName];
|
|
200
|
+
};
|
|
201
|
+
|
|
202
|
+
// export * from "./capabilities"
|
|
203
|
+
export { simulatedGlasses, evenRealitiesG1, evenRealitiesG2, mentraLive, vuzixZ100, mentraDisplay };
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Engine shared types — copied verbatim from @mentra/types so the module is
|
|
3
|
+
* self-contained. Keep these in sync with cloud/packages/types/src when the
|
|
4
|
+
* canonical types change. The capability profiles also live here under
|
|
5
|
+
* ./capabilities/.
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
// Enums (runtime values)
|
|
9
|
+
export {HardwareType, HardwareRequirementLevel, DeviceTypes, ControllerTypes} from "./enums"
|
|
10
|
+
|
|
11
|
+
// Hardware types
|
|
12
|
+
export type {
|
|
13
|
+
HardwareRequirement,
|
|
14
|
+
CameraCapabilities,
|
|
15
|
+
DisplayCapabilities,
|
|
16
|
+
MicrophoneCapabilities,
|
|
17
|
+
SpeakerCapabilities,
|
|
18
|
+
IMUCapabilities,
|
|
19
|
+
ButtonCapabilities,
|
|
20
|
+
LightCapabilities,
|
|
21
|
+
PowerCapabilities,
|
|
22
|
+
Capabilities,
|
|
23
|
+
} from "./hardware"
|
|
24
|
+
|
|
25
|
+
export {
|
|
26
|
+
HARDWARE_CAPABILITIES,
|
|
27
|
+
getModelCapabilities,
|
|
28
|
+
simulatedGlasses,
|
|
29
|
+
evenRealitiesG1,
|
|
30
|
+
evenRealitiesG2,
|
|
31
|
+
mentraLive,
|
|
32
|
+
vuzixZ100,
|
|
33
|
+
mentraDisplay,
|
|
34
|
+
} from "./hardware"
|
|
35
|
+
|
|
36
|
+
// Applet types
|
|
37
|
+
export type {AppletType, AppPermissionType, AppletPermission, AppletInterface, ClientApp} from "./applet"
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
// @ts-nocheck — `events` (node builtin, RN-polyfilled) ships no types in engine's
|
|
2
|
+
// standalone build; the host build resolves them fine.
|
|
3
|
+
import {EventEmitter} from "events"
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Process-wide event bus — moved into engine so engine-owned services (RestComms)
|
|
7
|
+
* and the host share ONE emitter instance across the engine↔host boundary.
|
|
8
|
+
* Re-exported through the host's `@/utils/GlobalEventEmitter` shim.
|
|
9
|
+
*
|
|
10
|
+
* @deprecated Use BluetoothSDK subscriptions directly instead.
|
|
11
|
+
*/
|
|
12
|
+
const GlobalEventEmitter = new EventEmitter()
|
|
13
|
+
|
|
14
|
+
export default GlobalEventEmitter
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview react-native-udp backed UdpSocketLike for @mentra/cloud-client.
|
|
3
|
+
*
|
|
4
|
+
* The cloud-client encrypts each audio frame in shared code (NaCl secretbox) and
|
|
5
|
+
* hands the raw bytes here; this adapter only owns the native dgram socket and
|
|
6
|
+
* sends them. Audio bytes never round-trip through extra JS here beyond the
|
|
7
|
+
* Buffer wrap the native module needs.
|
|
8
|
+
*/
|
|
9
|
+
import dgram from "react-native-udp"
|
|
10
|
+
import type {UdpSocketLike} from "@mentra/cloud-client"
|
|
11
|
+
|
|
12
|
+
type CloudUdpSocket = ReturnType<typeof dgram.createSocket> & {
|
|
13
|
+
on(event: "error", cb: (err: Error) => void): void
|
|
14
|
+
on(event: "message", cb: (msg: Uint8Array) => void): void
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export function createCloudUdpSocket(): UdpSocketLike {
|
|
18
|
+
const socket = dgram.createSocket({type: "udp4"}) as CloudUdpSocket
|
|
19
|
+
let onBytes: ((bytes: Uint8Array) => void) | null = null
|
|
20
|
+
|
|
21
|
+
socket.on("error", (err: Error) => {
|
|
22
|
+
console.warn(`[cloud-client udp] socket error: ${err.message}`)
|
|
23
|
+
})
|
|
24
|
+
socket.on("message", (msg: Uint8Array) => {
|
|
25
|
+
onBytes?.(new Uint8Array(msg))
|
|
26
|
+
})
|
|
27
|
+
// Bind to any available port so the socket is ready to send.
|
|
28
|
+
socket.bind(0)
|
|
29
|
+
|
|
30
|
+
return {
|
|
31
|
+
send(bytes: Uint8Array, host: string, port: number): void {
|
|
32
|
+
socket.send(bytes, 0, bytes.length, port, host, (err?: Error) => {
|
|
33
|
+
if (err) console.warn(`[cloud-client udp] send failed: ${err.message}`)
|
|
34
|
+
})
|
|
35
|
+
},
|
|
36
|
+
onMessage(cb: (bytes: Uint8Array) => void): void {
|
|
37
|
+
onBytes = cb
|
|
38
|
+
},
|
|
39
|
+
close(): void {
|
|
40
|
+
try {
|
|
41
|
+
socket.close()
|
|
42
|
+
} catch {
|
|
43
|
+
/* already closed */
|
|
44
|
+
}
|
|
45
|
+
},
|
|
46
|
+
}
|
|
47
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* MMKV-backed KeyValueStore for @mentra/cloud-client — moved into engine so
|
|
3
|
+
* engine owns the cloud-v2 credential storage (the v2 refresh token, so a
|
|
4
|
+
* relaunch does not force a new login). A dedicated MMKV instance keeps
|
|
5
|
+
* cloud-v2 credentials out of the app's general store. Re-exported through the
|
|
6
|
+
* host's `@/utils/cloudClient/MmkvSecureStore` shim.
|
|
7
|
+
*
|
|
8
|
+
* NOTE: MMKV is not hardware-backed. Before production handling of the
|
|
9
|
+
* long-lived refresh token, swap this for a Keychain/Keystore-backed store
|
|
10
|
+
* (react-native-keychain). It is fine for dev / simulator e2e.
|
|
11
|
+
*/
|
|
12
|
+
import {createMMKV, type MMKV} from "react-native-mmkv"
|
|
13
|
+
import type {KeyValueStore} from "@mentra/cloud-client"
|
|
14
|
+
|
|
15
|
+
const store: MMKV = createMMKV({id: "mentra-cloud-v2"})
|
|
16
|
+
|
|
17
|
+
export const cloudSecureStore: KeyValueStore = {
|
|
18
|
+
async get(key: string): Promise<string | null> {
|
|
19
|
+
return store.getString(key) ?? null
|
|
20
|
+
},
|
|
21
|
+
async set(key: string, value: string): Promise<void> {
|
|
22
|
+
store.set(key, value)
|
|
23
|
+
},
|
|
24
|
+
async delete(key: string): Promise<void> {
|
|
25
|
+
// react-native-mmkv v4's instance method is `remove`, not `delete`.
|
|
26
|
+
store.remove(key)
|
|
27
|
+
},
|
|
28
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Merge partial patches and flush once after `delayMs` of quiet time.
|
|
3
|
+
* Uses global setTimeout so Jest fake timers can advance debounced writes.
|
|
4
|
+
*/
|
|
5
|
+
export function createDebouncedPatchFlusher<T extends Record<string, unknown>>(
|
|
6
|
+
flush: (patch: T) => void,
|
|
7
|
+
delayMs: number,
|
|
8
|
+
) {
|
|
9
|
+
let pending = {} as T
|
|
10
|
+
let timer: ReturnType<typeof setTimeout> | null = null
|
|
11
|
+
|
|
12
|
+
const schedule = (callback: () => void) => {
|
|
13
|
+
timer = setTimeout(callback, delayMs) as ReturnType<typeof setTimeout>
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
return (patch: Partial<T>) => {
|
|
17
|
+
pending = {...pending, ...patch}
|
|
18
|
+
if (timer != null) {
|
|
19
|
+
clearTimeout(timer)
|
|
20
|
+
}
|
|
21
|
+
schedule(() => {
|
|
22
|
+
timer = null
|
|
23
|
+
const batch = pending
|
|
24
|
+
pending = {} as T
|
|
25
|
+
if (Object.keys(batch).length > 0) flush(batch)
|
|
26
|
+
})
|
|
27
|
+
}
|
|
28
|
+
}
|
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
import {LogBox} from "react-native"
|
|
2
|
+
import {configureReanimatedLogger, ReanimatedLogLevel} from "react-native-reanimated"
|
|
3
|
+
|
|
4
|
+
export interface LogEntry {
|
|
5
|
+
timestamp: number
|
|
6
|
+
level: "debug" | "info" | "warn" | "error"
|
|
7
|
+
message: string
|
|
8
|
+
source?: string
|
|
9
|
+
metadata?: Record<string, unknown>
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
class LogRingBuffer {
|
|
13
|
+
private logs: LogEntry[] = []
|
|
14
|
+
private maxAgeMs = 10 * 60 * 1000
|
|
15
|
+
private maxEntries = 10000
|
|
16
|
+
private isIntercepting = false
|
|
17
|
+
|
|
18
|
+
append(entry: Omit<LogEntry, "timestamp">) {
|
|
19
|
+
this.logs.push({...entry, timestamp: Date.now()})
|
|
20
|
+
this.prune()
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
getRecentLogs(): LogEntry[] {
|
|
24
|
+
this.prune()
|
|
25
|
+
return [...this.logs]
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
clear() {
|
|
29
|
+
this.logs = []
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
getStats(): {count: number; oldestTimestamp: number | null; newestTimestamp: number | null} {
|
|
33
|
+
this.prune()
|
|
34
|
+
return {
|
|
35
|
+
count: this.logs.length,
|
|
36
|
+
oldestTimestamp: this.logs.length > 0 ? this.logs[0].timestamp : null,
|
|
37
|
+
newestTimestamp: this.logs.length > 0 ? this.logs[this.logs.length - 1].timestamp : null,
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
private prune() {
|
|
42
|
+
const cutoff = Date.now() - this.maxAgeMs
|
|
43
|
+
this.logs = this.logs.filter((l) => l.timestamp > cutoff)
|
|
44
|
+
if (this.logs.length > this.maxEntries) {
|
|
45
|
+
this.logs = this.logs.slice(-this.maxEntries)
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
startConsoleInterception() {
|
|
50
|
+
if (this.isIntercepting) return
|
|
51
|
+
this.isIntercepting = true
|
|
52
|
+
|
|
53
|
+
const ignoredLogs = [
|
|
54
|
+
/Failed to open debugger. Please check that the dev server is running and reload the app./,
|
|
55
|
+
/Require cycle:/,
|
|
56
|
+
/is missing the required default export./,
|
|
57
|
+
/Attempted to import the module/,
|
|
58
|
+
/The action 'RESET' with payload/,
|
|
59
|
+
/The action 'POP_TO_TOP' was not handled/,
|
|
60
|
+
/socket-0 binding/,
|
|
61
|
+
/socket-0 bound to/,
|
|
62
|
+
/Error while flushing PostHog/,
|
|
63
|
+
/backTitleFontFamily prop is not available on Android/,
|
|
64
|
+
/disableBackButtonMenu prop is not available on Android/,
|
|
65
|
+
/backTitleVisible prop is not available on Android/,
|
|
66
|
+
/topInsetEnabled prop is not available on Android/,
|
|
67
|
+
/largeTitleHideShadow prop is not available on Android/,
|
|
68
|
+
/largeTitleFontWeight prop is not available on Android/,
|
|
69
|
+
/userInterfaceStyle prop is not available on Android/,
|
|
70
|
+
/largeTitleFontFamily prop is not available on Android/,
|
|
71
|
+
/Points are coincident/,
|
|
72
|
+
]
|
|
73
|
+
|
|
74
|
+
LogBox.ignoreLogs(ignoredLogs)
|
|
75
|
+
|
|
76
|
+
if (__DEV__) {
|
|
77
|
+
const withoutIgnored =
|
|
78
|
+
(logger: (...args: unknown[]) => void) =>
|
|
79
|
+
(...args: unknown[]) => {
|
|
80
|
+
const output = args.join(" ")
|
|
81
|
+
if (!ignoredLogs.some((log) => log.test(output))) {
|
|
82
|
+
logger(...args)
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
console.log = withoutIgnored(console.log)
|
|
87
|
+
console.info = withoutIgnored(console.info)
|
|
88
|
+
console.warn = withoutIgnored(console.warn)
|
|
89
|
+
console.error = withoutIgnored(console.error)
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
configureReanimatedLogger({
|
|
93
|
+
level: ReanimatedLogLevel.warn,
|
|
94
|
+
strict: false,
|
|
95
|
+
})
|
|
96
|
+
|
|
97
|
+
const originalConsole = {
|
|
98
|
+
log: console.log,
|
|
99
|
+
info: console.info,
|
|
100
|
+
warn: console.warn,
|
|
101
|
+
error: console.error,
|
|
102
|
+
debug: console.debug,
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
const appendToBuffer = this.append.bind(this)
|
|
106
|
+
|
|
107
|
+
const createInterceptor =
|
|
108
|
+
(level: "debug" | "info" | "warn" | "error", originalFn: (...args: unknown[]) => void) =>
|
|
109
|
+
(...args: unknown[]) => {
|
|
110
|
+
originalFn.apply(console, args)
|
|
111
|
+
appendToBuffer({
|
|
112
|
+
level,
|
|
113
|
+
message: args
|
|
114
|
+
.map((a) => {
|
|
115
|
+
if (a === null) return "null"
|
|
116
|
+
if (a === undefined) return "undefined"
|
|
117
|
+
if (typeof a === "object") {
|
|
118
|
+
try {
|
|
119
|
+
return JSON.stringify(a)
|
|
120
|
+
} catch {
|
|
121
|
+
return String(a)
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
return String(a)
|
|
125
|
+
})
|
|
126
|
+
.join(" "),
|
|
127
|
+
source: "console",
|
|
128
|
+
})
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
console.log = createInterceptor("info", originalConsole.log)
|
|
132
|
+
console.info = createInterceptor("info", originalConsole.info)
|
|
133
|
+
console.warn = createInterceptor("warn", originalConsole.warn)
|
|
134
|
+
console.error = createInterceptor("error", originalConsole.error)
|
|
135
|
+
console.debug = createInterceptor("debug", originalConsole.debug)
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
export const logBuffer = new LogRingBuffer()
|
|
140
|
+
export default logBuffer
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* decideDevLaunchRoute — pre-flight reachability + manifest fetch for dev
|
|
3
|
+
* miniapp launches.
|
|
4
|
+
*
|
|
5
|
+
* Every entry point that wants to launch a dev miniapp (home tile, QR
|
|
6
|
+
* scan, URL screen, dev-offline "Try again" button) calls this BEFORE
|
|
7
|
+
* navigating, so:
|
|
8
|
+
*
|
|
9
|
+
* 1. We land on the right destination in a single transition
|
|
10
|
+
* (live mount vs offline takeover) — no flash through /applet/local.
|
|
11
|
+
* 2. Callers that need the manifest (permission gate, name/icon read)
|
|
12
|
+
* get it in the same round trip — no second fetch.
|
|
13
|
+
*
|
|
14
|
+
* Pre-flighting at the call site keeps /applet/local a pure mount route.
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
import {storage} from "./storage/storage"
|
|
18
|
+
|
|
19
|
+
const REACHABILITY_TIMEOUT_MS = 1500
|
|
20
|
+
|
|
21
|
+
export type DevManifest = {
|
|
22
|
+
packageName?: string
|
|
23
|
+
name?: string
|
|
24
|
+
/** First-found of `icon` / `iconUrl` / `logoUrl` (relative or absolute). */
|
|
25
|
+
icon?: string
|
|
26
|
+
permissions?: unknown
|
|
27
|
+
hardwareRequirements?: unknown
|
|
28
|
+
[key: string]: unknown
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
export type DevLaunchResult =
|
|
32
|
+
| {decision: "live"; manifest: DevManifest}
|
|
33
|
+
| {decision: "offline"; manifest: null}
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* GET <devUrl>/miniapp.json with a hard timeout. Returns the parsed
|
|
37
|
+
* manifest on success ("live") or null ("offline").
|
|
38
|
+
*
|
|
39
|
+
* Side effect: on success, writes <packageName>_dev_last_reachable so
|
|
40
|
+
* the dev-offline screen can show "Last reached: N min ago" the next
|
|
41
|
+
* time the user lands there.
|
|
42
|
+
*
|
|
43
|
+
* The fetch doubles as the reachability probe AND the manifest source —
|
|
44
|
+
* one request per launch attempt instead of two.
|
|
45
|
+
*/
|
|
46
|
+
export async function decideDevLaunchRoute(
|
|
47
|
+
packageName: string,
|
|
48
|
+
devUrl: string,
|
|
49
|
+
): Promise<DevLaunchResult> {
|
|
50
|
+
const controller = new AbortController()
|
|
51
|
+
const timer = setTimeout(() => controller.abort(), REACHABILITY_TIMEOUT_MS)
|
|
52
|
+
try {
|
|
53
|
+
const res = await fetch(`${devUrl.replace(/\/$/, "")}/miniapp.json`, {
|
|
54
|
+
method: "GET",
|
|
55
|
+
signal: controller.signal,
|
|
56
|
+
})
|
|
57
|
+
if (!res.ok) return {decision: "offline", manifest: null}
|
|
58
|
+
const manifest = (await res.json()) as DevManifest
|
|
59
|
+
if (packageName) {
|
|
60
|
+
storage.save(`${packageName}_dev_last_reachable`, Date.now())
|
|
61
|
+
}
|
|
62
|
+
return {decision: "live", manifest}
|
|
63
|
+
} catch {
|
|
64
|
+
return {decision: "offline", manifest: null}
|
|
65
|
+
} finally {
|
|
66
|
+
clearTimeout(timer)
|
|
67
|
+
}
|
|
68
|
+
}
|