hooks

package
v0.6.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 30, 2026 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Input

type Input struct {
	SessionID string `json:"session_id"`
	AgentType string `json:"agent_type"` // Populated if --agent was specified (Claude Code 2.1.14+)
}

Input represents the JSON input from Claude Code hooks

type Manager

type Manager struct {
	// contains filtered or unexported fields
}

Manager handles hook execution

func NewManager

func NewManager() *Manager

NewManager creates a new hook manager

func (*Manager) HandleBusy

func (m *Manager) HandleBusy(input Input, rawInput []byte) error

HandleBusy processes the busy hook (called when user submits prompt)

func (*Manager) HandleIdle

func (m *Manager) HandleIdle(input Input, rawInput []byte) error

HandleIdle processes the idle hook (called when Claude stops responding)

func (*Manager) HandleNotification added in v0.5.0

func (m *Manager) HandleNotification(input Input, rawInput []byte) error

HandleNotification processes the notification hook

func (*Manager) HandlePermissionRequest added in v0.5.0

func (m *Manager) HandlePermissionRequest(input Input, rawInput []byte) error

HandlePermissionRequest processes the permission-request hook

func (*Manager) HandlePostToolUse added in v0.5.0

func (m *Manager) HandlePostToolUse(input Input, rawInput []byte) error

HandlePostToolUse processes the post-tool-use hook (after tool calls)

func (*Manager) HandlePreCompact

func (m *Manager) HandlePreCompact(input Input, rawInput []byte) error

HandlePreCompact processes the pre-compact hook

func (*Manager) HandlePreToolUse added in v0.5.0

func (m *Manager) HandlePreToolUse(input Input, rawInput []byte) error

HandlePreToolUse processes the pre-tool-use hook (before tool calls)

func (*Manager) HandleSessionEnd

func (m *Manager) HandleSessionEnd(input Input, rawInput []byte) error

HandleSessionEnd processes the session end hook

func (*Manager) HandleSessionStart

func (m *Manager) HandleSessionStart(input Input, rawInput []byte) error

HandleSessionStart processes the session start hook

func (*Manager) HandleSetup added in v0.5.0

func (m *Manager) HandleSetup(input Input, rawInput []byte) error

HandleSetup processes the setup hook (triggered by --init, --init-only, --maintenance)

func (*Manager) HandleSubagentStop added in v0.5.0

func (m *Manager) HandleSubagentStop(input Input, rawInput []byte) error

HandleSubagentStop processes the subagent-stop hook

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL