zod-schema changes for tools and updating types.agents.ts to match my agents-default changes

This commit is contained in:
KraFourZee 2026-01-29 00:09:13 -05:00
parent ceed611745
commit 0857a5e423
2 changed files with 23 additions and 0 deletions

View File

@ -36,6 +36,8 @@ export type AgentConfig = {
allowAgents?: string[]; allowAgents?: string[];
/** Per-agent default model for spawned sub-agents (string or {primary,fallbacks}). */ /** Per-agent default model for spawned sub-agents (string or {primary,fallbacks}). */
model?: string | { primary?: string; fallbacks?: string[] }; model?: string | { primary?: string; fallbacks?: string[] };
/** Per-agent default thinking level for spawned sub-agents. */
thinking?: "off" | "minimal" | "low" | "medium" | "high" | "xhigh";
}; };
sandbox?: { sandbox?: {
mode?: "off" | "non-main" | "all"; mode?: "off" | "non-main" | "all";

View File

@ -524,6 +524,27 @@ export const ToolsSchema = z
subagents: z subagents: z
.object({ .object({
tools: ToolPolicySchema, tools: ToolPolicySchema,
model: z
.union([
z.string(),
z
.object({
primary: z.string().optional(),
fallbacks: z.array(z.string()).optional(),
})
.strict(),
])
.optional(),
thinking: z
.union([
z.literal("off"),
z.literal("minimal"),
z.literal("low"),
z.literal("medium"),
z.literal("high"),
z.literal("xhigh"),
])
.optional(),
}) })
.strict() .strict()
.optional(), .optional(),