( taskId: string, taskSubject: string, taskDescription?: string, teammateName?: string, teamName?: string, permissionMode?: string, signal?: AbortSignal, timeoutMs: number = TOOL_HOOK_EXECUTION_TIMEOUT_MS, toolUseContext?: ToolUseContext, )
| 3791 | * @returns Async generator that yields progress messages and blocking errors |
| 3792 | */ |
| 3793 | export async function* executeTaskCompletedHooks( |
| 3794 | taskId: string, |
| 3795 | taskSubject: string, |
| 3796 | taskDescription?: string, |
| 3797 | teammateName?: string, |
| 3798 | teamName?: string, |
| 3799 | permissionMode?: string, |
| 3800 | signal?: AbortSignal, |
| 3801 | timeoutMs: number = TOOL_HOOK_EXECUTION_TIMEOUT_MS, |
| 3802 | toolUseContext?: ToolUseContext, |
| 3803 | ): AsyncGenerator<AggregatedHookResult> { |
| 3804 | const hookInput: TaskCompletedHookInput = { |
| 3805 | ...createBaseHookInput(permissionMode), |
| 3806 | hook_event_name: 'TaskCompleted', |
| 3807 | task_id: taskId, |
| 3808 | task_subject: taskSubject, |
| 3809 | task_description: taskDescription, |
| 3810 | teammate_name: teammateName, |
| 3811 | team_name: teamName, |
| 3812 | } |
| 3813 | |
| 3814 | yield* executeHooks({ |
| 3815 | hookInput, |
| 3816 | toolUseID: randomUUID(), |
| 3817 | signal, |
| 3818 | timeoutMs, |
| 3819 | toolUseContext, |
| 3820 | }) |
| 3821 | } |
| 3822 | |
| 3823 | /** |
| 3824 | * Execute start hooks if configured |
no test coverage detected