cleanup(subagent): hide manager-wide continuation drain

This commit is contained in:
Dudu-0223
2026-07-31 14:24:35 +08:00
committed by Tianyi Cui
parent 191c8cd640
commit f4a65a34e6
14 changed files with 41 additions and 66 deletions

View File

@@ -201,20 +201,6 @@ export class SubagentService extends Service {
return this.requireContinuations().followup(parent, childId, content, options)
}
/**
* Close continuable admission synchronously, then dispose every live
* Activation forest child-first. A host calls this before disposing top-level
* agents so no descendant outlives the runtime that owns its teardown.
* @returns once every live Activation released its `AgentHandle`.
* @throws an aggregate error after all branches settle when any failed.
*/
async drainContinuable(): Promise<void> {
const manager = this.continuations
// Absent continuation services means nothing was ever materialized.
if (manager === undefined) return
await manager.drain()
}
/**
* Close continuable admission below exact live parent Agents, stop only their
* visible descendant Activations synchronously, then await admitted scoped