MCPcopy Index your code
hub / github.com/docker/docker-agent / executeTurnEndHooks

Method executeTurnEndHooks

pkg/runtime/hooks.go:203–209  ·  view source on GitHub ↗

executeTurnEndHooks fires turn_end once per turn — symmetric to turn_start. Observational; the result is discarded. Reason is one of the turnEndReason* constants above and is reported via [hooks.Input.Reason] so handlers can branch on the exit path.

(ctx context.Context, sess *session.Session, a *agent.Agent, reason string, events EventSink)

Source from the content-addressed store, hash-verified

201// of the turnEndReason* constants above and is reported via
202// [hooks.Input.Reason] so handlers can branch on the exit path.
203func (r *LocalRuntime) executeTurnEndHooks(ctx context.Context, sess *session.Session, a *agent.Agent, reason string, events EventSink) {
204 r.dispatchHook(ctx, a, hooks.EventTurnEnd, &hooks.Input{
205 SessionID: sess.ID,
206 AgentName: a.Name(),
207 Reason: reason,
208 }, events)
209}
210
211// contextMessages converts a context-providing hook's AdditionalContext
212// into a one-element transient system-message slice ready to thread

Callers 2

runHarnessAgentMethod · 0.95
runTurnMethod · 0.95

Calls 2

dispatchHookMethod · 0.95
NameMethod · 0.65

Tested by

no test coverage detected