@mentra/sdk 1.1.19 → 2.0.0
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 +4 -4
- package/dist/{tpa → app}/index.d.ts.map +1 -1
- package/dist/{tpa → app}/index.js +2 -2
- package/dist/{tpa → app}/server/index.d.ts +21 -21
- package/dist/app/server/index.d.ts.map +1 -0
- package/dist/{tpa → app}/server/index.js +21 -21
- package/dist/{tpa → app}/session/api-client.d.ts +1 -1
- package/dist/{tpa → app}/session/api-client.d.ts.map +1 -1
- package/dist/{tpa → app}/session/api-client.js +2 -2
- package/dist/{tpa → app}/session/dashboard.d.ts +9 -9
- package/dist/{tpa → app}/session/dashboard.d.ts.map +1 -1
- package/dist/{tpa → app}/session/dashboard.js +10 -10
- package/dist/{tpa → app}/session/events.d.ts +1 -1
- package/dist/{tpa → app}/session/events.d.ts.map +1 -1
- package/dist/{tpa → app}/session/events.js +1 -1
- package/dist/{tpa → app}/session/index.d.ts +40 -38
- package/dist/app/session/index.d.ts.map +1 -0
- package/dist/{tpa → app}/session/index.js +126 -116
- package/dist/{tpa → app}/session/layouts.d.ts +2 -2
- package/dist/{tpa → app}/session/layouts.d.ts.map +1 -1
- package/dist/{tpa → app}/session/layouts.js +4 -4
- package/dist/{tpa → app}/session/modules/streaming.d.ts +5 -5
- package/dist/{tpa → app}/session/modules/streaming.d.ts.map +1 -1
- package/dist/{tpa → app}/session/modules/streaming.js +7 -7
- package/dist/{tpa → app}/session/settings.d.ts +3 -3
- package/dist/{tpa → app}/session/settings.d.ts.map +1 -1
- package/dist/{tpa → app}/session/settings.js +5 -7
- package/dist/app/token/index.d.ts +7 -0
- package/dist/app/token/index.d.ts.map +1 -0
- package/dist/{tpa → app}/token/index.js +2 -2
- package/dist/{tpa → app}/token/utils.d.ts +6 -6
- package/dist/{tpa → app}/token/utils.d.ts.map +1 -1
- package/dist/{tpa → app}/token/utils.js +6 -6
- package/dist/{tpa → app}/webview/index.d.ts +3 -3
- package/dist/{tpa → app}/webview/index.d.ts.map +1 -1
- package/dist/{tpa → app}/webview/index.js +4 -4
- package/dist/examples/rtmp-streaming-example.js +6 -6
- package/dist/index.d.ts +39 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +76 -16
- package/dist/types/capabilities.d.ts +92 -0
- package/dist/types/capabilities.d.ts.map +1 -0
- package/dist/types/capabilities.js +9 -0
- package/dist/types/dashboard/index.d.ts +9 -9
- package/dist/types/enums.d.ts +2 -2
- package/dist/types/enums.js +8 -8
- package/dist/types/index.d.ts +7 -6
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/index.js +26 -24
- package/dist/types/layouts.d.ts +2 -2
- package/dist/types/message-types.d.ts +18 -18
- package/dist/types/message-types.js +47 -47
- package/dist/types/messages/app-to-cloud.d.ts +146 -0
- package/dist/types/messages/{tpa-to-cloud.d.ts.map → app-to-cloud.d.ts.map} +1 -1
- package/dist/types/messages/{tpa-to-cloud.js → app-to-cloud.js} +18 -18
- package/dist/types/messages/{cloud-to-tpa.d.ts → cloud-to-app.d.ts} +54 -52
- package/dist/types/messages/cloud-to-app.d.ts.map +1 -0
- package/dist/types/messages/{cloud-to-tpa.js → cloud-to-app.js} +22 -22
- package/dist/types/models.d.ts +7 -7
- package/dist/types/models.js +3 -3
- package/dist/types/streams.d.ts +2 -2
- package/dist/types/streams.js +2 -2
- package/dist/types/token.d.ts +7 -7
- package/dist/types/token.js +2 -2
- package/dist/types/webhooks.d.ts +8 -8
- package/dist/types/webhooks.js +3 -3
- package/package.json +2 -1
- package/dist/tpa/server/index.d.ts.map +0 -1
- package/dist/tpa/session/index.d.ts.map +0 -1
- package/dist/tpa/token/index.d.ts +0 -7
- package/dist/tpa/token/index.d.ts.map +0 -1
- package/dist/types/messages/cloud-to-tpa.d.ts.map +0 -1
- package/dist/types/messages/tpa-to-cloud.d.ts +0 -146
- /package/dist/{tpa → app}/index.d.ts +0 -0
@@ -4,7 +4,7 @@ exports.LayoutManager = void 0;
|
|
4
4
|
/**
|
5
5
|
* 🎨 Layout Manager Module
|
6
6
|
*
|
7
|
-
* Manages AR display layouts for
|
7
|
+
* Manages AR display layouts for Apps. This class provides an easy-to-use interface
|
8
8
|
* for showing different types of content in the user's AR view.
|
9
9
|
*
|
10
10
|
* @example
|
@@ -23,7 +23,7 @@ class LayoutManager {
|
|
23
23
|
/**
|
24
24
|
* 🎯 Creates a new LayoutManager instance
|
25
25
|
*
|
26
|
-
* @param packageName -
|
26
|
+
* @param packageName - App package identifier
|
27
27
|
* @param sendMessage - Function to send display requests to AugmentOS
|
28
28
|
*/
|
29
29
|
constructor(packageName, sendMessage) {
|
@@ -113,7 +113,7 @@ class LayoutManager {
|
|
113
113
|
return {
|
114
114
|
timestamp: new Date(),
|
115
115
|
sessionId: '', // Will be filled by session
|
116
|
-
type: types_1.
|
116
|
+
type: types_1.AppToCloudMessageType.DISPLAY_REQUEST,
|
117
117
|
packageName: this.packageName,
|
118
118
|
view,
|
119
119
|
layout,
|
@@ -172,7 +172,7 @@ class LayoutManager {
|
|
172
172
|
}
|
173
173
|
catch (error) {
|
174
174
|
console.error("Error in showTextWall:", error);
|
175
|
-
// Don't crash the
|
175
|
+
// Don't crash the App - fail gracefully
|
176
176
|
}
|
177
177
|
}
|
178
178
|
/**
|
@@ -1,7 +1,7 @@
|
|
1
1
|
/**
|
2
2
|
* 📹 RTMP Streaming Module
|
3
3
|
*
|
4
|
-
* Provides functionality for
|
4
|
+
* Provides functionality for Apps to request and manage RTMP streams from smart glasses.
|
5
5
|
* Handles stream lifecycle, status monitoring, and cleanup.
|
6
6
|
*/
|
7
7
|
import { RtmpStreamStatus } from '../../../types';
|
@@ -21,7 +21,7 @@ export interface RtmpStreamOptions {
|
|
21
21
|
stream?: StreamConfig;
|
22
22
|
}
|
23
23
|
/**
|
24
|
-
* StreamingModule provides functionality for
|
24
|
+
* StreamingModule provides functionality for Apps to request and manage RTMP streams.
|
25
25
|
*
|
26
26
|
* Streams can be requested with configurable parameters for video quality,
|
27
27
|
* audio settings, and stream constraints. Status updates are received through
|
@@ -38,10 +38,10 @@ export declare class StreamingModule {
|
|
38
38
|
/**
|
39
39
|
* Create a new StreamingModule
|
40
40
|
*
|
41
|
-
* @param packageName - The
|
41
|
+
* @param packageName - The App package name
|
42
42
|
* @param sessionId - The current session ID
|
43
43
|
* @param send - Function to send messages to the cloud
|
44
|
-
* @param session - Reference to the parent
|
44
|
+
* @param session - Reference to the parent AppSession (optional)
|
45
45
|
*/
|
46
46
|
constructor(packageName: string, sessionId: string, send: (message: any) => void, session?: any);
|
47
47
|
/**
|
@@ -92,7 +92,7 @@ export declare class StreamingModule {
|
|
92
92
|
onStatus(handler: StreamStatusHandler): () => void;
|
93
93
|
/**
|
94
94
|
* Update internal stream state based on a status message
|
95
|
-
* For internal use by
|
95
|
+
* For internal use by AppSession
|
96
96
|
* @param message - The status message from the cloud
|
97
97
|
*/
|
98
98
|
updateStreamState(message: any): void;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"streaming.d.ts","sourceRoot":"","sources":["../../../../src/
|
1
|
+
{"version":3,"file":"streaming.d.ts","sourceRoot":"","sources":["../../../../src/app/session/modules/streaming.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,EAKL,gBAAgB,EAEjB,MAAM,gBAAgB,CAAC;AACxB,OAAO,EACL,WAAW,EACX,WAAW,EACX,YAAY,EAEZ,mBAAmB,EACpB,MAAM,4BAA4B,CAAC;AAGpC,OAAO,EACL,WAAW,EACX,WAAW,EACX,YAAY,EAEZ,mBAAmB,EACpB,CAAC;AAKF;;GAEG;AACH,MAAM,WAAW,iBAAiB;IAChC,kFAAkF;IAClF,OAAO,EAAE,MAAM,CAAC;IAChB,4CAA4C;IAC5C,KAAK,CAAC,EAAE,WAAW,CAAC;IACpB,4CAA4C;IAC5C,KAAK,CAAC,EAAE,WAAW,CAAC;IACpB,6CAA6C;IAC7C,MAAM,CAAC,EAAE,YAAY,CAAC;CACvB;AAID;;;;;;GAMG;AACH,qBAAa,eAAe;IAC1B,OAAO,CAAC,IAAI,CAAyB;IACrC,OAAO,CAAC,WAAW,CAAS;IAC5B,OAAO,CAAC,SAAS,CAAS;IAC1B,OAAO,CAAC,OAAO,CAAC,CAAM;IACtB,OAAO,CAAC,WAAW,CAAkB;IACrC,OAAO,CAAC,gBAAgB,CAAC,CAAS;IAClC,OAAO,CAAC,kBAAkB,CAAC,CAAmB;IAE9C;;;;;;;OAOG;gBACS,WAAW,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC,OAAO,EAAE,GAAG,KAAK,IAAI,EAAE,OAAO,CAAC,EAAE,GAAG;IAO/F;;;;;OAKG;IACG,aAAa,CAAC,OAAO,EAAE,iBAAiB,GAAG,OAAO,CAAC,IAAI,CAAC;IA8E9D;;;;OAIG;IACG,UAAU,IAAI,OAAO,CAAC,IAAI,CAAC;IAuCjC;;;;OAIG;IACH,oBAAoB,IAAI,OAAO;IAI/B;;;;OAIG;IACH,mBAAmB,IAAI,MAAM,GAAG,SAAS;IAIzC;;;;OAIG;IACH,eAAe,IAAI,gBAAgB,GAAG,SAAS;IAI/C;;;OAGG;IACH,wBAAwB,IAAI,IAAI;IAQhC;;OAEG;IACH,4BAA4B,IAAI,IAAI;IAMpC;;;;OAIG;IACH,QAAQ,CAAC,OAAO,EAAE,mBAAmB,GAAG,MAAM,IAAI;IAUlD;;;;OAIG;IACH,iBAAiB,CAAC,OAAO,EAAE,GAAG,GAAG,IAAI;CA2DtC"}
|
@@ -4,14 +4,14 @@ exports.StreamingModule = void 0;
|
|
4
4
|
/**
|
5
5
|
* 📹 RTMP Streaming Module
|
6
6
|
*
|
7
|
-
* Provides functionality for
|
7
|
+
* Provides functionality for Apps to request and manage RTMP streams from smart glasses.
|
8
8
|
* Handles stream lifecycle, status monitoring, and cleanup.
|
9
9
|
*/
|
10
10
|
const types_1 = require("../../../types");
|
11
11
|
const streams_1 = require("../../../types/streams");
|
12
12
|
// Stream status information and handler types are imported from '../../../types/rtmp-stream'
|
13
13
|
/**
|
14
|
-
* StreamingModule provides functionality for
|
14
|
+
* StreamingModule provides functionality for Apps to request and manage RTMP streams.
|
15
15
|
*
|
16
16
|
* Streams can be requested with configurable parameters for video quality,
|
17
17
|
* audio settings, and stream constraints. Status updates are received through
|
@@ -21,10 +21,10 @@ class StreamingModule {
|
|
21
21
|
/**
|
22
22
|
* Create a new StreamingModule
|
23
23
|
*
|
24
|
-
* @param packageName - The
|
24
|
+
* @param packageName - The App package name
|
25
25
|
* @param sessionId - The current session ID
|
26
26
|
* @param send - Function to send messages to the cloud
|
27
|
-
* @param session - Reference to the parent
|
27
|
+
* @param session - Reference to the parent AppSession (optional)
|
28
28
|
*/
|
29
29
|
constructor(packageName, sessionId, send, session) {
|
30
30
|
this.isStreaming = false;
|
@@ -66,7 +66,7 @@ class StreamingModule {
|
|
66
66
|
}
|
67
67
|
// Create stream request message
|
68
68
|
const message = {
|
69
|
-
type: types_1.
|
69
|
+
type: types_1.AppToCloudMessageType.RTMP_STREAM_REQUEST,
|
70
70
|
packageName: this.packageName,
|
71
71
|
sessionId: this.sessionId,
|
72
72
|
rtmpUrl: options.rtmpUrl,
|
@@ -134,7 +134,7 @@ class StreamingModule {
|
|
134
134
|
}
|
135
135
|
// Create stop request message
|
136
136
|
const message = {
|
137
|
-
type: types_1.
|
137
|
+
type: types_1.AppToCloudMessageType.RTMP_STREAM_STOP,
|
138
138
|
packageName: this.packageName,
|
139
139
|
sessionId: this.sessionId,
|
140
140
|
streamId: this.currentStreamState?.streamId, // Include streamId if available
|
@@ -209,7 +209,7 @@ class StreamingModule {
|
|
209
209
|
}
|
210
210
|
/**
|
211
211
|
* Update internal stream state based on a status message
|
212
|
-
* For internal use by
|
212
|
+
* For internal use by AppSession
|
213
213
|
* @param message - The status message from the cloud
|
214
214
|
*/
|
215
215
|
updateStreamState(message) {
|
@@ -21,7 +21,7 @@ export type SettingValueChangeHandler<T = any> = (newValue: T, oldValue: T) => v
|
|
21
21
|
/**
|
22
22
|
* 🔧 Settings Manager
|
23
23
|
*
|
24
|
-
* Provides a type-safe interface for accessing and reacting to
|
24
|
+
* Provides a type-safe interface for accessing and reacting to App settings.
|
25
25
|
* Automatically synchronizes with AugmentOS Cloud.
|
26
26
|
*/
|
27
27
|
export declare class SettingsManager {
|
@@ -35,7 +35,7 @@ export declare class SettingsManager {
|
|
35
35
|
* Create a new settings manager
|
36
36
|
*
|
37
37
|
* @param initialSettings Initial settings values (if available)
|
38
|
-
* @param packageName Package name for the
|
38
|
+
* @param packageName Package name for the App
|
39
39
|
* @param wsUrl WebSocket URL (for deriving HTTP API URL)
|
40
40
|
* @param userId User ID (for authenticated requests)
|
41
41
|
* @param subscribeFn Optional function to call to subscribe to streams
|
@@ -44,7 +44,7 @@ export declare class SettingsManager {
|
|
44
44
|
/**
|
45
45
|
* Configure the API client
|
46
46
|
*
|
47
|
-
* @param packageName Package name for the
|
47
|
+
* @param packageName Package name for the App
|
48
48
|
* @param wsUrl WebSocket URL
|
49
49
|
* @param userId User ID
|
50
50
|
*/
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"settings.d.ts","sourceRoot":"","sources":["../../../src/
|
1
|
+
{"version":3,"file":"settings.d.ts","sourceRoot":"","sources":["../../../src/app/session/settings.ts"],"names":[],"mappings":"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"}
|
@@ -7,13 +7,11 @@ exports.SettingsManager = void 0;
|
|
7
7
|
/**
|
8
8
|
* 🔧 Settings Manager Module
|
9
9
|
*
|
10
|
-
* Manages
|
10
|
+
* Manages App settings with automatic synchronization and change notifications.
|
11
11
|
* Provides type-safe access to settings with default values.
|
12
12
|
*/
|
13
13
|
const events_1 = __importDefault(require("events"));
|
14
14
|
const api_client_1 = require("./api-client");
|
15
|
-
// import { logger } from '@mentra/utils'; // Ensure logger is available
|
16
|
-
// Note(Isaiah): Let's not import @mentra/utils in the SDK to avoid circular dependencies. Also i'm deprecating it in favor of the new logging system.
|
17
15
|
const logger_1 = require("../../logging/logger"); // Adjust import path as needed
|
18
16
|
/**
|
19
17
|
* Internal event names
|
@@ -26,7 +24,7 @@ var SettingsEvents;
|
|
26
24
|
/**
|
27
25
|
* 🔧 Settings Manager
|
28
26
|
*
|
29
|
-
* Provides a type-safe interface for accessing and reacting to
|
27
|
+
* Provides a type-safe interface for accessing and reacting to App settings.
|
30
28
|
* Automatically synchronizes with AugmentOS Cloud.
|
31
29
|
*/
|
32
30
|
class SettingsManager {
|
@@ -34,7 +32,7 @@ class SettingsManager {
|
|
34
32
|
* Create a new settings manager
|
35
33
|
*
|
36
34
|
* @param initialSettings Initial settings values (if available)
|
37
|
-
* @param packageName Package name for the
|
35
|
+
* @param packageName Package name for the App
|
38
36
|
* @param wsUrl WebSocket URL (for deriving HTTP API URL)
|
39
37
|
* @param userId User ID (for authenticated requests)
|
40
38
|
* @param subscribeFn Optional function to call to subscribe to streams
|
@@ -58,7 +56,7 @@ class SettingsManager {
|
|
58
56
|
/**
|
59
57
|
* Configure the API client
|
60
58
|
*
|
61
|
-
* @param packageName Package name for the
|
59
|
+
* @param packageName Package name for the App
|
62
60
|
* @param wsUrl WebSocket URL
|
63
61
|
* @param userId User ID
|
64
62
|
*/
|
@@ -340,7 +338,7 @@ class SettingsManager {
|
|
340
338
|
});
|
341
339
|
}
|
342
340
|
else {
|
343
|
-
logger_1.logger.warn(`[SettingsManager] 'subscribeFn' not provided. Cannot auto-subscribe for AugmentOS setting '${key}'. Manual
|
341
|
+
logger_1.logger.warn(`[SettingsManager] 'subscribeFn' not provided. Cannot auto-subscribe for AugmentOS setting '${key}'. Manual App subscription might be required.`);
|
344
342
|
}
|
345
343
|
return () => {
|
346
344
|
logger_1.logger.info(`[SettingsManager] Unregistering handler for AugmentOS setting '${key}' from event '${eventName}'.`);
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/app/token/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,cAAc,SAAS,CAAC"}
|
@@ -15,8 +15,8 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
15
15
|
};
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
17
17
|
/**
|
18
|
-
* 🔐
|
18
|
+
* 🔐 App Token Module
|
19
19
|
*
|
20
|
-
* Provides utilities for working with
|
20
|
+
* Provides utilities for working with App tokens.
|
21
21
|
*/
|
22
22
|
__exportStar(require("./utils"), exports);
|
@@ -1,6 +1,6 @@
|
|
1
|
-
import {
|
1
|
+
import { AppTokenPayload, TokenValidationResult, TokenConfig } from '../../types/token';
|
2
2
|
/**
|
3
|
-
* Create a
|
3
|
+
* Create a App token for a user session
|
4
4
|
*
|
5
5
|
* @param payload - Token payload data
|
6
6
|
* @param config - Token configuration
|
@@ -18,9 +18,9 @@ import { TpaTokenPayload, TokenValidationResult, TokenConfig } from '../../types
|
|
18
18
|
* );
|
19
19
|
* ```
|
20
20
|
*/
|
21
|
-
export declare function createToken(payload: Omit<
|
21
|
+
export declare function createToken(payload: Omit<AppTokenPayload, 'iat' | 'exp'>, config: TokenConfig): string;
|
22
22
|
/**
|
23
|
-
* Validate and decode a
|
23
|
+
* Validate and decode a App token
|
24
24
|
*
|
25
25
|
* @param token - JWT token string
|
26
26
|
* @param secretKey - Secret key used for validation
|
@@ -36,7 +36,7 @@ export declare function createToken(payload: Omit<TpaTokenPayload, 'iat' | 'exp'
|
|
36
36
|
*/
|
37
37
|
export declare function validateToken(token: string, secretKey: string): TokenValidationResult;
|
38
38
|
/**
|
39
|
-
* Generate a webview URL with an embedded
|
39
|
+
* Generate a webview URL with an embedded App token
|
40
40
|
*
|
41
41
|
* @param baseUrl - Base URL of the webview
|
42
42
|
* @param token - JWT token string
|
@@ -53,7 +53,7 @@ export declare function validateToken(token: string, secretKey: string): TokenVa
|
|
53
53
|
*/
|
54
54
|
export declare function generateWebviewUrl(baseUrl: string, token: string): string;
|
55
55
|
/**
|
56
|
-
* Extract a
|
56
|
+
* Extract a App token from a URL
|
57
57
|
*
|
58
58
|
* @param url - URL string containing a token parameter
|
59
59
|
* @returns Token string or null if not found
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/app/token/utils.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,eAAe,EAAE,qBAAqB,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAOxF;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,WAAW,CACzB,OAAO,EAAE,IAAI,CAAC,eAAe,EAAE,KAAK,GAAG,KAAK,CAAC,EAC7C,MAAM,EAAE,WAAW,GAClB,MAAM,CAMR;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,aAAa,CAC3B,KAAK,EAAE,MAAM,EACb,SAAS,EAAE,MAAM,GAChB,qBAAqB,CAavB;AAED;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,CAIzE;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,mBAAmB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAO9D"}
|
@@ -38,9 +38,9 @@ exports.validateToken = validateToken;
|
|
38
38
|
exports.generateWebviewUrl = generateWebviewUrl;
|
39
39
|
exports.extractTokenFromUrl = extractTokenFromUrl;
|
40
40
|
/**
|
41
|
-
* 🔐
|
41
|
+
* 🔐 App Token Utilities
|
42
42
|
*
|
43
|
-
* Provides utilities for working with
|
43
|
+
* Provides utilities for working with App tokens.
|
44
44
|
*/
|
45
45
|
const jwt = __importStar(require("jsonwebtoken"));
|
46
46
|
/**
|
@@ -48,7 +48,7 @@ const jwt = __importStar(require("jsonwebtoken"));
|
|
48
48
|
*/
|
49
49
|
const DEFAULT_EXPIRATION = 60 * 60 * 24; // seconds * minutes * hours (1 day).
|
50
50
|
/**
|
51
|
-
* Create a
|
51
|
+
* Create a App token for a user session
|
52
52
|
*
|
53
53
|
* @param payload - Token payload data
|
54
54
|
* @param config - Token configuration
|
@@ -70,7 +70,7 @@ function createToken(payload, config) {
|
|
70
70
|
return jwt.sign(payload, config.secretKey, { expiresIn: config.expiresIn || DEFAULT_EXPIRATION });
|
71
71
|
}
|
72
72
|
/**
|
73
|
-
* Validate and decode a
|
73
|
+
* Validate and decode a App token
|
74
74
|
*
|
75
75
|
* @param token - JWT token string
|
76
76
|
* @param secretKey - Secret key used for validation
|
@@ -100,7 +100,7 @@ function validateToken(token, secretKey) {
|
|
100
100
|
}
|
101
101
|
}
|
102
102
|
/**
|
103
|
-
* Generate a webview URL with an embedded
|
103
|
+
* Generate a webview URL with an embedded App token
|
104
104
|
*
|
105
105
|
* @param baseUrl - Base URL of the webview
|
106
106
|
* @param token - JWT token string
|
@@ -121,7 +121,7 @@ function generateWebviewUrl(baseUrl, token) {
|
|
121
121
|
return url.toString();
|
122
122
|
}
|
123
123
|
/**
|
124
|
-
* Extract a
|
124
|
+
* Extract a App token from a URL
|
125
125
|
*
|
126
126
|
* @param url - URL string containing a token parameter
|
127
127
|
* @returns Token string or null if not found
|
@@ -8,10 +8,10 @@ import { AuthenticatedRequest } from '../../types';
|
|
8
8
|
export declare function extractTempToken(url: string): string | null;
|
9
9
|
/**
|
10
10
|
* Exchanges a temporary token for a user ID with the AugmentOS Cloud.
|
11
|
-
* This should be called from the
|
11
|
+
* This should be called from the App's backend server.
|
12
12
|
* @param cloudApiUrl The base URL of the AugmentOS Cloud API.
|
13
13
|
* @param tempToken The temporary token obtained from the webview URL.
|
14
|
-
* @param apiKey Your
|
14
|
+
* @param apiKey Your App's secret API key.
|
15
15
|
* @returns A Promise that resolves with an object containing the userId.
|
16
16
|
* @throws Throws an error if the exchange fails (e.g., invalid token, expired, network error).
|
17
17
|
*/
|
@@ -25,7 +25,7 @@ export declare function exchangeToken(cloudApiUrl: string, tempToken: string, ap
|
|
25
25
|
*
|
26
26
|
* @param options Configuration options.
|
27
27
|
* @param options.cloudApiUrl The base URL of the AugmentOS Cloud API.
|
28
|
-
* @param options.apiKey Your
|
28
|
+
* @param options.apiKey Your App's secret API key.
|
29
29
|
* @param options.tokenQueryParam The name of the query parameter containing the token (default: 'aos_temp_token').
|
30
30
|
* @param options.cookieName The name of the cookie to store the session token (default: 'aos_session').
|
31
31
|
* @param options.cookieSecret Secret key used to sign the session cookie. MUST be provided and kept secure.
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/app/webview/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,QAAQ,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACjD,OAAO,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAC;AAUnD;;;;GAIG;AACH,wBAAgB,gBAAgB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAQ3D;AAED;;;;;;;;GAQG;AACH,wBAAsB,aAAa,CACjC,WAAW,EAAE,MAAM,EACnB,SAAS,EAAE,MAAM,EACjB,MAAM,EAAE,MAAM,EACd,WAAW,EAAE,MAAM,GAClB,OAAO,CAAC;IAAE,MAAM,EAAE,MAAM,CAAA;CAAE,CAAC,CAmC7B;AAsID;;;;;;;;;;;;GAYG;AACH,wBAAgB,oBAAoB,CAAC,OAAO,EAAE;IAC5C,MAAM,EAAE,MAAM,CAAC;IACf,WAAW,EAAE,MAAM,CAAC;IACpB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,YAAY,EAAE,MAAM,CAAC;IACrB,aAAa,CAAC,EAAE;QACd,QAAQ,CAAC,EAAE,OAAO,CAAC;QACnB,MAAM,CAAC,EAAE,OAAO,CAAC;QACjB,MAAM,CAAC,EAAE,MAAM,CAAC;QAChB,QAAQ,CAAC,EAAE,OAAO,GAAG,KAAK,GAAG,QAAQ,GAAG,MAAM,CAAC;QAC/C,IAAI,CAAC,EAAE,MAAM,CAAC;KACf,CAAC;CACH,IAuBe,KAAK,oBAAoB,EAAE,KAAK,QAAQ,EAAE,MAAM,YAAY,mBAkG3E"}
|
@@ -39,7 +39,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
39
|
exports.extractTempToken = extractTempToken;
|
40
40
|
exports.exchangeToken = exchangeToken;
|
41
41
|
exports.createAuthMiddleware = createAuthMiddleware;
|
42
|
-
// src/
|
42
|
+
// src/app/webview/index.ts
|
43
43
|
const axios_1 = __importDefault(require("axios"));
|
44
44
|
// Note: Your Express app needs to use cookie-parser middleware for this to work
|
45
45
|
// Example: app.use(require('cookie-parser')());
|
@@ -63,10 +63,10 @@ function extractTempToken(url) {
|
|
63
63
|
}
|
64
64
|
/**
|
65
65
|
* Exchanges a temporary token for a user ID with the AugmentOS Cloud.
|
66
|
-
* This should be called from the
|
66
|
+
* This should be called from the App's backend server.
|
67
67
|
* @param cloudApiUrl The base URL of the AugmentOS Cloud API.
|
68
68
|
* @param tempToken The temporary token obtained from the webview URL.
|
69
|
-
* @param apiKey Your
|
69
|
+
* @param apiKey Your App's secret API key.
|
70
70
|
* @returns A Promise that resolves with an object containing the userId.
|
71
71
|
* @throws Throws an error if the exchange fails (e.g., invalid token, expired, network error).
|
72
72
|
*/
|
@@ -233,7 +233,7 @@ function validateCloudApiUrlChecksum(checksum, cloudApiUrl, apiKey) {
|
|
233
233
|
*
|
234
234
|
* @param options Configuration options.
|
235
235
|
* @param options.cloudApiUrl The base URL of the AugmentOS Cloud API.
|
236
|
-
* @param options.apiKey Your
|
236
|
+
* @param options.apiKey Your App's secret API key.
|
237
237
|
* @param options.tokenQueryParam The name of the query parameter containing the token (default: 'aos_temp_token').
|
238
238
|
* @param options.cookieName The name of the cookie to store the session token (default: 'aos_session').
|
239
239
|
* @param options.cookieSecret Secret key used to sign the session cookie. MUST be provided and kept secure.
|
@@ -1,15 +1,15 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
const session_1 = require("../
|
4
|
-
// import type { StreamStatus } from '../
|
5
|
-
// Initialize
|
6
|
-
const session = new session_1.
|
3
|
+
const session_1 = require("../app/session");
|
4
|
+
// import type { StreamStatus } from '../app/session/modules/streaming';
|
5
|
+
// Initialize App session
|
6
|
+
const session = new session_1.AppSession({
|
7
7
|
packageName: 'com.example.streaming-demo',
|
8
8
|
apiKey: 'your-api-key',
|
9
9
|
userId: 'example-user@example.com',
|
10
|
-
|
10
|
+
appServer: {}, // In a real app, this would be a AppServer instance
|
11
11
|
// In a real app, this would be the production server URL
|
12
|
-
augmentOSWebsocketUrl: 'ws://localhost:8002/
|
12
|
+
augmentOSWebsocketUrl: 'ws://localhost:8002/app-ws'
|
13
13
|
});
|
14
14
|
// Connect to AugmentOS Cloud
|
15
15
|
async function startApp() {
|
package/dist/index.d.ts
CHANGED
@@ -1,4 +1,41 @@
|
|
1
|
-
export * from
|
2
|
-
export * from
|
1
|
+
export * from './types/token';
|
2
|
+
export * from './types/message-types';
|
3
|
+
export * from './types/messages/base';
|
4
|
+
export * from './types/messages/glasses-to-cloud';
|
5
|
+
export * from './types/messages/cloud-to-glasses';
|
6
|
+
export * from './types/messages/app-to-cloud';
|
7
|
+
export { AppConnectionAck, AppConnectionError, AppStopped, SettingsUpdate as AppSettingsUpdate, // Alias to avoid conflict with cloud-to-glasses SettingsUpdate
|
8
|
+
DataStream, CloudToAppMessage, TranslationData, ToolCall, StandardConnectionError, CustomMessage, AugmentosSettingsUpdate, TranscriptionData, AudioChunk, PermissionError, PermissionErrorDetail, isAppConnectionAck, isAppConnectionError, isAppStopped, isSettingsUpdate, isDataStream, isAudioChunk, isDashboardModeChanged, isDashboardAlwaysOnChanged, isPhotoResponse as isPhotoResponseFromCloud, isRtmpStreamStatus as isRtmpStreamStatusFromCloud } from './types/messages/cloud-to-app';
|
9
|
+
export * from './types/streams';
|
10
|
+
export * from './types/layouts';
|
11
|
+
export * from './types/dashboard';
|
12
|
+
export * from './types/rtmp-stream';
|
13
|
+
export * from './types/enums';
|
14
|
+
export * from './types/models';
|
15
|
+
export * from './types/user-session';
|
16
|
+
export * from './types/webhooks';
|
17
|
+
export * from './types/capabilities';
|
18
|
+
export * from "./app/index";
|
3
19
|
export * from "./logging/logger";
|
20
|
+
export { ButtonPress, HeadPosition, GlassesBatteryUpdate, PhoneBatteryUpdate, GlassesConnectionState, LocationUpdate, CalendarEvent, Vad, PhoneNotification, NotificationDismissed, StartApp, StopApp, ConnectionInit, DashboardState, OpenDashboard, GlassesToCloudMessage, PhotoResponse, RtmpStreamStatus, KeepAliveAck } from './types/messages/glasses-to-cloud';
|
21
|
+
export { ConnectionAck, ConnectionError, AuthError, DisplayEvent, AppStateChange, MicrophoneStateChange, CloudToGlassesMessage, PhotoRequestToGlasses, SettingsUpdate, StartRtmpStream, StopRtmpStream, KeepRtmpStreamAlive } from './types/messages/cloud-to-glasses';
|
22
|
+
export { AppConnectionInit, AppSubscriptionUpdate, RtmpStreamRequest, RtmpStreamStopRequest, AppToCloudMessage, PhotoRequest } from './types/messages/app-to-cloud';
|
23
|
+
export { TextWall, DoubleTextWall, DashboardCard, ReferenceCard, Layout, DisplayRequest } from './types/layouts';
|
24
|
+
export { isButtonPress, isHeadPosition, isConnectionInit, isStartApp, isStopApp, isPhotoResponse as isPhotoResponseFromGlasses, isRtmpStreamStatus as isRtmpStreamStatusFromGlasses, isKeepAliveAck } from './types/messages/glasses-to-cloud';
|
25
|
+
export { isConnectionAck, isDisplayEvent, isAppStateChange, isPhotoRequest, isSettingsUpdate as isSettingsUpdateToGlasses, isStartRtmpStream, isStopRtmpStream, isKeepRtmpStreamAlive } from './types/messages/cloud-to-glasses';
|
26
|
+
export { isAppConnectionInit, isAppSubscriptionUpdate, isDisplayRequest, isRtmpStreamRequest, isRtmpStreamStopRequest, isPhotoRequest as isPhotoRequestFromApp } from './types/messages/app-to-cloud';
|
27
|
+
export { BaseAppSetting, AppSetting, AppSettings, AppConfig, validateAppConfig, ToolSchema, ToolParameterSchema } from './types/models';
|
28
|
+
export { VideoConfig, AudioConfig, StreamConfig, StreamStatusHandler } from './types/rtmp-stream';
|
29
|
+
/**
|
30
|
+
* WebSocket error information
|
31
|
+
*/
|
32
|
+
export interface WebSocketError {
|
33
|
+
code: string;
|
34
|
+
message: string;
|
35
|
+
details?: unknown;
|
36
|
+
}
|
37
|
+
import { Request } from 'express';
|
38
|
+
export interface AuthenticatedRequest extends Request {
|
39
|
+
authUserId?: string;
|
40
|
+
}
|
4
41
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"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"}
|
package/dist/index.js
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
"use strict";
|
2
|
-
// src/
|
2
|
+
// src/index.ts
|
3
3
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
4
4
|
if (k2 === undefined) k2 = k;
|
5
5
|
var desc = Object.getOwnPropertyDescriptor(m, k);
|
@@ -15,19 +15,79 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
15
15
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
16
16
|
};
|
17
17
|
Object.defineProperty(exports, "__esModule", { value: true });
|
18
|
-
|
19
|
-
__exportStar(require("./types"), exports);
|
20
|
-
|
18
|
+
exports.validateAppConfig = exports.isPhotoRequestFromApp = exports.isRtmpStreamStopRequest = exports.isRtmpStreamRequest = exports.isDisplayRequest = exports.isAppSubscriptionUpdate = exports.isAppConnectionInit = exports.isKeepRtmpStreamAlive = exports.isStopRtmpStream = exports.isStartRtmpStream = exports.isSettingsUpdateToGlasses = exports.isPhotoRequest = exports.isAppStateChange = exports.isDisplayEvent = exports.isConnectionAck = exports.isKeepAliveAck = exports.isRtmpStreamStatusFromGlasses = exports.isPhotoResponseFromGlasses = exports.isStopApp = exports.isStartApp = exports.isConnectionInit = exports.isHeadPosition = exports.isButtonPress = exports.isRtmpStreamStatusFromCloud = exports.isPhotoResponseFromCloud = exports.isDashboardAlwaysOnChanged = exports.isDashboardModeChanged = exports.isAudioChunk = exports.isDataStream = exports.isSettingsUpdate = exports.isAppStopped = exports.isAppConnectionError = exports.isAppConnectionAck = void 0;
|
19
|
+
__exportStar(require("./types/token"), exports);
|
20
|
+
// Message type enums
|
21
|
+
__exportStar(require("./types/message-types"), exports);
|
22
|
+
// Base message type
|
23
|
+
__exportStar(require("./types/messages/base"), exports);
|
24
|
+
// Messages by direction - export everything except the conflicting type guards
|
25
|
+
__exportStar(require("./types/messages/glasses-to-cloud"), exports);
|
26
|
+
__exportStar(require("./types/messages/cloud-to-glasses"), exports);
|
27
|
+
__exportStar(require("./types/messages/app-to-cloud"), exports);
|
28
|
+
// Export cloud-to-app but exclude the conflicting type guards
|
29
|
+
var cloud_to_app_1 = require("./types/messages/cloud-to-app");
|
30
|
+
// Type guards (excluding isPhotoResponse and isRtmpStreamStatus which conflict)
|
31
|
+
Object.defineProperty(exports, "isAppConnectionAck", { enumerable: true, get: function () { return cloud_to_app_1.isAppConnectionAck; } });
|
32
|
+
Object.defineProperty(exports, "isAppConnectionError", { enumerable: true, get: function () { return cloud_to_app_1.isAppConnectionError; } });
|
33
|
+
Object.defineProperty(exports, "isAppStopped", { enumerable: true, get: function () { return cloud_to_app_1.isAppStopped; } });
|
34
|
+
Object.defineProperty(exports, "isSettingsUpdate", { enumerable: true, get: function () { return cloud_to_app_1.isSettingsUpdate; } });
|
35
|
+
Object.defineProperty(exports, "isDataStream", { enumerable: true, get: function () { return cloud_to_app_1.isDataStream; } });
|
36
|
+
Object.defineProperty(exports, "isAudioChunk", { enumerable: true, get: function () { return cloud_to_app_1.isAudioChunk; } });
|
37
|
+
Object.defineProperty(exports, "isDashboardModeChanged", { enumerable: true, get: function () { return cloud_to_app_1.isDashboardModeChanged; } });
|
38
|
+
Object.defineProperty(exports, "isDashboardAlwaysOnChanged", { enumerable: true, get: function () { return cloud_to_app_1.isDashboardAlwaysOnChanged; } });
|
39
|
+
// Re-export the cloud-to-app versions of these type guards since they're the ones
|
40
|
+
// that should be used when dealing with CloudToAppMessage types
|
41
|
+
Object.defineProperty(exports, "isPhotoResponseFromCloud", { enumerable: true, get: function () { return cloud_to_app_1.isPhotoResponse; } });
|
42
|
+
Object.defineProperty(exports, "isRtmpStreamStatusFromCloud", { enumerable: true, get: function () { return cloud_to_app_1.isRtmpStreamStatus; } });
|
43
|
+
// Stream types
|
44
|
+
__exportStar(require("./types/streams"), exports);
|
45
|
+
// Layout types
|
46
|
+
__exportStar(require("./types/layouts"), exports);
|
47
|
+
// Dashboard types
|
48
|
+
__exportStar(require("./types/dashboard"), exports);
|
49
|
+
// RTMP streaming types
|
50
|
+
__exportStar(require("./types/rtmp-stream"), exports);
|
51
|
+
// Other system enums
|
52
|
+
__exportStar(require("./types/enums"), exports);
|
53
|
+
// Core model interfaces
|
54
|
+
__exportStar(require("./types/models"), exports);
|
55
|
+
// Session-related interfaces
|
56
|
+
__exportStar(require("./types/user-session"), exports);
|
57
|
+
// Webhook interfaces
|
58
|
+
__exportStar(require("./types/webhooks"), exports);
|
59
|
+
// Capability Discovery types
|
60
|
+
__exportStar(require("./types/capabilities"), exports);
|
61
|
+
// App session and server exports
|
62
|
+
__exportStar(require("./app/index"), exports);
|
63
|
+
// Logging exports
|
21
64
|
__exportStar(require("./logging/logger"), exports);
|
22
|
-
//
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
65
|
+
// Type guards - re-export the most commonly used ones for convenience
|
66
|
+
var glasses_to_cloud_1 = require("./types/messages/glasses-to-cloud");
|
67
|
+
Object.defineProperty(exports, "isButtonPress", { enumerable: true, get: function () { return glasses_to_cloud_1.isButtonPress; } });
|
68
|
+
Object.defineProperty(exports, "isHeadPosition", { enumerable: true, get: function () { return glasses_to_cloud_1.isHeadPosition; } });
|
69
|
+
Object.defineProperty(exports, "isConnectionInit", { enumerable: true, get: function () { return glasses_to_cloud_1.isConnectionInit; } });
|
70
|
+
Object.defineProperty(exports, "isStartApp", { enumerable: true, get: function () { return glasses_to_cloud_1.isStartApp; } });
|
71
|
+
Object.defineProperty(exports, "isStopApp", { enumerable: true, get: function () { return glasses_to_cloud_1.isStopApp; } });
|
72
|
+
Object.defineProperty(exports, "isPhotoResponseFromGlasses", { enumerable: true, get: function () { return glasses_to_cloud_1.isPhotoResponse; } });
|
73
|
+
Object.defineProperty(exports, "isRtmpStreamStatusFromGlasses", { enumerable: true, get: function () { return glasses_to_cloud_1.isRtmpStreamStatus; } });
|
74
|
+
Object.defineProperty(exports, "isKeepAliveAck", { enumerable: true, get: function () { return glasses_to_cloud_1.isKeepAliveAck; } });
|
75
|
+
var cloud_to_glasses_1 = require("./types/messages/cloud-to-glasses");
|
76
|
+
Object.defineProperty(exports, "isConnectionAck", { enumerable: true, get: function () { return cloud_to_glasses_1.isConnectionAck; } });
|
77
|
+
Object.defineProperty(exports, "isDisplayEvent", { enumerable: true, get: function () { return cloud_to_glasses_1.isDisplayEvent; } });
|
78
|
+
Object.defineProperty(exports, "isAppStateChange", { enumerable: true, get: function () { return cloud_to_glasses_1.isAppStateChange; } });
|
79
|
+
Object.defineProperty(exports, "isPhotoRequest", { enumerable: true, get: function () { return cloud_to_glasses_1.isPhotoRequest; } });
|
80
|
+
Object.defineProperty(exports, "isSettingsUpdateToGlasses", { enumerable: true, get: function () { return cloud_to_glasses_1.isSettingsUpdate; } });
|
81
|
+
Object.defineProperty(exports, "isStartRtmpStream", { enumerable: true, get: function () { return cloud_to_glasses_1.isStartRtmpStream; } });
|
82
|
+
Object.defineProperty(exports, "isStopRtmpStream", { enumerable: true, get: function () { return cloud_to_glasses_1.isStopRtmpStream; } });
|
83
|
+
Object.defineProperty(exports, "isKeepRtmpStreamAlive", { enumerable: true, get: function () { return cloud_to_glasses_1.isKeepRtmpStreamAlive; } });
|
84
|
+
var app_to_cloud_1 = require("./types/messages/app-to-cloud");
|
85
|
+
Object.defineProperty(exports, "isAppConnectionInit", { enumerable: true, get: function () { return app_to_cloud_1.isAppConnectionInit; } });
|
86
|
+
Object.defineProperty(exports, "isAppSubscriptionUpdate", { enumerable: true, get: function () { return app_to_cloud_1.isAppSubscriptionUpdate; } });
|
87
|
+
Object.defineProperty(exports, "isDisplayRequest", { enumerable: true, get: function () { return app_to_cloud_1.isDisplayRequest; } });
|
88
|
+
Object.defineProperty(exports, "isRtmpStreamRequest", { enumerable: true, get: function () { return app_to_cloud_1.isRtmpStreamRequest; } });
|
89
|
+
Object.defineProperty(exports, "isRtmpStreamStopRequest", { enumerable: true, get: function () { return app_to_cloud_1.isRtmpStreamStopRequest; } });
|
90
|
+
Object.defineProperty(exports, "isPhotoRequestFromApp", { enumerable: true, get: function () { return app_to_cloud_1.isPhotoRequest; } });
|
91
|
+
// Export setting-related types
|
92
|
+
var models_1 = require("./types/models");
|
93
|
+
Object.defineProperty(exports, "validateAppConfig", { enumerable: true, get: function () { return models_1.validateAppConfig; } });
|