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

Function executeTaskCompletedHooks

src/utils/hooks.ts:3884–3912  ·  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

3882 * @returns Async generator that yields progress messages and blocking errors
3883 */
3884export async function* executeTaskCompletedHooks(
3885 taskId: string,
3886 taskSubject: string,
3887 taskDescription?: string,
3888 teammateName?: string,
3889 teamName?: string,
3890 permissionMode?: string,
3891 signal?: AbortSignal,
3892 timeoutMs: number = TOOL_HOOK_EXECUTION_TIMEOUT_MS,
3893 toolUseContext?: ToolUseContext,
3894): AsyncGenerator<AggregatedHookResult> {
3895 const hookInput: TaskCompletedHookInput = {
3896 ...createBaseHookInput(permissionMode),
3897 hook_event_name: 'TaskCompleted',
3898 task_id: taskId,
3899 task_subject: taskSubject,
3900 task_description: taskDescription,
3901 teammate_name: teammateName,
3902 team_name: teamName,
3903 }
3904
3905 yield* executeHooks({
3906 hookInput,
3907 toolUseID: randomUUID(),
3908 signal,
3909 timeoutMs,
3910 toolUseContext,
3911 })
3912}
3913
3914/**
3915 * 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