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

Function executeTaskCompletedHooks

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

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

Callers 2

callFunction · 0.85
handleStopHooksFunction · 0.85

Calls 3

randomUUIDFunction · 0.90
createBaseHookInputFunction · 0.85
executeHooksFunction · 0.85

Tested by

no test coverage detected