using FrameworkDAL.DTO.EIPConversation; using GB5Shared.DTO.Framework.Login; using System.Collections.Generic; using System.Threading; using System.Threading.Tasks; namespace FrameworkBLL.EIPConversation.EIPHandlers.EIPPlayground { /// /// Stateless flow-test facility. /// Accepts raw flow JSON + a user message + prior session state, /// executes the flow engine in-process without any DB session, /// and returns the bot response plus updated session state for /// the next round-trip. /// public interface IEIPPlaygroundBLL { Task RunAsync( PlaygroundRunRequest request, LoginDTO login, CancellationToken ct = default); } public class PlaygroundRunRequest { /// Full flow definition JSON (EIPFlowDefinitionDTO shape). public string FlowJson { get; set; } = string.Empty; /// The user's message for this turn. public string Message { get; set; } = string.Empty; /// /// Session state returned from the previous turn. /// Null or empty on the first turn — conversation starts from StartStepCode. /// public string? SessionStateJson { get; set; } } public class PlaygroundRunResponse { public string? ResponseMessage { get; set; } public string? CurrentStepCode { get; set; } public string? NextStepCode { get; set; } public bool IsCompleted { get; set; } public string? ErrorMessage { get; set; } public List PhaseTrace { get; set; } = new(); /// /// Pass this back as SessionStateJson on the next turn. /// Empty JSON object "{}" when the conversation is complete. /// public string SessionStateJson { get; set; } = "{}"; } }