RynthDreamWeave: link ChatSource into the plugin, strict alphabet tests, harden the launch stem

The plugin project did not compile (ChatSource not linked). LaunchWire now treats any line starting with the success stem as success-shaped: malformed, it is dropped, never returned as refusal text.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Daniel Wallace 2026-11-07 14:44:41 -08:00
commit 5e732cecb7
3 changed files with 48 additions and 1 deletions

View file

@ -13,6 +13,8 @@ internal static class LaunchWire
public const string RequestCommand = "/weblogin";
public const string ReplyLead = "[WEB] ";
public const string SuccessLead = "[WEB] Launch code: ";
/// <summary>Any line starting like this has the success shape: malformed, it is dropped, never shown as a refusal.</summary>
private const string SuccessStem = "[WEB] Launch code";
public const int CodeLength = 43;
public const long ReplyTimeoutMs = 10_000, MinIntervalMs = 3_000;
@ -37,8 +39,9 @@ internal static class LaunchWire
int start = ChatSource.ContentStart(text);
ReadOnlySpan<char> line = text.AsSpan(start);
if (line.StartsWith(SuccessLead.AsSpan(), StringComparison.Ordinal))
if (line.StartsWith(SuccessStem.AsSpan(), StringComparison.Ordinal))
{
if (!line.StartsWith(SuccessLead.AsSpan(), StringComparison.Ordinal)) return false;
ReadOnlySpan<char> rest = line.Slice(SuccessLead.Length);
if (rest.Length <= CodeLength || rest[CodeLength] != ' ') return false;
for (int i = 0; i < CodeLength; i++)

View file

@ -13,6 +13,11 @@
<RynthPluginDescription>DreamWeave only: the server card (rules, server features, player commands, links, account setup) in its own window on the RynthCore bar, the retail Character panel whose XP for next level keeps reading past level 275, and the bank check every minute that gives Lum/hr its luminance.</RynthPluginDescription>
</PropertyGroup>
<ItemGroup>
<!-- LaunchWire tells a server line from a player's copy of it. -->
<Compile Include="$(RynthSuiteRoot)Plugins\Shared\ChatSource.cs" Link="Shared\ChatSource.cs" />
</ItemGroup>
<Import Project="..\Shared\ServerPack\ServerPlugin.props" />
</Project>