fix(acp): scope connection-owned continuation drain

This commit is contained in:
Dudu-0223
2026-07-31 13:51:46 +08:00
committed by Tianyi Cui
parent 8f3613c4b7
commit 191c8cd640
22 changed files with 522 additions and 118 deletions

View File

@@ -1989,6 +1989,18 @@ async followup( parent: Agent, childId: SessionId, content: ContentBlock[], opti
*/
async drainContinuable(): Promise<void>
/**
* Close continuable admission below exact live parent Agents, stop only their
* visible descendant Activations synchronously, then await admitted scoped
* materializations and release those forests child-first. The scoped cutoff
* lasts until each exact parent leaves the registry; unrelated parent trees
* remain live.
* @param parents - exact host-owned parent Agents entering teardown.
* @returns once every retained descendant Activation released its `AgentHandle`.
* @throws an aggregate error after all scoped branches settle when any failed.
*/
async drainContinuableDescendants(parents: readonly Agent[]): Promise<void>
/**
* Register a provider under its name. Registration is effect-scoped and HMR
* safe; removing a provider blocks new starts but does not revoke runs that