fix: resolve CLI serialization failures and add README

Two Akka.NET deserialization bugs prevented CLI commands from reaching ManagementActor: IReadOnlyList<string> in AuthenticatedUser serialized as a compiler-generated internal type unknown to the server, and ManagementSuccess.Data carried server-side assembly types the CLI couldn't resolve on receipt. Fixed by using string[] for roles and pre-serializing response data to JSON in ManagementActor before sending. Adds full CLI reference documentation covering all 10 command groups.
This commit is contained in:
Joseph Doherty
2026-03-17 18:17:47 -04:00
parent 40f74e4a42
commit eea50014de
4 changed files with 566 additions and 16 deletions

View File

@@ -2,10 +2,10 @@ namespace ScadaLink.Commons.Messages.Management;
public record AuthenticatedUser(
string Username, string DisplayName,
IReadOnlyList<string> Roles, IReadOnlyList<string> PermittedSiteIds);
string[] Roles, string[] PermittedSiteIds);
public record ManagementEnvelope(AuthenticatedUser User, object Command, string CorrelationId);
public record ManagementSuccess(string CorrelationId, object? Data);
public record ManagementSuccess(string CorrelationId, string JsonData);
public record ManagementError(string CorrelationId, string Error, string ErrorCode);
public record ManagementUnauthorized(string CorrelationId, string Message);