docs(subagent): close review contract gaps

This commit is contained in:
Tianyi Cui
2026-07-20 18:10:31 +08:00
parent 75e98d6974
commit ff6359a0cd
5 changed files with 7 additions and 6 deletions

View File

@@ -72,6 +72,7 @@ declare module '@deepseek-ai/dsh-agent' {
* let it delegate as if it were top-level.
* @param agent - the agent whose header and options carry the depth.
* @returns its non-negative safe-integer depth.
* @throws if the runtime `AgentOptions.subagentDepth` is not a non-negative safe integer.
*/
export function delegationDepthOf(agent: Agent): number {
const runtime = agent.options.subagentDepth