namespace SVSim.BattleNode.Bridge;
///
/// DI-injected options for the battle node. NodeServerUrl matches the prod
/// do_matching wire format: host:port/socket.io/, no scheme prefix.
/// BestHTTP's SocketManager parses it as the Socket.IO v2 endpoint URL.
///
public sealed class BattleNodeOptions
{
public string NodeServerUrl { get; set; } = "localhost:5148/socket.io/";
///
/// How long the first arriver's WS waits for a partner before disconnecting.
/// Matches the architecture spec's 60s default; override (typically lower)
/// in tests via the factory.
///
public TimeSpan WaitingRoomTimeout { get; set; } = TimeSpan.FromSeconds(60);
///
/// Dev convenience: when true, matchmaking endpoints that would otherwise park
/// a solo poller (returning 3002 RETRY until a partner arrives) instead return
/// a Scripted match immediately — equivalent to passing ?scripted=1 on
/// every request. Turn off to test real PvP with two clients. Default false.
/// Trade-off: while on, two viewers polling simultaneously each get
/// their own Scripted match instead of pairing with each other. Toggling off
/// is the only way to get PvP behavior.
///
public bool SoloDefaultsToScripted { get; set; } = false;
///
/// When true, emits per-frame
/// diagnostic logs at Information level: [sio-in] on every inbound msg/alive/hand
/// envelope (URI, pubSeq, ackId, dispatch decision, ack-sent flag, ack arg, inbound
/// watermark); [sio-out] on every outbound push (URI, pubSeq, playSeq, noStock);
/// [ws-rx-text] / [ws-rx-bin] on every WS frame received at the transport
/// layer; [ws-recv-exit] / [ws-loop-exit] on read-loop termination
/// (with WebSocket state + exception type when applicable). Default false — keeps
/// production logs clean. Flip on per session for live WS debugging, PvP investigation,
/// or to reproduce the kind of softlock chased in
/// docs/audits/battle-node-sio-events-2026-06-02.md.
///
public bool DiagnosticLogging { get; set; } = false;
}