using TeamUp.SharedKernel.Access; using TeamUp.SharedKernel.Domain; namespace TeamUp.Modules.OrgBoard.Domain; /// /// The AI staffing an open seat: identity (name, monogram) + matched skill atoms + autonomy + /// the model config + docs. References Skills by key and the BYOK ApiConfig by id — never reaches /// into those modules' tables. One agent per seat. /// internal sealed class Agent : Entity { public Guid SeatId { get; private set; } public string Name { get; private set; } = null!; public string? Monogram { get; private set; } public Autonomy Autonomy { get; private set; } public Guid ApiConfigId { get; private set; } public Guid? FallbackApiConfigId { get; private set; } public List SkillKeys { get; private set; } = []; /// Ids of the org's MCP servers this agent may use (resolved at run time). public List McpServerIds { get; private set; } = []; public List Docs { get; private set; } = []; public DateTimeOffset CreatedAtUtc { get; private set; } public DateTimeOffset UpdatedAtUtc { get; private set; } private Agent() { } public Agent(Guid seatId, DateTimeOffset createdAtUtc) { SeatId = seatId; CreatedAtUtc = createdAtUtc; UpdatedAtUtc = createdAtUtc; } public void Configure( string name, string? monogram, Autonomy autonomy, Guid apiConfigId, Guid? fallbackApiConfigId, List skillKeys, List mcpServerIds, List docs, DateTimeOffset nowUtc) { Name = name; Monogram = monogram; Autonomy = autonomy; ApiConfigId = apiConfigId; FallbackApiConfigId = fallbackApiConfigId; SkillKeys = skillKeys; McpServerIds = mcpServerIds; Docs = docs; UpdatedAtUtc = nowUtc; } }