Versions in this module Expand all Collapse all v0 v0.9.3 Jul 6, 2026 v0.9.2 Jul 6, 2026 Changes in this version + func IsPreApproved(ctx context.Context) bool + func WithDispatcher(ctx context.Context, d Dispatcher) context.Context + func WithPreApproved(ctx context.Context) context.Context + type Config struct + Hooks map[string][]HookGroup + func Load(configDir, workDir string, trustProject bool) (Config, []string) + func (c Config) Empty() bool + type Decision struct + AdditionalContext string + Block bool + ModifiedResult *string + Permission Permission + Reason string + SystemMessage string + UpdatedInput json.RawMessage + func (d Decision) Denied() bool + type Dispatcher interface + Configured func(event Event) bool + Fire func(ctx context.Context, event Event, p Payload) Decision + func DispatcherFromContext(ctx context.Context) Dispatcher + func NewDispatcher(cfg Config, opts Options) Dispatcher + func NewSessionDispatcher(configDir, cwd, sessionID string, logf func(string, ...any)) Dispatcher + type Event string + const PostToolUse + const PostToolUseFailure + const PreToolUse + const SessionStart + const Stop + const UserPromptSubmit + func (e Event) Blockable() bool + type HookGroup struct + Hooks []HookSpec + Matcher string + type HookSpec struct + Async bool + Command string + Timeout int + Type string + type Options struct + CWD string + Env []string + Logf func(string, ...any) + SessionID string + TranscriptPath string + type Payload struct + CWD string + HookEventName string + Prompt string + SessionID string + StopHookActive bool + ToolInput json.RawMessage + ToolName string + ToolResponse string + TranscriptPath string + type Permission string + const PermAllow + const PermAsk + const PermDeny + const PermNone