using System; using System.Threading; using System.Threading.Tasks; using MxGateway.Contracts.Proto; using MxGateway.Worker.Sta; namespace MxGateway.Worker.MxAccess; public interface IWorkerRuntimeSession : IDisposable { Task StartAsync( string sessionId, int workerProcessId, CancellationToken cancellationToken = default); Task DispatchAsync(StaCommand command); WorkerRuntimeHeartbeatSnapshot CaptureHeartbeat(); void RequestShutdown(); Task ShutdownGracefullyAsync( TimeSpan timeout, CancellationToken cancellationToken = default); }