e202246a1c
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>
54 lines
2.2 KiB
C#
54 lines
2.2 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using Microsoft.EntityFrameworkCore.Migrations;
|
|
|
|
#nullable disable
|
|
|
|
namespace TeamUp.Modules.OrgBoard.Persistence.Migrations
|
|
{
|
|
/// <inheritdoc />
|
|
public partial class AddAgents : Migration
|
|
{
|
|
/// <inheritdoc />
|
|
protected override void Up(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.CreateTable(
|
|
name: "agents",
|
|
schema: "orgboard",
|
|
columns: table => new
|
|
{
|
|
Id = table.Column<Guid>(type: "uuid", nullable: false),
|
|
SeatId = table.Column<Guid>(type: "uuid", nullable: false),
|
|
Name = table.Column<string>(type: "character varying(120)", maxLength: 120, nullable: false),
|
|
Monogram = table.Column<string>(type: "character varying(8)", maxLength: 8, nullable: true),
|
|
Autonomy = table.Column<string>(type: "character varying(20)", maxLength: 20, nullable: false),
|
|
ApiConfigId = table.Column<Guid>(type: "uuid", nullable: false),
|
|
FallbackApiConfigId = table.Column<Guid>(type: "uuid", nullable: true),
|
|
SkillKeys = table.Column<List<string>>(type: "text[]", nullable: false),
|
|
Docs = table.Column<List<string>>(type: "text[]", nullable: false),
|
|
CreatedAtUtc = table.Column<DateTimeOffset>(type: "timestamp with time zone", nullable: false),
|
|
UpdatedAtUtc = table.Column<DateTimeOffset>(type: "timestamp with time zone", nullable: false)
|
|
},
|
|
constraints: table =>
|
|
{
|
|
table.PrimaryKey("PK_agents", x => x.Id);
|
|
});
|
|
|
|
migrationBuilder.CreateIndex(
|
|
name: "IX_agents_SeatId",
|
|
schema: "orgboard",
|
|
table: "agents",
|
|
column: "SeatId",
|
|
unique: true);
|
|
}
|
|
|
|
/// <inheritdoc />
|
|
protected override void Down(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.DropTable(
|
|
name: "agents",
|
|
schema: "orgboard");
|
|
}
|
|
}
|
|
}
|