@mentra/engine 0.1.0-beta.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (842) hide show
  1. package/README.md +79 -0
  2. package/build/devtools.d.ts +11 -0
  3. package/build/devtools.d.ts.map +1 -0
  4. package/build/devtools.js +13 -0
  5. package/build/devtools.js.map +1 -0
  6. package/build/engine.d.ts +261 -0
  7. package/build/engine.d.ts.map +1 -0
  8. package/build/engine.js +170 -0
  9. package/build/engine.js.map +1 -0
  10. package/build/facades/dev.d.ts +58 -0
  11. package/build/facades/dev.d.ts.map +1 -0
  12. package/build/facades/dev.js +189 -0
  13. package/build/facades/dev.js.map +1 -0
  14. package/build/facades/display.d.ts +21 -0
  15. package/build/facades/display.d.ts.map +1 -0
  16. package/build/facades/display.js +17 -0
  17. package/build/facades/display.js.map +1 -0
  18. package/build/facades/displayMirror.d.ts +15 -0
  19. package/build/facades/displayMirror.d.ts.map +1 -0
  20. package/build/facades/displayMirror.js +29 -0
  21. package/build/facades/displayMirror.js.map +1 -0
  22. package/build/facades/gallery.d.ts +62 -0
  23. package/build/facades/gallery.d.ts.map +1 -0
  24. package/build/facades/gallery.js +61 -0
  25. package/build/facades/gallery.js.map +1 -0
  26. package/build/facades/glasses.d.ts +141 -0
  27. package/build/facades/glasses.d.ts.map +1 -0
  28. package/build/facades/glasses.js +199 -0
  29. package/build/facades/glasses.js.map +1 -0
  30. package/build/facades/glassesSettings.d.ts +13 -0
  31. package/build/facades/glassesSettings.d.ts.map +1 -0
  32. package/build/facades/glassesSettings.js +54 -0
  33. package/build/facades/glassesSettings.js.map +1 -0
  34. package/build/facades/glassesWifi.d.ts +25 -0
  35. package/build/facades/glassesWifi.d.ts.map +1 -0
  36. package/build/facades/glassesWifi.js +57 -0
  37. package/build/facades/glassesWifi.js.map +1 -0
  38. package/build/facades/miniapps.d.ts +43 -0
  39. package/build/facades/miniapps.d.ts.map +1 -0
  40. package/build/facades/miniapps.js +49 -0
  41. package/build/facades/miniapps.js.map +1 -0
  42. package/build/facades/notifications.d.ts +13 -0
  43. package/build/facades/notifications.d.ts.map +1 -0
  44. package/build/facades/notifications.js +12 -0
  45. package/build/facades/notifications.js.map +1 -0
  46. package/build/facades/ota.d.ts +103 -0
  47. package/build/facades/ota.d.ts.map +1 -0
  48. package/build/facades/ota.js +156 -0
  49. package/build/facades/ota.js.map +1 -0
  50. package/build/facades/pairing.d.ts +114 -0
  51. package/build/facades/pairing.d.ts.map +1 -0
  52. package/build/facades/pairing.js +275 -0
  53. package/build/facades/pairing.js.map +1 -0
  54. package/build/facades/permissions.d.ts +33 -0
  55. package/build/facades/permissions.d.ts.map +1 -0
  56. package/build/facades/permissions.js +155 -0
  57. package/build/facades/permissions.js.map +1 -0
  58. package/build/facades/phoneNotifications.d.ts +21 -0
  59. package/build/facades/phoneNotifications.d.ts.map +1 -0
  60. package/build/facades/phoneNotifications.js +51 -0
  61. package/build/facades/phoneNotifications.js.map +1 -0
  62. package/build/facades/reports.d.ts +36 -0
  63. package/build/facades/reports.d.ts.map +1 -0
  64. package/build/facades/reports.js +134 -0
  65. package/build/facades/reports.js.map +1 -0
  66. package/build/facades/session.d.ts +21 -0
  67. package/build/facades/session.d.ts.map +1 -0
  68. package/build/facades/session.js +52 -0
  69. package/build/facades/session.js.map +1 -0
  70. package/build/facades/settings.d.ts +37 -0
  71. package/build/facades/settings.d.ts.map +1 -0
  72. package/build/facades/settings.js +55 -0
  73. package/build/facades/settings.js.map +1 -0
  74. package/build/facades/speech.d.ts +30 -0
  75. package/build/facades/speech.d.ts.map +1 -0
  76. package/build/facades/speech.js +37 -0
  77. package/build/facades/speech.js.map +1 -0
  78. package/build/index.d.ts +43 -0
  79. package/build/index.d.ts.map +1 -0
  80. package/build/index.js +45 -0
  81. package/build/index.js.map +1 -0
  82. package/build/internal.d.ts +67 -0
  83. package/build/internal.d.ts.map +1 -0
  84. package/build/internal.js +90 -0
  85. package/build/internal.js.map +1 -0
  86. package/build/runtime/bootstrap.d.ts +83 -0
  87. package/build/runtime/bootstrap.d.ts.map +1 -0
  88. package/build/runtime/bootstrap.js +56 -0
  89. package/build/runtime/bootstrap.js.map +1 -0
  90. package/build/runtime/config.d.ts +146 -0
  91. package/build/runtime/config.d.ts.map +1 -0
  92. package/build/runtime/config.js +18 -0
  93. package/build/runtime/config.js.map +1 -0
  94. package/build/runtime/streamConfig.d.ts +4 -0
  95. package/build/runtime/streamConfig.d.ts.map +1 -0
  96. package/build/runtime/streamConfig.js +38 -0
  97. package/build/runtime/streamConfig.js.map +1 -0
  98. package/build/services/AppRegistry.d.ts +269 -0
  99. package/build/services/AppRegistry.d.ts.map +1 -0
  100. package/build/services/AppRegistry.js +1079 -0
  101. package/build/services/AppRegistry.js.map +1 -0
  102. package/build/services/AudioCloudUplink.d.ts +9 -0
  103. package/build/services/AudioCloudUplink.d.ts.map +1 -0
  104. package/build/services/AudioCloudUplink.js +48 -0
  105. package/build/services/AudioCloudUplink.js.map +1 -0
  106. package/build/services/AudioPlaybackService.d.ts +175 -0
  107. package/build/services/AudioPlaybackService.d.ts.map +1 -0
  108. package/build/services/AudioPlaybackService.js +705 -0
  109. package/build/services/AudioPlaybackService.js.map +1 -0
  110. package/build/services/AutomaticReportResult.d.ts +20 -0
  111. package/build/services/AutomaticReportResult.d.ts.map +1 -0
  112. package/build/services/AutomaticReportResult.js +29 -0
  113. package/build/services/AutomaticReportResult.js.map +1 -0
  114. package/build/services/BlobStore.d.ts +91 -0
  115. package/build/services/BlobStore.d.ts.map +1 -0
  116. package/build/services/BlobStore.js +668 -0
  117. package/build/services/BlobStore.js.map +1 -0
  118. package/build/services/CaptionsTesterReportService.d.ts +4 -0
  119. package/build/services/CaptionsTesterReportService.d.ts.map +1 -0
  120. package/build/services/CaptionsTesterReportService.js +80 -0
  121. package/build/services/CaptionsTesterReportService.js.map +1 -0
  122. package/build/services/CloudAudioSubscriptionSync.d.ts +24 -0
  123. package/build/services/CloudAudioSubscriptionSync.d.ts.map +1 -0
  124. package/build/services/CloudAudioSubscriptionSync.js +39 -0
  125. package/build/services/CloudAudioSubscriptionSync.js.map +1 -0
  126. package/build/services/CloudClientService.d.ts +143 -0
  127. package/build/services/CloudClientService.d.ts.map +1 -0
  128. package/build/services/CloudClientService.js +644 -0
  129. package/build/services/CloudClientService.js.map +1 -0
  130. package/build/services/CloudTranscriptE2EMetrics.d.ts +4 -0
  131. package/build/services/CloudTranscriptE2EMetrics.d.ts.map +1 -0
  132. package/build/services/CloudTranscriptE2EMetrics.js +24 -0
  133. package/build/services/CloudTranscriptE2EMetrics.js.map +1 -0
  134. package/build/services/ConnectionCoordinator.d.ts +51 -0
  135. package/build/services/ConnectionCoordinator.d.ts.map +1 -0
  136. package/build/services/ConnectionCoordinator.js +34 -0
  137. package/build/services/ConnectionCoordinator.js.map +1 -0
  138. package/build/services/DevServerBridge.d.ts +63 -0
  139. package/build/services/DevServerBridge.d.ts.map +1 -0
  140. package/build/services/DevServerBridge.js +294 -0
  141. package/build/services/DevServerBridge.js.map +1 -0
  142. package/build/services/DeviceEventRouter.d.ts +3 -0
  143. package/build/services/DeviceEventRouter.d.ts.map +1 -0
  144. package/build/services/DeviceEventRouter.js +190 -0
  145. package/build/services/DeviceEventRouter.js.map +1 -0
  146. package/build/services/DeviceStoreHydration.d.ts +38 -0
  147. package/build/services/DeviceStoreHydration.d.ts.map +1 -0
  148. package/build/services/DeviceStoreHydration.js +124 -0
  149. package/build/services/DeviceStoreHydration.js.map +1 -0
  150. package/build/services/DisplayProcessor.d.ts +223 -0
  151. package/build/services/DisplayProcessor.d.ts.map +1 -0
  152. package/build/services/DisplayProcessor.js +552 -0
  153. package/build/services/DisplayProcessor.js.map +1 -0
  154. package/build/services/GlassesReadiness.d.ts +41 -0
  155. package/build/services/GlassesReadiness.d.ts.map +1 -0
  156. package/build/services/GlassesReadiness.js +82 -0
  157. package/build/services/GlassesReadiness.js.map +1 -0
  158. package/build/services/GlassesSettingsSync.d.ts +33 -0
  159. package/build/services/GlassesSettingsSync.d.ts.map +1 -0
  160. package/build/services/GlassesSettingsSync.js +121 -0
  161. package/build/services/GlassesSettingsSync.js.map +1 -0
  162. package/build/services/GlassesStatusProjection.d.ts +3 -0
  163. package/build/services/GlassesStatusProjection.d.ts.map +1 -0
  164. package/build/services/GlassesStatusProjection.js +65 -0
  165. package/build/services/GlassesStatusProjection.js.map +1 -0
  166. package/build/services/HeadingService.d.ts +27 -0
  167. package/build/services/HeadingService.d.ts.map +1 -0
  168. package/build/services/HeadingService.js +96 -0
  169. package/build/services/HeadingService.js.map +1 -0
  170. package/build/services/LocalDisplayManager.d.ts +139 -0
  171. package/build/services/LocalDisplayManager.d.ts.map +1 -0
  172. package/build/services/LocalDisplayManager.js +579 -0
  173. package/build/services/LocalDisplayManager.js.map +1 -0
  174. package/build/services/LocalMiniappRuntime.d.ts +439 -0
  175. package/build/services/LocalMiniappRuntime.d.ts.map +1 -0
  176. package/build/services/LocalMiniappRuntime.js +3695 -0
  177. package/build/services/LocalMiniappRuntime.js.map +1 -0
  178. package/build/services/LocalSttFallbackCoordinator.d.ts +57 -0
  179. package/build/services/LocalSttFallbackCoordinator.d.ts.map +1 -0
  180. package/build/services/LocalSttFallbackCoordinator.js +137 -0
  181. package/build/services/LocalSttFallbackCoordinator.js.map +1 -0
  182. package/build/services/MentraJSCrashController.d.ts +97 -0
  183. package/build/services/MentraJSCrashController.d.ts.map +1 -0
  184. package/build/services/MentraJSCrashController.js +138 -0
  185. package/build/services/MentraJSCrashController.js.map +1 -0
  186. package/build/services/MentraJSCrashloopReportService.d.ts +9 -0
  187. package/build/services/MentraJSCrashloopReportService.d.ts.map +1 -0
  188. package/build/services/MentraJSCrashloopReportService.js +54 -0
  189. package/build/services/MentraJSCrashloopReportService.js.map +1 -0
  190. package/build/services/MentraJSLogPipeline.d.ts +87 -0
  191. package/build/services/MentraJSLogPipeline.d.ts.map +1 -0
  192. package/build/services/MentraJSLogPipeline.js +137 -0
  193. package/build/services/MentraJSLogPipeline.js.map +1 -0
  194. package/build/services/MentraJSRouter.d.ts +203 -0
  195. package/build/services/MentraJSRouter.d.ts.map +1 -0
  196. package/build/services/MentraJSRouter.js +480 -0
  197. package/build/services/MentraJSRouter.js.map +1 -0
  198. package/build/services/MentraUIRouter.d.ts +137 -0
  199. package/build/services/MentraUIRouter.d.ts.map +1 -0
  200. package/build/services/MentraUIRouter.js +210 -0
  201. package/build/services/MentraUIRouter.js.map +1 -0
  202. package/build/services/MicStateCoordinator.d.ts +37 -0
  203. package/build/services/MicStateCoordinator.d.ts.map +1 -0
  204. package/build/services/MicStateCoordinator.js +81 -0
  205. package/build/services/MicStateCoordinator.js.map +1 -0
  206. package/build/services/MiniappEngine.d.ts +31 -0
  207. package/build/services/MiniappEngine.d.ts.map +1 -0
  208. package/build/services/MiniappEngine.js +119 -0
  209. package/build/services/MiniappEngine.js.map +1 -0
  210. package/build/services/MiniappLauncher.d.ts +129 -0
  211. package/build/services/MiniappLauncher.d.ts.map +1 -0
  212. package/build/services/MiniappLauncher.js +291 -0
  213. package/build/services/MiniappLauncher.js.map +1 -0
  214. package/build/services/MiniappRunningRegistry.d.ts +24 -0
  215. package/build/services/MiniappRunningRegistry.d.ts.map +1 -0
  216. package/build/services/MiniappRunningRegistry.js +52 -0
  217. package/build/services/MiniappRunningRegistry.js.map +1 -0
  218. package/build/services/NativeHttpResponse.d.ts +3 -0
  219. package/build/services/NativeHttpResponse.d.ts.map +1 -0
  220. package/build/services/NativeHttpResponse.js +6 -0
  221. package/build/services/NativeHttpResponse.js.map +1 -0
  222. package/build/services/NavigationHandlers.d.ts +90 -0
  223. package/build/services/NavigationHandlers.d.ts.map +1 -0
  224. package/build/services/NavigationHandlers.js +379 -0
  225. package/build/services/NavigationHandlers.js.map +1 -0
  226. package/build/services/NavigationService.d.ts +254 -0
  227. package/build/services/NavigationService.d.ts.map +1 -0
  228. package/build/services/NavigationService.js +553 -0
  229. package/build/services/NavigationService.js.map +1 -0
  230. package/build/services/NotificationsEmitter.d.ts +28 -0
  231. package/build/services/NotificationsEmitter.d.ts.map +1 -0
  232. package/build/services/NotificationsEmitter.js +22 -0
  233. package/build/services/NotificationsEmitter.js.map +1 -0
  234. package/build/services/OfflineSpeechModelService.d.ts +33 -0
  235. package/build/services/OfflineSpeechModelService.d.ts.map +1 -0
  236. package/build/services/OfflineSpeechModelService.js +136 -0
  237. package/build/services/OfflineSpeechModelService.js.map +1 -0
  238. package/build/services/OtaInstallCoordinator.d.ts +195 -0
  239. package/build/services/OtaInstallCoordinator.d.ts.map +1 -0
  240. package/build/services/OtaInstallCoordinator.js +1047 -0
  241. package/build/services/OtaInstallCoordinator.js.map +1 -0
  242. package/build/services/OtaService.d.ts +3 -0
  243. package/build/services/OtaService.d.ts.map +1 -0
  244. package/build/services/OtaService.js +65 -0
  245. package/build/services/OtaService.js.map +1 -0
  246. package/build/services/OtaUpdateCheckService.d.ts +65 -0
  247. package/build/services/OtaUpdateCheckService.d.ts.map +1 -0
  248. package/build/services/OtaUpdateCheckService.js +260 -0
  249. package/build/services/OtaUpdateCheckService.js.map +1 -0
  250. package/build/services/PairingIdentity.d.ts +80 -0
  251. package/build/services/PairingIdentity.d.ts.map +1 -0
  252. package/build/services/PairingIdentity.js +145 -0
  253. package/build/services/PairingIdentity.js.map +1 -0
  254. package/build/services/PhoneCalendarHelpers.d.ts +32 -0
  255. package/build/services/PhoneCalendarHelpers.d.ts.map +1 -0
  256. package/build/services/PhoneCalendarHelpers.js +157 -0
  257. package/build/services/PhoneCalendarHelpers.js.map +1 -0
  258. package/build/services/PhoneCalendarService.d.ts +5 -0
  259. package/build/services/PhoneCalendarService.d.ts.map +1 -0
  260. package/build/services/PhoneCalendarService.js +24 -0
  261. package/build/services/PhoneCalendarService.js.map +1 -0
  262. package/build/services/PhoneCameraFovCoordinator.d.ts +28 -0
  263. package/build/services/PhoneCameraFovCoordinator.d.ts.map +1 -0
  264. package/build/services/PhoneCameraFovCoordinator.js +180 -0
  265. package/build/services/PhoneCameraFovCoordinator.js.map +1 -0
  266. package/build/services/PhoneLocationService.d.ts +36 -0
  267. package/build/services/PhoneLocationService.d.ts.map +1 -0
  268. package/build/services/PhoneLocationService.js +115 -0
  269. package/build/services/PhoneLocationService.js.map +1 -0
  270. package/build/services/PhoneNotificationsSync.d.ts +3 -0
  271. package/build/services/PhoneNotificationsSync.d.ts.map +1 -0
  272. package/build/services/PhoneNotificationsSync.js +35 -0
  273. package/build/services/PhoneNotificationsSync.js.map +1 -0
  274. package/build/services/PhonePhotoCoordinator.d.ts +103 -0
  275. package/build/services/PhonePhotoCoordinator.d.ts.map +1 -0
  276. package/build/services/PhonePhotoCoordinator.js +326 -0
  277. package/build/services/PhonePhotoCoordinator.js.map +1 -0
  278. package/build/services/PhoneStreamCoordinator.d.ts +168 -0
  279. package/build/services/PhoneStreamCoordinator.d.ts.map +1 -0
  280. package/build/services/PhoneStreamCoordinator.js +632 -0
  281. package/build/services/PhoneStreamCoordinator.js.map +1 -0
  282. package/build/services/PhoneVideoCoordinator.d.ts +50 -0
  283. package/build/services/PhoneVideoCoordinator.d.ts.map +1 -0
  284. package/build/services/PhoneVideoCoordinator.js +147 -0
  285. package/build/services/PhoneVideoCoordinator.js.map +1 -0
  286. package/build/services/STTModelManager.d.ts +65 -0
  287. package/build/services/STTModelManager.d.ts.map +1 -0
  288. package/build/services/STTModelManager.js +292 -0
  289. package/build/services/STTModelManager.js.map +1 -0
  290. package/build/services/SceneRenderer.d.ts +90 -0
  291. package/build/services/SceneRenderer.d.ts.map +1 -0
  292. package/build/services/SceneRenderer.js +248 -0
  293. package/build/services/SceneRenderer.js.map +1 -0
  294. package/build/services/SentenceTtsPipeline.d.ts +31 -0
  295. package/build/services/SentenceTtsPipeline.d.ts.map +1 -0
  296. package/build/services/SentenceTtsPipeline.js +67 -0
  297. package/build/services/SentenceTtsPipeline.js.map +1 -0
  298. package/build/services/StreamLifecycleController.d.ts +67 -0
  299. package/build/services/StreamLifecycleController.d.ts.map +1 -0
  300. package/build/services/StreamLifecycleController.js +152 -0
  301. package/build/services/StreamLifecycleController.js.map +1 -0
  302. package/build/services/TTSModelManager.d.ts +90 -0
  303. package/build/services/TTSModelManager.d.ts.map +1 -0
  304. package/build/services/TTSModelManager.js +366 -0
  305. package/build/services/TTSModelManager.js.map +1 -0
  306. package/build/services/TranscriptionRouting.d.ts +12 -0
  307. package/build/services/TranscriptionRouting.d.ts.map +1 -0
  308. package/build/services/TranscriptionRouting.js +24 -0
  309. package/build/services/TranscriptionRouting.js.map +1 -0
  310. package/build/services/WebviewBridge.d.ts +22 -0
  311. package/build/services/WebviewBridge.d.ts.map +1 -0
  312. package/build/services/WebviewBridge.js +47 -0
  313. package/build/services/WebviewBridge.js.map +1 -0
  314. package/build/services/asg/GalleryMediaIntegrityReportService.d.ts +17 -0
  315. package/build/services/asg/GalleryMediaIntegrityReportService.d.ts.map +1 -0
  316. package/build/services/asg/GalleryMediaIntegrityReportService.js +43 -0
  317. package/build/services/asg/GalleryMediaIntegrityReportService.js.map +1 -0
  318. package/build/services/asg/asgCameraApi.d.ts +205 -0
  319. package/build/services/asg/asgCameraApi.d.ts.map +1 -0
  320. package/build/services/asg/asgCameraApi.js +1410 -0
  321. package/build/services/asg/asgCameraApi.js.map +1 -0
  322. package/build/services/asg/cameraRollExportCoordinator.d.ts +60 -0
  323. package/build/services/asg/cameraRollExportCoordinator.d.ts.map +1 -0
  324. package/build/services/asg/cameraRollExportCoordinator.js +618 -0
  325. package/build/services/asg/cameraRollExportCoordinator.js.map +1 -0
  326. package/build/services/asg/cameraRollExportLedger.d.ts +44 -0
  327. package/build/services/asg/cameraRollExportLedger.d.ts.map +1 -0
  328. package/build/services/asg/cameraRollExportLedger.js +78 -0
  329. package/build/services/asg/cameraRollExportLedger.js.map +1 -0
  330. package/build/services/asg/galleryMediaValidation.d.ts +29 -0
  331. package/build/services/asg/galleryMediaValidation.d.ts.map +1 -0
  332. package/build/services/asg/galleryMediaValidation.js +149 -0
  333. package/build/services/asg/galleryMediaValidation.js.map +1 -0
  334. package/build/services/asg/galleryNotices.d.ts +33 -0
  335. package/build/services/asg/galleryNotices.d.ts.map +1 -0
  336. package/build/services/asg/galleryNotices.js +29 -0
  337. package/build/services/asg/galleryNotices.js.map +1 -0
  338. package/build/services/asg/galleryPathMigration.d.ts +3 -0
  339. package/build/services/asg/galleryPathMigration.d.ts.map +1 -0
  340. package/build/services/asg/galleryPathMigration.js +26 -0
  341. package/build/services/asg/galleryPathMigration.js.map +1 -0
  342. package/build/services/asg/gallerySettingsService.d.ts +20 -0
  343. package/build/services/asg/gallerySettingsService.d.ts.map +1 -0
  344. package/build/services/asg/gallerySettingsService.js +53 -0
  345. package/build/services/asg/gallerySettingsService.js.map +1 -0
  346. package/build/services/asg/gallerySyncNotifications.d.ts +56 -0
  347. package/build/services/asg/gallerySyncNotifications.d.ts.map +1 -0
  348. package/build/services/asg/gallerySyncNotifications.js +198 -0
  349. package/build/services/asg/gallerySyncNotifications.js.map +1 -0
  350. package/build/services/asg/gallerySyncService.d.ts +137 -0
  351. package/build/services/asg/gallerySyncService.d.ts.map +1 -0
  352. package/build/services/asg/gallerySyncService.js +1933 -0
  353. package/build/services/asg/gallerySyncService.js.map +1 -0
  354. package/build/services/asg/galleryTransferLedger.d.ts +58 -0
  355. package/build/services/asg/galleryTransferLedger.d.ts.map +1 -0
  356. package/build/services/asg/galleryTransferLedger.js +225 -0
  357. package/build/services/asg/galleryTransferLedger.js.map +1 -0
  358. package/build/services/asg/localNetworkTransport.d.ts +15 -0
  359. package/build/services/asg/localNetworkTransport.d.ts.map +1 -0
  360. package/build/services/asg/localNetworkTransport.js +144 -0
  361. package/build/services/asg/localNetworkTransport.js.map +1 -0
  362. package/build/services/asg/localStorageService.d.ts +146 -0
  363. package/build/services/asg/localStorageService.d.ts.map +1 -0
  364. package/build/services/asg/localStorageService.js +572 -0
  365. package/build/services/asg/localStorageService.js.map +1 -0
  366. package/build/services/asg/mediaProcessingQueue.d.ts +70 -0
  367. package/build/services/asg/mediaProcessingQueue.d.ts.map +1 -0
  368. package/build/services/asg/mediaProcessingQueue.js +451 -0
  369. package/build/services/asg/mediaProcessingQueue.js.map +1 -0
  370. package/build/services/asgOtaVersionUrl.d.ts +2 -0
  371. package/build/services/asgOtaVersionUrl.d.ts.map +1 -0
  372. package/build/services/asgOtaVersionUrl.js +36 -0
  373. package/build/services/asgOtaVersionUrl.js.map +1 -0
  374. package/build/services/blobPaths.d.ts +31 -0
  375. package/build/services/blobPaths.d.ts.map +1 -0
  376. package/build/services/blobPaths.js +86 -0
  377. package/build/services/blobPaths.js.map +1 -0
  378. package/build/services/cloudStreamApi.d.ts +59 -0
  379. package/build/services/cloudStreamApi.d.ts.map +1 -0
  380. package/build/services/cloudStreamApi.js +81 -0
  381. package/build/services/cloudStreamApi.js.map +1 -0
  382. package/build/services/gallerySyncClock.d.ts +17 -0
  383. package/build/services/gallerySyncClock.d.ts.map +1 -0
  384. package/build/services/gallerySyncClock.js +21 -0
  385. package/build/services/gallerySyncClock.js.map +1 -0
  386. package/build/services/glassesClockSync.d.ts +20 -0
  387. package/build/services/glassesClockSync.d.ts.map +1 -0
  388. package/build/services/glassesClockSync.js +97 -0
  389. package/build/services/glassesClockSync.js.map +1 -0
  390. package/build/services/manifestVersionGate.d.ts +28 -0
  391. package/build/services/manifestVersionGate.d.ts.map +1 -0
  392. package/build/services/manifestVersionGate.js +41 -0
  393. package/build/services/manifestVersionGate.js.map +1 -0
  394. package/build/services/mentraUiShim.d.ts +38 -0
  395. package/build/services/mentraUiShim.d.ts.map +1 -0
  396. package/build/services/mentraUiShim.js +360 -0
  397. package/build/services/mentraUiShim.js.map +1 -0
  398. package/build/services/navigation/roadNameResolver.d.ts +67 -0
  399. package/build/services/navigation/roadNameResolver.d.ts.map +1 -0
  400. package/build/services/navigation/roadNameResolver.js +96 -0
  401. package/build/services/navigation/roadNameResolver.js.map +1 -0
  402. package/build/services/navigation/routesApiCodec.d.ts +38 -0
  403. package/build/services/navigation/routesApiCodec.d.ts.map +1 -0
  404. package/build/services/navigation/routesApiCodec.js +68 -0
  405. package/build/services/navigation/routesApiCodec.js.map +1 -0
  406. package/build/services/otaDisplayState.d.ts +42 -0
  407. package/build/services/otaDisplayState.d.ts.map +1 -0
  408. package/build/services/otaDisplayState.js +92 -0
  409. package/build/services/otaDisplayState.js.map +1 -0
  410. package/build/services/otaInstallPolicy.d.ts +81 -0
  411. package/build/services/otaInstallPolicy.d.ts.map +1 -0
  412. package/build/services/otaInstallPolicy.js +96 -0
  413. package/build/services/otaInstallPolicy.js.map +1 -0
  414. package/build/services/otaLegacyMapping.d.ts +22 -0
  415. package/build/services/otaLegacyMapping.d.ts.map +1 -0
  416. package/build/services/otaLegacyMapping.js +56 -0
  417. package/build/services/otaLegacyMapping.js.map +1 -0
  418. package/build/services/slimStreamStatus.d.ts +7 -0
  419. package/build/services/slimStreamStatus.d.ts.map +1 -0
  420. package/build/services/slimStreamStatus.js +26 -0
  421. package/build/services/slimStreamStatus.js.map +1 -0
  422. package/build/stores/apps.d.ts +104 -0
  423. package/build/stores/apps.d.ts.map +1 -0
  424. package/build/stores/apps.js +492 -0
  425. package/build/stores/apps.js.map +1 -0
  426. package/build/stores/bluetoothSettingKeys.d.ts +4 -0
  427. package/build/stores/bluetoothSettingKeys.d.ts.map +1 -0
  428. package/build/stores/bluetoothSettingKeys.js +31 -0
  429. package/build/stores/bluetoothSettingKeys.js.map +1 -0
  430. package/build/stores/cloudClientStatus.d.ts +9 -0
  431. package/build/stores/cloudClientStatus.d.ts.map +1 -0
  432. package/build/stores/cloudClientStatus.js +24 -0
  433. package/build/stores/cloudClientStatus.js.map +1 -0
  434. package/build/stores/connection.d.ts +22 -0
  435. package/build/stores/connection.d.ts.map +1 -0
  436. package/build/stores/connection.js +43 -0
  437. package/build/stores/connection.js.map +1 -0
  438. package/build/stores/core.d.ts +15 -0
  439. package/build/stores/core.d.ts.map +1 -0
  440. package/build/stores/core.js +21 -0
  441. package/build/stores/core.js.map +1 -0
  442. package/build/stores/display.d.ts +24 -0
  443. package/build/stores/display.d.ts.map +1 -0
  444. package/build/stores/display.js +96 -0
  445. package/build/stores/display.js.map +1 -0
  446. package/build/stores/gallerySync.d.ts +101 -0
  447. package/build/stores/gallerySync.d.ts.map +1 -0
  448. package/build/stores/gallerySync.js +217 -0
  449. package/build/stores/gallerySync.js.map +1 -0
  450. package/build/stores/glasses.d.ts +62 -0
  451. package/build/stores/glasses.d.ts.map +1 -0
  452. package/build/stores/glasses.js +203 -0
  453. package/build/stores/glasses.js.map +1 -0
  454. package/build/stores/settings.d.ts +37 -0
  455. package/build/stores/settings.d.ts.map +1 -0
  456. package/build/stores/settings.js +922 -0
  457. package/build/stores/settings.js.map +1 -0
  458. package/build/types/applet.d.ts +96 -0
  459. package/build/types/applet.d.ts.map +1 -0
  460. package/build/types/applet.js +5 -0
  461. package/build/types/applet.js.map +1 -0
  462. package/build/types/asg.d.ts +53 -0
  463. package/build/types/asg.d.ts.map +1 -0
  464. package/build/types/asg.js +2 -0
  465. package/build/types/asg.js.map +1 -0
  466. package/build/types/capabilities/even-realities-g1.d.ts +12 -0
  467. package/build/types/capabilities/even-realities-g1.d.ts.map +1 -0
  468. package/build/types/capabilities/even-realities-g1.js +55 -0
  469. package/build/types/capabilities/even-realities-g1.js.map +1 -0
  470. package/build/types/capabilities/even-realities-g2.d.ts +12 -0
  471. package/build/types/capabilities/even-realities-g2.d.ts.map +1 -0
  472. package/build/types/capabilities/even-realities-g2.js +75 -0
  473. package/build/types/capabilities/even-realities-g2.js.map +1 -0
  474. package/build/types/capabilities/mentra-display.d.ts +12 -0
  475. package/build/types/capabilities/mentra-display.d.ts.map +1 -0
  476. package/build/types/capabilities/mentra-display.js +63 -0
  477. package/build/types/capabilities/mentra-display.js.map +1 -0
  478. package/build/types/capabilities/mentra-live.d.ts +12 -0
  479. package/build/types/capabilities/mentra-live.d.ts.map +1 -0
  480. package/build/types/capabilities/mentra-live.js +92 -0
  481. package/build/types/capabilities/mentra-live.js.map +1 -0
  482. package/build/types/capabilities/none.d.ts +13 -0
  483. package/build/types/capabilities/none.d.ts.map +1 -0
  484. package/build/types/capabilities/none.js +65 -0
  485. package/build/types/capabilities/none.js.map +1 -0
  486. package/build/types/capabilities/simulated-glasses.d.ts +13 -0
  487. package/build/types/capabilities/simulated-glasses.d.ts.map +1 -0
  488. package/build/types/capabilities/simulated-glasses.js +65 -0
  489. package/build/types/capabilities/simulated-glasses.js.map +1 -0
  490. package/build/types/capabilities/vuzix-z100.d.ts +12 -0
  491. package/build/types/capabilities/vuzix-z100.d.ts.map +1 -0
  492. package/build/types/capabilities/vuzix-z100.js +52 -0
  493. package/build/types/capabilities/vuzix-z100.js.map +1 -0
  494. package/build/types/enums.d.ts +40 -0
  495. package/build/types/enums.d.ts.map +1 -0
  496. package/build/types/enums.js +44 -0
  497. package/build/types/enums.js.map +1 -0
  498. package/build/types/hardware.d.ts +160 -0
  499. package/build/types/hardware.d.ts.map +1 -0
  500. package/build/types/hardware.js +36 -0
  501. package/build/types/hardware.js.map +1 -0
  502. package/build/types/index.d.ts +11 -0
  503. package/build/types/index.d.ts.map +1 -0
  504. package/build/types/index.js +10 -0
  505. package/build/types/index.js.map +1 -0
  506. package/build/utils/GlobalEventEmitter.d.ts +10 -0
  507. package/build/utils/GlobalEventEmitter.d.ts.map +1 -0
  508. package/build/utils/GlobalEventEmitter.js +13 -0
  509. package/build/utils/GlobalEventEmitter.js.map +1 -0
  510. package/build/utils/cloudClient/RnUdpAdapter.d.ts +3 -0
  511. package/build/utils/cloudClient/RnUdpAdapter.d.ts.map +1 -0
  512. package/build/utils/cloudClient/RnUdpAdapter.js +41 -0
  513. package/build/utils/cloudClient/RnUdpAdapter.js.map +1 -0
  514. package/build/utils/cloudClient/cloudSecureStore.d.ts +3 -0
  515. package/build/utils/cloudClient/cloudSecureStore.d.ts.map +1 -0
  516. package/build/utils/cloudClient/cloudSecureStore.js +26 -0
  517. package/build/utils/cloudClient/cloudSecureStore.js.map +1 -0
  518. package/build/utils/debouncedPatch.d.ts +6 -0
  519. package/build/utils/debouncedPatch.d.ts.map +1 -0
  520. package/build/utils/debouncedPatch.js +25 -0
  521. package/build/utils/debouncedPatch.js.map +1 -0
  522. package/build/utils/devLogging.d.ts +26 -0
  523. package/build/utils/devLogging.d.ts.map +1 -0
  524. package/build/utils/devLogging.js +116 -0
  525. package/build/utils/devLogging.js.map +1 -0
  526. package/build/utils/devMiniappLaunch.d.ts +44 -0
  527. package/build/utils/devMiniappLaunch.d.ts.map +1 -0
  528. package/build/utils/devMiniappLaunch.js +52 -0
  529. package/build/utils/devMiniappLaunch.js.map +1 -0
  530. package/build/utils/diagnosticContext.d.ts +3 -0
  531. package/build/utils/diagnosticContext.d.ts.map +1 -0
  532. package/build/utils/diagnosticContext.js +119 -0
  533. package/build/utils/diagnosticContext.js.map +1 -0
  534. package/build/utils/display/composer/ColumnComposer.d.ts +131 -0
  535. package/build/utils/display/composer/ColumnComposer.d.ts.map +1 -0
  536. package/build/utils/display/composer/ColumnComposer.js +204 -0
  537. package/build/utils/display/composer/ColumnComposer.js.map +1 -0
  538. package/build/utils/display/composer/index.d.ts +9 -0
  539. package/build/utils/display/composer/index.d.ts.map +1 -0
  540. package/build/utils/display/composer/index.js +9 -0
  541. package/build/utils/display/composer/index.js.map +1 -0
  542. package/build/utils/display/helpers/DisplayHelpers.d.ts +165 -0
  543. package/build/utils/display/helpers/DisplayHelpers.d.ts.map +1 -0
  544. package/build/utils/display/helpers/DisplayHelpers.js +312 -0
  545. package/build/utils/display/helpers/DisplayHelpers.js.map +1 -0
  546. package/build/utils/display/helpers/ScrollView.d.ts +183 -0
  547. package/build/utils/display/helpers/ScrollView.d.ts.map +1 -0
  548. package/build/utils/display/helpers/ScrollView.js +257 -0
  549. package/build/utils/display/helpers/ScrollView.js.map +1 -0
  550. package/build/utils/display/helpers/index.d.ts +11 -0
  551. package/build/utils/display/helpers/index.d.ts.map +1 -0
  552. package/build/utils/display/helpers/index.js +10 -0
  553. package/build/utils/display/helpers/index.js.map +1 -0
  554. package/build/utils/display/index.d.ts +174 -0
  555. package/build/utils/display/index.d.ts.map +1 -0
  556. package/build/utils/display/index.js +185 -0
  557. package/build/utils/display/index.js.map +1 -0
  558. package/build/utils/display/measurer/TextMeasurer.d.ts +160 -0
  559. package/build/utils/display/measurer/TextMeasurer.d.ts.map +1 -0
  560. package/build/utils/display/measurer/TextMeasurer.js +273 -0
  561. package/build/utils/display/measurer/TextMeasurer.js.map +1 -0
  562. package/build/utils/display/measurer/index.d.ts +10 -0
  563. package/build/utils/display/measurer/index.d.ts.map +1 -0
  564. package/build/utils/display/measurer/index.js +11 -0
  565. package/build/utils/display/measurer/index.js.map +1 -0
  566. package/build/utils/display/measurer/script-detection.d.ts +53 -0
  567. package/build/utils/display/measurer/script-detection.d.ts.map +1 -0
  568. package/build/utils/display/measurer/script-detection.js +184 -0
  569. package/build/utils/display/measurer/script-detection.js.map +1 -0
  570. package/build/utils/display/profiles/g1.d.ts +33 -0
  571. package/build/utils/display/profiles/g1.d.ts.map +1 -0
  572. package/build/utils/display/profiles/g1.js +213 -0
  573. package/build/utils/display/profiles/g1.js.map +1 -0
  574. package/build/utils/display/profiles/g2.d.ts +13 -0
  575. package/build/utils/display/profiles/g2.d.ts.map +1 -0
  576. package/build/utils/display/profiles/g2.js +34 -0
  577. package/build/utils/display/profiles/g2.js.map +1 -0
  578. package/build/utils/display/profiles/index.d.ts +12 -0
  579. package/build/utils/display/profiles/index.d.ts.map +1 -0
  580. package/build/utils/display/profiles/index.js +15 -0
  581. package/build/utils/display/profiles/index.js.map +1 -0
  582. package/build/utils/display/profiles/nex.d.ts +10 -0
  583. package/build/utils/display/profiles/nex.d.ts.map +1 -0
  584. package/build/utils/display/profiles/nex.js +150 -0
  585. package/build/utils/display/profiles/nex.js.map +1 -0
  586. package/build/utils/display/profiles/types.d.ts +103 -0
  587. package/build/utils/display/profiles/types.d.ts.map +1 -0
  588. package/build/utils/display/profiles/types.js +2 -0
  589. package/build/utils/display/profiles/types.js.map +1 -0
  590. package/build/utils/display/profiles/z100.d.ts +33 -0
  591. package/build/utils/display/profiles/z100.d.ts.map +1 -0
  592. package/build/utils/display/profiles/z100.js +182 -0
  593. package/build/utils/display/profiles/z100.js.map +1 -0
  594. package/build/utils/display/scene/degrade.d.ts +25 -0
  595. package/build/utils/display/scene/degrade.d.ts.map +1 -0
  596. package/build/utils/display/scene/degrade.js +64 -0
  597. package/build/utils/display/scene/degrade.js.map +1 -0
  598. package/build/utils/display/scene/differ.d.ts +38 -0
  599. package/build/utils/display/scene/differ.d.ts.map +1 -0
  600. package/build/utils/display/scene/differ.js +107 -0
  601. package/build/utils/display/scene/differ.js.map +1 -0
  602. package/build/utils/display/scene/index.d.ts +10 -0
  603. package/build/utils/display/scene/index.d.ts.map +1 -0
  604. package/build/utils/display/scene/index.js +6 -0
  605. package/build/utils/display/scene/index.js.map +1 -0
  606. package/build/utils/display/scene/process.d.ts +35 -0
  607. package/build/utils/display/scene/process.d.ts.map +1 -0
  608. package/build/utils/display/scene/process.js +187 -0
  609. package/build/utils/display/scene/process.js.map +1 -0
  610. package/build/utils/display/scene/store.d.ts +48 -0
  611. package/build/utils/display/scene/store.d.ts.map +1 -0
  612. package/build/utils/display/scene/store.js +0 -0
  613. package/build/utils/display/scene/store.js.map +1 -0
  614. package/build/utils/display/scene/types.d.ts +120 -0
  615. package/build/utils/display/scene/types.d.ts.map +1 -0
  616. package/build/utils/display/scene/types.js +0 -0
  617. package/build/utils/display/scene/types.js.map +1 -0
  618. package/build/utils/display/wrapper/TextWrapper.d.ts +102 -0
  619. package/build/utils/display/wrapper/TextWrapper.d.ts.map +1 -0
  620. package/build/utils/display/wrapper/TextWrapper.js +471 -0
  621. package/build/utils/display/wrapper/TextWrapper.js.map +1 -0
  622. package/build/utils/display/wrapper/index.d.ts +12 -0
  623. package/build/utils/display/wrapper/index.d.ts.map +1 -0
  624. package/build/utils/display/wrapper/index.js +12 -0
  625. package/build/utils/display/wrapper/index.js.map +1 -0
  626. package/build/utils/display/wrapper/types.d.ts +75 -0
  627. package/build/utils/display/wrapper/types.d.ts.map +1 -0
  628. package/build/utils/display/wrapper/types.js +11 -0
  629. package/build/utils/display/wrapper/types.js.map +1 -0
  630. package/build/utils/e2eMetrics.d.ts +6 -0
  631. package/build/utils/e2eMetrics.d.ts.map +1 -0
  632. package/build/utils/e2eMetrics.js +27 -0
  633. package/build/utils/e2eMetrics.js.map +1 -0
  634. package/build/utils/hardware/hardware.d.ts +42 -0
  635. package/build/utils/hardware/hardware.d.ts.map +1 -0
  636. package/build/utils/hardware/hardware.js +127 -0
  637. package/build/utils/hardware/hardware.js.map +1 -0
  638. package/build/utils/hardware/index.d.ts +2 -0
  639. package/build/utils/hardware/index.d.ts.map +1 -0
  640. package/build/utils/hardware/index.js +2 -0
  641. package/build/utils/hardware/index.js.map +1 -0
  642. package/build/utils/miniappGlobals.d.ts +60 -0
  643. package/build/utils/miniappGlobals.d.ts.map +1 -0
  644. package/build/utils/miniappGlobals.js +224 -0
  645. package/build/utils/miniappGlobals.js.map +1 -0
  646. package/build/utils/permissions/MediaLibraryPermissions.d.ts +45 -0
  647. package/build/utils/permissions/MediaLibraryPermissions.d.ts.map +1 -0
  648. package/build/utils/permissions/MediaLibraryPermissions.js +145 -0
  649. package/build/utils/permissions/MediaLibraryPermissions.js.map +1 -0
  650. package/build/utils/permissions/galleryDisplayName.d.ts +8 -0
  651. package/build/utils/permissions/galleryDisplayName.d.ts.map +1 -0
  652. package/build/utils/permissions/galleryDisplayName.js +25 -0
  653. package/build/utils/permissions/galleryDisplayName.js.map +1 -0
  654. package/build/utils/storage/index.d.ts +3 -0
  655. package/build/utils/storage/index.d.ts.map +1 -0
  656. package/build/utils/storage/index.js +3 -0
  657. package/build/utils/storage/index.js.map +1 -0
  658. package/build/utils/storage/storage.d.ts +24 -0
  659. package/build/utils/storage/storage.d.ts.map +1 -0
  660. package/build/utils/storage/storage.js +85 -0
  661. package/build/utils/storage/storage.js.map +1 -0
  662. package/build/utils/storage/zip.d.ts +3 -0
  663. package/build/utils/storage/zip.d.ts.map +1 -0
  664. package/build/utils/storage/zip.js +14 -0
  665. package/build/utils/storage/zip.js.map +1 -0
  666. package/build/utils/timers/index.d.ts +3 -0
  667. package/build/utils/timers/index.d.ts.map +1 -0
  668. package/build/utils/timers/index.js +3 -0
  669. package/build/utils/timers/index.js.map +1 -0
  670. package/build/utils/timers/timers.d.ts +9 -0
  671. package/build/utils/timers/timers.d.ts.map +1 -0
  672. package/build/utils/timers/timers.js +105 -0
  673. package/build/utils/timers/timers.js.map +1 -0
  674. package/package.json +120 -0
  675. package/src/devtools.ts +13 -0
  676. package/src/engine.ts +173 -0
  677. package/src/facades/dev.ts +198 -0
  678. package/src/facades/display.ts +17 -0
  679. package/src/facades/displayMirror.ts +33 -0
  680. package/src/facades/gallery.ts +69 -0
  681. package/src/facades/glasses.ts +206 -0
  682. package/src/facades/glassesSettings.ts +56 -0
  683. package/src/facades/glassesWifi.ts +68 -0
  684. package/src/facades/miniapps.ts +55 -0
  685. package/src/facades/notifications.ts +15 -0
  686. package/src/facades/ota.ts +174 -0
  687. package/src/facades/pairing.ts +329 -0
  688. package/src/facades/permissions.ts +165 -0
  689. package/src/facades/phoneNotifications.ts +50 -0
  690. package/src/facades/reports.ts +185 -0
  691. package/src/facades/session.ts +55 -0
  692. package/src/facades/settings.ts +57 -0
  693. package/src/facades/speech.ts +38 -0
  694. package/src/index.ts +191 -0
  695. package/src/internal.ts +159 -0
  696. package/src/runtime/bootstrap.ts +118 -0
  697. package/src/runtime/config.ts +147 -0
  698. package/src/runtime/streamConfig.ts +34 -0
  699. package/src/services/AppRegistry.ts +1190 -0
  700. package/src/services/AudioCloudUplink.ts +50 -0
  701. package/src/services/AudioPlaybackService.ts +813 -0
  702. package/src/services/AutomaticReportResult.ts +48 -0
  703. package/src/services/BlobStore.ts +746 -0
  704. package/src/services/CaptionsTesterReportService.ts +107 -0
  705. package/src/services/CloudAudioSubscriptionSync.ts +41 -0
  706. package/src/services/CloudClientService.ts +689 -0
  707. package/src/services/CloudTranscriptE2EMetrics.ts +27 -0
  708. package/src/services/ConnectionCoordinator.ts +65 -0
  709. package/src/services/DevServerBridge.ts +332 -0
  710. package/src/services/DeviceEventRouter.ts +238 -0
  711. package/src/services/DeviceStoreHydration.ts +130 -0
  712. package/src/services/DisplayProcessor.ts +775 -0
  713. package/src/services/GlassesReadiness.ts +103 -0
  714. package/src/services/GlassesSettingsSync.ts +134 -0
  715. package/src/services/GlassesStatusProjection.ts +73 -0
  716. package/src/services/HeadingService.ts +98 -0
  717. package/src/services/LocalDisplayManager.ts +703 -0
  718. package/src/services/LocalMiniappRuntime.ts +4213 -0
  719. package/src/services/LocalSttFallbackCoordinator.ts +147 -0
  720. package/src/services/MentraJSCrashController.ts +189 -0
  721. package/src/services/MentraJSCrashloopReportService.ts +66 -0
  722. package/src/services/MentraJSLogPipeline.ts +166 -0
  723. package/src/services/MentraJSRouter.ts +557 -0
  724. package/src/services/MentraUIRouter.ts +244 -0
  725. package/src/services/MicStateCoordinator.ts +94 -0
  726. package/src/services/MiniappEngine.ts +143 -0
  727. package/src/services/MiniappLauncher.ts +340 -0
  728. package/src/services/MiniappRunningRegistry.ts +57 -0
  729. package/src/services/NativeHttpResponse.ts +6 -0
  730. package/src/services/NavigationHandlers.ts +423 -0
  731. package/src/services/NavigationService.ts +731 -0
  732. package/src/services/NotificationsEmitter.ts +48 -0
  733. package/src/services/OfflineSpeechModelService.ts +168 -0
  734. package/src/services/OtaInstallCoordinator.ts +1205 -0
  735. package/src/services/OtaService.ts +83 -0
  736. package/src/services/OtaUpdateCheckService.ts +386 -0
  737. package/src/services/PairingIdentity.ts +154 -0
  738. package/src/services/PhoneCalendarHelpers.ts +212 -0
  739. package/src/services/PhoneCalendarService.ts +42 -0
  740. package/src/services/PhoneCameraFovCoordinator.ts +195 -0
  741. package/src/services/PhoneLocationService.ts +122 -0
  742. package/src/services/PhoneNotificationsSync.ts +44 -0
  743. package/src/services/PhonePhotoCoordinator.ts +409 -0
  744. package/src/services/PhoneStreamCoordinator.ts +777 -0
  745. package/src/services/PhoneVideoCoordinator.ts +189 -0
  746. package/src/services/STTModelManager.ts +360 -0
  747. package/src/services/SceneRenderer.ts +292 -0
  748. package/src/services/SentenceTtsPipeline.ts +106 -0
  749. package/src/services/StreamLifecycleController.ts +213 -0
  750. package/src/services/TTSModelManager.ts +466 -0
  751. package/src/services/TranscriptionRouting.ts +37 -0
  752. package/src/services/WebviewBridge.ts +50 -0
  753. package/src/services/asg/GalleryMediaIntegrityReportService.ts +70 -0
  754. package/src/services/asg/asgCameraApi.ts +1695 -0
  755. package/src/services/asg/cameraRollExportCoordinator.ts +627 -0
  756. package/src/services/asg/cameraRollExportLedger.ts +122 -0
  757. package/src/services/asg/galleryMediaValidation.ts +183 -0
  758. package/src/services/asg/galleryNotices.ts +61 -0
  759. package/src/services/asg/galleryPathMigration.ts +22 -0
  760. package/src/services/asg/gallerySettingsService.ts +68 -0
  761. package/src/services/asg/gallerySyncNotifications.ts +236 -0
  762. package/src/services/asg/gallerySyncService.ts +2269 -0
  763. package/src/services/asg/galleryTransferLedger.ts +312 -0
  764. package/src/services/asg/localNetworkTransport.ts +173 -0
  765. package/src/services/asg/localStorageService.ts +652 -0
  766. package/src/services/asg/mediaProcessingQueue.ts +518 -0
  767. package/src/services/asgOtaVersionUrl.ts +41 -0
  768. package/src/services/blobPaths.ts +86 -0
  769. package/src/services/cloudStreamApi.ts +154 -0
  770. package/src/services/gallerySyncClock.ts +39 -0
  771. package/src/services/glassesClockSync.ts +115 -0
  772. package/src/services/manifestVersionGate.ts +43 -0
  773. package/src/services/mentraUiShim.ts +366 -0
  774. package/src/services/navigation/roadNameResolver.ts +112 -0
  775. package/src/services/navigation/routesApiCodec.ts +69 -0
  776. package/src/services/otaDisplayState.ts +115 -0
  777. package/src/services/otaInstallPolicy.ts +106 -0
  778. package/src/services/otaLegacyMapping.ts +71 -0
  779. package/src/services/slimStreamStatus.ts +28 -0
  780. package/src/stores/apps.ts +614 -0
  781. package/src/stores/bluetoothSettingKeys.ts +36 -0
  782. package/src/stores/cloudClientStatus.ts +37 -0
  783. package/src/stores/connection.ts +69 -0
  784. package/src/stores/core.ts +32 -0
  785. package/src/stores/display.ts +121 -0
  786. package/src/stores/gallerySync.ts +380 -0
  787. package/src/stores/glasses.ts +309 -0
  788. package/src/stores/settings.ts +1001 -0
  789. package/src/types/applet.ts +112 -0
  790. package/src/types/asg.ts +58 -0
  791. package/src/types/capabilities/even-realities-g1.ts +67 -0
  792. package/src/types/capabilities/even-realities-g2.ts +88 -0
  793. package/src/types/capabilities/mentra-display.ts +75 -0
  794. package/src/types/capabilities/mentra-live.ts +103 -0
  795. package/src/types/capabilities/none.ts +76 -0
  796. package/src/types/capabilities/simulated-glasses.ts +76 -0
  797. package/src/types/capabilities/vuzix-z100.ts +64 -0
  798. package/src/types/enums.ts +43 -0
  799. package/src/types/hardware.ts +203 -0
  800. package/src/types/index.ts +37 -0
  801. package/src/utils/GlobalEventEmitter.ts +14 -0
  802. package/src/utils/cloudClient/RnUdpAdapter.ts +47 -0
  803. package/src/utils/cloudClient/cloudSecureStore.ts +28 -0
  804. package/src/utils/debouncedPatch.ts +28 -0
  805. package/src/utils/devLogging.ts +140 -0
  806. package/src/utils/devMiniappLaunch.ts +68 -0
  807. package/src/utils/diagnosticContext.ts +155 -0
  808. package/src/utils/display/composer/ColumnComposer.ts +285 -0
  809. package/src/utils/display/composer/index.ts +15 -0
  810. package/src/utils/display/helpers/DisplayHelpers.ts +413 -0
  811. package/src/utils/display/helpers/ScrollView.ts +337 -0
  812. package/src/utils/display/helpers/index.ts +14 -0
  813. package/src/utils/display/index.ts +273 -0
  814. package/src/utils/display/measurer/TextMeasurer.ts +346 -0
  815. package/src/utils/display/measurer/index.ts +21 -0
  816. package/src/utils/display/measurer/script-detection.ts +218 -0
  817. package/src/utils/display/profiles/g1.ts +236 -0
  818. package/src/utils/display/profiles/g2.ts +39 -0
  819. package/src/utils/display/profiles/index.ts +28 -0
  820. package/src/utils/display/profiles/nex.ts +166 -0
  821. package/src/utils/display/profiles/types.ts +132 -0
  822. package/src/utils/display/profiles/z100.ts +198 -0
  823. package/src/utils/display/scene/degrade.ts +80 -0
  824. package/src/utils/display/scene/differ.ts +128 -0
  825. package/src/utils/display/scene/index.ts +21 -0
  826. package/src/utils/display/scene/process.ts +214 -0
  827. package/src/utils/display/scene/store.ts +0 -0
  828. package/src/utils/display/scene/types.ts +0 -0
  829. package/src/utils/display/wrapper/TextWrapper.ts +546 -0
  830. package/src/utils/display/wrapper/index.ts +15 -0
  831. package/src/utils/display/wrapper/types.ts +102 -0
  832. package/src/utils/e2eMetrics.ts +30 -0
  833. package/src/utils/hardware/hardware.ts +166 -0
  834. package/src/utils/hardware/index.ts +1 -0
  835. package/src/utils/miniappGlobals.ts +260 -0
  836. package/src/utils/permissions/MediaLibraryPermissions.ts +161 -0
  837. package/src/utils/permissions/galleryDisplayName.ts +28 -0
  838. package/src/utils/storage/index.ts +2 -0
  839. package/src/utils/storage/storage.ts +101 -0
  840. package/src/utils/storage/zip.ts +13 -0
  841. package/src/utils/timers/index.ts +2 -0
  842. package/src/utils/timers/timers.ts +139 -0
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AppRegistry.js","sourceRoot":"","sources":["../../src/services/AppRegistry.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAEH,OAAO,EAAC,SAAS,EAAE,KAAK,EAAE,IAAI,EAAC,MAAM,kBAAkB,CAAA;AACvD,OAAO,EAAC,KAAK,EAAC,MAAM,0BAA0B,CAAA;AAC9C,OAAO,MAAM,MAAM,QAAQ,CAAA;AAC3B,OAAO,EAAsB,MAAM,IAAI,GAAG,EAAC,MAAM,aAAa,CAAA;AAG9D,OAAO,EAAsB,wBAAwB,EAAE,YAAY,EAAC,MAAM,UAAU,CAAA;AACpF,OAAO,EAAC,eAAe,EAAC,MAAM,sBAAsB,CAAA;AACpD,OAAO,EAAC,OAAO,EAAC,MAAM,0B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AAU,EAAE,UAAU,CAAC,MAAM,CAAC,CAAA;YACnD,CAAC;YACD,GAAG,CAAC,IAAI,CAAC,UAAU,CAAC,CAAA;QACtB,CAAC;QAAC,MAAM,CAAC;YACP,2BAA2B;QAC7B,CAAC;IACH,CAAC;IACD,OAAO,GAAG,CAAA;AACZ,CAAC;AAED,MAAM,WAAW,GAAG,WAAW,CAAC,WAAW,EAAE,CAAA;AAC7C,eAAe,WAAW,CAAA","sourcesContent":["/**\n * AppRegistry — on-disk install/uninstall registry for local miniapps.\n *\n * Owns the `Documents/lmas/<packageName>/<version>/` filesystem layout, the\n * download/unzip pipeline, and the active-version pointer in MMKV. It does\n * NOT touch the apps store directly — instead it notifies subscribers when\n * the install set changes, so the host (mobile manager, OEM app) can refresh\n * its own state.\n *\n * Public surface:\n * - installFromUrl(url, opts?) install/replace a miniapp from a URL\n * - installFromLocalZip(path, opts?) install/replace from a local zip\n * - uninstall(packageName, version?) remove one or all versions\n * - getInstalledMiniapps() ClientApp[] derived from disk\n * - getActiveVersion(packageName) active version string for a package\n * - getBundleDir / getMiniappManifest filesystem helpers used by hosts\n * - subscribe(fn) register a refresh listener\n */\n\nimport {Directory, Paths, File} from \"expo-file-system\"\nimport {unzip} from \"react-native-zip-archive\"\nimport semver from \"semver\"\nimport {AsyncResult, Result, result as Res} from \"typesafe-ts\"\n\nimport type {AppletPermission, AppPermissionType, AppletType, ClientApp, DeclaredAction} from \"../types/applet\"\nimport {HardwareRequirement, HardwareRequirementLevel, HardwareType} from \"../types\"\nimport {getConfigValues} from \"../runtime/bootstrap\"\nimport {storage} from \"../utils/storage/storage\"\nimport {printDirectory} from \"../utils/storage/zip\"\nimport {checkManifestVersions} from \"./manifestVersionGate\"\nimport {miniappRunningRegistry} from \"./MiniappRunningRegistry\"\n\nconst ALLOWED_PERMISSION_TYPES: ReadonlySet<AppPermissionType> = new Set<AppPermissionType>([\n \"MICROPHONE\",\n \"CAMERA\",\n \"CALENDAR\",\n \"LOCATION\",\n \"BACKGROUND_LOCATION\",\n \"READ_NOTIFICATIONS\",\n \"POST_NOTIFICATIONS\",\n])\n\n/**\n * Normalize the `permissions` field from a miniapp.json manifest.\n *\n * New miniapps ship `[{type, required?, description?}]` objects. A few older\n * installed bundles may have `[\"MICROPHONE\", ...]` plain strings. Accept both.\n */\nexport function normalizeManifestPermissions(\n raw: Array<string | {type: string; required?: boolean; description?: string}> | undefined,\n): AppletPermission[] {\n if (!Array.isArray(raw)) return []\n const out: AppletPermission[] = []\n for (const p of raw) {\n if (typeof p === \"string\") {\n if (ALLOWED_PERMISSION_TYPES.has(p as AppPermissionType)) {\n out.push({type: p as AppPermissionType, required: true})\n }\n } else if (p && typeof p === \"object\" && typeof p.type === \"string\") {\n if (ALLOWED_PERMISSION_TYPES.has(p.type as AppPermissionType)) {\n out.push({\n type: p.type as AppPermissionType,\n ...(typeof p.required === \"boolean\" ? {required: p.required} : {}),\n ...(typeof p.description === \"string\" ? {description: p.description} : {}),\n })\n }\n }\n }\n return out\n}\n\nfunction normalizeManifestType(raw: unknown): AppletType {\n return raw === \"background\" || raw === \"system_dashboard\" || raw === \"standard\" ? raw : \"standard\"\n}\n\n/**\n * Normalize a manifest's `actions` into DeclaredAction[]. Defensive — keeps only\n * well-formed `{id, description}` entries (installed/dev bundles may be\n * malformed). Shared by installed (disk) and dev-sideload projection so both\n * surface declared actions to session.miniapps.list + the invoke gate.\n */\nexport function normalizeManifestActions(raw: unknown): DeclaredAction[] {\n if (!Array.isArray(raw)) return []\n const out: DeclaredAction[] = []\n for (const a of raw as Array<{id?: unknown; description?: unknown; parameters?: unknown}>) {\n if (a && typeof a.id === \"string\" && typeof a.description === \"string\") {\n out.push({\n id: a.id,\n description: a.description,\n ...(a.parameters && typeof a.parameters === \"object\"\n ? {parameters: a.parameters as Record<string, unknown>}\n : {}),\n })\n }\n }\n return out\n}\n\n/**\n * Convert declared hardwareRequirements from a miniapp.json manifest into\n * runtime `HardwareRequirement[]`, always appending `{EXIST, REQUIRED}` so\n * launchers show \"Glasses Required\" when no glasses are connected.\n *\n * Malformed entries are dropped with a single warning per package so the\n * rest of the manifest still works.\n */\nexport function buildHardwareRequirements(\n raw: Array<{type: string; level: string; description?: string}> | undefined,\n packageName: string,\n): HardwareRequirement[] {\n const out: HardwareRequirement[] = []\n const validTypes = new Set(Object.values(HardwareType) as string[])\n const validLevels = new Set(Object.values(HardwareRequirementLevel) as string[])\n\n if (!Array.isArray(raw)) {\n if (raw !== undefined) {\n console.warn(`APP_REGISTRY: ${packageName} has invalid hardwareRequirements (not an array); treating as []`)\n }\n } else {\n let warned = false\n for (const r of raw) {\n if (\n !r ||\n typeof r !== \"object\" ||\n typeof r.type !== \"string\" ||\n typeof r.level !== \"string\" ||\n !validTypes.has(r.type) ||\n !validLevels.has(r.level)\n ) {\n if (!warned) {\n console.warn(\n `APP_REGISTRY: ${packageName} has malformed hardwareRequirements entry; skipping invalid entries`,\n r,\n )\n warned = true\n }\n continue\n }\n out.push({\n type: r.type as HardwareType,\n level: r.level as HardwareRequirementLevel,\n ...(typeof r.description === \"string\" ? {description: r.description} : {}),\n })\n }\n }\n\n // Always require glasses to be connected for any local miniapp.\n out.push({type: HardwareType.EXIST, level: HardwareRequirementLevel.REQUIRED})\n return out\n}\n\ninterface InstalledInfo {\n name: string\n logoUrl: string\n}\n\ninterface InstalledLma {\n packageName: string\n versions: Record<string, InstalledInfo>\n}\n\n/**\n * Download a miniapp zip from `url` into the cache and return its local path.\n *\n * `File.downloadFileAsync` is HTTP(S)-only, so this path is for remote bundles\n * (dev server, store). Bundled-asset installs already have a local zip and\n * should call {@link unpackMiniApp} directly.\n */\nasync function downloadMiniAppZip(url: string): Promise<string> {\n const downloadDir = new Directory(Paths.cache, \"lma_downloads\")\n try {\n if (!downloadDir.exists) {\n downloadDir.create()\n }\n } catch (error) {\n console.error(\"ZIP: Error creating download directory\", error)\n throw \"CREATE_DOWNLOAD_DIR_FAILED\"\n }\n\n // Pre-delete any cached file with the same name. Both `mentra-miniapp dev`\n // and `mentra-miniapp release` serve their zip at /bundle.zip, so URLs\n // collide on the cache filename. Without this delete, a stale dev-snapshot\n // (containing the project source tree) gets unzipped instead of the\n // release build → white screen because index.html points at TSX files.\n const targetFileName = url.split(\"/\").pop() ?? \"bundle.zip\"\n const existingFile = new File(downloadDir, targetFileName)\n if (existingFile.exists) {\n try {\n existingFile.delete()\n } catch (e) {\n console.warn(\"ZIP: failed to delete stale cached download:\", e)\n }\n }\n\n try {\n const output = await File.downloadFileAsync(url, downloadDir)\n return output.uri\n } catch (error) {\n console.error(\"ZIP: Error downloading zip file\", error)\n throw \"DOWNLOAD_FAILED\"\n }\n}\n\n/**\n * Unpack a local miniapp zip and install it under\n * `lmas/<packageName>/<version>/`.\n *\n * Zip layout: flat — files at root, `miniapp.json` at the top level. We're\n * strict on shape so we fail loudly on malformed bundles.\n *\n * @param zipPath file:// URI of the zip on local disk.\n * @param versionOverride override the manifest's version field. Used by the\n * dev miniapp caching path which stamps `dev-<ms>`\n * so multiple snapshots can coexist alongside\n * semver-installed versions.\n */\nasync function unpackMiniApp(\n zipPath: string,\n versionOverride?: string,\n): Promise<{packageName: string; version: string}> {\n const unzipDir = new Directory(Paths.cache, \"lma_unzip\")\n try {\n if (unzipDir.exists) unzipDir.delete()\n unzipDir.create()\n } catch (error) {\n console.error(\"ZIP: Error creating or deleting the unzip directory\", error)\n throw \"CREATE_CACHE_DIR_FAILED\"\n }\n\n try {\n console.log(\"ZIP: unzipping\", zipPath)\n await unzip(zipPath, unzipDir.uri)\n } catch (error) {\n console.error(\"Error unzipping zip file\", error)\n throw \"UNZIP_FAILED\"\n }\n\n // Strict zip shape: miniapp.json at unzip root. No tolerance for an\n // enclosing folder or app.json fallback — we own the dev-server emit\n // format, so any deviation indicates a corrupt bundle.\n const appDir = unzipDir\n let packageName: string\n let manifestVersion: string\n try {\n const miniappJsonFile = new File(appDir, \"miniapp.json\")\n if (!miniappJsonFile.exists) throw new Error(\"miniapp.json missing at zip root\")\n const manifest = JSON.parse(miniappJsonFile.textSync())\n if (!manifest.packageName) throw new Error(\"miniapp.json missing packageName\")\n if (!manifest.version) throw new Error(\"miniapp.json missing version\")\n packageName = manifest.packageName\n manifestVersion = manifest.version\n } catch (error) {\n console.error(\"Error reading miniapp.json from zip:\", error)\n throw \"READ_MANIFEST_FAILED\"\n }\n const version = versionOverride ?? manifestVersion\n console.log(`ZIP: installing ${packageName} as version ${version}`)\n\n const basePackageDir = new Directory(Paths.document, \"lmas\", packageName)\n try {\n if (!basePackageDir.exists) {\n basePackageDir.create({intermediates: true})\n }\n } catch (error) {\n console.error(\"Error creating the base package directory\", error)\n throw \"CREATE_PACKAGE_DIR_FAILED\"\n }\n\n const versionDir = new Directory(basePackageDir, version)\n try {\n if (!versionDir.exists) {\n versionDir.create()\n } else {\n versionDir.delete()\n versionDir.create()\n }\n } catch (error) {\n console.error(\"Error creating the version directory\", error)\n throw \"CREATE_VERSION_DIR_FAILED\"\n }\n\n try {\n const contents = appDir.list()\n for (const item of contents) {\n item.move(versionDir)\n }\n } catch (error) {\n console.error(\"Error moving the contents of the folder to the destination directory\", error)\n throw \"INSTALL_CONTENTS_FAILED\"\n }\n\n console.log(\"ZIP: local mini app installed at\", versionDir.uri)\n printDirectory(versionDir, 2)\n return {packageName, version}\n}\n\n/**\n * Download a miniapp zip from `url`, unpack it, and install it under\n * `lmas/<packageName>/<version>/`. Thin composition of\n * {@link downloadMiniAppZip} + {@link unpackMiniApp} for remote bundles.\n *\n * @param versionOverride override the manifest's version field. Used by the\n * dev miniapp caching path which stamps `dev-<ms>`\n * so multiple snapshots can coexist alongside\n * semver-installed versions.\n */\nasync function downloadAndInstallMiniApp(\n url: string,\n versionOverride?: string,\n): Promise<{packageName: string; version: string}> {\n const downloadedZipPath = await downloadMiniAppZip(url)\n console.log(\"ZIP: done downloading, starting unzip\")\n return unpackMiniApp(downloadedZipPath, versionOverride)\n}\n\ntype Listener = () => void\n\nclass AppRegistry {\n private cachedApps: ClientApp[] = []\n // Offline apps live in a separate layer so they survive the disk-rebuild\n // path in getInstalledMiniapps (which reassigns cachedApps).\n private offlineApps: ClientApp[] = []\n /** Package names whose start() requires the on-device STT model (host-declared). */\n private sttModelRequired = new Set<string>()\n private refreshNeeded: boolean = true\n private listeners = new Set<Listener>()\n\n private static instance: AppRegistry | null = null\n\n private constructor() {}\n\n public static getInstance(): AppRegistry {\n if (!AppRegistry.instance) {\n AppRegistry.instance = new AppRegistry()\n }\n return AppRegistry.instance\n }\n\n /** Subscribe to install/uninstall events. Listener fires after refreshNeeded flips. */\n public subscribe(fn: Listener): () => void {\n this.listeners.add(fn)\n return () => {\n this.listeners.delete(fn)\n }\n }\n\n private notify(): void {\n for (const fn of this.listeners) {\n try {\n fn()\n } catch (e) {\n console.warn(\"AppRegistry: listener threw\", e)\n }\n }\n }\n\n /**\n * On-disk path for a given miniapp bundle version.\n */\n public getBundleDir(packageName: string, version: string): string {\n const bundleDir = new Directory(Paths.document, \"lmas\", packageName, version)\n return bundleDir.uri\n }\n\n /**\n * Resolve the two-layer entry paths for an installed miniapp version.\n * Returns absolute file:// URIs for `background` and (when present) `ui`.\n *\n * Legacy single-layer bundles (no `entry` object in manifest) fall back\n * to `index.html` discovery so the WebView host keeps working unchanged.\n * Two-layer bundles ship `entry.background` and optional `entry.ui`\n * paths relative to the bundle root.\n *\n * Returns null if neither shape resolves to existing files on disk.\n */\n public getMiniappEntryPaths(\n packageName: string,\n version: string,\n ): {background: string | null; ui: string | null} | null {\n const manifest = this.getMiniappManifest(packageName, version) as {\n entry?: {background?: string; ui?: string}\n } | null\n const bundleDir = this.getBundleDir(packageName, version)\n const resolve = (rel: string): string | null => {\n const trimmed = rel.replace(/^\\.?\\/+/, \"\")\n const file = new File(bundleDir, trimmed)\n return file.exists ? file.uri : null\n }\n if (manifest?.entry) {\n console.log(\"manifest.entry\", manifest.entry)\n const bg = manifest.entry.background ? resolve(manifest.entry.background) : null\n console.log(\"bg\", bg)\n const ui = manifest.entry.ui ? resolve(manifest.entry.ui) : null\n console.log(\"ui\", ui)\n if (bg || ui) {\n return {background: bg, ui: ui}\n }\n }\n // Legacy single-bundle fallback — `index.html` at the bundle root.\n const legacy = new File(new Directory(bundleDir.replace(/^file:\\/\\//, \"\")), \"index.html\")\n return {\n background: null,\n ui: legacy.exists ? legacy.uri : null,\n }\n }\n\n /**\n * Verify a manifest declares an SDK / host version range compatible\n * with the current host. Delegates to the pure\n * {@link checkManifestVersions} helper — same shape, no React Native\n * imports, unit-testable. Manifests missing either field pass\n * through unchanged (legacy single-layer path).\n */\n public checkManifestVersions(\n manifest: {sdkVersion?: string; minHostVersion?: string} | null,\n options: {hostVersion: string; supportedSdkRange: string},\n ): {ok: true} | {ok: false; reason: string} {\n return checkManifestVersions(manifest, options)\n }\n\n /**\n * Read and parse the miniapp manifest (miniapp.json with app.json fallback)\n * from a given bundle directory.\n */\n public getMiniappManifest(packageName: string, version: string): any {\n const bundleDir = new Directory(Paths.document, \"lmas\", packageName, version)\n try {\n const miniappJsonFile = new File(bundleDir, \"miniapp.json\")\n if (miniappJsonFile.exists) {\n return JSON.parse(miniappJsonFile.textSync())\n }\n } catch (e) {\n console.warn(\"AppRegistry: Error reading miniapp.json, trying app.json fallback\", e)\n }\n try {\n const appJsonFile = new File(bundleDir, \"app.json\")\n if (appJsonFile.exists) {\n return JSON.parse(appJsonFile.textSync())\n }\n } catch (e) {\n console.warn(\"AppRegistry: Error reading app.json fallback\", e)\n }\n return null\n }\n\n /**\n * Download and install a miniapp bundle from a URL. The URL must serve a\n * zip whose root contains `miniapp.json` plus the bundle entry files.\n *\n * @param opts.versionOverride if set, install under this version instead\n * of `manifest.version`. The dev caching path uses `dev-<ms>` so multiple\n * snapshots can coexist alongside semver-installed versions.\n */\n public installFromUrl(url: string, opts?: {versionOverride?: string}): AsyncResult<void, Error> {\n return Res.try_async(async () => {\n const {packageName, version} = await downloadAndInstallMiniApp(url, opts?.versionOverride)\n console.log(\"APP_REGISTRY: Downloaded and installed mini app\")\n this.finalizeInstall(packageName, version)\n })\n }\n\n /**\n * Install a miniapp from a zip already on local disk (e.g. a bundled asset\n * copied into cache). Skips the HTTP download path that `installFromUrl`\n * uses — `File.downloadFileAsync` is HTTP(S)-only and rejects file:// URIs.\n *\n * @param zipPath file:// URI of the local zip.\n */\n public installFromLocalZip(\n zipPath: string,\n opts?: {versionOverride?: string},\n ): AsyncResult<{packageName: string; version: string}, Error> {\n return Res.try_async(async () => {\n const {packageName, version} = await unpackMiniApp(zipPath, opts?.versionOverride)\n console.log(\"APP_REGISTRY: Installed mini app from local zip\")\n this.finalizeInstall(packageName, version)\n return {packageName, version}\n })\n }\n\n /**\n * Post-install bookkeeping shared by every install path: clear stale dev\n * artifacts on release installs, point the active-version at the just-\n * installed bundle, and notify subscribers to refresh.\n */\n private finalizeInstall(packageName: string, version: string): void {\n // If this is a release install (semver, not dev-*) of a package that\n // currently has dev-* snapshots, clear the dev state so the swap to\n // \"released\" is clean. Otherwise the dev version would keep winning\n // getActiveVersion's dev-precedence rule and the just-installed\n // release wouldn't run.\n const isDevInstall = version.startsWith(\"dev-\")\n if (!isDevInstall) {\n this.clearDevArtifacts(packageName)\n }\n\n this.setActiveVersion(packageName, version)\n this.refreshNeeded = true\n this.notify()\n }\n\n public installFromJsonUrl(baseUrl: string): AsyncResult<{packageName: string; version: string; name: string}, Error> {\n return Res.try_async(async () => {\n const trimmed = baseUrl.replace(/\\/$/, \"\")\n\n const manifestRes = await fetch(`${trimmed}/miniapp.json`)\n if (!manifestRes.ok) {\n throw new Error(`Failed to fetch miniapp.json: ${manifestRes.status}`)\n }\n const manifest = (await manifestRes.json()) as Record<string, unknown>\n const packageName = manifest.packageName as string | undefined\n const version = manifest.version as string | undefined\n const name = (manifest.name as string | undefined) ?? packageName ?? \"Mini app\"\n if (!packageName) throw new Error(\"miniapp.json missing packageName\")\n if (!version) throw new Error(\"miniapp.json missing version\")\n\n const installRes = await appRegistry.installFromUrl(`${trimmed}/bundle.zip`)\n if (installRes.is_error()) throw installRes.error\n\n return {packageName, version, name}\n })\n }\n\n /**\n * Drop every dev-* version directory for a package plus ALL dev MMKV keys\n * (URL/port/reachability + the home-tile metadata record). Called on a\n * release install (dev → released transition) and on uninstall, so a dev\n * package leaves nothing behind that `projectDevApps` could re-surface.\n */\n private clearDevArtifacts(packageName: string): void {\n try {\n const pkgDir = new Directory(Paths.document, \"lmas\", packageName)\n if (pkgDir.exists) {\n for (const item of pkgDir.list()) {\n if (item instanceof Directory && item.name.startsWith(\"dev-\")) {\n try {\n item.delete()\n } catch (e) {\n console.warn(`APP_REGISTRY: failed to delete ${item.name}:`, e)\n }\n }\n }\n }\n } catch (e) {\n console.warn(`APP_REGISTRY: clearDevArtifacts dir scan failed for ${packageName}:`, e)\n }\n storage.remove(`${packageName}_dev_url`)\n storage.remove(`${packageName}_dev_port`)\n storage.remove(`${packageName}_dev_last_reachable`)\n // HTTP-direct dev miniapps are indexed by their real package name. A\n // release install/uninstall of that same package should remove only its\n // dev tile; unrelated dev miniapps must remain available.\n if (readDevAppRecord(packageName)) unregisterDevApp(packageName)\n }\n\n /**\n * Garbage-collect older `dev-*` version directories for this package,\n * keeping the latest `keep` (by lexicographic sort, which matches\n * timestamp ordering since dev-<ms> is zero-padded).\n *\n * Only touches `dev-*` versions; semver-installed versions are left alone.\n */\n public gcDevVersions(packageName: string, keep: number): void {\n try {\n const pkgDir = new Directory(Paths.document, \"lmas\", packageName)\n if (!pkgDir.exists) return\n const dirs = pkgDir\n .list()\n .filter((d): d is Directory => d instanceof Directory && d.name.startsWith(\"dev-\"))\n .sort((a, b) => (a.name < b.name ? 1 : -1))\n for (let i = keep; i < dirs.length; i++) {\n try {\n dirs[i].delete()\n } catch (e) {\n console.warn(`APP_REGISTRY: failed to delete ${dirs[i].name}:`, e)\n }\n }\n if (dirs.length > keep) this.refreshNeeded = true\n } catch (e) {\n console.warn(`APP_REGISTRY: gcDevVersions error for ${packageName}:`, e)\n }\n }\n\n public uninstall(packageName: string, version?: string): AsyncResult<void, Error> {\n return Res.try_async(async () => {\n if (version) {\n const lmaDir = new Directory(Paths.document, \"lmas\", packageName, version)\n // Guard exists: a dev miniapp loads over HTTP and has no on-disk dir,\n // so an unconditional delete() would throw and abort the cleanup below.\n if (lmaDir.exists) lmaDir.delete()\n console.log(\"APP_REGISTRY: Uninstalled mini app version\", version)\n const packageDir = new Directory(Paths.document, \"lmas\", packageName)\n if (packageDir.exists && packageDir.list().length === 0) {\n packageDir.delete()\n }\n } else {\n const packageDir = new Directory(Paths.document, \"lmas\", packageName)\n if (packageDir.exists) {\n packageDir.delete()\n }\n console.log(\"APP_REGISTRY: Uninstalled all versions of mini app\", packageName)\n }\n // Always clear dev artifacts: for HTTP-direct dev miniapps the tile is\n // backed by storage records (_dev_meta + dev_apps_index), not the disk\n // dir, so without this the projected tile reappears on the next refresh.\n this.clearDevArtifacts(packageName)\n this.refreshNeeded = true\n this.notify()\n })\n }\n\n public getPackageNames(): string[] {\n try {\n const lmasDir = new Directory(Paths.document, \"lmas\")\n if (!lmasDir.exists) return []\n let lmas = lmasDir.list()\n lmas = lmas.filter((lma): lma is Directory => lma instanceof Directory && lma.list().length > 0)\n return lmas.map((lma) => lma.name)\n } catch (error) {\n console.error(\"APP_REGISTRY: Error getting locally installed package names\", error)\n return []\n }\n }\n\n public getInstalledVersions(packageName: string): string[] {\n try {\n const lmaDir = new Directory(Paths.document, \"lmas\", packageName)\n // Not installed yet is an expected state (e.g. preinstall sync probing\n // versions before first install) — return [] without the error noise.\n if (!lmaDir.exists) {\n return []\n }\n const lma = lmaDir.list()\n return lma.map((lma) => lma.name)\n } catch (error) {\n console.error(\"APP_REGISTRY: Error getting local applet versions\", error)\n return []\n }\n }\n\n public async getActiveVersion(packageName: string): Promise<string> {\n let versions = this.getInstalledVersions(packageName)\n // Treat MMKV as a hint, not authority. A stored version may have been\n // GC'd off disk without this pointer being updated.\n let res = storage.load<string>(`${packageName}_active_version`)\n if (res.is_ok() && versions.includes(res.value)) {\n return res.value\n }\n // Dev versions take precedence over semver-installed versions.\n const devVersions = versions\n .filter((v) => v.startsWith(\"dev-\"))\n .sort()\n .reverse()\n if (devVersions.length > 0) {\n this.setActiveVersion(packageName, devVersions[0])\n return devVersions[0]\n }\n versions = versions.filter((v) => semver.valid(v))\n versions.sort((a, b) => semver.rcompare(a, b))\n this.setActiveVersion(packageName, versions[0])\n return versions[0]\n }\n\n public setActiveVersion(packageName: string, version: string): Result<void, Error> {\n return storage.save(`${packageName}_active_version`, version)\n }\n\n public getMetadata(packageName: string, version: string): InstalledInfo {\n try {\n const lmaDir = new Directory(Paths.document, \"lmas\", packageName, version)\n const miniappJsonFile = new File(lmaDir, \"miniapp.json\")\n const manifest = JSON.parse(miniappJsonFile.textSync())\n const logoUrl = new File(lmaDir, \"icon.png\").uri\n return {name: manifest.name, logoUrl: logoUrl}\n } catch (error) {\n console.error(\"APP_REGISTRY: Error getting local miniapp metadata\", error)\n return {name: \"error\", logoUrl: \"\"}\n }\n }\n\n public getInstalledInfo(): InstalledLma[] {\n const packageNames = this.getPackageNames()\n const out: InstalledLma[] = []\n for (const packageName of packageNames) {\n const versionStrings = this.getInstalledVersions(packageName)\n const installedVersion: InstalledLma = {packageName, versions: {}}\n for (const versionString of versionStrings) {\n installedVersion.versions[versionString] = this.getMetadata(packageName, versionString)\n }\n out.push(installedVersion)\n }\n return out\n }\n\n /**\n * Merge disk-derived apps with the projected dev + offline layers,\n * de-duping by packageName. An active dev registration wins over an older\n * disk install of the same package; installing a release clears that dev\n * registration in finalizeInstall. Native offline apps keep top priority.\n */\n private mergeProjectedApps(diskApps: ClientApp[]): ClientApp[] {\n const offline = this.projectOfflineApps()\n const offlinePackages = new Set(offline.map((app) => app.packageName))\n const dev = this.projectDevApps().filter((app) => !offlinePackages.has(app.packageName))\n const devPackages = new Set(dev.map((app) => app.packageName))\n const installed = diskApps.filter(\n (app) => !offlinePackages.has(app.packageName) && !devPackages.has(app.packageName),\n )\n return [...installed, ...dev, ...offline]\n }\n\n public async getInstalledMiniapps(): Promise<ClientApp[]> {\n if (!this.refreshNeeded && this.cachedApps.length > 0) {\n // Cache hit: re-project running from the registry. The cached array\n // IS the disk-derived truth; running comes from the mount registry.\n return this.mergeProjectedApps(\n this.cachedApps.map((a) => ({\n ...a,\n running: miniappRunningRegistry.has(a.packageName),\n })),\n )\n }\n\n try {\n const installedInfo = this.getInstalledInfo()\n const out: ClientApp[] = []\n for (const lmaInfo of installedInfo) {\n const versionString = await this.getActiveVersion(lmaInfo.packageName)\n const versionInfo = lmaInfo.versions[versionString]\n\n const manifest = this.getMiniappManifest(lmaInfo.packageName, versionString) as {\n permissions?: Array<string | {type: string; required?: boolean; description?: string}>\n hardwareRequirements?: Array<{type: string; level: string; description?: string}>\n type?: string\n actions?: Array<{id?: unknown; description?: unknown; parameters?: unknown}>\n } | null\n\n const permissions = normalizeManifestPermissions(manifest?.permissions)\n const hardwareRequirements = buildHardwareRequirements(manifest?.hardwareRequirements, lmaInfo.packageName)\n const appType = normalizeManifestType(manifest?.type)\n\n // Declared actions (for session.miniapps.list + invoke gating).\n const actions = normalizeManifestActions(manifest?.actions)\n\n // Dev miniapps live in the same lmas/ tree as installed ones, but\n // their version directory name starts with \"dev-\".\n const isMiniappDev = versionString.startsWith(\"dev-\")\n let devUrl: string | undefined\n if (isMiniappDev) {\n const devUrlRes = storage.load<string>(`${lmaInfo.packageName}_dev_url`)\n if (devUrlRes.is_ok()) devUrl = devUrlRes.value\n }\n\n out.push({\n packageName: lmaInfo.packageName,\n version: versionString,\n running: miniappRunningRegistry.has(lmaInfo.packageName),\n local: true,\n healthy: true,\n loading: false,\n offline: false,\n hidden: false,\n offlineRoute: \"\",\n name: versionInfo.name,\n webviewUrl: \"\",\n logoUrl: versionInfo.logoUrl,\n type: appType,\n permissions,\n hardwareRequirements,\n // Always project actions (even []) so the invoke gate can enforce\n // declared-action membership unconditionally — an app with no declared\n // actions must reject every invoke, not bypass the check.\n actions,\n ...(isMiniappDev ? {isMiniappDev: true} : {}),\n ...(devUrl ? {devUrl} : {}),\n onStart: () => saveLocalAppRunningState(lmaInfo.packageName, true),\n onStop: () => saveLocalAppRunningState(lmaInfo.packageName, false),\n })\n }\n\n this.cachedApps = out\n this.refreshNeeded = false\n return this.mergeProjectedApps(this.cachedApps)\n } catch (error) {\n console.error(\"APP_REGISTRY: Error getting local applets\", error)\n return this.mergeProjectedApps(\n this.cachedApps.map((a) => ({\n ...a,\n running: miniappRunningRegistry.has(a.packageName),\n })),\n )\n }\n }\n\n /** Force the next getInstalledMiniapps() to re-derive from disk + records. */\n public markRefreshNeeded(): void {\n this.refreshNeeded = true\n this.notify()\n }\n\n /**\n * Project persisted dev-app metadata records into ClientApp tiles. Dev\n * miniapps aren't installed to disk (they load over HTTP), so they don't\n * appear in the `lmas/` scan — this surfaces them on the home screen so\n * they're re-launchable without re-scanning the QR.\n */\n private projectDevApps(): ClientApp[] {\n return getDevAppRecords().map((rec) => {\n const permissions = normalizeManifestPermissions(rec.permissions)\n const hardwareRequirements = buildHardwareRequirements(rec.hardwareRequirements, rec.packageName)\n return {\n packageName: rec.packageName,\n version: undefined,\n running: miniappRunningRegistry.has(rec.packageName),\n local: true,\n healthy: true,\n loading: false,\n offline: false,\n hidden: false,\n offlineRoute: \"\",\n name: rec.name,\n webviewUrl: \"\",\n logoUrl: rec.iconUrl,\n type: normalizeManifestType(rec.type),\n permissions,\n hardwareRequirements,\n actions: normalizeManifestActions(rec.actions),\n isMiniappDev: true,\n devUrl: rec.devUrl,\n devPort: rec.devPort,\n onStart: () => saveLocalAppRunningState(rec.packageName, true),\n onStop: () => saveLocalAppRunningState(rec.packageName, false),\n }\n })\n }\n\n private projectOfflineApps(): ClientApp[] {\n // Offline apps don't go through miniappRunningRegistry (that's for\n // MiniappHost-mounted webviews). Their running flag is persisted to\n // MMKV by saveLocalAppRunningState — read it back here so refreshes\n // don't blow away the active flag.\n return this.offlineApps.map((a) => {\n const running = getLocalAppRunningState(a.packageName)\n const screenshot = getLocalAppScreenshot(a.packageName)\n\n return {...a, running, screenshot}\n })\n }\n\n // Register an offline (locally-routed) app. Survives disk rebuilds.\n public installOfflineApp(app: ClientApp, opts?: {requiresLocalSttModel?: boolean}): void {\n if (opts?.requiresLocalSttModel) {\n this.sttModelRequired.add(app.packageName)\n }\n this.offlineApps.push({\n ...app,\n onStart: () => saveLocalAppRunningState(app.packageName, true),\n onStop: () => saveLocalAppRunningState(app.packageName, false),\n })\n this.refreshNeeded = true\n this.notify()\n }\n\n /**\n * Registered as needing the on-device STT model before it can start (the\n * host declares this per offline app; the apps store gates start() on it).\n */\n public requiresLocalSttModel(packageName: string): boolean {\n return this.sttModelRequired.has(packageName)\n }\n\n public getMiniappHtml(packageName: string, version: string): Result<string, Error> {\n return Res.try(() => {\n const lmaDir = new Directory(Paths.document, \"lmas\", packageName, version)\n const htmlFile = new File(lmaDir, \"index.html\")\n return htmlFile.textSync()\n })\n }\n}\n\n/**\n * Persist the running flag for a local miniapp (read on next cold boot so\n * autostart picks the right set of apps). Exported for hosts that want to\n * track running state independently.\n */\nexport function saveLocalAppRunningState(packageName: string, status: boolean): void {\n storage.save(`${packageName}_running`, status)\n}\n\nexport function getLocalAppRunningState(packageName: string): boolean {\n const res = storage.load<boolean>(`${packageName}_running`)\n if (res.is_ok()) return res.value\n return false\n}\n\nexport function getLocalAppScreenshot(packageName: string): string | undefined {\n const key = `${packageName}_screenshot`\n const res = storage.load<string>(key)\n if (res.is_error()) return undefined\n\n const uri = res.value\n if (uri.startsWith(\"file://\")) {\n try {\n if (!new File(uri).exists) {\n storage.remove(key)\n return undefined\n }\n } catch {\n storage.remove(key)\n return undefined\n }\n }\n\n return uri\n}\n\n/**\n * Persisted metadata for a dev miniapp's home tile.\n *\n * Dev miniapps load directly off the dev server over HTTP and are NOT\n * installed into `lmas/`, so the disk scan in `getInstalledMiniapps` can't\n * see them. We persist a tiny record at scan / dev-URL-entry time so the\n * tile survives across app launches and is re-launchable without re-scanning.\n * `permissions` / `hardwareRequirements` are snapshotted from the manifest so\n * the home-screen permission gate has data without a disk bundle.\n */\nexport interface DevAppRecord {\n packageName: string\n name: string\n iconUrl: string\n devUrl: string\n devPort?: number\n type?: AppletType\n permissions?: Array<string | {type: string; required?: boolean; description?: string}>\n hardwareRequirements?: Array<{type: string; level: string; description?: string}>\n /** Manifest-declared actions — so dev-sideloaded miniapps can be invoked too. */\n actions?: Array<{id?: unknown; description?: unknown; parameters?: unknown}>\n /** Legacy single-slot migration field. New records use the real packageName directly. */\n sourcePackageName?: string\n /**\n * Short-lived Core-verifiable proof emitted by `mentra dev`. This lets the\n * dev runtime request auto-auth for the manifest package without letting\n * arbitrary dev URLs claim any package name.\n */\n devAttestation?: string\n}\n\nconst DEV_APPS_INDEX_KEY = \"dev_apps_index\"\nconst DEV_APP_ICONS_DIR = \"dev-miniapp-icons\"\n\nfunction configuredDevHost(): string | undefined {\n // Explicit escape hatch first; otherwise the host-injected Metro host (the\n // address this dev bundle was served from — always current for the network\n // the phone is on). Deliberately NOT the EXPO_PUBLIC_CLOUD_* URLs: those are\n // cloud endpoints, a different machine entirely from the laptop running the\n // miniapp dev server, and rewriting a dev URL to a cloud host would break it.\n const explicit = process.env.EXPO_PUBLIC_LOCAL_MINIAPP_HOST\n if (explicit) {\n try {\n return new URL(explicit).hostname\n } catch {\n if (/^[\\w.-]+$/.test(explicit)) return explicit\n }\n }\n return getConfigValues().devServerHost?.()\n}\n\nfunction isPrivateLanHost(hostname: string): boolean {\n return (\n hostname === \"localhost\" ||\n hostname.startsWith(\"192.168.\") ||\n hostname.startsWith(\"10.\") ||\n /^172\\.(1[6-9]|2\\d|3[0-1])\\./.test(hostname)\n )\n}\n\nfunction rewriteStaleDevUrl(value: string): string {\n if (!__DEV__) return value\n const host = configuredDevHost()\n if (!host) return value\n\n try {\n const url = new URL(value)\n if (url.hostname === host || !isPrivateLanHost(url.hostname)) return value\n url.hostname = host\n return url.toString().replace(/\\/$/, \"\")\n } catch {\n return value\n }\n}\n\nfunction normalizeDevAppRecord(record: DevAppRecord): DevAppRecord {\n const devUrl = rewriteStaleDevUrl(record.devUrl)\n const iconUrl = rewriteStaleDevUrl(record.iconUrl)\n return devUrl === record.devUrl && iconUrl === record.iconUrl ? record : {...record, devUrl, iconUrl}\n}\n\n/** Legacy package used by builds that supported only one dev miniapp. */\nexport const DEV_APP_PACKAGE_NAME = \"com.dev\"\nexport const DEV_APP_NAME = \"Dev\"\n\n/**\n * Copy a dev-server icon into Documents so the tile remains branded after the\n * laptop/server disappears. A failed download is non-fatal: the remote URL is\n * retained and can still render while the server is reachable.\n */\nasync function cacheDevAppIcon(packageName: string, iconUrl: string): Promise<string> {\n if (!/^https?:\\/\\//.test(iconUrl)) return iconUrl\n\n try {\n const dir = new Directory(Paths.document, DEV_APP_ICONS_DIR)\n if (!dir.exists) dir.create({intermediates: true})\n\n const safePackageName = packageName.replace(/[^a-zA-Z0-9._-]/g, \"_\")\n let extension = \".png\"\n try {\n const match = new URL(iconUrl).pathname.match(/\\.(png|jpe?g|webp|gif|svg)$/i)\n if (match) extension = `.${match[1].toLowerCase()}`\n } catch {\n // Keep the decoder-friendly .png fallback; image loaders sniff content.\n }\n\n const target = new File(dir, `${safePackageName}${extension}`)\n const downloaded = await File.downloadFileAsync(iconUrl, target, {idempotent: true})\n\n // Only remove older extensions AFTER the replacement is safely on disk;\n // a broken icon URL must not destroy the last known-good cached logo.\n for (const item of dir.list()) {\n if (item instanceof File && item.uri !== downloaded.uri && item.name.startsWith(`${safePackageName}.`)) {\n try {\n item.delete()\n } catch {\n // Best effort; the current icon has already been persisted.\n }\n }\n }\n return downloaded.uri\n } catch (error) {\n console.warn(`APP_REGISTRY: failed to cache dev icon for ${packageName}:`, error)\n return readDevAppRecord(packageName)?.iconUrl ?? iconUrl\n }\n}\n\nfunction removeDevRecordKeys(packageName: string): void {\n const existing = readDevAppRecord(packageName)\n if (existing?.iconUrl.startsWith(\"file://\")) {\n try {\n const icon = new File(existing.iconUrl)\n if (icon.exists) icon.delete()\n } catch (error) {\n console.warn(`APP_REGISTRY: failed to delete dev icon for ${packageName}:`, error)\n }\n }\n storage.remove(`${packageName}_dev_meta`)\n storage.remove(`${packageName}_dev_url`)\n storage.remove(`${packageName}_dev_port`)\n storage.remove(`${packageName}_dev_last_reachable`)\n}\n\nfunction readDevAppRecord(packageName: string): DevAppRecord | null {\n const res = storage.load<string>(`${packageName}_dev_meta`)\n if (!res.is_ok()) return null\n try {\n return JSON.parse(res.value) as DevAppRecord\n } catch {\n return null\n }\n}\n\n/** Move the historical `com.dev` record onto its real manifest package key. */\nfunction migrateLegacyDevSlot(): void {\n const legacy = readDevAppRecord(DEV_APP_PACKAGE_NAME)\n const targetPackage = legacy?.sourcePackageName?.trim()\n if (!legacy || !targetPackage || targetPackage === DEV_APP_PACKAGE_NAME) return\n\n const existingTarget = readDevAppRecord(targetPackage)\n const migrated: DevAppRecord = existingTarget ?? {\n ...legacy,\n packageName: targetPackage,\n sourcePackageName: targetPackage,\n }\n if (!existingTarget) storage.save(`${targetPackage}_dev_meta`, JSON.stringify(migrated))\n\n const legacyUrl = storage.load<string>(`${DEV_APP_PACKAGE_NAME}_dev_url`)\n const targetUrl = storage.load<string>(`${targetPackage}_dev_url`)\n if (!targetUrl.is_ok()) {\n storage.save(`${targetPackage}_dev_url`, legacyUrl.is_ok() ? legacyUrl.value : migrated.devUrl)\n }\n const legacyPort = storage.load<number>(`${DEV_APP_PACKAGE_NAME}_dev_port`)\n const targetPort = storage.load<number>(`${targetPackage}_dev_port`)\n if (!targetPort.is_ok()) {\n const port = migrated.devPort ?? (legacyPort.is_ok() ? legacyPort.value : undefined)\n if (typeof port === \"number\" && Number.isFinite(port)) storage.save(`${targetPackage}_dev_port`, port)\n }\n\n storage.remove(`${DEV_APP_PACKAGE_NAME}_dev_meta`)\n storage.remove(`${DEV_APP_PACKAGE_NAME}_dev_url`)\n storage.remove(`${DEV_APP_PACKAGE_NAME}_dev_port`)\n storage.remove(`${DEV_APP_PACKAGE_NAME}_dev_last_reachable`)\n\n const index = Array.from(new Set(getDevAppIndex().map((pkg) => (pkg === DEV_APP_PACKAGE_NAME ? targetPackage : pkg))))\n storage.save(DEV_APPS_INDEX_KEY, JSON.stringify(index))\n}\n\n/**\n * Register or update one dev miniapp under its real manifest package. Different\n * package names coexist; rescanning the same package updates that package only.\n */\nexport async function registerDevApp(record: DevAppRecord): Promise<void> {\n migrateLegacyDevSlot()\n const packageName = record.packageName.trim()\n if (!packageName) throw new Error(\"Dev miniapp manifest is missing packageName\")\n\n const iconUrl = await cacheDevAppIcon(packageName, record.iconUrl)\n const devRecord: DevAppRecord = {\n ...record,\n packageName,\n sourcePackageName: packageName,\n name: record.name || DEV_APP_NAME,\n iconUrl,\n }\n storage.save(`${packageName}_dev_meta`, JSON.stringify(devRecord))\n storage.save(`${packageName}_dev_url`, record.devUrl)\n if (typeof record.devPort === \"number\" && Number.isFinite(record.devPort)) {\n storage.save(`${packageName}_dev_port`, record.devPort)\n } else {\n storage.remove(`${packageName}_dev_port`)\n }\n const idx = getDevAppIndex()\n if (!idx.includes(packageName)) {\n idx.push(packageName)\n storage.save(DEV_APPS_INDEX_KEY, JSON.stringify(idx))\n }\n appRegistry.markRefreshNeeded()\n}\n\n/** Drop one dev miniapp's metadata, routing keys, and cached icon. */\nexport function unregisterDevApp(packageName = DEV_APP_PACKAGE_NAME): void {\n removeDevRecordKeys(packageName)\n const idx = getDevAppIndex().filter((p) => p !== packageName)\n storage.save(DEV_APPS_INDEX_KEY, JSON.stringify(idx))\n appRegistry.markRefreshNeeded()\n}\n\nfunction getDevAppIndex(): string[] {\n const res = storage.load<string>(DEV_APPS_INDEX_KEY)\n if (!res.is_ok()) return []\n try {\n const parsed = JSON.parse(res.value)\n return Array.isArray(parsed) ? (parsed as string[]) : []\n } catch {\n return []\n }\n}\n\n/** Resolve the manifest package for a dev runtime (including the legacy slot). */\nexport function getDevAppSourcePackage(packageName = DEV_APP_PACKAGE_NAME): string | null {\n migrateLegacyDevSlot()\n const rec = readDevAppRecord(packageName)\n return rec?.sourcePackageName ?? rec?.packageName ?? null\n}\n\nexport function getDevAppAttestation(packageName = DEV_APP_PACKAGE_NAME): string | null {\n migrateLegacyDevSlot()\n return readDevAppRecord(packageName)?.devAttestation ?? null\n}\n\nexport function getDevAppRecords(): DevAppRecord[] {\n migrateLegacyDevSlot()\n const out: DevAppRecord[] = []\n for (const pkg of getDevAppIndex()) {\n const res = storage.load<string>(`${pkg}_dev_meta`)\n if (!res.is_ok()) continue\n try {\n const record = JSON.parse(res.value) as DevAppRecord\n const normalized = normalizeDevAppRecord(record)\n if (normalized !== record) {\n storage.save(`${pkg}_dev_meta`, JSON.stringify(normalized))\n storage.save(`${pkg}_dev_url`, normalized.devUrl)\n }\n out.push(normalized)\n } catch {\n /* corrupt record — skip */\n }\n }\n return out\n}\n\nconst appRegistry = AppRegistry.getInstance()\nexport default appRegistry\n"]}
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Keep the glasses LC3 transport alive while preventing spoken TTS from being
3
+ * ingested by cloud STT. Sources are reference-counted by id so overlapping
4
+ * speech playback cannot reopen the uplink until every active prompt has ended.
5
+ */
6
+ export declare function setAudioCloudUplinkSuppressed(sourceId: string, suppressed: boolean): void;
7
+ export declare function startAudioCloudUplink(): void;
8
+ export declare function stopAudioCloudUplink(): void;
9
+ //# sourceMappingURL=AudioCloudUplink.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AudioCloudUplink.d.ts","sourceRoot":"","sources":["../../src/services/AudioCloudUplink.ts"],"names":[],"mappings":"AAsBA;;;;GAIG;AACH,wBAAgB,6BAA6B,CAAC,QAAQ,EAAE,MAAM,EAAE,UAAU,EAAE,OAAO,GAAG,IAAI,CAGzF;AAED,wBAAgB,qBAAqB,IAAI,IAAI,CAW5C;AAED,wBAAgB,oBAAoB,IAAI,IAAI,CAI3C"}
@@ -0,0 +1,48 @@
1
+ /**
2
+ * Audio cloud uplink — engine-owned. Subscribes to the glasses' `mic_lc3` BLE frames
3
+ * and forwards each one to the v2 cloud session (`cloud.sendAudioFrame`), gated on the
4
+ * cloud being connected AND having active audio subscriptions so we don't burn the
5
+ * UDP/encrypt path when nothing upstream is listening.
6
+ *
7
+ * This is the device→cloud audio data-plane for the v2 runtime. It used to live in the
8
+ * host's MantleManager `mic_lc3` handler (the "cloud fork"); moved here so ANY host —
9
+ * including a bare OEM that never runs the v1 SocketComms plane — gets cloud
10
+ * transcription/translation, not just the first-party Mentra app.
11
+ *
12
+ * The old v1 UDP/SocketComms upload legs were removed; MantleManager only keeps
13
+ * host-side debug mic-activity tracking and on-device PCM fan-out.
14
+ *
15
+ * Started by `engine.start()`. Idempotent.
16
+ */
17
+ import BluetoothSdk from "@mentra/bluetooth-sdk/internal";
18
+ import { cloudClientService } from "./CloudClientService";
19
+ let sub = null;
20
+ const suppressionSources = new Set();
21
+ /**
22
+ * Keep the glasses LC3 transport alive while preventing spoken TTS from being
23
+ * ingested by cloud STT. Sources are reference-counted by id so overlapping
24
+ * speech playback cannot reopen the uplink until every active prompt has ended.
25
+ */
26
+ export function setAudioCloudUplinkSuppressed(sourceId, suppressed) {
27
+ if (suppressed)
28
+ suppressionSources.add(sourceId);
29
+ else
30
+ suppressionSources.delete(sourceId);
31
+ }
32
+ export function startAudioCloudUplink() {
33
+ if (sub)
34
+ return;
35
+ sub = BluetoothSdk.addListener("mic_lc3", (event) => {
36
+ if (suppressionSources.size === 0 &&
37
+ cloudClientService.isConnected() &&
38
+ cloudClientService.hasAudioSubscriptions()) {
39
+ cloudClientService.sendAudioFrame(new Uint8Array(event.lc3));
40
+ }
41
+ });
42
+ }
43
+ export function stopAudioCloudUplink() {
44
+ sub?.remove();
45
+ sub = null;
46
+ suppressionSources.clear();
47
+ }
48
+ //# sourceMappingURL=AudioCloudUplink.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AudioCloudUplink.js","sourceRoot":"","sources":["../../src/services/AudioCloudUplink.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AACH,OAAO,YAAY,MAAM,gCAAgC,CAAA;AACzD,OAAO,EAAC,kBAAkB,EAAC,MAAM,sBAAsB,CAAA;AAEvD,IAAI,GAAG,GAAgC,IAAI,CAAA;AAC3C,MAAM,kBAAkB,GAAG,IAAI,GAAG,EAAU,CAAA;AAE5C;;;;GAIG;AACH,MAAM,UAAU,6BAA6B,CAAC,QAAgB,EAAE,UAAmB;IACjF,IAAI,UAAU;QAAE,kBAAkB,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAA;;QAC3C,kBAAkB,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAA;AAC1C,CAAC;AAED,MAAM,UAAU,qBAAqB;IACnC,IAAI,GAAG;QAAE,OAAM;IACf,GAAG,GAAG,YAAY,CAAC,WAAW,CAAC,SAAS,EAAE,CAAC,KAAK,EAAE,EAAE;QAClD,IACE,kBAAkB,CAAC,IAAI,KAAK,CAAC;YAC7B,kBAAkB,CAAC,WAAW,EAAE;YAChC,kBAAkB,CAAC,qBAAqB,EAAE,EAC1C,CAAC;YACD,kBAAkB,CAAC,cAAc,CAAC,IAAI,UAAU,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAA;QAC9D,CAAC;IACH,CAAC,CAAC,CAAA;AACJ,CAAC;AAED,MAAM,UAAU,oBAAoB;IAClC,GAAG,EAAE,MAAM,EAAE,CAAA;IACb,GAAG,GAAG,IAAI,CAAA;IACV,kBAAkB,CAAC,KAAK,EAAE,CAAA;AAC5B,CAAC","sourcesContent":["/**\n * Audio cloud uplink — engine-owned. Subscribes to the glasses' `mic_lc3` BLE frames\n * and forwards each one to the v2 cloud session (`cloud.sendAudioFrame`), gated on the\n * cloud being connected AND having active audio subscriptions so we don't burn the\n * UDP/encrypt path when nothing upstream is listening.\n *\n * This is the device→cloud audio data-plane for the v2 runtime. It used to live in the\n * host's MantleManager `mic_lc3` handler (the \"cloud fork\"); moved here so ANY host —\n * including a bare OEM that never runs the v1 SocketComms plane — gets cloud\n * transcription/translation, not just the first-party Mentra app.\n *\n * The old v1 UDP/SocketComms upload legs were removed; MantleManager only keeps\n * host-side debug mic-activity tracking and on-device PCM fan-out.\n *\n * Started by `engine.start()`. Idempotent.\n */\nimport BluetoothSdk from \"@mentra/bluetooth-sdk/internal\"\nimport {cloudClientService} from \"./CloudClientService\"\n\nlet sub: {remove: () => void} | null = null\nconst suppressionSources = new Set<string>()\n\n/**\n * Keep the glasses LC3 transport alive while preventing spoken TTS from being\n * ingested by cloud STT. Sources are reference-counted by id so overlapping\n * speech playback cannot reopen the uplink until every active prompt has ended.\n */\nexport function setAudioCloudUplinkSuppressed(sourceId: string, suppressed: boolean): void {\n if (suppressed) suppressionSources.add(sourceId)\n else suppressionSources.delete(sourceId)\n}\n\nexport function startAudioCloudUplink(): void {\n if (sub) return\n sub = BluetoothSdk.addListener(\"mic_lc3\", (event) => {\n if (\n suppressionSources.size === 0 &&\n cloudClientService.isConnected() &&\n cloudClientService.hasAudioSubscriptions()\n ) {\n cloudClientService.sendAudioFrame(new Uint8Array(event.lc3))\n }\n })\n}\n\nexport function stopAudioCloudUplink(): void {\n sub?.remove()\n sub = null\n suppressionSources.clear()\n}\n"]}
@@ -0,0 +1,175 @@
1
+ interface AudioPlayRequest {
2
+ requestId: string;
3
+ audioUrl: string;
4
+ appId?: string;
5
+ volume?: number;
6
+ stopOtherAudio?: boolean;
7
+ /** Suppress microphone audio sent to cloud STT while this audio is audible. */
8
+ suppressCloudUplink?: boolean;
9
+ }
10
+ export type AudioPlaybackCompletionReason = "completed" | "interrupted" | "error";
11
+ type AudioPlaybackCompletion = (requestId: string, success: boolean, error: string | null, duration: number | null, reason: AudioPlaybackCompletionReason) => void;
12
+ /** Open request for a live PCM output stream (miniapp speaker.createStream). */
13
+ export interface AudioStreamOpenRequest {
14
+ streamId: string;
15
+ appId: string;
16
+ /** PCM sample rate in Hz (16000 / 24000 / 48000). */
17
+ sampleRate: number;
18
+ /** Channel count. v1 is mono. */
19
+ channels: number;
20
+ volume?: number;
21
+ stopOtherAudio?: boolean;
22
+ /**
23
+ * Called when the stream ends for any reason (drained after close, aborted,
24
+ * interrupted by other audio, or native error).
25
+ */
26
+ onEnded: (streamId: string, success: boolean, error: string | null, durationMs: number | null) => void;
27
+ }
28
+ declare class AudioPlaybackService {
29
+ private static instance;
30
+ private player;
31
+ private loadedPlayback;
32
+ private currentPlayback;
33
+ private pendingPlaybacks;
34
+ private streams;
35
+ private audioModeConfigured;
36
+ private audioStopDebounceTimer;
37
+ private audioRouteWarmUntil;
38
+ private audioRouteWarmupPromise;
39
+ private tailUplinkSuppressions;
40
+ private glassesVolumeRestoreLevel;
41
+ private static readonly AUDIO_STOP_DEBOUNCE_MS;
42
+ private static readonly A2DP_TAIL_DRAIN_MS;
43
+ private static readonly AUDIO_ROUTE_WARM_WINDOW_MS;
44
+ private static readonly AUDIO_ROUTE_PREWARM_MS;
45
+ private static readonly AUDIO_ROUTE_PREWARM_SAMPLE_RATE;
46
+ private static readonly AUDIO_ROUTE_PREWARM_PCM_BASE64;
47
+ /** If glasses report step volume at or below this, bump to FLOOR before A2DP playback. */
48
+ private static readonly GLASSES_VOLUME_LOW_THRESHOLD;
49
+ private static readonly GLASSES_VOLUME_FLOOR;
50
+ private constructor();
51
+ /**
52
+ * Configure audio mode for playback, re-asserting it on EVERY play.
53
+ *
54
+ * This must run before each play — not just once — because other parts of the
55
+ * app put the shared iOS AVAudioSession into a record-oriented category and
56
+ * never restore it. In particular the phone mic (PhoneMic.swift) switches the
57
+ * session to `.playAndRecord` (sometimes `.voiceChat`/earpiece routing) while
58
+ * capturing and only deactivates it on stop, leaving the category sticky. A
59
+ * miniapp like the Recorder records and then immediately plays back through
60
+ * this service; if we kept the old "configure once" guard, playback would land
61
+ * in the leftover `.playAndRecord` session and be inaudible on the phone
62
+ * speaker (the symptom: the progress bar runs but no sound comes out). Calling
63
+ * setAudioModeAsync with no `allowsRecording` maps to category `.playback`,
64
+ * reclaiming the speaker route. `audioModeConfigured` is kept only to gate the
65
+ * one-time log.
66
+ */
67
+ private ensureAudioModeConfigured;
68
+ static getInstance(): AudioPlaybackService;
69
+ /**
70
+ * Ensure we have a reusable player instance
71
+ */
72
+ private ensurePlayer;
73
+ private markAudioRouteWarm;
74
+ private isAudioRouteWarm;
75
+ /**
76
+ * Wake a cold Android A2DP route with silent PCM before a user-facing sound.
77
+ *
78
+ * Do not call pcmStreamClose here: some Bluetooth routes do not advance an
79
+ * idle AudioTrack playback head, so close waits for its drain timeout. After
80
+ * exactly 200ms of silence we abort the stream instead, which releases the
81
+ * pre-roll immediately and lets the real URL playback begin.
82
+ */
83
+ private prewarmAudioRouteIfCold;
84
+ private getGlassesMediaVolumeWithTiming;
85
+ private setGlassesMediaVolumeWithTiming;
86
+ /**
87
+ * Mentra Live: raise glasses media volume over BLE when it is very low so A2DP prompts are audible.
88
+ * Fail-open on unsupported devices, timeouts, or errors.
89
+ */
90
+ private ensureGlassesMediaVolumeForA2dp;
91
+ /**
92
+ * Restore the user's original glasses media step volume after A2DP playback finishes.
93
+ */
94
+ private restoreGlassesMediaVolume;
95
+ private clearFinishedPlayerAfterTail;
96
+ private releaseTailUplinkSuppressions;
97
+ /**
98
+ * Play audio from a URL.
99
+ * Returns a promise that resolves with playback result when audio finishes or errors.
100
+ */
101
+ play(request: AudioPlayRequest, onComplete: AudioPlaybackCompletion): Promise<void>;
102
+ /**
103
+ * Cancel one URL playback without touching audio owned by another request.
104
+ * Pending requests are prevented from reaching the native player; active
105
+ * requests are paused synchronously before their completion callback fires.
106
+ */
107
+ cancelPlayback(requestId: string): void;
108
+ /**
109
+ * Interrupt current playback and notify its callback
110
+ */
111
+ private interruptCurrentPlayback;
112
+ /**
113
+ * Handle playback status updates from expo-audio
114
+ */
115
+ private onPlaybackStatusUpdate;
116
+ /**
117
+ * Notify native that audio stopped, with debouncing to prevent mic toggle flicker
118
+ * when playing back-to-back audio files
119
+ */
120
+ private notifyAudioStopDebounced;
121
+ /**
122
+ * Open a live PCM stream session. Chunks are pushed with writeStreamChunk
123
+ * into native streaming audio (AudioTrack on Android, AVAudioEngine on iOS),
124
+ * following the media route such as A2DP to connected glasses.
125
+ */
126
+ openStream(request: AudioStreamOpenRequest): Promise<void>;
127
+ /**
128
+ * Append base64 PCM to an open stream. Resolves with the host-side backlog
129
+ * in ms; the native write blocks while the backlog is above the
130
+ * backpressure ceiling, so awaited writes self-throttle to realtime.
131
+ */
132
+ writeStreamChunk(streamId: string, base64: string): Promise<{
133
+ bufferedMs: number;
134
+ }>;
135
+ /** Drain the backlog, then finish. Resolves with the total played duration. */
136
+ closeStream(streamId: string): Promise<{
137
+ durationMs?: number;
138
+ }>;
139
+ /** Stop immediately, dropping the backlog. Safe on unknown/ended ids. */
140
+ abortStream(streamId: string): Promise<void>;
141
+ /** Abort every active stream (optionally sparing one about to replace them). */
142
+ private abortAllStreams;
143
+ /** Terminal bookkeeping for a stream: dedup, unregister, notify. */
144
+ private endStream;
145
+ /** Stream twin of ensureGlassesMediaVolumeForA2dp, guarded by stream.ended. */
146
+ private ensureGlassesMediaVolumeForA2dpStream;
147
+ /**
148
+ * Stop playback for a specific app.
149
+ * If appId is not provided, stops all playback.
150
+ */
151
+ stopForApp(appId?: string): Promise<void>;
152
+ /**
153
+ * Stop all audio playback
154
+ */
155
+ stopAll(): Promise<void>;
156
+ /**
157
+ * Check if audio is currently playing
158
+ */
159
+ isPlaying(): boolean;
160
+ /**
161
+ * Get current playback app IDs (all active)
162
+ */
163
+ getActiveAppIds(): string[];
164
+ /**
165
+ * Get number of active playbacks
166
+ */
167
+ getActiveCount(): number;
168
+ /**
169
+ * Release the player entirely (call when app is shutting down)
170
+ */
171
+ release(): void;
172
+ }
173
+ declare const audioPlaybackService: AudioPlaybackService;
174
+ export default audioPlaybackService;
175
+ //# sourceMappingURL=AudioPlaybackService.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AudioPlaybackService.d.ts","sourceRoot":"","sources":["../../src/services/AudioPlaybackService.ts"],"names":[],"mappings":"AAQA,UAAU,gBAAgB;IACxB,SAAS,EAAE,MA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