MCPcopy Create free account
hub / github.com/Noumena-Network/code / executeTaskCreatedHooks

Function executeTaskCreatedHooks

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

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

Callers 1

callFunction · 0.85

Calls 3

randomUUIDFunction · 0.90
createBaseHookInputFunction · 0.85
executeHooksFunction · 0.85

Tested by

no test coverage detected