RynthServers/Tools/RynthServerPack.Tests/RynthServerPack.Tests.csproj
Daniel Wallace 0ba3b5909e ServerPack: use the engine's web panel when it has one
OpenWeb now opens the page in RynthCore's in-game web panel (plugin API v93)
and falls back to the system browser only when the panel refused before
navigating. A handle from OpenWebPanel only means queued, so the open is
answered from OnTick (PollWeb), which reads GetWebPanelState until it decides:
Loading/Ready opened; Failed+OpenedInBrowser the engine opened the browser
(do nothing more); Failed+ProcessFailed spent; Failed+RuntimeMissing or
CreateFailed with no browser and no navigation falls back. A 20 s poll
timeout answers NoAnswer (neutral, no fallback). done fires exactly once.

ServerWebPanel.cs is pure (an int/string engine seam), so the mappings and
the once-only answer are tested with a fake engine. Every SDK web-panel name
sits in four NoInlining helpers in ServerPackWeb.cs, each called inside
catch (MissingMethodException) and catch (TypeLoadException); a source scan
pins that, the poll's place in OnTick, and the absence of locks. CloseWeb
closes only the handle this plugin opened.

Builds only against a RynthCore SDK with the web panel (0ef12d7); against
418d80b the helpers do not compile (8 errors, all in ServerPackWeb.cs).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-08 13:37:49 -08:00

89 lines
8.3 KiB
XML

<Project Sdk="Microsoft.NET.Sdk">
<!--
Tests for the server plugins (Plugins\Shared\ServerPack, built into RynthColdeve, RynthAelrynth, ...):
- the shared model (ServerPackModel.cs, ServerPackInfo.cs): RynthCore's "servermenu" verdict,
the world-name fallback, the override commands and the sections manifest;
- every server plugin's csproj, read as XML: unique ids, plugin names and hosts, and no
server's host claimed by another server's list (RynthCore would load the wrong plugin);
- the launcher's known-server catalog (RynthCore.App\KnownServerCatalog.cs): every entry names
a server plugin whose hosts claim the entry's host, with the same port and emulator.
The plugins are NativeAOT x86 libraries, so the pure sources are compiled in here directly.
The SDK's manifest file (BCL only) supplies RynthCore's host matching.
Run: dotnet run -c Release (exit 0 = pass, 1 = fail; an argument filters by test name)
-->
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net10.0</TargetFramework>
<Nullable>enable</Nullable>
<InvariantGlobalization>true</InvariantGlobalization>
<!-- RynthServerProfileApi.cs declares the interface's (function-pointer) table. -->
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<RootNamespace>RynthServerPack.Tests</RootNamespace>
</PropertyGroup>
<ItemGroup>
<Compile Include="..\..\Plugins\Shared\ServerPack\ServerPackInfo.cs" Link="Plugin\ServerPackInfo.cs" />
<Compile Include="..\..\Plugins\Shared\ServerPack\ServerPackModel.cs" Link="Plugin\ServerPackModel.cs" />
<!-- The hooks for a server's own features: pages, the settings file, the own-reply window. -->
<Compile Include="..\..\Plugins\Shared\ServerPack\ServerPackPages.cs" Link="Plugin\ServerPackPages.cs" />
<Compile Include="..\..\Plugins\Shared\ServerPack\ServerPackSettings.cs" Link="Plugin\ServerPackSettings.cs" />
<Compile Include="..\..\Plugins\Shared\ServerPack\ServerChatRequest.cs" Link="Plugin\ServerChatRequest.cs" />
<!-- "/rserver" words and answers (2026-10-28) and the shared reply queue. -->
<Compile Include="..\..\Plugins\Shared\ServerPack\ServerPackCommands.cs" Link="Plugin\ServerPackCommands.cs" />
<Compile Include="$(RynthSuiteRoot)Plugins\Shared\CommandReply.cs" Link="Shared\CommandReply.cs" />
<!-- The web opener's pure rules (allowlist, route). -->
<Compile Include="..\..\Plugins\Shared\ServerPack\ServerWebOpen.cs" Link="Plugin\ServerWebOpen.cs" />
<!-- The engine web panel's answers and the one open the tick waits on (pure: the engine is a seam). -->
<Compile Include="..\..\Plugins\Shared\ServerPack\ServerWebPanel.cs" Link="Plugin\ServerWebPanel.cs" />
<!-- DreamWeave's web destinations and the launch reply's wire text (pure). -->
<Compile Include="..\..\Plugins\RynthCore.Plugin.RynthDreamWeave\DreamWeave\DreamWeaveWeb.cs" Link="DreamWeave\DreamWeaveWeb.cs" />
<Compile Include="..\..\Plugins\RynthCore.Plugin.RynthDreamWeave\DreamWeave\LaunchWire.cs" Link="DreamWeave\LaunchWire.cs" />
<Compile Include="..\..\Plugins\RynthCore.Plugin.RynthDreamWeave\DreamWeave\WebLauncher.cs" Link="DreamWeave\WebLauncher.cs" />
<Compile Include="..\..\Plugins\RynthCore.Plugin.RynthDreamWeave\DreamWeave\WebProfile.cs" Link="DreamWeave\WebProfile.cs" />
<!-- RynthConquest's own features (pure parts) and the RynthOracle sources it links. -->
<Compile Include="..\..\Plugins\RynthCore.Plugin.RynthConquest\Conquest\ConquestData.cs" Link="Conquest\ConquestData.cs" />
<Compile Include="..\..\Plugins\RynthCore.Plugin.RynthConquest\Conquest\ConquestFeature.cs" Link="Conquest\ConquestFeature.cs" />
<Compile Include="..\..\Plugins\RynthCore.Plugin.RynthConquest\Conquest\CustomQuests.cs" Link="Conquest\CustomQuests.cs" />
<Compile Include="$(RynthSuiteRoot)Plugins\RynthCore.Plugin.RynthOracle\Data\QuestFlags.cs" Link="Oracle\QuestFlags.cs" />
<Compile Include="$(RynthSuiteRoot)Plugins\RynthCore.Plugin.RynthOracle\Data\TimeText.cs" Link="Oracle\TimeText.cs" />
<Compile Include="$(RynthSuiteRoot)Plugins\RynthCore.Plugin.RynthOracle\Data\Csv.cs" Link="Oracle\Csv.cs" />
<EmbeddedResource Include="..\..\Plugins\RynthCore.Plugin.RynthConquest\Resources\customquests.csv" LogicalName="RynthConquest.customquests.csv" />
<!-- RynthAelrynth's own features (pure parts). -->
<Compile Include="..\..\Plugins\RynthCore.Plugin.RynthAelrynth\Aelrynth\AelrynthBoards.cs" Link="Aelrynth\AelrynthBoards.cs" />
<Compile Include="..\..\Plugins\RynthCore.Plugin.RynthAelrynth\Aelrynth\AelrynthFeature.cs" Link="Aelrynth\AelrynthFeature.cs" />
<Compile Include="..\..\Plugins\RynthCore.Plugin.RynthAelrynth\Aelrynth\VaultFeed.cs" Link="Aelrynth\VaultFeed.cs" />
<!-- RynthDreamWeave's bank check for Lum/hr (pure part). -->
<Compile Include="..\..\Plugins\RynthCore.Plugin.RynthDreamWeave\DreamWeave\DreamWeaveBank.cs" Link="DreamWeave\DreamWeaveBank.cs" />
<!-- The difficulty tier RynthAelrynth publishes for RynthAi (and the value names, RynthServerProfileApi.cs). -->
<Compile Include="..\..\Plugins\RynthCore.Plugin.RynthAelrynth\Aelrynth\AelrynthDifficulty.cs" Link="Aelrynth\AelrynthDifficulty.cs" />
<Compile Include="$(RynthSuiteRoot)Plugins\Shared\RynthServerProfileApi.cs" Link="Shared\RynthServerProfileApi.cs" />
<Compile Include="$(RynthSuiteRoot)Plugins\Shared\ChatSource.cs" Link="Shared\ChatSource.cs" />
<Compile Include="$(RynthSuiteRoot)Plugins\Shared\StorageFeed.cs" Link="Shared\StorageFeed.cs" />
<!-- RynthCore's own sections-manifest parser (pure), so the manifest is checked the way the engine reads it. -->
<Compile Include="..\..\..\RynthCore\src\RynthCore.Engine\UI\Sections\SectionManifest.cs" Link="Engine\SectionManifest.cs" />
<!-- "RynthServer.Profile": the profile JSON, and the shared reader's parser that consumes it. -->
<Compile Include="..\..\Plugins\Shared\ServerPack\ServerPackProfile.cs" Link="Plugin\ServerPackProfile.cs" />
<!-- "RynthServer.QuestPack": a server plugin's own quest list (the info JSON; the pack itself is data). -->
<Compile Include="..\..\Plugins\Shared\ServerPack\ServerPackQuestPack.cs" Link="Plugin\ServerPackQuestPack.cs" />
<!-- RynthConquest's pack, under the logical name ServerPlugin.props gives it, so the served pack is checked as embedded. -->
<EmbeddedResource Include="..\..\Plugins\RynthCore.Plugin.RynthConquest\Resources\quests.conquest.csv" LogicalName="ServerPack.quests.csv" />
<Compile Include="$(RynthSuiteRoot)Plugins\Shared\EngineServerState.cs" Link="Shared\EngineServerState.cs" />
<Compile Include="..\..\..\RynthCore\src\RynthCore.PluginSdk\Manifest\RynthPluginManifest.cs" Link="Sdk\RynthPluginManifest.cs" />
<!-- The launcher's known-server picker, checked against the plugins it names. -->
<Compile Include="..\..\..\RynthCore\src\RynthCore.App\LaunchServerProfile.cs" Link="Launcher\LaunchServerProfile.cs" />
<Compile Include="..\..\..\RynthCore\src\RynthCore.App\KnownServerCatalog.cs" Link="Launcher\KnownServerCatalog.cs" />
<!-- Windows of a server plugin's own (2026-11-07) and RynthDreamWeave's Skills panel (pure parts). -->
<Compile Include="..\..\Plugins\Shared\ServerPack\ServerPackWindows.cs" Link="Plugin\ServerPackWindows.cs" />
<Compile Include="..\..\Plugins\RynthCore.Plugin.RynthDreamWeave\DreamWeave\RetailData.cs" Link="DreamWeave\RetailData.cs" />
<Compile Include="..\..\Plugins\RynthCore.Plugin.RynthDreamWeave\DreamWeave\RetailData.g.cs" Link="DreamWeave\RetailData.g.cs" />
<Compile Include="..\..\Plugins\RynthCore.Plugin.RynthDreamWeave\DreamWeave\DreamWeaveXp.cs" Link="DreamWeave\DreamWeaveXp.cs" />
<Compile Include="..\..\Plugins\RynthCore.Plugin.RynthDreamWeave\DreamWeave\SkillsSheet.cs" Link="DreamWeave\SkillsSheet.cs" />
<Compile Include="..\..\Plugins\RynthCore.Plugin.RynthDreamWeave\DreamWeave\AttributesTitles.cs" Link="DreamWeave\AttributesTitles.cs" />
<Compile Include="..\..\Plugins\RynthCore.Plugin.RynthDreamWeave\DreamWeave\OnePanelRule.cs" Link="DreamWeave\OnePanelRule.cs" />
<!-- The RynthAi test tools' check/runner harness (no plugin code in it). -->
<Compile Include="$(RynthSuiteRoot)Tools\RynthCore.RynthAiTests\Harness\Check.cs" Link="Harness\Check.cs" />
<Compile Include="$(RynthSuiteRoot)Tools\RynthCore.RynthAiTests\Harness\Runner.cs" Link="Harness\Runner.cs" />
</ItemGroup>
</Project>