M3: Agent bound to a seat — configure an AI seat
OrgBoard: Agent entity (name, monogram, autonomy dial, ApiConfigId + optional fallback,
skill keys, docs) + AddAgents migration; one agent per seat. References Skills by key and
the BYOK config by id — never reaches into those modules.
Endpoints: POST/GET /api/orgboard/seats (create/list seats), POST/GET
/api/orgboard/seats/{id}/agent (configure/read the agent) — ConfigureAgents at [team, org].
Configuring an agent flips the seat to the AI state and points it at the agent; audited.
Verified: build green; ArchitectureTests 8/8; IntegrationTests 27/27 incl. the M3 acceptance
flow — owner adds a BYOK config, then configures "Aria" (gated autonomy, skills, that config)
on a seat, flipping it to AI, with the key never exposed.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -10,6 +10,7 @@ internal sealed class OrgBoardDbContext(DbContextOptions<OrgBoardDbContext> opti
|
||||
public DbSet<Organization> Organizations => Set<Organization>();
|
||||
public DbSet<Team> Teams => Set<Team>();
|
||||
public DbSet<Seat> Seats => Set<Seat>();
|
||||
public DbSet<Agent> Agents => Set<Agent>();
|
||||
public DbSet<WorkItem> WorkItems => Set<WorkItem>();
|
||||
|
||||
protected override void OnModelCreating(ModelBuilder modelBuilder)
|
||||
@@ -40,6 +41,16 @@ internal sealed class OrgBoardDbContext(DbContextOptions<OrgBoardDbContext> opti
|
||||
seat.HasIndex(s => s.TeamId);
|
||||
});
|
||||
|
||||
modelBuilder.Entity<Agent>(agent =>
|
||||
{
|
||||
agent.ToTable("agents");
|
||||
agent.HasKey(a => a.Id);
|
||||
agent.Property(a => a.Name).HasMaxLength(120).IsRequired();
|
||||
agent.Property(a => a.Monogram).HasMaxLength(8);
|
||||
agent.Property(a => a.Autonomy).HasConversion<string>().HasMaxLength(20);
|
||||
agent.HasIndex(a => a.SeatId).IsUnique();
|
||||
});
|
||||
|
||||
modelBuilder.Entity<WorkItem>(workItem =>
|
||||
{
|
||||
workItem.ToTable("work_items");
|
||||
|
||||
Reference in New Issue
Block a user