chime

package
v0.14.0 Latest Latest
Warning

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

Go to latest
Published: Jul 22, 2026 License: MIT Imports: 8 Imported by: 0

Documentation

Overview

Package chime filters provider hook events and plays the local notification sound.

Index

Constants

View Source
const (
	// ProviderClaude identifies the Claude hook event schema.
	ProviderClaude = "claude"
	// ProviderCodex identifies the Codex hook event schema.
	ProviderCodex = "codex"
	// ProviderAntigravity identifies the Antigravity hook event schema.
	ProviderAntigravity = "antigravity"
)

Variables

This section is empty.

Functions

func Handle

func Handle(provider string, stdin io.Reader, stdout io.Writer, stderr io.Writer, runner SoundRunner) error

Handle validates one provider hook event, optionally starts a sound, and emits the provider's non-blocking response. Invalid metadata returns an error.

Types

type SoundRunner

type SoundRunner interface {
	Play() error
}

SoundRunner starts the configured notification sound.

type SoundRunnerFunc

type SoundRunnerFunc func() error

SoundRunnerFunc adapts a function to SoundRunner.

func (SoundRunnerFunc) Play

func (f SoundRunnerFunc) Play() error

Play starts the function-backed notification sound.

type SystemSoundRunner

type SystemSoundRunner struct{}

SystemSoundRunner starts the supported system notification sound asynchronously.

func (SystemSoundRunner) Play

func (SystemSoundRunner) Play() error

Play selects the operating system sound command, discards its standard streams, and releases it without waiting.

Jump to

Keyboard shortcuts

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