Versions in this module Expand all Collapse all v0 v0.1.0 Aug 9, 2026 Changes in this version + const PermissionAllowAlways + const PermissionAllowOnce + const PermissionRejectAlways + const PermissionRejectOnce + var ErrInterruptNotFound = errors.New("interrupt not found") + var ErrInvalidPayload = errors.New("invalid payload") + func Register(factory func() Interrupt) + type Interrupt interface + Error func() string + Return func([]byte) error + Serialize func() ([]byte, error) + TypeName func() string + func Clone(intr Interrupt) Interrupt + func New(typeName string) (Interrupt, bool) + type PayloadInitializer interface + InitFromPayload func([]byte) error + type PayloadValidator interface + ValidatePayload func([]byte) error + type PermissionOption struct + Kind string + Name string + OptionID string + func DefaultPermissionOptions() []PermissionOption + type ToolPermissionInterrupt struct + Allowed bool + Options []PermissionOption + SelectedKind string + SelectedOptionID string + Title string + ToolName string + func (p *ToolPermissionInterrupt) Error() string + func (p *ToolPermissionInterrupt) InitFromPayload(payload []byte) error + func (p *ToolPermissionInterrupt) Return(payload []byte) error + func (p *ToolPermissionInterrupt) Serialize() ([]byte, error) + func (p *ToolPermissionInterrupt) TypeName() string + func (p *ToolPermissionInterrupt) ValidatePayload(payload []byte) error + type ToolPermissionPayload struct + InterruptId string + OptionID string + type UserChoice struct + Description string + IsRecommended bool + Title string + type UserSelectionInterrupt struct + ConfirmedChoice *UserChoice + Options []UserChoice + func (c *UserSelectionInterrupt) Error() string + func (c *UserSelectionInterrupt) InitFromPayload(payload []byte) error + func (c *UserSelectionInterrupt) Return(payload []byte) error + func (c *UserSelectionInterrupt) Serialize() ([]byte, error) + func (c *UserSelectionInterrupt) TypeName() string + func (c *UserSelectionInterrupt) ValidatePayload(payload []byte) error + type UserSelectionPayload struct + InterruptId string + SelectionIdx int