fix(core): limit v2 subagent nesting depth (#37291)
This commit is contained in:
parent
198ca749fd
commit
d01dfa57b7
7 changed files with 116 additions and 0 deletions
|
|
@ -175,6 +175,9 @@ export const Info = Schema.Struct({
|
|||
primary_tools: Schema.optional(Schema.mutable(Schema.Array(Schema.String))).annotate({
|
||||
description: "Tools that should only be available to primary agents.",
|
||||
}),
|
||||
subagent_depth: Schema.optional(NonNegativeInt).annotate({
|
||||
description: "Maximum subagent nesting depth. Defaults to 1.",
|
||||
}),
|
||||
continue_loop_on_deny: Schema.optional(Schema.Boolean).annotate({
|
||||
description: "Continue the agent loop when a tool call is denied",
|
||||
}),
|
||||
|
|
|
|||
|
|
@ -77,6 +77,10 @@ export function migrate(info: typeof ConfigV1.Info.Type) {
|
|||
commands: commands(info.command),
|
||||
instructions: info.instructions,
|
||||
references: info.references ?? info.reference,
|
||||
experimental:
|
||||
info.experimental?.subagent_depth === undefined
|
||||
? undefined
|
||||
: { subagent_depth: info.experimental.subagent_depth },
|
||||
plugins: info.plugin?.map((plugin) =>
|
||||
typeof plugin === "string" ? plugin : { package: plugin[0], options: plugin[1] },
|
||||
),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue