@mentra/bluetooth-sdk 3.2.1 → 3.3.0-beta.954

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (95) hide show
  1. package/README.md +68 -6
  2. package/android/build.gradle +15 -0
  3. package/android/lc3Lib/build.gradle +6 -1
  4. package/android/src/main/java/com/mentra/bluetoothsdk/BluetoothSdkAnalytics.kt +63 -14
  5. package/android/src/main/java/com/mentra/bluetoothsdk/BluetoothSdkAnalyticsTracker.kt +55 -1
  6. package/android/src/main/java/com/mentra/bluetoothsdk/BluetoothSdkDefaults.kt +1 -1
  7. package/android/src/main/java/com/mentra/bluetoothsdk/BluetoothSdkInstallId.kt +23 -0
  8. package/android/src/main/java/com/mentra/bluetoothsdk/BluetoothSdkModule.kt +2 -2
  9. package/android/src/main/java/com/mentra/bluetoothsdk/BluetoothSdkUpdateCheck.kt +184 -0
  10. package/android/src/main/java/com/mentra/bluetoothsdk/BluetoothSdkUsageTracker.kt +388 -0
  11. package/android/src/main/java/com/mentra/bluetoothsdk/DeviceManager.kt +4 -1
  12. package/android/src/main/java/com/mentra/bluetoothsdk/GeneratedChangelogCatalog.kt +2 -1
  13. package/android/src/main/java/com/mentra/bluetoothsdk/GeneratedReleaseMetadata.kt +6 -6
  14. package/android/src/main/java/com/mentra/bluetoothsdk/MentraBluetoothSdk.kt +223 -36
  15. package/android/src/main/java/com/mentra/bluetoothsdk/MentraLocalNetworkModule.kt +24 -0
  16. package/android/src/main/java/com/mentra/bluetoothsdk/NetworkDiagnostics.kt +25 -0
  17. package/android/src/main/java/com/mentra/bluetoothsdk/debug/BleTraceLogger.kt +3 -0
  18. package/android/src/main/java/com/mentra/bluetoothsdk/sgcs/ClassicAudioConnectionTracker.kt +4 -0
  19. package/android/src/main/java/com/mentra/bluetoothsdk/sgcs/ClassicAudioServiceDiscovery.kt +70 -0
  20. package/android/src/main/java/com/mentra/bluetoothsdk/sgcs/G1TextSanitizer.kt +11 -32
  21. package/android/src/main/java/com/mentra/bluetoothsdk/sgcs/LatinTextSanitizer.kt +39 -0
  22. package/android/src/main/java/com/mentra/bluetoothsdk/sgcs/MentraLive.kt +93 -18
  23. package/android/src/main/java/com/mentra/bluetoothsdk/sgcs/NimoCanvasCodec.kt +3 -1
  24. package/android/src/test/java/com/mentra/bluetoothsdk/BluetoothSdkAnalyticsTrackerTest.kt +58 -3
  25. package/android/src/test/java/com/mentra/bluetoothsdk/BluetoothSdkUpdateCheckTest.kt +124 -0
  26. package/android/src/test/java/com/mentra/bluetoothsdk/BluetoothSdkUsageTrackerTest.kt +263 -0
  27. package/android/src/test/java/com/mentra/bluetoothsdk/NetworkDiagnosticsTest.kt +55 -0
  28. package/android/src/test/java/com/mentra/bluetoothsdk/ScanCompletionTest.kt +5 -1
  29. package/android/src/test/java/com/mentra/bluetoothsdk/debug/BleTraceLoggerTest.kt +69 -0
  30. package/android/src/test/java/com/mentra/bluetoothsdk/sgcs/ClassicAudioServiceDiscoveryTest.kt +124 -0
  31. package/android/src/test/java/com/mentra/bluetoothsdk/sgcs/G1TextSanitizerTest.kt +29 -4
  32. package/android/src/test/java/com/mentra/bluetoothsdk/sgcs/MentraLiveClassicDisconnectTest.kt +133 -0
  33. package/android/src/test/java/com/mentra/bluetoothsdk/sgcs/MentraLiveIncidentDispatchTest.kt +126 -0
  34. package/android/src/test/java/com/mentra/bluetoothsdk/sgcs/MentraLiveWifiCredentialLogTest.kt +55 -0
  35. package/android/src/test/java/com/mentra/bluetoothsdk/sgcs/NimoCanvasCodecTest.kt +20 -7
  36. package/build/BluetoothSdk.types.d.ts +3 -0
  37. package/build/BluetoothSdk.types.d.ts.map +1 -1
  38. package/build/BluetoothSdk.types.js.map +1 -1
  39. package/build/_private/BluetoothSdkModule.d.ts.map +1 -1
  40. package/build/_private/BluetoothSdkModule.js +2 -1
  41. package/build/_private/BluetoothSdkModule.js.map +1 -1
  42. package/build/_private/MentraLocalNetworkModule.d.ts +23 -0
  43. package/build/_private/MentraLocalNetworkModule.d.ts.map +1 -1
  44. package/build/_private/MentraLocalNetworkModule.js.map +1 -1
  45. package/build/_private/nativeLogConsole.d.ts +19 -0
  46. package/build/_private/nativeLogConsole.d.ts.map +1 -1
  47. package/build/_private/nativeLogConsole.js +12 -0
  48. package/build/_private/nativeLogConsole.js.map +1 -1
  49. package/build/generated/changelogCatalog.d.ts +4 -1
  50. package/build/generated/changelogCatalog.d.ts.map +1 -1
  51. package/build/generated/changelogCatalog.js +5 -1
  52. package/build/generated/changelogCatalog.js.map +1 -1
  53. package/build/generated/releaseMetadata.js +6 -6
  54. package/build/generated/releaseMetadata.js.map +1 -1
  55. package/build/ota-transport/index.d.ts +4 -0
  56. package/build/ota-transport/index.d.ts.map +1 -1
  57. package/build/ota-transport/index.js +2 -0
  58. package/build/ota-transport/index.js.map +1 -1
  59. package/ios/BluetoothSdkModule.swift +8 -4
  60. package/ios/Source/BluetoothSdkDefaults.swift +2 -2
  61. package/ios/Source/DeviceManager.swift +6 -3
  62. package/ios/Source/GeneratedChangelogCatalog.swift +2 -1
  63. package/ios/Source/GeneratedReleaseMetadata.swift +6 -6
  64. package/ios/Source/MentraBluetoothSDK.swift +295 -54
  65. package/ios/Source/internal/BluetoothAvailability.swift +6 -0
  66. package/ios/Source/internal/BluetoothSdkAnalytics.swift +87 -13
  67. package/ios/Source/internal/BluetoothSdkAnalyticsTracker.swift +54 -1
  68. package/ios/Source/internal/BluetoothSdkInstallId.swift +21 -0
  69. package/ios/Source/internal/BluetoothSdkUpdateCheck.swift +223 -0
  70. package/ios/Source/internal/BluetoothSdkUsageTracker.swift +428 -0
  71. package/ios/Source/sgcs/MentraLive.swift +71 -41
  72. package/ios/Source/sgcs/NimoCanvasCodec.swift +4 -1
  73. package/ios/Source/sgcs/SGCManager.swift +1 -1
  74. package/ios/Source/utils/AudioSessionMonitor.swift +44 -8
  75. package/ios/Source/utils/G1Text.swift +2 -24
  76. package/ios/Source/utils/G1TextSanitizer.swift +27 -0
  77. package/ios/Source/utils/LatinTextSanitizer.swift +48 -0
  78. package/ios/Tests/BluetoothAudioRouteTests.swift +26 -0
  79. package/ios/Tests/BluetoothSdkAnalyticsTrackerTests.swift +54 -3
  80. package/ios/Tests/BluetoothSdkUpdateCheckTests.swift +153 -0
  81. package/ios/Tests/BluetoothSdkUsageTrackerTests.swift +296 -0
  82. package/ios/Tests/G1TextSanitizerTests.swift +32 -0
  83. package/ios/Tests/IncidentLogDispatchTests.swift +111 -0
  84. package/ios/Tests/MentraLiveSessionReadinessTests.swift +163 -0
  85. package/ios/Tests/NimoCanvasCodecTests.swift +17 -4
  86. package/ios/Tests/VersionInfoCommandTests.swift +142 -1
  87. package/ios/Tests/WifiCredentialLoggingTests.swift +42 -0
  88. package/package.json +2 -2
  89. package/src/BluetoothSdk.types.ts +1 -0
  90. package/src/_private/BluetoothSdkModule.ts +2 -1
  91. package/src/_private/MentraLocalNetworkModule.ts +28 -0
  92. package/src/_private/nativeLogConsole.ts +19 -0
  93. package/src/generated/changelogCatalog.ts +5 -1
  94. package/src/generated/releaseMetadata.ts +6 -6
  95. package/src/ota-transport/index.ts +10 -1
@@ -1,4 +1,26 @@
1
1
  import { NativeModule } from "expo";
2
+ export type NetworkCapabilitiesDiagnostic = {
3
+ wifi: boolean;
4
+ cellular: boolean;
5
+ ethernet: boolean;
6
+ vpn: boolean;
7
+ internet: boolean;
8
+ validated: boolean;
9
+ captivePortal: boolean;
10
+ };
11
+ export type NetworkObservation = {
12
+ present: boolean;
13
+ capabilities: NetworkCapabilitiesDiagnostic | null;
14
+ };
15
+ export type NetworkDiagnostics = {
16
+ sampledAtMs: number;
17
+ processBound: NetworkObservation;
18
+ activeNetwork: NetworkObservation;
19
+ glassesLocal: NetworkObservation;
20
+ processBoundMatchesActive: boolean;
21
+ processBoundMatchesGlassesLocal: boolean;
22
+ activeNetworkMatchesGlassesLocal: boolean;
23
+ };
2
24
  export type LocalNetworkResponse = {
3
25
  status: number;
4
26
  headers: Record<string, string>;
@@ -23,6 +45,7 @@ type LocalNetworkEvents = {
23
45
  }) => void;
24
46
  };
25
47
  declare class MentraLocalNetworkNativeModule extends NativeModule<LocalNetworkEvents> {
48
+ getNetworkDiagnostics(): NetworkDiagnostics;
26
49
  connect(ssid: string, password: string): Promise<{
27
50
  connected: boolean;
28
51
  ssid: string;
@@ -1 +1 @@
1
- {"version":3,"file":"MentraLocalNetworkModule.d.ts","sourceRoot":"","sources":["../../src/_private/MentraLocalNetworkModule.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,YAAY,EAA8B,MAAM,MAAM,CAAA;AAE9D,MAAM,MAAM,oBAAoB,GAAG;IACjC,MAAM,EAAE,MAAM,CAAA;IACd,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;IAC/B,UAAU,EAAE,MAAM,CAAA;CACnB,CAAA;AAED,MAAM,MAAM,0BAA0B,GAAG;IACvC,UAAU,EAAE,MAAM,CAAA;IAClB,YAAY,EAAE,MAAM,CAAA;IACpB,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;CAChC,CAAA;AAED,MAAM,MAAM,4BAA4B,GAAG;IACzC,SAAS,EAAE,MAAM,CAAA;IACjB,YAAY,EAAE,MAAM,CAAA;IACpB,aAAa,EAAE,MAAM,CAAA;IACrB,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;CACjC,CAAA;AAED,KAAK,kBAAkB,GAAG;IACxB,gBAAgB,EAAE,CAAC,KAAK,EAAE,4BAA4B,KAAK,IAAI,CAAA;IAC/D,WAAW,EAAE,CAAC,KAAK,EAAE;QAAC,IAAI,EAAE,MAAM,CAAA;KAAC,KAAK,IAAI,CAAA;CAC7C,CAAA;AAED,OAAO,OAAO,8BAA+B,SAAQ,YAAY,CAAC,kBAAkB,CAAC;IACnF,OAAO,CAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,MAA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AC;QAAC,IAAI,EAAE,MAAM,CAAC;QAAC,YAAY,CAAC,EAAE,MAAM,CAAA;KAAC,CAAC;IAC3G,OAAO,CACL,SAAS,EAAE,MAAM,EACjB,GAAG,EAAE,MAAM,EACX,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,EAC/B,IAAI,EAAE,MAAM,GAAG,IAAI,EACnB,SAAS,EAAE,MAAM,GAChB,OAAO,CAAC,oBAAoB,CAAC;IAChC,QAAQ,CACN,SAAS,EAAE,MAAM,EACjB,GAAG,EAAE,MAAM,EACX,WAAW,EAAE,MAAM,EACnB,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,EAC/B,mBAAmB,EAAE,MAAM,EAC3B,aAAa,EAAE,MAAM,GACpB,OAAO,CAAC,0BAA0B,CAAC;IACtC,MAAM,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IACxC,UAAU,IAAI,OAAO,CAAC,IAAI,CAAC;CAC5B;;AAED,wBAAgG"}
@@ -1 +1 @@
1
- {"version":3,"file":"MentraLocalNetworkModule.js","sourceRoot":"","sources":["../../src/_private/MentraLocalNetworkModule.ts"],"names":[],"mappings":"AAAA,OAAO,EAAe,2BAA2B,EAAC,MAAM,MAAM,CAAA;AAiD9D,eAAe,2BAA2B,CAAiC,oBAAoB,CAAC,CAAA","sourcesContent":["import {NativeModule, requireOptionalNativeModule} from \"expo\"\n\nexport type LocalNetworkResponse = {\n status: number\n headers: Record<string, string>\n bodyBase64: string\n}\n\nexport type LocalNetworkDownloadResult = {\n statusCode: number\n bytesWritten: number\n headers: Record<string, string>\n}\n\nexport type LocalNetworkDownloadProgress = {\n requestId: string\n bytesWritten: number\n contentLength: number\n statusCode?: number\n headers?: Record<string, string>\n}\n\ntype LocalNetworkEvents = {\n downloadProgress: (event: LocalNetworkDownloadProgress) => void\n networkLost: (event: {ssid: string}) => void\n}\n\ndeclare class MentraLocalNetworkNativeModule extends NativeModule<LocalNetworkEvents> {\n connect(ssid: string, password: string): Promise<{connected: boolean; ssid: string; localAddress?: string}>\n request(\n requestId: string,\n url: string,\n method: string,\n headers: Record<string, string>,\n body: string | null,\n timeoutMs: number,\n ): Promise<LocalNetworkResponse>\n download(\n requestId: string,\n url: string,\n destination: string,\n headers: Record<string, string>,\n connectionTimeoutMs: number,\n readTimeoutMs: number,\n ): Promise<LocalNetworkDownloadResult>\n cancel(requestId: string): Promise<void>\n disconnect(): Promise<void>\n}\n\nexport default requireOptionalNativeModule<MentraLocalNetworkNativeModule>(\"MentraLocalNetwork\")\n"]}
1
+ {"version":3,"file":"MentraLocalNetworkModule.js","sourceRoot":"","sources":["../../src/_private/MentraLocalNetworkModule.ts"],"names":[],"mappings":"AAAA,OAAO,EAAe,2BAA2B,EAAC,MAAM,MAAM,CAAA;AA6E9D,eAAe,2BAA2B,CAAiC,oBAAoB,CAAC,CAAA","sourcesContent":["import {NativeModule, requireOptionalNativeModule} from \"expo\"\n\nexport type NetworkCapabilitiesDiagnostic = {\n wifi: boolean\n cellular: boolean\n ethernet: boolean\n vpn: boolean\n internet: boolean\n validated: boolean\n captivePortal: boolean\n}\n\nexport type NetworkObservation = {\n present: boolean\n // A present network with null capabilities has disappeared or cannot be inspected.\n capabilities: NetworkCapabilitiesDiagnostic | null\n}\n\nexport type NetworkDiagnostics = {\n sampledAtMs: number\n processBound: NetworkObservation\n // ConnectivityManager.activeNetwork is the caller's active default, not a privileged global read.\n activeNetwork: NetworkObservation\n glassesLocal: NetworkObservation\n processBoundMatchesActive: boolean\n processBoundMatchesGlassesLocal: boolean\n activeNetworkMatchesGlassesLocal: boolean\n}\n\nexport type LocalNetworkResponse = {\n status: number\n headers: Record<string, string>\n bodyBase64: string\n}\n\nexport type LocalNetworkDownloadResult = {\n statusCode: number\n bytesWritten: number\n headers: Record<string, string>\n}\n\nexport type LocalNetworkDownloadProgress = {\n requestId: string\n bytesWritten: number\n contentLength: number\n statusCode?: number\n headers?: Record<string, string>\n}\n\ntype LocalNetworkEvents = {\n downloadProgress: (event: LocalNetworkDownloadProgress) => void\n networkLost: (event: {ssid: string}) => void\n}\n\ndeclare class MentraLocalNetworkNativeModule extends NativeModule<LocalNetworkEvents> {\n getNetworkDiagnostics(): NetworkDiagnostics\n connect(ssid: string, password: string): Promise<{connected: boolean; ssid: string; localAddress?: string}>\n request(\n requestId: string,\n url: string,\n method: string,\n headers: Record<string, string>,\n body: string | null,\n timeoutMs: number,\n ): Promise<LocalNetworkResponse>\n download(\n requestId: string,\n url: string,\n destination: string,\n headers: Record<string, string>,\n connectionTimeoutMs: number,\n readTimeoutMs: number,\n ): Promise<LocalNetworkDownloadResult>\n cancel(requestId: string): Promise<void>\n disconnect(): Promise<void>\n}\n\nexport default requireOptionalNativeModule<MentraLocalNetworkNativeModule>(\"MentraLocalNetwork\")\n"]}
@@ -13,5 +13,24 @@ type SubscribedLogSource = LogSource & {
13
13
  };
14
14
  export declare function nativeLogMessage(message: string): string;
15
15
  export declare function installNativeLogConsole(source: SubscribedLogSource, platform: string): void;
16
+ type UpdateNoticeSource = {
17
+ addListener(event: "sdk_update_notice", listener: (event: {
18
+ message: string;
19
+ }) => void): {
20
+ remove(): void;
21
+ };
22
+ };
23
+ declare const updateNoticeKey: unique symbol;
24
+ type SubscribedUpdateNoticeSource = UpdateNoticeSource & {
25
+ [updateNoticeKey]?: {
26
+ remove(): void;
27
+ };
28
+ };
29
+ /**
30
+ * The native SDK checks for a newer Mentra Bluetooth SDK at startup and emits
31
+ * its banner when this app is behind. A console warning reaches the developer
32
+ * in Metro and, in debug builds, as a LogBox warning; release builds show no UI.
33
+ */
34
+ export declare function installSdkUpdateNotice(source: SubscribedUpdateNoticeSource): void;
16
35
  export {};
17
36
  //# sourceMappingURL=nativeLogConsole.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"nativeLogConsole.d.ts","sourceRoot":"","sources":["../../src/_private/nativeLogConsole.ts"],"names":[],"mappings":"AAAA,K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KAAK,EAAE;QAAC,OAAO,EAAE,MAAM,CAAA;KAAC,KAAK,IAAI,GAAG;QAAC,MAAM,IAAI,IAAI,CAAA;KAAC,CAAA;CACxG,CAAA;AAED,QAAA,MAAM,eAAe,eAAmD,CAAA;AACxE,KAAK,4BAA4B,GAAG,kBAAkB,GAAG;IAAC,CAAC,eAAe,CAAC,CAAC,EAAE;QAAC,MAAM,IAAI,IAAI,CAAA;KAAC,CAAA;CAAC,CAAA;AAE/F;;;;GAIG;AACH,wBAAgB,sBAAsB,CAAC,MAAM,EAAE,4BAA4B,GAAG,IAAI,CAKjF"}
@@ -13,4 +13,16 @@ export function installNativeLogConsole(source, platform) {
13
13
  console.log(`[native:${platform}]`, nativeLogMessage(message));
14
14
  });
15
15
  }
16
+ const updateNoticeKey = Symbol.for("mentra.bluetooth-sdk.update-notice");
17
+ /**
18
+ * The native SDK checks for a newer Mentra Bluetooth SDK at startup and emits
19
+ * its banner when this app is behind. A console warning reaches the developer
20
+ * in Metro and, in debug builds, as a LogBox warning; release builds show no UI.
21
+ */
22
+ export function installSdkUpdateNotice(source) {
23
+ source[updateNoticeKey]?.remove();
24
+ source[updateNoticeKey] = source.addListener("sdk_update_notice", ({ message }) => {
25
+ console.warn(message);
26
+ });
27
+ }
16
28
  //# sourceMappingURL=nativeLogConsole.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"nativeLogConsole.js","sourceRoot":"","sources":["../../src/_private/nativeLogConsole.ts"],"names":[],"mappings":"AAIA,6EAA6E;AAC7E,+EAA+E;AAC/E,MAAM,eAAe,GAAG,MAAM,CAAC,GAAG,CAAC,yCAAyC,CAAC,CAAA;AAG7E,MAAM,iBAAiB,GACrB,kSAAkS,CAAA;AAEpS,MAAM,UAAU,gBAAgB,CAAC,OAAe;IAC9C,OAAO,iBAAiB,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,EAAE,MAAM,CAAC,CAAA;AAClF,CAAC;AAED,MAAM,UAAU,uBAAuB,CAAC,MAA2B,EAAE,QAAgB;IACnF,MAAM,CAAC,eAAe,CAAC,EAAE,MAAM,EAAE,CAAA;IACjC,MAAM,CAAC,eAAe,CAAC,GAAG,MAAM,CAAC,WAAW,CAAC,KAAK,EAAE,CAAC,EAAC,OAAO,EAAC,EAAE,EAAE;QAChE,yEAAyE;QACzE,6DAA6D;QAC7D,OAAO,CAAC,GAAG,CAAC,WAAW,QAAQ,GAAG,EAAE,gBAAgB,CAAC,OAAO,CAAC,CAAC,CAAA;IAChE,CAAC,CAAC,CAAA;AACJ,CAAC","sourcesContent":["type LogSource = {\n addListener(event: \"log\", listener: (event: {message: string}) => void): {remove(): void}\n}\n\n// The native module survives Fast Refresh. Replace its previous subscription\n// when JS reloads this module, rather than printing each event more than once.\nconst subscriptionKey = Symbol.for(\"mentra.bluetooth-sdk.native-log-console\")\ntype SubscribedLogSource = LogSource & {[subscriptionKey]?: {remove(): void}}\n\nconst credentialPattern =\n /(?<![A-Za-z0-9])(?:access[_-]?token|refresh[_-]?token|auth[_-]?token|id[_-]?token|client[_-]?secret|api[_-]?key)(?![A-Za-z0-9])|(?<![A-Za-z0-9])(?:token|password|secret|authorization|auth|key)(?![A-Za-z0-9])\\s*[\"']?\\s*(?:is\\s*)?[:=]\\s*[\"']?\\S+|(?<![A-Za-z0-9])bearer(?![A-Za-z0-9])\\s+\\S+/i\n\nexport function nativeLogMessage(message: string): string {\n return credentialPattern.test(message) ? \"[REDACTED]\" : message.slice(0, 16_384)\n}\n\nexport function installNativeLogConsole(source: SubscribedLogSource, platform: string): void {\n source[subscriptionKey]?.remove()\n source[subscriptionKey] = source.addListener(\"log\", ({message}) => {\n // Resolve console at delivery time so host console interception receives\n // native diagnostics in the same stream as ordinary JS logs.\n console.log(`[native:${platform}]`, nativeLogMessage(message))\n })\n}\n"]}
1
+ {"version":3,"file":"nativeLogConsole.js","sourceRoot":"","sources":["../../src/_private/nativeLogConsole.ts"],"names":[],"mappings":"AAIA,6EAA6E;AAC7E,+EAA+E;AAC/E,MAAM,eAAe,GAAG,MAAM,CAAC,GAAG,CAAC,yCAAyC,CAAC,CAAA;AAG7E,MAAM,iBAAiB,GACrB,kSAAkS,CAAA;AAEpS,MAAM,UAAU,gBAAgB,CAAC,OAAe;IAC9C,OAAO,iBAAiB,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,EAAE,MAAM,CAAC,CAAA;AAClF,CAAC;AAED,MAAM,UAAU,uBAAuB,CAAC,MAA2B,EAAE,QAAgB;IACnF,MAAM,CAAC,eAAe,CAAC,EAAE,MAAM,EAAE,CAAA;IACjC,MAAM,CAAC,eAAe,CAAC,GAAG,MAAM,CAAC,WAAW,CAAC,KAAK,EAAE,CAAC,EAAC,OAAO,EAAC,EAAE,EAAE;QAChE,yEAAyE;QACzE,6DAA6D;QAC7D,OAAO,CAAC,GAAG,CAAC,WAAW,QAAQ,GAAG,EAAE,gBAAgB,CAAC,OAAO,CAAC,CAAC,CAAA;IAChE,CAAC,CAAC,CAAA;AACJ,CAAC;AAMD,MAAM,eAAe,GAAG,MAAM,CAAC,GAAG,CAAC,oCAAoC,CAAC,CAAA;AAGxE;;;;GAIG;AACH,MAAM,UAAU,sBAAsB,CAAC,MAAoC;IACzE,MAAM,CAAC,eAAe,CAAC,EAAE,MAAM,EAAE,CAAA;IACjC,MAAM,CAAC,eAAe,CAAC,GAAG,MAAM,CAAC,WAAW,CAAC,mBAAmB,EAAE,CAAC,EAAC,OAAO,EAAC,EAAE,EAAE;QAC9E,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,CAAA;IACvB,CAAC,CAAC,CAAA;AACJ,CAAC","sourcesContent":["type LogSource = {\n addListener(event: \"log\", listener: (event: {message: string}) => void): {remove(): void}\n}\n\n// The native module survives Fast Refresh. Replace its previous subscription\n// when JS reloads this module, rather than printing each event more than once.\nconst subscriptionKey = Symbol.for(\"mentra.bluetooth-sdk.native-log-console\")\ntype SubscribedLogSource = LogSource & {[subscriptionKey]?: {remove(): void}}\n\nconst credentialPattern =\n /(?<![A-Za-z0-9])(?:access[_-]?token|refresh[_-]?token|auth[_-]?token|id[_-]?token|client[_-]?secret|api[_-]?key)(?![A-Za-z0-9])|(?<![A-Za-z0-9])(?:token|password|secret|authorization|auth|key)(?![A-Za-z0-9])\\s*[\"']?\\s*(?:is\\s*)?[:=]\\s*[\"']?\\S+|(?<![A-Za-z0-9])bearer(?![A-Za-z0-9])\\s+\\S+/i\n\nexport function nativeLogMessage(message: string): string {\n return credentialPattern.test(message) ? \"[REDACTED]\" : message.slice(0, 16_384)\n}\n\nexport function installNativeLogConsole(source: SubscribedLogSource, platform: string): void {\n source[subscriptionKey]?.remove()\n source[subscriptionKey] = source.addListener(\"log\", ({message}) => {\n // Resolve console at delivery time so host console interception receives\n // native diagnostics in the same stream as ordinary JS logs.\n console.log(`[native:${platform}]`, nativeLogMessage(message))\n })\n}\n\ntype UpdateNoticeSource = {\n addListener(event: \"sdk_update_notice\", listener: (event: {message: string}) => void): {remove(): void}\n}\n\nconst updateNoticeKey = Symbol.for(\"mentra.bluetooth-sdk.update-notice\")\ntype SubscribedUpdateNoticeSource = UpdateNoticeSource & {[updateNoticeKey]?: {remove(): void}}\n\n/**\n * The native SDK checks for a newer Mentra Bluetooth SDK at startup and emits\n * its banner when this app is behind. A console warning reaches the developer\n * in Metro and, in debug builds, as a LogBox warning; release builds show no UI.\n */\nexport function installSdkUpdateNotice(source: SubscribedUpdateNoticeSource): void {\n source[updateNoticeKey]?.remove()\n source[updateNoticeKey] = source.addListener(\"sdk_update_notice\", ({message}) => {\n console.warn(message)\n })\n}\n"]}
@@ -1,10 +1,13 @@
1
1
  /** Generated from /changelogs. Do not edit directly. */
2
2
  export declare const GENERATED_RELEASE_CHANGELOGS: readonly [{
3
+ readonly version: "3.3.0";
4
+ readonly markdown: "This release is under active development. User-facing changes will be documented as they land.";
5
+ }, {
3
6
  readonly version: "3.2.1";
4
7
  readonly markdown: "- **Livestreamer:** \"Stream Here\" now works without a Wi-Fi network. Improved stream startup and connection reliability.\n- **Photos and gallery:** More reliable photo capture and gallery syncing.\n- **Mentra AI:** Reliability improvements and bug fixes.\n- **Miniapps:** Smoother transitions, with back buttons and gestures that take you to the previous screen inside a miniapp.\n- **Pairing and connections:** Improved G1 pairing and G2 background reconnection.\n- **Glasses updates:** Fixed repeated update checks and improved recovery after interrupted updates.\n- **Mentra Maps:** Bug fixes.\n- **NIMO:** Improved text and map layouts.\n- **Self-hosting:** Connect the Mentra App to your own self-hosted Mentra backend.";
5
8
  }, {
6
9
  readonly version: "3.2.0";
7
- readonly markdown: "- Improved glasses connectivity and Wi-Fi setup.";
10
+ readonly markdown: "- Improved glasses connectivity and Wi-Fi setup.\n\n- Breaking Bluetooth SDK change: `forgetWifiNetwork(ssid)` now returns `WifiForgetResult` instead of `WifiStatusChangeEvent`. Migrate status-only consumers to the semantic `outcome`; the requested network remains `ssid`, while optional post-command connectivity is reported by `connected`, `currentSsid`, and `localIp`.";
8
11
  }, {
9
12
  readonly version: "3.1.1";
10
13
  readonly markdown: "- Improved Google login on iOS.\n- Pairing no longer requires phone microphone access.";
@@ -1 +1 @@
1
- {"version":3,"file":"changelogCatalog.d.ts","sourceRoot":"","sources":["../../src/generated/changelogCatalog.ts"],"names":[],"mappings":"AAAA,wDAAwD;AACxD,eAAO,MAAM,4BAA4B;;;;;;;;;;;;EAmBxC,CAAA"}
1
+ {"version":3,"file":"changelogCatalog.d.ts","sourceRoot":"","sources":["../../src/generated/changelogCatalog.ts"],"names":[],"mappings":"AAAA,wDAAwD;AACxD,eAAO,MAAM,4BAA4B;;;;;;;;;;;;;;;EAuBxC,CAAA"}
@@ -1,12 +1,16 @@
1
1
  /** Generated from /changelogs. Do not edit directly. */
2
2
  export const GENERATED_RELEASE_CHANGELOGS = Object.freeze([
3
+ {
4
+ "version": "3.3.0",
5
+ "markdown": "This release is under active development. User-facing changes will be documented as they land."
6
+ },
3
7
  {
4
8
  "version": "3.2.1",
5
9
  "markdown": "- **Livestreamer:** \"Stream Here\" now works without a Wi-Fi network. Improved stream startup and connection reliability.\n- **Photos and gallery:** More reliable photo capture and gallery syncing.\n- **Mentra AI:** Reliability improvements and bug fixes.\n- **Miniapps:** Smoother transitions, with back buttons and gestures that take you to the previous screen inside a miniapp.\n- **Pairing and connections:** Improved G1 pairing and G2 background reconnection.\n- **Glasses updates:** Fixed repeated update checks and improved recovery after interrupted updates.\n- **Mentra Maps:** Bug fixes.\n- **NIMO:** Improved text and map layouts.\n- **Self-hosting:** Connect the Mentra App to your own self-hosted Mentra backend."
6
10
  },
7
11
  {
8
12
  "version": "3.2.0",
9
- "markdown": "- Improved glasses connectivity and Wi-Fi setup."
13
+ "markdown": "- Improved glasses connectivity and Wi-Fi setup.\n\n- Breaking Bluetooth SDK change: `forgetWifiNetwork(ssid)` now returns `WifiForgetResult` instead of `WifiStatusChangeEvent`. Migrate status-only consumers to the semantic `outcome`; the requested network remains `ssid`, while optional post-command connectivity is reported by `connected`, `currentSsid`, and `localIp`."
10
14
  },
11
15
  {
12
16
  "version": "3.1.1",
@@ -1 +1 @@
1
- {"version":3,"file":"changelogCatalog.js","sourceRoot":"","sources":["../../src/generated/changelogCatalog.ts"],"names":[],"mappings":"AAAA,wDAAwD;AACxD,MAAM,CAAC,MAAM,4BAA4B,GAAG,MAAM,CAAC,MAAM,CACzD;IACE;QACE,SAAS,EAAE,OAAO;QAClB,UAAU,EAAE,wtBAAwtB;KACruB;IACD;QACE,SAAS,EAAE,OAAO;QAClB,UAAU,EAAE,kDAAkD;KAC/D;IACD;QACE,SAAS,EAAE,OAAO;QAClB,UAAU,EAAE,wFAAwF;KACrG;IACD;QACE,SAAS,EAAE,OAAO;QAClB,UAAU,EAAE,mrCAAmrC;KAChsC;CACO,CACT,CAAA","sourcesContent":["/** Generated from /changelogs. Do not edit directly. */\nexport const GENERATED_RELEASE_CHANGELOGS = Object.freeze(\n[\n {\n \"version\": \"3.2.1\",\n \"markdown\": \"- **Livestreamer:** \\\"Stream Here\\\" now works without a Wi-Fi network. Improved stream startup and connection reliability.\\n- **Photos and gallery:** More reliable photo capture and gallery syncing.\\n- **Mentra AI:** Reliability improvements and bug fixes.\\n- **Miniapps:** Smoother transitions, with back buttons and gestures that take you to the previous screen inside a miniapp.\\n- **Pairing and connections:** Improved G1 pairing and G2 background reconnection.\\n- **Glasses updates:** Fixed repeated update checks and improved recovery after interrupted updates.\\n- **Mentra Maps:** Bug fixes.\\n- **NIMO:** Improved text and map layouts.\\n- **Self-hosting:** Connect the Mentra App to your own self-hosted Mentra backend.\"\n },\n {\n \"version\": \"3.2.0\",\n \"markdown\": \"- Improved glasses connectivity and Wi-Fi setup.\"\n },\n {\n \"version\": \"3.1.1\",\n \"markdown\": \"- Improved Google login on iOS.\\n- Pairing no longer requires phone microphone access.\"\n },\n {\n \"version\": \"3.1.0\",\n \"markdown\": \"**Mentra App and glasses**\\n\\n- Improved glasses pairing and reconnection, including on iPad.\\n- Improved Android background reliability for captions and miniapps.\\n- Added Xingyi AR99 support.\\n- More reliable photo and video capture, with improved shutter sounds and privacy-light timing. Taking photos no longer interrupts your running miniapp.\\n- Added video thumbnails and smoother gallery browsing.\\n- Easier Mentra Live updates through your phone, with clearer progress and better recovery from interruptions.\\n\\n**Miniapp updates**\\n\\n- **Mentra AI:** Control whether photos are included with questions. Improved visual answers and connected-app follow-ups.\\n- **Captions:** Added offline transcription settings and top/bottom positioning on supported displays.\\n- **Translation:** Restored all 60 languages.\\n- **Mentra Maps:** Clearer directions on G1/G2, less display flickering, and improved Android offline routing.\\n- **Livestreamer:** More video-quality controls and custom streaming options, plus improved startup and sharing.\\n- **Merge:** Tap to expand an insight; swipe down or back to dismiss it.\\n- **Mentra Notes:** Smoother back navigation.\\n- **Recorder:** Fixed audio sharing.\"\n }\n] as const,\n)\n"]}
1
+ {"version":3,"file":"changelogCatalog.js","sourceRoot":"","sources":["../../src/generated/changelogCatalog.ts"],"names":[],"mappings":"AAAA,wDAAwD;AACxD,MAAM,CAAC,MAAM,4BAA4B,GAAG,MAAM,CAAC,MAAM,CACzD;IACE;QACE,SAAS,EAAE,OAAO;QAClB,UAAU,EAAE,gGAAgG;KAC7G;IACD;QACE,SAAS,EAAE,OAAO;QAClB,UAAU,EAAE,wtBAAwtB;KACruB;IACD;QACE,SAAS,EAAE,OAAO;QAClB,UAAU,EAAE,qXAAqX;KAClY;IACD;QACE,SAAS,EAAE,OAAO;QAClB,UAAU,EAAE,wFAAwF;KACrG;IACD;QACE,SAAS,EAAE,OAAO;QAClB,UAAU,EAAE,mrCAAmrC;KAChsC;CACO,CACT,CAAA","sourcesContent":["/** Generated from /changelogs. Do not edit directly. */\nexport const GENERATED_RELEASE_CHANGELOGS = Object.freeze(\n[\n {\n \"version\": \"3.3.0\",\n \"markdown\": \"This release is under active development. User-facing changes will be documented as they land.\"\n },\n {\n \"version\": \"3.2.1\",\n \"markdown\": \"- **Livestreamer:** \\\"Stream Here\\\" now works without a Wi-Fi network. Improved stream startup and connection reliability.\\n- **Photos and gallery:** More reliable photo capture and gallery syncing.\\n- **Mentra AI:** Reliability improvements and bug fixes.\\n- **Miniapps:** Smoother transitions, with back buttons and gestures that take you to the previous screen inside a miniapp.\\n- **Pairing and connections:** Improved G1 pairing and G2 background reconnection.\\n- **Glasses updates:** Fixed repeated update checks and improved recovery after interrupted updates.\\n- **Mentra Maps:** Bug fixes.\\n- **NIMO:** Improved text and map layouts.\\n- **Self-hosting:** Connect the Mentra App to your own self-hosted Mentra backend.\"\n },\n {\n \"version\": \"3.2.0\",\n \"markdown\": \"- Improved glasses connectivity and Wi-Fi setup.\\n\\n- Breaking Bluetooth SDK change: `forgetWifiNetwork(ssid)` now returns `WifiForgetResult` instead of `WifiStatusChangeEvent`. Migrate status-only consumers to the semantic `outcome`; the requested network remains `ssid`, while optional post-command connectivity is reported by `connected`, `currentSsid`, and `localIp`.\"\n },\n {\n \"version\": \"3.1.1\",\n \"markdown\": \"- Improved Google login on iOS.\\n- Pairing no longer requires phone microphone access.\"\n },\n {\n \"version\": \"3.1.0\",\n \"markdown\": \"**Mentra App and glasses**\\n\\n- Improved glasses pairing and reconnection, including on iPad.\\n- Improved Android background reliability for captions and miniapps.\\n- Added Xingyi AR99 support.\\n- More reliable photo and video capture, with improved shutter sounds and privacy-light timing. Taking photos no longer interrupts your running miniapp.\\n- Added video thumbnails and smoother gallery browsing.\\n- Easier Mentra Live updates through your phone, with clearer progress and better recovery from interruptions.\\n\\n**Miniapp updates**\\n\\n- **Mentra AI:** Control whether photos are included with questions. Improved visual answers and connected-app follow-ups.\\n- **Captions:** Added offline transcription settings and top/bottom positioning on supported displays.\\n- **Translation:** Restored all 60 languages.\\n- **Mentra Maps:** Clearer directions on G1/G2, less display flickering, and improved Android offline routing.\\n- **Livestreamer:** More video-quality controls and custom streaming options, plus improved startup and sharing.\\n- **Merge:** Tap to expand an insight; swipe down or back to dismiss it.\\n- **Mentra Notes:** Smoother back navigation.\\n- **Recorder:** Fixed audio sharing.\"\n }\n] as const,\n)\n"]}
@@ -1,10 +1,10 @@
1
1
  export const BLUETOOTH_SDK_RELEASE_METADATA = Object.freeze({
2
2
  "schemaVersion": 1,
3
- "familyBaseVersion": "3.2.1",
4
- "releaseIdentity": "3.2.1",
5
- "releaseSetId": "mentra-3.2.1",
6
- "sourceCommit": "be56e1456c69f681985642f376ed3d397ec022cc",
7
- "otaManifestUrl": "https://artifactscdn.mentraglass.com/Mentra-Community/MentraOS/releases/mentra-builds-v3.2.1/mentra-live-ota-3.2.1-beta.578.json",
8
- "otaManifestSha256": "21af62269e29fd2ee6b9737745a895694bc221672b191d80795057b5a832f400"
3
+ "familyBaseVersion": "3.3.0",
4
+ "releaseIdentity": "3.3.0-beta.954",
5
+ "releaseSetId": "mentra-3.3.0-beta.954",
6
+ "sourceCommit": "25f6b1d70ce39dfe5d454021542f1627e256775a",
7
+ "otaManifestUrl": "https://artifactscdn.mentraglass.com/Mentra-Community/MentraOS/releases/mentra-builds-v3.3.0/mentra-live-ota-3.3.0-beta.954.json",
8
+ "otaManifestSha256": "03d976cb897215b97b5c40a53dabbc8356a045d1fbb57d5ad2c95bbc21203e21"
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,8BAA8B,GAA0C,MAAM,CAAC,MAAM,CAAC;IACjG,eAAe,EAAE,CAAC;IAClB,mBAAmB,EAAE,OAAO;IAC5B,iBAAiB,EAAE,OAAO;IAC1B,cAAc,EAAE,cAAc;IAC9B,cAAc,EAAE,0CAA0C;IAC1D,gBAAgB,EAAE,kIAAkI;IACpJ,mBAAmB,EAAE,kEAAkE;CACxF,CAAC,CAAA","sourcesContent":["/** Generated by release CI. Do not edit in a release checkout. */\nexport interface BluetoothSdkReleaseMetadata {\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 BLUETOOTH_SDK_RELEASE_METADATA: Readonly<BluetoothSdkReleaseMetadata> = Object.freeze({\n \"schemaVersion\": 1,\n \"familyBaseVersion\": \"3.2.1\",\n \"releaseIdentity\": \"3.2.1\",\n \"releaseSetId\": \"mentra-3.2.1\",\n \"sourceCommit\": \"be56e1456c69f681985642f376ed3d397ec022cc\",\n \"otaManifestUrl\": \"https://artifactscdn.mentraglass.com/Mentra-Community/MentraOS/releases/mentra-builds-v3.2.1/mentra-live-ota-3.2.1-beta.578.json\",\n \"otaManifestSha256\": \"21af62269e29fd2ee6b9737745a895694bc221672b191d80795057b5a832f400\"\n})\n"]}
1
+ {"version":3,"file":"releaseMetadata.js","sourceRoot":"","sources":["../../src/generated/releaseMetadata.ts"],"names":[],"mappings":"AAWA,MAAM,CAAC,MAAM,8BAA8B,GAA0C,MAAM,CAAC,MAAM,CAAC;IACjG,eAAe,EAAE,CAAC;IAClB,mBAAmB,EAAE,OAAO;IAC5B,iBAAiB,EAAE,gBAAgB;IACnC,cAAc,EAAE,uBAAuB;IACvC,cAAc,EAAE,0CAA0C;IAC1D,gBAAgB,EAAE,kIAAkI;IACpJ,mBAAmB,EAAE,kEAAkE;CACxF,CAAC,CAAA","sourcesContent":["/** Generated by release CI. Do not edit in a release checkout. */\nexport interface BluetoothSdkReleaseMetadata {\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 BLUETOOTH_SDK_RELEASE_METADATA: Readonly<BluetoothSdkReleaseMetadata> = Object.freeze({\n \"schemaVersion\": 1,\n \"familyBaseVersion\": \"3.3.0\",\n \"releaseIdentity\": \"3.3.0-beta.954\",\n \"releaseSetId\": \"mentra-3.3.0-beta.954\",\n \"sourceCommit\": \"25f6b1d70ce39dfe5d454021542f1627e256775a\",\n \"otaManifestUrl\": \"https://artifactscdn.mentraglass.com/Mentra-Community/MentraOS/releases/mentra-builds-v3.3.0/mentra-live-ota-3.3.0-beta.954.json\",\n \"otaManifestSha256\": \"03d976cb897215b97b5c40a53dabbc8356a045d1fbb57d5ad2c95bbc21203e21\"\n})\n"]}
@@ -1,3 +1,5 @@
1
+ import { type NetworkDiagnostics } from "../_private/MentraLocalNetworkModule";
2
+ export type { NetworkCapabilitiesDiagnostic, NetworkDiagnostics, NetworkObservation, } from "../_private/MentraLocalNetworkModule";
1
3
  export type OtaTransportSubscription = {
2
4
  remove(): void;
3
5
  };
@@ -45,6 +47,8 @@ export type OtaServerResult = {
45
47
  */
46
48
  export declare const otaLocalNetwork: Readonly<{
47
49
  isAvailable: () => boolean;
50
+ /** Synchronous local observation; no network I/O, route changes or network identities. */
51
+ getNetworkDiagnostics: () => NetworkDiagnostics | null;
48
52
  connect: (ssid: string, password: string) => Promise<OtaLocalNetworkConnection>;
49
53
  request: (requestId: string, url: string, method: string, headers: Record<string, string>, body: string | null, timeoutMs: number) => Promise<OtaLocalNetworkResponse>;
50
54
  download: (requestId: string, url: string, destination: string, headers: Record<string, string>, connectionTimeoutMs: number, readTimeoutMs: number) => Promise<OtaLocalNetworkDownloadResult>;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/ota-transport/index.ts"],"names":[],"mappings":"AAMA,MAAM,MAAM,wBAAwB,GAAG;IAAC,MAAM,IAAI,IAAI,CAAA;CAAC,CAAA;AAEvD,MAAM,MAAM,yBAAyB,GAAG;IACtC,SAAS,EAAE,OAAO,CAAA;IAClB,IAAI,EAAE,MAAM,CAAA;IACZ,YAAY,CAAC,EAAE,MAAM,CAAA;CACtB,CAAA;AAED,MAAM,MAAM,wBAAwB,GAAG;IAAC,IAAI,EAAE,MAAM,CAAA;CAAC,CAAA;AAErD,MAAM,MAAM,uBAAuB,GAAG;IACpC,MAAM,EAAE,MAAM,CAAA;IACd,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;IAC/B,UAAU,EAAE,MAAM,CAAA;CACnB,CAAA;AAED,MAAM,MAAM,6BAA6B,GAAG;IAC1C,UAAU,EAAE,MAAM,CAAA;IAClB,YAAY,EAAE,MAAM,CAAA;IACpB,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;CAChC,CAAA;AAED,MAAM,MAAM,+BAA+B,GAAG;IAC5C,SAAS,EAAE,MAAM,CAAA;IACjB,YAAY,EAAE,MAAM,CAAA;IACpB,aAAa,EAAE,MAAM,CAAA;IACrB,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;CACjC,CAAA;AAED,MAAM,MAAM,2BAA2B,GAAG;IACxC,WAAW,EAAE,MAAM,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E9G,CAAA"}
@@ -11,6 +11,8 @@ import MentraOtaServer from "../ota-server";
11
11
  */
12
12
  export const otaLocalNetwork = Object.freeze({
13
13
  isAvailable: () => MentraLocalNetwork != null,
14
+ /** Synchronous local observation; no network I/O, route changes or network identities. */
15
+ getNetworkDiagnostics: () => MentraLocalNetwork?.getNetworkDiagnostics() ?? null,
14
16
  connect: async (ssid, password) => {
15
17
  if (!MentraLocalNetwork)
16
18
  throw new Error("Scoped local networking is not available in this native build");
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/ota-transport/index.ts"],"names":[],"mappings":"AAAA,oFAAoF;AACpF,iDAAiD;AACjD,OAAO,kBAAkB,MAAM,sCAAsC,CAAA;AACrE,iDAAiD;AACjD,OAAO,eAAe,MAAM,eAAe,CAAA;AA6C3C;;;;;GAKG;AACH,MAAM,CAAC,MAAM,eAAe,GAAG,MAAM,CAAC,MAAM,CAAC;IAC3C,WAAW,EAAE,GAAY,EAAE,CAAC,kBAAkB,IAAI,IAAI;IACtD,OAAO,EAAE,KAAK,EAAE,IAAY,EAAE,QAAgB,EAAsC,EAAE;QACpF,IAAI,CAAC,kBAAkB;YAAE,MAAM,IAAI,KAAK,CAAC,+DAA+D,CAAC,CAAA;QACzG,OAAO,kBAAkB,CAAC,OAAO,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAA;IACnD,CAAC;IACD,OAAO,EAAE,KAAK,EACZ,SAAiB,EACjB,GAAW,EACX,MAAc,EACd,OAA+B,EAC/B,IAAmB,EACnB,SAAiB,EACiB,EAAE;QACpC,IAAI,CAAC,kBAAkB;YAAE,MAAM,IAAI,KAAK,CAAC,+DAA+D,CAAC,CAAA;QACzG,OAAO,kBAAkB,CAAC,OAAO,CAAC,SAAS,EAAE,GAAG,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,SAAS,CAAC,CAAA;IACrF,CAAC;IACD,QAAQ,EAAE,KAAK,EACb,SAAiB,EACjB,GAAW,EACX,WA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C,eAAe,CAAC,aAAa,EAAE;IAC1D,kBAAkB,EAAE,CAAC,OAAe,EAAE,SAAiB,EAAmB,EAAE,CAC1E,eAAe,CAAC,kBAAkB,CAAC,OAAO,EAAE,SAAS,CAAC;IACxD,gBAAgB,EAAE,CAAC,MAAc,EAAE,WAAmB,EAAuD,EAAE,CAC7G,eAAe,CAAC,gBAAgB,CAAC,MAAM,EAAE,WAAW,CAAC;IACvD,0BAA0B,EAAE,CAAC,QAAsD,EAA4B,EAAE,CAC/G,eAAe,CAAC,WAAW,CAAC,0BAA0B,EAAE,QAAQ,CAAC;CACpE,CAAC,CAAA","sourcesContent":["// This public adapter is the package-owned boundary over its native implementation.\n// eslint-disable-next-line no-restricted-imports\nimport MentraLocalNetwork from \"../_private/MentraLocalNetworkModule\"\n// eslint-disable-next-line no-restricted-imports\nimport MentraOtaServer from \"../ota-server\"\n\nexport type OtaTransportSubscription = {remove(): void}\n\nexport type OtaLocalNetworkConnection = {\n connected: boolean\n ssid: string\n localAddress?: string\n}\n\nexport type OtaLocalNetworkLostEvent = {ssid: string}\n\nexport type OtaLocalNetworkResponse = {\n status: number\n headers: Record<string, string>\n bodyBase64: string\n}\n\nexport type OtaLocalNetworkDownloadResult = {\n statusCode: number\n bytesWritten: number\n headers: Record<string, string>\n}\n\nexport type OtaLocalNetworkDownloadProgress = {\n requestId: string\n bytesWritten: number\n contentLength: number\n statusCode?: number\n headers?: Record<string, string>\n}\n\nexport type OtaArtifactDownloadProgress = {\n destination: string\n bytesWritten: number\n contentLength: number\n}\n\nexport type OtaServerResult = {\n baseUrl: string\n host: string\n manifestUrl: string\n port: number\n}\n\n/**\n * Scoped networking for traffic that must stay on a Mentra Live hotspot while\n * the phone's default route remains on cellular or another Wi-Fi network.\n *\n * The module is optional because iOS uses its system Wi-Fi join flow instead.\n */\nexport const otaLocalNetwork = Object.freeze({\n isAvailable: (): boolean => MentraLocalNetwork != null,\n connect: async (ssid: string, password: string): Promise<OtaLocalNetworkConnection> => {\n if (!MentraLocalNetwork) throw new Error(\"Scoped local networking is not available in this native build\")\n return MentraLocalNetwork.connect(ssid, password)\n },\n request: async (\n requestId: string,\n url: string,\n method: string,\n headers: Record<string, string>,\n body: string | null,\n timeoutMs: number,\n ): Promise<OtaLocalNetworkResponse> => {\n if (!MentraLocalNetwork) throw new Error(\"Scoped local networking is not available in this native build\")\n return MentraLocalNetwork.request(requestId, url, method, headers, body, timeoutMs)\n },\n download: async (\n requestId: string,\n url: string,\n destination: string,\n headers: Record<string, string>,\n connectionTimeoutMs: number,\n readTimeoutMs: number,\n ): Promise<OtaLocalNetworkDownloadResult> => {\n if (!MentraLocalNetwork) throw new Error(\"Scoped local networking is not available in this native build\")\n return MentraLocalNetwork.download(requestId, url, destination, headers, connectionTimeoutMs, readTimeoutMs)\n },\n cancel: async (requestId: string): Promise<void> => {\n if (!MentraLocalNetwork) return\n await MentraLocalNetwork.cancel(requestId)\n },\n disconnect: async (): Promise<void> => {\n if (!MentraLocalNetwork) return\n await MentraLocalNetwork.disconnect()\n },\n onDownloadProgress: (listener: (event: OtaLocalNetworkDownloadProgress) => void): OtaTransportSubscription => {\n if (!MentraLocalNetwork) return {remove() {}}\n return MentraLocalNetwork.addListener(\"downloadProgress\", listener)\n },\n onNetworkLost: (listener: (event: OtaLocalNetworkLostEvent) => void): OtaTransportSubscription => {\n if (!MentraLocalNetwork) return {remove() {}}\n return MentraLocalNetwork.addListener(\"networkLost\", listener)\n },\n})\n\n/** Native HTTP server and artifact downloader used by the Engine OTA coordinator. */\nexport const otaServer = Object.freeze({\n start: (\n manifestJson: string,\n artifactPaths: Record<string, string>,\n host?: string | null,\n ): Promise<OtaServerResult> => MentraOtaServer.startOtaServer(manifestJson, artifactPaths, host),\n stop: (): Promise<void> => MentraOtaServer.stopOtaServer(),\n waitForWifiAddress: (gateway: string, timeoutMs: number): Promise<string> =>\n MentraOtaServer.waitForWifiAddress(gateway, timeoutMs),\n downloadArtifact: (source: string, destination: string): Promise<{statusCode: number; bytesWritten: number}> =>\n MentraOtaServer.downloadArtifact(source, destination),\n onArtifactDownloadProgress: (listener: (event: OtaArtifactDownloadProgress) => void): OtaTransportSubscription =>\n MentraOtaServer.addListener(\"artifactDownloadProgress\", listener),\n})\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/ota-transport/index.ts"],"names":[],"mappings":"AAAA,oFAAoF;AACpF,iDAAiD;AACjD,OAAO,kBAA6C,MAAM,sCAAsC,CAAA;AAChG,iDAAiD;AACjD,OAAO,eAAe,MAAM,eAAe,CAAA;AAoD3C;;;;;GAKG;AACH,MAAM,CAAC,MAAM,eAAe,GAAG,MAAM,CAAC,MAAM,CAAC;IAC3C,WAAW,EAAE,GAAY,EAAE,CAAC,kBAAkB,IAAI,IAAI;IACtD,0FAA0F;IAC1F,qBAAqB,EAAE,GAA8B,EAAE,CAAC,kBAAkB,EAAE,qBAAqB,EAAE,IAAI,IAAI;IAC3G,OAAO,EAAE,KAAK,EAAE,IAAY,EAAE,QAAgB,EAAsC,EAAE;QACpF,IAAI,CAAC,kBAAkB;YAAE,MAAM,IAAI,KAAK,CAAC,+DAA+D,CAAC,CAAA;QACzG,OAAO,kBAAkB,CAAC,OAAO,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAA;IACnD,CAAC;IACD,OAAO,EAAE,KAAK,EACZ,SAAiB,EACjB,GAAW,EACX,MAAc,EACd,OAA+B,EAC/B,IAAmB,EACnB,SAAiB,EACiB,EAAE;QACpC,IAAI,CAAC,kBAAkB;YAAE,MAAM,IAAI,KAAK,CAAC,+DAA+D,CAAC,CAAA;QACzG,OAAO,kBAAkB,CAAC,OAAO,CAAC,SAAS,EAAE,GAAG,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,SAAS,CAAC,CAAA;IACrF,CAAC;IACD,QAAQ,EAAE,KAAK,EACb,SAAiB,EACjB,GAAW,EACX,WAAmB,EACnB,OAA+B,EAC/B,mBAA2B,EAC3B,aAAqB,EACmB,EAAE;QAC1C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SAAiB,EAAmB,EAAE,CAC1E,eAAe,CAAC,kBAAkB,CAAC,OAAO,EAAE,SAAS,CAAC;IACxD,gBAAgB,EAAE,CAAC,MAAc,EAAE,WAAmB,EAAuD,EAAE,CAC7G,eAAe,CAAC,gBAAgB,CAAC,MAAM,EAAE,WAAW,CAAC;IACvD,0BAA0B,EAAE,CAAC,QAAsD,EAA4B,EAAE,CAC/G,eAAe,CAAC,WAAW,CAAC,0BAA0B,EAAE,QAAQ,CAAC;CACpE,CAAC,CAAA","sourcesContent":["// This public adapter is the package-owned boundary over its native implementation.\n// eslint-disable-next-line no-restricted-imports\nimport MentraLocalNetwork, {type NetworkDiagnostics} from \"../_private/MentraLocalNetworkModule\"\n// eslint-disable-next-line no-restricted-imports\nimport MentraOtaServer from \"../ota-server\"\n\n// eslint-disable-next-line no-restricted-imports\nexport type {\n NetworkCapabilitiesDiagnostic,\n NetworkDiagnostics,\n NetworkObservation,\n} from \"../_private/MentraLocalNetworkModule\"\n\nexport type OtaTransportSubscription = {remove(): void}\n\nexport type OtaLocalNetworkConnection = {\n connected: boolean\n ssid: string\n localAddress?: string\n}\n\nexport type OtaLocalNetworkLostEvent = {ssid: string}\n\nexport type OtaLocalNetworkResponse = {\n status: number\n headers: Record<string, string>\n bodyBase64: string\n}\n\nexport type OtaLocalNetworkDownloadResult = {\n statusCode: number\n bytesWritten: number\n headers: Record<string, string>\n}\n\nexport type OtaLocalNetworkDownloadProgress = {\n requestId: string\n bytesWritten: number\n contentLength: number\n statusCode?: number\n headers?: Record<string, string>\n}\n\nexport type OtaArtifactDownloadProgress = {\n destination: string\n bytesWritten: number\n contentLength: number\n}\n\nexport type OtaServerResult = {\n baseUrl: string\n host: string\n manifestUrl: string\n port: number\n}\n\n/**\n * Scoped networking for traffic that must stay on a Mentra Live hotspot while\n * the phone's default route remains on cellular or another Wi-Fi network.\n *\n * The module is optional because iOS uses its system Wi-Fi join flow instead.\n */\nexport const otaLocalNetwork = Object.freeze({\n isAvailable: (): boolean => MentraLocalNetwork != null,\n /** Synchronous local observation; no network I/O, route changes or network identities. */\n getNetworkDiagnostics: (): NetworkDiagnostics | null => MentraLocalNetwork?.getNetworkDiagnostics() ?? null,\n connect: async (ssid: string, password: string): Promise<OtaLocalNetworkConnection> => {\n if (!MentraLocalNetwork) throw new Error(\"Scoped local networking is not available in this native build\")\n return MentraLocalNetwork.connect(ssid, password)\n },\n request: async (\n requestId: string,\n url: string,\n method: string,\n headers: Record<string, string>,\n body: string | null,\n timeoutMs: number,\n ): Promise<OtaLocalNetworkResponse> => {\n if (!MentraLocalNetwork) throw new Error(\"Scoped local networking is not available in this native build\")\n return MentraLocalNetwork.request(requestId, url, method, headers, body, timeoutMs)\n },\n download: async (\n requestId: string,\n url: string,\n destination: string,\n headers: Record<string, string>,\n connectionTimeoutMs: number,\n readTimeoutMs: number,\n ): Promise<OtaLocalNetworkDownloadResult> => {\n if (!MentraLocalNetwork) throw new Error(\"Scoped local networking is not available in this native build\")\n return MentraLocalNetwork.download(requestId, url, destination, headers, connectionTimeoutMs, readTimeoutMs)\n },\n cancel: async (requestId: string): Promise<void> => {\n if (!MentraLocalNetwork) return\n await MentraLocalNetwork.cancel(requestId)\n },\n disconnect: async (): Promise<void> => {\n if (!MentraLocalNetwork) return\n await MentraLocalNetwork.disconnect()\n },\n onDownloadProgress: (listener: (event: OtaLocalNetworkDownloadProgress) => void): OtaTransportSubscription => {\n if (!MentraLocalNetwork) return {remove() {}}\n return MentraLocalNetwork.addListener(\"downloadProgress\", listener)\n },\n onNetworkLost: (listener: (event: OtaLocalNetworkLostEvent) => void): OtaTransportSubscription => {\n if (!MentraLocalNetwork) return {remove() {}}\n return MentraLocalNetwork.addListener(\"networkLost\", listener)\n },\n})\n\n/** Native HTTP server and artifact downloader used by the Engine OTA coordinator. */\nexport const otaServer = Object.freeze({\n start: (\n manifestJson: string,\n artifactPaths: Record<string, string>,\n host?: string | null,\n ): Promise<OtaServerResult> => MentraOtaServer.startOtaServer(manifestJson, artifactPaths, host),\n stop: (): Promise<void> => MentraOtaServer.stopOtaServer(),\n waitForWifiAddress: (gateway: string, timeoutMs: number): Promise<string> =>\n MentraOtaServer.waitForWifiAddress(gateway, timeoutMs),\n downloadArtifact: (source: string, destination: string): Promise<{statusCode: number; bytesWritten: number}> =>\n MentraOtaServer.downloadArtifact(source, destination),\n onArtifactDownloadProgress: (listener: (event: OtaArtifactDownloadProgress) => void): OtaTransportSubscription =>\n MentraOtaServer.addListener(\"artifactDownloadProgress\", listener),\n})\n"]}
@@ -12,6 +12,10 @@ private func codedBridgeError(_ error: BluetoothSdkError) -> Exception {
12
12
  Exception(name: error.code, description: error.message, code: error.code)
13
13
  }
14
14
 
15
+ /// Offline model archives take tens of seconds to extract. Android runs this on Dispatchers.IO;
16
+ /// on Expo's shared default queue it would hold every other module's AsyncFunction behind it.
17
+ private let modelExtractionQueue = DispatchQueue(label: "com.mentra.model-extraction", qos: .utility)
18
+
15
19
  public class BluetoothSdkModule: Module, MentraBluetoothSDKDelegate {
16
20
  private var sdk: MentraBluetoothSDK?
17
21
 
@@ -23,6 +27,7 @@ public class BluetoothSdkModule: Module, MentraBluetoothSDKDelegate {
23
27
  "glasses_status",
24
28
  "bluetooth_status",
25
29
  "log",
30
+ "sdk_update_notice",
26
31
  "device_discovered",
27
32
  "default_device_changed",
28
33
  // Individual event handlers
@@ -90,7 +95,6 @@ public class BluetoothSdkModule: Module, MentraBluetoothSDKDelegate {
90
95
  "send_command_to_ble",
91
96
  "receive_command_from_ble",
92
97
  "miniapp_selected",
93
- "captions_tester_incident",
94
98
  "extraction_progress"
95
99
  )
96
100
 
@@ -365,8 +369,8 @@ public class BluetoothSdkModule: Module, MentraBluetoothSDKDelegate {
365
369
  // MARK: - Incident Reporting
366
370
 
367
371
  AsyncFunction("sendIncidentId") { (incidentId: String, apiBaseUrl: String?) in
368
- await MainActor.run {
369
- self.bluetoothSdk().sendIncidentId(incidentId, apiBaseUrl: apiBaseUrl)
372
+ try await MainActor.run {
373
+ try self.bluetoothSdk().sendIncidentId(incidentId, apiBaseUrl: apiBaseUrl)
370
374
  }
371
375
  }
372
376
 
@@ -845,7 +849,7 @@ public class BluetoothSdkModule: Module, MentraBluetoothSDKDelegate {
845
849
 
846
850
  AsyncFunction("extractTarBz2") { (sourcePath: String, destinationPath: String) -> Bool in
847
851
  return STTTools.extractTarBz2(sourcePath: sourcePath, destinationPath: destinationPath)
848
- }
852
+ }.runOnQueue(modelExtractionQueue)
849
853
 
850
854
  // MARK: - TTS Model Management
851
855
 
@@ -9,14 +9,14 @@ enum BluetoothSdkDefaults {
9
9
  }
10
10
 
11
11
  static let voiceActivityDetectionEnabled = false
12
- static let loudnessGateEnabled = false
12
+ static let loudnessGateEnabled = true
13
13
 
14
14
  /// Must stay true. The firmware defaults auto power-off on, and we re-push
15
15
  /// every Bluetooth setting on connect, so a false default here would
16
16
  /// silently disable it on every pair the app touches.
17
17
  static let autoPowerOffEnabled = false
18
18
  private static let infoSdkVersionKey = "MentraBluetoothSdkVersion"
19
- private static let swiftPackageSdkVersion = "3.2.1"
19
+ private static let swiftPackageSdkVersion = "3.3.0-beta.954"
20
20
  private static let swiftPackageSdkVersionPlaceholder = "__MENTRA" + "_BLUETOOTH_SDK_VERSION__"
21
21
 
22
22
  private static func normalizedSdkVersion(_ value: String?) -> String? {
@@ -1518,13 +1518,16 @@ struct ViewState {
1518
1518
  sgc?.requestSavedWifiNetworks(requestId: requestId, sid: sid) ?? false
1519
1519
  }
1520
1520
 
1521
- func sendIncidentId(_ incidentId: String, apiBaseUrl: String? = nil) {
1521
+ func sendIncidentId(_ incidentId: String, apiBaseUrl: String? = nil) throws {
1522
+ guard let driver = sgc else {
1523
+ throw BluetoothSdkError(code: "glasses_not_connected", message: "Cannot request incident logs because glasses are not connected.")
1524
+ }
1522
1525
  Bridge.log("MAN: Sending incidentId to glasses for log upload: \(incidentId)")
1523
- sgc?.sendIncidentId(incidentId, apiBaseUrl: apiBaseUrl)
1526
+ try driver.sendIncidentId(incidentId, apiBaseUrl: apiBaseUrl)
1524
1527
  }
1525
1528
 
1526
1529
  func sendWifiCredentials(_ ssid: String, _ password: String) {
1527
- Bridge.log("MAN: Sending wifi credentials: \(ssid) \(password)")
1530
+ Bridge.log("MAN: Sending wifi credentials: \(ssid)")
1528
1531
  sgc?.sendWifiCredentials(ssid, password)
1529
1532
  }
1530
1533
 
@@ -2,8 +2,9 @@ import Foundation
2
2
 
3
3
  /// Generated from /changelogs. Do not edit directly.
4
4
  let generatedReleaseChangelogs: [ReleaseChangelog] = [
5
+ ReleaseChangelog(version: "3.3.0", markdown: "This release is under active development. User-facing changes will be documented as they land."),
5
6
  ReleaseChangelog(version: "3.2.1", markdown: "- **Livestreamer:** \"Stream Here\" now works without a Wi-Fi network. Improved stream startup and connection reliability.\n- **Photos and gallery:** More reliable photo capture and gallery syncing.\n- **Mentra AI:** Reliability improvements and bug fixes.\n- **Miniapps:** Smoother transitions, with back buttons and gestures that take you to the previous screen inside a miniapp.\n- **Pairing and connections:** Improved G1 pairing and G2 background reconnection.\n- **Glasses updates:** Fixed repeated update checks and improved recovery after interrupted updates.\n- **Mentra Maps:** Bug fixes.\n- **NIMO:** Improved text and map layouts.\n- **Self-hosting:** Connect the Mentra App to your own self-hosted Mentra backend."),
6
- ReleaseChangelog(version: "3.2.0", markdown: "- Improved glasses connectivity and Wi-Fi setup."),
7
+ ReleaseChangelog(version: "3.2.0", markdown: "- Improved glasses connectivity and Wi-Fi setup.\n\n- Breaking Bluetooth SDK change: `forgetWifiNetwork(ssid)` now returns `WifiForgetResult` instead of `WifiStatusChangeEvent`. Migrate status-only consumers to the semantic `outcome`; the requested network remains `ssid`, while optional post-command connectivity is reported by `connected`, `currentSsid`, and `localIp`."),
7
8
  ReleaseChangelog(version: "3.1.1", markdown: "- Improved Google login on iOS.\n- Pairing no longer requires phone microphone access."),
8
9
  ReleaseChangelog(version: "3.1.0", markdown: "**Mentra App and glasses**\n\n- Improved glasses pairing and reconnection, including on iPad.\n- Improved Android background reliability for captions and miniapps.\n- Added Xingyi AR99 support.\n- More reliable photo and video capture, with improved shutter sounds and privacy-light timing. Taking photos no longer interrupts your running miniapp.\n- Added video thumbnails and smoother gallery browsing.\n- Easier Mentra Live updates through your phone, with clearer progress and better recovery from interruptions.\n\n**Miniapp updates**\n\n- **Mentra AI:** Control whether photos are included with questions. Improved visual answers and connected-app follow-ups.\n- **Captions:** Added offline transcription settings and top/bottom positioning on supported displays.\n- **Translation:** Restored all 60 languages.\n- **Mentra Maps:** Clearer directions on G1/G2, less display flickering, and improved Android offline routing.\n- **Livestreamer:** More video-quality controls and custom streaming options, plus improved startup and sharing.\n- **Merge:** Tap to expand an insight; swipe down or back to dismiss it.\n- **Mentra Notes:** Smoother back navigation.\n- **Recorder:** Fixed audio sharing."),
9
10
  ]
@@ -2,10 +2,10 @@ import Foundation
2
2
 
3
3
  /// Generated by release CI. Do not edit in a release checkout.
4
4
  enum GeneratedReleaseMetadata {
5
- static let familyBaseVersion = "3.2.1"
6
- static let releaseIdentity = "3.2.1"
7
- static let releaseSetId = "mentra-3.2.1"
8
- static let sourceCommit = "be56e1456c69f681985642f376ed3d397ec022cc"
9
- static let otaManifestUrl = "https://artifactscdn.mentraglass.com/Mentra-Community/MentraOS/releases/mentra-builds-v3.2.1/mentra-live-ota-3.2.1-beta.578.json"
10
- static let otaManifestSha256 = "21af62269e29fd2ee6b9737745a895694bc221672b191d80795057b5a832f400"
5
+ static let familyBaseVersion = "3.3.0"
6
+ static let releaseIdentity = "3.3.0-beta.954"
7
+ static let releaseSetId = "mentra-3.3.0-beta.954"
8
+ static let sourceCommit = "25f6b1d70ce39dfe5d454021542f1627e256775a"
9
+ static let otaManifestUrl = "https://artifactscdn.mentraglass.com/Mentra-Community/MentraOS/releases/mentra-builds-v3.3.0/mentra-live-ota-3.3.0-beta.954.json"
10
+ static let otaManifestSha256 = "03d976cb897215b97b5c40a53dabbc8356a045d1fbb57d5ad2c95bbc21203e21"
11
11
  }