using Nexus.Api.Data;
using Nexus.Api.Models;

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,
    Guid? RunId = null,
    string State = "unknown",
    OperationResultDto? Operation = null);

public interface IAgentRuntime
{
    string Name { get; }
    Task<AgentRuntimeStatus> GetStatusAsync(CancellationToken cancellationToken);
}

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