using System;

namespace AIRuntime.Runtime.Services.Agent
{
    public enum AgentEventType
    {
        RunStarted,

        ToolStarted,
        ToolCompleted,
        ToolFailed,

        RunCompleted,
        RunCancelled,
        RunTimedOut,
        RunFailed,

        ModelResponseRepair,

        ModelResponseNormalized
    }


    /// <summary>
    /// Single observable event during an agent run.
    /// </summary>
    public sealed class AgentEvent
    {
        public AgentEventType Type { get; }

        public string SessionId { get; }

        public string ToolName { get; }

        public string Message { get; }

        public DateTime Timestamp { get; }


        public AgentEvent(
            AgentEventType type,
            string sessionId,
            string toolName = null,
            string message = null)
        {
            Type = type;

            SessionId =
                sessionId;

            ToolName =
                toolName;

            Message =
                message;

            Timestamp =
                DateTime.UtcNow;
        }
    }
}
