@mentra/bluetooth-sdk 0.1.21-beta.5 → 3.1.0-dev.12

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 (118) hide show
  1. package/README.md +56 -9
  2. package/android/build.gradle +7 -4
  3. package/android/lc3Lib/build.gradle +18 -4
  4. package/android/silero/build.gradle +9 -1
  5. package/android/src/main/java/com/mentra/bluetoothsdk/BluetoothSdkModule.kt +16 -0
  6. package/android/src/main/java/com/mentra/bluetoothsdk/Bridge.kt +35 -4
  7. package/android/src/main/java/com/mentra/bluetoothsdk/DeviceManager.kt +205 -19
  8. package/android/src/main/java/com/mentra/bluetoothsdk/DeviceStore.kt +2 -0
  9. package/android/src/main/java/com/mentra/bluetoothsdk/GeneratedReleaseMetadata.kt +11 -0
  10. package/android/src/main/java/com/mentra/bluetoothsdk/MentraBluetoothSdk.kt +112 -8
  11. package/android/src/main/java/com/mentra/bluetoothsdk/MentraLocalNetworkModule.kt +93 -12
  12. package/android/src/main/java/com/mentra/bluetoothsdk/OtaManifest.kt +5 -7
  13. package/android/src/main/java/com/mentra/bluetoothsdk/ScopedNetworkReadiness.kt +17 -0
  14. package/android/src/main/java/com/mentra/bluetoothsdk/audio/AudioModels.kt +15 -0
  15. package/android/src/main/java/com/mentra/bluetoothsdk/events/BluetoothEvents.kt +24 -0
  16. package/android/src/main/java/com/mentra/bluetoothsdk/net/LocalIpv4.kt +57 -0
  17. package/android/src/main/java/com/mentra/bluetoothsdk/otaserver/LocalOtaServer.kt +304 -0
  18. package/android/src/main/java/com/mentra/bluetoothsdk/otaserver/MentraOtaServerModule.kt +120 -0
  19. package/android/src/main/java/com/mentra/bluetoothsdk/photoreceiver/MentraPhotoReceiverModule.kt +2 -49
  20. package/android/src/main/java/com/mentra/bluetoothsdk/services/Foreground.kt +61 -30
  21. package/android/src/main/java/com/mentra/bluetoothsdk/sgcs/MentraLive.kt +1137 -191
  22. package/android/src/main/java/com/mentra/bluetoothsdk/sgcs/MentraLivePairingAdvertisement.kt +54 -0
  23. package/android/src/main/java/com/mentra/bluetoothsdk/sgcs/SGCManager.kt +8 -0
  24. package/android/src/main/java/com/mentra/bluetoothsdk/status/DeviceStatus.kt +17 -0
  25. package/android/src/main/java/com/mentra/bluetoothsdk/types/DeviceModels.kt +12 -0
  26. package/android/src/main/java/com/mentra/bluetoothsdk/utils/BleJsonCompact.java +74 -79
  27. package/android/src/main/java/com/mentra/bluetoothsdk/utils/K900ProtocolUtils.java +3 -3
  28. package/android/src/test/java/com/mentra/bluetoothsdk/OtaStartResponsePolicyTest.kt +30 -0
  29. package/android/src/test/java/com/mentra/bluetoothsdk/ScopedNetworkReadinessTest.kt +39 -0
  30. package/android/src/test/java/com/mentra/bluetoothsdk/otaserver/LocalOtaServerTest.kt +82 -0
  31. package/android/src/test/java/com/mentra/bluetoothsdk/services/ForegroundServiceTypeTest.kt +69 -0
  32. package/android/src/test/java/com/mentra/bluetoothsdk/sgcs/MentraLiveGattCharacteristicsTest.kt +39 -0
  33. package/android/src/test/java/com/mentra/bluetoothsdk/sgcs/MentraLivePairingAdvertisementParserTest.kt +75 -0
  34. package/android/src/test/java/com/mentra/bluetoothsdk/utils/BleJsonCompactTest.java +148 -7
  35. package/build/BluetoothSdk.types.d.ts +56 -2
  36. package/build/BluetoothSdk.types.d.ts.map +1 -1
  37. package/build/BluetoothSdk.types.js.map +1 -1
  38. package/build/_internal.d.ts +2 -0
  39. package/build/_internal.d.ts.map +1 -1
  40. package/build/_internal.js +2 -0
  41. package/build/_internal.js.map +1 -1
  42. package/build/_private/BluetoothSdkModule.d.ts +4 -1
  43. package/build/_private/BluetoothSdkModule.d.ts.map +1 -1
  44. package/build/_private/BluetoothSdkModule.js +1 -1
  45. package/build/_private/BluetoothSdkModule.js.map +1 -1
  46. package/build/_private/MentraLocalNetworkModule.d.ts +1 -0
  47. package/build/_private/MentraLocalNetworkModule.d.ts.map +1 -1
  48. package/build/_private/MentraLocalNetworkModule.js.map +1 -1
  49. package/build/_private/sdkOtaManifest.d.ts +3 -12
  50. package/build/_private/sdkOtaManifest.d.ts.map +1 -1
  51. package/build/_private/sdkOtaManifest.js +5 -17
  52. package/build/_private/sdkOtaManifest.js.map +1 -1
  53. package/build/generated/releaseMetadata.d.ts +12 -0
  54. package/build/generated/releaseMetadata.d.ts.map +1 -0
  55. package/build/generated/releaseMetadata.js +10 -0
  56. package/build/generated/releaseMetadata.js.map +1 -0
  57. package/build/index.d.ts +1 -1
  58. package/build/index.d.ts.map +1 -1
  59. package/build/index.js +10 -2
  60. package/build/index.js.map +1 -1
  61. package/build/ota-server/MentraOtaServer.types.d.ts +14 -0
  62. package/build/ota-server/MentraOtaServer.types.d.ts.map +1 -0
  63. package/build/ota-server/MentraOtaServer.types.js +2 -0
  64. package/build/ota-server/MentraOtaServer.types.js.map +1 -0
  65. package/build/ota-server/MentraOtaServerModule.d.ts +21 -0
  66. package/build/ota-server/MentraOtaServerModule.d.ts.map +1 -0
  67. package/build/ota-server/MentraOtaServerModule.js +3 -0
  68. package/build/ota-server/MentraOtaServerModule.js.map +1 -0
  69. package/build/ota-server/MentraOtaServerModule.web.d.ts +10 -0
  70. package/build/ota-server/MentraOtaServerModule.web.d.ts.map +1 -0
  71. package/build/ota-server/MentraOtaServerModule.web.js +12 -0
  72. package/build/ota-server/MentraOtaServerModule.web.js.map +1 -0
  73. package/build/ota-server/index.d.ts +3 -0
  74. package/build/ota-server/index.d.ts.map +1 -0
  75. package/build/ota-server/index.js +3 -0
  76. package/build/ota-server/index.js.map +1 -0
  77. package/expo-module.config.json +3 -2
  78. package/ios/BackgroundOtaArtifactDownloader.swift +125 -0
  79. package/ios/BluetoothSdkModule.swift +16 -2
  80. package/ios/LocalIPv4.swift +150 -0
  81. package/ios/LocalOtaServer.swift +309 -0
  82. package/ios/MentraBluetoothSDK.podspec +5 -1
  83. package/ios/MentraOtaServerModule.swift +147 -0
  84. package/ios/MentraPhotoReceiverModule.swift +1 -81
  85. package/ios/Source/BluetoothSdkDefaults.swift +4 -1
  86. package/ios/Source/Bridge.swift +43 -4
  87. package/ios/Source/DeviceManager.swift +143 -13
  88. package/ios/Source/DeviceStore.swift +2 -0
  89. package/ios/Source/GeneratedReleaseMetadata.swift +11 -0
  90. package/ios/Source/MentraBluetoothSDK.swift +74 -6
  91. package/ios/Source/OtaManifest.swift +5 -7
  92. package/ios/Source/audio/AudioModels.swift +17 -0
  93. package/ios/Source/camera/CameraModels.swift +1 -0
  94. package/ios/Source/events/BluetoothEvents.swift +27 -0
  95. package/ios/Source/sgcs/MentraLive.swift +410 -30
  96. package/ios/Source/sgcs/MentraLivePairingAdvertisement.swift +64 -0
  97. package/ios/Source/sgcs/SGCManager.swift +11 -0
  98. package/ios/Source/status/DeviceStatus.swift +23 -0
  99. package/ios/Source/types/DeviceModels.swift +23 -2
  100. package/ios/Source/utils/BleJsonCompact.swift +73 -71
  101. package/ios/Tests/MentraLivePairingAdvertisementTests.swift +104 -0
  102. package/package.json +5 -1
  103. package/plugin/build/withIos.d.ts +3 -1
  104. package/plugin/build/withIos.js +22 -10
  105. package/scripts/verify-release-package.mjs +34 -0
  106. package/scripts/write-release-metadata.mjs +154 -0
  107. package/scripts/write-release-metadata.test.mjs +29 -0
  108. package/src/BluetoothSdk.types.ts +67 -3
  109. package/src/_internal.ts +2 -0
  110. package/src/_private/BluetoothSdkModule.ts +5 -5
  111. package/src/_private/MentraLocalNetworkModule.ts +1 -1
  112. package/src/_private/sdkOtaManifest.ts +5 -17
  113. package/src/generated/releaseMetadata.ts +20 -0
  114. package/src/index.ts +19 -2
  115. package/src/ota-server/MentraOtaServer.types.ts +10 -0
  116. package/src/ota-server/MentraOtaServerModule.ts +23 -0
  117. package/src/ota-server/MentraOtaServerModule.web.ts +17 -0
  118. package/src/ota-server/index.ts +2 -0
@@ -1 +1 @@
1
- {"version":3,"file":"BluetoothSdkModule.js","sourceRoot":"","sources":["../../src/_private/BluetoothSdkModule.ts"],"names":[],"mappings":"AAAA,OAAO,EA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B,OAAO,IAAI,CAAC,kBAAkB,EAAE,CAAA;QAClC,CAAC,CAAC;aACD,IAAI,CAAC,qBAAqB,CAAC;aAC3B,KAAK,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,MAAM,CAAC,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAA;IACxF,CAAC,CAAC,CAAA;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,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,eAAe,wBAAwB,CAAA;AACvC,MAAM,CAAC,MAAM,YAAY,GAAG,wBAAsD,CAAA","sourcesContent":["import {NativeModule, requireNativeModule} from \"expo\"\n\nimport {\n BluetoothSettingsUpdate,\n BluetoothSdkModuleEvents,\n BluetoothStatus,\n PhotoCaptureDefaults,\n CalendarEvent,\n CAMERA_FOV_DEFAULT,\n CAMERA_FOV_MAX,\n CAMERA_FOV_MIN,\n CameraFovPreset,\n CameraFovRequest,\n CameraFovOverrideRequest,\n CameraFovResult,\n CameraFovSetting,\n CameraRoiPosition,\n CameraStatusEvent,\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 WarmUpCameraParams,\n WifiSearchResult,\n WifiStatusChangeEvent,\n} from \"../BluetoothSdk.types\"\nimport {warmUpCameraParamsForNative} from \"./cameraRequestPayload\"\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 the glasses system clock when phone detects clock skew (Mentra Live and G2). */\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 /** Mentra Live center-mic loudness / Barrier gate (cs_swit type 10). */\n setLoudnessGateEnabled(enabled: boolean): Promise<void>\n /**\n * @deprecated Sticky action-button photo presets are deprecated. Prefer per-request\n * `requestPhoto(...)` options (e.g. `mode: \"text\"` for text sensor size/crop).\n */\n setPhotoCaptureDefaults(settings: PhotoCaptureDefaults): Promise<SettingsAckSuccessEvent>\n setVideoRecordingDefaults(width: number, height: number, fps: number): Promise<SettingsAckSuccessEvent>\n setMaxVideoRecordingDuration(minutes: number): Promise<SettingsAckSuccessEvent>\n setCameraFov(request: CameraFovRequest): Promise<CameraFovResult>\n setLegacyCameraFov(request: CameraFovRequest): Promise<CameraFovResult>\n restoreLegacyCameraFov(): Promise<void>\n setCameraFovOverride(request: CameraFovOverrideRequest): Promise<CameraFovResult>\n releaseCameraFovOverride(leaseId: string): Promise<SettingsAckSuccessEvent>\n /**\n * Configure camera HAL tuning (ANR / gain) on Mentra Live glasses.\n * Sends a {@code camera_tuning_config} BLE message; the ASG client relays it as a\n * {@code camconfig} broadcast so the HAL picks up new parameters without a reboot.\n *\n * Scan-mode convention: pass `{anr: false, gain: false}` when activating scan mode\n * (disables ANR and pixsmart gain) and `{anr: true, gain: true}` to restore defaults.\n */\n setCameraTuningConfig(anrOn: boolean, gainOn: boolean): Promise<SettingsAckSuccessEvent>\n queryGalleryStatus(): Promise<GalleryStatusEvent>\n requestPhoto(params: PhotoRequestParams): Promise<PhotoSuccessResponseEvent>\n warmUpCamera(params: WarmUpCameraParams): Promise<CameraStatusEvent>\n stopCameraWarmUp(requestId: string): Promise<void>\n\n // OTA Commands\n setOtaVersionUrl(otaVersionUrl: string): void\n getOtaVersionUrl(): string\n checkForOtaUpdate(): Promise<boolean>\n startOtaUpdate(otaVersionUrl?: string | null): Promise<OtaStartAckEvent>\n sendOtaQueryStatus(): Promise<OtaQueryResult>\n startAr99OtaFromFile(path: string): Promise<boolean>\n cancelAr99Ota(): Promise<void>\n sendAr99FactoryReset(): Promise<void>\n buildAr99OtaSignature(secret: string, appName: string, currentVersion: string, serialNumber: string, nonce: string): string\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(\n requestId: string,\n webhookUrl?: string,\n authToken?: string,\n ): 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 // Live PCM output stream (miniapp speaker.createStream). MentraOS-internal\n // ? 16-bit LE PCM chunks into a streaming AudioTrack (USAGE_MEDIA, so it\n // follows the phone's media route, e.g. A2DP to glasses). Implemented with\n // AudioTrack on Android and AVAudioEngine on iOS.\n /** Open a PCM stream session. One AudioTrack per id; caller manages ids. */\n pcmStreamOpen(streamId: string, sampleRate: number, channels: number, volume: number): Promise<void>\n /**\n * Append base64 PCM. Resolves with the queued-but-unplayed backlog in ms;\n * blocks (on a background dispatcher) while the backlog is above the\n * backpressure ceiling, so awaited writes self-throttle to realtime.\n */\n pcmStreamWrite(streamId: string, base64: string): Promise<{bufferedMs: number}>\n /** Drain the backlog, then stop. Resolves with the total played duration. */\n pcmStreamClose(streamId: string): Promise<{durationMs: number}>\n /** Stop immediately, dropping any backlog. Idempotent. */\n pcmStreamAbort(streamId: string): 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??5 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>(module: Record<string, unknown>, name: string): 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// The default is the full sensor; \"standard\" preserves the historical 102� crop.\nconst CAMERA_FOV_PRESETS: Record<CameraFovPreset, CameraFovSetting> = {\n narrow: {fov: 82, roiPosition: 0},\n standard: {fov: 102, 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(Number.isFinite(request.fov) ? request.fov : CAMERA_FOV_DEFAULT, CAMERA_FOV_MIN, CAMERA_FOV_MAX),\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\nNativeBluetoothSdkModule.setLoudnessGateEnabled = function (enabled: boolean) {\n return this.updateBluetoothSettings({loudness_gate_enabled: enabled})\n}\n\nconst nativeSetCameraFov = bindNativeMethod<(fov: CameraFovSetting) => MaybePromise<CameraFovResult>>(\n NativeBluetoothSdkModule as unknown as Record<string, unknown>,\n \"setCameraFov\",\n)\nNativeBluetoothSdkModule.setCameraFov = function (request: CameraFovRequest) {\n const setting = normalizeCameraFov(request)\n return Promise.resolve(nativeSetCameraFov(setting))\n}\n\nconst nativeSetLegacyCameraFov = bindNativeMethod<(fov: CameraFovSetting) => MaybePromise<CameraFovResult>>(\n NativeBluetoothSdkModule as unknown as Record<string, unknown>,\n \"setLegacyCameraFov\",\n)\nNativeBluetoothSdkModule.setLegacyCameraFov = function (request: CameraFovRequest) {\n return Promise.resolve(nativeSetLegacyCameraFov(normalizeCameraFov(request)))\n}\n\nconst nativeRestoreLegacyCameraFov = bindNativeMethod<() => MaybePromise<void>>(\n NativeBluetoothSdkModule as unknown as Record<string, unknown>,\n \"restoreLegacyCameraFov\",\n)\nNativeBluetoothSdkModule.restoreLegacyCameraFov = function () {\n return Promise.resolve(nativeRestoreLegacyCameraFov())\n}\n\nconst nativeSetCameraFovOverride = bindNativeMethod<\n (request: CameraFovSetting & {leaseId: string; ttlMs: number}) => MaybePromise<CameraFovResult>\n>(NativeBluetoothSdkModule as unknown as Record<string, unknown>, \"setCameraFovOverride\")\nNativeBluetoothSdkModule.setCameraFovOverride = function (request: CameraFovOverrideRequest) {\n const setting = normalizeCameraFov(request)\n const requestedTtl =\n typeof request.ttlMs === \"number\" && Number.isFinite(request.ttlMs) && request.ttlMs > 0\n ? Math.round(request.ttlMs)\n : 300_000\n return Promise.resolve(\n nativeSetCameraFovOverride({\n ...setting,\n leaseId: request.leaseId,\n ttlMs: Math.min(requestedTtl, 600_000),\n }),\n )\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 nativeWarmUpCamera = NativeBluetoothSdkModule.warmUpCamera.bind(NativeBluetoothSdkModule)\nNativeBluetoothSdkModule.warmUpCamera = function (params: WarmUpCameraParams) {\n return nativeWarmUpCamera(warmUpCameraParamsForNative(params) as unknown as WarmUpCameraParams)\n}\n\nexport default NativeBluetoothSdkModule\nexport const BluetoothSdk = NativeBluetoothSdkModule as BluetoothSdkInternalModule\n\n\n\n\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,EAML,kBAAkB,EAClB,cAAc,EACd,cAAc,GAyCf,MAAM,uBAAuB,CAAA;AAC9B,OAAO,EAAC,2BAA2B,EAAC,MAAM,wBAAwB,CAAA;AAClE,OAAO,EAAC,2BAA2B,EAAC,MAAM,uBAAuB,CAAA;AAuNjE,yDAAyD;AACzD,gGAAgG;AAChG,MAAM,wBAAwB,GAAG,mBAAmB,CAA2B,cAAc,CAAC,CAAA;AAE9F,MAAM,uBAAuB,GAA6B;IACxD,aAAa,EAAE,IAAI;IACnB,+BAA+B,EAAE,IAAI;CACtC,CAAA;AAED,MAAM,uBAAuB,GAAG,MAAM,CAAA;AAEtC,SAAS,gBAAgB,CAA0C,MAA+B,EAAE,IAAY;IAC9G,MAAM,MAAM,GAAG,MAAM,CAAC,IAAI,CAAC,CAAA;IAC3B,IAAI,OAAO,MAAM,KAAK,UAAU,EAAE,CAAC;QACjC,OAAO,CAAC,IAAI,CAAC,iCAAiC,IAAI,4DAA4D,CAAC,CAAA;QAC/G,OAAO,CAAC,KAAK,IAAI,EAAE;YACjB,MAAM,IAAI,KAAK,CAAC,gBAAgB,IAAI,0DAA0D,CAAC,CAAA;QACjG,CAAC,CAAM,CAAA;IACT,CAAC;IACD,OAAO,MAAM,CAAC,IAAI,CAAC,MAAM,CAAM,CAAA;AACjC,CAAC;AAED,MAAM,cAAc,GAAG,CAAC,CAAA;AACxB,MAAM,cAAc,GAAG,CAAC,CAAA;AACxB,MAAM,0BAA0B,GAA+D;IAC7F,MAAM,EAAE,CAAC;IACT,MAAM,EAAE,CAAC;IACT,GAAG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UAAU,CAAC,GAAG,EAAE,CAAC,MAAM,EAAE,EAAE,SAAS,CAAC,CAAA;QAE/C,OAAO,CAAC,OAAO,CAAC,IAAI,CAAC,SAAS,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;aAC/C,IAAI,CAAC,GAAG,EAAE;YACT,WAAW,GAAG,IAAI,CAAA;YAClB,OAAO,IAAI,CAAC,kBAAkB,EAAE,CAAA;QAClC,CAAC,CAAC;aACD,IAAI,CAAC,qBAAqB,CAAC;aAC3B,KAAK,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,MAAM,CAAC,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAA;IACxF,CAAC,CAAC,CAAA;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,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,eAAe,wBAAwB,CAAA;AACvC,MAAM,CAAC,MAAM,YAAY,GAAG,wBAAsD,CAAA","sourcesContent":["import {NativeModule, requireNativeModule} from \"expo\"\n\nimport {\n BluetoothSettingsUpdate,\n BluetoothSdkModuleEvents,\n BluetoothStatus,\n PhotoCaptureDefaults,\n CalendarEvent,\n CAMERA_FOV_DEFAULT,\n CAMERA_FOV_MAX,\n CAMERA_FOV_MIN,\n CameraFovPreset,\n CameraFovRequest,\n CameraFovOverrideRequest,\n CameraFovResult,\n CameraFovSetting,\n CameraRoiPosition,\n CameraStatusEvent,\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 VideoRecordingStatusEvent,\n VersionInfoResult,\n WarmUpCameraParams,\n WifiSearchResult,\n WifiStatusChangeEvent,\n} from \"../BluetoothSdk.types\"\nimport {warmUpCameraParamsForNative} from \"./cameraRequestPayload\"\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 /** Enable or disable Wi-Fi ADB on Mentra Live (no-op on other devices). */\n setWifiAdbState(enabled: boolean): Promise<void>\n /** Set the glasses system clock when phone detects clock skew (Mentra Live and G2). */\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 /** Mentra Live center-mic loudness / Barrier gate (cs_swit type 10). */\n setLoudnessGateEnabled(enabled: boolean): Promise<void>\n /**\n * @deprecated Sticky action-button photo presets are deprecated. Prefer per-request\n * `requestPhoto(...)` options (e.g. `mode: \"text\"` for text sensor size/crop).\n */\n setPhotoCaptureDefaults(settings: PhotoCaptureDefaults): Promise<SettingsAckSuccessEvent>\n setVideoRecordingDefaults(width: number, height: number, fps: number): Promise<SettingsAckSuccessEvent>\n setMaxVideoRecordingDuration(minutes: number): Promise<SettingsAckSuccessEvent>\n setCameraFov(request: CameraFovRequest): Promise<CameraFovResult>\n setLegacyCameraFov(request: CameraFovRequest): Promise<CameraFovResult>\n restoreLegacyCameraFov(): Promise<void>\n setCameraFovOverride(request: CameraFovOverrideRequest): Promise<CameraFovResult>\n releaseCameraFovOverride(leaseId: string): Promise<SettingsAckSuccessEvent>\n /**\n * Configure camera HAL tuning (ANR / gain) on Mentra Live glasses.\n * Sends a {@code camera_tuning_config} BLE message; the ASG client relays it as a\n * {@code camconfig} broadcast so the HAL picks up new parameters without a reboot.\n *\n * Scan-mode convention: pass `{anr: false, gain: false}` when activating scan mode\n * (disables ANR and pixsmart gain) and `{anr: true, gain: true}` to restore defaults.\n */\n setCameraTuningConfig(anrOn: boolean, gainOn: boolean): Promise<SettingsAckSuccessEvent>\n queryGalleryStatus(): Promise<GalleryStatusEvent>\n requestPhoto(params: PhotoRequestParams): Promise<PhotoSuccessResponseEvent>\n warmUpCamera(params: WarmUpCameraParams): Promise<CameraStatusEvent>\n stopCameraWarmUp(requestId: string): Promise<void>\n\n // OTA Commands\n setOtaVersionUrl(otaVersionUrl: string): void\n getOtaVersionUrl(): string\n checkForOtaUpdate(): Promise<boolean>\n startOtaUpdate(otaVersionUrl?: string | null): Promise<OtaStartAckEvent>\n sendOtaQueryStatus(): Promise<OtaQueryResult>\n startAr99OtaFromFile(path: string): Promise<boolean>\n cancelAr99Ota(): Promise<void>\n sendAr99FactoryReset(): Promise<void>\n buildAr99OtaSignature(secret: string, appName: string, currentVersion: string, serialNumber: string, nonce: string): string\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(\n requestId: string,\n webhookUrl?: string,\n authToken?: string,\n ): Promise<VideoRecordingStoppedStatusEvent>\n queryVideoRecordingStatus(requestId: string): Promise<VideoRecordingStatusEvent>\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 // Live PCM output stream (miniapp speaker.createStream). MentraOS-internal\n // ? 16-bit LE PCM chunks into a streaming AudioTrack (USAGE_MEDIA, so it\n // follows the phone's media route, e.g. A2DP to glasses). Implemented with\n // AudioTrack on Android and AVAudioEngine on iOS.\n /** Open a PCM stream session. One AudioTrack per id; caller manages ids. */\n pcmStreamOpen(streamId: string, sampleRate: number, channels: number, volume: number): Promise<void>\n /**\n * Append base64 PCM. Resolves with the queued-but-unplayed backlog in ms;\n * blocks (on a background dispatcher) while the backlog is above the\n * backpressure ceiling, so awaited writes self-throttle to realtime.\n */\n pcmStreamWrite(streamId: string, base64: string): Promise<{bufferedMs: number}>\n /** Drain the backlog, then stop. Resolves with the total played duration. */\n pcmStreamClose(streamId: string): Promise<{durationMs: number}>\n /** Stop immediately, dropping any backlog. Idempotent. */\n pcmStreamAbort(streamId: string): 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??5 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>(module: Record<string, unknown>, name: string): 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// The default is the full sensor; \"standard\" preserves the historical 102° crop.\nconst CAMERA_FOV_PRESETS: Record<CameraFovPreset, CameraFovSetting> = {\n narrow: {fov: 82, roiPosition: 0},\n standard: {fov: 102, 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(Number.isFinite(request.fov) ? request.fov : CAMERA_FOV_DEFAULT, CAMERA_FOV_MIN, CAMERA_FOV_MAX),\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\nNativeBluetoothSdkModule.setLoudnessGateEnabled = function (enabled: boolean) {\n return this.updateBluetoothSettings({loudness_gate_enabled: enabled})\n}\n\nconst nativeSetCameraFov = bindNativeMethod<(fov: CameraFovSetting) => MaybePromise<CameraFovResult>>(\n NativeBluetoothSdkModule as unknown as Record<string, unknown>,\n \"setCameraFov\",\n)\nNativeBluetoothSdkModule.setCameraFov = function (request: CameraFovRequest) {\n const setting = normalizeCameraFov(request)\n return Promise.resolve(nativeSetCameraFov(setting))\n}\n\nconst nativeSetLegacyCameraFov = bindNativeMethod<(fov: CameraFovSetting) => MaybePromise<CameraFovResult>>(\n NativeBluetoothSdkModule as unknown as Record<string, unknown>,\n \"setLegacyCameraFov\",\n)\nNativeBluetoothSdkModule.setLegacyCameraFov = function (request: CameraFovRequest) {\n return Promise.resolve(nativeSetLegacyCameraFov(normalizeCameraFov(request)))\n}\n\nconst nativeRestoreLegacyCameraFov = bindNativeMethod<() => MaybePromise<void>>(\n NativeBluetoothSdkModule as unknown as Record<string, unknown>,\n \"restoreLegacyCameraFov\",\n)\nNativeBluetoothSdkModule.restoreLegacyCameraFov = function () {\n return Promise.resolve(nativeRestoreLegacyCameraFov())\n}\n\nconst nativeSetCameraFovOverride = bindNativeMethod<\n (request: CameraFovSetting & {leaseId: string; ttlMs: number}) => MaybePromise<CameraFovResult>\n>(NativeBluetoothSdkModule as unknown as Record<string, unknown>, \"setCameraFovOverride\")\nNativeBluetoothSdkModule.setCameraFovOverride = function (request: CameraFovOverrideRequest) {\n const setting = normalizeCameraFov(request)\n const requestedTtl =\n typeof request.ttlMs === \"number\" && Number.isFinite(request.ttlMs) && request.ttlMs > 0\n ? Math.round(request.ttlMs)\n : 300_000\n return Promise.resolve(\n nativeSetCameraFovOverride({\n ...setting,\n leaseId: request.leaseId,\n ttlMs: Math.min(requestedTtl, 600_000),\n }),\n )\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 nativeWarmUpCamera = NativeBluetoothSdkModule.warmUpCamera.bind(NativeBluetoothSdkModule)\nNativeBluetoothSdkModule.warmUpCamera = function (params: WarmUpCameraParams) {\n return nativeWarmUpCamera(warmUpCameraParamsForNative(params) as unknown as WarmUpCameraParams)\n}\n\nexport default NativeBluetoothSdkModule\nexport const BluetoothSdk = NativeBluetoothSdkModule as BluetoothSdkInternalModule\n"]}
@@ -26,6 +26,7 @@ declare class MentraLocalNetworkNativeModule extends NativeModule<LocalNetworkEv
26
26
  connect(ssid: string, password: string): Promise<{
27
27
  connected: boolean;
28
28
  ssid: string;
29
+ localAddress?: string;
29
30
  }>;
30
31
  request(requestId: string, url: string, method: string, headers: Record<string, string>, body: string | null, timeoutMs: number): Promise<LocalNetworkResponse>;
31
32
  download(requestId: string, url: string, destination: string, headers: Record<string, string>, connectionTimeoutMs: number, readTimeoutMs: number): Promise<LocalNetworkDownloadResult>;
@@ -1 +1 @@
1
- {"version":3,"file":"MentraLocalNetworkModule.d.ts","sourceRoot":"","sources":["../../src/_private/MentraLocalNetworkModule.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,YAAY,EAA8B,MAAM,MAAM,CAAA;AAE9D,MAAM,MAAM,oBAAoB,GAAG;IACjC,MAAM,EAAE,MAAM,CAAA;IACd,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;IAC/B,UAAU,EAAE,MAAM,CAAA;CACnB,CAAA;AAED,MAAM,MAAM,0BAA0B,GAAG;IACvC,UAAU,EAAE,MAAM,CAAA;IAClB,YAAY,EAAE,MAAM,CAAA;IACpB,OAAO,EAAE,MAAM,CAAC,MAAM,EA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,MAAM,EACX,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,EAC/B,IAAI,EAAE,MAAM,GAAG,IAAI,EACnB,SAAS,EAAE,MAAM,GAChB,OAAO,CAAC,oBAAoB,CAAC;IAChC,QAAQ,CACN,SAAS,EAAE,MAAM,EACjB,GAAG,EAAE,MAAM,EACX,WAAW,EAAE,MAAM,EACnB,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,EAC/B,mBAAmB,EAAE,MAAM,EAC3B,aAAa,EAAE,MAAM,GACpB,OAAO,CAAC,0BAA0B,CAAC;IACtC,MAAM,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IACxC,UAAU,IAAI,OAAO,CAAC,IAAI,CAAC;CAC5B;;AAED,wBAAgG"}
@@ -1 +1 @@
1
- {"version":3,"file":"MentraLocalNetworkModule.js","sourceRoot":"","sources":["../../src/_private/MentraLocalNetworkModule.ts"],"names":[],"mappings":"AAAA,OAAO,EAAe,2BAA2B,EAAC,MAAM,MAAM,CAAA;AAiD9D,eAAe,2BAA2B,CAAiC,oBAAoB,CAAC,CAAA","sourcesContent":["import {NativeModule, requireOptionalNativeModule} from \"expo\"\n\nexport type LocalNetworkResponse = {\n status: number\n headers: Record<string, string>\n bodyBase64: string\n}\n\nexport type LocalNetworkDownloadResult = {\n statusCode: number\n bytesWritten: number\n headers: Record<string, string>\n}\n\nexport type LocalNetworkDownloadProgress = {\n requestId: string\n bytesWritten: number\n contentLength: number\n statusCode?: number\n headers?: Record<string, string>\n}\n\ntype LocalNetworkEvents = {\n downloadProgress: (event: LocalNetworkDownloadProgress) => void\n networkLost: (event: {ssid: string}) => void\n}\n\ndeclare class MentraLocalNetworkNativeModule extends NativeModule<LocalNetworkEvents> {\n connect(ssid: string, password: string): Promise<{connected: boolean; ssid: string}>\n request(\n requestId: string,\n url: string,\n method: string,\n headers: Record<string, string>,\n body: string | null,\n timeoutMs: number,\n ): Promise<LocalNetworkResponse>\n download(\n requestId: string,\n url: string,\n destination: string,\n headers: Record<string, string>,\n connectionTimeoutMs: number,\n readTimeoutMs: number,\n ): Promise<LocalNetworkDownloadResult>\n cancel(requestId: string): Promise<void>\n disconnect(): Promise<void>\n}\n\nexport default requireOptionalNativeModule<MentraLocalNetworkNativeModule>(\"MentraLocalNetwork\")\n"]}
1
+ {"version":3,"file":"MentraLocalNetworkModule.js","sourceRoot":"","sources":["../../src/_private/MentraLocalNetworkModule.ts"],"names":[],"mappings":"AAAA,OAAO,EAAe,2BAA2B,EAAC,MAAM,MAAM,CAAA;AAiD9D,eAAe,2BAA2B,CAAiC,oBAAoB,CAAC,CAAA","sourcesContent":["import {NativeModule, requireOptionalNativeModule} from \"expo\"\n\nexport type LocalNetworkResponse = {\n status: number\n headers: Record<string, string>\n bodyBase64: string\n}\n\nexport type LocalNetworkDownloadResult = {\n statusCode: number\n bytesWritten: number\n headers: Record<string, string>\n}\n\nexport type LocalNetworkDownloadProgress = {\n requestId: string\n bytesWritten: number\n contentLength: number\n statusCode?: number\n headers?: Record<string, string>\n}\n\ntype LocalNetworkEvents = {\n downloadProgress: (event: LocalNetworkDownloadProgress) => void\n networkLost: (event: {ssid: string}) => void\n}\n\ndeclare class MentraLocalNetworkNativeModule extends NativeModule<LocalNetworkEvents> {\n connect(ssid: string, password: string): Promise<{connected: boolean; ssid: string; localAddress?: string}>\n request(\n requestId: string,\n url: string,\n method: string,\n headers: Record<string, string>,\n body: string | null,\n timeoutMs: number,\n ): Promise<LocalNetworkResponse>\n download(\n requestId: string,\n url: string,\n destination: string,\n headers: Record<string, string>,\n connectionTimeoutMs: number,\n readTimeoutMs: number,\n ): Promise<LocalNetworkDownloadResult>\n cancel(requestId: string): Promise<void>\n disconnect(): Promise<void>\n}\n\nexport default requireOptionalNativeModule<MentraLocalNetworkNativeModule>(\"MentraLocalNetwork\")\n"]}
@@ -1,20 +1,11 @@
1
1
  /**
2
- * SDK-pinned OTA manifest URL derivation.
3
- *
4
- * Each Bluetooth SDK release publishes an immutable manifest
5
- * (`bluetooth-sdk-<version>-version.json`) pinning the exact ASG artifact paired with that SDK
6
- * version. The URL is derived from this package's own version — the version is frozen into the
7
- * published artifact, so this is equivalent to baking the URL at release time while keeping the
8
- * manifest itself replaceable as an operational escape hatch (asset moves, CDN migration).
9
- *
10
- * Mirrors the native derivation in `OtaManifestDefaults.defaultOtaVersionUrl()` (Kotlin) /
11
- * `BluetoothSdkDefaults` (Swift).
2
+ * Release CI embeds one immutable OTA manifest URL into every SDK distribution.
3
+ * Source builds remain unpinned and must opt in through the debug configuration API.
12
4
  */
13
5
  /** This Bluetooth SDK package's own version, as published. */
14
6
  export declare const BLUETOOTH_SDK_VERSION: string;
15
7
  /**
16
- * The immutable manifest URL pinning the ASG artifact paired with this SDK version, or null when
17
- * the package version is unavailable (malformed workspace state).
8
+ * The immutable manifest URL embedded by release CI, or null for an unpinned source build.
18
9
  */
19
10
  export declare function sdkPinnedOtaManifestUrl(): string | null;
20
11
  //# sourceMappingURL=sdkOtaManifest.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"sdkOtaManifest.d.ts","sourceRoot":"","sources":["../../src/_private/sdkOtaManifest.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAOH,8DAA8D;AAC9D,eAAO,MAAM,qBAAqB,EAAE,MAA2C,CAAA;AAE/E;;;GAGG;AACH,wBAAgB,uBAAuB,IAAI,MAAM,GAAG,IAAI,CAKvD"}
1
+ {"version":3,"file":"sdkOtaManifest.d.ts","sourceRoot":"","sources":["../../src/_private/sdkOtaManifest.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAOH,8DAA8D;AAC9D,eAAO,MAAM,qBAAqB,EAAE,MAA2C,CAAA;AAE/E;;GAEG;AACH,wBAAgB,uBAAuB,IAAI,MAAM,GAAG,IAAI,CAEvD"}
@@ -1,28 +1,16 @@
1
1
  /**
2
- * SDK-pinned OTA manifest URL derivation.
3
- *
4
- * Each Bluetooth SDK release publishes an immutable manifest
5
- * (`bluetooth-sdk-<version>-version.json`) pinning the exact ASG artifact paired with that SDK
6
- * version. The URL is derived from this package's own version — the version is frozen into the
7
- * published artifact, so this is equivalent to baking the URL at release time while keeping the
8
- * manifest itself replaceable as an operational escape hatch (asset moves, CDN migration).
9
- *
10
- * Mirrors the native derivation in `OtaManifestDefaults.defaultOtaVersionUrl()` (Kotlin) /
11
- * `BluetoothSdkDefaults` (Swift).
2
+ * Release CI embeds one immutable OTA manifest URL into every SDK distribution.
3
+ * Source builds remain unpinned and must opt in through the debug configuration API.
12
4
  */
13
- const SDK_OTA_RELEASE_BASE_URL = "https://github.com/Mentra-Community/MentraOS/releases/download/bluetooth-sdk-ota";
5
+ import { BLUETOOTH_SDK_RELEASE_METADATA } from "../generated/releaseMetadata";
14
6
  // eslint-disable-next-line @typescript-eslint/no-var-requires
15
7
  const packageJson = require("../../package.json");
16
8
  /** This Bluetooth SDK package's own version, as published. */
17
9
  export const BLUETOOTH_SDK_VERSION = (packageJson.version ?? "").trim();
18
10
  /**
19
- * The immutable manifest URL pinning the ASG artifact paired with this SDK version, or null when
20
- * the package version is unavailable (malformed workspace state).
11
+ * The immutable manifest URL embedded by release CI, or null for an unpinned source build.
21
12
  */
22
13
  export function sdkPinnedOtaManifestUrl() {
23
- if (!BLUETOOTH_SDK_VERSION) {
24
- return null;
25
- }
26
- return `${SDK_OTA_RELEASE_BASE_URL}/bluetooth-sdk-${BLUETOOTH_SDK_VERSION}-version.json`;
14
+ return BLUETOOTH_SDK_RELEASE_METADATA.otaManifestUrl;
27
15
  }
28
16
  //# sourceMappingURL=sdkOtaManifest.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"sdkOtaManifest.js","sourceRoot":"","sources":["../../src/_private/sdkOtaManifest.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,MAAM,wBAAwB,GAAG,kFAAkF,CAAA;AAEnH,8DAA8D;AAC9D,MAAM,WAAW,GAAG,OAAO,CAAC,oBAAoB,CAAuB,CAAA;AAEvE,8DAA8D;AAC9D,MAAM,CAAC,MAAM,qBAAqB,GAAW,CAAC,WAAW,CAAC,OAAO,IAAI,EAAE,CAAC,CAAC,IAAI,EAAE,CAAA;AAE/E;;;GAGG;AACH,MAAM,UAAU,uBAAuB;IACrC,IAAI,CAAC,qBAAqB,EAAE,CAAC;QAC3B,OAAO,IAAI,CAAA;IACb,CAAC;IACD,OAAO,GAAG,wBAAwB,kBAAkB,qBAAqB,eAAe,CAAA;AAC1F,CAAC","sourcesContent":["/**\n * SDK-pinned OTA manifest URL derivation.\n *\n * Each Bluetooth SDK release publishes an immutable manifest\n * (`bluetooth-sdk-<version>-version.json`) pinning the exact ASG artifact paired with that SDK\n * version. The URL is derived from this package's own version — the version is frozen into the\n * published artifact, so this is equivalent to baking the URL at release time while keeping the\n * manifest itself replaceable as an operational escape hatch (asset moves, CDN migration).\n *\n * Mirrors the native derivation in `OtaManifestDefaults.defaultOtaVersionUrl()` (Kotlin) /\n * `BluetoothSdkDefaults` (Swift).\n */\n\nconst SDK_OTA_RELEASE_BASE_URL = \"https://github.com/Mentra-Community/MentraOS/releases/download/bluetooth-sdk-ota\"\n\n// eslint-disable-next-line @typescript-eslint/no-var-requires\nconst packageJson = require(\"../../package.json\") as {version?: string}\n\n/** This Bluetooth SDK package's own version, as published. */\nexport const BLUETOOTH_SDK_VERSION: string = (packageJson.version ?? \"\").trim()\n\n/**\n * The immutable manifest URL pinning the ASG artifact paired with this SDK version, or null when\n * the package version is unavailable (malformed workspace state).\n */\nexport function sdkPinnedOtaManifestUrl(): string | null {\n if (!BLUETOOTH_SDK_VERSION) {\n return null\n }\n return `${SDK_OTA_RELEASE_BASE_URL}/bluetooth-sdk-${BLUETOOTH_SDK_VERSION}-version.json`\n}\n"]}
1
+ {"version":3,"file":"sdkOtaManifest.js","sourceRoot":"","sources":["../../src/_private/sdkOtaManifest.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAC,8BAA8B,EAAC,MAAM,8BAA8B,CAAA;AAE3E,8DAA8D;AAC9D,MAAM,WAAW,GAAG,OAAO,CAAC,oBAAoB,CAAuB,CAAA;AAEvE,8DAA8D;AAC9D,MAAM,CAAC,MAAM,qBAAqB,GAAW,CAAC,WAAW,CAAC,OAAO,IAAI,EAAE,CAAC,CAAC,IAAI,EAAE,CAAA;AAE/E;;GAEG;AACH,MAAM,UAAU,uBAAuB;IACrC,OAAO,8BAA8B,CAAC,cAAc,CAAA;AACtD,CAAC","sourcesContent":["/**\n * Release CI embeds one immutable OTA manifest URL into every SDK distribution.\n * Source builds remain unpinned and must opt in through the debug configuration API.\n */\n\nimport {BLUETOOTH_SDK_RELEASE_METADATA} from \"../generated/releaseMetadata\"\n\n// eslint-disable-next-line @typescript-eslint/no-var-requires\nconst packageJson = require(\"../../package.json\") as {version?: string}\n\n/** This Bluetooth SDK package's own version, as published. */\nexport const BLUETOOTH_SDK_VERSION: string = (packageJson.version ?? \"\").trim()\n\n/**\n * The immutable manifest URL embedded by release CI, or null for an unpinned source build.\n */\nexport function sdkPinnedOtaManifestUrl(): string | null {\n return BLUETOOTH_SDK_RELEASE_METADATA.otaManifestUrl\n}\n"]}
@@ -0,0 +1,12 @@
1
+ /** Generated by release CI. Do not edit in a release checkout. */
2
+ export interface BluetoothSdkReleaseMetadata {
3
+ schemaVersion: 1;
4
+ familyBaseVersion: string | null;
5
+ releaseIdentity: string | null;
6
+ releaseSetId: string | null;
7
+ sourceCommit: string | null;
8
+ otaManifestUrl: string | null;
9
+ otaManifestSha256: string | null;
10
+ }
11
+ export declare const BLUETOOTH_SDK_RELEASE_METADATA: Readonly<BluetoothSdkReleaseMetadata>;
12
+ //# sourceMappingURL=releaseMetadata.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"releaseMetadata.d.ts","sourceRoot":"","sources":["../../src/generated/releaseMetadata.ts"],"names":[],"mappings":"AAAA,kEAAkE;AAClE,MAAM,WAAW,2BAA2B;IAC1C,aAAa,EAAE,CAAC,CAAA;IAChB,iBAAiB,EAAE,MAAM,GAAG,IAAI,CAAA;IAChC,eAAe,EAAE,MAAM,GAAG,IAAI,CAAA;IAC9B,YAAY,EAAE,MAAM,GAAG,IAAI,CAAA;IAC3B,YAAY,EAAE,MAAM,GAAG,IAAI,CAAA;IAC3B,cAAc,EAAE,MAAM,GAAG,IAAI,CAAA;IAC7B,iBAAiB,EAAE,MAAM,GAAG,IAAI,CAAA;CACjC;AAED,eAAO,MAAM,8BAA8B,EAAE,QAAQ,CAAC,2BAA2B,CAQ/E,CAAA"}
@@ -0,0 +1,10 @@
1
+ export const BLUETOOTH_SDK_RELEASE_METADATA = Object.freeze({
2
+ "schemaVersion": 1,
3
+ "familyBaseVersion": "3.1.0",
4
+ "releaseIdentity": "3.1.0-dev.12",
5
+ "releaseSetId": "mentra-3.1.0-dev.12",
6
+ "sourceCommit": "cf8246598d7abb88f4b255ec333e4182d277eccc",
7
+ "otaManifestUrl": "https://github.com/Mentra-Community/MentraOS/releases/download/mentra-v3.1.0-dev.12/mentra-live-ota-3.1.0-dev.12.json",
8
+ "otaManifestSha256": "c15b20b4cad89af03e488bd12bcab0b5562a1bf07146569aefb67cadd1517052"
9
+ });
10
+ //# sourceMappingURL=releaseMetadata.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"releaseMetadata.js","sourceRoot":"","sources":["../../src/generated/releaseMetadata.ts"],"names":[],"mappings":"AAWA,MAAM,CAAC,MAAM,8BAA8B,GAA0C,MAAM,CAAC,MAAM,CAAC;IACjG,eAAe,EAAE,CAAC;IAClB,mBAAmB,EAAE,OAAO;IAC5B,iBAAiB,EAAE,cAAc;IACjC,cAAc,EAAE,qBAAqB;IACrC,cAAc,EAAE,0CAA0C;IAC1D,gBAAgB,EAAE,uHAAuH;IACzI,mBAAmB,EAAE,kEAAkE;CACxF,CAAC,CAAA","sourcesContent":["/** Generated by release CI. Do not edit in a release checkout. */\nexport interface BluetoothSdkReleaseMetadata {\n schemaVersion: 1\n familyBaseVersion: string | null\n releaseIdentity: string | null\n releaseSetId: string | null\n sourceCommit: string | null\n otaManifestUrl: string | null\n otaManifestSha256: string | null\n}\n\nexport const BLUETOOTH_SDK_RELEASE_METADATA: Readonly<BluetoothSdkReleaseMetadata> = Object.freeze({\n \"schemaVersion\": 1,\n \"familyBaseVersion\": \"3.1.0\",\n \"releaseIdentity\": \"3.1.0-dev.12\",\n \"releaseSetId\": \"mentra-3.1.0-dev.12\",\n \"sourceCommit\": \"cf8246598d7abb88f4b255ec333e4182d277eccc\",\n \"otaManifestUrl\": \"https://github.com/Mentra-Community/MentraOS/releases/download/mentra-v3.1.0-dev.12/mentra-live-ota-3.1.0-dev.12.json\",\n \"otaManifestSha256\": \"c15b20b4cad89af03e488bd12bcab0b5562a1bf07146569aefb67cadd1517052\"\n})\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 { AccelEvent, Ar99OtaStatusEvent, AudioConnectedEvent, AudioDisconnectedEvent, AudioPairingNeededEvent, BatteryStatusEvent, BluetoothSdkEvent, BluetoothSdkEventListener, BluetoothSdkEventMap, BluetoothSdkEventName, BluetoothSdkPublicModule as BluetoothSdkModule, BluetoothSdkSubscription, ButtonPhotoSize, PhotoCaptureDefaults, 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, PairFailureEvent, PhotoCaptureMetadata, PhotoResolvedConfig, PhotoCompression, PhotoFpsRange, PhotoMeteredPreview, PhotoMode, PhotoTransferMethod, PhotoResponseEvent, PhotoRequestedCaptureConfig, PhotoRequestParams, 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, VideoRecordingDefaults, VideoRecordingStartedStatusEvent, VideoRecordingStatusEvent, VideoRecordingStatusState, VideoRecordingStoppedStatusEvent, VideoRecordingSuccessStatusEvent, VersionInfoEvent, VersionInfoResult, WifiScanResultEvent, VoiceActivityDetectionStatusEvent, WifiSearchResult, WifiStatus, WifiStatusChangeEvent, } from "./BluetoothSdk.types";
5
+ export type { AccelEvent, Ar99OtaStatusEvent, AudioConnectedEvent, AudioDisconnectedEvent, AudioPairingNeededEvent, BatteryStatusEvent, BluetoothSdkEvent, BluetoothSdkEventListener, BluetoothSdkEventMap, BluetoothSdkEventName, BluetoothSdkPublicModule as BluetoothSdkModule, BluetoothSdkSubscription, ButtonPhotoSize, PhotoCaptureDefaults, ButtonPressEvent, CameraFovPreset, CameraFovRequest, CameraFovResult, CameraRoiPosition, CompatibleGlassesSearchStopEvent, ConnectOptions, ConnectedGlassesConnectionStatus, ConnectedWifiStatus, Device, DeviceModel, EnabledHotspotStatus, GalleryStatusEvent, GlassesConnectionStatus, GlassesMediaVolumeGetResult, GlassesMediaVolumeSetResult, GlassesNotReadyEvent, HeadUpEvent, HotspotErrorEvent, HotspotStatus, HotspotStatusChangeEvent, KeepAliveAckEvent, LocalTranscriptionEvent, LogEvent, MicLc3Event, MicHealthEvent, MicMode, MicPcmEvent, MicPreference, OtaStartAckEvent, OtaProgress, OtaProgressStatus, OtaStage, OtaStatus, OtaStatusEvent, OtaQueryResult, OtaUpdateInfo, PairFailureEvent, PairingInfoEvent, EnteringPairingModeEvent, OwnerReplacedEvent, PhotoCaptureMetadata, PhotoResolvedConfig, PhotoCompression, PhotoFpsRange, PhotoMeteredPreview, PhotoMode, PhotoTransferMethod, PhotoResponseEvent, PhotoRequestedCaptureConfig, PhotoRequestParams, 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, VideoRecordingDefaults, 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","sourceRo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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,sBAAsB,EACtB,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"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAGV,wBAAwB,EAEzB,MAAM,sBAAsB,CAAA;AAuE7B,eAAO,MAAM,YAAY,EAAE,wBAqFzB,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,kBAAkB,EAClB,mBAAmB,EACnB,sBAAsB,EACtB,uBAAuB,EACvB,kBAAkB,EAClB,iBAAiB,EACjB,yBAAyB,EACzB,oBAAoB,EACpB,qBAAqB,EACrB,wBAAwB,IAAI,kBAAkB,EAC9C,wBAAwB,EACxB,eAAe,EACf,oBAAoB,EACpB,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,iBAAiB,EACjB,uBAAuB,EACvB,QAAQ,EACR,WAAW,EACX,cAAc,EACd,OAAO,EACP,WAAW,EACX,aAAa,EACb,gBAAgB,EAChB,WAAW,EACX,iBAAiB,EACjB,QAAQ,EACR,SAAS,EACT,cAAc,EACd,cAAc,EACd,aAAa,EACb,gBAAgB,EAChB,gBAAgB,EAChB,wBAAwB,EACxB,kBAAkB,EAClB,oBAAoB,EACpB,mBAAmB,EACnB,gBAAgB,EAChB,aAAa,EACb,mBAAmB,EACnB,SAAS,EACT,mBAAmB,EACnB,kBAAkB,EAClB,2BAA2B,EAC3B,kBAAkB,EAClB,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,sBAAsB,EACtB,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
@@ -29,11 +29,15 @@ const PUBLIC_EVENT_NAMES = new Set([
29
29
  "rgb_led_control_response",
30
30
  "settings_ack",
31
31
  "pair_failure",
32
+ "pairing_info",
33
+ "entering_pairing_mode",
34
+ "owner_replaced",
32
35
  "audio_pairing_needed",
33
36
  "audio_connected",
34
37
  "audio_disconnected",
35
38
  "mic_pcm",
36
39
  "mic_lc3",
40
+ "mic_health",
37
41
  "stream_status",
38
42
  "ota_start_ack",
39
43
  "ota_status",
@@ -47,8 +51,8 @@ const addListener = (eventName, listener) => {
47
51
  }
48
52
  return PrivateBluetoothSdkModule.addListener(eventName, listener);
49
53
  };
50
- const startOtaUpdate = () => {
51
- return PrivateBluetoothSdkModule.startOtaUpdate();
54
+ const startOtaUpdate = (otaVersionUrl) => {
55
+ return PrivateBluetoothSdkModule.startOtaUpdate(otaVersionUrl);
52
56
  };
53
57
  const bindPublicMethod = (name) => {
54
58
  const method = PrivateBluetoothSdkModule[name];
@@ -83,6 +87,7 @@ export const BluetoothSdk = Object.freeze({
83
87
  sendWifiCredentials: bindPublicMethod("sendWifiCredentials"),
84
88
  forgetWifiNetwork: bindPublicMethod("forgetWifiNetwork"),
85
89
  setHotspotState: bindPublicMethod("setHotspotState"),
90
+ setWifiAdbState: bindPublicMethod("setWifiAdbState"),
86
91
  setGalleryModeEnabled: bindPublicMethod("setGalleryModeEnabled"),
87
92
  setVoiceActivityDetectionEnabled: bindPublicMethod("setVoiceActivityDetectionEnabled"),
88
93
  setLoudnessGateEnabled: bindPublicMethod("setLoudnessGateEnabled"),
@@ -111,6 +116,7 @@ export const BluetoothSdk = Object.freeze({
111
116
  stopCameraWarmUp: bindPublicMethod("stopCameraWarmUp"),
112
117
  startVideoRecording: bindPublicMethod("startVideoRecording"),
113
118
  stopVideoRecording: bindPublicMethod("stopVideoRecording"),
119
+ queryVideoRecordingStatus: bindPublicMethod("queryVideoRecordingStatus"),
114
120
  startStream: bindPublicMethod("startStream"),
115
121
  stopStream: bindPublicMethod("stopStream"),
116
122
  setMicState: bindPublicMethod("setMicState"),
@@ -120,6 +126,8 @@ export const BluetoothSdk = Object.freeze({
120
126
  setGlassesMediaVolume: bindPublicMethod("setGlassesMediaVolume"),
121
127
  rgbLedControl: bindPublicMethod("rgbLedControl"),
122
128
  requestVersionInfo: bindPublicMethod("requestVersionInfo"),
129
+ setOtaVersionUrl: bindPublicMethod("setOtaVersionUrl"),
130
+ getOtaVersionUrl: bindPublicMethod("getOtaVersionUrl"),
123
131
  checkForOtaUpdate: bindPublicMethod("checkForOtaUpdate"),
124
132
  startOtaUpdate,
125
133
  startAr99OtaFromFile: bindPublicMethod("startAr99OtaFromFile"),
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,yBAAyB,MAAM,+BAA+B,CAAA;AAQrE,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,eAAe;IACf,wBAAwB;IACxB,eAAe;IACf,aAAa;IACb,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,eAAe;IACf,YAAY;IACZ,iBAAiB;IACjB,cAAc;IACd,qBAAqB;CACtB,CAAC,CAAA;AAEF,MAAM,WAAW,GAA4C,CAAC,SAAS,EAAE,QAAQ,EAAE,EAAE;IACnF,IAAI,CAAC,kBAAkB,CAAC,GAAG,CAAC,SAAS,CAAC,EAAE,CAAC;QACvC,MAAM,IAAI,KAAK,CAAC,mCAAmC,SAAS,sDAAsD,CAAC,CAAA;IACrH,CAAC;IACD,OAAO,yBAAyB,CAAC,WAAW,CAAC,SAAS,EAAE,QAA4D,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gBAAgB,CAAC,eAAe,CAAC;IAChD,kBAAkB,EAAE,gBAAgB,CAAC,oBAAoB,CAAC;IAC1D,kBAAkB,EAAE,gBAAgB,CAAC,oBAAoB,CAAC;IAC1D,eAAe,EAAE,gBAAgB,CAAC,iBAAiB,CAAC;IACpD,mBAAmB,EAAE,gBAAgB,CAAC,qBAAqB,CAAC;IAC5D,sBAAsB,EAAE,gBAAgB,CAAC,wBAAwB,CAAC;IAClE,gBAAgB,EAAE,gBAAgB,CAAC,kBAAkB,CAAC;IACtD,gBAAgB,EAAE,gBAAgB,CAAC,kBAAkB,CAAC;CACvD,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 {\n BluetoothSdkEventListener,\n BluetoothSdkEventName,\n BluetoothSdkPublicModule,\n VideoRecordingDefaults,\n} 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 \"camera_status\",\n \"video_recording_status\",\n \"media_success\",\n \"media_error\",\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_start_ack\",\n \"ota_status\",\n \"ar99_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\nconst startOtaUpdate: BluetoothSdkPublicModule[\"startOtaUpdate\"] = () => {\n return PrivateBluetoothSdkModule.startOtaUpdate()\n}\n\nconst bindPublicMethod = <K extends keyof BluetoothSdkPublicModule>(name: K): BluetoothSdkPublicModule[K] => {\n const method = (PrivateBluetoothSdkModule as unknown as Record<string, unknown>)[name]\n if (typeof method === \"function\") {\n return method.bind(PrivateBluetoothSdkModule) as BluetoothSdkPublicModule[K]\n }\n\n return (async () => {\n throw new Error(`BluetoothSdk.${String(name)} is not available in this native build. Rebuild the app.`)\n }) as unknown as BluetoothSdkPublicModule[K]\n}\n\nexport const BluetoothSdk: BluetoothSdkPublicModule = Object.freeze({\n addListener,\n getDefaultDevice: bindPublicMethod(\"getDefaultDevice\"),\n setDefaultDevice: bindPublicMethod(\"setDefaultDevice\"),\n clearDefaultDevice: bindPublicMethod(\"clearDefaultDevice\"),\n startScan: bindPublicMethod(\"startScan\"),\n stopScan: bindPublicMethod(\"stopScan\"),\n scan: bindPublicMethod(\"scan\") as BluetoothSdkPublicModule[\"scan\"],\n connect: bindPublicMethod(\"connect\"),\n connectDefault: bindPublicMethod(\"connectDefault\"),\n cancelConnectionAttempt: bindPublicMethod(\"cancelConnectionAttempt\"),\n disconnect: bindPublicMethod(\"disconnect\"),\n forget: bindPublicMethod(\"forget\"),\n displayText: bindPublicMethod(\"displayText\"),\n clearDisplay: bindPublicMethod(\"clearDisplay\"),\n showDashboard: bindPublicMethod(\"showDashboard\"),\n setDashboardPosition: bindPublicMethod(\"setDashboardPosition\"),\n setHeadUpAngle: bindPublicMethod(\"setHeadUpAngle\"),\n setImuEnabled: bindPublicMethod(\"setImuEnabled\"),\n setScreenDisabled: bindPublicMethod(\"setScreenDisabled\"),\n requestWifiScan: bindPublicMethod(\"requestWifiScan\"),\n sendWifiCredentials: bindPublicMethod(\"sendWifiCredentials\"),\n forgetWifiNetwork: bindPublicMethod(\"forgetWifiNetwork\"),\n setHotspotState: bindPublicMethod(\"setHotspotState\"),\n setGalleryModeEnabled: bindPublicMethod(\"setGalleryModeEnabled\"),\n setVoiceActivityDetectionEnabled: bindPublicMethod(\"setVoiceActivityDetectionEnabled\"),\n setLoudnessGateEnabled: bindPublicMethod(\"setLoudnessGateEnabled\"),\n /**\n * @deprecated Sticky action-button photo presets are deprecated. Prefer per-request\n * `requestPhoto(...)` options (e.g. `mode: \"text\"` for text sensor size/crop, or explicit per-shot\n * fields). Still functional until removed in a future release.\n */\n setPhotoCaptureDefaults: bindPublicMethod(\"setPhotoCaptureDefaults\"),\n setVideoRecordingDefaults: ({width, height, fps}: VideoRecordingDefaults) => {\n const method = (PrivateBluetoothSdkModule as unknown as Record<string, unknown>).setVideoRecordingDefaults\n if (typeof method !== \"function\") {\n return Promise.reject(\n new Error(\"BluetoothSdk.setVideoRecordingDefaults is not available in this native build. Rebuild the app.\"),\n )\n }\n return PrivateBluetoothSdkModule.setVideoRecordingDefaults(width, height, fps)\n },\n setMaxVideoRecordingDuration: bindPublicMethod(\"setMaxVideoRecordingDuration\"),\n setCameraFov: bindPublicMethod(\"setCameraFov\"),\n setLegacyCameraFov: bindPublicMethod(\"setLegacyCameraFov\"),\n setCameraFovOverride: bindPublicMethod(\"setCameraFovOverride\"),\n releaseCameraFovOverride: bindPublicMethod(\"releaseCameraFovOverride\"),\n setCameraTuningConfig: bindPublicMethod(\"setCameraTuningConfig\"),\n queryGalleryStatus: bindPublicMethod(\"queryGalleryStatus\"),\n requestPhoto: bindPublicMethod(\"requestPhoto\"),\n warmUpCamera: bindPublicMethod(\"warmUpCamera\"),\n stopCameraWarmUp: bindPublicMethod(\"stopCameraWarmUp\"),\n startVideoRecording: bindPublicMethod(\"startVideoRecording\"),\n stopVideoRecording: bindPublicMethod(\"stopVideoRecording\"),\n startStream: bindPublicMethod(\"startStream\"),\n stopStream: bindPublicMethod(\"stopStream\"),\n setMicState: bindPublicMethod(\"setMicState\"),\n setPreferredMic: bindPublicMethod(\"setPreferredMic\"),\n setOwnAppAudioPlaying: bindPublicMethod(\"setOwnAppAudioPlaying\"),\n getGlassesMediaVolume: bindPublicMethod(\"getGlassesMediaVolume\"),\n setGlassesMediaVolume: bindPublicMethod(\"setGlassesMediaVolume\"),\n rgbLedControl: bindPublicMethod(\"rgbLedControl\"),\n requestVersionInfo: bindPublicMethod(\"requestVersionInfo\"),\n checkForOtaUpdate: bindPublicMethod(\"checkForOtaUpdate\"),\n startOtaUpdate,\n startAr99OtaFromFile: bindPublicMethod(\"startAr99OtaFromFile\"),\n cancelAr99Ota: bindPublicMethod(\"cancelAr99Ota\"),\n sendAr99FactoryReset: bindPublicMethod(\"sendAr99FactoryReset\"),\n buildAr99OtaSignature: bindPublicMethod(\"buildAr99OtaSignature\"),\n setSttModelDetails: bindPublicMethod(\"setSttModelDetails\"),\n getSttModelPath: bindPublicMethod(\"getSttModelPath\"),\n checkSttModelAvailable: bindPublicMethod(\"checkSttModelAvailable\"),\n validateSttModel: bindPublicMethod(\"validateSttModel\"),\n extractTarBz2: bindPublicMethod(\"extractTarBz2\"),\n restartTranscriber: bindPublicMethod(\"restartTranscriber\"),\n setTtsModelDetails: bindPublicMethod(\"setTtsModelDetails\"),\n getTtsModelPath: bindPublicMethod(\"getTtsModelPath\"),\n getTtsModelLanguage: bindPublicMethod(\"getTtsModelLanguage\"),\n checkTtsModelAvailable: bindPublicMethod(\"checkTtsModelAvailable\"),\n validateTtsModel: bindPublicMethod(\"validateTtsModel\"),\n generateTtsAudio: bindPublicMethod(\"generateTtsAudio\"),\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 Ar99OtaStatusEvent,\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 PhotoCaptureDefaults,\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 PairFailureEvent,\n PhotoCaptureMetadata,\n PhotoResolvedConfig,\n PhotoCompression,\n PhotoFpsRange,\n PhotoMeteredPreview,\n PhotoMode,\n PhotoTransferMethod,\n PhotoResponseEvent,\n PhotoRequestedCaptureConfig,\n PhotoRequestParams,\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 VideoRecordingDefaults,\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;AAQrE,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,eAAe;IACf,wBAAwB;IACxB,eAAe;IACf,aAAa;IACb,gBAAgB;IAChB,gCAAgC;IAChC,qBAAqB;IACrB,eAAe;IACf,0BAA0B;IAC1B,cAAc;IACd,cAAc;IACd,cAAc;IACd,uBAAuB;IACvB,gBAAgB;IAChB,sBAAsB;IACtB,iBAAiB;IACjB,oBAAoB;IACpB,SAAS;IACT,SAAS;IACT,YA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n BluetoothSdkEventName,\n BluetoothSdkPublicModule,\n VideoRecordingDefaults,\n} 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 \"camera_status\",\n \"video_recording_status\",\n \"media_success\",\n \"media_error\",\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 \"pairing_info\",\n \"entering_pairing_mode\",\n \"owner_replaced\",\n \"audio_pairing_needed\",\n \"audio_connected\",\n \"audio_disconnected\",\n \"mic_pcm\",\n \"mic_lc3\",\n \"mic_health\",\n \"stream_status\",\n \"ota_start_ack\",\n \"ota_status\",\n \"ar99_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\nconst startOtaUpdate: BluetoothSdkPublicModule[\"startOtaUpdate\"] = (otaVersionUrl) => {\n return PrivateBluetoothSdkModule.startOtaUpdate(otaVersionUrl)\n}\n\nconst bindPublicMethod = <K extends keyof BluetoothSdkPublicModule>(name: K): BluetoothSdkPublicModule[K] => {\n const method = (PrivateBluetoothSdkModule as unknown as Record<string, unknown>)[name]\n if (typeof method === \"function\") {\n return method.bind(PrivateBluetoothSdkModule) as BluetoothSdkPublicModule[K]\n }\n\n return (async () => {\n throw new Error(`BluetoothSdk.${String(name)} is not available in this native build. Rebuild the app.`)\n }) as unknown as BluetoothSdkPublicModule[K]\n}\n\nexport const BluetoothSdk: BluetoothSdkPublicModule = Object.freeze({\n addListener,\n getDefaultDevice: bindPublicMethod(\"getDefaultDevice\"),\n setDefaultDevice: bindPublicMethod(\"setDefaultDevice\"),\n clearDefaultDevice: bindPublicMethod(\"clearDefaultDevice\"),\n startScan: bindPublicMethod(\"startScan\"),\n stopScan: bindPublicMethod(\"stopScan\"),\n scan: bindPublicMethod(\"scan\") as BluetoothSdkPublicModule[\"scan\"],\n connect: bindPublicMethod(\"connect\"),\n connectDefault: bindPublicMethod(\"connectDefault\"),\n cancelConnectionAttempt: bindPublicMethod(\"cancelConnectionAttempt\"),\n disconnect: bindPublicMethod(\"disconnect\"),\n forget: bindPublicMethod(\"forget\"),\n displayText: bindPublicMethod(\"displayText\"),\n clearDisplay: bindPublicMethod(\"clearDisplay\"),\n showDashboard: bindPublicMethod(\"showDashboard\"),\n setDashboardPosition: bindPublicMethod(\"setDashboardPosition\"),\n setHeadUpAngle: bindPublicMethod(\"setHeadUpAngle\"),\n setImuEnabled: bindPublicMethod(\"setImuEnabled\"),\n setScreenDisabled: bindPublicMethod(\"setScreenDisabled\"),\n requestWifiScan: bindPublicMethod(\"requestWifiScan\"),\n sendWifiCredentials: bindPublicMethod(\"sendWifiCredentials\"),\n forgetWifiNetwork: bindPublicMethod(\"forgetWifiNetwork\"),\n setHotspotState: bindPublicMethod(\"setHotspotState\"),\n setWifiAdbState: bindPublicMethod(\"setWifiAdbState\"),\n setGalleryModeEnabled: bindPublicMethod(\"setGalleryModeEnabled\"),\n setVoiceActivityDetectionEnabled: bindPublicMethod(\"setVoiceActivityDetectionEnabled\"),\n setLoudnessGateEnabled: bindPublicMethod(\"setLoudnessGateEnabled\"),\n /**\n * @deprecated Sticky action-button photo presets are deprecated. Prefer per-request\n * `requestPhoto(...)` options (e.g. `mode: \"text\"` for text sensor size/crop, or explicit per-shot\n * fields). Still functional until removed in a future release.\n */\n setPhotoCaptureDefaults: bindPublicMethod(\"setPhotoCaptureDefaults\"),\n setVideoRecordingDefaults: ({width, height, fps}: VideoRecordingDefaults) => {\n const method = (PrivateBluetoothSdkModule as unknown as Record<string, unknown>).setVideoRecordingDefaults\n if (typeof method !== \"function\") {\n return Promise.reject(\n new Error(\"BluetoothSdk.setVideoRecordingDefaults is not available in this native build. Rebuild the app.\"),\n )\n }\n return PrivateBluetoothSdkModule.setVideoRecordingDefaults(width, height, fps)\n },\n setMaxVideoRecordingDuration: bindPublicMethod(\"setMaxVideoRecordingDuration\"),\n setCameraFov: bindPublicMethod(\"setCameraFov\"),\n setLegacyCameraFov: bindPublicMethod(\"setLegacyCameraFov\"),\n setCameraFovOverride: bindPublicMethod(\"setCameraFovOverride\"),\n releaseCameraFovOverride: bindPublicMethod(\"releaseCameraFovOverride\"),\n setCameraTuningConfig: bindPublicMethod(\"setCameraTuningConfig\"),\n queryGalleryStatus: bindPublicMethod(\"queryGalleryStatus\"),\n requestPhoto: bindPublicMethod(\"requestPhoto\"),\n warmUpCamera: bindPublicMethod(\"warmUpCamera\"),\n stopCameraWarmUp: bindPublicMethod(\"stopCameraWarmUp\"),\n startVideoRecording: bindPublicMethod(\"startVideoRecording\"),\n stopVideoRecording: bindPublicMethod(\"stopVideoRecording\"),\n queryVideoRecordingStatus: bindPublicMethod(\"queryVideoRecordingStatus\"),\n startStream: bindPublicMethod(\"startStream\"),\n stopStream: bindPublicMethod(\"stopStream\"),\n setMicState: bindPublicMethod(\"setMicState\"),\n setPreferredMic: bindPublicMethod(\"setPreferredMic\"),\n setOwnAppAudioPlaying: bindPublicMethod(\"setOwnAppAudioPlaying\"),\n getGlassesMediaVolume: bindPublicMethod(\"getGlassesMediaVolume\"),\n setGlassesMediaVolume: bindPublicMethod(\"setGlassesMediaVolume\"),\n rgbLedControl: bindPublicMethod(\"rgbLedControl\"),\n requestVersionInfo: bindPublicMethod(\"requestVersionInfo\"),\n setOtaVersionUrl: bindPublicMethod(\"setOtaVersionUrl\"),\n getOtaVersionUrl: bindPublicMethod(\"getOtaVersionUrl\"),\n checkForOtaUpdate: bindPublicMethod(\"checkForOtaUpdate\"),\n startOtaUpdate,\n startAr99OtaFromFile: bindPublicMethod(\"startAr99OtaFromFile\"),\n cancelAr99Ota: bindPublicMethod(\"cancelAr99Ota\"),\n sendAr99FactoryReset: bindPublicMethod(\"sendAr99FactoryReset\"),\n buildAr99OtaSignature: bindPublicMethod(\"buildAr99OtaSignature\"),\n setSttModelDetails: bindPublicMethod(\"setSttModelDetails\"),\n getSttModelPath: bindPublicMethod(\"getSttModelPath\"),\n checkSttModelAvailable: bindPublicMethod(\"checkSttModelAvailable\"),\n validateSttModel: bindPublicMethod(\"validateSttModel\"),\n extractTarBz2: bindPublicMethod(\"extractTarBz2\"),\n restartTranscriber: bindPublicMethod(\"restartTranscriber\"),\n setTtsModelDetails: bindPublicMethod(\"setTtsModelDetails\"),\n getTtsModelPath: bindPublicMethod(\"getTtsModelPath\"),\n getTtsModelLanguage: bindPublicMethod(\"getTtsModelLanguage\"),\n checkTtsModelAvailable: bindPublicMethod(\"checkTtsModelAvailable\"),\n validateTtsModel: bindPublicMethod(\"validateTtsModel\"),\n generateTtsAudio: bindPublicMethod(\"generateTtsAudio\"),\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 Ar99OtaStatusEvent,\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 PhotoCaptureDefaults,\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 KeepAliveAckEvent,\n LocalTranscriptionEvent,\n LogEvent,\n MicLc3Event,\n MicHealthEvent,\n MicMode,\n MicPcmEvent,\n MicPreference,\n OtaStartAckEvent,\n OtaProgress,\n OtaProgressStatus,\n OtaStage,\n OtaStatus,\n OtaStatusEvent,\n OtaQueryResult,\n OtaUpdateInfo,\n PairFailureEvent,\n PairingInfoEvent,\n EnteringPairingModeEvent,\n OwnerReplacedEvent,\n PhotoCaptureMetadata,\n PhotoResolvedConfig,\n PhotoCompression,\n PhotoFpsRange,\n PhotoMeteredPreview,\n PhotoMode,\n PhotoTransferMethod,\n PhotoResponseEvent,\n PhotoRequestedCaptureConfig,\n PhotoRequestParams,\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 VideoRecordingDefaults,\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"]}
@@ -0,0 +1,14 @@
1
+ export type OtaServerResult = {
2
+ baseUrl: string;
3
+ host: string;
4
+ manifestUrl: string;
5
+ port: number;
6
+ };
7
+ export type MentraOtaServerModuleEvents = {
8
+ artifactDownloadProgress: (event: {
9
+ destination: string;
10
+ bytesWritten: number;
11
+ contentLength: number;
12
+ }) => void;
13
+ };
14
+ //# sourceMappingURL=MentraOtaServer.types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"MentraOtaServer.types.d.ts","sourceRoot":"","sources":["../../src/ota-server/MentraOtaServer.types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,eAAe,GAAG;IAC5B,OAAO,EAAE,MAAM,CAAA;IACf,IAAI,EAAE,MAAM,CAAA;IACZ,WAAW,EAAE,MAAM,CAAA;IACnB,IAAI,EAAE,MAAM,CAAA;CACb,CAAA;AAED,MAAM,MAAM,2BAA2B,GAAG;IACxC,wBAAwB,EAAE,CAAC,KAAK,EAAE;QAAC,WAAW,EAAE,MAAM,CAAC;QAAC,YAAY,EAAE,MAAM,CAAC;QAAC,aAAa,EAAE,MAAM,CAAA;KAAC,KAAK,IAAI,CAAA;CAC9G,CAAA"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=MentraOtaServer.types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"MentraOtaServer.types.js","sourceRoot":"","sources":["../../src/ota-server/MentraOtaServer.types.ts"],"names":[],"mappings":"","sourcesContent":["export type OtaServerResult = {\n baseUrl: string\n host: string\n manifestUrl: string\n port: number\n}\n\nexport type MentraOtaServerModuleEvents = {\n artifactDownloadProgress: (event: {destination: string; bytesWritten: number; contentLength: number}) => void\n}\n"]}
@@ -0,0 +1,21 @@
1
+ import { NativeModule } from "expo";
2
+ import type { MentraOtaServerModuleEvents, OtaServerResult } from "./MentraOtaServer.types";
3
+ declare class MentraOtaServerModule extends NativeModule<MentraOtaServerModuleEvents> {
4
+ /**
5
+ * Serve `manifestJson` at /version.json and `artifactPaths` (sha256 -> local file path)
6
+ * at /artifacts/<sha256>. Pass `host` when the caller knows the authoritative local
7
+ * address (e.g. from the scoped hotspot network); omit to fall back to interface
8
+ * scanning. Returns the URLs to hand to the glasses via ota_start.
9
+ */
10
+ startOtaServer(manifestJson: string, artifactPaths: Record<string, string>, host?: string | null): Promise<OtaServerResult>;
11
+ stopOtaServer(): Promise<void>;
12
+ /** Wait for iPhone Wi-Fi (`en0`) to acquire an address on the glasses gateway subnet. */
13
+ waitForWifiAddress(gateway: string, timeoutMs: number): Promise<string>;
14
+ downloadArtifact(source: string, destination: string): Promise<{
15
+ statusCode: number;
16
+ bytesWritten: number;
17
+ }>;
18
+ }
19
+ declare const _default: MentraOtaServerModule;
20
+ export default _default;
21
+ //# sourceMappingURL=MentraOtaServerModule.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"MentraOtaServerModule.d.ts","sourceRoot":"","sources":["../../src/ota-server/MentraOtaServerModule.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,YAAY,EAAsB,MAAM,MAAM,CAAA;AAEtD,OAAO,KAAK,EAAC,2BAA2B,EAAE,eAAe,EAAC,MAAM,yBAAyB,CAAA;AAEzF,OAAO,OAAO,qBAAsB,SAAQ,YAAY,CAAC,2BAA2B,CAAC;IACnF;;;;;OAKG;IACH,cAAc,CACZ,YAAY,EAAE,MAAM,EACpB,aAAa,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,EACrC,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,GACnB,OAAO,CAAC,eAAe,CAAC;IAC3B,aAAa,IAAI,OAAO,CAAC,IAAI,CAAC;IAC9B,yFAAyF;IACzF,kBAAkB,CAAC,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;IACvE,gBAAgB,CAAC,MAAM,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC;QAAC,UAAU,EAAE,MAAM,CAAC;QAAC,YAAY,EAAE,MAAM,CAAA;KAAC,CAAC;CAC3G;;AAED,wBAA4E"}
@@ -0,0 +1,3 @@
1
+ import { requireNativeModule } from "expo";
2
+ export default requireNativeModule("MentraOtaServer");
3
+ //# sourceMappingURL=MentraOtaServerModule.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"MentraOtaServerModule.js","sourceRoot":"","sources":["../../src/ota-server/MentraOtaServerModule.ts"],"names":[],"mappings":"AAAA,OAAO,EAAe,mBAAmB,EAAC,MAAM,MAAM,CAAA;AAsBtD,eAAe,mBAAmB,CAAwB,iBAAiB,CAAC,CAAA","sourcesContent":["import {NativeModule, requireNativeModule} from \"expo\"\n\nimport type {MentraOtaServerModuleEvents, OtaServerResult} from \"./MentraOtaServer.types\"\n\ndeclare class MentraOtaServerModule extends NativeModule<MentraOtaServerModuleEvents> {\n /**\n * Serve `manifestJson` at /version.json and `artifactPaths` (sha256 -> local file path)\n * at /artifacts/<sha256>. Pass `host` when the caller knows the authoritative local\n * address (e.g. from the scoped hotspot network); omit to fall back to interface\n * scanning. Returns the URLs to hand to the glasses via ota_start.\n */\n startOtaServer(\n manifestJson: string,\n artifactPaths: Record<string, string>,\n host?: string | null,\n ): Promise<OtaServerResult>\n stopOtaServer(): Promise<void>\n /** Wait for iPhone Wi-Fi (`en0`) to acquire an address on the glasses gateway subnet. */\n waitForWifiAddress(gateway: string, timeoutMs: number): Promise<string>\n downloadArtifact(source: string, destination: string): Promise<{statusCode: number; bytesWritten: number}>\n}\n\nexport default requireNativeModule<MentraOtaServerModule>(\"MentraOtaServer\")\n"]}
@@ -0,0 +1,10 @@
1
+ import { NativeModule } from "expo";
2
+ import type { MentraOtaServerModuleEvents, OtaServerResult } from "./MentraOtaServer.types";
3
+ declare class MentraOtaServerModule extends NativeModule<MentraOtaServerModuleEvents> {
4
+ startOtaServer(): Promise<OtaServerResult>;
5
+ stopOtaServer(): Promise<void>;
6
+ waitForWifiAddress(): Promise<string>;
7
+ }
8
+ declare const _default: typeof MentraOtaServerModule;
9
+ export default _default;
10
+ //# sourceMappingURL=MentraOtaServerModule.web.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"MentraOtaServerModule.web.d.ts","sourceRoot":"","sources":["../../src/ota-server/MentraOtaServerModule.web.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,YAAY,EAAoB,MAAM,MAAM,CAAA;AAEpD,OAAO,KAAK,EAAC,2BAA2B,EAAE,eAAe,EAAC,MAAM,yBAAyB,CAAA;AAEzF,cAAM,qBAAsB,SAAQ,YAAY,CAAC,2BAA2B,CAAC;IACrE,cAAc,IAAI,OAAO,CAAC,eAAe,CAAC;IAI1C,aAAa,IAAI,OAAO,CAAC,IAAI,CAAC;IAE9B,kBAAkB,IAAI,OAAO,CAAC,MAAM,CAAC;CAG5C;;AAED,wBAA0E"}
@@ -0,0 +1,12 @@
1
+ import { NativeModule, registerWebModule } from "expo";
2
+ class MentraOtaServerModule extends NativeModule {
3
+ async startOtaServer() {
4
+ throw new Error("The OTA server is only available in native apps.");
5
+ }
6
+ async stopOtaServer() { }
7
+ async waitForWifiAddress() {
8
+ throw new Error("The OTA server is only available in native apps.");
9
+ }
10
+ }
11
+ export default registerWebModule(MentraOtaServerModule, "MentraOtaServer");
12
+ //# sourceMappingURL=MentraOtaServerModule.web.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"MentraOtaServerModule.web.js","sourceRoot":"","sources":["../../src/ota-server/MentraOtaServerModule.web.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,YAAY,EAAE,iBAAiB,EAAC,MAAM,MAAM,CAAA;AAIpD,MAAM,qBAAsB,SAAQ,YAAyC;IAC3E,KAAK,CAAC,cAAc;QAClB,MAAM,IAAI,KAAK,CAAC,kDAAkD,CAAC,CAAA;IACrE,CAAC;IAED,KAAK,CAAC,aAAa,KAAmB,CAAC;IAEvC,KAAK,CAAC,kBAAkB;QACtB,MAAM,IAAI,KAAK,CAAC,kDAAkD,CAAC,CAAA;IACrE,CAAC;CACF;AAED,eAAe,iBAAiB,CAAC,qBAAqB,EAAE,iBAAiB,CAAC,CAAA","sourcesContent":["import {NativeModule, registerWebModule} from \"expo\"\n\nimport type {MentraOtaServerModuleEvents, OtaServerResult} from \"./MentraOtaServer.types\"\n\nclass MentraOtaServerModule extends NativeModule<MentraOtaServerModuleEvents> {\n async startOtaServer(): Promise<OtaServerResult> {\n throw new Error(\"The OTA server is only available in native apps.\")\n }\n\n async stopOtaServer(): Promise<void> {}\n\n async waitForWifiAddress(): Promise<string> {\n throw new Error(\"The OTA server is only available in native apps.\")\n }\n}\n\nexport default registerWebModule(MentraOtaServerModule, \"MentraOtaServer\")\n"]}
@@ -0,0 +1,3 @@
1
+ export { default } from "./MentraOtaServerModule";
2
+ export * from "./MentraOtaServer.types";
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/ota-server/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,OAAO,EAAC,MAAM,yBAAyB,CAAA;AAC/C,cAAc,yBAAyB,CAAA"}