@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.
Files changed (74) hide show
  1. package/README.md +4 -4
  2. package/dist/{tpa → app}/index.d.ts.map +1 -1
  3. package/dist/{tpa → app}/index.js +2 -2
  4. package/dist/{tpa → app}/server/index.d.ts +21 -21
  5. package/dist/app/server/index.d.ts.map +1 -0
  6. package/dist/{tpa → app}/server/index.js +21 -21
  7. package/dist/{tpa → app}/session/api-client.d.ts +1 -1
  8. package/dist/{tpa → app}/session/api-client.d.ts.map +1 -1
  9. package/dist/{tpa → app}/session/api-client.js +2 -2
  10. package/dist/{tpa → app}/session/dashboard.d.ts +9 -9
  11. package/dist/{tpa → app}/session/dashboard.d.ts.map +1 -1
  12. package/dist/{tpa → app}/session/dashboard.js +10 -10
  13. package/dist/{tpa → app}/session/events.d.ts +1 -1
  14. package/dist/{tpa → app}/session/events.d.ts.map +1 -1
  15. package/dist/{tpa → app}/session/events.js +1 -1
  16. package/dist/{tpa → app}/session/index.d.ts +40 -38
  17. package/dist/app/session/index.d.ts.map +1 -0
  18. package/dist/{tpa → app}/session/index.js +126 -116
  19. package/dist/{tpa → app}/session/layouts.d.ts +2 -2
  20. package/dist/{tpa → app}/session/layouts.d.ts.map +1 -1
  21. package/dist/{tpa → app}/session/layouts.js +4 -4
  22. package/dist/{tpa → app}/session/modules/streaming.d.ts +5 -5
  23. package/dist/{tpa → app}/session/modules/streaming.d.ts.map +1 -1
  24. package/dist/{tpa → app}/session/modules/streaming.js +7 -7
  25. package/dist/{tpa → app}/session/settings.d.ts +3 -3
  26. package/dist/{tpa → app}/session/settings.d.ts.map +1 -1
  27. package/dist/{tpa → app}/session/settings.js +5 -7
  28. package/dist/app/token/index.d.ts +7 -0
  29. package/dist/app/token/index.d.ts.map +1 -0
  30. package/dist/{tpa → app}/token/index.js +2 -2
  31. package/dist/{tpa → app}/token/utils.d.ts +6 -6
  32. package/dist/{tpa → app}/token/utils.d.ts.map +1 -1
  33. package/dist/{tpa → app}/token/utils.js +6 -6
  34. package/dist/{tpa → app}/webview/index.d.ts +3 -3
  35. package/dist/{tpa → app}/webview/index.d.ts.map +1 -1
  36. package/dist/{tpa → app}/webview/index.js +4 -4
  37. package/dist/examples/rtmp-streaming-example.js +6 -6
  38. package/dist/index.d.ts +39 -2
  39. package/dist/index.d.ts.map +1 -1
  40. package/dist/index.js +76 -16
  41. package/dist/types/capabilities.d.ts +92 -0
  42. package/dist/types/capabilities.d.ts.map +1 -0
  43. package/dist/types/capabilities.js +9 -0
  44. package/dist/types/dashboard/index.d.ts +9 -9
  45. package/dist/types/enums.d.ts +2 -2
  46. package/dist/types/enums.js +8 -8
  47. package/dist/types/index.d.ts +7 -6
  48. package/dist/types/index.d.ts.map +1 -1
  49. package/dist/types/index.js +26 -24
  50. package/dist/types/layouts.d.ts +2 -2
  51. package/dist/types/message-types.d.ts +18 -18
  52. package/dist/types/message-types.js +47 -47
  53. package/dist/types/messages/app-to-cloud.d.ts +146 -0
  54. package/dist/types/messages/{tpa-to-cloud.d.ts.map → app-to-cloud.d.ts.map} +1 -1
  55. package/dist/types/messages/{tpa-to-cloud.js → app-to-cloud.js} +18 -18
  56. package/dist/types/messages/{cloud-to-tpa.d.ts → cloud-to-app.d.ts} +54 -52
  57. package/dist/types/messages/cloud-to-app.d.ts.map +1 -0
  58. package/dist/types/messages/{cloud-to-tpa.js → cloud-to-app.js} +22 -22
  59. package/dist/types/models.d.ts +7 -7
  60. package/dist/types/models.js +3 -3
  61. package/dist/types/streams.d.ts +2 -2
  62. package/dist/types/streams.js +2 -2
  63. package/dist/types/token.d.ts +7 -7
  64. package/dist/types/token.js +2 -2
  65. package/dist/types/webhooks.d.ts +8 -8
  66. package/dist/types/webhooks.js +3 -3
  67. package/package.json +2 -1
  68. package/dist/tpa/server/index.d.ts.map +0 -1
  69. package/dist/tpa/session/index.d.ts.map +0 -1
  70. package/dist/tpa/token/index.d.ts +0 -7
  71. package/dist/tpa/token/index.d.ts.map +0 -1
  72. package/dist/types/messages/cloud-to-tpa.d.ts.map +0 -1
  73. package/dist/types/messages/tpa-to-cloud.d.ts +0 -146
  74. /package/dist/{tpa → app}/index.d.ts +0 -0
@@ -0,0 +1,146 @@
1
+ import { BaseMessage } from './base';
2
+ import { AppToCloudMessageType } from '../message-types';
3
+ import { ExtendedStreamType } from '../streams';
4
+ import { DisplayRequest } from '../layouts';
5
+ import { DashboardContentUpdate, DashboardModeChange, DashboardSystemUpdate } from '../dashboard';
6
+ import { VideoConfig, AudioConfig, StreamConfig } from '../rtmp-stream';
7
+ /**
8
+ * Connection initialization from App
9
+ */
10
+ export interface AppConnectionInit extends BaseMessage {
11
+ type: AppToCloudMessageType.CONNECTION_INIT;
12
+ packageName: string;
13
+ sessionId: string;
14
+ apiKey: string;
15
+ }
16
+ /**
17
+ * Subscription update from App
18
+ */
19
+ export interface AppSubscriptionUpdate extends BaseMessage {
20
+ type: AppToCloudMessageType.SUBSCRIPTION_UPDATE;
21
+ packageName: string;
22
+ subscriptions: ExtendedStreamType[];
23
+ }
24
+ /**
25
+ * Photo request from App
26
+ */
27
+ export interface PhotoRequest extends BaseMessage {
28
+ type: AppToCloudMessageType.PHOTO_REQUEST;
29
+ packageName: string;
30
+ saveToGallery?: boolean;
31
+ }
32
+ /**
33
+ * RTMP stream request from App
34
+ */
35
+ export interface RtmpStreamRequest extends BaseMessage {
36
+ type: AppToCloudMessageType.RTMP_STREAM_REQUEST;
37
+ packageName: string;
38
+ rtmpUrl: string;
39
+ video?: VideoConfig;
40
+ audio?: AudioConfig;
41
+ stream?: StreamConfig;
42
+ }
43
+ /**
44
+ * RTMP stream stop request from App
45
+ */
46
+ export interface RtmpStreamStopRequest extends BaseMessage {
47
+ type: AppToCloudMessageType.RTMP_STREAM_STOP;
48
+ packageName: string;
49
+ streamId?: string;
50
+ }
51
+ /**
52
+ * Union type for all messages from Apps to cloud
53
+ */
54
+ export type AppToCloudMessage = AppConnectionInit | AppSubscriptionUpdate | DisplayRequest | PhotoRequest | RtmpStreamRequest | RtmpStreamStopRequest | DashboardContentUpdate | DashboardModeChange | DashboardSystemUpdate | AppBroadcastMessage | AppDirectMessage | AppUserDiscovery | AppRoomJoin | AppRoomLeave;
55
+ /**
56
+ * Type guard to check if a message is a App connection init
57
+ */
58
+ export declare function isAppConnectionInit(message: AppToCloudMessage): message is AppConnectionInit;
59
+ /**
60
+ * Type guard to check if a message is a App subscription update
61
+ */
62
+ export declare function isAppSubscriptionUpdate(message: AppToCloudMessage): message is AppSubscriptionUpdate;
63
+ /**
64
+ * Type guard to check if a message is a App display request
65
+ */
66
+ export declare function isDisplayRequest(message: AppToCloudMessage): message is DisplayRequest;
67
+ /**
68
+ * Type guard to check if a message is a App photo request
69
+ */
70
+ export declare function isPhotoRequest(message: AppToCloudMessage): message is PhotoRequest;
71
+ /**
72
+ * Type guard to check if a message is a dashboard content update
73
+ */
74
+ export declare function isDashboardContentUpdate(message: AppToCloudMessage): message is DashboardContentUpdate;
75
+ /**
76
+ * Type guard to check if a message is a dashboard mode change
77
+ */
78
+ export declare function isDashboardModeChange(message: AppToCloudMessage): message is DashboardModeChange;
79
+ /**
80
+ * Type guard to check if a message is a dashboard system update
81
+ */
82
+ export declare function isDashboardSystemUpdate(message: AppToCloudMessage): message is DashboardSystemUpdate;
83
+ /**
84
+ * Broadcast message to all users with the same App active
85
+ */
86
+ export interface AppBroadcastMessage extends BaseMessage {
87
+ type: AppToCloudMessageType.APP_BROADCAST_MESSAGE;
88
+ packageName: string;
89
+ sessionId: string;
90
+ payload: any;
91
+ messageId: string;
92
+ senderUserId: string;
93
+ }
94
+ /**
95
+ * Direct message to a specific user with the same App active
96
+ */
97
+ export interface AppDirectMessage extends BaseMessage {
98
+ type: AppToCloudMessageType.APP_DIRECT_MESSAGE;
99
+ packageName: string;
100
+ sessionId: string;
101
+ targetUserId: string;
102
+ payload: any;
103
+ messageId: string;
104
+ senderUserId: string;
105
+ }
106
+ /**
107
+ * Request to discover other users with the same App active
108
+ */
109
+ export interface AppUserDiscovery extends BaseMessage {
110
+ type: AppToCloudMessageType.APP_USER_DISCOVERY;
111
+ packageName: string;
112
+ sessionId: string;
113
+ includeUserProfiles?: boolean;
114
+ }
115
+ /**
116
+ * Join a communication room for group messaging
117
+ */
118
+ export interface AppRoomJoin extends BaseMessage {
119
+ type: AppToCloudMessageType.APP_ROOM_JOIN;
120
+ packageName: string;
121
+ sessionId: string;
122
+ roomId: string;
123
+ roomConfig?: {
124
+ maxUsers?: number;
125
+ isPrivate?: boolean;
126
+ metadata?: any;
127
+ };
128
+ }
129
+ /**
130
+ * Leave a communication room
131
+ */
132
+ export interface AppRoomLeave extends BaseMessage {
133
+ type: AppToCloudMessageType.APP_ROOM_LEAVE;
134
+ packageName: string;
135
+ sessionId: string;
136
+ roomId: string;
137
+ }
138
+ /**
139
+ * Type guard to check if a message is an RTMP stream request
140
+ */
141
+ export declare function isRtmpStreamRequest(message: AppToCloudMessage): message is RtmpStreamRequest;
142
+ /**
143
+ * Type guard to check if a message is an RTMP stream stop request
144
+ */
145
+ export declare function isRtmpStreamStopRequest(message: AppToCloudMessage): message is RtmpStreamStopRequest;
146
+ //# sourceMappingURL=app-to-cloud.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"tpa-to-cloud.d.ts","sourceRoot":"","sources":["../../../src/types/messages/tpa-to-cloud.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,QAAQ,CAAC;AACrC,OAAO,EAAE,qBAAqB,EAAE,MAAM,kBAAkB,CAAC;AACzD,OAAO,EAAE,kBAAkB,EAAc,MAAM,YAAY,CAAC;AAC5D,OAAO,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAC5C,OAAO,EAAE,sBAAsB,EAAE,mBAAmB,EAAE,qBAAqB,EAAE,MAAM,cAAc,CAAC;AAClG,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,gBAAg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M,CAAC;CACtB;AAED;;GAEG;AACH,MAAM,WAAW,gBAAiB,SAAQ,WAAW;IACnD,IAAI,EAAE,qBAAqB,CAAC,kBAAkB,CAAC;IAC/C,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,EAAE,MAAM,CAAC;IAClB,mBAAmB,CAAC,EAAE,OAAO,CAAC;CAC/B;AAED;;GAEG;AACH,MAAM,WAAW,WAAY,SAAQ,WAAW;IAC9C,IAAI,EAAE,qBAAqB,CAAC,aAAa,CAAC;IAC1C,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,MAAM,CAAC;IACf,UAAU,CAAC,EAAE;QACX,QAAQ,CAAC,EAAE,MAAM,CAAC;QAClB,SAAS,CAAC,EAAE,OAAO,CAAC;QACpB,QAAQ,CAAC,EAAE,GAAG,CAAC;KAChB,CAAC;CACH;AAED;;GAEG;AACH,MAAM,WAAW,YAAa,SAAQ,WAAW;IAC/C,IAAI,EAAE,qBAAqB,CAAC,cAAc,CAAC;IAC3C,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,MAAM,CAAC;CAChB;AAED;;GAEG;AACH,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,iBAAiB,GAAG,OAAO,IAAI,iBAAiB,CAE5F;AAED;;GAEG;AACH,wBAAgB,uBAAuB,CAAC,OAAO,EAAE,iBAAiB,GAAG,OAAO,IAAI,qBAAqB,CAEpG"}
@@ -1,8 +1,8 @@
1
1
  "use strict";
2
- // src/messages/tpa-to-cloud.ts
2
+ // src/messages/app-to-cloud.ts
3
3
  Object.defineProperty(exports, "__esModule", { value: true });
4
- exports.isTpaConnectionInit = isTpaConnectionInit;
5
- exports.isTpaSubscriptionUpdate = isTpaSubscriptionUpdate;
4
+ exports.isAppConnectionInit = isAppConnectionInit;
5
+ exports.isAppSubscriptionUpdate = isAppSubscriptionUpdate;
6
6
  exports.isDisplayRequest = isDisplayRequest;
7
7
  exports.isPhotoRequest = isPhotoRequest;
8
8
  exports.isDashboardContentUpdate = isDashboardContentUpdate;
@@ -12,56 +12,56 @@ exports.isRtmpStreamRequest = isRtmpStreamRequest;
12
12
  exports.isRtmpStreamStopRequest = isRtmpStreamStopRequest;
13
13
  const message_types_1 = require("../message-types");
14
14
  /**
15
- * Type guard to check if a message is a TPA connection init
15
+ * Type guard to check if a message is a App connection init
16
16
  */
17
- function isTpaConnectionInit(message) {
18
- return message.type === message_types_1.TpaToCloudMessageType.CONNECTION_INIT;
17
+ function isAppConnectionInit(message) {
18
+ return message.type === message_types_1.AppToCloudMessageType.CONNECTION_INIT;
19
19
  }
20
20
  /**
21
- * Type guard to check if a message is a TPA subscription update
21
+ * Type guard to check if a message is a App subscription update
22
22
  */
23
- function isTpaSubscriptionUpdate(message) {
24
- return message.type === message_types_1.TpaToCloudMessageType.SUBSCRIPTION_UPDATE;
23
+ function isAppSubscriptionUpdate(message) {
24
+ return message.type === message_types_1.AppToCloudMessageType.SUBSCRIPTION_UPDATE;
25
25
  }
26
26
  /**
27
- * Type guard to check if a message is a TPA display request
27
+ * Type guard to check if a message is a App display request
28
28
  */
29
29
  function isDisplayRequest(message) {
30
- return message.type === message_types_1.TpaToCloudMessageType.DISPLAY_REQUEST;
30
+ return message.type === message_types_1.AppToCloudMessageType.DISPLAY_REQUEST;
31
31
  }
32
32
  /**
33
- * Type guard to check if a message is a TPA photo request
33
+ * Type guard to check if a message is a App photo request
34
34
  */
35
35
  function isPhotoRequest(message) {
36
- return message.type === message_types_1.TpaToCloudMessageType.PHOTO_REQUEST;
36
+ return message.type === message_types_1.AppToCloudMessageType.PHOTO_REQUEST;
37
37
  }
38
38
  /**
39
39
  * Type guard to check if a message is a dashboard content update
40
40
  */
41
41
  function isDashboardContentUpdate(message) {
42
- return message.type === message_types_1.TpaToCloudMessageType.DASHBOARD_CONTENT_UPDATE;
42
+ return message.type === message_types_1.AppToCloudMessageType.DASHBOARD_CONTENT_UPDATE;
43
43
  }
44
44
  /**
45
45
  * Type guard to check if a message is a dashboard mode change
46
46
  */
47
47
  function isDashboardModeChange(message) {
48
- return message.type === message_types_1.TpaToCloudMessageType.DASHBOARD_MODE_CHANGE;
48
+ return message.type === message_types_1.AppToCloudMessageType.DASHBOARD_MODE_CHANGE;
49
49
  }
50
50
  /**
51
51
  * Type guard to check if a message is a dashboard system update
52
52
  */
53
53
  function isDashboardSystemUpdate(message) {
54
- return message.type === message_types_1.TpaToCloudMessageType.DASHBOARD_SYSTEM_UPDATE;
54
+ return message.type === message_types_1.AppToCloudMessageType.DASHBOARD_SYSTEM_UPDATE;
55
55
  }
56
56
  /**
57
57
  * Type guard to check if a message is an RTMP stream request
58
58
  */
59
59
  function isRtmpStreamRequest(message) {
60
- return message.type === message_types_1.TpaToCloudMessageType.RTMP_STREAM_REQUEST;
60
+ return message.type === message_types_1.AppToCloudMessageType.RTMP_STREAM_REQUEST;
61
61
  }
62
62
  /**
63
63
  * Type guard to check if a message is an RTMP stream stop request
64
64
  */
65
65
  function isRtmpStreamStopRequest(message) {
66
- return message.type === message_types_1.TpaToCloudMessageType.RTMP_STREAM_STOP;
66
+ return message.type === message_types_1.AppToCloudMessageType.RTMP_STREAM_STOP;
67
67
  }
@@ -1,23 +1,25 @@
1
1
  import { BaseMessage } from './base';
2
- import { CloudToTpaMessageType } from '../message-types';
2
+ import { CloudToAppMessageType } from '../message-types';
3
3
  import { StreamType } from '../streams';
4
- import { AppSettings, TpaConfig } from '../models';
4
+ import { AppSettings, AppConfig } from '../models';
5
5
  import { LocationUpdate, CalendarEvent, RtmpStreamStatus, PhotoResponse } from './glasses-to-cloud';
6
6
  import { DashboardMode } from '../dashboard';
7
+ import { Capabilities } from '../capabilities';
7
8
  /**
8
- * Connection acknowledgment to TPA
9
+ * Connection acknowledgment to App
9
10
  */
10
- export interface TpaConnectionAck extends BaseMessage {
11
- type: CloudToTpaMessageType.CONNECTION_ACK;
11
+ export interface AppConnectionAck extends BaseMessage {
12
+ type: CloudToAppMessageType.CONNECTION_ACK;
12
13
  settings?: AppSettings;
13
14
  augmentosSettings?: Record<string, any>;
14
- config?: TpaConfig;
15
+ config?: AppConfig;
16
+ capabilities?: Capabilities;
15
17
  }
16
18
  /**
17
- * Connection error to TPA
19
+ * Connection error to App
18
20
  */
19
- export interface TpaConnectionError extends BaseMessage {
20
- type: CloudToTpaMessageType.CONNECTION_ERROR;
21
+ export interface AppConnectionError extends BaseMessage {
22
+ type: CloudToAppMessageType.CONNECTION_ERROR;
21
23
  message: string;
22
24
  code?: string;
23
25
  }
@@ -33,34 +35,34 @@ export interface PermissionErrorDetail {
33
35
  message: string;
34
36
  }
35
37
  /**
36
- * Permission error notification to TPA
38
+ * Permission error notification to App
37
39
  * Sent when subscriptions are rejected due to missing permissions
38
40
  */
39
41
  export interface PermissionError extends BaseMessage {
40
- type: CloudToTpaMessageType.PERMISSION_ERROR;
42
+ type: CloudToAppMessageType.PERMISSION_ERROR;
41
43
  /** General error message */
42
44
  message: string;
43
45
  /** Array of details for each rejected stream */
44
46
  details: PermissionErrorDetail[];
45
47
  }
46
48
  /**
47
- * App stopped notification to TPA
49
+ * App stopped notification to App
48
50
  */
49
51
  export interface AppStopped extends BaseMessage {
50
- type: CloudToTpaMessageType.APP_STOPPED;
52
+ type: CloudToAppMessageType.APP_STOPPED;
51
53
  reason: "user_disabled" | "system_stop" | "error";
52
54
  message?: string;
53
55
  }
54
56
  /**
55
- * Settings update to TPA
57
+ * Settings update to App
56
58
  */
57
59
  export interface SettingsUpdate extends BaseMessage {
58
- type: CloudToTpaMessageType.SETTINGS_UPDATE;
60
+ type: CloudToAppMessageType.SETTINGS_UPDATE;
59
61
  packageName: string;
60
62
  settings: AppSettings;
61
63
  }
62
64
  /**
63
- * AugmentOS settings update to TPA
65
+ * AugmentOS settings update to App
64
66
  */
65
67
  export interface AugmentosSettingsUpdate extends BaseMessage {
66
68
  type: 'augmentos_settings_update';
@@ -106,7 +108,7 @@ export interface AudioChunk extends BaseMessage {
106
108
  sampleRate?: number;
107
109
  }
108
110
  /**
109
- * Tool call from cloud to TPA
111
+ * Tool call from cloud to App
110
112
  * Represents a tool invocation with filled parameters
111
113
  */
112
114
  export interface ToolCall {
@@ -116,10 +118,10 @@ export interface ToolCall {
116
118
  userId: string;
117
119
  }
118
120
  /**
119
- * Stream data to TPA
121
+ * Stream data to App
120
122
  */
121
123
  export interface DataStream extends BaseMessage {
122
- type: CloudToTpaMessageType.DATA_STREAM;
124
+ type: CloudToAppMessageType.DATA_STREAM;
123
125
  streamType: StreamType;
124
126
  data: unknown;
125
127
  }
@@ -127,14 +129,14 @@ export interface DataStream extends BaseMessage {
127
129
  * Dashboard mode changed notification
128
130
  */
129
131
  export interface DashboardModeChanged extends BaseMessage {
130
- type: CloudToTpaMessageType.DASHBOARD_MODE_CHANGED;
132
+ type: CloudToAppMessageType.DASHBOARD_MODE_CHANGED;
131
133
  mode: DashboardMode;
132
134
  }
133
135
  /**
134
136
  * Dashboard always-on state changed notification
135
137
  */
136
138
  export interface DashboardAlwaysOnChanged extends BaseMessage {
137
- type: CloudToTpaMessageType.DASHBOARD_ALWAYS_ON_CHANGED;
139
+ type: CloudToAppMessageType.DASHBOARD_ALWAYS_ON_CHANGED;
138
140
  enabled: boolean;
139
141
  }
140
142
  /**
@@ -145,35 +147,35 @@ export interface StandardConnectionError extends BaseMessage {
145
147
  message: string;
146
148
  }
147
149
  /**
148
- * Custom message for general-purpose communication (cloud to TPA)
150
+ * Custom message for general-purpose communication (cloud to App)
149
151
  */
150
152
  export interface CustomMessage extends BaseMessage {
151
- type: CloudToTpaMessageType.CUSTOM_MESSAGE;
153
+ type: CloudToAppMessageType.CUSTOM_MESSAGE;
152
154
  action: string;
153
155
  payload: any;
154
156
  }
155
157
  /**
156
- * Union type for all messages from cloud to TPAs
158
+ * Union type for all messages from cloud to Apps
157
159
  */
158
- export type CloudToTpaMessage = TpaConnectionAck | TpaConnectionError | StandardConnectionError | DataStream | AppStopped | SettingsUpdate | TranscriptionData | TranslationData | AudioChunk | LocationUpdate | CalendarEvent | DataStream | PhotoResponse | DashboardModeChanged | DashboardAlwaysOnChanged | CustomMessage | AugmentosSettingsUpdate | TpaMessageReceived | TpaUserJoined | TpaUserLeft | TpaRoomUpdated | TpaDirectMessageResponse | RtmpStreamStatus | PhotoResponse | PermissionError;
159
- export declare function isTpaConnectionAck(message: CloudToTpaMessage): message is TpaConnectionAck;
160
- export declare function isTpaConnectionError(message: CloudToTpaMessage): message is TpaConnectionError;
161
- export declare function isAppStopped(message: CloudToTpaMessage): message is AppStopped;
162
- export declare function isSettingsUpdate(message: CloudToTpaMessage): message is SettingsUpdate;
163
- export declare function isDataStream(message: CloudToTpaMessage): message is DataStream;
164
- export declare function isAudioChunk(message: CloudToTpaMessage): message is AudioChunk;
165
- export declare function isDashboardModeChanged(message: CloudToTpaMessage): message is DashboardModeChanged;
166
- export declare function isDashboardAlwaysOnChanged(message: CloudToTpaMessage): message is DashboardAlwaysOnChanged;
167
- export declare function isRtmpStreamStatus(message: CloudToTpaMessage): message is RtmpStreamStatus;
168
- export declare function isPhotoResponse(message: CloudToTpaMessage): message is PhotoResponse;
169
- export declare function isTpaMessageReceived(message: CloudToTpaMessage): message is TpaMessageReceived;
170
- export declare function isTpaUserJoined(message: CloudToTpaMessage): message is TpaUserJoined;
171
- export declare function isTpaUserLeft(message: CloudToTpaMessage): message is TpaUserLeft;
160
+ export type CloudToAppMessage = AppConnectionAck | AppConnectionError | StandardConnectionError | DataStream | AppStopped | SettingsUpdate | TranscriptionData | TranslationData | AudioChunk | LocationUpdate | CalendarEvent | DataStream | PhotoResponse | DashboardModeChanged | DashboardAlwaysOnChanged | CustomMessage | AugmentosSettingsUpdate | AppMessageReceived | AppUserJoined | AppUserLeft | AppRoomUpdated | AppDirectMessageResponse | RtmpStreamStatus | PhotoResponse | PermissionError;
161
+ export declare function isAppConnectionAck(message: CloudToAppMessage): message is AppConnectionAck;
162
+ export declare function isAppConnectionError(message: CloudToAppMessage): message is AppConnectionError;
163
+ export declare function isAppStopped(message: CloudToAppMessage): message is AppStopped;
164
+ export declare function isSettingsUpdate(message: CloudToAppMessage): message is SettingsUpdate;
165
+ export declare function isDataStream(message: CloudToAppMessage): message is DataStream;
166
+ export declare function isAudioChunk(message: CloudToAppMessage): message is AudioChunk;
167
+ export declare function isDashboardModeChanged(message: CloudToAppMessage): message is DashboardModeChanged;
168
+ export declare function isDashboardAlwaysOnChanged(message: CloudToAppMessage): message is DashboardAlwaysOnChanged;
169
+ export declare function isRtmpStreamStatus(message: CloudToAppMessage): message is RtmpStreamStatus;
170
+ export declare function isPhotoResponse(message: CloudToAppMessage): message is PhotoResponse;
171
+ export declare function isAppMessageReceived(message: CloudToAppMessage): message is AppMessageReceived;
172
+ export declare function isAppUserJoined(message: CloudToAppMessage): message is AppUserJoined;
173
+ export declare function isAppUserLeft(message: CloudToAppMessage): message is AppUserLeft;
172
174
  /**
173
- * Message received from another TPA user
175
+ * Message received from another App user
174
176
  */
175
- export interface TpaMessageReceived extends BaseMessage {
176
- type: CloudToTpaMessageType.TPA_MESSAGE_RECEIVED;
177
+ export interface AppMessageReceived extends BaseMessage {
178
+ type: CloudToAppMessageType.APP_MESSAGE_RECEIVED;
177
179
  payload: any;
178
180
  messageId: string;
179
181
  senderUserId: string;
@@ -181,10 +183,10 @@ export interface TpaMessageReceived extends BaseMessage {
181
183
  roomId?: string;
182
184
  }
183
185
  /**
184
- * Notification that a user joined the TPA
186
+ * Notification that a user joined the App
185
187
  */
186
- export interface TpaUserJoined extends BaseMessage {
187
- type: CloudToTpaMessageType.TPA_USER_JOINED;
188
+ export interface AppUserJoined extends BaseMessage {
189
+ type: CloudToAppMessageType.APP_USER_JOINED;
188
190
  userId: string;
189
191
  sessionId: string;
190
192
  joinedAt: Date;
@@ -192,10 +194,10 @@ export interface TpaUserJoined extends BaseMessage {
192
194
  roomId?: string;
193
195
  }
194
196
  /**
195
- * Notification that a user left the TPA
197
+ * Notification that a user left the App
196
198
  */
197
- export interface TpaUserLeft extends BaseMessage {
198
- type: CloudToTpaMessageType.TPA_USER_LEFT;
199
+ export interface AppUserLeft extends BaseMessage {
200
+ type: CloudToAppMessageType.APP_USER_LEFT;
199
201
  userId: string;
200
202
  sessionId: string;
201
203
  leftAt: Date;
@@ -204,8 +206,8 @@ export interface TpaUserLeft extends BaseMessage {
204
206
  /**
205
207
  * Room status update (members, config changes, etc.)
206
208
  */
207
- export interface TpaRoomUpdated extends BaseMessage {
208
- type: CloudToTpaMessageType.TPA_ROOM_UPDATED;
209
+ export interface AppRoomUpdated extends BaseMessage {
210
+ type: CloudToAppMessageType.APP_ROOM_UPDATED;
209
211
  roomId: string;
210
212
  updateType: 'user_joined' | 'user_left' | 'config_changed' | 'room_closed';
211
213
  roomData: {
@@ -218,11 +220,11 @@ export interface TpaRoomUpdated extends BaseMessage {
218
220
  /**
219
221
  * Response to a direct message attempt
220
222
  */
221
- export interface TpaDirectMessageResponse extends BaseMessage {
222
- type: CloudToTpaMessageType.TPA_DIRECT_MESSAGE_RESPONSE;
223
+ export interface AppDirectMessageResponse extends BaseMessage {
224
+ type: CloudToAppMessageType.APP_DIRECT_MESSAGE_RESPONSE;
223
225
  messageId: string;
224
226
  success: boolean;
225
227
  error?: string;
226
228
  targetUserId: string;
227
229
  }
228
- //# sourceMappingURL=cloud-to-tpa.d.ts.map
230
+ //# sourceMappingURL=cloud-to-app.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cloud-to-app.d.ts","sourceRoot":"","sources":["../../../src/types/messages/cloud-to-app.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,QAAQ,CAAC;AACrC,OAAO,EAAE,qBAAqB,EAA6B,MAAM,kBAAkB,CAAC;AACpF,OAAO,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AACxC,OAAO,EAAE,WAAW,EAAE,SAAS,EAAkB,MAAM,WAAW,CAAC;AACnE,OAAO,EAAE,cAAc,EAAE,aAAa,EAAE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1,8 +1,8 @@
1
1
  "use strict";
2
- // src/messages/cloud-to-tpa.ts
2
+ // src/messages/cloud-to-app.ts
3
3
  Object.defineProperty(exports, "__esModule", { value: true });
4
- exports.isTpaConnectionAck = isTpaConnectionAck;
5
- exports.isTpaConnectionError = isTpaConnectionError;
4
+ exports.isAppConnectionAck = isAppConnectionAck;
5
+ exports.isAppConnectionError = isAppConnectionError;
6
6
  exports.isAppStopped = isAppStopped;
7
7
  exports.isSettingsUpdate = isSettingsUpdate;
8
8
  exports.isDataStream = isDataStream;
@@ -11,37 +11,37 @@ exports.isDashboardModeChanged = isDashboardModeChanged;
11
11
  exports.isDashboardAlwaysOnChanged = isDashboardAlwaysOnChanged;
12
12
  exports.isRtmpStreamStatus = isRtmpStreamStatus;
13
13
  exports.isPhotoResponse = isPhotoResponse;
14
- exports.isTpaMessageReceived = isTpaMessageReceived;
15
- exports.isTpaUserJoined = isTpaUserJoined;
16
- exports.isTpaUserLeft = isTpaUserLeft;
14
+ exports.isAppMessageReceived = isAppMessageReceived;
15
+ exports.isAppUserJoined = isAppUserJoined;
16
+ exports.isAppUserLeft = isAppUserLeft;
17
17
  const message_types_1 = require("../message-types");
18
18
  const streams_1 = require("../streams");
19
19
  //===========================================================
20
20
  // Type guards
21
21
  //===========================================================
22
- function isTpaConnectionAck(message) {
23
- return message.type === message_types_1.CloudToTpaMessageType.CONNECTION_ACK;
22
+ function isAppConnectionAck(message) {
23
+ return message.type === message_types_1.CloudToAppMessageType.CONNECTION_ACK;
24
24
  }
25
- function isTpaConnectionError(message) {
26
- return message.type === message_types_1.CloudToTpaMessageType.CONNECTION_ERROR || message.type === 'connection_error';
25
+ function isAppConnectionError(message) {
26
+ return message.type === message_types_1.CloudToAppMessageType.CONNECTION_ERROR || message.type === 'connection_error';
27
27
  }
28
28
  function isAppStopped(message) {
29
- return message.type === message_types_1.CloudToTpaMessageType.APP_STOPPED;
29
+ return message.type === message_types_1.CloudToAppMessageType.APP_STOPPED;
30
30
  }
31
31
  function isSettingsUpdate(message) {
32
- return message.type === message_types_1.CloudToTpaMessageType.SETTINGS_UPDATE;
32
+ return message.type === message_types_1.CloudToAppMessageType.SETTINGS_UPDATE;
33
33
  }
34
34
  function isDataStream(message) {
35
- return message.type === message_types_1.CloudToTpaMessageType.DATA_STREAM;
35
+ return message.type === message_types_1.CloudToAppMessageType.DATA_STREAM;
36
36
  }
37
37
  function isAudioChunk(message) {
38
38
  return message.type === streams_1.StreamType.AUDIO_CHUNK;
39
39
  }
40
40
  function isDashboardModeChanged(message) {
41
- return message.type === message_types_1.CloudToTpaMessageType.DASHBOARD_MODE_CHANGED;
41
+ return message.type === message_types_1.CloudToAppMessageType.DASHBOARD_MODE_CHANGED;
42
42
  }
43
43
  function isDashboardAlwaysOnChanged(message) {
44
- return message.type === message_types_1.CloudToTpaMessageType.DASHBOARD_ALWAYS_ON_CHANGED;
44
+ return message.type === message_types_1.CloudToAppMessageType.DASHBOARD_ALWAYS_ON_CHANGED;
45
45
  }
46
46
  function isRtmpStreamStatus(message) {
47
47
  return message.type === message_types_1.GlassesToCloudMessageType.RTMP_STREAM_STATUS;
@@ -49,13 +49,13 @@ function isRtmpStreamStatus(message) {
49
49
  function isPhotoResponse(message) {
50
50
  return message.type === message_types_1.GlassesToCloudMessageType.PHOTO_RESPONSE;
51
51
  }
52
- // New type guards for TPA-to-TPA communication
53
- function isTpaMessageReceived(message) {
54
- return message.type === message_types_1.CloudToTpaMessageType.TPA_MESSAGE_RECEIVED;
52
+ // New type guards for App-to-App communication
53
+ function isAppMessageReceived(message) {
54
+ return message.type === message_types_1.CloudToAppMessageType.APP_MESSAGE_RECEIVED;
55
55
  }
56
- function isTpaUserJoined(message) {
57
- return message.type === message_types_1.CloudToTpaMessageType.TPA_USER_JOINED;
56
+ function isAppUserJoined(message) {
57
+ return message.type === message_types_1.CloudToAppMessageType.APP_USER_JOINED;
58
58
  }
59
- function isTpaUserLeft(message) {
60
- return message.type === message_types_1.CloudToTpaMessageType.TPA_USER_LEFT;
59
+ function isAppUserLeft(message) {
60
+ return message.type === message_types_1.CloudToAppMessageType.APP_USER_LEFT;
61
61
  }
@@ -1,4 +1,4 @@
1
- import { AppSettingType, TpaType } from './enums';
1
+ import { AppSettingType, AppType } from './enums';
2
2
  export interface ToolParameterSchema {
3
3
  type: 'string' | 'number' | 'boolean';
4
4
  description: string;
@@ -46,7 +46,7 @@ export interface AppI {
46
46
  uninstallable?: boolean;
47
47
  webviewURL?: string;
48
48
  logoURL: string;
49
- tpaType: TpaType;
49
+ appType: AppType;
50
50
  appStoreId?: string;
51
51
  /**
52
52
  * @deprecated Use organizationId instead. Will be removed after migration.
@@ -129,10 +129,10 @@ export type AppSetting = (BaseAppSetting & {
129
129
  });
130
130
  export type AppSettings = AppSetting[];
131
131
  /**
132
- * TPA configuration file structure
133
- * Represents the schema in tpa_config.json
132
+ * App configuration file structure
133
+ * Represents the schema in app_config.json
134
134
  */
135
- export interface TpaConfig {
135
+ export interface AppConfig {
136
136
  name: string;
137
137
  description: string;
138
138
  version: string;
@@ -140,11 +140,11 @@ export interface TpaConfig {
140
140
  tools: ToolSchema[];
141
141
  }
142
142
  /**
143
- * Validate a TPA configuration object
143
+ * Validate a App configuration object
144
144
  * @param config Object to validate
145
145
  * @returns True if the config is valid
146
146
  */
147
- export declare function validateTpaConfig(config: any): config is TpaConfig;
147
+ export declare function validateAppConfig(config: any): config is AppConfig;
148
148
  /**
149
149
  * Transcript segment for speech processing
150
150
  */
@@ -3,7 +3,7 @@
3
3
  // packages/sdk/types/src/models.ts - Core models
4
4
  Object.defineProperty(exports, "__esModule", { value: true });
5
5
  exports.LEGACY_PERMISSION_MAP = exports.PermissionType = void 0;
6
- exports.validateTpaConfig = validateTpaConfig;
6
+ exports.validateAppConfig = validateAppConfig;
7
7
  const enums_1 = require("./enums");
8
8
  // Define PermissionType enum with legacy support
9
9
  var PermissionType;
@@ -23,11 +23,11 @@ exports.LEGACY_PERMISSION_MAP = new Map([
23
23
  [PermissionType.NOTIFICATIONS, [PermissionType.READ_NOTIFICATIONS]]
24
24
  ]);
25
25
  /**
26
- * Validate a TPA configuration object
26
+ * Validate a App configuration object
27
27
  * @param config Object to validate
28
28
  * @returns True if the config is valid
29
29
  */
30
- function validateTpaConfig(config) {
30
+ function validateAppConfig(config) {
31
31
  if (!config || typeof config !== 'object')
32
32
  return false;
33
33
  // Check required string properties
@@ -1,7 +1,7 @@
1
1
  /**
2
- * Types of streams that TPAs can subscribe to
2
+ * Types of streams that Apps can subscribe to
3
3
  *
4
- * These are events and data that TPAs can receive from the cloud.
4
+ * These are events and data that Apps can receive from the cloud.
5
5
  * Not all message types can be subscribed to as streams.
6
6
  */
7
7
  export declare enum StreamType {
@@ -13,9 +13,9 @@ exports.getBaseStreamType = getBaseStreamType;
13
13
  exports.isLanguageStream = isLanguageStream;
14
14
  exports.getLanguageInfo = getLanguageInfo;
15
15
  /**
16
- * Types of streams that TPAs can subscribe to
16
+ * Types of streams that Apps can subscribe to
17
17
  *
18
- * These are events and data that TPAs can receive from the cloud.
18
+ * These are events and data that Apps can receive from the cloud.
19
19
  * Not all message types can be subscribed to as streams.
20
20
  */
21
21
  var StreamType;