notify

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Nov 5, 2026 License: MIT Imports: 14 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package notify raises OS notifications for needs_human, dead letters and budget exhaustion (RFC 7.4). Title = agent, body = summary (max 280 chars), never the raw inbound body.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Clip

func Clip(s string, n int) string

Clip trims s to n runes on a rune boundary.

Types

type Event

type Event struct {
	Kind      string    `json:"kind"` // needs_human | dead_letter | budget | claude_unavailable | session_waiting | session_answered
	Agent     string    `json:"agent"`
	Summary   string    `json:"summary"`
	MessageID string    `json:"message_id,omitempty"`
	At        time.Time `json:"at"`
}

Event is one notification.

type Notifier

type Notifier interface {
	Notify(Event) error
}

Notifier delivers events.

func New

func New(spec, dataDir string) Notifier

New builds a notifier from the config value: "os", "none" or "log:<path>". dataDir holds the macOS notifier app (app.go).

Jump to

Keyboard shortcuts

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