- Add AgentState read model (Models/AgentState.cs) - Add IAgentStateRepository interface with GetAllAsync, GetBySessionKeyAsync, UpdateStatusAsync - Add AgentStateRepository EF Core implementation mapping Agent entity → AgentState model - Register IAgentStateRepository in DI (Program.cs) - Exclude ControlCenter sub-project from Api compilation Build: 0 warnings, 0 errors
19 lines
681 B
C#
19 lines
681 B
C#
namespace ControlCenter.Api.Models;
|
|
|
|
/// <summary>
|
|
/// Read-only model representing an agent's current state.
|
|
/// Used as the return type from the Agent State Repository
|
|
/// to decouple consumers from the persistence layer.
|
|
/// </summary>
|
|
public class AgentState
|
|
{
|
|
public Guid Id { get; set; }
|
|
public string Status { get; set; } = string.Empty;
|
|
public string? Task { get; set; }
|
|
public int? Progress { get; set; }
|
|
public string SessionKey { get; set; } = string.Empty;
|
|
public string Channel { get; set; } = string.Empty;
|
|
public DateTime LastActivity { get; set; }
|
|
public DateTime CreatedAt { get; set; }
|
|
public DateTime UpdatedAt { get; set; }
|
|
} |