fix(subagent): validate depth config at load

This commit is contained in:
Tianyi Cui
2026-07-12 10:33:29 +08:00
parent 9fc2260bb6
commit 48067c3a7a
4 changed files with 32 additions and 6 deletions

View File

@@ -893,8 +893,9 @@ export interface Config {
* Recursion cap applied to every child this tool spawns (see
* `SubagentStartRequest.maxDepth`): a spawn whose child would sit deeper
* than this in the delegation tree is rejected. Requires the provider's
* `depthLimit` capability. Omitted ⇒ unbounded (bound it in deployments
* that expose this tool to children).
* `depthLimit` capability. Must be a non-negative safe integer and is
* validated when the plugin loads. Omitted ⇒ unbounded (bound it in
* deployments that expose this tool to children).
*/
maxDepth?: number
}