using Nexus.Api.Data;

namespace Nexus.Api.Integrations;

public sealed record AgentRuntimeStatus(
    string Runtime,
    OperationalStatus Status,
    TimeSpan? Latency,
    string? Detail);

public sealed record ModelProviderStatus(
    string Provider,
    string Model,
    OperationalStatus Status,
    bool IsLocal,
    string? Detail);

public sealed record AgentChatResult(
    string Runtime,
    string AgentId,
    string ConversationId,
    string Content);

public interface IAgentRuntime
{
    string Name { get; }
    Task<AgentRuntimeStatus> GetStatusAsync(CancellationToken cancellationToken);
    Task<AgentChatResult> ChatAsync(
        string message,
        string conversationId,
        string agentId,
        CancellationToken cancellationToken);
}

public interface IModelProvider
{
    string Name { get; }
    Task<IReadOnlyCollection<ModelProviderStatus>> GetModelsAsync(CancellationToken cancellationToken);
}
