notification

package
v1.45.6 Latest Latest
Warning

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

Go to latest
Published: Sep 23, 2026 License: GPL-2.0 Imports: 1 Imported by: 0

Documentation

Overview

Package notification defines the agent-independent delivery boundary. Validation/policy loading, origin mapping and durable admission belong to callers.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Content

type Content struct {
	Title    string
	Body     string
	Subtitle string
	Category string // info, attention, progress; never an analyzer status
}

type Deadline

type Deadline struct {
	BootID   string
	NotAfter float64
}

Deadline is captured at transport admission, before validation or locks. Seconds are boot-continuous seconds including suspend, not Unix wall time.

type DeliveryPort

type DeliveryPort interface {
	Deliver(context.Context, Request) Receipt
}

type DesktopTarget

type DesktopTarget struct {
	ThreadID        string
	ApplicationPath string
	TeamID          string
}

DesktopTarget is supplied by a trusted integration and setup adapter, never decoded from model arguments. App identity is operator-pinned, not inferred from cwd, metadata text, or whichever app happens to be foreground.

type Navigation string
const (
	Required   Navigation = "required"
	BestEffort Navigation = "best_effort"
	None       Navigation = "none"
)
type NavigationResult struct {
	Capability string // available, unavailable, disabled
	Precision  string // chat_id or none
	Scope      string
	Reason     string
}

type PolicySnapshot

type PolicySnapshot struct {
	Valid           bool
	ExplicitEnabled bool
	DesktopEnabled  bool
	ClickToFocus    bool
	SoundEnabled    bool
}

PolicySnapshot is a value copy of the initial strict policy decision. The delivery adapter never reloads legacy defaults or mutates caller policy.

type Readiness

type Readiness struct {
	CorrelationID string
	Status        string // ready, rejected, suppressed
	Reason        string
	Backend       string
	Navigation    NavigationResult
}

Readiness is a read-only snapshot, with no retry/admission/OS acceptance claim. Only Status == "ready" permits a new journal admission. The caller captures Deadline before this call and reuses it for Deliver, without resetting it.

type ReadinessPort

type ReadinessPort interface {
	CheckReadiness(context.Context, Request) Readiness
}

type Receipt

type Receipt struct {
	CorrelationID string
	Status        string // rejected, suppressed, submitted, unknown
	Reason        string
	RetrySafe     bool // always false here: delivery does not own replay admission
	Backend       string
	Navigation    NavigationResult
}

type Request

type Request struct {
	Content       Content
	CorrelationID string // UUID assigned by the durable admission owner
	Deadline      Deadline
	Policy        PolicySnapshot
	Navigation    Navigation // empty defaults to Required
	Target        DesktopTarget
	Silent        bool
}

Jump to

Keyboard shortcuts

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