( taskId: string, taskSubject: string, taskDescription?: string, teammateName?: string, teamName?: string, permissionMode?: string, signal?: AbortSignal, timeoutMs: number = TOOL_HOOK_EXECUTION_TIMEOUT_MS, toolUseContext?: ToolUseContext, )
| 3946 | * @returns Async generator that yields progress messages and blocking errors |
| 3947 | */ |
| 3948 | export async function* executeTaskCompletedHooks( |
| 3949 | taskId: string, |
| 3950 | taskSubject: string, |
| 3951 | taskDescription?: string, |
| 3952 | teammateName?: string, |
| 3953 | teamName?: string, |
| 3954 | permissionMode?: string, |
| 3955 | signal?: AbortSignal, |
| 3956 | timeoutMs: number = TOOL_HOOK_EXECUTION_TIMEOUT_MS, |
| 3957 | toolUseContext?: ToolUseContext, |
| 3958 | ): AsyncGenerator<AggregatedHookResult> { |
| 3959 | const hookInput: TaskCompletedHookInput = { |
| 3960 | ...createBaseHookInput(permissionMode), |
| 3961 | hook_event_name: 'TaskCompleted', |
| 3962 | task_id: taskId, |
| 3963 | task_subject: taskSubject, |
| 3964 | task_description: taskDescription, |
| 3965 | teammate_name: teammateName, |
| 3966 | team_name: teamName, |
| 3967 | } |
| 3968 | |
| 3969 | yield* executeHooks({ |
| 3970 | hookInput, |
| 3971 | toolUseID: randomUUID(), |
| 3972 | signal, |
| 3973 | timeoutMs, |
| 3974 | toolUseContext, |
| 3975 | }) |
| 3976 | } |
| 3977 | |
| 3978 | /** |
| 3979 | * Execute start hooks if configured |
no test coverage detected