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

Function executeTaskCreatedHooks

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

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

Callers 1

callFunction · 0.85

Calls 2

createBaseHookInputFunction · 0.85
executeHooksFunction · 0.85

Tested by

no test coverage detected