agent

package
v0.5.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Names

func Names() []string

func Register

func Register(a Agent)

Types

type Agent

type Agent interface {
	Name() string

	DecodeHookInput(input []byte) (*HookEvent, error)

	EncodeAllow(event *HookEvent, reason string) ([]byte, error)

	EncodeDeny(event *HookEvent, reason string) ([]byte, error)
}

func Get

func Get(name string) (Agent, bool)

type HookEvent

type HookEvent struct {
	SessionID      string
	HookEventName  string
	ToolName       string
	ToolInput      map[string]any
	ToolResponse   map[string]any
	ToolUseID      string
	CWD            string
	PermissionMode string
	DurationMs     *int64
	Error          string
	IsInterrupt    *bool
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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