( taskId: string, taskSubject: string, taskDescription?: string, teammateName?: string, teamName?: string, permissionMode?: string, signal?: AbortSignal, timeoutMs: number = TOOL_HOOK_EXECUTION_TIMEOUT_MS, toolUseContext?: ToolUseContext, )
| 3838 | * @returns Async generator that yields progress messages and blocking errors |
| 3839 | */ |
| 3840 | export async function* executeTaskCreatedHooks( |
| 3841 | taskId: string, |
| 3842 | taskSubject: string, |
| 3843 | taskDescription?: string, |
| 3844 | teammateName?: string, |
| 3845 | teamName?: string, |
| 3846 | permissionMode?: string, |
| 3847 | signal?: AbortSignal, |
| 3848 | timeoutMs: number = TOOL_HOOK_EXECUTION_TIMEOUT_MS, |
| 3849 | toolUseContext?: ToolUseContext, |
| 3850 | ): AsyncGenerator<AggregatedHookResult> { |
| 3851 | const hookInput: TaskCreatedHookInput = { |
| 3852 | ...createBaseHookInput(permissionMode), |
| 3853 | hook_event_name: 'TaskCreated', |
| 3854 | task_id: taskId, |
| 3855 | task_subject: taskSubject, |
| 3856 | task_description: taskDescription, |
| 3857 | teammate_name: teammateName, |
| 3858 | team_name: teamName, |
| 3859 | } |
| 3860 | |
| 3861 | yield* executeHooks({ |
| 3862 | hookInput, |
| 3863 | toolUseID: randomUUID(), |
| 3864 | signal, |
| 3865 | timeoutMs, |
| 3866 | toolUseContext, |
| 3867 | }) |
| 3868 | } |
| 3869 | |
| 3870 | /** |
| 3871 | * Execute TaskCompleted hooks when a task is being marked as completed. |
no test coverage detected