@mentra/engine 3.2.0-dev.115 → 3.2.0-dev.120

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 (65) hide show
  1. package/LICENSE +201 -0
  2. package/build/engine.d.ts.map +1 -1
  3. package/build/engine.js +7 -2
  4. package/build/engine.js.map +1 -1
  5. package/build/generated/releaseMetadata.js +5 -5
  6. package/build/generated/releaseMetadata.js.map +1 -1
  7. package/build/runtime/streamConfig.d.ts +7 -0
  8. package/build/runtime/streamConfig.d.ts.map +1 -1
  9. package/build/runtime/streamConfig.js +7 -0
  10. package/build/runtime/streamConfig.js.map +1 -1
  11. package/build/services/AcsMeetingService.d.ts +154 -0
  12. package/build/services/AcsMeetingService.d.ts.map +1 -0
  13. package/build/services/AcsMeetingService.js +477 -0
  14. package/build/services/AcsMeetingService.js.map +1 -0
  15. package/build/services/DeviceEventRouter.d.ts.map +1 -1
  16. package/build/services/DeviceEventRouter.js +12 -3
  17. package/build/services/DeviceEventRouter.js.map +1 -1
  18. package/build/services/GlassesSettingsSync.d.ts.map +1 -1
  19. package/build/services/GlassesSettingsSync.js +11 -1
  20. package/build/services/GlassesSettingsSync.js.map +1 -1
  21. package/build/services/GlassesStatusProjection.d.ts +12 -0
  22. package/build/services/GlassesStatusProjection.d.ts.map +1 -1
  23. package/build/services/GlassesStatusProjection.js +23 -0
  24. package/build/services/GlassesStatusProjection.js.map +1 -1
  25. package/build/services/LocalMiniappRuntime.d.ts +6 -0
  26. package/build/services/LocalMiniappRuntime.d.ts.map +1 -1
  27. package/build/services/LocalMiniappRuntime.js +130 -1
  28. package/build/services/LocalMiniappRuntime.js.map +1 -1
  29. package/build/services/MentraJSRouter.d.ts.map +1 -1
  30. package/build/services/MentraJSRouter.js +8 -1
  31. package/build/services/MentraJSRouter.js.map +1 -1
  32. package/build/services/PhoneCameraFovCoordinator.d.ts +18 -0
  33. package/build/services/PhoneCameraFovCoordinator.d.ts.map +1 -1
  34. package/build/services/PhoneCameraFovCoordinator.js +36 -0
  35. package/build/services/PhoneCameraFovCoordinator.js.map +1 -1
  36. package/build/services/PhoneStreamCoordinator.d.ts +67 -1
  37. package/build/services/PhoneStreamCoordinator.d.ts.map +1 -1
  38. package/build/services/PhoneStreamCoordinator.js +204 -15
  39. package/build/services/PhoneStreamCoordinator.js.map +1 -1
  40. package/build/services/StreamLifecycleController.d.ts +23 -5
  41. package/build/services/StreamLifecycleController.d.ts.map +1 -1
  42. package/build/services/StreamLifecycleController.js +31 -10
  43. package/build/services/StreamLifecycleController.js.map +1 -1
  44. package/build/services/acsAudioSource.d.ts +24 -0
  45. package/build/services/acsAudioSource.d.ts.map +1 -0
  46. package/build/services/acsAudioSource.js +37 -0
  47. package/build/services/acsAudioSource.js.map +1 -0
  48. package/build/utils/devMiniappLaunch.d.ts.map +1 -1
  49. package/build/utils/devMiniappLaunch.js +4 -0
  50. package/build/utils/devMiniappLaunch.js.map +1 -1
  51. package/package.json +8 -7
  52. package/src/engine.ts +10 -2
  53. package/src/generated/releaseMetadata.ts +5 -5
  54. package/src/runtime/streamConfig.ts +13 -0
  55. package/src/services/AcsMeetingService.ts +570 -0
  56. package/src/services/DeviceEventRouter.ts +12 -3
  57. package/src/services/GlassesSettingsSync.ts +13 -3
  58. package/src/services/GlassesStatusProjection.ts +28 -0
  59. package/src/services/LocalMiniappRuntime.ts +142 -1
  60. package/src/services/MentraJSRouter.ts +7 -1
  61. package/src/services/PhoneCameraFovCoordinator.ts +34 -0
  62. package/src/services/PhoneStreamCoordinator.ts +232 -19
  63. package/src/services/StreamLifecycleController.ts +42 -12
  64. package/src/services/acsAudioSource.ts +53 -0
  65. package/src/utils/devMiniappLaunch.ts +4 -0
package/LICENSE ADDED
@@ -0,0 +1,201 @@
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ http://www.apache.org/licenses/
4
+
5
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
+
7
+ 1. Definitions.
8
+
9
+ "License" shall mean the terms and conditions for use, reproduction,
10
+ and distribution as defined by Sections 1 through 9 of this document.
11
+
12
+ "Licensor" shall mean the copyright owner or entity authorized by
13
+ the copyright owner that is granting the License.
14
+
15
+ "Legal Entity" shall mean the union of the acting entity and all
16
+ other entities that control, are controlled by, or are under common
17
+ control with that entity. For the purposes of this definition,
18
+ "control" means (i) the power, direct or indirect, to cause the
19
+ direction or management of such entity, whether by contract or
20
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
21
+ outstanding shares, or (iii) beneficial ownership of such entity.
22
+
23
+ "You" (or "Your") shall mean an individual or Legal Entity
24
+ exercising permissions granted by this License.
25
+
26
+ "Source" form shall mean the preferred form for making modifications,
27
+ including but not limited to software source code, documentation
28
+ source, and configuration files.
29
+
30
+ "Object" form shall mean any form resulting from mechanical
31
+ transformation or translation of a Source form, including but
32
+ not limited to compiled object code, generated documentation,
33
+ and conversions to other media types.
34
+
35
+ "Work" shall mean the work of authorship, whether in Source or
36
+ Object form, made available under the License, as indicated by a
37
+ copyright notice that is included in or attached to the work
38
+ (an example is provided in the Appendix below).
39
+
40
+ "Derivative Works" shall mean any work, whether in Source or Object
41
+ form, that is based on (or derived from) the Work and for which the
42
+ editorial revisions, annotations, elaborations, or other modifications
43
+ represent, as a whole, an original work of authorship. For the purposes
44
+ of this License, Derivative Works shall not include works that remain
45
+ separable from, or merely link (or bind by name) to the interfaces of,
46
+ the Work and Derivative Works thereof.
47
+
48
+ "Contribution" shall mean any work of authorship, including
49
+ the original version of the Work and any modifications or additions
50
+ to that Work or Derivative Works thereof, that is intentionally
51
+ submitted to Licensor for inclusion in the Work by the copyright owner
52
+ or by an individual or Legal Entity authorized to submit on behalf of
53
+ the copyright owner. For the purposes of this definition, "submitted"
54
+ means any form of electronic, verbal, or written communication sent
55
+ to the Licensor or its representatives, including but not limited to
56
+ communication on electronic mailing lists, source code control systems,
57
+ and issue tracking systems that are managed by, or on behalf of, the
58
+ Licensor for the purpose of discussing and improving the Work, but
59
+ excluding communication that is conspicuously marked or otherwise
60
+ designated in writing by the copyright owner as "Not a Contribution."
61
+
62
+ "Contributor" shall mean Licensor and any individual or Legal Entity
63
+ on behalf of whom a Contribution has been received by Licensor and
64
+ subsequently incorporated within the Work.
65
+
66
+ 2. Grant of Copyright License. Subject to the terms and conditions of
67
+ this License, each Contributor hereby grants to You a perpetual,
68
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69
+ copyright license to reproduce, prepare Derivative Works of,
70
+ publicly display, publicly perform, sublicense, and distribute the
71
+ Work and such Derivative Works in Source or Object form.
72
+
73
+ 3. Grant of Patent License. Subject to the terms and conditions of
74
+ this License, each Contributor hereby grants to You a perpetual,
75
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76
+ (except as stated in this section) patent license to make, have made,
77
+ use, offer to sell, sell, import, and otherwise transfer the Work,
78
+ where such license applies only to those patent claims licensable
79
+ by such Contributor that are necessarily infringed by their
80
+ Contribution(s) alone or by combination of their Contribution(s)
81
+ with the Work to which such Contribution(s) was submitted. If You
82
+ institute patent litigation against any entity (including a
83
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
84
+ or a Contribution incorporated within the Work constitutes direct
85
+ or contributory patent infringement, then any patent licenses
86
+ granted to You under this License for that Work shall terminate
87
+ as of the date such litigation is filed.
88
+
89
+ 4. Redistribution. You may reproduce and distribute copies of the
90
+ Work or Derivative Works thereof in any medium, with or without
91
+ modifications, and in Source or Object form, provided that You
92
+ meet the following conditions:
93
+
94
+ (a) You must give any other recipients of the Work or
95
+ Derivative Works a copy of this License; and
96
+
97
+ (b) You must cause any modified files to carry prominent notices
98
+ stating that You changed the files; and
99
+
100
+ (c) You must retain, in the Source form of any Derivative Works
101
+ that You distribute, all copyright, patent, trademark, and
102
+ attribution notices from the Source form of the Work,
103
+ excluding those notices that do not pertain to any part of
104
+ the Derivative Works; and
105
+
106
+ (d) If the Work includes a "NOTICE" text file as part of its
107
+ distribution, then any Derivative Works that You distribute must
108
+ include a readable copy of the attribution notices contained
109
+ within such NOTICE file, excluding those notices that do not
110
+ pertain to any part of the Derivative Works, in at least one
111
+ of the following places: within a NOTICE text file distributed
112
+ as part of the Derivative Works; within the Source form or
113
+ documentation, if provided along with the Derivative Works; or,
114
+ within a display generated by the Derivative Works, if and
115
+ wherever such third-party notices normally appear. The contents
116
+ of the NOTICE file are for informational purposes only and
117
+ do not modify the License. You may add Your own attribution
118
+ notices within Derivative Works that You distribute, alongside
119
+ or as an addendum to the NOTICE text from the Work, provided
120
+ that such additional attribution notices cannot be construed
121
+ as modifying the License.
122
+
123
+ You may add Your own copyright statement to Your modifications and
124
+ may provide additional or different license terms and conditions
125
+ for use, reproduction, or distribution of Your modifications, or
126
+ for any such Derivative Works as a whole, provided Your use,
127
+ reproduction, and distribution of the Work otherwise complies with
128
+ the conditions stated in this License.
129
+
130
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
131
+ any Contribution intentionally submitted for inclusion in the Work
132
+ by You to the Licensor shall be under the terms and conditions of
133
+ this License, without any additional terms or conditions.
134
+ Notwithstanding the above, nothing herein shall supersede or modify
135
+ the terms of any separate license agreement you may have executed
136
+ with Licensor regarding such Contributions.
137
+
138
+ 6. Trademarks. This License does not grant permission to use the trade
139
+ names, trademarks, service marks, or product names of the Licensor,
140
+ except as required for reasonable and customary use in describing the
141
+ origin of the Work and reproducing the content of the NOTICE file.
142
+
143
+ 7. Disclaimer of Warranty. Unless required by applicable law or
144
+ agreed to in writing, Licensor provides the Work (and each
145
+ Contributor provides its Contributions) on an "AS IS" BASIS,
146
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147
+ implied, including, without limitation, any warranties or conditions
148
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149
+ PARTICULAR PURPOSE. You are solely responsible for determining the
150
+ appropriateness of using or redistributing the Work and assume any
151
+ risks associated with Your exercise of permissions under this License.
152
+
153
+ 8. Limitation of Liability. In no event and under no legal theory,
154
+ whether in tort (including negligence), contract, or otherwise,
155
+ unless required by applicable law (such as deliberate and grossly
156
+ negligent acts) or agreed to in writing, shall any Contributor be
157
+ liable to You for damages, including any direct, indirect, special,
158
+ incidental, or consequential damages of any character arising as a
159
+ result of this License or out of the use or inability to use the
160
+ Work (including but not limited to damages for loss of goodwill,
161
+ work stoppage, computer failure or malfunction, or any and all
162
+ other commercial damages or losses), even if such Contributor
163
+ has been advised of the possibility of such damages.
164
+
165
+ 9. Accepting Warranty or Additional Liability. While redistributing
166
+ the Work or Derivative Works thereof, You may choose to offer,
167
+ and charge a fee for, acceptance of support, warranty, indemnity,
168
+ or other liability obligations and/or rights consistent with this
169
+ License. However, in accepting such obligations, You may act only
170
+ on Your own behalf and on Your sole responsibility, not on behalf
171
+ of any other Contributor, and only if You agree to indemnify,
172
+ defend, and hold each Contributor harmless for any liability
173
+ incurred by, or claims asserted against, such Contributor by reason
174
+ of your accepting any such warranty or additional liability.
175
+
176
+ END OF TERMS AND CONDITIONS
177
+
178
+ APPENDIX: How to apply the Apache License to your work.
179
+
180
+ To apply the Apache License to your work, attach the following
181
+ boilerplate notice, with the fields enclosed by brackets "[]"
182
+ replaced with your own identifying information. (Don't include
183
+ the brackets!) The text should be enclosed in the appropriate
184
+ comment syntax for the file format. We also recommend that a
185
+ file or class name and description of purpose be included on the
186
+ same "printed page" as the copyright notice for easier
187
+ identification within third-party archives.
188
+
189
+ Copyright 2026 Mentra Labs, Inc.
190
+
191
+ Licensed under the Apache License, Version 2.0 (the "License");
192
+ you may not use this file except in compliance with the License.
193
+ You may obtain a copy of the License at
194
+
195
+ http://www.apache.org/licenses/LICENSE-2.0
196
+
197
+ Unless required by applicable law or agreed to in writing, software
198
+ distributed under the License is distributed on an "AS IS" BASIS,
199
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200
+ See the License for the specific language governing permissions and
201
+ limitations under the License.
@@ -1 +1 @@
1
- {"version":3,"file":"engine.d.ts","sourceRoot":"","sources":["../src/engine.ts"],"names":[],"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;;;;;;;;;;;;;;;;;;;;;;IAEtF,6EAA6E;;;;;;;;;;;;IAE7E,iFAAiF;;;;;;;;;;;;;;;;;;;IAEjF,8CAA8C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAE9C,uDAAuD;;;;;;;;;;;;IAEvD,8EAA8E;;;;;;;IAE9E,qFAAqF;;;;;;;;;;;;;;CAGtF,CAAA"}
package/build/engine.js CHANGED
@@ -12,7 +12,7 @@ import { configure, start as bootstrapStart, stop as bootstrapStop, updateUiSeam
12
12
  import { cloudClientService } from "./services/CloudClientService";
13
13
  import { hydrateDeviceStore, demoteOrphanedDefaultWearable } from "./services/DeviceStoreHydration";
14
14
  import { startGlassesSettingsSync, stopGlassesSettingsSync } from "./services/GlassesSettingsSync";
15
- import { startGlassesStatusProjection, stopGlassesStatusProjection } from "./services/GlassesStatusProjection";
15
+ import { startGlassesStatusProjection, stopGlassesStatusProjection, toMiniappConnectionData, } from "./services/GlassesStatusProjection";
16
16
  import { startOtaService, stopOtaService } from "./services/OtaService";
17
17
  import { startAudioCloudUplink, stopAudioCloudUplink } from "./services/AudioCloudUplink";
18
18
  import { startSupportProfileSync, stopSupportProfileSync } from "./services/SupportProfileSync";
@@ -58,7 +58,12 @@ export const engine = {
58
58
  // Project native device status -> the engine stores (the inbound feed the rest
59
59
  // of the runtime reads). Established first so the stores are live before the
60
60
  // syncs below react to them.
61
- startGlassesStatusProjection((changed) => localMiniappRuntime.forwardEvent("glasses_connection_state", changed));
61
+ startGlassesStatusProjection((changed) => {
62
+ const connection = toMiniappConnectionData(changed);
63
+ if (!connection)
64
+ return;
65
+ localMiniappRuntime.forwardEvent("glasses_connection_state", connection);
66
+ });
62
67
  // Route the rest of the inbound device events (wifi/hotspot/gallery -> stores+bus,
63
68
  // photo/stream -> coordinators, button/touch/accel/head -> miniapps, save_setting ->
64
69
  // store, miniapp_selected -> launcher) so a bare OEM gets device data, not just the
@@ -1 +1 @@
1
- {"version":3,"file":"engine.js","sourceRo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,EAAE,CAAC,kBAAkB,CAAC,IAAI,EAAE,CAAC,CAAA;QAC7D,MAAM,MAAM,CAAC,WAAW,EAAE,aAAa,CAAC,CAAA;IAC1C,CAAC;IACD,OAAO;IACP,MAAM;IACN,mFAAmF;IACnF,OAAO;IACP,sEAAsE;IACtE,QAAQ;IACR,qFAAqF;IACrF,GAAG;IACH,qEAAqE;IACrE,OAAO;IACP,sFAAsF;IACtF,GAAG;IACH,6EAA6E;IAC7E,OAAO;IACP,iFAAiF;IACjF,QAAQ;IACR,8CAA8C;IAC9C,OAAO;IACP,uDAAuD;IACvD,kBAAkB;IAClB,8EAA8E;IAC9E,WAAW;IACX,qFAAqF;IACrF,aAAa;IACb,OAAO;CACR,CAAA","sourcesContent":["/**\n * `engine` — the namespaced OEM-facing engine API (the \"(A) host API\" from the\n * Phase-1 contract). Host UI calls `engine.<domain>.<method>()`; each domain is a\n * typed facade over the runtime. (Exported from the `@mentra/engine` module, whose\n * name stays `engine` in code; the public API surface is `engine`.)\n *\n * It grows one facade at a time. The migration-era flat store/service exports\n * remain in a private MentraOS host package; they shrink as screens move onto\n * `engine.*`.\n */\nimport {configure, start as bootstrapStart, stop as bootstrapStop, updateUiSeams} from \"./runtime/bootstrap\"\nimport {cloudClientService} from \"./services/CloudClientService\"\nimport {hydrateDeviceStore, demoteOrphanedDefaultWearable} from \"./services/DeviceStoreHydration\"\nimport {startGlassesSettingsSync, stopGlassesSettingsSync} from \"./services/GlassesSettingsSync\"\nimport {startGlassesStatusProjection, stopGlassesStatusProjection} from \"./services/GlassesStatusProjection\"\nimport {startOtaService, stopOtaService} from \"./services/OtaService\"\nimport {startAudioCloudUplink, stopAudioCloudUplink} from \"./services/AudioCloudUplink\"\nimport {startSupportProfileSync, stopSupportProfileSync} from \"./services/SupportProfileSync\"\nimport {startDeviceEventRouter, stopDeviceEventRouter} from \"./services/DeviceEventRouter\"\nimport {startPhoneNotificationsSync, stopPhoneNotificationsSync} from \"./services/PhoneNotificationsSync\"\nimport {startCaptionsTesterReportService, stopCaptionsTesterReportService} from \"./services/CaptionsTesterReportService\"\nimport {\n startMentraJSCrashloopReportService,\n stopMentraJSCrashloopReportService,\n} from \"./services/MentraJSCrashloopReportService\"\nimport {ensureMiniappEngine, stopMiniappEngine} from \"./services/MiniappEngine\"\nimport localMiniappRuntime from \"./services/LocalMiniappRuntime\"\nimport displayProcessor from \"./services/DisplayProcessor\"\nimport {gallerySyncService} from \"./services/asg/gallerySyncService\"\nimport {glasses} from \"./facades/glasses\"\nimport {display} from \"./facades/display\"\nimport {speech} from \"./facades/speech\"\nimport {session} from \"./facades/session\"\nimport {settings} from \"./facades/settings\"\nimport {dev} from \"./facades/dev\"\nimport {reports} from \"./facades/reports\"\nimport {ota} from \"./facades/ota\"\nimport {gallery} from \"./facades/gallery\"\nimport {miniapps} from \"./facades/miniapps\"\nimport {pairing} from \"./facades/pairing\"\nimport {phoneNotifications} from \"./facades/phoneNotifications\"\nimport {permissions} from \"./facades/permissions\"\nimport {notifications} from \"./facades/notifications\"\nimport {logBuffer} from \"./utils/devLogging\"\n\nexport const engine = {\n /** Front door — hand engine auth + config, then start/stop the runtime. */\n configure,\n /** Merge host-UI seams on a running runtime (scan overlay, wifi setup, …). */\n updateUiSeams,\n /** Start the runtime: mark started + construct/connect the cloud client + begin\n * syncing device settings to the glasses. */\n async start() {\n // Reports attach recent phone logs, so engine owns console interception for\n // OEM hosts too. Idempotent; the Mentra host may start it earlier.\n logBuffer.startConsoleInterception()\n await bootstrapStart()\n // Construct + connect the cloud client so the documented configure()+start()\n // lifecycle yields a live engine.session for OEMs. Idempotent for repeated\n // start() calls.\n cloudClientService.init()\n // Project native device status -> the engine stores (the inbound feed the rest\n // of the runtime reads). Established first so the stores are live before the\n // syncs below react to them.\n startGlassesStatusProjection((changed) => localMiniappRuntime.forwardEvent(\"glasses_connection_state\", changed))\n // Route the rest of the inbound device events (wifi/hotspot/gallery -> stores+bus,\n // photo/stream -> coordinators, button/touch/accel/head -> miniapps, save_setting ->\n // store, miniapp_selected -> launcher) so a bare OEM gets device data, not just the\n // Mentra app's MantleManager.\n startDeviceEventRouter()\n // Hydration contract: the native DeviceStore is in-memory and starts empty\n // every launch; seed it from the persisted settings BEFORE start() resolves\n // so every post-start getDefaultDevice() read is a trustworthy two-state\n // answer (no false \"absent\" for genuinely-paired users at cold start).\n // Ordered before startGlassesSettingsSync so the settings load can't\n // double-push through the change subscription. A failed hydration must not\n // brick the runtime: start() continues, and the guards that consume\n // hasDefaultDevice() see the rejection and fail open.\n try {\n await hydrateDeviceStore()\n // Boot repair: a persisted default_wearable without a native default\n // device (identity abandoned mid-pairing, or resurrected from the server\n // before identity stopped syncing) demotes to pending_wearable so hosts\n // render finish-pairing instead of a connect that would throw.\n await demoteOrphanedDefaultWearable()\n } catch (error) {\n console.warn(\"engine.start: device-store hydration failed:\", error instanceof Error ? error.message : error)\n }\n // Project the glasses' OTA events into the store for the engine.ota read surface.\n startOtaService()\n // Forward glasses mic_lc3 frames to the v2 cloud session so cloud transcription\n // works for any host (not just the Mentra app's host-side MantleManager fork).\n startAudioCloudUplink()\n try {\n await cloudClientService.syncCoreTokenToBluetooth()\n } catch (error) {\n console.warn(\n \"engine.start: initial Cloud V2 core token sync failed:\",\n error instanceof Error ? error.message : error,\n )\n }\n startSupportProfileSync()\n // Push device-setting changes to the glasses for ANY host, so\n // engine.glasses.settings.set() reaches the device (not just the Mentra app).\n startGlassesSettingsSync()\n // Same for phone-notification config -> the native listener (Android).\n startPhoneNotificationsSync()\n // Android internal/e2e: laptop captions tester can broadcast a failure intent;\n // engine owns turning that into a Cloud V2 report.\n startCaptionsTesterReportService()\n // MentraJS crashloop-disabled is runtime state; engine owns filing the\n // automatic report while hosts only render alert/telemetry side effects.\n startMentraJSCrashloopReportService()\n // Bring up the local-miniapp engine so a bare OEM can run MentraJS miniapps:\n // the LocalMiniappRuntime (registry + WebView bridge), the MentraJS router\n // (crust-bound spawn/dispatch pump + launcher wiring), the DisplayProcessor\n // (layout arbitration over the engine stores), and the gallery-sync service.\n // All idempotent — when the Mentra app's host bootstrap also calls these, the\n // second call is a no-op. Host-only crashloop telemetry is attached\n // separately by the Mentra app.\n localMiniappRuntime.initialize()\n ensureMiniappEngine()\n displayProcessor.attachToRuntime()\n gallerySyncService.initialize()\n },\n /** Stop the runtime: tear down the settings sync + cloud client + mark stopped.\n * Each step is guarded so one failing teardown can't skip the rest and leak\n * the remaining runtime services. */\n async stop() {\n const safely = async (label: string, step: () => unknown): Promise<void> => {\n try {\n await step()\n } catch (error) {\n console.warn(`engine.stop: ${label} failed:`, error)\n }\n }\n await safely(\"glasses settings sync\", stopGlassesSettingsSync)\n await safely(\"glasses status projection\", stopGlassesStatusProjection)\n await safely(\"device event router\", stopDeviceEventRouter)\n await safely(\"ota service\", stopOtaService)\n await safely(\"audio cloud uplink\", stopAudioCloudUplink)\n await safely(\"support profile sync\", stopSupportProfileSync)\n await safely(\"phone notifications sync\", stopPhoneNotificationsSync)\n await safely(\"captions tester report service\", stopCaptionsTesterReportService)\n await safely(\"mentrajs crashloop report service\", stopMentraJSCrashloopReportService)\n await safely(\"miniapp engine\", stopMiniappEngine)\n await safely(\"local miniapp runtime\", () => localMiniappRuntime.cleanup())\n await safely(\"display processor\", () => displayProcessor.detachFromRuntime())\n await safely(\"gallery sync service\", () => gallerySyncService.cleanup())\n await safely(\"cloud client\", () => cloudClientService.stop())\n await safely(\"bootstrap\", bootstrapStop)\n },\n glasses,\n speech,\n /** Cloud (cloud-v2) live-session status + account ops — engine owns the client. */\n session,\n /** Typed keyed user settings over the engine-owned settings store. */\n settings,\n /** Developer/debug surface (backend+cloud URL overrides, reconnect, min version). */\n dev,\n /** Bug-report, automatic runtime report, and feedback submission. */\n reports,\n /** Firmware OTA read/observe surface (updateAvailable/status + on* subscriptions). */\n ota,\n /** Gallery sync: status/onStatus · onNotice (host renders) · sync/cancel. */\n gallery,\n /** Miniapp lifecycle (the WebView bridge primitives are exported separately). */\n miniapps,\n /** First-time glasses discovery + pairing. */\n pairing,\n /** Phone→glasses notification forwarding (Android). */\n phoneNotifications,\n /** OS permissions (check/request/openSettings + per-miniapp requirements). */\n permissions,\n /** Inbound alerts engine→host (crashloop, version-incompatible, connection loss). */\n notifications,\n display,\n}\n"]}
1
+ {"version":3,"file":"engine.js","sourceRoot":"","sources":["../src/engine.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AACH,OAAO,EAAC,SAAS,EAAE,KAAK,IAAI,cAAc,EAAE,IAAI,IAAI,aAAa,EAAE,aAAa,EAAC,MAAM,qBAAqB,CAAA;AAC5G,OAAO,EAAC,kBAAkB,EAAC,MAAM,+BAA+B,CAAA;AAChE,OAAO,EAAC,kBAAkB,EAAE,6BAA6B,EAAC,MAAM,iCAAiC,CAAA;AACjG,OAAO,EAAC,wBAAwB,EAAE,uBAAuB,EAAC,MAAM,gCAAgC,CAAA;AAChG,OAAO,EACL,4BAA4B,EAC5B,2BAA2B,EAC3B,uBAAuB,GACxB,MAAM,oCAAoC,CAAA;AAC3C,OAAO,EAAC,eAAe,EAAE,cAAc,EAAC,MAAM,uBAAuB,CAAA;AACrE,OAAO,EAAC,qBAAqB,EAAE,oBAAoB,EAAC,MAAM,6BAA6B,CAAA;AACvF,OAAO,EAAC,uBAAuB,EAAE,sBAAsB,EAAC,MAAM,+BAA+B,CAAA;AAC7F,OAAO,EAAC,sBAAsB,EAAE,qBAAqB,EAAC,MAAM,8BAA8B,CAAA;AAC1F,OAAO,EAAC,2BAA2B,EAAE,0BAA0B,EAAC,MAAM,mCAAmC,CAAA;AACzG,OAAO,EAAC,gCAAgC,EAAE,+BAA+B,EAAC,MAAM,wCAAwC,CAAA;AACxH,OAAO,EACL,mCAAmC,EACnC,kCAAkC,GACnC,MAAM,2CAA2C,CAAA;AAClD,OAAO,EAAC,mBAAmB,EAAE,iBAAiB,EAAC,MAAM,0BAA0B,CAAA;AAC/E,OAAO,mBAAmB,MAAM,gCAAgC,CAAA;AAChE,OAAO,gBAAgB,MAAM,6BAA6B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AC,uBAAuB,EAAE,GAAG,EAAE,CAAC,mBAAmB,CAAC,OAAO,EAAE,CAAC,CAAA;QAC1E,MAAM,MAAM,CAAC,mBAAmB,EAAE,GAAG,EAAE,CAAC,gBAAgB,CAAC,iBAAiB,EAAE,CAAC,CAAA;QAC7E,MAAM,MAAM,CAAC,sBAAsB,EAAE,GAAG,EAAE,CAAC,kBAAkB,CAAC,OAAO,EAAE,CAAC,CAAA;QACxE,MAAM,MAAM,CAAC,cAAc,EAAE,GAAG,EAAE,CAAC,kBAAkB,CAAC,IAAI,EAAE,CAAC,CAAA;QAC7D,MAAM,MAAM,CAAC,WAAW,EAAE,aAAa,CAAC,CAAA;IAC1C,CAAC;IACD,OAAO;IACP,MAAM;IACN,mFAAmF;IACnF,OAAO;IACP,sEAAsE;IACtE,QAAQ;IACR,qFAAqF;IACrF,GAAG;IACH,qEAAqE;IACrE,OAAO;IACP,sFAAsF;IACtF,GAAG;IACH,6EAA6E;IAC7E,OAAO;IACP,iFAAiF;IACjF,QAAQ;IACR,8CAA8C;IAC9C,OAAO;IACP,uDAAuD;IACvD,kBAAkB;IAClB,8EAA8E;IAC9E,WAAW;IACX,qFAAqF;IACrF,aAAa;IACb,OAAO;CACR,CAAA","sourcesContent":["/**\n * `engine` — the namespaced OEM-facing engine API (the \"(A) host API\" from the\n * Phase-1 contract). Host UI calls `engine.<domain>.<method>()`; each domain is a\n * typed facade over the runtime. (Exported from the `@mentra/engine` module, whose\n * name stays `engine` in code; the public API surface is `engine`.)\n *\n * It grows one facade at a time. The migration-era flat store/service exports\n * remain in a private MentraOS host package; they shrink as screens move onto\n * `engine.*`.\n */\nimport {configure, start as bootstrapStart, stop as bootstrapStop, updateUiSeams} from \"./runtime/bootstrap\"\nimport {cloudClientService} from \"./services/CloudClientService\"\nimport {hydrateDeviceStore, demoteOrphanedDefaultWearable} from \"./services/DeviceStoreHydration\"\nimport {startGlassesSettingsSync, stopGlassesSettingsSync} from \"./services/GlassesSettingsSync\"\nimport {\n startGlassesStatusProjection,\n stopGlassesStatusProjection,\n toMiniappConnectionData,\n} from \"./services/GlassesStatusProjection\"\nimport {startOtaService, stopOtaService} from \"./services/OtaService\"\nimport {startAudioCloudUplink, stopAudioCloudUplink} from \"./services/AudioCloudUplink\"\nimport {startSupportProfileSync, stopSupportProfileSync} from \"./services/SupportProfileSync\"\nimport {startDeviceEventRouter, stopDeviceEventRouter} from \"./services/DeviceEventRouter\"\nimport {startPhoneNotificationsSync, stopPhoneNotificationsSync} from \"./services/PhoneNotificationsSync\"\nimport {startCaptionsTesterReportService, stopCaptionsTesterReportService} from \"./services/CaptionsTesterReportService\"\nimport {\n startMentraJSCrashloopReportService,\n stopMentraJSCrashloopReportService,\n} from \"./services/MentraJSCrashloopReportService\"\nimport {ensureMiniappEngine, stopMiniappEngine} from \"./services/MiniappEngine\"\nimport localMiniappRuntime from \"./services/LocalMiniappRuntime\"\nimport displayProcessor from \"./services/DisplayProcessor\"\nimport {gallerySyncService} from \"./services/asg/gallerySyncService\"\nimport {glasses} from \"./facades/glasses\"\nimport {display} from \"./facades/display\"\nimport {speech} from \"./facades/speech\"\nimport {session} from \"./facades/session\"\nimport {settings} from \"./facades/settings\"\nimport {dev} from \"./facades/dev\"\nimport {reports} from \"./facades/reports\"\nimport {ota} from \"./facades/ota\"\nimport {gallery} from \"./facades/gallery\"\nimport {miniapps} from \"./facades/miniapps\"\nimport {pairing} from \"./facades/pairing\"\nimport {phoneNotifications} from \"./facades/phoneNotifications\"\nimport {permissions} from \"./facades/permissions\"\nimport {notifications} from \"./facades/notifications\"\nimport {logBuffer} from \"./utils/devLogging\"\n\nexport const engine = {\n /** Front door — hand engine auth + config, then start/stop the runtime. */\n configure,\n /** Merge host-UI seams on a running runtime (scan overlay, wifi setup, …). */\n updateUiSeams,\n /** Start the runtime: mark started + construct/connect the cloud client + begin\n * syncing device settings to the glasses. */\n async start() {\n // Reports attach recent phone logs, so engine owns console interception for\n // OEM hosts too. Idempotent; the Mentra host may start it earlier.\n logBuffer.startConsoleInterception()\n await bootstrapStart()\n // Construct + connect the cloud client so the documented configure()+start()\n // lifecycle yields a live engine.session for OEMs. Idempotent for repeated\n // start() calls.\n cloudClientService.init()\n // Project native device status -> the engine stores (the inbound feed the rest\n // of the runtime reads). Established first so the stores are live before the\n // syncs below react to them.\n startGlassesStatusProjection((changed) => {\n const connection = toMiniappConnectionData(changed)\n if (!connection) return\n localMiniappRuntime.forwardEvent(\"glasses_connection_state\", connection)\n })\n // Route the rest of the inbound device events (wifi/hotspot/gallery -> stores+bus,\n // photo/stream -> coordinators, button/touch/accel/head -> miniapps, save_setting ->\n // store, miniapp_selected -> launcher) so a bare OEM gets device data, not just the\n // Mentra app's MantleManager.\n startDeviceEventRouter()\n // Hydration contract: the native DeviceStore is in-memory and starts empty\n // every launch; seed it from the persisted settings BEFORE start() resolves\n // so every post-start getDefaultDevice() read is a trustworthy two-state\n // answer (no false \"absent\" for genuinely-paired users at cold start).\n // Ordered before startGlassesSettingsSync so the settings load can't\n // double-push through the change subscription. A failed hydration must not\n // brick the runtime: start() continues, and the guards that consume\n // hasDefaultDevice() see the rejection and fail open.\n try {\n await hydrateDeviceStore()\n // Boot repair: a persisted default_wearable without a native default\n // device (identity abandoned mid-pairing, or resurrected from the server\n // before identity stopped syncing) demotes to pending_wearable so hosts\n // render finish-pairing instead of a connect that would throw.\n await demoteOrphanedDefaultWearable()\n } catch (error) {\n console.warn(\"engine.start: device-store hydration failed:\", error instanceof Error ? error.message : error)\n }\n // Project the glasses' OTA events into the store for the engine.ota read surface.\n startOtaService()\n // Forward glasses mic_lc3 frames to the v2 cloud session so cloud transcription\n // works for any host (not just the Mentra app's host-side MantleManager fork).\n startAudioCloudUplink()\n try {\n await cloudClientService.syncCoreTokenToBluetooth()\n } catch (error) {\n console.warn(\n \"engine.start: initial Cloud V2 core token sync failed:\",\n error instanceof Error ? error.message : error,\n )\n }\n startSupportProfileSync()\n // Push device-setting changes to the glasses for ANY host, so\n // engine.glasses.settings.set() reaches the device (not just the Mentra app).\n startGlassesSettingsSync()\n // Same for phone-notification config -> the native listener (Android).\n startPhoneNotificationsSync()\n // Android internal/e2e: laptop captions tester can broadcast a failure intent;\n // engine owns turning that into a Cloud V2 report.\n startCaptionsTesterReportService()\n // MentraJS crashloop-disabled is runtime state; engine owns filing the\n // automatic report while hosts only render alert/telemetry side effects.\n startMentraJSCrashloopReportService()\n // Bring up the local-miniapp engine so a bare OEM can run MentraJS miniapps:\n // the LocalMiniappRuntime (registry + WebView bridge), the MentraJS router\n // (crust-bound spawn/dispatch pump + launcher wiring), the DisplayProcessor\n // (layout arbitration over the engine stores), and the gallery-sync service.\n // All idempotent — when the Mentra app's host bootstrap also calls these, the\n // second call is a no-op. Host-only crashloop telemetry is attached\n // separately by the Mentra app.\n localMiniappRuntime.initialize()\n ensureMiniappEngine()\n displayProcessor.attachToRuntime()\n gallerySyncService.initialize()\n },\n /** Stop the runtime: tear down the settings sync + cloud client + mark stopped.\n * Each step is guarded so one failing teardown can't skip the rest and leak\n * the remaining runtime services. */\n async stop() {\n const safely = async (label: string, step: () => unknown): Promise<void> => {\n try {\n await step()\n } catch (error) {\n console.warn(`engine.stop: ${label} failed:`, error)\n }\n }\n await safely(\"glasses settings sync\", stopGlassesSettingsSync)\n await safely(\"glasses status projection\", stopGlassesStatusProjection)\n await safely(\"device event router\", stopDeviceEventRouter)\n await safely(\"ota service\", stopOtaService)\n await safely(\"audio cloud uplink\", stopAudioCloudUplink)\n await safely(\"support profile sync\", stopSupportProfileSync)\n await safely(\"phone notifications sync\", stopPhoneNotificationsSync)\n await safely(\"captions tester report service\", stopCaptionsTesterReportService)\n await safely(\"mentrajs crashloop report service\", stopMentraJSCrashloopReportService)\n await safely(\"miniapp engine\", stopMiniappEngine)\n await safely(\"local miniapp runtime\", () => localMiniappRuntime.cleanup())\n await safely(\"display processor\", () => displayProcessor.detachFromRuntime())\n await safely(\"gallery sync service\", () => gallerySyncService.cleanup())\n await safely(\"cloud client\", () => cloudClientService.stop())\n await safely(\"bootstrap\", bootstrapStop)\n },\n glasses,\n speech,\n /** Cloud (cloud-v2) live-session status + account ops — engine owns the client. */\n session,\n /** Typed keyed user settings over the engine-owned settings store. */\n settings,\n /** Developer/debug surface (backend+cloud URL overrides, reconnect, min version). */\n dev,\n /** Bug-report, automatic runtime report, and feedback submission. */\n reports,\n /** Firmware OTA read/observe surface (updateAvailable/status + on* subscriptions). */\n ota,\n /** Gallery sync: status/onStatus · onNotice (host renders) · sync/cancel. */\n gallery,\n /** Miniapp lifecycle (the WebView bridge primitives are exported separately). */\n miniapps,\n /** First-time glasses discovery + pairing. */\n pairing,\n /** Phone→glasses notification forwarding (Android). */\n phoneNotifications,\n /** OS permissions (check/request/openSettings + per-miniapp requirements). */\n permissions,\n /** Inbound alerts engine→host (crashloop, version-incompatible, connection loss). */\n notifications,\n display,\n}\n"]}
@@ -1,10 +1,10 @@
1
1
  export const ENGINE_RELEASE_METADATA = Object.freeze({
2
2
  "schemaVersion": 1,
3
3
  "familyBaseVersion": "3.2.0",
4
- "releaseIdentity": "3.2.0-dev.115",
5
- "releaseSetId": "mentra-3.2.0-dev.115",
6
- "sourceCommit": "2b72679767cc618eeeaa2a6fc2cc14f615a78f78",
7
- "otaManifestUrl": "https://github.com/Mentra-Community/MentraOS/releases/download/mentra-builds-v3.2.0/mentra-live-ota-3.2.0-dev.115.json",
8
- "otaManifestSha256": "f69762562177f8646784b4a7abb5815c84e2775059faaa31a9655b93d793dc1b"
4
+ "releaseIdentity": "3.2.0-dev.120",
5
+ "releaseSetId": "mentra-3.2.0-dev.120",
6
+ "sourceCommit": "1b8b39b87dc44799c88f414f088629df0f013850",
7
+ "otaManifestUrl": "https://github.com/Mentra-Community/MentraOS/releases/download/mentra-builds-v3.2.0/mentra-live-ota-3.2.0-dev.120.json",
8
+ "otaManifestSha256": "4a5e13392f0d395a33867331fed19e9e5980526bc1b7e78f6ba2711c9e9ae1df"
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,eAAe;IAClC,cAAc,EAAE,sBAAsB;IACtC,cAAc,EAAE,0CAA0C;IAC1D,gBAAgB,EAAE,wHAAwH;IAC1I,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.2.0\",\n \"releaseIdentity\": \"3.2.0-dev.115\",\n \"releaseSetId\": \"mentra-3.2.0-dev.115\",\n \"sourceCommit\": \"2b72679767cc618eeeaa2a6fc2cc14f615a78f78\",\n \"otaManifestUrl\": \"https://github.com/Mentra-Community/MentraOS/releases/download/mentra-builds-v3.2.0/mentra-live-ota-3.2.0-dev.115.json\",\n \"otaManifestSha256\": \"f69762562177f8646784b4a7abb5815c84e2775059faaa31a9655b93d793dc1b\"\n})\n"]}
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,eAAe;IAClC,cAAc,EAAE,sBAAsB;IACtC,cAAc,EAAE,0CAA0C;IAC1D,gBAAgB,EAAE,wHAAwH;IAC1I,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.2.0\",\n \"releaseIdentity\": \"3.2.0-dev.120\",\n \"releaseSetId\": \"mentra-3.2.0-dev.120\",\n \"sourceCommit\": \"1b8b39b87dc44799c88f414f088629df0f013850\",\n \"otaManifestUrl\": \"https://github.com/Mentra-Community/MentraOS/releases/download/mentra-builds-v3.2.0/mentra-live-ota-3.2.0-dev.120.json\",\n \"otaManifestSha256\": \"4a5e13392f0d395a33867331fed19e9e5980526bc1b7e78f6ba2711c9e9ae1df\"\n})\n"]}
@@ -1,4 +1,11 @@
1
1
  import type { StreamAudioConfig, StreamVideoConfig } from "./config";
2
2
  export declare const normalizeStreamVideoConfig: (value: unknown) => StreamVideoConfig | undefined;
3
3
  export declare const normalizeStreamAudioConfig: (value: unknown) => StreamAudioConfig | undefined;
4
+ /** Absent or non-boolean values keep the caller-supplied fallback (default true). */
5
+ export declare const normalizeCaptureAudio: (value: unknown, fallback?: boolean) => boolean;
6
+ /**
7
+ * Glasses capture is locked to the ACS source for the WHIP session.
8
+ * Phone/bluetooth never encode the glasses mic, even if a miniapp asks for it.
9
+ */
10
+ export declare const resolveCaptureAudio: (payload: unknown, source: "glasses" | "phone") => boolean;
4
11
  //# sourceMappingURL=streamConfig.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"streamConfig.d.ts","sourceRoot":"","sources":["../../src/runtime/streamConfig.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,iBAAiB,EAAE,iBAAiB,EAAC,MAAM,UAAU,CAAA;AAQlE,eAAO,MAAM,0BAA0B,GAAI,OAAO,OAAO,KAAG,iBAAiB,GAAG,SAa/E,CAAA;AAED,eAAO,MAAM,0BAA0B,GAAI,OAAO,OAAO,KAAG,iBAAiB,GAAG,SAU/E,CAAA"}
1
+ {"version":3,"file":"streamConfig.d.ts","sourceRoot":"","sources":["../../src/runtime/streamConfig.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,iBAAiB,EAAE,iBAAiB,EAAC,MAAM,UAAU,CAAA;AAQlE,eAAO,MAAM,0BAA0B,GAAI,OAAO,OAAO,KAAG,iBAAiB,GAAG,SAa/E,CAAA;AAED,eAAO,MAAM,0BAA0B,GAAI,OAAO,OAAO,KAAG,iBAAiB,GAAG,SAU/E,CAAA;AAED,qFAAqF;AACrF,eAAO,MAAM,qBAAqB,GAAI,OAAO,OAAO,EAAE,kBAAe,KAAG,OACzB,CAAA;AAE/C;;;GAGG;AACH,eAAO,MAAM,mBAAmB,GAC9B,SAAS,OAAO,EAChB,QAAQ,SAAS,GAAG,OAAO,KAC1B,OAAuE,CAAA"}
@@ -35,4 +35,11 @@ export const normalizeStreamAudioConfig = (value) => {
35
35
  config.noiseSuppression = value.noiseSuppression;
36
36
  return Object.keys(config).length > 0 ? config : undefined;
37
37
  };
38
+ /** Absent or non-boolean values keep the caller-supplied fallback (default true). */
39
+ export const normalizeCaptureAudio = (value, fallback = true) => typeof value === "boolean" ? value : fallback;
40
+ /**
41
+ * Glasses capture is locked to the ACS source for the WHIP session.
42
+ * Phone/bluetooth never encode the glasses mic, even if a miniapp asks for it.
43
+ */
44
+ export const resolveCaptureAudio = (payload, source) => source === "glasses" && normalizeCaptureAudio(payload, true);
38
45
  //# sourceMappingURL=streamConfig.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"streamConfig.js","sourceRoot":"","sources":["../../src/runtime/streamConfig.ts"],"names":[],"mappings":"AAEA,MAAM,QAAQ,GAAG,CAAC,KAAc,EAAoC,EAAE,CACpE,OAAO,KAA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AAM,CAAC,MAAM,0BAA0B,GAAG,CAAC,KAAc,EAAiC,EAAE;IAC1F,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC;QAAE,OAAO,SAAS,CAAA;IACtC,MAAM,MAAM,GAAsB,EAAE,CAAA;IACpC,MAAM,OAAO,GAAG,YAAY,CAAC,KAAK,CAAC,OAAO,CAAC,CAAA;IAC3C,MAAM,UAAU,GAAG,YAAY,CAAC,KAAK,CAAC,UAAU,CAAC,CAAA;IACjD,IAAI,OAAO,KAAK,SAAS;QAAE,MAAM,CAAC,OAAO,GAAG,OAAO,CAAA;IACnD,IAAI,UAAU,KAAK,SAAS;QAAE,MAAM,CAAC,UAAU,GAAG,UAAU,CAAA;IAC5D,IAAI,OAAO,KAAK,CAAC,gBAAgB,KAAK,SAAS;QAAE,MAAM,CAAC,gBAAgB,GAAG,KAAK,CAAC,gBAAgB,CAAA;IACjG,IAAI,OAAO,KAAK,CAAC,gBAAgB,KAAK,SAAS;QAAE,MAAM,CAAC,gBAAgB,GAAG,KAAK,CAAC,gBAAgB,CAAA;IACjG,OAAO,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,SAAS,CAAA;AAC5D,CAAC,CAAA","sourcesContent":["import type {StreamAudioConfig, StreamVideoConfig} from \"./config\"\n\nconst isRecord = (value: unknown): value is Record<string, unknown> =>\n typeof value === \"object\" && value !== null && !Array.isArray(value)\n\nconst finiteNumber = (value: unknown): number | undefined =>\n typeof value === \"number\" && Number.isFinite(value) ? value : undefined\n\nexport const normalizeStreamVideoConfig = (value: unknown): StreamVideoConfig | undefined => {\n if (!isRecord(value)) return undefined\n const config: StreamVideoConfig = {}\n const width = finiteNumber(value.width)\n const height = finiteNumber(value.height)\n const bitrate = finiteNumber(value.bitrate)\n const frameRate = finiteNumber(value.frameRate)\n const fps = frameRate ?? finiteNumber(value.fps)\n if (width !== undefined) config.width = width\n if (height !== undefined) config.height = height\n if (bitrate !== undefined) config.bitrate = bitrate\n if (fps !== undefined) config.fps = fps\n return Object.keys(config).length > 0 ? config : undefined\n}\n\nexport const normalizeStreamAudioConfig = (value: unknown): StreamAudioConfig | undefined => {\n if (!isRecord(value)) return undefined\n const config: StreamAudioConfig = {}\n const bitrate = finiteNumber(value.bitrate)\n const sampleRate = finiteNumber(value.sampleRate)\n if (bitrate !== undefined) config.bitrate = bitrate\n if (sampleRate !== undefined) config.sampleRate = sampleRate\n if (typeof value.echoCancellation === \"boolean\") config.echoCancellation = value.echoCancellation\n if (typeof value.noiseSuppression === \"boolean\") config.noiseSuppression = value.noiseSuppression\n return Object.keys(config).length > 0 ? config : undefined\n}\n"]}
1
+ {"version":3,"file":"streamConfig.js","sourceRoot":"","sources":["../../src/runtime/streamConfig.ts"],"names":[],"mappings":"AAEA,MAAM,QAAQ,GAAG,CAAC,KAAc,EAAoC,EAAE,CACpE,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,KAAK,IAAI,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAA;AAEtE,MAAM,YAAY,GAAG,CAAC,KAAc,EAAsB,EAAE,CAC1D,OAAO,KAAK,KAAK,QAAQ,IAAI,MAAM,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,SAAS,CAAA;AAEzE,MAAM,CAAC,MAAM,0BAA0B,GAAG,CAAC,KAAc,EAAiC,EAAE;IAC1F,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC;QAAE,OAAO,SAAS,CAAA;IACtC,MAAM,MAAM,GAAsB,EAAE,CAAA;IACpC,MAAM,KAAK,GAAG,YAAY,CAAC,KAAK,CAAC,KAAK,CAAC,CAAA;IACvC,MAAM,MAAM,GAAG,YAAY,CAAC,KAAK,CAAC,MAAM,CAAC,CAAA;IACzC,MAAM,OAAO,GAAG,YAAY,CAAC,KAAK,CAAC,OAAO,CAAC,CAAA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AC,gBAAgB,CAAA;IACjG,OAAO,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,SAAS,CAAA;AAC5D,CAAC,CAAA;AAED,qFAAqF;AACrF,MAAM,CAAC,MAAM,qBAAqB,GAAG,CAAC,KAAc,EAAE,QAAQ,GAAG,IAAI,EAAW,EAAE,CAChF,OAAO,KAAK,KAAK,SAAS,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,QAAQ,CAAA;AAE/C;;;GAGG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAAG,CACjC,OAAgB,EAChB,MAA2B,EAClB,EAAE,CAAC,MAAM,KAAK,SAAS,IAAI,qBAAqB,CAAC,OAAO,EAAE,IAAI,CAAC,CAAA","sourcesContent":["import type {StreamAudioConfig, StreamVideoConfig} from \"./config\"\n\nconst isRecord = (value: unknown): value is Record<string, unknown> =>\n typeof value === \"object\" && value !== null && !Array.isArray(value)\n\nconst finiteNumber = (value: unknown): number | undefined =>\n typeof value === \"number\" && Number.isFinite(value) ? value : undefined\n\nexport const normalizeStreamVideoConfig = (value: unknown): StreamVideoConfig | undefined => {\n if (!isRecord(value)) return undefined\n const config: StreamVideoConfig = {}\n const width = finiteNumber(value.width)\n const height = finiteNumber(value.height)\n const bitrate = finiteNumber(value.bitrate)\n const frameRate = finiteNumber(value.frameRate)\n const fps = frameRate ?? finiteNumber(value.fps)\n if (width !== undefined) config.width = width\n if (height !== undefined) config.height = height\n if (bitrate !== undefined) config.bitrate = bitrate\n if (fps !== undefined) config.fps = fps\n return Object.keys(config).length > 0 ? config : undefined\n}\n\nexport const normalizeStreamAudioConfig = (value: unknown): StreamAudioConfig | undefined => {\n if (!isRecord(value)) return undefined\n const config: StreamAudioConfig = {}\n const bitrate = finiteNumber(value.bitrate)\n const sampleRate = finiteNumber(value.sampleRate)\n if (bitrate !== undefined) config.bitrate = bitrate\n if (sampleRate !== undefined) config.sampleRate = sampleRate\n if (typeof value.echoCancellation === \"boolean\") config.echoCancellation = value.echoCancellation\n if (typeof value.noiseSuppression === \"boolean\") config.noiseSuppression = value.noiseSuppression\n return Object.keys(config).length > 0 ? config : undefined\n}\n\n/** Absent or non-boolean values keep the caller-supplied fallback (default true). */\nexport const normalizeCaptureAudio = (value: unknown, fallback = true): boolean =>\n typeof value === \"boolean\" ? value : fallback\n\n/**\n * Glasses capture is locked to the ACS source for the WHIP session.\n * Phone/bluetooth never encode the glasses mic, even if a miniapp asks for it.\n */\nexport const resolveCaptureAudio = (\n payload: unknown,\n source: \"glasses\" | \"phone\",\n): boolean => source === \"glasses\" && normalizeCaptureAudio(payload, true)\n"]}
@@ -0,0 +1,154 @@
1
+ /**
2
+ * Host-side ACS meeting controller. One active meeting. Native module owns
3
+ * WHEP + ACS; this service maps that into miniapp envelopes and pipes
4
+ * incoming PCM into AudioPlaybackService (A2DP / PcmStreamPlayer).
5
+ */
6
+ import { ACS_CALL_MIC, type ResolvedAudioSource, type SourceReason } from "./acsAudioSource";
7
+ export { ACS_CALL_MIC };
8
+ export type { ResolvedAudioSource, SourceReason };
9
+ type MeetingPhase = "idle" | "connecting" | "lobby" | "connected" | "disconnected" | "error";
10
+ export type AudioSafety = "safe" | "degraded" | "unsafe";
11
+ export type ActiveStream = "none" | "virtual" | "local";
12
+ /**
13
+ * Health of the glasses WHEP subscription that feeds the call. `failed` means ICE
14
+ * dropped or the WHEP endpoint went away (glasses stopped publishing, phone changed
15
+ * networks); the ACS call itself may still be `connected` with a frozen last frame.
16
+ */
17
+ export type MediaSourceState = "idle" | "connecting" | "live" | "failed";
18
+ export type MeetingParticipantState = "idle" | "connecting" | "connected" | "lobby" | "hold" | "disconnected";
19
+ export interface MeetingParticipant {
20
+ id: string;
21
+ displayName: string | null;
22
+ state: MeetingParticipantState;
23
+ isMuted: boolean;
24
+ isSpeaking: boolean;
25
+ }
26
+ export interface MeetingState {
27
+ state: MeetingPhase;
28
+ muted: boolean;
29
+ error?: string;
30
+ meetingUrl?: string;
31
+ provider?: "acs-teams";
32
+ audioSource?: "glasses" | "phone";
33
+ audioSourceReason?: SourceReason;
34
+ activeStream?: ActiveStream;
35
+ audioSafety?: AudioSafety;
36
+ mediaSource?: MediaSourceState;
37
+ participants?: MeetingParticipant[];
38
+ }
39
+ /**
40
+ * The call microphone is [ACS_CALL_MIC]. Flip that constant to `"glasses"`
41
+ * to restore glasses WHIP → Cloudflare → WHEP PCM. Do not use ACS
42
+ * LocalOutgoingAudioStream for phone: that path makes ACS own the route
43
+ * (MODE_IN_COMMUNICATION + forced speaker) and opens an echo loop.
44
+ * preferred_mic governs MentraOS STT capture, not this call.
45
+ */
46
+ export declare function resolveAcsAudioSource(): ResolvedAudioSource;
47
+ export declare function parseMeetingParticipants(raw: unknown): MeetingParticipant[] | undefined;
48
+ export type AcsOutgoingVideo = {
49
+ width: number;
50
+ height: number;
51
+ fps: number;
52
+ maxBitrateBps: number;
53
+ };
54
+ export declare function parseAcsOutgoingVideo(raw: unknown): AcsOutgoingVideo | undefined;
55
+ type NativeModule = {
56
+ join(options: {
57
+ meetingUrl: string;
58
+ token: string;
59
+ whepUrl: string;
60
+ displayName?: string;
61
+ dumpPcmWav?: boolean;
62
+ audioSource?: "glasses" | "phone";
63
+ video?: AcsOutgoingVideo;
64
+ }): Promise<MeetingState>;
65
+ leave(): Promise<void>;
66
+ setMuted(muted: boolean): Promise<MeetingState>;
67
+ setAudioSource(source: "glasses" | "phone"): Promise<MeetingState>;
68
+ updateVideoSource(whepUrl: string): Promise<void>;
69
+ /** Force a WHEP rebuild on the current URL. Absent on natives that predate it. */
70
+ restartVideoSource?(): Promise<void>;
71
+ getState(): Promise<MeetingState>;
72
+ addListener(event: string, listener: (event: Record<string, unknown>) => void): {
73
+ remove: () => void;
74
+ };
75
+ };
76
+ /** Test seam: skip the native require and inject a fake ACS module. */
77
+ export declare function setAcsMeetingNativeForTests(mod: NativeModule | null | undefined): void;
78
+ /**
79
+ * Phone connectivity feed. Only the subset of `@react-native-community/netinfo`
80
+ * this service needs, so tests can inject a fake and hosts without the package
81
+ * (or a bare test runtime) degrade to "no phone-network awareness" instead of
82
+ * failing to load the meeting service.
83
+ */
84
+ export type PhoneNetworkInfo = {
85
+ type: string;
86
+ isConnected: boolean | null;
87
+ };
88
+ type PhoneNetworkSource = {
89
+ addEventListener(listener: (state: PhoneNetworkInfo) => void): () => void;
90
+ };
91
+ /** Test seam: inject a fake phone-network feed (or `null` to disable it). */
92
+ export declare function setAcsMeetingPhoneNetworkForTests(source: PhoneNetworkSource | null | undefined): void;
93
+ declare class AcsMeetingService {
94
+ private owner;
95
+ private pcmStreamId;
96
+ private pcmFormat;
97
+ private pcmReopen;
98
+ private pcmWriteChain;
99
+ private lastBacklogWarnAt;
100
+ private subscriptions;
101
+ private lastState;
102
+ private onState;
103
+ /** WHEP URL native is (or should be) subscribed to; what a host-triggered restart re-feeds. */
104
+ private whepUrl;
105
+ private phoneNetworkUnsub;
106
+ private lastPhoneNetworkKey;
107
+ private lastMediaRestartAt;
108
+ setStateHandler(handler: (packageName: string, state: MeetingState) => void): void;
109
+ getState(): MeetingState;
110
+ ownerPackage(): string | null;
111
+ join(packageName: string, args: {
112
+ meetingUrl: string;
113
+ token: string;
114
+ whepUrl: string;
115
+ displayName?: string;
116
+ video?: AcsOutgoingVideo;
117
+ }): Promise<MeetingState>;
118
+ leave(packageName: string): Promise<void>;
119
+ /**
120
+ * Drop everything the host set up around a session: the network watcher, return
121
+ * audio, native listeners, ownership. Runs after native has been told to leave
122
+ * (or after a join that never produced a native call).
123
+ */
124
+ private releaseHostState;
125
+ setMuted(packageName: string, muted: boolean): Promise<MeetingState>;
126
+ updateVideoSource(packageName: string, whepUrl: string): Promise<void>;
127
+ readState(packageName: string): Promise<MeetingState>;
128
+ leaveIfOwner(packageName: string): Promise<void>;
129
+ private assertOwner;
130
+ private unbindNative;
131
+ private bindNative;
132
+ /**
133
+ * The WHEP PeerConnection does not survive the phone changing networks
134
+ * (Wi-Fi↔cellular, or a different Wi-Fi): ICE fails and native parks the source
135
+ * as `failed` while the ACS call itself reconnects on its own. Nudge native to
136
+ * rebuild the subscription whenever the phone's network identity changes during
137
+ * a live meeting. Native ignores the request when the source is healthy on the
138
+ * same URL, so a spurious event costs nothing.
139
+ */
140
+ private watchPhoneNetwork;
141
+ private unwatchPhoneNetwork;
142
+ private restartMediaSource;
143
+ /**
144
+ * Native normalizes to 16 kHz mono, so this is normally a straight write.
145
+ * If the format ever differs, reopen the player to match rather than play
146
+ * the bytes at the wrong rate (that is what slows and deepens the audio).
147
+ */
148
+ private writeIncomingPcm;
149
+ private ensurePcmPlayback;
150
+ private stopPcm;
151
+ }
152
+ declare const acsMeetingService: AcsMeetingService;
153
+ export default acsMeetingService;
154
+ //# sourceMappingURL=AcsMeetingService.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AcsMeetingService.d.ts","sourceRoot":"","sources":["../../src/services/AcsMeetingService.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAIH,OAAO,EAAC,YAAY,EAAE,KAAK,mBAAmB,EAAE,KAAK,YAAY,EAAC,MAAM,kBAAkB,CAAA;AAE1F,OAAO,EAAC,YAAY,EAAC,CAAA;AACrB,YAAY,EAAC,mBAAmB,EAAE,YAAY,EAAC,CAAA;AAE/C,KAAK,YAAY,GAAG,MAAM,GAAG,YAAY,GAAG,OAAO,GAAG,WAAW,GAAG,cAAc,GAAG,OAAO,CAAA;AAE5F,MAAM,MAAM,WAAW,GAAG,MAAM,GAAG,UAAU,GAAG,QAAQ,CAAA;AACxD,MAAM,MAAM,YAAY,GAAG,MAAM,GAAG,SAAS,GAAG,OAAO,CAAA;AACvD;;;;GAIG;AACH,MAAM,MAAM,gBAAgB,GAAG,MAAM,GAAG,YAAY,GAAG,MAAM,GAAG,QAAQ,CAAA;AAExE,MAAM,MAAM,uBAAuB,GAAG,MAAM,GAAG,YAAY,GAAG,WAAW,GAAG,OAAO,GAAG,MAAM,GAA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