@mentra/engine 3.4.0-dev.1182 → 3.4.0-dev.1184
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/generated/releaseMetadata.js +5 -5
- package/build/generated/releaseMetadata.js.map +1 -1
- package/build/services/DeviceEventRouter.js +2 -2
- package/build/services/DeviceEventRouter.js.map +1 -1
- package/build/services/LocalMiniappRuntime.d.ts +55 -5
- package/build/services/LocalMiniappRuntime.d.ts.map +1 -1
- package/build/services/LocalMiniappRuntime.js +293 -171
- package/build/services/LocalMiniappRuntime.js.map +1 -1
- package/build/services/LocalSttFallbackCoordinator.d.ts +10 -32
- package/build/services/LocalSttFallbackCoordinator.d.ts.map +1 -1
- package/build/services/LocalSttFallbackCoordinator.js +16 -58
- package/build/services/LocalSttFallbackCoordinator.js.map +1 -1
- package/build/services/TranscriptionRouting.d.ts +112 -9
- package/build/services/TranscriptionRouting.d.ts.map +1 -1
- package/build/services/TranscriptionRouting.js +159 -21
- package/build/services/TranscriptionRouting.js.map +1 -1
- package/build/services/TranscriptionSubscriptions.d.ts +87 -6
- package/build/services/TranscriptionSubscriptions.d.ts.map +1 -1
- package/build/services/TranscriptionSubscriptions.js +174 -26
- package/build/services/TranscriptionSubscriptions.js.map +1 -1
- package/build/stores/settings.d.ts.map +1 -1
- package/build/stores/settings.js +3 -17
- package/build/stores/settings.js.map +1 -1
- package/package.json +8 -8
- package/src/generated/releaseMetadata.ts +5 -5
- package/src/services/DeviceEventRouter.ts +2 -2
- package/src/services/LocalMiniappRuntime.ts +325 -213
- package/src/services/LocalSttFallbackCoordinator.ts +15 -62
- package/src/services/TranscriptionRouting.ts +200 -30
- package/src/services/TranscriptionSubscriptions.ts +245 -25
- package/src/stores/settings.ts +3 -17
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
export const ENGINE_RELEASE_METADATA = Object.freeze({
|
|
2
2
|
"schemaVersion": 1,
|
|
3
3
|
"familyBaseVersion": "3.4.0",
|
|
4
|
-
"releaseIdentity": "3.4.0-dev.
|
|
5
|
-
"releaseSetId": "mentra-3.4.0-dev.
|
|
6
|
-
"sourceCommit": "
|
|
7
|
-
"otaManifestUrl": "https://artifactscdn.mentraglass.com/Mentra-Community/MentraOS/releases/mentra-builds-v3.4.0/mentra-live-ota-3.4.0-dev.
|
|
8
|
-
"otaManifestSha256": "
|
|
4
|
+
"releaseIdentity": "3.4.0-dev.1184",
|
|
5
|
+
"releaseSetId": "mentra-3.4.0-dev.1184",
|
|
6
|
+
"sourceCommit": "77453ea1030dec1ccbee258bee9eb2918661f7f0",
|
|
7
|
+
"otaManifestUrl": "https://artifactscdn.mentraglass.com/Mentra-Community/MentraOS/releases/mentra-builds-v3.4.0/mentra-live-ota-3.4.0-dev.1184.json",
|
|
8
|
+
"otaManifestSha256": "dd763f60c33a76a0ac1b9452ee97dd6e7b2244a82a953c357de73d63d16dda19"
|
|
9
9
|
});
|
|
10
10
|
//# sourceMappingURL=releaseMetadata.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"releaseMetadata.js","sourceRoot":"","sources":["../../src/generated/releaseMetadata.ts"],"names":[],"mappings":"AAWA,MAAM,CAAC,MAAM,uBAAuB,GAAoC,MAAM,CAAC,MAAM,CAAC;IACpF,eAAe,EAAE,CAAC;IAClB,mBAAmB,EAAE,OAAO;IAC5B,iBAAiB,EAAE,gBAAgB;IACnC,cAAc,EAAE,uBAAuB;IACvC,cAAc,EAAE,0CAA0C;IAC1D,gBAAgB,EAAE,kIAAkI;IACpJ,mBAAmB,EAAE,kEAAkE;CACxF,CAAC,CAAA","sourcesContent":["/** Generated by release CI. Do not edit in a release checkout. */\nexport interface EngineReleaseMetadata {\n schemaVersion: 1\n familyBaseVersion: string | null\n releaseIdentity: string | null\n releaseSetId: string | null\n sourceCommit: string | null\n otaManifestUrl: string | null\n otaManifestSha256: string | null\n}\n\nexport const ENGINE_RELEASE_METADATA: Readonly<EngineReleaseMetadata> = Object.freeze({\n \"schemaVersion\": 1,\n \"familyBaseVersion\": \"3.4.0\",\n \"releaseIdentity\": \"3.4.0-dev.
|
|
1
|
+
{"version":3,"file":"releaseMetadata.js","sourceRoot":"","sources":["../../src/generated/releaseMetadata.ts"],"names":[],"mappings":"AAWA,MAAM,CAAC,MAAM,uBAAuB,GAAoC,MAAM,CAAC,MAAM,CAAC;IACpF,eAAe,EAAE,CAAC;IAClB,mBAAmB,EAAE,OAAO;IAC5B,iBAAiB,EAAE,gBAAgB;IACnC,cAAc,EAAE,uBAAuB;IACvC,cAAc,EAAE,0CAA0C;IAC1D,gBAAgB,EAAE,kIAAkI;IACpJ,mBAAmB,EAAE,kEAAkE;CACxF,CAAC,CAAA","sourcesContent":["/** Generated by release CI. Do not edit in a release checkout. */\nexport interface EngineReleaseMetadata {\n schemaVersion: 1\n familyBaseVersion: string | null\n releaseIdentity: string | null\n releaseSetId: string | null\n sourceCommit: string | null\n otaManifestUrl: string | null\n otaManifestSha256: string | null\n}\n\nexport const ENGINE_RELEASE_METADATA: Readonly<EngineReleaseMetadata> = Object.freeze({\n \"schemaVersion\": 1,\n \"familyBaseVersion\": \"3.4.0\",\n \"releaseIdentity\": \"3.4.0-dev.1184\",\n \"releaseSetId\": \"mentra-3.4.0-dev.1184\",\n \"sourceCommit\": \"77453ea1030dec1ccbee258bee9eb2918661f7f0\",\n \"otaManifestUrl\": \"https://artifactscdn.mentraglass.com/Mentra-Community/MentraOS/releases/mentra-builds-v3.4.0/mentra-live-ota-3.4.0-dev.1184.json\",\n \"otaManifestSha256\": \"dd763f60c33a76a0ac1b9452ee97dd6e7b2244a82a953c357de73d63d16dda19\"\n})\n"]}
|
|
@@ -193,8 +193,8 @@ export function startDeviceEventRouter() {
|
|
|
193
193
|
});
|
|
194
194
|
}));
|
|
195
195
|
// On-device STT transcripts → local miniapps only while the local engine is
|
|
196
|
-
// active (
|
|
197
|
-
//
|
|
196
|
+
// active (a localOnly or preferLocal listener, or the cloud fallback). The
|
|
197
|
+
// runtime routes each listener to one source, so nothing arrives twice.
|
|
198
198
|
// forwardEvent is subscriber-gated — a no-op when no miniapp listens.
|
|
199
199
|
// (Was MantleManager.handle_local_transcription; its offline-captions display branch
|
|
200
200
|
// went away with the pseudo captions renderer.)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DeviceEventRouter.js","sourceRoot":"","sources":["../../src/services/DeviceEventRouter.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AACH,OAAO,YAAY,MAAM,gCAAgC,CAAA;AACzD,OAAO,EAAC,OAAO,EAAC,MAAM,iBAAiB,CAAA;AAEvC,OAAO,oBAAoB,MAAM,wBAAwB,CAAA;AACzD,OAAO,EAAC,eAAe,EAAC,MAAM,mBAAmB,CAAA;AACjD,OAAO,mBAAmB,MAAM,uBAAuB,CAAA;AACvD,OAAO,2BAA2B,MAAM,+BAA+B,CAAA;AACvE,OAAO,EAAC,qBAAqB,EAAC,MAAM,yBAAyB,CAAA;AAC7D,OAAO,EAAC,sBAAsB,EAAC,MAAM,0BAA0B,CAAA;AAC/D,OAAO,EAAC,kBAAkB,EAAC,MAAM,oBAAoB,CAAA;AACrD,OAAO,EAAC,eAAe,EAAC,MAAM,mBAAmB,CAAA;AACjD,OAAO,EAAC,gBAAgB,EAAC,MAAM,oBAAoB,CAAA;AACnD,OAAO,EAAC,iBAAiB,EAAC,MAAM,gBAAgB,CAAA;AAChD,OAAO,EAAC,iCAAiC,EAAC,MAAM,mBAAmB,CAAA;AACnE,OAAO,kBAAkB,MAAM,6BAA6B,CAAA;AAC5D,OAAO,EAAC,YAAY,EAAC,MAAM,oBAAoB,CAAA;AAE/C,IAAI,IAAI,GAAgC,EAAE,CAAA;AAE1C,MAAM,UAAU,sBAAsB;IACpC,IAAI,IAAI,CAAC,MAAM;QAAE,OAAM;IAEvB,uCAAuC;IAEvC,0CAA0C;IAC1C,IAAI,CAAC,IAAI,CACP,YAAY,CAAC,WAAW,CAAC,oBAAoB,EAAE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qB;IACnC,KAAK,MAAM,GAAG,IAAI,IAAI;QAAE,GAAG,CAAC,MAAM,EAAE,CAAA;IACpC,IAAI,GAAG,EAAE,CAAA;AACX,CAAC","sourcesContent":["/**\n * Device-event router — engine-owned. Subscribes to the inbound native BLE/device\n * events and routes them into the engine runtime: device stores, the process event\n * bus, the photo/stream coordinators, and local miniapps (via forwardEvent).\n *\n * Why this exists: engine owns the stores, coordinators, miniapp runtime, and facades,\n * but it never *subscribed to the device* for most events — the host MantleManager was\n * still the event router the whole runtime secretly depended on. So a bare OEM that\n * imported engine + called engine.start() got a connected runtime with almost no device\n * data flowing in (no miniapp input, dead gallery sync, starved coordinators). This\n * service moves those inbound bridges into engine so ANY host gets them.\n *\n * Scope: the engine legs only. The Cloud V1 relays that used to live beside them in\n * MantleManager (touch→cloud, the cloud-SDK stream/photo legs, etc.) were deleted with\n * Cloud V1 app end-of-life.\n *\n * Started by `engine.start()`. Idempotent.\n */\nimport BluetoothSdk from \"@mentra/bluetooth-sdk/internal\"\nimport {shallow} from \"zustand/shallow\"\n\nimport audioPlaybackService from \"./AudioPlaybackService\"\nimport {wakeWordService} from \"./WakeWordService\"\nimport localMiniappRuntime from \"./LocalMiniappRuntime\"\nimport localSttFallbackCoordinator from \"./LocalSttFallbackCoordinator\"\nimport {phonePhotoCoordinator} from \"./PhonePhotoCoordinator\"\nimport {phoneStreamCoordinator} from \"./PhoneStreamCoordinator\"\nimport {isGlassesConnected} from \"./GlassesReadiness\"\nimport {useGlassesStore} from \"../stores/glasses\"\nimport {useSettingsStore} from \"../stores/settings\"\nimport {useAppStatusStore} from \"../stores/apps\"\nimport {retirePendingSelectionOnPromotion} from \"./PairingIdentity\"\nimport GlobalEventEmitter from \"../utils/GlobalEventEmitter\"\nimport {asgCameraApi} from \"./asg/asgCameraApi\"\n\nlet subs: Array<{remove: () => void}> = []\n\nexport function startDeviceEventRouter(): void {\n if (subs.length) return\n\n // --- device state → engine stores ---\n\n // Standalone WiFi status → glasses store.\n subs.push(\n BluetoothSdk.addListener(\"wifi_status_change\", (event) => {\n const {type: _type, ...wifi} = event\n useGlassesStore.getState().setGlassesInfo({wifi})\n }),\n )\n\n // Forward glasses Wi-Fi to miniapps (session.glasses.onWifi) from the STORE — the\n // single source of truth — so every path converges here: wifi_status_change,\n // onGlassesStatus, and BLE disconnect. Effective connectivity requires the glasses\n // to be connected AND on Wi-Fi, so a disconnect correctly flips `connected` false.\n // `linkConnected` carries the BLE leg on its own so a miniapp can tell \"glasses\n // out of Bluetooth range\" from \"glasses on Bluetooth but off Wi-Fi\" — the two\n // need opposite recoveries (wait vs. open Wi-Fi setup).\n subs.push({\n remove: useGlassesStore.subscribe(\n (s) => {\n const linkConnected = isGlassesConnected(s.connection)\n const connected = linkConnected && s.wifi.state === \"connected\"\n // ssid/localIp describe how to reach the glasses over Wi-Fi, so they are\n // only meaningful under effective connectivity. Gate them on `connected`\n // (not raw wifi.state) so a BLE drop with a stale \"connected\" Wi-Fi leg\n // never hands miniapps an unreachable address.\n return {\n connected,\n linkConnected,\n ssid: linkConnected && s.wifi.state === \"connected\" ? s.wifi.ssid : undefined,\n localIp: linkConnected && s.wifi.state === \"connected\" ? s.wifi.localIp : undefined,\n }\n },\n (wifi) => localMiniappRuntime.forwardEvent(\"glasses_wifi\", wifi),\n {equalityFn: shallow},\n ),\n })\n\n // Incremental battery status → glasses store + local miniapps.\n subs.push(\n BluetoothSdk.addListener(\"battery_status\", (event) => {\n const state = useGlassesStore.getState()\n state.setBatteryInfo(event.level, event.charging, state.caseBatteryLevel, state.caseCharging)\n localMiniappRuntime.forwardEvent(\"glasses_battery_update\", {\n type: \"glasses_battery_update\",\n level: event.level,\n charging: event.charging,\n timestamp: event.timestamp ?? Date.now(),\n })\n }),\n )\n\n // Hotspot status → glasses store + event bus. engine's own gallerySyncService listens\n // on the bus for these, so without this bridge engine's gallery sync is dead.\n subs.push(\n BluetoothSdk.addListener(\"hotspot_status_change\", (event) => {\n const enabled = event.state === \"enabled\"\n const ssid = enabled ? event.ssid : \"\"\n const password = enabled ? event.password : \"\"\n const localIp = enabled ? event.localIp : \"\"\n useGlassesStore.getState().setHotspotInfo(enabled, ssid, password, localIp)\n // Always retarget the ASG camera client: on disable (or an event with no\n // IP) fall back to the localhost default so later calls fail fast instead\n // of hitting the previous network's stale glasses IP.\n asgCameraApi.setServer(localIp || \"localhost\", 8089)\n GlobalEventEmitter.emit(\"hotspot_status_change\", {enabled, ssid, password, local_ip: localIp})\n }),\n )\n subs.push(\n BluetoothSdk.addListener(\"hotspot_error\", (event) => {\n GlobalEventEmitter.emit(\"hotspot_error\", {error_message: event.errorMessage, timestamp: event.timestamp})\n }),\n )\n\n // Glasses gallery content counts → event bus (consumed by gallerySyncService).\n subs.push(\n BluetoothSdk.addListener(\"gallery_status\", (event) => {\n GlobalEventEmitter.emit(\"gallery_status\", {\n photos: event.photos,\n videos: event.videos,\n total: event.total,\n has_content: event.hasContent,\n camera_busy: event.cameraBusy,\n })\n }),\n )\n\n // Hardware-originated setting changes (user changes a setting ON the glasses) → store.\n // The inbound complement to GlassesSettingsSync (which only pushes store→device).\n subs.push(\n BluetoothSdk.addListener(\"save_setting\", async (event) => {\n const settings = useSettingsStore.getState()\n // Damp the relay: native re-echoes some settings unconditionally (e.g.\n // the identity block at every handleDeviceReady) — a same-value echo\n // must not become a store write (persistence churn + change-push noise).\n if (settings.getSetting(event.key) !== event.value) {\n await settings.setSetting(event.key, event.value)\n }\n // Two-phase identity: a promoted default retires the pending selection\n // marker. The rule lives with PairingIdentity (a no-op for other keys).\n await retirePendingSelectionOnPromotion(event.key, event.value)\n }),\n )\n\n // Mentra Live pairing state is owned by the Bluetooth SDK (`normal`, `pairing_mode`,\n // `pairing_rejected`). The engine only mirrors it into the glasses store so the app renders\n // from one source: the pairing-mode popup, and the Pair Again card.\n subs.push(\n BluetoothSdk.addListener(\"pairing_state_changed\", (event) => {\n useGlassesStore.getState().setGlassesInfo({pairingState: event.state})\n }),\n )\n\n // Whether the user has to do anything for glasses audio is decided by the Bluetooth SDK. The\n // engine mirrors it; the pairing flow and Home render Pair Audio from it.\n subs.push(\n BluetoothSdk.addListener(\"audio_setup_changed\", (event) => {\n useGlassesStore.getState().setGlassesInfo({audioSetup: event.state})\n }),\n )\n\n // --- coordinators (owns()-gated) ---\n\n // Phone-owned photo errors settle the in-flight long-poll fast (vs. timeout).\n // Non-owned photo responses used to forward to the Cloud V1 photo pipeline via\n // restComms; that relay was removed with Cloud V1 app end-of-life, so they drop.\n // Wire v2 sends a short 4-hex BLE requestId; the coordinator maps it back to\n // the cloud requestId (resolveCloudRequestId) before ownership checks.\n subs.push(\n BluetoothSdk.addListener(\"photo_response\", (event) => {\n const cloudRequestId = event.requestId ? phonePhotoCoordinator.resolveCloudRequestId(event.requestId) : \"\"\n if (cloudRequestId && phonePhotoCoordinator.owns(cloudRequestId)) {\n if (event.state === \"error\") {\n phonePhotoCoordinator.handlePhotoError(\n event.requestId ?? cloudRequestId,\n event.errorCode ?? \"GLASSES_ERROR\",\n event.errorMessage ?? \"Glasses reported an error\",\n )\n }\n }\n }),\n )\n\n // Phone-owned stream status → the stream coordinator. The Cloud V1 relay\n // for non-owned streams was removed with Cloud V1 app end-of-life.\n subs.push(\n BluetoothSdk.addListener(\"stream_status\", (event) => {\n if (\n (event.streamId && phoneStreamCoordinator.owns(event.streamId)) ||\n (!event.streamId && event.kind === \"snapshot\" && event.terminal === true)\n ) {\n phoneStreamCoordinator.handleGlassesStatus(event)\n }\n }),\n )\n\n // --- device input → local miniapps (forwardEvent is subscriber-gated; a no-op when\n // no miniapp listens). The v1 SocketComms cloud legs for these were removed with\n // the Cloud V1 ripout. ---\n\n subs.push(\n BluetoothSdk.addListener(\"button_press\", (event) => {\n localMiniappRuntime.forwardEvent(\"button_press\", event)\n }),\n )\n subs.push(\n BluetoothSdk.addListener(\"touch_event\", (event) => {\n localMiniappRuntime.forwardEvent(\"touch_event\", event)\n }),\n )\n // G2 IMU accelerometer — payload already matches the miniapp AccelData shape.\n subs.push(\n BluetoothSdk.addListener(\"accel_event\", (event) => {\n localMiniappRuntime.forwardEvent(\"accel_event\", {\n x: event.x,\n y: event.y,\n z: event.z,\n timestamp: typeof event.timestamp === \"number\" ? event.timestamp : Date.now(),\n })\n }),\n )\n // Head position — translate native {up:boolean} → SDK {position:\"up\"|\"down\"}.\n subs.push(\n BluetoothSdk.addListener(\"head_up\", (event) => {\n localMiniappRuntime.forwardEvent(\"head_up\", {position: event.up ? \"up\" : \"down\", timestamp: Date.now()})\n }),\n )\n // On-device \"Hey Mentra\" → every miniapp subscribed to the wake word. Warm\n // up the audio player on each detection so the next sound starts quickly.\n subs.push(\n BluetoothSdk.addListener(\"wake_word\", (event) => {\n if (event.kind === \"detected\" && localMiniappRuntime.hasStreamSubscribers(\"wake_word\")) {\n void audioPlaybackService.prepareForPlayback().catch((error) => {\n console.warn(\"Audio playback preparation after wake word failed\", error)\n })\n }\n const forwarded = wakeWordService.onNativeEvent(event)\n if (forwarded) localMiniappRuntime.forwardEvent(\"wake_word\", forwarded)\n }),\n )\n // Phone-side voice activity (native Silero) → `vad`, one event per start or\n // stop. Native counts a gap in microphone audio as silence.\n subs.push(\n BluetoothSdk.addListener(\"speech_activity\", (event) => {\n localMiniappRuntime.forwardEvent(\"vad\", {\n status: event.speaking,\n silentForMs: event.silentForMs,\n timestamp: event.timestamp,\n })\n }),\n )\n // On-device STT transcripts → local miniapps only while the local engine is\n // active (cloud fallback or an explicit forceLocal subscription). The runtime\n // filters mixed local/cloud delivery per miniapp to avoid double-delivery.\n // forwardEvent is subscriber-gated — a no-op when no miniapp listens.\n // (Was MantleManager.handle_local_transcription; its offline-captions display branch\n // went away with the pseudo captions renderer.)\n subs.push(\n BluetoothSdk.addListener(\"local_transcription\", (event) => {\n if (!localSttFallbackCoordinator.isActive()) return\n const lang = event.transcribeLanguage ?? localSttFallbackCoordinator.getActiveLanguage() ?? \"en-US\"\n localMiniappRuntime.forwardEvent(`transcription:${lang}`, event, \"local\")\n }),\n )\n\n // --- glasses swipe-menu app launcher (G2) ---\n subs.push(\n BluetoothSdk.addListener(\"miniapp_selected\", (event) => {\n const packageName = event.packageName as string\n if (!packageName) return\n const app = useAppStatusStore.getState().apps.find((a) => a.packageName === packageName)\n if (!app) return\n // Toggle: stop if running, else start.\n if (app.running) {\n useAppStatusStore.getState().stop(packageName)\n } else {\n // Picked from the glasses' own menu: a person's choice.\n useAppStatusStore.getState().start(app, {skipNavigation: true, trigger: \"user\"})\n }\n }),\n )\n}\n\nexport function stopDeviceEventRouter(): void {\n for (const sub of subs) sub.remove()\n subs = []\n}\n"]}
|
|
1
|
+
{"version":3,"file":"DeviceEventRouter.js","sourceRoot":"","sources":["../../src/services/DeviceEventRouter.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AACH,OAAO,YAAY,MAAM,gCAAgC,CAAA;AACzD,OAAO,EAAC,OAAO,EAAC,MAAM,iBAAiB,CAAA;AAEvC,OAAO,oBAAoB,MAAM,wBAAwB,CAAA;AACzD,OAAO,EAAC,eAAe,EAAC,MAAM,mBAAmB,CAAA;AACjD,OAAO,mBAAmB,MAAM,uBAAuB,CAAA;AACvD,OAAO,2BAA2B,MAAM,+BAA+B,CAAA;AACvE,OAAO,EAAC,qBAAqB,EAAC,MAAM,yBAAyB,CAAA;AAC7D,OAAO,EAAC,sBAAsB,EAAC,MAAM,0BAA0B,CAAA;AAC/D,OAAO,EAAC,kBAAkB,EAAC,MAAM,oBAAoB,CAAA;AACrD,OAAO,EAAC,eAAe,EAAC,MAAM,mBAAmB,CAAA;AACjD,OAAO,EAAC,gBAAgB,EAAC,MAAM,oBAAoB,CAAA;AACnD,OAAO,EAAC,iBAAiB,EAAC,MAAM,gBAAgB,CAAA;AAChD,OAAO,EAAC,iCAAiC,EAAC,MAAM,mBAAmB,CAAA;AACnE,OAAO,kBAAkB,MAAM,6BAA6B,CAAA;AAC5D,OAAO,EAAC,YAAY,EAAC,MAAM,oBAAoB,CAAA;AAE/C,IAAI,IAA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,CAAC,QAAQ,EAAE,CAAC,KAAK,CAAC,GAAG,EAAE,EAAC,cAAc,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,EAAC,CAAC,CAAA;QAClF,CAAC;IACH,CAAC,CAAC,CACH,CAAA;AACH,CAAC;AAED,MAAM,UAAU,qBAAqB;IACnC,KAAK,MAAM,GAAG,IAAI,IAAI;QAAE,GAAG,CAAC,MAAM,EAAE,CAAA;IACpC,IAAI,GAAG,EAAE,CAAA;AACX,CAAC","sourcesContent":["/**\n * Device-event router — engine-owned. Subscribes to the inbound native BLE/device\n * events and routes them into the engine runtime: device stores, the process event\n * bus, the photo/stream coordinators, and local miniapps (via forwardEvent).\n *\n * Why this exists: engine owns the stores, coordinators, miniapp runtime, and facades,\n * but it never *subscribed to the device* for most events — the host MantleManager was\n * still the event router the whole runtime secretly depended on. So a bare OEM that\n * imported engine + called engine.start() got a connected runtime with almost no device\n * data flowing in (no miniapp input, dead gallery sync, starved coordinators). This\n * service moves those inbound bridges into engine so ANY host gets them.\n *\n * Scope: the engine legs only. The Cloud V1 relays that used to live beside them in\n * MantleManager (touch→cloud, the cloud-SDK stream/photo legs, etc.) were deleted with\n * Cloud V1 app end-of-life.\n *\n * Started by `engine.start()`. Idempotent.\n */\nimport BluetoothSdk from \"@mentra/bluetooth-sdk/internal\"\nimport {shallow} from \"zustand/shallow\"\n\nimport audioPlaybackService from \"./AudioPlaybackService\"\nimport {wakeWordService} from \"./WakeWordService\"\nimport localMiniappRuntime from \"./LocalMiniappRuntime\"\nimport localSttFallbackCoordinator from \"./LocalSttFallbackCoordinator\"\nimport {phonePhotoCoordinator} from \"./PhonePhotoCoordinator\"\nimport {phoneStreamCoordinator} from \"./PhoneStreamCoordinator\"\nimport {isGlassesConnected} from \"./GlassesReadiness\"\nimport {useGlassesStore} from \"../stores/glasses\"\nimport {useSettingsStore} from \"../stores/settings\"\nimport {useAppStatusStore} from \"../stores/apps\"\nimport {retirePendingSelectionOnPromotion} from \"./PairingIdentity\"\nimport GlobalEventEmitter from \"../utils/GlobalEventEmitter\"\nimport {asgCameraApi} from \"./asg/asgCameraApi\"\n\nlet subs: Array<{remove: () => void}> = []\n\nexport function startDeviceEventRouter(): void {\n if (subs.length) return\n\n // --- device state → engine stores ---\n\n // Standalone WiFi status → glasses store.\n subs.push(\n BluetoothSdk.addListener(\"wifi_status_change\", (event) => {\n const {type: _type, ...wifi} = event\n useGlassesStore.getState().setGlassesInfo({wifi})\n }),\n )\n\n // Forward glasses Wi-Fi to miniapps (session.glasses.onWifi) from the STORE — the\n // single source of truth — so every path converges here: wifi_status_change,\n // onGlassesStatus, and BLE disconnect. Effective connectivity requires the glasses\n // to be connected AND on Wi-Fi, so a disconnect correctly flips `connected` false.\n // `linkConnected` carries the BLE leg on its own so a miniapp can tell \"glasses\n // out of Bluetooth range\" from \"glasses on Bluetooth but off Wi-Fi\" — the two\n // need opposite recoveries (wait vs. open Wi-Fi setup).\n subs.push({\n remove: useGlassesStore.subscribe(\n (s) => {\n const linkConnected = isGlassesConnected(s.connection)\n const connected = linkConnected && s.wifi.state === \"connected\"\n // ssid/localIp describe how to reach the glasses over Wi-Fi, so they are\n // only meaningful under effective connectivity. Gate them on `connected`\n // (not raw wifi.state) so a BLE drop with a stale \"connected\" Wi-Fi leg\n // never hands miniapps an unreachable address.\n return {\n connected,\n linkConnected,\n ssid: linkConnected && s.wifi.state === \"connected\" ? s.wifi.ssid : undefined,\n localIp: linkConnected && s.wifi.state === \"connected\" ? s.wifi.localIp : undefined,\n }\n },\n (wifi) => localMiniappRuntime.forwardEvent(\"glasses_wifi\", wifi),\n {equalityFn: shallow},\n ),\n })\n\n // Incremental battery status → glasses store + local miniapps.\n subs.push(\n BluetoothSdk.addListener(\"battery_status\", (event) => {\n const state = useGlassesStore.getState()\n state.setBatteryInfo(event.level, event.charging, state.caseBatteryLevel, state.caseCharging)\n localMiniappRuntime.forwardEvent(\"glasses_battery_update\", {\n type: \"glasses_battery_update\",\n level: event.level,\n charging: event.charging,\n timestamp: event.timestamp ?? Date.now(),\n })\n }),\n )\n\n // Hotspot status → glasses store + event bus. engine's own gallerySyncService listens\n // on the bus for these, so without this bridge engine's gallery sync is dead.\n subs.push(\n BluetoothSdk.addListener(\"hotspot_status_change\", (event) => {\n const enabled = event.state === \"enabled\"\n const ssid = enabled ? event.ssid : \"\"\n const password = enabled ? event.password : \"\"\n const localIp = enabled ? event.localIp : \"\"\n useGlassesStore.getState().setHotspotInfo(enabled, ssid, password, localIp)\n // Always retarget the ASG camera client: on disable (or an event with no\n // IP) fall back to the localhost default so later calls fail fast instead\n // of hitting the previous network's stale glasses IP.\n asgCameraApi.setServer(localIp || \"localhost\", 8089)\n GlobalEventEmitter.emit(\"hotspot_status_change\", {enabled, ssid, password, local_ip: localIp})\n }),\n )\n subs.push(\n BluetoothSdk.addListener(\"hotspot_error\", (event) => {\n GlobalEventEmitter.emit(\"hotspot_error\", {error_message: event.errorMessage, timestamp: event.timestamp})\n }),\n )\n\n // Glasses gallery content counts → event bus (consumed by gallerySyncService).\n subs.push(\n BluetoothSdk.addListener(\"gallery_status\", (event) => {\n GlobalEventEmitter.emit(\"gallery_status\", {\n photos: event.photos,\n videos: event.videos,\n total: event.total,\n has_content: event.hasContent,\n camera_busy: event.cameraBusy,\n })\n }),\n )\n\n // Hardware-originated setting changes (user changes a setting ON the glasses) → store.\n // The inbound complement to GlassesSettingsSync (which only pushes store→device).\n subs.push(\n BluetoothSdk.addListener(\"save_setting\", async (event) => {\n const settings = useSettingsStore.getState()\n // Damp the relay: native re-echoes some settings unconditionally (e.g.\n // the identity block at every handleDeviceReady) — a same-value echo\n // must not become a store write (persistence churn + change-push noise).\n if (settings.getSetting(event.key) !== event.value) {\n await settings.setSetting(event.key, event.value)\n }\n // Two-phase identity: a promoted default retires the pending selection\n // marker. The rule lives with PairingIdentity (a no-op for other keys).\n await retirePendingSelectionOnPromotion(event.key, event.value)\n }),\n )\n\n // Mentra Live pairing state is owned by the Bluetooth SDK (`normal`, `pairing_mode`,\n // `pairing_rejected`). The engine only mirrors it into the glasses store so the app renders\n // from one source: the pairing-mode popup, and the Pair Again card.\n subs.push(\n BluetoothSdk.addListener(\"pairing_state_changed\", (event) => {\n useGlassesStore.getState().setGlassesInfo({pairingState: event.state})\n }),\n )\n\n // Whether the user has to do anything for glasses audio is decided by the Bluetooth SDK. The\n // engine mirrors it; the pairing flow and Home render Pair Audio from it.\n subs.push(\n BluetoothSdk.addListener(\"audio_setup_changed\", (event) => {\n useGlassesStore.getState().setGlassesInfo({audioSetup: event.state})\n }),\n )\n\n // --- coordinators (owns()-gated) ---\n\n // Phone-owned photo errors settle the in-flight long-poll fast (vs. timeout).\n // Non-owned photo responses used to forward to the Cloud V1 photo pipeline via\n // restComms; that relay was removed with Cloud V1 app end-of-life, so they drop.\n // Wire v2 sends a short 4-hex BLE requestId; the coordinator maps it back to\n // the cloud requestId (resolveCloudRequestId) before ownership checks.\n subs.push(\n BluetoothSdk.addListener(\"photo_response\", (event) => {\n const cloudRequestId = event.requestId ? phonePhotoCoordinator.resolveCloudRequestId(event.requestId) : \"\"\n if (cloudRequestId && phonePhotoCoordinator.owns(cloudRequestId)) {\n if (event.state === \"error\") {\n phonePhotoCoordinator.handlePhotoError(\n event.requestId ?? cloudRequestId,\n event.errorCode ?? \"GLASSES_ERROR\",\n event.errorMessage ?? \"Glasses reported an error\",\n )\n }\n }\n }),\n )\n\n // Phone-owned stream status → the stream coordinator. The Cloud V1 relay\n // for non-owned streams was removed with Cloud V1 app end-of-life.\n subs.push(\n BluetoothSdk.addListener(\"stream_status\", (event) => {\n if (\n (event.streamId && phoneStreamCoordinator.owns(event.streamId)) ||\n (!event.streamId && event.kind === \"snapshot\" && event.terminal === true)\n ) {\n phoneStreamCoordinator.handleGlassesStatus(event)\n }\n }),\n )\n\n // --- device input → local miniapps (forwardEvent is subscriber-gated; a no-op when\n // no miniapp listens). The v1 SocketComms cloud legs for these were removed with\n // the Cloud V1 ripout. ---\n\n subs.push(\n BluetoothSdk.addListener(\"button_press\", (event) => {\n localMiniappRuntime.forwardEvent(\"button_press\", event)\n }),\n )\n subs.push(\n BluetoothSdk.addListener(\"touch_event\", (event) => {\n localMiniappRuntime.forwardEvent(\"touch_event\", event)\n }),\n )\n // G2 IMU accelerometer — payload already matches the miniapp AccelData shape.\n subs.push(\n BluetoothSdk.addListener(\"accel_event\", (event) => {\n localMiniappRuntime.forwardEvent(\"accel_event\", {\n x: event.x,\n y: event.y,\n z: event.z,\n timestamp: typeof event.timestamp === \"number\" ? event.timestamp : Date.now(),\n })\n }),\n )\n // Head position — translate native {up:boolean} → SDK {position:\"up\"|\"down\"}.\n subs.push(\n BluetoothSdk.addListener(\"head_up\", (event) => {\n localMiniappRuntime.forwardEvent(\"head_up\", {position: event.up ? \"up\" : \"down\", timestamp: Date.now()})\n }),\n )\n // On-device \"Hey Mentra\" → every miniapp subscribed to the wake word. Warm\n // up the audio player on each detection so the next sound starts quickly.\n subs.push(\n BluetoothSdk.addListener(\"wake_word\", (event) => {\n if (event.kind === \"detected\" && localMiniappRuntime.hasStreamSubscribers(\"wake_word\")) {\n void audioPlaybackService.prepareForPlayback().catch((error) => {\n console.warn(\"Audio playback preparation after wake word failed\", error)\n })\n }\n const forwarded = wakeWordService.onNativeEvent(event)\n if (forwarded) localMiniappRuntime.forwardEvent(\"wake_word\", forwarded)\n }),\n )\n // Phone-side voice activity (native Silero) → `vad`, one event per start or\n // stop. Native counts a gap in microphone audio as silence.\n subs.push(\n BluetoothSdk.addListener(\"speech_activity\", (event) => {\n localMiniappRuntime.forwardEvent(\"vad\", {\n status: event.speaking,\n silentForMs: event.silentForMs,\n timestamp: event.timestamp,\n })\n }),\n )\n // On-device STT transcripts → local miniapps only while the local engine is\n // active (a localOnly or preferLocal listener, or the cloud fallback). The\n // runtime routes each listener to one source, so nothing arrives twice.\n // forwardEvent is subscriber-gated — a no-op when no miniapp listens.\n // (Was MantleManager.handle_local_transcription; its offline-captions display branch\n // went away with the pseudo captions renderer.)\n subs.push(\n BluetoothSdk.addListener(\"local_transcription\", (event) => {\n if (!localSttFallbackCoordinator.isActive()) return\n const lang = event.transcribeLanguage ?? localSttFallbackCoordinator.getActiveLanguage() ?? \"en-US\"\n localMiniappRuntime.forwardEvent(`transcription:${lang}`, event, \"local\")\n }),\n )\n\n // --- glasses swipe-menu app launcher (G2) ---\n subs.push(\n BluetoothSdk.addListener(\"miniapp_selected\", (event) => {\n const packageName = event.packageName as string\n if (!packageName) return\n const app = useAppStatusStore.getState().apps.find((a) => a.packageName === packageName)\n if (!app) return\n // Toggle: stop if running, else start.\n if (app.running) {\n useAppStatusStore.getState().stop(packageName)\n } else {\n // Picked from the glasses' own menu: a person's choice.\n useAppStatusStore.getState().start(app, {skipNavigation: true, trigger: \"user\"})\n }\n }),\n )\n}\n\nexport function stopDeviceEventRouter(): void {\n for (const sub of subs) sub.remove()\n subs = []\n}\n"]}
|
|
@@ -628,6 +628,49 @@ declare class LocalMiniappRuntime {
|
|
|
628
628
|
* are NOT sent — they come from the Bluetooth SDK, not from cloud.
|
|
629
629
|
*/
|
|
630
630
|
private updateCloudSubscriptions;
|
|
631
|
+
private updatingCloudSubscriptions;
|
|
632
|
+
private cloudSubscriptionsDirty;
|
|
633
|
+
private applyCloudSubscriptions;
|
|
634
|
+
/** When each transcript source last spoke, to switch listeners only where both have settled. */
|
|
635
|
+
private readonly utterances;
|
|
636
|
+
/** Which sources were up at the last routing pass, to notice one starting. */
|
|
637
|
+
private sourcesUp;
|
|
638
|
+
/** Cloud audio position at the last on-device final. */
|
|
639
|
+
private localFinalWatermark;
|
|
640
|
+
/** Bumped whenever the on-device recognizer starts or stops: a drain holds only for the run it drained. */
|
|
641
|
+
private localGeneration;
|
|
642
|
+
/** A drain that just completed, for the routing pass it triggers only; and whether one is running. */
|
|
643
|
+
private localDrain;
|
|
644
|
+
private localDrainRunning;
|
|
645
|
+
/** Re-routes once a waiting switch's sources settle, since silence brings no transcript to do it. */
|
|
646
|
+
private handoffTimer;
|
|
647
|
+
/** Cloud transcription is allowed by this deployment and connected. */
|
|
648
|
+
private cloudSpeechUp;
|
|
649
|
+
/** What one miniapp's listeners can be transcribed with right now. */
|
|
650
|
+
private transcriptionRoutingState;
|
|
651
|
+
/**
|
|
652
|
+
* Moves every transcription listener toward the source it should use now
|
|
653
|
+
* (see TranscriptionRouting: a planned switch waits for a settled pause and
|
|
654
|
+
* a drain of the on-device recognizer). Returns true when any listener's
|
|
655
|
+
* source or target changed, which can change what must run.
|
|
656
|
+
*/
|
|
657
|
+
private refreshTranscriptionRouting;
|
|
658
|
+
/**
|
|
659
|
+
* Has the on-device recognizer report everything it has heard and start
|
|
660
|
+
* over (finishTranscription): the boundary of a planned switch. What it
|
|
661
|
+
* reports goes to the listeners still on-device. The drain then serves the
|
|
662
|
+
* switches ready in the routing pass it triggers, and only those: the
|
|
663
|
+
* recognizer keeps hearing audio, so any later switch drains again. A model
|
|
664
|
+
* that cannot finish early reports nothing, and the quiet window is the
|
|
665
|
+
* boundary.
|
|
666
|
+
*/
|
|
667
|
+
private drainLocalRecognizer;
|
|
668
|
+
/**
|
|
669
|
+
* Arms a timer for the moment the next busy source settles while any
|
|
670
|
+
* listener waits to switch, so the switch (and dropping what it no longer
|
|
671
|
+
* needs, such as a cloud stream) happens during silence too.
|
|
672
|
+
*/
|
|
673
|
+
private scheduleHandoff;
|
|
631
674
|
/**
|
|
632
675
|
* Build the cloud `AudioSubscription[]` from the miniapp cloud-stream key set.
|
|
633
676
|
*
|
|
@@ -651,9 +694,11 @@ declare class LocalMiniappRuntime {
|
|
|
651
694
|
private ensureCloudResultsWired;
|
|
652
695
|
private ensureCloudStatusWired;
|
|
653
696
|
/**
|
|
654
|
-
* The on-device model state as one miniapp sees it.
|
|
655
|
-
* the
|
|
656
|
-
*
|
|
697
|
+
* The on-device model state as one miniapp sees it. Its on-device listeners
|
|
698
|
+
* are the localOnly and preferLocal ones, and every listener while the cloud
|
|
699
|
+
* is down. The phone runs one model, the one picked on the Speech page, so a
|
|
700
|
+
* miniapp whose on-device listeners all ask for another language is told
|
|
701
|
+
* it's unavailable.
|
|
657
702
|
*/
|
|
658
703
|
private transcriptionModelStatusFor;
|
|
659
704
|
private sendTranscriptionModelStatus;
|
|
@@ -682,8 +727,13 @@ declare class LocalMiniappRuntime {
|
|
|
682
727
|
* - Incoming "VAD" (uppercase) → miniapp protocol uses "vad" (lowercase)
|
|
683
728
|
*/
|
|
684
729
|
forwardEvent(streamType: string, data: unknown, transcriptionSource?: TranscriptionEventSource, tokens?: TranscriptionData["tokens"]): void;
|
|
685
|
-
|
|
686
|
-
|
|
730
|
+
/**
|
|
731
|
+
* Sends one transcript to each listener that hears its stream and currently
|
|
732
|
+
* gets its text from its source, tagged with that source. Then records where
|
|
733
|
+
* the source is in its utterance: a final can complete a listener's switch
|
|
734
|
+
* that waited for it.
|
|
735
|
+
*/
|
|
736
|
+
private forwardTranscription;
|
|
687
737
|
/**
|
|
688
738
|
* Normalize incoming event names to miniapp stream type values.
|
|
689
739
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LocalMiniappRuntime.d.ts","sourceRoot":"","sources":["../../src/services/LocalMiniappRuntime.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;
|
|
1
|
+
{"version":3,"file":"LocalMiniappRuntime.d.ts","sourceRoot":"","sources":["../../src/services/LocalMiniappRuntime.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAiGH,OAAO,KAAK,EAIV,iBAAiB,EAElB,MAAM,wBAAwB,CAAA;AAC/B,OAAO,EAA+B,KAAK,gCAAgC,EAAC,MAAM,6BAA6B,CAAA;AAiB/G,OAAO,EAEL,KAAK,0BAA0B,EAEhC,MAAM,+BAA+B,CAAA;AAyCtC,MAAM,WAAW,wBAAwB;IACvC,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB;4EACwE;IACxE,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,UAAU,CAAC,E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