( taskId: string, taskSubject: string, taskDescription?: string, teammateName?: string, teamName?: string, permissionMode?: string, signal?: AbortSignal, timeoutMs: number = TOOL_HOOK_EXECUTION_TIMEOUT_MS, toolUseContext?: ToolUseContext, )
| 3882 | * @returns Async generator that yields progress messages and blocking errors |
| 3883 | */ |
| 3884 | export async function* executeTaskCompletedHooks( |
| 3885 | taskId: string, |
| 3886 | taskSubject: string, |
| 3887 | taskDescription?: string, |
| 3888 | teammateName?: string, |
| 3889 | teamName?: string, |
| 3890 | permissionMode?: string, |
| 3891 | signal?: AbortSignal, |
| 3892 | timeoutMs: number = TOOL_HOOK_EXECUTION_TIMEOUT_MS, |
| 3893 | toolUseContext?: ToolUseContext, |
| 3894 | ): AsyncGenerator<AggregatedHookResult> { |
| 3895 | const hookInput: TaskCompletedHookInput = { |
| 3896 | ...createBaseHookInput(permissionMode), |
| 3897 | hook_event_name: 'TaskCompleted', |
| 3898 | task_id: taskId, |
| 3899 | task_subject: taskSubject, |
| 3900 | task_description: taskDescription, |
| 3901 | teammate_name: teammateName, |
| 3902 | team_name: teamName, |
| 3903 | } |
| 3904 | |
| 3905 | yield* executeHooks({ |
| 3906 | hookInput, |
| 3907 | toolUseID: randomUUID(), |
| 3908 | signal, |
| 3909 | timeoutMs, |
| 3910 | toolUseContext, |
| 3911 | }) |
| 3912 | } |
| 3913 | |
| 3914 | /** |
| 3915 | * Execute start hooks if configured |
no test coverage detected