@mentra/engine 3.1.0-dev.28 → 3.1.0-dev.33

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/build/engine.d.ts CHANGED
@@ -144,6 +144,7 @@ export declare const engine: {
144
144
  install: (otaVersionUrl?: string | null) => Promise<import("@mentra/bluetooth-sdk").OtaStartAckEvent>;
145
145
  ping: () => Promise<void>;
146
146
  checkForUpdates: (options?: import(".").OtaCheckCurrentGlassesOptions) => Promise<import(".").OtaCheckCurrentGlassesResult>;
147
+ getReleaseChangelogs: (fromVersion?: string | null, toVersion?: string | null) => import("@mentra/bluetooth-sdk").ReleaseChangelog[];
147
148
  clearUpdateAvailable: () => void;
148
149
  clearProgress: () => void;
149
150
  replacePendingUpdateSequence: (updates: import("@mentra/bluetooth-sdk").OtaUpdateInfo["updates"]) => import("@mentra/bluetooth-sdk").OtaUpdateInfo | null;
@@ -1 +1 @@
1
- {"version":3,"file":"engine.d.ts","sourceRoot":"","sources":["../src/engine.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AACH,OAAO,EAAC,SAAS,EAAkD,aAAa,EAAC,MAAM,qBAAqB,CAAA;AAmC5G,eAAO,MAAM,MAAM;IACjB,2EAA2E;;IAE3E,8EAA8E;;IAE9E;iDAC6C;;IA0E7C;;yCAEqC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IA2BrC,mFAAmF;;;;;;;;IAEnF,sEAAsE;;;;;;;;;;;;IAEtE,qFAAqF;;;gBA7FlC,CAAC;mBAAiB,CAAC;;;gBAKhD,CAAC;mBAAiB,CAAC;;;;;;;;;;;;;;;;IA0FzC,qEAAqE;;;;IAErE,sFAAsF;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAEtF,6EAA6E;;;;;;;;;;;;IAE7E,iFAAiF;;;;;;;;;;;;;;;;;;;IAEjF,8CAA8C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAE9C,uDAAuD;;;;;;;;;;;;IAEvD,8EAA8E;;;;;;;IAE9E,qFAAqF;;;;;;;;;;;;;;CAGtF,CAAA"}
1
+ {"version":3,"file":"engine.d.ts","sourceRoot":"","sources":["../src/engine.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AACH,OAAO,EAAC,SAAS,EAAkD,aAAa,EAAC,MAAM,qBAAqB,CAAA;AAmC5G,eAAO,MAAM,MAAM;IACjB,2EAA2E;;IAE3E,8EAA8E;;IAE9E;iDAC6C;;IA0E7C;;yCAEqC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IA2BrC,mFAAmF;;;;;;;;IAEnF,sEAAsE;;;;;;;;;;;;IAEtE,qFAAqF;;;gBA7FlC,CAAC;mBAAiB,CAAC;;;gBAKhD,CAAC;mBAAiB,CAAC;;;;;;;;;;;;;;;;IA0FzC,qEAAqE;;;;IAErE,sFAAsF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAEtF,6EAA6E;;;;;;;;;;;;IAE7E,iFAAiF;;;;;;;;;;;;;;;;;;;IAEjF,8CAA8C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAE9C,uDAAuD;;;;;;;;;;;;IAEvD,8EAA8E;;;;;;;IAE9E,qFAAqF;;;;;;;;;;;;;;CAGtF,CAAA"}
@@ -1,9 +1,10 @@
1
- import type { OtaProgress, OtaProgressStatus, OtaStartAckEvent, OtaStatus, OtaUpdateInfo } from "@mentra/bluetooth-sdk";
1
+ import type { OtaProgress, OtaProgressStatus, OtaStartAckEvent, OtaStatus, OtaUpdateInfo, ReleaseChangelog } from "@mentra/bluetooth-sdk";
2
2
  import { type OtaInstallSnapshot } from "../services/OtaInstallCoordinator";
3
3
  import { type OtaCheckCurrentGlassesOptions, type OtaCheckCurrentGlassesResult } from "../services/OtaUpdateCheckService";
4
4
  declare function projectSnapshot(): {
5
5
  connected: boolean;
6
6
  buildNumber: string | null;
7
+ appVersion: string | null;
7
8
  mtkFirmwareVersion: string | null;
8
9
  besFirmwareVersion: string | null;
9
10
  hotspotOtaVersion: number;
@@ -17,7 +18,7 @@ declare function projectSnapshot(): {
17
18
  mtkUpdatedThisSession: boolean;
18
19
  };
19
20
  export type OtaSnapshot = ReturnType<typeof projectSnapshot>;
20
- export type { OtaProgress, OtaProgressStatus, OtaStatus, OtaUpdateInfo, OtaInstallSnapshot, OtaCheckCurrentGlassesOptions, OtaCheckCurrentGlassesResult, };
21
+ export type { OtaProgress, OtaProgressStatus, OtaStatus, OtaUpdateInfo, ReleaseChangelog, OtaInstallSnapshot, OtaCheckCurrentGlassesOptions, OtaCheckCurrentGlassesResult, };
21
22
  export declare const ota: {
22
23
  /**
23
24
  * Start the device-status and OTA projections without starting the authenticated
@@ -39,6 +40,8 @@ export declare const ota: {
39
40
  ping: () => Promise<void>;
40
41
  /** Resolve and compare the current glasses against the OTA manifest, then update the OTA snapshot. */
41
42
  checkForUpdates: (options?: OtaCheckCurrentGlassesOptions) => Promise<OtaCheckCurrentGlassesResult>;
43
+ /** Return bundled release changelogs crossed between two coordinated product versions, newest first. */
44
+ getReleaseChangelogs: (fromVersion?: string | null, toVersion?: string | null) => ReleaseChangelog[];
42
45
  /** Clear the available-update prompt state. */
43
46
  clearUpdateAvailable: () => void;
44
47
  /** Clear active progress/status before entering a fresh install flow. */
@@ -1 +1 @@
1
- {"version":3,"file":"ota.d.ts","sourceRoot":"","sources":["../../src/facades/ota.ts"],"names":[],"mappings":"AAWA,OAAO,KAAK,EAAC,WAAW,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,SAAS,EAAE,aAAa,EAAC,MAAM,uBAAuB,CAAA;AAGrH,OAAO,EAAwB,KAAK,kBAAkB,EAAC,MAAM,mCAAmC,CAAA;AAGhG,OAAO,EAEL,KAAK,6BAA6B,EAClC,KAAK,4BAA4B,EAClC,MAAM,mCAAmC,CAAA;AAE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AAa,GAAG,IAAI;IACzC,iFAAiF;kBACrE,SAAS,GAAG,IAAI;IAC5B,iEAAiE;oBACnD,WAAW;IAEzB,iGAAiG;4BACzE,CAAC,IAAI,EAAE,aAAa,GAAG,IAAI,KAAK,IAAI,KAAG,CAAC,MAAM,IAAI,CAAC;IAU3E,uEAAuE;mBACxD,CAAC,MAAM,EAAE,SAAS,GAAG,IAAI,KAAK,IAAI,KAAG,CAAC,MAAM,IAAI,CAAC;IAUhE,iEAAiE;qBAChD,CAAC,QAAQ,EAAE,WAAW,KAAK,IAAI,KAAG,CAAC,MAAM,IAAI,CAAC;CAUhE,CAAA"}
@@ -20,6 +20,7 @@ function projectSnapshot() {
20
20
  return {
21
21
  connected: isGlassesConnected(s.connection),
22
22
  buildNumber: s.buildNumber || null,
23
+ appVersion: s.appVersion || null,
23
24
  mtkFirmwareVersion: s.mtkFirmwareVersion || null,
24
25
  besFirmwareVersion: s.besFirmwareVersion || null,
25
26
  hotspotOtaVersion: s.hotspotOtaVersion ?? 0,
@@ -66,6 +67,8 @@ export const ota = {
66
67
  ping: () => BluetoothSdk.ping(),
67
68
  /** Resolve and compare the current glasses against the OTA manifest, then update the OTA snapshot. */
68
69
  checkForUpdates: (options) => checkCurrentGlassesForUpdate(options),
70
+ /** Return bundled release changelogs crossed between two coordinated product versions, newest first. */
71
+ getReleaseChangelogs: (fromVersion, toVersion) => BluetoothSdk.getReleaseChangelogs(fromVersion, toVersion),
69
72
  /** Clear the available-update prompt state. */
70
73
  clearUpdateAvailable: () => useGlassesStore.getState().setOtaUpdateAvailable(null),
71
74
  /** Clear active progress/status before entering a fresh install flow. */
@@ -1 +1 @@
1
- {"version":3,"file":"ota.js","sourceRoot":"","sources":["../../src/facades/ota.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AACH,OAAO,YAAY,MAAM,uBAAuB,CAAA;AAEhD,OAAO,EAAC,kBAAkB,EAAE,eAAe,EAAC,MAAM,mBAAmB,CAAA;AACrE,OAAO,EAAC,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,GAAG,eAAe,CAAC,QAAQ,EAAE,CAAC,kBAAkB,CAAA;YAC1D,IAAI,IAAI,KAAK,IAAI;gBAAE,OAAM;YACzB,IAAI,GAAG,IAAI,CAAA;YACX,EAAE,CAAC,IAAI,CAAC,CAAA;QACV,CAAC,CAAC,CAAA;IACJ,CAAC;IAED,uEAAuE;IACvE,QAAQ,EAAE,CAAC,EAAsC,EAAgB,EAAE;QACjE,IAAI,IAAI,GAAG,eAAe,CAAC,QAAQ,EAAE,CAAC,SAAS,CAAA;QAC/C,OAAO,eAAe,CAAC,SAAS,CAAC,GAAG,EAAE;YACpC,MAAM,MAAM,GAAG,eAAe,CAAC,QAAQ,EAAE,CAAC,SAAS,CAAA;YACnD,IAAI,MAAM,KAAK,IAAI;gBAAE,OAAM;YAC3B,IAAI,GAAG,MAAM,CAAA;YACb,EAAE,CAAC,MAAM,CAAC,CAAA;QACZ,CAAC,CAAC,CAAA;IACJ,CAAC;IAED,iEAAiE;IACjE,UAAU,EAAE,CAAC,EAAmC,EAAgB,EAAE;QAChE,IAAI,IAAI,GAAG,IAAI,CAAC,SAAS,CAAC,eAAe,EAAE,CAAC,CAAA;QAC5C,OAAO,eAAe,CAAC,SAAS,CAAC,GAAG,EAAE;YACpC,MAAM,IAAI,GAAG,eAAe,EAAE,CAAA;YAC9B,MAAM,GAAG,GAAG,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,CAAA;YAChC,IAAI,GAAG,KAAK,IAAI;gBAAE,OAAM;YACxB,IAAI,GAAG,GAAG,CAAA;YACV,EAAE,CAAC,IAAI,CAAC,CAAA;QACV,CAAC,CAAC,CAAA;IACJ,CAAC;CACF,CAAA","sourcesContent":["/**\n * ota facade — `engine.ota`: the OEM-facing OTA read/observe surface. Engine's\n * OtaService projects the glasses' OTA BLE events into the engine store; this facade\n * exposes the snapshot + change subscriptions behind the shared OTA flow exported by\n * `@mentra/engine/ota`. Hosts retain only their surrounding navigation and theme/i18n adapters.\n *\n * Availability checks live in engine. Install orchestration lives in engine too:\n * `installSession` fronts the OtaInstallCoordinator state machine (WP 8B) — the host\n * progress screen is a pure renderer over its snapshot + attach/detach/retry/finish.\n */\nimport BluetoothSdk from \"@mentra/bluetooth-sdk\"\nimport type {OtaProgress, OtaProgressStatus, OtaStartAckEvent, OtaStatus, OtaUpdateInfo} from \"@mentra/bluetooth-sdk\"\nimport {isGlassesConnected, useGlassesStore} from \"../stores/glasses\"\nimport {resolveOtaManifestUrl} from \"../services/otaManifestUrl\"\nimport {otaInstallCoordinator, type OtaInstallSnapshot} from \"../services/OtaInstallCoordinator\"\nimport {startGlassesStatusProjection} from \"../services/GlassesStatusProjection\"\nimport {startOtaService} from \"../services/OtaService\"\nimport {\n checkCurrentGlassesForUpdate,\n type OtaCheckCurrentGlassesOptions,\n type OtaCheckCurrentGlassesResult,\n} from \"../services/OtaUpdateCheckService\"\n\nfunction projectSnapshot() {\n const s = useGlassesStore.getState()\n return {\n connected: isGlassesConnected(s.connection),\n buildNumber: s.buildNumber || null,\n mtkFirmwareVersion: s.mtkFirmwareVersion || null,\n besFirmwareVersion: s.besFirmwareVersion || null,\n hotspotOtaVersion: s.hotspotOtaVersion ?? 0,\n wifiConnected: s.wifi.state === \"connected\",\n wifiStatusKnown: s.wifiStatusKnown,\n manifestUrl: resolveOtaManifestUrl(s.otaVersionUrl, s.buildNumber),\n updateAvailable: s.otaUpdateAvailable,\n status: s.otaStatus,\n legacyProgress: s.otaProgress,\n inProgress: s.otaInProgress,\n mtkUpdatedThisSession: s.mtkUpdatedThisSession,\n }\n}\n\nexport type OtaSnapshot = ReturnType<typeof projectSnapshot>\nexport type {\n OtaProgress,\n OtaProgressStatus,\n OtaStatus,\n OtaUpdateInfo,\n OtaInstallSnapshot,\n OtaCheckCurrentGlassesOptions,\n OtaCheckCurrentGlassesResult,\n}\n\nexport const ota = {\n // --- actions ---\n /**\n * Start the device-status and OTA projections without starting the authenticated\n * cloud/miniapp runtime. This is the explicit entry point for Bluetooth-only hosts.\n * Idempotent and safe when the full engine runtime is already running.\n */\n initialize: async () => {\n const hydrated = startGlassesStatusProjection()\n startOtaService()\n await hydrated\n },\n /**\n * Start the firmware install with the resolved OTA manifest URL. Progress lands on\n * `status()`/`onStatus()`. (The host resolves the manifest URL — developer override,\n * host pin, or Engine release pin resolution stays with the OTA config; the stuck/retry watchdog is its own\n * resilience layer on top of this command.)\n */\n install: (otaVersionUrl?: string | null): Promise<OtaStartAckEvent> => BluetoothSdk.startOtaUpdate(otaVersionUrl),\n // Deferred: this facade entry was intended to become the engine-owned retry/check\n // action, but BluetoothSdk.checkForOtaUpdate() only returns a boolean. Exposing it\n // here would make callers think the rich otaUpdateAvailable read model is refreshed,\n // while the original view still depends on the host-side manifest compare to build\n // versionName/updates/totalSize. Keep that behavior unchanged until the whole rich\n // availability check moves into engine.\n // retry: () => BluetoothSdk.checkForOtaUpdate(),\n /**\n * Keep glasses awake while an OTA session is actively progressing.\n * @deprecated Legacy progress route (build < 37) only — removed with WP 8D.\n */\n ping: () => BluetoothSdk.ping(),\n /** Resolve and compare the current glasses against the OTA manifest, then update the OTA snapshot. */\n checkForUpdates: (options?: OtaCheckCurrentGlassesOptions) => checkCurrentGlassesForUpdate(options),\n /** Clear the available-update prompt state. */\n clearUpdateAvailable: () => useGlassesStore.getState().setOtaUpdateAvailable(null),\n /** Clear active progress/status before entering a fresh install flow. */\n clearProgress: () => {\n const store = useGlassesStore.getState()\n store.setOtaProgress(null)\n store.setOtaStatus(null)\n },\n /**\n * Replace the pending update sequence after an in-flow firmware revalidation.\n * Kept as a named OTA policy operation so host screens do not mutate the raw\n * glasses store.\n * @deprecated Legacy progress route (build < 37) only — removed with WP 8D.\n */\n replacePendingUpdateSequence: (updates: OtaUpdateInfo[\"updates\"]): OtaUpdateInfo | null => {\n const store = useGlassesStore.getState()\n const current = store.otaUpdateAvailable\n if (!current) return null\n const next = {...current, updates}\n store.setOtaUpdateAvailable(next)\n return next\n },\n /**\n * Clear stale build metadata before returning to the update-check screen.\n * This forces the next version_info event through both the native observable\n * store and the engine projection after an APK reboot.\n * @deprecated Legacy progress route (build < 37) only — removed with WP 8D.\n */\n clearBuildNumberForNextCheck: () => {\n useGlassesStore.getState().setGlassesInfo({buildNumber: \"\"})\n },\n /**\n * Mark MTK as already applied during this app session until the glasses reboot/disconnect.\n * @deprecated Legacy progress route (build < 37) only — removed with WP 8D.\n */\n markMtkUpdatedThisSession: (updated: boolean) => useGlassesStore.getState().setMtkUpdatedThisSession(updated),\n\n /**\n * The OTA install state machine (unified `ota_status` sessions, build >= 37).\n * The host progress screen attaches on mount, detaches on unmount, and renders\n * the snapshot; every watchdog/retry/reconnect rule lives in the coordinator.\n */\n installSession: {\n /** Select Wi-Fi or capability-gated hotspot transport for this checked manifest. */\n prepare: (result: OtaCheckCurrentGlassesResult) => otaInstallCoordinator.prepare(result),\n /** Bind the machine to the mounted progress screen. Idempotent per attach/detach cycle. */\n attach: () => otaInstallCoordinator.attach(),\n /** Unbind on unmount: clears all timers/listeners and resets session state. */\n detach: () => otaInstallCoordinator.detach(),\n /** Retry after a failure: clear state and re-send ota_start (if connected). */\n retry: () => otaInstallCoordinator.retry(),\n /** Terminal cleanup for Continue/Done, including hotspot route teardown. */\n finish: () => otaInstallCoordinator.finish(),\n /** Abandon an interrupted session: await finish() then drop the session's status/progress. */\n discard: () => otaInstallCoordinator.discard(),\n /** Current install read model (displayState/errorMsg/lockout + glasses OTA data). */\n snapshot: (): OtaInstallSnapshot => otaInstallCoordinator.snapshot(),\n /** Subscribe to install snapshot changes (deduped on projected JSON). Returns an unsubscribe. */\n onSnapshot: (cb: (snapshot: OtaInstallSnapshot) => void): (() => void) => otaInstallCoordinator.onSnapshot(cb),\n },\n\n /** Current available-update info (versionName/updates/totalSize), or null. */\n updateAvailable: (): OtaUpdateInfo | null => useGlassesStore.getState().otaUpdateAvailable,\n /** Current OTA install status (stepType/phase/percent/status/error), or null. */\n status: (): OtaStatus | null => useGlassesStore.getState().otaStatus,\n /** Current OTA read model for update prompt/progress screens. */\n snapshot: (): OtaSnapshot => projectSnapshot(),\n\n /** Subscribe to OTA availability changes (info or null when cleared). Returns an unsubscribe. */\n onUpdateAvailable: (cb: (info: OtaUpdateInfo | null) => void): (() => void) => {\n let last = useGlassesStore.getState().otaUpdateAvailable\n return useGlassesStore.subscribe(() => {\n const info = useGlassesStore.getState().otaUpdateAvailable\n if (info === last) return\n last = info\n cb(info)\n })\n },\n\n /** Subscribe to OTA install status changes. Returns an unsubscribe. */\n onStatus: (cb: (status: OtaStatus | null) => void): (() => void) => {\n let last = useGlassesStore.getState().otaStatus\n return useGlassesStore.subscribe(() => {\n const status = useGlassesStore.getState().otaStatus\n if (status === last) return\n last = status\n cb(status)\n })\n },\n\n /** Subscribe to OTA snapshot changes. Returns an unsubscribe. */\n onSnapshot: (cb: (snapshot: OtaSnapshot) => void): (() => void) => {\n let last = JSON.stringify(projectSnapshot())\n return useGlassesStore.subscribe(() => {\n const snap = projectSnapshot()\n const key = JSON.stringify(snap)\n if (key === last) return\n last = key\n cb(snap)\n })\n },\n}\n"]}
1
+ {"version":3,"file":"ota.js","sourceRoot":"","sources":["../../src/facades/ota.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AACH,OAAO,YAAY,MAAM,uBAAuB,CAAA;AAShD,OAAO,EAAC,kBAAkB,EAAE,eAAe,EAAC,MAAM,mBAAmB,CAAA;AACrE,OAAO,EAAC,qBAAqB,EAAC,MAAM,4BAA4B,CAAA;AAChE,OAAO,EAAC,qBAAqB,EAA0B,MAAM,mCAAmC,CAAA;AAChG,OAAO,EAAC,4BAA4B,EAAC,MAAM,qCAAqC,CAAA;AAChF,OAAO,EAAC,eAAe,EAAC,MAAM,wBAAwB,CAAA;AACtD,OAAO,EACL,4BAA4B,GAG7B,MAAM,mCAAmC,CAAA;AAE1C,SAAS,eAAe;IACtB,MAAM,CAAC,GAAG,eAAe,CAAC,QAAQ,EAAE,CAAA;IACpC,OAAO;QACL,SAAS,EAAE,kBAAkB,CAAC,CAAC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J,CAAC;IAED,uEAAuE;IACvE,QAAQ,EAAE,CAAC,EAAsC,EAAgB,EAAE;QACjE,IAAI,IAAI,GAAG,eAAe,CAAC,QAAQ,EAAE,CAAC,SAAS,CAAA;QAC/C,OAAO,eAAe,CAAC,SAAS,CAAC,GAAG,EAAE;YACpC,MAAM,MAAM,GAAG,eAAe,CAAC,QAAQ,EAAE,CAAC,SAAS,CAAA;YACnD,IAAI,MAAM,KAAK,IAAI;gBAAE,OAAM;YAC3B,IAAI,GAAG,MAAM,CAAA;YACb,EAAE,CAAC,MAAM,CAAC,CAAA;QACZ,CAAC,CAAC,CAAA;IACJ,CAAC;IAED,iEAAiE;IACjE,UAAU,EAAE,CAAC,EAAmC,EAAgB,EAAE;QAChE,IAAI,IAAI,GAAG,IAAI,CAAC,SAAS,CAAC,eAAe,EAAE,CAAC,CAAA;QAC5C,OAAO,eAAe,CAAC,SAAS,CAAC,GAAG,EAAE;YACpC,MAAM,IAAI,GAAG,eAAe,EAAE,CAAA;YAC9B,MAAM,GAAG,GAAG,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,CAAA;YAChC,IAAI,GAAG,KAAK,IAAI;gBAAE,OAAM;YACxB,IAAI,GAAG,GAAG,CAAA;YACV,EAAE,CAAC,IAAI,CAAC,CAAA;QACV,CAAC,CAAC,CAAA;IACJ,CAAC;CACF,CAAA","sourcesContent":["/**\n * ota facade — `engine.ota`: the OEM-facing OTA read/observe surface. Engine's\n * OtaService projects the glasses' OTA BLE events into the engine store; this facade\n * exposes the snapshot + change subscriptions behind the shared OTA flow exported by\n * `@mentra/engine/ota`. Hosts retain only their surrounding navigation and theme/i18n adapters.\n *\n * Availability checks live in engine. Install orchestration lives in engine too:\n * `installSession` fronts the OtaInstallCoordinator state machine (WP 8B) — the host\n * progress screen is a pure renderer over its snapshot + attach/detach/retry/finish.\n */\nimport BluetoothSdk from \"@mentra/bluetooth-sdk\"\nimport type {\n OtaProgress,\n OtaProgressStatus,\n OtaStartAckEvent,\n OtaStatus,\n OtaUpdateInfo,\n ReleaseChangelog,\n} from \"@mentra/bluetooth-sdk\"\nimport {isGlassesConnected, useGlassesStore} from \"../stores/glasses\"\nimport {resolveOtaManifestUrl} from \"../services/otaManifestUrl\"\nimport {otaInstallCoordinator, type OtaInstallSnapshot} from \"../services/OtaInstallCoordinator\"\nimport {startGlassesStatusProjection} from \"../services/GlassesStatusProjection\"\nimport {startOtaService} from \"../services/OtaService\"\nimport {\n checkCurrentGlassesForUpdate,\n type OtaCheckCurrentGlassesOptions,\n type OtaCheckCurrentGlassesResult,\n} from \"../services/OtaUpdateCheckService\"\n\nfunction projectSnapshot() {\n const s = useGlassesStore.getState()\n return {\n connected: isGlassesConnected(s.connection),\n buildNumber: s.buildNumber || null,\n appVersion: s.appVersion || null,\n mtkFirmwareVersion: s.mtkFirmwareVersion || null,\n besFirmwareVersion: s.besFirmwareVersion || null,\n hotspotOtaVersion: s.hotspotOtaVersion ?? 0,\n wifiConnected: s.wifi.state === \"connected\",\n wifiStatusKnown: s.wifiStatusKnown,\n manifestUrl: resolveOtaManifestUrl(s.otaVersionUrl, s.buildNumber),\n updateAvailable: s.otaUpdateAvailable,\n status: s.otaStatus,\n legacyProgress: s.otaProgress,\n inProgress: s.otaInProgress,\n mtkUpdatedThisSession: s.mtkUpdatedThisSession,\n }\n}\n\nexport type OtaSnapshot = ReturnType<typeof projectSnapshot>\nexport type {\n OtaProgress,\n OtaProgressStatus,\n OtaStatus,\n OtaUpdateInfo,\n ReleaseChangelog,\n OtaInstallSnapshot,\n OtaCheckCurrentGlassesOptions,\n OtaCheckCurrentGlassesResult,\n}\n\nexport const ota = {\n // --- actions ---\n /**\n * Start the device-status and OTA projections without starting the authenticated\n * cloud/miniapp runtime. This is the explicit entry point for Bluetooth-only hosts.\n * Idempotent and safe when the full engine runtime is already running.\n */\n initialize: async () => {\n const hydrated = startGlassesStatusProjection()\n startOtaService()\n await hydrated\n },\n /**\n * Start the firmware install with the resolved OTA manifest URL. Progress lands on\n * `status()`/`onStatus()`. (The host resolves the manifest URL — developer override,\n * host pin, or Engine release pin resolution stays with the OTA config; the stuck/retry watchdog is its own\n * resilience layer on top of this command.)\n */\n install: (otaVersionUrl?: string | null): Promise<OtaStartAckEvent> => BluetoothSdk.startOtaUpdate(otaVersionUrl),\n // Deferred: this facade entry was intended to become the engine-owned retry/check\n // action, but BluetoothSdk.checkForOtaUpdate() only returns a boolean. Exposing it\n // here would make callers think the rich otaUpdateAvailable read model is refreshed,\n // while the original view still depends on the host-side manifest compare to build\n // versionName/updates/totalSize. Keep that behavior unchanged until the whole rich\n // availability check moves into engine.\n // retry: () => BluetoothSdk.checkForOtaUpdate(),\n /**\n * Keep glasses awake while an OTA session is actively progressing.\n * @deprecated Legacy progress route (build < 37) only — removed with WP 8D.\n */\n ping: () => BluetoothSdk.ping(),\n /** Resolve and compare the current glasses against the OTA manifest, then update the OTA snapshot. */\n checkForUpdates: (options?: OtaCheckCurrentGlassesOptions) => checkCurrentGlassesForUpdate(options),\n /** Return bundled release changelogs crossed between two coordinated product versions, newest first. */\n getReleaseChangelogs: (fromVersion?: string | null, toVersion?: string | null): ReleaseChangelog[] =>\n BluetoothSdk.getReleaseChangelogs(fromVersion, toVersion),\n /** Clear the available-update prompt state. */\n clearUpdateAvailable: () => useGlassesStore.getState().setOtaUpdateAvailable(null),\n /** Clear active progress/status before entering a fresh install flow. */\n clearProgress: () => {\n const store = useGlassesStore.getState()\n store.setOtaProgress(null)\n store.setOtaStatus(null)\n },\n /**\n * Replace the pending update sequence after an in-flow firmware revalidation.\n * Kept as a named OTA policy operation so host screens do not mutate the raw\n * glasses store.\n * @deprecated Legacy progress route (build < 37) only — removed with WP 8D.\n */\n replacePendingUpdateSequence: (updates: OtaUpdateInfo[\"updates\"]): OtaUpdateInfo | null => {\n const store = useGlassesStore.getState()\n const current = store.otaUpdateAvailable\n if (!current) return null\n const next = {...current, updates}\n store.setOtaUpdateAvailable(next)\n return next\n },\n /**\n * Clear stale build metadata before returning to the update-check screen.\n * This forces the next version_info event through both the native observable\n * store and the engine projection after an APK reboot.\n * @deprecated Legacy progress route (build < 37) only — removed with WP 8D.\n */\n clearBuildNumberForNextCheck: () => {\n useGlassesStore.getState().setGlassesInfo({buildNumber: \"\"})\n },\n /**\n * Mark MTK as already applied during this app session until the glasses reboot/disconnect.\n * @deprecated Legacy progress route (build < 37) only — removed with WP 8D.\n */\n markMtkUpdatedThisSession: (updated: boolean) => useGlassesStore.getState().setMtkUpdatedThisSession(updated),\n\n /**\n * The OTA install state machine (unified `ota_status` sessions, build >= 37).\n * The host progress screen attaches on mount, detaches on unmount, and renders\n * the snapshot; every watchdog/retry/reconnect rule lives in the coordinator.\n */\n installSession: {\n /** Select Wi-Fi or capability-gated hotspot transport for this checked manifest. */\n prepare: (result: OtaCheckCurrentGlassesResult) => otaInstallCoordinator.prepare(result),\n /** Bind the machine to the mounted progress screen. Idempotent per attach/detach cycle. */\n attach: () => otaInstallCoordinator.attach(),\n /** Unbind on unmount: clears all timers/listeners and resets session state. */\n detach: () => otaInstallCoordinator.detach(),\n /** Retry after a failure: clear state and re-send ota_start (if connected). */\n retry: () => otaInstallCoordinator.retry(),\n /** Terminal cleanup for Continue/Done, including hotspot route teardown. */\n finish: () => otaInstallCoordinator.finish(),\n /** Abandon an interrupted session: await finish() then drop the session's status/progress. */\n discard: () => otaInstallCoordinator.discard(),\n /** Current install read model (displayState/errorMsg/lockout + glasses OTA data). */\n snapshot: (): OtaInstallSnapshot => otaInstallCoordinator.snapshot(),\n /** Subscribe to install snapshot changes (deduped on projected JSON). Returns an unsubscribe. */\n onSnapshot: (cb: (snapshot: OtaInstallSnapshot) => void): (() => void) => otaInstallCoordinator.onSnapshot(cb),\n },\n\n /** Current available-update info (versionName/updates/totalSize), or null. */\n updateAvailable: (): OtaUpdateInfo | null => useGlassesStore.getState().otaUpdateAvailable,\n /** Current OTA install status (stepType/phase/percent/status/error), or null. */\n status: (): OtaStatus | null => useGlassesStore.getState().otaStatus,\n /** Current OTA read model for update prompt/progress screens. */\n snapshot: (): OtaSnapshot => projectSnapshot(),\n\n /** Subscribe to OTA availability changes (info or null when cleared). Returns an unsubscribe. */\n onUpdateAvailable: (cb: (info: OtaUpdateInfo | null) => void): (() => void) => {\n let last = useGlassesStore.getState().otaUpdateAvailable\n return useGlassesStore.subscribe(() => {\n const info = useGlassesStore.getState().otaUpdateAvailable\n if (info === last) return\n last = info\n cb(info)\n })\n },\n\n /** Subscribe to OTA install status changes. Returns an unsubscribe. */\n onStatus: (cb: (status: OtaStatus | null) => void): (() => void) => {\n let last = useGlassesStore.getState().otaStatus\n return useGlassesStore.subscribe(() => {\n const status = useGlassesStore.getState().otaStatus\n if (status === last) return\n last = status\n cb(status)\n })\n },\n\n /** Subscribe to OTA snapshot changes. Returns an unsubscribe. */\n onSnapshot: (cb: (snapshot: OtaSnapshot) => void): (() => void) => {\n let last = JSON.stringify(projectSnapshot())\n return useGlassesStore.subscribe(() => {\n const snap = projectSnapshot()\n const key = JSON.stringify(snap)\n if (key === last) return\n last = key\n cb(snap)\n })\n },\n}\n"]}
@@ -1,10 +1,10 @@
1
1
  export const ENGINE_RELEASE_METADATA = Object.freeze({
2
2
  "schemaVersion": 1,
3
3
  "familyBaseVersion": "3.1.0",
4
- "releaseIdentity": "3.1.0-dev.28",
5
- "releaseSetId": "mentra-3.1.0-dev.28",
6
- "sourceCommit": "dd6c542fdd71a3484aae4ee620236c33ddc27788",
7
- "otaManifestUrl": "https://github.com/Mentra-Community/MentraOS/releases/download/mentra-v3.1.0-dev.28/mentra-live-ota-3.1.0-dev.28.json",
8
- "otaManifestSha256": "ea869252f5ed1ce809b51e8477a05c48859097a3542d22285165546e30f23e45"
4
+ "releaseIdentity": "3.1.0-dev.33",
5
+ "releaseSetId": "mentra-3.1.0-dev.33",
6
+ "sourceCommit": "b1b492d91b29548ebedb4d4b7e98faf4a02b2d36",
7
+ "otaManifestUrl": "https://github.com/Mentra-Community/MentraOS/releases/download/mentra-builds-v3.1.0/mentra-live-ota-3.1.0-dev.33.json",
8
+ "otaManifestSha256": "d1dbac07a41c51e52f56fef3f62aa6f62b46a23bfc1870cbf9a87b9b3eaa3e27"
9
9
  });
10
10
  //# sourceMappingURL=releaseMetadata.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"releaseMetadata.js","sourceRoot":"","sources":["../../src/generated/releaseMetadata.ts"],"names":[],"mappings":"AAWA,MAAM,CAAC,MAAM,uBAAuB,GAAoC,MAAM,CAAC,MAAM,CAAC;IACpF,eAAe,EAAE,CAAC;IAClB,mBAAmB,EAAE,OAAO;IAC5B,iBAAiB,EAAE,cAAc;IACjC,cAAc,EAAE,qBAAqB;IACrC,cAAc,EAAE,0CAA0C;IAC1D,gBAAgB,EAAE,uHAAuH;IACzI,mBAAmB,EAAE,kEAAkE;CACxF,CAAC,CAAA","sourcesContent":["/** Generated by release CI. Do not edit in a release checkout. */\nexport interface EngineReleaseMetadata {\n schemaVersion: 1\n familyBaseVersion: string | null\n releaseIdentity: string | null\n releaseSetId: string | null\n sourceCommit: string | null\n otaManifestUrl: string | null\n otaManifestSha256: string | null\n}\n\nexport const ENGINE_RELEASE_METADATA: Readonly<EngineReleaseMetadata> = Object.freeze({\n \"schemaVersion\": 1,\n \"familyBaseVersion\": \"3.1.0\",\n \"releaseIdentity\": \"3.1.0-dev.28\",\n \"releaseSetId\": \"mentra-3.1.0-dev.28\",\n \"sourceCommit\": \"dd6c542fdd71a3484aae4ee620236c33ddc27788\",\n \"otaManifestUrl\": \"https://github.com/Mentra-Community/MentraOS/releases/download/mentra-v3.1.0-dev.28/mentra-live-ota-3.1.0-dev.28.json\",\n \"otaManifestSha256\": \"ea869252f5ed1ce809b51e8477a05c48859097a3542d22285165546e30f23e45\"\n})\n"]}
1
+ {"version":3,"file":"releaseMetadata.js","sourceRoot":"","sources":["../../src/generated/releaseMetadata.ts"],"names":[],"mappings":"AAWA,MAAM,CAAC,MAAM,uBAAuB,GAAoC,MAAM,CAAC,MAAM,CAAC;IACpF,eAAe,EAAE,CAAC;IAClB,mBAAmB,EAAE,OAAO;IAC5B,iBAAiB,EAAE,cAAc;IACjC,cAAc,EAAE,qBAAqB;IACrC,cAAc,EAAE,0CAA0C;IAC1D,gBAAgB,EAAE,uHAAuH;IACzI,mBAAmB,EAAE,kEAAkE;CACxF,CAAC,CAAA","sourcesContent":["/** Generated by release CI. Do not edit in a release checkout. */\nexport interface EngineReleaseMetadata {\n schemaVersion: 1\n familyBaseVersion: string | null\n releaseIdentity: string | null\n releaseSetId: string | null\n sourceCommit: string | null\n otaManifestUrl: string | null\n otaManifestSha256: string | null\n}\n\nexport const ENGINE_RELEASE_METADATA: Readonly<EngineReleaseMetadata> = Object.freeze({\n \"schemaVersion\": 1,\n \"familyBaseVersion\": \"3.1.0\",\n \"releaseIdentity\": \"3.1.0-dev.33\",\n \"releaseSetId\": \"mentra-3.1.0-dev.33\",\n \"sourceCommit\": \"b1b492d91b29548ebedb4d4b7e98faf4a02b2d36\",\n \"otaManifestUrl\": \"https://github.com/Mentra-Community/MentraOS/releases/download/mentra-builds-v3.1.0/mentra-live-ota-3.1.0-dev.33.json\",\n \"otaManifestSha256\": \"d1dbac07a41c51e52f56fef3f62aa6f62b46a23bfc1870cbf9a87b9b3eaa3e27\"\n})\n"]}
package/build/index.d.ts CHANGED
@@ -26,7 +26,7 @@ export type { VersionInfo, MtkPatch, BesFirmware, VersionJson, OtaCheckResult, O
26
26
  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";
27
27
  export { deriveDisplayState } from "./services/otaDisplayState";
28
28
  export type { DisplayState } from "./services/otaDisplayState";
29
- export type { OtaProgress, OtaProgressStatus, OtaStatus, OtaUpdateInfo, OtaSnapshot, OtaInstallSnapshot, } from "./facades/ota";
29
+ export type { OtaProgress, OtaProgressStatus, OtaStatus, OtaUpdateInfo, ReleaseChangelog, OtaSnapshot, OtaInstallSnapshot, } from "./facades/ota";
30
30
  export { beginOtaAutoChain, clearOtaAutoChainReconnectWait, isOtaAutoChainActive, otaAutoChainFingerprint, otaAutoChainReconnectWaitRemaining, stopOtaAutoChain, tryAdvanceOtaAutoChain, MAX_OTA_AUTO_CHAIN_PASSES, OTA_AUTO_CHAIN_RECONNECT_TIMEOUT_MS, } from "./services/OtaAutoChain";
31
31
  export type { OtaAutoChainAdvanceResult } from "./services/OtaAutoChain";
32
32
  export { BES_INSTALL_RESTART_MESSAGE, getOtaErrorMessage, shouldRequireGlassesRebootForBesFailure, shouldShowChangeWifiForOtaDownloadFailure, } from "./services/OtaErrorMapping";
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAGH,OAAO,EAAC,MAAM,EAAC,MAAM,UAAU,CAAA;AAC/B,YAAY,EACV,qBAAqB,EACrB,aAAa,EACb,aAAa,EACb,YAAY,EACZ,aAAa,EACb,kBAAkB,EAClB,uBAAuB,GACxB,MAAM,mBAAmB,CAAA;AAC1B,YAAY,EAAC,kBAAkB,EAAE,sBAAsB,EAAC,MAAM,yBAAyB,CAAA;AACvF,YAAY,EAAC,gBAAgB,EAAC,MAAM,uBAAuB,CAAA;AAC3D,YAAY,EAAC,gBAAgB,EAAC,MAAM,4BAA4B,CAAA;AAChE,YAAY,EAAC,kBAAkB,EAAC,MAAM,yBAAyB,CAAA;AAC/D,YAAY,EACV,sBAAsB,EACtB,UAAU,EACV,kBAAkB,EAClB,eAAe,EACf,aAAa,EACb,aAAa,EACb,YAAY,EACZ,gBAAgB,GACjB,MAAM,qBAAqB,CAAA;AAO5B,OAAO,EAAC,QAAQ,EAAE,UAAU,EAAC,MAAM,mBAAmB,CAAA;AACtD,OA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AMnC,OAAO,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,SAAS,EACT,aAAa,GACd,MAAM,SAAS,CAAA","sourcesContent":["/**\n * `@mentra/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 MentraOS 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 {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\"\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 \"@mentra/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 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"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,2EAA2E;AAC3E,OAAO,EAAC,MAAM,EAAC,MAAM,UAAU,CAAA;AAyB/B,2EAA2E;AAC3E,6EAA6E;AAC7E,yEAAyE;AACzE,qEAAqE;AACrE,kDAAkD;AAClD,OAAO,EAAC,QAAQ,EAAE,UAAU,EAAC,MAAM,mBAAmB,CAAA;AACtD,OAAO,EAAC,wBAAwB,EAAE,gCAAgC,EAAC,MAAM,+BAA+B,CAAA;AAExG,8CAA8C;AAC9C,OAAO,EAAC,oBAAoB,EAAC,MAAM,kBAAkB,CAAA;AAGrD,2DAA2D;AAC3D,OAAO,EACL,kBAAkB,EAClB,cAAc,EACd,sBAAsB,EACtB,mBAAmB,GAGpB,MAAM,6BAA6B,CAAA;AACpC,yEAAyE;AACzE,OAAO,EACL,eAAe,EACf,yBAAyB,GAI1B,MAAM,kCAAkC,CAAA;AAazC,uEAAuE;AACvE,2DAA2D;AAC3D,OAAO,EACL,wBAAwB,EACxB,WAAW,EACX,iBAAiB,EACjB,mBAAmB,EACnB,yBAAyB,EACzB,sBAAsB,EACtB,qBAAqB,EACrB,gBAAgB,EAChB,sBAAsB,EACtB,mBAAmB,GACpB,MAAM,6BAA6B,CAAA;AACpC,OAAO,EAAC,kBAAkB,EAAC,MAAM,4BAA4B,CAAA;AAW7D,OAAO,EACL,iBAAiB,EACjB,8BAA8B,EAC9B,oBAAoB,EACpB,uBAAuB,EACvB,kCAAkC,EAClC,gBAAgB,EAChB,sBAAsB,EACtB,yBAAyB,EACzB,mCAAmC,GACpC,MAAM,yBAAyB,CAAA;AAEhC,OAAO,EACL,2BAA2B,EAC3B,kBAAkB,EAClB,uCAAuC,EACvC,yCAAyC,GAC1C,MAAM,4BAA4B,CAAA;AAMnC,OAAO,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,SAAS,EACT,aAAa,GACd,MAAM,SAAS,CAAA","sourcesContent":["/**\n * `@mentra/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 MentraOS 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 {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 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 \"@mentra/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 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"]}
@@ -1 +1 @@
1
- {"version":3,"file":"MentraLiveOtaFlow.d.ts","sourceRoot":"","sources":["../../src/react/MentraLiveOtaFlow.tsx"],"names":[],"mappings":"AACA,OAAO,KAAgB,MAAM,OAAO,CAAA;AACpC,OAAO,EAAuD,KAAK,SAAS,EAAE,KAAK,SAAS,EAAC,MAAM,cAAc,CAAA;AAIjH,OAAO,EAAiD,KAAK,qBAAqB,EAAC,MAAM,oBAAoB,CAAA;AAE7G,YAAY,EAAC,qBAAqB,EAAC,MAAM,oBAAoB,CAAA;AAE7D,MAAM,MAAM,sBAAsB,GAAG;IACnC,UAAU,EAAE,MAAM,CAAA;IAClB,MAAM,EAAE,MAAM,CAAA;IACd,KAAK,EAAE,MAAM,CAAA;IACb,UAAU,EAAE,MAAM,CAAA;IAClB,OAAO,EAAE,MAAM,CAAA;IACf,WAAW,EAAE,MAAM,CAAA;IACnB,OAAO,EAAE,MAAM,CAAA;CAChB,CAAA;AAED,MAAM,MAAM,0BAA0B,GAAG,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,KAAK,MAAM,CAAA;AAElG,MAAM,MAAM,sBAAsB,GAAG;IACnC,wCAAwC;IACxC,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,0EAA0E;IAC1E,WAAW,CAAC,EAAE,qBAAqB,CAAA;IACnC,2EAA2E;IAC3E,iBAAiB,CAAC,EAAE,OAAO,CAAA;IAC3B,+EAA+E;IAC/E,UAAU,EAAE,MAAM,IAAI,CAAA;IACtB,0EAA0E;IAC1E,eAAe,EAAE,MAAM,IAAI,CAAA;IAC3B,oGAAoG;IACpG,0BAA0B,CAAC,EAAE,CAAC,UAAU,EAAE,OAAO,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K,MAAM,CAAA;AAElG,MAAM,MAAM,sBAAsB,GAAG;IACnC,wCAAwC;IACxC,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,0EAA0E;IAC1E,WAAW,CAAC,EAAE,qBAAqB,CAAA;IACnC,2EAA2E;IAC3E,iBAAiB,CAAC,EAAE,OAAO,CAAA;IAC3B,+EAA+E;IAC/E,UAAU,EAAE,MAAM,IAAI,CAAA;IACtB,0EAA0E;IAC1E,eAAe,EAAE,MAAM,IAAI,CAAA;IAC3B,oGAAoG;IACpG,0BAA0B,CAAC,EAAE,CAAC,UAAU,EAAE,OAAO,EAAE,cAAc,EAAE,OAAO,KAAK,IAAI,CAAA;IACnF,0DAA0D;IAC1D,YAAY,CAAC,EAAE,OAAO,CAAA;IACtB,wEAAwE;IACxE,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB,+EAA+E;IAC/E,SAAS,CAAC,EAAE,0BAA0B,CAAA;IACtC,6EAA6E;IAC7E,KAAK,CAAC,EAAE,OAAO,CAAC,sBAAsB,CAAC,CAAA;IACvC,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAA;CAC7B,CAAA;AAyDD,wBAAgB,iBAAiB,CAAC,EAChC,YAAwD,EACxD,UAA0B,EAC1B,WAAqB,EACrB,iBAAwB,EACxB,UAAU,EACV,0BAA0B,EAC1B,eAAe,EACf,KAAK,EACL,SAAiB,EACjB,KAAK,EACL,SAA4B,GAC7B,EAAE,sBAAsB,qBA0BxB"}
@@ -1,6 +1,6 @@
1
1
  /* eslint-disable react-native/no-raw-text -- BodyText and PercentText are local Text wrappers. */
2
2
  import React, { useMemo } from "react";
3
- import { ActivityIndicator, Pressable, StyleSheet, Text, View } from "react-native";
3
+ import { ActivityIndicator, Pressable, ScrollView, StyleSheet, Text, View, } from "react-native";
4
4
  import { SafeAreaView } from "react-native-safe-area-context";
5
5
  import Svg, { Path, Rect } from "react-native-svg";
6
6
  import { useMentraLiveOta } from "./useMentraLiveOta";
@@ -100,6 +100,7 @@ function OtaFlowContent({ allowDevSkip, colors, controller, deviceName, superMod
100
100
  if (state.screen === "up_to_date") {
101
101
  return (<FlowPage actions={<FlowButton colors={colors} label={translate("common:continue")} onPress={controller.finish}/>} colors={colors} icon="check" title={translate("ota:upToDate")}>
102
102
  <BodyText colors={colors}>{translate("ota:noUpdatesAvailable")}</BodyText>
103
+ <ChangelogList changelogs={state.changelogs} colors={colors}/>
103
104
  </FlowPage>);
104
105
  }
105
106
  if (state.screen === "update_info_unavailable") {
@@ -164,6 +165,7 @@ function OtaFlowContent({ allowDevSkip, colors, controller, deviceName, superMod
164
165
  : "Your glasses are up to date.";
165
166
  return (<FlowPage actions={<FlowButton colors={colors} label={state.versionChange && !state.versionChangeConverged ? "Continue" : "Done"} onPress={controller.finish}/>} colors={colors} icon="check" title={title}>
166
167
  <BodyText colors={colors}>{message}</BodyText>
168
+ <ChangelogList changelogs={state.changelogs} colors={colors}/>
167
169
  </FlowPage>);
168
170
  }
169
171
  if (state.screen === "failed") {
@@ -195,6 +197,20 @@ function BodyText({ children, colors }) {
195
197
  function PercentText({ colors, percent }) {
196
198
  return <Text style={[styles.percent, { color: colors.primary }]}>{Math.round(percent)}%</Text>;
197
199
  }
200
+ function ChangelogList({ changelogs, colors, }) {
201
+ if (changelogs.length === 0)
202
+ return null;
203
+ return (<ScrollView contentContainerStyle={styles.changelogContent} style={styles.changelogList}>
204
+ {changelogs.map((entry) => (<View key={entry.version} style={styles.changelogEntry}>
205
+ <Text selectable style={[styles.changelogVersion, { color: colors.foreground }]}>
206
+ {entry.version}
207
+ </Text>
208
+ <Text selectable style={[styles.changelogMarkdown, { color: colors.textDim }]}>
209
+ {entry.markdown}
210
+ </Text>
211
+ </View>))}
212
+ </ScrollView>);
213
+ }
198
214
  function FlowButton({ colors, disabled = false, label, onPress, secondary = false, }) {
199
215
  return (<Pressable accessibilityRole="button" disabled={disabled} onPress={onPress} style={({ pressed }) => [
200
216
  styles.button,
@@ -238,6 +254,11 @@ const styles = StyleSheet.create({
238
254
  percent: { fontSize: 30, fontVariant: ["tabular-nums"], fontWeight: "700" },
239
255
  progressTrack: { borderRadius: 4, height: 8, maxWidth: 420, overflow: "hidden", width: "100%" },
240
256
  progressFill: { borderRadius: 4, height: 8 },
257
+ changelogList: { flexShrink: 1, maxHeight: 260, maxWidth: 420, width: "100%" },
258
+ changelogContent: { gap: 18, paddingVertical: 4 },
259
+ changelogEntry: { gap: 8 },
260
+ changelogVersion: { fontSize: 16, fontWeight: "600" },
261
+ changelogMarkdown: { fontSize: 14, lineHeight: 20 },
241
262
  button: {
242
263
  alignItems: "center",
243
264
  borderRadius: 50,
@@ -1 +1 @@
1
- {"version":3,"file":"MentraLiveOtaFlow.js","sourceRoot":"","sources":["../../src/react/MentraLiveOtaFlow.tsx"],"names":[],"mappings":"AAAA,kGAAkG;AAClG,OAAO,KAAK,EAAE,EAAC,OAAO,EAAC,MAAM,OAAO,CAAA;AACpC,OAAO,EAAC,iBAAiB,EAAE,SAAS,EAAE,UAAU,EAAE,IAAI,EAAE,IAAI,EAAiC,MAAM,cAAc,CAAA;AACjH,OAAO,EAAC,YAAY,EAAC,MAAM,gCAAgC,CAAA;AAC3D,OAAO,GAAG,EAAE,EAAC,IAAI,EAAE,IAAI,EAAC,MAAM,kBAAkB,CAAA;AAEhD,OAAO,EAAC,gBAAgB,EAA2D,MAAM,oBAAoB,CAAA;AAwC7G,MAAM,aAAa,GAA2B;IAC5C,UAAU,EAAE,SAAS;IACrB,MAAM,EAAE,SAAS;IACjB,KAAK,EAAE,SAAS;IAChB,UAAU,EAAE,SAAS;IACrB,OAAO,EAAE,SAAS;IAClB,WAAW,EAAE,SAAS;IACtB,OAAO,EAAE,SAAS;CACnB,CAAA;AAED,MAAM,YAAY,GAA2B;IAC3C,iBAAiB,EAAE,UAAU;IAC7B,wBAAwB,EAAE,sBAAsB;IAChD,+BAA+B,EAC7B,wGAAwG;IAC1G,qBAAqB,EAAE,iCAAiC;IACxD,uBAAuB,EAAE,4D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O,EAAE,EAAC,GAAG,EAAE,EAAE,EAAC;IAClB,IAAI,EAAE,EAAC,QAAQ,EAAE,EAAE,EAAE,UAAU,EAAE,KAAK,EAAE,UAAU,EAAE,EAAE,EAAE,SAAS,EAAE,QAAQ,EAAC;IAC5E,KAAK,EAAE,EAAC,QAAQ,EAAE,EAAE,EAAE,UAAU,EAAE,KAAK,EAAE,SAAS,EAAE,QAAQ,EAAC;IAC7D,IAAI,EAAE,EAAC,QAAQ,EAAE,EAAE,EAAE,UAAU,EAAE,EAAE,EAAE,QAAQ,EAAE,GAAG,EAAE,SAAS,EAAE,QAAQ,EAAC;IACxE,OAAO,EAAE,EAAC,QAAQ,EAAE,EAAE,EAAE,WAAW,EAAE,CAAC,cAAc,CAAC,EAAE,UAAU,EAAE,KAAK,EAAC;IACzE,aAAa,EAAE,EAAC,YAAY,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,QAAQ,EAAE,GAAG,EAAE,QAAQ,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,EAAC;IAC7F,YAAY,EAAE,EAAC,YAAY,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAC;IAC1C,MAAM,EAAE;QACN,UAAU,EAAE,QAAQ;QACpB,YAAY,EAAE,EAAE;QAChB,WAAW,EAAE,CAAC;QACd,cAAc,EAAE,QAAQ;QACxB,SAAS,EAAE,EAAE;QACb,iBAAiB,EAAE,EAAE;KACtB;IACD,UAAU,EAAE,EAAC,QAAQ,EAAE,EAAE,EAAE,UAAU,EAAE,KAAK,EAAC;CAC9C,CAAC,CAAA","sourcesContent":["/* eslint-disable react-native/no-raw-text -- BodyText and PercentText are local Text wrappers. */\nimport React, {useMemo} from \"react\"\nimport {ActivityIndicator, Pressable, StyleSheet, Text, View, type StyleProp, type ViewStyle} from \"react-native\"\nimport {SafeAreaView} from \"react-native-safe-area-context\"\nimport Svg, {Path, Rect} from \"react-native-svg\"\n\nimport {useMentraLiveOta, type MentraLiveOtaController, type MentraLiveOtaFlowPage} from \"./useMentraLiveOta\"\n\nexport type {MentraLiveOtaFlowPage} from \"./useMentraLiveOta\"\n\nexport type MentraLiveOtaFlowTheme = {\n background: string\n border: string\n error: string\n foreground: string\n primary: string\n primaryText: string\n textDim: string\n}\n\nexport type MentraLiveOtaFlowTranslate = (key: string, options?: Record<string, string>) => string\n\nexport type MentraLiveOtaFlowProps = {\n /** Display name used in update copy. */\n deviceName?: string\n /** Entry page. `progress` exists for recovery/deep-link compatibility. */\n initialPage?: MentraLiveOtaFlowPage\n /** Start the OTA-only projections. Full Engine hosts should pass false. */\n initializeRuntime?: boolean\n /** Called after the final check or when the user leaves an optional update. */\n onFinished: () => void\n /** Host-owned Wi-Fi setup for glasses that do not support hotspot OTA. */\n onOpenWifiSetup: () => void\n /** Lets a host coordinate its global connection overlay with OTA progress and firmware restarts. */\n onFirmwareRestartingChange?: (restarting: boolean, progressActive: boolean) => void\n /** Enables the existing developer-only escape hatches. */\n allowDevSkip?: boolean\n /** Enables the existing super-mode interrupted-session escape hatch. */\n superMode?: boolean\n /** Optional host localization. Defaults to the Mentra App English OTA copy. */\n translate?: MentraLiveOtaFlowTranslate\n /** Optional host theme. Both hosts use the same layout and state machine. */\n theme?: Partial<MentraLiveOtaFlowTheme>\n style?: StyleProp<ViewStyle>\n}\n\nconst DEFAULT_THEME: MentraLiveOtaFlowTheme = {\n background: \"#FFFFFF\",\n border: \"#D7DFDA\",\n error: \"#C43131\",\n foreground: \"#0E2C1A\",\n primary: \"#00B869\",\n primaryText: \"#FFFFFF\",\n textDim: \"#66736B\",\n}\n\nconst ENGLISH_COPY: Record<string, string> = {\n \"common:continue\": \"Continue\",\n \"ota:checkingForUpdates\": \"Checking for updates\",\n \"ota:checkingForUpdatesMessage\":\n \"Connected devices will perform automatic updates. Automatic updates can be disabled in Device Settings\",\n \"ota:updateAvailable\": \"{{deviceName}} Update Available\",\n \"ota:updateConnectWifi\": \"Connect your {{deviceName}} to WiFi to install the update.\",\n \"ota:updateDescription\":\n \"A new update is available for your glasses. We recommend updating now for the best experience.\",\n \"ota:downgradeAvailable\": \"{{deviceName}} Version Change Required\",\n \"ota:downgradeDescription\":\n \"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.\",\n \"ota:updateNow\": \"Update Now\",\n \"ota:setupWifi\": \"Setup WiFi\",\n \"ota:updateLater\": \"Later\",\n \"ota:upToDate\": \"Up To Date\",\n \"ota:devBuild\": \"Development Build\",\n \"ota:devBuildNoOta\":\n \"This mobile app is a development build, so automatic glasses updates are disabled. Use the developer settings manifest override to update them manually.\",\n \"ota:noUpdatesAvailable\": \"Your glasses are running the latest version.\",\n \"ota:checkFailed\": \"Check Failed\",\n \"ota:checkFailedMessage\": \"Couldn't check for updates. Please check your connection and try again.\",\n \"ota:updateInfoUnavailable\": \"Update Info Unavailable\",\n \"ota:updateInfoUnavailableMessage\":\n \"Update information for this version of the app is unavailable. Please check the app store for a newer version of the Mentra App.\",\n \"ota:downgradeDuration\": \"Your glasses will restart twice — this may take up to 2 minutes.\",\n \"ota:versionChangeRestarting\": \"Installing a different version…\",\n \"ota:versionChangeVerifying\": \"Verifying your glasses…\",\n \"ota:versionChangeKeepNearby\": \"Keep your glasses nearby and connected. They will restart on their own.\",\n \"ota:versionChangeComplete\": \"Version Change Complete\",\n \"ota:versionChangeCompleteMessage\":\n \"Your glasses are now on the required version. Their settings were reset and are being restored automatically.\",\n \"ota:versionChangeFirmwarePassComplete\": \"Firmware updated\",\n \"ota:versionChangeFirmwarePassCompleteMessage\":\n \"Your glasses restarted with new firmware. One more step: they'll now continue to the required version.\",\n}\n\nfunction defaultTranslate(key: string, options?: Record<string, string>): string {\n let value = ENGLISH_COPY[key] ?? key\n for (const [name, replacement] of Object.entries(options ?? {})) {\n value = value.replaceAll(`{{${name}}}`, replacement)\n }\n return value\n}\n\nexport function MentraLiveOtaFlow({\n allowDevSkip = typeof __DEV__ !== \"undefined\" && __DEV__,\n deviceName = \"Mentra Live\",\n initialPage = \"check\",\n initializeRuntime = true,\n onFinished,\n onFirmwareRestartingChange,\n onOpenWifiSetup,\n style,\n superMode = false,\n theme,\n translate = defaultTranslate,\n}: MentraLiveOtaFlowProps) {\n const colors = useMemo(() => ({...DEFAULT_THEME, ...theme}), [theme])\n const controller = useMentraLiveOta({\n initialPage,\n initializeRuntime,\n onFinished,\n onFirmwareRestartingChange,\n onOpenWifiSetup,\n })\n\n return (\n <SafeAreaView style={[styles.safeArea, {backgroundColor: colors.background}, style]}>\n <View style={styles.header}>\n <View />\n <MentraMark color={colors.primary} />\n </View>\n <OtaFlowContent\n allowDevSkip={allowDevSkip}\n colors={colors}\n controller={controller}\n deviceName={deviceName}\n superMode={superMode}\n translate={translate}\n />\n </SafeAreaView>\n )\n}\n\nfunction OtaFlowContent({\n allowDevSkip,\n colors,\n controller,\n deviceName,\n superMode,\n translate,\n}: {\n allowDevSkip: boolean\n colors: MentraLiveOtaFlowTheme\n controller: MentraLiveOtaController\n deviceName: string\n superMode: boolean\n translate: MentraLiveOtaFlowTranslate\n}) {\n const {state} = controller\n\n if (state.screen === \"initializing\") {\n return (\n <FlowPage colors={colors} icon=\"download\" title={translate(\"ota:checkingForUpdates\")}>\n <ActivityIndicator size=\"large\" color={colors.foreground} />\n </FlowPage>\n )\n }\n\n if (state.screen === \"checking\") {\n return (\n <FlowPage colors={colors} icon=\"download\" title={translate(\"ota:checkingForUpdates\")}>\n <BodyText colors={colors}>{translate(\"ota:checkingForUpdatesMessage\")}</BodyText>\n <ActivityIndicator size=\"large\" color={colors.foreground} />\n </FlowPage>\n )\n }\n\n if (state.screen === \"update_available\" || state.screen === \"wifi_required\") {\n return (\n <FlowPage\n colors={colors}\n icon=\"download\"\n title={translate(state.versionChange ? \"ota:downgradeAvailable\" : \"ota:updateAvailable\", {deviceName})}\n actions={\n <>\n <FlowButton\n colors={colors}\n disabled={!state.wifiStatusKnown}\n label={translate(state.screen === \"wifi_required\" ? \"ota:setupWifi\" : \"ota:updateNow\")}\n onPress={state.screen === \"wifi_required\" ? controller.openWifiSetup : controller.install}\n />\n {state.canDismiss ? (\n <FlowButton colors={colors} label={translate(\"ota:updateLater\")} onPress={controller.finish} secondary />\n ) : null}\n {allowDevSkip && state.updateRequired ? (\n <FlowButton colors={colors} label=\"Skip (dev only)\" onPress={controller.finish} secondary />\n ) : null}\n </>\n }>\n <BodyText colors={colors}>\n {state.screen === \"wifi_required\"\n ? translate(\"ota:updateConnectWifi\", {deviceName})\n : translate(state.versionChange ? \"ota:downgradeDescription\" : \"ota:updateDescription\")}\n </BodyText>\n </FlowPage>\n )\n }\n\n if (state.screen === \"dev_build\") {\n return (\n <FlowPage\n actions={<FlowButton colors={colors} label={translate(\"common:continue\")} onPress={controller.finish} />}\n colors={colors}\n icon=\"settings\"\n title={translate(\"ota:devBuild\")}>\n <BodyText colors={colors}>{translate(\"ota:devBuildNoOta\")}</BodyText>\n </FlowPage>\n )\n }\n\n if (state.screen === \"up_to_date\") {\n return (\n <FlowPage\n actions={<FlowButton colors={colors} label={translate(\"common:continue\")} onPress={controller.finish} />}\n colors={colors}\n icon=\"check\"\n title={translate(\"ota:upToDate\")}>\n <BodyText colors={colors}>{translate(\"ota:noUpdatesAvailable\")}</BodyText>\n </FlowPage>\n )\n }\n\n if (state.screen === \"update_info_unavailable\") {\n return (\n <FlowPage\n actions={<FlowButton colors={colors} label={translate(\"common:continue\")} onPress={controller.finish} />}\n colors={colors}\n icon=\"alert\"\n title={translate(\"ota:updateInfoUnavailable\")}>\n <BodyText colors={colors}>{translate(\"ota:updateInfoUnavailableMessage\")}</BodyText>\n </FlowPage>\n )\n }\n\n if (state.screen === \"check_failed\") {\n return (\n <FlowPage\n actions={\n <>\n <FlowButton colors={colors} label=\"Retry\" onPress={controller.retryCheck} />\n {allowDevSkip ? (\n <FlowButton colors={colors} label=\"Skip (dev only)\" onPress={controller.finish} secondary />\n ) : null}\n </>\n }\n colors={colors}\n icon=\"alert\"\n title={translate(\"ota:checkFailed\")}>\n <BodyText colors={colors}>{translate(\"ota:checkFailedMessage\")}</BodyText>\n </FlowPage>\n )\n }\n\n if (state.versionChangePhase === \"restarting\" || state.versionChangePhase === \"verifying\") {\n return (\n <FlowPage\n colors={colors}\n icon=\"download\"\n title={translate(\n state.versionChangePhase === \"verifying\" ? \"ota:versionChangeVerifying\" : \"ota:versionChangeRestarting\",\n )}>\n <ActivityIndicator size=\"large\" color={colors.foreground} />\n <BodyText colors={colors}>{translate(\"ota:versionChangeKeepNearby\")}</BodyText>\n <BodyText colors={colors}>{translate(\"ota:downgradeDuration\")}</BodyText>\n </FlowPage>\n )\n }\n\n if (state.screen === \"starting\" || state.screen === \"preparing_hotspot\") {\n const title =\n state.hotspotPhase === \"downloading\"\n ? \"Downloading update to phone...\"\n : state.hotspotPhase === \"starting_hotspot\"\n ? \"Starting glasses hotspot...\"\n : state.hotspotPhase === \"joining_hotspot\"\n ? \"Connecting phone to glasses...\"\n : \"Starting update...\"\n return (\n <FlowPage colors={colors} icon=\"download\" title={title}>\n {state.hotspotPhase === \"downloading\" && state.hotspotArtifactPercent !== null ? (\n <PercentText colors={colors} percent={state.hotspotArtifactPercent} />\n ) : null}\n <ActivityIndicator size=\"large\" color={colors.foreground} />\n <BodyText colors={colors}>Do not disconnect your glasses</BodyText>\n </FlowPage>\n )\n }\n\n if (state.screen === \"updating\") {\n return (\n <FlowPage colors={colors} icon=\"download\" title={state.phase === \"download\" ? \"Downloading...\" : \"Installing...\"}>\n {state.installingApkOnly ? (\n <ActivityIndicator size=\"large\" color={colors.foreground} />\n ) : (\n <>\n <PercentText colors={colors} percent={state.progress ?? 0} />\n <View style={[styles.progressTrack, {backgroundColor: colors.border}]}>\n <View\n style={[styles.progressFill, {backgroundColor: colors.primary, width: `${state.progress ?? 0}%`}]}\n />\n </View>\n </>\n )}\n <BodyText colors={colors}>Do not disconnect your glasses</BodyText>\n {state.versionChange && state.phase === \"install\" ? (\n <BodyText colors={colors}>{translate(\"ota:downgradeDuration\")}</BodyText>\n ) : null}\n </FlowPage>\n )\n }\n\n if (state.screen === \"restarting\") {\n return (\n <FlowPage\n actions={\n <FlowButton colors={colors} disabled={state.continueDisabled} label=\"Continue\" onPress={controller.finish} />\n }\n colors={colors}\n icon=\"check\"\n title=\"Update Installed\"\n />\n )\n }\n\n if (state.screen === \"complete\") {\n const title = state.versionChangeConverged\n ? translate(\"ota:versionChangeComplete\")\n : state.versionChange\n ? translate(\"ota:versionChangeFirmwarePassComplete\")\n : \"Update complete!\"\n const message = state.versionChangeConverged\n ? translate(\"ota:versionChangeCompleteMessage\")\n : state.versionChange\n ? translate(\"ota:versionChangeFirmwarePassCompleteMessage\")\n : \"Your glasses are up to date.\"\n return (\n <FlowPage\n actions={\n <FlowButton\n colors={colors}\n label={state.versionChange && !state.versionChangeConverged ? \"Continue\" : \"Done\"}\n onPress={controller.finish}\n />\n }\n colors={colors}\n icon=\"check\"\n title={title}>\n <BodyText colors={colors}>{message}</BodyText>\n </FlowPage>\n )\n }\n\n if (state.screen === \"failed\") {\n return (\n <FlowPage\n actions={\n <>\n <FlowButton\n colors={colors}\n label={state.canRetry ? \"Retry\" : \"Done\"}\n onPress={state.canRetry ? controller.retryInstall : controller.finish}\n />\n {state.canOpenWifiSetup ? (\n <FlowButton colors={colors} label=\"Change WiFi\" onPress={controller.openWifiSetup} secondary />\n ) : null}\n </>\n }\n colors={colors}\n icon=\"alert\"\n title=\"Update Failed\">\n <BodyText colors={colors}>{state.error?.message}</BodyText>\n </FlowPage>\n )\n }\n\n return (\n <FlowPage\n actions={\n superMode ? (\n <FlowButton colors={colors} label=\"Skip (super)\" onPress={controller.discard} secondary />\n ) : undefined\n }\n colors={colors}\n icon=\"bluetooth\"\n title=\"Glasses disconnected\">\n <BodyText colors={colors}>Reconnecting...</BodyText>\n <ActivityIndicator size=\"large\" color={colors.foreground} />\n </FlowPage>\n )\n}\n\ntype FlowPageProps = {\n actions?: React.ReactNode\n children?: React.ReactNode\n colors: MentraLiveOtaFlowTheme\n icon: \"alert\" | \"bluetooth\" | \"check\" | \"download\" | \"settings\"\n title: string\n}\n\nfunction FlowPage({actions, children, colors, icon, title}: FlowPageProps) {\n return (\n <View style={styles.page} testID=\"mentra-live-ota-flow\">\n <View style={styles.centerContent}>\n <FlowIcon colors={colors} name={icon} />\n <Text style={[styles.title, {color: colors.foreground}]}>{title}</Text>\n {children}\n </View>\n {actions ? <View style={styles.actions}>{actions}</View> : <View style={styles.actionSpacer} />}\n </View>\n )\n}\n\nfunction BodyText({children, colors}: {children: React.ReactNode; colors: MentraLiveOtaFlowTheme}) {\n return <Text style={[styles.body, {color: colors.textDim}]}>{children}</Text>\n}\n\nfunction PercentText({colors, percent}: {colors: MentraLiveOtaFlowTheme; percent: number}) {\n return <Text style={[styles.percent, {color: colors.primary}]}>{Math.round(percent)}%</Text>\n}\n\nfunction FlowButton({\n colors,\n disabled = false,\n label,\n onPress,\n secondary = false,\n}: {\n colors: MentraLiveOtaFlowTheme\n disabled?: boolean\n label: string\n onPress: () => void\n secondary?: boolean\n}) {\n return (\n <Pressable\n accessibilityRole=\"button\"\n disabled={disabled}\n onPress={onPress}\n style={({pressed}) => [\n styles.button,\n {\n backgroundColor: secondary ? colors.background : colors.foreground,\n borderColor: secondary ? colors.border : colors.foreground,\n opacity: disabled ? 0.45 : pressed ? 0.75 : 1,\n },\n ]}\n testID={`button-${label}`}>\n <Text style={[styles.buttonText, {color: secondary ? colors.foreground : colors.background}]}>{label}</Text>\n </Pressable>\n )\n}\n\nfunction MentraMark({color}: {color: string}) {\n return (\n <Svg width={33} height={18} viewBox=\"0 0 50 27\" fill=\"none\">\n <Rect y={14.8072} width={11.8457} height={11.8457} fill={color} />\n <Path d=\"M9.36639 0L30.7163 14.8072V26.6529L9.36639 11.8457V0Z\" fill={color} />\n <Path d=\"M28.6501 0L50 14.8072V26.6529L28.6501 11.8457V0Z\" fill={color} />\n </Svg>\n )\n}\n\nfunction FlowIcon({colors, name}: {colors: MentraLiveOtaFlowTheme; name: FlowPageProps[\"icon\"]}) {\n const color = name === \"alert\" || name === \"bluetooth\" ? colors.error : colors.primary\n const glyph =\n name === \"check\" ? \"✓\" : name === \"alert\" ? \"!\" : name === \"settings\" ? \"⚙\" : name === \"bluetooth\" ? \"⌁\" : \"↓\"\n return <Text style={[styles.icon, {color}]}>{glyph}</Text>\n}\n\nconst styles = StyleSheet.create({\n safeArea: {flex: 1},\n header: {\n alignItems: \"center\",\n flexDirection: \"row\",\n height: 48,\n justifyContent: \"space-between\",\n paddingHorizontal: 20,\n },\n page: {flex: 1, paddingBottom: 24, paddingHorizontal: 24},\n centerContent: {alignItems: \"center\", flex: 1, gap: 16, justifyContent: \"center\"},\n actionSpacer: {height: 48},\n actions: {gap: 12},\n icon: {fontSize: 64, fontWeight: \"500\", lineHeight: 72, textAlign: \"center\"},\n title: {fontSize: 20, fontWeight: \"600\", textAlign: \"center\"},\n body: {fontSize: 14, lineHeight: 20, maxWidth: 420, textAlign: \"center\"},\n percent: {fontSize: 30, fontVariant: [\"tabular-nums\"], fontWeight: \"700\"},\n progressTrack: {borderRadius: 4, height: 8, maxWidth: 420, overflow: \"hidden\", width: \"100%\"},\n progressFill: {borderRadius: 4, height: 8},\n button: {\n alignItems: \"center\",\n borderRadius: 50,\n borderWidth: 1,\n justifyContent: \"center\",\n minHeight: 44,\n paddingHorizontal: 20,\n },\n buttonText: {fontSize: 14, fontWeight: \"500\"},\n})\n"]}
1
+ {"version":3,"file":"MentraLiveOtaFlow.js","sourceRoot":"","sources":["../../src/react/MentraLiveOtaFlow.tsx"],"names":[],"mappings":"AAAA,kGAAkG;AAClG,OAAO,KAAK,EAAE,EAAC,OAAO,EAAC,MAAM,OAAO,CAAA;AACpC,OAAO,EACL,iBAAiB,EACjB,SAAS,EACT,UAAU,EACV,UAAU,EACV,IAAI,EACJ,IAAI,GAGL,MAAM,cAAc,CAAA;AACrB,OAAO,EAAC,YAAY,EAAC,MAAM,gCAAgC,CAAA;AAC3D,OAAO,GAAG,EAAE,EAAC,IAAI,EAAE,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AC5E,gBAAgB,EAAE,EAAC,GAAG,EAAE,EAAE,EAAE,eAAe,EAAE,CAAC,EAAC;IAC/C,cAAc,EAAE,EAAC,GAAG,EAAE,CAAC,EAAC;IACxB,gBAAgB,EAAE,EAAC,QAAQ,EAAE,EAAE,EAAE,UAAU,EAAE,KAAK,EAAC;IACnD,iBAAiB,EAAE,EAAC,QAAQ,EAAE,EAAE,EAAE,UAAU,EAAE,EAAE,EAAC;IACjD,MAAM,EAAE;QACN,UAAU,EAAE,QAAQ;QACpB,YAAY,EAAE,EAAE;QAChB,WAAW,EAAE,CAAC;QACd,cAAc,EAAE,QAAQ;QACxB,SAAS,EAAE,EAAE;QACb,iBAAiB,EAAE,EAAE;KACtB;IACD,UAAU,EAAE,EAAC,QAAQ,EAAE,EAAE,EAAE,UAAU,EAAE,KAAK,EAAC;CAC9C,CAAC,CAAA","sourcesContent":["/* eslint-disable react-native/no-raw-text -- BodyText and PercentText are local Text wrappers. */\nimport React, {useMemo} from \"react\"\nimport {\n ActivityIndicator,\n Pressable,\n ScrollView,\n StyleSheet,\n Text,\n View,\n type StyleProp,\n type ViewStyle,\n} from \"react-native\"\nimport {SafeAreaView} from \"react-native-safe-area-context\"\nimport Svg, {Path, Rect} from \"react-native-svg\"\n\nimport {useMentraLiveOta, type MentraLiveOtaController, type MentraLiveOtaFlowPage} from \"./useMentraLiveOta\"\n\nexport type {MentraLiveOtaFlowPage} from \"./useMentraLiveOta\"\n\nexport type MentraLiveOtaFlowTheme = {\n background: string\n border: string\n error: string\n foreground: string\n primary: string\n primaryText: string\n textDim: string\n}\n\nexport type MentraLiveOtaFlowTranslate = (key: string, options?: Record<string, string>) => string\n\nexport type MentraLiveOtaFlowProps = {\n /** Display name used in update copy. */\n deviceName?: string\n /** Entry page. `progress` exists for recovery/deep-link compatibility. */\n initialPage?: MentraLiveOtaFlowPage\n /** Start the OTA-only projections. Full Engine hosts should pass false. */\n initializeRuntime?: boolean\n /** Called after the final check or when the user leaves an optional update. */\n onFinished: () => void\n /** Host-owned Wi-Fi setup for glasses that do not support hotspot OTA. */\n onOpenWifiSetup: () => void\n /** Lets a host coordinate its global connection overlay with OTA progress and firmware restarts. */\n onFirmwareRestartingChange?: (restarting: boolean, progressActive: boolean) => void\n /** Enables the existing developer-only escape hatches. */\n allowDevSkip?: boolean\n /** Enables the existing super-mode interrupted-session escape hatch. */\n superMode?: boolean\n /** Optional host localization. Defaults to the Mentra App English OTA copy. */\n translate?: MentraLiveOtaFlowTranslate\n /** Optional host theme. Both hosts use the same layout and state machine. */\n theme?: Partial<MentraLiveOtaFlowTheme>\n style?: StyleProp<ViewStyle>\n}\n\nconst DEFAULT_THEME: MentraLiveOtaFlowTheme = {\n background: \"#FFFFFF\",\n border: \"#D7DFDA\",\n error: \"#C43131\",\n foreground: \"#0E2C1A\",\n primary: \"#00B869\",\n primaryText: \"#FFFFFF\",\n textDim: \"#66736B\",\n}\n\nconst ENGLISH_COPY: Record<string, string> = {\n \"common:continue\": \"Continue\",\n \"ota:checkingForUpdates\": \"Checking for updates\",\n \"ota:checkingForUpdatesMessage\":\n \"Connected devices will perform automatic updates. Automatic updates can be disabled in Device Settings\",\n \"ota:updateAvailable\": \"{{deviceName}} Update Available\",\n \"ota:updateConnectWifi\": \"Connect your {{deviceName}} to WiFi to install the update.\",\n \"ota:updateDescription\":\n \"A new update is available for your glasses. We recommend updating now for the best experience.\",\n \"ota:downgradeAvailable\": \"{{deviceName}} Version Change Required\",\n \"ota:downgradeDescription\":\n \"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.\",\n \"ota:updateNow\": \"Update Now\",\n \"ota:setupWifi\": \"Setup WiFi\",\n \"ota:updateLater\": \"Later\",\n \"ota:upToDate\": \"Up To Date\",\n \"ota:devBuild\": \"Development Build\",\n \"ota:devBuildNoOta\":\n \"This mobile app is a development build, so automatic glasses updates are disabled. Use the developer settings manifest override to update them manually.\",\n \"ota:noUpdatesAvailable\": \"Your glasses are running the latest version.\",\n \"ota:checkFailed\": \"Check Failed\",\n \"ota:checkFailedMessage\": \"Couldn't check for updates. Please check your connection and try again.\",\n \"ota:updateInfoUnavailable\": \"Update Info Unavailable\",\n \"ota:updateInfoUnavailableMessage\":\n \"Update information for this version of the app is unavailable. Please check the app store for a newer version of the Mentra App.\",\n \"ota:downgradeDuration\": \"Your glasses will restart twice — this may take up to 2 minutes.\",\n \"ota:versionChangeRestarting\": \"Installing a different version…\",\n \"ota:versionChangeVerifying\": \"Verifying your glasses…\",\n \"ota:versionChangeKeepNearby\": \"Keep your glasses nearby and connected. They will restart on their own.\",\n \"ota:versionChangeComplete\": \"Version Change Complete\",\n \"ota:versionChangeCompleteMessage\":\n \"Your glasses are now on the required version. Their settings were reset and are being restored automatically.\",\n \"ota:versionChangeFirmwarePassComplete\": \"Firmware updated\",\n \"ota:versionChangeFirmwarePassCompleteMessage\":\n \"Your glasses restarted with new firmware. One more step: they'll now continue to the required version.\",\n}\n\nfunction defaultTranslate(key: string, options?: Record<string, string>): string {\n let value = ENGLISH_COPY[key] ?? key\n for (const [name, replacement] of Object.entries(options ?? {})) {\n value = value.replaceAll(`{{${name}}}`, replacement)\n }\n return value\n}\n\nexport function MentraLiveOtaFlow({\n allowDevSkip = typeof __DEV__ !== \"undefined\" && __DEV__,\n deviceName = \"Mentra Live\",\n initialPage = \"check\",\n initializeRuntime = true,\n onFinished,\n onFirmwareRestartingChange,\n onOpenWifiSetup,\n style,\n superMode = false,\n theme,\n translate = defaultTranslate,\n}: MentraLiveOtaFlowProps) {\n const colors = useMemo(() => ({...DEFAULT_THEME, ...theme}), [theme])\n const controller = useMentraLiveOta({\n initialPage,\n initializeRuntime,\n onFinished,\n onFirmwareRestartingChange,\n onOpenWifiSetup,\n })\n\n return (\n <SafeAreaView style={[styles.safeArea, {backgroundColor: colors.background}, style]}>\n <View style={styles.header}>\n <View />\n <MentraMark color={colors.primary} />\n </View>\n <OtaFlowContent\n allowDevSkip={allowDevSkip}\n colors={colors}\n controller={controller}\n deviceName={deviceName}\n superMode={superMode}\n translate={translate}\n />\n </SafeAreaView>\n )\n}\n\nfunction OtaFlowContent({\n allowDevSkip,\n colors,\n controller,\n deviceName,\n superMode,\n translate,\n}: {\n allowDevSkip: boolean\n colors: MentraLiveOtaFlowTheme\n controller: MentraLiveOtaController\n deviceName: string\n superMode: boolean\n translate: MentraLiveOtaFlowTranslate\n}) {\n const {state} = controller\n\n if (state.screen === \"initializing\") {\n return (\n <FlowPage colors={colors} icon=\"download\" title={translate(\"ota:checkingForUpdates\")}>\n <ActivityIndicator size=\"large\" color={colors.foreground} />\n </FlowPage>\n )\n }\n\n if (state.screen === \"checking\") {\n return (\n <FlowPage colors={colors} icon=\"download\" title={translate(\"ota:checkingForUpdates\")}>\n <BodyText colors={colors}>{translate(\"ota:checkingForUpdatesMessage\")}</BodyText>\n <ActivityIndicator size=\"large\" color={colors.foreground} />\n </FlowPage>\n )\n }\n\n if (state.screen === \"update_available\" || state.screen === \"wifi_required\") {\n return (\n <FlowPage\n colors={colors}\n icon=\"download\"\n title={translate(state.versionChange ? \"ota:downgradeAvailable\" : \"ota:updateAvailable\", {deviceName})}\n actions={\n <>\n <FlowButton\n colors={colors}\n disabled={!state.wifiStatusKnown}\n label={translate(state.screen === \"wifi_required\" ? \"ota:setupWifi\" : \"ota:updateNow\")}\n onPress={state.screen === \"wifi_required\" ? controller.openWifiSetup : controller.install}\n />\n {state.canDismiss ? (\n <FlowButton colors={colors} label={translate(\"ota:updateLater\")} onPress={controller.finish} secondary />\n ) : null}\n {allowDevSkip && state.updateRequired ? (\n <FlowButton colors={colors} label=\"Skip (dev only)\" onPress={controller.finish} secondary />\n ) : null}\n </>\n }>\n <BodyText colors={colors}>\n {state.screen === \"wifi_required\"\n ? translate(\"ota:updateConnectWifi\", {deviceName})\n : translate(state.versionChange ? \"ota:downgradeDescription\" : \"ota:updateDescription\")}\n </BodyText>\n </FlowPage>\n )\n }\n\n if (state.screen === \"dev_build\") {\n return (\n <FlowPage\n actions={<FlowButton colors={colors} label={translate(\"common:continue\")} onPress={controller.finish} />}\n colors={colors}\n icon=\"settings\"\n title={translate(\"ota:devBuild\")}>\n <BodyText colors={colors}>{translate(\"ota:devBuildNoOta\")}</BodyText>\n </FlowPage>\n )\n }\n\n if (state.screen === \"up_to_date\") {\n return (\n <FlowPage\n actions={<FlowButton colors={colors} label={translate(\"common:continue\")} onPress={controller.finish} />}\n colors={colors}\n icon=\"check\"\n title={translate(\"ota:upToDate\")}>\n <BodyText colors={colors}>{translate(\"ota:noUpdatesAvailable\")}</BodyText>\n <ChangelogList changelogs={state.changelogs} colors={colors} />\n </FlowPage>\n )\n }\n\n if (state.screen === \"update_info_unavailable\") {\n return (\n <FlowPage\n actions={<FlowButton colors={colors} label={translate(\"common:continue\")} onPress={controller.finish} />}\n colors={colors}\n icon=\"alert\"\n title={translate(\"ota:updateInfoUnavailable\")}>\n <BodyText colors={colors}>{translate(\"ota:updateInfoUnavailableMessage\")}</BodyText>\n </FlowPage>\n )\n }\n\n if (state.screen === \"check_failed\") {\n return (\n <FlowPage\n actions={\n <>\n <FlowButton colors={colors} label=\"Retry\" onPress={controller.retryCheck} />\n {allowDevSkip ? (\n <FlowButton colors={colors} label=\"Skip (dev only)\" onPress={controller.finish} secondary />\n ) : null}\n </>\n }\n colors={colors}\n icon=\"alert\"\n title={translate(\"ota:checkFailed\")}>\n <BodyText colors={colors}>{translate(\"ota:checkFailedMessage\")}</BodyText>\n </FlowPage>\n )\n }\n\n if (state.versionChangePhase === \"restarting\" || state.versionChangePhase === \"verifying\") {\n return (\n <FlowPage\n colors={colors}\n icon=\"download\"\n title={translate(\n state.versionChangePhase === \"verifying\" ? \"ota:versionChangeVerifying\" : \"ota:versionChangeRestarting\",\n )}>\n <ActivityIndicator size=\"large\" color={colors.foreground} />\n <BodyText colors={colors}>{translate(\"ota:versionChangeKeepNearby\")}</BodyText>\n <BodyText colors={colors}>{translate(\"ota:downgradeDuration\")}</BodyText>\n </FlowPage>\n )\n }\n\n if (state.screen === \"starting\" || state.screen === \"preparing_hotspot\") {\n const title =\n state.hotspotPhase === \"downloading\"\n ? \"Downloading update to phone...\"\n : state.hotspotPhase === \"starting_hotspot\"\n ? \"Starting glasses hotspot...\"\n : state.hotspotPhase === \"joining_hotspot\"\n ? \"Connecting phone to glasses...\"\n : \"Starting update...\"\n return (\n <FlowPage colors={colors} icon=\"download\" title={title}>\n {state.hotspotPhase === \"downloading\" && state.hotspotArtifactPercent !== null ? (\n <PercentText colors={colors} percent={state.hotspotArtifactPercent} />\n ) : null}\n <ActivityIndicator size=\"large\" color={colors.foreground} />\n <BodyText colors={colors}>Do not disconnect your glasses</BodyText>\n </FlowPage>\n )\n }\n\n if (state.screen === \"updating\") {\n return (\n <FlowPage colors={colors} icon=\"download\" title={state.phase === \"download\" ? \"Downloading...\" : \"Installing...\"}>\n {state.installingApkOnly ? (\n <ActivityIndicator size=\"large\" color={colors.foreground} />\n ) : (\n <>\n <PercentText colors={colors} percent={state.progress ?? 0} />\n <View style={[styles.progressTrack, {backgroundColor: colors.border}]}>\n <View\n style={[styles.progressFill, {backgroundColor: colors.primary, width: `${state.progress ?? 0}%`}]}\n />\n </View>\n </>\n )}\n <BodyText colors={colors}>Do not disconnect your glasses</BodyText>\n {state.versionChange && state.phase === \"install\" ? (\n <BodyText colors={colors}>{translate(\"ota:downgradeDuration\")}</BodyText>\n ) : null}\n </FlowPage>\n )\n }\n\n if (state.screen === \"restarting\") {\n return (\n <FlowPage\n actions={\n <FlowButton colors={colors} disabled={state.continueDisabled} label=\"Continue\" onPress={controller.finish} />\n }\n colors={colors}\n icon=\"check\"\n title=\"Update Installed\"\n />\n )\n }\n\n if (state.screen === \"complete\") {\n const title = state.versionChangeConverged\n ? translate(\"ota:versionChangeComplete\")\n : state.versionChange\n ? translate(\"ota:versionChangeFirmwarePassComplete\")\n : \"Update complete!\"\n const message = state.versionChangeConverged\n ? translate(\"ota:versionChangeCompleteMessage\")\n : state.versionChange\n ? translate(\"ota:versionChangeFirmwarePassCompleteMessage\")\n : \"Your glasses are up to date.\"\n return (\n <FlowPage\n actions={\n <FlowButton\n colors={colors}\n label={state.versionChange && !state.versionChangeConverged ? \"Continue\" : \"Done\"}\n onPress={controller.finish}\n />\n }\n colors={colors}\n icon=\"check\"\n title={title}>\n <BodyText colors={colors}>{message}</BodyText>\n <ChangelogList changelogs={state.changelogs} colors={colors} />\n </FlowPage>\n )\n }\n\n if (state.screen === \"failed\") {\n return (\n <FlowPage\n actions={\n <>\n <FlowButton\n colors={colors}\n label={state.canRetry ? \"Retry\" : \"Done\"}\n onPress={state.canRetry ? controller.retryInstall : controller.finish}\n />\n {state.canOpenWifiSetup ? (\n <FlowButton colors={colors} label=\"Change WiFi\" onPress={controller.openWifiSetup} secondary />\n ) : null}\n </>\n }\n colors={colors}\n icon=\"alert\"\n title=\"Update Failed\">\n <BodyText colors={colors}>{state.error?.message}</BodyText>\n </FlowPage>\n )\n }\n\n return (\n <FlowPage\n actions={\n superMode ? (\n <FlowButton colors={colors} label=\"Skip (super)\" onPress={controller.discard} secondary />\n ) : undefined\n }\n colors={colors}\n icon=\"bluetooth\"\n title=\"Glasses disconnected\">\n <BodyText colors={colors}>Reconnecting...</BodyText>\n <ActivityIndicator size=\"large\" color={colors.foreground} />\n </FlowPage>\n )\n}\n\ntype FlowPageProps = {\n actions?: React.ReactNode\n children?: React.ReactNode\n colors: MentraLiveOtaFlowTheme\n icon: \"alert\" | \"bluetooth\" | \"check\" | \"download\" | \"settings\"\n title: string\n}\n\nfunction FlowPage({actions, children, colors, icon, title}: FlowPageProps) {\n return (\n <View style={styles.page} testID=\"mentra-live-ota-flow\">\n <View style={styles.centerContent}>\n <FlowIcon colors={colors} name={icon} />\n <Text style={[styles.title, {color: colors.foreground}]}>{title}</Text>\n {children}\n </View>\n {actions ? <View style={styles.actions}>{actions}</View> : <View style={styles.actionSpacer} />}\n </View>\n )\n}\n\nfunction BodyText({children, colors}: {children: React.ReactNode; colors: MentraLiveOtaFlowTheme}) {\n return <Text style={[styles.body, {color: colors.textDim}]}>{children}</Text>\n}\n\nfunction PercentText({colors, percent}: {colors: MentraLiveOtaFlowTheme; percent: number}) {\n return <Text style={[styles.percent, {color: colors.primary}]}>{Math.round(percent)}%</Text>\n}\n\nfunction ChangelogList({\n changelogs,\n colors,\n}: {\n changelogs: MentraLiveOtaController[\"state\"][\"changelogs\"]\n colors: MentraLiveOtaFlowTheme\n}) {\n if (changelogs.length === 0) return null\n return (\n <ScrollView contentContainerStyle={styles.changelogContent} style={styles.changelogList}>\n {changelogs.map((entry) => (\n <View key={entry.version} style={styles.changelogEntry}>\n <Text selectable style={[styles.changelogVersion, {color: colors.foreground}]}>\n {entry.version}\n </Text>\n <Text selectable style={[styles.changelogMarkdown, {color: colors.textDim}]}>\n {entry.markdown}\n </Text>\n </View>\n ))}\n </ScrollView>\n )\n}\n\nfunction FlowButton({\n colors,\n disabled = false,\n label,\n onPress,\n secondary = false,\n}: {\n colors: MentraLiveOtaFlowTheme\n disabled?: boolean\n label: string\n onPress: () => void\n secondary?: boolean\n}) {\n return (\n <Pressable\n accessibilityRole=\"button\"\n disabled={disabled}\n onPress={onPress}\n style={({pressed}) => [\n styles.button,\n {\n backgroundColor: secondary ? colors.background : colors.foreground,\n borderColor: secondary ? colors.border : colors.foreground,\n opacity: disabled ? 0.45 : pressed ? 0.75 : 1,\n },\n ]}\n testID={`button-${label}`}>\n <Text style={[styles.buttonText, {color: secondary ? colors.foreground : colors.background}]}>{label}</Text>\n </Pressable>\n )\n}\n\nfunction MentraMark({color}: {color: string}) {\n return (\n <Svg width={33} height={18} viewBox=\"0 0 50 27\" fill=\"none\">\n <Rect y={14.8072} width={11.8457} height={11.8457} fill={color} />\n <Path d=\"M9.36639 0L30.7163 14.8072V26.6529L9.36639 11.8457V0Z\" fill={color} />\n <Path d=\"M28.6501 0L50 14.8072V26.6529L28.6501 11.8457V0Z\" fill={color} />\n </Svg>\n )\n}\n\nfunction FlowIcon({colors, name}: {colors: MentraLiveOtaFlowTheme; name: FlowPageProps[\"icon\"]}) {\n const color = name === \"alert\" || name === \"bluetooth\" ? colors.error : colors.primary\n const glyph =\n name === \"check\" ? \"✓\" : name === \"alert\" ? \"!\" : name === \"settings\" ? \"⚙\" : name === \"bluetooth\" ? \"⌁\" : \"↓\"\n return <Text style={[styles.icon, {color}]}>{glyph}</Text>\n}\n\nconst styles = StyleSheet.create({\n safeArea: {flex: 1},\n header: {\n alignItems: \"center\",\n flexDirection: \"row\",\n height: 48,\n justifyContent: \"space-between\",\n paddingHorizontal: 20,\n },\n page: {flex: 1, paddingBottom: 24, paddingHorizontal: 24},\n centerContent: {alignItems: \"center\", flex: 1, gap: 16, justifyContent: \"center\"},\n actionSpacer: {height: 48},\n actions: {gap: 12},\n icon: {fontSize: 64, fontWeight: \"500\", lineHeight: 72, textAlign: \"center\"},\n title: {fontSize: 20, fontWeight: \"600\", textAlign: \"center\"},\n body: {fontSize: 14, lineHeight: 20, maxWidth: 420, textAlign: \"center\"},\n percent: {fontSize: 30, fontVariant: [\"tabular-nums\"], fontWeight: \"700\"},\n progressTrack: {borderRadius: 4, height: 8, maxWidth: 420, overflow: \"hidden\", width: \"100%\"},\n progressFill: {borderRadius: 4, height: 8},\n changelogList: {flexShrink: 1, maxHeight: 260, maxWidth: 420, width: \"100%\"},\n changelogContent: {gap: 18, paddingVertical: 4},\n changelogEntry: {gap: 8},\n changelogVersion: {fontSize: 16, fontWeight: \"600\"},\n changelogMarkdown: {fontSize: 14, lineHeight: 20},\n button: {\n alignItems: \"center\",\n borderRadius: 50,\n borderWidth: 1,\n justifyContent: \"center\",\n minHeight: 44,\n paddingHorizontal: 20,\n },\n buttonText: {fontSize: 14, fontWeight: \"500\"},\n})\n"]}
@@ -1,3 +1,4 @@
1
+ import type { ReleaseChangelog } from "../facades/ota";
1
2
  export type MentraLiveOtaFlowPage = "check" | "progress";
2
3
  export type MentraLiveOtaScreen = "initializing" | "checking" | "update_available" | "wifi_required" | "up_to_date" | "dev_build" | "check_failed" | "update_info_unavailable" | "starting" | "preparing_hotspot" | "updating" | "restarting" | "verifying" | "complete" | "failed" | "disconnected";
3
4
  export type MentraLiveOtaErrorCode = "check_failed" | "update_info_unavailable" | "install_failed" | "bes_restart_required";
@@ -37,6 +38,8 @@ export type MentraLiveOtaState = {
37
38
  canDiscard: boolean;
38
39
  canOpenWifiSetup: boolean;
39
40
  continueDisabled: boolean;
41
+ /** Release notes crossed by this update, newest first. Populated on completion. */
42
+ changelogs: ReleaseChangelog[];
40
43
  };
41
44
  export type UseMentraLiveOtaOptions = {
42
45
  /** Entry page. `progress` exists for interrupted-session recovery. */
@@ -1 +1 @@
1
- {"version":3,"file":"useMentraLiveOta.d.ts","sourceRoot":"","sources":["../../src/react/useMentraLiveOta.ts"],"names":[],"mappings":"AAsBA,MAAM,MAAM,qBAAqB,GAAG,OAAO,GAAG,UAAU,CAAA;AAExD,MAAM,MAAM,mBAAmB,GAC3B,cAAc,GACd,UAAU,GACV,kBAAkB,GAClB,eAAe,GACf,YAAY,GACZ,WAAW,GACX,cAAc,GACd,yBAAyB,GACzB,UAAU,GACV,mBAAmB,GACnB,UAAU,GACV,YAAY,GACZ,WAAW,GACX,UAAU,GACV,QAAQ,GACR,cAAc,CAAA;AAElB,MAAM,MAAM,sBAAsB,GAC9B,cAAc,GACd,yBAAyB,GACzB,gBAAgB,GAChB,sBAAsB,CAAA;AAE1B,MAAM,MAAM,kBAAkB,GAAG;IAC/B,IAAI,EAAE,sBAAsB,CAAA;IAC5B,OAAO,EAAE,MAAM,CAAA;CAChB,CAAA;AAED,MAAM,MAAM,sBAAsB,GAAG,MAAM,GAAG,SAAS,CAAA;AACvD,MAAM,MAAM,yBAAyB,GAAG,MAAM,GAAG,aAAa,GAAG,kBAAkB,GAAG,iBAAiB,GAAG,SAAS,CAAA;AACnH,MAAM,MAAM,yBAAyB,GAAG,UAAU,GAAG,SAAS,CAAA;AAC9D,MAAM,MAAM,iBAAiB,GAAG,KAAK,GAAG,KAAK,GAAG,K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