using Heimdall.Application.Common;
using Heimdall.Application.DTOs;
namespace Heimdall.Application.Services;
///
/// Manages global settings and per-agent setting overrides.
/// All changes are broadcast to connected agents via SignalR in real-time.
///
public interface ISettingService
{
// Global settings
Task>> GetAllSettingsAsync(CancellationToken ct = default);
Task> GetSettingByKeyAsync(string key, CancellationToken ct = default);
Task> CreateSettingAsync(CreateAppSettingRequest request, CancellationToken ct = default);
Task> UpdateSettingAsync(string key, UpdateAppSettingRequest request, CancellationToken ct = default);
Task DeleteSettingAsync(string key, CancellationToken ct = default);
// Agent-specific overrides
Task>> GetAgentSettingsAsync(Guid agentId, CancellationToken ct = default);
Task> SetAgentSettingAsync(Guid agentId, SetAgentSettingRequest request, CancellationToken ct = default);
Task RemoveAgentSettingAsync(Guid agentId, string key, CancellationToken ct = default);
///
/// Returns the effective configuration for an agent: global defaults merged with
/// per-agent overrides. Used by agents to fetch their full config on connect.
///
Task>> GetEffectiveAgentConfigAsync(Guid agentId, CancellationToken ct = default);
}