@mentra/sdk 2.1.30-beta.1 → 2.1.31-beta.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (67) hide show
  1. package/dist/app/server/index.d.ts +2 -1
  2. package/dist/app/server/index.d.ts.map +1 -1
  3. package/dist/app/session/device-state.d.ts +83 -0
  4. package/dist/app/session/device-state.d.ts.map +1 -0
  5. package/dist/app/session/index.d.ts +21 -7
  6. package/dist/app/session/index.d.ts.map +1 -1
  7. package/dist/index.d.ts +6 -3
  8. package/dist/index.d.ts.map +1 -1
  9. package/dist/index.js +205 -9
  10. package/dist/index.js.map +12 -10
  11. package/dist/types/capabilities.d.ts +3 -90
  12. package/dist/types/capabilities.d.ts.map +1 -1
  13. package/dist/types/index.d.ts +1 -1
  14. package/dist/types/index.d.ts.map +1 -1
  15. package/dist/types/message-types.d.ts +3 -1
  16. package/dist/types/message-types.d.ts.map +1 -1
  17. package/dist/types/messages/app-to-cloud.d.ts +15 -1
  18. package/dist/types/messages/app-to-cloud.d.ts.map +1 -1
  19. package/dist/types/messages/cloud-to-app.d.ts +14 -1
  20. package/dist/types/messages/cloud-to-app.d.ts.map +1 -1
  21. package/dist/utils/Observable.d.ts +92 -0
  22. package/dist/utils/Observable.d.ts.map +1 -0
  23. package/node_modules/@mentra/types/README.md +134 -0
  24. package/node_modules/@mentra/types/dist/applet.d.ts +39 -0
  25. package/node_modules/@mentra/types/dist/applet.d.ts.map +1 -0
  26. package/node_modules/@mentra/types/dist/applet.js +5 -0
  27. package/node_modules/@mentra/types/dist/capabilities/even-realities-g1.d.ts +12 -0
  28. package/node_modules/@mentra/types/dist/capabilities/even-realities-g1.d.ts.map +1 -0
  29. package/node_modules/@mentra/types/dist/capabilities/even-realities-g1.js +54 -0
  30. package/node_modules/@mentra/types/dist/capabilities/mentra-live.d.ts +12 -0
  31. package/node_modules/@mentra/types/dist/capabilities/mentra-live.d.ts.map +1 -0
  32. package/node_modules/@mentra/types/dist/capabilities/mentra-live.js +94 -0
  33. package/node_modules/@mentra/types/dist/capabilities/simulated-glasses.d.ts +13 -0
  34. package/node_modules/@mentra/types/dist/capabilities/simulated-glasses.d.ts.map +1 -0
  35. package/node_modules/@mentra/types/dist/capabilities/simulated-glasses.js +67 -0
  36. package/node_modules/@mentra/types/dist/capabilities/vuzix-z100.d.ts +12 -0
  37. package/node_modules/@mentra/types/dist/capabilities/vuzix-z100.d.ts.map +1 -0
  38. package/node_modules/@mentra/types/dist/capabilities/vuzix-z100.js +51 -0
  39. package/node_modules/@mentra/types/dist/cli.d.ts +130 -0
  40. package/node_modules/@mentra/types/dist/cli.d.ts.map +1 -0
  41. package/node_modules/@mentra/types/dist/cli.js +7 -0
  42. package/node_modules/@mentra/types/dist/device.d.ts +32 -0
  43. package/node_modules/@mentra/types/dist/device.d.ts.map +1 -0
  44. package/node_modules/@mentra/types/dist/device.js +6 -0
  45. package/node_modules/@mentra/types/dist/enums.d.ts +34 -0
  46. package/node_modules/@mentra/types/dist/enums.d.ts.map +1 -0
  47. package/node_modules/@mentra/types/dist/enums.js +39 -0
  48. package/node_modules/@mentra/types/dist/hardware.d.ts +141 -0
  49. package/node_modules/@mentra/types/dist/hardware.d.ts.map +1 -0
  50. package/node_modules/@mentra/types/dist/hardware.js +33 -0
  51. package/node_modules/@mentra/types/dist/index.d.ts +18 -0
  52. package/node_modules/@mentra/types/dist/index.d.ts.map +1 -0
  53. package/node_modules/@mentra/types/dist/index.js +25 -0
  54. package/node_modules/@mentra/types/package.json +31 -0
  55. package/node_modules/@mentra/types/src/applet.ts +51 -0
  56. package/node_modules/@mentra/types/src/capabilities/even-realities-g1.ts +63 -0
  57. package/node_modules/@mentra/types/src/capabilities/mentra-live.ts +103 -0
  58. package/node_modules/@mentra/types/src/capabilities/simulated-glasses.ts +76 -0
  59. package/node_modules/@mentra/types/src/capabilities/vuzix-z100.ts +60 -0
  60. package/node_modules/@mentra/types/src/cli.ts +169 -0
  61. package/node_modules/@mentra/types/src/device.ts +43 -0
  62. package/node_modules/@mentra/types/src/enums.ts +36 -0
  63. package/node_modules/@mentra/types/src/hardware.ts +172 -0
  64. package/node_modules/@mentra/types/src/index.ts +64 -0
  65. package/node_modules/@mentra/types/tsconfig.json +22 -0
  66. package/node_modules/@mentra/types/tsconfig.tsbuildinfo +1 -0
  67. package/package.json +6 -3
@@ -0,0 +1,141 @@
1
+ /**
2
+ * @mentra/types - Hardware capability types
3
+ */
4
+ import { evenRealitiesG1 } from "./capabilities/even-realities-g1";
5
+ import { mentraLive } from "./capabilities/mentra-live";
6
+ import { simulatedGlasses } from "./capabilities/simulated-glasses";
7
+ import { vuzixZ100 } from "./capabilities/vuzix-z100";
8
+ import { DeviceTypes, HardwareRequirementLevel, HardwareType } from "./enums";
9
+ /**
10
+ * Hardware requirement for an app
11
+ * Specifies what hardware components an app needs
12
+ */
13
+ export interface HardwareRequirement {
14
+ type: HardwareType;
15
+ level: HardwareRequirementLevel;
16
+ description?: string;
17
+ }
18
+ /**
19
+ * Camera capabilities
20
+ */
21
+ export interface CameraCapabilities {
22
+ resolution?: {
23
+ width: number;
24
+ height: number;
25
+ };
26
+ hasHDR?: boolean;
27
+ hasFocus?: boolean;
28
+ video: {
29
+ canRecord: boolean;
30
+ canStream: boolean;
31
+ supportedStreamTypes?: string[];
32
+ supportedResolutions?: {
33
+ width: number;
34
+ height: number;
35
+ }[];
36
+ };
37
+ }
38
+ /**
39
+ * Display capabilities
40
+ */
41
+ export interface DisplayCapabilities {
42
+ count?: number;
43
+ isColor?: boolean;
44
+ color?: string;
45
+ canDisplayBitmap?: boolean;
46
+ resolution?: {
47
+ width: number;
48
+ height: number;
49
+ };
50
+ fieldOfView?: {
51
+ horizontal?: number;
52
+ vertical?: number;
53
+ };
54
+ maxTextLines?: number;
55
+ adjustBrightness?: boolean;
56
+ }
57
+ /**
58
+ * Microphone capabilities
59
+ */
60
+ export interface MicrophoneCapabilities {
61
+ count?: number;
62
+ hasVAD?: boolean;
63
+ }
64
+ /**
65
+ * Speaker capabilities
66
+ */
67
+ export interface SpeakerCapabilities {
68
+ count?: number;
69
+ isPrivate?: boolean;
70
+ }
71
+ /**
72
+ * IMU (Inertial Measurement Unit) capabilities
73
+ */
74
+ export interface IMUCapabilities {
75
+ axisCount?: number;
76
+ hasAccelerometer?: boolean;
77
+ hasCompass?: boolean;
78
+ hasGyroscope?: boolean;
79
+ }
80
+ /**
81
+ * Button capabilities
82
+ */
83
+ export interface ButtonCapabilities {
84
+ count?: number;
85
+ buttons?: {
86
+ type: "press" | "swipe1d" | "swipe2d";
87
+ events: string[];
88
+ isCapacitive?: boolean;
89
+ }[];
90
+ }
91
+ /**
92
+ * Light capabilities
93
+ */
94
+ export interface LightCapabilities {
95
+ count?: number;
96
+ lights?: {
97
+ id: string;
98
+ purpose: "privacy" | "user_feedback" | "general";
99
+ isFullColor: boolean;
100
+ color?: string;
101
+ position?: "front_facing" | "user_facing" | "side" | "unknown";
102
+ }[];
103
+ }
104
+ /**
105
+ * Power capabilities
106
+ */
107
+ export interface PowerCapabilities {
108
+ hasExternalBattery: boolean;
109
+ }
110
+ /**
111
+ * Device hardware capabilities
112
+ * Complete information about what hardware a device has
113
+ */
114
+ export interface Capabilities {
115
+ modelName: string;
116
+ hasCamera: boolean;
117
+ camera: CameraCapabilities | null;
118
+ hasDisplay: boolean;
119
+ display: DisplayCapabilities | null;
120
+ hasMicrophone: boolean;
121
+ microphone: MicrophoneCapabilities | null;
122
+ hasSpeaker: boolean;
123
+ speaker: SpeakerCapabilities | null;
124
+ hasIMU: boolean;
125
+ imu: IMUCapabilities | null;
126
+ hasButton: boolean;
127
+ button: ButtonCapabilities | null;
128
+ hasLight: boolean;
129
+ light: LightCapabilities | null;
130
+ power: PowerCapabilities;
131
+ hasWifi: boolean;
132
+ }
133
+ /**
134
+ * Hardware capability profiles for supported glasses models
135
+ * Key: model_name string (e.g., "Even Realities G1", "Mentra Live")
136
+ * Value: Capabilities object defining device features
137
+ */
138
+ export declare const HARDWARE_CAPABILITIES: Record<string, Capabilities>;
139
+ export declare const getModelCapabilities: (deviceType: DeviceTypes) => Capabilities;
140
+ export { simulatedGlasses, evenRealitiesG1, mentraLive, vuzixZ100 };
141
+ //# sourceMappingURL=hardware.d.ts.map
@@ -0,0 +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;AACtD,OAAO,EAAE,WAAW,EAAE,wBAAwB,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAE9E;;;GAGG;AACH,MAAM,WAAW,mBAAmB;IAClC,IAAI,EAAE,YAAY,CAAC;IACnB,KAAK,EAAE,wBAAwB,CAAC;IAChC,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED;;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;QACnB,SAAS,EAAE,OAAO,CAAC;QACnB,oBAAoB,CAAC,EAAE,MAAM,EAAE,CAAC;QAChC,oBAAoB,CAAC,EAAE;YAAE,KAAK,EAAE,MAAM,CAAC;YAAC,MAAM,EAAE,MAAM,CAAA;SAAE,EAAE,CAAC;KAC5D,CAAC;CACH;AAED;;GAEG;AACH,MAAM,WAAW,mBAAmB;IAClC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,O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vuzixZ100 = exports.mentraLive = exports.evenRealitiesG1 = exports.simulatedGlasses = exports.getModelCapabilities = exports.HARDWARE_CAPABILITIES = void 0;
7
+ const even_realities_g1_1 = require("./capabilities/even-realities-g1");
8
+ Object.defineProperty(exports, "evenRealitiesG1", { enumerable: true, get: function () { return even_realities_g1_1.evenRealitiesG1; } });
9
+ const mentra_live_1 = require("./capabilities/mentra-live");
10
+ Object.defineProperty(exports, "mentraLive", { enumerable: true, get: function () { return mentra_live_1.mentraLive; } });
11
+ const simulated_glasses_1 = require("./capabilities/simulated-glasses");
12
+ Object.defineProperty(exports, "simulatedGlasses", { enumerable: true, get: function () { return simulated_glasses_1.simulatedGlasses; } });
13
+ const vuzix_z100_1 = require("./capabilities/vuzix-z100");
14
+ Object.defineProperty(exports, "vuzixZ100", { enumerable: true, get: function () { return vuzix_z100_1.vuzixZ100; } });
15
+ /**
16
+ * Hardware capability profiles for supported glasses models
17
+ * Key: model_name string (e.g., "Even Realities G1", "Mentra Live")
18
+ * Value: Capabilities object defining device features
19
+ */
20
+ exports.HARDWARE_CAPABILITIES = {
21
+ [even_realities_g1_1.evenRealitiesG1.modelName]: even_realities_g1_1.evenRealitiesG1,
22
+ [mentra_live_1.mentraLive.modelName]: mentra_live_1.mentraLive,
23
+ [simulated_glasses_1.simulatedGlasses.modelName]: simulated_glasses_1.simulatedGlasses,
24
+ [vuzix_z100_1.vuzixZ100.modelName]: vuzix_z100_1.vuzixZ100,
25
+ };
26
+ const getModelCapabilities = (deviceType) => {
27
+ const modelName = deviceType;
28
+ if (!exports.HARDWARE_CAPABILITIES[modelName]) {
29
+ return exports.HARDWARE_CAPABILITIES[simulated_glasses_1.simulatedGlasses.modelName];
30
+ }
31
+ return exports.HARDWARE_CAPABILITIES[modelName];
32
+ };
33
+ exports.getModelCapabilities = getModelCapabilities;
@@ -0,0 +1,18 @@
1
+ /**
2
+ * @mentra/types - Shared types for MentraOS
3
+ *
4
+ * IMPORTANT: Uses explicit exports for Bun compatibility
5
+ * DO NOT use `export *` - Bun runtime can't handle type re-exports
6
+ * See: cloud/issues/todo/sdk-type-exports/README.md
7
+ *
8
+ * Pattern:
9
+ * - Enums (runtime values) → export { ... }
10
+ * - Types/Interfaces (compile-time only) → export type { ... }
11
+ */
12
+ export { HardwareType, HardwareRequirementLevel, DeviceTypes } from "./enums";
13
+ export type { HardwareRequirement, CameraCapabilities, DisplayCapabilities, MicrophoneCapabilities, SpeakerCapabilities, IMUCapabilities, ButtonCapabilities, LightCapabilities, PowerCapabilities, Capabilities, } from "./hardware";
14
+ export { HARDWARE_CAPABILITIES, getModelCapabilities } from "./hardware";
15
+ export type { AppletType, AppPermissionType, AppletPermission, AppletInterface } from "./applet";
16
+ export type { GlassesInfo } from "./device";
17
+ export type { CLIApiKey, CLIApiKeyListItem, GenerateCLIKeyRequest, GenerateCLIKeyResponse, UpdateCLIKeyRequest, CLITokenPayload, CLICredentials, Cloud, } from "./cli";
18
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +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;AAM3E,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"}
@@ -0,0 +1,25 @@
1
+ "use strict";
2
+ /**
3
+ * @mentra/types - Shared types for MentraOS
4
+ *
5
+ * IMPORTANT: Uses explicit exports for Bun compatibility
6
+ * DO NOT use `export *` - Bun runtime can't handle type re-exports
7
+ * See: cloud/issues/todo/sdk-type-exports/README.md
8
+ *
9
+ * Pattern:
10
+ * - Enums (runtime values) → export { ... }
11
+ * - Types/Interfaces (compile-time only) → export type { ... }
12
+ */
13
+ Object.defineProperty(exports, "__esModule", { value: true });
14
+ exports.getModelCapabilities = exports.HARDWARE_CAPABILITIES = exports.DeviceTypes = exports.HardwareRequirementLevel = exports.HardwareType = void 0;
15
+ // ============================================================================
16
+ // Enums (runtime values)
17
+ // ============================================================================
18
+ var enums_1 = require("./enums");
19
+ Object.defineProperty(exports, "HardwareType", { enumerable: true, get: function () { return enums_1.HardwareType; } });
20
+ Object.defineProperty(exports, "HardwareRequirementLevel", { enumerable: true, get: function () { return enums_1.HardwareRequirementLevel; } });
21
+ Object.defineProperty(exports, "DeviceTypes", { enumerable: true, get: function () { return enums_1.DeviceTypes; } });
22
+ // not a type:
23
+ var hardware_1 = require("./hardware");
24
+ Object.defineProperty(exports, "HARDWARE_CAPABILITIES", { enumerable: true, get: function () { return hardware_1.HARDWARE_CAPABILITIES; } });
25
+ Object.defineProperty(exports, "getModelCapabilities", { enumerable: true, get: function () { return hardware_1.getModelCapabilities; } });
@@ -0,0 +1,31 @@
1
+ {
2
+ "name": "@mentra/types",
3
+ "version": "1.0.0",
4
+ "description": "Shared TypeScript types for MentraOS client and cloud",
5
+ "main": "dist/index.js",
6
+ "types": "dist/index.d.ts",
7
+ "exports": {
8
+ "development": {
9
+ "import": "./src/index.ts",
10
+ "require": "./src/index.ts",
11
+ "types": "./src/index.ts"
12
+ },
13
+ "default": {
14
+ "import": "./dist/index.js",
15
+ "require": "./dist/index.js",
16
+ "types": "./dist/index.d.ts"
17
+ }
18
+ },
19
+ "scripts": {
20
+ "build": "rm -rf dist && bun x tsc -p tsconfig.json",
21
+ "dev": "bun x tsc --watch",
22
+ "typecheck": "bun x tsc --noEmit",
23
+ "prepare": "bun run build"
24
+ },
25
+ "devDependencies": {
26
+ "typescript": "^5.0.0"
27
+ },
28
+ "files": [
29
+ "dist"
30
+ ]
31
+ }
@@ -0,0 +1,51 @@
1
+ /**
2
+ * @mentra/types - App/Applet types for client interfaces
3
+ */
4
+
5
+ import {HardwareRequirement} from "./hardware"
6
+
7
+ /**
8
+ * App execution model types
9
+ */
10
+ export type AppletType = "standard" | "background" | "system_dashboard";
11
+
12
+ /**
13
+ * Permission types that apps can request
14
+ */
15
+ export type AppPermissionType =
16
+ | "ALL"
17
+ | "MICROPHONE"
18
+ | "CAMERA"
19
+ | "CALENDAR"
20
+ | "LOCATION"
21
+ | "BACKGROUND_LOCATION"
22
+ | "READ_NOTIFICATIONS"
23
+ | "POST_NOTIFICATIONS";
24
+
25
+ /**
26
+ * Permission object with type and description
27
+ */
28
+ export interface AppletPermission {
29
+ type: AppPermissionType;
30
+ description?: string;
31
+ required?: boolean;
32
+ }
33
+
34
+ /**
35
+ * Minimal app interface for client home screen display
36
+ * Optimized for fast rendering - only essential fields (9 fields)
37
+ *
38
+ * This is the client-facing interface used by mobile apps.
39
+ * Internal cloud services use AppI from models (more fields).
40
+ */
41
+ export interface AppletInterface {
42
+ packageName: string;
43
+ name: string;
44
+ webviewUrl: string;
45
+ logoUrl: string;
46
+ type: AppletType;
47
+ permissions: AppletPermission[];
48
+ running: boolean;
49
+ healthy: boolean;
50
+ hardwareRequirements: HardwareRequirement[];
51
+ }
@@ -0,0 +1,63 @@
1
+ /**
2
+ * @fileoverview Even Realities G1 Hardware Capabilities
3
+ *
4
+ * Capability profile for the Even Realities G1 smart glasses model.
5
+ * Defines the hardware and software features available on this device.
6
+ */
7
+
8
+ import type { Capabilities } from "../hardware";
9
+
10
+ /**
11
+ * Even Realities G1 capability profile
12
+ */
13
+ export const evenRealitiesG1: Capabilities = {
14
+ modelName: "Even Realities G1",
15
+
16
+ // Camera capabilities - G1 does not have a camera
17
+ hasCamera: false,
18
+ camera: null,
19
+
20
+ // Display capabilities - G1 has a green monochrome display
21
+ hasDisplay: true,
22
+ display: {
23
+ count: 2,
24
+ isColor: false,
25
+ color: "green",
26
+ canDisplayBitmap: true,
27
+ resolution: { width: 640, height: 200 },
28
+ fieldOfView: { horizontal: 25 },
29
+ maxTextLines: 5,
30
+ adjustBrightness: true,
31
+ },
32
+
33
+ // Microphone capabilities - G1 has one microphone without VAD
34
+ hasMicrophone: true,
35
+ microphone: {
36
+ count: 1,
37
+ hasVAD: false,
38
+ },
39
+
40
+ // Speaker capabilities - G1 does not have a speaker
41
+ hasSpeaker: false,
42
+ speaker: null,
43
+
44
+ // IMU capabilities - G1 has IMU for head-up/down detection but raw data not exposed to apps
45
+ hasIMU: true,
46
+ imu: null,
47
+
48
+ // Button capabilities - G1 does not have buttons
49
+ hasButton: false,
50
+ button: null,
51
+
52
+ // Light capabilities - G1 does not have lights
53
+ hasLight: false,
54
+ light: null,
55
+
56
+ // Power capabilities - G1 does not have external battery
57
+ power: {
58
+ hasExternalBattery: false,
59
+ },
60
+
61
+ // WiFi capabilities - G1 does not support WiFi
62
+ hasWifi: false,
63
+ };
@@ -0,0 +1,103 @@
1
+ /**
2
+ * @fileoverview Mentra Live Hardware Capabilities
3
+ *
4
+ * Capability profile for the Mentra Live smart glasses model.
5
+ * Defines the hardware and software features available on this device.
6
+ */
7
+
8
+ import type { Capabilities } from "../hardware";
9
+
10
+ /**
11
+ * Mentra Live capability profile
12
+ */
13
+ export const mentraLive: Capabilities = {
14
+ modelName: "Mentra Live",
15
+
16
+ // Camera capabilities - Mentra Live has camera with streaming
17
+ hasCamera: true,
18
+ camera: {
19
+ resolution: { width: 1920, height: 1080 },
20
+ hasHDR: false,
21
+ hasFocus: true,
22
+ video: {
23
+ canRecord: true,
24
+ canStream: true,
25
+ supportedStreamTypes: ["rtmp"],
26
+ supportedResolutions: [
27
+ { width: 1920, height: 1080 },
28
+ { width: 1280, height: 720 },
29
+ { width: 640, height: 480 },
30
+ ],
31
+ },
32
+ },
33
+
34
+ // Display capabilities - Mentra Live does not have a display
35
+ hasDisplay: false,
36
+ display: null,
37
+
38
+ // Microphone capabilities - Mentra Live has one microphone with VAD
39
+ hasMicrophone: true,
40
+ microphone: {
41
+ count: 1,
42
+ hasVAD: true,
43
+ },
44
+
45
+ // Speaker capabilities - Mentra Live has one standard speaker
46
+ hasSpeaker: true,
47
+ speaker: {
48
+ count: 1,
49
+ isPrivate: false,
50
+ },
51
+
52
+ // IMU capabilities - Mentra Live has 6-axis IMU
53
+ hasIMU: true,
54
+ imu: {
55
+ axisCount: 6,
56
+ hasAccelerometer: true,
57
+ hasCompass: false,
58
+ hasGyroscope: true,
59
+ },
60
+
61
+ // Button capabilities - Mentra Live has one physical button
62
+ hasButton: true,
63
+ button: {
64
+ count: 1,
65
+ buttons: [
66
+ {
67
+ type: "press",
68
+ events: ["press", "double_press", "long_press"],
69
+ isCapacitive: false,
70
+ },
71
+ ],
72
+ },
73
+
74
+ // Light capabilities - Mentra Live has two lights: privacy light + RGB LED
75
+ hasLight: true,
76
+ light: {
77
+ count: 2,
78
+ lights: [
79
+ {
80
+ id: "privacy",
81
+ purpose: "privacy",
82
+ isFullColor: false,
83
+ color: "white",
84
+ position: "front_facing",
85
+ },
86
+ {
87
+ id: "user_feedback",
88
+ purpose: "user_feedback",
89
+ isFullColor: true,
90
+ color: "rgb",
91
+ position: "user_facing",
92
+ },
93
+ ],
94
+ },
95
+
96
+ // Power capabilities - Mentra Live does not have external battery
97
+ power: {
98
+ hasExternalBattery: false,
99
+ },
100
+
101
+ // WiFi capabilities - Mentra Live supports WiFi
102
+ hasWifi: true,
103
+ };
@@ -0,0 +1,76 @@
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
+
9
+ import type { Capabilities } from "../hardware";
10
+
11
+ /**
12
+ * Simulated Glasses capability profile
13
+ */
14
+ export const simulatedGlasses: Capabilities = {
15
+ modelName: "Simulated Glasses",
16
+
17
+ // Camera capabilities - does not have a camera
18
+ hasCamera: false,
19
+ camera: null,
20
+
21
+ // Display capabilities - has a green monochrome display
22
+ hasDisplay: true,
23
+ display: {
24
+ count: 1,
25
+ isColor: false,
26
+ color: "green",
27
+ canDisplayBitmap: false,
28
+ resolution: { width: 640, height: 480 },
29
+ fieldOfView: { horizontal: 30 },
30
+ maxTextLines: 7,
31
+ adjustBrightness: true,
32
+ },
33
+
34
+ // Microphone capabilities - has a microphone (phone mic)
35
+ hasMicrophone: true,
36
+ microphone: {
37
+ count: 1,
38
+ hasVAD: false,
39
+ },
40
+
41
+ // Speaker capabilities - has a speaker (phone speaker)
42
+ hasSpeaker: true,
43
+ speaker: {
44
+ count: 1,
45
+ isPrivate: false,
46
+ },
47
+
48
+ // IMU capabilities - does not have an IMU
49
+ hasIMU: false,
50
+ imu: null,
51
+
52
+ // Button capabilities - Has one simulated button
53
+ hasButton: true,
54
+ button: {
55
+ count: 1,
56
+ buttons: [
57
+ {
58
+ type: "press",
59
+ events: ["press"],
60
+ isCapacitive: false,
61
+ },
62
+ ],
63
+ },
64
+
65
+ // Light capabilities - does not have lights
66
+ hasLight: false,
67
+ light: null,
68
+
69
+ // Power capabilities - does not have external battery
70
+ power: {
71
+ hasExternalBattery: false,
72
+ },
73
+
74
+ // WiFi capabilities - does not support WiFi
75
+ hasWifi: false,
76
+ };
@@ -0,0 +1,60 @@
1
+ /**
2
+ * @fileoverview Vuzix Z100 Hardware Capabilities
3
+ *
4
+ * Capability profile for the Vuzix Z100 smart glasses model.
5
+ * Defines the hardware and software features available on this device.
6
+ */
7
+
8
+ import type { Capabilities } from "../hardware";
9
+
10
+ /**
11
+ * Vuzix Z100 capability profile
12
+ */
13
+ export const vuzixZ100: Capabilities = {
14
+ modelName: "Vuzix Z100",
15
+
16
+ // Camera capabilities - does not have a camera
17
+ hasCamera: false,
18
+ camera: null,
19
+
20
+ // Display capabilities - has a green monochrome display
21
+ hasDisplay: true,
22
+ display: {
23
+ count: 1,
24
+ isColor: false,
25
+ color: "green",
26
+ canDisplayBitmap: false,
27
+ resolution: { width: 640, height: 480 },
28
+ fieldOfView: { horizontal: 30 },
29
+ maxTextLines: 7,
30
+ adjustBrightness: true,
31
+ },
32
+
33
+ // Microphone capabilities - does not have a microphone
34
+ hasMicrophone: false,
35
+ microphone: null,
36
+
37
+ // Speaker capabilities - does not have a speaker
38
+ hasSpeaker: false,
39
+ speaker: null,
40
+
41
+ // IMU capabilities - does not have an IMU
42
+ hasIMU: false,
43
+ imu: null,
44
+
45
+ // Button capabilities - does not have buttons
46
+ hasButton: false,
47
+ button: null,
48
+
49
+ // Light capabilities - does not have lights
50
+ hasLight: false,
51
+ light: null,
52
+
53
+ // Power capabilities - does not have external battery
54
+ power: {
55
+ hasExternalBattery: false,
56
+ },
57
+
58
+ // WiFi capabilities - does not support WiFi
59
+ hasWifi: false,
60
+ };