MCPcopy Create free account
hub / github.com/AnukarOP/claude-code-leaked / executeTaskCompletedHooks

Function executeTaskCompletedHooks

source code/utils/hooks.ts:3791–3819  ·  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

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