@open-orpheus/plugin-api 0.0.0-stage → 0.21.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 (269) hide show
  1. package/LICENSE +7 -0
  2. package/README.md +191 -2
  3. package/dist/client/index.d.ts +37 -0
  4. package/dist/client/index.js +53 -0
  5. package/dist/client/index.js.map +1 -0
  6. package/dist/configuration/host/src/shared/plugin/configuration/index.d.ts +21 -0
  7. package/dist/configuration/index.d.ts +5 -0
  8. package/dist/host/_native/open-orpheus__database.d.ts +50 -0
  9. package/dist/host/_native/open-orpheus__window.d.ts +284 -0
  10. package/dist/host/src/constants.d.ts +6 -0
  11. package/dist/host/src/main/afp.d.ts +1 -0
  12. package/dist/host/src/main/arguments.d.ts +4 -0
  13. package/dist/host/src/main/assets.d.ts +2 -0
  14. package/dist/host/src/main/audio/ChunkTracker.d.ts +23 -0
  15. package/dist/host/src/main/audio/DownloadScheduler.d.ts +53 -0
  16. package/dist/host/src/main/audio/MediaEngine.d.ts +47 -0
  17. package/dist/host/src/main/audio/OnlineStreamer.d.ts +66 -0
  18. package/dist/host/src/main/audio/StorageManager.d.ts +18 -0
  19. package/dist/host/src/main/audio.d.ts +6 -0
  20. package/dist/host/src/main/av3a/Av3aEngine.d.ts +24 -0
  21. package/dist/host/src/main/av3a/Av3aM4aSession.d.ts +101 -0
  22. package/dist/host/src/main/av3a/Av3aPlaybackProcess.d.ts +52 -0
  23. package/dist/host/src/main/av3a/detect.d.ts +6 -0
  24. package/dist/host/src/main/av3a/sources.d.ts +13 -0
  25. package/dist/host/src/main/av3a/types.d.ts +54 -0
  26. package/dist/host/src/main/bridge/ipc-main-bridge.d.ts +24 -0
  27. package/dist/host/src/main/bridge/modules/inputRegion.d.ts +1 -0
  28. package/dist/host/src/main/bridge/modules/lyrics.d.ts +1 -0
  29. package/dist/host/src/main/bridge/modules/settings.d.ts +1 -0
  30. package/dist/host/src/main/bridge/register.d.ts +9 -0
  31. package/dist/host/src/main/bridge/window.d.ts +7 -0
  32. package/dist/host/src/main/cache/HttpCacheStorage.d.ts +10 -0
  33. package/dist/host/src/main/cache/LyricCahceManager.d.ts +21 -0
  34. package/dist/host/src/main/cache/PlayCacheManager.d.ts +72 -0
  35. package/dist/host/src/main/cache.d.ts +7 -0
  36. package/dist/host/src/main/calls/app.d.ts +1 -0
  37. package/dist/host/src/main/calls/audioeffect.d.ts +1 -0
  38. package/dist/host/src/main/calls/browser.d.ts +1 -0
  39. package/dist/host/src/main/calls/desktop.d.ts +2 -0
  40. package/dist/host/src/main/calls/desktoppet.d.ts +1 -0
  41. package/dist/host/src/main/calls/download.d.ts +1 -0
  42. package/dist/host/src/main/calls/index.d.ts +16 -0
  43. package/dist/host/src/main/calls/musiclibrary.d.ts +1 -0
  44. package/dist/host/src/main/calls/network.d.ts +1 -0
  45. package/dist/host/src/main/calls/os.d.ts +1 -0
  46. package/dist/host/src/main/calls/player.d.ts +22 -0
  47. package/dist/host/src/main/calls/process.d.ts +1 -0
  48. package/dist/host/src/main/calls/rtc.d.ts +1 -0
  49. package/dist/host/src/main/calls/storage.d.ts +1 -0
  50. package/dist/host/src/main/calls/trayicon.d.ts +1 -0
  51. package/dist/host/src/main/calls/update.d.ts +1 -0
  52. package/dist/host/src/main/calls/winhelper.d.ts +1 -0
  53. package/dist/host/src/main/calls.d.ts +5 -0
  54. package/dist/host/src/main/channel.d.ts +1 -0
  55. package/dist/host/src/main/cookie.d.ts +13 -0
  56. package/dist/host/src/main/crypto.d.ts +46 -0
  57. package/dist/host/src/main/database/KeyvSqliteDriver.d.ts +6 -0
  58. package/dist/host/src/main/database.d.ts +5 -0
  59. package/dist/host/src/main/dawn.d.ts +31 -0
  60. package/dist/host/src/main/device.d.ts +3 -0
  61. package/dist/host/src/main/download.d.ts +40 -0
  62. package/dist/host/src/main/error.d.ts +1 -0
  63. package/dist/host/src/main/folders.d.ts +18 -0
  64. package/dist/host/src/main/fonts.d.ts +1 -0
  65. package/dist/host/src/main/gui.d.ts +4 -0
  66. package/dist/host/src/main/id3.d.ts +42 -0
  67. package/dist/host/src/main/lifecycle.d.ts +127 -0
  68. package/dist/host/src/main/logger.d.ts +12 -0
  69. package/dist/host/src/main/lyrics/DbusLyricsService.d.ts +115 -0
  70. package/dist/host/src/main/lyrics/LyricsDispatcher.d.ts +26 -0
  71. package/dist/host/src/main/lyrics/dbus.d.ts +16 -0
  72. package/dist/host/src/main/lyrics/parse.d.ts +21 -0
  73. package/dist/host/src/main/lyrics.d.ts +2 -0
  74. package/dist/host/src/main/mediaSession.d.ts +42 -0
  75. package/dist/host/src/main/menu/AppMenu.d.ts +35 -0
  76. package/dist/host/src/main/menu/anchor.d.ts +13 -0
  77. package/dist/host/src/main/menu/backend/DesktopWindowBackend.d.ts +30 -0
  78. package/dist/host/src/main/menu/backend/MenuBackend.d.ts +28 -0
  79. package/dist/host/src/main/menu/backend/WaylandLayerShellBackend.d.ts +35 -0
  80. package/dist/host/src/main/menu/backend/WaylandOverlayBackend.d.ts +15 -0
  81. package/dist/host/src/main/menu/backend/WaylandPopupBackend.d.ts +31 -0
  82. package/dist/host/src/main/menu/constants.d.ts +14 -0
  83. package/dist/host/src/main/menu/index.d.ts +2 -0
  84. package/dist/host/src/main/menu/native-popup.d.ts +16 -0
  85. package/dist/host/src/main/menu/patch.d.ts +3 -0
  86. package/dist/host/src/main/menu/skin.d.ts +3 -0
  87. package/dist/host/src/main/menu/surface/BaseWindowMenuSurface.d.ts +81 -0
  88. package/dist/host/src/main/menu/surface/CaptureLayerSurface.d.ts +22 -0
  89. package/dist/host/src/main/menu/surface/MenuSurface.d.ts +29 -0
  90. package/dist/host/src/main/menu/surface/MenuSurfacePath.d.ts +29 -0
  91. package/dist/host/src/main/menu/surface/SurfacePool.d.ts +15 -0
  92. package/dist/host/src/main/menu/workaround.d.ts +12 -0
  93. package/dist/host/src/main/ncae.d.ts +8 -0
  94. package/dist/host/src/main/network/handler.d.ts +3 -0
  95. package/dist/host/src/main/network/interceptor.d.ts +2 -0
  96. package/dist/host/src/main/network/interceptors/anonymous.d.ts +2 -0
  97. package/dist/host/src/main/network/pipeline.d.ts +8 -0
  98. package/dist/host/src/main/network/types.d.ts +70 -0
  99. package/dist/host/src/main/orpheus.d.ts +10 -0
  100. package/dist/host/src/main/pack.d.ts +27 -0
  101. package/dist/host/src/main/packs/Pack.d.ts +12 -0
  102. package/dist/host/src/main/packs/SkinPack.d.ts +6 -0
  103. package/dist/host/src/main/packs/WebPack.d.ts +6 -0
  104. package/dist/host/src/main/playback/PlaybackController.d.ts +57 -0
  105. package/dist/host/src/main/playback/PlayerCommandRouter.d.ts +85 -0
  106. package/dist/host/src/main/playback/adapters/MediaSessionAdapter.d.ts +61 -0
  107. package/dist/host/src/main/playback/adapters/MprisAdapter.d.ts +48 -0
  108. package/dist/host/src/main/playback/adapters/NowPlayingAdapter.d.ts +23 -0
  109. package/dist/host/src/main/playback/adapters/SmtcAdapter.d.ts +23 -0
  110. package/dist/host/src/main/playback/artwork.d.ts +47 -0
  111. package/dist/host/src/main/playback/modes.d.ts +8 -0
  112. package/dist/host/src/main/playback/types.d.ts +59 -0
  113. package/dist/host/src/main/plugin/assets.d.ts +8 -0
  114. package/dist/host/src/main/plugin/catalog.d.ts +42 -0
  115. package/dist/host/src/main/plugin/discover.d.ts +33 -0
  116. package/dist/host/src/main/plugin/index.d.ts +15 -0
  117. package/dist/host/src/main/plugin/loader.d.ts +90 -0
  118. package/dist/host/src/main/plugin/manager.d.ts +61 -0
  119. package/dist/host/src/main/plugin/metadata.d.ts +34 -0
  120. package/dist/host/src/main/plugin/state.d.ts +27 -0
  121. package/dist/host/src/main/plugin/tree.d.ts +13 -0
  122. package/dist/host/src/main/protocol.d.ts +4 -0
  123. package/dist/host/src/main/request.d.ts +16 -0
  124. package/dist/host/src/main/settings.d.ts +21 -0
  125. package/dist/host/src/main/shortcuts.d.ts +10 -0
  126. package/dist/host/src/main/shutdown.d.ts +50 -0
  127. package/dist/host/src/main/skin/color.d.ts +2 -0
  128. package/dist/host/src/main/skin/dui.d.ts +15 -0
  129. package/dist/host/src/main/tray.d.ts +8 -0
  130. package/dist/host/src/main/update.d.ts +2 -0
  131. package/dist/host/src/main/util/color.d.ts +7 -0
  132. package/dist/host/src/main/util/display.d.ts +3 -0
  133. package/dist/host/src/main/util/env.d.ts +1 -0
  134. package/dist/host/src/main/util/fs.d.ts +21 -0
  135. package/dist/host/src/main/util/image.d.ts +1 -0
  136. package/dist/host/src/main/util/musicFile.d.ts +1 -0
  137. package/dist/host/src/main/util/musicPicture.d.ts +2 -0
  138. package/dist/host/src/main/util/path.d.ts +2 -0
  139. package/dist/host/src/main/util/send.d.ts +13 -0
  140. package/dist/host/src/main/util/url.d.ts +19 -0
  141. package/dist/host/src/main/util/window.d.ts +2 -0
  142. package/dist/host/src/main/window.d.ts +316 -0
  143. package/dist/host/src/main/windows/color-picker.d.ts +3 -0
  144. package/dist/host/src/main/windows/desktop-lyrics.d.ts +12 -0
  145. package/dist/host/src/main/windows/desktop-pet.d.ts +8 -0
  146. package/dist/host/src/main/windows/main.d.ts +6 -0
  147. package/dist/host/src/main/windows/manage.d.ts +2 -0
  148. package/dist/host/src/main/windows/mini-player.d.ts +16 -0
  149. package/dist/host/src/main/windows/music-desktop.d.ts +13 -0
  150. package/dist/host/src/main/windows/package-download.d.ts +2 -0
  151. package/dist/host/src/main/windows/plugin-manager-events.d.ts +7 -0
  152. package/dist/host/src/main/windows/plugin-manager.d.ts +5 -0
  153. package/dist/host/src/main/xeapi.d.ts +48 -0
  154. package/dist/host/src/preload/AudioEffectManager.d.ts +124 -0
  155. package/dist/host/src/preload/PlaybackBackend.d.ts +34 -0
  156. package/dist/host/src/preload/Player.d.ts +229 -0
  157. package/dist/host/src/preload/av3a/Av3aPcmPlayer.d.ts +84 -0
  158. package/dist/host/src/preload/av3a/bridge.d.ts +21 -0
  159. package/dist/host/src/preload/av3a/channel.d.ts +40 -0
  160. package/dist/host/src/preload/av3a/detect.d.ts +6 -0
  161. package/dist/host/src/preload/backends/Av3aPlaybackBackend.d.ts +32 -0
  162. package/dist/host/src/preload/backends/MediaPlaybackBackend.d.ts +25 -0
  163. package/dist/host/src/shared/CallDispatcher.d.ts +12 -0
  164. package/dist/host/src/shared/bridge/constants.d.ts +2 -0
  165. package/dist/host/src/shared/bridge/endpoint.d.ts +29 -0
  166. package/dist/host/src/shared/bridge/hub.d.ts +136 -0
  167. package/dist/host/src/shared/bridge/protocol.d.ts +91 -0
  168. package/dist/host/src/shared/bridge/realm.d.ts +14 -0
  169. package/dist/host/src/shared/bridge/routes.d.ts +37 -0
  170. package/dist/host/src/shared/contracts/av3a-api.d.ts +50 -0
  171. package/dist/host/src/shared/contracts/av3a-process.d.ts +56 -0
  172. package/dist/host/src/shared/contracts/color-picker-api.d.ts +17 -0
  173. package/dist/host/src/shared/contracts/desktop-lyrics-api.d.ts +22 -0
  174. package/dist/host/src/shared/contracts/input-region-api.d.ts +5 -0
  175. package/dist/host/src/shared/contracts/lyrics-api.d.ts +11 -0
  176. package/dist/host/src/shared/contracts/manage-api.d.ts +31 -0
  177. package/dist/host/src/shared/contracts/menu-surface-api.d.ts +35 -0
  178. package/dist/host/src/shared/contracts/mini-player-api.d.ts +19 -0
  179. package/dist/host/src/shared/contracts/plugin-manager-api.d.ts +223 -0
  180. package/dist/host/src/shared/contracts/settings-api.d.ts +15 -0
  181. package/dist/host/src/shared/playbackMode.d.ts +2 -0
  182. package/dist/host/src/shared/plugin/cache-bust.d.ts +8 -0
  183. package/dist/host/src/shared/plugin/lifecycle.d.ts +217 -0
  184. package/dist/host/src/shared/plugin/realms/main/index.d.ts +18 -0
  185. package/dist/host/src/shared/plugin/registry.d.ts +69 -0
  186. package/dist/host/src/shared/plugin/runtime-state.d.ts +4 -0
  187. package/dist/host/src/shared/settings/defaults.d.ts +35 -0
  188. package/dist/host/src/shared/settings/index.d.ts +3 -0
  189. package/dist/host/src/shared/settings/keys.d.ts +21 -0
  190. package/dist/host/src/shared/settings/values.d.ts +13 -0
  191. package/dist/host/src/shared/types/desktop-lyrics.d.ts +61 -0
  192. package/dist/host/src/shared/types/dui.d.ts +37 -0
  193. package/dist/host/src/shared/types/input-region.d.ts +6 -0
  194. package/dist/host/src/shared/types/lyrics.d.ts +15 -0
  195. package/dist/host/src/shared/types/manage.d.ts +14 -0
  196. package/dist/host/src/shared/types/menu-surface.d.ts +43 -0
  197. package/dist/host/src/shared/types/menu.d.ts +29 -0
  198. package/dist/host/src/shared/types/mini-player.d.ts +97 -0
  199. package/dist/host/src/shared/types/ncae.d.ts +29 -0
  200. package/dist/host/src/shared/types/package-download.d.ts +14 -0
  201. package/dist/host/src/shared/types/playback-mode.d.ts +3 -0
  202. package/dist/host/src/shared/types/settings.d.ts +9 -0
  203. package/dist/host/src/shared/types/update.d.ts +6 -0
  204. package/dist/host/src/shared/util.d.ts +22 -0
  205. package/dist/index.d.ts +7 -0
  206. package/dist/plugin-manager/host/src/preload/logger.d.ts +10 -0
  207. package/dist/plugin-manager/host/src/preload/util.d.ts +1 -0
  208. package/dist/plugin-manager/host/src/shared/bridge/constants.d.ts +2 -0
  209. package/dist/plugin-manager/host/src/shared/bridge/endpoint.d.ts +29 -0
  210. package/dist/plugin-manager/host/src/shared/bridge/hub.d.ts +136 -0
  211. package/dist/plugin-manager/host/src/shared/bridge/protocol.d.ts +91 -0
  212. package/dist/plugin-manager/host/src/shared/bridge/routes.d.ts +37 -0
  213. package/dist/plugin-manager/host/src/shared/contracts/plugin-manager-api.d.ts +223 -0
  214. package/dist/plugin-manager/host/src/shared/plugin/lifecycle.d.ts +217 -0
  215. package/dist/plugin-manager/host/src/shared/plugin/realms/common/index.d.ts +34 -0
  216. package/dist/plugin-manager/host/src/shared/plugin/realms/plugin-manager/index.d.ts +11 -0
  217. package/dist/plugin-manager/host/src/shared/plugin/registry.d.ts +69 -0
  218. package/dist/plugin-manager/host/src/shared/util.d.ts +22 -0
  219. package/dist/plugin-manager/index.d.ts +7 -0
  220. package/dist/plugin-manager/registry-map.d.ts +16 -0
  221. package/dist/preload/host/src/constants.d.ts +6 -0
  222. package/dist/preload/host/src/main/network/types.d.ts +70 -0
  223. package/dist/preload/host/src/preload/AudioEffectManager.d.ts +124 -0
  224. package/dist/preload/host/src/preload/MusicRecognizer.d.ts +25 -0
  225. package/dist/preload/host/src/preload/PlaybackBackend.d.ts +34 -0
  226. package/dist/preload/host/src/preload/Player.d.ts +229 -0
  227. package/dist/preload/host/src/preload/YunxinIM.d.ts +15 -0
  228. package/dist/preload/host/src/preload/audioplayer.d.ts +4 -0
  229. package/dist/preload/host/src/preload/av3a/Av3aPcmPlayer.d.ts +84 -0
  230. package/dist/preload/host/src/preload/av3a/bridge.d.ts +21 -0
  231. package/dist/preload/host/src/preload/av3a/channel.d.ts +40 -0
  232. package/dist/preload/host/src/preload/av3a/detect.d.ts +6 -0
  233. package/dist/preload/host/src/preload/backends/Av3aPlaybackBackend.d.ts +32 -0
  234. package/dist/preload/host/src/preload/backends/MediaPlaybackBackend.d.ts +25 -0
  235. package/dist/preload/host/src/preload/calls/app.d.ts +1 -0
  236. package/dist/preload/host/src/preload/calls/audioeffect.d.ts +1 -0
  237. package/dist/preload/host/src/preload/calls/audioplayer.d.ts +1 -0
  238. package/dist/preload/host/src/preload/calls/im.d.ts +1 -0
  239. package/dist/preload/host/src/preload/calls/index.d.ts +6 -0
  240. package/dist/preload/host/src/preload/calls/network.d.ts +1 -0
  241. package/dist/preload/host/src/preload/calls/nimsys.d.ts +1 -0
  242. package/dist/preload/host/src/preload/calls/os.d.ts +1 -0
  243. package/dist/preload/host/src/preload/calls/player.d.ts +1 -0
  244. package/dist/preload/host/src/preload/calls/update.d.ts +1 -0
  245. package/dist/preload/host/src/preload/calls.d.ts +4 -0
  246. package/dist/preload/host/src/preload/channel.d.ts +1 -0
  247. package/dist/preload/host/src/preload/logger.d.ts +10 -0
  248. package/dist/preload/host/src/preload/playbackMode.d.ts +13 -0
  249. package/dist/preload/host/src/preload/util.d.ts +1 -0
  250. package/dist/preload/host/src/shared/CallDispatcher.d.ts +12 -0
  251. package/dist/preload/host/src/shared/bridge/endpoint.d.ts +29 -0
  252. package/dist/preload/host/src/shared/bridge/hub.d.ts +136 -0
  253. package/dist/preload/host/src/shared/bridge/protocol.d.ts +91 -0
  254. package/dist/preload/host/src/shared/bridge/routes.d.ts +37 -0
  255. package/dist/preload/host/src/shared/contracts/av3a-api.d.ts +50 -0
  256. package/dist/preload/host/src/shared/contracts/av3a-process.d.ts +56 -0
  257. package/dist/preload/host/src/shared/contracts/plugin-manager-api.d.ts +223 -0
  258. package/dist/preload/host/src/shared/playbackMode.d.ts +2 -0
  259. package/dist/preload/host/src/shared/plugin/lifecycle.d.ts +217 -0
  260. package/dist/preload/host/src/shared/plugin/realms/common/index.d.ts +34 -0
  261. package/dist/preload/host/src/shared/plugin/realms/preload/index.d.ts +11 -0
  262. package/dist/preload/host/src/shared/plugin/registry.d.ts +69 -0
  263. package/dist/preload/host/src/shared/types/ncae.d.ts +29 -0
  264. package/dist/preload/host/src/shared/types/playback-mode.d.ts +3 -0
  265. package/dist/preload/host/src/shared/util.d.ts +22 -0
  266. package/dist/preload/index.d.ts +7 -0
  267. package/dist/preload/registry-map.d.ts +43 -0
  268. package/dist/registry-map.d.ts +164 -0
  269. package/package.json +73 -3
@@ -0,0 +1,57 @@
1
+ import Emittery from "emittery";
2
+ import type { PlaybackMode } from "../../shared/types/playback-mode.js";
3
+ import { PlaybackChange, PlaybackSnapshot, PlaybackStatus, TrackInfo } from "./types.js";
4
+ export type PlaybackControllerEvents = {
5
+ /** Raw, unthrottled position (seconds) — lyrics / progress telemetry. */
6
+ timeupdate: number;
7
+ /** Raw rate — lyrics / progress telemetry. */
8
+ playbackratechange: number;
9
+ /** Derived: is progress advancing smoothly? (true only while playing) — lyrics. */
10
+ advancingchange: boolean;
11
+ /** Derived, diffed: track metadata changed (one playId = one song). */
12
+ trackchanged: TrackInfo | null;
13
+ /** Album art for the current song (separate from `trackchanged`). */
14
+ coverchanged: string | null;
15
+ /** Derived, diffed: media-session status changed. */
16
+ statuschanged: PlaybackStatus;
17
+ /** Derived, throttled: position for OS media sessions. */
18
+ positionchanged: {
19
+ position: number;
20
+ seeked: boolean;
21
+ };
22
+ /** Derived, diffed: duration changed. */
23
+ durationchanged: number | null;
24
+ /** Derived, diffed: rate changed. */
25
+ ratechanged: number;
26
+ /** Derived, diffed: volume changed. */
27
+ volumechanged: number;
28
+ modechanged: PlaybackMode;
29
+ };
30
+ /**
31
+ * Single source of truth for playback state in the main process.
32
+ *
33
+ * Ingested from the frozen preload/renderer seams, normalized once, then fanned
34
+ * out as two streams: raw telemetry (lyrics / progress UI) and diffed,
35
+ * throttled derived state (OS media-session adapters).
36
+ */
37
+ export default class PlaybackController extends Emittery<PlaybackControllerEvents> {
38
+ private _snapshot;
39
+ private lastPositionEmitAt;
40
+ private pendingPosition;
41
+ private positionTimer;
42
+ private cover;
43
+ get snapshot(): Readonly<PlaybackSnapshot>;
44
+ /** Frozen seam: `player.setInfo` → `mediaSession.setMetadata`. */
45
+ setTrack(track: TrackInfo | null): void;
46
+ /** Frozen seam: `player.setCover` → `mediaSession.setCover`. */
47
+ applyCover(artUrl: string | null): void;
48
+ applyPosition(position: number | null, seeked?: boolean): void;
49
+ applyDuration(duration: number | null): void;
50
+ applyPlaybackChange(change: PlaybackChange): void;
51
+ applyRate(rate: number): void;
52
+ applyVolume(volume: number): void;
53
+ applyPlaybackMode(mode: PlaybackMode): void;
54
+ private schedulePositionEmit;
55
+ private flushPosition;
56
+ private cancelPositionThrottle;
57
+ }
@@ -0,0 +1,85 @@
1
+ import Emittery from "emittery";
2
+ import { PlayerCommandEvents } from "./adapters/MediaSessionAdapter.js";
3
+ import type PlaybackController from "./PlaybackController.js";
4
+ /**
5
+ * Translates media-session commands (MPRIS / SMTC / MPNowPlayingInfo adapters)
6
+ * into the renderer-facing IPC the preload already understands.
7
+ *
8
+ * This is the only place that maps abstract commands onto the two distinct
9
+ * seek semantics the preload exposes: `player.seek` (relative delta) vs
10
+ * `player.seekto` (absolute position).
11
+ *
12
+ * Playback is the exception: the OS sends absolute intents (`play` / `pause`)
13
+ * but the renderer only exposes a *toggle*, so this router decides whether a
14
+ * toggle is warranted and tracks the toggles still in flight.
15
+ *
16
+ * Volume is the other: it is idempotent, but the media session must not report
17
+ * the old value after an OS volume change, so the command waits for the
18
+ * renderer to report the volume back before it resolves.
19
+ */
20
+ export default class PlayerCommandRouter {
21
+ private readonly player;
22
+ /**
23
+ * Status expected after each in-flight toggle lands, oldest first.
24
+ *
25
+ * A toggle is only reported back *after* it lands, so without this every
26
+ * request issued in the meantime reads the same stale snapshot — and since a
27
+ * toggle is not idempotent, an even number of them lands back where it
28
+ * started. Tracking them in order also keeps an earlier confirmation from
29
+ * being mistaken for a later toggle having landed.
30
+ */
31
+ private readonly inflight;
32
+ private expiryTimer;
33
+ private modeQueue;
34
+ /**
35
+ * @param player Playback state source, read on demand.
36
+ */
37
+ constructor(commands: Emittery<PlayerCommandEvents>, player: PlaybackController);
38
+ /** Where playback is headed once every in-flight toggle has landed. */
39
+ private get intended();
40
+ /**
41
+ * Forward an absolute OS intent as the renderer's toggle, unless playback is
42
+ * already there or already on the way.
43
+ *
44
+ * `Stopped` is a valid *source* for play, unlike for pause: a finished or
45
+ * errored song keeps its track, so an explicit play must be able to revive
46
+ * it. Pausing from `Stopped` is meaningless and must not toggle.
47
+ */
48
+ private request;
49
+ /**
50
+ * An explicit toggle is always honoured; queueing where it lands keeps
51
+ * follow-up play/pause requests idempotent until it is confirmed.
52
+ */
53
+ private toggle;
54
+ private toggleTowards;
55
+ /**
56
+ * Retire the toggle a renderer transition accounts for — or, when it matches
57
+ * none, trust the report and drop the backlog (the transition was not ours to
58
+ * explain: an out-of-band change, or several toggles landing as one).
59
+ *
60
+ * Retiring only on a *matching* transition is what keeps a queued pause alive
61
+ * while the earlier play confirms. Clearing unconditionally would forget the
62
+ * pause, and the next `pause` would fire a third toggle that cancels it.
63
+ */
64
+ private confirm;
65
+ private armExpiry;
66
+ private clearExpiry;
67
+ /**
68
+ * Forward an absolute volume to the renderer and wait for it to report that
69
+ * value back, so a caller that awaits this command (MPRIS `Set`) only returns
70
+ * once the app actually has that volume.
71
+ *
72
+ * The wait is tied to `volume`, not merely to "the next change": overlapping
73
+ * requests must not satisfy each other's confirmation. It is also bounded, so
74
+ * a request the renderer never answers fails instead of hanging.
75
+ *
76
+ * The controller suppresses an unchanged volume, so a value the renderer
77
+ * already has would never report back; neither would a message with no window
78
+ * to deliver it to. Both cases complete immediately.
79
+ */
80
+ private setVolume;
81
+ private send;
82
+ /** Serialize mode writes so each request starts from confirmed renderer state. */
83
+ private setMode;
84
+ private sendHotkey;
85
+ }
@@ -0,0 +1,61 @@
1
+ import Emittery from "emittery";
2
+ import type { LoopStatus, PlaybackMode } from "../../../shared/types/playback-mode.js";
3
+ import { PlaybackStatus, TrackInfo } from "../types.js";
4
+ /** Commands from an OS media session, normalized before hitting the renderer. */
5
+ export type PlayerCommandEvents = {
6
+ play: undefined;
7
+ pause: undefined;
8
+ toggle: undefined;
9
+ next: undefined;
10
+ previous: undefined;
11
+ /** Relative seek, seconds (signed). */
12
+ seek: number;
13
+ /** Absolute seek, seconds. */
14
+ setPosition: number;
15
+ /** Volume, 0..1. */
16
+ volume: number;
17
+ shuffle: boolean;
18
+ loopStatus: LoopStatus;
19
+ raise: undefined;
20
+ quit: undefined;
21
+ };
22
+ /**
23
+ * Platform media-session integration (MPRIS / SMTC / MPNowPlayingInfo).
24
+ *
25
+ * The `PlaybackController` pushes derived state (in seconds / plain values); the
26
+ * adapter translates to its platform's native calls and owns all unit
27
+ * conversion. Commands coming *from* the OS are re-emitted here and forwarded
28
+ * to the renderer by the `PlayerCommandRouter`.
29
+ */
30
+ export interface MediaSessionAdapter extends Emittery<PlayerCommandEvents> {
31
+ onTrack(track: TrackInfo | null): void;
32
+ /** Album art for the current song. */
33
+ onArtwork(artUrl: string | null): void;
34
+ onStatus(status: PlaybackStatus): void;
35
+ /**
36
+ * Whether playback progress is currently advancing. `status` stays
37
+ * `Playing` during a buffering stall, so MPRIS uses this separately to
38
+ * freeze/resume its interpolated position clock.
39
+ */
40
+ onAdvancing(advancing: boolean): void;
41
+ /** Seconds. `seeked` is true when the position changed discontinuously. */
42
+ onPosition(position: number, seeked: boolean): void;
43
+ /** Seconds, or null when unknown. */
44
+ onDuration(duration: number | null): void;
45
+ onRate(rate: number): void;
46
+ onVolume(volume: number): void;
47
+ onPlaybackMode?(mode: PlaybackMode): void;
48
+ dispose(): void;
49
+ }
50
+ /** Platform without media-session support. */
51
+ export declare class NoopAdapter extends Emittery<PlayerCommandEvents> implements MediaSessionAdapter {
52
+ onTrack(): void;
53
+ onArtwork(): void;
54
+ onStatus(): void;
55
+ onAdvancing(): void;
56
+ onPosition(): void;
57
+ onDuration(): void;
58
+ onRate(): void;
59
+ onVolume(): void;
60
+ dispose(): void;
61
+ }
@@ -0,0 +1,48 @@
1
+ import Emittery from "emittery";
2
+ import type { PlaybackMode } from "../../../shared/types/playback-mode.js";
3
+ import { PlaybackStatus, TrackInfo } from "../types.js";
4
+ import { MediaSessionAdapter, PlayerCommandEvents } from "./MediaSessionAdapter.js";
5
+ /** Linux MPRIS integration, backed by the `@open-orpheus/dbus` zbus module. */
6
+ export default class MprisAdapter extends Emittery<PlayerCommandEvents> implements MediaSessionAdapter {
7
+ private mediaSession;
8
+ private metadata;
9
+ private artUrl;
10
+ private status;
11
+ private position;
12
+ private duration;
13
+ private rate;
14
+ /**
15
+ * Whether the position clock is running. Kept separate from `status`
16
+ * because a buffering stall keeps MPRIS `PlaybackStatus` as `Playing`
17
+ * while the position must stand still.
18
+ */
19
+ private advancing;
20
+ /**
21
+ * The most recent MPRIS volume write, keyed by the value it was for. The
22
+ * native write is asynchronous, so `SetVolume` awaits the write for *its*
23
+ * value once the renderer has confirmed that value — a write triggered by
24
+ * some other (concurrent or in-app) change must not be mistaken for it.
25
+ */
26
+ private volumeApplied;
27
+ private modeApplied;
28
+ constructor();
29
+ onTrack(track: TrackInfo | null): void;
30
+ onStatus(status: PlaybackStatus): void;
31
+ onAdvancing(advancing: boolean): void;
32
+ onPosition(position: number, seeked: boolean): void;
33
+ onDuration(duration: number | null): void;
34
+ onRate(rate: number): void;
35
+ onVolume(volume: number): void;
36
+ onPlaybackMode(mode: PlaybackMode): void;
37
+ dispose(): void;
38
+ private pushMetadata;
39
+ /**
40
+ * Album art for the current song (`player.setCover`). The URL is already
41
+ * resolved to something the OS can consume: a local `file://` (embedded art
42
+ * of local music) or a remote http(s) URL.
43
+ */
44
+ onArtwork(artUrl: string | null): void;
45
+ private refreshArtwork;
46
+ private cacheArtworkLocally;
47
+ private pushPlaybackState;
48
+ }
@@ -0,0 +1,23 @@
1
+ import Emittery from "emittery";
2
+ import { PlaybackStatus, TrackInfo } from "../types.js";
3
+ import { MediaSessionAdapter, PlayerCommandEvents } from "./MediaSessionAdapter.js";
4
+ /** macOS Now Playing integration, backed by the `@open-orpheus/nowplaying` module. */
5
+ export default class NowPlayingAdapter extends Emittery<PlayerCommandEvents> implements MediaSessionAdapter {
6
+ private mediaSession;
7
+ private track;
8
+ private artUrl;
9
+ private position;
10
+ private duration;
11
+ private rate;
12
+ constructor();
13
+ onTrack(track: TrackInfo | null): void;
14
+ onArtwork(artUrl: string | null): void;
15
+ onStatus(status: PlaybackStatus): void;
16
+ onAdvancing(): void;
17
+ onPosition(position: number): void;
18
+ onDuration(duration: number | null): void;
19
+ onRate(rate: number): void;
20
+ onVolume(): void;
21
+ dispose(): void;
22
+ private pushMetadata;
23
+ }
@@ -0,0 +1,23 @@
1
+ import Emittery from "emittery";
2
+ import { PlaybackStatus, TrackInfo } from "../types.js";
3
+ import { MediaSessionAdapter, PlayerCommandEvents } from "./MediaSessionAdapter.js";
4
+ /** Windows SMTC integration, backed by the `@open-orpheus/system-win32` NAPI module. */
5
+ export default class SmtcAdapter extends Emittery<PlayerCommandEvents> implements MediaSessionAdapter {
6
+ private mediaSession;
7
+ private track;
8
+ private artUrl;
9
+ private position;
10
+ private duration;
11
+ constructor();
12
+ onTrack(track: TrackInfo | null): void;
13
+ onArtwork(artUrl: string | null): void;
14
+ private pushMetadata;
15
+ onStatus(status: PlaybackStatus): void;
16
+ onAdvancing(): void;
17
+ onPosition(position: number): void;
18
+ onDuration(duration: number | null): void;
19
+ onRate(rate: number): void;
20
+ onVolume(): void;
21
+ dispose(): void;
22
+ private pushTimeline;
23
+ }
@@ -0,0 +1,47 @@
1
+ /**
2
+ * Album-art handling shared by the media-session integrations (MPRIS / SMTC /
3
+ * Now Playing).
4
+ *
5
+ * The renderer reports album art per song through `player.setCover`. Online
6
+ * tracks give a remote http(s) URL; local tracks give an
7
+ * `orpheus://localmusic/pic?<path>` URL pointing at the app's embedded-art
8
+ * endpoint. OS media sessions cannot load `orpheus://` URLs, so local covers
9
+ * are extracted and cached as a local image file; the resulting `file://` URL
10
+ * is what flows to the adapters.
11
+ */
12
+ /** Directory where resolved album art is cached as plain image files. */
13
+ export declare const ART_CACHE_DIR: string;
14
+ /** Absolute path of the cached artwork file for a track. */
15
+ export declare function artworkCachePath(id: string, ext: string): string;
16
+ /** `file://` URL of the cached artwork file for a track. */
17
+ export declare function artworkFileUrl(id: string, ext: string): string;
18
+ /** Whether the artwork for a track is already cached. */
19
+ export declare function artworkFileExists(id: string, ext: string): Promise<boolean>;
20
+ /** Extension (with dot) derived from a remote artwork URL, defaulting to `.jpg`. */
21
+ export declare function remoteArtExt(url: string): string;
22
+ /**
23
+ * Write bytes into the album-art cache and return the `file://` URL. No-op
24
+ * (returns the URL) when the file is already present.
25
+ */
26
+ export declare function cacheArtwork(id: string, data: Uint8Array, ext: string): Promise<string>;
27
+ /**
28
+ * Extract the embedded album picture behind an `orpheus://localmusic/pic?<path>`
29
+ * cover URL and cache it as a local file. Returns a `file://` URL, or null when
30
+ * the URL isn't one of ours or the file has no usable embedded picture.
31
+ */
32
+ export declare function resolveEmbeddedArtwork(rawUrl: string, trackId: string): Promise<string | null>;
33
+ /**
34
+ * Resolve a raw cover URL (from `player.setCover`) into a URL the OS media
35
+ * sessions can consume:
36
+ * - http(s) / file URLs pass through unchanged;
37
+ * - `orpheus://localmusic/pic?<path>` covers are extracted to a local `file://`
38
+ * file;
39
+ * - anything else resolves to "" (no art).
40
+ */
41
+ export declare function resolveCoverUrl(rawUrl: string | null, trackId: string): Promise<string>;
42
+ /**
43
+ * A URL suitable for a native media session (SMTC / Now Playing). Remote
44
+ * http(s) covers are requested as a small square; already-local art and other
45
+ * URLs pass through unchanged.
46
+ */
47
+ export declare function nativeArtUrl(url: string): string;
@@ -0,0 +1,8 @@
1
+ import type { LoopStatus, PlaybackMode } from "../../shared/types/playback-mode.js";
2
+ export declare function mprisPlaybackMode(mode: PlaybackMode): {
3
+ loopStatus: LoopStatus;
4
+ shuffle: boolean;
5
+ };
6
+ /** Orpheus has one mutually exclusive mode; report its actual combination. */
7
+ export declare function modeForLoopStatus(mode: PlaybackMode, loopStatus: LoopStatus): PlaybackMode;
8
+ export declare function modeForShuffle(mode: PlaybackMode, shuffle: boolean): PlaybackMode;
@@ -0,0 +1,59 @@
1
+ import type { PlaybackMode } from "../../shared/types/playback-mode.js";
2
+ /** Real playback state, as reported to OS media-session integrations. */
3
+ export declare const PlaybackStatus: {
4
+ readonly Playing: "playing";
5
+ readonly Paused: "paused";
6
+ readonly Stopped: "stopped";
7
+ };
8
+ /** Real playback state, as reported to OS media-session integrations. */
9
+ export type PlaybackStatus = "playing" | "paused" | "stopped";
10
+ export declare namespace PlaybackStatus {
11
+ type Playing = "playing";
12
+ type Paused = "paused";
13
+ type Stopped = "stopped";
14
+ }
15
+ /**
16
+ * A single playback transition emitted by the preload (`player.playbackchange`).
17
+ * The controller derives both the media-session status and the lyrics
18
+ * "is progress advancing smoothly?" boolean from these.
19
+ */
20
+ export declare const PlaybackChange: {
21
+ readonly Playing: "playing";
22
+ readonly Paused: "paused";
23
+ readonly Stopped: "stopped";
24
+ readonly Stalled: "stalled";
25
+ readonly Seeking: "seeking";
26
+ };
27
+ /**
28
+ * A single playback transition emitted by the preload (`player.playbackchange`).
29
+ * The controller derives both the media-session status and the lyrics
30
+ * "is progress advancing smoothly?" boolean from these.
31
+ */
32
+ export type PlaybackChange = "playing" | "paused" | "stopped" | "stalled" | "seeking";
33
+ export declare namespace PlaybackChange {
34
+ type Playing = "playing";
35
+ type Paused = "paused";
36
+ type Stopped = "stopped";
37
+ type Stalled = "stalled";
38
+ type Seeking = "seeking";
39
+ }
40
+ /** Track metadata. */
41
+ export interface TrackInfo {
42
+ id: string;
43
+ title: string;
44
+ artist: string;
45
+ album: string;
46
+ }
47
+ /**
48
+ * Single source of truth for playback state, in seconds / plain values.
49
+ * OS media-session adapters own any unit conversion (µs, ticks, …).
50
+ */
51
+ export interface PlaybackSnapshot {
52
+ track: TrackInfo | null;
53
+ status: PlaybackStatus;
54
+ position: number | null;
55
+ duration: number | null;
56
+ rate: number;
57
+ volume: number;
58
+ playbackMode: PlaybackMode | null;
59
+ }
@@ -0,0 +1,8 @@
1
+ /**
2
+ * Resolve an assets-relative path, returning null when it escapes the plugin's
3
+ * assets directory.
4
+ *
5
+ * Directory trees are checked against real paths so symlinks cannot point
6
+ * outside; asar paths are virtual and use lexical containment only.
7
+ */
8
+ export declare function resolvePluginAssetTarget(source: string, assetPath: string): Promise<string | null>;
@@ -0,0 +1,42 @@
1
+ import { PluginLayer } from "../../shared/contracts/plugin-manager-api.js";
2
+ import type { DiscoveredPlugin } from "./discover.js";
3
+ /**
4
+ * One discovered (or failed) plugin source, tagged with its trust layer.
5
+ *
6
+ * Candidates are grouped by layer before ids are resolved: a built-in always
7
+ * owns its id, and duplicates within one layer are conflicts rather than an
8
+ * arbitrary winner chosen by path ordering.
9
+ */
10
+ export interface PluginCandidate {
11
+ layer: PluginLayer;
12
+ source: string;
13
+ plugin?: DiscoveredPlugin;
14
+ error?: unknown;
15
+ }
16
+ export declare const PluginCatalogEntryKind: {
17
+ readonly Selected: "selected";
18
+ readonly Conflict: "conflict";
19
+ };
20
+ export type PluginCatalogEntryKind = "selected" | "conflict";
21
+ export declare namespace PluginCatalogEntryKind {
22
+ type Selected = "selected";
23
+ type Conflict = "conflict";
24
+ }
25
+ export type PluginCatalogEntry = {
26
+ kind: "selected";
27
+ id: string;
28
+ plugin: DiscoveredPlugin;
29
+ shadowed: PluginCandidate[];
30
+ } | {
31
+ kind: "conflict";
32
+ id: string;
33
+ layer: PluginLayer;
34
+ candidates: PluginCandidate[];
35
+ };
36
+ export interface PluginCatalog {
37
+ selected: ReadonlyMap<string, DiscoveredPlugin>;
38
+ entries: readonly PluginCatalogEntry[];
39
+ invalid: readonly PluginCandidate[];
40
+ }
41
+ /** Resolve candidates into a deterministic, layered catalog. */
42
+ export declare function resolvePluginCatalog(candidates: readonly PluginCandidate[]): PluginCatalog;
@@ -0,0 +1,33 @@
1
+ import { PluginKind } from "../../shared/contracts/plugin-manager-api.js";
2
+ import { type PluginMetadata } from "./metadata.js";
3
+ import { type PluginTree } from "./tree.js";
4
+ /** A directory to scan for plugins, and the kind assigned to its children. */
5
+ export interface PluginLocation {
6
+ dir: string;
7
+ kind: PluginKind;
8
+ }
9
+ /** A discovered plugin source path and its kind. */
10
+ export interface PluginSource {
11
+ source: string;
12
+ kind: PluginKind;
13
+ }
14
+ /** A plugin tree that has metadata but whose main module has not been imported. */
15
+ export interface DiscoveredPlugin {
16
+ metadata: PluginMetadata;
17
+ /** Original directory or asar path. */
18
+ source: string;
19
+ /** Whether this plugin ships with the app or was installed by the user. */
20
+ kind: PluginKind;
21
+ /** Absolute paths to each declared realm's entry. */
22
+ entryPaths: Record<string, string>;
23
+ tree: PluginTree;
24
+ }
25
+ /**
26
+ * List plugin sources in the given locations.
27
+ *
28
+ * A source is an immediate child directory or a `*.asar` file. Hidden entries
29
+ * are skipped.
30
+ */
31
+ export declare function discoverPluginSources(locations: PluginLocation[]): Promise<PluginSource[]>;
32
+ /** Open a source, validate its metadata, and resolve the main entry. */
33
+ export declare function loadDiscoveredPlugin(source: string, kind?: PluginKind): Promise<DiscoveredPlugin>;
@@ -0,0 +1,15 @@
1
+ import { type PluginCatalog } from "./catalog.js";
2
+ import { PluginLoader } from "./loader.js";
3
+ import { PluginManager } from "./manager.js";
4
+ /** The installed plugin manager, or `null` when the plugin system is disabled. */
5
+ export declare function getPluginManager(): PluginManager | null;
6
+ /** The resolved plugin catalog, or `null` when the plugin system is disabled. */
7
+ export declare function getPluginCatalog(): PluginCatalog | null;
8
+ /**
9
+ * Install the plugin system.
10
+ *
11
+ * Called once, after the startup services are initialized and before the main
12
+ * window is created. Returns the loader so the caller can run `activateAll`
13
+ * once the main window exists, or `null` when plugins are disabled.
14
+ */
15
+ export declare function installPluginSystem(): Promise<PluginLoader | null>;
@@ -0,0 +1,90 @@
1
+ import type { PluginDesiredState } from "../../shared/contracts/plugin-manager-api.js";
2
+ import { RealmLifecycle, type LifecycleSnapshot, type PluginDisposeResult } from "../../shared/plugin/lifecycle.js";
3
+ import { type Registry } from "../../shared/plugin/registry.js";
4
+ import type { DiscoveredPlugin } from "./discover.js";
5
+ import type { PluginModule } from "../../shared/plugin/realms/main/index.js";
6
+ export declare const PluginStatus: {
7
+ readonly Pending: "pending";
8
+ readonly Disabled: "disabled";
9
+ readonly Active: "active";
10
+ readonly Failed: "failed";
11
+ };
12
+ export type PluginStatus = "pending" | "disabled" | "active" | "failed";
13
+ export declare namespace PluginStatus {
14
+ type Pending = "pending";
15
+ type Disabled = "disabled";
16
+ type Active = "active";
17
+ type Failed = "failed";
18
+ }
19
+ export interface PluginRecord {
20
+ plugin: DiscoveredPlugin;
21
+ lifecycle: RealmLifecycle<PluginModule>;
22
+ readonly status: PluginStatus;
23
+ readonly module: PluginModule | undefined;
24
+ readonly error: unknown;
25
+ readonly snapshot: LifecycleSnapshot<PluginModule>;
26
+ }
27
+ export interface PluginLoaderOptions {
28
+ registry: Registry;
29
+ plugins: DiscoveredPlugin[];
30
+ /** Initial desired state for `activateAll`. */
31
+ isEnabled?: (id: string) => boolean;
32
+ /** Injectable for tests. Receives a cache-busted module URL. */
33
+ importModule?: (entryUrl: string) => Promise<unknown>;
34
+ /** Soft per-plugin activation and cleanup deadline. */
35
+ activationTimeoutMs?: number;
36
+ /** Called when a plugin's lifecycle snapshot changes. */
37
+ onChanged?: () => void;
38
+ }
39
+ /**
40
+ * Loads, activates, and deactivates main-realm plugin modules.
41
+ *
42
+ * Each plugin has one `RealmLifecycle` that serializes activation and cleanup.
43
+ * This class adapts discovered plugins to that state machine and exposes
44
+ * module exports separately from activation readiness.
45
+ */
46
+ export declare class PluginLoader {
47
+ private readonly records;
48
+ private readonly recordsById;
49
+ /**
50
+ * One evaluation per activation epoch, shared by lifecycle activation and
51
+ * cross-plugin `load()`.
52
+ *
53
+ * Imports use a cache-busting URL, so without this cache the two callers
54
+ * would evaluate the entry twice and observe different module instances.
55
+ */
56
+ private readonly moduleCache;
57
+ private readonly importModule;
58
+ private readonly isEnabled;
59
+ private readonly revisions;
60
+ private readonly pluginRegistry;
61
+ private readonly registry;
62
+ constructor(options: PluginLoaderOptions);
63
+ private runtimeFor;
64
+ get plugins(): ReadonlyArray<PluginRecord>;
65
+ /** Apply a committed desired state to one plugin. */
66
+ setDesiredState(id: string, desired: PluginDesiredState): void;
67
+ activateAll(): Promise<void>;
68
+ activate(id: string): Promise<void>;
69
+ deactivate(id: string): Promise<void>;
70
+ /** Request a fresh attempt without changing desired state. */
71
+ retry(id: string): Promise<void>;
72
+ /** Start a retry without waiting for convergence. */
73
+ requestRetry(id: string): void;
74
+ deactivateAll(): Promise<PluginDisposeResult[]>;
75
+ private nextRevision;
76
+ private require;
77
+ /**
78
+ * Drop the cached evaluation only when it is safe to re-evaluate.
79
+ *
80
+ * A retry on a running plugin is a no-op in the lifecycle. Clearing its
81
+ * cache would make cross-plugin `load()` evaluate a second instance while
82
+ * `whenActive()` keeps returning the active one, splitting shared services.
83
+ */
84
+ private invalidateModuleForRetry;
85
+ private loadModule;
86
+ private whenActive;
87
+ private waitForDecision;
88
+ private waitForSettled;
89
+ }
90
+ export type { LifecycleSnapshot };