@mentra/engine 0.1.0-dev.0 → 0.1.0-dev.1

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 (441) hide show
  1. package/README.md +42 -1
  2. package/build/engine.d.ts +11 -3
  3. package/build/engine.d.ts.map +1 -1
  4. package/build/engine.js +7 -2
  5. package/build/engine.js.map +1 -1
  6. package/build/facades/dev.d.ts +3 -2
  7. package/build/facades/dev.d.ts.map +1 -1
  8. package/build/facades/dev.js +18 -12
  9. package/build/facades/dev.js.map +1 -1
  10. package/build/facades/gallery.js +1 -1
  11. package/build/facades/gallery.js.map +1 -1
  12. package/build/facades/glasses.d.ts +1 -0
  13. package/build/facades/glasses.d.ts.map +1 -1
  14. package/build/facades/glasses.js +19 -4
  15. package/build/facades/glasses.js.map +1 -1
  16. package/build/facades/glassesSettings.d.ts.map +1 -1
  17. package/build/facades/glassesSettings.js +1 -0
  18. package/build/facades/glassesSettings.js.map +1 -1
  19. package/build/facades/miniapps.d.ts +4 -0
  20. package/build/facades/miniapps.d.ts.map +1 -1
  21. package/build/facades/miniapps.js +5 -0
  22. package/build/facades/miniapps.js.map +1 -1
  23. package/build/facades/ota.d.ts +11 -2
  24. package/build/facades/ota.d.ts.map +1 -1
  25. package/build/facades/ota.js +19 -4
  26. package/build/facades/ota.js.map +1 -1
  27. package/build/facades/pairing.d.ts +4 -0
  28. package/build/facades/pairing.d.ts.map +1 -1
  29. package/build/facades/pairing.js +10 -8
  30. package/build/facades/pairing.js.map +1 -1
  31. package/build/facades/permissions.d.ts +10 -0
  32. package/build/facades/permissions.d.ts.map +1 -1
  33. package/build/facades/permissions.js +10 -0
  34. package/build/facades/permissions.js.map +1 -1
  35. package/build/facades/phoneNotifications.d.ts +0 -4
  36. package/build/facades/phoneNotifications.d.ts.map +1 -1
  37. package/build/facades/phoneNotifications.js +4 -14
  38. package/build/facades/phoneNotifications.js.map +1 -1
  39. package/build/index.d.ts +6 -3
  40. package/build/index.d.ts.map +1 -1
  41. package/build/index.js +4 -2
  42. package/build/index.js.map +1 -1
  43. package/build/internal.d.ts +3 -2
  44. package/build/internal.d.ts.map +1 -1
  45. package/build/internal.js +2 -1
  46. package/build/internal.js.map +1 -1
  47. package/build/react/MentraLiveOtaFlow.d.ts +38 -0
  48. package/build/react/MentraLiveOtaFlow.d.ts.map +1 -0
  49. package/build/react/MentraLiveOtaFlow.js +528 -0
  50. package/build/react/MentraLiveOtaFlow.js.map +1 -0
  51. package/build/react/index.d.ts +2 -0
  52. package/build/react/index.d.ts.map +1 -0
  53. package/build/react/index.js +2 -0
  54. package/build/react/index.js.map +1 -0
  55. package/build/react/useEngineSnapshot.d.ts +2 -0
  56. package/build/react/useEngineSnapshot.d.ts.map +1 -0
  57. package/build/react/useEngineSnapshot.js +14 -0
  58. package/build/react/useEngineSnapshot.js.map +1 -0
  59. package/build/runtime/bootstrap.d.ts +24 -1
  60. package/build/runtime/bootstrap.d.ts.map +1 -1
  61. package/build/runtime/bootstrap.js +17 -0
  62. package/build/runtime/bootstrap.js.map +1 -1
  63. package/build/runtime/scanQrSeam.d.ts +7 -0
  64. package/build/runtime/scanQrSeam.d.ts.map +1 -0
  65. package/build/runtime/scanQrSeam.js +16 -0
  66. package/build/runtime/scanQrSeam.js.map +1 -0
  67. package/build/services/AppRegistry.d.ts +33 -57
  68. package/build/services/AppRegistry.d.ts.map +1 -1
  69. package/build/services/AppRegistry.js +193 -144
  70. package/build/services/AppRegistry.js.map +1 -1
  71. package/build/services/AudioCloudUplink.d.ts +12 -0
  72. package/build/services/AudioCloudUplink.d.ts.map +1 -1
  73. package/build/services/AudioCloudUplink.js +22 -1
  74. package/build/services/AudioCloudUplink.js.map +1 -1
  75. package/build/services/AudioPlaybackService.d.ts +41 -2
  76. package/build/services/AudioPlaybackService.d.ts.map +1 -1
  77. package/build/services/AudioPlaybackService.js +250 -33
  78. package/build/services/AudioPlaybackService.js.map +1 -1
  79. package/build/services/BlobStore.d.ts +2 -1
  80. package/build/services/BlobStore.d.ts.map +1 -1
  81. package/build/services/BlobStore.js +17 -9
  82. package/build/services/BlobStore.js.map +1 -1
  83. package/build/services/CloudAudioSubscriptionSync.d.ts.map +1 -1
  84. package/build/services/CloudAudioSubscriptionSync.js +13 -1
  85. package/build/services/CloudAudioSubscriptionSync.js.map +1 -1
  86. package/build/services/CloudClientService.d.ts +15 -0
  87. package/build/services/CloudClientService.d.ts.map +1 -1
  88. package/build/services/CloudClientService.js +93 -1
  89. package/build/services/CloudClientService.js.map +1 -1
  90. package/build/services/DeviceEventRouter.js +5 -5
  91. package/build/services/DeviceEventRouter.js.map +1 -1
  92. package/build/services/ForegroundLocationPermission.d.ts +13 -0
  93. package/build/services/ForegroundLocationPermission.d.ts.map +1 -0
  94. package/build/services/ForegroundLocationPermission.js +12 -0
  95. package/build/services/ForegroundLocationPermission.js.map +1 -0
  96. package/build/services/GlassesSettingsSync.d.ts.map +1 -1
  97. package/build/services/GlassesSettingsSync.js +9 -3
  98. package/build/services/GlassesSettingsSync.js.map +1 -1
  99. package/build/services/GlassesStatusProjection.d.ts +2 -1
  100. package/build/services/GlassesStatusProjection.d.ts.map +1 -1
  101. package/build/services/GlassesStatusProjection.js +15 -8
  102. package/build/services/GlassesStatusProjection.js.map +1 -1
  103. package/build/services/HotspotOtaTransport.d.ts +29 -0
  104. package/build/services/HotspotOtaTransport.d.ts.map +1 -0
  105. package/build/services/HotspotOtaTransport.js +146 -0
  106. package/build/services/HotspotOtaTransport.js.map +1 -0
  107. package/build/services/HotspotShutdown.d.ts +17 -0
  108. package/build/services/HotspotShutdown.d.ts.map +1 -0
  109. package/build/services/HotspotShutdown.js +29 -0
  110. package/build/services/HotspotShutdown.js.map +1 -0
  111. package/build/services/LocalDisplayManager.d.ts +15 -0
  112. package/build/services/LocalDisplayManager.d.ts.map +1 -1
  113. package/build/services/LocalDisplayManager.js +106 -20
  114. package/build/services/LocalDisplayManager.js.map +1 -1
  115. package/build/services/LocalMiniappRuntime.d.ts +74 -2
  116. package/build/services/LocalMiniappRuntime.d.ts.map +1 -1
  117. package/build/services/LocalMiniappRuntime.js +785 -291
  118. package/build/services/LocalMiniappRuntime.js.map +1 -1
  119. package/build/services/LocalMiniappStorage.d.ts +32 -0
  120. package/build/services/LocalMiniappStorage.d.ts.map +1 -0
  121. package/build/services/LocalMiniappStorage.js +66 -0
  122. package/build/services/LocalMiniappStorage.js.map +1 -0
  123. package/build/services/LocalMiniappUserIdentity.d.ts +20 -0
  124. package/build/services/LocalMiniappUserIdentity.d.ts.map +1 -0
  125. package/build/services/LocalMiniappUserIdentity.js +43 -0
  126. package/build/services/LocalMiniappUserIdentity.js.map +1 -0
  127. package/build/services/LocalSttFallbackCoordinator.d.ts +9 -6
  128. package/build/services/LocalSttFallbackCoordinator.d.ts.map +1 -1
  129. package/build/services/LocalSttFallbackCoordinator.js +18 -12
  130. package/build/services/LocalSttFallbackCoordinator.js.map +1 -1
  131. package/build/services/MicStateCoordinator.d.ts +42 -1
  132. package/build/services/MicStateCoordinator.d.ts.map +1 -1
  133. package/build/services/MicStateCoordinator.js +141 -3
  134. package/build/services/MicStateCoordinator.js.map +1 -1
  135. package/build/services/MiniappLauncher.d.ts.map +1 -1
  136. package/build/services/MiniappLauncher.js +23 -3
  137. package/build/services/MiniappLauncher.js.map +1 -1
  138. package/build/services/MiniappLiveness.d.ts +12 -0
  139. package/build/services/MiniappLiveness.d.ts.map +1 -0
  140. package/build/services/MiniappLiveness.js +16 -0
  141. package/build/services/MiniappLiveness.js.map +1 -0
  142. package/build/services/NativeHttpResponse.d.ts +3 -0
  143. package/build/services/NativeHttpResponse.d.ts.map +1 -0
  144. package/build/services/NativeHttpResponse.js +6 -0
  145. package/build/services/NativeHttpResponse.js.map +1 -0
  146. package/build/services/OtaArtifactDownloader.d.ts +65 -0
  147. package/build/services/OtaArtifactDownloader.d.ts.map +1 -0
  148. package/build/services/OtaArtifactDownloader.js +226 -0
  149. package/build/services/OtaArtifactDownloader.js.map +1 -0
  150. package/build/services/OtaAutoChain.d.ts +34 -0
  151. package/build/services/OtaAutoChain.d.ts.map +1 -0
  152. package/build/services/OtaAutoChain.js +83 -0
  153. package/build/services/OtaAutoChain.js.map +1 -0
  154. package/build/services/OtaErrorMapping.d.ts +18 -0
  155. package/build/services/OtaErrorMapping.d.ts.map +1 -0
  156. package/build/services/OtaErrorMapping.js +63 -0
  157. package/build/services/OtaErrorMapping.js.map +1 -0
  158. package/build/services/OtaInstallCoordinator.d.ts +94 -14
  159. package/build/services/OtaInstallCoordinator.d.ts.map +1 -1
  160. package/build/services/OtaInstallCoordinator.js +574 -130
  161. package/build/services/OtaInstallCoordinator.js.map +1 -1
  162. package/build/services/OtaService.d.ts.map +1 -1
  163. package/build/services/OtaService.js +8 -1
  164. package/build/services/OtaService.js.map +1 -1
  165. package/build/services/OtaUpdateCheckService.d.ts +38 -3
  166. package/build/services/OtaUpdateCheckService.d.ts.map +1 -1
  167. package/build/services/OtaUpdateCheckService.js +142 -22
  168. package/build/services/OtaUpdateCheckService.js.map +1 -1
  169. package/build/services/PhoneCalendarHelpers.d.ts +32 -0
  170. package/build/services/PhoneCalendarHelpers.d.ts.map +1 -0
  171. package/build/services/PhoneCalendarHelpers.js +157 -0
  172. package/build/services/PhoneCalendarHelpers.js.map +1 -0
  173. package/build/services/PhoneCalendarService.d.ts +5 -0
  174. package/build/services/PhoneCalendarService.d.ts.map +1 -0
  175. package/build/services/PhoneCalendarService.js +45 -0
  176. package/build/services/PhoneCalendarService.js.map +1 -0
  177. package/build/services/PhoneCameraFovCoordinator.d.ts +30 -0
  178. package/build/services/PhoneCameraFovCoordinator.d.ts.map +1 -0
  179. package/build/services/PhoneCameraFovCoordinator.js +194 -0
  180. package/build/services/PhoneCameraFovCoordinator.js.map +1 -0
  181. package/build/services/PhoneNotificationsSync.d.ts.map +1 -1
  182. package/build/services/PhoneNotificationsSync.js +12 -10
  183. package/build/services/PhoneNotificationsSync.js.map +1 -1
  184. package/build/services/PhonePhotoCoordinator.d.ts +26 -2
  185. package/build/services/PhonePhotoCoordinator.d.ts.map +1 -1
  186. package/build/services/PhonePhotoCoordinator.js +79 -9
  187. package/build/services/PhonePhotoCoordinator.js.map +1 -1
  188. package/build/services/PhoneStreamCoordinator.d.ts +8 -1
  189. package/build/services/PhoneStreamCoordinator.d.ts.map +1 -1
  190. package/build/services/PhoneStreamCoordinator.js +125 -13
  191. package/build/services/PhoneStreamCoordinator.js.map +1 -1
  192. package/build/services/PhoneVideoCoordinator.d.ts +2 -0
  193. package/build/services/PhoneVideoCoordinator.d.ts.map +1 -1
  194. package/build/services/PhoneVideoCoordinator.js +10 -0
  195. package/build/services/PhoneVideoCoordinator.js.map +1 -1
  196. package/build/services/SceneRenderer.d.ts.map +1 -1
  197. package/build/services/SceneRenderer.js +15 -0
  198. package/build/services/SceneRenderer.js.map +1 -1
  199. package/build/services/SentenceTtsPipeline.d.ts +31 -0
  200. package/build/services/SentenceTtsPipeline.d.ts.map +1 -0
  201. package/build/services/SentenceTtsPipeline.js +67 -0
  202. package/build/services/SentenceTtsPipeline.js.map +1 -0
  203. package/build/services/SupportProfileSync.d.ts +22 -0
  204. package/build/services/SupportProfileSync.d.ts.map +1 -0
  205. package/build/services/SupportProfileSync.js +213 -0
  206. package/build/services/SupportProfileSync.js.map +1 -0
  207. package/build/services/TranscriptionRouting.d.ts +12 -0
  208. package/build/services/TranscriptionRouting.d.ts.map +1 -0
  209. package/build/services/TranscriptionRouting.js +24 -0
  210. package/build/services/TranscriptionRouting.js.map +1 -0
  211. package/build/services/TtsTextSanitizer.d.ts +5 -0
  212. package/build/services/TtsTextSanitizer.d.ts.map +1 -0
  213. package/build/services/TtsTextSanitizer.js +61 -0
  214. package/build/services/TtsTextSanitizer.js.map +1 -0
  215. package/build/services/WifiAdbRequest.d.ts +17 -0
  216. package/build/services/WifiAdbRequest.d.ts.map +1 -0
  217. package/build/services/WifiAdbRequest.js +35 -0
  218. package/build/services/WifiAdbRequest.js.map +1 -0
  219. package/build/services/asg/asgCameraApi.d.ts +43 -0
  220. package/build/services/asg/asgCameraApi.d.ts.map +1 -1
  221. package/build/services/asg/asgCameraApi.js +509 -26
  222. package/build/services/asg/asgCameraApi.js.map +1 -1
  223. package/build/services/asg/cameraRollExportCoordinator.d.ts +60 -0
  224. package/build/services/asg/cameraRollExportCoordinator.d.ts.map +1 -0
  225. package/build/services/asg/cameraRollExportCoordinator.js +618 -0
  226. package/build/services/asg/cameraRollExportCoordinator.js.map +1 -0
  227. package/build/services/asg/cameraRollExportLedger.d.ts +44 -0
  228. package/build/services/asg/cameraRollExportLedger.d.ts.map +1 -0
  229. package/build/services/asg/cameraRollExportLedger.js +78 -0
  230. package/build/services/asg/cameraRollExportLedger.js.map +1 -0
  231. package/build/services/asg/galleryNotices.d.ts +1 -1
  232. package/build/services/asg/galleryNotices.d.ts.map +1 -1
  233. package/build/services/asg/galleryNotices.js.map +1 -1
  234. package/build/services/asg/galleryPathMigration.d.ts +3 -0
  235. package/build/services/asg/galleryPathMigration.d.ts.map +1 -0
  236. package/build/services/asg/galleryPathMigration.js +26 -0
  237. package/build/services/asg/galleryPathMigration.js.map +1 -0
  238. package/build/services/asg/gallerySettingsService.d.ts +1 -0
  239. package/build/services/asg/gallerySettingsService.d.ts.map +1 -1
  240. package/build/services/asg/gallerySettingsService.js +2 -0
  241. package/build/services/asg/gallerySettingsService.js.map +1 -1
  242. package/build/services/asg/gallerySyncService.d.ts.map +1 -1
  243. package/build/services/asg/gallerySyncService.js +162 -56
  244. package/build/services/asg/gallerySyncService.js.map +1 -1
  245. package/build/services/asg/galleryTransferLedger.d.ts +58 -0
  246. package/build/services/asg/galleryTransferLedger.d.ts.map +1 -0
  247. package/build/services/asg/galleryTransferLedger.js +225 -0
  248. package/build/services/asg/galleryTransferLedger.js.map +1 -0
  249. package/build/services/asg/localNetworkTransport.d.ts +15 -0
  250. package/build/services/asg/localNetworkTransport.d.ts.map +1 -0
  251. package/build/services/asg/localNetworkTransport.js +144 -0
  252. package/build/services/asg/localNetworkTransport.js.map +1 -0
  253. package/build/services/asg/localStorageService.d.ts +18 -0
  254. package/build/services/asg/localStorageService.d.ts.map +1 -1
  255. package/build/services/asg/localStorageService.js +168 -19
  256. package/build/services/asg/localStorageService.js.map +1 -1
  257. package/build/services/asg/mediaProcessingQueue.d.ts +10 -0
  258. package/build/services/asg/mediaProcessingQueue.d.ts.map +1 -1
  259. package/build/services/asg/mediaProcessingQueue.js +193 -62
  260. package/build/services/asg/mediaProcessingQueue.js.map +1 -1
  261. package/build/services/audioPlaybackAssets.d.ts +8 -0
  262. package/build/services/audioPlaybackAssets.d.ts.map +1 -0
  263. package/build/services/audioPlaybackAssets.js +7 -0
  264. package/build/services/audioPlaybackAssets.js.map +1 -0
  265. package/build/services/gallerySyncClock.js +1 -1
  266. package/build/services/gallerySyncClock.js.map +1 -1
  267. package/build/services/glassesClockSync.js +2 -2
  268. package/build/services/glassesClockSync.js.map +1 -1
  269. package/build/services/manifestActions.d.ts +7 -0
  270. package/build/services/manifestActions.d.ts.map +1 -0
  271. package/build/services/manifestActions.js +25 -0
  272. package/build/services/manifestActions.js.map +1 -0
  273. package/build/services/otaDisplayState.d.ts +22 -11
  274. package/build/services/otaDisplayState.d.ts.map +1 -1
  275. package/build/services/otaDisplayState.js +36 -14
  276. package/build/services/otaDisplayState.js.map +1 -1
  277. package/build/services/otaInstallPolicy.d.ts +15 -3
  278. package/build/services/otaInstallPolicy.d.ts.map +1 -1
  279. package/build/services/otaInstallPolicy.js +24 -3
  280. package/build/services/otaInstallPolicy.js.map +1 -1
  281. package/build/services/otaManifestUrl.d.ts +2 -0
  282. package/build/services/otaManifestUrl.d.ts.map +1 -0
  283. package/build/services/{asgOtaVersionUrl.js → otaManifestUrl.js} +15 -5
  284. package/build/services/otaManifestUrl.js.map +1 -0
  285. package/build/services/slimStreamStatus.d.ts +11 -0
  286. package/build/services/slimStreamStatus.d.ts.map +1 -1
  287. package/build/services/slimStreamStatus.js +14 -4
  288. package/build/services/slimStreamStatus.js.map +1 -1
  289. package/build/stores/apps.d.ts.map +1 -1
  290. package/build/stores/apps.js +11 -0
  291. package/build/stores/apps.js.map +1 -1
  292. package/build/stores/bluetoothSettingKeys.d.ts.map +1 -1
  293. package/build/stores/bluetoothSettingKeys.js +2 -0
  294. package/build/stores/bluetoothSettingKeys.js.map +1 -1
  295. package/build/stores/gallerySync.d.ts +2 -0
  296. package/build/stores/gallerySync.d.ts.map +1 -1
  297. package/build/stores/gallerySync.js +2 -0
  298. package/build/stores/gallerySync.js.map +1 -1
  299. package/build/stores/glasses.d.ts.map +1 -1
  300. package/build/stores/glasses.js +3 -0
  301. package/build/stores/glasses.js.map +1 -1
  302. package/build/stores/settings.d.ts +17 -0
  303. package/build/stores/settings.d.ts.map +1 -1
  304. package/build/stores/settings.js +157 -17
  305. package/build/stores/settings.js.map +1 -1
  306. package/build/types/applet.d.ts +2 -0
  307. package/build/types/applet.d.ts.map +1 -1
  308. package/build/types/applet.js.map +1 -1
  309. package/build/types/asg.d.ts +7 -0
  310. package/build/types/asg.d.ts.map +1 -1
  311. package/build/types/asg.js.map +1 -1
  312. package/build/types/enums.d.ts +1 -0
  313. package/build/types/enums.d.ts.map +1 -1
  314. package/build/types/enums.js +1 -0
  315. package/build/types/enums.js.map +1 -1
  316. package/build/types/hardware.d.ts +1 -0
  317. package/build/types/hardware.d.ts.map +1 -1
  318. package/build/types/hardware.js +14 -0
  319. package/build/types/hardware.js.map +1 -1
  320. package/build/utils/configuredDevHost.d.ts +6 -0
  321. package/build/utils/configuredDevHost.d.ts.map +1 -0
  322. package/build/utils/configuredDevHost.js +19 -0
  323. package/build/utils/configuredDevHost.js.map +1 -0
  324. package/build/utils/devMiniappLaunch.d.ts +19 -8
  325. package/build/utils/devMiniappLaunch.d.ts.map +1 -1
  326. package/build/utils/devMiniappLaunch.js +144 -21
  327. package/build/utils/devMiniappLaunch.js.map +1 -1
  328. package/build/utils/diagnosticContext.d.ts.map +1 -1
  329. package/build/utils/diagnosticContext.js +15 -17
  330. package/build/utils/diagnosticContext.js.map +1 -1
  331. package/build/utils/hardware/hardware.d.ts.map +1 -1
  332. package/build/utils/hardware/hardware.js +7 -3
  333. package/build/utils/hardware/hardware.js.map +1 -1
  334. package/build/utils/miniappDiagnostics.d.ts +64 -0
  335. package/build/utils/miniappDiagnostics.d.ts.map +1 -0
  336. package/build/utils/miniappDiagnostics.js +173 -0
  337. package/build/utils/miniappDiagnostics.js.map +1 -0
  338. package/build/utils/permissions/MediaLibraryPermissions.d.ts +11 -0
  339. package/build/utils/permissions/MediaLibraryPermissions.d.ts.map +1 -1
  340. package/build/utils/permissions/MediaLibraryPermissions.js +27 -4
  341. package/build/utils/permissions/MediaLibraryPermissions.js.map +1 -1
  342. package/build/utils/timers/timers.d.ts.map +1 -1
  343. package/build/utils/timers/timers.js +55 -18
  344. package/build/utils/timers/timers.js.map +1 -1
  345. package/package.json +25 -15
  346. package/src/assets/silence.wav +0 -0
  347. package/src/engine.ts +7 -2
  348. package/src/facades/dev.ts +17 -12
  349. package/src/facades/gallery.ts +1 -1
  350. package/src/facades/glasses.ts +17 -4
  351. package/src/facades/glassesSettings.ts +5 -0
  352. package/src/facades/miniapps.ts +7 -0
  353. package/src/facades/ota.ts +19 -4
  354. package/src/facades/pairing.ts +11 -7
  355. package/src/facades/permissions.ts +14 -0
  356. package/src/facades/phoneNotifications.ts +4 -13
  357. package/src/index.ts +26 -2
  358. package/src/internal.ts +3 -1
  359. package/src/react/MentraLiveOtaFlow.tsx +856 -0
  360. package/src/react/index.ts +7 -0
  361. package/src/react/useEngineSnapshot.ts +16 -0
  362. package/src/runtime/bootstrap.ts +33 -1
  363. package/src/runtime/scanQrSeam.ts +20 -0
  364. package/src/services/AppRegistry.ts +224 -149
  365. package/src/services/AudioCloudUplink.ts +23 -1
  366. package/src/services/AudioPlaybackService.ts +287 -38
  367. package/src/services/BlobStore.ts +22 -9
  368. package/src/services/CloudAudioSubscriptionSync.ts +13 -1
  369. package/src/services/CloudClientService.ts +96 -1
  370. package/src/services/DeviceEventRouter.ts +5 -5
  371. package/src/services/ForegroundLocationPermission.ts +24 -0
  372. package/src/services/GlassesSettingsSync.ts +9 -3
  373. package/src/services/GlassesStatusProjection.ts +16 -8
  374. package/src/services/HotspotOtaTransport.ts +184 -0
  375. package/src/services/HotspotShutdown.ts +41 -0
  376. package/src/services/LocalDisplayManager.ts +112 -21
  377. package/src/services/LocalMiniappRuntime.ts +967 -346
  378. package/src/services/LocalMiniappStorage.ts +82 -0
  379. package/src/services/LocalMiniappUserIdentity.ts +46 -0
  380. package/src/services/LocalSttFallbackCoordinator.ts +19 -12
  381. package/src/services/MicStateCoordinator.ts +169 -4
  382. package/src/services/MiniappLauncher.ts +30 -3
  383. package/src/services/MiniappLiveness.ts +24 -0
  384. package/src/services/NativeHttpResponse.ts +6 -0
  385. package/src/services/OtaArtifactDownloader.ts +312 -0
  386. package/src/services/OtaAutoChain.ts +106 -0
  387. package/src/services/OtaErrorMapping.ts +80 -0
  388. package/src/services/OtaInstallCoordinator.ts +645 -143
  389. package/src/services/OtaService.ts +11 -5
  390. package/src/services/OtaUpdateCheckService.ts +180 -20
  391. package/src/services/PhoneCalendarHelpers.ts +212 -0
  392. package/src/services/PhoneCalendarService.ts +65 -0
  393. package/src/services/PhoneCameraFovCoordinator.ts +210 -0
  394. package/src/services/PhoneNotificationsSync.ts +12 -10
  395. package/src/services/PhonePhotoCoordinator.ts +116 -18
  396. package/src/services/PhoneStreamCoordinator.ts +139 -25
  397. package/src/services/PhoneVideoCoordinator.ts +11 -0
  398. package/src/services/SceneRenderer.ts +16 -0
  399. package/src/services/SentenceTtsPipeline.ts +106 -0
  400. package/src/services/SupportProfileSync.ts +218 -0
  401. package/src/services/TranscriptionRouting.ts +37 -0
  402. package/src/services/TtsTextSanitizer.ts +66 -0
  403. package/src/services/WifiAdbRequest.ts +53 -0
  404. package/src/services/asg/asgCameraApi.ts +615 -33
  405. package/src/services/asg/cameraRollExportCoordinator.ts +627 -0
  406. package/src/services/asg/cameraRollExportLedger.ts +122 -0
  407. package/src/services/asg/galleryNotices.ts +1 -0
  408. package/src/services/asg/galleryPathMigration.ts +22 -0
  409. package/src/services/asg/gallerySettingsService.ts +3 -0
  410. package/src/services/asg/gallerySyncService.ts +184 -73
  411. package/src/services/asg/galleryTransferLedger.ts +312 -0
  412. package/src/services/asg/localNetworkTransport.ts +169 -0
  413. package/src/services/asg/localStorageService.ts +179 -24
  414. package/src/services/asg/mediaProcessingQueue.ts +209 -62
  415. package/src/services/audioPlaybackAssets.ts +8 -0
  416. package/src/services/gallerySyncClock.ts +1 -1
  417. package/src/services/glassesClockSync.ts +2 -2
  418. package/src/services/manifestActions.ts +30 -0
  419. package/src/services/otaDisplayState.ts +57 -16
  420. package/src/services/otaInstallPolicy.ts +29 -3
  421. package/src/services/{asgOtaVersionUrl.ts → otaManifestUrl.ts} +16 -4
  422. package/src/services/slimStreamStatus.ts +16 -5
  423. package/src/stores/apps.ts +12 -0
  424. package/src/stores/bluetoothSettingKeys.ts +2 -0
  425. package/src/stores/gallerySync.ts +4 -0
  426. package/src/stores/glasses.ts +3 -0
  427. package/src/stores/settings.ts +179 -18
  428. package/src/types/applet.ts +2 -0
  429. package/src/types/asg.ts +7 -0
  430. package/src/types/enums.ts +2 -1
  431. package/src/types/hardware.ts +17 -0
  432. package/src/utils/configuredDevHost.ts +17 -0
  433. package/src/utils/devMiniappLaunch.ts +151 -23
  434. package/src/utils/diagnosticContext.ts +17 -17
  435. package/src/utils/hardware/hardware.ts +7 -9
  436. package/src/utils/miniappDiagnostics.ts +226 -0
  437. package/src/utils/permissions/MediaLibraryPermissions.ts +35 -4
  438. package/src/utils/timers/timers.ts +57 -21
  439. package/build/services/asgOtaVersionUrl.d.ts +0 -2
  440. package/build/services/asgOtaVersionUrl.d.ts.map +0 -1
  441. package/build/services/asgOtaVersionUrl.js.map +0 -1
@@ -10,6 +10,15 @@ export const SETTINGS = {
10
10
  // feature flags / mantle settings:
11
11
  dev_mode: { key: "dev_mode", defaultValue: () => __DEV__, writable: true, saveOnServer: true, persist: true }, // deprecated
12
12
  debug_mode: { key: "debug_mode", defaultValue: () => __DEV__, writable: true, saveOnServer: true, persist: true },
13
+ android_notification_listener_enabled: {
14
+ key: "android_notification_listener_enabled",
15
+ // Operational kill switch. The listener now runs in a guarded lightweight
16
+ // process, so normal installs can safely capture notifications by default.
17
+ defaultValue: () => true,
18
+ writable: true,
19
+ saveOnServer: true,
20
+ persist: true,
21
+ },
13
22
  super_mode: { key: "super_mode", defaultValue: () => false, writable: true, saveOnServer: true, persist: true },
14
23
  appearance_menu_enabled: {
15
24
  key: "appearance_menu_enabled",
@@ -134,6 +143,7 @@ export const SETTINGS = {
134
143
  writable: true,
135
144
  saveOnServer: false,
136
145
  persist: true,
146
+ resetOnBuildEnvChange: true,
137
147
  },
138
148
  cloud_runtime_url: {
139
149
  key: "cloud_runtime_url",
@@ -141,6 +151,7 @@ export const SETTINGS = {
141
151
  writable: true,
142
152
  saveOnServer: false,
143
153
  persist: true,
154
+ resetOnBuildEnvChange: true,
144
155
  },
145
156
  // Bookmarked Cloud V2 endpoint pairs. Each entry is {label, coreUrl,
146
157
  // runtimeUrl} — core + runtime are saved together because they are always
@@ -154,7 +165,7 @@ export const SETTINGS = {
154
165
  },
155
166
  // Developer override for the ASG OTA manifest URL. null/empty = no override;
156
167
  // the normal selection applies (legacy-glasses gate, EXPO_PUBLIC_ASG_OTA_VERSION_URL,
157
- // glasses-reported URL, then production). See getAsgOtaVersionUrl.
168
+ // glasses-reported URL, then production). See resolveOtaManifestUrl.
158
169
  ota_version_url: {
159
170
  key: "ota_version_url",
160
171
  defaultValue: () => null,
@@ -225,6 +236,14 @@ export const SETTINGS = {
225
236
  persist: true,
226
237
  nativeAuthoritative: true,
227
238
  },
239
+ project_name: {
240
+ key: "project_name",
241
+ defaultValue: () => "",
242
+ writable: true,
243
+ saveOnServer: false,
244
+ persist: true,
245
+ nativeAuthoritative: true,
246
+ },
228
247
  default_controller: {
229
248
  key: "default_controller",
230
249
  defaultValue: () => "",
@@ -338,12 +357,23 @@ export const SETTINGS = {
338
357
  saveOnServer: true,
339
358
  persist: true,
340
359
  },
360
+ // The Mentra App intentionally preserves Mentra Live's historical VAD-on
361
+ // product default. Standalone public Bluetooth SDK hosts default VAD off so
362
+ // their microphone audio remains continuous.
341
363
  voice_activity_detection_enabled: {
342
364
  key: "voice_activity_detection_enabled",
343
365
  defaultValue: () => true,
344
366
  writable: true,
345
- saveOnServer: false,
346
- persist: false,
367
+ saveOnServer: true,
368
+ persist: true,
369
+ },
370
+ // Mentra Live center-mic loudness / "Barrier" gate (cs_swit type 10). Default on.
371
+ loudness_gate_enabled: {
372
+ key: "loudness_gate_enabled",
373
+ defaultValue: () => true,
374
+ writable: true,
375
+ saveOnServer: true,
376
+ persist: true,
347
377
  },
348
378
  always_on_status_bar: {
349
379
  key: "always_on_status_bar",
@@ -533,7 +563,7 @@ export const SETTINGS = {
533
563
  // offline applets
534
564
  offline_mode: { key: "offline_mode", defaultValue: () => false, writable: true, saveOnServer: true, persist: true },
535
565
  // Runtime flag: coordinator flips this on when cloud STT has failed and fallback is active.
536
- // Native GlassesStore watches it to gate PCM Sherpa feeding. Not user-facing.
566
+ // Native GlassesStore watches it to gate PCM 鈫?Sherpa feeding. Not user-facing.
537
567
  local_stt_fallback_active: {
538
568
  key: "local_stt_fallback_active",
539
569
  defaultValue: () => false,
@@ -594,13 +624,6 @@ export const SETTINGS = {
594
624
  persist: true,
595
625
  },
596
626
  // notifications
597
- notifications_enabled: {
598
- key: "notifications_enabled",
599
- defaultValue: () => true,
600
- writable: true,
601
- saveOnServer: true,
602
- persist: true,
603
- },
604
627
  notifications_blocklist: {
605
628
  key: "notifications_blocklist",
606
629
  defaultValue: () => [],
@@ -641,6 +664,7 @@ export const BLUETOOTH_SETTING_KEYS = [
641
664
  SETTINGS.sensing_enabled.key,
642
665
  SETTINGS.power_saving_mode.key,
643
666
  SETTINGS.voice_activity_detection_enabled.key,
667
+ SETTINGS.loudness_gate_enabled.key,
644
668
  SETTINGS.lc3_frame_size.key,
645
669
  SETTINGS.preferred_mic.key,
646
670
  SETTINGS.screen_disabled.key,
@@ -669,6 +693,7 @@ export const BLUETOOTH_SETTING_KEYS = [
669
693
  SETTINGS.default_wearable.key,
670
694
  SETTINGS.device_name.key,
671
695
  SETTINGS.device_address.key,
696
+ SETTINGS.project_name.key,
672
697
  SETTINGS.default_controller.key,
673
698
  SETTINGS.pending_controller.key,
674
699
  SETTINGS.controller_device_name.key,
@@ -676,7 +701,7 @@ export const BLUETOOTH_SETTING_KEYS = [
676
701
  // offline applets:
677
702
  SETTINGS.offline_mode.key,
678
703
  // Runtime flag flipped by LocalSttFallbackCoordinator. Native reads it from
679
- // GlassesStore to gate PCM Sherpa feeding in handlePcm and to keep the
704
+ // GlassesStore to gate PCM 鈫?Sherpa feeding in handlePcm and to keep the
680
705
  // mic on while local STT is the active engine.
681
706
  SETTINGS.local_stt_fallback_active.key,
682
707
  SETTINGS.gallery_mode.key,
@@ -686,12 +711,12 @@ export const BLUETOOTH_SETTING_KEYS = [
686
711
  ];
687
712
  // Pairing identity is NATIVE-authoritative: the native layer writes it on
688
713
  // pairing success (handleDeviceReady) / forget and echoes it down via
689
- // save_setting; JS persists those echoes. JS→native, identity travels ONLY in
714
+ // save_setting; JS persists those echoes. JS鈫抧ative, identity travels ONLY in
690
715
  // the explicit full seeds (device-store hydration, pre-connect push,
691
716
  // post-demotion re-push) — never in the change-push subscription. Relaying an
692
717
  // echoed identity change back up would make the sync bidirectional with loop
693
718
  // gain 1: two identity values in flight (e.g. a boot demotion crossing a
694
- // native promotion) then chase each other through push→apply→echo→push
719
+ // native promotion) then chase each other through push鈫抋pply鈫抏cho鈫抪ush
695
720
  // forever, flapping the UI.
696
721
  //
697
722
  // Derived from the `nativeAuthoritative` descriptor flag (not maintained as a
@@ -709,6 +734,9 @@ const getDefaultSettings = () => Object.keys(SETTINGS).reduce((acc, key) => {
709
734
  // second caller runs a duplicate full disk load while the first is still in
710
735
  // flight. Cleared on failure so a later call can retry.
711
736
  let loadAllSettingsInFlight = null;
737
+ function printableSettingValue(key, value) {
738
+ return key.includes("token") || key.includes("email") ? "<redacted>" : JSON.stringify(value);
739
+ }
712
740
  export const useSettingsStore = create()(subscribeWithSelector((set, get) => ({
713
741
  settings: getDefaultSettings(),
714
742
  isInitialized: false,
@@ -727,7 +755,7 @@ export const useSettingsStore = create()(subscribeWithSelector((set, get) => ({
727
755
  throw new Error(`SETTINGS: ${originalKey} is not writable!`);
728
756
  }
729
757
  // Update store immediately for optimistic UI
730
- console.log(`SETTINGS: SET: ${key} = ${value}`);
758
+ console.log(`SETTINGS: SET: ${key} = ${printableSettingValue(key, value)}`);
731
759
  set((state) => ({
732
760
  settings: { ...state.settings, [key]: value },
733
761
  }));
@@ -832,7 +860,13 @@ export const useSettingsStore = create()(subscribeWithSelector((set, get) => ({
832
860
  }
833
861
  // normal key:value pair:
834
862
  let value = res.value;
835
- console.log(`SETTINGS: LOAD: ${setting.key} = ${value.value}`);
863
+ // res.value IS the stored value; logging value.value printed
864
+ // "undefined" for every loaded setting and disguised present
865
+ // values as missing. Redact token- and email-bearing keys: console
866
+ // logs are uploaded in bug-report artifacts (same keys
867
+ // diagnosticContext's SENSITIVE_SETTINGS_KEYS strips, minus an
868
+ // import that would cycle stores <-> utils).
869
+ console.log(`SETTINGS: LOAD: ${setting.key} = ${printableSettingValue(setting.key, value)}`);
836
870
  loadedSettings[setting.key] = value;
837
871
  }
838
872
  // console.log("##############################################")
@@ -842,6 +876,91 @@ export const useSettingsStore = create()(subscribeWithSelector((set, get) => ({
842
876
  isInitialized: true,
843
877
  settings: { ...state.settings, ...loadedSettings },
844
878
  }));
879
+ // This hidden debug switch originally shipped default-off while the
880
+ // notification-listener cold-start ANR was being investigated. Now
881
+ // that the listener runs in its own guarded process, migrate existing
882
+ // installs to the new default once; later explicit debug changes still
883
+ // persist normally.
884
+ // Reset the cloud backend override when the build's environment changes.
885
+ //
886
+ // cloud_core_url / cloud_runtime_url are persist:true and outrank both
887
+ // the build's env and the compiled default (see resolveUrl in
888
+ // cloudClient.ts). That is what we want inside one environment: a
889
+ // developer's METRO_AUTO pin should survive a rebuild. It is wrong
890
+ // across environments.
891
+ //
892
+ // The concrete case is an install that moves BETWEEN environments: an
893
+ // internal tester running a dev build with a pinned override who then
894
+ // installs the store build. The override outranks that build's prod
895
+ // URLs, so without this they keep talking to dev with nothing
896
+ // surfacing it.
897
+ //
898
+ // Note what this deliberately does NOT do, because the distinction is
899
+ // easy to get backwards. TestFlight and the App Store receive the SAME
900
+ // binary, so promotion does not change EXPO_PUBLIC_BUILD_ENV and this
901
+ // reset never fires on it. Promotion is safe for a different reason:
902
+ // the publishing lane bakes prod URLs (staging-builds.yml defaults
903
+ // cloud_env to prod), so a promoted build was pointed at production the
904
+ // whole time. The same holds for Android internal-track to production.
905
+ //
906
+ // The residual gap is therefore an override pinned while already on a
907
+ // prod-labelled build, which no label comparison can see. That is a
908
+ // deliberate limit: reaching it means typing a URL into a dev-only
909
+ // screen, VersionInfo renders the current value, and the same screen
910
+ // clears it.
911
+ //
912
+ // Comparing the baked EXPO_PUBLIC_BUILD_ENV against the last one seen
913
+ // on this device covers those environment switches and fresh installs
914
+ // without touching the setting write path. A reinstall needs no
915
+ // handling: it drops the marker and the override together
916
+ // (android:allowBackup="false", and iOS deletes the container).
917
+ const BUILD_ENV_KEY = "settings.lastBuildEnv";
918
+ const buildEnv = (process.env.EXPO_PUBLIC_BUILD_ENV ?? "dev").trim() || "dev";
919
+ const lastBuildEnv = storage.load(BUILD_ENV_KEY);
920
+ const previousBuildEnv = lastBuildEnv.is_error() ? undefined : lastBuildEnv.value;
921
+ if (previousBuildEnv !== buildEnv) {
922
+ // Clear when there is no marker yet, not just on a recorded change.
923
+ // The first build carrying this code meets every existing install
924
+ // with previousBuildEnv === undefined, and those are exactly the
925
+ // installs that may hold an override set before the pin existed --
926
+ // the population this is here to repair. Treating "no marker" as a
927
+ // fresh install would record the marker and never look again. A
928
+ // genuinely fresh install has nothing persisted, so the clear below
929
+ // writes each default over itself and costs nothing.
930
+ //
931
+ // Driven by the descriptors rather than a hardcoded key list, so a
932
+ // setting that needs this behaviour declares it in one place and
933
+ // cannot be missed here.
934
+ const scoped = Object.values(SETTINGS).filter((setting) => setting.resetOnBuildEnvChange);
935
+ console.log(`SETTINGS: build env ${previousBuildEnv ?? "(none recorded)"} -> ${buildEnv}, ` +
936
+ `clearing ${scoped.length} build-scoped setting(s)`);
937
+ let allCleared = true;
938
+ for (const setting of scoped) {
939
+ const cleared = await get().setSetting(setting.key, setting.defaultValue(), false);
940
+ if (cleared.is_error()) {
941
+ allCleared = false;
942
+ console.log(`SETTINGS: could not clear ${setting.key}:`, cleared.error);
943
+ }
944
+ }
945
+ // Advance the marker only once the reset actually landed. Recording
946
+ // it after a failed write would retire the retry and leave the stale
947
+ // override for the life of the install; leaving it unset costs one
948
+ // repeated attempt per launch until a write succeeds.
949
+ if (allCleared) {
950
+ storage.save(BUILD_ENV_KEY, buildEnv);
951
+ }
952
+ }
953
+ const NOTIFICATION_LISTENER_MIGRATION_KEY = "migration:android_notification_listener_default_on_v1";
954
+ const notificationListenerMigrationDone = storage.load(NOTIFICATION_LISTENER_MIGRATION_KEY);
955
+ if (notificationListenerMigrationDone.is_error() || !notificationListenerMigrationDone.value) {
956
+ const result = await get().setSetting(SETTINGS.android_notification_listener_enabled.key, true, false);
957
+ if (result.is_error()) {
958
+ console.log("SETTINGS: notification listener migration failed:", result.error);
959
+ }
960
+ else {
961
+ storage.save(NOTIFICATION_LISTENER_MIGRATION_KEY, true);
962
+ }
963
+ }
845
964
  // One-time migration: force android_blur=false for existing users.
846
965
  // The setting's default is already false; this migration covers users
847
966
  // who explicitly opted into Android blur effects before we discovered
@@ -849,7 +968,7 @@ export const useSettingsStore = create()(subscribeWithSelector((set, get) => ({
849
968
  // The dimezisBlurViewSdk31Plus blur each costs ~5-10ms/frame; with
850
969
  // multiple blurs on home (top fade + AppSwitcherButton x2) a low-end
851
970
  // device misses the 16ms budget consistently. Users can turn it back
852
- // on under Settings Appearance once we've optimized further.
971
+ // on under Settings 鈫?Appearance once we've optimized further.
853
972
  //
854
973
  // The setSetting call also pushes to the server (saveOnServer: true)
855
974
  // so the server-stored value flips too — otherwise the next sync
@@ -875,6 +994,27 @@ export const useSettingsStore = create()(subscribeWithSelector((set, get) => ({
875
994
  // already correct.
876
995
  storage.save(MIGRATION_KEY, true);
877
996
  }
997
+ // The old camera default cropped the sensor to 102掳. Move existing
998
+ // default-shaped values to the full 118掳 sensor once; named miniapp
999
+ // requests for the 102掳 "standard" preset remain available.
1000
+ const CAMERA_FOV_MIGRATION_KEY = "migration:camera_fov_full_sensor_v1";
1001
+ const cameraFovMigrationDone = storage.load(CAMERA_FOV_MIGRATION_KEY);
1002
+ if (cameraFovMigrationDone.is_error() || !cameraFovMigrationDone.value) {
1003
+ const current = get().getSetting(SETTINGS.camera_fov.key);
1004
+ let migrationSucceeded = true;
1005
+ if (current?.fov === 102 && (current.roi_position ?? 0) === 0) {
1006
+ const result = await get().setSetting(SETTINGS.camera_fov.key, { fov: 118, roi_position: 0 }, true);
1007
+ if (result.is_error()) {
1008
+ console.log("SETTINGS: camera FOV migration failed:", result.error);
1009
+ migrationSucceeded = false;
1010
+ }
1011
+ }
1012
+ // Unlike the blur migration above, a failed camera set may leave the
1013
+ // local value unchanged. Only mark this migration complete once the
1014
+ // desired value was applied so a transient failure retries on boot.
1015
+ if (migrationSucceeded)
1016
+ storage.save(CAMERA_FOV_MIGRATION_KEY, true);
1017
+ }
878
1018
  });
879
1019
  loadAllSettingsInFlight = inFlight;
880
1020
  void Promise.resolve(inFlight).then((result) => {
@@ -1 +1 @@
1
- {"version":3,"file":"settings.js","sourceRoot":"","sources":["../../src/stores/settings.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,WAAW,EAAC,MAAM,uBAAuB,CAAA;AACjD,OAAO,EAAc,MAAM,IAAI,GAAG,EAAS,MAAM,aAAa,CAAA;AAC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,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,CAAA;IAChE,MAAM,UAAU,GAAG,gBAAgB,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,UAAU,CAAC,CAAA;IAChE,OAAO,CAAC,KAAK,EAAE,CAAC,QAAW,EAAE,EAAE,CAAC,UAAU,CAAC,GAAG,EAAE,QAAQ,CAAC,CAAC,CAAA;AAC5D,CAAC,CAAA","sourcesContent":["import {getTimeZone} from \"react-native-localize\"\nimport {AsyncResult, result as Res, Result} from \"typesafe-ts\"\nimport {create} from \"zustand\"\nimport {subscribeWithSelector} from \"zustand/middleware\"\n\nimport {storage} from \"../utils/storage\"\nimport {getBluetoothSettingKeysForDevice} from \"./bluetoothSettingKeys\"\nimport {useGlassesStore} from \"./glasses\"\n\nexport {MENTRA_LIVE_SETTING_KEYS, getBluetoothSettingKeysForDevice} from \"./bluetoothSettingKeys\"\n\nexport interface Setting {\n key: string\n defaultValue: () => any\n writable: boolean\n saveOnServer: boolean\n // change the key to a different key based on the indexer\n // NEVER do any network calls in the indexer (or performance will suffer greatly\n indexer?: (key: string) => string\n // optionally override the value of the setting when it's accessed\n override?: () => any\n // onWrite?: () => void\n persist: boolean\n // Pairing-identity keys are NATIVE-authoritative: the native layer writes\n // them on pairing success (handleDeviceReady) / forget and echoes them down\n // via save_setting; JS→native they travel only in the explicit SEEDS\n // (hydration, pre-connect, post-demotion, abandon re-seed) — never the\n // change-push and never the on-connect replay, whose mid-relay snapshot can\n // overwrite a just-promoted identity. PAIRING_IDENTITY_KEYS is derived from\n // this flag so the sync exclusions can't drift from the descriptors.\n nativeAuthoritative?: true\n}\n\nexport const SETTINGS: Record<string, Setting> = {\n // feature flags / mantle settings:\n dev_mode: {key: \"dev_mode\", defaultValue: () => __DEV__, writable: true, saveOnServer: true, persist: true}, // deprecated\n debug_mode: {key: \"debug_mode\", defaultValue: () => __DEV__, writable: true, saveOnServer: true, persist: true},\n super_mode: {key: \"super_mode\", defaultValue: () => false, writable: true, saveOnServer: true, persist: true},\n appearance_menu_enabled: {\n key: \"appearance_menu_enabled\",\n defaultValue: () => false,\n writable: true,\n saveOnServer: true,\n persist: true,\n },\n app_boot_extra_info: {\n key: \"app_boot_extra_info\",\n defaultValue: () => false,\n writable: true,\n saveOnServer: true,\n persist: true,\n },\n miniapp_dev_mode: {\n key: \"miniapp_dev_mode\",\n defaultValue: () => false,\n writable: true,\n saveOnServer: true,\n persist: true,\n },\n enable_squircles: {\n key: \"enable_squircles\",\n defaultValue: () => true,\n writable: true,\n saveOnServer: true,\n persist: true,\n },\n android_blur: {\n key: \"android_blur\",\n defaultValue: () => {\n return false\n },\n writable: true,\n saveOnServer: true,\n persist: true,\n },\n android_inner_shadow: {\n key: \"android_inner_shadow\",\n defaultValue: () => {\n return false\n },\n writable: true,\n saveOnServer: true,\n persist: true,\n },\n ios_glass_effect: {\n key: \"ios_glass_effect\",\n defaultValue: () => true,\n writable: true,\n saveOnServer: true,\n persist: true,\n },\n ios_app_switcher_bottom_swipe: {\n key: \"ios_app_switcher_bottom_swipe\",\n defaultValue: () => false,\n writable: true,\n saveOnServer: true,\n persist: true,\n },\n debug_console: {\n key: \"debug_console\",\n defaultValue: () => false,\n writable: true,\n saveOnServer: true,\n persist: true,\n },\n debug_navigation_history: {\n key: \"debug_navigation_history\",\n defaultValue: () => false,\n writable: true,\n saveOnServer: true,\n persist: true,\n },\n debug_core_status_bar: {\n key: \"debug_core_status_bar\",\n defaultValue: () => false,\n writable: true,\n saveOnServer: true,\n persist: true,\n },\n // Mentra Nex feature flags (off by default; toggled from Nex Developer Settings).\n // When on, the Nex display skips ASCII-only text sanitization so CJK/Chinese\n // captions render on glasses. Synced to the Bluetooth SDK via BLUETOOTH_SETTING_KEYS.\n nex_chinese_captions: {\n key: \"nex_chinese_captions\",\n defaultValue: () => false,\n writable: true,\n saveOnServer: true,\n persist: true,\n },\n // When on, LC3 audio received from Nex glasses is played back (Android only).\n // Local-only dev toggle: defaults off and never synced to the cloud account\n // (saveOnServer: false); persists locally so it survives app restarts.\n // Key renamed from the legacy `nex_audio_playback` so stale server/local\n // values (saved back when this was saveOnServer:true) can't re-enable it.\n nex_lc3_audio_playback: {\n key: \"nex_lc3_audio_playback\",\n defaultValue: () => false,\n writable: true,\n saveOnServer: false,\n persist: true,\n },\n china_deployment: {\n key: \"china_deployment\",\n defaultValue: () => (process.env.EXPO_PUBLIC_DEPLOYMENT_REGION === \"china\" ? true : false),\n override: () => (process.env.EXPO_PUBLIC_DEPLOYMENT_REGION === \"china\" ? true : false),\n writable: false,\n saveOnServer: false,\n persist: true,\n },\n // Cloud V2 endpoint OVERRIDES. Empty = no override; cloudClient's resolveUrl\n // owns the full precedence (override -> env -> Metro-derived dev default).\n // The value may be an explicit URL or the METRO_AUTO sentinel (\"my dev\n // laptop\", resolved live from Metro so it survives network changes). Never\n // bake an env var or a personal LAN IP into the default here: that makes the\n // override branch always-truthy and strands devs on a stale address.\n cloud_core_url: {\n key: \"cloud_core_url\",\n defaultValue: () => \"\",\n writable: true,\n saveOnServer: false,\n persist: true,\n },\n cloud_runtime_url: {\n key: \"cloud_runtime_url\",\n defaultValue: () => \"\",\n writable: true,\n saveOnServer: false,\n persist: true,\n },\n // Bookmarked Cloud V2 endpoint pairs. Each entry is {label, coreUrl,\n // runtimeUrl} — core + runtime are saved together because they are always\n // applied as a matched set (presets fill both; Save & Test verifies both).\n saved_cloud_url_pairs: {\n key: \"saved_cloud_url_pairs\",\n defaultValue: () => [],\n writable: true,\n saveOnServer: false,\n persist: true,\n },\n // Developer override for the ASG OTA manifest URL. null/empty = no override;\n // the normal selection applies (legacy-glasses gate, EXPO_PUBLIC_ASG_OTA_VERSION_URL,\n // glasses-reported URL, then production). See getAsgOtaVersionUrl.\n ota_version_url: {\n key: \"ota_version_url\",\n defaultValue: () => null,\n writable: true,\n saveOnServer: false,\n persist: true,\n },\n saved_ota_version_urls: {\n key: \"saved_ota_version_urls\",\n defaultValue: () => [],\n writable: true,\n saveOnServer: false,\n persist: true,\n },\n reconnect_on_app_foreground: {\n key: \"reconnect_on_app_foreground\",\n defaultValue: () => true,\n writable: true,\n saveOnServer: true,\n persist: true,\n },\n location_tier: {key: \"location_tier\", defaultValue: () => \"\", writable: true, saveOnServer: true, persist: true},\n // Volatile bearer synced to Bluetooth for glasses-side Cloud V2 calls. The\n // key name is kept for BLE compatibility, but the value must never be loaded\n // from or saved to the legacy Cloud V1 settings store.\n core_token: {key: \"core_token\", defaultValue: () => \"\", writable: true, saveOnServer: false, persist: false},\n auth_email: {key: \"auth_email\", defaultValue: () => \"\", writable: true, saveOnServer: false, persist: true},\n // Pairing identity is per-phone, not per-account: two phones on one account\n // can be paired to different glasses, so none of these keys may sync to the\n // server (saveOnServer: false — a stale server copy resurrecting a local\n // pairing identity is exactly the desync this group's flags prevent).\n //\n // Two-phase identity: pending_wearable is the model the user last STARTED\n // pairing (written at selection, rendered as a finish-pairing card);\n // default_wearable + device_name + device_address are only promoted by the\n // native layer when pairing actually succeeds (handleDeviceReady).\n // pending_wearable persists so an abandoned selection still shows its\n // finish-pairing card after an app restart.\n pending_wearable: {\n key: \"pending_wearable\",\n defaultValue: () => \"\",\n writable: true,\n saveOnServer: false,\n persist: true,\n nativeAuthoritative: true,\n },\n default_wearable: {\n key: \"default_wearable\",\n defaultValue: () => \"\",\n writable: true,\n saveOnServer: false,\n persist: true,\n nativeAuthoritative: true,\n },\n device_name: {\n key: \"device_name\",\n defaultValue: () => \"\",\n writable: true,\n saveOnServer: false,\n persist: true,\n nativeAuthoritative: true,\n },\n device_address: {\n key: \"device_address\",\n defaultValue: () => \"\",\n writable: true,\n saveOnServer: false,\n persist: true,\n nativeAuthoritative: true,\n },\n default_controller: {\n key: \"default_controller\",\n defaultValue: () => \"\",\n writable: true,\n saveOnServer: false,\n persist: true,\n nativeAuthoritative: true,\n },\n pending_controller: {\n key: \"pending_controller\",\n defaultValue: () => \"\",\n writable: true,\n saveOnServer: false,\n persist: true,\n nativeAuthoritative: true,\n },\n controller_device_name: {\n key: \"controller_device_name\",\n defaultValue: () => \"\",\n writable: true,\n saveOnServer: false,\n persist: true,\n nativeAuthoritative: true,\n },\n controller_address: {\n key: \"controller_address\",\n defaultValue: () => \"\",\n writable: true,\n saveOnServer: false,\n persist: true,\n nativeAuthoritative: true,\n },\n // ui state:\n home_background: {\n key: \"home_background\",\n defaultValue: () => \"\",\n writable: true,\n saveOnServer: false,\n persist: true,\n },\n theme_preference: {\n key: \"theme_preference\",\n defaultValue: () => \"light\",\n // Force light mode - i mode is not complete yet\n // override: () => \"light\",\n writable: true,\n saveOnServer: true,\n persist: true,\n },\n enable_phone_notifications: {\n key: \"enable_phone_notifications\",\n defaultValue: () => false,\n writable: true,\n saveOnServer: true,\n persist: true,\n },\n settings_access_count: {\n key: \"settings_access_count\",\n defaultValue: () => 0,\n writable: true,\n saveOnServer: true,\n persist: true,\n },\n show_advanced_settings: {\n key: \"show_advanced_settings\",\n defaultValue: () => false,\n writable: true,\n saveOnServer: false,\n persist: true,\n },\n onboarding_completed: {\n key: \"onboarding_completed\",\n defaultValue: () => false,\n writable: true,\n saveOnServer: true,\n persist: true,\n },\n onboarding_live_completed: {\n key: \"onboarding_live_completed\",\n defaultValue: () => false,\n writable: true,\n saveOnServer: true,\n persist: true,\n },\n onboarding_os_completed: {\n key: \"onboarding_os_completed\",\n defaultValue: () => false,\n writable: true,\n saveOnServer: true,\n persist: true,\n },\n has_ever_activated_app: {\n key: \"has_ever_activated_app\",\n defaultValue: () => false,\n writable: true,\n saveOnServer: true,\n persist: true,\n },\n\n // Bluetooth SDK settings:\n sensing_enabled: {\n key: \"sensing_enabled\",\n defaultValue: () => true,\n writable: true,\n saveOnServer: true,\n persist: true,\n },\n power_saving_mode: {\n key: \"power_saving_mode\",\n defaultValue: () => false,\n writable: true,\n saveOnServer: true,\n persist: true,\n },\n voice_activity_detection_enabled: {\n key: \"voice_activity_detection_enabled\",\n defaultValue: () => true,\n writable: true,\n saveOnServer: false,\n persist: false,\n },\n always_on_status_bar: {\n key: \"always_on_status_bar\",\n defaultValue: () => false,\n writable: true,\n saveOnServer: true,\n persist: true,\n },\n // Legacy cloud/mobile setting name. Locally it maps to glasses-side Voice Activity Detection.\n bypass_vad_for_debugging: {\n key: \"bypass_vad_for_debugging\",\n defaultValue: () => false,\n writable: true,\n saveOnServer: true,\n persist: true,\n },\n bypass_audio_encoding_for_debugging: {\n key: \"bypass_audio_encoding_for_debugging\",\n defaultValue: () => false,\n writable: true,\n saveOnServer: true,\n persist: true,\n },\n metric_system: {\n key: \"metric_system\",\n defaultValue: () => false,\n writable: true,\n saveOnServer: true,\n persist: true,\n },\n twelve_hour_time: {\n key: \"twelve_hour_time\",\n defaultValue: () => true,\n writable: true,\n saveOnServer: true,\n persist: true,\n },\n enforce_local_transcription: {\n key: \"enforce_local_transcription\",\n defaultValue: () => false,\n writable: true,\n saveOnServer: true,\n persist: true,\n },\n // LC3 audio quality setting (frame size in bytes)\n // 20 = 16kbps (low bandwidth), 40 = 32kbps (balanced), 60 = 48kbps (high quality)\n lc3_frame_size: {\n key: \"lc3_frame_size\",\n defaultValue: () => 60,\n writable: true,\n saveOnServer: false,\n persist: true,\n },\n preferred_mic: {\n key: \"preferred_mic\",\n defaultValue: () => \"auto\",\n writable: true,\n indexer: (key: string) => {\n const glasses = useSettingsStore.getState().getSetting(SETTINGS.default_wearable.key)\n if (glasses) {\n return `${key}:${glasses}`\n }\n return key\n },\n saveOnServer: true,\n persist: true,\n },\n screen_disabled: {\n key: \"screen_disabled\",\n defaultValue: () => false,\n writable: true,\n saveOnServer: false,\n persist: true,\n },\n // glasses settings:\n contextual_dashboard: {\n key: \"contextual_dashboard\",\n defaultValue: () => true,\n writable: true,\n saveOnServer: true,\n persist: true,\n },\n use_native_dashboard: {\n key: \"use_native_dashboard\",\n defaultValue: () => true,\n writable: true,\n saveOnServer: true,\n persist: true,\n },\n head_up_angle: {key: \"head_up_angle\", defaultValue: () => 45, writable: true, saveOnServer: true, persist: true},\n brightness: {key: \"brightness\", defaultValue: () => 50, writable: true, saveOnServer: true, persist: true},\n auto_brightness: {\n key: \"auto_brightness\",\n defaultValue: () => true,\n writable: true,\n saveOnServer: true,\n persist: true,\n },\n dashboard_height: {\n key: \"dashboard_height\",\n defaultValue: () => 4,\n writable: true,\n saveOnServer: true,\n persist: true,\n },\n dashboard_depth: {\n key: \"dashboard_depth\",\n defaultValue: () => 2,\n writable: true,\n saveOnServer: true,\n persist: true,\n },\n menu_apps: {\n key: \"menu_apps\",\n defaultValue: () => null,\n writable: true,\n saveOnServer: true,\n persist: true,\n },\n calendar_events: {\n key: \"calendar_events\",\n defaultValue: () => [],\n writable: true,\n saveOnServer: false,\n persist: false,\n },\n // button settings\n // Legacy persisted/cloud key; hardware behavior is now controlled by gallery_mode plus capture settings.\n button_mode: {key: \"button_mode\", defaultValue: () => \"photo\", writable: true, saveOnServer: true, persist: true},\n button_photo_size: {\n key: \"button_photo_size\",\n defaultValue: () => \"max\",\n writable: true,\n saveOnServer: true,\n persist: true,\n },\n button_video_settings: {\n key: \"button_video_settings\",\n defaultValue: () => ({width: 1920, height: 1080, fps: 30}),\n writable: true,\n saveOnServer: true,\n persist: true,\n },\n button_max_recording_time: {\n key: \"button_max_recording_time\",\n defaultValue: () => 10,\n writable: true,\n saveOnServer: true,\n persist: true,\n },\n camera_fov: {\n key: \"camera_fov\",\n defaultValue: () => ({fov: 118, roi_position: 0}),\n writable: true,\n saveOnServer: true,\n persist: true,\n },\n media_post_processing: {\n key: \"media_post_processing\",\n defaultValue: () => false,\n writable: true,\n saveOnServer: true,\n persist: true,\n },\n\n // time zone settings\n time_zone: {\n key: \"time_zone\",\n defaultValue: () => \"\",\n writable: true,\n override: () => {\n const override = useSettingsStore.getState().getSetting(SETTINGS.time_zone_override.key)\n if (override) {\n return override\n }\n return getTimeZone()\n },\n saveOnServer: true,\n persist: true,\n },\n time_zone_override: {\n key: \"time_zone_override\",\n defaultValue: () => \"\",\n writable: true,\n saveOnServer: true,\n persist: true,\n },\n // offline applets\n offline_mode: {key: \"offline_mode\", defaultValue: () => false, writable: true, saveOnServer: true, persist: true},\n // Runtime flag: coordinator flips this on when cloud STT has failed and fallback is active.\n // Native GlassesStore watches it to gate PCM → Sherpa feeding. Not user-facing.\n local_stt_fallback_active: {\n key: \"local_stt_fallback_active\",\n defaultValue: () => false,\n writable: true,\n saveOnServer: false,\n persist: false,\n },\n gallery_mode: {key: \"gallery_mode\", defaultValue: () => true, writable: true, saveOnServer: true, persist: true},\n gallery_sync_explained: {\n key: \"gallery_sync_explained\",\n defaultValue: () => false,\n writable: true,\n saveOnServer: false,\n persist: true,\n },\n offline_camera_running: {\n key: \"offline_camera_running\",\n defaultValue: () => false,\n writable: true,\n saveOnServer: false,\n persist: true,\n },\n // offline translation\n offline_translation_running: {\n key: \"offline_translation_running\",\n defaultValue: () => false,\n writable: true,\n saveOnServer: true,\n persist: true,\n },\n offline_translation_source: {\n key: \"offline_translation_source\",\n defaultValue: () => \"en\",\n writable: true,\n saveOnServer: true,\n persist: true,\n },\n offline_translation_target: {\n key: \"offline_translation_target\",\n defaultValue: () => \"es\",\n writable: true,\n saveOnServer: true,\n persist: true,\n },\n // button action settings\n default_button_action_enabled: {\n key: \"default_button_action_enabled\",\n defaultValue: () => true,\n writable: true,\n saveOnServer: true,\n persist: true,\n },\n default_button_action_app: {\n key: \"default_button_action_app\",\n defaultValue: () => \"com.mentra.camera\",\n writable: true,\n saveOnServer: true,\n persist: true,\n },\n // notifications\n notifications_enabled: {\n key: \"notifications_enabled\",\n defaultValue: () => true,\n writable: true,\n saveOnServer: true,\n persist: true,\n },\n notifications_blocklist: {\n key: \"notifications_blocklist\",\n defaultValue: () => [],\n writable: true,\n saveOnServer: true,\n persist: true,\n },\n // Cached required version from server - used to enforce updates even when offline\n cached_required_version: {\n key: \"cached_required_version\",\n defaultValue: () => \"\",\n writable: true,\n saveOnServer: false,\n persist: true,\n },\n // OTA update dismissal - stores the version code user dismissed (not persisted so resets on app restart)\n dismissed_ota_version: {\n key: \"dismissed_ota_version\",\n defaultValue: () => \"\",\n writable: true,\n saveOnServer: false,\n persist: false,\n },\n // Contact email for feedback (persisted for Apple private relay users)\n contact_email: {\n key: \"contact_email\",\n defaultValue: () => \"\",\n writable: true,\n saveOnServer: false,\n persist: true,\n },\n} as const\n\nexport const OFFLINE_APPLETS: string[] = [\"com.mentra.livecaptions\", \"com.mentra.camera\"]\n\n// These settings are automatically synced to the Bluetooth SDK.\n// Keep this list hardware-facing; app/UI/cloud-only preferences should stay in JS/Crust.\nexport const BLUETOOTH_SETTING_KEYS: string[] = [\n // Bluetooth settings:\n SETTINGS.sensing_enabled.key,\n SETTINGS.power_saving_mode.key,\n SETTINGS.voice_activity_detection_enabled.key,\n SETTINGS.lc3_frame_size.key,\n SETTINGS.preferred_mic.key,\n SETTINGS.screen_disabled.key,\n SETTINGS.auth_email.key,\n SETTINGS.core_token.key,\n // glasses settings:\n SETTINGS.contextual_dashboard.key,\n SETTINGS.head_up_angle.key,\n SETTINGS.brightness.key,\n SETTINGS.auto_brightness.key,\n SETTINGS.dashboard_height.key,\n SETTINGS.dashboard_depth.key,\n SETTINGS.menu_apps.key,\n SETTINGS.calendar_events.key,\n SETTINGS.use_native_dashboard.key,\n SETTINGS.twelve_hour_time.key,\n SETTINGS.metric_system.key,\n // button:\n SETTINGS.button_photo_size.key,\n // Legacy MentraLive native code reads the object form when syncing video settings.\n SETTINGS.button_video_settings.key,\n SETTINGS.button_max_recording_time.key,\n SETTINGS.camera_fov.key,\n // device / pairing:\n SETTINGS.pending_wearable.key,\n SETTINGS.default_wearable.key,\n SETTINGS.device_name.key,\n SETTINGS.device_address.key,\n SETTINGS.default_controller.key,\n SETTINGS.pending_controller.key,\n SETTINGS.controller_device_name.key,\n SETTINGS.controller_address.key,\n // offline applets:\n SETTINGS.offline_mode.key,\n // Runtime flag flipped by LocalSttFallbackCoordinator. Native reads it from\n // GlassesStore to gate PCM → Sherpa feeding in handlePcm and to keep the\n // mic on while local STT is the active engine.\n SETTINGS.local_stt_fallback_active.key,\n SETTINGS.gallery_mode.key,\n // Mentra Nex feature flags:\n SETTINGS.nex_chinese_captions.key,\n SETTINGS.nex_lc3_audio_playback.key,\n]\n\n// Pairing identity is NATIVE-authoritative: the native layer writes it on\n// pairing success (handleDeviceReady) / forget and echoes it down via\n// save_setting; JS persists those echoes. JS→native, identity travels ONLY in\n// the explicit full seeds (device-store hydration, pre-connect push,\n// post-demotion re-push) — never in the change-push subscription. Relaying an\n// echoed identity change back up would make the sync bidirectional with loop\n// gain 1: two identity values in flight (e.g. a boot demotion crossing a\n// native promotion) then chase each other through push→apply→echo→push\n// forever, flapping the UI.\n//\n// Derived from the `nativeAuthoritative` descriptor flag (not maintained as a\n// parallel list) so the change-push exclusion in GlassesSettingsSync can't\n// drift from the setting declarations.\nexport const PAIRING_IDENTITY_KEYS: string[] = Object.values(SETTINGS)\n .filter((setting) => setting.nativeAuthoritative)\n .map((setting) => setting.key)\n\n// const PER_GLASSES_SETTINGS_KEYS: string[] = [SETTINGS.preferred_mic.key]\n\nexport interface SettingsState {\n // Settings values\n settings: Record<string, any>\n // Loading states\n isInitialized: boolean\n // Actions\n setSetting: (key: string, value: any, updateServer?: boolean) => AsyncResult<void, Error>\n setManyLocally: (settings: Record<string, any>) => AsyncResult<void, Error>\n getSetting: (key: string) => any\n // loadSetting: (key: string) => AsyncResult<void, Error>\n loadAllSettings: () => AsyncResult<void, Error>\n // Utility methods\n getBluetoothSettings: () => Record<string, any>\n resetAllSettingsLocally: () => void\n}\n\nconst getDefaultSettings = () =>\n Object.keys(SETTINGS).reduce(\n (acc, key) => {\n acc[key] = SETTINGS[key].defaultValue()\n return acc\n },\n {} as Record<string, any>,\n )\n\n// Single-flight for loadAllSettings: the host fires it at module load and\n// engine.start()'s device-store hydration awaits it — without the memo the\n// second caller runs a duplicate full disk load while the first is still in\n// flight. Cleared on failure so a later call can retry.\nlet loadAllSettingsInFlight: AsyncResult<void, Error> | null = null\n\nexport const useSettingsStore = create<SettingsState>()(\n subscribeWithSelector((set, get) => ({\n settings: getDefaultSettings(),\n isInitialized: false,\n loadingKeys: new Set(),\n setSetting: (key: string, value: any, _updateServer = true): AsyncResult<void, Error> => {\n return Res.try_async(async () => {\n const setting = SETTINGS[key]\n const originalKey = key\n\n if (!setting) {\n throw new Error(`SETTINGS: SET: ${originalKey} is not a valid setting!`)\n }\n\n if (setting.indexer) {\n key = setting.indexer(originalKey)\n }\n\n if (!setting.writable) {\n throw new Error(`SETTINGS: ${originalKey} is not writable!`)\n }\n\n // Update store immediately for optimistic UI\n console.log(`SETTINGS: SET: ${key} = ${value}`)\n set((state) => ({\n settings: {...state.settings, [key]: value},\n }))\n\n if (setting.persist) {\n let res = await storage.save(key, value)\n if (res.is_error()) {\n throw new Error(`SETTINGS: couldn't save setting to storage: ${res.error}`)\n }\n\n // Cloud V1 per-change server sync removed with the V1 ripout (issue\n // #3392). Settings are local-first until a V2 sync lands; the\n // saveOnServer flags are retained as intent markers for that work.\n }\n })\n },\n getSetting: (key: string) => {\n const state = get()\n const originalKey = key\n const setting = SETTINGS[originalKey]\n\n if (!setting) {\n console.error(`SETTINGS: GET: ${originalKey} is not a valid setting!`)\n return undefined\n }\n\n if (setting.override) {\n let override = setting.override()\n if (override !== undefined) {\n return override\n }\n }\n\n if (setting.indexer) {\n key = setting.indexer(originalKey)\n }\n\n // console.log(`GET SETTING: ${key} = ${state.settings[key]}`)\n\n try {\n const raw = state.settings[key] ?? SETTINGS[originalKey].defaultValue()\n return raw\n } catch (e) {\n // for dynamically created settings, we need to create a new setting in SETTINGS:\n console.log(`Failed to get setting, creating new setting:(${key}):`, e)\n SETTINGS[key] = {key: key, defaultValue: () => undefined, writable: true, saveOnServer: false, persist: true}\n return SETTINGS[key].defaultValue()\n }\n },\n // batch update many settings from the server:\n setManyLocally: (settings: Record<string, any>): AsyncResult<void, Error> => {\n return Res.try_async(async () => {\n const settingsToLoad: Record<string, any> = {}\n // if a setting should not persist, don't load it:\n for (const [key, value] of Object.entries(settings)) {\n const stg: Setting | undefined = SETTINGS[key.toLowerCase()]\n if (!stg) {\n continue\n }\n if (!stg.persist) {\n continue\n }\n settingsToLoad[key.toLowerCase()] = value\n }\n // console.log(\"SETTINGS: SET MANY LOCALLY: \", settingsToLoad)\n\n set((state) => ({\n settings: {...state.settings, ...settingsToLoad},\n }))\n\n // save to storage:\n await Promise.all(Object.entries(settingsToLoad).map(([key, value]) => storage.save(key, value)))\n })\n },\n // loads any preferences that have been changed from the default and saved to DISK!\n loadAllSettings: (): AsyncResult<void, Error> => {\n console.log(\"SETTINGS: loadAllSettings()\")\n if (loadAllSettingsInFlight) {\n return loadAllSettingsInFlight\n }\n const inFlight = Res.try_async(async () => {\n const state = get()\n let loadedSettings: Record<string, any> = {}\n\n if (state.isInitialized) {\n return undefined\n }\n\n for (const setting of Object.values(SETTINGS)) {\n // if the settings should not persist, don't load it:\n if (!setting.persist) {\n continue\n }\n\n // load all subkeys for an indexed setting:\n if (setting?.indexer) {\n console.log(`SETTINGS: LOAD: ${setting.key} with indexer!`)\n\n let res: Result<Record<string, unknown>, Error> = storage.loadSubKeys(setting.key)\n if (res.is_error()) {\n console.log(`SETTINGS: LOAD: ${setting.key}`, res.error)\n continue\n }\n\n let subKeys: Record<string, unknown> = res.value\n console.log(`SETTINGS: LOAD: ${setting.key} subkeys are set!`, subKeys)\n loadedSettings = {...loadedSettings, ...subKeys}\n continue\n }\n\n let res = storage.load<any>(setting.key)\n if (res.is_error()) {\n console.log(`SETTINGS: LOAD: ${setting.key} is not set!`, res.error)\n // this setting isn't set from the default, so we don't load anything\n continue\n }\n // normal key:value pair:\n let value = res.value\n console.log(`SETTINGS: LOAD: ${setting.key} = ${value.value}`)\n loadedSettings[setting.key] = value\n }\n\n // console.log(\"##############################################\")\n // console.log(loadedSettings)\n // console.log(\"##############################################\")\n\n set((state) => ({\n isInitialized: true,\n settings: {...state.settings, ...loadedSettings},\n }))\n\n // One-time migration: force android_blur=false for existing users.\n // The setting's default is already false; this migration covers users\n // who explicitly opted into Android blur effects before we discovered\n // they're a major source of frame drops on cheap Android phones.\n // The dimezisBlurViewSdk31Plus blur each costs ~5-10ms/frame; with\n // multiple blurs on home (top fade + AppSwitcherButton x2) a low-end\n // device misses the 16ms budget consistently. Users can turn it back\n // on under Settings → Appearance once we've optimized further.\n //\n // The setSetting call also pushes to the server (saveOnServer: true)\n // so the server-stored value flips too — otherwise the next sync\n // from the user's server-stored prefs would re-enable blur.\n // Best-effort: a server failure (offline, 5xx) shouldn't block boot;\n // we still mark the migration done locally so we don't loop.\n const MIGRATION_KEY = \"migration:android_blur_default_false_v1\"\n const migrationDone = storage.load<boolean>(MIGRATION_KEY)\n if (migrationDone.is_error() || !migrationDone.value) {\n const current = get().getSetting(SETTINGS.android_blur.key)\n if (current === true) {\n const result = await get().setSetting(SETTINGS.android_blur.key, false, true)\n if (result.is_error()) {\n // Server push failed (offline / 5xx). Local storage was still\n // updated, so the user immediately gets the new behavior. The\n // server-side stale `true` will be overwritten the next time\n // the user opens Appearance settings and the auto-sync runs.\n console.log(\"SETTINGS: android_blur migration server-push failed:\", result.error)\n }\n }\n // Mark done unconditionally — even on server-push failure we don't\n // want to retry the migration on every boot. The local value is\n // already correct.\n storage.save(MIGRATION_KEY, true)\n }\n })\n loadAllSettingsInFlight = inFlight\n void Promise.resolve(inFlight).then((result) => {\n if (result.is_error()) {\n loadAllSettingsInFlight = null\n }\n })\n return inFlight\n },\n getBluetoothSettings: () => {\n const state = get()\n // Device-model-filtered key set (wire v2): Mentra Live (no display) gets\n // the reduced MENTRA_LIVE_SETTING_KEYS; display glasses get the full set.\n const deviceModel = useGlassesStore.getState().deviceModel || state.getSetting(SETTINGS.default_wearable.key)\n const keys = getBluetoothSettingKeysForDevice(deviceModel, BLUETOOTH_SETTING_KEYS)\n const bluetoothSettings: Record<string, any> = {}\n for (const key of keys) {\n const value = state.getSetting(key)\n if (key === SETTINGS.core_token.key && (typeof value !== \"string\" || value.trim().length === 0)) {\n continue\n }\n bluetoothSettings[key] = value\n }\n return bluetoothSettings\n },\n resetAllSettingsLocally: () => {\n set((_state) => ({\n settings: getDefaultSettings(),\n isInitialized: true,\n }))\n },\n })),\n)\n\nexport const useSetting = <T = any>(key: string): [T, (value: T) => AsyncResult<void, Error>] => {\n const value = useSettingsStore((state) => state.getSetting(key))\n const setSetting = useSettingsStore((state) => state.setSetting)\n return [value, (newValue: T) => setSetting(key, newValue)]\n}\n"]}
1
+ {"version":3,"file":"settings.js","sourceRoot":"","sources":["../../src/stores/settings.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,WAAW,EAAC,MAAM,uBAAuB,CAAA;AACjD,OAAO,EAAc,MAAM,IAAI,GAAG,EAAS,MAAM,aAAa,CAAA;AAC9D,OAAO,EAAC,MAAM,EAAC,MAAM,SAAS,CAAA;AAC9B,OAAO,EAAC,qBAAqB,EAAC,MAAM,oBAAoB,CAAA;AAExD,OAAO,EAAC,OAAO,EAAC,MAAM,kBAAkB,CAAA;AACxC,OAAO,EAAC,gCAAgC,EAAC,MAAM,wBAAwB,CAAA;AACvE,OAAO,EAAC,eAAe,EAAC,MAAM,WAAW,CAAA;AAEzC,OAAO,EAAC,wBAAwB,EAAE,gCAAgC,EAAC,MAAM,wBAAwB,CAAA;AAyCjG,MAAM,CAAC,MAAM,QAAQ,GAA4B;IAC/C,mCAAmC;IACnC,QAAQ,EAAE,EAAC,GAAG,EAAE,UAAU,EAAE,YAAY,EAAE,GAAG,EAAE,CAAC,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,YAAY,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,EAAC,EAAE,aAAa;IAC1H,UAAU,EAAE,EAAC,GAAG,EAAE,YAAY,EAAE,YAAY,EAAE,GAAG,EAAE,CAAC,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,YAAY,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,EAAC;IAC/G,qCAAqC,EA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CAAA;AAED,MAAM,CAAC,MAAM,UAAU,GAAG,CAAU,GAAW,EAA+C,EAAE;IAC9F,MAAM,KAAK,GAAG,gBAAgB,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,CAAA;IAChE,MAAM,UAAU,GAAG,gBAAgB,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,UAAU,CAAC,CAAA;IAChE,OAAO,CAAC,KAAK,EAAE,CAAC,QAAW,EAAE,EAAE,CAAC,UAAU,CAAC,GAAG,EAAE,QAAQ,CAAC,CAAC,CAAA;AAC5D,CAAC,CAAA","sourcesContent":["import {getTimeZone} from \"react-native-localize\"\nimport {AsyncResult, result as Res, Result} from \"typesafe-ts\"\nimport {create} from \"zustand\"\nimport {subscribeWithSelector} from \"zustand/middleware\"\n\nimport {storage} from \"../utils/storage\"\nimport {getBluetoothSettingKeysForDevice} from \"./bluetoothSettingKeys\"\nimport {useGlassesStore} from \"./glasses\"\n\nexport {MENTRA_LIVE_SETTING_KEYS, getBluetoothSettingKeysForDevice} from \"./bluetoothSettingKeys\"\n\nexport interface Setting {\n key: string\n defaultValue: () => any\n writable: boolean\n saveOnServer: boolean\n // change the key to a different key based on the indexer\n // NEVER do any network calls in the indexer (or performance will suffer greatly\n indexer?: (key: string) => string\n // optionally override the value of the setting when it's accessed\n override?: () => any\n // onWrite?: () => void\n persist: boolean\n // Pairing-identity keys are NATIVE-authoritative: the native layer writes\n // them on pairing success (handleDeviceReady) / forget and echoes them down\n // via save_setting; JS鈫抧ative they travel only in the explicit SEEDS\n // (hydration, pre-connect, post-demotion, abandon re-seed) — never the\n // change-push and never the on-connect replay, whose mid-relay snapshot can\n // overwrite a just-promoted identity. PAIRING_IDENTITY_KEYS is derived from\n // this flag so the sync exclusions can't drift from the descriptors.\n nativeAuthoritative?: true\n /**\n * Clear this setting when the build's environment changes.\n *\n * A persisted override normally outranks both the build's env and the\n * compiled default, which is right within one environment: a developer's\n * METRO_AUTO pin should survive a rebuild. It is wrong across environments,\n * where an override pinned under a dev build would silently follow the\n * install onto a store build pointed at production.\n *\n * Note this keys off the build's environment label, so it does NOT fire on a\n * TestFlight to App Store promotion: that ships the same binary with the same\n * label. Promotion is safe because the publishing lane bakes prod URLs, not\n * because this reset runs. See the resolution block in loadSettings.\n *\n * Absent means the value is never invalidated automatically.\n */\n resetOnBuildEnvChange?: true\n}\n\nexport const SETTINGS: Record<string, Setting> = {\n // feature flags / mantle settings:\n dev_mode: {key: \"dev_mode\", defaultValue: () => __DEV__, writable: true, saveOnServer: true, persist: true}, // deprecated\n debug_mode: {key: \"debug_mode\", defaultValue: () => __DEV__, writable: true, saveOnServer: true, persist: true},\n android_notification_listener_enabled: {\n key: \"android_notification_listener_enabled\",\n // Operational kill switch. The listener now runs in a guarded lightweight\n // process, so normal installs can safely capture notifications by default.\n defaultValue: () => true,\n writable: true,\n saveOnServer: true,\n persist: true,\n },\n super_mode: {key: \"super_mode\", defaultValue: () => false, writable: true, saveOnServer: true, persist: true},\n appearance_menu_enabled: {\n key: \"appearance_menu_enabled\",\n defaultValue: () => false,\n writable: true,\n saveOnServer: true,\n persist: true,\n },\n app_boot_extra_info: {\n key: \"app_boot_extra_info\",\n defaultValue: () => false,\n writable: true,\n saveOnServer: true,\n persist: true,\n },\n miniapp_dev_mode: {\n key: \"miniapp_dev_mode\",\n defaultValue: () => false,\n writable: true,\n saveOnServer: true,\n persist: true,\n },\n enable_squircles: {\n key: \"enable_squircles\",\n defaultValue: () => true,\n writable: true,\n saveOnServer: true,\n persist: true,\n },\n android_blur: {\n key: \"android_blur\",\n defaultValue: () => {\n return false\n },\n writable: true,\n saveOnServer: true,\n persist: true,\n },\n android_inner_shadow: {\n key: \"android_inner_shadow\",\n defaultValue: () => {\n return false\n },\n writable: true,\n saveOnServer: true,\n persist: true,\n },\n ios_glass_effect: {\n key: \"ios_glass_effect\",\n defaultValue: () => true,\n writable: true,\n saveOnServer: true,\n persist: true,\n },\n ios_app_switcher_bottom_swipe: {\n key: \"ios_app_switcher_bottom_swipe\",\n defaultValue: () => false,\n writable: true,\n saveOnServer: true,\n persist: true,\n },\n debug_console: {\n key: \"debug_console\",\n defaultValue: () => false,\n writable: true,\n saveOnServer: true,\n persist: true,\n },\n debug_navigation_history: {\n key: \"debug_navigation_history\",\n defaultValue: () => false,\n writable: true,\n saveOnServer: true,\n persist: true,\n },\n debug_core_status_bar: {\n key: \"debug_core_status_bar\",\n defaultValue: () => false,\n writable: true,\n saveOnServer: true,\n persist: true,\n },\n // Mentra Nex feature flags (off by default; toggled from Nex Developer Settings).\n // When on, the Nex display skips ASCII-only text sanitization so CJK/Chinese\n // captions render on glasses. Synced to the Bluetooth SDK via BLUETOOTH_SETTING_KEYS.\n nex_chinese_captions: {\n key: \"nex_chinese_captions\",\n defaultValue: () => false,\n writable: true,\n saveOnServer: true,\n persist: true,\n },\n // When on, LC3 audio received from Nex glasses is played back (Android only).\n // Local-only dev toggle: defaults off and never synced to the cloud account\n // (saveOnServer: false); persists locally so it survives app restarts.\n // Key renamed from the legacy `nex_audio_playback` so stale server/local\n // values (saved back when this was saveOnServer:true) can't re-enable it.\n nex_lc3_audio_playback: {\n key: \"nex_lc3_audio_playback\",\n defaultValue: () => false,\n writable: true,\n saveOnServer: false,\n persist: true,\n },\n china_deployment: {\n key: \"china_deployment\",\n defaultValue: () => (process.env.EXPO_PUBLIC_DEPLOYMENT_REGION === \"china\" ? true : false),\n override: () => (process.env.EXPO_PUBLIC_DEPLOYMENT_REGION === \"china\" ? true : false),\n writable: false,\n saveOnServer: false,\n persist: true,\n },\n // Cloud V2 endpoint OVERRIDES. Empty = no override; cloudClient's resolveUrl\n // owns the full precedence (override -> env -> Metro-derived dev default).\n // The value may be an explicit URL or the METRO_AUTO sentinel (\"my dev\n // laptop\", resolved live from Metro so it survives network changes). Never\n // bake an env var or a personal LAN IP into the default here: that makes the\n // override branch always-truthy and strands devs on a stale address.\n cloud_core_url: {\n key: \"cloud_core_url\",\n defaultValue: () => \"\",\n writable: true,\n saveOnServer: false,\n persist: true,\n resetOnBuildEnvChange: true,\n },\n cloud_runtime_url: {\n key: \"cloud_runtime_url\",\n defaultValue: () => \"\",\n writable: true,\n saveOnServer: false,\n persist: true,\n resetOnBuildEnvChange: true,\n },\n // Bookmarked Cloud V2 endpoint pairs. Each entry is {label, coreUrl,\n // runtimeUrl} — core + runtime are saved together because they are always\n // applied as a matched set (presets fill both; Save & Test verifies both).\n saved_cloud_url_pairs: {\n key: \"saved_cloud_url_pairs\",\n defaultValue: () => [],\n writable: true,\n saveOnServer: false,\n persist: true,\n },\n // Developer override for the ASG OTA manifest URL. null/empty = no override;\n // the normal selection applies (legacy-glasses gate, EXPO_PUBLIC_ASG_OTA_VERSION_URL,\n // glasses-reported URL, then production). See resolveOtaManifestUrl.\n ota_version_url: {\n key: \"ota_version_url\",\n defaultValue: () => null,\n writable: true,\n saveOnServer: false,\n persist: true,\n },\n saved_ota_version_urls: {\n key: \"saved_ota_version_urls\",\n defaultValue: () => [],\n writable: true,\n saveOnServer: false,\n persist: true,\n },\n reconnect_on_app_foreground: {\n key: \"reconnect_on_app_foreground\",\n defaultValue: () => true,\n writable: true,\n saveOnServer: true,\n persist: true,\n },\n location_tier: {key: \"location_tier\", defaultValue: () => \"\", writable: true, saveOnServer: true, persist: true},\n // Volatile bearer synced to Bluetooth for glasses-side Cloud V2 calls. The\n // key name is kept for BLE compatibility, but the value must never be loaded\n // from or saved to the legacy Cloud V1 settings store.\n core_token: {key: \"core_token\", defaultValue: () => \"\", writable: true, saveOnServer: false, persist: false},\n auth_email: {key: \"auth_email\", defaultValue: () => \"\", writable: true, saveOnServer: false, persist: true},\n // Pairing identity is per-phone, not per-account: two phones on one account\n // can be paired to different glasses, so none of these keys may sync to the\n // server (saveOnServer: false — a stale server copy resurrecting a local\n // pairing identity is exactly the desync this group's flags prevent).\n //\n // Two-phase identity: pending_wearable is the model the user last STARTED\n // pairing (written at selection, rendered as a finish-pairing card);\n // default_wearable + device_name + device_address are only promoted by the\n // native layer when pairing actually succeeds (handleDeviceReady).\n // pending_wearable persists so an abandoned selection still shows its\n // finish-pairing card after an app restart.\n pending_wearable: {\n key: \"pending_wearable\",\n defaultValue: () => \"\",\n writable: true,\n saveOnServer: false,\n persist: true,\n nativeAuthoritative: true,\n },\n default_wearable: {\n key: \"default_wearable\",\n defaultValue: () => \"\",\n writable: true,\n saveOnServer: false,\n persist: true,\n nativeAuthoritative: true,\n },\n device_name: {\n key: \"device_name\",\n defaultValue: () => \"\",\n writable: true,\n saveOnServer: false,\n persist: true,\n nativeAuthoritative: true,\n },\n device_address: {\n key: \"device_address\",\n defaultValue: () => \"\",\n writable: true,\n saveOnServer: false,\n persist: true,\n nativeAuthoritative: true,\n },\n project_name: {\n key: \"project_name\",\n defaultValue: () => \"\",\n writable: true,\n saveOnServer: false,\n persist: true,\n nativeAuthoritative: true,\n },\n default_controller: {\n key: \"default_controller\",\n defaultValue: () => \"\",\n writable: true,\n saveOnServer: false,\n persist: true,\n nativeAuthoritative: true,\n },\n pending_controller: {\n key: \"pending_controller\",\n defaultValue: () => \"\",\n writable: true,\n saveOnServer: false,\n persist: true,\n nativeAuthoritative: true,\n },\n controller_device_name: {\n key: \"controller_device_name\",\n defaultValue: () => \"\",\n writable: true,\n saveOnServer: false,\n persist: true,\n nativeAuthoritative: true,\n },\n controller_address: {\n key: \"controller_address\",\n defaultValue: () => \"\",\n writable: true,\n saveOnServer: false,\n persist: true,\n nativeAuthoritative: true,\n },\n // ui state:\n home_background: {\n key: \"home_background\",\n defaultValue: () => \"\",\n writable: true,\n saveOnServer: false,\n persist: true,\n },\n theme_preference: {\n key: \"theme_preference\",\n defaultValue: () => \"light\",\n // Force light mode - i mode is not complete yet\n // override: () => \"light\",\n writable: true,\n saveOnServer: true,\n persist: true,\n },\n enable_phone_notifications: {\n key: \"enable_phone_notifications\",\n defaultValue: () => false,\n writable: true,\n saveOnServer: true,\n persist: true,\n },\n settings_access_count: {\n key: \"settings_access_count\",\n defaultValue: () => 0,\n writable: true,\n saveOnServer: true,\n persist: true,\n },\n show_advanced_settings: {\n key: \"show_advanced_settings\",\n defaultValue: () => false,\n writable: true,\n saveOnServer: false,\n persist: true,\n },\n onboarding_completed: {\n key: \"onboarding_completed\",\n defaultValue: () => false,\n writable: true,\n saveOnServer: true,\n persist: true,\n },\n onboarding_live_completed: {\n key: \"onboarding_live_completed\",\n defaultValue: () => false,\n writable: true,\n saveOnServer: true,\n persist: true,\n },\n onboarding_os_completed: {\n key: \"onboarding_os_completed\",\n defaultValue: () => false,\n writable: true,\n saveOnServer: true,\n persist: true,\n },\n has_ever_activated_app: {\n key: \"has_ever_activated_app\",\n defaultValue: () => false,\n writable: true,\n saveOnServer: true,\n persist: true,\n },\n\n // Bluetooth SDK settings:\n sensing_enabled: {\n key: \"sensing_enabled\",\n defaultValue: () => true,\n writable: true,\n saveOnServer: true,\n persist: true,\n },\n power_saving_mode: {\n key: \"power_saving_mode\",\n defaultValue: () => false,\n writable: true,\n saveOnServer: true,\n persist: true,\n },\n // The Mentra App intentionally preserves Mentra Live's historical VAD-on\n // product default. Standalone public Bluetooth SDK hosts default VAD off so\n // their microphone audio remains continuous.\n voice_activity_detection_enabled: {\n key: \"voice_activity_detection_enabled\",\n defaultValue: () => true,\n writable: true,\n saveOnServer: true,\n persist: true,\n },\n // Mentra Live center-mic loudness / \"Barrier\" gate (cs_swit type 10). Default on.\n loudness_gate_enabled: {\n key: \"loudness_gate_enabled\",\n defaultValue: () => true,\n writable: true,\n saveOnServer: true,\n persist: true,\n },\n always_on_status_bar: {\n key: \"always_on_status_bar\",\n defaultValue: () => false,\n writable: true,\n saveOnServer: true,\n persist: true,\n },\n // Legacy cloud/mobile setting name. Locally it maps to glasses-side Voice Activity Detection.\n bypass_vad_for_debugging: {\n key: \"bypass_vad_for_debugging\",\n defaultValue: () => false,\n writable: true,\n saveOnServer: true,\n persist: true,\n },\n bypass_audio_encoding_for_debugging: {\n key: \"bypass_audio_encoding_for_debugging\",\n defaultValue: () => false,\n writable: true,\n saveOnServer: true,\n persist: true,\n },\n metric_system: {\n key: \"metric_system\",\n defaultValue: () => false,\n writable: true,\n saveOnServer: true,\n persist: true,\n },\n twelve_hour_time: {\n key: \"twelve_hour_time\",\n defaultValue: () => true,\n writable: true,\n saveOnServer: true,\n persist: true,\n },\n enforce_local_transcription: {\n key: \"enforce_local_transcription\",\n defaultValue: () => false,\n writable: true,\n saveOnServer: true,\n persist: true,\n },\n // LC3 audio quality setting (frame size in bytes)\n // 20 = 16kbps (low bandwidth), 40 = 32kbps (balanced), 60 = 48kbps (high quality)\n lc3_frame_size: {\n key: \"lc3_frame_size\",\n defaultValue: () => 60,\n writable: true,\n saveOnServer: false,\n persist: true,\n },\n preferred_mic: {\n key: \"preferred_mic\",\n defaultValue: () => \"auto\",\n writable: true,\n indexer: (key: string) => {\n const glasses = useSettingsStore.getState().getSetting(SETTINGS.default_wearable.key)\n if (glasses) {\n return `${key}:${glasses}`\n }\n return key\n },\n saveOnServer: true,\n persist: true,\n },\n screen_disabled: {\n key: \"screen_disabled\",\n defaultValue: () => false,\n writable: true,\n saveOnServer: false,\n persist: true,\n },\n // glasses settings:\n contextual_dashboard: {\n key: \"contextual_dashboard\",\n defaultValue: () => true,\n writable: true,\n saveOnServer: true,\n persist: true,\n },\n use_native_dashboard: {\n key: \"use_native_dashboard\",\n defaultValue: () => true,\n writable: true,\n saveOnServer: true,\n persist: true,\n },\n head_up_angle: {key: \"head_up_angle\", defaultValue: () => 45, writable: true, saveOnServer: true, persist: true},\n brightness: {key: \"brightness\", defaultValue: () => 50, writable: true, saveOnServer: true, persist: true},\n auto_brightness: {\n key: \"auto_brightness\",\n defaultValue: () => true,\n writable: true,\n saveOnServer: true,\n persist: true,\n },\n dashboard_height: {\n key: \"dashboard_height\",\n defaultValue: () => 4,\n writable: true,\n saveOnServer: true,\n persist: true,\n },\n dashboard_depth: {\n key: \"dashboard_depth\",\n defaultValue: () => 2,\n writable: true,\n saveOnServer: true,\n persist: true,\n },\n menu_apps: {\n key: \"menu_apps\",\n defaultValue: () => null,\n writable: true,\n saveOnServer: true,\n persist: true,\n },\n calendar_events: {\n key: \"calendar_events\",\n defaultValue: () => [],\n writable: true,\n saveOnServer: false,\n persist: false,\n },\n // button settings\n // Legacy persisted/cloud key; hardware behavior is now controlled by gallery_mode plus capture settings.\n button_mode: {key: \"button_mode\", defaultValue: () => \"photo\", writable: true, saveOnServer: true, persist: true},\n button_photo_size: {\n key: \"button_photo_size\",\n defaultValue: () => \"max\",\n writable: true,\n saveOnServer: true,\n persist: true,\n },\n button_video_settings: {\n key: \"button_video_settings\",\n defaultValue: () => ({width: 1920, height: 1080, fps: 30}),\n writable: true,\n saveOnServer: true,\n persist: true,\n },\n button_max_recording_time: {\n key: \"button_max_recording_time\",\n defaultValue: () => 10,\n writable: true,\n saveOnServer: true,\n persist: true,\n },\n camera_fov: {\n key: \"camera_fov\",\n defaultValue: () => ({fov: 118, roi_position: 0}),\n writable: true,\n saveOnServer: true,\n persist: true,\n },\n media_post_processing: {\n key: \"media_post_processing\",\n defaultValue: () => false,\n writable: true,\n saveOnServer: true,\n persist: true,\n },\n\n // time zone settings\n time_zone: {\n key: \"time_zone\",\n defaultValue: () => \"\",\n writable: true,\n override: () => {\n const override = useSettingsStore.getState().getSetting(SETTINGS.time_zone_override.key)\n if (override) {\n return override\n }\n return getTimeZone()\n },\n saveOnServer: true,\n persist: true,\n },\n time_zone_override: {\n key: \"time_zone_override\",\n defaultValue: () => \"\",\n writable: true,\n saveOnServer: true,\n persist: true,\n },\n // offline applets\n offline_mode: {key: \"offline_mode\", defaultValue: () => false, writable: true, saveOnServer: true, persist: true},\n // Runtime flag: coordinator flips this on when cloud STT has failed and fallback is active.\n // Native GlassesStore watches it to gate PCM 鈫?Sherpa feeding. Not user-facing.\n local_stt_fallback_active: {\n key: \"local_stt_fallback_active\",\n defaultValue: () => false,\n writable: true,\n saveOnServer: false,\n persist: false,\n },\n gallery_mode: {key: \"gallery_mode\", defaultValue: () => true, writable: true, saveOnServer: true, persist: true},\n gallery_sync_explained: {\n key: \"gallery_sync_explained\",\n defaultValue: () => false,\n writable: true,\n saveOnServer: false,\n persist: true,\n },\n offline_camera_running: {\n key: \"offline_camera_running\",\n defaultValue: () => false,\n writable: true,\n saveOnServer: false,\n persist: true,\n },\n // offline translation\n offline_translation_running: {\n key: \"offline_translation_running\",\n defaultValue: () => false,\n writable: true,\n saveOnServer: true,\n persist: true,\n },\n offline_translation_source: {\n key: \"offline_translation_source\",\n defaultValue: () => \"en\",\n writable: true,\n saveOnServer: true,\n persist: true,\n },\n offline_translation_target: {\n key: \"offline_translation_target\",\n defaultValue: () => \"es\",\n writable: true,\n saveOnServer: true,\n persist: true,\n },\n // button action settings\n default_button_action_enabled: {\n key: \"default_button_action_enabled\",\n defaultValue: () => true,\n writable: true,\n saveOnServer: true,\n persist: true,\n },\n default_button_action_app: {\n key: \"default_button_action_app\",\n defaultValue: () => \"com.mentra.camera\",\n writable: true,\n saveOnServer: true,\n persist: true,\n },\n // notifications\n notifications_blocklist: {\n key: \"notifications_blocklist\",\n defaultValue: () => [],\n writable: true,\n saveOnServer: true,\n persist: true,\n },\n // Cached required version from server - used to enforce updates even when offline\n cached_required_version: {\n key: \"cached_required_version\",\n defaultValue: () => \"\",\n writable: true,\n saveOnServer: false,\n persist: true,\n },\n // OTA update dismissal - stores the version code user dismissed (not persisted so resets on app restart)\n dismissed_ota_version: {\n key: \"dismissed_ota_version\",\n defaultValue: () => \"\",\n writable: true,\n saveOnServer: false,\n persist: false,\n },\n // Contact email for feedback (persisted for Apple private relay users)\n contact_email: {\n key: \"contact_email\",\n defaultValue: () => \"\",\n writable: true,\n saveOnServer: false,\n persist: true,\n },\n} as const\n\nexport const OFFLINE_APPLETS: string[] = [\"com.mentra.livecaptions\", \"com.mentra.camera\"]\n\n// These settings are automatically synced to the Bluetooth SDK.\n// Keep this list hardware-facing; app/UI/cloud-only preferences should stay in JS/Crust.\nexport const BLUETOOTH_SETTING_KEYS: string[] = [\n // Bluetooth settings:\n SETTINGS.sensing_enabled.key,\n SETTINGS.power_saving_mode.key,\n SETTINGS.voice_activity_detection_enabled.key,\n SETTINGS.loudness_gate_enabled.key,\n SETTINGS.lc3_frame_size.key,\n SETTINGS.preferred_mic.key,\n SETTINGS.screen_disabled.key,\n SETTINGS.auth_email.key,\n SETTINGS.core_token.key,\n // glasses settings:\n SETTINGS.contextual_dashboard.key,\n SETTINGS.head_up_angle.key,\n SETTINGS.brightness.key,\n SETTINGS.auto_brightness.key,\n SETTINGS.dashboard_height.key,\n SETTINGS.dashboard_depth.key,\n SETTINGS.menu_apps.key,\n SETTINGS.calendar_events.key,\n SETTINGS.use_native_dashboard.key,\n SETTINGS.twelve_hour_time.key,\n SETTINGS.metric_system.key,\n // button:\n SETTINGS.button_photo_size.key,\n // Legacy MentraLive native code reads the object form when syncing video settings.\n SETTINGS.button_video_settings.key,\n SETTINGS.button_max_recording_time.key,\n SETTINGS.camera_fov.key,\n // device / pairing:\n SETTINGS.pending_wearable.key,\n SETTINGS.default_wearable.key,\n SETTINGS.device_name.key,\n SETTINGS.device_address.key,\n SETTINGS.project_name.key,\n SETTINGS.default_controller.key,\n SETTINGS.pending_controller.key,\n SETTINGS.controller_device_name.key,\n SETTINGS.controller_address.key,\n // offline applets:\n SETTINGS.offline_mode.key,\n // Runtime flag flipped by LocalSttFallbackCoordinator. Native reads it from\n // GlassesStore to gate PCM 鈫?Sherpa feeding in handlePcm and to keep the\n // mic on while local STT is the active engine.\n SETTINGS.local_stt_fallback_active.key,\n SETTINGS.gallery_mode.key,\n // Mentra Nex feature flags:\n SETTINGS.nex_chinese_captions.key,\n SETTINGS.nex_lc3_audio_playback.key,\n]\n\n// Pairing identity is NATIVE-authoritative: the native layer writes it on\n// pairing success (handleDeviceReady) / forget and echoes it down via\n// save_setting; JS persists those echoes. JS鈫抧ative, identity travels ONLY in\n// the explicit full seeds (device-store hydration, pre-connect push,\n// post-demotion re-push) — never in the change-push subscription. Relaying an\n// echoed identity change back up would make the sync bidirectional with loop\n// gain 1: two identity values in flight (e.g. a boot demotion crossing a\n// native promotion) then chase each other through push鈫抋pply鈫抏cho鈫抪ush\n// forever, flapping the UI.\n//\n// Derived from the `nativeAuthoritative` descriptor flag (not maintained as a\n// parallel list) so the change-push exclusion in GlassesSettingsSync can't\n// drift from the setting declarations.\nexport const PAIRING_IDENTITY_KEYS: string[] = Object.values(SETTINGS)\n .filter((setting) => setting.nativeAuthoritative)\n .map((setting) => setting.key)\n\n// const PER_GLASSES_SETTINGS_KEYS: string[] = [SETTINGS.preferred_mic.key]\n\nexport interface SettingsState {\n // Settings values\n settings: Record<string, any>\n // Loading states\n isInitialized: boolean\n // Actions\n setSetting: (key: string, value: any, updateServer?: boolean) => AsyncResult<void, Error>\n setManyLocally: (settings: Record<string, any>) => AsyncResult<void, Error>\n getSetting: (key: string) => any\n // loadSetting: (key: string) => AsyncResult<void, Error>\n loadAllSettings: () => AsyncResult<void, Error>\n // Utility methods\n getBluetoothSettings: () => Record<string, any>\n resetAllSettingsLocally: () => void\n}\n\nconst getDefaultSettings = () =>\n Object.keys(SETTINGS).reduce(\n (acc, key) => {\n acc[key] = SETTINGS[key].defaultValue()\n return acc\n },\n {} as Record<string, any>,\n )\n\n// Single-flight for loadAllSettings: the host fires it at module load and\n// engine.start()'s device-store hydration awaits it — without the memo the\n// second caller runs a duplicate full disk load while the first is still in\n// flight. Cleared on failure so a later call can retry.\nlet loadAllSettingsInFlight: AsyncResult<void, Error> | null = null\n\nfunction printableSettingValue(key: string, value: unknown): string {\n return key.includes(\"token\") || key.includes(\"email\") ? \"<redacted>\" : JSON.stringify(value)\n}\n\nexport const useSettingsStore = create<SettingsState>()(\n subscribeWithSelector((set, get) => ({\n settings: getDefaultSettings(),\n isInitialized: false,\n loadingKeys: new Set(),\n setSetting: (key: string, value: any, _updateServer = true): AsyncResult<void, Error> => {\n return Res.try_async(async () => {\n const setting = SETTINGS[key]\n const originalKey = key\n\n if (!setting) {\n throw new Error(`SETTINGS: SET: ${originalKey} is not a valid setting!`)\n }\n\n if (setting.indexer) {\n key = setting.indexer(originalKey)\n }\n\n if (!setting.writable) {\n throw new Error(`SETTINGS: ${originalKey} is not writable!`)\n }\n\n // Update store immediately for optimistic UI\n console.log(`SETTINGS: SET: ${key} = ${printableSettingValue(key, value)}`)\n set((state) => ({\n settings: {...state.settings, [key]: value},\n }))\n\n if (setting.persist) {\n let res = await storage.save(key, value)\n if (res.is_error()) {\n throw new Error(`SETTINGS: couldn't save setting to storage: ${res.error}`)\n }\n\n // Cloud V1 per-change server sync removed with the V1 ripout (issue\n // #3392). Settings are local-first until a V2 sync lands; the\n // saveOnServer flags are retained as intent markers for that work.\n }\n })\n },\n getSetting: (key: string) => {\n const state = get()\n const originalKey = key\n const setting = SETTINGS[originalKey]\n\n if (!setting) {\n console.error(`SETTINGS: GET: ${originalKey} is not a valid setting!`)\n return undefined\n }\n\n if (setting.override) {\n let override = setting.override()\n if (override !== undefined) {\n return override\n }\n }\n\n if (setting.indexer) {\n key = setting.indexer(originalKey)\n }\n\n // console.log(`GET SETTING: ${key} = ${state.settings[key]}`)\n\n try {\n const raw = state.settings[key] ?? SETTINGS[originalKey].defaultValue()\n return raw\n } catch (e) {\n // for dynamically created settings, we need to create a new setting in SETTINGS:\n console.log(`Failed to get setting, creating new setting:(${key}):`, e)\n SETTINGS[key] = {key: key, defaultValue: () => undefined, writable: true, saveOnServer: false, persist: true}\n return SETTINGS[key].defaultValue()\n }\n },\n // batch update many settings from the server:\n setManyLocally: (settings: Record<string, any>): AsyncResult<void, Error> => {\n return Res.try_async(async () => {\n const settingsToLoad: Record<string, any> = {}\n // if a setting should not persist, don't load it:\n for (const [key, value] of Object.entries(settings)) {\n const stg: Setting | undefined = SETTINGS[key.toLowerCase()]\n if (!stg) {\n continue\n }\n if (!stg.persist) {\n continue\n }\n settingsToLoad[key.toLowerCase()] = value\n }\n // console.log(\"SETTINGS: SET MANY LOCALLY: \", settingsToLoad)\n\n set((state) => ({\n settings: {...state.settings, ...settingsToLoad},\n }))\n\n // save to storage:\n await Promise.all(Object.entries(settingsToLoad).map(([key, value]) => storage.save(key, value)))\n })\n },\n // loads any preferences that have been changed from the default and saved to DISK!\n loadAllSettings: (): AsyncResult<void, Error> => {\n console.log(\"SETTINGS: loadAllSettings()\")\n if (loadAllSettingsInFlight) {\n return loadAllSettingsInFlight\n }\n const inFlight = Res.try_async(async () => {\n const state = get()\n let loadedSettings: Record<string, any> = {}\n\n if (state.isInitialized) {\n return undefined\n }\n\n for (const setting of Object.values(SETTINGS)) {\n // if the settings should not persist, don't load it:\n if (!setting.persist) {\n continue\n }\n\n // load all subkeys for an indexed setting:\n if (setting?.indexer) {\n console.log(`SETTINGS: LOAD: ${setting.key} with indexer!`)\n\n let res: Result<Record<string, unknown>, Error> = storage.loadSubKeys(setting.key)\n if (res.is_error()) {\n console.log(`SETTINGS: LOAD: ${setting.key}`, res.error)\n continue\n }\n\n let subKeys: Record<string, unknown> = res.value\n console.log(`SETTINGS: LOAD: ${setting.key} subkeys are set!`, subKeys)\n loadedSettings = {...loadedSettings, ...subKeys}\n continue\n }\n\n let res = storage.load<any>(setting.key)\n if (res.is_error()) {\n console.log(`SETTINGS: LOAD: ${setting.key} is not set!`, res.error)\n // this setting isn't set from the default, so we don't load anything\n continue\n }\n // normal key:value pair:\n let value = res.value\n // res.value IS the stored value; logging value.value printed\n // \"undefined\" for every loaded setting and disguised present\n // values as missing. Redact token- and email-bearing keys: console\n // logs are uploaded in bug-report artifacts (same keys\n // diagnosticContext's SENSITIVE_SETTINGS_KEYS strips, minus an\n // import that would cycle stores <-> utils).\n console.log(`SETTINGS: LOAD: ${setting.key} = ${printableSettingValue(setting.key, value)}`)\n loadedSettings[setting.key] = value\n }\n\n // console.log(\"##############################################\")\n // console.log(loadedSettings)\n // console.log(\"##############################################\")\n\n set((state) => ({\n isInitialized: true,\n settings: {...state.settings, ...loadedSettings},\n }))\n\n // This hidden debug switch originally shipped default-off while the\n // notification-listener cold-start ANR was being investigated. Now\n // that the listener runs in its own guarded process, migrate existing\n // installs to the new default once; later explicit debug changes still\n // persist normally.\n // Reset the cloud backend override when the build's environment changes.\n //\n // cloud_core_url / cloud_runtime_url are persist:true and outrank both\n // the build's env and the compiled default (see resolveUrl in\n // cloudClient.ts). That is what we want inside one environment: a\n // developer's METRO_AUTO pin should survive a rebuild. It is wrong\n // across environments.\n //\n // The concrete case is an install that moves BETWEEN environments: an\n // internal tester running a dev build with a pinned override who then\n // installs the store build. The override outranks that build's prod\n // URLs, so without this they keep talking to dev with nothing\n // surfacing it.\n //\n // Note what this deliberately does NOT do, because the distinction is\n // easy to get backwards. TestFlight and the App Store receive the SAME\n // binary, so promotion does not change EXPO_PUBLIC_BUILD_ENV and this\n // reset never fires on it. Promotion is safe for a different reason:\n // the publishing lane bakes prod URLs (staging-builds.yml defaults\n // cloud_env to prod), so a promoted build was pointed at production the\n // whole time. The same holds for Android internal-track to production.\n //\n // The residual gap is therefore an override pinned while already on a\n // prod-labelled build, which no label comparison can see. That is a\n // deliberate limit: reaching it means typing a URL into a dev-only\n // screen, VersionInfo renders the current value, and the same screen\n // clears it.\n //\n // Comparing the baked EXPO_PUBLIC_BUILD_ENV against the last one seen\n // on this device covers those environment switches and fresh installs\n // without touching the setting write path. A reinstall needs no\n // handling: it drops the marker and the override together\n // (android:allowBackup=\"false\", and iOS deletes the container).\n const BUILD_ENV_KEY = \"settings.lastBuildEnv\"\n const buildEnv = (process.env.EXPO_PUBLIC_BUILD_ENV ?? \"dev\").trim() || \"dev\"\n const lastBuildEnv = storage.load<string>(BUILD_ENV_KEY)\n const previousBuildEnv = lastBuildEnv.is_error() ? undefined : lastBuildEnv.value\n if (previousBuildEnv !== buildEnv) {\n // Clear when there is no marker yet, not just on a recorded change.\n // The first build carrying this code meets every existing install\n // with previousBuildEnv === undefined, and those are exactly the\n // installs that may hold an override set before the pin existed --\n // the population this is here to repair. Treating \"no marker\" as a\n // fresh install would record the marker and never look again. A\n // genuinely fresh install has nothing persisted, so the clear below\n // writes each default over itself and costs nothing.\n //\n // Driven by the descriptors rather than a hardcoded key list, so a\n // setting that needs this behaviour declares it in one place and\n // cannot be missed here.\n const scoped = Object.values(SETTINGS).filter((setting) => setting.resetOnBuildEnvChange)\n console.log(\n `SETTINGS: build env ${previousBuildEnv ?? \"(none recorded)\"} -> ${buildEnv}, ` +\n `clearing ${scoped.length} build-scoped setting(s)`,\n )\n let allCleared = true\n for (const setting of scoped) {\n const cleared = await get().setSetting(setting.key, setting.defaultValue(), false)\n if (cleared.is_error()) {\n allCleared = false\n console.log(`SETTINGS: could not clear ${setting.key}:`, cleared.error)\n }\n }\n // Advance the marker only once the reset actually landed. Recording\n // it after a failed write would retire the retry and leave the stale\n // override for the life of the install; leaving it unset costs one\n // repeated attempt per launch until a write succeeds.\n if (allCleared) {\n storage.save(BUILD_ENV_KEY, buildEnv)\n }\n }\n\n const NOTIFICATION_LISTENER_MIGRATION_KEY = \"migration:android_notification_listener_default_on_v1\"\n const notificationListenerMigrationDone = storage.load<boolean>(NOTIFICATION_LISTENER_MIGRATION_KEY)\n if (notificationListenerMigrationDone.is_error() || !notificationListenerMigrationDone.value) {\n const result = await get().setSetting(SETTINGS.android_notification_listener_enabled.key, true, false)\n if (result.is_error()) {\n console.log(\"SETTINGS: notification listener migration failed:\", result.error)\n } else {\n storage.save(NOTIFICATION_LISTENER_MIGRATION_KEY, true)\n }\n }\n\n // One-time migration: force android_blur=false for existing users.\n // The setting's default is already false; this migration covers users\n // who explicitly opted into Android blur effects before we discovered\n // they're a major source of frame drops on cheap Android phones.\n // The dimezisBlurViewSdk31Plus blur each costs ~5-10ms/frame; with\n // multiple blurs on home (top fade + AppSwitcherButton x2) a low-end\n // device misses the 16ms budget consistently. Users can turn it back\n // on under Settings 鈫?Appearance once we've optimized further.\n //\n // The setSetting call also pushes to the server (saveOnServer: true)\n // so the server-stored value flips too — otherwise the next sync\n // from the user's server-stored prefs would re-enable blur.\n // Best-effort: a server failure (offline, 5xx) shouldn't block boot;\n // we still mark the migration done locally so we don't loop.\n const MIGRATION_KEY = \"migration:android_blur_default_false_v1\"\n const migrationDone = storage.load<boolean>(MIGRATION_KEY)\n if (migrationDone.is_error() || !migrationDone.value) {\n const current = get().getSetting(SETTINGS.android_blur.key)\n if (current === true) {\n const result = await get().setSetting(SETTINGS.android_blur.key, false, true)\n if (result.is_error()) {\n // Server push failed (offline / 5xx). Local storage was still\n // updated, so the user immediately gets the new behavior. The\n // server-side stale `true` will be overwritten the next time\n // the user opens Appearance settings and the auto-sync runs.\n console.log(\"SETTINGS: android_blur migration server-push failed:\", result.error)\n }\n }\n // Mark done unconditionally — even on server-push failure we don't\n // want to retry the migration on every boot. The local value is\n // already correct.\n storage.save(MIGRATION_KEY, true)\n }\n\n // The old camera default cropped the sensor to 102掳. Move existing\n // default-shaped values to the full 118掳 sensor once; named miniapp\n // requests for the 102掳 \"standard\" preset remain available.\n const CAMERA_FOV_MIGRATION_KEY = \"migration:camera_fov_full_sensor_v1\"\n const cameraFovMigrationDone = storage.load<boolean>(CAMERA_FOV_MIGRATION_KEY)\n if (cameraFovMigrationDone.is_error() || !cameraFovMigrationDone.value) {\n const current = get().getSetting(SETTINGS.camera_fov.key) as {fov?: number; roi_position?: number} | undefined\n let migrationSucceeded = true\n if (current?.fov === 102 && (current.roi_position ?? 0) === 0) {\n const result = await get().setSetting(SETTINGS.camera_fov.key, {fov: 118, roi_position: 0}, true)\n if (result.is_error()) {\n console.log(\"SETTINGS: camera FOV migration failed:\", result.error)\n migrationSucceeded = false\n }\n }\n // Unlike the blur migration above, a failed camera set may leave the\n // local value unchanged. Only mark this migration complete once the\n // desired value was applied so a transient failure retries on boot.\n if (migrationSucceeded) storage.save(CAMERA_FOV_MIGRATION_KEY, true)\n }\n })\n loadAllSettingsInFlight = inFlight\n void Promise.resolve(inFlight).then((result) => {\n if (result.is_error()) {\n loadAllSettingsInFlight = null\n }\n })\n return inFlight\n },\n getBluetoothSettings: () => {\n const state = get()\n // Device-model-filtered key set (wire v2): Mentra Live (no display) gets\n // the reduced MENTRA_LIVE_SETTING_KEYS; display glasses get the full set.\n const deviceModel = useGlassesStore.getState().deviceModel || state.getSetting(SETTINGS.default_wearable.key)\n const keys = getBluetoothSettingKeysForDevice(deviceModel, BLUETOOTH_SETTING_KEYS)\n const bluetoothSettings: Record<string, any> = {}\n for (const key of keys) {\n const value = state.getSetting(key)\n if (key === SETTINGS.core_token.key && (typeof value !== \"string\" || value.trim().length === 0)) {\n continue\n }\n bluetoothSettings[key] = value\n }\n return bluetoothSettings\n },\n resetAllSettingsLocally: () => {\n set((_state) => ({\n settings: getDefaultSettings(),\n isInitialized: true,\n }))\n },\n })),\n)\n\nexport const useSetting = <T = any>(key: string): [T, (value: T) => AsyncResult<void, Error>] => {\n const value = useSettingsStore((state) => state.getSetting(key))\n const setSetting = useSettingsStore((state) => state.setSetting)\n return [value, (newValue: T) => setSetting(key, newValue)]\n}\n"]}
@@ -71,6 +71,8 @@ export interface DeclaredAction {
71
71
  description: string;
72
72
  /** JSON-Schema input descriptor (MCP-compatible subset). */
73
73
  parameters?: Record<string, unknown>;
74
+ /** JSON-Schema descriptor for the action's structured result. */
75
+ outputSchema?: Record<string, unknown>;
74
76
  }
75
77
  export interface ClientApp extends AppletInterface {
76
78
  offline: boolean;