test(subagent): update service, send_message, and delegation specs

The continuable path has no Task, so send_message reports a queued next turn
and continuable delegation returns only the durable child id. Pins that a
follow-up queues behind an open turn rather than steering it, and that a
non-parent caller is rejected.

Also makes startContinuable/followup reject rather than throw synchronously
when continuation services are absent, so callers have one failure mode.
This commit is contained in:
Dudu-0223
2026-07-30 13:33:46 +08:00
committed by Tianyi Cui
parent 1c30548068
commit 357f317b4c
4 changed files with 101 additions and 106 deletions

View File

@@ -198,7 +198,7 @@ export class SubagentService extends Service {
* @returns the durable child id and the accepted prompt's message id.
* @throws when continuation services are unavailable or materialization fails.
*/
startContinuable(spec: ContinuableStartSpec): Promise<ContinuableStart> {
async startContinuable(spec: ContinuableStartSpec): Promise<ContinuableStart> {
return this.requireContinuations().startContinuable(spec)
}
@@ -217,7 +217,7 @@ export class SubagentService extends Service {
* @throws when continuation services are unavailable, authority is rejected,
* or the message was not admitted.
*/
followup(
async followup(
authority: SubagentAuthority,
childId: SessionId,
content: ContentBlock[],
@@ -342,7 +342,7 @@ export class SubagentService extends Service {
private requireContinuations(): SubagentContinuationManager {
if (this.continuations === undefined) {
throw new SubagentError(
'continuable subagents require the tasks and agents services',
'continuable subagents require the agents service',
'CONTINUATION_UNAVAILABLE',
)
}