MCPcopy
hub / github.com/codeaashu/claude-code / executeTaskCompletedHooks

Function executeTaskCompletedHooks

src/utils/hooks.ts:3789–3817  ·  view source on GitHub ↗
(
  taskId: string,
  taskSubject: string,
  taskDescription?: string,
  teammateName?: string,
  teamName?: string,
  permissionMode?: string,
  signal?: AbortSignal,
  timeoutMs: number = TOOL_HOOK_EXECUTION_TIMEOUT_MS,
  toolUseContext?: ToolUseContext,
)

Source from the content-addressed store, hash-verified

3787 * @returns Async generator that yields progress messages and blocking errors
3788 */
3789export async function* executeTaskCompletedHooks(
3790 taskId: string,
3791 taskSubject: string,
3792 taskDescription?: string,
3793 teammateName?: string,
3794 teamName?: string,
3795 permissionMode?: string,
3796 signal?: AbortSignal,
3797 timeoutMs: number = TOOL_HOOK_EXECUTION_TIMEOUT_MS,
3798 toolUseContext?: ToolUseContext,
3799): AsyncGenerator<AggregatedHookResult> {
3800 const hookInput: TaskCompletedHookInput = {
3801 ...createBaseHookInput(permissionMode),
3802 hook_event_name: 'TaskCompleted',
3803 task_id: taskId,
3804 task_subject: taskSubject,
3805 task_description: taskDescription,
3806 teammate_name: teammateName,
3807 team_name: teamName,
3808 }
3809
3810 yield* executeHooks({
3811 hookInput,
3812 toolUseID: randomUUID(),
3813 signal,
3814 timeoutMs,
3815 toolUseContext,
3816 })
3817}
3818
3819/**
3820 * Execute start hooks if configured

Callers 2

callFunction · 0.85
handleStopHooksFunction · 0.85

Calls 2

createBaseHookInputFunction · 0.85
executeHooksFunction · 0.85

Tested by

no test coverage detected