hooks

package
v0.0.0-...-23898a9 Latest Latest
Warning

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

Go to latest
Published: May 5, 2026 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

Package hooks is the public façade over the internal lifecycle hooks runner. Hosts build a *Runner, register Go callbacks against lifecycle events (PreToolUse, PostToolUse, UserPromptSubmit, PreCompact, PostCompact, Stop), and hand the runner to the conversation loop / generation engine.

See the internal hooks package for design rationale: zero-cost when nil, sequential first-decision-wins dispatch, panic recovery.

Index

Constants

View Source
const (
	PreToolUse         = intl.PreToolUse
	PostToolUse        = intl.PostToolUse
	PostToolUseFailure = intl.PostToolUseFailure
	UserPromptSubmit   = intl.UserPromptSubmit
	PreCompact         = intl.PreCompact
	PostCompact        = intl.PostCompact
	Stop               = intl.Stop
)
View Source
const (
	ActionContinue = intl.ActionContinue
	ActionModify   = intl.ActionModify
	ActionBlock    = intl.ActionBlock
)

Variables

This section is empty.

Functions

This section is empty.

Types

type ActionKind

type ActionKind = intl.ActionKind

type Context

type Context = intl.Context

type Decision

type Decision = intl.Decision

type Event

type Event = intl.Event

type Handler

type Handler = intl.Handler

type Option

type Option = intl.Option

func WithLogger

func WithLogger(w io.Writer) Option

WithLogger sets the writer used to log handler errors. Default: os.Stderr. Pass io.Discard to silence the runner.

type Runner

type Runner = intl.Runner

func NewRunner

func NewRunner(opts ...Option) *Runner

Jump to

Keyboard shortcuts

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