Documentation
¶
Index ¶
- type EventType
- type Hook
- func (h *Hook) Delete(ctx context.Context, db bun.IDB) error
- func (h Hook) GetCursor() string
- func (h Hook) GetSortField() string
- func (h Hook) GetSortValue() interface{}
- func (h Hook) GetUniqueField() string
- func (h Hook) GetUniqueValue() interface{}
- func (h *Hook) Insert(ctx context.Context, db bun.IDB) error
- func (h Hook) IsWildcard() bool
- func (h *Hook) Update(ctx context.Context, db bun.IDB) error
- func (h *Hook) Validate() error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type EventType ¶
type EventType string
const ( EventTypeConversationStarted EventType = "conversation_started" EventTypeConversationEnded EventType = "conversation_ended" EventTypeContextExceeded EventType = "context_exceeded" // TODO: consider deprecating EventTypePreContextCompaction EventType = "pre_context_compaction" EventTypePostContextCompaction EventType = "post_context_compaction" EventTypePreToolUse EventType = "pre_tool_use" EventTypePostToolUse EventType = "post_tool_use" )
func (EventType) MarshalJSON ¶
func (*EventType) UnmarshalJSON ¶
type Hook ¶
type Hook struct {
bun.BaseModel `bun:"table:hooks"`
ID uuid.UUID `bun:",pk,type:uuid" json:"id"`
EventType EventType `bun:"event_type,notnull" json:"event_type"`
AgentName string `bun:"agent_name" json:"agent_name"` // empty = wildcard
Command string `bun:"command,notnull" json:"command"`
Args []string `bun:"args,array" json:"args"`
Enabled bool `bun:"enabled" json:"enabled"`
}
func (Hook) GetSortField ¶
func (Hook) GetSortValue ¶
func (h Hook) GetSortValue() interface{}
func (Hook) GetUniqueField ¶
func (Hook) GetUniqueValue ¶
func (h Hook) GetUniqueValue() interface{}
func (Hook) IsWildcard ¶
Click to show internal directories.
Click to hide internal directories.