namespace SOR.Ai.Transport; using SOR.Networking.Abstractions.Messaging; /// /// An IClientMessage constructed by the AI layer to call game handlers directly, /// bypassing the WebSocket transport entirely. /// /// The payload must be pre-serialized as UTF-8 JSON using /// JsonSerializer.SerializeToUtf8Bytes(request), which is exactly what the Gateway /// WebSocket transport produces — so handlers see no difference. /// internal sealed class AiClientMessage : IClientMessage { public string Type { get; } public int Seq { get; } public ReadOnlyMemory Payload { get; } public AiClientMessage(string type, ReadOnlyMemory payload, int seq = 0) { Type = type; Seq = seq; Payload = payload; } }