@glassly/engine 0.3.0-dev.491 → 0.3.1-beta.527
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/engine.d.ts +9 -2
- package/build/engine.d.ts.map +1 -1
- package/build/engine.js +5 -0
- package/build/engine.js.map +1 -1
- package/build/facades/dev.js +1 -1
- package/build/facades/dev.js.map +1 -1
- package/build/facades/miniapps.d.ts +5 -5
- package/build/facades/miniapps.d.ts.map +1 -1
- package/build/facades/miniapps.js +5 -6
- package/build/facades/miniapps.js.map +1 -1
- package/build/facades/speech.d.ts +10 -0
- package/build/facades/speech.d.ts.map +1 -1
- package/build/facades/speech.js +10 -0
- package/build/facades/speech.js.map +1 -1
- package/build/generated/releaseMetadata.js +4 -4
- package/build/generated/releaseMetadata.js.map +1 -1
- package/build/index.d.ts +1 -1
- package/build/index.d.ts.map +1 -1
- package/build/index.js +1 -1
- package/build/index.js.map +1 -1
- package/build/services/AppRegistry.d.ts +1 -7
- package/build/services/AppRegistry.d.ts.map +1 -1
- package/build/services/AppRegistry.js +15 -26
- package/build/services/AppRegistry.js.map +1 -1
- package/build/services/DevServerBridge.d.ts +1 -1
- package/build/services/DevServerBridge.js +2 -2
- package/build/services/DevServerBridge.js.map +1 -1
- package/build/services/DeviceEventRouter.d.ts.map +1 -1
- package/build/services/DeviceEventRouter.js +2 -0
- package/build/services/DeviceEventRouter.js.map +1 -1
- package/build/services/JSRouter.js +1 -1
- package/build/services/JSRouter.js.map +1 -1
- package/build/services/LocalMiniappRuntime.d.ts +21 -6
- package/build/services/LocalMiniappRuntime.d.ts.map +1 -1
- package/build/services/LocalMiniappRuntime.js +130 -48
- package/build/services/LocalMiniappRuntime.js.map +1 -1
- package/build/services/LocalTranslationService.d.ts +51 -0
- package/build/services/LocalTranslationService.d.ts.map +1 -0
- package/build/services/LocalTranslationService.js +141 -0
- package/build/services/LocalTranslationService.js.map +1 -0
- package/build/services/MiniappLauncher.d.ts +17 -23
- package/build/services/MiniappLauncher.d.ts.map +1 -1
- package/build/services/MiniappLauncher.js +30 -34
- package/build/services/MiniappLauncher.js.map +1 -1
- package/build/services/MiniappPauseCoordinator.d.ts +15 -0
- package/build/services/MiniappPauseCoordinator.d.ts.map +1 -0
- package/build/services/MiniappPauseCoordinator.js +93 -0
- package/build/services/MiniappPauseCoordinator.js.map +1 -0
- package/build/services/OfflineTranslationManager.d.ts +19 -0
- package/build/services/OfflineTranslationManager.d.ts.map +1 -0
- package/build/services/OfflineTranslationManager.js +35 -0
- package/build/services/OfflineTranslationManager.js.map +1 -0
- package/build/services/pages/OverlayPages.d.ts +5 -5
- package/build/services/pages/OverlayPages.d.ts.map +1 -1
- package/build/services/pages/OverlayPages.js +5 -5
- package/build/services/pages/OverlayPages.js.map +1 -1
- package/build/services/pages/overlayApps.d.ts +14 -11
- package/build/services/pages/overlayApps.d.ts.map +1 -1
- package/build/services/pages/overlayApps.js +21 -19
- package/build/services/pages/overlayApps.js.map +1 -1
- package/build/services/settingsBridge.d.ts +8 -8
- package/build/services/settingsBridge.d.ts.map +1 -1
- package/build/services/settingsBridge.js +12 -13
- package/build/services/settingsBridge.js.map +1 -1
- package/build/stores/apps.d.ts +0 -5
- package/build/stores/apps.d.ts.map +1 -1
- package/build/stores/apps.js +32 -52
- package/build/stores/apps.js.map +1 -1
- package/build/stores/settings.d.ts.map +1 -1
- package/build/stores/settings.js +0 -10
- package/build/stores/settings.js.map +1 -1
- package/build/types/applet.d.ts +3 -1
- package/build/types/applet.d.ts.map +1 -1
- package/build/types/applet.js.map +1 -1
- package/build/types/capabilities/even-realities-g1.d.ts.map +1 -1
- package/build/types/capabilities/even-realities-g1.js +1 -0
- package/build/types/capabilities/even-realities-g1.js.map +1 -1
- package/build/types/capabilities/even-realities-g2.d.ts.map +1 -1
- package/build/types/capabilities/even-realities-g2.js +1 -0
- package/build/types/capabilities/even-realities-g2.js.map +1 -1
- package/build/types/capabilities/mentra-display.d.ts.map +1 -1
- package/build/types/capabilities/mentra-display.js +1 -0
- package/build/types/capabilities/mentra-display.js.map +1 -1
- package/build/types/capabilities/nimo.d.ts.map +1 -1
- package/build/types/capabilities/nimo.js +1 -0
- package/build/types/capabilities/nimo.js.map +1 -1
- package/build/types/hardware.d.ts +9 -0
- package/build/types/hardware.d.ts.map +1 -1
- package/build/types/hardware.js +2 -0
- package/build/types/hardware.js.map +1 -1
- package/build/utils/miniappGlobals.js +1 -1
- package/build/utils/miniappGlobals.js.map +1 -1
- package/package.json +7 -7
- package/src/engine.ts +5 -0
- package/src/facades/dev.ts +1 -1
- package/src/facades/miniapps.ts +7 -7
- package/src/facades/speech.ts +12 -0
- package/src/generated/releaseMetadata.ts +4 -4
- package/src/index.ts +0 -2
- package/src/services/AppRegistry.ts +15 -27
- package/src/services/DevServerBridge.ts +2 -2
- package/src/services/DeviceEventRouter.ts +2 -0
- package/src/services/JSRouter.ts +1 -1
- package/src/services/LocalMiniappRuntime.ts +165 -66
- package/src/services/LocalTranslationService.ts +184 -0
- package/src/services/MiniappLauncher.ts +31 -34
- package/src/services/MiniappPauseCoordinator.ts +100 -0
- package/src/services/OfflineTranslationManager.ts +40 -0
- package/src/services/pages/OverlayPages.ts +5 -5
- package/src/services/pages/overlayApps.ts +19 -19
- package/src/services/settingsBridge.ts +12 -13
- package/src/stores/apps.ts +30 -58
- package/src/stores/settings.ts +0 -10
- package/src/types/applet.ts +3 -1
- package/src/types/capabilities/even-realities-g1.ts +1 -0
- package/src/types/capabilities/even-realities-g2.ts +1 -0
- package/src/types/capabilities/mentra-display.ts +1 -0
- package/src/types/capabilities/nimo.ts +1 -0
- package/src/types/hardware.ts +9 -0
- package/src/utils/miniappGlobals.ts +1 -1
- package/build/services/pages/activeDashboard.d.ts +0 -7
- package/build/services/pages/activeDashboard.d.ts.map +0 -1
- package/build/services/pages/activeDashboard.js +0 -21
- package/build/services/pages/activeDashboard.js.map +0 -1
- package/src/services/pages/activeDashboard.ts +0 -24
package/build/engine.d.ts
CHANGED
|
@@ -107,6 +107,13 @@ export declare const engine: {
|
|
|
107
107
|
reason: "invalid_key" | "network";
|
|
108
108
|
}>;
|
|
109
109
|
};
|
|
110
|
+
translation: {
|
|
111
|
+
isSupported: () => boolean;
|
|
112
|
+
sourceLanguage: () => string;
|
|
113
|
+
languages: (source: string) => Promise<import("@glassly/bluetooth-sdk").OfflineTranslationLanguage[]>;
|
|
114
|
+
status: (source: string, target: string) => Promise<import("@glassly/bluetooth-sdk").OfflineTranslationStatus>;
|
|
115
|
+
download: (source: string, target: string) => Promise<import("@glassly/bluetooth-sdk").OfflineTranslationStatus>;
|
|
116
|
+
};
|
|
110
117
|
tts: {
|
|
111
118
|
currentLanguage: () => string;
|
|
112
119
|
languages: () => import("./services/TTSModelManager").TTSLanguageConfig[];
|
|
@@ -218,6 +225,7 @@ export declare const engine: {
|
|
|
218
225
|
start: (app: import("./types").ClientApp, opts?: import(".").StartOptions | undefined) => Promise<boolean>;
|
|
219
226
|
stop: (packageName: string) => Promise<void>;
|
|
220
227
|
setForeground: (packageName: string) => Promise<void>;
|
|
228
|
+
deliverLink: (packageName: string, params: Record<string, string>) => void;
|
|
221
229
|
clearForeground: () => void;
|
|
222
230
|
stopAll: () => import("typesafe-ts").AsyncResult<void, Error>;
|
|
223
231
|
install: (url: string, opts?: {
|
|
@@ -228,8 +236,7 @@ export declare const engine: {
|
|
|
228
236
|
setHiddenStatus: (packageName: string, status: boolean) => void;
|
|
229
237
|
setAlwaysOn: (packageName: string, status: boolean) => Promise<void>;
|
|
230
238
|
dashboards: () => import("./types").ClientApp[];
|
|
231
|
-
|
|
232
|
-
setActiveDashboard: (packageName: string) => Promise<void>;
|
|
239
|
+
runningDashboard: () => import("./types").ClientApp | null;
|
|
233
240
|
};
|
|
234
241
|
/** First-time glasses discovery + pairing. */
|
|
235
242
|
pairing: {
|
package/build/engine.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"engine.d.ts","sourceRoot":"","sources":["../src/engine.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AACH,OAAO,EAAC,SAAS,EAAkD,aAAa,EAAC,MAAM,qBAAqB,CAAA;
|
|
1
|
+
{"version":3,"file":"engine.d.ts","sourceRoot":"","sources":["../src/engine.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AACH,OAAO,EAAC,SAAS,EAAkD,aAAa,EAAC,MAAM,qBAAqB,CAAA;AA2C5G,eAAO,MAAM,MAAM;IACjB,2EAA2E;;IAE3E,8EAA8E;;IAE9E;iDAC6C;;IA8F7C;;yCAEqC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAkCrC,mFAAmF;;;;;;;;IAEnF,sEAAsE;;;;;;;;;;;;IAEtE,qFAAqF;;;;gBAtHnF,CADD;mBAAiB,CAAC;;;gBAUjB,CAJC;mBAAiB,CAAC;;;;;;;;;;;;;;;;;IAmHrB,qEAAqE;;;;IAErE,sFAAsF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAEtF,6EAA6E;;;;;;;;;;;;IAE7E,iFAAiF;;;;;;;;;;;;;;;;;;;;;;;IAEjF,8CAA8C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAE9C,uDAAuD;;;;;;;;;;;;;;;;IAEvD,8EAA8E;;;;;;;;IAE9E,qFAAqF;;;;IAErF,4EAA4E;;;;;;;;;;;IAE5E,+EAA+E;;;;;;;;;;;;IAE/E,kFAAkF;;;;;+BA9I3D,CAAC;;;+BAWtB,CAAA;;;;;;;;;;;;IAqIF,mFAAmF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAGpF,CAAA"}
|
package/build/engine.js
CHANGED
|
@@ -12,6 +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 { startPairedGlassesLatch, stopPairedGlassesLatch } from "./services/PairedGlassesLatch";
|
|
15
|
+
import { startMiniappPauseCoordinator, stopMiniappPauseCoordinator } from "./services/MiniappPauseCoordinator";
|
|
15
16
|
import { startGlassesSettingsSync, stopGlassesSettingsSync } from "./services/GlassesSettingsSync";
|
|
16
17
|
import { startGlassesStatusProjection, stopGlassesStatusProjection } from "./services/GlassesStatusProjection";
|
|
17
18
|
import { startOtaService, stopOtaService } from "./services/OtaService";
|
|
@@ -102,6 +103,9 @@ export const engine = {
|
|
|
102
103
|
}
|
|
103
104
|
// After the settings load so an already-paired phone latches on this start.
|
|
104
105
|
startPairedGlassesLatch();
|
|
106
|
+
// Pause local miniapps while the paired glasses stay disconnected. Reads
|
|
107
|
+
// the pairing identity, so after the settings load like the latch.
|
|
108
|
+
startMiniappPauseCoordinator();
|
|
105
109
|
// Project the glasses' OTA events into the store for the engine.ota read surface.
|
|
106
110
|
startOtaService();
|
|
107
111
|
// Forward glasses mic_lc3 frames to the v2 cloud session so cloud transcription
|
|
@@ -158,6 +162,7 @@ export const engine = {
|
|
|
158
162
|
};
|
|
159
163
|
await safely("glasses settings sync", stopGlassesSettingsSync);
|
|
160
164
|
await safely("paired glasses latch", stopPairedGlassesLatch);
|
|
165
|
+
await safely("miniapp pause coordinator", stopMiniappPauseCoordinator);
|
|
161
166
|
await safely("glasses status projection", stopGlassesStatusProjection);
|
|
162
167
|
await safely("device event router", stopDeviceEventRouter);
|
|
163
168
|
await safely("page host", () => pageHost.stop());
|
package/build/engine.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
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,q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,CAAC,kBAAkB,CAAC,QAAQ,EAAE,CAAC,CAAA;QACjE,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,4EAA4E;IAC5E,IAAI;IACJ,+EAA+E;IAC/E,MAAM;IACN,kFAAkF;IAClF,QAAQ;IACR,mFAAmF;IACnF,YAAY;IACZ,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 `@glassly/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 Glassly 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 {startPairedGlassesLatch, stopPairedGlassesLatch} from \"./services/PairedGlassesLatch\"\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 sonioxDirectService from \"./services/soniox/SonioxDirectService\"\nimport {startSupportProfileSync, stopSupportProfileSync} from \"./services/SupportProfileSync\"\nimport {startDeviceEventRouter, stopDeviceEventRouter} from \"./services/DeviceEventRouter\"\nimport {startPhoneActivityTracking, stopPhoneActivityTracking} from \"./services/PhoneActivity\"\nimport {startPhoneNotificationsSync, stopPhoneNotificationsSync} from \"./services/PhoneNotificationsSync\"\nimport {startSpeakerIdSync, stopSpeakerIdSync} from \"./services/SpeakerIdSync\"\nimport {startCaptionsTesterReportService, stopCaptionsTesterReportService} from \"./services/CaptionsTesterReportService\"\nimport {startJSCrashloopReportService, stopJSCrashloopReportService} from \"./services/JSCrashloopReportService\"\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 {maps} from \"./facades/maps\"\nimport {memory} from \"./facades/memory\"\nimport {speakers} from \"./facades/speakers\"\nimport {providerKeys} from \"./facades/providerKeys\"\nimport {logBuffer} from \"./utils/devLogging\"\nimport pageHost from \"./services/pages/PageHost\"\nimport gestureDotsService from \"./services/GestureDotsService\"\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 Glassly 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 // Lock + foreground state, read by the dashboard's notification gate and\n // the G2 notification ctrl below; up before either consumer.\n startPhoneActivityTracking()\n // The overlay slot's owner: the designated dashboard miniapp's page shows\n // through it (ADR-0006), so it is up before the miniapp runtime.\n pageHost.start()\n gestureDotsService.start()\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 // Glassly 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 // After the settings load so an already-paired phone latches on this start.\n startPairedGlassesLatch()\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 Glassly app's host-side MantleManager fork).\n startAudioCloudUplink()\n // Phone -> Soniox direct transcription (user-supplied API key). Started\n // after device-store hydration so the persisted key is already loaded.\n sonioxDirectService.start()\n // Not awaited: the exchange behind it is a Core round trip with no client\n // deadline, and start() must resolve offline. The glasses get the token\n // when it lands; identity resolution joins the same single-flight exchange.\n void cloudClientService.syncCoreTokenToBluetooth().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 Glassly app).\n startGlassesSettingsSync()\n // Same for phone-notification config -> the native listener (Android).\n startPhoneNotificationsSync()\n // On-device speaker identification: sync the enabled setting + enrolled\n // profile centroids to the native SpeakerIdEngine, and start the resolver\n // that annotates cloud transcripts with resolved speaker identities.\n startSpeakerIdSync()\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 // JSRuntime crashloop-disabled is runtime state; engine owns filing the\n // automatic report while hosts only render alert/telemetry side effects.\n startJSCrashloopReportService()\n // Bring up the local-miniapp engine so a bare OEM can run JSRuntime miniapps:\n // the LocalMiniappRuntime (registry + WebView bridge), the JSRuntime 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 Glassly 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 Glassly 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(\"paired glasses latch\", stopPairedGlassesLatch)\n await safely(\"glasses status projection\", stopGlassesStatusProjection)\n await safely(\"device event router\", stopDeviceEventRouter)\n await safely(\"page host\", () => pageHost.stop())\n await safely(\"gesture dots service\", () => gestureDotsService.stop())\n await safely(\"ota service\", stopOtaService)\n await safely(\"audio cloud uplink\", stopAudioCloudUplink)\n await safely(\"soniox direct service\", () => sonioxDirectService.stop())\n await safely(\"support profile sync\", stopSupportProfileSync)\n await safely(\"phone notifications sync\", stopPhoneNotificationsSync)\n await safely(\"phone activity tracking\", stopPhoneActivityTracking)\n await safely(\"speaker id sync\", stopSpeakerIdSync)\n await safely(\"captions tester report service\", stopCaptionsTesterReportService)\n await safely(\"js crashloop report service\", stopJSCrashloopReportService)\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.shutdown())\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 /** Maps providers — user-supplied Mapbox access token (Settings > Keys). */\n maps,\n /** Shared user-scoped memory timeline (Settings > Memory + session.memory). */\n memory,\n /** Device-local voice profiles for on-device speaker ID (Settings > Speakers). */\n speakers,\n /** AI/voice provider key validation — user-supplied keys (Settings > API Keys). */\n providerKeys,\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,uBAAuB,EAAE,sBAAsB,EAAC,MAAM,+BAA+B,CAAA;AAC7F,OAAO,EAAC,4BAA4B,EAAE,2BAA2B,EAAC,MAAM,oCAAoC,CAAA;AAC5G,OAAO,EAAC,wBAAwB,EAAE,uBAAuB,EAAC,MAAM,gCAAgC,CAAA;AAChG,OAAO,EAAC,4BAA4B,EAAE,2BAA2B,EAAC,MAAM,oCAAoC,CAAA;AAC5G,OAAO,EAAC,eAAe,EAAE,cAAc,EAAC,MAAM,uBAAuB,CAAA;AACrE,OAAO,EAAC,qBAAqB,EAAE,oBAAoB,EAAC,MAAM,6BAA6B,CAAA;AACvF,OAAO,mBAAmB,MAAM,uCAAuC,CAAA;AACvE,OAAO,EAAC,uBAAuB,EAAE,sBAAsB,EAAC,MAAM,+BAA+B,CAAA;AAC7F,OAAO,EAAC,sBAAsB,EAAE,qBAAqB,EAAC,MAAM,8BAA8B,CAAA;AAC1F,OAAO,EAAC,0BAA0B,EAAE,yBAAyB,EAAC,MAAM,0BAA0B,CAAA;AAC9F,OAAO,EAAC,2BAA2B,EAAE,0B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E,yBAAyB,CAAC,CAAA;QAClE,MAAM,MAAM,CAAC,iBAAiB,EAAE,iBAAiB,CAAC,CAAA;QAClD,MAAM,MAAM,CAAC,gCAAgC,EAAE,+BAA+B,CAAC,CAAA;QAC/E,MAAM,MAAM,CAAC,6BAA6B,EAAE,4BAA4B,CAAC,CAAA;QACzE,MAAM,MAAM,CAAC,gBAAgB,EAAE,iBAAiB,CAAC,CAAA;QACjD,MAAM,MAAM,CAAC,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,QAAQ,EAAE,CAAC,CAAA;QACjE,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,4EAA4E;IAC5E,IAAI;IACJ,+EAA+E;IAC/E,MAAM;IACN,kFAAkF;IAClF,QAAQ;IACR,mFAAmF;IACnF,YAAY;IACZ,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 `@glassly/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 Glassly 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 {startPairedGlassesLatch, stopPairedGlassesLatch} from \"./services/PairedGlassesLatch\"\nimport {startMiniappPauseCoordinator, stopMiniappPauseCoordinator} from \"./services/MiniappPauseCoordinator\"\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 sonioxDirectService from \"./services/soniox/SonioxDirectService\"\nimport {startSupportProfileSync, stopSupportProfileSync} from \"./services/SupportProfileSync\"\nimport {startDeviceEventRouter, stopDeviceEventRouter} from \"./services/DeviceEventRouter\"\nimport {startPhoneActivityTracking, stopPhoneActivityTracking} from \"./services/PhoneActivity\"\nimport {startPhoneNotificationsSync, stopPhoneNotificationsSync} from \"./services/PhoneNotificationsSync\"\nimport {startSpeakerIdSync, stopSpeakerIdSync} from \"./services/SpeakerIdSync\"\nimport {startCaptionsTesterReportService, stopCaptionsTesterReportService} from \"./services/CaptionsTesterReportService\"\nimport {startJSCrashloopReportService, stopJSCrashloopReportService} from \"./services/JSCrashloopReportService\"\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 {maps} from \"./facades/maps\"\nimport {memory} from \"./facades/memory\"\nimport {speakers} from \"./facades/speakers\"\nimport {providerKeys} from \"./facades/providerKeys\"\nimport {logBuffer} from \"./utils/devLogging\"\nimport pageHost from \"./services/pages/PageHost\"\nimport gestureDotsService from \"./services/GestureDotsService\"\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 Glassly 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 // Lock + foreground state, read by the dashboard's notification gate and\n // the G2 notification ctrl below; up before either consumer.\n startPhoneActivityTracking()\n // The overlay slot's owner: the designated dashboard miniapp's page shows\n // through it (ADR-0006), so it is up before the miniapp runtime.\n pageHost.start()\n gestureDotsService.start()\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 // Glassly 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 // After the settings load so an already-paired phone latches on this start.\n startPairedGlassesLatch()\n // Pause local miniapps while the paired glasses stay disconnected. Reads\n // the pairing identity, so after the settings load like the latch.\n startMiniappPauseCoordinator()\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 Glassly app's host-side MantleManager fork).\n startAudioCloudUplink()\n // Phone -> Soniox direct transcription (user-supplied API key). Started\n // after device-store hydration so the persisted key is already loaded.\n sonioxDirectService.start()\n // Not awaited: the exchange behind it is a Core round trip with no client\n // deadline, and start() must resolve offline. The glasses get the token\n // when it lands; identity resolution joins the same single-flight exchange.\n void cloudClientService.syncCoreTokenToBluetooth().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 Glassly app).\n startGlassesSettingsSync()\n // Same for phone-notification config -> the native listener (Android).\n startPhoneNotificationsSync()\n // On-device speaker identification: sync the enabled setting + enrolled\n // profile centroids to the native SpeakerIdEngine, and start the resolver\n // that annotates cloud transcripts with resolved speaker identities.\n startSpeakerIdSync()\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 // JSRuntime crashloop-disabled is runtime state; engine owns filing the\n // automatic report while hosts only render alert/telemetry side effects.\n startJSCrashloopReportService()\n // Bring up the local-miniapp engine so a bare OEM can run JSRuntime miniapps:\n // the LocalMiniappRuntime (registry + WebView bridge), the JSRuntime 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 Glassly 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 Glassly 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(\"paired glasses latch\", stopPairedGlassesLatch)\n await safely(\"miniapp pause coordinator\", stopMiniappPauseCoordinator)\n await safely(\"glasses status projection\", stopGlassesStatusProjection)\n await safely(\"device event router\", stopDeviceEventRouter)\n await safely(\"page host\", () => pageHost.stop())\n await safely(\"gesture dots service\", () => gestureDotsService.stop())\n await safely(\"ota service\", stopOtaService)\n await safely(\"audio cloud uplink\", stopAudioCloudUplink)\n await safely(\"soniox direct service\", () => sonioxDirectService.stop())\n await safely(\"support profile sync\", stopSupportProfileSync)\n await safely(\"phone notifications sync\", stopPhoneNotificationsSync)\n await safely(\"phone activity tracking\", stopPhoneActivityTracking)\n await safely(\"speaker id sync\", stopSpeakerIdSync)\n await safely(\"captions tester report service\", stopCaptionsTesterReportService)\n await safely(\"js crashloop report service\", stopJSCrashloopReportService)\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.shutdown())\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 /** Maps providers — user-supplied Mapbox access token (Settings > Keys). */\n maps,\n /** Shared user-scoped memory timeline (Settings > Memory + session.memory). */\n memory,\n /** Device-local voice profiles for on-device speaker ID (Settings > Speakers). */\n speakers,\n /** AI/voice provider key validation — user-supplied keys (Settings > API Keys). */\n providerKeys,\n display,\n}\n"]}
|
package/build/facades/dev.js
CHANGED
|
@@ -147,7 +147,7 @@ export const dev = {
|
|
|
147
147
|
// Persist the host that answered — not the stale input IP — so home-tile
|
|
148
148
|
// relaunches skip a dead LAN address after mDNS/Metro failover.
|
|
149
149
|
const resolvedUrl = result.resolvedUrl || devUrl;
|
|
150
|
-
// The `glassly
|
|
150
|
+
// The `glassly dev` server puts the hot-reload/log sidecar on the
|
|
151
151
|
// user port PLUS ONE — same convention as the first-party developer-URL
|
|
152
152
|
// screen's deriveDevPort.
|
|
153
153
|
let devPort;
|
package/build/facades/dev.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dev.js","sourceRoot":"","sources":["../../src/facades/dev.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,OAAO,YAAY,MAAM,iCAAiC,CAAA;AAC1D,OAAO,EAAC,cAAc,EAAC,MAAM,8BAA8B,CAAA;AAC3D,OAAO,EAAC,yBAAyB,EAAC,MAAM,6BAA6B,CAAA;AACrE,OAAO,EAAC,kBAAkB,EAAC,MAAM,sBAAsB,CAAA;AACvD,OAAO,EAAC,YAAY,EAAC,MAAM,gBAAgB,CAAA;AAC3C,OAAO,EAAC,eAAe,EAAC,MAAM,mBAAmB,CAAA;AACjD,OAAO,EAAC,gBAAgB,EAAE,QAAQ,EAAC,MAAM,oBAAoB,CAAA;AAC7D,OAAO,EAAC,0BAA0B,EAAC,MAAM,8BAA8B,CAAA;AACvE,OAAO,EAAC,kBAAkB,EAAC,MAAM,gCAAgC,CAAA;AACjE,OAAO,EAAC,eAAe,EAAC,MAAM,sBAAsB,CAAA;AACpD,OAAO,EAAC,oBAAoB,EAAC,MAAM,2BAA2B,CAAA;AAC9D,OAAO,EAAC,kBAAkB,EAAE,cAAc,EAAE,oBAAoB,EAAoB,MAAM,yBAAyB,CAAA;AACnH,OAAO,EAAC,iBAAiB,EAAC,MAAM,gBAAgB,CAAA;AAChD,OAAO,EAAC,WAAW,EAAC,MAAM,+BAA+B,CAAA;AACzD,OAAO,kBAA8C,MAAM,sCAAsC,CAAA;AAIjG;;;;GAIG;AACH,SAAS,sBAAsB,CAAC,OAA0B,wBAAwB,EAAE;IAClF,MAAM,QAAQ,GAAG,8BAA8B,CAAC,IAAI,CAAC,CAAA;IACrD,IAAI,QAAQ,KAAK,SAAS,EAAE,CAAC;QAC3B,kBA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Aa,EAAE,GAA6B,EAAE,CAAC,oBAAoB,EAAE;IAErE,gFAAgF;IAChF,eAAe,EAAE,CAAC,EAA8C,EAAgB,EAAE;QAChF,IAAI,IAAI,GAAG,IAAI,CAAC,SAAS,CAAC,oBAAoB,EAAE,CAAC,CAAA;QACjD,MAAM,MAAM,GAAG,GAAG,EAAE;YAClB,MAAM,IAAI,GAAG,oBAAoB,EAAE,CAAA;YACnC,MAAM,GAAG,GAAG,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,CAAA;YAChC,IAAI,GAAG,KAAK,IAAI;gBAAE,OAAM;YACxB,IAAI,GAAG,GAAG,CAAA;YACV,EAAE,CAAC,IAAI,CAAC,CAAA;QACV,CAAC,CAAA;QACD,MAAM,aAAa,GAAG;YACpB,YAAY,CAAC,SAAS,CAAC,MAAM,CAAC;YAC9B,eAAe,CAAC,SAAS,CAAC,MAAM,CAAC;YACjC,kBAAkB,CAAC,SAAS,CAAC,MAAM,CAAC;YACpC,yBAAyB,CAAC,SAAS,CAAC,MAAM,CAAC;YAC3C,0BAA0B,CAAC,SAAS,CAAC,MAAM,CAAC;SAC7C,CAAA;QACD,OAAO,GAAG,EAAE;YACV,aAAa,CAAC,OAAO,CAAC,CAAC,WAAW,EAAE,EAAE,CAAC,WAAW,EAAE,CAAC,CAAA;QACvD,CAAC,CAAA;IACH,CAAC;IAED;;;OAGG;IACH,oBAAoB,EAAE,CAAC,EAAyC,EAAgB,EAAE,CAAC,kBAAkB,CAAC,QAAQ,CAAC,EAAE,CAAC;CACnH,CAAA","sourcesContent":["/**\n * dev facade — `engine.dev`: developer/debug surface over engine-owned state.\n * Backend/cloud URL overrides read+write the engine settings store; the cloud\n * URL setters reconnect the engine-owned cloud client onto the new endpoints;\n *\n * NOTE: the dev-time endpoint *resolution* (Metro-host auto-detect, env defaults)\n * still lives host-side in `@/services/cloudClient` during the migration; this\n * facade manages the explicit overrides + reconnect.\n */\nimport BluetoothSdk from \"@glassly/bluetooth-sdk/internal\"\nimport {isGlassesReady} from \"../services/GlassesReadiness\"\nimport {useCloudClientStatusStore} from \"../stores/cloudClientStatus\"\nimport {useConnectionStore} from \"../stores/connection\"\nimport {useCoreStore} from \"../stores/core\"\nimport {useGlassesStore} from \"../stores/glasses\"\nimport {useSettingsStore, SETTINGS} from \"../stores/settings\"\nimport {useTranscriptionDebugStore} from \"../stores/transcriptionDebug\"\nimport {cloudClientService} from \"../services/CloudClientService\"\nimport {getConfigValues} from \"../runtime/bootstrap\"\nimport {decideDevLaunchRoute} from \"../utils/devMiniappLaunch\"\nimport {deriveDevPackageId, registerDevApp, DEV_APP_PACKAGE_NAME, type DevAppRecord} from \"../services/AppRegistry\"\nimport {useAppStatusStore} from \"../stores/apps\"\nimport {sendGesture} from \"../services/GlassesTouchInput\"\nimport dashboardOpenTrace, {type DashboardOpenReport} from \"../services/debug/DashboardOpenTrace\"\n\ntype CloudUrlOverrides = {core?: string; runtime?: string}\n\n/**\n * Reconnect the cloud client onto the current cloud-URL overrides. Explicit\n * partial overrides merge over the boot-resolved config (which carries the\n * host's Metro/env URL resolution); both empty clears the live override.\n */\nfunction applyCloudUrlReconnect(urls: CloudUrlOverrides = currentCloudUrlOverrides()): void {\n const resolved = resolveCloudUrlReconnectTarget(urls)\n if (resolved === undefined) {\n cloudClientService.reconnect(null)\n } else if (resolved) {\n cloudClientService.reconnect(resolved)\n } else {\n console.warn(\"engine.dev.setCloudUrls: partial cloud override missing boot-resolved sibling endpoint\")\n }\n}\n\nfunction currentCloudUrlOverrides(): CloudUrlOverrides {\n const s = useSettingsStore.getState()\n return {\n core: trimSetting(s.getSetting(SETTINGS.cloud_core_url.key)),\n runtime: trimSetting(s.getSetting(SETTINGS.cloud_runtime_url.key)),\n }\n}\n\nfunction resolveCloudUrlReconnectTarget(urls: CloudUrlOverrides): {core: string; runtime: string} | null | undefined {\n const core = trimSetting(urls.core)\n const runtime = trimSetting(urls.runtime)\n if (!core && !runtime) return undefined\n\n const config = getConfigValues()\n const resolvedCore = core || config.coreUrl?.trim()\n const resolvedRuntime = runtime || config.runtimeUrl?.trim()\n return resolvedCore && resolvedRuntime ? {core: resolvedCore, runtime: resolvedRuntime} : null\n}\n\nfunction trimSetting(value: unknown): string | undefined {\n return typeof value === \"string\" && value.trim().length > 0 ? value.trim() : undefined\n}\n\nfunction projectRuntimeStatus() {\n const core = useCoreStore.getState()\n const glasses = useGlassesStore.getState()\n const connection = useConnectionStore.getState()\n const cloudClient = useCloudClientStatusStore.getState()\n const transcriptionDebug = useTranscriptionDebugStore.getState()\n return {\n searching: core.searching,\n // Copy: the snapshot must not hand callers a mutable reference into the store.\n micRanking: [...core.micRanking],\n currentMic: core.currentMic,\n systemMicUnavailable: core.systemMicUnavailable,\n glassesConnected: glasses.connection.state === \"connected\",\n glassesFullyBooted: isGlassesReady(glasses.connection),\n bluetoothClassicConnected: glasses.bluetoothClassicConnected,\n coreStatus: connection.status,\n cloudClientStatus: cloudClient.status,\n cloudClientAudioTransport: cloudClient.audioTransport,\n transcriptionSubscribers: [...transcriptionDebug.transcriptionSubscribers],\n translationSubscribers: [...transcriptionDebug.translationSubscribers],\n recentTranscriptSources: {...transcriptionDebug.recentTranscriptSources},\n cloudAudioSubscriptionWrite: {...transcriptionDebug.cloudAudioSubscriptionWrite},\n }\n}\n\nexport type DevRuntimeStatusSnapshot = ReturnType<typeof projectRuntimeStatus>\n\nexport const dev = {\n /** Inject a glasses gesture through the normal dashboard/miniapp input policy. */\n sendGesture,\n /** The cloud-v2 core/runtime URL overrides. */\n cloudUrls: (): {core?: string; runtime?: string} => {\n const s = useSettingsStore.getState()\n return {core: s.getSetting(SETTINGS.cloud_core_url.key), runtime: s.getSetting(SETTINGS.cloud_runtime_url.key)}\n },\n /** Override the cloud-v2 URLs and reconnect the live client onto them. */\n setCloudUrls: (urls: {core?: string; runtime?: string}) => {\n const next = {...currentCloudUrlOverrides(), ...urls}\n const resolved = resolveCloudUrlReconnectTarget(next)\n if (resolved === null) {\n console.warn(\"engine.dev.setCloudUrls: ignoring partial cloud override without a resolvable sibling endpoint\")\n return\n }\n\n const s = useSettingsStore.getState()\n if (urls.core !== undefined) s.setSetting(SETTINGS.cloud_core_url.key, urls.core)\n if (urls.runtime !== undefined) s.setSetting(SETTINGS.cloud_runtime_url.key, urls.runtime)\n if (resolved === undefined) {\n cloudClientService.reconnect(null)\n } else {\n cloudClientService.reconnect(resolved)\n }\n },\n\n /** Tear down + rebuild the live cloud client (the dev \"reconnect\" button). */\n reconnectCloud: (): void => applyCloudUrlReconnect(),\n\n /** Current native (BLE-process) memory usage in MB — a dev/diagnostics gauge. */\n getMemoryMB: (): number => BluetoothSdk.getMemoryMB(),\n /**\n * Phone-side bluetooth runtime snapshot (the core store read-model: scan/mic/\n * search state) — the diagnostics/data-export surface. Shallow copy.\n */\n bluetoothStatus: (): Record<string, unknown> => {\n const {setCoreInfo: _setCoreInfo, reset: _reset, ...state} = useCoreStore.getState()\n return {...state}\n },\n\n /**\n * Side-load a miniapp being served from a dev machine (the `glassly dev` / CLI\n * flow) by its URL: probes `<url>/miniapp.json`, and on a reachable manifest\n * registers it under its manifest package so it appears in `engine.miniapps`\n * and can coexist with other dev miniapps. This is the OEM-host equivalent\n * of the first-party\n * developer-URL screen — the registration itself is engine-internal, so a\n * host reaches it here rather than the internal registry. Rendering still\n * flows through the normal display path once the miniapp is started.\n */\n loadDevMiniapp: async (\n url: string,\n name?: string,\n ): Promise<{ok: true; packageName: string; name: string} | {ok: false; error: string}> => {\n const devUrl = url.trim().replace(/\\/+$/, \"\")\n if (!devUrl) return {ok: false, error: \"empty url\"}\n const result = await decideDevLaunchRoute(\"\", devUrl)\n if (result.decision !== \"live\") {\n return {ok: false, error: \"dev server unreachable, or no miniapp.json served there\"}\n }\n const manifest = result.manifest\n const appName = name ?? manifest.name ?? \"Dev Miniapp\"\n const packageName = (manifest.packageName as string | undefined) ?? DEV_APP_PACKAGE_NAME\n // Persist the host that answered — not the stale input IP — so home-tile\n // relaunches skip a dead LAN address after mDNS/Metro failover.\n const resolvedUrl = result.resolvedUrl || devUrl\n // The `glassly-miniapp dev` server puts the hot-reload/log sidecar on the\n // user port PLUS ONE — same convention as the first-party developer-URL\n // screen's deriveDevPort.\n let devPort: number | undefined\n try {\n const parsed = Number(new URL(resolvedUrl).port)\n devPort = Number.isFinite(parsed) && parsed > 0 ? parsed + 1 : undefined\n } catch {\n devPort = undefined\n }\n // The record is stored under a namespaced dev id (deriveDevPackageId) so\n // it survives release installs of the manifest package — stop/refresh and\n // the returned packageName must use that id, which registerDevApp returns.\n const devPackageId = deriveDevPackageId(packageName)\n const existing = useAppStatusStore.getState().apps.find((app) => app.packageName === devPackageId)\n if (existing?.running) await useAppStatusStore.getState().stop(devPackageId)\n const record = await registerDevApp({\n packageName,\n name: appName,\n iconUrl: manifest.icon ? new URL(manifest.icon, `${resolvedUrl}/`).toString() : `${resolvedUrl}/icon.png`,\n // Persist the host that answered — not the stale input IP.\n devUrl: resolvedUrl,\n devPort,\n type: manifest.type as DevAppRecord[\"type\"],\n permissions: manifest.permissions as DevAppRecord[\"permissions\"],\n hardwareRequirements: manifest.hardwareRequirements as DevAppRecord[\"hardwareRequirements\"],\n actions: manifest.actions as DevAppRecord[\"actions\"],\n })\n await useAppStatusStore.getState().refresh()\n return {ok: true, packageName: record.packageName, name: appName}\n },\n\n /** Current engine runtime status for engine-owned debug surfaces. */\n runtimeStatus: (): DevRuntimeStatusSnapshot => projectRuntimeStatus(),\n\n /** Subscribe to the projected engine runtime status; returns an unsubscribe. */\n onRuntimeStatus: (cb: (status: DevRuntimeStatusSnapshot) => void): (() => void) => {\n let last = JSON.stringify(projectRuntimeStatus())\n const notify = () => {\n const snap = projectRuntimeStatus()\n const key = JSON.stringify(snap)\n if (key === last) return\n last = key\n cb(snap)\n }\n const unsubscribers = [\n useCoreStore.subscribe(notify),\n useGlassesStore.subscribe(notify),\n useConnectionStore.subscribe(notify),\n useCloudClientStatusStore.subscribe(notify),\n useTranscriptionDebugStore.subscribe(notify),\n ]\n return () => {\n unsubscribers.forEach((unsubscribe) => unsubscribe())\n }\n },\n\n /**\n * Each finished dashboard open while the debug_dashboard_open_timing setting\n * is on: a ready-made title/body plus the stage timings. Returns an unsubscribe.\n */\n onDashboardOpenTrace: (cb: (report: DashboardOpenReport) => void): (() => void) => dashboardOpenTrace.onReport(cb),\n}\n"]}
|
|
1
|
+
{"version":3,"file":"dev.js","sourceRoot":"","sources":["../../src/facades/dev.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,OAAO,YAAY,MAAM,iCAAiC,CAAA;AAC1D,OAAO,EAAC,cAAc,EAAC,MAAM,8BAA8B,CAAA;AAC3D,OAAO,EAAC,yBAAyB,EAAC,MAAM,6BAA6B,CAAA;AACrE,OAAO,EAAC,kBAAkB,EAAC,MAAM,sBAAsB,CAAA;AACvD,OAAO,EAAC,YAAY,EAAC,MAAM,gBAAgB,CAAA;AAC3C,OAAO,EAAC,eAAe,EAAC,MAAM,mBAAmB,CAAA;AACjD,OAAO,EAAC,gBAAgB,EAAE,QAAQ,EAAC,MAAM,oBAAoB,CAAA;AAC7D,OAAO,EAAC,0BAA0B,EAAC,MAAM,8BAA8B,CAAA;AACvE,OAAO,EAAC,kBAAkB,EAAC,MAAM,gCAAgC,CAAA;AACjE,OAAO,EAAC,eAAe,EAAC,MAAM,sBAAsB,CAAA;AACpD,OAAO,EAAC,oBAAoB,EAAC,MAAM,2BAA2B,CAAA;AAC9D,OAAO,EAAC,kBAAkB,EAAE,cAAc,EAAE,oBAAoB,EAAoB,MAAM,yBAAyB,CAAA;AACnH,OAAO,EAAC,iBAAiB,EAAC,MAAM,gBAAgB,CAAA;AAChD,OAAO,EAAC,WAAW,EAAC,MAAM,+BAA+B,CAAA;AACzD,OAAO,kBAA8C,MAAM,sCAAsC,CAAA;AAIjG;;;;GAIG;AACH,SAAS,sBAAsB,CAAC,OAA0B,wBAAwB,EAAE;IAClF,MAAM,QAAQ,GAAG,8BAA8B,CAAC,IAAI,CAAC,CAAA;IACrD,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,EAAC,CAAA;IACnE,CAAC;IAED,qEAAqE;IACrE,aAAa,EAAE,GAA6B,EAAE,CAAC,oBAAoB,EAAE;IAErE,gFAAgF;IAChF,eAAe,EAAE,CAAC,EAA8C,EAAgB,EAAE;QAChF,IAAI,IAAI,GAAG,IAAI,CAAC,SAAS,CAAC,oBAAoB,EAAE,CAAC,CAAA;QACjD,MAAM,MAAM,GAAG,GAAG,EAAE;YAClB,MAAM,IAAI,GAAG,oBAAoB,EAAE,CAAA;YACnC,MAAM,GAAG,GAAG,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,CAAA;YAChC,IAAI,GAAG,KAAK,IAAI;gBAAE,OAAM;YACxB,IAAI,GAAG,GAAG,CAAA;YACV,EAAE,CAAC,IAAI,CAAC,CAAA;QACV,CAAC,CAAA;QACD,MAAM,aAAa,GAAG;YACpB,YAAY,CAAC,SAAS,CAAC,MAAM,CAAC;YAC9B,eAAe,CAAC,SAAS,CAAC,MAAM,CAAC;YACjC,kBAAkB,CAAC,SAAS,CAAC,MAAM,CAAC;YACpC,yBAAyB,CAAC,SAAS,CAAC,MAAM,CAAC;YAC3C,0BAA0B,CAAC,SAAS,CAAC,MAAM,CAAC;SAC7C,CAAA;QACD,OAAO,GAAG,EAAE;YACV,aAAa,CAAC,OAAO,CAAC,CAAC,WAAW,EAAE,EAAE,CAAC,WAAW,EAAE,CAAC,CAAA;QACvD,CAAC,CAAA;IACH,CAAC;IAED;;;OAGG;IACH,oBAAoB,EAAE,CAAC,EAAyC,EAAgB,EAAE,CAAC,kBAAkB,CAAC,QAAQ,CAAC,EAAE,CAAC;CACnH,CAAA","sourcesContent":["/**\n * dev facade — `engine.dev`: developer/debug surface over engine-owned state.\n * Backend/cloud URL overrides read+write the engine settings store; the cloud\n * URL setters reconnect the engine-owned cloud client onto the new endpoints;\n *\n * NOTE: the dev-time endpoint *resolution* (Metro-host auto-detect, env defaults)\n * still lives host-side in `@/services/cloudClient` during the migration; this\n * facade manages the explicit overrides + reconnect.\n */\nimport BluetoothSdk from \"@glassly/bluetooth-sdk/internal\"\nimport {isGlassesReady} from \"../services/GlassesReadiness\"\nimport {useCloudClientStatusStore} from \"../stores/cloudClientStatus\"\nimport {useConnectionStore} from \"../stores/connection\"\nimport {useCoreStore} from \"../stores/core\"\nimport {useGlassesStore} from \"../stores/glasses\"\nimport {useSettingsStore, SETTINGS} from \"../stores/settings\"\nimport {useTranscriptionDebugStore} from \"../stores/transcriptionDebug\"\nimport {cloudClientService} from \"../services/CloudClientService\"\nimport {getConfigValues} from \"../runtime/bootstrap\"\nimport {decideDevLaunchRoute} from \"../utils/devMiniappLaunch\"\nimport {deriveDevPackageId, registerDevApp, DEV_APP_PACKAGE_NAME, type DevAppRecord} from \"../services/AppRegistry\"\nimport {useAppStatusStore} from \"../stores/apps\"\nimport {sendGesture} from \"../services/GlassesTouchInput\"\nimport dashboardOpenTrace, {type DashboardOpenReport} from \"../services/debug/DashboardOpenTrace\"\n\ntype CloudUrlOverrides = {core?: string; runtime?: string}\n\n/**\n * Reconnect the cloud client onto the current cloud-URL overrides. Explicit\n * partial overrides merge over the boot-resolved config (which carries the\n * host's Metro/env URL resolution); both empty clears the live override.\n */\nfunction applyCloudUrlReconnect(urls: CloudUrlOverrides = currentCloudUrlOverrides()): void {\n const resolved = resolveCloudUrlReconnectTarget(urls)\n if (resolved === undefined) {\n cloudClientService.reconnect(null)\n } else if (resolved) {\n cloudClientService.reconnect(resolved)\n } else {\n console.warn(\"engine.dev.setCloudUrls: partial cloud override missing boot-resolved sibling endpoint\")\n }\n}\n\nfunction currentCloudUrlOverrides(): CloudUrlOverrides {\n const s = useSettingsStore.getState()\n return {\n core: trimSetting(s.getSetting(SETTINGS.cloud_core_url.key)),\n runtime: trimSetting(s.getSetting(SETTINGS.cloud_runtime_url.key)),\n }\n}\n\nfunction resolveCloudUrlReconnectTarget(urls: CloudUrlOverrides): {core: string; runtime: string} | null | undefined {\n const core = trimSetting(urls.core)\n const runtime = trimSetting(urls.runtime)\n if (!core && !runtime) return undefined\n\n const config = getConfigValues()\n const resolvedCore = core || config.coreUrl?.trim()\n const resolvedRuntime = runtime || config.runtimeUrl?.trim()\n return resolvedCore && resolvedRuntime ? {core: resolvedCore, runtime: resolvedRuntime} : null\n}\n\nfunction trimSetting(value: unknown): string | undefined {\n return typeof value === \"string\" && value.trim().length > 0 ? value.trim() : undefined\n}\n\nfunction projectRuntimeStatus() {\n const core = useCoreStore.getState()\n const glasses = useGlassesStore.getState()\n const connection = useConnectionStore.getState()\n const cloudClient = useCloudClientStatusStore.getState()\n const transcriptionDebug = useTranscriptionDebugStore.getState()\n return {\n searching: core.searching,\n // Copy: the snapshot must not hand callers a mutable reference into the store.\n micRanking: [...core.micRanking],\n currentMic: core.currentMic,\n systemMicUnavailable: core.systemMicUnavailable,\n glassesConnected: glasses.connection.state === \"connected\",\n glassesFullyBooted: isGlassesReady(glasses.connection),\n bluetoothClassicConnected: glasses.bluetoothClassicConnected,\n coreStatus: connection.status,\n cloudClientStatus: cloudClient.status,\n cloudClientAudioTransport: cloudClient.audioTransport,\n transcriptionSubscribers: [...transcriptionDebug.transcriptionSubscribers],\n translationSubscribers: [...transcriptionDebug.translationSubscribers],\n recentTranscriptSources: {...transcriptionDebug.recentTranscriptSources},\n cloudAudioSubscriptionWrite: {...transcriptionDebug.cloudAudioSubscriptionWrite},\n }\n}\n\nexport type DevRuntimeStatusSnapshot = ReturnType<typeof projectRuntimeStatus>\n\nexport const dev = {\n /** Inject a glasses gesture through the normal dashboard/miniapp input policy. */\n sendGesture,\n /** The cloud-v2 core/runtime URL overrides. */\n cloudUrls: (): {core?: string; runtime?: string} => {\n const s = useSettingsStore.getState()\n return {core: s.getSetting(SETTINGS.cloud_core_url.key), runtime: s.getSetting(SETTINGS.cloud_runtime_url.key)}\n },\n /** Override the cloud-v2 URLs and reconnect the live client onto them. */\n setCloudUrls: (urls: {core?: string; runtime?: string}) => {\n const next = {...currentCloudUrlOverrides(), ...urls}\n const resolved = resolveCloudUrlReconnectTarget(next)\n if (resolved === null) {\n console.warn(\"engine.dev.setCloudUrls: ignoring partial cloud override without a resolvable sibling endpoint\")\n return\n }\n\n const s = useSettingsStore.getState()\n if (urls.core !== undefined) s.setSetting(SETTINGS.cloud_core_url.key, urls.core)\n if (urls.runtime !== undefined) s.setSetting(SETTINGS.cloud_runtime_url.key, urls.runtime)\n if (resolved === undefined) {\n cloudClientService.reconnect(null)\n } else {\n cloudClientService.reconnect(resolved)\n }\n },\n\n /** Tear down + rebuild the live cloud client (the dev \"reconnect\" button). */\n reconnectCloud: (): void => applyCloudUrlReconnect(),\n\n /** Current native (BLE-process) memory usage in MB — a dev/diagnostics gauge. */\n getMemoryMB: (): number => BluetoothSdk.getMemoryMB(),\n /**\n * Phone-side bluetooth runtime snapshot (the core store read-model: scan/mic/\n * search state) — the diagnostics/data-export surface. Shallow copy.\n */\n bluetoothStatus: (): Record<string, unknown> => {\n const {setCoreInfo: _setCoreInfo, reset: _reset, ...state} = useCoreStore.getState()\n return {...state}\n },\n\n /**\n * Side-load a miniapp being served from a dev machine (the `glassly dev` / CLI\n * flow) by its URL: probes `<url>/miniapp.json`, and on a reachable manifest\n * registers it under its manifest package so it appears in `engine.miniapps`\n * and can coexist with other dev miniapps. This is the OEM-host equivalent\n * of the first-party\n * developer-URL screen — the registration itself is engine-internal, so a\n * host reaches it here rather than the internal registry. Rendering still\n * flows through the normal display path once the miniapp is started.\n */\n loadDevMiniapp: async (\n url: string,\n name?: string,\n ): Promise<{ok: true; packageName: string; name: string} | {ok: false; error: string}> => {\n const devUrl = url.trim().replace(/\\/+$/, \"\")\n if (!devUrl) return {ok: false, error: \"empty url\"}\n const result = await decideDevLaunchRoute(\"\", devUrl)\n if (result.decision !== \"live\") {\n return {ok: false, error: \"dev server unreachable, or no miniapp.json served there\"}\n }\n const manifest = result.manifest\n const appName = name ?? manifest.name ?? \"Dev Miniapp\"\n const packageName = (manifest.packageName as string | undefined) ?? DEV_APP_PACKAGE_NAME\n // Persist the host that answered — not the stale input IP — so home-tile\n // relaunches skip a dead LAN address after mDNS/Metro failover.\n const resolvedUrl = result.resolvedUrl || devUrl\n // The `glassly dev` server puts the hot-reload/log sidecar on the\n // user port PLUS ONE — same convention as the first-party developer-URL\n // screen's deriveDevPort.\n let devPort: number | undefined\n try {\n const parsed = Number(new URL(resolvedUrl).port)\n devPort = Number.isFinite(parsed) && parsed > 0 ? parsed + 1 : undefined\n } catch {\n devPort = undefined\n }\n // The record is stored under a namespaced dev id (deriveDevPackageId) so\n // it survives release installs of the manifest package — stop/refresh and\n // the returned packageName must use that id, which registerDevApp returns.\n const devPackageId = deriveDevPackageId(packageName)\n const existing = useAppStatusStore.getState().apps.find((app) => app.packageName === devPackageId)\n if (existing?.running) await useAppStatusStore.getState().stop(devPackageId)\n const record = await registerDevApp({\n packageName,\n name: appName,\n iconUrl: manifest.icon ? new URL(manifest.icon, `${resolvedUrl}/`).toString() : `${resolvedUrl}/icon.png`,\n // Persist the host that answered — not the stale input IP.\n devUrl: resolvedUrl,\n devPort,\n type: manifest.type as DevAppRecord[\"type\"],\n permissions: manifest.permissions as DevAppRecord[\"permissions\"],\n hardwareRequirements: manifest.hardwareRequirements as DevAppRecord[\"hardwareRequirements\"],\n actions: manifest.actions as DevAppRecord[\"actions\"],\n })\n await useAppStatusStore.getState().refresh()\n return {ok: true, packageName: record.packageName, name: appName}\n },\n\n /** Current engine runtime status for engine-owned debug surfaces. */\n runtimeStatus: (): DevRuntimeStatusSnapshot => projectRuntimeStatus(),\n\n /** Subscribe to the projected engine runtime status; returns an unsubscribe. */\n onRuntimeStatus: (cb: (status: DevRuntimeStatusSnapshot) => void): (() => void) => {\n let last = JSON.stringify(projectRuntimeStatus())\n const notify = () => {\n const snap = projectRuntimeStatus()\n const key = JSON.stringify(snap)\n if (key === last) return\n last = key\n cb(snap)\n }\n const unsubscribers = [\n useCoreStore.subscribe(notify),\n useGlassesStore.subscribe(notify),\n useConnectionStore.subscribe(notify),\n useCloudClientStatusStore.subscribe(notify),\n useTranscriptionDebugStore.subscribe(notify),\n ]\n return () => {\n unsubscribers.forEach((unsubscribe) => unsubscribe())\n }\n },\n\n /**\n * Each finished dashboard open while the debug_dashboard_open_timing setting\n * is on: a ready-made title/body plus the stage timings. Returns an unsubscribe.\n */\n onDashboardOpenTrace: (cb: (report: DashboardOpenReport) => void): (() => void) => dashboardOpenTrace.onReport(cb),\n}\n"]}
|
|
@@ -28,6 +28,8 @@ export declare const miniapps: {
|
|
|
28
28
|
stop: (packageName: string) => Promise<void>;
|
|
29
29
|
/** Bring a running miniapp to the foreground. */
|
|
30
30
|
setForeground: (packageName: string) => Promise<void>;
|
|
31
|
+
/** Hand an external link's query parameters to a miniapp (queued until it has connected). */
|
|
32
|
+
deliverLink: (packageName: string, params: Record<string, string>) => void;
|
|
31
33
|
/** Clear the current foreground miniapp. */
|
|
32
34
|
clearForeground: () => void;
|
|
33
35
|
/** Stop all running miniapps. */
|
|
@@ -44,12 +46,10 @@ export declare const miniapps: {
|
|
|
44
46
|
setHiddenStatus: (packageName: string, status: boolean) => void;
|
|
45
47
|
/** Mark a miniapp Always On (starts at launch, stops only from the switcher pill), persisted for the next boot. */
|
|
46
48
|
setAlwaysOn: (packageName: string, status: boolean) => Promise<void>;
|
|
47
|
-
/** Installed
|
|
49
|
+
/** Installed dashboard miniapps (manifest type "dashboard"); one runs at a time. */
|
|
48
50
|
dashboards: () => ClientApp[];
|
|
49
|
-
/** The
|
|
50
|
-
|
|
51
|
-
/** Give the dashboard role to an installed dashboard; the previous holder stops and the new one starts. */
|
|
52
|
-
setActiveDashboard: (packageName: string) => Promise<void>;
|
|
51
|
+
/** The running dashboard miniapp, or null when none is. */
|
|
52
|
+
runningDashboard: () => ClientApp | null;
|
|
53
53
|
};
|
|
54
54
|
export {};
|
|
55
55
|
//# sourceMappingURL=miniapps.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"miniapps.d.ts","sourceRoot":"","sources":["../../src/facades/miniapps.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AACH,OAAO,EAAC,iBAAiB,EAAC,MAAM,gBAAgB,CAAA;
|
|
1
|
+
{"version":3,"file":"miniapps.d.ts","sourceRoot":"","sources":["../../src/facades/miniapps.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AACH,OAAO,EAAC,iBAAiB,EAAC,MAAM,gBAAgB,CAAA;AAEhD,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,UAAU,CAAA;AAEvC,KAAK,SAAS,GAAG,UAAU,CAAC,OAAO,iBAAiB,CAAC,QAAQ,CAAC,CAAA;AAE9D,eAAO,MAAM,QAAQ;IACnB,yCAAyC;gBAE/B,SAAS,EAAE;IACrB,8FAA8F;oBAC9E,CAAC,IAAI,EAAE,SAAS,EAAE,KAAK,IAAI,KAAG,CAAC,MAAM,IAAI,CAAC;IAW1D,0EAA0E;kCAC9C,MAAM,EAAE;IACpC,qEAAqE;0CAC/B,CAAC,YAAY,EAAE,MAAM,EAAE,KAAK,IAAI,KAAG,CAAC,MAAM,IAAI,CAAC;IAGrF,wDAAwD;;IAExD,oCAAoC;;IAEpC,sBAAsB;;IAEtB,iDAAiD;;IAGjD,6FAA6F;+BAClE,MAAM,UAAU,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC;IAEjE,4CAA4C;;IAE5C,iCAAiC;;IAEjC,2CAA2C;;;;IAE3C,2BAA2B;;IAE3B,2EAA2E;;IAG3E,gDAAgD;;IAGhD,mHAAmH;;IAGnH,oFAAoF;sBACpE,SAAS,EAAE;IAC3B,2DAA2D;4BACrC,SAAS,GAAG,IAAI;CAEvC,CAAA"}
|
|
@@ -10,7 +10,6 @@
|
|
|
10
10
|
*/
|
|
11
11
|
import { useAppStatusStore } from "../stores/apps";
|
|
12
12
|
import localMiniappRuntime from "../services/LocalMiniappRuntime";
|
|
13
|
-
import { activeDashboardAmong } from "../services/pages/activeDashboard";
|
|
14
13
|
export const miniapps = {
|
|
15
14
|
/** All installed miniapps (snapshot). */
|
|
16
15
|
// Copy: the snapshot must not hand callers a mutable reference into the store.
|
|
@@ -39,6 +38,8 @@ export const miniapps = {
|
|
|
39
38
|
stop: (...args) => useAppStatusStore.getState().stop(...args),
|
|
40
39
|
/** Bring a running miniapp to the foreground. */
|
|
41
40
|
setForeground: (...args) => useAppStatusStore.getState().setForeground(...args),
|
|
41
|
+
/** Hand an external link's query parameters to a miniapp (queued until it has connected). */
|
|
42
|
+
deliverLink: (packageName, params) => localMiniappRuntime.deliverLink(packageName, params),
|
|
42
43
|
/** Clear the current foreground miniapp. */
|
|
43
44
|
clearForeground: () => useAppStatusStore.getState().clearForeground(),
|
|
44
45
|
/** Stop all running miniapps. */
|
|
@@ -53,11 +54,9 @@ export const miniapps = {
|
|
|
53
54
|
setHiddenStatus: (...args) => useAppStatusStore.getState().setHiddenStatus(...args),
|
|
54
55
|
/** Mark a miniapp Always On (starts at launch, stops only from the switcher pill), persisted for the next boot. */
|
|
55
56
|
setAlwaysOn: (...args) => useAppStatusStore.getState().setAlwaysOn(...args),
|
|
56
|
-
/** Installed
|
|
57
|
+
/** Installed dashboard miniapps (manifest type "dashboard"); one runs at a time. */
|
|
57
58
|
dashboards: () => useAppStatusStore.getState().apps.filter((app) => app.type === "dashboard"),
|
|
58
|
-
/** The
|
|
59
|
-
|
|
60
|
-
/** Give the dashboard role to an installed dashboard; the previous holder stops and the new one starts. */
|
|
61
|
-
setActiveDashboard: (...args) => useAppStatusStore.getState().setActiveDashboard(...args),
|
|
59
|
+
/** The running dashboard miniapp, or null when none is. */
|
|
60
|
+
runningDashboard: () => useAppStatusStore.getState().apps.find((app) => app.type === "dashboard" && app.running) ?? null,
|
|
62
61
|
};
|
|
63
62
|
//# sourceMappingURL=miniapps.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"miniapps.js","sourceRoot":"","sources":["../../src/facades/miniapps.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AACH,OAAO,EAAC,iBAAiB,EAAC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AC;IACvD,mHAAmH;IACnH,WAAW,EAAE,CAAC,GAAG,IAA0C,EAAE,EAAE,CAAC,iBAAiB,CAAC,QAAQ,EAAE,CAAC,WAAW,CAAC,GAAG,IAAI,CAAC;IAEjH,oFAAoF;IACpF,UAAU,EAAE,GAAgB,EAAE,CAAC,iBAAiB,CAAC,QAAQ,EAAE,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,IAAI,KAAK,WAAW,CAAC;IAC1G,2DAA2D;IAC3D,gBAAgB,EAAE,GAAqB,EAAE,CACvC,iBAAiB,CAAC,QAAQ,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,IAAI,KAAK,WAAW,IAAI,GAAG,CAAC,OAAO,CAAC,IAAI,IAAI;CACnG,CAAA","sourcesContent":["/**\n * miniapps facade — `engine.miniapps`: miniapp lifecycle over the engine-owned\n * apps store. Thin forwarding (args via Parameters<>), so the facade never drifts\n * from the store's actions.\n *\n * The miniapp WebView is a HOST component (engine ships the bridge, not the view) —\n * the bridge primitives (`buildMiniappGlobalsScript`, `buildUiShim`, the\n * JSRuntime router) are exported from `@glassly/engine` directly; the host mounts a\n * `<WebView>` wired to them. This facade is the lifecycle half.\n */\nimport {useAppStatusStore} from \"../stores/apps\"\nimport localMiniappRuntime from \"../services/LocalMiniappRuntime\"\nimport type {ClientApp} from \"../types\"\n\ntype AppsState = ReturnType<typeof useAppStatusStore.getState>\n\nexport const miniapps = {\n /** All installed miniapps (snapshot). */\n // Copy: the snapshot must not hand callers a mutable reference into the store.\n list: (): ClientApp[] => [...useAppStatusStore.getState().apps],\n /** Subscribe to the installed-app set; fires only when it changes. Returns an unsubscribe. */\n onChanged: (cb: (apps: ClientApp[]) => void): (() => void) => {\n let last = JSON.stringify(useAppStatusStore.getState().apps)\n return useAppStatusStore.subscribe(() => {\n const apps = useAppStatusStore.getState().apps\n const key = JSON.stringify(apps)\n if (key === last) return\n last = key\n cb(apps)\n })\n },\n\n /** Miniapps actively subscribed to Mentra Live hardware-button events. */\n buttonPressSubscribers: (): string[] => localMiniappRuntime.getButtonPressSubscribers(),\n /** Observe the active Mentra Live hardware-button subscriber set. */\n onButtonPressSubscribersChanged: (cb: (packageNames: string[]) => void): (() => void) =>\n localMiniappRuntime.onButtonPressSubscribersChanged(cb),\n\n /** Re-fetch the installed-app list from the backend. */\n refresh: () => useAppStatusStore.getState().refresh(),\n /** Start (foreground) a miniapp. */\n start: (...args: Parameters<AppsState[\"start\"]>) => useAppStatusStore.getState().start(...args),\n /** Stop a miniapp. */\n stop: (...args: Parameters<AppsState[\"stop\"]>) => useAppStatusStore.getState().stop(...args),\n /** Bring a running miniapp to the foreground. */\n setForeground: (...args: Parameters<AppsState[\"setForeground\"]>) =>\n useAppStatusStore.getState().setForeground(...args),\n /** Hand an external link's query parameters to a miniapp (queued until it has connected). */\n deliverLink: (packageName: string, params: Record<string, string>) =>\n localMiniappRuntime.deliverLink(packageName, params),\n /** Clear the current foreground miniapp. */\n clearForeground: () => useAppStatusStore.getState().clearForeground(),\n /** Stop all running miniapps. */\n stopAll: () => useAppStatusStore.getState().stopAll(),\n /** Install a miniapp from a bundle URL. */\n install: (...args: Parameters<AppsState[\"install\"]>) => useAppStatusStore.getState().install(...args),\n /** Uninstall a miniapp. */\n uninstall: (...args: Parameters<AppsState[\"uninstall\"]>) => useAppStatusStore.getState().uninstall(...args),\n /** Persist a miniapp's captured screenshot (the switcher/card preview). */\n saveScreenshot: (...args: Parameters<AppsState[\"saveScreenshot\"]>) =>\n useAppStatusStore.getState().saveScreenshot(...args),\n /** Hide/show a miniapp on the home surfaces. */\n setHiddenStatus: (...args: Parameters<AppsState[\"setHiddenStatus\"]>) =>\n useAppStatusStore.getState().setHiddenStatus(...args),\n /** Mark a miniapp Always On (starts at launch, stops only from the switcher pill), persisted for the next boot. */\n setAlwaysOn: (...args: Parameters<AppsState[\"setAlwaysOn\"]>) => useAppStatusStore.getState().setAlwaysOn(...args),\n\n /** Installed dashboard miniapps (manifest type \"dashboard\"); one runs at a time. */\n dashboards: (): ClientApp[] => useAppStatusStore.getState().apps.filter((app) => app.type === \"dashboard\"),\n /** The running dashboard miniapp, or null when none is. */\n runningDashboard: (): ClientApp | null =>\n useAppStatusStore.getState().apps.find((app) => app.type === \"dashboard\" && app.running) ?? null,\n}\n"]}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import sttModelManager from "../services/STTModelManager";
|
|
2
2
|
import ttsModelManager from "../services/TTSModelManager";
|
|
3
3
|
import { type DownloadStatus as OfflineModelDownloadStatus } from "../services/OfflineSpeechModelService";
|
|
4
|
+
import { offlineTranslationManager } from "../services/OfflineTranslationManager";
|
|
4
5
|
import sonioxDirectService from "../services/soniox/SonioxDirectService";
|
|
5
6
|
import type { DownloadProgress as SttDownloadProgress, ExtractionProgress as SttExtractionProgress, LanguageConfig as SttLanguageConfig, LanguageInfo as SttLanguageInfo } from "../services/STTModelManager";
|
|
6
7
|
export declare const speech: {
|
|
@@ -32,6 +33,15 @@ export declare const speech: {
|
|
|
32
33
|
reason: "invalid_key" | "network";
|
|
33
34
|
}>;
|
|
34
35
|
};
|
|
36
|
+
/** On-device translation language packs (iOS 26+; the OS owns the assets). */
|
|
37
|
+
translation: {
|
|
38
|
+
isSupported: () => boolean;
|
|
39
|
+
/** BCP-47 language the on-device transcriber produces, i.e. the translation source. */
|
|
40
|
+
sourceLanguage: () => string;
|
|
41
|
+
languages: (source: string) => Promise<import("@glassly/bluetooth-sdk").OfflineTranslationLanguage[]>;
|
|
42
|
+
status: (source: string, target: string) => Promise<import("@glassly/bluetooth-sdk").OfflineTranslationStatus>;
|
|
43
|
+
download: (source: string, target: string) => Promise<import("@glassly/bluetooth-sdk").OfflineTranslationStatus>;
|
|
44
|
+
};
|
|
35
45
|
tts: {
|
|
36
46
|
currentLanguage: () => string;
|
|
37
47
|
languages: () => import("../services/TTSModelManager").TTSLanguageConfig[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"speech.d.ts","sourceRoot":"","sources":["../../src/facades/speech.ts"],"names":[],"mappings":"AAOA,OAAO,eAAe,MAAM,6BAA6B,CAAA;AACzD,OAAO,eAAe,MAAM,6BAA6B,CAAA;AACzD,OAAkC,EAChC,KAAK,cAAc,IAAI,0BAA0B,EAClD,MAAM,uCAAuC,CAAA;AAC9C,OAAO,mBAAmB,MAAM,wCAAwC,CAAA;AACxE,OAAO,KAAK,EACV,gBAAgB,IAAI,mBAAmB,EACvC,kBAAkB,IAAI,qBAAqB,EAC3C,cAAc,IAAI,iBAAiB,EACnC,YAAY,IAAI,eAAe,EAChC,MAAM,6BAA6B,CAAA;AAEpC,eAAO,MAAM,MAAM;IACjB,sFAAsF;8BAC9D,OAAO,CAAC,IAAI,CAAC;;;yBAGpB,iBAAiB,EAAE;4BAChB,OAAO,CAAC,eAAe,EAAE,CAAC;uEAIhB,mBAAmB,KAAK,IAAI,kDAClB,qBAAqB,KAAK,IAAI,kBAEjE,OAAO,CAAC,IAAI,CAAC;yBACC,MAAM;;;QAGvB,6DAA6D;sBACjD,0BAA0B,GAAG,IAAI;QAC7C,yEAAyE;oCAC7C,CAAC,MAAM,EAAE,0BAA0B,GAAG,IAAI,KAAK,IAAI,KAAG,CAAC,MAAM,IAAI,CAAC;;IAGhG,oFAAoF;;;QAGlF,2DAA2D;;QAG3D,4DAA4D
|
|
1
|
+
{"version":3,"file":"speech.d.ts","sourceRoot":"","sources":["../../src/facades/speech.ts"],"names":[],"mappings":"AAOA,OAAO,eAAe,MAAM,6BAA6B,CAAA;AACzD,OAAO,eAAe,MAAM,6BAA6B,CAAA;AACzD,OAAkC,EAChC,KAAK,cAAc,IAAI,0BAA0B,EAClD,MAAM,uCAAuC,CAAA;AAC9C,OAAO,EAAC,yBAAyB,EAAC,MAAM,uCAAuC,CAAA;AAC/E,OAAO,mBAAmB,MAAM,wCAAwC,CAAA;AACxE,OAAO,KAAK,EACV,gBAAgB,IAAI,mBAAmB,EACvC,kBAAkB,IAAI,qBAAqB,EAC3C,cAAc,IAAI,iBAAiB,EACnC,YAAY,IAAI,eAAe,EAChC,MAAM,6BAA6B,CAAA;AAEpC,eAAO,MAAM,MAAM;IACjB,sFAAsF;8BAC9D,OAAO,CAAC,IAAI,CAAC;;;yBAGpB,iBAAiB,EAAE;4BAChB,OAAO,CAAC,eAAe,EAAE,CAAC;uEAIhB,mBAAmB,KAAK,IAAI,kDAClB,qBAAqB,KAAK,IAAI,kBAEjE,OAAO,CAAC,IAAI,CAAC;yBACC,MAAM;;;QAGvB,6DAA6D;sBACjD,0BAA0B,GAAG,IAAI;QAC7C,yEAAyE;oCAC7C,CAAC,MAAM,EAAE,0BAA0B,GAAG,IAAI,KAAK,IAAI,KAAG,CAAC,MAAM,IAAI,CAAC;;IAGhG,oFAAoF;;;QAGlF,2DAA2D;;QAG3D,4DAA4D;;;;;;;;IAI9D,8EAA8E;;;QAG5E,uFAAuF;;;;;;;;;;;yBAatE,MAAM;;;;CAI1B,CAAA"}
|
package/build/facades/speech.js
CHANGED
|
@@ -8,6 +8,7 @@ import BluetoothSdk from "@glassly/bluetooth-sdk/internal";
|
|
|
8
8
|
import sttModelManager from "../services/STTModelManager";
|
|
9
9
|
import ttsModelManager from "../services/TTSModelManager";
|
|
10
10
|
import offlineSpeechModelService from "../services/OfflineSpeechModelService";
|
|
11
|
+
import { offlineTranslationManager } from "../services/OfflineTranslationManager";
|
|
11
12
|
import sonioxDirectService from "../services/soniox/SonioxDirectService";
|
|
12
13
|
export const speech = {
|
|
13
14
|
/** Restart the glasses' on-device transcriber (e.g. after switching STT language). */
|
|
@@ -33,6 +34,15 @@ export const speech = {
|
|
|
33
34
|
/** Probe a key against the Soniox API without saving it. */
|
|
34
35
|
validateKey: (...args) => sonioxDirectService.validateApiKey(...args),
|
|
35
36
|
},
|
|
37
|
+
/** On-device translation language packs (iOS 26+; the OS owns the assets). */
|
|
38
|
+
translation: {
|
|
39
|
+
isSupported: () => offlineTranslationManager.isSupported(),
|
|
40
|
+
/** BCP-47 language the on-device transcriber produces, i.e. the translation source. */
|
|
41
|
+
sourceLanguage: () => sttModelManager.getBcp47ForLanguage(),
|
|
42
|
+
languages: (...args) => offlineTranslationManager.languages(...args),
|
|
43
|
+
status: (...args) => offlineTranslationManager.status(...args),
|
|
44
|
+
download: (...args) => offlineTranslationManager.download(...args),
|
|
45
|
+
},
|
|
36
46
|
tts: {
|
|
37
47
|
currentLanguage: () => ttsModelManager.getCurrentLanguage(),
|
|
38
48
|
languages: () => ttsModelManager.getAvailableLanguages(),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"speech.js","sourceRoot":"","sources":["../../src/facades/speech.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,YAAY,MAAM,iCAAiC,CAAA;AAC1D,OAAO,eAAe,MAAM,6BAA6B,CAAA;AACzD,OAAO,eAAe,MAAM,6BAA6B,CAAA;AACzD,OAAO,yBAEN,MAAM,uCAAuC,CAAA;AAC9C,OAAO,mBAAmB,MAAM,wCAAwC,CAAA;AAQxE,MAAM,CAAC,MAAM,MAAM,GAAG;IACpB,sFAAsF;IACtF,kBAAkB,EAAE,GAAkB,EAAE,CAAC,YAAY,CAAC,kBAAkB,EAAE;IAC1E,GAAG,EAAE;QACH,eAAe,EAAE,GAAG,EAAE,CAAC,eAAe,CAAC,kBAAkB,EAAE;QAC3D,SAAS,EAAE,GAAwB,EAAE,CAAC,eAAe,CAAC,qBAAqB,EAAE;QAC7E,YAAY,EAAE,GAA+B,EAAE,CAAC,eAAe,CAAC,kBAAkB,EAAE;QACpF,QAAQ,EAAE,CACR,GAAG,IAIF,EACc,EAAE,CAAC,eAAe,CAAC,aAAa,CAAC,GAAG,IAAI,CAAC;QAC1D,QAAQ,EAAE,CAAC,IAAY,EAAE,EAAE,CAAC,eAAe,CAAC,kBAAkB,CAAC,IAAI,CAAC;QACpE,cAAc,EAAE,GAAG,EAAE,CAAC,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speech facade — `engine.speech.{stt,tts}`: on-device STT/TTS model management,\n * wrapping the in-engine model managers. Thin passthrough (args forwarded with\n * exact types via Parameters<>), so the facade never drifts from the managers.\n * STT additionally exposes the auto-download status stream (the TTS path has none).\n */\nimport BluetoothSdk from \"@glassly/bluetooth-sdk/internal\"\nimport sttModelManager from \"../services/STTModelManager\"\nimport ttsModelManager from \"../services/TTSModelManager\"\nimport offlineSpeechModelService, {\n type DownloadStatus as OfflineModelDownloadStatus,\n} from \"../services/OfflineSpeechModelService\"\nimport sonioxDirectService from \"../services/soniox/SonioxDirectService\"\nimport type {\n DownloadProgress as SttDownloadProgress,\n ExtractionProgress as SttExtractionProgress,\n LanguageConfig as SttLanguageConfig,\n LanguageInfo as SttLanguageInfo,\n} from \"../services/STTModelManager\"\n\nexport const speech = {\n /** Restart the glasses' on-device transcriber (e.g. after switching STT language). */\n restartTranscriber: (): Promise<void> => BluetoothSdk.restartTranscriber(),\n stt: {\n currentLanguage: () => sttModelManager.getCurrentLanguage(),\n languages: (): SttLanguageConfig[] => sttModelManager.getAvailableLanguages(),\n languageInfo: (): Promise<SttLanguageInfo[]> => sttModelManager.getAllLanguageInfo(),\n download: (\n ...args: [\n code?: string,\n onProgress?: (progress: SttDownloadProgress) => void,\n onExtractionProgress?: (progress: SttExtractionProgress) => void,\n ]\n ): Promise<void> => sttModelManager.downloadModel(...args),\n activate: (code: string) => sttModelManager.setCurrentLanguage(code),\n cancelDownload: () => sttModelManager.cancelDownload(),\n deleteModel: (...args: Parameters<typeof sttModelManager.deleteModel>) => sttModelManager.deleteModel(...args),\n /** Current auto-download status of the offline STT model. */\n status: (): OfflineModelDownloadStatus | null => offlineSpeechModelService.getStatus(),\n /** Subscribe to auto-download status changes; returns an unsubscribe. */\n onStatusChanged: (listener: (status: OfflineModelDownloadStatus | null) => void): (() => void) =>\n offlineSpeechModelService.subscribe(listener),\n },\n /** Phone → Soniox direct transcription (user-supplied API key, Settings > Keys). */\n sonioxDirect: {\n getStatus: () => sonioxDirectService.getStatus(),\n /** Subscribe to status changes; returns an unsubscribe. */\n onStatusChanged: (...args: Parameters<typeof sonioxDirectService.onStatusChanged>) =>\n sonioxDirectService.onStatusChanged(...args),\n /** Probe a key against the Soniox API without saving it. */\n validateKey: (...args: Parameters<typeof sonioxDirectService.validateApiKey>) =>\n sonioxDirectService.validateApiKey(...args),\n },\n tts: {\n currentLanguage: () => ttsModelManager.getCurrentLanguage(),\n languages: () => ttsModelManager.getAvailableLanguages(),\n languageInfo: () => ttsModelManager.getAllLanguageInfo(),\n download: (...args: Parameters<typeof ttsModelManager.downloadModel>) => ttsModelManager.downloadModel(...args),\n activate: (code: string) => ttsModelManager.setCurrentLanguage(code),\n cancelDownload: () => ttsModelManager.cancelDownload(),\n deleteModel: (...args: Parameters<typeof ttsModelManager.deleteModel>) => ttsModelManager.deleteModel(...args),\n },\n}\n"]}
|
|
1
|
+
{"version":3,"file":"speech.js","sourceRoot":"","sources":["../../src/facades/speech.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,YAAY,MAAM,iCAAiC,CAAA;AAC1D,OAAO,eAAe,MAAM,6BAA6B,CAAA;AACzD,OAAO,eAAe,MAAM,6BAA6B,CAAA;AACzD,OAAO,yBAEN,MAAM,uCAAuC,CAAA;AAC9C,OAAO,EAAC,yBAAyB,EAAC,MAAM,uCAAuC,CAAA;AAC/E,OAAO,mBAAmB,MAAM,wCAAwC,CAAA;AAQxE,MAAM,CAAC,MAAM,MAAM,GAAG;IACpB,sFAAsF;IACtF,kBAAkB,EAAE,GAAkB,EAAE,CAAC,YAAY,CAAC,kBAAkB,EAAE;IAC1E,GAAG,EAAE;QACH,eAAe,EAAE,GAAG,EAAE,CAAC,eAAe,CAAC,kBAAkB,EAAE;QAC3D,SAAS,EAAE,GAAwB,EAAE,CAAC,eAAe,CAAC,qBAAqB,EAAE;QAC7E,YAAY,EAAE,GAA+B,EAAE,CAAC,eAAe,CAAC,kBAAkB,EAAE;QACpF,QAAQ,EAA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,QAAQ,EAAE,CAAC,GAAG,IAA2D,EAAE,EAAE,CAC3E,yBAAyB,CAAC,QAAQ,CAAC,GAAG,IAAI,CAAC;KAC9C;IACD,GAAG,EAAE;QACH,eAAe,EAAE,GAAG,EAAE,CAAC,eAAe,CAAC,kBAAkB,EAAE;QAC3D,SAAS,EAAE,GAAG,EAAE,CAAC,eAAe,CAAC,qBAAqB,EAAE;QACxD,YAAY,EAAE,GAAG,EAAE,CAAC,eAAe,CAAC,kBAAkB,EAAE;QACxD,QAAQ,EAAE,CAAC,GAAG,IAAsD,EAAE,EAAE,CAAC,eAAe,CAAC,aAAa,CAAC,GAAG,IAAI,CAAC;QAC/G,QAAQ,EAAE,CAAC,IAAY,EAAE,EAAE,CAAC,eAAe,CAAC,kBAAkB,CAAC,IAAI,CAAC;QACpE,cAAc,EAAE,GAAG,EAAE,CAAC,eAAe,CAAC,cAAc,EAAE;QACtD,WAAW,EAAE,CAAC,GAAG,IAAoD,EAAE,EAAE,CAAC,eAAe,CAAC,WAAW,CAAC,GAAG,IAAI,CAAC;KAC/G;CACF,CAAA","sourcesContent":["/**\n * speech facade — `engine.speech.{stt,tts}`: on-device STT/TTS model management,\n * wrapping the in-engine model managers. Thin passthrough (args forwarded with\n * exact types via Parameters<>), so the facade never drifts from the managers.\n * STT additionally exposes the auto-download status stream (the TTS path has none).\n */\nimport BluetoothSdk from \"@glassly/bluetooth-sdk/internal\"\nimport sttModelManager from \"../services/STTModelManager\"\nimport ttsModelManager from \"../services/TTSModelManager\"\nimport offlineSpeechModelService, {\n type DownloadStatus as OfflineModelDownloadStatus,\n} from \"../services/OfflineSpeechModelService\"\nimport {offlineTranslationManager} from \"../services/OfflineTranslationManager\"\nimport sonioxDirectService from \"../services/soniox/SonioxDirectService\"\nimport type {\n DownloadProgress as SttDownloadProgress,\n ExtractionProgress as SttExtractionProgress,\n LanguageConfig as SttLanguageConfig,\n LanguageInfo as SttLanguageInfo,\n} from \"../services/STTModelManager\"\n\nexport const speech = {\n /** Restart the glasses' on-device transcriber (e.g. after switching STT language). */\n restartTranscriber: (): Promise<void> => BluetoothSdk.restartTranscriber(),\n stt: {\n currentLanguage: () => sttModelManager.getCurrentLanguage(),\n languages: (): SttLanguageConfig[] => sttModelManager.getAvailableLanguages(),\n languageInfo: (): Promise<SttLanguageInfo[]> => sttModelManager.getAllLanguageInfo(),\n download: (\n ...args: [\n code?: string,\n onProgress?: (progress: SttDownloadProgress) => void,\n onExtractionProgress?: (progress: SttExtractionProgress) => void,\n ]\n ): Promise<void> => sttModelManager.downloadModel(...args),\n activate: (code: string) => sttModelManager.setCurrentLanguage(code),\n cancelDownload: () => sttModelManager.cancelDownload(),\n deleteModel: (...args: Parameters<typeof sttModelManager.deleteModel>) => sttModelManager.deleteModel(...args),\n /** Current auto-download status of the offline STT model. */\n status: (): OfflineModelDownloadStatus | null => offlineSpeechModelService.getStatus(),\n /** Subscribe to auto-download status changes; returns an unsubscribe. */\n onStatusChanged: (listener: (status: OfflineModelDownloadStatus | null) => void): (() => void) =>\n offlineSpeechModelService.subscribe(listener),\n },\n /** Phone → Soniox direct transcription (user-supplied API key, Settings > Keys). */\n sonioxDirect: {\n getStatus: () => sonioxDirectService.getStatus(),\n /** Subscribe to status changes; returns an unsubscribe. */\n onStatusChanged: (...args: Parameters<typeof sonioxDirectService.onStatusChanged>) =>\n sonioxDirectService.onStatusChanged(...args),\n /** Probe a key against the Soniox API without saving it. */\n validateKey: (...args: Parameters<typeof sonioxDirectService.validateApiKey>) =>\n sonioxDirectService.validateApiKey(...args),\n },\n /** On-device translation language packs (iOS 26+; the OS owns the assets). */\n translation: {\n isSupported: () => offlineTranslationManager.isSupported(),\n /** BCP-47 language the on-device transcriber produces, i.e. the translation source. */\n sourceLanguage: () => sttModelManager.getBcp47ForLanguage(),\n languages: (...args: Parameters<typeof offlineTranslationManager.languages>) =>\n offlineTranslationManager.languages(...args),\n status: (...args: Parameters<typeof offlineTranslationManager.status>) => offlineTranslationManager.status(...args),\n download: (...args: Parameters<typeof offlineTranslationManager.download>) =>\n offlineTranslationManager.download(...args),\n },\n tts: {\n currentLanguage: () => ttsModelManager.getCurrentLanguage(),\n languages: () => ttsModelManager.getAvailableLanguages(),\n languageInfo: () => ttsModelManager.getAllLanguageInfo(),\n download: (...args: Parameters<typeof ttsModelManager.downloadModel>) => ttsModelManager.downloadModel(...args),\n activate: (code: string) => ttsModelManager.setCurrentLanguage(code),\n cancelDownload: () => ttsModelManager.cancelDownload(),\n deleteModel: (...args: Parameters<typeof ttsModelManager.deleteModel>) => ttsModelManager.deleteModel(...args),\n },\n}\n"]}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
export const ENGINE_RELEASE_METADATA = Object.freeze({
|
|
2
2
|
"schemaVersion": 1,
|
|
3
|
-
"familyBaseVersion": "0.3.
|
|
4
|
-
"releaseIdentity": "0.3.
|
|
5
|
-
"releaseSetId": "glassly-0.3.
|
|
6
|
-
"sourceCommit": "
|
|
3
|
+
"familyBaseVersion": "0.3.1",
|
|
4
|
+
"releaseIdentity": "0.3.1-beta.527",
|
|
5
|
+
"releaseSetId": "glassly-0.3.1-beta.527",
|
|
6
|
+
"sourceCommit": "f153bb191ed5626f97f34b2317c4a93204ec0374",
|
|
7
7
|
"otaManifestUrl": null,
|
|
8
8
|
"otaManifestSha256": null
|
|
9
9
|
});
|
|
@@ -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,
|
|
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,wBAAwB;IACxC,cAAc,EAAE,0CAA0C;IAC1D,gBAAgB,EAAE,IAAI;IACtB,mBAAmB,EAAE,IAAI;CAC1B,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\": \"0.3.1\",\n \"releaseIdentity\": \"0.3.1-beta.527\",\n \"releaseSetId\": \"glassly-0.3.1-beta.527\",\n \"sourceCommit\": \"f153bb191ed5626f97f34b2317c4a93204ec0374\",\n \"otaManifestUrl\": null,\n \"otaManifestSha256\": null\n})\n"]}
|
package/build/index.d.ts
CHANGED
|
@@ -44,7 +44,7 @@ export { deriveGalleryDisplayName } from "./utils/permissions/galleryDisplayName
|
|
|
44
44
|
export type { PhotoInfo, CaptureFile, CaptureGroup, GalleryResponse, ServerStatus, HealthResponse, GalleryEvent, } from "./types/asg";
|
|
45
45
|
export type { PairFailureEvent, GlassesNotReadyEvent } from "@glassly/bluetooth-sdk";
|
|
46
46
|
export { WebSocketStatus } from "./stores/connection";
|
|
47
|
-
export { DUMMY_APPLET, saveAppsOrder, getAppsOrder, sortAppsByPackageNamePriority, saveLastOpenTime, getLastOpenTime, sortAppsByLastOpenTime, useApps, useStart, useStop, useSetForeground, useClearForeground, useRefresh, useStopAll, useInstall, useUninstall, useActiveApps, useRunningAlwaysOnApps,
|
|
47
|
+
export { DUMMY_APPLET, saveAppsOrder, getAppsOrder, sortAppsByPackageNamePriority, saveLastOpenTime, getLastOpenTime, sortAppsByLastOpenTime, useApps, useStart, useStop, useSetForeground, useClearForeground, useRefresh, useStopAll, useInstall, useUninstall, useActiveApps, useRunningAlwaysOnApps, useActiveBackgroundApps, useBackgroundApps, useActiveForegroundApp, useForegroundApp, useActiveBackgroundAppsCount, useLocalMiniApps, type StartOptions, type OrderMap, } from "./stores/apps";
|
|
48
48
|
export { decideDevLaunchRoute, type DecideDevLaunchOptions, type DevLaunchResult, type DevManifest, } from "./utils/devMiniappLaunch";
|
|
49
49
|
export { HardwareCompatibility, type CompatibilityResult } from "./utils/hardware";
|
|
50
50
|
export { BgTimer, throttle, debounce } from "./utils/timers";
|
package/build/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAGH,OAAO,EAAC,MAAM,EAAC,MAAM,UAAU,CAAA;AAC/B,YAAY,EACV,qBAAqB,EACrB,aAAa,EACb,aAAa,EACb,YAAY,EACZ,aAAa,EACb,kBAAkB,EAClB,uBAAuB,GACxB,MAAM,mBAAmB,CAAA;AAC1B,YAAY,EAAC,kBAAkB,EAAE,sBAAsB,EAAC,MAAM,yBAAyB,CAAA;AACvF,YAAY,EAAC,iBAAiB,EAAC,MAAM,6CAA6C,CAAA;AAClF,OAAO,EAAC,uBAAuB,EAAE,iBAAiB,EAAE,eAAe,EAAC,MAAM,wBAAwB,CAAA;AAClG,YAAY,EAAC,gBAAgB,EAAC,MAAM,uBAAuB,CAAA;AAC3D,YAAY,EAAC,gBAAgB,EAAC,MAAM,4BAA4B,CAAA;AAChE,YAAY,EAAC,kBAAkB,EAAC,MAAM,yBAAyB,CAAA;AAC/D,YAAY,EACV,sBAAsB,EACtB,UAAU,EACV,kBAAkB,EAClB,eAAe,EACf,aAAa,EACb,aAAa,EACb,YAAY,EACZ,gBAAgB,GACjB,MAAM,qBAAqB,CAAA;AAO5B,OAAO,EAAC,QAAQ,EAAE,UAAU,EAAE,uBAAuB,EAAC,MAA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SAAS,EACT,aAAa,GACd,MAAM,SAAS,CAAA;AAChB,YAAY,EACV,mBAAmB,EACnB,kBAAkB,EAClB,mBAAmB,EACnB,sBAAsB,EACtB,mBAAmB,EACnB,eAAe,EACf,kBAAkB,EAClB,iBAAiB,EACjB,iBAAiB,EACjB,YAAY,EACZ,UAAU,EACV,iBAAiB,EACjB,gBAAgB,EAChB,eAAe,EACf,SAAS,GACV,MAAM,SAAS,CAAA"}
|
package/build/index.js
CHANGED
|
@@ -42,7 +42,7 @@ export { deriveGalleryDisplayName } from "./utils/permissions/galleryDisplayName
|
|
|
42
42
|
export { WebSocketStatus } from "./stores/connection";
|
|
43
43
|
// App-list hook layer + pure list helpers (the raw useAppStatusStore and
|
|
44
44
|
// installAppStoreHooks wiring are internal).
|
|
45
|
-
export { DUMMY_APPLET, saveAppsOrder, getAppsOrder, sortAppsByPackageNamePriority, saveLastOpenTime, getLastOpenTime, sortAppsByLastOpenTime, useApps, useStart, useStop, useSetForeground, useClearForeground, useRefresh, useStopAll, useInstall, useUninstall, useActiveApps, useRunningAlwaysOnApps,
|
|
45
|
+
export { DUMMY_APPLET, saveAppsOrder, getAppsOrder, sortAppsByPackageNamePriority, saveLastOpenTime, getLastOpenTime, sortAppsByLastOpenTime, useApps, useStart, useStop, useSetForeground, useClearForeground, useRefresh, useStopAll, useInstall, useUninstall, useActiveApps, useRunningAlwaysOnApps, useActiveBackgroundApps, useBackgroundApps, useActiveForegroundApp, useForegroundApp, useActiveBackgroundAppsCount, useLocalMiniApps, } from "./stores/apps";
|
|
46
46
|
// Pure dev-miniapp launch-route decision (registration itself is internal).
|
|
47
47
|
export { decideDevLaunchRoute, } from "./utils/devMiniappLaunch";
|
|
48
48
|
export { HardwareCompatibility } from "./utils/hardware";
|
package/build/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,2EAA2E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AM,yBAAyB,CAAA;AAEhC,OAAO,EACL,2BAA2B,EAC3B,kBAAkB,EAClB,uCAAuC,EACvC,yCAAyC,GAC1C,MAAM,4BAA4B,CAAA;AAMnC,OAAO,EAAC,uBAAuB,EAAC,MAAM,6CAA6C,CAAA;AACnF,OAAO,EAAC,wBAAwB,EAAC,MAAM,wCAAwC,CAAA;AAe/E,+EAA+E;AAC/E,OAAO,EAAC,eAAe,EAAC,MAAM,qBAAqB,CAAA;AAEnD,yEAAyE;AACzE,6CAA6C;AAC7C,OAAO,EACL,YAAY,EACZ,aAAa,EACb,YAAY,EACZ,6BAA6B,EAC7B,gBAAgB,EAChB,eAAe,EACf,sBAAsB,EACtB,OAAO,EACP,QAAQ,EACR,OAAO,EACP,gBAAgB,EAChB,kBAAkB,EAClB,UAAU,EACV,UAAU,EACV,UAAU,EACV,YAAY,EACZ,aAAa,EACb,sBAAsB,EACtB,aAAa,EACb,kBAAkB,EAClB,uBAAuB,EACvB,iBAAiB,EACjB,sBAAsB,EACtB,gBAAgB,EAChB,4BAA4B,EAC5B,gBAAgB,GAGjB,MAAM,eAAe,CAAA;AAEtB,4EAA4E;AAC5E,OAAO,EACL,oBAAoB,GAIrB,MAAM,0BAA0B,CAAA;AACjC,OAAO,EAAC,qBAAqB,EAA2B,MAAM,kBAAkB,CAAA;AAChF,OAAO,EAAC,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAC,MAAM,gBAAgB,CAAA;AAE1D,0CAA0C;AAC1C,OAAO,EACL,YAAY,EACZ,wBAAwB,EACxB,WAAW,EACX,eAAe,EACf,qBAAqB,EACrB,oBAAoB,EACpB,gBAAgB,EAChB,eAAe,EACf,eAAe,EACf,UAAU,EACV,IAAI,EACJ,SAAS,EACT,aAAa,GACd,MAAM,SAAS,CAAA","sourcesContent":["/**\n * `@glassly/engine` — the OEM-facing main entry.\n *\n * The `engine` namespace (configure/start/stop + typed domain facades), the\n * public contract/read-model types, and the pure helpers host UI legitimately\n * renders with (decision functions, sort/order helpers, policy constants,\n * capability tables, timers). Judgment rule: read models, commands, pure\n * functions and types belong here; anything that mutates runtime state or\n * exposes a raw store/service remains private to the Glassly host.\n * See cloud-v2/docs/issues/020-glasses-status-boundary/integration-review.md §D.\n */\n\n// The namespaced OEM-facing engine API (the \"(A) host API\"). See ./engine.\nexport {engine} from \"./engine\"\nexport type {\n ReportAttachmentInput,\n ReportContext,\n ReportDetails,\n ReportStatus,\n ReportTrigger,\n ReportSubmitResult,\n EngineSubmitReportInput,\n} from \"./facades/reports\"\nexport type {IslandNotification, IslandNotificationKind} from \"./facades/notifications\"\nexport type {PresentationOwner} from \"./services/notifications/notificationPolicy\"\nexport {DEFAULT_HIDDEN_PACKAGES, isGatedByDevTools, isSystemMiniapp} from \"./stores/appVisibility\"\nexport type {WifiSearchResult} from \"./facades/glassesWifi\"\nexport type {IdentitySnapshot} from \"./services/PairingIdentity\"\nexport type {DisplayMirrorEvent} from \"./facades/displayMirror\"\nexport type {\n IslandConfigureOptions,\n IslandAuth,\n IslandConfigValues,\n IslandAnalytics,\n IslandUiSeams,\n ScanQrOptions,\n ScanQrResult,\n SubjectTokenType,\n} from \"./runtime/bootstrap\"\n\n// Settings contract: the typed key registry (schema descriptors — the same\n// surface engine.settings.descriptor()/keys() reads), the per-key React hook\n// (the hook layer, same precedent as the apps hooks below), and the pure\n// device-model key helpers. The raw useSettingsStore stays internal;\n// imperative access goes through engine.settings.\nexport {SETTINGS, useSetting, AI_DATA_CONSENT_VERSION} from \"./stores/settings\"\nexport {isCfwFirmwareVersion, isCustomDashboardEligible} from \"./services/pages/pageEligibility\"\n\n// AI tier registry: the curated per-tier model dropdown options and helpers\n// the Settings > AI Models screen renders. Resolution itself runs inside\n// LocalMiniappRuntime; the screen only reads/writes the ai_model_* settings.\nexport {AI_TIERS, TIER_MODEL_OPTIONS, parseTierSetting} from \"./services/AiTierResolution\"\nexport type {AiTier, AiTierProvider, TierModelOption} from \"./services/AiTierResolution\"\n\n// Shared user memory timeline (engine.memory / Settings > Memory). Entry and\n// session shapes are canonical in @glassly/miniapp (the session.memory\n// surface); the stats read model is engine-side.\nexport type {MemoryStats} from \"./services/MemoryStore\"\nexport type {SpeakerProfile} from \"./services/SpeakerProfileStore\"\nexport type {EnrollOutcome} from \"./facades/speakers\"\nexport {MENTRA_LIVE_SETTING_KEYS, getBluetoothSettingKeysForDevice} from \"./stores/bluetoothSettingKeys\"\n\n// Runtime-shared constants and contract DTOs.\nexport {ISLAND_SETTINGS_KEYS} from \"./runtime/config\"\nexport type {CloudClientStatusSnapshot, MiniappAuthToken, InteropAuditEvent, TtsSynthesisResult} from \"./runtime/config\"\n\n// Pure readiness predicates over glasses connection state.\nexport {\n isGlassesConnected,\n isGlassesReady,\n isGlassesLinkLayerBusy,\n waitForGlassesReady,\n type GlassesConnectionStatus,\n type WaitForGlassesReadyOptions,\n} from \"./services/GlassesReadiness\"\n// Pure connect/reconnect decision helpers (host UI renders the outcome).\nexport {\n decideReconnect,\n decideConnectButtonAction,\n type ReconnectDecision,\n type ReconnectDecisionInput,\n type ConnectButtonAction,\n} from \"./services/ConnectionCoordinator\"\n\n// OTA read-model types for host OTA UI (progress screen, error mapping,\n// progress section) — the check/install machinery itself is internal.\nexport type {\n VersionInfo,\n MtkPatch,\n BesFirmware,\n VersionJson,\n OtaCheckResult,\n OtaCheckCurrentGlassesResult,\n OtaCheckCurrentGlassesOptions,\n} from \"./services/OtaUpdateCheckService\"\n// OTA install policy (watchdog timings + failure copy) + display-state\n// derivation, consumed by the OTA screens and their tests.\nexport {\n MINIMUM_OTA_STATUS_BUILD,\n MAX_RETRIES,\n RETRY_INTERVAL_MS,\n PROGRESS_TIMEOUT_MS,\n DOWNLOAD_STUCK_TIMEOUT_MS,\n MTK_INSTALL_TIMEOUT_MS,\n GLOBAL_OTA_TIMEOUT_MS,\n PING_INTERVAL_MS,\n QUERY_REPLY_TIMEOUT_MS,\n BES_RESTART_TIMEOUT_MS,\n OtaProgressMessages,\n} from \"./services/otaInstallPolicy\"\nexport {deriveDisplayState} from \"./services/otaDisplayState\"\nexport type {DisplayState} from \"./services/otaDisplayState\"\nexport type {\n OtaProgress,\n OtaProgressStatus,\n OtaStatus,\n OtaUpdateInfo,\n ReleaseChangelog,\n OtaSnapshot,\n OtaInstallSnapshot,\n} from \"./facades/ota\"\nexport {\n beginOtaAutoChain,\n clearOtaAutoChainReconnectWait,\n isOtaAutoChainActive,\n otaAutoChainFingerprint,\n otaAutoChainReconnectWaitRemaining,\n stopOtaAutoChain,\n tryAdvanceOtaAutoChain,\n MAX_OTA_AUTO_CHAIN_PASSES,\n OTA_AUTO_CHAIN_RECONNECT_TIMEOUT_MS,\n} from \"./services/OtaAutoChain\"\nexport type {OtaAutoChainAdvanceResult} from \"./services/OtaAutoChain\"\nexport {\n BES_INSTALL_RESTART_MESSAGE,\n getOtaErrorMessage,\n shouldRequireGlassesRebootForBesFailure,\n shouldShowChangeWifiForOtaDownloadFailure,\n} from \"./services/OtaErrorMapping\"\n\n// Gallery read models: engine.gallery.onNotice payload types, the media\n// permission helper + display-name derivation host gallery UI uses, and the\n// glasses-camera DTO types (re-exported through the host @/types/asg shim).\nexport type {GalleryNotice, GalleryNoticeCode} from \"./services/asg/galleryNotices\"\nexport {MediaLibraryPermissions} from \"./utils/permissions/MediaLibraryPermissions\"\nexport {deriveGalleryDisplayName} from \"./utils/permissions/galleryDisplayName\"\nexport type {\n PhotoInfo,\n CaptureFile,\n CaptureGroup,\n GalleryResponse,\n ServerStatus,\n HealthResponse,\n GalleryEvent,\n} from \"./types/asg\"\n\n// Bluetooth SDK event types host UI subscribes to via engine facades (the\n// BluetoothSdk singleton passthrough itself is internal).\nexport type {PairFailureEvent, GlassesNotReadyEvent} from \"@glassly/bluetooth-sdk\"\n\n// Cloud connection status enum (read model; the connection store is internal).\nexport {WebSocketStatus} from \"./stores/connection\"\n\n// App-list hook layer + pure list helpers (the raw useAppStatusStore and\n// installAppStoreHooks wiring are internal).\nexport {\n DUMMY_APPLET,\n saveAppsOrder,\n getAppsOrder,\n sortAppsByPackageNamePriority,\n saveLastOpenTime,\n getLastOpenTime,\n sortAppsByLastOpenTime,\n useApps,\n useStart,\n useStop,\n useSetForeground,\n useClearForeground,\n useRefresh,\n useStopAll,\n useInstall,\n useUninstall,\n useActiveApps,\n useRunningAlwaysOnApps,\n useDashboards,\n useActiveDashboard,\n useActiveBackgroundApps,\n useBackgroundApps,\n useActiveForegroundApp,\n useForegroundApp,\n useActiveBackgroundAppsCount,\n useLocalMiniApps,\n type StartOptions,\n type OrderMap,\n} from \"./stores/apps\"\n\n// Pure dev-miniapp launch-route decision (registration itself is internal).\nexport {\n decideDevLaunchRoute,\n type DecideDevLaunchOptions,\n type DevLaunchResult,\n type DevManifest,\n} from \"./utils/devMiniappLaunch\"\nexport {HardwareCompatibility, type CompatibilityResult} from \"./utils/hardware\"\nexport {BgTimer, throttle, debounce} from \"./utils/timers\"\n\n// Hardware types and capability profiles.\nexport {\n HardwareType,\n HardwareRequirementLevel,\n DeviceTypes,\n ControllerTypes,\n HARDWARE_CAPABILITIES,\n getModelCapabilities,\n simulatedGlasses,\n evenRealitiesG1,\n evenRealitiesG2,\n mentraLive,\n nimo,\n vuzixZ100,\n mentraDisplay,\n} from \"./types\"\nexport type {\n HardwareRequirement,\n CameraCapabilities,\n DisplayCapabilities,\n MicrophoneCapabilities,\n SpeakerCapabilities,\n IMUCapabilities,\n ButtonCapabilities,\n LightCapabilities,\n PowerCapabilities,\n Capabilities,\n AppletType,\n AppPermissionType,\n AppletPermission,\n AppletInterface,\n ClientApp,\n} from \"./types\"\n"]}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,2EAA2E;AAC3E,OAAO,EAAC,MAAM,EAAC,MAAM,UAAU,CAAA;AAY/B,OAAO,EAAC,uBAAuB,EAAE,iBAAiB,EAAE,eAAe,EAAC,MAAM,wBAAwB,CAAA;AAelG,2EAA2E;AAC3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MAAM,6CAA6C,CAAA;AACnF,OAAO,EAAC,wBAAwB,EAAC,MAAM,wCAAwC,CAAA;AAe/E,+EAA+E;AAC/E,OAAO,EAAC,eAAe,EAAC,MAAM,qBAAqB,CAAA;AAEnD,yEAAyE;AACzE,6CAA6C;AAC7C,OAAO,EACL,YAAY,EACZ,aAAa,EACb,YAAY,EACZ,6BAA6B,EAC7B,gBAAgB,EAChB,eAAe,EACf,sBAAsB,EACtB,OAAO,EACP,QAAQ,EACR,OAAO,EACP,gBAAgB,EAChB,kBAAkB,EAClB,UAAU,EACV,UAAU,EACV,UAAU,EACV,YAAY,EACZ,aAAa,EACb,sBAAsB,EACtB,uBAAuB,EACvB,iBAAiB,EACjB,sBAAsB,EACtB,gBAAgB,EAChB,4BAA4B,EAC5B,gBAAgB,GAGjB,MAAM,eAAe,CAAA;AAEtB,4EAA4E;AAC5E,OAAO,EACL,oBAAoB,GAIrB,MAAM,0BAA0B,CAAA;AACjC,OAAO,EAAC,qBAAqB,EAA2B,MAAM,kBAAkB,CAAA;AAChF,OAAO,EAAC,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAC,MAAM,gBAAgB,CAAA;AAE1D,0CAA0C;AAC1C,OAAO,EACL,YAAY,EACZ,wBAAwB,EACxB,WAAW,EACX,eAAe,EACf,qBAAqB,EACrB,oBAAoB,EACpB,gBAAgB,EAChB,eAAe,EACf,eAAe,EACf,UAAU,EACV,IAAI,EACJ,SAAS,EACT,aAAa,GACd,MAAM,SAAS,CAAA","sourcesContent":["/**\n * `@glassly/engine` — the OEM-facing main entry.\n *\n * The `engine` namespace (configure/start/stop + typed domain facades), the\n * public contract/read-model types, and the pure helpers host UI legitimately\n * renders with (decision functions, sort/order helpers, policy constants,\n * capability tables, timers). Judgment rule: read models, commands, pure\n * functions and types belong here; anything that mutates runtime state or\n * exposes a raw store/service remains private to the Glassly host.\n * See cloud-v2/docs/issues/020-glasses-status-boundary/integration-review.md §D.\n */\n\n// The namespaced OEM-facing engine API (the \"(A) host API\"). See ./engine.\nexport {engine} from \"./engine\"\nexport type {\n ReportAttachmentInput,\n ReportContext,\n ReportDetails,\n ReportStatus,\n ReportTrigger,\n ReportSubmitResult,\n EngineSubmitReportInput,\n} from \"./facades/reports\"\nexport type {IslandNotification, IslandNotificationKind} from \"./facades/notifications\"\nexport type {PresentationOwner} from \"./services/notifications/notificationPolicy\"\nexport {DEFAULT_HIDDEN_PACKAGES, isGatedByDevTools, isSystemMiniapp} from \"./stores/appVisibility\"\nexport type {WifiSearchResult} from \"./facades/glassesWifi\"\nexport type {IdentitySnapshot} from \"./services/PairingIdentity\"\nexport type {DisplayMirrorEvent} from \"./facades/displayMirror\"\nexport type {\n IslandConfigureOptions,\n IslandAuth,\n IslandConfigValues,\n IslandAnalytics,\n IslandUiSeams,\n ScanQrOptions,\n ScanQrResult,\n SubjectTokenType,\n} from \"./runtime/bootstrap\"\n\n// Settings contract: the typed key registry (schema descriptors — the same\n// surface engine.settings.descriptor()/keys() reads), the per-key React hook\n// (the hook layer, same precedent as the apps hooks below), and the pure\n// device-model key helpers. The raw useSettingsStore stays internal;\n// imperative access goes through engine.settings.\nexport {SETTINGS, useSetting, AI_DATA_CONSENT_VERSION} from \"./stores/settings\"\nexport {isCfwFirmwareVersion, isCustomDashboardEligible} from \"./services/pages/pageEligibility\"\n\n// AI tier registry: the curated per-tier model dropdown options and helpers\n// the Settings > AI Models screen renders. Resolution itself runs inside\n// LocalMiniappRuntime; the screen only reads/writes the ai_model_* settings.\nexport {AI_TIERS, TIER_MODEL_OPTIONS, parseTierSetting} from \"./services/AiTierResolution\"\nexport type {AiTier, AiTierProvider, TierModelOption} from \"./services/AiTierResolution\"\n\n// Shared user memory timeline (engine.memory / Settings > Memory). Entry and\n// session shapes are canonical in @glassly/miniapp (the session.memory\n// surface); the stats read model is engine-side.\nexport type {MemoryStats} from \"./services/MemoryStore\"\nexport type {SpeakerProfile} from \"./services/SpeakerProfileStore\"\nexport type {EnrollOutcome} from \"./facades/speakers\"\nexport {MENTRA_LIVE_SETTING_KEYS, getBluetoothSettingKeysForDevice} from \"./stores/bluetoothSettingKeys\"\n\n// Runtime-shared constants and contract DTOs.\nexport {ISLAND_SETTINGS_KEYS} from \"./runtime/config\"\nexport type {CloudClientStatusSnapshot, MiniappAuthToken, InteropAuditEvent, TtsSynthesisResult} from \"./runtime/config\"\n\n// Pure readiness predicates over glasses connection state.\nexport {\n isGlassesConnected,\n isGlassesReady,\n isGlassesLinkLayerBusy,\n waitForGlassesReady,\n type GlassesConnectionStatus,\n type WaitForGlassesReadyOptions,\n} from \"./services/GlassesReadiness\"\n// Pure connect/reconnect decision helpers (host UI renders the outcome).\nexport {\n decideReconnect,\n decideConnectButtonAction,\n type ReconnectDecision,\n type ReconnectDecisionInput,\n type ConnectButtonAction,\n} from \"./services/ConnectionCoordinator\"\n\n// OTA read-model types for host OTA UI (progress screen, error mapping,\n// progress section) — the check/install machinery itself is internal.\nexport type {\n VersionInfo,\n MtkPatch,\n BesFirmware,\n VersionJson,\n OtaCheckResult,\n OtaCheckCurrentGlassesResult,\n OtaCheckCurrentGlassesOptions,\n} from \"./services/OtaUpdateCheckService\"\n// OTA install policy (watchdog timings + failure copy) + display-state\n// derivation, consumed by the OTA screens and their tests.\nexport {\n MINIMUM_OTA_STATUS_BUILD,\n MAX_RETRIES,\n RETRY_INTERVAL_MS,\n PROGRESS_TIMEOUT_MS,\n DOWNLOAD_STUCK_TIMEOUT_MS,\n MTK_INSTALL_TIMEOUT_MS,\n GLOBAL_OTA_TIMEOUT_MS,\n PING_INTERVAL_MS,\n QUERY_REPLY_TIMEOUT_MS,\n BES_RESTART_TIMEOUT_MS,\n OtaProgressMessages,\n} from \"./services/otaInstallPolicy\"\nexport {deriveDisplayState} from \"./services/otaDisplayState\"\nexport type {DisplayState} from \"./services/otaDisplayState\"\nexport type {\n OtaProgress,\n OtaProgressStatus,\n OtaStatus,\n OtaUpdateInfo,\n ReleaseChangelog,\n OtaSnapshot,\n OtaInstallSnapshot,\n} from \"./facades/ota\"\nexport {\n beginOtaAutoChain,\n clearOtaAutoChainReconnectWait,\n isOtaAutoChainActive,\n otaAutoChainFingerprint,\n otaAutoChainReconnectWaitRemaining,\n stopOtaAutoChain,\n tryAdvanceOtaAutoChain,\n MAX_OTA_AUTO_CHAIN_PASSES,\n OTA_AUTO_CHAIN_RECONNECT_TIMEOUT_MS,\n} from \"./services/OtaAutoChain\"\nexport type {OtaAutoChainAdvanceResult} from \"./services/OtaAutoChain\"\nexport {\n BES_INSTALL_RESTART_MESSAGE,\n getOtaErrorMessage,\n shouldRequireGlassesRebootForBesFailure,\n shouldShowChangeWifiForOtaDownloadFailure,\n} from \"./services/OtaErrorMapping\"\n\n// Gallery read models: engine.gallery.onNotice payload types, the media\n// permission helper + display-name derivation host gallery UI uses, and the\n// glasses-camera DTO types (re-exported through the host @/types/asg shim).\nexport type {GalleryNotice, GalleryNoticeCode} from \"./services/asg/galleryNotices\"\nexport {MediaLibraryPermissions} from \"./utils/permissions/MediaLibraryPermissions\"\nexport {deriveGalleryDisplayName} from \"./utils/permissions/galleryDisplayName\"\nexport type {\n PhotoInfo,\n CaptureFile,\n CaptureGroup,\n GalleryResponse,\n ServerStatus,\n HealthResponse,\n GalleryEvent,\n} from \"./types/asg\"\n\n// Bluetooth SDK event types host UI subscribes to via engine facades (the\n// BluetoothSdk singleton passthrough itself is internal).\nexport type {PairFailureEvent, GlassesNotReadyEvent} from \"@glassly/bluetooth-sdk\"\n\n// Cloud connection status enum (read model; the connection store is internal).\nexport {WebSocketStatus} from \"./stores/connection\"\n\n// App-list hook layer + pure list helpers (the raw useAppStatusStore and\n// installAppStoreHooks wiring are internal).\nexport {\n DUMMY_APPLET,\n saveAppsOrder,\n getAppsOrder,\n sortAppsByPackageNamePriority,\n saveLastOpenTime,\n getLastOpenTime,\n sortAppsByLastOpenTime,\n useApps,\n useStart,\n useStop,\n useSetForeground,\n useClearForeground,\n useRefresh,\n useStopAll,\n useInstall,\n useUninstall,\n useActiveApps,\n useRunningAlwaysOnApps,\n useActiveBackgroundApps,\n useBackgroundApps,\n useActiveForegroundApp,\n useForegroundApp,\n useActiveBackgroundAppsCount,\n useLocalMiniApps,\n type StartOptions,\n type OrderMap,\n} from \"./stores/apps\"\n\n// Pure dev-miniapp launch-route decision (registration itself is internal).\nexport {\n decideDevLaunchRoute,\n type DecideDevLaunchOptions,\n type DevLaunchResult,\n type DevManifest,\n} from \"./utils/devMiniappLaunch\"\nexport {HardwareCompatibility, type CompatibilityResult} from \"./utils/hardware\"\nexport {BgTimer, throttle, debounce} from \"./utils/timers\"\n\n// Hardware types and capability profiles.\nexport {\n HardwareType,\n HardwareRequirementLevel,\n DeviceTypes,\n ControllerTypes,\n HARDWARE_CAPABILITIES,\n getModelCapabilities,\n simulatedGlasses,\n evenRealitiesG1,\n evenRealitiesG2,\n mentraLive,\n nimo,\n vuzixZ100,\n mentraDisplay,\n} from \"./types\"\nexport type {\n HardwareRequirement,\n CameraCapabilities,\n DisplayCapabilities,\n MicrophoneCapabilities,\n SpeakerCapabilities,\n IMUCapabilities,\n ButtonCapabilities,\n LightCapabilities,\n PowerCapabilities,\n Capabilities,\n AppletType,\n AppPermissionType,\n AppletPermission,\n AppletInterface,\n ClientApp,\n} from \"./types\"\n"]}
|