notify

package
v0.260409.1540 Latest Latest
Warning

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

Go to latest
Published: Apr 9, 2026 License: MPL-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterRoutes

func RegisterRoutes(engine *gin.Engine, handler *Handler)

RegisterRoutes registers notification hook routes

Types

type ClaudeCodeHookInput

type ClaudeCodeHookInput struct {
	SessionID            string `json:"session_id"`
	TranscriptPath       string `json:"transcript_path"`
	Cwd                  string `json:"cwd"`
	PermissionMode       string `json:"permission_mode"`
	HookEventName        string `json:"hook_event_name"` // "Stop", "Notification", "PostToolUse", etc.
	StopHookActive       bool   `json:"stop_hook_active"`
	LastAssistantMessage string `json:"last_assistant_message"` // the assistant's last message text
	ToolName             string `json:"tool_name"`              // for PostToolUse
	ToolInput            string `json:"tool_input"`             // for PostToolUse
	ToolOutput           string `json:"tool_output"`            // for PostToolUse
	NotificationMessage  string `json:"notification_message"`   // for Notification hook
}

ClaudeCodeHookInput represents the JSON payload Claude Code sends to hooks via stdin

{
   "session_id": "9db738b8-4ee6-447a-9623-6fbf507e8d90",
   "transcript_path": ".claude/projects/-/9db738b8-4ee6-447a-9623-6fbf507e8d90.jsonl",
   "cwd": "tingly-box-branch",
   "permission_mode": "default",
   "hook_event_name": "Stop",
   "stop_hook_active": false,
   "last_assistant_message": "Hi! I see you're looking at the script files. Need help with something?"
}

type Handler

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

Handler handles notification HTTP requests from Claude Code hooks

func NewHandler

func NewHandler() *Handler

NewHandler creates a new notification handler with a system notification provider

func (*Handler) Notify

func (h *Handler) Notify(c *gin.Context)

Notify receives a Claude Code hook event and sends a desktop notification POST /tingly/:scenario/notify

Jump to

Keyboard shortcuts

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