using ControlCenter.Models;
namespace ControlCenter.Repositories;
///
/// Repository interface for querying and updating agent state.
///
/// Provides the data-access contract used by controllers,
/// background services, and SignalR hubs to read and mutate
/// persistent agent state.
///
/// Implementation should use
/// via EF Core with PostgreSQL (snake_case columns).
///
public interface IAgentStateRepository
{
///
/// Returns all agent states from the database.
///
/// A collection of all records.
Task> GetAllAsync();
///
/// Finds an agent state by its session key.
///
/// The full session key, e.g. "agent:dex:telegram:direct:...".
/// The matching , or null if not found.
Task GetBySessionKeyAsync(string sessionKey);
///
/// Updates the status of an agent state record.
/// Also updates LastActivity to .
///
/// The unique identifier of the agent state record.
/// The new status value ("active", "idle", "thinking", "error").
/// The updated , or null if the record was not found.
Task UpdateStatusAsync(Guid id, string status);
}