@mentra/bluetooth-sdk 0.1.10 → 0.1.11

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 (36) hide show
  1. package/README.md +1 -1
  2. package/android/src/main/java/com/mentra/bluetoothsdk/BluetoothSdkModule.kt +39 -16
  3. package/android/src/main/java/com/mentra/bluetoothsdk/Bridge.kt +14 -0
  4. package/android/src/main/java/com/mentra/bluetoothsdk/DeviceManager.kt +22 -3
  5. package/android/src/main/java/com/mentra/bluetoothsdk/DeviceStore.kt +8 -0
  6. package/android/src/main/java/com/mentra/bluetoothsdk/camera/CameraModels.kt +2 -1
  7. package/android/src/main/java/com/mentra/bluetoothsdk/sgcs/G2.kt +829 -643
  8. package/android/src/main/java/com/mentra/bluetoothsdk/sgcs/MentraNex.kt +40 -64
  9. package/android/src/main/java/com/mentra/bluetoothsdk/sgcs/SGCManager.kt +11 -1
  10. package/build/BluetoothSdk.types.d.ts +12 -1
  11. package/build/BluetoothSdk.types.d.ts.map +1 -1
  12. package/build/BluetoothSdk.types.js.map +1 -1
  13. package/build/_private/BluetoothSdkModule.d.ts +1 -0
  14. package/build/_private/BluetoothSdkModule.d.ts.map +1 -1
  15. package/build/_private/BluetoothSdkModule.js +14 -1
  16. package/build/_private/BluetoothSdkModule.js.map +1 -1
  17. package/build/index.d.ts +1 -1
  18. package/build/index.d.ts.map +1 -1
  19. package/build/index.js +2 -0
  20. package/build/index.js.map +1 -1
  21. package/ios/BluetoothSdkModule.swift +3 -0
  22. package/ios/Source/Bridge.swift +10 -0
  23. package/ios/Source/DeviceManager.swift +24 -21
  24. package/ios/Source/DeviceStore.swift +8 -2
  25. package/ios/Source/camera/CameraModels.swift +1 -0
  26. package/ios/Source/sgcs/G1.swift +3 -3
  27. package/ios/Source/sgcs/G2.swift +1022 -640
  28. package/ios/Source/sgcs/Mach1.swift +2 -2
  29. package/ios/Source/sgcs/MentraLive.swift +2 -2
  30. package/ios/Source/sgcs/MentraNex.swift +215 -85
  31. package/ios/Source/sgcs/SGCManager.swift +13 -4
  32. package/ios/Source/sgcs/Simulated.swift +2 -2
  33. package/package.json +1 -1
  34. package/src/BluetoothSdk.types.ts +13 -1
  35. package/src/_private/BluetoothSdkModule.ts +22 -3
  36. package/src/index.ts +3 -0
@@ -1 +1 @@
1
- {"version":3,"file":"BluetoothSdk.types.js","sourceRoot":"","sources":["../src/BluetoothSdk.types.ts"],"names":[],"mappings":"AAgCA,MAAM,CAAC,MAAM,wCAAwC,GAAG,KAAK,CAAA;AAwB7D,MAAM,UAAU,kCAAkC,CAChD,MAA+B;IAE/B,OAAO,MAAM,CAAC,KAAK,KAAK,WAAW,CAAA;AACrC,CAAC;AAED,MAAM,UAAU,8BAA8B,CAAC,MAA+B;IAC5E,OAAO,MAAM,CAAC,KAAK,KAAK,WAAW,IAAI,MAAM,CAAC,WAAW,CAAA;AAC3D,CAAC;AAED,MAAM,UAAU,6BAA6B,CAAC,MAA+B;IAC3E,OAAO,MAAM,CAAC,KAAK,KAAK,UAAU,IAAI,MAAM,CAAC,KAAK,KAAK,YAAY,IAAI,MAAM,CAAC,KAAK,KAAK,SAAS,CAAA;AACnG,CAAC;AAED,MAAM,UAAU,+BAA+B;IAC7C,OAAO;QACL,UAAU,EAAE,EAAC,KAAK,EAAE,cAAc,EAAC;QACnC,OAAO,EAAE,EAAC,KAAK,EAAE,UAAU,EAAC;QAC5B,6BAA6B,EAAE,wCAAwC;QACvE,IAAI,EAAE,EAAC,KAAK,EAAE,cAAc,EAAC;KAC9B,CAAA;AACH,CAAC;AA2BD,MAAM,UAAU,qBAAqB,CAAC,MAAkB;IACtD,OAAO,MAAM,CAAC,KAAK,KAAK,WAAW,CAAA;AACrC,CAAC;AAUD,MAAM,UAAU,sBAAsB,CAAC,MAAqB;IAC1D,OAAO,MAAM,CAAC,KAAK,KAAK,SAAS,CAAA;AACnC,CAAC;AAqSD,MAAM,CAAC,MAAM,YAAY,GAAG;IAC1B,SAAS,EAAE,mBAAmB;IAC9B,EAAE,EAAE,mBAAmB;IACvB,EAAE,EAAE,mBAAmB;IACvB,UAAU,EAAE,aAAa;IACzB,SAAS,EAAE,gBAAgB;IAC3B,KAAK,EAAE,cAAc;IACrB,IAAI,EAAE,YAAY;IAClB,KAAK,EAAE,iBAAiB;IACxB,EAAE,EAAE,mBAAmB;CACf,CAAA;AAWV,MAAM,CAAC,MAAM,cAAc,GAAG,EAAE,CAAA;AAChC,MAAM,CAAC,MAAM,cAAc,GAAG,GAAG,CAAA;AACjC,MAAM,CAAC,MAAM,kBAAkB,GAAG,GAAG,CAAA","sourcesContent":["// Bluetooth SDK Event Types\nexport type GlassesNotReadyEvent = {\n type: \"glasses_not_ready\"\n message: string\n}\n\n// NOTE: unlike most events below, the native module does NOT include a `type`\n// field on the button_press payload — it sends only {buttonId, pressType,\n// timestamp} (see BluetoothSdkModule on both iOS and Android). Consumers must\n// filter on `pressType` / the \"button_press\" listener name, never `event.type`.\nexport type ButtonPressEvent = {\n buttonId: string\n pressType: \"long\" | \"short\"\n timestamp: number\n}\n\nexport type TouchEvent = {\n type: \"touch_event\"\n deviceModel: DeviceModel\n gestureName: string\n timestamp: number\n}\n\nexport type HeadUpEvent = {\n up: boolean\n}\n\nexport type VoiceActivityDetectionStatusEvent = {\n type: \"voice_activity_detection_status\"\n voiceActivityDetectionEnabled: boolean\n}\n\nexport const DEFAULT_VOICE_ACTIVITY_DETECTION_ENABLED = false\n\nexport type SpeakingStatusEvent = {\n type: \"speaking_status\"\n speaking: boolean\n timestamp: number\n}\n\nexport type BatteryStatusEvent = {\n type: \"battery_status\"\n level: number\n charging: boolean\n timestamp: number\n}\n\nexport type GlassesConnectionStatus =\n | {state: \"disconnected\"}\n | {state: \"scanning\"}\n | {state: \"connecting\"}\n | {state: \"bonding\"}\n | {state: \"connected\"; fullyBooted: boolean}\n\nexport type ConnectedGlassesConnectionStatus = Extract<GlassesConnectionStatus, {state: \"connected\"}>\n\nexport function isConnectedGlassesConnectionStatus(\n status: GlassesConnectionStatus,\n): status is ConnectedGlassesConnectionStatus {\n return status.state === \"connected\"\n}\n\nexport function isReadyGlassesConnectionStatus(status: GlassesConnectionStatus): boolean {\n return status.state === \"connected\" && status.fullyBooted\n}\n\nexport function isBusyGlassesConnectionStatus(status: GlassesConnectionStatus): boolean {\n return status.state === \"scanning\" || status.state === \"connecting\" || status.state === \"bonding\"\n}\n\nexport function createDisconnectedGlassesStatus(): Partial<GlassesStatus> {\n return {\n connection: {state: \"disconnected\"},\n hotspot: {state: \"disabled\"},\n voiceActivityDetectionEnabled: DEFAULT_VOICE_ACTIVITY_DETECTION_ENABLED,\n wifi: {state: \"disconnected\"},\n }\n}\n\n/** K900 `sr_getvol` response (Mentra Live glasses media step volume 0–15). */\nexport type GlassesMediaVolumeGetResult = {\n level: number\n statusCode: number\n}\n\n/** K900 `sr_vol` acknowledgment. */\nexport type GlassesMediaVolumeSetResult = {\n statusCode: number\n}\n\nexport type LocalTranscriptionEvent = {\n text: string\n isFinal?: boolean\n transcribeLanguage?: string\n}\n\nexport type LogEvent = {\n message: string\n}\n\nexport type WifiStatus = {state: \"disconnected\"} | {state: \"connected\"; ssid: string; localIp?: string}\n\nexport type ConnectedWifiStatus = Extract<WifiStatus, {state: \"connected\"}>\n\nexport function isConnectedWifiStatus(status: WifiStatus): status is ConnectedWifiStatus {\n return status.state === \"connected\"\n}\n\nexport type WifiStatusChangeEvent = WifiStatus & {\n type: \"wifi_status_change\"\n}\n\nexport type HotspotStatus = {state: \"disabled\"} | {state: \"enabled\"; ssid: string; password: string; localIp: string}\n\nexport type EnabledHotspotStatus = Extract<HotspotStatus, {state: \"enabled\"}>\n\nexport function isEnabledHotspotStatus(status: HotspotStatus): status is EnabledHotspotStatus {\n return status.state === \"enabled\"\n}\n\nexport type HotspotStatusChangeEvent = HotspotStatus & {\n type: \"hotspot_status_change\"\n}\n\nexport type HotspotErrorEvent = {\n type: \"hotspot_error\"\n errorMessage: string\n timestamp: number\n}\n\nexport type VersionInfoResult = {\n androidVersion: string\n firmwareVersion: string\n besFirmwareVersion: string\n mtkFirmwareVersion: string\n buildNumber: string\n systemTimeMs?: number\n otaVersionUrl: string\n appVersion: string\n}\n\nexport type VersionInfoEvent = VersionInfoResult & {\n type: \"version_info\"\n}\n\nexport type WifiScanResultEvent = {\n type: \"wifi_scan_result\"\n networks: WifiSearchResult[]\n scanComplete?: boolean\n}\n\nexport type PhotoResponseEvent =\n | {\n type: \"photo_response\"\n state: \"success\"\n requestId: string\n uploadUrl: string\n photoUrl?: string\n statusUrl?: string\n contentType?: string\n fileSizeBytes?: number\n timestamp: number\n }\n | {\n type: \"photo_response\"\n state: \"error\"\n requestId: string\n timestamp: number\n errorCode?: string\n errorMessage: string\n }\n\nexport type PhotoSuccessResponseEvent = Extract<PhotoResponseEvent, {state: \"success\"}>\n\nexport type PhotoStatusState =\n | \"accepted\"\n | \"queued\"\n | \"configuring\"\n | \"capturing\"\n | \"captured\"\n | \"compressing\"\n | \"ble_fallback_compression\"\n | \"uploading\"\n | \"uploaded\"\n | \"ready_for_transfer\"\n | \"transferring\"\n | \"failed\"\n\nexport type PhotoResolvedConfig = {\n format?: \"jpeg\" | string\n width?: number\n height?: number\n quality?: number\n requestedSize?: PhotoSize | string\n source?: \"sdk\" | \"button\" | string\n transferMethod?: \"webhook\" | \"ble\" | \"local\" | string\n compression?: PhotoCompression | string\n saveToGallery?: boolean\n exposureTimeNs?: number\n iso?: number\n}\n\nexport type PhotoFpsRange = {\n min?: number\n max?: number\n}\n\nexport type PhotoRequestedCaptureConfig = {\n manual?: boolean\n exposureTimeNs?: number\n iso?: number\n frameDurationNs?: number\n aeMode?: number\n aeLock?: boolean\n aeExposureCompensation?: number\n aeTargetFpsRange?: PhotoFpsRange\n noiseReductionMode?: number\n edgeMode?: number\n afMode?: number\n zsl?: boolean\n}\n\nexport type PhotoMeteredPreview = {\n exposureTimeNs?: number\n iso?: number\n totalLightProxy?: number\n}\n\nexport type PhotoCaptureMetadata = {\n manual?: boolean\n exposureTimeNs?: number\n iso?: number\n frameDurationNs?: number\n aeMode?: number\n aeState?: number\n aeStateName?: string\n noiseReductionMode?: number\n edgeMode?: number\n zsl?: boolean\n sensorTimestampNs?: number\n totalLightProxy?: number\n mfnrLikely?: boolean\n}\n\nexport type PhotoStatusEvent = {\n type: \"photo_status\"\n requestId: string\n status: PhotoStatusState | string\n timestamp: number\n resolvedConfig?: PhotoResolvedConfig\n requestedCaptureConfig?: PhotoRequestedCaptureConfig\n meteredPreview?: PhotoMeteredPreview\n captureMetadata?: PhotoCaptureMetadata\n errorCode?: string\n errorMessage?: string\n}\n\nexport type VideoRecordingStatusEvent = {\n type: \"video_recording_status\"\n requestId?: string\n success: boolean\n status: VideoRecordingStatusState\n details?: string | null\n timestamp: number\n data?: {\n recording?: boolean\n duration_ms?: number\n duration_formatted?: string\n [key: string]: unknown\n }\n}\n\nexport type VideoRecordingStatusState =\n | \"recording_started\"\n | \"recording_status\"\n | \"already_recording\"\n | \"recording_stopped\"\n | \"not_recording\"\n | \"request_id_mismatch\"\n | \"service_unavailable\"\n | \"json_error\"\n | \"battery_low\"\n | \"camera_busy\"\n | \"storage_unavailable\"\n | \"integrity_failed\"\n | \"error\"\n\nexport type VideoRecordingStartedStatusEvent = Omit<VideoRecordingStatusEvent, \"success\" | \"status\"> & {\n success: true\n status: \"recording_started\"\n}\n\nexport type VideoRecordingStoppedStatusEvent = Omit<VideoRecordingStatusEvent, \"success\" | \"status\"> & {\n success: true\n status: \"recording_stopped\"\n}\n\nexport type VideoRecordingSuccessStatusEvent =\n | VideoRecordingStartedStatusEvent\n | VideoRecordingStoppedStatusEvent\n\nexport type GalleryStatusEvent = {\n type: \"gallery_status\"\n photos: number\n videos: number\n total: number\n totalSize?: number\n hasContent: boolean\n cameraBusy: boolean\n cameraBusyReason?: \"video\" | \"stream\" | (string & {})\n}\n\nexport type CompatibleGlassesSearchStopEvent = {\n type: \"compatible_glasses_search_stop\"\n deviceModel: DeviceModel\n}\n\nexport type HeartbeatSentEvent = {\n type: \"heartbeat_sent\"\n heartbeat_sent: {\n timestamp: number\n }\n}\n\nexport type HeartbeatReceivedEvent = {\n type: \"heartbeat_received\"\n heartbeat_received: {\n timestamp: number\n }\n}\n\nexport type SwipeVolumeStatusEvent = {\n type: \"swipe_volume_status\"\n enabled: boolean\n timestamp: number\n}\n\nexport type SwitchStatusEvent = {\n type: \"switch_status\"\n switchType?: number\n switchValue?: number\n timestamp: number\n}\n\nexport type RgbLedControlResponseEvent =\n | {\n type: \"rgb_led_control_response\"\n state: \"success\"\n requestId: string\n }\n | {\n type: \"rgb_led_control_response\"\n state: \"error\"\n requestId: string\n errorCode: string\n }\n\nexport type RgbLedControlSuccessResponseEvent = Extract<RgbLedControlResponseEvent, {state: \"success\"}>\n\nexport type SettingsAckStatus = \"applied\" | \"ready\" | \"error\" | \"failed\" | \"failure\" | \"rejected\"\n\nexport type SettingsAckSetting =\n | \"gallery_mode\"\n | \"button_photo\"\n | \"button_video_recording\"\n | \"button_camera_led\"\n | \"button_max_recording_time\"\n | \"camera_fov\"\n\nexport type SettingsAckEvent = {\n type: \"settings_ack\"\n requestId: string\n setting: SettingsAckSetting\n status: SettingsAckStatus\n timestamp: number\n fov?: number\n roiPosition?: CameraRoiPositionValue\n hardwareApplied?: boolean\n active?: boolean\n size?: ButtonPhotoSize | string\n width?: number\n height?: number\n fps?: number\n enabled?: boolean\n minutes?: number\n errorCode?: string\n errorMessage?: string\n}\n\nexport type SettingsAckSuccessStatus = Exclude<SettingsAckStatus, \"error\" | \"failed\" | \"failure\" | \"rejected\">\n\nexport type SettingsAckSuccessEvent = Omit<SettingsAckEvent, \"status\"> & {\n status: SettingsAckSuccessStatus\n}\n\nexport type RgbLedAction = \"on\" | \"off\"\nexport type RgbLedColor = \"red\" | \"green\" | \"blue\" | \"orange\" | \"white\"\nexport type PhotoSize = \"small\" | \"medium\" | \"large\" | \"full\"\nexport type ButtonPhotoSize = \"small\" | \"medium\" | \"large\"\nexport type PhotoCompression = \"none\" | \"medium\" | \"heavy\"\n\n/**\n * Optional per-recording video settings for {@link startVideoRecording}. When\n * omitted, the glasses fall back to their saved button-video settings. Any\n * field left undefined is omitted from the BLE command (glasses default applies).\n */\nexport interface VideoRecordingSettings {\n width?: number\n height?: number\n fps?: number\n}\nexport const DeviceModels = {\n Simulated: \"Simulated Glasses\",\n G1: \"Even Realities G1\",\n G2: \"Even Realities G2\",\n MentraLive: \"Mentra Live\",\n MentraNex: \"Mentra Display\",\n Mach1: \"Mentra Mach1\",\n Z100: \"Vuzix Z100\",\n Frame: \"Brilliant Frame\",\n R1: \"Even Realities R1\",\n} as const\n\nexport type DeviceModel = (typeof DeviceModels)[keyof typeof DeviceModels]\nexport type ObservableStoreCategory = \"glasses\" | \"bluetooth\" | \"core\"\n\nexport type DashboardMenuItem = {\n title: string\n packageName: string\n values?: Record<string, unknown>\n}\n\nexport const CAMERA_FOV_MIN = 62\nexport const CAMERA_FOV_MAX = 118\nexport const CAMERA_FOV_DEFAULT = 102\n\nexport type CameraRoiPosition = \"center\" | \"bottom\" | \"top\"\nexport type CameraRoiPositionValue = 0 | 1 | 2\nexport type CameraFovPreset = \"narrow\" | \"standard\" | \"wide\"\n\nexport type CameraFovRequest =\n | {\n fov: number\n roiPosition?: CameraRoiPosition\n }\n | {\n preset: CameraFovPreset\n }\n\nexport type CameraFovResult = {\n requestId: string\n fov: number\n roiPosition: CameraRoiPosition\n timestamp: number\n}\n\nexport type CameraFovSetting = {\n fov: number\n roiPosition: CameraRoiPositionValue\n}\n\ntype NativeCameraFovSetting = {\n fov: number\n roi_position: CameraRoiPositionValue\n}\n\nexport type MicPreference = \"auto\" | \"phone\" | \"glasses\" | \"bluetooth\"\nexport type MicMode = \"phone\" | \"glasses\" | \"bluetoothClassic\" | \"bluetooth\"\n\nexport type PhotoRequestParams = {\n requestId: string\n appId: string\n size: PhotoSize\n webhookUrl: string | null\n authToken: string | null\n compress: PhotoCompression\n save?: boolean\n sound: boolean\n exposureTimeNs?: number | null\n /** Sensor ISO for this capture only. Only used when exposureTimeNs enables manual exposure. */\n iso?: number | null\n}\n\nexport type StreamVideoConfig = {\n width?: number\n height?: number\n bitrate?: number\n fps?: number\n}\n\nexport type StreamAudioConfig = {\n bitrate?: number\n sampleRate?: number\n echoCancellation?: boolean\n noiseSuppression?: boolean\n}\n\nexport type StreamStartRequest = {\n type?: \"start_stream\"\n streamUrl: string\n streamId?: string\n keepAlive?: boolean\n keepAliveIntervalSeconds?: number\n sound?: boolean\n video?: StreamVideoConfig\n audio?: StreamAudioConfig\n}\n\nexport type StreamKeepAliveRequest = {\n type?: \"keep_stream_alive\"\n streamId: string\n ackId: string\n}\n\nexport type PairFailureEvent = {\n type: \"pair_failure\"\n error: string\n}\n\nexport type AudioPairingNeededEvent = {\n type: \"audio_pairing_needed\"\n deviceName: string\n}\n\nexport type AudioConnectedEvent = {\n type: \"audio_connected\"\n deviceName: string\n}\n\nexport type AudioDisconnectedEvent = {\n type: \"audio_disconnected\"\n}\n\nexport type SaveSettingEvent = {\n type: \"save_setting\"\n key: string\n value: any\n}\n\nexport type WsTextEvent = {\n type: \"ws_text\"\n text: string\n}\n\nexport type WsBinEvent = {\n type: \"ws_bin\"\n base64: string\n}\n\nexport type MicPcmEvent = {\n type: \"mic_pcm\"\n pcm: ArrayBuffer\n sampleRate: 16000\n bitsPerSample: 16\n channels: 1\n encoding: \"pcm_s16le\"\n voiceActivityDetectionEnabled: boolean\n}\n\nexport type MicLc3Event = {\n type: \"mic_lc3\"\n lc3: ArrayBuffer\n sampleRate: 16000\n channels: 1\n encoding: \"lc3\"\n frameDurationMs: 10\n frameSizeBytes: number\n bitrate: number\n packetizedFromGlasses: boolean\n voiceActivityDetectionEnabled: boolean\n}\n\nexport type StreamStatusLifecycleState = \"initializing\" | \"streaming\" | \"stopping\" | \"stopped\"\nexport type StreamStatusReconnectState = \"reconnecting\" | \"reconnected\" | \"reconnect_failed\"\nexport type StreamStatusState = StreamStatusLifecycleState | StreamStatusReconnectState | \"error\"\n\n/** Effective stream settings reported by the glasses after defaults and clamps. */\nexport type StreamResolvedConfig = {\n transport?: \"rtmp\" | \"srt\" | \"whip\"\n video?: {\n /** Encoded output width sent to the stream endpoint. */\n width: number\n /** Encoded output height sent to the stream endpoint. */\n height: number\n /** Native camera buffer width selected before crop/downscale. */\n captureWidth?: number\n /** Native camera buffer height selected before crop/downscale. */\n captureHeight?: number\n /** Encoded video bitrate in bits per second. */\n bitrate: number\n /** Resolved capture/encode frame rate. */\n fps: number\n }\n audio?: {\n /** Encoded audio bitrate in bits per second. */\n bitrate?: number\n /** Audio sample rate in Hz. */\n sampleRate?: number\n echoCancellation?: boolean\n noiseSuppression?: boolean\n }\n}\n\ntype StreamStatusCommon = {\n type: \"stream_status\"\n streamId?: string\n timestamp?: number\n resolvedConfig?: StreamResolvedConfig\n}\n\nexport type StreamStatusEvent =\n | (StreamStatusCommon & {\n kind: \"lifecycle\"\n status: StreamStatusLifecycleState\n })\n | (StreamStatusCommon & {\n kind: \"reconnect\"\n status: \"reconnecting\"\n attempt: number\n maxAttempts: number\n reason: string\n })\n | (StreamStatusCommon & {\n kind: \"reconnect\"\n status: \"reconnected\"\n attempt: number\n })\n | (StreamStatusCommon & {\n kind: \"reconnect\"\n status: \"reconnect_failed\"\n maxAttempts: number\n })\n | (StreamStatusCommon & {\n kind: \"error\"\n status: \"error\"\n errorDetails: string\n })\n | (StreamStatusCommon & {\n kind: \"snapshot\"\n status: \"streaming\" | \"reconnecting\" | \"stopped\"\n streaming: boolean\n reconnecting: boolean\n attempt?: number\n })\n\nexport type KeepAliveAckEvent = {\n type: \"keep_alive_ack\"\n streamId: string\n ackId: string\n timestamp?: number\n}\n\nexport type MtkUpdateCompleteEvent = {\n type: \"mtk_update_complete\"\n message: string\n timestamp: number\n}\n\nexport type OtaUpdateAvailableEvent = {\n type: \"ota_update_available\"\n version_code?: number\n version_name?: string\n updates?: string[]\n total_size?: number\n cache_ready?: boolean\n}\n\n/** @deprecated Glasses no longer emit ota_progress; use {@link OtaStatusEvent} and status-store mapping. */\nexport type OtaProgressEvent = {\n type: \"ota_progress\"\n stage?: OtaStage\n status?: OtaProgressStatus\n progress?: number\n bytes_downloaded?: number\n total_bytes?: number\n current_update?: string\n error_message?: string\n}\n\nexport type OtaStartAckEvent = {\n type: \"ota_start_ack\"\n timestamp: number\n}\n\nexport type OtaStatusEvent = {\n type: \"ota_status\"\n session_id: string\n total_steps: number\n current_step: number\n step_type: \"apk\" | \"mtk\" | \"bes\"\n phase: \"download\" | \"install\"\n step_percent: number\n overall_percent: number\n status: \"in_progress\" | \"step_complete\" | \"complete\" | \"failed\" | \"idle\"\n error_message?: string\n}\n\nexport type OtaQueryResult = OtaUpdateAvailableEvent | OtaStatusEvent\n\n/** Nex BLE protobuf trace (NexEventUtils); payload matches native Map keys. */\nexport type BleCommandTraceEvent = {\n command: string\n commandText: string\n timestamp: number\n}\n\nexport type MiniappSelectedEvent = {\n type: \"miniapp_selected\"\n packageName: string\n}\n\n// Union type of all native/internal Bluetooth SDK events.\nexport type BluetoothSdkInternalEvent = Parameters<BluetoothSdkModuleEvents[keyof BluetoothSdkModuleEvents]>[0]\n\nexport type BluetoothSdkModuleEvents = {\n glasses_status: (changed: Partial<GlassesStatus>) => void\n bluetooth_status: (changed: Partial<BluetoothStatus>) => void\n log: (event: LogEvent) => void\n device_discovered: (device: Device) => void\n default_device_changed: (event: {device?: Device}) => void\n // Individual event handlers\n glasses_not_ready: (event: GlassesNotReadyEvent) => void\n button_press: (event: ButtonPressEvent) => void\n touch_event: (event: TouchEvent) => void\n head_up: (event: HeadUpEvent) => void\n voice_activity_detection_status: (event: VoiceActivityDetectionStatusEvent) => void\n speaking_status: (event: SpeakingStatusEvent) => void\n battery_status: (event: BatteryStatusEvent) => void\n local_transcription: (event: LocalTranscriptionEvent) => void\n wifi_status_change: (event: WifiStatusChangeEvent) => void\n wifi_scan_result: (event: WifiScanResultEvent) => void\n hotspot_status_change: (event: HotspotStatusChangeEvent) => void\n hotspot_error: (event: HotspotErrorEvent) => void\n photo_response: (event: PhotoResponseEvent) => void\n photo_status: (event: PhotoStatusEvent) => void\n video_recording_status: (event: VideoRecordingStatusEvent) => void\n gallery_status: (event: GalleryStatusEvent) => void\n compatible_glasses_search_stop: (event: CompatibleGlassesSearchStopEvent) => void\n heartbeat_sent: (event: HeartbeatSentEvent) => void\n heartbeat_received: (event: HeartbeatReceivedEvent) => void\n swipe_volume_status: (event: SwipeVolumeStatusEvent) => void\n switch_status: (event: SwitchStatusEvent) => void\n rgb_led_control_response: (event: RgbLedControlResponseEvent) => void\n settings_ack: (event: SettingsAckEvent) => void\n pair_failure: (event: PairFailureEvent) => void\n audio_pairing_needed: (event: AudioPairingNeededEvent) => void\n audio_connected: (event: AudioConnectedEvent) => void\n audio_disconnected: (event: AudioDisconnectedEvent) => void\n save_setting: (event: SaveSettingEvent) => void\n ws_text: (event: WsTextEvent) => void\n ws_bin: (event: WsBinEvent) => void\n mic_pcm: (event: MicPcmEvent) => void\n mic_lc3: (event: MicLc3Event) => void\n stream_status: (event: StreamStatusEvent) => void\n keep_alive_ack: (event: KeepAliveAckEvent) => void\n mtk_update_complete: (event: MtkUpdateCompleteEvent) => void\n ota_update_available: (event: OtaUpdateAvailableEvent) => void\n ota_start_ack: (event: OtaStartAckEvent) => void\n ota_status: (event: OtaStatusEvent) => void\n version_info: (event: VersionInfoEvent) => void\n send_command_to_ble: (event: BleCommandTraceEvent) => void\n receive_command_from_ble: (event: BleCommandTraceEvent) => void\n miniapp_selected: (event: MiniappSelectedEvent) => void\n extraction_progress: (event: ExtractionProgressEvent) => void\n}\n\nexport interface ExtractionProgressEvent {\n percentage: number\n bytesRead: number\n totalBytes: number\n}\n\nexport type PublicGlassesStatus = Omit<\n GlassesStatus,\n \"otaUpdateAvailable\" | \"otaProgress\" | \"otaInProgress\" | \"otaVersionUrl\"\n>\n\nexport type PublicBluetoothStatus = Pick<\n BluetoothStatus,\n | \"searching\"\n | \"searchingController\"\n | \"systemMicUnavailable\"\n | \"micRanking\"\n | \"currentMic\"\n | \"searchResults\"\n | \"wifiScanResults\"\n | \"lastLog\"\n | \"otherBtConnected\"\n | \"galleryModeEnabled\"\n>\n\nexport type BluetoothSdkEventMap = {\n log: LogEvent\n device_discovered: Device\n default_device_changed: {device?: Device}\n glasses_not_ready: GlassesNotReadyEvent\n button_press: ButtonPressEvent\n touch_event: TouchEvent\n head_up: HeadUpEvent\n voice_activity_detection_status: VoiceActivityDetectionStatusEvent\n speaking_status: SpeakingStatusEvent\n battery_status: BatteryStatusEvent\n local_transcription: LocalTranscriptionEvent\n wifi_status_change: WifiStatusChangeEvent\n wifi_scan_result: WifiScanResultEvent\n hotspot_status_change: HotspotStatusChangeEvent\n hotspot_error: HotspotErrorEvent\n photo_response: PhotoResponseEvent\n photo_status: PhotoStatusEvent\n video_recording_status: VideoRecordingStatusEvent\n gallery_status: GalleryStatusEvent\n compatible_glasses_search_stop: CompatibleGlassesSearchStopEvent\n swipe_volume_status: SwipeVolumeStatusEvent\n switch_status: SwitchStatusEvent\n rgb_led_control_response: RgbLedControlResponseEvent\n settings_ack: SettingsAckEvent\n pair_failure: PairFailureEvent\n audio_pairing_needed: AudioPairingNeededEvent\n audio_connected: AudioConnectedEvent\n audio_disconnected: AudioDisconnectedEvent\n mic_pcm: MicPcmEvent\n mic_lc3: MicLc3Event\n stream_status: StreamStatusEvent\n ota_update_available: OtaUpdateAvailableEvent\n ota_start_ack: OtaStartAckEvent\n ota_status: OtaStatusEvent\n version_info: VersionInfoEvent\n extraction_progress: ExtractionProgressEvent\n}\n\nexport type BluetoothSdkEventName = keyof BluetoothSdkEventMap\n\nexport type BluetoothSdkEventListener<EventName extends BluetoothSdkEventName> = (\n event: BluetoothSdkEventMap[EventName],\n) => void\n\nexport type BluetoothSdkSubscription = {\n remove(): void\n}\n\nexport type BluetoothSdkEvent = BluetoothSdkEventMap[BluetoothSdkEventName]\n\nexport interface BluetoothSdkPublicModule {\n addListener<EventName extends BluetoothSdkEventName>(\n eventName: EventName,\n listener: BluetoothSdkEventListener<EventName>,\n ): BluetoothSdkSubscription\n\n getDefaultDevice(): Promise<Device | null>\n setDefaultDevice(device: Device | null): Promise<void>\n clearDefaultDevice(): Promise<void>\n\n startScan(model: DeviceModel): Promise<void>\n stopScan(): Promise<void>\n scan(options: ScanOptions): Promise<Device[]>\n scan(model: DeviceModel, options?: ScanModelOptions): Promise<Device[]>\n connect(device: Device, options?: ConnectOptions): Promise<void>\n connectDefault(options?: ConnectOptions): Promise<void>\n cancelConnectionAttempt(): Promise<void>\n disconnect(): Promise<void>\n forget(): Promise<void>\n\n displayText(text: string, x?: number, y?: number, size?: number): Promise<void>\n clearDisplay(): Promise<void>\n showDashboard(): Promise<void>\n setDashboardPosition(height: number, depth: number): Promise<void>\n setHeadUpAngle(angleDegrees: number): Promise<void>\n setScreenDisabled(disabled: boolean): Promise<void>\n\n requestWifiScan(): Promise<WifiSearchResult[]>\n sendWifiCredentials(ssid: string, password: string): Promise<WifiStatusChangeEvent>\n forgetWifiNetwork(ssid: string): Promise<WifiStatusChangeEvent>\n setHotspotState(enabled: boolean): Promise<HotspotStatusChangeEvent>\n\n setGalleryModeEnabled(enabled: boolean): Promise<SettingsAckSuccessEvent>\n setVoiceActivityDetectionEnabled(enabled: boolean): Promise<void>\n setButtonPhotoSettings(size: ButtonPhotoSize): Promise<SettingsAckSuccessEvent>\n setButtonVideoRecordingSettings(width: number, height: number, fps: number): Promise<SettingsAckSuccessEvent>\n setButtonCameraLed(enabled: boolean): Promise<SettingsAckSuccessEvent>\n setButtonMaxRecordingTime(minutes: number): Promise<SettingsAckSuccessEvent>\n setCameraFov(request: CameraFovRequest): Promise<CameraFovResult>\n queryGalleryStatus(): Promise<GalleryStatusEvent>\n requestPhoto(params: PhotoRequestParams): Promise<PhotoSuccessResponseEvent>\n startVideoRecording(\n requestId: string,\n save: boolean,\n sound: boolean,\n settings?: VideoRecordingSettings,\n ): Promise<VideoRecordingStartedStatusEvent>\n stopVideoRecording(requestId: string): Promise<VideoRecordingStoppedStatusEvent>\n\n startStream(params: StreamStartRequest): Promise<StreamStatusEvent>\n stopStream(): Promise<StreamStatusEvent>\n\n setMicState(enabled: boolean, useGlassesMic?: boolean, sendTranscript?: boolean, sendLc3Data?: boolean): Promise<void>\n setPreferredMic(preferredMic: MicPreference): Promise<void>\n setOwnAppAudioPlaying(playing: boolean): Promise<void>\n getGlassesMediaVolume(): Promise<GlassesMediaVolumeGetResult>\n setGlassesMediaVolume(level: number): Promise<GlassesMediaVolumeSetResult>\n\n rgbLedControl(\n requestId: string,\n packageName: string | null,\n action: RgbLedAction,\n color: RgbLedColor | null,\n onDurationMs: number,\n offDurationMs: number,\n count: number,\n ): Promise<RgbLedControlSuccessResponseEvent>\n\n requestVersionInfo(): Promise<VersionInfoResult>\n /** Ask connected Mentra Live glasses to check/report OTA availability and status. */\n checkForOtaUpdate(): Promise<OtaQueryResult>\n /** Start the OTA flow after your app has presented the available update to the user. */\n startOtaUpdate(): Promise<OtaStartAckEvent>\n /** Re-run the glasses-side OTA version check, mainly after correcting clock skew/TLS failures. */\n retryOtaVersionCheck(): Promise<OtaQueryResult>\n\n // // stt commands (MOVE TO CRUST)\n // setSttModelDetails(path: string, languageCode: string): Promise<void>\n // getSttModelPath(): Promise<string>\n // checkSttModelAvailable(): Promise<boolean>\n // validateSttModel(path: string): Promise<boolean>\n // extractTarBz2(sourcePath: string, destinationPath: string): Promise<boolean>\n\n // // tts commands (MOVE TO CRUST)\n // setTtsModelDetails(path: string, languageCode: string): Promise<void>\n // getTtsModelPath(): Promise<string>\n // getTtsModelLanguage(): Promise<string>\n // checkTtsModelAvailable(): Promise<boolean>\n // validateTtsModel(path: string): Promise<boolean>\n // generateTtsAudio(text: string, path: string, outputPath: string, speakerId: number, speed: number): Promise<boolean>\n\n // STT Commands (TODO: MOVE TO CRUST)\n setSttModelDetails(path: string, languageCode: string): Promise<void>\n getSttModelPath(): Promise<string>\n checkSttModelAvailable(): Promise<boolean>\n validateSttModel(path: string): Promise<boolean>\n extractTarBz2(sourcePath: string, destinationPath: string): Promise<boolean>\n restartTranscriber(): Promise<void>\n\n // TTS Commands (TODO: MOVE TO CRUST)\n setTtsModelDetails(path: string, languageCode: string): Promise<void>\n getTtsModelPath(): Promise<string>\n getTtsModelLanguage(): Promise<string>\n checkTtsModelAvailable(): Promise<boolean>\n validateTtsModel(path: string): Promise<boolean>\n generateTtsAudio(\n text: string,\n modelPath: string,\n outputPath: string,\n speakerId: number,\n speed: number,\n ): Promise<boolean>\n}\n\n// OTA update status types\nexport type OtaStage = \"download\" | \"install\"\nexport type OtaProgressStatus = \"STARTED\" | \"PROGRESS\" | \"FINISHED\" | \"FAILED\"\n\nexport interface OtaStatus {\n sessionId: string\n totalSteps: number\n currentStep: number\n stepType: \"apk\" | \"mtk\" | \"bes\"\n phase: \"download\" | \"install\"\n stepPercent: number\n overallPercent: number\n status: \"in_progress\" | \"step_complete\" | \"complete\" | \"failed\" | \"idle\"\n error?: string\n}\n\nexport interface OtaUpdateInfo {\n available: boolean\n versionCode: number\n versionName: string\n updates: string[] // [\"apk\", \"mtk\", \"bes\"]\n totalSize: number\n cacheReady?: boolean\n}\n\nexport interface OtaProgress {\n stage: OtaStage\n status: OtaProgressStatus\n progress: number\n bytesDownloaded: number\n totalBytes: number\n currentUpdate: string\n errorMessage?: string\n}\n\nexport interface GlassesStatus {\n // state:\n connection: GlassesConnectionStatus\n micEnabled: boolean\n voiceActivityDetectionEnabled: boolean\n bluetoothClassicConnected: boolean\n signalStrength: number\n /** Milliseconds since epoch when signalStrength was last refreshed by the phone BLE stack. */\n signalStrengthUpdatedAt: number\n // device info\n deviceModel: string\n androidVersion: string\n firmwareVersion: string\n besFirmwareVersion: string\n mtkFirmwareVersion: string\n bluetoothMacAddress: string\n leftMacAddress: string\n rightMacAddress: string\n buildNumber: string\n /** Glasses System.currentTimeMillis() from last version_info (clock skew detection). */\n systemTimeMs?: number\n otaVersionUrl: string\n appVersion: string\n bluetoothName: string\n serialNumber: string\n style: string\n color: string\n // wifi info\n wifi: WifiStatus\n // battery info\n batteryLevel: number\n charging: boolean\n caseBatteryLevel: number\n caseCharging: boolean\n caseOpen: boolean\n caseRemoved: boolean\n // hotspot info\n hotspot: HotspotStatus\n // OTA update info\n otaUpdateAvailable: OtaUpdateInfo | null\n otaProgress: OtaProgress | null\n otaInProgress: boolean\n // ring info\n controllerConnected: boolean\n controllerFullyBooted: boolean\n controllerMacAddress: string\n controllerBatteryLevel: number\n controllerSignalStrength: number\n}\n\nexport interface CoreDashboardMenuItem {\n name: string\n packageName: string\n running: boolean\n}\n\nexport interface CalendarEvent {\n title: string\n location?: string\n time: string\n endDate: number\n}\n\nexport interface CoreSettings {\n menu_apps: CoreDashboardMenuItem[]\n calendar_events: CalendarEvent[]\n}\n\nexport interface Device {\n /**\n * Stable app-facing key for this scan result, within the limits of the\n * platform identifier available to the SDK. Do not parse this value; use the\n * typed model, name, address, and rssi fields instead.\n */\n id: string\n model: DeviceModel\n name: string\n /** Platform address/identifier when available: Android Bluetooth address, iOS CoreBluetooth identifier. */\n address?: string\n /**\n * Optional scan signal strength. It may be undefined at first discovery and\n * appear in a later scan update when the platform reports RSSI metadata.\n */\n rssi?: number\n}\n\nexport interface ConnectOptions {\n saveAsDefault?: boolean\n cancelExistingConnectionAttempt?: boolean\n}\n\nexport type ScanResultsCallback = (devices: Device[]) => void\n\nexport interface ScanOptions {\n model: DeviceModel\n /** Defaults to 15000. */\n timeoutMs?: number\n /** Alias for `timeoutMs`, useful when mirroring native examples. */\n timeout?: number\n /** Called every time the discovered device list changes during the scan. */\n onResults?: ScanResultsCallback\n}\n\nexport type ScanModelOptions = Omit<ScanOptions, \"model\">\n\nexport interface WifiSearchResult {\n ssid: string\n requiresPassword: boolean\n signalStrength: number\n /** Frequency in MHz (from glasses scan). 5 GHz band is typically 5170–5825. Omitted if unknown. */\n frequency?: number\n}\n\nexport interface BluetoothStatus {\n // state:\n searching: boolean\n searchingController: boolean\n default_wearable?: DeviceModel | \"\"\n pending_wearable?: DeviceModel | \"\"\n device_name?: string\n device_address?: string\n default_controller?: DeviceModel | \"\"\n pending_controller?: DeviceModel | \"\"\n controller_device_name?: string\n controller_address?: string\n systemMicUnavailable: boolean\n micRanking: MicMode[]\n currentMic: MicMode | \"\" | null\n /**\n * Nearby glasses in stable discovery order.\n * Existing entries keep their array position as details refresh; new glasses append at the end,\n * and removals should not reorder remaining entries.\n */\n searchResults: Device[]\n wifiScanResults: WifiSearchResult[]\n lastLog: string[]\n otherBtConnected: boolean\n // desired settings the SDK sends to compatible connected glasses:\n galleryModeEnabled: boolean\n}\n\nexport type BluetoothSettingsUpdate = Partial<{\n auth_email: string\n core_token: string\n sensing_enabled: boolean\n power_saving_mode: boolean\n lc3_frame_size: number\n preferred_mic: MicPreference\n screen_disabled: boolean\n contextual_dashboard: boolean\n head_up_angle: number\n brightness: number\n auto_brightness: boolean\n dashboard_height: number\n dashboard_depth: number\n menu_apps: DashboardMenuItem[] | CoreDashboardMenuItem[] | Array<Record<string, unknown>> | null\n calendar_events: CalendarEvent[]\n metric_system: boolean\n twelve_hour_time: boolean\n gallery_mode: boolean\n voice_activity_detection_enabled: boolean\n button_photo_size: ButtonPhotoSize\n button_video_settings: {width: number; height: number; fps: number}\n button_video_width: number\n button_video_height: number\n button_video_fps: number\n button_camera_led: boolean\n button_max_recording_time: number\n camera_fov: NativeCameraFovSetting\n should_send_pcm: boolean\n should_send_lc3: boolean\n should_send_transcript: boolean\n offline_mode: boolean\n offline_captions_running: boolean\n local_stt_fallback_active: boolean\n pending_wearable: DeviceModel | \"\"\n default_wearable: DeviceModel | \"\"\n device_name: string\n device_address: string\n default_controller: DeviceModel | \"\"\n pending_controller: DeviceModel | \"\"\n controller_device_name: string\n controller_address: string\n}>\n"]}
1
+ {"version":3,"file":"BluetoothSdk.types.js","sourceRoot":"","sources":["../src/BluetoothSdk.types.ts"],"names":[],"mappings":"AAwCA,MAAM,CAAC,MAAM,wCAAwC,GAAG,KAAK,CAAA;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AC,MAAM,kBAAkB,GAAG,GAAG,CAAA","sourcesContent":["// Bluetooth SDK Event Types\nexport type GlassesNotReadyEvent = {\n type: \"glasses_not_ready\"\n message: string\n}\n\n// NOTE: unlike most events below, the native module does NOT include a `type`\n// field on the button_press payload — it sends only {buttonId, pressType,\n// timestamp} (see BluetoothSdkModule on both iOS and Android). Consumers must\n// filter on `pressType` / the \"button_press\" listener name, never `event.type`.\nexport type ButtonPressEvent = {\n buttonId: string\n pressType: \"long\" | \"short\"\n timestamp: number\n}\n\nexport type TouchEvent = {\n type: \"touch_event\"\n deviceModel: DeviceModel\n gestureName: string\n timestamp: number\n}\n\nexport type AccelEvent = {\n type: \"accel_event\"\n x: number\n y: number\n z: number\n timestamp: number\n}\n\nexport type HeadUpEvent = {\n up: boolean\n}\n\nexport type VoiceActivityDetectionStatusEvent = {\n type: \"voice_activity_detection_status\"\n voiceActivityDetectionEnabled: boolean\n}\n\nexport const DEFAULT_VOICE_ACTIVITY_DETECTION_ENABLED = false\n\nexport type SpeakingStatusEvent = {\n type: \"speaking_status\"\n speaking: boolean\n timestamp: number\n}\n\nexport type BatteryStatusEvent = {\n type: \"battery_status\"\n level: number\n charging: boolean\n timestamp: number\n}\n\nexport type GlassesConnectionStatus =\n | {state: \"disconnected\"}\n | {state: \"scanning\"}\n | {state: \"connecting\"}\n | {state: \"bonding\"}\n | {state: \"connected\"; fullyBooted: boolean}\n\nexport type ConnectedGlassesConnectionStatus = Extract<GlassesConnectionStatus, {state: \"connected\"}>\n\nexport function isConnectedGlassesConnectionStatus(\n status: GlassesConnectionStatus,\n): status is ConnectedGlassesConnectionStatus {\n return status.state === \"connected\"\n}\n\nexport function isReadyGlassesConnectionStatus(status: GlassesConnectionStatus): boolean {\n return status.state === \"connected\" && status.fullyBooted\n}\n\nexport function isBusyGlassesConnectionStatus(status: GlassesConnectionStatus): boolean {\n return status.state === \"scanning\" || status.state === \"connecting\" || status.state === \"bonding\"\n}\n\nexport function createDisconnectedGlassesStatus(): Partial<GlassesStatus> {\n return {\n connection: {state: \"disconnected\"},\n hotspot: {state: \"disabled\"},\n voiceActivityDetectionEnabled: DEFAULT_VOICE_ACTIVITY_DETECTION_ENABLED,\n wifi: {state: \"disconnected\"},\n }\n}\n\n/** K900 `sr_getvol` response (Mentra Live glasses media step volume 0–15). */\nexport type GlassesMediaVolumeGetResult = {\n level: number\n statusCode: number\n}\n\n/** K900 `sr_vol` acknowledgment. */\nexport type GlassesMediaVolumeSetResult = {\n statusCode: number\n}\n\nexport type LocalTranscriptionEvent = {\n text: string\n isFinal?: boolean\n transcribeLanguage?: string\n}\n\nexport type LogEvent = {\n message: string\n}\n\nexport type WifiStatus = {state: \"disconnected\"} | {state: \"connected\"; ssid: string; localIp?: string}\n\nexport type ConnectedWifiStatus = Extract<WifiStatus, {state: \"connected\"}>\n\nexport function isConnectedWifiStatus(status: WifiStatus): status is ConnectedWifiStatus {\n return status.state === \"connected\"\n}\n\nexport type WifiStatusChangeEvent = WifiStatus & {\n type: \"wifi_status_change\"\n}\n\nexport type HotspotStatus = {state: \"disabled\"} | {state: \"enabled\"; ssid: string; password: string; localIp: string}\n\nexport type EnabledHotspotStatus = Extract<HotspotStatus, {state: \"enabled\"}>\n\nexport function isEnabledHotspotStatus(status: HotspotStatus): status is EnabledHotspotStatus {\n return status.state === \"enabled\"\n}\n\nexport type HotspotStatusChangeEvent = HotspotStatus & {\n type: \"hotspot_status_change\"\n}\n\nexport type HotspotErrorEvent = {\n type: \"hotspot_error\"\n errorMessage: string\n timestamp: number\n}\n\nexport type VersionInfoResult = {\n androidVersion: string\n firmwareVersion: string\n besFirmwareVersion: string\n mtkFirmwareVersion: string\n buildNumber: string\n systemTimeMs?: number\n otaVersionUrl: string\n appVersion: string\n}\n\nexport type VersionInfoEvent = VersionInfoResult & {\n type: \"version_info\"\n}\n\nexport type WifiScanResultEvent = {\n type: \"wifi_scan_result\"\n networks: WifiSearchResult[]\n scanComplete?: boolean\n}\n\nexport type PhotoResponseEvent =\n | {\n type: \"photo_response\"\n state: \"success\"\n requestId: string\n uploadUrl: string\n photoUrl?: string\n statusUrl?: string\n contentType?: string\n fileSizeBytes?: number\n timestamp: number\n }\n | {\n type: \"photo_response\"\n state: \"error\"\n requestId: string\n timestamp: number\n errorCode?: string\n errorMessage: string\n }\n\nexport type PhotoSuccessResponseEvent = Extract<PhotoResponseEvent, {state: \"success\"}>\n\nexport type PhotoStatusState =\n | \"accepted\"\n | \"queued\"\n | \"configuring\"\n | \"capturing\"\n | \"captured\"\n | \"compressing\"\n | \"ble_fallback_compression\"\n | \"uploading\"\n | \"uploaded\"\n | \"ready_for_transfer\"\n | \"transferring\"\n | \"failed\"\n\nexport type PhotoResolvedConfig = {\n format?: \"jpeg\" | string\n width?: number\n height?: number\n quality?: number\n requestedSize?: PhotoSize | string\n source?: \"sdk\" | \"button\" | string\n transferMethod?: \"webhook\" | \"ble\" | \"local\" | string\n compression?: PhotoCompression | string\n saveToGallery?: boolean\n exposureTimeNs?: number\n iso?: number\n}\n\nexport type PhotoFpsRange = {\n min?: number\n max?: number\n}\n\nexport type PhotoRequestedCaptureConfig = {\n manual?: boolean\n exposureTimeNs?: number\n iso?: number\n frameDurationNs?: number\n aeMode?: number\n aeLock?: boolean\n aeExposureCompensation?: number\n aeTargetFpsRange?: PhotoFpsRange\n noiseReductionMode?: number\n edgeMode?: number\n afMode?: number\n zsl?: boolean\n}\n\nexport type PhotoMeteredPreview = {\n exposureTimeNs?: number\n iso?: number\n totalLightProxy?: number\n}\n\nexport type PhotoCaptureMetadata = {\n manual?: boolean\n exposureTimeNs?: number\n iso?: number\n frameDurationNs?: number\n aeMode?: number\n aeState?: number\n aeStateName?: string\n noiseReductionMode?: number\n edgeMode?: number\n zsl?: boolean\n sensorTimestampNs?: number\n totalLightProxy?: number\n mfnrLikely?: boolean\n}\n\nexport type PhotoStatusEvent = {\n type: \"photo_status\"\n requestId: string\n status: PhotoStatusState | string\n timestamp: number\n resolvedConfig?: PhotoResolvedConfig\n requestedCaptureConfig?: PhotoRequestedCaptureConfig\n meteredPreview?: PhotoMeteredPreview\n captureMetadata?: PhotoCaptureMetadata\n errorCode?: string\n errorMessage?: string\n}\n\nexport type VideoRecordingStatusEvent = {\n type: \"video_recording_status\"\n requestId?: string\n success: boolean\n status: VideoRecordingStatusState\n details?: string | null\n timestamp: number\n data?: {\n recording?: boolean\n duration_ms?: number\n duration_formatted?: string\n [key: string]: unknown\n }\n}\n\nexport type VideoRecordingStatusState =\n | \"recording_started\"\n | \"recording_status\"\n | \"already_recording\"\n | \"recording_stopped\"\n | \"not_recording\"\n | \"request_id_mismatch\"\n | \"service_unavailable\"\n | \"json_error\"\n | \"battery_low\"\n | \"camera_busy\"\n | \"storage_unavailable\"\n | \"integrity_failed\"\n | \"error\"\n\nexport type VideoRecordingStartedStatusEvent = Omit<VideoRecordingStatusEvent, \"success\" | \"status\"> & {\n success: true\n status: \"recording_started\"\n}\n\nexport type VideoRecordingStoppedStatusEvent = Omit<VideoRecordingStatusEvent, \"success\" | \"status\"> & {\n success: true\n status: \"recording_stopped\"\n}\n\nexport type VideoRecordingSuccessStatusEvent =\n | VideoRecordingStartedStatusEvent\n | VideoRecordingStoppedStatusEvent\n\nexport type GalleryStatusEvent = {\n type: \"gallery_status\"\n photos: number\n videos: number\n total: number\n totalSize?: number\n hasContent: boolean\n cameraBusy: boolean\n cameraBusyReason?: \"video\" | \"stream\" | (string & {})\n}\n\nexport type CompatibleGlassesSearchStopEvent = {\n type: \"compatible_glasses_search_stop\"\n deviceModel: DeviceModel\n}\n\nexport type HeartbeatSentEvent = {\n type: \"heartbeat_sent\"\n heartbeat_sent: {\n timestamp: number\n }\n}\n\nexport type HeartbeatReceivedEvent = {\n type: \"heartbeat_received\"\n heartbeat_received: {\n timestamp: number\n }\n}\n\nexport type SwipeVolumeStatusEvent = {\n type: \"swipe_volume_status\"\n enabled: boolean\n timestamp: number\n}\n\nexport type SwitchStatusEvent = {\n type: \"switch_status\"\n switchType?: number\n switchValue?: number\n timestamp: number\n}\n\nexport type RgbLedControlResponseEvent =\n | {\n type: \"rgb_led_control_response\"\n state: \"success\"\n requestId: string\n }\n | {\n type: \"rgb_led_control_response\"\n state: \"error\"\n requestId: string\n errorCode: string\n }\n\nexport type RgbLedControlSuccessResponseEvent = Extract<RgbLedControlResponseEvent, {state: \"success\"}>\n\nexport type SettingsAckStatus = \"applied\" | \"ready\" | \"error\" | \"failed\" | \"failure\" | \"rejected\"\n\nexport type SettingsAckSetting =\n | \"gallery_mode\"\n | \"button_photo\"\n | \"button_video_recording\"\n | \"button_camera_led\"\n | \"button_max_recording_time\"\n | \"camera_fov\"\n\nexport type SettingsAckEvent = {\n type: \"settings_ack\"\n requestId: string\n setting: SettingsAckSetting\n status: SettingsAckStatus\n timestamp: number\n fov?: number\n roiPosition?: CameraRoiPositionValue\n hardwareApplied?: boolean\n active?: boolean\n size?: ButtonPhotoSize | string\n width?: number\n height?: number\n fps?: number\n enabled?: boolean\n minutes?: number\n errorCode?: string\n errorMessage?: string\n}\n\nexport type SettingsAckSuccessStatus = Exclude<SettingsAckStatus, \"error\" | \"failed\" | \"failure\" | \"rejected\">\n\nexport type SettingsAckSuccessEvent = Omit<SettingsAckEvent, \"status\"> & {\n status: SettingsAckSuccessStatus\n}\n\nexport type RgbLedAction = \"on\" | \"off\"\nexport type RgbLedColor = \"red\" | \"green\" | \"blue\" | \"orange\" | \"white\"\nexport type PhotoSize = \"small\" | \"medium\" | \"large\" | \"full\"\nexport type ButtonPhotoSize = \"small\" | \"medium\" | \"large\" | \"max\"\nexport type PhotoCompression = \"none\" | \"medium\" | \"heavy\"\n\n/**\n * Optional per-recording video settings for {@link startVideoRecording}. When\n * omitted, the glasses fall back to their saved button-video settings. Any\n * field left undefined is omitted from the BLE command (glasses default applies).\n */\nexport interface VideoRecordingSettings {\n width?: number\n height?: number\n fps?: number\n}\nexport const DeviceModels = {\n Simulated: \"Simulated Glasses\",\n G1: \"Even Realities G1\",\n G2: \"Even Realities G2\",\n MentraLive: \"Mentra Live\",\n MentraNex: \"Mentra Display\",\n Mach1: \"Mentra Mach1\",\n Z100: \"Vuzix Z100\",\n Frame: \"Brilliant Frame\",\n R1: \"Even Realities R1\",\n} as const\n\nexport type DeviceModel = (typeof DeviceModels)[keyof typeof DeviceModels]\nexport type ObservableStoreCategory = \"glasses\" | \"bluetooth\" | \"core\"\n\nexport type DashboardMenuItem = {\n title: string\n packageName: string\n values?: Record<string, unknown>\n}\n\nexport const CAMERA_FOV_MIN = 62\nexport const CAMERA_FOV_MAX = 118\nexport const CAMERA_FOV_DEFAULT = 102\n\nexport type CameraRoiPosition = \"center\" | \"bottom\" | \"top\"\nexport type CameraRoiPositionValue = 0 | 1 | 2\nexport type CameraFovPreset = \"narrow\" | \"standard\" | \"wide\"\n\nexport type CameraFovRequest =\n | {\n fov: number\n roiPosition?: CameraRoiPosition\n }\n | {\n preset: CameraFovPreset\n }\n\nexport type CameraFovResult = {\n requestId: string\n fov: number\n roiPosition: CameraRoiPosition\n timestamp: number\n}\n\nexport type CameraFovSetting = {\n fov: number\n roiPosition: CameraRoiPositionValue\n}\n\ntype NativeCameraFovSetting = {\n fov: number\n roi_position: CameraRoiPositionValue\n}\n\nexport type MicPreference = \"auto\" | \"phone\" | \"glasses\" | \"bluetooth\"\nexport type MicMode = \"phone\" | \"glasses\" | \"bluetoothClassic\" | \"bluetooth\"\n\nexport type PhotoRequestParams = {\n requestId: string\n appId: string\n size: PhotoSize\n webhookUrl: string | null\n authToken: string | null\n compress: PhotoCompression\n save?: boolean\n sound: boolean\n exposureTimeNs?: number | null\n /** Sensor ISO for this capture only. Only used when exposureTimeNs enables manual exposure. */\n iso?: number | null\n}\n\nexport type StreamVideoConfig = {\n width?: number\n height?: number\n bitrate?: number\n fps?: number\n}\n\nexport type StreamAudioConfig = {\n bitrate?: number\n sampleRate?: number\n echoCancellation?: boolean\n noiseSuppression?: boolean\n}\n\nexport type StreamStartRequest = {\n type?: \"start_stream\"\n streamUrl: string\n streamId?: string\n keepAlive?: boolean\n keepAliveIntervalSeconds?: number\n sound?: boolean\n video?: StreamVideoConfig\n audio?: StreamAudioConfig\n}\n\nexport type StreamKeepAliveRequest = {\n type?: \"keep_stream_alive\"\n streamId: string\n ackId: string\n}\n\nexport type PairFailureEvent = {\n type: \"pair_failure\"\n error: string\n}\n\nexport type AudioPairingNeededEvent = {\n type: \"audio_pairing_needed\"\n deviceName: string\n}\n\nexport type AudioConnectedEvent = {\n type: \"audio_connected\"\n deviceName: string\n}\n\nexport type AudioDisconnectedEvent = {\n type: \"audio_disconnected\"\n}\n\nexport type SaveSettingEvent = {\n type: \"save_setting\"\n key: string\n value: any\n}\n\nexport type WsTextEvent = {\n type: \"ws_text\"\n text: string\n}\n\nexport type WsBinEvent = {\n type: \"ws_bin\"\n base64: string\n}\n\nexport type MicPcmEvent = {\n type: \"mic_pcm\"\n pcm: ArrayBuffer\n sampleRate: 16000\n bitsPerSample: 16\n channels: 1\n encoding: \"pcm_s16le\"\n voiceActivityDetectionEnabled: boolean\n}\n\nexport type MicLc3Event = {\n type: \"mic_lc3\"\n lc3: ArrayBuffer\n sampleRate: 16000\n channels: 1\n encoding: \"lc3\"\n frameDurationMs: 10\n frameSizeBytes: number\n bitrate: number\n packetizedFromGlasses: boolean\n voiceActivityDetectionEnabled: boolean\n}\n\nexport type StreamStatusLifecycleState = \"initializing\" | \"streaming\" | \"stopping\" | \"stopped\"\nexport type StreamStatusReconnectState = \"reconnecting\" | \"reconnected\" | \"reconnect_failed\"\nexport type StreamStatusState = StreamStatusLifecycleState | StreamStatusReconnectState | \"error\"\n\n/** Effective stream settings reported by the glasses after defaults and clamps. */\nexport type StreamResolvedConfig = {\n transport?: \"rtmp\" | \"srt\" | \"whip\"\n video?: {\n /** Encoded output width sent to the stream endpoint. */\n width: number\n /** Encoded output height sent to the stream endpoint. */\n height: number\n /** Native camera buffer width selected before crop/downscale. */\n captureWidth?: number\n /** Native camera buffer height selected before crop/downscale. */\n captureHeight?: number\n /** Encoded video bitrate in bits per second. */\n bitrate: number\n /** Resolved capture/encode frame rate. */\n fps: number\n }\n audio?: {\n /** Encoded audio bitrate in bits per second. */\n bitrate?: number\n /** Audio sample rate in Hz. */\n sampleRate?: number\n echoCancellation?: boolean\n noiseSuppression?: boolean\n }\n}\n\ntype StreamStatusCommon = {\n type: \"stream_status\"\n streamId?: string\n timestamp?: number\n resolvedConfig?: StreamResolvedConfig\n}\n\nexport type StreamStatusEvent =\n | (StreamStatusCommon & {\n kind: \"lifecycle\"\n status: StreamStatusLifecycleState\n })\n | (StreamStatusCommon & {\n kind: \"reconnect\"\n status: \"reconnecting\"\n attempt: number\n maxAttempts: number\n reason: string\n })\n | (StreamStatusCommon & {\n kind: \"reconnect\"\n status: \"reconnected\"\n attempt: number\n })\n | (StreamStatusCommon & {\n kind: \"reconnect\"\n status: \"reconnect_failed\"\n maxAttempts: number\n })\n | (StreamStatusCommon & {\n kind: \"error\"\n status: \"error\"\n errorDetails: string\n })\n | (StreamStatusCommon & {\n kind: \"snapshot\"\n status: \"streaming\" | \"reconnecting\" | \"stopped\"\n streaming: boolean\n reconnecting: boolean\n attempt?: number\n })\n\nexport type KeepAliveAckEvent = {\n type: \"keep_alive_ack\"\n streamId: string\n ackId: string\n timestamp?: number\n}\n\nexport type MtkUpdateCompleteEvent = {\n type: \"mtk_update_complete\"\n message: string\n timestamp: number\n}\n\nexport type OtaUpdateAvailableEvent = {\n type: \"ota_update_available\"\n version_code?: number\n version_name?: string\n updates?: string[]\n total_size?: number\n cache_ready?: boolean\n}\n\n/** @deprecated Glasses no longer emit ota_progress; use {@link OtaStatusEvent} and status-store mapping. */\nexport type OtaProgressEvent = {\n type: \"ota_progress\"\n stage?: OtaStage\n status?: OtaProgressStatus\n progress?: number\n bytes_downloaded?: number\n total_bytes?: number\n current_update?: string\n error_message?: string\n}\n\nexport type OtaStartAckEvent = {\n type: \"ota_start_ack\"\n timestamp: number\n}\n\nexport type OtaStatusEvent = {\n type: \"ota_status\"\n session_id: string\n total_steps: number\n current_step: number\n step_type: \"apk\" | \"mtk\" | \"bes\"\n phase: \"download\" | \"install\"\n step_percent: number\n overall_percent: number\n status: \"in_progress\" | \"step_complete\" | \"complete\" | \"failed\" | \"idle\"\n error_message?: string\n}\n\nexport type OtaQueryResult = OtaUpdateAvailableEvent | OtaStatusEvent\n\n/** Nex BLE protobuf trace (NexEventUtils); payload matches native Map keys. */\nexport type BleCommandTraceEvent = {\n command: string\n commandText: string\n timestamp: number\n}\n\nexport type MiniappSelectedEvent = {\n type: \"miniapp_selected\"\n packageName: string\n}\n\n// Union type of all native/internal Bluetooth SDK events.\nexport type BluetoothSdkInternalEvent = Parameters<BluetoothSdkModuleEvents[keyof BluetoothSdkModuleEvents]>[0]\n\nexport type BluetoothSdkModuleEvents = {\n glasses_status: (changed: Partial<GlassesStatus>) => void\n bluetooth_status: (changed: Partial<BluetoothStatus>) => void\n log: (event: LogEvent) => void\n device_discovered: (device: Device) => void\n default_device_changed: (event: {device?: Device}) => void\n // Individual event handlers\n glasses_not_ready: (event: GlassesNotReadyEvent) => void\n button_press: (event: ButtonPressEvent) => void\n touch_event: (event: TouchEvent) => void\n accel_event: (event: AccelEvent) => void\n head_up: (event: HeadUpEvent) => void\n voice_activity_detection_status: (event: VoiceActivityDetectionStatusEvent) => void\n speaking_status: (event: SpeakingStatusEvent) => void\n battery_status: (event: BatteryStatusEvent) => void\n local_transcription: (event: LocalTranscriptionEvent) => void\n wifi_status_change: (event: WifiStatusChangeEvent) => void\n wifi_scan_result: (event: WifiScanResultEvent) => void\n hotspot_status_change: (event: HotspotStatusChangeEvent) => void\n hotspot_error: (event: HotspotErrorEvent) => void\n photo_response: (event: PhotoResponseEvent) => void\n photo_status: (event: PhotoStatusEvent) => void\n video_recording_status: (event: VideoRecordingStatusEvent) => void\n gallery_status: (event: GalleryStatusEvent) => void\n compatible_glasses_search_stop: (event: CompatibleGlassesSearchStopEvent) => void\n heartbeat_sent: (event: HeartbeatSentEvent) => void\n heartbeat_received: (event: HeartbeatReceivedEvent) => void\n swipe_volume_status: (event: SwipeVolumeStatusEvent) => void\n switch_status: (event: SwitchStatusEvent) => void\n rgb_led_control_response: (event: RgbLedControlResponseEvent) => void\n settings_ack: (event: SettingsAckEvent) => void\n pair_failure: (event: PairFailureEvent) => void\n audio_pairing_needed: (event: AudioPairingNeededEvent) => void\n audio_connected: (event: AudioConnectedEvent) => void\n audio_disconnected: (event: AudioDisconnectedEvent) => void\n save_setting: (event: SaveSettingEvent) => void\n ws_text: (event: WsTextEvent) => void\n ws_bin: (event: WsBinEvent) => void\n mic_pcm: (event: MicPcmEvent) => void\n mic_lc3: (event: MicLc3Event) => void\n stream_status: (event: StreamStatusEvent) => void\n keep_alive_ack: (event: KeepAliveAckEvent) => void\n mtk_update_complete: (event: MtkUpdateCompleteEvent) => void\n ota_update_available: (event: OtaUpdateAvailableEvent) => void\n ota_start_ack: (event: OtaStartAckEvent) => void\n ota_status: (event: OtaStatusEvent) => void\n version_info: (event: VersionInfoEvent) => void\n send_command_to_ble: (event: BleCommandTraceEvent) => void\n receive_command_from_ble: (event: BleCommandTraceEvent) => void\n miniapp_selected: (event: MiniappSelectedEvent) => void\n extraction_progress: (event: ExtractionProgressEvent) => void\n}\n\nexport interface ExtractionProgressEvent {\n percentage: number\n bytesRead: number\n totalBytes: number\n}\n\nexport type PublicGlassesStatus = Omit<\n GlassesStatus,\n \"otaUpdateAvailable\" | \"otaProgress\" | \"otaInProgress\" | \"otaVersionUrl\"\n>\n\nexport type PublicBluetoothStatus = Pick<\n BluetoothStatus,\n | \"searching\"\n | \"searchingController\"\n | \"systemMicUnavailable\"\n | \"micRanking\"\n | \"currentMic\"\n | \"searchResults\"\n | \"wifiScanResults\"\n | \"lastLog\"\n | \"otherBtConnected\"\n | \"galleryModeEnabled\"\n>\n\nexport type BluetoothSdkEventMap = {\n log: LogEvent\n device_discovered: Device\n default_device_changed: {device?: Device}\n glasses_not_ready: GlassesNotReadyEvent\n button_press: ButtonPressEvent\n touch_event: TouchEvent\n accel_event: AccelEvent\n head_up: HeadUpEvent\n voice_activity_detection_status: VoiceActivityDetectionStatusEvent\n speaking_status: SpeakingStatusEvent\n battery_status: BatteryStatusEvent\n local_transcription: LocalTranscriptionEvent\n wifi_status_change: WifiStatusChangeEvent\n wifi_scan_result: WifiScanResultEvent\n hotspot_status_change: HotspotStatusChangeEvent\n hotspot_error: HotspotErrorEvent\n photo_response: PhotoResponseEvent\n photo_status: PhotoStatusEvent\n video_recording_status: VideoRecordingStatusEvent\n gallery_status: GalleryStatusEvent\n compatible_glasses_search_stop: CompatibleGlassesSearchStopEvent\n swipe_volume_status: SwipeVolumeStatusEvent\n switch_status: SwitchStatusEvent\n rgb_led_control_response: RgbLedControlResponseEvent\n settings_ack: SettingsAckEvent\n pair_failure: PairFailureEvent\n audio_pairing_needed: AudioPairingNeededEvent\n audio_connected: AudioConnectedEvent\n audio_disconnected: AudioDisconnectedEvent\n mic_pcm: MicPcmEvent\n mic_lc3: MicLc3Event\n stream_status: StreamStatusEvent\n ota_update_available: OtaUpdateAvailableEvent\n ota_start_ack: OtaStartAckEvent\n ota_status: OtaStatusEvent\n version_info: VersionInfoEvent\n extraction_progress: ExtractionProgressEvent\n}\n\nexport type BluetoothSdkEventName = keyof BluetoothSdkEventMap\n\nexport type BluetoothSdkEventListener<EventName extends BluetoothSdkEventName> = (\n event: BluetoothSdkEventMap[EventName],\n) => void\n\nexport type BluetoothSdkSubscription = {\n remove(): void\n}\n\nexport type BluetoothSdkEvent = BluetoothSdkEventMap[BluetoothSdkEventName]\n\nexport interface BluetoothSdkPublicModule {\n addListener<EventName extends BluetoothSdkEventName>(\n eventName: EventName,\n listener: BluetoothSdkEventListener<EventName>,\n ): BluetoothSdkSubscription\n\n getDefaultDevice(): Promise<Device | null>\n setDefaultDevice(device: Device | null): Promise<void>\n clearDefaultDevice(): Promise<void>\n\n startScan(model: DeviceModel): Promise<void>\n stopScan(): Promise<void>\n scan(options: ScanOptions): Promise<Device[]>\n scan(model: DeviceModel, options?: ScanModelOptions): Promise<Device[]>\n connect(device: Device, options?: ConnectOptions): Promise<void>\n connectDefault(options?: ConnectOptions): Promise<void>\n cancelConnectionAttempt(): Promise<void>\n disconnect(): Promise<void>\n forget(): Promise<void>\n\n displayText(text: string, x?: number, y?: number, size?: number): Promise<void>\n clearDisplay(): Promise<void>\n showDashboard(): Promise<void>\n setDashboardPosition(height: number, depth: number): Promise<void>\n setHeadUpAngle(angleDegrees: number): Promise<void>\n setImuEnabled(enabled: boolean): Promise<void>\n setScreenDisabled(disabled: boolean): Promise<void>\n\n requestWifiScan(): Promise<WifiSearchResult[]>\n sendWifiCredentials(ssid: string, password: string): Promise<WifiStatusChangeEvent>\n forgetWifiNetwork(ssid: string): Promise<WifiStatusChangeEvent>\n setHotspotState(enabled: boolean): Promise<HotspotStatusChangeEvent>\n\n setGalleryModeEnabled(enabled: boolean): Promise<SettingsAckSuccessEvent>\n setVoiceActivityDetectionEnabled(enabled: boolean): Promise<void>\n setButtonPhotoSettings(size: ButtonPhotoSize): Promise<SettingsAckSuccessEvent>\n setButtonVideoRecordingSettings(width: number, height: number, fps: number): Promise<SettingsAckSuccessEvent>\n setButtonCameraLed(enabled: boolean): Promise<SettingsAckSuccessEvent>\n setButtonMaxRecordingTime(minutes: number): Promise<SettingsAckSuccessEvent>\n setCameraFov(request: CameraFovRequest): Promise<CameraFovResult>\n queryGalleryStatus(): Promise<GalleryStatusEvent>\n requestPhoto(params: PhotoRequestParams): Promise<PhotoSuccessResponseEvent>\n startVideoRecording(\n requestId: string,\n save: boolean,\n sound: boolean,\n settings?: VideoRecordingSettings,\n ): Promise<VideoRecordingStartedStatusEvent>\n stopVideoRecording(requestId: string): Promise<VideoRecordingStoppedStatusEvent>\n\n startStream(params: StreamStartRequest): Promise<StreamStatusEvent>\n stopStream(): Promise<StreamStatusEvent>\n\n setMicState(enabled: boolean, useGlassesMic?: boolean, sendTranscript?: boolean, sendLc3Data?: boolean): Promise<void>\n setPreferredMic(preferredMic: MicPreference): Promise<void>\n setOwnAppAudioPlaying(playing: boolean): Promise<void>\n getGlassesMediaVolume(): Promise<GlassesMediaVolumeGetResult>\n setGlassesMediaVolume(level: number): Promise<GlassesMediaVolumeSetResult>\n\n rgbLedControl(\n requestId: string,\n packageName: string | null,\n action: RgbLedAction,\n color: RgbLedColor | null,\n onDurationMs: number,\n offDurationMs: number,\n count: number,\n ): Promise<RgbLedControlSuccessResponseEvent>\n\n requestVersionInfo(): Promise<VersionInfoResult>\n /** Ask connected Mentra Live glasses to check/report OTA availability and status. */\n checkForOtaUpdate(): Promise<OtaQueryResult>\n /** Start the OTA flow after your app has presented the available update to the user. */\n startOtaUpdate(): Promise<OtaStartAckEvent>\n /** Re-run the glasses-side OTA version check, mainly after correcting clock skew/TLS failures. */\n retryOtaVersionCheck(): Promise<OtaQueryResult>\n\n // // stt commands (MOVE TO CRUST)\n // setSttModelDetails(path: string, languageCode: string): Promise<void>\n // getSttModelPath(): Promise<string>\n // checkSttModelAvailable(): Promise<boolean>\n // validateSttModel(path: string): Promise<boolean>\n // extractTarBz2(sourcePath: string, destinationPath: string): Promise<boolean>\n\n // // tts commands (MOVE TO CRUST)\n // setTtsModelDetails(path: string, languageCode: string): Promise<void>\n // getTtsModelPath(): Promise<string>\n // getTtsModelLanguage(): Promise<string>\n // checkTtsModelAvailable(): Promise<boolean>\n // validateTtsModel(path: string): Promise<boolean>\n // generateTtsAudio(text: string, path: string, outputPath: string, speakerId: number, speed: number): Promise<boolean>\n\n // STT Commands (TODO: MOVE TO CRUST)\n setSttModelDetails(path: string, languageCode: string): Promise<void>\n getSttModelPath(): Promise<string>\n checkSttModelAvailable(): Promise<boolean>\n validateSttModel(path: string): Promise<boolean>\n extractTarBz2(sourcePath: string, destinationPath: string): Promise<boolean>\n restartTranscriber(): Promise<void>\n\n // TTS Commands (TODO: MOVE TO CRUST)\n setTtsModelDetails(path: string, languageCode: string): Promise<void>\n getTtsModelPath(): Promise<string>\n getTtsModelLanguage(): Promise<string>\n checkTtsModelAvailable(): Promise<boolean>\n validateTtsModel(path: string): Promise<boolean>\n generateTtsAudio(\n text: string,\n modelPath: string,\n outputPath: string,\n speakerId: number,\n speed: number,\n ): Promise<boolean>\n}\n\n// OTA update status types\nexport type OtaStage = \"download\" | \"install\"\nexport type OtaProgressStatus = \"STARTED\" | \"PROGRESS\" | \"FINISHED\" | \"FAILED\"\n\nexport interface OtaStatus {\n sessionId: string\n totalSteps: number\n currentStep: number\n stepType: \"apk\" | \"mtk\" | \"bes\"\n phase: \"download\" | \"install\"\n stepPercent: number\n overallPercent: number\n status: \"in_progress\" | \"step_complete\" | \"complete\" | \"failed\" | \"idle\"\n error?: string\n}\n\nexport interface OtaUpdateInfo {\n available: boolean\n versionCode: number\n versionName: string\n updates: string[] // [\"apk\", \"mtk\", \"bes\"]\n totalSize: number\n cacheReady?: boolean\n}\n\nexport interface OtaProgress {\n stage: OtaStage\n status: OtaProgressStatus\n progress: number\n bytesDownloaded: number\n totalBytes: number\n currentUpdate: string\n errorMessage?: string\n}\n\nexport interface GlassesStatus {\n // state:\n connection: GlassesConnectionStatus\n micEnabled: boolean\n voiceActivityDetectionEnabled: boolean\n bluetoothClassicConnected: boolean\n signalStrength: number\n /** Milliseconds since epoch when signalStrength was last refreshed by the phone BLE stack. */\n signalStrengthUpdatedAt: number\n // device info\n deviceModel: string\n androidVersion: string\n firmwareVersion: string\n besFirmwareVersion: string\n mtkFirmwareVersion: string\n bluetoothMacAddress: string\n leftMacAddress: string\n rightMacAddress: string\n buildNumber: string\n /** Glasses System.currentTimeMillis() from last version_info (clock skew detection). */\n systemTimeMs?: number\n otaVersionUrl: string\n appVersion: string\n bluetoothName: string\n serialNumber: string\n style: string\n color: string\n // wifi info\n wifi: WifiStatus\n // battery info\n batteryLevel: number\n charging: boolean\n caseBatteryLevel: number\n caseCharging: boolean\n caseOpen: boolean\n caseRemoved: boolean\n // hotspot info\n hotspot: HotspotStatus\n // OTA update info\n otaUpdateAvailable: OtaUpdateInfo | null\n otaProgress: OtaProgress | null\n otaInProgress: boolean\n // ring info\n controllerConnected: boolean\n controllerFullyBooted: boolean\n controllerMacAddress: string\n controllerBatteryLevel: number\n controllerSignalStrength: number\n}\n\nexport interface CoreDashboardMenuItem {\n name: string\n packageName: string\n running: boolean\n}\n\nexport interface CalendarEvent {\n title: string\n location?: string\n time: string\n endDate: number\n}\n\nexport interface CoreSettings {\n menu_apps: CoreDashboardMenuItem[]\n calendar_events: CalendarEvent[]\n}\n\nexport interface Device {\n /**\n * Stable app-facing key for this scan result, within the limits of the\n * platform identifier available to the SDK. Do not parse this value; use the\n * typed model, name, address, and rssi fields instead.\n */\n id: string\n model: DeviceModel\n name: string\n /** Platform address/identifier when available: Android Bluetooth address, iOS CoreBluetooth identifier. */\n address?: string\n /**\n * Optional scan signal strength. It may be undefined at first discovery and\n * appear in a later scan update when the platform reports RSSI metadata.\n */\n rssi?: number\n}\n\nexport interface ConnectOptions {\n saveAsDefault?: boolean\n cancelExistingConnectionAttempt?: boolean\n}\n\nexport type ScanResultsCallback = (devices: Device[]) => void\n\nexport interface ScanOptions {\n model: DeviceModel\n /** Defaults to 15000. */\n timeoutMs?: number\n /** Alias for `timeoutMs`, useful when mirroring native examples. */\n timeout?: number\n /** Called every time the discovered device list changes during the scan. */\n onResults?: ScanResultsCallback\n}\n\nexport type ScanModelOptions = Omit<ScanOptions, \"model\">\n\nexport interface WifiSearchResult {\n ssid: string\n requiresPassword: boolean\n signalStrength: number\n /** Frequency in MHz (from glasses scan). 5 GHz band is typically 5170–5825. Omitted if unknown. */\n frequency?: number\n}\n\nexport interface BluetoothStatus {\n // state:\n searching: boolean\n searchingController: boolean\n default_wearable?: DeviceModel | \"\"\n pending_wearable?: DeviceModel | \"\"\n device_name?: string\n device_address?: string\n default_controller?: DeviceModel | \"\"\n pending_controller?: DeviceModel | \"\"\n controller_device_name?: string\n controller_address?: string\n systemMicUnavailable: boolean\n micRanking: MicMode[]\n currentMic: MicMode | \"\" | null\n /**\n * Nearby glasses in stable discovery order.\n * Existing entries keep their array position as details refresh; new glasses append at the end,\n * and removals should not reorder remaining entries.\n */\n searchResults: Device[]\n wifiScanResults: WifiSearchResult[]\n lastLog: string[]\n otherBtConnected: boolean\n // desired settings the SDK sends to compatible connected glasses:\n galleryModeEnabled: boolean\n}\n\nexport type BluetoothSettingsUpdate = Partial<{\n auth_email: string\n core_token: string\n sensing_enabled: boolean\n power_saving_mode: boolean\n lc3_frame_size: number\n preferred_mic: MicPreference\n screen_disabled: boolean\n contextual_dashboard: boolean\n head_up_angle: number\n imu_enabled: boolean\n brightness: number\n auto_brightness: boolean\n dashboard_height: number\n dashboard_depth: number\n menu_apps: DashboardMenuItem[] | CoreDashboardMenuItem[] | Array<Record<string, unknown>> | null\n calendar_events: CalendarEvent[]\n metric_system: boolean\n twelve_hour_time: boolean\n gallery_mode: boolean\n voice_activity_detection_enabled: boolean\n button_photo_size: ButtonPhotoSize\n button_video_settings: {width: number; height: number; fps: number}\n button_video_width: number\n button_video_height: number\n button_video_fps: number\n button_camera_led: boolean\n button_max_recording_time: number\n camera_fov: NativeCameraFovSetting\n should_send_pcm: boolean\n should_send_lc3: boolean\n should_send_transcript: boolean\n offline_mode: boolean\n offline_captions_running: boolean\n local_stt_fallback_active: boolean\n pending_wearable: DeviceModel | \"\"\n default_wearable: DeviceModel | \"\"\n device_name: string\n device_address: string\n default_controller: DeviceModel | \"\"\n pending_controller: DeviceModel | \"\"\n controller_device_name: string\n controller_address: string\n}>\n"]}
@@ -43,6 +43,7 @@ declare class BluetoothSdkNativeModule extends NativeModule<BluetoothSdkModuleEv
43
43
  setDashboardMenu(items: DashboardMenuItem[]): Promise<void>;
44
44
  setCalendarEvents(events: CalendarEvent[]): Promise<void>;
45
45
  setHeadUpAngle(angleDegrees: number): Promise<void>;
46
+ setImuEnabled(enabled: boolean): Promise<void>;
46
47
  setScreenDisabled(disabled: boolean): Promise<void>;
47
48
  ping(): Promise<void>;
48
49
  dbg1(): Promise<void>;
@@ -1 +1 @@
1
-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empt: true,
10
10
  };
11
11
  const DEFAULT_SCAN_TIMEOUT_MS = 15_000;
12
+ function bindNativeMethod(module, name) {
13
+ const method = module[name];
14
+ if (typeof method !== "function") {
15
+ console.warn(`[BluetoothSdk] Native method "${name}" is unavailable — rebuild the app (bun android / bun ios)`);
16
+ return (async () => {
17
+ throw new Error(`BluetoothSdk.${name} is not available in this native build. Rebuild the app.`);
18
+ });
19
+ }
20
+ return method.bind(module);
21
+ }
12
22
  const CAMERA_ROI_MIN = 0;
13
23
  const CAMERA_ROI_MAX = 2;
14
24
  const CAMERA_ROI_POSITION_VALUES = {
@@ -162,13 +172,16 @@ NativeBluetoothSdkModule.setCalendarEvents = function (events) {
162
172
  NativeBluetoothSdkModule.setHeadUpAngle = function (angleDegrees) {
163
173
  return this.updateBluetoothSettings({ head_up_angle: angleDegrees });
164
174
  };
175
+ NativeBluetoothSdkModule.setImuEnabled = function (enabled) {
176
+ return this.updateBluetoothSettings({ imu_enabled: enabled });
177
+ };
165
178
  NativeBluetoothSdkModule.setScreenDisabled = function (disabled) {
166
179
  return this.updateBluetoothSettings({ screen_disabled: disabled });
167
180
  };
168
181
  NativeBluetoothSdkModule.setVoiceActivityDetectionEnabled = function (enabled) {
169
182
  return this.updateBluetoothSettings({ voice_activity_detection_enabled: enabled });
170
183
  };
171
- const nativeSetCameraFov = NativeBluetoothSdkModule.setCameraFov.bind(NativeBluetoothSdkModule);
184
+ const nativeSetCameraFov = bindNativeMethod(NativeBluetoothSdkModule, "setCameraFov");
172
185
  NativeBluetoothSdkModule.setCameraFov = function (request) {
173
186
  const setting = normalizeCameraFov(request);
174
187
  return Promise.resolve(nativeSetCameraFov(setting));
@@ -1 +1 @@
1
- {"version":3,"file":"BluetoothSdkModule.js","sourceRoot":"","sources":["../../src/_private/BluetoothSdkModule.ts"],"names":[],"mappings":"AAAA,OAAO,EAAe,mBAAmB,EAAC,MAAM,MAAM,CAAA;AAEtD,OAAO,EAOL,kBAAkB,EAClB,cAAc,EACd,cAAc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C1F,OAAO,iBAAiB,CAAC,EAAC,GAAG,MAAM,EAAE,aAAa,EAAE,UAAU,EAAuB,CAAC,CAAA;AACxF,CAAC,CAAA;AACD,wBAAwB,CAAC,iBAAiB,GAAG,wBAAwB,CAAC,kBAAkB,CAAC,IAAI,CAAC,wBAAwB,CAAC,CAAA;AACvH,wBAAwB,CAAC,cAAc,GAAG,wBAAwB,CAAC,YAAY,CAAC,IAAI,CAAC,wBAAwB,CAAC,CAAA;AAE9G,eAAe,wBAAwB,CAAA;AACvC,MAAM,CAAC,MAAM,YAAY,GAAG,wBAAoD,CAAA","sourcesContent":["import {NativeModule, requireNativeModule} from \"expo\"\n\nimport {\n BluetoothSettingsUpdate,\n BluetoothSdkPublicModule,\n BluetoothSdkModuleEvents,\n BluetoothStatus,\n ButtonPhotoSize,\n CalendarEvent,\n CAMERA_FOV_DEFAULT,\n CAMERA_FOV_MAX,\n CAMERA_FOV_MIN,\n CameraFovPreset,\n CameraFovRequest,\n CameraFovResult,\n CameraFovSetting,\n CameraRoiPosition,\n ConnectOptions,\n DashboardMenuItem,\n Device,\n DeviceModel,\n GlassesMediaVolumeGetResult,\n GlassesMediaVolumeSetResult,\n GlassesStatus,\n GalleryStatusEvent,\n HotspotStatusChangeEvent,\n MicPreference,\n ObservableStoreCategory,\n OtaQueryResult,\n OtaStartAckEvent,\n PhotoRequestParams,\n PhotoSuccessResponseEvent,\n PublicBluetoothStatus,\n RgbLedAction,\n RgbLedColor,\n RgbLedControlSuccessResponseEvent,\n ScanModelOptions,\n ScanOptions,\n SettingsAckSuccessEvent,\n StreamKeepAliveRequest,\n StreamStartRequest,\n StreamStatusEvent,\n VideoRecordingStartedStatusEvent,\n VideoRecordingSettings,\n VideoRecordingStoppedStatusEvent,\n VersionInfoResult,\n WifiSearchResult,\n WifiStatusChangeEvent,\n} from \"../BluetoothSdk.types\"\nimport {photoRequestParamsForNative} from \"./photoRequestPayload\"\n\n/**\n * Private React Native native-module facade.\n *\n * This file intentionally lives under `_private` so the package root can expose\n * a small SDK surface while MentraOS uses its monorepo-only internal alias\n * during migration. Raw status getters/listeners stay here so React hooks can\n * shape native store snapshots before app code sees them.\n */\n\ntype GlassesListener = (changed: Partial<GlassesStatus>) => void\ntype BluetoothStatusListener = (changed: Partial<PublicBluetoothStatus>) => void\ntype MaybePromise<T> = T | Promise<T>\n\ndeclare class BluetoothSdkNativeModule extends NativeModule<BluetoothSdkModuleEvents> {\n // Observable Store Functions (native)\n getGlassesStatus(): Promise<GlassesStatus>\n getBluetoothStatus(): Promise<PublicBluetoothStatus>\n getDefaultDevice(): Promise<Device | null>\n update(category: ObservableStoreCategory, values: object): Promise<void>\n\n // Display Commands\n displayEvent(params: Record<string, unknown>): Promise<void>\n displayText(text: string, x?: number, y?: number, size?: number): Promise<void>\n clearDisplay(): Promise<void>\n\n // Connection Commands\n requestStatus(): Promise<void>\n connectDefault(options?: ConnectOptions): Promise<void>\n connectDefaultWithOptions(options: Required<ConnectOptions>): Promise<void>\n setDefaultDevice(device: Device | null): Promise<void>\n clearDefaultDevice(): Promise<void>\n startScan(model: DeviceModel): Promise<void>\n stopScan(): Promise<void>\n scan(options: ScanOptions): Promise<Device[]>\n scan(model: DeviceModel, options?: ScanModelOptions): Promise<Device[]>\n connect(device: Device, options?: ConnectOptions): Promise<void>\n connectWithOptions(device: Device, options: Required<ConnectOptions>): Promise<void>\n cancelConnectionAttempt(): Promise<void>\n connectDefaultController(): Promise<void>\n disconnectController(): Promise<void>\n connectSimulated(): Promise<void>\n disconnect(): Promise<void>\n forget(): Promise<void>\n forgetController(): Promise<void>\n showDashboard(): Promise<void>\n setBrightness(level: number, autoMode?: boolean | null): Promise<void>\n setAutoBrightness(enabled: boolean): Promise<void>\n setDashboardPosition(height: number, depth: number): Promise<void>\n setDashboardMenu(items: DashboardMenuItem[]): Promise<void>\n setCalendarEvents(events: CalendarEvent[]): Promise<void>\n setHeadUpAngle(angleDegrees: number): Promise<void>\n setScreenDisabled(disabled: boolean): Promise<void>\n ping(): Promise<void>\n dbg1(): Promise<void>\n dbg2(): Promise<void>\n\n // Incident Reporting\n sendIncidentId(incidentId: string, apiBaseUrl?: string | null): Promise<void>\n\n // WiFi Commands\n requestWifiScan(): Promise<WifiSearchResult[]>\n sendWifiCredentials(ssid: string, password: string): Promise<WifiStatusChangeEvent>\n forgetWifiNetwork(ssid: string): Promise<WifiStatusChangeEvent>\n setHotspotState(enabled: boolean): Promise<HotspotStatusChangeEvent>\n /** Set glasses system clock (Mentra Live only) when phone detects clock skew. */\n setSystemTime(timestampMs: number): Promise<void>\n /** Logs current WiFi frequency (MHz) and 5 GHz band to Android logcat. */\n logCurrentWifiFrequency(): Promise<void>\n\n // Gallery Commands\n setGalleryModeEnabled(enabled: boolean): Promise<SettingsAckSuccessEvent>\n setVoiceActivityDetectionEnabled(enabled: boolean): Promise<void>\n setButtonPhotoSettings(size: ButtonPhotoSize): Promise<SettingsAckSuccessEvent>\n setButtonVideoRecordingSettings(width: number, height: number, fps: number): Promise<SettingsAckSuccessEvent>\n setButtonCameraLed(enabled: boolean): Promise<SettingsAckSuccessEvent>\n setButtonMaxRecordingTime(minutes: number): Promise<SettingsAckSuccessEvent>\n setCameraFov(request: CameraFovRequest): Promise<CameraFovResult>\n queryGalleryStatus(): Promise<GalleryStatusEvent>\n requestPhoto(params: PhotoRequestParams): Promise<PhotoSuccessResponseEvent>\n\n // OTA Commands\n sendOtaStart(): Promise<OtaStartAckEvent>\n sendOtaQueryStatus(): Promise<OtaQueryResult>\n /** Re-run glasses-side OTA version check (called after a clock fix invalidates a TLS failure). */\n retryOtaVersionCheck(): Promise<OtaQueryResult>\n checkForOtaUpdate(): Promise<OtaQueryResult>\n startOtaUpdate(): Promise<OtaStartAckEvent>\n\n // Version Info Commands\n requestVersionInfo(): Promise<VersionInfoResult>\n\n // Video Recording Commands\n startVideoRecording(\n requestId: string,\n save: boolean,\n sound: boolean,\n settings?: VideoRecordingSettings,\n ): Promise<VideoRecordingStartedStatusEvent>\n stopVideoRecording(requestId: string): Promise<VideoRecordingStoppedStatusEvent>\n\n // Stream Commands\n startStream(params: StreamStartRequest): Promise<StreamStatusEvent>\n startExternallyManagedStream(params: StreamStartRequest): Promise<StreamStatusEvent>\n stopStream(): Promise<StreamStatusEvent>\n sendExternallyManagedStreamKeepAlive(params: StreamKeepAliveRequest): Promise<void>\n\n // Microphone Commands\n setMicState(enabled: boolean, useGlassesMic?: boolean, sendTranscript?: boolean, sendLc3Data?: boolean): Promise<void>\n setPreferredMic(preferredMic: MicPreference): Promise<void>\n restartTranscriber(): Promise<void>\n\n // Audio Playback Monitoring\n // Notify native side when our app starts/stops playing audio\n // Used to suspend LC3 mic during audio playback to avoid MCU overload\n setOwnAppAudioPlaying(playing: boolean): Promise<void>\n\n /** Mentra Live only: K900 `cs_getvol` / `sr_getvol`. */\n getGlassesMediaVolume(): Promise<GlassesMediaVolumeGetResult>\n /** Mentra Live only: K900 `cs_vol` / `sr_vol`; level clamped 0–15 on native. */\n setGlassesMediaVolume(level: number): Promise<GlassesMediaVolumeSetResult>\n\n // RGB LED Control\n rgbLedControl(\n requestId: string,\n packageName: string | null,\n action: RgbLedAction,\n color: RgbLedColor | null,\n onDurationMs: number,\n offDurationMs: number,\n count: number,\n ): Promise<RgbLedControlSuccessResponseEvent>\n\n // STT Commands\n setSttModelDetails(path: string, languageCode: string): Promise<void>\n getSttModelPath(): Promise<string>\n checkSttModelAvailable(): Promise<boolean>\n validateSttModel(path: string): Promise<boolean>\n extractTarBz2(sourcePath: string, destinationPath: string): Promise<boolean>\n\n // TTS Commands\n setTtsModelDetails(path: string, languageCode: string): Promise<void>\n getTtsModelPath(): Promise<string>\n getTtsModelLanguage(): Promise<string>\n checkTtsModelAvailable(): Promise<boolean>\n validateTtsModel(path: string): Promise<boolean>\n generateTtsAudio(\n text: string,\n modelPath: string,\n outputPath: string,\n speakerId: number,\n speed: number,\n ): Promise<boolean>\n\n // Helper methods for type-safe observable store access\n updateGlasses(values: Partial<GlassesStatus>): Promise<void>\n updateBluetoothSettings(values: BluetoothSettingsUpdate): Promise<void>\n onGlassesStatus(callback: GlassesListener): () => void\n onBluetoothStatus(callback: BluetoothStatusListener): () => void\n\n // Process resident-set-size in MB. iOS-only; Android stub returns 0.\n getMemoryMB(): number\n}\n\nexport type BluetoothSdkInternalModule = BluetoothSdkNativeModule\n\n// This call loads the native module object from the JSI.\n// NativeModule<BluetoothSdkModuleEvents> already extends EventEmitter<BluetoothSdkModuleEvents>\nconst NativeBluetoothSdkModule = requireNativeModule<BluetoothSdkNativeModule>(\"BluetoothSdk\")\n\nconst DEFAULT_CONNECT_OPTIONS: Required<ConnectOptions> = {\n saveAsDefault: true,\n cancelExistingConnectionAttempt: true,\n}\n\nconst DEFAULT_SCAN_TIMEOUT_MS = 15_000\n\nconst CAMERA_ROI_MIN = 0\nconst CAMERA_ROI_MAX = 2\nconst CAMERA_ROI_POSITION_VALUES: Record<CameraRoiPosition, CameraFovSetting[\"roiPosition\"]> = {\n center: 0,\n bottom: 1,\n top: 2,\n}\n\n// Named presets are a convenience layer over the numeric {fov, roiPosition} API.\n// \"narrow\" uses 82, a device-tested FOV; \"standard\" matches CAMERA_FOV_DEFAULT.\nconst CAMERA_FOV_PRESETS: Record<CameraFovPreset, CameraFovSetting> = {\n narrow: {fov: 82, roiPosition: 0},\n standard: {fov: CAMERA_FOV_DEFAULT, roiPosition: 0},\n wide: {fov: CAMERA_FOV_MAX, roiPosition: 0},\n}\n\nfunction clampInteger(value: number, min: number, max: number): number {\n return Math.max(min, Math.min(max, Math.round(value)))\n}\n\nfunction normalizeCameraFov(request: CameraFovRequest): CameraFovSetting {\n if (\"preset\" in request) {\n return CAMERA_FOV_PRESETS[request.preset] ?? CAMERA_FOV_PRESETS.standard\n }\n\n const roiPosition = request.roiPosition ?? \"center\"\n\n return {\n fov: clampInteger(\n Number.isFinite(request.fov) ? request.fov : CAMERA_FOV_DEFAULT,\n CAMERA_FOV_MIN,\n CAMERA_FOV_MAX,\n ),\n roiPosition: clampInteger(CAMERA_ROI_POSITION_VALUES[roiPosition] ?? 0, CAMERA_ROI_MIN, CAMERA_ROI_MAX) as\n | 0\n | 1\n | 2,\n }\n}\n\nfunction searchResultsForModel(status: Partial<PublicBluetoothStatus>, model: DeviceModel): Device[] {\n return status.searchResults?.filter((device) => device.model === model) ?? []\n}\n\nfunction normalizeScanArgs(modelOrOptions: DeviceModel | ScanOptions, options?: ScanModelOptions): ScanOptions {\n if (typeof modelOrOptions === \"string\") {\n return {model: modelOrOptions, ...options}\n }\n return modelOrOptions\n}\n\nfunction normalizeTimeoutMs(timeoutMs: number | undefined, defaultTimeoutMs: number): number {\n return typeof timeoutMs === \"number\" && Number.isFinite(timeoutMs) && timeoutMs > 0 ? timeoutMs : defaultTimeoutMs\n}\n\nfunction dashboardMenuItemToNative(item: DashboardMenuItem): Record<string, unknown> {\n return {\n ...(item.values ?? {}),\n title: item.title,\n packageName: item.packageName,\n }\n}\n\nfunction adaptConnectionStatusToNative(connection: GlassesStatus[\"connection\"]): Record<string, unknown> {\n switch (connection.state) {\n case \"connected\":\n return {connectionState: \"CONNECTED\", connected: true, fullyBooted: connection.fullyBooted}\n case \"scanning\":\n return {connectionState: \"SCANNING\", connected: false, fullyBooted: false}\n case \"connecting\":\n return {connectionState: \"CONNECTING\", connected: false, fullyBooted: false}\n case \"bonding\":\n return {connectionState: \"BONDING\", connected: false, fullyBooted: false}\n case \"disconnected\":\n return {connectionState: \"DISCONNECTED\", connected: false, fullyBooted: false}\n }\n}\n\nfunction adaptGlassesUpdateToNative(values: Partial<GlassesStatus>): Record<string, unknown> {\n const {wifi, hotspot, connection, ...rest} = values\n let update: Record<string, unknown> = {...rest}\n if (connection) {\n update = {\n ...update,\n ...adaptConnectionStatusToNative(connection),\n }\n }\n if (wifi?.state === \"connected\") {\n update = {\n ...update,\n wifiConnected: true,\n wifiSsid: wifi.ssid,\n wifiLocalIp: wifi.localIp ?? \"\",\n }\n } else if (wifi?.state === \"disconnected\") {\n update = {\n ...update,\n wifiConnected: false,\n wifiSsid: \"\",\n wifiLocalIp: \"\",\n }\n }\n if (hotspot?.state === \"enabled\") {\n update = {\n ...update,\n hotspotEnabled: true,\n hotspotSsid: hotspot.ssid,\n hotspotPassword: hotspot.password,\n hotspotGatewayIp: hotspot.localIp,\n }\n } else if (hotspot?.state === \"disabled\") {\n update = {\n ...update,\n hotspotEnabled: false,\n hotspotSsid: \"\",\n hotspotPassword: \"\",\n hotspotGatewayIp: \"\",\n }\n }\n return update\n}\n\n// Add helper methods to the module\nconst nativeGetGlassesStatus = NativeBluetoothSdkModule.getGlassesStatus.bind(\n NativeBluetoothSdkModule,\n) as () => MaybePromise<GlassesStatus>\nNativeBluetoothSdkModule.getGlassesStatus = function () {\n return Promise.resolve(nativeGetGlassesStatus())\n}\n\nconst nativeGetBluetoothStatus = NativeBluetoothSdkModule.getBluetoothStatus.bind(\n NativeBluetoothSdkModule,\n) as () => MaybePromise<BluetoothStatus>\nNativeBluetoothSdkModule.getBluetoothStatus = function () {\n return Promise.resolve(nativeGetBluetoothStatus())\n}\n\nconst nativeGetDefaultDevice = NativeBluetoothSdkModule.getDefaultDevice.bind(\n NativeBluetoothSdkModule,\n) as () => MaybePromise<Device | null>\nNativeBluetoothSdkModule.getDefaultDevice = function () {\n return Promise.resolve(nativeGetDefaultDevice())\n}\n\nconst nativeSetMicState = NativeBluetoothSdkModule.setMicState.bind(NativeBluetoothSdkModule) as (\n enabled: boolean,\n useGlassesMic: boolean,\n sendTranscript: boolean,\n sendLc3Data: boolean,\n) => MaybePromise<void>\n\nconst nativeDisplayText = NativeBluetoothSdkModule.displayText.bind(NativeBluetoothSdkModule) as (\n text: string,\n x: number,\n y: number,\n size: number,\n) => MaybePromise<void>\n\nNativeBluetoothSdkModule.updateGlasses = function (values: Partial<GlassesStatus>) {\n return this.update(\"glasses\", adaptGlassesUpdateToNative(values))\n}\n\nNativeBluetoothSdkModule.updateBluetoothSettings = function (values: BluetoothSettingsUpdate) {\n return this.update(\"bluetooth\", values)\n}\n\nNativeBluetoothSdkModule.displayText = function (text: string, x?: number, y?: number, size?: number) {\n return Promise.resolve(nativeDisplayText(text, x ?? 0, y ?? 0, size ?? 24))\n}\n\nNativeBluetoothSdkModule.setBrightness = function (level: number, autoMode?: boolean | null) {\n return this.updateBluetoothSettings({\n ...(autoMode == null ? {} : {auto_brightness: autoMode}),\n brightness: level,\n })\n}\n\nNativeBluetoothSdkModule.setAutoBrightness = function (enabled: boolean) {\n return this.updateBluetoothSettings({auto_brightness: enabled})\n}\n\nNativeBluetoothSdkModule.setDashboardPosition = function (height: number, depth: number) {\n return this.updateBluetoothSettings({\n dashboard_height: height,\n dashboard_depth: depth,\n })\n}\n\nNativeBluetoothSdkModule.setDashboardMenu = function (items: DashboardMenuItem[]) {\n return this.updateBluetoothSettings({menu_apps: items.map(dashboardMenuItemToNative)})\n}\n\nNativeBluetoothSdkModule.setCalendarEvents = function (events: CalendarEvent[]) {\n return this.updateBluetoothSettings({calendar_events: events})\n}\n\nNativeBluetoothSdkModule.setHeadUpAngle = function (angleDegrees: number) {\n return this.updateBluetoothSettings({head_up_angle: angleDegrees})\n}\n\nNativeBluetoothSdkModule.setScreenDisabled = function (disabled: boolean) {\n return this.updateBluetoothSettings({screen_disabled: disabled})\n}\n\nNativeBluetoothSdkModule.setVoiceActivityDetectionEnabled = function (enabled: boolean) {\n return this.updateBluetoothSettings({voice_activity_detection_enabled: enabled})\n}\n\nconst nativeSetCameraFov = NativeBluetoothSdkModule.setCameraFov.bind(NativeBluetoothSdkModule) as unknown as (\n fov: CameraFovSetting,\n) => MaybePromise<CameraFovResult>\nNativeBluetoothSdkModule.setCameraFov = function (request: CameraFovRequest) {\n const setting = normalizeCameraFov(request)\n return Promise.resolve(nativeSetCameraFov(setting))\n}\n\nNativeBluetoothSdkModule.setMicState = function (\n enabled: boolean,\n useGlassesMic?: boolean,\n sendTranscript?: boolean,\n sendLc3Data?: boolean,\n) {\n return Promise.resolve(\n nativeSetMicState(enabled, useGlassesMic ?? true, sendTranscript ?? false, sendLc3Data ?? false),\n )\n}\n\nNativeBluetoothSdkModule.setPreferredMic = function (preferredMic: MicPreference) {\n return this.updateBluetoothSettings({preferred_mic: preferredMic})\n}\n\nNativeBluetoothSdkModule.onGlassesStatus = function (callback: GlassesListener) {\n const subscription = this.addListener(\"glasses_status\", callback)\n return () => subscription.remove()\n}\n\nNativeBluetoothSdkModule.onBluetoothStatus = function (callback: BluetoothStatusListener) {\n const subscription = this.addListener(\"bluetooth_status\", callback)\n return () => subscription.remove()\n}\n\nconst nativeConnectDefault = NativeBluetoothSdkModule.connectDefault.bind(NativeBluetoothSdkModule)\nNativeBluetoothSdkModule.connectDefault = function (options?: ConnectOptions) {\n if (!options) {\n return nativeConnectDefault()\n }\n return this.connectDefaultWithOptions({...DEFAULT_CONNECT_OPTIONS, ...options})\n}\n\nNativeBluetoothSdkModule.connect = function (device: Device, options?: ConnectOptions) {\n return this.connectWithOptions(device, {...DEFAULT_CONNECT_OPTIONS, ...options})\n}\n\nNativeBluetoothSdkModule.scan = async function (modelOrOptions: DeviceModel | ScanOptions, options?: ScanModelOptions) {\n const scanOptions = normalizeScanArgs(modelOrOptions, options)\n const timeoutMs = normalizeTimeoutMs(scanOptions.timeoutMs ?? scanOptions.timeout, DEFAULT_SCAN_TIMEOUT_MS)\n let latestResults: Device[] = []\n\n return new Promise<Device[]>((resolve, reject) => {\n let timeout: ReturnType<typeof setTimeout> | null = null\n let removeBluetoothListener = () => {}\n let settled = false\n let scanStarted = false\n\n const emitResults = (devices: Device[]) => {\n latestResults = devices\n scanOptions.onResults?.([...devices])\n }\n\n const cleanup = () => {\n if (timeout) {\n clearTimeout(timeout)\n }\n removeBluetoothListener()\n if (scanStarted) {\n void Promise.resolve(this.stopScan()).catch(() => undefined)\n }\n }\n\n const settle = (error?: Error) => {\n if (settled) {\n return\n }\n settled = true\n cleanup()\n if (error) {\n reject(error)\n } else {\n resolve([...latestResults])\n }\n }\n\n const handleBluetoothStatus = (status: Partial<BluetoothStatus>) => {\n if (!Array.isArray(status.searchResults)) {\n return\n }\n emitResults(searchResultsForModel(status, scanOptions.model))\n }\n\n removeBluetoothListener = this.onBluetoothStatus(handleBluetoothStatus)\n emitResults([])\n\n timeout = setTimeout(() => settle(), timeoutMs)\n\n Promise.resolve(this.startScan(scanOptions.model))\n .then(() => {\n scanStarted = true\n return this.getBluetoothStatus()\n })\n .then(handleBluetoothStatus)\n .catch((error) => settle(error instanceof Error ? error : new Error(String(error))))\n })\n}\n\nconst nativeRequestPhoto = NativeBluetoothSdkModule.requestPhoto.bind(NativeBluetoothSdkModule)\nNativeBluetoothSdkModule.requestPhoto = function (params: PhotoRequestParams) {\n return nativeRequestPhoto(photoRequestParamsForNative(params) as unknown as PhotoRequestParams)\n}\n\nconst nativeStartStream = NativeBluetoothSdkModule.startStream.bind(NativeBluetoothSdkModule)\nNativeBluetoothSdkModule.startExternallyManagedStream = function (params: StreamStartRequest) {\n return nativeStartStream({...params, keepAliveMode: \"external\"} as StreamStartRequest)\n}\nNativeBluetoothSdkModule.checkForOtaUpdate = NativeBluetoothSdkModule.sendOtaQueryStatus.bind(NativeBluetoothSdkModule)\nNativeBluetoothSdkModule.startOtaUpdate = NativeBluetoothSdkModule.sendOtaStart.bind(NativeBluetoothSdkModule)\n\nexport default NativeBluetoothSdkModule\nexport const BluetoothSdk = NativeBluetoothSdkModule as BluetoothSdkPublicModule\n"]}
1
+ {"version":3,"file":"BluetoothSdkModule.js","sourceRoot":"","sources":["../../src/_private/BluetoothSdkModule.ts"],"names":[],"mappings":"AAAA,OAAO,EAAe,mBAAmB,EAAC,MAAM,MAAM,CAAA;AAEtD,OAAO,EAOL,kBAAkB,EAClB,cAAc,EACd,cAAc,GAqCf,MAAM,uBAAuB,CAAA;AAC9B,OAAO,EAAC,2BAA2B,EAAC,MAAM,uBAAuB,CAAA;AAwKjE,yDAAyD;AACzD,gGAAgG;AAChG,MAAM,wBAAwB,GAAG,mBAAmB,CAA2B,cAAc,CAAC,CAAA;AA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A;AACJ,CAAC,CAAA;AAED,MAAM,kBAAkB,GAAG,wBAAwB,CAAC,YAAY,CAAC,IAAI,CAAC,wBAAwB,CAAC,CAAA;AAC/F,wBAAwB,CAAC,YAAY,GAAG,UAAU,MAA0B;IAC1E,OAAO,kBAAkB,CAAC,2BAA2B,CAAC,MAAM,CAAkC,CAAC,CAAA;AACjG,CAAC,CAAA;AAED,MAAM,iBAAiB,GAAG,wBAAwB,CAAC,WAAW,CAAC,IAAI,CAAC,wBAAwB,CAAC,CAAA;AAC7F,wBAAwB,CAAC,4BAA4B,GAAG,UAAU,MAA0B;IAC1F,OAAO,iBAAiB,CAAC,EAAC,GAAG,MAAM,EAAE,aAAa,EAAE,UAAU,EAAuB,CAAC,CAAA;AACxF,CAAC,CAAA;AACD,wBAAwB,CAAC,iBAAiB,GAAG,wBAAwB,CAAC,kBAAkB,CAAC,IAAI,CAAC,wBAAwB,CAAC,CAAA;AACvH,wBAAwB,CAAC,cAAc,GAAG,wBAAwB,CAAC,YAAY,CAAC,IAAI,CAAC,wBAAwB,CAAC,CAAA;AAE9G,eAAe,wBAAwB,CAAA;AACvC,MAAM,CAAC,MAAM,YAAY,GAAG,wBAAoD,CAAA","sourcesContent":["import {NativeModule, requireNativeModule} from \"expo\"\n\nimport {\n BluetoothSettingsUpdate,\n BluetoothSdkPublicModule,\n BluetoothSdkModuleEvents,\n BluetoothStatus,\n ButtonPhotoSize,\n CalendarEvent,\n CAMERA_FOV_DEFAULT,\n CAMERA_FOV_MAX,\n CAMERA_FOV_MIN,\n CameraFovPreset,\n CameraFovRequest,\n CameraFovResult,\n CameraFovSetting,\n CameraRoiPosition,\n ConnectOptions,\n DashboardMenuItem,\n Device,\n DeviceModel,\n GlassesMediaVolumeGetResult,\n GlassesMediaVolumeSetResult,\n GlassesStatus,\n GalleryStatusEvent,\n HotspotStatusChangeEvent,\n MicPreference,\n ObservableStoreCategory,\n OtaQueryResult,\n OtaStartAckEvent,\n PhotoRequestParams,\n PhotoSuccessResponseEvent,\n PublicBluetoothStatus,\n RgbLedAction,\n RgbLedColor,\n RgbLedControlSuccessResponseEvent,\n ScanModelOptions,\n ScanOptions,\n SettingsAckSuccessEvent,\n StreamKeepAliveRequest,\n StreamStartRequest,\n StreamStatusEvent,\n VideoRecordingStartedStatusEvent,\n VideoRecordingSettings,\n VideoRecordingStoppedStatusEvent,\n VersionInfoResult,\n WifiSearchResult,\n WifiStatusChangeEvent,\n} from \"../BluetoothSdk.types\"\nimport {photoRequestParamsForNative} from \"./photoRequestPayload\"\n\n/**\n * Private React Native native-module facade.\n *\n * This file intentionally lives under `_private` so the package root can expose\n * a small SDK surface while MentraOS uses its monorepo-only internal alias\n * during migration. Raw status getters/listeners stay here so React hooks can\n * shape native store snapshots before app code sees them.\n */\n\ntype GlassesListener = (changed: Partial<GlassesStatus>) => void\ntype BluetoothStatusListener = (changed: Partial<PublicBluetoothStatus>) => void\ntype MaybePromise<T> = T | Promise<T>\n\ndeclare class BluetoothSdkNativeModule extends NativeModule<BluetoothSdkModuleEvents> {\n // Observable Store Functions (native)\n getGlassesStatus(): Promise<GlassesStatus>\n getBluetoothStatus(): Promise<PublicBluetoothStatus>\n getDefaultDevice(): Promise<Device | null>\n update(category: ObservableStoreCategory, values: object): Promise<void>\n\n // Display Commands\n displayEvent(params: Record<string, unknown>): Promise<void>\n displayText(text: string, x?: number, y?: number, size?: number): Promise<void>\n clearDisplay(): Promise<void>\n\n // Connection Commands\n requestStatus(): Promise<void>\n connectDefault(options?: ConnectOptions): Promise<void>\n connectDefaultWithOptions(options: Required<ConnectOptions>): Promise<void>\n setDefaultDevice(device: Device | null): Promise<void>\n clearDefaultDevice(): Promise<void>\n startScan(model: DeviceModel): Promise<void>\n stopScan(): Promise<void>\n scan(options: ScanOptions): Promise<Device[]>\n scan(model: DeviceModel, options?: ScanModelOptions): Promise<Device[]>\n connect(device: Device, options?: ConnectOptions): Promise<void>\n connectWithOptions(device: Device, options: Required<ConnectOptions>): Promise<void>\n cancelConnectionAttempt(): Promise<void>\n connectDefaultController(): Promise<void>\n disconnectController(): Promise<void>\n connectSimulated(): Promise<void>\n disconnect(): Promise<void>\n forget(): Promise<void>\n forgetController(): Promise<void>\n showDashboard(): Promise<void>\n setBrightness(level: number, autoMode?: boolean | null): Promise<void>\n setAutoBrightness(enabled: boolean): Promise<void>\n setDashboardPosition(height: number, depth: number): Promise<void>\n setDashboardMenu(items: DashboardMenuItem[]): Promise<void>\n setCalendarEvents(events: CalendarEvent[]): Promise<void>\n setHeadUpAngle(angleDegrees: number): Promise<void>\n setImuEnabled(enabled: boolean): Promise<void>\n setScreenDisabled(disabled: boolean): Promise<void>\n ping(): Promise<void>\n dbg1(): Promise<void>\n dbg2(): Promise<void>\n\n // Incident Reporting\n sendIncidentId(incidentId: string, apiBaseUrl?: string | null): Promise<void>\n\n // WiFi Commands\n requestWifiScan(): Promise<WifiSearchResult[]>\n sendWifiCredentials(ssid: string, password: string): Promise<WifiStatusChangeEvent>\n forgetWifiNetwork(ssid: string): Promise<WifiStatusChangeEvent>\n setHotspotState(enabled: boolean): Promise<HotspotStatusChangeEvent>\n /** Set glasses system clock (Mentra Live only) when phone detects clock skew. */\n setSystemTime(timestampMs: number): Promise<void>\n /** Logs current WiFi frequency (MHz) and 5 GHz band to Android logcat. */\n logCurrentWifiFrequency(): Promise<void>\n\n // Gallery Commands\n setGalleryModeEnabled(enabled: boolean): Promise<SettingsAckSuccessEvent>\n setVoiceActivityDetectionEnabled(enabled: boolean): Promise<void>\n setButtonPhotoSettings(size: ButtonPhotoSize): Promise<SettingsAckSuccessEvent>\n setButtonVideoRecordingSettings(width: number, height: number, fps: number): Promise<SettingsAckSuccessEvent>\n setButtonCameraLed(enabled: boolean): Promise<SettingsAckSuccessEvent>\n setButtonMaxRecordingTime(minutes: number): Promise<SettingsAckSuccessEvent>\n setCameraFov(request: CameraFovRequest): Promise<CameraFovResult>\n queryGalleryStatus(): Promise<GalleryStatusEvent>\n requestPhoto(params: PhotoRequestParams): Promise<PhotoSuccessResponseEvent>\n\n // OTA Commands\n sendOtaStart(): Promise<OtaStartAckEvent>\n sendOtaQueryStatus(): Promise<OtaQueryResult>\n /** Re-run glasses-side OTA version check (called after a clock fix invalidates a TLS failure). */\n retryOtaVersionCheck(): Promise<OtaQueryResult>\n checkForOtaUpdate(): Promise<OtaQueryResult>\n startOtaUpdate(): Promise<OtaStartAckEvent>\n\n // Version Info Commands\n requestVersionInfo(): Promise<VersionInfoResult>\n\n // Video Recording Commands\n startVideoRecording(\n requestId: string,\n save: boolean,\n sound: boolean,\n settings?: VideoRecordingSettings,\n ): Promise<VideoRecordingStartedStatusEvent>\n stopVideoRecording(requestId: string): Promise<VideoRecordingStoppedStatusEvent>\n\n // Stream Commands\n startStream(params: StreamStartRequest): Promise<StreamStatusEvent>\n startExternallyManagedStream(params: StreamStartRequest): Promise<StreamStatusEvent>\n stopStream(): Promise<StreamStatusEvent>\n sendExternallyManagedStreamKeepAlive(params: StreamKeepAliveRequest): Promise<void>\n\n // Microphone Commands\n setMicState(enabled: boolean, useGlassesMic?: boolean, sendTranscript?: boolean, sendLc3Data?: boolean): Promise<void>\n setPreferredMic(preferredMic: MicPreference): Promise<void>\n restartTranscriber(): Promise<void>\n\n // Audio Playback Monitoring\n // Notify native side when our app starts/stops playing audio\n // Used to suspend LC3 mic during audio playback to avoid MCU overload\n setOwnAppAudioPlaying(playing: boolean): Promise<void>\n\n /** Mentra Live only: K900 `cs_getvol` / `sr_getvol`. */\n getGlassesMediaVolume(): Promise<GlassesMediaVolumeGetResult>\n /** Mentra Live only: K900 `cs_vol` / `sr_vol`; level clamped 0–15 on native. */\n setGlassesMediaVolume(level: number): Promise<GlassesMediaVolumeSetResult>\n\n // RGB LED Control\n rgbLedControl(\n requestId: string,\n packageName: string | null,\n action: RgbLedAction,\n color: RgbLedColor | null,\n onDurationMs: number,\n offDurationMs: number,\n count: number,\n ): Promise<RgbLedControlSuccessResponseEvent>\n\n // STT Commands\n setSttModelDetails(path: string, languageCode: string): Promise<void>\n getSttModelPath(): Promise<string>\n checkSttModelAvailable(): Promise<boolean>\n validateSttModel(path: string): Promise<boolean>\n extractTarBz2(sourcePath: string, destinationPath: string): Promise<boolean>\n\n // TTS Commands\n setTtsModelDetails(path: string, languageCode: string): Promise<void>\n getTtsModelPath(): Promise<string>\n getTtsModelLanguage(): Promise<string>\n checkTtsModelAvailable(): Promise<boolean>\n validateTtsModel(path: string): Promise<boolean>\n generateTtsAudio(\n text: string,\n modelPath: string,\n outputPath: string,\n speakerId: number,\n speed: number,\n ): Promise<boolean>\n\n // Helper methods for type-safe observable store access\n updateGlasses(values: Partial<GlassesStatus>): Promise<void>\n updateBluetoothSettings(values: BluetoothSettingsUpdate): Promise<void>\n onGlassesStatus(callback: GlassesListener): () => void\n onBluetoothStatus(callback: BluetoothStatusListener): () => void\n\n // Process resident-set-size in MB. iOS-only; Android stub returns 0.\n getMemoryMB(): number\n}\n\nexport type BluetoothSdkInternalModule = BluetoothSdkNativeModule\n\n// This call loads the native module object from the JSI.\n// NativeModule<BluetoothSdkModuleEvents> already extends EventEmitter<BluetoothSdkModuleEvents>\nconst NativeBluetoothSdkModule = requireNativeModule<BluetoothSdkNativeModule>(\"BluetoothSdk\")\n\nconst DEFAULT_CONNECT_OPTIONS: Required<ConnectOptions> = {\n saveAsDefault: true,\n cancelExistingConnectionAttempt: true,\n}\n\nconst DEFAULT_SCAN_TIMEOUT_MS = 15_000\n\nfunction bindNativeMethod<T extends (...args: never[]) => unknown>(\n module: Record<string, unknown>,\n name: string,\n): T {\n const method = module[name]\n if (typeof method !== \"function\") {\n console.warn(`[BluetoothSdk] Native method \"${name}\" is unavailable — rebuild the app (bun android / bun ios)`)\n return (async () => {\n throw new Error(`BluetoothSdk.${name} is not available in this native build. Rebuild the app.`)\n }) as T\n }\n return method.bind(module) as T\n}\n\nconst CAMERA_ROI_MIN = 0\nconst CAMERA_ROI_MAX = 2\nconst CAMERA_ROI_POSITION_VALUES: Record<CameraRoiPosition, CameraFovSetting[\"roiPosition\"]> = {\n center: 0,\n bottom: 1,\n top: 2,\n}\n\n// Named presets are a convenience layer over the numeric {fov, roiPosition} API.\n// \"narrow\" uses 82, a device-tested FOV; \"standard\" matches CAMERA_FOV_DEFAULT.\nconst CAMERA_FOV_PRESETS: Record<CameraFovPreset, CameraFovSetting> = {\n narrow: {fov: 82, roiPosition: 0},\n standard: {fov: CAMERA_FOV_DEFAULT, roiPosition: 0},\n wide: {fov: CAMERA_FOV_MAX, roiPosition: 0},\n}\n\nfunction clampInteger(value: number, min: number, max: number): number {\n return Math.max(min, Math.min(max, Math.round(value)))\n}\n\nfunction normalizeCameraFov(request: CameraFovRequest): CameraFovSetting {\n if (\"preset\" in request) {\n return CAMERA_FOV_PRESETS[request.preset] ?? CAMERA_FOV_PRESETS.standard\n }\n\n const roiPosition = request.roiPosition ?? \"center\"\n\n return {\n fov: clampInteger(\n Number.isFinite(request.fov) ? request.fov : CAMERA_FOV_DEFAULT,\n CAMERA_FOV_MIN,\n CAMERA_FOV_MAX,\n ),\n roiPosition: clampInteger(CAMERA_ROI_POSITION_VALUES[roiPosition] ?? 0, CAMERA_ROI_MIN, CAMERA_ROI_MAX) as\n | 0\n | 1\n | 2,\n }\n}\n\nfunction searchResultsForModel(status: Partial<PublicBluetoothStatus>, model: DeviceModel): Device[] {\n return status.searchResults?.filter((device) => device.model === model) ?? []\n}\n\nfunction normalizeScanArgs(modelOrOptions: DeviceModel | ScanOptions, options?: ScanModelOptions): ScanOptions {\n if (typeof modelOrOptions === \"string\") {\n return {model: modelOrOptions, ...options}\n }\n return modelOrOptions\n}\n\nfunction normalizeTimeoutMs(timeoutMs: number | undefined, defaultTimeoutMs: number): number {\n return typeof timeoutMs === \"number\" && Number.isFinite(timeoutMs) && timeoutMs > 0 ? timeoutMs : defaultTimeoutMs\n}\n\nfunction dashboardMenuItemToNative(item: DashboardMenuItem): Record<string, unknown> {\n return {\n ...(item.values ?? {}),\n title: item.title,\n packageName: item.packageName,\n }\n}\n\nfunction adaptConnectionStatusToNative(connection: GlassesStatus[\"connection\"]): Record<string, unknown> {\n switch (connection.state) {\n case \"connected\":\n return {connectionState: \"CONNECTED\", connected: true, fullyBooted: connection.fullyBooted}\n case \"scanning\":\n return {connectionState: \"SCANNING\", connected: false, fullyBooted: false}\n case \"connecting\":\n return {connectionState: \"CONNECTING\", connected: false, fullyBooted: false}\n case \"bonding\":\n return {connectionState: \"BONDING\", connected: false, fullyBooted: false}\n case \"disconnected\":\n return {connectionState: \"DISCONNECTED\", connected: false, fullyBooted: false}\n }\n}\n\nfunction adaptGlassesUpdateToNative(values: Partial<GlassesStatus>): Record<string, unknown> {\n const {wifi, hotspot, connection, ...rest} = values\n let update: Record<string, unknown> = {...rest}\n if (connection) {\n update = {\n ...update,\n ...adaptConnectionStatusToNative(connection),\n }\n }\n if (wifi?.state === \"connected\") {\n update = {\n ...update,\n wifiConnected: true,\n wifiSsid: wifi.ssid,\n wifiLocalIp: wifi.localIp ?? \"\",\n }\n } else if (wifi?.state === \"disconnected\") {\n update = {\n ...update,\n wifiConnected: false,\n wifiSsid: \"\",\n wifiLocalIp: \"\",\n }\n }\n if (hotspot?.state === \"enabled\") {\n update = {\n ...update,\n hotspotEnabled: true,\n hotspotSsid: hotspot.ssid,\n hotspotPassword: hotspot.password,\n hotspotGatewayIp: hotspot.localIp,\n }\n } else if (hotspot?.state === \"disabled\") {\n update = {\n ...update,\n hotspotEnabled: false,\n hotspotSsid: \"\",\n hotspotPassword: \"\",\n hotspotGatewayIp: \"\",\n }\n }\n return update\n}\n\n// Add helper methods to the module\nconst nativeGetGlassesStatus = NativeBluetoothSdkModule.getGlassesStatus.bind(\n NativeBluetoothSdkModule,\n) as () => MaybePromise<GlassesStatus>\nNativeBluetoothSdkModule.getGlassesStatus = function () {\n return Promise.resolve(nativeGetGlassesStatus())\n}\n\nconst nativeGetBluetoothStatus = NativeBluetoothSdkModule.getBluetoothStatus.bind(\n NativeBluetoothSdkModule,\n) as () => MaybePromise<BluetoothStatus>\nNativeBluetoothSdkModule.getBluetoothStatus = function () {\n return Promise.resolve(nativeGetBluetoothStatus())\n}\n\nconst nativeGetDefaultDevice = NativeBluetoothSdkModule.getDefaultDevice.bind(\n NativeBluetoothSdkModule,\n) as () => MaybePromise<Device | null>\nNativeBluetoothSdkModule.getDefaultDevice = function () {\n return Promise.resolve(nativeGetDefaultDevice())\n}\n\nconst nativeSetMicState = NativeBluetoothSdkModule.setMicState.bind(NativeBluetoothSdkModule) as (\n enabled: boolean,\n useGlassesMic: boolean,\n sendTranscript: boolean,\n sendLc3Data: boolean,\n) => MaybePromise<void>\n\nconst nativeDisplayText = NativeBluetoothSdkModule.displayText.bind(NativeBluetoothSdkModule) as (\n text: string,\n x: number,\n y: number,\n size: number,\n) => MaybePromise<void>\n\nNativeBluetoothSdkModule.updateGlasses = function (values: Partial<GlassesStatus>) {\n return this.update(\"glasses\", adaptGlassesUpdateToNative(values))\n}\n\nNativeBluetoothSdkModule.updateBluetoothSettings = function (values: BluetoothSettingsUpdate) {\n return this.update(\"bluetooth\", values)\n}\n\nNativeBluetoothSdkModule.displayText = function (text: string, x?: number, y?: number, size?: number) {\n return Promise.resolve(nativeDisplayText(text, x ?? 0, y ?? 0, size ?? 24))\n}\n\nNativeBluetoothSdkModule.setBrightness = function (level: number, autoMode?: boolean | null) {\n return this.updateBluetoothSettings({\n ...(autoMode == null ? {} : {auto_brightness: autoMode}),\n brightness: level,\n })\n}\n\nNativeBluetoothSdkModule.setAutoBrightness = function (enabled: boolean) {\n return this.updateBluetoothSettings({auto_brightness: enabled})\n}\n\nNativeBluetoothSdkModule.setDashboardPosition = function (height: number, depth: number) {\n return this.updateBluetoothSettings({\n dashboard_height: height,\n dashboard_depth: depth,\n })\n}\n\nNativeBluetoothSdkModule.setDashboardMenu = function (items: DashboardMenuItem[]) {\n return this.updateBluetoothSettings({menu_apps: items.map(dashboardMenuItemToNative)})\n}\n\nNativeBluetoothSdkModule.setCalendarEvents = function (events: CalendarEvent[]) {\n return this.updateBluetoothSettings({calendar_events: events})\n}\n\nNativeBluetoothSdkModule.setHeadUpAngle = function (angleDegrees: number) {\n return this.updateBluetoothSettings({head_up_angle: angleDegrees})\n}\n\nNativeBluetoothSdkModule.setImuEnabled = function (enabled: boolean) {\n return this.updateBluetoothSettings({imu_enabled: enabled})\n}\n\nNativeBluetoothSdkModule.setScreenDisabled = function (disabled: boolean) {\n return this.updateBluetoothSettings({screen_disabled: disabled})\n}\n\nNativeBluetoothSdkModule.setVoiceActivityDetectionEnabled = function (enabled: boolean) {\n return this.updateBluetoothSettings({voice_activity_detection_enabled: enabled})\n}\n\nconst nativeSetCameraFov = bindNativeMethod<\n (fov: CameraFovSetting) => MaybePromise<CameraFovResult>\n>(NativeBluetoothSdkModule as unknown as Record<string, unknown>, \"setCameraFov\")\nNativeBluetoothSdkModule.setCameraFov = function (request: CameraFovRequest) {\n const setting = normalizeCameraFov(request)\n return Promise.resolve(nativeSetCameraFov(setting))\n}\n\nNativeBluetoothSdkModule.setMicState = function (\n enabled: boolean,\n useGlassesMic?: boolean,\n sendTranscript?: boolean,\n sendLc3Data?: boolean,\n) {\n return Promise.resolve(\n nativeSetMicState(enabled, useGlassesMic ?? true, sendTranscript ?? false, sendLc3Data ?? false),\n )\n}\n\nNativeBluetoothSdkModule.setPreferredMic = function (preferredMic: MicPreference) {\n return this.updateBluetoothSettings({preferred_mic: preferredMic})\n}\n\nNativeBluetoothSdkModule.onGlassesStatus = function (callback: GlassesListener) {\n const subscription = this.addListener(\"glasses_status\", callback)\n return () => subscription.remove()\n}\n\nNativeBluetoothSdkModule.onBluetoothStatus = function (callback: BluetoothStatusListener) {\n const subscription = this.addListener(\"bluetooth_status\", callback)\n return () => subscription.remove()\n}\n\nconst nativeConnectDefault = NativeBluetoothSdkModule.connectDefault.bind(NativeBluetoothSdkModule)\nNativeBluetoothSdkModule.connectDefault = function (options?: ConnectOptions) {\n if (!options) {\n return nativeConnectDefault()\n }\n return this.connectDefaultWithOptions({...DEFAULT_CONNECT_OPTIONS, ...options})\n}\n\nNativeBluetoothSdkModule.connect = function (device: Device, options?: ConnectOptions) {\n return this.connectWithOptions(device, {...DEFAULT_CONNECT_OPTIONS, ...options})\n}\n\nNativeBluetoothSdkModule.scan = async function (modelOrOptions: DeviceModel | ScanOptions, options?: ScanModelOptions) {\n const scanOptions = normalizeScanArgs(modelOrOptions, options)\n const timeoutMs = normalizeTimeoutMs(scanOptions.timeoutMs ?? scanOptions.timeout, DEFAULT_SCAN_TIMEOUT_MS)\n let latestResults: Device[] = []\n\n return new Promise<Device[]>((resolve, reject) => {\n let timeout: ReturnType<typeof setTimeout> | null = null\n let removeBluetoothListener = () => {}\n let settled = false\n let scanStarted = false\n\n const emitResults = (devices: Device[]) => {\n latestResults = devices\n scanOptions.onResults?.([...devices])\n }\n\n const cleanup = () => {\n if (timeout) {\n clearTimeout(timeout)\n }\n removeBluetoothListener()\n if (scanStarted) {\n void Promise.resolve(this.stopScan()).catch(() => undefined)\n }\n }\n\n const settle = (error?: Error) => {\n if (settled) {\n return\n }\n settled = true\n cleanup()\n if (error) {\n reject(error)\n } else {\n resolve([...latestResults])\n }\n }\n\n const handleBluetoothStatus = (status: Partial<BluetoothStatus>) => {\n if (!Array.isArray(status.searchResults)) {\n return\n }\n emitResults(searchResultsForModel(status, scanOptions.model))\n }\n\n removeBluetoothListener = this.onBluetoothStatus(handleBluetoothStatus)\n emitResults([])\n\n timeout = setTimeout(() => settle(), timeoutMs)\n\n Promise.resolve(this.startScan(scanOptions.model))\n .then(() => {\n scanStarted = true\n return this.getBluetoothStatus()\n })\n .then(handleBluetoothStatus)\n .catch((error) => settle(error instanceof Error ? error : new Error(String(error))))\n })\n}\n\nconst nativeRequestPhoto = NativeBluetoothSdkModule.requestPhoto.bind(NativeBluetoothSdkModule)\nNativeBluetoothSdkModule.requestPhoto = function (params: PhotoRequestParams) {\n return nativeRequestPhoto(photoRequestParamsForNative(params) as unknown as PhotoRequestParams)\n}\n\nconst nativeStartStream = NativeBluetoothSdkModule.startStream.bind(NativeBluetoothSdkModule)\nNativeBluetoothSdkModule.startExternallyManagedStream = function (params: StreamStartRequest) {\n return nativeStartStream({...params, keepAliveMode: \"external\"} as StreamStartRequest)\n}\nNativeBluetoothSdkModule.checkForOtaUpdate = NativeBluetoothSdkModule.sendOtaQueryStatus.bind(NativeBluetoothSdkModule)\nNativeBluetoothSdkModule.startOtaUpdate = NativeBluetoothSdkModule.sendOtaStart.bind(NativeBluetoothSdkModule)\n\nexport default NativeBluetoothSdkModule\nexport const BluetoothSdk = NativeBluetoothSdkModule as BluetoothSdkPublicModule\n"]}
package/build/index.d.ts CHANGED
@@ -2,5 +2,5 @@ import type { BluetoothSdkPublicModule } from "./BluetoothSdk.types";
2
2
  export declare const BluetoothSdk: BluetoothSdkPublicModule;
3
3
  export default BluetoothSdk;
4
4
  export { CAMERA_FOV_DEFAULT, CAMERA_FOV_MAX, CAMERA_FOV_MIN, DeviceModels, isBusyGlassesConnectionStatus, isConnectedGlassesConnectionStatus, isConnectedWifiStatus, isEnabledHotspotStatus, isReadyGlassesConnectionStatus, } from "./BluetoothSdk.types";
5
- export type { AudioConnectedEvent, AudioDisconnectedEvent, AudioPairingNeededEvent, BatteryStatusEvent, BluetoothSdkEvent, BluetoothSdkEventListener, BluetoothSdkEventMap, BluetoothSdkEventName, BluetoothSdkPublicModule as BluetoothSdkModule, BluetoothSdkSubscription, ButtonPhotoSize, ButtonPressEvent, CameraFovPreset, CameraFovRequest, CameraFovResult, CameraRoiPosition, CompatibleGlassesSearchStopEvent, ConnectOptions, ConnectedGlassesConnectionStatus, ConnectedWifiStatus, Device, DeviceModel, EnabledHotspotStatus, GalleryStatusEvent, GlassesConnectionStatus, GlassesMediaVolumeGetResult, GlassesMediaVolumeSetResult, GlassesNotReadyEvent, HeadUpEvent, HotspotErrorEvent, HotspotStatus, HotspotStatusChangeEvent, LocalTranscriptionEvent, LogEvent, MicLc3Event, MicMode, MicPcmEvent, MicPreference, OtaStartAckEvent, OtaStatus, OtaStatusEvent, OtaQueryResult, OtaUpdateAvailableEvent, OtaUpdateInfo, PairFailureEvent, PhotoCaptureMetadata, PhotoResolvedConfig, PhotoCompression, PhotoFpsRange, PhotoMeteredPreview, PhotoResponseEvent, PhotoRequestedCaptureConfig, PhotoSize, PhotoStatusEvent, PhotoStatusState, PhotoSuccessResponseEvent, RgbLedAction, RgbLedColor, RgbLedControlResponseEvent, RgbLedControlSuccessResponseEvent, ScanModelOptions, ScanOptions, ScanResultsCallback, SpeakingStatusEvent, SettingsAckEvent, SettingsAckSetting, SettingsAckSuccessEvent, SettingsAckSuccessStatus, SettingsAckStatus, StreamAudioConfig, StreamResolvedConfig, StreamStartRequest, StreamStatusEvent, StreamStatusLifecycleState, StreamStatusReconnectState, StreamStatusState, StreamVideoConfig, SwipeVolumeStatusEvent, SwitchStatusEvent, TouchEvent, VideoRecordingStartedStatusEvent, VideoRecordingStatusEvent, VideoRecordingStatusState, VideoRecordingStoppedStatusEvent, VideoRecordingSuccessStatusEvent, VersionInfoEvent, VersionInfoResult, WifiScanResultEvent, VoiceActivityDetectionStatusEvent, WifiSearchResult, WifiStatus, WifiStatusChangeEvent, } from "./BluetoothSdk.types";
5
+ export type { AccelEvent, AudioConnectedEvent, AudioDisconnectedEvent, AudioPairingNeededEvent, BatteryStatusEvent, BluetoothSdkEvent, BluetoothSdkEventListener, BluetoothSdkEventMap, BluetoothSdkEventName, BluetoothSdkPublicModule as BluetoothSdkModule, BluetoothSdkSubscription, ButtonPhotoSize, ButtonPressEvent, CameraFovPreset, CameraFovRequest, CameraFovResult, CameraRoiPosition, CompatibleGlassesSearchStopEvent, ConnectOptions, ConnectedGlassesConnectionStatus, ConnectedWifiStatus, Device, DeviceModel, EnabledHotspotStatus, GalleryStatusEvent, GlassesConnectionStatus, GlassesMediaVolumeGetResult, GlassesMediaVolumeSetResult, GlassesNotReadyEvent, HeadUpEvent, HotspotErrorEvent, HotspotStatus, HotspotStatusChangeEvent, LocalTranscriptionEvent, LogEvent, MicLc3Event, MicMode, MicPcmEvent, MicPreference, OtaStartAckEvent, OtaStatus, OtaStatusEvent, OtaQueryResult, OtaUpdateAvailableEvent, OtaUpdateInfo, PairFailureEvent, PhotoCaptureMetadata, PhotoResolvedConfig, PhotoCompression, PhotoFpsRange, PhotoMeteredPreview, PhotoResponseEvent, PhotoRequestedCaptureConfig, PhotoSize, PhotoStatusEvent, PhotoStatusState, PhotoSuccessResponseEvent, RgbLedAction, RgbLedColor, RgbLedControlResponseEvent, RgbLedControlSuccessResponseEvent, ScanModelOptions, ScanOptions, ScanResultsCallback, SpeakingStatusEvent, SettingsAckEvent, SettingsAckSetting, SettingsAckSuccessEvent, SettingsAckSuccessStatus, SettingsAckStatus, StreamAudioConfig, StreamResolvedConfig, StreamStartRequest, StreamStatusEvent, StreamStatusLifecycleState, StreamStatusReconnectState, StreamStatusState, StreamVideoConfig, SwipeVolumeStatusEvent, SwitchStatusEvent, TouchEvent, VideoRecordingStartedStatusEvent, VideoRecordingStatusEvent, VideoRecordingStatusState, VideoRecordingStoppedStatusEvent, VideoRecordingSuccessStatusEvent, VersionInfoEvent, VersionInfoResult, WifiScanResultEvent, VoiceActivityDetectionStatusEvent, WifiSearchResult, WifiStatus, WifiStatusChangeEvent, } from "./BluetoothSdk.types";
6
6
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAmD,wBAAwB,EAAC,MAAM,sBAAsB,CAAA;AAgDpH,eAAO,MAAM,YAAY,EAAE,wBA4DzB,CAAA;AAEF,eAAe,YAAY,CAAA;AAE3B,OAAO,EACL,kBAAkB,EAClB,cAAc,EACd,cAAc,EACd,YAAY,EACZ,6BAA6B,EAC7B,kCAAkC,EAClC,qBAAqB,EACrB,sBAAsB,EACtB,8BAA8B,GAC/B,MAAM,sBAAsB,CAAA;AAE7B,YAAY,EACV,mBAAmB,EACnB,sBAAsB,EACt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B,GACtB,MAAM,sBAAsB,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAmD,wBAAwB,EAAC,MAAM,sBAAsB,CAAA;AAiDpH,eAAO,MAAM,YAAY,EAAE,wBA6DzB,CAAA;AAEF,eAAe,YAAY,CAAA;AAE3B,OAAO,EACL,kBAAkB,EAClB,cAAc,EACd,cAAc,EACd,YAAY,EACZ,6BAA6B,EAC7B,kCAAkC,EAClC,qBAAqB,EACrB,sBAAsB,EACtB,8BAA8B,GAC/B,MAAM,sBAAsB,CAAA;AAE7B,YAAY,EACV,UAAU,EACV,mBAAmB,EACnB,sBAAsB,EACtB,uBAAuB,EACvB,kBAAkB,EAClB,iBAAiB,EACjB,yBAAyB,EACzB,oBAAoB,EACpB,qBAAqB,EACrB,wBAAwB,IAAI,kBAAkB,EAC9C,wBAAwB,EACxB,eAAe,EACf,gBAAgB,EAChB,eAAe,EACf,gBAAgB,EAChB,eAAe,EACf,iBAAiB,EACjB,gCAAgC,EAChC,cAAc,EACd,gCAAgC,EAChC,mBAAmB,EACnB,MAAM,EACN,WAAW,EACX,oBAAoB,EACpB,kBAAkB,EAClB,uBAAuB,EACvB,2BAA2B,EAC3B,2BAA2B,EAC3B,oBAAoB,EACpB,WAAW,EACX,iBAAiB,EACjB,aAAa,EACb,wBAAwB,EACxB,uBAAuB,EACvB,QAAQ,EACR,WAAW,EACX,OAAO,EACP,WAAW,EACX,aAAa,EACb,gBAAgB,EAChB,SAAS,EACT,cAAc,EACd,cAAc,EACd,uBAAuB,EACvB,aAAa,EACb,gBAAgB,EAChB,oBAAoB,EACpB,mBAAmB,EACnB,gBAAgB,EAChB,aAAa,EACb,mBAAmB,EACnB,kBAAkB,EAClB,2BAA2B,EAC3B,SAAS,EACT,gBAAgB,EAChB,gBAAgB,EAChB,yBAAyB,EACzB,YAAY,EACZ,WAAW,EACX,0BAA0B,EAC1B,iCAAiC,EACjC,gBAAgB,EAChB,WAAW,EACX,mBAAmB,EACnB,mBAAmB,EACnB,gBAAgB,EAChB,kBAAkB,EAClB,uBAAuB,EACvB,wBAAwB,EACxB,iBAAiB,EACjB,iBAAiB,EACjB,oBAAoB,EACpB,kBAAkB,EAClB,iBAAiB,EACjB,0BAA0B,EAC1B,0BAA0B,EAC1B,iBAAiB,EACjB,iBAAiB,EACjB,sBAAsB,EACtB,iBAAiB,EACjB,UAAU,EACV,gCAAgC,EAChC,yBAAyB,EACzB,yBAAyB,EACzB,gCAAgC,EAChC,gCAAgC,EAChC,gBAAgB,EAChB,iBAAiB,EACjB,mBAAmB,EACnB,iCAAiC,EACjC,gBAAgB,EAChB,UAAU,EACV,qBAAqB,GACtB,MAAM,sBAAsB,CAAA"}
package/build/index.js CHANGED
@@ -6,6 +6,7 @@ const PUBLIC_EVENT_NAMES = new Set([
6
6
  "glasses_not_ready",
7
7
  "button_press",
8
8
  "touch_event",
9
+ "accel_event",
9
10
  "head_up",
10
11
  "voice_activity_detection_status",
11
12
  "speaking_status",
@@ -61,6 +62,7 @@ export const BluetoothSdk = Object.freeze({
61
62
  showDashboard: PrivateBluetoothSdkModule.showDashboard.bind(PrivateBluetoothSdkModule),
62
63
  setDashboardPosition: PrivateBluetoothSdkModule.setDashboardPosition.bind(PrivateBluetoothSdkModule),
63
64
  setHeadUpAngle: PrivateBluetoothSdkModule.setHeadUpAngle.bind(PrivateBluetoothSdkModule),
65
+ setImuEnabled: PrivateBluetoothSdkModule.setImuEnabled.bind(PrivateBluetoothSdkModule),
64
66
  setScreenDisabled: PrivateBluetoothSdkModule.setScreenDisabled.bind(PrivateBluetoothSdkModule),
65
67
  requestWifiScan: PrivateBluetoothSdkModule.requestWifiScan.bind(PrivateBluetoothSdkModule),
66
68
  sendWifiCredentials: PrivateBluetoothSdkModule.sendWifiCredentials.bind(PrivateBluetoothSdkModule),
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"m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,CAAC,yBAAyB,CAAC;IACxG,gBAAgB,EAAE,yBAAyB,CAAC,gBAAgB,CAAC,IAAI,CAAC,yBAAyB,CAAC;IAC5F,gBAAgB,EAAE,yBAAyB,CAAC,gBAAgB,CAAC,IAAI,CAAC,yBAAyB,CAAC;CAC7F,CAAC,CAAA;AAEF,eAAe,YAAY,CAAA;AAE3B,OAAO,EACL,kBAAkB,EAClB,cAAc,EACd,cAAc,EACd,YAAY,EACZ,6BAA6B,EAC7B,kCAAkC,EAClC,qBAAqB,EACrB,sBAAsB,EACtB,8BAA8B,GAC/B,MAAM,sBAAsB,CAAA","sourcesContent":["import PrivateBluetoothSdkModule from \"./_private/BluetoothSdkModule\"\nimport type {BluetoothSdkEventListener, BluetoothSdkEventName, BluetoothSdkPublicModule} from \"./BluetoothSdk.types\"\n\nconst PUBLIC_EVENT_NAMES = new Set<BluetoothSdkEventName>([\n \"log\",\n \"device_discovered\",\n \"default_device_changed\",\n \"glasses_not_ready\",\n \"button_press\",\n \"touch_event\",\n \"head_up\",\n \"voice_activity_detection_status\",\n \"speaking_status\",\n \"battery_status\",\n \"local_transcription\",\n \"wifi_status_change\",\n \"wifi_scan_result\",\n \"hotspot_status_change\",\n \"hotspot_error\",\n \"photo_response\",\n \"photo_status\",\n \"video_recording_status\",\n \"gallery_status\",\n \"compatible_glasses_search_stop\",\n \"swipe_volume_status\",\n \"switch_status\",\n \"rgb_led_control_response\",\n \"settings_ack\",\n \"pair_failure\",\n \"audio_pairing_needed\",\n \"audio_connected\",\n \"audio_disconnected\",\n \"mic_pcm\",\n \"mic_lc3\",\n \"stream_status\",\n \"ota_update_available\",\n \"ota_start_ack\",\n \"ota_status\",\n \"version_info\",\n \"extraction_progress\",\n])\n\nconst addListener: BluetoothSdkPublicModule[\"addListener\"] = (eventName, listener) => {\n if (!PUBLIC_EVENT_NAMES.has(eventName)) {\n throw new Error(`Unsupported BluetoothSdk event \"${eventName}\". Use @mentra/bluetooth-sdk/react for status state.`)\n }\n return PrivateBluetoothSdkModule.addListener(eventName, listener as BluetoothSdkEventListener<BluetoothSdkEventName>)\n}\n\nexport const BluetoothSdk: BluetoothSdkPublicModule = Object.freeze({\n addListener,\n getDefaultDevice: PrivateBluetoothSdkModule.getDefaultDevice.bind(PrivateBluetoothSdkModule),\n setDefaultDevice: PrivateBluetoothSdkModule.setDefaultDevice.bind(PrivateBluetoothSdkModule),\n clearDefaultDevice: PrivateBluetoothSdkModule.clearDefaultDevice.bind(PrivateBluetoothSdkModule),\n startScan: PrivateBluetoothSdkModule.startScan.bind(PrivateBluetoothSdkModule),\n stopScan: PrivateBluetoothSdkModule.stopScan.bind(PrivateBluetoothSdkModule),\n scan: PrivateBluetoothSdkModule.scan.bind(PrivateBluetoothSdkModule) as BluetoothSdkPublicModule[\"scan\"],\n connect: PrivateBluetoothSdkModule.connect.bind(PrivateBluetoothSdkModule),\n connectDefault: PrivateBluetoothSdkModule.connectDefault.bind(PrivateBluetoothSdkModule),\n cancelConnectionAttempt: PrivateBluetoothSdkModule.cancelConnectionAttempt.bind(PrivateBluetoothSdkModule),\n disconnect: PrivateBluetoothSdkModule.disconnect.bind(PrivateBluetoothSdkModule),\n forget: PrivateBluetoothSdkModule.forget.bind(PrivateBluetoothSdkModule),\n displayText: PrivateBluetoothSdkModule.displayText.bind(PrivateBluetoothSdkModule),\n clearDisplay: PrivateBluetoothSdkModule.clearDisplay.bind(PrivateBluetoothSdkModule),\n showDashboard: PrivateBluetoothSdkModule.showDashboard.bind(PrivateBluetoothSdkModule),\n setDashboardPosition: PrivateBluetoothSdkModule.setDashboardPosition.bind(PrivateBluetoothSdkModule),\n setHeadUpAngle: PrivateBluetoothSdkModule.setHeadUpAngle.bind(PrivateBluetoothSdkModule),\n setScreenDisabled: PrivateBluetoothSdkModule.setScreenDisabled.bind(PrivateBluetoothSdkModule),\n requestWifiScan: PrivateBluetoothSdkModule.requestWifiScan.bind(PrivateBluetoothSdkModule),\n sendWifiCredentials: PrivateBluetoothSdkModule.sendWifiCredentials.bind(PrivateBluetoothSdkModule),\n forgetWifiNetwork: PrivateBluetoothSdkModule.forgetWifiNetwork.bind(PrivateBluetoothSdkModule),\n setHotspotState: PrivateBluetoothSdkModule.setHotspotState.bind(PrivateBluetoothSdkModule),\n setGalleryModeEnabled: PrivateBluetoothSdkModule.setGalleryModeEnabled.bind(PrivateBluetoothSdkModule),\n setVoiceActivityDetectionEnabled:\n PrivateBluetoothSdkModule.setVoiceActivityDetectionEnabled.bind(PrivateBluetoothSdkModule),\n setButtonPhotoSettings: PrivateBluetoothSdkModule.setButtonPhotoSettings.bind(PrivateBluetoothSdkModule),\n setButtonVideoRecordingSettings:\n PrivateBluetoothSdkModule.setButtonVideoRecordingSettings.bind(PrivateBluetoothSdkModule),\n setButtonCameraLed: PrivateBluetoothSdkModule.setButtonCameraLed.bind(PrivateBluetoothSdkModule),\n setButtonMaxRecordingTime: PrivateBluetoothSdkModule.setButtonMaxRecordingTime.bind(PrivateBluetoothSdkModule),\n setCameraFov: PrivateBluetoothSdkModule.setCameraFov.bind(PrivateBluetoothSdkModule),\n queryGalleryStatus: PrivateBluetoothSdkModule.queryGalleryStatus.bind(PrivateBluetoothSdkModule),\n requestPhoto: PrivateBluetoothSdkModule.requestPhoto.bind(PrivateBluetoothSdkModule),\n startVideoRecording: PrivateBluetoothSdkModule.startVideoRecording.bind(PrivateBluetoothSdkModule),\n stopVideoRecording: PrivateBluetoothSdkModule.stopVideoRecording.bind(PrivateBluetoothSdkModule),\n startStream: PrivateBluetoothSdkModule.startStream.bind(PrivateBluetoothSdkModule),\n stopStream: PrivateBluetoothSdkModule.stopStream.bind(PrivateBluetoothSdkModule),\n setMicState: PrivateBluetoothSdkModule.setMicState.bind(PrivateBluetoothSdkModule),\n setPreferredMic: PrivateBluetoothSdkModule.setPreferredMic.bind(PrivateBluetoothSdkModule),\n setOwnAppAudioPlaying: PrivateBluetoothSdkModule.setOwnAppAudioPlaying.bind(PrivateBluetoothSdkModule),\n getGlassesMediaVolume: PrivateBluetoothSdkModule.getGlassesMediaVolume.bind(PrivateBluetoothSdkModule),\n setGlassesMediaVolume: PrivateBluetoothSdkModule.setGlassesMediaVolume.bind(PrivateBluetoothSdkModule),\n rgbLedControl: PrivateBluetoothSdkModule.rgbLedControl.bind(PrivateBluetoothSdkModule),\n requestVersionInfo: PrivateBluetoothSdkModule.requestVersionInfo.bind(PrivateBluetoothSdkModule),\n checkForOtaUpdate: PrivateBluetoothSdkModule.sendOtaQueryStatus.bind(PrivateBluetoothSdkModule),\n startOtaUpdate: PrivateBluetoothSdkModule.sendOtaStart.bind(PrivateBluetoothSdkModule),\n retryOtaVersionCheck: PrivateBluetoothSdkModule.retryOtaVersionCheck.bind(PrivateBluetoothSdkModule),\n setSttModelDetails: PrivateBluetoothSdkModule.setSttModelDetails.bind(PrivateBluetoothSdkModule),\n getSttModelPath: PrivateBluetoothSdkModule.getSttModelPath.bind(PrivateBluetoothSdkModule),\n checkSttModelAvailable: PrivateBluetoothSdkModule.checkSttModelAvailable.bind(PrivateBluetoothSdkModule),\n validateSttModel: PrivateBluetoothSdkModule.validateSttModel.bind(PrivateBluetoothSdkModule),\n extractTarBz2: PrivateBluetoothSdkModule.extractTarBz2.bind(PrivateBluetoothSdkModule),\n restartTranscriber: PrivateBluetoothSdkModule.restartTranscriber.bind(PrivateBluetoothSdkModule),\n setTtsModelDetails: PrivateBluetoothSdkModule.setTtsModelDetails.bind(PrivateBluetoothSdkModule),\n getTtsModelPath: PrivateBluetoothSdkModule.getTtsModelPath.bind(PrivateBluetoothSdkModule),\n getTtsModelLanguage: PrivateBluetoothSdkModule.getTtsModelLanguage.bind(PrivateBluetoothSdkModule),\n checkTtsModelAvailable: PrivateBluetoothSdkModule.checkTtsModelAvailable.bind(PrivateBluetoothSdkModule),\n validateTtsModel: PrivateBluetoothSdkModule.validateTtsModel.bind(PrivateBluetoothSdkModule),\n generateTtsAudio: PrivateBluetoothSdkModule.generateTtsAudio.bind(PrivateBluetoothSdkModule),\n})\n\nexport default BluetoothSdk\n\nexport {\n CAMERA_FOV_DEFAULT,\n CAMERA_FOV_MAX,\n CAMERA_FOV_MIN,\n DeviceModels,\n isBusyGlassesConnectionStatus,\n isConnectedGlassesConnectionStatus,\n isConnectedWifiStatus,\n isEnabledHotspotStatus,\n isReadyGlassesConnectionStatus,\n} from \"./BluetoothSdk.types\"\n\nexport type {\n AudioConnectedEvent,\n AudioDisconnectedEvent,\n AudioPairingNeededEvent,\n BatteryStatusEvent,\n BluetoothSdkEvent,\n BluetoothSdkEventListener,\n BluetoothSdkEventMap,\n BluetoothSdkEventName,\n BluetoothSdkPublicModule as BluetoothSdkModule,\n BluetoothSdkSubscription,\n ButtonPhotoSize,\n ButtonPressEvent,\n CameraFovPreset,\n CameraFovRequest,\n CameraFovResult,\n CameraRoiPosition,\n CompatibleGlassesSearchStopEvent,\n ConnectOptions,\n ConnectedGlassesConnectionStatus,\n ConnectedWifiStatus,\n Device,\n DeviceModel,\n EnabledHotspotStatus,\n GalleryStatusEvent,\n GlassesConnectionStatus,\n GlassesMediaVolumeGetResult,\n GlassesMediaVolumeSetResult,\n GlassesNotReadyEvent,\n HeadUpEvent,\n HotspotErrorEvent,\n HotspotStatus,\n HotspotStatusChangeEvent,\n LocalTranscriptionEvent,\n LogEvent,\n MicLc3Event,\n MicMode,\n MicPcmEvent,\n MicPreference,\n OtaStartAckEvent,\n OtaStatus,\n OtaStatusEvent,\n OtaQueryResult,\n OtaUpdateAvailableEvent,\n OtaUpdateInfo,\n PairFailureEvent,\n PhotoCaptureMetadata,\n PhotoResolvedConfig,\n PhotoCompression,\n PhotoFpsRange,\n PhotoMeteredPreview,\n PhotoResponseEvent,\n PhotoRequestedCaptureConfig,\n PhotoSize,\n PhotoStatusEvent,\n PhotoStatusState,\n PhotoSuccessResponseEvent,\n RgbLedAction,\n RgbLedColor,\n RgbLedControlResponseEvent,\n RgbLedControlSuccessResponseEvent,\n ScanModelOptions,\n ScanOptions,\n ScanResultsCallback,\n SpeakingStatusEvent,\n SettingsAckEvent,\n SettingsAckSetting,\n SettingsAckSuccessEvent,\n SettingsAckSuccessStatus,\n SettingsAckStatus,\n StreamAudioConfig,\n StreamResolvedConfig,\n StreamStartRequest,\n StreamStatusEvent,\n StreamStatusLifecycleState,\n StreamStatusReconnectState,\n StreamStatusState,\n StreamVideoConfig,\n SwipeVolumeStatusEvent,\n SwitchStatusEvent,\n TouchEvent,\n VideoRecordingStartedStatusEvent,\n VideoRecordingStatusEvent,\n VideoRecordingStatusState,\n VideoRecordingStoppedStatusEvent,\n VideoRecordingSuccessStatusEvent,\n VersionInfoEvent,\n VersionInfoResult,\n WifiScanResultEvent,\n VoiceActivityDetectionStatusEvent,\n WifiSearchResult,\n WifiStatus,\n WifiStatusChangeEvent,\n} from \"./BluetoothSdk.types\"\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,yBAAyB,MAAM,+BAA+B,CAAA;AAGrE,MAAM,kBAAkB,GAAG,IAAI,GAAG,CAAwB;IACxD,KAAK;IACL,mBAAmB;IACnB,wBAAwB;IACxB,mBAAmB;IACnB,cAAc;IACd,aAAa;IACb,aAAa;IACb,SAAS;IACT,iCAAiC;IACjC,iBAAiB;IACjB,gBAAgB;IAChB,qBAAqB;IACrB,oBAAoB;IACpB,kBAAkB;IAClB,uBAAuB;IACvB,eAAe;IACf,gBAAgB;IAChB,cAAc;IACd,wBAAwB;IACxB,gBAAgB;IAChB,gCAAgC;IAChC,qBAAqB;IACrB,eAAe;IACf,0BAA0B;IAC1B,cAAc;IACd,cAAc;IACd,sBAAsB;IACtB,iBAAiB;IACjB,oBAAoB;IACpB,SAAS;IACT,SAAS;IACT,eAAe;IACf,sBAAsB;IACtB,eAAe;IACf,YAAY;IACZ,cAAc;IACd,qBAAqB;CACtB,CAAC,CAAA;AAEF,MAAM,WAAW,GAA4C,CAAC,SAAS,EAAE,QAAQ,EAAE,EAAE;IACnF,IAAI,CAAC,kBAAkB,CAAC,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AAyB,CAAC,eAAe,CAAC,IAAI,CAAC,yBAAyB,CAAC;IAC1F,sBAAsB,EAAE,yBAAyB,CAAC,sBAAsB,CAAC,IAAI,CAAC,yBAAyB,CAAC;IACxG,gBAAgB,EAAE,yBAAyB,CAAC,gBAAgB,CAAC,IAAI,CAAC,yBAAyB,CAAC;IAC5F,aAAa,EAAE,yBAAyB,CAAC,aAAa,CAAC,IAAI,CAAC,yBAAyB,CAAC;IACtF,kBAAkB,EAAE,yBAAyB,CAAC,kBAAkB,CAAC,IAAI,CAAC,yBAAyB,CAAC;IAChG,kBAAkB,EAAE,yBAAyB,CAAC,kBAAkB,CAAC,IAAI,CAAC,yBAAyB,CAAC;IAChG,eAAe,EAAE,yBAAyB,CAAC,eAAe,CAAC,IAAI,CAAC,yBAAyB,CAAC;IAC1F,mBAAmB,EAAE,yBAAyB,CAAC,mBAAmB,CAAC,IAAI,CAAC,yBAAyB,CAAC;IAClG,sBAAsB,EAAE,yBAAyB,CAAC,sBAAsB,CAAC,IAAI,CAAC,yBAAyB,CAAC;IACxG,gBAAgB,EAAE,yBAAyB,CAAC,gBAAgB,CAAC,IAAI,CAAC,yBAAyB,CAAC;IAC5F,gBAAgB,EAAE,yBAAyB,CAAC,gBAAgB,CAAC,IAAI,CAAC,yBAAyB,CAAC;CAC7F,CAAC,CAAA;AAEF,eAAe,YAAY,CAAA;AAE3B,OAAO,EACL,kBAAkB,EAClB,cAAc,EACd,cAAc,EACd,YAAY,EACZ,6BAA6B,EAC7B,kCAAkC,EAClC,qBAAqB,EACrB,sBAAsB,EACtB,8BAA8B,GAC/B,MAAM,sBAAsB,CAAA","sourcesContent":["import PrivateBluetoothSdkModule from \"./_private/BluetoothSdkModule\"\nimport type {BluetoothSdkEventListener, BluetoothSdkEventName, BluetoothSdkPublicModule} from \"./BluetoothSdk.types\"\n\nconst PUBLIC_EVENT_NAMES = new Set<BluetoothSdkEventName>([\n \"log\",\n \"device_discovered\",\n \"default_device_changed\",\n \"glasses_not_ready\",\n \"button_press\",\n \"touch_event\",\n \"accel_event\",\n \"head_up\",\n \"voice_activity_detection_status\",\n \"speaking_status\",\n \"battery_status\",\n \"local_transcription\",\n \"wifi_status_change\",\n \"wifi_scan_result\",\n \"hotspot_status_change\",\n \"hotspot_error\",\n \"photo_response\",\n \"photo_status\",\n \"video_recording_status\",\n \"gallery_status\",\n \"compatible_glasses_search_stop\",\n \"swipe_volume_status\",\n \"switch_status\",\n \"rgb_led_control_response\",\n \"settings_ack\",\n \"pair_failure\",\n \"audio_pairing_needed\",\n \"audio_connected\",\n \"audio_disconnected\",\n \"mic_pcm\",\n \"mic_lc3\",\n \"stream_status\",\n \"ota_update_available\",\n \"ota_start_ack\",\n \"ota_status\",\n \"version_info\",\n \"extraction_progress\",\n])\n\nconst addListener: BluetoothSdkPublicModule[\"addListener\"] = (eventName, listener) => {\n if (!PUBLIC_EVENT_NAMES.has(eventName)) {\n throw new Error(`Unsupported BluetoothSdk event \"${eventName}\". Use @mentra/bluetooth-sdk/react for status state.`)\n }\n return PrivateBluetoothSdkModule.addListener(eventName, listener as BluetoothSdkEventListener<BluetoothSdkEventName>)\n}\n\nexport const BluetoothSdk: BluetoothSdkPublicModule = Object.freeze({\n addListener,\n getDefaultDevice: PrivateBluetoothSdkModule.getDefaultDevice.bind(PrivateBluetoothSdkModule),\n setDefaultDevice: PrivateBluetoothSdkModule.setDefaultDevice.bind(PrivateBluetoothSdkModule),\n clearDefaultDevice: PrivateBluetoothSdkModule.clearDefaultDevice.bind(PrivateBluetoothSdkModule),\n startScan: PrivateBluetoothSdkModule.startScan.bind(PrivateBluetoothSdkModule),\n stopScan: PrivateBluetoothSdkModule.stopScan.bind(PrivateBluetoothSdkModule),\n scan: PrivateBluetoothSdkModule.scan.bind(PrivateBluetoothSdkModule) as BluetoothSdkPublicModule[\"scan\"],\n connect: PrivateBluetoothSdkModule.connect.bind(PrivateBluetoothSdkModule),\n connectDefault: PrivateBluetoothSdkModule.connectDefault.bind(PrivateBluetoothSdkModule),\n cancelConnectionAttempt: PrivateBluetoothSdkModule.cancelConnectionAttempt.bind(PrivateBluetoothSdkModule),\n disconnect: PrivateBluetoothSdkModule.disconnect.bind(PrivateBluetoothSdkModule),\n forget: PrivateBluetoothSdkModule.forget.bind(PrivateBluetoothSdkModule),\n displayText: PrivateBluetoothSdkModule.displayText.bind(PrivateBluetoothSdkModule),\n clearDisplay: PrivateBluetoothSdkModule.clearDisplay.bind(PrivateBluetoothSdkModule),\n showDashboard: PrivateBluetoothSdkModule.showDashboard.bind(PrivateBluetoothSdkModule),\n setDashboardPosition: PrivateBluetoothSdkModule.setDashboardPosition.bind(PrivateBluetoothSdkModule),\n setHeadUpAngle: PrivateBluetoothSdkModule.setHeadUpAngle.bind(PrivateBluetoothSdkModule),\n setImuEnabled: PrivateBluetoothSdkModule.setImuEnabled.bind(PrivateBluetoothSdkModule),\n setScreenDisabled: PrivateBluetoothSdkModule.setScreenDisabled.bind(PrivateBluetoothSdkModule),\n requestWifiScan: PrivateBluetoothSdkModule.requestWifiScan.bind(PrivateBluetoothSdkModule),\n sendWifiCredentials: PrivateBluetoothSdkModule.sendWifiCredentials.bind(PrivateBluetoothSdkModule),\n forgetWifiNetwork: PrivateBluetoothSdkModule.forgetWifiNetwork.bind(PrivateBluetoothSdkModule),\n setHotspotState: PrivateBluetoothSdkModule.setHotspotState.bind(PrivateBluetoothSdkModule),\n setGalleryModeEnabled: PrivateBluetoothSdkModule.setGalleryModeEnabled.bind(PrivateBluetoothSdkModule),\n setVoiceActivityDetectionEnabled:\n PrivateBluetoothSdkModule.setVoiceActivityDetectionEnabled.bind(PrivateBluetoothSdkModule),\n setButtonPhotoSettings: PrivateBluetoothSdkModule.setButtonPhotoSettings.bind(PrivateBluetoothSdkModule),\n setButtonVideoRecordingSettings:\n PrivateBluetoothSdkModule.setButtonVideoRecordingSettings.bind(PrivateBluetoothSdkModule),\n setButtonCameraLed: PrivateBluetoothSdkModule.setButtonCameraLed.bind(PrivateBluetoothSdkModule),\n setButtonMaxRecordingTime: PrivateBluetoothSdkModule.setButtonMaxRecordingTime.bind(PrivateBluetoothSdkModule),\n setCameraFov: PrivateBluetoothSdkModule.setCameraFov.bind(PrivateBluetoothSdkModule),\n queryGalleryStatus: PrivateBluetoothSdkModule.queryGalleryStatus.bind(PrivateBluetoothSdkModule),\n requestPhoto: PrivateBluetoothSdkModule.requestPhoto.bind(PrivateBluetoothSdkModule),\n startVideoRecording: PrivateBluetoothSdkModule.startVideoRecording.bind(PrivateBluetoothSdkModule),\n stopVideoRecording: PrivateBluetoothSdkModule.stopVideoRecording.bind(PrivateBluetoothSdkModule),\n startStream: PrivateBluetoothSdkModule.startStream.bind(PrivateBluetoothSdkModule),\n stopStream: PrivateBluetoothSdkModule.stopStream.bind(PrivateBluetoothSdkModule),\n setMicState: PrivateBluetoothSdkModule.setMicState.bind(PrivateBluetoothSdkModule),\n setPreferredMic: PrivateBluetoothSdkModule.setPreferredMic.bind(PrivateBluetoothSdkModule),\n setOwnAppAudioPlaying: PrivateBluetoothSdkModule.setOwnAppAudioPlaying.bind(PrivateBluetoothSdkModule),\n getGlassesMediaVolume: PrivateBluetoothSdkModule.getGlassesMediaVolume.bind(PrivateBluetoothSdkModule),\n setGlassesMediaVolume: PrivateBluetoothSdkModule.setGlassesMediaVolume.bind(PrivateBluetoothSdkModule),\n rgbLedControl: PrivateBluetoothSdkModule.rgbLedControl.bind(PrivateBluetoothSdkModule),\n requestVersionInfo: PrivateBluetoothSdkModule.requestVersionInfo.bind(PrivateBluetoothSdkModule),\n checkForOtaUpdate: PrivateBluetoothSdkModule.sendOtaQueryStatus.bind(PrivateBluetoothSdkModule),\n startOtaUpdate: PrivateBluetoothSdkModule.sendOtaStart.bind(PrivateBluetoothSdkModule),\n retryOtaVersionCheck: PrivateBluetoothSdkModule.retryOtaVersionCheck.bind(PrivateBluetoothSdkModule),\n setSttModelDetails: PrivateBluetoothSdkModule.setSttModelDetails.bind(PrivateBluetoothSdkModule),\n getSttModelPath: PrivateBluetoothSdkModule.getSttModelPath.bind(PrivateBluetoothSdkModule),\n checkSttModelAvailable: PrivateBluetoothSdkModule.checkSttModelAvailable.bind(PrivateBluetoothSdkModule),\n validateSttModel: PrivateBluetoothSdkModule.validateSttModel.bind(PrivateBluetoothSdkModule),\n extractTarBz2: PrivateBluetoothSdkModule.extractTarBz2.bind(PrivateBluetoothSdkModule),\n restartTranscriber: PrivateBluetoothSdkModule.restartTranscriber.bind(PrivateBluetoothSdkModule),\n setTtsModelDetails: PrivateBluetoothSdkModule.setTtsModelDetails.bind(PrivateBluetoothSdkModule),\n getTtsModelPath: PrivateBluetoothSdkModule.getTtsModelPath.bind(PrivateBluetoothSdkModule),\n getTtsModelLanguage: PrivateBluetoothSdkModule.getTtsModelLanguage.bind(PrivateBluetoothSdkModule),\n checkTtsModelAvailable: PrivateBluetoothSdkModule.checkTtsModelAvailable.bind(PrivateBluetoothSdkModule),\n validateTtsModel: PrivateBluetoothSdkModule.validateTtsModel.bind(PrivateBluetoothSdkModule),\n generateTtsAudio: PrivateBluetoothSdkModule.generateTtsAudio.bind(PrivateBluetoothSdkModule),\n})\n\nexport default BluetoothSdk\n\nexport {\n CAMERA_FOV_DEFAULT,\n CAMERA_FOV_MAX,\n CAMERA_FOV_MIN,\n DeviceModels,\n isBusyGlassesConnectionStatus,\n isConnectedGlassesConnectionStatus,\n isConnectedWifiStatus,\n isEnabledHotspotStatus,\n isReadyGlassesConnectionStatus,\n} from \"./BluetoothSdk.types\"\n\nexport type {\n AccelEvent,\n AudioConnectedEvent,\n AudioDisconnectedEvent,\n AudioPairingNeededEvent,\n BatteryStatusEvent,\n BluetoothSdkEvent,\n BluetoothSdkEventListener,\n BluetoothSdkEventMap,\n BluetoothSdkEventName,\n BluetoothSdkPublicModule as BluetoothSdkModule,\n BluetoothSdkSubscription,\n ButtonPhotoSize,\n ButtonPressEvent,\n CameraFovPreset,\n CameraFovRequest,\n CameraFovResult,\n CameraRoiPosition,\n CompatibleGlassesSearchStopEvent,\n ConnectOptions,\n ConnectedGlassesConnectionStatus,\n ConnectedWifiStatus,\n Device,\n DeviceModel,\n EnabledHotspotStatus,\n GalleryStatusEvent,\n GlassesConnectionStatus,\n GlassesMediaVolumeGetResult,\n GlassesMediaVolumeSetResult,\n GlassesNotReadyEvent,\n HeadUpEvent,\n HotspotErrorEvent,\n HotspotStatus,\n HotspotStatusChangeEvent,\n LocalTranscriptionEvent,\n LogEvent,\n MicLc3Event,\n MicMode,\n MicPcmEvent,\n MicPreference,\n OtaStartAckEvent,\n OtaStatus,\n OtaStatusEvent,\n OtaQueryResult,\n OtaUpdateAvailableEvent,\n OtaUpdateInfo,\n PairFailureEvent,\n PhotoCaptureMetadata,\n PhotoResolvedConfig,\n PhotoCompression,\n PhotoFpsRange,\n PhotoMeteredPreview,\n PhotoResponseEvent,\n PhotoRequestedCaptureConfig,\n PhotoSize,\n PhotoStatusEvent,\n PhotoStatusState,\n PhotoSuccessResponseEvent,\n RgbLedAction,\n RgbLedColor,\n RgbLedControlResponseEvent,\n RgbLedControlSuccessResponseEvent,\n ScanModelOptions,\n ScanOptions,\n ScanResultsCallback,\n SpeakingStatusEvent,\n SettingsAckEvent,\n SettingsAckSetting,\n SettingsAckSuccessEvent,\n SettingsAckSuccessStatus,\n SettingsAckStatus,\n StreamAudioConfig,\n StreamResolvedConfig,\n StreamStartRequest,\n StreamStatusEvent,\n StreamStatusLifecycleState,\n StreamStatusReconnectState,\n StreamStatusState,\n StreamVideoConfig,\n SwipeVolumeStatusEvent,\n SwitchStatusEvent,\n TouchEvent,\n VideoRecordingStartedStatusEvent,\n VideoRecordingStatusEvent,\n VideoRecordingStatusState,\n VideoRecordingStoppedStatusEvent,\n VideoRecordingSuccessStatusEvent,\n VersionInfoEvent,\n VersionInfoResult,\n WifiScanResultEvent,\n VoiceActivityDetectionStatusEvent,\n WifiSearchResult,\n WifiStatus,\n WifiStatusChangeEvent,\n} from \"./BluetoothSdk.types\"\n"]}
@@ -18,6 +18,9 @@ public class BluetoothSdkModule: Module, MentraBluetoothSDKDelegate {
18
18
  "glasses_not_ready",
19
19
  "button_press",
20
20
  "touch_event",
21
+ "accel_event",
22
+ "CompassHeadingEvent",
23
+ "CompassCalibrationEvent",
21
24
  "head_up",
22
25
  "voice_activity_detection_status",
23
26
  "speaking_status",
@@ -251,6 +251,16 @@ class Bridge {
251
251
  Bridge.sendTypedMessage("touch_event", body: body)
252
252
  }
253
253
 
254
+ static func sendAccelEvent(x: Float, y: Float, z: Float, timestamp: Int64) {
255
+ let body: [String: Any] = [
256
+ "x": x,
257
+ "y": y,
258
+ "z": z,
259
+ "timestamp": timestamp,
260
+ ]
261
+ Bridge.sendTypedMessage("accel_event", body: body)
262
+ }
263
+
254
264
  static func sendSwipeVolumeStatus(enabled: Bool, timestamp: Int64) {
255
265
  let body: [String: Any] = [
256
266
  "enabled": enabled,