hooksExec returns the pre-built [hooks.Executor] for a, or nil when the agent has no hooks (see [buildHooksExecutors]).
(a *agent.Agent)
| 72 | // hooksExec returns the pre-built [hooks.Executor] for a, or nil when |
| 73 | // the agent has no hooks (see [buildHooksExecutors]). |
| 74 | func (r *LocalRuntime) hooksExec(a *agent.Agent) *hooks.Executor { |
| 75 | if a == nil { |
| 76 | return nil |
| 77 | } |
| 78 | return r.hooksExecByAgent[a.Name()] |
| 79 | } |
| 80 | |
| 81 | // dispatchHook is the common dispatch path shared by every hook |
| 82 | // callsite: resolve the pre-built executor, dispatch, and emit any |