Plugin API v94: renumber the web panel after upstream's v93

Upstream release 2026.11.8.1 took v93 for GetMonsterHealth. The web panel's four slots now follow
GetMonsterHealthFn in the engine table and the SDK's RynthCoreApiNative, and the web panel is v94:
PluginContractVersion.Current, RynthCoreSdkApiVersion, HasWebPanel (Version >= 94), the comments,
docs/WEB_PANEL.md, the changelog and PluginManifestTests (HasWebPanel version cases, slot names).
Still provisional: unmerged upstream branches also use 94.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Daniel Wallace 2026-11-08 13:13:05 -08:00
commit 2225b90b2c
16 changed files with 72 additions and 70 deletions

View file

@ -70,7 +70,7 @@ internal static class EngineSettings
private static Compatibility.AutoIdMode _autoIdMode = Compatibility.AutoIdPolicy.DefaultMode;
// "TransitionGate": default true. False = queued game actions are never held for a death / portal.
private static bool _transitionGate = true;
// "WebPanel": default true. False = the v93 web panel calls answer Unavailable (plugins open the system browser).
// "WebPanel": default true. False = the v94 web panel calls answer Unavailable (plugins open the system browser).
private static bool _webPanel = true;
private static bool _loaded;
@ -716,7 +716,7 @@ internal static class EngineSettings
}
}
/// <summary>"WebPanel" in engine.json (default true): the v93 web panel (WebPanel\WebPanelHost.cs, a
/// <summary>"WebPanel" in engine.json (default true): the v94 web panel (WebPanel\WebPanelHost.cs, a
/// WebView2 window over the game for DreamWeave's market and tools; CoreCLR engine only). False is the
/// kill switch: WebPanelOpen answers Unavailable and plugins open the page in the system browser
/// instead. A panel already open stays until it is closed.</summary>

View file

@ -1070,24 +1070,24 @@ internal struct RynthCoreAPI
/// Read-only, any thread, no game calls. Requires API v93+.</summary>
public IntPtr GetMonsterHealthFn;
// ── v93: a WebView2 web panel over the game window (WebPanel\WebPanelApi.cs) ──
// ── v94: a WebView2 web panel over the game window (WebPanel\WebPanelApi.cs) ──
// No call blocks its caller (AC's main thread, the plugin pump and ImGui draws all call these).
/// <summary>v93: <c>int WebPanelOpen(WebPanelOpenNative* open)</c>: opens (or replaces) the web panel.
/// <summary>v94: <c>int WebPanelOpen(WebPanelOpenNative* open)</c>: opens (or replaces) the web panel.
/// Returns a handle &gt; 0, or BadArgs / UrlNotAllowed / NoGameWindow / Unavailable / ShuttingDown
/// (WebPanelCode). Requires API v93+ (provisional number).</summary>
/// (WebPanelCode). Requires API v94+ (provisional number).</summary>
public IntPtr WebPanelOpenFn;
/// <summary>v93: <c>int WebPanelNavigate(int handle, byte* url)</c>: 1 queued; -2 off the allowlist
/// <summary>v94: <c>int WebPanelNavigate(int handle, byte* url)</c>: 1 queued; -2 off the allowlist
/// (opened in the system browser when it is browser-safe); -6 stale handle.</summary>
public IntPtr WebPanelNavigateFn;
/// <summary>v93: <c>int WebPanelClose(int handle)</c>: 1 queued, 0 already closed, -6 stale handle.</summary>
/// <summary>v94: <c>int WebPanelClose(int handle)</c>: 1 queued, 0 already closed, -6 stale handle.</summary>
public IntPtr WebPanelCloseFn;
/// <summary>v93: <c>int WebPanelGetState(int handle, WebPanelStateNative* state)</c>: the WebPanelStatusCode
/// <summary>v94: <c>int WebPanelGetState(int handle, WebPanelStateNative* state)</c>: the WebPanelStatusCode
/// (a handle that is not the live one reads 6 Superseded), -1 bad args.</summary>
public IntPtr WebPanelGetStateFn;
}
/// <summary>v93 WebPanelOpen argument (Pack 4; 48 bytes on x86). Mirrors RynthCore.PluginSdk/WebPanelTypes.cs.</summary>
/// <summary>v94 WebPanelOpen argument (Pack 4; 48 bytes on x86). Mirrors RynthCore.PluginSdk/WebPanelTypes.cs.</summary>
[StructLayout(LayoutKind.Sequential, Pack = 4)]
internal unsafe struct WebPanelOpenNative
{
@ -1109,7 +1109,7 @@ internal unsafe struct WebPanelOpenNative
public fixed uint Reserved[4];
}
/// <summary>v93 WebPanelGetState result (Pack 4; 48 bytes). Mirrors RynthCore.PluginSdk/WebPanelTypes.cs.</summary>
/// <summary>v94 WebPanelGetState result (Pack 4; 48 bytes). Mirrors RynthCore.PluginSdk/WebPanelTypes.cs.</summary>
[StructLayout(LayoutKind.Sequential, Pack = 4)]
internal unsafe struct WebPanelStateNative
{
@ -1126,14 +1126,14 @@ internal unsafe struct WebPanelStateNative
public fixed uint Reserved[5];
}
/// <summary>v93 return codes of the web panel calls. Append only.</summary>
/// <summary>v94 return codes of the web panel calls. Append only.</summary>
internal enum WebPanelCode
{
Queued = 1, AlreadyClosed = 0, BadArgs = -1, UrlNotAllowed = -2, NoGameWindow = -3,
Unavailable = -4, ShuttingDown = -5, StaleHandle = -6, RuntimeMissing = -7, CreateFailed = -8, ProcessFailed = -9,
}
/// <summary>v93 WebPanelStateNative.Status values. Append only.</summary>
/// <summary>v94 WebPanelStateNative.Status values. Append only.</summary>
internal enum WebPanelStatusCode
{
None = 0, Starting = 1, Loading = 2, Ready = 3, Closed = 4, Failed = 5, Superseded = 6,

View file

@ -47,8 +47,9 @@ internal static class PluginContractVersion
// any thread (feature/hud-health-for-plugins, 2026-11-07). Note: feature/reload-state,
// feature/engine-events and the branches built on them (unmerged) also use 93 and 94; whichever
// merges second renumbers.
// v93: WebPanelOpen, WebPanelNavigate, WebPanelClose and WebPanelGetState: a WebView2 web panel over the
// game window (WebPanel\WebPanelApi.cs; DreamWeave's in-game market and tools). The number is
// PROVISIONAL: upstream may take 93 first, in which case this renumbers on merge.
public const uint Current = 93;
// v94: WebPanelOpen, WebPanelNavigate, WebPanelClose and WebPanelGetState: a WebView2 web panel over the
// 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.
public const uint Current = 94;
}

View file

@ -305,10 +305,10 @@ internal static partial class PluginManager
private static GetAmbientLightCallbackDelegate? _getAmbientLightCallback; // v91
private static GetMonsterHealthCallbackDelegate? _getMonsterHealthCallback; // v93
#if ENGINE_CORECLR
private static WebPanelOpenCallbackDelegate? _webPanelOpenCallback; // v93
private static WebPanelNavigateCallbackDelegate? _webPanelNavigateCallback; // v93
private static WebPanelCloseCallbackDelegate? _webPanelCloseCallback; // v93
private static WebPanelGetStateCallbackDelegate? _webPanelGetStateCallback; // v93
private static WebPanelOpenCallbackDelegate? _webPanelOpenCallback; // v94
private static WebPanelNavigateCallbackDelegate? _webPanelNavigateCallback; // v94
private static WebPanelCloseCallbackDelegate? _webPanelCloseCallback; // v94
private static WebPanelGetStateCallbackDelegate? _webPanelGetStateCallback; // v94
#endif
private static ForceResetBusyCountCallbackDelegate? _forceResetBusyCountCallback;
private static GetObjectSpellIdsCallbackDelegate? _getObjectSpellIdsCallback;
@ -3261,7 +3261,7 @@ internal static partial class PluginManager
unsafe { _getAmbientLightCallback ??= AmbientLight.Get; }
unsafe { _getMonsterHealthCallback ??= GetMonsterHealthAction; } // v93
#if ENGINE_CORECLR
// v93: the AOT engine leaves these slots zero, so HasWebPanel is false there.
// v94: the AOT engine leaves these slots zero, so HasWebPanel is false there.
unsafe { _webPanelOpenCallback ??= WebPanel.WebPanelApi.Open; }
unsafe { _webPanelNavigateCallback ??= WebPanel.WebPanelApi.Navigate; }
_webPanelCloseCallback ??= WebPanel.WebPanelApi.Close;

View file

@ -49,7 +49,7 @@
</PropertyGroup>
<!--
v93 web panel: WebView2 on the CoreCLR engine only. NativeAOT cannot host the Core wrapper's COM
v94 web panel: WebView2 on the CoreCLR engine only. NativeAOT cannot host the Core wrapper's COM
interop, so that build drops the host and its Win32/WebView2 glue (WebPanelApi.cs answers Unavailable
there and PluginManager leaves the table slots zero).
-->

View file

@ -4,7 +4,7 @@ namespace RynthCore.Engine.WebPanel;
#if ENGINE_CORECLR
/// <summary>
/// The engine side of the v93 web panel calls (PluginContract.cs WebPanelOpenFn..WebPanelGetStateFn): reads
/// The engine side of the v94 web panel calls (PluginContract.cs WebPanelOpenFn..WebPanelGetStateFn): reads
/// the native arguments (every string copied before the call returns) and hands them to the one
/// WebPanelHost. No call here blocks its caller (AC's main thread, the plugin pump and ImGui draws all call
/// these). engine.json "WebPanel": false makes Open answer Unavailable (plugins fall back to the browser).
@ -128,7 +128,7 @@ internal static unsafe class WebPanelApi
}
}
#else
/// <summary>The NativeAOT engine has no web panel: PluginManager leaves the v93 slots zero (HasWebPanel false).</summary>
/// <summary>The NativeAOT engine has no web panel: PluginManager leaves the v94 slots zero (HasWebPanel false).</summary>
internal static unsafe class WebPanelApi
{
internal static int Open(WebPanelOpenNative* open) => (int)WebPanelCode.Unavailable;

View file

@ -6,7 +6,7 @@ namespace RynthCore.Engine.WebPanel;
internal readonly record struct WebPanelSnapshot(int Handle, int Status, uint Flags, int Error, int LastHttpStatus, uint NavigationCount);
/// <summary>
/// The pure decisions of the v93 ABI glue (WebPanelApi.cs), kept apart so tools\WebPanelTests can check them
/// The pure decisions of the v94 ABI glue (WebPanelApi.cs), kept apart so tools\WebPanelTests can check them
/// without the engine: refusals, the GetState argument check, and writing the result struct.
/// </summary>
internal static unsafe class WebPanelApiRules

View file

@ -8,7 +8,7 @@ namespace RynthCore.Engine.WebPanel;
internal sealed record WebPanelRequest(string Url, string[] Allowlist, string ProfileFolder, string Title, int WidthPercent, int HeightPercent, uint Flags);
/// <summary>
/// Reads the v93 WebPanelOpen argument. The SDK passes pointers into stack or pooled buffers that are gone
/// Reads the v94 WebPanelOpen argument. The SDK passes pointers into stack or pooled buffers that are gone
/// the moment the call returns, so every string is copied here, synchronously, before anything is queued.
/// Pure: no Win32, no WebView2.
/// </summary>