exec

package
v0.1.56 Latest Latest
Warning

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

Go to latest
Published: Oct 23, 2026 License: Apache-2.0 Imports: 10 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 exec is a notification channel that runs a local command (named by NOTIFY_EXEC) with the notification JSON on stdin — a true local hook (desktop toast, log shipper, pager, …). It is a self-registering plug-in for the notify registry: importing it for its init() adds exec delivery with no change to the send path.

TRUST BOUNDARY: the command comes from NOTIFY_EXEC in the daemon's own environment, NOT from any API client. Running it is the same trust as choosing the daemon binary itself; it is never settable over HTTP (unlike the webhook target, which is API-configurable). Each invocation is bounded by a timeout so a hung or slow hook can never wedge a turn, and stdout/stderr are discarded (a bounded stderr snippet is kept only for error reporting). The notification is delivered on stdin, never interpolated into the command string — no shell-injection surface from notification content.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Notifier

type Notifier struct {
	Command string
	Timeout time.Duration
}

Notifier runs Command via `bash -lc` (matching the daemon's driver convention) with the notification JSON piped to stdin. Timeout <= 0 means no bound (not used by the factory).

func (*Notifier) Notify

func (e *Notifier) Notify(ctx context.Context, n agent.Notification) error

Jump to

Keyboard shortcuts

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