feat(ms22-p2): add UserAgent CRUD endpoints
All checks were successful
ci/woodpecker/push/ci Pipeline was successful

- UserAgentService with findAll, findOne, create, update, remove
- UserAgentController at /api/agents (authenticated, user-scoped)
- createFromTemplate endpoint to instantiate from AgentTemplate
- Update TASKS.md and MISSION-MANIFEST.md for P2-004

Task: MS22-P2-004

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-04 20:38:38 -06:00
parent ee4d6fa12b
commit 5c7f35f881
9 changed files with 284 additions and 17 deletions

View File

@@ -0,0 +1,43 @@
import { IsString, IsBoolean, IsOptional, IsArray, MinLength } from "class-validator";
export class CreateUserAgentDto {
@IsString()
@MinLength(1)
templateId?: string;
@IsString()
@MinLength(1)
name!: string;
@IsString()
@MinLength(1)
displayName!: string;
@IsString()
@MinLength(1)
role!: string;
@IsString()
@MinLength(1)
personality!: string;
@IsString()
@IsOptional()
primaryModel?: string;
@IsArray()
@IsOptional()
fallbackModels?: string[];
@IsArray()
@IsOptional()
toolPermissions?: string[];
@IsString()
@IsOptional()
discordChannel?: string;
@IsBoolean()
@IsOptional()
isActive?: boolean;
}