( taskId: string, taskSubject: string, taskDescription?: string, teammateName?: string, teamName?: string, permissionMode?: string, signal?: AbortSignal, timeoutMs: number = TOOL_HOOK_EXECUTION_TIMEOUT_MS, toolUseContext?: ToolUseContext, )
| 3743 | * @returns Async generator that yields progress messages and blocking errors |
| 3744 | */ |
| 3745 | export async function* executeTaskCreatedHooks( |
| 3746 | taskId: string, |
| 3747 | taskSubject: string, |
| 3748 | taskDescription?: string, |
| 3749 | teammateName?: string, |
| 3750 | teamName?: string, |
| 3751 | permissionMode?: string, |
| 3752 | signal?: AbortSignal, |
| 3753 | timeoutMs: number = TOOL_HOOK_EXECUTION_TIMEOUT_MS, |
| 3754 | toolUseContext?: ToolUseContext, |
| 3755 | ): AsyncGenerator<AggregatedHookResult> { |
| 3756 | const hookInput: TaskCreatedHookInput = { |
| 3757 | ...createBaseHookInput(permissionMode), |
| 3758 | hook_event_name: 'TaskCreated', |
| 3759 | task_id: taskId, |
| 3760 | task_subject: taskSubject, |
| 3761 | task_description: taskDescription, |
| 3762 | teammate_name: teammateName, |
| 3763 | team_name: teamName, |
| 3764 | } |
| 3765 | |
| 3766 | yield* executeHooks({ |
| 3767 | hookInput, |
| 3768 | toolUseID: randomUUID(), |
| 3769 | signal, |
| 3770 | timeoutMs, |
| 3771 | toolUseContext, |
| 3772 | }) |
| 3773 | } |
| 3774 | |
| 3775 | /** |
| 3776 | * Execute TaskCompleted hooks when a task is being marked as completed. |
no test coverage detected