Versions in this module Expand all Collapse all v0 v0.4.3 Nov 9, 2026 v0.4.2 Nov 4, 2026 Changes in this version + type Event struct + AgentType string + Input json.RawMessage + IsError bool + Messages []llm.Message + Prompt string + Result json.RawMessage + ToolName string + Type EventType + type EventType string + const PostToolUse + const PostToolUseFailure + const PreToolUse + const SessionEnd + const SessionStart + const Stop + const SubagentStart + const UserPromptSubmit + type Func func(ctx context.Context, ev Event) Result + type Registry struct + func NewRegistry() *Registry + func (r *Registry) FireSessionEnd(ctx context.Context) + func (r *Registry) FireSessionStart(ctx context.Context) + func (r *Registry) FireSubagentStart(ctx context.Context, agentType string) + func (r *Registry) FireUserPromptSubmit(ctx context.Context, prompt string) string + func (r *Registry) On(t EventType, f Func) *Registry + func (r *Registry) PostToolUse(ctx context.Context, name string, input, result []byte, isErr bool) + func (r *Registry) PreToolUse(ctx context.Context, name string, input []byte) (bool, string, []byte) + func (r *Registry) Stop(ctx context.Context, messages []llm.Message) (prevent bool, blockingErrors []string, message string) + type Result struct + AdditionalContext string + Decision string + Message string + PreventContinuation bool + UpdatedInput json.RawMessage