fix(tool-subagent): default maxDepth to 3

This commit is contained in:
Tianyi Cui
2026-07-20 17:12:14 +08:00
parent 27f37942df
commit 1a1ff56ab7
6 changed files with 15 additions and 12 deletions
+2 -2
View File
@@ -54,7 +54,7 @@ export interface Config {
deny?: string[]
}
/**
* Maximum child depth: a non-negative safe integer (default `1`; `0` forbids
* Maximum child depth: a non-negative safe integer (default `3`; `0` forbids
* delegation entirely), or `'provider-managed'` to send no cap. A numeric cap
* requires the provider's `depthLimit` capability (mount fails loud
* otherwise), and a child AT the cap additionally loses this tool from its
@@ -81,7 +81,7 @@ export const Config: z<Config> = z.object({
allow: z.array(z.string()).default(undefined as unknown as string[]),
deny: z.array(z.string()).default(undefined as unknown as string[]),
}).default(undefined as unknown as { allow: string[]; deny: string[] }),
maxDepth: z.union([z.natural().max(Number.MAX_SAFE_INTEGER), z.const('provider-managed' as const)]).default(1),
maxDepth: z.union([z.natural().max(Number.MAX_SAFE_INTEGER), z.const('provider-managed' as const)]).default(3),
})
/**