namespace ClaudeDo.Worker.Hub; /// /// Counts SignalR clients (the ClaudeDo App) currently connected to . /// A Hub instance is transient per connection, so this lives as a DI singleton and is /// updated from / /// — the only way an out-of-band caller (external MCP's start_list_handler, which only /// broadcasts) can tell whether anything is listening before claiming it did something. /// public sealed class ConnectedClientTracker { private int _count; public bool AnyConnected => Volatile.Read(ref _count) > 0; public void Increment() => Interlocked.Increment(ref _count); public void Decrement() => Interlocked.Decrement(ref _count); }