( taskId: string, taskSubject: string, taskDescription?: string, teammateName?: string, teamName?: string, permissionMode?: string, signal?: AbortSignal, timeoutMs: number = TOOL_HOOK_EXECUTION_TIMEOUT_MS, toolUseContext?: ToolUseContext, )
| 3902 | * @returns Async generator that yields progress messages and blocking errors |
| 3903 | */ |
| 3904 | export async function* executeTaskCreatedHooks( |
| 3905 | taskId: string, |
| 3906 | taskSubject: string, |
| 3907 | taskDescription?: string, |
| 3908 | teammateName?: string, |
| 3909 | teamName?: string, |
| 3910 | permissionMode?: string, |
| 3911 | signal?: AbortSignal, |
| 3912 | timeoutMs: number = TOOL_HOOK_EXECUTION_TIMEOUT_MS, |
| 3913 | toolUseContext?: ToolUseContext, |
| 3914 | ): AsyncGenerator<AggregatedHookResult> { |
| 3915 | const hookInput: TaskCreatedHookInput = { |
| 3916 | ...createBaseHookInput(permissionMode), |
| 3917 | hook_event_name: 'TaskCreated', |
| 3918 | task_id: taskId, |
| 3919 | task_subject: taskSubject, |
| 3920 | task_description: taskDescription, |
| 3921 | teammate_name: teammateName, |
| 3922 | team_name: teamName, |
| 3923 | } |
| 3924 | |
| 3925 | yield* executeHooks({ |
| 3926 | hookInput, |
| 3927 | toolUseID: randomUUID(), |
| 3928 | signal, |
| 3929 | timeoutMs, |
| 3930 | toolUseContext, |
| 3931 | }) |
| 3932 | } |
| 3933 | |
| 3934 | /** |
| 3935 | * Execute TaskCompleted hooks when a task is being marked as completed. |
no test coverage detected