package dev.sonpx.loyalty.agent.domain;

import com.fasterxml.jackson.annotation.JsonInclude;

@JsonInclude(JsonInclude.Include.NON_NULL)
public record AgentEvent(String type, String messageId, String content, String tool, String status) {
    public static AgentEvent token(String messageId, String content) {
        return new AgentEvent("TOKEN", messageId, content, null, null);
    }
    public static AgentEvent toolStatus(String messageId, String tool, String status) {
        return new AgentEvent("TOOL_STATUS", messageId, null, tool, status);
    }
    public static AgentEvent done(String messageId) {
        return new AgentEvent("DONE", messageId, null, null, null);
    }
    public static AgentEvent error(String messageId, String error) {
        return new AgentEvent("ERROR", messageId, error, null, null);
    }
}
