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:
@@ -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',
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user