@mentra/sdk 2.1.31-beta.6 → 3.0.0-alpha.3
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 +54 -9
- package/dist/MiniAppServer.d.ts +58 -0
- package/dist/MiniAppServer.d.ts.map +1 -0
- package/dist/app/server/index.d.ts +143 -88
- package/dist/app/server/index.d.ts.map +1 -1
- package/dist/app/session/events.d.ts +20 -3
- package/dist/app/session/events.d.ts.map +1 -1
- package/dist/app/session/index.d.ts +56 -3
- package/dist/app/session/index.d.ts.map +1 -1
- package/dist/app/session/modules/audio-output-stream.d.ts +108 -0
- package/dist/app/session/modules/audio-output-stream.d.ts.map +1 -0
- package/dist/app/session/modules/audio.d.ts +36 -1
- package/dist/app/session/modules/audio.d.ts.map +1 -1
- package/dist/app/session/modules/camera-managed-extension.d.ts +37 -33
- package/dist/app/session/modules/camera-managed-extension.d.ts.map +1 -1
- package/dist/app/session/modules/camera.d.ts +108 -50
- package/dist/app/session/modules/camera.d.ts.map +1 -1
- package/dist/app/session/modules/index.d.ts +4 -3
- package/dist/app/session/modules/index.d.ts.map +1 -1
- package/dist/app/session/modules/led.d.ts.map +1 -1
- package/dist/app/session/modules/location.d.ts.map +1 -1
- package/dist/app/session/settings.d.ts +5 -1
- package/dist/app/session/settings.d.ts.map +1 -1
- package/dist/app/webview/index.d.ts +67 -9
- package/dist/app/webview/index.d.ts.map +1 -1
- package/dist/constants/log-messages/updates.d.ts +32 -9
- package/dist/constants/log-messages/updates.d.ts.map +1 -1
- package/dist/constants/log-messages/warning.d.ts +12 -0
- package/dist/constants/log-messages/warning.d.ts.map +1 -1
- package/dist/display-utils.d.ts +3 -1
- package/dist/display-utils.d.ts.map +1 -1
- package/dist/display-utils.js +443 -26
- package/dist/display-utils.js.map +10 -6
- package/dist/index.d.ts +22 -14
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +8877 -4236
- package/dist/index.js.map +63 -31
- package/dist/internal/_SessionManager.d.ts +76 -0
- package/dist/internal/_SessionManager.d.ts.map +1 -0
- package/dist/logging/clean-transport.d.ts +50 -0
- package/dist/logging/clean-transport.d.ts.map +1 -0
- package/dist/logging/errors.d.ts +90 -0
- package/dist/logging/errors.d.ts.map +1 -0
- package/dist/logging/logger.d.ts +72 -1
- package/dist/logging/logger.d.ts.map +1 -1
- package/dist/logging/telemetry-transport.d.ts +51 -0
- package/dist/logging/telemetry-transport.d.ts.map +1 -0
- package/dist/session/DataStreamRouter.d.ts +219 -0
- package/dist/session/DataStreamRouter.d.ts.map +1 -0
- package/dist/session/MentraSession.d.ts +102 -0
- package/dist/session/MentraSession.d.ts.map +1 -0
- package/dist/session/index.d.ts +2 -0
- package/dist/session/index.d.ts.map +1 -0
- package/dist/session/internal/_ConnectionManager.d.ts +43 -0
- package/dist/session/internal/_ConnectionManager.d.ts.map +1 -0
- package/dist/session/internal/_MessageRouter.d.ts +11 -0
- package/dist/session/internal/_MessageRouter.d.ts.map +1 -0
- package/dist/session/internal/_SubscriptionManager.d.ts +32 -0
- package/dist/session/internal/_SubscriptionManager.d.ts.map +1 -0
- package/dist/session/internal/_V2AudioStreamShim.d.ts +12 -0
- package/dist/session/internal/_V2AudioStreamShim.d.ts.map +1 -0
- package/dist/session/internal/_V2CameraShim.d.ts +51 -0
- package/dist/session/internal/_V2CameraShim.d.ts.map +1 -0
- package/dist/session/internal/_V2EventManagerShim.d.ts +51 -0
- package/dist/session/internal/_V2EventManagerShim.d.ts.map +1 -0
- package/dist/session/internal/_V2SessionShim.d.ts +165 -0
- package/dist/session/internal/_V2SessionShim.d.ts.map +1 -0
- package/dist/session/internal/_V2SettingsShim.d.ts +17 -0
- package/dist/session/internal/_V2SettingsShim.d.ts.map +1 -0
- package/dist/session/managers/CameraManager.d.ts +197 -0
- package/dist/session/managers/CameraManager.d.ts.map +1 -0
- package/dist/session/managers/DashboardManager.d.ts +131 -0
- package/dist/session/managers/DashboardManager.d.ts.map +1 -0
- package/dist/session/managers/DeviceManager.d.ts +332 -0
- package/dist/session/managers/DeviceManager.d.ts.map +1 -0
- package/dist/session/managers/DisplayManager.d.ts +171 -0
- package/dist/session/managers/DisplayManager.d.ts.map +1 -0
- package/dist/session/managers/LedManager.d.ts +131 -0
- package/dist/session/managers/LedManager.d.ts.map +1 -0
- package/dist/session/managers/LocationManager.d.ts +255 -0
- package/dist/session/managers/LocationManager.d.ts.map +1 -0
- package/dist/session/managers/MicManager.d.ts +252 -0
- package/dist/session/managers/MicManager.d.ts.map +1 -0
- package/dist/session/managers/PermissionsManager.d.ts +182 -0
- package/dist/session/managers/PermissionsManager.d.ts.map +1 -0
- package/dist/session/managers/PhoneManager.d.ts +295 -0
- package/dist/session/managers/PhoneManager.d.ts.map +1 -0
- package/dist/session/managers/SpeakerManager.d.ts +285 -0
- package/dist/session/managers/SpeakerManager.d.ts.map +1 -0
- package/dist/session/managers/StorageManager.d.ts +289 -0
- package/dist/session/managers/StorageManager.d.ts.map +1 -0
- package/dist/session/managers/TimeUtils.d.ts +175 -0
- package/dist/session/managers/TimeUtils.d.ts.map +1 -0
- package/dist/session/managers/TranscriptionManager.d.ts +195 -0
- package/dist/session/managers/TranscriptionManager.d.ts.map +1 -0
- package/dist/session/managers/TranslationManager.d.ts +189 -0
- package/dist/session/managers/TranslationManager.d.ts.map +1 -0
- package/dist/session.d.ts +41 -0
- package/dist/session.d.ts.map +1 -0
- package/dist/session.js +4168 -0
- package/dist/session.js.map +44 -0
- package/dist/transport/Transport.d.ts +119 -0
- package/dist/transport/Transport.d.ts.map +1 -0
- package/dist/transport/WebSocketTransport.d.ts +73 -0
- package/dist/transport/WebSocketTransport.d.ts.map +1 -0
- package/dist/types/index.d.ts +31 -5
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/message-types.d.ts +25 -9
- package/dist/types/message-types.d.ts.map +1 -1
- package/dist/types/messages/app-to-cloud.d.ts +113 -16
- package/dist/types/messages/app-to-cloud.d.ts.map +1 -1
- package/dist/types/messages/cloud-to-app.d.ts +50 -4
- package/dist/types/messages/cloud-to-app.d.ts.map +1 -1
- package/dist/types/messages/cloud-to-glasses.d.ts +43 -14
- package/dist/types/messages/cloud-to-glasses.d.ts.map +1 -1
- package/dist/types/messages/glasses-to-cloud.d.ts +5 -5
- package/dist/types/messages/glasses-to-cloud.d.ts.map +1 -1
- package/dist/types/models.d.ts +17 -0
- package/dist/types/models.d.ts.map +1 -1
- package/dist/types/rtmp-stream.d.ts +4 -4
- package/dist/types/rtmp-stream.d.ts.map +1 -1
- package/dist/types/streams.d.ts +6 -1
- package/dist/types/streams.d.ts.map +1 -1
- package/dist/types/webhooks.d.ts +11 -0
- package/dist/types/webhooks.d.ts.map +1 -1
- package/dist/utils/error-utils.d.ts +139 -0
- package/dist/utils/error-utils.d.ts.map +1 -0
- package/dist/utils/permissions-utils.d.ts +30 -7
- package/dist/utils/permissions-utils.d.ts.map +1 -1
- package/node_modules/@mentra/types/dist/applet.d.ts +5 -1
- package/node_modules/@mentra/types/dist/applet.d.ts.map +1 -1
- package/node_modules/@mentra/types/dist/capabilities/even-realities-g2.d.ts +12 -0
- package/node_modules/@mentra/types/dist/capabilities/even-realities-g2.d.ts.map +1 -0
- package/node_modules/@mentra/types/dist/capabilities/even-realities-g2.js +61 -0
- package/node_modules/@mentra/types/dist/capabilities/mentra-display.d.ts +12 -0
- package/node_modules/@mentra/types/dist/capabilities/mentra-display.d.ts.map +1 -0
- package/node_modules/@mentra/types/dist/capabilities/mentra-display.js +54 -0
- package/node_modules/@mentra/types/dist/capabilities/none.d.ts +13 -0
- package/node_modules/@mentra/types/dist/capabilities/none.d.ts.map +1 -0
- package/node_modules/@mentra/types/dist/capabilities/none.js +67 -0
- package/node_modules/@mentra/types/dist/enums.d.ts +8 -2
- package/node_modules/@mentra/types/dist/enums.d.ts.map +1 -1
- package/node_modules/@mentra/types/dist/enums.js +9 -2
- package/node_modules/@mentra/types/dist/hardware.d.ts +3 -1
- package/node_modules/@mentra/types/dist/hardware.d.ts.map +1 -1
- package/node_modules/@mentra/types/dist/hardware.js +12 -2
- package/node_modules/@mentra/types/dist/index.d.ts +1 -1
- package/node_modules/@mentra/types/dist/index.d.ts.map +1 -1
- package/node_modules/@mentra/types/dist/index.js +2 -1
- package/node_modules/@mentra/types/package.json +2 -2
- package/package.json +24 -12
- package/dist/examples/managed-rtmp-streaming-example.d.ts +0 -2
- package/dist/examples/managed-rtmp-streaming-example.d.ts.map +0 -1
- package/dist/examples/managed-rtmp-streaming-with-restream-example.d.ts +0 -11
- package/dist/examples/managed-rtmp-streaming-with-restream-example.d.ts.map +0 -1
- package/dist/examples/rtmp-streaming-example.d.ts +0 -2
- package/dist/examples/rtmp-streaming-example.d.ts.map +0 -1
- package/node_modules/@mentra/types/src/applet.ts +0 -51
- package/node_modules/@mentra/types/src/capabilities/even-realities-g1.ts +0 -63
- package/node_modules/@mentra/types/src/capabilities/mentra-live.ts +0 -103
- package/node_modules/@mentra/types/src/capabilities/simulated-glasses.ts +0 -76
- package/node_modules/@mentra/types/src/capabilities/vuzix-z100.ts +0 -60
- package/node_modules/@mentra/types/src/cli.ts +0 -169
- package/node_modules/@mentra/types/src/device.ts +0 -43
- package/node_modules/@mentra/types/src/enums.ts +0 -36
- package/node_modules/@mentra/types/src/hardware.ts +0 -172
- package/node_modules/@mentra/types/src/index.ts +0 -64
- package/node_modules/@mentra/types/tsconfig.json +0 -22
- package/node_modules/@mentra/types/tsconfig.tsbuildinfo +0 -1
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Error Utilities
|
|
3
|
+
*
|
|
4
|
+
* Shared error handling utilities to replace the ~20 copy-pasted
|
|
5
|
+
* error wrapping patterns throughout the old AppSession.
|
|
6
|
+
*
|
|
7
|
+
* Before (scattered across AppSession):
|
|
8
|
+
* } catch (error) {
|
|
9
|
+
* const errorMessage = error instanceof Error ? error.message : String(error);
|
|
10
|
+
* this.logger.error({ error: errorMessage }, "Something failed");
|
|
11
|
+
* }
|
|
12
|
+
*
|
|
13
|
+
* After:
|
|
14
|
+
* } catch (error) {
|
|
15
|
+
* this.logger.error({ error: toErrorMessage(error) }, "Something failed");
|
|
16
|
+
* }
|
|
17
|
+
*/
|
|
18
|
+
/**
|
|
19
|
+
* Safely extract a human-readable error message from any thrown value.
|
|
20
|
+
*
|
|
21
|
+
* JavaScript allows throwing anything — Error objects, strings, numbers,
|
|
22
|
+
* null, undefined, objects, etc. This function normalizes all of them
|
|
23
|
+
* into a string suitable for logging.
|
|
24
|
+
*
|
|
25
|
+
* @param error - Any value that was thrown or caught
|
|
26
|
+
* @returns A string error message
|
|
27
|
+
*
|
|
28
|
+
* @example
|
|
29
|
+
* ```ts
|
|
30
|
+
* try {
|
|
31
|
+
* await doSomething();
|
|
32
|
+
* } catch (error) {
|
|
33
|
+
* logger.error({ error: toErrorMessage(error) }, "doSomething failed");
|
|
34
|
+
* }
|
|
35
|
+
* ```
|
|
36
|
+
*/
|
|
37
|
+
export declare function toErrorMessage(error: unknown): string;
|
|
38
|
+
/**
|
|
39
|
+
* Wrap an unknown caught value into a proper Error instance.
|
|
40
|
+
* If it's already an Error, returns it as-is.
|
|
41
|
+
* Otherwise, creates a new Error with the extracted message.
|
|
42
|
+
*
|
|
43
|
+
* Useful when you need to re-throw or pass an Error object
|
|
44
|
+
* but the catch block might have received a non-Error value.
|
|
45
|
+
*
|
|
46
|
+
* @param error - Any value that was thrown or caught
|
|
47
|
+
* @param fallbackMessage - Optional message to use if the error has no message
|
|
48
|
+
* @returns An Error instance
|
|
49
|
+
*
|
|
50
|
+
* @example
|
|
51
|
+
* ```ts
|
|
52
|
+
* try {
|
|
53
|
+
* await riskyOperation();
|
|
54
|
+
* } catch (error) {
|
|
55
|
+
* throw toError(error, "riskyOperation failed");
|
|
56
|
+
* }
|
|
57
|
+
* ```
|
|
58
|
+
*/
|
|
59
|
+
export declare function toError(error: unknown, fallbackMessage?: string): Error;
|
|
60
|
+
/**
|
|
61
|
+
* Execute a function and swallow any errors, optionally logging them.
|
|
62
|
+
* Used for fire-and-forget operations where failure is acceptable
|
|
63
|
+
* (e.g., cleanup handlers, optional notifications, analytics).
|
|
64
|
+
*
|
|
65
|
+
* @param fn - The function to execute
|
|
66
|
+
* @param onError - Optional error handler (e.g., logger.warn)
|
|
67
|
+
*
|
|
68
|
+
* @example
|
|
69
|
+
* ```ts
|
|
70
|
+
* // Cleanup that shouldn't throw
|
|
71
|
+
* safeExec(() => transport.close(), (err) => logger.warn({ err }, "close failed"));
|
|
72
|
+
*
|
|
73
|
+
* // Fire-and-forget analytics
|
|
74
|
+
* safeExec(() => trackEvent("session_start"));
|
|
75
|
+
* ```
|
|
76
|
+
*/
|
|
77
|
+
export declare function safeExec(fn: () => void, onError?: (error: Error) => void): void;
|
|
78
|
+
/**
|
|
79
|
+
* Execute an async function and swallow any errors, optionally logging them.
|
|
80
|
+
* Async version of safeExec.
|
|
81
|
+
*
|
|
82
|
+
* @param fn - The async function to execute
|
|
83
|
+
* @param onError - Optional error handler
|
|
84
|
+
*
|
|
85
|
+
* @example
|
|
86
|
+
* ```ts
|
|
87
|
+
* await safeExecAsync(
|
|
88
|
+
* () => session.storage.set("lastActive", Date.now()),
|
|
89
|
+
* (err) => logger.warn({ err }, "Failed to persist lastActive")
|
|
90
|
+
* );
|
|
91
|
+
* ```
|
|
92
|
+
*/
|
|
93
|
+
export declare function safeExecAsync(fn: () => Promise<void>, onError?: (error: Error) => void): Promise<void>;
|
|
94
|
+
/**
|
|
95
|
+
* Log a deprecation warning once per key per process lifetime.
|
|
96
|
+
* Subsequent calls with the same key are silently ignored.
|
|
97
|
+
*
|
|
98
|
+
* @param key - Unique identifier for this deprecation (e.g., "session.layouts")
|
|
99
|
+
* @param message - The deprecation message to log
|
|
100
|
+
* @param logger - Optional structured logger; falls back to console.warn
|
|
101
|
+
*
|
|
102
|
+
* @example
|
|
103
|
+
* ```ts
|
|
104
|
+
* get layouts() {
|
|
105
|
+
* warnOnce(
|
|
106
|
+
* "session.layouts",
|
|
107
|
+
* "session.layouts is deprecated. Use session.display instead.",
|
|
108
|
+
* this.logger
|
|
109
|
+
* );
|
|
110
|
+
* return this.display;
|
|
111
|
+
* }
|
|
112
|
+
* ```
|
|
113
|
+
*/
|
|
114
|
+
export declare function warnOnce(key: string, message: string, logger?: {
|
|
115
|
+
warn: (msg: string) => void;
|
|
116
|
+
}): void;
|
|
117
|
+
/**
|
|
118
|
+
* Reset all deprecation warning state.
|
|
119
|
+
* Only useful in tests to ensure warnings fire again.
|
|
120
|
+
*/
|
|
121
|
+
export declare function resetDeprecationWarnings(): void;
|
|
122
|
+
/**
|
|
123
|
+
* Create a promise that rejects after a timeout.
|
|
124
|
+
* Useful for racing against operations that might hang.
|
|
125
|
+
*
|
|
126
|
+
* @param ms - Timeout in milliseconds
|
|
127
|
+
* @param message - Error message on timeout
|
|
128
|
+
* @returns A promise that rejects after `ms` milliseconds
|
|
129
|
+
*
|
|
130
|
+
* @example
|
|
131
|
+
* ```ts
|
|
132
|
+
* const result = await Promise.race([
|
|
133
|
+
* doSlowThing(),
|
|
134
|
+
* timeout(5000, "doSlowThing timed out after 5s"),
|
|
135
|
+
* ]);
|
|
136
|
+
* ```
|
|
137
|
+
*/
|
|
138
|
+
export declare function timeout(ms: number, message?: string): Promise<never>;
|
|
139
|
+
//# sourceMappingURL=error-utils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"error-utils.d.ts","sourceRoot":"","sources":["../../src/utils/error-utils.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAIH;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,cAAc,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,CA0BrD;AAID;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAgB,OAAO,CAAC,KAAK,EAAE,OAAO,EAAE,eAAe,CAAC,EAAE,MAAM,GAAG,KAAK,CAMvE;AAID;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,QAAQ,CAAC,EAAE,EAAE,MAAM,IAAI,EAAE,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,GAAG,IAAI,CAQ/E;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAsB,aAAa,CAAC,EAAE,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,EAAE,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAQ5G;AAWD;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAgB,QAAQ,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE;IAAE,IAAI,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,CAAA;CAAE,GAAG,IAAI,CAUrG;AAED;;;GAGG;AACH,wBAAgB,wBAAwB,IAAI,IAAI,CAE/C;AAID;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,OAAO,CAAC,EAAE,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,KAAK,CAAC,CAMpE"}
|
|
@@ -1,8 +1,31 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
1
|
+
/**
|
|
2
|
+
* permissions-utils.ts
|
|
3
|
+
*
|
|
4
|
+
* Runtime permission validation utilities for the MentraOS SDK.
|
|
5
|
+
*
|
|
6
|
+
* Queries the public permissions API endpoint to check if an app has declared
|
|
7
|
+
* the required permission for a specific feature. If the permission is missing,
|
|
8
|
+
* a warning is logged via the SDK logger (respecting log level settings).
|
|
9
|
+
*
|
|
10
|
+
* Key features:
|
|
11
|
+
* - Single generic `checkPermission()` replaces 7 copy-pasted functions
|
|
12
|
+
* - Accepts an optional pino Logger for SDK-integrated logging
|
|
13
|
+
* - Gracefully handles offline/unreachable endpoints (silent failure)
|
|
14
|
+
* - Non-blocking — allows app execution to continue even if checks fail
|
|
15
|
+
*/
|
|
16
|
+
import type { Logger } from "pino";
|
|
17
|
+
/** Check if app has microphone permission, warn if missing */
|
|
18
|
+
export declare const microPhoneWarnLog: (cloudServerUrl: string, packageName: string, funcName?: string, logger?: Logger) => void;
|
|
19
|
+
/** Check if app has location permission, warn if missing */
|
|
20
|
+
export declare const locationWarnLog: (cloudServerUrl: string, packageName: string, funcName?: string, logger?: Logger) => void;
|
|
21
|
+
/** Check if app has background location permission, warn if missing */
|
|
22
|
+
export declare const backgroundLocationWarnLog: (cloudServerUrl: string, packageName: string, funcName?: string, logger?: Logger) => void;
|
|
23
|
+
/** Check if app has calendar permission, warn if missing */
|
|
24
|
+
export declare const calendarWarnLog: (cloudServerUrl: string, packageName: string, funcName?: string, logger?: Logger) => void;
|
|
25
|
+
/** Check if app has read notifications permission, warn if missing */
|
|
26
|
+
export declare const readNotificationWarnLog: (cloudServerUrl: string, packageName: string, funcName?: string, logger?: Logger) => void;
|
|
27
|
+
/** Check if app has post notifications permission, warn if missing */
|
|
28
|
+
export declare const postNotificationWarnLog: (cloudServerUrl: string, packageName: string, funcName?: string, logger?: Logger) => void;
|
|
29
|
+
/** Check if app has camera permission, warn if missing */
|
|
30
|
+
export declare const cameraWarnLog: (cloudServerUrl: string, packageName: string, funcName?: string, logger?: Logger) => void;
|
|
8
31
|
//# sourceMappingURL=permissions-utils.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"permissions-utils.d.ts","sourceRoot":"","sources":["../../src/utils/permissions-utils.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"permissions-utils.d.ts","sourceRoot":"","sources":["../../src/utils/permissions-utils.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AACH,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,MAAM,CAAC;AAmEnC,8DAA8D;AAC9D,eAAO,MAAM,iBAAiB,GAC5B,gBAAgB,MAAM,EACtB,aAAa,MAAM,EACnB,WAAW,MAAM,EACjB,SAAS,MAAM,KACd,IAEF,CAAC;AAEF,4DAA4D;AAC5D,eAAO,MAAM,eAAe,GAC1B,gBAAgB,MAAM,EACtB,aAAa,MAAM,EACnB,WAAW,MAAM,EACjB,SAAS,MAAM,KACd,IAEF,CAAC;AAEF,uEAAuE;AACvE,eAAO,MAAM,yBAAyB,GACpC,gBAAgB,MAAM,EACtB,aAAa,MAAM,EACnB,WAAW,MAAM,EACjB,SAAS,MAAM,KACd,IAEF,CAAC;AAEF,4DAA4D;AAC5D,eAAO,MAAM,eAAe,GAC1B,gBAAgB,MAAM,EACtB,aAAa,MAAM,EACnB,WAAW,MAAM,EACjB,SAAS,MAAM,KACd,IAEF,CAAC;AAEF,sEAAsE;AACtE,eAAO,MAAM,uBAAuB,GAClC,gBAAgB,MAAM,EACtB,aAAa,MAAM,EACnB,WAAW,MAAM,EACjB,SAAS,MAAM,KACd,IAEF,CAAC;AAEF,sEAAsE;AACtE,eAAO,MAAM,uBAAuB,GAClC,gBAAgB,MAAM,EACtB,aAAa,MAAM,EACnB,WAAW,MAAM,EACjB,SAAS,MAAM,KACd,IAEF,CAAC;AAEF,0DAA0D;AAC1D,eAAO,MAAM,aAAa,GACxB,gBAAgB,MAAM,EACtB,aAAa,MAAM,EACnB,WAAW,MAAM,EACjB,SAAS,MAAM,KACd,IAEF,CAAC"}
|
|
@@ -20,7 +20,7 @@ export interface AppletPermission {
|
|
|
20
20
|
}
|
|
21
21
|
/**
|
|
22
22
|
* Minimal app interface for client home screen display
|
|
23
|
-
* Optimized for fast rendering - only essential fields
|
|
23
|
+
* Optimized for fast rendering - only essential fields
|
|
24
24
|
*
|
|
25
25
|
* This is the client-facing interface used by mobile apps.
|
|
26
26
|
* Internal cloud services use AppI from models (more fields).
|
|
@@ -35,5 +35,9 @@ export interface AppletInterface {
|
|
|
35
35
|
running: boolean;
|
|
36
36
|
healthy: boolean;
|
|
37
37
|
hardwareRequirements: HardwareRequirement[];
|
|
38
|
+
/** ISO date string when the app was installed */
|
|
39
|
+
installedDate?: string;
|
|
40
|
+
/** ISO date string when the app was last run. Undefined if never run (app is "new") */
|
|
41
|
+
lastActiveAt?: string;
|
|
38
42
|
}
|
|
39
43
|
//# sourceMappingURL=applet.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"applet.d.ts","sourceRoot":"","sources":["../src/applet.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,
|
|
1
|
+
{"version":3,"file":"applet.d.ts","sourceRoot":"","sources":["../src/applet.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,mBAAmB,EAAE,MAAM,YAAY,CAAC;AAEjD;;GAEG;AACH,MAAM,MAAM,UAAU,GAAG,UAAU,GAAG,YAAY,GAAG,kBAAkB,CAAC;AAExE;;GAEG;AACH,MAAM,MAAM,iBAAiB,GACzB,KAAK,GACL,YAAY,GACZ,QAAQ,GACR,UAAU,GACV,UAAU,GACV,qBAAqB,GACrB,oBAAoB,GACpB,oBAAoB,CAAC;AAEzB;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAC/B,IAAI,EAAE,iBAAiB,CAAC;IACxB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED;;;;;;GAMG;AACH,MAAM,WAAW,eAAe;IAC9B,WAAW,EAAE,MAAM,CAAC;IACpB,IAAI,EAAE,MAAM,CAAC;IACb,UAAU,EAAE,MAAM,CAAC;IACnB,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,UAAU,CAAC;IACjB,WAAW,EAAE,gBAAgB,EAAE,CAAC;IAChC,OAAO,EAAE,OAAO,CAAC;IACjB,OAAO,EAAE,OAAO,CAAC;IACjB,oBAAoB,EAAE,mBAAmB,EAAE,CAAC;IAC5C,iDAAiD;IACjD,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,uFAAuF;IACvF,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview Even Realities G2 Hardware Capabilities
|
|
3
|
+
*
|
|
4
|
+
* Capability profile for the Even Realities G2 smart glasses model.
|
|
5
|
+
* G2 uses the EvenHub protocol with protobuf-based commands.
|
|
6
|
+
*/
|
|
7
|
+
import type { Capabilities } from "../hardware";
|
|
8
|
+
/**
|
|
9
|
+
* Even Realities G2 capability profile
|
|
10
|
+
*/
|
|
11
|
+
export declare const evenRealitiesG2: Capabilities;
|
|
12
|
+
//# sourceMappingURL=even-realities-g2.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"even-realities-g2.d.ts","sourceRoot":"","sources":["../../src/capabilities/even-realities-g2.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAEhD;;GAEG;AACH,eAAO,MAAM,eAAe,EAAE,YAyD7B,CAAC"}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* @fileoverview Even Realities G2 Hardware Capabilities
|
|
4
|
+
*
|
|
5
|
+
* Capability profile for the Even Realities G2 smart glasses model.
|
|
6
|
+
* G2 uses the EvenHub protocol with protobuf-based commands.
|
|
7
|
+
*/
|
|
8
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
+
exports.evenRealitiesG2 = void 0;
|
|
10
|
+
/**
|
|
11
|
+
* Even Realities G2 capability profile
|
|
12
|
+
*/
|
|
13
|
+
exports.evenRealitiesG2 = {
|
|
14
|
+
modelName: "Even Realities G2",
|
|
15
|
+
// Camera capabilities - G2 does not have a camera
|
|
16
|
+
hasCamera: false,
|
|
17
|
+
camera: null,
|
|
18
|
+
// Display capabilities - G2 has a green monochrome display (similar to G1)
|
|
19
|
+
hasDisplay: true,
|
|
20
|
+
display: {
|
|
21
|
+
count: 2,
|
|
22
|
+
isColor: false,
|
|
23
|
+
color: "green",
|
|
24
|
+
canDisplayBitmap: true,
|
|
25
|
+
resolution: { width: 640, height: 200 },
|
|
26
|
+
fieldOfView: { horizontal: 25 },
|
|
27
|
+
maxTextLines: 5,
|
|
28
|
+
adjustBrightness: true,
|
|
29
|
+
},
|
|
30
|
+
// Microphone capabilities - G2 has one microphone (right side), LC3 codec
|
|
31
|
+
hasMicrophone: true,
|
|
32
|
+
microphone: {
|
|
33
|
+
count: 1,
|
|
34
|
+
hasVAD: false,
|
|
35
|
+
},
|
|
36
|
+
// Speaker capabilities - G2 does not have a speaker
|
|
37
|
+
hasSpeaker: false,
|
|
38
|
+
speaker: null,
|
|
39
|
+
// IMU capabilities - G2 has IMU
|
|
40
|
+
hasIMU: true,
|
|
41
|
+
imu: null,
|
|
42
|
+
// Button capabilities - G2 has a capacitive touchbar
|
|
43
|
+
hasButton: true,
|
|
44
|
+
button: {
|
|
45
|
+
count: 1,
|
|
46
|
+
buttons: [{
|
|
47
|
+
type: "swipe1d",
|
|
48
|
+
events: ["TAP", "DOUBLE_TAP", "TRIPLE_TAP", "PRESS_HOLD", "SWIPE_UP", "SWIPE_DOWN"],
|
|
49
|
+
isCapacitive: true,
|
|
50
|
+
}],
|
|
51
|
+
},
|
|
52
|
+
// Light capabilities - G2 does not have lights
|
|
53
|
+
hasLight: false,
|
|
54
|
+
light: null,
|
|
55
|
+
// Power capabilities
|
|
56
|
+
power: {
|
|
57
|
+
hasExternalBattery: false,
|
|
58
|
+
},
|
|
59
|
+
// WiFi capabilities - G2 does not support WiFi
|
|
60
|
+
hasWifi: false,
|
|
61
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview Mentra Display Hardware Capabilities
|
|
3
|
+
*
|
|
4
|
+
* Capability profile for the Mentra Display smart glasses model.
|
|
5
|
+
* Defines the hardware and software features available on this device.
|
|
6
|
+
*/
|
|
7
|
+
import type { Capabilities } from "../hardware";
|
|
8
|
+
/**
|
|
9
|
+
* Mentra Display capability profile
|
|
10
|
+
*/
|
|
11
|
+
export declare const mentraDisplay: Capabilities;
|
|
12
|
+
//# sourceMappingURL=mentra-display.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mentra-display.d.ts","sourceRoot":"","sources":["../../src/capabilities/mentra-display.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAEhD;;GAEG;AACH,eAAO,MAAM,aAAa,EAAE,YAkD3B,CAAC"}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* @fileoverview Mentra Display Hardware Capabilities
|
|
4
|
+
*
|
|
5
|
+
* Capability profile for the Mentra Display smart glasses model.
|
|
6
|
+
* Defines the hardware and software features available on this device.
|
|
7
|
+
*/
|
|
8
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
+
exports.mentraDisplay = void 0;
|
|
10
|
+
/**
|
|
11
|
+
* Mentra Display capability profile
|
|
12
|
+
*/
|
|
13
|
+
exports.mentraDisplay = {
|
|
14
|
+
modelName: "Mentra Display",
|
|
15
|
+
// Camera capabilities - Mentra Display does not have a camera
|
|
16
|
+
hasCamera: false,
|
|
17
|
+
camera: null,
|
|
18
|
+
// Display capabilities - Mentra Display has a green monochrome display
|
|
19
|
+
hasDisplay: true,
|
|
20
|
+
display: {
|
|
21
|
+
count: 2,
|
|
22
|
+
isColor: false,
|
|
23
|
+
color: "green",
|
|
24
|
+
canDisplayBitmap: true,
|
|
25
|
+
resolution: { width: 640, height: 200 },
|
|
26
|
+
fieldOfView: { horizontal: 25 },
|
|
27
|
+
maxTextLines: 5,
|
|
28
|
+
adjustBrightness: true,
|
|
29
|
+
},
|
|
30
|
+
// Microphone capabilities - Mentra Display has one microphone without VAD
|
|
31
|
+
hasMicrophone: true,
|
|
32
|
+
microphone: {
|
|
33
|
+
count: 1,
|
|
34
|
+
hasVAD: false,
|
|
35
|
+
},
|
|
36
|
+
// Speaker capabilities - Mentra Display does not have a speaker
|
|
37
|
+
hasSpeaker: false,
|
|
38
|
+
speaker: null,
|
|
39
|
+
// IMU capabilities - Mentra Display has IMU for head-up/down detection but raw data not exposed to apps
|
|
40
|
+
hasIMU: true,
|
|
41
|
+
imu: null,
|
|
42
|
+
// Button capabilities - Mentra Display does not have buttons
|
|
43
|
+
hasButton: false,
|
|
44
|
+
button: null,
|
|
45
|
+
// Light capabilities - Mentra Display does not have lights
|
|
46
|
+
hasLight: false,
|
|
47
|
+
light: null,
|
|
48
|
+
// Power capabilities - Mentra Display does not have external battery
|
|
49
|
+
power: {
|
|
50
|
+
hasExternalBattery: false,
|
|
51
|
+
},
|
|
52
|
+
// WiFi capabilities - Mentra Display does not support WiFi
|
|
53
|
+
hasWifi: false,
|
|
54
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview Simulated Glasses Hardware Capabilities
|
|
3
|
+
*
|
|
4
|
+
* Capability profile for the Simulated Glasses model.
|
|
5
|
+
* Defines the hardware and software features available on this device.
|
|
6
|
+
* This profile matches the Vuzix Z100 capabilities for testing purposes.
|
|
7
|
+
*/
|
|
8
|
+
import type { Capabilities } from "../hardware";
|
|
9
|
+
/**
|
|
10
|
+
* Simulated Glasses capability profile
|
|
11
|
+
*/
|
|
12
|
+
export declare const none: Capabilities;
|
|
13
|
+
//# sourceMappingURL=none.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"none.d.ts","sourceRoot":"","sources":["../../src/capabilities/none.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAEhD;;GAEG;AACH,eAAO,MAAM,IAAI,EAAE,YA8DlB,CAAC"}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* @fileoverview Simulated Glasses Hardware Capabilities
|
|
4
|
+
*
|
|
5
|
+
* Capability profile for the Simulated Glasses model.
|
|
6
|
+
* Defines the hardware and software features available on this device.
|
|
7
|
+
* This profile matches the Vuzix Z100 capabilities for testing purposes.
|
|
8
|
+
*/
|
|
9
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
+
exports.none = void 0;
|
|
11
|
+
/**
|
|
12
|
+
* Simulated Glasses capability profile
|
|
13
|
+
*/
|
|
14
|
+
exports.none = {
|
|
15
|
+
modelName: "None",
|
|
16
|
+
// Camera capabilities - does not have a camera
|
|
17
|
+
hasCamera: false,
|
|
18
|
+
camera: null,
|
|
19
|
+
// Display capabilities - has a green monochrome display
|
|
20
|
+
hasDisplay: false,
|
|
21
|
+
display: {
|
|
22
|
+
count: 1,
|
|
23
|
+
isColor: false,
|
|
24
|
+
color: "green",
|
|
25
|
+
canDisplayBitmap: false,
|
|
26
|
+
resolution: { width: 640, height: 480 },
|
|
27
|
+
fieldOfView: { horizontal: 30 },
|
|
28
|
+
maxTextLines: 7,
|
|
29
|
+
adjustBrightness: true,
|
|
30
|
+
},
|
|
31
|
+
// Microphone capabilities - has a microphone (phone mic)
|
|
32
|
+
hasMicrophone: false,
|
|
33
|
+
microphone: {
|
|
34
|
+
count: 1,
|
|
35
|
+
hasVAD: false,
|
|
36
|
+
},
|
|
37
|
+
// Speaker capabilities - has a speaker (phone speaker)
|
|
38
|
+
hasSpeaker: false,
|
|
39
|
+
speaker: {
|
|
40
|
+
count: 1,
|
|
41
|
+
isPrivate: false,
|
|
42
|
+
},
|
|
43
|
+
// IMU capabilities - does not have an IMU
|
|
44
|
+
hasIMU: false,
|
|
45
|
+
imu: null,
|
|
46
|
+
// Button capabilities - Has one simulated button
|
|
47
|
+
hasButton: false,
|
|
48
|
+
button: {
|
|
49
|
+
count: 1,
|
|
50
|
+
buttons: [
|
|
51
|
+
{
|
|
52
|
+
type: "press",
|
|
53
|
+
events: ["press"],
|
|
54
|
+
isCapacitive: false,
|
|
55
|
+
},
|
|
56
|
+
],
|
|
57
|
+
},
|
|
58
|
+
// Light capabilities - does not have lights
|
|
59
|
+
hasLight: false,
|
|
60
|
+
light: null,
|
|
61
|
+
// Power capabilities - does not have external battery
|
|
62
|
+
power: {
|
|
63
|
+
hasExternalBattery: false,
|
|
64
|
+
},
|
|
65
|
+
// WiFi capabilities - does not support WiFi
|
|
66
|
+
hasWifi: false,
|
|
67
|
+
};
|
|
@@ -13,7 +13,8 @@ export declare enum HardwareType {
|
|
|
13
13
|
IMU = "IMU",
|
|
14
14
|
BUTTON = "BUTTON",
|
|
15
15
|
LIGHT = "LIGHT",
|
|
16
|
-
WIFI = "WIFI"
|
|
16
|
+
WIFI = "WIFI",
|
|
17
|
+
EXIST = "EXIST"
|
|
17
18
|
}
|
|
18
19
|
/**
|
|
19
20
|
* Levels of hardware requirements
|
|
@@ -23,12 +24,17 @@ export declare enum HardwareRequirementLevel {
|
|
|
23
24
|
OPTIONAL = "OPTIONAL"
|
|
24
25
|
}
|
|
25
26
|
export declare enum DeviceTypes {
|
|
27
|
+
NONE = "None",
|
|
26
28
|
SIMULATED = "Simulated Glasses",
|
|
27
29
|
G1 = "Even Realities G1",
|
|
30
|
+
G2 = "Even Realities G2",
|
|
28
31
|
LIVE = "Mentra Live",
|
|
29
32
|
MACH1 = "Mentra Mach1",
|
|
30
33
|
Z100 = "Vuzix Z100",
|
|
31
|
-
NEX = "Mentra
|
|
34
|
+
NEX = "Mentra Display",
|
|
32
35
|
FRAME = "Brilliant Frame"
|
|
33
36
|
}
|
|
37
|
+
export declare enum ControllerTypes {
|
|
38
|
+
R1 = "Even Realities R1"
|
|
39
|
+
}
|
|
34
40
|
//# sourceMappingURL=enums.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"enums.d.ts","sourceRoot":"","sources":["../src/enums.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;GAEG;AACH,oBAAY,YAAY;IACtB,MAAM,WAAW;IACjB,OAAO,YAAY;IACnB,UAAU,eAAe;IACzB,OAAO,YAAY;IACnB,GAAG,QAAQ;IACX,MAAM,WAAW;IACjB,KAAK,UAAU;IACf,IAAI,SAAS;
|
|
1
|
+
{"version":3,"file":"enums.d.ts","sourceRoot":"","sources":["../src/enums.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;GAEG;AACH,oBAAY,YAAY;IACtB,MAAM,WAAW;IACjB,OAAO,YAAY;IACnB,UAAU,eAAe;IACzB,OAAO,YAAY;IACnB,GAAG,QAAQ;IACX,MAAM,WAAW;IACjB,KAAK,UAAU;IACf,IAAI,SAAS;IACb,KAAK,UAAU;CAChB;AAED;;GAEG;AACH,oBAAY,wBAAwB;IAClC,QAAQ,aAAa,CAAE,4CAA4C;IACnE,QAAQ,aAAa;CACtB;AAED,oBAAY,WAAW;IACrB,IAAI,SAAS;IACb,SAAS,sBAAsB;IAC/B,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"}
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* These are runtime values (not pure types)
|
|
5
5
|
*/
|
|
6
6
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
-
exports.DeviceTypes = exports.HardwareRequirementLevel = exports.HardwareType = void 0;
|
|
7
|
+
exports.ControllerTypes = exports.DeviceTypes = exports.HardwareRequirementLevel = exports.HardwareType = void 0;
|
|
8
8
|
/**
|
|
9
9
|
* Hardware component types that apps can require
|
|
10
10
|
*/
|
|
@@ -18,6 +18,7 @@ var HardwareType;
|
|
|
18
18
|
HardwareType["BUTTON"] = "BUTTON";
|
|
19
19
|
HardwareType["LIGHT"] = "LIGHT";
|
|
20
20
|
HardwareType["WIFI"] = "WIFI";
|
|
21
|
+
HardwareType["EXIST"] = "EXIST";
|
|
21
22
|
})(HardwareType || (exports.HardwareType = HardwareType = {}));
|
|
22
23
|
/**
|
|
23
24
|
* Levels of hardware requirements
|
|
@@ -29,11 +30,17 @@ var HardwareRequirementLevel;
|
|
|
29
30
|
})(HardwareRequirementLevel || (exports.HardwareRequirementLevel = HardwareRequirementLevel = {}));
|
|
30
31
|
var DeviceTypes;
|
|
31
32
|
(function (DeviceTypes) {
|
|
33
|
+
DeviceTypes["NONE"] = "None";
|
|
32
34
|
DeviceTypes["SIMULATED"] = "Simulated Glasses";
|
|
33
35
|
DeviceTypes["G1"] = "Even Realities G1";
|
|
36
|
+
DeviceTypes["G2"] = "Even Realities G2";
|
|
34
37
|
DeviceTypes["LIVE"] = "Mentra Live";
|
|
35
38
|
DeviceTypes["MACH1"] = "Mentra Mach1";
|
|
36
39
|
DeviceTypes["Z100"] = "Vuzix Z100";
|
|
37
|
-
DeviceTypes["NEX"] = "Mentra
|
|
40
|
+
DeviceTypes["NEX"] = "Mentra Display";
|
|
38
41
|
DeviceTypes["FRAME"] = "Brilliant Frame";
|
|
39
42
|
})(DeviceTypes || (exports.DeviceTypes = DeviceTypes = {}));
|
|
43
|
+
var ControllerTypes;
|
|
44
|
+
(function (ControllerTypes) {
|
|
45
|
+
ControllerTypes["R1"] = "Even Realities R1";
|
|
46
|
+
})(ControllerTypes || (exports.ControllerTypes = ControllerTypes = {}));
|
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
* @mentra/types - Hardware capability types
|
|
3
3
|
*/
|
|
4
4
|
import { evenRealitiesG1 } from "./capabilities/even-realities-g1";
|
|
5
|
+
import { evenRealitiesG2 } from "./capabilities/even-realities-g2";
|
|
6
|
+
import { mentraDisplay } from "./capabilities/mentra-display";
|
|
5
7
|
import { mentraLive } from "./capabilities/mentra-live";
|
|
6
8
|
import { simulatedGlasses } from "./capabilities/simulated-glasses";
|
|
7
9
|
import { vuzixZ100 } from "./capabilities/vuzix-z100";
|
|
@@ -137,5 +139,5 @@ export interface Capabilities {
|
|
|
137
139
|
*/
|
|
138
140
|
export declare const HARDWARE_CAPABILITIES: Record<string, Capabilities>;
|
|
139
141
|
export declare const getModelCapabilities: (deviceType: DeviceTypes) => Capabilities;
|
|
140
|
-
export { simulatedGlasses, evenRealitiesG1, mentraLive, vuzixZ100 };
|
|
142
|
+
export { simulatedGlasses, evenRealitiesG1, evenRealitiesG2, mentraLive, vuzixZ100, mentraDisplay };
|
|
141
143
|
//# sourceMappingURL=hardware.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hardware.d.ts","sourceRoot":"","sources":["../src/hardware.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,eAAe,EAAE,MAAM,kCAAkC,CAAC;AACnE,OAAO,EAAE,UAAU,EAAE,MAAM,4BAA4B,CAAC;AACxD,OAAO,EAAE,gBAAgB,EAAE,MAAM,kCAAkC,CAAC;AACpE,OAAO,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;
|
|
1
|
+
{"version":3,"file":"hardware.d.ts","sourceRoot":"","sources":["../src/hardware.ts"],"names":[],"mappings":"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"}
|
|
@@ -3,15 +3,21 @@
|
|
|
3
3
|
* @mentra/types - Hardware capability types
|
|
4
4
|
*/
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.vuzixZ100 = exports.mentraLive = exports.evenRealitiesG1 = exports.simulatedGlasses = exports.getModelCapabilities = exports.HARDWARE_CAPABILITIES = void 0;
|
|
6
|
+
exports.mentraDisplay = exports.vuzixZ100 = exports.mentraLive = exports.evenRealitiesG2 = exports.evenRealitiesG1 = exports.simulatedGlasses = exports.getModelCapabilities = exports.HARDWARE_CAPABILITIES = void 0;
|
|
7
7
|
const even_realities_g1_1 = require("./capabilities/even-realities-g1");
|
|
8
8
|
Object.defineProperty(exports, "evenRealitiesG1", { enumerable: true, get: function () { return even_realities_g1_1.evenRealitiesG1; } });
|
|
9
|
+
const even_realities_g2_1 = require("./capabilities/even-realities-g2");
|
|
10
|
+
Object.defineProperty(exports, "evenRealitiesG2", { enumerable: true, get: function () { return even_realities_g2_1.evenRealitiesG2; } });
|
|
11
|
+
const mentra_display_1 = require("./capabilities/mentra-display");
|
|
12
|
+
Object.defineProperty(exports, "mentraDisplay", { enumerable: true, get: function () { return mentra_display_1.mentraDisplay; } });
|
|
9
13
|
const mentra_live_1 = require("./capabilities/mentra-live");
|
|
10
14
|
Object.defineProperty(exports, "mentraLive", { enumerable: true, get: function () { return mentra_live_1.mentraLive; } });
|
|
11
15
|
const simulated_glasses_1 = require("./capabilities/simulated-glasses");
|
|
12
16
|
Object.defineProperty(exports, "simulatedGlasses", { enumerable: true, get: function () { return simulated_glasses_1.simulatedGlasses; } });
|
|
13
17
|
const vuzix_z100_1 = require("./capabilities/vuzix-z100");
|
|
14
18
|
Object.defineProperty(exports, "vuzixZ100", { enumerable: true, get: function () { return vuzix_z100_1.vuzixZ100; } });
|
|
19
|
+
const none_1 = require("./capabilities/none");
|
|
20
|
+
const enums_1 = require("./enums");
|
|
15
21
|
/**
|
|
16
22
|
* Hardware capability profiles for supported glasses models
|
|
17
23
|
* Key: model_name string (e.g., "Even Realities G1", "Mentra Live")
|
|
@@ -19,14 +25,18 @@ Object.defineProperty(exports, "vuzixZ100", { enumerable: true, get: function ()
|
|
|
19
25
|
*/
|
|
20
26
|
exports.HARDWARE_CAPABILITIES = {
|
|
21
27
|
[even_realities_g1_1.evenRealitiesG1.modelName]: even_realities_g1_1.evenRealitiesG1,
|
|
28
|
+
[even_realities_g2_1.evenRealitiesG2.modelName]: even_realities_g2_1.evenRealitiesG2,
|
|
29
|
+
[mentra_display_1.mentraDisplay.modelName]: mentra_display_1.mentraDisplay,
|
|
22
30
|
[mentra_live_1.mentraLive.modelName]: mentra_live_1.mentraLive,
|
|
23
31
|
[simulated_glasses_1.simulatedGlasses.modelName]: simulated_glasses_1.simulatedGlasses,
|
|
24
32
|
[vuzix_z100_1.vuzixZ100.modelName]: vuzix_z100_1.vuzixZ100,
|
|
33
|
+
[enums_1.DeviceTypes.MACH1]: vuzix_z100_1.vuzixZ100, // Mach1 uses same Vuzix Ultralite hardware as Z100
|
|
34
|
+
[none_1.none.modelName]: none_1.none,
|
|
25
35
|
};
|
|
26
36
|
const getModelCapabilities = (deviceType) => {
|
|
27
37
|
const modelName = deviceType;
|
|
28
38
|
if (!exports.HARDWARE_CAPABILITIES[modelName]) {
|
|
29
|
-
return exports.HARDWARE_CAPABILITIES[
|
|
39
|
+
return exports.HARDWARE_CAPABILITIES[enums_1.DeviceTypes.NONE];
|
|
30
40
|
}
|
|
31
41
|
return exports.HARDWARE_CAPABILITIES[modelName];
|
|
32
42
|
};
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
* - Enums (runtime values) → export { ... }
|
|
10
10
|
* - Types/Interfaces (compile-time only) → export type { ... }
|
|
11
11
|
*/
|
|
12
|
-
export { HardwareType, HardwareRequirementLevel, DeviceTypes } from "./enums";
|
|
12
|
+
export { HardwareType, HardwareRequirementLevel, DeviceTypes, ControllerTypes } from "./enums";
|
|
13
13
|
export type { HardwareRequirement, CameraCapabilities, DisplayCapabilities, MicrophoneCapabilities, SpeakerCapabilities, IMUCapabilities, ButtonCapabilities, LightCapabilities, PowerCapabilities, Capabilities, } from "./hardware";
|
|
14
14
|
export { HARDWARE_CAPABILITIES, getModelCapabilities } from "./hardware";
|
|
15
15
|
export type { AppletType, AppPermissionType, AppletPermission, AppletInterface } from "./applet";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAMH,OAAO,EAAC,YAAY,EAAE,wBAAwB,EAAE,WAAW,EAAC,MAAM,SAAS,CAAA;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAMH,OAAO,EAAC,YAAY,EAAE,wBAAwB,EAAE,WAAW,EAAE,eAAe,EAAC,MAAM,SAAS,CAAA;AAM5F,YAAY,EACV,mBAAmB,EACnB,kBAAkB,EAClB,mBAAmB,EACnB,sBAAsB,EACtB,mBAAmB,EACnB,eAAe,EACf,kBAAkB,EAClB,iBAAiB,EACjB,iBAAiB,EACjB,YAAY,GACb,MAAM,YAAY,CAAA;AAGnB,OAAO,EAAC,qBAAqB,EAAE,oBAAoB,EAAC,MAAM,YAAY,CAAA;AAMtE,YAAY,EAAC,UAAU,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,eAAe,EAAC,MAAM,UAAU,CAAA;AAM9F,YAAY,EAAC,WAAW,EAAC,MAAM,UAAU,CAAA;AAMzC,YAAY,EACV,SAAS,EACT,iBAAiB,EACjB,qBAAqB,EACrB,sBAAsB,EACtB,mBAAmB,EACnB,eAAe,EACf,cAAc,EACd,KAAK,GACN,MAAM,OAAO,CAAA"}
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
* - Types/Interfaces (compile-time only) → export type { ... }
|
|
12
12
|
*/
|
|
13
13
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
14
|
-
exports.getModelCapabilities = exports.HARDWARE_CAPABILITIES = exports.DeviceTypes = exports.HardwareRequirementLevel = exports.HardwareType = void 0;
|
|
14
|
+
exports.getModelCapabilities = exports.HARDWARE_CAPABILITIES = exports.ControllerTypes = exports.DeviceTypes = exports.HardwareRequirementLevel = exports.HardwareType = void 0;
|
|
15
15
|
// ============================================================================
|
|
16
16
|
// Enums (runtime values)
|
|
17
17
|
// ============================================================================
|
|
@@ -19,6 +19,7 @@ var enums_1 = require("./enums");
|
|
|
19
19
|
Object.defineProperty(exports, "HardwareType", { enumerable: true, get: function () { return enums_1.HardwareType; } });
|
|
20
20
|
Object.defineProperty(exports, "HardwareRequirementLevel", { enumerable: true, get: function () { return enums_1.HardwareRequirementLevel; } });
|
|
21
21
|
Object.defineProperty(exports, "DeviceTypes", { enumerable: true, get: function () { return enums_1.DeviceTypes; } });
|
|
22
|
+
Object.defineProperty(exports, "ControllerTypes", { enumerable: true, get: function () { return enums_1.ControllerTypes; } });
|
|
22
23
|
// not a type:
|
|
23
24
|
var hardware_1 = require("./hardware");
|
|
24
25
|
Object.defineProperty(exports, "HARDWARE_CAPABILITIES", { enumerable: true, get: function () { return hardware_1.HARDWARE_CAPABILITIES; } });
|