hooks

package
v0.1.18 Latest Latest
Warning

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

Go to latest
Published: Sep 2, 2026 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(_ Config, deps Deps) (agentkit.HookRuntime, error)

New registers hooks/runtime: Collect HookProvider instances and run the typed hook chains.

Best practices:

  • Chain order follows the providers dep order, and the first error aborts the chain.

Types

type Config

type Config struct{}

type Deps

type Deps struct {
	Providers []agentkit.HookProvider `json:"providers,omitempty"`
}

type Runtime

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

func (*Runtime) AfterTool

func (r *Runtime) AfterTool(ctx context.Context, in *agentkit.ToolResult) error

func (*Runtime) BeforeStep

func (r *Runtime) BeforeStep(ctx context.Context, in *agentkit.BeforeStep) error

func (*Runtime) BeforeTool

func (r *Runtime) BeforeTool(ctx context.Context, in *agentkit.ToolCall) error

func (*Runtime) TurnStopping

func (r *Runtime) TurnStopping(ctx context.Context, in *agentkit.TurnStopping) error

Jump to

Keyboard shortcuts

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