@glassly/engine 0.1.0-dev.1 → 0.1.0-dev.101

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 (343) hide show
  1. package/README.md +57 -19
  2. package/build/bluetooth-sdk/debug.d.ts +2 -0
  3. package/build/bluetooth-sdk/debug.d.ts.map +1 -0
  4. package/build/bluetooth-sdk/debug.js +2 -0
  5. package/build/bluetooth-sdk/debug.js.map +1 -0
  6. package/build/bluetooth-sdk/index.d.ts +3 -0
  7. package/build/bluetooth-sdk/index.d.ts.map +1 -0
  8. package/build/bluetooth-sdk/index.js +3 -0
  9. package/build/bluetooth-sdk/index.js.map +1 -0
  10. package/build/bluetooth-sdk/ota-transport.d.ts +2 -0
  11. package/build/bluetooth-sdk/ota-transport.d.ts.map +1 -0
  12. package/build/bluetooth-sdk/ota-transport.js +2 -0
  13. package/build/bluetooth-sdk/ota-transport.js.map +1 -0
  14. package/build/bluetooth-sdk/photo-receiver.d.ts +3 -0
  15. package/build/bluetooth-sdk/photo-receiver.d.ts.map +1 -0
  16. package/build/bluetooth-sdk/photo-receiver.js +3 -0
  17. package/build/bluetooth-sdk/photo-receiver.js.map +1 -0
  18. package/build/bluetooth-sdk/react.d.ts +2 -0
  19. package/build/bluetooth-sdk/react.d.ts.map +1 -0
  20. package/build/bluetooth-sdk/react.js +2 -0
  21. package/build/bluetooth-sdk/react.js.map +1 -0
  22. package/build/bluetooth-sdk/types.d.ts +2 -0
  23. package/build/bluetooth-sdk/types.d.ts.map +1 -0
  24. package/build/bluetooth-sdk/types.js +2 -0
  25. package/build/bluetooth-sdk/types.js.map +1 -0
  26. package/build/engine.d.ts +30 -18
  27. package/build/engine.d.ts.map +1 -1
  28. package/build/engine.js +12 -3
  29. package/build/engine.js.map +1 -1
  30. package/build/facades/dev.d.ts +1 -1
  31. package/build/facades/display.d.ts +11 -4
  32. package/build/facades/display.d.ts.map +1 -1
  33. package/build/facades/display.js +12 -2
  34. package/build/facades/display.js.map +1 -1
  35. package/build/facades/displayMirror.d.ts +2 -6
  36. package/build/facades/displayMirror.d.ts.map +1 -1
  37. package/build/facades/displayMirror.js +7 -14
  38. package/build/facades/displayMirror.js.map +1 -1
  39. package/build/facades/glasses.d.ts +6 -13
  40. package/build/facades/glasses.d.ts.map +1 -1
  41. package/build/facades/glasses.js +7 -3
  42. package/build/facades/glasses.js.map +1 -1
  43. package/build/facades/ota.d.ts +21 -21
  44. package/build/facades/ota.d.ts.map +1 -1
  45. package/build/facades/ota.js +26 -10
  46. package/build/facades/ota.js.map +1 -1
  47. package/build/facades/pairing.d.ts +11 -5
  48. package/build/facades/pairing.d.ts.map +1 -1
  49. package/build/facades/pairing.js +93 -17
  50. package/build/facades/pairing.js.map +1 -1
  51. package/build/facades/phoneNotifications.d.ts +12 -2
  52. package/build/facades/phoneNotifications.d.ts.map +1 -1
  53. package/build/facades/phoneNotifications.js +30 -10
  54. package/build/facades/phoneNotifications.js.map +1 -1
  55. package/build/facades/speakers.d.ts +1 -1
  56. package/build/facades/speakers.d.ts.map +1 -1
  57. package/build/facades/speakers.js.map +1 -1
  58. package/build/facades/speech.d.ts +7 -6
  59. package/build/facades/speech.d.ts.map +1 -1
  60. package/build/facades/speech.js +1 -1
  61. package/build/facades/speech.js.map +1 -1
  62. package/build/generated/releaseMetadata.d.ts +12 -0
  63. package/build/generated/releaseMetadata.d.ts.map +1 -0
  64. package/build/generated/releaseMetadata.js +10 -0
  65. package/build/generated/releaseMetadata.js.map +1 -0
  66. package/build/index.d.ts +9 -6
  67. package/build/index.d.ts.map +1 -1
  68. package/build/index.js +7 -5
  69. package/build/index.js.map +1 -1
  70. package/build/react/MentraLiveOtaFlow.d.ts +44 -0
  71. package/build/react/MentraLiveOtaFlow.d.ts.map +1 -0
  72. package/build/react/MentraLiveOtaFlow.js +322 -0
  73. package/build/react/MentraLiveOtaFlow.js.map +1 -0
  74. package/build/react/index.d.ts +3 -0
  75. package/build/react/index.d.ts.map +1 -0
  76. package/build/react/index.js +3 -0
  77. package/build/react/index.js.map +1 -0
  78. package/build/react/useEngineSnapshot.d.ts +2 -0
  79. package/build/react/useEngineSnapshot.d.ts.map +1 -0
  80. package/build/react/useEngineSnapshot.js +14 -0
  81. package/build/react/useEngineSnapshot.js.map +1 -0
  82. package/build/react/useMentraLiveOta.d.ts +84 -0
  83. package/build/react/useMentraLiveOta.d.ts.map +1 -0
  84. package/build/react/useMentraLiveOta.js +627 -0
  85. package/build/react/useMentraLiveOta.js.map +1 -0
  86. package/build/services/AppRegistry.d.ts +8 -0
  87. package/build/services/AppRegistry.d.ts.map +1 -1
  88. package/build/services/AppRegistry.js +15 -0
  89. package/build/services/AppRegistry.js.map +1 -1
  90. package/build/services/BlobStore.d.ts +2 -0
  91. package/build/services/BlobStore.d.ts.map +1 -1
  92. package/build/services/BlobStore.js +63 -10
  93. package/build/services/BlobStore.js.map +1 -1
  94. package/build/services/CustomDashboardModel.d.ts +48 -0
  95. package/build/services/CustomDashboardModel.d.ts.map +1 -0
  96. package/build/services/CustomDashboardModel.js +73 -0
  97. package/build/services/CustomDashboardModel.js.map +1 -0
  98. package/build/services/CustomDashboardService.d.ts +55 -0
  99. package/build/services/CustomDashboardService.d.ts.map +1 -0
  100. package/build/services/CustomDashboardService.js +520 -0
  101. package/build/services/CustomDashboardService.js.map +1 -0
  102. package/build/services/DashboardCoordinator.d.ts +26 -0
  103. package/build/services/DashboardCoordinator.d.ts.map +1 -0
  104. package/build/services/DashboardCoordinator.js +125 -0
  105. package/build/services/DashboardCoordinator.js.map +1 -0
  106. package/build/services/DeviceEventRouter.d.ts.map +1 -1
  107. package/build/services/DeviceEventRouter.js +45 -6
  108. package/build/services/DeviceEventRouter.js.map +1 -1
  109. package/build/services/DisplayProcessor.d.ts +3 -3
  110. package/build/services/DisplayProcessor.js +3 -3
  111. package/build/services/DisplayProcessor.js.map +1 -1
  112. package/build/services/GestureDotsService.d.ts +40 -0
  113. package/build/services/GestureDotsService.d.ts.map +1 -0
  114. package/build/services/GestureDotsService.js +167 -0
  115. package/build/services/GestureDotsService.js.map +1 -0
  116. package/build/services/GlassesStatusProjection.d.ts +15 -1
  117. package/build/services/GlassesStatusProjection.d.ts.map +1 -1
  118. package/build/services/GlassesStatusProjection.js +18 -11
  119. package/build/services/GlassesStatusProjection.js.map +1 -1
  120. package/build/services/HotspotOtaTransport.d.ts.map +1 -1
  121. package/build/services/HotspotOtaTransport.js +8 -7
  122. package/build/services/HotspotOtaTransport.js.map +1 -1
  123. package/build/services/LocalDisplayManager.d.ts +55 -3
  124. package/build/services/LocalDisplayManager.d.ts.map +1 -1
  125. package/build/services/LocalDisplayManager.js +196 -16
  126. package/build/services/LocalDisplayManager.js.map +1 -1
  127. package/build/services/LocalMiniappRuntime.d.ts +13 -0
  128. package/build/services/LocalMiniappRuntime.d.ts.map +1 -1
  129. package/build/services/LocalMiniappRuntime.js +32 -0
  130. package/build/services/LocalMiniappRuntime.js.map +1 -1
  131. package/build/services/MiniappExitGesture.d.ts +33 -0
  132. package/build/services/MiniappExitGesture.d.ts.map +1 -0
  133. package/build/services/MiniappExitGesture.js +54 -0
  134. package/build/services/MiniappExitGesture.js.map +1 -0
  135. package/build/services/OtaAutoChain.d.ts +41 -0
  136. package/build/services/OtaAutoChain.d.ts.map +1 -0
  137. package/build/services/OtaAutoChain.js +91 -0
  138. package/build/services/OtaAutoChain.js.map +1 -0
  139. package/build/services/OtaErrorMapping.d.ts +18 -0
  140. package/build/services/OtaErrorMapping.d.ts.map +1 -0
  141. package/build/services/OtaErrorMapping.js +63 -0
  142. package/build/services/OtaErrorMapping.js.map +1 -0
  143. package/build/services/OtaInstallCoordinator.d.ts +26 -3
  144. package/build/services/OtaInstallCoordinator.d.ts.map +1 -1
  145. package/build/services/OtaInstallCoordinator.js +38 -13
  146. package/build/services/OtaInstallCoordinator.js.map +1 -1
  147. package/build/services/OtaService.d.ts.map +1 -1
  148. package/build/services/OtaService.js +1 -1
  149. package/build/services/OtaService.js.map +1 -1
  150. package/build/services/OtaUpdateCheckService.d.ts +4 -1
  151. package/build/services/OtaUpdateCheckService.d.ts.map +1 -1
  152. package/build/services/OtaUpdateCheckService.js +28 -16
  153. package/build/services/OtaUpdateCheckService.js.map +1 -1
  154. package/build/services/PhoneNotificationsSync.d.ts +13 -0
  155. package/build/services/PhoneNotificationsSync.d.ts.map +1 -1
  156. package/build/services/PhoneNotificationsSync.js +101 -9
  157. package/build/services/PhoneNotificationsSync.js.map +1 -1
  158. package/build/services/PhonePhotoCoordinator.js +1 -1
  159. package/build/services/PhonePhotoCoordinator.js.map +1 -1
  160. package/build/services/PhoneStreamCoordinator.d.ts.map +1 -1
  161. package/build/services/PhoneStreamCoordinator.js +9 -6
  162. package/build/services/PhoneStreamCoordinator.js.map +1 -1
  163. package/build/services/SceneRenderer.d.ts.map +1 -1
  164. package/build/services/SceneRenderer.js +5 -0
  165. package/build/services/SceneRenderer.js.map +1 -1
  166. package/build/services/StreamLifecycleController.d.ts +4 -0
  167. package/build/services/StreamLifecycleController.d.ts.map +1 -1
  168. package/build/services/StreamLifecycleController.js +4 -0
  169. package/build/services/StreamLifecycleController.js.map +1 -1
  170. package/build/services/asg/localNetworkTransport.d.ts.map +1 -1
  171. package/build/services/asg/localNetworkTransport.js +13 -12
  172. package/build/services/asg/localNetworkTransport.js.map +1 -1
  173. package/build/services/effectiveCapabilities.d.ts +1 -1
  174. package/build/services/effectiveCapabilities.d.ts.map +1 -1
  175. package/build/services/effectiveCapabilities.js +26 -7
  176. package/build/services/effectiveCapabilities.js.map +1 -1
  177. package/build/services/gestureClaims.d.ts +18 -0
  178. package/build/services/gestureClaims.d.ts.map +1 -0
  179. package/build/services/gestureClaims.js +24 -0
  180. package/build/services/gestureClaims.js.map +1 -0
  181. package/build/services/gestureDotGlyphs.d.ts +8 -0
  182. package/build/services/gestureDotGlyphs.d.ts.map +1 -0
  183. package/build/services/gestureDotGlyphs.js +13 -0
  184. package/build/services/gestureDotGlyphs.js.map +1 -0
  185. package/build/services/glassesClockSync.d.ts.map +1 -1
  186. package/build/services/glassesClockSync.js +5 -1
  187. package/build/services/glassesClockSync.js.map +1 -1
  188. package/build/services/iosNotificationAppCatalog.d.ts +13 -0
  189. package/build/services/iosNotificationAppCatalog.d.ts.map +1 -0
  190. package/build/services/iosNotificationAppCatalog.js +28 -0
  191. package/build/services/iosNotificationAppCatalog.js.map +1 -0
  192. package/build/services/otaDisplayState.d.ts +1 -1
  193. package/build/services/otaDisplayState.d.ts.map +1 -1
  194. package/build/services/otaDisplayState.js.map +1 -1
  195. package/build/services/otaInstallPolicy.d.ts +5 -1
  196. package/build/services/otaInstallPolicy.d.ts.map +1 -1
  197. package/build/services/otaInstallPolicy.js +4 -0
  198. package/build/services/otaInstallPolicy.js.map +1 -1
  199. package/build/services/otaLegacyMapping.d.ts +1 -1
  200. package/build/services/otaLegacyMapping.d.ts.map +1 -1
  201. package/build/services/otaLegacyMapping.js.map +1 -1
  202. package/build/services/otaManifestPolicy.d.ts +14 -0
  203. package/build/services/otaManifestPolicy.d.ts.map +1 -0
  204. package/build/services/otaManifestPolicy.js +20 -0
  205. package/build/services/otaManifestPolicy.js.map +1 -0
  206. package/build/services/otaManifestUrl.d.ts +2 -1
  207. package/build/services/otaManifestUrl.d.ts.map +1 -1
  208. package/build/services/otaManifestUrl.js +24 -32
  209. package/build/services/otaManifestUrl.js.map +1 -1
  210. package/build/services/otaReleaseVersion.d.ts +10 -0
  211. package/build/services/otaReleaseVersion.d.ts.map +1 -0
  212. package/build/services/otaReleaseVersion.js +14 -0
  213. package/build/services/otaReleaseVersion.js.map +1 -0
  214. package/build/stores/appVisibility.d.ts +3 -0
  215. package/build/stores/appVisibility.d.ts.map +1 -0
  216. package/build/stores/appVisibility.js +3 -0
  217. package/build/stores/appVisibility.js.map +1 -0
  218. package/build/stores/apps.d.ts.map +1 -1
  219. package/build/stores/apps.js +7 -1
  220. package/build/stores/apps.js.map +1 -1
  221. package/build/stores/core.d.ts +3 -3
  222. package/build/stores/core.d.ts.map +1 -1
  223. package/build/stores/core.js.map +1 -1
  224. package/build/stores/display.d.ts +4 -4
  225. package/build/stores/display.d.ts.map +1 -1
  226. package/build/stores/display.js +12 -36
  227. package/build/stores/display.js.map +1 -1
  228. package/build/stores/glasses.d.ts +10 -4
  229. package/build/stores/glasses.d.ts.map +1 -1
  230. package/build/stores/glasses.js +2 -0
  231. package/build/stores/glasses.js.map +1 -1
  232. package/build/stores/settings.d.ts.map +1 -1
  233. package/build/stores/settings.js +140 -5
  234. package/build/stores/settings.js.map +1 -1
  235. package/build/types/applet.d.ts +3 -1
  236. package/build/types/applet.d.ts.map +1 -1
  237. package/build/types/applet.js +0 -3
  238. package/build/types/applet.js.map +1 -1
  239. package/build/types/capabilities/even-realities-g2.d.ts.map +1 -1
  240. package/build/types/capabilities/even-realities-g2.js +2 -2
  241. package/build/types/capabilities/even-realities-g2.js.map +1 -1
  242. package/build/types/enums.d.ts +1 -5
  243. package/build/types/enums.d.ts.map +1 -1
  244. package/build/types/enums.js +1 -8
  245. package/build/types/enums.js.map +1 -1
  246. package/build/types/hardware.d.ts +1 -1
  247. package/build/types/hardware.d.ts.map +1 -1
  248. package/build/types/hardware.js +1 -0
  249. package/build/types/hardware.js.map +1 -1
  250. package/build/types/index.d.ts +3 -7
  251. package/build/types/index.d.ts.map +1 -1
  252. package/build/types/index.js +3 -7
  253. package/build/types/index.js.map +1 -1
  254. package/build/utils/display/composer/ColumnComposer.d.ts +1 -1
  255. package/build/utils/display/composer/ColumnComposer.js +1 -1
  256. package/build/utils/display/composer/ColumnComposer.js.map +1 -1
  257. package/build/utils/display/scene/process.d.ts.map +1 -1
  258. package/build/utils/display/scene/process.js +4 -3
  259. package/build/utils/display/scene/process.js.map +1 -1
  260. package/build/utils/display/scene/types.d.ts +6 -2
  261. package/build/utils/display/scene/types.d.ts.map +1 -1
  262. package/build/utils/display/scene/types.js.map +1 -1
  263. package/package.json +69 -35
  264. package/src/bluetooth-sdk/debug.ts +1 -0
  265. package/src/bluetooth-sdk/index.ts +2 -0
  266. package/src/bluetooth-sdk/ota-transport.ts +1 -0
  267. package/src/bluetooth-sdk/photo-receiver.ts +2 -0
  268. package/src/bluetooth-sdk/react.ts +1 -0
  269. package/src/bluetooth-sdk/types.ts +1 -0
  270. package/src/engine.ts +12 -3
  271. package/src/facades/display.ts +12 -2
  272. package/src/facades/displayMirror.ts +7 -15
  273. package/src/facades/glasses.ts +8 -4
  274. package/src/facades/ota.ts +36 -11
  275. package/src/facades/pairing.ts +103 -23
  276. package/src/facades/phoneNotifications.ts +32 -10
  277. package/src/facades/speakers.ts +1 -1
  278. package/src/facades/speech.ts +21 -7
  279. package/src/generated/releaseMetadata.ts +20 -0
  280. package/src/index.ts +31 -5
  281. package/src/react/MentraLiveOtaFlow.tsx +754 -0
  282. package/src/react/index.ts +21 -0
  283. package/src/react/useEngineSnapshot.ts +16 -0
  284. package/src/react/useMentraLiveOta.ts +793 -0
  285. package/src/services/AppRegistry.ts +16 -0
  286. package/src/services/BlobStore.ts +57 -10
  287. package/src/services/CustomDashboardModel.ts +83 -0
  288. package/src/services/CustomDashboardService.ts +544 -0
  289. package/src/services/DashboardCoordinator.ts +121 -0
  290. package/src/services/DeviceEventRouter.ts +48 -8
  291. package/src/services/DisplayProcessor.ts +3 -3
  292. package/src/services/GestureDotsService.ts +164 -0
  293. package/src/services/GlassesStatusProjection.ts +20 -11
  294. package/src/services/HotspotOtaTransport.ts +8 -7
  295. package/src/services/LocalDisplayManager.ts +198 -18
  296. package/src/services/LocalMiniappRuntime.ts +37 -0
  297. package/src/services/MiniappExitGesture.ts +76 -0
  298. package/src/services/OtaAutoChain.ts +130 -0
  299. package/src/services/OtaErrorMapping.ts +80 -0
  300. package/src/services/OtaInstallCoordinator.ts +40 -13
  301. package/src/services/OtaService.ts +1 -2
  302. package/src/services/OtaUpdateCheckService.ts +33 -19
  303. package/src/services/PhoneNotificationsSync.ts +125 -9
  304. package/src/services/PhonePhotoCoordinator.ts +1 -1
  305. package/src/services/PhoneStreamCoordinator.ts +10 -6
  306. package/src/services/SceneRenderer.ts +4 -0
  307. package/src/services/StreamLifecycleController.ts +4 -0
  308. package/src/services/asg/localNetworkTransport.ts +20 -19
  309. package/src/services/effectiveCapabilities.ts +27 -7
  310. package/src/services/gestureClaims.ts +28 -0
  311. package/src/services/gestureDotGlyphs.ts +15 -0
  312. package/src/services/glassesClockSync.ts +5 -1
  313. package/src/services/iosNotificationAppCatalog.ts +39 -0
  314. package/src/services/otaDisplayState.ts +1 -1
  315. package/src/services/otaInstallPolicy.ts +5 -1
  316. package/src/services/otaLegacyMapping.ts +1 -1
  317. package/src/services/otaManifestPolicy.ts +43 -0
  318. package/src/services/otaManifestUrl.ts +27 -36
  319. package/src/services/otaReleaseVersion.ts +22 -0
  320. package/src/stores/appVisibility.ts +3 -0
  321. package/src/stores/apps.ts +7 -1
  322. package/src/stores/core.ts +4 -4
  323. package/src/stores/display.ts +16 -48
  324. package/src/stores/glasses.ts +15 -6
  325. package/src/stores/settings.ts +140 -5
  326. package/src/types/applet.ts +3 -1
  327. package/src/types/capabilities/even-realities-g2.ts +3 -2
  328. package/src/types/enums.ts +1 -9
  329. package/src/types/hardware.ts +2 -1
  330. package/src/types/index.ts +3 -7
  331. package/src/utils/display/composer/ColumnComposer.ts +1 -1
  332. package/src/utils/display/scene/process.ts +4 -3
  333. package/src/utils/display/scene/types.ts +0 -0
  334. package/build/devtools.d.ts +0 -11
  335. package/build/devtools.d.ts.map +0 -1
  336. package/build/devtools.js +0 -13
  337. package/build/devtools.js.map +0 -1
  338. package/build/internal.d.ts +0 -67
  339. package/build/internal.d.ts.map +0 -1
  340. package/build/internal.js +0 -90
  341. package/build/internal.js.map +0 -1
  342. package/src/devtools.ts +0 -13
  343. package/src/internal.ts +0 -155
package/build/index.d.ts CHANGED
@@ -6,8 +6,7 @@
6
6
  * renders with (decision functions, sort/order helpers, policy constants,
7
7
  * capability tables, timers). Judgment rule: read models, commands, pure
8
8
  * functions and types belong here; anything that mutates runtime state or
9
- * exposes a raw store/service lives on `@glassly/engine/internal`
10
- * (migration-era surface) or `@glassly/engine/devtools` (debug-only) instead.
9
+ * exposes a raw store/service remains private to the GlasslyOS host.
11
10
  * See cloud-v2/docs/issues/020-glasses-status-boundary/integration-review.md §D.
12
11
  */
13
12
  export { engine } from "./engine";
@@ -18,6 +17,7 @@ export type { IdentitySnapshot } from "./services/PairingIdentity";
18
17
  export type { DisplayMirrorEvent } from "./facades/displayMirror";
19
18
  export type { IslandConfigureOptions, IslandAuth, IslandConfigValues, IslandAnalytics, IslandUiSeams, ScanQrOptions, ScanQrResult, SubjectTokenType, } from "./runtime/bootstrap";
20
19
  export { SETTINGS, useSetting } from "./stores/settings";
20
+ export { isCustomDashboardEligible, normalizeDashboardWidgets, DASHBOARD_WIDGET_IDS, type DashboardWidgetId, type DashboardWidgetSetting, } from "./services/CustomDashboardModel";
21
21
  export { AI_TIERS, TIER_MODEL_OPTIONS, parseTierSetting } from "./services/AiTierResolution";
22
22
  export type { AiTier, AiTierProvider, TierModelOption } from "./services/AiTierResolution";
23
23
  export type { MemoryStats } from "./services/MemoryStore";
@@ -29,20 +29,23 @@ export type { CloudClientStatusSnapshot, MiniappAuthToken, InteropAuditEvent, Tt
29
29
  export { isGlassesConnected, isGlassesReady, isGlassesLinkLayerBusy, waitForGlassesReady, type GlassesConnectionStatus, type WaitForGlassesReadyOptions, } from "./services/GlassesReadiness";
30
30
  export { decideReconnect, decideConnectButtonAction, type ReconnectDecision, type ReconnectDecisionInput, type ConnectButtonAction, } from "./services/ConnectionCoordinator";
31
31
  export type { VersionInfo, MtkPatch, BesFirmware, VersionJson, OtaCheckResult, OtaCheckCurrentGlassesResult, OtaCheckCurrentGlassesOptions, } from "./services/OtaUpdateCheckService";
32
- export { MINIMUM_OTA_STATUS_BUILD, MAX_RETRIES, RETRY_INTERVAL_MS, PROGRESS_TIMEOUT_MS, DOWNLOAD_STUCK_TIMEOUT_MS, MTK_INSTALL_TIMEOUT_MS, GLOBAL_OTA_TIMEOUT_MS, PING_INTERVAL_MS, QUERY_REPLY_TIMEOUT_MS, OtaProgressMessages, } from "./services/otaInstallPolicy";
32
+ export { MINIMUM_OTA_STATUS_BUILD, MAX_RETRIES, RETRY_INTERVAL_MS, PROGRESS_TIMEOUT_MS, DOWNLOAD_STUCK_TIMEOUT_MS, MTK_INSTALL_TIMEOUT_MS, GLOBAL_OTA_TIMEOUT_MS, PING_INTERVAL_MS, QUERY_REPLY_TIMEOUT_MS, BES_RESTART_TIMEOUT_MS, OtaProgressMessages, } from "./services/otaInstallPolicy";
33
33
  export { deriveDisplayState } from "./services/otaDisplayState";
34
34
  export type { DisplayState } from "./services/otaDisplayState";
35
- export type { OtaProgress, OtaProgressStatus, OtaStatus, OtaUpdateInfo, OtaSnapshot, OtaInstallSnapshot, } from "./facades/ota";
35
+ export type { OtaProgress, OtaProgressStatus, OtaStatus, OtaUpdateInfo, ReleaseChangelog, OtaSnapshot, OtaInstallSnapshot, } from "./facades/ota";
36
+ export { beginOtaAutoChain, clearOtaAutoChainReconnectWait, isOtaAutoChainActive, otaAutoChainFingerprint, otaAutoChainReconnectWaitRemaining, stopOtaAutoChain, tryAdvanceOtaAutoChain, MAX_OTA_AUTO_CHAIN_PASSES, OTA_AUTO_CHAIN_RECONNECT_TIMEOUT_MS, } from "./services/OtaAutoChain";
37
+ export type { OtaAutoChainAdvanceResult } from "./services/OtaAutoChain";
38
+ export { BES_INSTALL_RESTART_MESSAGE, getOtaErrorMessage, shouldRequireGlassesRebootForBesFailure, shouldShowChangeWifiForOtaDownloadFailure, } from "./services/OtaErrorMapping";
36
39
  export type { GalleryNotice, GalleryNoticeCode } from "./services/asg/galleryNotices";
37
40
  export { MediaLibraryPermissions } from "./utils/permissions/MediaLibraryPermissions";
38
41
  export { deriveGalleryDisplayName } from "./utils/permissions/galleryDisplayName";
39
42
  export type { PhotoInfo, CaptureFile, CaptureGroup, GalleryResponse, ServerStatus, HealthResponse, GalleryEvent, } from "./types/asg";
40
- export type { PairFailureEvent, GlassesNotReadyEvent } from "@glassly/bluetooth-sdk/internal";
43
+ export type { PairFailureEvent, GlassesNotReadyEvent } from "@glassly/bluetooth-sdk";
41
44
  export { WebSocketStatus } from "./stores/connection";
42
45
  export { DUMMY_APPLET, saveAppsOrder, getAppsOrder, sortAppsByPackageNamePriority, saveLastOpenTime, getLastOpenTime, sortAppsByLastOpenTime, useApps, useStart, useStop, useSetForeground, useClearForeground, useRefresh, useStopAll, useInstall, useUninstall, useActiveApps, useActiveBackgroundApps, useBackgroundApps, useActiveForegroundApp, useForegroundApp, useActiveBackgroundAppsCount, useLocalMiniApps, type StartOptions, type OrderMap, } from "./stores/apps";
43
46
  export { decideDevLaunchRoute, type DecideDevLaunchOptions, type DevLaunchResult, type DevManifest, } from "./utils/devMiniappLaunch";
44
47
  export { HardwareCompatibility, type CompatibilityResult } from "./utils/hardware";
45
48
  export { BgTimer, throttle, debounce } from "./utils/timers";
46
- export { HardwareType, HardwareRequirementLevel, DeviceTypes, ControllerTypes, HARDWARE_CAPABILITIES, getModelCapabilities, simulatedGlasses, evenRealitiesG1, evenRealitiesG2, mentraLive, vuzixZ100, mentraDisplay, nimo, } from "./types";
49
+ export { HardwareType, HardwareRequirementLevel, DeviceTypes, ControllerTypes, HARDWARE_CAPABILITIES, getModelCapabilities, simulatedGlasses, evenRealitiesG1, evenRealitiesG2, mentraLive, nimo, vuzixZ100, mentraDisplay, } from "./types";
47
50
  export type { HardwareRequirement, CameraCapabilities, DisplayCapabilities, MicrophoneCapabilities, SpeakerCapabilities, IMUCapabilities, ButtonCapabilities, LightCapabilities, PowerCapabilities, Capabilities, AppletType, AppPermissionType, AppletPermission, AppletInterface, ClientApp, } from "./types";
48
51
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAGH,OAAO,EAAC,MAAM,EAAC,MAAM,UAAU,CAAA;AAC/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,EAAC,eAAe,EAAC,MAAM,qBAAqB,CAAA;AAInD,OAAO,EACL,YAAY,EACZ,aAAa,EACb,YAAY,EACZ,6BAA6B,EAC7B,gBAAgB,EAChB,eAAe,EACf,sBAAsB,EACtB,OAAO,EACP,QAAQ,EACR,OAAO,EACP,gBAAgB,EAChB,kBAAkB,EAClB,UAAU,EACV,UAAU,EACV,UAAU,EACV,YAAY,EACZ,aAAa,EACb,uBAAuB,EACvB,iBAAiB,EACjB,sBAAsB,EACtB,gBAAgB,EAChB,4BAA4B,EAC5B,gBAAgB,EAChB,KAAK,YAAY,EACjB,KAAK,QAAQ,GACd,MAAM,eAAe,CAAA;AAGtB,OAAO,EACL,oBAAoB,EACpB,KAAK,sBAAsB,EAC3B,KAAK,eAAe,EACpB,KAAK,WAAW,GACjB,MAAM,0BAA0B,CAAA;AACjC,OAAO,EAAC,qBAAqB,EAAE,KAAK,mBAAmB,EAAC,MAAM,kBAAkB,CAAA;AAChF,OAAO,EAAC,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAC,MAAM,gBAAgB,CAAA;AAG1D,OAAO,EACL,YAAY,EACZ,wBAAwB,EACxB,WAAW,EACX,eAAe,EACf,qBAAqB,EACrB,oBAAoB,EACpB,gBAAgB,EAChB,eAAe,EACf,eAAe,EACf,UAAU,EACV,IAAI,EACJ,SAAS,EACT,aAAa,GACd,MAAM,SAAS,CAAA;AAChB,YAAY,EACV,mBAAmB,EACnB,kBAAkB,EAClB,mBAAmB,EACnB,sBAAsB,EACtB,mBAAmB,EACnB,eAAe,EACf,kBAAkB,EAClB,iBAAiB,EACjB,iBAAiB,EACjB,YAAY,EACZ,UAAU,EACV,iBAAiB,EACjB,gBAAgB,EAChB,eAAe,EACf,SAAS,GACV,MAAM,SAAS,CAAA"}
package/build/index.js CHANGED
@@ -6,8 +6,7 @@
6
6
  * renders with (decision functions, sort/order helpers, policy constants,
7
7
  * capability tables, timers). Judgment rule: read models, commands, pure
8
8
  * functions and types belong here; anything that mutates runtime state or
9
- * exposes a raw store/service lives on `@glassly/engine/internal`
10
- * (migration-era surface) or `@glassly/engine/devtools` (debug-only) instead.
9
+ * exposes a raw store/service remains private to the GlasslyOS host.
11
10
  * See cloud-v2/docs/issues/020-glasses-status-boundary/integration-review.md §D.
12
11
  */
13
12
  // The namespaced OEM-facing engine API (the "(A) host API"). See ./engine.
@@ -18,6 +17,7 @@ export { engine } from "./engine";
18
17
  // device-model key helpers. The raw useSettingsStore stays internal;
19
18
  // imperative access goes through engine.settings.
20
19
  export { SETTINGS, useSetting } from "./stores/settings";
20
+ export { isCustomDashboardEligible, normalizeDashboardWidgets, DASHBOARD_WIDGET_IDS, } from "./services/CustomDashboardModel";
21
21
  // AI tier registry: the curated per-tier model dropdown options and helpers
22
22
  // the Settings > AI Models screen renders. Resolution itself runs inside
23
23
  // LocalMiniappRuntime; the screen only reads/writes the ai_model_* settings.
@@ -31,8 +31,10 @@ export { isGlassesConnected, isGlassesReady, isGlassesLinkLayerBusy, waitForGlas
31
31
  export { decideReconnect, decideConnectButtonAction, } from "./services/ConnectionCoordinator";
32
32
  // OTA install policy (watchdog timings + failure copy) + display-state
33
33
  // derivation, consumed by the OTA screens and their tests.
34
- export { MINIMUM_OTA_STATUS_BUILD, MAX_RETRIES, RETRY_INTERVAL_MS, PROGRESS_TIMEOUT_MS, DOWNLOAD_STUCK_TIMEOUT_MS, MTK_INSTALL_TIMEOUT_MS, GLOBAL_OTA_TIMEOUT_MS, PING_INTERVAL_MS, QUERY_REPLY_TIMEOUT_MS, OtaProgressMessages, } from "./services/otaInstallPolicy";
34
+ export { MINIMUM_OTA_STATUS_BUILD, MAX_RETRIES, RETRY_INTERVAL_MS, PROGRESS_TIMEOUT_MS, DOWNLOAD_STUCK_TIMEOUT_MS, MTK_INSTALL_TIMEOUT_MS, GLOBAL_OTA_TIMEOUT_MS, PING_INTERVAL_MS, QUERY_REPLY_TIMEOUT_MS, BES_RESTART_TIMEOUT_MS, OtaProgressMessages, } from "./services/otaInstallPolicy";
35
35
  export { deriveDisplayState } from "./services/otaDisplayState";
36
+ export { beginOtaAutoChain, clearOtaAutoChainReconnectWait, isOtaAutoChainActive, otaAutoChainFingerprint, otaAutoChainReconnectWaitRemaining, stopOtaAutoChain, tryAdvanceOtaAutoChain, MAX_OTA_AUTO_CHAIN_PASSES, OTA_AUTO_CHAIN_RECONNECT_TIMEOUT_MS, } from "./services/OtaAutoChain";
37
+ export { BES_INSTALL_RESTART_MESSAGE, getOtaErrorMessage, shouldRequireGlassesRebootForBesFailure, shouldShowChangeWifiForOtaDownloadFailure, } from "./services/OtaErrorMapping";
36
38
  export { MediaLibraryPermissions } from "./utils/permissions/MediaLibraryPermissions";
37
39
  export { deriveGalleryDisplayName } from "./utils/permissions/galleryDisplayName";
38
40
  // Cloud connection status enum (read model; the connection store is internal).
@@ -44,6 +46,6 @@ export { DUMMY_APPLET, saveAppsOrder, getAppsOrder, sortAppsByPackageNamePriorit
44
46
  export { decideDevLaunchRoute, } from "./utils/devMiniappLaunch";
45
47
  export { HardwareCompatibility } from "./utils/hardware";
46
48
  export { BgTimer, throttle, debounce } from "./utils/timers";
47
- // Types (hardware requirement types are canonical in @glassly/miniapp; the rest are engine-owned)
48
- export { HardwareType, HardwareRequirementLevel, DeviceTypes, ControllerTypes, HARDWARE_CAPABILITIES, getModelCapabilities, simulatedGlasses, evenRealitiesG1, evenRealitiesG2, mentraLive, vuzixZ100, mentraDisplay, nimo, } from "./types";
49
+ // Hardware types and capability profiles.
50
+ export { HardwareType, HardwareRequirementLevel, DeviceTypes, ControllerTypes, HARDWARE_CAPABILITIES, getModelCapabilities, simulatedGlasses, evenRealitiesG1, evenRealitiesG2, mentraLive, nimo, vuzixZ100, mentraDisplay, } from "./types";
49
51
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,2EAA2E;AAC3E,OAAO,EAAC,MAA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gB,EAChB,kBAAkB,EAClB,UAAU,EACV,UAAU,EACV,UAAU,EACV,YAAY,EACZ,aAAa,EACb,uBAAuB,EACvB,iBAAiB,EACjB,sBAAsB,EACtB,gBAAgB,EAChB,4BAA4B,EAC5B,gBAAgB,GAGjB,MAAM,eAAe,CAAA;AAEtB,4EAA4E;AAC5E,OAAO,EACL,oBAAoB,GAIrB,MAAM,0BAA0B,CAAA;AACjC,OAAO,EAAC,qBAAqB,EAA2B,MAAM,kBAAkB,CAAA;AAChF,OAAO,EAAC,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAC,MAAM,gBAAgB,CAAA;AAE1D,kGAAkG;AAClG,OAAO,EACL,YAAY,EACZ,wBAAwB,EACxB,WAAW,EACX,eAAe,EACf,qBAAqB,EACrB,oBAAoB,EACpB,gBAAgB,EAChB,eAAe,EACf,eAAe,EACf,UAAU,EACV,SAAS,EACT,aAAa,EACb,IAAI,GACL,MAAM,SAAS,CAAA","sourcesContent":["/**\n * `@glassly/engine` — the OEM-facing main entry.\n *\n * The `engine` namespace (configure/start/stop + typed domain facades), the\n * public contract/read-model types, and the pure helpers host UI legitimately\n * renders with (decision functions, sort/order helpers, policy constants,\n * capability tables, timers). Judgment rule: read models, commands, pure\n * functions and types belong here; anything that mutates runtime state or\n * exposes a raw store/service lives on `@glassly/engine/internal`\n * (migration-era surface) or `@glassly/engine/devtools` (debug-only) instead.\n * See cloud-v2/docs/issues/020-glasses-status-boundary/integration-review.md §D.\n */\n\n// The namespaced OEM-facing engine API (the \"(A) host API\"). See ./engine.\nexport {engine} from \"./engine\"\nexport type {\n ReportAttachmentInput,\n ReportContext,\n ReportDetails,\n ReportStatus,\n ReportTrigger,\n ReportSubmitResult,\n EngineSubmitReportInput,\n} from \"./facades/reports\"\nexport type {IslandNotification, IslandNotificationKind} from \"./facades/notifications\"\nexport type {WifiSearchResult} from \"./facades/glassesWifi\"\nexport type {IdentitySnapshot} from \"./services/PairingIdentity\"\nexport type {DisplayMirrorEvent} from \"./facades/displayMirror\"\nexport type {\n IslandConfigureOptions,\n IslandAuth,\n IslandConfigValues,\n IslandAnalytics,\n IslandUiSeams,\n ScanQrOptions,\n ScanQrResult,\n SubjectTokenType,\n} from \"./runtime/bootstrap\"\n\n// Settings contract: the typed key registry (schema descriptors — the same\n// surface engine.settings.descriptor()/keys() reads), the per-key React hook\n// (the hook layer, same precedent as the apps hooks below), and the pure\n// device-model key helpers. The raw useSettingsStore stays internal;\n// imperative access goes through engine.settings.\nexport {SETTINGS, useSetting} from \"./stores/settings\"\n\n// AI tier registry: the curated per-tier model dropdown options and helpers\n// the Settings > AI Models screen renders. Resolution itself runs inside\n// LocalMiniappRuntime; the screen only reads/writes the ai_model_* settings.\nexport {AI_TIERS, TIER_MODEL_OPTIONS, parseTierSetting} from \"./services/AiTierResolution\"\nexport type {AiTier, AiTierProvider, TierModelOption} from \"./services/AiTierResolution\"\n\n// Shared user memory timeline (engine.memory / Settings > Memory). Entry and\n// session shapes are canonical in @glassly/miniapp (the session.memory\n// surface); the stats read model is engine-side.\nexport type {MemoryStats} from \"./services/MemoryStore\"\nexport type {SpeakerProfile} from \"./services/SpeakerProfileStore\"\nexport type {EnrollOutcome} from \"./facades/speakers\"\nexport {MENTRA_LIVE_SETTING_KEYS, getBluetoothSettingKeysForDevice} from \"./stores/bluetoothSettingKeys\"\n\n// Runtime-shared constants and contract DTOs.\nexport {ISLAND_SETTINGS_KEYS} from \"./runtime/config\"\nexport type {CloudClientStatusSnapshot, MiniappAuthToken, InteropAuditEvent, TtsSynthesisResult} from \"./runtime/config\"\n\n// Pure readiness predicates over glasses connection state.\nexport {\n isGlassesConnected,\n isGlassesReady,\n isGlassesLinkLayerBusy,\n waitForGlassesReady,\n type GlassesConnectionStatus,\n type WaitForGlassesReadyOptions,\n} from \"./services/GlassesReadiness\"\n// Pure connect/reconnect decision helpers (host UI renders the outcome).\nexport {\n decideReconnect,\n decideConnectButtonAction,\n type ReconnectDecision,\n type ReconnectDecisionInput,\n type ConnectButtonAction,\n} from \"./services/ConnectionCoordinator\"\n\n// OTA read-model types for host OTA UI (progress screen, error mapping,\n// progress section) — the check/install machinery itself is internal.\nexport type {\n VersionInfo,\n MtkPatch,\n BesFirmware,\n VersionJson,\n OtaCheckResult,\n OtaCheckCurrentGlassesResult,\n OtaCheckCurrentGlassesOptions,\n} from \"./services/OtaUpdateCheckService\"\n// OTA install policy (watchdog timings + failure copy) + display-state\n// derivation, consumed by the OTA screens and their tests.\nexport {\n MINIMUM_OTA_STATUS_BUILD,\n MAX_RETRIES,\n RETRY_INTERVAL_MS,\n PROGRESS_TIMEOUT_MS,\n DOWNLOAD_STUCK_TIMEOUT_MS,\n MTK_INSTALL_TIMEOUT_MS,\n GLOBAL_OTA_TIMEOUT_MS,\n PING_INTERVAL_MS,\n QUERY_REPLY_TIMEOUT_MS,\n OtaProgressMessages,\n} from \"./services/otaInstallPolicy\"\nexport {deriveDisplayState} from \"./services/otaDisplayState\"\nexport type {DisplayState} from \"./services/otaDisplayState\"\nexport type {\n OtaProgress,\n OtaProgressStatus,\n OtaStatus,\n OtaUpdateInfo,\n OtaSnapshot,\n OtaInstallSnapshot,\n} from \"./facades/ota\"\n\n// Gallery read models: engine.gallery.onNotice payload types, the media\n// permission helper + display-name derivation host gallery UI uses, and the\n// glasses-camera DTO types (re-exported through the host @/types/asg shim).\nexport type {GalleryNotice, GalleryNoticeCode} from \"./services/asg/galleryNotices\"\nexport {MediaLibraryPermissions} from \"./utils/permissions/MediaLibraryPermissions\"\nexport {deriveGalleryDisplayName} from \"./utils/permissions/galleryDisplayName\"\nexport type {\n PhotoInfo,\n CaptureFile,\n CaptureGroup,\n GalleryResponse,\n ServerStatus,\n HealthResponse,\n GalleryEvent,\n} from \"./types/asg\"\n\n// Bluetooth SDK event types host UI subscribes to via engine facades (the\n// BluetoothSdk singleton passthrough itself is internal).\nexport type {PairFailureEvent, GlassesNotReadyEvent} from \"@glassly/bluetooth-sdk/internal\"\n\n// Cloud connection status enum (read model; the connection store is internal).\nexport {WebSocketStatus} from \"./stores/connection\"\n\n// App-list hook layer + pure list helpers (the raw useAppStatusStore and\n// installAppStoreHooks wiring are internal).\nexport {\n DUMMY_APPLET,\n saveAppsOrder,\n getAppsOrder,\n sortAppsByPackageNamePriority,\n saveLastOpenTime,\n getLastOpenTime,\n sortAppsByLastOpenTime,\n useApps,\n useStart,\n useStop,\n useSetForeground,\n useClearForeground,\n useRefresh,\n useStopAll,\n useInstall,\n useUninstall,\n useActiveApps,\n useActiveBackgroundApps,\n useBackgroundApps,\n useActiveForegroundApp,\n useForegroundApp,\n useActiveBackgroundAppsCount,\n useLocalMiniApps,\n type StartOptions,\n type OrderMap,\n} from \"./stores/apps\"\n\n// Pure dev-miniapp launch-route decision (registration itself is internal).\nexport {\n decideDevLaunchRoute,\n type DecideDevLaunchOptions,\n type DevLaunchResult,\n type DevManifest,\n} from \"./utils/devMiniappLaunch\"\nexport {HardwareCompatibility, type CompatibilityResult} from \"./utils/hardware\"\nexport {BgTimer, throttle, debounce} from \"./utils/timers\"\n\n// Types (hardware requirement types are canonical in @glassly/miniapp; the rest are engine-owned)\nexport {\n HardwareType,\n HardwareRequirementLevel,\n DeviceTypes,\n ControllerTypes,\n HARDWARE_CAPABILITIES,\n getModelCapabilities,\n simulatedGlasses,\n evenRealitiesG1,\n evenRealitiesG2,\n mentraLive,\n vuzixZ100,\n mentraDisplay,\n nimo,\n} from \"./types\"\nexport type {\n HardwareRequirement,\n CameraCapabilities,\n DisplayCapabilities,\n MicrophoneCapabilities,\n SpeakerCapabilities,\n IMUCapabilities,\n ButtonCapabilities,\n LightCapabilities,\n PowerCapabilities,\n Capabilities,\n AppletType,\n AppPermissionType,\n AppletPermission,\n AppletInterface,\n ClientApp,\n} from \"./types\"\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,2EAA2E;AAC3E,OAAO,EAAC,MAAM,EAAC,MAAM,UAAU,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AAO,EAAC,uBAAuB,EAAC,MAAM,6CAA6C,CAAA;AACnF,OAAO,EAAC,wBAAwB,EAAC,MAAM,wCAAwC,CAAA;AAe/E,+EAA+E;AAC/E,OAAO,EAAC,eAAe,EAAC,MAAM,qBAAqB,CAAA;AAEnD,yEAAyE;AACzE,6CAA6C;AAC7C,OAAO,EACL,YAAY,EACZ,aAAa,EACb,YAAY,EACZ,6BAA6B,EAC7B,gBAAgB,EAChB,eAAe,EACf,sBAAsB,EACtB,OAAO,EACP,QAAQ,EACR,OAAO,EACP,gBAAgB,EAChB,kBAAkB,EAClB,UAAU,EACV,UAAU,EACV,UAAU,EACV,YAAY,EACZ,aAAa,EACb,uBAAuB,EACvB,iBAAiB,EACjB,sBAAsB,EACtB,gBAAgB,EAChB,4BAA4B,EAC5B,gBAAgB,GAGjB,MAAM,eAAe,CAAA;AAEtB,4EAA4E;AAC5E,OAAO,EACL,oBAAoB,GAIrB,MAAM,0BAA0B,CAAA;AACjC,OAAO,EAAC,qBAAqB,EAA2B,MAAM,kBAAkB,CAAA;AAChF,OAAO,EAAC,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAC,MAAM,gBAAgB,CAAA;AAE1D,0CAA0C;AAC1C,OAAO,EACL,YAAY,EACZ,wBAAwB,EACxB,WAAW,EACX,eAAe,EACf,qBAAqB,EACrB,oBAAoB,EACpB,gBAAgB,EAChB,eAAe,EACf,eAAe,EACf,UAAU,EACV,IAAI,EACJ,SAAS,EACT,aAAa,GACd,MAAM,SAAS,CAAA","sourcesContent":["/**\n * `@glassly/engine` — the OEM-facing main entry.\n *\n * The `engine` namespace (configure/start/stop + typed domain facades), the\n * public contract/read-model types, and the pure helpers host UI legitimately\n * renders with (decision functions, sort/order helpers, policy constants,\n * capability tables, timers). Judgment rule: read models, commands, pure\n * functions and types belong here; anything that mutates runtime state or\n * exposes a raw store/service remains private to the GlasslyOS host.\n * See cloud-v2/docs/issues/020-glasses-status-boundary/integration-review.md §D.\n */\n\n// The namespaced OEM-facing engine API (the \"(A) host API\"). See ./engine.\nexport {engine} from \"./engine\"\nexport type {\n ReportAttachmentInput,\n ReportContext,\n ReportDetails,\n ReportStatus,\n ReportTrigger,\n ReportSubmitResult,\n EngineSubmitReportInput,\n} from \"./facades/reports\"\nexport type {IslandNotification, IslandNotificationKind} from \"./facades/notifications\"\nexport type {WifiSearchResult} from \"./facades/glassesWifi\"\nexport type {IdentitySnapshot} from \"./services/PairingIdentity\"\nexport type {DisplayMirrorEvent} from \"./facades/displayMirror\"\nexport type {\n IslandConfigureOptions,\n IslandAuth,\n IslandConfigValues,\n IslandAnalytics,\n IslandUiSeams,\n ScanQrOptions,\n ScanQrResult,\n SubjectTokenType,\n} from \"./runtime/bootstrap\"\n\n// Settings contract: the typed key registry (schema descriptors — the same\n// surface engine.settings.descriptor()/keys() reads), the per-key React hook\n// (the hook layer, same precedent as the apps hooks below), and the pure\n// device-model key helpers. The raw useSettingsStore stays internal;\n// imperative access goes through engine.settings.\nexport {SETTINGS, useSetting} from \"./stores/settings\"\nexport {\n isCustomDashboardEligible,\n normalizeDashboardWidgets,\n DASHBOARD_WIDGET_IDS,\n type DashboardWidgetId,\n type DashboardWidgetSetting,\n} from \"./services/CustomDashboardModel\"\n\n// AI tier registry: the curated per-tier model dropdown options and helpers\n// the Settings > AI Models screen renders. Resolution itself runs inside\n// LocalMiniappRuntime; the screen only reads/writes the ai_model_* settings.\nexport {AI_TIERS, TIER_MODEL_OPTIONS, parseTierSetting} from \"./services/AiTierResolution\"\nexport type {AiTier, AiTierProvider, TierModelOption} from \"./services/AiTierResolution\"\n\n// Shared user memory timeline (engine.memory / Settings > Memory). Entry and\n// session shapes are canonical in @glassly/miniapp (the session.memory\n// surface); the stats read model is engine-side.\nexport type {MemoryStats} from \"./services/MemoryStore\"\nexport type {SpeakerProfile} from \"./services/SpeakerProfileStore\"\nexport type {EnrollOutcome} from \"./facades/speakers\"\nexport {MENTRA_LIVE_SETTING_KEYS, getBluetoothSettingKeysForDevice} from \"./stores/bluetoothSettingKeys\"\n\n// Runtime-shared constants and contract DTOs.\nexport {ISLAND_SETTINGS_KEYS} from \"./runtime/config\"\nexport type {CloudClientStatusSnapshot, MiniappAuthToken, InteropAuditEvent, TtsSynthesisResult} from \"./runtime/config\"\n\n// Pure readiness predicates over glasses connection state.\nexport {\n isGlassesConnected,\n isGlassesReady,\n isGlassesLinkLayerBusy,\n waitForGlassesReady,\n type GlassesConnectionStatus,\n type WaitForGlassesReadyOptions,\n} from \"./services/GlassesReadiness\"\n// Pure connect/reconnect decision helpers (host UI renders the outcome).\nexport {\n decideReconnect,\n decideConnectButtonAction,\n type ReconnectDecision,\n type ReconnectDecisionInput,\n type ConnectButtonAction,\n} from \"./services/ConnectionCoordinator\"\n\n// OTA read-model types for host OTA UI (progress screen, error mapping,\n// progress section) — the check/install machinery itself is internal.\nexport type {\n VersionInfo,\n MtkPatch,\n BesFirmware,\n VersionJson,\n OtaCheckResult,\n OtaCheckCurrentGlassesResult,\n OtaCheckCurrentGlassesOptions,\n} from \"./services/OtaUpdateCheckService\"\n// OTA install policy (watchdog timings + failure copy) + display-state\n// derivation, consumed by the OTA screens and their tests.\nexport {\n MINIMUM_OTA_STATUS_BUILD,\n MAX_RETRIES,\n RETRY_INTERVAL_MS,\n PROGRESS_TIMEOUT_MS,\n DOWNLOAD_STUCK_TIMEOUT_MS,\n MTK_INSTALL_TIMEOUT_MS,\n GLOBAL_OTA_TIMEOUT_MS,\n PING_INTERVAL_MS,\n QUERY_REPLY_TIMEOUT_MS,\n BES_RESTART_TIMEOUT_MS,\n OtaProgressMessages,\n} from \"./services/otaInstallPolicy\"\nexport {deriveDisplayState} from \"./services/otaDisplayState\"\nexport type {DisplayState} from \"./services/otaDisplayState\"\nexport type {\n OtaProgress,\n OtaProgressStatus,\n OtaStatus,\n OtaUpdateInfo,\n ReleaseChangelog,\n OtaSnapshot,\n OtaInstallSnapshot,\n} from \"./facades/ota\"\nexport {\n beginOtaAutoChain,\n clearOtaAutoChainReconnectWait,\n isOtaAutoChainActive,\n otaAutoChainFingerprint,\n otaAutoChainReconnectWaitRemaining,\n stopOtaAutoChain,\n tryAdvanceOtaAutoChain,\n MAX_OTA_AUTO_CHAIN_PASSES,\n OTA_AUTO_CHAIN_RECONNECT_TIMEOUT_MS,\n} from \"./services/OtaAutoChain\"\nexport type {OtaAutoChainAdvanceResult} from \"./services/OtaAutoChain\"\nexport {\n BES_INSTALL_RESTART_MESSAGE,\n getOtaErrorMessage,\n shouldRequireGlassesRebootForBesFailure,\n shouldShowChangeWifiForOtaDownloadFailure,\n} from \"./services/OtaErrorMapping\"\n\n// Gallery read models: engine.gallery.onNotice payload types, the media\n// permission helper + display-name derivation host gallery UI uses, and the\n// glasses-camera DTO types (re-exported through the host @/types/asg shim).\nexport type {GalleryNotice, GalleryNoticeCode} from \"./services/asg/galleryNotices\"\nexport {MediaLibraryPermissions} from \"./utils/permissions/MediaLibraryPermissions\"\nexport {deriveGalleryDisplayName} from \"./utils/permissions/galleryDisplayName\"\nexport type {\n PhotoInfo,\n CaptureFile,\n CaptureGroup,\n GalleryResponse,\n ServerStatus,\n HealthResponse,\n GalleryEvent,\n} from \"./types/asg\"\n\n// Bluetooth SDK event types host UI subscribes to via engine facades (the\n// BluetoothSdk singleton passthrough itself is internal).\nexport type {PairFailureEvent, GlassesNotReadyEvent} from \"@glassly/bluetooth-sdk\"\n\n// Cloud connection status enum (read model; the connection store is internal).\nexport {WebSocketStatus} from \"./stores/connection\"\n\n// App-list hook layer + pure list helpers (the raw useAppStatusStore and\n// installAppStoreHooks wiring are internal).\nexport {\n DUMMY_APPLET,\n saveAppsOrder,\n getAppsOrder,\n sortAppsByPackageNamePriority,\n saveLastOpenTime,\n getLastOpenTime,\n sortAppsByLastOpenTime,\n useApps,\n useStart,\n useStop,\n useSetForeground,\n useClearForeground,\n useRefresh,\n useStopAll,\n useInstall,\n useUninstall,\n useActiveApps,\n useActiveBackgroundApps,\n useBackgroundApps,\n useActiveForegroundApp,\n useForegroundApp,\n useActiveBackgroundAppsCount,\n useLocalMiniApps,\n type StartOptions,\n type OrderMap,\n} from \"./stores/apps\"\n\n// Pure dev-miniapp launch-route decision (registration itself is internal).\nexport {\n decideDevLaunchRoute,\n type DecideDevLaunchOptions,\n type DevLaunchResult,\n type DevManifest,\n} from \"./utils/devMiniappLaunch\"\nexport {HardwareCompatibility, type CompatibilityResult} from \"./utils/hardware\"\nexport {BgTimer, throttle, debounce} from \"./utils/timers\"\n\n// Hardware types and capability profiles.\nexport {\n HardwareType,\n HardwareRequirementLevel,\n DeviceTypes,\n ControllerTypes,\n HARDWARE_CAPABILITIES,\n getModelCapabilities,\n simulatedGlasses,\n evenRealitiesG1,\n evenRealitiesG2,\n mentraLive,\n nimo,\n vuzixZ100,\n mentraDisplay,\n} from \"./types\"\nexport type {\n HardwareRequirement,\n CameraCapabilities,\n DisplayCapabilities,\n MicrophoneCapabilities,\n SpeakerCapabilities,\n IMUCapabilities,\n ButtonCapabilities,\n LightCapabilities,\n PowerCapabilities,\n Capabilities,\n AppletType,\n AppPermissionType,\n AppletPermission,\n AppletInterface,\n ClientApp,\n} from \"./types\"\n"]}
@@ -0,0 +1,44 @@
1
+ import React from "react";
2
+ import { type StyleProp, type ViewStyle } from "react-native";
3
+ import { type MentraLiveOtaController, type MentraLiveOtaFlowPage } from "./useMentraLiveOta";
4
+ export type { MentraLiveOtaFlowPage } from "./useMentraLiveOta";
5
+ export type MentraLiveOtaFlowTheme = {
6
+ background: string;
7
+ border: string;
8
+ error: string;
9
+ foreground: string;
10
+ primary: string;
11
+ primaryText: string;
12
+ textDim: string;
13
+ };
14
+ export type MentraLiveOtaFlowTranslate = (key: string, options?: Record<string, string>) => string;
15
+ export type MentraLiveOtaFlowProps = {
16
+ /** Display name used in update copy. */
17
+ deviceName?: string;
18
+ /** Entry page. `progress` exists for recovery/deep-link compatibility. */
19
+ initialPage?: MentraLiveOtaFlowPage;
20
+ /** Start the OTA-only projections. Full Engine hosts should pass false. */
21
+ initializeRuntime?: boolean;
22
+ /** Called after the final check or when the user leaves an optional update. */
23
+ onFinished: () => void;
24
+ /** Host-owned Wi-Fi setup for glasses that do not support hotspot OTA. */
25
+ onOpenWifiSetup: () => void;
26
+ /** Lets a host coordinate its global connection overlay with OTA progress and firmware restarts. */
27
+ onFirmwareRestartingChange?: (restarting: boolean, progressActive: boolean) => void;
28
+ /** Enables the existing developer-only escape hatches. */
29
+ allowDevSkip?: boolean;
30
+ /** Enables the existing super-mode interrupted-session escape hatch. */
31
+ superMode?: boolean;
32
+ /** Optional host localization. Defaults to the Glassly App English OTA copy. */
33
+ translate?: MentraLiveOtaFlowTranslate;
34
+ /** Optional host theme. Both hosts use the same layout and state machine. */
35
+ theme?: Partial<MentraLiveOtaFlowTheme>;
36
+ style?: StyleProp<ViewStyle>;
37
+ };
38
+ export declare function MentraLiveOtaFlow({ allowDevSkip, deviceName, initialPage, initializeRuntime, onFinished, onFirmwareRestartingChange, onOpenWifiSetup, style, superMode, theme, translate, }: MentraLiveOtaFlowProps): React.JSX.Element;
39
+ export declare function ChangelogList({ changelogs, colors, title, }: {
40
+ changelogs: MentraLiveOtaController["state"]["changelogs"];
41
+ colors: MentraLiveOtaFlowTheme;
42
+ title: string;
43
+ }): React.JSX.Element | null;
44
+ //# sourceMappingURL=MentraLiveOtaFlow.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"MentraLiveOtaFlow.d.ts","sourceRoot":"","sources":["../../src/react/MentraLiveOtaFlow.tsx"],"names":[],"mappings":"AACA,OAAO,KAAgB,MAAM,OAAO,CAAA;AACpC,OAAO,EAOL,KAAK,SAAS,EACd,KAAK,SAAS,EACf,MAAM,cAAc,CAAA;AAKrB,OAAO,EAGL,KAAK,uBAAuB,EAC5B,KAAK,qBAAqB,EAC3B,MAAM,oBAAoB,CAAA;AAE3B,YAAY,EAAC,qBAAqB,EAAC,MAAM,oBAAoB,CAAA;AAE7D,MAAM,MAAM,sBAAsB,GAAG;IACnC,UAAU,EAAE,MAAM,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+bD,wBAAgB,aAAa,CAAC,EAC5B,UAAU,EACV,MAAM,EACN,KAAK,GACN,EAAE;IACD,UAAU,EAAE,uBAAuB,CAAC,OAAO,CAAC,CAAC,YAAY,CAAC,CAAA;IAC1D,MAAM,EAAE,sBAAsB,CAAA;IAC9B,KAAK,EAAE,MAAM,CAAA;CACd,4BA4BA"}
@@ -0,0 +1,322 @@
1
+ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
2
+ /* eslint-disable react-native/no-raw-text -- BodyText and PercentText are local Text wrappers. */
3
+ import { useMemo } from "react";
4
+ import { ActivityIndicator, Pressable, ScrollView, StyleSheet, Text, View, } from "react-native";
5
+ import { useMarkdown } from "react-native-marked";
6
+ import { SafeAreaView } from "react-native-safe-area-context";
7
+ import Svg, { Path, Rect } from "react-native-svg";
8
+ import { MINIMUM_OTA_BATTERY_LEVEL, useMentraLiveOta, } from "./useMentraLiveOta";
9
+ const DEFAULT_THEME = {
10
+ background: "#FFFFFF",
11
+ border: "#D7DFDA",
12
+ error: "#C43131",
13
+ foreground: "#0E2C1A",
14
+ primary: "#00B869",
15
+ primaryText: "#FFFFFF",
16
+ textDim: "#66736B",
17
+ };
18
+ const ENGLISH_COPY = {
19
+ "common:continue": "Continue",
20
+ "common:done": "Done",
21
+ "ota:checkingForUpdates": "Checking for updates",
22
+ "ota:checkingForUpdatesMessage": "Connected devices will perform automatic updates. Automatic updates can be disabled in Device Settings",
23
+ "ota:finishingUpdate": "Finishing your update",
24
+ "ota:checkingAdditionalUpdates": "Checking whether your glasses need any additional updates.",
25
+ "ota:updateAvailable": "{{deviceName}} Update Available",
26
+ "ota:batteryRequiredTitle": "Charge {{deviceName}} to Update",
27
+ "ota:batteryRequiredMessage": "{{deviceName}} is currently at {{batteryLevel}}%. Charge it to at least {{minimumBatteryLevel}}% before updating.",
28
+ "ota:batteryRequiredLiveUpdate": "This screen will update automatically as the battery charges.",
29
+ "ota:updateConnectWifi": "Connect your {{deviceName}} to WiFi to install the update.",
30
+ "ota:wifiRequiredTitle": "WiFi Needed for Update",
31
+ "ota:updateDescription": "A new update is available for your glasses. We recommend updating now for the best experience.",
32
+ "ota:updateSequenceMessage": "Your glasses may install more than one update and restart several times. Keep them nearby until finished.",
33
+ "ota:releaseTransition": "{{fromVersion}} → {{toVersion}}",
34
+ "ota:releaseTransitionUnknown": "Current version unknown → {{toVersion}}",
35
+ "ota:updatedToVersion": "Updated to {{version}}",
36
+ "ota:downgradeAvailable": "{{deviceName}} Version Change Required",
37
+ "ota:downgradeDescription": "This app requires an earlier glasses software version. Your photos and videos will be preserved, but glasses settings will be reset and restored automatically after the change.",
38
+ "ota:updateNow": "Update Now",
39
+ "ota:setupWifi": "Setup WiFi",
40
+ "ota:updateLater": "Later",
41
+ "ota:updateComplete": "Update complete",
42
+ "ota:whatsNew": "What's new",
43
+ "ota:upToDate": "Up To Date",
44
+ "ota:devBuild": "Development Build",
45
+ "ota:devBuildNoOta": "This mobile app is a development build, so automatic glasses updates are disabled. Use the developer settings manifest override to update them manually.",
46
+ "ota:noUpdatesAvailable": "Your glasses are running the latest version.",
47
+ "ota:checkFailed": "Check Failed",
48
+ "ota:checkFailedMessage": "Couldn't check for updates. Please check your connection and try again.",
49
+ "ota:updateInfoUnavailable": "Update Info Unavailable",
50
+ "ota:updateInfoUnavailableMessage": "Update information for this version of the app is unavailable. Please check the app store for a newer version of the Glassly App.",
51
+ "ota:downgradeDuration": "Your glasses will restart twice — this may take up to 2 minutes.",
52
+ "ota:versionChangeRestarting": "Installing a different version…",
53
+ "ota:versionChangeVerifying": "Verifying your glasses…",
54
+ "ota:versionChangeKeepNearby": "Keep your glasses nearby and connected. They will restart on their own.",
55
+ "ota:restartingGlasses": "Restarting {{deviceName}}…",
56
+ "ota:restartingGlassesMessage": "The update is installed. Keep your glasses nearby and leave this screen open while they finish starting.",
57
+ "ota:restartingGlassesAutomatic": "We'll continue automatically when they're ready.",
58
+ "ota:versionChangeComplete": "Version Change Complete",
59
+ "ota:versionChangeCompleteMessage": "Your glasses are now on the required version. Their settings were reset and are being restored automatically.",
60
+ "ota:versionChangeFirmwarePassComplete": "Firmware updated",
61
+ "ota:versionChangeFirmwarePassCompleteMessage": "Your glasses restarted with new firmware. One more step: they'll now continue to the required version.",
62
+ };
63
+ function defaultTranslate(key, options) {
64
+ let value = ENGLISH_COPY[key] ?? key;
65
+ for (const [name, replacement] of Object.entries(options ?? {})) {
66
+ value = value.replaceAll(`{{${name}}}`, replacement);
67
+ }
68
+ return value;
69
+ }
70
+ export function MentraLiveOtaFlow({ allowDevSkip = typeof __DEV__ !== "undefined" && __DEV__, deviceName = "Mentra Live", initialPage = "check", initializeRuntime = true, onFinished, onFirmwareRestartingChange, onOpenWifiSetup, style, superMode = false, theme, translate = defaultTranslate, }) {
71
+ const colors = useMemo(() => ({ ...DEFAULT_THEME, ...theme }), [theme]);
72
+ const controller = useMentraLiveOta({
73
+ initialPage,
74
+ initializeRuntime,
75
+ onFinished,
76
+ onFirmwareRestartingChange,
77
+ onOpenWifiSetup,
78
+ });
79
+ return (_jsxs(SafeAreaView, { style: [styles.safeArea, { backgroundColor: colors.background }, style], children: [_jsxs(View, { style: styles.header, children: [_jsx(View, {}), _jsx(GlasslyMark, { color: colors.primary })] }), _jsx(OtaFlowContent, { allowDevSkip: allowDevSkip, colors: colors, controller: controller, deviceName: deviceName, superMode: superMode, translate: translate })] }));
80
+ }
81
+ function OtaFlowContent({ allowDevSkip, colors, controller, deviceName, superMode, translate, }) {
82
+ const { state } = controller;
83
+ if (state.screen === "initializing") {
84
+ return (_jsx(FlowPage, { colors: colors, icon: "download", title: translate("ota:checkingForUpdates"), children: _jsx(ActivityIndicator, { size: "large", color: colors.foreground }) }));
85
+ }
86
+ if (state.screen === "checking") {
87
+ return (_jsxs(FlowPage, { colors: colors, icon: "download", title: translate("ota:checkingForUpdates"), children: [_jsx(BodyText, { colors: colors, children: translate("ota:checkingForUpdatesMessage") }), _jsx(ActivityIndicator, { size: "large", color: colors.foreground })] }));
88
+ }
89
+ if (state.screen === "battery_required") {
90
+ return (_jsxs(FlowPage, { actions: _jsxs(_Fragment, { children: [_jsx(FlowButton, { colors: colors, disabled: true, label: translate("ota:updateNow"), onPress: controller.install }), state.canDismiss ? (_jsx(FlowButton, { colors: colors, label: translate("ota:updateLater"), onPress: controller.finish, secondary: true })) : null] }), colors: colors, icon: "alert", title: translate("ota:batteryRequiredTitle", { deviceName }), children: [_jsx(BodyText, { colors: colors, children: translate("ota:batteryRequiredMessage", {
91
+ batteryLevel: String(state.batteryLevel),
92
+ deviceName,
93
+ minimumBatteryLevel: String(MINIMUM_OTA_BATTERY_LEVEL),
94
+ }) }), _jsx(BodyText, { colors: colors, children: translate("ota:batteryRequiredLiveUpdate") })] }));
95
+ }
96
+ if (state.screen === "finishing") {
97
+ return (_jsxs(FlowPage, { colors: colors, icon: "download", title: translate("ota:finishingUpdate"), children: [_jsx(BodyText, { colors: colors, children: translate("ota:checkingAdditionalUpdates") }), _jsx(ActivityIndicator, { size: "large", color: colors.foreground })] }));
98
+ }
99
+ if (state.screen === "update_available" || state.screen === "wifi_required") {
100
+ const titleKey = state.screen === "wifi_required"
101
+ ? "ota:wifiRequiredTitle"
102
+ : state.versionChange
103
+ ? "ota:downgradeAvailable"
104
+ : "ota:updateAvailable";
105
+ return (_jsxs(FlowPage, { colors: colors, icon: "download", title: translate(titleKey, { deviceName }), actions: _jsxs(_Fragment, { children: [_jsx(FlowButton, { colors: colors, disabled: !state.wifiStatusKnown, label: translate(state.screen === "wifi_required" ? "ota:setupWifi" : "ota:updateNow"), onPress: state.screen === "wifi_required" ? controller.openWifiSetup : controller.install }), state.canDismiss ? (_jsx(FlowButton, { colors: colors, label: translate("ota:updateLater"), onPress: controller.finish, secondary: true })) : null, allowDevSkip && state.updateRequired ? (_jsx(FlowButton, { colors: colors, label: "Skip (dev only)", onPress: controller.finish, secondary: true })) : null] }), children: [state.releaseTransition ? (_jsx(BodyText, { colors: colors, children: state.releaseTransition.fromVersion
106
+ ? translate("ota:releaseTransition", {
107
+ fromVersion: state.releaseTransition.fromVersion,
108
+ toVersion: state.releaseTransition.toVersion,
109
+ })
110
+ : translate("ota:releaseTransitionUnknown", { toVersion: state.releaseTransition.toVersion }) })) : null, _jsx(BodyText, { colors: colors, children: state.screen === "wifi_required"
111
+ ? translate("ota:updateConnectWifi", { deviceName })
112
+ : translate(state.versionChange ? "ota:downgradeDescription" : "ota:updateDescription") }), _jsx(BodyText, { colors: colors, children: translate("ota:updateSequenceMessage") })] }));
113
+ }
114
+ if (state.screen === "dev_build") {
115
+ return (_jsx(FlowPage, { actions: _jsx(FlowButton, { colors: colors, label: translate("common:continue"), onPress: controller.finish }), colors: colors, icon: "settings", title: translate("ota:devBuild"), children: _jsx(BodyText, { colors: colors, children: translate("ota:devBuildNoOta") }) }));
116
+ }
117
+ if (state.screen === "up_to_date") {
118
+ return (_jsxs(FlowPage, { actions: _jsx(FlowButton, { colors: colors, label: translate(state.completedUpdate ? "common:done" : "common:continue"), onPress: controller.finish }), colors: colors, contentAlignment: state.changelogs.length > 0 ? "top" : "center", icon: "check", title: translate(state.completedUpdate ? "ota:updateComplete" : "ota:upToDate"), children: [_jsx(BodyText, { colors: colors, children: translate("ota:noUpdatesAvailable") }), state.releaseTransition ? (_jsx(BodyText, { colors: colors, children: translate("ota:updatedToVersion", { version: state.releaseTransition.toVersion }) })) : null, _jsx(ChangelogList, { changelogs: state.changelogs, colors: colors, title: translate("ota:whatsNew") })] }));
119
+ }
120
+ if (state.screen === "update_info_unavailable") {
121
+ return (_jsx(FlowPage, { actions: _jsx(FlowButton, { colors: colors, label: translate("common:continue"), onPress: controller.finish }), colors: colors, icon: "alert", title: translate("ota:updateInfoUnavailable"), children: _jsx(BodyText, { colors: colors, children: translate("ota:updateInfoUnavailableMessage") }) }));
122
+ }
123
+ if (state.screen === "check_failed") {
124
+ return (_jsx(FlowPage, { actions: _jsxs(_Fragment, { children: [_jsx(FlowButton, { colors: colors, label: "Retry", onPress: controller.retryCheck }), allowDevSkip ? (_jsx(FlowButton, { colors: colors, label: "Skip (dev only)", onPress: controller.finish, secondary: true })) : null] }), colors: colors, icon: "alert", title: translate("ota:checkFailed"), children: _jsx(BodyText, { colors: colors, children: translate("ota:checkFailedMessage") }) }));
125
+ }
126
+ if (state.versionChangePhase === "restarting" || state.versionChangePhase === "verifying") {
127
+ return (_jsxs(FlowPage, { colors: colors, icon: "download", title: translate(state.versionChangePhase === "verifying" ? "ota:versionChangeVerifying" : "ota:versionChangeRestarting"), children: [_jsx(ActivityIndicator, { size: "large", color: colors.foreground }), _jsx(BodyText, { colors: colors, children: translate("ota:versionChangeKeepNearby") }), _jsx(BodyText, { colors: colors, children: translate("ota:downgradeDuration") })] }));
128
+ }
129
+ if (state.screen === "starting" || state.screen === "preparing_hotspot") {
130
+ const title = state.hotspotPhase === "downloading"
131
+ ? "Downloading update to phone..."
132
+ : state.hotspotPhase === "starting_hotspot"
133
+ ? "Starting glasses hotspot..."
134
+ : state.hotspotPhase === "joining_hotspot"
135
+ ? "Connecting phone to glasses..."
136
+ : "Starting update...";
137
+ return (_jsxs(FlowPage, { colors: colors, icon: "download", title: title, children: [state.hotspotPhase === "downloading" && state.hotspotArtifactPercent !== null ? (_jsx(PercentText, { colors: colors, percent: state.hotspotArtifactPercent })) : null, _jsx(ActivityIndicator, { size: "large", color: colors.foreground }), _jsx(BodyText, { colors: colors, children: "Do not disconnect your glasses" })] }));
138
+ }
139
+ if (state.screen === "updating") {
140
+ return (_jsxs(FlowPage, { colors: colors, icon: "download", title: state.phase === "download" ? "Downloading..." : "Installing...", children: [state.installingApkOnly ? (_jsx(ActivityIndicator, { size: "large", color: colors.foreground })) : (_jsxs(_Fragment, { children: [_jsx(PercentText, { colors: colors, percent: state.progress ?? 0 }), _jsx(View, { style: [styles.progressTrack, { backgroundColor: colors.border }], children: _jsx(View, { style: [styles.progressFill, { backgroundColor: colors.primary, width: `${state.progress ?? 0}%` }] }) })] })), _jsx(BodyText, { colors: colors, children: "Do not disconnect your glasses" }), state.versionChange && state.phase === "install" ? (_jsx(BodyText, { colors: colors, children: translate("ota:downgradeDuration") })) : null] }));
141
+ }
142
+ if (state.screen === "restarting") {
143
+ return (_jsxs(FlowPage, { colors: colors, icon: "download", title: translate("ota:restartingGlasses", { deviceName }), children: [_jsx(ActivityIndicator, { size: "large", color: colors.foreground }), _jsx(BodyText, { colors: colors, children: translate("ota:restartingGlassesMessage") }), _jsx(BodyText, { colors: colors, children: translate("ota:restartingGlassesAutomatic") })] }));
144
+ }
145
+ if (state.screen === "complete") {
146
+ const title = state.versionChangeConverged
147
+ ? translate("ota:versionChangeComplete")
148
+ : state.versionChange
149
+ ? translate("ota:versionChangeFirmwarePassComplete")
150
+ : "Update complete!";
151
+ const message = state.versionChangeConverged
152
+ ? translate("ota:versionChangeCompleteMessage")
153
+ : state.versionChange
154
+ ? translate("ota:versionChangeFirmwarePassCompleteMessage")
155
+ : "Your glasses are up to date.";
156
+ return (_jsxs(FlowPage, { actions: _jsx(FlowButton, { colors: colors, label: state.versionChange && !state.versionChangeConverged ? "Continue" : "Done", onPress: controller.finish }), colors: colors, contentAlignment: state.changelogs.length > 0 ? "top" : "center", icon: "check", title: title, children: [_jsx(BodyText, { colors: colors, children: message }), state.releaseTransition ? (_jsx(BodyText, { colors: colors, children: translate("ota:updatedToVersion", { version: state.releaseTransition.toVersion }) })) : null, _jsx(ChangelogList, { changelogs: state.changelogs, colors: colors, title: translate("ota:whatsNew") })] }));
157
+ }
158
+ if (state.screen === "failed") {
159
+ return (_jsx(FlowPage, { actions: _jsxs(_Fragment, { children: [_jsx(FlowButton, { colors: colors, label: state.canRetry ? "Retry" : "Done", onPress: state.canRetry ? controller.retryInstall : controller.finish }), state.canOpenWifiSetup ? (_jsx(FlowButton, { colors: colors, label: "Change WiFi", onPress: controller.openWifiSetup, secondary: true })) : null] }), colors: colors, icon: "alert", title: "Update Failed", children: _jsx(BodyText, { colors: colors, children: state.error?.message }) }));
160
+ }
161
+ return (_jsxs(FlowPage, { actions: superMode ? (_jsx(FlowButton, { colors: colors, label: "Skip (super)", onPress: controller.discard, secondary: true })) : undefined, colors: colors, icon: "bluetooth", title: "Glasses disconnected", children: [_jsx(BodyText, { colors: colors, children: "Reconnecting..." }), _jsx(ActivityIndicator, { size: "large", color: colors.foreground })] }));
162
+ }
163
+ function FlowPage({ actions, children, colors, contentAlignment = "center", icon, title }) {
164
+ return (_jsxs(View, { style: styles.page, testID: "mentra-live-ota-flow", children: [_jsxs(View, { style: [styles.centerContent, contentAlignment === "top" && styles.topContent], children: [_jsx(FlowIcon, { colors: colors, name: icon }), _jsx(Text, { style: [styles.title, { color: colors.foreground }], children: title }), children] }), actions ? _jsx(View, { style: styles.actions, children: actions }) : _jsx(View, { style: styles.actionSpacer })] }));
165
+ }
166
+ function BodyText({ children, colors }) {
167
+ return _jsx(Text, { style: [styles.body, { color: colors.textDim }], children: children });
168
+ }
169
+ function PercentText({ colors, percent }) {
170
+ return _jsxs(Text, { style: [styles.percent, { color: colors.primary }], children: [Math.round(percent), "%"] });
171
+ }
172
+ function ChangelogMarkdown({ colors, markdown }) {
173
+ const markdownStyles = useMemo(() => ({
174
+ blockquote: {
175
+ borderLeftColor: colors.primary,
176
+ borderLeftWidth: 3,
177
+ marginVertical: 2,
178
+ opacity: 1,
179
+ paddingLeft: 12,
180
+ },
181
+ code: {
182
+ backgroundColor: colors.background,
183
+ borderColor: colors.border,
184
+ borderRadius: 8,
185
+ borderWidth: 1,
186
+ padding: 12,
187
+ },
188
+ codespan: {
189
+ backgroundColor: colors.border,
190
+ color: colors.foreground,
191
+ fontFamily: "monospace",
192
+ fontSize: 13,
193
+ fontStyle: "normal",
194
+ fontWeight: "400",
195
+ },
196
+ em: { color: colors.textDim, fontSize: 14, lineHeight: 20 },
197
+ h1: {
198
+ borderBottomWidth: 0,
199
+ color: colors.foreground,
200
+ fontSize: 18,
201
+ fontWeight: "700",
202
+ lineHeight: 24,
203
+ marginVertical: 0,
204
+ paddingBottom: 0,
205
+ },
206
+ h2: {
207
+ borderBottomWidth: 0,
208
+ color: colors.foreground,
209
+ fontSize: 17,
210
+ fontWeight: "700",
211
+ lineHeight: 23,
212
+ marginVertical: 0,
213
+ paddingBottom: 0,
214
+ },
215
+ h3: { color: colors.foreground, fontSize: 16, fontWeight: "700", lineHeight: 22, marginVertical: 0 },
216
+ h4: { color: colors.foreground, fontSize: 15, fontWeight: "700", lineHeight: 21, marginVertical: 0 },
217
+ h5: { color: colors.foreground, fontSize: 14, fontWeight: "700", lineHeight: 20, marginVertical: 0 },
218
+ h6: { color: colors.textDim, fontSize: 14, fontWeight: "600", lineHeight: 20, marginVertical: 0 },
219
+ hr: { borderBottomColor: colors.border, marginVertical: 2 },
220
+ image: { borderRadius: 8 },
221
+ li: { color: colors.textDim, fontSize: 14, lineHeight: 20 },
222
+ link: {
223
+ color: colors.primary,
224
+ fontSize: 14,
225
+ fontStyle: "normal",
226
+ lineHeight: 20,
227
+ textDecorationLine: "underline",
228
+ },
229
+ paragraph: { paddingVertical: 0 },
230
+ strikethrough: { color: colors.textDim, fontSize: 14, lineHeight: 20 },
231
+ strong: { color: colors.foreground, fontSize: 14, fontWeight: "700", lineHeight: 20 },
232
+ table: { borderColor: colors.border, borderRadius: 8 },
233
+ tableCell: { padding: 8 },
234
+ text: { color: colors.textDim, fontSize: 14, lineHeight: 20 },
235
+ }), [colors]);
236
+ const markdownTheme = useMemo(() => ({
237
+ colors: {
238
+ background: colors.background,
239
+ border: colors.border,
240
+ code: colors.border,
241
+ link: colors.primary,
242
+ text: colors.textDim,
243
+ },
244
+ }), [colors]);
245
+ const elements = useMarkdown(markdown, { colorScheme: "light", styles: markdownStyles, theme: markdownTheme });
246
+ return (_jsx(View, { style: styles.changelogMarkdownContent, testID: "ota-changelog-markdown", children: elements }));
247
+ }
248
+ export function ChangelogList({ changelogs, colors, title, }) {
249
+ if (changelogs.length === 0)
250
+ return null;
251
+ return (_jsxs(View, { style: [styles.changelogCard, { borderColor: colors.border }], testID: "ota-changelog-card", children: [_jsx(Text, { style: [styles.changelogTitle, { color: colors.foreground }], children: title }), _jsx(ScrollView, { contentContainerStyle: styles.changelogContent, nestedScrollEnabled: true, showsVerticalScrollIndicator: true, style: styles.changelogList, testID: "ota-changelog-scroll", children: changelogs.map((entry, index) => (_jsxs(View, { style: [
252
+ styles.changelogEntry,
253
+ index > 0 && styles.changelogEntryDivider,
254
+ index > 0 && { borderTopColor: colors.border },
255
+ ], children: [_jsx(Text, { selectable: true, style: [styles.changelogVersion, { color: colors.foreground }], children: entry.version }), _jsx(ChangelogMarkdown, { colors: colors, markdown: entry.markdown })] }, entry.version))) })] }));
256
+ }
257
+ function FlowButton({ colors, disabled = false, label, onPress, secondary = false, }) {
258
+ return (_jsx(Pressable, { accessibilityRole: "button", disabled: disabled, onPress: onPress, style: ({ pressed }) => [
259
+ styles.button,
260
+ {
261
+ backgroundColor: secondary ? colors.background : colors.foreground,
262
+ borderColor: secondary ? colors.border : colors.foreground,
263
+ opacity: disabled ? 0.45 : pressed ? 0.75 : 1,
264
+ },
265
+ ], testID: `button-${label}`, children: _jsx(Text, { style: [styles.buttonText, { color: secondary ? colors.foreground : colors.background }], children: label }) }));
266
+ }
267
+ function GlasslyMark({ color }) {
268
+ return (_jsxs(Svg, { width: 33, height: 18, viewBox: "0 0 50 27", fill: "none", children: [_jsx(Rect, { y: 14.8072, width: 11.8457, height: 11.8457, fill: color }), _jsx(Path, { d: "M9.36639 0L30.7163 14.8072V26.6529L9.36639 11.8457V0Z", fill: color }), _jsx(Path, { d: "M28.6501 0L50 14.8072V26.6529L28.6501 11.8457V0Z", fill: color })] }));
269
+ }
270
+ function FlowIcon({ colors, name }) {
271
+ const color = name === "alert" || name === "bluetooth" ? colors.error : colors.primary;
272
+ const glyph = name === "check" ? "✓" : name === "alert" ? "!" : name === "settings" ? "⚙" : name === "bluetooth" ? "⌁" : "↓";
273
+ return _jsx(Text, { style: [styles.icon, { color }], children: glyph });
274
+ }
275
+ const styles = StyleSheet.create({
276
+ safeArea: { flex: 1 },
277
+ header: {
278
+ alignItems: "center",
279
+ flexDirection: "row",
280
+ height: 48,
281
+ justifyContent: "space-between",
282
+ paddingHorizontal: 20,
283
+ },
284
+ page: { flex: 1, paddingBottom: 24, paddingHorizontal: 24 },
285
+ centerContent: { alignItems: "center", flex: 1, gap: 16, justifyContent: "center" },
286
+ topContent: { justifyContent: "flex-start", paddingTop: 12 },
287
+ actionSpacer: { height: 48 },
288
+ actions: { gap: 12 },
289
+ icon: { fontSize: 64, fontWeight: "500", lineHeight: 72, textAlign: "center" },
290
+ title: { fontSize: 20, fontWeight: "600", textAlign: "center" },
291
+ body: { fontSize: 14, lineHeight: 20, maxWidth: 420, textAlign: "center" },
292
+ percent: { fontSize: 30, fontVariant: ["tabular-nums"], fontWeight: "700" },
293
+ progressTrack: { borderRadius: 4, height: 8, maxWidth: 420, overflow: "hidden", width: "100%" },
294
+ progressFill: { borderRadius: 4, height: 8 },
295
+ changelogCard: {
296
+ borderRadius: 16,
297
+ borderWidth: 1,
298
+ flexShrink: 1,
299
+ gap: 12,
300
+ maxHeight: 300,
301
+ maxWidth: 420,
302
+ padding: 16,
303
+ width: "100%",
304
+ },
305
+ changelogTitle: { fontSize: 16, fontWeight: "700" },
306
+ changelogList: { flexShrink: 1, maxHeight: 232, width: "100%" },
307
+ changelogContent: { gap: 20, paddingBottom: 2 },
308
+ changelogEntry: { gap: 8 },
309
+ changelogEntryDivider: { borderTopWidth: StyleSheet.hairlineWidth, paddingTop: 20 },
310
+ changelogVersion: { fontSize: 14, fontWeight: "600" },
311
+ changelogMarkdownContent: { gap: 10 },
312
+ button: {
313
+ alignItems: "center",
314
+ borderRadius: 50,
315
+ borderWidth: 1,
316
+ justifyContent: "center",
317
+ minHeight: 44,
318
+ paddingHorizontal: 20,
319
+ },
320
+ buttonText: { fontSize: 14, fontWeight: "500" },
321
+ });
322
+ //# sourceMappingURL=MentraLiveOtaFlow.js.map