@vestra-player/sdk 1.7.20 → 1.9.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 (96) hide show
  1. package/CHANGELOG.md +72 -0
  2. package/README.md +2 -2
  3. package/bin/vestra-plugin.mjs +139 -100
  4. package/capability-scan.json +369 -0
  5. package/dist/api-requests.d.ts +11 -36
  6. package/dist/api-requests.js +22 -47
  7. package/dist/capability-scan.d.ts +95 -0
  8. package/dist/capability-scan.js +249 -0
  9. package/dist/commands.d.ts +35 -0
  10. package/dist/commands.js +42 -1
  11. package/dist/docs-tree.json.gz +0 -0
  12. package/dist/docs.d.ts +1 -1
  13. package/dist/docs.js +1 -1
  14. package/dist/index.d.ts +4 -5
  15. package/dist/manifest.d.ts +5 -0
  16. package/dist/manifest.js +9 -24
  17. package/dist/member-uses.d.ts +61 -0
  18. package/dist/member-uses.js +160 -0
  19. package/dist/mpv.d.ts +139 -0
  20. package/dist/mpv.js +496 -0
  21. package/dist/player-runtime.d.ts +3 -3
  22. package/dist/player-runtime.js +3 -3
  23. package/dist/plugin/appearance.d.ts +1 -1
  24. package/dist/plugin/appearance.js +2 -2
  25. package/dist/plugin/bindings.d.ts +1 -1
  26. package/dist/plugin/bindings.js +2 -2
  27. package/dist/plugin/commands.js +6 -14
  28. package/dist/plugin/connection.d.ts +26 -7
  29. package/dist/plugin/connection.js +68 -36
  30. package/dist/plugin/drops.js +1 -1
  31. package/dist/plugin/index.js +9 -15
  32. package/dist/plugin/media.js +0 -12
  33. package/dist/plugin/mpv.d.ts +3 -0
  34. package/dist/plugin/mpv.js +91 -0
  35. package/dist/plugin/packages.js +1 -2
  36. package/dist/plugin/player/events.d.ts +4 -3
  37. package/dist/plugin/player/events.js +7 -6
  38. package/dist/plugin/player.d.ts +21 -13
  39. package/dist/plugin/player.js +56 -21
  40. package/dist/plugin/scope.d.ts +1 -0
  41. package/dist/plugin/scope.js +2 -0
  42. package/dist/plugin/services.d.ts +4 -4
  43. package/dist/plugin/services.js +7 -29
  44. package/dist/plugin/settings.js +1 -1
  45. package/dist/plugin/shaders.js +0 -2
  46. package/dist/plugin/stream.d.ts +2 -1
  47. package/dist/plugin/stream.js +2 -2
  48. package/dist/plugin/testing/commands.d.ts +3 -10
  49. package/dist/plugin/testing/commands.js +43 -24
  50. package/dist/plugin/testing/index.d.ts +75 -114
  51. package/dist/plugin/testing/index.js +83 -102
  52. package/dist/plugin/testing/mpv.d.ts +7 -0
  53. package/dist/plugin/testing/mpv.js +90 -0
  54. package/dist/plugin/testing/processing.js +1 -1
  55. package/dist/plugin/testing/services.js +0 -1
  56. package/dist/plugin/timeline.d.ts +2 -3
  57. package/dist/plugin/timeline.js +4 -8
  58. package/dist/plugin/types/base.d.ts +49 -88
  59. package/dist/plugin/types/commands.d.ts +44 -77
  60. package/dist/plugin/types/packages.d.ts +17 -55
  61. package/dist/plugin/types/playback.d.ts +302 -135
  62. package/dist/plugin/types/plugin-wire.d.ts +6 -36
  63. package/dist/plugin/types/processing.d.ts +10 -49
  64. package/dist/plugin/types/services.d.ts +11 -70
  65. package/dist/plugin/types/snapshots.d.ts +7 -60
  66. package/dist/plugin/types/sources.d.ts +2 -11
  67. package/dist/plugin/types/subtitles.d.ts +5 -26
  68. package/dist/plugin/types/ui-content.d.ts +1 -16
  69. package/dist/plugin/types/ui-layout.d.ts +53 -79
  70. package/dist/plugin/types/ui-locale.d.ts +5 -23
  71. package/dist/plugin/types/ui-shell.d.ts +13 -59
  72. package/dist/plugin/view/layout.js +1 -1
  73. package/dist/plugin/view.js +0 -2
  74. package/dist/plugin/window.d.ts +1 -1
  75. package/dist/plugin/window.js +1 -1
  76. package/dist/plugin/wire-facade.js +1 -2
  77. package/dist/processing.d.ts +2 -3
  78. package/dist/protocol.d.ts +14 -0
  79. package/dist/protocol.js +14 -0
  80. package/dist/request-queue.js +1 -1
  81. package/dist/subtitles.d.ts +1 -1
  82. package/dist/ts-plugin.d.ts +8 -15
  83. package/dist/ts-plugin.js +3 -141
  84. package/dist/wire.d.ts +22 -12
  85. package/dist/wire.js +17 -8
  86. package/llms.txt +5 -5
  87. package/package.json +4 -3
  88. package/slint/vestra/widgets.slint +12 -4
  89. package/dist/capabilities.d.ts +0 -107
  90. package/dist/capabilities.js +0 -69
  91. package/dist/capability-check.d.ts +0 -133
  92. package/dist/capability-check.js +0 -371
  93. package/dist/capability-rules.d.ts +0 -125
  94. package/dist/capability-rules.js +0 -192
  95. package/dist/host-capabilities.d.ts +0 -10
  96. package/dist/host-capabilities.js +0 -477
@@ -32,12 +32,9 @@ export type ThemeId = "vestra" | "vestra-light";
32
32
  * {@link Osd.show}).
33
33
  *
34
34
  * To run code when the palette or the language changes, listen with
35
- * `plugin.player.on("appearance.changed", …)` (needs `events`): `theme` and
35
+ * `plugin.player.on("appearance.changed", …)` (after `plugin.player.subscribe()`): `theme` and
36
36
  * `language` already hold the event's values when the listener runs.
37
37
  *
38
- * @capability None to read `theme`; `events` to follow changes; `ui.theme`
39
- * to change it.
40
- *
41
38
  * @example Offer the light palette as a menu item
42
39
  * Settings ▸ Light colours switches every view of the player to the light
43
40
  * palette and carries a radio mark while it is in use. `set` asks the
@@ -59,7 +56,7 @@ export type ThemeId = "vestra" | "vestra-light";
59
56
  */
60
57
  export interface Appearance {
61
58
  /**
62
- * The palette in use. Read before activation; with `events` it follows
59
+ * The palette in use. Read before activation; after `plugin.player.subscribe()`, it follows
63
60
  * other plugins' changes from the first read on, without it only this
64
61
  * plugin's own.
65
62
  */
@@ -71,20 +68,17 @@ export interface Appearance {
71
68
  * The player applies it to every open view without interrupting a drag or
72
69
  * an open menu, and saves it across restarts.
73
70
  *
74
- * @capability ui.theme
75
- *
76
71
  * @param theme - The palette to use.
77
72
  * @returns Resolves once the player has accepted the change;
78
73
  * {@link Appearance.theme} has the new value.
79
74
  *
80
75
  * @throws `invalid` (rejects) `theme` is not a {@link ThemeId}.
81
- * @throws `capability` (rejects) The manifest does not declare `ui.theme`.
82
76
  *
83
77
  * @example Switch to the light palette
84
78
  * Every view of the player turns light, and stays light after a restart.
85
79
  * The player applies the palette to every open view and saves the
86
80
  * choice; when the promise resolves, `appearance.theme` already has the
87
- * new value. Without `ui.theme` it rejects with `capability`.
81
+ * new value.
88
82
  * ```ts
89
83
  * await plugin.appearance.set("vestra-light");
90
84
  * ```
@@ -99,7 +93,7 @@ export interface Appearance {
99
93
  * @remarks
100
94
  * This is the choice for the next start. The language of this run is
101
95
  * {@link I18n.locale} and never changes while the player runs. Read before
102
- * activation; with `events` it follows other plugins' changes, without it
96
+ * activation; after `plugin.player.subscribe()`, it follows other plugins' changes, without it
103
97
  * only this plugin's own. Players before 0.4.3 report `"system"`.
104
98
  *
105
99
  * @since 1.5.9
@@ -111,10 +105,9 @@ export interface Appearance {
111
105
  * @remarks
112
106
  * The player keeps the choice in its interface state; the language
113
107
  * changes when the player starts again (tell the user, for example "Takes
114
- * effect after restart"). Every plugin with `events` hears the change in
108
+ * effect after restart"). Every plugin after `plugin.player.subscribe()`, hears the change in
115
109
  * {@link Appearance.language}.
116
110
  *
117
- * @capability ui.theme
118
111
  * @player 0.4.3
119
112
  *
120
113
  * @param language - `"system"` or a {@link Locale}.
@@ -122,7 +115,6 @@ export interface Appearance {
122
115
  * has the new value.
123
116
  *
124
117
  * @throws `invalid` (rejects) `language` is not `"system"` or a {@link Locale}.
125
- * @throws `capability` (rejects) The manifest does not declare `ui.theme`.
126
118
  * @throws `unsupported` (rejects) A player before 0.4.3.
127
119
  *
128
120
  * @example Choose German for the next start
@@ -275,8 +267,6 @@ export type TextValue = string | Text | TextList;
275
267
  * into `locales/messages.pot`; see the
276
268
  * [i18n guide](../../../docs/guides/i18n.md).
277
269
  *
278
- * @capability None.
279
- *
280
270
  * @example Format a date the way the interface language writes it
281
271
  * The OSD shows today's date in the user's language and date format. The
282
272
  * sentence is a template the player translates; only the data in it, the
@@ -338,8 +328,6 @@ export interface I18n {
338
328
  * await plugin.osd.show("Download failed: {}", [plugin.i18n.text("Connection timed out")]);
339
329
  * ```
340
330
  *
341
- * @capability None.
342
- *
343
331
  * @since 1.5.11
344
332
  */
345
333
  text(source: string, args?: TemplateArgs): Text;
@@ -363,8 +351,6 @@ export interface I18n {
363
351
  * await plugin.osd.show("Removed missing shaders: {}", [plugin.i18n.list(missing)]);
364
352
  * ```
365
353
  *
366
- * @capability None.
367
- *
368
354
  * @since 1.5.11
369
355
  */
370
356
  list(items: readonly TextArg[], style?: ListStyle): TextList;
@@ -404,8 +390,6 @@ export interface I18n {
404
390
  * });
405
391
  * ```
406
392
  *
407
- * @capability None.
408
- *
409
393
  * @since 1.5.11
410
394
  */
411
395
  error(source: string, args?: TemplateArgs): TextError;
@@ -436,8 +420,6 @@ export interface I18n {
436
420
  * await plugin.clipboard.writeText(resolve(lines));
437
421
  * ```
438
422
  *
439
- * @capability None.
440
- *
441
423
  * @since 1.5.11
442
424
  */
443
425
  resolve(value: TextValue): string;
@@ -35,8 +35,6 @@ export type SettingsCategory = "general" | "playback" | "subtitles" | "video" |
35
35
  * Testing: `host.settingsPage(id)` of `@vestra-player/sdk/testing` has the
36
36
  * page's `props` and `emit(callback, ...args)`.
37
37
  *
38
- * @capability ui.settings
39
- *
40
38
  * @example Put two preferences on a page and keep them in a store
41
39
  * Options ▸ Video ▸ Blur shows two check boxes whose values survive
42
40
  * restarts. The checkboxes are bound two-way (`<=>`) to `in-out`
@@ -120,8 +118,6 @@ export type SettingsPage = View & Disposable & {
120
118
  * is beyond ±1,000,000.
121
119
  * @throws `host` (rejects) The file is missing or outside the package
122
120
  * directory.
123
- * @throws `capability` (rejects) The manifest does not declare
124
- * `ui.settings`.
125
121
  */
126
122
  readonly ready: Promise<void>;
127
123
  };
@@ -140,8 +136,6 @@ export type SettingsPage = View & Disposable & {
140
136
  * lays the page out and reads them. Pages are 440 logical pixels wide; the
141
137
  * window scrolls a taller page.
142
138
  *
143
- * @capability ui.settings
144
- *
145
139
  * @example Add a page that edits a stored setting
146
140
  * Options ▸ Playback ▸ Resume shows the plugin's Resume switch. `page`
147
141
  * registers the page with the Options window (compiled by the player on
@@ -176,8 +170,6 @@ export interface Settings {
176
170
  * Within a category, pages are sorted by `order`, then by plugin id and
177
171
  * page id.
178
172
  *
179
- * @capability ui.settings
180
- *
181
173
  * @param file - Path relative to the package directory, for example
182
174
  * `"ui/settings.slint"`.
183
175
  * @param options - The page's identity and place:
@@ -228,8 +220,6 @@ export interface Settings {
228
220
  * first opens, that is the page the user saw last (the player remembers
229
221
  * it), else the first one.
230
222
  *
231
- * @capability ui.settings
232
- *
233
223
  * @param pageId - The `id` of one of this plugin's pages.
234
224
  * @returns Resolves once the window is shown.
235
225
  *
@@ -237,8 +227,6 @@ export interface Settings {
237
227
  * @throws `unavailable` (rejects) The player runs without a user interface.
238
228
  * @throws `ui` (rejects) The window could not be built (for example a page
239
229
  * wrote a property its file does not declare).
240
- * @throws `capability` (rejects) The manifest does not declare
241
- * `ui.settings`.
242
230
  *
243
231
  * @example Open the plugin's page from an "Options…" button
244
232
  * The button in the plugin's window opens the Options window at the
@@ -261,11 +249,9 @@ export interface Settings {
261
249
  * The player decides when the backdrop shows: while the source is empty or
262
250
  * loading, and while ready media has no video picture (audio files). The
263
251
  * plugin decides what to draw, from {@link Player.state} and
264
- * {@link Player.stats}. With `events`, `state` follows every change; without
252
+ * {@link Player.stats}. After `plugin.player.subscribe()`, `state` follows every change; without
265
253
  * it, it refreshes only when this plugin mounts.
266
254
  *
267
- * @capability ui.mount; `events` to follow changes.
268
- *
269
255
  * @example React when a video picture appears
270
256
  * The OSD says "Video is playing" when the backdrop gives way to a video
271
257
  * picture. The player decides when the backdrop shows (nothing open,
@@ -294,8 +280,6 @@ export interface BackdropSlot {
294
280
  * Run code when a backdrop appears or disappears, or when it is shown or
295
281
  * hidden.
296
282
  *
297
- * @capability ui.mount and events
298
- *
299
283
  * @param listener - Receives the new state (`null`: no backdrop).
300
284
  * @returns A handle that removes the listener.
301
285
  *
@@ -327,10 +311,11 @@ export interface BackdropSlot {
327
311
  * A panel file exports **one component and one global**. The global is the
328
312
  * bridge: the plugin writes its properties and handles its callbacks. The
329
313
  * component lays the panel out and reads and calls the global. The split
330
- * exists because the player composes the component into its own windows: a
331
- * new instance of the component is made whenever the main window is rebuilt
332
- * or the sidebar moves to or from its floating window, while the global is
333
- * one stable address.
314
+ * exists because the player places the component in its own windows: a new
315
+ * instance of the component is made whenever the panel's place is made again
316
+ * (a column closed and opened, its fullscreen overlay, the sidebar moving to
317
+ * or from its floating window; see {@link Panel}), while the global is one
318
+ * stable address.
334
319
  *
335
320
  * A plugin mounts at most one panel per slot: a
336
321
  * playback plugin can have its control bar in `"bottom"` and its controls in
@@ -341,12 +326,10 @@ export interface BackdropSlot {
341
326
  * {@link Panels.bottom}, {@link Panels.sidebar} and {@link Panels.adjust}
342
327
  * describe the positions, whoever mounted there.
343
328
  *
344
- * @capability ui.mount
345
- *
346
329
  * @example Mount a list in the sidebar (examples/panel-menu)
347
330
  * The sidebar gets an "Example list" tab showing three rows. `mount`
348
331
  * returns at once; the SDK sends the mount with the values bound so far,
349
- * and the player rebuilds its main window with the panel. The Slint file
332
+ * and the player adds the panel as a tab. The Slint file
350
333
  * exports the component and the bridge global whose properties `bind`
351
334
  * writes.
352
335
  *
@@ -417,10 +400,10 @@ export interface Panels {
417
400
  * launches. Its strip is always drawn, so panel coordinates (drops) start
418
401
  * below it, and the bridge global's `tabbed` property, if declared, is
419
402
  * `true`. As in the sidebar, only the current tab's plugin is kept
420
- * running while the column is open, and the player compiles a panel the
421
- * first time it is shown, not at start-up.
422
- *
423
- * @capability ui.mount
403
+ * running while the column is open. The player compiles an adjust panel
404
+ * when the column opens (its first tabs, up to 4) or when the tab is first
405
+ * shown, not at the mount while the column is closed (see
406
+ * {@link Panel.ready}).
424
407
  *
425
408
  * @param slot - Where to mount the panel.
426
409
  * @param file - Path relative to the package directory, for example
@@ -584,8 +567,6 @@ export interface ConfirmOptions {
584
567
  * For anything more than a question or a path, use a {@link Windows | tool
585
568
  * window}.
586
569
  *
587
- * @capability ui.dialog
588
- *
589
570
  * @example Ask before deleting, remembering "Don't ask again"
590
571
  * Deleting asks for confirmation with a "Don't ask again" box; once the
591
572
  * user ticks it, later deletes go ahead without asking. `confirm` resolves with the button and the checkbox when the
@@ -643,8 +624,6 @@ export interface Dialogs {
643
624
  * Remembering "Don't ask again" is up to the plugin (see
644
625
  * {@link Scope.storage}).
645
626
  *
646
- * @capability ui.dialog
647
- *
648
627
  * @param options - The text and buttons; see {@link ConfirmOptions}.
649
628
  * @returns The answer: `confirmed` is `true` when the user picked the
650
629
  * confirm button (Escape, the cancel button or closing the dialog give
@@ -657,7 +636,6 @@ export interface Dialogs {
657
636
  * @throws `unavailable` (rejects) The player runs without a user interface.
658
637
  * @throws `unsupported` (rejects) Only players before the confirmation
659
638
  * drawn in the player, on a system other than macOS and Windows.
660
- * @throws `capability` (rejects) The manifest does not declare `ui.dialog`.
661
639
  *
662
640
  * @example Confirm before replacing the playlist
663
641
  * The user sees "Replace the current playlist?" with a Replace button and
@@ -688,15 +666,12 @@ export interface Dialogs {
688
666
  /**
689
667
  * Ask the user for one file to open.
690
668
  *
691
- * @capability ui.dialog
692
- *
693
669
  * @param options - `title`: the dialog's title, at most 256 bytes.
694
670
  * @returns The absolute path, or `null` when the user cancelled.
695
671
  *
696
672
  * @throws `busy` (rejects) Another dialog is open.
697
673
  * @throws `unavailable` (rejects) The player runs without a user interface.
698
674
  * @throws `invalid` (rejects) `title` is longer than 256 bytes.
699
- * @throws `capability` (rejects) The manifest does not declare `ui.dialog`.
700
675
  *
701
676
  * @example Let the user pick a subtitle file
702
677
  * The system's Open dialog appears titled "Choose a subtitle file" and
@@ -716,15 +691,12 @@ export interface Dialogs {
716
691
  /**
717
692
  * Ask the user for one or more files to open.
718
693
  *
719
- * @capability ui.dialog
720
- *
721
694
  * @param options - `title`: the dialog's title, at most 256 bytes.
722
695
  * @returns The absolute paths, or `[]` when the user cancelled.
723
696
  *
724
697
  * @throws `busy` (rejects) Another dialog is open.
725
698
  * @throws `unavailable` (rejects) The player runs without a user interface.
726
699
  * @throws `invalid` (rejects) `title` is longer than 256 bytes.
727
- * @throws `capability` (rejects) The manifest does not declare `ui.dialog`.
728
700
  *
729
701
  * @example Let the user pick several files at once
730
702
  * The Open dialog allows selecting several files; the OSD says how many
@@ -744,15 +716,12 @@ export interface Dialogs {
744
716
  /**
745
717
  * Ask the user for a folder.
746
718
  *
747
- * @capability ui.dialog
748
- *
749
719
  * @param options - `title`: the dialog's title, at most 256 bytes.
750
720
  * @returns The absolute path, or `null` when the user cancelled.
751
721
  *
752
722
  * @throws `busy` (rejects) Another dialog is open.
753
723
  * @throws `unavailable` (rejects) The player runs without a user interface.
754
724
  * @throws `invalid` (rejects) `title` is longer than 256 bytes.
755
- * @throws `capability` (rejects) The manifest does not declare `ui.dialog`.
756
725
  *
757
726
  * @example Let the user choose a folder for snapshots
758
727
  * The system's folder dialog appears titled "Save snapshots in". It
@@ -775,8 +744,6 @@ export interface Dialogs {
775
744
  * @remarks
776
745
  * The dialog only returns a path; writing the file is up to the plugin.
777
746
  *
778
- * @capability ui.dialog
779
- *
780
747
  * @param options - `title`: the dialog's title, at most 256 bytes.
781
748
  * `fileName`: the proposed file name (a plain name without `/` or `\`,
782
749
  * at most 256 bytes).
@@ -786,7 +753,6 @@ export interface Dialogs {
786
753
  * @throws `unavailable` (rejects) The player runs without a user interface.
787
754
  * @throws `invalid` (rejects) `title` is too long, or `fileName` is too long
788
755
  * or contains `/` or `\`.
789
- * @throws `capability` (rejects) The manifest does not declare `ui.dialog`.
790
756
  *
791
757
  * @example Ask where to save a snapshot
792
758
  * The system's Save dialog proposes "frame.png" and returns where the
@@ -821,12 +787,10 @@ export interface Dialogs {
821
787
  * several plugins have one, they are stacked from top to bottom. `dispose()`,
822
788
  * disposing the scope or stopping the plugin removes it.
823
789
  *
824
- * @capability ui.osd
825
- *
826
790
  * @example Show live playback numbers over the video
827
791
  * A block over the video shows the position and the duration, updated
828
792
  * as playback moves. `player.onChange` runs after the SDK updated the
829
- * state (with `events`); `set` never throws and sends only the newest
793
+ * state (after `plugin.player.subscribe()`); `set` never throws and sends only the newest
830
794
  * text while one is in flight, so calling it on every change is fine.
831
795
  * ```ts
832
796
  * const info = plugin.osd.panel();
@@ -847,10 +811,7 @@ export interface OsdPanel extends Disposable {
847
811
  * Latest value wins: calling it on every state change is fine, the same
848
812
  * text is not sent twice and only the newest text is sent while a write is
849
813
  * in flight. Never throws; a failed write goes to {@link Scope.onError}
850
- * (`invalid` for too much text, `unavailable` without a user interface,
851
- * `capability` without `ui.osd`).
852
- *
853
- * @capability ui.osd
814
+ * (`invalid` for too much text, `unavailable` without a user interface).
854
815
  *
855
816
  * @param text - The text, with `\n` between lines: at most 32 lines and
856
817
  * 4096 bytes once translated and formatted. `null` hides the block. A
@@ -917,8 +878,6 @@ export interface OsdPanelOptions {
917
878
  * [Limits: on-screen display](../../../docs/reference/limits.md#on-screen-display)
918
879
  * ({@link "@vestra-player/sdk/testing"!OSD_LIMITS | OSD_LIMITS}).
919
880
  *
920
- * @capability ui.osd
921
- *
922
881
  * @example Show on-screen messages the user can turn off
923
882
  * "Blur on" appears over the video unless the user turned messages off in
924
883
  * the plugin's settings. `osd.show` asks the player to draw the text for a
@@ -953,8 +912,6 @@ export interface Osd {
953
912
  * a {@link TextList} of texts; `text` may also be a `Text` (then without
954
913
  * `args`).
955
914
  *
956
- * @capability ui.osd
957
- *
958
915
  * @param text - The template, 1–200 characters once translated and formatted;
959
916
  * line breaks become spaces. With `options.actions` the message ends in up to
960
917
  * two buttons, each running one of the plugin's own commands
@@ -970,7 +927,6 @@ export interface Osd {
970
927
  * or there are more than 2 actions, a title is empty or longer than 40
971
928
  * characters once translated, or a command is not one of the plugin's.
972
929
  * @throws `unavailable` (rejects) The player runs without a user interface.
973
- * @throws `capability` (rejects) The manifest does not declare `ui.osd`.
974
930
  *
975
931
  * @example Confirm an action and show a value
976
932
  * The OSD shows "Bookmark added", then "Speed 1.5×" in the user's
@@ -1011,8 +967,6 @@ export interface Osd {
1011
967
  * Nothing is shown until {@link OsdPanel.set}. A plugin has one block;
1012
968
  * dispose it before creating another.
1013
969
  *
1014
- * @capability ui.osd
1015
- *
1016
970
  * @returns An {@link OsdPanel} owned by this scope.
1017
971
  *
1018
972
  * @throws `Error` without a code (throws) This plugin already has a block.
@@ -25,7 +25,7 @@ export class LayoutService {
25
25
  await this.read();
26
26
  }
27
27
  start() {
28
- if (this.#started || !this.#runtime.can("ui.mount"))
28
+ if (this.#started)
29
29
  return;
30
30
  this.#started = true;
31
31
  // A mirror: panels listen through `watch`.
@@ -207,8 +207,6 @@ class OwnedSettings {
207
207
  }
208
208
  function owned(scope, kind, what) {
209
209
  const runtime = scope.runtime;
210
- if (!runtime.can("processing.video"))
211
- throw failure("capability", "processing.video must be declared in manifest");
212
210
  if (runtime.services.has(kind.service))
213
211
  throw new Error(`a plugin has one ${what}; reuse it`);
214
212
  runtime.services.set(kind.service, true);
@@ -4,7 +4,7 @@ import type { WindowFacts } from "../wire.ts";
4
4
  import type { MainWindow, WindowState } from "./types.ts";
5
5
  /**
6
6
  * One per plugin: read before activation, then kept current from
7
- * `window.state` events (with `events`) and after this plugin's own changes.
7
+ * `window.state` events (after `plugin.player.subscribe()`) and after this plugin's own changes.
8
8
  */
9
9
  export declare class WindowService {
10
10
  #private;
@@ -15,7 +15,7 @@ const view = (facts) => Object.freeze({
15
15
  });
16
16
  /**
17
17
  * One per plugin: read before activation, then kept current from
18
- * `window.state` events (with `events`) and after this plugin's own changes.
18
+ * `window.state` events (after `plugin.player.subscribe()`) and after this plugin's own changes.
19
19
  */
20
20
  export class WindowService {
21
21
  #runtime;
@@ -6,8 +6,7 @@
6
6
  * out access to it, and is the only file under `src/plugin/` that sends a
7
7
  * request by a method name it was given (`scripts/check-layers.mjs`, rule 7).
8
8
  *
9
- * - `request`: `Connection.request`, the transport as is; the player
10
- * checks capabilities. The subscriptions are guarded, refused with
9
+ * - `request`: `Connection.request`, the transport as is. The subscriptions are guarded, refused with
11
10
  * `invalid`: `events.subscribe` and `events.unsubscribe` of a
12
11
  * `HostEvent` (the SDK owns those subscriptions and their marks; `on`
13
12
  * covers them), and `events.subscribe` of any other event without
@@ -14,7 +14,7 @@ import type { Transport } from "./wire.ts";
14
14
  * and turned a quarter clockwise. The nodes run in array order; `set` sends
15
15
  * the whole chain as this plugin's desired value (last write wins), and the
16
16
  * player applies it to every source until it changes, needing
17
- * `processing.video`, `playback.read` and `events`.
17
+ * `plugin.player.subscribe()` and `plugin.player.read()`.
18
18
  * ```ts
19
19
  * const chain: VideoNode[] = [
20
20
  * // Live fields: moving them later changes the picture in place.
@@ -306,8 +306,7 @@ export declare const VIDEO_PROCESSING_LIMITS: Readonly<{
306
306
  * Speech around 1 kHz is 3 dB louder and both speakers play the same mixed
307
307
  * channel. `set` sends this plugin's whole audio chain (the nodes in order,
308
308
  * plus an optional `delayMs`); the player joins it with other plugins'
309
- * chains and applies it to every source (`processing.audio`,
310
- * `playback.read`, `events`).
309
+ * chains and applies it to every source.
311
310
  * ```ts
312
311
  * plugin.audio.filter("sound").set({
313
312
  * nodes: [
@@ -0,0 +1,14 @@
1
+ /** The plugin API version this SDK implements (`manifest.apiVersion`). */
2
+ export declare const API_VERSION = "vestra/1";
3
+ /**
4
+ * The longest message a plugin may send the player, in UTF-8 bytes of one
5
+ * protocol line with its newline (1 MiB). The player stops a plugin that
6
+ * writes a longer one, so the plugin's side refuses such a request before
7
+ * sending it: it rejects with code `limit`. Property values meet
8
+ * {@link UI_VALUE_LIMITS} before this.
9
+ *
10
+ * @since 1.5.14
11
+ *
12
+ * @category Testing
13
+ */
14
+ export declare const MESSAGE_LIMIT: number;
@@ -0,0 +1,14 @@
1
+ /** The plugin API version this SDK implements (`manifest.apiVersion`). */
2
+ export const API_VERSION = "vestra/1";
3
+ /**
4
+ * The longest message a plugin may send the player, in UTF-8 bytes of one
5
+ * protocol line with its newline (1 MiB). The player stops a plugin that
6
+ * writes a longer one, so the plugin's side refuses such a request before
7
+ * sending it: it rejects with code `limit`. Property values meet
8
+ * {@link UI_VALUE_LIMITS} before this.
9
+ *
10
+ * @since 1.5.14
11
+ *
12
+ * @category Testing
13
+ */
14
+ export const MESSAGE_LIMIT = 1024 * 1024;
@@ -15,7 +15,7 @@
15
15
  * same queue: tests see the same waiting.
16
16
  */
17
17
  import { HostError } from "./wire.js";
18
- import { MESSAGE_LIMIT } from "./capabilities.js";
18
+ import { MESSAGE_LIMIT } from "./protocol.js";
19
19
  import { abortError } from "./plugin/errors.js";
20
20
  /**
21
21
  * How much of the plugin's traffic the SDK keeps in flight, documented in
@@ -26,7 +26,7 @@ export type SubtitleStamp = {
26
26
  * bottom of the video, and appear 250 ms earlier. `refresh` reads the
27
27
  * subtitle state from the player, whose `fonts` lists the font ids a style
28
28
  * may name; `setStyle` then sends this plugin's style layer
29
- * (`subtitles.control`, `subtitles.read`). It shows unless another plugin
29
+ *. It shows unless another plugin
30
30
  * with a manifest id that sorts later has a layer too: the player picks the
31
31
  * effective layer by manifest id, not by which call came last.
32
32
  * ```ts
@@ -1,26 +1,19 @@
1
1
  /**
2
- * The TypeScript language-service plugin `@vestra-player/sdk/ts-plugin`: the
3
- * capability checker of `vestra-plugin check` in the editor. A use of an API
4
- * member whose capability `manifest.json` does not declare is an error at the
5
- * member, with the quick fix "Add '<capability>' to manifest.json". A call
6
- * whose capability depends on a name the checker cannot read
7
- * (`plugin.wire.request(method)` with a computed method) is a warning
8
- * (`CAPABILITY_UNCHECKED`).
9
- *
10
- * A project enables it in its tsconfig.json:
2
+ * The TypeScript language-service plugin `@vestra-player/sdk/ts-plugin`.
3
+ * Up to 1.8 it showed the capability checker's findings in the editor, with
4
+ * the quick fix "Add '<capability>' to manifest.json". SDK 1.9.0 removed
5
+ * manifest capabilities, and with them the checker: the plugin now changes
6
+ * nothing and is kept only so that a tsconfig.json that lists it
11
7
  *
12
8
  * { "compilerOptions": { "plugins": [{ "name": "@vestra-player/sdk/ts-plugin" }] } }
13
9
  *
14
- * The editor must run the project's own TypeScript (VS Code: "TypeScript:
15
- * Select TypeScript Version" → "Use Workspace Version"); `tsc` ignores
16
- * language-service plugins, which is why `vestra-plugin check` runs the same
17
- * checker. The manifest is the nearest `manifest.json` above the file; files
18
- * in its `tests/`, `node_modules/`, `dist/` and `vendor/` are not checked.
10
+ * still loads without an error in the TypeScript server's log. Remove the
11
+ * entry; a later major version removes the module.
19
12
  *
20
13
  * @internal
21
14
  */
22
15
  import type TS from "typescript";
23
16
  /** @internal The plugin factory tsserver calls (`ts-plugin/index.js`). */
24
- export default function init(modules: {
17
+ export default function init(_modules: {
25
18
  typescript: typeof TS;
26
19
  }): TS.server.PluginModule;