using MxGateway.Contracts.Proto; using MxGateway.Contracts.Proto.Galaxy; namespace MxGateway.Client.Cli; /// /// Minimal transport surface the CLI talks to. Exposes only the gateway and /// Galaxy Repository RPCs the CLI needs so tests can substitute an in-process /// fake without standing up a real gRPC channel. The production binding is a /// thin adapter over and . /// public interface IMxGatewayCliClient : IAsyncDisposable { /// /// Opens a new gateway session. /// /// Session open request. /// Cancellation token for the operation. /// The session open reply. Task OpenSessionAsync( OpenSessionRequest request, CancellationToken cancellationToken); /// /// Closes an open gateway session. /// /// Session close request. /// Cancellation token for the operation. /// The session close reply. Task CloseSessionAsync( CloseSessionRequest request, CancellationToken cancellationToken); /// /// Invokes an MXAccess command on the session. /// /// The command request. /// Cancellation token for the operation. /// The command reply. Task InvokeAsync( MxCommandRequest request, CancellationToken cancellationToken); /// /// Streams events from the gateway session. /// /// The stream events request. /// Cancellation token for the operation. /// An async enumerable of events. IAsyncEnumerable StreamEventsAsync( StreamEventsRequest request, CancellationToken cancellationToken); /// /// Acknowledges an active MXAccess alarm condition through the gateway. /// /// The acknowledge request — alarm reference, comment, operator user. /// Cancellation token for the operation. /// The acknowledge reply with protocol + native MxStatus. Task AcknowledgeAlarmAsync( AcknowledgeAlarmRequest request, CancellationToken cancellationToken); /// /// Attaches to the gateway's central alarm feed — the current active-alarm /// snapshot followed by live transitions. /// /// The stream request, optionally scoped by alarm-reference prefix. /// Cancellation token for the operation. /// An async enumerable of alarm feed messages. IAsyncEnumerable StreamAlarmsAsync( StreamAlarmsRequest request, CancellationToken cancellationToken); /// /// Tests connection to the Galaxy Repository. /// /// The connection test request. /// Cancellation token for the operation. /// The connection test reply. Task GalaxyTestConnectionAsync( TestConnectionRequest request, CancellationToken cancellationToken); /// /// Gets the last deployment time from the Galaxy Repository. /// /// The last deploy time request. /// Cancellation token for the operation. /// The last deploy time reply. Task GalaxyGetLastDeployTimeAsync( GetLastDeployTimeRequest request, CancellationToken cancellationToken); /// /// Discovers the Galaxy Repository hierarchy. /// /// The discover hierarchy request. /// Cancellation token for the operation. /// The discover hierarchy reply. Task GalaxyDiscoverHierarchyAsync( DiscoverHierarchyRequest request, CancellationToken cancellationToken); /// /// Watches for deployment events from the Galaxy Repository. /// /// The watch deploy events request. /// Cancellation token for the operation. /// An async enumerable of deployment events. IAsyncEnumerable GalaxyWatchDeployEventsAsync( WatchDeployEventsRequest request, CancellationToken cancellationToken); }