@open-orpheus/plugin-api 0.0.0 → 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 (174) hide show
  1. package/LICENSE +7 -0
  2. package/README.md +192 -0
  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__window.d.ts +35 -17
  9. package/dist/host/src/main/assets.d.ts +2 -0
  10. package/dist/host/src/main/audio/DownloadScheduler.d.ts +2 -2
  11. package/dist/host/src/main/audio/MediaEngine.d.ts +1 -1
  12. package/dist/host/src/main/audio.d.ts +1 -1
  13. package/dist/host/src/main/av3a/Av3aEngine.d.ts +1 -1
  14. package/dist/host/src/main/av3a/Av3aM4aSession.d.ts +1 -1
  15. package/dist/host/src/main/av3a/Av3aPlaybackProcess.d.ts +1 -1
  16. package/dist/host/src/main/av3a/sources.d.ts +2 -2
  17. package/dist/host/src/main/av3a/types.d.ts +1 -1
  18. package/dist/host/src/main/bridge/ipc-main-bridge.d.ts +24 -0
  19. package/dist/host/src/main/bridge/window.d.ts +7 -0
  20. package/dist/host/src/main/cache.d.ts +3 -3
  21. package/dist/host/src/main/calls/desktop.d.ts +1 -1
  22. package/dist/host/src/main/calls/index.d.ts +16 -16
  23. package/dist/host/src/main/calls.d.ts +1 -1
  24. package/dist/host/src/main/channel.d.ts +1 -1
  25. package/dist/host/src/main/database/KeyvSqliteDriver.d.ts +1 -1
  26. package/dist/host/src/main/database.d.ts +1 -1
  27. package/dist/host/src/main/lifecycle.d.ts +15 -6
  28. package/dist/host/src/main/lyrics/DbusLyricsService.d.ts +2 -2
  29. package/dist/host/src/main/lyrics/LyricsDispatcher.d.ts +1 -1
  30. package/dist/host/src/main/lyrics/dbus.d.ts +1 -1
  31. package/dist/host/src/main/lyrics/parse.d.ts +1 -1
  32. package/dist/host/src/main/lyrics.d.ts +1 -1
  33. package/dist/host/src/main/mediaSession.d.ts +1 -1
  34. package/dist/host/src/main/menu/AppMenu.d.ts +3 -3
  35. package/dist/host/src/main/menu/backend/DesktopWindowBackend.d.ts +2 -2
  36. package/dist/host/src/main/menu/backend/MenuBackend.d.ts +3 -3
  37. package/dist/host/src/main/menu/backend/WaylandLayerShellBackend.d.ts +35 -0
  38. package/dist/host/src/main/menu/backend/WaylandOverlayBackend.d.ts +1 -1
  39. package/dist/host/src/main/menu/backend/WaylandPopupBackend.d.ts +2 -2
  40. package/dist/host/src/main/menu/constants.d.ts +2 -0
  41. package/dist/host/src/main/menu/index.d.ts +2 -2
  42. package/dist/host/src/main/menu/patch.d.ts +1 -1
  43. package/dist/host/src/main/menu/skin.d.ts +1 -1
  44. package/dist/host/src/main/menu/surface/BaseWindowMenuSurface.d.ts +15 -3
  45. package/dist/host/src/main/menu/surface/CaptureLayerSurface.d.ts +22 -0
  46. package/dist/host/src/main/menu/surface/MenuSurface.d.ts +1 -1
  47. package/dist/host/src/main/menu/surface/MenuSurfacePath.d.ts +2 -2
  48. package/dist/host/src/main/menu/surface/SurfacePool.d.ts +1 -1
  49. package/dist/host/src/main/menu/workaround.d.ts +9 -3
  50. package/dist/host/src/main/ncae.d.ts +1 -1
  51. package/dist/host/src/main/network/handler.d.ts +1 -1
  52. package/dist/host/src/main/network/interceptor.d.ts +1 -1
  53. package/dist/host/src/main/network/interceptors/anonymous.d.ts +1 -1
  54. package/dist/host/src/main/network/pipeline.d.ts +1 -1
  55. package/dist/host/src/main/pack.d.ts +1 -1
  56. package/dist/host/src/main/packs/SkinPack.d.ts +1 -1
  57. package/dist/host/src/main/packs/WebPack.d.ts +1 -1
  58. package/dist/host/src/main/playback/PlaybackController.d.ts +2 -2
  59. package/dist/host/src/main/playback/PlayerCommandRouter.d.ts +2 -2
  60. package/dist/host/src/main/playback/adapters/MediaSessionAdapter.d.ts +2 -2
  61. package/dist/host/src/main/playback/adapters/MprisAdapter.d.ts +3 -3
  62. package/dist/host/src/main/playback/adapters/NowPlayingAdapter.d.ts +2 -2
  63. package/dist/host/src/main/playback/adapters/SmtcAdapter.d.ts +2 -2
  64. package/dist/host/src/main/playback/modes.d.ts +1 -1
  65. package/dist/host/src/main/playback/types.d.ts +31 -11
  66. package/dist/host/src/main/plugin/assets.d.ts +8 -0
  67. package/dist/host/src/main/plugin/catalog.d.ts +42 -0
  68. package/dist/host/src/main/plugin/discover.d.ts +4 -7
  69. package/dist/host/src/main/plugin/index.d.ts +5 -2
  70. package/dist/host/src/main/plugin/loader.d.ts +68 -21
  71. package/dist/host/src/main/plugin/manager.d.ts +53 -7
  72. package/dist/host/src/main/plugin/metadata.d.ts +13 -3
  73. package/dist/host/src/main/plugin/state.d.ts +16 -6
  74. package/dist/host/src/main/settings.d.ts +17 -2
  75. package/dist/host/src/main/shutdown.d.ts +28 -10
  76. package/dist/host/src/main/skin/dui.d.ts +1 -1
  77. package/dist/host/src/main/update.d.ts +1 -1
  78. package/dist/host/src/main/util/color.d.ts +7 -0
  79. package/dist/host/src/main/window.d.ts +26 -4
  80. package/dist/host/src/main/windows/color-picker.d.ts +3 -0
  81. package/dist/host/src/main/windows/desktop-lyrics.d.ts +2 -2
  82. package/dist/host/src/main/windows/desktop-pet.d.ts +1 -1
  83. package/dist/host/src/main/windows/main.d.ts +1 -1
  84. package/dist/host/src/main/windows/mini-player.d.ts +2 -2
  85. package/dist/host/src/main/windows/music-desktop.d.ts +1 -1
  86. package/dist/host/src/main/windows/package-download.d.ts +1 -1
  87. package/dist/host/src/main/windows/plugin-manager-events.d.ts +7 -0
  88. package/dist/host/src/main/windows/plugin-manager.d.ts +1 -1
  89. package/dist/host/src/main/xeapi.d.ts +1 -6
  90. package/dist/host/src/preload/PlaybackBackend.d.ts +1 -1
  91. package/dist/host/src/preload/Player.d.ts +14 -6
  92. package/dist/host/src/preload/av3a/Av3aPcmPlayer.d.ts +2 -2
  93. package/dist/host/src/preload/av3a/bridge.d.ts +2 -2
  94. package/dist/host/src/preload/av3a/channel.d.ts +2 -2
  95. package/dist/host/src/preload/backends/Av3aPlaybackBackend.d.ts +2 -2
  96. package/dist/host/src/preload/backends/MediaPlaybackBackend.d.ts +1 -1
  97. package/dist/host/src/shared/bridge/constants.d.ts +2 -0
  98. package/dist/host/src/shared/bridge/endpoint.d.ts +29 -0
  99. package/dist/host/src/shared/bridge/hub.d.ts +136 -0
  100. package/dist/host/src/shared/bridge/protocol.d.ts +91 -0
  101. package/dist/host/src/shared/bridge/realm.d.ts +14 -0
  102. package/dist/host/src/shared/bridge/routes.d.ts +37 -0
  103. package/dist/host/src/shared/contracts/av3a-api.d.ts +1 -1
  104. package/dist/host/src/shared/contracts/av3a-process.d.ts +1 -1
  105. package/dist/host/src/shared/contracts/color-picker-api.d.ts +17 -0
  106. package/dist/host/src/shared/contracts/desktop-lyrics-api.d.ts +1 -2
  107. package/dist/host/src/shared/contracts/input-region-api.d.ts +1 -2
  108. package/dist/host/src/shared/contracts/lyrics-api.d.ts +1 -1
  109. package/dist/host/src/shared/contracts/manage-api.d.ts +2 -4
  110. package/dist/host/src/shared/contracts/menu-surface-api.d.ts +35 -0
  111. package/dist/host/src/shared/contracts/mini-player-api.d.ts +1 -1
  112. package/dist/host/src/shared/contracts/plugin-manager-api.d.ts +201 -12
  113. package/dist/host/src/shared/playbackMode.d.ts +1 -1
  114. package/dist/host/src/shared/plugin/cache-bust.d.ts +8 -0
  115. package/dist/host/src/shared/plugin/lifecycle.d.ts +217 -0
  116. package/dist/host/src/{main/plugin/types.d.ts → shared/plugin/realms/main/index.d.ts} +1 -1
  117. package/dist/host/src/shared/plugin/registry.d.ts +42 -5
  118. package/dist/host/src/shared/plugin/runtime-state.d.ts +4 -0
  119. package/dist/host/src/shared/settings/defaults.d.ts +35 -0
  120. package/dist/host/src/shared/settings/index.d.ts +3 -0
  121. package/dist/host/src/shared/settings/keys.d.ts +21 -0
  122. package/dist/host/src/shared/settings/values.d.ts +13 -0
  123. package/dist/host/src/shared/types/desktop-lyrics.d.ts +28 -11
  124. package/dist/host/src/shared/types/menu-surface.d.ts +2 -2
  125. package/dist/host/src/shared/types/menu.d.ts +1 -1
  126. package/dist/host/src/shared/types/mini-player.d.ts +12 -5
  127. package/dist/host/src/shared/types/ncae.d.ts +11 -3
  128. package/dist/host/src/shared/types/package-download.d.ts +13 -5
  129. package/dist/index.d.ts +3 -3
  130. package/dist/plugin-manager/host/src/preload/logger.d.ts +10 -0
  131. package/dist/plugin-manager/host/src/preload/util.d.ts +1 -0
  132. package/dist/plugin-manager/host/src/shared/bridge/constants.d.ts +2 -0
  133. package/dist/plugin-manager/host/src/shared/bridge/endpoint.d.ts +29 -0
  134. package/dist/plugin-manager/host/src/shared/bridge/hub.d.ts +136 -0
  135. package/dist/plugin-manager/host/src/shared/bridge/protocol.d.ts +91 -0
  136. package/dist/plugin-manager/host/src/shared/bridge/routes.d.ts +37 -0
  137. package/dist/plugin-manager/host/src/shared/contracts/plugin-manager-api.d.ts +223 -0
  138. package/dist/plugin-manager/host/src/shared/plugin/lifecycle.d.ts +217 -0
  139. package/dist/plugin-manager/host/src/shared/plugin/realms/common/index.d.ts +34 -0
  140. package/dist/plugin-manager/host/src/shared/plugin/realms/plugin-manager/index.d.ts +11 -0
  141. package/dist/plugin-manager/host/src/shared/plugin/registry.d.ts +69 -0
  142. package/dist/plugin-manager/host/src/shared/util.d.ts +22 -0
  143. package/dist/plugin-manager/index.d.ts +7 -0
  144. package/dist/plugin-manager/registry-map.d.ts +16 -0
  145. package/dist/preload/host/src/preload/PlaybackBackend.d.ts +1 -1
  146. package/dist/preload/host/src/preload/Player.d.ts +14 -6
  147. package/dist/preload/host/src/preload/audioplayer.d.ts +1 -1
  148. package/dist/preload/host/src/preload/av3a/Av3aPcmPlayer.d.ts +2 -2
  149. package/dist/preload/host/src/preload/av3a/bridge.d.ts +2 -2
  150. package/dist/preload/host/src/preload/av3a/channel.d.ts +2 -2
  151. package/dist/preload/host/src/preload/backends/Av3aPlaybackBackend.d.ts +2 -2
  152. package/dist/preload/host/src/preload/backends/MediaPlaybackBackend.d.ts +1 -1
  153. package/dist/preload/host/src/preload/calls/index.d.ts +6 -6
  154. package/dist/preload/host/src/preload/calls.d.ts +1 -1
  155. package/dist/preload/host/src/preload/logger.d.ts +10 -0
  156. package/dist/preload/host/src/preload/playbackMode.d.ts +1 -1
  157. package/dist/preload/host/src/shared/bridge/endpoint.d.ts +29 -0
  158. package/dist/preload/host/src/shared/bridge/hub.d.ts +136 -0
  159. package/dist/preload/host/src/shared/bridge/protocol.d.ts +91 -0
  160. package/dist/preload/host/src/shared/bridge/routes.d.ts +37 -0
  161. package/dist/preload/host/src/shared/contracts/av3a-api.d.ts +1 -1
  162. package/dist/preload/host/src/shared/contracts/av3a-process.d.ts +1 -1
  163. package/dist/preload/host/src/shared/contracts/plugin-manager-api.d.ts +223 -0
  164. package/dist/preload/host/src/shared/playbackMode.d.ts +1 -1
  165. package/dist/preload/host/src/shared/plugin/lifecycle.d.ts +217 -0
  166. package/dist/preload/host/src/shared/plugin/realms/common/index.d.ts +34 -0
  167. package/dist/preload/host/src/shared/plugin/realms/preload/index.d.ts +11 -0
  168. package/dist/preload/host/src/shared/plugin/registry.d.ts +42 -5
  169. package/dist/preload/host/src/shared/types/ncae.d.ts +11 -3
  170. package/dist/preload/index.d.ts +3 -3
  171. package/dist/preload/registry-map.d.ts +38 -31
  172. package/dist/registry-map.d.ts +159 -140
  173. package/package.json +24 -8
  174. package/dist/preload/host/src/preload/plugin/types.d.ts +0 -18
@@ -1,4 +1,4 @@
1
- import DbusLyricsService from "./DbusLyricsService";
1
+ import DbusLyricsService from "./DbusLyricsService.js";
2
2
  /** The well-known name that owns the app's custom D-Bus services. */
3
3
  export declare const DBUS_LYRICS_BUS_NAME = "io.github.yucling.OpenOrpheus";
4
4
  /** The object path of the lyrics service. */
@@ -1,4 +1,4 @@
1
- import type { Lyrics } from "../../shared/types/lyrics";
1
+ import type { Lyrics } from "../../shared/types/lyrics.js";
2
2
  /**
3
3
  * Parse an LRC string into {@link Lyrics}.
4
4
  *
@@ -1,2 +1,2 @@
1
- import LyricsDispatcher from "./lyrics/LyricsDispatcher";
1
+ import LyricsDispatcher from "./lyrics/LyricsDispatcher.js";
2
2
  export declare const lyricsDispatcher: LyricsDispatcher;
@@ -1,4 +1,4 @@
1
- import PlaybackController from "./playback/PlaybackController";
1
+ import PlaybackController from "./playback/PlaybackController.js";
2
2
  /**
3
3
  * Track metadata passed through the frozen `player.setInfo` seam.
4
4
  *
@@ -1,7 +1,7 @@
1
1
  import type { BrowserWindow } from "electron";
2
2
  import Emittery from "emittery";
3
- import type { AppMenuItem } from "../../shared/types/menu";
4
- import type { ElementTemplate } from "../skin/dui";
3
+ import type { AppMenuItem } from "../../shared/types/menu.js";
4
+ import type { ElementTemplate } from "../skin/dui.js";
5
5
  export type AppMenuEvents = {
6
6
  close: undefined;
7
7
  };
@@ -28,7 +28,7 @@ export default class AppMenu extends Emittery<AppMenuEvents> {
28
28
  private watchParent;
29
29
  private scheduleParentDismiss;
30
30
  private clearParentWatch;
31
- private selectBackend;
31
+ private backendCandidates;
32
32
  close(): void;
33
33
  update(patchItems: AppMenuItem[]): void;
34
34
  }
@@ -1,5 +1,5 @@
1
- import type { MenuUpdate } from "../../../shared/types/menu-surface";
2
- import type { MenuBackend, MenuBackendContext } from "./MenuBackend";
1
+ import type { MenuUpdate } from "../../../shared/types/menu-surface.js";
2
+ import type { MenuBackend, MenuBackendContext } from "./MenuBackend.js";
3
3
  /** Desktop window host for X11, Windows and macOS. */
4
4
  export declare class DesktopWindowBackend implements MenuBackend {
5
5
  private readonly context;
@@ -1,7 +1,7 @@
1
1
  import type { BrowserWindow } from "electron";
2
- import type { ElementTemplate } from "../../../shared/types/dui";
3
- import type { AppMenuItem, MenuSkin } from "../../../shared/types/menu";
4
- import type { MenuAnchor, MenuUpdate } from "../../../shared/types/menu-surface";
2
+ import type { ElementTemplate } from "../../../shared/types/dui.js";
3
+ import type { AppMenuItem, MenuSkin } from "../../../shared/types/menu.js";
4
+ import type { MenuAnchor, MenuUpdate } from "../../../shared/types/menu-surface.js";
5
5
  export interface MenuBackendContext {
6
6
  readonly items: AppMenuItem[];
7
7
  readonly templates: Record<string, ElementTemplate>;
@@ -0,0 +1,35 @@
1
+ import type { MenuUpdate } from "../../../shared/types/menu-surface.js";
2
+ import type { MenuBackend, MenuBackendContext } from "./MenuBackend.js";
3
+ /**
4
+ * Menu host for compositors with `zwlr_layer_shell_v1`.
5
+ *
6
+ * The cursor position comes from a short-lived transparent layer capture
7
+ * window. The menu itself is an ordinary layer surface created at its final
8
+ * bounds, and submenus are xdg_popups of it.
9
+ */
10
+ export declare class WaylandLayerShellBackend implements MenuBackend {
11
+ private readonly context;
12
+ private readonly path;
13
+ private readonly pool;
14
+ private readonly childGenerations;
15
+ private readonly surfaceItems;
16
+ private readonly openingChildren;
17
+ private closed;
18
+ private pendingRoot;
19
+ private root;
20
+ private captureSurface;
21
+ private focusLossPending;
22
+ constructor(context: MenuBackendContext);
23
+ open(): Promise<void>;
24
+ isFocused(): boolean;
25
+ hasChildren(): boolean;
26
+ update(update: MenuUpdate): void;
27
+ close(): Promise<void>;
28
+ private createSurface;
29
+ /** Convert the capture result and measured size into layer-surface options. */
30
+ private layerOptions;
31
+ private openChild;
32
+ private closeChildren;
33
+ private handleFocusLoss;
34
+ private configFor;
35
+ }
@@ -1,4 +1,4 @@
1
- import type { MenuBackend, MenuBackendContext } from "./MenuBackend";
1
+ import type { MenuBackend, MenuBackendContext } from "./MenuBackend.js";
2
2
  /** Fullscreen Wayland overlay; the renderer owns the panel path. */
3
3
  export declare class WaylandOverlayBackend implements MenuBackend {
4
4
  private readonly context;
@@ -1,5 +1,5 @@
1
- import type { MenuUpdate } from "../../../shared/types/menu-surface";
2
- import { type MenuBackend, type MenuBackendContext } from "./MenuBackend";
1
+ import type { MenuUpdate } from "../../../shared/types/menu-surface.js";
2
+ import { type MenuBackend, type MenuBackendContext } from "./MenuBackend.js";
3
3
  /**
4
4
  * Native Wayland popup host. The backend owns the surface path; the renderer
5
5
  * never sees it.
@@ -8,5 +8,7 @@ export declare const PARENT_BLUR_DISMISS_MS = 50;
8
8
  export declare const SURFACE_BLUR_DISMISS_MS = 100;
9
9
  /** Cursor capture bound. */
10
10
  export declare const DEFAULT_CURSOR_CAPTURE_TIMEOUT_MS = 100;
11
+ /** The proxy's capture surface has to map and configure before the pointer arrives. */
12
+ export declare const LAYER_CAPTURE_TIMEOUT_MS = 300;
11
13
  /** Touch presses stop anchoring after this age. */
12
14
  export declare const TOUCH_ANCHOR_MAX_AGE_MS = 1000;
@@ -1,2 +1,2 @@
1
- export { default } from "./AppMenu";
2
- export type { AppMenuEvents } from "./AppMenu";
1
+ export { default } from "./AppMenu.js";
2
+ export type { AppMenuEvents } from "./AppMenu.js";
@@ -1,3 +1,3 @@
1
- import type { AppMenuItem } from "../../shared/types/menu";
1
+ import type { AppMenuItem } from "../../shared/types/menu.js";
2
2
  /** Replace the first item with the patch's menu_id, recursively. */
3
3
  export declare function patchById(items: AppMenuItem[], patch: AppMenuItem): boolean;
@@ -1,3 +1,3 @@
1
- import type { MenuSkin } from "../../shared/types/menu";
1
+ import type { MenuSkin } from "../../shared/types/menu.js";
2
2
  export declare const menuSkin: MenuSkin;
3
3
  export declare function registerMenuSkinUpdater(): void;
@@ -1,7 +1,8 @@
1
1
  import { WebContentsView } from "electron";
2
- import type { MenuChildOpenRequest } from "../../../shared/types/menu-surface";
3
- import type { MenuMeasurement, MenuSurfaceConfig, MenuSurfaceId, MenuUpdate } from "../../../shared/types/menu-surface";
4
- import type { MenuSurface } from "./MenuSurface";
2
+ import type { LayerShellOptions } from "../../../../_native/open-orpheus__window.js";
3
+ import type { MenuChildOpenRequest } from "../../../shared/types/menu-surface.js";
4
+ import type { MenuMeasurement, MenuSurfaceConfig, MenuSurfaceId, MenuUpdate } from "../../../shared/types/menu-surface.js";
5
+ import type { MenuSurface } from "./MenuSurface.js";
5
6
  export interface WindowSurfaceOptions {
6
7
  route?: string;
7
8
  fullscreen?: boolean;
@@ -16,6 +17,7 @@ export interface MenuSurfaceHandlers {
16
17
  onOpenChild(request: MenuChildOpenRequest): void | Promise<void>;
17
18
  onCloseChildren(parentId: MenuSurfaceId): void;
18
19
  onBlur?(surfaceId: MenuSurfaceId): void;
20
+ onFocus?(surfaceId: MenuSurfaceId): void;
19
21
  onMeasurement?(surfaceId: MenuSurfaceId, measurement: MenuMeasurement): void;
20
22
  }
21
23
  /**
@@ -30,6 +32,8 @@ export declare class BaseWindowMenuSurface implements MenuSurface {
30
32
  readonly view: WebContentsView;
31
33
  private readonly host;
32
34
  private window;
35
+ private layerShellOptions;
36
+ private appliedLayerSize;
33
37
  private pendingInputRegions;
34
38
  private measurement;
35
39
  private requestId;
@@ -42,11 +46,19 @@ export declare class BaseWindowMenuSurface implements MenuSurface {
42
46
  private closed;
43
47
  private blurArmed;
44
48
  private readonly options;
49
+ private mount;
45
50
  constructor(handlers: MenuSurfaceHandlers, options?: WindowSurfaceOptions);
46
51
  private registerIpc;
47
52
  prepare(config: MenuSurfaceConfig, timeoutMs?: number): Promise<MenuMeasurement>;
48
53
  private applyInputRegions;
49
54
  private applyMeasurement;
55
+ /**
56
+ * Create this surface as a layer surface.
57
+ *
58
+ * Must be called before `present()`: the policy has to be registered before
59
+ * the window (and therefore its first role object) exists.
60
+ */
61
+ setLayerShell(options: LayerShellOptions): void;
50
62
  present(): void;
51
63
  sendCursor(position: {
52
64
  x: number;
@@ -0,0 +1,22 @@
1
+ export interface LayerCaptureResult {
2
+ x: number;
3
+ y: number;
4
+ displayId: number;
5
+ }
6
+ /**
7
+ * A transparent fullscreen layer window whose only job is to receive the
8
+ * pointer enter Wayland will not report without a surface.
9
+ *
10
+ * The compositor chooses the output because the policy omits `output`; the
11
+ * proxy reports which output the surface entered, so placement can use that
12
+ * display's bounds without guessing from the global cursor.
13
+ */
14
+ export declare class CaptureLayerSurface {
15
+ private readonly host;
16
+ private closed;
17
+ private released;
18
+ constructor();
19
+ capture(timeoutMs?: number): Promise<LayerCaptureResult>;
20
+ close(): void;
21
+ private waitForDisplayId;
22
+ }
@@ -1,4 +1,4 @@
1
- import type { MenuMeasurement, MenuSurfaceConfig, MenuSurfaceId, MenuUpdate } from "../../../shared/types/menu-surface";
1
+ import type { MenuMeasurement, MenuSurfaceConfig, MenuSurfaceId, MenuUpdate } from "../../../shared/types/menu-surface.js";
2
2
  /**
3
3
  * One menu surface. The implementation owns the `WebContentsView` and the
4
4
  * `BaseWindow`; the open path is external.
@@ -1,5 +1,5 @@
1
- import type { MenuSurface } from "./MenuSurface";
2
- import type { MenuSurfaceId } from "../../../shared/types/menu-surface";
1
+ import type { MenuSurface } from "./MenuSurface.js";
2
+ import type { MenuSurfaceId } from "../../../shared/types/menu-surface.js";
3
3
  /**
4
4
  * The open menu surfaces, root -> leaf. Only one branch is ever open.
5
5
  *
@@ -1,4 +1,4 @@
1
- import type { MenuSurface, SurfaceFactory } from "./MenuSurface";
1
+ import type { MenuSurface, SurfaceFactory } from "./MenuSurface.js";
2
2
  export declare class SurfacePool {
3
3
  private readonly factory;
4
4
  private readonly onError;
@@ -1,6 +1,12 @@
1
1
  export declare let workaroundFlags: number;
2
2
  export declare function workaroundEnabled(workaround: WorkaroundFlags): boolean;
3
- export declare enum WorkaroundFlags {
4
- OverlayNoFullscreen = 1,
5
- OverlayNoMaximize = 2
3
+ export declare const WorkaroundFlags: {
4
+ readonly OverlayNoFullscreen: 1;
5
+ readonly OverlayNoMaximize: 2;
6
+ readonly [x: number]: string;
7
+ };
8
+ export type WorkaroundFlags = 1 | 2;
9
+ export declare namespace WorkaroundFlags {
10
+ type OverlayNoFullscreen = 1;
11
+ type OverlayNoMaximize = 2;
6
12
  }
@@ -1,4 +1,4 @@
1
- import { Ncae } from "../shared/types/ncae";
1
+ import { Ncae } from "../shared/types/ncae.js";
2
2
  /**
3
3
  * Decode a complete NCAE buffer.
4
4
  *
@@ -1,3 +1,3 @@
1
- import type { InterceptorState, NetworkFetchRequest, NetworkFetchResponse } from "./types";
1
+ import type { InterceptorState, NetworkFetchRequest, NetworkFetchResponse } from "./types.js";
2
2
  export declare const DEFAULT_RETRY_COUNT = 1;
3
3
  export declare function executeNetworkRequest(request: NetworkFetchRequest, state: InterceptorState): Promise<Partial<NetworkFetchResponse>>;
@@ -1,2 +1,2 @@
1
- import { NetworkInterceptorPipeline } from "./pipeline";
1
+ import { NetworkInterceptorPipeline } from "./pipeline.js";
2
2
  export declare const networkInterceptorPipeline: NetworkInterceptorPipeline;
@@ -1,2 +1,2 @@
1
- import type { NetworkInterceptor } from "../types";
1
+ import type { NetworkInterceptor } from "../types.js";
2
2
  export declare const anonymousRegisterInterceptor: NetworkInterceptor;
@@ -1,4 +1,4 @@
1
- import { InterceptorState, NetworkExecutor, NetworkInterceptor, NetworkFetchRequest, NetworkFetchResponse } from "./types";
1
+ import { InterceptorState, NetworkExecutor, NetworkInterceptor, NetworkFetchRequest, NetworkFetchResponse } from "./types.js";
2
2
  export declare class NetworkInterceptorPipeline {
3
3
  private interceptors;
4
4
  use(interceptor: NetworkInterceptor): this;
@@ -1,5 +1,5 @@
1
1
  import Emittery from "emittery";
2
- import type Pack from "./packs/Pack";
2
+ import type Pack from "./packs/Pack.js";
3
3
  export declare const NO_WEBPACK_ERROR_MESSAGE = "No usable web pack file found";
4
4
  export type DownloadPackageProgress = {
5
5
  step: "downloading" | "extracting" | "saving" | "completed";
@@ -1,4 +1,4 @@
1
- import Pack from "./Pack";
1
+ import Pack from "./Pack.js";
2
2
  export default class SkinPack extends Pack {
3
3
  private buffers;
4
4
  readPack(verify?: boolean): Promise<void>;
@@ -1,4 +1,4 @@
1
- import Pack from "./Pack";
1
+ import Pack from "./Pack.js";
2
2
  export default class WebPack extends Pack {
3
3
  readPack(verify?: boolean): Promise<void>;
4
4
  readFile(path: string): Promise<Buffer>;
@@ -1,6 +1,6 @@
1
1
  import Emittery from "emittery";
2
- import type { PlaybackMode } from "../../shared/types/playback-mode";
3
- import { PlaybackChange, PlaybackSnapshot, PlaybackStatus, TrackInfo } from "./types";
2
+ import type { PlaybackMode } from "../../shared/types/playback-mode.js";
3
+ import { PlaybackChange, PlaybackSnapshot, PlaybackStatus, TrackInfo } from "./types.js";
4
4
  export type PlaybackControllerEvents = {
5
5
  /** Raw, unthrottled position (seconds) — lyrics / progress telemetry. */
6
6
  timeupdate: number;
@@ -1,6 +1,6 @@
1
1
  import Emittery from "emittery";
2
- import { PlayerCommandEvents } from "./adapters/MediaSessionAdapter";
3
- import type PlaybackController from "./PlaybackController";
2
+ import { PlayerCommandEvents } from "./adapters/MediaSessionAdapter.js";
3
+ import type PlaybackController from "./PlaybackController.js";
4
4
  /**
5
5
  * Translates media-session commands (MPRIS / SMTC / MPNowPlayingInfo adapters)
6
6
  * into the renderer-facing IPC the preload already understands.
@@ -1,6 +1,6 @@
1
1
  import Emittery from "emittery";
2
- import type { LoopStatus, PlaybackMode } from "../../../shared/types/playback-mode";
3
- import { PlaybackStatus, TrackInfo } from "../types";
2
+ import type { LoopStatus, PlaybackMode } from "../../../shared/types/playback-mode.js";
3
+ import { PlaybackStatus, TrackInfo } from "../types.js";
4
4
  /** Commands from an OS media session, normalized before hitting the renderer. */
5
5
  export type PlayerCommandEvents = {
6
6
  play: undefined;
@@ -1,7 +1,7 @@
1
1
  import Emittery from "emittery";
2
- import type { PlaybackMode } from "../../../shared/types/playback-mode";
3
- import { PlaybackStatus, TrackInfo } from "../types";
4
- import { MediaSessionAdapter, PlayerCommandEvents } from "./MediaSessionAdapter";
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
5
  /** Linux MPRIS integration, backed by the `@open-orpheus/dbus` zbus module. */
6
6
  export default class MprisAdapter extends Emittery<PlayerCommandEvents> implements MediaSessionAdapter {
7
7
  private mediaSession;
@@ -1,6 +1,6 @@
1
1
  import Emittery from "emittery";
2
- import { PlaybackStatus, TrackInfo } from "../types";
3
- import { MediaSessionAdapter, PlayerCommandEvents } from "./MediaSessionAdapter";
2
+ import { PlaybackStatus, TrackInfo } from "../types.js";
3
+ import { MediaSessionAdapter, PlayerCommandEvents } from "./MediaSessionAdapter.js";
4
4
  /** macOS Now Playing integration, backed by the `@open-orpheus/nowplaying` module. */
5
5
  export default class NowPlayingAdapter extends Emittery<PlayerCommandEvents> implements MediaSessionAdapter {
6
6
  private mediaSession;
@@ -1,6 +1,6 @@
1
1
  import Emittery from "emittery";
2
- import { PlaybackStatus, TrackInfo } from "../types";
3
- import { MediaSessionAdapter, PlayerCommandEvents } from "./MediaSessionAdapter";
2
+ import { PlaybackStatus, TrackInfo } from "../types.js";
3
+ import { MediaSessionAdapter, PlayerCommandEvents } from "./MediaSessionAdapter.js";
4
4
  /** Windows SMTC integration, backed by the `@open-orpheus/system-win32` NAPI module. */
5
5
  export default class SmtcAdapter extends Emittery<PlayerCommandEvents> implements MediaSessionAdapter {
6
6
  private mediaSession;
@@ -1,4 +1,4 @@
1
- import type { LoopStatus, PlaybackMode } from "../../shared/types/playback-mode";
1
+ import type { LoopStatus, PlaybackMode } from "../../shared/types/playback-mode.js";
2
2
  export declare function mprisPlaybackMode(mode: PlaybackMode): {
3
3
  loopStatus: LoopStatus;
4
4
  shuffle: boolean;
@@ -1,21 +1,41 @@
1
- import type { PlaybackMode } from "../../shared/types/playback-mode";
1
+ import type { PlaybackMode } from "../../shared/types/playback-mode.js";
2
2
  /** Real playback state, as reported to OS media-session integrations. */
3
- export declare enum PlaybackStatus {
4
- Playing = "playing",
5
- Paused = "paused",
6
- Stopped = "stopped"
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";
7
14
  }
8
15
  /**
9
16
  * A single playback transition emitted by the preload (`player.playbackchange`).
10
17
  * The controller derives both the media-session status and the lyrics
11
18
  * "is progress advancing smoothly?" boolean from these.
12
19
  */
13
- export declare enum PlaybackChange {
14
- Playing = "playing",
15
- Paused = "paused",
16
- Stopped = "stopped",
17
- Stalled = "stalled",
18
- Seeking = "seeking"
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";
19
39
  }
20
40
  /** Track metadata. */
21
41
  export interface TrackInfo {
@@ -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;
@@ -1,6 +1,6 @@
1
- import { PluginKind } from "../../shared/contracts/plugin-manager-api";
2
- import { type PluginMetadata } from "./metadata";
3
- import { type PluginTree } from "./tree";
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
4
  /** A directory to scan for plugins, and the kind assigned to its children. */
5
5
  export interface PluginLocation {
6
6
  dir: string;
@@ -19,10 +19,7 @@ export interface DiscoveredPlugin {
19
19
  /** Whether this plugin ships with the app or was installed by the user. */
20
20
  kind: PluginKind;
21
21
  /** Absolute paths to each declared realm's entry. */
22
- entryPaths: {
23
- main: string;
24
- preload?: string;
25
- };
22
+ entryPaths: Record<string, string>;
26
23
  tree: PluginTree;
27
24
  }
28
25
  /**
@@ -1,7 +1,10 @@
1
- import { PluginLoader } from "./loader";
2
- import { PluginManager } from "./manager";
1
+ import { type PluginCatalog } from "./catalog.js";
2
+ import { PluginLoader } from "./loader.js";
3
+ import { PluginManager } from "./manager.js";
3
4
  /** The installed plugin manager, or `null` when the plugin system is disabled. */
4
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;
5
8
  /**
6
9
  * Install the plugin system.
7
10
  *