Files
stack/apps/api/src/token-budget/dto/allocate-budget.dto.ts
Jason Woltje 903109ea40
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
docs: Add overlap analysis for non-AI coordinator patterns
Detailed comparison showing:
- Existing doc addresses L-015 (premature completion)
- New doc addresses context exhaustion (multi-issue orchestration)
- ~20% overlap (both use non-AI coordinator, mechanical gates)
- 80% complementary (different problems, different solutions)

Recommends merging into comprehensive document (already done).

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-31 14:47:59 -06:00

26 lines
763 B
TypeScript

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;
}