Plugin API v95: renumber the bar menu after the web panel's v94

Upstream took v93 (GetMonsterHealth) and the web panel is now v94, so the "barMenu" manifest key is
v95: PluginContractVersion.BarMenu and Current, RynthCoreSdkApiVersion, the comments in
SectionManifest.cs, ImGuiBar.cs and BarMenuHover.cs, the SectionsTests case names and the changelog.
docs/WEB_PANEL.md names the SDK's API as 95 now. No table change. Still provisional.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Daniel Wallace 2026-11-08 13:15:46 -08:00
commit fb3b3f3a69
8 changed files with 21 additions and 21 deletions

View file

@ -1,7 +1,7 @@
# Bar icon dropdown: plugin API v94
# Bar icon dropdown: plugin API v95
Branch `up/bar-menu`, from `up/web-panel` (0ef12d7). Not deployed. The API number 94 is provisional, as 93 is
(upstream may take it first; it renumbers on merge). The manifest is parsed here; the bar draws it (below).
Branch `pr/bar-menu`, from `pr/web-panel` (web panel, v94). Not deployed. The API number 95 is provisional, as
94 is (unmerged upstream branches also use these numbers; whichever merges second renumbers). The manifest is parsed here; the bar draws it (below).
## What changed
@ -12,8 +12,8 @@ Branch `up/bar-menu`, from `up/web-panel` (0ef12d7). Not deployed. The API numbe
non-empty and capped at 48 characters, the command is a single `/...` chat command (the same rule as a contribution's),
the icon is one Phosphor glyph or empty (an icon that is not a glyph is kept as an empty icon, and the bar draws the tooltip's first letter). An item with a bad id, tooltip or command is dropped; items past
`MaxBarMenuItems` (6) are ignored; a `barMenu` that is not an array is ignored.
- `PluginContractVersion.Current` and the SDK's `RynthCoreSdkApiVersion` (`RynthCore.PluginSdk.targets`) go to 94.
No function table change. Engines before v94 ignore the key, so a plugin can declare it unconditionally.
- `PluginContractVersion.Current` and the SDK's `RynthCoreSdkApiVersion` (`RynthCore.PluginSdk.targets`) go to 95.
No function table change. Engines before v95 ignore the key, so a plugin can declare it unconditionally.
## Tests

View file

@ -198,7 +198,7 @@ the plugin to keep working on a core without the web panel, with ShellExecute as
1. **Declare `RynthPluginMinEngineApi` at the plugin's true minimum.** In release builds
(`-p:RynthPluginSharedSdk=true`, as `Publish-Update.ps1` and `Build-Installer.ps1` pass), a declared minimum
*below 88* is raised to the API of the SDK the plugin was built with (94 now), and the launcher then holds the
*below 88* is raised to the API of the SDK the plugin was built with (95 now), and the launcher then holds the
plugin back from older cores, which kills the fallback (`RynthCore.PluginSdk.targets`: `RynthCoreManagedPluginApi`
is 88). There is no separate opt-out property: declaring a minimum of **88 or higher** is the opt-out, and a
declared 88 or higher is used as it is. Declare the lowest API your plugin really needs at load, and make

View file

@ -1,7 +1,7 @@
// ============================================================================
// RynthCore.Engine - ImGui/BarMenuHover.cs
// The timing of the bar icon dropdown (a plugin window's "barMenu", plugin API
// v94): pure, so tools/SectionsTests compiles it as is. ImGuiBar feeds it once
// v95): pure, so tools/SectionsTests compiles it as is. ImGuiBar feeds it once
// a frame.
//
// An icon must be hovered OpenDelay before its dropdown opens (a sweep of the

View file

@ -11,7 +11,7 @@
// draws that asked for one (its manifest's "windows" with "bar", UI/Sections/
// PluginWindows.cs; an engine panel such a window has taken over loses its own
// button), reload (RL) and pop out.
// A plugin window with a "barMenu" (plugin API v94) drops a column of icon buttons below its
// A plugin window with a "barMenu" (plugin API v95) drops a column of icon buttons below its
// bar icon after the mouse rests on it (BarMenuHover: open and close delays); a click runs that
// item's chat command. The icon's own click still toggles the window.
// A button whose window is open, docked or popped out, draws highlighted in the

View file

@ -51,12 +51,12 @@ internal static class PluginContractVersion
// game window (WebPanel\WebPanelApi.cs; DreamWeave's in-game market and tools), appended after v93's
// GetMonsterHealth (was v93 on up/web-panel; renumbered after upstream's v93). The number is
// PROVISIONAL: the unmerged branches named under v93 also use 94; whichever merges second renumbers.
// v94: no table change. SectionManifest.cs reads a plugin window's "barMenu" (a hover dropdown on its
// v95: no table change. SectionManifest.cs reads a plugin window's "barMenu" (a hover dropdown on its
// bar icon: up to 6 items of id, tooltip, icon and a /command the engine runs on click). Engines
// before v94 ignore the key. The number is PROVISIONAL, as 93 is: upstream may take 94 first,
// in which case this renumbers on merge.
// before v95 ignore the key (was v94 on up/bar-menu; renumbered after upstream's v93). The number
// is PROVISIONAL, as 94 is: whichever merges second renumbers.
/// <summary>The API version that added the "barMenu" manifest key; a plugin declaring it pins its own copy against this.</summary>
public const uint BarMenu = 94;
public const uint BarMenu = 95;
public const uint Current = 94;
public const uint Current = 95;
}

View file

@ -51,7 +51,7 @@
// opens when nothing is saved for it (v90, 2026-10-22). "scale": "draw" =
// the window draws its content at any size (PanelScale): Ctrl+wheel over
// it steps that size, 30-250%, not its text size (v90, 2026-10-23).
// "barMenu" (v94, 2026-11-07): a hover dropdown on the window's bar icon, for a
// "barMenu" (v95, 2026-11-07): a hover dropdown on the window's bar icon, for a
// window with "bar": true. An array of { "id": "market", "tooltip": "Market",
// "icon": "<Phosphor glyph, may be empty>", "command": "/rserver market" }:
// "id" a short lower-case word (unique in the menu), "tooltip" the item's
@ -60,7 +60,7 @@
// chat command when the item is clicked. An item missing its id, tooltip or
// command, or with a duplicate id, is dropped; at most MaxBarMenuItems (6)
// are kept, and a "barMenu" that is not an array is ignored (the window is
// kept). Engines before v94 ignore the key.
// kept). Engines before v95 ignore the key.
//
// Everything from a plugin is checked here: ids are short lower-case words,
// text is capped, a command must be a single "/..." chat command, and the lists
@ -102,7 +102,7 @@ internal sealed record SectionContribution(
public bool IsUniversal => Server.Length == 0;
}
/// <summary>One entry of a window's bar-icon dropdown ("barMenu", v94): a click runs <see cref="Command"/> as a player chat command.</summary>
/// <summary>One entry of a window's bar-icon dropdown ("barMenu", v95): a click runs <see cref="Command"/> as a player chat command.</summary>
internal sealed record SectionBarMenuItem(string Id, string Tooltip, string Icon, string Command);
/// <summary>
@ -135,7 +135,7 @@ internal sealed record SectionWindowDecl(
// 2026-11-07 (no version bump: older engines ignore the key): drawn under AC's own UI, like a native
// AC window ("layer": "underUi"; frameless windows only). AC's windows cover it and take the clicks there.
bool UnderUi = false,
// v94: the bar icon's hover dropdown ("barMenu"); null when the window declares none.
// v95: the bar icon's hover dropdown ("barMenu"); null when the window declares none.
SectionBarMenuItem[]? BarMenu = null)
{
/// <summary>For every world, not one server.</summary>
@ -176,7 +176,7 @@ internal static class SectionManifestParser
public const int MaxJsonLength = 256 * 1024;
public const int MaxWindows = 8;
public const int MaxWindowTitleLength = 32;
/// <summary>Most items kept in one window's bar-icon dropdown (v94).</summary>
/// <summary>Most items kept in one window's bar-icon dropdown (v95).</summary>
public const int MaxBarMenuItems = 6;
public const float DefaultWindowWidth = 420f, DefaultWindowHeight = 300f, MinWindowSize = 120f, MaxWindowSize = 2000f;

View file

@ -36,7 +36,7 @@
<PropertyGroup>
<!-- The engine API this SDK knows; tools\PluginManifestTests checks it equals PluginContractVersion.Current. -->
<RynthCoreSdkApiVersion>94</RynthCoreSdkApiVersion>
<RynthCoreSdkApiVersion>95</RynthCoreSdkApiVersion>
<!-- The first engine API that loads managed plugins and gives them Runtime\PluginShared (2026.10.19.1). -->
<RynthCoreManagedPluginApi>88</RynthCoreManagedPluginApi>
<_RynthPluginManifestOn Condition="'$(RynthPluginMinEngineApi)' != '' and '$(RynthPluginManifest)' != 'false'">true</_RynthPluginManifestOn>

View file

@ -588,7 +588,7 @@ internal static class Program
"chrome and fitHeight are in the signature (a change re-registers)");
}
// -- Bar icon dropdown (v94) --
// -- Bar icon dropdown (v95) --
private static string BarMenuManifest(string windowExtra) =>
"{ \"version\": 1, \"windows\": [ { \"id\": \"server\", \"title\": \"DreamWeave\", \"surface\": \"window:server\", \"bar\": true"
@ -596,7 +596,7 @@ internal static class Program
private static void ManifestBarMenu()
{
Case("plugin windows: barMenu (v94)");
Case("plugin windows: barMenu (v95)");
string storefront = ((char)0xE470).ToString(), shield = ((char)0xE40A).ToString(), sparkle = ((char)0xE6A2).ToString();
string longTip = new string('T', 60);
string longCommand = "/" + new string('c', 250);