@glassly/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 +96 -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 +336 -0
- package/build/engine.d.ts.map +1 -0
- package/build/engine.js +198 -0
- package/build/engine.js.map +1 -0
- package/build/facades/dev.d.ts +69 -0
- package/build/facades/dev.d.ts.map +1 -0
- package/build/facades/dev.js +204 -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 +142 -0
- package/build/facades/glasses.d.ts.map +1 -0
- package/build/facades/glasses.js +214 -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 +55 -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/maps.d.ts +18 -0
- package/build/facades/maps.d.ts.map +1 -0
- package/build/facades/maps.js +13 -0
- package/build/facades/maps.js.map +1 -0
- package/build/facades/memory.d.ts +38 -0
- package/build/facades/memory.d.ts.map +1 -0
- package/build/facades/memory.js +33 -0
- package/build/facades/memory.js.map +1 -0
- package/build/facades/miniapps.d.ts +47 -0
- package/build/facades/miniapps.d.ts.map +1 -0
- package/build/facades/miniapps.js +54 -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 +106 -0
- package/build/facades/ota.d.ts.map +1 -0
- package/build/facades/ota.js +159 -0
- package/build/facades/ota.js.map +1 -0
- package/build/facades/pairing.d.ts +115 -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 +17 -0
- package/build/facades/phoneNotifications.d.ts.map +1 -0
- package/build/facades/phoneNotifications.js +41 -0
- package/build/facades/phoneNotifications.js.map +1 -0
- package/build/facades/providerKeys.d.ts +26 -0
- package/build/facades/providerKeys.d.ts.map +1 -0
- package/build/facades/providerKeys.js +26 -0
- package/build/facades/providerKeys.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/speakers.d.ts +41 -0
- package/build/facades/speakers.d.ts.map +1 -0
- package/build/facades/speakers.js +139 -0
- package/build/facades/speakers.js.map +1 -0
- package/build/facades/speech.d.ts +44 -0
- package/build/facades/speech.d.ts.map +1 -0
- package/build/facades/speech.js +46 -0
- package/build/facades/speech.js.map +1 -0
- package/build/index.d.ts +48 -0
- package/build/index.d.ts.map +1 -0
- package/build/index.js +49 -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 +115 -0
- package/build/runtime/bootstrap.d.ts.map +1 -0
- package/build/runtime/bootstrap.js +73 -0
- package/build/runtime/bootstrap.js.map +1 -0
- package/build/runtime/config.d.ts +152 -0
- package/build/runtime/config.d.ts.map +1 -0
- package/build/runtime/config.js +19 -0
- package/build/runtime/config.js.map +1 -0
- package/build/runtime/scanQrSeam.d.ts +7 -0
- package/build/runtime/scanQrSeam.d.ts.map +1 -0
- package/build/runtime/scanQrSeam.js +16 -0
- package/build/runtime/scanQrSeam.js.map +1 -0
- package/build/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/AiTierResolution.d.ts +61 -0
- package/build/services/AiTierResolution.d.ts.map +1 -0
- package/build/services/AiTierResolution.js +83 -0
- package/build/services/AiTierResolution.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 +1108 -0
- package/build/services/AppRegistry.js.map +1 -0
- package/build/services/AudioCloudUplink.d.ts +15 -0
- package/build/services/AudioCloudUplink.d.ts.map +1 -0
- package/build/services/AudioCloudUplink.js +54 -0
- package/build/services/AudioCloudUplink.js.map +1 -0
- package/build/services/AudioPlaybackService.d.ts +183 -0
- package/build/services/AudioPlaybackService.d.ts.map +1 -0
- package/build/services/AudioPlaybackService.js +750 -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 +106 -0
- package/build/services/BlobStore.d.ts.map +1 -0
- package/build/services/BlobStore.js +741 -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 +51 -0
- package/build/services/CloudAudioSubscriptionSync.js.map +1 -0
- package/build/services/CloudClientService.d.ts +293 -0
- package/build/services/CloudClientService.d.ts.map +1 -0
- package/build/services/CloudClientService.js +965 -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 +296 -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 +214 -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/ForegroundLocationPermission.d.ts +13 -0
- package/build/services/ForegroundLocationPermission.d.ts.map +1 -0
- package/build/services/ForegroundLocationPermission.js +12 -0
- package/build/services/ForegroundLocationPermission.js.map +1 -0
- package/build/services/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 +127 -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 +33 -0
- package/build/services/HeadingService.d.ts.map +1 -0
- package/build/services/HeadingService.js +123 -0
- package/build/services/HeadingService.js.map +1 -0
- package/build/services/HotspotOtaTransport.d.ts +29 -0
- package/build/services/HotspotOtaTransport.d.ts.map +1 -0
- package/build/services/HotspotOtaTransport.js +146 -0
- package/build/services/HotspotOtaTransport.js.map +1 -0
- package/build/services/HotspotShutdown.d.ts +17 -0
- package/build/services/HotspotShutdown.d.ts.map +1 -0
- package/build/services/HotspotShutdown.js +29 -0
- package/build/services/HotspotShutdown.js.map +1 -0
- package/build/services/JSCrashController.d.ts +97 -0
- package/build/services/JSCrashController.d.ts.map +1 -0
- package/build/services/JSCrashController.js +138 -0
- package/build/services/JSCrashController.js.map +1 -0
- package/build/services/JSCrashloopReportService.d.ts +9 -0
- package/build/services/JSCrashloopReportService.d.ts.map +1 -0
- package/build/services/JSCrashloopReportService.js +54 -0
- package/build/services/JSCrashloopReportService.js.map +1 -0
- package/build/services/JSLogPipeline.d.ts +87 -0
- package/build/services/JSLogPipeline.d.ts.map +1 -0
- package/build/services/JSLogPipeline.js +137 -0
- package/build/services/JSLogPipeline.js.map +1 -0
- package/build/services/JSRouter.d.ts +203 -0
- package/build/services/JSRouter.d.ts.map +1 -0
- package/build/services/JSRouter.js +482 -0
- package/build/services/JSRouter.js.map +1 -0
- package/build/services/LocalDisplayManager.d.ts +162 -0
- package/build/services/LocalDisplayManager.d.ts.map +1 -0
- package/build/services/LocalDisplayManager.js +687 -0
- package/build/services/LocalDisplayManager.js.map +1 -0
- package/build/services/LocalMiniappDataMigration.d.ts +46 -0
- package/build/services/LocalMiniappDataMigration.d.ts.map +1 -0
- package/build/services/LocalMiniappDataMigration.js +78 -0
- package/build/services/LocalMiniappDataMigration.js.map +1 -0
- package/build/services/LocalMiniappRuntime.d.ts +677 -0
- package/build/services/LocalMiniappRuntime.d.ts.map +1 -0
- package/build/services/LocalMiniappRuntime.js +5068 -0
- package/build/services/LocalMiniappRuntime.js.map +1 -0
- package/build/services/LocalMiniappStorage.d.ts +32 -0
- package/build/services/LocalMiniappStorage.d.ts.map +1 -0
- package/build/services/LocalMiniappStorage.js +66 -0
- package/build/services/LocalMiniappStorage.js.map +1 -0
- package/build/services/LocalMiniappUserIdentity.d.ts +41 -0
- package/build/services/LocalMiniappUserIdentity.d.ts.map +1 -0
- package/build/services/LocalMiniappUserIdentity.js +73 -0
- package/build/services/LocalMiniappUserIdentity.js.map +1 -0
- package/build/services/LocalSttFallbackCoordinator.d.ts +101 -0
- package/build/services/LocalSttFallbackCoordinator.d.ts.map +1 -0
- package/build/services/LocalSttFallbackCoordinator.js +210 -0
- package/build/services/LocalSttFallbackCoordinator.js.map +1 -0
- package/build/services/MapboxTokenService.d.ts +33 -0
- package/build/services/MapboxTokenService.d.ts.map +1 -0
- package/build/services/MapboxTokenService.js +115 -0
- package/build/services/MapboxTokenService.js.map +1 -0
- package/build/services/MemoryCapture.d.ts +40 -0
- package/build/services/MemoryCapture.d.ts.map +1 -0
- package/build/services/MemoryCapture.js +42 -0
- package/build/services/MemoryCapture.js.map +1 -0
- package/build/services/MemoryStore.d.ts +184 -0
- package/build/services/MemoryStore.d.ts.map +1 -0
- package/build/services/MemoryStore.js +541 -0
- package/build/services/MemoryStore.js.map +1 -0
- package/build/services/MicStateCoordinator.d.ts +78 -0
- package/build/services/MicStateCoordinator.d.ts.map +1 -0
- package/build/services/MicStateCoordinator.js +219 -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 +127 -0
- package/build/services/MiniappLauncher.d.ts.map +1 -0
- package/build/services/MiniappLauncher.js +309 -0
- package/build/services/MiniappLauncher.js.map +1 -0
- package/build/services/MiniappLiveness.d.ts +12 -0
- package/build/services/MiniappLiveness.d.ts.map +1 -0
- package/build/services/MiniappLiveness.js +16 -0
- package/build/services/MiniappLiveness.js.map +1 -0
- package/build/services/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/NativeNavigationService.d.ts +51 -0
- package/build/services/NativeNavigationService.d.ts.map +1 -0
- package/build/services/NativeNavigationService.js +154 -0
- package/build/services/NativeNavigationService.js.map +1 -0
- package/build/services/NavigationHandlers.d.ts +107 -0
- package/build/services/NavigationHandlers.d.ts.map +1 -0
- package/build/services/NavigationHandlers.js +479 -0
- package/build/services/NavigationHandlers.js.map +1 -0
- package/build/services/NavigationService.d.ts +283 -0
- package/build/services/NavigationService.d.ts.map +1 -0
- package/build/services/NavigationService.js +696 -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/OtaArtifactDownloader.d.ts +65 -0
- package/build/services/OtaArtifactDownloader.d.ts.map +1 -0
- package/build/services/OtaArtifactDownloader.js +226 -0
- package/build/services/OtaArtifactDownloader.js.map +1 -0
- package/build/services/OtaInstallCoordinator.d.ts +275 -0
- package/build/services/OtaInstallCoordinator.d.ts.map +1 -0
- package/build/services/OtaInstallCoordinator.js +1491 -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 +72 -0
- package/build/services/OtaService.js.map +1 -0
- package/build/services/OtaUpdateCheckService.d.ts +100 -0
- package/build/services/OtaUpdateCheckService.d.ts.map +1 -0
- package/build/services/OtaUpdateCheckService.js +380 -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 +45 -0
- package/build/services/PhoneCalendarService.js.map +1 -0
- package/build/services/PhoneCameraFovCoordinator.d.ts +30 -0
- package/build/services/PhoneCameraFovCoordinator.d.ts.map +1 -0
- package/build/services/PhoneCameraFovCoordinator.js +194 -0
- package/build/services/PhoneCameraFovCoordinator.js.map +1 -0
- package/build/services/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 +37 -0
- package/build/services/PhoneNotificationsSync.js.map +1 -0
- package/build/services/PhonePhotoCoordinator.d.ts +110 -0
- package/build/services/PhonePhotoCoordinator.d.ts.map +1 -0
- package/build/services/PhonePhotoCoordinator.js +344 -0
- package/build/services/PhonePhotoCoordinator.js.map +1 -0
- package/build/services/PhoneStreamCoordinator.d.ts +175 -0
- package/build/services/PhoneStreamCoordinator.d.ts.map +1 -0
- package/build/services/PhoneStreamCoordinator.js +740 -0
- package/build/services/PhoneStreamCoordinator.js.map +1 -0
- package/build/services/PhoneVideoCoordinator.d.ts +52 -0
- package/build/services/PhoneVideoCoordinator.d.ts.map +1 -0
- package/build/services/PhoneVideoCoordinator.js +157 -0
- package/build/services/PhoneVideoCoordinator.js.map +1 -0
- package/build/services/ProviderKeyValidation.d.ts +27 -0
- package/build/services/ProviderKeyValidation.d.ts.map +1 -0
- package/build/services/ProviderKeyValidation.js +42 -0
- package/build/services/ProviderKeyValidation.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 +366 -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 +274 -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/SpeakerIdModelManager.d.ts +36 -0
- package/build/services/SpeakerIdModelManager.d.ts.map +1 -0
- package/build/services/SpeakerIdModelManager.js +132 -0
- package/build/services/SpeakerIdModelManager.js.map +1 -0
- package/build/services/SpeakerIdSync.d.ts +14 -0
- package/build/services/SpeakerIdSync.d.ts.map +1 -0
- package/build/services/SpeakerIdSync.js +62 -0
- package/build/services/SpeakerIdSync.js.map +1 -0
- package/build/services/SpeakerLabelResolver.d.ts +80 -0
- package/build/services/SpeakerLabelResolver.d.ts.map +1 -0
- package/build/services/SpeakerLabelResolver.js +108 -0
- package/build/services/SpeakerLabelResolver.js.map +1 -0
- package/build/services/SpeakerProfileStore.d.ts +90 -0
- package/build/services/SpeakerProfileStore.d.ts.map +1 -0
- package/build/services/SpeakerProfileStore.js +213 -0
- package/build/services/SpeakerProfileStore.js.map +1 -0
- package/build/services/SpeakerSegmentResolver.d.ts +87 -0
- package/build/services/SpeakerSegmentResolver.d.ts.map +1 -0
- package/build/services/SpeakerSegmentResolver.js +137 -0
- package/build/services/SpeakerSegmentResolver.js.map +1 -0
- package/build/services/StreamLifecycleController.d.ts +63 -0
- package/build/services/StreamLifecycleController.d.ts.map +1 -0
- package/build/services/StreamLifecycleController.js +148 -0
- package/build/services/StreamLifecycleController.js.map +1 -0
- package/build/services/SupportProfileSync.d.ts +22 -0
- package/build/services/SupportProfileSync.d.ts.map +1 -0
- package/build/services/SupportProfileSync.js +213 -0
- package/build/services/SupportProfileSync.js.map +1 -0
- package/build/services/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 +22 -0
- package/build/services/TranscriptionRouting.d.ts.map +1 -0
- package/build/services/TranscriptionRouting.js +34 -0
- package/build/services/TranscriptionRouting.js.map +1 -0
- package/build/services/TtsTextSanitizer.d.ts +5 -0
- package/build/services/TtsTextSanitizer.d.ts.map +1 -0
- package/build/services/TtsTextSanitizer.js +61 -0
- package/build/services/TtsTextSanitizer.js.map +1 -0
- package/build/services/UIRouter.d.ts +137 -0
- package/build/services/UIRouter.d.ts.map +1 -0
- package/build/services/UIRouter.js +210 -0
- package/build/services/UIRouter.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/WifiAdbRequest.d.ts +17 -0
- package/build/services/WifiAdbRequest.d.ts.map +1 -0
- package/build/services/WifiAdbRequest.js +35 -0
- package/build/services/WifiAdbRequest.js.map +1 -0
- package/build/services/asg/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 +208 -0
- package/build/services/asg/asgCameraApi.d.ts.map +1 -0
- package/build/services/asg/asgCameraApi.js +1480 -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 +1945 -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/audioPlaybackAssets.d.ts +8 -0
- package/build/services/audioPlaybackAssets.d.ts.map +1 -0
- package/build/services/audioPlaybackAssets.js +7 -0
- package/build/services/audioPlaybackAssets.js.map +1 -0
- package/build/services/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/effectiveCapabilities.d.ts +8 -0
- package/build/services/effectiveCapabilities.d.ts.map +1 -0
- package/build/services/effectiveCapabilities.js +23 -0
- package/build/services/effectiveCapabilities.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/manifestActions.d.ts +31 -0
- package/build/services/manifestActions.d.ts.map +1 -0
- package/build/services/manifestActions.js +54 -0
- package/build/services/manifestActions.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/memoryStoreInstance.d.ts +19 -0
- package/build/services/memoryStoreInstance.d.ts.map +1 -0
- package/build/services/memoryStoreInstance.js +65 -0
- package/build/services/memoryStoreInstance.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 +87 -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 +53 -0
- package/build/services/otaDisplayState.d.ts.map +1 -0
- package/build/services/otaDisplayState.js +114 -0
- package/build/services/otaDisplayState.js.map +1 -0
- package/build/services/otaInstallPolicy.d.ts +93 -0
- package/build/services/otaInstallPolicy.d.ts.map +1 -0
- package/build/services/otaInstallPolicy.js +117 -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/otaManifestUrl.d.ts +2 -0
- package/build/services/otaManifestUrl.d.ts.map +1 -0
- package/build/services/otaManifestUrl.js +46 -0
- package/build/services/otaManifestUrl.js.map +1 -0
- package/build/services/slimStreamStatus.d.ts +18 -0
- package/build/services/slimStreamStatus.d.ts.map +1 -0
- package/build/services/slimStreamStatus.js +36 -0
- package/build/services/slimStreamStatus.js.map +1 -0
- package/build/services/soniox/SonioxDirectService.d.ts +109 -0
- package/build/services/soniox/SonioxDirectService.d.ts.map +1 -0
- package/build/services/soniox/SonioxDirectService.js +449 -0
- package/build/services/soniox/SonioxDirectService.js.map +1 -0
- package/build/services/soniox/SonioxRealtimeClient.d.ts +121 -0
- package/build/services/soniox/SonioxRealtimeClient.d.ts.map +1 -0
- package/build/services/soniox/SonioxRealtimeClient.js +301 -0
- package/build/services/soniox/SonioxRealtimeClient.js.map +1 -0
- package/build/services/soniox/SonioxTokenAssembler.d.ts +98 -0
- package/build/services/soniox/SonioxTokenAssembler.d.ts.map +1 -0
- package/build/services/soniox/SonioxTokenAssembler.js +394 -0
- package/build/services/soniox/SonioxTokenAssembler.js.map +1 -0
- package/build/services/speakerProfileStoreInstance.d.ts +8 -0
- package/build/services/speakerProfileStoreInstance.d.ts.map +1 -0
- package/build/services/speakerProfileStoreInstance.js +24 -0
- package/build/services/speakerProfileStoreInstance.js.map +1 -0
- package/build/services/uiShim.d.ts +38 -0
- package/build/services/uiShim.d.ts.map +1 -0
- package/build/services/uiShim.js +369 -0
- package/build/services/uiShim.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 +503 -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 +33 -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 +103 -0
- package/build/stores/gallerySync.d.ts.map +1 -0
- package/build/stores/gallerySync.js +219 -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 +208 -0
- package/build/stores/glasses.js.map +1 -0
- package/build/stores/settings.d.ts +54 -0
- package/build/stores/settings.d.ts.map +1 -0
- package/build/stores/settings.js +1200 -0
- package/build/stores/settings.js.map +1 -0
- package/build/stores/transcriptionDebug.d.ts +25 -0
- package/build/stores/transcriptionDebug.d.ts.map +1 -0
- package/build/stores/transcriptionDebug.js +0 -0
- package/build/stores/transcriptionDebug.js.map +1 -0
- package/build/types/applet.d.ts +101 -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 +57 -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 +83 -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 +65 -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 +94 -0
- package/build/types/capabilities/mentra-live.js.map +1 -0
- package/build/types/capabilities/nimo.d.ts +13 -0
- package/build/types/capabilities/nimo.d.ts.map +1 -0
- package/build/types/capabilities/nimo.js +72 -0
- package/build/types/capabilities/nimo.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 +67 -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 +82 -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 +54 -0
- package/build/types/capabilities/vuzix-z100.js.map +1 -0
- package/build/types/enums.d.ts +22 -0
- package/build/types/enums.d.ts.map +1 -0
- package/build/types/enums.js +27 -0
- package/build/types/enums.js.map +1 -0
- package/build/types/hardware.d.ts +155 -0
- package/build/types/hardware.d.ts.map +1 -0
- package/build/types/hardware.js +52 -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 +11 -0
- package/build/utils/GlobalEventEmitter.d.ts.map +1 -0
- package/build/utils/GlobalEventEmitter.js +14 -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/configuredDevHost.d.ts +6 -0
- package/build/utils/configuredDevHost.d.ts.map +1 -0
- package/build/utils/configuredDevHost.js +19 -0
- package/build/utils/configuredDevHost.js.map +1 -0
- package/build/utils/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 +55 -0
- package/build/utils/devMiniappLaunch.d.ts.map +1 -0
- package/build/utils/devMiniappLaunch.js +175 -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 +122 -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 +188 -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/anchor.d.ts +17 -0
- package/build/utils/display/scene/anchor.d.ts.map +1 -0
- package/build/utils/display/scene/anchor.js +33 -0
- package/build/utils/display/scene/anchor.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 +11 -0
- package/build/utils/display/scene/index.d.ts.map +1 -0
- package/build/utils/display/scene/index.js +7 -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 +201 -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 +139 -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 +131 -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/memory/search.d.ts +72 -0
- package/build/utils/memory/search.d.ts.map +1 -0
- package/build/utils/memory/search.js +178 -0
- package/build/utils/memory/search.js.map +1 -0
- package/build/utils/miniappDiagnostics.d.ts +64 -0
- package/build/utils/miniappDiagnostics.d.ts.map +1 -0
- package/build/utils/miniappDiagnostics.js +173 -0
- package/build/utils/miniappDiagnostics.js.map +1 -0
- package/build/utils/miniappGlobals.d.ts +59 -0
- package/build/utils/miniappGlobals.d.ts.map +1 -0
- package/build/utils/miniappGlobals.js +223 -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/speakerEmbedding.d.ts +8 -0
- package/build/utils/speakerEmbedding.d.ts.map +1 -0
- package/build/utils/speakerEmbedding.js +63 -0
- package/build/utils/speakerEmbedding.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 +142 -0
- package/build/utils/timers/timers.js.map +1 -0
- package/package.json +122 -0
- package/src/assets/silence.wav +0 -0
- package/src/devtools.ts +13 -0
- package/src/engine.ts +198 -0
- package/src/facades/dev.ts +213 -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 +219 -0
- package/src/facades/glassesSettings.ts +57 -0
- package/src/facades/glassesWifi.ts +68 -0
- package/src/facades/maps.ts +13 -0
- package/src/facades/memory.ts +46 -0
- package/src/facades/miniapps.ts +62 -0
- package/src/facades/notifications.ts +14 -0
- package/src/facades/ota.ts +177 -0
- package/src/facades/pairing.ts +329 -0
- package/src/facades/permissions.ts +165 -0
- package/src/facades/phoneNotifications.ts +41 -0
- package/src/facades/providerKeys.ts +31 -0
- package/src/facades/reports.ts +180 -0
- package/src/facades/session.ts +54 -0
- package/src/facades/settings.ts +57 -0
- package/src/facades/speakers.ts +152 -0
- package/src/facades/speech.ts +49 -0
- package/src/index.ts +214 -0
- package/src/internal.ts +155 -0
- package/src/runtime/bootstrap.ts +159 -0
- package/src/runtime/config.ts +155 -0
- package/src/runtime/scanQrSeam.ts +20 -0
- package/src/runtime/streamConfig.ts +34 -0
- package/src/services/AiTierResolution.ts +106 -0
- package/src/services/AppRegistry.ts +1245 -0
- package/src/services/AudioCloudUplink.ts +56 -0
- package/src/services/AudioPlaybackService.ts +873 -0
- package/src/services/AutomaticReportResult.ts +50 -0
- package/src/services/BlobStore.ts +823 -0
- package/src/services/CaptionsTesterReportService.ts +107 -0
- package/src/services/CloudAudioSubscriptionSync.ts +53 -0
- package/src/services/CloudClientService.ts +1031 -0
- package/src/services/CloudTranscriptE2EMetrics.ts +27 -0
- package/src/services/ConnectionCoordinator.ts +65 -0
- package/src/services/DevServerBridge.ts +334 -0
- package/src/services/DeviceEventRouter.ts +266 -0
- package/src/services/DeviceStoreHydration.ts +130 -0
- package/src/services/DisplayProcessor.ts +775 -0
- package/src/services/ForegroundLocationPermission.ts +24 -0
- package/src/services/GlassesReadiness.ts +103 -0
- package/src/services/GlassesSettingsSync.ts +140 -0
- package/src/services/GlassesStatusProjection.ts +73 -0
- package/src/services/HeadingService.ts +122 -0
- package/src/services/HotspotOtaTransport.ts +184 -0
- package/src/services/HotspotShutdown.ts +41 -0
- package/src/services/JSCrashController.ts +189 -0
- package/src/services/JSCrashloopReportService.ts +66 -0
- package/src/services/JSLogPipeline.ts +166 -0
- package/src/services/JSRouter.ts +555 -0
- package/src/services/LocalDisplayManager.ts +815 -0
- package/src/services/LocalMiniappDataMigration.ts +102 -0
- package/src/services/LocalMiniappRuntime.ts +5747 -0
- package/src/services/LocalMiniappStorage.ts +82 -0
- package/src/services/LocalMiniappUserIdentity.ts +79 -0
- package/src/services/LocalSttFallbackCoordinator.ts +247 -0
- package/src/services/MapboxTokenService.ts +118 -0
- package/src/services/MemoryCapture.ts +61 -0
- package/src/services/MemoryStore.ts +633 -0
- package/src/services/MicStateCoordinator.ts +259 -0
- package/src/services/MiniappEngine.ts +143 -0
- package/src/services/MiniappLauncher.ts +365 -0
- package/src/services/MiniappLiveness.ts +24 -0
- package/src/services/MiniappRunningRegistry.ts +57 -0
- package/src/services/NativeHttpResponse.ts +6 -0
- package/src/services/NativeNavigationService.ts +176 -0
- package/src/services/NavigationHandlers.ts +527 -0
- package/src/services/NavigationService.ts +926 -0
- package/src/services/NotificationsEmitter.ts +49 -0
- package/src/services/OfflineSpeechModelService.ts +168 -0
- package/src/services/OtaArtifactDownloader.ts +312 -0
- package/src/services/OtaInstallCoordinator.ts +1707 -0
- package/src/services/OtaService.ts +89 -0
- package/src/services/OtaUpdateCheckService.ts +550 -0
- package/src/services/PairingIdentity.ts +154 -0
- package/src/services/PhoneCalendarHelpers.ts +212 -0
- package/src/services/PhoneCalendarService.ts +61 -0
- package/src/services/PhoneCameraFovCoordinator.ts +210 -0
- package/src/services/PhoneLocationService.ts +120 -0
- package/src/services/PhoneNotificationsSync.ts +46 -0
- package/src/services/PhonePhotoCoordinator.ts +435 -0
- package/src/services/PhoneStreamCoordinator.ts +874 -0
- package/src/services/PhoneVideoCoordinator.ts +203 -0
- package/src/services/ProviderKeyValidation.ts +57 -0
- package/src/services/STTModelManager.ts +434 -0
- package/src/services/SceneRenderer.ts +320 -0
- package/src/services/SentenceTtsPipeline.ts +106 -0
- package/src/services/SpeakerIdModelManager.ts +151 -0
- package/src/services/SpeakerIdSync.ts +79 -0
- package/src/services/SpeakerLabelResolver.ts +140 -0
- package/src/services/SpeakerProfileStore.ts +265 -0
- package/src/services/SpeakerSegmentResolver.ts +194 -0
- package/src/services/StreamLifecycleController.ts +203 -0
- package/src/services/SupportProfileSync.ts +218 -0
- package/src/services/TTSModelManager.ts +466 -0
- package/src/services/TranscriptionRouting.ts +47 -0
- package/src/services/TtsTextSanitizer.ts +66 -0
- package/src/services/UIRouter.ts +250 -0
- package/src/services/WebviewBridge.ts +50 -0
- package/src/services/WifiAdbRequest.ts +53 -0
- package/src/services/asg/GalleryMediaIntegrityReportService.ts +72 -0
- package/src/services/asg/asgCameraApi.ts +1786 -0
- package/src/services/asg/cameraRollExportCoordinator.ts +627 -0
- package/src/services/asg/cameraRollExportLedger.ts +122 -0
- package/src/services/asg/galleryMediaValidation.ts +185 -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 +235 -0
- package/src/services/asg/gallerySyncService.ts +2278 -0
- package/src/services/asg/galleryTransferLedger.ts +312 -0
- package/src/services/asg/localNetworkTransport.ts +169 -0
- package/src/services/asg/localStorageService.ts +652 -0
- package/src/services/asg/mediaProcessingQueue.ts +518 -0
- package/src/services/audioPlaybackAssets.ts +8 -0
- package/src/services/blobPaths.ts +86 -0
- package/src/services/cloudStreamApi.ts +142 -0
- package/src/services/effectiveCapabilities.ts +27 -0
- package/src/services/gallerySyncClock.ts +39 -0
- package/src/services/glassesClockSync.ts +115 -0
- package/src/services/manifestActions.ts +80 -0
- package/src/services/manifestVersionGate.ts +43 -0
- package/src/services/memoryStoreInstance.ts +70 -0
- package/src/services/navigation/roadNameResolver.ts +103 -0
- package/src/services/navigation/routesApiCodec.ts +69 -0
- package/src/services/otaDisplayState.ts +156 -0
- package/src/services/otaInstallPolicy.ts +132 -0
- package/src/services/otaLegacyMapping.ts +71 -0
- package/src/services/otaManifestUrl.ts +53 -0
- package/src/services/slimStreamStatus.ts +39 -0
- package/src/services/soniox/SonioxDirectService.ts +517 -0
- package/src/services/soniox/SonioxRealtimeClient.ts +349 -0
- package/src/services/soniox/SonioxTokenAssembler.ts +451 -0
- package/src/services/speakerProfileStoreInstance.ts +25 -0
- package/src/services/uiShim.ts +375 -0
- package/src/stores/apps.ts +626 -0
- package/src/stores/bluetoothSettingKeys.ts +35 -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 +384 -0
- package/src/stores/glasses.ts +314 -0
- package/src/stores/settings.ts +1299 -0
- package/src/stores/transcriptionDebug.ts +0 -0
- package/src/types/applet.ts +121 -0
- package/src/types/asg.ts +58 -0
- package/src/types/capabilities/even-realities-g1.ts +70 -0
- package/src/types/capabilities/even-realities-g2.ts +98 -0
- package/src/types/capabilities/mentra-display.ts +78 -0
- package/src/types/capabilities/mentra-live.ts +106 -0
- package/src/types/capabilities/nimo.ts +84 -0
- package/src/types/capabilities/none.ts +79 -0
- package/src/types/capabilities/simulated-glasses.ts +95 -0
- package/src/types/capabilities/vuzix-z100.ts +67 -0
- package/src/types/enums.ts +27 -0
- package/src/types/hardware.ts +220 -0
- package/src/types/index.ts +38 -0
- package/src/utils/GlobalEventEmitter.ts +15 -0
- package/src/utils/cloudClient/RnUdpAdapter.ts +47 -0
- package/src/utils/cloudClient/cloudSecureStore.ts +28 -0
- package/src/utils/configuredDevHost.ts +17 -0
- package/src/utils/debouncedPatch.ts +28 -0
- package/src/utils/devLogging.ts +140 -0
- package/src/utils/devMiniappLaunch.ts +196 -0
- package/src/utils/diagnosticContext.ts +159 -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 +409 -0
- package/src/utils/display/helpers/ScrollView.ts +326 -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/anchor.ts +39 -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 +24 -0
- package/src/utils/display/scene/process.ts +228 -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 +171 -0
- package/src/utils/hardware/index.ts +1 -0
- package/src/utils/memory/search.ts +204 -0
- package/src/utils/miniappDiagnostics.ts +226 -0
- package/src/utils/miniappGlobals.ts +259 -0
- package/src/utils/permissions/MediaLibraryPermissions.ts +161 -0
- package/src/utils/permissions/galleryDisplayName.ts +28 -0
- package/src/utils/speakerEmbedding.ts +58 -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 +175 -0
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* UIRouter — bidirectional bus between a per-miniapp UI WebView
|
|
3
|
+
* and its bound background JSContext.
|
|
4
|
+
*
|
|
5
|
+
* The flow:
|
|
6
|
+
*
|
|
7
|
+
* WebView (glassly.send/on) Background (session.ui.send/on)
|
|
8
|
+
* │ │
|
|
9
|
+
* │ window.ReactNativeWebView │
|
|
10
|
+
* │ .postMessage(jsonEnvelope) │ session.sendOneShot({
|
|
11
|
+
* │ │ type: "UI_SEND", channel, payload, seq
|
|
12
|
+
* │ │ })
|
|
13
|
+
* │ │
|
|
14
|
+
* ▼ ▼
|
|
15
|
+
* MiniappHost.onMessage JSRouter (recognises payload.type==="UI_SEND")
|
|
16
|
+
* │ │
|
|
17
|
+
* ▼ ▼
|
|
18
|
+
* ──── UIRouter.routeFromWebView ──── UIRouter.routeFromBackground
|
|
19
|
+
* ──► Crust.jsDispatchToJs ──► webView.injectJavaScript("window.__glassly.recv(...)")
|
|
20
|
+
* {kind:"bridge", raw: JSON({
|
|
21
|
+
* payload:{
|
|
22
|
+
* type:"EVENT", streamType:"_ui",
|
|
23
|
+
* data:{type:"UI_MESSAGE", channel, payload, seq}
|
|
24
|
+
* }})}
|
|
25
|
+
*
|
|
26
|
+
* The router is a singleton — one instance for the whole host process —
|
|
27
|
+
* because only one WebView is allowed open at a time per spec. The
|
|
28
|
+
* binding map is therefore N entries (one per "currently has a UI
|
|
29
|
+
* WebView mounted" miniapp), but in practice it's 0 or 1.
|
|
30
|
+
*
|
|
31
|
+
* UI_OPEN / UI_CLOSE lifecycle envelopes are pushed by the WebView's
|
|
32
|
+
* `glassly.ready()` and the host's WebView teardown handler; the router
|
|
33
|
+
* forwards them to background via the same EVENT/_ui envelope shape.
|
|
34
|
+
*/
|
|
35
|
+
interface UIInjectFn {
|
|
36
|
+
(jsSource: string): void;
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* Subset of the Crust native module that UIRouter touches.
|
|
40
|
+
* Loose binding keeps tests free of Expo imports.
|
|
41
|
+
*/
|
|
42
|
+
export interface UICrustBinding {
|
|
43
|
+
jsDispatchToJs(packageName: string, envelope: Record<string, unknown>): Promise<void> | void;
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* NOTE: the WebView ↔ host heartbeat was removed when the lifecycle
|
|
47
|
+
* inversion landed. The current model is **at most one WebView at a
|
|
48
|
+
* time, foreground UI with an always-on background JSContext** (same
|
|
49
|
+
* shape as the cloud-WebView miniapps). User navigation closes it
|
|
50
|
+
* explicitly and `onContentProcessDidTerminate` catches OS-level
|
|
51
|
+
* crashes, but the host may still re-announce UI_OPEN for an already
|
|
52
|
+
* mounted WebView after app resume/dev respawn so the background can
|
|
53
|
+
* push a fresh authoritative snapshot.
|
|
54
|
+
*/
|
|
55
|
+
export declare class UIRouter {
|
|
56
|
+
private readonly bindings;
|
|
57
|
+
private readonly crust;
|
|
58
|
+
constructor(crust: UICrustBinding);
|
|
59
|
+
/**
|
|
60
|
+
* Called when a UI WebView mounts. `injectFn` wraps
|
|
61
|
+
* `webView.injectJavaScript` — the router calls it with prebuilt
|
|
62
|
+
* `window.__glassly.recv(...)` strings to deliver background-side
|
|
63
|
+
* frames into the WebView's glassly global.
|
|
64
|
+
*
|
|
65
|
+
* The router also pushes a UI_OPEN envelope to the background side
|
|
66
|
+
* once the WebView signals ready (see {@link routeFromWebView}).
|
|
67
|
+
* Calling bindWebView on a packageName that already has a binding
|
|
68
|
+
* replaces the previous one (defensive — should not happen in
|
|
69
|
+
* practice because only one WebView is open at a time).
|
|
70
|
+
*/
|
|
71
|
+
bindWebView(packageName: string, injectFn: UIInjectFn): void;
|
|
72
|
+
/**
|
|
73
|
+
* Called when the WebView unmounts (user navigated away or the host
|
|
74
|
+
* tore it down on heartbeat timeout). Pushes UI_CLOSE to background
|
|
75
|
+
* so handlers can flush state, then drops the binding.
|
|
76
|
+
*/
|
|
77
|
+
unbindWebView(packageName: string): void;
|
|
78
|
+
/** True iff a WebView is currently bound to the named package. */
|
|
79
|
+
isBound(packageName: string): boolean;
|
|
80
|
+
/**
|
|
81
|
+
* Re-announce the already-mounted WebView to the background JSContext.
|
|
82
|
+
* This covers dev background hot-reload, app resume, and thawed WebViews
|
|
83
|
+
* whose injected UI_SEND frames may have been missed while the host was
|
|
84
|
+
* suspended. Re-emitting UI_OPEN flips `ui.bound` back to true if needed
|
|
85
|
+
* and lets background code push a fresh snapshot via session.ui.onOpen.
|
|
86
|
+
*
|
|
87
|
+
* No-op if no WebView is currently bound for the package.
|
|
88
|
+
*/
|
|
89
|
+
notifyReopen(packageName: string): void;
|
|
90
|
+
/**
|
|
91
|
+
* Forward a WebView-originated postMessage envelope to the JSContext.
|
|
92
|
+
* `rawJson` is the raw string from `event.nativeEvent.data` — the
|
|
93
|
+
* caller hasn't parsed it yet so the router controls the wire format
|
|
94
|
+
* end-to-end.
|
|
95
|
+
*
|
|
96
|
+
* Recognised envelope types from the WebView shim:
|
|
97
|
+
* - {type: "ready"} → fire UI_OPEN
|
|
98
|
+
* - {type: "msg", seq, channel, payload} → fire UI_MESSAGE
|
|
99
|
+
* - {type: "heartbeat", seq} → silently ack
|
|
100
|
+
*/
|
|
101
|
+
routeFromWebView(packageName: string, rawJson: string): void;
|
|
102
|
+
/**
|
|
103
|
+
* Called by JSRouter when it sees a `__bridge.send` outbound
|
|
104
|
+
* frame whose parsed payload is a UI_SEND envelope. The router
|
|
105
|
+
* forwards it as a `msg` frame to the bound WebView (or drops if no
|
|
106
|
+
* WebView is currently mounted).
|
|
107
|
+
*
|
|
108
|
+
* `uiSendPayload` is the raw `{type:"UI_SEND", channel, payload, seq}`
|
|
109
|
+
* shape produced by `session.ui.send` on the background side.
|
|
110
|
+
*/
|
|
111
|
+
routeFromBackground(packageName: string, uiSendPayload: {
|
|
112
|
+
type: string;
|
|
113
|
+
channel?: string;
|
|
114
|
+
payload?: unknown;
|
|
115
|
+
seq?: number;
|
|
116
|
+
requestId?: string;
|
|
117
|
+
}): void;
|
|
118
|
+
/**
|
|
119
|
+
* Send a synthetic frame to the WebView. Used for host-initiated
|
|
120
|
+
* lifecycle events (`open`, `close`, `ack`). The wire shape is the
|
|
121
|
+
* same as the WebView shim's recv handler expects.
|
|
122
|
+
*/
|
|
123
|
+
pushLifecycleFrame(packageName: string, frame: {
|
|
124
|
+
type: "open" | "close" | "ack";
|
|
125
|
+
seq?: number;
|
|
126
|
+
}): void;
|
|
127
|
+
/**
|
|
128
|
+
* Wrap an EVENT envelope and push it to background via the bridge.
|
|
129
|
+
* Background's UIModule listens for stream `_ui`. The `type` is the
|
|
130
|
+
* wire value `miniapp_event` — must match `MiniappResponseType.EVENT`
|
|
131
|
+
* exactly, otherwise the SDK's session switch falls through and the
|
|
132
|
+
* `_ui` fan-out never fires (bound stays false; `ui.send` drops).
|
|
133
|
+
*/
|
|
134
|
+
private deliverToBackground;
|
|
135
|
+
}
|
|
136
|
+
export {};
|
|
137
|
+
//# sourceMappingURL=UIRouter.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"UIRouter.d.ts","sourceRoot":"","sources":["../../src/services/UIRouter.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AAEH,UAAU,UAAU;IAClB,CAAC,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAA;CACzB;AAED;;;GAGG;AACH,MAAM,WAAW,cAAc;IAC7B,cAAc,CAAC,WAAW,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,GAAG,IAAI,CAAA;CAC7F;AAMD;;;;;;;;;GASG;AAEH,qBAAa,QAAQ;IACnB,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAuC;IAChE,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAgB;gBAE1B,KAAK,EAAE,cAAc;IAIjC;;;;;;;;;;;OAWG;IACH,WAAW,CAAC,WAAW,EAAE,MAAM,EAAE,QAAQ,EAAE,UAAU,GAAG,IAAI;IAI5D;;;;OAIG;IACH,aAAa,CAAC,WAAW,EAAE,MAAM,GAAG,IAAI;IAMxC,kEAAkE;IAClE,OAAO,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO;IAIrC;;;;;;;;OAQG;IACH,YAAY,CAAC,WAAW,EAAE,MAAM,GAAG,IAAI;IAKvC;;;;;;;;;;OAUG;IACH,gBAAgB,CAAC,WAAW,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,IAAI;IA2C5D;;;;;;;;OAQG;IACH,mBAAmB,CACjB,WAAW,EAAE,MAAM,EACnB,aAAa,EAAE;QACb,IAAI,EAAE,MAAM,CAAA;QACZ,OAAO,CAAC,EAAE,MAAM,CAAA;QAChB,OAAO,CAAC,EAAE,OAAO,CAAA;QACjB,GAAG,CAAC,EAAE,MAAM,CAAA;QACZ,SAAS,CAAC,EAAE,MAAM,CAAA;KACnB,GACA,IAAI;IA0BP;;;;OAIG;IACH,kBAAkB,CAAC,WAAW,EAAE,MAAM,EAAE,KAAK,EAAE;QAAC,IAAI,EAAE,MAAM,GAAG,OAAO,GAAG,KAAK,CAAC;QAAC,GAAG,CAAC,EAAE,MAAM,CAAA;KAAC,GAAG,IAAI;IAUpG;;;;;;OAMG;IACH,OAAO,CAAC,mBAAmB;CAa5B"}
|
|
@@ -0,0 +1,210 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* UIRouter — bidirectional bus between a per-miniapp UI WebView
|
|
3
|
+
* and its bound background JSContext.
|
|
4
|
+
*
|
|
5
|
+
* The flow:
|
|
6
|
+
*
|
|
7
|
+
* WebView (glassly.send/on) Background (session.ui.send/on)
|
|
8
|
+
* │ │
|
|
9
|
+
* │ window.ReactNativeWebView │
|
|
10
|
+
* │ .postMessage(jsonEnvelope) │ session.sendOneShot({
|
|
11
|
+
* │ │ type: "UI_SEND", channel, payload, seq
|
|
12
|
+
* │ │ })
|
|
13
|
+
* │ │
|
|
14
|
+
* ▼ ▼
|
|
15
|
+
* MiniappHost.onMessage JSRouter (recognises payload.type==="UI_SEND")
|
|
16
|
+
* │ │
|
|
17
|
+
* ▼ ▼
|
|
18
|
+
* ──── UIRouter.routeFromWebView ──── UIRouter.routeFromBackground
|
|
19
|
+
* ──► Crust.jsDispatchToJs ──► webView.injectJavaScript("window.__glassly.recv(...)")
|
|
20
|
+
* {kind:"bridge", raw: JSON({
|
|
21
|
+
* payload:{
|
|
22
|
+
* type:"EVENT", streamType:"_ui",
|
|
23
|
+
* data:{type:"UI_MESSAGE", channel, payload, seq}
|
|
24
|
+
* }})}
|
|
25
|
+
*
|
|
26
|
+
* The router is a singleton — one instance for the whole host process —
|
|
27
|
+
* because only one WebView is allowed open at a time per spec. The
|
|
28
|
+
* binding map is therefore N entries (one per "currently has a UI
|
|
29
|
+
* WebView mounted" miniapp), but in practice it's 0 or 1.
|
|
30
|
+
*
|
|
31
|
+
* UI_OPEN / UI_CLOSE lifecycle envelopes are pushed by the WebView's
|
|
32
|
+
* `glassly.ready()` and the host's WebView teardown handler; the router
|
|
33
|
+
* forwards them to background via the same EVENT/_ui envelope shape.
|
|
34
|
+
*/
|
|
35
|
+
/**
|
|
36
|
+
* NOTE: the WebView ↔ host heartbeat was removed when the lifecycle
|
|
37
|
+
* inversion landed. The current model is **at most one WebView at a
|
|
38
|
+
* time, foreground UI with an always-on background JSContext** (same
|
|
39
|
+
* shape as the cloud-WebView miniapps). User navigation closes it
|
|
40
|
+
* explicitly and `onContentProcessDidTerminate` catches OS-level
|
|
41
|
+
* crashes, but the host may still re-announce UI_OPEN for an already
|
|
42
|
+
* mounted WebView after app resume/dev respawn so the background can
|
|
43
|
+
* push a fresh authoritative snapshot.
|
|
44
|
+
*/
|
|
45
|
+
export class UIRouter {
|
|
46
|
+
bindings = new Map();
|
|
47
|
+
crust;
|
|
48
|
+
constructor(crust) {
|
|
49
|
+
this.crust = crust;
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* Called when a UI WebView mounts. `injectFn` wraps
|
|
53
|
+
* `webView.injectJavaScript` — the router calls it with prebuilt
|
|
54
|
+
* `window.__glassly.recv(...)` strings to deliver background-side
|
|
55
|
+
* frames into the WebView's glassly global.
|
|
56
|
+
*
|
|
57
|
+
* The router also pushes a UI_OPEN envelope to the background side
|
|
58
|
+
* once the WebView signals ready (see {@link routeFromWebView}).
|
|
59
|
+
* Calling bindWebView on a packageName that already has a binding
|
|
60
|
+
* replaces the previous one (defensive — should not happen in
|
|
61
|
+
* practice because only one WebView is open at a time).
|
|
62
|
+
*/
|
|
63
|
+
bindWebView(packageName, injectFn) {
|
|
64
|
+
this.bindings.set(packageName, { inject: injectFn });
|
|
65
|
+
}
|
|
66
|
+
/**
|
|
67
|
+
* Called when the WebView unmounts (user navigated away or the host
|
|
68
|
+
* tore it down on heartbeat timeout). Pushes UI_CLOSE to background
|
|
69
|
+
* so handlers can flush state, then drops the binding.
|
|
70
|
+
*/
|
|
71
|
+
unbindWebView(packageName) {
|
|
72
|
+
if (!this.bindings.has(packageName))
|
|
73
|
+
return;
|
|
74
|
+
this.bindings.delete(packageName);
|
|
75
|
+
this.deliverToBackground(packageName, { type: "UI_CLOSE" });
|
|
76
|
+
}
|
|
77
|
+
/** True iff a WebView is currently bound to the named package. */
|
|
78
|
+
isBound(packageName) {
|
|
79
|
+
return this.bindings.has(packageName);
|
|
80
|
+
}
|
|
81
|
+
/**
|
|
82
|
+
* Re-announce the already-mounted WebView to the background JSContext.
|
|
83
|
+
* This covers dev background hot-reload, app resume, and thawed WebViews
|
|
84
|
+
* whose injected UI_SEND frames may have been missed while the host was
|
|
85
|
+
* suspended. Re-emitting UI_OPEN flips `ui.bound` back to true if needed
|
|
86
|
+
* and lets background code push a fresh snapshot via session.ui.onOpen.
|
|
87
|
+
*
|
|
88
|
+
* No-op if no WebView is currently bound for the package.
|
|
89
|
+
*/
|
|
90
|
+
notifyReopen(packageName) {
|
|
91
|
+
if (!this.bindings.has(packageName))
|
|
92
|
+
return;
|
|
93
|
+
this.deliverToBackground(packageName, { type: "UI_OPEN" });
|
|
94
|
+
}
|
|
95
|
+
/**
|
|
96
|
+
* Forward a WebView-originated postMessage envelope to the JSContext.
|
|
97
|
+
* `rawJson` is the raw string from `event.nativeEvent.data` — the
|
|
98
|
+
* caller hasn't parsed it yet so the router controls the wire format
|
|
99
|
+
* end-to-end.
|
|
100
|
+
*
|
|
101
|
+
* Recognised envelope types from the WebView shim:
|
|
102
|
+
* - {type: "ready"} → fire UI_OPEN
|
|
103
|
+
* - {type: "msg", seq, channel, payload} → fire UI_MESSAGE
|
|
104
|
+
* - {type: "heartbeat", seq} → silently ack
|
|
105
|
+
*/
|
|
106
|
+
routeFromWebView(packageName, rawJson) {
|
|
107
|
+
let env;
|
|
108
|
+
try {
|
|
109
|
+
env = JSON.parse(rawJson);
|
|
110
|
+
}
|
|
111
|
+
catch {
|
|
112
|
+
return;
|
|
113
|
+
}
|
|
114
|
+
if (typeof env.type !== "string")
|
|
115
|
+
return;
|
|
116
|
+
if (env.type === "ready") {
|
|
117
|
+
this.deliverToBackground(packageName, { type: "UI_OPEN" });
|
|
118
|
+
return;
|
|
119
|
+
}
|
|
120
|
+
if (env.type === "msg" && typeof env.channel === "string") {
|
|
121
|
+
const out = {
|
|
122
|
+
type: "UI_MESSAGE",
|
|
123
|
+
channel: env.channel,
|
|
124
|
+
payload: env.payload,
|
|
125
|
+
seq: env.seq,
|
|
126
|
+
};
|
|
127
|
+
if (typeof env.requestId === "string")
|
|
128
|
+
out.requestId = env.requestId;
|
|
129
|
+
this.deliverToBackground(packageName, out);
|
|
130
|
+
return;
|
|
131
|
+
}
|
|
132
|
+
if (env.type === "cancel" && typeof env.requestId === "string") {
|
|
133
|
+
this.deliverToBackground(packageName, { type: "UI_CANCEL", requestId: env.requestId });
|
|
134
|
+
return;
|
|
135
|
+
}
|
|
136
|
+
// NOTE: console.* logs do NOT come through this router. The
|
|
137
|
+
// miniappGlobals console-tap shim posts {payload:{type:"dev_log"}}
|
|
138
|
+
// envelopes which LocalMiniappRuntime handles and forwards to the
|
|
139
|
+
// dev sidecar tagged source:"ui". Keeping that path one-way means
|
|
140
|
+
// we don't have two console-capture pipelines competing.
|
|
141
|
+
//
|
|
142
|
+
// Unknown envelope — drop silently.
|
|
143
|
+
}
|
|
144
|
+
/**
|
|
145
|
+
* Called by JSRouter when it sees a `__bridge.send` outbound
|
|
146
|
+
* frame whose parsed payload is a UI_SEND envelope. The router
|
|
147
|
+
* forwards it as a `msg` frame to the bound WebView (or drops if no
|
|
148
|
+
* WebView is currently mounted).
|
|
149
|
+
*
|
|
150
|
+
* `uiSendPayload` is the raw `{type:"UI_SEND", channel, payload, seq}`
|
|
151
|
+
* shape produced by `session.ui.send` on the background side.
|
|
152
|
+
*/
|
|
153
|
+
routeFromBackground(packageName, uiSendPayload) {
|
|
154
|
+
const binding = this.bindings.get(packageName);
|
|
155
|
+
if (!binding)
|
|
156
|
+
return;
|
|
157
|
+
if (uiSendPayload.type === "UI_CANCEL" && typeof uiSendPayload.requestId === "string") {
|
|
158
|
+
const cancel = { type: "cancel", requestId: uiSendPayload.requestId };
|
|
159
|
+
const literal = JSON.stringify(cancel);
|
|
160
|
+
const escaped = JSON.stringify(literal);
|
|
161
|
+
binding.inject(`if (window.__glassly && window.__glassly.recv) window.__glassly.recv(JSON.parse(${escaped})); true;`);
|
|
162
|
+
return;
|
|
163
|
+
}
|
|
164
|
+
const outbound = {
|
|
165
|
+
type: "msg",
|
|
166
|
+
seq: uiSendPayload.seq ?? 0,
|
|
167
|
+
channel: uiSendPayload.channel,
|
|
168
|
+
payload: uiSendPayload.payload,
|
|
169
|
+
};
|
|
170
|
+
if (typeof uiSendPayload.requestId === "string")
|
|
171
|
+
outbound.requestId = uiSendPayload.requestId;
|
|
172
|
+
const literal = JSON.stringify(outbound);
|
|
173
|
+
const escaped = JSON.stringify(literal);
|
|
174
|
+
binding.inject(`if (window.__glassly && window.__glassly.recv) window.__glassly.recv(JSON.parse(${escaped})); true;`);
|
|
175
|
+
}
|
|
176
|
+
/**
|
|
177
|
+
* Send a synthetic frame to the WebView. Used for host-initiated
|
|
178
|
+
* lifecycle events (`open`, `close`, `ack`). The wire shape is the
|
|
179
|
+
* same as the WebView shim's recv handler expects.
|
|
180
|
+
*/
|
|
181
|
+
pushLifecycleFrame(packageName, frame) {
|
|
182
|
+
const binding = this.bindings.get(packageName);
|
|
183
|
+
if (!binding)
|
|
184
|
+
return;
|
|
185
|
+
const literal = JSON.stringify(frame);
|
|
186
|
+
const escaped = JSON.stringify(literal);
|
|
187
|
+
binding.inject(`if (window.__glassly && window.__glassly.recv) window.__glassly.recv(JSON.parse(${escaped})); true;`);
|
|
188
|
+
}
|
|
189
|
+
/**
|
|
190
|
+
* Wrap an EVENT envelope and push it to background via the bridge.
|
|
191
|
+
* Background's UIModule listens for stream `_ui`. The `type` is the
|
|
192
|
+
* wire value `miniapp_event` — must match `MiniappResponseType.EVENT`
|
|
193
|
+
* exactly, otherwise the SDK's session switch falls through and the
|
|
194
|
+
* `_ui` fan-out never fires (bound stays false; `ui.send` drops).
|
|
195
|
+
*/
|
|
196
|
+
deliverToBackground(packageName, data) {
|
|
197
|
+
const innerEnvelope = {
|
|
198
|
+
payload: {
|
|
199
|
+
type: "miniapp_event",
|
|
200
|
+
streamType: "_ui",
|
|
201
|
+
data,
|
|
202
|
+
},
|
|
203
|
+
};
|
|
204
|
+
void this.crust.jsDispatchToJs(packageName, {
|
|
205
|
+
kind: "bridge",
|
|
206
|
+
raw: JSON.stringify(innerEnvelope),
|
|
207
|
+
});
|
|
208
|
+
}
|
|
209
|
+
}
|
|
210
|
+
//# sourceMappingURL=UIRouter.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"UIRouter.js","sourceRoot":"","sources":["../../src/services/UIRouter.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AAkBH;;;;;;;;;GASG;AAEH,MAAM,OAAO,QAAQ;IACF,QAAQ,GAA8B,IAAI,GAAG,EAAE,CAAA;IAC/C,KAAK,CAAgB;IAEtC,YAAY,KAAqB;QAC/B,IAAI,CAAC,KAAK,GAAG,KAAK,CAAA;IACpB,CAAC;IAED;;;;;;;;;;;OAWG;IACH,WAAW,CAAC,WAAmB,EAAE,QAAoB;QACnD,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,WAAW,EAAE,EAAC,MAAM,EAAE,QAAQ,EAAC,CAAC,CAAA;IACpD,CAAC;IAED;;;;OAIG;IACH,aAAa,CAAC,WAAmB;QAC/B,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,WAAW,CAAC;YAAE,OAAM;QAC3C,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,WAAW,CAAC,CAAA;QACjC,IAAI,CAAC,mBAAmB,CAAC,WAAW,EAAE,EAAC,IAAI,EAAE,UAAU,EAAC,CAAC,CAAA;IAC3D,CAAC;IAED,kEAAkE;IAClE,OAAO,CAAC,WAAmB;QACzB,OAAO,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,WAAW,CAAC,CAAA;IACvC,CAAC;IAED;;;;;;;;OAQG;IACH,YAAY,CAAC,WAAmB;QAC9B,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,WAAW,CAAC;YAAE,OAAM;QAC3C,IAAI,CAAC,mBAAmB,CAAC,WAAW,EAAE,EAAC,IAAI,EAAE,SAAS,EAAC,CAAC,CAAA;IAC1D,CAAC;IAED;;;;;;;;;;OAUG;IACH,gBAAgB,CAAC,WAAmB,EAAE,OAAe;QACnD,IAAI,GAMH,CAAA;QACD,IAAI,CAAC;YACH,GAAG,GAAG,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,CAAA;QAC3B,CAAC;QAAC,MAAM,CAAC;YACP,OAAM;QACR,CAAC;QACD,IAAI,OAAO,GAAG,CAAC,IAAI,KAAK,QAAQ;YAAE,OAAM;QAExC,IAAI,GAAG,CAAC,IAAI,KAAK,OAAO,EAAE,CAAC;YACzB,IAAI,CAAC,mBAAmB,CAAC,WAAW,EAAE,EAAC,IAAI,EAAE,SAAS,EAAC,CAAC,CAAA;YACxD,OAAM;QACR,CAAC;QACD,IAAI,GAAG,CAAC,IAAI,KAAK,KAAK,IAAI,OAAO,GAAG,CAAC,OAAO,KAAK,QAAQ,EAAE,CAAC;YAC1D,MAAM,GAAG,GAA4B;gBACnC,IAAI,EAAE,YAAY;gBAClB,OAAO,EAAE,GAAG,CAAC,OAAO;gBACpB,OAAO,EAAE,GAAG,CAAC,OAAO;gBACpB,GAAG,EAAE,GAAG,CAAC,GAAG;aACb,CAAA;YACD,IAAI,OAAO,GAAG,CAAC,SAAS,KAAK,QAAQ;gBAAE,GAAG,CAAC,SAAS,GAAG,GAAG,CAAC,SAAS,CAAA;YACpE,IAAI,CAAC,mBAAmB,CAAC,WAAW,EAAE,GAAG,CAAC,CAAA;YAC1C,OAAM;QACR,CAAC;QACD,IAAI,GAAG,CAAC,IAAI,KAAK,QAAQ,IAAI,OAAO,GAAG,CAAC,SAAS,KAAK,QAAQ,EAAE,CAAC;YAC/D,IAAI,CAAC,mBAAmB,CAAC,WAAW,EAAE,EAAC,IAAI,EAAE,WAAW,EAAE,SAAS,EAAE,GAAG,CAAC,SAAS,EAAC,CAAC,CAAA;YACpF,OAAM;QACR,CAAC;QACD,4DAA4D;QAC5D,mEAAmE;QACnE,kEAAkE;QAClE,kEAAkE;QAClE,yDAAyD;QACzD,EAAE;QACF,oCAAoC;IACtC,CAAC;IAED;;;;;;;;OAQG;IACH,mBAAmB,CACjB,WAAmB,EACnB,aAMC;QAED,MAAM,OAAO,GAAG,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,WAAW,CAAC,CAAA;QAC9C,IAAI,CAAC,OAAO;YAAE,OAAM;QACpB,IAAI,aAAa,CAAC,IAAI,KAAK,WAAW,IAAI,OAAO,aAAa,CAAC,SAAS,KAAK,QAAQ,EAAE,CAAC;YACtF,MAAM,MAAM,GAAG,EAAC,IAAI,EAAE,QAAQ,EAAE,SAAS,EAAE,aAAa,CAAC,SAAS,EAAC,CAAA;YACnE,MAAM,OAAO,GAAG,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,CAAA;YACtC,MAAM,OAAO,GAAG,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,CAAA;YACvC,OAAO,CAAC,MAAM,CACZ,mFAAmF,OAAO,WAAW,CACtG,CAAA;YACD,OAAM;QACR,CAAC;QACD,MAAM,QAAQ,GAA4B;YACxC,IAAI,EAAE,KAAK;YACX,GAAG,EAAE,aAAa,CAAC,GAAG,IAAI,CAAC;YAC3B,OAAO,EAAE,aAAa,CAAC,OAAO;YAC9B,OAAO,EAAE,aAAa,CAAC,OAAO;SAC/B,CAAA;QACD,IAAI,OAAO,aAAa,CAAC,SAAS,KAAK,QAAQ;YAAE,QAAQ,CAAC,SAAS,GAAG,aAAa,CAAC,SAAS,CAAA;QAC7F,MAAM,OAAO,GAAG,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC,CAAA;QACxC,MAAM,OAAO,GAAG,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,CAAA;QACvC,OAAO,CAAC,MAAM,CACZ,mFAAmF,OAAO,WAAW,CACtG,CAAA;IACH,CAAC;IAED;;;;OAIG;IACH,kBAAkB,CAAC,WAAmB,EAAE,KAAqD;QAC3F,MAAM,OAAO,GAAG,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,WAAW,CAAC,CAAA;QAC9C,IAAI,CAAC,OAAO;YAAE,OAAM;QACpB,MAAM,OAAO,GAAG,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,CAAA;QACrC,MAAM,OAAO,GAAG,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,CAAA;QACvC,OAAO,CAAC,MAAM,CACZ,mFAAmF,OAAO,WAAW,CACtG,CAAA;IACH,CAAC;IAED;;;;;;OAMG;IACK,mBAAmB,CAAC,WAAmB,EAAE,IAA6B;QAC5E,MAAM,aAAa,GAAG;YACpB,OAAO,EAAE;gBACP,IAAI,EAAE,eAAe;gBACrB,UAAU,EAAE,KAAK;gBACjB,IAAI;aACL;SACF,CAAA;QACD,KAAK,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,WAAW,EAAE;YAC1C,IAAI,EAAE,QAAQ;YACd,GAAG,EAAE,IAAI,CAAC,SAAS,CAAC,aAAa,CAAC;SACnC,CAAC,CAAA;IACJ,CAAC;CACF","sourcesContent":["/**\n * UIRouter — bidirectional bus between a per-miniapp UI WebView\n * and its bound background JSContext.\n *\n * The flow:\n *\n * WebView (glassly.send/on) Background (session.ui.send/on)\n * │ │\n * │ window.ReactNativeWebView │\n * │ .postMessage(jsonEnvelope) │ session.sendOneShot({\n * │ │ type: \"UI_SEND\", channel, payload, seq\n * │ │ })\n * │ │\n * ▼ ▼\n * MiniappHost.onMessage JSRouter (recognises payload.type===\"UI_SEND\")\n * │ │\n * ▼ ▼\n * ──── UIRouter.routeFromWebView ──── UIRouter.routeFromBackground\n * ──► Crust.jsDispatchToJs ──► webView.injectJavaScript(\"window.__glassly.recv(...)\")\n * {kind:\"bridge\", raw: JSON({\n * payload:{\n * type:\"EVENT\", streamType:\"_ui\",\n * data:{type:\"UI_MESSAGE\", channel, payload, seq}\n * }})}\n *\n * The router is a singleton — one instance for the whole host process —\n * because only one WebView is allowed open at a time per spec. The\n * binding map is therefore N entries (one per \"currently has a UI\n * WebView mounted\" miniapp), but in practice it's 0 or 1.\n *\n * UI_OPEN / UI_CLOSE lifecycle envelopes are pushed by the WebView's\n * `glassly.ready()` and the host's WebView teardown handler; the router\n * forwards them to background via the same EVENT/_ui envelope shape.\n */\n\ninterface UIInjectFn {\n (jsSource: string): void\n}\n\n/**\n * Subset of the Crust native module that UIRouter touches.\n * Loose binding keeps tests free of Expo imports.\n */\nexport interface UICrustBinding {\n jsDispatchToJs(packageName: string, envelope: Record<string, unknown>): Promise<void> | void\n}\n\ninterface BoundWebView {\n inject: UIInjectFn\n}\n\n/**\n * NOTE: the WebView ↔ host heartbeat was removed when the lifecycle\n * inversion landed. The current model is **at most one WebView at a\n * time, foreground UI with an always-on background JSContext** (same\n * shape as the cloud-WebView miniapps). User navigation closes it\n * explicitly and `onContentProcessDidTerminate` catches OS-level\n * crashes, but the host may still re-announce UI_OPEN for an already\n * mounted WebView after app resume/dev respawn so the background can\n * push a fresh authoritative snapshot.\n */\n\nexport class UIRouter {\n private readonly bindings: Map<string, BoundWebView> = new Map()\n private readonly crust: UICrustBinding\n\n constructor(crust: UICrustBinding) {\n this.crust = crust\n }\n\n /**\n * Called when a UI WebView mounts. `injectFn` wraps\n * `webView.injectJavaScript` — the router calls it with prebuilt\n * `window.__glassly.recv(...)` strings to deliver background-side\n * frames into the WebView's glassly global.\n *\n * The router also pushes a UI_OPEN envelope to the background side\n * once the WebView signals ready (see {@link routeFromWebView}).\n * Calling bindWebView on a packageName that already has a binding\n * replaces the previous one (defensive — should not happen in\n * practice because only one WebView is open at a time).\n */\n bindWebView(packageName: string, injectFn: UIInjectFn): void {\n this.bindings.set(packageName, {inject: injectFn})\n }\n\n /**\n * Called when the WebView unmounts (user navigated away or the host\n * tore it down on heartbeat timeout). Pushes UI_CLOSE to background\n * so handlers can flush state, then drops the binding.\n */\n unbindWebView(packageName: string): void {\n if (!this.bindings.has(packageName)) return\n this.bindings.delete(packageName)\n this.deliverToBackground(packageName, {type: \"UI_CLOSE\"})\n }\n\n /** True iff a WebView is currently bound to the named package. */\n isBound(packageName: string): boolean {\n return this.bindings.has(packageName)\n }\n\n /**\n * Re-announce the already-mounted WebView to the background JSContext.\n * This covers dev background hot-reload, app resume, and thawed WebViews\n * whose injected UI_SEND frames may have been missed while the host was\n * suspended. Re-emitting UI_OPEN flips `ui.bound` back to true if needed\n * and lets background code push a fresh snapshot via session.ui.onOpen.\n *\n * No-op if no WebView is currently bound for the package.\n */\n notifyReopen(packageName: string): void {\n if (!this.bindings.has(packageName)) return\n this.deliverToBackground(packageName, {type: \"UI_OPEN\"})\n }\n\n /**\n * Forward a WebView-originated postMessage envelope to the JSContext.\n * `rawJson` is the raw string from `event.nativeEvent.data` — the\n * caller hasn't parsed it yet so the router controls the wire format\n * end-to-end.\n *\n * Recognised envelope types from the WebView shim:\n * - {type: \"ready\"} → fire UI_OPEN\n * - {type: \"msg\", seq, channel, payload} → fire UI_MESSAGE\n * - {type: \"heartbeat\", seq} → silently ack\n */\n routeFromWebView(packageName: string, rawJson: string): void {\n let env: {\n type?: string\n seq?: number\n channel?: string\n payload?: unknown\n requestId?: string\n }\n try {\n env = JSON.parse(rawJson)\n } catch {\n return\n }\n if (typeof env.type !== \"string\") return\n\n if (env.type === \"ready\") {\n this.deliverToBackground(packageName, {type: \"UI_OPEN\"})\n return\n }\n if (env.type === \"msg\" && typeof env.channel === \"string\") {\n const out: Record<string, unknown> = {\n type: \"UI_MESSAGE\",\n channel: env.channel,\n payload: env.payload,\n seq: env.seq,\n }\n if (typeof env.requestId === \"string\") out.requestId = env.requestId\n this.deliverToBackground(packageName, out)\n return\n }\n if (env.type === \"cancel\" && typeof env.requestId === \"string\") {\n this.deliverToBackground(packageName, {type: \"UI_CANCEL\", requestId: env.requestId})\n return\n }\n // NOTE: console.* logs do NOT come through this router. The\n // miniappGlobals console-tap shim posts {payload:{type:\"dev_log\"}}\n // envelopes which LocalMiniappRuntime handles and forwards to the\n // dev sidecar tagged source:\"ui\". Keeping that path one-way means\n // we don't have two console-capture pipelines competing.\n //\n // Unknown envelope — drop silently.\n }\n\n /**\n * Called by JSRouter when it sees a `__bridge.send` outbound\n * frame whose parsed payload is a UI_SEND envelope. The router\n * forwards it as a `msg` frame to the bound WebView (or drops if no\n * WebView is currently mounted).\n *\n * `uiSendPayload` is the raw `{type:\"UI_SEND\", channel, payload, seq}`\n * shape produced by `session.ui.send` on the background side.\n */\n routeFromBackground(\n packageName: string,\n uiSendPayload: {\n type: string\n channel?: string\n payload?: unknown\n seq?: number\n requestId?: string\n },\n ): void {\n const binding = this.bindings.get(packageName)\n if (!binding) return\n if (uiSendPayload.type === \"UI_CANCEL\" && typeof uiSendPayload.requestId === \"string\") {\n const cancel = {type: \"cancel\", requestId: uiSendPayload.requestId}\n const literal = JSON.stringify(cancel)\n const escaped = JSON.stringify(literal)\n binding.inject(\n `if (window.__glassly && window.__glassly.recv) window.__glassly.recv(JSON.parse(${escaped})); true;`,\n )\n return\n }\n const outbound: Record<string, unknown> = {\n type: \"msg\",\n seq: uiSendPayload.seq ?? 0,\n channel: uiSendPayload.channel,\n payload: uiSendPayload.payload,\n }\n if (typeof uiSendPayload.requestId === \"string\") outbound.requestId = uiSendPayload.requestId\n const literal = JSON.stringify(outbound)\n const escaped = JSON.stringify(literal)\n binding.inject(\n `if (window.__glassly && window.__glassly.recv) window.__glassly.recv(JSON.parse(${escaped})); true;`,\n )\n }\n\n /**\n * Send a synthetic frame to the WebView. Used for host-initiated\n * lifecycle events (`open`, `close`, `ack`). The wire shape is the\n * same as the WebView shim's recv handler expects.\n */\n pushLifecycleFrame(packageName: string, frame: {type: \"open\" | \"close\" | \"ack\"; seq?: number}): void {\n const binding = this.bindings.get(packageName)\n if (!binding) return\n const literal = JSON.stringify(frame)\n const escaped = JSON.stringify(literal)\n binding.inject(\n `if (window.__glassly && window.__glassly.recv) window.__glassly.recv(JSON.parse(${escaped})); true;`,\n )\n }\n\n /**\n * Wrap an EVENT envelope and push it to background via the bridge.\n * Background's UIModule listens for stream `_ui`. The `type` is the\n * wire value `miniapp_event` — must match `MiniappResponseType.EVENT`\n * exactly, otherwise the SDK's session switch falls through and the\n * `_ui` fan-out never fires (bound stays false; `ui.send` drops).\n */\n private deliverToBackground(packageName: string, data: Record<string, unknown>): void {\n const innerEnvelope = {\n payload: {\n type: \"miniapp_event\",\n streamType: \"_ui\",\n data,\n },\n }\n void this.crust.jsDispatchToJs(packageName, {\n kind: \"bridge\",\n raw: JSON.stringify(innerEnvelope),\n })\n }\n}\n"]}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* WebviewBridge — WebView message handler registry.
|
|
3
|
+
*
|
|
4
|
+
* Holds per-packageName send functions so that any service (MiniappHost,
|
|
5
|
+
* webview.tsx) can inject JS into a specific WebView. That's it.
|
|
6
|
+
*
|
|
7
|
+
* Local miniapp message routing goes through LocalMiniappRuntime directly
|
|
8
|
+
* (MiniappHost calls localMiniappRuntime.handleRawMessage). WebviewBridge is
|
|
9
|
+
* not in that path.
|
|
10
|
+
*/
|
|
11
|
+
declare class WebviewBridge {
|
|
12
|
+
private static instance;
|
|
13
|
+
private messageHandlers;
|
|
14
|
+
private constructor();
|
|
15
|
+
static getInstance(): WebviewBridge;
|
|
16
|
+
cleanup(): void;
|
|
17
|
+
setWebViewMessageHandler(packageName: string, handler?: (stringified: string) => void): void;
|
|
18
|
+
sendToMiniApp(packageName: string, message: object): void;
|
|
19
|
+
}
|
|
20
|
+
declare const webviewBridge: WebviewBridge;
|
|
21
|
+
export default webviewBridge;
|
|
22
|
+
//# sourceMappingURL=WebviewBridge.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"WebviewBridge.d.ts","sourceRoot":"","sources":["../../src/services/WebviewBridge.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,cAAM,aAAa;IACjB,OAAO,CAAC,MAAM,CAAC,QAAQ,CAA6B;IACpD,OAAO,CAAC,eAAe,CAAoD;IAE3E,OAAO;WAEO,WAAW,IAAI,aAAa;IAOnC,OAAO;IAKP,wBAAwB,CAAC,WAAW,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,CAAC,WAAW,EAAE,MAAM,KAAK,IAAI;IAQrF,aAAa,CAAC,WAAW,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM;CAS1D;AAED,QAAA,MAAM,aAAa,eAA8B,CAAA;AACjD,eAAe,aAAa,CAAA"}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* WebviewBridge — WebView message handler registry.
|
|
3
|
+
*
|
|
4
|
+
* Holds per-packageName send functions so that any service (MiniappHost,
|
|
5
|
+
* webview.tsx) can inject JS into a specific WebView. That's it.
|
|
6
|
+
*
|
|
7
|
+
* Local miniapp message routing goes through LocalMiniappRuntime directly
|
|
8
|
+
* (MiniappHost calls localMiniappRuntime.handleRawMessage). WebviewBridge is
|
|
9
|
+
* not in that path.
|
|
10
|
+
*/
|
|
11
|
+
class WebviewBridge {
|
|
12
|
+
static instance = null;
|
|
13
|
+
messageHandlers = {};
|
|
14
|
+
constructor() { }
|
|
15
|
+
static getInstance() {
|
|
16
|
+
if (!WebviewBridge.instance) {
|
|
17
|
+
WebviewBridge.instance = new WebviewBridge();
|
|
18
|
+
}
|
|
19
|
+
return WebviewBridge.instance;
|
|
20
|
+
}
|
|
21
|
+
cleanup() {
|
|
22
|
+
this.messageHandlers = {};
|
|
23
|
+
WebviewBridge.instance = null;
|
|
24
|
+
}
|
|
25
|
+
setWebViewMessageHandler(packageName, handler) {
|
|
26
|
+
if (handler) {
|
|
27
|
+
this.messageHandlers[packageName] = handler;
|
|
28
|
+
}
|
|
29
|
+
else {
|
|
30
|
+
delete this.messageHandlers[packageName];
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
sendToMiniApp(packageName, message) {
|
|
34
|
+
const handler = this.messageHandlers[packageName];
|
|
35
|
+
if (!handler)
|
|
36
|
+
return;
|
|
37
|
+
try {
|
|
38
|
+
handler(JSON.stringify(message));
|
|
39
|
+
}
|
|
40
|
+
catch (error) {
|
|
41
|
+
console.error(`MINICOM: Error sending to ${packageName}:`, error);
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
const webviewBridge = WebviewBridge.getInstance();
|
|
46
|
+
export default webviewBridge;
|
|
47
|
+
//# sourceMappingURL=WebviewBridge.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"WebviewBridge.js","sourceRoot":"","sources":["../../src/services/WebviewBridge.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,MAAM,aAAa;IACT,MAAM,CAAC,QAAQ,GAAyB,IAAI,CAAA;IAC5C,eAAe,GAAkD,EAAE,CAAA;IAE3E,gBAAuB,CAAC;IAEjB,MAAM,CAAC,WAAW;QACvB,IAAI,CAAC,aAAa,CAAC,QAAQ,EAAE,CAAC;YAC5B,aAAa,CAAC,QAAQ,GAAG,IAAI,aAAa,EAAE,CAAA;QAC9C,CAAC;QACD,OAAO,aAAa,CAAC,QAAQ,CAAA;IAC/B,CAAC;IAEM,OAAO;QACZ,IAAI,CAAC,eAAe,GAAG,EAAE,CAAA;QACzB,aAAa,CAAC,QAAQ,GAAG,IAAI,CAAA;IAC/B,CAAC;IAEM,wBAAwB,CAAC,WAAmB,EAAE,OAAuC;QAC1F,IAAI,OAAO,EAAE,CAAC;YACZ,IAAI,CAAC,eAAe,CAAC,WAAW,CAAC,GAAG,OAAO,CAAA;QAC7C,CAAC;aAAM,CAAC;YACN,OAAO,IAAI,CAAC,eAAe,CAAC,WAAW,CAAC,CAAA;QAC1C,CAAC;IACH,CAAC;IAEM,aAAa,CAAC,WAAmB,EAAE,OAAe;QACvD,MAAM,OAAO,GAAG,IAAI,CAAC,eAAe,CAAC,WAAW,CAAC,CAAA;QACjD,IAAI,CAAC,OAAO;YAAE,OAAM;QACpB,IAAI,CAAC;YACH,OAAO,CAAC,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC,CAAA;QAClC,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,OAAO,CAAC,KAAK,CAAC,6BAA6B,WAAW,GAAG,EAAE,KAAK,CAAC,CAAA;QACnE,CAAC;IACH,CAAC;;AAGH,MAAM,aAAa,GAAG,aAAa,CAAC,WAAW,EAAE,CAAA;AACjD,eAAe,aAAa,CAAA","sourcesContent":["/**\n * WebviewBridge — WebView message handler registry.\n *\n * Holds per-packageName send functions so that any service (MiniappHost,\n * webview.tsx) can inject JS into a specific WebView. That's it.\n *\n * Local miniapp message routing goes through LocalMiniappRuntime directly\n * (MiniappHost calls localMiniappRuntime.handleRawMessage). WebviewBridge is\n * not in that path.\n */\n\nclass WebviewBridge {\n private static instance: WebviewBridge | null = null\n private messageHandlers: Record<string, (stringified: string) => void> = {}\n\n private constructor() {}\n\n public static getInstance(): WebviewBridge {\n if (!WebviewBridge.instance) {\n WebviewBridge.instance = new WebviewBridge()\n }\n return WebviewBridge.instance\n }\n\n public cleanup() {\n this.messageHandlers = {}\n WebviewBridge.instance = null\n }\n\n public setWebViewMessageHandler(packageName: string, handler?: (stringified: string) => void) {\n if (handler) {\n this.messageHandlers[packageName] = handler\n } else {\n delete this.messageHandlers[packageName]\n }\n }\n\n public sendToMiniApp(packageName: string, message: object) {\n const handler = this.messageHandlers[packageName]\n if (!handler) return\n try {\n handler(JSON.stringify(message))\n } catch (error) {\n console.error(`MINICOM: Error sending to ${packageName}:`, error)\n }\n }\n}\n\nconst webviewBridge = WebviewBridge.getInstance()\nexport default webviewBridge\n"]}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export interface WifiAdbRequestDependencies {
|
|
2
|
+
isSystemPackage: (packageName: string) => boolean;
|
|
3
|
+
setWifiAdbState: (enabled: boolean) => Promise<void>;
|
|
4
|
+
}
|
|
5
|
+
export type WifiAdbRequestErrorCode = "NOT_PERMITTED" | "INVALID_ARGUMENT" | "INTERNAL";
|
|
6
|
+
export type WifiAdbRequestResult = {
|
|
7
|
+
ok: true;
|
|
8
|
+
} | {
|
|
9
|
+
ok: false;
|
|
10
|
+
error: {
|
|
11
|
+
code: WifiAdbRequestErrorCode;
|
|
12
|
+
message: string;
|
|
13
|
+
};
|
|
14
|
+
};
|
|
15
|
+
/** Apply the SYSTEM-only Wi-Fi ADB policy before calling the native SDK. */
|
|
16
|
+
export declare function handleWifiAdbRequest(packageName: string, payload: Record<string, unknown>, dependencies: WifiAdbRequestDependencies): Promise<WifiAdbRequestResult>;
|
|
17
|
+
//# sourceMappingURL=WifiAdbRequest.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"WifiAdbRequest.d.ts","sourceRoot":"","sources":["../../src/services/WifiAdbRequest.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,0BAA0B;IACzC,eAAe,EAAE,CAAC,WAAW,EAAE,MAAM,KAAK,OAAO,CAAA;IACjD,eAAe,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,OAAO,CAAC,IAAI,CAAC,CAAA;CACrD;AAED,MAAM,MAAM,uBAAuB,GAAG,eAAe,GAAG,kBAAkB,GAAG,UAAU,CAAA;AAEvF,MAAM,MAAM,oBAAoB,GAC5B;IAAC,EAAE,EAAE,IAAI,CAAA;CAAC,GACV;IACE,EAAE,EAAE,KAAK,CAAA;IACT,KAAK,EAAE;QAAC,IAAI,EAAE,uBAAuB,CAAC;QAAC,OAAO,EAAE,MAAM,CAAA;KAAC,CAAA;CACxD,CAAA;AAEL,4EAA4E;AAC5E,wBAAsB,oBAAoB,CACxC,WAAW,EAAE,MAAM,EACnB,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAChC,YAAY,EAAE,0BAA0B,GACvC,OAAO,CAAC,oBAAoB,CAAC,CAiC/B"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/** Apply the SYSTEM-only Wi-Fi ADB policy before calling the native SDK. */
|
|
2
|
+
export async function handleWifiAdbRequest(packageName, payload, dependencies) {
|
|
3
|
+
if (!dependencies.isSystemPackage(packageName)) {
|
|
4
|
+
return {
|
|
5
|
+
ok: false,
|
|
6
|
+
error: {
|
|
7
|
+
code: "NOT_PERMITTED",
|
|
8
|
+
message: "setWifiAdbState is restricted to system apps",
|
|
9
|
+
},
|
|
10
|
+
};
|
|
11
|
+
}
|
|
12
|
+
if (typeof payload.enabled !== "boolean") {
|
|
13
|
+
return {
|
|
14
|
+
ok: false,
|
|
15
|
+
error: {
|
|
16
|
+
code: "INVALID_ARGUMENT",
|
|
17
|
+
message: "enabled must be a boolean",
|
|
18
|
+
},
|
|
19
|
+
};
|
|
20
|
+
}
|
|
21
|
+
try {
|
|
22
|
+
await dependencies.setWifiAdbState(payload.enabled);
|
|
23
|
+
return { ok: true };
|
|
24
|
+
}
|
|
25
|
+
catch (error) {
|
|
26
|
+
return {
|
|
27
|
+
ok: false,
|
|
28
|
+
error: {
|
|
29
|
+
code: "INTERNAL",
|
|
30
|
+
message: error instanceof Error ? error.message : "Wi-Fi ADB error",
|
|
31
|
+
},
|
|
32
|
+
};
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
//# sourceMappingURL=WifiAdbRequest.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"WifiAdbRequest.js","sourceRoot":"","sources":["../../src/services/WifiAdbRequest.ts"],"names":[],"mappings":"AAcA,4EAA4E;AAC5E,MAAM,CAAC,KAAK,UAAU,oBAAoB,CACxC,WAAmB,EACnB,OAAgC,EAChC,YAAwC;IAExC,IAAI,CAAC,YAAY,CAAC,eAAe,CAAC,WAAW,CAAC,EAAE,CAAC;QAC/C,OAAO;YACL,EAAE,EAAE,KAAK;YACT,KAAK,EAAE;gBACL,IAAI,EAAE,eAAe;gBACrB,OAAO,EAAE,8CAA8C;aACxD;SACF,CAAA;IACH,CAAC;IAED,IAAI,OAAO,OAAO,CAAC,OAAO,KAAK,SAAS,EAAE,CAAC;QACzC,OAAO;YACL,EAAE,EAAE,KAAK;YACT,KAAK,EAAE;gBACL,IAAI,EAAE,kBAAkB;gBACxB,OAAO,EAAE,2BAA2B;aACrC;SACF,CAAA;IACH,CAAC;IAED,IAAI,CAAC;QACH,MAAM,YAAY,CAAC,eAAe,CAAC,OAAO,CAAC,OAAO,CAAC,CAAA;QACnD,OAAO,EAAC,EAAE,EAAE,IAAI,EAAC,CAAA;IACnB,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,OAAO;YACL,EAAE,EAAE,KAAK;YACT,KAAK,EAAE;gBACL,IAAI,EAAE,UAAU;gBAChB,OAAO,EAAE,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,iBAAiB;aACpE;SACF,CAAA;IACH,CAAC;AACH,CAAC","sourcesContent":["export interface WifiAdbRequestDependencies {\n isSystemPackage: (packageName: string) => boolean\n setWifiAdbState: (enabled: boolean) => Promise<void>\n}\n\nexport type WifiAdbRequestErrorCode = \"NOT_PERMITTED\" | \"INVALID_ARGUMENT\" | \"INTERNAL\"\n\nexport type WifiAdbRequestResult =\n | {ok: true}\n | {\n ok: false\n error: {code: WifiAdbRequestErrorCode; message: string}\n }\n\n/** Apply the SYSTEM-only Wi-Fi ADB policy before calling the native SDK. */\nexport async function handleWifiAdbRequest(\n packageName: string,\n payload: Record<string, unknown>,\n dependencies: WifiAdbRequestDependencies,\n): Promise<WifiAdbRequestResult> {\n if (!dependencies.isSystemPackage(packageName)) {\n return {\n ok: false,\n error: {\n code: \"NOT_PERMITTED\",\n message: \"setWifiAdbState is restricted to system apps\",\n },\n }\n }\n\n if (typeof payload.enabled !== \"boolean\") {\n return {\n ok: false,\n error: {\n code: \"INVALID_ARGUMENT\",\n message: \"enabled must be a boolean\",\n },\n }\n }\n\n try {\n await dependencies.setWifiAdbState(payload.enabled)\n return {ok: true}\n } catch (error) {\n return {\n ok: false,\n error: {\n code: \"INTERNAL\",\n message: error instanceof Error ? error.message : \"Wi-Fi ADB error\",\n },\n }\n }\n}\n"]}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { type AutomaticReportSubmissionStatus } from "../AutomaticReportResult";
|
|
2
|
+
import type { MediaKind } from "./galleryMediaValidation";
|
|
3
|
+
export interface InvalidGalleryMediaReportInput {
|
|
4
|
+
name: string;
|
|
5
|
+
reason: string;
|
|
6
|
+
stage: "capture_metadata_validation" | "download_validation" | "download_capture_validation" | "processing_validation";
|
|
7
|
+
mediaKind: MediaKind;
|
|
8
|
+
path?: string;
|
|
9
|
+
expectedSize?: number;
|
|
10
|
+
captureId?: string;
|
|
11
|
+
duration?: number;
|
|
12
|
+
glassesModel?: string;
|
|
13
|
+
}
|
|
14
|
+
export declare function galleryMediaIntegrityThrottleKey(input: InvalidGalleryMediaReportInput): string;
|
|
15
|
+
export declare function submitInvalidGalleryMediaReport(input: InvalidGalleryMediaReportInput): Promise<AutomaticReportSubmissionStatus>;
|
|
16
|
+
export declare function reportInvalidGalleryMedia(input: InvalidGalleryMediaReportInput): void;
|
|
17
|
+
//# sourceMappingURL=GalleryMediaIntegrityReportService.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GalleryMediaIntegrityReportService.d.ts","sourceRoot":"","sources":["../../../src/services/asg/GalleryMediaIntegrityReportService.ts"],"names":[],"mappings":"AACA,OAAO,EAEL,KAAK,+BAA+B,EAErC,MAAM,0BAA0B,CAAA;AACjC,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,0BAA0B,CAAA;AAKvD,MAAM,WAAW,8BAA8B;IAC7C,IAAI,EAAE,MAAM,CAAA;IACZ,MAAM,EAAE,MAAM,CAAA;IACd,KAAK,EAAE,6BAA6B,GAAG,qBAAqB,GAAG,6BAA6B,GAAG,uBAAuB,CAAA;IACtH,SAAS,EAAE,SAAS,CAAA;IACpB,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,YAAY,CAAC,EAAE,MAAM,CAAA;CACtB;AAED,wBAAgB,gCAAgC,CAAC,KAAK,EAAE,8BAA8B,GAAG,MAAM,CAI9F;AAED,wBAAsB,+BAA+B,CACnD,KAAK,EAAE,8BAA8B,GACpC,OAAO,CAAC,+BAA+B,CAAC,CAkC1C;AAED,wBAAgB,yBAAyB,CAAC,KAAK,EAAE,8BAA8B,GAAG,IAAI,CAIrF"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { submitAutomaticReport } from "../../facades/reports";
|
|
2
|
+
import { logAutomaticReportSubmissionStatus, toAutomaticReportSubmissionStatus, } from "../AutomaticReportResult";
|
|
3
|
+
const LOG_TAG = "GalleryMediaIntegrityReport";
|
|
4
|
+
const THROTTLE_WINDOW_MS = 90_000;
|
|
5
|
+
export function galleryMediaIntegrityThrottleKey(input) {
|
|
6
|
+
return ["gallery_media_integrity", input.mediaKind, input.stage, input.captureId || input.name, input.reason].join("|");
|
|
7
|
+
}
|
|
8
|
+
export async function submitInvalidGalleryMediaReport(input) {
|
|
9
|
+
const result = await submitAutomaticReport({
|
|
10
|
+
kind: "automatic",
|
|
11
|
+
trigger: {
|
|
12
|
+
type: "automatic",
|
|
13
|
+
source: "gallery_media_integrity",
|
|
14
|
+
reason: "invalid_downloaded_media",
|
|
15
|
+
},
|
|
16
|
+
report: {
|
|
17
|
+
expectedBehavior: "Gallery media synced from glasses should be valid before it is shown in the gallery.",
|
|
18
|
+
actualBehavior: JSON.stringify({
|
|
19
|
+
name: input.name,
|
|
20
|
+
captureId: input.captureId,
|
|
21
|
+
mediaKind: input.mediaKind,
|
|
22
|
+
stage: input.stage,
|
|
23
|
+
reason: input.reason,
|
|
24
|
+
path: input.path,
|
|
25
|
+
expectedSize: input.expectedSize,
|
|
26
|
+
duration: input.duration,
|
|
27
|
+
glassesModel: input.glassesModel,
|
|
28
|
+
}, null, 2),
|
|
29
|
+
systemPriority: input.mediaKind === "video" ? "high" : "medium",
|
|
30
|
+
},
|
|
31
|
+
throttleKey: galleryMediaIntegrityThrottleKey(input),
|
|
32
|
+
throttleWindowMs: THROTTLE_WINDOW_MS,
|
|
33
|
+
});
|
|
34
|
+
const status = toAutomaticReportSubmissionStatus(result);
|
|
35
|
+
logAutomaticReportSubmissionStatus(LOG_TAG, status, input.name);
|
|
36
|
+
return status;
|
|
37
|
+
}
|
|
38
|
+
export function reportInvalidGalleryMedia(input) {
|
|
39
|
+
void submitInvalidGalleryMediaReport(input).catch((error) => {
|
|
40
|
+
console.error(`[${LOG_TAG}] Unexpected error:`, error);
|
|
41
|
+
});
|
|
42
|
+
}
|
|
43
|
+
//# sourceMappingURL=GalleryMediaIntegrityReportService.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GalleryMediaIntegrityReportService.js","sourceRoot":"","sources":["../../../src/services/asg/GalleryMediaIntegrityReportService.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,qBAAqB,EAAC,MAAM,uBAAuB,CAAA;AAC3D,OAAO,EACL,kCAAkC,EAElC,iCAAiC,GAClC,MAAM,0BAA0B,CAAA;AAGjC,MAAM,OAAO,GAAG,6BAA6B,CAAA;AAC7C,MAAM,kBAAkB,GAAG,MAAM,CAAA;AAcjC,MAAM,UAAU,gCAAgC,CAAC,KAAqC;IACpF,OAAO,CAAC,yBAAyB,EAAE,KAAK,CAAC,SAAS,EAAE,KAAK,CAAC,KAAK,EAAE,KAAK,CAAC,SAAS,IAAI,KAAK,CAAC,IAAI,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC,IAAI,CAChH,GAAG,CACJ,CAAA;AACH,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,+BAA+B,CACnD,KAAqC;IAErC,MAAM,MAAM,GAAG,MAAM,qBAAqB,CAAC;QACzC,IAAI,EAAE,WAAW;QACjB,OAAO,EAAE;YACP,IAAI,EAAE,WAAW;YACjB,MAAM,EAAE,yBAAyB;YACjC,MAAM,EAAE,0BAA0B;SACnC;QACD,MAAM,EAAE;YACN,gBAAgB,EAAE,sFAAsF;YACxG,cAAc,EAAE,IAAI,CAAC,SAAS,CAC5B;gBACE,IAAI,EAAE,KAAK,CAAC,IAAI;gBAChB,SAAS,EAAE,KAAK,CAAC,SAAS;gBAC1B,SAAS,EAAE,KAAK,CAAC,SAAS;gBAC1B,KAAK,EAAE,KAAK,CAAC,KAAK;gBAClB,MAAM,EAAE,KAAK,CAAC,MAAM;gBACpB,IAAI,EAAE,KAAK,CAAC,IAAI;gBAChB,YAAY,EAAE,KAAK,CAAC,YAAY;gBAChC,QAAQ,EAAE,KAAK,CAAC,QAAQ;gBACxB,YAAY,EAAE,KAAK,CAAC,YAAY;aACjC,EACD,IAAI,EACJ,CAAC,CACF;YACD,cAAc,EAAE,KAAK,CAAC,SAAS,KAAK,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,QAAQ;SAChE;QACD,WAAW,EAAE,gCAAgC,CAAC,KAAK,CAAC;QACpD,gBAAgB,EAAE,kBAAkB;KACrC,CAAC,CAAA;IAEF,MAAM,MAAM,GAAG,iCAAiC,CAAC,MAAM,CAAC,CAAA;IACxD,kCAAkC,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,CAAC,IAAI,CAAC,CAAA;IAC/D,OAAO,MAAM,CAAA;AACf,CAAC;AAED,MAAM,UAAU,yBAAyB,CAAC,KAAqC;IAC7E,KAAK,+BAA+B,CAAC,KAAK,CAAC,CAAC,KAAK,CAAC,CAAC,KAAK,EAAE,EAAE;QAC1D,OAAO,CAAC,KAAK,CAAC,IAAI,OAAO,qBAAqB,EAAE,KAAK,CAAC,CAAA;IACxD,CAAC,CAAC,CAAA;AACJ,CAAC","sourcesContent":["import {submitAutomaticReport} from \"../../facades/reports\"\nimport {\n logAutomaticReportSubmissionStatus,\n type AutomaticReportSubmissionStatus,\n toAutomaticReportSubmissionStatus,\n} from \"../AutomaticReportResult\"\nimport type {MediaKind} from \"./galleryMediaValidation\"\n\nconst LOG_TAG = \"GalleryMediaIntegrityReport\"\nconst THROTTLE_WINDOW_MS = 90_000\n\nexport interface InvalidGalleryMediaReportInput {\n name: string\n reason: string\n stage: \"capture_metadata_validation\" | \"download_validation\" | \"download_capture_validation\" | \"processing_validation\"\n mediaKind: MediaKind\n path?: string\n expectedSize?: number\n captureId?: string\n duration?: number\n glassesModel?: string\n}\n\nexport function galleryMediaIntegrityThrottleKey(input: InvalidGalleryMediaReportInput): string {\n return [\"gallery_media_integrity\", input.mediaKind, input.stage, input.captureId || input.name, input.reason].join(\n \"|\",\n )\n}\n\nexport async function submitInvalidGalleryMediaReport(\n input: InvalidGalleryMediaReportInput,\n): Promise<AutomaticReportSubmissionStatus> {\n const result = await submitAutomaticReport({\n kind: \"automatic\",\n trigger: {\n type: \"automatic\",\n source: \"gallery_media_integrity\",\n reason: \"invalid_downloaded_media\",\n },\n report: {\n expectedBehavior: \"Gallery media synced from glasses should be valid before it is shown in the gallery.\",\n actualBehavior: JSON.stringify(\n {\n name: input.name,\n captureId: input.captureId,\n mediaKind: input.mediaKind,\n stage: input.stage,\n reason: input.reason,\n path: input.path,\n expectedSize: input.expectedSize,\n duration: input.duration,\n glassesModel: input.glassesModel,\n },\n null,\n 2,\n ),\n systemPriority: input.mediaKind === \"video\" ? \"high\" : \"medium\",\n },\n throttleKey: galleryMediaIntegrityThrottleKey(input),\n throttleWindowMs: THROTTLE_WINDOW_MS,\n })\n\n const status = toAutomaticReportSubmissionStatus(result)\n logAutomaticReportSubmissionStatus(LOG_TAG, status, input.name)\n return status\n}\n\nexport function reportInvalidGalleryMedia(input: InvalidGalleryMediaReportInput): void {\n void submitInvalidGalleryMediaReport(input).catch((error) => {\n console.error(`[${LOG_TAG}] Unexpected error:`, error)\n })\n}\n"]}
|