import { z } from "zod" import { FallbackModelsSchema } from "./fallback-models" export const CategoryConfigSchema = z.object({ /** Human-readable description of the category's purpose. Shown in task prompt. */ description: z.string().optional(), model: z.string().optional(), fallback_models: FallbackModelsSchema.optional(), variant: z.string().optional(), temperature: z.number().min(0).max(2).optional(), top_p: z.number().min(0).max(1).optional(), maxTokens: z.number().optional(), thinking: z .object({ type: z.enum(["enabled", "disabled"]), budgetTokens: z.number().optional(), }) .optional(), reasoningEffort: z.enum(["low", "medium", "high", "xhigh"]).optional(), textVerbosity: z.enum(["low", "medium", "high"]).optional(), tools: z.record(z.string(), z.boolean()).optional(), prompt_append: z.string().optional(), max_prompt_tokens: z.number().int().positive().optional(), /** Mark agent as unstable - forces background mode for monitoring. Auto-enabled for gemini/minimax models. */ is_unstable_agent: z.boolean().optional(), /** Disable this category. Disabled categories are excluded from task delegation. */ disable: z.boolean().optional(), }) export const BuiltinCategoryNameSchema = z.enum([ "visual-engineering", "ultrabrain", "deep", "artistry", "quick", "unspecified-low", "unspecified-high", "writing", ]) export const CategoriesConfigSchema = z.record(z.string(), CategoryConfigSchema) export type CategoryConfig = z.infer export type CategoriesConfig = z.infer export type BuiltinCategoryName = z.infer