How 777genius/claude-notifications-go works
Agent Notifications is a cross-platform desktop alert and click-to-focus product for Claude Code and Codex CLI. The principal workflow is agent hook events entering the Go CLI, being interpreted and enriched with session/project context, filtered and deduplicated by policy, then delivered through desktop notifications, sound, or optional webhooks. Setup and configuration manage each agent’s hooks and settings; the README also documents terminal targeting, sound controls, focus-aware delivery, and webhook integrations. The graph follows documented capabilities where source excerpts were unavailable; those branches use exact enclosing paths from the tree.
Main entry points: main.go Hook CLI · notifier.go Notification dispatcher · notifier Desktop notifications · config Effective settings
Components 24
Event intake
- Hook CLI
cmd/claude-notifications/main.go - Hook mapping
internal/hooks - Codex mapping
internal/codexsource/codexsource.go
Context and policy
- Session context
internal/analyzer - Event enrichment
internal/hooks/enricher.go - Effective settings
internal/config - Delivery policy
internal/notification - Duplicate suppression
internal/dedup/dedup.go - Event journal
internal/agentnotify/journal
Alert delivery
- Notification dispatcher
internal/notifier/notifier.go - Desktop notifications
internal/notifier - Focus targeting
internal/notifier - Focus daemon
internal/daemon/server.go - Sound playback
internal/audio/audio.go - Sound catalog
internal/sounds/sounds.go - Webhook delivery
internal/webhook
Setup and settings
- Setup wizard
internal/agentnotify/setupwizard - Agent registration
internal/agentnotify/registration/registration.go - Codex setup
internal/codexsetup - Runtime installer
internal/installruntime - Config commands
cmd/claude-notifications/config_command.go
Other components
- Claude Code
- Codex CLI
- Webhook endpoints
Connections 24
- Claude Code → Hook CLI: invokes hooks
- Codex CLI → Hook CLI: invokes hooks
- Hook CLI → Hook mapping: routes Claude events
- Hook CLI → Codex mapping: maps Codex events
- Hook CLI → Session context: reads context
- Hook CLI → Event enrichment: enriches events
- Hook CLI → Effective settings: loads settings
- Hook CLI → Delivery policy: evaluates delivery
- Hook CLI → Duplicate suppression: suppresses repeats
- Hook CLI → Event journal: records state
- Hook CLI → Notification dispatcher: dispatches alerts
- Notification dispatcher → Desktop notifications: sends alerts
- Notification dispatcher → Sound playback: plays sound
- Notification dispatcher → Webhook delivery: sends webhooks
- Webhook delivery → Webhook endpoints: posts events
- Desktop notifications → Focus targeting: attaches target
- Focus daemon → Desktop notifications: sends alerts
- Focus daemon → Focus targeting: handles click
- Config commands → Effective settings: inspects settings
- Setup wizard → Agent registration: configures hooks
- Setup wizard → Effective settings: prepares settings
- Codex setup → Agent registration: registers Codex
- Runtime installer → Hook CLI: installs runtime
- Sound catalog → Sound playback: selects sounds