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

Function HookFinished

pkg/runtime/event.go:813–831  ·  view source on GitHub ↗
(event hooks.EventType, sessionID string, result *hooks.Result, dispatchErr error, duration time.Duration, agentName string)

Source from the content-addressed store, hash-verified

811func (e *HookFinishedEvent) GetSessionID() string { return e.SessionID }
812
813func HookFinished(event hooks.EventType, sessionID string, result *hooks.Result, dispatchErr error, duration time.Duration, agentName string) Event {
814 e := &HookFinishedEvent{
815 Type: "hook_finished",
816 SessionID: sessionID,
817 HookEvent: event,
818 DurationMs: duration.Milliseconds(),
819 Allowed: true,
820 AgentContext: newAgentContext(agentName),
821 }
822 if result != nil {
823 e.Allowed = result.Allowed
824 e.Message = result.Message
825 }
826 if dispatchErr != nil {
827 e.Allowed = false
828 e.Error = dispatchErr.Error()
829 }
830 return e
831}
832
833// HookBlockedEvent is sent when a pre-tool hook blocks a tool call
834type HookBlockedEvent struct {

Callers 1

dispatchHookMethod · 0.85

Calls 2

newAgentContextFunction · 0.85
ErrorMethod · 0.45

Tested by

no test coverage detected