* Detach a running foreground task so the current tool call can return while * the task continues under background-task management.
(taskId: string)
| 365 | * the task continues under background-task management. |
| 366 | */ |
| 367 | async detachBackgroundTask(taskId: string): Promise<BackgroundTaskInfo | undefined> { |
| 368 | this.ensureOpen(); |
| 369 | const trimmedTaskId = normalizeRequiredString( |
| 370 | taskId, |
| 371 | 'Task id cannot be empty', |
| 372 | ErrorCodes.BACKGROUND_TASK_ID_EMPTY, |
| 373 | ); |
| 374 | return this.rpc.detachBackgroundTask({ |
| 375 | sessionId: this.id, |
| 376 | taskId: trimmedTaskId, |
| 377 | }); |
| 378 | } |
| 379 | |
| 380 | /** |
| 381 | * Block until every still-running background task (across all agents in this |
no test coverage detected