fix: address codex review round 1

- listChildren() takes an optional AbortSignal and rechecks it after every
  un-signalled session-query await (the cold-resume cooperative-cancellation
  boundary); list_agents forwards exec.signal so the registry's drain of
  started tool bodies cannot block on a slow or large catalog.
- The list_agents description now presents running/complete as a stored-record
  snapshot and defers deliverability to send_message, matching the ownership-
  conflict semantics the service tests pin.
This commit is contained in:
Dudu-0223
2026-07-26 23:00:47 +08:00
committed by Tianyi Cui
parent 8bbae77ae6
commit 4bd98407a9
15 changed files with 99 additions and 22 deletions

View File

@@ -1997,11 +1997,15 @@ async drainContinuableDescendants(parents: readonly Agent[]): Promise<void>
* live-preferred corpus without loading or resuming an Agent. The lineage
* trace supplies stable candidate order and live status; each candidate is
* then inspected independently for exactly one supported descriptor in its
* own suffix.
* own suffix. Session-query reads take no signal, so cancellation is
* cooperative: the scan rechecks `signal` after every un-signalled await and
* stops between candidates instead of draining a slow or large catalog after
* the caller has gone.
* @param parentSessionId - parent whose direct children are listed.
* @param signal - caller-owned cancellation observed between query awaits.
* @returns child and diagnostic entries in lineage-trace order.
*/
async listChildren(parentSessionId: SessionId): Promise<SubagentListEntry[]>
async listChildren(parentSessionId: SessionId, signal?: AbortSignal): Promise<SubagentListEntry[]>
/**
* Register a provider under its name. Registration is effect-scoped and HMR