@vestra-player/sdk 1.10.1 → 1.11.0-rc.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (60) hide show
  1. package/CHANGELOG.md +21 -0
  2. package/bin/vestra-plugin.mjs +1 -131
  3. package/dist/api-requests.d.ts +1 -1
  4. package/dist/api-requests.js +9 -2
  5. package/dist/docs-tree.json.gz +0 -0
  6. package/dist/manifest.d.ts +0 -5
  7. package/dist/manifest.js +1 -8
  8. package/dist/mpv.js +1 -1
  9. package/dist/plugin/appearance.d.ts +2 -2
  10. package/dist/plugin/appearance.js +3 -3
  11. package/dist/plugin/connection.d.ts +38 -28
  12. package/dist/plugin/connection.js +101 -98
  13. package/dist/plugin/index.js +8 -6
  14. package/dist/plugin/passes.js +1 -1
  15. package/dist/plugin/player/events.d.ts +18 -9
  16. package/dist/plugin/player/events.js +36 -11
  17. package/dist/plugin/player.d.ts +31 -28
  18. package/dist/plugin/player.js +42 -68
  19. package/dist/plugin/scope.d.ts +2 -9
  20. package/dist/plugin/scope.js +21 -27
  21. package/dist/plugin/subtitles.d.ts +6 -1
  22. package/dist/plugin/subtitles.js +18 -2
  23. package/dist/plugin/testing/commands.js +1 -1
  24. package/dist/plugin/testing/facts.d.ts +46 -0
  25. package/dist/plugin/testing/facts.js +106 -0
  26. package/dist/plugin/testing/index.d.ts +12 -14
  27. package/dist/plugin/testing/index.js +52 -18
  28. package/dist/plugin/testing/media.js +6 -0
  29. package/dist/plugin/testing/revoke.d.ts +15 -0
  30. package/dist/plugin/testing/revoke.js +13 -0
  31. package/dist/plugin/testing/transport.js +8 -0
  32. package/dist/plugin/timeline.d.ts +2 -2
  33. package/dist/plugin/timeline.js +3 -3
  34. package/dist/plugin/types/base.d.ts +15 -15
  35. package/dist/plugin/types/commands.d.ts +8 -8
  36. package/dist/plugin/types/playback.d.ts +240 -116
  37. package/dist/plugin/types/plugin-wire.d.ts +2 -2
  38. package/dist/plugin/types/processing.d.ts +2 -3
  39. package/dist/plugin/types/subtitles.d.ts +9 -8
  40. package/dist/plugin/types/ui-layout.d.ts +32 -17
  41. package/dist/plugin/types/ui-locale.d.ts +9 -9
  42. package/dist/plugin/types/ui-shell.d.ts +7 -6
  43. package/dist/plugin/view/layout.d.ts +33 -1
  44. package/dist/plugin/view/layout.js +63 -34
  45. package/dist/plugin/window.d.ts +9 -1
  46. package/dist/plugin/window.js +14 -2
  47. package/dist/processing.d.ts +2 -2
  48. package/dist/request-queue.d.ts +7 -3
  49. package/dist/request-queue.js +19 -5
  50. package/dist/ts-plugin.d.ts +3 -4
  51. package/dist/ts-plugin.js +1 -1
  52. package/dist/wire.d.ts +1 -1
  53. package/dist/wire.js +1 -1
  54. package/llms.txt +3 -3
  55. package/package.json +2 -4
  56. package/capability-scan.json +0 -389
  57. package/dist/capability-scan.d.ts +0 -95
  58. package/dist/capability-scan.js +0 -249
  59. package/dist/member-uses.d.ts +0 -61
  60. package/dist/member-uses.js +0 -160
@@ -70,7 +70,6 @@ import { join } from "node:path";
70
70
  import { fileURLToPath } from "node:url";
71
71
  import { HostError } from "../../wire.js";
72
72
  import { BAR_BUTTON_ICONS, BAR_BUTTON_LIMITS, BUILTIN_COMMANDS, BUILTIN_SUBMENUS, COMMAND_LIMITS, MENU_IDS, } from "../../commands.js";
73
- import { CAPABILITIES_REMOVED } from "../../manifest.js";
74
73
  import { MESSAGE_LIMIT } from "../../protocol.js";
75
74
  import { OSD_LIMITS } from "../osd.js";
76
75
  import { TIMELINE_LIMITS } from "../timeline.js";
@@ -86,6 +85,8 @@ import { createPlugin } from "../index.js";
86
85
  import { PATCH_FEATURE } from "../patch.js";
87
86
  import { LOCALES, LIST_SEPARATORS, loadPackageCatalog, TEXT_LIMITS, } from "../../i18n.js";
88
87
  import { Internals } from "./internals.js";
88
+ import { sendFacts } from "./facts.js";
89
+ import { revokeRun, revokers } from "./revoke.js";
89
90
  import { on, emit, settle, close, keepsRunning, transportHandlers, tick, takenErrors, tellResidency, } from "./transport.js";
90
91
  import { bindingClaims, bindingKey, keysChanged, press, barButtons, commandsHandlers, builtinHandlers, runPaletteLead, } from "./commands.js";
91
92
  import { registerCoreActions, windowFacts, coreActionsHandlers, } from "./core-actions.js";
@@ -484,8 +485,8 @@ export class TestHost {
484
485
  *
485
486
  * @example Simulate the user choosing French for the next start
486
487
  * The plugin hears that the saved interface language changed. The host
487
- * pushes `appearance.changed`, which a plugin sees (after `plugin.player.subscribe()`) in
488
- * `appearance.language` once it has read it and subscribed; this run's
488
+ * pushes `appearance.changed`, which a plugin that listens to it sees in
489
+ * `appearance.language`; this run's
489
490
  * language does not change.
490
491
  * ```ts
491
492
  * import assert from "node:assert/strict";
@@ -717,8 +718,8 @@ export class TestHost {
717
718
  * @example Let another plugin publish chapters
718
719
  * The plugin under test sees two chapter marks another plugin put on the
719
720
  * timeline. `setTimelineLayer` stores that plugin's whole layer and pushes
720
- * `timeline.changed`; once the plugin uses `plugin.timeline` (after
721
- * `plugin.player.subscribe()`) the SDK keeps `marks` current from that event, and `settle()`
721
+ * `timeline.changed`; while the plugin listens to it the SDK keeps
722
+ * `marks` current from that event, and `settle()`
722
723
  * lets it arrive.
723
724
  * ```ts
724
725
  * import assert from "node:assert/strict";
@@ -824,7 +825,7 @@ export class TestHost {
824
825
  *
825
826
  * @example Simulate another plugin switching to the light palette
826
827
  * The plugin hears the palette change. The host updates `appearance` and
827
- * pushes `appearance.changed` to a plugin that listens (after `plugin.player.subscribe()`).
828
+ * pushes `appearance.changed` to a plugin that listens.
828
829
  * ```ts
829
830
  * import assert from "node:assert/strict";
830
831
  * declare const host: TestHost;
@@ -1829,6 +1830,7 @@ export class TestHost {
1829
1830
  * pass it to {@link startPlugin} as `host`.
1830
1831
  */
1831
1832
  constructor() {
1833
+ revokers.set(this, () => this.#revoke());
1832
1834
  this.subtitles = {
1833
1835
  presentation: {
1834
1836
  revision: 1,
@@ -1925,7 +1927,7 @@ export class TestHost {
1925
1927
  * The plugin is built into the player (`startPlugin`'s `builtin`). Only
1926
1928
  * then does the host answer the built-in-only requests
1927
1929
  * (`commands.list`, `commands.run`, `palette.lead.*`); otherwise they
1928
- * fail with `capability`, as in the player.
1930
+ * fail with `builtin-only`, as in the player.
1929
1931
  *
1930
1932
  * @since 1.7.9
1931
1933
  */
@@ -1942,7 +1944,7 @@ export class TestHost {
1942
1944
  * oldest first: the files and the process id answered
1943
1945
  * ({@link "@vestra-player/sdk"!App.openWindow | App.openWindow}). No
1944
1946
  * process starts. A
1945
- * plugin that is not built in is refused with `capability`, as in the
1947
+ * plugin that is not built in is refused with `builtin-only`, as in the
1946
1948
  * player; the files are checked as the player does (`invalid`,
1947
1949
  * `missing`).
1948
1950
  *
@@ -2058,6 +2060,8 @@ export class TestHost {
2058
2060
  const work = Promise.resolve(handler(record));
2059
2061
  // `disconnect()` fails the requests still waiting, as the runner does.
2060
2062
  work.catch(() => { });
2063
+ // The facts the request changed go out once it is handled (`facts.ts`).
2064
+ void work.then(() => sendFacts(this), () => { });
2061
2065
  return (await Promise.race([work, this.#inner.gone]));
2062
2066
  }
2063
2067
  finally {
@@ -2135,7 +2139,7 @@ export class TestHost {
2135
2139
  * Deliver a host event to the plugin. Like the player, subscription-based
2136
2140
  * events (`source.state`, `playback.backend`, `window.state`,
2137
2141
  * `timeline.changed`, `appearance.changed`) are delivered only when the
2138
- * plugin subscribed (it called `plugin.player.subscribe()` and listens). Most tests use the
2142
+ * plugin subscribed (something of it listens). Most tests use the
2139
2143
  * higher-level helpers (`setSource`, `setMainWindow`, ...) instead.
2140
2144
  *
2141
2145
  * @param event - The wire event name.
@@ -2924,6 +2928,34 @@ export class TestHost {
2924
2928
  upgrade(activate) {
2925
2929
  return upgrade(this, this.#inner, activate);
2926
2930
  }
2931
+ /** See {@link revokeRun}: each through the host's own handler. */
2932
+ #revoke() {
2933
+ const run = (method, params) => {
2934
+ try {
2935
+ void Promise.resolve(this.#defaults[method]?.(params)).catch(() => { });
2936
+ }
2937
+ catch {
2938
+ // Already gone.
2939
+ }
2940
+ };
2941
+ for (const id of [...this.windows.keys()])
2942
+ run("ui.close", { id });
2943
+ if (this.panels.size)
2944
+ run("ui.unmount", {});
2945
+ for (const id of [...this.commands.keys()])
2946
+ run("commands.unregister", { id });
2947
+ for (const id of [...this.settings.pages.keys()])
2948
+ run("settings.unregister", { id });
2949
+ for (const id of [...this.resolvers.keys()])
2950
+ run("sourceResolvers.unregister", { id });
2951
+ if (this.sequence !== null)
2952
+ run("sequence.set", { flags: null });
2953
+ for (const [producerId, producer] of this.producers)
2954
+ if (!producer.released)
2955
+ run("producer.release", { producerId });
2956
+ // Its processing chains (filters) are withdrawn.
2957
+ this.processing.resources.clear();
2958
+ }
2927
2959
  #defaults = {
2928
2960
  ...triggersHandlers(this, this.#inner),
2929
2961
  ...transportHandlers(this, this.#inner),
@@ -2949,13 +2981,11 @@ export class TestHost {
2949
2981
  * The manifest id comes from `directory/manifest.json` unless `id` is
2950
2982
  * given; then no manifest is read (and without `directory` none is read
2951
2983
  * either: the id is `"test.plugin"`). Nothing in the manifest changes how
2952
- * the plugin runs: event delivery and the start-up reads are the plugin's
2953
- * own calls (`plugin.player.subscribe()`, `plugin.player.read()`), as in
2954
- * the player.
2984
+ * the plugin runs: the start-up read is the plugin's own call
2985
+ * (`plugin.player.read()`), and an event reaches it from its first
2986
+ * listener, as in the player.
2955
2987
  *
2956
- * Rejects when `manifest.json` cannot be read or parsed, when it still has
2957
- * `capabilities` (removed in 1.9.0; the message says what to call
2958
- * instead), when `activate`
2988
+ * Rejects when `manifest.json` cannot be read or parsed, when `activate`
2959
2989
  * throws, or when a registration made during activation fails (for example
2960
2990
  * `limit`, `conflict`, `invalid`). Stricter than the player's runner for
2961
2991
  * commands: there the SDK logs a command declaration the player refuses during
@@ -3031,9 +3061,6 @@ export async function startPlugin(activate, options = {}) {
3031
3061
  let manifest = { id: options.id ?? "test.plugin" };
3032
3062
  if (options.directory && options.id === undefined) {
3033
3063
  const read = JSON.parse(readFileSync(join(directory, "manifest.json"), "utf8"));
3034
- // As `vestra-plugin check` and the player: the field is gone.
3035
- if (read && typeof read === "object" && "capabilities" in read)
3036
- throw new Error(CAPABILITIES_REMOVED);
3037
3064
  manifest = { id: read.id };
3038
3065
  }
3039
3066
  host.manifestId = manifest.id;
@@ -3084,6 +3111,9 @@ export async function startPlugin(activate, options = {}) {
3084
3111
  triggers.stop = async (reason) => {
3085
3112
  await instance.dispose({ reason });
3086
3113
  await host.settle();
3114
+ // Standby and an upgrade stop the run: the player revokes what it held.
3115
+ revokeRun(host);
3116
+ await host.settle();
3087
3117
  };
3088
3118
  await host.settle();
3089
3119
  tellResidency(host);
@@ -3106,6 +3136,8 @@ export async function startPlugin(activate, options = {}) {
3106
3136
  if (!triggers.parked)
3107
3137
  await instance.dispose({ reason });
3108
3138
  await host.settle();
3139
+ revokeRun(host);
3140
+ await host.settle();
3109
3141
  host.close();
3110
3142
  };
3111
3143
  return {
@@ -3132,6 +3164,8 @@ export async function startPlugin(activate, options = {}) {
3132
3164
  host.loseConnection();
3133
3165
  await instance.dispose({ reason: "host-lost" });
3134
3166
  await host.settle();
3167
+ revokeRun(host);
3168
+ await host.settle();
3135
3169
  host.close();
3136
3170
  },
3137
3171
  };
@@ -13,6 +13,7 @@ import { isTextValue } from "../../i18n.js";
13
13
  import { taken } from "./transport.js";
14
14
  import { declaredText, hostText } from "./i18n.js";
15
15
  import { timelineChanged } from "./layout.js";
16
+ import { sendFacts, tracksChanged } from "./facts.js";
16
17
  import { sourceEvents } from "./source-events.js";
17
18
  /**
18
19
  * Broadcast the source state `host.source` became from `previous`, then
@@ -23,6 +24,11 @@ export function emitSource(host, previous, reload = false) {
23
24
  host.emit("source.state", host.source);
24
25
  for (const [name, data] of sourceEvents(previous, host.source, reload))
25
26
  host.emit(name, structuredClone(data));
27
+ const tracks = tracksChanged(previous, host.source);
28
+ if (tracks)
29
+ host.emit("audio.tracks.changed", structuredClone(tracks));
30
+ // The other facts after the source's events (`facts.ts`).
31
+ sendFacts(host);
26
32
  }
27
33
  export function initialSource() {
28
34
  return {
@@ -0,0 +1,15 @@
1
+ /**
2
+ * Internal to the SDK; not exported from `@vestra-player/sdk/testing`.
3
+ */
4
+ import type { TestHost } from "./index.ts";
5
+ /**
6
+ * What the player undoes by itself when a plugin's run stops (SDK 1.11.0):
7
+ * the plugin's own cleanup requests are not sent after `runtime.stop`
8
+ * (`RequestQueue.close`), so the test host revokes what the run held, as
9
+ * the player does (its stop revokes the run's windows, panels, commands,
10
+ * settings pages, resolvers, sequence provider, streams and filter
11
+ * chains). By host.
12
+ */
13
+ export declare const revokers: WeakMap<TestHost, () => void>;
14
+ /** Revoke what the plugin's run held (`startPlugin`'s `stop`). */
15
+ export declare function revokeRun(host: TestHost): void;
@@ -0,0 +1,13 @@
1
+ /**
2
+ * What the player undoes by itself when a plugin's run stops (SDK 1.11.0):
3
+ * the plugin's own cleanup requests are not sent after `runtime.stop`
4
+ * (`RequestQueue.close`), so the test host revokes what the run held, as
5
+ * the player does (its stop revokes the run's windows, panels, commands,
6
+ * settings pages, resolvers, sequence provider, streams and filter
7
+ * chains). By host.
8
+ */
9
+ export const revokers = new WeakMap();
10
+ /** Revoke what the plugin's run held (`startPlugin`'s `stop`). */
11
+ export function revokeRun(host) {
12
+ revokers.get(host)?.();
13
+ }
@@ -10,6 +10,7 @@ import { rmSync } from "node:fs";
10
10
  import { HostError } from "../../wire.js";
11
11
  import { WAKE_EVENTS } from "../connection.js";
12
12
  import { hearEvent } from "./triggers.js";
13
+ import { sendFacts } from "./facts.js";
13
14
  export const tick = () => new Promise((resolve) => setImmediate(resolve));
14
15
  /**
15
16
  * Refusals for a position or resolver another plugin holds: not activation
@@ -50,6 +51,13 @@ export function on(_host, inner, event, listener) {
50
51
  }
51
52
  /** Implements `TestHost.emit`. */
52
53
  export function emit(host, inner, event, data) {
54
+ deliver(host, inner, event, data);
55
+ // The window's and the layout's facts follow a `window.state`, whether
56
+ // the plugin hears it or not (`facts.ts`).
57
+ if (event === "window.state")
58
+ sendFacts(host, event);
59
+ }
60
+ function deliver(host, inner, event, data) {
53
61
  // Trigger conditions first (the player evaluates them before it sends
54
62
  // the state); a parked plugin hears nothing, a wake event wakes it.
55
63
  if (hearEvent(host, inner, event, data))
@@ -40,8 +40,8 @@ export declare const TIMELINE_LIMITS: Readonly<{
40
40
  }>;
41
41
  /**
42
42
  * One per plugin: read by `plugin.player.read()`, then kept
43
- * current from `timeline.changed` (after `plugin.player.subscribe()`) once the plugin uses it
44
- * (or listens to that event with `player.on`).
43
+ * current from `timeline.changed` while the plugin listens to that event
44
+ * (`player.on`), and after this plugin's own changes.
45
45
  */
46
46
  export declare class TimelineService {
47
47
  #private;
@@ -52,8 +52,8 @@ const viewRanges = (ranges) => Object.freeze(ranges.map((range) => Object.freeze
52
52
  })));
53
53
  /**
54
54
  * One per plugin: read by `plugin.player.read()`, then kept
55
- * current from `timeline.changed` (after `plugin.player.subscribe()`) once the plugin uses it
56
- * (or listens to that event with `player.on`).
55
+ * current from `timeline.changed` while the plugin listens to that event
56
+ * (`player.on`), and after this plugin's own changes.
57
57
  */
58
58
  export class TimelineService {
59
59
  #runtime;
@@ -78,7 +78,7 @@ export class TimelineService {
78
78
  this.accept(lists);
79
79
  else
80
80
  void this.read();
81
- }, "events", true);
81
+ }, "held", true);
82
82
  }
83
83
  accept(lists) {
84
84
  const marks = view(lists.marks);
@@ -48,8 +48,8 @@ import type { Wire } from "./plugin-wire.ts";
48
48
  * disposing it removes just that listener, before the scope that owns it
49
49
  * ends.
50
50
  * ```ts
51
- * const subscription = plugin.player.onChange((state) => {
52
- * if (state.phase === "ready") void subscription.dispose();
51
+ * const subscription = plugin.player.on("source.ready", () => {
52
+ * void subscription.dispose(); // heard once
53
53
  * });
54
54
  * ```
55
55
  *
@@ -94,7 +94,7 @@ export interface Disposable {
94
94
  * | code | meaning |
95
95
  * | --- | --- |
96
96
  * | `stale` | A condition no longer held (the source or the subtitle selection changed); nothing was done. See {@link Conditional}. |
97
- * | `capability` | The call is for the player's built-in plugins only (`commands.list`, `commands.run`, `palette.lead`, `app.openWindow`) and this plugin is not one. |
97
+ * | `builtin-only` | The call is for the player's built-in plugins only (`commands.list`, `commands.run`, `palette.lead`, `app.openWindow`) and this plugin is not one. |
98
98
  * | `invalid` | A bad argument (out of range, malformed, unknown id). |
99
99
  * | `missing` | The target does not exist (an empty panel position, a missing file, an unknown command). |
100
100
  * | `busy` | The player is still doing a previous call of the same kind (a dialog is open, a step is in flight). |
@@ -230,9 +230,8 @@ export interface Scope extends Disposable {
230
230
  /**
231
231
  * Video processing: this plugin's filter chain, the display layer, the
232
232
  * GPU render options, this plugin's shaders, the GPU's video upscaler and
233
- * motion smoothing. The filter chain follows the player: call
234
- * `plugin.player.subscribe()` and `plugin.player.read()` first (without `subscribe()` the SDK never sees
235
- * the media become ready and the chain stays `waiting`).
233
+ * motion smoothing. The filter chain follows the player by itself while
234
+ * it exists (it applies when a video becomes ready).
236
235
  */
237
236
  readonly video: {
238
237
  /**
@@ -574,7 +573,7 @@ export interface Scope extends Disposable {
574
573
  * // ---cut---
575
574
  * const st = plugin.state({ video: null as boolean | null });
576
575
  * bar.bind(() => ({ keyframes: st.video === true })); // reads st.video
577
- * plugin.player.onChange((state) => {
576
+ * plugin.player.on("source.ready", ({ state }) => {
578
577
  * if (state.source === null) return;
579
578
  * void hasVideo(state.source).then((video) => (st.video = video)); // re-runs the bind above
580
579
  * });
@@ -819,9 +818,9 @@ export interface WindowState {
819
818
  /**
820
819
  * The player's main window: read it, change it.
821
820
  *
822
- * After `plugin.player.subscribe()`, `state` follows the window from the first read or
823
- * `onChange`; without it, it updates only at start and after this plugin's
824
- * `setVideoArea`.
821
+ * `state` is read at start; it follows the window while an `onChange`
822
+ * listener exists, and takes each `window.changed` a `player.on` listener
823
+ * hears; otherwise it updates only after this plugin's `setVideoArea`.
825
824
  *
826
825
  * @example Resize the window to the video's own size
827
826
  * Screen ▸ Original size makes the video area as many logical points as
@@ -856,12 +855,13 @@ export interface MainWindow {
856
855
  /** Latest state; zero video area without a native window. */
857
856
  readonly state: WindowState;
858
857
  /**
859
- * The window state changed (outside changes after `plugin.player.subscribe()`).
858
+ * The window state changed, here or elsewhere (the listener keeps the
859
+ * plugin running; `window.changed` with {@link Player.on} does not).
860
860
  *
861
861
  * @example Fit a panel to fullscreen
862
862
  * The plugin's panel uses larger text while the player is fullscreen. The
863
863
  * listener runs after the SDK updated `state` from the player's events
864
- * (after `plugin.player.subscribe()`; without it only after this plugin's own changes).
864
+ * while it listens.
865
865
  * ```ts
866
866
  * declare const bar: Panel;
867
867
  * // ---cut---
@@ -1104,7 +1104,7 @@ export interface App extends AppInfo {
1104
1104
  *
1105
1105
  * @param paths 1 to 64 absolute paths of existing files, in play order.
1106
1106
  *
1107
- * @throws `capability` (rejects) The plugin is not built into the player.
1107
+ * @throws `builtin-only` (rejects) The plugin is not built into the player.
1108
1108
  * @throws `invalid` (rejects) No path, more than 64, or a path that is not
1109
1109
  * an absolute path.
1110
1110
  * @throws `missing` (rejects) A path that is not an existing file.
@@ -1123,8 +1123,8 @@ export interface App extends AppInfo {
1123
1123
  * const { pid } = await plugin.app.openWindow(selected.slice(0, 64));
1124
1124
  * console.log("temporary window", pid);
1125
1125
  * } catch (error) {
1126
- * // `capability`: not a built-in plugin; `unsupported`: macOS.
1127
- * if ((error as PluginError).code !== "capability") throw error;
1126
+ * // `builtin-only`: not a built-in plugin; `unsupported`: macOS.
1127
+ * if ((error as PluginError).code !== "builtin-only") throw error;
1128
1128
  * }
1129
1129
  * ```
1130
1130
  *
@@ -1220,12 +1220,12 @@ export interface Commands {
1220
1220
  * const row = commands.find((each) => each.id === "vestra.subtitles/tuning");
1221
1221
  * if (row?.keys[0]) await plugin.osd.show("Press {}", [row.keys[0]]);
1222
1222
  * } catch (error) {
1223
- * // `capability`: not a built-in plugin.
1224
- * if ((error as PluginError).code !== "capability") throw error;
1223
+ * // `builtin-only`: not a built-in plugin.
1224
+ * if ((error as PluginError).code !== "builtin-only") throw error;
1225
1225
  * }
1226
1226
  * ```
1227
1227
  *
1228
- * @throws `capability` (rejects) The plugin is not built into the player.
1228
+ * @throws `builtin-only` (rejects) The plugin is not built into the player.
1229
1229
  * @player 0.7.6
1230
1230
  * @since 1.7.9
1231
1231
  */
@@ -1297,7 +1297,7 @@ export interface Commands {
1297
1297
  * });
1298
1298
  * ```
1299
1299
  *
1300
- * @throws `capability` (rejects) The plugin is not built into the player.
1300
+ * @throws `builtin-only` (rejects) The plugin is not built into the player.
1301
1301
  * @throws `ticket` (rejects) No ticket, or it ended or expired.
1302
1302
  * @throws `missing` (rejects) No listed command has this id, or one of
1303
1303
  * the ids of `then`.
@@ -1486,7 +1486,7 @@ export interface Palette {
1486
1486
  * @example See Palette
1487
1487
  * {@link Palette}
1488
1488
  *
1489
- * @throws `capability` (through `ready`) The plugin is not built into the player.
1489
+ * @throws `builtin-only` (through `ready`) The plugin is not built into the player.
1490
1490
  * @throws `conflict` (through `ready`) Another plugin holds the lead.
1491
1491
  * @throws `invalid` (through `ready`) A text over its length.
1492
1492
  * @player 0.7.6
@@ -1632,7 +1632,7 @@ export interface PaletteLead extends Disposable {
1632
1632
  /**
1633
1633
  * Settles when the player has the row.
1634
1634
  *
1635
- * @throws `capability` (rejects) The plugin is not built into the player.
1635
+ * @throws `builtin-only` (rejects) The plugin is not built into the player.
1636
1636
  * @throws `conflict` (rejects) Another plugin holds the lead.
1637
1637
  * @throws `invalid` (rejects) A text over its length.
1638
1638
  */
@@ -1644,7 +1644,7 @@ export interface PaletteLead extends Disposable {
1644
1644
  * {@link PaletteLead}
1645
1645
  *
1646
1646
  * @throws `invalid` (rejects) A text over its length.
1647
- * @throws `capability` (rejects) The row was refused (see `ready`).
1647
+ * @throws `builtin-only` (rejects) The row was refused (see `ready`).
1648
1648
  * @since 1.7.9
1649
1649
  */
1650
1650
  update(options: PaletteLeadOptions): Promise<void>;
@@ -1691,7 +1691,7 @@ export interface PaletteLead extends Disposable {
1691
1691
  * });
1692
1692
  * ```
1693
1693
  *
1694
- * @throws `capability` (rejects) The plugin is not built into the player.
1694
+ * @throws `builtin-only` (rejects) The plugin is not built into the player.
1695
1695
  * @since 1.7.9
1696
1696
  */
1697
1697
  done(ticket: string): Promise<void>;