@glassly/engine 0.3.3-beta.633 → 0.3.3-beta.654
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 +1 -0
- package/build/engine.d.ts.map +1 -1
- package/build/facades/glasses.d.ts +7 -0
- package/build/facades/glasses.d.ts.map +1 -1
- package/build/facades/glasses.js +34 -1
- package/build/facades/glasses.js.map +1 -1
- package/build/generated/releaseMetadata.js +3 -3
- 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/AiTierResolution.d.ts.map +1 -1
- package/build/services/AiTierResolution.js +11 -3
- package/build/services/AiTierResolution.js.map +1 -1
- package/build/services/GestureDotsService.d.ts.map +1 -1
- package/build/services/GestureDotsService.js +15 -6
- package/build/services/GestureDotsService.js.map +1 -1
- package/build/services/MicStateCoordinator.d.ts +8 -0
- package/build/services/MicStateCoordinator.d.ts.map +1 -1
- package/build/services/MicStateCoordinator.js +24 -3
- package/build/services/MicStateCoordinator.js.map +1 -1
- package/build/services/gestureDotGlyphs.d.ts +1 -1
- package/build/services/gestureDotGlyphs.d.ts.map +1 -1
- package/build/services/gestureDotGlyphs.js +1 -0
- package/build/services/gestureDotGlyphs.js.map +1 -1
- package/build/stores/glasses.d.ts.map +1 -1
- package/build/stores/glasses.js +1 -0
- package/build/stores/glasses.js.map +1 -1
- package/build/stores/settings.js +5 -5
- package/build/stores/settings.js.map +1 -1
- package/build/types/capabilities/even-realities-g2.js +1 -1
- package/build/types/capabilities/even-realities-g2.js.map +1 -1
- package/build/types/capabilities/mentra-display.js +1 -1
- package/build/types/capabilities/mentra-display.js.map +1 -1
- package/build/types/capabilities/rayneo-io.js +1 -1
- package/build/types/capabilities/rayneo-io.js.map +1 -1
- package/build/utils/timers/index.d.ts +1 -2
- package/build/utils/timers/index.d.ts.map +1 -1
- package/build/utils/timers/index.js +1 -2
- package/build/utils/timers/index.js.map +1 -1
- package/build/utils/timers/timers.d.ts +3 -5
- package/build/utils/timers/timers.d.ts.map +1 -1
- package/build/utils/timers/timers.js +78 -128
- package/build/utils/timers/timers.js.map +1 -1
- package/package.json +8 -8
- package/src/facades/glasses.ts +34 -1
- package/src/generated/releaseMetadata.ts +3 -3
- package/src/index.ts +1 -1
- package/src/services/AiTierResolution.ts +12 -3
- package/src/services/GestureDotsService.ts +16 -6
- package/src/services/MicStateCoordinator.ts +25 -3
- package/src/services/gestureDotGlyphs.ts +2 -1
- package/src/stores/glasses.ts +1 -0
- package/src/stores/settings.ts +5 -5
- package/src/types/capabilities/even-realities-g2.ts +1 -1
- package/src/types/capabilities/mentra-display.ts +1 -1
- package/src/types/capabilities/rayneo-io.ts +1 -1
- package/src/utils/timers/index.ts +1 -2
- package/src/utils/timers/timers.ts +82 -157
package/build/engine.d.ts
CHANGED
|
@@ -81,6 +81,7 @@ export declare const engine: {
|
|
|
81
81
|
getMediaVolume: () => Promise<import("@glassly/bluetooth-sdk").GlassesMediaVolumeGetResult>;
|
|
82
82
|
setMediaVolume: (level: number) => Promise<import("@glassly/bluetooth-sdk").GlassesMediaVolumeSetResult>;
|
|
83
83
|
setOwnAppPlaying: (playing: boolean) => Promise<void>;
|
|
84
|
+
onMicLevel: (cb: (dbfs: number) => void) => (() => void);
|
|
84
85
|
};
|
|
85
86
|
wifi: {
|
|
86
87
|
scan(): Promise<import("@glassly/bluetooth-sdk").WifiSearchResult[]>;
|
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;AA4C5G,eAAO,MAAM,MAAM;IACjB,2EAA2E;;IAE3E,8EAA8E;;IAE9E;iDAC6C;;IAgG7C;;yCAEqC
|
|
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;AA4C5G,eAAO,MAAM,MAAM;IACjB,2EAA2E;;IAE3E,8EAA8E;;IAE9E;iDAC6C;;IAgG7C;;yCAEqC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAmCrC,wEAAwE;;;;;;;;IAExE,sEAAsE;;;;;;;;;;;;IAEtE,qFAAqF;;;;gBA5HV,CAAC;mBAAiB,CAAC;;;gBAM5F,CADA;mBAAiB,CAAC;;;;;;;;;;;;;;;;;IAyHpB,qEAAqE;;;;IAErE,sFAAsF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAEtF,6EAA6E;;;;;;;;;;;;IAE7E,iFAAiF;;;;;;;;;;;;;;;;;;;;;;;IAEjF,8CAA8C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAE9C,uDAAuD;;;;;;;;;;;;;;;;IAEvD,8EAA8E;;;;;;;;IAE9E,qFAAqF;;;;IAErF,4EAA4E;;;;;;;;;;;IAE5E,+EAA+E;;;;;;;;;;;;IAE/E,kFAAkF;;;;;+BAlJ3D,CAAC;;;+BAUf,CAAC;;;;;;;;;;;;IA0IV,mFAAmF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAGpF,CAAA"}
|
|
@@ -52,6 +52,7 @@ declare function projectInfo(): {
|
|
|
52
52
|
sceneCanvasWidth: number | undefined;
|
|
53
53
|
sceneCanvasHeight: number | undefined;
|
|
54
54
|
volumeGate: boolean;
|
|
55
|
+
firmwareUpdateAvailable: boolean;
|
|
55
56
|
wifi: {
|
|
56
57
|
state: "disconnected";
|
|
57
58
|
} | {
|
|
@@ -165,6 +166,12 @@ export declare const glasses: {
|
|
|
165
166
|
setMediaVolume: (level: number) => Promise<import("@glassly/bluetooth-sdk").GlassesMediaVolumeSetResult>;
|
|
166
167
|
/** Tell native whether THIS app is currently playing audio (for ducking). */
|
|
167
168
|
setOwnAppPlaying: (playing: boolean) => Promise<void>;
|
|
169
|
+
/**
|
|
170
|
+
* Stream the active mic's level in dBFS, one reading per PCM chunk. Holds
|
|
171
|
+
* raw PCM open while subscribed, so the mic runs with no miniapp listening
|
|
172
|
+
* (and the G2 volume gate stays open).
|
|
173
|
+
*/
|
|
174
|
+
onMicLevel: (cb: (dbfs: number) => void) => (() => void);
|
|
168
175
|
};
|
|
169
176
|
wifi: {
|
|
170
177
|
scan(): Promise<import("@glassly/bluetooth-sdk").WifiSearchResult[]>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"glasses.d.ts","sourceRoot":"","sources":["../../src/facades/glasses.ts"],"names":[],"mappings":"AAaA,OAAO,KAAK,EACV,gBAAgB,EAChB,cAAc,EACd,MAAM,EACN,mBAAmB,EACnB,oBAAoB,EACpB,UAAU,EACX,MAAM,wBAAwB,CAAA;
|
|
1
|
+
{"version":3,"file":"glasses.d.ts","sourceRoot":"","sources":["../../src/facades/glasses.ts"],"names":[],"mappings":"AAaA,OAAO,KAAK,EACV,gBAAgB,EAChB,cAAc,EACd,MAAM,EACN,mBAAmB,EACnB,oBAAoB,EACpB,UAAU,EACX,MAAM,wBAAwB,CAAA;AAQ/B,OAAwB,EACtB,KAAK,qBAAqB,EAC1B,KAAK,2BAA2B,EACjC,MAAM,wCAAwC,CAAA;AAqB/C,iBAAS,aAAa;;;;;;;;;;;;;;;;EAerB;AAED,iBAAS,uBAAuB;;;;;EAQ/B;AAED,iBAAS,qBAAqB;IAG1B,sFAAsF;;;;IAItF,6DAA6D;;;;EAKhE;AAED,iBAAS,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;EAyBnB;AAED,MAAM,MAAM,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;QAKhD,8CAA8C;;QAE9C,qCAAqC;gCACb,MAAM;QAC9B,6EAA6E;oCACjD,OAAO,KAAG,OAAO,CAAC,IAAI,CAAC;QACnD;;;;WAIG;yBACc,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,KAAG,CAAC,MAAM,IAAI,CAAC;;;;;;;;;;;;;;;;;CAgBzD,CAAA"}
|
package/build/facades/glasses.js
CHANGED
|
@@ -14,6 +14,7 @@ import BluetoothSdk from "@glassly/bluetooth-sdk/internal";
|
|
|
14
14
|
import { useGlassesStore } from "../stores/glasses";
|
|
15
15
|
import { useSettingsStore, SETTINGS } from "../stores/settings";
|
|
16
16
|
import { hasDefaultDevice } from "../services/DeviceStoreHydration";
|
|
17
|
+
import micStateCoordinator from "../services/MicStateCoordinator";
|
|
17
18
|
import { projectPairingIdentity } from "../services/PairingIdentity";
|
|
18
19
|
import { isGlassesConnected, isGlassesReady } from "../services/GlassesReadiness";
|
|
19
20
|
import { pushAllBluetoothSettings } from "../services/GlassesSettingsSync";
|
|
@@ -22,6 +23,20 @@ import { recordSupportProfileConnectionFailure } from "../services/SupportProfil
|
|
|
22
23
|
import { getModelCapabilities } from "../types";
|
|
23
24
|
import { glassesWifi } from "./glassesWifi";
|
|
24
25
|
import { glassesSettings } from "./glassesSettings";
|
|
26
|
+
/** Floor for the mic level readout; digital silence would otherwise be -Infinity. */
|
|
27
|
+
const MIC_LEVEL_FLOOR_DBFS = -120;
|
|
28
|
+
/** RMS level of one s16le chunk in dBFS, on the volume gate's 32767 full scale. */
|
|
29
|
+
function pcmLevelDbfs(pcm) {
|
|
30
|
+
const samples = new Int16Array(pcm, 0, pcm.byteLength >> 1);
|
|
31
|
+
if (samples.length === 0)
|
|
32
|
+
return MIC_LEVEL_FLOOR_DBFS;
|
|
33
|
+
let sumSquares = 0;
|
|
34
|
+
for (let i = 0; i < samples.length; i++)
|
|
35
|
+
sumSquares += samples[i] * samples[i];
|
|
36
|
+
const rms = Math.sqrt(sumSquares / samples.length);
|
|
37
|
+
return Math.max(MIC_LEVEL_FLOOR_DBFS, 20 * Math.log10(rms / 32767));
|
|
38
|
+
}
|
|
39
|
+
let micLevelSubscriptions = 0;
|
|
25
40
|
function projectStatus() {
|
|
26
41
|
const s = useGlassesStore.getState();
|
|
27
42
|
return {
|
|
@@ -81,6 +96,7 @@ function projectInfo() {
|
|
|
81
96
|
sceneCanvasWidth: s.sceneCanvasWidth,
|
|
82
97
|
sceneCanvasHeight: s.sceneCanvasHeight,
|
|
83
98
|
volumeGate: s.volumeGate === true,
|
|
99
|
+
firmwareUpdateAvailable: s.firmwareUpdateAvailable === true,
|
|
84
100
|
// Copy: the snapshot must not hand callers a mutable reference into the store.
|
|
85
101
|
wifi: { ...s.wifi },
|
|
86
102
|
};
|
|
@@ -275,7 +291,7 @@ export const glasses = {
|
|
|
275
291
|
setPointer: (enabled) => BluetoothSdk.neuralBandSetPointer(enabled),
|
|
276
292
|
setHand: (hand) => BluetoothSdk.neuralBandSetHand(hand),
|
|
277
293
|
},
|
|
278
|
-
// --- audio (glasses media-volume
|
|
294
|
+
// --- audio (glasses media-volume, own-app playback hint, live mic level) ---
|
|
279
295
|
audio: {
|
|
280
296
|
/** Read the glasses' current media volume. */
|
|
281
297
|
getMediaVolume: () => BluetoothSdk.getGlassesMediaVolume(),
|
|
@@ -283,6 +299,23 @@ export const glasses = {
|
|
|
283
299
|
setMediaVolume: (level) => BluetoothSdk.setGlassesMediaVolume(level),
|
|
284
300
|
/** Tell native whether THIS app is currently playing audio (for ducking). */
|
|
285
301
|
setOwnAppPlaying: (playing) => BluetoothSdk.setOwnAppAudioPlaying(playing),
|
|
302
|
+
/**
|
|
303
|
+
* Stream the active mic's level in dBFS, one reading per PCM chunk. Holds
|
|
304
|
+
* raw PCM open while subscribed, so the mic runs with no miniapp listening
|
|
305
|
+
* (and the G2 volume gate stays open).
|
|
306
|
+
*/
|
|
307
|
+
onMicLevel: (cb) => {
|
|
308
|
+
const owner = `mic_level_${++micLevelSubscriptions}`;
|
|
309
|
+
micStateCoordinator.acquireHostPcm(owner);
|
|
310
|
+
const sub = BluetoothSdk.addListener("mic_pcm", (event) => {
|
|
311
|
+
if (event?.pcm)
|
|
312
|
+
cb(pcmLevelDbfs(event.pcm));
|
|
313
|
+
});
|
|
314
|
+
return () => {
|
|
315
|
+
sub.remove();
|
|
316
|
+
micStateCoordinator.releaseHostPcm(owner);
|
|
317
|
+
};
|
|
318
|
+
},
|
|
286
319
|
},
|
|
287
320
|
// --- sub-facades ---
|
|
288
321
|
wifi: glassesWifi,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"glasses.js","sourceRoot":"","sources":["../../src/facades/glasses.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,kFAAkF;AAClF,sFAAsF;AACtF,uEAAuE;AACvE,OAAO,YAAY,MAAM,iCAAiC,CAAA;AAS1D,OAAO,EAAC,eAAe,EAAC,MAAM,mBAAmB,CAAA;AACjD,OAAO,EAAC,gBAAgB,EAAE,QAAQ,EAAC,MAAM,oBAAoB,CAAA;AAC7D,OAAO,EAAC,gBAAgB,EAAC,MAAM,kCAAkC,CAAA;AACjE,OAAO,EAAC,sBAAsB,EAAC,MAAM,6BAA6B,CAAA;AAClE,OAAO,EAAC,kBAAkB,EAAE,cAAc,EAAC,MAAM,8BAA8B,CAAA;AAC/E,OAAO,EAAC,wBAAwB,EAAC,MAAM,iCAAiC,CAAA;AACxE,OAAO,eAGN,MAAM,wCAAwC,CAAA;AAC/C,OAAO,EAAC,qCAAqC,EAAC,MAAM,gCAAgC,CAAA;AACpF,OAAO,EAAC,oBAAoB,EAAmB,MAAM,UAAU,CAAA;AAC/D,OAAO,EAAC,WAAW,EAAC,MAAM,eAAe,CAAA;AACzC,OAAO,EAAC,eAAe,EAAC,MAAM,mBAAmB,CAAA;AAEjD,SAAS,aAAa;IACpB,MAAM,CAAC,GAAG,eAAe,CAAC,QAAQ,EAAE,CAAA;IACpC,OAAO;QACL,KAAK,EAAE,C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,EAAE,CAAC,YAAY,CAAC,wBAAwB,CAAC,OAAO,CAAC;QACnG,iBAAiB,EAAE,GAAgC,EAAE,CAAC,eAAe,CAAC,iBAAiB,EAAE;QACzF,mBAAmB,EAAE,CAAC,EAAiD,EAAgB,EAAE,CACvF,eAAe,CAAC,mBAAmB,CAAC,EAAE,CAAC;QACzC,6EAA6E;QAC7E,UAAU,EAAE,CAAC,OAAgB,EAAiB,EAAE,CAAC,YAAY,CAAC,oBAAoB,CAAC,OAAO,CAAC;QAC3F,OAAO,EAAE,CAAC,IAAsB,EAAiB,EAAE,CAAC,YAAY,CAAC,iBAAiB,CAAC,IAAI,CAAC;KACzF;IAED,+DAA+D;IAC/D,KAAK,EAAE;QACL,8CAA8C;QAC9C,cAAc,EAAE,GAAG,EAAE,CAAC,YAAY,CAAC,qBAAqB,EAAE;QAC1D,qCAAqC;QACrC,cAAc,EAAE,CAAC,KAAa,EAAE,EAAE,CAAC,YAAY,CAAC,qBAAqB,CAAC,KAAK,CAAC;QAC5E,6EAA6E;QAC7E,gBAAgB,EAAE,CAAC,OAAgB,EAAiB,EAAE,CAAC,YAAY,CAAC,qBAAqB,CAAC,OAAO,CAAC;KACnG;IAED,sBAAsB;IACtB,IAAI,EAAE,WAAW;IACjB,QAAQ,EAAE,eAAe;CAC1B,CAAA","sourcesContent":["/**\n * glasses facade — the core `engine.glasses.*` surface: connection actions (over\n * the bluetooth-sdk passthrough), a curated status/info read-model (projected from\n * the engine-owned glasses store), capabilities (from the model table), and the\n * discrete input events. The `wifi` sub-facade is nested here.\n *\n * Read-models project the raw glasses store into the stable shape OEM UIs consume,\n * so the device store's field layout doesn't leak into every screen.\n */\n// Internal btsdk surface — connectSimulated/reconnect/controller live on the full\n// surface, not the public entry. Relative path (the alias doesn't resolve in engine's\n// standalone build); jest moduleNameMapper + tsconfig both resolve it.\nimport BluetoothSdk from \"@glassly/bluetooth-sdk/internal\"\nimport type {\n ButtonPressEvent,\n ConnectOptions,\n Device,\n KeyboardAdvertEvent,\n KeyboardPairingEvent,\n TouchEvent,\n} from \"@glassly/bluetooth-sdk\"\nimport {useGlassesStore} from \"../stores/glasses\"\nimport {useSettingsStore, SETTINGS} from \"../stores/settings\"\nimport {hasDefaultDevice} from \"../services/DeviceStoreHydration\"\nimport {projectPairingIdentity} from \"../services/PairingIdentity\"\nimport {isGlassesConnected, isGlassesReady} from \"../services/GlassesReadiness\"\nimport {pushAllBluetoothSettings} from \"../services/GlassesSettingsSync\"\nimport neuralBandInput, {\n type NeuralBandClaimStatus,\n type NeuralBandHandwritingStatus,\n} from \"../services/neuralBand/NeuralBandInput\"\nimport {recordSupportProfileConnectionFailure} from \"../services/SupportProfileSync\"\nimport {getModelCapabilities, type DeviceTypes} from \"../types\"\nimport {glassesWifi} from \"./glassesWifi\"\nimport {glassesSettings} from \"./glassesSettings\"\n\nfunction projectStatus() {\n const s = useGlassesStore.getState()\n return {\n state: s.connection.state,\n fullyBooted: isGlassesReady(s.connection),\n battery: s.batteryLevel,\n charging: s.charging,\n case: {battery: s.caseBatteryLevel, charging: s.caseCharging, open: s.caseOpen, removed: s.caseRemoved},\n signal: s.signalStrength,\n micEnabled: s.micEnabled,\n vadEnabled: s.voiceActivityDetectionEnabled,\n btClassic: s.bluetoothClassicConnected,\n // iOS: glasses may read the phone's ANCS stream (\"Share System Notifications\").\n ancsAuthorized: Boolean(s.ancsAuthorized),\n }\n}\n\nfunction projectControllerStatus() {\n const s = useGlassesStore.getState()\n return {\n connected: s.controllerConnected,\n fullyBooted: s.controllerFullyBooted,\n battery: s.controllerBatteryLevel,\n signal: s.controllerSignalStrength,\n }\n}\n\nfunction projectKeyboardStatus() {\n const s = useGlassesStore.getState()\n return {\n /** Connected glasses run a firmware that can host a keyboard (G2 Glassly CFW 39+). */\n available: s.keyboardBridge === true,\n connected: s.keyboardConnected === true,\n name: s.keyboardName ?? \"\",\n /** A keyboard is remembered and reconnects automatically. */\n saved: s.keyboardSaved === true,\n state: s.keyboardState ?? \"idle\",\n error: s.keyboardError ?? \"\",\n }\n}\n\nfunction projectInfo() {\n const s = useGlassesStore.getState()\n return {\n model: s.deviceModel,\n style: s.style,\n color: s.color,\n bluetoothName: s.bluetoothName,\n firmwareVersion: s.firmwareVersion,\n mtkFirmware: s.mtkFirmwareVersion,\n besFirmware: s.besFirmwareVersion,\n appVersion: s.appVersion,\n androidVersion: s.androidVersion,\n serialNumber: s.serialNumber,\n buildNumber: s.buildNumber,\n btMac: s.bluetoothMacAddress,\n wifiMac: s.wifiMacAddress,\n leftMac: s.leftMacAddress,\n rightMac: s.rightMacAddress,\n sceneCanvasWidth: s.sceneCanvasWidth,\n sceneCanvasHeight: s.sceneCanvasHeight,\n volumeGate: s.volumeGate === true,\n // Copy: the snapshot must not hand callers a mutable reference into the store.\n wifi: {...s.wifi},\n }\n}\n\nexport type GlassesStatusSnapshot = ReturnType<typeof projectStatus>\nexport type ControllerStatusSnapshot = ReturnType<typeof projectControllerStatus>\nexport type KeyboardStatusSnapshot = ReturnType<typeof projectKeyboardStatus>\nexport type GlassesInfoSnapshot = ReturnType<typeof projectInfo>\n\nexport const glasses = {\n // --- connection (bluetooth-sdk passthrough) ---\n /**\n * Reconnect the default wearable. Seeds the phone's current device settings to\n * native first, so they're primed before the connect handshake replays them to\n * the glasses (this used to be a host-side step before `connectDefault`).\n */\n connectDefault: async (): Promise<void> => {\n try {\n await pushAllBluetoothSettings()\n await BluetoothSdk.connectDefault()\n } catch (error) {\n recordSupportProfileConnectionFailure(error, \"connect_default\")\n throw error\n }\n },\n disconnect: (): Promise<void> => BluetoothSdk.disconnect(),\n forget: (): Promise<void> => BluetoothSdk.forget(),\n /** Connect to a specific (discovered) device. */\n connect: async (device: Device, options?: ConnectOptions): Promise<void> => {\n try {\n await pushAllBluetoothSettings()\n await BluetoothSdk.connect(device, options)\n } catch (error) {\n recordSupportProfileConnectionFailure(error, \"connect\")\n throw error\n }\n },\n /** Connect the built-in simulated glasses (dev/testing). */\n connectSimulated: (): Promise<void> => BluetoothSdk.connectSimulated(),\n /** Set a device as the `connectDefault()` target. */\n setDefault: (device: Device | null): Promise<void> => BluetoothSdk.setDefaultDevice(device),\n /**\n * Reconnect to the saved default glasses. Resolves `false` when there's nothing to\n * reconnect to (no default paired) or the connect attempt fails (e.g. BLE powered\n * off), `true` when already connected or after kicking off the connect. Never\n * rejects — the boolean contract holds. The host gates connectivity/permissions\n * (its UI) before calling.\n */\n reconnect: async (): Promise<boolean> => {\n const defaultWearable = useSettingsStore.getState().getSetting(SETTINGS.default_wearable.key)\n if (!defaultWearable) return false\n if (isGlassesConnected(useGlassesStore.getState().connection)) return true\n try {\n await pushAllBluetoothSettings()\n await BluetoothSdk.connectDefault()\n } catch (error) {\n recordSupportProfileConnectionFailure(error, \"reconnect\")\n console.warn(\"engine.glasses.reconnect failed:\", error)\n return false\n }\n return true\n },\n /** True when no glasses has ever been paired NOR selected (the pairing-identity\n * lifecycle is in its `none` state) — e.g. to route a first-run host into the\n * pairing/onboarding flow. A pending selection is not \"first\" — the host should\n * offer finish-pairing (see `engine.pairing.identity()`). */\n isFirstPairing: (): boolean => projectPairingIdentity().kind === \"none\",\n /**\n * True when the SDK has an actual default DEVICE to reconnect to. Distinct from\n * `default_wearable` (a model string that a pending or orphaned selection can\n * hold without any paired device): connectDefault() throws without a device, so\n * hosts should route to the pairing flow when this is false.\n *\n * Hydration-aware: awaits the device-store seed internally, so a cold-start\n * read can't see a false \"absent\" for genuinely-paired users. Rejects if\n * hydration failed — callers guarding destructive or routing decisions must\n * fail open (treat as \"has a device\").\n */\n hasDefaultDevice: (): Promise<boolean> => hasDefaultDevice(),\n\n // --- read-model (projected from the engine-owned glasses store) ---\n status: (): GlassesStatusSnapshot => projectStatus(),\n onStatus: (cb: (status: GlassesStatusSnapshot) => void): (() => void) => {\n // Dedupe: the glasses store updates on many fields; only fire when the\n // projected status snapshot actually changes.\n let last = JSON.stringify(projectStatus())\n return useGlassesStore.subscribe(() => {\n const snap = projectStatus()\n const key = JSON.stringify(snap)\n if (key === last) return\n last = key\n cb(snap)\n })\n },\n info: (): GlassesInfoSnapshot => projectInfo(),\n onInfo: (cb: (info: GlassesInfoSnapshot) => void): (() => void) => {\n let last = JSON.stringify(projectInfo())\n return useGlassesStore.subscribe(() => {\n const snap = projectInfo()\n const key = JSON.stringify(snap)\n if (key === last) return\n last = key\n cb(snap)\n })\n },\n capabilities: () => getModelCapabilities(useGlassesStore.getState().deviceModel as DeviceTypes),\n /** Ask the glasses to report fresh firmware/version info (updates the store). */\n requestVersionInfo: () => BluetoothSdk.requestVersionInfo(),\n\n // --- discrete input events (passthrough listeners) ---\n onButtonPress: (cb: (event: ButtonPressEvent) => void): (() => void) => {\n const sub = BluetoothSdk.addListener(\"button_press\", cb)\n return () => sub.remove()\n },\n onTouchGesture: (cb: (event: TouchEvent) => void): (() => void) => {\n const sub = BluetoothSdk.addListener(\"touch_event\", cb)\n return () => sub.remove()\n },\n\n // --- BLE keyboard bridged through G2 Glassly CFW (revision 39+) ---\n keyboard: {\n /** Five-second scan; distinct advertisers, HID ones flagged. Also streams via onAdvert. */\n scan: (): Promise<KeyboardAdvertEvent[]> => BluetoothSdk.g2KeyboardScan(),\n /** Connect, pair and subscribe; the keyboard is remembered and auto-reconnected. */\n connect: async (device: {address: string; addressType: number; name: string}): Promise<void> => {\n await BluetoothSdk.g2KeyboardConnect(device.address, device.addressType, device.name)\n useSettingsStore.getState().setSetting(SETTINGS.keyboard_name.key, device.name)\n },\n reconnect: (): Promise<void> => BluetoothSdk.g2KeyboardReconnect(),\n disconnect: (): Promise<void> => BluetoothSdk.g2KeyboardDisconnect(),\n forget: async (): Promise<void> => {\n await BluetoothSdk.g2KeyboardForget()\n useSettingsStore.getState().setSetting(SETTINGS.keyboard_name.key, \"\")\n },\n passkey: (pin: number): Promise<void> => BluetoothSdk.g2KeyboardPasskey(pin),\n compare: (accept: boolean): Promise<void> => BluetoothSdk.g2KeyboardCompare(accept),\n status: (): KeyboardStatusSnapshot => projectKeyboardStatus(),\n onStatus: (cb: (status: KeyboardStatusSnapshot) => void): (() => void) => {\n let last = JSON.stringify(projectKeyboardStatus())\n return useGlassesStore.subscribe(() => {\n const snap = projectKeyboardStatus()\n const key = JSON.stringify(snap)\n if (key === last) return\n last = key\n cb(snap)\n })\n },\n onAdvert: (cb: (advert: KeyboardAdvertEvent) => void): (() => void) => {\n const sub = BluetoothSdk.addListener(\"keyboard_advert\", cb)\n return () => sub.remove()\n },\n onPairing: (cb: (prompt: KeyboardPairingEvent) => void): (() => void) => {\n const sub = BluetoothSdk.addListener(\"keyboard_pairing\", cb)\n return () => sub.remove()\n },\n },\n\n // --- ring controller (optional input device) ---\n controller: {\n connectDefault: (): Promise<void> => BluetoothSdk.connectDefaultController(),\n disconnect: (): Promise<void> => BluetoothSdk.disconnectController(),\n forget: (): Promise<void> => BluetoothSdk.forgetController(),\n status: (): ControllerStatusSnapshot => projectControllerStatus(),\n onStatus: (cb: (status: ControllerStatusSnapshot) => void): (() => void) => {\n let last = JSON.stringify(projectControllerStatus())\n return useGlassesStore.subscribe(() => {\n const snap = projectControllerStatus()\n const key = JSON.stringify(snap)\n if (key === last) return\n last = key\n cb(snap)\n })\n },\n },\n\n // --- Meta Neural Band (a controller with a claim step and its own features) ---\n neuralBand: {\n /** Store the Meta account session the one-time band claim uses. */\n setMetaSession: (accessToken: string, userId: string): Promise<void> =>\n BluetoothSdk.neuralBandSetMetaSession(accessToken, userId),\n clearMetaSession: (): Promise<void> => BluetoothSdk.neuralBandClearMetaSession(),\n hasMetaSession: (): Promise<boolean> => BluetoothSdk.neuralBandHasMetaSession(),\n /** A band identity is stored on this phone, so the remembered band connects without a claim. */\n isClaimed: (): Promise<boolean> => BluetoothSdk.neuralBandIsClaimed(),\n /** The latest claim progress, kept across screens. */\n claimStatus: (): NeuralBandClaimStatus => neuralBandInput.claimStatus(),\n resetClaim: (): void => neuralBandInput.resetClaim(),\n onClaimStatus: (cb: (status: NeuralBandClaimStatus) => void): (() => void) => neuralBandInput.onClaimStatus(cb),\n /** The band's handwriting model; writing arrives on the miniapp keyboard stream. */\n setHandwriting: (enabled: boolean): Promise<void> => BluetoothSdk.neuralBandSetHandwriting(enabled),\n handwritingStatus: (): NeuralBandHandwritingStatus => neuralBandInput.handwritingStatus(),\n onHandwritingStatus: (cb: (status: NeuralBandHandwritingStatus) => void): (() => void) =>\n neuralBandInput.onHandwritingStatus(cb),\n /** The band's air mouse; movement reaches miniapps on the pointer stream. */\n setPointer: (enabled: boolean): Promise<void> => BluetoothSdk.neuralBandSetPointer(enabled),\n setHand: (hand: \"left\" | \"right\"): Promise<void> => BluetoothSdk.neuralBandSetHand(hand),\n },\n\n // --- audio (glasses media-volume + own-app playback hint) ---\n audio: {\n /** Read the glasses' current media volume. */\n getMediaVolume: () => BluetoothSdk.getGlassesMediaVolume(),\n /** Set the glasses' media volume. */\n setMediaVolume: (level: number) => BluetoothSdk.setGlassesMediaVolume(level),\n /** Tell native whether THIS app is currently playing audio (for ducking). */\n setOwnAppPlaying: (playing: boolean): Promise<void> => BluetoothSdk.setOwnAppAudioPlaying(playing),\n },\n\n // --- sub-facades ---\n wifi: glassesWifi,\n settings: glassesSettings,\n}\n"]}
|
|
1
|
+
{"version":3,"file":"glasses.js","sourceRoot":"","sources":["../../src/facades/glasses.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,kFAAkF;AAClF,sFAAsF;AACtF,uEAAuE;AACvE,OAAO,YAAY,MAAM,iCAAiC,CAAA;AAS1D,OAAO,EAAC,eAAe,EAAC,MAAM,mBAAmB,CAAA;AACjD,OAAO,EAAC,gBAAgB,EAAE,QAAQ,EAAC,MAAM,oBAAoB,CAAA;AAC7D,OAAO,EAAC,gBAAgB,EAAC,MAAM,kCAAkC,CAAA;AACjE,OAAO,mBAAmB,MAAM,iCAAiC,CAAA;AACjE,OAAO,EAAC,sBAAsB,EAAC,MAAM,6BAA6B,CAAA;AAClE,OAAO,EAAC,kBAAkB,EAAE,cAAc,EAAC,MAAM,8BAA8B,CAAA;AA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,sBAAsB;IACtB,IAAI,EAAE,WAAW;IACjB,QAAQ,EAAE,eAAe;CAC1B,CAAA","sourcesContent":["/**\n * glasses facade — the core `engine.glasses.*` surface: connection actions (over\n * the bluetooth-sdk passthrough), a curated status/info read-model (projected from\n * the engine-owned glasses store), capabilities (from the model table), and the\n * discrete input events. The `wifi` sub-facade is nested here.\n *\n * Read-models project the raw glasses store into the stable shape OEM UIs consume,\n * so the device store's field layout doesn't leak into every screen.\n */\n// Internal btsdk surface — connectSimulated/reconnect/controller live on the full\n// surface, not the public entry. Relative path (the alias doesn't resolve in engine's\n// standalone build); jest moduleNameMapper + tsconfig both resolve it.\nimport BluetoothSdk from \"@glassly/bluetooth-sdk/internal\"\nimport type {\n ButtonPressEvent,\n ConnectOptions,\n Device,\n KeyboardAdvertEvent,\n KeyboardPairingEvent,\n TouchEvent,\n} from \"@glassly/bluetooth-sdk\"\nimport {useGlassesStore} from \"../stores/glasses\"\nimport {useSettingsStore, SETTINGS} from \"../stores/settings\"\nimport {hasDefaultDevice} from \"../services/DeviceStoreHydration\"\nimport micStateCoordinator from \"../services/MicStateCoordinator\"\nimport {projectPairingIdentity} from \"../services/PairingIdentity\"\nimport {isGlassesConnected, isGlassesReady} from \"../services/GlassesReadiness\"\nimport {pushAllBluetoothSettings} from \"../services/GlassesSettingsSync\"\nimport neuralBandInput, {\n type NeuralBandClaimStatus,\n type NeuralBandHandwritingStatus,\n} from \"../services/neuralBand/NeuralBandInput\"\nimport {recordSupportProfileConnectionFailure} from \"../services/SupportProfileSync\"\nimport {getModelCapabilities, type DeviceTypes} from \"../types\"\nimport {glassesWifi} from \"./glassesWifi\"\nimport {glassesSettings} from \"./glassesSettings\"\n\n/** Floor for the mic level readout; digital silence would otherwise be -Infinity. */\nconst MIC_LEVEL_FLOOR_DBFS = -120\n\n/** RMS level of one s16le chunk in dBFS, on the volume gate's 32767 full scale. */\nfunction pcmLevelDbfs(pcm: ArrayBuffer): number {\n const samples = new Int16Array(pcm, 0, pcm.byteLength >> 1)\n if (samples.length === 0) return MIC_LEVEL_FLOOR_DBFS\n let sumSquares = 0\n for (let i = 0; i < samples.length; i++) sumSquares += samples[i] * samples[i]\n const rms = Math.sqrt(sumSquares / samples.length)\n return Math.max(MIC_LEVEL_FLOOR_DBFS, 20 * Math.log10(rms / 32767))\n}\n\nlet micLevelSubscriptions = 0\n\nfunction projectStatus() {\n const s = useGlassesStore.getState()\n return {\n state: s.connection.state,\n fullyBooted: isGlassesReady(s.connection),\n battery: s.batteryLevel,\n charging: s.charging,\n case: {battery: s.caseBatteryLevel, charging: s.caseCharging, open: s.caseOpen, removed: s.caseRemoved},\n signal: s.signalStrength,\n micEnabled: s.micEnabled,\n vadEnabled: s.voiceActivityDetectionEnabled,\n btClassic: s.bluetoothClassicConnected,\n // iOS: glasses may read the phone's ANCS stream (\"Share System Notifications\").\n ancsAuthorized: Boolean(s.ancsAuthorized),\n }\n}\n\nfunction projectControllerStatus() {\n const s = useGlassesStore.getState()\n return {\n connected: s.controllerConnected,\n fullyBooted: s.controllerFullyBooted,\n battery: s.controllerBatteryLevel,\n signal: s.controllerSignalStrength,\n }\n}\n\nfunction projectKeyboardStatus() {\n const s = useGlassesStore.getState()\n return {\n /** Connected glasses run a firmware that can host a keyboard (G2 Glassly CFW 39+). */\n available: s.keyboardBridge === true,\n connected: s.keyboardConnected === true,\n name: s.keyboardName ?? \"\",\n /** A keyboard is remembered and reconnects automatically. */\n saved: s.keyboardSaved === true,\n state: s.keyboardState ?? \"idle\",\n error: s.keyboardError ?? \"\",\n }\n}\n\nfunction projectInfo() {\n const s = useGlassesStore.getState()\n return {\n model: s.deviceModel,\n style: s.style,\n color: s.color,\n bluetoothName: s.bluetoothName,\n firmwareVersion: s.firmwareVersion,\n mtkFirmware: s.mtkFirmwareVersion,\n besFirmware: s.besFirmwareVersion,\n appVersion: s.appVersion,\n androidVersion: s.androidVersion,\n serialNumber: s.serialNumber,\n buildNumber: s.buildNumber,\n btMac: s.bluetoothMacAddress,\n wifiMac: s.wifiMacAddress,\n leftMac: s.leftMacAddress,\n rightMac: s.rightMacAddress,\n sceneCanvasWidth: s.sceneCanvasWidth,\n sceneCanvasHeight: s.sceneCanvasHeight,\n volumeGate: s.volumeGate === true,\n firmwareUpdateAvailable: s.firmwareUpdateAvailable === true,\n // Copy: the snapshot must not hand callers a mutable reference into the store.\n wifi: {...s.wifi},\n }\n}\n\nexport type GlassesStatusSnapshot = ReturnType<typeof projectStatus>\nexport type ControllerStatusSnapshot = ReturnType<typeof projectControllerStatus>\nexport type KeyboardStatusSnapshot = ReturnType<typeof projectKeyboardStatus>\nexport type GlassesInfoSnapshot = ReturnType<typeof projectInfo>\n\nexport const glasses = {\n // --- connection (bluetooth-sdk passthrough) ---\n /**\n * Reconnect the default wearable. Seeds the phone's current device settings to\n * native first, so they're primed before the connect handshake replays them to\n * the glasses (this used to be a host-side step before `connectDefault`).\n */\n connectDefault: async (): Promise<void> => {\n try {\n await pushAllBluetoothSettings()\n await BluetoothSdk.connectDefault()\n } catch (error) {\n recordSupportProfileConnectionFailure(error, \"connect_default\")\n throw error\n }\n },\n disconnect: (): Promise<void> => BluetoothSdk.disconnect(),\n forget: (): Promise<void> => BluetoothSdk.forget(),\n /** Connect to a specific (discovered) device. */\n connect: async (device: Device, options?: ConnectOptions): Promise<void> => {\n try {\n await pushAllBluetoothSettings()\n await BluetoothSdk.connect(device, options)\n } catch (error) {\n recordSupportProfileConnectionFailure(error, \"connect\")\n throw error\n }\n },\n /** Connect the built-in simulated glasses (dev/testing). */\n connectSimulated: (): Promise<void> => BluetoothSdk.connectSimulated(),\n /** Set a device as the `connectDefault()` target. */\n setDefault: (device: Device | null): Promise<void> => BluetoothSdk.setDefaultDevice(device),\n /**\n * Reconnect to the saved default glasses. Resolves `false` when there's nothing to\n * reconnect to (no default paired) or the connect attempt fails (e.g. BLE powered\n * off), `true` when already connected or after kicking off the connect. Never\n * rejects — the boolean contract holds. The host gates connectivity/permissions\n * (its UI) before calling.\n */\n reconnect: async (): Promise<boolean> => {\n const defaultWearable = useSettingsStore.getState().getSetting(SETTINGS.default_wearable.key)\n if (!defaultWearable) return false\n if (isGlassesConnected(useGlassesStore.getState().connection)) return true\n try {\n await pushAllBluetoothSettings()\n await BluetoothSdk.connectDefault()\n } catch (error) {\n recordSupportProfileConnectionFailure(error, \"reconnect\")\n console.warn(\"engine.glasses.reconnect failed:\", error)\n return false\n }\n return true\n },\n /** True when no glasses has ever been paired NOR selected (the pairing-identity\n * lifecycle is in its `none` state) — e.g. to route a first-run host into the\n * pairing/onboarding flow. A pending selection is not \"first\" — the host should\n * offer finish-pairing (see `engine.pairing.identity()`). */\n isFirstPairing: (): boolean => projectPairingIdentity().kind === \"none\",\n /**\n * True when the SDK has an actual default DEVICE to reconnect to. Distinct from\n * `default_wearable` (a model string that a pending or orphaned selection can\n * hold without any paired device): connectDefault() throws without a device, so\n * hosts should route to the pairing flow when this is false.\n *\n * Hydration-aware: awaits the device-store seed internally, so a cold-start\n * read can't see a false \"absent\" for genuinely-paired users. Rejects if\n * hydration failed — callers guarding destructive or routing decisions must\n * fail open (treat as \"has a device\").\n */\n hasDefaultDevice: (): Promise<boolean> => hasDefaultDevice(),\n\n // --- read-model (projected from the engine-owned glasses store) ---\n status: (): GlassesStatusSnapshot => projectStatus(),\n onStatus: (cb: (status: GlassesStatusSnapshot) => void): (() => void) => {\n // Dedupe: the glasses store updates on many fields; only fire when the\n // projected status snapshot actually changes.\n let last = JSON.stringify(projectStatus())\n return useGlassesStore.subscribe(() => {\n const snap = projectStatus()\n const key = JSON.stringify(snap)\n if (key === last) return\n last = key\n cb(snap)\n })\n },\n info: (): GlassesInfoSnapshot => projectInfo(),\n onInfo: (cb: (info: GlassesInfoSnapshot) => void): (() => void) => {\n let last = JSON.stringify(projectInfo())\n return useGlassesStore.subscribe(() => {\n const snap = projectInfo()\n const key = JSON.stringify(snap)\n if (key === last) return\n last = key\n cb(snap)\n })\n },\n capabilities: () => getModelCapabilities(useGlassesStore.getState().deviceModel as DeviceTypes),\n /** Ask the glasses to report fresh firmware/version info (updates the store). */\n requestVersionInfo: () => BluetoothSdk.requestVersionInfo(),\n\n // --- discrete input events (passthrough listeners) ---\n onButtonPress: (cb: (event: ButtonPressEvent) => void): (() => void) => {\n const sub = BluetoothSdk.addListener(\"button_press\", cb)\n return () => sub.remove()\n },\n onTouchGesture: (cb: (event: TouchEvent) => void): (() => void) => {\n const sub = BluetoothSdk.addListener(\"touch_event\", cb)\n return () => sub.remove()\n },\n\n // --- BLE keyboard bridged through G2 Glassly CFW (revision 39+) ---\n keyboard: {\n /** Five-second scan; distinct advertisers, HID ones flagged. Also streams via onAdvert. */\n scan: (): Promise<KeyboardAdvertEvent[]> => BluetoothSdk.g2KeyboardScan(),\n /** Connect, pair and subscribe; the keyboard is remembered and auto-reconnected. */\n connect: async (device: {address: string; addressType: number; name: string}): Promise<void> => {\n await BluetoothSdk.g2KeyboardConnect(device.address, device.addressType, device.name)\n useSettingsStore.getState().setSetting(SETTINGS.keyboard_name.key, device.name)\n },\n reconnect: (): Promise<void> => BluetoothSdk.g2KeyboardReconnect(),\n disconnect: (): Promise<void> => BluetoothSdk.g2KeyboardDisconnect(),\n forget: async (): Promise<void> => {\n await BluetoothSdk.g2KeyboardForget()\n useSettingsStore.getState().setSetting(SETTINGS.keyboard_name.key, \"\")\n },\n passkey: (pin: number): Promise<void> => BluetoothSdk.g2KeyboardPasskey(pin),\n compare: (accept: boolean): Promise<void> => BluetoothSdk.g2KeyboardCompare(accept),\n status: (): KeyboardStatusSnapshot => projectKeyboardStatus(),\n onStatus: (cb: (status: KeyboardStatusSnapshot) => void): (() => void) => {\n let last = JSON.stringify(projectKeyboardStatus())\n return useGlassesStore.subscribe(() => {\n const snap = projectKeyboardStatus()\n const key = JSON.stringify(snap)\n if (key === last) return\n last = key\n cb(snap)\n })\n },\n onAdvert: (cb: (advert: KeyboardAdvertEvent) => void): (() => void) => {\n const sub = BluetoothSdk.addListener(\"keyboard_advert\", cb)\n return () => sub.remove()\n },\n onPairing: (cb: (prompt: KeyboardPairingEvent) => void): (() => void) => {\n const sub = BluetoothSdk.addListener(\"keyboard_pairing\", cb)\n return () => sub.remove()\n },\n },\n\n // --- ring controller (optional input device) ---\n controller: {\n connectDefault: (): Promise<void> => BluetoothSdk.connectDefaultController(),\n disconnect: (): Promise<void> => BluetoothSdk.disconnectController(),\n forget: (): Promise<void> => BluetoothSdk.forgetController(),\n status: (): ControllerStatusSnapshot => projectControllerStatus(),\n onStatus: (cb: (status: ControllerStatusSnapshot) => void): (() => void) => {\n let last = JSON.stringify(projectControllerStatus())\n return useGlassesStore.subscribe(() => {\n const snap = projectControllerStatus()\n const key = JSON.stringify(snap)\n if (key === last) return\n last = key\n cb(snap)\n })\n },\n },\n\n // --- Meta Neural Band (a controller with a claim step and its own features) ---\n neuralBand: {\n /** Store the Meta account session the one-time band claim uses. */\n setMetaSession: (accessToken: string, userId: string): Promise<void> =>\n BluetoothSdk.neuralBandSetMetaSession(accessToken, userId),\n clearMetaSession: (): Promise<void> => BluetoothSdk.neuralBandClearMetaSession(),\n hasMetaSession: (): Promise<boolean> => BluetoothSdk.neuralBandHasMetaSession(),\n /** A band identity is stored on this phone, so the remembered band connects without a claim. */\n isClaimed: (): Promise<boolean> => BluetoothSdk.neuralBandIsClaimed(),\n /** The latest claim progress, kept across screens. */\n claimStatus: (): NeuralBandClaimStatus => neuralBandInput.claimStatus(),\n resetClaim: (): void => neuralBandInput.resetClaim(),\n onClaimStatus: (cb: (status: NeuralBandClaimStatus) => void): (() => void) => neuralBandInput.onClaimStatus(cb),\n /** The band's handwriting model; writing arrives on the miniapp keyboard stream. */\n setHandwriting: (enabled: boolean): Promise<void> => BluetoothSdk.neuralBandSetHandwriting(enabled),\n handwritingStatus: (): NeuralBandHandwritingStatus => neuralBandInput.handwritingStatus(),\n onHandwritingStatus: (cb: (status: NeuralBandHandwritingStatus) => void): (() => void) =>\n neuralBandInput.onHandwritingStatus(cb),\n /** The band's air mouse; movement reaches miniapps on the pointer stream. */\n setPointer: (enabled: boolean): Promise<void> => BluetoothSdk.neuralBandSetPointer(enabled),\n setHand: (hand: \"left\" | \"right\"): Promise<void> => BluetoothSdk.neuralBandSetHand(hand),\n },\n\n // --- audio (glasses media-volume, own-app playback hint, live mic level) ---\n audio: {\n /** Read the glasses' current media volume. */\n getMediaVolume: () => BluetoothSdk.getGlassesMediaVolume(),\n /** Set the glasses' media volume. */\n setMediaVolume: (level: number) => BluetoothSdk.setGlassesMediaVolume(level),\n /** Tell native whether THIS app is currently playing audio (for ducking). */\n setOwnAppPlaying: (playing: boolean): Promise<void> => BluetoothSdk.setOwnAppAudioPlaying(playing),\n /**\n * Stream the active mic's level in dBFS, one reading per PCM chunk. Holds\n * raw PCM open while subscribed, so the mic runs with no miniapp listening\n * (and the G2 volume gate stays open).\n */\n onMicLevel: (cb: (dbfs: number) => void): (() => void) => {\n const owner = `mic_level_${++micLevelSubscriptions}`\n micStateCoordinator.acquireHostPcm(owner)\n const sub = BluetoothSdk.addListener(\"mic_pcm\", (event: {pcm: ArrayBuffer}) => {\n if (event?.pcm) cb(pcmLevelDbfs(event.pcm))\n })\n return () => {\n sub.remove()\n micStateCoordinator.releaseHostPcm(owner)\n }\n },\n },\n\n // --- sub-facades ---\n wifi: glassesWifi,\n settings: glassesSettings,\n}\n"]}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
export const ENGINE_RELEASE_METADATA = Object.freeze({
|
|
2
2
|
"schemaVersion": 1,
|
|
3
3
|
"familyBaseVersion": "0.3.3",
|
|
4
|
-
"releaseIdentity": "0.3.3-beta.
|
|
5
|
-
"releaseSetId": "glassly-0.3.3-beta.
|
|
6
|
-
"sourceCommit": "
|
|
4
|
+
"releaseIdentity": "0.3.3-beta.654",
|
|
5
|
+
"releaseSetId": "glassly-0.3.3-beta.654",
|
|
6
|
+
"sourceCommit": "9c554ec6e0d33cd235914ccee98e7d39e4fa29e2",
|
|
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,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.3\",\n \"releaseIdentity\": \"0.3.3-beta.
|
|
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.3\",\n \"releaseIdentity\": \"0.3.3-beta.654\",\n \"releaseSetId\": \"glassly-0.3.3-beta.654\",\n \"sourceCommit\": \"9c554ec6e0d33cd235914ccee98e7d39e4fa29e2\",\n \"otaManifestUrl\": null,\n \"otaManifestSha256\": null\n})\n"]}
|
package/build/index.d.ts
CHANGED
|
@@ -48,7 +48,7 @@ export { WebSocketStatus } from "./stores/connection";
|
|
|
48
48
|
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";
|
|
49
49
|
export { decideDevLaunchRoute, type DecideDevLaunchOptions, type DevLaunchResult, type DevManifest, } from "./utils/devMiniappLaunch";
|
|
50
50
|
export { HardwareCompatibility, type CompatibilityResult } from "./utils/hardware";
|
|
51
|
-
export { BgTimer
|
|
51
|
+
export { BgTimer } from "./utils/timers";
|
|
52
52
|
export { MetaAuthError, authEntryUrl, callbackMatches, callbackQuery, decryptBlob, isLoginCallback, login, tokensQuery, type MetaSession, type MetaSsoTokens, } from "./services/neuralBand/MetaAuth";
|
|
53
53
|
export type { NeuralBandClaimStatus, NeuralBandHandwritingStatus } from "./services/neuralBand/NeuralBandInput";
|
|
54
54
|
export { HardwareType, HardwareRequirementLevel, DeviceTypes, ControllerTypes, HARDWARE_CAPABILITIES, getModelCapabilities, simulatedGlasses, evenRealitiesG1, evenRealitiesG2, mentraLive, nimo, rayneoIO, vuzixZ100, mentraDisplay, } from "./types";
|
package/build/index.d.ts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AAW,EACX,KAAK,WAAW,EAChB,KAAK,aAAa,GACnB,MAAM,gCAAgC,CAAA;AACvC,YAAY,EAAC,qBAAqB,EAAE,2BAA2B,EAAC,MAAM,uCAAuC,CAAA;AAG7G,OAAO,EACL,YAAY,EACZ,wBAAwB,EACxB,WAAW,EACX,eAAe,EACf,qBAAqB,EACrB,oBAAoB,EACpB,gBAAgB,EAChB,eAAe,EACf,eAAe,EACf,UAAU,EACV,IAAI,EACJ,QAAQ,EACR,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
|
@@ -47,7 +47,7 @@ export { DUMMY_APPLET, saveAppsOrder, getAppsOrder, sortAppsByPackageNamePriorit
|
|
|
47
47
|
// Pure dev-miniapp launch-route decision (registration itself is internal).
|
|
48
48
|
export { decideDevLaunchRoute, } from "./utils/devMiniappLaunch";
|
|
49
49
|
export { HardwareCompatibility } from "./utils/hardware";
|
|
50
|
-
export { BgTimer
|
|
50
|
+
export { BgTimer } from "./utils/timers";
|
|
51
51
|
// Meta Neural Band: the account sign-in a claim needs (the WebView lives in the host).
|
|
52
52
|
export { MetaAuthError, authEntryUrl, callbackMatches, callbackQuery, decryptBlob, isLoginCallback, login, tokensQuery, } from "./services/neuralBand/MetaAuth";
|
|
53
53
|
// Hardware types and capability profiles.
|
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;AAC3E,OAAO,EAAC,MAAM,EAAC,MAAM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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/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\"\nexport {getEffectiveCapabilities} from \"./services/effectiveCapabilities\"\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// Meta Neural Band: the account sign-in a claim needs (the WebView lives in the host).\nexport {\n MetaAuthError,\n authEntryUrl,\n callbackMatches,\n callbackQuery,\n decryptBlob,\n isLoginCallback,\n login,\n tokensQuery,\n type MetaSession,\n type MetaSsoTokens,\n} from \"./services/neuralBand/MetaAuth\"\nexport type {NeuralBandClaimStatus, NeuralBandHandwritingStatus} from \"./services/neuralBand/NeuralBandInput\"\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 rayneoIO,\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;AAC3E,6EAA6E;AAC7E,yEAAyE;AACzE,qEAAqE;AACrE,kDAAkD;AAClD,OAAO,EAAC,QAAQ,EAAE,UAAU,EAAE,uBAAuB,EAAC,MAAM,mBAAmB,CAAA;AAC/E,OAAO,EAAC,oBAAoB,EAAE,yBAAyB,EAAC,MAAM,kCAAkC,CAAA;AAChG,OAAO,EAAC,wBAAwB,EAAC,MAAM,kCAAkC,CAAA;AAEzE,4EAA4E;AAC5E,yEAAyE;AACzE,6EAA6E;AAC7E,OAAO,EAAC,QAAQ,EAAE,kBAAkB,EAAE,gBAAgB,EAAC,MAAM,6BAA6B,CAAA;AAS1F,OAAO,EAAC,wBAAwB,EAAE,gCAAgC,EAAC,MAAM,+BAA+B,CAAA;AAExG,8CAA8C;AAC9C,OAAO,EAAC,oBAAoB,EAAC,MAAM,kBAAkB,CAAA;AAGrD,2DAA2D;AAC3D,OAAO,EACL,kBAAkB,EAClB,cAAc,EACd,sBAAsB,EACtB,mBAAmB,GAGpB,MAAM,6BAA6B,CAAA;AACpC,yEAAyE;AACzE,OAAO,EACL,eAAe,EACf,yBAAyB,GAI1B,MAAM,kCAAkC,CAAA;AAazC,uEAAuE;AACvE,2DAA2D;AAC3D,OAAO,EACL,wBAAwB,EACxB,WAAW,EACX,iBAAiB,EACjB,mBAAmB,EACnB,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f,aAAa,EACb,WAAW,EACX,eAAe,EACf,KAAK,EACL,WAAW,GAGZ,MAAM,gCAAgC,CAAA;AAGvC,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,QAAQ,EACR,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/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\"\nexport {getEffectiveCapabilities} from \"./services/effectiveCapabilities\"\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} from \"./utils/timers\"\n// Meta Neural Band: the account sign-in a claim needs (the WebView lives in the host).\nexport {\n MetaAuthError,\n authEntryUrl,\n callbackMatches,\n callbackQuery,\n decryptBlob,\n isLoginCallback,\n login,\n tokensQuery,\n type MetaSession,\n type MetaSsoTokens,\n} from \"./services/neuralBand/MetaAuth\"\nexport type {NeuralBandClaimStatus, NeuralBandHandwritingStatus} from \"./services/neuralBand/NeuralBandInput\"\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 rayneoIO,\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 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AiTierResolution.d.ts","sourceRoot":"","sources":["../../src/services/AiTierResolution.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,MAAM,MAAM,MAAM,GAAG,OAAO,GAAG,UAAU,GAAG,UAAU,CAAA;AACtD,MAAM,MAAM,cAAc,GAAG,WAAW,GAAG,QAAQ,GAAG,QAAQ,CAAA;AAE9D,eAAO,MAAM,QAAQ,EAAE,SAAS,MAAM,EAAsC,CAAA;AAE5E,6CAA6C;AAC7C,MAAM,WAAW,eAAe;IAC9B,QAAQ,EAAE,cAAc,CAAA;IACxB,KAAK,EAAE,MAAM,CAAA;IACb,6CAA6C;IAC7C,KAAK,EAAE,MAAM,CAAA;CACd;AAED;;;;;GAKG;AACH,eAAO,MAAM,kBAAkB,EAAE,MAAM,CAAC,MAAM,EAAE,eAAe,EAAE,CAgBhE,CAAA;AAED,6EAA6E;AAC7E,MAAM,MAAM,YAAY,GAAG,MAAM,CAAC,cAAc,EAAE,OAAO,CAAC,CAAA;AAE1D;;;;GAIG;AACH,MAAM,WAAW,iBAAiB;IAChC,QAAQ,CAAC,EAAE,cAAc,CAAA;IACzB,KAAK,CAAC,EAAE,MAAM,CAAA;CACf;
|
|
1
|
+
{"version":3,"file":"AiTierResolution.d.ts","sourceRoot":"","sources":["../../src/services/AiTierResolution.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,MAAM,MAAM,MAAM,GAAG,OAAO,GAAG,UAAU,GAAG,UAAU,CAAA;AACtD,MAAM,MAAM,cAAc,GAAG,WAAW,GAAG,QAAQ,GAAG,QAAQ,CAAA;AAE9D,eAAO,MAAM,QAAQ,EAAE,SAAS,MAAM,EAAsC,CAAA;AAE5E,6CAA6C;AAC7C,MAAM,WAAW,eAAe;IAC9B,QAAQ,EAAE,cAAc,CAAA;IACxB,KAAK,EAAE,MAAM,CAAA;IACb,6CAA6C;IAC7C,KAAK,EAAE,MAAM,CAAA;CACd;AAED;;;;;GAKG;AACH,eAAO,MAAM,kBAAkB,EAAE,MAAM,CAAC,MAAM,EAAE,eAAe,EAAE,CAgBhE,CAAA;AAED,6EAA6E;AAC7E,MAAM,MAAM,YAAY,GAAG,MAAM,CAAC,cAAc,EAAE,OAAO,CAAC,CAAA;AAE1D;;;;GAIG;AACH,MAAM,WAAW,iBAAiB;IAChC,QAAQ,CAAC,EAAE,cAAc,CAAA;IACzB,KAAK,CAAC,EAAE,MAAM,CAAA;CACf;AAUD,+EAA+E;AAC/E,wBAAgB,eAAe,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,CAEtD;AAED,mFAAmF;AACnF,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,OAAO,GAAG;IAAC,QAAQ,EAAE,cAAc,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAC,GAAG,IAAI,CAUjG;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,aAAa,CAAC,IAAI,EAAE,MAAM,EAAE,YAAY,EAAE,OAAO,EAAE,IAAI,EAAE,YAAY,GAAG,iBAAiB,CAaxG"}
|
|
@@ -29,10 +29,17 @@ export const TIER_MODEL_OPTIONS = {
|
|
|
29
29
|
],
|
|
30
30
|
frontier: [
|
|
31
31
|
{ provider: "anthropic", model: "claude-sonnet-5", label: "Claude Sonnet 5" },
|
|
32
|
-
{ provider: "gemini", model: "gemini-3.
|
|
32
|
+
{ provider: "gemini", model: "gemini-3.1-pro-preview", label: "Gemini 3.1 Pro" },
|
|
33
33
|
{ provider: "openai", model: "gpt-5.1", label: "GPT-5.1" },
|
|
34
34
|
],
|
|
35
35
|
};
|
|
36
|
+
/**
|
|
37
|
+
* Stored dropdown picks for model ids the provider never served, mapped to the
|
|
38
|
+
* curated replacement. gemini-3.5-pro 404s on generateContent.
|
|
39
|
+
*/
|
|
40
|
+
const RETIRED_MODELS = {
|
|
41
|
+
"gemini-3.5-pro": "gemini-3.1-pro-preview",
|
|
42
|
+
};
|
|
36
43
|
/** Coerce an untrusted wire value into a tier; anything else is "balanced". */
|
|
37
44
|
export function normalizeAiTier(value) {
|
|
38
45
|
return value === "quick" || value === "frontier" ? value : "balanced";
|
|
@@ -45,9 +52,10 @@ export function parseTierSetting(value) {
|
|
|
45
52
|
if (sep <= 0)
|
|
46
53
|
return null;
|
|
47
54
|
const provider = value.slice(0, sep);
|
|
48
|
-
const
|
|
49
|
-
if (!
|
|
55
|
+
const stored = value.slice(sep + 1).trim();
|
|
56
|
+
if (!stored)
|
|
50
57
|
return null;
|
|
58
|
+
const model = RETIRED_MODELS[stored] ?? stored;
|
|
51
59
|
if (provider !== "anthropic" && provider !== "gemini" && provider !== "openai")
|
|
52
60
|
return null;
|
|
53
61
|
return { provider, model };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AiTierResolution.js","sourceRoot":"","sources":["../../src/services/AiTierResolution.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAKH,MAAM,CAAC,MAAM,QAAQ,GAAsB,CAAC,OAAO,EAAE,UAAU,EAAE,UAAU,CAAC,CAAA;AAU5E;;;;;GAKG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAAsC;IACnE,KAAK,EAAE;QACL,EAAC,QAAQ,EAAE,WAAW,EAAE,KA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,CAAC,CAAC,CAAC,IAAI,EAAE,CAAA;IAC1C,IAAI,CAAC,MAAM;QAAE,OAAO,IAAI,CAAA;IACxB,MAAM,KAAK,GAAG,cAAc,CAAC,MAAM,CAAC,IAAI,MAAM,CAAA;IAC9C,IAAI,QAAQ,KAAK,WAAW,IAAI,QAAQ,KAAK,QAAQ,IAAI,QAAQ,KAAK,QAAQ;QAAE,OAAO,IAAI,CAAA;IAC3F,OAAO,EAAC,QAAQ,EAAE,KAAK,EAAC,CAAA;AAC1B,CAAC;AAED;;;;;;;;;;;;GAYG;AACH,MAAM,UAAU,aAAa,CAAC,IAAY,EAAE,YAAqB,EAAE,IAAkB;IACnF,MAAM,QAAQ,GAAG,gBAAgB,CAAC,YAAY,CAAC,CAAA;IAC/C,IAAI,QAAQ;QAAE,OAAO,QAAQ,CAAA;IAE7B,KAAK,MAAM,MAAM,IAAI,kBAAkB,CAAC,IAAI,CAAC,EAAE,CAAC;QAC9C,IAAI,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC;YAAE,OAAO,EAAC,QAAQ,EAAE,MAAM,CAAC,QAAQ,EAAE,KAAK,EAAE,MAAM,CAAC,KAAK,EAAC,CAAA;IACpF,CAAC;IAED,IAAI,IAAI,KAAK,OAAO,EAAE,CAAC;QACrB,MAAM,MAAM,GAAG,kBAAkB,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,QAAQ,KAAK,QAAQ,CAAC,CAAA;QAC5E,IAAI,MAAM;YAAE,OAAO,EAAC,QAAQ,EAAE,MAAM,CAAC,QAAQ,EAAE,KAAK,EAAE,MAAM,CAAC,KAAK,EAAC,CAAA;IACrE,CAAC;IACD,OAAO,EAAE,CAAA;AACX,CAAC","sourcesContent":["/**\n * AiTierResolution — pure decision logic for mapping a miniapp's requested AI\n * tier (\"quick\" / \"balanced\" / \"frontier\") to a concrete provider+model.\n *\n * Miniapps never name a provider or model (the session.ai contract is\n * tier-only); the user picks per-tier models in Settings > AI Models, or\n * leaves \"auto\" and the pick follows from whichever provider keys they saved.\n * Extracted from LocalMiniappRuntime as pure functions so the routing rules\n * are unit-testable (the TranscriptionRouting.ts pattern) — the singleton\n * supplies settings/keys and does the side effects.\n */\n\nexport type AiTier = \"quick\" | \"balanced\" | \"frontier\"\nexport type AiTierProvider = \"anthropic\" | \"gemini\" | \"openai\"\n\nexport const AI_TIERS: readonly AiTier[] = [\"quick\", \"balanced\", \"frontier\"]\n\n/** One curated dropdown entry for a tier. */\nexport interface TierModelOption {\n provider: AiTierProvider\n model: string\n /** Human label for the Settings dropdown. */\n label: string\n}\n\n/**\n * Curated per-tier model registry — the only place model ids live on the\n * phone. Order within a tier is the \"auto\" preference order: first entry\n * whose provider has a saved key wins. Anthropic leads (matching the cloud's\n * default provider), then Gemini (the pre-tier quick default), then OpenAI.\n */\nexport const TIER_MODEL_OPTIONS: Record<AiTier, TierModelOption[]> = {\n quick: [\n {provider: \"anthropic\", model: \"claude-haiku-4-5\", label: \"Claude Haiku 4.5\"},\n {provider: \"gemini\", model: \"gemini-3.5-flash-lite\", label: \"Gemini 3.5 Flash Lite\"},\n {provider: \"openai\", model: \"gpt-5-mini\", label: \"GPT-5 mini\"},\n ],\n balanced: [\n {provider: \"anthropic\", model: \"claude-haiku-4-5\", label: \"Claude Haiku 4.5\"},\n {provider: \"gemini\", model: \"gemini-3.5-flash\", label: \"Gemini 3.5 Flash\"},\n {provider: \"openai\", model: \"gpt-5.1\", label: \"GPT-5.1\"},\n ],\n frontier: [\n {provider: \"anthropic\", model: \"claude-sonnet-5\", label: \"Claude Sonnet 5\"},\n {provider: \"gemini\", model: \"gemini-3.1-pro-preview\", label: \"Gemini 3.1 Pro\"},\n {provider: \"openai\", model: \"gpt-5.1\", label: \"GPT-5.1\"},\n ],\n}\n\n/** Which providers currently have a user key saved (Settings > API Keys). */\nexport type SavedLlmKeys = Record<AiTierProvider, boolean>\n\n/**\n * A resolved pick. `provider`/`model` may both be absent: that means \"no\n * opinion — let the cloud's default provider serve it\", which is the right\n * answer for platform-funded balanced/frontier calls with no keys saved.\n */\nexport interface ResolvedTierModel {\n provider?: AiTierProvider\n model?: string\n}\n\n/**\n * Stored dropdown picks for model ids the provider never served, mapped to the\n * curated replacement. gemini-3.5-pro 404s on generateContent.\n */\nconst RETIRED_MODELS: Record<string, string> = {\n \"gemini-3.5-pro\": \"gemini-3.1-pro-preview\",\n}\n\n/** Coerce an untrusted wire value into a tier; anything else is \"balanced\". */\nexport function normalizeAiTier(value: unknown): AiTier {\n return value === \"quick\" || value === \"frontier\" ? value : \"balanced\"\n}\n\n/** Parse a stored \"<provider>:<model>\" dropdown value; null for \"auto\"/garbage. */\nexport function parseTierSetting(value: unknown): {provider: AiTierProvider; model: string} | null {\n if (typeof value !== \"string\") return null\n const sep = value.indexOf(\":\")\n if (sep <= 0) return null\n const provider = value.slice(0, sep)\n const stored = value.slice(sep + 1).trim()\n if (!stored) return null\n const model = RETIRED_MODELS[stored] ?? stored\n if (provider !== \"anthropic\" && provider !== \"gemini\" && provider !== \"openai\") return null\n return {provider, model}\n}\n\n/**\n * Resolve one tier to a provider+model.\n *\n * Explicit dropdown pick wins verbatim — even if that provider's key was\n * since removed (the call falls through to the cloud path, which may serve it\n * on the platform key or fail loudly; silently substituting a different model\n * the user didn't pick would be worse).\n *\n * \"auto\": first curated entry whose provider has a saved key. With no keys at\n * all, quick still pins its cheapest curated model on the cloud's Gemini key\n * (high-volume triage on the default Sonnet would burn platform credit ~30x\n * faster), while balanced/frontier stay unpinned and take the cloud default.\n */\nexport function resolveAiTier(tier: AiTier, settingValue: unknown, keys: SavedLlmKeys): ResolvedTierModel {\n const explicit = parseTierSetting(settingValue)\n if (explicit) return explicit\n\n for (const option of TIER_MODEL_OPTIONS[tier]) {\n if (keys[option.provider]) return {provider: option.provider, model: option.model}\n }\n\n if (tier === \"quick\") {\n const gemini = TIER_MODEL_OPTIONS.quick.find((o) => o.provider === \"gemini\")\n if (gemini) return {provider: gemini.provider, model: gemini.model}\n }\n return {}\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GestureDotsService.d.ts","sourceRoot":"","sources":["../../src/services/GestureDotsService.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"GestureDotsService.d.ts","sourceRoot":"","sources":["../../src/services/GestureDotsService.ts"],"names":[],"mappings":"AAuDA,cAAM,kBAAkB;IACtB,OAAO,CAAC,OAAO,CAAQ;IACvB,OAAO,CAAC,KAAK,CAA+B;IAC5C,OAAO,CAAC,UAAU,CAAsB;IACxC,yFAAyF;IACzF,OAAO,CAAC,OAAO,CAA4D;IAC3E,kFAAkF;IAClF,OAAO,CAAC,UAAU,CAA4B;IAC9C,8EAA8E;IAC9E,OAAO,CAAC,aAAa,CAA+B;IACpD,oGAAoG;IACpG,OAAO,CAAC,OAAO,CAAQ;IACvB,OAAO,CAAC,MAAM,CAAwB;IAEtC,KAAK,IAAI,IAAI;IAqBb,IAAI,IAAI,IAAI;IAQZ,OAAO,CAAC,YAAY;IAOpB,uFAAuF;IACvF,OAAO,CAAC,UAAU;IAQlB,OAAO,CAAC,OAAO;IAIf;;;;;OAKG;IACH,WAAW,CAAC,WAAW,EAAE,MAAM,EAAE,OAAO,UAAQ,EAAE,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI;IAM7E,OAAO,CAAC,YAAY;IAsDpB,OAAO,CAAC,UAAU;IAMlB,OAAO,CAAC,UAAU;IAWlB,sFAAsF;IACtF,OAAO,CAAC,KAAK;IAgBb;;;;;;;;;;OAUG;IACH,OAAO,CAAC,MAAM;CAqCf;AAED,QAAA,MAAM,kBAAkB,oBAA2B,CAAA;AACnD,eAAe,kBAAkB,CAAA;AACjC,OAAO,EAAC,kBAAkB,EAAC,CAAA"}
|
|
@@ -5,7 +5,8 @@
|
|
|
5
5
|
* (cleared after a short pulse), a bullseye for a recognized long press.
|
|
6
6
|
* Controllers that report press edges (touch_down … tap_end) show the press
|
|
7
7
|
* itself instead: a dot while pressed, the bullseye once held, cleared at
|
|
8
|
-
* release. The Neural Band's middle finger (index 1) draws the same shapes
|
|
8
|
+
* release. The Neural Band's middle finger (index 1) draws the same shapes
|
|
9
|
+
* hollow: a ring for its tap, the bullseye without its center for its hold. Extracted from
|
|
9
10
|
* the CFW dashboard service; it renders through
|
|
10
11
|
* the ordinary scene pipeline, so it works on any positioning device (stock
|
|
11
12
|
* G2 included), and is gated by the gesture_dots debug setting.
|
|
@@ -39,7 +40,15 @@ const FLASH_GLYPHS = {
|
|
|
39
40
|
swipe_right: "right",
|
|
40
41
|
};
|
|
41
42
|
/** The band's middle finger draws the filled shapes hollow. */
|
|
42
|
-
const MIDDLE_FINGER_GLYPHS = {
|
|
43
|
+
const MIDDLE_FINGER_GLYPHS = {
|
|
44
|
+
dot: "ring",
|
|
45
|
+
double: "doubleRing",
|
|
46
|
+
hold: "holdRing",
|
|
47
|
+
};
|
|
48
|
+
/** `glyph` as `finger` draws it: the middle finger's shapes are hollow. */
|
|
49
|
+
function fingerGlyph(glyph, finger) {
|
|
50
|
+
return finger === 1 ? (MIDDLE_FINGER_GLYPHS[glyph] ?? glyph) : glyph;
|
|
51
|
+
}
|
|
43
52
|
class GestureDotsService {
|
|
44
53
|
started = false;
|
|
45
54
|
flash = null;
|
|
@@ -131,12 +140,12 @@ class GestureDotsService {
|
|
|
131
140
|
if (gestureName === "touch_down")
|
|
132
141
|
press.raw = true;
|
|
133
142
|
else if (press.raw)
|
|
134
|
-
press.glyph = "hold";
|
|
143
|
+
press.glyph = fingerGlyph("hold", finger);
|
|
135
144
|
this.render();
|
|
136
145
|
return;
|
|
137
146
|
}
|
|
138
147
|
this.clearFlash();
|
|
139
|
-
this.presses.set(finger, { raw: gestureName === "touch_down", glyph:
|
|
148
|
+
this.presses.set(finger, { raw: gestureName === "touch_down", glyph: fingerGlyph("dot", finger) });
|
|
140
149
|
this.render();
|
|
141
150
|
return;
|
|
142
151
|
}
|
|
@@ -150,7 +159,7 @@ class GestureDotsService {
|
|
|
150
159
|
return;
|
|
151
160
|
}
|
|
152
161
|
const shape = FLASH_GLYPHS[gestureName];
|
|
153
|
-
const glyph = shape
|
|
162
|
+
const glyph = shape ? fingerGlyph(shape, finger) : shape;
|
|
154
163
|
// The press already showed its own tap and hold; the device's report of
|
|
155
164
|
// them follows after its double-tap window, often after release.
|
|
156
165
|
const shownByPress = gestureName === "single_tap" || gestureName === "long_press";
|
|
@@ -158,7 +167,7 @@ class GestureDotsService {
|
|
|
158
167
|
// Pinch-and-turn reports do not release a finger. A recognized hold
|
|
159
168
|
// stays visible until tap_end instead of expiring halfway through it.
|
|
160
169
|
if (gestureName === "long_press")
|
|
161
|
-
press.glyph = "hold";
|
|
170
|
+
press.glyph = fingerGlyph("hold", finger);
|
|
162
171
|
this.render();
|
|
163
172
|
return;
|
|
164
173
|
}
|