//
// Copyright (c) StellaOps. Licensed under the BUSL-1.1.
//
namespace StellaOps.Signals.RuntimeAgent;
///
/// Service for managing runtime agent registrations.
/// Sprint: SPRINT_20260109_009_004 Task: Implement AgentRegistrationService
///
public interface IAgentRegistrationService
{
///
/// Register a new agent.
///
/// Registration request.
/// Cancellation token.
/// The registration record.
Task RegisterAsync(AgentRegistrationRequest request, CancellationToken ct = default);
///
/// Process agent heartbeat.
///
/// Heartbeat request.
/// Cancellation token.
/// Response with commands.
Task HeartbeatAsync(AgentHeartbeatRequest request, CancellationToken ct = default);
///
/// Unregister an agent.
///
/// Agent identifier.
/// Cancellation token.
Task UnregisterAsync(string agentId, CancellationToken ct = default);
///
/// Get registration by agent ID.
///
/// Agent identifier.
/// Cancellation token.
/// Registration or null if not found.
Task GetAsync(string agentId, CancellationToken ct = default);
///
/// List all registered agents.
///
/// Cancellation token.
/// All registrations.
Task> ListAsync(CancellationToken ct = default);
///
/// List agents by platform.
///
/// Platform filter.
/// Cancellation token.
/// Matching registrations.
Task> ListByPlatformAsync(RuntimePlatform platform, CancellationToken ct = default);
///
/// List healthy agents (recent heartbeat).
///
/// Cancellation token.
/// Healthy registrations.
Task> ListHealthyAsync(CancellationToken ct = default);
///
/// Send command to an agent.
///
/// Agent identifier.
/// Command to send.
/// Cancellation token.
Task SendCommandAsync(string agentId, AgentCommand command, CancellationToken ct = default);
///
/// Update agent posture.
///
/// Agent identifier.
/// New posture.
/// Cancellation token.
Task UpdatePostureAsync(string agentId, RuntimePosture posture, CancellationToken ct = default);
}