New (notify/notify.go)

prompt-gate · agent/internal/notify/notify.go · go · MIT
realtime, email

Broadcasts DLP block events to SSE clients in Prompt Gate.

// Source: https://github.com/ShieldNet-360/prompt-gate | License: MIT | Copyright 2026 ShieldNet360
// Provided via justclaw.it.com; keep this notice with the code.
// Package notify provides real-time event delivery for Prompt Gate.
//
// DLP block events are broadcast to all connected SSE clients (the
// Electron UI). The Electron app shows native desktop notifications
// and in-app toasts. Direct OS notification calls are not used because
// the agent typically runs as root / a system service and cannot reach
// the user's desktop session.
package notify

import (
	"encoding/json"
	"fmt"
	"sync"
	"time"
)

// faqURL is the FAQ a blocked user is pointed at — it explains best
// practice (e.g. replace a key in a troubleshooting question with
// [PLACEHOLDER]) rather than auto-redacting. 

... (truncated -- full source via MCP)

See the full source, get the GitHub permalink, and search for more like it.

Get a free API key