@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,87 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* SpeakerSegmentResolver — pure per-segment speaker resolution logic.
|
|
3
|
+
*
|
|
4
|
+
* Joins on-device speaker-identification windows (native SpeakerIdEngine
|
|
5
|
+
* `speaker_detected` events) against transcription segments by time overlap.
|
|
6
|
+
*
|
|
7
|
+
* Design constraint (see notes/speaker-id-plan.md §3.3): provider diarization
|
|
8
|
+
* labels (Soniox "Speaker N") are NOT reliable — the same person can flicker
|
|
9
|
+
* across labels and one label can absorb two people. The label is never an
|
|
10
|
+
* identity and no label→profile map is kept; it is used only as a hint that
|
|
11
|
+
* the speaker MAY have changed:
|
|
12
|
+
* 1. Carry-forward: a segment with no overlapping ID window may inherit the
|
|
13
|
+
* previous segment's resolution only if its label is unchanged and the
|
|
14
|
+
* gap is small. A label change breaks carry-forward.
|
|
15
|
+
* 2. Conflict damping: if the resolved identity changes while the label did
|
|
16
|
+
* NOT change, a stronger vote is required before switching — this absorbs
|
|
17
|
+
* phone/cloud clock skew at turn boundaries without ever letting the
|
|
18
|
+
* label veto strong embedding evidence.
|
|
19
|
+
* Segments without sufficient ID evidence carry no resolution — unknown is
|
|
20
|
+
* the honest default, never "whatever this label resolved to last time".
|
|
21
|
+
*
|
|
22
|
+
* Resolution is tri-state: an enrolled identity, a confident OTHER
|
|
23
|
+
* (`resolvedSpeakerId: null` — a voice that is affirmatively not enrolled;
|
|
24
|
+
* windows in the ambiguous similarity band never produce it), or null.
|
|
25
|
+
*
|
|
26
|
+
* Clock caveat accepted for v1: phone/cloud alignment is approximate
|
|
27
|
+
* (transport latency); overlap voting over ≥2 s windows absorbs it. Do not
|
|
28
|
+
* attempt sample-accurate alignment.
|
|
29
|
+
*/
|
|
30
|
+
export interface SpeakerIdWindow {
|
|
31
|
+
/** Matched profile id, or null when the voice matched no enrolled profile. */
|
|
32
|
+
profileId: string | null;
|
|
33
|
+
name: string | null;
|
|
34
|
+
/**
|
|
35
|
+
* For null-profile windows only: true when the similarity was clearly BELOW
|
|
36
|
+
* the enrolled voice (not merely below the match threshold) — affirmative
|
|
37
|
+
* evidence of a different person. Null-profile windows without this flag are
|
|
38
|
+
* ambiguous: they block carry-forward when dominant but assert nothing.
|
|
39
|
+
*/
|
|
40
|
+
confidentOther?: boolean;
|
|
41
|
+
/** Epoch ms (native clock — same epoch as JS Date.now()). */
|
|
42
|
+
startMs: number;
|
|
43
|
+
endMs: number;
|
|
44
|
+
}
|
|
45
|
+
export interface SegmentInput {
|
|
46
|
+
/** Estimated epoch ms span of the spoken segment. */
|
|
47
|
+
startMs: number;
|
|
48
|
+
endMs: number;
|
|
49
|
+
/** Raw provider diarization label — hint only, never an identity. */
|
|
50
|
+
label?: string;
|
|
51
|
+
}
|
|
52
|
+
export interface SegmentResolution {
|
|
53
|
+
/**
|
|
54
|
+
* Matched enrolled profile id — or null for a confident OTHER: the segment
|
|
55
|
+
* was dominated by a voice that is affirmatively not any enrolled profile.
|
|
56
|
+
*/
|
|
57
|
+
resolvedSpeakerId: string | null;
|
|
58
|
+
resolvedSpeakerName: string | null;
|
|
59
|
+
}
|
|
60
|
+
/** Windows older than this (vs. the resolver's newest timestamp) are dropped. */
|
|
61
|
+
export declare const WINDOW_RETENTION_MS = 60000;
|
|
62
|
+
/** Carry-forward dies when the gap since the previous segment exceeds this. */
|
|
63
|
+
export declare const CARRY_FORWARD_MAX_GAP_MS = 5000;
|
|
64
|
+
/** A winning vote needs at least this much absolute overlap. */
|
|
65
|
+
export declare const MIN_WINNING_OVERLAP_MS = 250;
|
|
66
|
+
export declare class SpeakerSegmentResolver {
|
|
67
|
+
private windows;
|
|
68
|
+
private last;
|
|
69
|
+
addWindow(window: SpeakerIdWindow): void;
|
|
70
|
+
/** Per audio session: drop all identification evidence and segment state. */
|
|
71
|
+
reset(): void;
|
|
72
|
+
/**
|
|
73
|
+
* Resolve one FINAL segment. Also advances the carry-forward state, so call
|
|
74
|
+
* exactly once per final segment, in delivery order.
|
|
75
|
+
*/
|
|
76
|
+
resolve(segment: SegmentInput): SegmentResolution | null;
|
|
77
|
+
private resolveInner;
|
|
78
|
+
private voteCandidates;
|
|
79
|
+
/**
|
|
80
|
+
* No overlapping ID window (short interjection, window not flushed yet):
|
|
81
|
+
* inherit the previous segment's resolution only while the label is
|
|
82
|
+
* unchanged and the gap is small. A label change is the "speaker may have
|
|
83
|
+
* changed" hint — the segment stays unresolved.
|
|
84
|
+
*/
|
|
85
|
+
private carryForward;
|
|
86
|
+
}
|
|
87
|
+
//# sourceMappingURL=SpeakerSegmentResolver.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SpeakerSegmentResolver.d.ts","sourceRoot":"","sources":["../../src/services/SpeakerSegmentResolver.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AAEH,MAAM,WAAW,eAAe;IAC9B,8EAA8E;IAC9E,SAAS,EAAE,MAAM,GAAG,IAAI,CAAA;IACxB,IAAI,EAAE,MAAM,GAAG,IAAI,CAAA;IACnB;;;;;OAKG;IACH,cAAc,CAAC,EAAE,OAAO,CAAA;IACxB,6DAA6D;IAC7D,OAAO,EAAE,MAAM,CAAA;IACf,KAAK,EAAE,MAAM,CAAA;CACd;AAED,MAAM,WAAW,YAAY;IAC3B,qDAAqD;IACrD,OAAO,EAAE,MAAM,CAAA;IACf,KAAK,EAAE,MAAM,CAAA;IACb,qEAAqE;IACrE,KAAK,CAAC,EAAE,MAAM,CAAA;CACf;AAED,MAAM,WAAW,iBAAiB;IAChC;;;OAGG;IACH,iBAAiB,EAAE,MAAM,GAAG,IAAI,CAAA;IAChC,mBAAmB,EAAE,MAAM,GAAG,IAAI,CAAA;CACnC;AAED,iFAAiF;AACjF,eAAO,MAAM,mBAAmB,QAAS,CAAA;AACzC,+EAA+E;AAC/E,eAAO,MAAM,wBAAwB,OAAQ,CAAA;AAC7C,gEAAgE;AAChE,eAAO,MAAM,sBAAsB,MAAM,CAAA;AAsBzC,qBAAa,sBAAsB;IACjC,OAAO,CAAC,OAAO,CAAwB;IACvC,OAAO,CAAC,IAAI,CAAgC;IAE5C,SAAS,CAAC,MAAM,EAAE,eAAe,GAAG,IAAI;IAOxC,6EAA6E;IAC7E,KAAK,IAAI,IAAI;IAKb;;;OAGG;IACH,OAAO,CAAC,OAAO,EAAE,YAAY,GAAG,iBAAiB,GAAG,IAAI;IAMxD,OAAO,CAAC,YAAY;IA8CpB,OAAO,CAAC,cAAc;IAkBtB;;;;;OAKG;IACH,OAAO,CAAC,YAAY;CAMrB"}
|
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* SpeakerSegmentResolver — pure per-segment speaker resolution logic.
|
|
3
|
+
*
|
|
4
|
+
* Joins on-device speaker-identification windows (native SpeakerIdEngine
|
|
5
|
+
* `speaker_detected` events) against transcription segments by time overlap.
|
|
6
|
+
*
|
|
7
|
+
* Design constraint (see notes/speaker-id-plan.md §3.3): provider diarization
|
|
8
|
+
* labels (Soniox "Speaker N") are NOT reliable — the same person can flicker
|
|
9
|
+
* across labels and one label can absorb two people. The label is never an
|
|
10
|
+
* identity and no label→profile map is kept; it is used only as a hint that
|
|
11
|
+
* the speaker MAY have changed:
|
|
12
|
+
* 1. Carry-forward: a segment with no overlapping ID window may inherit the
|
|
13
|
+
* previous segment's resolution only if its label is unchanged and the
|
|
14
|
+
* gap is small. A label change breaks carry-forward.
|
|
15
|
+
* 2. Conflict damping: if the resolved identity changes while the label did
|
|
16
|
+
* NOT change, a stronger vote is required before switching — this absorbs
|
|
17
|
+
* phone/cloud clock skew at turn boundaries without ever letting the
|
|
18
|
+
* label veto strong embedding evidence.
|
|
19
|
+
* Segments without sufficient ID evidence carry no resolution — unknown is
|
|
20
|
+
* the honest default, never "whatever this label resolved to last time".
|
|
21
|
+
*
|
|
22
|
+
* Resolution is tri-state: an enrolled identity, a confident OTHER
|
|
23
|
+
* (`resolvedSpeakerId: null` — a voice that is affirmatively not enrolled;
|
|
24
|
+
* windows in the ambiguous similarity band never produce it), or null.
|
|
25
|
+
*
|
|
26
|
+
* Clock caveat accepted for v1: phone/cloud alignment is approximate
|
|
27
|
+
* (transport latency); overlap voting over ≥2 s windows absorbs it. Do not
|
|
28
|
+
* attempt sample-accurate alignment.
|
|
29
|
+
*/
|
|
30
|
+
/** Windows older than this (vs. the resolver's newest timestamp) are dropped. */
|
|
31
|
+
export const WINDOW_RETENTION_MS = 60_000;
|
|
32
|
+
/** Carry-forward dies when the gap since the previous segment exceeds this. */
|
|
33
|
+
export const CARRY_FORWARD_MAX_GAP_MS = 5_000;
|
|
34
|
+
/** A winning vote needs at least this much absolute overlap. */
|
|
35
|
+
export const MIN_WINNING_OVERLAP_MS = 250;
|
|
36
|
+
/** Damping-comparison key: OTHER counts as its own identity, distinct from every profile. */
|
|
37
|
+
function identityKey(res) {
|
|
38
|
+
return res.resolvedSpeakerId ?? "\0other";
|
|
39
|
+
}
|
|
40
|
+
export class SpeakerSegmentResolver {
|
|
41
|
+
windows = [];
|
|
42
|
+
last = null;
|
|
43
|
+
addWindow(window) {
|
|
44
|
+
if (!(window.endMs > window.startMs))
|
|
45
|
+
return;
|
|
46
|
+
this.windows.push(window);
|
|
47
|
+
const cutoff = window.endMs - WINDOW_RETENTION_MS;
|
|
48
|
+
this.windows = this.windows.filter((w) => w.endMs >= cutoff);
|
|
49
|
+
}
|
|
50
|
+
/** Per audio session: drop all identification evidence and segment state. */
|
|
51
|
+
reset() {
|
|
52
|
+
this.windows = [];
|
|
53
|
+
this.last = null;
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* Resolve one FINAL segment. Also advances the carry-forward state, so call
|
|
57
|
+
* exactly once per final segment, in delivery order.
|
|
58
|
+
*/
|
|
59
|
+
resolve(segment) {
|
|
60
|
+
const resolution = this.resolveInner(segment);
|
|
61
|
+
this.last = { endMs: segment.endMs, label: segment.label, resolution };
|
|
62
|
+
return resolution;
|
|
63
|
+
}
|
|
64
|
+
resolveInner(segment) {
|
|
65
|
+
const candidates = this.voteCandidates(segment);
|
|
66
|
+
if (candidates.length === 0) {
|
|
67
|
+
return this.carryForward(segment);
|
|
68
|
+
}
|
|
69
|
+
candidates.sort((a, b) => b.overlapMs - a.overlapMs);
|
|
70
|
+
const winner = candidates[0];
|
|
71
|
+
const runnerUp = candidates[1];
|
|
72
|
+
// Too little overlap to mean anything (clock-skew sliver) — treat as no
|
|
73
|
+
// evidence rather than a confident unknown.
|
|
74
|
+
const minOverlap = Math.min(MIN_WINNING_OVERLAP_MS, Math.max(1, (segment.endMs - segment.startMs) * 0.3));
|
|
75
|
+
if (winner.overlapMs < minOverlap) {
|
|
76
|
+
return this.carryForward(segment);
|
|
77
|
+
}
|
|
78
|
+
// Ambiguous-voice-dominant segment: honest null (no carry-forward — a
|
|
79
|
+
// voice failed to match but wasn't clearly different either).
|
|
80
|
+
if (winner.kind === "unknown")
|
|
81
|
+
return null;
|
|
82
|
+
// Confident-other-dominant → an OTHER resolution (null id); a profile
|
|
83
|
+
// winner resolves to that identity. Both pass through conflict damping.
|
|
84
|
+
const proposed = winner.kind === "other"
|
|
85
|
+
? { resolvedSpeakerId: null, resolvedSpeakerName: null }
|
|
86
|
+
: { resolvedSpeakerId: winner.profileId, resolvedSpeakerName: winner.name };
|
|
87
|
+
// Conflict damping: identity flip while the provider label did NOT change
|
|
88
|
+
// needs a stronger vote (≥2 agreeing windows, or a clear overlap majority)
|
|
89
|
+
// — otherwise keep the previous binding for this segment. A label change
|
|
90
|
+
// is the provider hinting the speaker may have changed, so the flip
|
|
91
|
+
// stands on normal evidence.
|
|
92
|
+
const prev = this.last?.resolution ?? null;
|
|
93
|
+
const labelUnchanged = this.last != null && this.last.label === segment.label;
|
|
94
|
+
const identityFlipped = prev != null && identityKey(prev) !== identityKey(proposed);
|
|
95
|
+
if (identityFlipped && labelUnchanged) {
|
|
96
|
+
const strongEnough = winner.windowCount >= 2 || (runnerUp === undefined ? true : winner.overlapMs >= runnerUp.overlapMs * 2);
|
|
97
|
+
if (!strongEnough)
|
|
98
|
+
return prev;
|
|
99
|
+
}
|
|
100
|
+
return proposed;
|
|
101
|
+
}
|
|
102
|
+
voteCandidates(segment) {
|
|
103
|
+
const byKey = new Map();
|
|
104
|
+
for (const w of this.windows) {
|
|
105
|
+
const overlap = Math.min(segment.endMs, w.endMs) - Math.max(segment.startMs, w.startMs);
|
|
106
|
+
if (overlap <= 0)
|
|
107
|
+
continue;
|
|
108
|
+
const kind = w.profileId != null ? "profile" : w.confidentOther ? "other" : "unknown";
|
|
109
|
+
const key = w.profileId ?? `\0${kind}`;
|
|
110
|
+
const existing = byKey.get(key);
|
|
111
|
+
if (existing) {
|
|
112
|
+
existing.overlapMs += overlap;
|
|
113
|
+
existing.windowCount += 1;
|
|
114
|
+
}
|
|
115
|
+
else {
|
|
116
|
+
byKey.set(key, { kind, profileId: w.profileId, name: w.name, overlapMs: overlap, windowCount: 1 });
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
return [...byKey.values()];
|
|
120
|
+
}
|
|
121
|
+
/**
|
|
122
|
+
* No overlapping ID window (short interjection, window not flushed yet):
|
|
123
|
+
* inherit the previous segment's resolution only while the label is
|
|
124
|
+
* unchanged and the gap is small. A label change is the "speaker may have
|
|
125
|
+
* changed" hint — the segment stays unresolved.
|
|
126
|
+
*/
|
|
127
|
+
carryForward(segment) {
|
|
128
|
+
if (!this.last?.resolution)
|
|
129
|
+
return null;
|
|
130
|
+
if (this.last.label !== segment.label)
|
|
131
|
+
return null;
|
|
132
|
+
if (segment.startMs - this.last.endMs > CARRY_FORWARD_MAX_GAP_MS)
|
|
133
|
+
return null;
|
|
134
|
+
return this.last.resolution;
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
//# sourceMappingURL=SpeakerSegmentResolver.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SpeakerSegmentResolver.js","sourceRoot":"","sources":["../../src/services/SpeakerSegmentResolver.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AAmCH,iFAAiF;AACjF,MAAM,CAAC,MAAM,mBAAmB,GAAG,MAAM,CAAA;AACzC,+EAA+E;AAC/E,MAAM,CAAC,MAAM,wBAAwB,GAAG,KAAK,CAAA;AAC7C,gEAAgE;AAChE,MAAM,CAAC,MAAM,sBAAsB,GAAG,GAAG,CAAA;AAWzC,6FAA6F;AAC7F,SAAS,WAAW,CAAC,GAAsB;IACzC,OAAO,GAAG,CAAC,iBAAiB,IAAI,SAAS,CAAA;AAC3C,CAAC;AAQD,MAAM,OAAO,sBAAsB;IACzB,OAAO,GAAsB,EAAE,CAAA;IAC/B,IAAI,GAA4B,IAAI,CAAA;IAE5C,SAAS,CAAC,MAAuB;QAC/B,IAAI,CAAC,CAAC,MAAM,CAAC,KAAK,GAAG,MAAM,CAAC,OAAO,CAAC;YAAE,OAAM;QAC5C,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,CAAA;QACzB,MAAM,MAAM,GAAG,MAAM,CAAC,KAAK,GAAG,mBAAmB,CAAA;QACjD,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,KAAK,IAAI,MAAM,CAAC,CAAA;IAC9D,CAAC;IAED,6EAA6E;IAC7E,KAAK;QACH,IAAI,CAAC,OAAO,GAAG,EAAE,CAAA;QACjB,IAAI,CAAC,IAAI,GAAG,IAAI,CAAA;IAClB,CAAC;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OAAO,IAAI,CAAC;gBAAE,SAAQ;YAC1B,MAAM,IAAI,GAAsB,CAAC,CAAC,SAAS,IAAI,IAAI,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC,cAAc,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,SAAS,CAAA;YACxG,MAAM,GAAG,GAAG,CAAC,CAAC,SAAS,IAAI,KAAK,IAAI,EAAE,CAAA;YACtC,MAAM,QAAQ,GAAG,KAAK,CAAC,GAAG,CAAC,GAAG,CAAC,CAAA;YAC/B,IAAI,QAAQ,EAAE,CAAC;gBACb,QAAQ,CAAC,SAAS,IAAI,OAAO,CAAA;gBAC7B,QAAQ,CAAC,WAAW,IAAI,CAAC,CAAA;YAC3B,CAAC;iBAAM,CAAC;gBACN,KAAK,CAAC,GAAG,CAAC,GAAG,EAAE,EAAC,IAAI,EAAE,SAAS,EAAE,CAAC,CAAC,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC,IAAI,EAAE,SAAS,EAAE,OAAO,EAAE,WAAW,EAAE,CAAC,EAAC,CAAC,CAAA;YAClG,CAAC;QACH,CAAC;QACD,OAAO,CAAC,GAAG,KAAK,CAAC,MAAM,EAAE,CAAC,CAAA;IAC5B,CAAC;IAED;;;;;OAKG;IACK,YAAY,CAAC,OAAqB;QACxC,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,UAAU;YAAE,OAAO,IAAI,CAAA;QACvC,IAAI,IAAI,CAAC,IAAI,CAAC,KAAK,KAAK,OAAO,CAAC,KAAK;YAAE,OAAO,IAAI,CAAA;QAClD,IAAI,OAAO,CAAC,OAAO,GAAG,IAAI,CAAC,IAAI,CAAC,KAAK,GAAG,wBAAwB;YAAE,OAAO,IAAI,CAAA;QAC7E,OAAO,IAAI,CAAC,IAAI,CAAC,UAAU,CAAA;IAC7B,CAAC;CACF","sourcesContent":["/**\n * SpeakerSegmentResolver — pure per-segment speaker resolution logic.\n *\n * Joins on-device speaker-identification windows (native SpeakerIdEngine\n * `speaker_detected` events) against transcription segments by time overlap.\n *\n * Design constraint (see notes/speaker-id-plan.md §3.3): provider diarization\n * labels (Soniox \"Speaker N\") are NOT reliable — the same person can flicker\n * across labels and one label can absorb two people. The label is never an\n * identity and no label→profile map is kept; it is used only as a hint that\n * the speaker MAY have changed:\n * 1. Carry-forward: a segment with no overlapping ID window may inherit the\n * previous segment's resolution only if its label is unchanged and the\n * gap is small. A label change breaks carry-forward.\n * 2. Conflict damping: if the resolved identity changes while the label did\n * NOT change, a stronger vote is required before switching — this absorbs\n * phone/cloud clock skew at turn boundaries without ever letting the\n * label veto strong embedding evidence.\n * Segments without sufficient ID evidence carry no resolution — unknown is\n * the honest default, never \"whatever this label resolved to last time\".\n *\n * Resolution is tri-state: an enrolled identity, a confident OTHER\n * (`resolvedSpeakerId: null` — a voice that is affirmatively not enrolled;\n * windows in the ambiguous similarity band never produce it), or null.\n *\n * Clock caveat accepted for v1: phone/cloud alignment is approximate\n * (transport latency); overlap voting over ≥2 s windows absorbs it. Do not\n * attempt sample-accurate alignment.\n */\n\nexport interface SpeakerIdWindow {\n /** Matched profile id, or null when the voice matched no enrolled profile. */\n profileId: string | null\n name: string | null\n /**\n * For null-profile windows only: true when the similarity was clearly BELOW\n * the enrolled voice (not merely below the match threshold) — affirmative\n * evidence of a different person. Null-profile windows without this flag are\n * ambiguous: they block carry-forward when dominant but assert nothing.\n */\n confidentOther?: boolean\n /** Epoch ms (native clock — same epoch as JS Date.now()). */\n startMs: number\n endMs: number\n}\n\nexport interface SegmentInput {\n /** Estimated epoch ms span of the spoken segment. */\n startMs: number\n endMs: number\n /** Raw provider diarization label — hint only, never an identity. */\n label?: string\n}\n\nexport interface SegmentResolution {\n /**\n * Matched enrolled profile id — or null for a confident OTHER: the segment\n * was dominated by a voice that is affirmatively not any enrolled profile.\n */\n resolvedSpeakerId: string | null\n resolvedSpeakerName: string | null\n}\n\n/** Windows older than this (vs. the resolver's newest timestamp) are dropped. */\nexport const WINDOW_RETENTION_MS = 60_000\n/** Carry-forward dies when the gap since the previous segment exceeds this. */\nexport const CARRY_FORWARD_MAX_GAP_MS = 5_000\n/** A winning vote needs at least this much absolute overlap. */\nexport const MIN_WINNING_OVERLAP_MS = 250\n\ninterface Candidate {\n /** \"profile\" = enrolled match; \"other\" = confident non-enrolled voice; \"unknown\" = ambiguous no-match. */\n kind: \"profile\" | \"other\" | \"unknown\"\n profileId: string | null\n name: string | null\n overlapMs: number\n windowCount: number\n}\n\n/** Damping-comparison key: OTHER counts as its own identity, distinct from every profile. */\nfunction identityKey(res: SegmentResolution): string {\n return res.resolvedSpeakerId ?? \"\\0other\"\n}\n\ninterface LastSegmentState {\n endMs: number\n label: string | undefined\n resolution: SegmentResolution | null\n}\n\nexport class SpeakerSegmentResolver {\n private windows: SpeakerIdWindow[] = []\n private last: LastSegmentState | null = null\n\n addWindow(window: SpeakerIdWindow): void {\n if (!(window.endMs > window.startMs)) return\n this.windows.push(window)\n const cutoff = window.endMs - WINDOW_RETENTION_MS\n this.windows = this.windows.filter((w) => w.endMs >= cutoff)\n }\n\n /** Per audio session: drop all identification evidence and segment state. */\n reset(): void {\n this.windows = []\n this.last = null\n }\n\n /**\n * Resolve one FINAL segment. Also advances the carry-forward state, so call\n * exactly once per final segment, in delivery order.\n */\n resolve(segment: SegmentInput): SegmentResolution | null {\n const resolution = this.resolveInner(segment)\n this.last = {endMs: segment.endMs, label: segment.label, resolution}\n return resolution\n }\n\n private resolveInner(segment: SegmentInput): SegmentResolution | null {\n const candidates = this.voteCandidates(segment)\n\n if (candidates.length === 0) {\n return this.carryForward(segment)\n }\n\n candidates.sort((a, b) => b.overlapMs - a.overlapMs)\n const winner = candidates[0]\n const runnerUp = candidates[1]\n\n // Too little overlap to mean anything (clock-skew sliver) — treat as no\n // evidence rather than a confident unknown.\n const minOverlap = Math.min(MIN_WINNING_OVERLAP_MS, Math.max(1, (segment.endMs - segment.startMs) * 0.3))\n if (winner.overlapMs < minOverlap) {\n return this.carryForward(segment)\n }\n\n // Ambiguous-voice-dominant segment: honest null (no carry-forward — a\n // voice failed to match but wasn't clearly different either).\n if (winner.kind === \"unknown\") return null\n\n // Confident-other-dominant → an OTHER resolution (null id); a profile\n // winner resolves to that identity. Both pass through conflict damping.\n const proposed: SegmentResolution =\n winner.kind === \"other\"\n ? {resolvedSpeakerId: null, resolvedSpeakerName: null}\n : {resolvedSpeakerId: winner.profileId, resolvedSpeakerName: winner.name}\n\n // Conflict damping: identity flip while the provider label did NOT change\n // needs a stronger vote (≥2 agreeing windows, or a clear overlap majority)\n // — otherwise keep the previous binding for this segment. A label change\n // is the provider hinting the speaker may have changed, so the flip\n // stands on normal evidence.\n const prev = this.last?.resolution ?? null\n const labelUnchanged = this.last != null && this.last.label === segment.label\n const identityFlipped = prev != null && identityKey(prev) !== identityKey(proposed)\n if (identityFlipped && labelUnchanged) {\n const strongEnough =\n winner.windowCount >= 2 || (runnerUp === undefined ? true : winner.overlapMs >= runnerUp.overlapMs * 2)\n if (!strongEnough) return prev\n }\n\n return proposed\n }\n\n private voteCandidates(segment: SegmentInput): Candidate[] {\n const byKey = new Map<string, Candidate>()\n for (const w of this.windows) {\n const overlap = Math.min(segment.endMs, w.endMs) - Math.max(segment.startMs, w.startMs)\n if (overlap <= 0) continue\n const kind: Candidate[\"kind\"] = w.profileId != null ? \"profile\" : w.confidentOther ? \"other\" : \"unknown\"\n const key = w.profileId ?? `\\0${kind}`\n const existing = byKey.get(key)\n if (existing) {\n existing.overlapMs += overlap\n existing.windowCount += 1\n } else {\n byKey.set(key, {kind, profileId: w.profileId, name: w.name, overlapMs: overlap, windowCount: 1})\n }\n }\n return [...byKey.values()]\n }\n\n /**\n * No overlapping ID window (short interjection, window not flushed yet):\n * inherit the previous segment's resolution only while the label is\n * unchanged and the gap is small. A label change is the \"speaker may have\n * changed\" hint — the segment stays unresolved.\n */\n private carryForward(segment: SegmentInput): SegmentResolution | null {\n if (!this.last?.resolution) return null\n if (this.last.label !== segment.label) return null\n if (segment.startMs - this.last.endMs > CARRY_FORWARD_MAX_GAP_MS) return null\n return this.last.resolution\n }\n}\n"]}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Drives RTMP stream liveliness checks via a keep-alive heartbeat:
|
|
3
|
+
* `setActive(true)` starts the timer; each tick sends a keep-alive with a
|
|
4
|
+
* fresh ackId; `maxMissedAcks` consecutive timeouts fire `onTimeout`.
|
|
5
|
+
*/
|
|
6
|
+
export interface LifecycleLogger {
|
|
7
|
+
child(bindings: Record<string, unknown>): LifecycleLogger;
|
|
8
|
+
debug(...args: unknown[]): void;
|
|
9
|
+
warn(...args: unknown[]): void;
|
|
10
|
+
error(...args: unknown[]): void;
|
|
11
|
+
}
|
|
12
|
+
interface StreamLifecycleCallbacks {
|
|
13
|
+
sendKeepAlive: (ackId: string) => Promise<void> | void;
|
|
14
|
+
onTimeout: () => Promise<void> | void;
|
|
15
|
+
onKeepAliveSent?: (ackId: string) => void;
|
|
16
|
+
onKeepAliveAcked?: (ackId: string, ageMs: number) => void;
|
|
17
|
+
onKeepAliveMissed?: (ackId: string, ageMs: number, missedCount: number) => void;
|
|
18
|
+
}
|
|
19
|
+
export interface StreamLifecycleOptions {
|
|
20
|
+
logger: LifecycleLogger;
|
|
21
|
+
streamId: string;
|
|
22
|
+
keepAliveIntervalMs: number;
|
|
23
|
+
ackTimeoutMs: number;
|
|
24
|
+
maxMissedAcks: number;
|
|
25
|
+
shouldSendKeepAlive?: () => boolean;
|
|
26
|
+
now?: () => number;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Drives RTMP stream liveliness checks. Activate to start the heartbeat;
|
|
30
|
+
* each tick sends a keep-alive with a fresh ackId and arms a timeout. When
|
|
31
|
+
* `maxMissedAcks` consecutive timeouts fire, `onTimeout` is invoked and the
|
|
32
|
+
* caller is expected to tear the stream down.
|
|
33
|
+
*/
|
|
34
|
+
export declare class StreamLifecycleController {
|
|
35
|
+
private readonly callbacks;
|
|
36
|
+
private keepAliveTimer?;
|
|
37
|
+
private pendingAcks;
|
|
38
|
+
private missedAcks;
|
|
39
|
+
private lastActivityMs;
|
|
40
|
+
private active;
|
|
41
|
+
private disposed;
|
|
42
|
+
private readonly logger;
|
|
43
|
+
private readonly streamId;
|
|
44
|
+
private readonly keepAliveIntervalMs;
|
|
45
|
+
private readonly ackTimeoutMs;
|
|
46
|
+
private readonly maxMissedAcks;
|
|
47
|
+
private readonly shouldSendKeepAlive?;
|
|
48
|
+
private readonly now;
|
|
49
|
+
constructor(options: StreamLifecycleOptions, callbacks: StreamLifecycleCallbacks);
|
|
50
|
+
setActive(active: boolean): void;
|
|
51
|
+
recordActivity(): void;
|
|
52
|
+
handleAck(ackId: string): void;
|
|
53
|
+
dispose(): void;
|
|
54
|
+
getLastActivityMs(): number;
|
|
55
|
+
private startTimer;
|
|
56
|
+
private stopTimer;
|
|
57
|
+
private tick;
|
|
58
|
+
private onAckTimeout;
|
|
59
|
+
private clearPendingAcks;
|
|
60
|
+
private createAckId;
|
|
61
|
+
}
|
|
62
|
+
export {};
|
|
63
|
+
//# sourceMappingURL=StreamLifecycleController.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"StreamLifecycleController.d.ts","sourceRoot":"","sources":["../../src/services/StreamLifecycleController.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,MAAM,WAAW,eAAe;IAC9B,KAAK,CAAC,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,eAAe,CAAA;IACzD,KAAK,CAAC,GAAG,IAAI,EAAE,OAAO,EAAE,GAAG,IAAI,CAAA;IAC/B,IAAI,CAAC,GAAG,IAAI,EAAE,OAAO,EAAE,GAAG,IAAI,CAAA;IAC9B,KAAK,CAAC,GAAG,IAAI,EAAE,OAAO,EAAE,GAAG,IAAI,CAAA;CAChC;AAED,UAAU,wBAAwB;IAChC,aAAa,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,OAA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QAAQ,CAAC,GAAG,CAAc;gBAGhC,OAAO,EAAE,sBAAsB,EACd,SAAS,EAAE,wBAAwB;IAYtD,SAAS,CAAC,MAAM,EAAE,OAAO,GAAG,IAAI;IAehC,cAAc,IAAI,IAAI;IAKtB,SAAS,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI;IAgB9B,OAAO,IAAI,IAAI;IASf,iBAAiB,IAAI,MAAM;IAI3B,OAAO,CAAC,UAAU;IAQlB,OAAO,CAAC,SAAS;YAQH,IAAI;IAyBlB,OAAO,CAAC,YAAY;IA8BpB,OAAO,CAAC,gBAAgB;IAOxB,OAAO,CAAC,WAAW;CAGpB"}
|
|
@@ -0,0 +1,148 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Drives RTMP stream liveliness checks via a keep-alive heartbeat:
|
|
3
|
+
* `setActive(true)` starts the timer; each tick sends a keep-alive with a
|
|
4
|
+
* fresh ackId; `maxMissedAcks` consecutive timeouts fire `onTimeout`.
|
|
5
|
+
*/
|
|
6
|
+
/**
|
|
7
|
+
* Drives RTMP stream liveliness checks. Activate to start the heartbeat;
|
|
8
|
+
* each tick sends a keep-alive with a fresh ackId and arms a timeout. When
|
|
9
|
+
* `maxMissedAcks` consecutive timeouts fire, `onTimeout` is invoked and the
|
|
10
|
+
* caller is expected to tear the stream down.
|
|
11
|
+
*/
|
|
12
|
+
export class StreamLifecycleController {
|
|
13
|
+
callbacks;
|
|
14
|
+
keepAliveTimer;
|
|
15
|
+
pendingAcks = new Map();
|
|
16
|
+
missedAcks = 0;
|
|
17
|
+
lastActivityMs;
|
|
18
|
+
active = false;
|
|
19
|
+
disposed = false;
|
|
20
|
+
logger;
|
|
21
|
+
streamId;
|
|
22
|
+
keepAliveIntervalMs;
|
|
23
|
+
ackTimeoutMs;
|
|
24
|
+
maxMissedAcks;
|
|
25
|
+
shouldSendKeepAlive;
|
|
26
|
+
now;
|
|
27
|
+
constructor(options, callbacks) {
|
|
28
|
+
this.callbacks = callbacks;
|
|
29
|
+
this.logger = options.logger.child({ component: "StreamLifecycle" });
|
|
30
|
+
this.streamId = options.streamId;
|
|
31
|
+
this.keepAliveIntervalMs = options.keepAliveIntervalMs;
|
|
32
|
+
this.ackTimeoutMs = options.ackTimeoutMs;
|
|
33
|
+
this.maxMissedAcks = options.maxMissedAcks;
|
|
34
|
+
this.shouldSendKeepAlive = options.shouldSendKeepAlive;
|
|
35
|
+
this.now = options.now ?? (() => Date.now());
|
|
36
|
+
this.lastActivityMs = this.now();
|
|
37
|
+
}
|
|
38
|
+
setActive(active) {
|
|
39
|
+
if (this.disposed || this.active === active)
|
|
40
|
+
return;
|
|
41
|
+
this.logger.debug({ streamId: this.streamId, active }, "Updating lifecycle active state");
|
|
42
|
+
this.active = active;
|
|
43
|
+
if (active) {
|
|
44
|
+
this.startTimer();
|
|
45
|
+
}
|
|
46
|
+
else {
|
|
47
|
+
this.stopTimer();
|
|
48
|
+
this.clearPendingAcks();
|
|
49
|
+
this.missedAcks = 0;
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
recordActivity() {
|
|
53
|
+
this.lastActivityMs = this.now();
|
|
54
|
+
this.missedAcks = 0;
|
|
55
|
+
}
|
|
56
|
+
handleAck(ackId) {
|
|
57
|
+
if (this.disposed)
|
|
58
|
+
return;
|
|
59
|
+
const ackInfo = this.pendingAcks.get(ackId);
|
|
60
|
+
if (!ackInfo) {
|
|
61
|
+
this.logger.warn({ streamId: this.streamId, ackId }, "Received unknown keep-alive ACK");
|
|
62
|
+
return;
|
|
63
|
+
}
|
|
64
|
+
clearTimeout(ackInfo.timeout);
|
|
65
|
+
this.pendingAcks.delete(ackId);
|
|
66
|
+
this.recordActivity();
|
|
67
|
+
this.callbacks.onKeepAliveAcked?.(ackId, this.now() - ackInfo.sentAt);
|
|
68
|
+
}
|
|
69
|
+
dispose() {
|
|
70
|
+
if (this.disposed)
|
|
71
|
+
return;
|
|
72
|
+
this.disposed = true;
|
|
73
|
+
this.stopTimer();
|
|
74
|
+
this.clearPendingAcks();
|
|
75
|
+
this.logger.debug({ streamId: this.streamId }, "Lifecycle disposed");
|
|
76
|
+
}
|
|
77
|
+
getLastActivityMs() {
|
|
78
|
+
return this.lastActivityMs;
|
|
79
|
+
}
|
|
80
|
+
startTimer() {
|
|
81
|
+
if (this.keepAliveTimer)
|
|
82
|
+
return;
|
|
83
|
+
this.keepAliveTimer = setInterval(() => {
|
|
84
|
+
void this.tick();
|
|
85
|
+
}, this.keepAliveIntervalMs);
|
|
86
|
+
this.logger.debug({ streamId: this.streamId }, "Keep-alive timer started");
|
|
87
|
+
}
|
|
88
|
+
stopTimer() {
|
|
89
|
+
if (this.keepAliveTimer) {
|
|
90
|
+
clearInterval(this.keepAliveTimer);
|
|
91
|
+
this.keepAliveTimer = undefined;
|
|
92
|
+
this.logger.debug({ streamId: this.streamId }, "Keep-alive timer stopped");
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
async tick() {
|
|
96
|
+
if (this.disposed || !this.active)
|
|
97
|
+
return;
|
|
98
|
+
if (this.shouldSendKeepAlive && !this.shouldSendKeepAlive()) {
|
|
99
|
+
this.logger.warn({ streamId: this.streamId }, "Skipping keep-alive send because transport is unavailable");
|
|
100
|
+
return;
|
|
101
|
+
}
|
|
102
|
+
const ackId = this.createAckId();
|
|
103
|
+
const sentAt = this.now();
|
|
104
|
+
const timeout = setTimeout(() => {
|
|
105
|
+
this.onAckTimeout(ackId, sentAt);
|
|
106
|
+
}, this.ackTimeoutMs);
|
|
107
|
+
this.pendingAcks.set(ackId, { sentAt, timeout });
|
|
108
|
+
this.callbacks.onKeepAliveSent?.(ackId);
|
|
109
|
+
try {
|
|
110
|
+
await this.callbacks.sendKeepAlive(ackId);
|
|
111
|
+
}
|
|
112
|
+
catch (error) {
|
|
113
|
+
this.logger.error({ streamId: this.streamId, ackId, error }, "Error sending keep-alive");
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
onAckTimeout(ackId, sentAt) {
|
|
117
|
+
if (this.disposed)
|
|
118
|
+
return;
|
|
119
|
+
// Race guard: handleAck may have processed the ACK between the timeout
|
|
120
|
+
// being scheduled and this callback running. In that case the ackId is
|
|
121
|
+
// no longer pending — counting it as missed would falsely escalate.
|
|
122
|
+
if (!this.pendingAcks.has(ackId))
|
|
123
|
+
return;
|
|
124
|
+
this.pendingAcks.delete(ackId);
|
|
125
|
+
this.missedAcks += 1;
|
|
126
|
+
const ageMs = this.now() - sentAt;
|
|
127
|
+
this.logger.warn({ streamId: this.streamId, ackId, missedAcks: this.missedAcks, ageMs }, "Keep-alive ACK timeout");
|
|
128
|
+
this.callbacks.onKeepAliveMissed?.(ackId, ageMs, this.missedAcks);
|
|
129
|
+
if (this.missedAcks >= this.maxMissedAcks) {
|
|
130
|
+
this.logger.error({
|
|
131
|
+
streamId: this.streamId,
|
|
132
|
+
missedAcks: this.missedAcks,
|
|
133
|
+
maxMissedAcks: this.maxMissedAcks,
|
|
134
|
+
}, "Maximum missed ACKs reached; triggering timeout");
|
|
135
|
+
void this.callbacks.onTimeout();
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
clearPendingAcks() {
|
|
139
|
+
for (const { timeout } of this.pendingAcks.values()) {
|
|
140
|
+
clearTimeout(timeout);
|
|
141
|
+
}
|
|
142
|
+
this.pendingAcks.clear();
|
|
143
|
+
}
|
|
144
|
+
createAckId() {
|
|
145
|
+
return `a${this.now().toString(36).slice(-5)}`;
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
//# sourceMappingURL=StreamLifecycleController.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"StreamLifecycleController.js","sourceRoot":"","sources":["../../src/services/StreamLifecycleController.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAgCH;;;;;GAKG;AACH,MAAM,OAAO,yBAAyB;IAkBjB;IAjBX,cAAc,CAAiC;IAC/C,WAAW,GAAgC,IAAI,GAAG,EAAE,CAAA;IACpD,UAAU,GAAG,CAAC,CAAA;IACd,c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,UAAU;gBAC3B,aAAa,EAAE,IAAI,CAAC,aAAa;aAClC,EACD,iDAAiD,CAClD,CAAA;YAED,KAAK,IAAI,CAAC,SAAS,CAAC,SAAS,EAAE,CAAA;QACjC,CAAC;IACH,CAAC;IAEO,gBAAgB;QACtB,KAAK,MAAM,EAAC,OAAO,EAAC,IAAI,IAAI,CAAC,WAAW,CAAC,MAAM,EAAE,EAAE,CAAC;YAClD,YAAY,CAAC,OAAO,CAAC,CAAA;QACvB,CAAC;QACD,IAAI,CAAC,WAAW,CAAC,KAAK,EAAE,CAAA;IAC1B,CAAC;IAEO,WAAW;QACjB,OAAO,IAAI,IAAI,CAAC,GAAG,EAAE,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,EAAE,CAAA;IAChD,CAAC;CACF","sourcesContent":["/**\n * Drives RTMP stream liveliness checks via a keep-alive heartbeat:\n * `setActive(true)` starts the timer; each tick sends a keep-alive with a\n * fresh ackId; `maxMissedAcks` consecutive timeouts fire `onTimeout`.\n */\n\nexport interface LifecycleLogger {\n child(bindings: Record<string, unknown>): LifecycleLogger\n debug(...args: unknown[]): void\n warn(...args: unknown[]): void\n error(...args: unknown[]): void\n}\n\ninterface StreamLifecycleCallbacks {\n sendKeepAlive: (ackId: string) => Promise<void> | void\n onTimeout: () => Promise<void> | void\n onKeepAliveSent?: (ackId: string) => void\n onKeepAliveAcked?: (ackId: string, ageMs: number) => void\n onKeepAliveMissed?: (ackId: string, ageMs: number, missedCount: number) => void\n}\n\nexport interface StreamLifecycleOptions {\n logger: LifecycleLogger\n streamId: string\n keepAliveIntervalMs: number\n ackTimeoutMs: number\n maxMissedAcks: number\n shouldSendKeepAlive?: () => boolean\n now?: () => number\n}\n\ninterface PendingAckInfo {\n sentAt: number\n timeout: ReturnType<typeof setTimeout>\n}\n\n/**\n * Drives RTMP stream liveliness checks. Activate to start the heartbeat;\n * each tick sends a keep-alive with a fresh ackId and arms a timeout. When\n * `maxMissedAcks` consecutive timeouts fire, `onTimeout` is invoked and the\n * caller is expected to tear the stream down.\n */\nexport class StreamLifecycleController {\n private keepAliveTimer?: ReturnType<typeof setInterval>\n private pendingAcks: Map<string, PendingAckInfo> = new Map()\n private missedAcks = 0\n private lastActivityMs: number\n private active = false\n private disposed = false\n\n private readonly logger: LifecycleLogger\n private readonly streamId: string\n private readonly keepAliveIntervalMs: number\n private readonly ackTimeoutMs: number\n private readonly maxMissedAcks: number\n private readonly shouldSendKeepAlive?: () => boolean\n private readonly now: () => number\n\n constructor(\n options: StreamLifecycleOptions,\n private readonly callbacks: StreamLifecycleCallbacks,\n ) {\n this.logger = options.logger.child({component: \"StreamLifecycle\"})\n this.streamId = options.streamId\n this.keepAliveIntervalMs = options.keepAliveIntervalMs\n this.ackTimeoutMs = options.ackTimeoutMs\n this.maxMissedAcks = options.maxMissedAcks\n this.shouldSendKeepAlive = options.shouldSendKeepAlive\n this.now = options.now ?? (() => Date.now())\n this.lastActivityMs = this.now()\n }\n\n setActive(active: boolean): void {\n if (this.disposed || this.active === active) return\n\n this.logger.debug({streamId: this.streamId, active}, \"Updating lifecycle active state\")\n\n this.active = active\n if (active) {\n this.startTimer()\n } else {\n this.stopTimer()\n this.clearPendingAcks()\n this.missedAcks = 0\n }\n }\n\n recordActivity(): void {\n this.lastActivityMs = this.now()\n this.missedAcks = 0\n }\n\n handleAck(ackId: string): void {\n if (this.disposed) return\n\n const ackInfo = this.pendingAcks.get(ackId)\n if (!ackInfo) {\n this.logger.warn({streamId: this.streamId, ackId}, \"Received unknown keep-alive ACK\")\n return\n }\n\n clearTimeout(ackInfo.timeout)\n this.pendingAcks.delete(ackId)\n this.recordActivity()\n\n this.callbacks.onKeepAliveAcked?.(ackId, this.now() - ackInfo.sentAt)\n }\n\n dispose(): void {\n if (this.disposed) return\n\n this.disposed = true\n this.stopTimer()\n this.clearPendingAcks()\n this.logger.debug({streamId: this.streamId}, \"Lifecycle disposed\")\n }\n\n getLastActivityMs(): number {\n return this.lastActivityMs\n }\n\n private startTimer(): void {\n if (this.keepAliveTimer) return\n this.keepAliveTimer = setInterval(() => {\n void this.tick()\n }, this.keepAliveIntervalMs)\n this.logger.debug({streamId: this.streamId}, \"Keep-alive timer started\")\n }\n\n private stopTimer(): void {\n if (this.keepAliveTimer) {\n clearInterval(this.keepAliveTimer)\n this.keepAliveTimer = undefined\n this.logger.debug({streamId: this.streamId}, \"Keep-alive timer stopped\")\n }\n }\n\n private async tick(): Promise<void> {\n if (this.disposed || !this.active) return\n\n if (this.shouldSendKeepAlive && !this.shouldSendKeepAlive()) {\n this.logger.warn({streamId: this.streamId}, \"Skipping keep-alive send because transport is unavailable\")\n return\n }\n\n const ackId = this.createAckId()\n const sentAt = this.now()\n\n const timeout = setTimeout(() => {\n this.onAckTimeout(ackId, sentAt)\n }, this.ackTimeoutMs)\n\n this.pendingAcks.set(ackId, {sentAt, timeout})\n this.callbacks.onKeepAliveSent?.(ackId)\n\n try {\n await this.callbacks.sendKeepAlive(ackId)\n } catch (error) {\n this.logger.error({streamId: this.streamId, ackId, error}, \"Error sending keep-alive\")\n }\n }\n\n private onAckTimeout(ackId: string, sentAt: number): void {\n if (this.disposed) return\n\n // Race guard: handleAck may have processed the ACK between the timeout\n // being scheduled and this callback running. In that case the ackId is\n // no longer pending — counting it as missed would falsely escalate.\n if (!this.pendingAcks.has(ackId)) return\n\n this.pendingAcks.delete(ackId)\n this.missedAcks += 1\n const ageMs = this.now() - sentAt\n\n this.logger.warn({streamId: this.streamId, ackId, missedAcks: this.missedAcks, ageMs}, \"Keep-alive ACK timeout\")\n\n this.callbacks.onKeepAliveMissed?.(ackId, ageMs, this.missedAcks)\n\n if (this.missedAcks >= this.maxMissedAcks) {\n this.logger.error(\n {\n streamId: this.streamId,\n missedAcks: this.missedAcks,\n maxMissedAcks: this.maxMissedAcks,\n },\n \"Maximum missed ACKs reached; triggering timeout\",\n )\n\n void this.callbacks.onTimeout()\n }\n }\n\n private clearPendingAcks(): void {\n for (const {timeout} of this.pendingAcks.values()) {\n clearTimeout(timeout)\n }\n this.pendingAcks.clear()\n }\n\n private createAckId(): string {\n return `a${this.now().toString(36).slice(-5)}`\n }\n}\n"]}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { SupportStateInput } from "@glassly/cloud-client";
|
|
2
|
+
/**
|
|
3
|
+
* Keep Cloud V2's canonical support snapshot current without creating an event
|
|
4
|
+
* stream from noisy store updates. Only the explicitly selected fields below
|
|
5
|
+
* leave the phone; Wi-Fi, Bluetooth addresses, location and diagnostics do not.
|
|
6
|
+
*/
|
|
7
|
+
export declare function startSupportProfileSync(): void;
|
|
8
|
+
export declare function stopSupportProfileSync(): void;
|
|
9
|
+
export declare function retryDelayForSupportProfileResult(result: {
|
|
10
|
+
status: "accepted" | "deduplicated" | "stale";
|
|
11
|
+
}): number | null;
|
|
12
|
+
/**
|
|
13
|
+
* Support freshness is not worth an aggressive retry loop. A snapshot the
|
|
14
|
+
* server keeps rejecting (skewed clock, deleted account, signed-out host)
|
|
15
|
+
* backs off exponentially until it converges on the heartbeat cadence.
|
|
16
|
+
*/
|
|
17
|
+
export declare function retryDelayForSendFailure(consecutiveFailures: number): number;
|
|
18
|
+
export declare function buildSnapshot(observedAt?: Date): SupportStateInput;
|
|
19
|
+
/** Record only normalized connection failures; arbitrary exception messages never leave the phone. */
|
|
20
|
+
export declare function recordSupportProfileConnectionFailure(error: unknown, stage: string): void;
|
|
21
|
+
export declare function snapshotFingerprint(snapshot: SupportStateInput): string;
|
|
22
|
+
//# sourceMappingURL=SupportProfileSync.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SupportProfileSync.d.ts","sourceRoot":"","sources":["../../src/services/SupportProfileSync.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAC,iBAAiB,EAAC,MAAM,uBAAuB,CAAA;AAwB5D;;;;GAIG;AACH,wBAAgB,uBAAuB,IAAI,IAAI,CAO9C;AAED,wBAAgB,sBAAsB,IAAI,IAAI,CAgB7C;AA+ED,wBAAgB,iCAAiC,CAAC,MAAM,EAAE;IACxD,MAAM,EAAE,UAAU,GAAG,cAAc,GAAG,OAAO,CAAA;CAC9C,GAAG,MAAM,GAAG,IAAI,CAGhB;AAED;;;;GAIG;AACH,wBAAgB,wBAAwB,CAAC,mBAAmB,EAAE,MAAM,GAAG,MAAM,CAE5E;AAED,wBAAgB,aAAa,CAAC,UAAU,OAAa,GAAG,iBAAiB,CAoCxE;AAED,sGAAsG;AACtG,wBAAgB,qCAAqC,CAAC,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,GAAG,IAAI,CAiBzF;AAED,wBAAgB,mBAAmB,CAAC,QAAQ,EAAE,iBAAiB,GAAG,MAAM,CAEvE"}
|