ConstReadonlyperPlugin: 160Commands one plugin instance may have at the same time (160).
Readonlytotal: 1024Commands of every plugin plus the player's own, together (1024).
Readonlydepth: 8Segments of a menu path, the leaf included.
ReadonlyidBytes: 128UTF-8 bytes of a command's local id: ASCII letters, digits, .,
_ and -.
ReadonlytitleBytes: 128UTF-8 bytes of a title, a text value counted by its English rendering. Like every command text: not empty, no control characters, no whitespace at either end.
ReadonlysegmentBytes: 80UTF-8 bytes of a menu path segment, a text value counted by its English rendering.
ReadonlygroupBytes: 80UTF-8 bytes of a group.
ReadonlycategoryBytes: 80UTF-8 bytes of a category (CommandOptions.category), a text value
counted by its English rendering.
ReadonlyreasonBytes: 512UTF-8 bytes of a state's reason, as shown in the player's language.
Readonlyorder: 1000000The largest order either way: an order is within ±1,000,000.
The Chapters submenu lists at most 50 chapters, however many the file
has. Every menu item is a command, and the player counts them per plugin.
add itself returns at once and never throws limit: past perPlugin
the player refuses the registration, which fails the activation or, later,
reaches Scope.onError. A try/catch around add cannot catch that, so a
menu built from media content keeps its own cap and leaves room for the
plugin's fixed commands.
import { COMMAND_LIMITS } from "@vestra-player/sdk/testing";
// 20 slots stay free for the plugin's own commands.
const shown = chapters.slice(0, Math.min(50, COMMAND_LIMITS.perPlugin - 20));
The player's command registry caps, the same values as the player's own table (the player's tests check that they agree). They are runaway guards, not product limits: a command added past them is refused by the player with code
limit(itsreadyrejects; during activation, activation fails; later the failure goes toScope.onError), commands already registered are unaffected, and disposing a command frees its slot at once. TestHost enforces the same caps.The other fields are the player's rules for one declaration (since 1.5.48): a command past them is refused with
invalid, the same way.For menus built from media content (tracks, chapters, presets), set your own sensible display cap well below
perPlugin.