@mentra/engine 0.1.0-dev.1 → 3.1.0-dev.10
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/README.md +20 -24
- package/build/bluetooth-sdk/debug.d.ts +2 -0
- package/build/bluetooth-sdk/debug.d.ts.map +1 -0
- package/build/bluetooth-sdk/debug.js +2 -0
- package/build/bluetooth-sdk/debug.js.map +1 -0
- package/build/bluetooth-sdk/index.d.ts +3 -0
- package/build/bluetooth-sdk/index.d.ts.map +1 -0
- package/build/bluetooth-sdk/index.js +3 -0
- package/build/bluetooth-sdk/index.js.map +1 -0
- package/build/bluetooth-sdk/photo-receiver.d.ts +3 -0
- package/build/bluetooth-sdk/photo-receiver.d.ts.map +1 -0
- package/build/bluetooth-sdk/photo-receiver.js +3 -0
- package/build/bluetooth-sdk/photo-receiver.js.map +1 -0
- package/build/bluetooth-sdk/react.d.ts +2 -0
- package/build/bluetooth-sdk/react.d.ts.map +1 -0
- package/build/bluetooth-sdk/react.js +2 -0
- package/build/bluetooth-sdk/react.js.map +1 -0
- package/build/bluetooth-sdk/types.d.ts +2 -0
- package/build/bluetooth-sdk/types.d.ts.map +1 -0
- package/build/bluetooth-sdk/types.js +2 -0
- package/build/bluetooth-sdk/types.js.map +1 -0
- package/build/engine.d.ts +13 -13
- package/build/engine.d.ts.map +1 -1
- package/build/engine.js +2 -2
- package/build/engine.js.map +1 -1
- package/build/facades/display.d.ts +1 -1
- package/build/facades/display.d.ts.map +1 -1
- package/build/facades/display.js +1 -1
- package/build/facades/display.js.map +1 -1
- package/build/facades/glasses.d.ts +3 -13
- package/build/facades/glasses.d.ts.map +1 -1
- package/build/facades/glasses.js +3 -3
- package/build/facades/glasses.js.map +1 -1
- package/build/facades/ota.d.ts +5 -16
- package/build/facades/ota.d.ts.map +1 -1
- package/build/facades/ota.js +3 -3
- package/build/facades/ota.js.map +1 -1
- package/build/facades/pairing.d.ts +4 -5
- package/build/facades/pairing.d.ts.map +1 -1
- package/build/facades/pairing.js +2 -2
- package/build/facades/pairing.js.map +1 -1
- package/build/facades/speech.d.ts +7 -6
- package/build/facades/speech.d.ts.map +1 -1
- package/build/facades/speech.js +1 -1
- package/build/facades/speech.js.map +1 -1
- package/build/generated/releaseMetadata.d.ts +12 -0
- package/build/generated/releaseMetadata.d.ts.map +1 -0
- package/build/generated/releaseMetadata.js +10 -0
- package/build/generated/releaseMetadata.js.map +1 -0
- package/build/index.d.ts +4 -5
- package/build/index.d.ts.map +1 -1
- package/build/index.js +2 -3
- package/build/index.js.map +1 -1
- package/build/services/AppRegistry.d.ts +8 -0
- package/build/services/AppRegistry.d.ts.map +1 -1
- package/build/services/AppRegistry.js +15 -0
- package/build/services/AppRegistry.js.map +1 -1
- package/build/services/OtaInstallCoordinator.d.ts +1 -1
- package/build/services/OtaInstallCoordinator.d.ts.map +1 -1
- package/build/services/OtaInstallCoordinator.js +3 -0
- package/build/services/OtaInstallCoordinator.js.map +1 -1
- package/build/services/OtaUpdateCheckService.d.ts +1 -1
- package/build/services/OtaUpdateCheckService.d.ts.map +1 -1
- package/build/services/OtaUpdateCheckService.js +12 -16
- package/build/services/OtaUpdateCheckService.js.map +1 -1
- package/build/services/glassesClockSync.d.ts.map +1 -1
- package/build/services/glassesClockSync.js +4 -0
- package/build/services/glassesClockSync.js.map +1 -1
- package/build/services/otaDisplayState.d.ts +1 -1
- package/build/services/otaDisplayState.d.ts.map +1 -1
- package/build/services/otaDisplayState.js.map +1 -1
- package/build/services/otaInstallPolicy.d.ts +1 -1
- package/build/services/otaInstallPolicy.d.ts.map +1 -1
- package/build/services/otaInstallPolicy.js.map +1 -1
- package/build/services/otaLegacyMapping.d.ts +1 -1
- package/build/services/otaLegacyMapping.d.ts.map +1 -1
- package/build/services/otaLegacyMapping.js.map +1 -1
- package/build/services/otaManifestPolicy.d.ts +14 -0
- package/build/services/otaManifestPolicy.d.ts.map +1 -0
- package/build/services/otaManifestPolicy.js +19 -0
- package/build/services/otaManifestPolicy.js.map +1 -0
- package/build/services/otaManifestUrl.d.ts +2 -1
- package/build/services/otaManifestUrl.d.ts.map +1 -1
- package/build/services/otaManifestUrl.js +24 -32
- package/build/services/otaManifestUrl.js.map +1 -1
- package/build/stores/settings.js +3 -3
- package/build/stores/settings.js.map +1 -1
- package/build/types/enums.d.ts +1 -25
- package/build/types/enums.d.ts.map +1 -1
- package/build/types/enums.js +1 -27
- package/build/types/enums.js.map +1 -1
- package/build/types/hardware.d.ts +3 -13
- package/build/types/hardware.d.ts.map +1 -1
- package/build/types/hardware.js +1 -3
- package/build/types/hardware.js.map +1 -1
- package/build/types/index.d.ts +2 -6
- package/build/types/index.d.ts.map +1 -1
- package/build/types/index.js +2 -6
- package/build/types/index.js.map +1 -1
- package/package.json +40 -22
- package/src/bluetooth-sdk/debug.ts +1 -0
- package/src/bluetooth-sdk/index.ts +2 -0
- package/src/bluetooth-sdk/photo-receiver.ts +2 -0
- package/src/bluetooth-sdk/react.ts +1 -0
- package/src/bluetooth-sdk/types.ts +1 -0
- package/src/engine.ts +2 -2
- package/src/facades/display.ts +1 -1
- package/src/facades/glasses.ts +4 -4
- package/src/facades/ota.ts +4 -4
- package/src/facades/pairing.ts +4 -4
- package/src/facades/speech.ts +21 -7
- package/src/generated/releaseMetadata.ts +20 -0
- package/src/index.ts +13 -11
- package/src/services/AppRegistry.ts +16 -0
- package/src/services/OtaInstallCoordinator.ts +4 -1
- package/src/services/OtaUpdateCheckService.ts +20 -20
- package/src/services/glassesClockSync.ts +4 -0
- package/src/services/otaDisplayState.ts +1 -1
- package/src/services/otaInstallPolicy.ts +1 -1
- package/src/services/otaLegacyMapping.ts +1 -1
- package/src/services/otaManifestPolicy.ts +42 -0
- package/src/services/otaManifestUrl.ts +27 -36
- package/src/stores/settings.ts +3 -3
- package/src/types/enums.ts +1 -27
- package/src/types/hardware.ts +3 -13
- package/src/types/index.ts +2 -6
- package/build/devtools.d.ts +0 -11
- package/build/devtools.d.ts.map +0 -1
- package/build/devtools.js +0 -13
- package/build/devtools.js.map +0 -1
- package/build/internal.d.ts +0 -67
- package/build/internal.d.ts.map +0 -1
- package/build/internal.js +0 -90
- package/build/internal.js.map +0 -1
- package/src/devtools.ts +0 -13
- package/src/internal.ts +0 -160
|
@@ -1,17 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ENGINE_RELEASE_METADATA } from "../generated/releaseMetadata";
|
|
2
2
|
import { SETTINGS, useSettingsStore } from "../stores/settings";
|
|
3
|
-
|
|
4
|
-
const OTA_VERSION_URL_LEGACY_PROD = "https://ota.mentraglass.com/prod_live_version.json";
|
|
5
|
-
// Modern production fleet manifest (v2). Only a last-resort fallback when the SDK-derived pin
|
|
6
|
-
// URL is somehow unavailable; modern glasses honor ota_start's URL, so this must be the v2
|
|
7
|
-
// artifact, not the legacy v1 rescue manifest.
|
|
8
|
-
const OTA_VERSION_URL_PROD = "https://ota.mentraglass.com/prod_live_version_v2.json";
|
|
9
|
-
function isLegacyAsgOtaStartBuild(glassesBuildNumber) {
|
|
10
|
-
const buildNumber = Number.parseInt(glassesBuildNumber ?? "", 10);
|
|
11
|
-
// ASG builds before 39 ignore ota_start.ota_version_url, so compare against
|
|
12
|
-
// the URL they will actually use.
|
|
13
|
-
return Number.isFinite(buildNumber) && buildNumber < 39;
|
|
14
|
-
}
|
|
3
|
+
import { resolveOtaManifestPolicy, selectModernOtaManifestPin } from "./otaManifestPolicy";
|
|
15
4
|
function getOtaVersionUrlDevOverride() {
|
|
16
5
|
// Super mode only: a wrong OTA manifest can brick glasses, so a saved
|
|
17
6
|
// override is inert unless super mode is currently enabled.
|
|
@@ -22,25 +11,28 @@ function getOtaVersionUrlDevOverride() {
|
|
|
22
11
|
const trimmed = typeof value === "string" ? value.trim() : "";
|
|
23
12
|
return trimmed || null;
|
|
24
13
|
}
|
|
14
|
+
function getHostReleasePin() {
|
|
15
|
+
const value = process.env.EXPO_PUBLIC_ASG_OTA_VERSION_URL?.trim();
|
|
16
|
+
return value || null;
|
|
17
|
+
}
|
|
18
|
+
function getEmbeddedEngineReleasePin() {
|
|
19
|
+
const value = ENGINE_RELEASE_METADATA.otaManifestUrl?.trim();
|
|
20
|
+
return value || null;
|
|
21
|
+
}
|
|
22
|
+
export function hasConfiguredModernOtaManifestPin() {
|
|
23
|
+
return Boolean(selectModernOtaManifestPin({
|
|
24
|
+
developerOverride: getOtaVersionUrlDevOverride(),
|
|
25
|
+
hostReleasePin: getHostReleasePin(),
|
|
26
|
+
engineReleasePin: getEmbeddedEngineReleasePin(),
|
|
27
|
+
}));
|
|
28
|
+
}
|
|
25
29
|
export function resolveOtaManifestUrl(glassesUrl, glassesBuildNumber) {
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
if (devOverrideUrl) {
|
|
34
|
-
return devOverrideUrl;
|
|
35
|
-
}
|
|
36
|
-
const envUrl = process.env.EXPO_PUBLIC_ASG_OTA_VERSION_URL?.trim();
|
|
37
|
-
if (envUrl) {
|
|
38
|
-
return envUrl;
|
|
39
|
-
}
|
|
40
|
-
// The phone owns manifest selection: modern glasses are driven with the manifest pinned to
|
|
41
|
-
// this app's Bluetooth SDK version. Modern ASG builds report no manifest URL of their own;
|
|
42
|
-
// a glasses-reported URL (older modern builds advertising their baked fleet default) is only
|
|
43
|
-
// a last resort when the SDK version is somehow unavailable.
|
|
44
|
-
return sdkPinnedOtaManifestUrl() || deviceUrl || OTA_VERSION_URL_PROD;
|
|
30
|
+
return resolveOtaManifestPolicy({
|
|
31
|
+
glassesUrl,
|
|
32
|
+
glassesBuildNumber,
|
|
33
|
+
developerOverride: getOtaVersionUrlDevOverride(),
|
|
34
|
+
hostReleasePin: getHostReleasePin(),
|
|
35
|
+
engineReleasePin: getEmbeddedEngineReleasePin(),
|
|
36
|
+
});
|
|
45
37
|
}
|
|
46
38
|
//# sourceMappingURL=otaManifestUrl.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"otaManifestUrl.js","sourceRoot":"","sources":["../../src/services/otaManifestUrl.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,uBAAuB,EAAC,MAAM,
|
|
1
|
+
{"version":3,"file":"otaManifestUrl.js","sourceRoot":"","sources":["../../src/services/otaManifestUrl.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,uBAAuB,EAAC,MAAM,8BAA8B,CAAA;AACpE,OAAO,EAAC,QAAQ,EAAE,gBAAgB,EAAC,MAAM,oBAAoB,CAAA;AAC7D,OAAO,EAAC,wBAAwB,EAAE,0BAA0B,EAAC,MAAM,qBAAqB,CAAA;AAExF,SAAS,2BAA2B;IAClC,sEAAsE;IACtE,4DAA4D;IAC5D,IAAI,CAAC,gBAAgB,CAAC,QAAQ,EAAE,CAAC,UAAU,CAAC,QAAQ,CAAC,UAAU,CAAC,GAAG,CAAC,EAAE,CAAC;QACrE,OAAO,IAAI,CAAA;IACb,CAAC;IACD,MAAM,KAAK,GAAG,gBAAgB,CAAC,QAAQ,EAAE,CAAC,UAAU,CAAC,QAAQ,CAAC,eAAe,CAAC,GAAG,CAAC,CAAA;IAClF,MAAM,OAAO,GAAG,OAAO,KAAK,KAAK,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,EAAE,CAAA;IAC7D,OAAO,OAAO,IAAI,IAAI,CAAA;AACxB,CAAC;AAED,SAAS,iBAAiB;IACxB,MAAM,KAAK,GAAG,OAAO,CAAC,GAAG,CAAC,+BAA+B,EAAE,IAAI,EAAE,CAAA;IACjE,OAAO,KAAK,IAAI,IAAI,CAAA;AACtB,CAAC;AAED,SAAS,2BAA2B;IAClC,MAAM,KAAK,GAAG,uBAAuB,CAAC,cAAc,EAAE,IAAI,EAAE,CAAA;IAC5D,OAAO,KAAK,IAAI,IAAI,CAAA;AACtB,CAAC;AAED,MAAM,UAAU,iCAAiC;IAC/C,OAAO,OAAO,CACZ,0BAA0B,CAAC;QACzB,iBAAiB,EAAE,2BAA2B,EAAE;QAChD,cAAc,EAAE,iBAAiB,EAAE;QACnC,gBAAgB,EAAE,2BAA2B,EAAE;KAChD,CAAC,CACH,CAAA;AACH,CAAC;AAED,MAAM,UAAU,qBAAqB,CAAC,UAA0B,EAAE,kBAAkC;IAClG,OAAO,wBAAwB,CAAC;QAC9B,UAAU;QACV,kBAAkB;QAClB,iBAAiB,EAAE,2BAA2B,EAAE;QAChD,cAAc,EAAE,iBAAiB,EAAE;QACnC,gBAAgB,EAAE,2BAA2B,EAAE;KAChD,CAAC,CAAA;AACJ,CAAC","sourcesContent":["import {ENGINE_RELEASE_METADATA} from \"../generated/releaseMetadata\"\nimport {SETTINGS, useSettingsStore} from \"../stores/settings\"\nimport {resolveOtaManifestPolicy, selectModernOtaManifestPin} from \"./otaManifestPolicy\"\n\nfunction getOtaVersionUrlDevOverride(): string | null {\n // Super mode only: a wrong OTA manifest can brick glasses, so a saved\n // override is inert unless super mode is currently enabled.\n if (!useSettingsStore.getState().getSetting(SETTINGS.super_mode.key)) {\n return null\n }\n const value = useSettingsStore.getState().getSetting(SETTINGS.ota_version_url.key)\n const trimmed = typeof value === \"string\" ? value.trim() : \"\"\n return trimmed || null\n}\n\nfunction getHostReleasePin(): string | null {\n const value = process.env.EXPO_PUBLIC_ASG_OTA_VERSION_URL?.trim()\n return value || null\n}\n\nfunction getEmbeddedEngineReleasePin(): string | null {\n const value = ENGINE_RELEASE_METADATA.otaManifestUrl?.trim()\n return value || null\n}\n\nexport function hasConfiguredModernOtaManifestPin(): boolean {\n return Boolean(\n selectModernOtaManifestPin({\n developerOverride: getOtaVersionUrlDevOverride(),\n hostReleasePin: getHostReleasePin(),\n engineReleasePin: getEmbeddedEngineReleasePin(),\n }),\n )\n}\n\nexport function resolveOtaManifestUrl(glassesUrl?: string | null, glassesBuildNumber?: string | null): string | null {\n return resolveOtaManifestPolicy({\n glassesUrl,\n glassesBuildNumber,\n developerOverride: getOtaVersionUrlDevOverride(),\n hostReleasePin: getHostReleasePin(),\n engineReleasePin: getEmbeddedEngineReleasePin(),\n })\n}\n"]}
|
package/build/stores/settings.js
CHANGED
|
@@ -899,9 +899,9 @@ export const useSettingsStore = create()(subscribeWithSelector((set, get) => ({
|
|
|
899
899
|
// easy to get backwards. TestFlight and the App Store receive the SAME
|
|
900
900
|
// binary, so promotion does not change EXPO_PUBLIC_BUILD_ENV and this
|
|
901
901
|
// reset never fires on it. Promotion is safe for a different reason:
|
|
902
|
-
// the publishing lane bakes
|
|
903
|
-
//
|
|
904
|
-
//
|
|
902
|
+
// the publishing lane bakes the selected release cloud environment, and
|
|
903
|
+
// production promotes the already-tested binary. The same holds for
|
|
904
|
+
// Android beta-track to production.
|
|
905
905
|
//
|
|
906
906
|
// The residual gap is therefore an override pinned while already on a
|
|
907
907
|
// prod-labelled build, which no label comparison can see. That is a
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"settings.js","sourceRoot":"","sources":["../../src/stores/settings.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,WAAW,EAAC,MAAM,uBAAuB,CAAA;AACjD,OAAO,EAAc,MAAM,IAAI,GAAG,EAAS,MAAM,aAAa,CAAA;AAC9D,OAAO,EAAC,MAAM,EAAC,MAAM,SAAS,CAAA;AAC9B,OAAO,EAAC,qBAAqB,EAAC,MAAM,oBAAoB,CAAA;AAExD,OAAO,EAAC,OAAO,EAAC,MAAM,kBAAkB,CAAA;AACxC,OAAO,EAAC,gCAAgC,EAAC,MAAM,wBAAwB,CAAA;AACvE,OAAO,EAAC,eAAe,EAAC,MAAM,WAAW,CAAA;AAEzC,OAAO,EAAC,wBAAwB,EAAE,gCAAgC,EAAC,MAAM,wBAAwB,CAAA;AAyCjG,MAAM,CAAC,MAAM,QAAQ,GAA4B;IAC/C,mCAAmC;IACnC,QAAQ,EAAE,EAAC,GAAG,EAAE,UAAU,EAAE,YAAY,EAAE,GAAG,EAAE,CAAC,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE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AC;QACD,OAAO,iBAAiB,CAAA;IAC1B,CAAC;IACD,uBAAuB,EAAE,GAAG,EAAE;QAC5B,GAAG,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC;YACf,QAAQ,EAAE,kBAAkB,EAAE;YAC9B,aAAa,EAAE,IAAI;SACpB,CAAC,CAAC,CAAA;IACL,CAAC;CACF,CAAC,CAAC,CACJ,CAAA;AAED,MAAM,CAAC,MAAM,UAAU,GAAG,CAAU,GAAW,EAA+C,EAAE;IAC9F,MAAM,KAAK,GAAG,gBAAgB,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,CAAA;IAChE,MAAM,UAAU,GAAG,gBAAgB,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,UAAU,CAAC,CAAA;IAChE,OAAO,CAAC,KAAK,EAAE,CAAC,QAAW,EAAE,EAAE,CAAC,UAAU,CAAC,GAAG,EAAE,QAAQ,CAAC,CAAC,CAAA;AAC5D,CAAC,CAAA","sourcesContent":["import {getTimeZone} from \"react-native-localize\"\nimport {AsyncResult, result as Res, Result} from \"typesafe-ts\"\nimport {create} from \"zustand\"\nimport {subscribeWithSelector} from \"zustand/middleware\"\n\nimport {storage} from \"../utils/storage\"\nimport {getBluetoothSettingKeysForDevice} from \"./bluetoothSettingKeys\"\nimport {useGlassesStore} from \"./glasses\"\n\nexport {MENTRA_LIVE_SETTING_KEYS, getBluetoothSettingKeysForDevice} from \"./bluetoothSettingKeys\"\n\nexport interface Setting {\n key: string\n defaultValue: () => any\n writable: boolean\n saveOnServer: boolean\n // change the key to a different key based on the indexer\n // NEVER do any network calls in the indexer (or performance will suffer greatly\n indexer?: (key: string) => string\n // optionally override the value of the setting when it's accessed\n override?: () => any\n // onWrite?: () => void\n persist: boolean\n // Pairing-identity keys are NATIVE-authoritative: the native layer writes\n // them on pairing success (handleDeviceReady) / forget and echoes them down\n // via save_setting; JS鈫抧ative they travel only in the explicit SEEDS\n // (hydration, pre-connect, post-demotion, abandon re-seed) — never the\n // change-push and never the on-connect replay, whose mid-relay snapshot can\n // overwrite a just-promoted identity. PAIRING_IDENTITY_KEYS is derived from\n // this flag so the sync exclusions can't drift from the descriptors.\n nativeAuthoritative?: true\n /**\n * Clear this setting when the build's environment changes.\n *\n * A persisted override normally outranks both the build's env and the\n * compiled default, which is right within one environment: a developer's\n * METRO_AUTO pin should survive a rebuild. It is wrong across environments,\n * where an override pinned under a dev build would silently follow the\n * install onto a store build pointed at production.\n *\n * Note this keys off the build's environment label, so it does NOT fire on a\n * TestFlight to App Store promotion: that ships the same binary with the same\n * label. Promotion is safe because the publishing lane bakes prod URLs, not\n * because this reset runs. See the resolution block in loadSettings.\n *\n * Absent means the value is never invalidated automatically.\n */\n resetOnBuildEnvChange?: true\n}\n\nexport const SETTINGS: Record<string, Setting> = {\n // feature flags / mantle settings:\n dev_mode: {key: \"dev_mode\", defaultValue: () => __DEV__, writable: true, saveOnServer: true, persist: true}, // deprecated\n debug_mode: {key: \"debug_mode\", defaultValue: () => __DEV__, writable: true, saveOnServer: true, persist: true},\n android_notification_listener_enabled: {\n key: \"android_notification_listener_enabled\",\n // Operational kill switch. The listener now runs in a guarded lightweight\n // process, so normal installs can safely capture notifications by default.\n defaultValue: () => true,\n writable: true,\n saveOnServer: true,\n persist: true,\n },\n super_mode: {key: \"super_mode\", defaultValue: () => false, writable: true, saveOnServer: true, persist: true},\n appearance_menu_enabled: {\n key: \"appearance_menu_enabled\",\n defaultValue: () => false,\n writable: true,\n saveOnServer: true,\n persist: true,\n },\n app_boot_extra_info: {\n key: \"app_boot_extra_info\",\n defaultValue: () => false,\n writable: true,\n saveOnServer: true,\n persist: true,\n },\n miniapp_dev_mode: {\n key: \"miniapp_dev_mode\",\n defaultValue: () => false,\n writable: true,\n saveOnServer: true,\n persist: true,\n },\n enable_squircles: {\n key: \"enable_squircles\",\n defaultValue: () => true,\n writable: true,\n saveOnServer: true,\n persist: true,\n },\n android_blur: {\n key: \"android_blur\",\n defaultValue: () => {\n return false\n },\n writable: true,\n saveOnServer: true,\n persist: true,\n },\n android_inner_shadow: {\n key: \"android_inner_shadow\",\n defaultValue: () => {\n return false\n },\n writable: true,\n saveOnServer: true,\n persist: true,\n },\n ios_glass_effect: {\n key: \"ios_glass_effect\",\n defaultValue: () => true,\n writable: true,\n saveOnServer: true,\n persist: true,\n },\n ios_app_switcher_bottom_swipe: {\n key: \"ios_app_switcher_bottom_swipe\",\n defaultValue: () => false,\n writable: true,\n saveOnServer: true,\n persist: true,\n },\n debug_console: {\n key: \"debug_console\",\n defaultValue: () => false,\n writable: true,\n saveOnServer: true,\n persist: true,\n },\n debug_navigation_history: {\n key: \"debug_navigation_history\",\n defaultValue: () => false,\n writable: true,\n saveOnServer: true,\n persist: true,\n },\n debug_core_status_bar: {\n key: \"debug_core_status_bar\",\n defaultValue: () => false,\n writable: true,\n saveOnServer: true,\n persist: true,\n },\n // Mentra Nex feature flags (off by default; toggled from Nex Developer Settings).\n // When on, the Nex display skips ASCII-only text sanitization so CJK/Chinese\n // captions render on glasses. Synced to the Bluetooth SDK via BLUETOOTH_SETTING_KEYS.\n nex_chinese_captions: {\n key: \"nex_chinese_captions\",\n defaultValue: () => false,\n writable: true,\n saveOnServer: true,\n persist: true,\n },\n // When on, LC3 audio received from Nex glasses is played back (Android only).\n // Local-only dev toggle: defaults off and never synced to the cloud account\n // (saveOnServer: false); persists locally so it survives app restarts.\n // Key renamed from the legacy `nex_audio_playback` so stale server/local\n // values (saved back when this was saveOnServer:true) can't re-enable it.\n nex_lc3_audio_playback: {\n key: \"nex_lc3_audio_playback\",\n defaultValue: () => false,\n writable: true,\n saveOnServer: false,\n persist: true,\n },\n china_deployment: {\n key: \"china_deployment\",\n defaultValue: () => (process.env.EXPO_PUBLIC_DEPLOYMENT_REGION === \"china\" ? true : false),\n override: () => (process.env.EXPO_PUBLIC_DEPLOYMENT_REGION === \"china\" ? true : false),\n writable: false,\n saveOnServer: false,\n persist: true,\n },\n // Cloud V2 endpoint OVERRIDES. Empty = no override; cloudClient's resolveUrl\n // owns the full precedence (override -> env -> Metro-derived dev default).\n // The value may be an explicit URL or the METRO_AUTO sentinel (\"my dev\n // laptop\", resolved live from Metro so it survives network changes). Never\n // bake an env var or a personal LAN IP into the default here: that makes the\n // override branch always-truthy and strands devs on a stale address.\n cloud_core_url: {\n key: \"cloud_core_url\",\n defaultValue: () => \"\",\n writable: true,\n saveOnServer: false,\n persist: true,\n resetOnBuildEnvChange: true,\n },\n cloud_runtime_url: {\n key: \"cloud_runtime_url\",\n defaultValue: () => \"\",\n writable: true,\n saveOnServer: false,\n persist: true,\n resetOnBuildEnvChange: true,\n },\n // Bookmarked Cloud V2 endpoint pairs. Each entry is {label, coreUrl,\n // runtimeUrl} — core + runtime are saved together because they are always\n // applied as a matched set (presets fill both; Save & Test verifies both).\n saved_cloud_url_pairs: {\n key: \"saved_cloud_url_pairs\",\n defaultValue: () => [],\n writable: true,\n saveOnServer: false,\n persist: true,\n },\n // Developer override for the ASG OTA manifest URL. null/empty = no override;\n // the normal selection applies (legacy-glasses gate, EXPO_PUBLIC_ASG_OTA_VERSION_URL,\n // glasses-reported URL, then production). See resolveOtaManifestUrl.\n ota_version_url: {\n key: \"ota_version_url\",\n defaultValue: () => null,\n writable: true,\n saveOnServer: false,\n persist: true,\n },\n saved_ota_version_urls: {\n key: \"saved_ota_version_urls\",\n defaultValue: () => [],\n writable: true,\n saveOnServer: false,\n persist: true,\n },\n reconnect_on_app_foreground: {\n key: \"reconnect_on_app_foreground\",\n defaultValue: () => true,\n writable: true,\n saveOnServer: true,\n persist: true,\n },\n location_tier: {key: \"location_tier\", defaultValue: () => \"\", writable: true, saveOnServer: true, persist: true},\n // Volatile bearer synced to Bluetooth for glasses-side Cloud V2 calls. The\n // key name is kept for BLE compatibility, but the value must never be loaded\n // from or saved to the legacy Cloud V1 settings store.\n core_token: {key: \"core_token\", defaultValue: () => \"\", writable: true, saveOnServer: false, persist: false},\n auth_email: {key: \"auth_email\", defaultValue: () => \"\", writable: true, saveOnServer: false, persist: true},\n // Pairing identity is per-phone, not per-account: two phones on one account\n // can be paired to different glasses, so none of these keys may sync to the\n // server (saveOnServer: false — a stale server copy resurrecting a local\n // pairing identity is exactly the desync this group's flags prevent).\n //\n // Two-phase identity: pending_wearable is the model the user last STARTED\n // pairing (written at selection, rendered as a finish-pairing card);\n // default_wearable + device_name + device_address are only promoted by the\n // native layer when pairing actually succeeds (handleDeviceReady).\n // pending_wearable persists so an abandoned selection still shows its\n // finish-pairing card after an app restart.\n pending_wearable: {\n key: \"pending_wearable\",\n defaultValue: () => \"\",\n writable: true,\n saveOnServer: false,\n persist: true,\n nativeAuthoritative: true,\n },\n default_wearable: {\n key: \"default_wearable\",\n defaultValue: () => \"\",\n writable: true,\n saveOnServer: false,\n persist: true,\n nativeAuthoritative: true,\n },\n device_name: {\n key: \"device_name\",\n defaultValue: () => \"\",\n writable: true,\n saveOnServer: false,\n persist: true,\n nativeAuthoritative: true,\n },\n device_address: {\n key: \"device_address\",\n defaultValue: () => \"\",\n writable: true,\n saveOnServer: false,\n persist: true,\n nativeAuthoritative: true,\n },\n project_name: {\n key: \"project_name\",\n defaultValue: () => \"\",\n writable: true,\n saveOnServer: false,\n persist: true,\n nativeAuthoritative: true,\n },\n default_controller: {\n key: \"default_controller\",\n defaultValue: () => \"\",\n writable: true,\n saveOnServer: false,\n persist: true,\n nativeAuthoritative: true,\n },\n pending_controller: {\n key: \"pending_controller\",\n defaultValue: () => \"\",\n writable: true,\n saveOnServer: false,\n persist: true,\n nativeAuthoritative: true,\n },\n controller_device_name: {\n key: \"controller_device_name\",\n defaultValue: () => \"\",\n writable: true,\n saveOnServer: false,\n persist: true,\n nativeAuthoritative: true,\n },\n controller_address: {\n key: \"controller_address\",\n defaultValue: () => \"\",\n writable: true,\n saveOnServer: false,\n persist: true,\n nativeAuthoritative: true,\n },\n // ui state:\n home_background: {\n key: \"home_background\",\n defaultValue: () => \"\",\n writable: true,\n saveOnServer: false,\n persist: true,\n },\n theme_preference: {\n key: \"theme_preference\",\n defaultValue: () => \"light\",\n // Force light mode - i mode is not complete yet\n // override: () => \"light\",\n writable: true,\n saveOnServer: true,\n persist: true,\n },\n enable_phone_notifications: {\n key: \"enable_phone_notifications\",\n defaultValue: () => false,\n writable: true,\n saveOnServer: true,\n persist: true,\n },\n settings_access_count: {\n key: \"settings_access_count\",\n defaultValue: () => 0,\n writable: true,\n saveOnServer: true,\n persist: true,\n },\n show_advanced_settings: {\n key: \"show_advanced_settings\",\n defaultValue: () => false,\n writable: true,\n saveOnServer: false,\n persist: true,\n },\n onboarding_completed: {\n key: \"onboarding_completed\",\n defaultValue: () => false,\n writable: true,\n saveOnServer: true,\n persist: true,\n },\n onboarding_live_completed: {\n key: \"onboarding_live_completed\",\n defaultValue: () => false,\n writable: true,\n saveOnServer: true,\n persist: true,\n },\n onboarding_os_completed: {\n key: \"onboarding_os_completed\",\n defaultValue: () => false,\n writable: true,\n saveOnServer: true,\n persist: true,\n },\n has_ever_activated_app: {\n key: \"has_ever_activated_app\",\n defaultValue: () => false,\n writable: true,\n saveOnServer: true,\n persist: true,\n },\n\n // Bluetooth SDK settings:\n sensing_enabled: {\n key: \"sensing_enabled\",\n defaultValue: () => true,\n writable: true,\n saveOnServer: true,\n persist: true,\n },\n power_saving_mode: {\n key: \"power_saving_mode\",\n defaultValue: () => false,\n writable: true,\n saveOnServer: true,\n persist: true,\n },\n // The Mentra App intentionally preserves Mentra Live's historical VAD-on\n // product default. Standalone public Bluetooth SDK hosts default VAD off so\n // their microphone audio remains continuous.\n voice_activity_detection_enabled: {\n key: \"voice_activity_detection_enabled\",\n defaultValue: () => true,\n writable: true,\n saveOnServer: true,\n persist: true,\n },\n // Mentra Live center-mic loudness / \"Barrier\" gate (cs_swit type 10). Default on.\n loudness_gate_enabled: {\n key: \"loudness_gate_enabled\",\n defaultValue: () => true,\n writable: true,\n saveOnServer: true,\n persist: true,\n },\n always_on_status_bar: {\n key: \"always_on_status_bar\",\n defaultValue: () => false,\n writable: true,\n saveOnServer: true,\n persist: true,\n },\n // Legacy cloud/mobile setting name. Locally it maps to glasses-side Voice Activity Detection.\n bypass_vad_for_debugging: {\n key: \"bypass_vad_for_debugging\",\n defaultValue: () => false,\n writable: true,\n saveOnServer: true,\n persist: true,\n },\n bypass_audio_encoding_for_debugging: {\n key: \"bypass_audio_encoding_for_debugging\",\n defaultValue: () => false,\n writable: true,\n saveOnServer: true,\n persist: true,\n },\n metric_system: {\n key: \"metric_system\",\n defaultValue: () => false,\n writable: true,\n saveOnServer: true,\n persist: true,\n },\n twelve_hour_time: {\n key: \"twelve_hour_time\",\n defaultValue: () => true,\n writable: true,\n saveOnServer: true,\n persist: true,\n },\n enforce_local_transcription: {\n key: \"enforce_local_transcription\",\n defaultValue: () => false,\n writable: true,\n saveOnServer: true,\n persist: true,\n },\n // LC3 audio quality setting (frame size in bytes)\n // 20 = 16kbps (low bandwidth), 40 = 32kbps (balanced), 60 = 48kbps (high quality)\n lc3_frame_size: {\n key: \"lc3_frame_size\",\n defaultValue: () => 60,\n writable: true,\n saveOnServer: false,\n persist: true,\n },\n preferred_mic: {\n key: \"preferred_mic\",\n defaultValue: () => \"auto\",\n writable: true,\n indexer: (key: string) => {\n const glasses = useSettingsStore.getState().getSetting(SETTINGS.default_wearable.key)\n if (glasses) {\n return `${key}:${glasses}`\n }\n return key\n },\n saveOnServer: true,\n persist: true,\n },\n screen_disabled: {\n key: \"screen_disabled\",\n defaultValue: () => false,\n writable: true,\n saveOnServer: false,\n persist: true,\n },\n // glasses settings:\n contextual_dashboard: {\n key: \"contextual_dashboard\",\n defaultValue: () => true,\n writable: true,\n saveOnServer: true,\n persist: true,\n },\n use_native_dashboard: {\n key: \"use_native_dashboard\",\n defaultValue: () => true,\n writable: true,\n saveOnServer: true,\n persist: true,\n },\n head_up_angle: {key: \"head_up_angle\", defaultValue: () => 45, writable: true, saveOnServer: true, persist: true},\n brightness: {key: \"brightness\", defaultValue: () => 50, writable: true, saveOnServer: true, persist: true},\n auto_brightness: {\n key: \"auto_brightness\",\n defaultValue: () => true,\n writable: true,\n saveOnServer: true,\n persist: true,\n },\n dashboard_height: {\n key: \"dashboard_height\",\n defaultValue: () => 4,\n writable: true,\n saveOnServer: true,\n persist: true,\n },\n dashboard_depth: {\n key: \"dashboard_depth\",\n defaultValue: () => 2,\n writable: true,\n saveOnServer: true,\n persist: true,\n },\n menu_apps: {\n key: \"menu_apps\",\n defaultValue: () => null,\n writable: true,\n saveOnServer: true,\n persist: true,\n },\n calendar_events: {\n key: \"calendar_events\",\n defaultValue: () => [],\n writable: true,\n saveOnServer: false,\n persist: false,\n },\n // button settings\n // Legacy persisted/cloud key; hardware behavior is now controlled by gallery_mode plus capture settings.\n button_mode: {key: \"button_mode\", defaultValue: () => \"photo\", writable: true, saveOnServer: true, persist: true},\n button_photo_size: {\n key: \"button_photo_size\",\n defaultValue: () => \"max\",\n writable: true,\n saveOnServer: true,\n persist: true,\n },\n button_video_settings: {\n key: \"button_video_settings\",\n defaultValue: () => ({width: 1920, height: 1080, fps: 30}),\n writable: true,\n saveOnServer: true,\n persist: true,\n },\n button_max_recording_time: {\n key: \"button_max_recording_time\",\n defaultValue: () => 10,\n writable: true,\n saveOnServer: true,\n persist: true,\n },\n camera_fov: {\n key: \"camera_fov\",\n defaultValue: () => ({fov: 118, roi_position: 0}),\n writable: true,\n saveOnServer: true,\n persist: true,\n },\n media_post_processing: {\n key: \"media_post_processing\",\n defaultValue: () => false,\n writable: true,\n saveOnServer: true,\n persist: true,\n },\n\n // time zone settings\n time_zone: {\n key: \"time_zone\",\n defaultValue: () => \"\",\n writable: true,\n override: () => {\n const override = useSettingsStore.getState().getSetting(SETTINGS.time_zone_override.key)\n if (override) {\n return override\n }\n return getTimeZone()\n },\n saveOnServer: true,\n persist: true,\n },\n time_zone_override: {\n key: \"time_zone_override\",\n defaultValue: () => \"\",\n writable: true,\n saveOnServer: true,\n persist: true,\n },\n // offline applets\n offline_mode: {key: \"offline_mode\", defaultValue: () => false, writable: true, saveOnServer: true, persist: true},\n // Runtime flag: coordinator flips this on when cloud STT has failed and fallback is active.\n // Native GlassesStore watches it to gate PCM 鈫?Sherpa feeding. Not user-facing.\n local_stt_fallback_active: {\n key: \"local_stt_fallback_active\",\n defaultValue: () => false,\n writable: true,\n saveOnServer: false,\n persist: false,\n },\n gallery_mode: {key: \"gallery_mode\", defaultValue: () => true, writable: true, saveOnServer: true, persist: true},\n gallery_sync_explained: {\n key: \"gallery_sync_explained\",\n defaultValue: () => false,\n writable: true,\n saveOnServer: false,\n persist: true,\n },\n offline_camera_running: {\n key: \"offline_camera_running\",\n defaultValue: () => false,\n writable: true,\n saveOnServer: false,\n persist: true,\n },\n // offline translation\n offline_translation_running: {\n key: \"offline_translation_running\",\n defaultValue: () => false,\n writable: true,\n saveOnServer: true,\n persist: true,\n },\n offline_translation_source: {\n key: \"offline_translation_source\",\n defaultValue: () => \"en\",\n writable: true,\n saveOnServer: true,\n persist: true,\n },\n offline_translation_target: {\n key: \"offline_translation_target\",\n defaultValue: () => \"es\",\n writable: true,\n saveOnServer: true,\n persist: true,\n },\n // button action settings\n default_button_action_enabled: {\n key: \"default_button_action_enabled\",\n defaultValue: () => true,\n writable: true,\n saveOnServer: true,\n persist: true,\n },\n default_button_action_app: {\n key: \"default_button_action_app\",\n defaultValue: () => \"com.mentra.camera\",\n writable: true,\n saveOnServer: true,\n persist: true,\n },\n // notifications\n notifications_blocklist: {\n key: \"notifications_blocklist\",\n defaultValue: () => [],\n writable: true,\n saveOnServer: true,\n persist: true,\n },\n // Cached required version from server - used to enforce updates even when offline\n cached_required_version: {\n key: \"cached_required_version\",\n defaultValue: () => \"\",\n writable: true,\n saveOnServer: false,\n persist: true,\n },\n // OTA update dismissal - stores the version code user dismissed (not persisted so resets on app restart)\n dismissed_ota_version: {\n key: \"dismissed_ota_version\",\n defaultValue: () => \"\",\n writable: true,\n saveOnServer: false,\n persist: false,\n },\n // Contact email for feedback (persisted for Apple private relay users)\n contact_email: {\n key: \"contact_email\",\n defaultValue: () => \"\",\n writable: true,\n saveOnServer: false,\n persist: true,\n },\n} as const\n\nexport const OFFLINE_APPLETS: string[] = [\"com.mentra.livecaptions\", \"com.mentra.camera\"]\n\n// These settings are automatically synced to the Bluetooth SDK.\n// Keep this list hardware-facing; app/UI/cloud-only preferences should stay in JS/Crust.\nexport const BLUETOOTH_SETTING_KEYS: string[] = [\n // Bluetooth settings:\n SETTINGS.sensing_enabled.key,\n SETTINGS.power_saving_mode.key,\n SETTINGS.voice_activity_detection_enabled.key,\n SETTINGS.loudness_gate_enabled.key,\n SETTINGS.lc3_frame_size.key,\n SETTINGS.preferred_mic.key,\n SETTINGS.screen_disabled.key,\n SETTINGS.auth_email.key,\n SETTINGS.core_token.key,\n // glasses settings:\n SETTINGS.contextual_dashboard.key,\n SETTINGS.head_up_angle.key,\n SETTINGS.brightness.key,\n SETTINGS.auto_brightness.key,\n SETTINGS.dashboard_height.key,\n SETTINGS.dashboard_depth.key,\n SETTINGS.menu_apps.key,\n SETTINGS.calendar_events.key,\n SETTINGS.use_native_dashboard.key,\n SETTINGS.twelve_hour_time.key,\n SETTINGS.metric_system.key,\n // button:\n SETTINGS.button_photo_size.key,\n // Legacy MentraLive native code reads the object form when syncing video settings.\n SETTINGS.button_video_settings.key,\n SETTINGS.button_max_recording_time.key,\n SETTINGS.camera_fov.key,\n // device / pairing:\n SETTINGS.pending_wearable.key,\n SETTINGS.default_wearable.key,\n SETTINGS.device_name.key,\n SETTINGS.device_address.key,\n SETTINGS.project_name.key,\n SETTINGS.default_controller.key,\n SETTINGS.pending_controller.key,\n SETTINGS.controller_device_name.key,\n SETTINGS.controller_address.key,\n // offline applets:\n SETTINGS.offline_mode.key,\n // Runtime flag flipped by LocalSttFallbackCoordinator. Native reads it from\n // GlassesStore to gate PCM 鈫?Sherpa feeding in handlePcm and to keep the\n // mic on while local STT is the active engine.\n SETTINGS.local_stt_fallback_active.key,\n SETTINGS.gallery_mode.key,\n // Mentra Nex feature flags:\n SETTINGS.nex_chinese_captions.key,\n SETTINGS.nex_lc3_audio_playback.key,\n]\n\n// Pairing identity is NATIVE-authoritative: the native layer writes it on\n// pairing success (handleDeviceReady) / forget and echoes it down via\n// save_setting; JS persists those echoes. JS鈫抧ative, identity travels ONLY in\n// the explicit full seeds (device-store hydration, pre-connect push,\n// post-demotion re-push) — never in the change-push subscription. Relaying an\n// echoed identity change back up would make the sync bidirectional with loop\n// gain 1: two identity values in flight (e.g. a boot demotion crossing a\n// native promotion) then chase each other through push鈫抋pply鈫抏cho鈫抪ush\n// forever, flapping the UI.\n//\n// Derived from the `nativeAuthoritative` descriptor flag (not maintained as a\n// parallel list) so the change-push exclusion in GlassesSettingsSync can't\n// drift from the setting declarations.\nexport const PAIRING_IDENTITY_KEYS: string[] = Object.values(SETTINGS)\n .filter((setting) => setting.nativeAuthoritative)\n .map((setting) => setting.key)\n\n// const PER_GLASSES_SETTINGS_KEYS: string[] = [SETTINGS.preferred_mic.key]\n\nexport interface SettingsState {\n // Settings values\n settings: Record<string, any>\n // Loading states\n isInitialized: boolean\n // Actions\n setSetting: (key: string, value: any, updateServer?: boolean) => AsyncResult<void, Error>\n setManyLocally: (settings: Record<string, any>) => AsyncResult<void, Error>\n getSetting: (key: string) => any\n // loadSetting: (key: string) => AsyncResult<void, Error>\n loadAllSettings: () => AsyncResult<void, Error>\n // Utility methods\n getBluetoothSettings: () => Record<string, any>\n resetAllSettingsLocally: () => void\n}\n\nconst getDefaultSettings = () =>\n Object.keys(SETTINGS).reduce(\n (acc, key) => {\n acc[key] = SETTINGS[key].defaultValue()\n return acc\n },\n {} as Record<string, any>,\n )\n\n// Single-flight for loadAllSettings: the host fires it at module load and\n// engine.start()'s device-store hydration awaits it — without the memo the\n// second caller runs a duplicate full disk load while the first is still in\n// flight. Cleared on failure so a later call can retry.\nlet loadAllSettingsInFlight: AsyncResult<void, Error> | null = null\n\nfunction printableSettingValue(key: string, value: unknown): string {\n return key.includes(\"token\") || key.includes(\"email\") ? \"<redacted>\" : JSON.stringify(value)\n}\n\nexport const useSettingsStore = create<SettingsState>()(\n subscribeWithSelector((set, get) => ({\n settings: getDefaultSettings(),\n isInitialized: false,\n loadingKeys: new Set(),\n setSetting: (key: string, value: any, _updateServer = true): AsyncResult<void, Error> => {\n return Res.try_async(async () => {\n const setting = SETTINGS[key]\n const originalKey = key\n\n if (!setting) {\n throw new Error(`SETTINGS: SET: ${originalKey} is not a valid setting!`)\n }\n\n if (setting.indexer) {\n key = setting.indexer(originalKey)\n }\n\n if (!setting.writable) {\n throw new Error(`SETTINGS: ${originalKey} is not writable!`)\n }\n\n // Update store immediately for optimistic UI\n console.log(`SETTINGS: SET: ${key} = ${printableSettingValue(key, value)}`)\n set((state) => ({\n settings: {...state.settings, [key]: value},\n }))\n\n if (setting.persist) {\n let res = await storage.save(key, value)\n if (res.is_error()) {\n throw new Error(`SETTINGS: couldn't save setting to storage: ${res.error}`)\n }\n\n // Cloud V1 per-change server sync removed with the V1 ripout (issue\n // #3392). Settings are local-first until a V2 sync lands; the\n // saveOnServer flags are retained as intent markers for that work.\n }\n })\n },\n getSetting: (key: string) => {\n const state = get()\n const originalKey = key\n const setting = SETTINGS[originalKey]\n\n if (!setting) {\n console.error(`SETTINGS: GET: ${originalKey} is not a valid setting!`)\n return undefined\n }\n\n if (setting.override) {\n let override = setting.override()\n if (override !== undefined) {\n return override\n }\n }\n\n if (setting.indexer) {\n key = setting.indexer(originalKey)\n }\n\n // console.log(`GET SETTING: ${key} = ${state.settings[key]}`)\n\n try {\n const raw = state.settings[key] ?? SETTINGS[originalKey].defaultValue()\n return raw\n } catch (e) {\n // for dynamically created settings, we need to create a new setting in SETTINGS:\n console.log(`Failed to get setting, creating new setting:(${key}):`, e)\n SETTINGS[key] = {key: key, defaultValue: () => undefined, writable: true, saveOnServer: false, persist: true}\n return SETTINGS[key].defaultValue()\n }\n },\n // batch update many settings from the server:\n setManyLocally: (settings: Record<string, any>): AsyncResult<void, Error> => {\n return Res.try_async(async () => {\n const settingsToLoad: Record<string, any> = {}\n // if a setting should not persist, don't load it:\n for (const [key, value] of Object.entries(settings)) {\n const stg: Setting | undefined = SETTINGS[key.toLowerCase()]\n if (!stg) {\n continue\n }\n if (!stg.persist) {\n continue\n }\n settingsToLoad[key.toLowerCase()] = value\n }\n // console.log(\"SETTINGS: SET MANY LOCALLY: \", settingsToLoad)\n\n set((state) => ({\n settings: {...state.settings, ...settingsToLoad},\n }))\n\n // save to storage:\n await Promise.all(Object.entries(settingsToLoad).map(([key, value]) => storage.save(key, value)))\n })\n },\n // loads any preferences that have been changed from the default and saved to DISK!\n loadAllSettings: (): AsyncResult<void, Error> => {\n console.log(\"SETTINGS: loadAllSettings()\")\n if (loadAllSettingsInFlight) {\n return loadAllSettingsInFlight\n }\n const inFlight = Res.try_async(async () => {\n const state = get()\n let loadedSettings: Record<string, any> = {}\n\n if (state.isInitialized) {\n return undefined\n }\n\n for (const setting of Object.values(SETTINGS)) {\n // if the settings should not persist, don't load it:\n if (!setting.persist) {\n continue\n }\n\n // load all subkeys for an indexed setting:\n if (setting?.indexer) {\n console.log(`SETTINGS: LOAD: ${setting.key} with indexer!`)\n\n let res: Result<Record<string, unknown>, Error> = storage.loadSubKeys(setting.key)\n if (res.is_error()) {\n console.log(`SETTINGS: LOAD: ${setting.key}`, res.error)\n continue\n }\n\n let subKeys: Record<string, unknown> = res.value\n console.log(`SETTINGS: LOAD: ${setting.key} subkeys are set!`, subKeys)\n loadedSettings = {...loadedSettings, ...subKeys}\n continue\n }\n\n let res = storage.load<any>(setting.key)\n if (res.is_error()) {\n console.log(`SETTINGS: LOAD: ${setting.key} is not set!`, res.error)\n // this setting isn't set from the default, so we don't load anything\n continue\n }\n // normal key:value pair:\n let value = res.value\n // res.value IS the stored value; logging value.value printed\n // \"undefined\" for every loaded setting and disguised present\n // values as missing. Redact token- and email-bearing keys: console\n // logs are uploaded in bug-report artifacts (same keys\n // diagnosticContext's SENSITIVE_SETTINGS_KEYS strips, minus an\n // import that would cycle stores <-> utils).\n console.log(`SETTINGS: LOAD: ${setting.key} = ${printableSettingValue(setting.key, value)}`)\n loadedSettings[setting.key] = value\n }\n\n // console.log(\"##############################################\")\n // console.log(loadedSettings)\n // console.log(\"##############################################\")\n\n set((state) => ({\n isInitialized: true,\n settings: {...state.settings, ...loadedSettings},\n }))\n\n // This hidden debug switch originally shipped default-off while the\n // notification-listener cold-start ANR was being investigated. Now\n // that the listener runs in its own guarded process, migrate existing\n // installs to the new default once; later explicit debug changes still\n // persist normally.\n // Reset the cloud backend override when the build's environment changes.\n //\n // cloud_core_url / cloud_runtime_url are persist:true and outrank both\n // the build's env and the compiled default (see resolveUrl in\n // cloudClient.ts). That is what we want inside one environment: a\n // developer's METRO_AUTO pin should survive a rebuild. It is wrong\n // across environments.\n //\n // The concrete case is an install that moves BETWEEN environments: an\n // internal tester running a dev build with a pinned override who then\n // installs the store build. The override outranks that build's prod\n // URLs, so without this they keep talking to dev with nothing\n // surfacing it.\n //\n // Note what this deliberately does NOT do, because the distinction is\n // easy to get backwards. TestFlight and the App Store receive the SAME\n // binary, so promotion does not change EXPO_PUBLIC_BUILD_ENV and this\n // reset never fires on it. Promotion is safe for a different reason:\n // the publishing lane bakes prod URLs (staging-builds.yml defaults\n // cloud_env to prod), so a promoted build was pointed at production the\n // whole time. The same holds for Android internal-track to production.\n //\n // The residual gap is therefore an override pinned while already on a\n // prod-labelled build, which no label comparison can see. That is a\n // deliberate limit: reaching it means typing a URL into a dev-only\n // screen, VersionInfo renders the current value, and the same screen\n // clears it.\n //\n // Comparing the baked EXPO_PUBLIC_BUILD_ENV against the last one seen\n // on this device covers those environment switches and fresh installs\n // without touching the setting write path. A reinstall needs no\n // handling: it drops the marker and the override together\n // (android:allowBackup=\"false\", and iOS deletes the container).\n const BUILD_ENV_KEY = \"settings.lastBuildEnv\"\n const buildEnv = (process.env.EXPO_PUBLIC_BUILD_ENV ?? \"dev\").trim() || \"dev\"\n const lastBuildEnv = storage.load<string>(BUILD_ENV_KEY)\n const previousBuildEnv = lastBuildEnv.is_error() ? undefined : lastBuildEnv.value\n if (previousBuildEnv !== buildEnv) {\n // Clear when there is no marker yet, not just on a recorded change.\n // The first build carrying this code meets every existing install\n // with previousBuildEnv === undefined, and those are exactly the\n // installs that may hold an override set before the pin existed --\n // the population this is here to repair. Treating \"no marker\" as a\n // fresh install would record the marker and never look again. A\n // genuinely fresh install has nothing persisted, so the clear below\n // writes each default over itself and costs nothing.\n //\n // Driven by the descriptors rather than a hardcoded key list, so a\n // setting that needs this behaviour declares it in one place and\n // cannot be missed here.\n const scoped = Object.values(SETTINGS).filter((setting) => setting.resetOnBuildEnvChange)\n console.log(\n `SETTINGS: build env ${previousBuildEnv ?? \"(none recorded)\"} -> ${buildEnv}, ` +\n `clearing ${scoped.length} build-scoped setting(s)`,\n )\n let allCleared = true\n for (const setting of scoped) {\n const cleared = await get().setSetting(setting.key, setting.defaultValue(), false)\n if (cleared.is_error()) {\n allCleared = false\n console.log(`SETTINGS: could not clear ${setting.key}:`, cleared.error)\n }\n }\n // Advance the marker only once the reset actually landed. Recording\n // it after a failed write would retire the retry and leave the stale\n // override for the life of the install; leaving it unset costs one\n // repeated attempt per launch until a write succeeds.\n if (allCleared) {\n storage.save(BUILD_ENV_KEY, buildEnv)\n }\n }\n\n const NOTIFICATION_LISTENER_MIGRATION_KEY = \"migration:android_notification_listener_default_on_v1\"\n const notificationListenerMigrationDone = storage.load<boolean>(NOTIFICATION_LISTENER_MIGRATION_KEY)\n if (notificationListenerMigrationDone.is_error() || !notificationListenerMigrationDone.value) {\n const result = await get().setSetting(SETTINGS.android_notification_listener_enabled.key, true, false)\n if (result.is_error()) {\n console.log(\"SETTINGS: notification listener migration failed:\", result.error)\n } else {\n storage.save(NOTIFICATION_LISTENER_MIGRATION_KEY, true)\n }\n }\n\n // One-time migration: force android_blur=false for existing users.\n // The setting's default is already false; this migration covers users\n // who explicitly opted into Android blur effects before we discovered\n // they're a major source of frame drops on cheap Android phones.\n // The dimezisBlurViewSdk31Plus blur each costs ~5-10ms/frame; with\n // multiple blurs on home (top fade + AppSwitcherButton x2) a low-end\n // device misses the 16ms budget consistently. Users can turn it back\n // on under Settings 鈫?Appearance once we've optimized further.\n //\n // The setSetting call also pushes to the server (saveOnServer: true)\n // so the server-stored value flips too — otherwise the next sync\n // from the user's server-stored prefs would re-enable blur.\n // Best-effort: a server failure (offline, 5xx) shouldn't block boot;\n // we still mark the migration done locally so we don't loop.\n const MIGRATION_KEY = \"migration:android_blur_default_false_v1\"\n const migrationDone = storage.load<boolean>(MIGRATION_KEY)\n if (migrationDone.is_error() || !migrationDone.value) {\n const current = get().getSetting(SETTINGS.android_blur.key)\n if (current === true) {\n const result = await get().setSetting(SETTINGS.android_blur.key, false, true)\n if (result.is_error()) {\n // Server push failed (offline / 5xx). Local storage was still\n // updated, so the user immediately gets the new behavior. The\n // server-side stale `true` will be overwritten the next time\n // the user opens Appearance settings and the auto-sync runs.\n console.log(\"SETTINGS: android_blur migration server-push failed:\", result.error)\n }\n }\n // Mark done unconditionally — even on server-push failure we don't\n // want to retry the migration on every boot. The local value is\n // already correct.\n storage.save(MIGRATION_KEY, true)\n }\n\n // The old camera default cropped the sensor to 102掳. Move existing\n // default-shaped values to the full 118掳 sensor once; named miniapp\n // requests for the 102掳 \"standard\" preset remain available.\n const CAMERA_FOV_MIGRATION_KEY = \"migration:camera_fov_full_sensor_v1\"\n const cameraFovMigrationDone = storage.load<boolean>(CAMERA_FOV_MIGRATION_KEY)\n if (cameraFovMigrationDone.is_error() || !cameraFovMigrationDone.value) {\n const current = get().getSetting(SETTINGS.camera_fov.key) as {fov?: number; roi_position?: number} | undefined\n let migrationSucceeded = true\n if (current?.fov === 102 && (current.roi_position ?? 0) === 0) {\n const result = await get().setSetting(SETTINGS.camera_fov.key, {fov: 118, roi_position: 0}, true)\n if (result.is_error()) {\n console.log(\"SETTINGS: camera FOV migration failed:\", result.error)\n migrationSucceeded = false\n }\n }\n // Unlike the blur migration above, a failed camera set may leave the\n // local value unchanged. Only mark this migration complete once the\n // desired value was applied so a transient failure retries on boot.\n if (migrationSucceeded) storage.save(CAMERA_FOV_MIGRATION_KEY, true)\n }\n })\n loadAllSettingsInFlight = inFlight\n void Promise.resolve(inFlight).then((result) => {\n if (result.is_error()) {\n loadAllSettingsInFlight = null\n }\n })\n return inFlight\n },\n getBluetoothSettings: () => {\n const state = get()\n // Device-model-filtered key set (wire v2): Mentra Live (no display) gets\n // the reduced MENTRA_LIVE_SETTING_KEYS; display glasses get the full set.\n const deviceModel = useGlassesStore.getState().deviceModel || state.getSetting(SETTINGS.default_wearable.key)\n const keys = getBluetoothSettingKeysForDevice(deviceModel, BLUETOOTH_SETTING_KEYS)\n const bluetoothSettings: Record<string, any> = {}\n for (const key of keys) {\n const value = state.getSetting(key)\n if (key === SETTINGS.core_token.key && (typeof value !== \"string\" || value.trim().length === 0)) {\n continue\n }\n bluetoothSettings[key] = value\n }\n return bluetoothSettings\n },\n resetAllSettingsLocally: () => {\n set((_state) => ({\n settings: getDefaultSettings(),\n isInitialized: true,\n }))\n },\n })),\n)\n\nexport const useSetting = <T = any>(key: string): [T, (value: T) => AsyncResult<void, Error>] => {\n const value = useSettingsStore((state) => state.getSetting(key))\n const setSetting = useSettingsStore((state) => state.setSetting)\n return [value, (newValue: T) => setSetting(key, newValue)]\n}\n"]}
|
|
1
|
+
{"version":3,"file":"settings.js","sourceRoot":"","sources":["../../src/stores/settings.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,WAAW,EAAC,MAAM,uBAAuB,CAAA;AACjD,OAAO,EAAc,MAAM,IAAI,GAAG,EAAS,MAAM,aAAa,CAAA;AAC9D,OAAO,EAAC,MAAM,EAAC,MAAM,SAAS,CAAA;AAC9B,OAAO,EAAC,qBAAqB,EAAC,MAAM,oBAAoB,CAAA;AAExD,OAAO,EAAC,OAAO,EAAC,MAAM,kBAAkB,CAAA;AACxC,OAAO,EAAC,gCAAgC,EAAC,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,MAAM,KAAK,GAAG,KAAK,CAAC,UAAU,CAAC,GAAG,CAAC,CAAA;YACnC,IAAI,GAAG,KAAK,QAAQ,CAAC,UAAU,CAAC,GAAG,IAAI,CAAC,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,CAAC,IAAI,EAAE,CAAC,MAAM,KAAK,CAAC,CAAC,EAAE,CAAC;gBAChG,SAAQ;YACV,CAAC;YACD,iBAAiB,CAAC,GAAG,CAAC,GAAG,KAAK,CAAA;QAChC,CAAC;QACD,OAAO,iBAAiB,CAAA;IAC1B,CAAC;IACD,uBAAuB,EAAE,GAAG,EAAE;QAC5B,GAAG,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC;YACf,QAAQ,EAAE,kBAAkB,EAAE;YAC9B,aAAa,EAAE,IAAI;SACpB,CAAC,CAAC,CAAA;IACL,CAAC;CACF,CAAC,CAAC,CACJ,CAAA;AAED,MAAM,CAAC,MAAM,UAAU,GAAG,CAAU,GAAW,EAA+C,EAAE;IAC9F,MAAM,KAAK,GAAG,gBAAgB,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,CAAA;IAChE,MAAM,UAAU,GAAG,gBAAgB,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,UAAU,CAAC,CAAA;IAChE,OAAO,CAAC,KAAK,EAAE,CAAC,QAAW,EAAE,EAAE,CAAC,UAAU,CAAC,GAAG,EAAE,QAAQ,CAAC,CAAC,CAAA;AAC5D,CAAC,CAAA","sourcesContent":["import {getTimeZone} from \"react-native-localize\"\nimport {AsyncResult, result as Res, Result} from \"typesafe-ts\"\nimport {create} from \"zustand\"\nimport {subscribeWithSelector} from \"zustand/middleware\"\n\nimport {storage} from \"../utils/storage\"\nimport {getBluetoothSettingKeysForDevice} from \"./bluetoothSettingKeys\"\nimport {useGlassesStore} from \"./glasses\"\n\nexport {MENTRA_LIVE_SETTING_KEYS, getBluetoothSettingKeysForDevice} from \"./bluetoothSettingKeys\"\n\nexport interface Setting {\n key: string\n defaultValue: () => any\n writable: boolean\n saveOnServer: boolean\n // change the key to a different key based on the indexer\n // NEVER do any network calls in the indexer (or performance will suffer greatly\n indexer?: (key: string) => string\n // optionally override the value of the setting when it's accessed\n override?: () => any\n // onWrite?: () => void\n persist: boolean\n // Pairing-identity keys are NATIVE-authoritative: the native layer writes\n // them on pairing success (handleDeviceReady) / forget and echoes them down\n // via save_setting; JS鈫抧ative they travel only in the explicit SEEDS\n // (hydration, pre-connect, post-demotion, abandon re-seed) — never the\n // change-push and never the on-connect replay, whose mid-relay snapshot can\n // overwrite a just-promoted identity. PAIRING_IDENTITY_KEYS is derived from\n // this flag so the sync exclusions can't drift from the descriptors.\n nativeAuthoritative?: true\n /**\n * Clear this setting when the build's environment changes.\n *\n * A persisted override normally outranks both the build's env and the\n * compiled default, which is right within one environment: a developer's\n * METRO_AUTO pin should survive a rebuild. It is wrong across environments,\n * where an override pinned under a dev build would silently follow the\n * install onto a store build pointed at production.\n *\n * Note this keys off the build's environment label, so it does NOT fire on a\n * TestFlight to App Store promotion: that ships the same binary with the same\n * label. Promotion is safe because the publishing lane bakes prod URLs, not\n * because this reset runs. See the resolution block in loadSettings.\n *\n * Absent means the value is never invalidated automatically.\n */\n resetOnBuildEnvChange?: true\n}\n\nexport const SETTINGS: Record<string, Setting> = {\n // feature flags / mantle settings:\n dev_mode: {key: \"dev_mode\", defaultValue: () => __DEV__, writable: true, saveOnServer: true, persist: true}, // deprecated\n debug_mode: {key: \"debug_mode\", defaultValue: () => __DEV__, writable: true, saveOnServer: true, persist: true},\n android_notification_listener_enabled: {\n key: \"android_notification_listener_enabled\",\n // Operational kill switch. The listener now runs in a guarded lightweight\n // process, so normal installs can safely capture notifications by default.\n defaultValue: () => true,\n writable: true,\n saveOnServer: true,\n persist: true,\n },\n super_mode: {key: \"super_mode\", defaultValue: () => false, writable: true, saveOnServer: true, persist: true},\n appearance_menu_enabled: {\n key: \"appearance_menu_enabled\",\n defaultValue: () => false,\n writable: true,\n saveOnServer: true,\n persist: true,\n },\n app_boot_extra_info: {\n key: \"app_boot_extra_info\",\n defaultValue: () => false,\n writable: true,\n saveOnServer: true,\n persist: true,\n },\n miniapp_dev_mode: {\n key: \"miniapp_dev_mode\",\n defaultValue: () => false,\n writable: true,\n saveOnServer: true,\n persist: true,\n },\n enable_squircles: {\n key: \"enable_squircles\",\n defaultValue: () => true,\n writable: true,\n saveOnServer: true,\n persist: true,\n },\n android_blur: {\n key: \"android_blur\",\n defaultValue: () => {\n return false\n },\n writable: true,\n saveOnServer: true,\n persist: true,\n },\n android_inner_shadow: {\n key: \"android_inner_shadow\",\n defaultValue: () => {\n return false\n },\n writable: true,\n saveOnServer: true,\n persist: true,\n },\n ios_glass_effect: {\n key: \"ios_glass_effect\",\n defaultValue: () => true,\n writable: true,\n saveOnServer: true,\n persist: true,\n },\n ios_app_switcher_bottom_swipe: {\n key: \"ios_app_switcher_bottom_swipe\",\n defaultValue: () => false,\n writable: true,\n saveOnServer: true,\n persist: true,\n },\n debug_console: {\n key: \"debug_console\",\n defaultValue: () => false,\n writable: true,\n saveOnServer: true,\n persist: true,\n },\n debug_navigation_history: {\n key: \"debug_navigation_history\",\n defaultValue: () => false,\n writable: true,\n saveOnServer: true,\n persist: true,\n },\n debug_core_status_bar: {\n key: \"debug_core_status_bar\",\n defaultValue: () => false,\n writable: true,\n saveOnServer: true,\n persist: true,\n },\n // Mentra Nex feature flags (off by default; toggled from Nex Developer Settings).\n // When on, the Nex display skips ASCII-only text sanitization so CJK/Chinese\n // captions render on glasses. Synced to the Bluetooth SDK via BLUETOOTH_SETTING_KEYS.\n nex_chinese_captions: {\n key: \"nex_chinese_captions\",\n defaultValue: () => false,\n writable: true,\n saveOnServer: true,\n persist: true,\n },\n // When on, LC3 audio received from Nex glasses is played back (Android only).\n // Local-only dev toggle: defaults off and never synced to the cloud account\n // (saveOnServer: false); persists locally so it survives app restarts.\n // Key renamed from the legacy `nex_audio_playback` so stale server/local\n // values (saved back when this was saveOnServer:true) can't re-enable it.\n nex_lc3_audio_playback: {\n key: \"nex_lc3_audio_playback\",\n defaultValue: () => false,\n writable: true,\n saveOnServer: false,\n persist: true,\n },\n china_deployment: {\n key: \"china_deployment\",\n defaultValue: () => (process.env.EXPO_PUBLIC_DEPLOYMENT_REGION === \"china\" ? true : false),\n override: () => (process.env.EXPO_PUBLIC_DEPLOYMENT_REGION === \"china\" ? true : false),\n writable: false,\n saveOnServer: false,\n persist: true,\n },\n // Cloud V2 endpoint OVERRIDES. Empty = no override; cloudClient's resolveUrl\n // owns the full precedence (override -> env -> Metro-derived dev default).\n // The value may be an explicit URL or the METRO_AUTO sentinel (\"my dev\n // laptop\", resolved live from Metro so it survives network changes). Never\n // bake an env var or a personal LAN IP into the default here: that makes the\n // override branch always-truthy and strands devs on a stale address.\n cloud_core_url: {\n key: \"cloud_core_url\",\n defaultValue: () => \"\",\n writable: true,\n saveOnServer: false,\n persist: true,\n resetOnBuildEnvChange: true,\n },\n cloud_runtime_url: {\n key: \"cloud_runtime_url\",\n defaultValue: () => \"\",\n writable: true,\n saveOnServer: false,\n persist: true,\n resetOnBuildEnvChange: true,\n },\n // Bookmarked Cloud V2 endpoint pairs. Each entry is {label, coreUrl,\n // runtimeUrl} — core + runtime are saved together because they are always\n // applied as a matched set (presets fill both; Save & Test verifies both).\n saved_cloud_url_pairs: {\n key: \"saved_cloud_url_pairs\",\n defaultValue: () => [],\n writable: true,\n saveOnServer: false,\n persist: true,\n },\n // Developer override for the ASG OTA manifest URL. null/empty = no override;\n // the normal selection applies (legacy-glasses gate, EXPO_PUBLIC_ASG_OTA_VERSION_URL,\n // glasses-reported URL, then production). See resolveOtaManifestUrl.\n ota_version_url: {\n key: \"ota_version_url\",\n defaultValue: () => null,\n writable: true,\n saveOnServer: false,\n persist: true,\n },\n saved_ota_version_urls: {\n key: \"saved_ota_version_urls\",\n defaultValue: () => [],\n writable: true,\n saveOnServer: false,\n persist: true,\n },\n reconnect_on_app_foreground: {\n key: \"reconnect_on_app_foreground\",\n defaultValue: () => true,\n writable: true,\n saveOnServer: true,\n persist: true,\n },\n location_tier: {key: \"location_tier\", defaultValue: () => \"\", writable: true, saveOnServer: true, persist: true},\n // Volatile bearer synced to Bluetooth for glasses-side Cloud V2 calls. The\n // key name is kept for BLE compatibility, but the value must never be loaded\n // from or saved to the legacy Cloud V1 settings store.\n core_token: {key: \"core_token\", defaultValue: () => \"\", writable: true, saveOnServer: false, persist: false},\n auth_email: {key: \"auth_email\", defaultValue: () => \"\", writable: true, saveOnServer: false, persist: true},\n // Pairing identity is per-phone, not per-account: two phones on one account\n // can be paired to different glasses, so none of these keys may sync to the\n // server (saveOnServer: false — a stale server copy resurrecting a local\n // pairing identity is exactly the desync this group's flags prevent).\n //\n // Two-phase identity: pending_wearable is the model the user last STARTED\n // pairing (written at selection, rendered as a finish-pairing card);\n // default_wearable + device_name + device_address are only promoted by the\n // native layer when pairing actually succeeds (handleDeviceReady).\n // pending_wearable persists so an abandoned selection still shows its\n // finish-pairing card after an app restart.\n pending_wearable: {\n key: \"pending_wearable\",\n defaultValue: () => \"\",\n writable: true,\n saveOnServer: false,\n persist: true,\n nativeAuthoritative: true,\n },\n default_wearable: {\n key: \"default_wearable\",\n defaultValue: () => \"\",\n writable: true,\n saveOnServer: false,\n persist: true,\n nativeAuthoritative: true,\n },\n device_name: {\n key: \"device_name\",\n defaultValue: () => \"\",\n writable: true,\n saveOnServer: false,\n persist: true,\n nativeAuthoritative: true,\n },\n device_address: {\n key: \"device_address\",\n defaultValue: () => \"\",\n writable: true,\n saveOnServer: false,\n persist: true,\n nativeAuthoritative: true,\n },\n project_name: {\n key: \"project_name\",\n defaultValue: () => \"\",\n writable: true,\n saveOnServer: false,\n persist: true,\n nativeAuthoritative: true,\n },\n default_controller: {\n key: \"default_controller\",\n defaultValue: () => \"\",\n writable: true,\n saveOnServer: false,\n persist: true,\n nativeAuthoritative: true,\n },\n pending_controller: {\n key: \"pending_controller\",\n defaultValue: () => \"\",\n writable: true,\n saveOnServer: false,\n persist: true,\n nativeAuthoritative: true,\n },\n controller_device_name: {\n key: \"controller_device_name\",\n defaultValue: () => \"\",\n writable: true,\n saveOnServer: false,\n persist: true,\n nativeAuthoritative: true,\n },\n controller_address: {\n key: \"controller_address\",\n defaultValue: () => \"\",\n writable: true,\n saveOnServer: false,\n persist: true,\n nativeAuthoritative: true,\n },\n // ui state:\n home_background: {\n key: \"home_background\",\n defaultValue: () => \"\",\n writable: true,\n saveOnServer: false,\n persist: true,\n },\n theme_preference: {\n key: \"theme_preference\",\n defaultValue: () => \"light\",\n // Force light mode - i mode is not complete yet\n // override: () => \"light\",\n writable: true,\n saveOnServer: true,\n persist: true,\n },\n enable_phone_notifications: {\n key: \"enable_phone_notifications\",\n defaultValue: () => false,\n writable: true,\n saveOnServer: true,\n persist: true,\n },\n settings_access_count: {\n key: \"settings_access_count\",\n defaultValue: () => 0,\n writable: true,\n saveOnServer: true,\n persist: true,\n },\n show_advanced_settings: {\n key: \"show_advanced_settings\",\n defaultValue: () => false,\n writable: true,\n saveOnServer: false,\n persist: true,\n },\n onboarding_completed: {\n key: \"onboarding_completed\",\n defaultValue: () => false,\n writable: true,\n saveOnServer: true,\n persist: true,\n },\n onboarding_live_completed: {\n key: \"onboarding_live_completed\",\n defaultValue: () => false,\n writable: true,\n saveOnServer: true,\n persist: true,\n },\n onboarding_os_completed: {\n key: \"onboarding_os_completed\",\n defaultValue: () => false,\n writable: true,\n saveOnServer: true,\n persist: true,\n },\n has_ever_activated_app: {\n key: \"has_ever_activated_app\",\n defaultValue: () => false,\n writable: true,\n saveOnServer: true,\n persist: true,\n },\n\n // Bluetooth SDK settings:\n sensing_enabled: {\n key: \"sensing_enabled\",\n defaultValue: () => true,\n writable: true,\n saveOnServer: true,\n persist: true,\n },\n power_saving_mode: {\n key: \"power_saving_mode\",\n defaultValue: () => false,\n writable: true,\n saveOnServer: true,\n persist: true,\n },\n // The Mentra App intentionally preserves Mentra Live's historical VAD-on\n // product default. Standalone public Bluetooth SDK hosts default VAD off so\n // their microphone audio remains continuous.\n voice_activity_detection_enabled: {\n key: \"voice_activity_detection_enabled\",\n defaultValue: () => true,\n writable: true,\n saveOnServer: true,\n persist: true,\n },\n // Mentra Live center-mic loudness / \"Barrier\" gate (cs_swit type 10). Default on.\n loudness_gate_enabled: {\n key: \"loudness_gate_enabled\",\n defaultValue: () => true,\n writable: true,\n saveOnServer: true,\n persist: true,\n },\n always_on_status_bar: {\n key: \"always_on_status_bar\",\n defaultValue: () => false,\n writable: true,\n saveOnServer: true,\n persist: true,\n },\n // Legacy cloud/mobile setting name. Locally it maps to glasses-side Voice Activity Detection.\n bypass_vad_for_debugging: {\n key: \"bypass_vad_for_debugging\",\n defaultValue: () => false,\n writable: true,\n saveOnServer: true,\n persist: true,\n },\n bypass_audio_encoding_for_debugging: {\n key: \"bypass_audio_encoding_for_debugging\",\n defaultValue: () => false,\n writable: true,\n saveOnServer: true,\n persist: true,\n },\n metric_system: {\n key: \"metric_system\",\n defaultValue: () => false,\n writable: true,\n saveOnServer: true,\n persist: true,\n },\n twelve_hour_time: {\n key: \"twelve_hour_time\",\n defaultValue: () => true,\n writable: true,\n saveOnServer: true,\n persist: true,\n },\n enforce_local_transcription: {\n key: \"enforce_local_transcription\",\n defaultValue: () => false,\n writable: true,\n saveOnServer: true,\n persist: true,\n },\n // LC3 audio quality setting (frame size in bytes)\n // 20 = 16kbps (low bandwidth), 40 = 32kbps (balanced), 60 = 48kbps (high quality)\n lc3_frame_size: {\n key: \"lc3_frame_size\",\n defaultValue: () => 60,\n writable: true,\n saveOnServer: false,\n persist: true,\n },\n preferred_mic: {\n key: \"preferred_mic\",\n defaultValue: () => \"auto\",\n writable: true,\n indexer: (key: string) => {\n const glasses = useSettingsStore.getState().getSetting(SETTINGS.default_wearable.key)\n if (glasses) {\n return `${key}:${glasses}`\n }\n return key\n },\n saveOnServer: true,\n persist: true,\n },\n screen_disabled: {\n key: \"screen_disabled\",\n defaultValue: () => false,\n writable: true,\n saveOnServer: false,\n persist: true,\n },\n // glasses settings:\n contextual_dashboard: {\n key: \"contextual_dashboard\",\n defaultValue: () => true,\n writable: true,\n saveOnServer: true,\n persist: true,\n },\n use_native_dashboard: {\n key: \"use_native_dashboard\",\n defaultValue: () => true,\n writable: true,\n saveOnServer: true,\n persist: true,\n },\n head_up_angle: {key: \"head_up_angle\", defaultValue: () => 45, writable: true, saveOnServer: true, persist: true},\n brightness: {key: \"brightness\", defaultValue: () => 50, writable: true, saveOnServer: true, persist: true},\n auto_brightness: {\n key: \"auto_brightness\",\n defaultValue: () => true,\n writable: true,\n saveOnServer: true,\n persist: true,\n },\n dashboard_height: {\n key: \"dashboard_height\",\n defaultValue: () => 4,\n writable: true,\n saveOnServer: true,\n persist: true,\n },\n dashboard_depth: {\n key: \"dashboard_depth\",\n defaultValue: () => 2,\n writable: true,\n saveOnServer: true,\n persist: true,\n },\n menu_apps: {\n key: \"menu_apps\",\n defaultValue: () => null,\n writable: true,\n saveOnServer: true,\n persist: true,\n },\n calendar_events: {\n key: \"calendar_events\",\n defaultValue: () => [],\n writable: true,\n saveOnServer: false,\n persist: false,\n },\n // button settings\n // Legacy persisted/cloud key; hardware behavior is now controlled by gallery_mode plus capture settings.\n button_mode: {key: \"button_mode\", defaultValue: () => \"photo\", writable: true, saveOnServer: true, persist: true},\n button_photo_size: {\n key: \"button_photo_size\",\n defaultValue: () => \"max\",\n writable: true,\n saveOnServer: true,\n persist: true,\n },\n button_video_settings: {\n key: \"button_video_settings\",\n defaultValue: () => ({width: 1920, height: 1080, fps: 30}),\n writable: true,\n saveOnServer: true,\n persist: true,\n },\n button_max_recording_time: {\n key: \"button_max_recording_time\",\n defaultValue: () => 10,\n writable: true,\n saveOnServer: true,\n persist: true,\n },\n camera_fov: {\n key: \"camera_fov\",\n defaultValue: () => ({fov: 118, roi_position: 0}),\n writable: true,\n saveOnServer: true,\n persist: true,\n },\n media_post_processing: {\n key: \"media_post_processing\",\n defaultValue: () => false,\n writable: true,\n saveOnServer: true,\n persist: true,\n },\n\n // time zone settings\n time_zone: {\n key: \"time_zone\",\n defaultValue: () => \"\",\n writable: true,\n override: () => {\n const override = useSettingsStore.getState().getSetting(SETTINGS.time_zone_override.key)\n if (override) {\n return override\n }\n return getTimeZone()\n },\n saveOnServer: true,\n persist: true,\n },\n time_zone_override: {\n key: \"time_zone_override\",\n defaultValue: () => \"\",\n writable: true,\n saveOnServer: true,\n persist: true,\n },\n // offline applets\n offline_mode: {key: \"offline_mode\", defaultValue: () => false, writable: true, saveOnServer: true, persist: true},\n // Runtime flag: coordinator flips this on when cloud STT has failed and fallback is active.\n // Native GlassesStore watches it to gate PCM 鈫?Sherpa feeding. Not user-facing.\n local_stt_fallback_active: {\n key: \"local_stt_fallback_active\",\n defaultValue: () => false,\n writable: true,\n saveOnServer: false,\n persist: false,\n },\n gallery_mode: {key: \"gallery_mode\", defaultValue: () => true, writable: true, saveOnServer: true, persist: true},\n gallery_sync_explained: {\n key: \"gallery_sync_explained\",\n defaultValue: () => false,\n writable: true,\n saveOnServer: false,\n persist: true,\n },\n offline_camera_running: {\n key: \"offline_camera_running\",\n defaultValue: () => false,\n writable: true,\n saveOnServer: false,\n persist: true,\n },\n // offline translation\n offline_translation_running: {\n key: \"offline_translation_running\",\n defaultValue: () => false,\n writable: true,\n saveOnServer: true,\n persist: true,\n },\n offline_translation_source: {\n key: \"offline_translation_source\",\n defaultValue: () => \"en\",\n writable: true,\n saveOnServer: true,\n persist: true,\n },\n offline_translation_target: {\n key: \"offline_translation_target\",\n defaultValue: () => \"es\",\n writable: true,\n saveOnServer: true,\n persist: true,\n },\n // button action settings\n default_button_action_enabled: {\n key: \"default_button_action_enabled\",\n defaultValue: () => true,\n writable: true,\n saveOnServer: true,\n persist: true,\n },\n default_button_action_app: {\n key: \"default_button_action_app\",\n defaultValue: () => \"com.mentra.camera\",\n writable: true,\n saveOnServer: true,\n persist: true,\n },\n // notifications\n notifications_blocklist: {\n key: \"notifications_blocklist\",\n defaultValue: () => [],\n writable: true,\n saveOnServer: true,\n persist: true,\n },\n // Cached required version from server - used to enforce updates even when offline\n cached_required_version: {\n key: \"cached_required_version\",\n defaultValue: () => \"\",\n writable: true,\n saveOnServer: false,\n persist: true,\n },\n // OTA update dismissal - stores the version code user dismissed (not persisted so resets on app restart)\n dismissed_ota_version: {\n key: \"dismissed_ota_version\",\n defaultValue: () => \"\",\n writable: true,\n saveOnServer: false,\n persist: false,\n },\n // Contact email for feedback (persisted for Apple private relay users)\n contact_email: {\n key: \"contact_email\",\n defaultValue: () => \"\",\n writable: true,\n saveOnServer: false,\n persist: true,\n },\n} as const\n\nexport const OFFLINE_APPLETS: string[] = [\"com.mentra.livecaptions\", \"com.mentra.camera\"]\n\n// These settings are automatically synced to the Bluetooth SDK.\n// Keep this list hardware-facing; app/UI/cloud-only preferences should stay in JS/Crust.\nexport const BLUETOOTH_SETTING_KEYS: string[] = [\n // Bluetooth settings:\n SETTINGS.sensing_enabled.key,\n SETTINGS.power_saving_mode.key,\n SETTINGS.voice_activity_detection_enabled.key,\n SETTINGS.loudness_gate_enabled.key,\n SETTINGS.lc3_frame_size.key,\n SETTINGS.preferred_mic.key,\n SETTINGS.screen_disabled.key,\n SETTINGS.auth_email.key,\n SETTINGS.core_token.key,\n // glasses settings:\n SETTINGS.contextual_dashboard.key,\n SETTINGS.head_up_angle.key,\n SETTINGS.brightness.key,\n SETTINGS.auto_brightness.key,\n SETTINGS.dashboard_height.key,\n SETTINGS.dashboard_depth.key,\n SETTINGS.menu_apps.key,\n SETTINGS.calendar_events.key,\n SETTINGS.use_native_dashboard.key,\n SETTINGS.twelve_hour_time.key,\n SETTINGS.metric_system.key,\n // button:\n SETTINGS.button_photo_size.key,\n // Legacy MentraLive native code reads the object form when syncing video settings.\n SETTINGS.button_video_settings.key,\n SETTINGS.button_max_recording_time.key,\n SETTINGS.camera_fov.key,\n // device / pairing:\n SETTINGS.pending_wearable.key,\n SETTINGS.default_wearable.key,\n SETTINGS.device_name.key,\n SETTINGS.device_address.key,\n SETTINGS.project_name.key,\n SETTINGS.default_controller.key,\n SETTINGS.pending_controller.key,\n SETTINGS.controller_device_name.key,\n SETTINGS.controller_address.key,\n // offline applets:\n SETTINGS.offline_mode.key,\n // Runtime flag flipped by LocalSttFallbackCoordinator. Native reads it from\n // GlassesStore to gate PCM 鈫?Sherpa feeding in handlePcm and to keep the\n // mic on while local STT is the active engine.\n SETTINGS.local_stt_fallback_active.key,\n SETTINGS.gallery_mode.key,\n // Mentra Nex feature flags:\n SETTINGS.nex_chinese_captions.key,\n SETTINGS.nex_lc3_audio_playback.key,\n]\n\n// Pairing identity is NATIVE-authoritative: the native layer writes it on\n// pairing success (handleDeviceReady) / forget and echoes it down via\n// save_setting; JS persists those echoes. JS鈫抧ative, identity travels ONLY in\n// the explicit full seeds (device-store hydration, pre-connect push,\n// post-demotion re-push) — never in the change-push subscription. Relaying an\n// echoed identity change back up would make the sync bidirectional with loop\n// gain 1: two identity values in flight (e.g. a boot demotion crossing a\n// native promotion) then chase each other through push鈫抋pply鈫抏cho鈫抪ush\n// forever, flapping the UI.\n//\n// Derived from the `nativeAuthoritative` descriptor flag (not maintained as a\n// parallel list) so the change-push exclusion in GlassesSettingsSync can't\n// drift from the setting declarations.\nexport const PAIRING_IDENTITY_KEYS: string[] = Object.values(SETTINGS)\n .filter((setting) => setting.nativeAuthoritative)\n .map((setting) => setting.key)\n\n// const PER_GLASSES_SETTINGS_KEYS: string[] = [SETTINGS.preferred_mic.key]\n\nexport interface SettingsState {\n // Settings values\n settings: Record<string, any>\n // Loading states\n isInitialized: boolean\n // Actions\n setSetting: (key: string, value: any, updateServer?: boolean) => AsyncResult<void, Error>\n setManyLocally: (settings: Record<string, any>) => AsyncResult<void, Error>\n getSetting: (key: string) => any\n // loadSetting: (key: string) => AsyncResult<void, Error>\n loadAllSettings: () => AsyncResult<void, Error>\n // Utility methods\n getBluetoothSettings: () => Record<string, any>\n resetAllSettingsLocally: () => void\n}\n\nconst getDefaultSettings = () =>\n Object.keys(SETTINGS).reduce(\n (acc, key) => {\n acc[key] = SETTINGS[key].defaultValue()\n return acc\n },\n {} as Record<string, any>,\n )\n\n// Single-flight for loadAllSettings: the host fires it at module load and\n// engine.start()'s device-store hydration awaits it — without the memo the\n// second caller runs a duplicate full disk load while the first is still in\n// flight. Cleared on failure so a later call can retry.\nlet loadAllSettingsInFlight: AsyncResult<void, Error> | null = null\n\nfunction printableSettingValue(key: string, value: unknown): string {\n return key.includes(\"token\") || key.includes(\"email\") ? \"<redacted>\" : JSON.stringify(value)\n}\n\nexport const useSettingsStore = create<SettingsState>()(\n subscribeWithSelector((set, get) => ({\n settings: getDefaultSettings(),\n isInitialized: false,\n loadingKeys: new Set(),\n setSetting: (key: string, value: any, _updateServer = true): AsyncResult<void, Error> => {\n return Res.try_async(async () => {\n const setting = SETTINGS[key]\n const originalKey = key\n\n if (!setting) {\n throw new Error(`SETTINGS: SET: ${originalKey} is not a valid setting!`)\n }\n\n if (setting.indexer) {\n key = setting.indexer(originalKey)\n }\n\n if (!setting.writable) {\n throw new Error(`SETTINGS: ${originalKey} is not writable!`)\n }\n\n // Update store immediately for optimistic UI\n console.log(`SETTINGS: SET: ${key} = ${printableSettingValue(key, value)}`)\n set((state) => ({\n settings: {...state.settings, [key]: value},\n }))\n\n if (setting.persist) {\n let res = await storage.save(key, value)\n if (res.is_error()) {\n throw new Error(`SETTINGS: couldn't save setting to storage: ${res.error}`)\n }\n\n // Cloud V1 per-change server sync removed with the V1 ripout (issue\n // #3392). Settings are local-first until a V2 sync lands; the\n // saveOnServer flags are retained as intent markers for that work.\n }\n })\n },\n getSetting: (key: string) => {\n const state = get()\n const originalKey = key\n const setting = SETTINGS[originalKey]\n\n if (!setting) {\n console.error(`SETTINGS: GET: ${originalKey} is not a valid setting!`)\n return undefined\n }\n\n if (setting.override) {\n let override = setting.override()\n if (override !== undefined) {\n return override\n }\n }\n\n if (setting.indexer) {\n key = setting.indexer(originalKey)\n }\n\n // console.log(`GET SETTING: ${key} = ${state.settings[key]}`)\n\n try {\n const raw = state.settings[key] ?? SETTINGS[originalKey].defaultValue()\n return raw\n } catch (e) {\n // for dynamically created settings, we need to create a new setting in SETTINGS:\n console.log(`Failed to get setting, creating new setting:(${key}):`, e)\n SETTINGS[key] = {key: key, defaultValue: () => undefined, writable: true, saveOnServer: false, persist: true}\n return SETTINGS[key].defaultValue()\n }\n },\n // batch update many settings from the server:\n setManyLocally: (settings: Record<string, any>): AsyncResult<void, Error> => {\n return Res.try_async(async () => {\n const settingsToLoad: Record<string, any> = {}\n // if a setting should not persist, don't load it:\n for (const [key, value] of Object.entries(settings)) {\n const stg: Setting | undefined = SETTINGS[key.toLowerCase()]\n if (!stg) {\n continue\n }\n if (!stg.persist) {\n continue\n }\n settingsToLoad[key.toLowerCase()] = value\n }\n // console.log(\"SETTINGS: SET MANY LOCALLY: \", settingsToLoad)\n\n set((state) => ({\n settings: {...state.settings, ...settingsToLoad},\n }))\n\n // save to storage:\n await Promise.all(Object.entries(settingsToLoad).map(([key, value]) => storage.save(key, value)))\n })\n },\n // loads any preferences that have been changed from the default and saved to DISK!\n loadAllSettings: (): AsyncResult<void, Error> => {\n console.log(\"SETTINGS: loadAllSettings()\")\n if (loadAllSettingsInFlight) {\n return loadAllSettingsInFlight\n }\n const inFlight = Res.try_async(async () => {\n const state = get()\n let loadedSettings: Record<string, any> = {}\n\n if (state.isInitialized) {\n return undefined\n }\n\n for (const setting of Object.values(SETTINGS)) {\n // if the settings should not persist, don't load it:\n if (!setting.persist) {\n continue\n }\n\n // load all subkeys for an indexed setting:\n if (setting?.indexer) {\n console.log(`SETTINGS: LOAD: ${setting.key} with indexer!`)\n\n let res: Result<Record<string, unknown>, Error> = storage.loadSubKeys(setting.key)\n if (res.is_error()) {\n console.log(`SETTINGS: LOAD: ${setting.key}`, res.error)\n continue\n }\n\n let subKeys: Record<string, unknown> = res.value\n console.log(`SETTINGS: LOAD: ${setting.key} subkeys are set!`, subKeys)\n loadedSettings = {...loadedSettings, ...subKeys}\n continue\n }\n\n let res = storage.load<any>(setting.key)\n if (res.is_error()) {\n console.log(`SETTINGS: LOAD: ${setting.key} is not set!`, res.error)\n // this setting isn't set from the default, so we don't load anything\n continue\n }\n // normal key:value pair:\n let value = res.value\n // res.value IS the stored value; logging value.value printed\n // \"undefined\" for every loaded setting and disguised present\n // values as missing. Redact token- and email-bearing keys: console\n // logs are uploaded in bug-report artifacts (same keys\n // diagnosticContext's SENSITIVE_SETTINGS_KEYS strips, minus an\n // import that would cycle stores <-> utils).\n console.log(`SETTINGS: LOAD: ${setting.key} = ${printableSettingValue(setting.key, value)}`)\n loadedSettings[setting.key] = value\n }\n\n // console.log(\"##############################################\")\n // console.log(loadedSettings)\n // console.log(\"##############################################\")\n\n set((state) => ({\n isInitialized: true,\n settings: {...state.settings, ...loadedSettings},\n }))\n\n // This hidden debug switch originally shipped default-off while the\n // notification-listener cold-start ANR was being investigated. Now\n // that the listener runs in its own guarded process, migrate existing\n // installs to the new default once; later explicit debug changes still\n // persist normally.\n // Reset the cloud backend override when the build's environment changes.\n //\n // cloud_core_url / cloud_runtime_url are persist:true and outrank both\n // the build's env and the compiled default (see resolveUrl in\n // cloudClient.ts). That is what we want inside one environment: a\n // developer's METRO_AUTO pin should survive a rebuild. It is wrong\n // across environments.\n //\n // The concrete case is an install that moves BETWEEN environments: an\n // internal tester running a dev build with a pinned override who then\n // installs the store build. The override outranks that build's prod\n // URLs, so without this they keep talking to dev with nothing\n // surfacing it.\n //\n // Note what this deliberately does NOT do, because the distinction is\n // easy to get backwards. TestFlight and the App Store receive the SAME\n // binary, so promotion does not change EXPO_PUBLIC_BUILD_ENV and this\n // reset never fires on it. Promotion is safe for a different reason:\n // the publishing lane bakes the selected release cloud environment, and\n // production promotes the already-tested binary. The same holds for\n // Android beta-track to production.\n //\n // The residual gap is therefore an override pinned while already on a\n // prod-labelled build, which no label comparison can see. That is a\n // deliberate limit: reaching it means typing a URL into a dev-only\n // screen, VersionInfo renders the current value, and the same screen\n // clears it.\n //\n // Comparing the baked EXPO_PUBLIC_BUILD_ENV against the last one seen\n // on this device covers those environment switches and fresh installs\n // without touching the setting write path. A reinstall needs no\n // handling: it drops the marker and the override together\n // (android:allowBackup=\"false\", and iOS deletes the container).\n const BUILD_ENV_KEY = \"settings.lastBuildEnv\"\n const buildEnv = (process.env.EXPO_PUBLIC_BUILD_ENV ?? \"dev\").trim() || \"dev\"\n const lastBuildEnv = storage.load<string>(BUILD_ENV_KEY)\n const previousBuildEnv = lastBuildEnv.is_error() ? undefined : lastBuildEnv.value\n if (previousBuildEnv !== buildEnv) {\n // Clear when there is no marker yet, not just on a recorded change.\n // The first build carrying this code meets every existing install\n // with previousBuildEnv === undefined, and those are exactly the\n // installs that may hold an override set before the pin existed --\n // the population this is here to repair. Treating \"no marker\" as a\n // fresh install would record the marker and never look again. A\n // genuinely fresh install has nothing persisted, so the clear below\n // writes each default over itself and costs nothing.\n //\n // Driven by the descriptors rather than a hardcoded key list, so a\n // setting that needs this behaviour declares it in one place and\n // cannot be missed here.\n const scoped = Object.values(SETTINGS).filter((setting) => setting.resetOnBuildEnvChange)\n console.log(\n `SETTINGS: build env ${previousBuildEnv ?? \"(none recorded)\"} -> ${buildEnv}, ` +\n `clearing ${scoped.length} build-scoped setting(s)`,\n )\n let allCleared = true\n for (const setting of scoped) {\n const cleared = await get().setSetting(setting.key, setting.defaultValue(), false)\n if (cleared.is_error()) {\n allCleared = false\n console.log(`SETTINGS: could not clear ${setting.key}:`, cleared.error)\n }\n }\n // Advance the marker only once the reset actually landed. Recording\n // it after a failed write would retire the retry and leave the stale\n // override for the life of the install; leaving it unset costs one\n // repeated attempt per launch until a write succeeds.\n if (allCleared) {\n storage.save(BUILD_ENV_KEY, buildEnv)\n }\n }\n\n const NOTIFICATION_LISTENER_MIGRATION_KEY = \"migration:android_notification_listener_default_on_v1\"\n const notificationListenerMigrationDone = storage.load<boolean>(NOTIFICATION_LISTENER_MIGRATION_KEY)\n if (notificationListenerMigrationDone.is_error() || !notificationListenerMigrationDone.value) {\n const result = await get().setSetting(SETTINGS.android_notification_listener_enabled.key, true, false)\n if (result.is_error()) {\n console.log(\"SETTINGS: notification listener migration failed:\", result.error)\n } else {\n storage.save(NOTIFICATION_LISTENER_MIGRATION_KEY, true)\n }\n }\n\n // One-time migration: force android_blur=false for existing users.\n // The setting's default is already false; this migration covers users\n // who explicitly opted into Android blur effects before we discovered\n // they're a major source of frame drops on cheap Android phones.\n // The dimezisBlurViewSdk31Plus blur each costs ~5-10ms/frame; with\n // multiple blurs on home (top fade + AppSwitcherButton x2) a low-end\n // device misses the 16ms budget consistently. Users can turn it back\n // on under Settings 鈫?Appearance once we've optimized further.\n //\n // The setSetting call also pushes to the server (saveOnServer: true)\n // so the server-stored value flips too — otherwise the next sync\n // from the user's server-stored prefs would re-enable blur.\n // Best-effort: a server failure (offline, 5xx) shouldn't block boot;\n // we still mark the migration done locally so we don't loop.\n const MIGRATION_KEY = \"migration:android_blur_default_false_v1\"\n const migrationDone = storage.load<boolean>(MIGRATION_KEY)\n if (migrationDone.is_error() || !migrationDone.value) {\n const current = get().getSetting(SETTINGS.android_blur.key)\n if (current === true) {\n const result = await get().setSetting(SETTINGS.android_blur.key, false, true)\n if (result.is_error()) {\n // Server push failed (offline / 5xx). Local storage was still\n // updated, so the user immediately gets the new behavior. The\n // server-side stale `true` will be overwritten the next time\n // the user opens Appearance settings and the auto-sync runs.\n console.log(\"SETTINGS: android_blur migration server-push failed:\", result.error)\n }\n }\n // Mark done unconditionally — even on server-push failure we don't\n // want to retry the migration on every boot. The local value is\n // already correct.\n storage.save(MIGRATION_KEY, true)\n }\n\n // The old camera default cropped the sensor to 102掳. Move existing\n // default-shaped values to the full 118掳 sensor once; named miniapp\n // requests for the 102掳 \"standard\" preset remain available.\n const CAMERA_FOV_MIGRATION_KEY = \"migration:camera_fov_full_sensor_v1\"\n const cameraFovMigrationDone = storage.load<boolean>(CAMERA_FOV_MIGRATION_KEY)\n if (cameraFovMigrationDone.is_error() || !cameraFovMigrationDone.value) {\n const current = get().getSetting(SETTINGS.camera_fov.key) as {fov?: number; roi_position?: number} | undefined\n let migrationSucceeded = true\n if (current?.fov === 102 && (current.roi_position ?? 0) === 0) {\n const result = await get().setSetting(SETTINGS.camera_fov.key, {fov: 118, roi_position: 0}, true)\n if (result.is_error()) {\n console.log(\"SETTINGS: camera FOV migration failed:\", result.error)\n migrationSucceeded = false\n }\n }\n // Unlike the blur migration above, a failed camera set may leave the\n // local value unchanged. Only mark this migration complete once the\n // desired value was applied so a transient failure retries on boot.\n if (migrationSucceeded) storage.save(CAMERA_FOV_MIGRATION_KEY, true)\n }\n })\n loadAllSettingsInFlight = inFlight\n void Promise.resolve(inFlight).then((result) => {\n if (result.is_error()) {\n loadAllSettingsInFlight = null\n }\n })\n return inFlight\n },\n getBluetoothSettings: () => {\n const state = get()\n // Device-model-filtered key set (wire v2): Mentra Live (no display) gets\n // the reduced MENTRA_LIVE_SETTING_KEYS; display glasses get the full set.\n const deviceModel = useGlassesStore.getState().deviceModel || state.getSetting(SETTINGS.default_wearable.key)\n const keys = getBluetoothSettingKeysForDevice(deviceModel, BLUETOOTH_SETTING_KEYS)\n const bluetoothSettings: Record<string, any> = {}\n for (const key of keys) {\n const value = state.getSetting(key)\n if (key === SETTINGS.core_token.key && (typeof value !== \"string\" || value.trim().length === 0)) {\n continue\n }\n bluetoothSettings[key] = value\n }\n return bluetoothSettings\n },\n resetAllSettingsLocally: () => {\n set((_state) => ({\n settings: getDefaultSettings(),\n isInitialized: true,\n }))\n },\n })),\n)\n\nexport const useSetting = <T = any>(key: string): [T, (value: T) => AsyncResult<void, Error>] => {\n const value = useSettingsStore((state) => state.getSetting(key))\n const setSetting = useSettingsStore((state) => state.setSetting)\n return [value, (newValue: T) => setSetting(key, newValue)]\n}\n"]}
|
package/build/types/enums.d.ts
CHANGED
|
@@ -1,28 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
* @mentra/types - Shared enums for MentraOS
|
|
3
|
-
* These are runtime values (not pure types)
|
|
4
|
-
*/
|
|
5
|
-
/**
|
|
6
|
-
* Hardware component types that apps can require
|
|
7
|
-
*/
|
|
8
|
-
export declare enum HardwareType {
|
|
9
|
-
CAMERA = "CAMERA",
|
|
10
|
-
DISPLAY = "DISPLAY",
|
|
11
|
-
MICROPHONE = "MICROPHONE",
|
|
12
|
-
SPEAKER = "SPEAKER",
|
|
13
|
-
IMU = "IMU",
|
|
14
|
-
BUTTON = "BUTTON",
|
|
15
|
-
LIGHT = "LIGHT",
|
|
16
|
-
WIFI = "WIFI",
|
|
17
|
-
EXIST = "EXIST"
|
|
18
|
-
}
|
|
19
|
-
/**
|
|
20
|
-
* Levels of hardware requirements
|
|
21
|
-
*/
|
|
22
|
-
export declare enum HardwareRequirementLevel {
|
|
23
|
-
REQUIRED = "REQUIRED",// App cannot function without this hardware
|
|
24
|
-
OPTIONAL = "OPTIONAL"
|
|
25
|
-
}
|
|
1
|
+
export { HardwareType, HardwareRequirementLevel } from "@mentra/miniapp/hardware";
|
|
26
2
|
export declare enum DeviceTypes {
|
|
27
3
|
NONE = "None",
|
|
28
4
|
SIMULATED = "Simulated Glasses",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"enums.d.ts","sourceRoot":"","sources":["../../src/types/enums.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"enums.d.ts","sourceRoot":"","sources":["../../src/types/enums.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,YAAY,EAAE,wBAAwB,EAAC,MAAM,0BAA0B,CAAA;AAE/E,oBAAY,WAAW;IACrB,IAAI,SAAS;IACb,SAAS,sBAAsB;IAC/B,IAAI,SAAS;IACb,EAAE,sBAAsB;IACxB,EAAE,sBAAsB;IACxB,IAAI,gBAAgB;IACpB,KAAK,iBAAiB;IACtB,IAAI,eAAe;IACnB,GAAG,mBAAmB;IACtB,KAAK,oBAAoB;CAC1B;AAED,oBAAY,eAAe;IACzB,EAAE,sBAAsB;CACzB"}
|
package/build/types/enums.js
CHANGED
|
@@ -1,30 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
* @mentra/types - Shared enums for MentraOS
|
|
3
|
-
* These are runtime values (not pure types)
|
|
4
|
-
*/
|
|
5
|
-
/**
|
|
6
|
-
* Hardware component types that apps can require
|
|
7
|
-
*/
|
|
8
|
-
export var HardwareType;
|
|
9
|
-
(function (HardwareType) {
|
|
10
|
-
HardwareType["CAMERA"] = "CAMERA";
|
|
11
|
-
HardwareType["DISPLAY"] = "DISPLAY";
|
|
12
|
-
HardwareType["MICROPHONE"] = "MICROPHONE";
|
|
13
|
-
HardwareType["SPEAKER"] = "SPEAKER";
|
|
14
|
-
HardwareType["IMU"] = "IMU";
|
|
15
|
-
HardwareType["BUTTON"] = "BUTTON";
|
|
16
|
-
HardwareType["LIGHT"] = "LIGHT";
|
|
17
|
-
HardwareType["WIFI"] = "WIFI";
|
|
18
|
-
HardwareType["EXIST"] = "EXIST";
|
|
19
|
-
})(HardwareType || (HardwareType = {}));
|
|
20
|
-
/**
|
|
21
|
-
* Levels of hardware requirements
|
|
22
|
-
*/
|
|
23
|
-
export var HardwareRequirementLevel;
|
|
24
|
-
(function (HardwareRequirementLevel) {
|
|
25
|
-
HardwareRequirementLevel["REQUIRED"] = "REQUIRED";
|
|
26
|
-
HardwareRequirementLevel["OPTIONAL"] = "OPTIONAL";
|
|
27
|
-
})(HardwareRequirementLevel || (HardwareRequirementLevel = {}));
|
|
1
|
+
export { HardwareType, HardwareRequirementLevel } from "@mentra/miniapp/hardware";
|
|
28
2
|
export var DeviceTypes;
|
|
29
3
|
(function (DeviceTypes) {
|
|
30
4
|
DeviceTypes["NONE"] = "None";
|
package/build/types/enums.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"enums.js","sourceRoot":"","sources":["../../src/types/enums.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"enums.js","sourceRoot":"","sources":["../../src/types/enums.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,YAAY,EAAE,wBAAwB,EAAC,MAAM,0BAA0B,CAAA;AAE/E,MAAM,CAAN,IAAY,WAWX;AAXD,WAAY,WAAW;IACrB,4BAAa,CAAA;IACb,8CAA+B,CAAA;IAC/B,4BAAa,CAAA;IACb,uCAAwB,CAAA;IACxB,uCAAwB,CAAA;IACxB,mCAAoB,CAAA;IACpB,qCAAsB,CAAA;IACtB,kCAAmB,CAAA;IACnB,qCAAsB,CAAA;IACtB,wCAAyB,CAAA;AAC3B,CAAC,EAXW,WAAW,KAAX,WAAW,QAWtB;AAED,MAAM,CAAN,IAAY,eAEX;AAFD,WAAY,eAAe;IACzB,2CAAwB,CAAA;AAC1B,CAAC,EAFW,eAAe,KAAf,eAAe,QAE1B","sourcesContent":["export {HardwareType, HardwareRequirementLevel} from \"@mentra/miniapp/hardware\"\n\nexport enum DeviceTypes {\n NONE = \"None\",\n SIMULATED = \"Simulated Glasses\",\n AR99 = \"AR99\",\n G1 = \"Even Realities G1\",\n G2 = \"Even Realities G2\",\n LIVE = \"Mentra Live\",\n MACH1 = \"Mentra Mach1\",\n Z100 = \"Vuzix Z100\",\n NEX = \"Mentra Display\",\n FRAME = \"Brilliant Frame\",\n}\n\nexport enum ControllerTypes {\n R1 = \"Even Realities R1\",\n}\n"]}
|
|
@@ -1,22 +1,12 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @mentra/types - Hardware capability types
|
|
3
|
-
*/
|
|
1
|
+
/** Hardware capability types used by the Engine. */
|
|
4
2
|
import { evenRealitiesG1 } from "./capabilities/even-realities-g1";
|
|
5
3
|
import { evenRealitiesG2 } from "./capabilities/even-realities-g2";
|
|
6
4
|
import { mentraDisplay } from "./capabilities/mentra-display";
|
|
7
5
|
import { mentraLive } from "./capabilities/mentra-live";
|
|
8
6
|
import { simulatedGlasses } from "./capabilities/simulated-glasses";
|
|
9
7
|
import { vuzixZ100 } from "./capabilities/vuzix-z100";
|
|
10
|
-
import { DeviceTypes
|
|
11
|
-
|
|
12
|
-
* Hardware requirement for an app
|
|
13
|
-
* Specifies what hardware components an app needs
|
|
14
|
-
*/
|
|
15
|
-
export interface HardwareRequirement {
|
|
16
|
-
type: HardwareType;
|
|
17
|
-
level: HardwareRequirementLevel;
|
|
18
|
-
description?: string;
|
|
19
|
-
}
|
|
8
|
+
import { DeviceTypes } from "./enums";
|
|
9
|
+
export type { HardwareRequirement } from "@mentra/miniapp/hardware";
|
|
20
10
|
/**
|
|
21
11
|
* Camera capabilities
|
|
22
12
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hardware.d.ts","sourceRoot":"","sources":["../../src/types/hardware.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"hardware.d.ts","sourceRoot":"","sources":["../../src/types/hardware.ts"],"names":[],"mappings":"AAAA,oDAAoD;AAEpD,OAAO,EAAE,eAAe,EAAE,MAAM,kCAAkC,CAAC;AACnE,OAAO,EAAE,eAAe,EAAE,MAAM,kCAAkC,CAAC;AACnE,OAAO,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAC;AAC9D,OAAO,EAAE,UAAU,EAAE,MAAM,4BAA4B,CAAC;AACxD,OAAO,EAAE,gBAAgB,EAAE,MAAM,kCAAkC,CAAC;AACpE,OAAO,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AAEtD,OAAO,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAEtC,YAAY,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAEpE;;GAEG;AACH,MAAM,WAAW,kBAAkB;IACjC,UAAU,CAAC,EAAE;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAE,CAAC;IAC/C,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,KAAK,EAAE;QACL,SAAS,EAAE,OAAO,CAAC;QAC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AE,sBAAsB,GAAG,IAAI,CAAC;IAG1C,UAAU,EAAE,OAAO,CAAC;IACpB,OAAO,EAAE,mBAAmB,GAAG,IAAI,CAAC;IAGpC,MAAM,EAAE,OAAO,CAAC;IAChB,GAAG,EAAE,eAAe,GAAG,IAAI,CAAC;IAG5B,SAAS,EAAE,OAAO,CAAC;IACnB,MAAM,EAAE,kBAAkB,GAAG,IAAI,CAAC;IAGlC,QAAQ,EAAE,OAAO,CAAC;IAClB,KAAK,EAAE,iBAAiB,GAAG,IAAI,CAAC;IAGhC,KAAK,EAAE,iBAAiB,CAAC;IAGzB,OAAO,EAAE,OAAO,CAAC;IAGjB,MAAM,CAAC,EAAE,OAAO,CAAC;IAOjB,kBAAkB,CAAC,EAAE,OAAO,CAAC;CAC9B;AAED;;;;GAIG;AACH,eAAO,MAAM,qBAAqB,EAAE,MAAM,CAAC,MAAM,EAAE,YAAY,CAuB9D,CAAC;AAEF,eAAO,MAAM,oBAAoB,GAAI,YAAY,WAAW,KAAG,YAM9D,CAAC;AAGF,OAAO,EAAE,gBAAgB,EAAE,eAAe,EAAE,eAAe,EAAE,UAAU,EAAE,SAAS,EAAE,aAAa,EAAE,CAAC"}
|
package/build/types/hardware.js
CHANGED
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @mentra/types - Hardware capability types
|
|
3
|
-
*/
|
|
1
|
+
/** Hardware capability types used by the Engine. */
|
|
4
2
|
import { evenRealitiesG1 } from "./capabilities/even-realities-g1";
|
|
5
3
|
import { evenRealitiesG2 } from "./capabilities/even-realities-g2";
|
|
6
4
|
import { mentraDisplay } from "./capabilities/mentra-display";
|