@mentra/bluetooth-sdk 3.2.1-beta.319 → 3.2.1-beta.354

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 (83) hide show
  1. package/README.md +1 -1
  2. package/android/src/debug/java/com/mentra/bluetoothsdk/sgcs/NimoDiagnostics.kt +368 -0
  3. package/android/src/debug/java/com/mentra/bluetoothsdk/sgcs/NimoFramebufferProtocol.kt +156 -0
  4. package/android/src/main/java/com/mentra/bluetoothsdk/BluetoothSdkDefaults.kt +3 -0
  5. package/android/src/main/java/com/mentra/bluetoothsdk/BluetoothSdkModule.kt +4 -0
  6. package/android/src/main/java/com/mentra/bluetoothsdk/Bridge.kt +2 -1
  7. package/android/src/main/java/com/mentra/bluetoothsdk/DeviceManager.kt +67 -12
  8. package/android/src/main/java/com/mentra/bluetoothsdk/DeviceStore.kt +37 -13
  9. package/android/src/main/java/com/mentra/bluetoothsdk/GeneratedChangelogCatalog.kt +1 -1
  10. package/android/src/main/java/com/mentra/bluetoothsdk/GeneratedReleaseMetadata.kt +5 -5
  11. package/android/src/main/java/com/mentra/bluetoothsdk/MentraBluetoothSdk.kt +4 -0
  12. package/android/src/main/java/com/mentra/bluetoothsdk/VersionInfoResponseAccumulator.kt +13 -2
  13. package/android/src/main/java/com/mentra/bluetoothsdk/services/Foreground.kt +33 -0
  14. package/android/src/main/java/com/mentra/bluetoothsdk/services/G2ConnectionRecovery.kt +47 -0
  15. package/android/src/main/java/com/mentra/bluetoothsdk/sgcs/G2.kt +64 -14
  16. package/android/src/main/java/com/mentra/bluetoothsdk/sgcs/MentraLive.kt +73 -3
  17. package/android/src/main/java/com/mentra/bluetoothsdk/sgcs/Nimo.kt +257 -395
  18. package/android/src/main/java/com/mentra/bluetoothsdk/sgcs/NimoCanvasCodec.kt +245 -0
  19. package/android/src/main/java/com/mentra/bluetoothsdk/sgcs/NimoCanvasCoordinator.kt +225 -0
  20. package/android/src/main/java/com/mentra/bluetoothsdk/sgcs/NimoCanvasEncoder.kt +58 -0
  21. package/android/src/main/java/com/mentra/bluetoothsdk/sgcs/NimoCanvasSession.kt +168 -0
  22. package/android/src/main/java/com/mentra/bluetoothsdk/sgcs/SGCManager.kt +11 -0
  23. package/android/src/main/java/com/mentra/bluetoothsdk/utils/G2Text.kt +7 -0
  24. package/android/src/release/java/com/mentra/bluetoothsdk/sgcs/NimoDiagnostics.kt +20 -0
  25. package/android/src/test/java/com/mentra/bluetoothsdk/DeviceManagerSceneHandoffTest.kt +557 -0
  26. package/android/src/test/java/com/mentra/bluetoothsdk/G2TextTest.kt +13 -0
  27. package/android/src/test/java/com/mentra/bluetoothsdk/VersionInfoResponseAccumulatorTest.kt +71 -0
  28. package/android/src/test/java/com/mentra/bluetoothsdk/services/G2ConnectionRecoveryTest.kt +51 -0
  29. package/android/src/test/java/com/mentra/bluetoothsdk/sgcs/G2DisplayThreadTest.kt +120 -0
  30. package/android/src/test/java/com/mentra/bluetoothsdk/sgcs/NimoBitmapAcceptanceTest.kt +105 -0
  31. package/android/src/test/java/com/mentra/bluetoothsdk/sgcs/NimoCanvasCodecTest.kt +220 -0
  32. package/android/src/test/java/com/mentra/bluetoothsdk/sgcs/NimoCanvasCoordinatorTest.kt +308 -0
  33. package/android/src/test/java/com/mentra/bluetoothsdk/sgcs/NimoCanvasSessionTest.kt +270 -0
  34. package/android/src/testDebug/java/com/mentra/bluetoothsdk/sgcs/NimoDiagnosticsTest.kt +287 -0
  35. package/android/src/testDebug/java/com/mentra/bluetoothsdk/sgcs/NimoFramebufferProtocolTest.kt +127 -0
  36. package/android/src/testDebug/java/com/mentra/bluetoothsdk/sgcs/NimoLifecycleTest.kt +194 -0
  37. package/android/src/testDebug/java/com/mentra/bluetoothsdk/sgcs/NimoReadinessDriverTest.kt +199 -0
  38. package/build/BluetoothSdk.types.d.ts +11 -0
  39. package/build/BluetoothSdk.types.d.ts.map +1 -1
  40. package/build/BluetoothSdk.types.js.map +1 -1
  41. package/build/_private/BluetoothSdkModule.d.ts +2 -0
  42. package/build/_private/BluetoothSdkModule.d.ts.map +1 -1
  43. package/build/_private/BluetoothSdkModule.js +3 -0
  44. package/build/_private/BluetoothSdkModule.js.map +1 -1
  45. package/build/generated/changelogCatalog.d.ts +1 -1
  46. package/build/generated/changelogCatalog.js +1 -1
  47. package/build/generated/changelogCatalog.js.map +1 -1
  48. package/build/generated/releaseMetadata.js +5 -5
  49. package/build/generated/releaseMetadata.js.map +1 -1
  50. package/build/index.d.ts.map +1 -1
  51. package/build/index.js +1 -0
  52. package/build/index.js.map +1 -1
  53. package/ios/BluetoothSdkModule.swift +5 -0
  54. package/ios/MentraBluetoothSDK.podspec +3 -2
  55. package/ios/Source/BluetoothSdkDefaults.swift +6 -1
  56. package/ios/Source/Bridge.swift +15 -2
  57. package/ios/Source/DeviceManager.swift +23 -10
  58. package/ios/Source/DeviceStore.swift +26 -7
  59. package/ios/Source/GeneratedChangelogCatalog.swift +1 -1
  60. package/ios/Source/GeneratedReleaseMetadata.swift +5 -5
  61. package/ios/Source/MentraBluetoothSDK.swift +4 -0
  62. package/ios/Source/requests/VersionInfoResponseAccumulator.swift +11 -1
  63. package/ios/Source/sgcs/G2.swift +2 -2
  64. package/ios/Source/sgcs/MentraLive.swift +66 -3
  65. package/ios/Source/sgcs/Nimo.swift +182 -371
  66. package/ios/Source/sgcs/NimoCanvasCodec.swift +269 -0
  67. package/ios/Source/sgcs/NimoCanvasCoordinator.swift +219 -0
  68. package/ios/Source/sgcs/NimoCanvasImage.swift +53 -0
  69. package/ios/Source/sgcs/NimoCanvasSession.swift +150 -0
  70. package/ios/Source/sgcs/SGCManager.swift +24 -0
  71. package/ios/Source/utils/G2Text.swift +11 -0
  72. package/ios/Tests/DashboardRenderingTests.swift +31 -0
  73. package/ios/Tests/G2TextTests.swift +10 -0
  74. package/ios/Tests/NimoCanvasCodecTests.swift +204 -0
  75. package/ios/Tests/NimoCanvasSessionTests.swift +112 -0
  76. package/ios/Tests/NimoCanvasTransportTests.swift +161 -0
  77. package/ios/Tests/VersionInfoResponseAccumulatorTests.swift +65 -0
  78. package/package.json +2 -2
  79. package/src/BluetoothSdk.types.ts +11 -0
  80. package/src/_private/BluetoothSdkModule.ts +6 -0
  81. package/src/generated/changelogCatalog.ts +1 -1
  82. package/src/generated/releaseMetadata.ts +5 -5
  83. package/src/index.ts +1 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mentra/bluetooth-sdk",
3
- "version": "3.2.1-beta.319",
3
+ "version": "3.2.1-beta.354",
4
4
  "description": "SDK for communicating with smart glasses",
5
5
  "main": "build/index.js",
6
6
  "react-native": "src/index.ts",
@@ -114,7 +114,7 @@
114
114
  "registry": "https://registry.npmjs.org/"
115
115
  },
116
116
  "dependencies": {
117
- "@mentra/cloud-protocol": "3.2.1-beta.319"
117
+ "@mentra/cloud-protocol": "3.2.1-beta.354"
118
118
  },
119
119
  "devDependencies": {
120
120
  "@types/node": "^25.9.3",
@@ -543,6 +543,15 @@ export type WearTuning = {
543
543
  export type WearStateEvent = {
544
544
  type: "wear_state"
545
545
  worn: boolean
546
+ /** Unworn countdown, present on firmware that reports it. Milliseconds. */
547
+ elapsedMs?: number
548
+ timeoutMs?: number
549
+ /** cs_swit type 11. Absent on older firmware. */
550
+ enabled?: boolean
551
+ /** Countdown is running (glasses are off the face and the feature is on). */
552
+ armed?: boolean
553
+ /** Clock is running, but charging, a call, OTA, or factory test is holding shutdown. */
554
+ inhibited?: boolean
546
555
  }
547
556
 
548
557
  /**
@@ -1417,6 +1426,7 @@ export interface BluetoothSdkPublicModule {
1417
1426
  setGalleryModeEnabled(enabled: boolean): Promise<SettingsAckSuccessEvent>
1418
1427
  setVoiceActivityDetectionEnabled(enabled: boolean): Promise<void>
1419
1428
  setLoudnessGateEnabled(enabled: boolean): Promise<void>
1429
+ setAutoPowerOffEnabled(enabled: boolean): Promise<void>
1420
1430
  /**
1421
1431
  * @deprecated Sticky action-button photo presets are deprecated. Prefer per-request
1422
1432
  * `requestPhoto(...)` options (e.g. `mode: "text"` for text sensor size/crop, or explicit per-shot
@@ -1798,6 +1808,7 @@ export type BluetoothSettingsUpdate = Partial<{
1798
1808
  gallery_mode: boolean
1799
1809
  voice_activity_detection_enabled: boolean
1800
1810
  loudness_gate_enabled: boolean
1811
+ auto_power_off_enabled: boolean
1801
1812
  /** Effective mic tuning only. `{}` means "reset to firmware defaults". */
1802
1813
  mic_tuning: MicTuning
1803
1814
  button_photo_size: ButtonPhotoSize
@@ -145,6 +145,8 @@ declare class BluetoothSdkNativeModule extends NativeModule<BluetoothSdkModuleEv
145
145
  setVoiceActivityDetectionEnabled(enabled: boolean): Promise<void>
146
146
  /** Mentra Live center-mic loudness / Barrier gate (cs_swit type 10). */
147
147
  setLoudnessGateEnabled(enabled: boolean): Promise<void>
148
+ /** Mentra Live power-off after ~20 min unworn (cs_swit type 11). */
149
+ setAutoPowerOffEnabled(enabled: boolean): Promise<void>
148
150
  /**
149
151
  * Mentra Live mic tuning. `null` clears every override and returns the
150
152
  * glasses to firmware defaults.
@@ -578,6 +580,10 @@ NativeBluetoothSdkModule.setLoudnessGateEnabled = function (enabled: boolean) {
578
580
  return this.updateBluetoothSettings({loudness_gate_enabled: enabled})
579
581
  }
580
582
 
583
+ NativeBluetoothSdkModule.setAutoPowerOffEnabled = function (enabled: boolean) {
584
+ return this.updateBluetoothSettings({auto_power_off_enabled: enabled})
585
+ }
586
+
581
587
  NativeBluetoothSdkModule.setMicTuning = function (tuning: MicTuning | null) {
582
588
  // `{}` rather than null: the store drops null writes, and the native side
583
589
  // reads an empty object as "no overrides" and sends an explicit reset.
@@ -3,7 +3,7 @@ export const GENERATED_RELEASE_CHANGELOGS = Object.freeze(
3
3
  [
4
4
  {
5
5
  "version": "3.2.1",
6
- "markdown": "This release is under active development. User-facing changes will be documented as they land."
6
+ "markdown": "This release is under active development. User-facing changes will be documented as they land.\n\n- Mentra Miniapp SDK: `session.stream.preview({source: \"call\"})` and the `<StreamPreview>` component (from `@mentra/miniapp/react`) show the live video of a call your miniapp owns inside its UI. Requires the `CAMERA` permission; the lease survives the UI closing and ends with `handle.stop()` or the meeting. See [Stream preview](https://docs.mentraglass.com/app-devs/core-concepts/stream-preview)."
7
7
  },
8
8
  {
9
9
  "version": "3.2.0",
@@ -12,9 +12,9 @@ export interface BluetoothSdkReleaseMetadata {
12
12
  export const BLUETOOTH_SDK_RELEASE_METADATA: Readonly<BluetoothSdkReleaseMetadata> = Object.freeze({
13
13
  "schemaVersion": 1,
14
14
  "familyBaseVersion": "3.2.1",
15
- "releaseIdentity": "3.2.1-beta.319",
16
- "releaseSetId": "mentra-3.2.1-beta.319",
17
- "sourceCommit": "551a7fef692b763630ae7708e247fe17b75571ab",
18
- "otaManifestUrl": "https://artifactscdn.mentraglass.com/Mentra-Community/MentraOS/releases/mentra-builds-v3.2.1/mentra-live-ota-3.2.1-beta.319.json",
19
- "otaManifestSha256": "b604978c7ff60b68fe50bceaee8bc89219ec028bdc1d3872c0ec7aae846bd0ec"
15
+ "releaseIdentity": "3.2.1-beta.354",
16
+ "releaseSetId": "mentra-3.2.1-beta.354",
17
+ "sourceCommit": "b8fb9cd0d58df574fdf1eeb5580ce0b5144f788e",
18
+ "otaManifestUrl": "https://artifactscdn.mentraglass.com/Mentra-Community/MentraOS/releases/mentra-builds-v3.2.1/mentra-live-ota-3.2.1-beta.354.json",
19
+ "otaManifestSha256": "58b07e4b77901b404a59b44f7fb45218e9be3312983659bfa07b579a437b1034"
20
20
  })
package/src/index.ts CHANGED
@@ -131,6 +131,7 @@ export const BluetoothSdk: BluetoothSdkPublicModule = Object.freeze({
131
131
  setGalleryModeEnabled: bindPublicMethod("setGalleryModeEnabled"),
132
132
  setVoiceActivityDetectionEnabled: bindPublicMethod("setVoiceActivityDetectionEnabled"),
133
133
  setLoudnessGateEnabled: bindPublicMethod("setLoudnessGateEnabled"),
134
+ setAutoPowerOffEnabled: bindPublicMethod("setAutoPowerOffEnabled"),
134
135
  /**
135
136
  * @deprecated Sticky action-button photo presets are deprecated. Prefer per-request
136
137
  * `requestPhoto(...)` options (e.g. `mode: "text"` for text sensor size/crop, or explicit per-shot