@glassly/miniapp 0.3.0-dev.1

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 (312) hide show
  1. package/README.md +275 -0
  2. package/dist/background/index.d.ts +64 -0
  3. package/dist/background/index.d.ts.map +1 -0
  4. package/dist/background/index.js +26 -0
  5. package/dist/background/index.js.map +1 -0
  6. package/dist/background/register.d.ts +39 -0
  7. package/dist/background/register.d.ts.map +1 -0
  8. package/dist/background/register.js +72 -0
  9. package/dist/background/register.js.map +1 -0
  10. package/dist/dev-reload.d.ts +21 -0
  11. package/dist/dev-reload.d.ts.map +1 -0
  12. package/dist/dev-reload.js +60 -0
  13. package/dist/dev-reload.js.map +1 -0
  14. package/dist/envelope.d.ts +23 -0
  15. package/dist/envelope.d.ts.map +1 -0
  16. package/dist/envelope.js +47 -0
  17. package/dist/envelope.js.map +1 -0
  18. package/dist/globals.d.ts +54 -0
  19. package/dist/globals.d.ts.map +1 -0
  20. package/dist/globals.js +12 -0
  21. package/dist/globals.js.map +1 -0
  22. package/dist/hardware.d.ts +38 -0
  23. package/dist/hardware.d.ts.map +1 -0
  24. package/dist/hardware.js +31 -0
  25. package/dist/hardware.js.map +1 -0
  26. package/dist/index.d.ts +65 -0
  27. package/dist/index.d.ts.map +1 -0
  28. package/dist/index.js +34 -0
  29. package/dist/index.js.map +1 -0
  30. package/dist/modules/actions.d.ts +81 -0
  31. package/dist/modules/actions.d.ts.map +1 -0
  32. package/dist/modules/actions.js +137 -0
  33. package/dist/modules/actions.js.map +1 -0
  34. package/dist/modules/ai.d.ts +211 -0
  35. package/dist/modules/ai.d.ts.map +1 -0
  36. package/dist/modules/ai.js +117 -0
  37. package/dist/modules/ai.js.map +1 -0
  38. package/dist/modules/auth.d.ts +25 -0
  39. package/dist/modules/auth.d.ts.map +1 -0
  40. package/dist/modules/auth.js +52 -0
  41. package/dist/modules/auth.js.map +1 -0
  42. package/dist/modules/base64.d.ts +16 -0
  43. package/dist/modules/base64.d.ts.map +1 -0
  44. package/dist/modules/base64.js +92 -0
  45. package/dist/modules/base64.js.map +1 -0
  46. package/dist/modules/blob.d.ts +161 -0
  47. package/dist/modules/blob.d.ts.map +1 -0
  48. package/dist/modules/blob.js +277 -0
  49. package/dist/modules/blob.js.map +1 -0
  50. package/dist/modules/camera.d.ts +183 -0
  51. package/dist/modules/camera.d.ts.map +1 -0
  52. package/dist/modules/camera.js +119 -0
  53. package/dist/modules/camera.js.map +1 -0
  54. package/dist/modules/cloud.d.ts +34 -0
  55. package/dist/modules/cloud.d.ts.map +1 -0
  56. package/dist/modules/cloud.js +70 -0
  57. package/dist/modules/cloud.js.map +1 -0
  58. package/dist/modules/dashboard.d.ts +24 -0
  59. package/dist/modules/dashboard.d.ts.map +1 -0
  60. package/dist/modules/dashboard.js +39 -0
  61. package/dist/modules/dashboard.js.map +1 -0
  62. package/dist/modules/display.d.ts +167 -0
  63. package/dist/modules/display.d.ts.map +1 -0
  64. package/dist/modules/display.js +83 -0
  65. package/dist/modules/display.js.map +1 -0
  66. package/dist/modules/events.d.ts +178 -0
  67. package/dist/modules/events.d.ts.map +1 -0
  68. package/dist/modules/events.js +168 -0
  69. package/dist/modules/events.js.map +1 -0
  70. package/dist/modules/glasses.d.ts +36 -0
  71. package/dist/modules/glasses.d.ts.map +1 -0
  72. package/dist/modules/glasses.js +52 -0
  73. package/dist/modules/glasses.js.map +1 -0
  74. package/dist/modules/heading.d.ts +16 -0
  75. package/dist/modules/heading.d.ts.map +1 -0
  76. package/dist/modules/heading.js +20 -0
  77. package/dist/modules/heading.js.map +1 -0
  78. package/dist/modules/imu.d.ts +31 -0
  79. package/dist/modules/imu.d.ts.map +1 -0
  80. package/dist/modules/imu.js +40 -0
  81. package/dist/modules/imu.js.map +1 -0
  82. package/dist/modules/input.d.ts +34 -0
  83. package/dist/modules/input.d.ts.map +1 -0
  84. package/dist/modules/input.js +50 -0
  85. package/dist/modules/input.js.map +1 -0
  86. package/dist/modules/keys.d.ts +30 -0
  87. package/dist/modules/keys.d.ts.map +1 -0
  88. package/dist/modules/keys.js +37 -0
  89. package/dist/modules/keys.js.map +1 -0
  90. package/dist/modules/languages.d.ts +42 -0
  91. package/dist/modules/languages.d.ts.map +1 -0
  92. package/dist/modules/languages.js +57 -0
  93. package/dist/modules/languages.js.map +1 -0
  94. package/dist/modules/led.d.ts +35 -0
  95. package/dist/modules/led.d.ts.map +1 -0
  96. package/dist/modules/led.js +39 -0
  97. package/dist/modules/led.js.map +1 -0
  98. package/dist/modules/location.d.ts +27 -0
  99. package/dist/modules/location.d.ts.map +1 -0
  100. package/dist/modules/location.js +35 -0
  101. package/dist/modules/location.js.map +1 -0
  102. package/dist/modules/memory.d.ts +126 -0
  103. package/dist/modules/memory.d.ts.map +1 -0
  104. package/dist/modules/memory.js +141 -0
  105. package/dist/modules/memory.js.map +1 -0
  106. package/dist/modules/mic.d.ts +61 -0
  107. package/dist/modules/mic.d.ts.map +1 -0
  108. package/dist/modules/mic.js +94 -0
  109. package/dist/modules/mic.js.map +1 -0
  110. package/dist/modules/miniapps.d.ts +82 -0
  111. package/dist/modules/miniapps.d.ts.map +1 -0
  112. package/dist/modules/miniapps.js +58 -0
  113. package/dist/modules/miniapps.js.map +1 -0
  114. package/dist/modules/navigation.d.ts +332 -0
  115. package/dist/modules/navigation.d.ts.map +1 -0
  116. package/dist/modules/navigation.js +387 -0
  117. package/dist/modules/navigation.js.map +1 -0
  118. package/dist/modules/permissions.d.ts +58 -0
  119. package/dist/modules/permissions.d.ts.map +1 -0
  120. package/dist/modules/permissions.js +66 -0
  121. package/dist/modules/permissions.js.map +1 -0
  122. package/dist/modules/phone.d.ts +95 -0
  123. package/dist/modules/phone.d.ts.map +1 -0
  124. package/dist/modules/phone.js +110 -0
  125. package/dist/modules/phone.js.map +1 -0
  126. package/dist/modules/pivots/engine.d.ts +169 -0
  127. package/dist/modules/pivots/engine.d.ts.map +1 -0
  128. package/dist/modules/pivots/engine.js +778 -0
  129. package/dist/modules/pivots/engine.js.map +1 -0
  130. package/dist/modules/pivots/geometry.d.ts +84 -0
  131. package/dist/modules/pivots/geometry.d.ts.map +1 -0
  132. package/dist/modules/pivots/geometry.js +371 -0
  133. package/dist/modules/pivots/geometry.js.map +1 -0
  134. package/dist/modules/pivots/instructions.d.ts +139 -0
  135. package/dist/modules/pivots/instructions.d.ts.map +1 -0
  136. package/dist/modules/pivots/instructions.js +281 -0
  137. package/dist/modules/pivots/instructions.js.map +1 -0
  138. package/dist/modules/speaker.d.ts +175 -0
  139. package/dist/modules/speaker.d.ts.map +1 -0
  140. package/dist/modules/speaker.js +249 -0
  141. package/dist/modules/speaker.js.map +1 -0
  142. package/dist/modules/speakers.d.ts +29 -0
  143. package/dist/modules/speakers.d.ts.map +1 -0
  144. package/dist/modules/speakers.js +38 -0
  145. package/dist/modules/speakers.js.map +1 -0
  146. package/dist/modules/storage.d.ts +50 -0
  147. package/dist/modules/storage.d.ts.map +1 -0
  148. package/dist/modules/storage.js +99 -0
  149. package/dist/modules/storage.js.map +1 -0
  150. package/dist/modules/stream.d.ts +133 -0
  151. package/dist/modules/stream.d.ts.map +1 -0
  152. package/dist/modules/stream.js +53 -0
  153. package/dist/modules/stream.js.map +1 -0
  154. package/dist/modules/system.d.ts +71 -0
  155. package/dist/modules/system.d.ts.map +1 -0
  156. package/dist/modules/system.js +65 -0
  157. package/dist/modules/system.js.map +1 -0
  158. package/dist/modules/transcription.d.ts +99 -0
  159. package/dist/modules/transcription.d.ts.map +1 -0
  160. package/dist/modules/transcription.js +126 -0
  161. package/dist/modules/transcription.js.map +1 -0
  162. package/dist/modules/translation.d.ts +65 -0
  163. package/dist/modules/translation.d.ts.map +1 -0
  164. package/dist/modules/translation.js +121 -0
  165. package/dist/modules/translation.js.map +1 -0
  166. package/dist/modules/ui.d.ts +186 -0
  167. package/dist/modules/ui.d.ts.map +1 -0
  168. package/dist/modules/ui.js +289 -0
  169. package/dist/modules/ui.js.map +1 -0
  170. package/dist/protocol.d.ts +384 -0
  171. package/dist/protocol.d.ts.map +1 -0
  172. package/dist/protocol.js +413 -0
  173. package/dist/protocol.js.map +1 -0
  174. package/dist/react/MiniappHeader.d.ts +44 -0
  175. package/dist/react/MiniappHeader.d.ts.map +1 -0
  176. package/dist/react/MiniappHeader.js +32 -0
  177. package/dist/react/MiniappHeader.js.map +1 -0
  178. package/dist/react/MiniappProvider.d.ts +33 -0
  179. package/dist/react/MiniappProvider.d.ts.map +1 -0
  180. package/dist/react/MiniappProvider.js +15 -0
  181. package/dist/react/MiniappProvider.js.map +1 -0
  182. package/dist/react/capsuleHeaderLayout.d.ts +3 -0
  183. package/dist/react/capsuleHeaderLayout.d.ts.map +1 -0
  184. package/dist/react/capsuleHeaderLayout.js +5 -0
  185. package/dist/react/capsuleHeaderLayout.js.map +1 -0
  186. package/dist/react/index.d.ts +13 -0
  187. package/dist/react/index.d.ts.map +1 -0
  188. package/dist/react/index.js +9 -0
  189. package/dist/react/index.js.map +1 -0
  190. package/dist/react/useCapabilities.d.ts +26 -0
  191. package/dist/react/useCapabilities.d.ts.map +1 -0
  192. package/dist/react/useCapabilities.js +27 -0
  193. package/dist/react/useCapabilities.js.map +1 -0
  194. package/dist/react/useCapsuleHeaderStyle.d.ts +27 -0
  195. package/dist/react/useCapsuleHeaderStyle.d.ts.map +1 -0
  196. package/dist/react/useCapsuleHeaderStyle.js +39 -0
  197. package/dist/react/useCapsuleHeaderStyle.js.map +1 -0
  198. package/dist/react/useColorScheme.d.ts +18 -0
  199. package/dist/react/useColorScheme.d.ts.map +1 -0
  200. package/dist/react/useColorScheme.js +24 -0
  201. package/dist/react/useColorScheme.js.map +1 -0
  202. package/dist/react/useConnected.d.ts +17 -0
  203. package/dist/react/useConnected.d.ts.map +1 -0
  204. package/dist/react/useConnected.js +39 -0
  205. package/dist/react/useConnected.js.map +1 -0
  206. package/dist/react/useRpc.d.ts +29 -0
  207. package/dist/react/useRpc.d.ts.map +1 -0
  208. package/dist/react/useRpc.js +82 -0
  209. package/dist/react/useRpc.js.map +1 -0
  210. package/dist/react/useSafeArea.d.ts +21 -0
  211. package/dist/react/useSafeArea.d.ts.map +1 -0
  212. package/dist/react/useSafeArea.js +22 -0
  213. package/dist/react/useSafeArea.js.map +1 -0
  214. package/dist/session.d.ts +355 -0
  215. package/dist/session.d.ts.map +1 -0
  216. package/dist/session.js +688 -0
  217. package/dist/session.js.map +1 -0
  218. package/dist/sub-path-types.test-d.d.ts +40 -0
  219. package/dist/sub-path-types.test-d.d.ts.map +1 -0
  220. package/dist/sub-path-types.test-d.js +37 -0
  221. package/dist/sub-path-types.test-d.js.map +1 -0
  222. package/dist/transport/auto.d.ts +35 -0
  223. package/dist/transport/auto.d.ts.map +1 -0
  224. package/dist/transport/auto.js +124 -0
  225. package/dist/transport/auto.js.map +1 -0
  226. package/dist/transport/dispatch.d.ts +43 -0
  227. package/dist/transport/dispatch.d.ts.map +1 -0
  228. package/dist/transport/dispatch.js +91 -0
  229. package/dist/transport/dispatch.js.map +1 -0
  230. package/dist/transport/local-socket.d.ts +28 -0
  231. package/dist/transport/local-socket.d.ts.map +1 -0
  232. package/dist/transport/local-socket.js +80 -0
  233. package/dist/transport/local-socket.js.map +1 -0
  234. package/dist/transport/mock.d.ts +54 -0
  235. package/dist/transport/mock.d.ts.map +1 -0
  236. package/dist/transport/mock.js +210 -0
  237. package/dist/transport/mock.js.map +1 -0
  238. package/dist/transport/postmessage.d.ts +36 -0
  239. package/dist/transport/postmessage.d.ts.map +1 -0
  240. package/dist/transport/postmessage.js +78 -0
  241. package/dist/transport/postmessage.js.map +1 -0
  242. package/dist/transport/types.d.ts +25 -0
  243. package/dist/transport/types.d.ts.map +1 -0
  244. package/dist/transport/types.js +11 -0
  245. package/dist/transport/types.js.map +1 -0
  246. package/dist/ui/index.d.ts +107 -0
  247. package/dist/ui/index.d.ts.map +1 -0
  248. package/dist/ui/index.js +32 -0
  249. package/dist/ui/index.js.map +1 -0
  250. package/package.json +84 -0
  251. package/src/background/index.ts +177 -0
  252. package/src/background/register.ts +89 -0
  253. package/src/dev-reload.ts +59 -0
  254. package/src/envelope.ts +54 -0
  255. package/src/globals.ts +62 -0
  256. package/src/hardware.ts +40 -0
  257. package/src/index.ts +216 -0
  258. package/src/modules/actions.ts +189 -0
  259. package/src/modules/ai.ts +281 -0
  260. package/src/modules/auth.ts +68 -0
  261. package/src/modules/base64.ts +87 -0
  262. package/src/modules/blob.ts +341 -0
  263. package/src/modules/camera.ts +258 -0
  264. package/src/modules/cloud.ts +94 -0
  265. package/src/modules/dashboard.ts +51 -0
  266. package/src/modules/display.ts +207 -0
  267. package/src/modules/events.ts +318 -0
  268. package/src/modules/glasses.ts +58 -0
  269. package/src/modules/heading.ts +23 -0
  270. package/src/modules/imu.ts +44 -0
  271. package/src/modules/input.ts +66 -0
  272. package/src/modules/keys.ts +46 -0
  273. package/src/modules/languages.ts +72 -0
  274. package/src/modules/led.ts +61 -0
  275. package/src/modules/location.ts +39 -0
  276. package/src/modules/memory.ts +224 -0
  277. package/src/modules/mic.ts +103 -0
  278. package/src/modules/miniapps.ts +103 -0
  279. package/src/modules/navigation.ts +674 -0
  280. package/src/modules/permissions.ts +83 -0
  281. package/src/modules/phone.ts +155 -0
  282. package/src/modules/pivots/engine.ts +863 -0
  283. package/src/modules/pivots/geometry.ts +409 -0
  284. package/src/modules/pivots/instructions.ts +341 -0
  285. package/src/modules/speaker.ts +347 -0
  286. package/src/modules/speakers.ts +40 -0
  287. package/src/modules/storage.ts +109 -0
  288. package/src/modules/stream.ts +168 -0
  289. package/src/modules/system.ts +113 -0
  290. package/src/modules/transcription.ts +180 -0
  291. package/src/modules/translation.ts +156 -0
  292. package/src/modules/ui.ts +481 -0
  293. package/src/protocol.ts +475 -0
  294. package/src/react/MiniappHeader.tsx +114 -0
  295. package/src/react/MiniappProvider.tsx +50 -0
  296. package/src/react/capsuleHeaderLayout.ts +11 -0
  297. package/src/react/index.ts +12 -0
  298. package/src/react/useCapabilities.ts +29 -0
  299. package/src/react/useCapsuleHeaderStyle.ts +55 -0
  300. package/src/react/useColorScheme.ts +26 -0
  301. package/src/react/useConnected.ts +47 -0
  302. package/src/react/useRpc.ts +103 -0
  303. package/src/react/useSafeArea.ts +36 -0
  304. package/src/session.ts +969 -0
  305. package/src/sub-path-types.test-d.ts +60 -0
  306. package/src/transport/auto.ts +143 -0
  307. package/src/transport/dispatch.ts +106 -0
  308. package/src/transport/local-socket.ts +91 -0
  309. package/src/transport/mock.ts +255 -0
  310. package/src/transport/postmessage.ts +95 -0
  311. package/src/transport/types.ts +26 -0
  312. package/src/ui/index.ts +129 -0
@@ -0,0 +1,355 @@
1
+ /**
2
+ * @fileoverview MiniappSession — central session object for a local miniapp.
3
+ *
4
+ * Owns the transport, the request/response correlation map, the readiness queue,
5
+ * the PONG auto-reply, the visibility state, and all per-module instances.
6
+ *
7
+ * Lifecycle:
8
+ * const session = new MiniappSession()
9
+ * await session.connect() // sends CONNECT, resolves on CONNECT_ACK
10
+ * session.display.render([...])
11
+ * ...
12
+ * session.disconnect()
13
+ */
14
+ import { MiniappColorScheme } from "./globals";
15
+ import { MiniappErrorCode, MiniappResponseType } from "./protocol";
16
+ import { CreateTransportOptions } from "./transport/auto";
17
+ import { CameraModule } from "./modules/camera";
18
+ import { AuthModule } from "./modules/auth";
19
+ import { CloudModule } from "./modules/cloud";
20
+ import { DashboardAPI } from "./modules/dashboard";
21
+ import { DisplayManager } from "./modules/display";
22
+ import { EventManager, type UnsubscribeFn } from "./modules/events";
23
+ import { GlassesModule } from "./modules/glasses";
24
+ import { HeadingModule } from "./modules/heading";
25
+ import { AiModule } from "./modules/ai";
26
+ import { ImuModule } from "./modules/imu";
27
+ import { InputModule } from "./modules/input";
28
+ import { KeysModule } from "./modules/keys";
29
+ import { LedModule } from "./modules/led";
30
+ import { LocationModule } from "./modules/location";
31
+ import { MemoryModule } from "./modules/memory";
32
+ import { SpeakersModule } from "./modules/speakers";
33
+ import { MicModule } from "./modules/mic";
34
+ import { NavigationModule } from "./modules/navigation";
35
+ import { PermissionsModule } from "./modules/permissions";
36
+ import { PhoneModule } from "./modules/phone";
37
+ import { TranscriptionModule } from "./modules/transcription";
38
+ import { TranslationModule } from "./modules/translation";
39
+ import { type UIModule } from "./modules/ui";
40
+ import { SimpleStorage } from "./modules/storage";
41
+ import { SpeakerModule } from "./modules/speaker";
42
+ import { StreamModule } from "./modules/stream";
43
+ import { SystemModule } from "./modules/system";
44
+ import { MiniappsModule } from "./modules/miniapps";
45
+ import { ActionsModule } from "./modules/actions";
46
+ import { BlobModule } from "./modules/blob";
47
+ /**
48
+ * Typed display capabilities for the scene API. All limit fields are optional
49
+ * in the type because older hosts don't send them — treat absence as "unknown",
50
+ * not zero. Populated on the "ready" event (null in `start()`).
51
+ */
52
+ export interface DisplayCapabilities {
53
+ /** Public drawable canvas in px — raw coordinate space for `display.render()` boxes. */
54
+ width?: number;
55
+ height?: number;
56
+ /** False ⇒ the device can't position elements; scenes degrade to text walls host-side. */
57
+ canPosition?: boolean;
58
+ /** Element budgets. Rects share the text pool on container-based devices. */
59
+ maxTextElements?: number;
60
+ maxImageElements?: number;
61
+ /** Per-image dimension cap (box-level), when the device has one. */
62
+ maxImagePx?: {
63
+ width: number;
64
+ height: number;
65
+ };
66
+ shapes?: string[];
67
+ intensityLevels?: number;
68
+ partialUpdate?: boolean;
69
+ /** Legacy capability fields (resolution, isColor, maxTextLines, …) ride along. */
70
+ [key: string]: unknown;
71
+ }
72
+ /** Minimal snapshot of the currently-connected glasses. Phone-provided. */
73
+ export interface GlassesCapabilities {
74
+ /** Display block — null/absent on displayless devices (e.g. Mentra Live). */
75
+ display?: DisplayCapabilities | null;
76
+ /** Device renders its own turn-by-turn nav UI in firmware (see display.sendNativeNav*). */
77
+ hasNativeNavigation?: boolean;
78
+ [key: string]: unknown;
79
+ }
80
+ export type MiniappVisibility = "foreground" | "background";
81
+ export interface MiniappSessionOptions extends CreateTransportOptions {
82
+ /** Override auto-detected packageName. Normally provided via window.Glassly. */
83
+ packageName?: string;
84
+ /** Override the ready timeout. Default 10s. */
85
+ connectTimeoutMs?: number;
86
+ }
87
+ export interface ConnectAckPayload {
88
+ type: MiniappResponseType.CONNECT_ACK;
89
+ userId: string;
90
+ packageName: string;
91
+ capabilities: GlassesCapabilities | null;
92
+ visibility?: MiniappVisibility;
93
+ colorScheme?: MiniappColorScheme;
94
+ /**
95
+ * Manifest-declared permission record. Mirrors cloud SDK v3's PermissionRecord:
96
+ * `{location, microphone, camera, notifications, calendar, apiKeys}` —
97
+ * booleans indicating whether the miniapp's manifest declared each. This is
98
+ * declaration-only; OS-grant state is not modeled.
99
+ */
100
+ permissions?: PermissionRecord;
101
+ /** Miniapp-scoped backend auth. Never a Core or runtime token. */
102
+ auth?: MiniappAuthState;
103
+ }
104
+ export interface MiniappAuthState {
105
+ glasslyUserId: string;
106
+ oemId?: string;
107
+ token: string;
108
+ expiresAt: number;
109
+ }
110
+ export interface AuthUpdatePayload {
111
+ type: MiniappResponseType.AUTH_UPDATE;
112
+ auth?: MiniappAuthState;
113
+ }
114
+ /**
115
+ * Manifest-declared permission record. v3-aligned: lowercase canonical keys.
116
+ * Booleans indicate whether the miniapp declared each in its manifest.json.
117
+ */
118
+ export type PermissionType = "location" | "microphone" | "camera" | "notifications" | "calendar" | "apiKeys" | "memory" | "ai" | "speakers";
119
+ export type PermissionRecord = Record<PermissionType, boolean>;
120
+ export declare class NotConnectedError extends Error {
121
+ readonly code = MiniappErrorCode.NOT_CONNECTED;
122
+ constructor(message?: string);
123
+ }
124
+ export interface MiniappRequestError {
125
+ code: string;
126
+ message: string;
127
+ }
128
+ /**
129
+ * What a request promise actually rejects with: a real Error (so `${err}`,
130
+ * `err.message`, and stack traces behave) that still carries the host's
131
+ * `code` for callers matching on MiniappRequestError's shape. Before this
132
+ * class, requests rejected with the bare `{code, message}` wire object and
133
+ * miniapp logs printed "[object Object]".
134
+ */
135
+ export declare class MiniappRequestFailure extends Error implements MiniappRequestError {
136
+ readonly code: string;
137
+ constructor(code: string, message: string);
138
+ }
139
+ type SessionEmitterEvents = {
140
+ ready: () => void;
141
+ error: (error: Error) => void;
142
+ /**
143
+ * Last-chance hook before the transport closes. Fires when the phone
144
+ * sends WILL_DISCONNECT, or when this session calls `disconnect()`
145
+ * locally. Handlers run synchronously and may issue one final
146
+ * `sendOneShot`/`sendRequest` (e.g. `display.render([])`); async work won't complete
147
+ * before the socket closes.
148
+ */
149
+ beforeDisconnect: (reason: string) => void;
150
+ disconnect: (reason: string) => void;
151
+ visibility: (v: MiniappVisibility) => void;
152
+ capabilities: (cap: GlassesCapabilities | null) => void;
153
+ colorScheme: (scheme: MiniappColorScheme) => void;
154
+ permissions: (perms: PermissionRecord) => void;
155
+ speakerState: (event: import("./modules/speaker").SpeakerStateEvent) => void;
156
+ auth: (auth: MiniappAuthState) => void;
157
+ };
158
+ export declare class MiniappSession<TChannels extends object = any> {
159
+ readonly auth: AuthModule;
160
+ readonly display: DisplayManager;
161
+ /**
162
+ * Internal subscription registry + escape hatch.
163
+ *
164
+ * Domain modules (`session.mic`, `session.input`, etc.) are the canonical
165
+ * surface for typed event subscriptions. `events.subscribe(...)` remains as
166
+ * a forward-compat escape hatch for new event types not yet wrapped on a
167
+ * domain module.
168
+ */
169
+ readonly events: EventManager;
170
+ readonly speaker: SpeakerModule;
171
+ readonly camera: CameraModule;
172
+ readonly cloud: CloudModule;
173
+ readonly dashboard: DashboardAPI;
174
+ readonly glasses: GlassesModule;
175
+ readonly heading: HeadingModule;
176
+ readonly imu: ImuModule;
177
+ readonly input: InputModule;
178
+ /**
179
+ * User-supplied provider API keys (Settings > API Keys). Requires the
180
+ * API_KEYS manifest permission; only an allowlisted provider set is
181
+ * readable (anthropic / gemini / elevenlabs / mapbox — never soniox).
182
+ */
183
+ /**
184
+ * Platform LLM completions. Requires the AI manifest permission. The
185
+ * platform picks and pays for the provider, or uses the user's own key when
186
+ * they've saved one.
187
+ */
188
+ readonly ai: AiModule;
189
+ readonly keys: KeysModule;
190
+ readonly led: LedModule;
191
+ readonly location: LocationModule;
192
+ /**
193
+ * The user's shared, phone-local memory timeline (transcript lines + notes +
194
+ * hourly summaries). Host-level and user-scoped — every miniapp declaring
195
+ * the MEMORY manifest permission shares the same store, and the user
196
+ * manages it in Settings > Memory. Requires the MEMORY permission.
197
+ */
198
+ readonly memory: MemoryModule;
199
+ /**
200
+ * Resolve enrolled-speaker ids (`spk_…` from TranscriptionData.speakerId)
201
+ * to the user's display names for them. Requires the SPEAKERS manifest
202
+ * permission — names are on-device PII behind an explicit gate. (Not to be
203
+ * confused with `session.speaker`, the audio-output module.)
204
+ */
205
+ readonly speakers: SpeakersModule;
206
+ readonly mic: MicModule;
207
+ readonly navigation: NavigationModule;
208
+ readonly permissions: PermissionsModule;
209
+ readonly phone: PhoneModule;
210
+ readonly storage: SimpleStorage;
211
+ /**
212
+ * Phone-local persistent BINARY storage (`session.blob`) — the binary
213
+ * counterpart to `session.storage`. Files on disk, scoped to this miniapp.
214
+ * Writes/reads are chunked so large payloads (e.g. captured audio fed in via
215
+ * `session.mic.onAudioChunk`) never cross the bridge in one message.
216
+ */
217
+ readonly blob: BlobModule;
218
+ readonly stream: StreamModule;
219
+ readonly system: SystemModule;
220
+ readonly transcription: TranscriptionModule;
221
+ readonly translation: TranslationModule;
222
+ /**
223
+ * UI message bus to the bound WebView (when one is open).
224
+ * Background-only API surface; mirrors the WebView's `glassly` global
225
+ * with inverted buffering policy (background drops when no WebView is
226
+ * bound; the WebView buffers until ready).
227
+ */
228
+ readonly ui: UIModule<TChannels>;
229
+ /**
230
+ * Inter-miniapp lifecycle + discovery (list / start / stop). SYSTEM-only —
231
+ * calls reject with NOT_PERMITTED unless this miniapp is a system app.
232
+ */
233
+ readonly miniapps: MiniappsModule;
234
+ /**
235
+ * Inter-miniapp action layer. `invoke` (SYSTEM-only) calls another miniapp's
236
+ * declared action; `handle` (open to all) exposes one of your own.
237
+ */
238
+ readonly actions: ActionsModule;
239
+ /** Phone-declared glasses capabilities. Null until CONNECT_ACK arrives. */
240
+ capabilities: GlassesCapabilities | null;
241
+ userId: string;
242
+ packageName: string;
243
+ visibility: MiniappVisibility;
244
+ /** Host color scheme. Seeded from window.Glassly, updated via session events. */
245
+ colorScheme: MiniappColorScheme;
246
+ /** True after CONNECT_ACK. Observe with waitForReady() or the "ready" event. */
247
+ ready: boolean;
248
+ private readonly transport;
249
+ private readonly connectTimeoutMs;
250
+ private readonly emitter;
251
+ private authState;
252
+ private readonly authWaiters;
253
+ private authRefreshPromise;
254
+ /**
255
+ * Outbound queue for anything sent before CONNECT_ACK. Flushed in FIFO order
256
+ * once the phone responds with CONNECT_ACK.
257
+ */
258
+ private readonly outboundQueue;
259
+ private readonly pendingRequests;
260
+ private connectPromise;
261
+ private disposed;
262
+ /** Manifest-declared permission cache. Updated on CONNECT_ACK / PERMISSIONS_UPDATE. */
263
+ private _permissions;
264
+ constructor(options?: MiniappSessionOptions);
265
+ /**
266
+ * @internal — synchronous lookup against the cached manifest-declared
267
+ * permission record from CONNECT_ACK / PERMISSIONS_UPDATE. Domain modules
268
+ * use this to expose their `hasPermission` getters without going to the
269
+ * wire. Returns false until CONNECT_ACK arrives.
270
+ *
271
+ * `manifestKey` is the manifest's UPPER_CASE permission name
272
+ * (MICROPHONE, CAMERA, LOCATION, READ_NOTIFICATIONS, etc.). Maps to v3's
273
+ * lowercase canonical keys internally.
274
+ */
275
+ _hasManifestPermission(manifestKey: string): boolean;
276
+ /**
277
+ * @internal — read the current manifest-declared permission record.
278
+ * Powers session.permissions.getAll(). Returns a fresh shallow copy so
279
+ * callers can't mutate internal state.
280
+ */
281
+ _getPermissions(): PermissionRecord;
282
+ /** @internal — current miniapp-scoped backend auth, if the host provided one. */
283
+ _getAuth(): MiniappAuthState | null;
284
+ /**
285
+ * @internal — wait for a scoped miniapp token. Used by session.auth; not part
286
+ * of the public SDK surface because authors should never manage wire events.
287
+ */
288
+ _waitForAuth(minTtlMs: number, timeoutMs?: number): Promise<MiniappAuthState>;
289
+ /**
290
+ * @internal — subscribe to a raw stream type. Domain modules call this; it
291
+ * delegates to the EventManager registry. Underscore prefix signals "not
292
+ * part of the public SDK surface — use session.mic.onAudioChunk /
293
+ * session.transcription.on(...)
294
+ * etc. instead."
295
+ */
296
+ _subscribe(streamType: string, handler: (data: unknown) => void, options?: {
297
+ forceLocal?: boolean;
298
+ }): UnsubscribeFn;
299
+ /**
300
+ * Connect to LocalMiniappRuntime. Idempotent — calling multiple times
301
+ * returns the same Promise.
302
+ */
303
+ connect(): Promise<void>;
304
+ /** Resolves when `ready` becomes true, or rejects if connect failed. */
305
+ waitForReady(): Promise<void>;
306
+ isConnected(): boolean;
307
+ disconnect(): void;
308
+ /** Send a fire-and-forget request that does not need a response. */
309
+ sendOneShot(payload: object): void;
310
+ /**
311
+ * Send a request and get a Promise that resolves with the REQUEST_RESULT payload.
312
+ * Rejects with a MiniappRequestError if the phone returns an error result.
313
+ *
314
+ * `opts.timeoutMs` overrides the default request timeout. Pass `0` to disable
315
+ * it entirely for inherently long-running requests whose duration is unbounded
316
+ * (e.g. audio playback that resolves only when the clip finishes) — those still
317
+ * settle via REQUEST_RESULT or `failAllPending` on disconnect, so they can't
318
+ * leak. Most requests should keep the default ceiling.
319
+ */
320
+ sendRequest<TResult = unknown>(payload: object, opts?: {
321
+ timeoutMs?: number;
322
+ }): Promise<TResult>;
323
+ on<K extends keyof SessionEmitterEvents>(event: K, handler: SessionEmitterEvents[K]): () => void;
324
+ off<K extends keyof SessionEmitterEvents>(event: K, handler: SessionEmitterEvents[K]): void;
325
+ /**
326
+ * Last-chance hook before the transport closes. Fires either when the
327
+ * phone notifies the session of an imminent disconnect (~50ms grace
328
+ * window before the socket is torn down) or when this session's
329
+ * `disconnect()` is called locally. Use it to flush final cleanup
330
+ * messages — e.g. `display.render([])` — synchronously. Async work
331
+ * started here will not complete before the socket closes.
332
+ */
333
+ onBeforeDisconnect(handler: (reason: string) => void): () => void;
334
+ onVisibilityChange(handler: (v: MiniappVisibility) => void): () => void;
335
+ onCapabilitiesChange(handler: (cap: GlassesCapabilities | null) => void): () => void;
336
+ onColorSchemeChange(handler: (scheme: MiniappColorScheme) => void): () => void;
337
+ private enqueueOrSend;
338
+ private flushQueue;
339
+ private handleIncoming;
340
+ private handleTransportDisconnect;
341
+ private failAllPending;
342
+ private authHasTtl;
343
+ private requestAuthRefresh;
344
+ private applyAuth;
345
+ /**
346
+ * Update the cached permission record. Idempotent: emits "permissions"
347
+ * only when the record actually changed. Sanitizes incoming objects to
348
+ * the v3 PermissionType union.
349
+ */
350
+ private applyPermissions;
351
+ }
352
+ /** @internal — for the permissions module's onUpdate plumbing. */
353
+ export declare function _allPermissionTypes(): readonly PermissionType[];
354
+ export {};
355
+ //# sourceMappingURL=session.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"session.d.ts","sourceRoot":"","sources":["../src/session.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAKH,OAAO,EAAoB,kBAAkB,EAAC,MAAM,WAAW,CAAA;AAC/D,OAAO,EAAC,gBAAgB,EAAsB,mBAAmB,EAAC,MAAM,YAAY,CAAA;AACpF,OAAO,EAAkB,sBAAsB,EAAC,MAAM,kBAAkB,CAAA;AAExE,OAAO,EAAC,YAAY,EAAC,MAAM,kBAAkB,CAAA;AAC7C,OAAO,EAAC,UAAU,EAAC,MAAM,gBAAgB,CAAA;AACzC,OAAO,EAAC,WAAW,EAAC,MAAM,iBAAiB,CAAA;AAC3C,OAAO,EAAC,YAAY,EAAC,MAAM,qBAAqB,CAAA;AAChD,OAAO,EAAC,cAAc,EAAC,MAAM,mBAAmB,CAAA;AAChD,OAAO,EAAC,YAAY,EAAgC,KAAK,aAAa,EAAC,MAAM,kBAAkB,CAAA;AAC/F,OAAO,EAAC,aAAa,EAAC,MAAM,mBAAmB,CAAA;AAC/C,OAAO,EAAC,aAAa,EAAC,MAAM,mBAAmB,CAAA;AAC/C,OAAO,EAAC,QAAQ,EAAC,MAAM,cAAc,CAAA;AACrC,OAAO,EAAC,SAA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