Skip to content

HookRegistry

reference
1 min readUpdated

Kind: Class

Source: atloria-monorepo/libs/agent-core/src/session/hook-registry.ts

Methods

MethodSignatureReturns
hashas(event: HookableEvent)boolean
runrun(event: HookableEvent, data: Record<string, unknown>, toolName: string)Promise<HookRunResult>

Where it refuses work

  • HookRegistry stops the work with an early return when !hooks || hooks.length === 0.
  • HookRegistry stops the work with an early return when result.blocked.

When something fails

  • HookRegistry handles failure in 3 places: it discards it silently in 2, and turns it into a return value in 1.

Was this page helpful?

Download as PDF