import { IsString, IsUUID, IsInt, IsIn, Min } from "class-validator"; import type { TaskComplexity } from "../interfaces"; /** * DTO for allocating a token budget for a task */ export class AllocateBudgetDto { @IsUUID("4", { message: "taskId must be a valid UUID" }) taskId!: string; @IsUUID("4", { message: "workspaceId must be a valid UUID" }) workspaceId!: string; @IsString({ message: "agentId must be a string" }) agentId!: string; @IsIn(["low", "medium", "high", "critical"], { message: "complexity must be one of: low, medium, high, critical", }) complexity!: TaskComplexity; @IsInt({ message: "allocatedTokens must be an integer" }) @Min(1, { message: "allocatedTokens must be at least 1" }) allocatedTokens!: number; }